Some fixes (mostly typos) in loader.s

This commit is contained in:
John Lorentzson 2025-07-15 16:45:21 +02:00
parent 5c41b48664
commit f81c0f7e65

View file

@ -1,11 +1,11 @@
;;; -*- Mode: asm; indent-tabs-mode: t; tab-width: 8 -*-
;;This program reads a data stream from the joystick port and saves it in memory.
;;The datastream format is as sutch:
;; This program reads a data stream from the joystick port and saves it in memory.
;; The datastream format is as sutch:
;;
;;############################################
;; ############################################
;; 16-bit byte-length (big endian) | data
;;############################################
;; ############################################
;; The data comes from CTRL2 bit 0 and the clock is at bit 1
@ -21,19 +21,20 @@
;; More documentation on the Joystick port can be found here: https://www.c64-wiki.com/wiki/Joystick
progdest = $fe
CLKMASK = %00000010
CTRL2 = $DC00
.org $80d
coldstart: ;; Draw a dollar sign on screen to show that program has loaded
coldstart: ;; Draw an at sign on screen to show that program has loaded
lda #$0
sta $400
waitstart: ;; Wait until joystick 1 has been pulled forwards to start this program
waitstart: ;; Wait until joystick 1 has been pulled forwards to start the program
lda $dc01
and #$01
bne waitstart
;; Change boarder colour for debuging
;; Change border colour for debugging
lda #$00
sta $d020
teststart:
@ -55,7 +56,7 @@ check_for_load_start:
rts
start:
sei
;; change boarder collor for debuging purposes
;; change border color for debugging purposes
ldx #$02
stx $d020
ldy #$00
@ -109,8 +110,8 @@ wait_for_bit_start:
jmp done
@notdone:
new_byte:
;; BYTE is the byte beaing read from the stream. The bits are shifted from the left
;; When we shift out this 1 in BYTE bellow we save the BYTE to memory.
;; BYTE is the byte being read from the stream. The bits are shifted from the left
;; When we shift out this 1 in BYTE below we save the BYTE to memory.
lda #%10000000
sta BYTE
wait_for_bit_end:
@ -134,6 +135,5 @@ error:
BYTE = $400
LEN = $402
progdest = $fe
stop: .word $0000
loaded: .byte 0