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

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

Changes to Assembly Library:

  • More optimizations to reduce size.
  • Removed some utility functions to reduce size.
File size: 1.7 KB
RevLine 
[54]1; Project name  :   Assembly Library
2; Description   :   Functions for register operations.
3
[66]4
[54]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
[105]29; Registers_CopySSBPtoDSSI (uncommented to save bytes)
30; Registers_CopyDSSItoESDI (uncommented to save bytes)
31; Registers_CopyESDItoDSSI (uncommented to save bytes)
[54]32;   Parameters
33;       Nothing
34;   Returns:
35;       Copies farm pointer to different segment/pointer register pair
36;   Corrupts registers:
37;       Nothing
38;--------------------------------------------------------------------
[105]39ALIGN JUMP_ALIGN
40Registers_CopySSBPtoESDI:
41    COPY_SSBP_TO_ESDI
42    ret
[54]43
[105]44;ALIGN JUMP_ALIGN
45;Registers_CopySSBPtoDSSI:
46;   COPY_SSBP_TO_DSSI
47;   ret
[54]48
[105]49;ALIGN JUMP_ALIGN
50;Registers_CopyDSSItoESDI:
51;   COPY_DSSI_TO_ESDI
52;   ret
[54]53
[105]54;ALIGN JUMP_ALIGN
55;Registers_CopyESDItoDSSI:
56;   COPY_ESDI_to_DSSI
57;   ret
[54]58
59
60;--------------------------------------------------------------------
[105]61; Registers_SetZFifNullPointerInDSSI (uncommented to save bytes)
[54]62;   Parameters
63;       DS:SI:  Far pointer
64;   Returns:
65;       ZF:     Set if NULL pointer in DS:SI
66;   Corrupts registers:
67;       Nothing
68;--------------------------------------------------------------------
[105]69;ALIGN JUMP_ALIGN
70;Registers_SetZFifNullPointerInDSSI:
71;   push    ax
72;   mov     ax, ds
73;   or      ax, si
74;   pop     ax
75;   ret
Note: See TracBrowser for help on using the repository browser.