APPENDIX NINE _____________________________________________________________ Numerical Conversions If you use this map a lot, or use the Atari a lot for machine language routines, interrupts, graphics and the like, you know the need to translate between decimal and hexadecimal, even back and forth with binary, frequently. It is possible, although tedious, to do your translations by hand, using pencil and paper. The tables for doing so are below. It's not the best nor the fastest method available. I recommend you get the Texas Instruments TI Programmer calculator. It does most of this work for you, plus bit manipulation (unfortunately it does not offer binary translation). It's an indispensable tool for programmers. There are other ways around buying the calculator: you can buy Monkey Wrench from Eastern House Software, which will do the hex - decimal translations for you quite nicely. Or you can buy any of the numerous disk or programming utilities which include such translation routines, such as Disk Scan from Micro Media. However, those who wish to do the work themselves can use a simple translator program. One such example, modified from routines that appeared separately in COMPUTE!, November 1981 and March 1982, is: 10 DIM HEX$(16),DEC$(23),NUM$(10),W$( 4),BIN$(8),BNY$(8),TRANS(8) 15 DATA 128,64,32,16,8,4,2,1 20 FOR N=1 TO 8:READ B:TRANS(N)=B:NEX T N:POKE 201,14 25 PRINT CHR$(125) 30 HEX$="0123456789ABCDEF":DEC$"=@ABC DEFGHI!!!!!!!JKLMNO" 40 ?:?"PRESS [OPTION] FOR HEXADECIMAL": ?"{6 SPACES}[SELECT] FOR DECIMAL":?" {6 SPACES}[START] FOR BINARY" 42 ?"{6 SPACES}TRANSLATIONS":A=1:MAX= 4096 50 IF PEEK(53279)=3 THEN GOTO 100 60 IF PEEK(53279)=5 THEN GOTO 200 70 IF PEEK(53279)=6 THEN GOTO 300 80 GOTO 50 100 ? : ?"ENTER HEXADECIMAL NUMBER":"? "$0000 TO $FFFF": INPUT NUM$:ACC= 0:A=1:TRAP 100 120 FOR NUM=1 TO LEN(NUM$):ACC=ACC*16 +ASC(DEC$(ASC(NUM$(NUM))-47))-64: NEXT NUM:T=ACC