Intro¶
We are using ‘Assembly Language’, which is a lower level language compared to C, C++, Java, Python, etc…
It uses an assembler to convert the code into machine language the processor can understand. (high level languages use compiler/interpreter).
Installation¶
Windows¶
MacOS¶
- Install
dosbox
- https://www.dosbox.com/download.php?main=1
- Copy
8086
files toahmedthahir/dosbox
; basically the root folder (next to Desktop, Documents, etc) - https://www.mediafire.com/file/mm7cjztce9efj4w/8086.zip/file
- open
dosbox
mount c ~/dosbox/8086
c:
Basics¶
Skeleton Program¶
.model small
.stack 20
.data
org 1000h
num1 db 05h
num2 db 03h
.code
start:
mov ax, @data
mov ds, ax
mov al, num1
add num2, al
int 3
end start
code ends
Steps¶
-
Open up TurboAssembler
-
Editing
- no
- Dos
- Type
edit fileName.asm
- Type your code
- Save your code Click Here to learn how
-
Assembling Type
tasm fileName.asm
-
Linking Type
tlink fileName.obj
-
Execution
- Type
td fileName.exe
-
Click
F7
to execute the required lines -
Viewing results
- Click
Tab
key until focus reaches the address-value thing at the bottom - Click
Ctrl-G
- Enter
ds:address
for egds:1000
Saving¶
on your keyboard, click
Alt+f
- then
s