HU-BASIC Commands

Post Reply
User avatar
mz-80a
Posts: 403
Joined: Thu Jan 25, 2018 10:46 am
Location: Devon, UK
Contact:

HU-BASIC Commands

Post by mz-80a »

Well, here they are!

http://www.openspc2.org/BASIC/HTML/MZ-700[Hu-BASIC].html

Very useful as I don't think there is a European manual for HU-BASIC
MZ-80A Secrets
https://mz-80a.com/

Sharpworks (Sharp MZ homebrew)
https: //mz-sharpworks.co.uk/
hlide
Posts: 681
Joined: Thu Jan 25, 2018 9:31 pm

Re: HU-BASIC Commands

Post by hlide »

MZ-700[Hu-BASIC]


- ABS : Returns an absolute value
- ASC : Returns the ASCII code of a character.
- ATN : Returns arc tangent
- AUTO : Generates line numbers automatically
- AXIS : Draws the coordinate axes of XY axis
- BIN$ : Convert to binary number
- CALL : Call a machine language program
- CDBL : Convert to double precision type
- CHARACTER$ : Reads characters on the screen
- CHR$ : Returns the character corresponding to an ASCII code
- CINT : Convert to integer type
- CIRCLE : Draw a circle or ellipse
- CLEAR : Set the lower limit of the memory used by BASIC.
- CLOSE : Close a file.
- CLR : Clear variables and arrays: CLEAR
- CLS : Clear the screen
- COLOR : Set the color
- CONSOLE : Set the display range
- CONT : Resume program execution
- COS : Return cosine
- CSNG : Set to single precision type
- CSRLIN : Return the vertical position of the cursor
- CURSOR : Set cursor position: LOCATE
- CVD : Convert a string to a number
- CVI : Convert a string to a number.
- CVS : Convert a string to a number.
- DATA : define data
- DEF FN : Define a function
- DEF USR : Call a machine language program as a function
- DEFDBL : Declares the type of a variable
- DEFINT : Declares the type of a variable
- DEFSNG : Declares a variable type
- DEFSTR : Declares the type of a variable
- DELETE : Deletes a specified line
- DIM : Declares an array.
- EDIT : Edits the specified line.
- END : Terminates the program.
- EOF : Returns the file end.
- ERL : Returns an error line
- ERR : Returns the error number
- ERROR : Forcibly generates an error
- EXP : Returns the nth power of the base e of the natural logarithm
- FAC : Returns the factorial
- FOR~NEXT : Loop a specified number of times
- FRE(0) : Return the free area
- GOSUB : Call a subroutine
- GOTO : Jump to the specified line
- GPRINT : Display characters on plotter printer
- HEX$ : Convert to hexadecimal number
- HSET : Set the pen position of the current plotter printer as the origin.
- IF ERL : Judges the line where an error occurred and performs branch processing.
- IF ERN : Perform branch processing when an error occurs.
- IF GOTO : Perform branch processing by the condition.
- IF THEN : Perform processing based on conditions.
- INKEY$ : Input from keyboard in real time.
- INP I/O : Input from a port.
- INPUT : Input from keyboard.
- INPUT$ : Input a character of a specified length.
- INPUT# : Input from a file.
- INSTR : Search for a specified character.
- INT : Return the maximum integer value that does not exceed the value.
- KETY LIST : Display the function key list.
- KEY : Defines a function key string.
- KLIST : Displays a function key list.
- LABEL : Defines a label.
- LEFT$ : Extracts a specified character string from the left side of a character string
- LEN : Returns the length of a character string
- LET : Assigns a value to a variable
- LIMIT : Sets the lower limit of a BASIC program
- LINE : Draw a line on a plotter printer
- LINE INPUT : Input a single line.
- LINE INPUT# : Input a line from a file.
- LIST : Display the program.
- LLIST : Display the list on the printer
- LOAD : Load the program
- LOAD? : Check if the program has been saved correctly
- LOADM : Load a machine language program
- LOCATE : Sets the cursor position
- LOG : Returns the natural logarithm
- LPOS : Returns the head position of the printer
- LPRINT : Prints a string or value to the printer
- LPRINT USING : Prints character strings and values with formatting to the printer
- MEM$ : Write character string directly to memory. MEM$ Write character string directly to memory.
- MERGE : Merges programs.
- MID$ : Change a character string to a specified character string. MID$ Change a character string to a specified character string. Extract a specified character string from a character string.
- MKD$ : Converts a value to a character string.
- MKI$ : Converts a value to a character string.
- MKS$ : Converts a value to a character string.
- MODE GR : Sets the mode of the plotter printer to graphic mode
- MODE TL : Set the mode of the plotter printer to text mode (26 characters)
- MODE TN : Set the mode of the plotter printer to text mode (40 characters)
- MODE TS : Set the plotter printer mode to text mode (80 characters)
- MON : Start the machine language monitor
- MOVE : Move the pen of plotter printer to the specified position
- MOVE : Move the pen of the plotter-printer relative to the specified position
- MUSIC : Play music : SOUND
- NEW : Erase the program in the memory
- OCT$ : Convert to octal number
- ON ERROR GOTO : Set the processing line when an error occurs
- ON~GOSUB : Call a subroutine by value
- ON~GOTO : Call the specified line by value
- ON~RESTORE : Change data read line by value
- ON~RESUME : Returns to the specified error line by value
- ON~RETURN : Return by value
- OPEN : Open a file
- OPTION BASE : Set the lower limit of array indexing: set by preference
- OUT : Output to I/O port
- PAGE : Send one page of paper to the plotter printer
- PAI : Return circular liquor ratio
- PCOLOR : Set the pen color of plotter printer
- PEEK : Read out the value from memory
- PHOME : Return the pen of plotter printer to the origin
- PLAY : Play music
- PLOT OFF : Do not use the plotter printer as a substitute for the display
- PLOT ON : Use the plotter printer as a substitute for the display
- POKE : Write the value to memory
- POS : Returns the horizontal position of the cursor.
- PRESET : Reset the dot.
- PRINT : Display a string or value.
- PRINT USING : display with formatting
- PRINT# : Write data to a file
- PRINT# USING : Write data to a file with formatting
- PSET : Set the dot
- RAD : Convert degrees to radians
- READ : Reads data
- REM : Annotate
- RENUM : Renumber lines
- REPEAT OFF : Disable key repeat
- REPEAT ON : Sets the key repeat.
- REPEAT~UNTIL : Loop until the condition is satisfied.
- RESTORE : Change the line for reading data.
- RESUME : Return from error processing
- RETURN : Return from subroutine
- RIGHT$ : Extract a specified character string from the right side of a character string
- RLINE : Draw a relative line on the plotter printer
- RND : Return a value between 0 and 1
- RUN : Run the program
- SAVE : Save the program
- SAVEM : Save a machine language program
- SCRN$ : Reads a specified number of characters from the screen
- SEARCH : Searches for a specified character string in the program
- SGN : Returns a sign
- SIN : Returns the sign.
- SIZE : Returns the free space of memory.
- SKIP : Executes the paper feed of the plotter printer.
- SPACE$ : Returns the specified number of spaces.
- SPC : Display the specified number of spaces
- SQR : Returns the square root.
- STOP : Stops the program.
- STR$ : Converts a value to a character string.
- STRING$ : Generates a specified number of characters
- SUM : Find the sum
- SWAP : Swaps the value of a variable
- TAB : Moves the cursor to the specified position
- TAN : Returns a tangent
- TEMPO : Sets the tempo
- TEST : Performs test printing of plotter printer
- TIME$ : Returns the time.
- TROFF : Trace mode off
- TRON : Trace mode on
- USR : Call a machine language program
- VAL : Converts a character string to a value
- VARPTR : Returns the address of a variable
- VERIFY : Check if the program has been saved correctly
- WHILE~WEND : Loop as long as the condition is satisfied
User avatar
mz-80a
Posts: 403
Joined: Thu Jan 25, 2018 10:46 am
Location: Devon, UK
Contact:

Re: HU-BASIC Commands

Post by mz-80a »

Could be a nice BASIC to play with :)
MZ-80A Secrets
https://mz-80a.com/

Sharpworks (Sharp MZ homebrew)
https: //mz-sharpworks.co.uk/
slaanesh
Posts: 12
Joined: Sat Nov 20, 2021 7:14 am

Re: HU-BASIC Commands

Post by slaanesh »

I did a quick benchmark test with Hudson Basic and it seems decently fast compared to other basics on other 8-bit machines. Even again s-basic.

However after some playing around, I found that the usual s-basic <shift>+<break> didn't break me out of looping or running programs.
I tried many keys and combinations and found <shift>+<space> pauses and <shift>+<F5> breaks out
User avatar
mz-80a
Posts: 403
Joined: Thu Jan 25, 2018 10:46 am
Location: Devon, UK
Contact:

Re: HU-BASIC Commands

Post by mz-80a »

Interesting! Thanks for that. Yeah I had heard before somewhere that HU-BASIC is quicker than the standard Sharp BASIC.
MZ-80A Secrets
https://mz-80a.com/

Sharpworks (Sharp MZ homebrew)
https: //mz-sharpworks.co.uk/
Post Reply