home *** CD-ROM | disk | FTP | other *** search
- 1000 ; simplewindow date: 10-03-88
- 1010 ;---------------------------------
- 1020 ;
- 1030 ; the final cartridge iii desktop
- 1040 ;
- 1050 ; riska h&p, marc derksen
- 1060 ;
- 1070 ; p r o j e c t d e m o
- 1080 ;
- 1090 ;---------------------------------
- 1100 ;
- 1110 *=$0be1,$0801
- 1120 buf0=$a3
- 1130 buf1=$a4
- 1140 gosub=$de05 ; system constants
- 1150 close=$01
- 1160 toback=$02
- 1170 dragbr=$08
- 1180 ;
- 1190 ;------ basic startup data -----
- 1200 wor $0817,1987 ; line number
- 1210 byt $9e ; basic sys-code
- 1220 byt "2076 desk[164]p v1.0",0,0,0
- 1230 byt 1,0 ; version
- 1240 byt 2 ; size in blocks
- 1250 jmp $dfe8 ; startup
- 1260 byt 0 ; unused
- 1270 ;
- 1280 mn3it1=$c0c2
- 1290 mn3it2=$c0ca
- 1300 ;------ main ------------------
- 1310 start jsr survive
- 1320 ldx #<item2 ; set new menu
- 1330 ldy #>item2
- 1340 stx mn3it1
- 1350 sty mn3it1+1
- 1360 rts
- 1370 ;
- 1380 ;------ menuitem structure ---
- 1390 item2 wor item3 ; nextitem
- 1400 wor it2txt ; item name
- 1410 wor openwd ; item exec
- 1420 byt 1,0 ; enable item
- 1430 item3 wor 0 ; no nextitem
- 1440 wor it3txt
- 1450 wor unlink
- 1460 byt 1,0
- 1470 ;
- 1480 it2txt byt "[196][197][205][207][160][215][196]",0
- 1490 it3txt byt "[213][206][204][201][206][203]",0
- 1500 ;
- 1510 ;------ window ---------------
- 1520 openwd ldx #<window ; call openwd
- 1530 ldy #>window
- 1540 lda #openwindow
- 1550 jmp gosub
- 1560 ;
- 1570 window wor 0 ; no gadgets
- 1580 byt 40,40 ; wdx,wdy
- 1590 byt 110,50 ; width,height
- 1600 wor wdtitle ; window name
- 1610 byt close+toback+dragbr ; wdflags
- 1620 byt 66 ; wdtitle size
- 1630 wor 0,0
- 1640 wdtitle byt "[205]y [215]indow",0
- 1650 ;
- 1660 ;------ unlink ---------------
- 1670 unlink ldx #<window ; close wd
- 1680 ldy #>window
- 1690 jsr closewd
- 1700 ldx #<mn3it2 ; remove menu
- 1710 ldy #>mn3it2
- 1720 stx mn3it1
- 1730 sty mn3it1+1
- 1740 inc $8004 ; remove survive
- 1750 rts
- 1760 ;
- 1770 ;------ close window ---------
- 1780 closewd stx buf0
- 1790 sty buf1
- 1800 lda #wdonscreen
- 1810 jsr gosub
- 1820 iny
- 1830 beq not
- 1840 ldx buf0
- 1850 ldy buf1
- 1860 lda #setcurwd
- 1870 jsr gosub
- 1880 lda #wdclose
- 1890 jsr gosub
- 1900 not rts
- 1910 ;
- 1920 ;------ reset survive --------
- 1930 survive ldx #6-1
- 1940 slp lda tabel,x
- 1950 sta $8000,x
- 1960 dex
- 1970 bpl slp
- 1980 rts
- 1990 tabel wor start+3
- 2000 byt "mg87"
- 2010 ;
- 2020 ;------ includes -------------
- 2030 openwindow=48
- 2040 wdonscreen=70
- 2050 wdclose=65
- 2060 setcurwd=29
-