flat assembler
Message board for the users of flat assembler.

Index > OS Construction > FASM Challenge - For all users

Goto page Previous  1, 2, 3, 4, 5, 6 ... 13, 14, 15  Next
Author
Thread Post new topic Reply to topic
edfed



Joined: 20 Feb 2006
Posts: 4237
Location: 2018
edfed
it works.
but as it's a lcd screen, i have screen expansion enabled, and it's not beautyfull.

dex:
Code:
what does it mean?
in the text function/
...
;  input                                               
;             es:esi points to asciiz string to write.     
...
mov al,[esi]
...
    

does that it mean es is the default segment for [esi] indexing?

edit:
somebody has got a simple pm exeption handler? like:
Code:
...
call pmint
...

include 'pmint.inc'
    

?
thanks.
Post 26 Jan 2008, 21:22
View user's profile Send private message Visit poster's website Reply with quote
dosin



Joined: 24 Aug 2007
Posts: 337
dosin
I think things are getting off subject..

Quote:
somebody has got a simple pm exeption handler?

Why?


To use the the print_vesa_string_small function:
Code:
mov   esi,Msg                    ; Point to the string
call  print_vesa_string_small          ; Call the print small fonts function



Msg: db 13,13,"  Vesa demo, for the cool FBrowser project.  ",13
        db    "  Press anykey to exit to Dos or to reboot. ",0
    

or
Code:
mov [vesa_fontsmall_x],20 ;x coords     
mov [vesa_fontsmall_y],10        ;y coords
mov   eax,0x00FF0000  ;color
mov   esi,msg
call  print_vesa_string_small
    




Also has anyone decided on which part they want to program?
and again are we targeting specific.. devices.. or ?


Last edited by dosin on 27 Jan 2008, 00:09; edited 1 time in total
Post 27 Jan 2008, 00:02
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4237
Location: 2018
edfed
int handler to make a global debugging
if a package don't work, it's good to know why.

you code what you want
for exemple, i try to code the vesa 1024 support, with my 8*5 font and some boxes, like windows or buttons.

the question was about es:esi

if es:esi point to string, why we read the string via esi alone?
Post 27 Jan 2008, 00:09
View user's profile Send private message Visit poster's website Reply with quote
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web
Dex4u
First thanks for your inputs. Now to the ?, no the "es:esi points to asciiz string to write" is a left other from a differant demo, this should be (and will be changed to) ds:esi.
Also note that the pmode descriptors are not 0 based, other than 8h (linear_sel).
This mean real and pmode addressing are the same.

As for vesa res, the reason i went for 800*600 is that it is the commnest mode available.
Anyone who wants to go to 1024*768, only need to change the mode in two place in the code, here in the vesa.inc
Code:
mov   ax,4f01h                            ; Get Vesa Mode information.mov   di,Mode_Info                ; This is the address of how info block.mov   cx,0x4115                       ; <***Change this to 0x4118 for 1024*768***and   cx,0xfffint   10h     

And here in the RealModeReturn.inc
Code:
sti                                  ; re-enable interruptsmov   ax,4f02h                          ; set vesa screen modemov   bx,0x4115                 ; <***Change this to 0x4118 for 1024*768***int   10hcli                                  ; Disable interrupts,       

Then re-assemble it and replace the one on the disk. and you will have that mode if your card supports it.
I have code all function to be full scalable so you can change res and it will scale fine.
So if you want that res and your card supports it, its easy got.

Here is some doc
http://www.vijaymukhi.com/vmis/roll.htm
http://www.cs.jcu.edu.au/CIE/RFC/index.htm
http://www.sans.org/resources/tcpip.pdf

As for tcp/ip stack, i already have one thats fully OS independent other than ethernet card drivers and IRQ .
As for card drivers
I have a rtl8139 and already written a driver, people can code for there driver and add them to the project, but we can also port the rtl8029 ( as its a NE2000 clone ).
And i will also port all the menuet card drivers too.
I will keep you posted.
Post 27 Jan 2008, 00:13
View user's profile Send private message Reply with quote
dosin



