Commit e8ac7b2b authored by Jan Wagemakers's avatar Jan Wagemakers

optimize convTemp

parent 6b5a1548
......@@ -742,25 +742,35 @@ printCelsius
; ASCII_TEMP10, ASCII_TEMP1, ASCII_FRACTION
; ---------------------------------------------------------------------------
convTemp
movff H_TEMP, IOBYTE
movff L_TEMP, MEM
clrf fraction ; fraction = 0
bcf STATUS, C ; clear carry flag
rrcf MEM, f
rrcf fraction, f
rrcf MEM, f
rrcf fraction, f ; MEM = MEM/16 , fraction
rrcf MEM, f
rrcf fraction, f
rrcf MEM, f
rrcf fraction, f
swapf fraction, f
swapf IOBYTE, w ; W = IOBYTE * 16
iorwf MEM, w ; W = HTEMP+LTEMP
;movff H_TEMP, IOBYTE
movf L_TEMP, W
mullw D'16' ; PRODH = L_TEMP/16 | PRODL = fraction * 16
swapf H_TEMP, w ; W = H_TEMP * 16 (ignore negative and big values)
iorwf PRODH, w ; W = H_TEMP:L_TEMP/16
;movff L_TEMP, MEM
;clrf fraction ; fraction = 0
;bcf STATUS, C ; clear carry flag
;rrcf MEM, f
;rrcf fraction, f
;rrcf MEM, f
;rrcf fraction, f ; MEM = MEM/16 , fraction
;rrcf MEM, f
;rrcf fraction, f
;rrcf MEM, f
;rrcf fraction, f
;swapf fraction, f ;
;swapf IOBYTE, w ; W = IOBYTE * 16
;iorwf MEM, w ; W = HTEMP+LTEMP
call ConvDec ; Convert XX
movf fraction, w ; w = fraction
;movf fraction, w ; w = fraction
swapf PRODL, w ; w = fraction (PRODL/16)
mullw D'10' ; PRODL = fraction * 10
movlw D'8' ; W = 8 | 8/16 = .5
addwf PRODL
......
:020000040000FA
:10000000600ED36E806A816A110EC26E6F0EC16E71
:10001000BE0EC06E200E926E130E936E100EE1ECAB
:10001000BE0EC06E200E926E130E936E100ED4ECB8
:1000200002F0010E0E6E4B0E0F6E5A0E156E010E83
:10003000166E176E186ED4EC02F04AEC02F0400E09
:100040008DEC02F0040E83EC02F00A0E83EC02F059
:100050000A0E83EC02F00A0E83EC02F0110E83EC20
:1000600002F01F0E83EC02F00E0E83EC02F0000E85
:1000700083EC02F0180E83EC02F0180E83EC02F011
:10008000030E83EC02F0040E83EC02F0040E83EC0A
:1000900002F0040E83EC02F0030E83EC02F0000E7B
:1000A00083EC02F0080E83EC02F0100E83EC02F0F9
:1000B000080E83EC02F0130E83EC02F0030E83ECC7
:1000C00002F0020E83EC02F0020E83EC02F0000E4E
:1000D00083EC02F0000E83EC02F0000E83EC02F0E1
:1000E0000A0E83EC02F0150E83EC02F0110E83EC85
:1000F00002F00A0E83EC02F0040E83EC02F0000E14
:1001000083EC02F0000E83EC02F0000E83EC02F0B0
:100110000A0E83EC02F01F0E83EC02F01F0E83EC3C
:1001200002F00E0E83EC02F0040E83EC02F0000EDF
:1001300083EC02F0800E8DEC02F0000EF86E060EDD
:10014000F76E6A0EF66E09007BEC02F0190EAF6EC8
:10003000166E176E186EC7EC02F03DEC02F0400E23
:1000400080EC02F0040E76EC02F00A0E76EC02F080
:100050000A0E76EC02F00A0E76EC02F0110E76EC47
:1000600002F01F0E76EC02F00E0E76EC02F0000E9F
:1000700076EC02F0180E76EC02F0180E76EC02F038
:10008000030E76EC02F0040E76EC02F0040E76EC31
:1000900002F0040E76EC02F0030E76EC02F0000E95
:1000A00076EC02F0080E76EC02F0100E76EC02F020
:1000B000080E76EC02F0130E76EC02F0030E76ECEE
:1000C00002F0020E76EC02F0020E76EC02F0000E68
:1000D00076EC02F0000E76EC02F0000E76EC02F008
:1000E0000A0E76EC02F0150E76EC02F0110E76ECAC
:1000F00002F00A0E76EC02F0040E76EC02F0000E2E
:1001000076EC02F0000E76EC02F0000E76EC02F0D7
:100110000A0E76EC02F01F0E76EC02F01F0E76EC63
:1001200002F00E0E76EC02F0040E76EC02F0000EF9
:1001300076EC02F0800E80EC02F0000EF86E060EF7
:10014000F76E500EF66E09006EEC02F0190EAF6EEF
:10015000B06AAA96AC94AC98AB8EAB88AC8A196A9C
:1001600000EE1AF070EC01F09EAAFCD7AECFEFFFC4
:100170006CEC01F0090E1960F2D7192A0D0EEE622F
:10018000F1D7D40E8DEC02F0000EF86E060EF76E6D
:10019000880EF66E09007BEC02F0FFEC01F000EE39
:1001A0001AF00D0EEF6201D004D0EE5083EC02F095
:1001B000F8D7200E83EC02F03F0E1C623FD0500EA9
:10018000F1D7D40E80EC02F0000EF86E060EF76E7A
:100190006E0EF66E09006EEC02F0FFEC01F000EE60
:1001A0001AF00D0EEF6201D004D0EE5076EC02F0A2
:1001B000F8D7200E76EC02F03F0E1C623FD0500EB6
:1001C0001A6223D0560E1B6220D010C00CF011C052
:1001D0000DF02DEC02F01250AD6E83EC02F0FA0E31
:1001E000E1EC02F01350AD6E83EC02F0FA0EE1EC9C
:1001F00002F02E0EAD6E83EC02F0FA0EE1EC02F08E
:100200001450AD6E83EC02F05DD0530E1A6208D02C
:1001D0000DF02DEC02F01250AD6E76EC02F0FA0E3E
:1001E000D4EC02F01350AD6E76EC02F0FA0ED4ECC3
:1001F00002F02E0EAD6E76EC02F0FA0ED4EC02F0A8
:100200001450AD6E76EC02F05DD0530E1A6208D039
:10021000500E1B6205D00EC00CF00FC00DF0D9D7E8
:100220004F0E1A620AD0500E1B6207D0300E80BEED
:10023000310EAD6E83EC02F045D040D03D0E1C6215
:10023000310EAD6E76EC02F045D040D03D0E1C6222
:100240003DD0530E1A621DD0500E1B621AD02E0ED6
:100250001F6217D080BA14D0300E1D5C0A0D300E0C
:100260001E5CF324100DF4CF0EF0F3CF0FF0300E20
:10027000205C100DF350CD0DF450200DF4500F12F2
:10028000CAD74F0E1A621AD0540E1B6217D0940EA2
:100290008DEC02F0E86A83EC02F000EE1DF00D0E2A
:1002A000EF6204D026EC02F0AFEF00F0FA0EE1ECC2
:1002B00002F0EE50AD6E83EC02F0F1D73F0EAD6E62
:1002C00083EC02F0FA0EE1EC02F00D0EAD6EFA0EC8
:1002D000E1EC02F0AFEF00F0ABB2AB98AB881200EC
:1002900080EC02F0E86A76EC02F000EE1DF00D0E44
:1002A000EF6204D026EC02F0AFEF00F0FA0ED4ECCF
:1002B00002F0EE50AD6E76EC02F0F1D73F0EAD6E6F
:1002C00076EC02F0FA0ED4EC02F00D0EAD6EFA0EE2
:1002D000D4EC02F0AFEF00F0ABB2AB98AB881200F9
:1002E000C2B20AD0D890C432C33280AA04D0C4CFDC
:1002F0000EF0C3CF0FF0C282172E1200D30E8DEC7A
:1003000002F01850010B02E1030E01D0040E83EC41
:1003100002F0182E12000400C00E8DEC02F0E86A04
:1003200083EC02F010C00CF011C00DF018EC02F0DC
:10033000020E83EC02F00EC00CF00FC00DF018ECB2
:1003400002F080BE0AD0000EF86E060EF76E840E24
:10035000F66E09007BEC02F009D0000EF86E060E76
:10036000F76E800EF66E09007BEC02F00E50106402
:1002F0000EF0C3CF0FF0C282172E1200D30E80EC87
:1003000002F01850010B02E1030E01D0040E76EC4E
:1003100002F0182E12000400C00E80EC02F0E86A11
:1003200076EC02F010C00CF011C00DF018EC02F0E9
:10033000020E76EC02F00EC00CF00FC00DF018ECBF
:1003400002F080BE0AD0000EF86E060EF76E6A0E3E
:10035000F66E09006EEC02F009D0000EF86E060E83
:10036000F76E660EF66E09006EEC02F00E50106429
:1003700001D00FD0106001D004D00F50116401D013
:1003800008D0162A155016640ED015C016F0808EAF
:1003900006D0D8801606D8B00AD0166A809E200EE5
:1003A00083EC02F007D02B0E83EC02F003D02D0E6D
:1003B00083EC02F0FFEC01F0F0EC02F009A0FCD7B6
:1003C000CC0E04EC03F0440E04EC03F09F0E086E18
:1003D000EAEC02F0F0EC02F009A0EED7CC0E04EC4F
:1003E00003F0BE0E04EC03F01AEC03F00AC006F0B2
:1003F0001AEC03F00AC010F006C011F01200D40E7F
:100400008DEC02F080BA0AD0000EF86E060EF76E80
:100410009E0EF66E09007BEC02F009D0000EF86E1D
:10042000060EF76EA40EF66E09007BEC02F01200C9
:100430002DEC02F0125083EC02F0135083EC02F02A
:100440002E0E83EC02F0145083EC02F0010E83ECCC
:1004500002F0200E83EC02F012000CC00AF00DC076
:1004600006F0076AD89006320732063207320632A3
:10047000073206320732073A0A380610C8EC02F093
:1004800007500A0D080EF326F350100DF450300FEC
:10049000146E1200280EE1EC02F08098030E97EC27
:1004A00002F0050EE1EC02F0808C809C1F0E086EBD
:1004B000EAEC02F0808C809C1F0E086EEAEC02F0E1
:1004C0008098020E97EC02F01F0E086EEAEC02F024
:1004D000280E8DEC02F0100E8DEC02F0060E8DEC65
:1004E00002F00C0E8DEC02F0010E8DEC02F0050E08
:1004F000E1EC02F01200F550D8B4120083EC02F0E7
:100500000900F9D7300F016E0138808897EC02F0AE
:100510000150808897EC02F01200016E013880983B
:1005200097EC02F00150809897EC02F01200026EF6
:10053000809680948092809002B6808602B48084F7
:1005400002B2808202B08080808C809C1F0E086E78
:10055000EAEC02F01200036A043804240F0BD8B24C
:10056000160FD8B2060F060FD8A2FA0F04B81B0F49
:10057000D8A2FA0F04BA300F04BC600F04BE200FDB
:10058000600F033603A0A00F056E04BE032A1200FD
:10059000046EABEC02F005380F0B300F126E0550F5
:1005A0000F0B300F136E1200FA0EE1EC02F0FA0E90
:1005B000E1EC02F0FA0EE1EC02F0FA0EE1EC02F0EE
:1005C0001200006EC70E086EEAEC02F0002EE2EF99
:1005D00002F0120000000000082EEAEF02F0000C0A
:1005E000938A096A819A939A630E086EEAEC02F084
:1005F000938A0D0E086EEAEC02F081AA092A550EC4
:10060000086EEAEC02F0000C0A6E080E0B6E819A7E
:10061000939A0000000000000A32D8B0938A0B0EB3
:10062000086EEAEC02F0938A000000000B2E07EF40
:1006300003F0000C080E0B6E819A939A00000000E4
:100640000000000000000000938A0000000000008D
:1006500000008150200BFF0F0A32090E086EEAECF1
:1006600002F00B2E1CEF03F0000C202D204A616ECF
:1006700020576167656D616B657273202D200000E6
:100680005F5F5F005F2F5F00202020202020202060
:100690002020202020202020202020200000415544
:0A06A000544F2000204D414E200071
:1003A00076EC02F007D02B0E76EC02F003D02D0E87
:1003B00076EC02F0FFEC01F0E3EC02F009A0FCD7D0
:1003C000CC0EF7EC02F0440EF7EC02F09F0E086E34
:1003D000DDEC02F0E3EC02F009A0EED7CC0EF7EC76
:1003E00002F0BE0EF7EC02F00DEC03F00AC006F0CE
:1003F0000DEC03F00AC010F006C011F01200D40E8C
:1004000080EC02F080BA0AD0000EF86E060EF76E8D
:10041000840EF66E09006EEC02F009D0000EF86E44
:10042000060EF76E8A0EF66E09006EEC02F01200F0
:100430002DEC02F0125076EC02F0135076EC02F044
:100440002E0E76EC02F0145076EC02F0010E76ECF3
:1004500002F0200E76EC02F012000D50100D0C3858
:10046000F410BBEC02F0F3380A0D080EF326F3503B
:10047000100DF450300F146E1200280ED4EC02F060
:100480008098030E8AEC02F0050ED4EC02F0808C0A
:10049000809C1F0E086EDDEC02F0808C809C1F0E8D
:1004A000086EDDEC02F08098020E8AEC02F01F0E5E
:1004B000086EDDEC02F0280E80EC02F0100E80ECED
:1004C00002F0060E80EC02F00C0E80EC02F0010E41
:1004D00080EC02F0050ED4EC02F01200F550D8B416
:1004E000120076EC02F00900F9D7300F016E0138E6
:1004F00080888AEC02F0015080888AEC02F01200B9
:10050000016E013880988AEC02F0015080988AECE4
:1005100002F01200026E809680948092809002B663
:10052000808602B4808402B2808202B08080808C97
:10053000809C1F0E086EDDEC02F01200036A043886
:1005400004240F0BD8B2160FD8B2060F060FD8A28C
:10055000FA0F04B81B0FD8A2FA0F04BA300F04BC6C
:10056000600F04BE200F600F033603A0A00F056EBE
:1005700004BE032A1200046E9EEC02F005380F0B35
:10058000300F126E05500F0B300F136E1200FA0E63
:10059000D4EC02F0FA0ED4EC02F0FA0ED4EC02F035
:1005A000FA0ED4EC02F01200006EC70E086EDDECFD
:1005B00002F0002ED5EF02F0120000000000082E1D
:1005C000DDEF02F0000C938A096A819A939A630E18
:1005D000086EDDEC02F0938A0D0E086EDDEC02F081
:1005E00081AA092A550E086EDDEC02F0000C0A6E95
:1005F000080E0B6E819A939A0000000000000A32E8
:10060000D8B0938A0B0E086EDDEC02F0938A0000DE
:1006100000000B2EFAEF02F0000C080E0B6E819A10
:10062000939A000000000000000000000000938A80
:1006300000000000000000008150200BFF0F0A3274
:10064000090E086EDDEC02F00B2E0FEF03F0000C2C
:10065000202D204A616E20576167656D616B657260
:1006600073202D2000005F5F5F005F2F5F00202060
:10067000202020202020202020202020202020207A
:10068000202000004155544F2000204D414E2000B5
:020000040030CA
:0E000000FFC80D1FFF0081FF03C003E0034097
:00000001FF
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment