A89: temp sensor
[Prev][Next][Index][Thread]
A89: temp sensor
>
Hey, i got a decompiler, but i need help translating the 85's z80 asm to
89 asm
reply if interested - i am sending the original 85 file, asm, and inc
file
To continue this, you can also email me direct at hughesb@bellsouth.net
Thanks for your help in advance
p.s. that chip was a bitch to solder
#include josh.INC
#include ti-85.h
.org 0
.db "Temperature Reader v1.0",0
Label32:
ROM_CALL(CLEARLCD)
CALL_(Label0)
LD HL,$3300
LD (CURSOR_X),HL
LD HL,(PROGRAM_ADDR)
LD DE,$00cd
ADD HL,DE
ROM_CALL(D_ZM_STR)
PUSH HL
LD HL,$3a00
LD (CURSOR_X),HL
POP HL
ROM_CALL(D_ZM_STR)
LD HL,Const3
LD (CURSOR_ROW),HL
LD HL,(PROGRAM_ADDR)
LD BC,$0099
ADD HL,BC
ROM_CALL(D_ZT_STR)
CALL_(Label1)
JR NC,Label2
LD HL,Const3
LD (CURSOR_ROW),HL
LD HL,(PROGRAM_ADDR)
LD DE,$00ae
ADD HL,DE
ROM_CALL(D_ZT_STR)
Label4:
HALT
CALL GET_KEY
CP $31
JUMP_Z(Label3)
CP $00
JR Z,Label4
JR Label5
Label2:
CALL_(Label6)
LD D,H
LD E,L
LD L,$01
CALL_(Label7)
JUMP_(Label8)
Label23:
POP BC
POP BC
POP AF
CALL_(Label9)
Label5:
LD HL,ZS_BITS
SET 0,(HL)
RET
LD B,E
LD (HL),L
LD (HL),D
LD (HL),D
LD H,L
LD L,(HL)
LD (HL),H
JR NZ,$00f6
LD H,L
LD L,L
LD (HL),B
LD H,L
LD (HL),D
LD H,C
LD (HL),H
LD (HL),L
LD (HL),D
LD H,L
LD A,($4500)
LD (HL),D
LD (HL),D
LD L,A
LD (HL),D
JR NZ,Label11
LD H,L
LD H,C
LD H,H
LD L,C
LD L,(HL)
LD H,A
JR NZ,Label12
LD H,L
LD L,(HL)
LD (HL),E
LD L,A
LD (HL),D
LD HL,$4300
LD L,B
LD L,C
LD (HL),B
JR NZ,Label13
LD B,H
LD A,($5000)
LD (HL),D
LD H,L
LD (HL),E
LD (HL),E
JR NZ,Label14
LD B,(HL)
DEC (HL)
LD E,L
JR NZ,$014d
LD L,A
JR NZ,$014f
LD H,L
LD (HL),H
JR NZ,$0143
LD L,B
LD L,C
LD (HL),B
JR NZ,Label18
LD B,H
NOP
LD B,L
LD H,H
JR NZ,$013b
LD L,H
LD H,L
LD (HL),E
LD H,L
INC L
JR NZ,$013c
LD (HL),D
LD L,$20
JR NZ,$0117
JR Z,Label22
LD (HL),B
LD L,H
LD H,L
LD (HL),E
LD H,L
LD B,B
LD L,H
LD L,(HL)
LD H,H
LD L,$63
LD L,A
LD L,L
ADD HL,HL
NOP
NOP
Label8:
PUSH AF
PUSH BC
LD BC,$0064
Label24:
PUSH BC
HALT
CALL GET_KEY
Label13:
CP $37
JUMP_Z(Label23)
CP $31
JUMP_Z(Label18)
POP BC
DEC BC
LD A,B
OR C
JR NZ,Label24
Label11:
POP BC
POP AF
JUMP_(Label2)
Label18:
POP AF
Label14:
POP BC
Label12:
POP BC
Label3:
LD HL,$0003
LD (CURSOR_ROW),HL
LD HL,(PROGRAM_ADDR)
LD DE,$00c4
ADD HL,DE
ROM_CALL(D_ZT_STR)
LD HL,(PROGRAM_ADDR)
LD DE,$0108
ADD HL,DE
LD A,(HL)
PUSH AF
Label29:
LD HL,$0803
LD (CURSOR_ROW),HL
POP AF
PUSH AF
LD L,A
LD H,$00
ROM_CALL(D_HL_DECI)
Label30:
HALT
CALL GET_KEY
Label22:
CP $37
JR Z,Label25
CP $09
JR Z,Label26
CP $04
JR NZ,Label27
POP AF
CP $07
JR Z,Label28
INC A
Label28:
PUSH AF
JR Label29
Label27:
CP $01
JR NZ,Label30
POP AF
CP $00
JR Z,Label31
DEC A
Label31:
PUSH AF
JR Label29
Label26:
LD HL,(PROGRAM_ADDR)
LD DE,Const12
ADD HL,DE
POP AF
PUSH AF
LD (HL),A
Label25:
POP AF
JUMP_(Label32)
Label7:
LD H,$02
LD (CURSOR_ROW),HL
LD A,$20
ROM_CALL(TR_CHARPUT)
LD A,E
LD (Const14),A
LD A,D
LD ($80e1),A
BIT 7,A
JR Z,Label33
PUSH AF
LD A,(CURSOR_COL)
DEC A
LD (CURSOR_COL),A
LD A,$1a
ROM_CALL(TX_CHARPUT)
POP AF
AND $7f
LD B,A
LD A,$80
SUB B
LD H,$00
LD L,A
LD A,(Const14)
AND $80
CP $00
JR Z,Label34
DEC L
JR Label34
Label33:
AND $7f
LD H,$00
LD L,A
Label34:
LD DE,$80e8
LD B,$05
Label35:
CALL UNPACK_HL
ADD A,$30
LD (DE),A
DEC DE
DJNZ Label35
LD B,$04
Label37:
INC DE
LD A,(DE)
CP $30
JR NZ,Label36
DJNZ Label37
INC DE
Label36:
INC B
Label38:
PUSH BC
LD A,(DE)
ROM_CALL(TX_CHARPUT)
INC DE
POP BC
DJNZ Label38
LD A,$2e
ROM_CALL(TX_CHARPUT)
LD A,(Const14)
AND $80
CP $00
JR Z,Label39
LD A,$35
JR Label40
Label39:
LD A,$30
Label40:
ROM_CALL(TX_CHARPUT)
LD A,$14
ROM_CALL(TX_CHARPUT)
LD A,$43
ROM_CALL(TX_CHARPUT)
LD A,(Const15)
BIT 7,A
JR Z,Label41
LD A,(Const15)
AND $7f
LD B,A
LD A,$80
SUB B
CP $20
JR C,Label42
RET
Label42:
LD E,A
LD D,$00
LD HL,Const3
LD B,$12
Label43:
ADD HL,DE
DJNZ Label43
EX DE,HL
LD HL,$0140
OR A
SBC HL,DE
JR Label44
Label41:
AND $7f
LD E,A
LD D,$00
LD HL,Const3
LD B,$12
Label45:
ADD HL,DE
DJNZ Label45
LD BC,$0140
ADD HL,BC
Label44:
LD A,(Const14)
AND $80
CP $00
JR Z,Label46
LD BC,$0009
ADD HL,BC
Label46:
LD A,$0c
LD (CURSOR_COL),A
LD DE,$80e8
LD B,$05
Label47:
CALL UNPACK_HL
ADD A,$30
LD (DE),A
DEC DE
DJNZ Label47
LD B,$03
Label49:
INC DE
LD A,(DE)
CP $30
JR NZ,Label48
DJNZ Label49
Label48:
INC B
Label50:
PUSH BC
LD A,(DE)
ROM_CALL(TX_CHARPUT)
INC DE
POP BC
DJNZ Label50
PUSH DE
LD A,$2e
ROM_CALL(TX_CHARPUT)
POP DE
LD A,(DE)
ROM_CALL(TX_CHARPUT)
LD A,$14
ROM_CALL(TX_CHARPUT)
LD A,$46
ROM_CALL(TX_CHARPUT)
RET
Label64:
CALL_(Label51)
LD A,(TEXT_MEM)
CALL_(Label52)
JR C,Label53
LD A,H
CALL_(Label52)
JR C,Label53
CALL_(Label51)
LD A,($80e0)
CALL_(Label52)
JR C,Label53
LD A,L
CP $01
JR Z,Label54
CALL_(Label55)
LD H,A
Label54:
CALL_(Label56)
LD L,A
Label53:
CALL_(Label57)
RET
Label60:
CALL_(Label51)
LD A,(TEXT_MEM)
CALL_(Label52)
JR C,Label58
LD A,H
CALL_(Label52)
JR C,Label58
LD A,L
CP $01
JR Z,Label59
LD A,B
CALL_(Label52)
JR C,Label58
Label59:
LD A,C
CALL_(Label52)
Label58:
CALL_(Label57)
RET
Label0:
LD HL,Const12
LD DE,(PROGRAM_ADDR)
ADD HL,DE
LD A,(HL)
SLA A
OR $90
LD (TEXT_MEM),A
INC A
LD ($80e0),A
RET
Label1:
LD A,$04
Label63:
DEC A
PUSH AF
LD H,$01
LD L,$01
LD C,$00
CALL_(Label60)
CALL_(Label61)
JR Z,Label62
POP AF
OR A
JR NZ,Label63
SCF
RET
Label62:
POP AF
OR A
RET
Label61:
LD H,$01
LD L,$01
CALL_(Label64)
BIT 0,L
RET
Label9:
LD B,$04
Label65:
PUSH BC
LD H,$01
LD L,$01
LD C,$01
CALL_(Label60)
POP BC
DJNZ Label65
RET
Label6:
LD H,$00
LD L,$02
CALL_(Label64)
RET
Label51:
LD A,$c0
CALL_(Label66)
LD A,$c4
CALL_(Label66)
JR Label66
Label57:
LD A,$cc
CALL_(Label66)
CALL_(Label66)
LD A,$c0
JR Label66
Label52:
PUSH BC
LD B,$08
Label69:
RLCA
PUSH AF
LD A,$cc
JR NC,Label67
XOR $04
Label67:
CALL_(Label68)
POP AF
DJNZ Label69
LD A,$c8
CALL_(Label68)
RR C
POP BC
RET
Label55:
LD A,$cc
JR Label70
Label56:
LD A,$c8
Label70:
PUSH BC
PUSH AF
LD B,$08
XOR A
Label71:
PUSH AF
LD A,$c8
CALL_(Label68)
POP AF
RR C
RLA
DJNZ Label71
LD B,A
POP AF
CALL_(Label68)
LD A,B
POP BC
RET
Label68:
CALL_(Label66)
CALL_(Label66)
LD C,$07
.db $ed ; 'í'
LD C,B
Label66:
OUT ($07),A ; Port 7 Link Port
XOR $08
RET
.end
Const3 = $0000
Const12 = $0108
Const14 = $80e2
Const15 = $80e1
Temp.85s