22 HA) 23 N- b versi j : keyboard. The System Variable PIP:does not affect the Nuninenon "m ; MONITOR'S keyboard Beep. h This routine will convert Hex numbers to Decimal, or vice versa. č BEČAN Poih oxplained eariler, the MONITOR usez ite own ; i interna! Stack except when a program is running. The program . N lju No za ' ij Stack is reset from "SP" in the data block solidne in Appendix i : A whenever a 'J' (Jump) or 'C' (Break Continue) command is a ai i k executed, When the 'Y' (Return) command is used, the NUMBER H/D? zm program Stack is cleared and reset to its normal Basic starting ; point as defined in the System Variable ERR SP. Type H (for Hex) or D (for Decimal) to indicate the number system Ri, SEJI i 4) The CPU register values stored in the addresses shown in H PE O TO pp On Appendix A are only reloaded into the CPU when a Jump (J) : Type H to convert a Hex number to Decimal. y or Break Continue (C) command is executed. Returning to i ; ši Basic (to access your machine code via the USR function) ; The screen wlil serol!, and show 'H' (followed by the cursor, Now resets the CPU register values as defined by the Basic ROM enter four Hex digits. (You must enter leading zeros when entering |. routines. a Hex number). ; 5) In addition to the precautions shown on Page 180 of the bi Type 4000 ; se Sinclair manual advising you not to use the | or IY registers in ia Type ENTER ; machine code programs, it is recommended that, if you need to ti z j use the alternative BC, DE and HL register pairs and wish to The disp!ay wiil now show: return to Basic after your machine code program, you should save the values held in the alternative registers at the start of H 4000 » 16384 š ; your program, and reload them before returning to Basic. with the prompt and cursor on the bottom line. 6) — The Spectrum MON'ITOR does not have its own Save anc Load ki j : z routines because the Basic Save and Load routines in the k i ". To convert from Decimal to Hex, Type D instead of H in response Spectrum allow you to record machine code programs onto ; to "NUMBER H/D?", and enter your decimal number, without cossette. Having written your machine code, you would use | . : leading zeros. Again type ENTER to produce an answer. the Number Conversion (N) command to convert your Hex H : start and end addresses into Decimal, calculate the length of im your program, and use the Return (Y) command to return to The MONITOR in Practice d Basic to Save and Verify your machine code. j ; The purpose of this section is to explain the operations of the : MONITOR that affect all commands, and which have not been J precautions when using machine code. ; " The MONITOR display produces white characters on a blue He background. After lengthy tests with various cclour ; ; No ; combinations, this gave the most readable display. . 5 2). The loudspeaker wil! emit a short Beep when a key is pressed. The length of the Beep has been adjusted to give an easily sudible sound, without slowing down the response time of the