Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 20:46 29 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 : Picomite(VGA) V5.07.07 betas - bug fixes + focus on PIO

     Page 11 of 16    
Author Message
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2141
Posted: 06:37am 14 Mar 2023
Copy link to clipboard 
Print this post

Another very minor point, immediate mode line editing isn't quite right on the latest VGA beta.
The up arrow reproduces the last line but the cursor drops down a line, preventing the left arrow moving the cursor back through the text. Pressing the backspace instead of the left arrow reproduces the line again, removes the last character then allows editing to continue normally.
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3817
Posted: 06:59am 14 Mar 2023
Copy link to clipboard 
Print this post

  mozzie said  G'day Peter,
A huge thankyou for the escape sequences and being able to directly add byte values to strings, makes dealing with sensors etc just that little bit easier  
As I mainly play with hex this is the first one tested and I couldn't get \xhh to work, after a little messing around it appears to be \&hh ie:


>? "\h41"
h41
>? "\&41"
A
>


Only tested on PicoMite so far but I am going to be using this a lot in the future  
Regards,
Lyle

Those are both bad expressions, aren't they?

The h should be x, I think, and the ampersand is also wrong.

John
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2141
Posted: 07:07am 14 Mar 2023
Copy link to clipboard 
Print this post

"The h should be x, I think, and the ampersand is also wrong."

Perhaps, but the ampersand works and x doesn't.
 
mozzie
Regular Member

Joined: 15/06/2020
Location: Australia
Posts: 68
Posted: 07:32am 14 Mar 2023
Copy link to clipboard 
Print this post

<Johns>
Good spot, it should be \xhh according to the info but I tried a few others (including \hhh) before finding \&hh is the one that works as <phill99> has also found.

The functionality in (of) these PicoMites is becoming truly astounding considering the cost, and now we have PicoMite / PicoMiteVGA / PicoMiteWEB as well.

Once again, a huge Thank You to all involved in getting and keeping this going  
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9146
Posted: 07:57am 14 Mar 2023
Copy link to clipboard 
Print this post

I decided to implement \&nn rather than \xnn to be compatible with other hex numbers in basic but documented it wrong when cutting and pasting

  Quote  

Escape sequence Hex value in ASCII Character represented
\a                           07                 Alert (Beep, Bell)
\b                           08                 Backspace
\e                           1B                 Escape character
\f                           0C                 Formfeed Page Break
\n                           0A                 Newline (Line Feed)
\r                           0D                 Carriage Return
\q                           22                 Quote symbol
\t                           09                 Horizontal Tab
\v                           0B                 Vertical Tab
\\                           5C                 Backslash
\nnn                       any                The byte whose numerical value is given by nnn interpreted as a decimal number
\&hh                       any                The byte whose numerical value is given by hh… interpreted as a hexadecimal number


  Quote  Another very minor point, immediate mode line editing isn't quite right on the latest VGA beta.
The up arrow reproduces the last line but the cursor drops down a line, preventing the left arrow moving the cursor back through the text. Pressing the backspace instead of the left arrow reproduces the line again, removes the last character then allows editing to continue normally.


I've seen this but can't reproduce it at will - if you can please let me have the required sequence.
I think it may be related to long command lines in mode 2 but can't be sure
Edited 2023-03-14 18:18 by matherp
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4259
Posted: 10:42am 14 Mar 2023
Copy link to clipboard 
Print this post

Peter,

If I have this right the chr$() function is obsolete now, except when we want to use strings as arrays of unsigned bytes ...?

example:
chr$(13) = "\r" (a lot shorter, especially when combined with a preceeding string)

Volhout


  when you are finished with all your improvements with MMBasic, the guys in this forum will be able to write C code, they only don't know.....  
Edited 2023-03-14 20:45 by Volhout
PicomiteVGA PETSCII ROBOTS
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2141
Posted: 12:21pm 14 Mar 2023
Copy link to clipboard 
Print this post

Re the line editor.
  matherp said  I've seen this but can't reproduce it at will - if you can please let me have the required sequence.
I think it may be related to long command lines in mode 2 but can't be sure

PicoMiteVGA MMBasic Version 5.07.07b27
OPTION SYSTEM I2C GP4,GP5
OPTION KEYBOARD US
OPTION CPUSPEED (KHz) 378000
OPTION DISPLAY 55, 150
OPTION SDCARD GP13, GP10, GP11, GP12
OPTION RTC AUTO ENABLE
OPTION COUNT GP6,GP7,GP14,GP15
> option list                                                                                                            option lit
> option list                                                                                                            files                                                                                                                    file
> option list                                                                                                            option lis
> option list                                                                                                            files                                                                                                                    file
> mode 2
> mode 2                                                                                                                 mode
> mode 2                                                                                                                 option list                                                                                                              files                                                                                                                    0files                                                                                                                   0files                                                                                                                   0files                                                                                                                  
> mode 1
> mode 1                                                                                                                 mode
Error : Syntax
> OPTION CPUSPEED 126000
> files
A:/
  <DIR>  .
  <DIR>  ..
23:05 14-03-2023          4  bootcount
09:56 14-03-2023      10392  C-bub.bmp
2 directories, 2 files
>files                                                                                                                  file
> mode 2
> mode 2                                                                                                                 files                                                                                                                    files                                                                                                                    mode 2                                                                                                                  

It is constant, both modes all 3 CPU speeds. PS/2 KB and TeraTerm. CPU RESTART, power off/on makes no difference. Not affected by line length.
Sometimes Backspace after up arrow deletes the second last character but leaves the last. This happens if re editing a line, or a "0" appears at the start.

