Jump to content

Photo

Input Parser in assembly langauge?


22 replies to this topic

#1 adamantyr OFFLINE  

adamantyr

    Stargunner

  • 1,176 posts

Posted Mon Oct 16, 2017 5:40 PM

Anyone got the source to a nice one? I can write my own but why re-invent the wheel...



#2 TheBF OFFLINE  

TheBF

    Moonsweeper

  • 369 posts
  • Location:The Great White North

Posted Mon Oct 16, 2017 7:55 PM

Can you give us an example of what you want to parse?

 

A general purpose solution might take way more resources than you really need.



#3 adamantyr OFFLINE  

adamantyr

    Stargunner

  • Topic Starter
  • 1,176 posts

Posted Mon Oct 16, 2017 7:57 PM

Text. As in, the INPUT statement in assembly.

#4 RXB ONLINE  

RXB

    River Patroller

  • 2,798 posts
  • Location:Vancouver, Washington, USA

Posted Mon Oct 16, 2017 11:47 PM

Text. As in, the INPUT statement in assembly.

RXB has CALL USER that loads TEXT as input and includes being used in INPUT FILE or INPUT KEYBOARD text.

And in RXB demo can do both while running all from a Batch text file.

 

For example you could write a text file with Assembly bytes in that text and then move them to RAM or Scratch Pad RAM then run that program and still have access to dump that and run more....



#5 Vorticon OFFLINE  

Vorticon

    River Patroller

  • 2,805 posts
  • Location:Eagan, MN, USA

Posted Tue Oct 17, 2017 7:27 AM

Are you looking for a general natural language parser? I did one for my mini interactive fiction game Eons in XB.



#6 adamantyr OFFLINE  

adamantyr

    Stargunner

  • Topic Starter
  • 1,176 posts

Posted Tue Oct 17, 2017 8:04 AM

I'll just write my own but to clarify:

I'm looking for assembly source that puts a cursor on the screen, blinks the cursor, does left, right, input, delete. Like the INPUT statement in TI BASIC. Scrolling and multiple lines is not required.

#7 InsaneMultitasker OFFLINE  

InsaneMultitasker

    Stargunner

  • 1,731 posts

Posted Tue Oct 17, 2017 11:15 AM

I wrote an assembly-based near-equivalent to ACCEPT AT long ago.  It isn't the tightest code because I was using it for multiple purposes.  I will look for the source tonight if still interested.



#8 Vorticon OFFLINE  

Vorticon

    River Patroller

  • 2,805 posts
  • Location:Eagan, MN, USA

Posted Tue Oct 17, 2017 11:28 AM

I'll just write my own but to clarify:

I'm looking for assembly source that puts a cursor on the screen, blinks the cursor, does left, right, input, delete. Like the INPUT statement in TI BASIC. Scrolling and multiple lines is not required.

 

Ah... I love clarity...

I did that in assembly for my SkyChart program. I'll dig it up.



#9 senior_falcon OFFLINE  

senior_falcon

    Dragonstomper

  • 946 posts
  • Location:Lansing, NY, USA

Posted Tue Oct 17, 2017 12:15 PM

There is a GPL routine that does just what you want, provided you don't mind  using 28 columns.  (I think you can use 32 columns as long as you are not on the bottom row.)  Very simple to use.  I have to look up the details tonight before I can tell you how to use it, but someone will probably beat me to it before than.



#10 adamantyr OFFLINE  

adamantyr

    Stargunner

  • Topic Starter
  • 1,176 posts

Posted Tue Oct 17, 2017 12:22 PM

There is a GPL routine that does just what you want, provided you don't mind  using 28 columns.  (I think you can use 32 columns as long as you are not on the bottom row.)  Very simple to use.  I have to look up the details tonight before I can tell you how to use it, but someone will probably beat me to it before than.

 

Thanks, but I need it in assembly language. I'm not using GPL. Not even using GPLLNK!



#11 adamantyr OFFLINE  

adamantyr

    Stargunner

  • Topic Starter
  • 1,176 posts

Posted Tue Oct 17, 2017 12:24 PM

I wrote an assembly-based near-equivalent to ACCEPT AT long ago.  It isn't the tightest code because I was using it for multiple purposes.  I will look for the source tonight if still interested.

 

That would be great, thanks!



#12 senior_falcon OFFLINE  

senior_falcon

    Dragonstomper

  • 946 posts
  • Location:Lansing, NY, USA

Posted Tue Oct 17, 2017 12:32 PM

 

Thanks, but I need it in assembly language. I'm not using GPL. Not even using GPLLNK!

