150 likes | 273 Views
Cos 365 Practical. Microsoft Assembler. Course Details. Lecturer: Dr Venter Prac Assistant: Kelvin Andrews Assembly Language (Intro) Maths Lab ->Level 2 Science Building 6 Practicals Due dates: week from receiving prac Consultation times. Course Materials. Microsoft Assembler Compiler
E N D
Cos 365 Practical Microsoft Assembler
Course Details • Lecturer: Dr Venter • Prac Assistant: Kelvin Andrews • Assembly Language (Intro) • Maths Lab ->Level 2 Science Building • 6 Practicals • Due dates: week from receiving prac • Consultation times
Course Materials • Microsoft Assembler Compiler • Irvine Library • Prescribed Textbook Kip R. Irvine • Online ebooks • Assembly Editor
Numbers System • Decimal • Binary • Hexadecimal • Byte • Bit
CPU Registers • Intel family of 8088/80286/80386 • Processor registers • Low level assembly
Intel 8088 registers • AX – AH, AL Primary Accumulator • BX – AH,BL Arithmetic, pointers • CX – CH,CL Loops • DX – DH,DL Multiplication, division
Cont.. ‘pointer’ registers • SI Source pointer for string ops • DI Destination pointer for string ops • BP Base pointer • SP Stack pointer
Cont.. ‘segment’ registers • CS Code segment • DS Data segment • SS Stack segment • ES Extra segment
Cont.. ‘special’ registers • IP Program counter • FLAGS Program status word
FLAGS register • Overflow • Direction • Interrupt • Trap • Sign • Zero • Auxiliary • Parity • Carry
Register sizes Why do I care about sizes?
Variables • Sizes not type matter • DB 1byte • DW 2bytes • DD 4bytes • DQ 8bytes • samplearray dw 0,1,2,3,4 • prompt db ‘Enter your name?’ • forty 40 dup(?) • j db 20 • num dw 4000 • longnum dd 80000
Directives • Model • Stack • Data • Code • Denote by a ‘.’ • .model small • .stack 100h
Assembler statement format • AX – destination • I – target • eg startmove. mov bh, 20 ; load 20 into bh reg
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