flat assembler
Message board for the users of flat assembler.

Index > MenuetOS > Progress

Goto page Previous  1, 2
Author
Thread Post new topic Reply to topic
Madis731



Joined: 25 Sep 2003
Posts: 2139
Location: Estonia
Madis731 21 May 2008, 06:20
Address space - now there's a whole different subject!? It has nothing to do with numbering of interrupts.

P.S. http://board.flatassembler.net/topic.php?t=6544&start=0 - I haven't noticed it before.
(UHCI done - I haven't booted it yet, but if it delivers, what promised, I'm REALLY amazed)
Post 21 May 2008, 06:20
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
daniel.lewis



Joined: 28 Jan 2008
Posts: 92
daniel.lewis 22 May 2008, 00:26
Perhaps it's subtle enough not to be picked up from reading, address space refers to the maximum count of a set of unique values used to identify a location.

It was at least misplaced; I meant to say:

You have:

Code:
syscall
\
      catmeow = 0
      dogpee = 1
      dogwoof =2
      catscratch = 3
      cateat = 4
      sheepshear = 5
    


This is a single "address space" with no "complexity" as Tolle put it.

The above is easy to add to, there is no order so it's no effort to preserve order. It is difficult to search for a name, or make assessments about a category at a glance.

Code:
syscall
\
      Catmeow = 0
      Catscratch = 1
      Cateat = 2
      Dogpee = 3
      Dogwoof =4
      Sheepshear = 5
    


The above is difficult to add to and keep sorted; you have to shift calls around to make space, a maintenance problem.

Code:
Cat = 0
\
      meow = 0
      scratch = 1
      eat = 2
Dog = 1
\
      pee = 0
      woof = 1
Sheep = 2
\
      shear = 0
    


The above is to add "complexity" or to split the "address space". The program flow is exactly the same within the context of an interrupt (it's usually not).

Since the only benefits and drawbacks are human, it's a human choice.

You can now add Catplay without affecting the functions in Dog or Sheep.
You can easily find, read, understand, and make thoughts about the API.
You also need to differentiate between Dog, Cat and Sheep when you want something in the system to pee.

Personally, I prefer the last.

_________________
dd 0x90909090 ; problem solved.
Post 22 May 2008, 00:26
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20522
Location: In your JS exploiting you and your system
revolution 22 May 2008, 00:58
The numbers are arbitrary, why care whether catmeow is 0 or 12 or 3654569? I think you are trying to solve a problem that doesn't exist. If you use symbolic constants then the "problem" completely disappears, just assign any new functions the next available number.
Post 22 May 2008, 00:58
View user's profile Send private message Visit poster's website Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2139
Location: Estonia
Madis731 22 May 2008, 05:24
Would it satisfy if the numbers used weren't consecutive, but like this:
Code:
;First we agree, that higher functions take higher bit sets in a register:
; - then we get rax=func shl 16+subfunc
; - as you perfectly demonstrated, here is a similar solution
Cat = 0
      meow = 0
      scratch = 1
      eat = 2
Dog = 1
      pee = 0
      woof = 1
Sheep = 2
      shear = 0

;Calling a function is a matter of constructing one
mov eax,Dog.woof ; by using some sort of macro set
;OR plainly
mov eax,Dog shl 16+woof
    


The fact that eax(rax) holds 65537 is transparent to the user.
Post 22 May 2008, 05:24
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
daniel.lewis



Joined: 28 Jan 2008
Posts: 92
daniel.lewis 22 May 2008, 10:07
It certainly satisfies the user, but you tend not to be able to calculate the offset, you need a jump table (or worse, a set of cmp; je's) for your switch.

Meh. Whatever. Smile

They're right, it's really not important. I would worry more about the fact that the comparison revealed a lack of any memory utilities apart from the "resize" function or USB support. :p

_________________
dd 0x90909090 ; problem solved.
Post 22 May 2008, 10:07
View user's profile Send private message Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2139
Location: Estonia
Madis731 22 May 2008, 12:57
Yes - the memory manager problem has risen before. Like with many other things: "we're working on it"...
Post 22 May 2008, 12:57
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2

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