View Single Post
  #33  
Old September 23rd 18, 09:32 PM posted to alt.msdos.batch,alt.windows7.general
Kerr-Mudd,John
external usenet poster
 
Posts: 19
Default how to get the title into task manger 'window'?

On Sun, 23 Sep 2018 16:20:00 GMT, Brian Gregory
wrote:

On 20/09/2018 20:58, Herbert Kleebauer wrote:
winmain::

Â*Â*Â*Â*Â*Â*Â* jsr.lÂ*Â* (GetCommandLine)
Â*Â*Â*Â*Â*Â*Â*Â*Â*Â*Â*Â*Â*Â*Â*Â*Â*Â*Â*Â*Â*Â*Â*Â*Â* Â*Â*Â*Â*Â*Â* ;
skip program name Â*Â*Â*Â*Â*Â*Â* eor.lÂ*Â* r1,r1Â*Â*Â*Â*Â*Â*Â*Â*Â*Â*
; not within "" flag Â*Â*Â*Â*Â*Â*Â* dec.lÂ*Â* r0
_20:Â*Â*Â* inc.lÂ*Â* r0
Â*Â*Â*Â*Â*Â*Â* cmp.bÂ*Â* #0,(r0)
Â*Â*Â*Â*Â*Â*Â* beq.bÂ*Â* _10
Â*Â*Â*Â*Â*Â*Â* cmp.bÂ*Â* #'"',(r0)
Â*Â*Â*Â*Â*Â*Â* bne.bÂ*Â* _30
Â*Â*Â*Â*Â*Â*Â* not.lÂ*Â* r1
_30:Â*Â*Â* or.lÂ*Â*Â* r1,r1
Â*Â*Â*Â*Â*Â*Â* bne.bÂ*Â* _20
Â*Â*Â*Â*Â*Â*Â* cmp.bÂ*Â* #' ',(r0)
Â*Â*Â*Â*Â*Â*Â* bne.bÂ*Â* _20
Â*Â*Â*Â*Â*Â*Â* inc.lÂ*Â* r0

_10:Â*Â*Â* move.lÂ* r0,-(sp)
Â*Â*Â*Â*Â*Â*Â* jsr.lÂ*Â* (GetConsoleWindow)
Â*Â*Â*Â*Â*Â*Â* move.lÂ* r0,-(sp)
Â*Â*Â*Â*Â*Â*Â* jsr.lÂ*Â* (SetWindowTextA)
Â*Â*Â*Â*Â*Â*Â* moveq.l #0,-(sp)
Â*Â*Â*Â*Â*Â*Â* jsr.lÂ*Â* (ExitProcess)Â*Â* ; exit program


Is that really what Intel assembler looks like nowadays?

Looks more like Motorola 68000 assembler to me.


Not quite, with those Â's in it!
Herbert prefers Motorola syntax.

But it's not complicated; this is what I think it'd be in nasm format:

xor bx,bx ;instr flag =false
dec si
_20:
inc si
cmp byte [si],0
jz _10
cmp byte [si],'"'
jne _30
not bx ; flag as instr
_30:
or bx,bx
jne _20
cmp byte [si],' '
jne _20
inc si
_10:

I'd make the first one a 'lodsb', then test al.
so
mov ah,0 ; quoted str flag off
nextc:
lodsb
cmp al,0
je havestr
cmp al,'"'
jne notaquote
mov ah,1
notaquote:
cmp ah,1
jne nextc
cmp al,0x20 ; space
jne nextc
inc si ; skip it
havestr:


--
Bah, and indeed, Humbug.
Ads