Welcome Guest, you are in: Login

Fruit Of The Shed

Navigation (MMBasic)






Search the wiki

»


Search Engine

Here you can search through the pages of this Namespace, their attachments and the files uploaded to the system.
Note: the results will only display the items you have permissions to read.



Filter by Category

Select allNoneInvert









































This search, performed through 3.39 MB (230 documents, 12918 words), completed in 0.0 seconds and yielded 30 results.

A Simple GUI pack — 14.6%

A purely MMBasic GUI pack to provide a WindowsCE/95 look-a-like LCD panel interface for your projects. This is a work in progress in my spare time. This document has lots of improvements required - and I'll do them... just need a bit more time. Still to come: Lists, Drop-down Lists, tab strips, pop-up windows (if I can work out a way to do it). As it is now, it provides a lot of functionality and is usable. If you only need the simpler end of the GUI - buttons, checkboxes, radio buttons and text boxes etc, it is good to go. Let's face it; they probably cover 100% of [...]

MaxMan — 9.8%

This module is part of the original MMBasic library. It is reproduced here with kind permission of Hugh Buckle and Geoff Graham. Be aware it may reference functionality which has changed or is deprecated in the latest versions of MMBasic. Note : Any required file(s) are available in the attachments tab (top right). MAXMAN.BAS : '* * * * * * * * * * * * * * * * * * * * * * * * * '* * '* - M A X [...]

TOWERS of HANOI — 4.6%

This module is part of the original MMBasic library. It is reproduced here with kind permission of Hugh Buckle and Geoff Graham. Be aware it may reference functionality which has changed or is deprecated in the latest versions of MMBasic. Note : Any required file(s) are available in the attachments tab (top right). This program plays the game of Towers of Hanoi for you. It is a programming exercise in recursion, that is, where a subroutine, in this case "TOWER", calls itself. It plays on a MicroMite using a VT100 terminal .eg Tera Term. [...]

Some Hints & Tips for writing efficient code. — 2.8%

[...] aimed at the MicroMite range of micro-controllers but the ideas are fully migrate-able across all the MMBasic platforms and beyond. On the smaller micromites, some tasks can be a big ask for an interpreter at 48MHz (or slower). Some of the following tips got an RC4 encryption algorithm usable - it was struggling to do un-encrypt >> process >> encrypt in under 1.5 seconds. It's still tight for long strings but it's usable now. So these tips can help and even have proved vital in some instances - do not dismiss as mere pedantry too lightly. This isn't an exhaustive list; [...]

Sprite Demonstration — 2.6%

This module is part of the original MMBasic library. It is reproduced here with kind permission of Hugh Buckle and Geoff Graham. Be aware it may reference functionality which has changed or is deprecated in the latest versions of MMBasic. Note : Any required file(s) are available in the attachments tab (top right). '------------------------------------------------------------------------------ ' [...]

Bug in code (Sprite Demonstration) — 2.5%

[...] "sprites" ' Load sprite definitions DIM p(8,4) ' Define array size FOR n=1 TO 8 ' Set all 8 sprites data p(n,1)=n*25+125 ' X co-ordinate p(n,2)=216 ' Y co-ordinate p(n,3)=FIX(RND*4)+1 ' Random 4 direction SPRITE on n,n*25+125,216 ' Turn on sprite NEXT n GAMELOOP: [...]

SMS (Text) Gateway with MicroMite — 2.3%

[...] exotic about it - no CFunctions or anything, it is a good demonstration of using the building blocks in MMBasic to provide an intelligent (and for me) really useful tool that sees daily use. It represents about two months of evolving code with tears, tantrums, a few late nights and a lot of head scratching... READ THE DATASHEETS - over and over until they make sense. It exposes a web API allowing text messages to be sent via a web browser or any HTTP client (i.e. your own programs). These are then forwarded in real time to the GSM network. The API is multi-session and up [...]

Small Strings — 2.1%

