chipty5/tests/skip.ch8asm

38 lines
873 B
Plaintext

;
; Exercise LD opcodes
;
LD V0, 01
SE V0, 01 ; SE Vx, nn - skip
LD V0, 00
LD V1, 00
SE V1, 01 ; SE Vx, nn - no skip
LD V1, 01
LD V2, 01
SNE V2, 00 ; SNE Vx, nn - skip
LD V2, 00
LD V3, 00
SNE V3, 00 ; SNE Vx, nn - no skip
LD V3, 01
; prepare for register based skips
LD Va, 12
LD Vb, 34
LD Vc, 12
LD V4, 01
SE Va, Vc ; SE Vx, Vy - skip
LD V4, 00
LD V5, 00
SE Va, Vb ; SE Vx, Vy - no skip
LD V5, 01
LD V6, 01
SNE Va, Vb ; SNE Vx, Vy - skip
LD V6, 00
LD V7, 00
SNE Va, Vc ; SNE Vx, Vy - no skip
LD V7, 01
EXIT