User Tools

Site Tools


vc-3_system_interrupt_table

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
vc-3_system_interrupt_table [2026/01/21 01:53] appledogvc-3_system_interrupt_table [2026/01/22 22:19] (current) appledog
Line 33: Line 33:
 == INT 05h - Pao Alto Tiny Basic == INT 05h - Pao Alto Tiny Basic
 === Memory Map === Memory Map
-        ; PATB System Memory ($01ED00-$01EDFF, 256 bytes available)+    ; PATB System Memory ($01ED00-$01EDFF, 256 bytes available)
     .equ PATB_VARIABLES     $01ED00   ; 26 vars × 2 bytes = 52 bytes ($01ED00-$01ED33)     .equ PATB_VARIABLES     $01ED00   ; 26 vars × 2 bytes = 52 bytes ($01ED00-$01ED33)
     .equ PATB_EXPR_STACK    $01ED40   ; Expression stack, 64 bytes ($01ED40-$01ED7F)     .equ PATB_EXPR_STACK    $01ED40   ; Expression stack, 64 bytes ($01ED40-$01ED7F)
Line 46: Line 46:
     .equ PATB_RANDSEED      $01EDD7   ; Random seed (2 bytes)     .equ PATB_RANDSEED      $01EDD7   ; Random seed (2 bytes)
     .equ PATB_STATUS        $01EDD9   ; Status flags (1 byte)     .equ PATB_STATUS        $01EDD9   ; Status flags (1 byte)
-    ;                                 ; Bit 0: Running (1) / Stopped (0) +                                      ; Bit 0: Running (1) / Stopped (0) 
-    ;                                 ; Bit 1: Error flag +                                      ; Bit 1: Error flag 
-    ;                                 ; Bit 2: Break flag+                                      ; Bit 2: Break flag 
 +    .equ PATB_PROGRAM_BASE  $030100   ; Start of program storage (Bank 3, offset $100) 
 +    .equ PATB_PROGRAM_END   $03FFFF   ; End (almost 64KB for programs)
  
 === Function Dispatch === 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) ===     ; === EXECUTION CONTROL (AH=$00-$0F) ===
     ;   AH=$00: RUN_PROGRAM    - Start execution from line number or beginning     ;   AH=$00: RUN_PROGRAM    - Start execution from line number or beginning
Line 81: Line 77:
     ;     ;
     ; === PROGRAM LINE MANAGEMENT (AH=$30-$3F) ===     ; === PROGRAM LINE MANAGEMENT (AH=$30-$3F) ===
-    ;   AH=$30: LINE_FIND      - Find line by number +    ; $30-$37: Search/Navigate 
-    ;   AH=$31: LINE_NEXT      - Get next line +    ;   $30: LINE_FIND          - Find line by number (forward) 
-    ;   AH=$32: LINE_INSERT    - Insert or replace line +    ;   $31: LINE_NEXT          - Get next line 
-    ;   AH=$33: LINE_DELETE    - Delete line by number +    ;   $32: LINE_FIND_REVERSE  - Find line by number (backward) 
-    ;   AH=$34: LINE_FIRST     - Get first line in program +    ;   $33: LINE_PREV          - Get previous line 
-    ;   AH=$35: LINE_CLEAR_ALL - Clear entire program (NEW) +    ; $36-$39: Modify 
-    ;   AH=$36: LINE_COUNT     - Count total lines+    ;   $36: LINE_INSERT        - Insert or replace line 
 +    ;   $37: LINE_DELETE        - Delete line by number 
 +    ;   $38: LINE_REMOVE_SPACE  - Add space for new program line 
 +    ;   $39: LINE_MAKE_SPACE    - remove unused line space 
 +    ; $3A-$3F: Utility 
 +    ;   $3A: LINE_FIRST         - Get first line 
 +    ;   $3B: LINE_CLEAR_ALL     - Clear entire program (NEW) 
 +    ;   $3C: LINE_COUNT         - Count total lines 
 +    ;   $3F: PROGRAM_END        - ELM points to end of program
     ;     ;
     ; === GOSUB/RETURN STACK (AH=$40-$4F) ===     ; === GOSUB/RETURN STACK (AH=$40-$4F) ===
Line 110: Line 114:
     ;   AH=$66: IO_PRINT_STR   - Print string at pointer     ;   AH=$66: IO_PRINT_STR   - Print string at pointer
     ;     ;
-    ; === STRING/TOKEN HELPERS (AH=$70-$7F) ===+    ; === STRING/TOKEN HELPERS (AH=$70-$8F) ===
     ;   AH=$70: STR_COMPARE    - Compare strings for keyword matching     ;   AH=$70: STR_COMPARE    - Compare strings for keyword matching
     ;   AH=$71: STR_TO_UPPER   - Convert string to uppercase     ;   AH=$71: STR_TO_UPPER   - Convert string to uppercase
