adapted to Kick Assembler, some documentation update

This commit is contained in:
FeralChild64 committed 2019-09-07 12:35:21 +02:00
1 parent ae23dbae7b
commit de27124b4f
198 files changed
+4181 -3976

No files matched your search

+13 -13
View File
@@ -1,50 +1,50 @@
;; Find the BASIC line with number basic_line_number
// Find the BASIC line with number basic_line_number
basic_find_line:
;; Get pointer to start of BASIC text
// Get pointer to start of BASIC text
lda basic_start_of_text_ptr+0
sta basic_current_line_ptr+0
lda basic_start_of_text_ptr+1
sta basic_current_line_ptr+1
basic_find_line_loop:
;; Then search for line number
;; Line number
// Then search for line number
// Line number
ldy #3
ldx #<basic_current_line_ptr
jsr peek_under_roms
cmp basic_line_number+1
beq +
beq !+
bcs line_num_too_high
bne not_this_line
*
!:
dey
jsr peek_under_roms
cmp basic_line_number+0
beq +
beq !+
bcs line_num_too_high
bne not_this_line
*
!:
clc
rts
not_this_line:
;; Not this line, so advance to next line
// Not this line, so advance to next line
ldx #<basic_current_line_ptr
jsr peek_pointer_null_check
bcs more_lines_exist
;; no more lines exist, return failure
// no more lines exist, return failure
line_num_too_high:
sec
rts
more_lines_exist:
;; XXX - Add program mangled check here to be triggered
;; if the link goes backwards.
;; Follow link to next line
// XXX - Add program mangled check here to be triggered
// if the link goes backwards.
// Follow link to next line
ldy #0
ldx #<basic_current_line_ptr
jsr peek_under_roms