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

Extended ASCII Display in Assembly Code

Uploaded by

comedykhomedy
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views3 pages

Extended ASCII Display in Assembly Code

Uploaded by

comedykhomedy
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

extended ascii :128 to 255 displaying (in 10 characters per row , and end in middle

when reached 256)

.model small
.stack 100h
.data
msg db '* $'
.code

main proc

mov ax,@data
mov ds,ax

mov bh,128
mov cx,10

loopo:

loopi:
mov ah,2
mov dl,bh
int 21h
inc bh

cmp bh,255
jg exit

loop loopi

mov ah,2
mov dl,13
int 21h

mov ah,2
mov dl,10
int 21h

mov cx,10
cmp bh,255
je exit
jmp loopo

exit:
mov ah,4ch
int 21h

main endp
end main
display 80 starts , ask 2 or 5 for row input :
.model small
.stack 100h
.data
msg db '* $'
.code

main proc

mov ax,@data
mov ds,ax

mov ah,1
int 21h

mov bh,al

mov ah,2
mov dl,13
int 21h

mov ah,2
mov dl,10
int 21h

cmp bh,'2'
je two

cmp bh,'5'
je five

jmp exit

two:

mov bh,2
mov cx,40

loopot:

loopit:
mov ah,2
mov dl,'*'
int 21h

loop loopit

mov ah,2
mov dl,13
int 21h

mov ah,2
mov dl,10
int 21h

dec bh
cmp bh,0
je exit

mov cx,40
jmp loopot

five:

mov bh,5
mov cx,16

loopof:

loopif:
mov ah,2
mov dl,'*'
int 21h

loop loopif

mov ah,2
mov dl,13
int 21h

mov ah,2
mov dl,10
int 21h

dec bh
cmp bh,0
je exit

mov cx,16
jmp loopof

exit:
mov ah,4ch
int 21h

main endp
end main

You might also like