Closed Thread
Page 2 of 2 FirstFirst 12
Results 11 to 18 of 18

Thread: help on TASM video buffer pls

  1. #11
    helpmepls is offline Newbie
    Join Date
    Mar 2010
    Posts
    9
    Rep Power
    0

    Re: help on TASM video buffer pls

    Thank u very much dargueta i really appreciate your help i tried the code u showed me, sorry but unfortunately i still cant get it to work. only the right and up was working. when i pressed A and S it went right.



    i got it to go left and right using this codes and inserted ur up code but it doesnt seem to work

    ;THE FORM OF AN ASSEMBLY LANGUAGE PROGRAM
    ;NOTE: USING SIMPLIFIED SEGMENT DEFINITION
    .MODEL SMALL
    .STACK 64
    .DATA
    ;DATA FILE ARE LOCATED HERE

    .CODE
    MAIN PROC FAR
    MOV AX,0B800h
    MOV DS,AX
    ;CODE FILES ARE LOCATED HERE
    MOV AL,03 ;MAKING YOUR SCREEN 80X25
    INT 10H


    HULAT:
    MOV AH,00
    INT 16H

    CMP AL,'D'
    JNZ HULAT_l
    JMP RIGHT
    ;WAITING FOR A KEY TO BE PRESSED

    CMP AL, 'W'
    JZ UP

    HULAT_l: CMP AL,'d'
    JNZ HULAT_a
    JMP RIGHT


    HULAT_a: CMP AL,'a'
    JNZ HULAT_b
    JMP LEFT

    HULAT_b: CMP AL,'A'
    JNZ HULAT_SMALLQ
    JMP LEFT





    HULAT_SMALLQ: CMP AL,'q'
    JNZ HULAT_BIGQ
    JMP GWA



    HULAT_BIGQ: CMP AL,'Q'
    JNZ HULAT
    JMP GWA


    UP:
    mov ax, 0601h
    mov bh, 07h
    xor cx, cx
    mov dx, 184fh
    int 10h

    LEFT:
    MOV BX,0000H ;MOVING THE THIRD LINE
    MOV SI,0002H




    MOV CX,25 ;REPEATING PROCESS 25 TIMES




    STEP1_L: PUSH CX
    MOV AL,[BX]

    PUSH AX

    MoV CX,79

    AGAIN_L:
    MOV AL,[SI]
    MOV BYTE PTR[BX],AL
    ADD BX,2
    ADD SI,2
    LOOP AGAIN_L

    POP AX
    MOV [BX],AL

    ADD BX,0A0H
    ADD SI,0A0H
    SUB BX,9EH
    SUB SI,9EH

    POP CX
    LOOP STEP1_L
    JMP HULAT





    RIGHT:
    MOV BX,009EH ;MOVING THE THIRD LINE
    MOV SI,009CH

    MOV AX,0000H


    MOV CX,25 ;REPEATING PROCESS 25 TIMES




    STEP1_R: PUSH CX
    MOV AL,[BX]

    PUSH AX

    MoV CX,79

    AGAIN_R:
    MOV AL,[SI]
    MOV BYTE PTR[BX],AL
    SUB BX,2
    SUB SI,2
    LOOP AGAIN_R

    POP AX
    MOV [BX],AL

    ADD BX,0A0H
    ADD SI,0A0H
    ADD BX,9EH
    ADD SI,9EH

    POP CX
    LOOP STEP1_R
    JMP HULAT





    GWA:



    MOV AH,4CH
    INT 21H
    MAIN ENDP
    END MAIN


    i also tried doing this code to go up but i cant seem to make it loop. pls help me

    .MODEL SMALL
    .STACK 64
    .DATA
    ;DATA FILE ARE LOCATED HERE

    .CODE
    MAIN PROC FAR
    MOV AX,0B800h
    MOV DS,AX
    ;CODE FILES ARE LOCATED HERE
    MOV AL,03 ;MAKING YOUR SCREEN 80X25
    INT 10H


    HULAT:
    MOV AH,00
    INT 16H

    CMP AL,'W'
    JNZ HULAT_l
    JMP UP




    HULAT_l: CMP AL,'w'
    JNZ HULAT_SMALLQ
    JMP UP

    HULAT_SMALLQ: CMP AL,'q'
    JNZ HULAT_BIGQ
    JMP GWA



    HULAT_BIGQ: CMP AL,'Q'
    JNZ HULAT
    JMP GWA



    UP:
    MOV BX,0A0H
    MOV SI,0140H

    MOV AX,0A0H


    MOV CX,25




    STEP1: PUSH CX
    MOV AL,[BX]

    PUSH AX

    MoV CX,79

    AGAIN:
    MOV AL,[SI]
    MOV BYTE PTR[BX],AL
    ADD BX,2
    ADD SI,2
    LOOP AGAIN

    POP AX
    MOV [BX],AL

    ADD BX,0A0H
    ADD SI,0A0H
    SUB BX,9EH
    SUB SI,9EH

    POP CX
    LOOP STEP1
    JMP HULAT


    GWA:



    MOV AH,4CH
    INT 21H
    MAIN ENDP
    END MAIN

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #12
    Join Date
    Oct 2007
    Location
    /dev/null
    Posts
    4,513
    Blog Entries
    8
    Rep Power
    59

    Re: help on TASM video buffer pls

    As far as I can tell, this is what you need to do. Stuff in red is what you need to change, stuff in blue is what you need to add.
    Code:
    ;THE FORM OF AN ASSEMBLY LANGUAGE PROGRAM
    ;NOTE: USING SIMPLIFIED SEGMENT DEFINITION
    .MODEL SMALL
    .STACK 64
    .DATA
    ;DATA FILE ARE LOCATED HERE
    
    .CODE
        ;CODE FILES ARE LOCATED HERE
        MAIN PROC FAR
        MOV AX,0B800h
        MOV DS,AX
    
        MOV AL,03 ;MAKING YOUR SCREEN 80X25
        INT 10H
    
    
        HULAT:
            ;WAITING FOR A KEY TO BE PRESSED
            MOV AH,00
            INT 16H
    
            CMP AL,'D'
            JZ RIGHT
            
            CMP AL,'d'
            JZ RIGHT
    
            CMP AL, 'W'
            JZ UP
            
            
            CMP AL, 'w'
            JZ UP
            
            CMP AL, 'S'
            JZ DOWN
    
            CMP AL, 's'
            JZ DOWN
    
            HULAT_a:
                CMP AL,'a'
                JZ LEFT
    
            HULAT_b:
                CMP AL,'A'
                JZ LEFT
    
            HULAT_SMALLQ:
                CMP AL,'q'
                JZ GWA
    
            HULAT_BIGQ:
                CMP AL,'Q'
                JNZ HULAT
                JMP GWA
                
            UP:
                mov ax, 0601h
                mov bh, 07h
                xor cx, cx
                mov dx, 184fh
                int 10h
                JMP HULAT
    
            DOWN:
                mov ax, 0701h
                mov bh, 07h
                xor cx, cx
                mov dx, 184fh
                int 10h
                JMP HULAT
    
            LEFT:
                MOV BX,0000H    ;MOVING THE THIRD LINE
                MOV SI,0002H
                MOV CX,25       ;REPEATING PROCESS 25 TIMES
    
                STEP1_L:
                    PUSH CX
                    MOV AL,[BX]
                    PUSH AX
                    MoV CX,79
                    AGAIN_L:
                        MOV AL,[SI]
                        MOV BYTE PTR[BX],AL
                        ADD BX,2
                        ADD SI,2
                    LOOP AGAIN_L
                    POP AX
                    MOV [BX],AL
                    ADD BX,0A0H
                    ADD SI,0A0H
                    SUB BX,9EH
                    SUB SI,9EH
                    POP CX
                LOOP STEP1_L
                JMP HULAT
                
            RIGHT:
                MOV BX,009EH ;MOVING THE THIRD LINE
                MOV SI,009CH
                MOV AX,0000H
                MOV CX,25 ;REPEATING PROCESS 25 TIMES
                STEP1_R:
                    PUSH CX
                    MOV AL,[BX]
                    PUSH AX
                    MoV CX,79
                    AGAIN_R:
                        MOV AL,[SI]
                        MOV BYTE PTR[BX],AL
                        SUB BX,2
                        SUB SI,2
                        LOOP AGAIN_R
                    POP AX
                    MOV [BX],AL
                    ADD BX,0A0H
                    ADD SI,0A0H
                    ADD BX,9EH
                    ADD SI,9EH
                    POP CX
                    LOOP STEP1_R
                JMP HULAT
                
            GWA:
                MOV AH,4CH
                INT 21H
    MAIN ENDP
    END MAIN
    Last edited by dargueta; 03-14-2010 at 02:31 PM. Reason: Bug
    sudo rm -rf /

  4. #13
    helpmepls is offline Newbie
    Join Date
    Mar 2010
    Posts
    9
    Rep Power
    0

    Re: help on TASM video buffer pls

    wow! thank u very much! dargueta i love u!

    Ummm... Got last question do you know how to loop the up and down so it doesn't disappear when i go up or down? like the left and right ones?

  5. #14
    Join Date
    Oct 2007
    Location
    /dev/null
    Posts
    4,513
    Blog Entries
    8
    Rep Power
    59

    Re: help on TASM video buffer pls

    Not sure what you're asking. You mean you don't want to scroll the entire screen, but just a portion of it?
    sudo rm -rf /

  6. #15
    helpmepls is offline Newbie
    Join Date
    Mar 2010
    Posts
    9
    Rep Power
    0

    Re: help on TASM video buffer pls

    no, i mean when i scroll completely up right now the words just disappear. i would like that when i scroll up the words loop and reappear at the bottom. like the left and right ones u gave me. when i scroll left the words go left and reappear at the right. i think its loop command like the right and left ones use like this,

    AGAIN_R:
    MOV AL,[SI]
    MOV BYTE PTR[BX],AL
    SUB BX,2
    SUB SI,2
    LOOP AGAIN_R
    POP AX
    MOV [BX],AL
    ADD BX,0A0H
    ADD SI,0A0H
    ADD BX,9EH
    ADD SI,9EH
    POP CX
    LOOP STEP1_R
    but i dont know how to input and make it work it on the program for up and down. sorry for bad english

  7. #16
    Join Date
    Oct 2007
    Location
    /dev/null
    Posts
    4,513
    Blog Entries
    8
    Rep Power
    59

    Re: help on TASM video buffer pls

    Oh, you want it to wrap around? Ok...lemme finish my final exams (I'm done by Friday) and I'll mess around with it.
    sudo rm -rf /

  8. #17
    helpmepls is offline Newbie
    Join Date
    Mar 2010
    Posts
    9
    Rep Power
    0

    Re: help on TASM video buffer pls

    noooo. i need it by tomorrow becoz its our endterm project =( il just try to experiment on it more, hopefully i can get it. i really appreciate your help bro tnx 4 everything. goodluck on ur exams

  9. #18
    Join Date
    Oct 2007
    Location
    /dev/null
    Posts
    4,513
    Blog Entries
    8
    Rep Power
    59

    Re: help on TASM video buffer pls

    Well, I would imagine it's the same as scrolling left or right, but you just need to flip the coordinates around.
    sudo rm -rf /

Closed Thread
Page 2 of 2 FirstFirst 12

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. TASM TASM program help : Sorting
    By Nagasaki in forum Assembly
    Replies: 1
    Last Post: 10-12-2011, 03:49 PM
  2. TASM Recursion in TASM
    By assembler_wanna_be in forum Assembly
    Replies: 1
    Last Post: 01-11-2011, 11:29 PM
  3. TASM tasm symbol painting
    By core_st in forum Assembly
    Replies: 4
    Last Post: 12-03-2010, 02:31 PM
  4. TASM I need HELP with TASM and TLINK PLEASE.....
    By jai_ho in forum Assembly
    Replies: 3
    Last Post: 11-26-2010, 03:00 AM
  5. TASM how to put pixel in TASM VESA 32-bit?
    By D@rkD@iver in forum Assembly
    Replies: 1
    Last Post: 06-08-2010, 03:26 AM

Bookmarks

Posting Permissions

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