tsom Posted February 2, 2021 Share Posted February 2, 2021 (edited) Playing around with my FujiNet, and had loaded up the Basic program to get and display the date and time. So I thought I'd try my hand at doing the same in ACTION. Now, this is the most ACTION I've written...ever. It works, it's not as fancy, but it gets and displays the date and time. MODULE BYTE DDEVIC = $0300 BYTE DUNIT = $0301 BYTE DCOMND = $0302 BYTE DSTATS = $0303 CARD DBUF = $0304 BYTE DTIMLO = $0306 BYTE DUNUSE = $0307 CARD DBYT = $0308 CARD DAUX = $030A BYTE DAUX1 = $030A BYTE DAUX2 = $030B BYTE ARRAY timebuf(6) PROC siov=$E459() PROC setparms(BYTE ARRAY buf) DDEVIC = $45 DUNIT = $01 DCOMND = $93 DSTATS = $40 DBUF = buf DBYT = 6 DAUX1 = $EE DAUX2 = $A0 RETURN PROC main() CARD I PRINTE ("The time is:") setparms(timebuf) siov() PRINTF("%i/%i/%i%E",timebuf(1),timebuf(0),timebuf(2)) PRINTF("%i:%i:%i%E",timebuf(3),timebuf(4),timebuf(5)) RETURN Edited February 2, 2021 by tsom 5 Quote Link to comment Share on other sites More sharing options...
tschak909 Posted February 3, 2021 Share Posted February 3, 2021 Does this make sense to everyone? I'm really trying to make the API easy to use in as many languages as possible. -Thom Quote Link to comment Share on other sites More sharing options...
tsom Posted February 3, 2021 Author Share Posted February 3, 2021 Was pretty easy, once I figured out how Action handled the pointer to the buffer. And the difference between PRINTB and PRINT. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.