flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
DC740 07 Aug 2005, 03:15
i know i forgot to put mov eax,4 before calling the int 0x40 but i put it and it still doesn't work
|
|||
![]() |
|
DC740 07 Aug 2005, 18:44
now is working thanx anyway.. this is the finished code
; WINDOW - Draw window ; (real syntax) window xstart,xsize,ystart,ysize,color,Caption ; (SAMPLE) WINDOW 10,10,640+8,480+24,window_Skinned,WindowCaption macro window arg1,arg2,arg3,arg4,arg5,arg6 { ; mov ebx,arg1*65536+arg2 ; mov ecx,arg3*65536+arg4 words2reg ebx,arg1,arg2 words2reg ecx,arg3,arg4 mov edx,arg5 mov eax,0 int 0x40 ;now search for the end of the string and later put the caption mov eax,4 xor esi,esi ;set esi to 0 mov ebx,arg6 ;copy caption to ebx @@: cmp byte [ebx],0 ;compare if current char is 0 je @f ;if equal then goto forward inc esi ;not equal so inc esi and ebx inc ebx jmp @b ;keep with the loop until 0 is found @@: cmp byte [esi],0 ;if textlenght=0 then goto next je @f words2reg ebx,8,8 ;x and y ;mov ebx,8*65536+8 mov ecx,0xffffff ;color mov edx,arg6 ;text ;esi = textlenght int 0x40 @@: ;end } |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.