; reboot equ 0; std. bios/warmboot connector @bdos equ reboot+6; std. bdos connector ; ; For testing DOS+ system. Loaded ahead of system to lock in. ; Files to link: ; /a:7700 (puts test dos at 8000 up, ccp at 7800) ; or ; /a:ba00 (max, when DEBUG under existing DOS) ; This (puts DOS+ @ C300 up, ccp @ bb00) ; ccp+ ; dos+ (under test) ; /p:f600 (use existing bios, my system) ; dos+bios (use existing bios) ; ; Install with DDTZ by: ; DDTZ testdos.cim (assumes SLR linker makes .CIM) ; -g100 ; Note that DDTZ, on initialization, locks itself to the existing DOS, ; independant of further changes in the connector at 1. It can then ; be re-entered by "GODDT" where GODDT holds only a RST 7 instruction. ; If further operations in DDT use only device i/o (i.e. no loading or ; storing of files) TESTDOS system can then be debugged. ; ; ; ----------------------------------------- ; ; The following "lock-in" mechanism intercepts the BDOS call vector, ; and protects the system from being over-written. ; begin: jmp moveup; Patched on init jmp remove; Used to kill. At @bdos^+3 ; ; This routine simulates the disk reset actions of a normal ; reboot. Note that some poor bios implementations do not ; reset disks properly (original Kaypro) and thus cannot ; change disk formats without a real reboot or cold load. doboot: lxi h,begin; refresh the connectors shld @bdos boot0: lxi h,$-$; patched at init shld reboot+1 lda reboot+4 mov c,a jmp ccpwarm ; ; Remove the locked in system remove: lxi h,$-$; patched at init oldbt equ $-2 xchg lhld reboot+1 inx h mov m,e inx h mov m,d; restore entry version lxi h,$-$; patched at init oldos equ $-2 shld @bdos jmp reboot ; ; The following space may be re-used after system is running. init: lxi h,sysfnc shld begin+1; fix the intercept lhld @bdos shld oldos; save old value lxi h,begin shld @bdos; and hook up lhld reboot+1 shld boot0+1 lxi d,doboot inx h mov a,m mov m,e mov e,a inx h mov a,m mov m,d; Patch bios reboot entry mov d,a xchg shld oldbt lda reboot+4 mov c,a jmp ccpcold ; .phase ($-begin) + 0100h moveup: lxi d,begin lxi h,0100h lxi b,1700h; wired in system size mv: mov a,m stax d inx h inx d dcx b mov a,b ora c jnz mv .dephase jmp init; Goes to moved code ; ds 0100h - ($-begin),0 ccpcold equ $; describe CCP ccpwarm equ $+3 sysfnc equ $+0806h; DOS+ entry end