Subject: creating XB code in a backhanded way...

From: "Marc H" <[email-masked]>
Date: Sat, 13 Mar 2010 06:20:24 -0000

Is there a way to create a string variable and save it to disk so that it can be merged into an XB program?

---

From: mark wills <[email-masked]>
Date: Fri, 12 Mar 2010 22:52:54 -0800 (PST)

Does it have to be merged? Can you not just save the string to disk and reload it later?

Save:

10 A$="this is a string"
20 OPEN #1:"DSK1.TEST",OUTPUT,DISPLAY,VARIABLE 80
30 PRINT #1:A$
40 CLOSE #1

-----

LOAD:
10 OPEN #1:"DSK1.TEST",INPUT,DISPLAY,VARIABLE 80
20 LINPUT #1:A$
30 CLOSE #1
40 PRINT A$

----- Original Message ----
> From: Marc H <[email-masked]>
> To: [email-masked]
> Sent: Sat, 13 March, 2010 6:20:24
> Subject: [TI994A] creating XB code in a backhanded way...
> 
> Is there a way to create a string variable and save it to disk so that it can be 
> merged into an XB 
> program?

------------------------------------

Yahoo! 
> Groups Links

>   
> >http://groups.yahoo.com/group/TI994A/

> href="http://groups.yahoo.com/group/TI994A/join" target=_blank 
> >http://groups.yahoo.com/group/TI994A/join
    (Yahoo! ID 
> required)

> href="mailto:[email-masked]">[email-masked] 
> 
    
> href="mailto:[email-masked]">[email-masked]

> ymailto="mailto:[email-masked]" 
> href="mailto:[email-masked]">[email-masked]

> href="http://docs.yahoo.com/info/terms/" target=_blank 
> >http://docs.yahoo.com/info/terms/

---

From: "Jacques Groslouis" <[email-masked]>
Date: Sat, 13 Mar 2010 07:08:56 -0400

Marc,

You can create a DV163 file containing XB token code that can be merged into 
an XB program. Bob Carmany wrote a program that did this a number of years 
ago. There were a few articles in the 99'er magazine, that were also 
included in their book 'Best of 99'er Vol 1', that explained the process. 
The XB tokens consist of the ASCII codes 129 to 255 and are included in a 
string by using the CHR$(x) function. For example, the token for PRINT is 
CHR$(156).

Regards,

Jacques

Nominate someone to your TI99HOF
Check out www.ti99hof.org

---

From: Marc Hull <[email-masked]>
Date: Sat, 13 Mar 2010 09:09:25 -0800 (PST)

Yea it's in the rules ;-)

--- On Sat, 3/13/10, mark wills <[email-masked]> wrote:

From: mark wills <[email-masked]>
Subject: Re: [TI994A] creating XB code in a backhanded way...
To: [email-masked]
Date: Saturday, March 13, 2010, 12:52 AM

  

Save:

10 A$="this is a string"

20 OPEN #1:"DSK1.TEST" ,OUTPUT,DISPLAY, VARIABLE 80

30 PRINT #1:A$

40 CLOSE #1

-----

LOAD:

10 OPEN #1:"DSK1.TEST" ,INPUT,DISPLAY, VARIABLE 80

20 LINPUT #1:A$

30 CLOSE #1

40 PRINT A$

----- Original Message ----

> From: Marc H <marc.hull@sbcglobal .net>

> To: TI994A@yahoogroups. com

> program?

------------ --------- --------- ------

Yahoo! 

> >http://groups. yahoo.com/ group/TI994A/

> href="http://groups. yahoo.com/ group/TI994A/ join" target=_blank 

