flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
vid 17 Mar 2009, 10:44
Quote: How should we implement these in an assembler? Should we use only the part inside brackets? when writing about these instructions, people usually use just "senter" etc. so yeah. Quote: BTW, is there any example of assembler code which uses these instructions? BluePill2 source. But I am not sure whether s/he DB-ed opcodes or used assembler syntax. |
|||
![]() |
|
HyperVista 17 Mar 2009, 11:26
vid wrote: But I am not sure whether s/he .... |
|||
![]() |
|
MazeGen 17 Mar 2009, 11:55
Couldn't find them in the sources.
Now I wonder what is Tomasz's prefered syntax ![]() |
|||
![]() |
|
DJ Mauretto 17 Mar 2009, 12:51
This instructions have the same opcode OF 37 ,
change only the EAX value( plus EBX ECX parameters) ,like CPUID my favorite way is this: Code: xor eax,eax ; Get Capabilities xor ebx,ebx ; Index 0 Getsec ; 0F37 mov eax,2 ; ENTERACCS mov ebx,Physical_Address mov ecx,Code_Size Getsec ; 0F37 ; and so on I like number ,but i think that many people prefer mnemonic ![]() _________________ Nil Volentibus Arduum ![]() |
|||
![]() |
|
comrade 17 Mar 2009, 13:45
Did a woman design this syntax?
![]() |
|||
![]() |
|
vid 17 Mar 2009, 13:49
My bad, it's not in bluepill, I have mistaken what SMX is
![]() |
|||
![]() |
|
Tomasz Grysztar 17 Mar 2009, 19:26
MazeGen wrote: Now I wonder what is Tomasz's prefered syntax ![]() And that weird syntax clearly calls for macro: ![]() Code: macro getsec op { match [=capabilities],op \{ xor eax,eax \} match [=enteraccs],op \{ mov eax,2 \} match [=exitac],op \{ mov eax,3 \} match [=senter],op \{ mov eax,4 \} match [=sexit],op \{ mov eax,5 \} match [=parameters],op \{ mov eax,6 \} match [=smcrtl],op \{ mov eax,7 \} match [=wakeup],op \{ mov eax,8 \} getsec } getsec[capabilities] |
|||
![]() |
|
HyperVista 17 Mar 2009, 22:08
vid wrote: My bad, it's not in bluepill, I have mistaken what SMX is It's easy to mistake VMX for SMX (only 0x03 difference between the two) ![]() |
|||
![]() |
|
MazeGen 18 Mar 2009, 07:44
Tomasz Grysztar wrote: DJ Mauretto has already shown the syntax that fasm uses. Doh, didn't realized that fasm supports GETSEC already. And looking into NASM manual, it supports only GETSEC as well. |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.