Log in

View Full Version : Need help, asm


ON'error
December 3rd, 2001, 16:10
.MODEL TINY
.CODE

ORG 100h
PrgAnfang: jmp Ausgabe

HALLO: db 'Danke für eure Hilfe!'
db 0dh, 0ah, '$'

Ausgabe: mov bx, cs
mov ds, bx
mov dx, OFFSET HALLO
mov ah, 09h
int 21h
mov al, 00
mov ah, 4Ch
int 21h
END PrgAnfang

hi, can someone tell me how to compile and link this code with
tasm or masm? i dont know which parameters i should use.
thanks anyway

Aimless
December 4th, 2001, 06:15
Maybe reading the manuals...?

matthew
December 8th, 2001, 17:02
I don't know if that will work with masm, but once you've got your code written properly... compile like so:

ml /c /coff proggy.asm
link /subsystem:windows proggy.obj

dunno if subsystem windows will work for whatever you are doing.

btw, use MASM.. its far superior to TASM.. and the reason most peeps in the cracking/virus-writing communities use it is for nostalgia. free tasm is so damn old better off to use the new masm and the win32 api.

http://win32asm.cjb.net

DakienDX
December 9th, 2001, 08:59
Quote:
Originally posted by matthew
ml /c /coff proggy.asm
link /subsystem:windows proggy.obj

[...]

btw, use MASM.. its far superior to TASM..


The code ON'error posted is plain DOS ASM. So you can forget about '/coff' and '/subsystem:windows'. If you want to do anything for DOS in MASM you need MASM for DOS, which is not included in MASMv6/MASMv7 from win32asm.cjb.net and not available freely. (you can have it for $19.99 from Microsoft if you're a registered user of VC++)

Yes, read the manuals. This is about reversing, not compiling.

MASM is only better in two categories over TASM.
Have you ever tried to write a VxD with TASM?
TASM takes members of 'Struct' as global if they don't start with '@@'

TASM has a MASM compatible mode, MASM is incompatible with TASM source.

CrackZ
December 9th, 2001, 12:20
I used TASM.

tasm filename.asm
tlink /3 /t filename

Generated a .com without any problems and works as expected when you run it.

Regards

CrackZ.

DakienDX
December 9th, 2001, 12:37
Here're my config files:

[TASM.CFG]
-iC:\TASM\INCLUDE
-m
-ml
-q
-zn

[TLINK.CFG]
-LC:\TASM\LIB
-3
-c
-C
-d
-x
-yx+

[TLINK32.CFG]
-LC:\TASM\LIB
-c
-x
-V4.0

This files must be located in the TASM\BIN folder. I'd never had any problems with them.

".MODEL" and ".CODE" are from MASM, in TASM it's called "Model" and "CodeSeg". This shows again that TASM is compatible and MASM not.

B-Boy
December 9th, 2001, 18:04
Quote:
Originally posted by DakienDX

MASM is only better in two categories over TASM.
Have you ever tried to write a VxD with TASM?
TASM takes members of 'Struct' as global if they don't start with '@@'



in ideal mode, tasm can handle several structures with different member variables of the same name.

bye
B-Boy

DakienDX
December 10th, 2001, 12:28
Quote:
Originally posted by B-Boy
in ideal mode, tasm can handle several structures with different member variables of the same name.


Yes, but in Ideal mode TASM isn't MASM compatible any more. Because all WINDOWS.INC files use "xyz Struc", the Ideal mode isn't so good for this since it requires "Struc xyz".