EASy68K
http://www.easy68k.com/EASy68Kforum/

got a bit problem here..
http://www.easy68k.com/EASy68Kforum/viewtopic.php?f=5&t=667
Page 1 of 1

Author:  JJ.R [ Wed Jun 03, 2009 6:14 pm ]
Post subject:  got a bit problem here..

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

Author:  profkelly [ Wed Jun 03, 2009 10:13 pm ]
Post subject: 

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

Author:  JJ.R [ Thu Jun 04, 2009 2:39 am ]
Post subject:  hmm...

after put it at your way, the enter digit only cannot be done.

Author:  profkelly [ Thu Jun 04, 2009 2:58 am ]
Post subject: 

What input you are trying to ignore?

Author:  JJ.R [ Thu Jun 04, 2009 3:03 am ]
Post subject: 

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...

Author:  profkelly [ Thu Jun 04, 2009 11:54 am ]
Post subject: 

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.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/