home *** CD-ROM | disk | FTP | other *** search
/ Chip: Shareware for Win 95 / Chip-Shareware-Win95.bin / ostatni / sms32 / 99tlight.asm < prev    next >
Encoding:
Assembly Source File  |  1997-03-15  |  659 b   |  23 lines

  1. ; ----- Control the traffic lights -----------------------------
  2. ; Press  ALT+R  to tun this program.
  3.  
  4. ; This simple example does not step the lights realistically
  5. ; It lacks a time delay facility.
  6. ; It would be better to use a data table.
  7. ; It works otherwise!  
  8. ; Solving this properly is one of the learning tasks.
  9. ; --------------------------------------------------------------
  10.     CLO        ; Close unwanted windows
  11. rep:
  12.     mov    al,84    ; Red        Green
  13.     out    01
  14.     mov    al,c8    ; Red+Amber    Amber
  15.     out    01
  16.     mov    al,30    ; Green        Red
  17.     out    01
  18.     mov    al,58    ; Amber        Red+Amber
  19.     out    01
  20.     jmp    rep
  21.     end
  22. ; --------------------------------------------------------------
  23.