Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
15
Task/String-length/68000-Assembly/string-length.68000
Normal file
15
Task/String-length/68000-Assembly/string-length.68000
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
GetStringLength:
|
||||
; INPUT: A3 = BASE ADDRESS OF STRING
|
||||
; RETURNS LENGTH IN D1 (MEASURED IN BYTES)
|
||||
MOVE.L #0,D1
|
||||
|
||||
loop_getStringLength:
|
||||
|
||||
MOVE.B (A3)+,D0
|
||||
CMP #0,D0
|
||||
BEQ done
|
||||
ADDQ.L #1,D1
|
||||
BRA loop_getStringLength
|
||||
|
||||
done:
|
||||
RTS
|
||||
Loading…
Add table
Add a link
Reference in a new issue