flat assembler
Message board for the users of flat assembler.

Index > OS Construction > video with BIOS

Author
Thread Post new topic Reply to topic
jatos



Joined: 04 Nov 2006
Posts: 20
jatos
Hi

Atm I am having distinct difficulty finding any detailed resources about using VGA without the BIOS.

I wondering, does anyone know a place where I could find some good resource on VGA without the BIOS? I want to be able to make basic text output routines and later on write a basic libary that a friend of mine can use to port their GUI to my OS.

While I am it any resources on getting text input and generally useful basic bits that people know would be very handy.

Thanks, Jamie

_________________
Jamie
Post 01 Sep 2007, 22:10
View user's profile Send private message Reply with quote
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web
Dex4u
See here: http://bos.asmhackers.net/docs/vga_without_bios/
and if you take a look at the code for BOS you will find good text input etc.
Post 02 Sep 2007, 00:25
View user's profile Send private message Reply with quote
jatos



Joined: 04 Nov 2006
Posts: 20
jatos
Thanks for that link. Will have a look.

Jamie

_________________
Jamie
Post 02 Sep 2007, 10:48
View user's profile Send private message Reply with quote
Hayden



Joined: 06 Oct 2005
Posts: 132
Hayden
Under DOS the text screen is located at segment;

B800H for color modes
B000H for mono modes

Each character occupies one word, 16-bits in the format;

d0 - d7 = ascii character
d8 - d11 = forground color
d12 - d15 = background color

Try this... hope this example helps...

Code:
USE16
ORG 100H
JMP NEAR START

    BLACK   = 0       ; in graphics modes this is "transparent"
    BLUE    = 1
    GREEN   = 2
    CYAN    = 3
    RED     = 4
    MAGENTA = 5
    BROWN   = 6
    WHITE   = 7
    GRAY    = 8

    BRIGHT_BLUE    = 9
    BRIGHT_GREEN   = 10
    BRIGHT_CYAN    = 11
    BRIGHT_RED     = 12
    BRIGHT_MAGENTA = 13
    YELLOW         = 14
    BRIGHT_WHITE   = 15

    BLINKING       = 16     ; add to color to get blinking text

; This is what a string would look like in video text memory...

    myString db 'F',BLUE,'A',GREEN,'S',CYAN,'M',RED,'1',MAGENTA,'.',BROWN,'6',WHITE,'7',GRAY
    stLength = $ - myString

;--------------------------------------------------------
; this puts a color text string on black background
;--------------------------------------------------------

START:

; Set video - text mode #3 ( color )

    mov ax, 00003H
    int 10H

; Where do we want to write the string ?

    mov  di, 11*80*2 + 64   ; 11 lines down, 32 across
    push 0b800H             ; color text mode assumed!
    pop  es

; Setup the source...

    mov  si, myString       ; offset to my fasm string
    push cs
    pop  ds
    mov  cx, stLength       ; sizeOf(myString)

; Write it!

    rep  movsb

FINISH:

    xor ax, ax
    int 16H
    int 20H
    

_________________
New User.. Hayden McKay.
Post 02 Sep 2007, 18:04
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar.

Powered by rwasa.