Last change
on this file since 106 was
106,
checked in by aitotat, 13 years ago
|
Changes to Assembly Library:
- Some utility functions are now included only when including menu dialogs.
|
File size:
1.7 KB
|
Rev | Line | |
---|
[54] | 1 | ; Project name : Assembly Library |
---|
| 2 | ; Description : Functions for register operations. |
---|
| 3 | |
---|
[66] | 4 | |
---|
[54] | 5 | ; Section containing code |
---|
| 6 | SECTION .text |
---|
| 7 | |
---|
| 8 | ;-------------------------------------------------------------------- |
---|
| 9 | ; Registers_ExchangeDSSIwithESDI |
---|
| 10 | ; Parameters |
---|
| 11 | ; Nothing |
---|
| 12 | ; Returns: |
---|
| 13 | ; DS:SI and ES:DI are exchanged. |
---|
| 14 | ; Corrupts registers: |
---|
| 15 | ; Nothing |
---|
| 16 | ;-------------------------------------------------------------------- |
---|
| 17 | ALIGN JUMP_ALIGN |
---|
| 18 | Registers_ExchangeDSSIwithESDI: |
---|
| 19 | push ds |
---|
| 20 | push es |
---|
| 21 | pop ds |
---|
| 22 | pop es |
---|
| 23 | xchg si, di |
---|
| 24 | ret |
---|
| 25 | |
---|
| 26 | |
---|
| 27 | ;-------------------------------------------------------------------- |
---|
| 28 | ; Registers_CopySSBPtoESDI |
---|
[106] | 29 | ; Registers_CopySSBPtoDSSI |
---|
| 30 | ; Registers_CopyDSSItoESDI |
---|
| 31 | ; Registers_CopyESDItoDSSI |
---|
[54] | 32 | ; Parameters |
---|
| 33 | ; Nothing |
---|
| 34 | ; Returns: |
---|
| 35 | ; Copies farm pointer to different segment/pointer register pair |
---|
| 36 | ; Corrupts registers: |
---|
| 37 | ; Nothing |
---|
| 38 | ;-------------------------------------------------------------------- |
---|
[105] | 39 | ALIGN JUMP_ALIGN |
---|
| 40 | Registers_CopySSBPtoESDI: |
---|
| 41 | COPY_SSBP_TO_ESDI |
---|
| 42 | ret |
---|
[54] | 43 | |
---|
[106] | 44 | %ifdef INCLUDE_MENU_DIALOGS |
---|
[54] | 45 | |
---|
[106] | 46 | ALIGN JUMP_ALIGN |
---|
| 47 | Registers_CopySSBPtoDSSI: |
---|
| 48 | COPY_SSBP_TO_DSSI |
---|
| 49 | ret |
---|
[54] | 50 | |
---|
[106] | 51 | ALIGN JUMP_ALIGN |
---|
| 52 | Registers_CopyDSSItoESDI: |
---|
| 53 | COPY_DSSI_TO_ESDI |
---|
| 54 | ret |
---|
[54] | 55 | |
---|
[106] | 56 | ALIGN JUMP_ALIGN |
---|
| 57 | Registers_CopyESDItoDSSI: |
---|
| 58 | COPY_ESDI_to_DSSI |
---|
| 59 | ret |
---|
[54] | 60 | |
---|
[106] | 61 | %endif |
---|
| 62 | |
---|
| 63 | |
---|
[54] | 64 | ;-------------------------------------------------------------------- |
---|
[106] | 65 | ; Registers_SetZFifNullPointerInDSSI (commented to save bytes) |
---|
[54] | 66 | ; Parameters |
---|
| 67 | ; DS:SI: Far pointer |
---|
| 68 | ; Returns: |
---|
| 69 | ; ZF: Set if NULL pointer in DS:SI |
---|
| 70 | ; Corrupts registers: |
---|
| 71 | ; Nothing |
---|
| 72 | ;-------------------------------------------------------------------- |
---|
[105] | 73 | ;ALIGN JUMP_ALIGN |
---|
| 74 | ;Registers_SetZFifNullPointerInDSSI: |
---|
| 75 | ; push ax |
---|
| 76 | ; mov ax, ds |
---|
| 77 | ; or ax, si |
---|
| 78 | ; pop ax |
---|
| 79 | ; ret |
---|
Note: See
TracBrowser
for help on using the repository browser.