flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
DOS386 27 Nov 2009, 07:07
Note: this is deliberately posted in Main since related to both DOS and Win32.
Note to Edfed & Co : this doesn't work in Windaube 98 & Co (see shot below) ![]() Code: pope eax ; Our silly "PO-inter" | Now stack is neutral pushd 0 ; Reserved UINT32 for output mov ecx, esp ; Now points to the reserved UINT32 push ecx ; Output: number of args captured Download now (37 KiB) : id=4673 ![]() Purposes of the thing: - PE brewing example - Win32 console example - GetCommandlineAW & CommandLineToArgvW usage example - Preparing future CommandLineToArgvW implementation in DOS ![]() UPDATED 2013-Apr-10 Last edited by DOS386 on 10 Apr 2013, 13:12; edited 3 times in total |
|||
![]() |
|
DOS386 30 Nov 2009, 06:40
![]() 2 more shots are available exclusively inside the archive ![]() |
|||
![]() |
|
Borsuc 30 Nov 2009, 19:43
pope?
![]() _________________ Previously known as The_Grey_Beast |
|||
![]() |
|
f0dder 30 Nov 2009, 21:26
Ugh. My eyes are bleeding after looking at that code.
|
|||
![]() |
|
vid 30 Nov 2009, 21:53
Yeah. Looks so... custom. What's wrong with printf again?
|
|||
![]() |
|
Borsuc 01 Dec 2009, 03:47
Code isn't that bad, but I still don't get what's with the pope
![]() _________________ Previously known as The_Grey_Beast |
|||
![]() |
|
DOS386 01 Dec 2009, 14:05
> What's wrong with printf again?
Instead of what instruction ? |
|||
![]() |
|
DOS386 10 Apr 2013, 13:15
![]() UPDATED - added PString example as competition against CommandLineToArgvW ![]() Code: ; We can try to copy it (may be terminated by space or ZERO !!!) mov ch, 0 ; Single arg size arg_copy_loop: cmp ch, ccsngarglim ; Check single arg size limit jae short parse_abort ; Bad luck Please download it again (the old files are still in and unchanged) http://board.flatassembler.net/download.php?id=4673 |
|||
![]() |
|
baldr 10 Apr 2013, 22:32
DOS386,
If CommandLineToArgvW() is stdcall (as it looks like), mov ecx, esp / push ecx can be replaced with simple push esp, isn't it? |
|||
![]() |
|
KevinN 11 Apr 2013, 00:36
cool
|
|||
![]() |
|
DOS386 13 Apr 2013, 06:58
> If CommandLineToArgvW() is stdcall (as it looks like),
> mov ecx, esp / push ecx can be replaced with simple push esp Maybe true ... maybe PUSH ESP was dangerous ... or did this problem exist on 8086 with PUSH SP only ? BTW, was anyone (Revolution ?) able to "break" my "TESTCMPS.EXE" - make it crash or produce garbage or corrupt memory ? |
|||
![]() |
|
revolution 13 Apr 2013, 11:34
DOS386 wrote: BTW, was anyone (Revolution ?) able to "break" my "TESTCMPS.EXE" - make it crash or produce garbage or corrupt memory ? |
|||
![]() |
|
DOS386 15 Apr 2013, 13:55
> Are you referring to the fact that push (e)sp works
> differently on >=386 than on 8086 YES. The idea of "PUSH SP" or ESP or RSP or ISP (Insane Stack Pointer - 1024 bits wide on XXXX1024 CPU's available soon) is somewhat strange to me, but there apparently exists at least one piece of code that can use it ![]() > but if it runs under DOS then I won't be able to test it It runs also in DOS. |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.