Assembly Language Articles

Submit Article
Home » Articles » Assembly Language » Homework HelpRSS Feeds

Program to display available memory

Posted By: Adelino Fischer     Category: Assembly Language     Views: 7559

Write a program to display available memory.

Code for Program to display available memory in Assembly Language

prnstr macro msg
        mov ah, 09h
        lea dx, msg
        int 21h

data segment
        ans db 6 dup(' '), '$'
        buf1 db "Memory available : $"
        buf2 db " Kilobytes$"
data ends

code segment
        assume cs:code, ds:data
start :
        mov ax, data
        mov ds, ax
        mov es, ax

        mov ax, 0000h
        int 12h

        mov cx, 000ah
        mov si, offset ans + 5
again :
        mov dx, 0000h
        div cx
        add dl, 30h
        mov byte ptr [si], dl
        dec si
        cmp ax, 0000h
        jnz again

        prnstr buf1
        prnstr ans
        prnstr buf2

        mov ax, 4c00h
        int 21h
code ends
        end start


Didn't find what you were looking for? Find more on Program to display available memory Or get search suggestion and latest updates.

Adelino Fischer
Adelino Fischer author of Program to display available memory is from Frankfurt, Germany.
View All Articles


Other Interesting Articles in Assembly Language:

Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

No Comment Found, Be the First to post comment!