Menu
JAQForum Ver 19.10.27

Forum Index : Microcontroller and PC projects : MMBasic for Windows - betas

   Page 24 of 30    
Posted: 09:13pm
21 May 2023
Copy link to clipboard
TassyJim
Guru


  Quote  Yeah, why does

print"Hex$(23)"

print

BASE$(16,23)

I want to print what's between the quotes as a literal, not converted in any way.

In order to have more commands and functions, Peter combined similar ones by doing a search and replace on the commandline/program lines as they are entered.
STR_REPLACE((char*)inpbuf, "BIN$(", "BASE$(2,");
  STR_REPLACE((char*)inpbuf, "OCT$(", "BASE$(8,");
  STR_REPLACE((char*)inpbuf, "HEX$(", "BASE$(16,");


It looks file text within quotes was also searched.

Jim

Edit:

The other part of the problem would be better described as:
Hex Bin and Octal numbers are not recognised as number for colour-coding in the editor.

Jim
Edited 2023-05-22 08:00 by TassyJim
 
Posted: 02:13am
22 May 2023
Copy link to clipboard
panky
Guru


A work around for print "hex$(23) = " as a literal would be

print "hex"+"$(23) = "

This would stop the pre-processor translating hex$()

Doug.
 
Posted: 08:16am
22 May 2023
Copy link to clipboard
matherp
Guru

  Quote  I want to print what's between the quotes as a literal, not converted in any way.


Shouldn't do that - will fix
 
Posted: 05:00am
24 May 2023
Copy link to clipboard
TassyJim
Guru


As I start to use MMB4W more, two issues kept coming up.
MMEdit would start a new instance of MMB4W whenever you send a bas file to it.
This can be very useful but at other times, two or more MMB4W is too much.
quit_mmbasic is a short program that looks for a running instance of MMB4W and politely sends it "QUIT" to gracefully shut down.
The next update to MMEdit will make use of this.
quit_mmbasic is 99% the work of Gerry, disco4now

The second issue is getting data from MMB4W. The output is all graphics, not text.
I have sent data to a file then accessed that file from other programs. This works but I like to see some output streaming so I made use of TCP SEND.
TCT SEND needs a server available so echo_chamber is a small program that listens on port 6832 and sends any data received to all other connected clients.

The idea is, start echo-chamber, start TeraTerm etc and connect to echo_chamber.
Start your MMB4W program and use TeraTerm as a console to display messages while keeping the MMB4W graphics unmolested.


MMB4W_p.zip


This program has a couple of subs that make sending to TCP a bit easier.
 '
 TCP CLIENT "localhost", 6800
 DO
   INC n
   PRINT n
   nprint "Testing my server"
   nprintat 30,20,"Here "+STR$(n)
   IF MM.ERRNO = 16 THEN
     PRINT "Comms lost"
   ENDIF
   PRINT
'on error skip
'tcp receive rec$
   PAUSE(3000)
 LOOP UNTIL rec$ = "quit"
 
 TCP CLOSE
END
 
SUB nprint txt$
 ON ERROR SKIP 1
 TCP SEND txt$+CHR$(13)+CHR$(10)
END SUB
 
SUB nprintat xpos,ypos, txt$
tosend$ = VTpos$(ypos, xpos)+txt$+CHR$(13)+CHR$(10)
 ON ERROR SKIP 1
 TCP SEND tosend$
END SUB
 
FUNCTION VTpos$(r,c)
 VTpos$ = CHR$(27)+"["+STR$(r)+";"+STR$(c)+"H"
END FUNCTION



And now a bug report.

The manual states that TCP RECEIVE is non-blocking and will return an empty string if there is no data.
In the above program it IS blocking.

Jim
Edited 2023-05-24 15:04 by TassyJim
 
Posted: 07:03pm
30 May 2023
Copy link to clipboard
PhilP
Newbie


Help! I am very keen to use MMB4W but can't get it to run. I am using version 2023-05-21_045022_MMBasic. I have read Doug's very comprehensive guide but I can't get the thing to run. I have tried on two laptops one with Norton and one without with the same results. After downloading the exe into its own directory I start MMB4W through the CMD window and a large white panel appears and then disappears after about 10 seconds. The keyboard is dead during this time. I am sure I am doing something stupid somewhere.
Phil
 
