-
Notifications
You must be signed in to change notification settings - Fork 5
Interruptions
azertyfun edited this page May 27, 2016
·
6 revisions
All non-private driver functions should be accessible via interruptions. If the interrupt handler encounters a problem (such as non-existent interrupt code), it will fail silently. The interrupt handler assumes that SP is correctly set. All functions handled by the interrupt handler are saved in int_ptr.
- INT_CLOCK (0x6000) : Clock interrupt, you shouldn't need it.
- INT_KEYBOARD (0x7000) : Keyboard interrupt, you shouldn't need it.
- INT_FLOPPY (0x8000) : Disk interrupt, you shouldn't need it.
- INT_MALLOC (0x0000) : malloc for B words. RAM address returned in Z. If Z == 0xFFFF, there has been an error (usually no more memory left).
- INT_FREE (0x0001) : Frees the memory block in B
- INT_INITMEM (0x0002) : Frees the memory.
- INT_REALLOC (0x0003) : Moves memory block at B to new a new one with C words. Returns RAM address in Z. If Z == 0xFFFF, there has been an error.
- INT_PRINTF (0x1000) : Prints the null-terminated string in B, at the row specified in I and the column specified in J. Takes into account new line feeds (0x11) And tabs (0x1F).
- INT_PRINTC (0x1001) : Prints the char in C, at the row specified in I and the column specified in J.
- INT_SCROLL (0x2001) : Makes the screen go up by one row.
- INT_CLEARLINE (0x2002) : Clears the screen row specified in I I.
- INT_GETCOLOR (0x2003) : Saves the current screen color to B.
- INT_CLEARSCREEN (0x2004) : Clears the whole screen.
- INT_LAUNCH (0x3000) : Launches a program (cf. the wiki page on program spawning).
- INT_WAITKEY_BLOCKING (0x4000) : Blocks the program until a key is typed, which will be stored in C.
- INT_WAITKEY_NONBLOCKING (0x4001) : Saves the next typed key to C.
- INT_KILL (0x5000) : Stops the program, returns the message in B.