Changeset 146 in xtideuniversalbios


Ignore:
Timestamp:
Mar 18, 2011, 8:20:55 AM (13 years ago)
Author:
aitotat
google:author:
aitotat
Message:

Changes to Assembly Library:

  • Added INTPACK macros.
Location:
trunk/Assembly_Library/Inc
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Assembly_Library/Inc/BiosFunctions.inc

    r141 r146  
    66; BIOS interrupts
    77BIOS_VIDEO_INTERRUPT_10h        EQU     10h
     8BIOS_DISK_INTERRUPT_13h         EQU     13h
    89BIOS_SYSTEM_INTERRUPT_15h       EQU     15h
    910BIOS_KEYBOARD_INTERRUPT_16h     EQU     16h
     
    1819TELETYPE_OUTPUT                 EQU     0Eh
    1920
     21; BIOS disk functions
     22GET_DRIVE_PARAMETERS            EQU     08h
     23GET_DISK_TYPE                   EQU     15h
     24
    2025; BIOS keyboard functions
    2126GET_KEYSTROKE                   EQU     00h
  • trunk/Assembly_Library/Inc/Emulate.inc

    r113 r146  
    145145;       Nothing
    146146;--------------------------------------------------------------------
     147%macro eCMOVA 2
     148    jbe     SHORT %%Return
     149    mov     %1, %2
     150%%Return:
     151%endmacro
     152
    147153%macro eCMOVC 2
    148154    jnc     SHORT %%Return
  • trunk/Assembly_Library/Inc/Registers.inc

    r105 r146  
    33%ifndef REGISTERS_INC
    44%define REGISTERS_INC
     5
     6struc INTPACK
     7%ifdef USE_386
     8    .gs             resb    2
     9    .fs             resb    2
     10%endif
     11    .es             resb    2
     12    .ds             resb    2
     13    .di             resb    2
     14    .si             resb    2
     15    .bp             resb    2
     16    .sp             resb    2
     17    .bx:
     18    .bl             resb    1
     19    .bh             resb    1
     20    .dx:
     21    .dl             resb    1
     22    .dh             resb    1
     23    .cx:
     24    .cl             resb    1
     25    .ch             resb    1
     26    .ax:
     27    .al             resb    1
     28    .ah             resb    1
     29    .ip             resb    2
     30    .cs             resb    2
     31    .flags          resb    2
     32endstruc
     33
     34; 8086/8088 FLAGS
     35FLG_FLAGS_CF        EQU (1<<0)
     36FLG_FLAGS_PF        EQU (1<<2)
     37FLG_FLAGS_AF        EQU (1<<4)
     38FLG_FLAGS_ZF        EQU (1<<6)
     39FLG_FLAGS_SF        EQU (1<<7)
     40FLG_FLAGS_TF        EQU (1<<8)
     41FLG_FLAGS_IF        EQU (1<<9)
     42FLG_FLAGS_DF        EQU (1<<10)
     43FLG_FLAGS_OF        EQU (1<<11)
     44
     45
     46;--------------------------------------------------------------------
     47; This macro must be the first thing to call on Interrupt Service Routine.
     48;
     49; SAVE_AND_GET_INTPACK_TO_SSBP
     50;   Parameters
     51;       Nothing
     52;   Returns:
     53;       SS:BP:  Points to INTPACK
     54;   Corrupts registers:
     55;       Nothing
     56;--------------------------------------------------------------------
     57%macro SAVE_AND_GET_INTPACK_TO_SSBP 0
     58    ePUSHA
     59    push    ds
     60    push    es
     61%ifdef USE_386
     62    push    fs
     63    push    gs
     64%endif
     65    mov     bp, sp
     66%endmacro
     67
     68;--------------------------------------------------------------------
     69; This macro must be the last thing to call on Interrupt Service Routine.
     70;
     71; RESTORE_INTPACK_FROM_SSBP
     72;   Parameters
     73;       SS:BP:  Ptr to INTPACK
     74;   Returns:
     75;       All Registers will be loaded from INTPACK
     76;--------------------------------------------------------------------
     77%macro RESTORE_INTPACK_FROM_SSBP 0
     78%ifdef USE_386
     79    pop     gs
     80    pop     fs
     81%endif
     82    pop     es
     83    pop     ds
     84    ePOPA
     85    iret
     86%endmacro
     87
    588
    689;--------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.