emailler/docs/drivers_a2charconv_s.html

39 lines
1.7 KiB
HTML
Raw Normal View History

<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><link rel="stylesheet" type="text/css" href="ca65-doc-style.css"/></head><body><a href="ref_index.html"><h1>ip65 technical reference</h1></a><h1>File : drivers/a2charconv.s</h1><h2 id="functions">functions</h2><table><tr><th>function</th><th>description</th></tr><tr><td id="ascii_to_native">ascii_to_native</td><td><pre>given an ASCII char in A, return equivalent A2 Screen Code </pre></td></tr><tr><td id="native_to_ascii">native_to_ascii</td><td><pre>given an A2 Screen Code char in A, return equivalent ASCII </pre></td></tr></table><h2>implementation</h2><pre id="code">
.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
;-- LICENSE FOR a2charconv.s --
; 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/
;
; 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.
;
; The Original Code is ip65.
;
; The Initial Developer of the Original Code is Jonno Downes,
; jonno@jamtronix.com.
; Portions created by the Initial Developer are Copyright (C) 2009
; Jonno Downes. All Rights Reserved.
; -- LICENSE END --
</pre></body></html>