Skip to main content
Stack Overflow
  1. About
  2. For Teams

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

Required fields*

MASM Using ah=02h int 21h, display text, highlight with flickering + inverse display

As i understand. Program must clean background, display message1 ( dark letters on white background + highlighting by flickering). then go up for 2 strings and display message2(also dark letters on white background + highlighting by flickering). then go up for 2 strings and display message3(also dark letters on white background + highlighting by flickering). And it says that i need to use 02h function(but didn't says that i cant use other)

It's original task

I tried to start from display message 1 with dark letters on white background + highlighting by flickering.

stack segment para stack 'stack' ; start of stack
 db 64 dup('stack***') 
stack ends 
 
dseg segment para public 'data' ; start of data
 message1 db 'This is line 1:$'
 message2 db 'This is line 2'
 message3 db 'This is line 3' 
 Cls db 1Bh, '[2J', '$'
 cl1 db '7m'
dseg ends 
 
cseg segment para public 'code' ;start of commands
prog proc far 
 assume cs:cseg, ds:dseg, ss:stack 
 
 mov ax, dseg 
 mov ds, ax 
 mov ax,1003h
 mov bl,112
 int 10h
 
 lea dx,message1
 mov ah, 09h
 int 21h
 
 ;end of program
 mov ah, 4Ch 
 int 21h 
prog endp ; конец процедуры
cseg ends ; конец сегмента команд
 end prog ; конец программы

Answer*

Draft saved
Draft discarded
Cancel
4
  • i can use only masm/tasm, link/tlink,debug,td. masm name link name debug name.exe. i tried to apply your code in structure of my start program, but failed Commented Jan 7, 2025 at 7:37
  • i can't insert img in comment, i tried exe version, but somehow after masm name i get: "End of file encountered on input file. name.asm(68) : error 85: End of file, no END directive." But i see that u apply end prog. i don't know why this message appears Commented Jan 8, 2025 at 10:39
  • ok, i add enter before and after end prog and it helped. program display grey background + black letters + highlighting by flickering, but only message 1 Commented Jan 8, 2025 at 16:30
  • The call pushes the return address, two bytes (word), onto the stack. retf takes the return address from the stack, four bytes (dword). Commented Jan 8, 2025 at 21:56

AltStyle によって変換されたページ (->オリジナル) /