?pathlinks? – Rev 736
Rev 639 |
Blame |
Compare with Previous |
Last modification |
View Log
| Download
| RSS feed
| ?url?
;LAST UPDATE: 28.03.2014 savelij
MODBYTE MACRO BYTE
IF ((BYTE&0XF0)>>4)>9
DB ((BYTE&0XF0)>>4)+0X37
ELSE
DB ((BYTE&0XF0)>>4)+0X30
ENDIF
IF (BYTE&0X0F)>9
DB (BYTE&0X0F)+0X37
ELSE
DB (BYTE&0X0F)+0X30
ENDIF
ENDM
RS232_INIT LD BC,RS232_LINE_CTRL
IN A,(C)
OR %10000000
OUT (C),A
LD B,HIGH (RS232_DIV_L)
LD A,LOW (SPEED)
OUT (C),A
LD B,HIGH (RS232_DIV_H)
LD A,HIGH (SPEED)
OUT (C),A
LD B,HIGH (RS232_LINE_CTRL)
LD A,%00000111
OUT (C),A
RET
RS232_WRITE EXX
LD BC,RS232_LINE_STAT
EX AF,AF'
RS232WRITE1 IN A,(C)
AND %00100000
JR Z,RS232WRITE1
LD B,HIGH (RS232_IO)
EX AF,AF'
OUT (C),A
EXX
RET
RS232_READ EXX
LD BC,RS232_LINE_STAT
RS232READ1 IN A,(C)
AND %00000001
JR Z,RS232READ1
LD B,HIGH (RS232_IO)
IN A,(C)
EXX
RET