home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fish 'n' More 2
/
fishmore-publicdomainlibraryvol.ii1991xetec.iso
/
dirs
/
deluxechanger_439.lzh
/
DeluxeChanger
/
Sources
/
DCAskWindow.asm
< prev
next >
Wrap
Assembly Source File
|
1991-01-18
|
5KB
|
259 lines
XREF _DCScrBase
XDEF TypeAsk
INCLUDE exec/exec_lib.i
INCLUDE intuition/intuition_lib.i
INCLUDE help.i
SECTION "AskWindow",CODE
TypeAsk bsr GetLibs
SADD AskWindow,a0
move.l _DCScrBase,$1e(a0)
CALLPC _IntuitionBase,OpenWindow
beq NoType
move.l d0,a1
SADD _AskWindBase,a0
move.l a1,(a0)
move.l $32(a1),4(a0)
move.l $56(a1),8(a0)
PEEKL _AskWindRast,a0
SADD ABorder8,a1
moveq.l #0,d0
moveq.l #0,d1
CALLSYS DrawBorder
PEEKL _AskWindRast,a0
SADD ChangeText,a1
moveq.l #0,d0
moveq.l #0,d1
CALLSYS PrintIText
bsr CalcProp
AskWait PEEKL _AskWindUser,a0
CALLEXEC WaitPort
PEEKL _AskWindUser,a0
CALLSYS GetMsg
move.l d0,a1
move.l $14(a1),d4
move.l $1c(a1),a4
CALLSYS ReplyMsg
cmpi.b #$20,d4
beq.s GadDown
cmpi.b #$40,d4
beq.s GadUp
bra AskWait
GadUp cmpi.w #"CL",$26(a4)
bne.s NoQuit
move.w #"CL",d7
bra AskQuit
NoQuit cmpi.w #"OK",$26(a4)
bne.s AskWait
bsr MakeReturn
bra AskQuit
GadDown cmpi.w #"PR",$26(a4)
bne.s NoProp
bsr CalcProp
bra AskWait
NoProp bsr SetBool
bra AskWait
AskQuit PEEKL _AskWindBase,a0
CALLPC _IntuitionBase,CloseWindow
NoType PEEKL Memory,d0
mulu #100,d0
rts
CalcProp
moveq.l #0,d0
PEEKW APropSpecial+2,d0
mulu #3000,d0
swap d0
andi.l #$ffff,d0
addq.l #1,d0
POKEL d0,Memory
SADD PropBytes+8,a1
bsr MakeMem
PEEKL _AskWindRast,a0
SADD PropText,a1
moveq.l #0,d0
moveq.l #0,d1
CALLPC _IntuitionBase,PrintIText
cmpi.w #$80,AProp+12
beq.s CalcProp
rts
MakeMem moveq.l #3,d1
SADD Tens,a0
Next moveq.l #"0",d2
Dec addq.l #1,d2
sub.l (a0),d0
bcc.s Dec
subq.l #1,d2
add.l (a0)+,d0
move.b d2,(a1)+
dbra d1,Next
rts
Tens dc.l 1000,100,10,1
MakeReturn
SADD BoolList,a0
Make1 move.l (a0)+,a1
cmpi.w #$82,$c(a1)
bne.s NotSelected
move.w $26(a1),d7
NotSelected
tst.l (a0)
bne.s Make1
rts
SetBool SADD BoolList,a0
Set1 move.l (a0)+,a1
move.w #2,$c(a1)
move.w $26(a1),d1
cmp.w $26(a4),d1
bne.s NoSet
move.w #$82,$c(a1)
NoSet tst.l (a0)
bne.s Set1
SADD ABool0,a0
PEEKL _AskWindBase,a1
suba.l a2,a2
CALLPC _IntuitionBase,RefreshGadgets
rts
BoolList dc.l ABool0,ABool1,ABool2,0
*** Library-Zeiger suchen und merken
GetLibs move.l 4,a6
lea $17a(a6),a0
SADD IntName,a1
CALLSYS FindName
POKEL d0,_IntuitionBase
rts
IntName INTNAME
_IntuitionBase ds.l 1
*** Data-Teil
AskWindow dc.w 160,21,320,158
dc.b -1,-1
dc.l 8!$20!$40,$800!$1000!$10000,AProp,0,0,0,0
dc.w 0,0,0,0,15
_AskWindBase ds.l 1
_AskWindRast ds.l 1
_AskWindUser ds.l 1
AProp dc.l ABool0
dc.w 24,109,272,6,0,2,3
dc.l APropInfo,0,0,0,APropSpecial
dc.w "PR"
dc.l 0
APropInfo ds.w 4
APropSpecial dc.w 1!2!8,1140*$ffff/3000,0,$200
ds.w 7
ABool0 dc.l ABool1
dc.w 20,27,280,11,$80!2,2,1
dc.l ABorder0,ABorder2,AText0,0,0
dc.w "AS"
dc.l 0
AText0 dc.b 1,0,1,0
dc.w 140-9*4,2
dc.l 0,ABytes0,0
TEXT ABytes0,"ASSEMBLER"
ABool1 dc.l ABool2
dc.w 20,27+21,280,11,2,2,1
dc.l ABorder0,ABorder2,AText1,0,0
dc.w "BS"
dc.l 0
AText1 dc.b 1,0,1,0
dc.w 140-5*4,2
dc.l 0,ABytes1,0
TEXT ABytes1,"BASIC"
ABool2 dc.l ABool3
dc.w 20,27+2*21,280,11,2,2,1
dc.l ABorder0,ABorder2,AText2,0,0
dc.w "CS"
dc.l 0
AText2 dc.b 1,0,1,0
dc.w 140-4,2
dc.l 0,ABytes2,0
TEXT ABytes2,"C"
ABool3 dc.l ABool4
dc.w 20,27+20+7+5*10+3*11,130,11,2,1,1
dc.l ABorder4,ABorder6,AText3,0,0
dc.w "CL"
dc.l 0
AText3 dc.b 1,0,1,0
dc.w 65-5*4,2
dc.l 0,ABytes3,0
TEXT ABytes3,"CANCEL"
ABool4 dc.l 0
dc.w 170,27+20+7+5*10+3*11,130,11,2,1,1
dc.l ABorder4,ABorder6,AText4,0,0
dc.w "OK"
dc.l 0
AText4 dc.b 1,0,1,0
dc.w 65-8*4,2
dc.l 0,ABytes4,0
TEXT ABytes4,"CONTINUE"
ChangeText dc.b 1,0,1,0
dc.w 160-12*4,10
dc.l 0,ChangeBytes,PropText
TEXT ChangeBytes,<"CHANGE TO ...">
PropText dc.b 1,0,1,0
dc.w 160-14*4,90
dc.l 0,PropBytes,0
TEXT PropBytes,<"BUFFER: 000000">
Memory ds.l 1
ABorder0 dc.w 0,0
dc.b 2,0,1,3
dc.l APairs02,ABorder1
ABorder1 dc.w 0,0
dc.b 1,0,1,3
dc.l APairs13,0
ABorder2 dc.w 0,0
dc.b 1,0,1,3
dc.l APairs02,ABorder3
ABorder3 dc.w 0,0
dc.b 2,0,1,3
dc.l APairs13,0
APairs02 dc.w 279,0,0,0,0,9
APairs13 dc.w 0,10,279,10,279,1
ABorder4 dc.w 0,0
dc.b 2,0,1,3
dc.l APairs46,ABorder5
ABorder5 dc.w 0,0
dc.b 1,0,1,3
dc.l APairs57,0
ABorder6 dc.w 0,0
dc.b 1,0,1,3
dc.l APairs46,ABorder7
ABorder7 dc.w 0,0
dc.b 2,0,1,3
dc.l APairs57,0
APairs46 dc.w 129,0,0,0,0,9
APairs57 dc.w 0,10,129,10,129,1
ABorder8 dc.w 0,0
dc.b 2,0,1,3
dc.l APairs8,ABorder9
APairs8 dc.w 319,0,0,0,0,156
ABorder9 dc.w 0,0
dc.b 1,0,1,3
dc.l APairs9,PropBorder0
APairs9 dc.w 0,157,319,157,319,1
PropBorder0 dc.w 20,107
dc.b 1,0,1,3
dc.l PropPairs0,PropBorder1
PropPairs0 dc.w 279,0,0,0,0,8
PropBorder1 dc.w 20,107
dc.b 2,0,1,3
dc.l PropPairs1,0
PropPairs1 dc.w 0,9,279,9,279,1
END