- Timestamp:
- Mar 4, 2012, 1:33:52 AM (13 years ago)
- google:author:
- krille_n_@hotmail.com
- Location:
- trunk
- Files:
-
- 39 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Assembly_Library/Inc/Emulate.inc
r223 r293 1 1 ; Project name : Emulation library 2 ; Description : Macros for emulating later x86 instruction with older2 ; Description : Macros for emulating later x86 instructions with older 3 3 ; processors. 4 ; Macros are used so optimized builds c ouldbe done4 ; Macros are used so optimized builds can be done 5 5 ; easily for different processors. 6 6 ; … … 10 10 %define EMULATE_INC 11 11 12 ; Defines for processor support. Unsupported instructions will be 13 ; emulated using macros. 14 ; If using 286, define USE_186 and USE_286 15 ; If using 386, define USE_186, USE_286 and USE_386 12 ; Defines for processor support (should be set in makefile). 13 ; Unsupported instructions will be emulated using macros. 16 14 ; If AT class PC is used (instead of XT), define USE_AT 15 17 16 ;%define USE_186 ; Define to use 18x/V20/V30 instructions 18 17 ;%define USE_286 ; Define to use 286 instructions 19 18 ;%define USE_386 ; Define to use 386 instructions 20 19 ;%define USE_AT ; Define for AT class machine 21 ; Above defines should be set on makefile! 22 23 CPU 8086 ; Allow 8088/8086 instructions only 24 %ifdef USE_186 25 CPU 186 ; Allow instructions up to 188/186/V20/V30 20 21 %ifdef USE_386 22 %define USE_286 ; Define to use 286 instructions 23 %endif 24 %ifdef USE_286 25 %define USE_186 ; Define to use 18x/V20/V30 instructions 26 %endif 27 28 %ifdef USE_386 29 CPU 386 ; Allow instructions up to 386 26 30 %elifdef USE_286 27 CPU 286 ; Allow instructions up to 286 28 %elifdef USE_386 29 CPU 386 ; Allow instructions up to 386 30 %endif 31 CPU 286 ; Allow instructions up to 286 32 %elifdef USE_186 33 CPU 186 ; Allow instructions up to 188/186/V20/V30 34 %else 35 CPU 8086 ; Allow 8088/8086 instructions only 36 %endif 37 31 38 BITS 16 ; Set 16 bit code generation 32 39 -
trunk/Assembly_Library/Src/File/FileIO.asm
r133 r293 36 36 ; Returns: 37 37 ; AX: DOS error code if CF set 38 ; CF: Clear if successful l38 ; CF: Clear if successful 39 39 ; Set if error 40 40 ; Corrupts registers: … … 59 59 ; DS:SI: Ptr to destination buffer 60 60 ; Returns: 61 ; AX: Number of bytes actually read if successful l(0 if at EOF before call)61 ; AX: Number of bytes actually read if successful (0 if at EOF before call) 62 62 ; DOS error code if CF set 63 ; CF: Clear if successful l63 ; CF: Clear if successful 64 64 ; Set if error 65 65 ; Corrupts registers: … … 83 83 ; Returns: 84 84 ; AX: DOS error code if CF set 85 ; CF: Clear if successful l85 ; CF: Clear if successful 86 86 ; Set if error 87 87 ; Corrupts registers: … … 106 106 ; DS:SI: Ptr to source buffer 107 107 ; Returns: 108 ; AX: Number of bytes actually written if successful l(EOF check)108 ; AX: Number of bytes actually written if successful (EOF check) 109 109 ; DOS error code if CF set 110 ; CF: Clear if successful l110 ; CF: Clear if successful 111 111 ; Set if error 112 112 ; Corrupts registers: … … 131 131 ; Returns: 132 132 ; AX: DOS error code if CF set 133 ; CF: Clear if successful l133 ; CF: Clear if successful 134 134 ; Set if error 135 135 ; Corrupts registers: … … 200 200 ; DX:AX: Signed file size (if CF cleared) 201 201 ; AX: DOS error code (if CF set) 202 ; CF: Clear if successful l202 ; CF: Clear if successful 203 203 ; Set if error 204 204 ; Corrupts registers: … … 257 257 ; DX:AX: New file position in bytes from start of file (if CF cleared) 258 258 ; AX: DOS error code (if CF set) 259 ; CF: Clear if successful l259 ; CF: Clear if successful 260 260 ; Set if error 261 261 ; Corrupts registers: -
trunk/Assembly_Library/Src/Menu/Dialog/DialogFile.asm
r181 r293 173 173 174 174 lds si, [bp+DIALOG.fpDialogIO] 175 eMOVZX cx, BYTE[si+FILE_DIALOG_IO.bFileAttributes]175 eMOVZX cx, [si+FILE_DIALOG_IO.bFileAttributes] 176 176 lds si, [si+FILE_DIALOG_IO.fpFileFilterString] 177 177 call Directory_UpdateDTAForFirstMatchForDSSIwithAttributesInCX … … 518 518 xor ax, ax 519 519 stosb ; Terminate with NULL 520 jmp SHORT CloseFileDialogAfterSuccessful lSelection520 jmp SHORT CloseFileDialogAfterSuccessfulSelection 521 521 522 522 ;-------------------------------------------------------------------- … … 617 617 test al, al ; User cancellation? 618 618 jnz SHORT ReturnWithoutHandlingKeystroke 619 jmp CloseFileDialogAfterSuccessful lSelection619 jmp CloseFileDialogAfterSuccessfulSelection 620 620 621 621 ALIGN JUMP_ALIGN … … 646 646 test al, FLG_FILEDIALOG_DIRECTORY 647 647 jz SHORT ReturnWithoutHandlingKeystroke 648 ; Fall to CloseFileDialogAfterSuccessful lSelection649 650 ;-------------------------------------------------------------------- 651 ; CloseFileDialogAfterSuccessful lSelection648 ; Fall to CloseFileDialogAfterSuccessfulSelection 649 650 ;-------------------------------------------------------------------- 651 ; CloseFileDialogAfterSuccessfulSelection 652 652 ; Parameters: 653 653 ; SS:BP: Ptr to DIALOG … … 658 658 ;-------------------------------------------------------------------- 659 659 ALIGN JUMP_ALIGN 660 CloseFileDialogAfterSuccessful lSelection:660 CloseFileDialogAfterSuccessfulSelection: 661 661 lds di, [bp+DIALOG.fpDialogIO] 662 662 mov BYTE [di+FILE_DIALOG_IO.bUserCancellation], FALSE -
trunk/Assembly_Library/Src/Menu/Dialog/DialogWord.asm
r58 r293 85 85 GetWordFromUser: 86 86 lds si, [bp+DIALOG.fpDialogIO] 87 eMOVZX bx, BYTE[si+WORD_DIALOG_IO.bNumericBase]87 eMOVZX bx, [si+WORD_DIALOG_IO.bNumericBase] 88 88 ALIGN JUMP_ALIGN 89 89 .GetUserInputIntilValidOrCancelled: -
trunk/Assembly_Library/Src/Menu/MenuBorders.asm
r223 r293 118 118 ALIGN JUMP_ALIGN 119 119 MenuBorders_GetNumberOfMiddleCharactersToDX: 120 eMOVZX dx, BYTE[bp+MENUINIT.bWidth]120 eMOVZX dx, [bp+MENUINIT.bWidth] 121 121 sub dx, BYTE MENU_HORIZONTAL_BORDER_LINES 122 122 ret … … 136 136 RefreshTitleBorders: 137 137 call DrawTopBorderLine 138 eMOVZX cx, BYTE[bp+MENUINIT.bTitleLines]138 eMOVZX cx, [bp+MENUINIT.bTitleLines] 139 139 jmp SHORT DrawTextBorderLinesByCXtimes 140 140 … … 152 152 RefreshInformationBorders: 153 153 call DrawSeparationBorderLine 154 eMOVZX cx, BYTE[bp+MENUINIT.bInfoLines]154 eMOVZX cx, [bp+MENUINIT.bInfoLines] 155 155 jmp SHORT DrawTextBorderLinesByCXtimes 156 156 -
trunk/Assembly_Library/Src/Menu/MenuCharOut.asm
r104 r293 61 61 mov al, CR 62 62 call DisplayCharOut_BiosTeletypeOutput 63 eMOVZX ax, BYTE[VIDEO_BDA.displayContext+DISPLAY_CONTEXT.wCharOutParam]63 eMOVZX ax, [VIDEO_BDA.displayContext+DISPLAY_CONTEXT.wCharOutParam] 64 64 add di, ax 65 65 ReturnSinceNoNeedToStartLineWithControlCharacter: -
trunk/Assembly_Library/Src/Menu/MenuLocation.asm
r181 r293 114 114 ALIGN JUMP_ALIGN 115 115 MenuLocation_GetMaxTextLineLengthToAX: 116 eMOVZX ax, BYTE[bp+MENUINIT.bWidth]116 eMOVZX ax, [bp+MENUINIT.bWidth] 117 117 sub ax, BYTE MENU_HORIZONTAL_BORDER_LINES + MENU_TEXT_COLUMN_OFFSET 118 118 ret -
trunk/Assembly_Library/Src/Menu/MenuScrollbars.asm
r181 r293 245 245 ALIGN JUMP_ALIGN 246 246 MenuScrollbars_GetMaxVisibleItemsOnPageToCX: 247 eMOVZX cx, BYTE[bp+MENUINIT.bHeight]247 eMOVZX cx, [bp+MENUINIT.bHeight] 248 248 sub cl, [bp+MENUINIT.bTitleLines] 249 249 sub cl, [bp+MENUINIT.bInfoLines] -
trunk/Assembly_Library/Src/Serial/SerialServer.asm
r292 r293 3 3 4 4 %include "SerialServer.inc" 5 5 6 6 ; Section containing code 7 7 SECTION .text 8 8 9 9 ;-------------------------------------------------------------------- 10 ; SerialServer_SendReceive: 10 ; SerialServer_SendReceive: 11 11 ; Parameters: 12 12 ; DX: Packed I/O port and baud rate … … 20 20 ; AL, BX, CX, DX 21 21 ;-------------------------------------------------------------------- 22 SerialServer_SendReceive: 23 22 SerialServer_SendReceive: 23 24 24 push si 25 25 push di … … 37 37 mov al,[bp+SerialServer_Command.bSectorCount] 38 38 mov ah,[bp+SerialServer_Command.bCommand] 39 39 40 40 ; 41 41 ; Command byte and sector count live at the top of the stack, pop/push are used to access … … 44 44 push ax ; working copy on the top of the stack 45 45 46 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS ; DF already cleared in Int13h.asm 46 47 cld 48 %endif 47 49 48 50 ;---------------------------------------------------------------------- … … 121 123 jz .zeroSectors 122 124 %endif 123 125 124 126 ; 125 127 ; Top of the read/write loop, one iteration per sector … … 278 280 %endif 279 281 mov ah, al ; for success, AL will already be zero 280 282 281 283 pop bx ; recover "ax" (command and count) from stack 282 284 pop cx ; recover saved sector count 283 mov ch, 0285 xor ch, ch 284 286 sub cl, bl ; subtract off the number of sectors that remained 285 287 … … 366 368 367 369 .writeTimeout1: 368 %ifndef USE_186 369 mov ax,.writeByte1Ready 370 push ax ; return address for ret at end of SC_writeTimeout2 371 %else 372 push .writeByte1Ready 373 %endif 370 ePUSH_T ax, .writeByte1Ready ; return address for ret at end of SC_writeTimeout2 374 371 ;;; fall-through 375 372 … … 381 378 ; One entry point fills in AH with 20h for write 382 379 ; DX: Port address (OK if already incremented to UART_lineStatus) 383 ; BX: 380 ; BX: 384 381 ; Stack: 2 words on the stack below the command/count word 385 382 ; Returns: … … 430 427 pop ax 431 428 %endif 432 429 433 430 .WaitAndPoll: 434 431 %ifndef SERIALSERVER_TIMER_LOCATION … … 441 438 pop bx 442 439 pop ax 443 %endif 440 %endif 444 441 jc SerialServer_OutputWithParameters_ErrorAndPop4Words 445 442 in al,dx -
trunk/Assembly_Library/Src/String/String.asm
r131 r293 37 37 ; CX: Number of characters processed 38 38 ; SI: Updated 39 ; CF: Cleared if successful l39 ; CF: Cleared if successful 40 40 ; Set if error during conversion 41 41 ; Corrupts registers: -
trunk/Configurator/Inc/emulate.inc
r223 r293 1 ; File name : emulate.inc2 1 ; Project name : Emulation library 3 ; Created date : 21.10.2009 4 ; Last update : 4.4.2010 5 ; Author : Tomi Tilli 6 ; Description : Macros for emulating later x86 instruction with older 2 ; Description : Macros for emulating later x86 instructions with older 7 3 ; processors. 8 ; Macros are used so optimized builds c ouldbe done4 ; Macros are used so optimized builds can be done 9 5 ; easily for different processors. 10 6 ; … … 14 10 %define EMULATE_INC 15 11 16 ; Defines for processor support. Unsupported instructions will be 17 ; emulated using macros. 18 ; If using 286, define USE_186 and USE_286 19 ; If using 386, define USE_186, USE_286 and USE_386 12 ; Defines for processor support (should be set in makefile). 13 ; Unsupported instructions will be emulated using macros. 20 14 ; If AT class PC is used (instead of XT), define USE_AT 15 21 16 ;%define USE_186 ; Define to use 18x/V20/V30 instructions 22 17 ;%define USE_286 ; Define to use 286 instructions 23 18 ;%define USE_386 ; Define to use 386 instructions 24 19 ;%define USE_AT ; Define for AT class machine 25 ; Above defines should be set on makefile! 26 27 CPU 8086 ; Allow 8088/8086 instructions only 28 %ifdef USE_186 29 CPU 186 ; Allow instructions up to 188/186/V20/V30 20 21 %ifdef USE_386 22 %define USE_286 ; Define to use 286 instructions 23 %endif 24 %ifdef USE_286 25 %define USE_186 ; Define to use 18x/V20/V30 instructions 26 %endif 27 28 %ifdef USE_386 29 CPU 386 ; Allow instructions up to 386 30 30 %elifdef USE_286 31 CPU 286 ; Allow instructions up to 286 32 %elifdef USE_386 33 CPU 386 ; Allow instructions up to 386 34 %endif 31 CPU 286 ; Allow instructions up to 286 32 %elifdef USE_186 33 CPU 186 ; Allow instructions up to 188/186/V20/V30 34 %else 35 CPU 8086 ; Allow 8088/8086 instructions only 36 %endif 37 35 38 BITS 16 ; Set 16 bit code generation 36 39 -
trunk/Configurator/Src/EEPROM.asm
r2 r293 1 ; File name : EEPROM.asm2 1 ; Project name : XTIDE Univeral BIOS Configurator 3 ; Created date : 19.4.20104 ; Last update : 2.5.20105 ; Author : Tomi Tilli6 2 ; Description : Functions for managing EEPROM contents. 7 3 … … 25 21 call EEPROM_FindXtideUniversalBiosROM 26 22 xor si, si ; Load from beginning of ROM 27 eMOVZX cx, BYTE[es:ROMVARS.bRomSize]23 eMOVZX cx, [es:ROMVARS.bRomSize] 28 24 eSHL_IM cx, 9 ; *= 512 for byte count 29 25 call EEPROM_LoadBytesFromROM -
trunk/Configurator/Src/Flash.asm
r2 r293 1 ; File name : Flash.asm2 1 ; Project name : XTIDE Univeral BIOS Configurator 3 ; Created date : 30.4.20104 ; Last update : 2.5.20105 ; Author : Tomi Tilli6 2 ; Description : Function for flashing the EEPROM. 7 3 … … 46 42 ; Verifies that all data has been written successfully. 47 43 ; 48 ; Flash_WasDataWriteSuccessful l44 ; Flash_WasDataWriteSuccessful 49 45 ; Parameters: 50 46 ; Nothing … … 56 52 ;-------------------------------------------------------------------- 57 53 ALIGN JUMP_ALIGN 58 Flash_WasDataWriteSuccessful l:54 Flash_WasDataWriteSuccessful: 59 55 push ds 60 56 push di … … 218 214 ; ES:BP: Ptr to EEPROM last write location 219 215 ; Returns: 220 ; CF: Cleared if polling successful l216 ; CF: Cleared if polling successful 221 217 ; Set if polling timeout 222 218 ; Corrupts registers: -
trunk/Configurator/Src/Libraries/file.asm
r162 r293 162 162 ; ES:DI: Ptr to destination buffer 163 163 ; Returns: 164 ; AX: Number of bytes actually read if successful l(EOF check)164 ; AX: Number of bytes actually read if successful (EOF check) 165 165 ; DOS error code if CF set 166 ; CF: Clear if successful l166 ; CF: Clear if successful 167 167 ; Set if error 168 168 ; Corrupts registers: … … 194 194 ; ES:DI: Ptr to source buffer 195 195 ; Returns: 196 ; AX: Number of bytes actually written if successful l(EOF check)196 ; AX: Number of bytes actually written if successful (EOF check) 197 197 ; DOS error code if CF set 198 ; CF: Clear if successful l198 ; CF: Clear if successful 199 199 ; Set if error 200 200 ; Corrupts registers: … … 224 224 ; Returns: 225 225 ; AX: DOS error code if CF set 226 ; CF: Clear if successful l226 ; CF: Clear if successful 227 227 ; Set if error 228 228 ; Corrupts registers: … … 373 373 ; Returns: 374 374 ; AX: DOS Error code 375 ; CF: Clear if successful l375 ; CF: Clear if successful 376 376 ; Set if error 377 377 ; Corrupts registers: -
trunk/Configurator/Src/Libraries/menu/menudraw.asm
r181 r293 61 61 push cx 62 62 call MenuCrsr_GetCursor ; Get current cursor to DX 63 eMOVZX cx, BYTE [bp+MENUVARS.bWidth]; Load menu width63 eMOVZX cx, [bp+MENUVARS.bWidth] ; Load menu width 64 64 add cl, [bp+MENUVARS.bInitX] ; Add menu start X coord 65 65 sub cl, W_OFF_CRSR_STR & 0FFh ; Subtract right borders … … 164 164 call MenuCrsr_Point1stItem ; Set cursor position 165 165 mov cx, [bp+MENUVARS.wItemTop] ; Load idx of first menuitem to draw 166 eMOVZX dx, BYTE [bp+MENUVARS.bVisCnt]; Load number of visible menuitems166 eMOVZX dx, [bp+MENUVARS.bVisCnt] ; Load number of visible menuitems 167 167 MIN_U dx, [bp+MENUVARS.wItemCnt] ; Limit to item count 168 168 add dx, cx ; One past last menuitem to draw … … 266 266 call MenuDraw_TopBorder ; Draw top border 267 267 call MenuDraw_NewlineBrdr ; Change line 268 eMOVZX cx, BYTE [bp+MENUVARS.bTitleH]; Load number of title strings268 eMOVZX cx, [bp+MENUVARS.bTitleH] ; Load number of title strings 269 269 jcxz .Return ; Return if no title strings 270 270 ALIGN JUMP_ALIGN … … 284 284 xor dx, dx ; Zero DX 285 285 call MenuCrsr_PointNfoBrdr ; Set cursor 286 eMOVZX cx, BYTE [bp+MENUVARS.bInfoH]; Load number of info strings286 eMOVZX cx, [bp+MENUVARS.bInfoH] ; Load number of info strings 287 287 test BYTE [bp+MENUVARS.bFlags], FLG_MNU_HIDENFO ; Information hidden? 288 288 jnz SHORT .JumpToBottomBorder … … 320 320 xor dx, dx ; Zero DX 321 321 call MenuCrsr_PointItemBrdr ; Set cursor 322 eMOVZX cx, BYTE [bp+MENUVARS.bVisCnt]; Load max number of item strings322 eMOVZX cx, [bp+MENUVARS.bVisCnt] ; Load max number of item strings 323 323 ALIGN JUMP_ALIGN 324 324 .LineLoop: … … 374 374 mov dl, bh ; Leftmost 375 375 PRINT_CHAR 376 eMOVZX cx, BYTE[bp+MENUVARS.bWidth]376 eMOVZX cx, [bp+MENUVARS.bWidth] 377 377 times 2 dec cx ; Subtract borders 378 378 mov dl, bl ; Middle … … 438 438 mov dh, B_V ; Assume no scroll bars needed 439 439 mov ax, [bp+MENUVARS.wItemCnt] ; Load menuitem count to AX 440 eMOVZX bx, BYTE[bp+MENUVARS.bVisCnt] ; Load visible menuitems to BX440 eMOVZX bx, [bp+MENUVARS.bVisCnt] ; Load visible menuitems to BX 441 441 cmp ax, bx ; Need scroll bars? 442 442 jbe .Return ; If not, return -
trunk/Configurator/Src/Libraries/menu/menufile.asm
r83 r293 1 ; File name : menufile.asm2 1 ; Project name : Menu library 3 ; Created date : 20.11.2009 4 ; Last update : 6.1.2011 5 ; Author : Tomi Tilli, 6 ; : Krister Nordvall (Optimizations) 7 ; Description : ASM library to menu system. 2 ; Description : ASM library for menu system. 8 3 ; Contains functions for displaying file dialog. 9 4 … … 276 271 ALIGN JUMP_ALIGN 277 272 .ChangeDone: 278 mov dx, [bp+FDLGVARS.fpFileSrch] ; Load ptr to file search str 279 mov ds, [bp+FDLGVARS.fpFileSrch+2] 273 lds dx, [bp+FDLGVARS.fpFileSrch] ; Load ptr to file search str 280 274 call MenuFile_GetItemCnt ; Get file count from new dir 281 275 pop ds … … 314 308 mov di, [bp+MSGVARS.wStrOff] ; Load string offset 315 309 mov es, [bp+MSGVARS.wStrSeg] ; Load string segment 316 eMOVZX cx, BYTE [bp+MENUVARS.bInfoH]; Load info line count to CX310 eMOVZX cx, [bp+MENUVARS.bInfoH] ; Load info line count to CX 317 311 call MenuDraw_MultilineStr ; Draw multiline str 318 312 pop di -
trunk/Configurator/Src/Libraries/menu/menuloop.asm
r9 r293 1 ; File name : menuloop.asm2 1 ; Project name : Menu library 3 ; Created date : 11.11.2009 4 ; Last update : 25.5.2010 5 ; Author : Tomi Tilli 6 ; Description : ASM library to menu system. 2 ; Description : ASM library for menu system. 7 3 ; Contains event dispatching loop. 8 4 … … 143 139 144 140 ; Jump to process menu key 145 mov di, CNT_MENU_KEYS-1 ; Convert CX... 141 mov di, CNT_MENU_KEYS-1 ; Convert CX... 146 142 sub di, cx ; ...to lookup index 147 143 shl di, 1 ; Prepare for word lookup … … 186 182 jnz .TextScrollUp ; If so, go to text scrolling 187 183 %endif 188 mov ax, [bp+MENUVARS.wItemSel] ; Load selected index 184 mov ax, [bp+MENUVARS.wItemSel] ; Load selected index 189 185 test ax, ax ; Already at top? 190 186 jz .KeyEnd ; If so, go to end … … 222 218 je .KeyHome ; If so, go to beginning 223 219 mov [bp+MENUVARS.wItemSel], ax ; Store new menuitem index 224 eMOVZX bx, BYTE [bp+MENUVARS.bVisCnt]; Load number of visible items220 eMOVZX bx, [bp+MENUVARS.bVisCnt] ; Load number of visible items 225 221 add bx, [bp+MENUVARS.wItemTop] ; BX to one past last visible index 226 222 cmp ax, bx ; Need to scroll? … … 235 231 ALIGN JUMP_ALIGN 236 232 .TextScrollDown: 237 eMOVZX ax, BYTE [bp+MENUVARS.bVisCnt]; Load visible items233 eMOVZX ax, [bp+MENUVARS.bVisCnt] ; Load visible items 238 234 add ax, [bp+MENUVARS.wItemTop] ; Add topmost menuitem index 239 235 cmp ax, [bp+MENUVARS.wItemCnt] ; Already at the bottom? … … 261 257 sbb bh, 0 262 258 mov [bp+MENUVARS.wItemTop], bx ; Store first menuitem to draw 263 jnc .ScrollMenu 259 jnc .ScrollMenu 264 260 mov WORD [bp+MENUVARS.wItemTop], 0 ; Overflow, start with 0 265 261 jmp .ScrollMenu … … 284 280 inc ax ; Increment page 285 281 mul BYTE [bp+MENUVARS.bVisCnt] ; AX=First menuitem on page 286 eMOVZX bx, BYTE [bp+MENUVARS.bVisCnt]; Load number of visible items282 eMOVZX bx, [bp+MENUVARS.bVisCnt] ; Load number of visible items 287 283 add bx, ax ; BX now one past last visible 288 284 cmp bx, [bp+MENUVARS.wItemCnt] ; Went over last? … … 331 327 dw .KeyEnd ; KEY_END 332 328 ; Scan code to jump index translation table 333 .rgbKeyToIdx: 329 .rgbKeyToIdx: 334 330 db KEY_ENTER, KEY_ESC, KEY_UP, KEY_DOWN, 335 331 db KEY_PGUP, KEY_PGDN, KEY_HOME, KEY_END -
trunk/Configurator/Src/Libraries/menu/menumsg.asm
r181 r293 212 212 call MenuMsg_GetTokenForLine ; Get ptr to first token, length to AX 213 213 jnc .EndOfString ; Return if no tokens 214 eMOVZX dx, BYTE [bp+MENUVARS.bWidth]; Menu width214 eMOVZX dx, [bp+MENUVARS.bWidth] ; Menu width 215 215 sub dl, SIZE_MSG_HBRDR ; To line length 216 216 mov bl, ' ' ; Space character -
trunk/Configurator/Src/Libraries/menu/menuprog.asm
r2 r293 1 ; File name : menuprog.asm2 1 ; Project name : Menu library 3 ; Created date : 23.11.2009 4 ; Last update : 23.11.2009 5 ; Author : Tomi Tilli 6 ; Description : ASM library to menu system. 2 ; Description : ASM library for menu system. 7 3 ; Contains functions for displaying progress bar dialog. 8 4 … … 110 106 MenuProg_DrawBar: 111 107 ; Calculate number of chars to draw 112 eMOVZX cx, BYTE [bp+MENUVARS.bWidth]; Dialog width to CX108 eMOVZX cx, [bp+MENUVARS.bWidth] ; Dialog width to CX 113 109 sub cl, 4 ; Sub borders, CX=bar width 114 110 mul cl ; AX=bar with * percentage … … 117 113 sub cl, al ; CX=Empty char cnt 118 114 mov bl, al ; BX=full char cnt 119 115 120 116 ; Draw full chars 121 117 mov dl, FULL_BLCK ; Load full block char … … 180 176 push ds 181 177 push si 182 mov si, [bp+PDLGVARS.fpUser] ; Load offset to user ptr 183 mov ds, [bp+PDLGVARS.fpUser+2] ; Load segment to user ptr 178 lds si, [bp+PDLGVARS.fpUser] ; Load user defined ptr 184 179 xor ax, ax ; Zero percent 185 180 ALIGN JUMP_ALIGN -
trunk/Configurator/Src/Libraries/menu/prntvram.asm
r2 r293 1 ; File name : prntvram.asm2 1 ; Project name : Print library 3 ; Created date : 7.12.2009 4 ; Last update : 7.12.2009 5 ; Author : Tomi Tilli 6 ; Description : ASM library to for character and string 2 ; Description : ASM library for character and string 7 3 ; printing using direct access to VRAM. 8 4 ; … … 27 23 ;-------------------------------------------------------------------- 28 24 ; Return pointer to VRAM for current cursor position. 29 ; 25 ; 30 26 ; PrntVram_GetPtr 31 27 ; Parameters: … … 43 39 44 40 ; Calculate offset to VRAM 45 eMOVZX di, BYTE [es:BDA.bVidPageIdx]; Load page index41 eMOVZX di, [es:BDA.bVidPageIdx] ; Load page index 46 42 shl di, 1 ; Shift for word lookup 47 43 mov ax, [es:di+BDA.rgwVidCurPos] ; Load cursor position … … 70 66 ; use this macro to print characters (so printing implementation 71 67 ; can be easily modified when needed). 72 ; 68 ; 73 69 ; PRINT_CHAR 74 70 ; Parameters: … … 117 113 pop es 118 114 je .IncRow 119 115 120 116 ; Inc column only 121 117 push dx … … 147 143 ; use this macro to print strings (so printing implementation 148 144 ; can be easily modified when needed). 149 ; 145 ; 150 146 ; PRINT_STR 151 147 ; Parameters: … … 167 163 ; All string printing functions must use this macro to print strings 168 164 ; (so printing implementation can be easily modified when needed). 169 ; 165 ; 170 166 ; PRINT_STR_LEN 171 167 ; Parameters: … … 194 190 cmp al, 20h ; Printable character? 195 191 jb .Bios ; If not, use BIOS functions 196 192 197 193 push dx 198 194 mov al, dl 199 195 PRINT_CHAR 200 196 pop dx 201 197 202 198 ;stosb ; Store char to [ES:DI] 203 199 inc dx ; Increment chars printed -
trunk/Configurator/Src/MenuPage.asm
r2 r293 1 ; File name : MenuPage.asm 2 ; Project name : XTIDE Univeral BIOS Configurator 3 ; Created date : 15.4.2010 4 ; Last update : 27.4.2010 5 ; Author : Tomi Tilli 1 ; Project name : XTIDE Universal BIOS Configurator 6 2 ; Description : Functions to access MENUPAGE structs. 7 3 … … 113 109 push cx 114 110 push bx 115 eMOVZX cx, BYTE[si+MENUPAGE.bItemCnt]111 eMOVZX cx, [si+MENUPAGE.bItemCnt] 116 112 lea bx, [si+MENUPAGE.rgMenuPageItem] 117 113 ALIGN JUMP_ALIGN -
trunk/Configurator/Src/MenuPageItem.asm
r181 r293 1 ; Project name : XTIDE Univer al BIOS Configurator1 ; Project name : XTIDE Universal BIOS Configurator 2 2 ; Description : Functions to access MENUPAGEITEM structs. 3 3 … … 21 21 push cs 22 22 pop es 23 eMOVZX cx, BYTE [bp+MENUVARS.bInfoH]; Info line count to CX23 eMOVZX cx, [bp+MENUVARS.bInfoH] ; Info line count to CX 24 24 call MenuPageItem_PrintCommonInfoLines 25 25 mov di, [di+MENUPAGEITEM.szInfo] ; ES:DI now points to info string … … 111 111 ; SS:BP: Ptr to MENUVARS 112 112 ; Returns: 113 ; CF: Set if user data inputted succes fully113 ; CF: Set if user data inputted successfully 114 114 ; Cleared if cancel 115 115 ; Corrupts registers: … … 147 147 ; SS:BP: Ptr to MENUVARS 148 148 ; Returns: 149 ; CF: Set if user data inputted succes fully149 ; CF: Set if user data inputted successfully 150 150 ; Cleared if cancel 151 151 ; Corrupts registers: … … 183 183 ; SS:BP: Ptr to MENUVARS 184 184 ; Returns: 185 ; CF: Set if user data inputted succes fully185 ; CF: Set if user data inputted successfully 186 186 ; Cleared if cancel 187 187 ; Corrupts registers: … … 216 216 ; SS:BP: Ptr to MENUVARS 217 217 ; Returns: 218 ; CF: Set if user data inputted succes fully218 ; CF: Set if user data inputted successfully 219 219 ; Cleared if cancel 220 220 ; Corrupts registers: … … 247 247 ; SS:BP: Ptr to MENUVARS 248 248 ; Returns: 249 ; CF: Set since user data inputted succes fully249 ; CF: Set since user data inputted successfully 250 250 ; Corrupts registers: 251 251 ; AX, BX, CX, DX … … 269 269 ; Returns: 270 270 ; AX: 16-bit unsigned word inputted by user 271 ; CF: Set if user data inputted succes fully271 ; CF: Set if user data inputted successfully 272 272 ; Cleared if cancel 273 273 ; Corrupts registers: … … 297 297 ; SS:BP: Ptr to MENUVARS 298 298 ; Returns: 299 ; CF: Set if user data inputted succes fully299 ; CF: Set if user data inputted successfully 300 300 ; Cleared if cancel 301 301 ; Corrupts registers: -
trunk/Configurator/Src/MenuPageItemFormat.asm
r2 r293 1 ; File name : MenuPageItemFormat.asm 2 ; Project name : XTIDE Univeral BIOS Configurator 3 ; Created date : 15.4.2010 4 ; Last update : 30.4.2010 5 ; Author : Tomi Tilli 6 ; Description : Functions for formatting 1 ; Project name : XTIDE Universal BIOS Configurator 2 ; Description : Functions for formatting 7 3 ; menuitem names from MENUPAGEITEM. 8 4 … … 25 21 mov si, [di+MENUPAGEITEM.rgszLookup] ; Load offset to string lookup table 26 22 mov bx, [di+MENUPAGEITEM.pValue] ; Ptr to value containing lookup index 27 eMOVZX bx, BYTE [bx]; BX=lookup index (values are already shifted for WORD lookup)23 eMOVZX bx, [bx] ; BX=lookup index (values are already shifted for WORD lookup) 28 24 push WORD [bx+si] ; Push offset to string to print 29 25 mov dh, 4 ; Total of 4 bytes for formatting params … … 46 42 ALIGN JUMP_ALIGN 47 43 MenuPageItemFormat_NameForAnyType: 48 eMOVZX bx, BYTE [di+MENUPAGEITEM.bType]; Load menuitem type44 eMOVZX bx, [di+MENUPAGEITEM.bType] ; Load menuitem type 49 45 jmp [cs:bx+.rgfnPrintBasedOnType] 50 46 ALIGN WORD_ALIGN … … 132 128 MenuPageItemFormat_NameWithUnsignedByteValue: 133 129 mov si, [di+MENUPAGEITEM.pValue] ; DS:SI points to value 134 eMOVZX ax, BYTE [si]; Load byte to AX130 eMOVZX ax, [si] ; Load byte to AX 135 131 push ax ; Push byte 136 132 jmp SHORT MenuPageItemFormat_NameWithUnsignedValuePushed … … 161 157 MenuPageItemFormat_NameWithByteHexadecimalValue: 162 158 mov si, [di+MENUPAGEITEM.pValue] ; DS:SI points to value 163 eMOVZX ax, BYTE [si]; Load byte to AX159 eMOVZX ax, [si] ; Load byte to AX 164 160 push ax ; Push byte 165 161 jmp SHORT MenuPageItemFormat_NameWithHexadecimalValuePushed -
trunk/Configurator/Src/Menupages/ConfigurationMenu.asm
r2 r293 1 ; File name : ConfigurationMenu.asm 2 ; Project name : XTIDE Univeral BIOS Configurator 3 ; Created date : 21.4.2010 4 ; Last update : 2.5.2010 5 ; Author : Tomi Tilli 1 ; Project name : XTIDE Universal BIOS Configurator 6 2 ; Description : XTIDE Universal BIOS configuration menu. 7 3 … … 226 222 ; SS:BP: Ptr to MENUVARS 227 223 ; Returns: 228 ; CF: Set if user data inputted succes fully224 ; CF: Set if user data inputted successfully 229 225 ; Cleared if cancel 230 226 ; Corrupts registers: … … 245 241 ; SS:BP: Ptr to MENUVARS 246 242 ; Returns: 247 ; CF: Set if user data inputted succes fully243 ; CF: Set if user data inputted successfully 248 244 ; Cleared if cancel 249 245 ; Corrupts registers: … … 358 354 call ConfigurationMenu_GetNumberOfIdeControllers 359 355 dec cx ; First always visible 360 j cxz.Return356 jz .Return 361 357 mov bx, g_MenuPageItemCfgIde2+MENUPAGEITEM.bFlags 362 358 ALIGN JUMP_ALIGN … … 381 377 ALIGN JUMP_ALIGN 382 378 ConfigurationMenu_GetNumberOfIdeControllers: 379 mov cx, 1 ; Assume one controller for Lite mode 383 380 test WORD [g_cfgVars+CFGVARS.rgbEepromBuffers+ROMVARS.wFlags], FLG_ROMVARS_FULLMODE 384 jz SHORT .ReturnOneControllerForLiteMode 385 eMOVZX cx, BYTE [g_cfgVars+CFGVARS.rgbEepromBuffers+ROMVARS.bIdeCnt] 386 ret 387 ALIGN JUMP_ALIGN 388 .ReturnOneControllerForLiteMode: 389 mov cx, 1 390 ret 381 jz SHORT .Return 382 mov cl, [g_cfgVars+CFGVARS.rgbEepromBuffers+ROMVARS.bIdeCnt] 383 ALIGN JUMP_ALIGN, ret 384 .Return: 385 ret -
trunk/Configurator/Src/Menupages/DrvParamsMenu.asm
r2 r293 1 ; File name : DrvParamsMenu.asm 2 ; Project name : XTIDE Univeral BIOS Configurator 3 ; Created date : 26.4.2010 4 ; Last update : 27.4.2010 5 ; Author : Tomi Tilli 1 ; Project name : XTIDE Universal BIOS Configurator 6 2 ; Description : Menu for configuring DRVPARAMS. 7 3 … … 109 105 ALIGN JUMP_ALIGN 110 106 DrvParamsMenu_SetDrvParamsOffset: 111 eMOVZX cx, BYTE[g_MenuPageDrvParams+MENUPAGE.bItemCnt]107 eMOVZX cx, [g_MenuPageDrvParams+MENUPAGE.bItemCnt] 112 108 dec cx 113 109 mov bx, g_MenuPageItemDrvBlockMode+MENUPAGEITEM.pValue -
trunk/Configurator/Src/Menupages/FlashMenu.asm
r181 r293 1 ; Project name : XTIDE Univer al BIOS Configurator1 ; Project name : XTIDE Universal BIOS Configurator 2 2 ; Description : Flash menu. 3 3 4 4 5 5 ; Flash error codes returned from progress bar task function 6 ERR_FLASH_SUCCESSFUL LEQU 06 ERR_FLASH_SUCCESSFUL EQU 0 7 7 ERR_FLASH_POLL_TIMEOUT EQU 1 8 8 … … 132 132 call MenuPageItem_GetByteFromUserWithoutMarkingUnsaved 133 133 jnc SHORT .Cancel 134 eMOVZX bx, BYTE[g_cfgVars+CFGVARS.bPageSize]134 eMOVZX bx, [g_cfgVars+CFGVARS.bPageSize] 135 135 eBSR ax, bx ; AX = Index of highest order bit 136 136 mov cx, 1 … … 185 185 xor dx, dx 186 186 mov ax, [g_cfgVars+CFGVARS.wEepromSize] ; DX:AX = Bytes to write 187 eMOVZX cx, BYTE[g_cfgVars+CFGVARS.bPageSize]187 eMOVZX cx, [g_cfgVars+CFGVARS.bPageSize] 188 188 div cx ; AX = Total number of pages 189 189 mov [g_cfgVars+CFGVARS.flashVars+FLASHVARS.wTotalPages], ax … … 255 255 ALIGN JUMP_ALIGN 256 256 .FlashComplete: 257 mov ax, ERR_FLASH_SUCCESSFUL L257 mov ax, ERR_FLASH_SUCCESSFUL 258 258 retf 259 259 .Timeout: … … 278 278 mov ax, [si+FLASHVARS.wTotalPages] 279 279 sub ax, [si+FLASHVARS.wPagesLeft] ; AX=Pages written 280 eMOVZX dx, BYTE[g_cfgVars+CFGVARS.bPageSize]280 eMOVZX dx, [g_cfgVars+CFGVARS.bPageSize] 281 281 mul dx ; AX=Bytes written 282 282 … … 311 311 mov dx, [si+FLASHVARS.wPagesBeforeDraw] 312 312 call FlashMenu_GetPointersToPageToFlash 313 eMOVZX ax, BYTE[g_cfgVars+CFGVARS.bSdpCommand]314 eMOVZX cx, BYTE[g_cfgVars+CFGVARS.bPageSize]313 eMOVZX ax, [g_cfgVars+CFGVARS.bSdpCommand] 314 eMOVZX cx, [g_cfgVars+CFGVARS.bPageSize] 315 315 ALIGN JUMP_ALIGN 316 316 .PageLoop: … … 405 405 cmp ax, ERR_FLASH_POLL_TIMEOUT 406 406 je SHORT FlashMenu_PollingTimeoutErrorDuringFlashing 407 call Flash_WasDataWriteSuccessful l407 call Flash_WasDataWriteSuccessful 408 408 jne SHORT FlashMenu_DataVerifyErrorAfterFlashing 409 409 ; Fall to FlashMenu_EepromFlashedSuccessfully -
trunk/Configurator/Src/Menupages/IdeControllerMenu.asm
r2 r293 1 ; File name : IdeControllerMenu.asm 2 ; Project name : XTIDE Univeral BIOS Configurator 3 ; Created date : 23.4.2010 4 ; Last update : 27.4.2010 5 ; Author : Tomi Tilli 1 ; Project name : XTIDE Universal BIOS Configurator 6 2 ; Description : Menu for configuring IDEVARS. 7 3 … … 119 115 120 116 ;-------------------------------------------------------------------- 121 ; Stores IDEVARS specific pointers to IDE Controller Menu 117 ; Stores IDEVARS specific pointers to IDE Controller Menu 122 118 ; MENUPAGEITEM structs. 123 119 ; … … 133 129 ALIGN JUMP_ALIGN 134 130 IdeControllerMenu_SetIdevarsOffset: 135 eMOVZX cx, BYTE[g_MenuPageIdeVars+MENUPAGE.bItemCnt]131 eMOVZX cx, [g_MenuPageIdeVars+MENUPAGE.bItemCnt] 136 132 dec cx 137 133 mov bx, g_MenuPageItemIdeMaster+MENUPAGEITEM.pValue -
trunk/Configurator/Src/Strings.asm
r2 r293 1 ; File name : Strings.asm 2 ; Project name : XTIDE Univeral BIOS Configurator 3 ; Created date : 16.4.2010 4 ; Last update : 2.5.2010 5 ; Author : Tomi Tilli 1 ; Project name : XTIDE Universal BIOS Configurator 6 2 ; Description : Strings used in this program. 7 3 … … 22 18 g_szFlashTimeout: db "Timeout error when polling EEPROM!",STOP 23 19 g_szFlashVerifyErr: db "Data verification failed!",STOP 24 g_szFlashDoneReboot: db "EEPROM written succes fully. Press any key to reboot.",STOP25 g_szFlashDoneContinue: db "EEPROM written succes fully.",STOP20 g_szFlashDoneReboot: db "EEPROM written successfully. Press any key to reboot.",STOP 21 g_szFlashDoneContinue: db "EEPROM written successfully.",STOP 26 22 27 23 … … 44 40 g_szDlgMainLoadStngs: db "Successfully loaded settings from EEPROM.",STOP 45 41 46 g_szNfoMainExitToDOS: db "Quits XTIDE Univer al BIOS Configurator.",STOP42 g_szNfoMainExitToDOS: db "Quits XTIDE Universal BIOS Configurator.",STOP 47 43 g_szNfoMainLoadFile: db "Load BIOS file to be configured or flashed.",STOP 48 44 g_szNfoMainLoadROM: db "Load BIOS from EEPROM to be reconfigured.",STOP -
trunk/Serial_Server/win32/Win32Serial.h
r284 r293 12 12 #define PIPENAME "\\\\.\\pipe\\xtide" 13 13 14 class SerialAccess 14 class SerialAccess 15 15 { 16 16 public: … … 22 22 23 23 pipe = NULL; 24 24 25 25 if( !name ) 26 26 { … … 38 38 { 39 39 log( 0, "Opening named pipe %s (simulating %s baud)", name, baudRate->display ); 40 40 41 41 pipe = CreateNamedPipeA( name, PIPE_ACCESS_DUPLEX, PIPE_TYPE_BYTE|PIPE_REJECT_REMOTE_CLIENTS, 2, 1024, 1024, 0, NULL ); 42 42 if( pipe == INVALID_HANDLE_VALUE ) 43 43 log( -1, "Could not CreateNamedPipe " PIPENAME ); 44 44 45 45 if( !ConnectNamedPipe( pipe, NULL ) ) 46 46 log( -1, "Could not ConnectNamedPipe" ); … … 60 60 61 61 log( 0, "Opening %s (%s baud)", name, baudRate->display ); 62 62 63 63 pipe = CreateFileA( name, GENERIC_READ|GENERIC_WRITE, 0, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0 ); 64 64 if( pipe == INVALID_HANDLE_VALUE ) 65 65 log( -1, "Could not Open \"%s\"", name ); 66 66 67 67 FillMemory(&dcb, sizeof(dcb), 0); 68 68 FillMemory(&timeouts, sizeof(timeouts), 0); … … 83 83 msg = "\n On this COM port, baud rate is limited to 115.2K"; 84 84 } 85 log( -1, "Could not SetCommState: baud rate selected may not be availab ele%s", msg );85 log( -1, "Could not SetCommState: baud rate selected may not be available%s", msg ); 86 86 } 87 87 … … 94 94 95 95 EnumerateCOMPorts( logbuff, 1024 ); 96 96 97 97 log( -1, "Serial port '%s' not found, detected COM ports: %s", name, logbuff ); 98 98 } -
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/BiosFile.asm
r181 r293 27 27 call Buffers_NewBiosWithSizeInDXCXandSourceInAXhasBeenLoadedForConfiguration 28 28 call FileIO_CloseUsingHandleFromBX 29 call DisplayFileLoadedSucces fully29 call DisplayFileLoadedSuccessfully 30 30 jmp SHORT .Return 31 31 … … 43 43 ; DS:SI: Name of file to open 44 44 ; Returns: 45 ; BX: File handle (if succes full)46 ; DX:CX: File size (if succes full)47 ; CF: Clear if successful l45 ; BX: File handle (if successful) 46 ; DX:CX: File size (if successful) 47 ; CF: Clear if successful 48 48 ; Set if error 49 49 ; Corrupts registers: … … 80 80 ; DS:SI: File name 81 81 ; Returns: 82 ; CF: Clear if successful l82 ; CF: Clear if successful 83 83 ; Set if error 84 84 ; Corrupts registers: … … 167 167 call FileIO_CloseUsingHandleFromBX 168 168 call Buffers_ClearUnsavedChanges 169 call DisplayFileSavedSucces fully169 call DisplayFileSavedSuccessfully 170 170 jmp SHORT .Return 171 171 … … 181 181 182 182 ;-------------------------------------------------------------------- 183 ; DisplayFileLoadedSucces fully184 ; DisplayFileSavedSucces fully183 ; DisplayFileLoadedSuccessfully 184 ; DisplayFileSavedSuccessfully 185 185 ; DisplayFailedToLoadFile 186 186 ; DisplayFailedToSaveFile … … 194 194 ;-------------------------------------------------------------------- 195 195 ALIGN JUMP_ALIGN 196 DisplayFileLoadedSucces fully:196 DisplayFileLoadedSuccessfully: 197 197 mov dx, g_szDlgMainLoadFile 198 198 jmp Dialogs_DisplayNotificationFromCSDX 199 199 200 200 ALIGN JUMP_ALIGN 201 DisplayFileSavedSucces fully:201 DisplayFileSavedSuccessfully: 202 202 mov dx, g_szDlgMainSaveFile 203 203 jmp Dialogs_DisplayNotificationFromCSDX -
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Buffers.asm
r204 r293 145 145 push es 146 146 147 eMOVZX di, BYTE[cs:g_cfgVars+CFGVARS.bEepromType]147 eMOVZX di, [cs:g_cfgVars+CFGVARS.bEepromType] 148 148 mov cx, [cs:di+g_rgwEepromTypeToSizeInWords] 149 149 sub cx, [cs:g_cfgVars+CFGVARS.wImageSizeInWords] ; CX = WORDs to append -
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/EEPROM.asm
r181 r293 91 91 .GetXtideUniversalBiosSizeFromEStoDXCX: 92 92 xor dx, dx 93 eMOVZX cx, BYTE[es:ROMVARS.bRomSize]93 eMOVZX cx, [es:ROMVARS.bRomSize] 94 94 eSHL_IM cx, 9 ; *= 512 for byte count 95 95 ret … … 199 199 xor si, si 200 200 call Buffers_GetFlashComparisonBufferToESDI 201 eMOVZX bx, BYTE[cs:g_cfgVars+CFGVARS.bEepromType]201 eMOVZX bx, [cs:g_cfgVars+CFGVARS.bEepromType] 202 202 mov cx, [cs:bx+g_rgwEepromTypeToSizeInWords] 203 203 cld -
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Flash.asm
r181 r293 86 86 ALIGN JUMP_ALIGN 87 87 .GetSdpCommandFunctionToDXwithFlashvarsInSSBP: 88 eMOVZX bx, BYTE[bp+FLASHVARS.bEepromSdpCommand]88 eMOVZX bx, [bp+FLASHVARS.bEepromSdpCommand] 89 89 mov si, [cs:bx+.rgpSdpCommandToEepromTypeLookupTable] 90 90 mov bl, [bp+FLASHVARS.bEepromType] -
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menuitem.asm
r286 r293 146 146 ALIGN JUMP_ALIGN 147 147 Menuitem_StoreValueFromAXtoMenuitemInDSSI: 148 eMOVZX bx, BYTE[si+MENUITEM.bType]148 eMOVZX bx, [si+MENUITEM.bType] 149 149 cmp bl, TYPE_MENUITEM_HEX 150 150 ja SHORT .InvalidItemType … … 207 207 ; 208 208 ; if the lookup pointer is NULL, no translation is needed 209 ; 209 ; 210 210 mov bx, [si+MENUITEM.itemValue+ITEM_VALUE.rgwChoiceToValueLookup] 211 211 test bx, bx 212 212 jz .StoreByteOrWordValueFromAXtoESDIwithItemInDSSI 213 213 214 214 shl ax, 1 ; Shift for WORD lookup 215 215 add bx, ax … … 234 234 mov bx,[si+MENUITEM.itemValue+ITEM_VALUE.fnValueWriter] 235 235 test bx,bx 236 jz SHORT .NoWriter 237 238 call bx 236 jz SHORT .NoWriter 237 238 call bx 239 239 240 240 .NoWriter: … … 313 313 xor ah, ah ; conversion needs to happen before call to the reader, 314 314 ; in case the reader unpacks the byte to a word 315 315 316 316 .NoConvertWordToByteValue: 317 317 mov bx, [si+MENUITEM.itemValue+ITEM_VALUE.fnValueReader] … … 321 321 call bx 322 322 323 .NoReader: 323 .NoReader: 324 324 pop bx 325 325 pop di -
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/MenuitemPrint.asm
r286 r293 36 36 ALIGN JUMP_ALIGN 37 37 MenuitemPrint_NameWithPossibleValueFromDSSI: 38 eMOVZX bx, BYTE[si+MENUITEM.bType]38 eMOVZX bx, [si+MENUITEM.bType] 39 39 cmp bl, TYPE_MENUITEM_ACTION 40 40 ja SHORT .PrintNameAndValueFromDSSI … … 147 147 ; Corrupts registers: 148 148 ; AX, BX, CX 149 ;-------------------------------------------------------------------- 149 ;-------------------------------------------------------------------- 150 150 ALIGN JUMP_ALIGN 151 151 MenuitemPrint_WriteLookupValueStringToBufferInESDIfromUnshiftedItemInDSSI: … … 170 170 ; Corrupts registers: 171 171 ; AX, BX, CX 172 ;-------------------------------------------------------------------- 172 ;-------------------------------------------------------------------- 173 173 ALIGN JUMP_ALIGN 174 174 PrintLookupValueFromAXtoBufferInESDI: 175 175 push si 176 176 test byte [si+MENUITEM.bFlags], FLG_MENUITEM_CHOICESTRINGS 177 jnz .lookupChoice 178 177 jnz .lookupChoice 178 179 179 add ax, [si+MENUITEM.itemValue+ITEM_VALUE.rgszValueToStringLookup] 180 180 xchg bx, ax 181 .found: 181 .found: 182 182 mov si, [bx] 183 183 .errorReturn: … … 187 187 188 188 ; 189 ; With FLG_MENUITEM_CHOICESTRINGS, the array at .rgszChoiceToStringLookup is based on the 189 ; With FLG_MENUITEM_CHOICESTRINGS, the array at .rgszChoiceToStringLookup is based on the 190 190 ; Choice number (offset within .rgwChoiceToValueLookup) instead of the value stored. 191 191 ; Here, we scan the .rgwChoiceToValueLookup array until we find the value there, and then 192 ; use the same offset in .rgszChoiceToStringLookup. If we don't find the value, we 193 ; return an "Error!" string instead. 192 ; use the same offset in .rgszChoiceToStringLookup. If we don't find the value, we 193 ; return an "Error!" string instead. 194 194 ; 195 195 ; Note that the pointer array at .rgszChoiceToStringLookup must be NULL terminated. Since the … … 197 197 ; 198 198 .lookupChoice: 199 mov bx,[si+MENUITEM.itemValue+ITEM_VALUE.rgszChoiceToStringLookup] 199 mov bx,[si+MENUITEM.itemValue+ITEM_VALUE.rgszChoiceToStringLookup] 200 200 mov si,[si+MENUITEM.itemValue+ITEM_VALUE.rgwChoiceToValueLookup] 201 201 202 202 .wordLoop: 203 203 cmp ax,[si] … … 222 222 ; Corrupts registers: 223 223 ; AX, BX, CX 224 ;-------------------------------------------------------------------- 224 ;-------------------------------------------------------------------- 225 225 ALIGN JUMP_ALIGN 226 226 MenuitemPrint_WriteUnsignedValueStringToBufferInESDIfromItemInDSSI: … … 244 244 ; Corrupts registers: 245 245 ; AX, BX, CX 246 ;-------------------------------------------------------------------- 246 ;-------------------------------------------------------------------- 247 247 ALIGN JUMP_ALIGN 248 248 MenuitemPrint_WriteHexValueStringToBufferInESDIfromItemInDSSI: -
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/FlashMenu.asm
r246 r293 273 273 mov [si+FLASHVARS.bEepromSdpCommand], al 274 274 275 eMOVZX bx, BYTE[cs:g_cfgVars+CFGVARS.bEepromPage]275 eMOVZX bx, [cs:g_cfgVars+CFGVARS.bEepromPage] 276 276 mov ax, [cs:bx+g_rgwEepromPageToSizeInBytes] 277 277 mov [si+FLASHVARS.wEepromPageSize], ax … … 314 314 ALIGN JUMP_ALIGN 315 315 .GetSelectedEepromSizeInWordsToAX: 316 eMOVZX bx, BYTE[cs:g_cfgVars+CFGVARS.bEepromType]316 eMOVZX bx, [cs:g_cfgVars+CFGVARS.bEepromType] 317 317 mov ax, [cs:bx+g_rgwEepromTypeToSizeInWords] 318 318 ret … … 330 330 ALIGN JUMP_ALIGN 331 331 .DisplayFlashingResultsFromFlashvarsInDSBX: 332 eMOVZX bx, BYTE[bx+FLASHVARS.flashResult]332 eMOVZX bx, [bx+FLASHVARS.flashResult] 333 333 jmp [cs:bx+.rgfnFlashResultMessage] 334 334 … … 370 370 ALIGN JUMP_ALIGN 371 371 .DisplayRebootMessageAndReboot: 372 mov dx, g_szPCFlashSuccessful l372 mov dx, g_szPCFlashSuccessful 373 373 call Dialogs_DisplayNotificationFromCSDX 374 374 xor ax, ax ; Cold boot flag -
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/MasterSlaveMenu.asm
r286 r293 238 238 call .EnableMenuitemFromCSBX 239 239 mov bx, g_MenuitemMasterSlaveUserLBA 240 jmp .EnableMenuitemFromCSBX 240 jmp .EnableMenuitemFromCSBX 241 241 242 242 ALIGN JUMP_ALIGN … … 245 245 call .EnableMenuitemFromCSBX 246 246 mov bx, g_MenuitemMasterSlaveUserLBA 247 jmp .DisableMenuitemFromCSBX 247 jmp .DisableMenuitemFromCSBX 248 248 249 249 ALIGN JUMP_ALIGN … … 252 252 call .EnableMenuitemFromCSBX 253 253 mov bx, g_MenuitemMasterSlaveUserCHS 254 jmp .DisableMenuitemFromCSBX 254 jmp .DisableMenuitemFromCSBX 255 255 256 256 … … 308 308 test ax, FLG_DRVPARAMS_USERLBA 309 309 jz SHORT .DisableMenuitemFromCSBX 310 jmp SHORT.EnableMenuitemFromCSBX310 ; Fall to .EnableMenuitemFromCSBX 311 311 312 312 -
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Strings.asm
r290 r293 22 22 23 23 g_szNo: db "No",NULL 24 g_szYes: db "Yes",NULL25 24 g_szMultichoiceBooleanFlag: 26 25 db "No",LF 27 26 g_szYes: db "Yes",NULL 28 27 29 28 ; Exit messages … … 44 43 g_szErrEepromVerify: db "EEPROM did not return the same byte that was written.",LF 45 44 db "EEPROM was not flashed properly!",NULL 46 g_szPCFlashSuccessful l: db "EEPROM was written successfully.",LF45 g_szPCFlashSuccessful: db "EEPROM was written successfully.",LF 47 46 db "Press any key to reboot.",NULL 48 47 g_szForeignFlash: db "EEPROM was written successfully.",NULL … … 374 373 db "None",LF 375 374 db "Enable",LF 376 375 g_szValueFlashDisable: db "Disable",NULL 377 376 g_szValueFlashNone: db "None",NULL 378 377 g_szValueFlashEnable: db "Enable",NULL 379 g_szValueFlashDisable: db "Disable",NULL380 378 381 379 g_szMultichoicePageSize: … … 386 384 db "16 bytes",LF 387 385 db "32 bytes",LF 388 386 g_szValueFlash64bytes: db "64 bytes",NULL 389 387 g_szValueFlash1byte: db "1 byte",NULL 390 388 g_szValueFlash2bytes: db "2 bytes",NULL … … 393 391 g_szValueFlash16bytes: db "16 bytes",NULL 394 392 g_szValueFlash32bytes: db "32 bytes",NULL 395 g_szValueFlash64bytes: db "64 bytes",NULL396 393 397 394 g_szSelectionTimeout: db DOUBLE_BOTTOM_LEFT_CORNER,DOUBLE_LEFT_HORIZONTAL_TO_SINGLE_VERTICAL,"%ASelection in %2u s",NULL -
trunk/XTIDE_Universal_BIOS_Configurator_v2/makefile
r187 r293 1 1 ############################################################################### 2 # Generic makefile for building binary files. # 3 # v. 1.1.0 (28.7.2007 ... 5.10.2010) # 4 # (C) Tomi Tilli # 5 # aitotat@gmail.com # 2 # Makefile to build XTIDE Universal BIOS Configurator v2. # 6 3 # # 7 4 # Valid makefile targets are: # 8 5 # all Removes existing files and builds binary file in \Build # 9 # build Builds binary file in \Build #10 6 # clean Removes all files from \Build # 11 7 # # … … 54 50 55 51 56 57 52 ################################################################# 58 53 # Assembler preprocessor defines. # … … 61 56 DEFINES_XT = ELIMINATE_CGA_SNOW 62 57 DEFINES_XTPLUS = USE_186 ELIMINATE_CGA_SNOW 63 DEFINES_AT = USE_ 186 USE_286 USE_AT58 DEFINES_AT = USE_286 USE_AT 64 59 65 60 … … 113 108 .PHONY: all at xtplus xt clean release 114 109 115 # Make clean debug and release versions116 110 all: clean xt 117 111 @echo All done! … … 123 117 xtplus: 124 118 @$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_XTPLUS) -l"$(TARGET)_xtp.lst" -o"$(TARGET)_xtp.$(EXTENSION)" 125 @echo XT plus version "$(TARGET)_xtp.$(EXTENSION)" built.119 @echo XT Plus version "$(TARGET)_xtp.$(EXTENSION)" built. 126 120 127 121 xt:
Note:
See TracChangeset
for help on using the changeset viewer.