CLEAR
SET TALK OFF
SET INTE OFF
ERASE
STORE PEEK(340) TO WIDE
STORE PEEK(341) TO LINES
STORE LINES-1 TO CNTLINES
DO WHILE CNTLINES > 1
	@ CNTLINES,0 SAY "*"
	@ CNTLINES,WIDE-1 SAY "*"
	IF CNTLINES > 3
		@ CNTLINES-1,0 SAY "|"
		@ CNTLINES-1,WIDE-1 SAY "|"
	ENDIF
	STORE CNTLINES-2 TO CNTLINES
ENDDO
STORE WIDE-2 TO CNTROW
DO WHILE CNTROW > 0
	@ 2,CNTROW SAY "*"
	@ LINES-1,CNTROW SAY "*"
	IF CNTROW > 4
		@ 2,CNTROW-2 SAY "-"
		@ LINES-1,CNTROW-2 SAY "-"
	ENDIF
	STORE CNTROW-4 TO CNTROW
ENDDO
STORE "Welcome to the dBASE II RCP/M " TO M1
STORE "Presented by" TO M2
STORE "Computer Systems Design " TO M3
STORE INT(LINES/2) TO ML2
STORE ML2-4 TO ML2
STORE ML2-2 TO ML1
STORE ML2+2 TO ML3
STORE INT(WIDE/2) TO MRA1,MRB1,MRC1
STORE MRA1+1 TO MRA2,MRB2,MRC2
STORE LEN(M1) TO P1
STORE LEN(M2) TO P2
STORE LEN(M3) TO P3
STORE INT(P1/2) TO PA1
STORE PA1+1 TO PA2
STORE INT(P2/2) TO PB1
STORE PB1+1 TO PB2
STORE INT(P3/2) TO PC1
STORE PC1+1 TO PC2
DO WHILE PA2 < P1+1
	@ ML1,MRA1 SAY $(M1,PA1,1)
	@ ML1,MRA2 SAY $(M1,PA2,1)
	STORE MRA1-1 TO MRA1
	STORE MRA2+1 TO MRA2
	STORE PA1-1 TO PA1
	STORE PA2+1 TO PA2
ENDDO
SET INTE ON
DO WHILE PB2 < P2+1
	@ ML2,MRB1 SAY $(M2,PB1,1)
	@ ML2,MRB2 SAY $(M2,PB2,1)
	STORE MRB1-1 TO MRB1
	STORE MRB2+1 TO MRB2
	STORE PB1-1 TO PB1
	STORE PB2+1 TO PB2
ENDDO
SET INTE OFF
DO WHILE PC2 < P3+1
	@ ML3,MRC1 SAY $(M3,PC1,1)
	@ ML3,MRC2 SAY $(M3,PC2,1)
	STORE MRC1-1 TO MRC1
	STORE MRC2+1 TO MRC2
	STORE PC1-1 TO PC1
	STORE PC2+1 TO PC2
ENDDO
STORE T TO FIRST
DO DEMOCHC
