flat assembler
Message board for the users of flat assembler.
Index
> Projects and Ideas > Tiny 8086 assemblers? |
Author |
|
bitshifter 19 Jun 2011, 09:47
I am designing my own 8086 assembler for my hobby-os.
First i thought to search the web for any hits (google) I was surprised to only find one single < 8k assembler. (Which runs under DOS and is written in its own language) I thought there would be many, but only one? Maybe the complex instruction encoding scares most people away? Anyway, here is the one i found... http://code.google.com/p/x86-s/ I think its pretty cool, minus a few small bugs and syntax weirdness. So, do you know of any self-assembling assemblers in < 8k ? If so, i would like to study them. Writing an assembler is a lot of work and i could save a lot of time if i could find something usable and tweak it a bit, rather than from scratch. _________________ Coding a 3D game engine with fasm is like trying to eat an elephant, you just have to keep focused and take it one 'byte' at a time. |
|||
19 Jun 2011, 09:47 |
|
Picnic 19 Jun 2011, 10:08
I do not know if they meet the conditions you require, however you will find a list of sources here
Maybe you'll find something useful. |
|||
19 Jun 2011, 10:08 |
|
JoeCoder1 19 Jun 2011, 12:49
There is always tiny assembler which was part of the tiny c project in the 1970s. I don't know the home page but you can search online "tiny assembler"
|
|||
19 Jun 2011, 12:49 |
|
Teehee 19 Jun 2011, 13:01
i liked the comment style
|
|||
19 Jun 2011, 13:01 |
|
typedef 19 Jun 2011, 15:26
Here's what I found so far|
http://code.google.com/p/pe-asm/ http://code.google.com/p/comasm/ ---> You should definitely check this one out. |
|||
19 Jun 2011, 15:26 |
|
bitshifter 20 Jun 2011, 08:19
Hmm, this page says there are no downloads available?
http://code.google.com/p/comasm/ It also says my browser is out of date. Maybe you could leave link to download file? |
|||
20 Jun 2011, 08:19 |
|
bitshifter 21 Jun 2011, 13:28
I found one more, although written in C, and somewhat larger in exe.
This one is table driven, MASM syntax, with fewer bugs. http://www.bbs.motion-bg.com/index.php?file=343 See: GASMSRC\GASM.C (2000+ lines of core, all in one file) I was planning to prototype my assembler in C anyway. And MASM syntax is way nicer than AS syntax. Then once its good and tight i can write it in asm! |
|||
21 Jun 2011, 13:28 |
|
Artlav 22 Jun 2011, 15:57
bitshifter wrote: Maybe the complex instruction encoding scares most people away? I'm making an assembler with multiple targets about now, and here are some stats: -Supporting code: 1100 LOC -Code generator for ZPU microcontroller: 200 LOC (and complete) -Code generator for a memory-based VM: 250 LOC (and also complete) -Code generator for x86-32: 1250 LOC (and still barely scratches the surface) To make one you need to carefully study the instruction set, which have a few patterns, and design from ground up with ALL the cases in mind. Then you'll get a fully functional assembler when everything will be done. Many asm-for-fun projects simply run out of steam on first encounter with mov al, [ds:si+bx] or something. |
|||
22 Jun 2011, 15:57 |
|
Picnic 18 Aug 2011, 13:00
MSA a simple DOS assembler with a NASM-like syntax in about 1500 lines of C.
At first glance seems to runs fine under xp, i used old Turbo C++ 3.0 to compile sources. MSA |
|||
18 Aug 2011, 13:00 |
|
me239 19 Aug 2011, 02:26
A86
|
|||
19 Aug 2011, 02:26 |
|
Madis731 19 Aug 2011, 06:34
It depends: 1250 LOC C or 1250 LOC ASM?
|
|||
19 Aug 2011, 06:34 |
|
bitshifter 20 Aug 2011, 01:48
Picnic wrote: MSA a simple DOS assembler with a NASM-like syntax in about 1500 lines of C. Very cool, i will study these sources now. And i have Turbo C 2.0 also on my dev box. Aaah, the good old days, where makefiles ruled. _________________ Coding a 3D game engine with fasm is like trying to eat an elephant, you just have to keep focused and take it one 'byte' at a time. |
|||
20 Aug 2011, 01:48 |
|
Picnic 10 Dec 2011, 14:03
8086 Assembler Implemented in C++. Single source file.
|
|||
10 Dec 2011, 14:03 |
|
Hugh Aguilar 12 Jan 2012, 01:50
bitshifter wrote: I am designing my own 8086 assembler for my hobby-os. There are a lot of assemblers written in Forth for various processors, and they tend to be very small because they use Forth's interpreter rather than do their own parsing. As Chuck Moore famously said: "Let the dictionary do the deciding." You could start with LMI UR/Forth, which is available in both 16-bit and 32-bit. It used to be a commercial product. Now it is shareware, although Laboratory Microsystems Inc. is out of business afaik. A lot of it is open-source, including the assembler. The company where I used to work had the complete source for UR/Forth, but I never saw it because I hadn't signed the non-disclosure form. There are other Forths available for the 16-bit x86 that are fully open-source that you might be able to port over to your OS. Why do you want an assembler that runs under your OS? What advantage would that have over using FASM to cross-assemble? On the other hand, getting a Forth to run under your OS would make sense, as you would get the Forth interactive development environment. Why are you targeting the 16-bit x86? Did you buy a computer at the Salvation Army for $5 and decided to write an OS for it? |
|||
12 Jan 2012, 01:50 |
|
Picnic 08 Aug 2012, 09:14
Here's another small 8086 Assembler which i discovered by chance, written in C by Dave Dunfield, about 1400 lines.
MICRO 8086 ASSEMBLER |
|||
08 Aug 2012, 09:14 |
|
ASM-Man 18 Jan 2013, 03:47
There is too the as86(can run even on Linux) and M80(by Microsoft) . But both (until I know) it is'nt free. Some older OS such as CP/M provide an assembler for 8086. Also,I'm not sure,but I think that the BCC(Bruce's C Compiler) can act as an assembler too.
|
|||
18 Jan 2013, 03:47 |
|
JohnFound 18 Jan 2013, 05:30
bitshifter, IMHO, if you want to write OS, you must concentrate on the OS, not on the assembler. You can simply port FASM for your OS and to have very powerful assembler with only 2..3 days coding. Then you will be free to create your fine OS and you will have decent assembler from the day one.
|
|||
18 Jan 2013, 05:30 |
|
sid123 17 Nov 2013, 06:38
http://posx86.codeplex.com/SourceControl/latest#programs/pasm.asm
Checkout PASM. Its for my OS. 16 bit 8086 Assembler for Posx86 _________________ "Those who can make you believe in absurdities can make you commit atrocities" -- Voltaire https://github.com/Benderx2/R3X XD |
|||
17 Nov 2013, 06:38 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.