- SASM is a simple language inspired by assembly.
- Jumps to a label and continues the flow there.
- Usage:
main:
JMP some
MOV A, 0x00 ; Never execute
some:
; Continues from here...- Jumps to a label, but Returns to caller when done.
- Usage:
main:
CALL some
MOV A, 0x00 ; After some returns, will be executed
some:
; Do something
RET ; Returns to caller (main)- Interrupt 80 is the Interrupt for #Syscalls.
- Usage:
MOV D, <SyscallNumber> ; The syscall
INT 0x80 ; The interrupt- Put Int, Print a integer in stdout
- A = int
- Usage:
MOV A, 0x01 ; integer 1
MOV D, 0x01 ; syscall PUTI
INT 0x80 ; perform syscall- Put Char, Print a char in stdout
- A = char
- Returns in A = Bytes writter
- Usage:
MOV A, 0x0A ; char A in hexa
MOV D, 0x02 ; syscall PUTC
INT 0x80 ; perform syscall- Exit the program with status code.
- A = status code.
- Usage:
MOV A, 0x00 ; 0 in hexa
MOV D, 0x03 ; syscall EXIT
INT 0x80 ; perform syscall