Results 1 to 4 of 4

Thread: Video memory

  1. #1

    Thread Starter
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827

    Video memory

    I want to print the text directly to the video memory. So what I need is es:di where di points to the offset of the video memory where I want to print the character. How's is it organized? Is it some sort of linear address? How would I calculate the address if I know the column and the row number I want to print on?
    Baaaaaaaaah

  2. #2
    Ya ya Baby!!!Me is Back
    Join Date
    Jul 2002
    Posts
    362
    I do not know if it's exacly what you want but here is one part of a code for video that I found in a old asm project for school that I have made.
    Code:
    PTAMPON PROC
            PUSH    AX
            PUSH    CX
            PUSH    DI
    	MOV 	SI, 0
            MOV     AX, 0B800h
            MOV     ES, AX
            MOV     AL, BYTE PTR TAMPON[SI]            ; string to show here!!!!        
    MOV     AH, 0f3h            ; color here!!!!
            MOV     DI, 1940d          ; x_yposition here!!!!!
    
    Encore:	INC SI
            MOV     WORD PTR[ES]: DI, AX ; copie dans l'‚cran vid‚o
            INC     DI                 ; next char
            INC     DI ;Next char
    	
    	MOV     AL, BYTE PTR TAMPON[SI] 
            CMP	AL, '$'     	   ; end?
            JNE     Encore             ; not = redo
    
    
    FINTAMPON:
    
            POP     DI
            POP     CX
            POP     AX
    	RET
    ENDP

  3. #3
    Frenzied Member markman's Avatar
    Join Date
    Nov 2000
    Location
    Florida.
    Posts
    1,197
    look at simple OS's like linux 0.1 and check out the forums at www.mega-tokyo.com/forum/
    retired member. Thanks for everything

  4. #4

    Thread Starter
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827
    Thanks...figured out...
    Baaaaaaaaah

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width