Jump to content
SteveB

Introducing Structured Extended BASIC and TiCodEd

Recommended Posts

Posted (edited)

One little detail: when editing an SXB text and you click beyond the end of a program line or an empty line, the cursor does snap to the last character on the line or the beginning of an empty line but rather stays where the mouse click occurred. This is a little annoying as you have to make sure you position the mouse cursor exactly after the last character if you want to make additions or deletions to the end of that line, a frequent occurrence.

 

One more thing: if a label has an underscore in it, it does not get translated to a line number. For example, scroll_right does not work, but scrollright does. Not a big deal but it may affect readability for long label names.

Edited by Vorticon
  • Like 1

Share this post


Link to post
Share on other sites

Hi everyone,

 

@grammostola and I today compiled TiCodEd for Mac OSX (Big Sur, Intel) and it works quite good. The Char Tab Preview doesn't work yet and there is actually no emulator with FIAD Support for the Mac. You may use Ralph's xdm99 to put the files into a disk-image using the "Post Processing" command on the Project Tab. You can find the Mac OSX Beta V 1.20 on http://lizardware.de/

 

Any Mac Users out there?

 

Steve and Grammostola

Share this post


Link to post
Share on other sites

I've been doing some coding the TiCodEd.

 

I think there is an area that can be improved.

 


// load array for digit display
for x=0 to 7
  for y=0 to 5
      read z
      one(x,y)=z
  next y
next x  


// define a zero
data 0,0,0,0,0,0
data 0,0,1,1,0,0
data 0,1,0,0,1,0
data 1,0,0,0,0,1
data 1,0,1,1,0,1
data 1,0,0,0,0,1
data 0,1,0,0,1,0
data 0,0,1,1,0,0

xb output
430 data 0,0,0,0,0,0
440 data 0,0,1,1,0,0
450 data 0,1,0,0,1,0
460 data 1,0,0,0,0,1
470 data 1,0,1,1,0,1
480 data 1,0,0,0,0,1

 

1) TiCodEd seems to violate it's own rules, the docs, say to put data statements in to the 20000 line numbers.

2) restore works with line numbers, the code above breaks down in to a new line for each line, which is logical, but I think it would be better to have a databegin and dataend statement so each blob of data went in to a single line to work more hand in hand with the restore statement, a simple warning could be issued the your data blob broke the length of a single line.

 

  My code above reads in a char def for 0, I have a 8 digits left. Anyone know of a good way to load arrays one, two, etc, with out resorting to 8 more double for loops?

 

 

 

Share this post


Link to post
Share on other sites

I finished a toy project in TICodEd. It's **AMAZING** the difference it makes in coding. Sooo Much Easier.

A big thanks to Steve for TICodEd and his help with questions I had along the way.

 

image.png.1d64a998972d9fa5f7d52afe47e30103.png

 

 

// comment 07-23-2021
call clear
call screen(9)
call color(5,2,9)

call char(65,"0000000000000000")
call char(66,"FFFFFFFFFFFFFFFF")


// data setup
dim zero(8,6)
dim one(8,6)
dim two(8,6)
dim three(8,6)
dim four(8,6)
dim five(8,6)
dim six(8,6)
dim seven(8,6)
dim eight(8,6)
dim nine(8,6)

// open clock
OPEN #1:"CLOCK"

// read clock
INPUT #1:A$,B$,C$


print "Loading arrays " ; c$
// load array for digit display
for x=0 to 7
  for y=0 to 5
      read z
      zero(x,y)=z
  next y
next x

// load array for digit display
for x=0 to 7
  for y=0 to 5
      read z
      one(x,y)=z
  next y
next x

// load array for digit display
for x=0 to 7
  for y=0 to 5
      read z
      two(x,y)=z
  next y
next x

// load array for digit display
for x=0 to 7
  for y=0 to 5
      read z
      three(x,y)=z
  next y
next x

// load array for digit display
for x=0 to 7
  for y=0 to 5
      read z
      four(x,y)=z
  next y
next x

// load array for digit display
for x=0 to 7
  for y=0 to 5
      read z
      five(x,y)=z
  next y
next x

