sd:appendix_7_kernal_functions
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| sd:appendix_7_kernal_functions [2026/04/14 06:09] – external edit (Unknown date) 127.0.0.1 | sd:appendix_7_kernal_functions [2026/04/21 12:12] (current) – appledog | ||
|---|---|---|---|
| Line 156: | Line 156: | ||
| ; | ; | ||
| ; | ; | ||
| - | ; === ERROR HANDLING (AH=$B0-$BF) === | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ;; | ||
| - | ; | ||
| - | ; === MEMORY OPERATIONS (AH=$C0-$CF) === | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; === LOCAL VARIABLE FRAMES (AH=$D0-$DF) === | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; === LOGICAL/ | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; === TYPE CONVERSION (AH=$EA-$EF) === | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | |||
| - | |||
| - | ; === IL INTERPRETER CORE (AH=$F0-$FF) === | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| ; ============================================================================ | ; ============================================================================ | ||
| Line 208: | Line 162: | ||
| ; Memory map and constants | ; Memory map and constants | ||
| ; ============================================================================ | ; ============================================================================ | ||
| - | ; *** Note: If you make changes here please reflect them in memorymap.sda | ||
| .equ PATB_TBUF | .equ PATB_TBUF | ||
| Line 232: | Line 185: | ||
| .equ PATB_DATA_PTR | .equ PATB_DATA_PTR | ||
| .equ PATB_MS_PTR | .equ PATB_MS_PTR | ||
| + | .equ PATB_LINE_NO | ||
| - | ; RESERVED: $01EEED-$01EEFF = 19 bytes free | + | ; RESERVED: $01EEED-$01EEFF = 17 bytes free |
| ; Refer to memorymap.sda if these change | ; Refer to memorymap.sda if these change | ||
| + | .equ PATB_PARSEBUF | ||
| + | .equ PATB_LET_NAMEBUF | ||
| .equ PATB_PROGRAM_BASE | .equ PATB_PROGRAM_BASE | ||
| .equ PATB_PROGRAM_END | .equ PATB_PROGRAM_END | ||
| Line 333: | Line 289: | ||
| ; | ; | ||
| ; ============================================================================ | ; ============================================================================ | ||
| + | </ | ||
| + | |||
| + | == INT 15h - Filesystem Services | ||
| + | < | ||
| + | ; ============================================================================ | ||
| + | ; INT 15h - FILE SERVICES | ||
| + | ; Stream-oriented file I/O for the SD-8516 / VC-3 | ||
| + | ; ============================================================================ | ||
| + | ; | ||
| + | ; Provides file and directory operations for programs. | ||
| + | ; | ||
| + | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
| + | ; NOTE: INT $15 uses a JZ-style calltable. | ||
| + | ; This means you cannot CALL into these functions by name. | ||
| + | ; You must use INT 0x15 to call them (even from the kernal). | ||
| + | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
| + | ; | ||
| + | ; Function dispatch: | ||
| + | ; | ||
| + | ; Group A: File Handle Operations ($00–$0F) | ||
| + | ; | ||
| + | ; | ||
| + | ; | ||
| + | ; | ||
| + | ; | ||
| + | ; Group B: Directory Listing ($10–$1F) | ||
| + | ; | ||
| + | ; | ||
| + | ; Group C: Directory Navigation ($20–$2F) | ||
| + | ; | ||
| + | ; | ||
| + | ; | ||
| + | ; | ||
| + | ; | ||
| + | ; ============================================================================ | ||
| + | |||
| + | ; --- File Command Block (FCB) --- | ||
| + | ; A shared memory region used to pass parameters to/from JavaScript. | ||
| + | ; Located in bank 0 scratch space. 16 bytes. | ||
| + | ; | ||
| + | .equ FS_CMD_BLOCK | ||
| + | |||
| + | .equ FS_CMD | ||
| + | .equ FS_HANDLE | ||
| + | .equ FS_MODE | ||
| + | .equ FS_STATUS | ||
| + | ; | ||
| + | .equ FS_COUNT | ||
| + | .equ FS_ADDR | ||
| + | .equ FS_DONE | ||
| + | .equ FS_EXTRA | ||
| + | .equ FS_ADDR2 | ||
| + | |||
| + | ; --- Constants --- | ||
| + | .equ FS_MAX_HANDLES | ||
| + | |||
| + | .equ FS_MODE_READ | ||
| + | .equ FS_MODE_WRITE | ||
| + | |||
| + | .equ FS_OK 0 | ||
| + | .equ FS_ERR | ||
| + | .equ FS_EOF | ||
| </ | </ | ||
| Line 344: | Line 362: | ||
| ; | ; | ||
| ; | ; | ||
| - | ; | + | ; |
| ; | ; | ||
| - | ; | + | ; |
| ; | ; | ||
| Line 367: | Line 385: | ||
| ; | ; | ||
| ; | ; | ||
| + | ; ============================================================================ | ||
| + | ; Graphics Mode 3: 320x200x16 or 320x200x256 | ||
| + | ; | ||
| + | ; | ||
| + | ; | ||
| + | ; Each pixel = 4 bits (colormode palettes) | ||
| + | ; Each pixel = 1 byte (palette index 0-255) (3b) | ||
| + | ; Each palette entry = 3 bytes (R, G, B, 0-255 each) | ||
| ; ============================================================================ | ; ============================================================================ | ||
| </ | </ | ||
sd/appendix_7_kernal_functions.1776146946.txt.gz · Last modified: by 127.0.0.1
