Welcome to Dream.In.Code
Getting Help is Easy!

Join 86,399 Programmers. There are 1,471 online right now! Ask your question and get quick answers from Dream.In.Code experts. Join the #1 programming help community on the internet! Registration is fast and FREE... Join Now!

Chat LIVE With a Expert
Powered by LivePerson.com

Register to Make This Box Go Away!

Movements in Assembly Language

 
Reply to this topicStart new topic

Movements in Assembly Language, Moving a Box in Assembly Language

vyiruskiller
post 8 Nov, 2007 - 08:13 PM
Post #1


New D.I.C Head

*
Joined: 4 Oct, 2006
Posts: 11



I am try to put movements to a box i created using Assembly Language. Can someone give me a little help please. Just a starter with one of the cursor keys please. I need to use the up,down,left and right arrow keys. Thanks. The codes can be located below.

CODE
TITLE   TEST OF INCLUDE - drawing a box using values

    .MODEL SMALL
    .STACK 64

INCLUDE MYMAC.LIB

.DATA
  VAR   DB ?
  VAR2  DB ?
.CODE
BEGIN PROC NEAR
    MOV AX,@DATA
    MOV DS,AX
    MOV ES,AX

  CLRSCR
  
  CUAD 12,30,14,35,7

  DELAY

BEGIN ENDP
    END BEGIN


*********and this is the library file i am using **********

CODE
DELAY MACRO
   MOV AH,07H
   INT 21H
ENDM

CLRSCR MACRO
    MOV AH,00H
    MOV AL,03H
    INT 10H
ENDM

GOTOXY MACRO X,Y
   MOV AH,02H
   MOV BH,0H
   MOV DH,X
   MOV DL,Y
   INT 10H
ENDM

PUTCAR MACRO CAR
   MOV AH,02H
   MOV DL,CAR
   INT 21H  
ENDM

PUTCHAR MACRO CHAR,HOWM
   MOV AH,0AH
   MOV AL,CHAR
   MOV BH,0H
   MOV BL,07H
   MOV CX,HOWM
   INT 10H  
ENDM

COLOR MACRO BCKGRND,LINES,FFI,CCI,FFF,CCF      
       MOV AH,06H
       MOV AL,LINES
       MOV BH,BCKGRND
       MOV CH,FFI
       MOV CL,CCI
       MOV DH,FFF
       MOV DL,CCF
       INT 10H
ENDM

CUAD MACRO FI,CI,FF,CF,COLORES
       LOCAL VERTICAL      
       MOV CL,FF
       SUB CL,FI
       COLOR COLORES,CL,FI,CI,FF,CF      
      ; PONE LAS LINEAS HORIZONTALES      
       MOV DL,CF
       SUB DL,CI
       PUSH DX
       GOTOXY FI,CI
       POP DX
       MOV DH,0
       PUTCHAR 205,DX
       MOV DL,CF
       SUB DL,CI
       PUSH DX
       GOTOXY FF,CI
       POP DX
       MOV DH,0H
       PUTCHAR 205,DX
        
      ; PONE LAS LINEAS VERTICALES
       MOV CL,FF
       SUB CL,FI
       MOV CH,0
       MOV AH,FI
       MOV VAR2,AH
  VERTICAL:
          GOTOXY VAR2,CI
          PUTCAR 186
          GOTOXY VAR2,CF
          PUTCAR 186
          INC VAR2
       LOOP VERTICAL
      
       GOTOXY FI,CI
       PUTCAR 201
       GOTOXY FI,CF
       PUTCAR 187
       GOTOXY FF,CI
       PUTCAR 200
       GOTOXY FF,CF
       PUTCAR 188
            
ENDM
User is offlineProfile CardPM
Go to the top of the page
+Quote Post


Asm_Dood
post 8 Apr, 2008 - 11:52 PM
Post #2


New D.I.C Head

*
Joined: 6 Apr, 2008
Posts: 2

it'd help if you told us for what processor this is.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 5/17/08 06:24AM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month