flat assembler
Message board for the users of flat assembler.
Index
> OS Construction > video with BIOS |
Author |
|
Dex4u 02 Sep 2007, 00:25
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. |
|||
02 Sep 2007, 00:25 |
|
jatos 02 Sep 2007, 10:48
Thanks for that link. Will have a look.
Jamie _________________ Jamie |
|||
02 Sep 2007, 10:48 |
|
Hayden 02 Sep 2007, 18:04
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. |
|||
02 Sep 2007, 18:04 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.