Last change
on this file since 89 was 86, checked in by krille_n_@…, 14 years ago |
Size optimizations in various files in the XTIDE BIOS.
Also added a new include file for generic macros (macros.inc).
|
File size:
1.3 KB
|
Rev | Line | |
---|
[86] | 1 | ; Project name : XTIDE Universal BIOS
|
---|
| 2 | ; Description : This is the place to put various generic macros.
|
---|
| 3 | ; Should be included immediately after emulate.inc
|
---|
| 4 |
|
---|
| 5 | ;--------------------------------------------------------------------
|
---|
| 6 | ; Skips the immediately following 2 byte instruction by using it
|
---|
| 7 | ; as an immediate value to a dummy instruction.
|
---|
| 8 | ; Destroys the contents of %1.
|
---|
| 9 | ;
|
---|
| 10 | ; SKIP2B
|
---|
| 11 | ; Parameters:
|
---|
| 12 | ; %1: Any 16 bit general purpose register or F for flags.
|
---|
| 13 | ; Returns:
|
---|
| 14 | ; Nothing
|
---|
| 15 | ; Corrupts registers:
|
---|
| 16 | ; %1
|
---|
| 17 | ;--------------------------------------------------------------------
|
---|
| 18 | %macro SKIP2B 1
|
---|
| 19 | %ifidni %1, f
|
---|
| 20 | db 03Dh ; Opcode byte for CMP AX, <immed>
|
---|
| 21 | ;db 0A9h ; Alt. version TEST AX, <immed>
|
---|
| 22 | %elifidni %1, ax
|
---|
| 23 | db 0B8h ; Opcode byte for MOV AX, <immed>
|
---|
| 24 | %elifidni %1, cx
|
---|
| 25 | db 0B9h ; Opcode byte for MOV CX, <immed>
|
---|
| 26 | %elifidni %1, dx
|
---|
| 27 | db 0BAh ; Opcode byte for MOV DX, <immed>
|
---|
| 28 | %elifidni %1, bx
|
---|
| 29 | db 0BBh ; Opcode byte for MOV BX, <immed>
|
---|
| 30 | %elifidni %1, sp
|
---|
| 31 | db 0BCh ; Opcode byte for MOV SP, <immed>
|
---|
| 32 | %elifidni %1, bp
|
---|
| 33 | db 0BDh ; Opcode byte for MOV BP, <immed>
|
---|
| 34 | %elifidni %1, si
|
---|
| 35 | db 0BEh ; Opcode byte for MOV SI, <immed>
|
---|
| 36 | %elifidni %1, di
|
---|
| 37 | db 0BFh ; Opcode byte for MOV DI, <immed>
|
---|
| 38 | %else
|
---|
| 39 | %error "Invalid parameter passed to SKIP2B"
|
---|
| 40 | %endif
|
---|
| 41 | %endmacro
|
---|
Note:
See
TracBrowser
for help on using the repository browser.