Author Topic: ASM practice (Help)  (Read 6721 times)

0 Members and 1 Guest are viewing this topic.

Offline adamac16

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 141
  • Rating: +2/-0
    • View Profile
Re: ASM practice (Help)
« Reply #15 on: November 11, 2010, 05:42:07 pm »
Start by displaying the text "Press a number", and using GetKey() to let the user press a key.

Quote
Wouldn't you'd just get the keypress, then have the program run through a look up table and return the value from the table?

That's too hard for beginners
so do i do that for every number? or just once?

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: ASM practice (Help)
« Reply #16 on: November 11, 2010, 05:43:24 pm »
Start by displaying the text "Press a number", and using GetKey() to let the user press a key.

Quote
Wouldn't you'd just get the keypress, then have the program run through a look up table and return the value from the table?

That's too hard for beginners
so do i do that for every number? or just once?

Whatever number the user presses. Try it.




Offline adamac16

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 141
  • Rating: +2/-0
    • View Profile
Re: ASM practice (Help)
« Reply #17 on: November 11, 2010, 05:45:26 pm »
Start by displaying the text "Press a number", and using GetKey() to let the user press a key.

Quote
Wouldn't you'd just get the keypress, then have the program run through a look up table and return the value from the table?

That's too hard for beginners
so do i do that for every number? or just once?

Whatever number the user presses. Try it.

display what?

Offline Hot_Dog

  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
Re: ASM practice (Help)
« Reply #18 on: November 11, 2010, 05:47:01 pm »
Start by displaying the text "Press a number", and using GetKey() to let the user press a key.

Quote
Wouldn't you'd just get the keypress, then have the program run through a look up table and return the value from the table?

That's too hard for beginners
so do i do that for every number? or just once?

What would you do if you were writing a Ti-Basic program?  You would have a label to mark a loop.  You ask a user to press a key, and you see if the key is a number.  If it is, you display the number.  If not, you get another key press.

For example:

Lbl KE

getKey->K
If K > ...and K < ...
Goto DI
Goto KE

Lbl DI:

Disp K


Try it now in terms of ASM
« Last Edit: November 11, 2010, 05:47:24 pm by Hot_Dog »

Offline adamac16

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 141
  • Rating: +2/-0
    • View Profile
Re: ASM practice (Help)
« Reply #19 on: November 11, 2010, 05:54:11 pm »
i know BASIC. and what do u mean?

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: ASM practice (Help)
« Reply #20 on: November 11, 2010, 05:55:02 pm »
He means you should try to make the program in ASM: the user presses a button, you give the key code.




Offline Hot_Dog

  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
Re: ASM practice (Help)
« Reply #21 on: November 11, 2010, 05:56:51 pm »
He means you should try to make the program in ASM: the user presses a button, you give the key code.

Exactly.  I felt that if you visualized it in Basic, you could better figure out how to start, how to end, and what your goals are