Changeset 214


Ignore:
Timestamp:
Nov 9, 2017, 11:25:43 PM (8 years ago)
Author:
Ben Rietbroek
Message:

Preserve background color when displaying error-box [v1.1.3-testing]

CAUTION:
This is a testbuild !
AirBoot uses the BIOS to access disks and a small coding error can trash
partition tables or other vital disk structures. You are advised to make
backups of TRACK0 and EBRs before using this testbuild. More info at:
https://rousseaux.github.io/netlabs.air-boot/pdf/AirBoot-v1.1.2-manual.pdf

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bootcode/setup/main.asm

    r162 r214  
    10071007; If AX = ABABh -> Thingie will not wait...
    10081008SETUP_ShowErrorBox              Proc Near   Uses ax bx cx
    1009    push    ax
     1009      push     word ptr [TextColorFore]      ; Save current color
     1010      push    ax
    10101011      push    cx
    1011          call    VideoIO_Color
    1012          call    GetLenOfString          ; CX - Len of Error Message
    1013          add     cl, 4                   ; Adjust to include Space and Frame
    1014          push    cx
    1015             mov     bx, 0D28h
    1016             shr     cl, 1
    1017             sub     bl, cl
    1018          pop     cx
    1019          mov     dh, 0Fh
    1020          mov     dl, bl
    1021          add     dl, cl
    1022          dec     dl
    1023          call    VideoIO_MakeWindow
     1012      call    VideoIO_Color
     1013      call    GetLenOfString          ; CX - Len of Error Message
     1014      add     cl, 4                   ; Adjust to include Space and Frame
     1015      push    cx
     1016      mov     bx, 0D28h
     1017      shr     cl, 1
     1018      sub     bl, cl
     1019      pop     cx
     1020      mov     dh, 0Fh
     1021      mov     dl, bl
     1022      add     dl, cl
     1023      dec     dl
     1024      call    VideoIO_MakeWindow
    10241025      pop     cx
    10251026      mov     ch, 0Fh
     
    10301031      call    VideoIO_Locate
    10311032      call    VideoIO_Print
    1032    pop     ax
    1033    cmp     ax, 0ABABh
    1034    je      SSEB_NoWait
    1035    mov     ah, 0
    1036    int     16h     ; Waits for key stroke
    1037   SSEB_NoWait:
    1038    ret
     1033      pop     ax
     1034      cmp     ax, 0ABABh               ; Wait for key or not
     1035      je      SSEB_NoWait
     1036      mov     ah, 0
     1037      int     16h     ; Waits for key stroke
     1038   SSEB_NoWait:
     1039      pop      word ptr [TextColorFore]
     1040      ret                                 ; Restore previous color
    10391041SETUP_ShowErrorBox              EndP
    10401042
Note: See TracChangeset for help on using the changeset viewer.