; ;Program name: 22INSTB.ASM ;Author : James Whorton ;Date written: 10/13/84 ; ;This is the link file that comes after the RSX module to be ;installed. This file will be linked automatically by LASM when ;assembling 22INSTA.ASM. Note: The RSX module must have a ; ; link '22INSTB' ; ;as the last line of the code to work properly. See .DOC for details. ; endobj: equ $ ;this marks the end of the code. ; ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ; ;=============================================================== ; pend: equ $ ;this marks the end of the module ;to be moved. ; ;inline print routine ; ilprt: equ $ push psw push h push d push b ; ilplp: mov e,m mvi c,cout push h ilplp1: call bdos pop h inx h mov a,m ora a jnz ilplp pop b pop d pop h pop psw ret ; ;this routine outputs the address in in hex format ; outhl: push h ;save pointer mov a,h ;get MSB call hex1 ;print MSB pop h ;get pointer push h mov a,l ;get LSB call hex1 call makhex pop h ret ; ;this routine outputs the bytes referenced by ; outmem: push h ;save pointer inx h ;bump one mov a,m ;get byte call hex1 pop h push h mov a,m call hex1 call makhex pop h ret hex1: mov b,a ;save number rar rar rar rar call hex2 ;print half of it mov a,b ;get number back hex2: ani 0Fh ;get LSN to send out adi 090h ;convert to ASCII daa aci 040h daa push b mvi c,cout mov e,a call bdos pop b ret ; ;put an H on hex address and start new line ; makhex: mvi e,'h' mvi c,cout call bdos ret ; ;this routine moves to for length ; move: mov a,m stax d inx d inx h dcr b jnz move ret ;done ; ;this routine compares bytes at and for bytes. ; compar: ldax d cmp m rnz inx h inx d dcr b jnz compar ret ; ;this routine subtracts from and leaves the results in ; sbc: mov a,l sub e mov l,a mov a,h sbb d mov h,a ret ; end