flat assembler
Message board for the users of flat assembler.

Index > Main > Memory Operating System (FAMOS)

Goto page Previous  1, 2, 3, 4  Next
Author
Thread Post new topic Reply to topic
neville



Joined: 13 Jul 2008
Posts: 507
Location: New Zealand
neville
Quote:
A bit silly to do that when there's several gigabytes of free physical ram available, imho


Exactly, f0dder.

As far as I can see, long mode precludes a "64-bit" version of flat real mode which is how FAMOS is implemented.

Some of the discussion about memory paging relates to protected mode I guess, but in fr mode I dont even have to think about it Very Happy Very Happy

_________________
FAMOS - the first memory operating system
Post 23 Jul 2008, 23:11
View user's profile Send private message Visit poster's website Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4633
Location: Argentina
LocoDelAssembly
Quote:

Exactly, f0dder.

But both of you are asking Windows to predict the future, how can Windows be sure that no process will suddenly eat all the memory in a blink of an eye? (Firing up Photoshop DS3 for example or doing a memory intensive operation in an already opened program).

The method to know which pages remain unchanged incurs some penalty though, but I think that the method is part of the working set algorithm so even disabling the pagefile the measurements will be taken anyway.
Post 23 Jul 2008, 23:27
View user's profile Send private message Reply with quote
bogdanontanu



Joined: 07 Jan 2004
Posts: 403
Location: Sol. Earth. Europe. Romania. Bucuresti
bogdanontanu
neville wrote:
bogdanontanu:
Nobody likes having their ideas called "naive" or "not so honest" etc.


I am not here to make you feel good. If you need that then I suggest a piece of chocolate... it does work for a few minutes.

Instead I try to make you wake up somehow. I know it has a bitter taste and makes me look bad. This is a risk I have to take... for your sake.

Quote:

Especially when it is only an (unjustified) personal opinion Surprised


I am "only" one man on this planet. This is what I am and I do not intend to be anything more. Hence my opinions are "personal" by design. they are from my personal experience only.

As for "unjustified"... well we will see about that.

Quote:

I am truly very sorry that you do not fully agree with my ideas,


Nobody should really "agree" with some other people's ideas.

Hence I do not see why you are sorry. Instead you should be happy because I did express my self (even if somehow against you) because this way I give you hints. If my arguments are bogus then you have no problem at all and at least you gain some attention and exposure by the debate itself.

The alternative is complete silence and then you get no hints.

Quote:

which you think have "no value" because they lack a "deep, detailed and correct understanding").


Yes it is my opinion that without correct understanding pure ideas have no value. The value put on ideas is a subtle manipulation of world rulers and also a naive belief of young people.

In time you understand that only the ones that have the power and money / resources to make ideas become real and to impose them as desires and common beliefs / truths to others can in fact benefit from "ideas"

You kind of "sensed" this by crying about Intel doing the "wrong" things.

Face it: IF Intel/AMD wnts then PAGING will be required and the paged memory will run faster than any other alternative. They just have to switch a wire somewhere inside THEIR CPU and there is NOTHING that you can do to prevent this.

If they want (Intel/ corporations) can make ASM very very hard to use and effectively force all of us to use C++ or C#.

DO not tempt them! Razz


Quote:

I am sorry because we seem to share a belief in simplicity and elegance of design


Simplicity yes ... but I doubt you understand my real reasons behind that since they come from a life time experience including in hands on programming experience with C/ C++ and other HLL languages.

Quote:

- and keeping C++ out of OS kernels!


I somehow admired Linus for fighting against C++ versus C inside Linux kernel and that is all.

I do not care if somebody does his own kernel in C++, C sharp or Java or whatever HLL language. In time my admiration for Linus went very down when I observed his "other" actions ... but I have kept a note about that old admiration in my OS and site ... I am lazy Razz

I do prefer ASM for my own reasons and I do not intend to convince other people to take this road. It is a personal preference.

Quote:

I downloaded your OS and tried it. It is nice. Your GUI graphics are much better than mine.


Thanks for kind words.
However there is no much GUI graphics in there. There are some icons that I will have to remove Very Happy and are not frequently used in the GUI... but besides that all GUI is free of icons or bitmaps.

Quote:

FAMOS still starts in VESA mode 101 (640x480, 256 colours) but I do have plans to upgrade it. I used to use VESA linear buffer mode too (mode 4101) but too many computers of people trying FAMOS didn't support it Sad


