SPECTRUM DISASSEMBLER S.H. Man from Tottenham presents a program for taking apart the ROM or any machine code program all in 16K. [The program in DISASSEM.TAP includes the enhancements by] [W.E. Thomson from ZXC Feb/Mar'86. JimG ] This BASIC program allows the budding machine code programmer to disassemble any section of memory. The clever part is that it fits into 16K! All 694 of the Z80 instruction set are catered for and the program will PEEK at the addresses and convert the numbers to the correct mnemonic form. The program achieves this by storing all the mnemonics in DATA statements and only reading them as required, and not, as is usual, allocating them to an array. Using the Program When first RUN, the screen displays a request for the start address of the disassembly. This can be in either hex or decimal form and should be preceded by either H or D as appropriate. For example, H0010 (address 16 in ROM) is a possible hex input, or D16 is the decimal version. Note that leading zeros to make a four figure number MUST be added when entering in hex. Most invalid inputs have been trapped with an appropriate message. The program will now disassemble from that address, displaying in hex and mnemonic form the contents of that and subsequent memory locations. The screen format shows the address in hex, the machine code and the mnemonic. When the screen is full you are given the message "MORE? (Y/N/C/E)": Pressing Y clears the screen and disassembly continues. Pressing N restarts the program. Pressing C produces a COPY (provided that a printer is attached). Pressing E ends the program. You must press ENTER after selecting one of the above options. If you are using a 48K Spectrum then change 32767 to 65535 in line 980. [I changed it to check P-RAMT instead. JimG] --- Spectrum Disassembler Dear ZX Computing, S.H. Man's useful program (Oct/Nov 1985 pp.96-99) needs two improvements. The first is to allow for the Definition Byte that always follows RST 0008 in a Spectrum machine code program. The simplest way is to alter the "RST 0008" of line 2210 to "RST 0008,#". The second is to work out and print the absolute address for relative jumps, for no one wants to have to bother with Hex arithmetic to find out where relative jumps go to. This can be done by adding the following lines: [see lines 145 and 3950-4060 in DISASSEM.TAP] W.E. Thomson Aldeburgh, Suffolk - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - FISH! There's something fishy about Ken Rylett's Mancunian card game. This simulation of the well known card game, which resembles "Happy Families", is played between you and the Spectrum, and the computer has obviously been tutored well. Both you and the Spectrum are dealt a hand of cards and you then take turns to ask each other for cards of the same value, but you must hold at least one of those cards in your hand. For instance, if it is your turn and you have one or more Kings then you may ask the Spectrum for any Kings it has. When asked for any cards you must hand over all you have of that value. If the player asked does not have any cards of the value required, then the message "GOOD FISHING" is displayed and the cards are added to the asker's total. [That sentence is wrong. "GOOD FISHING" is displayed when the other player DOES have matching cards. JimG] When the total of any card value is four then that player has a made a "book". The first player to reach seven books wins the game. If a player asks for a card value which the opponent does not have then the message "GO FISH" is displayed and the player draws another card from the pack and play passes to the other player - unless the value of the card drawn happens to be the same as the card asked for originally, in this case the player continues his turn. A fascinating game which has caused us much frustration in the office! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ATTACK OF THE MUTANT WALLIES! Ever wondered what it's like to be a teacher? A. Haslam gives us a taste of life in a Walsall school! Teachers are fighting for a pay rise, but have you ever wondered what they are doing to deserve one? Well here's your chance to try out a typical day in a typical school. Problems? You can't expect to succeed at the first attempt, so you had better report your problems to the Head, he's sure to help! But of course you have to get there and the pupils are not exactly helpful. The first screen sees you trapped behind a pile of desks by the school Idiot. Using keys 5 and 8 to move left and right, get into a position where you can throw a book at him by pressing key 0. Hit him and you will escape into ... The corridor, where lurks the school Burk. He immediately locks you in the cupboard where you must hit him with a pellet in order to escape to ... The entrance hall, and here life becomes difficult. For here you meet the Super Wally who is throwing sweets across the hall in a straight line; you have to find a gap and get across to reach the Super Wally alarm bell. Reach it and the Head will come out to remove Super Wally and punish him as he deserves. Oh, one last thing, as it is very near the end of the day you only have a limited time to do each of these things before school ends. Structure Lines 3 to 60 give the instructions, these are "comprehensive". Lines 70 to 490 are the first level, the classroom. Lines 495 to 820 are the corridor. Lines 830 to 1070 are the entrance hall routines. Lines 1080 to 81 30 Winning routines and High score. Lines 9000 to 9400 graphics and tune. A special point of interest is the use of the UDGs. These are redefined no less than FOUR times throughout the run of the program. So, Mr. Chips, take cane in hand and NUT insurance in the other and do your duty!