MCODE - IS THIS FOR YOU Part 2 References: A. DATAFILE V6N6 and V6N4. B. DATAFILE V5N4. C. HP-41 MCODE for Beginners - Ken Emery. INTRODUCTION 1. My apologies for the late arrival of the second part of this series. Due to the length of this series there will be a third part to complete the original target functions and I may produce more. 2. Mark Powell has given me permission to absorb some of his routines into my code. The routines are well described at reference A. DISCUSSION 3. I left you with a command jump table which summarised the relationship of the functions. Please ammend your table as follows: a. CLBUFF is now DELBUF b. SF7 should have the address F0B7 next to it. 4. The functions that will be covered are: a. DELBUF b. STOBUFF c. STOKEYS DELBUF 5. Reference A descibes the code. STOBUFF 6. The essence of this routine is covered by 5 procedures: a. Is there a working Data file - exit if no. b. How much space available from the pointer to the end of the file. c. Locate the buffer - exit if non-existent. Calculate the number of registers in the buffer. d. Will it fit - exit if no. e. Store the registers in the Data file. STOKEYS 7. As for STOBUFF with the following difference: c. Locate key assignments - exit if non-existent. Calculate the number of assignment registers. PASSING OF VARIABLES BETWEEN ROUTINES 8. M and N are used to hold important information: a. M = 44 01 ss sx xx xn nn See reference B but this time nnn= number of Data file registers. b. N = HH NN .. .. .. .a aa HH= buffer header, NN = number of buffer/key assignment registers, aaa = address of buffer header or 0C0 for key assignments. LISTING 9. The remarks should help understand the functions - remember the ZENROM does not dis-assemble co-located quad Xeq and Gto's correctly-I have crossed out the appropriate text. DELBUF 10. Place buffer ID in X execute DELBUF. STOBUFF/STOKEYS 11. Set data pointer to place in the file where you wish to store. For a buffer place the ID in X and execute STOBUFF, for key assignments just execute STOKEYS. The pointer will be updated to point at the register beyond the block taken for these 2 functions. Error messages are: a. NO WORK FILE - a Data File has not been declared. b. NO ROOM - insufficient space between the pointer and the end of the file. c. NONEXISTENT - no buffer or key assignments. FAT TABLE 12. Update the table as follows: a. F001 007 F008 000 F009 0AB F00A 000 F00B 0B6 F00C 001 F00D 0F2 F00E 002 F00F 0A3 b. F10B 369 F10C 03C F10D 2E9 13. Part 3 will contain RCLBUFF and RCLKEYS. Please forward a disc for the RSU image or ZENROM's user register format. Send a SAE for a reply to any queries and finally has any one found any bugs? John Bruce 164N