flat assembler
Message board for the users of flat assembler.

Index > Main > optimized modular OS routines

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



Joined: 20 Feb 2006
Posts: 4334
Location: Now
edfed 14 Mar 2006, 11:53
i
do you want to make fully optimised modular os?
if yes this tread is for you

optimisation is the ability of shorting the time of execution and the size of the code

so you need to show me only one optimised code and lets go
ok!!
if you can write a fully optimised modular function i invite you to help


Description: button manager
not finished

Download
Filename: button.rar
Filesize: 13.61 KB
Downloaded: 598 Time(s)

Description: 3d engine
not finished

Download
Filename: 3d_prossessing.rar
Filesize: 28.94 KB
Downloaded: 1095 Time(s)

Post 14 Mar 2006, 11:53
View user's profile Send private message Visit poster's website Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4334
Location: Now
edfed 14 Mar 2006, 12:00
i know it's ridiculous but it's the beginning of my project
Post 14 Mar 2006, 12:00
View user's profile Send private message Visit poster's website Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4334
Location: Now
edfed 23 Mar 2006, 11:48
i am working on a command interpret to use the memory of the hard disk and navigate in its file system
for the moment i'am limited by the bios capabylities
to make my disk driver i need some documents about the ATA to Memory with DMA 16bits
i don't find anything about DMA 16bit specifications so if you have some
i thank you

and some other about the different files systems FAT,FAT32,NTFS because for the moment i am trying to create my own but it's not compatible with the partition tables and the current OS
Post 23 Mar 2006, 11:48
View user's profile Send private message Visit poster's website Reply with quote
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web
Dex4u 23 Mar 2006, 17:03
edfed wrote:
i
do you want to make fully optimised modular os?
if yes this tread is for you

optimisation is the ability of shorting the time of execution and the size of the code

so you need to show me only one optimised code and lets go
ok!!
if you can write a fully optimised modular function i invite you to help


I did, thats why i made one Wink
http://www.dex4u.com/

Good luck.
Post 23 Mar 2006, 17:03
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4334
Location: Now
edfed 27 Mar 2006, 10:27
i'll test your dex4u and after i'll see if i am interested in your project
today i'am develloping a file system fully protected it's hard but possible
bye
Post 27 Mar 2006, 10:27
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 08 Sep 2006, 08:17
is this somehow alive?
Post 08 Sep 2006, 08:17
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 13 Sep 2006, 07:58
5 days... i quess not. what to do with this? even the name doesn't tell me anything about what this is supposed to be
Post 13 Sep 2006, 07:58
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2139
Location: Estonia
Madis731 13 Sep 2006, 11:39
Joined - posted - got lost Sad
mark it [DEAD]
Post 13 Sep 2006, 11:39
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4334
Location: Now
edfed 27 Sep 2006, 10:38
as it was the summer and i haven't internet at home i cannot follow the news of fasm site

i just can say that i have found some data structures totaly evolutive and backward and forward compatible

for exemple with the button function:


button:
.x dd ?
.y dd ?
.xl dd ?
.yl dd ?
.size dd .end-.size-4
data
.end:

with structures like this, the code can be updated easily



for the moment i am working on a routine to make windows and panels
for this i use a meta structure with a routine who organize the pointers to windows and panels structures and makes focus on the instance on the bottom of the meta structure because i display the instances in the order of the meta structure

so the top most window is the last pointer

other ideas but no more time to devellop by
and thank you for the insterest you give to me
Post 27 Sep 2006, 10:38
View user's profile Send private message Visit poster's website Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4334
Location: Now
edfed 23 Feb 2007, 16:52
goto assembleur en france
Post 23 Feb 2007, 16:52
View user's profile Send private message Visit poster's website Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2139
Location: Estonia
Madis731 27 Feb 2007, 13:07
I'm rather interested in the most optimal way of passing these x1,y1,x2,y2 to programs, kernel, API, etc.

