Les Chevaliers de Malte/Développeur - BASICA/GWBASIC - Format de fichier encodée du BASIC de GWBASIC ou BASICA

Le format de fichier BASIC encodée par le GWBASIC ou BASICA des systèmes d'exploitation MS-DOS de Microsoft et PC-DOS d'IBM utilise une liste de codes permettant de substituer une instruction, commande ou fonction gourmande en espace mémoires. Malgré le fait qu'elle ne soit pas documenté par les deux entreprises, il est assez simple d'en trouver le fonctionnement. Voici la liste des codes et de leurs instructions respective:

Code Description
00h 00h 00h Code de fin
0Ch xxh yyh

«&H» suivie de 4 chiffres en hexadécimal contenu sur deux octets.

0Fh

Indique que le suivant est un nombre (un octet)

10h

Indique que le suivant est un nombre (2 octets)

11h à 1Ah

Correspondent respectivement au symbole suivant: « », «!», «"», «#», «$», «%», «&», «'», «(», «)»

3Ah 20h

Instruction «GOSUB»

3Ah A1h

Instruction «ELSE»

81h

Instruction «END»

82h

Instruction «FOR»

83h

Instruction «NEXT»

84h

Instruction «DATA»

85h

Si fonction «INT» autrement «INPUT»

86h

Instruction «DIM»

87h

Instruction «READ»

88h

Instruction «RND»

89h

Instruction «GOTO»

8Ah

Instruction «RUN»

8Bh

Instruction «IF»

8Ch

Instruction «RESTORE»

8Dh

Instruction «GOSUB»

8Eh

Instruction «RETURN»

8Fh

Instruction «REM»

90h

Instruction «STOP»

91h

Instruction «PRINT»

92h

Instruction «CLEAR»

93h

Instruction «LIST»

94h

Instruction «NEW»

95h

Instruction «ON»

96h

Instruction «WAIT»

97h

Instruction «DEF»

98h

Instruction «POKE»

99h

Instruction «CONT»

9Ch

Instruction «OUT»

9Dh

Instruction «LPRINT»

9Eh

Instruction «LLIST»

0A0h

Instruction «WIDTH»

0A2h

Instruction «TRON»

0A3h

Instruction «TROFF»

0A4h

Instruction «SWAP»

0A5h

Instruction «ERASE»

0A6h

Instruction «EDIT»

0A7h

Instruction «ERROR»

0A8h

Instruction «RESUME»

0A9h

Instruction «DELETE»

0AAh

Instruction «AUTO»

0ABh

Instruction «RENUM»

0ACh

Instruction «DEFSTR»

0ADh

Instruction «DEFINT»

0AEh

Instruction «DEFSNG»

0AFh

Instruction «DEFDBL»

0B0h

Instruction «LINE»

0B1h 0E9h

Instruction «WHILE»

0B2h

Instruction «WEND»

0B3h

Instruction «CALL»

0B7h

Instruction «WRITE»

0B8h

Instruction «OPTION»

0B9h

Instruction «RANDOMIZE»

0BAh

Instruction «OPEN»

0BBh

Instruction «CLOSE»

0BCh

Instruction «LOAD»

0BDh

Instruction «MERGE»

0BEh

Instruction «SAVE»

0BFh

Instruction «COLOR»

0C0h

Instruction «CLS»

0C1h

Instruction «MOTOR»

0C2h

Instruction «BSAVE»

0C3h

Instruction «BLOAD»

0C4h

Instruction «SOUND»

0C5h

Instruction «BEEP»

0C6h

Instruction «PSET»

0C7h

Instruction «PRESET»

0C8h

Instruction «SCREEN»

0C9h

Instruction «KEY»

0CAh

Instruction «LOCATE»

0CCh

Instruction «TO»

0CDh

Instruction «THEN»

0CEh

Instruction «TAB»

0CFh

Instruction «STEP»

0D0h

Instruction «USR»

0D1h

Instruction «FN»

0D2h

Instruction «SPC»

0D3h

Instruction «NOT»

0D4h

Instruction «ERL»

0D5h

Instruction «ERR»

0D6h

Instruction «STRING$»

0D7h

Instruction «USING»

0D8h

Instruction «INSTR»

0DAh

Instruction «VARPTR»

0DBh

Instruction «CSRLIN»

0DCh

Instruction «POINT»

0DDh

Instruction «OFF»

0DEh

Instruction «INKEY$»

0E6h

Instruction «>»

0E7h

Instruction «=»

0E8h

Instruction «<»

