BBS: Inland Empire Archive Date: 06-17-92 (22:52) Number: 753 From: MATT HART Refer#: NONE To: JEFF BEER Recvd: NO Subj: Dos Interrupts Conf: (2) Quik_Bas
JB> Month% = reg.dh 'These return a QuickBasic error
JB> 'Module not found'
JB> Day% = reg.dl ' or something like that....
DH and DL are the two components of DX. 8086 registers are
two bytes - just like the Reg.DX integer is two bytes. But
these are occasionally accessed by each byte - half a
register. In QuickBASIC, this is accomplished with:
Month% = Reg.DX \ 256 ' Note the Backslash (integer division)
Day% = Reg.DX MOD 256 ' Mod gives the remainder - the lower byte
' of DX. The integer division gives the
' higher byte.
JB> DayofWeek% = reg.al 'values?
Thus, this would be:
DayofWeek% = Reg.AX MOD 256
~~---
*RICK VINDT DIT OOK WEER HEEL GOED....
SCREENCOMPRESSION
Origin: Midnight Micro! V.32/REL (918)451-3306 (1:170/600)

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