Will this be running from XB?



#13 adamantyr OFFLINE  

adamantyr

    Stargunner

  • Topic Starter
  • 1,176 posts

Posted Tue Oct 17, 2017 12:52 PM

Will this be running from XB?

 

No. I'm not sure why people seem to think that, I thought my topic was very clear.



#14 senior_falcon OFFLINE  

senior_falcon

    Dragonstomper

  • 946 posts
  • Location:Lansing, NY, USA

Posted Tue Oct 17, 2017 1:09 PM

"So I'm working on a custom loader for my assembly language CRPG"

 

I guess I need to work on my reading skills!



#15 lucien2 OFFLINE  

lucien2

    Moonsweeper

  • 284 posts
  • Location:Switzerland

Posted Tue Oct 17, 2017 1:25 PM

Here is one: http://atariage.com/...-1#entry2670337, in "sokoban asm.zip".

 

The comments are in french. If you are interested in using it, I could isolate it from my library. Arrows, insert, delete, clear and multiline (4 lines) are implemented.

 

The routine is in "LIB" file, it's called "INPUT". The return value is in "INPSTR", the first byte is the string length.

 

If you want to watch it running, load the ea5 file "SOKOBAN" and press "L".



#16 adamantyr OFFLINE  

adamantyr

    Stargunner

  • Topic Starter
  • 1,176 posts

Posted Tue Oct 17, 2017 2:06 PM

Ah

 

Here is one: http://atariage.com/...-1#entry2670337, in "sokoban asm.zip".

 

The comments are in french. If you are interested in using it, I could isolate it from my library. Arrows, insert, delete, clear and multiline (4 lines) are implemented.

 

The routine is in "LIB" file, it's called "INPUT". The return value is in "INPSTR", the first byte is the string length.

 

If you want to watch it running, load the ea5 file "SOKOBAN" and press "L".

 

Ah thanks!



#17 InsaneMultitasker OFFLINE  

InsaneMultitasker

    Stargunner

  • 1,731 posts

Posted Wed Oct 18, 2017 9:26 AM

This was originally written for one of my Geneve programs, then modified for 80 column use with a V9938.  Feel free to use or cannibalize the code.  I would do some things differently if I rewrote this routine today.  ;)

 

Spoiler


#18 Lee Stewart OFFLINE  

Lee Stewart

    River Patroller

  • 3,386 posts
  • Location:Silver Run, Maryland

Posted Wed Oct 18, 2017 11:39 AM

I believe I re-wrote the input routine in Assembler for the fbForth 40/80 column editor. I will look when I get home. 

 

...lee



#19 Lee Stewart OFFLINE  

Lee Stewart

    River Patroller

  • 3,386 posts
  • Location:Silver Run, Maryland

Posted Thu Oct 19, 2017 10:15 AM

All of the ALC for the 40/80 Column Editor is available on my fbForth website under “Source Code-->Bank 1-->40/80 Column Editor”  and the complete ALC source listing for fbForth 2.0:10 is under “Source Code-->fbForth 2.0 Listing (PDF)”.  RKEY is the key acquisition/repetition and cursor blinking routine.  _VED is the main editor loop, which is called by the Forth word VED when the editor is invoked.  Let me know if you need any clarification of the code.  Some of it is a little convoluted.

 

...lee



#20 TheBF OFFLINE  

TheBF

    Moonsweeper

  • 369 posts
  • Location:The Great White North

Posted Thu Oct 19, 2017 3:21 PM

Hey Lee, the product looks great up on Amazon.  Good on you!

 

B



#21 Lee Stewart OFFLINE  

Lee Stewart

    River Patroller

  • 3,386 posts
  • Location:Silver Run, Maryland

Posted Thu Oct 19, 2017 4:29 PM

Hey Lee, the product looks great up on Amazon.  Good on you!

 

B

 

Thank you, Kind Sir.

 

...lee



#22 senior_falcon OFFLINE  

senior_falcon

    Dragonstomper

  • 946 posts
  • Location:Lansing, NY, USA

Posted Thu Nov 2, 2017 3:07 PM

I'm looking for assembly source that puts a cursor on the screen, blinks the cursor, does left, right, input, delete. Like the INPUT statement in TI BASIC. Scrolling and multiple lines is not required.

Did you ever get a routine that did this to your satisfaction?



#23 adamantyr OFFLINE  

adamantyr

    Stargunner

  • Topic Starter
  • 1,176 posts

Posted Thu Nov 2, 2017 5:03 PM

Yeah I wrote something up with some inspiration from the supplied examples. Thanks!






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users