- Timestamp:
- Oct 2, 2022, 7:30:02 PM (2 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Assembly_Library/Inc/CgaSnow.inc
r589 r624 8 8 ; JMP_WAIT_FOR_RETRACE_IF_NECESSARY_THEN 9 9 ; Parameters: 10 ; %1: Instruction that accesse dCGA memory10 ; %1: Instruction that accesses CGA memory 11 11 ; AL: Character to output 12 12 ; AH: Attribute to output (stosw only) -
trunk/Assembly_Library/Inc/Emulate.inc
r623 r624 188 188 ; %2: Source WORD operand where to search bit (not CX or same as %1!) 189 189 ; Returns: 190 ; %1: Index of lowest order bit from %2 191 ; ZF: Set if %2 is zero 192 ; Cleared if %2 is non-zero 193 ; Corrupts registers: 194 ; Nothing 195 ;-------------------------------------------------------------------- 196 %macro eBSF 2 197 %ifndef USE_386 198 FSIS ], %2 ; %2 is a memory operand? 199 %if strpos 200 cmp WORD %2, BYTE 0 ; Source operand is zero? 201 je SHORT %%Return ; If so, return with ZF set 202 %else ; No, %2 is a register 203 test %2, %2 204 jz SHORT %%Return 205 %endif 206 207 push cx 208 209 %ifdef USE_NEC_V 210 mov cx, -1 211 212 ALIGN JUMP_ALIGN 213 %%BitLoop: 214 inc cx 215 eTEST1 %2, cl 216 jz SHORT %%BitLoop 217 mov %1, cx 218 219 %else ; ~USE_NEC_V 220 mov cx, 1<<15 221 mov %1, -1 222 223 ALIGN JUMP_ALIGN 224 %%BitLoop: 225 rol cx, 1 ; Prepare to test next bit 226 inc %1 ; Increment bit index 227 test %2, cx ; Bit set? 228 jz SHORT %%BitLoop 229 %endif 230 231 pop cx 232 233 %%Return: 234 ;----------------------------------- 235 %else ; USE_386 236 bsf %1, %2 237 %endif 238 %endmacro 239 240 241 ;-------------------------------------------------------------------- 242 ; Emulates BSR (Bit Scan Reverse) instruction when necessary. 243 ; BSR is used to find index of most significant bit. 244 ; 245 ; eBSR 246 ; Parameters: 247 ; %1: Destination WORD Register for bit index (not CX or same as %2!) 248 ; %2: Source WORD operand where to search bit (not CX or same as %1!) 249 ; Returns: 190 250 ; %1: Index of highest order bit from %2 191 251 ; ZF: Set if %2 is zero … … 194 254 ; Nothing 195 255 ;-------------------------------------------------------------------- 196 %macro eBS F2256 %macro eBSR 2 197 257 %ifndef USE_386 198 cmp WORD %2, BYTE 0 ; Source operand is zero? 199 je SHORT %%Return ; If so, return with ZF set 200 201 ; Set destination to zero and load mask for bit 0 258 FSIS ], %2 ; %2 is a memory operand? 259 %if strpos 260 cmp WORD %2, BYTE 0 ; Source operand is zero? 261 je SHORT %%Return ; If so, return with ZF set 262 %else ; No, %2 is a register 263 test %2, %2 264 jz SHORT %%Return 265 %endif 266 202 267 push cx 203 xor %1, %1 204 mov cx, 1 268 269 %ifdef USE_NEC_V 270 mov cx, 16 205 271 206 272 ALIGN JUMP_ALIGN 207 273 %%BitLoop: 208 test %2, cx ; Bit set? 209 jnz SHORT %%PopAndReturn; If so, return with ZF cleared 210 shl cx, 1 ; Prepare to test next bit 211 inc %1 ; Increment bit index 212 jmp SHORT %%BitLoop ; Loop until bit found 213 %%PopAndReturn: 214 pop cx 215 %%Return: 216 ;----------------------------------- 217 %else 218 bsf %1, %2 219 %endif 220 %endmacro 221 222 223 ;-------------------------------------------------------------------- 224 ; Emulates BSR (Bit Scan Reverse) instruction when necessary. 225 ; BSR is used to find index of most significant bit. 226 ; 227 ; eBSR 228 ; Parameters: 229 ; %1: Destination WORD Register for bit index (not CX or same as %2!) 230 ; %2: Source WORD operand where to search bit (not CX or same as %1!) 231 ; Returns: 232 ; %1: Index of highest order bit from %2 233 ; ZF: Set if %2 is zero 234 ; Cleared if %2 is non-zero 235 ; Corrupts registers: 236 ; Nothing 237 ;-------------------------------------------------------------------- 238 %macro eBSR 2 239 %ifndef USE_386 240 cmp WORD %2, BYTE 0 ; Source operand is zero? 241 je SHORT %%Return ; If so, return with ZF set 242 243 ; Load mask for highest order bit 244 push cx 245 mov cx, 1<<15 246 mov %1, 15 274 dec cx 275 eTEST1 %2, cl 276 jz SHORT %%BitLoop 277 mov %1, cx 278 279 %else ; ~USE_NEC_V 280 mov cx, 1 281 mov %1, 16 247 282 248 283 ALIGN JUMP_ALIGN 249 284 %%BitLoop: 285 ror cx, 1 ; Prepare to test next bit 286 dec %1 ; Decrement bit index 250 287 test %2, cx ; Bit set? 251 jnz SHORT %%PopAndReturn; If so, return with ZF cleared 252 shr cx, 1 ; Prepare to test next bit 253 dec %1 ; Decrement bit index 254 jmp SHORT %%BitLoop ; Loop until bit found 255 %%PopAndReturn: 288 jz SHORT %%BitLoop 289 %endif 290 256 291 pop cx 257 %%Return: 258 ;----------------------------------- 259 %else 292 293 %%Return: 294 ;----------------------------------- 295 %else ; USE_386 260 296 bsr %1, %2 261 297 %endif … … 539 575 ; %2: Source segment override (destination is always ES) 540 576 ; %3: String instruction 577 ; %4: An exclamation mark (!) if the state of the IF must 578 ; be preserved (can not be used together with CMPS or 579 ; SCAS instructions), otherwise it will be set on 580 ; return from the macro (i.e. interrupts will be on) 541 581 ; CX: Repeat count 542 582 ; Returns: 543 ; FLAGS for cmps and scasonly583 ; FLAGS for CMPS and SCAS only 544 584 ; Corrupts registers: 545 585 ; FLAGS 546 586 ;-------------------------------------------------------------------- 547 %macro eSEG_STR 3 548 %ifndef USE_186 ; 8088/8086 has string instruction restart bug when more than one prefix 549 %%Loop: 550 %1 ; REP is the prefix that can be lost 551 %2 ; SEG is the prefix that won't be lost 552 %3 ; String instruction 553 FSIS cmps, %3 587 %macro eSEG_STR 3-4 588 %ifndef USE_186 ; 8088/8086 has string instruction restart bug when using more than one prefix 589 %ifidn %4, ! ; Preserve the IF 590 FSIS cmps, %3 554 591 %ifn strpos 555 592 FSIS scas, %3 556 593 %endif 557 %if strpos ; Must preserve FLAGS 558 jcxz %%End ; Jump to end if no repeats left (preserves FLAGS) 559 jmp SHORT %%Loop ; Loop while repeats left 560 %%End: 561 %else ; No need to preserve FLAGS 562 inc cx 563 loop %%Loop 564 %endif 565 %else ; No bug on V20/V30 and later, don't know about 188/186 594 %if strpos 595 %error "The state of the IF can not be preserved when using CMPS or SCAS!" 596 %endif 597 pushf 598 cli 599 %1 ; REP is the prefix that can be lost 600 %2 ; SEG is the prefix that won't be lost 601 %3 ; String instruction 602 popf 603 %else ; No need to preserve the IF 604 cli 605 %1 606 %2 607 %3 608 sti 609 %endif 610 %else ; No bug on V20/V30/188/186 and later 566 611 %2 567 612 %1 %3 -
trunk/Assembly_Library/Src/Display/DisplayFormat.asm
r592 r624 366 366 367 367 cmp si, BYTE 7Fh ; well within the boundaries of ROMVARS_size 368 jb .notFormatted368 jb SHORT .notFormatted 369 369 370 370 dec bp … … 373 373 inc bp ; will be decremented after the call is done 374 374 inc bp 375 jmp .done375 jmp SHORT .done 376 376 377 377 .notFormatted: -
trunk/BIOS_Drive_Information_Tool/Src/Strings.asm
r613 r624 22 22 23 23 g_szProgramName: db "BIOS Drive Information Tool v1.0.3",CR,LF 24 db "(C) 2012-202 1by XTIDE Universal BIOS Team",CR,LF24 db "(C) 2012-2022 by XTIDE Universal BIOS Team",CR,LF 25 25 db "Released under GNU GPL v2",CR,LF 26 26 db "http://xtideuniversalbios.org/",CR,LF,NULL … … 37 37 g_szLBA: db "LBA ",NULL 38 38 g_szFormatCHS: db " Cylinders : %5u, Heads: %3u, Sectors: %2u",NULL 39 g_szWillBeModified: db "Will be modified to:",CR,LF,NULL 39 g_szWillBeModified: db "Will be modified to:",CR,LF,NULL 40 40 g_szChsSectors: db " CHS sectors: ",NULL 41 41 g_szLBA28: db " LBA28 sectors: ",NULL … … 44 44 g_szPIO: db " PIO mode : Max %u, Min cycle times: %u ns, with IORDY %d ns",CR,LF,NULL 45 45 g_szXUB: db "XTIDE Universal BIOS %s generates following L-CHS...",CR,LF,NULL 46 g_szXUBversion: db ROM_VERSION_STRING ; This one is NULL terminated 46 g_szXUBversion: db "r" 47 db ROM_VERSION_STRING 48 db BUILD_DATE_STRING,NULL 47 49 48 50 g_szOldInfoHeader: db "Old INT 13h information from AH=08h and AH=15h...",CR,LF,NULL -
trunk/Serial_Server/win32/Win32.cpp
r602 r624 33 33 #include "../library/FlatImage.h" 34 34 35 #include "../../XTIDE_Universal_BIOS/Inc/Version.inc"36 37 35 char *bannerStrings[] = { 38 36 "SerDrive - XTIDE Universal BIOS Serial Drive Server", 39 "Copyright (C) 2012-20 19by XTIDE Universal BIOS Team",37 "Copyright (C) 2012-2022 by XTIDE Universal BIOS Team", 40 38 "Released under GNU GPL v2, with ABSOLUTELY NO WARRANTY", 41 ROM_VERSION_STRING,42 39 "", 43 40 NULL }; -
trunk/XTIDE_Universal_BIOS/Inc/RomVars.inc
r614 r624 142 142 .rgbSign resb 6 ; Signature for XTIDE Configurator Program (must be even length) 143 143 .szTitle resb 31 ; BIOS title string 144 .szVersion resb 25 ; BIOS version string144 .szVersion resb 19 ; BIOS version string (supports up to r9999) 145 145 146 146 .wFlags resb 2 ; Word for ROM flags … … 154 154 .bIdleTimeout resb 1 ; Standby timer value 155 155 156 alignb 2 ; WORD align the IDEVARS structures 156 157 .ideVarsBegin: 157 158 .ideVars0 resb IDEVARS_size -
trunk/XTIDE_Universal_BIOS/Inc/Version.inc
r614 r624 1 ; /*2 1 ; Project name : XTIDE Universal BIOS 3 2 ; Description : Version information. … … 20 19 21 20 ; Flash signature revisions: 21 ; XUB209 Shortened the BIOS version string (ROMVARS.szVersion) and WORD aligned the IDEVARS structures 22 22 ; XUB208 Added option to skip slave drive detection 23 23 ; XTIDE207 Added device type DEVICE_8BIT_XTIDE_REV2_OLIVETTI … … 27 27 ; 28 28 29 ;--------------------------------------------------------------------------------30 ;31 ; Assembler Version32 ;33 34 29 %ifndef VERSION_INC 35 30 %define VERSION_INC 36 31 37 32 38 %define TITLE_STRING_START "-=XTIDE Universal BIOS "33 %define TITLE_STRING_START "-=XTIDE Universal BIOS " 39 34 %ifdef USE_AT 40 35 %ifdef USE_386 41 %define TITLE_STRING_END "(386)=-",NULL36 %define TITLE_STRING_END "(386)=-" 42 37 %else 43 %define TITLE_STRING_END "(AT)=-",NULL38 %define TITLE_STRING_END "(AT)=-" 44 39 %endif 45 40 %elifdef USE_186 46 %define TITLE_STRING_END "(XT+)=-",NULL41 %define TITLE_STRING_END "(XT+)=-" 47 42 %else 48 %define TITLE_STRING_END "(XT)=-",NULL43 %define TITLE_STRING_END "(XT)=-" 49 44 %endif 50 45 51 %define TITLE_STRING TITLE_STRING_START, TITLE_STRING_END 52 %define ROM_VERSION_STRING "v2.0.0",BETA,"3+ (",__DATE__,")",NULL 53 %define FLASH_SIGNATURE "XUB208" ; Do not terminate with NULL 46 %define TITLE_STRING TITLE_STRING_START,TITLE_STRING_END,NULL 47 %define ROM_VERSION_STRING incbin "Revision.inc" ; This file must include a trailing space 48 ; Note! 49 ; NASM will throw weird errors when using ROM_VERSION_STRING if it's not a single statement on its own line. 50 ; This is likely due to the "unusual" way it is defined above. Make sure to not have any additional strings 51 ; on the same line, either before or after. In fact, do not even put a preceding label on the same line! 52 %define BUILD_DATE_STRING "(",__DATE__,")" 53 %define FLASH_SIGNATURE "XUB209" ; Do not terminate with NULL 54 54 55 55 56 56 %endif ; VERSION_INC 57 58 %if 0 ; equivalent of a NASM comment block59 ;*/60 61 //--------------------------------------------------------------------------------62 //63 // C/C++ Version64 //65 66 #define BETA " Beta "67 68 #define ROM_VERSION_STRING "v2.0.0" BETA "3 (" __DATE__ ")"69 70 /*71 %endif72 ;*/ -
trunk/XTIDE_Universal_BIOS/Src/Main.asm
r621 r624 71 71 at ROMVARS.rgbSign, db FLASH_SIGNATURE 72 72 at ROMVARS.szTitle, db TITLE_STRING 73 at ROMVARS.szVersion, db ROM_VERSION_STRING 73 at ROMVARS.szVersion, db "r" 74 db ROM_VERSION_STRING 75 db BUILD_DATE_STRING,NULL 74 76 75 77 ;---------------------------; -
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Strings.asm
r623 r624 25 25 26 26 ; Menu title 27 g_szProgramTitle: db "Configuration and Flashing program for XTIDE Universal BIOS v2.0.0.",LF,CR,NULL 27 g_szProgramTitle: db "Configuration and Flashing program for XTIDE Universal BIOS r" 28 db ROM_VERSION_STRING 29 db LF,CR,NULL 28 30 g_sXtideUniversalBiosSignature: db FLASH_SIGNATURE ; No need to terminate with NULL. 29 31 g_szBiosIsNotLoaded: db "BIOS is not loaded!",NULL … … 96 98 g_szNfoMainFlash: db "Flash loaded BIOS image to EEPROM.",NULL 97 99 g_szNfoMainSave: db "Save BIOS changes back to original file from which it was loaded.",NULL 98 g_szNfoMainLicense: db "XTIDE Universal BIOS and XTIDECFG Copyright (C) 2009-2010 by Tomi Tilli, 2011-202 1by XTIDE Universal BIOS Team."100 g_szNfoMainLicense: db "XTIDE Universal BIOS and XTIDECFG Copyright (C) 2009-2010 by Tomi Tilli, 2011-2022 by XTIDE Universal BIOS Team." 99 101 db " Released under GNU GPL v2, with ABSOLUTELY NO WARRANTY. Press ENTER for more details...",NULL 100 102 g_szNfoMainHomePage: db "Visit http://xtideuniversalbios.org (home page) and http://forum.vcfed.org (support)",NULL 101 103 102 104 g_szHelpMainLicense: db "XTIDE Universal BIOS and XTIDECFG Configuration program are Copyright 2009-2010 by Tomi Tilli," 103 db " 2011-202 1by XTIDE Universal BIOS Team. Released under GNU GPL v2. This software comes with ABSOLUTELY NO WARRANTY."105 db " 2011-2022 by XTIDE Universal BIOS Team. Released under GNU GPL v2. This software comes with ABSOLUTELY NO WARRANTY." 104 106 db " This is free software, and you are welcome to redistribute it under certain conditions." 105 107 db " See the LICENSE.TXT file that was included with this distribution,"
Note:
See TracChangeset
for help on using the changeset viewer.