home *** CD-ROM | disk | FTP | other *** search
- ;Program to download contents of ROMs for the Microbee 128k,
- ;for archiving purposes.
- ;Use ccp not shell, and SAVE 32 xxx.ROM after running.
- ; Pseudocode
- ; Relocate program
- ; Repeat 8 times
- ; set Port 50h to bring in ROM desired
- ; move contents of ROM to PCG RAM
- ; reset port 50h to switch out ROMs
- ; move contents of PCG RAM to 100h
- ; warm boot
- ;
- romstrt equ 08000h
- romlen equ 400h
- rommap equ 0h
- cpmmap equ 4h
- destin equ 0f800h
- lowmem equ 04000h
-
- org 100h
- RELOC:
- ld hl,start
- ld de,destin
- ld bc,finis-start
- ldir
- jp destin
-
- start equ $
- ld a,rommap
- out (50h),a
- ld hl,romstrt
- ld de,0F900h
- ld bc,romlen
- ldir
- ld a,cpmmap
- out (50h),a
- ld hl,0F900h
- ld de,lowmem
- ld bc,romlen
- ldir
- ; next lot
- ld a,rommap
- out (50h),a
- ld hl,romstrt + romlen
- ld de,0F900h
- ld bc,romlen
- ldir
- ld a,cpmmap
- out (50h),a
- ld hl,0F900h
- ld de,lowmem + romlen
- ld bc,romlen
- ldir
- ; next lot
- ld a,rommap
- out (50h),a
- ld hl,romstrt + 2*romlen
- ld de,0F900h
- ld bc,romlen
- ldir
- ld a,cpmmap
- out (50h),a
- ld hl,0F900h
- ld de,lowmem + 2*romlen
- ld bc,romlen
- ldir
- ; next lot
- ld a,rommap
- out (50h),a
- ld hl,romstrt + 3*romlen
- ld de,0F900h
- ld bc,romlen
- ldir
- ld a,cpmmap
- out (50h),a
- ld hl,0F900h
- ld de,lowmem + 3*romlen
- ld bc,romlen
- ldir
- ; next lot
- ld a,rommap
- out (50h),a
- ld hl,romstrt + 4*romlen
- ld de,0F900h
- ld bc,romlen
- ldir
- ld a,cpmmap
- out (50h),a
- ld hl,0F900h
- ld de,lowmem + 4*romlen
- ld bc,romlen
- ldir
- ; next lot
- ld a,rommap
- out (50h),a
- ld hl,romstrt + 5*romlen
- ld de,0F900h
- ld bc,romlen
- ldir
- ld a,cpmmap
- out (50h),a
- ld hl,0F900h
- ld de,lowmem + 5*romlen
- ld bc,romlen
- ldir
- ; next lot
- ld a,rommap
- out (50h),a
- ld hl,romstrt + 6*romlen
- ld de,0F900h
- ld bc,romlen
- ldir
- ld a,cpmmap
- out (50h),a
- ld hl,0F900h
- ld de,lowmem + 6*romlen
- ld bc,romlen
- ldir
- ; next lot
- ld a,rommap
- out (50h),a
- ld hl,romstrt + 7*romlen
- ld de,0F900h
- ld bc,romlen
- ldir
- ld a,cpmmap
- out (50h),a
- ld hl,0F900h
- ld de,lowmem + 7*romlen
- ld bc,romlen
- ldir
- ;
- ld hl,lowmem
- ld de,100h
- ld bc,8*romlen
- ldir
- jp 0 ;cold start to begin with
- ; ret ;try this if it works
- finis equ $
-