★ APPLICATIONS ★ PROGRAMMATION ★ Z-PACK ★ |
Z-PACK's (Amstrad Action) | Z-PACK's (Amstrad Computer User) |
Running with the pack Alastair Scott finds that speed is of the essence, but not at the cost of getting in the way IF you want to program in machine code , you'll need two applications to help you - an assembler and a monitor-disassembler. Zenith Software's Z-Pack is the latest example of the latter. There are two versions -64k and 128k - on opposite sides of the disc. On loading a small program is read in; it can be edited to produce different colours, or the value of HIMEM can be altered. Once loaded, you are in the memory editor. The screen clears to Mode 2 and 384 bytes, starting at &0000, are displayed in hex and Ascii. The current address, plus 8 bit and 16 bit representations of the current byte, are displayed in hex and decimal at the top of the screen. You can scroll through memory using the cursor keys with optional Shift and Control for faster movement, using the Tab key to jump between hex and Ascii input. Bytes are entered at the current address by overtyping the old values with new values. An interesting feature is that the Clr key toggles between showing Ascii characters as is and converting them to printable characters by reducing them to the range 0-127, with control characters replaced by a full stop. All keyed up Z-Pack's most powerful features are unleashed by pressing a function key, at which point a menu drops down and the relevant text or prompts appear. Pressing f0 gets you a help page, giving information about which keys to press. It also displays the location of the markers (see f4). The memory pointer can be changed by pressing f1. This lets you jump to any location without having to scroll through pages of bytes. The disassembler - accessed by pressing f2 - is standard Z80: its output can either be laid over the display of bytes or the whole screen can be used, in which case Ascii values are also displayed. A given block of memory can be disassembled directly to disc or printer. The disc file is standard Ascii format and thus can be read directly by Maxam or any word processor. These files feature predefined labels. Unfortunately the Z-Pack format isn't perfect - if you add code to such a file the labels will become meaningless because the displacements will change (see right). But it's better than nothing. With a word processor or a good search and replace command, the labels can be changed to something more comprehensible. A calculator is available by pressing f3. Type in an expression, and it will be evaluated using integer arithmetic. The four arithmetic operators + - * / and the logical operators AND XOR and OR are all allowed. Numbers can be in hex, decimal or binary, and must lie in the range 0 to 65535. You must be very careful - calculations are worked out from left to right and the normal order of precedence, which is * / + -, doesn't apply. For example: 100/10+10 = 10+10 = 20 but 10+100/10 = 110/10 = 11. While moving around memory, pressing the Copy key twice at different places will mark the start and end of a block. Pressing f4 will allow you to move the block unintelligently - JPs, CALLs and the like are not altered - save it to tape or disc, dump it to printer, or find a string of bytes. The string can be Ascii, hex or both, but wildcards are not permitted. A unique feature is that the block can be filled with a byte which is the result of a simple calculation done with the calculator. Pressing f5 clears the screen and displays a bar. Type in the bar command name and it will behave just as though it were typed from Basic. You can use routines in RAM or expansion roms, and even whistle up Maxam. Z-Pack has three RSX commands of its own; |Z and |ZPACK, which re-run the program, and |CAT, which is the same as the Basic command except that it is bugged - if you use Z-Packs'i CAT all other RSXs are turned off; you have to reset and start again to access them. Another problem is that an external RSX must not change the screen mode: if it does, the Z-Pack printing routine gets confused and starts printing rubbish - you must exit to Basic and restart to correct this. You can page in the lower and upper roms and any expansion ROM {0-251) from option f6, after which they can be read by the memory editor. The 128k version also allows you to view and alter the second bank of RAM - but no more if you have more than 128k. Normal disassembler |
|
|