my lecturer requires write assembly language code displays poem or paragraph. how do this? knowledge can display single sentence "hello world".
an example code this:
.model small .stack 100h cr equ 13d lf equ 10d .data message db 'hello world', cr, lf, '$' ; note terminating $ .code start: mov ax, @data mov ds, ax mov dx, offset message mov ah, 9 ; subprogram string output int 21h ; call ms-dos display string mov ax, 4c00h int 21h end start
the "$" string ending while cr carriage return , lf line feed. write entire poem in "message" , put $ @ end of it.
Comments
Post a Comment