I only have had one PC that did not have some form of VESA 2.0 linear frame buffer support. There must be some kind of error in your code.

Quote:

So I reluctantly switched to VESA paged mode because nearly all except very old video cards support it. Paged video access made my code 3 times more complicated, and it is noticeably slower especially on one computer which has 4Kb video RAM granularilty (most have 64Kb). There is a very ironic lesson here about paging memory....


I doubt that.

As I have said before I did have one old laptop (Omnibook 800CT) that only had 768K of video RAM and did not support VESA 2.0 frame buffer but it did supported banked video in VESA 1.2 So I did a video bank switch routine for that specific video card (Neomagic).

The speed of video re-draw was obviously slightly slower when compared with linear frame buffer because I did have to switch banks every now and then when doing GFX. But the difference was not big. And yes it did have a 4K granularity.

That is why I say you are naive. You obviously did make an error in your code. I guess a conceptual or design error.

And that is why I say you are "not so honest" because at the very first result that looks like is giving you "right" you jump in and start blaming the "others"

Even IF the result look like are in your favor you you should assume you are wrong and you did a mistake and try again and test again and check for options and alternatives.

Only after you have eliminated ALL other possibilities that you are somehow wrong you should eventually assume you are right...and even then.

This is the "honest" scientific mind set.

If you have experience in programming you KNOW that in 99.999% of cases it is YOUR fault and not hardware or compiler's fault.

Quote:

I'm also sorry because we might be the only 2 people in the world who have designed and written a genuine memory operating system.


I doubt this. Probably there are others. I hope there are and they keep silent. Besides it is not such a big thing. It is just a personal preference and it does have it own problems and conceptual disadvantages.

Quote:

I did manage to crash your OS, but the watchdog came to the rescue Very Happy


In this state it is not designed or implemented to be "crash resistant". I added a lot of things in a kind of hurry and I do expect to be a lot of bugs inside Wink

Beside it is an old version. i did not released the "new" (USB etc) version yet. Thanks for testing it.

Quote:

I repeat that virtual memory is an outdated idea which should be abandoned.


"Outdated" does not mean "bad" and "new" does not mean "good"
...unless you are young and naive.

Quote:

May I suggest that with careful analysis the supposed advantages of memory paging are now more virtual than real ...


You may suggest a LOT. And you might be right or wrong (or left)

But without powerful and clear arguments nobody will care intellectually and without a corporation and political power behind you in fact nobody will care.

The advantages are real but if the hardware or "trend" will change then the ones in "power" toady (Intel/AMD, Win/Unix/Linux) will adapt fast do not worry.

Quote:

What to you think about Mark's Blog and my comments in an earlier post?


I was not impressed. I prefer to keep the number of humans in a discussion limited. Bringing the supposed opinions of others into discussion (unless it is Einstein) just brings more confusion to the issue.

Quote:

I am only questioning the way DOS's use memory and I say there should be a fundamental change in the way some OS's do it.


The use od "DOS" is confusing and a bad choice of terms because it collides with MS-DOS or DOS as an operating system itself.

You are questioning something that you obviously do not understand correctly yet.

Quote:

Is that "bashing" them? I don't think so, but they are big enough to take it anyway...


Yes it is if you do it just because you "fell like it" with no understanding.

Quote:

What makes you think Windows could change in the "blink of an eye". I seriously doubt that.


Because they still have the guys that understand how things work in all CPU modes and they have the experience of designing and implementing successfully OS for many years.

Experience changes everything.

The only thing that can keep them from adaptation are commercial reasons and at times new young non knowledgeable people they have to hire Razz.

Quote:

I don't yet have a 64-bit CPU, but Intel's long mode will make my planned 64-bit version of FAMOS very difficult if not impossible Crying or Very sad


This is a perfect example of a bad design and lack of understanding.


Quote:

It is very sad that Intel want to turn their Ferraris into Model T Fords. Maybe AMD will force them to do the right thing, as has happened before.


This is "bashing".


Quote:

Now lets be constructive, not a bit personal, and debate the issues here....


I wish I could.... but then you mentioned Flat real mode in another thread... using that mode for your OS on a 32bit CPU is lack of knowledge and understanding....

If you want to be constructive make a list with the key elements of your design and the advantages of your design and the disadvantages and do the same for the "others"

