flat assembler
Message board for the users of flat assembler.
![]() Goto page 1, 2, 3, 4 Next |
Author |
|
vid 11 Mar 2007, 23:38
1. you wouldn't be able to make it really portable and still remaining 1:1
2. nobody would use it sorry... ![]() |
|||
![]() |
|
hckr83 11 Mar 2007, 23:53
#2 is inherit with every new idea..
1. It's not intended to be 1:1, it's like a high level assembly kindof |
|||
![]() |
|
Dex4u 11 Mar 2007, 23:58
What if you do something like chip8, With a sub set of x86.
I am code one for DexOS. some links http://en.wikipedia.org/wiki/CHIP-8 http://members.aol.com/autismuk/chip8/chip8def.htm http://www.pong-story.com/chip8/ http://newsdee.com/flip8/ The chip8 as never been a real chip, but it runs on nearly all processor, i was thinking of design our own. |
|||
![]() |
|
zir_blazer 12 Mar 2007, 06:13
Impossible to do directly on Assembler, because it is architecture specific. It will pretty much evolve on a high level language like C whose code may be compiled and run on different architectures, for as long as the code uses functions supported by all the architecture specific libraries.
|
|||
![]() |
|
MazeGen 12 Mar 2007, 08:43
It reminds me my idea of "Portable Flat Syntax" - a syntax that allows your asm code to compile to both x86-32 and x86-64. I was seriously thinking about it, but never realized it. It would be doable under some limitations. It would be done using macros - I didn't want to make whole new assembler. (I'm masmer, but FASM macro language should be strong enough to realize it as well).
|
|||
![]() |
|
zir_blazer 12 Mar 2007, 18:00
x86 and x86-64 aren't THAT different, that is why it is somewhat possible. But try doing so with ASM and x86/x86-64...
|
|||
![]() |
|
hckr83 22 Mar 2007, 01:12
thinking about it...I could maybe do this through the FASM macro stuff...if fasm macro's can override actual opcodes, then wouldn't you be able to do something like that?
|
|||
![]() |
|
vid 22 Mar 2007, 01:47
first of all, it's a stupid idea
|
|||
![]() |
|
hckr83 22 Mar 2007, 03:56
[ Post removed by author. ]
|
|||
![]() |
|
Madis731 22 Mar 2007, 11:30
Why did you say endianness was a big problem? We have BSWAP on Intel/AMD arch. And actually QWORD on 32-bit means EDX:EAX as defined by (I)DIV/(I)MUL...
|
|||
![]() |
|
MazeGen 22 Mar 2007, 12:44
It is not a question of stupidity, rather a question of hckr83's free time. Don't hesitate to try it, you'll probably never finish it, but you'll learn a lot.
|
|||
![]() |
|
hckr83 22 Mar 2007, 13:28
Quote: Why did you say endianness was a big problem? We have BSWAP on Intel/AMD arch. And actually QWORD on 32-bit means EDX:EAX as defined by (I)DIV/(I)MUL... oh..didn't really think of those... not as big of a problem then,,, |
|||
![]() |
|
f0dder 22 Mar 2007, 14:36
It's silly - portable assembly is called C
![]() For a "portable assembly", you're going to limit yourself to a pretty small subset of instructions, you won't be able to code "naturally" for a CPU (dst,op1,op2 vs dst/op1, op2), et cetera. You'll lose the advantages assembly has, without really gaining anything. |
|||
![]() |
|
Madis731 22 Mar 2007, 21:57
Stupid or not, we'll see if it will be more portable than ASM and faster than C. Something in the middle
![]() We even tried to make SQL in ASM as far as I remember...so... |
|||
![]() |
|
hckr83 22 Mar 2007, 22:25
one good thing is that all of you ASM only programmers will be able to be able to step in and almost instantly know how to write most code..
|
|||
![]() |
|
f0dder 22 Mar 2007, 22:49
Madis731 wrote: Stupid or not, we'll see if it will be more portable than ASM and faster than C. Something in the middle There's a good chance that it'd actually be slower than C, since you're limiting yourself to a lowest common denominator instruction set, and code without specific knowledge of your platform. It's a funny idea, but pretty worthless for real stuff. _________________ carpe noctem |
|||
![]() |
|
Madis731 23 Mar 2007, 09:28
Isnt is what C actually does ^o) - common denominator between instruction sets. If you say i++, it makes the variable bigger +1 on any touring-complete architecture. No matter what, it finds the way - even if instruction set only has XOR/AND instructions
![]() |
|||
![]() |
|
f0dder 23 Mar 2007, 09:46
The thing with C is that it has a slightly higher abstraction level than assembly, and a compiler is free to choose the machine instructions it wants. While this isn't always as optimal as hand-coded machine-specific assembly, there's a good chance that the architecture knowledge built into a compiler will be better than a lowest-common-denominator "architecture".
The "portable assembly" thing won't know of things like LEA tricks instead of multiplication, won't know if "inc x" is faster than "add x, 1" et cetera... and if you start building such knowledge into the project, you just end up with a less capable and less portable C. |
|||
![]() |
|
vid 23 Mar 2007, 11:21
i second that
|
|||
![]() |
|
Goto page 1, 2, 3, 4 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.