[icon] SWI Converter


Instructions

SWI converter is a useful tool for any BASIC programmers who use software interrupts (SWIs) in their programs. SWIs are instructions to the operating system, and are prefixed in BASIC with the keyword SYS. The command itself can either be in the form of a string, or a number.

It is far more convenient for the programmer to use the string version as these are easily remembered and make programs easier to follow. But the strings take up more memory and disc space than their equivalent numbers, and execute more slowly.

SWI converter solves this problem, by allowing the programmer to enter a string and convert it to a number, or vice versa. To use the converter, install on the iconbar as usual. Click to open the main window. Use the arrow keys to move the caret into either the decimal number, hexadecimal or text string icon, and enter the command. Press return or click OK, and the SWI will be converted into the other two forms. You can continue like this, or use the arrow icons to move through SWIs in numerical order.

A second, and either more useful feature of SWI converter, is the ability to convert all the SWIs in a program automatically. To use this facility, simply drag the program icon over the iconbar icon or the window. Another window will open. Use the "destination" part of the window like an ordinary save box, to indicate where the converted program should be saved (drag the icon to a directory display). Use the radio icons to choose which types of SWI should be converted to which and click OK. After a while, the new program should be saved.

Note: It is not a good idea to save the converted program on top of the old one. The new version should be tested before the old one is deleted.

If the original program had its SWIs in the form of numbers, and you convert them to text, this may make some lines too long, and conversion will fail. If this happens, split the long lines and try again.

SWI converter will only convert the SWIs prefixed with SYS in BASIC programs. It will not convert SWIs in assembler.

Quit the program from the iconbar menu as usual.

Download (9K)


[e-mail] [Home] [Back] Return to the software index