The list must be 50% balanced on advantages and disadvantages or you are probably biased.

It is a matter of personal choice: you chose what you like and are capable to understand today and Win/Linux made other choices because they have a different "audience" (customers)

Ans to add insult to injury we do not really know how Win is working inside...but we could eventual study Linux/Unix

Hence any opinion about how Win does handle memory and HDD are speculative at least

_________________
"Any intelligent fool can make things bigger,
more complex, and more violent.
It takes a touch of genius -- and a lot of courage --
to move in the opposite direction."


Last edited by bogdanontanu on 23 Jul 2008, 23:55; edited 1 time in total
Post 23 Jul 2008, 23:39
View user's profile Send private message Visit poster's website Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3170
Location: Denmark
f0dder
Quote:
Hence any opinion about how Win does handle memory and HDD are speculative at least
Apart from the (incomplete) leaked NT4 and NT5 sourcecode, there's Russinovich + Solomon's Windows Internals, from Microsoft press... not everything is covered there, but there is a lot of good information in that book Smile
Post 23 Jul 2008, 23:47
View user's profile Send private message Visit poster's website Reply with quote
neville



Joined: 13 Jul 2008
Posts: 507
Location: New Zealand
neville
My laptop has (only!) 256Mb of physical memory. The pagefile size was 360Mb (max 720Mb) before I set it to zero.

Many basic OS functions are still read from the HD before they can be executed, such as opening menus and drawing windows! (See earlier post)

So there is still some "paging" going on here!

OS is now unstable. For the first time on my laptop I got a quick blue screen (no time to read the error message) and it powered off. On restart it said "XP has recovered from a serious error" after taking a long time to "check the disks for consistency".

Internet Explorer still seems to run, but sometimes fails to load webpages completely. Clicking Refresh usually completes the load after 2 or 3 attempts.

Tried to open a small 660kb PDF with Acrobat Reader (off-line). Got an instant Windows Error: "Out of Virtual Memory",

