MARIE simulated clock problem - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

MARIE simulated clock problem

Hello there I am pretty new here but and already have a question. I ve been trying to make a clock using MARIE but after running it it gives me negative entries for hours minutes and seconds.I know it might be something in my source code but i cant figure out what.please if anyone knows anything Im open to suggestions thank you

Alpha, output hrs
output min
output sec

Load sec
Add one
Store sec
Load sec
Store sec
Subt sixty
Skipcond 800
Jump Alpha
clear
Jump Beta

Beta, Load min
Add one
Store min
Load min
Subt sixty
Store min
Skipcond 800

Jump Alpha
Jump Gama

Gama, Load hrs
Add one
Store hrs
Load hrs
Subt tfr
Store hrs
Skipcond 800
Jump Alpha
Store hrs
Jump Alpha

hrs, Dec 0
min, Dec 0
sec, Dec 0
one, Dec 1
sixty, Dec 59
tfr, Dec 24

Sign In or Register to comment.