> >http://groups. yahoo.com/ group/TI994A/ join

    (Yahoo! ID 

> href="mailto:TI994A-digest@ yahoogroups. com">TI994A-digest@ yahoogroups. com 

> href="mailto:TI994A-fullfeatured @yahoogroups. com">TI994A-fullfeatured @yahoogroups. com

> ymailto="mailto:TI994A-unsubscribe@ yahoogroups. com" 

> href="mailto:TI994A-unsubscribe@ yahoogroups. com">TI994A-unsubscribe@ yahoogroups. com

> href="http://docs. yahoo.com/ info/terms/" target=_blank 

> >http://docs. yahoo.com/ info/terms/

---

From: "epergrem" <[email-masked]>
Date: Sat, 13 Mar 2010 18:44:36 -0000

Hi Marc,

Are these rules created during game play or are they included with the game as a separate file? Just trying to understand why they need to be merged and not part of the original program code.

Thanks,
Ernie

--- In [email-masked], Marc Hull <marc.hull@...> wrote:
> --- On Sat, 3/13/10, mark wills <markrobertwills@...> wrote:
> 
>

---

From: Marc Hull <[email-masked]>
Date: Sat, 13 Mar 2010 11:01:48 -0800 (PST)

because the code requires data statements with ASCII CHR's from 80-200 and I'd rather not try to figure out all the keyboard combination's...  In short.... I am lazy ;-)

.-- On Sat, 3/13/10, epergrem <[email-masked]> wrote:

From: epergrem <[email-masked]>
Subject: [TI994A] Re: creating XB code in a backhanded way...
To: [email-masked]
Date: Saturday, March 13, 2010, 12:44 PM

  

      Hi Marc,

Thanks,

Ernie

--- In TI994A@yahoogroups. com, Marc Hull <marc.hull@. ..> wrote:

> --- On Sat, 3/13/10, mark wills <markrobertwills@ ...> wrote:

---

From: ti99_forever <[email-masked]>
Date: Sat, 13 Mar 2010 13:26:47 -0800 (PST)

So you'd rather do that than key in the numeric codes and translate using CHR$ after the READ statement?

Not judging, just trying to clarify.

--- On Sat, 3/13/10, Marc Hull <[email-masked]> wrote:

From: Marc Hull <[email-masked]>
Subject: Re: [TI994A] Re: creating XB code in a backhanded way...
To: [email-masked]
Date: Saturday, March 13, 2010, 2:01 PM

 

 

      Hi Marc,

Thanks,

Ernie

--- In TI994A@yahoogroups. com, Marc Hull <marc.hull@. ..> wrote:

---

From: "epergrem" <[email-masked]>
Date: Sat, 13 Mar 2010 21:56:12 -0000

A perfectly valid reason from my standpoint. :-)  So, my suggestion was going to be create the strings in Assembly and embed them in the XB program using Systex.  

Yes, it's defintely more confusing and I've never really understood how to pass a string from Assembly to XB, but then I seem to always start with the hardest way then work my way back to easy. :-)

Seriously though I have a cheat sheet for the keyboard if you want it.

Ernie

--- In [email-masked], Marc Hull <marc.hull@...> wrote:
>
> because the code requires data statements with ASCII CHR's from 80-200 and I'd rather not try to figure out all the keyboard combination's...Â  In short.... I am lazy ;-)
> 
> .-- On Sat, 3/13/10, epergrem <epergrem@...> wrote:
>

---

From: fdos <[email-masked]>
Date: Sat, 13 Mar 2010 16:01:46 -0700

Ernie,

Such knowledge should be available for download from our many helpful 
TI/Geneve websites.  Please.

Bill S

epergrem wrote:
>  
> 
> A perfectly valid reason from my standpoint. :-) So, my suggestion was 
> going to be create the strings in Assembly and embed them in the XB 
> program using Systex.
> 
> Yes, it's defintely more confusing and I've never really understood how 
> to pass a string from Assembly to XB, but then I seem to always start 
> with the hardest way then work my way back to easy. :-)
> 
> --- In [email-masked] <mailto:TI994A%40yahoogroups.com>, Marc 
> Hull <marc.hull@...> wrote:
>  >
>  > because the code requires data statements with ASCII CHR's from 
> 80-200 and I'd rather not try to figure out all the keyboard 
> combination's...Â  In short.... I am lazy ;-)
>  >

---

From: "epergrem" <[email-masked]>
Date: Sat, 13 Mar 2010 23:09:31 -0000

Thanks Bill,
I've probably never bothered to learn how because I much prefer Assembly to XB.  Even when I've ventured into XB, there has been an assembly component to XB.

I think the last 'pure' XB program I wrote was my 1990 CTIUG programming contest entry "Another Damn Label Maker". :-)

Ernie

---

From: Marc Hull <[email-masked]>
Date: Sat, 13 Mar 2010 17:05:49 -0800 (PST)

I am trying to save line space.  If I take a bunch of single data values and turn them into ASCII CHR$ in a string then I eliminate a bunch of commas and can get more data onto an XB  line.  Problem is.... how do you type a character 220 ?  I have a bunch if data values between 0 and 255 that I need to read  from the program and I figure one ASCII character is worth 3 numeric caracters and a comma.  Kind of an XB compression.

--- On Sat, 3/13/10, ti99_forever <[email-masked]> wrote:

From: ti99_forever <[email-masked]>
Subject: Re: [TI994A] Re: creating XB code in a backhanded way...
To: [email-masked]
Date: Saturday, March 13, 2010, 3:26 PM

  

--- On Sat, 3/13/10, Marc Hull <marc.hull@sbcglobal .net> wrote:

