OpenCores
URL https://opencores.org/ocsvn/zet86/zet86/trunk

Subversion Repositories zet86

[/] [zet86/] [trunk/] [soc/] [bios/] [vgabios.c] - Diff between revs 34 and 37

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 34 Rev 37
Line 62... Line 62...
vgabios_entry_point:
vgabios_entry_point:
 
 
  jmp vgabios_init_func
  jmp vgabios_init_func
 
 
vgabios_name:
vgabios_name:
.ascii  "Plex86/Bochs VGABios"
.ascii  "Zet/Bochs VGABios"
.ascii  " "
.ascii  " "
.byte   0x00
.byte   0x00
 
 
// Info from Bart Oldeman
// Info from Bart Oldeman
.org 0x1e
.org 0x1e
Line 100... Line 100...
vgabios_website:
vgabios_website:
.ascii  "Please visit :"
.ascii  "Please visit :"
.byte   0x0a,0x0d
.byte   0x0a,0x0d
;;.ascii  " . http://www.plex86.org"
;;.ascii  " . http://www.plex86.org"
;;.byte 0x0a,0x0d
;;.byte 0x0a,0x0d
 
.ascii  " . http://zet.aluzina.org"
 
.byte   0x0a,0x0d
.ascii  " . http://bochs.sourceforge.net"
.ascii  " . http://bochs.sourceforge.net"
.byte   0x0a,0x0d
.byte   0x0a,0x0d
.ascii  " . http://www.nongnu.org/vgabios"
.ascii  " . http://www.nongnu.org/vgabios"
.byte   0x0a,0x0d
.byte   0x0a,0x0d
.byte   0x0a,0x0d
.byte   0x0a,0x0d
Line 123... Line 125...
;; set int10 vect
;; set int10 vect
  SET_INT_VECTOR(0x10, #0xC000, #vgabios_int10_handler)
  SET_INT_VECTOR(0x10, #0xC000, #vgabios_int10_handler)
 
 
;; display splash screen
;; display splash screen
  call _display_splash_screen
  call _display_splash_screen
hlt
 
;; init video mode and clear the screen
;; init video mode and clear the screen
  mov ax,#0x0003
  mov ax,#0x0003
  int #0x10
  int #0x10
 
 
;; show info
;; show info
Line 161... Line 163...
  push di
  push di
 
 
;; We have to set ds to access the right data segment
;; We have to set ds to access the right data segment
  mov   bx, #0xc000
  mov   bx, #0xc000
  mov   ds, bx
  mov   ds, bx
 
 
  call _int10_func
  call _int10_func
 
 
  ; popa ; we do this instead:
  ; popa ; we do this instead:
  pop di
  pop di
  pop si
  pop si
Line 260... Line 263...
/*
/*
 *  Boot time Splash screen
 *  Boot time Splash screen
 */
 */
static void display_splash_screen()
static void display_splash_screen()
{
{
/*
 
ASM_START
 
push dx
 
push ds
 
mov dx, #0xb800
 
mov ds, dx
 
mov [6], #0x0361
 
pop ds
 
pop dx
 
ASM_END
 
 */
 
 
 
  write_byte (0xb800, 0x2, 'o');
 
  write_byte (0xb800, 0x0, 'H');
  write_byte (0xb800, 0x0, 'H');
  write_byte (0xb800, 0x4, 'l');
//  write_byte (0xb800, 0x2, 'o');
  write_byte (0xb800, 0x6, 'a');
 
  write_byte (0xb800, 0x8, ' ');
 
  write_byte (0xb800, 0xa, 't');
 
  write_byte (0xb800, 0xc, 'i');
 
  write_byte (0xb800, 0xe, 'o');
 
  write_byte (0xb800, 0x10, '!');
 
  write_byte (0xb800, 0x12, '!');
 
}
}
 
 
// --------------------------------------------------------------------------------------------
// --------------------------------------------------------------------------------------------
/*
/*
 *  Tell who we are
 *  Tell who we are
Line 347... Line 330...
 * int10 main dispatcher
 * int10 main dispatcher
 */
 */
static void int10_func(DI, SI, BP, SP, BX, DX, CX, AX, DS, ES, FLAGS)
static void int10_func(DI, SI, BP, SP, BX, DX, CX, AX, DS, ES, FLAGS)
  Bit16u DI, SI, BP, SP, BX, DX, CX, AX, ES, DS, FLAGS;
  Bit16u DI, SI, BP, SP, BX, DX, CX, AX, ES, DS, FLAGS;
{
{
 
 
 // BIOS functions
 // BIOS functions
 switch(GET_AH())
 switch(GET_AH())
  {
  {
   case 0x00:
   case 0x00:
     biosfn_set_video_mode(GET_AL());
     biosfn_set_video_mode(GET_AL());
Line 370... Line 352...
        break;
        break;
      default:
      default:
        SET_AL(0x20);
        SET_AL(0x20);
      }
      }
     break;
     break;
 
   case 0x02:
 
     biosfn_set_cursor_pos(GET_BH(),DX);
 
     break;
   case 0x03:
   case 0x03:
     biosfn_get_cursor_pos(GET_BH(),&CX,&DX);
     biosfn_get_cursor_pos(GET_BH(),&CX,&DX);
     break;
     break;
   case 0x0E:
   case 0x0E:
     // Ralf Brown Interrupt list is WRONG on bh(page)
     // Ralf Brown Interrupt list is WRONG on bh(page)

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.