ScratchData LogoScratchData
Back to mikeyaboy's profile

16 bit cpu emulator

MImikeyaboy•Created February 1, 2024
16 bit cpu emulator
8
7
102 views
View on Scratch

Instructions

If you want to change the program, click "see inside" and change the values stored in ram. Currently it just increments a number and displays it until an overflow (becomes negative) occurs. Turbowarp link: https://turbowarp.org/959686523/fullscreen?turbo Register A is the accumulator. Instruction set: number in square brackets is memory address. (12 bits) xxxx [xxxxxxxxxxxx] 0000 [null] -> NO OP 0001 [RAM address] -> Load to A from [RAM address] 0010 [RAM address] -> Save A to [RAM address] 0011 [RAM address] -> Add [RAM address] to A 0100 [RAM address] -> Subtract A by [RAM address] 0101 [RAM address] -> Multiply A by [RAM address] 0110 [RAM address] -> Divide A by [RAM address] 0111 [null] -> Copy A to OUT 1000 [RAM address] -> Load OUT from [RAM address] 1001 [RAM address] -> Jump to [RAM address] 1010 [RAM address] -> Jump to [RAM address] if A's value is ZERO 1011 [RAM address] -> Jump to [RAM address] if A's value is NEGATIVE 1111 [null] -> halt [null]

Project Details

Project ID959686523
CreatedFebruary 1, 2024
Last ModifiedJune 5, 2024
SharedFebruary 4, 2024
Visibilityvisible
CommentsAllowed