home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hall of Fame
/
HallofFameCDROM.cdr
/
pcjr
/
jrtech.lzh
/
VIDEOFIX.DOC
< prev
Wrap
Text File
|
1985-11-09
|
13KB
|
397 lines
MAKING PC SOFTWARE COMPATIBLE WITH PC jr
WHILE MOST SOFTWARE WRITTEN FOR THE PC WILL RUN WITHOUT
MODIFICATION ON PC JR SOME WILL CAUSE PROBLEMS BECAUSE OF THE
DIFFERENCES BETWEEN THE MACHINES. THE MOST IMPORTANT
DIFFERENCE BETWEEN THE PC AND PC JR IS THE VIDEO HARDWARE.
THE MACHINES ARE ESENTIALLY EQUIVALENT WHEN PROGRAMMING DOWN
TO THE BIOS CALL LEVEL, IF THE PROGRAMMER ATTEMPTS TO
DIRECTLY MANIPULATE THE VIDEO HARDWARE ADDRESSES PROBLEMS
WILL OCCUR.
FOR EXAMPLE ;
MODE SWITCHES ARE VERY EASILY ACCOMPLISHED ON THE PC, YOU
MERELY WRITE THE MODE VALUE YOU WANT TO THE PORT AT ADDRESS
3D8 (THE MODE CONTROL REGISTER). WRITING A 00H TO THIS
ADDRESS WILL PUT THE PC INTO 40 COLUMN X 25 LINES OF COLOR
VIDEO MODE. WRITING A 0AH SETS UP THE 320 X 200 COLOR
GRAPHICS MODE.
WITH JUNIOR HOWEVER, IT IS NOT THAT SIMPLE. THE PORT AT
ADDRESS 3D8 DOES NOT EXIST AND JUNIORS COMPLICATED VIDEO GATE
ARRAY MAKES CHANGING MODES MUCH MORE DIFFICULT. IF A PROGRAM
THAT RUNS FINE ON THE PC FAILS ON THE JUNIOR IT MAY BE
BECAUSE OF THIS TYPE OF MODE CHANGING ERROR. TO FIND OUT IF
THIS IS THE CASE YOU CAN LOOK AT THE CODE USING DEBUG. I
MERELY SEARCH FOR THE MOST OBVIOUS WAYS THAT A MODE CHANGE
CAN BE ACCOMPLISHED ON THE PC. THE FOLLOWING CODE IS AN
EXAMPLE;
MOV AL,XX ;WHERE XX IS THE NEW MODE VALUE TO BE SET
MOV DX,3D8 ;SETUP ADDRESS OF THE MODE CONTROL PORT
OUT DX,AL ;OUTPUT THE NEW VALUE
SOMETIMES YOU WIL FIND THESE INSTRUCTIONS IN SLIGHTLY
DIFERENT ODERINGS SUCH AS;
MOV DX,3D8
MOV AL,XX
OUT DX,AL
BOTH OF THESE WILL DO THE SAME THING TO THE VIDEO HARDWARE.
THEY WILL CHANGE THE MODE TO THE VALUE OF XX, WHATEVER THAT
MAY BE.
IN HEX THESE INSTRUCTIONS LOOK LIKE THIS;
B0 XX ;THE MOVE AL,XX INSTRUCTION
BA D8 03 ; MOV DX,3D8
EE ; OUT DX,AL
THE EASIEST THING TO LOOK FOR IS THE MOV DX,3D8 INSTRUCTION.
THE DEBUG COMMAND FOR THIS IS;
-S STARTING ADDRESS ENDING ADDRESS SEARCH STRING
FOR EXAMPLE;
-S 0 FFFE BA D8 03