flat assembler
Message board for the users of flat assembler.
![]() Goto page 1, 2 Next |
Author |
|
Inagawa 08 Jun 2012, 22:12
Hello, as a fellow newbie, I'd like to welcome you here. I have grasped a few things here and there and I'd be happy to share my knowledge, tutorials or books.
And yes, you can develop 32bit applications on a 64bit computer. |
|||
![]() |
|
newport 09 Jun 2012, 00:36
Thanks for the reply! I must've asked a rather unusually question...lol...I was beginning to think no one really had an answer..but thanks for offering your knowledge as insight. So, tell me,..what has helped you the most during your assembly quest thus far?
|
|||
![]() |
|
revolution 09 Jun 2012, 01:58
newport: Have a look at the OS Construction section on this board. There are many examples of boot code and minimal programs that run on the CPU without the need for any other OS.
|
|||
![]() |
|
Stephen 09 Jun 2012, 03:14
A lot depends on what you mean by "completely OS Independent". most of the 'modern', Intel CPU, multi tasking, OS's get nasty with your program if you try to directly access any of the hardware. To access the hardware in any way you package up your data the way the os wants you to and ask the os to access the hardware. You can still write 16bit, 32bit or even 64 bit programs that don't require an OS at all. You can also write your own OS or along the lines you are talking, you can write a language ide that directly boots. Depending on hgow you look at it, the language doesn't need an OS or the language is the OS.
There is TatOS that boots you right into an ASM IDE MikeOS that boots you right into a Basic IDE (kins of like a lot of the old 8 bit computers) |
|||
![]() |
|
newport 09 Jun 2012, 03:15
Thanks revolution. Will do. I saw that section early but didn't have a chance to look through it... and to tell you the truth I wasn't entirely sure that was where I should begin, but I will definitely take your advice and start there. At least now I have a direction. Thank you!
|
|||
![]() |
|
newport 09 Jun 2012, 03:23
Thanks Stephen..That makes a lot of sense in that the language is the OS. I never looked at it from that perspective. It most certainly seems logical. Coming from high-level to low-level; for me at least; is gonna take some thought re-processing and rearranging...All you guys responses have been great so far and is exactly what I've been needing to find...
|
|||
![]() |
|
Inagawa 09 Jun 2012, 05:46
Well, about learning the 86 Instruction Set, the best three sources were the Intel Manual, FASM.pdf in the folder that your FASMW is, and this.
A good explanation of which registers to use for what can be found here. |
|||
![]() |
|
edfed 09 Jun 2012, 13:04
programming from scratch lead to library, it is a fundamental fact. every time you will use the call instruction, you will call a function, and a function is always part of a library.
a library don't have to be a DLL or a linux package, it can be a set of functions in your code that will do elementary things. even the cpu instruction set can be seens as a library from this point of view. about coding your os, it is very good (from my point of view) because you will first try to understand your needs, and translate it in code, without any external ideas. ones you got a working set of code, you will finally find that you have reinvented the wheel, but your wheel will be very different from what still exists. using the wheel analogy, you can consider a wheel as just a disk, or as a complex object composed by brakes, axle, motor, tires, or even more complex thing. and as revolution say, the more difficult thing when reinventing the wheel is to choose it's color. |
|||
![]() |
|
newport 10 Jun 2012, 22:20
thanks to everyone for all the great responses! i'm starting understand more already....
|
|||
![]() |
|
cod3b453 10 Jun 2012, 22:45
As edfed said, you'll always need to use OS calls for an application. With this in mind, you'll probably want to define a set of generic OS calls and implement OS-specific wrappers for each OS you want it to run on; you can then put the core functionality into a common code group.
This makes things a little more complicated to start off with but should be easier for development and debugging. |
|||
![]() |
|
bubach 11 Jun 2012, 14:00
This is a great book for learning, which I used many times when starting out on my own OS. Even if the examples is for nasm and DOS, it will teach you about registers, stack and instruction usage.
http://www.drpaulcarter.com/pcasm/ |
|||
![]() |
|
newport 11 Jun 2012, 18:33
cod3b453 wrote: As edfed said, you'll always need to use OS calls for an application. With this in mind, you'll probably want to define a set of generic OS calls and implement OS-specific wrappers for each OS you want it to run on; you can then put the core functionality into a common code group. so cod3b453...are you saying that starting out I should use already defined OS calls such as a console call or gui calls for testing while I develop my own generic calls to take their place...cause I was worried that using native api's or libraries(Windows in particular) that I would be infringing on copyrights....am I wrong in thinking this or have I misunderstood the question? I appreciate the input. Thanks! |
|||
![]() |
|
cod3b453 11 Jun 2012, 22:42
I think it might be easier to have a working version on an existing OS and then replacing the API calls such as file access, memory allocation or user interface with your own ones, once they are created.
FASM uses this approach for the different Windows/Linux/BSD builds. Another option is to use something like C library functions, which are the same for all OSs but you'd then have to implement these libraries in your OS. [I actually have a mixture of these in my own OS project so that I can develop under Windows or Linux IDEs and then test them on a VM]. Hope that helps ![]() |
|||
![]() |
|
newport 12 Jun 2012, 03:23
good deal..yea that seems it may make it somewhat easier especially in trying to gain knowledge and understanding of exactly what's going on with the code. Thanks!
|
|||
![]() |
|
DOS386 15 Jun 2012, 03:58
> So how can I program Assembly without
> relying on the libraries, and api's of other OS Platforms??? You can, but: - You can't "simply" access hardware from Windows - Win32 apps will run on Win64 (Win64 emulates Win32 for you) - 32-bit code runs on 64-bit CPU (even 16-bit RM code "still" does ...) when CPU is in suitable mode - Accessing "standard" IBM PC hardware is a horrrrrrrrrrrrrrrror - To test your OS, you need to boot it into your PC or an emulator (BOCHS) - You can provide a layer "isolating" your app from Windaube ... your app communicates with this layer only and "doesn't know" that Windaube exists ... you can test in Windaube and later you can keep your app and exchange only this layer to port your app into your OS ... FASM is done that way ![]() |
|||
![]() |
|
fasmnewbie 16 Jun 2012, 17:52
Well, I think it all begins with "Non-system disk or disk error..."
![]() People might suggest using the emulator... but then you'll end up using libraries from other OS, since emulator like the Bochs is a kind of OS in some way. Just a simple tune, Bochs can then become a full-blown OS. My suggestion is for you to create your own virtual machine, and after reading what you 'want', I am pretty sure that you are actually referring to developing your own VM. Platform-independent, web applications, etc, etc... sounds like a VM to me ![]() |
|||
![]() |
|
DOS386 17 Jun 2012, 06:58
> People might suggest using the emulator... but then you'll
> end up using libraries from other OS no > since emulator like the Bochs is a kind of OS in some way no > Just a simple tune, Bochs can then become a full-blown OS no (I'll put BOCHS onto my CRAP LIST if it starts showing attempts to "be an OS") > My suggestion is for you to create your own virtual machine Code: ; Untested, at your own risk lea eax, [my_VM] vmbrew [eax] vmwrite ecx @@: vmread ecx jnz @b |
|||
![]() |
|
hopcode 02 Jul 2012, 17:50
baremetal here,
http://www.returninfinity.com/baremetal.html is a very promising 64bit OS written with nasm. one can start assembly just there. the code is clean and well organized. newport wrote: ..what has helped you the most during your assembly quest thus far? the following pdf
_________________ ⠓⠕⠏⠉⠕⠙⠑ |
|||||||||||
![]() |
|
rugxulo 05 Jul 2012, 21:49
hopcode wrote:
Is that a joke? Try this one instead: http://www.jegerlehner.ch/intel/IntelCodeTable.pdf |
|||
![]() |
|
Goto page 1, 2 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.