50000 rem ************** GEM setup code (was autoexec.bas) ********* 50010 A=leek($5A0) 50020 B=hunt(A to A+5000,"GEMA") 50021 V=hunt(A to A+5000,"_VDO") 50022 VDO=leek(V+4) 50030 BSE=leek(B+4) 50040 key off 50050 curs off 50060 dim PARAM(4) 50070 PARAM(1)=1 50080 PARAM(2)=0 50090 PARAM(3)=0 50100 PARAM(4)=0 50110 trap 14,0, .w 1, .l varptr(PARAM(1)), .l leek(BSE+8) 50120 VB=leek(BSE+72) 50130 loke VB+0,leek(BSE+12) 50140 remloke $4CE+4,leek(BSE+12) 50150 remloke $4CE+8,leek(BSE+16) 50160 remloke $4CE+12,leek(BSE+20) 50170 remloke $4CE+16,leek(BSE+24) 50180 remloke $4CE+20,leek(BSE+28) 50190 remloke $4CE+24,leek(BSE+32) 50200 A=graf_mouse(0,0) 50210 v_show_c 50220 trap 1,$49, .l leek(BSE+4) 50230 trap 1,$48, .l-1 50240 rem dreg(0) contains system memory free 50250 hide 50260 if VDO=$30000 then trap 14,5, .l leek(BSE+48), .l leek(BSE+44), .w 3, .w deek(BSE+66) : doke $44C,3 : if VDO<$30000 then trap 14,5, .l leek(BSE+48), .l leek(BSE+44), .w deek(BSE+66) : doke $44C,deek(BSE+52) 50270 rem Poke 0 into the malloc buffer of GEMMA acc so it will realise we've nicked it's memory!!! 50280 loke BSE+4,0 50290 rem attempts to set colours to be like those of the desktop 50300 if mode<2 then for A=0 to (4^(2-mode))-1 : read C : colour A,C : next A 50310 data $777,$700,$70,$770,$7,$707,$77,$666,$444,$500,$50,$550,$5,$505,$55,$0 50320 if mode=1 then colour 3,$0 50340 remOSET=76 50350 remfor ADDR=$400 to $600 step 4 50360 remloke (BSE+OSET),ADDR 50370 remOSET=OSET+4 50380 remnext 50390 click off : poke $484,7 50400 return