2013-11-28 5 views
0

안녕하세요. 여기 TASM에 문제가 있습니다. 여기에는 ASCII 코드를 사용하여 이름을 표시하는 코드가 있습니다. 어떻게 출력을 가운데에 배치할까요?.TASM에 텍스트를 가운데에 배치하는 방법?

.model small 
.stack 200h 
.code 

start: 

Mov ah, 2 
Mov dl, 68 
Int 21h 

Mov ah, 2 
Mov dl, 97 
Int 21h 
Mov ah, 2 
Mov dl, 114 
Int 21h 

mov ah, 4ch 
mov al,00h 
int 21h 

end start 

답변

0

가의 GET CURSOR POSITION AND SIZESET CURSOR POSITION 인터럽트를 사용? 나는이 코드를 넣어 것입니다

mov ah,3 ; Get the current cursor position 
mov bh,0 
int 10h 

mov ah,2 ; Set cursor position 
mov bh,0 
mov dl,39 ; New column. In an 80 column text mode this will just about center 
      ; the 3 characters 
; We wanto to stay on the same row, so we don't change dh 
int 10h 
+0

... 를 I 입력하기 전에 코드를 문자에 대한 ... 또는 뒤에 ...? 감사합니다.} –

+0

편지를 인쇄하기 전에. – Michael

+0

또 다른 질문입니다. 이제 세 글자를 가운데 정렬 할 수 있습니다. 이제 3 글자 아래에 다른 글자를 넣고 싶습니다. 어떻게하면됩니까? –

관련 문제