This module is part of the original MMBasic library. It is reproduced here with kind permission of Hugh Buckle and Geoff Graham. Be aware it may reference functionality which has changed or is deprecated in the latest versions of MMBasic. Note : Any required file(s) are available in the attachments tab (top right). This code is intended for early versions of MMBasic where strings were fixed at 255 characters in length (but after PEEK and POKE were implemented). This is no longer the case but this code is included [...]

MMBasic code-pack to Read and Write Winbond Flash Memories — 1.8%

[...] platforms - the MMX and ST's Arm base processors - the H7/F4 platforms. The routines below are a purely MMBasic solution and so can be used on any MMBasic platform supporting the SPI bus. The approach with the code here is comparable to a sequential file. Data is written using one function and read back with another. When data is exhausted a marker, CHR$(255), is reached. This is analagous with the EOF character of disk filing systems. This code provides a simple system of strings in, strings out. It handles just this - what you actually store [...]

ESP8266 WiFi Module with multi-session HTTP API (pure MMBasic) — 1.7%

[...] arguments might vary - I have two, the header + two arguments = 3 strings from the spilt FOR n=2 TO args 'args=1 is a dummy SELECT CASE LEFT$(ucase$(SP$(n)),4) ' check for the name of the argument here and assign the value to a variable CASE "VAR1=" var1$=LTrim$(RTrim$(MID$(sp$(n),5))) CASE "VAR2=" var2$=LTrim$(RTrim$(MID$(sp$(n),5))) END SELECT NEXT IF var1$="" OR var2$="" THEN GOTO IPDerrEXIT ' don't allow empty values - your mileage [...]

Deeply Recursive Ackermann Function with Memoization — 1.7%

[...] evaluated results, and allows a non-naive algorithm to determine whether further recursion is needed. This mmBasic implementation uses memoization to evaluate the Ackermann function. Because of the design of the function, evaluation grows much faster "vertically" than "horizontally". The Ackermann memoization array is defined five times deeper than it is wide. mmBasic's own implementation limits recursive calls to ~100 deep. Once it gets that deep, the program will crash. ' *************************************************************************** ' [...]

MMBasic Source Compression Utility — 1.6%

This module is part of the original MMBasic library. It is reproduced here with kind permission of Hugh Buckle and Geoff Graham. Be aware it may reference functionality which has changed or is deprecated in the latest versions of MMBasic. Note : Any required file(s) are available in the attachments tab (top right). MMBasic Source Compression Utility CRUNCH.bas v2.4 Author: Hugh Buckle June 2013 Updated: Dec 2014 to v2.4 This suite of programs takes an MMBasic program, reduces its [...]

MMFOUR.BAS (Connect Four) — 1.6%

This module is part of the original MMBasic library. It is reproduced here with kind permission of Hugh Buckle and Geoff Graham. Be aware it may reference functionality which has changed or is deprecated in the latest versions of MMBasic. Note : Any required file(s) are available in the attachments tab (top right). MMFOUR.BAS 10: REM This program was originally found on a demo 20: REM tape for the MicroBee computer. It was ported 30: REM to GWbasic and then Qbasic for use on a BBS 40: REM in 1995. 50: [...]

MMBasic Source Code Formatter — 1.4%

This module is part of the original MMBasic library. It is reproduced here with kind permission of Hugh Buckle and Geoff Graham. Be aware it may reference functionality which has changed or is deprecated in the latest versions of MMBasic. Note : Any required file(s) are available in the attachments tab (top right). MMBasic Source Formatter ver 2.3 20/4/2013 Format.bas is a program to indent lines of MMBasic source code in order to highlight the program structure. Four methods [...]

AFTER, EVERY, AT, REMAIN Flexible State Machine Timers using Semaphores. — 1.4%

[...] Locomotive Basic commands of the same names and make executing sections of code asynchronously a breeze. MMBasic provides four timers but they expect a sub program to be called each time and they have to be handled (i.e. if they are one-shot) by the called sub. The following code uses a single MMBasic timer but then expands this to practically unlimited timers and really easy to set one running. The main loop simply checks for the relevant flag and takes action (calls a Sub, changes the state of an output pin etc...) if it is set. After Set [...]

