Problem with printing
Posted: Tue Feb 08, 2005 2:48 pm
Ive been brushing up on my assembly language skills and I am in the process of trying to get a character to print multiple times as though it looks like its loading.
I can print the character a certain number of times, but it gets displayed all at once. Any help or tips would be appreciated.
This is what I have so far, two different versions. Ive even tryed adding a loop but couldnt get it to work.Thanks in advance.
I can print the character a certain number of times, but it gets displayed all at once. Any help or tips would be appreciated.
This is what I have so far, two different versions. Ive even tryed adding a loop but couldnt get it to work.
Code: Select all
; Print dots
mov ah, 0x09 ; AH = write character function
mov al, '.' ; AL = character to display
mov bx, 0x0007 ; BH = video page number, BL = attribute
mov cx, 0x0010 ; CX = number of times to write character
int 0x10 ; Bios video function
; Print a character using the video memory
mov ax, 0x0b800 ; Segment of video buffer in real mode
mov es, ax ; Put this into es
xor di, di ; Clear di, ES:DI points to video memory
mov ah, 4 ; Attribute - red
mov al, "G" ; Character to put there
mov cx, 1 ; Amount of times to put it there
cld ; Direction - forwards
rep stosw ; Output character at ES:[DI]