Added sample program, fixed maven packaging of resources, updated README
This commit is contained in:
1 parent
5bf0368120
commit
8ccd17b8d3
6 files changed
+178
-260
No files matched your search
@@ -0,0 +1,9 @@
|
||||
A Sample Program
|
||||
----------------
|
||||
|
||||
When loaded at address $0300, this program will print "Hello, 6502 World!" in
|
||||
infinite loop.
|
||||
|
||||
Assembled with the Ophis assembler:
|
||||
|
||||
https://hkn.eecs.berkeley.edu/~mcmartin/ophis/
|
||||
@@ -0,0 +1,20 @@
|
||||
;;
|
||||
;; Output the string 'Hello, World!'
|
||||
;;
|
||||
|
||||
|
||||
.alias cr $0d
|
||||
.alias lf $0a
|
||||
|
||||
.alias out $c000
|
||||
|
||||
.org $0300
|
||||
|
||||
start: ldx #$00
|
||||
loop: lda string,x
|
||||
beq start ; If A is 0, loop back and start again
|
||||
sta out ; Otherwise, store into output
|
||||
inx ; Increment X
|
||||
jmp loop ; Repeat.
|
||||
|
||||
string: .byte "Hello, 6502 world! ", 0
|
||||
Binary file not shown.
Reference in new issue
Block a user