Joined: 24 Aug 2007
Posts: 337
dosin
I could add an idt for it... I will post the code later tonight!

Dex moves fast..lol Very Happy

Thanks, for the links!
Post 27 Jan 2008, 00:19
View user's profile Send private message Reply with quote
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web
Dex4u
Thanks dosin, but i have already added IDT (out in the next release), but you can still add it and then we can conpare the two .
As we get to each stage, i will try and point you to good doc's, that helped me.
Regards Dex.
Post 27 Jan 2008, 00:34
View user's profile Send private message Reply with quote
dosin



Joined: 24 Aug 2007
Posts: 337
dosin
I added an idt - if an error happons it fills the screen black with red text error msg..
..
I added the keyboard,timer,etc..
they just need coded! Very Happy
sorry, no reg dump in this version..
also it just hlts the system when an error happens and displays the error!

to test you can either do a divide by zero etc.. or use int 0x00 - 0x11
also: Timer = int 0x20 | Keyboard = int 0x21 and so on..

also if your looking for the lidt - its is in the RealModeReturn.inc file
Just kept things simple! Very Happy
;
;removed code until next version!

Thanks dex,
Just did it for fun..


Last edited by dosin on 27 Jan 2008, 20:55; edited 3 times in total
Post 27 Jan 2008, 10:25
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4237
Location: 2018
edfed
there is no keyboard...

fasm browser demo
press any key...
doesn't work.
but it's better than my version, don't work at all...Sad

thanks for idt!
Post 27 Jan 2008, 13:53
View user's profile Send private message Visit poster's website Reply with quote
dosin



Joined: 24 Aug 2007
Posts: 337
dosin
I did not test the keyboard for reboot.. Sorry..
I will look into it .. I think it goes back to real mode and uses a real mode int..

PS:
Though if you try to program the keyboard-irq1/timer etc.. you need to unmask the pic after the remap_pic function..
I left that out in this version..

unmask:
cli
mov al,0 ; unmask irq's
out 0xA1,al
out 0x21,al
sti
ret


I have to run - but later on I should have it fixed or modified for the exit to dos and reboot...I will remove old version and post new one! Very Happy


Last edited by dosin on 27 Jan 2008, 19:08; edited 1 time in total
Post 27 Jan 2008, 17:33
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4237
Location: 2018
edfed
about kbint, i now , irq1 mask shall be clear.

but, now, my big problem is that my fully bootable version of the fbrowser don't work at all, i'm sure i'm missing some addressing trick.. but where?

my version is fully modular, will support all the work i still made on 320*200, but i have an error, vesa mode is not set. or pm is not switched, i don't know exactlly where is the problem, to solve the novesa message, replace jmp error by jb error, in test.inc file.

this error don't occur with your version and dex4u one...
but it can be easier to share, i'm still trying to debugg it... i'll post it when it's ok, with your isr handler, and the fedit editor, a sort of forum emulation...

i post the source, if you want to try to debug it.


Description:
Download
Filename: fasm_browser.zip
Filesize: 20.64 KB
Downloaded: 59 Time(s)

Post 27 Jan 2008, 17:45
View user's profile Send private message Visit poster's website Reply with quote
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web
Dex4u
Thanks dosin for the code i will take a look, as for debugging i in all my year's of OS Dev have only used this for debugging:
Code:
       mov   byte [fs:0xB809E], "1"    ;fs = linear descriptor;Some code     mov   byte [fs:0xB809E], "2"    ;fs = linear descriptor;Some code     mov   byte [fs:0xB809E], "3"    ;fs = linear descriptor;Some code    

Plus a function to dump regs, if needed.
The whole point of this project is to keep it simple, boot a web brower that can access the fasm forum.
It should have no options, other than what you can change by re-assembling it.

When you make a module OS, the first thing to do is only change one thing at a time, and if it does not work, you can easy trace the fault, also keep the module self contained as possable.
Post 27 Jan 2008, 20:18
View user's profile Send private message Reply with quote
dosin



Joined: 24 Aug 2007
Posts: 337
dosin
Quote:
no reg dump