0E9h

Instruction «+»

0EAh

Instruction «-»

0EBh

Instruction «*»

0ECh

Instruction «/»

0EDh

Instruction «^»

0EEh

Instruction «AND»

0EFh

Instruction «OR»

0F0h

Instruction «XOR»

0F1h

Instruction «EQV»

0F2h

Instruction «IMP»

0F3h

Instruction «MOD»

0F4h

Instruction «\»

0FDh 81h

Instruction «CVI»

0FDh 82h

Instruction «CVS»

0FDh 83h

Instruction «CVD»

0FDh 84h

Instruction «MKI$»

0FDh 85h

Instruction «MKS$»

0FDh 86h

Instruction «MKD$»

0FDh 8Bh

Instruction «EXTERR»

0FEh 081h

Instruction «FILES»

0FEh 083h

Instruction «SYSTEM»

0FEh 088h

Instruction «PUT»

0FEh 089h

Instruction «GET»

0FEh 08Ah

Instruction «RESET»

0FEh 08Bh

Instruction «COMMON»

0FEh 08Ch

Instruction «CHAIN»

0FEh 08Eh

Instruction «TIME$»

0FEh 08Fh

Instruction «PAINT»

0FEh 090h

Instruction «COM»

0FEh 091h

Instruction «CIRCLE»

0FEh 092h

Instruction «DRAW»

0FEh 093h

Instruction «PLAY»

0FEh 094h

Instruction «TIMER»

0FEh 095h

Instruction «ERDEV»

0FEh 096h

Instruction «IOCTL»

0FEh 097h

Instruction «CHDIR»

0FEh 098h

Instruction «MKDIR»

0FEh 099h

Instruction «RMDIR»

0FEh 09Ah

Instruction «SHELL»

0FEh 09Bh

Instruction «ENVIRON»

0FEh 09Ch

Instruction «VIEW»

0FEh 09Dh

Instruction «WINDOW»

0FEh 09Eh

Instruction «PMAP»

0FEh 09Fh

Instruction «PALETTE»

0FEh 0A0h

Instruction «LCOPY»

0FEh 0A1h

Instruction «CALLS»

0FEh 0A4h

Instruction «NOISE» pour le PC Junior seulement ou «DEBUG» pour le Sperry PC seulement.

0FEh 0A5h

Instruction «PCOPY» pour le PC Junior seulement ou compatible «EGA» seulement.

0FEh 0A6h

Instruction «TERM» pour le PC Junior seulement.

0FEh 0A7h

Instruction «LOCK».

0FEh 0A8h

Instruction «UNLOCK».

0FFh 081h

Instruction «LEFT$»

0FFh 082h

Instruction «RIGHT$»

0FFh 083h

Instruction «MID$»

0FFh 084h

Instruction «SGN»

0FFh 085h

Instruction «INT»

0FFh 086h

Instruction «ABS»

0FFh 087h

Instruction «SQR»

0FFh 088h

Instruction «RND»

0FFh 089h

Instruction «SIN»

0FFh 08Ah

Instruction «LOG»

0FFh 08Bh

Instruction «EXP»

0FFh 08Ch

Instruction «COS»

0FFh 08Dh

Instruction «TAN»

0FFh 08Eh

Instruction «TIME$»

0FFh 08Fh

Instruction «FRE»

0FFh 090h

Instruction «INP»

0FFh 091h

Instruction «POS»

0FFh 092h

Instruction «LEN»

0FFh 093h

Instruction «STR$»

0FFh 094h

Instruction «VAL»

0FFh 095h

Instruction «ASC»

0FFh 096h

Instruction «CHR$»

0FFh 097h

Instruction «PEEK»

0FFh 098h

Instruction «SPACE$»

0FFh 099h

Instruction «OCT$»

0FFh 09Ah

Instruction «HEX$»

0FFh 09Bh

Instruction «LPOS»

0FFh 09Ch

Instruction «CINT»

0FFh 09Dh

Instruction «CSNG»

0FFh 09Eh

Instruction «CDBL»

0FFh 09Fh

Instruction «FIX»

0FFh 0A0h

Instruction «PEN»

0FFh 0A1h

Instruction «STICK»

0FFh 0A2h

Instruction «STRIG»

0FFh 0A3h

Instruction «EOF»

0FFh 0A4h

Instruction «LOC»

0FFh 0A5h

Instruction «LOF»


Voir également

Langage de programmation - BASICA/GWBASIC


Dernière mise à jour: Mardi, le 28 février 2006