Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,57 @@
|
|||
DEFINE PTR="CARD"
|
||||
DEFINE OBJSIZE="4"
|
||||
TYPE Record=[BYTE b CHAR c INT i]
|
||||
|
||||
PROC PrintObjects(PTR ARRAY items BYTE count)
|
||||
Record POINTER r
|
||||
BYTE n
|
||||
|
||||
FOR n=0 TO count-1
|
||||
DO
|
||||
r=items(n)
|
||||
PrintF("(%B ""%C"" %I) ",r.b,r.c,r.i)
|
||||
IF n MOD 3=2 THEN PutE() FI
|
||||
OD
|
||||
PutE()
|
||||
RETURN
|
||||
|
||||
PROC Main()
|
||||
DEFINE MIN="1"
|
||||
DEFINE MAX="20"
|
||||
DEFINE BUFSIZE="80"
|
||||
BYTE ARRAY buffer(BUFSIZE)
|
||||
PTR ARRAY items(MAX)
|
||||
BYTE count=[0],n,LMARGIN=$52,oldLMARGIN
|
||||
Record POINTER r
|
||||
|
||||
oldLMARGIN=LMARGIN
|
||||
LMARGIN=0 ;remove left margin on the screen
|
||||
Put(125) PutE() ;clear the screen
|
||||
|
||||
WHILE count<min OR count>max
|
||||
DO
|
||||
PrintF("How many objects (%I-%I)?",MIN,MAX)
|
||||
count=InputB()
|
||||
OD
|
||||
|
||||
FOR n=0 TO count-1
|
||||
DO
|
||||
items(n)=buffer+n*OBJSIZE
|
||||
OD
|
||||
|
||||
PutE()
|
||||
PrintE("Uninitialized objects:")
|
||||
PrintObjects(items,count)
|
||||
|
||||
FOR n=0 TO count-1
|
||||
DO
|
||||
r=items(n)
|
||||
r.b=n r.c=n+'A r.i=-n
|
||||
OD
|
||||
|
||||
PutE()
|
||||
PrintE("Initialized objects:")
|
||||
PrintObjects(items,count)
|
||||
|
||||
LMARGIN=oldLMARGIN ;restore left margin on the screen
|
||||
RETURN
|
||||
Loading…
Add table
Add a link
Reference in a new issue