Maximus BBS

Documentation for Maximus BBS — Next Generation

View on GitHub

Standard Intrinsics

Every built-in function MEX gives you — I/O, user data, areas, files, time, and more

Intrinsics are the built-in functions that connect your MEX script to Maximus. They’re how you print to the screen, read the user record, scan message areas, check the clock, and do file I/O. Without them, MEX is just a language that can do math. With them, your script is the BBS.

Every intrinsic is declared in a header file — max.mh for the core set, maxui.mh for the UI toolkit, socket.mh for networking, json.mh for JSON processing. You #include what you need and the compiler handles the rest.

This page is a map. Pick the category that matches what you’re trying to do, and it’ll take you to the full reference with signatures, descriptions, and examples.


Finding the Right Function

Not sure where to look? Here’s the cheat sheet:

I want to… Go to
Print something to the screen Display & I/O
Read a keypress or get user input Display & I/O
Check who the caller is User & Session
Read or post messages Message & File Areas
Navigate or search areas Message & File Areas
Build a lightbar menu or form UI Primitives
Make an HTTP request Networking
Parse or build JSON JSON
Read or write files on disk Display & I/O (file I/O section)
Generate random numbers Display & I/O (utility headers)

Reference Pages

Display & I/O

Full Reference →

Output, input, file I/O, string manipulation, and the utility functions that every script needs. This is the biggest category — it covers print(), getch(), input_str(), open()/read()/write(), the COL_* color constants, and all the string functions (strlen, substr, strfind, strtrim, etc.).

Header: max.mh (always included)

User & Session

Full Reference →

Everything about the current caller and the session they’re in. The usr struct gives you the caller’s name, alias, city, privilege level, help level, terminal type, and dozens of other fields. Session functions handle time management, privilege checking, class lookups, and the caller log.

Header: max.mh

Message & File Areas

Full Reference →

Reading messages, scanning areas, navigating between areas, file area search, download queue management, and the menu_cmd() dispatch that lets your script invoke any menu command programmatically.

Headers: max.mh, max_menu.mh (for menu_cmd() constants)

UI Primitives

Full Reference →

Cursor positioning, color attributes, bounded input fields, lightbar menus (vertical and 2D positioned), inline select prompts, multi-field forms, and scrollable text viewers. This is the toolkit for building full-screen interfaces.

Header: maxui.mh

Networking (Sockets & HTTP)

Full Reference →

Outgoing TCP connections, raw socket I/O, and the http_request() convenience function for HTTP/HTTPS GET and POST. Includes timeout control so a dead server can’t hang your caller’s session.

Header: socket.mh

JSON Processing

Full Reference →

Parsing JSON strings, reading values with path accessors or cursor navigation, building JSON from scratch, and the type constants. Backed by cJSON under the hood.

Header: json.mh


See Also