flat assembler
Message board for the users of flat assembler.

Index > Main > OS independent x86 assembly

Author
Thread Post new topic Reply to topic
MartinHschei



Joined: 13 Feb 2008
Posts: 5
Location: Oslo,Norway
MartinHschei 13 Feb 2008, 12:59
Any good books on learning OS independent assembly?
All the books i find seems to be assembly with Linux,DOS or Win32.


What seems to be something what i'm looking for is this one:

http://www.amazon.com/80X86-IBM-Compatible-Computers-Interfacing/dp/013061775X/ref=sr_1_12?ie=UTF8&s=books&qid=1202907109&sr=8-12

From the back cover:"DOS memory management".
I'm looking for a book that is about "standard" x86 assembly language.

What i think; there is no such thing as a memory model without a OS?
Just X amount of memory addresses.
Got a lot of questions like this and want to get them answered.

Any one got experience with the book mentioned above or got any other recommendations?


// Martin
Post 13 Feb 2008, 12:59
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20448
Location: In your JS exploiting you and your system
revolution 13 Feb 2008, 13:06
You can get the CPU specs directly from Intel and/or AMD, they deal mainly with just the processor. But it is not a tutorial, so if you are just beginning your learning on assembly coding then it would be tough going.

I think you would find it impossible to get a good tutoring manual that does not guide you through programs for a particular OS. But if you do find one then be sure to share the news here.
Post 13 Feb 2008, 13:06
View user's profile Send private message Visit poster's website Reply with quote
dap



Joined: 01 Dec 2007
Posts: 61
Location: Belgium
dap 13 Feb 2008, 17:19
Have you read something more general like Modern operating systems before ?


Last edited by dap on 14 Feb 2008, 14:02; edited 1 time in total
Post 13 Feb 2008, 17:19
View user's profile Send private message Visit poster's website Reply with quote
MartinHschei



Joined: 13 Feb 2008
Posts: 5
Location: Oslo,Norway
MartinHschei 13 Feb 2008, 19:49
I might be misunderstanding, but the MenuetOS ,for example, have to be written in "OS independent assembly", right?

Case you didn't noticed; I'm new to assembly and programming i general.
I'm actucally reading a book on Win32 assembly by Kip Irvine which is good. Just got a feeling that it's packed with references to certain libraries which do large parts of the work. But i guess that's the way it is with Windows and assembly?
With this book there is actually his own libraries 'irvine32.inc' etc.
Don't know if those contain the same as those kernel32 ++ libraries? Any method for finding out?

// Martin
Post 13 Feb 2008, 19:49
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20448
Location: In your JS exploiting you and your system
revolution 13 Feb 2008, 19:53
MenuetOS is the OS, so it will necessarily be very dependant upon an OS, i.e. itself.

Basically you can't go about writing programs without running them on something. So for a beginner you will need some OS to run your code. The only way to run things without an OS is to write you own OS/bootloader type of thing that will run on your computer hardware at startup.
Post 13 Feb 2008, 19:53
View user's profile Send private message Visit poster's website Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4353
Location: Now
edfed 14 Feb 2008, 00:40
no need of an os to execute applications...
need a librairy, loaded at boot time, linked to applications, and then executed...
if it is for 16 or 32 bit programing, the loader load a disk buffer, and then copy it to an application selector, jump to application selector...
link librairy by far pointers... no ring protection.. maybe paging...

All in the trio:
1) boot loader
2) system loader
3) application loader
Question
Post 14 Feb 2008, 00:40
View user's profile Send private message Visit poster's website Reply with quote
MichaelH



Joined: 03 May 2005
Posts: 402
MichaelH 14 Feb 2008, 01:03
Is there anyone out there who is stoned at the moment and can tranlate what edfed posted...... I could reply to him and say "yeah man", followed by a lot of giggling I suspose Smile
Post 14 Feb 2008, 01:03
View user's profile Send private message Reply with quote
roboman



Joined: 03 Dec 2006
Posts: 122
Location: USA
roboman 14 Feb 2008, 04:26
In short, the most basic function of the os is to load and run programs. You can run a program with no os, but you really need to write two programs, one that does what ever you want and another little one that loads and runs that program (the computer on boot up loads a tiny section of what ever is defined as the boot drive, that tiny section needs to contain a small program that loads your big program or you are trying to do something really simple and can cram it into around 1/4 k of space)
Post 14 Feb 2008, 04:26
View user's profile Send private message Visit poster's website Reply with quote
MichaelH



Joined: 03 May 2005
Posts: 402
MichaelH 14 Feb 2008, 05:12
Quote:

In short, the most basic function of the os is to load and run programs.


You mean the os that edfed says you don't need. Guess the drugs and alcohol are really starting to do some damage huh edfed Smile
Post 14 Feb 2008, 05:12
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4353
Location: Now
edfed 14 Feb 2008, 15:51
Code:
comloader:
kernel=1000h
entry=100h
;version 27/11/2007 01:48
        org 7C00h
        mov ax,cs
        mov ss,ax
        mov ds,ax
        mov [.bootdrive],dl
        mov ax,27fh     ;load 64k
        mov cx,2
        mov dh,0
        push word kernel+entry/16
        pop es
        mov bx,0
        int 13h
        cmp [.bootdrive],0
        jl @f
        mov dx,3f2h
        mov al,0
        out dx,al
@@:
        mov ax,kernel
        mov ds,ax
        mov ss,ax
        call kernel:entry
        int 19h
times 505-($-$$) db 0   ;here need of the global root, extended to other sectors
.bootdrive db ?         ;current bios drive, file system load the boot sector with drive?.
.nextsectorentry dd 0   ;as it names means, it is the next sector for entry in global root
dw 0aa55h               ;normally set for boot,but is unused by non boot drives.
    

and then:
Code:
include 'comloader.inc'
           org 100h
....
...
..
           retf
    
Post 14 Feb 2008, 15:51
View user's profile Send private message Visit poster's website Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo 14 Feb 2008, 19:02
MartinHschei, you may as well choose what OS you will be using the most and target learning assembly for that.
Post 14 Feb 2008, 19: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:  


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