EASy68K  
It is currently Mon Dec 09, 2019 10:24 pm

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: got a bit problem here..
PostPosted: Wed Jun 03, 2009 6:14 pm 
Offline

Joined: Tue Jun 02, 2009 8:00 am
Posts: 6
Location: malaysia
how do i skip or ignore the input that i don't want. example
Code:
      move.l   #$7ffe,sp
      move.l   #string,a6
      
input      move.b   #5,d0
      trap   #15
   
      cmp.b   #'0',d1
      blt   skip
      cmp.b   #'9',d1
      bgt   skip
   
      move.b   #6,d0
      trap   #15
skip

can any1 give me something what should i put the code on the skip so it will ignore or skip the other input.. thx


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 03, 2009 10:13 pm 
Offline
User avatar

Joined: Thu Dec 16, 2004 6:42 pm
Posts: 1109
I'm not sure, is this is what you meant?
Code:
      move.l   #$7ffe,sp
      move.l   #string,a6
     
input      move.b   #5,d0
      trap   #15
   
      cmp.b   #'0',d1
      blt   input
      cmp.b   #'9',d1
      bgt   input
   
      move.b   #6,d0
      trap   #15

_________________
Prof. Kelly


Top
 Profile  
 
 Post subject: hmm...
PostPosted: Thu Jun 04, 2009 2:39 am 
Offline

Joined: Tue Jun 02, 2009 8:00 am
Posts: 6
Location: malaysia
after put it at your way, the enter digit only cannot be done.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 04, 2009 2:58 am 
Offline
User avatar

Joined: Thu Dec 16, 2004 6:42 pm
Posts: 1109
What input you are trying to ignore?

_________________
Prof. Kelly


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 04, 2009 3:03 am 
Offline

Joined: Tue Jun 02, 2009 8:00 am
Posts: 6
Location: malaysia
for example,

input is 1203023546809809
when i input y or any other input other than digit, the program will ignore it and still can input digit when next input is digit.

other than digit the program it will ignore or skip...


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 04, 2009 11:54 am 
Offline
User avatar

Joined: Thu Dec 16, 2004 6:42 pm
Posts: 1109
My changes to your code in the previous post loops until a digit 0 through 9 is entered and then displays it.

Note! Keyboard echo is enabled by default, it may be disabled with task 12.

_________________
Prof. Kelly


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group