Changeset 184 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src


Ignore:
Timestamp:
Nov 15, 2011, 5:21:19 AM (12 years ago)
Author:
gregli@…
google:author:
gregli@hotmail.com
Message:

Space optimization, added a new format character 'I' which is the same as 'u' but shows a dash if the operand is zero. Replaces the PushIRQ functionality in bootmenuprintcfg.asm. This only saves a few bytes now, but saves significantly more with the string compression code.

Location:
trunk/XTIDE_Universal_BIOS/Src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuPrintCfg.asm

    r182 r184  
    143143;--------------------------------------------------------------------
    144144PushIRQ:
    145     mov     dl, ' '                     ; Load space to DL
    146     mov     al, [cs:si+IDEVARS.bIRQ]
    147     test    al, al                      ; Interrupts disabled?
    148     jz      SHORT .PushIrqDisabled
    149     add     al, '0'                     ; Digit to ASCII
    150     cmp     al, '9'                     ; Only one digit needed?
    151     jbe     SHORT .PushCharacters
    152 
    153     ; Two digits needed
    154     sub     al, 10                      ; Limit to single digit ASCII
    155     mov     dl, '1'                     ; Load '1 to DX
    156     jmp     SHORT .PushCharacters
    157 ALIGN JUMP_ALIGN
    158 .PushIrqDisabled:
    159     mov     al, '-'                     ; Load line to AL
    160     xchg    ax, dx                      ; Space to AL, line to DL
    161 ALIGN JUMP_ALIGN
    162 .PushCharacters:
    163     push    dx
     145    eMOVZX  ax, BYTE [cs:si+IDEVARS.bIRQ]
    164146    push    ax
    165147
  • trunk/XTIDE_Universal_BIOS/Src/Strings.asm

    r182 r184  
    3636g_szSizeDual:   db  "%s%4-u.%u %ciB / %4-u.%u %ciB",LF,CR,NULL
    3737g_szCfgHeader:  db  "Addr.",SINGLE_VERTICAL,"Block",SINGLE_VERTICAL,"Bus",  SINGLE_VERTICAL,"IRQ",  SINGLE_VERTICAL,"Reset",LF,CR,NULL
    38 g_szCfgFormat:  db  "%s"   ,SINGLE_VERTICAL,"%5-u", SINGLE_VERTICAL,"%s",SINGLE_VERTICAL," %c%c",SINGLE_VERTICAL,"%5-x",  NULL
     38g_szCfgFormat:  db  "%s"   ,SINGLE_VERTICAL,"%5-u", SINGLE_VERTICAL,"%s",SINGLE_VERTICAL," %2-I",SINGLE_VERTICAL,"%5-x",  NULL
    3939       
    4040g_szAddressingModes:                   
     
    6464g_szSelectionTimeout:   db      DOUBLE_BOTTOM_LEFT_CORNER,DOUBLE_LEFT_HORIZONTAL_TO_SINGLE_VERTICAL,"%ASelection in %2u s",NULL
    6565
     66g_szDashForZero:        db      "- ",NULL
Note: See TracChangeset for help on using the changeset viewer.