|
今年最棒的国产软件一定非ZDic莫属,还记得当年几乎一天一个版本的“日更”时光,但是个人很不喜欢2.21以后的版本,去掉了方便切换字典的窗口,而且我经常要导出到MEMO,又是tt所以无论是用菜单还是用命令都不好实现,所以一直想有一个按钮可以直接实现导出到MEMO 的功能,经过几天的努力,终于实现了,贴出来与同道中人分享, & |+ N$ D2 W" x
" V! M4 j0 C8 U
5 i, N+ W; {% q2 K
0 x" d- y v0 F l* J
) |5 C/ I2 ?0 T2 d2 |修改后文件下载
. E- [# O" v- m( x, H7 S- Rhttp://www.palmstamp.com/forum/download.php?id=624584 _: ]. [7 \, G& N' v" w' H' Z- _" Y
- d; k2 ?9 Z* T4 U) Q. f主要修改' H$ h; S# c6 r0 r8 Y+ p
这里将1088(就是DA里面解释的界面)压入,1 T9 S, ?) X b* \# Q; \
MOVE.W #1088!$3ff,-(A7)
& v$ L" W* l' s) dJSR L10188 ]* A+ f9 x* C9 u( C
, p7 B% `8 k& {5 z6 Y' }3 q/ q+ G& T
' u. {; a9 K0 c p) y8 W3 y
, F5 k; {' ^% |( ?, p! ], \& j
这里将1023(就是主程序里面解释的界面)压入,) p, [+ t+ g+ l/ N, ^ F& L. v
MOVE.W #1023!$3ff,-(A7)8 W1 R! w- g) N8 s0 ]1 G
JSR L10189 r. H3 f6 P# _9 w% S
; d% _" ^ E& H# x% J9 k
- g- w" S0 Q' Z) D9 F- e7 N1 n把上面两个分别绑定到两个按钮上,6 e/ o3 Q( [, _, W, B
绑定到主程序里面的按钮1025上
- d- t9 H4 k" a1 E P, a0 h- a00004256 0c6a04010008 L563 CMPI.W #1025!$401,8(A2) -->判断是不是按了1025按钮$ O' {# _9 I) j; M
0000425c 6622 BNE L564
! R8 l9 `& O, K) ^# B- v4 [. N4 m0000425e 3f3c03ff MOVE.W #1023!$3ff,-(A7)2 \' i5 K+ U# z. e6 M/ N( C6 a$ p
00004262 4eba2fc8 JSR L1017$ b$ s8 w; q/ Z1 d# V8 O
00004266 7601 MOVEQ #1,D33 O7 R; x4 i- U7 A
00004268 544f ADDQ.W #2,A7 -->平衡堆饯 L4 p6 Q$ k8 J+ }) ]8 O9 k
3 Z; Q+ C0 ~- G6 j& I. b同样绑到DA的按钮1092上0 @/ v s7 y, \* t" N
0000331e 0c6a04440008 L452 CMPI.W #1092!$444,8(A2) -->判断是不是按了1092按钮
* U# Y4 u5 x2 {1 D# m00003324 660a BNE L4536 T' }$ I0 R- Y( ?: Q" Q' z1 O
00003326 3f3c0441 MOVE.W #1089!$441,-(A7), x( m/ U; x: Z0 U5 l' T4 H
0000332a 4eba3f00 JSR L1017: s5 ^9 R( v* s. B0 e H1 k
0000332e 544f ADDQ.W #2,A7 -->平衡堆饯
6 [+ a5 | R+ z8 @
$ a* y& c$ m( ]- T
8 } i3 ?7 ^7 V! j; d. _ r, j# ^导出到MEMO的实现代码:
5 g& T8 w% A3 S6 q* D$ \; ]* l% l* V" o& k
0000722c 4e56fff6 L1018 LINK A6,#-107 s/ f N+ V& k8 r* K+ h$ {9 F. Y; ?
00007230 48e71f38 MOVEM.L D3-D7/A2-A4,-(A7). G. G8 X& B# t" P1 D. n9 M; X9 [: w
00007234 4ebaa5c8 JSR L241
5 \; T, T, I9 g, E/ L00007238 2848 MOVEA.L A0,A4+ M1 U# b ?- {+ M) S
0000723a 426efffe CLR.W -2(A6)
4 I* M: y0 `2 i. c, E0000723e 422efff7 CLR.B -9(A6)5 F: z% C; Z8 L/ B/ y$ n
00007242 7800 MOVEQ #0,D4
, o s3 Z$ M4 U' q( i/ y00007244 95ca SUBA.L A2,A2
# v/ X7 F+ n; b# }9 \00007246 3f3c0003 MOVE.W #3,-(A7)2 N4 f( R5 w; t4 [* g3 `
0000724a 2f3c6d656d6f MOVE.L #1835363695!$6d656d6f,-(A7)! E$ L! [! q% K8 F
00007250 2f3c44415441 MOVE.L #1145132097!$44415441,-(A7)
) w7 j: C7 Q0 w' ]% n3 ^00007256 4e4fa075 TRAP #15
( u i( @( r) v+ U* y7 ^- B0000725a DC.W sysTrapDmOpenDatabaseByTypeCreator
- z* i8 X. K6 S E/ C7 u) w7 C; p0000725a 2448 MOVEA.L A0,A2* K: M$ s2 P* S8 @- u% F
0000725c 200a MOVE.L A2,D0
3 C1 Y6 i- P* q) z+ l0000725e 4fef000a LEA 10(A7),A7
7 ~9 _: \9 b6 U8 q/ k4 e9 E$ T00007262 660a BNE L1019
5 D& C: i6 m; o! `00007264 4e4fa04e TRAP #15! j4 F/ u4 p7 _
00007268 DC.W sysTrapDmGetLastErr
5 R' n9 T6 c! Z0 @9 m00007268 3800 MOVE.W D0,D4) F6 `7 U- g2 S8 F1 p" o! `
0000726a 6000012a BRA L1025
4 r% X1 Y) ]8 T2 Q2 I0000726e 3f2e0008 L1019 MOVE.W 8(A6),-(A7)( W* G5 l2 r' _( w
00007272 4ebafd2a JSR L998$ }9 c5 M7 {: S& B2 ^- q" Q6 @
00007276 2c08 MOVE.L A0,D68 }# K {. J: x' L
00007278 544f ADDQ.W #2,A7
! o3 i% Q; t" G, A9 G" d6 f" |0000727a 6700011a BEQ L1025+ Z+ {. _( P4 L, Y
0000727e 2f06 MOVE.L D6,-(A7)
/ Z5 ~6 q* z5 Y4 G0 {00007280 4e4fa139 TRAP #15- |3 o- ~5 k( W: v& Q w; p' y( s: V" x
00007284 DC.W sysTrapFldGetTextPtr
- P8 z! |5 F; b) T- k# F- ]00007284 2648 MOVEA.L A0,A3
; O% @% ^+ G l00007286 200b MOVE.L A3,D06 ?7 T. ?4 M9 a, k
00007288 584f ADDQ.W #4,A70 C' r) _! J- V/ `( s$ l
0000728a 6700010a BEQ L1025) q& z k0 z; T y/ I; S
0000728e 4a13 TST.B (A3)
1 i% @' Q( G& L7 T- B3 F# b00007290 67000104 BEQ L1025
. e F0 p+ L) B4 \! C7 O00007294 486efff8 PEA -8(A6)5 m5 f0 b3 z- j4 \. M
00007298 486efffa PEA -6(A6)
; D! R3 `6 q/ @4 h7 U0000729c 2f06 MOVE.L D6,-(A7)
% G- b- t! f; Y, f3 x0000729e 4e4fa13a TRAP #15
+ j% p0 v1 }/ Q- }7 ~$ @0 o$ d000072a2 DC.W sysTrapFldGetSelection
g' \! T: a0 i$ H. d000072a2 302efffa MOVE.W -6(A6),D0
2 A/ d$ a7 {5 R& E( X000072a6 b06efff8 CMP.W -8(A6),D0/ T; C* U; M8 d, e6 L5 \6 ?
000072aa 4fef000c LEA 12(A7),A7
# t/ G0 Q& N1 g2 j000072ae 6610 BNE L1020+ d. [) z: [& S+ u* [
000072b0 426efffa CLR.W -6(A6)$ d" S* e* D- E+ O
000072b4 2f0b MOVE.L A3,-(A7)
- p" h* w9 {0 x3 G; [" h) Q1 @000072b6 4e4fa0c7 TRAP #15% }1 ?5 \6 k/ E X* G2 b4 X
000072ba DC.W sysTrapStrLen
8 ^9 D/ T3 u( t* v000072ba 3600 MOVE.W D0,D3! M+ [4 w8 X( M* n- {: ^
000072bc 584f ADDQ.W #4,A7
. t& i2 O0 K+ o1 e7 Z' z000072be 6008 BRA L1021; l8 \' W/ ^2 c
000072c0 362efff8 L1020 MOVE.W -8(A6),D3
9 E4 U- i( b! F0 ?& f8 R000072c4 966efffa SUB.W -6(A6),D3
) w3 w8 t( k! H8 [000072c8 2f0a L1021 MOVE.L A2,-(A7)& V; z) p4 {5 X: O1 A, D# v
000072ca 4e4fa04f TRAP #15- _+ c! O! V( t/ F0 R
000072ce DC.W sysTrapDmNumRecords' L7 t" y/ {: a4 A3 G
000072ce 3d40fffc MOVE.W D0,-4(A6)* ^# j5 `% I6 H- S8 \
000072d2 3003 MOVE.W D3,D0
1 L2 l E% M* [6 D; ]7 t: u000072d4 5240 ADDQ.W #1,D0) c/ m" J3 v" L( L8 K
000072d6 48c0 EXT.L D0! h6 N6 C! M u' m* k1 l
000072d8 2f00 MOVE.L D0,-(A7): ^1 K% v7 n: ]+ A
000072da 486efffc PEA -4(A6)
( j- C& K7 x+ R( Q000072de 2f0a MOVE.L A2,-(A7)- i% p( D7 J9 ]: m. P3 A
000072e0 4e4fa055 TRAP #15$ i( k" A3 Q; ~4 o5 V, V8 {
000072e4 DC.W sysTrapDmNewRecord% K5 v( T) j" H: g7 P- l
000072e4 2e08 MOVE.L A0,D7
, u- k2 W) ?7 F5 U# _. D# J# N000072e6 4fef0010 LEA 16(A7),A78 l3 j; c- P3 C( k
000072ea 6612 BNE L1022
; ?2 ?' C5 B8 T. |9 E" {2 t000072ec 3f3c271d MOVE.W #10013!$271d,-(A7)" D# S. H) J' F
000072f0 4e4fa192 TRAP #15$ H1 `$ N8 }' F4 N! K) V6 X
000072f4 DC.W sysTrapFrmAlert$ K, t$ T$ ?1 k; I
000072f4 383cffff MOVE.W #-1,D4
j# g m! L2 D000072f8 544f ADDQ.W #2,A7
: Q& b% m+ ^! L# W000072fa 6000009a BRA L1025( O5 d$ z+ h0 `7 g$ a7 ?
000072fe 2f07 L1022 MOVE.L D7,-(A7)
9 v; D( T4 g( N3 @00007300 4e4fa021 TRAP #15
# N. A; @6 u% d$ X00007304 DC.W sysTrapMemHandleLock
$ M" x. K/ T: c00007304 2a08 MOVE.L A0,D5
3 |! t! H8 N* h6 S00007306 3043 MOVEA.W D3,A0# b) }* g" [, E* k- R4 i
00007308 2f08 MOVE.L A0,-(A7)
) _+ K. [. i# c1 r6 `. f3 \$ L0000730a 7000 MOVEQ #0,D0; Q/ i( X. o# v( T `. r Q( z
0000730c 302efffa MOVE.W -6(A6),D0) q! L& K3 V' z& \
00007310 41f30800 LEA 0(A3,D0.L),A00 s5 N1 K- `1 D
00007314 2f08 MOVE.L A0,-(A7)1 H8 v3 t; V. f: q: ~& s
00007316 42a7 CLR.L -(A7)
0 H! }- {+ P& X1 [00007318 2f05 MOVE.L D5,-(A7)
7 [) X& _* \$ P$ ~: U p# c0000731a 4e4fa076 TRAP #15; q d% D5 d! p s
0000731e DC.W sysTrapDmWrite
* e, l& H$ _- ^# ~* q3 F4 z0000731e 48780001 PEA $0001.W; q7 W5 Y( ?9 r
00007322 486efff7 PEA -9(A6)
/ Z- U: W$ z3 e; i00007326 3043 MOVEA.W D3,A0+ G5 s; M8 v7 } y7 m* W" F
00007328 2f08 MOVE.L A0,-(A7)
2 w# l4 i* S% V8 i# s. F% Y4 p0000732a 2f05 MOVE.L D5,-(A7)( t- F; d3 [2 o/ P
0000732c 4e4fa076 TRAP #15
8 q' D$ X' Y! V% S00007330 DC.W sysTrapDmWrite
, k+ f" ]2 G: s/ k$ |: P4 }00007330 2f05 MOVE.L D5,-(A7)
/ R M6 E) Q' n00007332 4e4fa035 TRAP #15! x7 Z" h, e( q
00007336 DC.W sysTrapMemPtrUnlock
' B& Q0 k$ l: [* x00007336 48780000 PEA $0000.W! m0 e9 |/ ~- w, x' |) v
0000733a 48780000 PEA $0000.W
* F. {/ ]( X1 u6 x7 m% F- N6 ]0000733e 486efffe PEA -2(A6)0 W9 t) F: A4 }5 J3 V' V
00007342 3f2efffc MOVE.W -4(A6),-(A7)! }; `. x9 e( g: k h' [/ A
00007346 2f0a MOVE.L A2,-(A7)
+ \# C! ], H* n' U00007348 4e4fa050 TRAP #152 B( R3 \8 k; s1 \4 f8 n" Y3 a
0000734c DC.W sysTrapDmRecordInfo
5 D6 F3 S' l5 ^% h( V0000734c 026efff0fffe ANDI.W #-16!-$10,-2(A6)1 c6 k$ ?! ]3 Q; v* C# A2 @& t3 X
00007352 302c2968 MOVE.W 10600(A4),D0$ p; L: w* _" x; |5 C- `1 j# ]
00007356 816efffe OR.W D0,-2(A6)% t% Y' M2 H: W) A4 h4 X9 v
0000735a 4a2c296a TST.B 10602(A4)# E2 ~" E; m& E* `' t
0000735e 4fef003a LEA 58(A7),A7" ~$ J' ^7 ~8 h& C
00007362 6708 BEQ L10238 B; `- X9 l4 q% u2 |. a9 {
00007364 006e0010fffe ORI.W #16!$10,-2(A6)
# f# ^% @. `) W( a. @5 _, K3 B1 m! H0000736a 6006 BRA L1024* a; t1 P. O4 ~8 u
0000736c 026effeffffe L1023 ANDI.W #-17!-$11,-2(A6)
. q* `1 L5 P0 z" Z* x% E00007372 48780000 L1024 PEA $0000.W& t I" S$ |; u* F# W
00007376 486efffe PEA -2(A6)9 y! q. \ C+ @4 W, _# `( W4 v+ F
0000737a 3f2efffc MOVE.W -4(A6),-(A7)9 h: @$ |7 {5 }/ {( L+ l
0000737e 2f0a MOVE.L A2,-(A7)+ }7 J8 J' z, [, r& k& r
00007380 4e4fa051 TRAP #15
& U6 }* R) |0 u( G! I% g0 p U00007384 DC.W sysTrapDmSetRecordInfo
7 U/ O8 y' Q/ w% j: Y z/ K7 K00007384 1f3c0001 MOVE.B #1,-(A7)& e+ [5 F& \- F' O
00007388 3f2efffc MOVE.W -4(A6),-(A7)4 G7 _3 O, {; W$ g8 t) {
0000738c 2f0a MOVE.L A2,-(A7), g) J) z0 B, I# V8 l" `. G
0000738e 4e4fa05e TRAP #15
, m$ R! |. ?, `8 a" i3 ?00007392 DC.W sysTrapDmReleaseRecord
9 K/ D( Q* b. ?+ H3 E& c* i00007392 4fef0016 LEA 22(A7),A7
0 T; y. G; y6 ~$ h00007396 200a L1025 MOVE.L A2,D07 _9 T ^8 X1 Y; c# d
00007398 6708 BEQ L10265 |! b" a( z( ]6 ?
0000739a 2f0a MOVE.L A2,-(A7)3 B/ X, L/ T! Y2 W. e2 E0 g
0000739c 4e4fa04a TRAP #15
7 n; q3 B* }$ @- w000073a0 DC.W sysTrapDmCloseDatabase
: o- Q1 N1 q$ O8 i6 F000073a0 584f ADDQ.W #4,A7. r+ X6 l4 j0 K, B
000073a2 3004 L1026 MOVE.W D4,D0
5 O7 c' ], e8 R; W4 _, [! V$ ?( q000073a4 4cdf1cf8 MOVEM.L (A7)+,D3-D7/A2-A4. f8 j" h y9 I9 D/ h. |5 F# ^
000073a8 4e5e UNLK A60 H5 A9 |& K: ]% j. d6 [) _ Z
000073aa 4e75 RTS |
|