Posted: 08:32pm
30 May 2023
Copy link to clipboard
Michal
Senior Member

The last two versions seem to have a problem with me running on a 768x1366 screen.
Find the January 2023 version.

Michal
 
Posted: 12:03am
31 May 2023
Copy link to clipboard
Turbo46
Guru


  Quote  I start MMB4W through the CMD window

I've never run it that way? Just double click the .exe file in explorer or better still use MMEdit.

Bill
 
Posted: 03:11am
31 May 2023
Copy link to clipboard
TassyJim
Guru


Do your laptops run high DPI.
If so, that is the problem (or it is with my laptop)
I created a desktop shortcut and then edited it's properties



Previous versions of MMB4W were OK


Edit with more information:
My laptop is running Windows 10.

On my laptop the MMB4W opening screen is too big for the display. With earlier beta's the sign-on text is off screen and just a hint of it is visible.

Turning off DPI settings makes life better.

The latest beta gets as far as opening the main window and stops.
I can't tell if any of the sign-on text is there.
There is no response to the keyboard.

Turning off high DPI works nicely for the latest beta and I prefer it that way.

Jim
Edited 2023-05-31 14:11 by TassyJim
 
Posted: 10:20am
31 May 2023
Copy link to clipboard
PhilP
Newbie


Thanks Jim. I am running Win 10 and turning off high DPI gave me a black panel instead of white but no banner and the keyboard was dead. I have gone back to the October version V5.07.03b12 which seems to work OK. It is a shame I cant't run the latest version though.
Phil
 
Posted: 09:12pm
31 May 2023
Copy link to clipboard
lizby
Guru

I'm also having a problem with the latest version. I get a blank screen (black). Sometimes that has happened to me with other versions, and I hit <enter> until the cursor occurs. No matter how many times I do that, nothing ever appears on the screen. I loaded Quazee's recent one-liner and ran it, which should fill the screen with "/\". Nothing appears. If I type Ctrl_C and "quit", MMB4W quits.

If I run the version which reports 5.070316 for ?mm.ver, all works as I expect.
 
Posted: 10:41pm
31 May 2023
Copy link to clipboard
Turbo46
Guru


MANUAL ERRORS

There are many references (15) to VGA monitor or screen. I don't think that is relevant to MMB4W. Probably just "screen" is sufficient, that would cover laptops and any kind of monitor.

OPTION DEFAULT PATH is not described in the OPTIONS section. It is mentioned in the QUICK START TUTORIAL though.

Bill
 
Posted: 11:03pm
31 May 2023
Copy link to clipboard
Turbo46
Guru


MMB4W Bug

MMB4W does not 'print' a CR/LF after an INPUT statement but it does after a PRINT command. The following code demonstrates.
 do
   input "Resistance (1 to 999.9)? ", r
   if r = 0 then end
 loop until r =< 999.9 and r => 1
 do
   input "Within percent (1 t0 2)? ", tol
 loop until tol => 1 and tol =< 2
 print "Done"
 print "Done"
 print "Done"


The result:



In addition: the copyright date needs to be updated.


Bill
 
Posted: 04:53pm
01 Jun 2023
Copy link to clipboard
JanVolk
Senior Member

Panky,

I've been playing around with Doug's simulator example and noticed that there are more GUI instructions than described in the MMB4W manual?

Jan
 
Posted: 02:47am
02 Jun 2023
Copy link to clipboard
Turbo46
Guru


@Jan,

If you could list those, I'm sure that would help.

Bill
 
Posted: 06:06am
02 Jun 2023
Copy link to clipboard
Turbo46
Guru


There is a note in the GUI section of CONTROLS:
  Quote  The GUI controls have their own manual: GUI Controls and Programming.pdf

You can find a copy in the CCM2 download.

Bill
 
Posted: 03:37pm
04 Jun 2023
Copy link to clipboard
JanVolk
Senior Member

Turbo46 & panky,