One not-so-ingenious way is to pass it through XMM:
xmm0=param1 shl 16*(N-1)+param2 shl 16*(N-2)+....+paramN shl 16*0
you can extract words with: pextrw r32,xmm0,{word index}
SSE is fast, but not existent on all systems and its limited to 8*8 (or 16*Cool parameters, but not N parameters
Post 27 Feb 2007, 13:07
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4334
Location: Now
edfed 08 Mar 2008, 00:14
one year, and it is more achieved.
you can see all the work made on this project in my various posts.

i now that exemples are very poor, i don't code so many usefull codes, but it will become ok one day, if i only works on it frequently.

it is hard to follow a straight line, without zig zags.
i cannot code (not so poor code) more than 3 hours now, at the start, i coded (very poor code) more than 10 hours in one pass.

first very important thing.
the first dword, it is always the function index or pointer.
and the second is the start of function specific structure.

for exemple, a graphic node can call non graphic items.
and items are not always with the structure i used at the begining.
there was many steps before this first "ok" version 0.01 oolib.

then, it is possible to contain items into a windows, compose windows with various items. like buttons, faders, images, boxes, lines, collisions, cursors, oscilloscopes, etc...
and all is modular.
it need now to be fully implemented, with file system r/w, memory management, item creation, etc...

it need at least 2 years to be able to code a serious thing with this lib, but when this lib will be ok, it will help to fast create interactive programs and gui.
Post 08 Mar 2008, 00:14
View user's profile Send private message Visit poster's website Reply with quote
daniel.lewis



Joined: 28 Jan 2008
Posts: 92
daniel.lewis 09 Mar 2008, 23:42
From what I've seen of the benchmarks, having ring 0 provide graphics primitive routines is very inefficient. Each call takes hundreds of cycles up just doing cache/page flushing and loading up the instruction pipeline.

Instead, I've understood it to be much faster to build a todo list in ring 3, pass it to ring 0, and have mostly the graphics card do it. The complicated part of this is that each graphics card will do it differently, and unless you've got experience with a broad range of cards as you try to abstract it you'll get some things too specific to your card and some things too general.

My preference for a todo-list approach is to define type (rectangle, triangle, etc), and then a variably sized structure. The type should define the size being used so you don't need to pad it out (the data is packed).

In lieu of such a todo-list approach, the next best thing is to serve up a framebuffer. I personally agree with DirectFB's primitives for this purpose, though it is a bit abstract.

It's my opinion that if someone's doing graphics, they're technically inclined enough they can cope with passing an array* around and don't need it wrapped in a C++ class.

I believe, edfed, that you're correct in approaching the OS as a set of discrete working parts. The graphics system does not need any more tight interface to the CPU or memory than any other system.

I personally believe that Xen is the new multiplexing layer (exokernel), and windows and linux are just overstuffed libOS's. With that in mind, what specialized systems could you provide libraries for inside the Xen Hypervisor?

Wink

Regards,
Dan

_________________
dd 0x90909090 ; problem solved.
Post 09 Mar 2008, 23:42
View user's profile Send private message Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3175
Location: Denmark
f0dder 10 Mar 2008, 00:02
daniel.lewis wrote:
From what I've seen of the benchmarks, having ring 0 provide graphics primitive routines is very inefficient. Each call takes hundreds of cycles up just doing cache/page flushing and loading up the instruction pipeline.

Instead, I've understood it to be much faster to build a todo list in ring 3, pass it to ring 0, and have mostly the graphics card do it. The complicated part of this is that each graphics card will do it differently, and unless you've got experience with a broad range of cards as you try to abstract it you'll get some things too specific to your card and some things too general.


And decent graphics APIs tend to be written so this command-buffer system is possible to implement - GDI, OpenGL, DirectX are all proper abstraction (GdiFlush(), GlEnd(), ...) - whether an implementation of the API does i this way is another matter.

From a quick glimpse of the Intel integrated graphics documentation, it also seems like these command buffers are DMA'ed to the card, and I wouldn't be surprised if other vendors use the same approach.
Post 10 Mar 2008, 00:02
View user's profile Send private message Visit poster's website Reply with quote
daniel.lewis



Joined: 28 Jan 2008
Posts: 92
daniel.lewis 12 Mar 2008, 00:15
Wink lucky guess on my part.

"Computer optimization is an exercise in caching"

_________________
dd 0x90909090 ; problem solved.
Post 12 Mar 2008, 00:15
View user's profile Send private message Reply with quote
baldr



Joined: 19 Mar 2008
Posts: 1651
baldr 19 Mar 2008, 19:34
Hi there!

> dd 0x90909090 ; problem solved

Wink How can you distinguish "nop" from "xchg ax, ax"? Wink

Sincerely yours,
Sergio.
Post 19 Mar 2008, 19:34
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20339
Location: In your JS exploiting you and your system
revolution 20 Mar 2008, 04:35
baldr wrote:
> dd 0x90909090 ; problem solved

How can you distinguish "nop" from "xchg ax, ax"?
If it is 32 or 64 bit code then the encodings are different.
Post 20 Mar 2008, 04:35
View user's profile Send private message Visit poster's website Reply with quote
daniel.lewis



Joined: 28 Jan 2008
Posts: 92
daniel.lewis 21 Mar 2008, 00:48
It doesn't matter. It was chosen so it doesn't matter.

0x90909090 is a philosophy. If you can't open it, you don't own it. It's about controlling your software, and not the other way around. Idea

Nowadays the game between the reversers and the obfuscators has become more complex. One can't just use 0x90909090 anymore as often code is scrambled, junked, xor'd or whatnot. (who else noticed previously 100mb programs inflating to 2gb?).

Ultimately the reversers always win, because programs are boxes of data that must ultimately partially exist in plaintext form when unfolded in a way identical to the target platform.

I shall admit to the near-complete success of a solution; however, put in mind that closed source software is a multi-billion dollar industry as I refrain from disclosing my method and divulge a sense of paranoia about the issue.

Best Regards,
Dan

_________________
dd 0x90909090 ; problem solved.
Post 21 Mar 2008, 00:48
View user's profile Send private message Reply with quote
baldr



Joined: 19 Mar 2008
Posts: 1651
baldr 26 Jul 2008, 22:51
revolution wrote:
If it is 32 or 64 bit code then the encodings are different.
What I mean was that (in 16-bit) nop is always db 0x90, and xor ax,ax can be db 0x90 or db 0x87,0xC0
Post 26 Jul 2008, 22:51
View user's profile Send private message Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo 27 Jul 2008, 03:02
baldr wrote:
revolution wrote:
If it is 32 or 64 bit code then the encodings are different.
What I mean was that (in 16-bit) nop is always db 0x90, and xor ax,ax can be db 0x90 or db 0x87,0xC0


Typo: he means "xchg ax,ax" here.

Code:
L00000000: xchg    ax,ax     ; 87C0
    
Post 27 Jul 2008, 03:02
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 1, 2  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-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.