flat assembler
Message board for the users of flat assembler.

Index > OS Construction > Hardware programming examples (some USB and CardBus too)

Goto page 1, 2, 3  Next
Author
Thread Post new topic Reply to topic
pfranz



Joined: 13 Jan 2007
Posts: 116
Location: Italy
pfranz 13 Jan 2007, 11:46
Hi all,
I wrote a program to experiment hardware programming on x86 platforms. I think it might be of interest for anyone who wants to write an OS. Please try it, tell what you think and possibly improve it ...
It's not for total beginners, anyway you can tell me when I'm too cryptic.
File format is .7z (www.7-zip.org) and the assembler is NASM (sorry!)
Bye

Download from pfranz73.googlepages.com


Last edited by pfranz on 11 Dec 2007, 17:36; edited 1 time in total
Post 13 Jan 2007, 11:46
View user's profile Send private message Reply with quote
tom tobias



Joined: 09 Sep 2003
Posts: 1320
Location: usa
tom tobias 13 Jan 2007, 12:01
Thanks, I have downloaded it, and will give it a try, next week. Appreciate your effort, and willingness to share your work with us.
Smile
Post 13 Jan 2007, 12:01
View user's profile Send private message Reply with quote
bogdanontanu



Joined: 07 Jan 2004
Posts: 403
Location: Sol. Earth. Europe. Romania. Bucuresti
bogdanontanu 13 Jan 2007, 13:33
Thank you,

I do appreciate that it contains some hardware related information Wink
Post 13 Jan 2007, 13:33
View user's profile Send private message Visit poster's website Reply with quote
hckr83



Joined: 12 Nov 2006
Posts: 86
Location: usa
hckr83 13 Jan 2007, 14:38
you should submit this to osdever.org...haven't seen them put up anything new under tutorials or even documents in a while
Post 13 Jan 2007, 14:38
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger Reply with quote
AmbroXio



Joined: 09 Jan 2007
Posts: 13
Location: Guatemala
AmbroXio 13 Jan 2007, 18:43
looks great, i've just seen the readme file..... i'll try it ..............
Post 13 Jan 2007, 18:43
View user's profile Send private message Visit poster's website MSN Messenger Reply with quote
smiddy



Joined: 31 Oct 2004
Posts: 557
smiddy 14 Jan 2007, 02:41
Thanks for the info, preliminary look-see it is readable. I'll give a more thorough look in the coming weeks.
Post 14 Jan 2007, 02:41
View user's profile Send private message Reply with quote
Japheth



Joined: 26 Oct 2004
Posts: 151
Japheth 14 Jan 2007, 13:47
Thanks! looks promising. Smile
Post 14 Jan 2007, 13:47
View user's profile Send private message Reply with quote
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web
Dex4u 14 Jan 2007, 16:59
Thanks pfranz, for posting your examples, i will have a look at it and let you know, once i get the right unzipper.
Post 14 Jan 2007, 16:59
View user's profile Send private message Reply with quote
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web
Dex4u 14 Jan 2007, 20:32
Update, AMD 1200, 224 ram.
1. boots OK.
2. set graphic mode OK.
3. prints right info OK
4. mouse works OK, (as in a pixel that draws to screen).
5. Press E sound works OK (i have a via AC97).
But then mouse stops working and i can not get it to detect usb device.
NOTE: I think theres a conflict with IRQ.

Hope this helps and great work.


Last edited by Dex4u on 14 Jan 2007, 23:42; edited 1 time in total
Post 14 Jan 2007, 20:32
View user's profile Send private message Reply with quote
MichaelH



Joined: 03 May 2005
Posts: 402
MichaelH 14 Jan 2007, 20:35
I can't download this. It gets to about 200k to 300k and then resets Sad


Last edited by MichaelH on 15 Jan 2007, 00:03; edited 1 time in total
Post 14 Jan 2007, 20:35
View user's profile Send private message Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3175
Location: Denmark
f0dder 14 Jan 2007, 22:47
Downloaded just fine here - browser bug?
Post 14 Jan 2007, 22:47
View user's profile Send private message Visit poster's website Reply with quote
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web
Dex4u 14 Jan 2007, 23:41
MichaelH wrote:
I can't dowload this. It gets to about 200k to 300k and then resets Sad

