Re: Problem with hla



På Thu, 09 Aug 2007 01:40:50 +0100, skrev Rafael Anschau <rafael.anschau@xxxxxxxxx>:

"At least you looked at it. Did
you get anything at all out of it, do you think?"

I was impressed by the quickness of the disassembly feature.
I was impressed by the goal to make the "equivalent of delphi" for
asm.

I enjoyed playing with the debugger. I already knew few of the first
instructions(nop for instance),
so not a lot of new stuff there. I guess what I will really remember
from it is that "asm programs begin
on main" much like C. I got confused when having to press f5,f6,f7
while reading
the tutorial and eventualy those keys started to behave as though I
was pressing enter
and the text where the coments were began to get identations, instead
of the
debuger functinality being fired.

I would rather have a tuturial in say pdf, and then coding on another
envirment. Having to learn *the* IDE, from the ide, and the language
at the same time was quite heavy for me.
(I could have learned the ide first, but I have been learning so many
ides lately, that I wasn´t in the mood for it).

I guess when I start getting serious about rosasm I will master the
ide first.
Right now I just wanna learn the language, and have something
producing nice
.exes out of it. I don´t mind writting it on notepad...

The smallest program that will compile and run in rosasm is

_______________________________________________;F8 ;)
main:

; .....your experiments here

push 0
call 'kernel32.ExitProcess'
_______________________________________________

If you paste this code inside a "file/new/empty" template, it will compile and run at once.

way to experiement with other instructions.


....

If you have previous experience with C under windows, I recommend the RosAsm versions of the Izcellion tuts, for reading. That will in a few hours give you a full glimse at how easy asm under windows really is.

basically what you need to know about asm under windows, is that most functions returns values in eax. Then, also many return them in pointers to structures.

example:

[WindowHandle: ? ;one DWORD
MyDC: ? ] ;another one

;the data above is roughly equivalent to Delphi:
; var WindowHandle, MyDC : THandle; //where Thandle = longint = dword = 32bit

;asm code:

call 'user32.GetDC' D$WindowHandle
;now eax will cointain a handle of the HDC
;so you may save it:

mov D$MyDC eax

; **************** another that returns in pointer

[PointerToRectangleStructure: ? ? ? ?]
; this is 4 DWORD, or 16 bytes, one dword each for (left, top right, bottom)

call 'user32.GetClientRect' D$WindowHandle PointerToRectangleStructure

(notis that when passing a pointer, you do not need the D$
also, you do not need , (comma) for seperating parameters, but they are optional there. They are used as line continuation chars. read BU_ASM)

Else, you need to know that esi, edi, and ebx are preserved across all win32 API calls, and that the other registers are usually not.

programming the "lowlevel" win32 api, in RosAsm differs from Delphi only in that in Delphi you would write :

GetWindowRect( WindowHandle, MyRect );

(you can create macros for rosasm to make them more similar)

etc etc etc ... until death







.



Relevant Pages

  • Re: Hey Mr. Hyde!
    ... > so teaching ASM should start with a minimum HW-level rather ... often enough to realise that Randy is NOT to blame at all... ... "Windows programming" stuff goes into using the Win32 API directly (so ...
    (alt.lang.asm)
  • Re: Cloning
    ... able to recognize the other IDE and was able to transfer data. ... I don't have to do any updating 2010 when the new windows OS will ... I have a 40 gig disk where my XP Pro is lying ... Windows does not have any inbuilt tools for cloning. ...
    (microsoft.public.windowsxp.general)
  • Re: Help, help, help, more help, extra help, HELP! how to turn off IDE DMA...
    ... Windows CE at all, or Windows CE doesn't start, failing somewhere after it's ... What we've found is that with modern flash cards, CE doesn't boot. ... I want to do is turn IDE DMA off in the registry. ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Momentary black screen when program launches
    ... lets say the compiler takes 5 seconds to compile my source. ... seconds is up then I can get back to the Windows desktop and I will see an ... spawned by another program (IDE, Explorer, etc.) ... The Help and Support newsgroup is *terribly* named, ...
    (microsoft.public.windowsxp.general)
  • Re: Additional hard drive takes disk 0 position
    ... They are attached to the 2 IDE channels, prim and sec, on the motherboard. ... So drivers is not the cause. ... And I know it does not affect windows, ... it this way drives me crazy! ...
    (microsoft.public.windowsxp.hardware)