move findfreeiocb function into its own object file

This commit is contained in:
Christian Groessler
2013-06-25 01:12:11 +02:00
parent c4c67b9205
commit 1bd902787b
3 changed files with 30 additions and 26 deletions

View File

@@ -0,0 +1,23 @@
; find a free iocb
; no entry parameters
; return ZF = 0/1 for not found/found
; index in X if found
; all registers destroyed
.proc findfreeiocb
ldx #0
ldy #$FF
loop: tya
cmp ICHID,x
beq found
txa
clc
adc #$10
tax
cmp #$80
bcc loop
inx ; return ZF cleared
found: rts
.endproc ; findfreeiocb