Skip to content

Latest commit

 

History

History
97 lines (77 loc) · 1.23 KB

File metadata and controls

97 lines (77 loc) · 1.23 KB

Miscellaneous instructions

Misc instructions are used for various things. Instructions covered in this article are listed below:

  1. rem
  2. zero
  3. inc and dec
  4. exit
  5. nop
  6. db
  7. cls
  8. wait
  9. xchg
  10. align

rem

Old-styled comments. Not recommended; wasting virtual CPU cycles! Just use ;.

; comment

zero

Reset a register.

zero tlr

inc and dec

Increase and decrease values of registers.

inc tlr

exit

Terminate the system.

exit

Warning

This is used stricly in the REPL mode.

nop

Does absolutely nothing.

nop

db

This instruction is used to debug register values.

db tlr

cls

This instruction is used to clear the screen.

cls

wait

This instruction is used to block the main thread for the specific amount of time.

wait 1000 ; pause for 1s

xchg

This instruction exchanges the values of tlr and stl.

.start
    mov tlr, 1
    mov stl, 2
    xchg
    db tlr
    db stl

Output:

2
1

align

Define memory address alignment.

.start
    align <number>