BBC BASIC Procedures to Download The following Procedures are not programs themselves, but building-blocks which you can use as part of your own programs Procedures
Programs marked 'From ANUW' are taken from Mark Ray's Amstrad Notepad Users Web.
FULLDATE.TXT ... 1.1kb I use FNfull_date in my Auto program as it gives the date in a fuller form, programs some keys and also writes to a file called Date$.Dat which can be read in by other programs. Within Protext you get the date such as "1 August 2000" by pressing the Control Symbol and D keys at the same time . FNfull_date sets the keys Shift Symbol and D to give the date as "Tuesday 1st August 2000".
The line above be used in programs to read Date$.Dat into a variable called date$ If you have my Accounts program, then by removing the REM on line 120 and deleting line 130 it will now display the date in the new form.
PLACER.TXT ... 1.7kb This routine places a supplied word in to a supplied list at the correct position. Inputs sw$(n) -- This is the list of words. Outputs sw$(n) -- This is the revised list.
CIRCLE.TXT ... 770 bytes Simple procedure to draw a circle. Inputs X,Y -- The co-ordinates of the centre of the circle.
FILL.TXT ... 1kb Fills any type of shape in black. (Very slow!) Inputs :- startx%,starty% -- Any point inside the shape.
GETWORD.TXT ... 911 bytes This is a routine to take one word from a sentence at a time and is useful for programs that have command lines. Inputs :- sent$ -- This is the sentence that will be used. Outputs :- word$ -- This is the next word found in the sentence, and will change each time the procedure is called, unless you alter 'start'. If 'word$' contains 'EMPTY' then the end of the sentence has been reached.
RECT.TXT ... 643 bytes Simple procedure to draw a rectangle. Inputs X1,Y1 -- The co-ordinates of one corner of the rectangle.
YELLOW.TXT ... 1kb A yellow event is so called because the FUNCTION key is coloured yellow. A yellow event occurs when the user has pressed one of the FUNCTION+key combinations that cause an immediate context switch (FN+red, FN+green, FN+blue, FN+menu...) or when the machine is powered up and (because the option to preserve context has not been set) needs to return to the main menu. When a yellow event occurs an open application exits normally as quickly as possible and any unsaved files will be saved automatically! You can use yellow events from BBC BASIC to change into an built-in application by loading the variables B% and C% with the yellow event token and then calling the firmware routine 'kmsetyellow' at &B8D5: 10 ***** Call Editor ******** 20 DEF PROC_Editor 30 B%=177:C%=3:CALL &B8D5 40 ENDPROC Set B% and C% to the correct values as shown below to select a program to go to...
BUBBLE.TXT ... 479 bytes These are three routines that sort numbers into ascending order. They all use the same variables, but some are faster than the others in certain applications. Inputs :- a%(n) -- This is the array which contains the items to be sorted. Outputs :- a%(n) -- The array now contains the numbers in ascending order. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home | Features | Data Sheets | Questions | BBC BASIC | Software | |