Ignore:
Timestamp:
May 6, 2011, 4:25:19 AM (14 years ago)
Author:
Ben Rietbroek
Message:

AiR-BOOT v1.07 -- As released with eCS v2.1. [2011-05-06]
Signature-date: 2006-03-13. (incorrect)
Trunk contains buildable v1.07 version as distributed with eCS v2.1.
Directory 'tags' contains v1.06 & v1.07 reference versions
built for all languages. Note that language ID for 'Dutch' changed
from 'DT' to 'NL' in v1.07 and that the v1.06 reference version also
uses 'NL' for 'Dutch'.
Also note that helper programs like the installer and setaboot are
are only modified for the OS/2 versions in v1.07.
The signature-date for v1.07 incorrectly states the same
date as for v1.06. The signature-version is correct.
Removed other binaries. (cd-rom images, old releases, etc.)
The tags serve as reference versions:

  • v1.06: rebuilt from source. (tags/v1.06r)
  • v1.07: built as released with eCS v2.1. (tags/v1.07r)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BOOTCODE/REGULAR/VIDEOIO.ASM

    r29 r30  
    1919;                                                      AiR-BOOT / VIDEO I/O
    2020;---------------------------------------------------------------------------
     21
     22IFDEF ModuleNames
     23DB 'VIDEOIO',0
     24ENDIF
    2125
    2226VideoIO_WaitRetrace             Proc Near   Uses ax dx
     
    3236   ret
    3337VideoIO_WaitRetrace             EndP
     38
     39
    3440
    3541; Holds the current position. Yeah, I know this is in the code area, but who
     
    100106   mov     ax, VideoIO_Segment
    101107   mov     es, ax
    102    movzx   ax, TextPosY
     108   ;movzx   ax, TextPosY
     109   mov   al,TextPosY
     110   mov   ah,0
     111
    103112   mov     bl, 160
    104113   mul     bl
     
    169178VideoIO_FixedPrint              EndP
    170179
     180; Rousseau:
     181; Turn off blinking
     182; http://www.ctyme.com/intr/rb-0088.htm does not mention this
     183VideoIO_NoBlinking              Proc Near   Uses ax bx
     184      mov      bx,0
     185      mov      ax,1003h
     186      int      10h
     187   ret
     188VideoIO_NoBlinking              EndP
     189
    171190;        In: AL - Single Char to Print
    172191; Destroyed: None
     
    179198   ret
    180199VideoIO_PrintSingleChar         EndP
     200
     201
     202
     203; Print hex-byte to screen
     204; This outputs two characters
     205; In:          AL - byte to send
     206; Out:         AL - byte sent
     207; Destroyed:   None
     208VideoIO_PrintHexByte    Proc     Near  Uses  ax
     209      call     CONV_BinToAsc              ; Returns high hex-nibble in AH, low hex-nibble in AL
     210      xchg     al,ah                      ; High hex-nibble first
     211      call     VideoIO_PrintSingleChar    ; Output to screen
     212      xchg     al,ah                      ; Low hex-nibble next
     213      call     VideoIO_PrintSingleChar    ; Output to screen
     214      ret
     215VideoIO_PrintHexByte    EndP
     216
     217
     218; Print hex-word to screen
     219; This outputs four characters
     220; In:          AX - word to send
     221; Out:         AX - word sent
     222; Destroyed:   None
     223VideoIO_PrintHexWord    Proc     Near
     224      xchg     al,ah                      ; High byte first
     225      call     VideoIO_PrintHexByte       ; Output to screen
     226      xchg     al,ah                      ; low byte next
     227      call     VideoIO_PrintHexByte       ; Output to screen
     228      ret
     229VideoIO_PrintHexWord    EndP
     230
     231
     232; Print hex-dword to screen
     233; This outputs eight characters
     234; In:          DX:AX - dword to send
     235; Out:         DX:AX - dword sent
     236; Destroyed:   None
     237VideoIO_PrintHexDWord   Proc     Near
     238      xchg     ax,dx
     239      call     VideoIO_PrintHexWord       ; High word first
     240      xchg     ax,dx
     241      call     VideoIO_PrintHexWord       ; Low word next
     242      ret
     243VideoIO_PrintHexDWord   EndP
     244
     245
     246; Print hex-qword to screen
     247; This outputs sixteen characters
     248; In:          BX:CX:DX:AX - qword to send
     249; Out:         BX:CX:DX:AX - qword sent
     250; Destroyed:   None
     251VideoIO_PrintHexQWord   Proc     Near
     252      xchg     dx,bx
     253      xchg     ax,cx
     254      call     VideoIO_PrintHexDWord      ; High dword first
     255      xchg     dx,bx
     256      xchg     ax,cx
     257      call     VideoIO_PrintHexDWord      ; Low dword next
     258      ret
     259VideoIO_PrintHexQWord   EndP
     260
     261
     262
     263
    181264
    182265;        In: AL - Single Char to Print
     
    205288   cmp     al, 99
    206289   ja      VIOPBN_DoNotWriteAnything
    207    movzx   bx, al
     290   ;movzx   bx, al
     291   mov   bl,al
     292   mov   bh,0
     293
    208294   call    VideoIO_Internal_SetRegs
    209295   cmp     bl, 10
    210296   jb      VIOPBN_Lower10
    211297   push    ax
    212       movzx   ax, bl
     298      ;movzx   ax, bl
     299      mov   al,bl
     300      mov   ah,0
     301
    213302      mov     dl, 10
    214303      div     dl
     
    231320;        In: AL - Single Byte to Print
    232321; Destroyed: None
    233 VideoIO_PrintByteDynamicNumber  Proc Near   Uses ax bx dx es di
     322VideoIO_PrintByteDynamicNumber  Proc Near   Uses ax bx cx dx es di               ; Rousseau: cx was missing from push-list
    234323   xor     cl, cl
    235324   mov     bh, al
     
    240329   cmp     ah, 100
    241330   jb      VIOPBDN_Lower100
    242    movzx   ax, ah
     331   ;movzx   ax, ah
     332   mov   al,ah
     333   mov   ah,0
     334
    243335   mov     dl, 100
    244336   div     dl
     
    249341   add     di, 2
    250342 VIOPBDN_Lower100:
    251    movzx   ax, ah
     343   ;movzx   ax, ah
     344   mov   al,ah
     345   mov   ah,0
     346
    252347   mov     dl, 10
    253348   div     dl
     
    270365; Destroyed: None Important
    271366VideoIO_Internal_MakeWinDown    Proc Near   Uses dx di
    272    movzx   dx, cl
     367   ;movzx   dx, cl
     368   mov   dl,cl
     369   mov   dh,0
     370
    273371   mov     bl, al
    274372   call    VideoIO_Internal_SetRegs
     
    281379   dec     dx
    282380   jnz     VIOIMWD_Loop
    283    ret     
     381   ret
    284382VideoIO_Internal_MakeWinDown    EndP
    285383
     
    287385; Destroyed: None Important
    288386VideoIO_Internal_MakeWinRight   Proc Near   Uses dx di
    289    movzx  dx, cl
     387   ;movzx  dx, cl
     388   mov   dl,cl
     389   mov   dh,0
     390
    290391   mov    bl, al
    291392   call   VideoIO_Internal_SetRegs
     
    298399      dec    dx
    299400   jnz    VIOIMWR_Loop
    300    ret     
     401   ret
    301402VideoIO_Internal_MakeWinRight   EndP
    302403
     
    366467   sub     bl, WinBeginPosX
    367468   dec     bl
    368  
     469
    369470  VIOIMW_Loop:
    370471      mov     ch, WinBeginPosY
     
    439540      call    VideoIO_CursorSet
    440541      call    VideoIO_CursorOn           ; Set and turn cursor on
    441      
     542
    442543      ; ES:DI - Screen-Position to Start of String
    443544      ; DL    - Position in String (relative to begin, base=0)
     
    460561         cmp     dl, StringLen           ; String "full" ?
    461562         jae     VIOLUES_Loop
    462          movzx   bx, dl
     563         ;movzx   bx, dl
     564         mov   bl,dl
     565         mov   bh,0
     566
    463567         shl     bx, 1
    464568         mov     es:[di+bx], al
     
    476580         mov     al, ' '
    477581         dec     dl
    478          movzx   bx, dl
     582         ;movzx   bx, dl
     583         mov   bl,dl
     584         mov   bh,0
     585
    479586         shl     bx, 1
    480587         mov     es:[di+bx], al
     
    502609   ret
    503610VideoIO_LetUserEditString       EndP
     611
     612
     613
     614;
     615; Rousseau Additions.
     616;
     617
     618
     619; Function Template
     620;ProcName                        Proc Near   Uses ax bx cx dx si es di
     621;ProcName                        EndP
     622
     623
     624;
     625; Clear the current page
     626;
     627VideoIO_ClearScreen             Proc Near   Uses ax bx cx dx si es di
     628   mov   al, 0       ; clear entire window
     629   mov   bh,07h      ; Attribute for new lines
     630   xor   cx,cx       ; Row, Column ULC
     631   xor   dx,dx
     632   dec   dx          ; Row, Column LRC (does this corrupt other pages ?)
     633   mov   ah, 06h     ; Function Code
     634   int   10h         ; Do It !
     635   ret
     636VideoIO_ClearScreen             EndP
     637
     638;
     639; Rousseau: added
     640; Set poosition to teletype cursor
     641;
     642VideoIO_SyncPos                 Proc Near   Uses ax bx cx dx
     643   pushf
     644   mov   bh, 0
     645   mov   ah, 03h
     646   int   10h
     647   mov   [TextPosX], dl
     648   mov   [TextPosY], dh
     649   popf
     650   ret
     651VideoIO_SyncPos                 EndP
     652
     653
     654
     655VideoIO_DBG_WriteString         Proc Near   Uses ax bx cx dx si es di
     656   mov   ch, [CFG_Partitions]                                                    ; y
     657   add   ch, 7
     658   add   ch, [CFG_IncludeFloppy]
     659   push cx
     660   mov   cl, 1                                                                   ; x
     661   call  VideoIO_Locate
     662   mov   ch, 15                                                                  ; fgc
     663   mov   cl, 0                                                                   ; bgc
     664   call  VideoIO_Color
     665   mov   si, offset ShowBootLog
     666   call  VideoIO_Print
     667   pop cx
     668   inc   ch
     669
     670   ;mov   ch, 21                                                                 ; y
     671   mov   cl, 1                                                                   ; x
     672   call  VideoIO_Locate
     673   mov   ch, 15                                                                  ; fgc
     674   mov   cl, 0                                                                   ; bgc
     675   call  VideoIO_Color
     676
     677
     678   ; Rousseau:
     679   mov al, [NewPartitions]
     680   ;call  VideoIO_PrintByteDynamicNumber
     681   mov al, [CFG_Partitions]
     682   ;call  VideoIO_PrintByteDynamicNumber
     683   ret
     684VideoIO_DBG_WriteString         EndP
     685
     686
     687; Dump the disk-info.
     688; Disk number is in DL.
     689VideoIO_DumpDiskInfo    Proc Near
     690
     691   VideoIO_DumpDiskInfo_next_disk:
     692      push     dx
     693      xor      ax,ax
     694      mov      al,[TextPosY]
     695      push     ax
     696
     697      mov      ax,21
     698      mov      dh,dl
     699      and      dh,01111111b
     700      mul      dh
     701      mov      dh,al
     702
     703      mov      [TextPosX],dh
     704
     705      mov   si, offset Disk
     706      call  VideoIO_Print
     707      mov   al,dl
     708
     709      ; NIET GOED, GAAT FOUT > 9, HEX PRINT GEBRUIKEN !!
     710      shr      al,4
     711      add      al,'0'
     712      call     VideoIO_PrintSingleChar
     713      mov      al,dl
     714      and      al,01111111b
     715      add      al,'0'
     716      call     VideoIO_PrintSingleChar
     717      mov      al,'h'
     718      call     VideoIO_PrintSingleChar
     719
     720      inc      [TextPosY]
     721      mov      [TextPosX],dh
     722
     723      mov      al,'-'
     724      mov      cl,17
     725      call     VideoIO_PrintSingleMultiChar
     726
     727      inc      [TextPosY]
     728      mov      [TextPosX],dh
     729      mov      si, offset BiosCyls
     730      call     VideoIO_Print
     731
     732      push     dx
     733      mov      bx,offset BIOS_Cyls
     734      xor      dh,dh
     735      and      dl,01111111b
     736      shl      dx,1
     737      shl      dx,1
     738      add      bx,dx
     739      mov      ax,[bx]
     740      mov      dx,[bx+02]
     741      call     VideoIO_PrintHexDWord
     742      pop      dx
     743
     744      inc      [TextPosY]
     745      mov      [TextPosX],dh
     746      mov      si, offset BiosHeads
     747      call     VideoIO_Print
     748
     749      push     dx
     750      mov      bx,offset BIOS_Heads
     751      xor      dh,dh
     752      and      dl,01111111b
     753      shl      dx,1
     754      shl      dx,1
     755      add      bx,dx
     756      mov      ax,[bx]
     757      mov      dx,[bx+02]
     758      call     VideoIO_PrintHexDWord
     759      pop      dx
     760
     761      inc      [TextPosY]
     762      mov      [TextPosX],dh
     763      mov      si, offset BiosSecs
     764      call     VideoIO_Print
     765
     766      push     dx
     767      mov      bx,offset BIOS_Secs
     768      xor      dh,dh
     769      and      dl,01111111b
     770      shl      dx,1
     771      shl      dx,1
     772      add      bx,dx
     773      mov      ax,[bx]
     774      mov      dx,[bx+02]
     775      call     VideoIO_PrintHexDWord
     776      pop      dx
     777
     778      inc      [TextPosY]
     779      mov      [TextPosX],dh
     780      mov      si, offset LvmSecs
     781      call     VideoIO_Print
     782
     783      push     dx
     784      mov      bx,offset TrueSecs
     785      xor      dh,dh
     786      and      dl,01111111b
     787      shl      dx,1
     788      shl      dx,1
     789      add      bx,dx
     790      mov      ax,[bx]
     791      mov      dx,[bx+02]
     792      call     VideoIO_PrintHexDWord
     793      pop      dx
     794
     795      inc      [TextPosY]
     796      mov      [TextPosX],dh
     797      mov      si, offset BiosLBA
     798      call     VideoIO_Print
     799
     800      push     dx
     801      mov      bx,offset BIOS_TotalSecs
     802      xor      dh,dh
     803      and      dl,01111111b
     804      shl      dx,1
     805      shl      dx,1
     806      shl      dx,1
     807      add      bx,dx
     808      mov      ax,[bx]
     809      mov      dx,[bx+02]
     810      call     VideoIO_PrintHexDWord
     811      pop      dx
     812
     813      inc      [TextPosY]
     814      mov      [TextPosX],dh
     815
     816      pop      ax
     817      mov      [TextPosY],al
     818      pop      dx
     819
     820      inc      dl
     821      mov      al,dl
     822      and      al,01111111b
     823      cmp      al,[TotalHarddiscs]
     824      jae      VideoIO_DumpDiskInfo_end
     825      jmp      VideoIO_DumpDiskInfo_next_disk
     826
     827   VideoIO_DumpDiskInfo_end:
     828      mov      [TextPosX],0
     829      add      [TextPosY],6
     830      ret
     831VideoIO_DumpDiskInfo    EndP
     832
     833
     834
     835; Disk Info to Dump to AB LogScreen
     836Disk:             db "DISK ",0
     837BiosCyls:         db "Cyls    :",0
     838BiosHeads:        db "Heads   :",0
     839BiosSecs:         db "Secs    :",0
     840LvmSecs:          db "SecsLVM :",0
     841BiosLBA:          db "LBA Secs:",0
     842
     843
     844HugeBootDisk:     db "Boot Disk is Huge    : ",0
     845DisksFound:       db "Disks Found          : ",0
     846PartitionsFound:  db "Partitions Found     : ",0
     847;AutoStartPart:    db "Auto Start Partition : ",0
     848
     849Phase1:           db "eCS Install Phase 1  : ",0
     850
     851
     852ShowMenu:         db "Press TAB to return to the AiR-BOOT Menu",0
     853ShowBootLog:      db "Press TAB to see the Boot Log...",0
     854
     855Yes:              db "YES",0
     856No:               db "NO",0
     857On:               db "ON",0
     858Off:              db "OFF",0
     859None:             db "NONE",0
     860Active:           db "ACTIVE",0
     861NotActive:        db "NOT ACTIVE",0
     862
     863; New Line for use by MBR_Teletype
     864NL:         db 0dh, 0ah, 0
Note: See TracChangeset for help on using the changeset viewer.