crude implementation of CP/M rutine $09

This commit is contained in:
FeralChild64 committed 2021-01-29 20:27:39 +01:00
1 parent eef13f4cfe
commit 5e8d2205e8
3 files changed
+44 -11

No files matched your search

+9 -9
View File
@@ -96,17 +96,17 @@ Z80_instr_37: ;
Z80_instr_76: ; HALT
; Used to call BIOS routines
; XXX probably not the besta idea, GENCPC seems to do some relocations
; Used to call BIOS and simulated CP/M routines
ldx #$01 ; default BIOS function, warm start
+Z80_FETCH_VIA_PC_INC
cmp #$FF ; $FF = CP/M call
+beq zvm_CPMemu
inc $D021
ldx #$01 ; default routine, warm boot
lda REG_PC+1
cmp #$FE ;
bne @1
lda REG_PC+0
sec
sbc #$64
cmp #33
bcs @1
tax
+29
View File
@@ -0,0 +1,29 @@
;
; Z80 Virtual Machine CP/M simulation (just to run selected binaries)
;
zvm_CPMemu:
ldx REG_C
cpx #$09
beq zvm_CPMemu_09
; XXX implement additional functions if needed
; FALLTROUGH
zvm_CPMemu_end:
jmp Z80_instr_C9 ; RET
zvm_CPMemu_09: ; C_WRITESTR
+Z80_FETCH_VIA_DE
cmp #'$'
beq zvm_CPMemu_end
jsr CHROUT
inw REG_DE
bra zvm_CPMemu_09
+6 -2
View File
@@ -105,8 +105,6 @@ ZVM_cputest:
@loop3:
inc $D020
dew BIOS_LOADCOUNT
bmi @loop2
@@ -120,6 +118,12 @@ ZVM_cputest:
@load_done:
; Close the file
lda #$20
sta HTRAP00
+nop
jsr PRIMM
!pet " done", $0D, $0D, 0