2013-12-13 21:24:03 +00:00
|
|
|
.export ascii_to_native
|
|
|
|
.export native_to_ascii
|
|
|
|
|
2013-12-27 13:57:56 +00:00
|
|
|
; given an A2 Screen Code char in A, return equivalent ASCII
|
2013-12-13 21:24:03 +00:00
|
|
|
native_to_ascii:
|
2013-12-27 13:57:56 +00:00
|
|
|
; just strip high bit
|
2013-12-13 21:24:03 +00:00
|
|
|
and #$7f
|
|
|
|
rts
|
|
|
|
|
2013-12-27 13:57:56 +00:00
|
|
|
; given an ASCII char in A, return equivalent A2 Screen Code
|
2013-12-13 21:24:03 +00:00
|
|
|
ascii_to_native:
|
2013-12-27 13:57:56 +00:00
|
|
|
; set high bit
|
2013-12-13 21:24:03 +00:00
|
|
|
ora #$80
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-27 13:57:56 +00:00
|
|
|
; -- LICENSE FOR a2charconv.s --
|
2013-12-13 21:24:03 +00:00
|
|
|
; The contents of this file are subject to the Mozilla Public License
|
|
|
|
; Version 1.1 (the "License"); you may not use this file except in
|
|
|
|
; compliance with the License. You may obtain a copy of the License at
|
|
|
|
; http://www.mozilla.org/MPL/
|
2013-12-27 13:57:56 +00:00
|
|
|
;
|
2013-12-13 21:24:03 +00:00
|
|
|
; Software distributed under the License is distributed on an "AS IS"
|
|
|
|
; basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
|
|
|
; License for the specific language governing rights and limitations
|
|
|
|
; under the License.
|
2013-12-27 13:57:56 +00:00
|
|
|
;
|
2013-12-13 21:24:03 +00:00
|
|
|
; The Original Code is ip65.
|
2013-12-27 13:57:56 +00:00
|
|
|
;
|
2013-12-13 21:24:03 +00:00
|
|
|
; The Initial Developer of the Original Code is Jonno Downes,
|
|
|
|
; jonno@jamtronix.com.
|
|
|
|
; Portions created by the Initial Developer are Copyright (C) 2009
|
2013-12-27 13:57:56 +00:00
|
|
|
; Jonno Downes. All Rights Reserved.
|
2013-12-13 21:24:03 +00:00
|
|
|
; -- LICENSE END --
|