-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
6 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,13 @@ | ||
%import textio | ||
%zeropage basicsafe | ||
%zeropage dontuse | ||
%option no_sysinit | ||
%address $5000 | ||
%launcher none | ||
|
||
main { | ||
ubyte bank | ||
|
||
extsub @bank bank $a000 = routine_in_hiram(uword arg @AY) -> uword @AY | ||
|
||
sub start() { | ||
; copy the routine into hiram bank 8 | ||
bank = 8 | ||
cx16.rambank(bank) | ||
sys.memcopy(&the_increment_routine, $a000, 255) | ||
cx16.rambank(1) | ||
|
||
txt.print("incremented by one=") | ||
txt.print_uw(routine_in_hiram(37119)) | ||
txt.print("address of start: ") | ||
txt.print_uwhex(&start, true) | ||
txt.nl() | ||
} | ||
|
||
asmsub the_increment_routine(uword arg @AY) -> uword @AY { | ||
%asm {{ | ||
clc | ||
adc #1 | ||
bcc + | ||
iny | ||
+ rts | ||
}} | ||
} | ||
} |