//PCLOOP.CPP - LOOP WITH AMPLITUDE CONTROL #include "dsklib.h" //contains several header files char DSK_APP[] = "C31LOOP.OUT"; char DSK_EXE[] = "PCLOOP.EXE"; void config_dsk_for_comm() { MSGS err; //enumerated message for looking up messages clrscr(); Scan_Command_line(DSK_EXE); Detect_Windows(); // Download the communications kernel for(;;) { if(Init_Communication(10000) == NO_ERR) break; if(kbhit()) exit(0); } HALT_CPU(); //load applications code if((err=Load_File(DSK_APP,LOAD))!=NO_ERR) { printf("%s %s\n",DSK_APP,Error_Strg(err)); exit(0); } RUN_CPU(); //DSK is initialized & able to communicate clrscr(); } void main() { unsigned long hostdata = 0; config_dsk_for_comm(); //call function to config for comm for(;;) { clrscr(); printf("\n\n"); printf("\nEnter Attenuation value (1-10) or CTRL-BREAK to quit: "); scanf ("%d", &hostdata); putmem(0x809800L, 1, &hostdata); } }