keeping it simple.. not a prob..
I was not going to add a reg dump.. just saying its not in there.. maybe I worded it weird.. just a basic idt..

Once I get the exit to dos/reboot working.. I was going to start coding for the project! Very Happy

Thanks for the input! Very Happy
Post 27 Jan 2008, 20:33
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4237
Location: 2018
edfed
arghhhh...
it still not work...
vesa is boring, and in a previous post:
Quote:

i can code it myself, but i want to know if i can use code from an other

i am in the wrong, from start to end, i cannot use code from other (too hard to code in a different style) and i cannot make this f**** vesa mode control... i'm dumb, very very idiot. grrrr...

please, help, it's a honour question now. Crying or Very sad
Post 28 Jan 2008, 02:07
View user's profile Send private message Visit poster's website Reply with quote
sinsi



Joined: 10 Aug 2007
Posts: 692
Location: Adelaide
sinsi
One problem could be trying to read 127 sectors in the boot sector code - try reading 16 and it works OK (well, I get red blobby things on the screen).
Post 28 Jan 2008, 03:59
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4237
Location: 2018
edfed
no, this is ok.

but after, it shall be the real vesa code, and don't works. thanks for feedback.
Post 28 Jan 2008, 08:57
View user's profile Send private message Visit poster's website Reply with quote
dosin



Joined: 24 Aug 2007
Posts: 337
dosin
Working version with idt.. Very Happy
Just scrap the last version that was by me! Very Happy

I guess I am going to wait for dex.. I have just started working on a device driver for it..


Description:
Download
Filename: FBrowser IDT.rar
Filesize: 60.28 KB
Downloaded: 52 Time(s)

Post 28 Jan 2008, 09:48
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4237
Location: 2018
edfed
what's this delirium?
added an irq1 support, reply with coprocessor error.

finally, i'll code with the common code. the try to make my own will be for my own os.

1024*768 is ok, exeption handler is ok

added a label:

vesamode=118h

and for each references to vesamode:

mov bx,4000h+vesamode.
will simplify the resolution testings...
Post 28 Jan 2008, 15:42
View user's profile Send private message Visit poster's website Reply with quote
dosin



Joined: 24 Aug 2007
Posts: 337
dosin
But as of right now- I am thinking we dont need it (keyboard support at first).. A parser is needed for the html page.. just display page and exit... Basic text no tables,pics,etc.. Just create a simple html page for right now...Hello Fasm type. But I will look over and see if I can fix.. for keyboard support.. with no errors!

be able to read tags for the background color/ text color...
only..

Once we can view the page in the file.. post it on the net and try and get things working to read it! Very Happy

and add from there.. Very Happy


If I have time I will start on a parser tonight.. Very Happy
just a basic one at first!
again this is for fun to see what I come up with..
Post 28 Jan 2008, 20:47
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4237
Location: 2018
edfed
i'm impatient to see the first preview of your parser... Smile
i updated the package, one more font.
easier to use in my opinion.

... try it, you'll see the capabilities of this font, the same as my dear old mode 13h one. with smooth effect.

Code:
mov [txt.x],10
mov [txt.y],12
mov [txt.c1],0x0000ffff
mov [txt.c0],0x00ff0000
mov [txt.smooth],0x00040404
mov esi,texttoprint
call txt
    

i'll try to add some font size options, like scale * 2, *3, *4, etc...
Post 29 Jan 2008, 02:17
View user's profile Send private message Visit poster's website Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4237
Location: 2018
edfed
update, added box function, to draw rectangles.
if it's name is box, it's only because it's only 3 letters, and evocator.

works as txt one. with special parameters.
no stack param passing, it's not compatible with the OO programming style.

about OO implementation, not now. later, before, make more graphics and system functions.

Code:
;draw a 150*100 rectangle at 15,10.
...
mov [box.x],15
mov [box.y],10
mov [box.xl],150
mov [box.yl],100
mov [box.c],0x00554433
call box
...
    



ps:
fs is used as the frame buffer, fs = frame segment. cannot be simpler!
Post 29 Jan 2008, 16:16
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2, 3, 4, 5, 6 ... 13, 14, 15  Next

< 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.