pixie1/Assembler
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
This project is a designed to a simulated low level assembler with a virtual machine to run the generated bytecode this is an 8 bit register architecture with word size of 4bytes .asm language comments start with the character '#" and continue until end of line to use immediate values precede number with the character '$', i.e. "TRP $3" DATA TYPES .INT is a signed integer type .BYT is a byte *BYT data expects a hexidecimal or character inside of quotes, i.e "' '" or "0x32" supports following commands among registers ADD - add SUB - subtract MUL - multiply DIV - divide AND - bitwise and MOV - copy data from source to destination register COM - compares value of registers, negative if destination is larger, positive is source is larger supports the following for load/store LDB - Load Byte into register from label LDR - Load integer value into register(or just word size data) from label STB - Stores Byte from register at label STR - Stores integer value from register(or just word size data) into label *if register given instead of label the register data will be an infererred address, allowing register indirect mode. supports the following branch commands JMP - jumps to label BNZ - Branches to label if register is zero supports the following traps TRP $0 - End program TRP $1 - Print character/byte TRP $3 - Print integer