Digital Research
This commit is contained in:
2020-11-06 18:50:37 +01:00
parent 621ed8ccaf
commit 31738079c4
8481 changed files with 1888323 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
title 'bank & move module for CP/M3 linked BIOS'
cseg
public ?move,?xmove,?bank
extrn @cbnk
maclib z80
maclib ports
?xmove: ; ALTOS can't perform interbank moves
ret
?move:
xchg ; we are passed source in DE and dest in HL
ldir ; use Z80 block move instruction
xchg ; need next addresses in same regs
ret
; by exiting through bank select
?bank:
push b ; save register b for temp
ral ! ral ! ral ! ani 18h ; isolate bank in proper bit position
mov b,a ; save in reg B
in p$bankselect ; get old memory control byte
ani 0E7h ! ora b ; mask out old and merge in new
out p$bankselect ; put new memory control byte
pop b ; restore register b
ret
; 128 bytes at a time
end