.equ locat, 0x2100 ;Location for this program ;This little program tells you the value of TH1, which is usually ;guessed by the automatic baud rate detection when PAULMON2 is ;started after a cold boot. This information is required to use ;the fix_baud.asm program, and should replace the value for ;the "baud_const" symbol. .equ cin, 0x0032 .equ pstr, 0x0038 .equ newline, 0x0048 .equ phex, 0x0034 .equ pint8u, 0x004D .org locat .db 0xA5,0xE5,0xE0,0xA5 ;signiture bytes .db 35,255,0,0 ;id (35=prog) .db 0,0,0,0 ;prompt code vector .db 0,0,0,0 ;reserved .db 0,0,0,0 ;reserved .db 0,0,0,0 ;reserved .db 0,0,0,0 ;user defined .db 255,255,255,255 ;length and checksum (255=unused) .db "What's My TH1 Value?",0 .org locat+64 ;executable code begins here lcall newline mov dptr, #mesg1 lcall pstr mov a, th1 lcall phex mov dptr, #mesg2 lcall pstr mov a, th1 lcall pint8u mov dptr, #mesg3 lcall pstr lcall newline mov dptr, #mesg4 lcall pstr lcall cin ret mesg1: .db "The TH1 Value for this baud rate is: ",0 mesg2: .db " (hex) or ",0 mesg3: .db " (dec)",0 mesg4: .db "Press any key",0