Sort algorithms - A comparison — 1.2%

[...] the most desirable are ease/compactness of coding and speed. Note . This article and the referenced MMBasic sort routines are really academic on the Micromite MkII. CSubs for sorting the relevant data-type are included in the MMBasic download and attached top right and these should be used for single dimension arrays on the MX platform. Counterpart routines are not yet available for the MMX. Discussions have raged for decades over which is the "best" and the reasons for the camps can be as varied as the sort methods. One thing is almost [...]

SHIFT or ROTATE an array of integers — 1.1%

[...] rotate left B() bits. opt: 0=Shift, 1=rotate Sub BigSRL(bits as Integer,opt) Local Integer m,n,c For m=1 To bits c=(B(0) And &h8000000000000000)<>0 For n=0 To Vars B(n)=B(n)<<1 If n<Vars Then If B(n+1) [...]

REVERSE.BAS — 1.1%

This module is part of the original MMBasic library. It is reproduced here with kind permission of Hugh Buckle and Geoff Graham. Be aware it may reference functionality which has changed or is deprecated in the latest versions of MMBasic. Note : Any required file(s) are available in the attachments tab (top right). REVERSE.BAS 10 PRINT TAB(32);"REVERSE" 20 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 30 PRINT:PRINT:PRINT 40 RANDOMIZE TIMER 100 PRINT "REVERSE -- A GAME OF SKILL": PRINT 130 DIM A(20) 140 [...]

Vehicle Reversing Assistant — 1.1%

[...] at 12V is good. Dependencies Distance() CFunction - This is in the embedded modules section of the MMBasic distribution. CPU 48 'need to be fairly quick Option Base 0 Option Baudrate 9600 'debug output is available to the console Option AutoRun On Const Ver=1.3 Const LockDist=500'safe distance in mm Const Beeper=18 'pins for trigger and return on the three distance sensors Dim Integer n,m,SP(5)=(14,15,16,17,21,22),SR(2)'SP is the pins for the Distance function for 28pin MM Dim Float x 'Pin 18 is the beeper [...]

SPLIT Function (VB work-a-like) — 1.1%

