- SASM is a simple operating system simulator that reads assembly language and does something.
- 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