Ok i've been using masm for quite some time and i have these questions i still dont know the answer to...

1) Is it better to use the number in hex or decimal like invoke ExitProcess, 0 or invoke ExitProcess, 0h or does it make a difference?

2) Is it possible to use dos interrupts in win32 programs like mov ah, 00h then int 21h

3) How do i create a window without having it in the taskbar? I removed the WS_SYSMENU, but its still there just without the menu.

4) What is tasm's ideal mode?

5) What is better to use? tasm or masm? what has better filesize/speed?
Posted on 2002-02-17 15:40:31 by m00p
1. No difference

2. No

3. Popup, IIRC.

4. Doesn't relate to MASM - it's for TASM. ;)

5. Choose assembler based on your style. Based on your code.
Posted on 2002-02-17 16:05:46 by bitRAKE
1. No, but it looks cool though. Ooooo HEX
2. No

a.If you're using a resource file, specify WS_EX_TOOLWINDOW on the style options.
b.Without a resource file, specify WS_EX_TOOLWINDOW on extended window style

4. TASM's ideal mode is somewhat an addition to TASM for stricter coding. E.G.

Value EQU 10

dataseg ;.data
MyValue DD 5

codeseg ;.code
mov eax, MyValue ; Error
mov eax, [MyValue] ;Correct

mov eax, Value ;Correct
mov eax, [Value] ;Error

mov eax, MyValue ;Correct
mov eax, [MyValue] ;Correct

mov eax, Value ;Correct
mov eax, [Value] ; Correct

for the first two lines of code in the code segment: TASM will flag an error for the first one since it doesn't see MyValue as an equate, it expects any memory address to be used with brackets. And no brackets when using equates. Actually this feature isn't much of an advantage, it's just there for stricter coding, nice looking code, easy to differentiate a memory address(variable) from an equate(This one will help you in the long run, but not that much)...It depends solely on the programmer, if the programmer mistook the Value as an address in memory that's the programmer's problem not the assembler. There are still a lot in store in TASM's IDEAL mode, I just pointed out the simpler ones.

4. Though, I'm a TASM advocate, I have to go with MASM for windows programming, lots of support for MMX, SSE, SSE2, K3D and still continues to be upgraded and supported by MS.

Size: MASM wins, hands down
Speed: TASM compiles faster than MASM(Great for large projects) but I have no idea regarding the binaries(EXE, DLL's...)

Take a look at the game RE by BogdanOntanu.

Happy Coding!!!
Posted on 2002-02-17 16:56:05 by stryker
Thank you both very much :)
Posted on 2002-02-17 17:29:52 by m00p

1. Only if you are a processor. :) Normal decimal is more intuitive in most instances, you use HEX where it has some advantage.

2. No, DOS 16 bit interrupts cannot be used in win32 as they only work in REAL mode memory. Win32 works in protected mode memory.

3. Generally with some difficulty, this request is usually made by people who want to hide something like a trojan or kb monitor etc ...

4. Who cares. :)

5. MASM builds smaller than TASM, speed depends almost exclusively on your code design.


Posted on 2002-02-17 17:39:55 by hutch--
hutch i think your number 3 was uncalled for. lets not make an assumption like that when the info such as what umberg6007 supplied is actually documented in the msdn. it actually has it uses.
Posted on 2002-02-17 17:59:48 by smurf
Sorry smurf but we have to be careful here, someone doing documented legal things will have no problem with it but there have been enough questions about hiding running processes for illegal purposes.

Just the normal caution required to keep the place squeeky clean and legal.


Posted on 2002-02-17 18:17:22 by hutch--

2) Is it possible to use dos interrupts in win32 programs like mov ah, 00h then int 21h

Yes, it is possible in Win9x, though it is useless (BTW, it is impossible with WinNT, 2K, XP).
Posted on 2002-02-18 02:34:59 by masquer
masquer is right about early version of win95 being able to handle some of the old DOS interrupts but it really messed up badly with others. If you want a fast crash in win9*, try using int 10h calls in protected mode. From memory you could use port interrogation code but little else.


Posted on 2002-02-18 06:32:42 by hutch--
On 9x you can use DPMI services to call just about any dos interrupt.
The trick is to know what you're doing ;)
Posted on 2002-02-18 06:46:18 by f0dder
DPMI, yawn. :tongue:



PS : I think it can be useful in benchmarking to avoid ring3 problems in Windows.
Posted on 2002-02-18 07:21:05 by hutch--
AFAIK, in the Win9x every process address space begining with 1Kb interrupt table (virtual of course). I.e. our base address is cs:00400000, in the cs:0 - interrupt table. Sure, not every interrupt will work, but some do. At least, I be able to use SoftIce backdoor interrupts in Win9x (in NT,... - not)
Posted on 2002-02-18 07:46:22 by masquer
3) no no, I wasnt asking the hiding process & its not a trojan, i just had a splash screen and i didnt like having the Loading... in the taskbar.
Posted on 2002-02-18 14:09:40 by m00p