intel MCS BASIC-52 — Intel MCS BASIC-52 Versions 1 & 1.1 Operating and Reference Manual PDF

int e l 4.23 DESCRIPTION OF STATEMENTS STATEMENTS: PH0., PH1., PH0.#, PH1.# MODE: COMMAND and/or RUN TYPE: INPUT/OUTPUT The PH0. and PH 1. statements do the same thing as the PRINT statement except that the values are printed out in a hexadecimal format. The PH0. statement suppresses two leading zeros if the number to be printed is less than 255 (0FFH). The PH1. statement always prints out four hexadecimal digits. The character "H" is always printed after the number when PH0. or PH1. is used to direct an output. The values printed are always truncated integers. If the number to be printed is not within the range of valid integer (i.e.

between 0 and 65535 (0FFFFH) inclusive), MCS BASIC-52 will default to the normal mode of print. If this happens no "H" will be printed out after the value. Since integers can be entered in either decimal or hexadecimal form the statements PRINT, PH0., and PH1. can be used to perform decimal to hexadecimal and hexadecimal to decimal conversion. All comments that apply to the PRINT statement apply to the PH0. and PH1. statements. PH0.# and PH1.# do the same thing as PH0. and PH1. respectively, except that the output is directed to the list device instead of the console device. EXAMPLES: >PH0. 2*2 >PH1. 2*2 >PRINT 99H >PH0. 100 04H 0004H 153 64H >PH0. 1000 >PH1. 1000 >P. 3E8H >PH0.

PI 3E8H 03E8H 1000 03H - 58 -