Guten Nachmittag, ich versuche, auf dem Bildschirm eine Reihe von Strings mit GUI Turbo Assembler TASM, das Problem, dass ich nicht alle Saiten nur die erste zeigen kann. Wenn jemand auf dem Bildschirm hilft mir die Saiten korrekt angezeigt werden und durch diese Anordnung bewegen, sehr grateful-In Bildschirm-Array mit Zeichen-GUI TASM Assembly drucken
Dies ist ein Beispiel in Borland C++
Das tatsächlich in TASM:
der Code ist der folgende.
.MODEL small
.STACK 100h ; reserves 256 bytes of uninitialized storage
.DATA
startX equ 35
startY equ 8
y db ?
x db ?
t1 db ?
t2 db ?
t3 db ?
zSprite db'M','M','L','E','E','N','A','E','V','E',
db'E','R','H','O','N','G','O','S','T','R',
db'X','X','O','T','I','R','R','A','C','A',
db'I','S','A','P','P','O','T','A','P','S',
db'C','C','M','L','A','A','I','Z','O','T',
db'O','A','A','U','A','N','U','L','P','U',
db'S','O','M','B','R','E','R','O','M','P',
db'C','N','E','A','R','R','I','I','O','O',
db'W','O','J','E','N','O','C','P','Z','E',
db'A','A','Z','A','A','L','N','Y','T','D'
.386 ;enabled assembly of non privileged 80386 instructions
.CODE
start:
;set DS to point to the data segment
mov ax,@data
mov ds,ax
mov di,offset zSprite
mov y,0
l5:
cmp y,10
jl l0
jmp l1
l0:
mov x,0
l4:
cmp x,10
jl l2
jmp l3
l2:
mov al,startX
add al,x
mov t1,al
mov al,startY
add al,y
mov t2,al
; set cursor position at (x,y)
mov ah,02h ;set cursor position service
mov bh,00h ;page number
mov dh,t2 ;row
mov dl,t1 ;column
int 10h ;bios interrupt
mov ax,0 ;reset ax
mov al,y ;ax = y
mov bx,10
mul bx ;ax = ax * 10
mov bx,0 ;reset bx
mov bl,x ;bx = x
add ax,bx ;ax = ax + x
mov bx,ax
; set color
mov ah,09h ;service
mov al, zSprite;character
mov bh,00h ;page number
mov bl,[bx+di] ;color
mov cx,01h ;number of times to print character
int 10h
;print symbol
mov ah, 02h
mov dl, zSprite
int 21h
inc x
jmp l4
l3:
inc y
jmp l5
l1:
nop
exit:
;DOS: terminate the program
mov ah,4ch ; mov ax, 4c00h
mov al,0h
int 21h
delay PROC
pop bx
mov ax,1000d
mov dx,ax
delay1:
mov cx,ax
delay2:
dec cx
jnz delay2
dec dx
jnz delay1
push bx
ret
delay ENDP
END start
Ähm, dein ** eigener Kommentar ** sagt _ "mov al, 0feh; Charakter" _ ... das ** ist ** dein "Bild". – Jester
Es tut mir leid für mein schlechtes Englisch. Ich weiß nicht, wie man die Buchstaben anstelle eines fehlerhaften Zeichens zeigt. Danke für Ihre Hilfe. – raintrooper
Es ist nicht "falsch", es ist das, was Sie dem Programm gesagt haben. – Jester