Jump to content
senior_falcon

Playground

Recommended Posts

@Lee and Dragonstomper I am truly amazed by your skills and tenacity towards Gazoo's challenge. I am so glad that he could see his last challenge accomplished thanks to your help. I think that what you 3 did is holywood material. Was software your hobby or did you work as software developers during your life? You seem to be pros,

I'm all for making a movie of this story. Just for realism I would like to play myself, and there should be a hot young starlet written into the script as my romantic companion. Hollywood, here I come!!

Writing software has been a hobby of mine since the mid 1980's. I am self taught and have always used the TI99. My lack of training means I'm too dumb to know that something can't be done, and so I just persist until I can find a way to do it.

  • Like 2

Share this post


Link to post
Share on other sites

I'm all for making a movie of this story. Just for realism I would like to play myself, and there should be a hot young starlet written into the script as my romantic companion.

 

 

Like Mila?

mila3.jpg

Share this post


Link to post
Share on other sites

 

Hi all,let me introduce myself i was the pround owner of a ti when was twelve,
34 years ago,I'm from Paris,that's why my english is so poor apologize,and you could
be sure that PARIS WILL LIVE.
I wrote this piece of s... because PLAYGROUND was the prog that always wanted to have.
It's basicaly a simple assembler disassembler in playgroung env.
ALL Values are in Hex ,OP codes and commands DATA,END,NEW,AORG,OLD CS1
Let me know what you think about this.

Moije, the entire civilized world stands with the French people in this sad time.

Your english is nothing to apologize for - it is perfectly understandable. Now if you really wanted to have some fun I could post a letter using my one year of French that I barely passed 50 years ago, but it would not be nice to subject you to such torture!

Can you upload your program all assembled and ready to RUN in BASIC, and also any instructions needed to use the program. This looks interesting and it is really nice to see someone actually doing something with my program.

  • Like 1

Share this post


Link to post
Share on other sites

Thank you senior_falcon for your support and congratulations for writting this code.

Now I'm not sure what path to take:

a)

try to write a real assembler dedicated to PG

with labels and counting bytes

or control structures like C/Pascal

b)

make a RAM emulator from VDP(emulate a 9900 in a ti99!)

at run time

or compiled

what do you think BIG KIDS?

I'm really not convinced of my skills for those tasks...

Edited by moije

Share this post


Link to post
Share on other sites

Hi Moije:

It looks very interesting, but so far I have not been able to test out your program. The BASIC program you included will load but hangs immediately when it is run. I have no idea how to load a WAV file. I tried to assemble your source code but every line starts at the first column which makes the assembler very unhappy, and I didn't feel like going through all 1000+ lines to insert spaces or tabs.

