Jump to content
IGNORED

Spectrum BASIC Print At Alternative


jonesypeter

Recommended Posts

Hello,

 

In Spectrum BASIC the Print Command can have the word 'At' added so for example:

 

Print At 10,10;A$

 

Would print at line 10, column 10 the contents of A$

 

I have looked through the TI BASIC manual for locate or anything similar and can't find an alternative?  Is there anything?  I'm happy to use extended BASIC if needed.

 

Thanks

 

Update - I knew as soon as I posted I would find the answer!  Display seems to do what I want.  Cheers

Edited by jonesypeter
  • Like 1
Link to comment
Share on other sites

13 minutes ago, jonesypeter said:

Hello,

 

In Spectrum BASIC the Print Command can have the word 'At' added so for example:

 

Print At 10,10;A$

 

Would print at line 10, column 10 the contents of A$

 

I have looked through the TI BASIC manual for locate or anything similar and can't find an alternative?  Is there anything?  I'm happy to use extended BASIC if needed.

 

Thanks

 

Update - I knew as soon as I posted I would find the answer!  Display seems to do what I want.  Cheers

Hmm Extended Basic has DISPLAY AT(row,column):A$

 

RXB has CALL HPUT(row,column,variable) or CALL VPUT(row,column,variable)

  • Like 2
Link to comment
Share on other sites

3 hours ago, jonesypeter said:

Hello,

 

In Spectrum BASIC the Print Command can have the word 'At' added so for example:

 

Print At 10,10;A$

 

Would print at line 10, column 10 the contents of A$

 

I have looked through the TI BASIC manual for locate or anything similar and can't find an alternative?  Is there anything?  I'm happy to use extended BASIC if needed.

 

Thanks

 

Update - I knew as soon as I posted I would find the answer!  Display seems to do what I want.  Cheers

This is also possible in TI BASIC, but it’s cumbersome compared to Extended BASIC.

 

Using your example:

100 FOR I=1 TO LEN(A$)

110 CALL HCHAR(10,10+I-1,ASC(SEG$(A$,I,1)))

120 NEXT I

 

 

  • Like 4
Link to comment
Share on other sites

3 hours ago, Casey said:

This is also possible in TI BASIC, but it’s cumbersome compared to Extended BASIC.

 

Using your example:

100 FOR I=1 TO LEN(A$)

110 CALL HCHAR(10,10+I-1,ASC(SEG$(A$,I,1)))

120 NEXT I

 

 

RXB has CALL HPUT(row,column,variable) 

The variable can be STRING VARIABLE or NUMERIC VARIBLE.

 

So your example would just be a single line 

110 CALL HPUT(10,10,A$)

 

or

 

110 CALL VPUT(10,10,A$) 

 

HPUT does horizontal and VPUT does vertical.

 

Now XB DISPLAY AT(row,column):variable has a problem in it can only use 28 characters across just like PRINT does.

  • Like 3
Link to comment
Share on other sites

are you using an Spectrum emulator? if so, do you know a way to cut and paste a program file into any kind of spectrum emulator like you can do in classic99 (and most other emulators)? I would like to play around with a spectrum but don't want to have to learn all the odd key placements.

Link to comment
Share on other sites

18 hours ago, hloberg said:

are you using an Spectrum emulator? if so, do you know a way to cut and paste a program file into any kind of spectrum emulator like you can do in classic99 (and most other emulators)? I would like to play around with a spectrum but don't want to have to learn all the odd key placements.

Hi, I use both real hardware and an emulator.  The best way is to set the machine type to the 128K model then you just type the commands as you do with the TI. Fuse is the best emulator.

 

http://fuse-emulator.sourceforge.net/

  • Thanks 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...