more work towards internal MEGA65 DOS

This commit is contained in:
FeralChild64 committed 2020-08-22 19:37:46 +02:00
1 parent fe00a07aeb
commit de7ce30e03
5 files changed
+133 -24

No files matched your search

+47 -3
View File
@@ -6,8 +6,10 @@
//
// Available memory maps:
// - NORMAL - nothing mapped in
// - KERNAL_1 - for calling KERNAL_1 segment code
// - NORMAL - nothing mapped in
// - KERNAL_1 - for calling KERNAL_1 segment code
// - DOS_1 - for swiching to DOS context
// - NORMAL_from_DOS_1 - for switching bact from DOS context
map_NORMAL:
@@ -19,6 +21,11 @@ map_NORMAL:
phz
lda #$00
// FALLTROUGH
map_NORMAL_common:
tax
tay
taz
@@ -30,6 +37,10 @@ map_end:
map
eom
// FALLTROUGH
map_end_no_eom:
plz
ply
plx
@@ -53,4 +64,37 @@ map_KERNAL_1:
ldx #$42 // 0x4000 <- map 8KB from 0x20000
bne map_end
jmp_8 map_end
map_DOS_1:
php
pha
phx
phy
phz
lda #$C0
tab // from now on, zeropage starts from $C000
ldy #$00
taz #$81 // 0xC000 <- map 8KB (4KB useable) from $10000
tya
ldx #$C2 // 0x4000 <- map 16KB from 0x20000
map
jmp_8 map_end_no_eom // no EOM, we do not want interrupts within DOS!
map_NORMAL_from_DOS_1:
php
pha
phx
phy
phz
lda #$00
tba
jmp_8 map_NORMAL_common