-    ;   AH=$72: STR_SKIP_SPACE - Skip whitespace in string+    ;   AH=$72: STR_SKIP_SPACE - Skip whitespace in ELM string
     ;   AH=$73: STR_IS_DIGIT   - Check if character is digit     ;   AH=$73: STR_IS_DIGIT   - Check if character is digit
     ;   AH=$74: STR_IS_ALPHA   - Check if character is letter     ;   AH=$74: STR_IS_ALPHA   - Check if character is letter
 +    ;   AH=$75: STR_LENGTH     - Get string length
 +    ;   AH=$76: STR_COPY       - Copy string from src to dst
 +    ;   AH=$77: STR_CONCAT     - Concatenate two strings
 +    ;   AH=$78: STR_LEFT       - Extract left N characters (LEFT$)
 +    ;   AH=$79: STR_RIGHT      - Extract right N characters (RIGHT$)
 +    ;   AH=$7A: STR_MID        - Extract middle substring (MID$)
 +    ;   AH=$7B: STR_CHR        - Convert byte to character (CHR$)
 +    ;   AH=$7C: STR_ASC        - Convert character to byte (ASC)
 +    ;   AH=$7D: STR_VAL        - Convert string to number (VAL)
 +    ;   AH=$7E: STR_STR        - Convert number to string (STR$)
 +    ;   AH=$7F: STR_FIND       - Find substring within string (INSTR)
 +    ;   AH=$80: STR_LTRIM      - Trim leading whitespace
 +    ;   AH=$81: STR_RTRIM      - Trim trailing whitespace
 +    ;   AH=$82: STR_TRIM       - Trim both leading and trailing whitespace
 +    ;   AH=$83: STR_REVERSE    - Reverse a string
 +    ;   AH=$84: STR_REPEAT     - Repeat character N times (STRING$)
 +    ;   AH=$85: STR_SPLIT      - Split string at delimiter
 +    ;   AH=$86: STR_REPLACE    - Replace substring with another
 +    ;   AH=$87-$8F: (Reserved for future string operations)
     ;     ;
-    ; === ARITHMETIC/LOGIC HELPERS (AH=$80-$8F) === +    ; === ARITHMETIC/LOGIC HELPERS (AH=$90-$9F) === 
-    ;   AH=$80: MATH_ADD       - Pop two values, push sum +    ;   AH=$90: MATH_ADD       - Pop two values, push sum 
-    ;   AH=$81: MATH_SUB       - Pop two values, push difference +    ;   AH=$91: MATH_SUB       - Pop two values, push difference 
-    ;   AH=$82: MATH_MUL       - Pop two values, push product +    ;   AH=$92: MATH_MUL       - Pop two values, push product 
-    ;   AH=$83: MATH_DIV       - Pop two values, push quotient +    ;   AH=$93: MATH_DIV       - Pop two values, push quotient 
-    ;   AH=$84: MATH_NEG       - Negate top of stack +    ;   AH=$94: MATH_NEG       - Negate top of stack 
-    ;   AH=$85: MATH_RND       - Generate random number+    ;   AH=$95: MATH_RND       - Generate random number 
 +    ;   AH=$96-$9F: (Reserved)
     ;     ;
-    ; === COMPARISON HELPERS (AH=$90-$9F) === +    ; === COMPARISON HELPERS (AH=$A0-$AF) === 
-    ;   AH=$90: CMP_EQ         - Compare equal (pop 2, push 1 if true, 0 if false) +    ;   AH=$A0: CMP_EQ         - Compare equal 
-    ;   AH=$91: CMP_NE         - Compare not equal +    ;   AH=$A1: CMP_NE         - Compare not equal 
-    ;   AH=$92: CMP_LT         - Compare less than +    ;   AH=$A2: CMP_LT         - Compare less than 
-    ;   AH=$93: CMP_GT         - Compare greater than +    ;   AH=$A3: CMP_GT         - Compare greater than 
-    ;   AH=$94: CMP_LE         - Compare less than or equal +    ;   AH=$A4: CMP_LE         - Compare less than or equal 
-    ;   AH=$95: CMP_GE         - Compare greater than or equal+    ;   AH=$A5: CMP_GE         - Compare greater than or equal 
 +    ;   AH=$A6-$AF: (Reserved)
     ;     ;
-    ; === ERROR HANDLING (AH=$A0-$AF) === +    ; === ERROR HANDLING (AH=$B0-$BF) === 
-    ;   AH=$A0: ERROR_SET      - Set error flag and message +    ;   AH=$B0: ERROR_SET      - Set error flag and message 
-    ;   AH=$A1: ERROR_GET      - Get current error code +    ;   AH=$B1: ERROR_GET      - Get current error code 
-    ;   AH=$A2: ERROR_CLEAR    - Clear error flag +    ;   AH=$B2: ERROR_CLEAR    - Clear error flag 
-    ;   AH=$A3: ERROR_PRINT    - Print error message+    ;   AH=$B3: ERROR_PRINT    - Print error message 
 +    ;   AH=$B4-$BF: (Reserved)
     ;     ;
     ; === IL INTERPRETER CORE (AH=$F0-$FF) ===     ; === IL INTERPRETER CORE (AH=$F0-$FF) ===
vc-3_system_interrupt_table.1768960387.txt.gz · Last modified: by appledog

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki