Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 22:34 27 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : CMM Gulp Strange Symbols!

Author Message
Nixie
Regular Member

Joined: 19/02/2013
Location: Australia
Posts: 66
Posted: 03:27am 21 Jun 2013
Copy link to clipboard 
Print this post

Well I just built a Colour Maximite, updated it to Colour Maximite MMBasic 4.3A
And this is what happens with the following:

A simple program (ok it does 'flicker' on the Mono MM too)

THIS...

10 CLS
20 ? Time$
30 GOTO 10

GIVES....a running clock

20:31:19
[2J[H ....but also with this on the CMM?!

ALSO when I try and run an 11 k program I have written, which runs beautifully on the
Mono MM; it doesn't get past first base!? Giving me the following:

>Run
[2J[H. (Here it is again!)
10 Cls ' file name 15M_PB1H.BAS. (This is just a REM line)
Error invalid syntax

Any Clues Please? Thanks, Nic.

(I'm already bald so don't know what happens next ! )
 
MicroBlocks

Guru

Joined: 12/05/2012
Location: Thailand
Posts: 2209
Posted: 03:42am 21 Jun 2013
Copy link to clipboard 
Print this post

[2J stands for clear screen.
[H means position the cursor at the home position
Here is a list of all those command: http://bluesock.org/~willg/dev/ansi.html

This means you are using the MM through a terminal, right?
When that happens your terminal program has a problem interpreting those codes when they come too fast..
They are called ANSI codes and are used to control terminals cursor position, colors etc.
If the MM is too fast for your terminal. Try slowing it down.
if you want a clock that updates every second you could do this:
[code]
'Every second
SETTICK 1000, ShowTime

'Endless loop until a key is pressed
DO WHILE INKEY$ = "": LOOP

ShowTime:
CLS
? TIME$
IRETURN
[/code]

Edited by TZAdvantage 2013-06-22
Microblocks. Build with logic.
 
Nixie
Regular Member

Joined: 19/02/2013
Location: Australia
Posts: 66
Posted: 03:52am 21 Jun 2013
Copy link to clipboard 
Print this post

Er no not using it through a terminal!
Just a new Colour Maximite with only the screen, keyboard and 9 v power supply plugged in.
Gulp?!

Yes on the clock. I appreciate the code. Thanks.
 
MicroBlocks

Guru

Joined: 12/05/2012
Location: Thailand
Posts: 2209
Posted: 04:15am 21 Jun 2013
Copy link to clipboard 
Print this post

If you use a VGA or Composite then that should not happen.
Maybe a bug in MMBasic.

You could try the newer version currently in beta and see if the problem is solved.
Here is the topic about that:
http://www.thebackshed.com/forum/forum_posts.asp?TID=5828&PN =1&TPN=1

Microblocks. Build with logic.
 
Nixie
Regular Member

Joined: 19/02/2013
Location: Australia
Posts: 66
Posted: 04:35am 21 Jun 2013
Copy link to clipboard 
Print this post

Thanks for the suggestion. I'm using a VGA.
Will try the beta software tomorrow.
 
Juri74

Senior Member

Joined: 06/02/2012
Location: Italy
Posts: 162
Posted: 05:20am 21 Jun 2013
Copy link to clipboard 
Print this post

Hello Nic,
i tried some minutes and i confirm, i used v4.3a
the bug is in the "cls" command, try:

Do
Cls
Loop


...

Juri
 
MicroBlocks

Guru

Joined: 12/05/2012
Location: Thailand
Posts: 2209
Posted: 05:48am 21 Jun 2013
Copy link to clipboard 
Print this post

does it also occur with a delay?
[code]
do
cls
for l=1 to 1000:next
Loop
[/code]
Try changing the value 1000 into higher and higher values and see if the bug goes away.

Microblocks. Build with logic.
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3194
Posted: 12:20pm 21 Jun 2013
Copy link to clipboard 
Print this post

In the CLS routine it sends the VT100 clear screen command to the console so that a terminal emulator, if connected to the USB port, has its screen cleared. The CLS routine then clears the video memory which should erase these codes.

How the codes remain on the video screen I don't know... I will investigate.

Thanks, Geoff
Geoff Graham - http://geoffg.net
 
Nixie
Regular Member

Joined: 19/02/2013
Location: Australia
Posts: 66
Posted: 03:32pm 21 Jun 2013
Copy link to clipboard 
Print this post

TZAdvantage - I have updated to 4.4 beta and still have the same problems.

JURI - same thing with 4.4 beta - with your example code

TZAdvantage - no it doesn't show the VT100 code if I introduce a delay! But that isn't soling the issue, merely hiding it

UPDATE ON PROGRAM CRASH!
----------------------------------------------

CLS
? date$;" "; time$
End

WORKS FINE........BUT:

CLS ' placing a REM IN HERE WELL MAKES THE PROGRAM CRASH.
? date$;" "; time$
End

AH HA !
However, if I put a colon after CLS, (CLS: ' REM) the program above runs fine
And if I do the same to my code in my 11 K program (mentioned above), it also works fine!
Yahoo! ....well at least I can work around the CLS cmd!


GEOFF - I guess over to you. Thanks again for you efforts.

..and thanks to all for reading and offering suggestions. Cheers Nic.
 
MicroBlocks

Guru

Joined: 12/05/2012
Location: Thailand
Posts: 2209
Posted: 02:11am 22 Jun 2013
Copy link to clipboard 
Print this post

Geoff,
If i quickly and repeatedly press the up arrow key i also get the VT100 code in the screen. However that is very rare.
Maybe the same issue. And i remember it also occurred sometime with the function keys.

Microblocks. Build with logic.
 
panky

Guru

Joined: 02/10/2012
Location: Australia
Posts: 1101
Posted: 05:03pm 22 Jun 2013
Copy link to clipboard 
Print this post

Geoff,

I too have seen the up arrow ( and down arrow ) problem on a CGCMM1 running 4.3 with extraneous characters appearing when repeatedly pressing the keys. Easy to miss and a bitch to debug - when you are proofing a program, the eye sometimes tells the brain what it expects is there rather than what is realy there.

Cheers, Doug.

... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it!
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3194
Posted: 05:10pm 22 Jun 2013
Copy link to clipboard 
Print this post

This is something that I have not been able to fix (so far). It only happens when the USB is connected and seems to be caused by Tera Term echoing a character back to MMBasic.

And, yes, it is a pain when it happens.

Geoff
Geoff Graham - http://geoffg.net
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024