// load array for digit display
for x=0 to 7
  for y=0 to 5
      read z
      six(x,y)=z
  next y
next x

// load array for digit display
for x=0 to 7
  for y=0 to 5
      read z
      seven(x,y)=z
  next y
next x

// load array for digit display
for x=0 to 7
  for y=0 to 5
      read z
      eight(x,y)=z
  next y
next x

// load array for digit display
for x=0 to 7
  for y=0 to 5
      read z
      nine(x,y)=z
  next y
next x
print "Finished Array " ; c$ ;

begin:
INPUT #1:A$,B$,C$

// make numbers of time
// on gosub doesn't work with zero, have to fake it
t1=asc(seg$(c$,1,1))
t1=t1-47
t2=asc(seg$(c$,2,1))
t2=t2-47
t3=asc(seg$(c$,4,1))
t3=t3-47
t4=asc(seg$(c$,5,1))
t4=t4-47
// print t1;t2;t3;t4

// get numbers in date
d1=asc(seg$(b$,1,1))
d1=d1-47
d2=asc(seg$(b$,2,1))
d2=d2-47
d3=asc(seg$(b$,4,1))
d3=d3-47
d4=asc(seg$(b$,5,1))
d4=d4-47

// print first digit - time
srow = 2
scol = 1
on t1 gosub pzero, pone, ptwo, pthree, pfour, pfive, psix, pseven, peight, pnine

// print second digit
srow = 2
scol = 09
on t2 gosub pzero, pone, ptwo, pthree, pfour, pfive, psix, pseven, peight, pnine

// print third digit
srow = 2
scol = 19
on t3 gosub pzero, pone, ptwo, pthree, pfour, pfive, psix, pseven, peight, pnine

// print fourth digit
srow = 2
scol = 27
on t4 gosub pzero, pone, ptwo, pthree, pfour, pfive, psix, pseven, peight, pnine


// print first digit - date
srow = 12
scol = 1
on d1 gosub pzero, pone, ptwo, pthree, pfour, pfive, psix, pseven, peight, pnine

// print second digit
srow = 12
scol = 09
on d2 gosub pzero, pone, ptwo, pthree, pfour, pfive, psix, pseven, peight, pnine

// print third digit
srow = 12
scol = 19
on d3 gosub pzero, pone, ptwo, pthree, pfour, pfive, psix, pseven, peight, pnine

// print fourth digit
srow = 12
scol = 27
on d4 gosub pzero, pone, ptwo, pthree, pfour, pfive, psix, pseven, peight, pnine


while s=0
  call key(0,k,s)

  // read clock
  INPUT #1:d$,e$,f$

  // tt = time test
  tt=asc(seg$(f$,5,1))
  tt=tt-47

  if t4 <> tt then goto begin

endwhile
end
// end of main program



// subroutines begin here

pzero:
for x=0 to 7
  for y=0 to 5
      If zero(x,y)=0 then call hchar(srow+x,scol+y,65,1) else call hchar(srow+x,scol+y,66,1)
  next y
next x
return

pone:
for x=0 to 7
  for y=0 to 5
      If one(x,y)=0 then call hchar(srow+x,scol+y,65,1) else call hchar(srow+x,scol+y,66,1)
  next y
next x
return

ptwo:
for x=0 to 7
  for y=0 to 5
      If two(x,y)=0 then call hchar(srow+x,scol+y,65,1) else call hchar(srow+x,scol+y,66,1)
  next y
next x
return

pthree:
for x=0 to 7
  for y=0 to 5
      If three(x,y)=0 then call hchar(srow+x,scol+y,65,1) else call hchar(srow+x,scol+y,66,1)
  next y
next x
return

pfour:
for x=0 to 7
  for y=0 to 5
      If four(x,y)=0 then call hchar(srow+x,scol+y,65,1) else call hchar(srow+x,scol+y,66,1)
  next y
next x
return

pfive:
for x=0 to 7
  for y=0 to 5
      If five(x,y)=0 then call hchar(srow+x,scol+y,65,1) else call hchar(srow+x,scol+y,66,1)
  next y
next x
return

psix:
for x=0 to 7
  for y=0 to 5
      If six(x,y)=0 then call hchar(srow+x,scol+y,65,1) else call hchar(srow+x,scol+y,66,1)
  next y