From: Marc Hull <marc.hull@sbcglobal .net>
Subject: Re: [TI994A] Re: creating XB code in a backhanded way...
To: TI994A@yahoogroups. com
Date: Saturday, March 13, 2010, 2:01 PM

 

because the code requires data statements with ASCII CHR's from 80-200 and I'd rather not try to figure out all the keyboard combination' s...  In short.... I am lazy ;-)

.-- On Sat, 3/13/10, epergrem <epergrem@yahoo. com> wrote:

From: epergrem <epergrem@yahoo. com>
Subject: [TI994A] Re: creating XB code in a backhanded way...
To: TI994A@yahoogroups. com
Date: Saturday, March 13, 2010, 12:44 PM

    

      Hi Marc,

Thanks,

Ernie

--- In TI994A@yahoogroups. com, Marc Hull <marc.hull@. ..> wrote:

---

From: ti99_forever <[email-masked]>
Date: Sat, 13 Mar 2010 17:24:12 -0800 (PST)

Makes sense. Since you are doing data statements, should be easy enough.
You will need, of course, the code for DATA, the code for a quoted string, the quote marks of course, the code for end of line (0), and at the beginning, two bytes for the line # 's and, IIRC, chr$(the length of the statement) itself.

This is all from the top of my head...

From: Marc Hull <[email-masked]>
Subject: Re: [TI994A] Re: creating XB code in a backhanded way...
To: [email-masked]
Date: Saturday, March 13, 2010, 8:05 PM

 

 

        

 

      Hi Marc,

Thanks,

Ernie

--- In TI994A@yahoogroups. com, Marc Hull <marc.hull@. ..> wrote:

---

From: "epergrem" <[email-masked]>
Date: Sun, 14 Mar 2010 02:31:43 -0000

Marc,

I'm not sure that there any keypresses on the TI keyboard that translates to CHR$(220).  

The lists that I sent you show the highest code as something like FCTN-H which translates to ASCII 191.

You could write a small XB program and displays the value of test combinations such as FCTN-CTRL-1, FCTN-CTRL-2, etc.  Perhaps those will generate the missing values.

Real helpful, ain't I. :-)
Ernie

---

From: "hexbus" <[email-masked]>
Date: Sun, 14 Mar 2010 03:46:53 -0000

I'd take the easy way out... put replacement characters (like "AAAAAAA") in the program, and go edit it with a sector editor once you save it. :)

Jon

---

From: "Jacques Groslouis" <[email-masked]>
Date: Sun, 14 Mar 2010 01:00:27 -0400

There only about 48 tokens that can be typed from the keyboard. You can test 
this by entering a line number followed by any of the following and then 
entering LIST:

Ctrl A to Z (except C, D, and W) will produce tokens 129  to 154 except for 
131, 132 and 151
Ctrl . ; = 8 9 and / will produce tokens 155 to 159
Ctrl 0 to 7 will produce tokens 176 to 183
Fctn , B H J K L M N Q ) and ; will produce most of the tokens between 184 
and 189

I do not believe that you can create from the keyboard any of the functions 
from 199 to 255. Remember that many of the Fctn keys are special purpose 
keys such as Fctn = E S X or D so there are no keys left over to create 
tokens. Also it makes no difference when entering these tokens whether or 
not they are upper or lower case. Ctrl A and Ctrl a gives the same result.

You should not be able to create an XB line with more than 163 tokens 
including characters for quoted and unquoted strings and tokens for line 
number without getting a 'Line Too Long' message. From the keyboard you can 
enter up to 8 lines but the program statement words, such as PRINT, are 
replaced with single character tokens thus reducing the length of the 
program line.

Jacques

----- Original Message ----- 
From: "epergrem" <[email-masked]>
To: <[email-masked]>
Sent: Saturday, March 13, 2010 10:31 PM
Subject: [TI994A] Re: creating XB code in a backhanded way...

Marc,

I'm not sure that there any keypresses on the TI keyboard that translates to 
CHR$(220).

The lists that I sent you show the highest code as something like FCTN-H 
which translates to ASCII 191.

You could write a small XB program and displays the value of test 
combinations such as FCTN-CTRL-1, FCTN-CTRL-2, etc.  Perhaps those will 
generate the missing values.

--- In [email-masked], Marc Hull <marc.hull@...> wrote:
>
> I am trying to save line space.Â If I take a bunch of single data values 
> and turn them into ASCII CHR$ in a string then I eliminate a bunch of 
> commas and can get more data onto an XBÂ line.Â Problem is.... how do you 
> type a character 220 ?Â I have a bunch if data values between 0 and 255 
> that I need to readÂ from the program and I figure one ASCII character is 
> worth 3 numeric caracters and a comma.Â Kind of an XB compression.

