flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
LocoDelAssembly 23 Dec 2009, 01:18
In other words, you need to "execute" FPU instructions at compile time? If not you should, that is a very good idea
![]() |
|||
![]() |
|
Azu 23 Dec 2009, 01:29
LocoDelAssembly wrote: In other words, you need to "execute" FPU instructions at compile time? If not you should, that is a very good idea ![]() |
|||
![]() |
|
Borsuc 23 Dec 2009, 16:22
Well that's pretty unlikely to be possible in any assembler, FASM included. Also FASM floating point constants capability is limited.
|
|||
![]() |
|
LocoDelAssembly 23 Dec 2009, 16:57
Borsuc, but the interpreter layer language is powerful enough to implement a processor, and although it doesn't support floating point operations, you could still implement them in the same way FPU emulators did at the time where the FPU unit was not guaranteed to be present.
|
|||
![]() |
|
Tomasz Grysztar 23 Dec 2009, 18:45
Quite a few years ago (about the time of fasm 1.3x, I think) I was trying to design some kind of "plugin" functionality that would allow you to write a kind of macros for assembly layer using the x86 assembly as well (since fasm itself cannot be ported to other architecture than x86, that wouldn't be any problem to execute such code). However I gave up because of the security problems that would arise from such feature.
|
|||
![]() |
|
LocoDelAssembly 23 Dec 2009, 19:22
Oh damn, I forgot a very important instruction that would be hard to emulate (if not completely impossible), JMP/Jxx... But well, you could still use if, repeat, while from fasm and put inside of the control structures bodies the non-branching emulated instructions.
Here a very simple instruction to emulate: Code: ; Some code to init the pseudo-registers macro em_bswap reg { virtual ; Test the instruction is valid bswap reg end virtual @#reg = @#reg shl 24 + (@#reg shl 8) and $FF0000 + @#reg shr 24 + (@#reg shr 8) and $FF00 } |
|||
![]() |
|
baldr 23 Dec 2009, 19:45
Tomasz Grysztar,
May be some kind of *nix backtick functionality? I.e. replace `expr round(2*$pi*$r)` with output of that command (pi and r replaced with actual values). Separate process, almost safe bet. |
|||
![]() |
|
LocoDelAssembly 23 Dec 2009, 19:54
Like `del c:\boot.ini`?
![]() |
|||
![]() |
|
Azu 23 Dec 2009, 21:35
I didn't know *nix had c: or boot.ini.
|
|||
![]() |
|
LocoDelAssembly 23 Dec 2009, 21:43
Quote:
Me neither, where you take that from? |
|||
![]() |
|
Azu 23 Dec 2009, 21:45
![]() LocoDelAssembly wrote: Like `del c:\boot.ini`? |
|||
![]() |
|
LocoDelAssembly 23 Dec 2009, 21:50
Yep, you misunderstood your source.
|
|||
![]() |
|
Azu 23 Dec 2009, 21:54
I thought it meant delete the file called "boot.ini" in the "c:\" directory.
What did it really mean? ![]() |
|||
![]() |
|
LocoDelAssembly 23 Dec 2009, 22:15
Yes, I meant that, using FASM under Windows, obviously. (The computer won't explode for using a feature borrowed from Unix, I can even use it right now by using bash for Windows)
|
|||
![]() |
|
Azu 23 Dec 2009, 22:17
LocoDelAssembly wrote: Yes, I meant that, using FASM under Windows, obviously. (The computer won't explode for using a feature borrowed from Unix, I can even use it right now by using bash for Windows) ![]() |
|||
![]() |
|
Borsuc 23 Dec 2009, 23:39
You could still, you know, delete the source code if not just boot.ini (which is easily replaced), and all your work goes to trash.
![]() |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.