silverdr wrote: > Any ideas to shorten it, keeping the same functionality? Returns P=EQ/NE, A corrupted: > c128_check: > lda $d030 - lda $d030 > cmp #$ff - cmp #$ff > beq c64 - > bne done_c128 - bne done_c128 > - c64: > - lda #$fc > - sta $d030 > - eor $d030 > - beq c128 > - done_c64: > - lda #$00 ; set EQ > - rts ; EQ=c64 > c128: - c128: > lda #$ff - lda #$ff ; set NE > sta $d030 - sta $d030 > done_c128: - done_c128: ; on entry here, already NE > lda #$01 - ; if you want A=return value, put lda > #$ff here > rts - rts ; NE=c128 > c64: - > lda #$fc - > sta $d030 - > eor $d030 - > beq c128 - > done_c64: - > lda #$00 - > rts - JGH Message was sent through the cbm-hackers mailing listReceived on 2013-05-20 22:00:02
Archive generated by hypermail 2.2.0.