Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== QTIPS - New Assembler Routines V2.0+===== ^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. ==== MKDIR ==== 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 <code> DIR = "C:\INSTALL" DIR := CHAR(0) CALL MKDIR(DIR,FLAG) IF FLAG THEN GOSUB OK END ELSE GOSUB FAIL END </code> ==== CHATTR ==== 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 <code> CALL CHATTR(A,B,C,D) </code> 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 <code> 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) </code> (Volume 2, Issue 4, Page 3) tips/revmedia/v2i4a1.txt Last modified: 2024/06/19 20:20by 127.0.0.1