ret
endp
;--------------------------------------------------------------------------; segment translation; 0-9
;
; Bits: 7
; 2 6
; 1
; 3 5
; 4
segtranslate: inc a
movc a,@a+pc
ret
db 0fch,060h,0dah ; 7-segment codes for decimals 0..9
db 0f2h,066h,0b6h
db 0beh,0e0h,0feh
db 0f6h
db 09eh,00ah,03ah ; e,r,o
db 02ah,0b6h,076h ; n,S,y
db 09ch,0eeh,0ceh ; C,A,P
db 02eh,07ch,06eh ; h,U,X
;--------------------------------------------------------------------------; segment translation; 0-9/A-F
hextranslate: inc a
movc a,@a+pc
ret
db 0fch,060h,0dah ; 7-segment codes for decimals 0..9
db 0f2h,066h,0b6h
db 0beh,0e0h,0feh
db 0f6h
db 0eeh,03eh,01ah ; 7-segment codes for hex A..F
db 07ah,09eh,08eh
;--------------------------------------------------------------------------; remote control decoder
proc remtranslate
anl a,#3fh ; only bit 0..5 relevant
inc a
movc a,@a+pc
ret
db 80h,00h,01h,02h,03h,04h,05h,06h
db 07h,08h,09h,KEY_STEP,KEY_FREQINP,80h,80h,80h
db 80h,80h,80h,KEY_TAPE,KEY_TUNER,KEY_PHONO,KEY_AUX,80h
db 80h,80h,80h,KEY_TAPE,80h,80h,80h,80h
db 80h,80h,80h,80h,KEY_REMOFF,80h,80h,80h
db 80h,80h,80h,80h,80h,80h,80h,80h
db 80h,80h,80h,80h,80h,80h,80h,80h
db KEY_DOWN,KEY_UP,80h,KEY_STORE,80h,80h,80h,80h
endp
;--------------------------------------------------------------------------; string constants
; hint: these are not ASCII-coded, we use a 'squeezed' set since anyway only
; a few characters are printable on a 7-segment display
str_error: db "Error",0
str_nosyn: db "noSyn",0
str_tape: db "CASS",0