138 cpu_beq( _environment, _label );
188 outline1(
"MOV AL, 0x%2.2x", (
unsigned char)(_source&0xff));
224 outline1(
"MOV AX, 0x%4.4x", (
unsigned short)(_source&0xffFF));
268 outline1(
"MOV AX, 0x%4.4x", (
unsigned short)(_source&0xffff));
273 outline1(
"MOV AX, 0x%4.4x", (
unsigned short)((_source>>16)&0xffff));
321void cpu_fill(
Environment * _environment,
char * _address,
char * _bytes,
int _bytes_width,
char * _pattern ) {
329 if ( _bytes_width == 8 ) {
342 if ( _bytes_width == 8 ) {
372 outline1(
"MOV CL, 0x%2.2x", (
unsigned char) ( _bytes & 0xff ) );
374 if ( _bytes < 256 ) {
377 outline1(
"MOV CH, 0x%2.2x", (
unsigned char) ( ( _bytes >> 8 ) & 0xff ) );
387 if ( _bytes < 256 ) {
418 outline1(
"MOV CL, 0x%2.2x", (
unsigned char) ( _bytes & 0xff ) );
420 if ( _bytes < 256 ) {
423 outline1(
"MOV CH, 0x%2.2x", (
unsigned char) ( ( _bytes >> 8 ) & 0xff ) );
426 outline1(
"MOV AL, 0x%2.2x", _pattern);
428 if ( _bytes < 256 ) {
493 outline1(
"MOV CL, 0x%2.2x", (
unsigned char) ( _bytes & 0xff ) );
495 if ( _bytes < 256 ) {
498 outline1(
"MOV CH, 0x%2.2x", (
unsigned char) ( ( _bytes >> 8 ) & 0xff ) );
508 if ( _bytes < 256 ) {
539 outline1(
"MOV CL, 0x%2.2x", (
unsigned char) ( _bytes & 0xff ) );
541 if ( _bytes < 256 ) {
544 outline1(
"MOV CH, 0x%2.2x", (
unsigned char) ( ( _bytes >> 8 ) & 0xff ) );
547 outline1(
"MOV AL, 0x%2.2x", _pattern);
549 if ( _bytes < 256 ) {
575 outline1(
"MOV [%s], AL", _destination);
592 outline2(
"MOV BYTE [%s], 0x%2.2x", _destination, ( _value & 0xff ) );
609 outline2(
"MOV BYTE [%s], '%c'", _destination, ( _value & 0xff ) );
619 outline3(
"MOV BYTE [%s+%d], 0x%2.2x", _destination, ( _offset & 0xff ), ( _value & 0xff ));
629 outline1(
"MOV DI, %s", _destination );
633 outline1(
"MOV BYTE [DI], 0x%2.2x", ( _value & 0xff ));
654 outline1(
"MOV AL, [%s]", _destination);
658 outline1(
"MOV AL, 0x%2.2x", (
unsigned char)(0xff*_positive));
662 outline1(
"MOV [%s], AL", _destination);
666 outline1(
"MOV AL, 0x%2.2x", (
unsigned char)(0xff*(1-_positive)));
670 outline1(
"MOV [%s], AL", _destination);
694 outline1(
"CMP BYTE [DI], 0x%2.2x", (
unsigned char)(_destination&0xff));
696 outline1(
"MOV AL, 0x%2.2x", (
unsigned char)(0xff*_positive));
700 outline1(
"MOV AL, 0x%2.2x", (
unsigned char)(0xff*(1-_positive)));
714 outline1(
"MOV AL, [%s]", _destination);
742 outline1(
"MOV AL, 0x%2.2x", _destination);
744 outline1(
"CMP AL, BL", _destination );
789 outline1(
"CMP AL, 0x%2.2x", _destination );
816 outline1(
"CMP AL, '%c'", _destination );
845 outline1(
"MOV BL, [%s]", _destination);
862 outline1(
"MOV [%s], AL", _destination);
878 outline1(
"MOV BL, 0x%2.2x", (
unsigned char)(_destination&0xff));
895 outline1(
"MOV [%s], AL", _destination);
911 outline1(
"MOV BL, 0x%2.2x", (
unsigned char)(_destination&0xff));
949 cpu_not_8bit( _environment, _destination, _destination );
974 outline1(
"MOV BL, [%s]", _destination );
979 outline1(
"MOV [%s], AL", _destination );
991 outline1(
"MOV BL, 0x%2.2x", (
unsigned char)(_destination&0xff) );
1011 outline1(
"MOV AL, [%s]", _source );
1012 outline1(
"MOV BL, [%s]", _destination );
1017 outline1(
"MOV [%s], AL", _destination );
1035 outline1(
"MOV AL, [%s]", _source );
1040 outline1(
"MOV [%s], AL", _source );
1064 outline1(
"MOV AL, [%s]", _source );
1066 outline1(
"MOV BL, [%s]", _destination );
1073 outline1(
"MOV AL, [%s]", _source );
1075 outline1(
"MOV BL, [%s]", _destination );
1100 outline1(
"MOV AL, [%s]", _source );
1102 outline1(
"MOV [%s], AL", _remainder );
1105 outline1(
"MOV CL, 0x%2.2x", _steps);
1131 outline1(
"MOV CL, 0x%2.2x", _steps);
1154 outline1(
"MOV BL, [%s]", _source );
1155 outline1(
"MOV AL, 0x%2.2x", ( _value & 0xff ) );
1157 outline1(
"MOV [%s], AL", _source );
1174 outline1(
"MOV AL, [%s]", _source );
1175 outline1(
"AND AL, 0x%2.2x", _mask );
1176 outline1(
"MOV [%s], AL", _source );
1197 outline1(
"MOV AX, [%s]", _source );
1198 outline1(
"MOV [%s], AX", _destination );
1209 outline1(
"MOV [%s], AX", _destination );
1226 outline1(
"MOV AX, 0x%4.4x", _value & 0xffff );
1227 outline1(
"MOV [%s], AX", _destination );
1248 outline1(
"MOV BX, [%s]", _destination);
1251 outline1(
"MOV AL, 0x%2.2x", 0xff*_positive);
1255 outline1(
"MOV [%s], AL", _destination);
1259 outline1(
"MOV AL, 0x%2.2x", 0xff*(1-_positive));
1263 outline1(
"MOV [%s], AL", _destination);
1286 outline1(
"MOV BX, 0x%4.4x", _destination);
1289 outline1(
"MOV AL, 0x%2.2x", 0xff*_positive);
1293 outline1(
"MOV [%s], AL", _destination);
1297 outline1(
"MOV AL, 0x%2.2x", 0xff*(1-_positive));
1301 outline1(
"MOV [%s], AL", _destination);
1316 outline1(
"MOV BX, [%s]", _destination);
1344 outline1(
"MOV BX, 0x%4.4x", _destination);
1376 outline1(
"MOV BX, [%s]", _destination);
1385 outline1(
"MOV [%s], AL", _destination);
1390 outline1(
"MOV AX, [%s]", _destination);
1400 outline1(
"MOV [%s], AL", _destination);
1420 outline1(
"MOV BX, 0x%4.4x", _destination);
1429 outline1(
"MOV [%s], AL", _destination);
1434 outline1(
"MOV AX, 0x%4.4x", _destination);
1444 outline1(
"MOV [%s], AL", _destination);
1468 cpu_not_8bit( _environment, _destination, _destination );
1492 outline1(
"MOV AX, [%s]", _source );
1493 outline1(
"MOV BX, [%s]", _destination );
1498 outline1(
"MOV [%s], AX", _destination );
1509 outline1(
"MOV AX, [%s]", _source );
1510 outline1(
"MOV BX, 0x%4.4x", ( _destination & 0xffff ) );
1522 outline1(
"MOV AX, [%s]", _source );
1523 outline1(
"MOV BX, %s", _destination );
1542 outline1(
"MOV AX, [%s]", _source );
1547 outline1(
"MOV [%s], AX", _source );
1568 outline1(
"MOV AX, [%s]", _source );
1569 outline1(
"MOV BX, [%s]", _destination );
1594 char destination[
MAX_TEMPORARY_STORAGE]; sprintf( destination,
"CPUMATHMULNBITTONBIT%d_DESTINATION", (_bits>>3));
1606 outhead2(
"CPUMATHMULNBITTONBIT%d_SOURCE: times %d db 0", _bits>>3, _bits>>3 );
1607 outhead2(
"CPUMATHMULNBITTONBIT%d_DESTINATION: times %d db 0", _bits>>3, _bits>>3 );
1608 outhead2(
"CPUMATHMULNBITTONBIT%d_OTHER: times %d db 0", _bits>>3, _bits>>3 );
1610 outhead1(
"CPUMATHMULNBITTONBIT%d:", _bits>>3);
1612 for( i=0; i<(_bits>>3); ++i ) {
1616 outline1(
"MOV CL, 0x%2.2x", _bits );
1618 outhead1(
"CPUMATHMULNBITTONBIT%dL1:", _bits>>3);
1632 char multiplyByBit0Label[
MAX_TEMPORARY_STORAGE]; sprintf( multiplyByBit0Label,
"%sb%dbit0", label, _bits>>3 );
1639 for( i=(_bits>>3)-2; i>-1; --i ) {
1640 sprintf(
offset,
"%d", i );
1645 outline1(
"JC %sx", multiplyByBit0Label );
1646 outline1(
"JMP %s", multiplyByBit0Label );
1647 outhead1(
"%sx:", multiplyByBit0Label );
1653 for( i=0; i<(_bits>>3); ++i ) {
1654 sprintf(
offset,
"%d", i );
1663 outhead1(
"%s:", multiplyByBit0Label);
1669 for( i=1; i<(_bits>>3); ++i ) {
1670 sprintf(
offset,
"%d", i );
1682 outline1(
"JNZ CPUMATHMULNBITTONBIT%dL1", (_bits>>3) );
1695 for( i=0; i<(_bits>>3); ++i ) {
1702 outline1(
"CALL CPUMATHMULNBITTONBIT%d", _bits >> 3 );
1703 for( i=0; i<(_bits>>3); ++i ) {
1733 for( i=1; i<(_bits>>3); ++i ) {
1758 outline1(
"MOV [%s], AL", _remainder);
1766 outline1(
"JNZ %snocomplement", label );
1768 outhead1(
"%snocomplement:", label );
1774 for(
int i=(_bits>>3)-2; i>-1; --i ) {
1784 outline1(
"JNZ %snocomplement2", label );
1786 outhead1(
"%snocomplement2:", label );
1804 outline1(
"MOV AX, [%s]", _source );
1805 outline1(
"MOV BX, [%s]", _destination );
1810 outline1(
"MOV [%s], AX", _destination );
1828 outline1(
"MOV AX, 0x%4.4x", _value );
1829 outline1(
"MOV BX, [%s]", _source );
1831 outline1(
"MOV [%s], AX", _source );
1851 outline1(
"MOV AX, [%s]", _source );
1853 outline1(
"MOV [%s], AL", _remainder );
1857 outline1(
"MOV AX, [%s]", _source );
1858 outline1(
"MOV CL, 0x%2.2x", _steps );
1860 outline1(
"MOV [%s], AX", _source );
1864 outline1(
"MOV AX, [%s]", _source );
1865 outline1(
"MOV CL, 0x%2.2x", _steps );
1867 outline1(
"MOV [%s], AX", _source );
1889 outline1(
"MOV AX, [%s]", _source );
1890 outline1(
"MOV CL, 0x%2.2x", _steps );
1892 outline1(
"MOV [%s], AX", _source );
1909 outline1(
"MOV AX, [%s]", _source );
1910 outline1(
"AND AX, 0x%4.4x", (
unsigned short)( _mask & 0xffff ) );
1911 outline1(
"MOV [%s], AX", _source );
1932 outline1(
"MOV AX, [%s]", _source );
1933 outline1(
"MOV [%s], AX", _destination );
1952 outline1(
"MOV AX, 0x%4.4x", ( _value & 0xffff ) );
1953 outline1(
"MOV [%s], AX", _destination );
1954 outline1(
"MOV AX, 0x%4.4x", ( ( _value >> 16 ) & 0xffff ) );
1977 outline1(
"MOV BX, [%s]", _destination);
1984 outline1(
"MOV AL, 0x%2.2x", 0xff*_positive);
1988 outline1(
"MOV [%s], AL", _destination);
1992 outline1(
"MOV AL, 0x%2.2x", 0xff*(1-_positive));
1996 outline1(
"MOV [%s], AL", _destination);
2020 outline1(
"MOV BX, 0x%4.4x", (
unsigned short)(_destination&0xffff));
2024 outline1(
"MOV BX, 0x%4.4x", (
unsigned short)((_destination>>16)&0xffff));
2027 outline1(
"MOV AL, 0x%2.2x", 0xff*_positive);
2031 outline1(
"MOV AL, 0x%2.2x", 0xff*(1-_positive));
2055 outline1(
"MOV BX, 0x%4.4x", (
unsigned short)(_destination&0xffff));
2059 outline1(
"MOV BX, 0x%4.4x", (
unsigned short)((_destination>>16)&0xffff));
2095 outline1(
"MOV DX, [%s]", _destination);
2114 outline1(
"MOV [%s], AL", _destination);
2132 outline1(
"MOV DX, 0x%4.4x", (
unsigned short)(_destination&0xffff));
2133 outline1(
"MOV CX, 0x%4.4x", (
unsigned short)((_destination>>16)&0xffff));
2151 outline1(
"MOV [%s], AL", _destination);
2173 cpu_not_8bit( _environment, _destination, _destination );
2219 outline1(
"MOV AX, [%s]", _source );
2220 outline1(
"MOV BX, [%s]", _destination );
2225 outline1(
"MOV [%s], AX", _destination );
2244 outline1(
"MOV AX, [%s]", _source );
2245 outline1(
"MOV BX, 0x%4.4x", (
unsigned short)(_destination&0xffff) );
2249 outline1(
"MOV BX, 0x%4.4x", (
unsigned short)((_destination>>16)&0xffff) );
2262 for(
int i=0; i<(_bits>>3); ++i ) {
2311 outline1(
"MOV AX, [%s]", _source );
2312 outline1(
"MOV BX, [%s]", _destination );
2329 for(
int i=0; i<(_bits)>>3; ++i ) {
2355 outline1(
"MOV AX, 0x%4.4x", (
unsigned short)(_value&0xffff) );
2356 outline1(
"MOV BX, [%s]", _source );
2358 outline1(
"MOV [%s], AX", _source );
2360 outline1(
"MOV AX, 0x%4.4x", (
unsigned short)((_value>>16)&0xffff) );
2382 outline1(
"MOV AL, [%s]", _source );
2384 outline1(
"MOV [%s], AL", _remainder );
2396 outline1(
"MOV AX, [%s]", _source );
2403 outline1(
"MOV [%s], AX", _source );
2411 outline1(
"MOV AX, [%s]", _source );
2418 outline1(
"MOV [%s], AX", _source );
2450 outline1(
"MOV AX, [%s]", _source );
2457 outline1(
"MOV [%s], AX", _source );
2465 outline1(
"MOV AX, [%s]", _source );
2472 outline1(
"MOV [%s], AX", _source );
2491 outline1(
"MOV AX, [%s]", _source );
2492 outline1(
"AND AX, 0x%4.4x", (
unsigned short)( _mask & 0xffff ) );
2493 outline1(
"MOV [%s], AX", _source );
2495 outline1(
"AND AX, 0x%4.4x", (
unsigned short)( (_mask>>16) & 0xffff ) );
2509 outline1(
"MOV BL, [%s]", _low_nibble );
2510 outline1(
"MOV AL, [%s]", _hi_nibble );
2530 outline1(
"CALL 0x%4.4x", _address );
2558 if ( strcmp( _register,
"AL" ) == 0 ) {
2560 }
else if ( strcmp( _register,
"AH" ) == 0 ) {
2562 }
else if ( strcmp( _register,
"BL" ) == 0 ) {
2564 }
else if ( strcmp( _register,
"BH" ) == 0 ) {
2566 }
else if ( strcmp( _register,
"CL" ) == 0 ) {
2568 }
else if ( strcmp( _register,
"CH" ) == 0 ) {
2570 }
else if ( strcmp( _register,
"DL" ) == 0 ) {
2572 }
else if ( strcmp( _register,
"DH" ) == 0 ) {
2574 }
else if ( strcmp( _register,
"AX" ) == 0 ) {
2576 }
else if ( strcmp( _register,
"BX" ) == 0 ) {
2578 }
else if ( strcmp( _register,
"CX" ) == 0 ) {
2580 }
else if ( strcmp( _register,
"DX" ) == 0 ) {
2582 }
else if ( strcmp( _register,
"SP" ) == 0 ) {
2584 }
else if ( strcmp( _register,
"BP" ) == 0 ) {
2586 }
else if ( strcmp( _register,
"SI" ) == 0 ) {
2588 }
else if ( strcmp( _register,
"DI" ) == 0 ) {
2590 }
else if ( strcmp( _register,
"CARRY" ) == 0 ) {
2592 }
else if ( strcmp( _register,
"ZERO" ) == 0 ) {
2618 outline1(
"MOV AL, 0x%2.2x", (
unsigned char)(_value & 0xff ) );
2621 outline1(
"MOV AH, 0x%2.2x", (
unsigned char)(_value & 0xff ) );
2624 outline1(
"MOV BL, 0x%2.2x", (
unsigned char)(_value & 0xff ) );
2627 outline1(
"MOV BH, 0x%2.2x", (
unsigned char)(_value & 0xff ) );
2630 outline1(
"MOV CL, 0x%2.2x", (
unsigned char)(_value & 0xff ) );
2633 outline1(
"MOV CH, 0x%2.2x", (
unsigned char)(_value & 0xff ) );
2636 outline1(
"MOV DL, 0x%2.2x", (
unsigned char)(_value & 0xff ) );
2639 outline1(
"MOV DH, 0x%2.2x", (
unsigned char)(_value & 0xff ) );
2642 outline1(
"MOV AX, 0x%4.4x", (
unsigned short)(_value & 0xffff ) );
2645 outline1(
"MOV BX, 0x%4.4x", (
unsigned short)(_value & 0xffff ) );
2648 outline1(
"MOV CX, 0x%4.4x", (
unsigned short)(_value & 0xffff ) );
2651 outline1(
"MOV DX, 0x%4.4x", (
unsigned short)(_value & 0xffff ) );
2654 outline1(
"MOV SP, 0x%4.4x", (
unsigned short)(_value & 0xffff ) );
2657 outline1(
"MOV BP, 0x%4.4x", (
unsigned short)(_value & 0xffff ) );
2660 outline1(
"MOV SI, 0x%4.4x", (
unsigned short)(_value & 0xffff ) );
2663 outline1(
"MOV DI, 0x%4.4x", (
unsigned short)(_value & 0xffff ) );
2675 outline1(
"MOV AL, 0x%2.2x", (
unsigned char)(_value & 0xff ) );
2679 outline1(
"MOV AX, 0x%4.4x", (
unsigned short)(_value & 0xffff) );
2683 outline1(
"MOV AX, 0x%4.4x", (
unsigned short)(_value & 0xffff) );
2685 outline1(
"MOV AX, 0x%4.4x", (
unsigned short)((_value>>16) & 0xffff) );
2708 outline1(
"MOV AL, [%s]", _value );
2711 outline1(
"MOV AH, [%s]", _value );
2714 outline1(
"MOV BL, [%s]", _value );
2717 outline1(
"MOV BH, [%s]", _value );
2720 outline1(
"MOV CL, [%s]", _value );
2723 outline1(
"MOV CH, [%s]", _value );
2726 outline1(
"MOV DL, [%s]", _value );
2729 outline1(
"MOV DH, [%s]", _value );
2732 outline1(
"MOV AX, [%s]", _value );
2735 outline1(
"MOV BX, [%s]", _value );
2738 outline1(
"MOV CX, [%s]", _value );
2741 outline1(
"MOV DX, [%s]", _value );
2744 outline1(
"MOV SP, [%s]", _value );
2747 outline1(
"MOV BP, [%s]", _value );
2750 outline1(
"MOV SI, [%s]", _value );
2753 outline1(
"MOV DI, [%s]", _value );
2765 outline1(
"MOV AL, [%s]", _value );
2769 outline1(
"MOV AX, [%s]", _value );
2773 outline1(
"MOV AX, [%s]", _value );
2798 outline1(
"MOV [%s], AL", _value );
2801 outline1(
"MOV [%s], AH", _value );
2804 outline1(
"MOV [%s], BL", _value );
2807 outline1(
"MOV [%s], BH", _value );
2810 outline1(
"MOV [%s], CL", _value );
2813 outline1(
"MOV [%s], CH", _value );
2816 outline1(
"MOV [%s], DL", _value );
2819 outline1(
"MOV [%s], DH", _value );
2822 outline1(
"MOV [%s], AX", _value );
2825 outline1(
"MOV [%s], BX", _value );
2828 outline1(
"MOV [%s], CX", _value );
2831 outline1(
"MOV [%s], DX", _value );
2834 outline1(
"MOV [%s], SP", _value );
2837 outline1(
"MOV [%s], BP", _value );
2840 outline1(
"MOV [%s], SI", _value );
2843 outline1(
"MOV [%s], DI", _value );
2856 outline1(
"MOV [%s], AL", _value );
2860 outline1(
"MOV [%s], AX", _value );
2866 outline1(
"MOV [%s], AX", _value );
2920 outline1(
"MOV [%s], AL", _result );
2931 outline1(
"MOV [%s], AX", _result );
2942 outline1(
"MOV [%s], AX", _result );
2952 outline1(
"MOV AL, [%s]", _variable );
2953 outline1(
"CMP AL, 0x%2.2x", (
unsigned char)(_value&0xff) );
2955 outline1(
"SUB AL, 0x%2.2x", (
unsigned char)(_value&0xff) );
2956 outline1(
"MOV [%s], AL", _variable );
2965 outline1(
"MOV AL, [%s]", _timing );
2999 outline1(
"MOV [%s], AL", _result );
3003 outline1(
"MOV [%s], AL", _result );
3013 outline1(
"MOV [%s], AL", _result );
3020 outline1(
"MOV AH, 0x%2.2x", _right );
3022 outline1(
"MOV [%s], AL", _result );
3031 outline1(
"MOV [%s], AX", _result );
3054 outline1(
"MOV [%s], AL", _result );
3060 outline1(
"MOV [%s], AL", _result );
3064 outline1(
"MOV [%s], AL", _result );
3074 outline1(
"MOV [%s], AL", _result );
3081 outline1(
"MOV AH, 0x%2.2x", _right );
3083 outline1(
"MOV [%s], AL", _result );
3092 outline1(
"MOV [%s], AX", _result );
3112 outline1(
"MOV [%s], AL", _result );
3119 outline1(
"MOV AH, 0x%2.2x", _right );
3121 outline1(
"MOV [%s], AL", _result );
3130 outline1(
"MOV [%s], AX", _result );
3137 outline1(
"MOV BX, 0x%4.4x", _right );
3139 outline1(
"MOV [%s], AX", _result );
3160 (
unsigned short)((_right>>16)&0xffff),
3205 outline1(
"MOV [%s], AL", _result );
3213 outline1(
"MOV [%s], AL", _result );
3221 outline1(
"MOV [%s], AX", _result );
3249 outline1(
"MOV AL, [%s]", _variable );
3251 outline1(
"MOV [%s], AL", _variable );
3257 outline1(
"MOV AL, [%s]", _variable );
3259 outline1(
"MOV [%s], AL", _variable );
3265 outline1(
"MOV AX, [%s]", _variable );
3267 outline1(
"MOV [%s], AX", _variable );
3275 outline1(
"MOV AX, [%s]", _variable );
3277 outline1(
"MOV [%s], AX", _variable );
3292 for(
int i=0; i<(_bits>>3);++i ) {
3307 outline1(
"MOV AX, [%s]", _variable );
3309 outline1(
"MOV [%s], AX", _variable );
3317 outline1(
"MOV AX, [%s]", _variable );
3319 outline1(
"MOV [%s], AX", _variable );
3335 for(
int i=0; i<(_bits>>3); ++i ) {
3364 outline1(
"MOV AL, [%s]", _destination);
3374 for( i=(_bits>>3)-1; i>-1; --i ) {
3380 outline2(
"JZ %snext%dx", label, i );
3422 for( i=(_bits>>3)-2; i>-1; --i ) {
3424 outline1(
"MOV BL, $%2.2x", (
unsigned char)((_destination>>(i*8))&0xff) );
3427 outline2(
"JZ %snext%dx", label, i );
3451 deploy( duff, src_hw_8086_duff_asm );
3454 outline1(
"MOV DI, [%s]", _destination);
3463 deploy( duff, src_hw_8086_duff_asm );
3466 outline1(
"MOV DI, [%s]", _destination);
3474 deploy( duff, src_hw_8086_duff_asm );
3477 outline1(
"MOV DI, %s", _destination);
3486 deploy( duff, src_hw_8086_duff_asm );
3489 outline1(
"MOV DI, %s", _destination);
3497 deploy( duff, src_hw_8086_duff_asm );
3500 outline1(
"MOV DI, %s", _destination);
3501 outline1(
"MOV CX, 0x%4.4x", _size );
3510 deploy( duff, src_hw_8086_duff_asm );
3513 outline1(
"MOV DI, [%s]", _destination);
3514 outline1(
"MOV CX, 0x%4.4x", _size );
3525 deploy( duff, src_hw_8086_duff_asm );
3528 outline1(
"MOV DI, %s", _destination);
3529 outline1(
"MOV CX, 0x%4.4x", _size );
3540 deploy( duff, src_hw_8086_duff_asm );
3543 outline1(
"MOV DI, [%s]", _destination);
3544 outline1(
"MOV CX, 0x%4.4x", _size );
3555 deploy( duff, src_hw_8086_duff_asm );
3558 outline1(
"MOV DI, %s", _destination);
3559 outline1(
"MOV CX, 0x%4.4x", _size );
3571 outline1(
"MOV DI, [%s]", _destination);
3584 outline1(
"MOV AL, 0x%2.2x", _equal ? 255 : 0 );
3585 outline1(
"MOV [%s], AL", _result );
3588 outline1(
"MOV AL, 0x%2.2x", _equal ? 0 : 255 );
3589 outline1(
"MOV [%s], AL", _result );
3599 outline1(
"MOV DI, [%s]", _destination);
3600 outline1(
"MOV CX, 0x%4.4x", (
unsigned short)(_size&0xffff));
3612 outline1(
"MOV AL, 0x%2.2x", _equal ? 255 : 0 );
3613 outline1(
"MOV [%s], AL", _result );
3616 outline1(
"MOV AL, 0x%2.2x", _equal ? 0 : 255 );
3617 outline1(
"MOV [%s], AL", _result );
3634 sprintf( greaterLabel,
"%sgt", label );
3636 sprintf( lesserLabel,
"%slt", label );
3639 outline1(
"MOV DI, [%s]", _destination);
3672 sprintf( greaterLabel,
"%sgt", label );
3674 sprintf( lesserLabel,
"%slt", label );
3677 outline1(
"MOV DI, [%s]", _destination);
3678 outline1(
"MOV CX, 0x%4.4x", (
unsigned short)(_size&0xffff));
3721 outline1(
"MOV AX, [%s]", _source );
3722 outline1(
"MOV BL, [%s]", _destination );
3728 outline1(
"MOV [%s], AX", _destination );
3735 outline1(
"MOV AX, [%s]", _source );
3736 outline1(
"MOV BL, [%s]", _destination );
3742 outline1(
"MOV [%s], AX", _destination );
3752 outline1(
"MOV SI, [%s]", _source );
3754 outline1(
"MOV DI, [%s]", _result );
3756 outline1(
"MOV DI, [%s]", _source );
3788 outline1(
"MOV SI, [%s]", _source );
3790 outline1(
"MOV DI, [%s]", _result );
3792 outline1(
"MOV DI, [%s]", _source );
3835 outline0(
"CALL CONVERTSTRING16BIT" );
3836 outline1(
"MOV [%s], AX", _value );
3847 outline1(
"MOV DI, [%s]", _address);
3848 outline1(
"MOV SI, [%s]", _pattern);
3851 if ( _size_size >= 16 ) {
3882 if ( _destination ) {
3883 outline1(
"MOV DI, [%s]", _destination);
3900 outline1(
"MOV DI, [%s]", _destination);
3919 outline1(
"MOV AL, [%s]", _offset );
3930 outline1(
"MOV AX, 0x%2.2x", ( _offset & 0xff ) );
3952 outline1(
"MOV [%s], AL", _source );
3962 outline1(
"MOV [%s], AL", _source );
3990 outline1(
"MOV [%s], AX", _source );
4015 sprintf( step,
"%d", stepIndex );
4016 sprintf( step2,
"%d", stepIndex+2 );
4030 case 32:
case 31:
case 30:
case 29:
4031 case 28:
case 27:
case 26:
case 25:
4041 case 24:
case 23:
case 22:
case 21:
4042 case 20:
case 19:
case 18:
case 17:
4051 case 16:
case 15:
case 14:
case 13:
4052 case 12:
case 11:
case 10:
case 9:
4058 case 8:
case 7:
case 6:
case 5:
4059 case 4:
case 3:
case 2:
case 1:
4092 sprintf( step,
"%d", stepIndex );
4093 sprintf( step2,
"%d", stepIndex+2 );
4107 case 32:
case 31:
case 30:
case 29:
4108 case 28:
case 27:
case 26:
case 25:
4118 case 24:
case 23:
case 22:
case 21:
4119 case 20:
case 19:
case 18:
case 17:
4128 case 16:
case 15:
case 14:
case 13:
4129 case 12:
case 11:
case 10:
case 9:
4135 case 8:
case 7:
case 6:
case 5:
4136 case 4:
case 3:
case 2:
case 1:
4153 outline1(
"MOV AX, [%s]", _source );
4154 outline1(
"MOV BX, [%s]", _destination );
4162 outline1(
"MOV [%s], DX", _other_remainder);
4172 outline1(
"MOV AX, [%s]", _source );
4173 outline1(
"MOV BX, 0x%4.4x", _destination );
4181 outline1(
"MOV [%s], DX", _other_remainder);
4191 outline1(
"MOV AX, [%s]", _source );
4192 outline1(
"MOV BX, [%s]", _destination );
4200 outline1(
"MOV [%s], DX", _other_remainder);
4210 outline1(
"MOV AX, [%s]", _source );
4211 outline1(
"MOV BX, 0x%4.4x", (
unsigned short)(_destination&0xffff) );
4219 outline1(
"MOV [%s], DX", _other_remainder);
4228 outline1(
"MOV AX, [%s]", _source );
4229 outline1(
"MOV BL, [%s]", _destination );
4237 outline1(
"MOV [%s], DX", _other_remainder);
4246 outline1(
"MOV AL, [%s]", _source );
4247 outline1(
"MOV BL, 0x%2.2x", (
unsigned char)(_destination&0xff) );
4255 outline1(
"MOV [%s], DX", _other_remainder);
4273 char quotient[
MAX_TEMPORARY_STORAGE]; sprintf( quotient,
"CPUMATHDIVNBITTONBIT%d_QUOTIENT", _bits >> 3 );
4274 char divisor[
MAX_TEMPORARY_STORAGE]; sprintf( divisor,
"CPUMATHDIVNBITTONBIT%d_DIVISOR", _bits >> 3 );
4275 char dividend[
MAX_TEMPORARY_STORAGE]; sprintf( dividend,
"CPUMATHDIVNBITTONBIT%d_DIVIDEND", _bits >> 3 );
4276 char result1[
MAX_TEMPORARY_STORAGE]; sprintf( result1,
"CPUMATHDIVNBITTONBIT%d_RESULT1", _bits >> 3 );
4277 char result2[
MAX_TEMPORARY_STORAGE]; sprintf( result2,
"CPUMATHDIVNBITTONBIT%d_RESULT2", _bits >> 3 );
4282 cpu_jump( _environment, afterLabel );
4284 outhead2(
"%s: times %d db 0", quotient, _bits>>3 );
4285 outhead2(
"%s: times %d db 0", divisor, _bits>>3 );
4286 outhead2(
"%s: times %d db 0", dividend, _bits>>3 );
4294 outhead1(
"CPUMATHDIVNBITTONBIT%d:", _bits>>3);
4296 for( i=0; i<(_bits>>3); ++i ) {
4309 cpu_and_8bit( _environment, result1, result2, result1 );
4349 cpu_jump( _environment, skip4Label );
4354 cpu_jump( _environment, skipLabel );
4365 for( i=0; i<(_bits>>3); ++i ) {
4372 outline1(
"CALL CPUMATHDIVNBITTONBIT%d", _bits>>3);
4374 for( i=0; i<(_bits>>3); ++i ) {
4403 cpu_jump( _environment, afterLabel );
4405 outhead2(
"%s: times %d db 0", data, _bits>>3 );
4411 for( i=0; i<(_bits>>3); ++i ) {
4413 outline1(
"MOL AL, 0x%2.2x", (
unsigned char)( (_destination >> (i*8)) & 0xff ) );
4430 outline1(
"MOV AL, 0x%2.2x", _position );
4431 outline0(
"CALL CPUBITCHECKEXTENDED" );
4450 outline1(
"MOV AL, [%s]", _position );
4451 outline0(
"CALL CPUBITCHECKEXTENDED" );
4469 embedded( cpu_bit_inplace, src_hw_8086_cpu_bit_inplace_asm );
4480 outline1(
"MOV AL, 0x%2.2x", _position);
4495 embedded( cpu_bit_inplace, src_hw_8086_cpu_bit_inplace_asm );
4505 outline1(
"MOV DI, [%s]", _address );
4506 outline1(
"MOV AL, [%s]", _position);
4570 outline1(
"MOV AL, [N2DINV+%d]", (_bits >> 3)-1 );
4584 outline0(
"CALL NUMBERTOSTRINGSIGNED");
4585 outline1(
"MOV [%s], AL", _string_size);
4605 outline0(
"MOV [BINTOSTRDIGIT0], AL" );
4612 outline0(
"MOV [BINTOSTRDIGIT1], AL" );
4617 outline1(
"MOV BX, [%s]", _number );
4621 outline1(
"MOV BX, [%s]", _number );
4626 outline1(
"MOV BL, [%s]", _number );
4633 outline1(
"MOV AL, 0x%2.2x", ( _bits & 0xff ) );
4634 outline1(
"MOV [%s], AL", _string_size );
4644 outline1(
"MOV BL, 0X%2.2x", 2 + (_separator?1:0));
4647 outline1(
"MOV [%s], AL", _string_size );
4655 outline1(
"MOV AL, $%2.2x", (
unsigned char)(_size&0xff) );
4657 outline1(
"MOV BL, 0X%2.2x", 2 + (_separator?1:0));
4660 outline1(
"MOV [%s], AL", _string_size );
4672 outline1(
"MOV BL, 0x%2.2x", (
unsigned char)(_separator));
4674 outline1(
"MOV SI, [%s]", _number );
4675 outline1(
"MOV DI, [%s]", _string );
4682void cpu_encrypt(
Environment * _environment,
char * _data,
char * _data_size,
char * _key,
char * _key_size,
char * _output ) {
4688 outline1(
"MOV DI, (%s)", _output );
4689 outline1(
"MOV CH, (%s)", _key_size );
4690 outline1(
"MOV CL, (%s)", _data_size );
4695void cpu_decrypt(
Environment * _environment,
char * _data,
char * _data_size,
char * _key,
char * _key_size,
char * _output,
char * _result ) {
4701 outline1(
"MOV DI, (%s)", _output );
4702 outline1(
"MOV CH, (%s)", _key_size );
4703 outline1(
"MOV CL, (%s)", _data_size );
4706 outline1(
"MOV [%s], AL", _result );
4712 deploy( duff, src_hw_8086_duff_asm );
4713 deploy( dstring,src_hw_8086_dstring_asm );
4717 outline1(
"MOV [%s], BL", _index );
4723 deploy( duff, src_hw_8086_duff_asm );
4724 deploy( dstring,src_hw_8086_dstring_asm );
4728 outline1(
"MOV [%s], BL", _index );
4734 deploy( duff, src_hw_8086_duff_asm );
4735 deploy( dstring,src_hw_8086_dstring_asm );
4737 outline1(
"MOV CL, 0x%2.2x", ( _size & 0xff ) );
4739 outline1(
"MOV [%s], BL", _index );
4745 deploy( duff, src_hw_8086_duff_asm );
4746 deploy( dstring,src_hw_8086_dstring_asm );
4748 outline1(
"MOV BL, [%s]", _index );
4755 deploy( duff, src_hw_8086_duff_asm );
4756 deploy( dstring,src_hw_8086_dstring_asm );
4758 outline1(
"MOV BL, [%s]", _index );
4765 deploy( duff, src_hw_8086_duff_asm );
4766 deploy( dstring,src_hw_8086_dstring_asm );
4768 outline1(
"MOV BL, [%s]", _index );
4769 outline1(
"MOV CL, [%s]", _resize );
4776 deploy( duff, src_hw_8086_duff_asm );
4777 deploy( dstring,src_hw_8086_dstring_asm );
4779 outline1(
"MOV BL, [%s]", _index );
4780 outline1(
"MOV CL, 0x%2.2x", ( _resize & 0xff ) );
4787 deploy( duff, src_hw_8086_duff_asm );
4788 deploy( dstring,src_hw_8086_dstring_asm );
4796 deploy( duff, src_hw_8086_duff_asm );
4797 deploy( dstring,src_hw_8086_dstring_asm );
4805 deploy( duff, src_hw_8086_duff_asm );
4806 deploy( dstring,src_hw_8086_dstring_asm );
4808 if ( _address || _size ) {
4809 outline1(
"MOV BL, [%s]", _index );
4817 outline1(
"MOV [%s], DX", _address );
4826 deploy( dstring,src_hw_8086_dstring_asm );
4828 outline1(
"MOV AL, [%s]", _original );
4837 deploy( duff, src_hw_8086_duff_asm );
4838 deploy( dstring,src_hw_8086_dstring_asm );
4850 outline1(
"MOV CL, [%s]", _offset );
4859 outline1(
"MOV AL, [%s]", _source );
4861 if ( _destination ) {
4862 outline1(
"MOV [%s], AL", _destination );
4864 outline1(
"MOV [%s], AL", _source );
4866 if ( _destination ) {
4867 cpu_inc( _environment, _destination );
4869 cpu_inc( _environment, _source );
4874 outline1(
"MOV AX, [%s]", _source );
4876 if ( _destination ) {
4877 outline1(
"MOV [%s], AX", _destination );
4879 outline1(
"MOV [%s], AX", _source );
4881 if ( _destination ) {
4889 outline1(
"MOV AX, [%s]", _source );
4891 if ( _destination ) {
4892 outline1(
"MOV [%s], AX", _destination );
4894 outline1(
"MOV [%s], AX", _source );
4898 if ( _destination ) {
4903 if ( _destination ) {
4912 for(
int i=0; i<(_bits>>3); ++i ) {
4916 if ( _destination ) {
4922 if ( _destination ) {
4932 deploy( sqr, src_hw_8086_sqr_asm );
4934 outline1(
"MOV AX, [%s]", _number );
4939 outline1(
"MOV [%s], AX", _result );
4948 outhead1(
"stringscount EQU %d", count );
4949 outhead1(
"stringsspace EQU %d", space );
4950 outhead0(
"MAXSTRINGS: db stringscount" );
4951 outhead0(
"DESCRIPTORS: times stringscount*4 db 0" );
4952 outhead0(
"WORKING: times stringsspace db 0" );
4953 outhead0(
"TEMPORARY: times stringsspace db 0" );
4954 outhead0(
"FREE_STRING: dw (stringsspace-1)" );
4962 outhead1(
"PROTOTHREADLC: times %d db 0", count );
4963 outhead1(
"PROTOTHREADST: times %d db 0", count );
4967 for(
int i=0; i<count; ++i ) {
4969 outline0(
"MOV [PROTOTHREADCT], AL" );
4972 outhead1(
"PROTOTHREADCOUNT: db %d", count );
4992 outline0(
"CALL PROTOTHREADREGAT" );
5014 outline0(
"CALL PROTOTHREADUNREG" );
5023 outline1(
"MOV AL, 0x%2.2x", ( _step & 0xff ) );
5035 outline0(
"CALL PROTOTHREADRESTORE" );
5046 outline1(
"MOV AL, 0x%2.2x", ( _state & 0xff ) );
5048 outline0(
"CALL PROTOTHREADSETSTATE" );
5057 outline0(
"CALL PROTOTHREADGETSTATE" );
5067 outline0(
"CALL PROTOTHREADGETADDRESS" );
5068 outline1(
"MOV [%s], DI", _address );
5076 outline0(
"MOV AL, [PROTOTHREADCT]" );
5077 outline1(
"MOV [%s], AL", _current );
5084 outline1(
"MOV DI, %s", _callback );
5093 inline( cpu_msc1_uncompress )
5095 embedded( cpu_msc1_uncompress, src_hw_8086_msc1_asm );
5109 inline( cpu_msc1_uncompress )
5111 embedded( cpu_msc1_uncompress, src_hw_8086_msc1_asm );
5125 inline( cpu_msc1_uncompress )
5127 embedded( cpu_msc1_uncompress, src_hw_8086_msc1_asm );
5141 inline( cpu_msc1_uncompress )
5143 embedded( cpu_msc1_uncompress, src_hw_8086_msc1_asm );
5185void cpu_string_sub(
Environment * _environment,
char * _source,
char * _source_size,
char * _pattern,
char * _pattern_size,
char * _destination,
char * _destination_size ) {
5194 outline1(
"MOV CL, [%s]", _source_size);
5195 outline1(
"MOV DX, [%s]", _pattern);
5196 outline1(
"MOV CH, [%s]", _pattern_size);
5197 outline1(
"MOV DI, [%s]", _destination);
5200 outline1(
"MOV [%s], AL", _destination_size);
5205static char CPU8086_BLIT_REGISTER[][2] = {
5212#define CPU8086_BLIT_REGISTER_COUNT ( sizeof( CPU8086_BLIT_REGISTER ) / 2 )
5241 return &CPU8086_BLIT_REGISTER[_register][0];
5243 return &CPU8086_BLIT_REGISTER[ (_register & 0xff00) >> 8][0];
5252 int registerMask = ( 0x01 << reg );
5254 if ( ! isRegisterUsed ) {
5264 if ( location > 0xff ) {
5269 int registerMask = ( 0x10 << reg );
5271 if ( ! isRegisterUsed ) {
5272 outline1(
"MOV AL, %s", &CPU8086_BLIT_REGISTER[reg][0] );
5277 return ( ( (reg+1) << 8 ) | location );
5291 int location = _register & 0xff;
5295 int registerMask = ( 0x01 << _register );
5297 if ( isRegisterUsed ) {
5304 int registerMask = 0x10 << ( ( ( _register >> 8 ) & 0xff ) - 1 );
5306 if ( isRegisterUsed ) {
5308 outline1(
"MOV %s, AL", &CPU8086_BLIT_REGISTER[reg][0] );
5330 char destinationAddress[
MAX_TEMPORARY_STORAGE]; sprintf( destinationAddress,
"%s+%d", _destination, i*4 );
5333 case 1:
case 2:
case 3:
case 4:
5334 case 5:
case 6:
case 7:
case 8:
5335 cpu_store_8bit( _environment, destinationAddress, ( _value[(i*4)] & (0xff>>(8-_n)) ) );
5338 case 9:
case 10:
case 11:
case 12:
5339 case 13:
case 14:
case 15:
case 16:
5340 cpu_store_8bit( _environment, destinationAddress, ( _value[(i*4)] & (0xff) ) );
5341 sprintf( destinationAddress,
"%s+%d", _destination, i*4+1 );
5342 cpu_store_8bit( _environment, destinationAddress, ( _value[(i*4)+1] & (0xff>>(16-_n)) ) );
5345 case 17:
case 18:
case 19:
case 20:
5346 case 21:
case 22:
case 23:
case 24:
5347 cpu_store_8bit( _environment, destinationAddress, ( _value[(i*4)] & (0xff) ) );
5348 sprintf( destinationAddress,
"%s+%d", _destination, i*4+1 );
5349 cpu_store_8bit( _environment, destinationAddress, ( _value[(i*4)+1] & (0xff) ) );
5350 sprintf( destinationAddress,
"%s+%d", _destination, i*4+2 );
5351 cpu_store_8bit( _environment, destinationAddress, ( _value[(i*4)+2] & (0xff>>(24-_n)) ) );
5354 case 25:
case 26:
case 27:
case 28:
5355 case 29:
case 30:
case 31:
case 32:
5357 cpu_store_8bit( _environment, destinationAddress, ( _value[(i*4)] & (0xff) ) );
5358 sprintf( destinationAddress,
"%s+%d", _destination, i*4+1 );
5359 cpu_store_8bit( _environment, destinationAddress, ( _value[(i*4)+1] & (0xff) ) );
5360 sprintf( destinationAddress,
"%s+%d", _destination, i*4+2 );
5361 cpu_store_8bit( _environment, destinationAddress, ( _value[(i*4)+2] & (0xff) ) );
5362 sprintf( destinationAddress,
"%s+%d", _destination, i*4+3 );
5363 cpu_store_8bit( _environment, destinationAddress, ( _value[(i*4)+3] & (0xff>>(32-_n)) ) );
5369 cpu_store_8bit( _environment, destinationAddress, ( _value[(i*4)] & (0xff) ) );
5370 sprintf( destinationAddress,
"%s+%d", _destination, i*4+1 );
5371 cpu_store_8bit( _environment, destinationAddress, ( _value[(i*4)+1] & (0xff) ) );
5372 sprintf( destinationAddress,
"%s+%d", _destination, i*4+2 );
5373 cpu_store_8bit( _environment, destinationAddress, ( _value[(i*4)+2] & (0xff) ) );
5374 sprintf( destinationAddress,
"%s+%d", _destination, i*4+3 );
5375 cpu_store_8bit( _environment, destinationAddress, ( _value[(i*4)+3] & (0xff>>(32-_n)) ) );
5396 char destinationAddress[
MAX_TEMPORARY_STORAGE]; sprintf( destinationAddress,
"%s+%d", _destination, i*4 );
5399 case 1:
case 2:
case 3:
case 4:
5400 case 5:
case 6:
case 7:
case 8:
5401 cpu_move_8bit( _environment, sourceAddress, destinationAddress );
5403 case 9:
case 10:
case 11:
case 12:
5404 case 13:
case 14:
case 15:
case 16:
5405 cpu_move_8bit( _environment, sourceAddress, destinationAddress );
5406 sprintf( sourceAddress,
"%s+%d", _source, i*4+1 );
5407 sprintf( destinationAddress,
"%s+%d", _destination, i*4+1 );
5408 cpu_move_8bit( _environment, sourceAddress, destinationAddress );
5410 case 17:
case 18:
case 19:
case 20:
5411 case 21:
case 22:
case 23:
case 24:
5412 cpu_move_8bit( _environment, sourceAddress, destinationAddress );
5413 sprintf( sourceAddress,
"%s+%d", _source, i*4+1 );
5414 sprintf( destinationAddress,
"%s+%d", _destination, i*4+1 );
5415 cpu_move_8bit( _environment, sourceAddress, destinationAddress );
5416 sprintf( sourceAddress,
"%s+%d", _source, i*4+2 );
5417 sprintf( destinationAddress,
"%s+%d", _destination, i*4+2 );
5418 cpu_move_8bit( _environment, sourceAddress, destinationAddress );
5420 case 25:
case 26:
case 27:
case 28:
5421 case 29:
case 30:
case 31:
case 32:
5423 cpu_move_8bit( _environment, sourceAddress, destinationAddress );
5424 sprintf( sourceAddress,
"%s+%d", _source, i*4+1 );
5425 sprintf( destinationAddress,
"%s+%d", _destination, i*4+1 );
5426 cpu_move_8bit( _environment, sourceAddress, destinationAddress );
5427 sprintf( sourceAddress,
"%s+%d", _source, i*4+2 );
5428 sprintf( destinationAddress,
"%s+%d", _destination, i*4+2 );
5429 cpu_move_8bit( _environment, sourceAddress, destinationAddress );
5430 sprintf( sourceAddress,
"%s+%d", _source, i*4+3 );
5431 sprintf( destinationAddress,
"%s+%d", _destination, i*4+3 );
5432 cpu_move_8bit( _environment, sourceAddress, destinationAddress );
5437 cpu_move_8bit( _environment, sourceAddress, destinationAddress );
5438 sprintf( sourceAddress,
"%s+%d", _source, i*4+1 );
5439 sprintf( destinationAddress,
"%s+%d", _destination, i*4+1 );
5440 cpu_move_8bit( _environment, sourceAddress, destinationAddress );
5441 sprintf( sourceAddress,
"%s+%d", _source, i*4+2 );
5442 sprintf( destinationAddress,
"%s+%d", _destination, i*4+2 );
5443 cpu_move_8bit( _environment, sourceAddress, destinationAddress );
5444 sprintf( sourceAddress,
"%s+%d", _source, i*4+3 );
5445 sprintf( destinationAddress,
"%s+%d", _destination, i*4+3 );
5446 cpu_move_8bit( _environment, sourceAddress, destinationAddress );
5469 for(
int i=0; i<(_bits>>3); ++i ) {
5475 outline1(
"MOV AL, 0x%2.2x", 0xff*_positive);
5479 outline1(
"MOV [%s], AL", _destination);
5483 outline1(
"MOV AL, 0x%2.2x", 0xff*(1-_positive));
5487 outline1(
"MOV [%s], AL", _destination);
5501 for(
int i=0; i<(_bits>>3); ++i ) {
5504 outline1(
"CMP AL, 0x%2.2x", (
unsigned char)((_destination>>(i*8)) && 0xff));
5507 outline1(
"MOV AL, 0x%2.2x", 0xff*_positive);
5511 outline1(
"MOV [%s], AL", _destination);
5515 outline1(
"MOV AL, 0x%2.2x", 0xff*(1-_positive));
5519 outline1(
"MOV [%s], AL", _destination);
5544 double integral = 0.0;
5545 double fractional = 0.0;
5551 int mantissa_bits = 23;
5553 memset( &right[0], 0,
sizeof(
int ) * 3 );
5560 if ( _value >= 0 ) {
5566 value = fabs( _value );
5575 fractional = modf(value, &integral);
5577 left = (
unsigned int) integral;
5595 while( ( fractional != 1.0 ) && ( steps < mantissa_bits ) ) {
5599 right[2] = right[2] << 1;
5600 right[1] = right[1] << 1;
5601 right[0] = right[0] << 1;
5602 if ( ( right[2] & 0x100 ) ) {
5603 right[1] = right[1] | 0x1;
5605 if ( ( right[1] & 0x100 ) ) {
5606 right[0] = right[0] | 0x1;
5608 right[2] = right[2] & 0xff;
5609 right[1] = right[1] & 0xff;
5610 right[0] = right[0] & 0x7f;
5612 fractional = fractional * 2;
5614 if ( fractional >= 1.0 ) {
5616 fractional = modf(fractional, &integral);
5641 int mantissa_high_bit = 0x80000000 >> ( 32 - mantissa_bits);
5642 int mantissa_mask = 0xffffffff >> ( 32 - mantissa_bits);
5648 while( left == 0 ) {
5652 if ( right[0] & 0x40 ) {
5656 right[0] = right[0] << 1;
5657 right[1] = right[1] << 1;
5658 right[2] = right[2] << 1;
5659 if ( ( right[1] & 0x100 )) {
5660 right[0] = right[0] | 0x1;
5662 if ( ( right[2] & 0x100 )) {
5663 right[1] = right[1] | 0x1;
5665 right[0] = right[0] & 0x7f;
5666 right[1] = right[1] & 0xff;
5667 right[2] = right[2] & 0xff;
5686 if ( ( right[0] & 0x01 ) ) {
5687 right[1] = right[1] | 0x100;
5689 if ( ( right[1] & 0x01 ) ) {
5690 right[2] = right[2] | 0x100;
5692 right[0] = right[0] >> 1;
5693 right[1] = right[1] >> 1;
5696 right[0] = right[0] | 0x40;
5703 right[2] = right[2] << 1;
5704 right[1] = right[1] << 1;
5705 right[0] = right[0] << 1;
5706 if ( right[2] & 0x100 ) {
5707 right[1] = right[1] | 0x01;
5709 if ( right[1] & 0x100 ) {
5710 right[0] = right[0] | 0x01;
5712 right[2] = right[2] & 0xff;
5713 right[1] = right[1] & 0xff;
5714 right[0] = right[0] & 0x7f;
5760 _result[3] = (
sign << 7 ) | ( ( exp >> 1 ) & 0x7f );
5761 _result[2] = ( ( exp & 0x01 ) << 7 ) | ( right[0] );
5762 _result[1] = ( right[1] );
5763 _result[0] = ( right[2] );
5788 deploy( fp_vars, src_hw_8086_fp_vars_asm );
5789 deploy( fp_single_to_string, src_hw_8086_fp_single_to_string_asm );
5790 deploy( numberToString, src_hw_8086_number_to_string_asm );
5791 deploy( duff, src_hw_8086_duff_asm );
5793 outline1(
"MOV DI, [%s]", _string );
5796 outline1(
"MOV [%s], CL", _string_size );
5890 deploy( fp_vars, src_hw_8086_fp_vars_asm );
5892 outline1(
"FILD WORD [%s]", _value );
5893 outline1(
"FSTP DWORD [%s]", _result );
5899 deploy( fp_vars, src_hw_8086_fp_vars_asm );
5901 outline1(
"FILD BYTE [%s]", _value );
5902 outline1(
"FSTP DWORD [%s]", _result );
5908 deploy( fp_vars, src_hw_8086_fp_vars_asm );
5910 outline1(
"FLD DWORD [%s]", _value );
5911 outline1(
"FISTP WORD [%s]", _result );
5917 deploy( fp_vars, src_hw_8086_fp_vars_asm );
5919 outline1(
"FLD BYTE [%s]", _value );
5920 outline1(
"FISTP BYTE [%s]", _result );
5926 deploy( fp_vars, src_hw_8086_fp_vars_asm );
5931 outline1(
"FSTP DWORD [%s]", _result );
5937 deploy( fp_vars, src_hw_8086_fp_vars_asm );
5942 outline1(
"FSTP DWORD [%s]", _result );
5948 deploy( fp_vars, src_hw_8086_fp_vars_asm );
5953 outline1(
"FSTP DWORD [%s]", _result );
5959 deploy( fp_vars, src_hw_8086_fp_vars_asm );
5964 outline1(
"FSTP DWORD [%s]", _result );
5972 deploy( fp_vars, src_hw_8086_fp_vars_asm );
5978 outline0(
"AND AX, %0100011100000000");
5979 outline0(
"CMP AX, %0000000000000000");
5981 outline0(
"CMP AX, %0000000100000000B");
5983 outline0(
"CMP AX, %0100000000000000B");
5987 outline1(
"MOV [%s], A", _result );
5991 outline1(
"MOV [%s], AL", _result );
5995 outline1(
"MOV [%s], AL", _result );
6003 deploy( fp_vars, src_hw_8086_fp_vars_asm );
6009 outline1(
"FLD DWORD [%s]", _value );
6011 outline1(
"FSTP DWORD [%s]", _result );
6023 deploy( fp_vars, src_hw_8086_fp_vars_asm );
6024 deploy( fp_single_cos, src_hw_8086_fp_cos_asm );
6026 outline1(
"FLD DWORD [%s]", _angle );
6028 outline1(
"FSTP DWORD [%s]", _result );
6034 deploy( fp_vars, src_hw_8086_fp_vars_asm );
6036 outline1(
"FLD DWORD [%s]", _angle );
6038 outline1(
"FSTP DWORD [%s]", _result );
6107 outline1(
"MOV AL, [%s]", _source );
6109 outline1(
"MOV [%s], AX", _destination );
6115 outline1(
"MOV AL, [%s]", _source );
6117 outline1(
"MOV [%s], AX", _destination );
6123 outline1(
"MOV AL, [%s]", _source );
6125 outline1(
"MOV [%s], AX", _destination );
6131 outline1(
"MOV AL, [%s]", _source );
6133 outline1(
"MOV [%s], AX", _destination );
6139 outline1(
"MOV AL, [%s]", _source );
6142 outline1(
"MOV [%s], AX", _destination );
6149 outline1(
"MOV AL, [%s]", _source );
6152 outline1(
"MOV [%s], AX", _destination );
6159 outline1(
"MOV AL, [%s]", _source );
6161 outline1(
"MOV [%s], AX", _destination );
6168 outline1(
"MOV AL, [%s]", _source );
6170 outline1(
"MOV [%s], AX", _destination );
6178 outline1(
"MOV AX, [%s]", _source );
6179 outline1(
"MOV [%s], AL", _destination );
6185 outline1(
"MOV AX, [%s]", _source );
6186 outline1(
"MOV [%s], AL", _destination );
6191 outline1(
"MOV AX, [%s]", _source );
6192 outline1(
"MOV [%s], AL", _destination );
6197 outline1(
"MOV AX, [%s]", _source );
6198 outline1(
"MOV [%s], AL", _destination );
6204 outline1(
"MOV AX, [%s]", _source );
6206 outline1(
"MOV [%s], AX", _destination );
6213 outline1(
"MOV AX, [%s]", _source );
6215 outline1(
"MOV [%s], AX", _destination );
6222 outline1(
"MOV AX, [%s]", _source );
6224 outline1(
"MOV [%s], AX", _destination );
6230 outline1(
"MOV AX, [%s]", _source );
6232 outline1(
"MOV [%s], AX", _destination );
6239 outline1(
"MOV AL, [%s]", _source );
6240 outline1(
"MOV [%s], AL", _destination );
6245 outline1(
"MOV AL, [%s]", _source );
6246 outline1(
"MOV [%s], AL", _destination );
6251 outline1(
"MOV AL, [%s]", _source );
6252 outline1(
"MOV [%s], AL", _destination );
6257 outline1(
"MOV AL, [%s]", _source );
6258 outline1(
"MOV [%s], AL", _destination );
6264 outline1(
"MOV AX, [%s]", _source );
6265 outline1(
"MOV [%s], AX", _destination );
6271 outline1(
"MOV AX, [%s]", _source );
6272 outline1(
"MOV [%s], AX", _destination );
6278 outline1(
"MOV AX, [%s]", _source );
6279 outline1(
"MOV [%s], AX", _destination );
6285 outline1(
"MOV AX, [%s]", _source );
6286 outline1(
"MOV [%s], AX", _destination );
6314void cpu_hex_to_bin(
Environment * _environment,
char * _value_address,
char * _value_size,
char * _variable_address,
char * _variable_size,
char * _result ) {
void cpu_combine_nibbles(Environment *_environment, char *_low_nibble, char *_hi_nibble, char *_byte)
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_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_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_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_math_sub_8bit(Environment *_environment, char *_source, char *_destination, char *_other)
CPU 6309: emit code to subtract two 8 bit values
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_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_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_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_addressof_16bit(Environment *_environment, char *_source, char *_destination)
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
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_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_fill(Environment *_environment, char *_address, char *_bytes, int _bytes_width, char *_pattern)
CPU 6309: emit code to fill up a memory area
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_less_than_nbit_const(Environment *_environment, char *_source, int _destination, char *_other, int _equal, int _bits)
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_move_16bit(Environment *_environment, char *_source, char *_destination)
CPU 6309: emit code to move 16 bit
void cpu_bneq(Environment *_environment, char *_label)
CPU 6309: emit code to make long conditional jump
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_hex_to_string(Environment *_environment, char *_number, char *_string, char *_size, int _separator)
void cpu_math_add_32bit_const(Environment *_environment, char *_source, int _destination, char *_other)
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_store_8bit_with_offset2(Environment *_environment, char *_source, char *_offset, int _value)
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_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_nbit(Environment *_environment, char *_variable, int _bits)
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_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_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_store_8bit_with_offset(Environment *_environment, char *_destination, int _value, int _offset)
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_math_add_nbit(Environment *_environment, char *_source, char *_destination, char *_other, int _bits)
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_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_float_fast_neg(Environment *_environment, char *_value, char *_result)
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)
Z80: emit code to combine nibbles
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)
Z80: 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)
Z80: 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)
Z80: 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)
Z80: 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)
Z80: 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)
Z80: 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)
Z80: 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)
Z80: 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)
Z80: emit code to store 8 bit
void cpu_math_complement_const_32bit(Environment *_environment, char *_source, int _value)
Z80: emit code to calculate a 32 bit complement of a number
void cpu_store_16bit(Environment *_environment, char *_destination, int _value)
Z80: 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)
Z80: emit code to double a 16 bit value
void cpu_math_sub_32bit(Environment *_environment, char *_source, char *_destination, char *_other)
Z80: 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)
Z80: 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)
Z80: 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)
Z80: emit code to compare two 8 bit values
void cpu_math_and_const_32bit(Environment *_environment, char *_source, int _mask)
Z80: emit code to mask with "and" a value of 32 bit
void cpu_fill_direct_size(Environment *_environment, char *_address, int _bytes, char *_pattern)
Z80: 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)
Z80: 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)
Z80: 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)
Z80: 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)
Z80: emit code to move 32 bit
void cpu_fill_size(Environment *_environment, char *_address, int _bytes, char *_pattern)
Z80: 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)
Z80: emit code to compare two 8 bit values
void cpu_fill_direct_size_value(Environment *_environment, char *_address, int _bytes, int _pattern)
Z80: emit code to fill up a memory area
void cpu_float_double_to_string(Environment *_environment, char *_x, char *_string, char *_string_size)
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)
Z80: 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)
Z80: 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 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)
Z80: 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)
Z80: 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)
Z80: 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)
Z80: 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)
Z80: emit code to compare two 16 bit values
void cpu_math_sub_16bit(Environment *_environment, char *_source, char *_destination, char *_other)
Z80: 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)
Z80: 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 Z80: 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)
Z80: 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)
Z80: 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)
#define CPU8086_BLIT_REGISTER_COUNT
void cpu_float_fast_log(Environment *_environment, char *_value, char *_result)
void cpu_move_nbit(Environment *_environment, int _n, char *_source, char *_destination)
CPU Z80: emit code to store n bit
void cpu_address_table_call(Environment *_environment, char *_table, char *_value, char *_address)
void cpu_logical_not_8bit(Environment *_environment, char *_value, char *_result)
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)
Z80: 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)
Z80: 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)
Z80: 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)
Z80: 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_port_out(Environment *_environment, char *_port, char *_value)
Z80: emit code to send one byte throught a I/O port
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)
Z80: 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)
Z80: 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)
Z80: emit code to compare two 32 bit values
void cpu_set_asmio(Environment *_environment, int _asmio, int _value)
void cpu_float_fast_sqr(Environment *_environment, char *_value, char *_result)
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)
Z80: 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)
Z80: 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_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)
Z80: emit code to compare two 8 bit values and jump if they are equal/different
void cpu_less_than_16bit(Environment *_environment, char *_source, char *_destination, char *_other, int _equal, int _signed)
Z80: 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)
Z80: 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_float_single_sqr(Environment *_environment, char *_value, char *_result)
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_bits_to_string_vars(Environment *_environment)
void cpu_math_div2_const_16bit(Environment *_environment, char *_source, int _steps, int _signed, char *_remainder)
Z80: 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)
CPU Z80: emit code to compare n bit
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)
Z80: emit code to compare two 8 bit values and jump if they are equal/different
void cpu_ctoa(Environment *_environment)
void cpu_move_16bit_indirect2_8bit(Environment *_environment, char *_value, char *_offset, char *_source)
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)
Z80: 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)
Z80: emit code to move 8 bit
void cpu_beq(Environment *_environment, char *_label)
Z80: emit code to make long conditional jump
void cpu_compare_16bit(Environment *_environment, char *_source, char *_destination, char *_other, int _positive)
Z80: 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)
Z80: 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_float_single_neg(Environment *_environment, char *_value, char *_result)
void cpu_float_double_from_double_to_int_array(Environment *_environment, double _value, int _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)
Z80: 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_number_to_string_vars(Environment *_environment)
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)
Z80: emit code to compare two 8 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_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)
enum _CPU8086Stack CPU8086Stack
enum _CPU8086Register CPU8086Register
Variable * variable_import(Environment *_environment, char *_name, VariableType _type, int _size_or_value)
Variable * variable_temporary(Environment *_environment, VariableType _type, char *_meaning)
Define a temporary variable.
Variable * variable_store(Environment *_environment, char *_destination, unsigned int _value)
Store a direct value to a variable.
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
#define MAX_TEMPORARY_STORAGE
#define deploy_with_vars(s, e, v)
#define CRITICAL_DEBUG_UNSUPPORTED(v, t)
#define outline3(s, a, b, c)
#define CRITICAL_BLIT_ALLOC_REGISTER_EXHAUSTED()
struct _Variable Variable
Structure of a single variable.
#define outline2(s, a, b)
struct _Environment Environment
Structure of compilation environment.
#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 CRITICAL_UNIMPLEMENTED(v)