13.07.2015 Views

from GAMMATRON "DATUM" - The MESSUI Place

from GAMMATRON "DATUM" - The MESSUI Place

from GAMMATRON "DATUM" - The MESSUI Place

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

DATUM: games ansofare designDATUM, a "Digital Aid for Teaching you Microprocessors", isa single board microprocessor trainer based on the MC6802processor. Construction and programming have been covered inprevious articles. This final instalment provides moreprogramming details, including three useful examples to showwhat can be done.Although called a minimalmicroprocessor system, DATUM is actually quite powerful, with applicationslimited only by the user's imaginationand programming abilities. Skill in programmingcomes with experience, butto get things started this article has a fewexamples. <strong>The</strong>y have been written asgames, but lend themselves readily tomore practical applications.Before examining the programshowever, we should point out that manyuseful routines have already been writtenand incorporated in the DATUMmonitor. Time delays, character displayand keyboard scanning routines areavailable to be incorporated assubroutines in your own programs.Table 1 provides the names and startingaddresses of useful subroutines inthe DATUM monitor and comments ontheir use. <strong>The</strong>re is a penalty for usingthem, however — single steppingthrough ROM routines is not possible. Asingle-step jump to a monitor routinesimply brings up a prompt and halts execution.In some cases this can be overcomeby copying the monitor routine intoRAM, with appropriate addresschanges.An alternative method of debuggingprograms which incorporate monitorroutines is to single step up to the pointof the jump to the monitor subroutine,reset and then recommence single steppingat the instruction' following thesubroutine call. We can, after all, assumethat the monitor subroutine itself iscorrect.When writing programs it is good practiceto finish with a software interrupt instruction(3F). Should there be an error inFig. 1 (a) shows the flowchart for asimple decision-maker program loop.STARTLOAD IN 'YES'DELAYLOAD IN 'NO'DELAYRepeated <strong>from</strong> last issue, this photo shows the completed DATUM microprocessorboard. Construction and Monitor software have been covered in previous articles.Fig. 1(b)Fig. 1(b) shows a more complexapproach to the same problem which ismore flexible, allowing the use ofcommon subroutines.86 ELECTRONICS Australia, January, 1983

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!