Commit 2aaf6cd9 authored by Jan Wagemakers's avatar Jan Wagemakers

fix buffer overflow BT + line 3 --> line 4

parent c15ad083
......@@ -124,7 +124,7 @@ WAITms MACRO TIME
;
thermowait
thermowait2
thermowait3
btCounter
btIN ; 0 : S S P O
btIN1 ; 1 : P P V P
btIN2 ; 2 : = ? ? ?
......@@ -167,7 +167,7 @@ start
movwf FILTER_COUNTER
movwf thermowait
movwf thermowait2
movwf thermowait3
; movwf thermowait3
call Wacht1s
......@@ -216,6 +216,7 @@ start
bsf TXSTA, TXEN
again:
clrf btCounter ; btCounter = 0
; characters --> buffer
lfsr 0, btIN
......@@ -234,20 +235,26 @@ read:
movff RCREG, INDF0 ; --> buffer
call clearUART
movlw D'8' ; W = 8
cpfslt btCounter
bra again ; if W => 8 then avoid buffer overflow
; (ignore received chars)
incf btCounter ; btCounter++
movlw D'13'
cpfseq POSTINC0 ; ENTER?
bra read
; ENTER is gegeven
movlw H'94'
call SendINS ; goto line 3 off LCD
PRINT spc20 ; clear line 3
movlw H'D4'
call SendINS ; goto line 4 off LCD
PRINT spc20 ; clear line 4
call printManAuto
; movlw H'94'
; call SendINS ; goto line 3 off LCD
PRINT prompt
;PRINT prompt
; show the given command on the display
lfsr 0, btIN
......@@ -261,11 +268,13 @@ disp:
call SendCHAR
bra dsploop
dispDone:
movlw H'D4'
call SendINS ; goto line 4 off LCD
PRINT spc20 ; clear line 4
movlw H'D4'
call SendINS ; goto line 4 off LCD
movlw " "
call SendCHAR
; movlw H'D4'
; call SendINS ; goto line 4 off LCD
; PRINT spc20 ; clear line 4
; movlw H'D4'
; call SendINS ; goto line 4 off LCD
movlw "?"
cpfseq btIN2
......@@ -574,8 +583,8 @@ RETRY
; print man auto
; ---------------------------------------------------------------------------
printManAuto:
movlw H'94'
call SendINS ; goto line 3
movlw H'D4'
call SendINS ; goto line 4
btfsc MAN
bra modeMAN
......@@ -897,9 +906,8 @@ plus db "+",0
min db "-",0
spc db " ",0
spc20 db " ",0
prompt db "$ ",0
auto db "AUTO ", 0
man db "MAN ", 0
man db " MAN ", 0
; ---------------------------------------------------------------------------
; END
......
:020000040000FA
:10000000600ED36E806A816A7F0EC16E200E926E82
:10001000130E936E100E73EC02F0010E0E6E4B0E6B
:100020000F6E5A0E156E010E166E176E186E196E43
:1000300066EC02F0DCEC01F0800E1FEC02F0000E2A
:10004000F86E050EF76E8E0EF66E09000DEC02F0DE
:10005000190EAF6EB06AAA96AC94AC98AB8EAB8812
:10006000AC8A00EE1AF0E5EC00F09EAAFCD7AECF09
:10007000EFFFE1EC00F00D0EEE62F5D7940E1FECF1
:1000800002F0000EF86E050EF76EB60EF66E090061
:100090000DEC02F08AEC01F0000EF86E050EF76E22
:1000A000CC0EF66E09000DEC02F000EE1AF00D0E0B
:1000B000EF6201D004D0EE5015EC02F0F8D7D40E68
:1000C0001FEC02F0000EF86E050EF76EB60EF66E1F
:1000D00009000DEC02F0D40E1FEC02F03F0E1C6282
:1000E0003FD0500E1A6223D0560E1B6220D010C093
:1000F0000CF011C00DF0BBEC01F01250AD6E15EC20
:1001000002F0FA0E73EC02F01350AD6E15EC02F033
:10011000FA0E73EC02F02E0EAD6E15EC02F0FA0E34
:1001200073EC02F01450AD6E15EC02F040D0530E9B
:100130001A6208D0500E1B6205D00EC00CF00FC022
:100140000DF0D9D74F0E1A620AD0500E1B6207D09D
:10015000300E80BE310EAD6E15EC02F028D023D0EB
:100160003D0E1C6220D0530E1A621DD0500E1B6231
:100170001AD02E0E1F6217D080BA14D0300E1D5C1C
:100180000A0D300E1E5CF324100DF4CF0EF0F3CFE9
:100190000FF0300E205C100DF350CD0DF450200DFB
:1001A000F4500F12CAD73F0EAD6E15EC02F0FA0EE6
:1001B00073EC02F00D0EAD6EFA0E73EC02F031EF3F
:1001C00000F0ABB2AB98AB881200C2B210D0D8909E
:1001D000C432C33280AA04D0C4CF0EF0C3CF0FF014
:1001E000110EC26E6F0EC16EBE0EC06EC282172E91
:1001F0001200182E12000400C00E1FEC02F07E0E3A
:1002000015EC02F010C00CF011C00DF0A3EC01F0E1
:100210007F0E15EC02F00EC00CF00FC00DF0A3EC39
:1002200001F080BE0AD0000EF86E050EF76EAC0E1F
:10023000F66E09000DEC02F009D0000EF86E050E06
:10024000F76EA80EF66E09000DEC02F00E50106469
:1002500001D018D0106001D004D00F50116401D02B
:1002600011D0162A155016641DD015C016F0808EB8
:10027000000EF86E050EF76EB40EF66E09000DEC6A
:1002800002F023D0D8801606D8B016D0166A809E09
:10029000000EF86E050EF76EB40EF66E09000DEC4A
:1002A00002F013D0000EF86E050EF76EB00EF66E6B
:1002B00009000DEC02F009D0000EF86E050EF76E85
:1002C000B20EF66E09000DEC02F08AEC01F082EC41
:1002D00002F009A0FCD7CC0E96EC02F0440E96EC8E
:1002E00002F09F0E086E7CEC02F082EC02F009A096
:1002F000EED7CC0E96EC02F0BE0E96EC02F0ACEC13
:1003000002F00AC006F0ACEC02F00AC010F006C021
:1003100011F01200940E1FEC02F080BA0AD0000E09
:10032000F86E050EF76ED00EF66E09000DEC02F0B9
:1003300009D0000EF86E050EF76ED60EF66E0900A7
:100340000DEC02F01200BBEC01F0125015EC02F0C3
:10035000135015EC02F02E0E15EC02F0145015ECB3
:1003600002F0000EF86E050EF76EA40EF66E090090
:100370000DEC02F012000CC00AF00DC006F0076A86
:10038000D89006320732063207320632073206327A
:100390000732073A0A3806105AEC02F0E86A07B644
:1003A000050F07B4030F07B2010F07A002D007A47F
:1003B000010F300F146E1200280E73EC02F08098BB
:1003C000030E29EC02F0050E73EC02F0808C809C89
:1003D0001F0E086E7CEC02F0808C809C1F0E086E55
:1003E0007CEC02F08098020E29EC02F01F0E086EE1
:1003F0007CEC02F0280E1FEC02F0100E1FEC02F055
:10040000060E1FEC02F00C0E1FEC02F0010E1FECAA
:1004100002F0050E73EC02F01200F550D8B4120091
:1004200015EC02F00900F9D7300F016E0138808811
:1004300029EC02F00150808829EC02F01200016ED4
:100440000138809829EC02F00150809829EC02F0E4
:100450001200026E809680948092809002B6808610
:1004600002B4808402B2808202B08080808C809C42
:100470001F0E086E7CEC02F01200036A043804249C
:100480000F0BD8B2160FD8B2060F060FD8A2FA0F6C
:1004900004B81B0FD8A2FA0F04BA300F04BC600FC7
:1004A00004BE200F600F033603A0A00F056E04BE2C
:1004B000032A1200046E3DEC02F005380F0B300FDA
:1004C000126E05500F0B300F136E1200FA0E73EC04
:1004D00002F0FA0E73EC02F0FA0E73EC02F0FA0E70
:1004E00073EC02F01200006EC70E086E7CEC02F096
:1004F000002E74EF02F0120000000000082E7CEFC6
:1005000002F0000C938A096A819A939A630E086E2E
:100510007CEC02F0938A0D0E086E7CEC02F081AA4E
:10052000092A550E086E7CEC02F0000C0A6E080ECB
:100530000B6E819A939A0000000000000A32D8B036
:10054000938A0B0E086E7CEC02F0938A0000000088
:100550000B2E99EF02F0000C080E0B6E819A939A05
:10056000000000000000000000000000938A00006E
:100570000000000000008150200BFF0F0A32090E1E
:10058000086E7CEC02F00B2EAEEF02F0000C202D7A
:10059000204A616E20576167656D616B65727320DB
:1005A0002D200000DF4320005F5F5F005F2F5F00B2
:1005B0002B002D0020002020202020202020202083
:1005C00020202020202020202020000024200000A7
:0C05D0004155544F20004D414E202000AA
:10001000130E936E100E62EC02F0010E0E6E4B0E7C
:100020000F6E5A0E156E010E166E176E186E55EC89
:1000300002F0CBEC01F0800E0EEC02F0000EF86E38
:10004000050EF76E6C0EF66E0900FCEC01F0190E51
:10005000AF6EB06AAA96AC94AC98AB8EAB88AC8A03
:10006000196A00EE1AF0D4EC00F09EAAFCD7AECFCD
:10007000EFFFD0EC00F0080E1960F2D7192A0D0E30
:10008000EE62F1D7D40E0EEC02F0000EF86E050E03
:10009000F76E940EF66E0900FCEC01F079EC01F0BD
:1000A00000EE1AF00D0EEF6201D004D0EE5004EC19
:1000B00002F0F8D7200E04EC02F03F0E1C623FD095
:1000C000500E1A6223D0560E1B6220D010C00CF0C6
:1000D00011C00DF0AAEC01F01250AD6E04EC02F06C
:1000E000FA0E62EC02F01350AD6E04EC02F0FA0E60
:1000F00062EC02F02E0EAD6E04EC02F0FA0E62EC31
:1001000002F01450AD6E04EC02F040D0530E1A62AF
:1001100008D0500E1B6205D00EC00CF00FC00DF0C1
:10012000D9D74F0E1A620AD0500E1B6207D0300E7C
:1001300080BE310EAD6E04EC02F028D023D03D0E0F
:100140001C6220D0530E1A621DD0500E1B621AD0B2
:100150002E0E1F6217D080BA14D0300E1D5C0A0D0F
:10016000300E1E5CF324100DF4CF0EF0F3CF0FF021
:10017000300E205C100DF350CD0DF450200DF450D6
:100180000F12CAD73F0EAD6E04EC02F0FA0E62EC0D
:1001900002F00D0EAD6EFA0E62EC02F030EF00F0E0
:1001A000ABB2AB98AB881200C2B210D0D890C432B8
:1001B000C33280AA04D0C4CF0EF0C3CF0FF0110E0B
:1001C000C26E6F0EC16EBE0EC06EC282172E1200BE
:1001D000182E12000400C00E0EEC02F07E0E04EC8D
:1001E00002F010C00CF011C00DF092EC01F07F0E87
:1001F00004EC02F00EC00CF00FC00DF092EC01F018
:1002000080BE0AD0000EF86E050EF76E8A0EF66EEE
:100210000900FCEC01F009D0000EF86E050EF76E37
:10022000860EF66E0900FCEC01F00E50106401D051
:1002300018D0106001D004D00F50116401D011D03B
:10024000162A155016641DD015C016F0808E000EAB
:10025000F86E050EF76E920EF66E0900FCEC01F0DA
:1002600023D0D8801606D8B016D0166A809E000E0D
:10027000F86E050EF76E920EF66E0900FCEC01F0BA
:1002800013D0000EF86E050EF76E8E0EF66E090096
:10029000FCEC01F009D0000EF86E050EF76E900E22
:1002A000F66E0900FCEC01F079EC01F071EC02F063
:1002B00009A0FCD7CC0E85EC02F0440E85EC02F0D0
:1002C0009F0E086E6BEC02F071EC02F009A0EED705
:1002D000CC0E85EC02F0BE0E85EC02F09BEC02F039
:1002E0000AC006F09BEC02F00AC010F006C011F044
:1002F0001200D40E0EEC02F080BA0AD0000EF86E96
:10030000050EF76EAA0EF66E0900FCEC01F009D09E
:10031000000EF86E050EF76EB00EF66E0900FCECDE
:1003200001F01200AAEC01F0125004EC02F013509C
:1003300004EC02F02E0E04EC02F0145004EC02F077
:10034000000EF86E050EF76E820EF66E0900FCECDC
:1003500001F012000CC00AF00DC006F0076AD89038
:1003600006320732063207320632073206320732C9
:10037000073A0A38061049EC02F0E86A07B6050F9A
:1003800007B4030F07B2010F07A002D007A4010FA3
:10039000300F146E1200280E62EC02F08098030EEB
:1003A00018EC02F0050E62EC02F0808C809C1F0EAF
:1003B000086E6BEC02F0808C809C1F0E086E6BEC5C
:1003C00002F08098020E18EC02F01F0E086E6BEC23
:1003D00002F0280E0EEC02F0100E0EEC02F0060EEB
:1003E0000EEC02F00C0E0EEC02F0010E0EEC02F020
:1003F000050E62EC02F01200F550D8B4120004ECC5
:1004000002F00900F9D7300F016E0138808818EC2E
:1004100002F00150808818EC02F01200016E0138E1
:10042000809818EC02F00150809818EC02F012004D
:10043000026E809680948092809002B6808602B48C
:10044000808402B2808202B08080808C809C1F0EEB
:10045000086E6BEC02F01200036A043804240F0BE0
:10046000D8B2160FD8B2060F060FD8A2FA0F04B8EA
:100470001B0FD8A2FA0F04BA300F04BC600F04BEE1
:10048000200F600F033603A0A00F056E04BE032AE1
:100490001200046E2CEC02F005380F0B300F126EB8
:1004A00005500F0B300F136E1200FA0E62EC02F0C3
:1004B000FA0E62EC02F0FA0E62EC02F0FA0E62EC56
:1004C00002F01200006EC70E086E6BEC02F0002EF8
:1004D00063EF02F0120000000000082E6BEF02F044
:1004E000000C938A096A819A939A630E086E6BECEA
:1004F00002F0938A0D0E086E6BEC02F081AA092AB5
:10050000550E086E6BEC02F0000C0A6E080E0B6EB6
:10051000819A939A0000000000000A32D8B0938AB2
:100520000B0E086E6BEC02F0938A000000000B2E9D
:1005300088EF02F0000C080E0B6E819A939A00006F
:1005400000000000000000000000938A000000008E
:10055000000000008150200BFF0F0A32090E086EC8
:100560006BEC02F00B2E9DEF02F0000C202D204AC8
:10057000616E20576167656D616B657273202D2018
:100580000000DF4320005F5F5F005F2F5F002B00F4
:100590002D0020002020202020202020202020208E
:1005A000202020202020202000004155544F2000F2
:0605B000204D414E200029
:020000040030CA
:0E000000FFC80D1FFF0081FF03C003E0034097
:00000001FF
This source diff could not be displayed because it is too large. You can view the blob instead.
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