45#if defined(__c64__) || defined(__plus4__) || defined(__atari__) || defined(__atarixl__) || defined(__vic20__) || defined(__c128__) || defined(__c64reu__) || defined(__c16__)
131 cpu_beq( _environment, _label );
201 outline1(
"LDA #$%2.2x", (
unsigned char)(_source & 0xff));
255 outline1(
"LDA #$%2.2x", (
unsigned char)(_source&0xff));
258 outline1(
"LDA #$%2.2x", (
unsigned char)((_source>>8)&0xff));
324 outline1(
"LDA #$%2.2x", (
unsigned char)(_source&0xff));
327 outline1(
"LDA #$%2.2x", (
unsigned char)((_source>>8)&0xff));
330 outline1(
"LDA #$%2.2x", (
unsigned char)((_source>>16)&0xff));
333 outline1(
"LDA #$%2.2x", (
unsigned char)((_source>>24)&0xff));
406void cpu_fill(
Environment * _environment,
char * _address,
char * _bytes,
int _bytes_width,
char * _pattern ) {
419 if ( _bytes_width == 8 ) {
474 if ( _bytes < 256 ) {
475 outline1(
"LDX #$%2.2x", (
unsigned char)( _bytes & 0xff ) );
483 outline1(
"LDA #$%2.2x", (
unsigned char)( _bytes & 0xff ) );
485 outline1(
"LDA #$%2.2x", (
unsigned char) ( ( _bytes >> 8 ) & 0xff ) );
525 if ( _bytes < 256 ) {
526 outline1(
"LDX #$%2.2x", (
unsigned char)( _bytes & 0xff ) );
527 outline1(
"LDA #$%2.2x", (
unsigned char) (_pattern & 0xff ) );
530 outline1(
"LDA #$%2.2x", (
unsigned char)( _bytes & 0xff ) );
532 outline1(
"LDA #$%2.2x", (
unsigned char) ( ( _bytes >> 8 ) & 0xff ) );
534 outline1(
"LDA #$%2.2x", (
unsigned char) (_pattern & 0xff ) );
608 if ( _bytes < 256 ) {
609 outline1(
"LDX #$%2.2x", (
unsigned char)( _bytes & 0xff ) );
617 outline1(
"LDA #$%2.2x", (
unsigned char)( _bytes & 0xff ) );
619 outline1(
"LDA #$%2.2x", (
unsigned char) ( ( _bytes >> 8 ) & 0xff ) );
659 if ( _bytes < 256 ) {
660 outline1(
"LDX #$%2.2x", (
unsigned char)( _bytes & 0xff ) );
661 outline1(
"LDA #$%2.2x", ( _pattern & 0xff ) );
664 outline1(
"LDA #$%2.2x", (
unsigned char)( _bytes & 0xff ) );
666 outline1(
"LDA #$%2.2x", (
unsigned char) ( ( _bytes >> 8 ) & 0xff ) );
668 outline1(
"LDA #$%2.2x", (
unsigned char) (_pattern & 0xff ) );
669 outline1(
"LDA #$%2.2x", ( _pattern & 0xff ) );
710 outline1(
"LDA #$%2.2x", (_value & 0xff));
729 outline1(
"LDA #'%c'", (_value & 0xff));
731 outline1(
"LDA #$%2.2x", (_value & 0xff));
757 outline1(
"LDA #$%2.2x", 0xff*_positive );
765 outline1(
"LDA #$%2.2x", 0xff*(1-_positive) );
793 outline1(
"CMP #$%2.2x", (
unsigned char)( _destination & 0xff ) );
795 outline1(
"LDA #$%2.2x", (
unsigned char)( (0xff*_positive) & 0xff ) );
799 outline1(
"LDA #$%2.2x", (
unsigned char)( (0xff*(1-_positive)) & 0xff ) );
855 outline1(
"CMP #$%2.2x", (
unsigned char)(_destination&0xff));
883 outline1(
"CMP #$%2.2x", (
unsigned char)(_destination & 0xff));
912 outline1(
"CMP #'%c'", (
unsigned char)(_destination&0xff));
1004 outline1(
"SBC #$%2.2x", ( _destination & 0xff ) );
1022 outline1(
"CMP #$%2.2x", (
unsigned char)( _destination & 0xff ) );
1049 outline1(
"SBC #$%2.2x", ( _destination & 0xff ) );
1064 outline1(
"CMP #$%2.2x", (
unsigned char)( _destination & 0xff ) );
1096 cpu_not_8bit( _environment, _destination, _destination );
1153 outline1(
"ADC #$%2.2x", ( _destination & 0xff ) );
1317 outline0(
"STA CPUMATHMUL8BITTO16BIT_SOURCE");
1319 outline0(
"STA CPUMATHMUL8BITTO16BIT_DESTINATION");
1320 outline0(
"JSR CPUMATHMUL8BITTO16BIT_SIGNED")
1321 outline0(
"LDA CPUMATHMUL8BITTO16BIT_OTHER");
1323 outline0(
"LDA CPUMATHMUL8BITTO16BIT_OTHER+1");
1327 outline0(
"STA CPUMATHMUL8BITTO16BIT_SOURCE");
1329 outline0(
"STA CPUMATHMUL8BITTO16BIT_DESTINATION");
1330 outline0(
"JSR CPUMATHMUL8BITTO16BIT")
1331 outline0(
"LDA CPUMATHMUL8BITTO16BIT_OTHER");
1333 outline0(
"LDA CPUMATHMUL8BITTO16BIT_OTHER+1");
1374 outline1(
"STA %s", _other_remainder );
1378 outline1(
"ROL %s", _other_remainder );
1379 outline1(
"LDA %s", _other_remainder );
1384 outline1(
"STY %s", _other_remainder );
1406 outline1(
"STA %s", _other_remainder );
1410 outline1(
"ROL %s", _other_remainder );
1411 outline1(
"LDA %s", _other_remainder );
1416 outline1(
"STY %s", _other_remainder );
1427 outline0(
"STA CPUMATHDIV8BITTO8BIT_SOURCE");
1429 outline0(
"STA CPUMATHDIV8BITTO8BIT_DESTINATION");
1430 outline0(
"JSR CPUMATHDIV8BITTO8BIT_SIGNED")
1431 outline0(
"LDA CPUMATHDIV8BITTO8BIT_OTHER");
1433 outline0(
"LDA CPUMATHDIV8BITTO8BIT_OTHER_REMAINDER");
1434 outline1(
"STA %s", _other_remainder);
1437 outline0(
"STA CPUMATHDIV8BITTO8BIT_SOURCE");
1439 outline0(
"STA CPUMATHDIV8BITTO8BIT_DESTINATION");
1440 outline0(
"JSR CPUMATHDIV8BITTO8BIT")
1441 outline0(
"LDA CPUMATHDIV8BITTO8BIT_OTHER");
1443 outline0(
"LDA CPUMATHDIV8BITTO8BIT_OTHER_REMAINDER");
1444 outline1(
"STA %s", _other_remainder);
1459 outline1(
"EOR #$%2.2x", _destination );
1471 outline1(
"LDA #$%2.2x", _destination );
1475 outline1(
"LDA #$%2.2x", _destination );
1484 outline1(
"STA %s", _other_remainder );
1488 outline1(
"ROL %s", _other_remainder );
1489 outline1(
"LDA %s", _other_remainder );
1494 outline1(
"STY %s", _other_remainder );
1516 outline1(
"STA %s", _other_remainder );
1520 outline1(
"ROL %s", _other_remainder );
1521 outline1(
"LDA %s", _other_remainder );
1523 outline1(
"SBC #$%2.2x", _destination );
1526 outline1(
"STY %s", _other_remainder );
1537 outline0(
"STA CPUMATHDIV8BITTO8BIT_SOURCE");
1538 outline1(
"LDA #$%2.2x", _destination);
1539 outline0(
"STA CPUMATHDIV8BITTO8BIT_DESTINATION");
1540 outline0(
"JSR CPUMATHDIV8BITTO8BIT_SIGNED")
1541 outline0(
"LDA CPUMATHDIV8BITTO8BIT_OTHER");
1543 outline0(
"LDA CPUMATHDIV8BITTO8BIT_OTHER_REMAINDER");
1544 outline1(
"STA %s", _other_remainder);
1547 outline0(
"STA CPUMATHDIV8BITTO8BIT_SOURCE");
1548 outline1(
"LDA #$%2.2x", _destination);
1549 outline0(
"STA CPUMATHDIV8BITTO8BIT_DESTINATION");
1550 outline0(
"JSR CPUMATHDIV8BITTO8BIT")
1551 outline0(
"LDA CPUMATHDIV8BITTO8BIT_OTHER");
1553 outline0(
"LDA CPUMATHDIV8BITTO8BIT_OTHER_REMAINDER");
1554 outline1(
"STA %s", _other_remainder);
1583 outline1(
"BEQ %snocomplement", label );
1585 outhead1(
"%snocomplement:", label );
1592 outline1(
"BEQ %snocomplement", label );
1594 outhead1(
"%snocomplement:", label );
1618 outline0(
"JSR CPUMATHDIV2CONST8BIT_SIGNED")
1623 outline0(
"JSR CPUMATHDIV2CONST8BIT")
1667 outline0(
"JSR CPUMATHMUL2CONST8BIT_SIGNED")
1672 outline0(
"JSR CPUMATHMUL2CONST8BIT")
1692 outline1(
"LDA #$%2.2x", ( _value & 0xff ) );
1712 outline1(
"AND #$%2.2x", (_mask & 0xff));
1767 outline1(
"LDA #$%2.2x", ( _value & 0xff ) );
1769 outline1(
"LDA #$%2.2x", ( ( _value >> 8 ) & 0xff ) );
1797 outline1(
"LDA #$%2.2x", ( _positive ) ? 0xff : 0x00 );
1805 outline1(
"LDA #$%2.2x", ( _positive ) ? 0x00 : 0xff );
1833 outline1(
"CMP #$%2.2x", (
unsigned char)( _destination & 0xff ) );
1836 outline1(
"CMP #$%2.2x", (
unsigned char)( ( _destination >> 8 ) & 0xff ) );
1838 outline1(
"LDA #$%2.2x", ( _positive ) ? 0xff : 0x00 );
1842 outline1(
"LDA #$%2.2x", ( _positive ) ? 0x00 : 0xff );
1892 outline1(
"CMP #$%2.2x", (
unsigned char)(( _destination >> 8 ) & 0xff ));
1895 outline1(
"CMP #$%2.2x", (
unsigned char)( _destination & 0xff ) );
2006 outline1(
"SBC #$%2.2x", ( ( _destination >> 8 ) & 0xff ) );
2016 outline1(
"SBC #$%2.2x", ( _destination & 0xff ) );
2031 outline1(
"CMP #$%2.2x", (
unsigned char)( ( _destination >> 8 ) & 0xff ) );
2037 outline1(
"CMP #$%2.2x", (
unsigned char)( _destination & 0xff ) );
2073 cpu_not_8bit( _environment, _destination, _destination );
2137 outline1(
"ADC #$%2.2x", ( _destination & 0xff ) );
2140 outline1(
"ADC #$%2.2x", ( ( _destination >> 8 ) & 0xff ) );
2161 outline1(
"ADC #<%s", _destination);
2164 outline1(
"ADC #>%s", _destination);
2419 outline0(
"STA CPUMATHMUL16BITTO32BIT_SOURCE");
2421 outline0(
"STA CPUMATHMUL16BITTO32BIT_SOURCE+1");
2423 outline0(
"STA CPUMATHMUL16BITTO32BIT_DESTINATION");
2425 outline0(
"STA CPUMATHMUL16BITTO32BIT_DESTINATION+1");
2426 outline0(
"JSR CPUMATHMUL16BITTO32BIT_SIGNED");
2427 outline0(
"LDA CPUMATHMUL16BITTO32BIT_OTHER");
2429 outline0(
"LDA CPUMATHMUL16BITTO32BIT_OTHER+1");
2431 outline0(
"LDA CPUMATHMUL16BITTO32BIT_OTHER+2");
2433 outline0(
"LDA CPUMATHMUL16BITTO32BIT_OTHER+3");
2437 outline0(
"STA CPUMATHMUL16BITTO32BIT_SOURCE");
2439 outline0(
"STA CPUMATHMUL16BITTO32BIT_SOURCE+1");
2441 outline0(
"STA CPUMATHMUL16BITTO32BIT_DESTINATION");
2443 outline0(
"STA CPUMATHMUL16BITTO32BIT_DESTINATION+1");
2444 outline0(
"JSR CPUMATHMUL16BITTO32BIT");
2445 outline0(
"LDA CPUMATHMUL16BITTO32BIT_OTHER");
2447 outline0(
"LDA CPUMATHMUL16BITTO32BIT_OTHER+1");
2449 outline0(
"LDA CPUMATHMUL16BITTO32BIT_OTHER+2");
2451 outline0(
"LDA CPUMATHMUL16BITTO32BIT_OTHER+3");
2466 char destination[
MAX_TEMPORARY_STORAGE]; sprintf( destination,
"CPUMATHMULNBITTONBIT%d_DESTINATION", (_bits>>3));
2478 outhead2(
"CPUMATHMULNBITTONBIT%d_SOURCE: .RES %d", _bits>>3, _bits>>3 );
2479 outhead2(
"CPUMATHMULNBITTONBIT%d_DESTINATION: .RES %d", _bits>>3, _bits>>3 );
2480 outhead2(
"CPUMATHMULNBITTONBIT%d_OTHER: .RES %d", _bits>>3, _bits>>3 );
2482 outhead1(
"CPUMATHMULNBITTONBIT%d:", _bits>>3);
2484 for( i=0; i<(_bits>>3); ++i ) {
2490 outhead1(
"CPUMATHMULNBITTONBIT%dL1:", _bits>>3);
2504 char multiplyByBit0Label[
MAX_TEMPORARY_STORAGE]; sprintf( multiplyByBit0Label,
"%sb%dbit0", label, _bits>>3 );
2509 for( i=(_bits>>3)-2; i>-1; --i ) {
2510 sprintf(
offset,
"%d", i );
2513 outline1(
"BCS %sx", multiplyByBit0Label );
2514 outline1(
"JMP %s", multiplyByBit0Label );
2515 outhead1(
"%sx:", multiplyByBit0Label );
2521 for( i=0; i<(_bits>>3); ++i ) {
2522 sprintf(
offset,
"%d", i );
2531 outhead1(
"%s:", multiplyByBit0Label);
2535 for( i=1; i<(_bits>>3); ++i ) {
2536 sprintf(
offset,
"%d", i );
2545 outline1(
"BEQ CPUMATHMULNBITTONBIT%dL1x", (_bits>>3) );
2546 outline1(
"JMP CPUMATHMULNBITTONBIT%dL1", (_bits>>3) );
2547 outhead1(
"CPUMATHMULNBITTONBIT%dL1x:", (_bits>>3) );
2560 for( i=0; i<(_bits>>3); ++i ) {
2567 outline1(
"JSR CPUMATHMULNBITTONBIT%d", _bits >> 3 );
2568 for( i=0; i<(_bits>>3); ++i ) {
2654 outline1(
"STA %s", _other_remainder );
2660 outline1(
"ROL %s", _other_remainder );
2662 outline1(
"LDA %s", _other_remainder );
2670 outline1(
"STY %s", _other_remainder );
2701 outline1(
"STA %s", _other_remainder );
2707 outline1(
"ROL %s", _other_remainder );
2709 outline1(
"LDA %s", _other_remainder );
2717 outline1(
"STY %s", _other_remainder );
2728 outline0(
"STA CPUMATHDIV16BITTO16BIT_SOURCE");
2730 outline0(
"STA CPUMATHDIV16BITTO16BIT_SOURCE+1");
2732 outline0(
"STA CPUMATHDIV16BITTO16BIT_DESTINATION");
2734 outline0(
"STA CPUMATHDIV16BITTO16BIT_DESTINATION+1");
2735 outline0(
"JSR CPUMATHDIV16BITTO16BIT_SIGNED");
2736 outline0(
"LDA CPUMATHDIV16BITTO16BIT_OTHER");
2738 outline0(
"LDA CPUMATHDIV16BITTO16BIT_OTHER+1");
2740 outline0(
"LDA CPUMATHDIV16BITTO16BIT_OTHER_REMAINDER");
2741 outline1(
"STA %s", _other_remainder );
2742 outline0(
"LDA CPUMATHDIV16BITTO16BIT_OTHER_REMAINDER+1");
2746 outline0(
"STA CPUMATHDIV16BITTO16BIT_SOURCE");
2748 outline0(
"STA CPUMATHDIV16BITTO16BIT_SOURCE+1");
2750 outline0(
"STA CPUMATHDIV16BITTO16BIT_DESTINATION");
2752 outline0(
"STA CPUMATHDIV16BITTO16BIT_DESTINATION+1");
2753 outline0(
"JSR CPUMATHDIV16BITTO16BIT");
2754 outline0(
"LDA CPUMATHDIV16BITTO16BIT_OTHER");
2756 outline0(
"LDA CPUMATHDIV16BITTO16BIT_OTHER+1");
2758 outline0(
"LDA CPUMATHDIV16BITTO16BIT_OTHER_REMAINDER");
2759 outline1(
"STA %s", _other_remainder );
2760 outline0(
"LDA CPUMATHDIV16BITTO16BIT_OTHER_REMAINDER+1");
2777 outline1(
"EOR #$%2.2x", (
unsigned char)((_destination>>8)&0xff) );
2807 outline1(
"LDA #$%2.2x", (
unsigned char)((_destination>>8)&0xff) );
2811 outline1(
"LDA #$%2.2x", (
unsigned char)((_destination)&0xff) );
2814 outline1(
"LDA #$%2.2x", (
unsigned char)((_destination>>8)&0xff) );
2826 outline1(
"LDA #$%2.2x", (
unsigned char)((_destination)&0xff) );
2828 outline1(
"LDA #$%2.2x", (
unsigned char)((_destination>>8)&0xff) );
2840 outline1(
"STA %s", _other_remainder );
2846 outline1(
"ROL %s", _other_remainder );
2848 outline1(
"LDA %s", _other_remainder );
2856 outline1(
"STY %s", _other_remainder );
2887 outline1(
"STA %s", _other_remainder );
2893 outline1(
"ROL %s", _other_remainder );
2895 outline1(
"LDA %s", _other_remainder );
2897 outline1(
"SBC #$%2.2x", (
unsigned char)((_destination)&0xff) );
2900 outline1(
"SBC #$%2.2x", (
unsigned char)((_destination>>8)&0xff) );
2903 outline1(
"STY %s", _other_remainder );
2914 outline0(
"STA CPUMATHDIV16BITTO16BIT_SOURCE");
2916 outline0(
"STA CPUMATHDIV16BITTO16BIT_SOURCE+1");
2917 outline1(
"LDA #$%2.2x", (
unsigned char)((_destination)&0xff) );
2918 outline0(
"STA CPUMATHDIV16BITTO16BIT_DESTINATION");
2919 outline1(
"LDA #$%2.2x", (
unsigned char)((_destination>>8)&0xff) );
2920 outline0(
"STA CPUMATHDIV16BITTO16BIT_DESTINATION+1");
2921 outline0(
"JSR CPUMATHDIV16BITTO16BIT_SIGNED");
2922 outline0(
"LDA CPUMATHDIV16BITTO16BIT_OTHER");
2924 outline0(
"LDA CPUMATHDIV16BITTO16BIT_OTHER+1");
2926 outline0(
"LDA CPUMATHDIV16BITTO16BIT_OTHER_REMAINDER");
2927 outline1(
"STA %s", _other_remainder );
2928 outline0(
"LDA CPUMATHDIV16BITTO16BIT_OTHER_REMAINDER+1");
2932 outline0(
"STA CPUMATHDIV16BITTO16BIT_SOURCE");
2934 outline0(
"STA CPUMATHDIV16BITTO16BIT_SOURCE+1");
2935 outline1(
"LDA #$%2.2x", (
unsigned char)((_destination)&0xff) );
2936 outline0(
"STA CPUMATHDIV16BITTO16BIT_DESTINATION");
2937 outline1(
"LDA #$%2.2x", (
unsigned char)((_destination>>8)&0xff) );
2938 outline0(
"STA CPUMATHDIV16BITTO16BIT_DESTINATION+1");
2939 outline0(
"JSR CPUMATHDIV16BITTO16BIT");
2940 outline0(
"LDA CPUMATHDIV16BITTO16BIT_OTHER");
2942 outline0(
"LDA CPUMATHDIV16BITTO16BIT_OTHER+1");
2944 outline0(
"LDA CPUMATHDIV16BITTO16BIT_OTHER_REMAINDER");
2945 outline1(
"STA %s", _other_remainder );
2946 outline0(
"LDA CPUMATHDIV16BITTO16BIT_OTHER_REMAINDER+1");
3022 outline1(
"LDA #$%2.2x", ( _value & 0xff ) );
3025 outline1(
"LDA #$%2.2x", ( ( _value >> 8 ) & 0xff ) );
3055 outline1(
"BEQ %snocomplement", label );
3057 outhead1(
"%snocomplement:", label );
3068 outline1(
"BEQ %snocomplement2", label );
3070 outhead1(
"%snocomplement2:", label );
3141 outline1(
"AND #$%2.2x", (_mask & 0xff ) );
3144 outline1(
"AND #$%2.2x", ((_mask>>8) & 0xff ));
3190 outline1(
"LDA #$%2.2x", ( _value & 0xff ) );
3192 outline1(
"LDA #$%2.2x", ( ( _value >> 8 ) & 0xff ) );
3194 outline1(
"LDA #$%2.2x", ( ( _value >> 16 ) & 0xff ) );
3196 outline1(
"LDA #$%2.2x", ( ( _value >> 24 ) & 0xff ) );
3270 outline1(
"STA %s", _other_remainder );
3279 outline1(
"BEQ %snocomplement", label );
3281 outhead1(
"%snocomplement:", label );
3294 outline0(
"JSR CPUMATHDIV32BITTO16BIT" );
3300 outline1(
"STA %s", _other_remainder );
3305 outline1(
"BEQ %snocomplement2", label );
3308 outhead1(
"%snocomplement2:", label );
3329 outline1(
"LDA #$%2.2x", (
unsigned char)((_destination)&0xff) );
3331 outline1(
"LDA #$%2.2x", (
unsigned char)((_destination>>8)&0xff) );
3381 outline1(
"STA %s", _other_remainder );
3390 outline1(
"BEQ %snocomplement", label );
3392 outhead1(
"%snocomplement:", label );
3401 outline1(
"LDA #$%2.2x", (
unsigned char)((_destination)&0xff) );
3403 outline1(
"LDA #$%2.2x", (
unsigned char)((_destination>>8)&0xff) );
3405 outline0(
"JSR CPUMATHDIV32BITTO16BIT" );
3411 outline1(
"STA %s", _other_remainder );
3415 outline1(
"BEQ %snocomplement2", label );
3418 outhead1(
"%snocomplement2:", label );
3437 char quotient[
MAX_TEMPORARY_STORAGE]; sprintf( quotient,
"CPUMATHDIVNBITTONBIT%d_QUOTIENT", _bits >> 3 );
3438 char divisor[
MAX_TEMPORARY_STORAGE]; sprintf( divisor,
"CPUMATHDIVNBITTONBIT%d_DIVISOR", _bits >> 3 );
3439 char dividend[
MAX_TEMPORARY_STORAGE]; sprintf( dividend,
"CPUMATHDIVNBITTONBIT%d_DIVIDEND", _bits >> 3 );
3440 char result1[
MAX_TEMPORARY_STORAGE]; sprintf( result1,
"CPUMATHDIVNBITTONBIT%d_RESULT1", _bits >> 3 );
3441 char result2[
MAX_TEMPORARY_STORAGE]; sprintf( result2,
"CPUMATHDIVNBITTONBIT%d_RESULT2", _bits >> 3 );
3446 cpu_jump( _environment, afterLabel );
3448 outhead2(
"%s: .RES %d", quotient, _bits>>3 );
3449 outhead2(
"%s: .RES %d", divisor, _bits>>3 );
3450 outhead2(
"%s: .RES %d", dividend, _bits>>3 );
3458 outhead1(
"CPUMATHDIVNBITTONBIT%d:", _bits>>3);
3460 for( i=0; i<(_bits>>3); ++i ) {
3473 cpu_and_8bit( _environment, result1, result2, result1 );
3513 cpu_jump( _environment, skip4Label );
3518 cpu_jump( _environment, skipLabel );
3529 for( i=0; i<(_bits>>3); ++i ) {
3536 outline1(
"JSR CPUMATHDIVNBITTONBIT%d", _bits>>3);
3538 for( i=0; i<(_bits>>3); ++i ) {
3567 cpu_jump( _environment, afterLabel );
3569 outhead2(
"%s: .RES %d", data, _bits>>3 );
3575 for( i=0; i<(_bits>>3); ++i ) {
3577 outline1(
"LDA #$%2.2x", (
unsigned char)( (_destination >> (i*8)) & 0xff ) );
3614 outline1(
"LDA #$%2.2x", 0xff*_positive);
3622 outline1(
"LDA #$%2.2x", 0xff*(1-_positive));
3640 for(
int i=0; i<(_bits>>3); ++i ) {
3648 outline1(
"LDA #$%2.2x", 0xff*_positive);
3656 outline1(
"LDA #$%2.2x", 0xff*(1-_positive));
3685 for( i=0; i<(_bits>>3); ++i ) {
3688 outline1(
"CMP #$%2.2x", (
unsigned char) ( ( _destination >> (i*8) ) & 0xff ) );
3691 outline1(
"LDA #$%2.2x", 0xff*_positive);
3695 outline1(
"LDA #$%2.2x", 0xff*(1-_positive));
3710 outline1(
"CMP #$%2.2x", (
unsigned char) ( _destination & 0xff ) );
3713 outline1(
"CMP #$%2.2x", (
unsigned char) ( ( _destination >> 8 ) & 0xff ) );
3716 outline1(
"CMP #$%2.2x", (
unsigned char) ( ( _destination >> 16 ) & 0xff ) );
3719 outline1(
"CMP #$%2.2x", (
unsigned char) ( ( _destination >> 24 ) & 0xff ) );
3721 outline1(
"LDA #$%2.2x", 0xff*_positive);
3725 outline1(
"LDA #$%2.2x", 0xff*(1-_positive));
3749 outline1(
"CMP #$%2.2x", (
unsigned char)( _destination >> 24 ) & 0xff );
3752 outline1(
"CMP #$%2.2x", (
unsigned char)( _destination >> 16 ) & 0xff );
3755 outline1(
"CMP #$%2.2x", (
unsigned char)( _destination >> 8 ) & 0xff );
3758 outline1(
"CMP #$%2.2x", (
unsigned char)( _destination & 0xff ) );
3916 outline1(
"CMP #$%2.2x", (
unsigned char)( _destination & 0xff ) );
3918 outline1(
"SBC #$%2.2x", (
unsigned char)( ( _destination >> 8 ) & 0xff ) );
3920 outline1(
"SBC #$%2.2x", (
unsigned char)( ( _destination >> 16 ) & 0xff ) );
3922 outline1(
"SBC #$%2.2x", (
unsigned char)( ( _destination >> 24 ) & 0xff ) );
3944 outline1(
"CMP #$%2.2x", (
unsigned char)( ( _destination >> 24 ) & 0xff ) );
3950 outline1(
"CMP #$%2.2x", (
unsigned char)( ( _destination >> 16 ) & 0xff ) );
3956 outline1(
"CMP #$%2.2x", (
unsigned char)( ( _destination >> 8 ) & 0xff ) );
3962 outline1(
"CMP #$%2.2x", (
unsigned char)( _destination & 0xff ) );
4006 for(
int i=1; i<(_bits>>3); ++i ) {
4066 for( i=0; i<(_bits>>3); ++i ) {
4069 outline1(
"CMP #$%2.2x", (
unsigned char)( ( _destination >> (i*8) ) & 0xff ) );
4111 cpu_not_8bit( _environment, _destination, _destination );
4137 cpu_not_8bit( _environment, _destination, _destination );
4207 outline1(
"ADC #$%2.2x", ( _destination & 0xff ) );
4210 outline1(
"ADC #$%2.2x", ( ( _destination >> 8 ) & 0xff ) );
4213 outline1(
"ADC #$%2.2x", ( ( _destination >> 16 ) & 0xff ) );
4216 outline1(
"ADC #$%2.2x", ( ( _destination >> 24 ) & 0xff ) );
4228 for(
int i=0; i<(_bits>>3); ++i ) {
4249 for( i=0; i<(_bits>>3); ++i ) {
4252 outline1(
"ADC #$%2.2x", (
unsigned char)( ( _destination >> (i*8) ) & 0xff ) );
4355 for(
int i=0; i<(_bits)>>3; ++i ) {
4382 outline1(
"LDA #$%2.2x", ( _value & 0xff ) );
4385 outline1(
"LDA #$%2.2x", ( ( _value >> 8 ) & 0xff ) );
4388 outline1(
"LDA #$%2.2x", ( ( _value >> 16 ) & 0xff ) );
4391 outline1(
"LDA #$%2.2x", ( ( _value >> 24 ) & 0xff ) );
4421 outline1(
"BEQ %snocomplement", label );
4423 outhead1(
"%snocomplement:", label );
4433 outline1(
"BEQ %snocomplement2", label );
4435 outhead1(
"%snocomplement2:", label );
4472 outline1(
"BNE %snocomplementx", label );
4473 outline1(
"JMP %snocomplement", label );
4474 outhead1(
"%snocomplementx:", label );
4476 outhead1(
"%snocomplement:", label );
4480 for(
int i=(_bits>>3)-2; i>-1; --i ) {
4487 outline1(
"BNE %snocomplement2x", label );
4488 outline1(
"JMP %snocomplement2", label );
4489 outhead1(
"%snocomplement2x:", label );
4491 outhead1(
"%snocomplement2:", label );
4551 for( i=1; i<(_bits>>3); ++i ) {
4577 outline1(
"AND #$%2.2x", (_mask & 0xff ) );
4580 outline1(
"AND #$%2.2x", ((_mask>>8) & 0xff ));
4583 outline1(
"AND #$%2.2x", ((_mask>>16) & 0xff ) );
4586 outline1(
"AND #$%2.2x", ((_mask>>24) & 0xff ));
4622 char destinationAddress[
MAX_TEMPORARY_STORAGE]; sprintf( destinationAddress,
"%s+%d", _destination, i*4 );
4625 case 1:
case 2:
case 3:
case 4:
4626 case 5:
case 6:
case 7:
case 8:
4627 cpu_move_8bit( _environment, sourceAddress, destinationAddress );
4629 case 9:
case 10:
case 11:
case 12:
4630 case 13:
case 14:
case 15:
case 16:
4631 cpu_move_8bit( _environment, sourceAddress, destinationAddress );
4632 sprintf( sourceAddress,
"%s+%d", _source, i*4+1 );
4633 sprintf( destinationAddress,
"%s+%d", _destination, i*4+1 );
4634 cpu_move_8bit( _environment, sourceAddress, destinationAddress );
4636 case 17:
case 18:
case 19:
case 20:
4637 case 21:
case 22:
case 23:
case 24:
4638 cpu_move_8bit( _environment, sourceAddress, destinationAddress );
4639 sprintf( sourceAddress,
"%s+%d", _source, i*4+1 );
4640 sprintf( destinationAddress,
"%s+%d", _destination, i*4+1 );
4641 cpu_move_8bit( _environment, sourceAddress, destinationAddress );
4642 sprintf( sourceAddress,
"%s+%d", _source, i*4+2 );
4643 sprintf( destinationAddress,
"%s+%d", _destination, i*4+2 );
4644 cpu_move_8bit( _environment, sourceAddress, destinationAddress );
4646 case 25:
case 26:
case 27:
case 28:
4647 case 29:
case 30:
case 31:
case 32:
4649 cpu_move_8bit( _environment, sourceAddress, destinationAddress );
4650 sprintf( sourceAddress,
"%s+%d", _source, i*4+1 );
4651 sprintf( destinationAddress,
"%s+%d", _destination, i*4+1 );
4652 cpu_move_8bit( _environment, sourceAddress, destinationAddress );
4653 sprintf( sourceAddress,
"%s+%d", _source, i*4+2 );
4654 sprintf( destinationAddress,
"%s+%d", _destination, i*4+2 );
4655 cpu_move_8bit( _environment, sourceAddress, destinationAddress );
4656 sprintf( sourceAddress,
"%s+%d", _source, i*4+3 );
4657 sprintf( destinationAddress,
"%s+%d", _destination, i*4+3 );
4658 cpu_move_8bit( _environment, sourceAddress, destinationAddress );
4663 cpu_move_8bit( _environment, sourceAddress, destinationAddress );
4664 sprintf( sourceAddress,
"%s+%d", _source, i*4+1 );
4665 sprintf( destinationAddress,
"%s+%d", _destination, i*4+1 );
4666 cpu_move_8bit( _environment, sourceAddress, destinationAddress );
4667 sprintf( sourceAddress,
"%s+%d", _source, i*4+2 );
4668 sprintf( destinationAddress,
"%s+%d", _destination, i*4+2 );
4669 cpu_move_8bit( _environment, sourceAddress, destinationAddress );
4670 sprintf( sourceAddress,
"%s+%d", _source, i*4+3 );
4671 sprintf( destinationAddress,
"%s+%d", _destination, i*4+3 );
4672 cpu_move_8bit( _environment, sourceAddress, destinationAddress );
4717 cpu_label( _environment, indirectLabel );
4728 cpu_call( _environment, indirectLabel );
4744 cpu_label( _environment, indirectLabel );
4755 cpu_jump( _environment, indirectLabel );
4767 if ( strcmp( _register,
"PC" ) == 0 ) {
4772 }
else if ( strcmp( _register,
"S" ) == 0 ) {
4777 }
else if ( strcmp( _register,
"A" ) == 0 ) {
4779 }
else if ( strcmp( _register,
"X" ) == 0 ) {
4781 }
else if ( strcmp( _register,
"Y" ) == 0 ) {
4783 }
else if ( strcmp( _register,
"XY" ) == 0 ) {
4785 }
else if ( strcmp( _register,
"YX" ) == 0 ) {
4787 }
else if ( strcmp( _register,
"CARRY" ) == 0 ) {
4791 char * comma = strchr( _register,
',' );
4793 for( i=0, c=strlen(_register); i<c; ++i ) {
4794 if ( !isdigit( _register[i] ) )
4802 for( i=0, c=strlen(_register); i<c; ++i ) {
4803 if ( !isdigit( _register[i] ) )
4832 outline1(
"LDA #$%2.2x", (
unsigned char)(_value & 0xff ) );
4835 outline1(
"LDX #$%2.2x", (
unsigned char)(_value & 0xff ) );
4838 outline1(
"LDY #$%2.2x", (
unsigned char)(_value & 0xff ) );
4841 outline1(
"LDY #$%2.2x", (
unsigned char)(_value & 0xff ) );
4842 outline1(
"LDX #$%2.2x", (
unsigned char)((_value>>8) & 0xff ) );
4845 outline1(
"LDX #$%2.2x", (
unsigned char)(_value & 0xff ) );
4846 outline1(
"LDY #$%2.2x", (
unsigned char)((_value>>8) & 0xff ) );
4849 outline1(
"LDY #$%2.2x", (
unsigned char)(_value & 0xff ) );
4850 outline1(
"LDX #$%2.2x", (
unsigned char)((_value>>8) & 0xff ) );
4851 outline1(
"LDA #$%2.2x", (
unsigned char)((_value>>16) & 0xff ) );
4871 outline1(
"LDA #$%2.2x", (
unsigned char)(_value & 0xff ) );
4872 outline1(
"STA #$%2.2x", (
unsigned char)(_asmio & 0xff ) );
4876 outline1(
"LDA #$%2.2x", (
unsigned char)(_value & 0xff ) );
4877 outline1(
"STA #$%2.2x", (
unsigned char)(_asmio & 0xff ) );
4878 outline1(
"LDA #$%2.2x", (
unsigned char)((_value>>8) & 0xff ) );
4879 outline1(
"STA #$%2.2x", (
unsigned char)((_asmio+1) & 0xff ) );
4889 outline1(
"LDA #$%2.2x", (
unsigned char)(_value & 0xff ) );
4893 outline1(
"LDA #$%2.2x", (
unsigned char)(_value & 0xff ) );
4895 outline1(
"LDA #$%2.2x", (
unsigned char)(( _value >> 8 ) & 0xff ) );
4899 outline1(
"LDA #$%2.2x", (
unsigned char)(_value & 0xff ) );
4901 outline1(
"LDA #$%2.2x", (
unsigned char)(( _value >> 8 ) & 0xff ) );
4903 outline1(
"LDA #$%2.2x", (
unsigned char)(( _value >> 16 ) & 0xff ) );
4905 outline1(
"LDA #$%2.2x", (
unsigned char)(( _value >> 24 ) & 0xff ) );
4970 outline1(
"STA #$%2.2x", (
unsigned char)(_asmio & 0xff ) );
4975 outline1(
"STA #$%2.2x", (
unsigned char)(_asmio & 0xff ) );
4977 outline1(
"STA #$%2.2x", (
unsigned char)((_asmio+1) & 0xff ) );
5077 outline1(
"LDA #$%2.2x", (
unsigned char)(_asmio & 0xff ) );
5082 outline1(
"LDA #$%2.2x", (
unsigned char)(_asmio & 0xff ) );
5084 outline1(
"LDA #$%2.2x", (
unsigned char)((_asmio+1) & 0xff ) );
5228 outline0(
"ADC CPURANDOM_ENTROPY" );
5229 outline0(
"STA CPURANDOM_ENTROPY" );
5249 outline0(
"ADC CPURANDOM_ENTROPY" );
5250 outline0(
"STA CPURANDOM_ENTROPY" );
5275 outline1(
"CMP #$%2.2x", (
unsigned char)(_value & 0xff ) );
5277 outline1(
"SBC #$%2.2x", (
unsigned char)(_value & 0xff ) );
5535 outline1(
"EOR #$%2.2x", (
unsigned char)(_right&0xff) );
5538 outline1(
"EOR #$%2.2x", (
unsigned char)((_right>>8)&0xff) );
5575 outline1(
"EOR #$%2.2x", (
unsigned char)(_right&0xff) );
5578 outline1(
"EOR #$%2.2x", (
unsigned char)((_right>>8)&0xff) );
5581 outline1(
"EOR #$%2.2x", (
unsigned char)((_right>>16)&0xff) );
5584 outline1(
"EOR #$%2.2x", (
unsigned char)((_right>>24)&0xff) );
5792 for(
int i=0; i<(_bits>>3);++i ) {
5862 for(
int i=0; i<(_bits>>3); ++i ) {
5964 outline1(
"LDA #>%s", _destination );
5966 outline1(
"LDA #<%s", _destination );
5988 outline1(
"LDA #>%s", _destination );
5990 outline1(
"LDA #<%s", _destination );
6004 outline1(
"LDA #$%2.2x", ( _size >> 8 ) & 0xff );
6006 outline1(
"LDA #$%2.2x", _size & 0xff );
6015 outline1(
"LDA #>%s", _destination );
6017 outline1(
"LDA #<%s", _destination );
6043 outline1(
"LDA #$%2.2x", ( _size >> 8 ) & 0xff );
6045 outline1(
"LDA #$%2.2x", _size & 0xff );
6051 outline1(
"LDA #>%s", _destination );
6053 outline1(
"LDA #<%s", _destination );
6078 outline1(
"LDA #>%s", _destination );
6080 outline1(
"LDA #<%s", _destination );
6114 outline1(
"LDA #>%s", _destination );
6116 outline1(
"LDA #<%s", _destination );
6145 outline1(
"CPY #$%2.2x", (_size & 0xff ) );
6152 outline1(
"LDX #$%2.2X", (_size & 0xff ) );
6154 outline1(
"LDX #$%2.2X", ( _size >> 8 ) & 0xff );
6179 if ( _size <= 0xff ) {
6186 outline1(
"LDA #>%s", _destination );
6188 outline1(
"LDA #<%s", _destination );
6194 outline1(
"CPY #$%2.2x", (_size & 0xff ) );
6205 outline1(
"LDA #>(%s)", _destination );
6207 outline1(
"LDA #<(%s)", _destination );
6230 outline1(
"CPX #$%2.2x", ( ( ( _size >> 8 ) & 0xff ) ) - 1 );
6239 outline1(
"CPY #$%2.2x", _size - ( ( ( ( _size >> 8 ) & 0xff ) ) ) * 0xff );
6248 outline1(
"LDX #$%2.2X", (_size & 0xff ) );
6250 outline1(
"LDX #$%2.2X", ( _size >> 8 ) & 0xff );
6256 outline1(
"LDA #>(%s)", _destination );
6258 outline1(
"LDA #<(%s)", _destination );
6276 if ( _size <= 0xff ) {
6291 outline1(
"CPY #$%2.2x", (_size & 0xff ) );
6327 outline1(
"CPX #$%2.2x", ( ( ( _size >> 8 ) & 0xff ) ) - 1 );
6336 outline1(
"CPY #$%2.2x", _size - ( ( ( ( _size >> 8 ) & 0xff ) ) ) * 0xff );
6345 outline1(
"LDX #$%2.2X", (_size & 0xff ) );
6347 outline1(
"LDX #$%2.2X", ( _size >> 8 ) & 0xff );
6377 outline1(
"LDX #$%2.2X", (_size & 0xff ) );
6379 outline1(
"LDX #$%2.2X", ( _size >> 8 ) & 0xff );
6385 outline1(
"LDA #>%s", _destination );
6387 outline1(
"LDA #<%s", _destination );
6422 outline1(
"LDA #%d", _equal ? 255 : 0 );
6426 outline1(
"LDA #%d", _equal ? 0 : 255 );
6456 outline1(
"LDA #%d", _equal ? 255 : 0 );
6460 outline1(
"LDA #%d", _equal ? 0 : 255 );
6638 inline( cpu_move_8bit_with_offset )
6647 outline1(
"LDY #$%2.2x", (_offset & 0xff ) );
6826 sprintf( step,
"%d", stepIndex );
6827 sprintf( step1,
"%d", stepIndex+1 );
6828 sprintf( step2,
"%d", stepIndex+2 );
6829 sprintf( step3,
"%d", stepIndex+3 );
6832 outline1(
"LDY #$%2.2x", stepIndex );
6835 outline1(
"LDY #$%2.2x", stepIndex + 1 );
6838 outline1(
"LDY #$%2.2x", stepIndex + 2 );
6841 outline1(
"LDY #$%2.2x", stepIndex + 3 );
6847 case 32:
case 31:
case 30:
case 29:
6848 case 28:
case 27:
case 26:
case 25:
6850 outline1(
"LDY #$%2.2x", stepIndex );
6853 outline1(
"LDY #$%2.2x", stepIndex + 1 );
6856 outline1(
"LDY #$%2.2x", stepIndex + 2 );
6859 outline1(
"LDY #$%2.2x", stepIndex + 3 );
6862 case 24:
case 23:
case 22:
case 21:
6863 case 20:
case 19:
case 18:
case 17:
6865 outline1(
"LDY #$%2.2x", stepIndex );
6868 outline1(
"LDY #$%2.2x", stepIndex + 1 );
6871 outline1(
"LDY #$%2.2x", stepIndex + 2 );
6874 case 16:
case 15:
case 14:
case 13:
6875 case 12:
case 11:
case 10:
case 9:
6877 outline1(
"LDY #$%2.2x", stepIndex );
6880 outline1(
"LDY #$%2.2x", stepIndex + 1 );
6883 case 8:
case 7:
case 6:
case 5:
6884 case 4:
case 3:
case 2:
case 1:
6886 outline1(
"LDY #$%2.2x", stepIndex );
6909 sprintf( step,
"%d", stepIndex );
6910 sprintf( step1,
"%d", stepIndex+1 );
6911 sprintf( step2,
"%d", stepIndex+2 );
6912 sprintf( step3,
"%d", stepIndex+3 );
6914 outline1(
"LDY #$%2.2x", stepIndex );
6917 outline1(
"LDY #$%2.2x", stepIndex + 1 );
6920 outline1(
"LDY #$%2.2x", stepIndex + 2 );
6923 outline1(
"LDY #$%2.2x", stepIndex + 3 );
6930 case 32:
case 31:
case 30:
case 29:
6931 case 28:
case 27:
case 26:
case 25:
6932 outline1(
"LDY #$%2.2x", stepIndex );
6935 outline1(
"LDY #$%2.2x", stepIndex + 1 );
6938 outline1(
"LDY #$%2.2x", stepIndex + 2 );
6941 outline1(
"LDY #$%2.2x", stepIndex + 3 );
6945 case 24:
case 23:
case 22:
case 21:
6946 case 20:
case 19:
case 18:
case 17:
6947 outline1(
"LDY #$%2.2x", stepIndex );
6950 outline1(
"LDY #$%2.2x", stepIndex + 1 );
6953 outline1(
"LDY #$%2.2x", stepIndex + 2 );
6957 case 16:
case 15:
case 14:
case 13:
6958 case 12:
case 11:
case 10:
case 9:
6959 outline1(
"LDY #$%2.2x", stepIndex );
6962 outline1(
"LDY #$%2.2x", stepIndex + 1 );
6966 case 8:
case 7:
case 6:
case 5:
6967 case 4:
case 3:
case 2:
case 1:
6968 outline1(
"LDY #$%2.2x", stepIndex );
7155 outline0(
"JSR CPUCONVERTSTRINGINTO16BIT" );
7156 outline0(
"LDA CPUCONVERTSTRINGINTO16BIT_VALUE" );
7234 outline0(
"JSR CPUCONVERTSTRINGINTO16BIT" );
7235 outline0(
"LDA CPUCONVERTSTRINGINTO16BIT_VALUE" );
7237 outline0(
"LDA CPUCONVERTSTRINGINTO16BIT_VALUE+1" );
7256 if ( _size_size >= 16 ) {
7274 if ( _size_size >= 16 ) {
7293 if ( _destination ) {
7336 outline1(
"LDA #$%2.2x", _position );
7337 outline0(
"JSR CPUBITCHECKEXTENDED" );
7360 outline0(
"JSR CPUBITCHECKEXTENDED" );
7397 outline1(
"LDA #$%2.2x", _position);
7450 outline1(
"LDA #$%2.2x", _bits >> 3 );
7513 outline0(
"STA CPUMATHMUL8BITTO16BIT_SOURCE");
7514 outline1(
"LDA #$%2.2x", 2+(_separator?1:0));
7515 outline0(
"STA CPUMATHMUL8BITTO16BIT_DESTINATION");
7516 outline0(
"JSR CPUMATHMUL8BITTO16BIT")
7517 outline0(
"LDA CPUMATHMUL8BITTO16BIT_OTHER");
7528 outline1(
"LDA #$%2.2x", (
unsigned char)(_size & 0xff));
7529 outline0(
"STA CPUMATHMUL8BITTO16BIT_SOURCE");
7530 outline1(
"LDA #$%2.2x", 2+(_separator?1:0));
7531 outline0(
"STA CPUMATHMUL8BITTO16BIT_DESTINATION");
7532 outline0(
"JSR CPUMATHMUL8BITTO16BIT")
7533 outline0(
"LDA CPUMATHMUL8BITTO16BIT_OTHER");
7546 outline1(
"LDY #$%2.2x", (
unsigned char)( _separator * 3 ) );
7638 outline1(
"LDA #$%2.2x", _resize );
7667 if ( _address || _size ) {
7714 outline1(
"LDA #<%s", _destination);
7716 outline1(
"LDA #>%s", _destination);
7726 outline1(
"LDA #<%s", _destination);
7728 outline1(
"LDA #>%s", _destination);
7738 if ( _destination ) {
7739 outline1(
"STA %s", _destination );
7743 if ( _destination ) {
7744 cpu_inc( _environment, _destination );
7746 cpu_inc( _environment, _source );
7753 if ( _destination ) {
7754 outline1(
"STA %s", _destination );
7760 if ( _destination ) {
7765 if ( _destination ) {
7775 if ( _destination ) {
7776 outline1(
"STA %s", _destination );
7782 if ( _destination ) {
7789 if ( _destination ) {
7796 if ( _destination ) {
7801 if ( _destination ) {
7811 for(
int i=0; i<(_bits>>3); ++i ) {
7815 if ( _destination ) {
7821 if ( _destination ) {
7849 if ( actual->
size > _space ) {
7850 outhead1(
".segment \"MA%3.3x\"",
id );
7851 actual->
size -= _space;
7854 actual = actual->
next;
7865 outhead1(
"stringscount = %d", count );
7866 outhead1(
"stringsspace = %d", space );
7867 outhead0(
"MAXSTRINGS: .BYTE stringscount" );
7871 outhead0(
"DESCRIPTORS_STATUS: .RES stringscount,0" );
7875 outhead0(
"DESCRIPTORS_ADDRESS_LO: .RES stringscount,0" );
7879 outhead0(
"DESCRIPTORS_ADDRESS_HI: .RES stringscount,0" );
7883 outhead0(
"DESCRIPTORS_SIZE: .RES stringscount,0" );
7887 outhead0(
"WORKING: .RES stringsspace,0" );
7891 outhead0(
"TEMPORARY: .RES stringsspace,0" );
7895 outhead0(
"FREE_STRING: .WORD (stringsspace-1)" );
7905 outhead1(
"PROTOTHREADLC: .RES %d,0", count );
7906 outhead1(
"PROTOTHREADST: .RES %d,0", count );
7907 outhead0(
"PROTOTHREADCT: .BYTE 0" );
7910 for(
int i=0; i<count; ++i ) {
7984 outline0(
"JSR PROTOTHREADRESTORE" );
7997 outline0(
"JSR PROTOTHREADSETSTATE" );
8007 outline0(
"JSR PROTOTHREADGETSTATE" );
8028 outline0(
"JSR PROTOTHREADGETADDRESS" );
8056 inline( cpu_msc1_uncompress )
8079 inline( cpu_msc1_uncompress )
8102 inline( cpu_msc1_uncompress )
8125 inline( cpu_msc1_uncompress )
8160void cpu_string_sub(
Environment * _environment,
char * _source,
char * _source_size,
char * _pattern,
char * _pattern_size,
char * _destination,
char * _destination_size ) {
8188 outline1(
"STA %s", _destination_size);
8193static char cpu_BLIT_REGISTER[][9] = {
8200#define cpu_BLIT_REGISTER_COUNT ( sizeof( cpu_BLIT_REGISTER ) / 9 )
8219 return &cpu_BLIT_REGISTER[_register][0];
8221 return &cpu_BLIT_REGISTER[ (_register & 0xff00) >> 8][0];
8230 int registerMask = ( 0x01 << reg );
8232 if ( ! isRegisterUsed ) {
8241 if ( location > 0xff ) {
8246 int registerMask = ( 0x10 << reg );
8248 if ( ! isRegisterUsed ) {
8249 outline1(
"LDA %s", &cpu_BLIT_REGISTER[reg][0] );
8253 return ( ( (reg+1) << 8 ) | location );
8265 int location = _register & 0xff;
8269 int registerMask = ( 0x01 << _register );
8271 if ( isRegisterUsed ) {
8278 int registerMask = 0x10 << ( ( ( _register >> 8 ) & 0xff ) - 1 );
8280 if ( isRegisterUsed ) {
8282 outline1(
"LDA %s", &cpu_BLIT_REGISTER[reg][0] );
8304 char destinationAddress[
MAX_TEMPORARY_STORAGE]; sprintf( destinationAddress,
"%s+%d", _destination, i*4 );
8307 case 1:
case 2:
case 3:
case 4:
8308 case 5:
case 6:
case 7:
case 8:
8309 cpu_store_8bit( _environment, destinationAddress, ( _value[(i*4)] & (0xff>>(8-_n)) ) );
8311 case 9:
case 10:
case 11:
case 12:
8312 case 13:
case 14:
case 15:
case 16:
8313 cpu_store_8bit( _environment, destinationAddress, ( _value[(i*4)] & (0xff) ) );
8314 sprintf( destinationAddress,
"%s+%d", _destination, i*4+1 );
8315 cpu_store_8bit( _environment, destinationAddress, ( _value[(i*4)+1] & (0xff>>(16-_n)) ) );
8317 case 17:
case 18:
case 19:
case 20:
8318 case 21:
case 22:
case 23:
case 24:
8319 cpu_store_8bit( _environment, destinationAddress, ( _value[(i*4)] & (0xff) ) );
8320 sprintf( destinationAddress,
"%s+%d", _destination, i*4+1 );
8321 cpu_store_8bit( _environment, destinationAddress, ( _value[(i*4)+1] & (0xff) ) );
8322 sprintf( destinationAddress,
"%s+%d", _destination, i*4+2 );
8323 cpu_store_8bit( _environment, destinationAddress, ( _value[(i*4)+2] & (0xff>>(24-_n)) ) );
8325 case 25:
case 26:
case 27:
case 28:
8326 case 29:
case 30:
case 31:
case 32:
8328 cpu_store_8bit( _environment, destinationAddress, ( _value[(i*4)] & (0xff) ) );
8329 sprintf( destinationAddress,
"%s+%d", _destination, i*4+1 );
8330 cpu_store_8bit( _environment, destinationAddress, ( _value[(i*4)+1] & (0xff) ) );
8331 sprintf( destinationAddress,
"%s+%d", _destination, i*4+2 );
8332 cpu_store_8bit( _environment, destinationAddress, ( _value[(i*4)+2] & (0xff) ) );
8333 sprintf( destinationAddress,
"%s+%d", _destination, i*4+3 );
8334 cpu_store_8bit( _environment, destinationAddress, ( _value[(i*4)+3] & (0xff>>(32-_n)) ) );
8339 cpu_store_8bit( _environment, destinationAddress, ( _value[(i*4)] & (0xff) ) );
8340 sprintf( destinationAddress,
"%s+%d", _destination, i*4+1 );
8341 cpu_store_8bit( _environment, destinationAddress, ( _value[(i*4)+1] & (0xff) ) );
8342 sprintf( destinationAddress,
"%s+%d", _destination, i*4+2 );
8343 cpu_store_8bit( _environment, destinationAddress, ( _value[(i*4)+2] & (0xff) ) );
8344 sprintf( destinationAddress,
"%s+%d", _destination, i*4+3 );
8345 cpu_store_8bit( _environment, destinationAddress, ( _value[(i*4)+3] & (0xff>>(32-_n)) ) );
8368 double integral = 0.0;
8369 double fractional = 0.0;
8375 int mantissa_bits = 23;
8376 int mantissaScaled = 0;
8380 memset( &_result[0], 0,
sizeof(
int ) * 4 );
8381 memset( &right[0], 0,
sizeof(
int ) * 3 );
8383 if ( _value != 0.0 ) {
8390 if ( _value >= 0 ) {
8396 value = fabs( _value );
8405 fractional = modf(value, &integral);
8407 left = (
unsigned int) integral;
8430 if ( fractional != 0.0 ) {
8432 if ( fractional != 1.0 ) {
8454 while( ( fractional != 1.0 ) && ( steps < mantissa_bits ) ) {
8456 fractional = fractional * 2;
8458 if ( fractional != 1.0 ) {
8460 if ( fractional > 1.0 ) {
8462 fractional = modf(fractional, &integral);
8473 right[2] = right[2] << 1;
8474 right[1] = right[1] << 1;
8475 right[0] = right[0] << 1;
8476 if ( ( right[2] & 0x100 ) ) {
8477 right[1] = right[1] | 0x1;
8479 if ( ( right[1] & 0x100 ) ) {
8480 right[0] = right[0] | 0x1;
8482 right[2] = right[2] & 0xff;
8483 right[1] = right[1] & 0xff;
8484 right[0] = right[0] & 0xff;
8516 int mantissa_high_bit = 0x80000000 >> ( 32 - mantissa_bits);
8517 int mantissa_mask = 0xffffffff >> ( 32 - mantissa_bits);
8521 if ( value != 0 && !mantissaScaled ) {
8523 while( left == 0 ) {
8529 if ( ! right[0] && ! right[1] && ! right[2] ) {
8533 if ( right[0] & 0x80 ) {
8537 right[0] = right[0] << 1;
8538 right[1] = right[1] << 1;
8539 right[2] = right[2] << 1;
8540 if ( ( right[1] & 0x100 )) {
8541 right[0] = right[0] | 0x1;
8543 if ( ( right[2] & 0x100 )) {
8544 right[1] = right[1] | 0x1;
8546 right[0] = right[0] & 0xff;
8547 right[1] = right[1] & 0xff;
8548 right[2] = right[2] & 0xff;
8569 if ( ( right[0] & 0x01 ) ) {
8570 right[1] = right[1] | 0x100;
8572 if ( ( right[1] & 0x01 ) ) {
8573 right[2] = right[2] | 0x100;
8575 right[0] = right[0] >> 1;
8576 right[1] = right[1] >> 1;
8577 right[2] = right[2] >> 1;
8581 if ( ( left & 0x1 ) ) {
8582 right[0] = right[0] | 0x80;
8604 if ( ( right[0] & 0x01 ) ) {
8605 right[1] = right[1] | 0x100;
8607 if ( ( right[1] & 0x01 ) ) {
8608 right[2] = right[2] | 0x100;
8610 right[0] = right[0] >> 1;
8611 right[1] = right[1] >> 1;
8612 right[2] = right[2] >> 1;
8613 if ( ( left & 0x1 ) ) {
8614 right[0] = right[0] | 0x80;
8628 if ( integral == 1.0 && !
sign ) {
8694 _result[1] = ( (
sign & 0x01 ) << 7 ) | ( right[0] >> 1 );
8695 _result[2] = ( ( right[0] & 0x01 ) << 7 ) | ( right[1] >> 1 );
8696 _result[3] = ( ( right[1] & 0x01 ) << 7 ) | ( right[2] >> 1 );
8715 int sign = ( ( _value[1] & 0x80 ) ? -1 : 1 );
8720 int exp = _value[0] & 0xff;
8725 int mantissa = ( (( _value[1] & 0x7f ) << 16) | (_value[2] << 8 ) | _value[3] ) << 1;
8731 if ( mantissa == 0 ) {
8732 *_result = 2.0 *
sign;
8734 *_result = 1.0 *
sign;
8739 for(
int i=0; i<24; ++i ) {
8743 if ( mantissa & 0x400000 ) {
8744 *_result += (
sign * step);
8748 mantissa = mantissa & 0x3fffff;
8749 mantissa = mantissa << 1;
8754 for(
int i=0; i<exp; ++i ) {
8756 *_result = *_result * 2;
8760 }
else if ( exp < 0 ) {
8764 for(
int i=0; i<exp; ++i ) {
8766 *_result = *_result / 2;
8803 outline1(
"STA %s", _string_size );
9286 for(
int i=0; i<_count; ++i ) {
9287 outline2(
".word $%4.4x, %s", _values[i], _address[i] );
9304 outline1(
"BNE LOOKFOR%sNEXT3", _table );
9308 outline1(
"BNE LOOKFOR%sNEXT2", _table );
9316 outhead1(
"LOOKFOR%sNEXT3:", _table );
9318 outhead1(
"LOOKFOR%sNEXT2:", _table );
9321 outline1(
"CPY #$%2.2x", (_count+1) * 4 );
9322 outline1(
"BNE LOOKFOR%sL1", _table );
9334 outline1(
"JSR LOOKFOR%s", _table );
9571void cpu_encrypt(
Environment * _environment,
char * _data,
char * _data_size,
char * _key,
char * _key_size,
char * _output ) {
9595void cpu_decrypt(
Environment * _environment,
char * _data,
char * _data_size,
char * _key,
char * _key_size,
char * _output,
char * _result ) {
9621void cpu_hex_to_bin(
Environment * _environment,
char * _value_address,
char * _value_size,
char * _variable_address,
char * _variable_size,
char * _result ) {
9625 outline1(
"LDA %s", _value_address );
9629 outline1(
"LDA %s", _variable_address );
9634 outline1(
"LDY %s", _variable_size );
9657 outline1(
"LDA #$%2.2x", (
unsigned char)(_value&0xff) );
void cpu_move_32bit_indirect2(Environment *_environment, char *_value, char *_source)
void cpu_less_than_memory_size(Environment *_environment, char *_source, char *_destination, int _size, char *_result, int _equal)
void cpu_combine_nibbles(Environment *_environment, char *_low_nibble, char *_hi_nibble, char *_byte)
void cpu_di(Environment *_environment)
void cpu_math_double_32bit(Environment *_environment, char *_source, char *_other, int _signed)
CPU 6309: emit code to double a 32 bit value
void cpu_not_16bit(Environment *_environment, char *_value, char *_result)
void cpu_math_mul2_const_16bit(Environment *_environment, char *_source, int _steps, int _signed)
CPU 6309: emit code to halves for several times a 8 bit value
void cpu_math_div_16bit_to_16bit(Environment *_environment, char *_source, char *_destination, char *_other, char *_other_remainder, int _signed)
void cpu_math_mul_16bit_to_32bit(Environment *_environment, char *_source, char *_destination, char *_other, int _signed)
CPU 6309: emit code to multiply two 16 bit values in a 32 bit register
void cpu_bveq(Environment *_environment, char *_value, char *_label)
void cpu_bit_check_extended(Environment *_environment, char *_value, char *_position, char *_result, int _bitwidth)
void cpu_math_div_32bit_to_16bit(Environment *_environment, char *_source, char *_destination, char *_other, char *_other_remainder, int _signed)
void cpu_math_mul2_const_8bit(Environment *_environment, char *_source, int _steps, int _signed)
CPU 6309: emit code to double for several times a 8 bit value
void cpu_math_mul2_const_32bit(Environment *_environment, char *_source, int _steps, int _signed)
CPU 6309: emit code to double for several times a 32 bit value
void cpu_uppercase(Environment *_environment, char *_source, char *_size, char *_result)
void cpu_math_add_16bit_with_8bit(Environment *_environment, char *_source, char *_destination, char *_other)
void cpu_mem_move(Environment *_environment, char *_source, char *_destination, char *_size)
void cpu_math_add_32bit(Environment *_environment, char *_source, char *_destination, char *_other)
CPU 6309: emit code to add two 32 bit values
void cpu_store_char(Environment *_environment, char *_destination, int _value)
CPU 6309: emit code to store 8 bit
void cpu_math_complement_const_32bit(Environment *_environment, char *_source, int _value)
CPU 6309: emit code to calculate a 32 bit complement of a number
void cpu_store_16bit(Environment *_environment, char *_destination, int _value)
CPU 6309: emit code to store 16 bit
void cpu_and_8bit_const(Environment *_environment, char *_left, int _right, char *_result)
void cpu_math_double_16bit(Environment *_environment, char *_source, char *_other, int _signed)
CPU 6309: emit code to double a 16 bit value
void cpu_math_sub_32bit(Environment *_environment, char *_source, char *_destination, char *_other)
CPU 6309: emit code to subtract two 32 bit values
void cpu_math_div2_const_8bit(Environment *_environment, char *_source, int _steps, int _signed, char *_remainder)
CPU 6309: emit code to halves for several times a 8 bit value
void cpu_less_than_memory(Environment *_environment, char *_source, char *_destination, char *_size, char *_result, int _equal)
void cpu_math_div_nbit_to_nbit(Environment *_environment, char *_source, char *_destination, char *_other, char *_other_remainder, int _bits)
void cpu_math_add_8bit(Environment *_environment, char *_source, char *_destination, char *_other)
CPU 6309: emit code to add two 8 bit values
void cpu_move_8bit_indirect(Environment *_environment, char *_source, char *_value)
void cpu_string_sub(Environment *_environment, char *_source, char *_source_size, char *_pattern, char *_pattern_size, char *_destination, char *_destination_size)
void cpu_compare_8bit(Environment *_environment, char *_source, char *_destination, char *_other, int _positive)
CPU 6309: emit code to compare two 8 bit values
void cpu_math_and_const_32bit(Environment *_environment, char *_source, int _mask)
CPU 6309: emit code to mask with "and" a value of 32 bit
void cpu_dec_16bit(Environment *_environment, char *_variable)
void cpu_inc(Environment *_environment, char *_variable)
void cpu_jump_indirect(Environment *_environment, char *_value)
void cpu_math_complement_const_8bit(Environment *_environment, char *_source, int _value)
CPU 6309: emit code to calculate an 8 bit complement of a number
void cpu_math_complement_const_16bit(Environment *_environment, char *_source, int _value)
CPU 6309: emit code to calculate a 16 bit complement of a number
void cpu_math_mul2_const_nbit(Environment *_environment, char *_source, int _steps, int _bits)
void cpu_move_32bit(Environment *_environment, char *_source, char *_destination)
CPU 6309: emit code to move 32 bit
void cpu_less_than_8bit(Environment *_environment, char *_source, char *_destination, char *_other, int _equal, int _signed)
CPU 6309: emit code to compare two 8 bit values
#define cpu_BLIT_REGISTER_COUNT
void cpu_dec_32bit(Environment *_environment, char *_variable)
void cpu_math_add_16bit(Environment *_environment, char *_source, char *_destination, char *_other)
CPU 6309: emit code to add two 16 bit values
void cpu_greater_than_16bit(Environment *_environment, char *_source, char *_destination, char *_other, int _equal, int _signed)
CPU 6309: emit code to compare two 8 bit values
void cpu_math_add_16bit_const(Environment *_environment, char *_source, int _destination, char *_other)
void cpu_protothread_vars(Environment *_environment)
void cpu_math_add_16bit_with_16bit(Environment *_environment, char *_source, char *_destination, char *_other)
CPU 6309: emit code to add two 16 bit values
void cpu_compare_and_branch_16bit_const(Environment *_environment, char *_source, int _destination, char *_label, int _positive)
CPU 6309: emit code to compare two 8 bit values and jump if they are equal/different
void cpu_move_32bit_indirect(Environment *_environment, char *_source, char *_value)
void cpu_greater_than_8bit(Environment *_environment, char *_source, char *_destination, char *_other, int _equal, int _signed)
CPU 6309: emit code to compare two 8 bit values
void cpu_or_16bit(Environment *_environment, char *_left, char *_right, char *_result)
void cpu_fill(Environment *_environment, char *_address, char *_bytes, int _bytes_width, char *_pattern)
CPU 6309: emit code to fill up a memory area
void cpu_move_16bit_indirect(Environment *_environment, char *_source, char *_value)
void cpu_limit_16bit(Environment *_environment, char *_variable, int _value)
void cpu_move_8bit_indirect_with_offset2(Environment *_environment, char *_source, char *_value, char *_offset)
void cpu_less_than_32bit_const(Environment *_environment, char *_source, int _destination, char *_other, int _equal, int _signed)
void cpu_and_8bit(Environment *_environment, char *_left, char *_right, char *_result)
void cpu_math_mul_8bit_to_16bit(Environment *_environment, char *_source, char *_destination, char *_other, int _signed)
CPU 6309: emit code to multiply two 8bit values in a 16 bit register
void cpu_math_sub_16bit(Environment *_environment, char *_source, char *_destination, char *_other)
CPU 6309: emit code to subtract two 16 bit values
void cpu_compare_and_branch_32bit_const(Environment *_environment, char *_source, int _destination, char *_label, int _positive)
CPU 6309: emit code to compare two 32 bit values and jump if they are equal/different
void cpu_math_and_const_16bit(Environment *_environment, char *_source, int _mask)
CPU 6309: emit code to mask with "and" a value of 16 bit
void cpu_move_8bit_indirect2_8bit(Environment *_environment, char *_value, char *_offset, char *_source)
void cpu_compare_and_branch_char_const(Environment *_environment, char *_source, int _destination, char *_label, int _positive)
CPU 6309: emit code to compare two 8 bit values and jump if they are equal/different
void cpu_less_than_nbit_const(Environment *_environment, char *_source, int _destination, char *_other, int _equal, int _bits)
void cpu_label(Environment *_environment, char *_label)
void cpu_dec(Environment *_environment, char *_variable)
void cpu_and_16bit(Environment *_environment, char *_left, char *_right, char *_result)
void cpu_logical_not_8bit(Environment *_environment, char *_value, char *_result)
void cpu_logical_and_8bit(Environment *_environment, char *_left, char *_right, char *_result)
void cpu_or_8bit_const(Environment *_environment, char *_left, int _right, char *_result)
void cpu_math_div2_const_32bit(Environment *_environment, char *_source, int _steps, int _signed, char *_remainder)
CPU 6309: emit code to halves for several times a 32 bit value
void cpu_halt(Environment *_environment)
void cpu_end(Environment *_environment)
void cpu_compare_memory(Environment *_environment, char *_source, char *_destination, char *_size, char *_result, int _equal)
void cpu_xor_8bit(Environment *_environment, char *_left, char *_right, char *_result)
void cpu_lowercase(Environment *_environment, char *_source, char *_size, char *_result)
void cpu_move_16bit(Environment *_environment, char *_source, char *_destination)
CPU 6309: emit code to move 16 bit
void cpu_move_8bit_with_offset2(Environment *_environment, char *_source, char *_value, char *_offset)
void cpu_bneq(Environment *_environment, char *_label)
CPU 6309: emit code to make long conditional jump
void cpu_move_16bit_indirect2(Environment *_environment, char *_value, char *_source)
void cpu_math_double_8bit(Environment *_environment, char *_source, char *_other, int _signed)
CPU 6309: emit code to double a 8 bit value
void cpu_less_than_nbit(Environment *_environment, char *_source, char *_destination, char *_other, int _equal, int _bits)
void cpu_not_32bit(Environment *_environment, char *_value, char *_result)
void cpu_greater_than_memory_size(Environment *_environment, char *_source, char *_destination, int _size, char *_result, int _equal)
void cpu_hex_to_string(Environment *_environment, char *_number, char *_string, char *_size, int _separator)
void cpu_or_8bit(Environment *_environment, char *_left, char *_right, char *_result)
void cpu_move_8bit_indirect2_16bit(Environment *_environment, char *_value, char *_offset, char *_source)
void cpu_math_add_32bit_const(Environment *_environment, char *_source, int _destination, char *_other)
void cpu_greater_than_32bit(Environment *_environment, char *_source, char *_destination, char *_other, int _equal, int _signed)
CPU 6309: emit code to compare two 8 bit values
void cpu_call_indirect(Environment *_environment, char *_value)
void cpu_call(Environment *_environment, char *_label)
void cpu_random_8bit(Environment *_environment, char *_entropy, char *_result)
void cpu_store_8bit(Environment *_environment, char *_destination, int _value)
CPU 6309: emit code to store 8 bit
void cpu_swap_8bit(Environment *_environment, char *_left, char *_right)
void cpu_compare_32bit(Environment *_environment, char *_source, char *_destination, char *_other, int _positive)
CPU 6309: emit code to compare two 32 bit values
void cpu_jump(Environment *_environment, char *_label)
void cpu_fill_blocks(Environment *_environment, char *_address, char *_blocks, char *_pattern)
CPU 6309: emit code to fill up a memory area
void cpu_bvneq(Environment *_environment, char *_value, char *_label)
void cpu_compare_and_branch_16bit(Environment *_environment, char *_source, char *_destination, char *_label, int _positive)
void cpu_poke(Environment *_environment, char *_address, char *_source)
void cpu_random_32bit(Environment *_environment, char *_entropy, char *_result)
void cpu_less_than_8bit_const(Environment *_environment, char *_source, int _destination, char *_other, int _equal, int _signed)
void cpu_greater_than_nbit(Environment *_environment, char *_source, char *_destination, char *_other, int _equal, int _bits)
void cpu_less_than_16bit(Environment *_environment, char *_source, char *_destination, char *_other, int _equal, int _signed)
CPU 6309: emit code to compare two 8 bit values
void cpu_math_and_const_8bit(Environment *_environment, char *_source, int _mask)
CPU 6309: emit code to mask with "and" a value of 8 bit
void cpu_inc_32bit(Environment *_environment, char *_variable)
void cpu_xor_32bit(Environment *_environment, char *_left, char *_right, char *_result)
void cpu_return(Environment *_environment)
void cpu_move_8bit_indirect2(Environment *_environment, char *_value, char *_source)
void cpu_inc_nbit(Environment *_environment, char *_variable, int _bits)
void cpu_pop(Environment *_environment)
void cpu_math_sub_16bit_with_8bit(Environment *_environment, char *_source, char *_destination, char *_other)
void cpu_random_16bit(Environment *_environment, char *_entropy, char *_result)
void cpu_ei(Environment *_environment)
void cpu_or_32bit(Environment *_environment, char *_left, char *_right, char *_result)
void cpu_math_div2_const_16bit(Environment *_environment, char *_source, int _steps, int _signed, char *_remainder)
CPU 6309: emit code to halves for several times a 16 bit value
void cpu_inc_16bit(Environment *_environment, char *_variable)
void cpu_logical_or_8bit(Environment *_environment, char *_left, char *_right, char *_result)
void cpu_compare_nbit(Environment *_environment, char *_source, char *_destination, char *_other, int _positive, int _bits)
void cpu_ztoa(Environment *_environment)
void cpu_random(Environment *_environment, char *_entropy)
void cpu_compare_and_branch_8bit(Environment *_environment, char *_source, char *_destination, char *_label, int _positive)
void cpu_ctoa(Environment *_environment)
void cpu_move_16bit_indirect2_8bit(Environment *_environment, char *_value, char *_offset, char *_source)
void cpu_math_sub_nbit(Environment *_environment, char *_source, char *_destination, char *_other, int _bits)
void cpu_math_div2_const_nbit(Environment *_environment, char *_source, int _steps, int _bits, char *_remainder)
void cpu_busy_wait(Environment *_environment, char *_timing)
void cpu_greater_than_memory(Environment *_environment, char *_source, char *_destination, char *_size, char *_result, int _equal)
void cpu_store_32bit(Environment *_environment, char *_destination, int _value)
CPU 6309: emit code to store 32 bit
void cpu_flip(Environment *_environment, char *_source, char *_size, char *_destination)
void cpu_move_8bit(Environment *_environment, char *_source, char *_destination)
CPU 6309: emit code to move 8 bit
void cpu_beq(Environment *_environment, char *_label)
CPU 6309: emit code to make long conditional jump
void cpu_compare_16bit(Environment *_environment, char *_source, char *_destination, char *_other, int _positive)
CPU 6309: emit code to compare two 16 bit values
void cpu_peek(Environment *_environment, char *_address, char *_target)
void cpu_convert_string_into_16bit(Environment *_environment, char *_string, char *_len, char *_value)
void cpu_not_8bit(Environment *_environment, char *_value, char *_result)
void cpu_math_div_8bit_to_8bit(Environment *_environment, char *_source, char *_destination, char *_other, char *_other_remainder, int _signed)
void cpu_math_add_nbit(Environment *_environment, char *_source, char *_destination, char *_other, int _bits)
void cpu_xor_16bit(Environment *_environment, char *_left, char *_right, char *_result)
void cpu_swap_16bit(Environment *_environment, char *_left, char *_right)
void cpu_compare_and_branch_8bit_const(Environment *_environment, char *_source, int _destination, char *_label, int _positive)
CPU 6309: emit code to compare two 8 bit values and jump if they are equal/different
void cpu_less_than_32bit(Environment *_environment, char *_source, char *_destination, char *_other, int _equal, int _signed)
CPU 6309: emit code to compare two 32 bit values
void cpu_compare_memory_size(Environment *_environment, char *_source, char *_destination, int _size, char *_result, int _equal)
void cpu_math_add_8bit_const(Environment *_environment, char *_source, int _destination, char *_other)
void cpu_less_than_16bit_const(Environment *_environment, char *_source, int _destination, char *_other, int _equal, int _signed)
void cpu_and_32bit(Environment *_environment, char *_left, char *_right, char *_result)
void cpu_float_single_cos(Environment *_environment, char *_angle, char *_result)
void cpu_protothread_get_state(Environment *_environment, char *_index, char *_state)
void cpu_set_callback(Environment *_environment, char *_callback, char *_label)
void cpu_move_32bit_indirect2(Environment *_environment, char *_value, char *_source)
void cpu_dsfree(Environment *_environment, char *_index)
void cpu_less_than_memory_size(Environment *_environment, char *_source, char *_destination, int _size, char *_result, int _equal)
void cpu_dsresize_size(Environment *_environment, char *_index, int _resize)
void cpu_hex_to_string_calc_string(Environment *_environment, char *_size, int _separator, char *_string_size)
void cpu_move_8bit_signed_32bit_unsigned(Environment *_environment, char *_source, char *_destination)
void cpu_float_fast_from_8(Environment *_environment, char *_value, char *_result, int _signed)
void cpu_in(Environment *_environment, char *_port, char *_value)
void cpu_hex_to_string_calc_string_size(Environment *_environment, int _size, int _separator, char *_string_size)
void cpu_pokew(Environment *_environment, char *_address, char *_source)
void cpu_move_32bit_signed_16bit_unsigned(Environment *_environment, char *_source, char *_destination)
void cpu_combine_nibbles(Environment *_environment, char *_low_nibble, char *_hi_nibble, char *_byte)
char * cpu_blit_register_name(Environment *_environment, int _register)
void cpu_di(Environment *_environment)
void cpu_float_fast_tan(Environment *_environment, char *_angle, char *_result)
void cpu_math_double_32bit(Environment *_environment, char *_source, char *_other, int _signed)
CPU 6502: emit code to double a 32 bit value
void cpu_protothread_restore(Environment *_environment, char *_index, char *_step)
void cpu_msc1_uncompress_indirect_indirect(Environment *_environment, char *_input, char *_output)
void cpu_not_16bit(Environment *_environment, char *_value, char *_result)
void cpu_move_8bit_unsigned_32bit_signed(Environment *_environment, char *_source, char *_destination)
void cpu_math_mul2_const_16bit(Environment *_environment, char *_source, int _steps, int _signed)
CPU 6502: emit code to halves for several times a 8 bit value
void cpu_math_div_16bit_to_16bit(Environment *_environment, char *_source, char *_destination, char *_other, char *_other_remainder, int _signed)
void cpu_move_16bit_signed_32bit_signed(Environment *_environment, char *_source, char *_destination)
void cpu_move_8bit_unsigned_16bit_signed(Environment *_environment, char *_source, char *_destination)
void cpu_compare_32bit_const(Environment *_environment, char *_source, int _destination, char *_other, int _positive)
CPU 6309: emit code to compare two 32 bit values
void cpu_math_mul_16bit_to_32bit(Environment *_environment, char *_source, char *_destination, char *_other, int _signed)
CPU 6502: emit code to multiply two 16 bit values in a 32 bit register
void cpu_swap_32bit(Environment *_environment, char *_left, char *_right)
void cpu_float_fast_from_16(Environment *_environment, char *_value, char *_result, int _signed)
void cpu_bveq(Environment *_environment, char *_value, char *_label)
void cpu_dsresize(Environment *_environment, char *_index, char *_resize)
void cpu_move_nbit_indirect(Environment *_environment, int _n, char *_source, char *_value)
void cpu_math_div_8bit_to_8bit_const(Environment *_environment, char *_source, int _destination, char *_other, char *_other_remainder, int _signed)
void cpu_bit_check_extended(Environment *_environment, char *_value, char *_position, char *_result, int _bitwidth)
void cpu_math_div_32bit_to_16bit(Environment *_environment, char *_source, char *_destination, char *_other, char *_other_remainder, int _signed)
void cpu_math_mul2_const_8bit(Environment *_environment, char *_source, int _steps, int _signed)
CPU 6502: emit code to double for several times a 8 bit value
void cpu_float_fast_div(Environment *_environment, char *_x, char *_y, char *_result)
void cpu_move_32bit_signed_16bit_signed(Environment *_environment, char *_source, char *_destination)
void cpu_move_32bit_unsigned_8bit_unsigned(Environment *_environment, char *_source, char *_destination)
void cpu_math_mul2_const_32bit(Environment *_environment, char *_source, int _steps, int _signed)
CPU 6502: emit code to double for several times a 32 bit value
void cpu_uppercase(Environment *_environment, char *_source, char *_size, char *_result)
void cpu_math_add_16bit_with_8bit(Environment *_environment, char *_source, char *_destination, char *_other)
void cpu_address_table_build(Environment *_environment, char *_table, int *_values, char *_address[], int _count)
void cpu_mem_move(Environment *_environment, char *_source, char *_destination, char *_size)
void cpu_set_asmio_indirect(Environment *_environment, int _asmio, char *_value)
void cpu_msc1_uncompress_direct_indirect(Environment *_environment, char *_input, char *_output)
void cpu_math_sub_8bit(Environment *_environment, char *_source, char *_destination, char *_other)
CPU 6502: emit code to subtract two 8 bit values
void cpu_xor_32bit_const(Environment *_environment, char *_left, int _right, char *_result)
void cpu_math_add_32bit(Environment *_environment, char *_source, char *_destination, char *_other)
CPU 6502: emit code to add two 32 bit values
void cpu_protothread_save(Environment *_environment, char *_index, int _step)
void cpu_store_char(Environment *_environment, char *_destination, int _value)
CPU 6502: emit code to store a char
void cpu_math_complement_const_32bit(Environment *_environment, char *_source, int _value)
CPU 6502: emit code to calculate a 32 bit complement of a number
void cpu_store_16bit(Environment *_environment, char *_destination, int _value)
CPU 6502: emit code to store 16 bit
void cpu_poked(Environment *_environment, char *_address, char *_source)
void cpu_and_8bit_const(Environment *_environment, char *_left, int _right, char *_result)
void cpu_dsassign(Environment *_environment, char *_original, char *_copy)
void cpu_math_double_16bit(Environment *_environment, char *_source, char *_other, int _signed)
CPU 6502: emit code to double a 16 bit value
void cpu_math_sub_32bit(Environment *_environment, char *_source, char *_destination, char *_other)
CPU 6502: emit code to subtract two 32 bit values
void cpu_complement2_8bit(Environment *_environment, char *_source, char *_destination)
void cpu_msc1_uncompress_indirect_direct(Environment *_environment, char *_input, char *_output)
void cpu_math_div2_const_8bit(Environment *_environment, char *_source, int _steps, int _signed, char *_remainder)
CPU 6502: emit code to halves for several times a 8 bit value
void cpu_less_than_memory(Environment *_environment, char *_source, char *_destination, char *_size, char *_result, int _equal)
void cpu_dsalloc_size(Environment *_environment, int _size, char *_index)
void cpu_get_asmio_indirect(Environment *_environment, int _asmio, char *_value)
void cpu_move_16bit_unsigned_8bit_unsigned(Environment *_environment, char *_source, char *_destination)
void cpu_float_fast_cos(Environment *_environment, char *_angle, char *_result)
void cpu_protothread_set_state(Environment *_environment, char *_index, int _state)
void cpu_math_div_nbit_to_nbit(Environment *_environment, char *_source, char *_destination, char *_other, char *_other_remainder, int _bits)
void cpu_math_add_8bit(Environment *_environment, char *_source, char *_destination, char *_other)
CPU 6502: emit code to add two 8 bit values
void cpu_float_single_add(Environment *_environment, char *_x, char *_y, char *_result)
void cpu_float_single_sub(Environment *_environment, char *_x, char *_y, char *_result)
void cpu_bit_inplace_8bit_extended_indirect(Environment *_environment, char *_address, char *_position, char *_bit)
void cpu_move_8bit_unsigned_32bit_unsigned(Environment *_environment, char *_source, char *_destination)
void cpu_move_8bit_indirect(Environment *_environment, char *_source, char *_value)
void cpu_string_sub(Environment *_environment, char *_source, char *_source_size, char *_pattern, char *_pattern_size, char *_destination, char *_destination_size)
void cpu_compare_8bit(Environment *_environment, char *_source, char *_destination, char *_other, int _positive)
CPU 6502: emit code to compare two 8 bit values
void cpu_math_and_const_32bit(Environment *_environment, char *_source, int _mask)
CPU 6502: emit code to mask with "and" a value of 32 bit
void cpu_fill_direct_size(Environment *_environment, char *_address, int _bytes, char *_pattern)
CPU 6502: emit code to fill up a memory area
void cpu_addressof_16bit(Environment *_environment, char *_source, char *_destination)
void cpu_dec_16bit(Environment *_environment, char *_variable)
void cpu_dsgc(Environment *_environment)
void cpu_move_16bit_signed_32bit_unsigned(Environment *_environment, char *_source, char *_destination)
void cpu_inc(Environment *_environment, char *_variable)
void cpu_poke_const(Environment *_environment, char *_address, int _source)
void cpu_fill_direct(Environment *_environment, char *_address, char *_bytes, char *_pattern)
CPU 6502: emit code to fill up a memory area
void cpu_jump_indirect(Environment *_environment, char *_value)
void cpu_math_complement_const_8bit(Environment *_environment, char *_source, int _value)
CPU 6502: emit code to calculate an 8 bit complement of a number
void cpu_dsdefine(Environment *_environment, char *_string, char *_index)
void cpu_math_complement_const_16bit(Environment *_environment, char *_source, int _value)
CPU 6502: emit code to calculate a 16 bit complement of a number
void cpu_move_16bit_unsigned_32bit_unsigned(Environment *_environment, char *_source, char *_destination)
void cpu_math_mul2_const_nbit(Environment *_environment, char *_source, int _steps, int _bits)
void cpu_float_single_exp(Environment *_environment, char *_value, char *_result)
void cpu_move_32bit(Environment *_environment, char *_source, char *_destination)
CPU 6502: emit code to move 32 bit
void cpu_fill_size(Environment *_environment, char *_address, int _bytes, char *_pattern)
CPU 6502: emit code to fill up a memory area
void cpu_dsfill(Environment *_environment, char *_string, char *_value)
void cpu_less_than_8bit(Environment *_environment, char *_source, char *_destination, char *_other, int _equal, int _signed)
CPU 6502: emit code to compare two 8 bit values
void cpu_fill_direct_size_value(Environment *_environment, char *_address, int _bytes, int _pattern)
CPU 6502: emit code to fill up a memory area
void cpu_dec_32bit(Environment *_environment, char *_variable)
void cpu_greater_than_16bit_const(Environment *_environment, char *_source, int _destination, char *_other, int _equal, int _signed)
void cpu_protothread_get_address(Environment *_environment, char *_index, char *_address)
void cpu_math_add_16bit(Environment *_environment, char *_source, char *_destination, char *_other)
CPU 6502: emit code to add two 16 bit values
void cpu_greater_than_16bit(Environment *_environment, char *_source, char *_destination, char *_other, int _equal, int _signed)
CPU 6502: emit code to compare two 8 bit values
void cpu_bit_inplace_8bit(Environment *_environment, char *_value, int _position, int *_bit)
void cpu_math_add_16bit_const(Environment *_environment, char *_source, int _destination, char *_other)
CPU 6502: emit code to add two 16 bit values
void cpu_protothread_vars(Environment *_environment)
void cpu_poked_const(Environment *_environment, char *_address, int _source)
void cpu_math_add_16bit_with_16bit(Environment *_environment, char *_source, char *_destination, char *_other)
CPU 6502: emit code to add two 16 bit values
void cpu_float_fast_from_int_array_to_double(Environment *_environment, int _value[], double *_result)
void cpu_compare_and_branch_16bit_const(Environment *_environment, char *_source, int _destination, char *_label, int _positive)
CPU 6502: emit code to compare two 16 bit values and jump if they are equal/different
void cpu_move_32bit_indirect(Environment *_environment, char *_source, char *_value)
void cpu_dswrite(Environment *_environment, char *_index)
void cpu_complement2_nbit(Environment *_environment, char *_source, char *_destination, int _bits)
void cpu_greater_than_8bit(Environment *_environment, char *_source, char *_destination, char *_other, int _equal, int _signed)
CPU 6502: emit code to compare two 8 bit values
void cpu_or_16bit(Environment *_environment, char *_left, char *_right, char *_result)
void cpu_fill(Environment *_environment, char *_address, char *_bytes, int _bytes_width, char *_pattern)
CPU 6502: emit code to fill up a memory area
void cpu_move_16bit_indirect(Environment *_environment, char *_source, char *_value)
void cpu_limit_16bit(Environment *_environment, char *_variable, int _value)
void cpu_move_8bit_indirect_with_offset2(Environment *_environment, char *_source, char *_value, char *_offset)
void cpu_less_than_32bit_const(Environment *_environment, char *_source, int _destination, char *_other, int _equal, int _signed)
void cpu_move_nbit_indirect2(Environment *_environment, int _n, char *_value, char *_source)
void cpu_and_8bit(Environment *_environment, char *_left, char *_right, char *_result)
void cpu_float_single_log(Environment *_environment, char *_value, char *_result)
void cpu_math_mul_8bit_to_16bit(Environment *_environment, char *_source, char *_destination, char *_other, int _signed)
CPU 6502: emit code to multiply two 8bit values in a 16 bit register
void cpu_compare_16bit_const(Environment *_environment, char *_source, int _destination, char *_other, int _positive)
CPU 6502: emit code to compare two 16 bit values
void cpu_math_sub_16bit(Environment *_environment, char *_source, char *_destination, char *_other)
CPU 6502: emit code to subtract two 16 bit values
void cpu_compare_and_branch_32bit_const(Environment *_environment, char *_source, int _destination, char *_label, int _positive)
CPU 6502: emit code to compare two 32 bit values and jump if they are equal/different
void cpu_store_nbit(Environment *_environment, char *_destination, int _n, int _value[])
CPU 6502: emit code to store n bit
void cpu_mem_move_direct_indirect_size(Environment *_environment, char *_source, char *_destination, int _size)
void cpu_dec_nbit(Environment *_environment, char *_variable, int _bits)
void cpu_math_and_const_16bit(Environment *_environment, char *_source, int _mask)
CPU 6502: emit code to mask with "and" a value of 16 bit
void cpu_move_8bit_indirect2_8bit(Environment *_environment, char *_value, char *_offset, char *_source)
void cpu_float_single_from_16(Environment *_environment, char *_value, char *_result, int _signed)
void cpu_less_than_and_branch_8bit_const(Environment *_environment, char *_source, int _destination, char *_label, int _equal, int _signed)
void cpu_fill_indirect(Environment *_environment, char *_address, char *_size, char *_pattern, int _size_size)
void cpu_mem_move_indirect_direct_size(Environment *_environment, char *_source, char *_destination, int _size)
void cpu_compare_and_branch_char_const(Environment *_environment, char *_source, int _destination, char *_label, int _positive)
CPU 6502: emit code to compare two 8 bit values and jump if they are equal/different
void cpu_less_than_nbit_const(Environment *_environment, char *_source, int _destination, char *_other, int _equal, int _bits)
void cpu_float_fast_sin(Environment *_environment, char *_angle, char *_result)
void cpu_math_mul_nbit_to_nbit(Environment *_environment, char *_source, char *_destination, char *_other, int _bits)
void cpu_label(Environment *_environment, char *_label)
void cpu_dec(Environment *_environment, char *_variable)
void cpu_and_16bit(Environment *_environment, char *_left, char *_right, char *_result)
void cpu_float_fast_log(Environment *_environment, char *_value, char *_result)
void cpu_move_nbit(Environment *_environment, int _n, char *_source, char *_destination)
CPU cpu6502: emit code to store n bit
void cpu_address_table_call(Environment *_environment, char *_table, char *_value, char *_address)
void cpu_float_single_from_int_array_to_double(Environment *_environment, int _value[], double *_result)
void cpu_logical_not_8bit(Environment *_environment, char *_value, char *_result)
void emit_segment_if_enough_space(Environment *_environment, int _space)
void cpu_pokew_const(Environment *_environment, char *_address, int _source)
void cpu_logical_and_8bit(Environment *_environment, char *_left, char *_right, char *_result)
void cpu_or_8bit_const(Environment *_environment, char *_left, int _right, char *_result)
void cpu_math_div2_const_32bit(Environment *_environment, char *_source, int _steps, int _signed, char *_remainder)
CPU 6502: emit code to halves for several times a 32 bit value
void cpu_halt(Environment *_environment)
void cpu_end(Environment *_environment)
void cpu_float_fast_from_double_to_int_array(Environment *_environment, double _value, int _result[])
void cpu_compare_memory(Environment *_environment, char *_source, char *_destination, char *_size, char *_result, int _equal)
void cpu_greater_than_8bit_const(Environment *_environment, char *_source, int _destination, char *_other, int _equal, int _signed)
void cpu_complement2_16bit(Environment *_environment, char *_source, char *_destination)
void cpu_dsinit(Environment *_environment)
void cpu_xor_8bit(Environment *_environment, char *_left, char *_right, char *_result)
void cpu_protothread_unregister(Environment *_environment, char *_index)
void cpu_decrypt(Environment *_environment, char *_data, char *_data_size, char *_key, char *_key_size, char *_output, char *_result)
void cpu_complement2_32bit(Environment *_environment, char *_source, char *_destination)
void cpu_protothread_register_at(Environment *_environment, char *_index, char *_label)
void cpu_blit_free_register(Environment *_environment, int _register)
void cpu_lowercase(Environment *_environment, char *_source, char *_size, char *_result)
void cpu_float_single_to_8(Environment *_environment, char *_value, char *_result, int _signed)
void cpu_move_16bit(Environment *_environment, char *_source, char *_destination)
CPU 6502: emit code to move 16 bit
void cpu_move_8bit_with_offset2(Environment *_environment, char *_source, char *_value, char *_offset)
void cpu_out(Environment *_environment, char *_port, char *_value)
void cpu_move_16bit_unsigned_8bit_signed(Environment *_environment, char *_source, char *_destination)
void cpu_blit_finalize(Environment *_environment)
void cpu_encrypt(Environment *_environment, char *_data, char *_data_size, char *_key, char *_key_size, char *_output)
void cpu_bneq(Environment *_environment, char *_label)
CPU 6502: emit code to make long conditional jump
void cpu_compare_nbit_const(Environment *_environment, char *_source, int _destination, char *_other, int _positive, int _bits)
CPU 6502: emit code to compare two 32 bit values
void cpu_move_16bit_indirect2(Environment *_environment, char *_value, char *_source)
void cpu_float_fast_cmp(Environment *_environment, char *_x, char *_y, char *_result)
void cpu_math_double_8bit(Environment *_environment, char *_source, char *_other, int _signed)
CPU 6502: emit code to double a 8 bit value
void cpu_float_fast_mul(Environment *_environment, char *_x, char *_y, char *_result)
void cpu_bits_to_string(Environment *_environment, char *_number, char *_string, char *_string_size, int _bits, char *_zero, char *_one)
void cpu_dsalloc(Environment *_environment, char *_size, char *_index)
void cpu_less_than_nbit(Environment *_environment, char *_source, char *_destination, char *_other, int _equal, int _bits)
void cpu_not_32bit(Environment *_environment, char *_value, char *_result)
void cpu_float_single_from_double_to_int_array(Environment *_environment, double _value, int _result[])
void cpu_float_single_to_16(Environment *_environment, char *_value, char *_result, int _signed)
void cpu_greater_than_memory_size(Environment *_environment, char *_source, char *_destination, int _size, char *_result, int _equal)
void cpu_hex_to_string(Environment *_environment, char *_number, char *_string, char *_size, int _separator)
void cpu_or_8bit(Environment *_environment, char *_left, char *_right, char *_result)
void cpu_store_8bit_with_offset2(Environment *_environment, char *_destination, char *_offset, int _value)
void cpu_move_8bit_indirect2_16bit(Environment *_environment, char *_value, char *_offset, char *_source)
void cpu_math_add_32bit_const(Environment *_environment, char *_source, int _destination, char *_other)
void cpu_move_8bit_indirect_with_offset(Environment *_environment, char *_source, char *_value, int _offset)
void cpu_sqroot(Environment *_environment, char *_number, char *_result)
void cpu_number_to_string(Environment *_environment, char *_number, char *_string, char *_string_size, int _bits, int _signed)
void cpu_greater_than_32bit(Environment *_environment, char *_source, char *_destination, char *_other, int _equal, int _signed)
CPU 6502: emit code to compare two 8 bit values
void cpu_peekd(Environment *_environment, char *_address, char *_target)
void cpu_in_direct(Environment *_environment, char *_port, char *_value)
void cpu_call_indirect(Environment *_environment, char *_value)
void cpu_call(Environment *_environment, char *_label)
void cpu_random_8bit(Environment *_environment, char *_entropy, char *_result)
void cpu_xor_8bit_const(Environment *_environment, char *_left, int _right, char *_result)
void cpu_move_16bit_signed_8bit_unsigned(Environment *_environment, char *_source, char *_destination)
void cpu_mem_move_direct(Environment *_environment, char *_source, char *_destination, char *_size)
void cpu_store_8bit(Environment *_environment, char *_destination, int _value)
CPU 6502: emit code to store 8 bit
void cpu_swap_8bit(Environment *_environment, char *_left, char *_right)
void cpu_float_fast_to_8(Environment *_environment, char *_value, char *_result, int _signed)
void cpu_mem_move_direct2(Environment *_environment, char *_source, char *_destination, char *_size)
void cpu_init(Environment *_environment)
void cpu_dstring_vars(Environment *_environment)
void cpu_protothread_loop(Environment *_environment)
void cpu_float_single_div(Environment *_environment, char *_x, char *_y, char *_result)
void cpu_hex_to_bin(Environment *_environment, char *_value_address, char *_value_size, char *_variable_address, char *_variable_size, char *_result)
void cpu_out_direct(Environment *_environment, char *_port, char *_value)
void cpu_greater_than_32bit_const(Environment *_environment, char *_source, int _destination, char *_other, int _equal, int _signed)
void cpu_protothread_current(Environment *_environment, char *_current)
void cpu_float_fast_to_16(Environment *_environment, char *_value, char *_result, int _signed)
void cpu_mem_move_16bit(Environment *_environment, char *_source, char *_destination, char *_size)
void cpu_compare_32bit(Environment *_environment, char *_source, char *_destination, char *_other, int _positive)
CPU 6502: emit code to compare two 32 bit values
void cpu_set_asmio(Environment *_environment, int _asmio, int _value)
void cpu_jump(Environment *_environment, char *_label)
void cpu_move_16bit_unsigned_32bit_signed(Environment *_environment, char *_source, char *_destination)
int cpu_blit_alloc_register(Environment *_environment)
void cpu_move_32bit_signed_8bit_unsigned(Environment *_environment, char *_source, char *_destination)
void cpu_mem_move_size(Environment *_environment, char *_source, char *_destination, int _size)
void cpu_fill_blocks(Environment *_environment, char *_address, char *_blocks, char *_pattern)
CPU 6502: emit code to fill up a memory area
void cpu_bvneq(Environment *_environment, char *_value, char *_label)
void cpu_float_single_mul(Environment *_environment, char *_x, char *_y, char *_result)
void cpu_float_fast_exp(Environment *_environment, char *_value, char *_result)
void cpu_move_16bit_signed_8bit_signed(Environment *_environment, char *_source, char *_destination)
void cpu_compare_and_branch_16bit(Environment *_environment, char *_source, char *_destination, char *_label, int _positive)
void cpu_fill_size_value(Environment *_environment, char *_address, int _bytes, int _pattern)
CPU 6502: emit code to fill up a memory area
void cpu_call_addr(Environment *_environment, int _address)
void cpu_math_div_16bit_to_16bit_const(Environment *_environment, char *_source, int _destination, char *_other, char *_other_remainder, int _signed)
void cpu_poke(Environment *_environment, char *_address, char *_source)
void cpu_bit_check(Environment *_environment, char *_value, int _position, char *_result, int _bitwidth)
void cpu_protothread_register(Environment *_environment, char *_label, char *_index)
void cpu_move_32bit_signed_8bit_signed(Environment *_environment, char *_source, char *_destination)
void cpu_float_single_to_string(Environment *_environment, char *_x, char *_string, char *_string_size)
void cpu_math_div_nbit_to_nbit_const(Environment *_environment, char *_source, int _destination, char *_other, char *_other_remainder, int _bits)
void cpu_float_single_tan(Environment *_environment, char *_angle, char *_result)
void cpu_nop(Environment *_environment)
void cpu_random_32bit(Environment *_environment, char *_entropy, char *_result)
void cpu_move_16bit_indirect2_8bit(Environment *_environment, char *_value, char *_index, char *_source)
void cpu_move_32bit_unsigned_16bit_unsigned(Environment *_environment, char *_source, char *_destination)
void cpu_less_than_8bit_const(Environment *_environment, char *_source, int _destination, char *_other, int _equal, int _signed)
void cpu_greater_than_nbit(Environment *_environment, char *_source, char *_destination, char *_other, int _equal, int _bits)
void cpu_prepare_for_compare_and_branch_8bit(Environment *_environment, char *_source)
void cpu_less_than_16bit(Environment *_environment, char *_source, char *_destination, char *_other, int _equal, int _signed)
CPU 6502: emit code to compare two 8 bit values
void cpu_mem_move_direct2_size(Environment *_environment, char *_source, char *_destination, int _size)
void cpu_math_and_const_8bit(Environment *_environment, char *_source, int _mask)
CPU 6502: emit code to mask with "and" a value of 8 bit
void cpu_move_32bit_unsigned_16bit_signed(Environment *_environment, char *_source, char *_destination)
void cpu_msc1_uncompress_direct_direct(Environment *_environment, char *_input, char *_output)
void cpu_inc_32bit(Environment *_environment, char *_variable)
void cpu_move_8bit_signed_16bit_signed(Environment *_environment, char *_source, char *_destination)
void cpu_mem_move_direct_size(Environment *_environment, char *_source, char *_destination, int _size)
void cpu_float_fast_sub(Environment *_environment, char *_x, char *_y, char *_result)
void cpu_xor_32bit(Environment *_environment, char *_left, char *_right, char *_result)
void cpu_return(Environment *_environment)
void cpu_move_8bit_indirect2(Environment *_environment, char *_value, char *_source)
void cpu_inc_nbit(Environment *_environment, char *_variable, int _bits)
void cpu_pop(Environment *_environment)
void cpu_math_sub_16bit_with_8bit(Environment *_environment, char *_source, char *_destination, char *_other)
void cpu_random_16bit(Environment *_environment, char *_entropy, char *_result)
void cpu_ei(Environment *_environment)
int cpu_register_decode(Environment *_environment, char *_register)
void cpu_or_32bit(Environment *_environment, char *_left, char *_right, char *_result)
void cpu_math_div2_const_16bit(Environment *_environment, char *_source, int _steps, int _signed, char *_remainder)
CPU 6502: emit code to halves for several times a 16 bit value
void cpu_convert_string_into_8bit(Environment *_environment, char *_string, char *_len, char *_value)
void cpu_inc_16bit(Environment *_environment, char *_variable)
void cpu_logical_or_8bit(Environment *_environment, char *_left, char *_right, char *_result)
void cpu_compare_nbit(Environment *_environment, char *_source, char *_destination, char *_other, int _positive, int _bits)
void cpu_address_table_lookup(Environment *_environment, char *_table, int _count)
void cpu_ztoa(Environment *_environment)
void cpu_random(Environment *_environment, char *_entropy)
void cpu_move_32bit_unsigned_8bit_signed(Environment *_environment, char *_source, char *_destination)
void cpu_compare_and_branch_8bit(Environment *_environment, char *_source, char *_destination, char *_label, int _positive)
void cpu_execute_compare_and_branch_8bit_const(Environment *_environment, int _destination, char *_label, int _positive)
CPU 6502: emit code to compare two 8 bit values and jump if they are equal/different
void cpu_ctoa(Environment *_environment)
void cpu_float_single_from_8(Environment *_environment, char *_value, char *_result, int _signed)
void cpu_math_sub_nbit(Environment *_environment, char *_source, char *_destination, char *_other, int _bits)
void cpu_float_single_cmp(Environment *_environment, char *_x, char *_y, char *_result)
void cpu_move_8bit_signed_32bit_signed(Environment *_environment, char *_source, char *_destination)
void cpu_math_div2_const_nbit(Environment *_environment, char *_source, int _steps, int _bits, char *_remainder)
void cpu_store_8bit_with_offset(Environment *_environment, char *_destination, int _value, int _offset)
void cpu_busy_wait(Environment *_environment, char *_timing)
void cpu_greater_than_memory(Environment *_environment, char *_source, char *_destination, char *_size, char *_result, int _equal)
void cpu_store_32bit(Environment *_environment, char *_destination, int _value)
CPU 6502: emit code to store 32 bit
void cpu_peekw(Environment *_environment, char *_address, char *_target)
void cpu_flip(Environment *_environment, char *_source, char *_size, char *_destination)
void cpu_move_8bit(Environment *_environment, char *_source, char *_destination)
CPU 6502: emit code to move 8 bit
void cpu_beq(Environment *_environment, char *_label)
CPU 6309: emit code to make long conditional jump
void cpu_compare_16bit(Environment *_environment, char *_source, char *_destination, char *_other, int _positive)
CPU 6502: emit code to compare two 16 bit values
void cpu_peek(Environment *_environment, char *_address, char *_target)
void cpu_float_fast_add(Environment *_environment, char *_x, char *_y, char *_result)
void cpu_convert_string_into_16bit(Environment *_environment, char *_string, char *_len, char *_value)
void cpu_float_single_sin(Environment *_environment, char *_angle, char *_result)
void cpu_not_8bit(Environment *_environment, char *_value, char *_result)
void cpu_math_div_8bit_to_8bit(Environment *_environment, char *_source, char *_destination, char *_other, char *_other_remainder, int _signed)
void cpu_dsdescriptor(Environment *_environment, char *_index, char *_address, char *_size)
void cpu_math_add_nbit(Environment *_environment, char *_source, char *_destination, char *_other, int _bits)
void cpu_compare_8bit_const(Environment *_environment, char *_source, int _destination, char *_other, int _positive)
CPU 6502: emit code to compare two 8 bit values
void cpu_xor_16bit(Environment *_environment, char *_left, char *_right, char *_result)
void cpu_xor_16bit_const(Environment *_environment, char *_left, int _right, char *_result)
void cpu_swap_16bit(Environment *_environment, char *_left, char *_right)
void cpu_compare_and_branch_8bit_const(Environment *_environment, char *_source, int _destination, char *_label, int _positive)
CPU 6502: emit code to compare two 8 bit values and jump if they are equal/different
void cpu_math_div_32bit_to_16bit_const(Environment *_environment, char *_source, int _destination, char *_other, char *_other_remainder, int _signed)
void cpu_greater_than_nbit_const(Environment *_environment, char *_source, int _destination, char *_other, int _equal, int _bits)
void cpu_float_fast_to_string(Environment *_environment, char *_x, char *_string, char *_string_size)
void cpu_less_than_32bit(Environment *_environment, char *_source, char *_destination, char *_other, int _equal, int _signed)
CPU 6502: emit code to compare two 32 bit values
void cpu_dsfill_value(Environment *_environment, char *_string, int _value)
void cpu_dsassign_string(Environment *_environment, char *_string, char *_copy)
void cpu_move_8bit_signed_16bit_unsigned(Environment *_environment, char *_source, char *_destination)
void cpu_move_8bit_unsigned_16bit_unsigned(Environment *_environment, char *_source, char *_destination)
void cpu_compare_memory_size(Environment *_environment, char *_source, char *_destination, int _size, char *_result, int _equal)
void cpu_math_add_nbit_const(Environment *_environment, char *_source, int _destination, char *_other, int _bits)
void cpu_math_add_8bit_const(Environment *_environment, char *_source, int _destination, char *_other)
CPU 6502: emit code to add two 8 bit values
void cpu_flip_8bit(Environment *_environment, char *_source, char *_destination)
void cpu_blit_initialize(Environment *_environment)
void cpu_less_than_16bit_const(Environment *_environment, char *_source, int _destination, char *_other, int _equal, int _signed)
#define REGISTER_PAGE_ZERO2
enum _CPU6502Register CPU6502Register
enum _CPU6502Stack CPU6502Stack
#define REGISTER_PAGE_ZERO
unsigned char src_hw_6502_bits_to_string_asm[]
unsigned char src_hw_6502_cpu_bit_check_extended_asm[]
unsigned char src_hw_6502_cpu_bit_inplace_asm[]
unsigned char src_hw_6502_cpu_convert_string_into_16bit_asm[]
unsigned char src_hw_6502_cpu_fill_asm[]
unsigned char src_hw_6502_cpu_fill_blocks_asm[]
unsigned char src_hw_6502_cpu_flip_asm[]
unsigned char src_hw_6502_cpu_hex_to_string_asm[]
unsigned char src_hw_6502_cpu_lowercase_asm[]
unsigned char src_hw_6502_cpu_math_div2_const_8bit_asm[]
unsigned char src_hw_6502_cpu_math_div_16bit_to_16bit_asm[]
unsigned char src_hw_6502_cpu_math_div_32bit_to_16bit_asm[]
unsigned char src_hw_6502_cpu_math_div_8bit_to_8bit_asm[]
unsigned char src_hw_6502_cpu_math_mul2_const_8bit_asm[]
unsigned char src_hw_6502_cpu_math_mul_16bit_to_32bit_asm[]
unsigned char src_hw_6502_cpu_math_mul_8bit_to_16bit_asm[]
unsigned char src_hw_6502_cpu_mem_move_asm[]
unsigned char src_hw_6502_cpu_random_asm[]
unsigned char src_hw_6502_cpu_string_sub_asm[]
unsigned char src_hw_6502_cpu_swap_asm[]
unsigned char src_hw_6502_cpu_uppercase_asm[]
unsigned char src_hw_6502_decrypt_asm[]
unsigned char src_hw_6502_dstring_asm[]
unsigned char src_hw_6502_duff_asm[]
unsigned char src_hw_6502_encrypt_asm[]
unsigned char src_hw_6502_fp_routines_asm[]
unsigned char src_hw_6502_hex2bin_asm[]
unsigned char src_hw_6502_msc1_asm[]
unsigned char src_hw_6502_number_to_string_asm[]
unsigned char src_hw_6502_protothread_asm[]
unsigned char src_hw_6502_sqr_asm[]
char * address_displacement(Environment *_environment, char *_address, char *_displacement)
#define DSTRING_DEFAULT_SPACE
#define DSTRING_DEFAULT_COUNT
Variable * decrypt(Environment *_environment, char *_data, char *_key, char *_var)
Emit code for DECRYPT.
Variable * encrypt(Environment *_environment, char *_data, char *_key)
Emit code for ENCRYPT.
Variable * sign(Environment *_environment, char *_value)
Return the sign of a variable.
int cpu_math_div_nbit_to_nbit_const[32]
int cpu_math_div_nbit_to_nbit[32]
int cpu_math_mul_nbit_to_nbit[32]
ProtothreadConfig protothreadConfig
CpuOptimization cpuOptimization
struct _MemoryArea * next
#define MAX_TEMPORARY_STORAGE
#define CRITICAL_UNSETTABLE_CPU_REGISTER(v)
#define deploy_with_vars(s, e, v)
#define CRITICAL_BLIT_ALLOC_REGISTER_EXHAUSTED()
#define outline2(s, a, b)
struct _Environment Environment
Structure of compilation environment.
struct _MemoryArea MemoryArea
#define CRITICAL_BLIT_INVALID_FREE_REGISTER(s, r)
#define CRITICAL_BLIT_ALLOC_MEMORY_EXHAUSTED()
#define CRITICAL_UNKNOWN_CPU_REGISTER()
#define deploy_preferred(s, e)
#define outhead2(s, a, b)
#define deploy_embedded(s, e)