init: pause 1000 serout 7,N2400,(254,1) serout 6,N2400,("START",10,13) main: pause 300 serout 7,N2400,(254,128,"A") serout 6,N2400,("A") readtemp12 3,w0 gosub print12 readtemp12 2,w0 serout 7,N2400,("B") serout 6,N2400,("B") gosub print12 serout 7,N2400,(254,192,"C") serout 6,N2400,("C") readtemp12 1,w0 gosub print12 readtemp12 0,w0 serout 7,N2400,("D") serout 6,N2400,("D") gosub print12 serout 6,N2400,(13,10) goto main print12: if w0 > 32767 then neg serout 7,N2400,(" ") serout 6,N2400,(" ") goto cvt neg: serout 7,N2400,("-") serout 6,N2400,("-") let w0 = 65535 - w0 let w0 = w0 + 1 cvt: let b1 = b1 * 16 let b13 = b0 / 16 let b1 = b1 + b13 if b1 > 9 then nopad serout 7,N2400,(" ") serout 6,N2400,(" ") nopad: serout 7,N2400,(#b1,".") serout 6,N2400,(#b1,".") let b0 = b0 % 16 branch b0,(p0,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15) p0: serout 7,N2400,("00") serout 6,N2400,("00") goto px p1: serout 7,N2400,("06") serout 6,N2400,("06") goto px p2: serout 7,N2400,("12") serout 6,N2400,("12") goto px p3: serout 7,N2400,("19") serout 6,N2400,("19") goto px p4: serout 7,N2400,("25") serout 6,N2400,("25") goto px p5: serout 7,N2400,("31") serout 6,N2400,("31") goto px p6: serout 7,N2400,("37") serout 6,N2400,("37") goto px p7: serout 7,N2400,("44") serout 6,N2400,("44") goto px p8: serout 7,N2400,("50") serout 6,N2400,("50") goto px p9: serout 7,N2400,("56") serout 6,N2400,("56") goto px p10: serout 7,N2400,("62") serout 6,N2400,("62") goto px p11: serout 7,N2400,("69") serout 6,N2400,("69") goto px p12: serout 7,N2400,("75") serout 6,N2400,("75") goto px p13: serout 7,N2400,("81") serout 6,N2400,("81") goto px p14: serout 7,N2400,("87") serout 6,N2400,("87") goto px p15: serout 7,N2400,("94") serout 6,N2400,("94") px: serout 7,N2400,(" ") serout 6,N2400,(" ") return