Published By | Date | Version | Knowledge Level | Keywords |
---|---|---|---|---|
Sprezzatura Ltd | 01 AUG 1990 | 2.0+ | EXPERT | MKDIR, CHATTR, SEQ, REVLOMSG |
There are two new useful assembler routines included in version 2.0, MKDIR and CHATTR.
As the name implies this is a routine that can be called in place of performing a DOS MKDIR. It is both quicker and cleaner. To implement, call passing two parameters, firstly a file name (CHAR(0) terminated) then a flag (set to 0 for fail, 1 for successful creation). EG
DIR = "C:\INSTALL" DIR := CHAR(0) CALL MKDIR(DIR,FLAG) IF FLAG THEN GOSUB OK END ELSE GOSUB FAIL END
This routine will be of most use to those developers writing utilities which directly update the screen (EG a REVLOMSG editor - see next utility diskette). It permits the alteration of a video attribute at a nominated location/locations on screen. Calling syntax is
CALL CHATTR(A,B,C,D)
where
A | is the X position of the start of the attributes to change |
B | is the Y position of the start of the attributes to change |
C | is SEQ(attribute) required |
D | is the number of attributes to replace |
Thus to start at Position 4,4 on screen and change the next 100 character positions to Yellow on Blue leaving the actual ascii characters on screen unchanged one would
DECLARE FUNCTION ESC.TO.ATTR YOB = CHAR(27) : "C1N" ATTR = ESC.TO.ATTR(YOB) SEQ_AT = SEQ(ATTR) CALL CHATTR(4,4,SEQ_AT,1 00)
(Volume 2, Issue 4, Page 3)