[...] . Commonly, after a Split(), one uses the UBound() function to determine the number of substrings. MMbasic does not have UBound but the Split function reports the number of elements. If no delimiter is found, it reports 1 element - with SP(1) as the entire string. Substrings are not trimmed. The delimiter can be any length>0. Compatible with all versions of MMBasic. Syntax : NumOfElements=Split(StringToSplit, delimeter) Example usage : z=Split(Time$,":") FOR n=1 TO z PRINT n,SP$(

Shape drawing for Complex Lines and Polygons — 1.1%

The MMX and ST variants of MMBasic implement a Polygon command that takes a set of points in two integer arrays and draws an outline of the area with the option to fill the interior. The following is inspired by this command but includes an option to draw the data as either a line or a polygon. There is no option to fill the enclosed area. As written below, the routines use the Cartesian drawing commands (see dependencies) to provide co-ordinate 0,0 in the bottom left of the display. It is an easy enough job to replace the relevant drawing commands with the native ones [...]

Regular Expression Function — 1.1%

[...] routine. That in turn used Rob Pike's algorithm. It is reasonably fast and brings a powerful feature to MMBasic. It is not a full-blooded regexp function but catches the following functionality: . matches any single character [abc] matches a or b or c ? matches zero or one of the previous character * matches zero or more of the previous character e.g. A* is any number of A's + matches one or more of the previous character ^ matches begin of text e.g. ^A means the string must start with A $ matches end of text e.g. A$ means the string must [...]

Bubble Sort — 1.0%

This module is part of the original MMBasic library. It is reproduced here with kind permission of Hugh Buckle and Geoff Graham. Be aware it may reference functionality which has changed or is deprecated in the latest versions of MMBasic. Note : Any required file(s) are available in the attachments tab (top right). Before choosing a sort algorithm, read this article . BBLSORT1.BAS ' Bubble Sort Routine copied from GW-BASIC online manual ' by Hugh Buckle - Jan 2012 ' Requires MMBasic 3.1 or later BblSort: [...]

RENUM.BAS — 1.0%

This module is part of the original MMBasic library. It is reproduced here with kind permission of Hugh Buckle and Geoff Graham. Be aware it may reference functionality which has changed or is deprecated in the latest versions of MMBasic. Note : Any required file(s) are available in the attachments tab (top right). RENUM.BAS RENUM.BAS is written in MMBasic and requires at least version 4.3a. Renum.bas renumbers basic files, the same way the RENUMBER command used to work in version of MMBasic [...]

Base64 Mime Encode and Decode Functions — 0.9%

[...] Mime$="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" Code: FUNCTION B64Enc$(x$) LOCAL INTEGER c1,c2,c3,w1,w2,w3,w4,n LOCAL STRING so$ FOR n=1 TO LEN(x$) STEP 3 c1=ASC(MID$(x$,n,1)): c2=ASC(MID$(x$,n+1,1)+CHR$(0)): c3=ASC(MID$(x$,n+2,1)+CHR$(0)): w1=INT(c1/4): w2=(c1 AND 3)*16+INT(c2/16) [...]

VT Console Pack. Screen Positioning, Sane Key Scanning And a String Editing Routine — 0.9%

[...] 0 InitVTKeys Main:' just something to demonstrate usage Clr ' clear the screen For n=1 To 25 ' print out a diagonal line of numbers Print At(n,n);Str$(n) Next Window 6,10 ' define window For n=1 To 25 ' demonstrate the contained area of the screen Print n Next Window 1,25 Clr a$=StrEdit$("Fred",10,10,60) ? At(1,1);a$ The Code Function At(v As Integer,h As Integer) [...]

Short range radio network (not WiFi). SLAVE module. Uses cheapie 433MHz modules or HC-12 — 0.9%

[...] Integer Dim MyJob As String Dim a$, tm$, cmd$, pl$, R ' R is the serial buffer Dim Integer c,src,dst,n Dim Integer FLAGS=0 ' 0 STX ' 1 GS ' 2 ETX ' 3 Init. device has restarted And never heard from the master ' 4 in FIRE mode ' 5 in SAFE mode ' 6 just been configured ' 7 ' 8 ' 9 '10 '11 '12 '13 '14 '15 '16 [...]

LCD Panels Summary — 0.8%

[...] page is an attempt to summarise and link to the various LCDPANEL drivers available for the various MMBasic platforms. These can be built in (OPTION LCDPANEL xxxx), Cfunction loadable drivers or MMBasic drivers implemented with the OPTION LCDPANEL USER method. The scope includes links to various TBS threads that discuss supporting PCB designs, drivers etc, where to purchase. In general this page will try to link to relevant threads on TBS rather than reproduce the information here. This page initially inspired by @panky's TBS post . TBS [...]

_MMBasic Code Library — 0.8%

Welcome to the {NAMESPACE} namespace (zone) of MMBasic is an interpreter for members of the PIC 32MX & 32MZ, STM H7 & L4 micro-controllers, the Raspberry Pi and a DOS version. Principally developed by Geoff Graham for PIC32MX and later Peter Mather's eXtreme version for the PIC32MZ and versions for the STM H7 and L4, you can get it and read all about it here:  http://mmbasic.com/ It provides a rich programming interface that harks back to the "feel" of the original (and widespread) MicroSoft Basic languages with definite influence from [...]

Colour Demos — 0.8%

This module is part of the original MMBasic library. It is reproduced here with kind permission of Hugh Buckle and Geoff Graham. Be aware it may reference functionality which has changed or is deprecated in the latest versions of MMBasic. Note : Any required file(s) are available in the attachments tab (top right). Demonstration programs for the Colour Maximite: CMM4_TST.BAS A test program that demonstrates various graphics on the Colour Maximite running in MODE 4. These include coloured lines, boxes, circles and moving images on the screen [...]