************************************************* * * * S I O 4 C O N S O L E R O U T I N E S * * * ************************************************* * routine gets character from SIO4 board * return with character in d1, d0 preserved conin: move.b d0,-(sp) * stash move.b #0,sselect conin1: move.b sstatus,d0 andi.b #sr1,d0 * check uart rda flag beq conin1 * loop till char rcd conin2: move.b sdata,d1 * send the data andi.b #$7f,d1 * strip msb move.b (sp)+,d0 * retreive rts * check console status-- return with * 0 in d1 if no character ready else * return with the character constat: move.b d0,-(sp) move.b #0,sselect move.b sstatus,d0 andi.b #sr1,d0 * check uart rda flag bne conin2 * go get it if char rcd move.b #0,d1 * else return 0 in d1 move.b (sp)+,d0 * retreive rts * routine sends serial output via direct I/O * to the SIO4 board print character in d1 * d0 preserved. conout: move.b #0,sselect * write select port move.b #0,-(sp) conout1: move.b sstatus,d0 andi.b #1,d0 * check uart tbe flag beq conout1 * loop till empty move.b d1,sdata * send the data move.b (sp)+,d0 * restore rts * routine sends serial output string via direct I/O * to the SIO4 board prints string pointed to by a0. * Return is through a6 to elimnate need for ram string: move.b #0,d2 move.b d2,sselect * write select port string1: move.b sstatus,d0 andi.b #1,d0 * check uart tbe flag beq conout1 * loop till empty move.b +(a0),d1 cmpi.b #'$',d1 * check for end of string beq strnglv move.b d1,sdata * send the data bra string1 strnglv: jmp (a6) * PRINT A SPACE through via conout aspace: move.w #asp,d1 bsr conout rts * PRINT A CARRIAGE RETURN / LINE FEED via conout acrlf: move.w #acr,d1 bsr conout move.w #alf,d1 bsr conout rts signon: .dc.b $d,$a,$a,$a,$a,$a,$a,$a,$a,$a,$a,$a,$a .dc.b $a,$a,$a,$a,$a,$a,$a,$a,$a,$a,$a,$a .dc.b ' Welcome to Morrow Designs 68k system ' .dc.b $0a, $0a, $a, $a, $d .dc.b ' Testing memory, please stand by... ' .dc.b $0a, $0a, $a, $a, $d, '$' rerr1: .dc.b ' No memory in system or incorrectly addressed!! $ ' rerr2: .dc.b ' bytes of system RAM available. (UNIPLUS+ requires ' .dc.b $0a,$0d,$0a,$0a, .dc.b ' at least 7ffffh bytes for operation.) ' .dc.b $0a,$0d,$0a,$0a, '$',