vc-3_system_interrupt_table
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| vc-3_system_interrupt_table [2026/01/21 01:53] – appledog | vc-3_system_interrupt_table [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | = VC-3 System Interrupt Table | ||
| - | The VC-3 is a system, running on the SD-8516. | ||
| - | == Introduction | ||
| - | I guess this interrupt system is part of the KERNAL, so should be more " | ||
| - | |||
| - | == Calling Convention | ||
| - | Each INT subsystem has it's own convention. However, the INT 05h system was done first so it represents a general convention you can expect going forward. | ||
| - | |||
| - | === Parameters | ||
| - | * Function number: AH | ||
| - | * Small values such as char can go in AL. Otherwise, inputs can go in B. | ||
| - | * Pointers: ELM, ELD | ||
| - | |||
| - | === Returns | ||
| - | * Values: B, and C if needed | ||
| - | * Status: Carry flag | ||
| - | * Pointers: ELM, ELD (see calling convention) | ||
| - | |||
| - | === Example Code | ||
| - | <codify armasm> | ||
| - | LDAL #' | ||
| - | LDB #1234 | ||
| - | LDAH $11 ; VAR_SET | ||
| - | INT $05 | ||
| - | |||
| - | LDELD @string | ||
| - | LDAH $62 ; IO_GETNUM | ||
| - | INT $05 | ||
| - | ; B has parsed number | ||
| - | </ | ||
| - | |||
| - | == INT 05h - Pao Alto Tiny Basic | ||
| - | === Memory Map | ||
| - | ; PATB System Memory ($01ED00-$01EDFF, | ||
| - | .equ PATB_VARIABLES | ||
| - | .equ PATB_EXPR_STACK | ||
| - | .equ PATB_EXPR_SP | ||
| - | .equ PATB_GOSUB_STACK | ||
| - | .equ PATB_GOSUB_SP | ||
| - | .equ PATB_FOR_STACK | ||
| - | .equ PATB_FOR_SP | ||
| - | .equ PATB_PROGRAM_PTR | ||
| - | .equ PATB_IL_PTR | ||
| - | .equ PATB_INPUT_PTR | ||
| - | .equ PATB_RANDSEED | ||
| - | .equ PATB_STATUS | ||
| - | ; ; Bit 0: Running (1) / Stopped (0) | ||
| - | ; ; Bit 1: Error flag | ||
| - | ; ; Bit 2: Break flag | ||
| - | |||
| - | === Function Dispatch | ||
| - | ; ============================================================================ | ||
| - | ; INT 05h - PALO ALTO TINY BASIC SYSTEM | ||
| - | ; Complete implementation for PATB IL interpreter | ||
| - | ; ============================================================================ | ||
| - | ; Function dispatch via AH register: | ||
| - | ; | ||
| - | ; === EXECUTION CONTROL (AH=$00-$0F) === | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; === VARIABLE MANAGEMENT (AH=$10-$1F) === | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; === EXPRESSION STACK (AH=$20-$2F) === | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; === PROGRAM LINE MANAGEMENT (AH=$30-$3F) === | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; === GOSUB/ | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; === FOR/NEXT STACK (AH=$50-$5F) === | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; === INPUT/ | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; === STRING/ | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; === ARITHMETIC/ | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; === COMPARISON HELPERS (AH=$90-$9F) === | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; === ERROR HANDLING (AH=$A0-$AF) === | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; === IL INTERPRETER CORE (AH=$F0-$FF) === | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; ============================================================================ | ||
| - | |||
| - | |||
| - | |||
| - | == INT 10h - Video Services | ||
| - | ; ============================================================================ | ||
| - | ; INT 10h - VIDEO SERVICES | ||
| - | ; Stellar BIOS Video interrupt handler | ||
| - | ; ============================================================================ | ||
| - | ; Function dispatch via AH register: | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; ============================================================================ | ||
| - | |||
| - | === AH=00h: Set video mode | ||
| - | * Returns: AL is 00 on success, 01 if the mode failed to init. | ||
| - | |||
| - | Available modes: | ||
| - | * Mode 0: 22x23 console | ||
| - | * Mode 1: 40x25 console | ||
| - | * Mode 2: 80x25 console | ||
| - | * Mode 3: still thinking, graphics, or superterminal? | ||
| - | |||
| - | === AH=01h: Set cursor shape | ||
| - | === AH=02h: Set cursor position | ||
| - | === AH=03h: Get cursor position | ||
| - | === AH=0Eh: Write character (teletype) | ||
| - | === AH=13h: Write string | ||
| - | |||
| - | == INT 11h - Keyboard Services | ||
| - | === AH=00h: Read character (non-blocking) | ||
| - | * returns character code in AL and keyboard flags in BL. | ||
| - | |||
| - | === AH=01h: Read character (blocking) | ||
| - | * returns character code in AL, keyboard flags in BL, and time spent waiting in ms in C | ||
| - | |||
| - | === AH=02h: Get keyboard flags | ||
| - | * returns keyboard flags in AL. | ||
| - | |||
| - | === AH=03h: Check if key available | ||
| - | * returns the number of keys waiting in AL. I.E. 0=no keys available, 1+= has keys waiting. | ||
| - | |||
| - | == INT 12h - String Services | ||
| - | === AH=00h: strlen | ||
| - | === AH=01h: strcpy | ||
| - | === AH=02h: strcmp | ||
| - | === AH=03h: strcat | ||
| - | === AH=04h: atoi | ||
| - | === AH=05h: itoa | ||
| - | |||
| - | == INT 13h - Math Services | ||
| - | === AH=00h: Multiply 16-bit | ||
| - | === AH=01h: Divide 16-bit | ||
| - | === AH=02h: Random number | ||
| - | === AH=03h: Absolute value | ||
| - | |||
| - | == INT 14h - Memory Services | ||
| - | === AH=00h: memcpy | ||
| - | === AH=01h: memset | ||
| - | === AH=02h: memcmp | ||
| - | |||
| - | == INT 15h - File/ | ||
vc-3_system_interrupt_table.1768960387.txt.gz · Last modified: by appledog
