HP67 Error Routine

The HP67 Error routine displays “Error”, flashes once (blank out and then comes back) and then waits for a keypress to clear the error message. It works like this

01247 0 -> a[w]
01250 0 -> c[w]
01251 0 -> s 2
01252 p <- 13
01253 load constant 14 ; E
01254 load constant 10 ; r
01255 load constant 10 ; r
01256 load constant 12 ; o
01257 load constant 10 ; r

(C=eaaca000000000)

01260 binary
01261 c - 1 -> c[wp]

(C=eaacafffffffff)

01262 a exchange c[w]
01263 b exchange c[w]
01264 display off
01265 display toggle   ; show "Error"
01266 m1 exch c
01267 p <- 2
01270 load constant 4

(C=00000000000401)

; wait 0x401 
01271 c - 1 -> c[x]
01272 if n/c go to 01271
(01271 - 01272) * n

(C=...)
(C=00000000000004)
(C=00000000000003)
(C=00000000000002)
(C=00000000000001)
(C=00000000000000)
(C=00000000000fff)

01272 if n/c go to 01271
01273 display toggle      ; blank

; wait 0xff
01274 c - 1 -> c[wp]
01275 if n/c go to 01274
(01274 - 01275) * n

(C=00000000000ffe)
...
(C=00000000000f01)
(C=00000000000f00)
(C=00000000000fff)

01275 if n/c go to 01274

01276 display toggle      ; show "Error"

; clear keypress
01277 0 -> s 15
01300 if 1 = s 15
01301 then go to 01277

01302 m1 exch c
01303 0 -> s 3
01304 CRC 300             ; w/prgm?
01305 if 0 = s 3
01306 then go to 01312
01312 CRC 300
01313 if 1 = s 15
01314 then go to 01317
01315 if 0 = s 3
01316 then go to 01312
(01312 - 01316) * n

(key pressed)

01312 CRC 300             ; w/prgm?
01313 if 1 = s 15
01314 then go to 01317

01317 display toggle      ; =off
01320 b exchange c[w]
01321 CRC 100 ; ready?
01322 delayed rom 00
01323 if n/c go to 0064
I
00064 binary
00065 CRC 1500
00066 CRC 1300
00067 0 -> s 12
00070 delayed rom 02
00071 jsb 01205
00072 if n/c go to 0135
00135 b -> c[w]
00136 if 1 = s 2
00137 then go to 0304
00140 0 -> c[w]
00141 0 -> s 1
00142 0 -> s 3
00143 0 -> c[s]
00144 m1 exch c
00145 if 1 = s 11
00146 then go to 0317
00147 delayed rom 017
00150 jsb 07706
00151 a exchange b[w]
00152 a -> b[w]
00153 if 1 = s 12
00154 then go to 0157
00155 delayed rom 04
00156 jsb 02007
00157 delayed rom 02
00160 jsb 01162
00161 hi im woodstock
00162 display off
00163 display toggle
; clear s 15
00164 0 -> s 15
00165 if 1 = s 15
00166 then go to 0164

(00167 - 00213 = wait loop)
It's only fair to share...Share on FacebookTweet about this on TwitterShare on Google+Share on LinkedInShare on StumbleUponDigg thisPin on PinterestEmail this to someone

Leave a Reply

Your email address will not be published. Required fields are marked *