1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-11-16 21:07:56 +00:00
kickc/src/test/ref/duplicate-loop-problem.asm
2020-02-23 09:44:36 +01:00

21 lines
407 B
NASM

// Duplicate Loop Problem from Richard-William Loerakker
// Resulted in infinite loop in loop depth analysis
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
.label DC00 = $dc00
main: {
__b1:
// key = *DC00
ldx DC00
// key & %00011111
txa
and #$1f
// while(key == 0 && ((key & %00011111) == %00011111))
cpx #0
bne __b1
cmp #$1f
beq __b1
jmp __b1
}