content
stringlengths
5
1.04M
avg_line_length
float64
1.75
12.9k
max_line_length
int64
2
244k
alphanum_fraction
float64
0
0.98
licenses
sequence
repository_name
stringlengths
7
92
path
stringlengths
3
249
size
int64
5
1.04M
lang
stringclasses
2 values
; A313836: Coordination sequence Gal.3.23.2 where G.u.t.v denotes the coordination sequence for a vertex of type v in tiling number t in the Galebach list of u-uniform tilings. ; 1,5,10,16,20,26,31,36,41,46,52,56,62,67,72,77,82,88,92,98,103,108,113,118,124,128,134,139,144,149,154,160,164,170,175,180,185,190,196,200,206,211,216,221,226,232,236,242,247,252 mov $5,$0 trn $0,1 mul $0,4 mov $1,3 lpb $0,1 sub $2,$4 add $0,$2 trn $0,5 mov $3,$1 mov $1,$2 mov $2,3 add $3,1 mov $4,$1 mov $1,$3 lpe lpb $5,1 add $1,4 sub $5,1 lpe sub $1,2
23.208333
179
0.651706
[ "Apache-2.0" ]
karttu/loda
programs/oeis/313/A313836.asm
557
Assembly
; A117590: a(n) = ceiling(x(n)), where x(n) = 3*x(n-1)/2 and x(1) = 1. ; 2,3,5,7,11,16,23,35,52,77,116,173,260,390,584,876,1314,1971,2956,4434,6651,9976,14964,22446,33669,50503,75754,113631,170446,255669,383503,575254,862880,1294320,1941480,2912220,4368329,6552494,9828740,14743110 lpb $0 mov $2,$0 sub $0,1 seq $2,52919 ; a(n) = 1 + 2*3^(n-1) with a(0)=2. add $1,$2 div $1,2 lpe add $1,2 mov $0,$1
31.538462
210
0.646341
[ "Apache-2.0" ]
ckrause/cm
programs/oeis/117/A117590.asm
410
Assembly
.global s_prepare_buffers s_prepare_buffers: push %r11 push %r12 push %r9 push %rax push %rbx push %rcx push %rdi push %rsi lea addresses_D_ht+0xf759, %rsi nop sub %r12, %r12 movw $0x6162, (%rsi) nop nop nop xor %rcx, %rcx lea addresses_WT_ht+0x4189, %rsi lea addresses_WT_ht+0x7c89, %rdi clflush (%rdi) nop and $51500, %rax mov $115, %rcx rep movsw cmp $60324, %rdi lea addresses_WT_ht+0x10f89, %r9 clflush (%r9) nop add $44414, %rbx mov (%r9), %r12d sub %rax, %rax lea addresses_WT_ht+0x2509, %rdi nop nop nop cmp %r12, %r12 mov (%rdi), %cx and %r12, %r12 lea addresses_D_ht+0x1ec89, %rsi lea addresses_WC_ht+0x4889, %rdi nop nop nop nop add %r11, %r11 mov $41, %rcx rep movsl nop and %r11, %r11 lea addresses_WT_ht+0x404d, %rax nop cmp %r12, %r12 movw $0x6162, (%rax) nop nop nop cmp %r12, %r12 pop %rsi pop %rdi pop %rcx pop %rbx pop %rax pop %r9 pop %r12 pop %r11 ret .global s_faulty_load s_faulty_load: push %r11 push %r12 push %r14 push %r8 push %rdi // Faulty Load lea addresses_UC+0x1b489, %r8 nop nop nop nop nop sub $34540, %r11 vmovups (%r8), %ymm7 vextracti128 $1, %ymm7, %xmm7 vpextrq $0, %xmm7, %r12 lea oracles, %rdi and $0xff, %r12 shlq $12, %r12 mov (%rdi,%r12,1), %r12 pop %rdi pop %r8 pop %r14 pop %r12 pop %r11 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_UC', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 0}} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_UC', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0}} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_D_ht', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 0}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 8, 'type': 'addresses_WT_ht'}, 'dst': {'same': False, 'congruent': 10, 'type': 'addresses_WT_ht'}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WT_ht', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 8}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WT_ht', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 7}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 10, 'type': 'addresses_D_ht'}, 'dst': {'same': False, 'congruent': 10, 'type': 'addresses_WC_ht'}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WT_ht', 'NT': True, 'AVXalign': False, 'size': 2, 'congruent': 2}} {'37': 21829} 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 */
46.652174
2,999
0.657968
[ "MIT" ]
danielmgmi/medusa
Transynther/_processed/NONE/_xt_/i9-9900K_12_0xca_notsx.log_21829_1245.asm
5,365
Assembly
; A254028: a(n) = 2^(n+1) + 3^n + 3. ; 6,10,20,46,116,310,860,2446,7076,20710,61100,181246,539636,1610710,4815740,14414446,43177796,129402310,387944780,1163310046,3488881556,10464547510,31389448220,94159956046,282463090916,847355718310,2542000046060,7625865920446,22877329325876,68631451106710,205893279578300,617677691251246,1853028778786436,5559077746424710 mov $1,3 mov $3,1 lpb $0,1 sub $0,1 add $1,2 trn $2,2 add $1,$2 add $2,$3 mul $3,2 sub $2,$3 trn $2,1 add $2,$1 mov $1,$2 lpe mul $1,2
27.157895
322
0.726744
[ "Apache-2.0" ]
karttu/loda
programs/oeis/254/A254028.asm
516
Assembly
; A257637: Maximal number of edges in an n-vertex triangle-free graph with maximal degree at most 4. ; 0,1,2,4,6,9,12,16,17,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,118,120,122,124,126,128,130,132,134,136,138,140,142,144,146,148,150,152,154,156,158,160,162,164,166,168,170,172,174,176,178,180,182,184,186,188,190,192,194,196,198,200 mov $4,$0 mov $6,$0 mov $7,$0 add $0,1 mov $1,$4 mov $2,$0 mov $3,4 mov $5,4 lpb $2,1 mov $0,$1 add $3,4 add $5,$3 lpb $4,1 add $0,$6 sub $0,3 trn $4,$3 lpe trn $0,$5 sub $3,6 sub $6,$0 lpb $5,1 mov $1,$3 add $4,$0 sub $4,6 sub $5,$3 lpe lpb $6,1 sub $6,$3 add $1,$6 lpe sub $1,$3 add $2,$4 trn $2,1 lpe add $1,$3 lpb $7,1 add $1,1 sub $7,1 lpe sub $1,2
19.840909
346
0.588774
[ "Apache-2.0" ]
karttu/loda
programs/oeis/257/A257637.asm
873
Assembly
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% (c) Copyright GeoWorks 1994. All Rights Reserved. GEOWORKS CONFIDENTIAL PROJECT: Icon editor MODULE: Viewer FILE: viewerVisIcon.asm AUTHOR: Steve Yegge, Jun 17, 1994 ROUTINES: Name Description ---- ----------- INT SetVisIconHighlightBounds Sets instance data for drawing highlight(s). INT CalcTextBounds Sets the bounds of the icon name's text in instance data. Will only do the left & right. The top & bottom were set by VisIconInitialize. Also changes truncates the icon name in instance data and adds an ellipsis, if necessary. INT AlignText Aligns the text if it is smaller than the max length so it will appear centered. The function will also truncate any text that is longer than the max length and return the position at which to draw an ellipsis (...) INT GetClippedPosition Clipps text so it will fit into a space of specified size. INT GetClippedPositionCharAttrCallback Character attribute callback routine for text position. INT VisIconDrawBitmap Draws the bitmap part of the icon. INT VisIconDrawName Draws the name of the icon under the bitmap. INT TestIntersectingRectangles See if rubberband is stretched across our bounds. INT TestPointInRect See if a point is in the rubberband. INT TestPointInBounds See if a given point is in our bounds (VisIconClass) REVISION HISTORY: Name Date Description ---- ---- ----------- stevey 6/17/94 Initial revision DESCRIPTION: Implementation of VisIcon class. $Id: viewerVisIcon.asm,v 1.1 97/04/04 16:07:03 newdeal Exp $ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ViewerCode segment resource COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% VisIconRecalcSize %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Returns the size the vis-icon wants to be. CALLED BY: MSG_VIS_RECALC_SIZE PASS: *ds:si = VisIconClass object ds:di = VisIconClass instance data es = dgroup cx = suggested width dx = suggested height RETURN: cx = width to use dx = height to use DESTROYED: nothing PSEUDO CODE/STRATEGY: - return the dimensions of the first format for this icon - if the first format is too narrow, we return a minimum width (for use in drawing the name) - same 4 d height REVISION HISTORY: Name Date Description ---- ---- ----------- stevey 12/ 8/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ VisIconRecalcSize method VisIconClass, MSG_VIS_RECALC_SIZE uses ax, bp .enter ; ; For now we'll just use the first format in the database ; until I can think of something better. ; mov ax, MSG_DB_VIEWER_GET_DATABASE ; returns in bp call VisCallParent mov ax, ds:[di].VII_iconNumber clr bx call IdGetFormatDimensions ; ; Just for kickers (and to fix several bugs) we'll use ; the height & width we just got to set the highlight ; bounds. Slow but accurate. ; call SetVisIconHighlightBounds ; nukes ax ; ; Now figure out whether the height & width are less than ; the minimum required values. If so, beef them up a little. ; cmp cx, VIS_ICON_MINIMUM_WIDTH jae doneWidth mov cx, VIS_ICON_MINIMUM_WIDTH doneWidth: cmp dx, VIS_ICON_MINIMUM_HEIGHT jae taller mov dx, VIS_ICON_MINIMUM_HEIGHT + VIS_ICON_SPACER + \ VIS_ICON_TEXT_HEIGHT jmp short done taller: add dx, VIS_ICON_SPACER + VIS_ICON_TEXT_HEIGHT done: .leave ret VisIconRecalcSize endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% VisIconInitialize %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Sets up the instance data for the vis-icon. CALLED BY: MSG_VIS_ICON_INITIALIZE PASS: *ds:si = VisIconClass object ds:di = VisIconClass instance data cx = icon number RETURN: nothing DESTROYED: nothing PSEUDO CODE/STRATEGY: - set the icon number in instance data - figure out how long the icon name is (in points) - figure out how big the bitmap is - initialize the instance data appropriately REVISION HISTORY: Name Date Description ---- ---- ----------- stevey 12/23/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ VisIconInitialize method dynamic VisIconClass, MSG_VIS_ICON_INITIALIZE uses ax, cx, dx, bp .enter mov ds:[di].VII_iconNumber, cx mov ax, MSG_DB_VIEWER_GET_DATABASE ; returns in bp call VisCallParent mov di, ds:[si] add di, ds:[di].Vis_offset ; ; Get the name of the icon into instance data. ; mov_tr ax, cx ; ax = icon number mov bx, ds lea dx, ds:[di].VII_iconName ; bx:dx = name buffer call IdGetIconName ; ; Get the bitmap bounds and use them to set up the highlights. ; mov ax, ds:[di].VII_iconNumber clr bx call IdGetFormatDimensions ; cx = width, dx = height call SetVisIconHighlightBounds push ax ; ; Get a gstate and set the font to the one we'll be using ; when we draw. Then set up the call to AlignText. ; mov ax, MSG_VIS_VUP_CREATE_GSTATE call ObjCallInstanceNoLock clr ah mov dx, VIS_ICON_FONT_SIZE mov cx, VIS_ICON_FONT_ID xchg di, bp call GrSetFont xchg di, bp pop ax ; restore width to use for text call CalcTextBounds xchg di, bp ; di = gstate call GrDestroyState xchg di, bp ; di = instance ; ; Force an update of our visual selves. ; mov ax, MSG_VIS_MARK_INVALID mov cl, mask VOF_GEOMETRY_INVALID or mask VOF_IMAGE_INVALID mov dl, VUM_NOW call ObjCallInstanceNoLock .leave ret VisIconInitialize endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SetVisIconHighlightBounds %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Sets instance data for drawing highlight(s). CALLED BY: VisIconRecalcSize, VisIconInitialize PASS: ds:di = VisIconInstance cx = bitmap width dx = bitmap height RETURN: ax = height to use for calculating text bounds DESTROYED: nothing PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- stevey 6/11/93 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ SetVisIconHighlightBounds proc near class VisIconClass uses cx,dx .enter ; ; Examine passed width. If it's wider than the minimum ; vis-icon width, we start drawing the bitmap at the ; upper-left corner of the VisIcon. ; cmp cx, VIS_ICON_MINIMUM_WIDTH jae wider ; ; The bitmap is narrower than the minimum. Center the ; bitmap between the left & right vis-bounds. ; mov ax, VIS_ICON_MINIMUM_WIDTH sub ax, cx shr ax ; divide remainder by 2 mov ds:[di].VII_bitmapBounds.R_left, ax mov ds:[di].VII_bitmapBounds.R_right, ax add ds:[di].VII_bitmapBounds.R_right, cx mov ax, VIS_ICON_MINIMUM_WIDTH ; width to use for text jmp short doneWidth wider: ; ; The bitmap is wider than the minimum. The vis-icon will ; be as wide as the bitmap, so clear the left offset and use ; the bitmap's width for the right one. ; clr ds:[di].VII_bitmapBounds.R_left mov ds:[di].VII_bitmapBounds.R_right, cx mov ax, cx ; bitmap width (to use for text) doneWidth: push ax ; save width to use for text cmp dx, VIS_ICON_MINIMUM_HEIGHT jae taller ; ; The bitmap is shorter than the minimum height. Subtract ; the bitmap height from the minimum-height line to get ; the y-offset for drawing the bitmap. Set the text y- ; offset to the (minimum bitmap height + the spacer). ; mov ax, VIS_ICON_MINIMUM_HEIGHT sub ax, dx mov ds:[di].VII_bitmapBounds.R_top, ax mov ds:[di].VII_bitmapBounds.R_bottom, \ VIS_ICON_MINIMUM_HEIGHT mov ds:[di].VII_textBounds.R_top, \ VIS_ICON_MINIMUM_HEIGHT + VIS_ICON_SPACER mov ds:[di].VII_textBounds.R_bottom, \ VIS_ICON_TEXT_HEIGHT + \ VIS_ICON_MINIMUM_HEIGHT + VIS_ICON_SPACER jmp short doneHeight taller: ; ; The bitmap is taller than the minimum. The bitmap height ; will determine the text offset. ; clr ds:[di].VII_bitmapBounds.R_top mov ds:[di].VII_bitmapBounds.R_bottom, dx mov ds:[di].VII_textBounds.R_top, dx add ds:[di].VII_textBounds.R_top, VIS_ICON_SPACER mov ds:[di].VII_textBounds.R_bottom, dx add ds:[di].VII_textBounds.R_bottom, VIS_ICON_SPACER + \ VIS_ICON_TEXT_HEIGHT doneHeight: pop ax ; restore height for text .leave ret SetVisIconHighlightBounds endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% CalcTextBounds %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Sets the bounds of the icon name's text in instance data. Will only do the left & right. The top & bottom were set by VisIconInitialize. Also changes truncates the icon name in instance data and adds an ellipsis, if necessary. CALLED BY: VisIconInitialize PASS: ds:[di] = VisIconInstance ax = width to use for centering/truncating. bp = gstate to draw to RETURN: nothing DESTROYED: nothing PSEUDO CODE/STRATEGY: - call skarpi's ultra-nifty routine to center/truncate the text - deal with it. REVISION HISTORY: Name Date Description ---- ---- ----------- stevey 12/23/92 initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ CalcTextBounds proc near class VisIconClass uses ax,bx,cx,dx,si,di,bp .enter mov bx, ax ; save max width lea si, ds:[di].VII_iconName ; ds:si = text xchg di, bp call AlignText ; ax <- x offset ; cx = num chars jc clipped ; ; The text wasn't clipped, so we don't have to draw an ; ellipsis (clear this field). AlignText returned the ; x-offset (R_left), but we have to get the text length ; to find the R_right part. ; mov ds:[bp].VII_textBounds.R_left, ax mov ds:[bp].VII_textBounds.R_right, ax ; add width to this mov ds:[bp].VII_numChars, cx clr ds:[bp].VII_ellipsis mov cx, size FileLongName call GrTextWidth ; dx = width (points) add ds:[bp].VII_textBounds.R_right, dx jmp short done clipped: ; ; AlignText told us that the text has to be clipped. This ; means that the text will fill the entire width of the VisIcon, ; which happens to be in bx right now (look at the first line ; of this routine if you don't believe me. Go ahead. Look.) ; AlignText also gave us a pixel offset at which to begin ; drawing the ellipsis, and the number of characters to draw ; (0 if null-terminated), which is exactly what we need to pass ; to GrDrawText in the vis-draw message handler. So we save ; all that hooey in instance data. ; clr ds:[bp].VII_textBounds.R_left mov ds:[bp].VII_textBounds.R_right, bx mov ds:[bp].VII_numChars, cx mov ds:[bp].VII_ellipsis, dx done: .leave ret CalcTextBounds endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% AlignText %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Aligns the text if it is smaller than the max length so it will appear centered. The function will also truncate any text that is longer than the max length and return the position at which to draw an ellipsis (...) CALLED BY: DrawText PASS: ax = max length of text (in pixels) ds:si = text di = gstate RETURN: ax = x offset to start drawing at cx = number of chars to draw (0 if null terminated) if carry set: text was clipped dx = offset to draw ellipsis (pixels) DESTROYED: nothing PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- SH 10/22/92 Initial version stevey 12/10/92 made adjustments for use in vis-icons %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ AlignText proc near uses bx .enter mov cx, size FileLongName call GrTextWidth ; dx <- text width in points cmp dx, ax ; is text longer than max value jg textIsLonger ; if so we have to truncate sub ax, dx ; diff in space shr ax, 1 ; div by 2 clr cx ; null terminated done: .leave ret textIsLonger: ; ; subtract the size of an ellipsis from the max length ; push ax ; save total field size mov_tr cx, ax ; cx <- size of the field mov ax, C_ELLIPSIS call GrCharWidth ; dx:ah <- char width sub cx, dx mov ax, cx ; ax = field size - width of ... push dx ; save ellipsis size ; ; since the text is longer than the total space we have to draw it in ; we have to truncate it ; call GetClippedPosition ; cx - num characters to draw ; dx - Nearest valid position mov bx, dx ; len string in points pop ax ; size of ellipses add bx, ax ; bx <- len of string + ellipsis pop ax ; ax <- total field len sub ax, bx shr ax, 1 ; ; if the space is only 2 pixels don't bother ; cmp ax, 2 jle short noSpace add dx, ax ; add the starting offset to the stc jmp done noSpace: clr ax ; ellipsis offset stc jmp done AlignText endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GetClippedPosition %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Clipps text so it will fit into a space of specified size. CALLED BY: AlignText PASS: ax - Size of clip region (in points) ds:si - Text to clip di - gstate handle RETURN: cx - Number of characters to draw dx - Neares valid position (position to draw ellipsis) DESTROYED: nothing PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- SH 10/22/92 Initial version stevey 12/10/92 stole it from skarpi %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ GetClippedPosition proc near uses ax,bx,si,di,es .enter push bp sub sp, size GTP_vars mov bp, sp movcb ss:[bp].GTPL_style.TMS_styleCallBack,\ GetClippedPositionCharAttrCallback clrdw ss:[bp].GTPL_style.TMS_graphicCallBack movdw ss:[bp].GTPL_object, dssi ; save ptr to text clr ss:[bp].GTPL_startPosition clr ss:[bp].GTPL_charCount ; ; get the string size ; mov dx, di ; dx <- gstate segmov es, ds, di mov di, si call LocalStringSize ; cx <- string size mov di, dx ; di <- gstate mov dx, ax ; max length call GrTextPosition ; cx <- nearest character ; dx <- nearest valid position ; ; if the nearest valid position is one passed the total width we have ; to dec the character count by one and sub that charecters width from ; the nearest valid position ; cmp dx, ax jle done dec cx ; new character count mov_tr bx, dx ; bx <- nearest valid position add si, cx ; offset to char clr ah mov al, {byte} ds:[si] ; ax <- char to check width call GrCharWidth ; dx:ah <- char width sub bx, dx ; bx <- nwp - char width mov_tr dx, bx ; dx <- new nearest valid position done: add sp, size GTP_vars pop bp .leave ret GetClippedPosition endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GetClippedPositionCharAttrCallback %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Character attribute callback routine for text position. CALLED BY: GrTextPosition PASS: ss:bp = pointer to GTP_vars structure on stack ds = Segment address of old text pointer di = Offset from field start RETURN: TMS_textAttr filled in ds:si = Pointer to the text cx = # of valid characters DESTROYED: nothing SIDE EFFECTS: TextAttr PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- SH 10/22/92 Initial version stevey 12/10/92 stole it from skarpi %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ GetClippedPositionCharAttrCallback proc far uses ax,bx,dx,di,bp,es .enter mov ss:[bp].GTPL_style.TMS_textAttr.TA_fontWidth, FWI_MEDIUM mov ss:[bp].GTPL_style.TMS_textAttr.TA_fontWeight, FW_NORMAL clr ss:[bp].GTPL_style.TMS_textAttr.TA_trackKern mov ss:[bp].GTPL_style.TMS_textAttr.TA_font, VIS_ICON_FONT_ID mov ss:[bp].GTPL_style.TMS_textAttr.TA_size.WBF_int, VIS_ICON_FONT_SIZE clr ss:[bp].GTPL_style.TMS_textAttr.TA_size.WBF_frac clrwbf ss:[bp].GTPL_style.TMS_textAttr.TA_spacePad clr ss:[bp].GTPL_style.TMS_textAttr.TA_modeClear clr ss:[bp].GTPL_style.TMS_textAttr.TA_modeSet clr ss:[bp].GTPL_style.TMS_textAttr.TA_styleClear clr ss:[bp].GTPL_style.TMS_textAttr.TA_styleSet movdw dssi, ss:[bp].GTPL_object ; ds:si <- ptr to text segmov es, ds, di mov di, si call LocalStringSize ; cx <- string size .leave ret GetClippedPositionCharAttrCallback endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% VisIconVisDraw %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Draw method for VisIconClass. CALLED BY: MSG_VIS_DRAW PASS: *ds:si = VisIconClass object ds:di = VisIconClass instance data bp = GState to draw to. RETURN: nothing DESTROYED: nothing PSEUDO CODE/STRATEGY: - draw a white rectangle first, to clear greebles - get the parent's icon database file handle - query the database for our moniker - draw the bitmap - if we're selected, draw an inverted rectangle REVISION HISTORY: Name Date Description ---- ---- ----------- stevey 12/ 8/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ VisIconVisDraw method VisIconClass, MSG_VIS_DRAW uses ax, cx, dx, bp .enter ; ; Erase whatever was there before (just in case) ; xchg di, bp ; di = GState, bp = instance data mov ah, CF_INDEX mov al, C_WHITE call GrSetAreaColor ; ; make sure to erase the dotted rectangle for the current icon ; That is what the sub's and inc's are for. ; mov ax, ds:[bp].VI_bounds.R_left sub ax, 2 mov bx, ds:[bp].VI_bounds.R_top sub bx, 2 mov cx, ds:[bp].VI_bounds.R_right add cx, 2 mov dx, ds:[bp].VI_bounds.R_bottom add dx, 2 call GrFillRect xchg di, bp ; bp = GState, di = instance data call VisIconDrawBitmap call VisIconDrawName .leave ret VisIconVisDraw endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% VisIconDrawBitmap %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Draws the bitmap part of the icon. CALLED BY: VisIconVisDraw PASS: *ds:si = VisIcon ds:[di] = VisIconInstance bp = GState to draw to RETURN: nothing DESTROYED: nothing PSEUDO CODE/STRATEGY: - draw the bitmap starting at the bitmap upper-left corner (as specified in instance data). - if the icon currently being edited, draw a dashed rectangle around the VisIcon moniker - if selected, draw an inverted rectangle over the bitmap. REVISION HISTORY: Name Date Description ---- ---- ----------- stevey 12/23/92 initial version lester 1/12/94 modified to indicate the current icon %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ VisIconDrawBitmap proc near class VisIconClass uses ax,bx,cx,dx,di,bp .enter ; ; Just get the first format from the database ; push bp ; save gstate mov ax, MSG_DB_VIEWER_GET_DATABASE call VisCallParent ; bp = vm file handle mov ax, ds:[di].VII_iconNumber clr bx call IdGetFormat ; returns ^vcx:dx pop bp ; restore gstate tst dx ; valid bitmap? LONG jz done ; ; Draw the bitmap starting at our upper-left corner. ; mov ax, ds:[di].VI_bounds.R_left add ax, ds:[di].VII_bitmapBounds.R_left mov bx, ds:[di].VI_bounds.R_top add bx, ds:[di].VII_bitmapBounds.R_top xchg di, bp ; di = gstate, bp = instance xchg cx, dx call GrDrawHugeBitmap ; ; If we're the current icon (ie the one being edited in the fatbits, ; not the one selected in the DBViewer) draw a dashed rectangle ; around the VisIcon moniker ; mov ax, MSG_DB_VIEWER_GET_CURRENT_ICON call VisCallParent ; ax = current icon cmp ax, ds:[bp].VII_iconNumber jne doneCurrentTest ; draw dashed rectangle around the VisIcon moniker mov al, MM_INVERT call GrSetMixMode mov al, SDM_50 call GrSetLineMask mov ax, ds:[bp].VI_bounds.R_left mov cx, ax add ax, ds:[bp].VII_bitmapBounds.R_left add cx, ds:[bp].VII_bitmapBounds.R_right sub ax, 2 inc cx mov bx, ds:[bp].VI_bounds.R_top mov dx, bx add bx, ds:[bp].VII_bitmapBounds.R_top add dx, ds:[bp].VII_bitmapBounds.R_bottom sub bx, 2 inc dx call GrDrawRect mov al, MM_COPY ; restore mix mode call GrSetMixMode mov al, SDM_100 call GrSetLineMask doneCurrentTest: ; ; If we're selected draw an inverted rectangle over the ; bitmap. ; tst ds:[bp].VII_selected jz done mov al, MM_INVERT call GrSetMixMode mov ax, ds:[bp].VI_bounds.R_left mov cx, ax add ax, ds:[bp].VII_bitmapBounds.R_left add cx, ds:[bp].VII_bitmapBounds.R_right mov bx, ds:[bp].VI_bounds.R_top mov dx, bx add bx, ds:[bp].VII_bitmapBounds.R_top add dx, ds:[bp].VII_bitmapBounds.R_bottom call GrFillRect mov al, MM_COPY ; restore mix mode call GrSetMixMode done: .leave ret VisIconDrawBitmap endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% VisIconDrawName %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Draws the name of the icon under the bitmap. CALLED BY: VisIconVisDraw PASS: *ds:si = VisIcon object ds:[di] = instance data bp = gstate to draw to RETURN: nothing DESTROYED: nothing PSEUDO CODE/STRATEGY: - set the font in the gstate - draw the text starting at the text upper-left corner, as specified in instance data. - if selected, draw an inverted rectangle over the text. REVISION HISTORY: Name Date Description ---- ---- ----------- stevey 12/23/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ VisIconDrawName proc near class VisIconClass uses ax,bx,cx,dx,si,di,bp .enter ; ; set the text font (same as GeoManager uses) ; clr ah mov dx, VIS_ICON_FONT_SIZE mov cx, VIS_ICON_FONT_ID xchg di, bp call GrSetFont xchg di, bp ; ; Draw the text ; mov ax, ds:[di].VI_bounds.R_left add ax, ds:[di].VII_textBounds.R_left mov bx, ds:[di].VI_bounds.R_top add bx, ds:[di].VII_textBounds.R_top mov cx, ds:[di].VII_numChars lea si, ds:[di].VII_iconName ; ds:si = text xchg di, bp ; di = gstate call GrDrawText ; ; If necessary, draw the ellipsis ; tst ds:[bp].VII_ellipsis jz noEllipsis mov ax, ds:[bp].VI_bounds.R_left add ax, ds:[bp].VII_ellipsis ; offset to ellipsis mov bx, ds:[bp].VI_bounds.R_top add bx, ds:[bp].VII_textBounds.R_top mov dx, C_ELLIPSIS call GrDrawChar noEllipsis: ; ; If we're selected, draw a rectangle over the text. ; tst ds:[bp].VII_selected jz done mov al, MM_INVERT call GrSetMixMode mov ax, ds:[bp].VI_bounds.R_left mov cx, ax add ax, ds:[bp].VII_textBounds.R_left add cx, ds:[bp].VII_textBounds.R_right mov bx, ds:[bp].VI_bounds.R_top mov dx, bx add bx, ds:[bp].VII_textBounds.R_top add dx, ds:[bp].VII_textBounds.R_bottom call GrFillRect mov al, MM_COPY call GrSetMixMode done: .leave ret VisIconDrawName endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% VisIconSetSelectedState %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Sets us selected (if not already) and redraws. This message is only sent when the VisIcon is selected via MSG_META_START_SELECT to the parent, not if it was selected with a rubberband. CALLED BY: MSG_VIS_ICON_SET_SELECTED_STATE PASS: *ds:si = VisIconClass object ds:di = VisIconClass instance data bp.high = UIFunctionsActive cx = number of child to set (if it's not our number, then deselect) RETURN: nothing DESTROYED: nothing PSEUDO CODE/STRATEGY: - if the control key is down, let the end-select handler take care of things. (DBViewerEndSelect) - if we aren't selected already, select ourselves, redraw, and call the content (our parent) back and mention it. REVISION HISTORY: Name Date Description ---- ---- ----------- stevey 12/ 9/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ VisIconSetSelectedState method VisIconClass, MSG_VIS_ICON_SET_SELECTED_STATE uses ax, cx, dx, bp .enter mov ax, bp test ah, mask UIFA_ADJUST ; control key pressed? jnz quit cmp cx, ds:[di].VII_iconNumber je selectMe ; ; We're getting a de-select message. We were already deselected? ; tst ds:[di].VII_selected ; were we already? jz quit ; yep, bail clr ds:[di].VII_selected jmp short draw selectMe: tst ds:[di].VII_selected ; were we already? jnz quit mov ds:[di].VII_selected, 1 draw: ; ; redraw ourselves immediately to prevent rubberband greebles. ; mov ax, MSG_VIS_VUP_CREATE_GSTATE call ObjCallInstanceNoLock push bp clr cl ; flags for vis-draw mov ax, MSG_VIS_DRAW call ObjCallInstanceNoLock pop di call GrDestroyState ; ; Our state changed. Call the content. ; mov di, ds:[si] add di, ds:[di].Vis_offset clr ch mov cl, ds:[di].VII_selected ; nonzero or whatever mov ax, MSG_DB_VIEWER_ICON_TOGGLED call VisCallParent quit: .leave ret VisIconSetSelectedState endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% VisIconSetSelection %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Turns it on or off. CALLED BY: MSG_VIS_ICON_SET_SELECTION PASS: *ds:si = VisIconClass object ds:di = VisIconClass instance data dx = nonzero if turning on zero if turning off RETURN: nothing DESTROYED: nothing PSEUDO CODE/STRATEGY: - if we're already selected, and selecting, bail - if we're already unselected, and turning off, bail - select or deselect ourselves - redraw - notify our parent that we toggled REVISION HISTORY: Name Date Description ---- ---- ----------- stevey 12/11/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ VisIconSetSelection method VisIconClass, MSG_VIS_ICON_SET_SELECTION uses ax, cx, dx, bp .enter tst dx jz notSelected tst ds:[di].VII_selected ; selected already? jnz done ; yep, bail mov ds:[di].VII_selected, 1 jmp short redraw notSelected: tst ds:[di].VII_selected ; unselected already? jz done ; yep, bail clr ds:[di].VII_selected redraw: mov ax, MSG_VIS_VUP_CREATE_GSTATE call ObjCallInstanceNoLock push bp clr cl ; flags for vis-draw mov ax, MSG_VIS_DRAW call ObjCallInstanceNoLock pop di call GrDestroyState ; ; Our state changed. Call the content. ; mov di, ds:[si] add di, ds:[di].Vis_offset clr ch mov cl, ds:[di].VII_selected ; nonzero or whatever mov ax, MSG_DB_VIEWER_ICON_TOGGLED call VisCallParent done: .leave ret VisIconSetSelection endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% VisIconCheckInRectangle %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: See if we're selected by virtue of being in the rubberband. CALLED BY: MSG_VIS_ICON_CHECK_IN_RECTANGLE PASS: *ds:si = VisIconClass object ds:di = VisIconClass instance data ss:[bp] = CheckInRectangleStruct RETURN: nothing DESTROYED: nothing PSEUDO CODE/STRATEGY: - make sure that in the passed rubberband rectangle, the top, left corner is in R_left and R_top. - see if the rubberband is selecting us: * if any of our corners is in the rubberband -- OR -- * if any of the rubberband's corners are in our bounds -- OR -- * if they cross each other like a tic-tac-toe board ...then we're selected. - see if the control key is down (it affects whether we're getting selected or deselected: * if we're already selected, and the rubberband isn't selecting us, and the control key is down, we stay selected * if we're selected, and the rubberband is selecting us, and the control key is down, we become unselected - if our state changed, send a message to the content REVISION HISTORY: Name Date Description ---- ---- ----------- stevey 12/ 9/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ VisIconCheckInRectangle method VisIconClass, MSG_VIS_ICON_CHECK_IN_RECTANGLE uses ax, cx, dx, bp .enter mov ss:[bp].CIRS_chunk, si ; save our object offset mov ax, ss:[bp].CIRS_rect.R_left mov bx, ss:[bp].CIRS_rect.R_top mov cx, ss:[bp].CIRS_rect.R_right mov dx, ss:[bp].CIRS_rect.R_bottom ; ; First make sure the Rectangle points are in the correct ; order (R_top is really R_top, etc). ; cmp cx, ax jge noSwap1 xchg cx, ax noSwap1: cmp dx, bx jge noSwap2 xchg dx, bx noSwap2: mov ss:[bp].CIRS_rect.R_left, ax mov ss:[bp].CIRS_rect.R_top, bx mov ss:[bp].CIRS_rect.R_right, cx mov ss:[bp].CIRS_rect.R_bottom, dx ; ; Check if any of our 4 corners are in the rubberband-rectangle, ; in this order: upper-left, upper-right, lower-right, lower-left ; mov ax, ds:[di].VI_bounds.R_left mov bx, ds:[di].VI_bounds.R_top ; upper-left call TestPointInRect jc yes mov ax, ds:[di].VI_bounds.R_right ; upper-right call TestPointInRect jc yes mov bx, ds:[di].VI_bounds.R_bottom call TestPointInRect ; lower-right jc yes mov ax, ds:[di].VI_bounds.R_left call TestPointInRect ; lower-left jc yes ; ; Now check to see if any corner of the rubberband is in ; our bounds. (ax, bx) and (cx, dx) define the rubberband. ; mov ax, ss:[bp].CIRS_rect.R_left mov bx, ss:[bp].CIRS_rect.R_top call TestPointInBounds jc yes mov ax, ss:[bp].CIRS_rect.R_right call TestPointInBounds jc yes mov bx, ss:[bp].CIRS_rect.R_bottom call TestPointInBounds jc yes mov ax, ss:[bp].CIRS_rect.R_left call TestPointInBounds jc yes ; ; Now check to see if the rubberband is stretched across ; our bounds, like so: ; --------- ; | | ; ------------------------- ; | | | | ; | | | | ; ------------------------- ; | | ; --------- ; mov ax, ss:[bp].CIRS_rect.R_left mov bx, ss:[bp].CIRS_rect.R_top mov cx, ss:[bp].CIRS_rect.R_right mov dx, ss:[bp].CIRS_rect.R_bottom call TestIntersectingRectangles jc yes ; ; At this point, if we're selected AND we were already ; selected, we bail. Same for if we weren't selected ; and we already weren't selected. Otherwise we set our ; selected-bit appropriately and redraw. ; no:: tst ds:[di].VII_selected jz done ; already not selected (bail) ; ; OK, we are transitioning to unselected, unless the control ; key is down. ; test ss:[bp].CIRS_flags, mask UIFA_ADJUST ; control key jnz done clr ds:[di].VII_selected jmp short redraw yes: ; ; If we got here, we're being selected by the rubberband. ; If we were already selected, we check the state of the ; control key, and if it's down, we deselect and redraw. ; tst ds:[di].VII_selected jnz alreadySelected ; ; we weren't selected, so select ourselves no matter what. ; mov ds:[di].VII_selected, 1 redraw: mov si, ss:[bp].CIRS_chunk mov ax, MSG_VIS_VUP_CREATE_GSTATE call ObjCallInstanceNoLock push bp clr cl mov ax, MSG_VIS_DRAW call ObjCallInstanceNoLock pop di call GrDestroyState ; ; Our state changed. Send a message to the content. ; mov di, ds:[si] add di, ds:[di].Vis_offset tst ds:[di].VII_selected jz deselected mov cx, 1 jmp short sendToContent deselected: clr cx sendToContent: mov ax, MSG_DB_VIEWER_ICON_TOGGLED call VisCallParent jmp short done alreadySelected: ; ; If the control key is down, we deselect and redraw, else quit. ; test ss:[bp].CIRS_flags, mask UIFA_ADJUST ; control key jz done clr ds:[di].VII_selected jmp short redraw done: .leave ret VisIconCheckInRectangle endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TestIntersectingRectangles %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: See if rubberband is stretched across our bounds. CALLED BY: VisIconCheckInRectangle PASS: ax, bx = upper-left corner cx, dx = lower-right corner ds:[di] = instance data RETURN: carry set if they intersect DESTROYED: nothing PSEUDO CODE/STRATEGY: if (ax < left) AND (cx > right) AND (bx > top) AND (dx < bottom) then it's crossing if (bx < top) AND (dx > bottom) AND (ax > left) AND (cx < right) then it's crossing REVISION HISTORY: Name Date Description ---- ---- ----------- stevey 12/9/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TestIntersectingRectangles proc near class VisIconClass ; ; Check if the rubberband is crossing us horizontally. ; cmp ax, ds:[di].VI_bounds.R_left jge notHorizontally cmp cx, ds:[di].VI_bounds.R_right jle notHorizontally cmp bx, ds:[di].VI_bounds.R_top jle notHorizontally cmp dx, ds:[di].VI_bounds.R_bottom jl yep notHorizontally: ; ; Check if rubberband's crossing vertically. ; cmp bx, ds:[di].VI_bounds.R_top jge nope cmp dx, ds:[di].VI_bounds.R_bottom jle nope cmp ax, ds:[di].VI_bounds.R_left jle nope cmp cx, ds:[di].VI_bounds.R_right jl yep jmp short nope yep: stc jmp short done nope: clc done: ret TestIntersectingRectangles endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TestPointInRect %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: See if a point is in the rubberband. CALLED BY: VisIconCheckInRectangle PASS: ss:[bp] = CheckInRectangleStruct ax, bx = point RETURN: carry set if it's inside the rectangle DESTROYED: nothing PSEUDO CODE/STRATEGY: - return carry set if the point falls inside the rectangle REVISION HISTORY: Name Date Description ---- ---- ----------- stevey 12/9/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TestPointInRect proc near .enter inherit cmp ax, ss:[bp].CIRS_rect.R_left jl nope cmp ax, ss:[bp].CIRS_rect.R_right jg nope cmp bx, ss:[bp].CIRS_rect.R_top jl nope cmp bx, ss:[bp].CIRS_rect.R_bottom jg nope stc jmp short done nope: clc done: .leave ret TestPointInRect endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TestPointInBounds %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: See if a given point is in our bounds (VisIconClass) CALLED BY: VisIconCheckInRectangle PASS: ds:[di] = instance data ax, bx = point to test RETURN: carry set if it's in our bounds DESTROYED: nothing PSEUDO CODE/STRATEGY: - return carry set if point lies inside rectangle REVISION HISTORY: Name Date Description ---- ---- ----------- stevey 12/9/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TestPointInBounds proc near class VisIconClass .enter inherit cmp ax, ds:[di].VI_bounds.R_left jl nope cmp bx, ds:[di].VI_bounds.R_top jl nope cmp ax, ds:[di].VI_bounds.R_right jg nope cmp bx, ds:[di].VI_bounds.R_bottom jg nope stc jmp short done nope: clc done: .leave ret TestPointInBounds endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% VisIconGetNumber %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Returns the icon-number for this VisIcon. CALLED BY: MSG_VIS_ICON_GET_NUMBER PASS: *ds:si = VisIconClass object ds:di = VisIconClass instance data RETURN: cx = number ax = MouseReturnFlags DESTROYED: nothing PSEUDO CODE/STRATEGY: - get the number from instance data REVISION HISTORY: Name Date Description ---- ---- ----------- stevey 12/11/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ VisIconGetNumber method VisIconClass, MSG_VIS_ICON_GET_NUMBER mov cx, ds:[di].VII_iconNumber mov ax, mask MRF_PROCESSED ret VisIconGetNumber endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% VisIconGetSelection %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Returns whether the VisIcon is selected or not. CALLED BY: MSG_VIS_ICON_GET_SELECTION PASS: *ds:si = VisIconClass object ds:di = VisIconClass instance data RETURN: bp = nonzero if the icon is selected DESTROYED: nothing PSEUDO CODE/STRATEGY: - return whether we're selected or not (from instance data) REVISION HISTORY: Name Date Description ---- ---- ----------- stevey 12/10/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ VisIconGetSelection method VisIconClass, MSG_VIS_ICON_GET_SELECTION push ax clr ah mov al, ds:[di].VII_selected mov bp, ax pop ax ret VisIconGetSelection endm ViewerCode ends
25.175337
79
0.598015
[ "Apache-2.0" ]
BOBBYWY/pcgeos
Appl/Icon/Viewer/viewerVisIcon.asm
39,198
Assembly
.data string: .space 1024 .macro input_char(%in) li $v0, 12 syscall move %in, $v0 .end_macro .macro input_int(%in) li $v0, 5 syscall move %in, $v0 .end_macro .macro print(%out) li $v0, 1 move $a0, %out syscall .end_macro .macro println() li $v0, 11 li $a0, '\n' syscall .end_macro .macro printspace() li $v0, 11 li $a0, ' ' syscall .end_macro .macro get(%addr, %i, %j, %target) sll $t9, %i, 4 add $t9, $t9, %j sll $t9, $t9, 2 lw %target, %addr($t9) .end_macro .macro set(%addr, %i, %j, %source) sll $t9, %i, 4 add $t9, $t9, %j sll $t9, $t9, 2 sw %source, %addr($t9) .end_macro .text input_int($s0) li $t0, 0 li $s1, 1 for_input: beq $t0, $s0, end_for_input input_char($t1) sb $t1, string($t0) #print($t0) addiu $t0, $t0, 1 j for_input end_for_input: li $t0, 0 addiu $t1, $s0, -1 for_check: beq $t1, $t0, end_for_check bgt $t0, $t1, end_for_check lb $t2, string($t1) lb $t3, string($t0) li $s1, 0 bne $t2, $t3, break_for li $s1, 1 addiu $t0, $t0, 1 addiu $t1, $t1, -1 j for_check break_for: end_for_check: print($s1) li $v0, 10 syscall
14.905405
34
0.607434
[ "MIT" ]
OliverDu8-24/BUAA-CO-2021
P2/P2_L0_judge.asm
1,103
Assembly
; A089255: Odd numbers n such that 2*n-5 is a prime. ; 5,9,11,17,21,23,29,33,39,47,51,53,57,59,71,77,81,89,93,99,101,117,119,123,131,137,141,143,149,159,161,171,177,179,189,197,201,203,207,213,219,227,231,233,257,263,273,281,287,291,299,303,309,311,323,329,333 mov $2,$0 add $2,2 pow $2,2 lpb $2 sub $2,1 mov $3,$1 seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0. sub $0,$3 add $1,4 mov $4,$0 max $4,0 cmp $4,$0 mul $2,$4 lpe sub $1,2 div $1,2 add $1,2 mov $0,$1
23.090909
207
0.635827
[ "Apache-2.0" ]
ckrause/cm
programs/oeis/089/A089255.asm
508
Assembly
; ; Generic pseudo graphics routines for text-only platforms ; ; Written by Stefano Bodrato 30/01/2002 ; ; ; Clears graph screen. ; ; ; $Id: clsgraph.asm,v 1.8 2017-01-02 22:57:59 aralbrec Exp $ ; INCLUDE "graphics/grafix.inc" SECTION code_clib PUBLIC cleargraphics PUBLIC _cleargraphics EXTERN base_graphics .cleargraphics ._cleargraphics ld hl,(base_graphics) ld d,h ld e,l inc de ld bc,+(maxx/2)*(maxy/2) ld (hl),blankch ldir ret
14.588235
64
0.655242
[ "BSD-2-Clause" ]
ByteProject/Puddle-BuildTools
FictionTools/z88dk/libsrc/gfx/text/clsgraph.asm
496
Assembly
li x15, 0x40001000 li x8 , 4194303 sw x8 , 0x3(x15)
10.6
18
0.679245
[ "Apache-2.0" ]
Talha-Ahmed-1/picofoxy
fpga/program.asm
53
Assembly
section .bss whocares resb 16 ; Reserve 16 bytes of memory for "Hello World!" time resb 1 ; memory location to store time section .text global _start ;must be declared for linker (ld) _start: ;tell linker entry point ;Showing how 32, 16, and 8 bit versions of a register works mov eax, 69696969h ;moves the 32 bits of hex data 69696969 into eax mov eax, 0 ;clears eax mov ax, 6969h ;moves hex 6969 in the low 16 bits of eax, aka ax xor eax, eax ;fun way to clear a register (xor anything with itself is zero) mov ah, 69h ;moves 69 hex into upper byte of ax, aka ah xor eax, eax ;clear eax mov al, 69h ;moves 69 hex into lower byte of ax, aka al ;Showing an exchange xor eax, eax ;clear the eax mov ax, 6969h ;mov 6969 hex into ax mov bx, 1337h ;mov 1337 hex into bx xchg ax, bx ;exchange data with ax and bx ;Pushing and Poping to/from stack xor eax,eax ;clear eax xor ebx,ebx ;clear ebx push 69696969h ;push 69696969 hex onto stack push 13371337h ;push 13371337 hex onto stack pop eax ;pop 13371337 off stack into eax pop ebx ;pop 69696969 off stack into ebx ;Maths xor eax,eax ;clear eax xor ebx,ebx ;clear ebx mov eax, 5 ;eax now has 5 add eax, 3 ;eax now has 8 (5+3) sub eax, 2 ;eax now has 6 (8-2) mov bx, 3 ;move 3 into bx mul bx ;multiply ax * bx store back into ax (6 * 3 = 18, 12h) inc eax ;eax now has 19 dec eax ;eax now has 18 mov dx, 0000h mov ax, 2600h ;dx:ax contains 00002600h mov bx, 2 ;bx contains 2 div bx ;divide dx:ax by 2, get 1300 hex ;Logic xor eax, eax ;clear eax mov al, 55h ;01010101 goes into ah or al, 0xaa ;and with 10101010, gets ffh and al, 69h ;and all 1's with anything is itself not al ;0x69 is 01101001, flip bits gets 10010110 (0x96) xor al, 99h ;10010110 xor with 10011001 is 00001111 (0x0f) ;Memory ;We are putting "Hello World!" into memory mov eax, 00000a21h ;mov "!" and carriage return into eax mov [whocares + 0xc], eax ;move that into memory location mov eax, 646c726fh ;mov "dlro" mov [whocares + 8], eax mov eax, 57202c6fh ;mov "W ,o" mov [whocares + 4], eax mov eax, 6c6c6548h ;mov "lleH" mov [whocares], eax ;Shiftiness xor eax, eax ;clear eax mov al, 40h ;al has 0100 0000 shl al, 1 ;shift bits left = 1000 0000 shr al, 2 ;shift bits right by 2, 0010 0000 rol al, 3 ;rotate bits left by 3, 0000 0001 ror al, 1 ;rotate bits right by 1, 1000 0000 ;Conditions and Randomness ;Note that I am not using the assembler to jump to "subroutine" names, The jumps ;are direct address based. Just note that each instruction takens a certain ;amount of bytes, so if I jump negative bytes, I am jumping a certain amount of ;instructions backwards. Likewise (forwards) for positive numbered jumps. conditions: mov eax, 13 ;sys_time (gets timestamp) mov ebx, time ;stores it in memory too int 0x80 ;Invoke Penguin cmp al, 40h ;al - 40, set flags accordingly jl conditions ;jump backwards to conditions: op if less cmp al, 60h ;al - 60, set flags accordingly jg conditions ;jump backwards to conditions: op if greater cmp al, 42h ;al - 42, set flags accordingly je conditions ;jump backwards to conditions: op if same jne nextop ;otherwise, go to next op nextop: jmp tehnothing ;unconditionally go to next op tehnothing: nop ;Another way to eat up 4 bytes without doing anything nop nop nop ;Call/Ret call print ;Go down to the subroutine ;Linux Int ;exit the program mov eax,1 ;system call number (sys_exit) int 0x80 ;call kernel ;"Subroutine To print Hello World" print: xor eax, eax ;Clear eax mov ecx, whocares ;point to start of Hello World text mov edx, 14 ;it will be 14 bytes mov ebx, 1 ;stdout mov eax, 4 ;"write" syscal int 0x80 ;Invoke the Penguin ret ;brings us to the exit instructions
43.13913
91
0.545253
[ "MIT" ]
XlogicX/Learn
ASM_x86/skeleton.asm
4,961
Assembly
; A073059: a(n) = (1/2)*(A073504(n+1) - A073504(n)). ; 0,0,1,0,0,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,0,0 mov $17,$0 mov $19,2 lpb $19,1 clr $0,17 mov $0,$17 sub $19,1 add $0,$19 add $0,1 sub $1,$0 add $1,$0 lpb $0,1 sub $0,$1 div $0,2 mov $1,$0 div $1,2 add $10,$1 lpe mov $1,$10 mov $20,$19 lpb $20,1 mov $18,$1 sub $20,1 lpe lpe lpb $17,1 mov $17,0 sub $18,$1 lpe mov $1,$18
26.848485
501
0.488713
[ "Apache-2.0" ]
karttu/loda
programs/oeis/073/A073059.asm
886
Assembly
Music_PalletTown:: audio Music_PalletTown, Ch0, Ch1, Ch2 Music_Pokecenter:: audio Music_Pokecenter, Ch0, Ch1, Ch2 Music_Gym:: audio Music_Gym, Ch0, Ch1, Ch2 ; Viridian City, Pewter City, Saffron City Music_Cities1:: audio Music_Cities1, Ch0, Ch1, Ch2, Ch3 ; Cerulean City, Fuchsia City Music_Cities2:: audio Music_Cities2, Ch0, Ch1, Ch2 Music_Celadon:: audio Music_Celadon, Ch0, Ch1, Ch2 Music_Cinnabar:: audio Music_Cinnabar, Ch0, Ch1, Ch2 Music_Vermilion:: audio Music_Vermilion, Ch0, Ch1, Ch2, Ch3 Music_Lavender:: audio Music_Lavender, Ch0, Ch1, Ch2, Ch3 Music_SSAnne:: audio Music_SSAnne, Ch0, Ch1, Ch2 Music_MeetProfOak:: audio Music_MeetProfOak, Ch0, Ch1, Ch2 Music_MeetRival:: audio Music_MeetRival, Ch0, Ch1, Ch2 Music_MuseumGuy:: audio Music_MuseumGuy, Ch0, Ch1, Ch2, Ch3 Music_SafariZone:: audio Music_SafariZone, Ch0, Ch1, Ch2 Music_PkmnHealed:: audio Music_PkmnHealed, Ch0, Ch1, Ch2 ; Routes 1 and 2 Music_Routes1:: audio Music_Routes1, Ch0, Ch1, Ch2, Ch3 ; Routes 24 and 25 Music_Routes2:: audio Music_Routes2, Ch0, Ch1, Ch2, Ch3 ; Routes 3, 4, 5, 6, 7, 8, 9, 10, 16, 17, 18, 19, 20, 21, 22 Music_Routes3:: audio Music_Routes3, Ch0, Ch1, Ch2, Ch3 ; Routes 11, 12, 13, 14, 15 Music_Routes4:: audio Music_Routes4, Ch0, Ch1, Ch2, Ch3 ; Route 23, Indigo Plateau Music_IndigoPlateau:: audio Music_IndigoPlateau, Ch0, Ch1, Ch2, Ch3
20.58209
60
0.741117
[ "MIT" ]
AmateurPanda92/pokemon-rby-dx
audio/headers/musicheaders1.asm
1,379
Assembly
; ---------------------------------------------------------------------------------------- ; This is a simple asm function called "adder" that adds 100 and add two parameters ; as function should return an byte we use al ; ----------------------------------------------------------------------------------------- section .text global adder adder: add cl,64h ; add 100 to the first parameter add cl,dl ; add the second parameter to the first parameter + 100 mov al,cl ; returns the result with ax ret
42.833333
93
0.470817
[ "Apache-2.0" ]
afterlisp/x64callexplore
explo_cpp2_simplearith/addfunc.asm
514
Assembly
; A247049: Rectangular array read upwards by columns: T = T(n,k) = number of paths from (0,0) to (n,k), where 0 >= k <= 2, consisting of segments given by the vectors (1,1), (1,2), (1,-1). ; 1,0,0,0,1,1,1,1,1,1,2,2,2,3,3,3,5,5,5,8,8,8,13,13,13,21,21,21,34,34,34,55,55,55,89,89,89,144,144,144,233,233,233,377,377,377,610,610,610,987,987,987,1597,1597,1597,2584,2584,2584,4181,4181,4181,6765,6765,6765,10946,10946,10946,17711,17711,17711,28657,28657,28657,46368,46368,46368,75025,75025,75025,121393,121393,121393,196418,196418,196418,317811,317811,317811,514229,514229,514229,832040,832040,832040,1346269,1346269,1346269,2178309,2178309,2178309,3524578,3524578,3524578,5702887,5702887,5702887,9227465,9227465,9227465,14930352,14930352,14930352,24157817,24157817,24157817,39088169,39088169,39088169,63245986,63245986,63245986,102334155,102334155,102334155,165580141,165580141,165580141,267914296,267914296,267914296,433494437,433494437,433494437,701408733,701408733,701408733,1134903170,1134903170,1134903170,1836311903,1836311903,1836311903,2971215073,2971215073,2971215073,4807526976,4807526976,4807526976,7778742049,7778742049,7778742049,12586269025,12586269025,12586269025,20365011074,20365011074,20365011074,32951280099,32951280099,32951280099,53316291173,53316291173,53316291173,86267571272,86267571272,86267571272,139583862445,139583862445,139583862445,225851433717,225851433717,225851433717,365435296162,365435296162,365435296162,591286729879,591286729879,591286729879,956722026041,956722026041,956722026041,1548008755920,1548008755920,1548008755920,2504730781961,2504730781961,2504730781961,4052739537881,4052739537881,4052739537881,6557470319842,6557470319842,6557470319842,10610209857723,10610209857723,10610209857723,17167680177565,17167680177565,17167680177565,27777890035288,27777890035288,27777890035288,44945570212853,44945570212853,44945570212853,72723460248141,72723460248141,72723460248141,117669030460994,117669030460994,117669030460994,190392490709135,190392490709135,190392490709135,308061521170129,308061521170129,308061521170129,498454011879264,498454011879264,498454011879264,806515533049393,806515533049393,806515533049393,1304969544928657,1304969544928657,1304969544928657,2111485077978050,2111485077978050,2111485077978050,3416454622906707,3416454622906707,3416454622906707,5527939700884757,5527939700884757,5527939700884757,8944394323791464,8944394323791464,8944394323791464 mov $1,1 lpb $0 trn $0,3 mov $2,$3 add $3,$1 mov $1,$2 lpe
224.454545
2,211
0.860672
[ "Apache-2.0" ]
jmorken/loda
programs/oeis/247/A247049.asm
2,469
Assembly
; A140165: a(n) = -a(n-1) + 3*a(n-2), starting a(1)=1, a(2)=2. ; Submitted by Jamie Morken(s3) ; 1,2,1,5,-2,17,-23,74,-143,365,-794,1889,-4271,9938,-22751,52565,-120818,278513,-640967,1476506,-3399407,7828925,-18027146,41513921,-95595359,220137122,-506923199,1167334565,-2688104162,6190107857,-14254420343,32824743914,-75588004943,174062236685,-400826251514,923012961569,-2125491716111,4894530600818,-11271005749151,25954597551605,-59767614799058,137631407453873,-316934251851047,729828474212666,-1680631229765807,3870116652403805,-8912010341701226,20522360298912641,-47258391324016319 mov $2,1 lpb $0 sub $0,1 mul $1,-3 add $1,$2 add $2,$1 lpe mov $0,$2
51.076923
490
0.76506
[ "Apache-2.0" ]
ckrause/loda-programs
oeis/140/A140165.asm
664
Assembly
; A032936: Numbers whose set of base-16 digits is {1,2}. ; 1,2,17,18,33,34,273,274,289,290,529,530,545,546,4369,4370,4385,4386,4625,4626,4641,4642,8465,8466,8481,8482,8721,8722,8737,8738,69905,69906,69921,69922,70161,70162,70177,70178,74001,74002,74017,74018,74257,74258,74273,74274,135441,135442,135457,135458,135697,135698,135713,135714,139537,139538,139553,139554,139793,139794,139809,139810,1118481,1118482,1118497,1118498,1118737,1118738,1118753,1118754,1122577,1122578,1122593,1122594,1122833,1122834,1122849,1122850,1184017,1184018,1184033,1184034 mov $2,$0 add $2,1 mov $6,$0 lpb $2 mov $0,$6 sub $2,1 sub $0,$2 seq $0,135521 ; a(n) = 2^(A091090(n)) - 1. mov $3,$0 add $3,1 mov $4,1 add $4,$3 sub $4,1 pow $4,4 mov $5,$4 div $5,240 mul $5,14 add $5,1 add $1,$5 lpe mov $0,$1
32.56
497
0.707617
[ "Apache-2.0" ]
ckrause/loda-programs
oeis/032/A032936.asm
814
Assembly
; A277864: Binary representation of the x-axis, from the left edge to the origin, of the n-th stage of growth of the two-dimensional cellular automaton defined by "Rule 3", based on the 5-celled von Neumann neighborhood. ; 1,1,1,1101,1,111101,1,11111101,1,1111111101,1,111111111101,1,11111111111101,1,1111111111111101,1,111111111111111101,1,11111111111111111101,1,1111111111111111111101,1,111111111111111111111101,1,11111111111111111111111101,1,1111111111111111111111111101,1,111111111111111111111111111101,1,11111111111111111111111111111101,1,1111111111111111111111111111111101,1,111111111111111111111111111111111101,1,11111111111111111111111111111111111101,1,1111111111111111111111111111111111111101,1 mov $1,$0 gcd $1,2 sub $1,1 gcd $0,$1 mov $2,10 pow $2,$0 mov $0,$2 div $0,990 mul $0,1100 add $0,1
57.5
482
0.831056
[ "Apache-2.0" ]
ckrause/loda-programs
oeis/277/A277864.asm
805
Assembly
; A324293: a(n) = A002487(sigma(n)). ; Submitted by Jon Maiga ; 1,2,1,3,2,2,1,4,5,4,2,3,3,2,2,5,4,10,3,8,1,4,2,4,5,8,3,3,4,4,1,6,2,8,2,19,7,4,3,12,8,2,5,8,10,4,2,5,10,16,4,9,8,4,4,4,3,12,4,8,5,2,5,7,8,4,5,6,2,4,4,20,11,10,5,9,2,8,3,16,13,6,8,3,8,6,4,12,12,18,3,8,1,4,4,6,9,34,10,27 seq $0,203 ; a(n) = sigma(n), the sum of the divisors of n. Also called sigma_1(n). seq $0,2487 ; Stern's diatomic series (or Stern-Brocot sequence): a(0) = 0, a(1) = 1; for n > 0: a(2*n) = a(n), a(2*n+1) = a(n) + a(n+1).
72.142857
219
0.570297
[ "Apache-2.0" ]
ckrause/loda-programs
oeis/324/A324293.asm
505
Assembly
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r13 push %r14 push %r15 push %rbp push %rcx push %rdi push %rsi lea addresses_WC_ht+0x1eb55, %r15 nop nop nop nop nop add %r14, %r14 mov $0x6162636465666768, %rsi movq %rsi, %xmm5 and $0xffffffffffffffc0, %r15 movntdq %xmm5, (%r15) nop nop nop nop xor $37105, %rbp lea addresses_A_ht+0x14fd5, %r13 nop nop cmp %rdi, %rdi movb (%r13), %r10b nop nop nop nop nop and $16161, %rsi lea addresses_UC_ht+0x1a7f5, %r13 nop nop nop nop nop sub $14419, %r10 movups (%r13), %xmm0 vpextrq $0, %xmm0, %rbp add %r15, %r15 lea addresses_WC_ht+0x14f55, %rsi nop nop nop nop nop dec %r10 mov (%rsi), %r15d nop nop nop nop xor %r13, %r13 lea addresses_WC_ht+0x1bad5, %r10 add $35940, %r14 mov (%r10), %r13d nop nop nop nop nop and $57773, %r13 lea addresses_D_ht+0x12f55, %r14 nop nop nop sub %rbp, %rbp movb $0x61, (%r14) nop nop xor $8721, %r10 lea addresses_UC_ht+0xba55, %rsi lea addresses_WC_ht+0x6d01, %rdi clflush (%rdi) nop nop nop xor $49215, %r14 mov $80, %rcx rep movsb xor $59021, %rdi lea addresses_normal_ht+0xd85, %r10 dec %rdi movw $0x6162, (%r10) nop nop add %rdi, %rdi lea addresses_normal_ht+0x5d30, %rsi nop add %r10, %r10 movups (%rsi), %xmm0 vpextrq $1, %xmm0, %r15 nop nop nop nop xor %r14, %r14 pop %rsi pop %rdi pop %rcx pop %rbp pop %r15 pop %r14 pop %r13 pop %r10 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r13 push %r14 push %r8 push %rdx // Faulty Load lea addresses_UC+0x15755, %rdx and %r8, %r8 mov (%rdx), %r11d lea oracles, %r14 and $0xff, %r11 shlq $12, %r11 mov (%r14,%r11,1), %r11 pop %rdx pop %r8 pop %r14 pop %r13 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_UC', 'AVXalign': False, 'congruent': 0, 'size': 1, 'same': False, 'NT': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_UC', 'AVXalign': False, 'congruent': 0, 'size': 4, 'same': True, 'NT': False}} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 10, 'size': 16, 'same': True, 'NT': True}} {'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 5, 'size': 1, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 5, 'size': 16, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'AVXalign': True, 'congruent': 11, 'size': 4, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 7, 'size': 4, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 10, 'size': 1, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 4, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 0, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 3, 'size': 2, 'same': True, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 0, 'size': 16, 'same': False, 'NT': False}} {'00': 21829} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
38.534591
2,999
0.657581
[ "MIT" ]
danielmgmi/medusa
Transynther/_processed/NONE/_zr_/i7-7700_9_0x48.log_21829_100.asm
6,127
Assembly
; A057068: floor[6^6/n]. ; 46656,23328,15552,11664,9331,7776,6665,5832,5184,4665,4241,3888,3588,3332,3110,2916,2744,2592,2455,2332,2221,2120,2028,1944,1866,1794,1728,1666,1608,1555,1505,1458,1413,1372,1333,1296,1260,1227,1196,1166,1137 add $0,1 mov $1,46656 div $1,$0 mov $0,$1
34.875
210
0.741935
[ "Apache-2.0" ]
ckrause/cm
programs/oeis/057/A057068.asm
279
Assembly
<% from pwnlib.shellcraft.aarch64.linux import syscall %> <%page args="timerid"/> <%docstring> Invokes the syscall timer_getoverrun. See 'man 2 timer_getoverrun' for more information. Arguments: timerid(timer_t): timerid </%docstring> ${syscall('SYS_timer_getoverrun', timerid)}
21.071429
89
0.732203
[ "MIT" ]
FDlucifer/binjitsu
pwnlib/shellcraft/templates/aarch64/linux/timer_getoverrun.asm
295
Assembly
;; -*- tab-width: 4 -*- bits 32 extern _PackedData extern _Models extern _HashTable extern _UnpackedData extern _HashTableSize extern _VirtualSize extern _ImageBase global _header global _DepackEntry global _LinkerVersionPtr global _SubsystemTypePtr global _ModelSkipPtr global _BaseProbPtr global _SpareNopPtr global _CharacteristicsPtr global _SaturatePtr global _SaturateAdjust1Ptr global _SaturateAdjust2Ptr global _NumberOfDataDirectoriesPtr global _ExportTableRVAPtr HASH_MULTIPLIER equ 111 BaseProbDummy equ 10 ModelSkipDummy equ 23 zero_offset equ 20 one_offset equ 16 section header align=1 _header: ; DOS header db 'M', 'Z' _LinkerVersionPtr: dw 0 ; COFF header db 'P', 'E', 0, 0 ; PE signature dw 0x014C ; Machine, 386+ dw 0 ; Number of sections ; 12 bytes: ; Timestamp ; Symbol table pointer ; Number of symbols ModelEnd: add ebx, ebx ; Put decoded bit in carry ;2 popa ;1 jg short AritDecode ;2 WriteBit: rcl byte[edi], 1 ; Shift the decoded bit in ;2 jnc short _DepackEntry ; Finished the byte? ;2 inc edi ;1 jmp short WriteBit ; New byte = 1 ;2 dw 8 ; Size of optional header _CharacteristicsPtr: dw 2 ; Characteristics ; (bit 1 must be set, bit 13 must be clear) ; Optional header (PE-header) dw 0x010B ; Magic (Image file) ; 18 bytes: ; Major/Minor linker version ; Size of code ; Size of initialized data ; Size of uninitialized data ; Entry point AritDecodeLoop2: adc ecx, ecx ; Shift bit in ;2 inc ebp ; Next bit ;1 AritDecode: test eax, eax ; Test sign ;2 jns short AritDecodeLoop; Loop while msb of interval == 0 ;2 add ebx, edx ; ebx = p0 + p1 ;2 push eax ; Push interval_size ;1 mul edx ; edx:eax = p0 * interval_size ;2 nop ;1 cmp eax, strict dword DepackInit-_header ;5 ; 8 bytes: ; Base of code ; Base of data div ebx ; eax = (p0 * interval_size) / (p0 + p1);2 ; eax = threshold value between 0 and 1 cmp ecx, eax ; data < threshold? ;2 sbb ebx, ebx ; ebx = -cf = -bit ;2 jmp short AritDecode3 ;2 dd _ImageBase ; Image base dd 4 ; Section alignment (and PE header offset) dd 4 ; File alignment (on disk) ; 12 bytes: ; Major/minor OS version ; Major/minor image version ; Major/minor subsystem version AritDecodeLoop: bt [_PackedData], ebp ; Test bit ;7 db 0x8D ; Shift interval: lea eax, [eax*2] ;1 dw 4 ; Major subsystem version ;2 jmp short AritDecodeLoop2 ;2 dd 0 ; Reserved (Must be 0) ModelEndJumpPad: dd _VirtualSize + 0x2B6EB; Size of image (and jmp short ModelEnd) dd 64 ; Size of headers ; (must be <= entrypoint on Win8+, and at least 44 on WinXP) ; 4 bytes: ; Checksum DepackInit: push ebx ; ebx = PEB ;1 xor ebp, ebp ; ebp = 0 ;2 db 0xBB ; mov ebx, const ;1 _SubsystemTypePtr: dw 2 ; Subsystem dw 0 ; DLL characteristics ; 16 bytes: ; Size of stack reserve ; Size of stack commit ; Size of heap reserve ; Size of heap commit ; (must all have reasonable sizes, since these are allocated) nop ; 90 ;1 mov esi, _Models ; BE 7C 01 40 00 ;5 push byte 1 ; 6A 01 ;2 pop eax ; 58 ;1 mov edi, _UnpackedData ; BF 00 00 42 00 ;5 mov cl, 0 ; B1 00 ;2 ; 4 bytes: ; Loader flags _SpareNopPtr: nop ; push edi when using call transform ;1 push edi ;1 ; Initialized state: ; edi = _UnpackedData ; esi = _Models ; ebp = 0 ; ecx = 0 ; eax = 1 ; ebx = subsystem version ; Stack: _UnpackedData (twice when using call transform), PEB jmp short _DepackEntry ;2 _NumberOfDataDirectoriesPtr: dd 0 ; Number of RVAs and Sizes ; Data directories _ExportTableRVAPtr: dd 0 ; Export Table RVA ; 4 bytes: ; Export Table Size AritDecode3: pop edx ; edx = interval_size ;1 jb short .zero ;2 ;one xchg eax, edx ; eax = interval_size, edx = threshold ;1 ; 4 bytes: ; Import Table RVA (must point to valid, zeroed memory) sub ecx, edx ; data -= threshold ;2 add al, 0 ; 04 00 ;2 ; 8 bytes: ; Import Table Size ; Resource Table RVA sub eax, edx ; eax = interval_size - threshold ;2 .zero: ; ebx = -bit ; ecx = new data ; eax = new interval size _DepackEntry: EndCheck: pusha ;1 lodsd ;1 add eax, edi ;2 je short InitHash ; block_end == unpacked_byte_offset ;2 ; carry = 1 ; 36 bytes: ; Resource Table Size ; Exception Table RVA ; Exception Table Size ; Certificate Table RVA ; Certificate Table Size ; Base Relocation Table RVA ; Base Relocation Table Size ; Debug RVA ; Debug Size (must be 0) Model: ; Find probs from model ; If ebx is 0 or 1, ; update model with bit value in ebx push byte BaseProbDummy ;2 BaseProbPtrP1: pop edx ;1 ; Take advantage of the fact that base prob is always 10 ; mov [esp+zero_offset], edx mov [esp+edx*2], edx ;3 mov [esp+one_offset], edx ;4 ; Init weight lodsd ; Model weight shift mask ;1 xor ebp, ebp ; weight = 0 ;2 ModelLoop: dec ebp ; weight-- ;1 IncreaseWeight: inc ebp ; weight++ ;1 add eax, eax ; Check next bit in model weight mask ;2 jc short IncreaseWeight ;2 jz short ModelEndJumpPad ;2 pusha ;1 lodsb ; Model mask ;1 mov dl, al ; dl = mask ;2 .hashloop: xor al, [edi] ;2 imul eax, byte HASH_MULTIPLIER ;3 add al, [dword edi + 0] ;6 dec eax .next: dec edi ; Next byte add dl, dl ; Hash byte? jc short .hashloop jnz short .next ; cf = 0 ; zf = 1 InitHash: mov edi, _HashTable mov ecx, _HashTableSize jnc short UpdateHash _ClearHash: rep stosw or al, [esi] popa lea esi, [esi + ModelSkipDummy] ModelSkipPtrP1: jpo short EndCheck ret UpdateHash: div ecx ; edx = hash lea edi, [edi + edx*2] ; edi = hashTableEntry ; Calculate weight mov ecx, ebp ; ecx = weight xor eax, eax ; eax = 0 scasb je short .boost add [edi], al jne short .notboost .boost: inc ecx inc ecx .notboost: ; Add probs .bits: movzx edx, byte [edi + eax] shl edx, cl add [esp + 8*4 + zero_offset + eax*4], edx dec eax jp short .bits ; eax = -1 test ebx, ebx jg short SkipUpdate SaturateAdjust1PtrP1: ; Half if > 1 shr byte [edi + ebx], 1 jnz short .nz rcl byte [edi + ebx], 1 .nz: ; Inc correct bit not ebx inc byte [edi + ebx] _SaturatePtr: ; Saturation code inserted here when the /SATURATE option is used: ; jnz .nowrap ; dec byte [edi + ebx] ;.nowrap: SkipUpdate: popa inc esi ; Next model jmp short ModelLoop SaturateAdjust2PtrP1: _ModelSkipPtr equ ModelSkipPtrP1-1 _BaseProbPtr equ BaseProbPtrP1-1 _SaturateAdjust1Ptr equ SaturateAdjust1PtrP1-1 _SaturateAdjust2Ptr equ SaturateAdjust2PtrP1-1
23.369427
68
0.607114
[ "BSD-3-Clause" ]
LeStahL/Crinkler
source/Crinkler/modules/header20.asm
7,338
Assembly
; c definition of memory mapped register SECTION code_clib PUBLIC _MM_FFFC defc _MM_FFFC = 0xfffc
12.625
40
0.80198
[ "BSD-2-Clause" ]
ByteProject/Puddle-BuildTools
FictionTools/z88dk/libsrc/_DEVELOPMENT/arch/sms/registers/z80/mm_fffc.asm
101
Assembly
; Stub for the TI 82 calculator ; ; Stefano Bodrato - Dec 2000 ; ; $Id: ti82_crt0.asm,v 1.31 2016-07-11 05:58:34 stefano Exp $ ; ;----------------------------------------------------- ; Some general PUBLICs and EXTERNs needed by the assembler ;----------------------------------------------------- MODULE Ti82_crt0 EXTERN _main ; No matter what set up we have, main is ; always, always external to this file. PUBLIC cleanup ; used by exit() PUBLIC l_dcal ; used by calculated calls = "call (hl)" PUBLIC cpygraph ; TI calc specific stuff PUBLIC tidi ; PUBLIC tiei ; ;------------------------- ; Begin of (shell) headers ;------------------------- defc crt0 = 1 INCLUDE "Ti82.def" ; ROM / RAM adresses on Ti82 INCLUDE "zcc_opt.def" ; Receive all compiler-defines defc CONSOLE_ROWS = 8 defc TAR__clib_exit_stack_size = 3 defc TAR__register_sp = -1 defc __CPU_CLOCK = 6000000 INCLUDE "crt/classic/crt_rules.inc" ;OS82Head: ; defb $FE,$82,$0F ; ;AshHead: ; defb $D9,$00,$20 ; ;CrASHhead: ; defb $D5,$00,$11 ;------------------- ;1 - CrASH (default) ;------------------- org START_ADDR-3 DEFB $D5,$00,$11 ; org START_ADDR DEFINE NEED_name INCLUDE "zcc_opt.def" UNDEFINE NEED_name IF !DEFINED_NEED_name defm "Z88DK Small C+ Program" ENDIF defb $0 ; Termination zero ;------------------------------------- ; End of header, begin of startup part ;------------------------------------- start: ld (start1+1),sp INCLUDE "crt/classic/crt_init_sp.asm" INCLUDE "crt/classic/crt_init_atexit.asm" call crt0_init_bss ld (exitsp),sp IF DEFINED_USING_amalloc INCLUDE "crt/classic/crt_init_amalloc.asm" ENDIF EXTERN fputc_cons ld hl,12 push hl call fputc_cons pop hl IF DEFINED_GRAYlib INCLUDE "target/ti82/classic/gray82.asm" ELSE INCLUDE "target/ti82/classic/intwrap82.asm" ENDIF im 2 call _main cleanup: ; exit() jumps to this point start1: ld sp,0 ; writeback ld iy,_IY_TABLE ; Restore flag-pointer im 1 tiei: ei IF DEFINED_GRAYlib cpygraph: ; little opt :) ENDIF tidi: ret ;---------------------------------------- ; End of startup part, routines following ;---------------------------------------- l_dcal: jp (hl) IF !DEFINED_GRAYlib defc cpygraph = CR_GRBCopy ; CrASH FastCopy ENDIF defc ansipixels = 96 IF !DEFINED_ansicolumns defc DEFINED_ansicolumns = 1 defc ansicolumns = 32 ENDIF INCLUDE "crt/classic/crt_runtime_selection.asm" INCLUDE "crt/classic/crt_section.asm" SECTION code_crt_init ld hl,GRAPH_MEM ld (base_graphics),hl
20.574803
61
0.601225
[ "BSD-2-Clause" ]
ByteProject/Puddle-BuildTools
FictionTools/z88dk/lib/target/ti82/classic/ti82_crt0.asm
2,613
Assembly
; A009985: Powers of 41. ; 1,41,1681,68921,2825761,115856201,4750104241,194754273881,7984925229121,327381934393961,13422659310152401,550329031716248441,22563490300366186081,925103102315013629321,37929227194915558802161,1555098314991537910888601,63759030914653054346432641,2614120267500775228203738281,107178930967531784356353269521,4394336169668803158610484050361,180167782956420929503029846064801,7386879101213258109624223688656841,302862043149743582494593171234930481 mov $1,41 pow $1,$0 mov $0,$1
71.571429
444
0.904192
[ "Apache-2.0" ]
ckrause/cm
programs/oeis/009/A009985.asm
501
Assembly
; A348724: Decimal expansion of the absolute value of one of the negative roots of Shanks' simplest cubic associated with the prime p = 19. ; Submitted by Christian Krause ; 2,2,1,8,7,6,1,6,2,2,6,3,1,9,0,9,3,4,2,6,6,6,8,0,0,5,0,1,8,5,0,5,0,6,1,5,5,9,9,1,9,5,4,9,4,4,0,7,7,5,2,7,3,3,6,0,0,9,1,5,1,0,8,4,9,0,9,8,5,2,4,2,8,4,1,4,9,6,9,2,0,8,7,2,1,9,9,1,6,9,6,4,5,1,1,0,3,3,2,2 add $0,1 mov $3,$0 mul $3,4 mov $5,1 lpb $3 add $6,$2 add $1,$6 mul $2,2 add $2,$1 mov $1,$5 sub $3,1 add $5,$2 add $2,$1 lpe mov $4,10 pow $4,$0 div $2,$4 div $1,$2 mov $0,$1 mod $0,10
23.08
201
0.580589
[ "Apache-2.0" ]
ckrause/loda-programs
oeis/348/A348724.asm
577
Assembly
; A329510: Expansion of (1 + x)*(1 + x + x^2)*(1 + x^2 - x^3) / (1 - x). ; 1,3,6,8,8,7,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6 mov $4,2 mov $9,$0 lpb $4 mov $0,$9 sub $4,1 add $0,$4 sub $0,1 mov $2,$0 mul $0,5 trn $0,7 mul $2,2 mov $5,1 lpb $2 lpb $5 mov $5,0 mov $6,2 lpe mov $2,$6 mov $3,$6 lpb $6 add $2,8 sub $6,$3 lpe sub $2,1 lpe add $2,$0 mov $7,$2 mov $8,$4 lpb $8 mov $1,$7 sub $8,1 lpe lpe lpb $9 sub $1,$7 mov $9,0 lpe add $1,1 mov $0,$1
15.44186
171
0.441265
[ "Apache-2.0" ]
ckrause/cm
programs/oeis/329/A329510.asm
664
Assembly
RRA ADDAC RES0D SET4mHL LDDmHL BIT3L LDED ADCAD RES2D ORH LDEC XORA INCL RES7C LDmHLH INCL RLCmHL LDEL LDEC BIT0L SET0mHL LDCA LDBC RES4L RLL RES1H SCF LDEmHL SRAL RES4mHL LDHD RES4A SRAmHL RRCC SET4mHL BIT5D LDmHLL BIT2C RES7H XORE DECA LDLL ANDL CPH LDDE CPB RRD SLAD RRA LDHD SET2C LDLn LDAH LDLE LDHA LDEn BIT3E BIT0D BIT2L LDLH BIT2C LDDE SWAPL LDAmHL BIT1C INCD SET2H XORn XORA RLD BIT5H BIT5L INCE LDDmHL ORA LDHL LDAA LDCD SET6E RES2E ANDmHL LDmHLB DECH BIT1H RRCE LDAE RES3B ADCAH ORmHL SWAPL LDAC SET1B XORE RES3L LDEmHL BIT2E BIT7L ANDD SRLB LDCB RES4H XORE BIT0A LDCB BIT4D ADDAH BIT0mHL SET3L BIT4L SLAL SET4mHL RES5H LDmHLC ORB LDCD LDLL LDEA ADCAB LDmDEA RES4mHL SLAA BIT0H ORC BIT2H LDBL RES7D SWAPD LDLB LDAmBC ORn CPE BIT4mHL LDCn ANDD BIT6D SRAC BIT2H BIT5B SET2H BIT0B DECD SET6A LDmBCA LDHB LDCD SLAH BIT1D RES2E LDHmHL RES3mHL ORmHL ADCAC LDAmBC LDDE ORL RES5B LDHH LDAmDE RES1mHL ADDAB XORB SET6C INCB ADCAn LDEB RES0B LDEE LDAA SWAPC RES6B LDLL LDEL LDHL BIT7H ADCAn LDAH LDDA RES2B RLC RES5L BIT1B LDAC SWAPL ANDB LDHC LDLmHL SET5A SET5B ADDAmHL BIT6A RES7L SET0mHL SET6A SET5mHL RES3A ADDAD DECA SET6B LDAL XORC BIT5A BIT4D SRLmHL BIT2B BIT4mHL RES7L LDBL LDDEnn CPB RES0H CPE INCE SET1E SET2L ANDL BIT4B CPH LDDD BIT1H LDDEnn ANDD BIT4H LDCn RRmHL LDDA SET5B SRAA LDCmHL RES5B SRAL INCE RES0mHL LDBL INCD SRLC RES2A SET5B SET3D LDCH CCF RRH SRLH CPC ADDAH RES5C RES1D RES3C SET1E ORn ADCAL ADDAA SET7E RES7D LDBD SET3mHL RES0mHL LDCn RLCE RES2C SET3E INCB SET2B BIT2E BIT2B LDAL SRAA BIT4D ADDAmHL ORE SRAC BIT5C ANDmHL BIT5H RES4D CPA SWAPA ANDB LDEH BIT4A ADDAH ORE CPD RLA INCL INCC ANDB BIT2E LDBL RES4E RLC ANDE BIT1A SLAD BIT5A LDEA LDAmHL LDDmHL LDBA LDAL SRAA SET7L LDmHLD SET0H BIT1L RRD RRCA LDmHLA BIT0H RES5A LDBE RES0A NOT LDEH SET6mHL RES0mHL LDmHLE LDDL RES1E BIT6H ADCAC ADDAH BIT6mHL RES6A INCH SRAA RES2C RRCD RES1L BIT1E LDHC XORE DECL RES5C NOT LDBE LDCA XORn RES1D XORn LDCD RES2A RES0D RES2H ORmHL BIT7C RRCB RLCL SET4C RES2B XORE DECH BIT6D SET7D RRE CPA LDmHLH LDEE RES2C LDBn LDAE SET3D LDBH RRL SET5mHL BIT2H LDLB LDLC BIT7B LDLA RLCA BIT0H RES5L ADDAE ADCAB NOP INCB LDDH ADDAC ADDAmHL BIT5A XORB LDLmHL SET6L CPD RES1A LDED CPA NOT BIT0H DECA RRCE SWAPmHL ANDB INCA RES2mHL SRLH SET0C BIT0mHL RES1A RES0mHL LDBmHL SET0H DECC BIT0D RES0mHL RES5A BIT6A ANDH RES4L LDLH SET2B ORmHL INCA BIT6E LDBL RES1H ADCAE RES4E RRCB LDBH DECA ANDC BIT5mHL BIT4mHL BIT2C LDBA ADCAmHL RES3H BIT5C LDED SET7H SET2E SET6A RES4D ORA RES5B ADCAC LDBB RLmHL LDDH LDEmHL SRAA SET7H RES1B RLCmHL XORB SRLC LDBL LDmHLD RES6A LDLn LDAmBC ANDE RRA ORE BIT3D LDED SWAPmHL INCH ADCAE INCH LDBmHL ADCAn LDBH LDCC CPA LDAC RES1mHL RES7C ANDL RES3L ADCAmHL BIT1C RES7H SRAA LDDB BIT1B RRA SLAC BIT2B ADDAC ADCAD SRAH DECC LDEn ADDAn RLCB ANDL SCF LDAD LDmHLB RLCH SET6C RES1A LDLn ADCAn XORB LDHA ADDAA LDAL RLCA LDEC LDAn LDHLnn SET5C SET1E BIT5L RLCD ADDAmHL LDAC RES4D SWAPB BIT5mHL ADDAn LDEC SRAH LDAE DECE LDCB SET5H ADDAmHL SET2C LDHB RES0A RRE BIT2E ANDH SET0B ADDAA LDCE ANDC LDDH INCL XORB NOP LDLB LDED ANDH ADCAmHL SET6mHL SET7L RLCE SLAB CCF SET1mHL RRCD BIT0L BIT5L ADCAB RES1D INCH SET3E LDDL BIT5L RES0L SET0D RES3A ADDAH DECB RES3mHL SRAmHL LDCn ORD SET6H RES0L RES6mHL CPC LDDA RES6H RES1B RES0D BIT6C LDAmBC SWAPE SRLmHL SET5H BIT2E SRAmHL RES1A BIT3H RRA CPE LDBD RES0L ADCAn LDAA SET5L ADDAH SET2H SET0H LDEH NOP SET5L LDEL RES3D SET4D LDBA ANDH RLCA XORC LDHD RRA ADCAD SET1A SET6B ANDC CPA BIT3L ADCAL SET4A RES0A LDmHLD LDLB ADDAL ANDL XORC BIT4L CPB ORL BIT6H LDBmHL RRCC SET7H BIT4L ADDAn LDEH SET2mHL SRAC ANDE LDDH SET1L DECA BIT5B ORD RES5B SRLL LDBH LDDE BIT6D BIT5A LDHD LDHE RES1D ORB RRD ADCAL RES4L BIT7H RES1H SET5A BIT5L LDBmHL RES5B SET2E BIT5A ANDn LDCC XORH RES1A BIT3C RES7L LDED RES3C SLAC SRAH ORH SET6L LDmDEA RRCL CPE RLCA SET0L RES7L RES7L LDLmHL LDLE CPD LDLn LDLB SET3D LDAE ADCAL INCL RES4C BIT7B LDLn SRAL LDAC BIT7E LDHmHL RLC CPD CPH SET0E ADDAD LDBmHL SET1E ADDAA ORB SET2B RES0L LDDA BIT4A RES0A SET5L SWAPC SET0E ANDA LDLmHL DECE CPH BIT6B LDDEnn ORD LDAmBC RES5L SET1H LDHn RRCB BIT4B RRCmHL SET0C BIT0D BIT6mHL XORE BIT2A BIT0C ORA RLCH SET5A ORH LDDn XORH RRL XORA RES7D LDLH LDAA BIT1L LDEH ADDAA LDDD LDED BIT0E LDEB XORn ORmHL LDEC RES2L BIT6A ANDC SET4A RES6C SET6C SET5E SWAPH DECC CPL RES7A INCB BIT6L LDBL LDBH LDBn ADDAmHL LDAL SLAmHL SLAH LDDEnn LDEB RES5mHL LDHmHL BIT5A RES6L BIT1H LDAL SET2E SRAH ADDAD LDCA BIT1E BIT2D LDCD NOP LDmHLA LDmHLC LDLE SET7mHL ADCAE LDLn SET6L RES3L RRB SET5L SET2H RES3L ADDAn SET7B LDEA CPH BIT1D SET3A LDDmHL SET6D BIT0A BIT6C SET0D LDDC RES0H SET7mHL RES1L RLC LDBC SET4L ADCAD LDBmHL LDDE ORH BIT3mHL SET4L BIT1D SET2B ANDD LDHmHL LDAD LDEL SET4L RRCC SET1B LDmHLL RES6D LDBmHL LDEC RES5mHL ORB SET2D XORn DECA LDAE INCC LDmHLC LDBH SLAH DECE RES2E LDEB RES1B ANDB SET2A RLCB RES2B ANDA SET6D ADCAE SWAPD SET2D SRLL ADDAD RES4mHL RES2A SRLD LDmBCA BIT0mHL RES6C SET3L BIT1D RES0mHL LDAC BIT2A ADCAH CPA LDLB ADCAL LDLB BIT0C SET2H ADCAB BIT3B RRA SRAL LDHmHL LDAn LDLH ANDE BIT6H LDmHLE LDAD LDEL BIT5L ADDAB XORH SET7H CPA LDDEnn BIT2L SRLE BIT7D SLAC BIT2D LDCD ORA BIT1L ORL BIT5C RES7mHL ADCAn LDEA RES1A LDBE SET3mHL LDAC ORmHL RES3B ORH INCA RES3E RES3L RES4B SET3D BIT5L LDDC SET0D SLAB ADDAE DECA LDDA LDLB ADCAn XORH LDBB LDmHLB LDDEnn XORmHL DECL BIT7C XORA LDHmHL LDDD RLA SET5A SET4L SET0E SLAL RRCD ADDAH SET3A SRLL RLCB LDAH LDCL BIT0D LDDL XORC RRCA RES1D ANDH LDDC BIT1E SLAH LDDEnn LDBL RLA RRCC SET1C DECL CPA RES2A BIT1E RRD ADCAA ANDE BIT1D LDCE LDEC SCF RLCL CPB ANDn LDCH LDHD LDDE RES2C SET4B RES0B ANDC SLAA SWAPL LDHLnn ANDA BIT4D ADCAB RRCD RES4D SLAH ORmHL RES3D DECB LDAE BIT0D BIT2C ORmHL STOP
6.631107
8
0.698692
[ "MIT" ]
grantsimmons/GameBuddy-Verilog
scripts/oldstims/old_rand.asm
6,651
Assembly
; A182627: Total number of digits in binary expansion of all divisors of n. ; 1,3,3,6,4,8,4,10,7,10,5,15,5,10,10,15,6,17,6,18,11,12,6,24,9,12,12,18,6,24,6,21,13,14,13,30,7,14,13,28,7,26,7,21,20,14,7,35,10,21,14,21,7,28,14,28,14,14,7,42,7,14,21,28,15,30,8,24,15,30,8,46,8,16,22,24,15,30,8,40,19,16,8,45,16,16,15,32,8,46,15,24,15,16,16,48,8,23,24,36 add $0,1 mov $2,$0 lpb $0 mov $3,$2 mov $4,$0 cmp $4,1 add $0,$4 dif $3,$0 cmp $3,$2 cmp $3,0 mul $3,$0 sub $0,1 lpb $3 add $1,1 div $3,2 lpe lpe add $1,1 mov $0,$1
23.652174
271
0.584559
[ "Apache-2.0" ]
ckrause/cm
programs/oeis/182/A182627.asm
544
Assembly
; size_t b_array_erase(b_array_t *a, size_t idx) SECTION code_clib SECTION code_adt_b_array PUBLIC b_array_erase EXTERN asm_b_array_erase b_array_erase: pop af pop bc pop hl push hl push bc push af jp asm_b_array_erase ; SDCC bridge for Classic IF __CLASSIC PUBLIC _b_array_erase defc _b_array_erase = b_array_erase ENDIF
12.37931
48
0.754875
[ "BSD-2-Clause" ]
ByteProject/Puddle-BuildTools
FictionTools/z88dk/libsrc/_DEVELOPMENT/adt/b_array/c/sccz80/b_array_erase.asm
359
Assembly
.global s_prepare_buffers s_prepare_buffers: push %r12 push %r13 push %r15 push %rbx push %rcx push %rdi push %rdx push %rsi lea addresses_A_ht+0x5f7f, %r12 nop nop nop nop add $15519, %rdx movw $0x6162, (%r12) add $7886, %r15 lea addresses_UC_ht+0xdcbf, %rbx nop nop nop nop nop cmp $2574, %r13 mov $0x6162636465666768, %rdx movq %rdx, %xmm5 movups %xmm5, (%rbx) nop nop nop and %rdx, %rdx lea addresses_UC_ht+0x1c8ff, %rsi lea addresses_WT_ht+0x137bf, %rdi nop nop nop nop xor %r12, %r12 mov $127, %rcx rep movsb nop nop dec %rcx lea addresses_UC_ht+0x182bf, %rsi lea addresses_normal_ht+0xb4f, %rdi clflush (%rdi) nop xor %r15, %r15 mov $46, %rcx rep movsb cmp %rdi, %rdi lea addresses_A_ht+0x1cbf, %rsi lea addresses_normal_ht+0x76ff, %rdi nop nop dec %r15 mov $40, %rcx rep movsb nop xor $36419, %rcx lea addresses_D_ht+0x1463f, %rsi lea addresses_A_ht+0x51a7, %rdi nop nop nop nop nop add $43090, %rbx mov $124, %rcx rep movsb nop cmp $19999, %r15 pop %rsi pop %rdx pop %rdi pop %rcx pop %rbx pop %r15 pop %r13 pop %r12 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r12 push %r13 push %r14 push %rcx push %rdi push %rsi // Store lea addresses_RW+0x1fe09, %r10 clflush (%r10) nop nop nop nop xor $44417, %r12 movb $0x51, (%r10) nop nop nop xor %r13, %r13 // REPMOV mov $0xbbf, %rsi lea addresses_D+0x3ed7, %rdi nop sub %r11, %r11 mov $4, %rcx rep movsb nop nop and $8308, %r12 // Faulty Load mov $0x7f94380000000abf, %r13 nop nop nop xor $41061, %r10 mov (%r13), %esi lea oracles, %rdi and $0xff, %rsi shlq $12, %rsi mov (%rdi,%rsi,1), %rsi pop %rsi pop %rdi pop %rcx pop %r14 pop %r13 pop %r12 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_NC', 'same': False, 'size': 32, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_RW', 'same': False, 'size': 1, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_P', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_D', 'congruent': 2, 'same': False}, 'OP': 'REPM'} [Faulty Load] {'src': {'type': 'addresses_NC', 'same': True, 'size': 4, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'dst': {'type': 'addresses_A_ht', 'same': False, 'size': 2, 'congruent': 5, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_UC_ht', 'same': False, 'size': 16, 'congruent': 7, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_UC_ht', 'congruent': 6, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 4, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_UC_ht', 'congruent': 10, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 3, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_A_ht', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 6, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_D_ht', 'congruent': 7, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 3, 'same': False}, 'OP': 'REPM'} {'00': 21829} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
38.301887
2,999
0.660263
[ "MIT" ]
danielmgmi/medusa
Transynther/_processed/NC/_zr_/i3-7100_9_0x84_notsx.log_21829_1652.asm
6,090
Assembly
; A337897: Number of achiral colorings of the 8 triangular faces of a regular octahedron or the 8 vertices of a cube using n or fewer colors. ; Submitted by Jamie Morken(s4) ; 1,21,201,1076,4025,11901,29841,66256,134001,251725,445401,750036,1211561,1888901,2856225,4205376,6048481,8520741,11783401,16026900,21474201,28384301,37055921,47831376,61100625,77305501,96944121 add $0,1 pow $0,2 mov $1,$0 bin $0,2 add $0,2 mul $1,6 add $1,10 mul $0,$1 div $0,12 sub $0,1
31
195
0.763441
[ "Apache-2.0" ]
ckrause/loda-programs
oeis/337/A337897.asm
465
Assembly
SECTION code_fp_am9511 PUBLIC cam32_sdcc_cos EXTERN asm_am9511_cos defc cam32_sdcc_cos = asm_am9511_cos
12
36
0.861111
[ "Unlicense" ]
drunkfly/gamemyx
Tools/z88dk/libsrc/_DEVELOPMENT/math/float/am9511/c/sdcc/cam32_sdcc_cos.asm
108
Assembly
Map_22119A_: dc.w Frame_2211A6-Map_22119A_ ; ... dc.w Frame_2211B4-Map_22119A_ dc.w Frame_2211D4-Map_22119A_ dc.w Frame_2211F4-Map_22119A_ dc.w Frame_221214-Map_22119A_ dc.w Frame_22122E-Map_22119A_ Frame_2211A6: dc.w 2 dc.b $C0, $B, 0, 0, 0, 8 dc.b $E0, $F, 0, $C, 0, 0 Frame_2211B4: dc.w 5 dc.b $A0, $F, 0,$1C, 0,$13 dc.b $C0, $B, 0,$2C, 0, 8 dc.b $C0, $B, 0,$38, 0,$20 dc.b $E0, $F, 0,$44, 0, 0 dc.b $E0, $F, 0,$54, 0,$20 Frame_2211D4: dc.w 5 dc.b $A0, $F, 0,$64, 0,$18 dc.b $C0, $F, 0,$74, 0, 8 dc.b $C0, $B, 0,$84, 0,$28 dc.b $E0, $F, 0,$90, 0, 0 dc.b $E0, $F, 0,$A0, 0,$20 Frame_2211F4: dc.w 5 dc.b $B0, $D, 0,$B0, 0,$18 dc.b $C0, $F, 0,$B8, 0, 8 dc.b $C0, $B, 0,$C8, 0,$28 dc.b $E0, $F, 0,$D4, 0, 0 dc.b $E0, $F, 0,$E4, 0,$20 Frame_221214: dc.w 4 dc.b $C0, $F, 0,$F4, 0, 0 dc.b $C0, $B, 1, 4, 0,$20 dc.b $E0, $F, 1,$10, 0, 0 dc.b $E0, $F, 1,$20, 0,$20 Frame_22122E: dc.w 3 dc.b $D0, $D, 1,$30, 0,$10 dc.b $E0, $F, 1,$38, 0, 0 dc.b $E0, $F, 1,$48, 0,$20
29.162162
48
0.497683
[ "Apache-2.0" ]
NatsumiFox/AMPS-Sonic-3-Knuckles
Levels/AIZ/Misc Object Data/Map - Intro Waves.asm
1,079
Assembly
; megamini-defs.asm *pragmapush list ; Save state of list pragma pragma nolist ; Turn off assembly listing and exclude from symbol list ifndef MEGA_DEFS ; Load defines only once ifndef MPI_DEFS include mpi-defs.asm endc ; MEGA-mini MPI by Ed Snider ; https://thezippsterzone.com/wp-content/uploads/2018/12/MEGAmini-manual.pdf ; ; 4-slot multipak interface ; Yamaha YMF262 (OPL3) sound chip ; (2) high speed UARTS (5v TTL) ; (3) programmable timers (two on the YMF chip) ; Source maskable IRQ system using FIRQ (/CART) ; Improved sound routing (software selectable source) ; ;MPI_REG equ $ff7f ; Multi-pak programming register (Read and Write) ; Bit 7:4 - # of active CART and CTS slot (ROM $C000-$DFFF) ; Bit 3:0 - # of active SCS slot (I/O $FF40-$FF5F) ; ; 0000 - Slot 1 selected ; 0001 - Slot 2 selected ; 0010 - Slot 3 selected ; 0011 - Slot 4 selected ; 0100 - MEGA-mini Virtual Slot 5 selected - VMF-262M (OPL3) Sound Chip ; 0101 - MEGA-mini Virtual Slot 6 selected - UARTs ; 1111 - MEGA-mini Virtual Slot 16 selected - Enhanched IRQ system ; analog switch ; programmer timer ; Slot numbers MEGA_SLOT1 equ %00000000 ; Slot #1 MEGA_SLOT2 equ %00000001 ; Slot #2 MEGA_SLOT3 equ %00000010 ; Slot #3 MEGA_SLOT4 equ %00000011 ; Slot #4 MEGA_YMF262 equ %00000100 ; Slot #5 (Virtual) - YMF262 sound chip MEGA_SERIAL equ %00000101 ; Slot #6 (Virtual) - Serial UARTS MEGA_EXT equ %00001111 ; Slot #16 (Virtual) - Extended MPI features ; YMF262 (OPL3) Sound Chip ifndef YMF262_DEFS include ymf262-defs.asm endc ; UART A MEGA_UARTA equ $ff40 MEGA_UARTA_THR equ MEGA_UARTA+0 MEGA_UARTA_IER equ MEGA_UARTA+1 MEGA_UARTA_FCR equ MEGA_UARTA+2 MEGA_UARTA_LCR equ MEGA_UARTA+3 MEGA_UARTA_MCR equ MEGA_UARTA+4 MEGA_UARTA_LSR equ MEGA_UARTA+5 MEGA_UARTA_MSR equ MEGA_UARTA+6 MEGA_UARTA_SPR equ MEGA_UARTA+7 MEGA_UARTA_RESET equ MEGA_UARTA+8 MEGA_UARTA_DATA_MSB equ MEGA_UARTA+10 MEGA_UARTA_DATA_LSB equ MEGA_UARTA+11 ; UART B MEGA_UARTB equ $ff50 MEGA_UARTB_THR equ MEGA_UARTB+0 MEGA_UARTB_IER equ MEGA_UARTB+1 MEGA_UARTB_FCR equ MEGA_UARTB+2 MEGA_UARTB_LCR equ MEGA_UARTB+3 MEGA_UARTB_MCR equ MEGA_UARTB+4 MEGA_UARTB_LSR equ MEGA_UARTB+5 MEGA_UARTB_MSR equ MEGA_UARTB+6 MEGA_UARTB_SPR equ MEGA_UARTB+7 MEGA_UARTB_RESET equ MEGA_UARTB+8 MEGA_UARTB_DATA_MSB equ MEGA_UARTB+10 MEGA_UARTB_DATA_LSB equ MEGA_UARTB+11 ; Extended MPI features MEGA_EXT_BASE equ $ff40 MEGA_EXT_IRQ equ MEGA_EXT_BASE ; ; Bit 7 - Timer IRQ ; Bit 6 - UART B IRQ ; Bit 5 - UART A IRQ ; Bit 4 - YMF262 IRQ ; Bit 3 - Slot #4 ; Bit 2 - Slot #3 ; Bit 1 - Slot #2 ; Bit 0 - Slot #1 MEGA_EXT_ACTIVE_IRQ equ MEGA_EXT_BASE+1 ; ; Bit 7 - Timer ; Bit 6 - UART B ; Bit 5 - UART A ; Bit 4 - YMF262 ; Bit 3 - Slot #4 - /Cart ; Bit 2 - Slot #3 - /Cart ; Bit 1 - Slot #2 - /Cart ; Bit 0 - Slot #1 - /Cart MEGA_EXT_SOUND_SOURCE equ MEGA_EXT_BASE+2 ; ; Bit 7 - Enable IRQ System ; Bit 6 - Enable Timer ; Bits 5:3 - n/a ; Bits 2:0 - Analog switch ; 000 - Slot #1 ; 001 - Slot #2 ; 010 - Slot #3 ; 011 - Slot #4 ; 100 - YMF262 MEGA_EXT_TIMER_MSB equ MEGA_EXT_BASE+3 ; MEGA_EXT_TIMER_LSB equ MEGA_EXT_BASE+4 ; MEGA_EXT_TIMER_RESET equ MEGA_EXT_BASE+5 ; ; Enhanced IRQ management system (Used for MEGA_EXT_IRQ and MEGA_EXT_ACTIVE_IRQ) MEGA_IRQ_SLOT1 equ %00000001 ; Slot #1 /cart signal MEGA_IRQ_SLOT2 equ %00000010 ; Slot #2 /cart signal MEGA_IRQ_SLOT3 equ %00000100 ; Slot #3 /cart signal MEGA_IRQ_SLOT4 equ %00001000 ; Slot #4 /cart signal MEGA_IRQ_YMF262 equ %00010000 ; YMF262 MEGA_IRQ_UARTA equ %00100000 ; UART A IRQ MEGA_IRQ_UARTB equ %01000000 ; UART B IRQ MEGA_IRQ_TIMER equ %10000000 ; Timer IRQ ; Sound source select (analog switch) (Used for MEGA_EXT_EXTENDED) MEGA_SOUND_SLOT0 equ %00000000 ; Analog Switch - Slot #1 (Default at startup) MEGA_SOUND_SLOT1 equ %00000001 ; Analog Switch - Slot #2 MEGA_SOUND_SLOT2 equ %00000010 ; Analog Switch - Slot #3 MEGA_SOUND_SLOT3 equ %00000011 ; Analog Switch - Slot #4 MEGA_SOUND_YMF262 equ %00000100 ; Analog Switch - YMF262 MEGA_ENABLE_TIMER equ %01000000 ; Enable Timer MEGA_ENABLE_IRQ equ %10000000 ; Enable IRQ System MEGA_DEFS equ 1 ; Set flag for defines being loaded endc *pragmapop list ; restore assembly listing to previous state
48.808511
117
0.458152
[ "MIT" ]
dougmasten/coco_defines
defines/megamini-defs.asm
6,882
Assembly
.size 8000 .text@48 jp lstatint .text@100 jp lbegin .data@143 c0 .text@150 lbegin: ld a, 00 ldff(ff), a ld a, 30 ldff(00), a ld a, 01 ldff(4d), a stop, 00 ld c, 41 ld b, 03 lbegin_waitm3: ldff a, (c) and a, b cmp a, b jrnz lbegin_waitm3 ld a, 20 ldff(c), a ld a, 02 ldff(ff), a ld a, 06 ldff(43), a ei .text@1000 lstatint: nop .text@1077 ldff a, (c) and a, b jp lprint_a .text@7000 lprint_a: push af ld b, 91 call lwaitly_b xor a, a ldff(40), a pop af ld(9800), a ld bc, 7a00 ld hl, 8000 ld d, a0 lprint_copytiles: ld a, (bc) inc bc ld(hl++), a dec d jrnz lprint_copytiles ld a, c0 ldff(47), a ld a, 80 ldff(68), a ld a, ff ldff(69), a ldff(69), a ldff(69), a ldff(69), a ldff(69), a ldff(69), a xor a, a ldff(69), a ldff(69), a ldff(43), a ld a, 91 ldff(40), a lprint_limbo: jr lprint_limbo .text@7400 lwaitly_b: ld c, 44 lwaitly_b_loop: ldff a, (c) cmp a, b jrnz lwaitly_b_loop ret .data@7a00 00 00 7f 7f 41 41 41 41 41 41 41 41 41 41 7f 7f 00 00 08 08 08 08 08 08 08 08 08 08 08 08 08 08 00 00 7f 7f 01 01 01 01 7f 7f 40 40 40 40 7f 7f 00 00 7f 7f 01 01 01 01 3f 3f 01 01 01 01 7f 7f 00 00 41 41 41 41 41 41 7f 7f 01 01 01 01 01 01 00 00 7f 7f 40 40 40 40 7e 7e 01 01 01 01 7e 7e 00 00 7f 7f 40 40 40 40 7f 7f 41 41 41 41 7f 7f 00 00 7f 7f 01 01 02 02 04 04 08 08 10 10 10 10 00 00 3e 3e 41 41 41 41 3e 3e 41 41 41 41 3e 3e 00 00 7f 7f 41 41 41 41 7f 7f 01 01 01 01 7f 7f
12.894737
24
0.622449
[ "MIT" ]
Manurocker95/GiovanniEmulator
GIOVANNI/gambatte/test/hwtests/m2int_m3stat/scx/m2int_scx6_m3stat_ds_1_cgb04c_out3.asm
1,470
Assembly
; A158447: a(n) = 10*n^2 - 1. ; Submitted by Christian Krause ; 9,39,89,159,249,359,489,639,809,999,1209,1439,1689,1959,2249,2559,2889,3239,3609,3999,4409,4839,5289,5759,6249,6759,7289,7839,8409,8999,9609,10239,10889,11559,12249,12959,13689,14439,15209,15999,16809,17639,18489,19359,20249,21159,22089,23039,24009,24999,26009,27039,28089,29159,30249,31359,32489,33639,34809,35999,37209,38439,39689,40959,42249,43559,44889,46239,47609,48999,50409,51839,53289,54759,56249,57759,59289,60839,62409,63999,65609,67239,68889,70559,72249,73959,75689,77439,79209,80999 add $0,1 pow $0,2 mul $0,10 sub $0,1
66.333333
496
0.78057
[ "Apache-2.0" ]
ckrause/loda-programs
oeis/158/A158447.asm
597
Assembly
; A064199: a(n) = 9*(n-2)^2*(n^2-2*n-1)/2. ; 0,9,126,567,1656,3825,7614,13671,22752,35721,53550,77319,108216,147537,196686,257175,330624,418761,523422,646551,790200,956529,1147806,1366407,1614816,1895625,2211534,2565351,2959992,3398481,3883950,4419639,5008896,5655177,6362046,7133175,7972344,8883441,9870462,10937511,12088800,13328649,14661486,16091847,17624376,19263825,21015054,22883031,24872832,26989641,29238750,31625559,34155576,36834417,39667806,42661575,45821664,49154121,52665102,56360871,60247800,64332369,68621166,73120887,77838336 mov $1,$0 sub $0,1 mul $0,2 add $0,1 pow $1,2 add $0,$1 mul $1,$0 mov $0,$1 div $0,2 mul $0,9
45.5
498
0.786499
[ "Apache-2.0" ]
ckrause/loda-programs
oeis/064/A064199.asm
637
Assembly
; z_Windows_NT-586_asm.asm: - microtasking routines specifically ; written for IA-32 architecture and Intel(R) 64 running Windows* OS ; $Revision: 43373 $ ; $Date: 2014-08-07 09:17:32 -0500 (Thu, 07 Aug 2014) $ ; ;//===----------------------------------------------------------------------===// ;// ;// The LLVM Compiler Infrastructure ;// ;// This file is dual licensed under the MIT and the University of Illinois Open ;// Source Licenses. See LICENSE.txt for details. ;// ;//===----------------------------------------------------------------------===// ; TITLE z_Windows_NT-586_asm.asm ; ============================= IA-32 architecture ========================== ifdef _M_IA32 .586P if @Version gt 510 .model HUGE else _TEXT SEGMENT PARA USE32 PUBLIC 'CODE' _TEXT ENDS _DATA SEGMENT DWORD USE32 PUBLIC 'DATA' _DATA ENDS CONST SEGMENT DWORD USE32 PUBLIC 'CONST' CONST ENDS _BSS SEGMENT DWORD USE32 PUBLIC 'BSS' _BSS ENDS $$SYMBOLS SEGMENT BYTE USE32 'DEBSYM' $$SYMBOLS ENDS $$TYPES SEGMENT BYTE USE32 'DEBTYP' $$TYPES ENDS _TLS SEGMENT DWORD USE32 PUBLIC 'TLS' _TLS ENDS FLAT GROUP _DATA, CONST, _BSS ASSUME CS: FLAT, DS: FLAT, SS: FLAT endif ;------------------------------------------------------------------------ ; ; FUNCTION ___kmp_x86_pause ; ; void ; __kmp_x86_pause( void ) ; PUBLIC ___kmp_x86_pause _p$ = 4 _d$ = 8 _TEXT SEGMENT ALIGN 16 ___kmp_x86_pause PROC NEAR db 0f3H db 090H ;; pause ret ___kmp_x86_pause ENDP _TEXT ENDS ;------------------------------------------------------------------------ ; ; FUNCTION ___kmp_x86_cpuid ; ; void ; __kmp_x86_cpuid( int mode, int mode2, struct kmp_cpuid *p ); ; PUBLIC ___kmp_x86_cpuid _TEXT SEGMENT ALIGN 16 _mode$ = 8 _mode2$ = 12 _p$ = 16 _eax$ = 0 _ebx$ = 4 _ecx$ = 8 _edx$ = 12 ___kmp_x86_cpuid PROC NEAR push ebp mov ebp, esp push edi push ebx push ecx push edx mov eax, DWORD PTR _mode$[ebp] mov ecx, DWORD PTR _mode2$[ebp] cpuid ; Query the CPUID for the current processor mov edi, DWORD PTR _p$[ebp] mov DWORD PTR _eax$[ edi ], eax mov DWORD PTR _ebx$[ edi ], ebx mov DWORD PTR _ecx$[ edi ], ecx mov DWORD PTR _edx$[ edi ], edx pop edx pop ecx pop ebx pop edi mov esp, ebp pop ebp ret ___kmp_x86_cpuid ENDP _TEXT ENDS ;------------------------------------------------------------------------ ; ; FUNCTION ___kmp_test_then_add32 ; ; kmp_int32 ; __kmp_test_then_add32( volatile kmp_int32 *p, kmp_int32 d ); ; PUBLIC ___kmp_test_then_add32 _p$ = 4 _d$ = 8 _TEXT SEGMENT ALIGN 16 ___kmp_test_then_add32 PROC NEAR mov eax, DWORD PTR _d$[esp] mov ecx, DWORD PTR _p$[esp] lock xadd DWORD PTR [ecx], eax ret ___kmp_test_then_add32 ENDP _TEXT ENDS ;------------------------------------------------------------------------ ; ; FUNCTION ___kmp_compare_and_store8 ; ; kmp_int8 ; __kmp_compare_and_store8( volatile kmp_int8 *p, kmp_int8 cv, kmp_int8 sv ); ; PUBLIC ___kmp_compare_and_store8 _TEXT SEGMENT ALIGN 16 _p$ = 4 _cv$ = 8 _sv$ = 12 ___kmp_compare_and_store8 PROC NEAR mov ecx, DWORD PTR _p$[esp] mov al, BYTE PTR _cv$[esp] mov dl, BYTE PTR _sv$[esp] lock cmpxchg BYTE PTR [ecx], dl sete al ; if al == [ecx] set al = 1 else set al = 0 and eax, 1 ; sign extend previous instruction ret ___kmp_compare_and_store8 ENDP _TEXT ENDS ;------------------------------------------------------------------------ ; ; FUNCTION ___kmp_compare_and_store16 ; ; kmp_int16 ; __kmp_compare_and_store16( volatile kmp_int16 *p, kmp_int16 cv, kmp_int16 sv ); ; PUBLIC ___kmp_compare_and_store16 _TEXT SEGMENT ALIGN 16 _p$ = 4 _cv$ = 8 _sv$ = 12 ___kmp_compare_and_store16 PROC NEAR mov ecx, DWORD PTR _p$[esp] mov ax, WORD PTR _cv$[esp] mov dx, WORD PTR _sv$[esp] lock cmpxchg WORD PTR [ecx], dx sete al ; if ax == [ecx] set al = 1 else set al = 0 and eax, 1 ; sign extend previous instruction ret ___kmp_compare_and_store16 ENDP _TEXT ENDS ;------------------------------------------------------------------------ ; ; FUNCTION ___kmp_compare_and_store32 ; ; kmp_int32 ; __kmp_compare_and_store32( volatile kmp_int32 *p, kmp_int32 cv, kmp_int32 sv ); ; PUBLIC ___kmp_compare_and_store32 _TEXT SEGMENT ALIGN 16 _p$ = 4 _cv$ = 8 _sv$ = 12 ___kmp_compare_and_store32 PROC NEAR mov ecx, DWORD PTR _p$[esp] mov eax, DWORD PTR _cv$[esp] mov edx, DWORD PTR _sv$[esp] lock cmpxchg DWORD PTR [ecx], edx sete al ; if eax == [ecx] set al = 1 else set al = 0 and eax, 1 ; sign extend previous instruction ret ___kmp_compare_and_store32 ENDP _TEXT ENDS ;------------------------------------------------------------------------ ; ; FUNCTION ___kmp_compare_and_store64 ; ; kmp_int32 ; __kmp_compare_and_store64( volatile kmp_int64 *p, kmp_int64 cv, kmp_int64 sv ); ; PUBLIC ___kmp_compare_and_store64 _TEXT SEGMENT ALIGN 16 _p$ = 8 _cv_low$ = 12 _cv_high$ = 16 _sv_low$ = 20 _sv_high$ = 24 ___kmp_compare_and_store64 PROC NEAR push ebp mov ebp, esp push ebx push edi mov edi, DWORD PTR _p$[ebp] mov eax, DWORD PTR _cv_low$[ebp] mov edx, DWORD PTR _cv_high$[ebp] mov ebx, DWORD PTR _sv_low$[ebp] mov ecx, DWORD PTR _sv_high$[ebp] lock cmpxchg8b QWORD PTR [edi] sete al ; if edx:eax == [edi] set al = 1 else set al = 0 and eax, 1 ; sign extend previous instruction pop edi pop ebx mov esp, ebp pop ebp ret ___kmp_compare_and_store64 ENDP _TEXT ENDS ;------------------------------------------------------------------------ ; ; FUNCTION ___kmp_xchg_fixed8 ; ; kmp_int8 ; __kmp_xchg_fixed8( volatile kmp_int8 *p, kmp_int8 d ); ; PUBLIC ___kmp_xchg_fixed8 _TEXT SEGMENT ALIGN 16 _p$ = 4 _d$ = 8 ___kmp_xchg_fixed8 PROC NEAR mov ecx, DWORD PTR _p$[esp] mov al, BYTE PTR _d$[esp] lock xchg BYTE PTR [ecx], al ret ___kmp_xchg_fixed8 ENDP _TEXT ENDS ;------------------------------------------------------------------------ ; ; FUNCTION ___kmp_xchg_fixed16 ; ; kmp_int16 ; __kmp_xchg_fixed16( volatile kmp_int16 *p, kmp_int16 d ); ; PUBLIC ___kmp_xchg_fixed16 _TEXT SEGMENT ALIGN 16 _p$ = 4 _d$ = 8 ___kmp_xchg_fixed16 PROC NEAR mov ecx, DWORD PTR _p$[esp] mov ax, WORD PTR _d$[esp] lock xchg WORD PTR [ecx], ax ret ___kmp_xchg_fixed16 ENDP _TEXT ENDS ;------------------------------------------------------------------------ ; ; FUNCTION ___kmp_xchg_fixed32 ; ; kmp_int32 ; __kmp_xchg_fixed32( volatile kmp_int32 *p, kmp_int32 d ); ; PUBLIC ___kmp_xchg_fixed32 _TEXT SEGMENT ALIGN 16 _p$ = 4 _d$ = 8 ___kmp_xchg_fixed32 PROC NEAR mov ecx, DWORD PTR _p$[esp] mov eax, DWORD PTR _d$[esp] lock xchg DWORD PTR [ecx], eax ret ___kmp_xchg_fixed32 ENDP _TEXT ENDS ;------------------------------------------------------------------------ ; ; FUNCTION ___kmp_xchg_real32 ; ; kmp_real32 ; __kmp_xchg_real32( volatile kmp_real32 *p, kmp_real32 d ); ; PUBLIC ___kmp_xchg_real32 _TEXT SEGMENT ALIGN 16 _p$ = 8 _d$ = 12 _old_value$ = -4 ___kmp_xchg_real32 PROC NEAR push ebp mov ebp, esp sub esp, 4 push esi mov esi, DWORD PTR _p$[ebp] fld DWORD PTR [esi] ;; load <addr> fst DWORD PTR _old_value$[ebp] ;; store into old_value mov eax, DWORD PTR _d$[ebp] lock xchg DWORD PTR [esi], eax fld DWORD PTR _old_value$[ebp] ;; return old_value pop esi mov esp, ebp pop ebp ret ___kmp_xchg_real32 ENDP _TEXT ENDS ;------------------------------------------------------------------------ ; ; FUNCTION ___kmp_compare_and_store_ret8 ; ; kmp_int8 ; __kmp_compare_and_store_ret8( volatile kmp_int8 *p, kmp_int8 cv, kmp_int8 sv ); ; PUBLIC ___kmp_compare_and_store_ret8 _TEXT SEGMENT ALIGN 16 _p$ = 4 _cv$ = 8 _sv$ = 12 ___kmp_compare_and_store_ret8 PROC NEAR mov ecx, DWORD PTR _p$[esp] mov al, BYTE PTR _cv$[esp] mov dl, BYTE PTR _sv$[esp] lock cmpxchg BYTE PTR [ecx], dl ret ___kmp_compare_and_store_ret8 ENDP _TEXT ENDS ;------------------------------------------------------------------------ ; ; FUNCTION ___kmp_compare_and_store_ret16 ; ; kmp_int16 ; __kmp_compare_and_store_ret16( volatile kmp_int16 *p, kmp_int16 cv, kmp_int16 sv ); ; PUBLIC ___kmp_compare_and_store_ret16 _TEXT SEGMENT ALIGN 16 _p$ = 4 _cv$ = 8 _sv$ = 12 ___kmp_compare_and_store_ret16 PROC NEAR mov ecx, DWORD PTR _p$[esp] mov ax, WORD PTR _cv$[esp] mov dx, WORD PTR _sv$[esp] lock cmpxchg WORD PTR [ecx], dx ret ___kmp_compare_and_store_ret16 ENDP _TEXT ENDS ;------------------------------------------------------------------------ ; ; FUNCTION ___kmp_compare_and_store_ret32 ; ; kmp_int32 ; __kmp_compare_and_store_ret32( volatile kmp_int32 *p, kmp_int32 cv, kmp_int32 sv ); ; PUBLIC ___kmp_compare_and_store_ret32 _TEXT SEGMENT ALIGN 16 _p$ = 4 _cv$ = 8 _sv$ = 12 ___kmp_compare_and_store_ret32 PROC NEAR mov ecx, DWORD PTR _p$[esp] mov eax, DWORD PTR _cv$[esp] mov edx, DWORD PTR _sv$[esp] lock cmpxchg DWORD PTR [ecx], edx ret ___kmp_compare_and_store_ret32 ENDP _TEXT ENDS ;------------------------------------------------------------------------ ; ; FUNCTION ___kmp_compare_and_store_ret64 ; ; kmp_int64 ; __kmp_compare_and_store_ret64( volatile kmp_int64 *p, kmp_int64 cv, kmp_int64 sv ); ; PUBLIC ___kmp_compare_and_store_ret64 _TEXT SEGMENT ALIGN 16 _p$ = 8 _cv_low$ = 12 _cv_high$ = 16 _sv_low$ = 20 _sv_high$ = 24 ___kmp_compare_and_store_ret64 PROC NEAR push ebp mov ebp, esp push ebx push edi mov edi, DWORD PTR _p$[ebp] mov eax, DWORD PTR _cv_low$[ebp] mov edx, DWORD PTR _cv_high$[ebp] mov ebx, DWORD PTR _sv_low$[ebp] mov ecx, DWORD PTR _sv_high$[ebp] lock cmpxchg8b QWORD PTR [edi] pop edi pop ebx mov esp, ebp pop ebp ret ___kmp_compare_and_store_ret64 ENDP _TEXT ENDS ;------------------------------------------------------------------------ ; ; FUNCTION ___kmp_load_x87_fpu_control_word ; ; void ; __kmp_load_x87_fpu_control_word( kmp_int16 *p ); ; ; parameters: ; p: 4(%esp) PUBLIC ___kmp_load_x87_fpu_control_word _TEXT SEGMENT ALIGN 16 _p$ = 4 ___kmp_load_x87_fpu_control_word PROC NEAR mov eax, DWORD PTR _p$[esp] fldcw WORD PTR [eax] ret ___kmp_load_x87_fpu_control_word ENDP _TEXT ENDS ;------------------------------------------------------------------------ ; ; FUNCTION ___kmp_store_x87_fpu_control_word ; ; void ; __kmp_store_x87_fpu_control_word( kmp_int16 *p ); ; ; parameters: ; p: 4(%esp) PUBLIC ___kmp_store_x87_fpu_control_word _TEXT SEGMENT ALIGN 16 _p$ = 4 ___kmp_store_x87_fpu_control_word PROC NEAR mov eax, DWORD PTR _p$[esp] fstcw WORD PTR [eax] ret ___kmp_store_x87_fpu_control_word ENDP _TEXT ENDS ;------------------------------------------------------------------------ ; ; FUNCTION ___kmp_clear_x87_fpu_status_word ; ; void ; __kmp_clear_x87_fpu_status_word(); ; PUBLIC ___kmp_clear_x87_fpu_status_word _TEXT SEGMENT ALIGN 16 ___kmp_clear_x87_fpu_status_word PROC NEAR fnclex ret ___kmp_clear_x87_fpu_status_word ENDP _TEXT ENDS ;------------------------------------------------------------------------ ; ; FUNCTION ___kmp_invoke_microtask ; ; typedef void (*microtask_t)( int *gtid, int *tid, ... ); ; ; int ; __kmp_invoke_microtask( microtask_t pkfn, ; int gtid, int tid, ; int argc, void *p_argv[] ) ; PUBLIC ___kmp_invoke_microtask _TEXT SEGMENT ALIGN 16 _pkfn$ = 8 _gtid$ = 12 _tid$ = 16 _argc$ = 20 _argv$ = 24 _i$ = -8 _stk_adj$ = -16 _vptr$ = -12 _qptr$ = -4 ___kmp_invoke_microtask PROC NEAR ; Line 102 push ebp mov ebp, esp sub esp, 16 ; 00000010H push ebx push esi push edi ; Line 114 mov eax, DWORD PTR _argc$[ebp] mov DWORD PTR _i$[ebp], eax ;; ------------------------------------------------------------ lea edx, DWORD PTR [eax*4+8] mov ecx, esp ; Save current SP into ECX mov eax,edx ; Save the size of the args in eax sub ecx,edx ; esp-((#args+2)*4) -> ecx -- without mods, stack ptr would be this mov edx,ecx ; Save to edx and ecx,-128 ; Mask off 7 bits sub edx,ecx ; Amount to subtract from esp sub esp,edx ; Prepare stack ptr-- Now it will be aligned on 128-byte boundary at the call add edx,eax ; Calculate total size of the stack decrement. mov DWORD PTR _stk_adj$[ebp], edx ;; ------------------------------------------------------------ jmp SHORT $L22237 $L22238: mov ecx, DWORD PTR _i$[ebp] sub ecx, 1 mov DWORD PTR _i$[ebp], ecx $L22237: cmp DWORD PTR _i$[ebp], 0 jle SHORT $L22239 ; Line 116 mov edx, DWORD PTR _i$[ebp] mov eax, DWORD PTR _argv$[ebp] mov ecx, DWORD PTR [eax+edx*4-4] mov DWORD PTR _vptr$[ebp], ecx ; Line 123 mov eax, DWORD PTR _vptr$[ebp] ; Line 124 push eax ; Line 127 jmp SHORT $L22238 $L22239: ; Line 129 lea edx, DWORD PTR _tid$[ebp] mov DWORD PTR _vptr$[ebp], edx ; Line 130 lea eax, DWORD PTR _gtid$[ebp] mov DWORD PTR _qptr$[ebp], eax ; Line 143 mov eax, DWORD PTR _vptr$[ebp] ; Line 144 push eax ; Line 145 mov eax, DWORD PTR _qptr$[ebp] ; Line 146 push eax ; Line 147 call DWORD PTR _pkfn$[ebp] ; Line 148 add esp, DWORD PTR _stk_adj$[ebp] ; Line 152 mov eax, 1 ; Line 153 pop edi pop esi pop ebx mov esp, ebp pop ebp ret 0 ___kmp_invoke_microtask ENDP _TEXT ENDS endif ; ==================================== Intel(R) 64 =================================== ifdef _M_AMD64 ;------------------------------------------------------------------------ ; ; FUNCTION __kmp_x86_cpuid ; ; void ; __kmp_x86_cpuid( int mode, int mode2, struct kmp_cpuid *p ); ; ; parameters: ; mode: ecx ; mode2: edx ; cpuid_buffer: r8 PUBLIC __kmp_x86_cpuid _TEXT SEGMENT ALIGN 16 __kmp_x86_cpuid PROC FRAME ;NEAR push rbp .pushreg rbp mov rbp, rsp .setframe rbp, 0 push rbx ; callee-save register .pushreg rbx .ENDPROLOG mov r10, r8 ; p parameter mov eax, ecx ; mode parameter mov ecx, edx ; mode2 parameter cpuid ; Query the CPUID for the current processor mov DWORD PTR 0[ r10 ], eax ; store results into buffer mov DWORD PTR 4[ r10 ], ebx mov DWORD PTR 8[ r10 ], ecx mov DWORD PTR 12[ r10 ], edx pop rbx ; callee-save register mov rsp, rbp pop rbp ret __kmp_x86_cpuid ENDP _TEXT ENDS ;------------------------------------------------------------------------ ; ; FUNCTION __kmp_test_then_add32 ; ; kmp_int32 ; __kmp_test_then_add32( volatile kmp_int32 *p, kmp_int32 d ); ; ; parameters: ; p: rcx ; d: edx ; ; return: eax PUBLIC __kmp_test_then_add32 _TEXT SEGMENT ALIGN 16 __kmp_test_then_add32 PROC ;NEAR mov eax, edx lock xadd DWORD PTR [rcx], eax ret __kmp_test_then_add32 ENDP _TEXT ENDS ;------------------------------------------------------------------------ ; ; FUNCTION __kmp_test_then_add64 ; ; kmp_int32 ; __kmp_test_then_add64( volatile kmp_int64 *p, kmp_int64 d ); ; ; parameters: ; p: rcx ; d: rdx ; ; return: rax PUBLIC __kmp_test_then_add64 _TEXT SEGMENT ALIGN 16 __kmp_test_then_add64 PROC ;NEAR mov rax, rdx lock xadd QWORD PTR [rcx], rax ret __kmp_test_then_add64 ENDP _TEXT ENDS ;------------------------------------------------------------------------ ; ; FUNCTION __kmp_compare_and_store8 ; ; kmp_int8 ; __kmp_compare_and_store8( volatile kmp_int8 *p, kmp_int8 cv, kmp_int8 sv ); ; parameters: ; p: rcx ; cv: edx ; sv: r8d ; ; return: eax PUBLIC __kmp_compare_and_store8 _TEXT SEGMENT ALIGN 16 __kmp_compare_and_store8 PROC ;NEAR mov al, dl ; "cv" mov edx, r8d ; "sv" lock cmpxchg BYTE PTR [rcx], dl sete al ; if al == [rcx] set al = 1 else set al = 0 and rax, 1 ; sign extend previous instruction ret __kmp_compare_and_store8 ENDP _TEXT ENDS ;------------------------------------------------------------------------ ; ; FUNCTION __kmp_compare_and_store16 ; ; kmp_int16 ; __kmp_compare_and_store16( volatile kmp_int16 *p, kmp_int16 cv, kmp_int16 sv ); ; parameters: ; p: rcx ; cv: edx ; sv: r8d ; ; return: eax PUBLIC __kmp_compare_and_store16 _TEXT SEGMENT ALIGN 16 __kmp_compare_and_store16 PROC ;NEAR mov ax, dx ; "cv" mov edx, r8d ; "sv" lock cmpxchg WORD PTR [rcx], dx sete al ; if ax == [rcx] set al = 1 else set al = 0 and rax, 1 ; sign extend previous instruction ret __kmp_compare_and_store16 ENDP _TEXT ENDS ;------------------------------------------------------------------------ ; ; FUNCTION __kmp_compare_and_store32 ; ; kmp_int32 ; __kmp_compare_and_store32( volatile kmp_int32 *p, kmp_int32 cv, kmp_int32 sv ); ; parameters: ; p: rcx ; cv: edx ; sv: r8d ; ; return: eax PUBLIC __kmp_compare_and_store32 _TEXT SEGMENT ALIGN 16 __kmp_compare_and_store32 PROC ;NEAR mov eax, edx ; "cv" mov edx, r8d ; "sv" lock cmpxchg DWORD PTR [rcx], edx sete al ; if eax == [rcx] set al = 1 else set al = 0 and rax, 1 ; sign extend previous instruction ret __kmp_compare_and_store32 ENDP _TEXT ENDS ;------------------------------------------------------------------------ ; ; FUNCTION __kmp_compare_and_store64 ; ; kmp_int32 ; __kmp_compare_and_store64( volatile kmp_int64 *p, kmp_int64 cv, kmp_int64 sv ); ; parameters: ; p: rcx ; cv: rdx ; sv: r8 ; ; return: eax PUBLIC __kmp_compare_and_store64 _TEXT SEGMENT ALIGN 16 __kmp_compare_and_store64 PROC ;NEAR mov rax, rdx ; "cv" mov rdx, r8 ; "sv" lock cmpxchg QWORD PTR [rcx], rdx sete al ; if rax == [rcx] set al = 1 else set al = 0 and rax, 1 ; sign extend previous instruction ret __kmp_compare_and_store64 ENDP _TEXT ENDS ;------------------------------------------------------------------------ ; ; FUNCTION ___kmp_xchg_fixed8 ; ; kmp_int8 ; __kmp_xchg_fixed8( volatile kmp_int8 *p, kmp_int8 d ); ; ; parameters: ; p: rcx ; d: dl ; ; return: al PUBLIC __kmp_xchg_fixed8 _TEXT SEGMENT ALIGN 16 __kmp_xchg_fixed8 PROC ;NEAR mov al, dl lock xchg BYTE PTR [rcx], al ret __kmp_xchg_fixed8 ENDP _TEXT ENDS ;------------------------------------------------------------------------ ; ; FUNCTION ___kmp_xchg_fixed16 ; ; kmp_int16 ; __kmp_xchg_fixed16( volatile kmp_int16 *p, kmp_int16 d ); ; ; parameters: ; p: rcx ; d: dx ; ; return: ax PUBLIC __kmp_xchg_fixed16 _TEXT SEGMENT ALIGN 16 __kmp_xchg_fixed16 PROC ;NEAR mov ax, dx lock xchg WORD PTR [rcx], ax ret __kmp_xchg_fixed16 ENDP _TEXT ENDS ;------------------------------------------------------------------------ ; ; FUNCTION ___kmp_xchg_fixed32 ; ; kmp_int32 ; __kmp_xchg_fixed32( volatile kmp_int32 *p, kmp_int32 d ); ; ; parameters: ; p: rcx ; d: edx ; ; return: eax PUBLIC __kmp_xchg_fixed32 _TEXT SEGMENT ALIGN 16 __kmp_xchg_fixed32 PROC ;NEAR mov eax, edx lock xchg DWORD PTR [rcx], eax ret __kmp_xchg_fixed32 ENDP _TEXT ENDS ;------------------------------------------------------------------------ ; ; FUNCTION ___kmp_xchg_fixed64 ; ; kmp_int64 ; __kmp_xchg_fixed64( volatile kmp_int64 *p, kmp_int64 d ); ; ; parameters: ; p: rcx ; d: rdx ; ; return: rax PUBLIC __kmp_xchg_fixed64 _TEXT SEGMENT ALIGN 16 __kmp_xchg_fixed64 PROC ;NEAR mov rax, rdx lock xchg QWORD PTR [rcx], rax ret __kmp_xchg_fixed64 ENDP _TEXT ENDS ;------------------------------------------------------------------------ ; ; FUNCTION __kmp_compare_and_store_ret8 ; ; kmp_int8 ; __kmp_compare_and_store_ret8( volatile kmp_int8 *p, kmp_int8 cv, kmp_int8 sv ); ; parameters: ; p: rcx ; cv: edx ; sv: r8d ; ; return: eax PUBLIC __kmp_compare_and_store_ret8 _TEXT SEGMENT ALIGN 16 __kmp_compare_and_store_ret8 PROC ;NEAR mov al, dl ; "cv" mov edx, r8d ; "sv" lock cmpxchg BYTE PTR [rcx], dl ; Compare AL with [rcx]. If equal set ; ZF and exchange DL with [rcx]. Else, clear ; ZF and load [rcx] into AL. ret __kmp_compare_and_store_ret8 ENDP _TEXT ENDS ;------------------------------------------------------------------------ ; ; FUNCTION __kmp_compare_and_store_ret16 ; ; kmp_int16 ; __kmp_compare_and_store_ret16( volatile kmp_int16 *p, kmp_int16 cv, kmp_int16 sv ); ; parameters: ; p: rcx ; cv: edx ; sv: r8d ; ; return: eax PUBLIC __kmp_compare_and_store_ret16 _TEXT SEGMENT ALIGN 16 __kmp_compare_and_store_ret16 PROC ;NEAR mov ax, dx ; "cv" mov edx, r8d ; "sv" lock cmpxchg WORD PTR [rcx], dx ret __kmp_compare_and_store_ret16 ENDP _TEXT ENDS ;------------------------------------------------------------------------ ; ; FUNCTION __kmp_compare_and_store_ret32 ; ; kmp_int32 ; __kmp_compare_and_store_ret32( volatile kmp_int32 *p, kmp_int32 cv, kmp_int32 sv ); ; parameters: ; p: rcx ; cv: edx ; sv: r8d ; ; return: eax PUBLIC __kmp_compare_and_store_ret32 _TEXT SEGMENT ALIGN 16 __kmp_compare_and_store_ret32 PROC ;NEAR mov eax, edx ; "cv" mov edx, r8d ; "sv" lock cmpxchg DWORD PTR [rcx], edx ret __kmp_compare_and_store_ret32 ENDP _TEXT ENDS ;------------------------------------------------------------------------ ; ; FUNCTION __kmp_compare_and_store_ret64 ; ; kmp_int64 ; __kmp_compare_and_store_ret64( volatile kmp_int64 *p, kmp_int64 cv, kmp_int64 sv ); ; parameters: ; p: rcx ; cv: rdx ; sv: r8 ; ; return: rax PUBLIC __kmp_compare_and_store_ret64 _TEXT SEGMENT ALIGN 16 __kmp_compare_and_store_ret64 PROC ;NEAR mov rax, rdx ; "cv" mov rdx, r8 ; "sv" lock cmpxchg QWORD PTR [rcx], rdx ret __kmp_compare_and_store_ret64 ENDP _TEXT ENDS ;------------------------------------------------------------------------ ; ; FUNCTION __kmp_compare_and_store_loop8 ; ; kmp_int8 ; __kmp_compare_and_store_loop8( volatile kmp_int8 *p, kmp_int8 cv, kmp_int8 sv ); ; parameters: ; p: rcx ; cv: edx ; sv: r8d ; ; return: al PUBLIC __kmp_compare_and_store_loop8 _TEXT SEGMENT ALIGN 16 __kmp_compare_and_store_loop8 PROC ;NEAR $__kmp_loop: mov al, dl ; "cv" mov edx, r8d ; "sv" lock cmpxchg BYTE PTR [rcx], dl ; Compare AL with [rcx]. If equal set ; ZF and exchange DL with [rcx]. Else, clear ; ZF and load [rcx] into AL. jz SHORT $__kmp_success db 0f3H db 090H ; pause jmp SHORT $__kmp_loop $__kmp_success: ret __kmp_compare_and_store_loop8 ENDP _TEXT ENDS ;------------------------------------------------------------------------ ; ; FUNCTION __kmp_xchg_real32 ; ; kmp_real32 ; __kmp_xchg_real32( volatile kmp_real32 *p, kmp_real32 d ); ; ; parameters: ; p: rcx ; d: xmm1 (lower 4 bytes) ; ; return: xmm0 (lower 4 bytes) PUBLIC __kmp_xchg_real32 _TEXT SEGMENT ALIGN 16 __kmp_xchg_real32 PROC ;NEAR movd eax, xmm1 ; load d lock xchg DWORD PTR [rcx], eax movd xmm0, eax ; load old value into return register ret __kmp_xchg_real32 ENDP _TEXT ENDS ;------------------------------------------------------------------------ ; ; FUNCTION __kmp_xchg_real64 ; ; kmp_real64 ; __kmp_xchg_real64( volatile kmp_real64 *p, kmp_real64 d ); ; ; parameters: ; p: rcx ; d: xmm1 (lower 8 bytes) ; ; return: xmm0 (lower 8 bytes) PUBLIC __kmp_xchg_real64 _TEXT SEGMENT ALIGN 16 __kmp_xchg_real64 PROC ;NEAR movd rax, xmm1 ; load "d" lock xchg QWORD PTR [rcx], rax movd xmm0, rax ; load old value into return register ret __kmp_xchg_real64 ENDP _TEXT ENDS ;------------------------------------------------------------------------ ; ; FUNCTION __kmp_load_x87_fpu_control_word ; ; void ; __kmp_load_x87_fpu_control_word( kmp_int16 *p ); ; ; parameters: ; p: rcx ; PUBLIC __kmp_load_x87_fpu_control_word _TEXT SEGMENT ALIGN 16 __kmp_load_x87_fpu_control_word PROC ;NEAR fldcw WORD PTR [rcx] ret __kmp_load_x87_fpu_control_word ENDP _TEXT ENDS ;------------------------------------------------------------------------ ; ; FUNCTION __kmp_store_x87_fpu_control_word ; ; void ; __kmp_store_x87_fpu_control_word( kmp_int16 *p ); ; ; parameters: ; p: rcx ; PUBLIC __kmp_store_x87_fpu_control_word _TEXT SEGMENT ALIGN 16 __kmp_store_x87_fpu_control_word PROC ;NEAR fstcw WORD PTR [rcx] ret __kmp_store_x87_fpu_control_word ENDP _TEXT ENDS ;------------------------------------------------------------------------ ; ; FUNCTION __kmp_clear_x87_fpu_status_word ; ; void ; __kmp_clear_x87_fpu_status_word() ; PUBLIC __kmp_clear_x87_fpu_status_word _TEXT SEGMENT ALIGN 16 __kmp_clear_x87_fpu_status_word PROC ;NEAR fnclex ret __kmp_clear_x87_fpu_status_word ENDP _TEXT ENDS ;------------------------------------------------------------------------ ; ; FUNCTION __kmp_invoke_microtask ; ; typedef void (*microtask_t)( int *gtid, int *tid, ... ); ; ; int ; __kmp_invoke_microtask( microtask_t pkfn, ; int gtid, int tid, ; int argc, void *p_argv[] ) { ; ; (*pkfn) ( &gtid, &tid, argv[0], ... ); ; return 1; ; } ; ; note: ; just before call to pkfn must have rsp 128-byte aligned for compiler ; ; parameters: ; rcx: pkfn 16[rbp] ; edx: gtid 24[rbp] ; r8d: tid 32[rbp] ; r9d: argc 40[rbp] ; [st]: p_argv 48[rbp] ; ; reg temps: ; rax: used all over the place ; rdx: used all over the place ; rcx: used as argument counter for push parms loop ; r10: used to hold pkfn function pointer argument ; ; return: eax (always 1/TRUE) ; $_pkfn = 16 $_gtid = 24 $_tid = 32 $_argc = 40 $_p_argv = 48 PUBLIC __kmp_invoke_microtask _TEXT SEGMENT ALIGN 16 __kmp_invoke_microtask PROC FRAME ;NEAR mov QWORD PTR 16[rsp], rdx ; home gtid parameter mov QWORD PTR 24[rsp], r8 ; home tid parameter push rbp ; save base pointer .pushreg rbp sub rsp, 0 ; no fixed allocation necessary - end prolog lea rbp, QWORD PTR [rsp] ; establish the base pointer .setframe rbp, 0 .ENDPROLOG mov r10, rcx ; save pkfn pointer for later ;; ------------------------------------------------------------ mov rax, r9 ; rax <= argc cmp rax, 2 jge SHORT $_kmp_invoke_stack_align mov rax, 2 ; set 4 homes if less than 2 parms $_kmp_invoke_stack_align: lea rdx, QWORD PTR [rax*8+16] ; rax <= (argc + 2) * 8 mov rax, rsp ; Save current SP into rax sub rax, rdx ; rsp - ((argc+2)*8) -> rax ; without align, rsp would be this and rax, -128 ; Mask off 7 bits (128-byte align) add rax, rdx ; add space for push's in a loop below mov rsp, rax ; Prepare the stack ptr ; Now it will align to 128-byte at the call ;; ------------------------------------------------------------ ; setup pkfn parameter stack mov rax, r9 ; rax <= argc shl rax, 3 ; rax <= argc*8 mov rdx, QWORD PTR $_p_argv[rbp] ; rdx <= p_argv add rdx, rax ; rdx <= &p_argv[argc] mov rcx, r9 ; rcx <= argc jecxz SHORT $_kmp_invoke_pass_parms ; nothing to push if argc=0 cmp ecx, 1 ; if argc=1 branch ahead je SHORT $_kmp_invoke_one_parm sub ecx, 2 ; if argc=2 branch ahead, subtract two from je SHORT $_kmp_invoke_two_parms $_kmp_invoke_push_parms: ; push last - 5th parms to pkfn on stack sub rdx, 8 ; decrement p_argv pointer to previous parm mov r8, QWORD PTR [rdx] ; r8 <= p_argv[rcx-1] push r8 ; push p_argv[rcx-1] onto stack (reverse order) sub ecx, 1 jecxz SHORT $_kmp_invoke_two_parms jmp SHORT $_kmp_invoke_push_parms $_kmp_invoke_two_parms: sub rdx, 8 ; put 4th parm to pkfn in r9 mov r9, QWORD PTR [rdx] ; r9 <= p_argv[1] $_kmp_invoke_one_parm: sub rdx, 8 ; put 3rd parm to pkfn in r8 mov r8, QWORD PTR [rdx] ; r8 <= p_argv[0] $_kmp_invoke_pass_parms: ; put 1st & 2nd parms to pkfn in registers lea rdx, QWORD PTR $_tid[rbp] ; rdx <= &tid (2nd parm to pkfn) lea rcx, QWORD PTR $_gtid[rbp] ; rcx <= &gtid (1st parm to pkfn) sub rsp, 32 ; add stack space for first four parms mov rax, r10 ; rax <= pkfn call rax ; call (*pkfn)() mov rax, 1 ; move 1 into return register; lea rsp, QWORD PTR [rbp] ; restore stack pointer ; add rsp, 0 ; no fixed allocation necessary - start epilog pop rbp ; restore frame pointer ret __kmp_invoke_microtask ENDP _TEXT ENDS endif END
22.312006
91
0.549588
[ "BSD-3-Clause" ]
HackLinux/goblin-core
riscv/llvm/omp_trunk/runtime/src/z_Windows_NT-586_asm.asm
31,036
Assembly
; A155598: 7^n-2^n+1. ; 1,6,46,336,2386,16776,117586,823416,5764546,40353096,282474226,1977324696,13841283106,96889002216,678223056466,4747561477176,33232930504066,232630513856136,1628413597648306,11398895184848856 mov $1,7 pow $1,$0 mov $2,2 pow $2,$0 sub $1,$2 mov $0,$1 add $0,1
25.727273
192
0.770318
[ "Apache-2.0" ]
ckrause/cm
programs/oeis/155/A155598.asm
283
Assembly
; A175784: Numerators of k/(10+k)+1 for k = 2*n-1. ; 12,16,4,24,28,32,36,8,44,48,52,56,12,64,68,72,76,16,84,88,92,96,20,104,108,112,116,24,124,128,132,136,28,144,148,152,156,32,164,168,172,176,36,184,188,192,196,40,204,208,212,216,44,224,228 add $0,3 dif $0,5 mov $1,$0 mul $1,4
35
190
0.660714
[ "Apache-2.0" ]
jmorken/loda
programs/oeis/175/A175784.asm
280
Assembly
; A075888: Difference of successive primes squared divided by 24, (prime(n+1)^2-prime(n)^2)/24. ; Submitted by Jamie Morken(s2) ; 1,3,2,5,3,7,13,5,17,13,7,15,25,28,10,32,23,12,38,27,43,62,33,17,35,18,37,140,43,67,23,120,25,77,80,55,85,88,30,155,32,65,33,205,217,75,38,77,118,40,205,127,130,133,45,137,93,47,240,350,103,52,105,378,167,285,58,117,178,242,185,188,127,193,262,133,270,345,70,355,72,218,147,223,302,153,77,155,473,322,163,330,167,253,515,87,798,272,460,280 add $0,2 seq $0,124434 ; LCM (least common multiple) of A001043 (sum of consecutive primes) and A001223 (difference of consecutive primes). sub $0,12 div $0,12 add $0,1
63.9
340
0.71518
[ "Apache-2.0" ]
ckrause/loda-programs
oeis/075/A075888.asm
639
Assembly
; A168309: Period 2: repeat 4,-3. ; 4,-3,4,-3,4,-3,4,-3,4,-3,4,-3,4,-3,4,-3,4,-3,4,-3,4,-3,4,-3,4,-3,4,-3,4,-3,4,-3,4,-3,4,-3,4,-3,4,-3,4,-3,4,-3,4,-3,4,-3,4,-3,4,-3,4,-3,4,-3,4,-3,4,-3,4,-3,4,-3,4,-3,4,-3,4,-3,4,-3,4,-3,4,-3,4,-3,4,-3,4,-3,4,-3 mod $0,2 sub $1,$0 mul $1,7 add $1,4 mov $0,$1
32.666667
211
0.445578
[ "Apache-2.0" ]
ckrause/cm
programs/oeis/168/A168309.asm
294
Assembly
; A082505: a(n) = sum of (n-1)-th row terms of triangle A134059. ; 0,1,6,12,24,48,96,192,384,768,1536,3072,6144,12288,24576,49152,98304,196608,393216,786432,1572864,3145728,6291456,12582912,25165824,50331648,100663296,201326592,402653184,805306368,1610612736,3221225472,6442450944,12884901888,25769803776,51539607552,103079215104,206158430208,412316860416,824633720832,1649267441664,3298534883328,6597069766656,13194139533312,26388279066624,52776558133248,105553116266496,211106232532992,422212465065984,844424930131968,1688849860263936,3377699720527872 mov $1,2 pow $1,$0 mov $2,2 div $2,$1 trn $1,$2 mul $1,3 div $1,2 mov $0,$1
52.583333
488
0.820919
[ "Apache-2.0" ]
ckrause/loda-programs
oeis/082/A082505.asm
631
Assembly
; A109116: a(n) = (n+1)^3*(n+2)^2*(n+5). ; 20,432,3024,12800,40500,105840,241472,497664,947700,1694000,2874960,4672512,7320404,11113200,16416000,23674880,33428052,46317744,63102800,84672000,112058100,146452592,189221184,241920000,306312500,384387120,478375632,590772224,724353300,882198000,1067709440,1284636672,1537097364,1829601200,2167074000,2554882560,2998860212,3505333104,4081147200,4733696000,5470948980,6301480752,7234500944,8279884800,9448204500,10750761200,12199617792,13807632384,15588492500,17556750000,19727856720,22118200832,24745143924,27627058800,30783368000,34234583040,38002344372,42109462064,46579957200,51439104000,56713472660,62430972912,68620898304,75313971200,82542388500,90339868080,98741695952,107784774144,117507669300,127950662000,139155796800,151166932992,164029796084,177792030000,192503250000,208215096320,224981288532,242857680624,261902316800,282175488000,303739789140,326660177072,351004029264,376841203200,404244096500,433287707760,464049698112,496610453504,531053147700,567463806000,605931369680,646547761152,689407949844,734610018800,782255232000,832448102400,885296460692,940911524784,999407970000,1060904000000,1125521418420,1193385701232,1264626069824,1339375564800,1417771120500,1499953640240,1586068072272,1676263486464,1770693151700,1869514614000,1972889775360,2080984973312,2193971061204,2312023489200,2435322386000,2564052641280,2698403988852,2838571090544,2984753620800,3137156352000,3295989240500,3461467513392,3633811755984,3813248000000,4000007812500,4194328385520,4396452626432,4606629249024,4825112865300,5052164078000,5288049573840,5533042217472,5787421146164,6051471865200,6325486344000,6609763112960,6904607361012,7210331033904,7527252933200,7855698816000,8196001495380,8548500941552,8913544383744,9291486412800,9682689084500,10087522023600,10506362528592,10939595677184,11387614432500,11850819750000,12329620685120,12824434501632,13335686780724,13863811530800,14409251298000,14972457277440,15553889425172,16154016570864,16773316531200,17412276224000,18071391783060,18751168673712,19452121809104,20174775667200,20919664408500,21687331994480,22478332306752,23293229266944,24132596957300,24997019742000,25887092389200,26803420193792,27746619100884,28717315830000,29716148000000,30743764254720,31800824389332,32887999477424,34005971998800,35155435968000,36337097063540,37551672757872,38799892448064,40082497587200,41400241816500,42753891098160,44144223848912,45572031074304,47038116503700,48543296726000,50088401326080,51674273021952,53301767802644,54971755066800,56685117762000,58442752524800,60245569821492,62094494089584,63990463880000,65934432000000,67927365656820,69970246602032,72064071276624,74209850956800,76408611900500,78661395494640,80969258403072,83333272715264,85754526095700,88234121934000,90773179495760,93372834074112,96034237142004,98758556505200,101546976456000,104400697927680,107320938649652,110308933303344,113365933678800,116493208832000,119692045242900,122963746974192,126309635830784,129731051520000,133229351812500,136805912703920,140462128577232,144199412365824,148019195717300,151922929158000,155912082258240,159988143798272,164152621934964,168407044369200,172752958514000,177191931663360,181725551161812,186355424574704,191083179859200,195910465536000,200838950861780,205870326002352,211006302206544,216248611980800,221599009264500,227059269606000,232631190339392,238316590761984,244117312312500,250035218750000 mov $6,$0 mul $0,2 mov $2,$0 add $0,10 mul $0,2 add $2,1 mov $1,$2 mov $5,$2 lpb $0 sub $0,1 add $1,$5 lpe sub $1,1 mov $3,38 mov $7,$6 lpb $3 add $1,$7 sub $3,1 lpe mov $4,$6 lpb $4 sub $4,1 add $8,$7 lpe mov $3,133 mov $7,$8 lpb $3 add $1,$7 sub $3,1 lpe mov $4,$6 mov $8,0 lpb $4 sub $4,1 add $8,$7 lpe mov $3,120 mov $7,$8 lpb $3 add $1,$7 sub $3,1 lpe mov $4,$6 mov $8,0 lpb $4 sub $4,1 add $8,$7 lpe mov $3,54 mov $7,$8 lpb $3 add $1,$7 sub $3,1 lpe mov $4,$6 mov $8,0 lpb $4 sub $4,1 add $8,$7 lpe mov $3,12 mov $7,$8 lpb $3 add $1,$7 sub $3,1 lpe mov $4,$6 mov $8,0 lpb $4 sub $4,1 add $8,$7 lpe mov $3,1 mov $7,$8 lpb $3 add $1,$7 sub $3,1 lpe
49.902439
3,348
0.849462
[ "Apache-2.0" ]
jmorken/loda
programs/oeis/109/A109116.asm
4,092
Assembly
ori $1, $0, 11 ori $2, $0, 8 ori $3, $0, 8 ori $4, $0, 0 sw $4, 0($0) sw $1, 4($0) sw $2, 8($0) sw $4, 12($0) sw $1, 16($0) sw $2, 20($0) sw $4, 24($0) sw $4, 28($0) sw $2, 32($0) sw $2, 36($0) sw $1, 40($0) sw $4, 44($0) sw $3, 48($0) sw $1, 52($0) sw $3, 56($0) sw $2, 60($0) sw $4, 64($0) sw $3, 68($0) sw $1, 72($0) sw $2, 76($0) sw $1, 80($0) sw $2, 84($0) sw $1, 88($0) sw $4, 92($0) sw $4, 96($0) sw $4, 100($0) sw $2, 104($0) sw $3, 108($0) sw $1, 112($0) sw $3, 116($0) sw $4, 120($0) sw $2, 124($0) lui $2, 2 sltiu $1, $2, 7 sb $2, 0($1) srav $2, $2, $2 TAG1: mfhi $3 sra $4, $2, 12 mtlo $3 sll $0, $0, 0 TAG2: lui $1, 15 ori $1, $4, 3 mult $1, $4 mflo $3 TAG3: lui $2, 2 bgez $2, TAG4 srlv $4, $3, $2 andi $3, $4, 6 TAG4: slt $2, $3, $3 mthi $2 mtlo $2 lui $3, 9 TAG5: mtlo $3 bne $3, $3, TAG6 lui $3, 14 addiu $3, $3, 10 TAG6: sll $0, $0, 0 mtlo $3 mtlo $3 lui $2, 13 TAG7: sll $0, $0, 0 bne $2, $2, TAG8 mflo $2 div $2, $2 TAG8: bltz $2, TAG9 mfhi $4 mult $2, $4 mtlo $4 TAG9: bltz $4, TAG10 lui $1, 9 sll $0, $0, 0 lui $3, 10 TAG10: mfhi $4 beq $3, $3, TAG11 lw $3, 0($4) and $2, $3, $3 TAG11: sll $0, $0, 0 mtlo $4 beq $4, $4, TAG12 slt $4, $4, $4 TAG12: lw $1, 0($4) blez $4, TAG13 addu $4, $1, $1 bgtz $4, TAG13 TAG13: nor $3, $4, $4 lb $2, 1($3) mult $3, $2 beq $2, $4, TAG14 TAG14: lui $4, 14 subu $3, $2, $4 bltz $2, TAG15 sb $2, 0($2) TAG15: mflo $1 lui $2, 14 mthi $1 srav $4, $3, $1 TAG16: sll $0, $0, 0 addiu $2, $1, 12 mfhi $3 lh $3, 0($3) TAG17: slti $1, $3, 3 bne $3, $3, TAG18 mthi $1 xor $1, $3, $1 TAG18: addu $1, $1, $1 mthi $1 ori $3, $1, 9 bgez $1, TAG19 TAG19: addiu $3, $3, 8 divu $3, $3 bgtz $3, TAG20 lui $4, 7 TAG20: sll $0, $0, 0 sll $0, $0, 0 bne $4, $4, TAG21 srl $4, $4, 10 TAG21: beq $4, $4, TAG22 divu $4, $4 mtlo $4 beq $4, $4, TAG22 TAG22: sb $4, -448($4) lui $1, 8 mfhi $3 mflo $4 TAG23: bgtz $4, TAG24 lui $1, 11 bltz $4, TAG24 mtlo $1 TAG24: xori $4, $1, 13 multu $4, $4 sll $0, $0, 0 mtlo $4 TAG25: bltz $4, TAG26 addu $3, $4, $4 bne $3, $3, TAG26 lui $3, 1 TAG26: mflo $2 slt $4, $2, $3 and $4, $2, $4 nor $2, $3, $3 TAG27: sll $0, $0, 0 lbu $3, 0($4) mfhi $4 lbu $1, -192($3) TAG28: sltu $3, $1, $1 mfhi $2 mtlo $1 lhu $3, -192($1) TAG29: bgez $3, TAG30 subu $2, $3, $3 sw $3, 0($3) divu $3, $2 TAG30: sub $4, $2, $2 lbu $3, 0($2) bne $4, $3, TAG31 sh $2, 0($2) TAG31: nor $4, $3, $3 xori $3, $3, 9 lui $1, 5 bne $1, $1, TAG32 TAG32: sltiu $3, $1, 11 sll $2, $3, 7 mtlo $3 bne $3, $2, TAG33 TAG33: srlv $3, $2, $2 sltiu $4, $2, 13 bgez $4, TAG34 lui $1, 11 TAG34: srl $2, $1, 4 sll $0, $0, 0 lui $1, 3 bne $1, $3, TAG35 TAG35: sll $0, $0, 0 multu $4, $4 mflo $3 xori $4, $1, 7 TAG36: lui $1, 4 sll $0, $0, 0 addu $1, $1, $4 sll $0, $0, 0 TAG37: lui $4, 0 mfhi $1 mult $4, $4 mult $1, $1 TAG38: lh $1, 0($1) sb $1, 0($1) mfhi $4 blez $4, TAG39 TAG39: lw $1, 0($4) lui $2, 7 lhu $3, 0($1) mult $3, $1 TAG40: mult $3, $3 bltz $3, TAG41 lh $1, 0($3) sltiu $4, $1, 15 TAG41: bgtz $4, TAG42 lui $3, 9 ori $4, $4, 14 mult $3, $4 TAG42: lui $4, 14 xori $2, $4, 10 sll $0, $0, 0 mthi $2 TAG43: mtlo $2 mfhi $4 lui $1, 8 bltz $1, TAG44 TAG44: mtlo $1 mtlo $1 sll $0, $0, 0 lui $1, 1 TAG45: mthi $1 sll $0, $0, 0 lui $1, 10 bne $2, $2, TAG46 TAG46: mflo $3 addu $3, $1, $3 mtlo $3 srav $3, $3, $1 TAG47: bne $3, $3, TAG48 xori $1, $3, 1 xori $1, $3, 8 addu $1, $3, $3 TAG48: lui $2, 2 subu $4, $2, $2 multu $2, $4 mthi $4 TAG49: sll $3, $4, 1 beq $3, $3, TAG50 sub $2, $3, $3 div $4, $4 TAG50: lhu $1, 0($2) mfhi $2 sb $2, 0($2) lui $2, 6 TAG51: multu $2, $2 mult $2, $2 div $2, $2 lui $2, 5 TAG52: addu $1, $2, $2 sltiu $3, $1, 1 bne $3, $3, TAG53 lui $1, 11 TAG53: sll $0, $0, 0 sll $0, $0, 0 srav $3, $2, $1 xori $2, $2, 3 TAG54: mult $2, $2 mtlo $2 beq $2, $2, TAG55 mtlo $2 TAG55: subu $1, $2, $2 divu $2, $2 mtlo $1 sllv $2, $2, $1 TAG56: sll $0, $0, 0 mult $2, $2 bgtz $4, TAG57 nor $2, $2, $4 TAG57: sltu $1, $2, $2 mtlo $2 sb $1, 0($1) sll $0, $0, 0 TAG58: sw $1, 0($1) xori $1, $1, 7 mtlo $1 sllv $4, $1, $1 TAG59: mflo $3 mflo $3 lb $1, 0($3) multu $4, $1 TAG60: add $2, $1, $1 sltu $2, $2, $1 mthi $2 mthi $2 TAG61: sllv $1, $2, $2 ori $3, $1, 14 srav $4, $1, $1 xori $4, $1, 12 TAG62: div $4, $4 sra $3, $4, 13 bltz $3, TAG63 xori $4, $3, 3 TAG63: addiu $1, $4, 5 mfhi $2 lui $3, 4 mthi $3 TAG64: mfhi $2 bgez $3, TAG65 mfhi $3 or $3, $2, $3 TAG65: mtlo $3 bltz $3, TAG66 divu $3, $3 bltz $3, TAG66 TAG66: mthi $3 mflo $3 bgez $3, TAG67 mfhi $4 TAG67: slt $4, $4, $4 blez $4, TAG68 sh $4, 0($4) sltiu $1, $4, 15 TAG68: lui $4, 8 mflo $2 sra $2, $4, 6 mflo $2 TAG69: bgez $2, TAG70 sra $4, $2, 1 mthi $2 lhu $2, 0($4) TAG70: bne $2, $2, TAG71 sb $2, 0($2) nor $3, $2, $2 lui $3, 1 TAG71: beq $3, $3, TAG72 mthi $3 addi $4, $3, 4 bne $3, $3, TAG72 TAG72: addu $2, $4, $4 mtlo $4 lui $2, 12 lui $4, 9 TAG73: sll $0, $0, 0 lui $4, 10 lui $2, 5 mflo $2 TAG74: multu $2, $2 lh $2, 0($2) lui $3, 1 lui $3, 14 TAG75: mthi $3 mtlo $3 mtlo $3 bne $3, $3, TAG76 TAG76: mfhi $4 sll $0, $0, 0 sll $0, $0, 0 addiu $3, $1, 14 TAG77: sh $3, 0($3) lui $1, 2 bne $3, $1, TAG78 slt $3, $3, $1 TAG78: mfhi $3 slt $4, $3, $3 mflo $1 beq $3, $4, TAG79 TAG79: multu $1, $1 lui $2, 15 or $4, $1, $1 mflo $2 TAG80: sb $2, 0($2) mfhi $4 lh $1, -196($4) subu $2, $4, $4 TAG81: blez $2, TAG82 sh $2, 0($2) sw $2, 0($2) bltz $2, TAG82 TAG82: mtlo $2 mfhi $3 mthi $3 mflo $4 TAG83: mthi $4 lui $1, 10 ori $1, $1, 10 beq $1, $4, TAG84 TAG84: sll $0, $0, 0 beq $1, $1, TAG85 sll $0, $0, 0 sh $1, 0($4) TAG85: bgez $4, TAG86 lhu $1, 0($4) mthi $4 mthi $1 TAG86: mflo $4 lui $2, 0 beq $4, $1, TAG87 srl $1, $1, 8 TAG87: sw $1, 0($1) lhu $2, 0($1) bltz $2, TAG88 mfhi $2 TAG88: beq $2, $2, TAG89 lui $1, 7 mthi $1 bgtz $1, TAG89 TAG89: lui $4, 8 mtlo $1 bgez $4, TAG90 mult $4, $4 TAG90: bne $4, $4, TAG91 mult $4, $4 mult $4, $4 blez $4, TAG91 TAG91: sra $2, $4, 6 xori $2, $4, 8 beq $2, $4, TAG92 lui $2, 11 TAG92: blez $2, TAG93 mult $2, $2 xori $3, $2, 3 bne $2, $2, TAG93 TAG93: lui $4, 10 mtlo $3 mfhi $2 mtlo $4 TAG94: mthi $2 sb $2, 0($2) sb $2, 0($2) mtlo $2 TAG95: mfhi $3 lb $1, 0($3) bgez $1, TAG96 lui $2, 13 TAG96: addiu $1, $2, 10 lui $4, 10 beq $1, $1, TAG97 srav $3, $1, $1 TAG97: sll $0, $0, 0 sb $1, -832($3) mfhi $2 sll $0, $0, 0 TAG98: srl $2, $1, 6 bgez $2, TAG99 sll $2, $1, 9 lui $2, 14 TAG99: bne $2, $2, TAG100 sll $0, $0, 0 andi $1, $2, 10 sll $0, $0, 0 TAG100: beq $1, $1, TAG101 sub $1, $1, $1 mfhi $4 sw $4, 0($1) TAG101: lui $2, 3 bltz $2, TAG102 divu $4, $2 bne $4, $4, TAG102 TAG102: mflo $4 mfhi $4 bne $2, $4, TAG103 subu $2, $4, $4 TAG103: sb $2, 0($2) lui $3, 15 sb $2, 0($2) lui $4, 1 TAG104: xori $1, $4, 5 bltz $4, TAG105 mthi $1 bgez $1, TAG105 TAG105: mtlo $1 sll $0, $0, 0 lui $1, 4 beq $2, $2, TAG106 TAG106: multu $1, $1 lui $1, 7 mtlo $1 bne $1, $1, TAG107 TAG107: sltu $3, $1, $1 beq $3, $1, TAG108 multu $3, $1 mthi $3 TAG108: addi $1, $3, 3 srl $3, $1, 1 addiu $1, $3, 13 sltu $1, $3, $1 TAG109: mflo $3 mflo $2 srav $3, $2, $2 mult $1, $3 TAG110: beq $3, $3, TAG111 ori $4, $3, 5 lh $3, 0($4) mthi $3 TAG111: mflo $4 andi $1, $3, 2 lbu $1, 0($4) bgez $3, TAG112 TAG112: add $3, $1, $1 lh $1, 0($1) sh $1, 0($3) lh $1, 0($1) TAG113: blez $1, TAG114 addiu $2, $1, 7 subu $4, $2, $1 srlv $3, $1, $2 TAG114: bgtz $3, TAG115 mtlo $3 mflo $3 lui $1, 1 TAG115: lui $4, 5 mult $4, $1 mtlo $1 mthi $4 TAG116: sll $0, $0, 0 and $2, $4, $4 mthi $4 mthi $2 TAG117: mtlo $2 sll $0, $0, 0 sll $3, $2, 10 mflo $1 TAG118: sll $0, $0, 0 div $1, $1 bgez $1, TAG119 sra $4, $1, 4 TAG119: sll $0, $0, 0 beq $2, $2, TAG120 mthi $4 bne $2, $2, TAG120 TAG120: mult $2, $2 beq $2, $2, TAG121 lui $3, 11 bne $3, $3, TAG121 TAG121: or $2, $3, $3 beq $2, $3, TAG122 mfhi $4 mtlo $2 TAG122: lb $2, 0($4) lbu $3, 0($2) sb $2, 0($4) sll $1, $2, 14 TAG123: bltz $1, TAG124 sh $1, 0($1) mthi $1 lui $2, 1 TAG124: sll $0, $0, 0 mult $2, $2 sll $0, $0, 0 bltz $2, TAG125 TAG125: sll $0, $0, 0 blez $2, TAG126 mthi $2 lui $3, 5 TAG126: or $1, $3, $3 bgtz $1, TAG127 lui $2, 1 lbu $1, 0($1) TAG127: sll $0, $0, 0 sll $0, $0, 0 mtlo $2 or $4, $4, $4 TAG128: beq $4, $4, TAG129 mflo $4 lui $2, 0 lh $1, 0($2) TAG129: blez $1, TAG130 mfhi $2 sll $0, $0, 0 mflo $1 TAG130: beq $1, $1, TAG131 sll $0, $0, 0 mthi $1 sra $1, $1, 1 TAG131: beq $1, $1, TAG132 mthi $1 mflo $2 sra $1, $2, 9 TAG132: div $1, $1 blez $1, TAG133 mfhi $2 bgez $1, TAG133 TAG133: sltiu $1, $2, 8 sllv $1, $1, $2 div $1, $1 multu $1, $1 TAG134: lb $1, 0($1) mult $1, $1 sltiu $2, $1, 11 lui $2, 14 TAG135: addu $4, $2, $2 ori $1, $2, 11 bne $1, $1, TAG136 mtlo $2 TAG136: sll $0, $0, 0 mthi $4 andi $4, $1, 14 mthi $4 TAG137: mtlo $4 multu $4, $4 mflo $3 lui $2, 14 TAG138: nor $2, $2, $2 bgtz $2, TAG139 sll $0, $0, 0 bne $2, $2, TAG139 TAG139: andi $3, $2, 2 sll $0, $0, 0 sll $2, $3, 0 bne $3, $2, TAG140 TAG140: mfhi $1 mtlo $2 lui $1, 12 sh $1, 0($2) TAG141: and $2, $1, $1 bgez $2, TAG142 lui $3, 2 srav $3, $1, $1 TAG142: multu $3, $3 lui $3, 9 blez $3, TAG143 multu $3, $3 TAG143: bne $3, $3, TAG144 mtlo $3 sll $0, $0, 0 sll $0, $0, 0 TAG144: mflo $1 multu $1, $1 lui $3, 1 beq $1, $1, TAG145 TAG145: lui $4, 10 mfhi $2 bgez $3, TAG146 slti $1, $2, 14 TAG146: lui $4, 7 mtlo $1 mflo $2 mfhi $2 TAG147: lb $4, 0($2) sra $1, $4, 3 mfhi $2 sw $1, 0($1) TAG148: divu $2, $2 subu $3, $2, $2 mult $2, $2 multu $3, $3 TAG149: beq $3, $3, TAG150 lhu $2, 0($3) sb $2, 0($2) lui $1, 15 TAG150: sra $1, $1, 8 addu $3, $1, $1 bgtz $3, TAG151 lui $3, 15 TAG151: sll $0, $0, 0 divu $3, $3 addiu $4, $3, 11 bgez $3, TAG152 TAG152: lui $3, 3 mfhi $1 addu $3, $4, $1 beq $1, $3, TAG153 TAG153: mthi $3 sll $0, $0, 0 bne $1, $1, TAG154 slt $3, $1, $3 TAG154: sllv $1, $3, $3 mfhi $4 sltu $3, $4, $4 sb $3, 0($1) TAG155: sh $3, 0($3) bne $3, $3, TAG156 subu $1, $3, $3 mfhi $2 TAG156: bltz $2, TAG157 andi $1, $2, 13 mflo $1 mtlo $1 TAG157: bgez $1, TAG158 subu $1, $1, $1 lh $1, 0($1) lui $1, 0 TAG158: sra $4, $1, 15 addiu $4, $1, 11 bgez $4, TAG159 lb $3, 0($4) TAG159: lw $1, 0($3) multu $3, $3 bgtz $1, TAG160 lui $2, 3 TAG160: beq $2, $2, TAG161 mthi $2 subu $1, $2, $2 mflo $2 TAG161: lui $4, 11 beq $2, $2, TAG162 lui $1, 6 lui $1, 1 TAG162: multu $1, $1 sltu $1, $1, $1 lhu $4, 0($1) mthi $1 TAG163: addu $3, $4, $4 srl $4, $3, 4 mult $4, $3 sw $4, 0($4) TAG164: lh $2, 0($4) mflo $1 lb $4, 0($2) multu $4, $4 TAG165: lbu $2, 0($4) bne $2, $4, TAG166 mfhi $3 andi $1, $3, 8 TAG166: multu $1, $1 lw $1, 0($1) lhu $1, 0($1) slti $2, $1, 13 TAG167: blez $2, TAG168 mflo $1 bgtz $2, TAG168 subu $3, $2, $1 TAG168: sb $3, 0($3) sltiu $4, $3, 3 lbu $2, 0($3) mfhi $3 TAG169: sll $1, $3, 12 mfhi $1 sb $3, 0($3) mflo $4 TAG170: beq $4, $4, TAG171 multu $4, $4 mflo $2 bgtz $4, TAG171 TAG171: srl $3, $2, 15 mfhi $4 multu $4, $4 lui $1, 7 TAG172: sll $0, $0, 0 div $1, $1 subu $3, $1, $1 mflo $3 TAG173: lb $3, 0($3) div $3, $3 sll $1, $3, 2 mult $1, $3 TAG174: sw $1, 0($1) mtlo $1 addiu $3, $1, 4 mtlo $3 TAG175: bltz $3, TAG176 sh $3, 0($3) bgez $3, TAG176 sllv $1, $3, $3 TAG176: mfhi $4 beq $4, $4, TAG177 xori $2, $1, 13 bne $1, $1, TAG177 TAG177: mtlo $2 sra $4, $2, 3 bltz $2, TAG178 lui $3, 6 TAG178: sll $3, $3, 13 sll $0, $0, 0 srl $1, $3, 11 sll $0, $0, 0 TAG179: sll $0, $0, 0 beq $1, $1, TAG180 mult $1, $1 lui $2, 7 TAG180: sll $0, $0, 0 mflo $4 beq $4, $2, TAG181 mtlo $2 TAG181: lui $3, 8 mtlo $4 blez $3, TAG182 addu $4, $3, $3 TAG182: mtlo $4 bne $4, $4, TAG183 mthi $4 sll $0, $0, 0 TAG183: addiu $1, $4, 3 div $4, $1 sll $0, $0, 0 sll $0, $0, 0 TAG184: beq $1, $1, TAG185 slt $2, $1, $1 bltz $2, TAG185 sw $1, 0($1) TAG185: mthi $2 lui $4, 0 bne $4, $4, TAG186 lui $4, 8 TAG186: bgez $4, TAG187 mfhi $1 multu $1, $4 mthi $1 TAG187: lbu $3, 0($1) lbu $3, 0($3) mult $3, $3 mthi $3 TAG188: sw $3, 0($3) sltiu $1, $3, 11 mflo $1 beq $3, $1, TAG189 TAG189: sh $1, 0($1) slti $4, $1, 9 srl $4, $4, 11 mult $1, $1 TAG190: mtlo $4 sll $2, $4, 1 sh $2, 0($2) mult $4, $2 TAG191: bne $2, $2, TAG192 lui $3, 3 sll $0, $0, 0 lui $2, 6 TAG192: mtlo $2 multu $2, $2 mthi $2 lui $4, 8 TAG193: multu $4, $4 bgez $4, TAG194 mthi $4 blez $4, TAG194 TAG194: mtlo $4 mtlo $4 mult $4, $4 lui $2, 9 TAG195: ori $2, $2, 10 or $4, $2, $2 bgez $4, TAG196 or $3, $2, $2 TAG196: sll $0, $0, 0 mfhi $2 bgez $1, TAG197 subu $1, $2, $1 TAG197: addiu $4, $1, 15 mflo $1 mflo $2 addi $1, $1, 8 TAG198: bne $1, $1, TAG199 lui $4, 12 lb $3, 0($1) mthi $1 TAG199: blez $3, TAG200 mthi $3 div $3, $3 xori $2, $3, 15 TAG200: sb $2, 0($2) sb $2, 0($2) lui $1, 4 srlv $1, $1, $2 TAG201: mtlo $1 lhu $1, -2048($1) mthi $1 multu $1, $1 TAG202: mtlo $1 ori $3, $1, 5 mflo $2 addiu $2, $2, 12 TAG203: bne $2, $2, TAG204 mfhi $3 sw $3, 0($3) srl $4, $3, 12 TAG204: xori $2, $4, 8 bgez $4, TAG205 srlv $3, $4, $2 sh $2, 0($2) TAG205: sw $3, 0($3) bgez $3, TAG206 xori $2, $3, 15 lui $2, 3 TAG206: bgez $2, TAG207 mtlo $2 mthi $2 add $3, $2, $2 TAG207: add $1, $3, $3 srav $3, $3, $3 beq $1, $3, TAG208 multu $3, $3 TAG208: xori $3, $3, 7 addu $4, $3, $3 sb $3, 0($3) lui $3, 9 TAG209: sll $0, $0, 0 beq $3, $3, TAG210 sllv $2, $3, $3 mflo $3 TAG210: mthi $3 bne $3, $3, TAG211 sltu $4, $3, $3 div $3, $3 TAG211: bgtz $4, TAG212 nor $3, $4, $4 mfhi $3 blez $4, TAG212 TAG212: sh $3, 0($3) sh $3, 0($3) mfhi $4 beq $4, $3, TAG213 TAG213: sllv $4, $4, $4 lb $1, 0($4) lui $1, 5 add $4, $4, $1 TAG214: slt $4, $4, $4 bgez $4, TAG215 sb $4, 0($4) sb $4, 0($4) TAG215: mfhi $3 multu $3, $3 lui $1, 7 or $1, $1, $1 TAG216: lui $2, 2 sltiu $2, $1, 11 mult $1, $2 sb $2, 0($2) TAG217: andi $2, $2, 9 addiu $1, $2, 3 lui $1, 2 blez $2, TAG218 TAG218: sll $4, $1, 5 sllv $2, $4, $4 sll $0, $0, 0 bgtz $4, TAG219 TAG219: xori $1, $4, 1 mtlo $4 and $3, $1, $4 mflo $4 TAG220: beq $4, $4, TAG221 div $4, $4 and $2, $4, $4 mtlo $4 TAG221: divu $2, $2 and $4, $2, $2 blez $4, TAG222 or $2, $2, $4 TAG222: sll $0, $0, 0 sll $0, $0, 0 multu $4, $2 mtlo $1 TAG223: sll $0, $0, 0 sll $0, $0, 0 multu $4, $4 xor $3, $4, $4 TAG224: lbu $4, 0($3) mtlo $4 lui $1, 2 mflo $1 TAG225: bltz $1, TAG226 lui $2, 9 xori $4, $2, 6 mfhi $2 TAG226: lui $4, 13 sll $0, $0, 0 lw $4, -4096($2) xori $2, $2, 2 TAG227: addu $2, $2, $2 lb $3, -8196($2) mtlo $2 bgtz $2, TAG228 TAG228: mfhi $4 mflo $4 beq $4, $3, TAG229 lhu $1, -8196($4) TAG229: mflo $4 ori $3, $4, 11 mthi $1 mthi $4 TAG230: sltiu $4, $3, 4 beq $4, $4, TAG231 subu $4, $4, $4 bne $4, $4, TAG231 TAG231: mult $4, $4 lh $4, 0($4) sb $4, 0($4) sb $4, 0($4) TAG232: slti $2, $4, 5 bgtz $2, TAG233 mult $4, $4 sll $3, $4, 1 TAG233: sll $0, $0, 0 sw $3, -8207($3) mthi $3 lbu $4, 0($2) TAG234: bltz $4, TAG235 mtlo $4 lui $4, 1 lui $3, 10 TAG235: lui $2, 0 divu $2, $3 sll $0, $0, 0 mthi $2 TAG236: mflo $3 sb $2, 0($3) lh $2, 0($2) div $2, $2 TAG237: lui $4, 5 srav $2, $2, $2 bne $2, $4, TAG238 sltu $3, $4, $2 TAG238: lbu $1, 0($3) lhu $3, 0($1) mthi $3 bne $3, $1, TAG239 TAG239: div $3, $3 beq $3, $3, TAG240 mtlo $3 bgez $3, TAG240 TAG240: xor $4, $3, $3 ori $3, $4, 6 sb $4, 0($3) lb $1, 0($3) TAG241: blez $1, TAG242 xor $2, $1, $1 sh $2, 0($1) lbu $2, 0($2) TAG242: sb $2, 0($2) mfhi $1 lw $3, 0($2) lui $3, 2 TAG243: multu $3, $3 beq $3, $3, TAG244 ori $4, $3, 5 lui $2, 7 TAG244: mflo $1 lui $4, 14 subu $1, $1, $4 lui $4, 8 TAG245: sll $4, $4, 3 sll $0, $0, 0 blez $4, TAG246 div $4, $4 TAG246: lui $2, 7 sll $0, $0, 0 bgtz $2, TAG247 sll $0, $0, 0 TAG247: sll $0, $0, 0 lui $1, 8 bltz $1, TAG248 mfhi $2 TAG248: mflo $2 sb $2, 0($2) slt $4, $2, $2 sllv $3, $2, $2 TAG249: bne $3, $3, TAG250 sh $3, 0($3) lh $1, 0($3) mtlo $1 TAG250: bne $1, $1, TAG251 mfhi $2 mult $2, $2 lh $4, 0($1) TAG251: beq $4, $4, TAG252 div $4, $4 mult $4, $4 lui $3, 7 TAG252: multu $3, $3 lh $3, 0($3) sb $3, 0($3) sh $3, 0($3) TAG253: bne $3, $3, TAG254 lh $4, 0($3) addu $3, $4, $3 lui $1, 15 TAG254: sll $0, $0, 0 beq $1, $1, TAG255 sll $3, $1, 10 mfhi $2 TAG255: xor $1, $2, $2 xor $4, $1, $2 nor $2, $2, $4 mult $4, $4 TAG256: mtlo $2 div $2, $2 mfhi $3 mtlo $3 TAG257: srl $2, $3, 14 bne $3, $3, TAG258 lhu $1, 0($3) mult $1, $3 TAG258: addiu $3, $1, 6 divu $3, $3 sltu $2, $3, $1 addu $2, $2, $1 TAG259: mult $2, $2 divu $2, $2 and $4, $2, $2 mthi $4 TAG260: bgez $4, TAG261 sh $4, -256($4) lw $3, 0($4) bltz $3, TAG261 TAG261: sra $4, $3, 1 sb $3, -131($4) subu $4, $4, $4 bne $4, $3, TAG262 TAG262: mfhi $2 lui $1, 12 sb $4, 0($4) lui $3, 11 TAG263: sra $3, $3, 0 mthi $3 bltz $3, TAG264 lui $3, 4 TAG264: mfhi $1 divu $3, $1 sll $4, $3, 11 multu $1, $1 TAG265: beq $4, $4, TAG266 mflo $1 sltiu $4, $4, 12 add $4, $4, $1 TAG266: mfhi $3 lui $1, 13 xor $2, $1, $4 beq $4, $4, TAG267 TAG267: sll $0, $0, 0 blez $2, TAG268 and $1, $2, $2 bltz $1, TAG268 TAG268: sll $0, $0, 0 mthi $1 bne $1, $1, TAG269 srav $4, $1, $1 TAG269: addu $2, $4, $4 sll $0, $0, 0 sll $0, $0, 0 blez $4, TAG270 TAG270: srl $1, $2, 10 sll $0, $0, 0 bgtz $1, TAG271 div $2, $1 TAG271: xor $3, $4, $4 multu $3, $3 lui $2, 13 bne $3, $3, TAG272 TAG272: lui $4, 14 mfhi $3 multu $4, $2 bltz $4, TAG273 TAG273: mtlo $3 mfhi $2 mfhi $1 lw $3, 0($3) TAG274: mult $3, $3 mtlo $3 slt $2, $3, $3 bgez $2, TAG275 TAG275: multu $2, $2 mtlo $2 sw $2, 0($2) and $4, $2, $2 TAG276: multu $4, $4 bltz $4, TAG277 lui $4, 1 sll $0, $0, 0 TAG277: lui $4, 7 lui $3, 5 sll $0, $0, 0 sh $3, -182($1) TAG278: sll $0, $0, 0 lbu $3, 0($2) mfhi $1 bgez $1, TAG279 TAG279: sh $1, 0($1) sll $3, $1, 1 addiu $3, $1, 4 mflo $1 TAG280: mthi $1 bltz $1, TAG281 mthi $1 mthi $1 TAG281: bne $1, $1, TAG282 lh $2, 0($1) mthi $2 sb $2, 0($2) TAG282: bne $2, $2, TAG283 mflo $4 mtlo $2 lui $4, 11 TAG283: beq $4, $4, TAG284 sltiu $3, $4, 6 lui $1, 2 sb $3, 0($1) TAG284: bgtz $1, TAG285 lw $2, 0($1) sw $1, 0($2) lui $3, 12 TAG285: subu $2, $3, $3 nor $3, $3, $2 bltz $2, TAG286 mtlo $3 TAG286: mtlo $3 mult $3, $3 divu $3, $3 multu $3, $3 TAG287: bgtz $3, TAG288 lui $4, 11 or $2, $3, $4 mult $2, $2 TAG288: bne $2, $2, TAG289 slti $2, $2, 9 bgtz $2, TAG289 div $2, $2 TAG289: mtlo $2 lui $1, 15 sll $1, $2, 9 nor $1, $1, $1 TAG290: blez $1, TAG291 lw $1, 513($1) multu $1, $1 mfhi $1 TAG291: sltu $3, $1, $1 bgez $3, TAG292 lb $3, 0($3) bgtz $1, TAG292 TAG292: lh $1, 0($3) mtlo $3 mfhi $2 mtlo $1 TAG293: beq $2, $2, TAG294 mthi $2 lui $4, 14 mflo $4 TAG294: slti $4, $4, 1 lw $1, 0($4) andi $2, $1, 10 sub $2, $4, $2 TAG295: sb $2, 0($2) mfhi $2 sltiu $1, $2, 4 sh $2, 0($2) TAG296: lui $2, 9 bgez $1, TAG297 mflo $2 lh $2, 0($2) TAG297: lw $4, 0($2) mthi $2 beq $2, $4, TAG298 mflo $1 TAG298: mult $1, $1 sb $1, 0($1) beq $1, $1, TAG299 lbu $2, 0($1) TAG299: bgez $2, TAG300 lb $2, 0($2) bne $2, $2, TAG300 mtlo $2 TAG300: lhu $3, 0($2) bne $2, $3, TAG301 multu $2, $3 mthi $3 TAG301: bne $3, $3, TAG302 mflo $2 lb $4, 0($3) lui $1, 13 TAG302: mflo $1 sltu $1, $1, $1 slt $1, $1, $1 mflo $4 TAG303: bne $4, $4, TAG304 lhu $2, 0($4) beq $2, $2, TAG304 sw $4, 0($2) TAG304: sltiu $2, $2, 5 bne $2, $2, TAG305 addiu $4, $2, 9 lbu $1, 0($2) TAG305: mfhi $2 lui $4, 0 and $2, $2, $1 mthi $2 TAG306: beq $2, $2, TAG307 lui $1, 9 sw $2, 0($1) andi $1, $2, 7 TAG307: sll $0, $0, 0 mfhi $1 mtlo $4 and $4, $4, $1 TAG308: mflo $3 lui $4, 6 sll $0, $0, 0 lhu $3, 0($3) TAG309: mtlo $3 multu $3, $3 addu $4, $3, $3 mult $3, $4 TAG310: sw $4, 0($4) sh $4, 0($4) bgtz $4, TAG311 lb $4, 0($4) TAG311: multu $4, $4 mthi $4 mthi $4 mthi $4 TAG312: addu $4, $4, $4 ori $1, $4, 12 bne $4, $4, TAG313 sw $4, 0($4) TAG313: mfhi $1 mthi $1 beq $1, $1, TAG314 lui $1, 5 TAG314: mult $1, $1 beq $1, $1, TAG315 mult $1, $1 mflo $3 TAG315: blez $3, TAG316 addu $2, $3, $3 lui $1, 8 sll $4, $2, 8 TAG316: lui $1, 1 sh $1, 0($4) sll $0, $0, 0 sll $0, $0, 0 TAG317: div $1, $1 mtlo $1 bgtz $1, TAG318 or $1, $1, $1 TAG318: multu $1, $1 sll $0, $0, 0 bltz $3, TAG319 mult $1, $3 TAG319: lui $2, 0 sw $2, 0($2) lui $1, 11 lhu $3, 0($2) TAG320: andi $3, $3, 15 multu $3, $3 mfhi $2 mult $3, $2 TAG321: srlv $1, $2, $2 bltz $2, TAG322 mult $2, $1 mflo $1 TAG322: slti $4, $1, 3 lui $1, 2 mfhi $3 srlv $3, $1, $3 TAG323: lui $2, 13 blez $2, TAG324 sll $0, $0, 0 lui $3, 15 TAG324: xor $1, $3, $3 and $4, $1, $1 mtlo $1 mflo $4 TAG325: mult $4, $4 mfhi $3 xor $3, $4, $4 mflo $1 TAG326: lw $2, 0($1) lui $2, 7 slt $1, $1, $2 lui $4, 0 TAG327: blez $4, TAG328 mult $4, $4 divu $4, $4 lb $2, 0($4) TAG328: sll $0, $0, 0 sll $0, $0, 0 sll $0, $0, 0 sll $0, $0, 0 TAG329: mtlo $4 nor $3, $4, $4 mtlo $4 sb $4, 1($3) TAG330: sra $1, $3, 9 sh $1, 1($3) sllv $2, $3, $3 bgtz $3, TAG331 TAG331: addu $2, $2, $2 srlv $3, $2, $2 addi $1, $3, 3 beq $1, $2, TAG332 TAG332: xor $1, $1, $1 lh $2, 0($1) bne $1, $2, TAG333 lui $1, 0 TAG333: sb $1, 0($1) lui $1, 9 lui $4, 15 lui $2, 9 TAG334: sll $0, $0, 0 sra $1, $3, 2 mfhi $3 mult $2, $1 TAG335: srl $4, $3, 15 addu $2, $4, $3 nor $2, $3, $2 mfhi $3 TAG336: lbu $3, 0($3) mtlo $3 beq $3, $3, TAG337 sllv $2, $3, $3 TAG337: lui $1, 5 mtlo $1 lui $2, 1 sll $0, $0, 0 TAG338: lw $2, 0($3) mflo $1 lui $3, 1 mult $3, $3 TAG339: slti $2, $3, 15 sll $0, $0, 0 sll $0, $0, 0 lh $3, 0($2) TAG340: beq $3, $3, TAG341 mthi $3 mtlo $3 sltu $4, $3, $3 TAG341: or $2, $4, $4 mfhi $3 beq $3, $3, TAG342 mthi $4 TAG342: bgtz $3, TAG343 lw $1, 256($3) sltiu $1, $1, 0 multu $3, $3 TAG343: sllv $3, $1, $1 addiu $1, $3, 1 lui $1, 10 mult $1, $1 TAG344: mult $1, $1 bne $1, $1, TAG345 mflo $2 sh $1, 0($2) TAG345: mflo $3 mtlo $3 bgez $2, TAG346 or $4, $3, $2 TAG346: sw $4, 0($4) bgez $4, TAG347 lh $2, 0($4) addu $3, $4, $4 TAG347: sb $3, 0($3) mtlo $3 mfhi $2 sb $3, 0($3) TAG348: sh $2, 0($2) bne $2, $2, TAG349 mthi $2 mfhi $2 TAG349: lui $3, 5 bltz $2, TAG350 andi $4, $3, 13 sra $3, $4, 5 TAG350: sw $3, 0($3) subu $3, $3, $3 multu $3, $3 mthi $3 TAG351: multu $3, $3 mthi $3 mult $3, $3 sw $3, 0($3) TAG352: sb $3, 0($3) mtlo $3 sh $3, 0($3) lui $2, 7 TAG353: mtlo $2 sll $0, $0, 0 sll $0, $0, 0 subu $1, $2, $2 TAG354: mthi $1 addi $2, $1, 6 lui $2, 10 addi $1, $1, 7 TAG355: addiu $2, $1, 12 lb $2, 0($1) divu $2, $1 lui $1, 2 TAG356: bgez $1, TAG357 addiu $4, $1, 3 sll $4, $1, 14 bgtz $1, TAG357 TAG357: sra $4, $4, 7 ori $1, $4, 13 mfhi $4 subu $1, $4, $1 TAG358: beq $1, $1, TAG359 mfhi $4 mthi $4 bne $1, $4, TAG359 TAG359: mfhi $3 mult $4, $3 lh $4, 0($4) mtlo $4 TAG360: slt $1, $4, $4 bgtz $4, TAG361 addi $3, $1, 8 mult $1, $1 TAG361: divu $3, $3 mfhi $3 multu $3, $3 lui $1, 0 TAG362: mult $1, $1 mult $1, $1 subu $1, $1, $1 mfhi $4 TAG363: bgez $4, TAG364 lui $3, 5 lui $3, 0 mtlo $3 TAG364: mfhi $1 sll $0, $0, 0 lui $1, 9 sll $0, $0, 0 TAG365: sltiu $3, $1, 10 lui $1, 5 mflo $3 blez $1, TAG366 TAG366: mflo $1 mflo $4 lui $3, 14 blez $3, TAG367 TAG367: sll $1, $3, 6 mtlo $3 subu $2, $1, $3 mthi $3 TAG368: subu $3, $2, $2 lui $1, 7 lui $1, 14 mfhi $3 TAG369: sll $0, $0, 0 or $1, $3, $3 srl $1, $1, 14 mfhi $4 TAG370: mfhi $2 mfhi $3 mfhi $4 bgez $3, TAG371 TAG371: sll $0, $0, 0 mtlo $4 bgtz $3, TAG372 mflo $1 TAG372: sll $0, $0, 0 sll $0, $0, 0 xor $1, $4, $4 sll $0, $0, 0 TAG373: sltiu $3, $1, 7 mult $3, $3 mthi $1 mthi $3 TAG374: mflo $2 mtlo $2 srl $4, $2, 8 lbu $1, 0($4) TAG375: lui $2, 13 bne $2, $1, TAG376 lbu $4, 0($1) mflo $1 TAG376: sll $4, $1, 4 lb $4, 0($1) ori $3, $4, 0 lbu $3, 0($4) TAG377: beq $3, $3, TAG378 addi $3, $3, 5 bgtz $3, TAG378 mult $3, $3 TAG378: lb $1, 0($3) sltu $1, $1, $3 mtlo $3 lui $1, 8 TAG379: beq $1, $1, TAG380 sll $0, $0, 0 mfhi $2 lhu $3, 0($2) TAG380: mult $3, $3 sb $3, 0($3) beq $3, $3, TAG381 mfhi $1 TAG381: bne $1, $1, TAG382 mflo $2 lbu $3, 0($2) lw $1, 0($3) TAG382: srav $1, $1, $1 multu $1, $1 addiu $1, $1, 1 mthi $1 TAG383: lbu $4, 0($1) mtlo $1 lui $2, 7 sltiu $2, $1, 4 TAG384: multu $2, $2 mflo $2 bne $2, $2, TAG385 divu $2, $2 TAG385: bgez $2, TAG386 multu $2, $2 lui $3, 11 addu $4, $3, $3 TAG386: lui $2, 12 mfhi $2 mtlo $4 mflo $4 TAG387: sb $4, 0($4) multu $4, $4 addiu $4, $4, 14 divu $4, $4 TAG388: lh $4, 0($4) sh $4, 0($4) mflo $1 lb $2, 0($1) TAG389: addi $3, $2, 1 srlv $4, $2, $3 multu $4, $2 mtlo $4 TAG390: mfhi $3 sub $4, $4, $4 blez $4, TAG391 sw $4, 0($4) TAG391: xor $4, $4, $4 mflo $2 and $1, $4, $4 bltz $2, TAG392 TAG392: lui $2, 10 div $2, $2 lui $3, 12 bgez $1, TAG393 TAG393: div $3, $3 sll $0, $0, 0 lui $2, 10 divu $3, $3 TAG394: bgtz $2, TAG395 sll $0, $0, 0 sltiu $3, $2, 9 lui $3, 0 TAG395: mfhi $1 xor $4, $1, $3 sltiu $4, $1, 2 and $2, $4, $3 TAG396: bgtz $2, TAG397 lbu $1, 0($2) bgtz $2, TAG397 mfhi $1 TAG397: bne $1, $1, TAG398 srav $1, $1, $1 beq $1, $1, TAG398 lhu $4, 0($1) TAG398: lb $4, 0($4) lbu $3, 0($4) mthi $4 andi $4, $4, 12 TAG399: bgtz $4, TAG400 lbu $1, 0($4) lui $3, 15 addu $4, $1, $3 TAG400: mflo $1 div $4, $1 mthi $1 mflo $4 TAG401: sll $4, $4, 4 blez $4, TAG402 mthi $4 sll $0, $0, 0 TAG402: sll $0, $0, 0 mtlo $4 sll $0, $0, 0 mthi $4 TAG403: mtlo $4 bne $4, $4, TAG404 lui $1, 1 bne $1, $4, TAG404 TAG404: mthi $1 slt $3, $1, $1 lui $3, 10 lui $1, 14 TAG405: beq $1, $1, TAG406 andi $3, $1, 14 lh $4, 0($3) lbu $3, 0($4) TAG406: sltiu $1, $3, 1 sb $1, 0($1) bne $3, $1, TAG407 sh $3, 0($3) TAG407: slt $3, $1, $1 mfhi $4 addiu $1, $3, 7 bgez $3, TAG408 TAG408: mthi $1 mtlo $1 beq $1, $1, TAG409 divu $1, $1 TAG409: slt $4, $1, $1 mflo $4 multu $1, $1 multu $4, $4 TAG410: sb $4, 0($4) multu $4, $4 blez $4, TAG411 sb $4, 0($4) TAG411: divu $4, $4 blez $4, TAG412 lui $3, 15 xori $3, $4, 3 TAG412: lui $4, 10 mtlo $3 beq $3, $4, TAG413 sll $0, $0, 0 TAG413: sll $1, $1, 11 beq $1, $1, TAG414 lui $2, 8 blez $2, TAG414 TAG414: sll $0, $0, 0 sll $0, $0, 0 lui $1, 14 slt $4, $1, $2 TAG415: mfhi $2 slti $3, $2, 11 lui $4, 10 sllv $2, $2, $4 TAG416: mult $2, $2 bgtz $2, TAG417 sltiu $3, $2, 3 blez $3, TAG417 TAG417: lui $1, 2 div $3, $3 or $3, $3, $3 srav $2, $3, $3 TAG418: mult $2, $2 mflo $4 lui $1, 7 lb $1, 0($2) TAG419: slt $4, $1, $1 slti $1, $1, 13 multu $1, $1 mthi $1 TAG420: andi $1, $1, 14 lui $2, 5 mtlo $1 addiu $1, $2, 14 TAG421: bgez $1, TAG422 sll $0, $0, 0 mtlo $1 lw $2, 0($1) TAG422: bgez $2, TAG423 mflo $4 div $4, $2 sw $2, 0($4) TAG423: mtlo $4 bgtz $4, TAG424 sw $4, 0($4) bne $4, $4, TAG424 TAG424: mflo $1 lb $2, 0($4) lui $1, 11 lui $1, 2 TAG425: mfhi $2 mtlo $2 beq $1, $1, TAG426 lbu $1, 0($2) TAG426: nor $3, $1, $1 mfhi $1 bne $3, $3, TAG427 nor $1, $1, $1 TAG427: sll $0, $0, 0 lui $1, 14 sll $0, $0, 0 addu $2, $1, $1 TAG428: nor $3, $2, $2 sll $0, $0, 0 srl $3, $3, 5 bne $2, $3, TAG429 TAG429: sll $0, $0, 0 bne $3, $3, TAG430 lui $2, 12 mfhi $2 TAG430: lui $1, 7 lbu $1, 0($2) mtlo $2 sra $1, $1, 6 TAG431: lui $1, 6 lui $3, 2 srl $2, $1, 13 lbu $2, 0($2) TAG432: lw $3, 0($2) lh $2, 0($2) bltz $3, TAG433 multu $2, $3 TAG433: divu $2, $2 srl $1, $2, 5 ori $2, $2, 13 lui $3, 0 TAG434: andi $4, $3, 14 mtlo $3 bne $3, $3, TAG435 lb $2, 0($4) TAG435: ori $2, $2, 15 bne $2, $2, TAG436 mthi $2 srlv $3, $2, $2 TAG436: lb $4, 0($3) multu $3, $3 beq $3, $4, TAG437 multu $4, $4 TAG437: sw $4, 0($4) sltu $2, $4, $4 lui $2, 13 bgtz $2, TAG438 TAG438: lui $1, 13 div $1, $1 mfhi $3 mtlo $3 TAG439: beq $3, $3, TAG440 mfhi $1 lui $1, 12 mtlo $1 TAG440: lb $4, 0($1) beq $4, $1, TAG441 mtlo $4 sw $1, 0($4) TAG441: sh $4, 0($4) lui $1, 12 lui $2, 12 div $1, $2 TAG442: andi $1, $2, 6 mthi $1 sh $2, 0($1) bgez $1, TAG443 TAG443: sltu $1, $1, $1 addu $3, $1, $1 mfhi $2 lbu $3, 0($1) TAG444: bne $3, $3, TAG445 mfhi $3 bne $3, $3, TAG445 mthi $3 TAG445: bgtz $3, TAG446 lbu $2, 0($3) srav $4, $2, $2 multu $4, $3 TAG446: multu $4, $4 lui $4, 1 xori $3, $4, 7 srav $2, $4, $3 TAG447: addiu $4, $2, 6 sb $4, -518($4) bltz $4, TAG448 sb $4, -518($4) TAG448: sll $0, $0, 0 sb $2, -512($2) sltu $4, $4, $2 sw $4, -512($2) TAG449: lui $4, 4 beq $4, $4, TAG450 sll $0, $0, 0 sllv $3, $4, $4 TAG450: srav $1, $3, $3 bne $1, $1, TAG451 lui $2, 4 mthi $1 TAG451: andi $3, $2, 3 sll $0, $0, 0 beq $3, $3, TAG452 mtlo $2 TAG452: mflo $1 sll $0, $0, 0 beq $1, $3, TAG453 xori $4, $3, 7 TAG453: beq $4, $4, TAG454 srlv $1, $4, $4 lui $4, 6 beq $4, $1, TAG454 TAG454: lb $4, 0($4) lui $4, 2 sll $3, $4, 5 blez $3, TAG455 TAG455: sll $0, $0, 0 beq $3, $3, TAG456 ori $2, $3, 9 bne $2, $3, TAG456 TAG456: sll $0, $0, 0 sll $0, $0, 0 lui $3, 3 sll $0, $0, 0 TAG457: sll $0, $0, 0 lui $3, 8 sll $0, $0, 0 sb $2, 0($1) TAG458: lb $3, 0($1) and $4, $3, $1 and $1, $4, $4 blez $4, TAG459 TAG459: mthi $1 bne $1, $1, TAG460 lb $4, 0($1) addu $3, $4, $1 TAG460: sb $3, 0($3) lui $1, 13 mfhi $3 bne $3, $1, TAG461 TAG461: lhu $1, 0($3) mtlo $1 sra $1, $1, 1 mult $3, $3 TAG462: sb $1, 0($1) bltz $1, TAG463 multu $1, $1 bne $1, $1, TAG463 TAG463: lui $4, 2 mtlo $4 mfhi $3 mthi $3 TAG464: mthi $3 lui $1, 7 mtlo $1 mthi $3 TAG465: bne $1, $1, TAG466 sll $0, $0, 0 bgtz $1, TAG466 mtlo $1 TAG466: beq $4, $4, TAG467 srl $2, $4, 3 lui $4, 6 add $2, $4, $4 TAG467: sb $2, -16384($2) beq $2, $2, TAG468 sw $2, -16384($2) lui $4, 12 TAG468: mfhi $2 mthi $2 mtlo $2 div $4, $4 TAG469: subu $3, $2, $2 sllv $1, $2, $2 lb $4, 0($2) lui $2, 14 TAG470: sll $0, $0, 0 mflo $3 bne $1, $1, TAG471 sub $1, $1, $1 TAG471: lui $1, 1 mtlo $1 lui $4, 0 beq $4, $1, TAG472 TAG472: multu $4, $4 bgez $4, TAG473 sh $4, 0($4) lui $2, 7 TAG473: divu $2, $2 bltz $2, TAG474 subu $2, $2, $2 bltz $2, TAG474 TAG474: sra $3, $2, 8 mtlo $2 bgez $3, TAG475 sw $2, 0($3) TAG475: mthi $3 srl $1, $3, 5 multu $1, $1 lui $4, 3 TAG476: mfhi $4 beq $4, $4, TAG477 lui $2, 7 divu $4, $4 TAG477: mthi $2 ori $2, $2, 4 slt $1, $2, $2 mult $2, $2 TAG478: mfhi $4 lui $3, 6 mfhi $2 multu $3, $2 TAG479: addiu $4, $2, 14 mfhi $2 multu $4, $2 and $3, $2, $2 TAG480: add $4, $3, $3 mult $3, $4 srl $3, $4, 10 lhu $2, 0($4) TAG481: mult $2, $2 lw $1, 0($2) lh $4, 0($1) multu $4, $1 TAG482: lb $2, 0($4) bltz $2, TAG483 sw $4, 0($4) bne $2, $2, TAG483 TAG483: sh $2, 0($2) bne $2, $2, TAG484 multu $2, $2 mthi $2 TAG484: mfhi $2 mult $2, $2 lb $3, 0($2) lh $4, 0($2) TAG485: mfhi $3 lb $3, 0($4) mfhi $1 mflo $3 TAG486: mult $3, $3 mfhi $4 sh $3, 0($3) mult $3, $3 TAG487: lui $2, 13 mthi $4 sll $0, $0, 0 lui $2, 0 TAG488: lh $2, 0($2) ori $1, $2, 9 xor $1, $1, $1 lui $4, 10 TAG489: mthi $4 mfhi $1 bgtz $4, TAG490 lui $4, 0 TAG490: sw $4, 0($4) sb $4, 0($4) mthi $4 bltz $4, TAG491 TAG491: multu $4, $4 srlv $4, $4, $4 lb $1, 0($4) sh $4, 0($4) TAG492: mthi $1 addiu $4, $1, 9 lui $2, 6 mflo $3 TAG493: bltz $3, TAG494 lui $1, 0 addiu $2, $1, 11 addu $3, $2, $1 TAG494: bltz $3, TAG495 mtlo $3 multu $3, $3 sb $3, 0($3) TAG495: andi $2, $3, 15 bgez $3, TAG496 ori $4, $2, 1 xor $3, $2, $3 TAG496: bltz $3, TAG497 lui $1, 3 sll $0, $0, 0 sll $0, $0, 0 TAG497: mult $3, $3 subu $2, $3, $3 sb $3, 0($3) srl $3, $3, 4 TAG498: mtlo $3 multu $3, $3 beq $3, $3, TAG499 lui $2, 3 TAG499: slti $4, $2, 7 bltz $2, TAG500 mthi $4 mtlo $4 TAG500: lhu $1, 0($4) bne $1, $1, TAG501 add $1, $1, $1 mflo $2 TAG501: lui $1, 12 beq $1, $2, TAG502 sll $0, $0, 0 mflo $3 TAG502: lui $3, 9 mthi $3 bgtz $3, TAG503 divu $3, $3 TAG503: sltiu $2, $3, 10 sb $3, 0($2) sll $0, $0, 0 lui $1, 5 TAG504: mtlo $1 subu $4, $1, $1 mflo $4 blez $4, TAG505 TAG505: divu $4, $4 mflo $1 bne $1, $1, TAG506 lui $4, 3 TAG506: lui $3, 15 mfhi $4 multu $4, $4 or $4, $4, $3 TAG507: mflo $2 multu $2, $4 multu $2, $2 sll $0, $0, 0 TAG508: lui $3, 0 multu $3, $2 mthi $3 mtlo $3 TAG509: lbu $3, 0($3) mfhi $1 slti $2, $1, 1 beq $3, $3, TAG510 TAG510: lui $4, 7 sltu $2, $2, $2 bgtz $2, TAG511 addu $2, $2, $2 TAG511: mfhi $2 lui $2, 8 subu $4, $2, $2 bltz $2, TAG512 TAG512: mthi $4 lb $3, 0($4) mthi $4 sb $4, 0($4) TAG513: mthi $3 bgtz $3, TAG514 slti $2, $3, 0 srl $4, $3, 1 TAG514: subu $2, $4, $4 lh $4, 0($4) xori $1, $4, 13 srl $1, $2, 9 TAG515: multu $1, $1 sb $1, 0($1) bne $1, $1, TAG516 sb $1, 0($1) TAG516: lui $3, 1 mfhi $4 beq $3, $1, TAG517 addu $1, $3, $4 TAG517: lui $1, 1 xori $3, $1, 9 mfhi $3 lui $3, 3 TAG518: mthi $3 sll $0, $0, 0 mtlo $3 and $4, $3, $3 TAG519: lui $1, 14 sltiu $4, $1, 13 or $4, $1, $4 lui $4, 7 TAG520: mfhi $2 multu $2, $4 mthi $2 mflo $2 TAG521: lb $1, 0($2) lh $1, 0($2) lui $2, 10 sll $0, $0, 0 TAG522: sll $0, $0, 0 and $2, $4, $4 mtlo $4 mtlo $2 TAG523: beq $2, $2, TAG524 sltu $1, $2, $2 sll $1, $1, 4 mflo $1 TAG524: bne $1, $1, TAG525 mflo $3 addiu $1, $1, 7 mfhi $1 TAG525: div $1, $1 bgtz $1, TAG526 sll $0, $0, 0 sw $1, 0($2) TAG526: mthi $2 multu $2, $2 lui $1, 15 lui $3, 6 TAG527: sll $0, $0, 0 sll $0, $0, 0 multu $3, $3 bne $3, $3, TAG528 TAG528: srav $4, $3, $3 bne $4, $4, TAG529 srl $1, $3, 4 slti $2, $4, 4 TAG529: lui $1, 13 bne $1, $1, TAG530 srlv $2, $2, $2 lh $4, 0($2) TAG530: mtlo $4 sh $4, 0($4) bltz $4, TAG531 srlv $1, $4, $4 TAG531: lui $2, 11 blez $1, TAG532 lui $3, 10 lui $1, 7 TAG532: sra $4, $1, 15 addiu $1, $4, 10 subu $1, $1, $1 lw $2, 0($1) TAG533: srlv $3, $2, $2 lui $1, 4 mthi $2 blez $3, TAG534 TAG534: mult $1, $1 mtlo $1 mtlo $1 mtlo $1 TAG535: lui $1, 4 mflo $4 divu $1, $1 bltz $1, TAG536 TAG536: nor $2, $4, $4 beq $2, $2, TAG537 or $1, $4, $4 bne $2, $1, TAG537 TAG537: sll $0, $0, 0 sll $0, $0, 0 sll $0, $0, 0 bne $1, $1, TAG538 TAG538: mfhi $1 mult $2, $2 blez $2, TAG539 lbu $1, 0($1) TAG539: mult $1, $1 srlv $3, $1, $1 xori $4, $3, 14 blez $4, TAG540 TAG540: lui $1, 4 sll $0, $0, 0 beq $1, $1, TAG541 subu $3, $4, $4 TAG541: beq $3, $3, TAG542 lhu $4, 0($3) beq $3, $4, TAG542 lb $4, 0($3) TAG542: mfhi $4 sub $4, $4, $4 lh $3, 0($4) mthi $4 TAG543: sub $2, $3, $3 sltiu $3, $2, 7 sh $3, 0($2) bne $3, $2, TAG544 TAG544: lui $1, 1 bgez $3, TAG545 mflo $3 beq $3, $1, TAG545 TAG545: lhu $2, 0($3) addu $3, $3, $3 lb $2, 0($2) sb $3, 0($3) TAG546: bgez $2, TAG547 lui $2, 13 divu $2, $2 srlv $3, $2, $2 TAG547: mtlo $3 sw $3, 0($3) beq $3, $3, TAG548 sw $3, 0($3) TAG548: bne $3, $3, TAG549 sb $3, 0($3) sub $2, $3, $3 mtlo $2 TAG549: subu $1, $2, $2 mthi $1 sub $3, $2, $1 mult $2, $3 TAG550: lh $2, 0($3) sb $3, 0($2) srlv $4, $3, $3 mthi $3 TAG551: sh $4, 0($4) bgez $4, TAG552 sw $4, 0($4) srav $1, $4, $4 TAG552: mflo $3 add $4, $3, $3 sh $4, 0($1) mtlo $4 TAG553: mthi $4 lb $3, 0($4) and $2, $3, $3 bne $2, $3, TAG554 TAG554: sllv $3, $2, $2 xor $2, $3, $2 lw $2, 0($2) sw $2, 0($2) TAG555: bne $2, $2, TAG556 lui $2, 11 div $2, $2 beq $2, $2, TAG556 TAG556: mthi $2 multu $2, $2 bne $2, $2, TAG557 addu $1, $2, $2 TAG557: nor $2, $1, $1 mthi $1 mtlo $2 multu $2, $2 TAG558: lui $1, 10 bltz $1, TAG559 subu $2, $1, $1 mult $2, $2 TAG559: lui $3, 5 mfhi $2 and $3, $3, $3 mthi $2 TAG560: div $3, $3 beq $3, $3, TAG561 sll $0, $0, 0 mflo $4 TAG561: mthi $4 mthi $4 lui $3, 5 sll $2, $4, 11 TAG562: sw $2, 0($2) addu $1, $2, $2 addiu $3, $2, 4 mult $3, $1 TAG563: sltu $2, $3, $3 sb $3, 0($3) or $4, $2, $2 mtlo $4 TAG564: sb $4, 0($4) beq $4, $4, TAG565 nor $3, $4, $4 lb $3, 0($3) TAG565: subu $2, $3, $3 bgtz $3, TAG566 lb $2, 0($2) srlv $1, $2, $2 TAG566: beq $1, $1, TAG567 sw $1, 0($1) lui $4, 6 sw $4, 0($1) TAG567: addu $1, $4, $4 lui $2, 11 bgez $2, TAG568 lui $1, 15 TAG568: mthi $1 addu $2, $1, $1 beq $1, $1, TAG569 sll $0, $0, 0 TAG569: mthi $4 addi $3, $4, 3 mthi $3 mfhi $2 TAG570: srlv $1, $2, $2 bltz $2, TAG571 srl $3, $1, 6 xor $3, $3, $2 TAG571: sb $3, 0($3) slti $3, $3, 11 lui $1, 15 mtlo $1 TAG572: sll $0, $0, 0 sll $0, $0, 0 sll $0, $0, 0 lb $2, 0($2) TAG573: mflo $3 lb $3, 0($2) ori $2, $2, 8 blez $2, TAG574 TAG574: slti $3, $2, 13 lui $4, 4 xor $3, $4, $2 sll $0, $0, 0 TAG575: addu $2, $3, $3 mthi $3 divu $3, $2 ori $1, $2, 8 TAG576: blez $1, TAG577 mflo $3 mflo $4 slt $1, $1, $1 TAG577: blez $1, TAG578 mthi $1 nor $2, $1, $1 beq $1, $1, TAG578 TAG578: addu $4, $2, $2 nor $1, $2, $4 lui $4, 12 sltiu $3, $4, 12 TAG579: sb $3, 0($3) mtlo $3 bltz $3, TAG580 sh $3, 0($3) TAG580: multu $3, $3 add $3, $3, $3 beq $3, $3, TAG581 mfhi $1 TAG581: sb $1, 0($1) lw $2, 0($1) blez $1, TAG582 lui $4, 1 TAG582: bne $4, $4, TAG583 mfhi $3 bne $3, $4, TAG583 lui $2, 9 TAG583: sll $0, $0, 0 sh $2, 0($1) mthi $2 addi $1, $1, 15 TAG584: mfhi $4 beq $1, $1, TAG585 mfhi $4 bltz $1, TAG585 TAG585: sll $0, $0, 0 mtlo $4 lui $3, 1 bne $4, $3, TAG586 TAG586: sll $0, $0, 0 sll $0, $0, 0 xori $4, $4, 0 sll $0, $0, 0 TAG587: bltz $4, TAG588 sll $1, $4, 3 sra $1, $4, 3 multu $1, $4 TAG588: mflo $1 mtlo $1 mflo $1 lui $4, 6 TAG589: nor $4, $4, $4 bne $4, $4, TAG590 addiu $2, $4, 8 mfhi $4 TAG590: lui $1, 8 mthi $4 ori $1, $4, 3 bne $1, $1, TAG591 TAG591: addiu $2, $1, 7 bgez $1, TAG592 lui $4, 7 mthi $4 TAG592: and $4, $4, $4 subu $3, $4, $4 sll $0, $0, 0 sll $0, $0, 0 TAG593: divu $2, $2 bne $2, $2, TAG594 lhu $2, 0($2) multu $2, $2 TAG594: sb $2, 0($2) blez $2, TAG595 mult $2, $2 divu $2, $2 TAG595: andi $4, $2, 15 lui $3, 3 mflo $4 addu $2, $4, $4 TAG596: sh $2, 0($2) mult $2, $2 mthi $2 beq $2, $2, TAG597 TAG597: lui $2, 7 sll $0, $0, 0 addiu $1, $2, 12 blez $1, TAG598 TAG598: ori $3, $1, 15 mfhi $1 bgtz $1, TAG599 sll $0, $0, 0 TAG599: blez $1, TAG600 mult $1, $1 lb $4, 0($1) bne $1, $4, TAG600 TAG600: multu $4, $4 sll $2, $4, 15 addi $1, $4, 10 sh $2, 0($2) TAG601: blez $1, TAG602 ori $3, $1, 3 bltz $3, TAG602 lb $1, 0($3) TAG602: lui $3, 8 bgez $3, TAG603 sll $0, $0, 0 bne $3, $1, TAG603 TAG603: lb $3, 0($1) mflo $3 lui $2, 6 andi $4, $1, 5 TAG604: lui $4, 9 divu $4, $4 sll $0, $0, 0 xori $3, $4, 7 TAG605: multu $3, $3 sll $0, $0, 0 bltz $3, TAG606 and $4, $3, $3 TAG606: ori $2, $4, 3 srl $2, $4, 3 subu $1, $2, $2 bltz $2, TAG607 TAG607: lbu $1, 0($1) bgez $1, TAG608 mult $1, $1 lui $2, 2 TAG608: bne $2, $2, TAG609 addiu $1, $2, 2 blez $2, TAG609 sll $0, $0, 0 TAG609: sll $0, $0, 0 ori $4, $4, 8 bgtz $4, TAG610 addiu $3, $4, 11 TAG610: mthi $3 or $2, $3, $3 bne $2, $2, TAG611 subu $2, $2, $3 TAG611: bltz $2, TAG612 lb $1, 0($2) bgtz $1, TAG612 multu $2, $2 TAG612: lui $3, 7 lui $3, 5 lh $1, 0($1) lui $1, 0 TAG613: mult $1, $1 multu $1, $1 bne $1, $1, TAG614 sub $4, $1, $1 TAG614: mthi $4 nor $4, $4, $4 beq $4, $4, TAG615 multu $4, $4 TAG615: mflo $2 xori $2, $2, 0 sb $4, 0($2) sb $2, 1($4) TAG616: ori $4, $2, 13 mtlo $2 mtlo $4 mtlo $2 TAG617: mfhi $3 mult $4, $4 lb $2, 0($4) mflo $4 TAG618: lui $2, 6 lui $3, 11 mtlo $4 mthi $4 TAG619: mtlo $3 lui $1, 8 mfhi $4 and $3, $4, $3 TAG620: mfhi $4 mflo $4 sh $3, 0($3) multu $4, $4 TAG621: multu $4, $4 addu $4, $4, $4 bgtz $4, TAG622 mthi $4 TAG622: mthi $4 mthi $4 sll $0, $0, 0 blez $4, TAG623 TAG623: sll $0, $0, 0 bltz $1, TAG624 sll $0, $0, 0 divu $1, $1 TAG624: lui $3, 9 sll $0, $0, 0 beq $1, $1, TAG625 mfhi $1 TAG625: sh $1, 0($1) mfhi $2 mult $1, $1 mthi $2 TAG626: bgez $2, TAG627 mtlo $2 xor $3, $2, $2 addiu $1, $2, 7 TAG627: lh $2, 0($1) bne $1, $2, TAG628 sw $1, 0($2) blez $2, TAG628 TAG628: lui $2, 0 lui $2, 11 mfhi $1 xori $4, $1, 5 TAG629: mtlo $4 bne $4, $4, TAG630 lui $3, 1 mtlo $4 TAG630: mflo $3 lb $3, 0($3) sb $3, 0($3) multu $3, $3 TAG631: andi $4, $3, 5 mult $3, $4 lb $1, 0($4) bne $4, $1, TAG632 TAG632: lui $4, 1 sll $0, $0, 0 mtlo $4 divu $1, $1 TAG633: sll $0, $0, 0 and $3, $4, $3 mthi $3 srav $2, $4, $3 TAG634: sltiu $3, $2, 12 lui $2, 8 bne $2, $3, TAG635 sll $0, $0, 0 TAG635: sll $0, $0, 0 mfhi $1 sh $2, 0($1) mfhi $2 TAG636: bne $2, $2, TAG637 multu $2, $2 lui $4, 12 srav $1, $4, $4 TAG637: divu $1, $1 sll $0, $0, 0 lui $4, 2 mult $4, $4 TAG638: srav $1, $4, $4 sll $0, $0, 0 mtlo $4 sll $0, $0, 0 TAG639: sll $0, $0, 0 sll $0, $0, 0 sll $0, $0, 0 mtlo $3 TAG640: mfhi $3 mthi $3 blez $3, TAG641 multu $3, $3 TAG641: mfhi $2 mfhi $2 mflo $1 lui $4, 5 TAG642: blez $4, TAG643 divu $4, $4 lui $4, 9 multu $4, $4 TAG643: sll $0, $0, 0 sll $0, $0, 0 sll $4, $4, 13 or $2, $4, $4 TAG644: sll $0, $0, 0 addiu $4, $2, 12 mtlo $4 mfhi $2 TAG645: mflo $2 blez $2, TAG646 lui $4, 2 sll $0, $0, 0 TAG646: sll $0, $0, 0 mflo $1 mflo $1 sll $0, $0, 0 TAG647: bne $1, $1, TAG648 mfhi $3 divu $3, $1 mflo $2 TAG648: mfhi $3 bne $3, $3, TAG649 sb $3, 0($3) blez $2, TAG649 TAG649: sb $3, 0($3) nor $2, $3, $3 mtlo $2 mfhi $3 TAG650: beq $3, $3, TAG651 srl $3, $3, 6 lui $1, 2 bgez $3, TAG651 TAG651: div $1, $1 bgtz $1, TAG652 sll $0, $0, 0 bne $1, $1, TAG652 TAG652: mfhi $4 bgez $4, TAG653 mfhi $4 blez $4, TAG653 TAG653: mult $4, $4 srl $1, $4, 9 bne $4, $1, TAG654 lh $1, 0($1) TAG654: sh $1, 0($1) bne $1, $1, TAG655 mtlo $1 sh $1, 0($1) TAG655: lui $4, 13 multu $1, $4 mthi $4 lhu $2, 0($1) TAG656: lui $4, 11 lui $2, 11 multu $2, $4 mflo $4 TAG657: lui $3, 5 mflo $4 addi $3, $4, 14 div $3, $3 TAG658: lui $4, 4 lui $3, 13 bne $3, $3, TAG659 mult $3, $3 TAG659: sll $0, $0, 0 bgez $3, TAG660 sll $0, $0, 0 mthi $3 TAG660: sll $0, $0, 0 bgtz $3, TAG661 sltiu $3, $3, 14 mfhi $3 TAG661: lb $1, 0($3) mthi $1 sh $3, 0($3) addiu $1, $3, 4 TAG662: sb $1, 0($1) ori $2, $1, 3 lb $4, 0($2) divu $4, $4 TAG663: sb $4, 0($4) bne $4, $4, TAG664 mfhi $4 mthi $4 TAG664: beq $4, $4, TAG665 lb $4, 0($4) mfhi $1 bgez $1, TAG665 TAG665: ori $1, $1, 1 mthi $1 nor $4, $1, $1 andi $4, $1, 12 TAG666: mflo $2 subu $1, $2, $2 lui $4, 6 sll $0, $0, 0 TAG667: subu $1, $4, $4 lui $4, 7 sra $2, $4, 15 mult $4, $4 TAG668: mult $2, $2 or $3, $2, $2 mfhi $2 bgtz $2, TAG669 TAG669: lui $3, 4 sb $3, 0($2) subu $4, $3, $2 slt $3, $4, $3 TAG670: lb $1, 0($3) mthi $1 mult $1, $1 mflo $1 TAG671: nor $4, $1, $1 mthi $1 bgtz $4, TAG672 mtlo $1 TAG672: sra $2, $4, 15 beq $2, $2, TAG673 mthi $2 andi $3, $4, 14 TAG673: sb $3, 0($3) lh $3, 0($3) ori $1, $3, 0 sll $2, $1, 15 TAG674: mult $2, $2 lui $2, 9 divu $2, $2 lui $2, 13 TAG675: blez $2, TAG676 div $2, $2 mfhi $3 bne $3, $2, TAG676 TAG676: multu $3, $3 lui $4, 11 beq $4, $3, TAG677 sw $4, 0($3) TAG677: sra $4, $4, 7 subu $4, $4, $4 mtlo $4 bne $4, $4, TAG678 TAG678: lhu $4, 0($4) mthi $4 sb $4, 0($4) mfhi $1 TAG679: blez $1, TAG680 sw $1, 0($1) nor $2, $1, $1 sb $1, 0($2) TAG680: mflo $4 bgtz $4, TAG681 mflo $3 mthi $3 TAG681: sb $3, 0($3) andi $4, $3, 13 mthi $4 bltz $3, TAG682 TAG682: mfhi $4 lbu $3, 0($4) multu $4, $4 multu $3, $3 TAG683: lb $3, 0($3) lh $1, 0($3) lui $1, 12 lui $2, 13 TAG684: mtlo $2 sll $0, $0, 0 mflo $4 mtlo $4 TAG685: lui $3, 5 lui $3, 7 sll $0, $0, 0 mtlo $4 TAG686: beq $3, $3, TAG687 sll $0, $0, 0 mflo $1 blez $1, TAG687 TAG687: sll $0, $0, 0 divu $1, $1 multu $1, $1 sll $0, $0, 0 TAG688: nor $3, $3, $3 mult $3, $3 multu $3, $3 mflo $2 TAG689: sra $4, $2, 6 addu $2, $4, $4 lh $2, -28672($2) mthi $2 TAG690: bgtz $2, TAG691 mult $2, $2 bne $2, $2, TAG691 addi $4, $2, 2 TAG691: div $4, $4 bgtz $4, TAG692 srl $1, $4, 6 bltz $4, TAG692 TAG692: lui $3, 11 mult $1, $1 mtlo $1 mfhi $1 TAG693: blez $1, TAG694 lbu $4, 0($1) blez $1, TAG694 sh $4, 0($4) TAG694: multu $4, $4 mult $4, $4 lui $1, 9 lui $2, 6 TAG695: mfhi $4 lui $1, 1 sll $3, $1, 7 mtlo $3 TAG696: bne $3, $3, TAG697 or $1, $3, $3 sll $0, $0, 0 mfhi $4 TAG697: multu $4, $4 multu $4, $4 mfhi $4 mflo $3 TAG698: bne $3, $3, TAG699 or $3, $3, $3 sb $3, 0($3) mtlo $3 TAG699: lui $2, 8 bne $3, $3, TAG700 ori $4, $2, 1 lui $4, 14 TAG700: sll $0, $0, 0 lui $2, 14 lw $4, 0($3) mtlo $4 TAG701: multu $4, $4 lb $4, 0($4) srl $3, $4, 12 multu $4, $4 TAG702: lui $2, 13 bgtz $3, TAG703 lui $3, 15 sll $0, $0, 0 TAG703: sll $0, $0, 0 srlv $4, $3, $2 bgtz $2, TAG704 mthi $2 TAG704: sll $0, $0, 0 nor $2, $4, $4 div $2, $4 sll $0, $0, 0 TAG705: mult $2, $2 lui $1, 4 bltz $2, TAG706 sll $0, $0, 0 TAG706: beq $3, $3, TAG707 mflo $2 mult $3, $3 div $3, $3 TAG707: mthi $2 divu $2, $2 blez $2, TAG708 subu $3, $2, $2 TAG708: mfhi $1 bgez $1, TAG709 nor $1, $3, $1 sb $1, 0($1) TAG709: slt $1, $1, $1 lui $3, 10 mflo $3 mthi $1 TAG710: mflo $3 mfhi $3 xor $3, $3, $3 lui $3, 4 TAG711: sltu $3, $3, $3 sb $3, 0($3) mult $3, $3 addu $4, $3, $3 TAG712: mfhi $1 bne $4, $4, TAG713 mult $1, $1 ori $4, $1, 1 TAG713: sb $4, 0($4) lb $1, 0($4) bltz $4, TAG714 lbu $2, 0($4) TAG714: sb $2, 0($2) lui $1, 1 mthi $2 mflo $3 TAG715: mult $3, $3 bne $3, $3, TAG716 lh $4, 0($3) lbu $3, -256($4) TAG716: sltu $1, $3, $3 mult $3, $1 addiu $1, $1, 4 srl $1, $1, 7 TAG717: mflo $2 mfhi $2 sw $2, 0($2) lb $1, 0($2) TAG718: sb $1, 0($1) lbu $4, 0($1) mtlo $4 beq $4, $4, TAG719 TAG719: addu $2, $4, $4 lui $2, 5 andi $1, $4, 7 bltz $2, TAG720 TAG720: lbu $3, 0($1) mult $1, $3 lbu $4, 0($3) lui $4, 0 TAG721: bne $4, $4, TAG722 mflo $3 sb $4, 0($3) lui $3, 1 TAG722: bgtz $3, TAG723 mtlo $3 sltiu $1, $3, 10 mtlo $3 TAG723: beq $1, $1, TAG724 mfhi $1 lbu $1, 0($1) slti $4, $1, 5 TAG724: lb $4, 0($4) sb $4, 0($4) mflo $3 multu $4, $4 TAG725: mult $3, $3 sll $0, $0, 0 sll $2, $3, 1 sltiu $2, $3, 8 TAG726: lhu $3, 0($2) mfhi $1 lbu $1, 0($1) mtlo $1 TAG727: blez $1, TAG728 multu $1, $1 lui $4, 12 slti $2, $1, 4 TAG728: mflo $3 sw $2, 0($3) lb $2, 0($3) bne $2, $3, TAG729 TAG729: lbu $4, 0($2) lhu $4, 0($2) blez $4, TAG730 sh $4, 0($4) TAG730: sh $4, 0($4) bgtz $4, TAG731 andi $3, $4, 13 lw $3, 0($3) TAG731: mflo $2 mflo $3 srav $4, $3, $3 mfhi $3 TAG732: sra $2, $3, 13 bne $3, $3, TAG733 mthi $2 lui $4, 8 TAG733: bgtz $4, TAG734 div $4, $4 mflo $1 bne $1, $4, TAG734 TAG734: slti $2, $1, 6 div $1, $2 mult $2, $1 lui $1, 12 TAG735: sll $0, $0, 0 mtlo $1 sll $0, $0, 0 sll $0, $0, 0 TAG736: lui $1, 0 lw $3, 0($1) lui $2, 4 lui $3, 9 TAG737: mthi $3 nor $3, $3, $3 slt $1, $3, $3 mtlo $3 TAG738: lui $2, 8 beq $1, $1, TAG739 sb $2, 0($1) bgez $1, TAG739 TAG739: mflo $1 mtlo $1 lui $2, 4 bgez $1, TAG740 TAG740: sll $0, $0, 0 sltiu $3, $2, 12 sll $0, $0, 0 bltz $3, TAG741 TAG741: mthi $3 multu $3, $3 sub $2, $3, $3 or $4, $2, $2 TAG742: mtlo $4 lw $3, 0($4) mfhi $2 mflo $3 TAG743: mthi $3 blez $3, TAG744 sw $3, 0($3) mthi $3 TAG744: beq $3, $3, TAG745 mflo $4 srl $2, $3, 9 sb $2, 0($4) TAG745: bne $2, $2, TAG746 lw $2, 0($2) subu $4, $2, $2 multu $2, $4 TAG746: bgtz $4, TAG747 slti $3, $4, 4 lui $1, 3 mult $1, $1 TAG747: beq $1, $1, TAG748 mthi $1 lb $4, 0($1) mflo $3 TAG748: sb $3, 0($3) blez $3, TAG749 ori $4, $3, 9 lb $2, 0($3) TAG749: bgez $2, TAG750 div $2, $2 sb $2, 0($2) mfhi $2 TAG750: nop nop test_end: beq $0, $0, test_end nop
12.915062
22
0.501889
[ "Apache-2.0" ]
alxzzhou/BUAA_CO_2020
P6/data_P6/testpoint/testpoint44.asm
48,961
Assembly
;----------------------------------------------------------; ; BOS 0.05 Christoffer Bubach, 2004-2015. ; ;----------------------------------------------------------; ; ; ; English strings used in BOS. ; ; ; ;----------------------------------------------------------; ;---------------; ; strings ; ;---------------; pmode_load db 'Setting up protected mode...', 0 pmode_load_ok db '[ 32-bits OK ]', 0 kernel_load db 'Loading kernel...', 0 kernel_load_ok db '[ OK ]', 0 pic_irq db 'Fixing PIC and IRQs...', 0 pic_irq_ok db '[ Done ]', 0 idt_mess db 'Setting up IDT...', 0 idt_ok db '[ IDT OK ]', 0 kbd_load db 'Enables IRQ1...', 0 kbd_ok db '[ Keyboard OK ]', 0 bos_shell db 'BOS shell. Type "help" for more info.', 13, 10, 0
35.566667
75
0.309278
[ "Unlicense" ]
gniuk/BOS
kernel/vars/strings.asm
1,067
Assembly
title prac03 .model small include irvine32.inc .code main proc far .startup mov eax, 10000h add eax, 40000h sub eax, 20000h .exit main endp end
11.153846
20
0.772414
[ "MIT" ]
Abel-RM/materias-tec
Lenguajes de interfaz/prac03.asm
145
Assembly
; A040546: Continued fraction for sqrt(570). ; 23,1,6,1,46,1,6,1,46,1,6,1,46,1,6,1,46,1,6,1,46,1,6,1,46,1,6,1,46,1,6,1,46,1,6,1,46,1,6,1,46,1,6,1,46,1,6,1,46,1,6,1,46,1,6,1,46,1,6,1,46,1,6,1,46,1,6,1,46,1,6,1,46,1,6,1,46,1,6,1,46,1,6,1 seq $0,40304 ; Continued fraction for sqrt(322). dif $0,4 mov $1,$0 add $0,4 div $0,6 mul $0,2 add $0,$1
31.090909
190
0.599415
[ "Apache-2.0" ]
ckrause/cm
programs/oeis/040/A040546.asm
342
Assembly
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r11 push %r8 push %r9 push %rcx push %rdi push %rdx push %rsi lea addresses_UC_ht+0x872b, %rdx nop nop nop nop nop sub %r8, %r8 mov (%rdx), %r9d nop nop nop nop inc %rsi lea addresses_normal_ht+0xa62d, %rsi nop nop cmp %r11, %r11 mov (%rsi), %edi add %rdx, %rdx lea addresses_WC_ht+0x1511, %rdi nop and %r10, %r10 mov $0x6162636465666768, %r9 movq %r9, %xmm0 vmovups %ymm0, (%rdi) xor $38803, %r11 lea addresses_WC_ht+0xfc0d, %rsi lea addresses_UC_ht+0x1a203, %rdi nop nop nop nop mfence mov $55, %rcx rep movsq nop nop nop add $2432, %rdx lea addresses_WT_ht+0x1288d, %rcx nop nop nop inc %rdx mov $0x6162636465666768, %rsi movq %rsi, %xmm2 and $0xffffffffffffffc0, %rcx vmovaps %ymm2, (%rcx) nop nop nop and $1749, %rcx lea addresses_UC_ht+0x18e8d, %r8 nop nop nop sub %rcx, %rcx vmovups (%r8), %ymm2 vextracti128 $1, %ymm2, %xmm2 vpextrq $0, %xmm2, %rsi dec %r11 lea addresses_WC_ht+0x68d, %rsi lea addresses_D_ht+0x9f12, %rdi and %rdx, %rdx mov $117, %rcx rep movsw nop sub $23072, %r10 lea addresses_UC_ht+0xe8d, %r11 nop nop nop nop nop and $64260, %rdx mov $0x6162636465666768, %r8 movq %r8, %xmm3 vmovups %ymm3, (%r11) nop nop cmp %rsi, %rsi pop %rsi pop %rdx pop %rdi pop %rcx pop %r9 pop %r8 pop %r11 pop %r10 ret .global s_faulty_load s_faulty_load: push %r11 push %r14 push %r9 push %rbp push %rcx push %rdi push %rdx // Store lea addresses_normal+0xe88d, %r11 nop nop and %rdx, %rdx movl $0x51525354, (%r11) nop and $61326, %rbp // Load lea addresses_PSE+0x9dbb, %r11 nop lfence mov (%r11), %edx sub $15972, %rdx // Faulty Load lea addresses_WC+0x1a08d, %r9 nop nop nop nop xor %rcx, %rcx mov (%r9), %edi lea oracles, %rdx and $0xff, %rdi shlq $12, %rdi mov (%rdx,%rdi,1), %rdi pop %rdx pop %rdi pop %rcx pop %rbp pop %r9 pop %r14 pop %r11 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_WC', 'same': False, 'size': 32, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_normal', 'same': False, 'size': 4, 'congruent': 11, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_PSE', 'same': False, 'size': 4, 'congruent': 1, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} [Faulty Load] {'src': {'type': 'addresses_WC', 'same': True, 'size': 4, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'type': 'addresses_UC_ht', 'same': False, 'size': 4, 'congruent': 1, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_normal_ht', 'same': False, 'size': 4, 'congruent': 5, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_WC_ht', 'same': False, 'size': 32, 'congruent': 2, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_WC_ht', 'congruent': 7, 'same': True}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 0, 'same': False}, 'OP': 'REPM'} {'dst': {'type': 'addresses_WT_ht', 'same': False, 'size': 32, 'congruent': 11, 'NT': False, 'AVXalign': True}, 'OP': 'STOR'} {'src': {'type': 'addresses_UC_ht', 'same': False, 'size': 32, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_WC_ht', 'congruent': 2, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 0, 'same': False}, 'OP': 'REPM'} {'dst': {'type': 'addresses_UC_ht', 'same': False, 'size': 32, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'38': 21829} 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 */
38.177515
2,999
0.657936
[ "MIT" ]
danielmgmi/medusa
Transynther/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_21829_404.asm
6,452
Assembly
; ; file: read.asm ; This subroutine reads an array of doubles from a file segment .data format db "%lf", 0 ; format for fscanf() segment .text global read_doubles extern fscanf %define SIZEOF_DOUBLE 8 %define FP dword [ebp + 8] %define ARRAYP dword [ebp + 12] %define ARRAY_SIZE dword [ebp + 16] %define TEMP_DOUBLE [ebp - 8] ; ; function read_doubles ; C prototype: ; int read_doubles( FILE * fp, double * arrayp, int array_size ); ; This function reads doubles from a text file into an array, until ; EOF or array is full. ; Parameters: ; fp - FILE pointer to read from (must be open for input) ; arrayp - pointer to double array to read into ; array_size - number of elements in array ; Return value: ; number of doubles stored into array (in EAX) read_doubles: push ebp mov ebp,esp sub esp, SIZEOF_DOUBLE ; define one double on stack push esi ; save esi mov esi, ARRAYP ; esi = ARRAYP xor edx, edx ; edx = array index (initially 0) while_loop: cmp edx, ARRAY_SIZE ; is edx < ARRAY_SIZE? jnl short quit ; if not, quit loop ; ; call fscanf() to read a double into TEMP_DOUBLE ; fscanf() might change edx so save it ; push edx ; save edx lea eax, TEMP_DOUBLE push eax ; push &TEMP_DOUBLE push dword format ; push &format push FP ; push file pointer call fscanf add esp, 12 pop edx ; restore edx cmp eax, 1 ; did fscanf return 1? jne short quit ; if not, quit loop ; ; copy TEMP_DOUBLE into ARRAYP[edx] ; (The 8-bytes of the double are copied by two 4-byte copies) ; mov eax, [ebp - 8] mov [esi + 8*edx], eax ; first copy lowest 4 bytes mov eax, [ebp - 4] mov [esi + 8*edx + 4], eax ; next copy highest 4 bytes inc edx jmp while_loop quit: pop esi ; restore esi mov eax, edx ; store return value into eax mov esp, ebp pop ebp ret
29.703704
73
0.519534
[ "MIT" ]
icefoxen/lang
asm/examples/read.asm
2,406
Assembly
; Q68 Keyboard polling (c) 2016-2020 W. Lenerz ; ; 2020-03-30 1.01 use possible delay loop ; apparently some keyboard adapters (usb->ps/2) do not respect the ; ps/2 protocol : instead of waiting for the signal that a new byte may be sent, they just ; wait a bit (apparently for a variable period of time) and then send another byte. section kbdint xdef kbd_read xref kbd_at102cvt xref kbd_poll include 'dev8_keys_sys' include 'dev8_keys_q68' include 'dev8_keys_hwt' include 'dev8_smsq_kbd_keys' include 'dev8_keys_k' include 'dev8_keys_con' include 'dev8_keys_chn' ;+++ ; This routine handles keyboard polling. The polling "server" is set up in ; smsq_q68_kbd_initi_asm ;--- kbd_read ;!!!!!!!!!!!DEBUG ----| ; | genif debug = 1 | cmp.l #'gold',q68_jflg | beq.s java_kbd_read | endgen | ; | ;!!!!!!!!!!!!!!!!! ----| btst #kbd.rcv,kbd_status ; any keyboard data? beq.s kbdi_exit ; ... no rd_kbd moveq #0,D0 move.b kbd_code,d0 ; IBM keycode st kbd_unlock ; acknowledge key receipt ; this should clear the kbd.rcv bit in kbd_status tst.b kb_err(a3) ; strip queue on error? bgt.s kbdi_exit ; ... yes process bsr kbd_at102cvt ; process key code ; jsr kbd_poll ; move.l kbd_dlay,d0 ; re-try kbd? ; beq.s kbd_out ; no -> ; move.l q68_timer,d1 ; yes, current timer ;loop btst #kbd.rcv,kbd_status ; any keyboard data? ; bne.s rd_kbd ; yes, get it ; move.l q68_timer,d2 ; get current timer ; sub.l d1,d2 ; cmp.l d0,d2 ; time expired? ; blt.s loop ; no, loop until it does (or new keystroke arrives) ;kbd_out rts kbdi_exit jmp kbd_poll ; handle keystroke(s) ;!!!!!!!!!!!DEBUG ----| genif debug = 1 ;+++ ; DEBUG - SMSQ68mulator keyboard routine ;--- xref ioq_pbyt xref ioq_test ; wheel on mouse moved - generate 3 keystrokes wheel jsr ioq_pbyt ; put byte in kbd queue jsr ioq_pbyt ; put byte in kbd queue jsr ioq_pbyt ; put byte in kbd queue and.l #$ff,d1 ; move.w d1,sys_lchr(a6) ; save last character bra.s hok_rts java_kbd_read smsh.reg reg d1/d2/a1/a2 movem.l smsh.reg,-(a7) moveq #0,D0 btst #kbd.rcv,kbd_status ; any keyboard data? beq.s hok_rts ; ... no move.b kbd_code,d0 ; IBM keycode st kbd_unlock ; acknowledge key receipt bclr #kbd.rcv,kbd_status move.l sys_ckyq(a6),d0 ; any keyboard queue? beq.s hok_rts ; no! move.l d0,a2 ; A2 = current keyboard queue move.l q68_jkbd,d0 ; get current key char(s) clr.l q68_jkbd ; no more move.l sys_klnk(a6),a1 ; keyboard linkage move.l d0,d1 ; char(s) gotten bne.s hok_chkc ; there were some btst #0,$29(a1) ; shift pressed? beq.s hok_rts ; no sf sys_dfrz(a6) ; yes, unfreeze screen hok_rts movem.l (a7)+,smsh.reg rts hok_chkc cmp.l #$d1d1d1,d1 beq.s wheel cmp.l #$d9d9d9,d1 beq.s wheel tst.l d1 ; break? bmi.s hok_break ; ... yes cmp.w sys_swtc(a6),d1 ; switch queue? beq.s hok_swtc ; ... yes cmp.b #k.cf5,d1 ; screen freeze? beq.s hok_dfrz ; ... yes cmp.b #k.caps,d1 ; CAPSLOCK? beq.s hok_caps move.w d1,sys_lchr(a6) ; save last character move.w d1,kb_lcod(a1) ; also here hok_putu sf sys_dfrz(a6) ; unfreeze screen hok_putc cmp.b #$ff,d1 ; ALT? bne.s hok_put1 ; ... no swap d1 ; jsr ioq_test ; ... yes, check subq.l #2,d2 ; ... ... for room for 2 blt.s hok_rts ; ... no swap d1 jsr ioq_pbyt ; put one byte lsr.w #8,d1 ; ... and then the other hok_put1 jsr ioq_pbyt ; put byte in kbd queue bra.s hok_rts ; break hok_break btst #sys..sbk,sys_klock(a6) ; suppressed? bne.s hok_rts st sys_brk(a6) ; flag break hokb_rts bra.s hok_rts ; switch keyboard queue hok_swtc btst #sys..ssq,sys_klock(a6) ; suppressed? bne.s hok_rts move.l (a2),d2 ; keep next queue move.l d2,a2 bra.s hok_ckq hok_nxq move.l (a2),a2 ; next queue cmp.l a2,d2 ; same as saved queue? beq.s hok_setq hok_ckq tst.b sd_curf-sd_keyq(a2) ; cursor enabled? bne.s hok_setq ; ... yes, go to it tst.b chn_stat-sd_keyq(a2) ; waiting? beq.s hok_nxq ; ... no cmp.b #4,chn_actn-sd_keyq(a2) ; input? bgt.s hok_nxq ; ... no hok_setq move.l a2,sys_ckyq(a6) ; reset keyboard queue bra hok_rts ; screen freeze hok_dfrz btst #sys..ssf,sys_klock(a6) ; suppressed? bne.s hokb_rts not.b sys_dfrz(a6) ; freeze / unfreeze screen bra hok_rts ; CAPSLOCK hok_caps not.b sys_caps(a6) ; caps lock toggle move.l sys_capr(a6),d0 ; keyboard intercept routine? ble.s kbp_capsold ; ... no, try old style move.l d0,a1 jsr (a1) ; ... yes, do it bra hok_rts kbp_capsold tst.l sys_csub(a6) beq.l hok_rts ; no routine jsr sys_csub(a6) ; caps routine bra hok_rts endgen ;!!!!!!!!!!!!!!!!! ----| end
22.196262
108
0.653474
[ "BSD-2-Clause" ]
olifink/smsqe
smsq/q68/kbd/read.asm
4,750
Assembly
; ================================================= ; Techniques can either be used for enemies or allies dependent on how they're set and who is using them. ; The same index is carried over to enemy data for the tech copies and poison. ; ; byte 1-8 = Name (ends with $FC); shows up in battle ; byte 9 = ? ; byte 10 = Target ; 02 = single ally ; 04 = all allies ; 06 = dead ally (Rever uses this) ; 0A = single enemy ; OC = single enemy row ; 0E = left or right groups ; 10 = all enemies ; 12 = escape statistic? (presumed, as it's only used with Rimit) ; byte 11 = TP cost ; byte 12 = index ; byte 13-16 = ?? ; ================================================= Tech_Foi: dc.b "Foi", $FC ;0x0 (0x000398B0-0x000398B4, Entry count: 0x00000004) dc.b $00, $00, $00, $00, $40 ;0x0 (0x000398B4-0x000398B9, Entry count: 0x00000005) [Unknown data] dc.b $0A dc.b $02 dc.b $00 dc.b $00, $00, $00, $00 ;0x0 (0x000398BC-0x000398C0, Entry count: 0x00000004) [Unknown data] Tech_Zan: dc.b "Zan", $FC ;0x0 (0x000398C0-0x000398C4, Entry count: 0x00000004) dc.b $00, $00, $00, $00, $40 ;0x0 (0x000398C4-0x000398C9, Entry count: 0x00000005) [Unknown data] dc.b $0C dc.b $02 dc.b $04 dc.b $00, $00, $00, $00 ;0x0 (0x000398CC-0x000398D0, Entry count: 0x00000004) [Unknown data] Tech_Gra: dc.b "Gra", $FC ;0x0 (0x000398D0-0x000398D4, Entry count: 0x00000004) dc.b $00, $00, $00, $00, $40 ;0x0 (0x000398D4-0x000398D9, Entry count: 0x00000005) [Unknown data] dc.b $10 dc.b $02 dc.b $08 dc.b $00, $00, $00, $00 ;0x0 (0x000398DC-0x000398E0, Entry count: 0x00000004) [Unknown data] Tech_Tsu: dc.b "Tsu", $FC ;0x0 (0x000398E0-0x000398E4, Entry count: 0x00000004) dc.b $00, $00, $00, $00, $40 ;0x0 (0x000398E4-0x000398E9, Entry count: 0x00000005) [Unknown data] dc.b $0E dc.b $02 dc.b $0C dc.b $00, $00, $00, $00 ;0x0 (0x000398EC-0x000398F0, Entry count: 0x00000004) [Unknown data] Tech_Res: dc.b "Res", $FC ;0x0 (0x000398F0-0x000398F4, Entry count: 0x00000004) dc.b $00, $00, $00, $00, $C0 ;0x0 (0x000398F4-0x000398F9, Entry count: 0x00000005) [Unknown data] dc.b $02 dc.b $05 dc.b $10 dc.b $00, $00, $00, $00 ;0x0 (0x000398FC-0x00039900, Entry count: 0x00000004) [Unknown data] Tech_Gires: dc.b "Gires", $FC ;0x0 (0x00039900-0x00039906, Entry count: 0x00000006) dc.b $00, $00, $C0 ;0x0 (0x00039906-0x00039909, Entry count: 0x00000003) [Unknown data] dc.b $04 dc.b $05 dc.b $14 dc.b $00, $00, $00, $00 ;0x0 (0x0003990C-0x00039910, Entry count: 0x00000004) [Unknown data] Tech_Rever: dc.b "Rever", $FC ;0x0 (0x00039910-0x00039916, Entry count: 0x00000006) dc.b $00, $00, $C0 ;0x0 (0x00039916-0x00039919, Entry count: 0x00000003) [Unknown data] dc.b $06 dc.b $05 dc.b $18 dc.b $00, $00, $00, $00 ;0x0 (0x0003991C-0x00039920, Entry count: 0x00000004) [Unknown data] Tech_Anti: dc.b "Anti", $FC ;0x0 (0x00039920-0x00039925, Entry count: 0x00000005) dc.b $00, $00, $00, $C0 ;0x0 (0x00039925-0x00039929, Entry count: 0x00000004) [Unknown data] dc.b $02 dc.b $05 dc.b $1C dc.b $00, $00, $00, $00 ;0x0 (0x0003992C-0x00039930, Entry count: 0x00000004) [Unknown data] Tech_Ner: dc.b "Ner", $FC ;0x0 (0x00039930-0x00039934, Entry count: 0x00000004) dc.b $00, $00, $00, $00, $40 ;0x0 (0x00039934-0x00039939, Entry count: 0x00000005) [Unknown data] dc.b $02 dc.b $01 dc.b $20 dc.b $00, $00, $00, $00 ;0x0 (0x0003993C-0x00039940, Entry count: 0x00000004) [Unknown data] Tech_Rimit: dc.b "Rimit", $FC ;0x0 (0x00039940-0x00039946, Entry count: 0x00000006) dc.b $00, $00, $40 ;0x0 (0x00039946-0x00039949, Entry count: 0x00000003) [Unknown data] dc.b $12 dc.b $01 dc.b $24 dc.b $00, $00, $00, $00 ;0x0 (0x0003994C-0x00039950, Entry count: 0x00000004) [Unknown data] Tech_Shiza: dc.b "Shiza", $FC ;0x0 (0x00039950-0x00039956, Entry count: 0x00000006) dc.b $00, $00, $40 ;0x0 (0x00039956-0x00039959, Entry count: 0x00000003) [Unknown data] dc.b $0A dc.b $01 dc.b $28 dc.b $00, $00, $00, $00 ;0x0 (0x0003995C-0x00039960, Entry count: 0x00000004) [Unknown data] Tech_Deban: dc.b "Deban", $FC ;0x0 (0x00039960-0x00039966, Entry count: 0x00000006) dc.b $00, $00, $40 ;0x0 (0x00039966-0x00039969, Entry count: 0x00000003) [Unknown data] dc.b $0A dc.b $01 dc.b $2C dc.b $00, $00, $00, $00 ;0x0 (0x0003996C-0x00039970, Entry count: 0x00000004) [Unknown data] Tech_Fanbi: dc.b "Fanbi", $FC ;0x0 (0x00039970-0x00039976, Entry count: 0x00000006) dc.b $00, $00, $40 ;0x0 (0x00039976-0x00039979, Entry count: 0x00000003) [Unknown data] dc.b $02 dc.b $01 dc.b $30 dc.b $00, $00, $00, $00 ;0x0 (0x0003997C-0x00039980, Entry count: 0x00000004) [Unknown data] Tech_Forsa: dc.b "Forsa", $FC ;0x0 (0x00039980-0x00039986, Entry count: 0x00000006) dc.b $00, $00, $40 ;0x0 (0x00039986-0x00039989, Entry count: 0x00000003) [Unknown data] dc.b $0A dc.b $01 dc.b $34 dc.b $00, $00, $00, $00 ;0x0 (0x0003998C-0x00039990, Entry count: 0x00000004) [Unknown data] Tech_Nasak: dc.b "Nasak", $FC ;0x0 (0x00039990-0x00039996, Entry count: 0x00000006) dc.b $00, $00, $40 ;0x0 (0x00039996-0x00039999, Entry count: 0x00000003) [Unknown data] dc.b $04 dc.b $01 dc.b $38 dc.b $00, $00, $00, $00 ;0x0 (0x0003999C-0x000399A0, Entry count: 0x00000004) [Unknown data] Tech_Shu: dc.b "Shu", $FC ;0x0 (0x000399A0-0x000399A4, Entry count: 0x00000004) dc.b $00, $00, $00, $00, $40 ;0x0 (0x000399A4-0x000399A9, Entry count: 0x00000005) [Unknown data] dc.b $02 dc.b $01 dc.b $3C dc.b $00, $00, $00, $00 Tech_Megido: dc.b "Megido", $FC dc.b $00, $40, $02, $01, $40 dc.b $00, $00, $00, $00 Tech_Grantz: dc.b "Grantz", $FC dc.b $00, $40, $02, $01, $44 ;0x0 (0x000399AC-0x000399D0, Entry count: 0x00000024) [Unknown data] dc.b $00, $00, $00, $00 ;0x20 Tech_FoiCopy: dc.b "Foi", $FC ;0x0 (0x000399D0-0x000399D4, Entry count: 0x00000004) dc.b $00, $00, $00, $00, $00 ;0x0 (0x000399D4-0x000399D9, Entry count: 0x00000005) [Unknown data] dc.b $02 dc.b $00 ;0x0 (0x000399DA-0x000399DB, Entry count: 0x00000001) [Unknown data] dc.b $48 dc.b $00, $00, $00, $00 ;0x0 (0x000399DC-0x000399E0, Entry count: 0x00000004) [Unknown data] Tech_ZanCopy: dc.b "Zan", $FC ;0x0 (0x000399E0-0x000399E4, Entry count: 0x00000004) dc.b $00, $00, $00, $00, $00 ;0x0 (0x000399E4-0x000399E9, Entry count: 0x00000005) [Unknown data] dc.b $04 dc.b $00 ;0x0 (0x000399EA-0x000399EB, Entry count: 0x00000001) [Unknown data] dc.b $4C dc.b $00, $00, $00, $00 ;0x0 (0x000399EC-0x000399F0, Entry count: 0x00000004) [Unknown data] Tech_GraCopy: dc.b "Gra", $FC ;0x0 (0x000399F0-0x000399F4, Entry count: 0x00000004) dc.b $00, $00, $00, $00, $00 ;0x0 (0x000399F4-0x000399F9, Entry count: 0x00000005) [Unknown data] dc.b $04 dc.b $00 ;0x0 (0x000399FA-0x000399FB, Entry count: 0x00000001) [Unknown data] dc.b $50 dc.b $00, $00, $00, $00 ;0x0 (0x000399FC-0x00039A00, Entry count: 0x00000004) [Unknown data] Tech_TsuCopy: dc.b "Tsu", $FC ;0x0 (0x00039A00-0x00039A04, Entry count: 0x00000004) dc.b $00, $00, $00, $00, $00 ;0x0 (0x00039A04-0x00039A09, Entry count: 0x00000005) [Unknown data] dc.b $04 dc.b $00 ;0x0 (0x00039A0A-0x00039A0B, Entry count: 0x00000001) [Unknown data] dc.b $54 dc.b $00, $00, $00, $00 ;0x0 (0x00039A0C-0x00039A10, Entry count: 0x00000004) [Unknown data] Tech_GiresCopy: dc.b "Gires", $FC ;0x0 (0x00039A10-0x00039A16, Entry count: 0x00000006) dc.b $00, $00, $00 ;0x0 (0x00039A16-0x00039A19, Entry count: 0x00000003) [Unknown data] dc.b $10 dc.b $00 ;0x0 (0x00039A1A-0x00039A1B, Entry count: 0x00000001) [Unknown data] dc.b $58 dc.b $00, $00, $00, $00 ;0x0 (0x00039A1C-0x00039A20, Entry count: 0x00000004) [Unknown data] Tech_Poison: dc.b "Poison", $FC ;0x0 (0x00039A20-0x00039A27, Entry count: 0x00000007) dc.b $00, $00 ;0x0 (0x00039A27-0x00039A29, Entry count: 0x00000002) [Unknown data] dc.b $02 dc.b $00 ;0x0 (0x00039A2A-0x00039A2B, Entry count: 0x00000001) [Unknown data] dc.b $5C dc.b $00, $00, $00, $00 ;0x0 (0x00039A2C-0x00039A30, Entry count: 0x00000004) [Unknown data]
38.64878
105
0.675502
[ "MIT" ]
hansbonini/-SMD-Phantasy-Star-3
inc/tech_data.asm
7,923
Assembly
irq_common: pusha mov ax, ds push eax mov ax, 0x10 mov ds, ax mov es, ax mov fs, ax mov gs, ax extern irq_handler call irq_handler pop ebx mov ds, bx mov es, bx mov fs, bx mov gs, bx popa add esp, 8 sti iret global irq0 global irq1 global irq2 global irq3 global irq4 global irq5 global irq6 global irq7 global irq8 global irq9 global irq10 global irq11 global irq12 global irq13 global irq14 global irq15 irq0: cli push byte 0 push byte 32 jmp irq_common irq1: cli push byte 1 push byte 33 jmp irq_common irq2: cli push byte 2 push byte 34 jmp irq_common irq3: cli push byte 3 push byte 35 jmp irq_common irq4: cli push byte 4 push byte 36 jmp irq_common irq5: cli push byte 5 push byte 37 jmp irq_common irq6: cli push byte 6 push byte 38 jmp irq_common irq7: cli push byte 7 push byte 39 jmp irq_common irq8: cli push byte 8 push byte 40 jmp irq_common irq9: cli push byte 9 push byte 41 jmp irq_common irq10: cli push byte 10 push byte 42 jmp irq_common irq11: cli push byte 11 push byte 43 jmp irq_common irq12: cli push byte 12 push byte 44 jmp irq_common irq13: cli push byte 13 push byte 45 jmp irq_common irq14: cli push byte 14 push byte 46 jmp irq_common irq15: cli push byte 15 push byte 47 jmp irq_common
10.192593
22
0.69186
[ "MIT" ]
Groszekk/OperatingSystem
kernel/IRQ/irq.asm
1,376
Assembly
COMMENT @---------------------------------------------------------------------- Copyright (c) GeoWorks 1988 -- All Rights Reserved PROJECT: PC GEOS MODULE: CommonUI/CExcl (common code for all specific UIs) FILE: citemManager.asm (main file for all gadget code) REVISION HISTORY: Name Date Description ---- ---- ----------- Chris 1/92 Initial version DESCRIPTION: This file assembles the Item/ module of the specific UI library $Id: citemManager.asm,v 1.1 97/04/07 10:55:42 newdeal Exp $ ------------------------------------------------------------------------------@ _Item = 1 ;----------------------------------------------------------------------------- ; Include common definitions ;----------------------------------------------------------------------------- include cMacro.def include cGeode.def include cGlobal.def ;----------------------------------------------------------------------------- ; Include definitions for this module ;----------------------------------------------------------------------------- include citemMacro.def include citemConstant.def include citemVariable.def ;----------------------------------------------------------------------------- ; Include code ;----------------------------------------------------------------------------- ; ; OLItemGroupClass ; include citemItemGroupClass.asm include citemItemGroupCommon.asm include citemItemGroupVeryCommon.asm include citemBooleanGroup.asm ;Not an object. include citemScrollList.asm ; ; OLItemClass ; include citemItemClass.asm include citemItemCommon.asm include citemItemColor.asm include citemItemBW.asm include citemCheckedItem.asm include citemScrollableItem.asm end
26.863636
80
0.468697
[ "Apache-2.0" ]
BOBBYWY/pcgeos
Library/SpecUI/CommonUI/CItem/citemManager.asm
1,773
Assembly
; A009001: Expansion of e.g.f: (1+x)*cos(x). ; 1,1,-1,-3,1,5,-1,-7,1,9,-1,-11,1,13,-1,-15,1,17,-1,-19,1,21,-1,-23,1,25,-1,-27,1,29,-1,-31,1,33,-1,-35,1,37,-1,-39,1,41,-1,-43,1,45,-1,-47,1,49,-1,-51,1,53,-1,-55,1,57,-1,-59,1,61,-1,-63,1,65,-1,-67,1,69,-1,-71,1,73,-1,-75,1,77,-1,-79,1,81,-1,-83,1,85,-1,-87,1,89,-1,-91,1,93,-1,-95,1,97,-1,-99,1,101,-1,-103,1,105,-1,-107,1,109,-1,-111,1,113,-1,-115,1,117,-1,-119,1,121,-1,-123,1,125,-1,-127,1,129,-1,-131,1,133,-1,-135,1,137,-1,-139,1,141,-1,-143,1,145,-1,-147,1,149,-1,-151,1,153,-1,-155,1,157,-1,-159,1,161,-1,-163,1,165,-1,-167,1,169,-1,-171,1,173,-1,-175,1,177,-1,-179,1,181,-1,-183,1,185,-1,-187,1,189,-1,-191,1,193,-1,-195,1,197,-1,-199,1,201,-1,-203,1,205,-1,-207,1,209,-1,-211,1,213,-1,-215,1,217,-1,-219,1,221,-1,-223,1,225,-1,-227,1,229,-1,-231,1,233,-1,-235,1,237,-1,-239,1,241,-1,-243,1,245,-1,-247,1,249 mov $1,$0 mov $2,$0 mov $0,1 lpb $2,1 sub $1,$0 add $0,$1 sub $1,$0 sub $2,1 lpe mov $1,$0
69
820
0.538302
[ "Apache-2.0" ]
karttu/loda
programs/oeis/009/A009001.asm
966
Assembly
;******************************************************************************************************** ; uC/OS-II ; The Real-Time Kernel ; ; Copyright 1992-2020 Silicon Laboratories Inc. www.silabs.com ; ; SPDX-License-Identifier: APACHE-2.0 ; ; This software is subject to an open source license and is distributed by ; Silicon Laboratories Inc. pursuant to the terms of the Apache License, ; Version 2.0 available at www.apache.org/licenses/LICENSE-2.0. ; ;******************************************************************************************************** ;******************************************************************************************************** ; ; 80x86/80x88 Specific code ; LARGE MEMORY MODEL WITH FLOATING-POINT AND SEPARATE INTERRUPT STACK ; Borland C/C++ V4.51 ; ; Filename : os_cpu_a.asm ; Version : V2.93.00 ;******************************************************************************************************** PUBLIC _OSStartHighRdy PUBLIC _OSCtxSw PUBLIC _OSIntCtxSw PUBLIC _OSFPRestore PUBLIC _OSFPSave PUBLIC _OSTickISR EXTRN _OSIntExit:FAR EXTRN _OSTimeTick:FAR EXTRN _OSTaskSwHook:FAR EXTRN _OSIntNesting:BYTE EXTRN _OSTickDOSCtr:BYTE EXTRN _OSTickDOSCtrReload:BYTE EXTRN _OSISRStkPtr:WORD EXTRN _OSPrioHighRdy:BYTE EXTRN _OSPrioCur:BYTE EXTRN _OSRunning:BYTE EXTRN _OSTCBCur:DWORD EXTRN _OSTCBHighRdy:DWORD .MODEL LARGE .CODE .186 PAGE ;********************************************************************************************************* ; START MULTITASKING ; void OSStartHighRdy(void) ; ; The stack frame is assumed to look as follows: ; ; OSTCBHighRdy->OSTCBStkPtr --> DS (Low memory) ; ES ; DI ; SI ; BP ; SP ; BX ; DX ; CX ; AX ; OFFSET of task code address ; SEGMENT of task code address ; Flags to load in PSW ; OFFSET of task code address ; SEGMENT of task code address ; OFFSET of 'p_arg' ; SEGMENT of 'p_arg' (High memory) ; ; Note : OSStartHighRdy() MUST: ; a) Call OSTaskSwHook() then, ; b) Set OSRunning to TRUE, ; c) Switch to the highest priority task. ;********************************************************************************************************* _OSStartHighRdy PROC FAR CALL FAR PTR _OSTaskSwHook ; Call user defined task switch hook ; MOV AX, SEG _OSTCBHighRdy ; Reload DS MOV DS, AX ; MOV AL, 1 ; OSRunning = TRUE; MOV BYTE PTR DS:_OSRunning, AL ; (Indicates that multitasking has started) ; LES BX, DWORD PTR DS:_OSTCBHighRdy ; SS:SP = OSTCBHighRdy->OSTCBStkPtr MOV SS, ES:[BX+2] ; MOV SP, ES:[BX+0] ; ; POP DS ; Load task's context POP ES ; POPA ; ; IRET ; Run task _OSStartHighRdy ENDP PAGE ;********************************************************************************************************* ; PERFORM A CONTEXT SWITCH (From task level) ; void OSCtxSw(void) ; ; Note(s): 1) Upon entry, ; OSTCBCur points to the OS_TCB of the task to suspend ; OSTCBHighRdy points to the OS_TCB of the task to resume ; ; 2) The stack frame of the task to suspend looks as follows: ; ; SP -> OFFSET of task to suspend (Low memory) ; SEGMENT of task to suspend ; PSW of task to suspend (High memory) ; ; 3) The stack frame of the task to resume looks as follows: ; ; OSTCBHighRdy->OSTCBStkPtr --> DS (Low memory) ; ES ; DI ; SI ; BP ; SP ; BX ; DX ; CX ; AX ; OFFSET of task code address ; SEGMENT of task code address ; Flags to load in PSW (High memory) ;********************************************************************************************************* _OSCtxSw PROC FAR ; PUSHA ; Save current task's context PUSH ES ; PUSH DS ; ; MOV AX, SEG _OSTCBCur ; Reload DS in case it was altered MOV DS, AX ; ; LES BX, DWORD PTR DS:_OSTCBCur ; OSTCBCur->OSTCBStkPtr = SS:SP MOV ES:[BX+2], SS ; MOV ES:[BX+0], SP ; ; CALL FAR PTR _OSTaskSwHook ; Call user defined task switch hook ; MOV AX, WORD PTR DS:_OSTCBHighRdy+2 ; OSTCBCur = OSTCBHighRdy MOV DX, WORD PTR DS:_OSTCBHighRdy ; MOV WORD PTR DS:_OSTCBCur+2, AX ; MOV WORD PTR DS:_OSTCBCur, DX ; ; MOV AL, BYTE PTR DS:_OSPrioHighRdy ; OSPrioCur = OSPrioHighRdy MOV BYTE PTR DS:_OSPrioCur, AL ; ; LES BX, DWORD PTR DS:_OSTCBHighRdy ; SS:SP = OSTCBHighRdy->OSTCBStkPtr MOV SS, ES:[BX+2] ; MOV SP, ES:[BX] ; ; POP DS ; Load new task's context POP ES ; POPA ; ; IRET ; Return to new task ; _OSCtxSw ENDP PAGE ;********************************************************************************************************* ; PERFORM A CONTEXT SWITCH (From an ISR) ; void OSIntCtxSw(void) ; ; Note(s): 1) Upon entry, ; OSTCBCur points to the OS_TCB of the task to suspend ; OSTCBHighRdy points to the OS_TCB of the task to resume ; ; 2) The stack frame of the task to suspend looks as follows: ; ; OSTCBCur->OSTCBStkPtr ------> DS (Low memory) ; ES ; DI ; SI ; BP ; SP ; BX ; DX ; CX ; AX ; OFFSET of task code address ; SEGMENT of task code address ; Flags to load in PSW (High memory) ; ; 3) The stack frame of the task to resume looks as follows: ; ; OSTCBHighRdy->OSTCBStkPtr --> DS (Low memory) ; ES ; DI ; SI ; BP ; SP ; BX ; DX ; CX ; AX ; OFFSET of task code address ; SEGMENT of task code address ; Flags to load in PSW (High memory) ;********************************************************************************************************* _OSIntCtxSw PROC FAR ; CALL FAR PTR _OSTaskSwHook ; Call user defined task switch hook ; MOV AX, SEG _OSTCBCur ; Reload DS in case it was altered MOV DS, AX ; ; MOV AX, WORD PTR DS:_OSTCBHighRdy+2 ; OSTCBCur = OSTCBHighRdy MOV DX, WORD PTR DS:_OSTCBHighRdy ; MOV WORD PTR DS:_OSTCBCur+2, AX ; MOV WORD PTR DS:_OSTCBCur, DX ; ; MOV AL, BYTE PTR DS:_OSPrioHighRdy ; OSPrioCur = OSPrioHighRdy MOV BYTE PTR DS:_OSPrioCur, AL ; LES BX, DWORD PTR DS:_OSTCBHighRdy ; SS:SP = OSTCBHighRdy->OSTCBStkPtr MOV SS, ES:[BX+2] ; MOV SP, ES:[BX] ; ; POP DS ; Load new task's context POP ES ; POPA ; ; IRET ; Return to new task ; _OSIntCtxSw ENDP PAGE ;********************************************************************************************************* ; RESTORE FPU REGISTERS ; void OSFPRestore(void *pblk) ; ; Description : This function is called to restore the contents of the FPU registers during a context ; switch. It is assumed that a pointer to a storage area for the FPU registers is placed ; in the task's TCB (i.e. .OSTCBExtPtr). ; Arguments : pblk is passed to this function when called. ; Note(s) : 1) The stack frame upon entry looks as follows: ; ; SP + 0 -> OFFSET of caller (Low memory) ; + 2 SEGMENT of caller ; + 4 OFFSET of pblk ; + 6 SEGMENT of pblk (High memory) ;********************************************************************************************************* _OSFPRestore PROC FAR ; PUSH BP ; Save work registers MOV BP,SP PUSH ES PUSH BX ; LES BX, DWORD PTR [BP+6] ; Point to 'pblk' ; FRSTOR ES:[BX] ; Restore FPU context ; POP BX ; Restore work registers POP ES POP BP ; RET ; Return to caller ; _OSFPRestore ENDP PAGE ;********************************************************************************************************* ; SAVE FPU REGISTERS ; void OSFPSave(void *pblk) ; ; Description : This function is called to save the contents of the FPU registers during a context ; switch. It is assumed that a pointer to a storage area for the FPU registers is placed ; in the task's TCB (i.e. .OSTCBExtPtr). ; Arguments : pblk is passed to this function when called. ; Note(s) : 1) The stack frame upon entry looks as follows: ; ; SP + 0 -> OFFSET of caller (Low memory) ; + 2 SEGMENT of caller ; + 4 OFFSET of pblk ; + 6 SEGMENT of pblk (High memory) ;********************************************************************************************************* _OSFPSave PROC FAR ; PUSH BP ; Save work registers MOV BP,SP PUSH ES PUSH BX ; LES BX, DWORD PTR [BP+6] ; Point to 'pblk' ; FSAVE ES:[BX] ; Save FPU context ; POP BX ; Restore work registers POP ES POP BP ; RET ; Return to caller ; _OSFPSave ENDP PAGE ;********************************************************************************************************* ; HANDLE TICK ISR ; ; Description: This function is called 199.99 times per second or, 11 times faster than the normal DOS ; tick rate of 18.20648 Hz. Thus every 11th time, the normal DOS tick handler is called. ; This is called chaining. 10 times out of 11, however, the interrupt controller on the PC ; must be cleared to allow for the next interrupt. ; ; Arguments : none ; ; Returns : none ; ; Note(s) : The following C-like pseudo-code describe the operation being performed in the code below. ; ; Save all registers on the current task's stack; ; OSIntNesting++; ; if (OSIntNesting == 1) { ; OSTCBCur->OSTCBStkPtr = SS:SP ; SS:SP = OSISRStkPtr; ; } ; OSTickDOSCtr--; ; if (OSTickDOSCtr == 0) { ; OSTickDOSCtr = OSTickDOSCtrReload; ; INT 81H; Chain into DOS every 54.925 mS ; (Interrupt will be cleared by DOS) ; } else { ; Send EOI to PIC; Clear tick interrupt by sending an End-Of-Interrupt to the 8259 ; PIC (Priority Interrupt Controller) ; } ; OSTimeTick(); Notify uC/OS-II that a tick has occured ; OSIntExit(); Notify uC/OS-II about end of ISR ; if (OSIntNesting == 0) { if we don't have a NEW HPT ; SS:SP = OSTCBHighRdy->OSTCBStkPtr; Restore the current task's SP ; } ; Restore all registers that were save on the current task's stack; ; Return from Interrupt; ;********************************************************************************************************* ; _OSTickISR PROC FAR ; PUSHA ; Save interrupted task's context PUSH ES PUSH DS ; MOV AX, SEG(_OSIntNesting) ; Reload DS MOV DS, AX INC BYTE PTR DS:_OSIntNesting ; Notify uC/OS-II of ISR ; CMP BYTE PTR DS:_OSIntNesting, 1 ; if (OSIntNesting == 1) JNE SHORT _OSTickISR1 MOV AX, SEG(_OSTCBCur) ; Reload DS MOV DS, AX LES BX, DWORD PTR DS:_OSTCBCur ; OSTCBCur->OSTCBStkPtr = SS:SP MOV ES:[BX+2], SS ; MOV ES:[BX+0], SP ; ; MOV AX, SEG(_OSISRStkPtr) ; SS:SP = OSISRStkPtr MOV DS, AX MOV BX, DS:_OSISRStkPtr+2 MOV CX, DS:_OSISRStkPtr MOV SS, BX MOV SP, CX ; _OSTickISR1: MOV AX, SEG(_OSTickDOSCtr) ; if (OSTickDOSCtr == 0) MOV DS, AX DEC BYTE PTR DS:_OSTickDOSCtr CMP BYTE PTR DS:_OSTickDOSCtr, 0 JNE SHORT _OSTickISR2 ; MOV AL, BYTE PTR DS:_OSTickDOSCtrReload MOV BYTE PTR DS:_OSTickDOSCtr, AL INT 081H ; Chain into DOS's tick ISR (Every 11 ticks (~199.99 Hz)) JMP SHORT _OSTickISR3 _OSTickISR2: ; else MOV AL, 20H ; Send EOI to PIC MOV DX, 20H OUT DX, AL ; _OSTickISR3: CALL FAR PTR _OSTimeTick ; Process system tick ; CALL FAR PTR _OSIntExit ; Notify uC/OS-II of end of ISR ; CMP BYTE PTR DS:_OSIntNesting, 0 ; if (OSIntNesting == 0) JNE SHORT _OSTickISR4 MOV AX, SEG(_OSTCBCur) ; Reload DS MOV DS, AX LES BX, DWORD PTR DS:_OSTCBHighRdy ; SS:SP = OSTCBHighRdy->OSTCBStkPtr MOV SS, ES:[BX+2] MOV SP, ES:[BX] _OSTickISR4: POP DS ; Restore interrupted task's context POP ES POPA ; IRET ; Return to interrupted task ; _OSTickISR ENDP ; END
44.193705
113
0.357385
[ "Apache-2.0" ]
Cojayx/uC-OS2
Ports/80x86/DOS/L-FP-I/BC45/os_cpu_a.asm
18,252
Assembly
TITLE Scanning for a Positive Value (Loopnz.asm) ; Scan an array for the first positive value. ; If no value is found, ESI will point to a sentinel ; value (0) stored immediately after the array. ; Last update: 11/4/01 INCLUDE Irvine32.inc .data array SWORD -3,-6,-1,-10,10,30,40,4 ;array SWORD -3,-6,-1,-10 ; alternate test data sentinel SWORD 0 .code main PROC mov esi,OFFSET array mov ecx,LENGTHOF array next: test WORD PTR [esi],10000000b ; test highest bit pushfd ; push flags on stack add esi,TYPE array popfd ; pop flags from stack loopnz next ; continue loop jnz quit ; none found sub esi,TYPE array ; SI points to value quit: call crlf exit main ENDP END main
20.823529
55
0.707627
[ "Apache-2.0" ]
satadriver/LiunuxOS_t
Examples/ch06/Loopnz.asm
708
Assembly
; ********************************************************************************* ; ********************************************************************************* ; ; File: screen48k.asm ; Purpose: Hardware interface to Spectrum display, standard but with ; sprites enabled. ; Date : 27th December 2018 ; Author: paul@robsons.org.uk ; ; ********************************************************************************* ; ********************************************************************************* ; ********************************************************************************* ; ; Call the SetMode for the Spectrum 48k ; ; ********************************************************************************* GFXInitialise: push af ; save registers push bc ld bc,$123B ; Layer 2 access port ld a,0 ; disable Layer 2 out (c),a db $ED,$91,$15,$3 ; Disable LowRes but enable Sprites ld hl,$4000 ; clear pixel memory __cs1: ld (hl),0 inc hl ld a,h cp $58 jr nz,__cs1 __cs2: ld (hl),$47 ; clear attribute memory inc hl ld a,h cp $5B jr nz,__cs2 xor a ; border off out ($FE),a pop bc pop af ld hl,$1820 ; H = 24,L = 32, screen extent ret ; ********************************************************************************* ; ; Write a character E on the screen at HL, in colour D ; ; ********************************************************************************* GFXCharacterHandler: push af ; save registers push bc push de push hl ld b,e ; character in B ld a,h ; check range. cp 3 jr nc,__ZXWCExit ; ; work out attribute position ; push hl ; save position. ld a,h add $58 ld h,a ld a,d ; get current colour and 7 ; mask 0..2 or $40 ; make bright ld (hl),a ; store it. pop hl ; ; calculate screen position => HL ; push de ex de,hl ld l,e ; Y5 Y4 Y3 X4 X3 X2 X1 X0 ld a,d and 3 add a,a add a,a add a,a or $40 ld h,a pop de ; ; char# 32-127 to font address => DE ; ld a,b ; get character call GFXGetFontGraphicDE ; ; copy font data to screen position. ; ld a,b ld b,8 ; copy 8 characters ld c,0 ; XOR value 0 __ZXWCCopy: ld a,(de) ; get font data ld (hl),a ; write back inc h ; bump pointers inc de djnz __ZXWCCopy ; do B times. __ZXWCExit: pop hl ; restore and exit pop de pop bc pop af ret
23.548673
83
0.397219
[ "MIT" ]
paulscottrobson/z80-machine-forth-2
kernels/lib.source/graphics.48k/screen48k.asm
2,661
Assembly
INCLUDE "defines.asm" SECTION "Vectors", ROM0[0] NULL:: ; This traps jumps to $0000, which is a common "default" pointer ; $FFFF is another one, but reads rIE as the instruction byte ; Thus, we put two `nop`s that may serve as operands, before soft-crashing ; The operand will always be 0, so even jumps will work fine. Nice! nop nop rst Crash ds $08 - @ ; 5 free bytes ; Waits for the next VBlank beginning ; Requires the VBlank handler to be able to trigger, otherwise will loop infinitely ; This means IME should be set, the VBlank interrupt should be selected in IE, ; and the LCD should be turned on. ; WARNING: Be careful if calling this with IME reset (`di`), if this was compiled ; with the `-h` flag, then a hardware bug is very likely to cause this routine to ; go horribly wrong. ; Note: the VBlank handler recognizes being called from this function (through `hVBlankFlag`), ; and does not try to save registers if so. To be safe, consider all registers to be destroyed. ; @destroy Possibly every register. The VBlank handler stops preserving anything when executed from this function WaitVBlank:: ld a, 1 ldh [hVBlankFlag], a .wait halt jr .wait ds $10 - 1 - @ ; 0 free bytes MemsetLoop: ld a, d ; You probably don't want to use this for writing to VRAM while the LCD is on. See LCDMemset. Memset:: ld [hli], a ld d, a dec bc ld a, b or c jr nz, MemsetLoop ret ds $18 - @ ; 0 free bytes MemcpySmall:: ld a, [de] ld [hli], a inc de dec c jr nz, MemcpySmall ret ds $20 - @ ; 1 free byte MemsetSmall:: ld [hli], a dec c jr nz, MemsetSmall ret ds $28 - 3 - @ ; 0 free bytes ; Dereferences `hl` and jumps there ; All other registers are passed to the called code intact, except Z is reset ; Soft-crashes if the jump target is in RAM ; @param hl Pointer to an address to jump to JumpToPtr:: ld a, [hli] ld h, [hl] ld l, a ; Jump to some address ; All registers are passed to the called code intact, except Z is reset ; (`jp CallHL` is equivalent to `jp hl`, but with the extra error checking on top) ; Soft-crashes if attempting to jump to RAM ; @param hl The address of the code to jump to CallHL:: bit 7, h error nz jp hl ds $30 - @ ; 3 free bytes ; Jumps to some address ; All registers are passed to the target code intact, except Z is reset ; (`jp CallDE` would be equivalent to `jp de` if that instruction existed) ; Soft-crashes if attempting to jump to RAM ; @param de The address of the code to jump to CallDE:: bit 7, d push de ret z ; No jumping to RAM, boy! rst Crash ds $38 - @ ; 3 free bytes ; Perform a soft-crash. Prints debug info on-screen Crash:: di ; Doing this as soon as possible to avoid interrupts messing up jp HandleCrash ds $40 - @ ; VBlank handler push af ldh a, [hLCDC] ldh [rLCDC], a jp VBlankHandler ds $48 - @ ; STAT handler reti ds $50 - @ ; Timer handler reti ds $58 - @ ; Serial handler reti ds $60 - @ ; Joypad handler (useless) reti SECTION "VBlank handler", ROM0 VBlankHandler: ldh a, [hSCY] ldh [rSCY], a ldh a, [hSCX] ldh [rSCX], a ldh a, [hBGP] ldh [rBGP], a ldh a, [hOBP0] ldh [rOBP0], a ldh a, [hOBP1] ldh [rOBP1], a ; OAM DMA can occur late in the handler, because it will still work even ; outside of VBlank. Sprites just will not appear on the scanline(s) ; during which it's running. ldh a, [hOAMHigh] and a jr z, .noOAMTransfer call hOAMDMA xor a ldh [hOAMHigh], a .noOAMTransfer ; Put all operations that cannot be interrupted above this line ; For example, OAM DMA (can't jump to ROM in the middle of it), ; VRAM accesses (can't screw up timing), etc ei ldh a, [hVBlankFlag] and a jr z, .lagFrame xor a ldh [hVBlankFlag], a ld c, LOW(rP1) ld a, $20 ; Select D-pad ldh [c], a REPT 6 ldh a, [c] ENDR or $F0 ; Set 4 upper bits (give them consistency) ld b, a ; Filter impossible D-pad combinations and $0C ; Filter only Down and Up ld a, b jr nz, .notUpAndDown or $0C ; If both are pressed, "unpress" them ld b, a .notUpAndDown and $03 ; Filter only Left and Right jr nz, .notLeftAndRight ; If both are pressed, "unpress" them inc b inc b inc b .notLeftAndRight swap b ; Put D-pad buttons in upper nibble ld a, $10 ; Select buttons ldh [c], a REPT 6 ldh a, [c] ENDR ; On SsAB held, soft-reset and $0F jr z, .perhapsReset .dontReset or $F0 ; Set 4 upper bits xor b ; Mix with D-pad bits, and invert all bits (such that pressed=1) thanks to "or $F0" ld b, a ; Release joypad ld a, $30 ldh [c], a ldh a, [hHeldKeys] cpl and b ldh [hPressedKeys], a ld a, b ldh [hHeldKeys], a pop af ; Pop off return address as well to exit infinite loop .lagFrame pop af ret .perhapsReset ldh a, [hCanSoftReset] and a jr z, .dontReset jp Reset SECTION "VBlank HRAM", HRAM ; DO NOT TOUCH THIS ; When this flag is set, the VBlank handler will assume the caller is `WaitVBlank`, ; and attempt to exit it. You don't want that to happen outside of that function. hVBlankFlag:: db ; High byte of the address of the OAM buffer to use. ; When this is non-zero, the VBlank handler will write that value to rDMA, and ; reset it. hOAMHigh:: db ; Shadow registers for a bunch of hardware regs. ; Writing to these causes them to take effect more or less immediately, so these ; are copied to the hardware regs by the VBlank handler, taking effect between frames. ; They also come in handy for "resetting" them if modifying them mid-frame for raster FX. hLCDC:: db hSCY:: db hSCX:: db hBGP:: db hOBP0:: db hOBP1:: db ; Keys that are currently being held, and that became held just this frame, respectively. ; Each bit represents a button, with that bit set == button pressed ; Button order: Down, Up, Left, Right, Start, select, B, A ; U+D and L+R are filtered out by software, so they will never happen hHeldKeys:: db hPressedKeys:: db ; If this is 0, pressing SsAB at the same time will not reset the game hCanSoftReset:: db
23.472222
113
0.701775
[ "MIT" ]
rondnelson99/bouncy-dvd
src/vectors.asm
5,915
Assembly
.data char: .byte 'e' strr: .asciiz "aeiou" fail: .asciiz " the char was not found in " success: .asciiz " the char was found in " .text main: lb $t0, char lb $t7, char la $s0, strr lb $s1, ($s0) srch: beq $s1,$zero, uns beq $s1,$t0,suc add $s0,$s0,1 lb $s1,($s0) j srch suc: la $a0, success li $v0, 4 syscall j exit uns: la $a0, fail li $v0, 4 syscall exit: la $a0, strr li $v0, 4 syscall li $v0,10 syscall
10
43
0.62381
[ "MIT" ]
MilindAnand/MIPS_Programming
Strings and Arrays/String Search.asm
420
Assembly
; A077897: Expansion of (1-x)^(-1)/(1+x-2*x^2-x^3). ; Submitted by Christian Krause ; 1,0,3,-1,8,-6,22,-25,64,-91,195,-312,612,-1040,1953,-3420,6287,-11173,20328,-36386,65870,-118313,213668,-384423,693447,-1248624,2251096,-4054896,7308465,-13167160,23729195,-42755049,77046280,-138827182,250164694,-450772777,812274984,-1463655843 add $0,1 lpb $0 sub $0,1 div $2,2 mov $1,$2 mov $2,$4 mul $2,2 add $3,1 sub $4,$2 add $4,$3 mov $3,$2 add $3,$1 lpe mov $0,$4
25.157895
246
0.648536
[ "Apache-2.0" ]
ckrause/loda-programs
oeis/077/A077897.asm
478
Assembly
;------------------------------------------------------------------------------ ; ECDSA signature ; In: KECCAKS hash state, PRIVK private key ; Out: ECX r, ECV s, A v SECTION code_user EXTERN MODQADD EXTERN MODQMUL EXTERN ECGMUL EXTERN KECCAKI EXTERN KECCAKU EXTERN KECCAKR EXTERN KECCAK EXTERN KECCAKS EXTERN ECDSAZ PUBLIC ECDSAS ECDSAS: CALL KECCAK LD DE,KECCAKS LD HL,ECDSAZ + 0x20 LD B,0x20 ECDSAL1: LD A,(DE) ; Save Z INC E DEC L LD (HL),A DJNZ ECDSAL1 LD HL,PRIVK LD C,0x20 LDIR ; Concatenate Z and Pk LD L,E LD H,D LD (KECCAKP),HL INC E LD (HL),C LD BC,0x87 LDIR CALL KECCAK ; Deterministic K LD HL,KECCAKS LD DE,ECDSAK CALL MODQINV LD DE,KECCAKS + 0x1F CALL ECGMUL LD HL,ECDSAM PUSH HL EXX LD HL,PRIVK LD DE,ECX CALL MODQMUL POP DE PUSH DE LD HL,ECDSAZ CALL MODQADD POP HL EXX LD HL,ECDSAZ LD DE,ECDSAK CALL MODQMUL LD A,(ECY) AND 1 ADD 0x1B RET
15.208333
79
0.53516
[ "MIT" ]
feilipu/z80_crypto
source/ecdsa.asm
1,095
Assembly
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Copyright(c) 2011-2017 Intel Corporation All rights reserved. ; ; Redistribution and use in source and binary forms, with or without ; modification, are permitted provided that the following conditions ; are met: ; * Redistributions of source code must retain the above copyright ; notice, this list of conditions and the following disclaimer. ; * Redistributions in binary form must reproduce the above copyright ; notice, this list of conditions and the following disclaimer in ; the documentation and/or other materials provided with the ; distribution. ; * Neither the name of Intel Corporation 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. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %include "sha256_mb_mgr_datastruct.asm" %include "reg_sizes.asm" %ifdef HAVE_AS_KNOWS_SHANI default rel ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %ifidn __OUTPUT_FORMAT__, elf64 ; Linux %define arg0 rdi %define arg1 rsi %else ; Windows %define arg0 rcx %define arg1 rdx %endif %define MSG xmm0 %define STATE0 xmm1 %define STATE1 xmm2 %define MSGTMP0 xmm3 %define MSGTMP1 xmm4 %define MSGTMP2 xmm5 %define MSGTMP3 xmm6 %define MSGTMP4 xmm7 %define SHUF_MASK xmm8 %define ABEF_SAVE xmm9 %define CDGH_SAVE xmm10 ; arg index is start from 0 while mgr_flush/submit is from 1 %define MGR arg0 %define NBLK arg1 %define NLANX4 r10 ; consistent with caller %define IDX r8 ; local variable -- consistent with caller %define DPTR r11 ; local variable -- input buffer pointer %define TMP r9 ; local variable -- assistant to address digest %define TBL rax ;%define TMP2 r8 ; local variable -- assistant to address digest align 32 ; void sha256_ni_x1(SHA256_MB_ARGS_Xn *args, uint32_t size_in_blocks); ; arg 0 : MGR : pointer to args (only 4 of the 16 lanes used) ; arg 1 : NBLK : size (in blocks) ;; assumed to be >= 1 ; invisibile arg 2 : IDX : hash on which lane ; invisibile arg 3 : NLANX4 : max lanes*4 for this arch (digest is placed by it) ; (sse/avx is 4, avx2 is 8, avx512 is 16) ; ; Clobbers registers: rax, r9~r11, xmm0-xmm10 ; mk_global sha256_ni_x1, function, internal sha256_ni_x1: shl NBLK, 6 ; transform blk amount into bytes jz backto_mgr ; detach idx from nlanx4 mov IDX, NLANX4 shr NLANX4, 8 and IDX, 0xff lea TMP, [MGR + 4*IDX] ;; Initialize digest ;; digests -> ABEF(state0), CDGH(state1) pinsrd STATE0, [TMP + 0*NLANX4], 3 ; A pinsrd STATE0, [TMP + 1*NLANX4], 2 ; B pinsrd STATE1, [TMP + 2*NLANX4], 3 ; C lea TMP, [TMP + 2*NLANX4] ; MGR + 4*IDX + 2*NLANX4 pinsrd STATE1, [TMP + 1*NLANX4], 2 ; D pinsrd STATE0, [TMP + 2*NLANX4], 1 ; E pinsrd STATE1, [TMP + 4*NLANX4], 1 ; G lea TMP, [TMP + 1*NLANX4] ; MGR + 4*IDX + 6*NLANX4 pinsrd STATE0, [TMP + 2*NLANX4], 0 ; F pinsrd STATE1, [TMP + 4*NLANX4], 0 ; H movdqa SHUF_MASK, [PSHUFFLE_SHANI_MASK] lea TBL, [TABLE] ;; Load input pointers mov DPTR, [MGR + _data_ptr + IDX*8] ;; nblk is used to indicate data end add NBLK, DPTR lloop: ; /* Save hash values for addition after rounds */ movdqa ABEF_SAVE, STATE0 movdqa CDGH_SAVE, STATE1 ; /* Rounds 0-3 */ movdqu MSG, [DPTR + 0*16] pshufb MSG, SHUF_MASK movdqa MSGTMP0, MSG paddd MSG, [TBL + 0*16] sha256rnds2 STATE1, STATE0, MSG pshufd MSG, MSG, 0x0E sha256rnds2 STATE0, STATE1, MSG ; /* Rounds 4-7 */ movdqu MSG, [DPTR + 1*16] pshufb MSG, SHUF_MASK movdqa MSGTMP1, MSG paddd MSG, [TBL + 1*16] sha256rnds2 STATE1, STATE0, MSG pshufd MSG, MSG, 0x0E sha256rnds2 STATE0, STATE1, MSG sha256msg1 MSGTMP0, MSGTMP1 ; /* Rounds 8-11 */ movdqu MSG, [DPTR + 2*16] pshufb MSG, SHUF_MASK movdqa MSGTMP2, MSG paddd MSG, [TBL + 2*16] sha256rnds2 STATE1, STATE0, MSG pshufd MSG, MSG, 0x0E sha256rnds2 STATE0, STATE1, MSG sha256msg1 MSGTMP1, MSGTMP2 ; /* Rounds 12-15 */ movdqu MSG, [DPTR + 3*16] pshufb MSG, SHUF_MASK movdqa MSGTMP3, MSG paddd MSG, [TBL + 3*16] sha256rnds2 STATE1, STATE0, MSG movdqa MSGTMP4, MSGTMP3 palignr MSGTMP4, MSGTMP2, 4 paddd MSGTMP0, MSGTMP4 sha256msg2 MSGTMP0, MSGTMP3 pshufd MSG, MSG, 0x0E sha256rnds2 STATE0, STATE1, MSG sha256msg1 MSGTMP2, MSGTMP3 ; /* Rounds 16-19 */ movdqa MSG, MSGTMP0 paddd MSG, [TBL + 4*16] sha256rnds2 STATE1, STATE0, MSG movdqa MSGTMP4, MSGTMP0 palignr MSGTMP4, MSGTMP3, 4 paddd MSGTMP1, MSGTMP4 sha256msg2 MSGTMP1, MSGTMP0 pshufd MSG, MSG, 0x0E sha256rnds2 STATE0, STATE1, MSG sha256msg1 MSGTMP3, MSGTMP0 ; /* Rounds 20-23 */ movdqa MSG, MSGTMP1 paddd MSG, [TBL + 5*16] sha256rnds2 STATE1, STATE0, MSG movdqa MSGTMP4, MSGTMP1 palignr MSGTMP4, MSGTMP0, 4 paddd MSGTMP2, MSGTMP4 sha256msg2 MSGTMP2, MSGTMP1 pshufd MSG, MSG, 0x0E sha256rnds2 STATE0, STATE1, MSG sha256msg1 MSGTMP0, MSGTMP1 ; /* Rounds 24-27 */ movdqa MSG, MSGTMP2 paddd MSG, [TBL + 6*16] sha256rnds2 STATE1, STATE0, MSG movdqa MSGTMP4, MSGTMP2 palignr MSGTMP4, MSGTMP1, 4 paddd MSGTMP3, MSGTMP4 sha256msg2 MSGTMP3, MSGTMP2 pshufd MSG, MSG, 0x0E sha256rnds2 STATE0, STATE1, MSG sha256msg1 MSGTMP1, MSGTMP2 ; /* Rounds 28-31 */ movdqa MSG, MSGTMP3 paddd MSG, [TBL + 7*16] sha256rnds2 STATE1, STATE0, MSG movdqa MSGTMP4, MSGTMP3 palignr MSGTMP4, MSGTMP2, 4 paddd MSGTMP0, MSGTMP4 sha256msg2 MSGTMP0, MSGTMP3 pshufd MSG, MSG, 0x0E sha256rnds2 STATE0, STATE1, MSG sha256msg1 MSGTMP2, MSGTMP3 ; /* Rounds 32-35 */ movdqa MSG, MSGTMP0 paddd MSG, [TBL + 8*16] sha256rnds2 STATE1, STATE0, MSG movdqa MSGTMP4, MSGTMP0 palignr MSGTMP4, MSGTMP3, 4 paddd MSGTMP1, MSGTMP4 sha256msg2 MSGTMP1, MSGTMP0 pshufd MSG, MSG, 0x0E sha256rnds2 STATE0, STATE1, MSG sha256msg1 MSGTMP3, MSGTMP0 ; /* Rounds 36-39 */ movdqa MSG, MSGTMP1 paddd MSG, [TBL + 9*16] sha256rnds2 STATE1, STATE0, MSG movdqa MSGTMP4, MSGTMP1 palignr MSGTMP4, MSGTMP0, 4 paddd MSGTMP2, MSGTMP4 sha256msg2 MSGTMP2, MSGTMP1 pshufd MSG, MSG, 0x0E sha256rnds2 STATE0, STATE1, MSG sha256msg1 MSGTMP0, MSGTMP1 ; /* Rounds 40-43 */ movdqa MSG, MSGTMP2 paddd MSG, [TBL + 10*16] sha256rnds2 STATE1, STATE0, MSG movdqa MSGTMP4, MSGTMP2 palignr MSGTMP4, MSGTMP1, 4 paddd MSGTMP3, MSGTMP4 sha256msg2 MSGTMP3, MSGTMP2 pshufd MSG, MSG, 0x0E sha256rnds2 STATE0, STATE1, MSG sha256msg1 MSGTMP1, MSGTMP2 ; /* Rounds 44-47 */ movdqa MSG, MSGTMP3 paddd MSG, [TBL + 11*16] sha256rnds2 STATE1, STATE0, MSG movdqa MSGTMP4, MSGTMP3 palignr MSGTMP4, MSGTMP2, 4 paddd MSGTMP0, MSGTMP4 sha256msg2 MSGTMP0, MSGTMP3 pshufd MSG, MSG, 0x0E sha256rnds2 STATE0, STATE1, MSG sha256msg1 MSGTMP2, MSGTMP3 ; /* Rounds 48-51 */ movdqa MSG, MSGTMP0 paddd MSG, [TBL + 12*16] sha256rnds2 STATE1, STATE0, MSG movdqa MSGTMP4, MSGTMP0 palignr MSGTMP4, MSGTMP3, 4 paddd MSGTMP1, MSGTMP4 sha256msg2 MSGTMP1, MSGTMP0 pshufd MSG, MSG, 0x0E sha256rnds2 STATE0, STATE1, MSG sha256msg1 MSGTMP3, MSGTMP0 ; /* Rounds 52-55 */ movdqa MSG, MSGTMP1 paddd MSG, [TBL + 13*16] sha256rnds2 STATE1, STATE0, MSG movdqa MSGTMP4, MSGTMP1 palignr MSGTMP4, MSGTMP0, 4 paddd MSGTMP2, MSGTMP4 sha256msg2 MSGTMP2, MSGTMP1 pshufd MSG, MSG, 0x0E sha256rnds2 STATE0, STATE1, MSG ; /* Rounds 56-59 */ movdqa MSG, MSGTMP2 paddd MSG, [TBL + 14*16] sha256rnds2 STATE1, STATE0, MSG movdqa MSGTMP4, MSGTMP2 palignr MSGTMP4, MSGTMP1, 4 paddd MSGTMP3, MSGTMP4 sha256msg2 MSGTMP3, MSGTMP2 pshufd MSG, MSG, 0x0E sha256rnds2 STATE0, STATE1, MSG ; /* Rounds 60-63 */ movdqa MSG, MSGTMP3 paddd MSG, [TBL + 15*16] sha256rnds2 STATE1, STATE0, MSG pshufd MSG, MSG, 0x0E sha256rnds2 STATE0, STATE1, MSG ; /* Add current hash values with previously saved */ paddd STATE0, ABEF_SAVE paddd STATE1, CDGH_SAVE ; Increment data pointer and loop if more to process add DPTR, 64 cmp DPTR, NBLK jne lloop ; write out digests lea TMP, [MGR + 4*IDX] ;; ABEF(state0), CDGH(state1) -> digests pextrd [TMP + 0*NLANX4], STATE0, 3 ; A pextrd [TMP + 1*NLANX4], STATE0, 2 ; B pextrd [TMP + 2*NLANX4], STATE1, 3 ; C lea TMP, [TMP + 2*NLANX4] ; MGR + 4*IDX + 2*NLANX4 pextrd [TMP + 1*NLANX4], STATE1, 2 ; D pextrd [TMP + 2*NLANX4], STATE0, 1 ; E pextrd [TMP + 4*NLANX4], STATE1, 1 ; G lea TMP, [TMP + 1*NLANX4] ; MGR + 4*IDX + 6*NLANX4 pextrd [TMP + 2*NLANX4], STATE0, 0 ; F pextrd [TMP + 4*NLANX4], STATE1, 0 ; H ; update input pointers mov [MGR + _data_ptr + IDX*8], DPTR backto_mgr: ;;;;;;;;;;;;;;;; ;; Postamble ret section .data align=16 PSHUFFLE_SHANI_MASK: dq 0x0405060700010203, 0x0c0d0e0f08090a0b TABLE: dd 0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5 dd 0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5 dd 0xd807aa98,0x12835b01,0x243185be,0x550c7dc3 dd 0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174 dd 0xe49b69c1,0xefbe4786,0x0fc19dc6,0x240ca1cc dd 0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da dd 0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7 dd 0xc6e00bf3,0xd5a79147,0x06ca6351,0x14292967 dd 0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13 dd 0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85 dd 0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3 dd 0xd192e819,0xd6990624,0xf40e3585,0x106aa070 dd 0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5 dd 0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3 dd 0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208 dd 0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2 %else %ifidn __OUTPUT_FORMAT__, win64 global no_sha256_ni_x1 no_sha256_ni_x1: %endif %endif ; HAVE_AS_KNOWS_SHANI
31.460894
80
0.655864
[ "BSD-3-Clause" ]
carl008-ma/isa-l_crypto
sha256_mb/sha256_ni_x1.asm
11,263
Assembly
; lzo1y_f2.asm -- lzo1y_decompress_asm_fast_safe ; ; This file is part of the LZO real-time data compression library. ; ; Copyright (C) 2008 Markus Franz Xaver Johannes Oberhumer ; Copyright (C) 2007 Markus Franz Xaver Johannes Oberhumer ; Copyright (C) 2006 Markus Franz Xaver Johannes Oberhumer ; Copyright (C) 2005 Markus Franz Xaver Johannes Oberhumer ; Copyright (C) 2004 Markus Franz Xaver Johannes Oberhumer ; Copyright (C) 2003 Markus Franz Xaver Johannes Oberhumer ; Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer ; Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer ; Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer ; Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer ; Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer ; Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer ; Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer ; All Rights Reserved. ; ; The LZO library is free software; you can redistribute it and/or ; modify it under the terms of the GNU General Public License as ; published by the Free Software Foundation; either version 2 of ; the License, or (at your option) any later version. ; ; The LZO library is distributed in the hope that it will be useful, ; but WITHOUT ANY WARRANTY; without even the implied warranty of ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ; GNU General Public License for more details. ; ; You should have received a copy of the GNU General Public License ; along with the LZO library; see the file COPYING. ; If not, write to the Free Software Foundation, Inc., ; 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ; ; Markus F.X.J. Oberhumer ; <markus@oberhumer.com> ; http://www.oberhumer.com/opensource/lzo/ ; ; /***** DO NOT EDIT - GENERATED AUTOMATICALLY *****/ %include "asminit.def" globalf(_lzo1y_decompress_asm_fast_safe) globalf(F(lzo1y_decompress_asm_fast_safe)) _lzo1y_decompress_asm_fast_safe: F(lzo1y_decompress_asm_fast_safe): db 85,87,86,83,81,82,131,236,12,252,139,116,36,40,139,124 db 36,48,189,3,0,0,0,141,70,253,3,68,36,44,137,68 db 36,4,137,248,139,84,36,52,3,2,137,4,36,49,192,49 db 219,172,60,17,118,55,44,14,235,62,5,255,0,0,0,141 db 84,6,18,57,84,36,4,15,130,78,2,0,0,138,30,70 db 8,219,116,230,141,68,24,21,235,30,141,182,0,0,0,0 db 57,116,36,4,15,130,49,2,0,0,138,6,70,60,16,115 db 119,8,192,116,216,131,192,6,141,84,7,253,57,20,36,15 db 130,29,2,0,0,141,84,6,253,57,84,36,4,15,130,8 db 2,0,0,137,193,49,232,193,233,2,33,232,139,22,131,198 db 4,137,23,131,199,4,73,117,243,41,198,41,199,138,6,70 db 60,16,115,52,141,87,3,57,20,36,15,130,226,1,0,0 db 193,232,2,138,30,141,151,255,251,255,255,141,4,152,70,41 db 194,59,84,36,48,15,130,206,1,0,0,139,10,137,15,1 db 239,233,151,0,0,0,137,246,60,64,114,68,137,193,193,232 db 2,141,87,255,33,232,138,30,193,233,4,141,4,152,70,41 db 194,131,193,2,57,232,115,74,233,171,0,0,0,5,255,0 db 0,0,141,86,3,57,84,36,4,15,130,124,1,0,0,138 db 30,70,8,219,116,231,141,76,24,36,49,192,235,18,137,246 db 60,32,15,130,200,0,0,0,131,224,31,116,226,141,72,5 db 102,139,6,141,87,255,193,232,2,131,198,2,41,194,57,232 db 114,102,59,84,36,48,15,130,77,1,0,0,141,68,15,253 db 193,233,2,57,4,36,15,130,54,1,0,0,139,26,131,194 db 4,137,31,131,199,4,73,117,243,137,199,49,219,138,70,254 db 33,232,15,132,216,254,255,255,141,20,7,57,20,36,15,130 db 14,1,0,0,141,20,6,57,84,36,4,15,130,250,0,0 db 0,139,22,1,198,137,23,1,199,138,6,70,233,55,255,255 db 255,141,180,38,0,0,0,0,59,84,36,48,15,130,231,0 db 0,0,141,68,15,253,57,4,36,15,130,211,0,0,0,135 db 214,41,233,243,164,137,214,235,164,129,193,255,0,0,0,141 db 86,3,57,84,36,4,15,130,175,0,0,0,138,30,70,8 db 219,116,230,141,76,11,12,235,27,141,180,38,0,0,0,0 db 60,16,114,44,137,193,131,224,8,193,224,13,131,225,7,116 db 219,131,193,5,102,139,6,131,198,2,141,151,0,192,255,255 db 193,232,2,116,57,41,194,233,38,255,255,255,141,116,38,0 db 141,87,2,57,20,36,114,106,193,232,2,138,30,141,87,255 db 141,4,152,70,41,194,59,84,36,48,114,93,138,2,136,7 db 138,90,1,136,95,1,131,199,2,233,31,255,255,255,131,249 db 6,15,149,192,59,60,36,119,57,139,84,36,40,3,84,36 db 44,57,214,119,38,114,29,43,124,36,48,139,84,36,52,137 db 58,247,216,131,196,12,90,89,91,94,95,93,195,184,1,0 db 0,0,235,227,184,8,0,0,0,235,220,184,4,0,0,0 db 235,213,184,5,0,0,0,235,206,184,6,0,0,0,235,199
48.166667
69
0.723183
[ "BSD-3-Clause" ]
1502shivam-singh/opentoonz
thirdparty/lzo/2.03/asm/i386/src_nasm/lzo1y_f2.asm
4,335
Assembly
; DV3 QXL Start / Stop Drive V3.00  1998 Tony Tebby section dv3 xdef hd_ststp ; start / stop drive include 'dev8_keys_err' include 'dev8_dv3_keys' include 'dev8_dv3_hd_keys' include 'dev8_dv3_hd_ide_keys' ;+++ ; This routine starts or stops a drive ; ; d0 cr start (-1), stop ($ffff) rundown (0+ minutes)/ error ; d7 c p drive ID / number ; a3 c p linkage block ; a4 c p drive definition ; ; status return 0, ERR.NC or ERR.MCHK ; ;--- hd_ststp moveq #0,d0 rts end
17.428571
60
0.680328
[ "BSD-2-Clause" ]
olifink/smsqe
dv3/qxl/hd/ststp.asm
488
Assembly
.org 0x8C0179F :: .incbin "m12-psitext.bin" .org 0x8B194C0 :: dw 0x000E945B .org 0x8B194C4 :: dw 0x000E945D .org 0x8B194C8 :: dw 0x000E9465 .org 0x8B194CC :: dw 0x000E9468 .org 0x8B194D0 :: dw 0x000E946D .org 0x8B194D4 :: dw 0x000E9474 .org 0x8B194D8 :: dw 0x000E947D .org 0x8B194DC :: dw 0x000E9487 .org 0x8B194E0 :: dw 0x000E948A .org 0x8B194E4 :: dw 0x000E948F .org 0x8B194E8 :: dw 0x000E9496 .org 0x8B194EC :: dw 0x000E949F .org 0x8B194F0 :: dw 0x000E94AB .org 0x8B194F4 :: dw 0x000E94AE .org 0x8B194F8 :: dw 0x000E94B3 .org 0x8B194FC :: dw 0x000E94BA .org 0x8B19500 :: dw 0x000E94C3 .org 0x8B19504 :: dw 0x000E94D0 .org 0x8B19508 :: dw 0x000E94D3 .org 0x8B1950C :: dw 0x000E94D8 .org 0x8B19510 :: dw 0x000E94DF .org 0x8B19514 :: dw 0x000E94E8 .org 0x8B19518 :: dw 0x000E94F3 .org 0x8B1951C :: dw 0x000E94F6 .org 0x8B19520 :: dw 0x000E94FB .org 0x8B19524 :: dw 0x000E9502 .org 0x8B19528 :: dw 0x000E950B .org 0x8B1952C :: dw 0x000E951A .org 0x8B19530 :: dw 0x000E951D .org 0x8B19534 :: dw 0x000E9522 .org 0x8B19538 :: dw 0x000E9525 .org 0x8B1953C :: dw 0x000E9528 .org 0x8B19540 :: dw 0x000E9530 .org 0x8B19544 :: dw 0x000E9533 .org 0x8B19548 :: dw 0x000E9538 .org 0x8B1954C :: dw 0x000E953F .org 0x8B19550 :: dw 0x000E9548 .org 0x8B19554 :: dw 0x000E9551 .org 0x8B19558 :: dw 0x000E9554 .org 0x8B1955C :: dw 0x000E9559 .org 0x8B19560 :: dw 0x000E9560 .org 0x8B19564 :: dw 0x000E9569 .org 0x8B19568 :: dw 0x000E9571 .org 0x8B1956C :: dw 0x000E9574 .org 0x8B19570 :: dw 0x000E9579 .org 0x8B19574 :: dw 0x000E9580 .org 0x8B19578 :: dw 0x000E9589 .org 0x8B1957C :: dw 0x000E9595 .org 0x8B19580 :: dw 0x000E9598 .org 0x8B19584 :: dw 0x000E959D .org 0x8B19588 :: dw 0x000E95A4 .org 0x8B1958C :: dw 0x000E95AD .org 0x8B19590 :: dw 0x000E95B9 .org 0x8B19594 :: dw 0x000E95BC .org 0x8B19598 :: dw 0x000E95C1 .org 0x8B1959C :: dw 0x000E95C4 .org 0x8B195A0 :: dw 0x000E95C7 .org 0x8B195A4 :: dw 0x000E95D5 .org 0x8B195A8 :: dw 0x000E95D8 .org 0x8B195AC :: dw 0x000E95DD .org 0x8B195B0 :: dw 0x000E95E0 .org 0x8B195B4 :: dw 0x000E95E3 .org 0x8B195B8 :: dw 0x000E95ED .org 0x8B195BC :: dw 0x000E95F0 .org 0x8B195C0 :: dw 0x000E95F5 .org 0x8B195C4 :: dw 0x000E95F8 .org 0x8B195C8 :: dw 0x000E95FB .org 0x8B195CC :: dw 0x000E9607 .org 0x8B195D0 :: dw 0x000E960A .org 0x8B195D4 :: dw 0x000E960F .org 0x8B195D8 :: dw 0x000E9612 .org 0x8B195DC :: dw 0x000E9615 .org 0x8B195E0 :: dw 0x000E9620 .org 0x8B195E4 :: dw 0x000E9623 .org 0x8B195E8 :: dw 0x000E9628 .org 0x8B195EC :: dw 0x000E962B .org 0x8B195F0 :: dw 0x000E962E .org 0x8B195F4 :: dw 0x000E963A .org 0x8B195F8 :: dw 0x000E963D .org 0x8B195FC :: dw 0x000E9642 .org 0x8B19600 :: dw 0x000E9645 .org 0x8B19604 :: dw 0x000E9648 .org 0x8B19608 :: dw 0x000E9652 .org 0x8B1960C :: dw 0x000E9655 .org 0x8B19610 :: dw 0x000E965A .org 0x8B19614 :: dw 0x000E965D .org 0x8B19618 :: dw 0x000E9660 .org 0x8B1961C :: dw 0x000E966A .org 0x8B19620 :: dw 0x000E9674 .org 0x8B19624 :: dw 0x000E967E .org 0x8B19628 :: dw 0x000E9688 .org 0x8B1962C :: dw 0x000E968B .org 0x8B19630 :: dw 0x000E9697 .org 0x8B19634 :: dw 0x000E96A3 .org 0x8B19638 :: dw 0x000E96AF .org 0x8B1963C :: dw 0x000E96BB .org 0x8B19640 :: dw 0x000E96BE .org 0x8B19644 :: dw 0x000E96CC .org 0x8B19648 :: dw 0x000E96DA .org 0x8B1964C :: dw 0x000E96E8 .org 0x8B19650 :: dw 0x000E96F6 .org 0x8B19654 :: dw 0x000E96F9 .org 0x8B19658 :: dw 0x000E9708 .org 0x8B1965C :: dw 0x000E9717 .org 0x8B19660 :: dw 0x000E9726 .org 0x8B19664 :: dw 0x000E9735 .org 0x8B19668 :: dw 0x000E9738 .org 0x8B1966C :: dw 0x000E9745 .org 0x8B19670 :: dw 0x000E9752 .org 0x8B19674 :: dw 0x000E975F .org 0x8B19678 :: dw 0x000E976C .org 0x8B1967C :: dw 0x000E976F .org 0x8B19680 :: dw 0x000E9780 .org 0x8B19684 :: dw 0x000E9791 .org 0x8B19688 :: dw 0x000E9794 .org 0x8B1968C :: dw 0x000E9797 .org 0x8B19690 :: dw 0x000E979A .org 0x8B19694 :: dw 0x000E97A4 .org 0x8B19698 :: dw 0x000E97AE .org 0x8B1969C :: dw 0x000E97B8 .org 0x8B196A0 :: dw 0x000E97C2 .org 0x8B196A4 :: dw 0x000E97C5 .org 0x8B196A8 :: dw 0x000E97D0 .org 0x8B196AC :: dw 0x000E97DB .org 0x8B196B0 :: dw 0x000E97E6 .org 0x8B196B4 :: dw 0x000E97F1 .org 0x8B196B8 :: dw 0x000E97F4 .org 0x8B196BC :: dw 0x000E97FE .org 0x8B196C0 :: dw 0x000E9808 .org 0x8B196C4 :: dw 0x000E9812 .org 0x8B196C8 :: dw 0x000E981C .org 0x8B196CC :: dw 0x000E981F .org 0x8B196D0 :: dw 0x000E982D .org 0x8B196D4 :: dw 0x000E983B .org 0x8B196D8 :: dw 0x000E9849 .org 0x8B196DC :: dw 0x000E9857 .org 0x8B196E0 :: dw 0x000E985A .org 0x8B196E4 :: dw 0x000E9868 .org 0x8B196E8 :: dw 0x000E9876 .org 0x8B196EC :: dw 0x000E9879 .org 0x8B196F0 :: dw 0x000E987C .org 0x8B196F4 :: dw 0x000E987F .org 0x8B196F8 :: dw 0x000E988F .org 0x8B196FC :: dw 0x000E989F .org 0x8B19700 :: dw 0x000E98A2 .org 0x8B19704 :: dw 0x000E98A5 .org 0x8B19708 :: dw 0x000E98A8 .org 0x8B1970C :: dw 0x000E98B4 .org 0x8B19710 :: dw 0x000E98C0 .org 0x8B19714 :: dw 0x000E98C3 .org 0x8B19718 :: dw 0x000E98C6 .org 0x8B1971C :: dw 0x000E98C9 .org 0x8B19720 :: dw 0x000E98D7 .org 0x8B19724 :: dw 0x000E98E5 .org 0x8B19728 :: dw 0x000E98E8 .org 0x8B1972C :: dw 0x000E98EB .org 0x8B19730 :: dw 0x000E98EE .org 0x8B19734 :: dw 0x000E98FB .org 0x8B19738 :: dw 0x000E9908 .org 0x8B1973C :: dw 0x000E990B .org 0x8B19740 :: dw 0x000E990E .org 0x8B19744 :: dw 0x000E9911 .org 0x8B19748 :: dw 0x000E991F .org 0x8B1974C :: dw 0x000E992D .org 0x8B19750 :: dw 0x000E9930 .org 0x8B19754 :: dw 0x000E9933 .org 0x8B19758 :: dw 0x000E9936 .org 0x8B1975C :: dw 0x000E9942 .org 0x8B19760 :: dw 0x000E994E .org 0x8B19764 :: dw 0x000E9951 .org 0x8B19768 :: dw 0x000E9954 .org 0x8B1976C :: dw 0x000E9957 .org 0x8B19770 :: dw 0x000E99F2 .org 0x8B19774 :: dw 0x000E9A8E .org 0x8B19778 :: dw 0x000E9B2A .org 0x8B1977C :: dw 0x000E9BC6 .org 0x8B19780 :: dw 0x000E9BC9 .org 0x8B19784 :: dw 0x000E9C25 .org 0x8B19788 :: dw 0x000E9C82 .org 0x8B1978C :: dw 0x000E9CDF .org 0x8B19790 :: dw 0x000E9D3C .org 0x8B19794 :: dw 0x000E9D3F .org 0x8B19798 :: dw 0x000E9DF4 .org 0x8B1979C :: dw 0x000E9EA9 .org 0x8B197A0 :: dw 0x000E9F5E .org 0x8B197A4 :: dw 0x000EA013 .org 0x8B197A8 :: dw 0x000EA016 .org 0x8B197AC :: dw 0x000EA0B2 .org 0x8B197B0 :: dw 0x000EA161 .org 0x8B197B4 :: dw 0x000EA212 .org 0x8B197B8 :: dw 0x000EA2C2 .org 0x8B197BC :: dw 0x000EA2C5 .org 0x8B197C0 :: dw 0x000EA346 .org 0x8B197C4 :: dw 0x000EA400 .org 0x8B197C8 :: dw 0x000EA48B .org 0x8B197CC :: dw 0x000EA50A .org 0x8B197D0 :: dw 0x000EA50D .org 0x8B197D4 :: dw 0x000EA592 .org 0x8B197D8 :: dw 0x000EA617 .org 0x8B197DC :: dw 0x000EA61A .org 0x8B197E0 :: dw 0x000EA61D .org 0x8B197E4 :: dw 0x000EA620 .org 0x8B197E8 :: dw 0x000EA641 .org 0x8B197EC :: dw 0x000EA662 .org 0x8B197F0 :: dw 0x000EA68E .org 0x8B197F4 :: dw 0x000EA6AD .org 0x8B197F8 :: dw 0x000EA6B0 .org 0x8B197FC :: dw 0x000EA6DF .org 0x8B19800 :: dw 0x000EA75A .org 0x8B19804 :: dw 0x000EA80A .org 0x8B19808 :: dw 0x000EA8AB .org 0x8B1980C :: dw 0x000EA8AE .org 0x8B19810 :: dw 0x000EA952 .org 0x8B19814 :: dw 0x000EA9F4 .org 0x8B19818 :: dw 0x000EA9F7 .org 0x8B1981C :: dw 0x000EA9FA .org 0x8B19820 :: dw 0x000EA9FD .org 0x8B19824 :: dw 0x000EAA83 .org 0x8B19828 :: dw 0x000EAB07 .org 0x8B1982C :: dw 0x000EABAD .org 0x8B19830 :: dw 0x000EABB0 .org 0x8B19834 :: dw 0x000EABB3 .org 0x8B19838 :: dw 0x000EAC54 .org 0x8B1983C :: dw 0x000EACF3 .org 0x8B19840 :: dw 0x000EACF6 .org 0x8B19844 :: dw 0x000EACF9 .org 0x8B19848 :: dw 0x000EACFC .org 0x8B1984C :: dw 0x000EADA2 .org 0x8B19850 :: dw 0x000EADA5 .org 0x8B19854 :: dw 0x000EADA8 .org 0x8B19858 :: dw 0x000EADAB .org 0x8B1985C :: dw 0x000EADAE .org 0x8B19860 :: dw 0x000EADC9 .org 0x8B19864 :: dw 0x000EADED .org 0x8B19868 :: dw 0x000EADF0 .org 0x8B1986C :: dw 0x000EADF3 .org 0x8B19870 :: dw 0x000EADF6 .org 0x8B19874 :: dw 0x000EAE3A .org 0x8B19878 :: dw 0x000EAE7F .org 0x8B1987C :: dw 0x000EAE82 .org 0x8B19880 :: dw 0x000EAE85 .org 0x8B19884 :: dw 0x000EAE88 .org 0x8B19888 :: dw 0x000EAEB8 .org 0x8B1988C :: dw 0x000EAEEA .org 0x8B19890 :: dw 0x000EAEED .org 0x8B19894 :: dw 0x000EAEF0 .org 0x8B19898 :: dw 0x000EAEF3 .org 0x8B1989C :: dw 0x000EAEF6 .org 0x8B198A0 :: dw 0x000EAEF9 .org 0x8B198A4 :: dw 0x000EAEFC .org 0x8B198A8 :: dw 0x000EAEFF .org 0x8B198AC :: dw 0x000EAF02
31.8
43
0.749661
[ "MIT" ]
Imavoyc/Mother2Gba-chs
working/m12-psitext.asm
8,109
Assembly
.global s_prepare_buffers s_prepare_buffers: push %r11 push %r13 push %r8 push %rax push %rbx push %rcx push %rdi push %rdx push %rsi lea addresses_A_ht+0xd67b, %rax nop nop nop xor %r13, %r13 mov $0x6162636465666768, %rbx movq %rbx, (%rax) nop nop nop nop cmp $49270, %r13 lea addresses_D_ht+0x2cdb, %rax nop nop nop nop nop xor $28599, %rdx mov $0x6162636465666768, %r13 movq %r13, %xmm6 movups %xmm6, (%rax) nop nop dec %r11 lea addresses_UC_ht+0x79e0, %r11 nop add %r8, %r8 and $0xffffffffffffffc0, %r11 vmovntdqa (%r11), %ymm7 vextracti128 $1, %ymm7, %xmm7 vpextrq $1, %xmm7, %rdx nop nop sub %r11, %r11 lea addresses_D_ht+0x3289, %rsi lea addresses_UC_ht+0x72db, %rdi nop nop nop cmp $38679, %rax mov $53, %rcx rep movsw nop dec %r8 lea addresses_D_ht+0x119fb, %rsi cmp %rcx, %rcx and $0xffffffffffffffc0, %rsi vmovaps (%rsi), %ymm2 vextracti128 $0, %ymm2, %xmm2 vpextrq $0, %xmm2, %rdx nop nop dec %rdi lea addresses_A_ht+0x1ef9b, %r8 nop nop sub %r11, %r11 mov (%r8), %rax nop nop nop nop and $47184, %r11 lea addresses_A_ht+0x62db, %rdx nop sub $61502, %rcx mov $0x6162636465666768, %rax movq %rax, (%rdx) nop nop nop nop sub %rbx, %rbx lea addresses_WC_ht+0x1a3e4, %rcx nop nop nop nop add $58868, %r13 movw $0x6162, (%rcx) inc %rax lea addresses_UC_ht+0x6b5b, %rdx nop nop nop nop add %r11, %r11 movb (%rdx), %al nop nop and %rdx, %rdx lea addresses_D_ht+0x1e8db, %rax nop nop nop nop and %rsi, %rsi and $0xffffffffffffffc0, %rax vmovntdqa (%rax), %ymm2 vextracti128 $1, %ymm2, %xmm2 vpextrq $1, %xmm2, %rbx cmp $49105, %rbx lea addresses_WC_ht+0x4d29, %rsi lea addresses_normal_ht+0x1807b, %rdi nop nop nop inc %rbx mov $123, %rcx rep movsb nop nop nop nop nop xor %rdi, %rdi lea addresses_A_ht+0x3db, %r11 nop and $30219, %rdi vmovups (%r11), %ymm6 vextracti128 $1, %ymm6, %xmm6 vpextrq $1, %xmm6, %rsi nop nop nop nop sub $40559, %rcx lea addresses_A_ht+0x175d3, %rdx nop nop nop nop nop add %r8, %r8 mov (%rdx), %r13w nop nop sub %r13, %r13 pop %rsi pop %rdx pop %rdi pop %rcx pop %rbx pop %rax pop %r8 pop %r13 pop %r11 ret .global s_faulty_load s_faulty_load: push %r11 push %r12 push %r15 push %r8 push %rax push %rbx push %rcx // Store lea addresses_D+0x119db, %r15 nop and %r11, %r11 mov $0x5152535455565758, %rcx movq %rcx, %xmm3 vmovups %ymm3, (%r15) nop nop nop nop nop and %r11, %r11 // Store lea addresses_D+0x34f, %rax nop nop nop cmp %r12, %r12 movw $0x5152, (%rax) nop nop nop nop nop sub $62328, %r15 // Store lea addresses_WC+0x156db, %r12 add %rax, %rax mov $0x5152535455565758, %r11 movq %r11, %xmm1 movups %xmm1, (%r12) add %r8, %r8 // Store lea addresses_normal+0x1edc3, %r12 nop nop nop inc %r11 mov $0x5152535455565758, %r8 movq %r8, (%r12) nop nop nop nop nop sub $15890, %rcx // Load mov $0x19f, %rax mfence mov (%rax), %ebx nop inc %r15 // Load lea addresses_WT+0xadb, %rcx nop nop sub $49424, %r11 mov (%rcx), %r15d nop nop nop nop add %r15, %r15 // Faulty Load lea addresses_RW+0xa6db, %rbx nop nop sub %rcx, %rcx mov (%rbx), %r11d lea oracles, %r15 and $0xff, %r11 shlq $12, %r11 mov (%r15,%r11,1), %r11 pop %rcx pop %rbx pop %rax pop %r8 pop %r15 pop %r12 pop %r11 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_RW', 'congruent': 0}} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_D', 'congruent': 7}, 'OP': 'STOR'} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_D', 'congruent': 2}, 'OP': 'STOR'} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_WC', 'congruent': 11}, 'OP': 'STOR'} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_normal', 'congruent': 1}, 'OP': 'STOR'} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_P', 'congruent': 2}} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_WT', 'congruent': 10}} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'NT': True, 'AVXalign': False, 'size': 4, 'type': 'addresses_RW', 'congruent': 0}} <gen_prepare_buffer> {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_A_ht', 'congruent': 5}, 'OP': 'STOR'} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_D_ht', 'congruent': 7}, 'OP': 'STOR'} {'OP': 'LOAD', 'src': {'same': False, 'NT': True, 'AVXalign': False, 'size': 32, 'type': 'addresses_UC_ht', 'congruent': 0}} {'dst': {'same': False, 'congruent': 5, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'src': {'same': True, 'congruent': 1, 'type': 'addresses_D_ht'}} {'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': True, 'size': 32, 'type': 'addresses_D_ht', 'congruent': 3}} {'OP': 'LOAD', 'src': {'same': False, 'NT': True, 'AVXalign': False, 'size': 8, 'type': 'addresses_A_ht', 'congruent': 6}} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_A_ht', 'congruent': 9}, 'OP': 'STOR'} {'dst': {'same': False, 'NT': False, 'AVXalign': True, 'size': 2, 'type': 'addresses_WC_ht', 'congruent': 0}, 'OP': 'STOR'} {'OP': 'LOAD', 'src': {'same': False, 'NT': True, 'AVXalign': False, 'size': 1, 'type': 'addresses_UC_ht', 'congruent': 7}} {'OP': 'LOAD', 'src': {'same': False, 'NT': True, 'AVXalign': False, 'size': 32, 'type': 'addresses_D_ht', 'congruent': 9}} {'dst': {'same': True, 'congruent': 3, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'src': {'same': True, 'congruent': 0, 'type': 'addresses_WC_ht'}} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_A_ht', 'congruent': 6}} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_A_ht', 'congruent': 3}} {'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 */
30.5
2,999
0.652233
[ "MIT" ]
danielmgmi/medusa
Transynther/_processed/AVXALIGN/_st_/i7-7700_9_0x48_notsx.log_21829_749.asm
8,845
Assembly
; A116722: Number of permutations of length n which avoid the patterns 312, 1324, 3421; or avoid the patterns 312, 1324, 2341, etc. ; 1,2,5,12,25,47,82,135,212,320,467,662,915,1237,1640,2137,2742,3470,4337,5360,6557,7947,9550,11387,13480,15852,18527,21530,24887,28625,32772,37357,42410,47962,54045,60692,67937,75815,84362,93615,103612,114392,125995,138462,151835,166157,181472,197825,215262,233830,253577,274552,296805,320387,345350,371747,399632,429060,460087,492770,527167,563337,601340,641237,683090,726962,772917,821020,871337,923935,978882,1036247,1096100,1158512,1223555,1291302,1361827,1435205,1511512,1590825,1673222,1758782,1847585,1939712,2035245,2134267,2236862,2343115,2453112,2566940,2684687,2806442,2932295,3062337,3196660,3335357,3478522,3626250,3778637,3935780,4097777,4264727,4436730,4613887,4796300,4984072,5177307,5376110,5580587,5790845,6006992,6229137,6457390,6691862,6932665,7179912,7433717,7694195,7961462,8235635,8516832,8805172,9100775,9403762,9714255,10032377,10358252,10692005,11033762,11383650,11741797,12108332,12483385,12867087,13259570,13660967,14071412,14491040,14919987,15358390,15806387,16264117,16731720,17209337,17697110,18195182,18703697,19222800,19752637,20293355,20845102,21408027,21982280,22568012,23165375,23774522,24395607,25028785,25674212,26332045,27002442,27685562,28381565,29090612,29812865,30548487,31297642,32060495,32837212,33627960,34432907,35252222,36086075,36934637,37798080,38676577,39570302,40479430,41404137,42344600,43300997,44273507,45262310,46267587,47289520,48328292,49384087,50457090,51547487,52655465,53781212,54924917,56086770,57266962,58465685,59683132,60919497,62174975,63449762,64744055,66058052,67391952,68745955,70120262,71515075,72930597,74367032,75824585,77303462,78803870,80326017,81870112,83436365,85024987,86636190,88270187,89927192,91607420,93311087,95038410,96789607,98564897,100364500,102188637,104037530,105911402,107810477,109734980,111685137,113661175,115663322,117691807,119746860,121828712,123937595,126073742,128237387,130428765,132648112,134895665,137171662,139476342,141809945,144172712,146564885,148986707,151438422,153920275,156432512,158975380 mov $6,$0 lpb $0 sub $0,1 trn $3,1 add $2,$3 add $3,2 add $5,$6 add $4,$5 add $4,$2 mov $6,$2 lpe mov $1,2 trn $5,1 sub $4,$5 add $4,2 add $1,$4 sub $1,3
109.571429
1,997
0.837897
[ "Apache-2.0" ]
jmorken/loda
programs/oeis/116/A116722.asm
2,301
Assembly
; ***************************************************************************** ; ***************************************************************************** ; ; Name: run.asm ; Purpose: Run program ; Created: 3rd March 2020 ; Reviewed: 17th March 2020 ; Author: Paul Robson (paul@robsons.org.uk) ; ; ***************************************************************************** ; ***************************************************************************** ; ***************************************************************************** ; ; Run program / Run "Filename" ; ; ***************************************************************************** .RunProgram ;; [run] ldm r0,r11,#0 ; what follows ? sknz r0 jmp #RunProgramNoLoad xor r0,#TOK_COLON skz r0 jsr #FileLoader ; if not EOL or colon try loading. .RunProgramNoLoad jsr #Command_Clear ; clear command, erase variables etc. ldm r11,#programCode ; address of first line. ldm r0,r11,#0 ; get offset to next line. sknz r0 ; if zero, then no program fo exit. jmp #WarmStart ; ; Come here to run program from R11. ; .RunProgramR11 ldm sp,#initialSP ; reset the stack mov r10,#evalStack ; reset the evaluation stack. mov r0,#$17 ; switch colour to white jsr #OSPrintCharacter ; ; New line. On entry R11 points to offset word ; ._RPNewLine stm r11,#currentLine ; save current line number. add r11,#2 ; point to first token. ; ; Next command. ; ._RPNewCommand jsr #OSSystemManager ; call system manager routine no break skz r0 ; exit on break jmp #BreakError ; error if broken. ldm r0,#hwTimer ; check timer event due ? ldm r1,#eventCheckTime sub r0,r1,#0 skm r0 jsr #EventCheck ; go actually check. ; ; New instruction at R11 ; ._RPNoCheck stm r14,#tempStringAlloc ; clear the temp string reference. ldm r0,r11,#0 ; get next token. mov r1,r0,#0 ; save in R1 inc r11 ; skip over token. and r0,#$F800 ; check it is 0011 1xx e.g. token with type 11xx xor r0,#$3800 ; which is a command token of some sort skz r0 jmp #_RPNotCommandToken ; and r1,#$01FF ; get token ID lower 9 bits add r1,#TokenVectors ; R1 now points to the token code address ldm r0,r1,#0 ; get the call address into R0 brl link,r0,#0 ; call that routine jmp #_RPNewCommand ; go round again ; ; Not a command token. Could be an identifier, !, or possibly EOL. R11 points ; to word following command token. ; ._RPNotCommandToken sknz r1 ; if R1 is zero, end of line, go to new line jmp #_RPNextLine dec r11 ; unpick the token get ; ldm r0,r11,#0 ; get token back xor r0,#TOK_PLING ; ! is a special case, we can do !x = 42 sknz r0 jmp #_RPDoLet ; ldm r0,r11,#0 ; get token back and r0,#$C000 ; is it an identifier e.g. 4000-7FFF xor r0,#$4000 ; then if so this may be a default LET skz r0 jmp #_RPCheckAsm ; if not, check for assembler ._RPDoLet jsr #Command_Let ; try it as a 'let' jmp #_RPNewCommand ; and go round again. ; ; Check for assembler token, which is one of the first 16 ; ._RPCheckAsm ldm r0,r11,#0 ; get token back and r0,#$21F0 ; this checks for tokens from 0-15 xor r0,#$2000 skz r0 jmp #SyntaxError jsr #AssembleInstruction ; assemble it jmp #_RPNewCommand ; go round again. ; ; Advance to next line. If running from CLI offset will be zero so will not ; change lines with the 'add' ; ._RPNextLine ldm r11,#currentLine ; get current line ldm r0,r11,#0 ; get offset this line add r11,r0,#0 ; advance pointer ldm r0,r11,#0 ; get offset next line sknz r0 ; if zero warm start jmp #WarmStart jmp #_RPNewLine
32.768595
80
0.544262
[ "MIT" ]
paulscottrobson/eris
basic/src/commands/run.asm
3,965
Assembly
; void *zx_py2saddr(uchar y) SECTION code_clib SECTION code_arch PUBLIC zx_py2saddr EXTERN asm_zx_py2saddr defc zx_py2saddr = asm_zx_py2saddr ; SDCC bridge for Classic IF __CLASSIC PUBLIC _zx_py2saddr defc _zx_py2saddr = zx_py2saddr ENDIF
12.947368
34
0.821138
[ "Unlicense" ]
drunkfly/gamemyx
Tools/z88dk/libsrc/_DEVELOPMENT/arch/zx/display/c/sccz80/zx_py2saddr.asm
246
Assembly
; A081688: 0 followed by A030124 - 1. ; 0,1,3,4,5,7,8,9,10,12,13,14,15,16,18,19,20,21,22,23,24,26,27,28,29,30,31,32,33,35,36,37,38,39,40,41,42,43,45,46,47,48,49,50,51,52,53,54,56,57,58,59,60,61,62,63,64,65,66,67,69,70,71,72,73,74,75,76,77 mov $2,1 mov $3,$0 mul $3,5 lpb $3 mul $1,$0 mul $2,$3 add $1,$2 mov $4,$5 cmp $4,0 add $5,$4 div $1,$5 div $2,$5 sub $3,1 min $0,$3 mov $5,$3 max $3,1 lpe div $1,$2 mov $0,$1
19.130435
200
0.563636
[ "Apache-2.0" ]
ckrause/cm
programs/oeis/081/A081688.asm
440
Assembly
; A075362: Triangle read by rows with the n-th row containing the first n multiples of n. ; 1,2,4,3,6,9,4,8,12,16,5,10,15,20,25,6,12,18,24,30,36,7,14,21,28,35,42,49,8,16,24,32,40,48,56,64,9,18,27,36,45,54,63,72,81,10,20,30,40,50,60,70,80,90,100,11,22,33,44,55,66,77,88,99,110,121,12,24,36,48,60,72,84,96,108,120,132,144,13,26,39,52,65,78,91,104,117,130,143,156,169,14,28,42,56,70,84,98,112,126,140,154,168,182,196,15,30,45,60,75,90,105,120,135,150,165,180,195,210,225,16,32,48,64,80,96,112,128,144,160,176,192,208,224,240,256,17,34,51,68,85,102,119,136,153,170,187,204,221,238,255,272,289,18,36,54,72,90,108,126,144,162,180,198,216,234,252,270,288,306,324,19,38,57,76,95,114,133,152,171,190,209,228,247,266,285,304,323,342,361,20,40,60,80,100,120,140,160,180,200,220,240,260,280,300,320,340,360,380,400,21,42,63,84,105,126,147,168,189,210,231,252,273,294,315,336,357,378,399,420,441,22,44,66,88,110,132,154,176,198,220,242,264,286,308,330,352,374,396,418 mov $1,1 mov $2,$0 add $0,1 lpb $2,1 mov $0,$2 sub $2,$1 add $3,1 add $1,$3 trn $2,1 sub $3,1 lpe mul $0,$1 mov $1,$0
63.882353
864
0.686004
[ "Apache-2.0" ]
karttu/loda
programs/oeis/075/A075362.asm
1,086
Assembly
; A343492: a(n) = Sum_{k=1..n} 5^(gcd(k, n) - 1). ; Submitted by Christian Krause ; 1,6,27,132,629,3162,15631,78264,390681,1953774,9765635,48831564,244140637,1220718786,6103516983,30517656528,152587890641,762939850086,3814697265643,19073488283028,95367431672037,476837167968810,2384185791015647,11920929004069128 mov $2,$0 add $2,1 lpb $0 sub $0,1 mov $3,5 mov $4,$2 gcd $4,$0 pow $3,$4 add $1,$3 lpe mov $0,$1 div $0,5 add $0,1
24.555556
230
0.714932
[ "Apache-2.0" ]
ckrause/loda-programs
oeis/343/A343492.asm
442
Assembly
clc lda {m1} adc #1 sta {m1} bcc !+ inc {m1}+1 !:
6.25
10
0.52
[ "MIT" ]
jbrandwood/kickc
src/main/fragment/mos6502-common/vwsm1=vwsm1_plus_1.asm
50
Assembly
; d) Ídem al (a) pero imprimir el texto "El arreglo contiene X numeros positivos" si la cantidad números positivos es mayor o igual a la de negativos. En caso contrario, imprimir el texto "El arreglo contiene X numeros negativos". section .data arreglo: dd 52, 23, -5, 0, -65, 12, -1, 1 longitud EQU $ - arreglo mensajePos: DB 'El arreglo contiene 0 numeros positivos', 10 longMjePos: EQU $ - mensajePos mensajeNeg: DB 'El arreglo contiene 0 numeros negativos', 10 longMjeNeg: EQU $ - mensajeNeg global _start section .text _start: ; En la etiqueta arreglo se encuentran los 8 numeros. imprimir el texto "El arreglo contiene X numeros positivos" mov eax, 0 ; en eax guardo la cantidad de numeros mayores o iguales a 0. mov ebx, longitud sar ebx, 2 ; en ebx guardo la longitud del arreglo: longitud / 4 (ya que cada elemento ocupa 4 bytes), ; que es equivalente a hacer un shift a derecha de 2 posiciones. mov ecx, 0 ; ecx lo uso para el indice del arreglo. loop: cmp ecx, ebx jz determinarTexto mov edx, [arreglo + ecx*4] ; en edx guardo el valor de la i-esima posicion del arreglo. inc ecx cmp edx, 0 ; si el valor de la i-esima posicion es mayor igual a cero incremento eax y ciclo. Si no, solo ciclo. jl loop inc eax jmp loop determinarTexto: sub ebx, eax ; en ebx guardo cuantos numeros negativos hay en el arreglo. cmp ebx, eax ; si hay mas negativos que positivos, salto a modificarTextoNeg. Si no, salto a modificarTextoPos. jg modificarTextoNeg jmp modificarTextoPos modificarTextoNeg: cmp ebx, 0 jz imprimirTextoNeg inc byte [mensajeNeg+longMjeNeg-20] dec ebx jmp modificarTextoNeg modificarTextoPos: cmp eax, 0 jz imprimirTextoPos inc byte [mensajePos+longMjePos-20] dec eax jmp modificarTextoPos imprimirTextoNeg: mov rax, 4 ; funcion 4: write mov rbx, 1 ; stdout mov rcx, mensajeNeg ; mensaje mov rdx, longMjeNeg ; longitud int 0x80 jmp exit imprimirTextoPos: mov rax, 4 ; funcion 4: write mov rbx, 1 ; stdout mov rcx, mensajePos ; mensaje mov rdx, longMjePos ; longitud int 0x80 exit: ; Exit mov rax, 1 ; funcion 1 mov rbx, 0 ; codigo int 0x80
32.540541
230
0.652824
[ "MPL-2.0", "MPL-2.0-no-copyleft-exception" ]
fokerman/computingSystemsCourse
T08_Lenguaje_Ensamblador/ejs/ej1_cantidad_positivos_sol_d.asm
2,410
Assembly
.global s_prepare_buffers s_prepare_buffers: push %r11 push %r13 push %r15 push %r8 push %rbp push %rcx push %rdi push %rsi lea addresses_WC_ht+0x14610, %rsi lea addresses_WT_ht+0x18a7e, %rdi nop add %rbp, %rbp mov $103, %rcx rep movsq nop nop nop nop nop dec %r11 lea addresses_D_ht+0x3bce, %rbp cmp %r13, %r13 mov (%rbp), %si nop nop nop nop nop sub %rsi, %rsi lea addresses_WC_ht+0x37ee, %rsi lea addresses_WC_ht+0x25ce, %rdi clflush (%rdi) nop nop nop add $60295, %r13 mov $106, %rcx rep movsw nop nop sub %rcx, %rcx lea addresses_normal_ht+0xbd63, %rdi clflush (%rdi) nop nop nop sub %r8, %r8 mov $0x6162636465666768, %r11 movq %r11, (%rdi) nop nop inc %r11 lea addresses_A_ht+0x9ce, %r8 nop nop nop nop cmp %r11, %r11 mov $0x6162636465666768, %rbp movq %rbp, (%r8) inc %rsi lea addresses_WT_ht+0x4ae7, %r13 add $13575, %rsi movups (%r13), %xmm7 vpextrq $1, %xmm7, %r8 nop and %rdi, %rdi lea addresses_A_ht+0x3346, %rsi lea addresses_D_ht+0x1e5ce, %rdi nop nop nop nop nop add %r15, %r15 mov $97, %rcx rep movsl nop nop nop sub %r15, %r15 lea addresses_D_ht+0x12a90, %rcx add %r8, %r8 mov $0x6162636465666768, %r11 movq %r11, (%rcx) nop nop and $52839, %r8 lea addresses_normal_ht+0x21bf, %r8 nop nop nop nop and $501, %r11 movups (%r8), %xmm4 vpextrq $0, %xmm4, %rsi nop and %rdi, %rdi lea addresses_WC_ht+0x9ce, %r15 nop nop nop nop mfence and $0xffffffffffffffc0, %r15 movntdqa (%r15), %xmm1 vpextrq $1, %xmm1, %rbp nop inc %rsi lea addresses_D_ht+0xe2ce, %r11 nop nop nop cmp %r8, %r8 mov $0x6162636465666768, %r15 movq %r15, (%r11) nop nop nop and %r15, %r15 lea addresses_D_ht+0x1b36e, %r11 nop nop nop xor $37008, %r8 mov $0x6162636465666768, %rbp movq %rbp, (%r11) nop nop nop nop dec %rbp lea addresses_D_ht+0x97ce, %rsi lea addresses_UC_ht+0x10646, %rdi clflush (%rdi) nop nop nop xor %rbp, %rbp mov $122, %rcx rep movsl nop nop nop nop nop sub $5182, %rcx pop %rsi pop %rdi pop %rcx pop %rbp pop %r8 pop %r15 pop %r13 pop %r11 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r13 push %rbp push %rcx push %rdi push %rsi // REPMOV mov $0xfe6, %rsi lea addresses_A+0x42ce, %rdi clflush (%rdi) nop add $51185, %r11 mov $63, %rcx rep movsb nop nop nop and $11912, %r13 // Faulty Load lea addresses_PSE+0x25ce, %rcx nop nop nop nop and $27250, %rdi movb (%rcx), %r11b lea oracles, %rcx and $0xff, %r11 shlq $12, %r11 mov (%rcx,%r11,1), %r11 pop %rsi pop %rdi pop %rcx pop %rbp pop %r13 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_PSE', 'size': 32, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_P', 'congruent': 3, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_A', 'congruent': 8, 'same': False}} [Faulty Load] {'src': {'same': True, 'congruent': 0, 'NT': False, 'type': 'addresses_PSE', 'size': 1, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'type': 'addresses_WC_ht', 'congruent': 0, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WT_ht', 'congruent': 4, 'same': False}} {'src': {'same': False, 'congruent': 9, 'NT': False, 'type': 'addresses_D_ht', 'size': 2, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_WC_ht', 'congruent': 4, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WC_ht', 'congruent': 10, 'same': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_normal_ht', 'size': 8, 'AVXalign': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 10, 'NT': True, 'type': 'addresses_A_ht', 'size': 8, 'AVXalign': True}} {'src': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_WT_ht', 'size': 16, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_A_ht', 'congruent': 0, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_D_ht', 'congruent': 9, 'same': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_D_ht', 'size': 8, 'AVXalign': False}} {'src': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_normal_ht', 'size': 16, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'same': False, 'congruent': 9, 'NT': True, 'type': 'addresses_WC_ht', 'size': 16, 'AVXalign': False}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 7, 'NT': True, 'type': 'addresses_D_ht', 'size': 8, 'AVXalign': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 5, 'NT': False, 'type': 'addresses_D_ht', 'size': 8, 'AVXalign': False}} {'src': {'type': 'addresses_D_ht', 'congruent': 8, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_UC_ht', 'congruent': 3, 'same': False}} {'33': 21829} 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 */
33.47807
2,999
0.657671
[ "MIT" ]
danielmgmi/medusa
Transynther/_processed/NONE/_xt_/i3-7100_9_0xca_notsx.log_21829_1555.asm
7,633
Assembly
; A088879: Numbers n such that 3n + 5 is a prime. ; -1,0,2,4,6,8,12,14,16,18,22,26,28,32,34,36,42,44,48,54,56,58,62,64,74,76,78,82,84,86,88,92,96,102,104,114,116,118,126,128,132,138,142,146,148,152,154,158,162,166,168,172,184,186,188,194,196,198,204,212,214,216,218,224,226,232,238,246,252,256,264,268,272,274,278,284,286,292,294,302,308,312,314,316,322,324,326,336,338,342,348,352,362,364,366,368,382,386,392,394 mov $1,1 mov $2,$0 pow $2,2 add $2,1 lpb $2 sub $2,1 mov $3,$1 seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0. sub $0,$3 add $1,3 mov $4,$0 max $4,0 cmp $4,$0 mul $2,$4 lpe div $1,3 sub $1,4 mul $1,2 add $1,2 div $1,2 add $1,1 mov $0,$1
26.807692
363
0.648494
[ "Apache-2.0" ]
ckrause/cm
programs/oeis/088/A088879.asm
697
Assembly
; ; jidctflt.asm - floating-point IDCT (SSE & MMX) ; ; Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB ; Copyright (C) 2016, D. R. Commander. ; ; Based on the x86 SIMD extension for IJG JPEG library ; Copyright (C) 1999-2006, MIYASAKA Masaru. ; For conditions of distribution and use, see copyright notice in jsimdext.inc ; ; This file should be assembled with NASM (Netwide Assembler), ; can *not* be assembled with Microsoft's MASM or any compatible ; assembler (including Borland's Turbo Assembler). ; NASM is available from http://nasm.sourceforge.net/ or ; http://sourceforge.net/project/showfiles.php?group_id=6208 ; ; This file contains a floating-point implementation of the inverse DCT ; (Discrete Cosine Transform). The following code is based directly on ; the IJG's original jidctflt.c; see the jidctflt.c for more details. ; ; [TAB8] %include "jsimdext.inc" %include "jdct.inc" ; -------------------------------------------------------------------------- %macro unpcklps2 2 ; %1=(0 1 2 3) / %2=(4 5 6 7) => %1=(0 1 4 5) shufps %1, %2, 0x44 %endmacro %macro unpckhps2 2 ; %1=(0 1 2 3) / %2=(4 5 6 7) => %1=(2 3 6 7) shufps %1, %2, 0xEE %endmacro ; -------------------------------------------------------------------------- SECTION SEG_CONST alignz 32 GLOBAL_DATA(jconst_idct_float_sse) EXTN(jconst_idct_float_sse): PD_1_414 times 4 dd 1.414213562373095048801689 PD_1_847 times 4 dd 1.847759065022573512256366 PD_1_082 times 4 dd 1.082392200292393968799446 PD_M2_613 times 4 dd -2.613125929752753055713286 PD_0_125 times 4 dd 0.125 ; 1/8 PB_CENTERJSAMP times 8 db CENTERJSAMPLE alignz 32 ; -------------------------------------------------------------------------- SECTION SEG_TEXT BITS 32 ; ; Perform dequantization and inverse DCT on one block of coefficients. ; ; GLOBAL(void) ; jsimd_idct_float_sse(void *dct_table, JCOEFPTR coef_block, ; JSAMPARRAY output_buf, JDIMENSION output_col) ; %define dct_table(b) (b) + 8 ; void *dct_table %define coef_block(b) (b) + 12 ; JCOEFPTR coef_block %define output_buf(b) (b) + 16 ; JSAMPARRAY output_buf %define output_col(b) (b) + 20 ; JDIMENSION output_col %define original_ebp ebp + 0 %define wk(i) ebp - (WK_NUM - (i)) * SIZEOF_XMMWORD ; xmmword wk[WK_NUM] %define WK_NUM 2 %define workspace wk(0) - DCTSIZE2 * SIZEOF_FAST_FLOAT ; FAST_FLOAT workspace[DCTSIZE2] align 32 GLOBAL_FUNCTION(jsimd_idct_float_sse) EXTN(jsimd_idct_float_sse): push ebp mov eax, esp ; eax = original ebp sub esp, byte 4 and esp, byte (-SIZEOF_XMMWORD) ; align to 128 bits mov [esp], eax mov ebp, esp ; ebp = aligned ebp lea esp, [workspace] push ebx ; push ecx ; need not be preserved ; push edx ; need not be preserved push esi push edi get_GOT ebx ; get GOT address ; ---- Pass 1: process columns from input, store into work array. ; mov eax, [original_ebp] mov edx, POINTER [dct_table(eax)] ; quantptr mov esi, JCOEFPTR [coef_block(eax)] ; inptr lea edi, [workspace] ; FAST_FLOAT *wsptr mov ecx, DCTSIZE/4 ; ctr alignx 16, 7 .columnloop: %ifndef NO_ZERO_COLUMN_TEST_FLOAT_SSE mov eax, DWORD [DWBLOCK(1,0,esi,SIZEOF_JCOEF)] or eax, DWORD [DWBLOCK(2,0,esi,SIZEOF_JCOEF)] jnz near .columnDCT movq mm0, MMWORD [MMBLOCK(1,0,esi,SIZEOF_JCOEF)] movq mm1, MMWORD [MMBLOCK(2,0,esi,SIZEOF_JCOEF)] por mm0, MMWORD [MMBLOCK(3,0,esi,SIZEOF_JCOEF)] por mm1, MMWORD [MMBLOCK(4,0,esi,SIZEOF_JCOEF)] por mm0, MMWORD [MMBLOCK(5,0,esi,SIZEOF_JCOEF)] por mm1, MMWORD [MMBLOCK(6,0,esi,SIZEOF_JCOEF)] por mm0, MMWORD [MMBLOCK(7,0,esi,SIZEOF_JCOEF)] por mm1, mm0 packsswb mm1, mm1 movd eax, mm1 test eax, eax jnz short .columnDCT ; -- AC terms all zero movq mm0, MMWORD [MMBLOCK(0,0,esi,SIZEOF_JCOEF)] punpckhwd mm1, mm0 ; mm1=(** 02 ** 03) punpcklwd mm0, mm0 ; mm0=(00 00 01 01) psrad mm1, (DWORD_BIT-WORD_BIT) ; mm1=in0H=(02 03) psrad mm0, (DWORD_BIT-WORD_BIT) ; mm0=in0L=(00 01) cvtpi2ps xmm3, mm1 ; xmm3=(02 03 ** **) cvtpi2ps xmm0, mm0 ; xmm0=(00 01 ** **) movlhps xmm0, xmm3 ; xmm0=in0=(00 01 02 03) mulps xmm0, XMMWORD [XMMBLOCK(0,0,edx,SIZEOF_FLOAT_MULT_TYPE)] movaps xmm1, xmm0 movaps xmm2, xmm0 movaps xmm3, xmm0 shufps xmm0, xmm0, 0x00 ; xmm0=(00 00 00 00) shufps xmm1, xmm1, 0x55 ; xmm1=(01 01 01 01) shufps xmm2, xmm2, 0xAA ; xmm2=(02 02 02 02) shufps xmm3, xmm3, 0xFF ; xmm3=(03 03 03 03) movaps XMMWORD [XMMBLOCK(0,0,edi,SIZEOF_FAST_FLOAT)], xmm0 movaps XMMWORD [XMMBLOCK(0,1,edi,SIZEOF_FAST_FLOAT)], xmm0 movaps XMMWORD [XMMBLOCK(1,0,edi,SIZEOF_FAST_FLOAT)], xmm1 movaps XMMWORD [XMMBLOCK(1,1,edi,SIZEOF_FAST_FLOAT)], xmm1 movaps XMMWORD [XMMBLOCK(2,0,edi,SIZEOF_FAST_FLOAT)], xmm2 movaps XMMWORD [XMMBLOCK(2,1,edi,SIZEOF_FAST_FLOAT)], xmm2 movaps XMMWORD [XMMBLOCK(3,0,edi,SIZEOF_FAST_FLOAT)], xmm3 movaps XMMWORD [XMMBLOCK(3,1,edi,SIZEOF_FAST_FLOAT)], xmm3 jmp near .nextcolumn alignx 16, 7 %endif .columnDCT: ; -- Even part movq mm0, MMWORD [MMBLOCK(0,0,esi,SIZEOF_JCOEF)] movq mm1, MMWORD [MMBLOCK(2,0,esi,SIZEOF_JCOEF)] movq mm2, MMWORD [MMBLOCK(4,0,esi,SIZEOF_JCOEF)] movq mm3, MMWORD [MMBLOCK(6,0,esi,SIZEOF_JCOEF)] punpckhwd mm4, mm0 ; mm4=(** 02 ** 03) punpcklwd mm0, mm0 ; mm0=(00 00 01 01) punpckhwd mm5, mm1 ; mm5=(** 22 ** 23) punpcklwd mm1, mm1 ; mm1=(20 20 21 21) psrad mm4, (DWORD_BIT-WORD_BIT) ; mm4=in0H=(02 03) psrad mm0, (DWORD_BIT-WORD_BIT) ; mm0=in0L=(00 01) cvtpi2ps xmm4, mm4 ; xmm4=(02 03 ** **) cvtpi2ps xmm0, mm0 ; xmm0=(00 01 ** **) psrad mm5, (DWORD_BIT-WORD_BIT) ; mm5=in2H=(22 23) psrad mm1, (DWORD_BIT-WORD_BIT) ; mm1=in2L=(20 21) cvtpi2ps xmm5, mm5 ; xmm5=(22 23 ** **) cvtpi2ps xmm1, mm1 ; xmm1=(20 21 ** **) punpckhwd mm6, mm2 ; mm6=(** 42 ** 43) punpcklwd mm2, mm2 ; mm2=(40 40 41 41) punpckhwd mm7, mm3 ; mm7=(** 62 ** 63) punpcklwd mm3, mm3 ; mm3=(60 60 61 61) psrad mm6, (DWORD_BIT-WORD_BIT) ; mm6=in4H=(42 43) psrad mm2, (DWORD_BIT-WORD_BIT) ; mm2=in4L=(40 41) cvtpi2ps xmm6, mm6 ; xmm6=(42 43 ** **) cvtpi2ps xmm2, mm2 ; xmm2=(40 41 ** **) psrad mm7, (DWORD_BIT-WORD_BIT) ; mm7=in6H=(62 63) psrad mm3, (DWORD_BIT-WORD_BIT) ; mm3=in6L=(60 61) cvtpi2ps xmm7, mm7 ; xmm7=(62 63 ** **) cvtpi2ps xmm3, mm3 ; xmm3=(60 61 ** **) movlhps xmm0, xmm4 ; xmm0=in0=(00 01 02 03) movlhps xmm1, xmm5 ; xmm1=in2=(20 21 22 23) mulps xmm0, XMMWORD [XMMBLOCK(0,0,edx,SIZEOF_FLOAT_MULT_TYPE)] mulps xmm1, XMMWORD [XMMBLOCK(2,0,edx,SIZEOF_FLOAT_MULT_TYPE)] movlhps xmm2, xmm6 ; xmm2=in4=(40 41 42 43) movlhps xmm3, xmm7 ; xmm3=in6=(60 61 62 63) mulps xmm2, XMMWORD [XMMBLOCK(4,0,edx,SIZEOF_FLOAT_MULT_TYPE)] mulps xmm3, XMMWORD [XMMBLOCK(6,0,edx,SIZEOF_FLOAT_MULT_TYPE)] movaps xmm4, xmm0 movaps xmm5, xmm1 subps xmm0, xmm2 ; xmm0=tmp11 subps xmm1, xmm3 addps xmm4, xmm2 ; xmm4=tmp10 addps xmm5, xmm3 ; xmm5=tmp13 mulps xmm1, [GOTOFF(ebx,PD_1_414)] subps xmm1, xmm5 ; xmm1=tmp12 movaps xmm6, xmm4 movaps xmm7, xmm0 subps xmm4, xmm5 ; xmm4=tmp3 subps xmm0, xmm1 ; xmm0=tmp2 addps xmm6, xmm5 ; xmm6=tmp0 addps xmm7, xmm1 ; xmm7=tmp1 movaps XMMWORD [wk(1)], xmm4 ; tmp3 movaps XMMWORD [wk(0)], xmm0 ; tmp2 ; -- Odd part movq mm4, MMWORD [MMBLOCK(1,0,esi,SIZEOF_JCOEF)] movq mm0, MMWORD [MMBLOCK(3,0,esi,SIZEOF_JCOEF)] movq mm5, MMWORD [MMBLOCK(5,0,esi,SIZEOF_JCOEF)] movq mm1, MMWORD [MMBLOCK(7,0,esi,SIZEOF_JCOEF)] punpckhwd mm6, mm4 ; mm6=(** 12 ** 13) punpcklwd mm4, mm4 ; mm4=(10 10 11 11) punpckhwd mm2, mm0 ; mm2=(** 32 ** 33) punpcklwd mm0, mm0 ; mm0=(30 30 31 31) psrad mm6, (DWORD_BIT-WORD_BIT) ; mm6=in1H=(12 13) psrad mm4, (DWORD_BIT-WORD_BIT) ; mm4=in1L=(10 11) cvtpi2ps xmm4, mm6 ; xmm4=(12 13 ** **) cvtpi2ps xmm2, mm4 ; xmm2=(10 11 ** **) psrad mm2, (DWORD_BIT-WORD_BIT) ; mm2=in3H=(32 33) psrad mm0, (DWORD_BIT-WORD_BIT) ; mm0=in3L=(30 31) cvtpi2ps xmm0, mm2 ; xmm0=(32 33 ** **) cvtpi2ps xmm3, mm0 ; xmm3=(30 31 ** **) punpckhwd mm7, mm5 ; mm7=(** 52 ** 53) punpcklwd mm5, mm5 ; mm5=(50 50 51 51) punpckhwd mm3, mm1 ; mm3=(** 72 ** 73) punpcklwd mm1, mm1 ; mm1=(70 70 71 71) movlhps xmm2, xmm4 ; xmm2=in1=(10 11 12 13) movlhps xmm3, xmm0 ; xmm3=in3=(30 31 32 33) psrad mm7, (DWORD_BIT-WORD_BIT) ; mm7=in5H=(52 53) psrad mm5, (DWORD_BIT-WORD_BIT) ; mm5=in5L=(50 51) cvtpi2ps xmm4, mm7 ; xmm4=(52 53 ** **) cvtpi2ps xmm5, mm5 ; xmm5=(50 51 ** **) psrad mm3, (DWORD_BIT-WORD_BIT) ; mm3=in7H=(72 73) psrad mm1, (DWORD_BIT-WORD_BIT) ; mm1=in7L=(70 71) cvtpi2ps xmm0, mm3 ; xmm0=(72 73 ** **) cvtpi2ps xmm1, mm1 ; xmm1=(70 71 ** **) mulps xmm2, XMMWORD [XMMBLOCK(1,0,edx,SIZEOF_FLOAT_MULT_TYPE)] mulps xmm3, XMMWORD [XMMBLOCK(3,0,edx,SIZEOF_FLOAT_MULT_TYPE)] movlhps xmm5, xmm4 ; xmm5=in5=(50 51 52 53) movlhps xmm1, xmm0 ; xmm1=in7=(70 71 72 73) mulps xmm5, XMMWORD [XMMBLOCK(5,0,edx,SIZEOF_FLOAT_MULT_TYPE)] mulps xmm1, XMMWORD [XMMBLOCK(7,0,edx,SIZEOF_FLOAT_MULT_TYPE)] movaps xmm4, xmm2 movaps xmm0, xmm5 addps xmm2, xmm1 ; xmm2=z11 addps xmm5, xmm3 ; xmm5=z13 subps xmm4, xmm1 ; xmm4=z12 subps xmm0, xmm3 ; xmm0=z10 movaps xmm1, xmm2 subps xmm2, xmm5 addps xmm1, xmm5 ; xmm1=tmp7 mulps xmm2, [GOTOFF(ebx,PD_1_414)] ; xmm2=tmp11 movaps xmm3, xmm0 addps xmm0, xmm4 mulps xmm0, [GOTOFF(ebx,PD_1_847)] ; xmm0=z5 mulps xmm3, [GOTOFF(ebx,PD_M2_613)] ; xmm3=(z10 * -2.613125930) mulps xmm4, [GOTOFF(ebx,PD_1_082)] ; xmm4=(z12 * 1.082392200) addps xmm3, xmm0 ; xmm3=tmp12 subps xmm4, xmm0 ; xmm4=tmp10 ; -- Final output stage subps xmm3, xmm1 ; xmm3=tmp6 movaps xmm5, xmm6 movaps xmm0, xmm7 addps xmm6, xmm1 ; xmm6=data0=(00 01 02 03) addps xmm7, xmm3 ; xmm7=data1=(10 11 12 13) subps xmm5, xmm1 ; xmm5=data7=(70 71 72 73) subps xmm0, xmm3 ; xmm0=data6=(60 61 62 63) subps xmm2, xmm3 ; xmm2=tmp5 movaps xmm1, xmm6 ; transpose coefficients(phase 1) unpcklps xmm6, xmm7 ; xmm6=(00 10 01 11) unpckhps xmm1, xmm7 ; xmm1=(02 12 03 13) movaps xmm3, xmm0 ; transpose coefficients(phase 1) unpcklps xmm0, xmm5 ; xmm0=(60 70 61 71) unpckhps xmm3, xmm5 ; xmm3=(62 72 63 73) movaps xmm7, XMMWORD [wk(0)] ; xmm7=tmp2 movaps xmm5, XMMWORD [wk(1)] ; xmm5=tmp3 movaps XMMWORD [wk(0)], xmm0 ; wk(0)=(60 70 61 71) movaps XMMWORD [wk(1)], xmm3 ; wk(1)=(62 72 63 73) addps xmm4, xmm2 ; xmm4=tmp4 movaps xmm0, xmm7 movaps xmm3, xmm5 addps xmm7, xmm2 ; xmm7=data2=(20 21 22 23) addps xmm5, xmm4 ; xmm5=data4=(40 41 42 43) subps xmm0, xmm2 ; xmm0=data5=(50 51 52 53) subps xmm3, xmm4 ; xmm3=data3=(30 31 32 33) movaps xmm2, xmm7 ; transpose coefficients(phase 1) unpcklps xmm7, xmm3 ; xmm7=(20 30 21 31) unpckhps xmm2, xmm3 ; xmm2=(22 32 23 33) movaps xmm4, xmm5 ; transpose coefficients(phase 1) unpcklps xmm5, xmm0 ; xmm5=(40 50 41 51) unpckhps xmm4, xmm0 ; xmm4=(42 52 43 53) movaps xmm3, xmm6 ; transpose coefficients(phase 2) unpcklps2 xmm6, xmm7 ; xmm6=(00 10 20 30) unpckhps2 xmm3, xmm7 ; xmm3=(01 11 21 31) movaps xmm0, xmm1 ; transpose coefficients(phase 2) unpcklps2 xmm1, xmm2 ; xmm1=(02 12 22 32) unpckhps2 xmm0, xmm2 ; xmm0=(03 13 23 33) movaps xmm7, XMMWORD [wk(0)] ; xmm7=(60 70 61 71) movaps xmm2, XMMWORD [wk(1)] ; xmm2=(62 72 63 73) movaps XMMWORD [XMMBLOCK(0,0,edi,SIZEOF_FAST_FLOAT)], xmm6 movaps XMMWORD [XMMBLOCK(1,0,edi,SIZEOF_FAST_FLOAT)], xmm3 movaps XMMWORD [XMMBLOCK(2,0,edi,SIZEOF_FAST_FLOAT)], xmm1 movaps XMMWORD [XMMBLOCK(3,0,edi,SIZEOF_FAST_FLOAT)], xmm0 movaps xmm6, xmm5 ; transpose coefficients(phase 2) unpcklps2 xmm5, xmm7 ; xmm5=(40 50 60 70) unpckhps2 xmm6, xmm7 ; xmm6=(41 51 61 71) movaps xmm3, xmm4 ; transpose coefficients(phase 2) unpcklps2 xmm4, xmm2 ; xmm4=(42 52 62 72) unpckhps2 xmm3, xmm2 ; xmm3=(43 53 63 73) movaps XMMWORD [XMMBLOCK(0,1,edi,SIZEOF_FAST_FLOAT)], xmm5 movaps XMMWORD [XMMBLOCK(1,1,edi,SIZEOF_FAST_FLOAT)], xmm6 movaps XMMWORD [XMMBLOCK(2,1,edi,SIZEOF_FAST_FLOAT)], xmm4 movaps XMMWORD [XMMBLOCK(3,1,edi,SIZEOF_FAST_FLOAT)], xmm3 .nextcolumn: add esi, byte 4*SIZEOF_JCOEF ; coef_block add edx, byte 4*SIZEOF_FLOAT_MULT_TYPE ; quantptr add edi, 4*DCTSIZE*SIZEOF_FAST_FLOAT ; wsptr dec ecx ; ctr jnz near .columnloop ; -- Prefetch the next coefficient block prefetchnta [esi + (DCTSIZE2-8)*SIZEOF_JCOEF + 0*32] prefetchnta [esi + (DCTSIZE2-8)*SIZEOF_JCOEF + 1*32] prefetchnta [esi + (DCTSIZE2-8)*SIZEOF_JCOEF + 2*32] prefetchnta [esi + (DCTSIZE2-8)*SIZEOF_JCOEF + 3*32] ; ---- Pass 2: process rows from work array, store into output array. mov eax, [original_ebp] lea esi, [workspace] ; FAST_FLOAT *wsptr mov edi, JSAMPARRAY [output_buf(eax)] ; (JSAMPROW *) mov eax, JDIMENSION [output_col(eax)] mov ecx, DCTSIZE/4 ; ctr alignx 16, 7 .rowloop: ; -- Even part movaps xmm0, XMMWORD [XMMBLOCK(0,0,esi,SIZEOF_FAST_FLOAT)] movaps xmm1, XMMWORD [XMMBLOCK(2,0,esi,SIZEOF_FAST_FLOAT)] movaps xmm2, XMMWORD [XMMBLOCK(4,0,esi,SIZEOF_FAST_FLOAT)] movaps xmm3, XMMWORD [XMMBLOCK(6,0,esi,SIZEOF_FAST_FLOAT)] movaps xmm4, xmm0 movaps xmm5, xmm1 subps xmm0, xmm2 ; xmm0=tmp11 subps xmm1, xmm3 addps xmm4, xmm2 ; xmm4=tmp10 addps xmm5, xmm3 ; xmm5=tmp13 mulps xmm1, [GOTOFF(ebx,PD_1_414)] subps xmm1, xmm5 ; xmm1=tmp12 movaps xmm6, xmm4 movaps xmm7, xmm0 subps xmm4, xmm5 ; xmm4=tmp3 subps xmm0, xmm1 ; xmm0=tmp2 addps xmm6, xmm5 ; xmm6=tmp0 addps xmm7, xmm1 ; xmm7=tmp1 movaps XMMWORD [wk(1)], xmm4 ; tmp3 movaps XMMWORD [wk(0)], xmm0 ; tmp2 ; -- Odd part movaps xmm2, XMMWORD [XMMBLOCK(1,0,esi,SIZEOF_FAST_FLOAT)] movaps xmm3, XMMWORD [XMMBLOCK(3,0,esi,SIZEOF_FAST_FLOAT)] movaps xmm5, XMMWORD [XMMBLOCK(5,0,esi,SIZEOF_FAST_FLOAT)] movaps xmm1, XMMWORD [XMMBLOCK(7,0,esi,SIZEOF_FAST_FLOAT)] movaps xmm4, xmm2 movaps xmm0, xmm5 addps xmm2, xmm1 ; xmm2=z11 addps xmm5, xmm3 ; xmm5=z13 subps xmm4, xmm1 ; xmm4=z12 subps xmm0, xmm3 ; xmm0=z10 movaps xmm1, xmm2 subps xmm2, xmm5 addps xmm1, xmm5 ; xmm1=tmp7 mulps xmm2, [GOTOFF(ebx,PD_1_414)] ; xmm2=tmp11 movaps xmm3, xmm0 addps xmm0, xmm4 mulps xmm0, [GOTOFF(ebx,PD_1_847)] ; xmm0=z5 mulps xmm3, [GOTOFF(ebx,PD_M2_613)] ; xmm3=(z10 * -2.613125930) mulps xmm4, [GOTOFF(ebx,PD_1_082)] ; xmm4=(z12 * 1.082392200) addps xmm3, xmm0 ; xmm3=tmp12 subps xmm4, xmm0 ; xmm4=tmp10 ; -- Final output stage subps xmm3, xmm1 ; xmm3=tmp6 movaps xmm5, xmm6 movaps xmm0, xmm7 addps xmm6, xmm1 ; xmm6=data0=(00 10 20 30) addps xmm7, xmm3 ; xmm7=data1=(01 11 21 31) subps xmm5, xmm1 ; xmm5=data7=(07 17 27 37) subps xmm0, xmm3 ; xmm0=data6=(06 16 26 36) subps xmm2, xmm3 ; xmm2=tmp5 movaps xmm1, [GOTOFF(ebx,PD_0_125)] ; xmm1=[PD_0_125] mulps xmm6, xmm1 ; descale(1/8) mulps xmm7, xmm1 ; descale(1/8) mulps xmm5, xmm1 ; descale(1/8) mulps xmm0, xmm1 ; descale(1/8) movhlps xmm3, xmm6 movhlps xmm1, xmm7 cvtps2pi mm0, xmm6 ; round to int32, mm0=data0L=(00 10) cvtps2pi mm1, xmm7 ; round to int32, mm1=data1L=(01 11) cvtps2pi mm2, xmm3 ; round to int32, mm2=data0H=(20 30) cvtps2pi mm3, xmm1 ; round to int32, mm3=data1H=(21 31) packssdw mm0, mm2 ; mm0=data0=(00 10 20 30) packssdw mm1, mm3 ; mm1=data1=(01 11 21 31) movhlps xmm6, xmm5 movhlps xmm7, xmm0 cvtps2pi mm4, xmm5 ; round to int32, mm4=data7L=(07 17) cvtps2pi mm5, xmm0 ; round to int32, mm5=data6L=(06 16) cvtps2pi mm6, xmm6 ; round to int32, mm6=data7H=(27 37) cvtps2pi mm7, xmm7 ; round to int32, mm7=data6H=(26 36) packssdw mm4, mm6 ; mm4=data7=(07 17 27 37) packssdw mm5, mm7 ; mm5=data6=(06 16 26 36) packsswb mm0, mm5 ; mm0=(00 10 20 30 06 16 26 36) packsswb mm1, mm4 ; mm1=(01 11 21 31 07 17 27 37) movaps xmm3, XMMWORD [wk(0)] ; xmm3=tmp2 movaps xmm1, XMMWORD [wk(1)] ; xmm1=tmp3 movaps xmm6, [GOTOFF(ebx,PD_0_125)] ; xmm6=[PD_0_125] addps xmm4, xmm2 ; xmm4=tmp4 movaps xmm5, xmm3 movaps xmm0, xmm1 addps xmm3, xmm2 ; xmm3=data2=(02 12 22 32) addps xmm1, xmm4 ; xmm1=data4=(04 14 24 34) subps xmm5, xmm2 ; xmm5=data5=(05 15 25 35) subps xmm0, xmm4 ; xmm0=data3=(03 13 23 33) mulps xmm3, xmm6 ; descale(1/8) mulps xmm1, xmm6 ; descale(1/8) mulps xmm5, xmm6 ; descale(1/8) mulps xmm0, xmm6 ; descale(1/8) movhlps xmm7, xmm3 movhlps xmm2, xmm1 cvtps2pi mm2, xmm3 ; round to int32, mm2=data2L=(02 12) cvtps2pi mm3, xmm1 ; round to int32, mm3=data4L=(04 14) cvtps2pi mm6, xmm7 ; round to int32, mm6=data2H=(22 32) cvtps2pi mm7, xmm2 ; round to int32, mm7=data4H=(24 34) packssdw mm2, mm6 ; mm2=data2=(02 12 22 32) packssdw mm3, mm7 ; mm3=data4=(04 14 24 34) movhlps xmm4, xmm5 movhlps xmm6, xmm0 cvtps2pi mm5, xmm5 ; round to int32, mm5=data5L=(05 15) cvtps2pi mm4, xmm0 ; round to int32, mm4=data3L=(03 13) cvtps2pi mm6, xmm4 ; round to int32, mm6=data5H=(25 35) cvtps2pi mm7, xmm6 ; round to int32, mm7=data3H=(23 33) packssdw mm5, mm6 ; mm5=data5=(05 15 25 35) packssdw mm4, mm7 ; mm4=data3=(03 13 23 33) movq mm6, [GOTOFF(ebx,PB_CENTERJSAMP)] ; mm6=[PB_CENTERJSAMP] packsswb mm2, mm3 ; mm2=(02 12 22 32 04 14 24 34) packsswb mm4, mm5 ; mm4=(03 13 23 33 05 15 25 35) paddb mm0, mm6 paddb mm1, mm6 paddb mm2, mm6 paddb mm4, mm6 movq mm7, mm0 ; transpose coefficients(phase 1) punpcklbw mm0, mm1 ; mm0=(00 01 10 11 20 21 30 31) punpckhbw mm7, mm1 ; mm7=(06 07 16 17 26 27 36 37) movq mm3, mm2 ; transpose coefficients(phase 1) punpcklbw mm2, mm4 ; mm2=(02 03 12 13 22 23 32 33) punpckhbw mm3, mm4 ; mm3=(04 05 14 15 24 25 34 35) movq mm5, mm0 ; transpose coefficients(phase 2) punpcklwd mm0, mm2 ; mm0=(00 01 02 03 10 11 12 13) punpckhwd mm5, mm2 ; mm5=(20 21 22 23 30 31 32 33) movq mm6, mm3 ; transpose coefficients(phase 2) punpcklwd mm3, mm7 ; mm3=(04 05 06 07 14 15 16 17) punpckhwd mm6, mm7 ; mm6=(24 25 26 27 34 35 36 37) movq mm1, mm0 ; transpose coefficients(phase 3) punpckldq mm0, mm3 ; mm0=(00 01 02 03 04 05 06 07) punpckhdq mm1, mm3 ; mm1=(10 11 12 13 14 15 16 17) movq mm4, mm5 ; transpose coefficients(phase 3) punpckldq mm5, mm6 ; mm5=(20 21 22 23 24 25 26 27) punpckhdq mm4, mm6 ; mm4=(30 31 32 33 34 35 36 37) pushpic ebx ; save GOT address mov edx, JSAMPROW [edi+0*SIZEOF_JSAMPROW] mov ebx, JSAMPROW [edi+1*SIZEOF_JSAMPROW] movq MMWORD [edx+eax*SIZEOF_JSAMPLE], mm0 movq MMWORD [ebx+eax*SIZEOF_JSAMPLE], mm1 mov edx, JSAMPROW [edi+2*SIZEOF_JSAMPROW] mov ebx, JSAMPROW [edi+3*SIZEOF_JSAMPROW] movq MMWORD [edx+eax*SIZEOF_JSAMPLE], mm5 movq MMWORD [ebx+eax*SIZEOF_JSAMPLE], mm4 poppic ebx ; restore GOT address add esi, byte 4*SIZEOF_FAST_FLOAT ; wsptr add edi, byte 4*SIZEOF_JSAMPROW dec ecx ; ctr jnz near .rowloop emms ; empty MMX state pop edi pop esi ; pop edx ; need not be preserved ; pop ecx ; need not be preserved pop ebx mov esp, ebp ; esp <- aligned ebp pop esp ; esp <- original ebp pop ebp ret ; For some reason, the OS X linker does not honor the request to align the ; segment unless we do this. align 32
43.456446
78
0.514392
[ "BSD-3-Clause" ]
157356379/libjpeg-turbo
simd/i386/jidctflt-sse.asm
24,944
Assembly
; A276862: First differences of the Beatty sequence A003151 for 1 + sqrt(2). ; 2,3,2,3,2,2,3,2,3,2,2,3,2,3,2,3,2,2,3,2,3,2,2,3,2,3,2,3,2,2,3,2,3,2,2,3,2,3,2,2,3,2,3,2,3,2,2,3,2,3,2,2,3,2,3,2,3,2,2,3,2,3,2,2,3,2,3,2,2,3,2,3,2,3,2,2,3,2,3,2,2,3,2,3,2,3,2,2,3,2,3,2,2,3,2,3,2,3,2,2,3,2,3,2,2,3,2,3,2,2,3,2,3,2,3,2,2,3,2,3,2,2,3,2,3,2,3,2,2,3,2,3,2,2,3,2,3,2,2,3,2,3,2,3,2,2,3,2,3,2,2,3,2,3,2,3,2,2,3,2,3,2,2,3,2,3,2,3,2,2,3,2,3,2,2,3,2,3,2,2,3,2,3,2,3,2,2,3,2,3,2,2,3,2,3,2,3,2,2,3,2,3,2,2,3,2,3,2,2,3,2,3,2,3,2,2,3,2,3,2,2,3,2,3,2,3,2,2,3,2,3,2,2,3,2,3,2,2,3,2,3,2,3,2,2,3,2,3,2,2 mov $3,$0 mov $5,2 lpb $5,1 mov $0,$3 sub $5,1 add $0,$5 add $0,1 pow $0,2 mul $0,2 mov $2,1 lpb $0,1 add $2,2 trn $0,$2 lpe sub $2,3 mov $4,$5 mov $6,$2 lpb $4,1 mov $1,$6 sub $4,1 lpe lpe lpb $3,1 sub $1,$6 mov $3,0 lpe sub $1,2 div $1,2 add $1,2
26.575758
501
0.507412
[ "Apache-2.0" ]
karttu/loda
programs/oeis/276/A276862.asm
877
Assembly
; void *esx_disk_stream_bytes(void *dst,uint16_t len) INCLUDE "config_private.inc" SECTION code_esxdos PUBLIC asm_esx_disk_stream_bytes EXTERN _esx_stream_io_port EXTERN asm_esx_disk_stream_sectors asm_esx_disk_stream_bytes: ; enter : hl = void *dst ; de = uint16_t len > 0 ; ; exit : c = device port ; b = 0 ; ; success ; ; hl = void *dst (next address) ; carry reset ; ; fail ; ; hl = 0 ; carry set, errno = ESX_EIO ; ; note : no error checking is done to ensure that ; sectors are not read past the end of the span ; ; uses : af, bc, de, hl ; read whole sectors first ld a,d and $fe jr z, partial_sector whole_sector: push de rra ld e,a ; e = num whole sectors call asm_esx_disk_stream_sectors pop de ret c ; if error ld a,d and $01 ld d,a or e ret z ; read last partial sector partial_sector: ld a,(_esx_stream_io_port) ld c,a read_256: dec d jr nz, read_bytes IF __NEXTOS_CONFIG_STREAM_UNROLL EXTERN l_ini_256 call l_ini_256 ELSE ld b,d inir ENDIF read_bytes: ld b,e inir ret
13.946237
59
0.564379
[ "BSD-2-Clause" ]
ByteProject/Puddle-BuildTools
FictionTools/z88dk/libsrc/_DEVELOPMENT/arch/zxn/esxdos/z80/asm_esx_disk_stream_bytes.asm
1,297
Assembly
.data newline:.asciiz "\n" .text main: li $t0,0 li $t1,0 li $t3,0 loop: li $v0,1 addi $a0,$t0,0 syscall li $v0,4 la $a0,newline syscall addi $t0,$t0,1 bgt $t0,14,exit j loop exit: li $v0,0
9.875
21
0.518987
[ "MIT" ]
x06lan/mt
mips/test.asm
237
Assembly
; A098660: E.g.f. BesselI(0,2*sqrt(2)*x) + BesselI(1,2*sqrt(2)*x)/sqrt(2). ; 1,1,4,6,24,40,160,280,1120,2016,8064,14784,59136,109824,439296,823680,3294720,6223360,24893440,47297536,189190144,361181184,1444724736,2769055744,11076222976,21300428800,85201715200,164317593600,657270374400,1270722723840,5082890895360,9848101109760,39392404439040,76467608616960,305870434467840,594748067020800,2378992268083200,4632774416793600,18531097667174400,36135640450990080,144542561803960320,282202144474398720,1128808577897594880,2206307674981662720,8825230699926650880,17266755717247795200,69067022868991180800,135256253118441062400,541025012473764249600,1060409024448577929216,4241636097794311716864,8320132345673457598464,33280529382693830393856,65328446566028630032384,261313786264114520129536,513294937304510664540160,2053179749218042658160640,4035560196738911431557120,16142240786955645726228480,31746406881012769928249344,126985627524051079712997376,249874944482810189112672256,999499777931240756450689024,1967765187802130239262294016,7871060751208520957049176064,15503604509956177642672619520,62014418039824710570690478080,122204882607889870830478295040,488819530431559483321913180160,963672788565074409977485983744,3854691154260297639909943934976,7602307554235587012044611649536,30409230216942348048178446598144,59996589346940308311270989234176,239986357387761233245083956936704,473657284317949802457402546585600,1894629137271799209829610186342400,3740678040254577927099486778163200,14962712161018311708397947112652800,29551356518011165624085945547489280,118205426072044662496343782189957120,233527792971600430785459667253329920,934111171886401723141838669013319680 mov $1,$0 div $1,2 bin $0,$1 mov $2,2 pow $2,$1 mul $0,$2
172.1
1,586
0.916328
[ "Apache-2.0" ]
ckrause/cm
programs/oeis/098/A098660.asm
1,721
Assembly
; =============================================================== ; Jun 2007 ; =============================================================== ; ; uchar zx_aaddr2cx(void *attraddr) ; ; Attribute address to character x coordinate. ; ; =============================================================== SECTION code_clib SECTION code_arch PUBLIC asm_zx_aaddr2cx asm_zx_aaddr2cx: ; enter : hl = valid attribute address ; ; exit : l = character x coordinate of attr square ; ; uses : af, l ld a,l and $1f ld l,a IF __SCCZ80 ld h,0 ENDIF ret
16.911765
65
0.431304
[ "BSD-2-Clause" ]
ByteProject/Puddle-BuildTools
FictionTools/z88dk/libsrc/_DEVELOPMENT/arch/zx/display/z80/asm_zx_aaddr2cx.asm
575
Assembly
# File to either setup register 2 to point to the GOT, or to adjust the # pointers in the .got2 section to point to their new addresses. .file "eabi.asm" .section ".text" .globl __eabi .section ".got2","aw" .LCTOC1 = . # +32768 # Table of addresses .Ltable = .-.LCTOC1 .long .LCTOC1 # address we are really at .Lgot = .-.LCTOC1 .long _GLOBAL_OFFSET_TABLE_ # normal GOT address .Lgots = .-.LCTOC1 .long _GOT_START_ # start of .got section .Lgote = .-.LCTOC1 .long _GOT_END_ # end of .got section .Lgot2s = .-.LCTOC1 .long _GOT2_START_ # -mrelocatable GOT pointers start .Lgot2e = .-.LCTOC1 .long _GOT2_END_ # -mrelocatable GOT pointers end .Lfixups = .-.LCTOC1 .long _FIXUP_START_ # start of .fixup section .Lfixupe = .-.LCTOC1 .long _FIXUP_END_ # end of .fixup section .text .Lptr: .long .LCTOC1-.Laddr # PC relative pointer to .got2 .long 0x4000 # traceback table __eabi: mflr 0 bl .Laddr # get current address .Laddr: mflr 12 # real address of .Laddr lwz 11,(.Lptr-.Laddr)(12) # linker generated address of .LCTOC1 add 11,11,12 # correct to real pointer lwz 12,.Ltable(11) # get linker's idea of where .Laddr is subf. 12,12,11 # calculate difference mtlr 0 # restore link register bc 4,2,.Lreloc # skip if we need to relocate # Only load up register 2 if there is a .got section lwz 3,.Lgots(11) # start of .got section lwz 4,.Lgote(11) # end of .got section cmpw 1,3,4 # .got section non-empty? bc 12,6,.Ldone # Normal program, load up register 2 lwz 2,.Lgot(11) # normal GOT address (obsolete in register 2) mr 13,2 # also same as _SDA_BASE_ (V.4 small data ptr) b __do_global_ctors # do any C++ global constructors (which returns to caller) # We need to relocate the .got2 pointers. Don't load register 2 .Lreloc: lwz 3,.Lgot2s(11) # GOT pointers start lwz 4,.Lgot2e(11) # GOT pointers end add 3,12,3 # adjust pointers add 4,12,4 cmpw 1,3,4 # any pointers to adjust bc 12,6,.Lfix .Lloop: lwz 5,0(3) # next pointer add 5,5,12 # adjust stw 5,0(3) addi 3,3,4 # bump to next word cmpw 1,3,4 # more pointers to adjust? bc 4,6,.Lloop # Fixup any user initialized pointers now (the compiler drops pointers to # each of the relocs that it does in the .fixup section). Note, the pointers # themselves have already been fixed up by the previous loop. .Lfix: lwz 3,.Lfixups(11) # fixup pointers start lwz 4,.Lfixupe(11) # fixup pointers end cmpw 1,3,4 # any user pointers to adjust bc 12,6,.Ldone .Lfloop: lwz 5,0(3) # next pointer lwz 6,0(5) # get the pointer it points to add 6,6,12 # adjust stw 6,0(5) addi 3,3,4 # bump to next word cmpw 1,3,4 # more pointers to adjust? bc 4,6,.Lfloop # Done adjusting pointers, return .Ldone: b __do_global_ctors # do any C++ global constructors (which returns to caller) # Routines for saving floating point registers, called by the compiler. # Called with r11 pointing to the stack header word of the caller of the # function, just beyond the end of the floating point save area. .globl _savefpr_14 .globl _savefpr_15 .globl _savefpr_16 .globl _savefpr_17 .globl _savefpr_18 .globl _savefpr_19 .globl _savefpr_20 .globl _savefpr_21 .globl _savefpr_22 .globl _savefpr_23 .globl _savefpr_24 .globl _savefpr_25 .globl _savefpr_26 .globl _savefpr_27 .globl _savefpr_28 .globl _savefpr_29 .globl _savefpr_30 .globl _savefpr_31 .long 0x00400000 # traceback tag _savefpr_14: stfd 14,-144(11) # save fp registers _savefpr_15: stfd 15,-136(11) _savefpr_16: stfd 16,-128(11) _savefpr_17: stfd 17,-120(11) _savefpr_18: stfd 18,-112(11) _savefpr_19: stfd 19,-104(11) _savefpr_20: stfd 20,-96(11) _savefpr_21: stfd 21,-88(11) _savefpr_22: stfd 22,-80(11) _savefpr_23: stfd 23,-72(11) _savefpr_24: stfd 24,-64(11) _savefpr_25: stfd 25,-56(11) _savefpr_26: stfd 26,-48(11) _savefpr_27: stfd 27,-40(11) _savefpr_28: stfd 28,-32(11) _savefpr_29: stfd 29,-24(11) _savefpr_30: stfd 30,-16(11) _savefpr_31: stfd 31,-8(11) blr # Routines for saving integer registers, called by the compiler. # Called with r11 pointing to the stack header word of the caller of the # function, just beyond the end of the integer save area. .globl _savegpr_14 .globl _savegpr_15 .globl _savegpr_16 .globl _savegpr_17 .globl _savegpr_18 .globl _savegpr_19 .globl _savegpr_20 .globl _savegpr_21 .globl _savegpr_22 .globl _savegpr_23 .globl _savegpr_24 .globl _savegpr_25 .globl _savegpr_26 .globl _savegpr_27 .globl _savegpr_28 .globl _savegpr_29 .globl _savegpr_30 .globl _savegpr_31 .long 0x00400000 # traceback tag _savegpr_14: stw 14,-72(11) # save gp registers _savegpr_15: stw 15,-68(11) _savegpr_16: stw 16,-64(11) _savegpr_17: stw 17,-60(11) _savegpr_18: stw 18,-56(11) _savegpr_19: stw 19,-52(11) _savegpr_20: stw 20,-48(11) _savegpr_21: stw 21,-44(11) _savegpr_22: stw 22,-40(11) _savegpr_23: stw 23,-36(11) _savegpr_24: stw 24,-32(11) _savegpr_25: stw 25,-28(11) _savegpr_26: stw 26,-24(11) _savegpr_27: stw 27,-20(11) _savegpr_28: stw 28,-16(11) _savegpr_29: stw 29,-12(11) _savegpr_30: stw 30,-8(11) _savegpr_31: stw 31,-4(11) blr # Routines for restoring floating point registers, called by the compiler. # Called with r11 pointing to the stack header word of the caller of the # function, just beyond the end of the floating point save area. .globl _restfpr_14 .globl _restfpr_15 .globl _restfpr_16 .globl _restfpr_17 .globl _restfpr_18 .globl _restfpr_19 .globl _restfpr_20 .globl _restfpr_21 .globl _restfpr_22 .globl _restfpr_23 .globl _restfpr_24 .globl _restfpr_25 .globl _restfpr_26 .globl _restfpr_27 .globl _restfpr_28 .globl _restfpr_29 .globl _restfpr_30 .globl _restfpr_31 .long 0x00600000 # traceback tag _restfpr_14: lfd 14,-144(11) # restore fp registers _restfpr_15: lfd 15,-136(11) _restfpr_16: lfd 16,-128(11) _restfpr_17: lfd 17,-120(11) _restfpr_18: lfd 18,-112(11) _restfpr_19: lfd 19,-104(11) _restfpr_20: lfd 20,-96(11) _restfpr_21: lfd 21,-88(11) _restfpr_22: lfd 22,-80(11) _restfpr_23: lfd 23,-72(11) _restfpr_24: lfd 24,-64(11) _restfpr_25: lfd 25,-56(11) _restfpr_26: lfd 26,-48(11) _restfpr_27: lfd 27,-40(11) _restfpr_28: lfd 28,-32(11) _restfpr_29: lfd 29,-24(11) _restfpr_30: lfd 30,-16(11) _restfpr_31: lfd 31,-8(11) blr # Routines for restoring integer registers, called by the compiler. # Called with r11 pointing to the stack header word of the caller of the # function, just beyond the end of the integer restore area. .globl _restgpr_14 .globl _restgpr_15 .globl _restgpr_16 .globl _restgpr_17 .globl _restgpr_18 .globl _restgpr_19 .globl _restgpr_20 .globl _restgpr_21 .globl _restgpr_22 .globl _restgpr_23 .globl _restgpr_24 .globl _restgpr_25 .globl _restgpr_26 .globl _restgpr_27 .globl _restgpr_28 .globl _restgpr_29 .globl _restgpr_30 .globl _restgpr_31 .long 0x00600000 # traceback tag _restgpr_14: lwz 14,-72(11) # rest gp registers _restgpr_15: lwz 15,-68(11) _restgpr_16: lwz 16,-64(11) _restgpr_17: lwz 17,-60(11) _restgpr_18: lwz 18,-56(11) _restgpr_19: lwz 19,-52(11) _restgpr_20: lwz 20,-48(11) _restgpr_21: lwz 21,-44(11) _restgpr_22: lwz 22,-40(11) _restgpr_23: lwz 23,-36(11) _restgpr_24: lwz 24,-32(11) _restgpr_25: lwz 25,-28(11) _restgpr_26: lwz 26,-24(11) _restgpr_27: lwz 27,-20(11) _restgpr_28: lwz 28,-16(11) _restgpr_29: lwz 29,-12(11) _restgpr_30: lwz 30,-8(11) _restgpr_31: lwz 31,-4(11) blr # Routines for restoring floating point registers, called by the compiler. # Called with r11 pointing to the stack header word of the caller of the # function, just beyond the end of the floating point save area. # In addition to restoring the fp registers, it will return to the caller's # caller .globl _restfpr_14_x .globl _restfpr_15_x .globl _restfpr_16_x .globl _restfpr_17_x .globl _restfpr_18_x .globl _restfpr_19_x .globl _restfpr_20_x .globl _restfpr_21_x .globl _restfpr_22_x .globl _restfpr_23_x .globl _restfpr_24_x .globl _restfpr_25_x .globl _restfpr_26_x .globl _restfpr_27_x .globl _restfpr_28_x .globl _restfpr_29_x .globl _restfpr_30_x .globl _restfpr_31_x .long 0x00600000 # traceback tag _restfpr_14_x: lfd 14,-144(11) # restore fp registers _restfpr_15_x: lfd 15,-136(11) _restfpr_16_x: lfd 16,-128(11) _restfpr_17_x: lfd 17,-120(11) _restfpr_18_x: lfd 18,-112(11) _restfpr_19_x: lfd 19,-104(11) _restfpr_20_x: lfd 20,-96(11) _restfpr_21_x: lfd 21,-88(11) _restfpr_22_x: lfd 22,-80(11) _restfpr_23_x: lfd 23,-72(11) _restfpr_24_x: lfd 24,-64(11) _restfpr_25_x: lfd 25,-56(11) _restfpr_26_x: lfd 26,-48(11) _restfpr_27_x: lfd 27,-40(11) _restfpr_28_x: lfd 28,-32(11) _restfpr_29_x: lfd 29,-24(11) _restfpr_30_x: lfd 30,-16(11) _restfpr_31_x: lwz 0,4(11) lfd 31,-8(11) mtlr 0 mr 1,11 blr # Routines for restoring integer registers, called by the compiler. # Called with r11 pointing to the stack header word of the caller of the # function, just beyond the end of the integer restore area. .globl _restgpr_14_x .globl _restgpr_15_x .globl _restgpr_16_x .globl _restgpr_17_x .globl _restgpr_18_x .globl _restgpr_19_x .globl _restgpr_20_x .globl _restgpr_21_x .globl _restgpr_22_x .globl _restgpr_23_x .globl _restgpr_24_x .globl _restgpr_25_x .globl _restgpr_26_x .globl _restgpr_27_x .globl _restgpr_28_x .globl _restgpr_29_x .globl _restgpr_30_x .globl _restgpr_31_x .long 0x00600000 # traceback tag _restgpr_14_x: lwz 14,-72(11) # rest gp registers _restgpr_15_x: lwz 15,-68(11) _restgpr_16_x: lwz 16,-64(11) _restgpr_17_x: lwz 17,-60(11) _restgpr_18_x: lwz 18,-56(11) _restgpr_19_x: lwz 19,-52(11) _restgpr_20_x: lwz 20,-48(11) _restgpr_21_x: lwz 21,-44(11) _restgpr_22_x: lwz 22,-40(11) _restgpr_23_x: lwz 23,-36(11) _restgpr_24_x: lwz 24,-32(11) _restgpr_25_x: lwz 25,-28(11) _restgpr_26_x: lwz 26,-24(11) _restgpr_27_x: lwz 27,-20(11) _restgpr_28_x: lwz 28,-16(11) _restgpr_29_x: lwz 29,-12(11) _restgpr_30_x: lwz 30,-8(11) _restgpr_31_x: lwz 0,4(11) lwz 31,-4(11) mtlr 0 mr 1,11 blr
26.360526
80
0.734052
[ "BSD-3-Clause" ]
aaliomer/exos
bin/gcc/config/rs6000/eabi.asm
10,017
Assembly
db DEX_NIDORINO ; pokedex id db 61, 72, 57, 65, 55 ; hp atk def spd spc db POISON, POISON ; type db 120 ; catch rate db 118 ; base exp INCBIN "gfx/pokemon/front/nidorino.pic", 0, 1 ; sprite dimensions dw NidorinoPicFront, NidorinoPicBack db LEER, TACKLE, HORN_ATTACK, NO_MOVE ; level 1 learnset db GROWTH_MEDIUM_SLOW ; growth rate ; tm/hm learnset tmhm TOXIC, COUNTER, BODY_SLAM, TAKE_DOWN, DOUBLE_EDGE, \ BUBBLEBEAM, WATER_GUN, ICE_BEAM, BLIZZARD, RAGE, \ THUNDERBOLT, THUNDER, MIMIC, DOUBLE_TEAM, REFLECT, \ BIDE, SKULL_BASH, REST, SUBSTITUTE ; end db 0 ; padding
28.833333
77
0.618497
[ "CC0-1.0" ]
opiter09/ASM-Machina
data/pokemon/base_stats/nidorino.asm
692
Assembly
; A147677: Subtract 5, add 8, repeat. ; Submitted by Jamie Morken(s2) ; 7,2,10,5,13,8,16,11,19,14,22,17,25,20,28,23,31,26,34,29,37,32,40,35,43,38,46,41,49,44,52,47,55,50,58,53,61,56,64,59,67,62,70,65,73,68,76,71,79,74,82,77,85,80,88,83,91,86,94,89,97,92,100,95,103,98,106,101,109 mov $1,$0 mul $0,6 mul $1,2 add $1,11 mod $1,4 pow $1,3 add $0,$1 sub $0,4 div $0,4 add $0,2
24.933333
209
0.641711
[ "Apache-2.0" ]
ckrause/loda-programs
oeis/147/A147677.asm
374
Assembly
# CALCULATES THE SUM OF R0 AND R1 .SECTION TEXT .STACK 1 .ESTACK 0 START: MOV R0, 1 MOV R1, 2 CALL SUM LDC R2, STDOUT FWRTQ R5, R2, R0 MOV R0, 0xA FWRTB R5, R2, R0 HALT R31 .GLOBAL SUM SUM: ADD R0, R0, R1 RET
13.117647
34
0.650224
[ "MIT" ]
plankp/RLVM
sample/sum.asm
223
Assembly
* Hotkey Stuffer V0.00  1987 Tony Tebby QJUMP * section gen_util * xdef gu_hotst * include 'dev8_keys_qdos_sms' include 'dev8_keys_sys' * hkd_pllk equ $08 long polling int linkage from A3 hkd_plad equ $0c long polling int routine address from A3 hkd_id equ $10 long hotkey ID hkd.id equ 'Hot%' hkd_jobb equ $14 long hotkey job base address hkd_next equ $18 byte next job (hotkey number pressed) * hkd_clos equ $24 long address of close * hkd_bufp equ $3a word running pointer to buffer hkd_bufl equ $3c word length of buffer hkd.bufl equ $80 hkd_bufc equ $3e word buffer byte counter hkd_buff equ $40 hotkey buffer hkd.len equ hkd_buff + hk_bufln is actual length of block *+++ * Stuff one or two strings into the hotkey buffer, to be extracted by * ALT-SPACE. The D2/A2 string goes first, followed by the D3/A3 one. * * d0 r 0 * d1 r length set * d2 c p length of string (a2) * d3 c p length of string (a3) * a2 c p pointer to string characters (d2<>0) * a3 c p pointer to string characters (d3<>0) * * all other registers preserved *--- gu_hotst reglist reg d2/d3/a0/a1/a2/a3 dreg reg d2/d3 * trap #0 supervisor mode movem.l reglist,-(sp) moveq #sms.info,d0 get information trap #1 * moveq #0,d1 preset nothing copied * lea sys_poll(a0),a0 polling list hot_look move.l (a0),d0 next polling beq.s hot_exit move.l d0,a0 cmp.l #hkd.id,hkd_id-hkd_pllk(a0) our poll? bne.s hot_look * clr.w hkd_bufc-hkd_pllk(a0) no length move.w #-1,hkd_bufp-hkd_pllk(a0) stop stuffing lea hkd_buff-hkd_pllk(a0),a1 buffer address movem.l (sp),dreg restore data registers * bsr.s hot_set set first string move.w d3,d2 move.l a3,a2 bsr.s hot_set and second * move.w d1,hkd_bufc-hkd_pllk(a0) set count in buffer * hot_exit movem.l (sp)+,reglist and.w #$dfff,sr moveq #0,d0 rts * * hot_set add.w d2,d1 more characters move.w hkd_bufl-hkd_pllk(a0),d0 space in buffer sub.w d1,d0 space left bge.s hot_copy add.w d0,d1 move back a bit add.w d0,d2 hot_copy move.w d2,d0 bra.s hot_slend hot_sloop move.b (a2)+,(a1)+ set characters hot_slend dbra d0,hot_sloop rts end
30.597826
69
0.542451
[ "BSD-2-Clause" ]
olifink/smsqe
util/gut/hotstuff.asm
2,815
Assembly
%ifidn __OUTPUT_FORMAT__,obj section code use32 class=code align=64 %elifidn __OUTPUT_FORMAT__,win32 $@feat.00 equ 1 section .text code align=64 %else section .text code %endif global _Camellia_EncryptBlock_Rounds align 16 _Camellia_EncryptBlock_Rounds: L$_Camellia_EncryptBlock_Rounds_begin: push ebp push ebx push esi push edi mov eax,DWORD [20+esp] mov esi,DWORD [24+esp] mov edi,DWORD [28+esp] mov ebx,esp sub esp,28 and esp,-64 lea ecx,[edi-127] sub ecx,esp neg ecx and ecx,960 sub esp,ecx add esp,4 shl eax,6 lea eax,[eax*1+edi] mov DWORD [20+esp],ebx mov DWORD [16+esp],eax call L$000pic_point L$000pic_point: pop ebp lea ebp,[(L$Camellia_SBOX-L$000pic_point)+ebp] mov eax,DWORD [esi] mov ebx,DWORD [4+esi] mov ecx,DWORD [8+esi] bswap eax mov edx,DWORD [12+esi] bswap ebx bswap ecx bswap edx call __x86_Camellia_encrypt mov esp,DWORD [20+esp] bswap eax mov esi,DWORD [32+esp] bswap ebx bswap ecx bswap edx mov DWORD [esi],eax mov DWORD [4+esi],ebx mov DWORD [8+esi],ecx mov DWORD [12+esi],edx pop edi pop esi pop ebx pop ebp ret global _Camellia_EncryptBlock align 16 _Camellia_EncryptBlock: L$_Camellia_EncryptBlock_begin: mov eax,128 sub eax,DWORD [4+esp] mov eax,3 adc eax,0 mov DWORD [4+esp],eax jmp NEAR L$_Camellia_EncryptBlock_Rounds_begin global _Camellia_encrypt align 16 _Camellia_encrypt: L$_Camellia_encrypt_begin: push ebp push ebx push esi push edi mov esi,DWORD [20+esp] mov edi,DWORD [28+esp] mov ebx,esp sub esp,28 and esp,-64 mov eax,DWORD [272+edi] lea ecx,[edi-127] sub ecx,esp neg ecx and ecx,960 sub esp,ecx add esp,4 shl eax,6 lea eax,[eax*1+edi] mov DWORD [20+esp],ebx mov DWORD [16+esp],eax call L$001pic_point L$001pic_point: pop ebp lea ebp,[(L$Camellia_SBOX-L$001pic_point)+ebp] mov eax,DWORD [esi] mov ebx,DWORD [4+esi] mov ecx,DWORD [8+esi] bswap eax mov edx,DWORD [12+esi] bswap ebx bswap ecx bswap edx call __x86_Camellia_encrypt mov esp,DWORD [20+esp] bswap eax mov esi,DWORD [24+esp] bswap ebx bswap ecx bswap edx mov DWORD [esi],eax mov DWORD [4+esi],ebx mov DWORD [8+esi],ecx mov DWORD [12+esi],edx pop edi pop esi pop ebx pop ebp ret align 16 __x86_Camellia_encrypt: xor eax,DWORD [edi] xor ebx,DWORD [4+edi] xor ecx,DWORD [8+edi] xor edx,DWORD [12+edi] mov esi,DWORD [16+edi] mov DWORD [4+esp],eax mov DWORD [8+esp],ebx mov DWORD [12+esp],ecx mov DWORD [16+esp],edx align 16 L$002loop: xor eax,esi xor ebx,DWORD [20+edi] movzx esi,ah mov edx,DWORD [2052+esi*8+ebp] movzx esi,al xor edx,DWORD [4+esi*8+ebp] shr eax,16 movzx esi,bl mov ecx,DWORD [esi*8+ebp] movzx esi,ah xor edx,DWORD [esi*8+ebp] movzx esi,bh xor ecx,DWORD [4+esi*8+ebp] shr ebx,16 movzx eax,al xor edx,DWORD [2048+eax*8+ebp] movzx esi,bh mov eax,DWORD [16+esp] xor ecx,edx ror edx,8 xor ecx,DWORD [2048+esi*8+ebp] movzx esi,bl mov ebx,DWORD [12+esp] xor edx,eax xor ecx,DWORD [2052+esi*8+ebp] mov esi,DWORD [24+edi] xor edx,ecx mov DWORD [16+esp],edx xor ecx,ebx mov DWORD [12+esp],ecx xor ecx,esi xor edx,DWORD [28+edi] movzx esi,ch mov ebx,DWORD [2052+esi*8+ebp] movzx esi,cl xor ebx,DWORD [4+esi*8+ebp] shr ecx,16 movzx esi,dl mov eax,DWORD [esi*8+ebp] movzx esi,ch xor ebx,DWORD [esi*8+ebp] movzx esi,dh xor eax,DWORD [4+esi*8+ebp] shr edx,16 movzx ecx,cl xor ebx,DWORD [2048+ecx*8+ebp] movzx esi,dh mov ecx,DWORD [8+esp] xor eax,ebx ror ebx,8 xor eax,DWORD [2048+esi*8+ebp] movzx esi,dl mov edx,DWORD [4+esp] xor ebx,ecx xor eax,DWORD [2052+esi*8+ebp] mov esi,DWORD [32+edi] xor ebx,eax mov DWORD [8+esp],ebx xor eax,edx mov DWORD [4+esp],eax xor eax,esi xor ebx,DWORD [36+edi] movzx esi,ah mov edx,DWORD [2052+esi*8+ebp] movzx esi,al xor edx,DWORD [4+esi*8+ebp] shr eax,16 movzx esi,bl mov ecx,DWORD [esi*8+ebp] movzx esi,ah xor edx,DWORD [esi*8+ebp] movzx esi,bh xor ecx,DWORD [4+esi*8+ebp] shr ebx,16 movzx eax,al xor edx,DWORD [2048+eax*8+ebp] movzx esi,bh mov eax,DWORD [16+esp] xor ecx,edx ror edx,8 xor ecx,DWORD [2048+esi*8+ebp] movzx esi,bl mov ebx,DWORD [12+esp] xor edx,eax xor ecx,DWORD [2052+esi*8+ebp] mov esi,DWORD [40+edi] xor edx,ecx mov DWORD [16+esp],edx xor ecx,ebx mov DWORD [12+esp],ecx xor ecx,esi xor edx,DWORD [44+edi] movzx esi,ch mov ebx,DWORD [2052+esi*8+ebp] movzx esi,cl xor ebx,DWORD [4+esi*8+ebp] shr ecx,16 movzx esi,dl mov eax,DWORD [esi*8+ebp] movzx esi,ch xor ebx,DWORD [esi*8+ebp] movzx esi,dh xor eax,DWORD [4+esi*8+ebp] shr edx,16 movzx ecx,cl xor ebx,DWORD [2048+ecx*8+ebp] movzx esi,dh mov ecx,DWORD [8+esp] xor eax,ebx ror ebx,8 xor eax,DWORD [2048+esi*8+ebp] movzx esi,dl mov edx,DWORD [4+esp] xor ebx,ecx xor eax,DWORD [2052+esi*8+ebp] mov esi,DWORD [48+edi] xor ebx,eax mov DWORD [8+esp],ebx xor eax,edx mov DWORD [4+esp],eax xor eax,esi xor ebx,DWORD [52+edi] movzx esi,ah mov edx,DWORD [2052+esi*8+ebp] movzx esi,al xor edx,DWORD [4+esi*8+ebp] shr eax,16 movzx esi,bl mov ecx,DWORD [esi*8+ebp] movzx esi,ah xor edx,DWORD [esi*8+ebp] movzx esi,bh xor ecx,DWORD [4+esi*8+ebp] shr ebx,16 movzx eax,al xor edx,DWORD [2048+eax*8+ebp] movzx esi,bh mov eax,DWORD [16+esp] xor ecx,edx ror edx,8 xor ecx,DWORD [2048+esi*8+ebp] movzx esi,bl mov ebx,DWORD [12+esp] xor edx,eax xor ecx,DWORD [2052+esi*8+ebp] mov esi,DWORD [56+edi] xor edx,ecx mov DWORD [16+esp],edx xor ecx,ebx mov DWORD [12+esp],ecx xor ecx,esi xor edx,DWORD [60+edi] movzx esi,ch mov ebx,DWORD [2052+esi*8+ebp] movzx esi,cl xor ebx,DWORD [4+esi*8+ebp] shr ecx,16 movzx esi,dl mov eax,DWORD [esi*8+ebp] movzx esi,ch xor ebx,DWORD [esi*8+ebp] movzx esi,dh xor eax,DWORD [4+esi*8+ebp] shr edx,16 movzx ecx,cl xor ebx,DWORD [2048+ecx*8+ebp] movzx esi,dh mov ecx,DWORD [8+esp] xor eax,ebx ror ebx,8 xor eax,DWORD [2048+esi*8+ebp] movzx esi,dl mov edx,DWORD [4+esp] xor ebx,ecx xor eax,DWORD [2052+esi*8+ebp] mov esi,DWORD [64+edi] xor ebx,eax mov DWORD [8+esp],ebx xor eax,edx mov DWORD [4+esp],eax add edi,64 cmp edi,DWORD [20+esp] je NEAR L$003done and esi,eax mov edx,DWORD [16+esp] rol esi,1 mov ecx,edx xor ebx,esi or ecx,DWORD [12+edi] mov DWORD [8+esp],ebx xor ecx,DWORD [12+esp] mov esi,DWORD [4+edi] mov DWORD [12+esp],ecx or esi,ebx and ecx,DWORD [8+edi] xor eax,esi rol ecx,1 mov DWORD [4+esp],eax xor edx,ecx mov esi,DWORD [16+edi] mov DWORD [16+esp],edx jmp NEAR L$002loop align 8 L$003done: mov ecx,eax mov edx,ebx mov eax,DWORD [12+esp] mov ebx,DWORD [16+esp] xor eax,esi xor ebx,DWORD [4+edi] xor ecx,DWORD [8+edi] xor edx,DWORD [12+edi] ret global _Camellia_DecryptBlock_Rounds align 16 _Camellia_DecryptBlock_Rounds: L$_Camellia_DecryptBlock_Rounds_begin: push ebp push ebx push esi push edi mov eax,DWORD [20+esp] mov esi,DWORD [24+esp] mov edi,DWORD [28+esp] mov ebx,esp sub esp,28 and esp,-64 lea ecx,[edi-127] sub ecx,esp neg ecx and ecx,960 sub esp,ecx add esp,4 shl eax,6 mov DWORD [16+esp],edi lea edi,[eax*1+edi] mov DWORD [20+esp],ebx call L$004pic_point L$004pic_point: pop ebp lea ebp,[(L$Camellia_SBOX-L$004pic_point)+ebp] mov eax,DWORD [esi] mov ebx,DWORD [4+esi] mov ecx,DWORD [8+esi] bswap eax mov edx,DWORD [12+esi] bswap ebx bswap ecx bswap edx call __x86_Camellia_decrypt mov esp,DWORD [20+esp] bswap eax mov esi,DWORD [32+esp] bswap ebx bswap ecx bswap edx mov DWORD [esi],eax mov DWORD [4+esi],ebx mov DWORD [8+esi],ecx mov DWORD [12+esi],edx pop edi pop esi pop ebx pop ebp ret global _Camellia_DecryptBlock align 16 _Camellia_DecryptBlock: L$_Camellia_DecryptBlock_begin: mov eax,128 sub eax,DWORD [4+esp] mov eax,3 adc eax,0 mov DWORD [4+esp],eax jmp NEAR L$_Camellia_DecryptBlock_Rounds_begin global _Camellia_decrypt align 16 _Camellia_decrypt: L$_Camellia_decrypt_begin: push ebp push ebx push esi push edi mov esi,DWORD [20+esp] mov edi,DWORD [28+esp] mov ebx,esp sub esp,28 and esp,-64 mov eax,DWORD [272+edi] lea ecx,[edi-127] sub ecx,esp neg ecx and ecx,960 sub esp,ecx add esp,4 shl eax,6 mov DWORD [16+esp],edi lea edi,[eax*1+edi] mov DWORD [20+esp],ebx call L$005pic_point L$005pic_point: pop ebp lea ebp,[(L$Camellia_SBOX-L$005pic_point)+ebp] mov eax,DWORD [esi] mov ebx,DWORD [4+esi] mov ecx,DWORD [8+esi] bswap eax mov edx,DWORD [12+esi] bswap ebx bswap ecx bswap edx call __x86_Camellia_decrypt mov esp,DWORD [20+esp] bswap eax mov esi,DWORD [24+esp] bswap ebx bswap ecx bswap edx mov DWORD [esi],eax mov DWORD [4+esi],ebx mov DWORD [8+esi],ecx mov DWORD [12+esi],edx pop edi pop esi pop ebx pop ebp ret align 16 __x86_Camellia_decrypt: xor eax,DWORD [edi] xor ebx,DWORD [4+edi] xor ecx,DWORD [8+edi] xor edx,DWORD [12+edi] mov esi,DWORD [edi-8] mov DWORD [4+esp],eax mov DWORD [8+esp],ebx mov DWORD [12+esp],ecx mov DWORD [16+esp],edx align 16 L$006loop: xor eax,esi xor ebx,DWORD [edi-4] movzx esi,ah mov edx,DWORD [2052+esi*8+ebp] movzx esi,al xor edx,DWORD [4+esi*8+ebp] shr eax,16 movzx esi,bl mov ecx,DWORD [esi*8+ebp] movzx esi,ah xor edx,DWORD [esi*8+ebp] movzx esi,bh xor ecx,DWORD [4+esi*8+ebp] shr ebx,16 movzx eax,al xor edx,DWORD [2048+eax*8+ebp] movzx esi,bh mov eax,DWORD [16+esp] xor ecx,edx ror edx,8 xor ecx,DWORD [2048+esi*8+ebp] movzx esi,bl mov ebx,DWORD [12+esp] xor edx,eax xor ecx,DWORD [2052+esi*8+ebp] mov esi,DWORD [edi-16] xor edx,ecx mov DWORD [16+esp],edx xor ecx,ebx mov DWORD [12+esp],ecx xor ecx,esi xor edx,DWORD [edi-12] movzx esi,ch mov ebx,DWORD [2052+esi*8+ebp] movzx esi,cl xor ebx,DWORD [4+esi*8+ebp] shr ecx,16 movzx esi,dl mov eax,DWORD [esi*8+ebp] movzx esi,ch xor ebx,DWORD [esi*8+ebp] movzx esi,dh xor eax,DWORD [4+esi*8+ebp] shr edx,16 movzx ecx,cl xor ebx,DWORD [2048+ecx*8+ebp] movzx esi,dh mov ecx,DWORD [8+esp] xor eax,ebx ror ebx,8 xor eax,DWORD [2048+esi*8+ebp] movzx esi,dl mov edx,DWORD [4+esp] xor ebx,ecx xor eax,DWORD [2052+esi*8+ebp] mov esi,DWORD [edi-24] xor ebx,eax mov DWORD [8+esp],ebx xor eax,edx mov DWORD [4+esp],eax xor eax,esi xor ebx,DWORD [edi-20] movzx esi,ah mov edx,DWORD [2052+esi*8+ebp] movzx esi,al xor edx,DWORD [4+esi*8+ebp] shr eax,16 movzx esi,bl mov ecx,DWORD [esi*8+ebp] movzx esi,ah xor edx,DWORD [esi*8+ebp] movzx esi,bh xor ecx,DWORD [4+esi*8+ebp] shr ebx,16 movzx eax,al xor edx,DWORD [2048+eax*8+ebp] movzx esi,bh mov eax,DWORD [16+esp] xor ecx,edx ror edx,8 xor ecx,DWORD [2048+esi*8+ebp] movzx esi,bl mov ebx,DWORD [12+esp] xor edx,eax xor ecx,DWORD [2052+esi*8+ebp] mov esi,DWORD [edi-32] xor edx,ecx mov DWORD [16+esp],edx xor ecx,ebx mov DWORD [12+esp],ecx xor ecx,esi xor edx,DWORD [edi-28] movzx esi,ch mov ebx,DWORD [2052+esi*8+ebp] movzx esi,cl xor ebx,DWORD [4+esi*8+ebp] shr ecx,16 movzx esi,dl mov eax,DWORD [esi*8+ebp] movzx esi,ch xor ebx,DWORD [esi*8+ebp] movzx esi,dh xor eax,DWORD [4+esi*8+ebp] shr edx,16 movzx ecx,cl xor ebx,DWORD [2048+ecx*8+ebp] movzx esi,dh mov ecx,DWORD [8+esp] xor eax,ebx ror ebx,8 xor eax,DWORD [2048+esi*8+ebp] movzx esi,dl mov edx,DWORD [4+esp] xor ebx,ecx xor eax,DWORD [2052+esi*8+ebp] mov esi,DWORD [edi-40] xor ebx,eax mov DWORD [8+esp],ebx xor eax,edx mov DWORD [4+esp],eax xor eax,esi xor ebx,DWORD [edi-36] movzx esi,ah mov edx,DWORD [2052+esi*8+ebp] movzx esi,al xor edx,DWORD [4+esi*8+ebp] shr eax,16 movzx esi,bl mov ecx,DWORD [esi*8+ebp] movzx esi,ah xor edx,DWORD [esi*8+ebp] movzx esi,bh xor ecx,DWORD [4+esi*8+ebp] shr ebx,16 movzx eax,al xor edx,DWORD [2048+eax*8+ebp] movzx esi,bh mov eax,DWORD [16+esp] xor ecx,edx ror edx,8 xor ecx,DWORD [2048+esi*8+ebp] movzx esi,bl mov ebx,DWORD [12+esp] xor edx,eax xor ecx,DWORD [2052+esi*8+ebp] mov esi,DWORD [edi-48] xor edx,ecx mov DWORD [16+esp],edx xor ecx,ebx mov DWORD [12+esp],ecx xor ecx,esi xor edx,DWORD [edi-44] movzx esi,ch mov ebx,DWORD [2052+esi*8+ebp] movzx esi,cl xor ebx,DWORD [4+esi*8+ebp] shr ecx,16 movzx esi,dl mov eax,DWORD [esi*8+ebp] movzx esi,ch xor ebx,DWORD [esi*8+ebp] movzx esi,dh xor eax,DWORD [4+esi*8+ebp] shr edx,16 movzx ecx,cl xor ebx,DWORD [2048+ecx*8+ebp] movzx esi,dh mov ecx,DWORD [8+esp] xor eax,ebx ror ebx,8 xor eax,DWORD [2048+esi*8+ebp] movzx esi,dl mov edx,DWORD [4+esp] xor ebx,ecx xor eax,DWORD [2052+esi*8+ebp] mov esi,DWORD [edi-56] xor ebx,eax mov DWORD [8+esp],ebx xor eax,edx mov DWORD [4+esp],eax sub edi,64 cmp edi,DWORD [20+esp] je NEAR L$007done and esi,eax mov edx,DWORD [16+esp] rol esi,1 mov ecx,edx xor ebx,esi or ecx,DWORD [4+edi] mov DWORD [8+esp],ebx xor ecx,DWORD [12+esp] mov esi,DWORD [12+edi] mov DWORD [12+esp],ecx or esi,ebx and ecx,DWORD [edi] xor eax,esi rol ecx,1 mov DWORD [4+esp],eax xor edx,ecx mov esi,DWORD [edi-8] mov DWORD [16+esp],edx jmp NEAR L$006loop align 8 L$007done: mov ecx,eax mov edx,ebx mov eax,DWORD [12+esp] mov ebx,DWORD [16+esp] xor ecx,esi xor edx,DWORD [12+edi] xor eax,DWORD [edi] xor ebx,DWORD [4+edi] ret global _Camellia_Ekeygen align 16 _Camellia_Ekeygen: L$_Camellia_Ekeygen_begin: push ebp push ebx push esi push edi sub esp,16 mov ebp,DWORD [36+esp] mov esi,DWORD [40+esp] mov edi,DWORD [44+esp] mov eax,DWORD [esi] mov ebx,DWORD [4+esi] mov ecx,DWORD [8+esi] mov edx,DWORD [12+esi] bswap eax bswap ebx bswap ecx bswap edx mov DWORD [edi],eax mov DWORD [4+edi],ebx mov DWORD [8+edi],ecx mov DWORD [12+edi],edx cmp ebp,128 je NEAR L$0081st128 mov eax,DWORD [16+esi] mov ebx,DWORD [20+esi] cmp ebp,192 je NEAR L$0091st192 mov ecx,DWORD [24+esi] mov edx,DWORD [28+esi] jmp NEAR L$0101st256 align 4 L$0091st192: mov ecx,eax mov edx,ebx not ecx not edx align 4 L$0101st256: bswap eax bswap ebx bswap ecx bswap edx mov DWORD [32+edi],eax mov DWORD [36+edi],ebx mov DWORD [40+edi],ecx mov DWORD [44+edi],edx xor eax,DWORD [edi] xor ebx,DWORD [4+edi] xor ecx,DWORD [8+edi] xor edx,DWORD [12+edi] align 4 L$0081st128: call L$011pic_point L$011pic_point: pop ebp lea ebp,[(L$Camellia_SBOX-L$011pic_point)+ebp] lea edi,[(L$Camellia_SIGMA-L$Camellia_SBOX)+ebp] mov esi,DWORD [edi] mov DWORD [esp],eax mov DWORD [4+esp],ebx mov DWORD [8+esp],ecx mov DWORD [12+esp],edx xor eax,esi xor ebx,DWORD [4+edi] movzx esi,ah mov edx,DWORD [2052+esi*8+ebp] movzx esi,al xor edx,DWORD [4+esi*8+ebp] shr eax,16 movzx esi,bl mov ecx,DWORD [esi*8+ebp] movzx esi,ah xor edx,DWORD [esi*8+ebp] movzx esi,bh xor ecx,DWORD [4+esi*8+ebp] shr ebx,16 movzx eax,al xor edx,DWORD [2048+eax*8+ebp] movzx esi,bh mov eax,DWORD [12+esp] xor ecx,edx ror edx,8 xor ecx,DWORD [2048+esi*8+ebp] movzx esi,bl mov ebx,DWORD [8+esp] xor edx,eax xor ecx,DWORD [2052+esi*8+ebp] mov esi,DWORD [8+edi] xor edx,ecx mov DWORD [12+esp],edx xor ecx,ebx mov DWORD [8+esp],ecx xor ecx,esi xor edx,DWORD [12+edi] movzx esi,ch mov ebx,DWORD [2052+esi*8+ebp] movzx esi,cl xor ebx,DWORD [4+esi*8+ebp] shr ecx,16 movzx esi,dl mov eax,DWORD [esi*8+ebp] movzx esi,ch xor ebx,DWORD [esi*8+ebp] movzx esi,dh xor eax,DWORD [4+esi*8+ebp] shr edx,16 movzx ecx,cl xor ebx,DWORD [2048+ecx*8+ebp] movzx esi,dh mov ecx,DWORD [4+esp] xor eax,ebx ror ebx,8 xor eax,DWORD [2048+esi*8+ebp] movzx esi,dl mov edx,DWORD [esp] xor ebx,ecx xor eax,DWORD [2052+esi*8+ebp] mov esi,DWORD [16+edi] xor ebx,eax mov DWORD [4+esp],ebx xor eax,edx mov DWORD [esp],eax mov ecx,DWORD [8+esp] mov edx,DWORD [12+esp] mov esi,DWORD [44+esp] xor eax,DWORD [esi] xor ebx,DWORD [4+esi] xor ecx,DWORD [8+esi] xor edx,DWORD [12+esi] mov esi,DWORD [16+edi] mov DWORD [esp],eax mov DWORD [4+esp],ebx mov DWORD [8+esp],ecx mov DWORD [12+esp],edx xor eax,esi xor ebx,DWORD [20+edi] movzx esi,ah mov edx,DWORD [2052+esi*8+ebp] movzx esi,al xor edx,DWORD [4+esi*8+ebp] shr eax,16 movzx esi,bl mov ecx,DWORD [esi*8+ebp] movzx esi,ah xor edx,DWORD [esi*8+ebp] movzx esi,bh xor ecx,DWORD [4+esi*8+ebp] shr ebx,16 movzx eax,al xor edx,DWORD [2048+eax*8+ebp] movzx esi,bh mov eax,DWORD [12+esp] xor ecx,edx ror edx,8 xor ecx,DWORD [2048+esi*8+ebp] movzx esi,bl mov ebx,DWORD [8+esp] xor edx,eax xor ecx,DWORD [2052+esi*8+ebp] mov esi,DWORD [24+edi] xor edx,ecx mov DWORD [12+esp],edx xor ecx,ebx mov DWORD [8+esp],ecx xor ecx,esi xor edx,DWORD [28+edi] movzx esi,ch mov ebx,DWORD [2052+esi*8+ebp] movzx esi,cl xor ebx,DWORD [4+esi*8+ebp] shr ecx,16 movzx esi,dl mov eax,DWORD [esi*8+ebp] movzx esi,ch xor ebx,DWORD [esi*8+ebp] movzx esi,dh xor eax,DWORD [4+esi*8+ebp] shr edx,16 movzx ecx,cl xor ebx,DWORD [2048+ecx*8+ebp] movzx esi,dh mov ecx,DWORD [4+esp] xor eax,ebx ror ebx,8 xor eax,DWORD [2048+esi*8+ebp] movzx esi,dl mov edx,DWORD [esp] xor ebx,ecx xor eax,DWORD [2052+esi*8+ebp] mov esi,DWORD [32+edi] xor ebx,eax mov DWORD [4+esp],ebx xor eax,edx mov DWORD [esp],eax mov ecx,DWORD [8+esp] mov edx,DWORD [12+esp] mov esi,DWORD [36+esp] cmp esi,128 jne NEAR L$0122nd256 mov edi,DWORD [44+esp] lea edi,[128+edi] mov DWORD [edi-112],eax mov DWORD [edi-108],ebx mov DWORD [edi-104],ecx mov DWORD [edi-100],edx mov ebp,eax shl eax,15 mov esi,ebx shr esi,17 shl ebx,15 or eax,esi mov esi,ecx shl ecx,15 mov DWORD [edi-80],eax shr esi,17 or ebx,esi shr ebp,17 mov esi,edx shr esi,17 mov DWORD [edi-76],ebx shl edx,15 or ecx,esi or edx,ebp mov DWORD [edi-72],ecx mov DWORD [edi-68],edx mov ebp,eax shl eax,15 mov esi,ebx shr esi,17 shl ebx,15 or eax,esi mov esi,ecx shl ecx,15 mov DWORD [edi-64],eax shr esi,17 or ebx,esi shr ebp,17 mov esi,edx shr esi,17 mov DWORD [edi-60],ebx shl edx,15 or ecx,esi or edx,ebp mov DWORD [edi-56],ecx mov DWORD [edi-52],edx mov ebp,eax shl eax,15 mov esi,ebx shr esi,17 shl ebx,15 or eax,esi mov esi,ecx shl ecx,15 mov DWORD [edi-32],eax shr esi,17 or ebx,esi shr ebp,17 mov esi,edx shr esi,17 mov DWORD [edi-28],ebx shl edx,15 or ecx,esi or edx,ebp mov ebp,eax shl eax,15 mov esi,ebx shr esi,17 shl ebx,15 or eax,esi mov esi,ecx shl ecx,15 mov DWORD [edi-16],eax shr esi,17 or ebx,esi shr ebp,17 mov esi,edx shr esi,17 mov DWORD [edi-12],ebx shl edx,15 or ecx,esi or edx,ebp mov DWORD [edi-8],ecx mov DWORD [edi-4],edx mov ebp,ebx shl ebx,2 mov esi,ecx shr esi,30 shl ecx,2 or ebx,esi mov esi,edx shl edx,2 mov DWORD [32+edi],ebx shr esi,30 or ecx,esi shr ebp,30 mov esi,eax shr esi,30 mov DWORD [36+edi],ecx shl eax,2 or edx,esi or eax,ebp mov DWORD [40+edi],edx mov DWORD [44+edi],eax mov ebp,ebx shl ebx,17 mov esi,ecx shr esi,15 shl ecx,17 or ebx,esi mov esi,edx shl edx,17 mov DWORD [64+edi],ebx shr esi,15 or ecx,esi shr ebp,15 mov esi,eax shr esi,15 mov DWORD [68+edi],ecx shl eax,17 or edx,esi or eax,ebp mov DWORD [72+edi],edx mov DWORD [76+edi],eax mov ebx,DWORD [edi-128] mov ecx,DWORD [edi-124] mov edx,DWORD [edi-120] mov eax,DWORD [edi-116] mov ebp,ebx shl ebx,15 mov esi,ecx shr esi,17 shl ecx,15 or ebx,esi mov esi,edx shl edx,15 mov DWORD [edi-96],ebx shr esi,17 or ecx,esi shr ebp,17 mov esi,eax shr esi,17 mov DWORD [edi-92],ecx shl eax,15 or edx,esi or eax,ebp mov DWORD [edi-88],edx mov DWORD [edi-84],eax mov ebp,ebx shl ebx,30 mov esi,ecx shr esi,2 shl ecx,30 or ebx,esi mov esi,edx shl edx,30 mov DWORD [edi-48],ebx shr esi,2 or ecx,esi shr ebp,2 mov esi,eax shr esi,2 mov DWORD [edi-44],ecx shl eax,30 or edx,esi or eax,ebp mov DWORD [edi-40],edx mov DWORD [edi-36],eax mov ebp,ebx shl ebx,15 mov esi,ecx shr esi,17 shl ecx,15 or ebx,esi mov esi,edx shl edx,15 shr esi,17 or ecx,esi shr ebp,17 mov esi,eax shr esi,17 shl eax,15 or edx,esi or eax,ebp mov DWORD [edi-24],edx mov DWORD [edi-20],eax mov ebp,ebx shl ebx,17 mov esi,ecx shr esi,15 shl ecx,17 or ebx,esi mov esi,edx shl edx,17 mov DWORD [edi],ebx shr esi,15 or ecx,esi shr ebp,15 mov esi,eax shr esi,15 mov DWORD [4+edi],ecx shl eax,17 or edx,esi or eax,ebp mov DWORD [8+edi],edx mov DWORD [12+edi],eax mov ebp,ebx shl ebx,17 mov esi,ecx shr esi,15 shl ecx,17 or ebx,esi mov esi,edx shl edx,17 mov DWORD [16+edi],ebx shr esi,15 or ecx,esi shr ebp,15 mov esi,eax shr esi,15 mov DWORD [20+edi],ecx shl eax,17 or edx,esi or eax,ebp mov DWORD [24+edi],edx mov DWORD [28+edi],eax mov ebp,ebx shl ebx,17 mov esi,ecx shr esi,15 shl ecx,17 or ebx,esi mov esi,edx shl edx,17 mov DWORD [48+edi],ebx shr esi,15 or ecx,esi shr ebp,15 mov esi,eax shr esi,15 mov DWORD [52+edi],ecx shl eax,17 or edx,esi or eax,ebp mov DWORD [56+edi],edx mov DWORD [60+edi],eax mov eax,3 jmp NEAR L$013done align 16 L$0122nd256: mov esi,DWORD [44+esp] mov DWORD [48+esi],eax mov DWORD [52+esi],ebx mov DWORD [56+esi],ecx mov DWORD [60+esi],edx xor eax,DWORD [32+esi] xor ebx,DWORD [36+esi] xor ecx,DWORD [40+esi] xor edx,DWORD [44+esi] mov esi,DWORD [32+edi] mov DWORD [esp],eax mov DWORD [4+esp],ebx mov DWORD [8+esp],ecx mov DWORD [12+esp],edx xor eax,esi xor ebx,DWORD [36+edi] movzx esi,ah mov edx,DWORD [2052+esi*8+ebp] movzx esi,al xor edx,DWORD [4+esi*8+ebp] shr eax,16 movzx esi,bl mov ecx,DWORD [esi*8+ebp] movzx esi,ah xor edx,DWORD [esi*8+ebp] movzx esi,bh xor ecx,DWORD [4+esi*8+ebp] shr ebx,16 movzx eax,al xor edx,DWORD [2048+eax*8+ebp] movzx esi,bh mov eax,DWORD [12+esp] xor ecx,edx ror edx,8 xor ecx,DWORD [2048+esi*8+ebp] movzx esi,bl mov ebx,DWORD [8+esp] xor edx,eax xor ecx,DWORD [2052+esi*8+ebp] mov esi,DWORD [40+edi] xor edx,ecx mov DWORD [12+esp],edx xor ecx,ebx mov DWORD [8+esp],ecx xor ecx,esi xor edx,DWORD [44+edi] movzx esi,ch mov ebx,DWORD [2052+esi*8+ebp] movzx esi,cl xor ebx,DWORD [4+esi*8+ebp] shr ecx,16 movzx esi,dl mov eax,DWORD [esi*8+ebp] movzx esi,ch xor ebx,DWORD [esi*8+ebp] movzx esi,dh xor eax,DWORD [4+esi*8+ebp] shr edx,16 movzx ecx,cl xor ebx,DWORD [2048+ecx*8+ebp] movzx esi,dh mov ecx,DWORD [4+esp] xor eax,ebx ror ebx,8 xor eax,DWORD [2048+esi*8+ebp] movzx esi,dl mov edx,DWORD [esp] xor ebx,ecx xor eax,DWORD [2052+esi*8+ebp] mov esi,DWORD [48+edi] xor ebx,eax mov DWORD [4+esp],ebx xor eax,edx mov DWORD [esp],eax mov ecx,DWORD [8+esp] mov edx,DWORD [12+esp] mov edi,DWORD [44+esp] lea edi,[128+edi] mov DWORD [edi-112],eax mov DWORD [edi-108],ebx mov DWORD [edi-104],ecx mov DWORD [edi-100],edx mov ebp,eax shl eax,30 mov esi,ebx shr esi,2 shl ebx,30 or eax,esi mov esi,ecx shl ecx,30 mov DWORD [edi-48],eax shr esi,2 or ebx,esi shr ebp,2 mov esi,edx shr esi,2 mov DWORD [edi-44],ebx shl edx,30 or ecx,esi or edx,ebp mov DWORD [edi-40],ecx mov DWORD [edi-36],edx mov ebp,eax shl eax,30 mov esi,ebx shr esi,2 shl ebx,30 or eax,esi mov esi,ecx shl ecx,30 mov DWORD [32+edi],eax shr esi,2 or ebx,esi shr ebp,2 mov esi,edx shr esi,2 mov DWORD [36+edi],ebx shl edx,30 or ecx,esi or edx,ebp mov DWORD [40+edi],ecx mov DWORD [44+edi],edx mov ebp,ebx shl ebx,19 mov esi,ecx shr esi,13 shl ecx,19 or ebx,esi mov esi,edx shl edx,19 mov DWORD [128+edi],ebx shr esi,13 or ecx,esi shr ebp,13 mov esi,eax shr esi,13 mov DWORD [132+edi],ecx shl eax,19 or edx,esi or eax,ebp mov DWORD [136+edi],edx mov DWORD [140+edi],eax mov ebx,DWORD [edi-96] mov ecx,DWORD [edi-92] mov edx,DWORD [edi-88] mov eax,DWORD [edi-84] mov ebp,ebx shl ebx,15 mov esi,ecx shr esi,17 shl ecx,15 or ebx,esi mov esi,edx shl edx,15 mov DWORD [edi-96],ebx shr esi,17 or ecx,esi shr ebp,17 mov esi,eax shr esi,17 mov DWORD [edi-92],ecx shl eax,15 or edx,esi or eax,ebp mov DWORD [edi-88],edx mov DWORD [edi-84],eax mov ebp,ebx shl ebx,15 mov esi,ecx shr esi,17 shl ecx,15 or ebx,esi mov esi,edx shl edx,15 mov DWORD [edi-64],ebx shr esi,17 or ecx,esi shr ebp,17 mov esi,eax shr esi,17 mov DWORD [edi-60],ecx shl eax,15 or edx,esi or eax,ebp mov DWORD [edi-56],edx mov DWORD [edi-52],eax mov ebp,ebx shl ebx,30 mov esi,ecx shr esi,2 shl ecx,30 or ebx,esi mov esi,edx shl edx,30 mov DWORD [16+edi],ebx shr esi,2 or ecx,esi shr ebp,2 mov esi,eax shr esi,2 mov DWORD [20+edi],ecx shl eax,30 or edx,esi or eax,ebp mov DWORD [24+edi],edx mov DWORD [28+edi],eax mov ebp,ecx shl ecx,2 mov esi,edx shr esi,30 shl edx,2 or ecx,esi mov esi,eax shl eax,2 mov DWORD [80+edi],ecx shr esi,30 or edx,esi shr ebp,30 mov esi,ebx shr esi,30 mov DWORD [84+edi],edx shl ebx,2 or eax,esi or ebx,ebp mov DWORD [88+edi],eax mov DWORD [92+edi],ebx mov ecx,DWORD [edi-80] mov edx,DWORD [edi-76] mov eax,DWORD [edi-72] mov ebx,DWORD [edi-68] mov ebp,ecx shl ecx,15 mov esi,edx shr esi,17 shl edx,15 or ecx,esi mov esi,eax shl eax,15 mov DWORD [edi-80],ecx shr esi,17 or edx,esi shr ebp,17 mov esi,ebx shr esi,17 mov DWORD [edi-76],edx shl ebx,15 or eax,esi or ebx,ebp mov DWORD [edi-72],eax mov DWORD [edi-68],ebx mov ebp,ecx shl ecx,30 mov esi,edx shr esi,2 shl edx,30 or ecx,esi mov esi,eax shl eax,30 mov DWORD [edi-16],ecx shr esi,2 or edx,esi shr ebp,2 mov esi,ebx shr esi,2 mov DWORD [edi-12],edx shl ebx,30 or eax,esi or ebx,ebp mov DWORD [edi-8],eax mov DWORD [edi-4],ebx mov DWORD [64+edi],edx mov DWORD [68+edi],eax mov DWORD [72+edi],ebx mov DWORD [76+edi],ecx mov ebp,edx shl edx,17 mov esi,eax shr esi,15 shl eax,17 or edx,esi mov esi,ebx shl ebx,17 mov DWORD [96+edi],edx shr esi,15 or eax,esi shr ebp,15 mov esi,ecx shr esi,15 mov DWORD [100+edi],eax shl ecx,17 or ebx,esi or ecx,ebp mov DWORD [104+edi],ebx mov DWORD [108+edi],ecx mov edx,DWORD [edi-128] mov eax,DWORD [edi-124] mov ebx,DWORD [edi-120] mov ecx,DWORD [edi-116] mov ebp,eax shl eax,13 mov esi,ebx shr esi,19 shl ebx,13 or eax,esi mov esi,ecx shl ecx,13 mov DWORD [edi-32],eax shr esi,19 or ebx,esi shr ebp,19 mov esi,edx shr esi,19 mov DWORD [edi-28],ebx shl edx,13 or ecx,esi or edx,ebp mov DWORD [edi-24],ecx mov DWORD [edi-20],edx mov ebp,eax shl eax,15 mov esi,ebx shr esi,17 shl ebx,15 or eax,esi mov esi,ecx shl ecx,15 mov DWORD [edi],eax shr esi,17 or ebx,esi shr ebp,17 mov esi,edx shr esi,17 mov DWORD [4+edi],ebx shl edx,15 or ecx,esi or edx,ebp mov DWORD [8+edi],ecx mov DWORD [12+edi],edx mov ebp,eax shl eax,17 mov esi,ebx shr esi,15 shl ebx,17 or eax,esi mov esi,ecx shl ecx,17 mov DWORD [48+edi],eax shr esi,15 or ebx,esi shr ebp,15 mov esi,edx shr esi,15 mov DWORD [52+edi],ebx shl edx,17 or ecx,esi or edx,ebp mov DWORD [56+edi],ecx mov DWORD [60+edi],edx mov ebp,ebx shl ebx,2 mov esi,ecx shr esi,30 shl ecx,2 or ebx,esi mov esi,edx shl edx,2 mov DWORD [112+edi],ebx shr esi,30 or ecx,esi shr ebp,30 mov esi,eax shr esi,30 mov DWORD [116+edi],ecx shl eax,2 or edx,esi or eax,ebp mov DWORD [120+edi],edx mov DWORD [124+edi],eax mov eax,4 L$013done: lea edx,[144+edi] add esp,16 pop edi pop esi pop ebx pop ebp ret global _private_Camellia_set_key align 16 _private_Camellia_set_key: L$_private_Camellia_set_key_begin: push ebx mov ecx,DWORD [8+esp] mov ebx,DWORD [12+esp] mov edx,DWORD [16+esp] mov eax,-1 test ecx,ecx jz NEAR L$014done test edx,edx jz NEAR L$014done mov eax,-2 cmp ebx,256 je NEAR L$015arg_ok cmp ebx,192 je NEAR L$015arg_ok cmp ebx,128 jne NEAR L$014done align 4 L$015arg_ok: push edx push ecx push ebx call L$_Camellia_Ekeygen_begin add esp,12 mov DWORD [edx],eax xor eax,eax align 4 L$014done: pop ebx ret align 64 L$Camellia_SIGMA: dd 2694735487,1003262091,3061508184,1286239154,3337565999,3914302142,1426019237,4057165596,283453434,3731369245,2958461122,3018244605,0,0,0,0 align 64 L$Camellia_SBOX: dd 1886416896,1886388336 dd 2189591040,741081132 dd 741092352,3014852787 dd 3974949888,3233808576 dd 3014898432,3840147684 dd 656877312,1465319511 dd 3233857536,3941204202 dd 3857048832,2930639022 dd 3840205824,589496355 dd 2240120064,1802174571 dd 1465341696,1162149957 dd 892679424,2779054245 dd 3941263872,3991732461 dd 202116096,1330577487 dd 2930683392,488439837 dd 1094795520,2459041938 dd 589505280,2256928902 dd 4025478912,2947481775 dd 1802201856,2088501372 dd 2475922176,522125343 dd 1162167552,1044250686 dd 421075200,3705405660 dd 2779096320,1583218782 dd 555819264,185270283 dd 3991792896,2795896998 dd 235802112,960036921 dd 1330597632,3587506389 dd 1313754624,1566376029 dd 488447232,3654877401 dd 1701143808,1515847770 dd 2459079168,1364262993 dd 3183328512,1819017324 dd 2256963072,2341142667 dd 3099113472,2593783962 dd 2947526400,4227531003 dd 2408550144,2964324528 dd 2088532992,1953759348 dd 3958106880,724238379 dd 522133248,4042260720 dd 3469659648,2223243396 dd 1044266496,3755933919 dd 808464384,3419078859 dd 3705461760,875823156 dd 1600085760,1987444854 dd 1583242752,1835860077 dd 3318072576,2846425257 dd 185273088,3520135377 dd 437918208,67371012 dd 2795939328,336855060 dd 3789676800,976879674 dd 960051456,3739091166 dd 3402287616,286326801 dd 3587560704,842137650 dd 1195853568,2627469468 dd 1566399744,1397948499 dd 1027423488,4075946226 dd 3654932736,4278059262 dd 16843008,3486449871 dd 1515870720,3284336835 dd 3604403712,2054815866 dd 1364283648,606339108 dd 1448498688,3907518696 dd 1819044864,1616904288 dd 1296911616,1768489065 dd 2341178112,2863268010 dd 218959104,2694840480 dd 2593823232,2711683233 dd 1717986816,1650589794 dd 4227595008,1414791252 dd 3435973632,505282590 dd 2964369408,3772776672 dd 757935360,1684275300 dd 1953788928,269484048 dd 303174144,0 dd 724249344,2745368739 dd 538976256,1970602101 dd 4042321920,2324299914 dd 2981212416,3873833190 dd 2223277056,151584777 dd 2576980224,3722248413 dd 3755990784,2273771655 dd 1280068608,2206400643 dd 3419130624,3452764365 dd 3267543552,2425356432 dd 875836416,1936916595 dd 2122219008,4143317238 dd 1987474944,2644312221 dd 84215040,3216965823 dd 1835887872,1381105746 dd 3082270464,3638034648 dd 2846468352,3368550600 dd 825307392,3334865094 dd 3520188672,2172715137 dd 387389184,1869545583 dd 67372032,320012307 dd 3621246720,1667432547 dd 336860160,3924361449 dd 1482184704,2812739751 dd 976894464,2677997727 dd 1633771776,3166437564 dd 3739147776,690552873 dd 454761216,4193845497 dd 286331136,791609391 dd 471604224,3031695540 dd 842150400,2021130360 dd 252645120,101056518 dd 2627509248,3890675943 dd 370546176,1903231089 dd 1397969664,3570663636 dd 404232192,2880110763 dd 4076007936,2290614408 dd 572662272,2374828173 dd 4278124032,1920073842 dd 1145324544,3115909305 dd 3486502656,4177002744 dd 2998055424,2896953516 dd 3284386560,909508662 dd 3048584448,707395626 dd 2054846976,1010565180 dd 2442236160,4059103473 dd 606348288,1077936192 dd 134744064,3553820883 dd 3907577856,3149594811 dd 2829625344,1128464451 dd 1616928768,353697813 dd 4244438016,2913796269 dd 1768515840,2004287607 dd 1347440640,2155872384 dd 2863311360,2189557890 dd 3503345664,3974889708 dd 2694881280,656867367 dd 2105376000,3856990437 dd 2711724288,2240086149 dd 2307492096,892665909 dd 1650614784,202113036 dd 2543294208,1094778945 dd 1414812672,4025417967 dd 1532713728,2475884691 dd 505290240,421068825 dd 2509608192,555810849 dd 3772833792,235798542 dd 4294967040,1313734734 dd 1684300800,1701118053 dd 3537031680,3183280317 dd 269488128,3099066552 dd 3301229568,2408513679 dd 0,3958046955 dd 1212696576,3469607118 dd 2745410304,808452144 dd 4160222976,1600061535 dd 1970631936,3318022341 dd 3688618752,437911578 dd 2324335104,3789619425 dd 50529024,3402236106 dd 3873891840,1195835463 dd 3671775744,1027407933 dd 151587072,16842753 dd 1061109504,3604349142 dd 3722304768,1448476758 dd 2492765184,1296891981 dd 2273806080,218955789 dd 1549556736,1717960806 dd 2206434048,3435921612 dd 33686016,757923885 dd 3452816640,303169554 dd 1246382592,538968096 dd 2425393152,2981167281 dd 858993408,2576941209 dd 1936945920,1280049228 dd 1734829824,3267494082 dd 4143379968,2122186878 dd 4092850944,84213765 dd 2644352256,3082223799 dd 2139062016,825294897 dd 3217014528,387383319 dd 3806519808,3621191895 dd 1381126656,1482162264 dd 2610666240,1633747041 dd 3638089728,454754331 dd 640034304,471597084 dd 3368601600,252641295 dd 926365440,370540566 dd 3334915584,404226072 dd 993737472,572653602 dd 2172748032,1145307204 dd 2526451200,2998010034 dd 1869573888,3048538293 dd 1263225600,2442199185 dd 320017152,134742024 dd 3200171520,2829582504 dd 1667457792,4244373756 dd 774778368,1347420240 dd 3924420864,3503292624 dd 2038003968,2105344125 dd 2812782336,2307457161 dd 2358021120,2543255703 dd 2678038272,1532690523 dd 1852730880,2509570197 dd 3166485504,4294902015 dd 2391707136,3536978130 dd 690563328,3301179588 dd 4126536960,1212678216 dd 4193908992,4160159991 dd 3065427456,3688562907 dd 791621376,50528259 dd 4261281024,3671720154 dd 3031741440,1061093439 dd 1499027712,2492727444 dd 2021160960,1549533276 dd 2560137216,33685506 dd 101058048,1246363722 dd 1785358848,858980403 dd 3890734848,1734803559 dd 1179010560,4092788979 dd 1903259904,2139029631 dd 3132799488,3806462178 dd 3570717696,2610626715 dd 623191296,640024614 dd 2880154368,926351415 dd 1111638528,993722427 dd 2290649088,2526412950 dd 2728567296,1263206475 dd 2374864128,3200123070 dd 4210752000,774766638 dd 1920102912,2037973113 dd 117901056,2357985420 dd 3115956480,1852702830 dd 1431655680,2391670926 dd 4177065984,4126474485 dd 4008635904,3065381046 dd 2896997376,4261216509 dd 168430080,1499005017 dd 909522432,2560098456 dd 1229539584,1785331818 dd 707406336,1178992710 dd 1751672832,3132752058 dd 1010580480,623181861 dd 943208448,1111621698 dd 4059164928,2728525986 dd 2762253312,4210688250 dd 1077952512,117899271 dd 673720320,1431634005 dd 3553874688,4008575214 dd 2071689984,168427530 dd 3149642496,1229520969 dd 3385444608,1751646312 dd 1128481536,943194168 dd 3250700544,2762211492 dd 353703168,673710120 dd 3823362816,2071658619 dd 2913840384,3385393353 dd 4109693952,3250651329 dd 2004317952,3823304931 dd 3351758592,4109631732 dd 2155905024,3351707847 dd 2661195264,2661154974 dd 14737632,939538488 dd 328965,1090535745 dd 5789784,369104406 dd 14277081,1979741814 dd 6776679,3640711641 dd 5131854,2466288531 dd 8487297,1610637408 dd 13355979,4060148466 dd 13224393,1912631922 dd 723723,3254829762 dd 11447982,2868947883 dd 6974058,2583730842 dd 14013909,1962964341 dd 1579032,100664838 dd 6118749,1459640151 dd 8553090,2684395680 dd 4605510,2432733585 dd 14671839,4144035831 dd 14079702,3036722613 dd 2565927,3372272073 dd 9079434,2717950626 dd 3289650,2348846220 dd 4934475,3523269330 dd 4342338,2415956112 dd 14408667,4127258358 dd 1842204,117442311 dd 10395294,2801837991 dd 10263708,654321447 dd 3815994,2382401166 dd 13290186,2986390194 dd 2434341,1224755529 dd 8092539,3724599006 dd 855309,1124090691 dd 7434609,1543527516 dd 6250335,3607156695 dd 2039583,3338717127 dd 16316664,1040203326 dd 14145495,4110480885 dd 4079166,2399178639 dd 10329501,1728079719 dd 8158332,520101663 dd 6316128,402659352 dd 12171705,1845522030 dd 12500670,2936057775 dd 12369084,788541231 dd 9145227,3791708898 dd 1447446,2231403909 dd 3421236,218107149 dd 5066061,1392530259 dd 12829635,4026593520 dd 7500402,2617285788 dd 9803157,1694524773 dd 11250603,3925928682 dd 9342606,2734728099 dd 12237498,2919280302 dd 8026746,2650840734 dd 11776947,3959483628 dd 131586,2147516544 dd 11842740,754986285 dd 11382189,1795189611 dd 10658466,2818615464 dd 11316396,721431339 dd 14211288,905983542 dd 10132122,2785060518 dd 1513239,3305162181 dd 1710618,2248181382 dd 3487029,1291865421 dd 13421772,855651123 dd 16250871,4244700669 dd 10066329,1711302246 dd 6381921,1476417624 dd 5921370,2516620950 dd 15263976,973093434 dd 2368548,150997257 dd 5658198,2499843477 dd 4210752,268439568 dd 14803425,2013296760 dd 6513507,3623934168 dd 592137,1107313218 dd 3355443,3422604492 dd 12566463,4009816047 dd 10000536,637543974 dd 9934743,3842041317 dd 8750469,1627414881 dd 6842472,436214298 dd 16579836,1056980799 dd 15527148,989870907 dd 657930,2181071490 dd 14342874,3053500086 dd 7303023,3674266587 dd 5460819,3556824276 dd 6447714,2550175896 dd 10724259,3892373736 dd 3026478,2332068747 dd 526344,33554946 dd 11513775,3942706155 dd 2631720,167774730 dd 11579568,738208812 dd 7631988,486546717 dd 12763842,2952835248 dd 12434877,1862299503 dd 3552822,2365623693 dd 2236962,2281736328 dd 3684408,234884622 dd 6579300,419436825 dd 1973790,2264958855 dd 3750201,1308642894 dd 2894892,184552203 dd 10921638,2835392937 dd 3158064,201329676 dd 15066597,2030074233 dd 4473924,285217041 dd 16645629,2130739071 dd 8947848,570434082 dd 10461087,3875596263 dd 6645093,1493195097 dd 8882055,3774931425 dd 7039851,3657489114 dd 16053492,1023425853 dd 2302755,3355494600 dd 4737096,301994514 dd 1052688,67109892 dd 13750737,1946186868 dd 5329233,1409307732 dd 12632256,805318704 dd 16382457,2113961598 dd 13816530,3019945140 dd 10526880,671098920 dd 5592405,1426085205 dd 10592673,1744857192 dd 4276545,1342197840 dd 16448250,3187719870 dd 4408131,3489714384 dd 1250067,3288384708 dd 12895428,822096177 dd 3092271,3405827019 dd 11053224,704653866 dd 11974326,2902502829 dd 3947580,251662095 dd 2829099,3389049546 dd 12698049,1879076976 dd 16777215,4278255615 dd 13158600,838873650 dd 10855845,1761634665 dd 2105376,134219784 dd 9013641,1644192354 dd 0,0 dd 9474192,603989028 dd 4671303,3506491857 dd 15724527,4211145723 dd 15395562,3120609978 dd 12040119,3976261101 dd 1381653,1157645637 dd 394758,2164294017 dd 13487565,1929409395 dd 11908533,1828744557 dd 1184274,2214626436 dd 8289918,2667618207 dd 12303291,3993038574 dd 2697513,1241533002 dd 986895,3271607235 dd 12105912,771763758 dd 460551,3238052289 dd 263172,16777473 dd 10197915,3858818790 dd 9737364,620766501 dd 2171169,1207978056 dd 6710886,2566953369 dd 15132390,3103832505 dd 13553358,3003167667 dd 15592941,2063629179 dd 15198183,4177590777 dd 3881787,3456159438 dd 16711422,3204497343 dd 8355711,3741376479 dd 12961221,1895854449 dd 10790052,687876393 dd 3618615,3439381965 dd 11645361,1811967084 dd 5000268,318771987 dd 9539985,1677747300 dd 7237230,2600508315 dd 9276813,1660969827 dd 7763574,2634063261 dd 197379,3221274816 dd 2960685,1258310475 dd 14606046,3070277559 dd 9868950,2768283045 dd 2500134,2298513801 dd 8224125,1593859935 dd 13027014,2969612721 dd 6052956,385881879 dd 13882323,4093703412 dd 15921906,3154164924 dd 5197647,3540046803 dd 1644825,1174423110 dd 4144959,3472936911 dd 14474460,922761015 dd 7960953,1577082462 dd 1907997,1191200583 dd 5395026,2483066004 dd 15461355,4194368250 dd 15987699,4227923196 dd 7171437,1526750043 dd 6184542,2533398423 dd 16514043,4261478142 dd 6908265,1509972570 dd 11711154,2885725356 dd 15790320,1006648380 dd 3223857,1275087948 dd 789516,50332419 dd 13948116,889206069 dd 13619151,4076925939 dd 9211020,587211555 dd 14869218,3087055032 dd 7697781,1560304989 dd 11119017,1778412138 dd 4868682,2449511058 dd 5723991,3573601749 dd 8684676,553656609 dd 1118481,1140868164 dd 4539717,1358975313 dd 1776411,3321939654 dd 16119285,2097184125 dd 15000804,956315961 dd 921102,2197848963 dd 7566195,3691044060 dd 11184810,2852170410 dd 15856113,2080406652 dd 14540253,1996519287 dd 5855577,1442862678 dd 1315860,83887365 dd 7105644,452991771 dd 9605778,2751505572 dd 5526612,352326933 dd 13684944,872428596 dd 7895160,503324190 dd 7368816,469769244 dd 14935011,4160813304 dd 4802889,1375752786 dd 8421504,536879136 dd 5263440,335549460 dd 10987431,3909151209 dd 16185078,3170942397 dd 7829367,3707821533 dd 9671571,3825263844 dd 8816262,2701173153 dd 8618883,3758153952 dd 2763306,2315291274 dd 13092807,4043370993 dd 5987163,3590379222 dd 15329769,2046851706 dd 15658734,3137387451 dd 9408399,3808486371 dd 65793,1073758272 dd 4013373,1325420367 global _Camellia_cbc_encrypt align 16 _Camellia_cbc_encrypt: L$_Camellia_cbc_encrypt_begin: push ebp push ebx push esi push edi mov ecx,DWORD [28+esp] cmp ecx,0 je NEAR L$016enc_out pushfd cld mov eax,DWORD [24+esp] mov ebx,DWORD [28+esp] mov edx,DWORD [36+esp] mov ebp,DWORD [40+esp] lea esi,[esp-64] and esi,-64 lea edi,[edx-127] sub edi,esi neg edi and edi,960 sub esi,edi mov edi,DWORD [44+esp] xchg esp,esi add esp,4 mov DWORD [20+esp],esi mov DWORD [24+esp],eax mov DWORD [28+esp],ebx mov DWORD [32+esp],ecx mov DWORD [36+esp],edx mov DWORD [40+esp],ebp call L$017pic_point L$017pic_point: pop ebp lea ebp,[(L$Camellia_SBOX-L$017pic_point)+ebp] mov esi,32 align 4 L$018prefetch_sbox: mov eax,DWORD [ebp] mov ebx,DWORD [32+ebp] mov ecx,DWORD [64+ebp] mov edx,DWORD [96+ebp] lea ebp,[128+ebp] dec esi jnz NEAR L$018prefetch_sbox mov eax,DWORD [36+esp] sub ebp,4096 mov esi,DWORD [24+esp] mov edx,DWORD [272+eax] cmp edi,0 je NEAR L$019DECRYPT mov ecx,DWORD [32+esp] mov edi,DWORD [40+esp] shl edx,6 lea edx,[edx*1+eax] mov DWORD [16+esp],edx test ecx,4294967280 jz NEAR L$020enc_tail mov eax,DWORD [edi] mov ebx,DWORD [4+edi] align 4 L$021enc_loop: mov ecx,DWORD [8+edi] mov edx,DWORD [12+edi] xor eax,DWORD [esi] xor ebx,DWORD [4+esi] xor ecx,DWORD [8+esi] bswap eax xor edx,DWORD [12+esi] bswap ebx mov edi,DWORD [36+esp] bswap ecx bswap edx call __x86_Camellia_encrypt mov esi,DWORD [24+esp] mov edi,DWORD [28+esp] bswap eax bswap ebx bswap ecx mov DWORD [edi],eax bswap edx mov DWORD [4+edi],ebx mov DWORD [8+edi],ecx mov DWORD [12+edi],edx mov ecx,DWORD [32+esp] lea esi,[16+esi] mov DWORD [24+esp],esi lea edx,[16+edi] mov DWORD [28+esp],edx sub ecx,16 test ecx,4294967280 mov DWORD [32+esp],ecx jnz NEAR L$021enc_loop test ecx,15 jnz NEAR L$020enc_tail mov esi,DWORD [40+esp] mov ecx,DWORD [8+edi] mov edx,DWORD [12+edi] mov DWORD [esi],eax mov DWORD [4+esi],ebx mov DWORD [8+esi],ecx mov DWORD [12+esi],edx mov esp,DWORD [20+esp] popfd L$016enc_out: pop edi pop esi pop ebx pop ebp ret pushfd align 4 L$020enc_tail: mov eax,edi mov edi,DWORD [28+esp] push eax mov ebx,16 sub ebx,ecx cmp edi,esi je NEAR L$022enc_in_place align 4 dd 2767451785 jmp NEAR L$023enc_skip_in_place L$022enc_in_place: lea edi,[ecx*1+edi] L$023enc_skip_in_place: mov ecx,ebx xor eax,eax align 4 dd 2868115081 pop edi mov esi,DWORD [28+esp] mov eax,DWORD [edi] mov ebx,DWORD [4+edi] mov DWORD [32+esp],16 jmp NEAR L$021enc_loop align 16 L$019DECRYPT: shl edx,6 lea edx,[edx*1+eax] mov DWORD [16+esp],eax mov DWORD [36+esp],edx cmp esi,DWORD [28+esp] je NEAR L$024dec_in_place mov edi,DWORD [40+esp] mov DWORD [44+esp],edi align 4 L$025dec_loop: mov eax,DWORD [esi] mov ebx,DWORD [4+esi] mov ecx,DWORD [8+esi] bswap eax mov edx,DWORD [12+esi] bswap ebx mov edi,DWORD [36+esp] bswap ecx bswap edx call __x86_Camellia_decrypt mov edi,DWORD [44+esp] mov esi,DWORD [32+esp] bswap eax bswap ebx bswap ecx xor eax,DWORD [edi] bswap edx xor ebx,DWORD [4+edi] xor ecx,DWORD [8+edi] xor edx,DWORD [12+edi] sub esi,16 jc NEAR L$026dec_partial mov DWORD [32+esp],esi mov esi,DWORD [24+esp] mov edi,DWORD [28+esp] mov DWORD [edi],eax mov DWORD [4+edi],ebx mov DWORD [8+edi],ecx mov DWORD [12+edi],edx mov DWORD [44+esp],esi lea esi,[16+esi] mov DWORD [24+esp],esi lea edi,[16+edi] mov DWORD [28+esp],edi jnz NEAR L$025dec_loop mov edi,DWORD [44+esp] L$027dec_end: mov esi,DWORD [40+esp] mov eax,DWORD [edi] mov ebx,DWORD [4+edi] mov ecx,DWORD [8+edi] mov edx,DWORD [12+edi] mov DWORD [esi],eax mov DWORD [4+esi],ebx mov DWORD [8+esi],ecx mov DWORD [12+esi],edx jmp NEAR L$028dec_out align 4 L$026dec_partial: lea edi,[44+esp] mov DWORD [edi],eax mov DWORD [4+edi],ebx mov DWORD [8+edi],ecx mov DWORD [12+edi],edx lea ecx,[16+esi] mov esi,edi mov edi,DWORD [28+esp] dd 2767451785 mov edi,DWORD [24+esp] jmp NEAR L$027dec_end align 4 L$024dec_in_place: L$029dec_in_place_loop: lea edi,[44+esp] mov eax,DWORD [esi] mov ebx,DWORD [4+esi] mov ecx,DWORD [8+esi] mov edx,DWORD [12+esi] mov DWORD [edi],eax mov DWORD [4+edi],ebx mov DWORD [8+edi],ecx bswap eax mov DWORD [12+edi],edx bswap ebx mov edi,DWORD [36+esp] bswap ecx bswap edx call __x86_Camellia_decrypt mov edi,DWORD [40+esp] mov esi,DWORD [28+esp] bswap eax bswap ebx bswap ecx xor eax,DWORD [edi] bswap edx xor ebx,DWORD [4+edi] xor ecx,DWORD [8+edi] xor edx,DWORD [12+edi] mov DWORD [esi],eax mov DWORD [4+esi],ebx mov DWORD [8+esi],ecx mov DWORD [12+esi],edx lea esi,[16+esi] mov DWORD [28+esp],esi lea esi,[44+esp] mov eax,DWORD [esi] mov ebx,DWORD [4+esi] mov ecx,DWORD [8+esi] mov edx,DWORD [12+esi] mov DWORD [edi],eax mov DWORD [4+edi],ebx mov DWORD [8+edi],ecx mov DWORD [12+edi],edx mov esi,DWORD [24+esp] lea esi,[16+esi] mov DWORD [24+esp],esi mov ecx,DWORD [32+esp] sub ecx,16 jc NEAR L$030dec_in_place_partial mov DWORD [32+esp],ecx jnz NEAR L$029dec_in_place_loop jmp NEAR L$028dec_out align 4 L$030dec_in_place_partial: mov edi,DWORD [28+esp] lea esi,[44+esp] lea edi,[ecx*1+edi] lea esi,[16+ecx*1+esi] neg ecx dd 2767451785 align 4 L$028dec_out: mov esp,DWORD [20+esp] popfd pop edi pop esi pop ebx pop ebp ret db 67,97,109,101,108,108,105,97,32,102,111,114,32,120,56,54 db 32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115 db 115,108,46,111,114,103,62,0
19.060169
141
0.737784
[ "MIT" ]
King19931229/KApp
Dependency/Python27/externals/openssl-1.0.2q/tmp32/cmll-x86.asm
44,982
Assembly
.global s_prepare_buffers s_prepare_buffers: push %r11 push %r12 push %r13 push %r8 push %r9 push %rdi push %rdx lea addresses_D_ht+0x1a2b3, %r12 nop nop nop add $32990, %r9 movb $0x61, (%r12) nop sub $26015, %r11 lea addresses_A_ht+0x14db9, %rdx nop add %r9, %r9 mov $0x6162636465666768, %rdi movq %rdi, %xmm2 movups %xmm2, (%rdx) add %r9, %r9 lea addresses_D_ht+0x6d39, %r8 nop nop nop cmp %r13, %r13 movb (%r8), %dl nop nop nop nop xor $35471, %r13 pop %rdx pop %rdi pop %r9 pop %r8 pop %r13 pop %r12 pop %r11 ret .global s_faulty_load s_faulty_load: push %r10 push %r8 push %r9 push %rax push %rsi // Faulty Load lea addresses_UC+0x195b9, %rsi clflush (%rsi) nop nop cmp %rax, %rax vmovups (%rsi), %ymm6 vextracti128 $1, %ymm6, %xmm6 vpextrq $0, %xmm6, %r9 lea oracles, %r10 and $0xff, %r9 shlq $12, %r9 mov (%r10,%r9,1), %r9 pop %rsi pop %rax pop %r9 pop %r8 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_UC', 'size': 16, 'AVXalign': True}, 'OP': 'LOAD'} [Faulty Load] {'src': {'same': True, 'congruent': 0, 'NT': False, 'type': 'addresses_UC', 'size': 32, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'same': False, 'congruent': 1, 'NT': False, 'type': 'addresses_D_ht', 'size': 1, 'AVXalign': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 11, 'NT': False, 'type': 'addresses_A_ht', 'size': 16, 'AVXalign': False}} {'src': {'same': False, 'congruent': 5, 'NT': False, 'type': 'addresses_D_ht', 'size': 1, 'AVXalign': False}, 'OP': 'LOAD'} {'37': 21829} 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 */
53.267442
2,999
0.659026
[ "MIT" ]
danielmgmi/medusa
Transynther/_processed/NONE/_xt_/i3-7100_9_0xca_notsx.log_21829_1238.asm
4,581
Assembly
; ************************************************** ; PSGlib - C programming library for the SEGA PSG ; ( part of devkitSMS - github.com/sverx/devkitSMS ) ; ************************************************** INCLUDE "PSGlib_private.inc" ; fundamental vars SECTION data_clib SECTION data_PSGlib PUBLIC __PSGlib_MusicStatus __PSGlib_MusicStatus: defb PSG_STOPPED ; are we playing a background music? SECTION bss_clib SECTION bss_PSGlib PUBLIC __PSGlib_MusicStart PUBLIC __PSGlib_MusicPointer PUBLIC __PSGlib_MusicLoopPoint PUBLIC __PSGlib_MusicSkipFrames PUBLIC __PSGlib_LoopFlag PUBLIC __PSGlib_MusicLastLatch PUBLIC __PSGlib_MusicVolumeAttenuation __PSGlib_MusicStart: defw 0 ; the pointer to the beginning of music __PSGlib_MusicPointer: defw 0 ; the pointer to the current __PSGlib_MusicLoopPoint: ; the pointer to the loop begin defw 0 __PSGlib_MusicSkipFrames: defb 0 ; the frames we need to skip __PSGlib_LoopFlag: defb 0 ; the tune should loop or not (flag) __PSGlib_MusicLastLatch: defb 0 ; the last PSG music latch __PSGlib_MusicVolumeAttenuation: defb 0 ; the volume attenuation applied to the tune (0-15) ; decompression vars SECTION bss_clib SECTION bss_PSGlib PUBLIC __PSGlib_MusicSubstringLen PUBLIC __PSGlib_MusicSubstringRetAddr __PSGlib_MusicSubstringLen: defb 0 ; length of the substring we are playing __PSGlib_MusicSubstringRetAddr: defw 0 ; return to this address when substring is over ; volume/frequency buffering SECTION bss_clib SECTION bss_PSGlib PUBLIC __PSGlib_Chan0Volume PUBLIC __PSGlib_Chan1Volume PUBLIC __PSGlib_Chan2Volume PUBLIC __PSGlib_Chan3Volume PUBLIC __PSGlib_Chan2LowTone PUBLIC __PSGlib_Chan3LowTone PUBLIC __PSGlib_Chan2HighTone __PSGlib_Chan0Volume: defb 0 ; the volume for channel 0 __PSGlib_Chan1Volume: defb 0 ; the volume for channel 1 __PSGlib_Chan2Volume: defb 0 ; the volume for channel 2 __PSGlib_Chan3Volume: defb 0 ; the volume for channel 3 __PSGlib_Chan2LowTone: defb 0 ; the low tone bits for channels 2 __PSGlib_Chan3LowTone: defb 0 ; the low tone bits for channels 3 __PSGlib_Chan2HighTone: defb 0 ; the high tone bits for channel 2 ; flags for channels 2-3 access SECTION bss_clib SECTION bss_PSGlib PUBLIC __PSGlib_Channel2SFX PUBLIC __PSGlib_Channel3SFX __PSGlib_Channel2SFX: defb 0 ; !0 means channel 2 is allocated to SFX __PSGlib_Channel3SFX: defb 0 ; !0 means channel 3 is allocated to SFX ; volume/frequency buffering for SFX SECTION bss_clib SECTION bss_PSGlib PUBLIC __PSGlib_SFXChan2Volume PUBLIC __PSGlib_SFXChan3Volume __PSGlib_SFXChan2Volume: defb 0 ; the volume for SFX channel 2 __PSGlib_SFXChan3Volume: defb 0 ; the volume for SFX channel 3 ; fundamental vars for SFX SECTION data_clib SECTION data_PSGlib PUBLIC __PSGlib_SFXStatus __PSGlib_SFXStatus: defb PSG_STOPPED ; are we playing a SFX? SECTION bss_clib SECTION bss_PSGlib PUBLIC __PSGlib_SFXStart PUBLIC __PSGlib_SFXPointer PUBLIC __PSGlib_SFXLoopPoint PUBLIC __PSGlib_SFXSkipFrames PUBLIC __PSGlib_SFXLoopFlag __PSGlib_SFXStart: defw 0 ; the pointer to the beginning of SFX __PSGlib_SFXPointer: defw 0 ; the pointer to the current address __PSGlib_SFXLoopPoint: defw 0 ; the pointer to the loop begin __PSGlib_SFXSkipFrames: defb 0 ; the frames we need to skip __PSGlib_SFXLoopFlag: defb 0 ; the SFX should loop or not (flag) ; decompression vars for SDX SECTION bss_clib SECTION bss_PSGlib PUBLIC __PSGlib_SFXSubstringLen PUBLIC __PSGlib_SFXSubstringRetAddr __PSGlib_SFXSubstringLen: defb 0 ; length of the substring we are playing __PSGlib_SFXSubstringRetAddr: defw 0 ; return to this address when substring is over
24.705202
82
0.680861
[ "BSD-2-Clause" ]
ByteProject/Puddle-BuildTools
FictionTools/z88dk/libsrc/_DEVELOPMENT/arch/sms/PSGlib/z80/__PSGlib_variables.asm
4,274
Assembly
; A019445: Form a permutation of the positive integers, p_1, p_2, ..., such that the average of each initial segment is an integer, using the greedy algorithm to define p_n; sequence gives p_1+..+p_n. ; Submitted by Jon Maiga ; 1,4,6,12,20,24,35,40,54,70,77,96,117,126,150,160,187,216,228,260,273,308,345,360,400,442,459,504,522,570,620,640,693,748,770,828,851,912,975,1000,1066,1092,1161,1232,1260,1334,1410,1440,1519,1550 mov $1,$0 seq $0,19446 ; a(n) = ceiling(n/tau), where tau = (1+sqrt(5))/2. mul $1,$0 add $0,$1
57.777778
200
0.709615
[ "Apache-2.0" ]
ckrause/loda-programs
oeis/019/A019445.asm
520
Assembly
; void SMS_loadTiles(void *src, unsigned int tilefrom, unsigned int size) SECTION code_clib SECTION code_SMSlib PUBLIC SMS_loadTiles EXTERN asm_SMSlib_loadTiles SMS_loadTiles: pop af pop bc pop hl pop de push de push hl push bc push af jp asm_SMSlib_loadTiles
13.043478
73
0.72
[ "BSD-2-Clause" ]
ByteProject/Puddle-BuildTools
FictionTools/z88dk/libsrc/_DEVELOPMENT/arch/sms/SMSlib/c/sccz80/SMS_loadTiles.asm
300
Assembly
; A235877: Number of (n+1) X (1+1) 0..2 arrays with the minimum plus the upper median equal to the lower median plus the maximum in every 2 X 2 subblock. ; 21,51,129,339,921,2571,7329,21219,62121,183291,543729,1618899,4832121,14447211,43243329,129533379,388206921,1163834331,3489930129,10466644659,31393642521,94168344651,282479868129,847389272739,2542067154921,7626000138171,22877597761329,68631987977619,205894353320121,617679838734891,1853033073753729,5559086336359299 add $0,2 mov $1,3 lpb $0,1 sub $0,1 add $1,$2 trn $2,$1 mul $1,2 add $2,$1 add $3,3 sub $2,$3 add $3,$1 lpe add $1,3
35.647059
317
0.759076
[ "Apache-2.0" ]
karttu/loda
programs/oeis/235/A235877.asm
606
Assembly
SECTION code_clib SECTION code_fp_math48 PUBLIC cm48_sdcciyp_dread1, cm48_sdcciyp_dread2 EXTERN cm48_sdcciyp_dload cm48_sdcciyp_dread2: ; sdcc float primitive ; Read two sdcc floats from the stack ; ; Covert from sdcc float format to math48 format. ; ; enter : stack = sdcc_float right, sdcc_float left, ret1, ret0 ; ; exit : AC'= double left (math48) ; AC = double right (math48) ; ; uses : af, bc, de, hl, bc', de', hl' ld hl,8 add hl,sp call cm48_sdcciyp_dload cm48_sdcciyp_dread1: ld hl,4 add hl,sp jp cm48_sdcciyp_dload ; AC = right ; AC'= left
17.243243
66
0.648903
[ "BSD-2-Clause" ]
ByteProject/Puddle-BuildTools
FictionTools/z88dk/libsrc/_DEVELOPMENT/math/float/math48/c/sdcc_iy/cm48_sdcciyp_dread.asm
638
Assembly
global GetGs global clearTrapFlag section .text ; makes this executable USE64 clearTrapFlag: PUSHF AND word [rsp], 0FEFFh POPF ret GetGs : mov rax, gs ret
9.444444
37
0.717647
[ "MIT" ]
fplu/Flow
src/Flow/_Miscellaneous.asm
170
Assembly
;nasm 2.11.08 section .data hello: db 'Hello world!',10 ; 'Hello world!' plus a linefeed character helloLen: equ $-hello ; Length of the 'Hello world!' string section .text global _start _start: mov eax,4 ; The system call for write (sys_write) mov ebx,1 ; File descriptor 1 - standard output mov ecx,hello ; Put the offset of hello in ecx mov edx,helloLen ; helloLen is a constant, so we don't need to say ; mov edx,[helloLen] to get it's actual value int 80h ; Call the kernel dec edx dec edx dec edx mov eax,4 ; The system call for write (sys_write) mov ebx,1 ; File descriptor 1 - standard output mov ecx,hello ; Put the offset of hello in ecx int 80h ; Call the kernel mov eax,1 ; The system call for exit (sys_exit) mov ebx,0 ; Exit with return code of 0 (no error) int 80h;
31.612903
81
0.585714
[ "Unlicense" ]
SonarSystems/Assembly-Programming
[6] Arithmetic Instructions/Decrement Command (DEC)/main.asm
980
Assembly
; A024025: a(n) = 3^n-n^2. ; 1,2,5,18,65,218,693,2138,6497,19602,58949,177026,531297,1594154,4782773,14348682,43046465,129139874,387420165,1162261106,3486784001,10460352762,31381059125,94143178298,282429535905,847288608818,2541865827653,7625597484258,22876792454177,68630377364042,205891132093749,617673396282986,1853020188850817,5559060566554434,16677181699665413,50031545098998482,150094635296997825,450283905890995994,1350851717672990645,4052555153018974746,12157665459056927201,36472996377170784722,109418989131512357445,328256967394537075778,984770902183611230945,2954312706550833696618,8862938119652501093813,26588814358957503285578,79766443076872509861057,239299329230617529587682,717897987691852588767749,2153693963075557766308146,6461081889226673298929537,19383245667680019896793914,58149737003040059690387253,174449211009120179071167482,523347633027360537213508385,1570042899082081611640531314,4710128697246244834921600325,14130386091738734504764807586,42391158275216203514294429601,127173474825648610542883295882,381520424476945831628649894965,1144561273430837494885949692458,3433683820292512484657849085185,10301051460877537453973547263618,30903154382632612361920641799173,92709463147897837085761925406098,278128389443693511257285776227137,834385168331080533771857328690522,2503155504993241601315571986080949,7509466514979724803946715958252506,22528399544939174411840147874767457,67585198634817523235520443624312594,202755595904452569706561330872948293,608266787713357709119683992618855682 mov $1,3 pow $1,$0 mov $2,$0 mul $2,$0 sub $1,$2 mov $0,$1
156.2
1,474
0.921895
[ "Apache-2.0" ]
ckrause/cm
programs/oeis/024/A024025.asm
1,562
Assembly