#include    <stdio.h>
#include    <exec/types.h>
#include    <exec/libraries.h>
#include    <proto/exec.h>
#include    <proto/dos.h>
#include    <FrameMachine/fm.h>
#include    <FrameMachine/fmpragma.h>


struct  Library *FrameMachineBase;
extern  struct  Library *SysBase;

main(argc,argv)
int    argc;
char   *argv[];
{
  WORD          status;
  WORD          xloop, yloop;
  UBYTE         g[720];

  char          *version[] =
                {"$VER: PRISMA-CLEAR V1.3 (15.6.93)\n"};


    FrameMachineBase = OpenLibrary("framemachine.library",0);
    if (FrameMachineBase)
    {
        /* Jetzt Gehts los ales ist gerüft */
        /* NEVER! Forget to lock FrameMachine! */
        LockFM();

        if (PrismAttached())
        {
            status = PrepWrite(720,570, WRITE_BW , NULL, NULL, NULL);
            if (!status)
            {      
                /* Make new line of BW-Data:   */
                for (xloop=0; xloop<720; xloop++)
                {
                    g[xloop] =200;
                }

                for (yloop=0; yloop<570 && !status; yloop++)
                {
                    status = WriteBW8Line(g);
                }
            EndWrite();
            }
        }
        UnLockFM();

        if (FrameMachineBase)
        {
            CloseLibrary(FrameMachineBase);
        }

    }
}

