[an error occurred while processing this directive]
|
mov B,index
mov a,#0FFh
jb B.0,$+3+2
anl a,#0AAh
jnb B.0,$+3+2
anl a,#055h
jb B.1,$+3+2
anl a,#0CCh
jnb B.1,$+3+2
anl a,#033h
jb B.2,$+3+2
anl a,#0F0h
jnb B.2,$+3+2
anl a,#00Fh
FUNC MACRO fname,used,attr
?PR?&fname SEGMENT CODE attr
RSEG ?PR?&fname
ENTRY fname,
ENDMENTRY MACRO fname,used
public fname
if not nul used
$RU fname used
endif
ENDM;; table must be _after_ nxlat not more then (255-tablelen) bytes from
;; next after movc a,@a+PC location
nxlat MACRO tbl
add a,#tbl-($+2+1)
movc a,@a+PC
ENDMFUNC _Nibbles2segs,<(a,c,R0,R5)>
_Nibbles2segs: ;;;;;;;;;;;;;;;
; void nibble2segs( u8 idata *buf, u8 len);
; > R7 -> buf
; >* R5 = len
; * R0,a,C
mov R0,AR7
n2s_1:
mov a,@R0
nxlat n2s_table
mov @R0,a
inc R0
djnz R5,n2s_1
ret
ENTRY _NibbleToSeg,<(a,C,R7)>
; u8 NibbleToSeg(u8);
_NibbleToSeg:
mov a,R7
anl a,#0x0F
nxlat n2s_table
mov R7,a
ret
n2s_table:
db SEGS_0,SEGS_1,SEGS_2,SEGS_3,SEGS_4,SEGS_5
db SEGS_6,SEGS_7,SEGS_8,SEGS_9,SEGS_A,SEGS_b
db SEGS_C,SEGS_d,SEGS_E,SEGS_F
E-mail: info@telesys.ru