![]() |
Forum Index : Microcontroller and PC projects : MMbasic v 5.070308 DOS won't print high order ASCII characters.
Page 1 of 3 ![]() ![]() |
|||||
Author | Message | ||||
Paul_L Guru ![]() Joined: 03/03/2016 Location: United StatesPosts: 769 |
I'm trying to print DOS graphic characters under MMbasic for DOS version 5.070308 using chr$(nnn), like this for i=33 to 255:print chr$(i):next It only prints up to 127 "~" then nothing. Paul in NY |
||||
Paul_L Guru ![]() Joined: 03/03/2016 Location: United StatesPosts: 769 |
OK, under DOS version 5.0505 it prints the graphics characters like I expected. What the heck is version 5.070308????? Paul in NY |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6283 |
It looks like you are comparing the original DOS MMBasic (Latest available is V5.05.05) with MMBasic for Windows. MMB4W is a different beast. It is closer to the embedded versions of MMBasic and uses bitmapped fonts the same way that The CMM2 etc uses them. Jim VK7JH MMedit |
||||
lizby Guru ![]() Joined: 17/05/2016 Location: United StatesPosts: 3378 |
Give me a few hours (or maybe a day), Paul, and I'll send you a cut-down program which, using DEFINEFONT, can print this: ![]() (This is from g8.bas, 3,400 lines of code, slightly modified from our last g7.bas just to get far enough to produce this screen.) Here's the DEFINEFONT if you want to have a play. Lower case letters are replaced with PC graphics characters. ' PCgraphics.bas ' from lizby ' Font type : Standard 8x8 plus PC graphics replacing lower case (95 characters) ' Font size : 8x8 pixels DefineFont #8 5F200808 00000000 00000000 08080808 00080008 00001414 00000000 247E2400 00247E24 7C507C10 00107C14 08646200 00462610 10281000 003A442A 00100800 00000000 10100800 00081010 08081000 00100808 10280000 0028107C 10100000 0010107C 00000000 10080800 00000000 0000007C 00000000 00181800 08040000 00402010 948C7800 0078C4A4 20A06000 00F82020 04847800 00FC8078 18847800 00788404 50301000 0010FC90 F880FC00 00788404 F8807800 00788484 0804FC00 00202010 78847800 00788484 84847800 0078047C 10000000 00100000 00100000 20101000 10080000 00081020 7C000000 00007C00 10200000 00201008 04423C00 00080008 564A3C00 003C405E 84847800 008484FC F884F800 00F88484 80847800 00788480 8488F000 00F08884 F880FC00 00FC8080 F880FC00 00808080 80847800 0078849C FC848400 00848484 10107C00 007C1010 04040400 00788484 E0908800 00848890 80808000 00FC8080 B4CC8400 00848484 A4C48400 00848C94 84847800 00788484 8484F800 008080F8 84847800 007894A4 8484F800 008488F8 78807800 00788404 1010FE00 00101010 84848400 00788484 84848400 00304884 84848400 0048B484 30488400 00844830 28448200 00101010 1008FC00 00FC4020 20203800 00382020 20400000 00040810 08083800 00380808 54381000 00101010 00000000 FE000000 ff000000 000000ff 18181818 18181818 1f000000 1818181f f8000000 181818f8 f8181818 000000f8 1f181818 0000001f ff181818 000000ff ff000000 181818ff f8181818 181818f8 1f181818 1818181f ffffffff ffffffff ff181818 181818ff 00ffff00 00ffff00 66666666 66666666 44780000 00444444 44380000 00384444 44780000 40407844 443C0000 06043C44 201C0000 00202020 40380000 00780438 10381000 000C1010 44440000 00384444 44440000 00102828 54440000 00285454 28440000 00442810 44440000 38043C44 087C0000 007C2010 60101C00 001C1010 10101000 00101010 0C107000 00701010 00281400 00000000 00000000 00000000 End DefineFont Note: code shown below is in upper case because the lower case "a"-"m" characters are shown as graphics after FONT 8. ![]() Here's the template file from which that line drawing was produced: b`````cb```c b`````c b`````c b```cb`````c a~51''aa~63a a~56''a b````c a~57''a a~64aa~53''a bh~31''ih~43icb`h~36''i`h->>-i`h~37''i`cbh~44ih~33''ic aa~11''aa~23aaa a~16''a e````d a~17''a aaa~24aa~13''aa ae`````de```daa e`````d e`````d aae```de`````da a aa aa TANK b``f``c a YARD LOOP aa FREON LOOP aa LOOP a~34''a a aa aa e``g``d ab`````c aa b`````c b`````c aa b`````ca aa~52''ab```caa a-----a b```c a-----a aab```ca-----aa eh~32''ih---ide`h~42''i`h< <i``h~41''i`deh---ih~35''id a~12''ae```d a-----a e```d a-----a e```da-----a e`````d e`````d e`````d e`````d For instance: ![]() There may be a better way to do this with MMB4W, but I haven't looked into it. Lance ~ Edited 2022-06-18 23:07 by lizby PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4311 |
Hi folks, I may be misunderstanding the issue but on MMB4W the standard fonts 1 and 4 already contain the extended CMM2 character set including line drawing characters without redefining anything. Best wishes, Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
lizby Guru ![]() Joined: 17/05/2016 Location: United StatesPosts: 3378 |
Thanks, Tom -- that's what I hadn't looked into. ![]() ~ Edited 2022-06-18 23:20 by lizby PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7937 |
I played with this a while ago, with a VT100 library that I made. It fits into the library space of a 28-pin MX170 to give it colour graphics (in Tera Term) - but it will also run on a PicoMite too. Just set the font and run the library routines to make lines, boxes etc. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
Paul_L Guru ![]() Joined: 03/03/2016 Location: United StatesPosts: 769 |
My problem is that all that I can print to the screen is gobledegook which looks like it is spliting the high order ASCII and printing the two alpha characters instead of the graphic character. I'm running a standard win 10 pro box. It looks like I've got the wrong font selected somehow. If I open the graphics file produced by an editor and read it with MMbasic I can parse each line into the ASCII codes and print them as numbers. It just won't print them as graphics. The immediate command print chr$(201) does produce the graphics character. for i=128 to 155:print chr$(i);:next also works. I think I might be trying to use a defective version build of MMbasic. Exactly which version should I use for this under DOS and Windows? Paul in NY Edited 2022-06-19 00:42 by Paul_L |
||||
Paul_L Guru ![]() Joined: 03/03/2016 Location: United StatesPosts: 769 |
Hi Mick, that's not what we're doing. I'm writing a program to run under windows on a PC which will send commands to a headless PicoMite running MMbasic in the hopes that the PicoMite will do something useful blind. The will then send more commands to the PicoMite which will cause it to print data which the PC will be able to receive. Lance is putting together the PicoMite and interfaces. I'm writing the windows control program. Paul in NY & Lance in Canada |
||||
Paul_L Guru ![]() Joined: 03/03/2016 Location: United StatesPosts: 769 |
Somebody please tell me which MMbasic version I should be using under both DOS and Windows and where to download it. Paul in NY |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7937 |
Another alternative is not to run MMBasic for Windows - let the PicoMite be both the control ad display. Talk to it from any terminal program that understands VT100. Send it commands and settings as ASCII strings and it will respond with pages of VT100 to drive your terminal display. (You can even do a version of Print At in VT100, so you have control of where the text is printed without redrawing the whole screen.) That way you can switch the terminal off or swap it for a different one or whatever, the PicoMite will carry on doing it's thing and the display will "just work" if you use the same number of rows and line lengths. Just a thought. :) Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
lizby Guru ![]() Joined: 17/05/2016 Location: United StatesPosts: 3378 |
We've been through this and many variations, from MM28, MM44, MM64, Pi-ZW, H7, F4, and now Picomite with MMB4W front end. The headless picomite in the basement, with access with an upstairs PC using either of both sequentially MMB4W or Teraterm looks like the most flexible option to me right now, allowing the picomite to be programmed/exercised without physical access other than for some extreme failure. PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
lizby Guru ![]() Joined: 17/05/2016 Location: United StatesPosts: 3378 |
Paul--exactly what are you trying to do (code) that isn't performing as you expect? What do you get when you do ?MM.VER? I get 5.070308. That gave the graphical results shown above. MMB4W runs under windows (10 or above). It's executed from a DOS prompt. The MMB4W window looks like you're under DOS, but you aren't--it's a graphical interface. Edited 2022-06-19 02:35 by lizby PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6283 |
Paul, As I said in my first reply, There are two entirely different programs. You are used to the original MMBasic for DOS which is ver 5.05.05 and you can download from Geoff's website. Lizby is using the version of MMBasic for Windows developed by Peter and available from this forum. Both use MMBasic for the underlying code but have different graphics capabilities. If all you want is line drawing, you can use either but for fancier graphics and Windows like experience, Peter's version (MMB4W) is the way to go. Jim VK7JH MMedit |
||||
Paul_L Guru ![]() Joined: 03/03/2016 Location: United StatesPosts: 769 |
Lance and Jim -- in my first post I said that I was running 5.070308 and when I ran this line for i=33 to 255:print chr$(i);:next it printed up to 127 then it quit printing. Then in my second post running 5.05.05 it printed all the high bit ASCII characters like it should. I never received an answer concerning what the heck is 5.070308. I think it is a windows version. I think that 5.05.05 is a DOS version. I would like to try using Peter's Windows emulation but I'm not sure which version supports them. A few days ago I followed Peter's instructions and downloaded v5.07.03b10 which I believe is the most recent Windows build. When I run for i=33 to 255:print chr$(i);:next it prints the first 128 characters, up to the tilde "~" and then goes blank which is the same behavior I get with v 5.070308. With Windows MMBasic V5.05.05 it prints all characters up to chr$(255). Will V5.05.05 use Peter's new calls and emulate the windows screen? Should I use V5.05.05, which I believe is a DOS emulation, and just live with the clunkier graphics? I don't think I can use V5.070308 which doesn't print above 127????? And I don't think I can use v5.07.03b10 which also doesn't print above 127????? The major problem is that Peter writes code so fast that nobody can keep up with him! Yikes!!! Paul in NY |
||||
disco4now![]() Guru ![]() Joined: 18/12/2014 Location: AustraliaPosts: 1003 |
Paul, It looks like the default font 3 does not have the characters above 127 defined. enter FONT 4,2 then try PRINT chr$(177) Font 4 has the full set. the 2 is scaling the size. On the windows version Print will print to the console/screen at the next position. You can use the TEXT graphic command to treat it like an LCD Panel and place it where you want e.g. TEXT 100,100,CHR$(177) Gerry Latest F4 Latest H7 FotS |
||||
lizby Guru ![]() Joined: 17/05/2016 Location: United StatesPosts: 3378 |
Version 5.07.03.08 is MMB4W (MMBasic for Windows), and I think the most recent version. As Tom said back in post 5, fonts 1 and 4 have the PC drawing characters. In post 6, I showed that to be the case, printing characters 128-255, first using font 1 and then using font 4. I also sent you the code which writes Geoff's guidemo, set for a 480x320 screen: ![]() This illustrates the graphics capabilities of MMB4W. ~ Edited 2022-06-19 10:43 by lizby PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7937 |
I *think* I'm right on this - I don't have the manual for MMBasic for DOS. MMB4W runs what is basically a virtual LCD but within a Window. It handles all the usual graphic commands that you'd get with a LCD display, I think. It's main difference is that, unlike a LCD display, it doesn't support touch. MMBasic for DOS runs what is basically a console. It has no actual graphic capabilities AFAIK. It's what it says - MMBasic running on DOS. The manual for MMBasic lists the fonts and what capabilities each one has, later versions of the manual being more up to date obviously. I think they are the same on all platforms with the following exceptions: MMBasic for DOS uses a DOS font. Font 3 for the PicoMite is 16x16 instead of 16x24. Fonts 1 and 4 are similar to the DOS font in that they contain the full extended ASCII set up to chr$(255). All the others only go as far as chr$(127) at most, some less. Edited 2022-06-19 16:49 by Mixtel90 Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4311 |
I would have said that MMB4W is a simulation (not emulation) of the CMM2 that happens to run on Windows. IMO it's not really a good "Windows citizen" for writing "Windows programs". That would be an order of magnitude more work for Peter and probably not worth it, there are other more Windowsy BASICs available already. YMMV. Best wishes, Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4311 |
Deleted double post. Edited 2022-06-19 17:51 by thwill MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
Page 1 of 3 ![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |