mirror of
https://github.com/bobbimanners/emailler.git
synced 2024-09-12 02:54:54 +00:00
123 lines
3.5 KiB
HTML
123 lines
3.5 KiB
HTML
|
<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/c64print.s</h1><h2 id="functions">functions</h2><table><tr><th>function</th><th>description</th></tr><tr><td id="beep">beep</td><td><pre>currently does nothing (should make a 'beep noise')
|
||
|
inputs: none
|
||
|
outputs: none
</pre></td></tr><tr><td id="cls">cls</td><td><pre>use C64 Kernel ROM function to clear the screen
|
||
|
inputs: none
|
||
|
outputs: none
</pre></td></tr><tr><td id="print_a">print_a</td><td><pre>use C64 Kernel ROM function to print a character to the screen
|
||
|
inputs: A contains petscii value of character to print
|
||
|
outputs: none
</pre></td></tr><tr><td id="print_a_inverse">print_a_inverse</td><td><pre>print a single char in inverse text:
</pre></td></tr><tr><td id="print_cr">print_cr</td><td><pre>use C64 Kernel ROM function to move to a new line
|
||
|
inputs: none
|
||
|
outputs: none
</pre></td></tr></table><h2 id="constants">constants</h2><table><tr><th>constants</th><th>description</th><th>value</th></tr><tr><td id="screen_current_col">screen_current_col</td><td></td><td>$d3
|
||
|
</td></tr><tr><td id="screen_current_row">screen_current_row</td><td></td><td>$d6
|
||
|
</td></tr></table><h2>implementation</h2><pre id="code">
|
||
|
.export print_a
|
||
|
.export print_cr
|
||
|
.export cls
|
||
|
.export beep
|
||
|
.export print_a_inverse
|
||
|
|
||
|
.exportzp screen_current_row
|
||
|
.exportzp screen_current_col
|
||
|
|
||
|
|
||
|
screen_current_row=$d6
|
||
|
screen_current_col=$d3
|
||
|
|
||
|
|
||
|
;use C64 Kernel ROM function to print a character to the screen
|
||
|
;inputs: A contains petscii value of character to print
|
||
|
;outputs: none
|
||
|
print_a = $ffd2
|
||
|
|
||
|
.bss
|
||
|
beep_timer: .res 1
|
||
|
|
||
|
.code
|
||
|
|
||
|
;use C64 Kernel ROM function to move to a new line
|
||
|
;inputs: none
|
||
|
;outputs: none
|
||
|
print_cr:
|
||
|
lda #13
|
||
|
jmp print_a
|
||
|
|
||
|
;use C64 Kernel ROM function to clear the screen
|
||
|
;inputs: none
|
||
|
;outputs: none
|
||
|
cls:
|
||
|
lda #147 ; 'CLR/HOME'
|
||
|
jmp print_a
|
||
|
|
||
|
;currently does nothing (should make a 'beep noise')
|
||
|
;inputs: none
|
||
|
;outputs: none
|
||
|
beep:
|
||
|
lda #15
|
||
|
sta $d418 ;set volume
|
||
|
|
||
|
lda #0
|
||
|
sta $d405
|
||
|
lda #240
|
||
|
sta $d406
|
||
|
lda #8
|
||
|
sta $d403
|
||
|
|
||
|
;tone values for voice 1
|
||
|
lda #48
|
||
|
sta $d400
|
||
|
lda #28
|
||
|
sta $d401
|
||
|
|
||
|
;enable tone register
|
||
|
lda #65
|
||
|
sta $d404
|
||
|
|
||
|
|
||
|
; pause for qtr second
|
||
|
lda $dd06 ;
|
||
|
sta beep_timer
|
||
|
inc beep_timer ;time counts backwards
|
||
|
:
|
||
|
lda $dd06 ;
|
||
|
cmp beep_timer
|
||
|
bne :-
|
||
|
|
||
|
;disable tone register
|
||
|
lda #65
|
||
|
sta $d404
|
||
|
lda #0
|
||
|
sta $d418 ;set volume
|
||
|
|
||
|
rts
|
||
|
|
||
|
|
||
|
;print a single char in inverse text:
|
||
|
print_a_inverse:
|
||
|
pha
|
||
|
lda #18 ;inverse mode on
|
||
|
jsr print_a
|
||
|
pla
|
||
|
jsr print_a
|
||
|
lda #146 ;inverse mode off
|
||
|
jmp print_a
|
||
|
|
||
|
|
||
|
|
||
|
;-- LICENSE FOR c64print.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>
|