'=========================================================================== ' Subject: 320X400 TURTLE DRAW Date: 05-28-96 (18:29) ' Author: Earl Montgomery Code: QB, PDS ' Origin: FidoNet QUIK_BAS Echo Packet: GRAPHICS.ABC '=========================================================================== 'Here is some code that I wrote awhile back that uses the 320x400x256 'mode. Press "H" to get the help menu. It allows you to sketch in this 'mode. But it does give you the basic code to do all sorts of things 'in this mode. Enjoy. setmode: 'Sets SCREEN 13 to the 320X400X256 mode SCREEN 13: DEF SEG = &HA000 KEY(10) ON ON KEY(10) GOSUB endofprogram OUT &H3D4, 9: OUT &H3D5, &H40: OUT &H3D4, 20: OUT &H3D5, 0: OUT &H3D4, 23 OUT &H3D5, &HE3: OUT &H3C4, 4: OUT &H3C5, &H6 OUT &H3C4, 2: OUT &H3C5, 15: CLS : 'rem this clears (CLS) all 4 planes IF flag$ = "restart" THEN GOTO loadtemp OUT &H3C4, 2: OUT &H3C5, 1 begin: position% = 15318: c = 15: plane% = 1: OUT &H3C4, 2: OUT &H3C5, 1 restart: flag$ = "" POKE position%, c waitkey1: i$ = INKEY$: IF i$ = "" THEN GOTO waitkey1 i$ = UCASE$(i$) keycode% = CVI(i$ + CHR$(0)) IF keycode% = 19712 THEN GOTO moveright IF keycode% = 19200 THEN GOTO moveleft IF keycode% = 18432 THEN GOTO moveup IF keycode% = 20480 THEN GOTO movedown IF i$ = "C" THEN GOTO changecolor IF i$ = "H" THEN GOTO helpscreen IF i$ = "X" THEN GOTO clearscreen GOTO waitkey1 moveright: IF plane% = 1 THEN OUT &H3C4, 2: OUT &H3C5, 2: plane% = 2: GOTO pokescrn IF plane% = 2 THEN OUT &H3C4, 2: OUT &H3C5, 4: plane% = 4: GOTO pokescrn IF plane% = 4 THEN OUT &H3C4, 2: OUT &H3C5, 8: plane% = 8: GOTO pokescrn IF plane% = 8 THEN OUT &H3C4, 2: OUT &H3C5, 1: plane% = 1: position% = position% + 1 pokescrn: IF position% > 31999 THEN position% = 31999 POKE position%, c GOTO waitkey1 moveleft: IF plane% = 1 THEN OUT &H3C4, 2: OUT &H3C5, 8: plane% = 8: position% = position% - 1: GOTO doit IF plane% = 2 THEN OUT &H3C4, 2: OUT &H3C5, 1: plane% = 1: GOTO doit IF plane% = 4 THEN OUT &H3C4, 2: OUT &H3C5, 2: plane% = 2: GOTO doit IF plane% = 8 THEN OUT &H3C4, 2: OUT &H3C5, 4: plane% = 4: doit: IF position% < 0 THEN position% = 0 POKE position%, c GOTO waitkey1 moveup: position% = position% - 80 IF position% < 0 THEN position% = position% + 80 POKE position%, c GOTO waitkey1 movedown: position% = position% + 80 IF position% > 32000 THEN position% = position% - 80 POKE position%, c GOTO waitkey1 changecolor: c = c + 1 IF c > 255 THEN c = 0 POKE position%, c GOTO waitkey1 GOTO waitkey1 helpscreen: 'Saving screen before switching to SCREEN 9 and the HELP MENU DEF SEG = &HA000 OUT &H3CE, 4: OUT &H3CF, 0: BSAVE "temp1.bin", 0, 32000 OUT &H3CE, 4: OUT &H3CF, 1: BSAVE "temp2.bin", 0, 32000 OUT &H3CE, 4: OUT &H3CF, 2: BSAVE "temp3.bin", 0, 32000 OUT &H3CE, 4: OUT &H3CF, 3: BSAVE "temp4.bin", 0, 32000 SCREEN 9: CLS PRINT "Key Function" PRINT "Use arrow keys to move cursor" PRINT "C Changes current color" PRINT "F10 Exit Program " PRINT "H Help (This Screen)" waitkey2: i$ = INKEY$: IF i$ = "" THEN GOTO waitkey2 CLS : flag$ = "restart": GOTO setmode loadtemp: OUT &H3C4, 2: OUT &H3C5, 1: BLOAD "temp1.bin" OUT &H3C4, 2: OUT &H3C5, 2: BLOAD "temp2.bin" OUT &H3C4, 2: OUT &H3C5, 4: BLOAD "temp3.bin" OUT &H3C4, 2: OUT &H3C5, 8: BLOAD "temp4.bin" GOTO restart clearscreen: OUT &H3C4, 2: OUT &H3C5, 15: CLS : GOTO begin endofprogram: SCREEN 0: CLS : DEF SEG : END