Changeset 9 in xtideuniversalbios


Ignore:
Timestamp:
May 25, 2010, 5:01:46 PM (14 years ago)
Author:
aitotat
google:author:
aitotat
Message:

Now assembles with Yasm

Location:
trunk/Configurator
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Configurator/Src/Libraries/menu/menudraw.asm

    r2 r9  
    22; Project name  :   Menu library
    33; Created date  :   9.11.2009
    4 ; Last update   :   21.1.2010
     4; Last update   :   25.5.2010
    55; Author        :   Tomi Tilli
    66; Description   :   ASM library to menu system.
     
    288288    xor     dx, dx                          ; Zero DX
    289289    call    MenuCrsr_PointNfoBrdr           ; Set cursor
    290     cmp     BYTE [bp+MENUVARS.bInfoH], 0    ; Any info strings?
    291     jz      MenuDraw_BottomBorder           ;  If not, draw bottom border
    292     test    BYTE [bp+MENUVARS.bFlags], FLG_MNU_HIDENFO
    293     jnz     MenuDraw_BottomBorder           ; Draw bottom border if info is hidden
     290    eMOVZX  cx, BYTE [bp+MENUVARS.bInfoH]   ; Load number of info strings
     291    test    BYTE [bp+MENUVARS.bFlags], FLG_MNU_HIDENFO  ; Information hidden?
     292    jnz     SHORT .JumpToBottomBorder
     293    test    cx, cx                          ; Any info strings?
     294    jz      SHORT MenuDraw_BottomBorder
     295    push    cx
    294296    call    MenuDraw_MiddleBorder           ; Draw middle border
    295297    call    MenuDraw_NewlineBrdr            ; Change line
    296     eMOVZX  cx, BYTE [bp+MENUVARS.bInfoH]   ; Load number of info strings
     298    pop     cx
    297299ALIGN JUMP_ALIGN
    298300.LineLoop:
     
    302304    pop     cx
    303305    loop    .LineLoop
    304     jmp     MenuDraw_BottomBorder
    305    
     306ALIGN JUMP_ALIGN
     307.JumpToBottomBorder:
     308    jmp     SHORT MenuDraw_BottomBorder
     309
    306310ALIGN JUMP_ALIGN
    307311MenuDraw_Timeout:
     
    309313    call    MenuCrsr_PointNfoBrdr           ; Set cursor
    310314    mov     ch, [bp+MENUVARS.bInfoH]        ; Load info str count to CH
    311     test    ch, ch                          ; Any info strings?
    312     jz      MenuDraw_BottomBorder           ;  If not, draw bottom border
     315    and     cx, 0FF00h                      ; Any info strings? (clears CL)
     316    jz      SHORT MenuDraw_BottomBorder     ;  If not, draw bottom border
    313317    inc     ch                              ; Increment for info top border
    314     xor     cl, cl                          ; Zero X coordinate
    315318    call    MenuCrsr_Move                   ; Move cursor
    316     jmp     MenuDraw_BottomBorder
     319    jmp     SHORT MenuDraw_BottomBorder
    317320
    318321ALIGN JUMP_ALIGN
    319322MenuDraw_ItemBorders:
    320     cmp     WORD [bp+MENUVARS.wItemCnt], 0  ; Any items?
    321     jz      .Return                         ;  If not, return
     323    cmp     WORD [bp+MENUVARS.wItemCnt], BYTE 0 ; Any items?
     324    jz      SHORT .Return                   ;  If not, return
    322325    xor     dx, dx                          ; Zero DX
    323326    call    MenuCrsr_PointItemBrdr          ; Set cursor
     
    354357    mov     bl, B_H
    355358    mov     dh, B_TR
    356     jmp     MenuDraw_BorderChars
     359    jmp     SHORT MenuDraw_BorderChars
    357360   
    358361ALIGN JUMP_ALIGN
     
    361364    mov     bl, ' '
    362365    mov     dh, B_V
    363     jmp     MenuDraw_BorderChars
     366    jmp     SHORT MenuDraw_BorderChars
    364367
    365368ALIGN JUMP_ALIGN
     
    368371    mov     bh, B_V
    369372    mov     bl, ' '
    370     jmp     MenuDraw_BorderChars
     373    jmp     SHORT MenuDraw_BorderChars
    371374
    372375ALIGN JUMP_ALIGN
  • trunk/Configurator/Src/Libraries/menu/menuloop.asm

    r2 r9  
    22; Project name  :   Menu library
    33; Created date  :   11.11.2009
    4 ; Last update   :   10.12.2009
     4; Last update   :   25.5.2010
    55; Author        :   Tomi Tilli
    66; Description   :   ASM library to menu system.
     
    9292; MenuLoop_SendEvent        Sends any event to user event handler
    9393;   Parameters:
    94 ;       BX:     Event code
     94;       BX:     Event code (MenuLoop_SendEvent only)
    9595;       DX:     Event parameter (event specific)
    9696;       SS:BP:  Ptr to MENUVARS
     
    193193    mov     [bp+MENUVARS.wItemSel], ax      ; Store new index
    194194    cmp     ax, [bp+MENUVARS.wItemTop]      ; Need to scroll?
    195     jae     .DrawSelection                  ;  If not, go to draw selection
     195    jb      SHORT .ScrollUp
     196    jmp     .DrawSelection                  ;  If not, go to draw selection
     197ALIGN JUMP_ALIGN
     198.ScrollUp:
    196199    dec     WORD [bp+MENUVARS.wItemTop]     ; Scroll
    197200    jmp     .ScrollMenu
     
    222225    add     bx, [bp+MENUVARS.wItemTop]      ; BX to one past last visible index
    223226    cmp     ax, bx                          ; Need to scroll?
    224     jb      .DrawSelection                  ;  If not, go to draw selection
     227    jae     .ScrollDown
     228    jmp     .DrawSelection
     229ALIGN JUMP_ALIGN
     230.ScrollDown:
    225231    inc     WORD [bp+MENUVARS.wItemTop]     ; Scroll
    226232    jmp     .ScrollMenu
     
    236242    jmp     .ScrollMenu
    237243%endif
     244
     245    ; HOME pressed
     246ALIGN JUMP_ALIGN
     247.KeyHome:
     248    xor     ax, ax
     249    mov     [bp+MENUVARS.wItemSel], ax
     250    mov     [bp+MENUVARS.wItemTop], ax
     251    jmp     .ScrollMenu
     252
     253    ; END pressed
     254ALIGN JUMP_ALIGN
     255.KeyEnd:
     256    mov     ax, [bp+MENUVARS.wItemCnt]      ; Load number if menuitems
     257    mov     bx, ax                          ; Copy menuitem count to BX
     258    dec     ax                              ; Decrement for last index
     259    mov     [bp+MENUVARS.wItemSel], ax      ; Store new selection
     260    sub     bl, [bp+MENUVARS.bVisCnt]       ; BX to first menuitem to draw
     261    sbb     bh, 0
     262    mov     [bp+MENUVARS.wItemTop], bx      ; Store first menuitem to draw
     263    jnc     .ScrollMenu
     264    mov     WORD [bp+MENUVARS.wItemTop], 0  ; Overflow, start with 0
     265    jmp     .ScrollMenu
    238266
    239267    ; PGUP pressed
     
    262290    mov     [bp+MENUVARS.wItemSel], ax
    263291    mov     [bp+MENUVARS.wItemTop], ax
    264     jmp     .ScrollMenu
    265 
    266     ; HOME pressed
    267 ALIGN JUMP_ALIGN
    268 .KeyHome:
    269     xor     ax, ax
    270     mov     [bp+MENUVARS.wItemSel], ax
    271     mov     [bp+MENUVARS.wItemTop], ax
    272     jmp     .ScrollMenu
    273 
    274     ; END pressed
    275 ALIGN JUMP_ALIGN
    276 .KeyEnd:
    277     mov     ax, [bp+MENUVARS.wItemCnt]      ; Load number if menuitems
    278     mov     bx, ax                          ; Copy menuitem count to BX
    279     dec     ax                              ; Decrement for last index
    280     mov     [bp+MENUVARS.wItemSel], ax      ; Store new selection
    281     sub     bl, [bp+MENUVARS.bVisCnt]       ; BX to first menuitem to draw
    282     sbb     bh, 0
    283     mov     [bp+MENUVARS.wItemTop], bx      ; Store first menuitem to draw
    284     jnc     .ScrollMenu
    285     mov     WORD [bp+MENUVARS.wItemTop], 0  ; Overflow, start with 0
    286292    ; Fall to .ScrollMenu
    287293
  • trunk/Configurator/makefile

    r2 r9  
    7171
    7272# Assembler
    73 AS = nasm.exe
     73#AS = nasm.exe
     74AS = yasm.exe
    7475
    7576# use this command to erase files.
Note: See TracChangeset for help on using the changeset viewer.