26 lines
1.1 KiB
Plaintext
26 lines
1.1 KiB
Plaintext
[0] :: variables
|
|
[1] NVAR var1, 12 :: Create 'var1' with value of '12'
|
|
[2] NVAR var2, 10 :: Create 'var2' with value of '10'
|
|
[3] NVAR outcome, 0 :: Create 'outcome' with value of '0'
|
|
[4] JMP 8 :: Jump to line 8
|
|
[5]
|
|
[6]
|
|
[7] :: setup
|
|
[8] SEA var1 :: Set Accumulator to 'var1' (12)
|
|
[9] LDX :: Load Accumulator (12) into X
|
|
[10] SEA var2 :: Set Accumulator to 'var2' (10)
|
|
[11] LDY :: Load Accumulator (10) into Y
|
|
[12] ADD :: Add X (12) and Y (10) and store into the Accumulator (22)
|
|
[13] SVAR outcome, ACC :: Set variable 'outcome' to '0'
|
|
[14] SEA outcome :: Set Accumulator to 'outcome' (0)
|
|
[15] STA 4 :: Store the Accumulator (0) into Memory address 4
|
|
[16] PRM 4 :: Print value of memory address 4
|
|
[17] JMP 21 :: Jump to line 21
|
|
[18]
|
|
[19]
|
|
[20] :: end
|
|
[21] RVAR var1 :: Remove variable 'var1'
|
|
[22] RVAR var2 :: Remove variable 'var2'
|
|
[23] RVAR outcome :: Remove variable 'outcome'
|
|
[24] HLT :: Halt execution
|