Skip to content

Latest commit

 

History

History
48 lines (32 loc) · 890 Bytes

SystemCalls.md

File metadata and controls

48 lines (32 loc) · 890 Bytes

System Calls

Console

The console system call can be called by using the interrupt on 0x40.

int 0x40

Print new line (EAX = 0)

Prints a new line.

  mov eax, 0              ; print new line
  int 0x40                ; console system call

Print character (EAX = 1)

Prints a character in the console.

Parameter Description
EBX ASCII value of character to print
  mov eax, 1              ; print char
  mov ebx, 43             ; ASCII "+"
  int 0x40                ; console system call

Print new line until zero-byte (EAX = 3)

Prints text until zero-byte including a new line.

Parameter Description
EBX Start address of text to print
  mov eax, 3              ; print line until 0 
  mov ebx, .str           ; mem-address of 'str' variable
  int 0x40                ; console system call