Subversion Repositories Kolibri OS

Rev

Rev 3176 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2. ;;                                                              ;;
  3. ;; Copyright (C) KolibriOS team 2004-2011. All rights reserved. ;;
  4. ;; Copyright (C) MenuetOS 2000-2004 Ville Mikael Turjanmaa      ;;
  5. ;; Distributed under terms of the GNU General Public License    ;;
  6. ;;                                                              ;;
  7. ;;  BOOTCODE.INC                                                ;;
  8. ;;                                                              ;;
  9. ;;  Kolibri-A auxiliary 16-bit code,                            ;;
  10. ;;                        based on bootcode for KolibriOS       ;;
  11. ;;                                                              ;;
  12. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  13.  
  14. $Revision: 3194 $
  15.  
  16. boot_dev  db      0  ; 0=floppy, 1=hd
  17.  
  18.  
  19. ;=========================================================================
  20. ;
  21. ;                           16 BIT CODE
  22. ;
  23. ;=========================================================================
  24.  
  25. diff16 "start_of_code: ",0,$
  26.  
  27. start_of_code:
  28.         cld
  29.  
  30. ; set up stack
  31.         mov     ax, 3000h
  32.         mov     ss, ax
  33.         mov     sp, 0EC00h
  34. ; set up segment registers
  35.         push    cs
  36.         pop     ds
  37.         push    cs
  38.         pop     es
  39.  
  40.  
  41. cpugood:
  42.         xor     ax, ax
  43.         push    ax
  44.         popf
  45.         sti
  46.  
  47. ; set up esp
  48.         movzx   esp, sp
  49.  
  50.         push    ax
  51.         pop     es
  52.  
  53. cfgmanager:
  54.  
  55.  
  56. ; DMA ACCESS TO HD
  57.  
  58. ;        mov     al, 1
  59.  
  60. ; GRAPHICS ACCELERATION
  61. ; force yes
  62. ;        mov     [es:0x901C], al
  63.  
  64.  
  65. ; VRR_M USE
  66.  
  67. ;        mov     [es:0x9030], byte 2
  68.  
  69. ; BOOT DEVICE
  70.  
  71.         xor     ax, ax
  72.         mov     [boot_dev], al
  73. ;        mov     es, ax
  74.  
  75. ; SET GRAPHICS
  76.  
  77.         mov     ax, 0xA000              ; AtomBIOS Fn00
  78.         mov     cx, 0x550A              ; 1024x768, 32bpp, ARGB8888
  79. setgr:
  80.         int     0x10
  81.         test    ah, ah
  82.         jnz     $
  83.         mov     ax, 0xA006              ; AtomBIOS Fn06
  84.         int     0x10
  85.         mov     [es:0x9018], ebx        ; LFB
  86.  
  87. gmok2:
  88.         push    ds
  89.         pop     es
  90.