0% found this document useful (0 votes)
12 views3 pages

Levels of Programming Languages (VIDEO 1)

The document outlines the levels of programming languages, including Machine Language, Assembly Language, and High-Level Languages, detailing their characteristics and differences. It discusses the advantages and disadvantages of Assembly Language, highlighting its efficiency and control versus its complexity and difficulty. Additionally, it provides sample Assembly Language programs and instructions for using the DEBUG program in a DOS environment.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views3 pages

Levels of Programming Languages (VIDEO 1)

The document outlines the levels of programming languages, including Machine Language, Assembly Language, and High-Level Languages, detailing their characteristics and differences. It discusses the advantages and disadvantages of Assembly Language, highlighting its efficiency and control versus its complexity and difficulty. Additionally, it provides sample Assembly Language programs and instructions for using the DEBUG program in a DOS environment.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Levels of Programming Languages (VIDEO 1)

1. Machine Language # ML
• 0 off 2 on ML Binary is like switches
• Consists of indiv instructions that will be executed by the CPU one
at a time
2. Assembly Language AKA Low level Language # LL
• Close to HL and close to ML
• numeric and human words
• Designed for a specific family of processors (different processors
groups/family have diff related ML instrucitons and are assembled
into ML)
– Different assembly language per processor
• Consists of symbolic instrucitons directly related to machine language
instructions and are assembled into machine language
3. High Level Languages # HL
• slower than ML because it takes translating for the machine
to understand
• eg. C C++ Vbasic
• Designed to eliminate the technicalities of a particular computer
• Statements compiled from a HL language typically generate many
low-level instructions

Advantages of Assembly Language (VIDEO 2)


• no limitations
• Assembly language programs and subroutines usually execute more effi-
ciently and usually have the fastest execution speed
• Programs and subroutines that are imporssible or nearly impossible to
write in a HL language are easily written in Assembly language
• The programmer is given max control over the system

Disadvantages of Assembly Language


• pnemonic form not words humans read
• Coding is very tedious and repititious
• Difficult to learn
• Requires knowledge of the computer system and its architecture
• Code created can be very machine dependent
• Difficult to debug

1
Sample Assembly Language Program
MOV AX, 0B800h ; Hexadecimal MOV ES,AX
MOV DI,0 MOV AH,7 MOV AL,41h STOSW INT 20H
• Program that displays the letter ‘A’ on the screen

Sammple Program P1 (VIDEO 3)


• Dash prompt of DOS
• a(assemble) > specify an address where youre going to write the instruction
• u(unassemble) > already written the program and you want to go back
and see it again
• q(quit) > get out of the DEBUG program
• g(go) > run the program we have written
• 16-bit processors emulator DOSBOX (Virtual Machine)
• A100

Sample Program P2 (VIDEO 4)


In DEBUG the H,h should not be written

Sample Program P3 (VIDEO 5)


MOV AX, 0B800h ; Address B800 is video ram MOV ES,AX ;
also accessing video ram MOV DI,0 ; Location of Character to be
Displayed MOV AH,7 ; Character Attributes Color 7: background
black foreground white MOV AL,41h ; 41 is ASCI Code of Letter
A STOSW ; Displays the character on the Screen > sets all the
parameters before issuing the instructions INT 20H ; Prompt dash /
END the program and return to prompt
ChatGPT MOV AX, 0B800h ; Move the base address of the video
memory to AX MOV ES, AX ; Move the value in AX to the ES register
(Extra Segment) MOV DI, 0 ; Initialize DI (Destination Index) to
0 MOV AH, 7 ; Set the attribute byte (foreground and background
colors) MOV AL, 41h ; Set the ASCII code for the character ‘A’
STOSW ; Store the word (16 bits) in AX at the address ES:DI and
increment DI INT 20H ; Call interrupt 20H (DOS terminate program)

2
Summary
• Definition of Assembly Language
• Advantages and Disadvantages of Assembly Language
• Sample Assembly Language program

You might also like