mirror of
https://github.com/sheumann/AFPBridge.git
synced 2025-02-07 02:30:36 +00:00
Use fast assembly code to handle EventsCDEV, rather than C.
With the C version (and its entry/exit code) typing in the URL box could be a little laggy when running at 2.8 MHz.
This commit is contained in:
parent
079ab7e00a
commit
a610156e9a
@ -16,7 +16,7 @@ DUMPCMDTBL_PROG = dumpcmdtbl
|
||||
AFPBRIDGE_OBJS = afpinit.o afpbridge.o aspinterface.o dsi.o readtcp.o endian.o tcpconnection.o atipmapping.o asmglue.o installcmds.o cmdproc.o callat.o
|
||||
AFPBRIDGE_PROG = AFPBridge
|
||||
|
||||
AFPMOUNTER_OBJS = afpcdev.o afpurlparser.o cdevutil.o
|
||||
AFPMOUNTER_OBJS = cdevstart.o afpcdev.o afpurlparser.o
|
||||
AFPMOUNTER_RSRC = afpcdev.rez
|
||||
AFPMOUNTER_CDEV = AFPMounter
|
||||
|
||||
|
@ -498,7 +498,8 @@ LongWord cdevMain (LongWord data2, LongWord data1, Word message)
|
||||
case EditCDEV: DoEdit(data1 & 0xFFFF); break;
|
||||
case InitCDEV: wPtr = (WindowPtr)data1; break;
|
||||
case CloseCDEV: wPtr = NULL; break;
|
||||
case EventsCDEV: modifiers = ((EventRecordPtr)data1)->modifiers;
|
||||
case EventsCDEV: /* Now done in assembly for speed. Equivalent to: */
|
||||
/* modifiers = ((EventRecordPtr)data1)->modifiers; */
|
||||
break;
|
||||
}
|
||||
|
||||
|
41
cdevstart.asm
Normal file
41
cdevstart.asm
Normal file
@ -0,0 +1,41 @@
|
||||
case on
|
||||
|
||||
* This is the actual entry point for the CDEV.
|
||||
* We continue to the C code in most cases, but
|
||||
* handle EventsCDEV messages here for performance.
|
||||
cdeventry start
|
||||
lda 12,s ; get message
|
||||
cmp #6 ; is it EventsCDEV?
|
||||
bne continue
|
||||
|
||||
doEvent anop ; handle an EventsCDEV message
|
||||
pla ; move return address
|
||||
sta 9,s
|
||||
pla
|
||||
sta 9,s
|
||||
|
||||
tsc
|
||||
phd
|
||||
tcd
|
||||
ldy #14 ; modifiers field in event structure
|
||||
lda [4],y ; get data1->modifiers & save it away
|
||||
sta >modifiers
|
||||
stz 10 ; result = 0 (necessary?)
|
||||
stz 12
|
||||
pld
|
||||
|
||||
tsc
|
||||
clc
|
||||
adc #6
|
||||
tcs
|
||||
rtl
|
||||
end
|
||||
|
||||
FreeAllCDevMem start
|
||||
pea 0
|
||||
jsl ~DAID
|
||||
rtl
|
||||
end
|
||||
|
||||
continue private
|
||||
end
|
10
cdevutil.asm
10
cdevutil.asm
@ -1,10 +0,0 @@
|
||||
case on
|
||||
|
||||
dummy private
|
||||
end
|
||||
|
||||
FreeAllCDevMem start
|
||||
pea 0
|
||||
jsl ~DAID
|
||||
rtl
|
||||
end
|
Loading…
x
Reference in New Issue
Block a user