source: xtideuniversalbios/trunk/Assembly_Library/Src/Util/Registers.asm@ 126

Last change on this file since 126 was 106, checked in by Tomi Tilli, 14 years ago

Changes to Assembly Library:

  • Some utility functions are now included only when including menu dialogs.
File size: 1.7 KB
Line 
1; Project name : Assembly Library
2; Description : Functions for register operations.
3
4
5; Section containing code
6SECTION .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;--------------------------------------------------------------------
17ALIGN JUMP_ALIGN
18Registers_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
29; Registers_CopySSBPtoDSSI
30; Registers_CopyDSSItoESDI
31; Registers_CopyESDItoDSSI
32; Parameters
33; Nothing
34; Returns:
35; Copies farm pointer to different segment/pointer register pair
36; Corrupts registers:
37; Nothing
38;--------------------------------------------------------------------
39ALIGN JUMP_ALIGN
40Registers_CopySSBPtoESDI:
41 COPY_SSBP_TO_ESDI
42 ret
43
44%ifdef INCLUDE_MENU_DIALOGS
45
46ALIGN JUMP_ALIGN
47Registers_CopySSBPtoDSSI:
48 COPY_SSBP_TO_DSSI
49 ret
50
51ALIGN JUMP_ALIGN
52Registers_CopyDSSItoESDI:
53 COPY_DSSI_TO_ESDI
54 ret
55
56ALIGN JUMP_ALIGN
57Registers_CopyESDItoDSSI:
58 COPY_ESDI_to_DSSI
59 ret
60
61%endif
62
63
64;--------------------------------------------------------------------
65; Registers_SetZFifNullPointerInDSSI (commented to save bytes)
66; Parameters
67; DS:SI: Far pointer
68; Returns:
69; ZF: Set if NULL pointer in DS:SI
70; Corrupts registers:
71; Nothing
72;--------------------------------------------------------------------
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.