;;;;;;;;;;;;; ; Constants ; ;;;;;;;;;;;;; SYSCALL_INTERRUPT EQU 80h SYSCALL_UNKNOWN EQU 0 SYSCALL_CLEAR_SCREEN EQU 1 SYSCALL_READ_CHAR EQU 2 SYSCALL_READ_LINE EQU 3 SYSCALL_PRINT_CHAR EQU 4 SYSCALL_PRINT_STRING EQU 5 SYSCALL_NEWLINE EQU 6 SYSCALL_WAIT_JIFFIES EQU 7 SYSCALL_FLOPPY_READ EQU 8 SYSCALL_FLOPPY_WRITE EQU 9 SYSCALL_INVALID EQU 10 ;;;;;;;; ; Code ; ;;;;;;;; section .text unknownSyscall: ; Return with ax set to 0 and carry flag set popf stc pushf xor ax, ax iret ;;;;;;;; ; Data ; ;;;;;;;; section .data syscallTable dw unknownSyscall ; 0 dw clearScreen ; 1 dw readChar ; 2 dw readLine ; 3 dw printChar ; 4 dw printString ; 5 dw newline ; 6 dw waitJiffies ; 7 dw floppy_read ; 8 dw unknownSyscall ; 9