Tri-D Chess

 BBS: Inland Empire Archive
Date: 03-11-92 (01:11)             Number: 77
From: JEAN CREPEAU                 Refer#: NONE
  To: DAVID BLISS                   Recvd: NO  
Subj: Tri-D Chess                    Conf: (2) Quik_Bas
In a message to ALL, DAVID BLISS wrote:
DB=> BUT my algorithm for getting the  Offset in the Video Buffer for an  X
    and Y coords DOESN'T WORK:(

        First of  all, you  must define  the data  segment where your video
memory (VRAM) is. This is done with DEF SEG
DEF SEG = &hB000 ' for monochrome (Hercule) cards
DEF SEG = &hB800 ' for color (CGA, EGA & VGA) cards

        For text modes, the the adress is
A = (X+80*Y)*2

        PEEK(A)  returns  the  ASCII  character  and  PEEK(A+1) returns the
attributes of that character.

        For graphic modes, it is much more complex... The algorithm changes
for every video mode possibble!!!
 * Origin: INTERACESS Montreal (QC) Canada (514) 528-1415 (1:167/280)
Outer Court
Echo Basic Postings

Books at Amazon:

Back to BASIC: The History, Corruption, and Future of the Language

Hackers: Heroes of the Computer Revolution (including Tiny BASIC)

Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution

The Advent of the Algorithm: The Idea that Rules the World

Moths in the Machine: The Power and Perils of Programming

Mastering Visual Basic .NET