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

Last change on this file since 64 was 64, checked in by aitotat, 13 years ago

Changes to Assembly Library:

  • Progress dialog now prevents max progress value from being zero.
File size: 1.8 KB
Line 
1; File name     :   Registers.asm
2; Project name  :   Assembly Library
3; Created date  :   24.10.2010
4; Last update   :   24.10.2010
5; Author        :   Tomi Tilli
6; Description   :   Functions for register operations.
7
8; Section containing code
9SECTION .text
10
11;--------------------------------------------------------------------
12; Registers_ExchangeDSSIwithESDI
13;   Parameters
14;       Nothing
15;   Returns:
16;       DS:SI and ES:DI are exchanged.
17;   Corrupts registers:
18;       Nothing
19;--------------------------------------------------------------------
20ALIGN JUMP_ALIGN
21Registers_ExchangeDSSIwithESDI:
22    push    ds
23    push    es
24    pop     ds
25    pop     es
26    xchg    si, di
27    ret
28
29
30;--------------------------------------------------------------------
31; Registers_CopySSBPtoESDI
32; Registers_CopySSBPtoDSSI
33; Registers_CopyDSSItoESDI
34; Registers_CopyESDItoDSSI
35;   Parameters
36;       Nothing
37;   Returns:
38;       Copies farm pointer to different segment/pointer register pair
39;   Corrupts registers:
40;       Nothing
41;--------------------------------------------------------------------
42ALIGN JUMP_ALIGN
43Registers_CopySSBPtoESDI:
44    push    ss
45    pop     es
46    mov     di, bp
47    ret
48
49ALIGN JUMP_ALIGN
50Registers_CopySSBPtoDSSI:
51    push    ss
52    pop     ds
53    mov     si, bp
54    ret
55
56ALIGN JUMP_ALIGN
57Registers_CopyDSSItoESDI:
58    push    ds
59    pop     es
60    mov     di, si
61    ret
62
63ALIGN JUMP_ALIGN
64Registers_CopyESDItoDSSI:
65    push    es
66    pop     ds
67    mov     si, di
68    ret
69
70
71;--------------------------------------------------------------------
72; Registers_SetZFifNullPointerInDSSI
73;   Parameters
74;       DS:SI:  Far pointer
75;   Returns:
76;       ZF:     Set if NULL pointer in DS:SI
77;   Corrupts registers:
78;       Nothing
79;--------------------------------------------------------------------
80ALIGN JUMP_ALIGN
81Registers_SetZFifNullPointerInDSSI:
82    push    ax
83    mov     ax, ds
84    or      ax, si
85    pop     ax
86    ret
87
88   
89ALIGN JUMP_ALIGN
90Registers_SetCFifCXisZero:
91   
Note: See TracBrowser for help on using the repository browser.