Your use of POP is very interesting. Can you post more information on how this is accomplished. (And don't worry about your English skills!)

Thanks, Harry

Share this post


Link to post
Share on other sites

Sorry I correct the post now it should assemble.

I tried the fiad file with classic99 and the wav file with mess.

In mess there is a bug you must type "run" not "RUN" don't

know why????

Ok i understand,my idea was to use this to make

small utilities from XB to SB like merge,peek,poke,sprite,motion,charpat,magnify

with only the loader no page but know i can see that it must use scroll to start

isn't it senior_falcon?

Edited by moije

Share this post


Link to post
Share on other sites

OK, now the source code assembles without error. But it still doesn't run - I think that is because you have made some changes to the loader to allow a stack. As it turns out, KDA runs but not every time. Sometimes it hangs and sometimes it works fine. I will dig a little deeper into your code to see what you have done. Your use of a stack seems very useful but it will take me some time to figure out your technique for this. I have finally found someone who uses fewer comments than I do! Of course, if you had used comments they would probably be in French, so they wouldn't help me anyway.

Share this post


Link to post
Share on other sites

As I said the problem is with the interrupt we can't know when it will occcur.

We can restore the original user interrupt but then no possibility to bypass the scroll or the clearscreen.

And so no utility that could return to basic without changing the screen.

For comments in my code,it would take me a realy long time to write them in English.

I know it's very hard to understand assembly without comments,if you want I can try but i'm not sure to continue thru that way:

Assembler;

Ram emu

?

When I wrote the dsrlnk I found that it uses >83D0 and >83D2 and I wanted to keep the code small

not to reproduce routines like nibble to bin,word to bin,print nibble,print word

I decided to emu the intel 8086 stack and for furter devel. maybe C like structures as It was designed for

stack based cpus.

ex:

mov bp,sp MOV R9,R8

sub sp,4 AI R9,-4

mov [sp+2],ax MOV R0,@2(R9)

mov ax, LI R0,

... do something

mov sp,bp MOV R8,R9

ret BL @RET

DATA POP

again from i386 call far ptr that is push segment push offset call seg:off pop offset pop seg

to create sub stack push page push offset.

 

We people from France and You people from USA have a lot in common,we realy appreciate

what you have done and what you are doing for us and Liberty,thanks again.

But this is not the place for that so it will be my last reference to politic in this blog.

Edited by moije

Share this post


Link to post
Share on other sites

Saint Exupery's "Letter to an American" just about says it all. If you have not read this it can be found here:

http://www.sheilaomalley.com/?p=3066

 

You write about returning to BASIC. Since the scratchpad is overwritten by the playground loader I do not see how you could return. If you mean that you do not want to modify anything in the VDP before the assembly program takes over, then I think that can be done. I have disassembled your loader and now will be able to see what is going on.

Share this post


Link to post
Share on other sites

This one is more stable but need the interrupt.

The loader itself just overwrites the gpl part of the pad not the basic part >834A is the fac.

Edited by moije

Share this post


Link to post
Share on other sites

I have made a couple of improvements to your modified loader so that it handles the stack pointer differently. I will test this weekend (hopefully) and then post here.

  • Like 2

Share this post


Link to post
Share on other sites

As written, Playground tricks BASIC into loading code into the scratchpad with an OPEN statement using a string of over 128 bytes in length. 3 things are done in the code that is loaded:

1 - >27E3 is put on the GPL stack. This routine clears the screen, loads the standard character set (upper and lower case), sets the colors.

2 - >4D00 is put on the GPL stack. This scrolls the screen. This does nothing useful, except that scroll in BASIC is slow and you are guaranteed to get an interrupt while scrolling.

3 - sets >83C4 to point to an interrupt routine to look at the gpl stack pointer. Once this routine sees that the TI is doing a scroll it clears the interrupt hook at >83C4 and turns control over to the playground loader starting at >834A where some more initializing is done before going to the page loader.

 

@moije: I understand what you did to modify the pageloader so that you could use a stack for multiple levels of subroutines. What I do not understand is the reason you modified other parts of MAKEBX. Is there something about your program that requires it to be initialized differently?

I have modified the pageloader so you do not require INCT R9 before BL @NEXT and have slimmed down the POP subroutine by 2 words.

  • Like 1

Share this post


Link to post
Share on other sites

Can anyone explain, in simple terms, how Playground manages to escape from the Sandbox? What is the trigger that makes it execute an assembly language program and back to basic?

 

Thanks.

Share this post


Link to post
Share on other sites

Can anyone explain, in simple terms, how Playground manages to escape from the Sandbox? What is the trigger that makes it execute an assembly language program and back to basic?

 

Thanks.

 

In simple terms the trick is to ask BASIC to open a file with a long (> 128 characters) filename. Because of a bug in the firmware this filename ends up being copied into scratchpad RAM where it overwrites the return address of one of the subroutine calls involved in opening the file. By carefully constructing the filename you can therefore make the subroutine return to an address of your choice. This address can point to machine code you have embedded in the filename, which will then be executed.

 

I hope I got that right. The full explanation is here:

http://atariage.com/forums/topic/162941-assembly-on-the-994a/page-11?do=findComment&comment=2849894

  • Like 1

Share this post


Link to post
Share on other sites

 

In simple terms the trick is to ask BASIC to open a file with a long (> 128 characters) filename. Because of a bug in the firmware this filename ends up being copied into scratchpad RAM where it overwrites the return address of one of the subroutine calls involved in opening the file. By carefully constructing the filename you can therefore make the subroutine return to an address of your choice. This address can point to machine code you have embedded in the filename, which will then be executed.

 

I hope I got that right. The full explanation is here:

http://atariage.com/forums/topic/162941-assembly-on-the-994a/page-11?do=findComment&comment=2849894

 

Thanks Rasmus, this is exactly what I was looking for.

Share this post


Link to post
Share on other sites

Can anyone explain, in simple terms, how Playground manages to escape from the Sandbox? What is the trigger that makes it execute an assembly language program and back to basic?

 

Thanks.

Couple of points:

You cannot return to BASIC. More than half the scratchpad is overwritten and there is no way (at least that I can think of) to figure out where you were in the BASIC.

James' method had to ask what the console version was. Turns out you can just put the address of the assembly code in >83C4 and let the interrupt routine start the program.

  • Like 1

Share this post


Link to post
Share on other sites

For big kids only!

 

My Kid Kit:

 

Kid EDitor

Kid ASsembler

Kid LiNker

Lines

Kid UTiLities:

VSBW

VMBW

VSBR

VMBR

VWTR

KSCAN

VMVW

VMVR

GPLLNK

DSRLNK

XMLLNK

VMBF

VWVL

MMVRAM

BAVRAM

EDITOR

SCROLL

VMBC

RANDOM

Kid Memory Editor:

DWHX

RHXW

WTKEY

MEMED

Kid Dis/Assembler

Kid 4 Basic:

NUMREF

STRREF

NUMASG

STRASG

Kid SUBs:

LOAD

PEEK

POKEV

PEEKV

CHARPAT

Kid eXtended Basic:

MAGNIFY

LOCATE

PATTERN

COLOR

MOTION

SPRITE

DELSPRITE

POSITION

COINC

DISTANCE

CHARSET

DISPLAY AT

ACCEPT AT

INIT

LOAD

PEEK

CHARPAT

Kid MerGeR

 

Ked

*Kid Editor
*Editor for TI99/4A console
*and 1 tape recorder only,uses the
*PlayGround Loader by Harry Wilhelm
*For big Kids ONLY!
*line validation is done by up or down arrows
*commands begin with !
*ENTER for functions
*creates screen images with 1 word size header
CALL EQU >837E save offset and page
NEXT EQU >8384 save page
RET EQU >8386 save nothing
WKSP EQU >83A2 workspace
PAD EQU >8300 scratchpad ram
L0 EQU WKSP+1 less " "
M1 EQU WKSP+2
L1 EQU WKSP+3
M3 EQU WKSP+6
L3 EQU WKSP+7
M4 EQU WKSP+8
L4 EQU WKSP+9
M6 EQU WKSP+12
L6 EQU WKSP+13
L7 EQU WKSP+15
M8 EQU WKSP+16
L8 EQU WKSP+17
M11 EQU WKSP+22
L11 EQU WKSP+23
L12 EQU WKSP+25
NLS EQU 12 number of lines in screen
ITL EQU 64 increment to line
MAX EQU 24+32 max line size
FLN EQU 0 first line
LLN EQU FLN+>300-ITL last line
FBUF EQU >B00 file buffer
FPTR EQU >83D0 file pointer
FEND EQU >8376 file end
PAB EQU >320 my peripheral access block
BUF EQU >8346 print/read buffer
SPC EQU >700 scratchpad copy
*modifies loader to use stack
MOD DATA MODE-MOD-2
LI R9,>8370 SP
LI R11,>0649 = CALL DECT R9
MOV R11,@>837E
LI R12,>C64B = MOV R11,R9 PC
MOV R12,@>8380
MOV R11,@>8382 DECT R9
LI R12,>C65B = NEXT MOV *R11,R9 page
MOV R12,@>8384
* RET
BL @NEXT
DATA BEG
MODE
TIT
BYTE >8A,>8A,>80 **
BYTE >AB,>C9,>C4,>A5,>C4,>C9,>D4,>CF,>D2 KidEditor
BYTE >80,>8A,>8A **
TITE
EVEN
*pops Program Counter and page from stack
POP DATA POPE-POPS
POPS
INCT R9 Stack Pointer
MOV *R9+,R11 PC
MOV *R9,R12 page
A R13,R12
MOVB @L12,*R15
MOVB R12,*R15
INCT R11
LI R12,>8300
JMP POPS+>94
POPE
MOVVU DATA MOVVUE-MOVVU-2
SOC R2,R2
JEQ MOVVUX
ORI R1,>4000
MOVVUL
MOVB @L0,*R15
MOVB R0,*R15
INC R0
MOVB *R14,R11
MOVB @L1,*R15
MOVB R1,*R15
INC R1
MOVB R11,*R10
DEC R2
JNE MOVVUL
MOVVUX
BL @RET
DATA POP
MOVVUE
*begin
BEG DATA BEGE-BEG-2
LI R0,TIT-1
A R13,R0
LI R1,LLN+2-ITL
LI R2,TITE-TIT
SETO R3
BL @CALL
DATA MOVVU
LI R12,>8705 VDP7 blue
MOVB @L12,*R15
MOVB R12,*R15
LI R12,>430F 0 basic char set
MOVB @L12,*R15
MOVB R12,*R15
LI R12,>F500 white on blue
LI R11,17
CLTL
MOVB R12,*R10
DEC R11
JNE CLTL
BL @NEXT
DATA BEG2
BEGE
PNUM DATA PNUME-PNUMS
PNUMS
MOV R8,R12
AI R12,-5+>4000
MOVB @L12,*R15
MOVB R12,*R15
MOV @FPTR,R2
AI R2,-FBUF
LI R12,4
SRC R2,4
PWHL
MOV R2,R11
ANDI R11,>0F00
AI R11,>9000 0
CI R11,>9900 9
JLE PWHN
PWHLE
AI R11,>700 A-9+1
PWHN
MOVB R11,@>8C00
SRC R2,12
DEC R12
JNE PWHL
LI R11,>BF00
MOVB R11,@>8C00
BL @RET
DATA POP
PNUME
SW DATA SWE-SW-2
MOV R0,R12
MOV R0,R11
ANDI R12,>FF
AI R12,SPC+>4000
MOVB @L12,*R15
MOVB R12,*R15
MOVB *R11+,*R10
MOVB *R11,*R10
BL @RET
DATA POP
SWE
BEG2 DATA BEG2E-BEG2-2
LI R12,FBUF
CLR R6
LI R7,>2000
MOVB @L12,*R15
MOVB R12,*R15
NEL
MOVB R6,*R10
DEC R7
JNE NEL
LI R8,FLN+5
MOV R12,@FPTR
MOV R12,@FEND
BL @CALL
DATA PNUM
CLR R1
LI R0,M1
BL @CALL
DATA SW
CLR R3
LI R0,M1
BL @CALL
DATA SW
SETO R4
LI R0,M1
BL @CALL
DATA SW
BL @NEXT
DATA EDIT
BEG2E
EDITOR DATA EDITOE-EDITOS
EDITOS
CLR R11
JMP EDITH
EDITHR
MOV R0,@>8320
LWPI >83E0
MOV @>0050,R4
MOV @WKSP+12,R6 old R6 on R6
BL *R4
INCT @>8373
JMP AFT20
DATA EDIXRT-EDITOS+PAD
EDIXAD DATA >1675
DATA 0
AFT20
MOV @EDIXAD-EDITOS+PAD,@>8302(R4)
JMP AFT2A
DATA 0
AFT2A
B @>0060
EDIXRT
MOV @>166C,R4
BL *R4
LWPI WKSP
LI R11,>D7EB = MOVB clear dels
MOV R11,@>8388
MOV @>832A,R1
MOVB R12,@>8373 restores subtask pointer
BL @RET
DATA POP
EDITH
MOVB @>8373,R12
MOVB R11,@>8373 set subtask pointer to PAD
MOV R1,@>832A
MOV R2,@>835E !!
JMP EDITHR
EDITOE
EDIT DATA EDIT1E-EDIT-2
MOV R8,R0 start of line
AI R0,-FLN
MOV R0,R1 end of line
A R7,R1 + size of line
MOV R0,R2 max of line
AI R2,MAX + max
LI R6,>2A49 2nd entry EDITOR
BL @CALL
DATA EDITOR
MOVB @L8,*R15
MOVB R8,*R15
CLR R12
MOVB *R14,R12
CI R12,>8100 ! commands
JNE CONT
BL @NEXT
DATA ACT
CONT
BL @CALL
DATA MOVIN
CLR R5
MOVB @>8375,R5
BL @NEXT
DATA EDIT2
EDIT1E
NAVU DATA NAVU2E-NAVU-2
MOV @FPTR,R12
NAVUL
DEC R12
MOVB @L12,*R15
MOVB R12,*R15
MOVB *R14,@L7
JLT NAVUL
MOV R12,@FPTR
AI R8,-ITL
CI R8,FLN+4
JGT NAVUX
LI R8,FLN+5
CLR R0
LI R1,ITL
LI R2,>300-ITL
BL @CALL
DATA MOVVD
NAVUX
BL @CALL
DATA PNUM
BL @CALL
DATA PLIN
BL @RET
DATA POP
NAVU2E
NAVD DATA NAVDE-NAVD-2
MOV @FPTR,R12
A R7,R12
INC R12
MOVB @L12,*R15
MOVB R12,*R15
MOVB *R14,@L7
MOV R12,@FPTR
BL @NEXT
DATA NAVD2
NAVDE
NAVD2 DATA NAVD2E-NAVD2-2
AI R8,ITL
CI R8,LLN+5
JLE NAVDX
LI R8,LLN+5
LI R0,ITL
CLR R1
LI R2,>300-ITL
BL @CALL
DATA MOVVU
NAVDX
C @FPTR,@FEND
JNE NNL
BL @CALL
DATA CLIN
CLR R7
JMP NAVD2X
NNL
BL @CALL
DATA PLIN
NAVD2X
BL @CALL
DATA PNUM
BL @RET
DATA POP
NAVD2E
EDIT2 DATA EDIT2E-EDIT2-2
CI R5,>0D00 Enter
JNE TUP
BL @CALL
DATA WAITKY
MOVB @>8375,R5
BL @CALL
DATA TSTK
JMP EDIT2X
TUP
CI R5,>0B00 up line
JNE DWN
LI R12,FBUF
C @FPTR,R12
JEQ EDIT2X
BL @CALL
DATA NAVU
JMP EDIT2X
DWN
* down line
C @FPTR,@FEND
JNE GAG
MOV R4,@FPTR
C R4,@FEND
JLE NEND
MOV R4,@FEND
NEND
BL @CALL
DATA NAVD2
JMP EDIT2X
GAG
BL @CALL
DATA NAVD
EDIT2X
BL @NEXT
DATA EDIT
EDIT2E
ACT DATA ACTE-ACT-2
LI R0,FPTR
BL @CALL
DATA SW
MOV @FPTR,R7
MOV R7,R12
DECT R12
MOVB @L12,*R15
MOVB R12,*R15
MOVB *R14,R6
MOVB *R14,@L6
LI R0,M6
BL @CALL
DATA SW
BL @RET
DATA ACT2
ACTE
ACT2 DATA ACT2E-ACT2-2
INC R8
MOVB @L8,*R15
MOVB R8,*R15
CLR R5
MOVB *R14,R5
LI R0,BUF
MOV R0,R1
LI R11,25
LOOP
MOVB *R14,*R1+
DEC R11
JNE LOOP
BL @NEXT
DATA ACT3
ACT2E
ACT3 DATA ACT3E-ACT3-2
CI R5,>A600 Find 'string'
JNE NF
BL @NEXT
DATA FI
NF
CI R5,>B300 Save to "device"
JNE NS
BL @RET
DATA SA
NS
CI R5,>AC00 Load from "device"
JNE NL
BL @RET
DATA LO
NL
CI R5,>A800 Home
JNE NH
BL @RET
DATA HO
NH
BL @RET
DATA ACT4
ACT3E
ACT4 DATA ACT4E-ACT4-2
CI R5,>A300 Clear
JNE NC
BL @RET
DATA CL
NC
CI R5,>A500 End
JNE NE
BL @RET
DATA EN
NE
BL @NEXT
DATA ERR
ACT4E
ERR DATA FI3E-ERR-2
LI R6,>36 bad tone
BL @CALL
DATA EDITOR
BL @CALL
DATA RW
LI R0,FPTR
BL @CALL
DATA RW
MOV @FPTR,R6
JMP FI3+2
FI3 DATA FI3E-FI3-2
LI R8,FLN+5
MOVB @L6,*R15
MOVB R6,*R15
MOVB *R14,R7
SRL R7,8
BL @CALL
DATA PAG
MOV R6,@FPTR
MOVB @L6,*R15
MOVB R6,*R15
MOVB *R14,R7
SRL R7,8
BL @NEXT
DATA EDIT
FI3E
CL DATA CLE-CL-2
MOV @FPTR,R6
MOV R6,@FEND
BL @NEXT
DATA FI3
CLE
HO DATA HOE-HO-2
LI R6,FBUF
MOV R6,@FPTR
BL @NEXT
DATA FI3
HOE
EN DATA ENE-EN-2
MOV @FEND,R6
MOV R6,@FPTR
BL @NEXT
DATA FI3
ENE
FI DATA FIE-FI-2
CLR R11
MOVB *R0+,R11
CI R11,>8700 '
JEQ FIL
FIER
BL @NEXT
DATA ERR
FIL
MOVB *R0+,R12
CI R0,BUF+11
JEQ FIER
CB *R0,R11
JNE FIL
CLR R3
MOV @FPTR,R4
BL @RET
DATA FI2
FIE
FI2 DATA FI2E-FI2-2
MOVB @L4,*R15
MOVB R4,*R15
FI2L1
C R4,@FEND
JNE FI2NE
BL @NEXT
DATA ERR
FI2NE
INC R3
MOV R4,R6
MOVB *R14,R11
SRL R11,8
A R11,R4
INC R4
SOC R11,R11
JEQ FI2L1
FI2L
LI R1,BUF+1
FI2L2
DEC R11
JLT FI2L1
MOVB *R14,R12
CB *R1,R12
JNE FI2L
INC R1
C R1,R0
JNE FI2L2
MOV R6,@FPTR
BL @NEXT
DATA FI3
FI2E
PLIN DATA PLINE-PLIN-2
MOV R8,R11
ORI R11,>4000
MOVB @L11,*R15
MOVB R11,*R15
LI R11,>8000
LI R12,ITL-5-2
PCLR
MOVB R11,*R10
DEC R12
JNE PCLR
SOC R7,R7
JEQ PLINX
MOV @FPTR,R0
INC R0
MOV R8,R1
MOV R7,R2
BL @CALL
DATA MOVVU
PLINX
BL @RET
DATA POP
PLINE
CLIN DATA CLINE-CLIN-2
MOV R8,R11
AI R11,-5+>4000
MOVB @L11,*R15
MOVB R11,*R15
LI R11,>8000
LI R12,ITL-2
DCLR
MOVB R11,*R10
DEC R12
JNE DCLR
BL @RET
DATA POP
CLINE
RW DATA RWE-RW-2
MOV R0,R12
MOV R0,R11
ANDI R12,>FF
AI R12,SPC
MOVB @L12,*R15
MOVB R12,*R15
MOVB *R14,*R11+
MOVB *R14,*R11
BL @RET
DATA POP
RWE
PAG DATA PAGE-PAG-2
LI R0,M8
BL @CALL
DATA SW
SETO R5
PAGL
C @FPTR,@FEND
JEQ NPL
BL @CALL
DATA PNUM
BL @CALL
DATA PLIN
MOV @FPTR,R12
A R7,R12
INC R12
MOVB @L12,*R15
MOVB R12,*R15
MOVB *R14,@L7
MOV R12,@FPTR
JMP NPL2
NPL
BL @CALL
DATA CLIN
INC R5
JNE NPL2
BL @CALL
DATA PNUM
NPL2
AI R8,ITL
CI R8,LLN+5+ITL
JNE PAGL
LI R0,M8
BL @CALL
DATA RW
BL @RET
DATA POP
PAGE
POER DATA ACRE-POER-2
LI R6,>36 bad tone
BL @CALL
DATA EDITOR
JMP ACR+2
ACR DATA ACRE-ACR-2
LI R8,FLN+5
LI R0,FPTR
BL @CALL
DATA RW
MOVB @FPTR+1,*R15
MOVB @FPTR,*R15
MOVB *R14,R7
SRL R7,8
BL @CALL
DATA RW
BL @CALL
DATA CLSC
BL @CALL
DATA PAG
BL @NEXT
DATA ACR2
ACRE
ACR2 DATA ACR2E-ACR2-2
LI R8,FLN+5
LI R0,FPTR
BL @CALL
DATA RW
MOV @FPTR,R1
MOVB @L1,*R15
MOVB R1,*R15
MOVB *R14,R7
SRL R7,8
LI R0,M6
BL @CALL
DATA RW
AI R1,-2+>4000
MOVB @L1,*R15
MOVB R1,*R15
MOVB R6,*R10
MOVB @L6,*R10
BL @NEXT
DATA EDIT
ACR2E
TSTK DATA TSTKE-TSTK-2
CI R5,>5500 Up page
JNE TSTD
BL @NEXT
DATA PAGU
TSTD
CI R5,>4400 Down page
JNE TSTE
BL @NEXT
DATA PAGD
TSTE
CI R5,>4500 E erase line
JNE TSTN
BL @NEXT
DATA ELIN
TSTN
CI R5,>4E00 N new line
JNE TSTSP
BL @NEXT
DATA NLIN
TSTSP
CI R5,>2000 space select
JNE TSTKX
BL @NEXT
DATA TSTK2
TSTKX
BL @NEXT
DATA TSTK1
TSTKE
TSTK1 DATA TSTK1E-TSTK1-2
CI R5,>5300 S block suppression
JNE TSTC
BL @NEXT
DATA ER
TSTC
CI R5,>4300 Copy block
JNE TSTEN
BL @NEXT
DATA COP0
TSTEN
CI R5,>0D00 Enter unselect
JNE TSTK1X
CLR R1
LI R0,M1
BL @CALL
DATA SW
CLR R3
LI R0,M1
BL @CALL
DATA SW
SETO R4
LI R0,M1
BL @CALL
DATA SW
TSTK1X
BL @RET
DATA POP
TSTK1E
TSTK2 DATA TSTK2E-TSTK2-2
LI R0,M1
BL @CALL
DATA RW
SOC R1,R1
JNE ST
MOV @FPTR,R3
LI R0,M3
BL @CALL
DATA SW
JMP TSTK2X
ST
CI R1,1
JNE FT
MOV @FPTR,R4
LI R0,M4
BL @CALL
DATA SW
JMP TSTK2X
FT
SETO R1
TSTK2X
INC R1
LI R0,M1
BL @CALL
DATA SW
BL @RET
DATA POP
TSTK2E
ER DATA ERE-ER-2
MOV @FPTR,R4
LI R0,M3
BL @CALL
DATA RW
C R4,R3
JL EROK
LI R6,>36 bad tone
BL @CALL
DATA EDITOR
BL @RET
DATA POP
EROK
MOV R3,R0
MOV R4,R1
MOV @FEND,R2
S R0,R2
BL @CALL
DATA MOVVU
S R4,R3
S R3,@FEND
BL @NEXT
DATA COP2
ERE
COP0 DATA COP0E-COP0-2
LI R0,M3
BL @CALL
DATA RW
LI R0,M4
BL @CALL
DATA RW
C R4,R3
JL COPOK
LI R6,>36 bad tone
BL @CALL
DATA EDITOR
BL @RET
DATA POP
COPOK
BL @NEXT
DATA COP
COP0E
MOVVD DATA MOVVE-MOVVD-2
SOC R2,R2
JEQ MOVVDX
ORI R1,>4000
A R2,R0 backward
DEC R0
A R2,R1
DEC R1
MOVVDL
MOVB @L0,*R15
MOVB R0,*R15
DEC R0
MOVB *R14,R11
MOVB @L1,*R15
MOVB R1,*R15
DEC R1
MOVB R11,*R10
DEC R2
JNE MOVVDL
MOVVDX
BL @RET
DATA POP
MOVVE
COP DATA COPE-COP-2
MOV @FPTR,R5
MOV R5,R0
MOV R5,R1
MOV R3,R7
S R4,R7
A R7,R1
MOV @FEND,R2
S R5,R2
BL @CALL
DATA MOVVD
MOV R4,R0
C R5,R4
JH COP1
A R7,R0
COP1
MOV R5,R1
MOV R3,R2
S R4,R2
BL @CALL
DATA MOVVD
A R7,@FEND
CLR R7
BL @NEXT
DATA COP2
COPE
COP2 DATA COP2E-COP2-2
MOV @FPTR,R4
MOVB @L4,*R15
MOVB R4,*R15
MOVB *R14,@L7
BL @CALL
DATA PAG
MOV R4,@FPTR
MOVB @L4,*R15
MOVB R4,*R15
MOVB *R14,@L7
CLR R1
LI R0,M1
BL @CALL
DATA SW
BL @RET
DATA POP
COP2E
ELIN DATA ELINE-ELIN-2
C @FPTR,@FEND
JEQ ELINX
MOV R4,R0
MOV @FPTR,R1
INC R7
S R7,@FEND
MOV @FEND,R2
S R1,R2
BL @CALL
DATA MOVVU
MOV @FPTR,R4
MOVB @L4,*R15
MOVB R4,*R15
MOVB *R14,R7
SRL R7,8
BL @CALL
DATA PAG
MOVB @L4,*R15
MOVB R4,*R15
MOVB *R14,R7
SRL R7,8
MOV R4,@FPTR
ELINX
BL @RET
DATA POP
ELINE
NLIN DATA NLINE-NLIN-2
MOV @FPTR,R3
MOV R3,R0
MOV R0,R1
INC R1
MOV @FEND,R2
S R0,R2
INC @FEND
BL @CALL
DATA MOVVD
MOV R3,R4
ORI R3,>4000
MOVB @L3,*R15
MOVB R3,*R15
CLR R7
MOVB R7,*R10
BL @CALL
DATA PAG
MOV R4,@FPTR
CLR R7
BL @RET
DATA POP
NLINE
PAGU DATA PAG2E-PAGU-2
LI R5,NLS-1
PAG2L
LI R12,FBUF
C @FPTR,R12
JEQ PAG2X
BL @CALL
DATA NAVU
DEC R5
JNE PAG2L
PAG2X
BL @CALL
DATA PNUM
BL @CALL
DATA PLIN
BL @RET
DATA POP
PAG2E
PAGD DATA PAG1E-PAGD-2
BL @CALL
DATA PNUM
BL @CALL
DATA PLIN
LI R5,NLS-1
PAG1L
C @FPTR,@FEND
JEQ PAG1X
BL @CALL
DATA NAVD
DEC R5
JNE PAG1L
PAG1X
BL @RET
DATA POP
PAG1E
MOVIN DATA MOVINE-MOVIN-2
S R0,R1
C @FPTR,@FEND
JEQ EQ
C R1,R7
JEQ EQ
MOV R0,R5
MOV @FPTR,R0
A R7,R0
INC R0
MOV @FEND,R2
S R0,R2
MOV R1,R4
S R7,R1
JLT RDIM
A R1,@FEND
A R0,R1
BL @CALL
DATA MOVVD
JMP RD2
RDIM
A R1,@FEND
A R0,R1
BL @CALL
DATA MOVVU
RD2
MOV R4,R1
MOV R5,R0
EQ
BL @NEXT
DATA MOV2
MOVINE
MOV2 DATA MOV2E-MOV2-2
MOV R1,R7
MOV @FPTR,R4
MOV R4,R12
ORI R12,>4000
MOVB @L12,*R15
MOVB R12,*R15
MOVB @L1,*R10
INC R4
MOV R4,R1
MOV R7,R2
BL @CALL
DATA MOVVU
A R7,R4
BL @RET
DATA POP
MOV2E
CLSC DATA CLSCE-CLSC-2
LI R12,>4000
MOVB @L12,*R15
MOVB R12,*R15
LI R11,>8000
LI R12,>300
CLSCL
MOVB R11,*R10
DEC R12
JNE CLSCL
BL @RET
DATA POP
CLSCE
SA DATA CO2E-SA-2
LI R1,>600 save
MOV @FEND,R4
JMP CO2
LO DATA CO2E-LO-2
LI R1,>500 load
LI R4,FBUF+>2000 max vdp address
CO2
S R7,R4
CLR R11
MOVB *R0+,R11
CI R11,>8200 "
JEQ CONE
COER
BL @NEXT
DATA POER
CONE
MOV R0,R8
LI R3,BUF+18+2
CLR R12
CO2L
MOVB *R0+,R12
CI R0,BUF+18+2+1
JEQ COER
AI R12,->6000
MOVB R12,*R3+
CB *R0,R11
JNE CO2L
BL @RET
DATA CO3
CO2E
CO3 DATA CO3E-CO3-2
S R8,R0
LI R2,BUF+18+2-10
MOV R2,R8
MOV R1,*R8+
DECT R7 address
MOV R7,*R8+
CLR R12 program
MOV R12,*R8+
MOV R4,R3
INCT R4 bytes
MOV R4,*R8+
LI R12,>6000 bias for CS_
MOVB R12,*R8+
MOVB @L0,*R8 name size
LI R11,PAB+>4000
MOVB @L11,*R15
MOVB R11,*R15
LI R12,10
A R0,R12
COL3
MOVB *R2+,*R10
DEC R12
JNE COL3
BL @RET
DATA CO4
CO3E
CO4 DATA CO4E-CO4-2
MOV R3,R2
MOV R7,R8
CI R1,>500
JEQ CO4X
ORI R8,>4000
MOVB @L8,*R15
MOVB R8,*R15
MOV @FEND,R12
S @FPTR,R12
MOVB R12,*R10
MOVB @L12,*R10
ANDI R8,>BFFF
CO4X
ORI R7,>4000
BL @RET
DATA DSR
CO4E
DSR DATA DSRE-DSR-2
LI R12,PAB+9
MOV R12,@>8356 ptr to PAB name size
LI R12,>800 search device
MOVB R12,@>836D
LI R12,>37D7
MOV R12,@>8370 for disk controller
LI R0,>10 dsrlnk
LI R12,>9800
MOVB R0,@>0402(R12)
MOVB @L0,@>0402(R12)
MOVB *R12,R0
MOVB *R12,@L0
ANDI R0,>1FFF
INCT R0 gpl address after FETCH
BL @RET
DATA GPLLNK
DSRE
GPLLNK DATA GPLLNE-GPLLNS
GPLLNS
CLR R11
JMP GPLH
GPLHR
MOV @>0050,R4
MOV @WKSP+0,R6
BL *R4
INCT @>8373
MOV @GPLXAD-GPLLNS+PAD,@>8302(R4)
B @>0060
DATA GPLXRT-GPLLNS+PAD
GPLXAD DATA >1675
GPLXRT
MOV @>166C,R4
BL *R4
LWPI WKSP
LI R11,>0649 = DEC R9 scroll dels
MOV R11,@>837E
MOVB R12,@>8373 restores subtask pointer
BL @NEXT
DATA DSRRE
GPLH
MOVB @>8373,R12
MOVB R11,@>8373 set subtask pointer to PAD
LWPI >83E0
JMP GPLHR
GPLLNE
DSRRE DATA DSRREE-DSRRE-2
LI R12,PAB+1 PAB error
MOVB @L12,*R15
MOVB R12,*R15
MOVB *R14,R12
SOCB R12,R12
JNE DSRER
MOVB @>837C,R12 dsr status byte
ANDI R12,>400
JNE DSRNE
DSRER
BL @NEXT
DATA POER
DSRNE
CI R1,>600
JEQ DSRREX
MOVB @L8,*R15
MOVB R8,*R15
MOVB *R14,R12
MOVB *R14,@L12
A R12,R8
INCT R8
MOV R8,@FEND
DSRREX
BL @NEXT
DATA ACR
DSRREE
WAITKY DATA WAITKE-WAITKY-2
MOVB @>8373,R12
CLR R11
MOVB R11,@>8373
WAITKS
LWPI >83E0
MOV R11,@M11
BL @>E KS
LWPI >83A2
MOV R11,@>83F6
SOCB @>837C,@>837C
JEQ WAITKS
MOVB R12,@>8373
BL @RET
DATA POP
WAITKE
END

KidKit.zip

Edited by moije
  • Like 2

Share this post


Link to post
Share on other sites

I was getting that same error yesterday, and I verified I was logged in. It worked just now, so transient error, I guess.

Share this post


Link to post
Share on other sites

I just noticed playground a couple months ago after downloading a newer copy of classic99. Amazing!! Congratulations to James Abbatiello and Harry Wilhelm. What a difference this would have made 35 years ago.

 

I tinkered with the loader a little bit to make a program that could be typed in by hand, and here is the result - the Mini-Memory Module lines demonstration program for TI Basic on a bare console.

 

If anyone is interested I'll upload the source code later.

 

 

linesBasic.txt

  • Like 11

Share this post


Link to post
Share on other sites

That is amazing! I would never have dreamed that something like this could be typed in from the keyboard. How did you manage to do that?

 

(edit) The thing I don't understand is how you deal with ASCII values that cannot be entered from the keyboard. I have some ideas but they seem kind of cumbersome.

Something that can be typed in like this would have been a big hit in Compute! magazine back in the 1980's. And don't forget, it can be saved to cassette!

Edited by senior_falcon
  • Like 2

Share this post


Link to post
Share on other sites

I just noticed playground a couple months ago after downloading a newer copy of classic99. Amazing!! Congratulations to James Abbatiello and Harry Wilhelm. What a difference this would have made 35 years ago.

 

I tinkered with the loader a little bit to make a program that could be typed in by hand, and here is the result - the Mini-Memory Module lines demonstration program for TI Basic on a bare console.

 

If anyone is interested I'll upload the source code later.

 

 

 

Finally got a chance to run this... just so bloody amazing. :) Well done!

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