How to use JavaScript tiny assembler for NAND6 computer:
  • Write the assembler code in the left textarea. Hexadecimal code will be made in the right textarea.
  • Always use hexadecimal, 2 digits for 1 byte value, and 3 digits for address. Either "Ox" or "h" is NOT needed.
  • ORG statement can be used to specify absolute address.
  • Label can contain alphabet, number and underscore. It must be end with ":". Case-non specific.
  • Comment can be inserted by using either "#", ";", "//", or "/* */".
Syntax:
NOP:No operation. Store 0x3F in R0.
NAND Rx,Ry,Rz:Store NAND value of Rx and Ry in Rz.
NAND Rx,Ry,(zz):Store NAND value of Rx and Ry in memory (zz).
NAND Rx,(yy),Rz:Store NAND value of Rx and memory (yy) in Rz.
NAND Rx,yy,Rz:Store NAND value of Rx and 6 bit value yy in Rz.
JUMP label::Jump to address shown by label:.
SL Rx:Shift left Rx.
SJIC Rx,label::Shift left Rx. Jump to address shown by label: if carry.
LD Rx,yy:Store 6 bit value yy in Rx.
CALL label::Store return address in R2 and R3, then jump.
RET:Jump to 1C2.
Emulation