Maths Subroutines for the 664 and 6128 only


&BD5ETEXT INPUT
ActionAllows upto 255 characters to be input from the keyboard into a buffer (hmmm ... not really a maths routine ...)
EntryHL points to the start of the buffer - a NUL character must be placed after any characters already present, or at the start of the buffer if there is no text
ExitA has the last key pressed, HL points to the start of the buffer, the flags are corrupt, and all others are preserved
NotesThis routine prints any existing contents of the buffer (upto the NUL character) and then echoes any keys used; it allows full line editing with the cursor keys and DEL, etc; it is exited only by use of ENTER or ESC
&BD7FREAL RND
ActionCreates a new RND real value at a location pointed to by HL
EntryHL points to the destination for the result
ExitHL points to the RND value, AF, BC, DE and IX registers are corrupt; and all others are preserved
&BD8BREAL RND(0)
ActionReturns the last RND value created, and puts it in a location pointed to by HL
EntryHL points to the place where the value is to be returned to
ExitHL points to the value created, AF, DE and IX are corrupt, and all other registers are preserved
Notes:See the BASIC handbook for more details on RND(0)


David Cantrell, March 1996