Page 3 of 4

RE:whats needed in a new OS to make real big money

Posted: Wed Apr 28, 2004 11:00 pm
by TheUbu
ASHLEY4,

In 200k I've managed to pack a few drivers (ne2k,hd,fdc,at, etc..) LwIP TCP/IP stack, scheduling, memory manager, mpi, just about all the essential provisions to do anything a tiny bit useful. I could shrink the kernel size by make things module but still they will consume just as much disk space.



-Christopher

RE:an example would help

Posted: Wed Apr 28, 2004 11:00 pm
by ASHLEY4
With a little setting up first, and some soundcard maker's do not give you all the info, So you after get it from eg: linux drivers etc.
Here is a code snip it to start playing a wav  useing the AC97 chip (It will need seting up first )
*******************************************************************************************
; All set.  Let's play some music.

        mov     dx, ds:[NABMBAR]                
        add     dx, PO_CR_REG                   ; DCM out control register
        mov     al, RPBM
        out     dx, al                                       ; set start!

*******************************************************************************************
" OUT" This trasfer's data to a outport from "AL" or "AX"  etc,
" IN"     This trasfer's data from a inputport to  " AL" or "AX"  etc,
" DX"  Is used alot for the port number, This is so you can process consecutive port address.
You can get a basic idea from this bit of code:

  http://www.programmersheaven.com/search/download.asp?FileID=23237

PS: A lot of the code is for memory  and opening, reading file etc,That you would get with any program.

Hope this help's
ASHLEY4.

RE:whats needed in a new OS to make real big money

Posted: Wed Apr 28, 2004 11:00 pm
by ASHLEY4
i am making a 32bit pmode Dos eg: runs in ring0, no multitasking, nopaging, But will have better graphics and more memory etc.
I want to make a VERY SMALL OS, like the one  above,how small and what does it need to include to be considered a VERY SMALL OS for the things it does ?.

ASHLEY4.

RE:PS:Take a look at this

Posted: Wed Apr 28, 2004 11:00 pm
by ASHLEY4
http://story.news.yahoo.com/news?tmpl=s ... on_a_stick
and this

http://slashdot.org/

The "Instant Live Concert Recordings" bit

ASHLEY4.

your great ashley !

Posted: Wed Apr 28, 2004 11:00 pm
by recordingegr
wow i didnt realise it was that simple. even a dummy like myself with university high level basic programming can see it. thanks so much.
so this asm code would start reading the incoming audio stream from a sound card port ? then i would need other asm code presumably to create the wav format audio file on the hard drive. am i correct ?
i think i might just take an asm course. youve given me an idea.
i think asm is ideal for audio because of dsp algorithm speed.
for example adding echo and other effects to a recorded wav track.
what worries me is how the heck one identifies where the sound card is ie: you mentioned it can be in different ports ?
what i like about your approach is one can then bypass the windows api right ?
because the api seems to introduce latency.

RE:your great ashley !

Posted: Wed Apr 28, 2004 11:00 pm
by ASHLEY4
Each pci  has a vendor ID and a device ID you scan for a match and then install a driver or print no driver found etc.
This is the asm code to do that.
;===============================================================
; PCIFindDevice: scan through PCI space looking for a device+vendor ID
;
; Entry: EAX=Device+vendor ID
;
;  Exit: EAX=PCI address if device found
;        CY clear if found, set if not found. EAX invalid if CY set.
;
; [old stackless] Destroys: ebx, edx, esi, edi, cl
;
pciFindDevice proc  near public

push cx
push edx
push esi
push edi

        mov     esi, eax                ; save off vend+device ID
        mov     edi, (80000000h - 100h) ; start with bus 0, dev 0 func 0

nextPCIdevice:
        add     edi, 100h
        cmp     edi, 80fff800h ; scanned all devices?
        stc
        jz      PCIscanExit             ; not found

        mov     eax, edi                ; read PCI registers
        call    pciRegRead32      : THIS IS ANY PROC THAT YOU WOULD INCLUDE
        cmp     edx, esi                ; found device?
        jnz     nextPCIDevice
        clc

