Archive for May 15th, 2007

Assembly for fun!

Tuesday, May 15th, 2007

Assembly 8086

Here is the example of the program that use ASSEM.OBJ
The name of this file is firstasm.asm
extrn HAI_WELCOME_TO_WWW_DEDESLIB_COM:Far,DS_STOP:Far
.MODEL SMALL
.STACK
.DATA
hello db “\@12,05\x20,03S\@14,10\&0BHello World”,0
.CODE
Start:
mov ax,@data
mov ds,ax
lea dx,hello
call HAI_WELCOME_TO_WWW_DEDESLIB_COM
mov AH,00
int 16h
call DS_STOP
END Start

Here is the output:

How to compile
TASM yourfilename
It will create object file.
Link file with ASSEM.OBJ
TLINK yourfilename+ASSEM yourfilename
It will create yourfilename.EXE

Note:
I use:
Turbo Assembler Version 2.0 Copyright (c) 1988, 1990 Borland International
Turbo Link Version 3.0 Copyright (c) 1987, 1990 Borland International
I never do experiment with other compiler and linker that I mentioned above.
You may download if you want to try this simple library.