Basicprogramming(.org) > Community news and announcements


(1/7) > >>

Hello everybody,

For those who don't yet know me from I am Jochen, and my hobby is a particular dialect of BASIC:

MasmBasic "compiles" with the standard Microsoft macro assembler aka MASM (and some clones like JWasm and AsmC).

The latest version is always available here at the Masm32 forum. You can find a badly organised overview of the commands here.

MasmBasic is extremely fast and strong on strings (including Unicode) but somewhat weak on arithmetics. Since it is an assembler library, you can do absolutely everything with it, provided your OS is Windows and an Intel or AMD CPU are working under the hood.

Latest features can always be found at the end of the Masm32 thread, currently here.

Here is a screenshot of an application showing three types of edit controls (Scintilla, ordinary Windows edit control, RichEdit) in a resizable window. The source code (here) is a whopping 18 lines long:

P.S.: My sincere thanks to the Retrogamecoding Forum for hosting the "leftovers" of


Glad you found your way here too.

I didn't have your contact details to let you know about this place after expired but all's well that ends well  :)

MasmBasic update of 31.12.15 features ultra-fast Advanced string sorting, plus a new function for the GUI fans:

include \masm32\MasmBasic\Res\MbGui.asm
Event Paint
  GuiImage "\Masm32\examples\exampl04\car\car.jpg", fit      ; fit=use full window

All commands here, step-by-step installation instructions here.

Ed Davis:

--- Quote from: jj2007 on December 31, 2015, 08:40:28 am ---MasmBasic update of 31.12.15 features ultra-fast Advanced string sorting,

--- End quote ---

How hard would it be for you to produce a version that is called as so:

sort input-file output-file

Reads input file, sorts it, and writes it back out to output-file.

Sorting should be case insensitive and stable.

I'd like to benchmark it against a few of my sorts, just to see how slow/fast mine are.

Thanks in any case!


--- Quote from: Ed Davis on December 31, 2015, 01:30:46 pm ---Reads input file, sorts it, and writes it back out to output-file.

Sorting should be case insensitive and stable.
--- End quote ---

Hi Ed,

Despite its name, QSort is a stable merge sort. Here it is:

include \masm32\MasmBasic\      ; download
  Recall CL$(), L$()    ; CL$() = use commandline
  .if eax>1
      QSortMode cis
      QSort L$()
  Store "Sorted.tmp", L$()
  Inkey Str$("%i lines written to Sorted.tmp", L$(?)), Str$(", %i ms incl. reading & writing", NanoTimer(ms))

26902 lines written to Sorted.tmp, 12 ms incl. reading & writing

Note that this includes disk operations, so comparability may be low. Use a really fat file, e.g. bible.txt, and repeat the action two or three times to make sure the file content is in the disk cache.

QSortMode cis means case-insensitive
QSortMode cis, sls, MyIndexArray() would mean case-insensitive, skip leading spaces, use MyIndexArray() to keep track of original line index.

Let me know how it works out. And don't forget to celebrate the New Year ;-)

P.S.: New thread A simple chessboard, see second attachment.


[0] Message Index

[#] Next page

Go to full version