Interrupt system implemented, some new programs.

This commit is contained in:
Anachronaut
2026-08-15 00:44:13 -04:00
parent 638b68b25c
commit 6d1966d500
79 changed files with 2778 additions and 88 deletions
+43
View File
@@ -0,0 +1,43 @@
; Tests #Align and #Reserve by printing the addresses they produce.
;
; Both directives only move the cursor along, so what they do is entirely visible in
; where the labels after them land. The program pushes each pointer and prints the two
; bytes of its address, which is the only way a SplitBit program can look at one.
;
; Aligned is asked for on a page boundary, so its low byte has to be 0x00. Reserved
; follows one byte of data and a reservation of 0x30, so it lands 0x31 further on.
;
; Correct output is:
; 00 31
#Include print.asm
#Program
start:
; The aligned label. Only the low byte is interesting: a page boundary means zero.
SETD.0 Aligned
PSHD.0 ; High byte, then low, so the low byte comes off first.
POPA
POPB
CALL printByteHex
CALL blankSpace
; The reserved region. Reserved sits one byte of data plus 0x30 reserved bytes past
; Aligned, so its low byte says how far the reservation moved the cursor.
SETD.0 Reserved
PSHD.0
POPA
POPB
CALL printByteHex
CALL lineFeed
HALT
#Data
#Align 0x100
Aligned:
0x41 ; One byte of real data, so the cursor is one past the boundary.
#Reserve 0x30
Reserved:
0x42