Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

The Doszip Commander version 3.18 available (Announce)

posted by nidud(R) E-mail, Norway, 31.01.2014, 14:43

> Btw, I've noticed something new. Syntax hilighting in the editor. It seems
> that's only for asm and c for now.

Here is the doszip.txt version:
    Syntax highlighting
    -------------------

    Style codes:

    1. Attrib           A - Set background and forground color
    2. Control          O - Set color of CONTROL characters
    3. Quote            Q - Set color of quoted text
    4. Digit            D - Set color of numbers
    5. Char             C - Set color of chars
    6. String           S - Set color of string
    7. Begin            B - Set color from start of string
    8. Word             W - Set color of words
    9. Nested           N - Set color of nested strings

    The code have the following syntax:

    [<name>]
    00 = <attrib>[ <string>][ <string2>]...
    01 = ...

    Attrib: Color and character, or color (default is space (20h))
    00=A 07 FA

    Control: Color
    00=O 4X

    Quote: Color
    00=Q XB

    Digit: Color
    00=D XB

    Char: Color and char(s)
    00=C XF $%()

    String: Color and string
    00=S 4X Error

    Begin: Color and string(s)
    00=B X6 # include

    Word: Color and word(s)
    00=W X4 ax bx cx dx al bl cl dl
    01=ds es cs ss

    Nested: Color, string1 and string2
    00=N X8 /* */

    File type definition
    --------------------

    Code for syntax is located in [.\doc\style] directory, and file types
    must be defined under the section [Style] in the DZ.INI file:

    [Style]
    asm = asm.ini
    inc = asm.ini

    .ASM and .INC files will now use the file .\doc\style\asm.ini

    The editor reads the section [.] in the code file which have the
    following syntax:

    [.]
    <Id>=<section>
    [<section>]
    <code>



> I'm not aware how the other nc clones did it, but for me hilighter syntax
> seems a bit confusing. :)
>
> But I think I got it. In the first part you define the hilighting
> "sections". In the second part you define the rules for those sections.

Correct, and:
The 00=default will read the section [default] in *this file
The 00=[default] will read the section [.] in the file .\default

> Well the rules are still a bit unclear. What do "B, X8, X2, XF, W, etc"
> stand for? :)

The actual code is [<type>] [<attrib>] [<text>]

attrib:
X8 = set foreground to 0x08 (keep background)
BX = set background to 0xB0 (keep foreground)
AB = set foreground to B, and background to A

 

Complete thread:

Back to the forum
Board view  Mix view
15186 Postings in 1365 Threads, 250 registered users, 13 users online (0 registered, 13 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum