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?
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?
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.
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.
1. No, but it looks cool though. Ooooo HEX
2. No
3.
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.
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!!!
2. No
3.
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
...
in MASM
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!!!
Thank you both very much :)
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.
Regards,
hutch@movsd.com
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.
Regards,
hutch@movsd.com
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.
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.
Regards,
hutch@movsd.com
Just the normal caution required to keep the place squeeky clean and legal.
Regards,
hutch@movsd.com
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).
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.
Regards,
hutch@movsd.com
Regards,
hutch@movsd.com
On 9x you can use DPMI services to call just about any dos interrupt.
The trick is to know what you're doing ;)
The trick is to know what you're doing ;)
DPMI, yawn. :tongue:
Regards,
hutch@movsd.com
PS : I think it can be useful in benchmarking to avoid ring3 problems in Windows.
Regards,
hutch@movsd.com
PS : I think it can be useful in benchmarking to avoid ring3 problems in Windows.
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)
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.