These GUI settings are not yet in the MMB4W manual. https://www.c-com.com.au/mmhelp/
GUI AREA #ref, startX, startY, width, height
GUI BARGAUGE #ref, StartX, StartY, width, height, FColour, BColour, min, max,c1,ta,c2,tb,c3,tc,c4
GUI BUTTON #ref, caption$, startX, startY, width, height [, FColour] [,BColour]
GUI CAPTION #ref, text$, startX, startY [,align$] [, FColour] [, BColour]
GUI CHECKBOX #ref, caption$, startX, startY [, size] [, colour]
GUI DISPLAYBOX #ref, startX, startY, width, height, FColour, BColour
GUI FRAME #ref, caption$, startX, startY, width, height, colour
GUI FORMATBOX #ref, Format, startX, startY, width, height, FColour, BColour
GUI GAUGE #ref,StartX,StartY,Radius,FColour,BColour,min,max,nbrdec,units$,c1,ta,c2,tb,c3,tc,c4
GUI LED #ref, caption$, centerX, centerY, radius, colour
GUI NUMBERBOX #ref, startX, startY, width, height, FColour, BColour
GUI RADIO #ref, caption$, centerX, centerY, radius, colour
GUI SPINBOX #ref, startX, startY, width, height, FColour, BColour, Step, Minimum, Maximum
GUI SWITCH #ref, caption$, startX, startY, width, height, FColour, BColour
GUI TEXTBOX #ref, startX, startY, width, height, FColour, BColour

These GUI settings are already in the MMB4W manual.
GUI CURSOR
GUI CURSOR ON
GUI CURSOR x, y
GUI CURSOR OFF
GUI CURSOR HIDE
GUI CURSOR SHOW
GUI CURSOR COLOUR cursorcolour
GUI CURSOR LOAD "fname"
GUI BITMAP x, y, bits [, width] [, height] [, schaal] [, c] [,bc]

Jan
 
Posted: 04:56pm
04 Jun 2023
Copy link to clipboard
lizby
Guru

  JanVolk said  These GUI settings are already in the MMB4W manual.


Do these settings actually work in the latest version of MMB4W? I can't test it because the latest version just gives me a black screen and no cursor, even if I <enter> many times; cls rgb(red) doesn't change anything, but QUIT works.

In version 5.070316, which works for me, OPTION MAXCONTROLS 20 responds "Invalid Option", and "GUI CURSOR" responds "Syntax".
 
Posted: 06:54pm
04 Jun 2023
Copy link to clipboard
JanVolk
Senior Member

lizby,

I found this out while testing panky's example program on page 18.
With this program "simulation.bas" a microcomputer can be simulated in MMB4W, which is not yet finished and menu option 9 already works very well for me and I have mode 9 and font 2.1 in option default for standard.
Here I saw that the mouse control works with GUI AREA, so I found out there might be more GUI settings?
I haven't been able to test everything yet, but what I have tested works for me. The LED works and the number pad also works, so there are still some tests to do.
The GUI CURSOR has not yet been tested either, but I will report back when I have tested it.

I also tested u g9_display.txt from page 16 and it works for me with mode 9 and font 1 and display scale=1.
I must admit that not the whole image is filled (3/4), but there are results and possibly something to optimize?
I still have a 4:3 LCD VGA screen for testing and a VGA tube monitor in storage and I have an HDMI screen 1600x900 on my laptop that this test was done with and I have not yet adjusted the screen settings.
This all takes time to implement and I am busy with many things.

Jan
 
Posted: 01:40am
05 Jun 2023
Copy link to clipboard
Turbo46
Guru


Jan,

Sorry you went to that trouble. Did you not see my Post?

There is a note in the GUI section of CONTROLS:

  Quote  The GUI controls have their own manual: GUI Controls and Programming.pdf

You can find a copy in the CCM2 download. See:
https://geoffg.net/maximite.html

Scroll down to the bottom and download the firmware for the CMM2, It's part of that package.

I think the only commands in the MMB4W manual are specific to MMB4W and not part of the general GUI functions.

Bill
 
Posted: 06:32pm
06 Jun 2023
Copy link to clipboard
ice2642
Regular Member


I do not use windows a very long time, but I try it on linux ubuntu 22.04 and wine 5 just for test.

The MMBasic window open, but when I press F1 for editor, it list my Documents directory.

basic commands, like print, do , loop, etc... work, mode 2 change the window, but no graphics.




Best Regards,
 
   Page 24 of 30    
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025