PCIScanExit:
pushf
mov eax, edi ; return found PCI address
and eax, NOT BIT31 ; return only bus/dev/fn #
popf

pop edi
pop esi
pop edx
pop cx
ret
pciFindDevice endp

******************************************************************************************
You can get the vender ID  from here:
    http://www.pcidatabase.com/vendors.php?sort=id

ASHLEY4.

questions ashley

Posted: Thu Apr 29, 2004 11:00 pm
by recordingegr
THANK YOU ! now i understand. a question.
so is this the type of code ms would hide in their audio api's ?
another question, a lot of new soundcards are 24 bit sampling at up to 192khz.
with different bit justifications - left ? do you just store each 24 bits in a rotating buffer or something ?
sorry for the stupid questions, but you dont know how big a help this is.
i'm a graduate BUT never did this low level stuff.
any recommendations on best way for me to learn asm ??

RE:questions ashley

Posted: Thu Apr 29, 2004 11:00 pm
by ASHLEY4
Hi
Here are some good links
   http://webster.cs.ucr.edu/AoA/DOS/
This is a free on line book (get the the 16bit to start with).

  http://board.flatassembler.net/
This is a very good assembler,forum.

http://www.thefreecountry.com/documenta ... ound.shtml

For Pacific ? on sound asm programming you would be better off geting a book on asm sound programming  or fineding some one who as done more sound programming
than me.

Hope this helps.
ASHLEY4.

thanks ashley

Posted: Thu Apr 29, 2004 11:00 pm
by recordingegr
you know i'm seriously debating whether to build an OS plus the multitrack software as an all in one approach. i'm going to search for asm books now.
if you know of any good ones please tell me. and thanks so much for your help.

RE:thanks ashley

Posted: Thu Apr 29, 2004 11:00 pm
by ASHLEY4
The web address i give you Has a very good book call "The Art of Assembly" for free.
If you need help with your OS ,Let me know, Or you can use mine,To boot your program as you can use it to boot, Just one program if you want.

ASHLEY4.

RE:thanks ashley

Posted: Fri Apr 30, 2004 11:00 pm
by recordingegr
well i gotta make a critical decision on whether to make the time committment.
for one person like myself to undertake this is a major slice of my life.
i'm interested how did you learn asm ? and how long did it take you to become proficient ?

RE:thanks ashley

Posted: Fri Apr 30, 2004 11:00 pm
by ASHLEY4
I started learning with turbo pascal ,As i made more and more complicated programs i started using in line assembly and then i moved on to using tasm and now i only program in assembly and i'm still learning now.
I now use the assembler "FASM", Which is both easy to use and powerfull.
eg: No linker and no red tape.
I would say it will take you about 6 month's to get the basics and then it just practise as much as you can.

ASHLEY4.

how long to build an OS ?

Posted: Sat May 01, 2004 11:00 pm
by recordingegr
how long do you reckon to build a gui simple fits in 20mb OS ?
the multitrack application would only be about 3mb on top of the OS.
thats another time frame. i reckon total a 4 year effort ?

RE:how long to build an OS ?

Posted: Sun May 02, 2004 11:00 pm
by TheUbu
recordingegr,


It all depends from scratch today or work on something existing..... I can fit a gui and os and utils on a floppy disk... But the library the gui uses has been in development for 6 years the kernel for 2 years thats a combined 8 years.

But... from scratch tested built stable a few short/long years.

-Christopher

thanks UBU - why dont you guys all get together ?

Posted: Mon May 03, 2004 11:00 pm
by recordingegr
ive got a lot of learning to do. its a pity a lot of you assembler OS gurus dont all come together and build a hot lean OS with multitrack audio built in
instead of all doing your own little OS's.