I had the same problem MichaelH, but if you keep other writing the zip, it works in the end.
Post 14 Jan 2007, 23:41
View user's profile Send private message Reply with quote
pfranz



Joined: 13 Jan 2007
Posts: 116
Location: Italy
pfranz 15 Jan 2007, 11:03
To Dex4u:
I would be surprised if no one experienced the problem you had. My idea was to experiment LEAVING APART all the organization part (which pertains to an operating system). Choosing an IRQ for PCI is not so straightforward (the IRQ Routing table should be used) and pertains to an OS, so I chose the first that worked for me. If the problem is IRQ conflict, which is very probable, you may simply try to take away the AC'97 module, then recompile and run.
Did you use a PS/2 mouse? I thought it would always be assigned to IRQ 12 ... Maybe the IRQ 5 I used for audio can not be used in your PCI on that slot and that blocks everything. Have a look at the IRQ routing table (if you know what I mean, otherwise we can talk by e-mail).
Meanwhile I see if I can patch in a simple way my prog to avoid this problem; can you try on other machines?
Post 15 Jan 2007, 11:03
View user's profile Send private message Reply with quote
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web
Dex4u 15 Jan 2007, 16:11
@pfranz, Sure i know what you mean, i have most of theres already implemented in my OS http://www.dex4u.com/
But i did have a problem with the rtl8139 ethernet card on this PC (when do the ethernet driver for my OS), if i use IRQ, as in it crashed (so i used polling ).
But i will try it on some other PC and get back to you.
Post 15 Jan 2007, 16:11
View user's profile Send private message Reply with quote
pfranz



Joined: 13 Jan 2007
Posts: 116
Location: Italy
pfranz 15 Jan 2007, 17:19
Oops, I replied too quickly ...
I didn't explain that the dot trace of the mouse stops as soon as you press E; afterwards coordinates are updated internally but you can't see whether the mouse is working, unless you have a Trident card and its hardware cursor. So maybe you thought the program crashed while it was running fine instead ...
The blinking line, which appears when a device is inserted in a USB port, is enabled from the start, so you can try it at any time to see if the USB controller was detected and initialized, and if the system is hung. If you insert a problematic device, it may take some minutes for the message to appear, so please wait.
By the way, did you see the message "Audio interrupt ..." at the bottom of the screen at the end of the sound? If the program crashed, it should have dumped the registers.
Post 15 Jan 2007, 17:19
View user's profile Send private message Reply with quote
Hayden



Joined: 06 Oct 2005
Posts: 132
Hayden 14 Mar 2007, 08:35
cant download the file - stops @ ~300kB
Post 14 Mar 2007, 08:35
View user's profile Send private message Reply with quote
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web
Dex4u 14 Mar 2007, 15:59
See my above post .
Post 14 Mar 2007, 15:59
View user's profile Send private message Reply with quote
MichaelH



Joined: 03 May 2005
Posts: 402
MichaelH 14 Mar 2007, 22:20
It doesn't work Dex. I tried heaps of times and had to abandon my efforts to download it. Can this problem be fixed so us who are having troubles, can download it.
Post 14 Mar 2007, 22:20
View user's profile Send private message Reply with quote
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web
Dex4u 15 Mar 2007, 00:28
I have post it to my site till its fixed:
http://www.dex4u.com/ASMcompo512b/hwtest.7z
Post 15 Mar 2007, 00:28
View user's profile Send private message Reply with quote
pfranz



Joined: 13 Jan 2007
Posts: 116
Location: Italy
pfranz 26 Mar 2007, 13:08
So there is someone still interested out there ... I thought this thread was dead. I sent a mail to you, Dex, at the e-mail address I found in your site (susan.armstrong70@ntlworld.com), but got no response.
Do you want me to send you an updated version of hwtest, so that you can host it in your site ?
If someone has reports/comments/suggestions, please let me know
Post 26 Mar 2007, 13:08
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page 1, 2, 3  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-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.