Jump to content
IGNORED

Get Date and Time in ACTION


tsom

Recommended Posts

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 by tsom
  • Like 5
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...