Subversion Repositories Kolibri OS

Rev

Rev 3169 | Rev 3194 | 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: 3176 $
  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.         mov     [es:0x9031], ax
  53.  
  54. ; --------------- APM - removed--------------------
  55.         and     word [es:0x9044], 0     ; ver = 0.0 (APM not found)
  56.  
  57. cfgmanager:
  58.  
  59.  
  60. ; DMA ACCESS TO HD
  61.  
  62.         mov     al, 1
  63.         mov     [es:0x901F], al
  64.  
  65. ; GRAPHICS ACCELERATION
  66. ; force yes
  67.         mov     [es:0x901C], al
  68.  
  69.  
  70. ; VRR_M USE
  71.  
  72.         mov     [es:0x9030], byte 2
  73.         mov     [es:0x901E], al
  74.  
  75. ; BOOT DEVICE
  76.  
  77.         xor     ax, ax
  78.         mov     [boot_dev], al
  79.         mov     es, ax
  80.  
  81.  
  82. ; SET GRAPHICS
  83.  
  84.         mov     ax, 0xA000              ; AtomBIOS Fn00
  85.         mov     cx, 0x550A              ; 1024x768, 32bpp, ARGB8888
  86. setgr:
  87.         int     0x10
  88.         test    ah, ah
  89.         jnz     $
  90.         mov     ax, 0xA006              ; AtomBIOS Fn06
  91.         int     0x10
  92.         mov     [es:0x9018], ebx        ; LFB
  93.  
  94. gmok2:
  95.         push    ds
  96.         pop     es
  97.