1bra(0x2f, 0), 2beq(0xf0, !regs.p.z), 3bne(0xd0, regs.p.z), 4bcs(0xb0, !regs.p.c), 5bcc(0x90, regs.p.c), 6bvs(0x70, !regs.p.v), 7bvc(0x50, regs.p.v), 8bmi(0x30, !regs.p.n), 9bpl(0x10, regs.p.n) { 101:rd = op_readpc(); 11 if($1)end; 122:op_io(); 133:op_io(); 14 regs.pc += (int8)rd; 15} 16 17bbs0(0x03, 0x01, !=), 18bbc0(0x13, 0x01, ==), 19bbs1(0x23, 0x02, !=), 20bbc1(0x33, 0x02, ==), 21bbs2(0x43, 0x04, !=), 22bbc2(0x53, 0x04, ==), 23bbs3(0x63, 0x08, !=), 24bbc3(0x73, 0x08, ==), 25bbs4(0x83, 0x10, !=), 26bbc4(0x93, 0x10, ==), 27bbs5(0xa3, 0x20, !=), 28bbc5(0xb3, 0x20, ==), 29bbs6(0xc3, 0x40, !=), 30bbc6(0xd3, 0x40, ==), 31bbs7(0xe3, 0x80, !=), 32bbc7(0xf3, 0x80, ==) { 331:dp = op_readpc(); 342:sp = op_readdp(dp); 353:rd = op_readpc(); 364:op_io(); 37 if((sp & $1) $2 $1)end; 385:op_io(); 396:op_io(); 40 regs.pc += (int8)rd; 41} 42 43cbne_dp(0x2e) { 441:dp = op_readpc(); 452:sp = op_readdp(dp); 463:rd = op_readpc(); 474:op_io(); 48 if(regs.a == sp)end; 495:op_io(); 506:op_io(); 51 regs.pc += (int8)rd; 52} 53 54cbne_dpx(0xde) { 551:dp = op_readpc(); 562:op_io(); 573:sp = op_readdp(dp + regs.x); 584:rd = op_readpc(); 595:op_io(); 60 if(regs.a == sp)end; 616:op_io(); 627:op_io(); 63 regs.pc += (int8)rd; 64} 65 66dbnz_dp(0x6e) { 671:dp = op_readpc(); 682:wr = op_readdp(dp); 693:op_writedp(dp, --wr); 704:rd = op_readpc(); 71 if(wr == 0x00)end; 725:op_io(); 736:op_io(); 74 regs.pc += (int8)rd; 75} 76 77dbnz_y(0xfe) { 781:rd = op_readpc(); 792:op_io(); 80 regs.y--; 813:op_io(); 82 if(regs.y == 0x00)end; 834:op_io(); 845:op_io(); 85 regs.pc += (int8)rd; 86} 87 88jmp_addr(0x5f) { 891:rd = op_readpc(); 902:rd |= op_readpc() << 8; 91 regs.pc = rd; 92} 93 94jmp_iaddrx(0x1f) { 951:dp = op_readpc(); 962:dp |= op_readpc() << 8; 973:op_io(); 98 dp += regs.x; 994:rd = op_readaddr(dp); 1005:rd |= op_readaddr(dp + 1) << 8; 101 regs.pc = rd; 102} 103 104call(0x3f) { 1051:rd = op_readpc(); 1062:rd |= op_readpc() << 8; 1073:op_io(); 1084:op_io(); 1095:op_io(); 1106:op_writestack(regs.pc >> 8); 1117:op_writestack(regs.pc); 112 regs.pc = rd; 113} 114 115pcall(0x4f) { 1161:rd = op_readpc(); 1172:op_io(); 1183:op_io(); 1194:op_writestack(regs.pc >> 8); 1205:op_writestack(regs.pc); 121 regs.pc = 0xff00 | rd; 122} 123 124tcall_0(0x01, 0), 125tcall_1(0x11, 1), 126tcall_2(0x21, 2), 127tcall_3(0x31, 3), 128tcall_4(0x41, 4), 129tcall_5(0x51, 5), 130tcall_6(0x61, 6), 131tcall_7(0x71, 7), 132tcall_8(0x81, 8), 133tcall_9(0x91, 9), 134tcall_10(0xa1, 10), 135tcall_11(0xb1, 11), 136tcall_12(0xc1, 12), 137tcall_13(0xd1, 13), 138tcall_14(0xe1, 14), 139tcall_15(0xf1, 15) { 1401:dp = 0xffde - ($1 << 1); 141 rd = op_readaddr(dp); 1422:rd |= op_readaddr(dp + 1) << 8; 1433:op_io(); 1444:op_io(); 1455:op_io(); 1466:op_writestack(regs.pc >> 8); 1477:op_writestack(regs.pc); 148 regs.pc = rd; 149} 150 151brk(0x0f) { 1521:rd = op_readaddr(0xffde); 1532:rd |= op_readaddr(0xffdf) << 8; 1543:op_io(); 1554:op_io(); 1565:op_writestack(regs.pc >> 8); 1576:op_writestack(regs.pc); 1587:op_writestack(regs.p); 159 regs.pc = rd; 160 regs.p.b = 1; 161 regs.p.i = 0; 162} 163 164ret(0x6f) { 1651:rd = op_readstack(); 1662:rd |= op_readstack() << 8; 1673:op_io(); 1684:op_io(); 169 regs.pc = rd; 170} 171 172reti(0x7f) { 1731:regs.p = op_readstack(); 1742:rd = op_readstack(); 1753:rd |= op_readstack() << 8; 1764:op_io(); 1775:op_io(); 178 regs.pc = rd; 179} 180