next x
return

pseven:
for x=0 to 7
  for y=0 to 5
      If seven(x,y)=0 then call hchar(srow+x,scol+y,65,1) else call hchar(srow+x,scol+y,66,1)
  next y
next x
return

peight:
for x=0 to 7
  for y=0 to 5
      If eight(x,y)=0 then call hchar(srow+x,scol+y,65,1) else call hchar(srow+x,scol+y,66,1)
  next y
next x
return

pnine:
for x=0 to 7
  for y=0 to 5
      If nine(x,y)=0 then call hchar(srow+x,scol+y,65,1) else call hchar(srow+x,scol+y,66,1)
  next y
next x
return


// data statements

// define a zero
data 0,0,0,0,0,0
data 0,0,1,1,0,0
data 0,1,0,0,1,0
data 1,0,0,0,0,1
data 1,0,1,1,0,1
data 1,0,0,0,0,1
data 0,1,0,0,1,0
data 0,0,1,1,0,0

// define a one
data 0,1,1,1,0,0
data 1,1,1,1,0,0
data 1,0,1,1,0,0
data 0,0,1,1,0,0
data 0,0,1,1,0,0
data 0,0,1,1,0,0
data 0,0,1,1,0,0
data 1,1,1,1,1,1

// define a two
data 0,1,1,1,0,0
data 1,0,0,0,1,0
data 0,0,0,0,0,1
data 0,0,0,0,1,0
data 0,0,0,1,0,0
data 0,0,1,0,0,0
data 0,1,0,0,0,0
data 1,1,1,1,1,1

// define a three
data 0,0,1,1,0,0
data 0,1,0,0,1,0
data 1,0,0,0,0,1
data 0,0,1,1,1,0
data 0,0,1,1,1,0
data 1,0,0,0,0,1
data 0,1,0,0,1,0
data 0,0,1,1,0,0

// define a four
data 0,0,0,1,1,0
data 0,0,1,0,1,0
data 0,1,0,0,1,0
data 1,1,1,1,1,0
data 0,0,0,0,1,0
data 0,0,0,0,1,0
data 0,0,0,0,1,0
data 0,0,0,0,1,0

// define a five
data 1,1,1,1,1,1
data 1,0,0,0,0,0
data 1,0,0,0,0,0
data 0,1,1,1,0,0
data 0,0,0,0,1,0
data 0,0,0,0,0,1
data 0,0,0,0,0,1
data 1,1,1,1,1,0

// define a six
data 0,0,0,1,1,0
data 0,0,1,0,0,0
data 0,1,0,0,0,0
data 1,0,1,1,0,0
data 1,0,0,0,1,0
data 1,0,0,0,0,1
data 0,1,0,0,1,0
data 0,0,1,1,0,0

// define a seven
data 1,1,1,1,1,1
data 0,0,0,0,1,0
data 0,0,0,0,1,0
data 0,0,0,1,0,0
data 0,0,0,1,0,0
data 0,0,1,0,0,0
data 0,0,1,0,0,0
data 0,1,0,0,0,0

// define a eight
data 0,0,1,1,0,0
data 0,1,0,0,1,0
data 1,0,0,0,0,1
data 0,1,0,0,1,0
data 0,0,1,1,0,0
data 0,1,0,0,1,0
data 0,1,0,0,1,0
data 0,0,1,1,0,0

// define a nine
data 0,0,1,1,0,0
data 0,1,0,0,1,0
data 1,0,0,0,0,1
data 0,1,0,0,1,0
data 0,0,1,1,0,1
data 0,0,0,0,0,1
data 0,0,0,0,1,0
data 0,0,1,1,0,0


// define a example
data 0,0,0,0,0,0
data 0,0,0,0,0,0
data 0,0,0,0,0,0
data 0,0,0,0,0,0
data 0,0,0,0,0,0
data 0,0,0,0,0,0
data 0,0,0,0,0,0
data 0,0,0,0,0,0





end

// ; - adjacent, , - next 14 char field, : - next line. 

 

 

  • Like 2

Share this post


Link to post
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.

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