Jump to content

Photo

Nice and square

Demo TI Basic Strawberry Assembler Wilhelms compiler MLC

2 replies to this topic

#1 sometimes99er OFFLINE  

sometimes99er

    River Patroller

  • 4,222 posts
  • Location:Denmark

Posted Fri Feb 24, 2012 3:45 AM

Here's a little TI Basic demo. It sets up a few colors and squares, and then plots them randomly to the screen. Originally designed to be the background for a move-up-and-down block game menu. The game itself was supposed to feature a little boy in a platform environment.
 
100 CALL CLEAR
110 CALL SCREEN(5)
120 A$="007E7E7E7E7E7E"
130 FOR A=0 TO 3
140 CALL CHAR(A*8+40,A$)
150 NEXT A
160 CALL COLOR(2,8,1)
170 CALL COLOR(3,6,1)
180 CALL COLOR(4,10,1)
190 CALL COLOR(5,15,1)
200 X=INT(RND*24)+1
210 Y=INT(RND*32)+1
220 C=INT(RND*4)*8+40
230 CALL HCHAR(X,Y,C)
240 GOTO 200

I took this to demo the speed of my TI Basic emulator called Strawberry (WIP with integers only etc.).



matthew180 also took this to show how one could do it in 9900 assembly.

It was also compiled using the Wilhelm's TI Basic Compiler.

Also done in MLC. See last part of post #3.


Edited by sometimes99er, Mon Jun 13, 2016 12:09 AM.


#2 Willsy OFFLINE  

Willsy

    River Patroller

  • 3,100 posts
  • Location:Uzbekistan (no, really!)

Posted Fri Feb 24, 2012 7:33 AM

This might make a more interesting bench-mark:



Ignore the scrolling...

:)

#3 rocky007 OFFLINE  

rocky007

    Moonsweeper

  • 395 posts
  • Location:Belgium

Posted Fri Feb 24, 2012 11:13 AM

MLC Kaleidoscope version :

http://youtu.be/V0w8fV53T2o

Basic -> MLC ( 30000 chars in 42 sec ) :

http://youtu.be/-RLPBeGK_eQ

MLC Optimised ( display 30000 chars in 28.9 sec ) :

http://youtu.be/PkXWKsWlNNA




100 CALL CLEAR
$MLC F 110 10 3000

800 CALL CLEAR
810 CALL SCREEN(5)
820 A$="007E7E7E7E7E7E"
830 FOR A=0 TO 3
840 CALL CHAR(A*8+40,A$)
850 NEXT A
860 CALL COLOR(2,8,1)
870 CALL COLOR(3,6,1)
880 CALL COLOR(4,10,1)
890 CALL COLOR(5,15,1)

900 CALL LINK("ESSAI")
910 END

$ESSAI
NDO I 30000
RND
DIV Z 24
LET X Z
RND
DIV Z 32
LET Y Z
RND
DIV Z 4
LET C Z
INC X
INC Y
MUL C 8
ADD C 40
PUTCHAR X Y C
NLOOP

$$
$END


Kaleidoscope :

100 CALL CLEAR
$MLC F 110 10 3000
800 CALL CLEAR
810 CALL SCREEN(5)
820 A$="FFFFFFFFFFFFFFFF"
830 FOR A=0 TO 12
840 CALL CHAR(A*8+40,A$)
841 CALL COLOR(A+2,a+1,a+1)
850 NEXT A

900 CALL LINK("ESSAI")
910 END

$ESSAI
NDO I 30000
RND
DIV Z 12
LET X Z
RND
DIV Z 16
LET Y Z
RND
DIV Z 13
LET C Z
INC X
INC Y
MUL C 8
ADD C 40
LET A 24
LET B 32
SUB A X
SUB B Y
PUTCHAR X Y C
PUTCHAR A Y C
PUTCHAR X B C
PUTCHAR A B C
NLOOP
$$
$END

Optimised

100 CALL CLEAR
$MLC F 110 10 3000
800 CALL CLEAR
810 CALL SCREEN(5)
820 A$="007E7E7E7E7E7E"
830 FOR A=0 TO 3
840 CALL CHAR(A*8+40,A$)
850 NEXT A
860 CALL COLOR(2,8,1)
870 CALL COLOR(3,6,1)
880 CALL COLOR(4,10,1)
890 CALL COLOR(5,15,1)
900 CALL LINK("ESSAI")
910 END

$ESSAI
DIMTABLE E 10
PUTTABLE E(0) 136
PUTTABLE E(1) 144
PUTTABLE E(2) 152
PUTTABLE E(3) 160

NDO I 30000
RND
DIV Z 768
LET X Z
RND
DIV Z 4
ADD E Z
BMOVECTOV E 1 X
SUB E Z
NLOOP
$$
$END

Edited by rocky007, Fri Feb 24, 2012 11:16 AM.






Also tagged with one or more of these keywords: Demo, TI Basic, Strawberry, Assembler, Wilhelms compiler, MLC

0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users