Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword
Like this
2Activity
0 of .
Results for:
No results containing your search query
P. 1
Character Moving With Arrow Keys

Character Moving With Arrow Keys

Ratings: (0)|Views: 53 |Likes:

More info:

Published by: Muhammad Rana Farhan on Dec 26, 2009
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

09/16/2010

pdf

text

original

 
Character Moving with Arrow Keys
============================================
.MODEL SMALLDATA_SEG SEGMENT 'DATA'CH1 DB (?)CH2 DB (?)Y DB (?)X DB (?)DATA_SEG ENDSCODE_SEG SEGMENT 'CODE'ASSUME CS:CODE_SEG,DS:DATA_SEGSTART PROC FAR MOV AX,DATA_SEGMOV DS,AXMOV AH,1INT 21HMOV CH1,ALMOV AH,6MOV AL,0MOV BH,07MOV CH,0MOV CL,0MOV DH,50MOV DL,80INT 10HMOV AH,2MOV BH,0MOV DH,12MOV DL,40INT 10HMOV AH,2MOV DL,CH1INT 21HMOV Y,12MOV X,40AGAIN:
 
MOV AH,1INT 21HMOV CH2,ALCMP AL,0JE CHECKjmp exitCHECK:MOV AH,08INT 21HMOV CH2,ALCMP AL,72JE UPCMP AL,80JE DOWNCMP AL,75JE JUMP_LEFTCMP AL,77JE JUMP_CASE4UP:MOV AH,2MOV BH,0MOV DH,YMOV DL,XINT 10HMOV AH,2MOV DL,' 'INT 21HSUB Y,1CMP Y,0JE DEC_XMOV AH,2MOV BH,0MOV DH,YMOV DL,X
 
INT 10HMOV AH,2MOV DL,CH1INT 21HJMP AGAINJUMP_LEFT:JMP LEFTJUMP_CASE4:JMP RIGHTDEC_X:SUB X,1MOV Y,25CMP X,0JE JUMP_PUT_MAXJMP AGAINDOWN:MOV AH,2MOV BH,0MOV DH,YMOV DL,XINT 10HMOV AH,2MOV DL,' 'INT 21HADD Y,1CMP Y,25JGE INC_XMOV AH,2MOV BH,0MOV DH,YMOV DL,XINT 10H

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->