Download presentation
Presentation is loading. Please wait.
Published byJudith Tate Modified over 9 years ago
1
Cos 365 Practical Microsoft Assembler
2
Course Details Lecturer: Dr Venter Lecturer: Dr Venter Prac Assistant: Kelvin Andrews Prac Assistant: Kelvin Andrews Assembly Language (Intro) Assembly Language (Intro) Maths Lab ->Level 2 Science Building Maths Lab ->Level 2 Science Building 6 Practicals 6 Practicals Due dates: week from receiving prac Due dates: week from receiving prac Consultation times Consultation times
3
Course Materials Microsoft Assembler Compiler Microsoft Assembler Compiler Irvine Library Irvine Library Prescribed Textbook Kip R. Irvine Prescribed Textbook Kip R. Irvine Online ebooks Online ebooks Assembly Editor Assembly Editor
4
Numbers System Decimal Decimal Binary Binary Hexadecimal Hexadecimal Byte Byte Bit Bit
5
CPU Registers Intel family of 8088/80286/80386 Intel family of 8088/80286/80386 Processor registers Processor registers Low level assembly Low level assembly
6
Intel 8088 registers AX – AH, ALPrimary Accumulator AX – AH, ALPrimary Accumulator BX – AH,BLArithmetic, pointers BX – AH,BLArithmetic, pointers CX – CH,CLLoops CX – CH,CLLoops DX – DH,DLMultiplication, division DX – DH,DLMultiplication, division
7
Cont.. ‘pointer’ registers SISource pointer for string ops SISource pointer for string ops DIDestination pointer for string ops DIDestination pointer for string ops BPBase pointer BPBase pointer SPStack pointer SPStack pointer
8
Cont.. ‘segment’ registers CSCode segment CSCode segment DSData segment DSData segment SSStack segment SSStack segment ESExtra segment ESExtra segment
9
Cont.. ‘special’ registers IPProgram counter IPProgram counter FLAGSProgram status word FLAGSProgram status word
10
FLAGS register Overflow Overflow Direction Direction Interrupt Interrupt Trap Trap Sign Sign Zero Zero Auxiliary Auxiliary Parity Parity Carry Carry 1514131211109876543210 UnusedODITSZAPC
11
Register sizes 32bit16bit8bit8bit EAXAXAHAL Why do I care about sizes?
12
Variables Sizes not type matter Sizes not type matter DB1byte DB1byte DW2bytes DW2bytes DD4bytes DD4bytes DQ8bytes DQ8bytes –samplearraydw 0,1,2,3,4 –promptdb ‘Enter your name?’ –forty40 dup(?) –jdb 20 –numdw 4000 –longnumdd 80000
13
Directives Model Model Stack Stack Data Data Code Code Denote by a ‘.’ Denote by a ‘.’ –.model small –.stack 100h
14
Assembler statement format Label field Operation field Operands field Comments field formul.mov AX, I ;Load I into AX AX – destination I – target eg startmove. mov bh, 20 ; load 20 into bh reg
15
Practical Assignment READING is underrated! Follow the instructions on the prac-sheet Code your 1st assembly program If you get stuck, ask a friend… Still having problems, try Kelvin or Dr Venter
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.