Publish VCC Plus OSS source distribution for 3.6.2 build 60

This commit is contained in:
Brian Holman committed 2026-11-13 00:14:03 -07:00
commit c652a5276d
1192 files changed
+272368

No files matched your search

+26
View File
@@ -0,0 +1,26 @@
; BANKWALK.ASM -- a reversible mapping experiment for a fresh 512 KB Disk BASIC.
; Before running, verify MMU enabled, task 0, block 2 = $3A in the debugger.
; Begin at the BASIC prompt with no unsaved program or active devices.
bank2 equ $ffa2 ; task 0, logical $4000-$5fff
window equ $4123 ; offset $0123 into block 2
org $3f00 ; code and scratch live in block 1
start pshs cc,a ; preserve incoming flags and A
orcc #$50 ; hold IRQ and FIRQ until restored
lda bank2
anda #$3f ; 512 KB supplies six bank bits
sta oldbank,pcr
lda #1
sta bank2 ; window now sees physical $02123
lda window
sta oldbyte,pcr ; keep the byte even on a fresh machine
lda #$a5
sta window
inspect lda oldbyte,pcr ; pause BEFORE this instruction
sta window ; put the borrowed byte back
lda oldbank,pcr
sta bank2 ; restore the original translation
restored puls cc,a,pc ; flags restored, return to BASIC
oldbank fcb 0
oldbyte fcb 0
end start
+6
View File
@@ -0,0 +1,6 @@
; BYTE.ASM -- Watch register A while the processor counts up one step.
org $3f00
start lda #$29 ; Load the number $29 (decimal 41) into A.
inca ; Add one. What will A hold after this step?
done rts ; Return to BASIC with the result still in A.
end start
+21
View File
@@ -0,0 +1,21 @@
; CHOICE.ASM -- Press 1 for E (Earth) or 2 for M (Mars).
POLCAT equ $a000 ; Keyboard polling vector. Returns a key in A.
CHROUT equ $a002 ; Character-output vector.
CR equ 13
org $3f00
start lda #'? ; Show that the program is waiting for a key.
jsr [CHROUT]
choose jsr [POLCAT] ; Check the keyboard without waiting for Enter.
cmpa #'1
beq earth ; A matching comparison sets the Z flag.
cmpa #'2
bne choose ; No key or an unexpected key: try again.
mars lda #'M
bra printit ; Skip the Earth path.
earth lda #'E
printit jsr [CHROUT] ; Both paths meet here with one letter in A.
lda #CR
jsr [CHROUT]
rts
end start
+44
View File
@@ -0,0 +1,44 @@
; DISPATCH.ASM -- receive a three-byte station code and check its sum.
; Disk BASIC, MC6809 or HD6309. Run a personal copy from the assembly editor.
CHROUT equ $a002 ; indirect ROM character-output vector
org $3f00
start leax packet,pcr ; X walks the incoming bytes
leay received,pcr ; Y walks a separate writable buffer
ldb #size
bsr receive
inspect cmpa expected,pcr ; stop here to inspect A and the copy
bne damaged
leax received,pcr
bra print
damaged leax badmsg,pcr
print lda ,x+
beq finish ; both text paths end with a zero byte
bsr emit
bra print
finish lda #13 ; put the BASIC prompt on its own line
bsr emit
rts
; Input: X source, Y destination, B positive byte count.
; Output: A = sum modulo 256. X and Y advance; B ends at zero.
receive clra
next adda ,x ; add this byte, leave X at it for the copy
pshs a ; keep the running sum while moving the byte
lda ,x+
sta ,y+
puls a
decb
bne next
rts
emit pshs x ; caller still needs its position after ROM I/O
jsr [CHROUT]
puls x,pc
packet fcc "ORB"
size equ *-packet
expected fcb $e3 ; $4F + $52 + $42 = $E3
received fcb 0,0,0,0 ; fourth byte stays zero for printing
badmsg fcc "CHECK"
fcb 0
end start
+22
View File
@@ -0,0 +1,22 @@
; DISPATCH6309.ASM -- copy a station code with the HD6309 block move.
; Choose the HD6309 guest and assembly target. Start in Disk BASIC.
CHROUT equ $a002
org $3f00
start leax packet,pcr
leay received,pcr
ldw #size ; W counts the bytes left to transfer
copy tfm x+,y+ ; move from X to Y and increment both
inspect leax received,pcr ; stop here to inspect W, X, Y and RAM
next lda ,x+
beq finish
pshs x
jsr [CHROUT]
puls x
bra next
finish lda #13
jsr [CHROUT]
rts ; no change to the guest's processor mode
packet fcc "ORB"
size equ *-packet
received fcb 0,0,0,0
end start
+11
View File
@@ -0,0 +1,11 @@
; LETTER.ASM -- Give one byte to BASIC's character output routine.
CHROUT equ $a002 ; Address of the ROM character-output vector.
CR equ 13 ; Carriage return starts a fresh line.
org $3f00
start lda #'A ; Load this character's ASCII code into A.
jsr [CHROUT] ; Call the routine whose address is at CHROUT.
lda #CR
jsr [CHROUT] ; Leave the next BASIC prompt on its own line.
rts ; Return to the caller in BASIC.
end start
+11
View File
@@ -0,0 +1,11 @@
; MODE.ASM -- a bounded HD6309 experiment for Disk BASIC at reset mode.
; Run on a fresh HD6309 guest, with MD=0. Both stops are before instructions.
org $3f00
start pshs cc ; remember BASIC's interrupt masks
orcc #$50 ; mask IRQ and FIRQ for the short experiment
ldmd #1 ; select 6309 native mode
native ldw #$1234 ; inspect MD, then step and read E and F
ldmd #0 ; restore reset mode before calling BASIC
restored puls cc ; restore the caller's condition codes
rts
end start
+15
View File
@@ -0,0 +1,15 @@
; RETURN.ASM -- A subroutine advances one letter, then returns to its caller.
CHROUT equ $a002 ; Address of the ROM character-output vector.
CR equ 13
org $3f00
start lda #'A ; Begin with the letter A ($41).
call jsr nextletter ; Save the address of 'display' on the S stack.
display jsr [CHROUT] ; The subroutine has left the new letter in A.
lda #CR
jsr [CHROUT]
rts ; Finish the main program and return to BASIC.
nextletter inca ; ASCII B follows ASCII A.
back rts ; Retrieve the saved address and resume at display.
end start
+31
View File
@@ -0,0 +1,31 @@
; SOFTIRQ.ASM -- install, call and remove a BASIC RAM SWI trampoline.
; Fresh CoCo 3 Disk BASIC, MC6809 or HD6309 in emulation mode only.
; From a debugger stop, Continue through cleanup before returning to BASIC.
hook equ $0106 ; three-byte RAM stub reached via $FFFA
org $3f00
start pshs cc,d,x ; preserve the caller's flags, D and X
orcc #$50 ; keep IRQ & FIRQ out during this experiment
lda hook
ldx hook+1
sta oldop,pcr
stx oldaddr,pcr
lda #$7e ; extended JMP opcode
leax handler,pcr
stx hook+1
sta hook ; JMP handler now complete
clr visits,pcr
lda #$4f ; known bytes to locate in the stack frame
ldb #$52
trigger swi ; CPU stacks state and follows the SWI vector
returned lda oldop,pcr ; breakpoint to compare S after RTI
sta hook
ldx oldaddr,pcr
stx hook+1
restored puls cc,d,x,pc ; restore flags, D and X, return to BASIC
handler inc visits,pcr ; memory survives the return
rti ; reload the stacked context, including PC
oldop fcb 0
oldaddr fdb 0
visits fcb 0
end start