43#if defined(__d32__) || defined(__d64__) || defined(__pc128op__) || defined(__mo5__) || defined(__coco__) || defined(__coco3__) || defined(__to8__)
47#define B(code, label) \
49 outline2("IF (((128+%s-(*+2))|(127-%s+(*+2)))&0x8000)",(label),(label)); \
50 if(!strcmp(#code,"RA")) { \
51 outline1("JMP %s", (label)); \
52 } else if(!strcmp(#code,"SR")) { \
53 outline1("JSR %s", (label)); \
55 outline2("LB%s %s", #code, (label)); \
58 outline2("B%s %s", #code, (label)); \
70static void cpu_compare(
Environment * _environment,
char *_source,
char *_destination,
char *_other,
int _positive,
int _bits) {
71 char REG = _bits==16 ?
'X' :
'A';
77 outline2(
"CMP%c %s", REG, _destination);
88 outline1(
"STB %s", _other ? _other : _destination );
92static void cpu_compare_const(
Environment * _environment,
char *_source,
int _destination,
char *_other,
int _positive,
int _bits) {
93 char REG = _bits==16 ?
'X' :
'A';
101 outline2(
"CMP%c #$%4.4x", REG, _destination);
103 outline2(
"CMP%c #$%2.2x", REG, _destination);
119static void cpu_less_than(
Environment * _environment,
char *_source,
char *_destination,
char *_other,
int _equal,
int _signed,
int _bits) {
120 char REG = _bits==16 ?
'X' :
'A';
126 outline2(
"CMP%c %s", REG, _destination);
144 outline1(
"STB %s", _other ? _other : _destination);
147static void cpu_less_than_const(
Environment * _environment,
char *_source,
int _destination,
char *_other,
int _equal,
int _signed,
int _bits) {
148 char REG = _bits==16 ?
'X' :
'A';
154 outline2(
"CMP%c #$%4.4x", REG, _destination);
175static void cpu_less_than_and_branch_const(
Environment * _environment,
char *_source,
int _destination,
char *_label,
int _equal,
int _signed,
int _bits) {
176 char REG = _bits==16 ?
'X' :
'A';
182 outline2(
"CMP%c #$%4.4x", REG, _destination);
202static void cpu_greater_than(
Environment * _environment,
char *_source,
char *_destination,
char *_other,
int _equal,
int _signed,
int _bits ) {
203 char REG = _bits==16 ?
'X' :
'A';
209 outline2(
"CMP%c %s", REG, _destination);
226 outline1(
"STB %s", _other ? _other : _destination );
229static void cpu_greater_than_const(
Environment * _environment,
char *_source,
int _destination,
char *_other,
int _equal,
int _signed,
int _bits ) {
230 char REG = _bits==16 ?
'X' :
'A';
236 outline2(
"CMP%c #$%4.4x", REG, _destination);
392 outline1(
"LDB #$%2.2x", (
unsigned char)(_source&0xff) );
425 outline1(
"LDD #$%4.4x", (
unsigned int)(_source&0xffff) );
462 outline1(
"LDD #$%4.4x", (
unsigned int) (( _source >> 16 ) & 0xffff) );
464 outline1(
"LDD #$%4.4x", (
unsigned int) (( _source ) & 0xffff) );
534void cpu_fill(
Environment * _environment,
char * _address,
char * _bytes,
int _bytes_width,
char * _pattern ) {
540 if ( _bytes_width == 8 ) {
587 if ( _bytes < 256 ) {
619 if ( _bytes < 256 ) {
688 if ( _bytes < 256 ) {
721 if ( _bytes < 256 ) {
765 outline1(
"LDB #$%2.2x" , (
unsigned char)(_value & 0xff) );
814 cpu_compare(_environment,_source, _destination, _other, _positive, 8);
834 cpu_compare_const(_environment,_source, _destination, _other, _positive, 8);
880 outline1(
"CMPB #$%2.2x", _destination);
904 outline1(
"CMPB #$%2.2x", _destination);
929 outline1(
"CMPB #'%c'", _destination);
953 cpu_less_than(_environment, _source, _destination, _other, _equal, _signed, 8);
963 cpu_less_than_const(_environment, _source, _destination, _other, _equal, _signed, 8);
973 cpu_less_than_and_branch_const(_environment, _source, _destination, _other, _equal, _signed, 8);
992 cpu_greater_than(_environment, _source, _destination, _other, _equal, _signed, 8);
1002 cpu_greater_than_const(_environment, _source, _destination, _other, _equal, _signed, 8);
1022 outline1(
"STB %s", _other ? _other : _destination);
1033 outline1(
"ADDB #$%2.2x", ( _destination & 0xff ) );
1054 outline1(
"STB %s", _other ? _other : _destination);
1073 outline1(
"STB %s", _other ? _other : _source);
1098 outline1(
"EORA %s", _destination );
1100 outline1(
"BEQ %ssamesign", label );
1106 outline1(
"BEQ %spositive1", label );
1110 outline1(
"JMP %spositive1b", label );
1117 outline1(
"BEQ %spositive2", label );
1121 outline1(
"JMP %spositive2b", label );
1152 outline0(
"JSR CPUMATHMUL8BITTO16BIT_SIGNED" );
1206 outline1(
"STA %s", _other_remainder);
1217 outline1(
"DEC %s", _other_remainder );
1224 outline1(
"STA %s", _other_remainder );
1231 outline0(
"JSR CPUMATHDIV8BITTO8BIT_SIGNED");
1233 outline0(
"JSR CPUMATHDIV8BITTO8BIT");
1235 outline1(
"STA %s", _other_remainder);
1248 outline1(
"LDA #$%2.2x", (
unsigned char)((_destination) & 0xff) );
1254 outline1(
"LDA #%2.2x", (
unsigned char)((_destination) & 0xff));
1286 outline1(
"STA %s", _other_remainder);
1297 outline1(
"DEC %s", _other_remainder );
1304 outline1(
"STA %s", _other_remainder );
1309 outline1(
"LDA #$%2.2x", (
unsigned char)((_destination) & 0xff));
1311 outline0(
"JSR CPUMATHDIV8BITTO8BIT_SIGNED");
1313 outline0(
"JSR CPUMATHDIV8BITTO8BIT");
1315 outline1(
"STA %s", _other_remainder);
1353 outline1(
"LDB #$%2.2x", (
unsigned char)(_steps & 0xff));
1381 outline0(
"JSR CPUMATHDIV28BIT_SIGNED");
1410 outhead1(
"cpu_math_mul2_const_8bit_%d", _steps);
1411 for(i=0; i<_steps; ++i) {
1418 outline1(
"JSR cpu_math_mul2_const_8bit_%d", _steps );
1436 outline1(
"LDB #$%2.2x", (
unsigned char)(_value & 0xff));
1507 outline1(
"LDD #$%4.4x", (
unsigned int)( _value & 0xffff ) );
1527 cpu_compare( _environment, _source, _destination, _other, _positive, 16 );
1546 cpu_compare_const( _environment, _source, _destination, _other, _positive, 16 );
1583 outline1(
"CMPX #$%4.4x", _destination);
1607 cpu_less_than( _environment, _source, _destination, _other, _equal, _signed, 16 );
1617 cpu_less_than_const( _environment, _source, _destination, _other, _equal, _signed, 16 );
1636 cpu_greater_than( _environment, _source, _destination, _other, _equal, _signed, 16 );
1646 cpu_greater_than_const( _environment, _source, _destination, _other, _equal, _signed, 16 );
1668 outline1(
"STD %s", _other ? _other : _destination);
1679 outline1(
"LDD #$%4.4x", ( _destination & 0xffff ) );
1701 outline1(
"ADDD #%s", _destination);
1702 outline1(
"STD %s", _other ? _other : _destination);
1715 outline1(
"STX %s", _other ? _other : _destination );
1764 outline1(
"EORA %s", _destination );
1766 outline1(
"BEQ %ssamesign", label );
1876 outline0(
"JSR CPUMATHMUL16BITTO32BIT_SIGNED" );
1878 outline0(
"JSR CPUMATHMUL16BITTO32BIT" );
1895 char destination[
MAX_TEMPORARY_STORAGE]; sprintf( destination,
"CPUMATHMULNBITTONBIT%d_DESTINATION", (_bits>>3));
1907 outhead2(
"CPUMATHMULNBITTONBIT%d_SOURCE rzb %d", _bits>>3, _bits>>3 );
1908 outhead2(
"CPUMATHMULNBITTONBIT%d_DESTINATION rzb %d", _bits>>3, _bits>>3 );
1909 outhead2(
"CPUMATHMULNBITTONBIT%d_OTHER rzb %d", _bits>>3, _bits>>3 );
1911 outhead1(
"CPUMATHMULNBITTONBIT%d", _bits>>3);
1913 for( i=0; i<(_bits>>3); ++i ) {
1919 outhead1(
"CPUMATHMULNBITTONBIT%dL1", _bits>>3);
1933 char multiplyByBit0Label[
MAX_TEMPORARY_STORAGE]; sprintf( multiplyByBit0Label,
"%sb%dbit0", label, _bits>>3 );
1938 for( i=1; i<(_bits>>3); ++i ) {
1939 sprintf(
offset,
"%d", i );
1942 outline1(
"LBCC %s", multiplyByBit0Label );
1948 for( i=(_bits>>3)-1; i>-1; --i ) {
1949 sprintf(
offset,
"%d", i );
1958 outhead1(
"%s", multiplyByBit0Label);
1961 sprintf(
offset,
"%d", (_bits>>3)-1 );
1963 for( i=(_bits>>3)-2; i>-1; --i ) {
1964 sprintf(
offset,
"%d", i );
1973 outline1(
"BEQ CPUMATHMULNBITTONBIT%dL1x", (_bits>>3) );
1974 outline1(
"JMP CPUMATHMULNBITTONBIT%dL1", (_bits>>3) );
1975 outhead1(
"CPUMATHMULNBITTONBIT%dL1x", (_bits>>3) );
1988 for( i=0; i<(_bits>>3); ++i ) {
1995 outline1(
"JSR CPUMATHMULNBITTONBIT%d", _bits >> 3 );
1996 for( i=0; i<(_bits>>3); ++i ) {
2020 outline1(
"EORA %s", _destination );
2093 outline1(
"STY %s", _other_remainder );
2136 outline1(
"STY %s", _other_remainder );
2144 outline0(
"JSR CPUMATHDIV16BITTO16BIT_SIGNED" );
2146 outline0(
"JSR CPUMATHDIV16BITTO16BIT" );
2148 outline1(
"STX %s", _other_remainder );
2164 outline1(
"EORA #$%2.2x", (
unsigned char)((_destination>>8)&0xff) );
2189 outline1(
"LDA #$%2.2x", (
unsigned char)((_destination)&0xff) );
2196 outline1(
"LDA #$%2.2x", (
unsigned char)((_destination>>8)&0xff) );
2205 outline1(
"LDD #$%4.4x", _destination );
2237 outline1(
"STY %s", _other_remainder );
2257 outline1(
"LDY #$%4.4x", _destination );
2280 outline1(
"STY %s", _other_remainder );
2286 outline1(
"LDX #$%4.4x", _destination );
2288 outline0(
"JSR CPUMATHDIV16BITTO16BIT_SIGNED" );
2290 outline0(
"JSR CPUMATHDIV16BITTO16BIT" );
2292 outline1(
"STX %s", _other_remainder );
2313 outline1(
"STD %s", _other ? _other : _destination );
2326 outline1(
"STD %s", _other ? _other : _destination );
2447 outline0(
"JSR CPUMATHDIV2CONST16BIT_SIGNED");
2449 outline0(
"JSR CPUMATHDIV2CONST16BIT");
2477 outhead1(
"cpu_math_mul2_const_16bit_%d", _steps);
2478 for(i=0; i<_steps; ++i) {
2486 outline1(
"JSR cpu_math_mul2_const_16bit_%d", _steps);
2505 outline1(
"ANDA #$%2.2x", ( _mask >> 8 ) & 0xff );
2506 outline1(
"ANDB #$%2.2x", ( _mask & 0xff ) );
2548 outline1(
"LDD #$%4.4x", ( _value >> 16 ) & 0xffff );
2550 if((( _value >> 16 ) & 0xffff) != ( _value & 0xffff ))
2551 outline1(
"LDD #$%4.4x", ( _value & 0xffff ) );
2613 char quotient[
MAX_TEMPORARY_STORAGE]; sprintf( quotient,
"CPUMATHDIVNBITTONBIT%d_QUOTIENT", _bits >> 3 );
2614 char divisor[
MAX_TEMPORARY_STORAGE]; sprintf( divisor,
"CPUMATHDIVNBITTONBIT%d_DIVISOR", _bits >> 3 );
2615 char dividend[
MAX_TEMPORARY_STORAGE]; sprintf( dividend,
"CPUMATHDIVNBITTONBIT%d_DIVIDEND", _bits >> 3 );
2616 char result1[
MAX_TEMPORARY_STORAGE]; sprintf( result1,
"CPUMATHDIVNBITTONBIT%d_RESULT1", _bits >> 3 );
2617 char result2[
MAX_TEMPORARY_STORAGE]; sprintf( result2,
"CPUMATHDIVNBITTONBIT%d_RESULT2", _bits >> 3 );
2622 cpu_jump( _environment, afterLabel );
2624 outhead2(
"%s rzb %d", quotient, _bits>>3 );
2625 outhead2(
"%s rzb %d", divisor, _bits>>3 );
2626 outhead2(
"%s rzb %d", dividend, _bits>>3 );
2634 outhead1(
"CPUMATHDIVNBITTONBIT%d", _bits>>3);
2636 for( i=0; i<(_bits>>3); ++i ) {
2649 cpu_and_8bit( _environment, result1, result2, result1 );
2689 cpu_jump( _environment, skip4Label );
2694 cpu_jump( _environment, skipLabel );
2705 for( i=0; i<(_bits>>3); ++i ) {
2712 outline1(
"JSR CPUMATHDIVNBITTONBIT%d", _bits>>3);
2714 for( i=0; i<(_bits>>3); ++i ) {
2743 cpu_jump( _environment, afterLabel );
2745 outhead2(
"%s: rzb %d", data, _bits>>3 );
2751 for( i=0; i<(_bits>>3); ++i ) {
2753 outline1(
"LDA #$%2.2x", (
unsigned char)( (_destination >> (i*8)) & 0xff ) );
2829 cpu_compare_16bit( _environment, sourceEffective, destinationEffective, _other, _positive );
2838 cpu_compare_16bit( _environment, sourceEffective, destinationEffective, _other, _positive );
2854 for(
int i=0; i<(_bits>>3); ++i ) {
2860 outline1(
"LDA #$%2.2x", 0xff*_positive);
2868 outline1(
"LDA #$%2.2x", 0xff*(1-_positive));
2888 for( i=0; i<(_bits>>3); ++i ) {
2891 outline1(
"CMPA #$%2.2x", (
unsigned char) ( ( _destination >> (i*8) ) & 0xff ) );
2894 outline1(
"LDA #$%2.2x", 0xff*_positive);
2898 outline1(
"LDA #$%2.2x", 0xff*(1-_positive));
2965 outline1(
"CMPX #$%4.4x", ( ( _destination >> 16 ) & 0xffff ) );
2972 outline1(
"CMPX #$%4.4x", ( _destination & 0xffff ) );
3022 outline1(
"STA %s", _other ? _other : _destination );
3037 outline1(
"CMPX #$%4.4x", ( ( _destination >> 16 ) & 0xffff ) );
3040 outline1(
"CMPX #$%4.4x", ( _destination & 0xffff ) );
3073 for( i=0; i<(_bits>>3); ++i ) {
3079 outline2(
"BEQ %snext%dx", label, i );
3117 for( i=0; i<(_bits>>3); ++i ) {
3120 outline1(
"CMPB #$%2.2x", (
unsigned char)((_destination>>(i*8))&0xff) );
3122 outline2(
"BEQ %snext%dx", label, i );
3191 outline1(
"STB %s", _other ? _other : _destination );
3205 outline1(
"CMPX #$%4.4x", ( _destination >> 16 ) & 0xffff );
3208 outline1(
"CMPX #$%4.4x", ( _destination & 0xffff ) );
3280 outline1(
"STD %s", _other ? _other :
",X" );
3291 for(
int i=0; i<(_bits>>3); ++i ) {
3312 outline1(
"ADDD #$%4.4x", ( _destination & 0xffff ) );
3315 outline1(
"ADDD #$%4.4x", ( ( _destination >> 16 ) & 0xffff ) );
3316 if ( ( ( _destination >> 16 ) & 0x8000 ) ) {
3319 outline1(
"STD %s", _other ? _other :
",X" );
3379 outline1(
"STD %s", _other ? _other :
",X");
3390 for(
int i=0; i<(_bits)>>3; ++i ) {
3417 outline1(
"LDD #$%4.4x", ( _value ) & 0xffff );
3420 outline1(
"LDD #$%4.4x", ( _value>>16 ) & 0xffff );
3579 outline1(
"LBEQ %snocomplement", label );
3581 outhead1(
"%snocomplement", label );
3585 for(
int i=1; i<(_bits>>3); ++i ) {
3592 outline1(
"LBEQ %snocomplement2", label );
3594 outhead1(
"%snocomplement2", label );
3738 for( i=(_bits>>3)-2; i>-1; --i ) {
3763 if(_mask & 0xffff0000) {
3765 outline1(
"ANDA #$%2.2x", ( _mask >> 24 ) & 0xff );
3766 outline1(
"ANDB #$%2.2x", ( _mask >> 16 ) & 0xff );
3771 if(_mask & 0x0000ffff) {
3773 outline1(
"ANDA #$%2.2x", ( _mask >> 8 ) & 0xff );
3774 outline1(
"ANDB #$%2.2x", ( _mask >> 0 ) & 0xff );
3793 outline0(
"JSR CPUCOMBINENIBBLES" );
3811 outline1(
"JSR $%4.4x", _address );
3834 cpu_label( _environment, indirectLabel );
3837 cpu_call( _environment, indirectLabel );
3859 if ( strcmp( _register,
"A" ) == 0 ) {
3861 }
else if ( strcmp( _register,
"B" ) == 0 ) {
3863 }
else if ( strcmp( _register,
"CC" ) == 0 ) {
3868 }
else if ( strcmp( _register,
"DP" ) == 0 ) {
3873 }
else if ( strcmp( _register,
"X" ) == 0 ) {
3875 }
else if ( strcmp( _register,
"Y" ) == 0 ) {
3877 }
else if ( strcmp( _register,
"U" ) == 0 ) {
3879 }
else if ( strcmp( _register,
"S" ) == 0 ) {
3881 }
else if ( strcmp( _register,
"PC" ) == 0 ) {
3886 }
else if ( strcmp( _register,
"D" ) == 0 ) {
3912 outline1(
"LDA #$%2.2x", (
unsigned char)(_value & 0xff ) );
3915 outline1(
"LDB #$%2.2x", (
unsigned char)(_value & 0xff ) );
3918 outline1(
"LDX #$%4.4x", (
unsigned short)(_value & 0xffff ) );
3921 outline1(
"LDY #$%4.4x", (
unsigned short)(_value & 0xffff ) );
3924 outline1(
"LDU #$%4.4x", (
unsigned short)(_value & 0xffff ) );
3927 outline1(
"LDS #$%4.4x", (
unsigned short)(_value & 0xffff ) );
3930 outline1(
"LDD #$%4.4x", (
unsigned short)(_value & 0xffff ) );
3953 outline1(
"LDD %4.4x", ( _value & 0xffff ) );
3955 outline1(
"LDD %4.4x", ( (_value >> 16 ) & 0xffff ) );
4143 srand( time( NULL ) );
4233 outline1(
"CMPA #$%2.2x", _value );
4235 outline1(
"SUBA #$%2.2x", _value );
4467 outline1(
"EORA #$%2.2x", (
unsigned char)((_right >> 8) & 0xff ) );
4468 outline1(
"EORB #$%2.2x", (
unsigned char)((_right) & 0xff ) );
4502 outline1(
"EORA #$%2.2x", (
unsigned char)( (_right >> 24) & 0xff ) );
4503 outline1(
"EORB #$%2.2x", (
unsigned char)( (_right >> 16) & 0xff ) );
4506 outline1(
"EORA #$%2.2x", (
unsigned char)( (_right >> 8) & 0xff ) );
4507 outline1(
"EORB #$%2.2x", (
unsigned char)( (_right) & 0xff ) );
4682 for(
int i=(_bits>>3)-1; i>-1;--i ) {
4741 for(
int i=(_bits>>3)-1; i>-1; --i ) {
4840 outline1(
"LDX #%s", _destination );
4876 outline1(
"LDX #%s", _destination );
4896 outline1(
"LDX #%s", _destination );
4909 outline1(
"LDX #%s", _destination );
4929 outline1(
"LDX #%s", _destination );
4942 outline1(
"LDX #%s", _destination );
4962 if ( _size >= 0x7f ) {
4983 outline1(
"LDB #$%2.2x", (
unsigned char)( _size & 0xff ) );
5018 outline1(
"LDX #%s", _destination );
5020 if ( _size >= 0x7f ) {
5041 outline1(
"LDB #$%2.2x", (
unsigned char)( _size & 0xff ) );
5058 outline1(
"LDX #%s", _destination );
5078 if ( _size >= 0x7f ) {
5099 outline1(
"LDB #$%2.2x", (
unsigned char)( _size & 0xff ) );
5134 outline1(
"LDX #%s", _destination );
5136 if ( _size >= 0x7f ) {
5157 outline1(
"LDB #$%2.2x", (
unsigned char)( _size & 0xff ) );
5174 outline1(
"LDX #%s", _destination );
5225 outline1(
"LDA #$%2.2x", _equal ? 0xff : 0x00 );
5230 outline1(
"LDA #$%2.2x", _equal ? 0x00 : 0xff );
5249 if ( _size >= 0x7f ) {
5286 outline1(
"LDA #$%2.2x", _equal ? 0xff : 0x00 );
5291 outline1(
"LDA #$%2.2x", _equal ? 0x00 : 0xff );
5377 if ( _size >= 0x7f ) {
5513 if ( _size >= 0x7f ) {
5584 inline( cpu_move_8bit_with_offset )
5827 outline0(
"JSR CPUCONVERTSTRING8BIT" );
5842 outline0(
"JSR CPUCONVERTSTRING16BIT" );
5855 if( _size_size >= 16 ) {
5884 if ( _destination ) {
5915 switch( _bitwidth ) {
5926 outline1(
"LDA #$%2.2x", _position );
5927 outline0(
"JSR CPUBITCHECKEXTENDED" );
5943 switch( _bitwidth ) {
5955 outline0(
"JSR CPUBITCHECKEXTENDED" );
5973 embedded( cpu_bit_inplace, src_hw_6809_cpu_bit_inplace_asm );
5979 outline1(
"LDA #$%2.2x", _position);
6003 embedded( cpu_bit_inplace, src_hw_6809_cpu_bit_inplace_asm );
6024 deploy( numberToString, src_hw_6809_number_to_string_asm );
6035 outline1(
"STD N2STRINGNUMBER+%d", i );
6038 outline0(
"STA N2STRINGNUMBERSIGNED");
6039 outline1(
"BPL %spositive", label );
6045 outline0(
"CLR N2STRINGNUMBERSIGNED");
6053 outline1(
"STD N2STRINGNUMBER+%d", i );
6056 outline0(
"STA N2STRINGNUMBERSIGNED");
6057 outline1(
"BPL %spositive", label );
6065 if ( !_signed )
outline0(
"STA N2STRINGNUMBERSIGNED");
6073 outline1(
"STD N2STRINGNUMBER+%d", i );
6075 if ( _signed && _bits == 8 ) {
6076 outline0(
"STB N2STRINGNUMBERSIGNED");
6077 outline1(
"BPL %spositive", label );
6085 if ( !_signed )
outline0(
"STA N2STRINGNUMBERSIGNED");
6091 outline0(
"STB N2STRINGNUMBERSIGNED");
6092 outline1(
"LBPL %spositive", label );
6111 deploy( bitsToString, src_hw_6809_bits_to_string_asm );
6156 outline1(
"LDB #$%2.2x", (
unsigned char)(_bits&0xff) );
6171 outline1(
"LDA #$%2.2x", _separator?1:0 );
6188 outline1(
"LDA #$%2.2x", _separator?1:0 );
6189 outline1(
"LDB #$%2.2x", (
unsigned char)( _size & 0xff ) );
6205 outline1(
"LDA #$%2.2x", (
unsigned char)( _separator * 3 ) );
6219 deploy( dstring, src_hw_6809_dstring_asm );
6230 deploy( dstring, src_hw_6809_dstring_asm );
6241 deploy( dstring, src_hw_6809_dstring_asm );
6252 deploy( dstring, src_hw_6809_dstring_asm );
6262 deploy( dstring, src_hw_6809_dstring_asm );
6272 deploy( dstring, src_hw_6809_dstring_asm );
6283 deploy( dstring, src_hw_6809_dstring_asm );
6286 outline1(
"LDA #$%2.2X", _resize );
6294 deploy( dstring, src_hw_6809_dstring_asm );
6303 deploy( dstring, src_hw_6809_dstring_asm );
6312 deploy( dstring,src_hw_6809_dstring_asm );
6314 if ( _address || _size ) {
6332 deploy( dstring,src_hw_6809_dstring_asm );
6344 deploy( dstring, src_hw_6809_dstring_asm );
6356 outline1(
"LDB #$%2.2x", (
unsigned char)(_value & 0xff));
6379 if ( _destination ) {
6382 outline1(
"STB %s", _destination );
6395 if ( _destination ) {
6396 outline1(
"STD %s", _destination );
6404 char *out = _destination ?_destination : _source;
6429 for(
int i=0; i<(_bits>>3); ++i ) {
6433 if ( _destination ) {
6439 if ( _destination ) {
6449 deploy( sqr, src_hw_6809_sqr_asm );
6467 outhead1(
"stringscount equ %d", count );
6468 outhead1(
"stringsspace equ %d", (space-1) );
6469 outhead0(
"MAXSTRINGS equ stringscount" );
6470 outhead0(
"DESCRIPTORS rzb stringscount*4");
6471 outhead0(
"WORKING rzb stringsspace" );
6472 outhead0(
"TEMPORARY rzb stringsspace" );
6473 outhead0(
"FREE_STRING fdb stringsspace" );
6481 outhead1(
"PROTOTHREADLC rzb %d", count );
6482 outhead1(
"PROTOTHREADST rzb %d", count );
6486 for(
int i=0; i<count; ++i ) {
6554 outline0(
"JSR PROTOTHREADRESTORE" );
6567 outline0(
"JSR PROTOTHREADSETSTATE" );
6577 outline0(
"JSR PROTOTHREADGETSTATE" );
6598 outline0(
"JSR PROTOTHREADGETADDRESS" );
6619 inline( cpu_msc1_uncompress )
6621 embedded( cpu_msc1_uncompress, src_hw_6809_msc1_asm );
6643 inline( cpu_msc1_uncompress )
6645 embedded( cpu_msc1_uncompress, src_hw_6809_msc1_asm );
6659 inline( cpu_msc1_uncompress )
6661 embedded( cpu_msc1_uncompress, src_hw_6809_msc1_asm );
6675 inline( cpu_msc1_uncompress )
6677 embedded( cpu_msc1_uncompress, src_hw_6809_msc1_asm );
6704void cpu_string_sub(
Environment * _environment,
char * _source,
char * _source_size,
char * _pattern,
char * _pattern_size,
char * _destination,
char * _destination_size ) {
6723 outline1(
"STA %s", _destination_size);
6728static char cpu_BLIT_REGISTER[][9] = {
6735#define cpu_BLIT_REGISTER_COUNT ( sizeof( cpu_BLIT_REGISTER ) / 9 )
6754 return &cpu_BLIT_REGISTER[_register][0];
6756 return &cpu_BLIT_REGISTER[ (_register & 0xff00) >> 8][0];
6765 int registerMask = ( 0x01 << reg );
6767 if ( ! isRegisterUsed ) {
6775 if ( location > 0xff ) {
6780 int registerMask = ( 0x10 << reg );
6782 if ( ! isRegisterUsed ) {
6783 outline1(
"LDA %s", &cpu_BLIT_REGISTER[reg][0] );
6786 return ( ( (reg+1) << 8 ) | location );
6798 int location = _register & 0xff;
6802 int registerMask = ( 0x01 << _register );
6804 if ( isRegisterUsed ) {
6811 int registerMask = 0x10 << ( ( ( _register >> 8 ) & 0xff ) - 1 );
6813 if ( isRegisterUsed ) {
6815 outline1(
"LDA %s", &cpu_BLIT_REGISTER[reg][0] );
6838 char destinationAddress[
MAX_TEMPORARY_STORAGE]; sprintf( destinationAddress,
"%s+%d", _destination, i*4 );
6841 case 1:
case 2:
case 3:
case 4:
6842 case 5:
case 6:
case 7:
case 8:
6843 cpu_store_8bit( _environment, destinationAddress, ( _value[n-1-(i*4)] & (0xff>>(8-_n)) ) );
6846 case 9:
case 10:
case 11:
case 12:
6847 case 13:
case 14:
case 15:
case 16:
6848 cpu_store_8bit( _environment, destinationAddress, ( _value[n-1-(i*4)] & (0xff>>(16-_n)) ) );
6849 sprintf( destinationAddress,
"%s+%d", _destination, i*4+1 );
6850 cpu_store_8bit( _environment, destinationAddress, ( _value[n-1-(i*4+1)] & (0xff) ) );
6852 case 17:
case 18:
case 19:
case 20:
6853 case 21:
case 22:
case 23:
case 24:
6854 cpu_store_8bit( _environment, destinationAddress, ( _value[n-1-(i*4)] & (0xff>>(24-_n)) ) );
6855 sprintf( destinationAddress,
"%s+%d", _destination, i*4+1 );
6856 cpu_store_8bit( _environment, destinationAddress, ( _value[n-1-(i*4+1)] & (0xff) ) );
6857 sprintf( destinationAddress,
"%s+%d", _destination, i*4+2 );
6858 cpu_store_8bit( _environment, destinationAddress, ( _value[n-1-(i*4+2)] & (0xff) ) );
6860 case 25:
case 26:
case 27:
case 28:
6861 case 29:
case 30:
case 31:
case 32:
6863 cpu_store_8bit( _environment, destinationAddress, ( _value[n-1-(i*4)] & (0xff>>(32-_n)) ) );
6864 sprintf( destinationAddress,
"%s+%d", _destination, i*4+1 );
6865 cpu_store_8bit( _environment, destinationAddress, ( _value[n-1-(i*4+1)] & (0xff) ) );
6866 sprintf( destinationAddress,
"%s+%d", _destination, i*4+2 );
6867 cpu_store_8bit( _environment, destinationAddress, ( _value[n-1-(i*4+2)] & (0xff) ) );
6868 sprintf( destinationAddress,
"%s+%d", _destination, i*4+3 );
6869 cpu_store_8bit( _environment, destinationAddress, ( _value[n-1-(i*4+3)] & (0xff) ) );
6874 cpu_store_8bit( _environment, destinationAddress, ( _value[n-1-(i*4)] & (0xff) ) );
6875 sprintf( destinationAddress,
"%s+%d", _destination, i*4+1 );
6876 cpu_store_8bit( _environment, destinationAddress, ( _value[n-1-(i*4+1)] & (0xff) ) );
6877 sprintf( destinationAddress,
"%s+%d", _destination, i*4+2 );
6878 cpu_store_8bit( _environment, destinationAddress, ( _value[n-1-(i*4+2)] & (0xff) ) );
6879 sprintf( destinationAddress,
"%s+%d", _destination, i*4+3 );
6880 cpu_store_8bit( _environment, destinationAddress, ( _value[n-1-(i*4+3)] & (0xff) ) );
6902 char destinationAddress[
MAX_TEMPORARY_STORAGE]; sprintf( destinationAddress,
"%s+%d", _destination, i*4 );
6905 case 1:
case 2:
case 3:
case 4:
6906 case 5:
case 6:
case 7:
case 8:
6907 cpu_move_8bit( _environment, sourceAddress, destinationAddress );
6909 case 9:
case 10:
case 11:
case 12:
6910 case 13:
case 14:
case 15:
case 16:
6911 cpu_move_8bit( _environment, sourceAddress, destinationAddress );
6912 sprintf( sourceAddress,
"%s+%d", _source, i*4+1 );
6913 sprintf( destinationAddress,
"%s+%d", _destination, i*4+1 );
6914 cpu_move_8bit( _environment, sourceAddress, destinationAddress );
6916 case 17:
case 18:
case 19:
case 20:
6917 case 21:
case 22:
case 23:
case 24:
6918 cpu_move_8bit( _environment, sourceAddress, destinationAddress );
6919 sprintf( sourceAddress,
"%s+%d", _source, i*4+1 );
6920 sprintf( destinationAddress,
"%s+%d", _destination, i*4+1 );
6921 cpu_move_8bit( _environment, sourceAddress, destinationAddress );
6922 sprintf( sourceAddress,
"%s+%d", _source, i*4+2 );
6923 sprintf( destinationAddress,
"%s+%d", _destination, i*4+2 );
6924 cpu_move_8bit( _environment, sourceAddress, destinationAddress );
6926 case 25:
case 26:
case 27:
case 28:
6927 case 29:
case 30:
case 31:
case 32:
6929 cpu_move_8bit( _environment, sourceAddress, destinationAddress );
6930 sprintf( sourceAddress,
"%s+%d", _source, i*4+1 );
6931 sprintf( destinationAddress,
"%s+%d", _destination, i*4+1 );
6932 cpu_move_8bit( _environment, sourceAddress, destinationAddress );
6933 sprintf( sourceAddress,
"%s+%d", _source, i*4+2 );
6934 sprintf( destinationAddress,
"%s+%d", _destination, i*4+2 );
6935 cpu_move_8bit( _environment, sourceAddress, destinationAddress );
6936 sprintf( sourceAddress,
"%s+%d", _source, i*4+3 );
6937 sprintf( destinationAddress,
"%s+%d", _destination, i*4+3 );
6938 cpu_move_8bit( _environment, sourceAddress, destinationAddress );
6943 cpu_move_8bit( _environment, sourceAddress, destinationAddress );
6944 sprintf( sourceAddress,
"%s+%d", _source, i*4+1 );
6945 sprintf( destinationAddress,
"%s+%d", _destination, i*4+1 );
6946 cpu_move_8bit( _environment, sourceAddress, destinationAddress );
6947 sprintf( sourceAddress,
"%s+%d", _source, i*4+2 );
6948 sprintf( destinationAddress,
"%s+%d", _destination, i*4+2 );
6949 cpu_move_8bit( _environment, sourceAddress, destinationAddress );
6950 sprintf( sourceAddress,
"%s+%d", _source, i*4+3 );
6951 sprintf( destinationAddress,
"%s+%d", _destination, i*4+3 );
6952 cpu_move_8bit( _environment, sourceAddress, destinationAddress );
6971 sprintf( step,
"%d", stepIndex );
6972 sprintf( step1,
"%d", stepIndex+1 );
6973 sprintf( step2,
"%d", stepIndex+2 );
6974 sprintf( step3,
"%d", stepIndex+3 );
6984 case 32:
case 31:
case 30:
case 29:
6985 case 28:
case 27:
case 26:
case 25:
6991 case 24:
case 23:
case 22:
case 21:
6992 case 20:
case 19:
case 18:
case 17:
6998 case 16:
case 15:
case 14:
case 13:
6999 case 12:
case 11:
case 10:
case 9:
7003 case 8:
case 7:
case 6:
case 5:
7004 case 4:
case 3:
case 2:
case 1:
7026 sprintf( step,
"%d", stepIndex );
7027 sprintf( step1,
"%d", stepIndex+1 );
7028 sprintf( step2,
"%d", stepIndex+2 );
7029 sprintf( step3,
"%d", stepIndex+3 );
7039 case 32:
case 31:
case 30:
case 29:
7040 case 28:
case 27:
case 26:
case 25:
7046 case 24:
case 23:
case 22:
case 21:
7047 case 20:
case 19:
case 18:
case 17:
7053 case 16:
case 15:
case 14:
case 13:
7054 case 12:
case 11:
case 10:
case 9:
7058 case 8:
case 7:
case 6:
case 5:
7059 case 4:
case 3:
case 2:
case 1:
7084 double integral = 0.0;
7085 double fractional = 0.0;
7091 int mantissa_bits = 31;
7095 memset( &right[0], 0,
sizeof(
int ) * 4 );
7102 if ( _value >= 0 ) {
7108 value = fabs( _value );
7117 fractional = modf(value, &integral);
7119 left = (
unsigned int) integral;
7139 while( ( fractional != 1.0 ) && ( steps < mantissa_bits ) ) {
7143 right[3] = right[3] << 1;
7144 right[2] = right[2] << 1;
7145 right[1] = right[1] << 1;
7146 right[0] = right[0] << 1;
7147 if ( ( right[3] & 0x100 ) ) {
7148 right[2] = right[2] | 0x1;
7150 if ( ( right[2] & 0x100 ) ) {
7151 right[1] = right[1] | 0x1;
7153 if ( ( right[1] & 0x100 ) ) {
7154 right[0] = right[0] | 0x1;
7156 right[3] = right[3] & 0xff;
7157 right[2] = right[2] & 0xff;
7158 right[1] = right[1] & 0xff;
7159 right[0] = right[0] & 0x7f;
7161 fractional = fractional * 2;
7163 if ( fractional >= 1.0 ) {
7165 fractional = modf(fractional, &integral);
7190 int mantissa_high_bit = 0x80000000 >> ( 32 - mantissa_bits);
7191 int mantissa_mask = 0xffffffff >> ( 32 - mantissa_bits);
7197 while( left == 0 ) {
7201 if ( ! right[0] && ! right[1] && ! right[2] && ! right[3] ) {
7205 if ( right[0] & 0x40 ) {
7209 right[0] = right[0] << 1;
7210 right[1] = right[1] << 1;
7211 right[2] = right[2] << 1;
7212 right[3] = right[3] << 1;
7213 if ( ( right[1] & 0x100 )) {
7214 right[0] = right[0] | 0x1;
7216 if ( ( right[2] & 0x100 )) {
7217 right[1] = right[1] | 0x1;
7219 if ( ( right[3] & 0x100 )) {
7220 right[2] = right[2] | 0x1;
7222 right[0] = right[0] & 0x7f;
7223 right[1] = right[1] & 0xff;
7224 right[2] = right[2] & 0xff;
7225 right[3] = right[3] & 0xff;
7246 if ( ( right[0] & 0x01 ) ) {
7247 right[1] = right[1] | 0x100;
7249 if ( ( right[1] & 0x01 ) ) {
7250 right[2] = right[2] | 0x100;
7252 if ( ( right[2] & 0x01 ) ) {
7253 right[3] = right[3] | 0x100;
7255 right[0] = right[0] >> 1;
7256 right[1] = right[1] >> 1;
7257 right[2] = right[2] >> 1;
7258 right[3] = right[3] >> 1;
7260 right[0] = right[0] | 0x40;
7267 right[3] = right[3] << 1;
7268 right[2] = right[2] << 1;
7269 right[1] = right[1] << 1;
7270 right[0] = right[0] << 1;
7271 if ( right[3] & 0x100 ) {
7272 right[2] = right[2] | 0x01;
7274 if ( right[2] & 0x100 ) {
7275 right[1] = right[1] | 0x01;
7277 if ( right[1] & 0x100 ) {
7278 right[0] = right[0] | 0x01;
7280 right[3] = right[3] & 0xff;
7281 right[2] = right[2] & 0xff;
7282 right[1] = right[1] & 0xff;
7283 right[0] = right[0] & 0x7f;
7321 if ( _value == 0.0f ) {
7333 _result[0] = exp & 0xff;
7334 _result[1] = (
sign << 7 ) | ( right[0] & 0x7f );
7335 _result[2] = ( right[1] );
7336 _result[3] = ( right[2] );
7337 _result[4] = ( right[3] );
7342 _result[0] = _result[4];
7346 _result[1] = _result[3];
7361 deploy( fp_vars, src_hw_6809_fp_routines_asm );
7373 outline1(
"STB %s", _string_size );
7383 deploy( fp_vars, src_hw_6809_fp_routines_asm );
7406 deploy( fp_vars, src_hw_6809_fp_routines_asm );
7428 deploy( fp_vars, src_hw_6809_fp_routines_asm );
7449 deploy( fp_vars, src_hw_6809_fp_routines_asm );
7470 deploy( fp_vars, src_hw_6809_fp_routines_asm );
7491 deploy( fp_vars, src_hw_6809_fp_routines_asm );
7514 deploy( fp_vars, src_hw_6809_fp_routines_asm );
7547 deploy( fp_vars, src_hw_6809_fp_routines_asm );
7568 deploy( fp_vars, src_hw_6809_fp_routines_asm );
7589 deploy( fp_vars, src_hw_6809_fp_routines_asm );
7608 deploy( fp_vars, src_hw_6809_fp_routines_asm );
7627 deploy( fp_vars, src_hw_6809_fp_routines_asm );
7646 deploy( fp_vars, src_hw_6809_fp_routines_asm );
7665 deploy( fp_vars, src_hw_6809_fp_routines_asm );
7681 for(
int i=0; i<_count; ++i ) {
7682 outline2(
"fdb $%4.4x, %s", _values[i], _address[i] );
7695 outline1(
"BNE LOOKFOR%sNEXT4", _table );
7698 outhead1(
"LOOKFOR%sNEXT4", _table );
7701 outline1(
"CMPU #$%4.4x", (_count+1) * 4 );
7702 outline1(
"BNE LOOKFOR%sL1", _table );
7711 outline1(
"JSR LOOKFOR%s", _table );
7903void cpu_encrypt(
Environment * _environment,
char * _data,
char * _data_size,
char * _key,
char * _key_size,
char * _output ) {
7916void cpu_decrypt(
Environment * _environment,
char * _data,
char * _data_size,
char * _key,
char * _key_size,
char * _output,
char * _result ) {
7931void cpu_hex_to_bin(
Environment * _environment,
char * _value_address,
char * _value_size,
char * _variable_address,
char * _variable_size,
char * _result ) {
7933 deploy( hex2bin, src_hw_6809_hex2bin_asm );
7935 outline1(
"LDX %s", _value_address );
7937 outline1(
"LDY %s", _variable_address );
7938 outline1(
"LDB %s", _variable_size );
7947 deploy( dstring, src_hw_6809_dstring_asm );
7958 deploy( dstring, src_hw_6809_dstring_asm );
7961 outline1(
"LDA #$%2.2x", (
unsigned char)(_value&0xff) );
void cpu_and_32bit(Environment *_environment, char *_left, char *_right, char *_result)
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_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_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_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_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_addressof_16bit(Environment *_environment, char *_source, char *_destination)
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_fill_indirect(Environment *_environment, char *_address, char *_size, char *_pattern, int _size_size)
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_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_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_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_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_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_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_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_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_less_than_and_branch_8bit_const(Environment *_environment, char *_source, int _destination, char *_other, int _equal, int _signed)
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 6809: 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 6809: 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 6809: 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 6809: 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 6809: 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 6809: 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 6809: 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 6809: 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 6809: emit code to store 8 bit
void cpu_math_complement_const_32bit(Environment *_environment, char *_source, int _value)
CPU 6809: emit code to calculate a 32 bit complement of a number
void cpu_store_16bit(Environment *_environment, char *_destination, int _value)
CPU 6809: 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 6809: emit code to double a 16 bit value
void cpu_math_sub_32bit(Environment *_environment, char *_source, char *_destination, char *_other)
CPU 6809: 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 6809: 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 6809: 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 6809: emit code to compare two 8 bit values
void cpu_math_and_const_32bit(Environment *_environment, char *_source, int _mask)
CPU 6809: 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 6809: 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 6809: 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 6809: 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 6809: 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 6809: emit code to move 32 bit
void cpu_fill_size(Environment *_environment, char *_address, int _bytes, char *_pattern)
CPU 6809: 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 6809: emit code to compare two 8 bit values
void cpu_fill_direct_size_value(Environment *_environment, char *_address, int _bytes, int _pattern)
CPU 6809: 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 6809: 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 6809: 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 6809: 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 6809: 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_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 6809: 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 6809: 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 6809: 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 6809: emit code to compare two 16 bit values
void cpu_math_sub_16bit(Environment *_environment, char *_source, char *_destination, char *_other)
CPU 6809: 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 6809: 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 6809: 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 6809: 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_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 6809: 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 cpu6809: 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)
CPU 6809: 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 6809: 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 6809: 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 6809: 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_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 6809: 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 6809: 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 6809: 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_store_8bit_with_offset2(Environment *_environment, char *_source, char *_offset, int _value)
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 6809: 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 6809: 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)
void cpu_less_than_16bit(Environment *_environment, char *_source, char *_destination, char *_other, int _equal, int _signed)
CPU 6809: 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 6809: 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 6809: 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 6809: 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)
CPU 6809: 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 6809: emit code to move 8 bit
void cpu_beq(Environment *_environment, char *_label)
CPU 6809: emit code to make long conditional jump
void cpu_compare_16bit(Environment *_environment, char *_source, char *_destination, char *_other, int _positive)
CPU 6809: 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 6809: 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 6809: 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 6809: 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_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 _CPU6809Register CPU6809Register
enum _CPU6809Stack CPU6809Stack
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_mul2_const_16bit_generated[16]
int cpu_math_div_nbit_to_nbit_const[32]
int cpu_math_mul2_const_8bit_generated[8]
int cpu_math_div_nbit_to_nbit[32]
int cpu_math_mul_nbit_to_nbit[32]
NumberConfig numberConfig
ProtothreadConfig protothreadConfig
CpuOptimization cpuOptimization
#define MAX_TEMPORARY_STORAGE
#define CRITICAL_UNSETTABLE_CPU_REGISTER(v)
#define deploy_with_vars(s, e, v)
#define CRITICAL_DEBUG_UNSUPPORTED(v, t)
#define CRITICAL_BLIT_ALLOC_REGISTER_EXHAUSTED()
#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)