From c11b09ce3bd7132fbf86c807c20296cc97d8a450 Mon Sep 17 00:00:00 2001 From: Greg Gauthier Date: Fri, 17 Jan 2025 22:12:50 +0000 Subject: [PATCH] add example action program --- .../entries/Action-language-walkthrough.md | 497 ++++++++++++++++++ md/Atari/entries/various-atari-basic.md | 2 + 2 files changed, 499 insertions(+) diff --git a/md/Atari/entries/Action-language-walkthrough.md b/md/Atari/entries/Action-language-walkthrough.md index 0634e8b..9eaa395 100644 --- a/md/Atari/entries/Action-language-walkthrough.md +++ b/md/Atari/entries/Action-language-walkthrough.md @@ -3,3 +3,500 @@ [**Video Series**](https://rumble.com/playlists/ZLa9d1onaE0) This series is ongoing. It began as an attempt to teach myself Action!, but has evolved into a continuous thing. My next extension to this project will involve [Thomas Cherryholmes Fujinet!](https://fujinet.online/) Keep an eye on this page, as I will be adding explanations, code samples, and other resource links here, to support the series. + +--- + +**Print the Action! Language Logo** + +
+
+; CIS Notice:
+;  
+; I am providing the program for you
+; to look at and maybe help you get
+; started with ACTION!.  It was
+; written 'quick and dirty' and as
+; such does not have many comments
+; and is not the best of code in many
+; places.  Feel free to show it to
+; anyone you like as long as you keep
+; the copyright notice.
+
+; In case you are interested, this is
+; the company logo for Action
+; Computer Services (ACS).
+
+;- Clinton Parker 70435,625
+
+; PS: Hit ESC to exit program
+
+
+; Copyright 1983 by Action Computer Services
+
+; last modified April 13, 1983
+
+MODULE ; LOGO.ACT
+
+DEFINE RTI = "$40",
+  PHA = "$48",
+  PLA = "$68",
+  TXA = "$8A",
+  TAX = "$AA",
+  TYA = "$98",
+  TAY = "$A8"
+
+BYTE start
+BYTE ARRAY display
+CARD ARRAY yLoc(96)
+
+
+PROC NMI()
+  BYTE color, cnt
+  BYTE COLPF1=$D017, WSYNC=$D40A,
+    VCOUNT=$D40B, COLPF2=$D018,
+    COLPF0=$D016
+  BYTE ARRAY col(0)=[$68 $C $96 $38]
+
+  [PHA TXA PHA TYA PHA]
+
+  IF VCOUNT=7 THEN
+    color = start
+    start = start - 1
+    IF (start&$1F)=0 THEN cnt = cnt + 1 FI
+  FI
+
+  color = color - 2
+  WSYNC = 1
+  COLPF0 = color
+  COLPF1 = color
+  COLPF2 = col((cnt + VCOUNT) & 3)
+[PLA TAY PLA TAX PLA RTI]
+
+
+PROC Background()
+  BYTE COLBK=$D01A, VCOUNT=$D40B, WSYNC=$D40A
+
+  [PHA TXA PHA TYA PHA]
+  WSYNC = 0
+  IF VCOUNT>50 THEN
+    COLBK = 0
+  ELSE
+    COLBK = $D6
+  FI
+[PLA TAY PLA TAX PLA RTI]
+
+
+PROC Init7()
+  BYTE i
+  CARD screen, scrloc=88
+ 
+  Graphics(23)
+  SetColor(0,2,10)
+  SetColor(1,0,12)
+  SetColor(2,0,12)
+
+  display = scrloc
+  screen = scrloc
+  i = 0
+  WHILE i<96 DO
+    yLoc(i) = screen
+    screen = screen + 40
+    i = i + 1
+  OD
+RETURN
+
+
+PROC Plot7(BYTE x, y)
+  BYTE ARRAY pos, bm(0)=[$C0$30$C$3],
+  cm(0)=[$0 $55 $AA $FF]
+
+  pos = yLoc(y)
+
+  pos(x RSH 2) ==% (bm(x&3)&cm(color))
+RETURN
+
+
+PROC VLine(BYTE x, y1, y2)
+  WHILE y1#y2 DO
+    Plot7(x, y1)
+    y1 = y1 + 1
+  OD
+RETURN
+
+
+PROC HLine(BYTE x1, x2, y)
+  WHILE x1#x2 DO
+    Plot7(x1, y)
+    x1 = x1 + 1
+  OD
+RETURN
+
+
+PROC DLine(BYTE x1, x2, y1)
+  BYTE incr
+
+  incr = 1
+  IF x2
\ No newline at end of file
diff --git a/md/Atari/entries/various-atari-basic.md b/md/Atari/entries/various-atari-basic.md
index ef578d6..23b0d41 100644
--- a/md/Atari/entries/various-atari-basic.md
+++ b/md/Atari/entries/various-atari-basic.md
@@ -74,4 +74,6 @@ I have a love-hate relationship with BASIC. It's easy to get started, it's diffi
 190  PRINT INT(P)
 200  IF P > 0 THEN 90
 210  END
+
 
+