In order for this site to work correctly, and for us to improve the site, we need to store a small file (called a cookie) on your computer.
By continuing to use this website, you agree to our cookies and privacy policy.
  
Home page Home page Home page Home page
Pixel
Pixel Header R1 C1 Pixel
Pixel Header R2 C1 Pixel
Pixel Header R3 C1 Pixel
Pixel

QTIPS - New Assembler Routines V2.0+

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


0001    DIR  = "C:\INSTALL"
0002    DIR := CHAR(0)
0003    CALL MKDIR(DIR,FLAG)
0004    IF FLAG THEN
0005       GOSUB OK
0006    END ELSE
0007       GOSUB FAIL
0008    END

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

  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)
Pixel
Pixel Footer R1 C1 Pixel
Pixel
Pixel
Pixel