followed by an Adobe Reader error: "Out of" (that's all!), followed by another error from dwwin.exe: "Application Error" with

a blank button (presume it was an "OK" button). Later I got a cleared rectangular space but no window drawn in it, but Acrobat would not run.

So why must virtual memory be used on a 256Mbyte single-user machine to open a 660kb file? Hello, is that reasonable?

P.S.
To bogdan:
One thing you have learned is how to be very provocative. But instead of being provoked I think it is time for me to move on.

P.P.S.
To everyone:
Did anybody ever try my usbaudio and load32 programs?

_________________
FAMOS - the first memory operating system
Post 24 Jul 2008, 02:40
View user's profile Send private message Visit poster's website Reply with quote
AxelDominatoR



Joined: 11 Aug 2004
Posts: 12
AxelDominatoR
Quote:

I doubt this. Probably there are others. I hope there are and they keep silent. Besides it is not such a big thing. It is just a personal preference and it does have it own problems and conceptual disadvantages.


I think I'm one of "the others". I'm currently in the process of developing an operating system that uses no swap and no protection, so here's my two cents on the matter.

An OS like FAMOS ( or mine ) could be well-suited for custom and peculiar tasks, but don't ever think it can be used as a mainstream OS.
There's a precise motivation behind that: the programmers!
Today most programmers are *lazy*. You can't expect any help from them.
They don't want to know how much ram is installed in your system, nor they want to "cooperate" with other applications currently loaded into your ram. You see titanic, ram-eating applications because today OS works by putting the program in a sort of parallel dimension where the program is the *only thing running* on a PC. And that's not true.
So, you will need to find programmers who knows that their applications will run along others in a RAM-limited environment. They will need to adapt the code to the current RAM installed, shared among the other programs. Do their own swapping, if necessary ( there are applications that will need far more working space than your RAM can provide, that's for sure ).
Not easy, but I'm going down that road for a bunch of specialized applications. ( Sort of CNC )

Quote:

So why must virtual memory be used on a 256Mbyte single-user machine to open a 660kb file? Hello, is that reasonable?


660kb is the file. You pdf reader will take another tens of MB, at least. Ever tried launching "services.msc" and see how many services ( mostly unuseful ) are active at a time? IIRC Windows XP will load it's "full core" in RAM automatically only if you have at least 512 MB ( you can force the load manually by modifying something in the register, but then with 256 MB your pc will start swapping like a mad ).

Quote:

Face it: IF Intel/AMD wnts then PAGING will be required and the paged memory will run faster than any other alternative. They just have to switch a wire somewhere inside THEIR CPU and there is NOTHING that you can do to prevent this.

If they want (Intel/ corporations) can make ASM very very hard to use and effectively force all of us to use C++ or C#.

DO not tempt them! Razz


And then someone will discover some "UnReal Long Mode" that can be activated by writing a voodoo curse in binary Wink
Post 24 Jul 2008, 07:46
View user's profile Send private message Visit poster's website MSN Messenger ICQ Number Reply with quote
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web
Dex4u
Quote:

Can you imagine a computer which just manages a very elegant yet simple Memory Contents Database which has memory entries with names which don't even have to be unique. Of course they can be written to and read from any long-term storage medium including disks. Memory entries are either programs or data. That's it! That's FAMOS !

Can you imagine a computer which DOESN'T have to have a directory structure or "folders" created on the disks and other storage media it accesses?

Can you imagine a computer which just has a Memory Contents Database, which can be sorted and displayed in many different ways? This produces a result similar to folders but is much more flexible and efficient and much less complicated.


Please can you answer how is this differant from a ram disk, other than its users your simple file sys, instead of say fat32 ?.

Also here's http://dex4u.com/ASMcompo512b/
6 more OS to added to the list, but these are less than 512bytes in size.
Post 24 Jul 2008, 16:12
View user's profile Send private message Reply with quote
neville



Joined: 13 Jul 2008
Posts: 507
Location: New Zealand
neville
Hi Dex4U

I'm very happy to explain how FAMOS's memory management is different from a ramdisk, because different it most certainly is!

A ramdisk is an area of memory which the Disk Operating System (DOS) pretends is a complete disk drive, and assigns it a drive letter, like F: or something.

From then on, that area of memory must be accessed using the DOS's "media access" (disk i/o) code, via parameters such as cylinder, head , sector, or logical block number (LBA) which is just a sequential sector numbering system. The media access code (int 13h in real mode) doesn't know that it is talking to memory, and uses the same serial bit-stream low-level interface that it uses for mechanically-rotating media. Of course the memory access times are typically a million times faster than the disk access times, so the code is allowed to run a lot faster and the DOS just thinks it has found a very fast "disk".

The disk i/o hardware, on the other hand, is technically a very long way from the CPU. This is right down through the chipsets on to a relatively slow bus called SCSI or IDE or ATA or SATA etc. Almost at the end of the line so to speak, and at the far end is the disk drive itself which the low-level software actually controls. In the case of a ramdisk, however, the software drivers still cause some electronic signals to be generated right down this long slow chain, and back up again maybe via the faster (but still relatively slow) PCI bus, if the disk controller is a PCI device, and up to the musc faster FrontSide Bus (FSB), and finally back to the fastest buses of all - the Address and Data Buses, directly connected to the CPU.

Of course, being a disk drive under a DOS, that area of memory also incurs some storage overheads, like a "boot sector", "file allocation tables", and directory sectors. It will also now have "granularity" equal to the number of bytes per sector defined in the boot sector etc.

So Disk Operating Systems can have ramDisks because thats how they must work.

I guess Memory Operaing Systems have only ramMemory = random access memory = RAM. RAM is always RAM.

The good thing about always treating RAM as RAM is that it is directly connected to the CPU, and can be accessed with a guaranteed "granularity" of 1 byte using unique addresses (32-bit, 64-bit etc) which fit into a single CPU register, and can be read (or written) using a single CPU instruction like "mov al,[ebx]" (32-bit read) or "mov [rbx],al" (64-bit write). All this happens at the CPU clock speed in just a few clock cycles. So true Memory Operating Systems like FAMOS guarantees maximum performance from your computer.

About filesystems: Traditionally, each DOS has adopted its own filesystem, and generally they are completely incompatible with each other. Worse still, the fundamental operation of the DOS kernel is usually dependent on the particular filesystem, like FAT, NTFS, ISO9660 etc. Also filesystems are often dependent on the method of storage, which is very inflexible.

FAMOS on the other hand is filesystem independent (as all true MOS's should be). In theory, if the code was written, FAMOS could implement every single filesystem simultaneously, and hence be able to access any mass storage device with any format whatsoever.

To show how this can be done, at present I have added some ISO9660 support to FAMOS, so it can read the Table of Contents of any El Torito bootable CD, and it will translate all filenames into a "Media Contents Database" whose entries are accessed by my Media Access utility (which is NOT part of the FAMOS kernel). This Media contents Database has exactly the same record structure as FAMOS's Memory Contents Database, except instead of Start and Finish memory addresses it has Start and Finish sector numbers. This makes for a very simple yet "elegant" interface to FAMOS itself.

I was going to explain my Memory Contents Database structure in FAMOS but maybe another time. Anyway I hope I have explained how I think MOS's differ from DOS's. I also think I have shown with FAMOS that MOS's are now practically viable because RAM is mucher cheaper than it used to be. They have always been technically viable, but DOS's filled the void because back in 1992 for eexample, when RAM was $100 per Mb, 4Gb of RAM would have cost nearly half a million dollars! But the traditional DOS is now an anachronism, and we should look forward to the time when mass storage devices will be all memory-based, and even more significantly, maybe main RAM will be a non-volatile technology like flash. Then all OS's should be MOS's, not DOS's. So we should start getting used to the idea of MOS's now Wink

_________________
FAMOS - the first memory operating system
Post 24 Jul 2008, 21:20
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 the input, but i think you miss understud me, i know how ramdisks work (i have one in my OS).
But i was hoping to get a better understanding of the way your FAMOS.
But i still do not, the basic fact still remains, if you want to load more than one program or move from one program to another or get data from ram, you need a way to locate its place in ram, this is just a ram disk with a very simple file sys.
Anyway good luck with FAMOS.
Post 24 Jul 2008, 23:26
View user's profile Send private message Reply with quote
neville



Joined: 13 Jul 2008
Posts: 507
Location: New Zealand
neville
Dex4U wrote:

Quote:
But i was hoping to get a better understanding of the way your FAMOS.


Something missing here?

Quote:
But i still do not, the basic fact still remains, if you want to load more than one program or move from one program to another or get data from ram, you need a way to locate its place in ram,


That is one of the functions of my Memory Contents Database...


Quote:
this is just a ram disk with a very simple file sys.



Sorry, but I think my explanation above very clearly shows that it is not

Do we have to agree to differ?

Quote:
Anyway good luck with FAMOS.


Thanks! Smile What's your OS?

_________________
FAMOS - the first memory operating system
Post 25 Jul 2008, 03:53
View user's profile Send private message Visit poster's website Reply with quote
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web
Dex4u
My OS is called DexOS see here: http://www.dex4u.com/
If you get the time a port of your "USBAUDIO.ZIP" to my OS would be nice, it has many built in function like dos, but is 32-bit pmode with upto 4GB flat address space (without paging)
Regards Dex.
Post 25 Jul 2008, 20:06
View user's profile Send private message Reply with quote
neville



Joined: 13 Jul 2008
Posts: 507
Location: New Zealand
neville
to Axeldominator

Quote:
I think I'm one of "the others".


are you L O S T ? (in case you don't know, this refers to an American TV program we have here in NZ) Laughing

Thanks for your thoughts. Yes, my elderly version of Acrobat (6.0) is about 30Mb all up including all plugins, so it would still get LOST even in my small 256Mb of RAM. So, again, why the swapping?

Quote:
I'm currently in the process of developing an operating system that uses no swap and no protection, so here's my two cents on the matter.


Please note that an OS that doesn't ever page/swap or use VM does not make a memory operating system. A true MOS like FAMOS must also be completely independent of any particular mass storage technology such as magnetic rotating disks, optical rotating discs etc. Because "files" and "filesystems" are associated with disk storage a Memory OS also must not require a particular filesystem to be used. In FAMOS I could implement as many different filesystems as I like, and use them all at the same time. So FAMOS would be a good platform for developing cross-platform applications perhaps.

How far have you got with yor OS?


Dex: please note also, FAMOS does not have a "simple" filesystem - it needs, and has, no filesystem at all Smile

_________________
FAMOS - the first memory operating system
Post 26 Jul 2008, 03:31
View user's profile Send private message Visit poster's website Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 2936
Location: vpcmipstrm
bitRAKE
How does your "Memory Contents Database" differ from a memory manager?

_________________
¯\(°_o)/¯ unlicense.org
Post 26 Jul 2008, 03:56
View user's profile Send private message Visit poster's website Reply with quote
AxelDominatoR



Joined: 11 Aug 2004
Posts: 12
AxelDominatoR
to neville: yeah! We have LOST here, too Wink

About the Acrobat thing I think it's because Windows has strange policies for swapping things in and out.

My operating system could be a MOS type, because it's totally indipendent from the concept of "files". You load in memory "images" ( comprised of code and/or data ). There is a sort of on-the-fly compiler that will execute various operations over there, putting right addresses and merging with the rest of the code in memory. It's still not fully working, but that's the summary. I want my OS to be lightweight and damn fast, running probably on diskless machines ( clusters ) or small microcontrollers. It's based on a language I'm developing, a sort of "metaprogramming language".
The image concept is similar to smalltalk memory image / forth blocks, but it's a bit overcomplicated and overmodular.
Post 26 Jul 2008, 07:00
View user's profile Send private message Visit poster's website MSN Messenger ICQ Number Reply with quote
neville



Joined: 13 Jul 2008
Posts: 507
Location: New Zealand
neville
bitRAKE wrote:
How does your "Memory Contents Database" differ from a memory manager?


The Memory Contents Database (MCD) is maintained by the FAMOS kernel which allocates linear blocks of 32-bit physical memory to all data items and processes (running or not), and stores all the system information about each process, in a simple record 128 bytes long.

In a Virtual Memory DOS, the Memory Manager has to manage both virtual memory and physical memory (not to mention the paging between them) which is a much more complex task overall. I haven't looked at Linux code or tried to reverse-engineer Windows so I don't know anything about the algorithms used Wink

_________________
FAMOS - the first memory operating system
Post 26 Jul 2008, 09:51
View user's profile Send private message Visit poster's website Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 2936
Location: vpcmipstrm
bitRAKE
neville wrote:
bitRAKE wrote:
How does your "Memory Contents Database" differ from a memory manager?
I haven't looked at Linux code or tried to reverse-engineer Windows so I don't know anything about the algorithms used Wink
The algorithms are not OS specific - only the implementations are. Might help communication to just call it a memory manager instead of trying to equate it to a file system.

_________________
¯\(°_o)/¯ unlicense.org
Post 26 Jul 2008, 14:22
View user's profile Send private message Visit poster's website Reply with quote
neville



Joined: 13 Jul 2008
Posts: 507
Location: New Zealand
neville
bitRAKE wrote:
neville wrote:
bitRAKE wrote:
How does your "Memory Contents Database" differ from a memory manager?
I haven't looked at Linux code or tried to reverse-engineer Windows so I don't know anything about the algorithms used Wink
The algorithms are not OS specific - only the implementations are. Might help communication to just call it a memory manager instead of trying to equate it to a file system.


Fine, but in my full answer to your question I never mentioned files or filesystems. So let's not confuse things more.

All I'm saying is that my MCD is just data, but the memory manager code that maintains that data must be a lot simpler than the equivalent code in a virtual memory system (which I've never seen an example of).

But my hunch is that Axeldominator may well be right:
Quote:
About the Acrobat thing I think it's because Windows has strange policies for swapping things in and out.

'cos it sure looks that way Wink

_________________
FAMOS - the first memory operating system
Post 26 Jul 2008, 20:32
View user's profile Send private message Visit poster's website Reply with quote
neville



Joined: 13 Jul 2008
Posts: 507
Location: New Zealand
neville
Dex4u wrote:
My OS is called DexOS see here: http://www.dex4u.com/
If you get the time a port of your "USBAUDIO.ZIP" to my OS would be nice, it has many built in function like dos, but is 32-bit pmode with upto 4GB flat address space (without paging)
Regards Dex.

Dex, everything is possible, including a port to DexOS, but some things take a longer than others. Wink I see DexOS is essentially a single-task Pmode version of DOS with GUIs. My experience of Pmode programming is nil, other than briefly entering Pmode with a GDT to set up Flat Real mode in FAMOS.

All FAMOS code is assembled 16-bit, with size prefixes to select 32-bit registers & operands. My immediate questions are:
1. Would there be any major issues in converting to 32-bit assembly?
2. Is there an issue with interrupts? My USBAUDIO code requires hardware-generated interrupts at exactly 1.000 kHz. I achieve this by dividing the 1.193Mhz clock driving Counter0 by 1193. Counter0 generates hardware INT8 (used by the DOS clocktick function), which in turn calls INT 1Ch. Could this, or equivalent, all be done in Pmode?

As you will no doubt realise, I need to learn Pmode programming Smile, particularly as it looks like any 64-bit version of FAMOS may have to be in Pmode ...

DexOS could be a good Pmode testing platform for me to learn Pmode programming, and a port of USBAUDIO might be a good learning project.

Did USBAUDIO work okay for you?

_________________
FAMOS - the first memory operating system
Post 26 Jul 2008, 23:22
View user's profile Send private message Visit poster's website Reply with quote
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web
Dex4u
To do that, you could do something like this (in DexOS's case)
Code:
use32        ORG   0x400000                                 ; where our program is loaded to       jmp   start                                    ; jump to the start of program.        db    'DEX2'                                 ; We check for this, to make shore it a valid Dex4u file. ;----------------------------------------------------; ; Start of program.                                  ; ;----------------------------------------------------;start:     mov   ax,18h  mov   ds,ax   mov   es,ax ;----------------------------------------------------; ; Get calltable address.                             ; ;----------------------------------------------------;        mov   edi,Functions                           ; this is the interrupt mov   al,0                                    ; we use to load the DexFunction.inc    mov   ah,0x0a                                 ; with the address to dex4u functions.  int   40h ;----------------------------------------------------; ; Main program start.                                ; ;----------------------------------------------------;  mov   cx,100                                  ; Set number of clockticks a second (default is 18.2 )  call  [InterruptTimer]                        ; Call the function NOTE: [ ]     mov   eax,20h                                 ; Set what int number we want   call  [GetIntVector]                          ; Call the function to get old address NOTE: [ ]    mov   [OldInClockTickAddress],edx             ; Save the old address  mov   eax,20h                                 ; Set what int number we want   mov   edx,irq0_int                            ; Set the new address of the int        call  [SetIntVector]                          ; Call the function to set new address       ;DO SOMETHING HEREExitHere:                                          ; Set old clocktick back to old address mov   edx,[OldInClockTickAddress]             ; return a pointer to old address       mov   eax,20h                                 ; Set what int number we want   call  [SetIntVector]                          ; Call the function to set address    mov   cx,0                                    ; Set default clockticks        call  [InterruptTimer]                        ; Call the function   call  [WaitForKeyPress]                       ; Wait for key press    ret                                           ; Exit.irq0_int:                                            ; The new clocktick address     ;DO SOMETHING HERE  mov   al,0x20 out   0xa0,al out   0x20,al                                 ; quiet screaming irq chip.     iret                                          ; NOTE: THIS;NOTE: You can also do something like this, so the old clocktick int still gets called.; remember to save everthing you change before jumping.;irq0_int:                                            ; The new clocktick address ;pushad       ;DO SOMETHING HERE    ;popad        ;jmp   [OldInClockTickAddress]OldInClockTickAddress       dd 0                          ; OLD clocktick var ;----------------------------------------------------; ; calltable include goes here.                       ; ;----------------------------------------------------;include 'Dex.inc'                                   ; Dex inc file    


Note: it users a call-table for functions, they are loaded at run time by calling this int
Code:
       mov   edi,Functions                           ; this is the interrupt mov   al,0                                    ; we use to load the DexFunction.inc    mov   ah,0x0a                                 ; with the address to dex4u functions.  int   40h    

Then you fill the needed reg and call the function (eg: call [????]
You can also call the same functions using int by filling ebx, with the function number, fill the rest of the reg as normal and doing a int 41h
The number are the same as the function number in the call-table

PS: Sure it worked fine on my test PC.


Description: The call-table list
Download
Filename: Dex.inc
Filesize: 17.96 KB
Downloaded: 85 Time(s)

Post 27 Jul 2008, 12:19
View user's profile Send private message Reply with quote
neville



Joined: 13 Jul 2008
Posts: 507
Location: New Zealand
neville
Sounds good. I might give it a go sometime.

Did you play your own WAV data using LOAD32 before USBAUDIO? And what USB audio device do you have Dex?

_________________
FAMOS - the first memory operating system
Post 28 Jul 2008, 01:48
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  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. Also on YouTube, Twitter.

Website powered by rwasa.