mirror of
https://github.com/bobbimanners/emailler.git
synced 2024-09-12 02:54:54 +00:00
20 lines
383 B
ArmAsm
20 lines
383 B
ArmAsm
|
;ASCII/PETSCII conversion tables
|
||
|
;cribbed from http://www.ffd2.com/fridge/misc/petcom.c
|
||
|
|
||
|
|
||
|
.export ascii_to_native
|
||
|
.export native_to_ascii
|
||
|
|
||
|
;given an A2 Screen Code char in A, return equivalent ASCII
|
||
|
native_to_ascii:
|
||
|
;just strip high bit
|
||
|
and #$7f
|
||
|
rts
|
||
|
|
||
|
;given an ASCII char in A, return equivalent A2 Screen Code
|
||
|
ascii_to_native:
|
||
|
;set high bit
|
||
|
ora #$80
|
||
|
rts
|
||
|
|