Skip to content

trindadedev13/SASM

Repository files navigation

SASM (Simulated Assembly)

  • SASM is a simple operating system simulator that reads assembly language and does something.

Interrupts

INT 0x80

  • Interrupt 80 is the Interrupt for #Syscalls.
  • Usage:
MOV     D, <SyscallNumber>  ; The syscall
INT     0x80                ; The interrupt

Syscalls

0x01 - PUTI

  • Put Int, Print a integer in stdout
  • A = int
  • Usage:
MOV     A, 0x01  ; integer 1
MOV     D, 0x01  ; syscall PUTI
INT     0x80     ; perform syscall

0x02 - PUTC

  • 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

0x03 - EXIT

  • 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

About

Simulated Assembly. Assembly language simulator.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published