Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
6
Task/Variables/6502-Assembly/variables-1.6502
Normal file
6
Task/Variables/6502-Assembly/variables-1.6502
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
org $1200
|
||||
SoundRam equ $1200 ;some assemblers require equ directives to not be indented.
|
||||
SoundChannel_One equ $1200
|
||||
SoundChannel_Two equ $1201
|
||||
SoundChannel_Three equ $1202
|
||||
LDA #$FF ;this still gets assembled starting at $1200, since equ directives don't take up space!
|
||||
5
Task/Variables/6502-Assembly/variables-2.6502
Normal file
5
Task/Variables/6502-Assembly/variables-2.6502
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
joystick equ $00 ;this variable is located at zero page memory address $00
|
||||
Player_Xpos equ $01 ;this variable is located at $01
|
||||
Player_Ypos equ $02
|
||||
pointer equ $03 ;intended to take up 2 bytes
|
||||
sound_on equ $05
|
||||
8
Task/Variables/6502-Assembly/variables-3.6502
Normal file
8
Task/Variables/6502-Assembly/variables-3.6502
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
enum $0000
|
||||
;these will be defined starting at $0000 and increasing in the order listed, incremented by the amount after DSB.
|
||||
joystick dsb 1 ;this takes up 1 byte
|
||||
Player_Xpos dsb 1
|
||||
Player_Ypos dsb 1
|
||||
pointer dsb 2 ;this takes up 2 bytes
|
||||
sound_on dsb 1
|
||||
ende ;end enumeration
|
||||
7
Task/Variables/6502-Assembly/variables-4.6502
Normal file
7
Task/Variables/6502-Assembly/variables-4.6502
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
.rsset $0000
|
||||
joystick .rs 1
|
||||
Player_Xpos .rs 1
|
||||
Player_Ypos .rs 1
|
||||
pointer .rs 2
|
||||
sound_on .rs 1
|
||||
;no closer needed for this method
|
||||
8
Task/Variables/6502-Assembly/variables-5.6502
Normal file
8
Task/Variables/6502-Assembly/variables-5.6502
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
LDA #$05
|
||||
STA Player1_Lives ;equivalent C code: Player1_Lives = 5;
|
||||
|
||||
LDA #$05
|
||||
STA pointer+1
|
||||
LDA #$40
|
||||
STA pointer
|
||||
;loads the variable pointer with the value $0540
|
||||
11
Task/Variables/6502-Assembly/variables-6.6502
Normal file
11
Task/Variables/6502-Assembly/variables-6.6502
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
NametableBase equ $20 ;label referring to a constant
|
||||
VRAM_ADDR equ $2006 ;label referring to a memory address
|
||||
VRAM_DATA equ $2007 ;label referring to a memory address
|
||||
|
||||
LDA #NametableBase ;without a # this is interpreted as a memory address like any other number would be.
|
||||
STA VRAM_ADDR
|
||||
LDA #$00
|
||||
STA VRAM_ADDR
|
||||
|
||||
LDA #$03
|
||||
STA VRAM_DATA
|
||||
Loading…
Add table
Add a link
Reference in a new issue