flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
asmcoder
[content deleted]
Last edited by asmcoder on 14 Aug 2009, 14:53; edited 1 time in total |
|||
![]() |
|
vid
well, the directive *was* really smart indeed, to solve many issues with single directive...
|
|||
![]() |
|
ouadji
Yes ... only syntax, it's true !
But, it's impossible to do with many other assembler. Place a structure in the code, or relating to an address in the kernel ... imposible with MASM. This directive "Virtual" is really specific Fasm and allows great flexibility. (sorry for my English, I'm French) |
|||
![]() |
|
Japheth
ouadji wrote: Yes ... only syntax, it's true ! Nonsense! Here's one variant how this could be done in Masm syntax: Code: INFOuP struct Flop dd ? Glop dd ? INFOuP ends ... mov eax , [Boum.Glop] <---- !!! = mov eax , dword [offset TOTO + 4] ... main proc code Boum label INFOuP TOTO: cmp edx , .... code main endp |
|||
![]() |
|
revolution
I think the main advantage of virtual is in combination with load and store.
|
|||
![]() |
|
ouadji
ok
![]() but ... Code: virtual at FFDFF040h
virtual at ebx + eax with Masm ? |
|||
![]() |
|
asmcoder
[content deleted]
Last edited by asmcoder on 14 Aug 2009, 14:53; edited 1 time in total |
|||
![]() |
|
bitRAKE
As others have said, virtual solves many problems with one keyword. MASM has assume and label to solve some of those problems, but cannot make decisions at assemble-time based on opcode generation, and code length decisions are limited and cumbersome.
|
|||
![]() |
|
Japheth
ouadji wrote:
I'm unsure what you want to achieve. Perhaps Code: .386 .model flat s1 struct org 0ffdff040h v1 dd ? v2 dd ? s1 ends .code mov eax, ds:[s1.v1] end should be somewhat similar to "virtual at 0ffdff040h". However, it won't be easy for Masm to emulate virtual in conjunction with load. |
|||
![]() |
|
MazeGen
Japheth wrote: However, it won't be easy for Masm to emulate virtual in conjunction with load. Hello Japheth, I thought there is no way in MASM to load anything at assemble-time. Can you give me an advice? |
|||
![]() |
|
baldr
What about named addressing spaces and scope operator? No more single-byte load/store…
![]() Japheth, virtual at m32 is unbeatable. ![]() _________________ "Don't belong. Never join. Think for yourself. Peace." – Victor Stone. |
|||
![]() |
|
Japheth
Hi MazeGen,
MazeGen wrote:
Yes, for Masm the code buffer is "write-only", the <load> directive is probably a unique Fasm feature. Tastes a bit "hackish", though, but that might be because I'm biased... |
|||
![]() |
|
DOS386
> the <load> directive is probably a unique Fasm feature.
I love it ![]() |
|||
![]() |
|
bitRAKE
Japheth wrote: the <load> directive is probably a unique Fasm feature. Tastes a bit "hackish", though |
|||
![]() |
|
Japheth
DOS386 wrote: > the <load> directive is probably a unique Fasm feature. Congratulations! But may be you should consider to cool down your emotion a bit. Love makes blind, and you will need sharp eyes to find a useful application for this feature ... ![]() |
|||
![]() |
|
baldr
bitRAKE,
Injecting code in fasm? This feature could be useful, but it will add another easy way to screw up… Debugging macros is already hard enough. ![]() _________________ "Don't belong. Never join. Think for yourself. Peace." – Victor Stone. |
|||
![]() |
|
bitRAKE
baldr, nah - it'd be easy - just use the same debugging method used on other code. Deciding what and how to expose the internals would be the real challenge. Well, there is the whole security problem, but let us assume we all have the best intentions (trust must begin somewhere).
|
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.