Yahoo! Groups Links

---

From: mark wills <[email-masked]>
Date: Sun, 14 Mar 2010 00:31:59 -0800 (PST)

Do something like
32000 DATA "ABCDEFGHIHJ...."

SAVE DSK1.PROG,MERGE

Then go edit it with a sector editor ;-)

That's what i'd do.

>Sent: Sun, 14 March, 2010 1:05:49

---

From: "epergrem" <[email-masked]>
Date: Sun, 14 Mar 2010 11:25:56 -0000

Marc,

I loves me some sector editor, but using it could become a pain if you want to modify the SB code later.  

I would create the strings in Assembly and use Barry Boone's Systex to embed them in the XB code.  It's not all that hard and it keeps the souce in human readable form, so it's easier to change and validate.  You then retrieve them a you need them.

LABEL  BYTE 200,201,202,203,....255

Ernie

---

From: "Jacques Groslouis" <[email-masked]>
Date: Sun, 14 Mar 2010 13:22:11 -0300

Marc,

The July issue of MICROpendium (page 45) contains a user note from Jim 
Peterson for a program that creates mergeable DATA statements. There is a 
correction in the September 1989 issue of MICROpendium.Although the program 
was intended to add instructions to a program you might be able to adapt it 
for use with tokens.

Regards,

Jacques

----- Original Message ----- 
From: "epergrem" <[email-masked]>
To: <[email-masked]>
Sent: Sunday, March 14, 2010 8:25 AM
Subject: [TI994A] Re: creating XB code in a backhanded way...

> I would create the strings in Assembly and use Barry Boone's Systex to 
> embed them in the XB code.  It's not all that hard and it keeps the souce 
> in human readable form, so it's easier to change and validate.  You then 
> retrieve them a you need them.
>

---

From: "Tursi" <[email-masked]>
Date: Sun, 14 Mar 2010 13:02:05 -0700

> LABEL  BYTE 200,201,202,203,....255

The contest disallows all assembly code, so he can't use Systex. :)

---

From: "epergrem" <[email-masked]>
Date: Sun, 14 Mar 2010 20:56:41 -0000

Ah, wasn't aware that it was for a contest.

---

From: Marc Hull <[email-masked]>
Date: Wed, 17 Mar 2010 05:31:33 -0700 (PDT)

Hmmm... The code to unroll the data was bigger than the original data.  Back to the drawing board...

--- On Sun, 3/14/10, epergrem <[email-masked]> wrote:

From: epergrem <[email-masked]>
Subject: [TI994A] Re: creating XB code in a backhanded way...
To: [email-masked]
Date: Sunday, March 14, 2010, 3:56 PM

  

--- In TI994A@yahoogroups. com, "Tursi" <yahoogroup@ ...> wrote:

---

From: mark wills <[email-masked]>
Date: Wed, 17 Mar 2010 15:20:53 -0700 (PDT)

Did you see the program I posted?

I was thinking about your problem, and realised you don't really need DATA and the self-modifying hoops to jump through in order to create it. Just use strings:

10 FOR I=0 TO 255::A$=A$&CHR$(I)::NEXT I

What is it you are trying to do?

Mark

>Sent: Wed, 17 March, 2010 12:31:33

---

From: Marc Hull <[email-masked]>
Date: Thu, 18 Mar 2010 06:47:51 -0700 (PDT)

This was for Owen's Farging 30 line contest (BTW Owen, I have a brick for your car windshield  waiting and ready ;-).  What I wanted to do was store a bunch of integer values from 1 to 220 in a string variable as ASCII characters and then convert that to an array of numbers.  Turns out the code to convert used as much line space than the data itself though so I punted that idea and found some fat to trim elsewhere.  One of the rules to Satan's contest is that the program has to be self contained (no data on disk etc)  which is why I was trying to convert the data to begin with...  Everyone's Ideas were helpful and I learned a couple tricks I had not thought of so it was not a waste of time anyway...

--- On Wed, 3/17/10, mark wills <[email-masked]> wrote:

From: mark wills <[email-masked]>
Subject: Re: [TI994A] Re: creating XB code in a backhanded way...
To: [email-masked]
Date: Wednesday, March 17, 2010, 5:20 PM

  

Mark

From: Marc Hull
 <marc.hull@sbcglobal .net>
To: TI994A@yahoogroups. com
Sent: Wed, 17 March, 2010 12:31:33
Subject: Re: [TI994A] Re: creating XB code in a backhanded way...

--- On Sun, 3/14/10, epergrem <epergrem@yahoo. com> wrote:

 

--- In TI994A@yahoogroups. com, "Tursi" <yahoogroup@ ...> wrote: