flat assembler
Message board for the users of flat assembler.
Index
> DOS > My small, mode 13h GUI library |
Author |
|
me239 23 Jan 2011, 09:49
Hello! Here is my new extremely limited library that uses mode 13h to three different gui functions: button/pressed button, window, and title bar. Here is an example of how you can use it
Code: mov ax, $13 int 10h mov si, main call draw_window int 20h main WINDOW, 10, 20, 70, 90, 07h, 01h This code/syntax was inspired by a calculator written on this forum. I can't remember the author, but it was under the DOS FAQ under the FPU tab. the WINDOW syntax goes as the following: x1, y1, x2, y2, color, titlebar color button: x1, y1, x2, y2, color the pressed button routine uses the same syntax as button image: http://farm6.static.flickr.com/5203/5379941423_2b6932d698.jpg Download Below
Last edited by me239 on 24 Jan 2011, 21:48; edited 1 time in total |
|||||||||||
23 Jan 2011, 09:49 |
|
me239 23 Jan 2011, 18:44
bitshifter wrote: You may want to consider 80*25 text mode (int 10h, AX=03h) I also have one like that, but I wanted shading and light. I'm going to try to make it a mode 12h or vesa soon. |
|||
23 Jan 2011, 18:44 |
|
edfed 23 Jan 2011, 19:08
very good result.
before vesa, try it with mode 13h + protected mode |
|||
23 Jan 2011, 19:08 |
|
me239 23 Jan 2011, 19:53
edfed wrote: very good result. |
|||
23 Jan 2011, 19:53 |
|
me239 23 Jan 2011, 21:21
bitshifter wrote: You may want to consider 80*25 text mode (int 10h, AX=03h) I said in my last post that I've already made a text mode interface, but I wanted to use pixels instead of characters. That's why I want to use mode 12h because it is graphics mode, but also has readable font. edit: My browser didn't refresh so I thought you were the last post. Last edited by me239 on 23 Jan 2011, 21:29; edited 1 time in total |
|||
23 Jan 2011, 21:21 |
|
edfed 23 Jan 2011, 21:23
do you know my project FOOL?
your first code looks a lot like my very first approach for grapghic programming. |
|||
23 Jan 2011, 21:23 |
|
me239 23 Jan 2011, 21:28
edfed wrote: do you know my project FOOL? |
|||
23 Jan 2011, 21:28 |
|
ManOfSteel 23 Jan 2011, 21:53
me239 wrote: How do I switch to mode 13h without the BIOS? You don't. Mode-setting is hardware dependent and quite difficult compared to the simple real mode BIOS-based method. You better switch to mode 0x13 and then enable protected mode. |
|||
23 Jan 2011, 21:53 |
|
Tomasz Grysztar 23 Jan 2011, 23:14
Actually, setting mode 13h by directly poking the VGA registers is not so much hardware-dependent (unless you want the MCGA compatibility, but then you'd just need to add a MCGA subroutine), it is relatively simple to do and it will work on anything that is VGA-compatible. I had such code (and also the routine to get back 80x25 text mode) in the late version of my old Titan OS project. unfortunately it is the version that was then lost.
|
|||
23 Jan 2011, 23:14 |
|
Dex4u 24 Jan 2011, 03:35
Here is some code from 'BOS' for doing that.
|
|||||||||||
24 Jan 2011, 03:35 |
|
ManOfSteel 24 Jan 2011, 10:00
I stand corrected. Even though I've played with those registers many times in the past, I didn't recall mode-setting was possible in the same way. It's not that complex after all and I've seen a lot "worse".
|
|||
24 Jan 2011, 10:00 |
|
DJ Mauretto 24 Jan 2011, 11:36
bitshifter wrote: You may want to consider 80*25 text mode (int 10h, AX=03h) Did you mean 720x400 _________________ Nil Volentibus Arduum |
|||
24 Jan 2011, 11:36 |
|
edfed 24 Jan 2011, 12:09
need a vga mode switch for pm (with same interface than int 10h of course), after, bios will be far away!!!!
|
|||
24 Jan 2011, 12:09 |
|
me239 25 Jan 2011, 04:33
edfed wrote: need a vga mode switch for pm (with same interface than int 10h of course), after, bios will be far away!!!! Hey, couldn't I just save the int 10h handler and call it later on whilst I'm in protected mode? |
|||
25 Jan 2011, 04:33 |
|
revolution 25 Jan 2011, 04:37
me239 wrote:
|
|||
25 Jan 2011, 04:37 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.