Yet no one else seems to have this and is not affecting programs so it is not that important, just odd.

Edit. Those offsets in the code window do not appear on the screen nor were visible while writing in the TBS window. I copied and pasted from TeraTerm, perhaps there are hidden Tab characters.
Edited 2023-03-14 22:30 by phil99
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9146
Posted: 12:30pm 14 Mar 2023
Copy link to clipboard 
Print this post

I think it is the setting of your terminal program. What are you using? Make sure CR only sends CR and NL only send NL
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2141
Posted: 12:51pm 14 Mar 2023
Copy link to clipboard 
Print this post

Using TeraTerm with default settings. Regular PicoMite and PicoMiteWeb work fine with same settings at the same time with 3 TeraTerm windows open.

Edit
Also with no terminal, just PS/2 KB.
Edited 2023-03-14 22:55 by phil99
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9146
Posted: 01:11pm 14 Mar 2023
Copy link to clipboard 
Print this post

Try loading clear_flash and then re-load the PicoMite firmware
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2141
Posted: 01:15pm 14 Mar 2023
Copy link to clipboard 
Print this post

After changing OPTION LCDPANEL CONSOLE n it is back to normal. Change back to the original and it stays normal. Tried a number of others, including NOCONSOLE and line editor still works fine.

No idea what started it but now know how to stop it.
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6820
Posted: 01:16pm 14 Mar 2023
Copy link to clipboard 
Print this post

  Volhout said  Peter,

If I have this right the chr$() function is obsolete now, except when we want to use strings as arrays of unsigned bytes ...?

example:
chr$(13) = "\r" (a lot shorter, especially when combined with a preceeding string)

Volhout


  when you are finished with all your improvements with MMBasic, the guys in this forum will be able to write C code, they only don't know.....  


Come on now... Those of us with ancient and rusting brains are only just coming to terms with using INC. You'll have to tear CHR$() away from our dying grasp because we know how to use it!  ;)

As for C.... Call that a language? <spit!>



Edited 2023-03-14 23:17 by Mixtel90
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9146
Posted: 01:32pm 14 Mar 2023
Copy link to clipboard 
Print this post

  Quote  No idea what started it but now know how to stop it.


If you find out please let me know - it has annoyed me in the past but I have always failed to find the cause
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4259
Posted: 09:14pm 14 Mar 2023
Copy link to clipboard 
Print this post

Peter,

Is it possible that the build in PIO assembler has a problem with the MOV instruction ?


pio assemble 1,"mov x, isr"


Seems to be a valid instruction (this is in many example listings). But the PicoMite V50707b27 (non VGA) gives a syntax error.

RUN
[18] PIO assemble 1,"mov x, isr"
Error : Syntax


This is an example, but I have not been able to assemble any MOV instruction.
Could be me...not trying hard enough...

Regards,

Volhout


Edit:

Maybe the string length of MOV should be 3, not 4



Edited 2023-03-15 18:30 by Volhout
PicomiteVGA PETSCII ROBOTS
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9146
Posted: 08:53am 15 Mar 2023
Copy link to clipboard 
Print this post

Not that just not checking the line termination properly - will fix

Workaround is to add a space to the line

pio assemble 1,"mov x, isr "
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4259
Posted: 02:22pm 15 Mar 2023
Copy link to clipboard 
Print this post

  matherp said  Workaround is to add a space to the line

pio assemble 1,"mov x, isr "


   


EDIT:
Not sure if it is do-able, but in the assembler, numerics can only be entered in decimal form, not hex or binary. I tried:
"0x"
"&h"
"&"
"b"
"&b"
"h"
"0b"

None of these seem to work. But hex or binary would be nice.
Edited 2023-03-16 00:37 by Volhout
PicomiteVGA PETSCII ROBOTS
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9146
Posted: 06:35pm 18 Mar 2023
Copy link to clipboard 
Print this post

Quick heads-up. The next release will include OPTION ESCAPE. This enables escape sequences in strings and must be used in any program where you want to use them. You will be able to also use it at the command prompt but like OPTION EXPLICIT it will be disabled again by the RUN command and so will need to be included in the program. This change will ensure that the new functionality won't break any existing programs
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6103
Posted: 08:17pm 18 Mar 2023
Copy link to clipboard 
Print this post

And the next MMEdit will include a list of escape sequences, both good and iffy in the variable report.



Just to make conversion easier.

Jim
VK7JH
MMedit   MMBasic Help
 
Hans

Senior Member

Joined: 18/10/2022
Location: Canada
Posts: 116
Posted: 08:25pm 18 Mar 2023
Copy link to clipboard 
Print this post

  matherp said  Quick heads-up. The next release will include OPTION ESCAPE. This enables escape sequences in strings and must be used in any program where you want to use them. You will be able to also use it at the command prompt but like OPTION EXPLICIT it will be disabled again by the RUN command and so will need to be included in the program. This change will ensure that the new functionality won't break any existing programs


Sorry if I missed it, but does that mean that we will no longer have CHR$()?

That really is a Basic language staple!

Thanks for all you do!

Hans ...
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6103
Posted: 08:27pm 18 Mar 2023
Copy link to clipboard 
Print this post

  Hans said  
Sorry if I missed it, but does that mean that we will no longer have CHR$()?

That really is a Basic language staple!


Don't worry, chr$() will still be there and needed. The escape sequence options are an addition, not a replacement.

Jim
VK7JH
MMedit   MMBasic Help
 
     Page 11 of 16    
Print this page
© JAQ Software 2024