2009-01-22 01:27:03 +00:00
|
|
|
|
|
|
|
.export print_a
|
2009-07-31 14:50:02 +00:00
|
|
|
.export print_a_inverse
|
2009-01-22 01:27:03 +00:00
|
|
|
.export print_cr
|
|
|
|
.export cls
|
2009-02-01 03:29:44 +00:00
|
|
|
.export beep
|
2009-07-31 14:50:02 +00:00
|
|
|
.exportzp screen_current_row
|
|
|
|
.exportzp screen_current_col
|
|
|
|
|
2009-01-22 01:27:03 +00:00
|
|
|
.code
|
|
|
|
|
2009-07-31 14:50:02 +00:00
|
|
|
screen_current_col=$24 ; CH - Horizontal cursor-position (0-39)
|
|
|
|
screen_current_row=$25 ; CV - Vertical cursor-position (0-23)
|
|
|
|
|
2009-03-21 06:40:53 +00:00
|
|
|
;
|
|
|
|
;use Apple 2 monitor ROM function to display 1 char
|
|
|
|
;inputs: A should be set to ASCII char to display
|
|
|
|
;outputs: none
|
2009-01-22 01:27:03 +00:00
|
|
|
print_a:
|
2009-08-02 08:49:38 +00:00
|
|
|
ora #$80 ;turn ASCII into Apple 2 screen codes
|
|
|
|
cmp #$8A ;is it a line feed?
|
|
|
|
bne @not_line_feed
|
|
|
|
; jmp print_cr
|
|
|
|
pha
|
|
|
|
lda #$0
|
|
|
|
sta screen_current_col
|
|
|
|
pla
|
|
|
|
@not_line_feed:
|
|
|
|
|
2009-07-30 10:43:37 +00:00
|
|
|
jmp $fded
|
2009-01-22 01:27:03 +00:00
|
|
|
|
|
|
|
|
2009-03-21 06:40:53 +00:00
|
|
|
;use Apple 2 monitor ROM function to move to new line
|
|
|
|
;inputs: none
|
|
|
|
;outputs: none
|
2009-01-22 01:27:03 +00:00
|
|
|
print_cr:
|
|
|
|
|
|
|
|
jmp $fd8e
|
|
|
|
|
|
|
|
|
2009-03-21 06:40:53 +00:00
|
|
|
;use Apple 2 monitor ROM function to move to clear the screen
|
|
|
|
;inputs: none
|
|
|
|
;outputs: none
|
2009-01-22 01:27:03 +00:00
|
|
|
cls:
|
|
|
|
jmp $fc58
|
2009-02-01 03:29:44 +00:00
|
|
|
|
2009-03-21 06:40:53 +00:00
|
|
|
;use Apple 2 monitor ROM function to move to make a 'beep' noise
|
|
|
|
;inputs: none
|
|
|
|
;outputs: none
|
2009-02-01 03:29:44 +00:00
|
|
|
beep:
|
2009-07-31 14:50:02 +00:00
|
|
|
jmp $fbdd
|
|
|
|
|
|
|
|
print_a_inverse:
|
2009-08-02 08:49:38 +00:00
|
|
|
and #$7F ;turn off top bits
|
|
|
|
jsr $fded
|
2009-10-22 10:49:08 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;-- LICENSE FOR a2print.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 --
|