|
BB2 C port
API reference: Blitz libraries in C and the shared code
|
Data Structures | |
| struct | disdata |
Macros | |
| #define | STDEA 0b0000000000111111 |
| #define | STDSIZE 0b0000000011000000 |
| #define | LINEBUFF 128 |
Enumerations | |
| enum | { IMMED , NONE , RRRMMM11 , TOCCR , TOSR , DESTADDR11 , DESTDATA11 , QIMMED11 , DESTDATA2 , DISPLACE , IMMED2 , DAREG215 , ADDRPI2 , ADDRPI11 , ADDRPD2 , ADDRPD11 , DISPLACE2 , _DATA214202 , DESTADDR2 , TUSP , CONTROL2 , RLIST , BYTE7 , VNUM } |
Functions | |
| void | disoneline (void) |
| void | instrsize (void) |
| static void | libinit (void) |
| init: clears InstrSize's size (Fixed (#1170): the original's init is RTS); the library needs no system library. | |
| static void | libfinit (void) |
| finit: nothing (RTS). | |
| static UWORD | peekw (void) |
| static UWORD | rdw (void) |
| static ULONG | rdl (void) |
| static void | put (char c) |
| static UWORD | lsrw (UWORD x, UWORD n) |
| static char * | hexprint (ULONG n) |
| static const char * | decprint (ULONG n) |
| static const char * | sdecprint (ULONG n) |
| static void | strcopy (void) |
| static void | hexlast (ULONG n, int digits) |
| static void | error6 (void) |
| static void | immediate (void) |
| static void | indexreg (UWORD ext, char reg, UWORD scale) |
| static void | basereg (char reg, int pc) |
| static ULONG | disp (UWORD sz) |
| static void | indexed (char reg, int pc) |
| static void | decodeearev (UWORD mode, UWORD r) |
| static void | decodeea (UWORD ea) |
| static void | rlist (UWORD op) |
| static void | decodespecial (UWORD code, UWORD op) |
| static int | decode (const struct disdata *e, UWORD op) |
| ULONG | c_disoneline (ULONG addr) |
| DisAssemble$(address.l): the instruction at address as a line of at least 34 columns. | |
| ULONG | c_instrsize (void) |
| InstrSize: the size of the last instruction disassembled. | |
Variables | |
| static const struct disdata | disdata [] |
| struct { | |
| UBYTE code [4] | |
| char linebuff [LINEBUFF] | |
| UWORD opsize | |
| UWORD opextra | |
| UWORD extrainstr | |
| UWORD isdestop | |
| UWORD docomma | |
| char condtable [32] | |
| char bcondtable [32] | |
| } | v |
| static ULONG | disasm_add |
| static const UBYTE * | instr |
| static char * | linepos |
| static const char * | opstr |
| static char | hexbuff2 [11] = "$00000000" |
| static const char | hexchrtab [] = "0123456789ABCDEF" |
| struct { | |
| char prefix [2] | |
| char digits [16] | |
| } | dec = { "#-", "" } |
| static const char | deczero [] = "0" |
| static const char | scaletab [] = "0248" |
| static const char | pdrlist [32] |
| static char | pdrbuff [50] |
| static char | rangereg |
| static char | rangedigit |
| #define LINEBUFF 128 |
| #define STDEA 0b0000000000111111 |
| #define STDSIZE 0b0000000011000000 |
| anonymous enum |
|
static |
| ULONG c_disoneline | ( | ULONG | addr | ) |
DisAssemble$(address.l): the instruction at address as a line of at least 34 columns.
The first word is matched against DisData; the line (name and size in columns 0-8, the operands from column 9) is written to a3 byte by byte (Fixed (#617): the original's word writes were an address error at an odd a3 on a 68000): a line shorter than 34 columns padded with spaces to 34, a longer one whole (Fixed (#616): the original cut it after 34 columns). InstrSize becomes the bytes the instruction took. A decimal 0 is "0" (Fixed (#614): the original gave the bytes at address 8). An odd address is an address error on a 68000.
| addr | d0: the address of the instruction |
| ULONG c_instrsize | ( | void | ) |
InstrSize: the size of the last instruction disassembled.
|
static |
|
static |
|
static |
|
static |
|
static |
| void disoneline | ( | void | ) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
| void instrsize | ( | void | ) |
|
static |
finit: nothing (RTS).
|
static |
init: clears InstrSize's size (Fixed (#1170): the original's init is RTS); the library needs no system library.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
| char bcondtable[32] |
| UBYTE code[4] |
| char condtable[32] |
| struct { ... } dec |
|
static |
| char digits[16] |
|
static |
|
static |
| UWORD docomma |
| UWORD extrainstr |
|
static |
|
static |
|
static |
| UWORD isdestop |
| char linebuff[LINEBUFF] |
|
static |
| UWORD opextra |
| UWORD opsize |
|
static |
|
static |
|
static |
| char prefix[2] |
|
static |
|
static |
|
static |
| struct { ... } v |