Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
2
Task/Empty-string/6502-Assembly/empty-string-1.6502
Normal file
2
Task/Empty-string/6502-Assembly/empty-string-1.6502
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
EmptyString:
|
||||
byte 0
|
||||
16
Task/Empty-string/6502-Assembly/empty-string-2.6502
Normal file
16
Task/Empty-string/6502-Assembly/empty-string-2.6502
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
lda #<EmptyString ;address of string we wish to check
|
||||
sta $00
|
||||
lda #>EmptyString
|
||||
sta $01 ;the empty string has been assigned to zero page pair $00 and $01
|
||||
|
||||
ldy #0
|
||||
ldx #0
|
||||
getStringLength:
|
||||
lda ($00),y
|
||||
beq Terminated
|
||||
iny
|
||||
jmp getStringLength
|
||||
Terminated:
|
||||
cpy #0
|
||||
beq StringIsEmpty ;if this branch is taken, the string is empty
|
||||
;otherwise, the string is not empty
|
||||
Loading…
Add table
Add a link
Reference in a new issue