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

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

Changes to Configuration Program v2:

  • Menu structure should now be complete.
File size: 2.5 KB
Line 
1; File name : main.asm
2; Project name : XTIDE Univeral BIOS Configurator v2
3; Created date : 5.10.2010
4; Last update : 19.11.2010
5; Author : Tomi Tilli
6; Description : Program start and exit.
7
8; Include .inc files
9%define INCLUDE_MENU_DIALOGS
10%include "AssemblyLibrary.inc" ; Assembly Library. Must be included first!
11%include "Romvars.inc" ; XTIDE Universal BIOS variables
12
13%include "MenuCfg.inc"
14%include "MenuStructs.inc"
15%include "Variables.inc"
16
17
18; Section containing code
19SECTION .text
20
21
22; Program first instruction.
23ORG 100h ; Code starts at offset 100h (DOS .COM)
24Start:
25 jmp Main_Start
26
27; Include library sources
28%include "AssemblyLibrary.asm"
29
30; Include sources for this program
31%include "BiosFile.asm"
32%include "Buffers.asm"
33%include "Dialogs.asm"
34%include "EEPROM.asm"
35%include "MenuEvents.asm"
36%include "Menuitem.asm"
37%include "MenuitemPrint.asm"
38%include "Menupage.asm"
39%include "Strings.asm"
40
41%include "BootMenuSettingsMenu.asm"
42%include "ConfigurationMenu.asm"
43%include "FlashMenu.asm"
44%include "IdeControllerMenu.asm"
45%include "MainMenu.asm"
46%include "MasterSlaveMenu.asm"
47
48
49
50;--------------------------------------------------------------------
51; Program start
52;--------------------------------------------------------------------
53ALIGN JUMP_ALIGN
54Main_Start:
55 CALL_DISPLAY_LIBRARY InitializeDisplayContext
56 CALL_DISPLAY_LIBRARY ClearScreen
57
58 call Main_InitializeCfgVars
59 call MenuEvents_DisplayMenu
60
61 ; Exit to DOS
62 CALL_DISPLAY_LIBRARY SynchronizeDisplayContextToHardware
63 mov ax, 4C00h ; Exit to DOS
64 int 21h
65
66
67;--------------------------------------------------------------------
68; Main_InitializeCfgVars
69; Parameters:
70; DS: Segment to CFGVARS
71; Returns:
72; Nothing
73; Corrupts registers:
74; AX, BX, CX, DI
75;--------------------------------------------------------------------
76ALIGN JUMP_ALIGN
77Main_InitializeCfgVars:
78 push es
79
80 call Buffers_Clear
81 call EEPROM_FindXtideUniversalBiosROMtoESDI
82 jnc SHORT .InitializationCompleted
83 mov [CFGVARS.wEepromSegment], es
84.InitializationCompleted:
85 pop es
86 ret
87
88
89; Section containing initialized data
90SECTION .data
91
92ALIGN WORD_ALIGN
93g_cfgVars:
94istruc CFGVARS
95 at CFGVARS.pMenupage, dw g_MenupageForMainMenu
96 at CFGVARS.wFlags, dw DEFAULT_CFGVARS_FLAGS
97 at CFGVARS.wEepromSegment, dw DEFAULT_EEPROM_SEGMENT
98 at CFGVARS.bEepromPageSize, db DEFAULT_PAGE_SIZE
99 at CFGVARS.bSdpCommand, db DEFAULT_SDP_COMMAND
100iend
101
102
103; Section containing uninitialized data
104SECTION .bss
105
106g_uninitialized:
107 resb 32768
108
Note: See TracBrowser for help on using the repository browser.