source: xtideuniversalbios/trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Main.asm@ 116

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

Changes to Configurator v2:

  • Updated for v1.2.0_wip BIOS.
  • IRQ selection is now properly hidden when disabling IRQ.
  • Load BIOS from ROM should now properly appear on main menu.
File size: 3.1 KB
Line 
1; Project name : XTIDE Univeral BIOS Configurator v2
2; Description : Program start and exit.
3
4; Include .inc files
5%define INCLUDE_MENU_DIALOGS
6%include "AssemblyLibrary.inc" ; Assembly Library. Must be included first!
7%include "Romvars.inc" ; XTIDE Universal BIOS variables
8
9%include "MenuCfg.inc"
10%include "MenuStructs.inc"
11%include "Variables.inc"
12
13
14; Section containing code
15SECTION .text
16
17
18; Program first instruction.
19ORG 100h ; Code starts at offset 100h (DOS .COM)
20Start:
21 jmp Main_Start
22
23; Include library sources
24%include "AssemblyLibrary.asm"
25
26; Include sources for this program
27%include "BiosFile.asm"
28%include "Buffers.asm"
29%include "Dialogs.asm"
30%include "EEPROM.asm"
31%include "Flash.asm"
32%include "MenuEvents.asm"
33%include "Menuitem.asm"
34%include "MenuitemPrint.asm"
35%include "Menupage.asm"
36%include "Strings.asm"
37
38%include "BootMenuSettingsMenu.asm"
39%include "ConfigurationMenu.asm"
40%include "FlashMenu.asm"
41%include "IdeControllerMenu.asm"
42%include "MainMenu.asm"
43%include "MasterSlaveMenu.asm"
44
45
46
47;--------------------------------------------------------------------
48; Program start
49;--------------------------------------------------------------------
50ALIGN JUMP_ALIGN
51Main_Start:
52 mov ax, SCREEN_BACKGROUND_CHARACTER_AND_ATTRIBUTE
53 call InitializeScreenWithBackgroudCharAndAttrInAX
54
55 call Main_InitializeCfgVars
56 call MenuEvents_DisplayMenu
57 mov ax, DOS_BACKGROUND_CHARACTER_AND_ATTRIBUTE
58 call InitializeScreenWithBackgroudCharAndAttrInAX
59
60 ; Exit to DOS
61 mov ax, 4C00h ; Exit to DOS
62 int 21h
63
64
65;--------------------------------------------------------------------
66; InitializeScreenWithBackgroudCharAndAttrInAX
67; Parameters:
68; AL: Background character
69; AH: Background attribute
70; Returns:
71; Nothing
72; Corrupts registers:
73; AX, DX, DI
74;--------------------------------------------------------------------
75ALIGN JUMP_ALIGN
76InitializeScreenWithBackgroudCharAndAttrInAX:
77 xchg dx, ax
78 CALL_DISPLAY_LIBRARY InitializeDisplayContext ; Reset cursor etc
79 xchg ax, dx
80 CALL_DISPLAY_LIBRARY ClearScreenWithCharInALandAttrInAH
81 ret
82
83
84;--------------------------------------------------------------------
85; Main_InitializeCfgVars
86; Parameters:
87; DS: Segment to CFGVARS
88; Returns:
89; Nothing
90; Corrupts registers:
91; AX, BX, CX, DI
92;--------------------------------------------------------------------
93ALIGN JUMP_ALIGN
94Main_InitializeCfgVars:
95 push es
96
97 call Buffers_Clear
98 call EEPROM_FindXtideUniversalBiosROMtoESDI
99 jnc SHORT .InitializationCompleted
100 mov [CFGVARS.wEepromSegment], es
101.InitializationCompleted:
102 pop es
103 ret
104
105
106; Section containing initialized data
107SECTION .data
108
109ALIGN WORD_ALIGN
110g_cfgVars:
111istruc CFGVARS
112 at CFGVARS.pMenupage, dw g_MenupageForMainMenu
113 at CFGVARS.wFlags, dw DEFAULT_CFGVARS_FLAGS
114 at CFGVARS.wEepromSegment, dw DEFAULT_EEPROM_SEGMENT
115 at CFGVARS.bEepromType, db DEFAULT_EEPROM_TYPE
116 at CFGVARS.bEepromPage, db DEFAULT_PAGE_SIZE
117 at CFGVARS.bSdpCommand, db DEFAULT_SDP_COMMAND
118iend
119
120
121; Section containing uninitialized data
122SECTION .bss
Note: See TracBrowser for help on using the repository browser.