I try to switch to 8-bit screen mode, but without any success. I am using int functiions 0x4f00;0x4f01;0x4f02;0x4f08;0x4f09; / 0x10. In other hands, 32 bit modes work OK.
Some more info, about my experiments. Worked modes are for example 0x112 and 0x115, and it's type is "Direct" (No 6). Non working are "Packed" (No 4).
Can you give me some more information, and some working (source) code, which I can start from (boot) floppy. I found this
http://alumni.imsa.edu/~stendahl/comp/txt/vesasvga.txt
but it does not working.
8 bit graphics mode - how?
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
have you tried anything in the lines of
(untested)
Code: Select all
org 0x7c00
; go to 8-bit video mode
mov ax, 0x0013
int 0x10
; fill the screen with some random color
mov ax, 0xb800
mov es, ax
xor di, di
mov al, 0x07
mov cx, 0xffff
rep stosb
; wait for keypress
xor ax, ax
int 0x16
; change to text mode
mov ax, 0x0003
int 0x10
; reboot (sortof)
int 0x19
Try this:
I have also done some vesa tuts that may help (all with fasm code).
This demos set up vesa and goes to pmode and switch modes in pmode.
http://www.dex4u.com/tuts/DemoVesa.zip
This is the same, but demos displaying a high-res bmp image using vesa from pmode.
http://www.dex4u.com/tuts/BmpView.zip
Also see my CdPod as the code in that may help.
A mini pmode OS with vesa support, thats less than 512bytes
http://board.flatassembler.net/topic.ph ... 4&start=60
Code: Select all
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;; fasm example.By Craig Bamford (Dex) 2002. ;;
;; 640*480 8bpp (256 colors) vesa1 ;;
;; C:\fasm vesa1.asm vesa1.com ;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
ORG 100h
Start:
mov ax,4f02h
mov bx,101h
int 10h
mov dx,0xa000
mov es,dx
call window
StartAgain:
xor dx,dx
mov [color],0
MainLoop:
push dx
call window
xor bx,bx
inc [color]
mov al,[color]
call static
pop dx
cmp dx,4
je StartAgain
inc dx ;<** here is box number
mov ah,01h
int 16h
jz MainLoop
mov ah,00h
int 16h
mov ax,0003h
int 10h
ret
window:
mov ax,4f05h
mov bx,0
int 10h
xor bx,bx
ret
static:
stosb
inc bx
cmp bx,0x00000
jne static
ret
color db 0
Row db 0
This demos set up vesa and goes to pmode and switch modes in pmode.
http://www.dex4u.com/tuts/DemoVesa.zip
This is the same, but demos displaying a high-res bmp image using vesa from pmode.
http://www.dex4u.com/tuts/BmpView.zip
Also see my CdPod as the code in that may help.
A mini pmode OS with vesa support, thats less than 512bytes
http://board.flatassembler.net/topic.ph ... 4&start=60