forked from amix/photoshop
-
Notifications
You must be signed in to change notification settings - Fork 1
/
UAbout.a
69 lines (49 loc) · 1.25 KB
/
UAbout.a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
;Photoshop version 1.0.1, file: UAbout.a
; Computer History Museum, www.computerhistory.org
; This material is (C)Copyright 1990 Adobe Systems Inc.
; It may not be distributed to third parties.
; It is licensed for non-commercial use according to
; www.computerhistory.org/softwarelicense/photoshop/
INCLUDE 'Traps.a'
INCLUDE 'QuickEqu.a'
; **********************************************************************
SEG 'ADoAbout'
CodedChecksum PROC EXPORT
; Calling sequence (Pascal conventions):
;
; FUNCTION CodedChecksum (srcPtr: Ptr;
; count: INTEGER): LONGINT;
;
; Parameter Offsets
@result EQU 14
@srcPtr EQU 10
@count EQU 8
; Size of parameters
@params EQU 6
; Save registers
LINK A6,#0
MOVEM.L A4/D5-D7,-(SP)
; Unload parameters
MOVE.L @srcPtr(A6),A4
MOVE.W @count(A6),D7
SUB.W #1,D7
; Loop though bytes
CLR.L D6
@1 CLR.W D5
MOVE.B (A4)+,D5
ADD.W #1,D5
CLR.W -(SP)
_Random
MULU.W (SP)+,D5
ADD.L D5,D6
DBF D7,@1
; Return result
MOVE.L D6,@result(A6)
; Clean up and exit
MOVEM.L (SP)+,A4/D5-D7
UNLK A6
MOVE.L (SP)+,A0
ADD.W #@params,SP
JMP (A0)
; **********************************************************************
END