;Include-Datei zum Umwandeln von Scan- in ASCII-Codes und zurck.
;Nur fr Buchstaben und Ziffern, englische und deutsche Tastatur
;_SCANTAB die Tabelle
;_SCANTAB_DE dieselbe Tabelle mit vertauchtem Y<->Z
;_ASC2SCAN ASCII (AL) -> SCAN (AL), CY=1: Fehler, DS mu stimmen, VR: -
;_SCAN2ASC SCAN (AL) -> ASCII (AL), CY=1: Fehler, DS mu stimmen, VR: -
;Prozeduren-Startadressen unter gleichem Label ohne Anfangs-Unterstrich.
macro _SCANTAB
ScanTOrg: ;Scancode:=[ANUM(ASCII)], wobei ANUM eine bereits
;definierte Funktion in PROLOG.ASM ist.
db 0bh,02h,03h,04h,05h,06h,07h,08h,09h,0ah ;Ziffern 0..9
db 1eh,30h,2eh,20h,12h,21h,22h,23h,17h,24h ;Buchst. A..J
db 25h,26h,32h,31h,18h,19h,10h,13h,1fh,14h ;Buchst. K..T
db 16h,2fh,11h,2dh,15h,2ch ;Buchst. U..Z
ScanTEnd:
ScanTLen = ScanTEnd-ScanTOrg ;mte 36 ergeben!
endm
macro _SCANTAB_DE ;Deutsche Version tauscht Y<->Z
ScanTOrg:
db 0bh,02h,03h,04h,05h,06h,07h,08h,09h,0ah ;Ziffern 0..9
db 1eh,30h,2eh,20h,12h,21h,22h,23h,17h,24h ;Buchst. A..J
db 25h,26h,32h,31h,18h,19h,10h,13h,1fh,14h ;Buchst. K..T
db 16h,2fh,11h,2dh,2ch,15h ;Buchst. U..Z
ScanTEnd:
ScanTLen = ScanTEnd-ScanTOrg
endm
macro _ASC2SCAN
proc asc2scan ;PE: AL: ASCII-Code, DS auf ScanTOrg-Seg
;PA: AL: SCAN-Code, CY=1: Fehler (kein Buchstabe)
;
call ANum
cmp al,36
cmc
jc @@e
push bx
mov bx,ofs ScanTOrg
xlat
pop bx
@@e: ret
endp
endm
macro _SCAN2ASC
proc scan2asc ;PE: AL: SCAN-Code, DS auf ScanTOrg-Segment
;PA: AL: ASCII-Code, CY=1: Fehler (kein Buchstabe)
push bx
mov bx,ScanTLen-1
@@l: cmp [by ScanTOrg+bx],al
jnz @@1
mov al,bl
;..die bliche Konvertierungsroutine funktioniert HIER NICHT
add al,'0'
cmp al,'0'+10
cmc
jnc @@e
add al,7
jr @@e
@@1:
sub bx,1
jnc @@l
@@e: pop bx
ret
endp
endm
Vorgefundene Kodierung: UTF-8 | 0
|