18x clock with BCD (interupt command)

rabag

New Member
hi,

I have a clock program up and running, but I want to have an interupt in the program. The uk time is displayed , but when an interupt command is given I want a different time zone given for example australia. Any help would be great thank you. Here is my program.

main:
let b0= 31 ' %00011111
let b1= 47 ' %00101111
let b2= 79 ' %01001111
let b3= 143 ' %10001111
label_3A: for b6= 1 to 94
for b5= 1 to 94
let pins =b0
let pins =b1
let pins =b2
let pins =b1
let pins =b2
let pins =b3
let pins =b0
let pins =b2
let pins =b3
let pins =b0
let pins =b1
let pins =b0
let pins =b2
let pins =b3
next b5
next b6
label_14: if b0= 22 then label_41
let b0=b0- 1
'pause 1000
goto label_3A

label_41: let b0= 31
if b1= 42 then label_51
let b1= b1-1
'pause 1000
goto label_3A

label_51: let b1= 47
if b2= 70 then label_52
let b2= b2-1
if b2= 75 then label_100
'pause 1000
goto label_3A

label_52: let b2= 79
if b3= 141 then label_53
let b3= b3-1
'pause 1000
goto label_3A


label_53: goto main:

label_100: if b3= 141 then label_101
goto label_3A

label_101: pause 60000
pause 60000
pause 60000
pause 60000
pause 60000
goto main:
 

inglewoodpete

Senior Member
Rather than have everyone try to determine what your code is actually doing, could you repost it 'with comments. Eg What do 31, 47, 79 etc on the outputs mean?

Also, if you wrap code tags around your code, it presents so much better on browsers. Look for the # button on the advanced editor. Forum members are more likely to digest and respond to a post that is easy to understand.
 

hippy

Ex-Staff (retired)
Also, what is each variable used for ? For something displaying the time, I don't see any 60's or 24's which would normally be associated with time counting.

Converting to another time zone should be as simple as using the time you have and adding or subtracting an offset to that. Venezuela recently threw a spanner in the works by adopting a timezone offset by a half-hour rather than the usual whole hour, but I don't think it's the only country to have done that.

For many countries, normal or daylight saving time / summer time can be automatically determined if the day, month and year data is held as well. America threw its own spanner in the works by having moved the date recently, and some countries have some particularly weird timezone change schedules.
 
Top