-
Notifications
You must be signed in to change notification settings - Fork 1
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
111 additions
and
0 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
Binary file not shown.
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 |
---|---|---|
@@ -0,0 +1,54 @@ | ||
* = $C000 | ||
|
||
;; Jump/Branching operations | ||
|
||
main: | ||
lda #$0 | ||
|
||
; Testing jmp, should store $45 at $00 | ||
; Obviously jsr/rts is better, but trying to test jmp | ||
;; TODO: There's a bug here, I'm double decoding address--basically using indirect when it shouldn't be | ||
;; Not sure if I can change it without affecting other stuff | ||
jmp setA45 | ||
lda #$0 | ||
returnfromjmp: | ||
sta $00 | ||
|
||
; Testing jsr/rts/bne | ||
jsr testSubroutine | ||
brk | ||
|
||
;4c = 010 011 00 | ||
|
||
|
||
|
||
setA45: | ||
lda #$45 | ||
jmp returnfromjmp | ||
|
||
testSubroutine: | ||
; Should store $20 at positions $0010-0015 | ||
ldx #$05 | ||
lda #$20 | ||
.( | ||
loop: | ||
sta $10,X | ||
dey | ||
bne loop | ||
rts | ||
.) | ||
|
||
|
||
;;; Expected Ending Memory Map: | ||
;; 0000 00 00 00 00 00 00 00 00 06 00 00 00 0e 00 10 00 |................| | ||
;; 0010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| | ||
;; 0020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| | ||
;; 0030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| | ||
;; 0040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| | ||
;; 0050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| | ||
;; 0060 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| | ||
|
||
.dsb $fffa-*,$ff | ||
.word $00 | ||
.word $C000 | ||
.word $00 |
Binary file not shown.