Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

What's problem in my program?


  • Please log in to reply
No replies to this topic

#1 moh3en

moh3en

  • Members
  • 9 posts
  • OFFLINE
  •  
  • Local time:11:21 AM

Posted 15 January 2009 - 07:52 AM

I want get 2 variable for string 500 ( 250 for a varible and 250 for other variable)

.model small
.data
  maxlen db 255 
  actlen db ?
  str1 db 255 dup(?)
  str2 db 255 dup(?) 
  msg1 db "Enter String 0 to 255$"
  msg2 db "Enter String 255 to 500$"
.code

MAIN
	MOV AX,@data 
	MOV ds,AX
			
	MOV AH,09H
	MOV Dx,Offset msg1
	INT 21h		
	
	call forenter1;Goto next line
	 
	MOV ah,10
	MOV dx,offset maxlen
	INT 21h  
	
	MOV bl,actlen
	MOV bh,0
	MOV str1[bx],"$"
	
	call forenter1;Goto next line
	
	MOV ah,9
	MOV dx,offset msg2
	INT 21h 
	
	call forenter1;Goto next line   
	
	MOV maxlen,255
	
	MOV ah,10
	MOV dx,offset maxlen
	INT 21h  
	
	MOV bl,actlen
	MOV bh,0
	MOV str2[bx],"$"   
	
	call forenter1;Goto next line  
	
	MOV ah,9
	MOV dx,offset str1
	INT 21h
	
  ;call forenter1;Goto next line 
	
   ;MOV ah,9
  ; MOV dx,offset str2
   ;INT 21h	
		   
	MOV ah,4ch
	INT 21h
	
main endp

forenter1 Proc  NEAR
	
	push ax
	push dx
	
	MOV ah,2
	MOV dl,10
	INT 21h
	MOV ah,2
	MOV dl,13
	INT 21h 
	
	pop dx
	pop ax
	RET
	
forenter1 endp	
End Main


BC AdBot (Login to Remove)

 





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users