aboutsummaryrefslogtreecommitdiff
path: root/space/src/vectors
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <mikisabate@gmail.com>2025-03-10 22:52:15 +0100
committerMiquel Sabaté Solà <mikisabate@gmail.com>2025-03-10 22:52:15 +0100
commit1a74e6a1856673072a61abd0861759901bc2d939 (patch)
treebb1b54a7c27280d7d9e83c031233dd8402f1e721 /space/src/vectors
parentff22231f8a2f3714df701fd7c12b07915adc15e9 (diff)
downloadcode.nes-1a74e6a1856673072a61abd0861759901bc2d939.tar.gz
code.nes-1a74e6a1856673072a61abd0861759901bc2d939.zip
Bring code style to better standards
Be more careful on everything and try to follow along style.nes from my repository. This might change in the future, but it's in a much better state now. Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
Diffstat (limited to 'space/src/vectors')
-rw-r--r--space/src/vectors/irq.s5
-rw-r--r--space/src/vectors/nmi.s3
-rw-r--r--space/src/vectors/reset.s7
3 files changed, 8 insertions, 7 deletions
diff --git a/space/src/vectors/irq.s b/space/src/vectors/irq.s
index 2be3a94..ed8cf47 100644
--- a/space/src/vectors/irq.s
+++ b/space/src/vectors/irq.s
@@ -1,6 +1,5 @@
-.segment "CODE"
-
;; Interrupt Requests handler.
-irq:
+.proc irq
;; Nothing to do for us here :)
rti
+.endproc
diff --git a/space/src/vectors/nmi.s b/space/src/vectors/nmi.s
index e049239..4fe95bd 100644
--- a/space/src/vectors/nmi.s
+++ b/space/src/vectors/nmi.s
@@ -1,5 +1,5 @@
;; See `basics/sprite.s` for more info. I'm not doing anything fancier here.
-nmi:
+.proc nmi
bit $20
bpl @next
@@ -30,3 +30,4 @@ nmi:
pla
@next:
rti
+.endproc
diff --git a/space/src/vectors/reset.s b/space/src/vectors/reset.s
index 1216146..b024e65 100644
--- a/space/src/vectors/reset.s
+++ b/space/src/vectors/reset.s
@@ -2,13 +2,13 @@
;; Check `basics/sprite.s` for a deeper look on the logic below. I have only
;; added code after configuration/reset is done.
-reset:
+.proc reset
sei
cld
ldx #$40
stx $4017
- ldx #$ff
+ ldx #$FF
txs
inx
@@ -33,7 +33,7 @@ reset:
inx
bne @ram_reset_loop
- lda #$ef
+ lda #$EF
@sprite_reset_loop:
sta $200, x
inx
@@ -47,3 +47,4 @@ reset:
;; NOTE: configuration/reset is done, the code below is our actual program :D
jmp main
+.endproc