hexsha
stringlengths
40
40
size
int64
6
1.05M
ext
stringclasses
3 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
232
max_stars_repo_name
stringlengths
7
106
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
7
max_stars_count
int64
1
33.5k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
232
max_issues_repo_name
stringlengths
7
106
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
7
max_issues_count
int64
1
37.5k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
232
max_forks_repo_name
stringlengths
7
106
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
7
max_forks_count
int64
1
12.6k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
6
1.05M
avg_line_length
float64
1.16
19.7k
max_line_length
int64
2
938k
alphanum_fraction
float64
0
1
255256a92e2a9257ecf0854f4eb280444d053338
748
asm
Assembly
test/run_ccc.asm
iccicci/cc-c
686e3a87cb5cc4f18f4ece3a1bf9ac629c4ea915
[ "MIT" ]
1
2020-07-29T00:35:26.000Z
2020-07-29T00:35:26.000Z
test/run_ccc.asm
iccicci/cc-c
686e3a87cb5cc4f18f4ece3a1bf9ac629c4ea915
[ "MIT" ]
5
2020-01-13T16:26:03.000Z
2021-03-24T16:54:53.000Z
test/run_ccc.asm
iccicci/cc-c
686e3a87cb5cc4f18f4ece3a1bf9ac629c4ea915
[ "MIT" ]
null
null
null
.code 0x00 // sp .data jump_to_main: .code main jump .data contract: .code 0x00 calldataload 0xe0 shr // sp signature dup1 0x6438a68d eq g_ jumpi invalid g_: pop // sp g_return // sp g_return dup2 // sp g_return &*sp dup3 32 add // sp_opig g_return &*sp_orig sp 32 4 dup3 calldatacopy 32 add // sp_opig g_return &*sp_orig new_sp swap1 // sp_opig g_return new_sp &*sp_orig g jump g_return: // sp 32 swap1 return g: // pc sp &ret swap1 // pc &ret sp 32 swap1 sub mload // pc &ret a 23 add // pc &ret a+23 swap1 // pc a+23 &ret mstore // pc jump main: // sp main 0 0 codecopy contract // sp contract jump_to_main // sp contract jump_to_main loop: 0x5B dup2 mstore8 1 add // sp contract jump_to_main+1 dup2 dup2 eq iszero loop jumpi main 0 return
9.468354
42
0.719251
12fb82e94631ff1c5abfcf7018e5082af1db149b
572
asm
Assembly
oeis/269/A269790.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/269/A269790.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/269/A269790.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A269790: Primes p such that 2*p + 79 is a square. ; Submitted by Christian Krause ; 73,181,2341,4861,6121,9901,12601,18973,20161,26641,47701,51481,59473,61561,68041,79561,81973,84421,94573,110881,157321,185401,192781,207973,231841,244261,248473,270073,292573,335341,365473,440821,446473,452161,475273 mov $1,9 mov $2,332202 lpb $2 mul $6,4 mov $3,$6 seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0. sub $0,$3 add $1,9 mov $4,$0 max $4,0 cmp $4,$0 mul $2,$4 sub $2,18 add $5,$1 mov $6,$5 lpe mov $0,$6 mul $0,4 add $0,1
23.833333
218
0.683566
556373fcd4264f1f15c9085b7fe254071d18100a
177
asm
Assembly
src/third_party/nasm/travis/test/align13.asm
Mr-Sheep/naiveproxy
9f6e9768295f6d1d41517a15a621d4756bd7d6be
[ "BSD-3-Clause" ]
2,219
2018-03-26T02:57:34.000Z
2022-03-31T00:27:59.000Z
src/third_party/nasm/travis/test/align13.asm
Mr-Sheep/naiveproxy
9f6e9768295f6d1d41517a15a621d4756bd7d6be
[ "BSD-3-Clause" ]
395
2020-04-18T08:22:18.000Z
2021-12-08T13:04:49.000Z
src/third_party/nasm/travis/test/align13.asm
Mr-Sheep/naiveproxy
9f6e9768295f6d1d41517a15a621d4756bd7d6be
[ "BSD-3-Clause" ]
473
2019-03-24T16:34:23.000Z
2022-03-31T02:01:05.000Z
; Test of non-power-of-2 alignment bits 32 inc eax inc eax align 13 inc eax inc eax align 13 inc eax inc eax align 13 align 13 ;should do nothing inc eax inc eax
10.411765
34
0.694915
3c6f2fa5884c8589fb7d162d6d022881d1e78979
790
asm
Assembly
oeis/171/A171064.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/171/A171064.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/171/A171064.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A171064: G.f.: -x*(x-1)*(1+x)/(1-x-7*x^2-x^3+x^4). ; Submitted by Christian Krause ; 0,1,1,7,15,64,175,631,1905,6433,20224,66529,212625,692119,2226799,7217728,23284815,75343591,243328225,786800449,2542156800,8217744577,26556314401,85835882791,277405671375,896595420736,2897714688751,9365452422487,30268644993105,97827931218529,316176183904000,1021874895004321,3302667468557745,10674139986273463,34498510977277999,111498283454745664,360359332813407375,1164671687987631559,3764186790158950849,12165749655431033473,39319369541717913600,127079132231906467201,410716281889203945025 lpb $0 sub $0,1 add $1,$3 sub $3,$2 add $4,$2 add $4,$3 sub $4,$5 add $4,1 add $4,$2 mov $5,$4 mov $4,$2 mov $2,$3 add $2,$1 add $4,$1 add $5,$4 mov $3,$5 add $5,1 lpe mov $0,$3
32.916667
493
0.746835
9f2fee598fa40b94c35eff4657523e3e7e2a5065
1,573
asm
Assembly
programs/oeis/090/A090993.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/090/A090993.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/090/A090993.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A090993: Number of meaningful differential operations of the n-th order on the space R^8. ; 8,14,24,42,72,126,216,378,648,1134,1944,3402,5832,10206,17496,30618,52488,91854,157464,275562,472392,826686,1417176,2480058,4251528,7440174,12754584,22320522,38263752,66961566,114791256,200884698,344373768,602654094,1033121304,1807962282,3099363912,5423886846,9298091736,16271660538,27894275208,48814981614,83682825624,146444944842,251048476872,439334834526,753145430616,1318004503578,2259436291848,3954013510734,6778308875544,11862040532202,20334926626632,35586121596606,61004779879896,106758364789818,183014339639688,320275094369454,549043018919064,960825283108362,1647129056757192,2882475849325086,4941387170271576,8647427547975258,14824161510814728,25942282643925774,44472484532444184,77826847931777322,133417453597332552,233480543795331966,400252360791997656,700441631385995898,1200757082375992968,2101324894157987694,3602271247127978904,6303974682473963082,10806813741383936712,18911924047421889246,32420441224151810136,56735772142265667738,97261323672455430408,170207316426797003214,291783971017366291224,510621949280391009642,875351913052098873672,1531865847841173028926,2626055739156296621016,4595597543523519086778,7878167217468889863048,13786792630570557260334,23634501652406669589144,41360377891711671781002,70903504957220008767432,124081133675135015343006,212710514871660026302296,372243401025405046029018,638131544614980078906888,1116730203076215138087054,1914394633844940236720664,3350190609228645414261162 seq $0,228879 ; a(n+2) = 3*a(n), starting 4,7. mul $0,2
262.166667
1,423
0.905912
786721ce2a6167f4ac0fec62d9a5b463f9105cfa
480
asm
Assembly
programs/oeis/218/A218447.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/218/A218447.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/218/A218447.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A218447: a(n) = Sum_{k>=0} floor(n/(5*k + 4)). ; 0,0,0,0,1,1,1,1,2,3,3,3,4,4,5,5,6,6,7,8,9,9,9,9,11,11,11,12,14,15,15,15,16,16,17,17,19,19,20,21,22,22,23,23,25,26,26,26,28,29,29,29,30,30,32,32,34,35,36,37,38,38,38,39,41,41,41,41,43,44,45,45,48,48,49,49,51,51,52,53,54,55,55,55,58,58,58,59,61,62,63,63,64,64,65,66,68,68,70,72 mov $2,$0 mov $3,$0 lpb $2 mov $0,$3 sub $2,1 sub $0,$2 seq $0,1899 ; Number of divisors of n of form 5k+4; a(0) = 0. add $1,$0 lpe mov $0,$1
34.285714
277
0.585417
7ed6b4fceb6dbe2431dff054331ed73f8f8d1c0d
55,088
asm
Assembly
Library/Spool/Lib/libPaper.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
504
2018-11-18T03:35:53.000Z
2022-03-29T01:02:51.000Z
Library/Spool/Lib/libPaper.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
96
2018-11-19T21:06:50.000Z
2022-03-06T10:26:48.000Z
Library/Spool/Lib/libPaper.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
73
2018-11-19T20:46:53.000Z
2022-03-29T00:59:26.000Z
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright (c) GeoWorks 1992 -- All Rights Reserved PROJECT: PC GEOS MODULE: Lib/Spool - PC/GEOS Spool Library FILE: libPaper.asm AUTHOR: Don Reeves, Jan 20, 1992 ROUTINES: Name Description ---- ----------- GLB SpoolGetNumPaperSizes Get the number of defined paper sizes GLB SpoolGetPaperString Fill a buffer with the nth paper size string GLB SpoolGetPaperSize Return the dimensions of the nth paper size GLB SpoolConvertPaperSize Match a type, width & height with a defined size GLB SpoolGetPaperSizeOrder Return the current order array GLB SpoolSetPaperSizeOrder Change the order paper sizes appear in lists GLB SpoolCreatePaperSize Create a new paper size GLB SpoolDeletePaperSize Delete a user-created paper size INT DeletePaperSizeCallBack Callback routine for deleting a paper size GLB SpoolSetDefaultPageSizeInfo Set the default page size information GLB SpoolGetDefaultPageSizeInfo Get the default page size information INT InitPaperResource Initialize the PageSizeData resource INT ConvertFromDefaultOrder Convert a default order string to an order array INT ConvertToDefaultOrder Convert a default order array to an order string INT CopyPaperSizeCategory Copy the initial paper size category INT GetPaperSizeInfo Get information about a paper size INT CopyPreDefinedString - Copy a pre-defined string into a buffer INT CopyUserDefinedString - Copy a user-defined string into a buffer INT GetPreDefinedSize - Get dimensions of a pre-defined string INT GetUserDefinedSize - Get dimensions of a user-defined string INT EnumPageSizeInfo Enumerate through default PageSizeInfo INT ReadPageSizeInfoValue Read a single default PageSizeInfo value INT WritePageSizeInfoValue Write a single default PageSizeInfo value INT InitFilePageSizeInfo Read/Write default PageSizeInfo to/from initfile INT AsciiToHexWord Convert an ascii string to a word of hex INT HexToThreeDigitAscii Convert a hex byte to a 3-character ascii string INT GetUserDefinedCount Get count of user-defined paper sizes INT GetUserDefinedNumber Get paper number based on initfile number INT LockStringsDS Lock (& possibly update) the PageSizeData INT UnlockStrings Unlock the PageSizeData resource INT InitFileAlterInteger Alter (+/- value) an integer in the initfile EC ECVerifyPageType Verify the passed PageType REVISION HISTORY: Name Date Description ---- ---- ----------- Don 1/20/92 Initial revision DESCRIPTION: Impelements the procedures that deal with paper size definitions for PC/GEOS $Id: libPaper.asm,v 1.1 97/04/07 11:11:04 newdeal Exp $ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ SpoolPaper segment resource COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% AsciiToHexWord %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Converts a three character ASCII string to a hexadecimal value. CALLED BY: ConvertFromDefaultOrder PASS: DS:SI = Character string CX = # of digits to convert, or -1 for null-terminated RETURN: DS:SI = Points past source AX = Hexadecimal value DESTROYED: Nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Don 1/24/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ AsciiToHexWord proc near uses dx .enter ; Perform the conversion, please ; clr dx ; partial result = 0 convertLoop: LocalGetChar ax, dssi LocalIsNull ax ; NULL-terminator ?? jz done ; yes, so we're done sub al, '0' ; convert to hex SBCS < clr ah > shl dx, 1 add ax, dx shl dx, 1 shl dx, 1 add dx, ax ; 10 * result + new => DX loop convertLoop done: mov_tr ax, dx ; result => AX .leave ret AsciiToHexWord endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LockStringsDS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Lock the PageSizeData resource CALLED BY: INTERNAL PASS: Nothing RETURN: DS = PageSizeData segment BX = PageSizeData handle DESTROYED: Nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Don 9/10/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ LockStringsDS proc near uses ax, es .enter ; ; grab semaphore so someone else doesn't try to access our ; PageSizeData while we're building it out ; mov bx, segment dgroup mov es, bx PSem es, pageSizeDataSem, TRASH_AX_BX ; ; If this is the first time through, must duplicate PageSizeData ; mov bx, es:[pageSizeDataHandle] tst bx jz duplicateIt ; ; lock our PageSizeData, but it may be discarded ; call MemLock jnc haveMem ; not duplicated ; ; our PageSizeData was discarded, free current handle and duplicate ; PageSizeData template ; call MemFree duplicateIt: mov bx, handle PageSizeData call GeodeDuplicateResource ; bx = duplicate mov ax, handle 0 ; owned by spool, please call HandleModifyOwner mov es:[pageSizeDataHandle], bx call MemLock ; ax = pageSizeDataHandle seg call InitPaperResource ; ds = pageSizeDataHandle seg ; (updated) mov ax, mask HF_DISCARDABLE call MemModifyFlags ; after init, mark discardable mov ax, ds ; ax = pageSizeDataHandle seg haveMem: mov ds, ax VSem es, pageSizeDataSem, TRASH_AX .leave ret LockStringsDS endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% UnlockStrings %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Unlock the PageSizeData resource CALLED BY: INTERNAL PASS: Nothing RETURN: Nothing DESTROYED: BX PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Don 9/10/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ UnlockStrings proc near uses ds .enter mov bx, segment dgroup mov ds, bx mov bx, ds:[pageSizeDataHandle] call MemUnlock .leave ret UnlockStrings endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% WritePageSizeInfoValue %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Write a value into the .INI file & the strings resource CALLED BY: EnumPageSizeInfo PASS: DS = PageSizeData segment ES:DI = Source word CS:BP = PageSizeInfoEntry RETURN: DI = DI + 2 DESTROYED: AX, BX PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Don 9/10/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ WritePageSizeInfoValue proc near .enter ; Read the value from the chunk, converting from ASCII ; mov bx, -1 ; perform a write mov ax, es:[di] ; data => AX call InitFilePageSizeInfo add di, 2 ; go to the next word ; Skip the high word for PSR_width & PSR_height ; cmp bp, offset pageLayoutInfoTable jae exit add di, 2 ; skip the high word exit: .leave ret WritePageSizeInfoValue endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ReadPageSizeInfoValue %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Write a value from the strings resource into the destination CALLED BY: EnumPageSizeInfo PASS: DS = PageSizeData segment ES:DI = Destination word CS:BP = PageSizeInfoEntry RETURN: DI = DI + 2 DESTROYED: AX PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: We don't buffer the information in our own segment, so we go to the .INI file for every read. REVISION HISTORY: Name Date Description ---- ---- ----------- Don 9/10/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ReadPageSizeInfoValue proc near uses cx, si .enter ; Read the value from the chunk, converting from ASCII ; clr bx ; perform a read call InitFilePageSizeInfo ; read data from initfile jnc done mov si, cs:[bp].PSIE_chunkHandle mov si, ds:[si] ; ascii string => DS:SI mov cx, -1 ; convert entire string call AsciiToHexWord done: stosw ; store the value away ; Write zero for the high word of PSR_width & PSR_height ; cmp bp, offset pageLayoutInfoTable jae exit clr ax stosw exit: .leave ret ReadPageSizeInfoValue endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SpoolSetDefaultPageSizeInfo %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Set the default page information CALLED BY: GLOBAL PASS: DS:SI = PageSizeReport structure RETURN: Nothing DESTROYED: Nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Don 9/10/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ SpoolSetDefaultPageSizeInfo proc far if FULL_EXECUTE_IN_PLACE EC< push bx > EC< mov bx, ds > EC< call ECAssertValidFarPointerXIP > EC< pop bx > endif push di mov di, offset WritePageSizeInfoValue call EnumPageSizeInfo pop di ret SpoolSetDefaultPageSizeInfo endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SpoolGetDefaultPageSizeInfo %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Get the default page information CALLED BY: GLOBAL PASS: DS:SI = PageSizeReport buffer RETURN: DS:SI = PageSizeReport filled DESTROYED: Nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Don 9/10/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ SpoolGetDefaultPageSizeInfo proc far push di mov di, offset ReadPageSizeInfoValue call EnumPageSizeInfo pop di ret SpoolGetDefaultPageSizeInfo endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% InitFilePageSizeInfo %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Read a value from the initfile, and store in a chunk CALLED BY: Read/WritePageSizeInfoValue PASS: CS:BP = PageSizeInfoEntry BX = 0 (read) or -1 (write) AX = Data (for write) RETURN: Carry = Clear (success) - or - Carry = Set (error) DESTROYED: Nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Don 9/10/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ InitFilePageSizeInfo proc near uses cx, dx, bp, si, ds .enter ; Attempt to read in the string ; .assert (segment spoolCategoryString eq @CurSeg) segmov ds, cs, cx mov si, offset spoolCategoryString mov dx, cs:[bp].PSIE_initFileKey tst bx jnz write call InitFileReadInteger done: .leave ret ; Write out to the .INI file write: mov_tr bp, ax call InitFileWriteInteger jmp done InitFilePageSizeInfo endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% EnumPageSizeInfo %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Process the PageSizeInfo structure, either reading it in & storing its values in chunks, or writing to the structure the default values. CALLED BY: SpoolSet/GetDefaultPageSizeInfo PASS: DS:SI = Data (passed to callback in ES:DI) DI = Function to call for read/write function MUST be in the SpoolPaper resource Pass: ES:DI = Passed DS:SI DS = PageSizeData resource May Destroy: AX, BX RETURN: Nothing DESTROYED: Nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Don 9/10/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ .assert (segment paperWidthKeyString eq @CurSeg) .assert (segment paperHeightKeyString eq @CurSeg) .assert (segment paperLayoutKeyString eq @CurSeg) .assert (segment defaultMarginLeftKey eq @CurSeg) .assert (segment defaultMarginTopKey eq @CurSeg) .assert (segment defaultMarginRightKey eq @CurSeg) .assert (segment defaultMarginBottomKey eq @CurSeg) pageSizeInfoTable PageSizeInfoEntry \ <paperWidthKeyString, defaultWidthChunk>, <paperHeightKeyString, defaultHeightChunk> pageLayoutInfoTable PageSizeInfoEntry \ <paperLayoutKeyString, defaultLayoutChunk>, <defaultMarginLeftKey, defaultMarginLeftChunk>, <defaultMarginTopKey, defaultMarginTopChunk>, <defaultMarginRightKey, defaultMarginRightChunk>, <defaultMarginBottomKey,defaultMarginBottomChunk> EnumPageSizeInfo proc near uses ax, bx, cx, bp, si, ds, es .enter ; Some set-up work ; segmov es, ds xchg di, si call LockStringsDS ; Now loop through all of the entries in the PageSizeInfo ; mov cx, 7 ; seven word in PageSizeInfo mov bp, offset pageSizeInfoTable nextEntry: call si ; perform the conversion add bp, size PageSizeInfoEntry loop nextEntry ; Clean up ; call UnlockStrings .leave ret EnumPageSizeInfo endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% *** Initfile Key Names %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ; There are three possible type of cateogries, one each for the different ; type of pages that are present. ; paperCategoryString char "paper", 0 ; .INI file category envelopeCategoryString char "envelope", 0 ; .INI file category labelCategoryString char "label", 0 ; .INI file category postcardCategoryString char "postcard", 0 ; .INI file category ; Under each, the following keys are recognized ; sizesKeyString char "newSizes", 0 ; key for "blob" of new sizes countKeyString char "count", 0 ; key for number of new sizes orderKeyString char "order", 0 ; key for order array ; There are three type of of user-defined paper categories, one each for ; the different types of pages that are present. These are all the same ; length for the programmer's convenience. ; paperSizeCatString char "paper128",0 ; base name for paper size envelopeSizeCatString char "envel128",0 ; base name for envelope size labelSizeCatString char "label128",0 ; base name for label size postcardCatString char "postc128",0 ; base name for postcard PAPER_SIZE_CATEGORY_LENGTH = 9 ; includes NULL-termination PAPER_SIZE_CATEGORY_BUFFER = 10 ; make it even, please PAPER_SIZE_NUMERIC_FIRST = 5 ; first digit of unique ident PAPER_SIZE_NUMERIC_LAST = 7 ; last digit of unique ident PAPER_SIZE_NUMERIC_DIGITS = 3 ; three numeric digits ; Under each, the following keys are recognized ; paperNameKeyString char "name", 0 ; key for name of paper size paperWidthKeyString char "width", 0 ; key for integer width of size paperHeightKeyString char "height", 0 ; key for integer height of size paperLayoutKeyString char "layout", 0 ; key for integer layout of size ; Default page size keys ; spoolCategoryString char "spool", 0 ; category name for spooler defaultWidthKey equ paperWidthKeyString defaultHeightKey equ paperHeightKeyString defaultLayoutKey equ paperLayoutKeyString defaultMarginLeftKey char "marginLeft", 0 defaultMarginTopKey char "marginTop", 0 defaultMarginRightKey char "marginRight", 0 defaultMarginBottomKey char "marginBottom", 0 COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% *** Global routines %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SpoolGetNumPaperSizes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Returns the number of page sizes that are defined CALLED BY: GLOBAL PASS: BP = PageType RETURN: CX = Number of paper sizes DX = Default paper size DESTROYED: Nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Don 1/21/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ SpoolGetNumPaperSizes proc far uses ax, bx, bp, ds .enter ; Get the number of page sizes ; EC < call ECVerifyPageType > call LockStringsDS mov bp, ds:[PSDLMBH_paperOrder][bp] ChunkSizeHandle ds, bp, cx ; number of entries => CX clr dx ; default size, for now call UnlockStrings .leave ret SpoolGetNumPaperSizes endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SpoolGetPaperString %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Fill a buffer with the requested paper size string CALLED BY: GLOBAL PASS: AX = Paper size # BP = PageType ES:DI = Buffer for string (of size MAX_PAPER_STRING_LENGTH) RETURN: CX = Actual string length DESTROYED: Nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Don 1/21/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ SpoolGetPaperString proc far uses ax, dx .enter ; Go get the string ; EC < call ECVerifyPageType > mov cx, offset CopyPreDefinedString mov dx, offset CopyUserDefinedString call GetPaperSizeInfo ; fill buffer in ES:DI ; string size => CX .leave ret SpoolGetPaperString endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SpoolGetPaperSize %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Get the dimensions of the requested paper size CALLED BY: GLOBAL PASS: AX = Paper size # (not a PaperSizes enumeration) BP = PageType RETURN: CX = Width of paper (in points) DX = Length of paper (in points) AX = Default PageLayout DESTROYED: Nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Don 1/21/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ SpoolGetPaperSize proc far .enter ; Go get the size ; EC < call ECVerifyPageType > mov cx, offset GetPreDefinedSize mov dx, offset GetUserDefinedSize call GetPaperSizeInfo ; dimensions => CX, DX ; layout => AX .leave ret SpoolGetPaperSize endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SpoolConvertPaperSize %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Converts a width & height back to a paper size # CALLED BY: GLOBAL PASS: CX = Width DX = Height BP = PageType RETURN: AX = Paper size # (not a PaperSizes enum) - or - AX = -1 if no match DESTROYED: Nothing PSEUDO CODE/STRATEGY: There are four possible matches, listed by desirability: 1) Match 2) Inverted match 3) Custom string 4) Nothing KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Don 1/27/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ SpoolConvertPaperSize proc far uses bx, cx, dx, di, si, ds .enter ; Some set-up work first ; EC < call ECVerifyPageType > call LockStringsDS mov si, ds:[PSDLMBH_paperOrder][bp] mov si, ds:[si] ; order array => DS:SI mov bx, cx mov di, dx ; dimensions => BX, DI ChunkSizePtr ds, si, cx ; # of entries => CX push cx ; save # of entries mov ax, -1 ; initialize offsets ; Loop until the size is found ; DS:SI = order array entry ; CX = # of entries left ; BX = desired width ; DI = desired height ; AL = inverse size offset (-1 = not found) ; AH = custom-entry offset (-1 = not found) sizeLoop: push cx, ax ; save the current count lodsb ; paper byte => AL tst al ; custom size jz custom ; yes, so store it away test al, USER_DEFINED_MASK ; user defined ?? jnz getUserSize call GetPreDefinedSize ; size => CX, DX compareSizes: cmp cx, bx ; compare widths je checkHeightHeight ; if equal, checks heights cmp cx, di ; compare width vs height je checkHeightWidth next: pop cx, ax je done ; sizes match, so we're done loopNow: loop sizeLoop ; else try again mov cx, ax cmp cl, -1 ; found inverse ?? jne done2 ; yes! mov cl, ch cmp cl, -1 ; found custom ?? jne done2 ; yes! pop si ; else clean up stack, and jmp exit ; return AX = -1 = not found ; Clean up, and return the value done2: clr ch ; ensure the high byte is 0 done: pop ax ; # of entries => CX sub ax, cx ; subtract # of entries left, ; so paper size # => AX exit: call UnlockStrings .leave ret ; Get user-defined page size dimensions getUserSize: call GetUserDefinedSize jmp compareSizes ; Remember where the custom page size occurred custom: pop cx, ax mov ah, cl ; offset to custom => AH jmp loopNow ; Compare current height against desired height checkHeightHeight: cmp dx, di jmp next ; if equal, we're done ; Compare current height against desired width checkHeightWidth: cmp dx, bx jne next pop cx, ax mov al, cl ; offset to inverse => AL jmp loopNow SpoolConvertPaperSize endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SpoolGetPaperSizeOrder %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Get the current paper size order array CALLED BY: GLOBAL PASS: BP = PageType ES:DI = Current order buffer (size MAX_PAPER_SIZES) DS:SI = User-defined sizes (size MAX_PAPER_SIZES) RETURN: ES:DI = Buffer filled with paper size array DS:SI = Buffer filled with user-defined size array DX = Number of unused sizes CX = Number of ordered sizes DESTROYED: Nothing PSEUDO CODE/STRATEGY: 1) Copy the current order array 2) Mark all pre-defined sizes as not-in-use 3) Mark all user-defined sizes as not-in-use 4) Mark all used sizes as in-use KNOWN BUGS/SIDE EFFECTS/IDEAS: In the order buffer: Each is a byte, signifying: 0-127: a pre-defined paper size 128-255: a user-defined paper size In the unused buffer: Each element is a byte, signifying 0: in-use (displayed to user) 1: unused (not displayed to user) Obviously, if a size is being displayed to the user, then it will be found in the order array. The two returned arrays should be sufficient for any application to allow manipulation of paper sizes. REVISION HISTORY: Name Date Description ---- ---- ----------- Don 1/28/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ numPaperSizes word PaperSizes, EnvelopeSizes, LabelSizes SpoolGetPaperSizeOrder proc far uses ax, bx, di, si, ds, es .enter ; Some set-up work ; EC < call ECVerifyPageType > push es, di push si, si, ds, si call LockStringsDS ; 1) Copy the current order array ; mov si, ds:[PSDLMBH_paperOrder][bp] mov si, ds:[si] ; derference the chunk handle ChunkSizePtr ds, si, cx mov dx, cx rep movsb ; 2) Mark all the pre-defined sizes as not-in-use ; pop es, di ; unused array => ES:DI mov cx, MAX_PAPER_SIZES / 2 clr ax rep stosw ; zero-init the unused array pop di ; start of array => ES:DI mov cx, cs:[numPaperSizes][bp] clr ch mov al, 1 rep stosb ; 3) Mark all the user-defined sizes as not-in-use ; call GetUserDefinedCount ; # of user-defined sizes => AX mov cx, ax ; count => CX pop di ; start of array => ES:DI jcxz step4 clr ax findUserDefined: mov bx, ax call GetUserDefinedNumber ; paper size number => AL clr ah ; clear high byte xchg ax, bx mov {byte} es:[di][bx], 1 inc ax ; go to next string section loop findUserDefined ; 4) Mark all used sizes as in-use step4: mov cx, dx ; members of order array => CX pop ds, si ; order array => DS:SI clr bh findInUse: lodsb mov bl, al mov {byte} es:[di][bx], bh ; mark as in-use loop findInUse ; Finally, clean up ; call UnlockStrings mov cx, dx sub dx, cs:[numPaperSizes][bp] call GetUserDefinedCount sub dx, ax neg dx ; number unused sizes => DX .leave ret SpoolGetPaperSizeOrder endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SpoolSetPaperSizeOrder %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Sets a new paper size order to be displayed. CALLED BY: GLOBAL PASS: DS:SI = Array of paper sizes BP = PageType CX = Number of entries in array RETURN: Nothing DESTROYED: Nothing PSEUDO CODE/STRATEGY: Each paper size array element is a byte, signifying: 0-127: a pre-defined paper size 128-255: a user-defined paper size KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Don 1/21/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ SpoolSetPaperSizeOrder proc far .enter if FULL_EXECUTE_IN_PLACE EC< push bx > EC< mov bx, ds > EC< call ECAssertValidFarPointerXIP > EC< pop bx > endif ; Write the string to the .INI file ; EC < call ECVerifyPageType > call ConvertToDefaultOrder ; convert & store in .INI file .leave ret SpoolSetPaperSizeOrder endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SpoolCreatePaperSize %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Create a new paper size, storing it in the .INI file CALLED BY: GLOBAL PASS: ES:DI = Paper size string BP = PageType CX = Width DX = Height AX = Default PageLayout RETURN: AX = Paper size number (as defined in the .INI file) Carry = Clear (operation successful) - or - = Set (operation failed) DESTROYED: Nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Don 1/21/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ SpoolCreatePaperSize proc far uses bx, cx, dx, di, si, bp, ds, es .enter ; First find a new paper size category name ; EC < call ECVerifyPageType > push ax call GetUserDefinedCount ; user-defined count => AX cmp ax, MAX_USER_DEFINED_PAPER_SIZES+1 cmc ; invert the carry pop ax LONG jc exit ; if too many, jump sub sp, PAPER_SIZE_CATEGORY_BUFFER mov si, sp call CopyPaperSizeCategory ; category string => DS:SI push bp, bp ; PageType(2) push ax, dx, cx ; layout, height, width mov dx, offset paperWidthKeyString findUnusedCategory: mov cx, cs call InitFileReadInteger jc found mov cx, PAPER_SIZE_NUMERIC_DIGITS mov bp, PAPER_SIZE_NUMERIC_LAST nextNameLoop: inc {char} ds:[si][bp] cmp {char} ds:[si][bp], '9' jle findUnusedCategory mov {char} ds:[si][bp], '0' dec bp ; back up one character position loop nextNameLoop ; loop 'til no more digits ; We found the category. Store the information away found: pop bp ; paper width => BP call InitFileWriteInteger pop bp ; paper length => BP mov dx, offset paperHeightKeyString call InitFileWriteInteger pop bp ; default layout => BP mov dx, offset paperLayoutKeyString call InitFileWriteInteger mov dx, offset paperNameKeyString call InitFileWriteString if not DBCS_PCGEOS segmov es, ds mov di, si ; category name => ES:DI endif ; First append name to the blob ; pop bp ; PageType => BP if DBCS_PCGEOS ; ; convert SBCS category name to DBCS string section ; sub sp, PAPER_SIZE_CATEGORY_LENGTH*(size wchar) mov di, sp segmov es, ss push di LocalCopySBCSToDBCS pop di endif mov ds, cx mov si, cs:[pageTypeCategories][bp] mov dx, offset sizesKeyString call InitFileWriteStringSection if DBCS_PCGEOS add sp, PAPER_SIZE_CATEGORY_LENGTH*(size wchar) endif ; Now increment the paper size count ; mov dx, offset countKeyString mov bp, 1 ; increment count by one call InitFileAlterInteger ; adjust count pop bp ; PageType => BP jc done ; if error, we're done call GetUserDefinedNumber ; number => AL done: lahf add sp, PAPER_SIZE_CATEGORY_BUFFER sahf mov ah, 0 ; clear AH exit: .leave ret SpoolCreatePaperSize endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SpoolDeletePaperSize %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Delete a paper size string. CALLED BY: GLOBAL PASS: BP = PageType AX = Paper size # RETURN: Carry = Clear (successful deletion) = Set (if error) DESTROYED: Nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Don 1/21/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ SpoolDeletePaperSize proc far uses ax, bx, cx, dx, di, si, bp, ds, es .enter ; Enumerate through the sizes, finding the one we want to nuke ; EC < call ECVerifyPageType > EC < cmp ah, 0xff > EC < ERROR_NE SPOOL_MUST_PASS_ACTUAL_PAPER_SIZE_NUMBER > mov bx, ax ; paper size number => BX segmov ds, cs, cx mov si, cs:[pageTypeCategories][bp] mov dx, offset sizesKeyString clr bp ; InitFileReadFlags => BP mov di, cx mov ax, offset DeletePaperSizeCallBack call InitFileEnumStringSection tst bh ; did we find the paper size ?? stc ; assume the worst jne done ; if not found, done ; Now delete the size from the list of new sizes, and ; decrement the size count. ; mov ax, bx call InitFileDeleteStringSection mov dx, offset countKeyString mov bp, -1 ; decrement count call InitFileAlterInteger done: .leave ret SpoolDeletePaperSize endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DeletePaperSizeCallBack %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Callback for InitFileEnumStringSection() CALLED BY: InitFileEnumStringSection() (via SpoolDeletePaperSize) PASS: DS:SI = String section DX = Section number BH = 0xff BL = Paper size # RETURN: Carry = Clear to continue enumeration - or - Carry = Set to end enumeration BX = Section number DESTROYED: AX, CX PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Don 1/30/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ DeletePaperSizeCallBack proc far .enter ; First, see what paper size # this is ; push si ; save start of section add si, PAPER_SIZE_NUMERIC_FIRST*(size TCHAR) mov cx, 3 ; convert three digits call AsciiToHexWord ; this paper size # => AL pop si ; restore start of section cmp al, bl ; paper sizes equal ?? clc ; assume we'll continue jne done ; not equal, so continue ; We have a match! Delete the category ; if DBCS_PCGEOS ; ; convert DBCS string section to SBCS category ; push es, di, ds, si sub sp, PAPER_SIZE_CATEGORY_BUFFER mov di, sp segmov es, ss mov cx, PAPER_SIZE_CATEGORY_LENGTH-1 convLoop: lodsw stosb loop convLoop clr al stosb ; null terminate segmov ds, ss ; ds:si = category mov si, sp call InitFileDeleteCategory add sp, PAPER_SIZE_CATEGORY_BUFFER pop es, di, ds, si else clr al ; we need a NULL terminator xchg ds:[si+PAPER_SIZE_CATEGORY_LENGTH-1], al call InitFileDeleteCategory ; nuke the paper size mov ds:[si+PAPER_SIZE_CATEGORY_LENGTH-1], al endif mov bx, dx ; section # => BX stc ; end enumeration done: .leave ret DeletePaperSizeCallBack endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% *** PageSizeData initialization routines %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% InitPaperResource %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Initialize the paper size order structures CALLED BY: LockStringsDS PASS: AX = PageSizeData segment RETURN: DS = PageSizeData segment DESTROYED: Nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Don 1/21/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ InitPaperResource proc near uses ax, bx, cx, dx, di, si, bp, es .enter ; A little set-up work, here ; mov es, ax segmov ds, cs ; Initialize the three order strings ; mov si, offset paperCategoryString mov di, offset DefaultPaperOrder mov bp, offset PSDLMBH_paperOrder call ConvertFromDefaultOrder mov si, offset envelopeCategoryString mov di, offset DefaultEnvelopeOrder mov bp, offset PSDLMBH_envelopeOrder call ConvertFromDefaultOrder mov si, offset labelCategoryString mov di, offset DefaultLabelOrder mov bp, offset PSDLMBH_labelOrder call ConvertFromDefaultOrder mov si, offset postcardCategoryString mov di, offset DefaultPostcardOrder mov bp, offset PSDLMBH_postcardOrder call ConvertFromDefaultOrder segmov ds, es .leave ret InitPaperResource endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ConvertFromDefaultOrder %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Convert a default order string (an array of DefaultOrderEntry's) from either the spool library itself or from the .INI file to an array of "size" bytes. CALLED BY: InitPaperResource() PASS: ES = PageSizeData segment DS:SI = Category name DI = Offset to default order string BP = Offset into PageSizeDataLMemBlockHeader RETURN: Nothing DESTROYED: AX, BX, CX, DX, DI, SI, BP PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Don 1/24/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ MAX_ORDER_ARRAY_SIZE = 256 ConvertFromDefaultOrder proc near uses ds .enter ; Get the size of the default order array, either from ; the .INI file, or from the default chunk in the spooler. ; mov cx, cs mov dx, offset orderKeyString push bp ; save order chunk offset clr bp ; allocate a buffer call InitFileReadString ; buffer => BX, size => CX pop bp ; restore order chunk offset segmov ds, es jnc allocate ; if no error, we're happy ChunkSizeHandle es, di, cx ; size of default string => CX clr bx ; no buffer to lock or free ; Allocate an LMem chunk for the order information if DBCS_PCGEOS shr cx, 1 EC < ERROR_C SPOOL_ILLEGAL_DEFAULT_ORDER_ARRAY > endif allocate: shr cx, 1 ; divide by two EC < ERROR_C SPOOL_ILLEGAL_DEFAULT_ORDER_ARRAY > shr cx, 1 EC < ERROR_C SPOOL_ILLEGAL_DEFAULT_ORDER_ARRAY > CheckHack <(size DefaultOrderEntry) eq 4*(size TCHAR)> mov al, mask OCF_IGNORE_DIRTY call LMemAlloc ; handle => AX; fixup DS & ES mov es:[bp], ax ; store the handle away mov si, ax mov si, es:[si] ; destination => ES:SI mov di, es:[di] ; source => DS:DI xchg di, si ; there, that's better... ; Use either the initfile or original mem chunk as ; the source for our copying ; tst bx ; any initfile buffer ? jz createOrder ; nope, so use default order call MemLock ; else lock buffer mov ds, ax clr si ; source => DS:SI ; Copy/create the order chunk createOrder: push cx mov cx, 3 ; 3 digits long call AsciiToHexWord ; hexadecimal value => AL inc si ; step over separator DBCS < inc si > stosb ; store the value pop cx loop createOrder ; loop until done tst bx ; free initfile buffer ?? jz done call MemFree done: .leave ret ConvertFromDefaultOrder endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ConvertToDefaultOrder %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Convert an order array to a default order string CALLED BY: DS:SI = Order array BP = PageType CX = Number of entries in array PASS: Nothing RETURN: Nothing DESTROYED: Nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Don 1/28/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ pageTypeCategories nptr paperCategoryString, \ envelopeCategoryString, \ labelCategoryString, \ postcardCategoryString CheckHack <(length pageTypeCategories)*2 eq PaperType> ConvertToDefaultOrder proc near uses ax, bx, cx, dx, di, si, bp, ds, es .enter ; First allocate a buffer to hold the default order string ; EC < call ECVerifyPageType > push cx ; save count mov_tr ax, cx shl ax, 1 shl ax, 1 DBCS < shl ax, 1 > inc ax ; add byte for NULL terminator DBCS < inc ax > mov cx, ALLOC_DYNAMIC_NO_ERR_LOCK call MemAlloc mov es, ax clr di pop cx ; restore count ; Now create the order array createDefOrder: lodsb ; get order value if DBCS_PCGEOS call HexToThreeDigitAsciiDBCS ; write the hex value else call HexToThreeDigitAscii ; write the hex value endif LocalLoadChar ax, PAPER_ORDER_SEPARATOR LocalPutChar esdi, ax loop createDefOrder LocalClrChar ax LocalPutChar esdi, ax ; write the NULL-terminator ; Now write this into the .INI file ; clr di ; default order string => ES:DI segmov ds, cs, cx mov si, cs:[pageTypeCategories][bp] mov dx, offset orderKeyString call InitFileWriteString call MemFree ; free default order buffer .leave ret ConvertToDefaultOrder endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% *** Utility routines %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% CopyPaperSizeCategory %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Copies the initial paper size category string into the buffer CALLED BY: INTERNAL PASS: SS:SI = Buffer (of size PAPER_SIZE_CATEGORY_BUFFER) BP = PageType RETURN: DS:SI = Initial category string DESTROYED: Nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Don 1/21/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ defaultPaperCategories word offset paperSizeCatString, \ offset envelopeSizeCatString, \ offset labelSizeCatString, \ offset postcardCatString CheckHack <(length defaultPaperCategories)*2 eq PaperType> CopyPaperSizeCategory proc near uses cx, dx, di, si, es .enter ; Copy the string into the buffer ; EC < call ECVerifyPageType > segmov es, ss, dx mov di, si ; buffer => ES:DI, SS => DX segmov ds, cs mov si, cs:[defaultPaperCategories][bp] mov cx, PAPER_SIZE_CATEGORY_LENGTH rep movsb mov ds, dx .leave ret CopyPaperSizeCategory endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GetPaperSizeInfo %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Get specific information about a paper size CALLED BY: SpoolGetPaperString(), SpoolGetPaperSize() PASS: AX = Paper size # CX = Routine to call for pre-defined sizes DX = Routine to call for user-defined sizes BP = Paper ES, DI = Data RETURN: AX, CX, DX Carry = Clear (operation successful) = Set (operation failed) DESTROYED: AX, CX, DX, if not returned PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Don 1/21/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ GetPaperSizeInfo proc near uses bx, si, bp, ds .enter ; See if this is a normal or user-created paper size ; EC < call ECVerifyPageType > call LockStringsDS cmp ah, 0xff ; actual paper size ?? je haveNumber ; yes, so don't dereference mov bx, ds:[PSDLMBH_paperOrder][bp] mov bx, ds:[bx] ; order array => DS:BX xlatb ; paper, envelope, label => AL haveNumber: test al, USER_DEFINED_MASK ; user defined ?? jnz getInfo mov dx, cx ; routine offset => DX getInfo: call dx ; call the proper procedure call UnlockStrings .leave ret GetPaperSizeInfo endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% CopyPreDefinedString %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Copy a pre-defined string into the passed buffer CALLED BY: GetPaperSizeInfo() PASS: DS = PageSizeData segment ES:DI = Buffer to fill BP = PageType PT_PAPER AL = PaperSizes PT_ENVELOPE AL = EnvelopeSizes PT_LABEL AL = LabelSizes RETURN: CX = Size of string DESTROYED: AX, SI PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Don 1/21/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ firstPageString nptr \ String_PS_CUSTOM, String_ES_CUSTOM, String_LSS_CUSTOM, String_PCS_CUSTOM CheckHack <(length firstPageString)*2 eq PageType> CopyPreDefinedString proc near uses di .enter mov si, cs:[firstPageString][bp] clr ah shl ax, 1 ; want a word offset => AX add si, ax ; string chunk => *DS:SI mov si, ds:[si] ; string => DS:SI ChunkSizePtr ds, si, cx ; string size => CX DBCS < shr cx, 1 > mov ax, cx dec ax ; ignore NULL SBCS < rep movsb ; copy the string => ES:DI > DBCS < rep movsw ; copy the string => ES:DI > mov_tr cx, ax ; string size => CX .leave ret CopyPreDefinedString endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% CopyUserDefinedString %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Copy a user-defined string into the passed buffer CALLED BY: GetPaperSizeInfo() PASS: ES:DI = Buffer to fill (of size MAX_PAPER_STRING_LENGTH) BP = PageType AL = User-defined paper # RETURN: CX = Size of string DESTROYED: AX, DX, BP, SI, DS PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Don 1/21/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ CopyUserDefinedString proc near .enter ; We have a user-defined paper size ; sub sp, PAPER_SIZE_CATEGORY_BUFFER mov si, sp call CopyPaperSizeCategory ; real category name => DS:SI push es, di ; save destination buffer segmov es, ds mov di, si add di, PAPER_SIZE_NUMERIC_FIRST call HexToThreeDigitAscii ; stuff in the ASCII value pop es, di ; restore buffer => ES:DI mov cx, cs mov dx, offset paperNameKeyString mov bp, MAX_PAPER_STRING_LENGTH call InitFileReadString ; copy the string => ES:DI add sp, PAPER_SIZE_CATEGORY_BUFFER .leave ret CopyUserDefinedString endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GetPreDefinedSize %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Get the dimensions of a pre-defined paper size CALLED BY: GetPaperSizeInfo() PASS: AX = Paper size # (not a PaperSizes enumeration) BP = PageType PT_PAPER AL = PaperSizes PT_ENVELOPE AL = EnvelopeSizes PT_LABEL AL = LabelSizes RETURN: CX = Width (in points) DX = Length (in points) AX = PageLayout (default) DESTROYED: Nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Don 1/21/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ widthTables nptr \ paperWidths, envelopeWidths, labelWidths, postcardWidths heightTables nptr \ paperHeights, envelopeHeights, labelHeights, postcardHeights layoutTables nptr \ paperLayouts, envelopeLayouts, labelLayouts, postcardLayouts CheckHack <(length widthTables) eq (length heightTables)> CheckHack <(length widthTables) eq (length layoutTables)> CheckHack <(length widthTables)*2 eq (PageType)> GetPreDefinedSize proc near uses bx, si .enter clr ah shl ax, 1 ; want a word offset => AX mov_tr bx, ax mov si, cs:[widthTables][bp] mov cx, cs:[si][bx] ; width => CX mov si, cs:[heightTables][bp] mov dx, cs:[si][bx] ; height => DX mov si, cs:[layoutTables][bp] mov ax, cs:[si][bx] ; layout => AX .leave ret GetPreDefinedSize endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GetUserDefinedSize %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Get the dimensions of a user-defined paper size CALLED BY: GetPaperSizeInfo() PASS: BP = PageType PT_PAPER AL = PaperSizes PT_ENVELOPE AL = EnvelopeSizes PT_LABEL AL = LabelSizes PT_POSTCARD AL = PostcardSizes RETURN: CX = Width (in points) DX = Length (in points) AX = PageLayout (default) DESTROYED: Nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: If not found, returns U.S. Letter, portrait REVISION HISTORY: Name Date Description ---- ---- ----------- Don 1/21/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ GetUserDefinedSize proc near uses di, si, ds, es .enter ; Get the length & width of a user-defined paper size ; sub sp, PAPER_SIZE_CATEGORY_BUFFER mov si, sp call CopyPaperSizeCategory ; real category name => DS:SI segmov es, ds mov di, si add di, PAPER_SIZE_NUMERIC_FIRST call HexToThreeDigitAscii ; stuff in the ASCII value mov ax, 612 ; U.S. Letter width mov cx, cs mov dx, offset paperWidthKeyString call InitFileReadInteger push ax ; save the width mov ax, 792 ; U.S. Letter height mov dx, offset paperHeightKeyString call InitFileReadInteger push ax ; save the height mov ax, bp ; PageLayout => AX (PageType) mov dx, offset paperLayoutKeyString call InitFileReadInteger ; layout => AX ; Return all of the values ; pop dx ; height => DX pop cx ; width => CX add sp, PAPER_SIZE_CATEGORY_BUFFER .leave ret GetUserDefinedSize endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% HexToThreeDigitAscii %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Convert a hexadecimal digit to a three-digit ASCII number. CALLED BY: INTERNAL PASS: ES:DI = Buffer AL = Value RETURN: ES:DI = Points past buffer DESTROYED: AH PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Don 1/24/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ HexToThreeDigitAscii proc near uses bx, bp .enter ; Perform a straight conversion ; mov bl, 10 mov bp, PAPER_SIZE_NUMERIC_DIGITS anotherDigit: clr ah ; value => AX div bl ; divide by 10 add ah, '0' ; convert to ASCII character dec bp ; decrement character offset mov es:[di][bp], ah ; store digit jnz anotherDigit ; loop until done add di, 3 ; advance over digits .leave ret HexToThreeDigitAscii endp if DBCS_PCGEOS HexToThreeDigitAsciiDBCS proc near uses bx, bp .enter ; Perform a straight conversion ; mov bl, 10 mov bp, PAPER_SIZE_NUMERIC_DIGITS*(size wchar) anotherDigit: clr ah ; value => AX div bl ; divide by 10 add ah, '0' ; convert to ASCII character dec bp ; decrement character offset mov {byte} es:[di][bp], 0 ; (high byte of wchar) dec bp mov es:[di][bp], ah ; store digit (lobyte of wchar) jnz anotherDigit ; loop until done add di, 6 ; advance over digits .leave ret HexToThreeDigitAsciiDBCS endp endif COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GetUserDefinedCount %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Returns the number of user-defined paper sizes for the passed PageType CALLED BY: INTERNAL PASS: BP = PageType RETURN: AX = Count DESTROYED: Nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Don 1/28/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ GetUserDefinedCount proc near uses cx, dx, si, ds .enter ; Get an integer from the .INI file ; EC < call ECVerifyPageType > segmov ds, cs, cx mov si, cs:[pageTypeCategories][bp] mov dx, offset countKeyString call InitFileReadInteger jnc done clr ax done: .leave ret GetUserDefinedCount endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GetUserDefinedNumber %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Returns the paper size number of the user-defined size, defined by its occurrence in the newSizes string section. CALLED BY: INTERNAL PASS: BP = PageType AX = String section # (0-based) RETURN: AL = Number (128 -> 255) Carry = Set if error DESTROYED: AH PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Don 1/28/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ GetUserDefinedNumber proc near uses bx, cx, dx, di, si, bp, ds, es .enter ; Get an integer from the .INI file ; EC < call ECVerifyPageType > segmov ds, cs, cx mov si, cs:[pageTypeCategories][bp] mov dx, offset sizesKeyString segmov es, ss mov bp, MAX_PAPER_STRING_LENGTH*(size TCHAR) sub sp, bp mov di, sp ; buffer => ES:DI CheckHack <INITFILE_INTACT_CHARS eq 0> ;;; ornf bp, INITFILE_INTACT_CHARS call InitFileReadStringSection jc done ; if error, we're done segmov ds, es mov si, di ; string => DS:SI add si, PAPER_SIZE_NUMERIC_FIRST*(size TCHAR) mov cx, 3 ; convert three digits call AsciiToHexWord clc done: lahf add sp, MAX_PAPER_STRING_LENGTH*(size TCHAR) sahf .leave ret GetUserDefinedNumber endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% InitFileAlterInteger %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Alter an integer initfile integer CALLED BY: INTERNAL PASS: DS:SI = Category string CX:DX = Key string BP = Alter value RETURN: Nothing DESTROYED: AX, BP PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Don 9/10/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ InitFileAlterInteger proc near .enter call InitFileReadInteger ; integer value => AX jnc alter clr ax alter: add bp, ax ; new value => BP EC < ERROR_S SPOOL_INITFILE_ALTER_INTEGER_OVERFLOW > call InitFileWriteInteger .leave ret InitFileAlterInteger endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ECVerifyPageType %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Verify that a valid PageType is in BP CALLED BY: INTERNAL PASS: BP = PageType RETURN: Nothing DESTROYED: Nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Don 1/29/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ if ERROR_CHECK ECVerifyPageType proc near cmp bp, PageType ; valid type ERROR_AE SPOOL_ILLEGAL_PAGE_TYPE test bp, 0x1 ; must be even ERROR_NZ SPOOL_ILLEGAL_PAGE_TYPE ret ECVerifyPageType endp endif SpoolPaper ends
25.211899
81
0.579418
d5365b0651524eff978ca3fa222ef9d8b8f01044
800
asm
Assembly
oeis/226/A226994.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/226/A226994.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/226/A226994.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A226994: Number of lattice paths from (0,0) to (n,n) consisting of steps U=(1,1), H=(1,0) and S=(0,1) such that the first step leaving the diagonal (if any) is an H step. ; Submitted by Jamie Morken(w3) ; 1,2,7,32,161,842,4495,24320,132865,731282,4048727,22523360,125797985,704966810,3961924127,22321190912,126027618305,712917362210,4039658528935,22924714957472,130271906898721,741188107113962,4221707080583087,24070622500965632,137369104574280961,784622537295845042,4485116176611817975,25656788374503225440,146866855179446896865,841235936593080312122,4821320732559041841215,27647245676145556373504,158620890315068120547329,910495810600049263720514,5228681427947431000875335,30039434229277615491848480 seq $0,1850 ; Central Delannoy numbers: a(n) = Sum_{k=0..n} C(n,k)*C(n+k,k). div $0,2 add $0,1
100
498
0.82375
924837205e9762b46795b3f22ee265de0d019754
100
asm
Assembly
unittests/32Bit_ASM/SecondaryModRM/Reg_7_1.asm
fengjixuchui/FEX
287c65dc6414523ec74303c4b1d03123ae720d6b
[ "MIT" ]
null
null
null
unittests/32Bit_ASM/SecondaryModRM/Reg_7_1.asm
fengjixuchui/FEX
287c65dc6414523ec74303c4b1d03123ae720d6b
[ "MIT" ]
null
null
null
unittests/32Bit_ASM/SecondaryModRM/Reg_7_1.asm
fengjixuchui/FEX
287c65dc6414523ec74303c4b1d03123ae720d6b
[ "MIT" ]
null
null
null
%ifdef CONFIG { "Mode": "32BIT" } %endif ; We can't really check the results of this rdtscp hlt
9.090909
43
0.67
0b315d5a47910126df8c94da40ca7ac81cda9e36
11,126
asm
Assembly
research/deficon/def_drawer-icon_36_214.asm
nicodex/HelloAmi
6dae73b6968cc2caaea356b7a35b0ae1dd78fe09
[ "MIT" ]
16
2019-02-14T15:47:57.000Z
2021-03-28T20:50:54.000Z
research/deficon/def_drawer-icon_36_214.asm
nicodex/HelloAmi
6dae73b6968cc2caaea356b7a35b0ae1dd78fe09
[ "MIT" ]
9
2019-01-17T09:08:30.000Z
2021-04-15T19:32:47.000Z
research/deficon/def_drawer-icon_36_214.asm
nicodex/HelloAmi
6dae73b6968cc2caaea356b7a35b0ae1dd78fe09
[ "MIT" ]
1
2019-01-04T16:19:03.000Z
2019-01-04T16:19:03.000Z
; vasmm68k_mot[_<HOST>] -Fbin -o icon_36_214/def_drawer.info def_drawer-icon_36_214.asm ; ; Default "ENV:def_drawer.info" data included in "icon 36.214 (11 Dec 1989)". ; Note that this icon data is never used (GetDefDiskObject returns NULL). ; include deficon.inc ifne DEFICON_MEM align 1 endif defIconDrawer: dc.w $E310 ; do_Magic = WB_DISKMAGIC dc.w $0001 ; do_Version = WB_DISKVERSION dc.l 0 ; do_Gadget+gg_NextGadget dc.w 117,74 ; do_Gadget+gg_LeftEdge/gg_TopEdge dc.w 74,18 ; do_Gadget+gg_Width/gg_Height dc.w $0006 ; do_Gadget+gg_Flags = ; GFLG_GADGIMAGE ; GFLG_GADGHIMAGE dc.w $0003 ; do_Gadget+gg_Activation = ; GACT_RELVERIFY ; GACT_IMMEDIATE dc.w $0001 ; do_Gadget+gg_GadgetType = ; GTYP_BOOLGADGET DEFICON_PTR .GadgetRender ; do_Gadget+gg_GadgetRender DEFICON_PTR .SelectRender ; do_Gadget+gg_SelectRender dc.l 0 ; do_Gadget+gg_GadgetText dc.l 0 ; do_Gadget+gg_MutualExclude dc.l 0 ; do_Gadget+gg_SpecialInfo dc.w 0 ; do_Gadget+gg_GadgetID dc.l 0 ; do_Gadget+gg_UserData dc.b 2 ; do_Type = WBDRAWER dc.b 0 ; do_PAD_BYTE dc.l 0 ; do_DefaultTool dc.l 0 ; do_ToolTypes dc.l $80000000 ; do_CurrentX = NO_ICON_POSITION dc.l $80000000 ; do_CurrentY = NO_ICON_POSITION DEFICON_PTR .DrawerData ; do_DrawerData dc.l 0 ; do_ToolWindow dc.l 0 ; do_StackSize .DrawerData: dc.w 322,11 ; dd_NewWindow+nw_LeftEdge/nw_TopEdge dc.w 200,100 ; dd_NewWindow+nw_Width/nw_Height dc.b -1,-1 ; dd_NewWindow+nw_DetailPen/nw_BlockPen dc.l 0 ; dd_NewWindow+nw_IDCMPFlags dc.l $0240027F ; dd_NewWindow+nw_Flags = ; WFLG_SIZEGADGET ; WFLG_DRAGBAR ; WFLG_DEPTHGADGET ; WFLG_CLOSEGADGET ; WFLG_SIZEBRIGHT ; WFLG_SIZEBBOTTOM ; WFLG_SIMPLE_REFRESH ; WFLG_REPORTMOUSE ; $00400000 ; WFLG_WBENCHWINDOW dc.l 0 ; dd_NewWindow+nw_FirstGadget dc.l 0 ; dd_NewWindow+nw_CheckMark dc.l 0 ; dd_NewWindow+nw_Title dc.l 0 ; dd_NewWindow+nw_Screen dc.l 0 ; dd_NewWindow+nw_BitMap dc.w 90,40 ; dd_NewWindow+nw_MinWidth/nw_MinHeight dc.w 65535,65535 ; dd_NewWindow+nw_MaxWidth/nw_MaxHeight dc.w $0001 ; dd_NewWindow+nw_Type = WBENCHSCREEN dc.l 0,0 ; dd_CurrentX/CurrentY ifne DEFICON_MEM dc.l 0 ; dd_Flags dc.w 0 ; dd_ViewModes endif .GadgetRender: dc.w 0,0 ; ig_LeftEdge/ig_TopEdge dc.w 74,18 ; ig_Width/ig_Height dc.w 2 ; ig_Depth DEFICON_PTR .GadgetImage ; ig_ImageData dc.b (1<<2)-1,0 ; ig_PlanePick/ig_PlaneOnOff dc.l 0 ; ig_NextImage .GadgetImage: dc.w %0000000000000000,%0000000000000000,%0000000000000000,%0000000000000000,%0000000000000000 dc.w %0000000000000001,%1111111111111111,%1111111111111111,%1111111111111111,%1111100010000000 dc.w %0000000000011111,%1111111111111111,%1111111111111111,%1111111111111111,%1110001100000000 dc.w %0000000000000000,%0000000000000000,%0000000000000000,%0000000000000000,%0000111010000000 dc.w %0000001111111111,%1111111111111111,%1111111111111111,%1111111111111111,%1100111100000000 dc.w %0000001110000000,%0000000000000000,%0000000000000000,%0000000000000001,%1100111010000000 dc.w %0000001110011111,%1111111111111111,%1111111111111111,%1111111111111001,%1100110100000000 dc.w %0000001110011111,%1111111111111111,%1111111111111111,%1111111111111001,%1100111010000000 dc.w %0000001110011111,%1111111111110001,%1111111110001111,%1111111111111001,%1100110100000000 dc.w %0000001110011111,%1111111111100000,%0000000000011111,%1111111111111001,%1100101000000000 dc.w %0000001110011111,%1111111111111111,%1111111111111111,%1111111111111001,%1100110000000000 dc.w %0000001110011111,%1111111111111111,%1111111111111111,%1111111111111001,%1100100000000000 dc.w %0000001110000000,%0000000000000000,%0000000000000000,%0000000000000001,%1100000000000000 dc.w %0000001111111111,%1111111111111111,%1111111111111111,%1111111111111111,%1100000000000000 dc.w %0000000000000000,%0000000000000000,%0000000000000000,%0000000000000000,%0000000000000000 dc.w %0000000000000000,%0000000000000000,%0000000000000000,%0000000000000000,%0000000000000000 dc.w %0000000000000000,%0000000000000000,%0000000000000000,%0000000000000000,%0000000000000000 dc.w %0000000000000000,%0000000000000000,%0000000000000000,%0000000000000000,%0000000000000000 dc.w %0000000000000001,%1111111111111111,%1111111111111111,%1111111111111111,%1111111111000000 dc.w %0000000000011110,%0000000000000000,%0000000000000000,%0000000000000000,%0000011101000000 dc.w %0000000111100000,%0000000000000000,%0000000000000000,%0000000000000000,%0001110011000000 dc.w %0000111111111111,%1111111111111111,%1111111111111111,%1111111111111111,%1111000101000000 dc.w %0000110000000000,%0000000000000000,%0000000000000000,%0000000000000000,%0011000011000000 dc.w %0000110001111111,%1111111111111111,%1111111111111111,%1111111111111110,%0011000101000000 dc.w %0000110001100000,%0000000000000000,%0000000000000000,%0000000000000110,%0011001011000000 dc.w %0000110001100000,%0000000000000000,%0000000000000000,%0000000000000110,%0011000101000000 dc.w %0000110001100000,%0000000000001110,%0000000001110000,%0000000000000110,%0011001011000000 dc.w %0000110001100000,%0000000000011111,%1111111111100000,%0000000000000110,%0011010110000000 dc.w %0000110001100000,%0000000000000000,%0000000000000000,%0000000000000110,%0011001100000000 dc.w %0000110001100000,%0000000000000000,%0000000000000000,%0000000000000110,%0011011000000000 dc.w %0000110001111111,%1111111111111111,%1111111111111111,%1111111111111110,%0011110000000000 dc.w %0000110000000000,%0000000000000000,%0000000000000000,%0000000000000000,%0011100000000000 dc.w %0000111111111111,%1111111111111111,%1111111111111111,%1111111111111111,%1111000000000000 dc.w %0000000000000000,%0000000000000000,%0000000000000000,%0000000000000000,%0000000000000000 dc.w %0000000000000000,%0000000000000000,%0000000000000000,%0000000000000000,%0000000000000000 dc.w %0000000000000000,%0000000000000000,%0000000000000000,%0000000000000000,%0000000000000000 .SelectRender: dc.w 0,0 ; ig_LeftEdge/ig_TopEdge dc.w 74,18 ; ig_Width/ig_Height dc.w 2 ; ig_Depth DEFICON_PTR .SelectImage ; ig_ImageData dc.b (1<<2)-1,0 ; ig_PlanePick/ig_PlaneOnOff dc.l 0 ; ig_NextImage .SelectImage: dc.w %0000000000000000,%0000000000000000,%0000000000000000,%0000000000000000,%0000000000000000 dc.w %0000000000000001,%1111111111111111,%1111111111111111,%1111111111111111,%1111100010000000 dc.w %0000000000011111,%1111111111111111,%1111111111111111,%1111111111111111,%1110001100000000 dc.w %0000000000000000,%0000000000000000,%0000000000000000,%0000000000000000,%0000111010000000 dc.w %0000001111111111,%1111111111111111,%1111111111111111,%1111111111111111,%1100111100000000 dc.w %0000001110000000,%0000000000000000,%0000000000000000,%0000000000000001,%1100111010000000 dc.w %0000001000000000,%0000000000000000,%0000000000000000,%0000000000000001,%1100110100000000 dc.w %0000000000000000,%0000000000000000,%0000000000000000,%0000000000001001,%1100111010000000 dc.w %0000000000000000,%0000000000000000,%0000000000000000,%0000000000011001,%1100110100000000 dc.w %0001111111111111,%1111111111111111,%1111111111111111,%1111111110011001,%1100101000000000 dc.w %0001111111111111,%1111111111111111,%1111111111111111,%1111111110011001,%1100110000000000 dc.w %0001111111111111,%1111111111111111,%1111111111111111,%1111111110011001,%1100100000000000 dc.w %0001111111111111,%1111110001111111,%1110001111111111,%1111111110011001,%1100000000000000 dc.w %0001111111111111,%1111100000000000,%0000011111111111,%1111111110010011,%1100000000000000 dc.w %0001111111111111,%1111111111111111,%1111111111111111,%1111111110000000,%0000000000000000 dc.w %0001111111111111,%1111111111111111,%1111111111111111,%1111111110000000,%0000000000000000 dc.w %0000000000000000,%0000000000000000,%0000000000000000,%0000000000000000,%0000000000000000 dc.w %0000000000000000,%0000000000000000,%0000000000000000,%0000000000000000,%0000000000000000 dc.w %0000000000000001,%1111111111111111,%1111111111111111,%1111111111111111,%1111111111000000 dc.w %0000000000011110,%0000000000000000,%0000000000000000,%0000000000000000,%0000011101000000 dc.w %0000000111100000,%0000000000000000,%0000000000000000,%0000000000000000,%0001110011000000 dc.w %0000111111111111,%1111111111111111,%1111111111111111,%1111111111111111,%1111000101000000 dc.w %0000110000000000,%0000000000000000,%0000000000000000,%0000000000000000,%0011000011000000 dc.w %0000110001111111,%1111111111111111,%1111111111111111,%1111111111111110,%0011000101000000 dc.w %0000110111001101,%0101010101010101,%0101010101010101,%0101010101011110,%0011001011000000 dc.w %0001111010101100,%1010101010101010,%1010101010101010,%1010101010110110,%0011000101000000 dc.w %0111111111111111,%1111111111111111,%1111111111111111,%1111111111100110,%0011001011000000 dc.w %0110000000000000,%0000000000000000,%0000000000000000,%0000000001100110,%0011010110000000 dc.w %0110000000000000,%0000000000000000,%0000000000000000,%0000000001100110,%0011001100000000 dc.w %0110000000000000,%0000000000000000,%0000000000000000,%0000000001100110,%0011011000000000 dc.w %0110000000000000,%0000001110000000,%0001110000000000,%0000000001100110,%0011110000000000 dc.w %0110000000000000,%0000011111111111,%1111100000000000,%0000000001101100,%0011100000000000 dc.w %0110000000000000,%0000000000000000,%0000000000000000,%0000000001111111,%1111000000000000 dc.w %0110000000000000,%0000000000000000,%0000000000000000,%0000000001110000,%0000000000000000 dc.w %0111111111111111,%1111111111111111,%1111111111111111,%1111111111100000,%0000000000000000 dc.w %0000000000000000,%0000000000000000,%0000000000000000,%0000000000000000,%0000000000000000
66.622754
96
0.715981
4effc5a7b473601de1d10c75d4d2a736c4a11ac7
888
asm
Assembly
libsrc/graphics/gray/g_draw.asm
andydansby/z88dk-mk2
51c15f1387293809c496f5eaf7b196f8a0e9b66b
[ "ClArtistic" ]
1
2020-09-15T08:35:49.000Z
2020-09-15T08:35:49.000Z
libsrc/graphics/gray/g_draw.asm
dex4er/deb-z88dk
9ee4f23444fa6f6043462332a1bff7ae20a8504b
[ "ClArtistic" ]
null
null
null
libsrc/graphics/gray/g_draw.asm
dex4er/deb-z88dk
9ee4f23444fa6f6043462332a1bff7ae20a8504b
[ "ClArtistic" ]
null
null
null
; ; TI Gray Library Functions ; ; Written by Stefano Bodrato - Mar 2001 ; ; ; $Id: g_draw.asm,v 1.3 2001/04/18 13:21:38 stefano Exp $ ; ;Usage: g_draw(int x1, int y1, int x2, int y2, int GrayLevel) XLIB g_draw LIB line LIB plotpixel LIB respixel LIB graypage .g_draw ld ix,0 add ix,sp ld a,(ix+2) ;GrayLevel ld e,(ix+4) ;y1 ld d,(ix+6) ;x1 ld l,(ix+8) ;y0 ld h,(ix+10) ;x0 push af xor a call graypage pop af ld ix,plotpixel rra jr nc,set1 ld ix,respixel .set1 push af push hl push de call line pop de pop hl pop af push af ld a,1 call graypage pop af ld ix,plotpixel rra jr nc,set2 ld ix,respixel .set2 jp line
15.578947
61
0.48536
30d71f0e305adbafcfcffa44f9125bcbaf9a9bc7
2,558
asm
Assembly
programs/oeis/239/A239607.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/239/A239607.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/239/A239607.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A239607: (1-2*n^2)^2. ; 1,1,49,289,961,2401,5041,9409,16129,25921,39601,58081,82369,113569,152881,201601,261121,332929,418609,519841,638401,776161,935089,1117249,1324801,1560001,1825201,2122849,2455489,2825761,3236401,3690241,4190209,4739329,5340721,5997601,6713281,7491169,8334769,9247681,10233601,11296321,12439729,13667809,14984641,16394401,17901361,19509889,21224449,23049601,24990001,27050401,29235649,31550689,34000561,36590401,39325441,42211009,45252529,48455521,51825601,55368481,59089969,62995969,67092481,71385601,75881521,80586529,85507009,90649441,96020401,101626561,107474689,113571649,119924401,126540001,133425601,140588449,148035889,155775361,163814401,172160641,180821809,189805729,199120321,208773601,218773681,229128769,239847169,250937281,262407601,274266721,286523329,299186209,312264241,325766401,339701761,354079489,368908849,384199201,399960001,416200801,432931249,450161089,467900161,486158401,504945841,524272609,544148929,564585121,585591601,607178881,629357569,652138369,675532081,699549601,724201921,749500129,775455409,802079041,829382401,857376961,886074289,915486049,945624001,976500001,1008126001,1040514049,1073676289,1107624961,1142372401,1177931041,1214313409,1251532129,1289599921,1328529601,1368334081,1409026369,1450619569,1493126881,1536561601,1580937121,1626266929,1672564609,1719843841,1768118401,1817402161,1867709089,1919053249,1971448801,2024910001,2079451201,2135086849,2191831489,2249699761,2308706401,2368866241,2430194209,2492705329,2556414721,2621337601,2687489281,2754885169,2823540769,2893471681,2964693601,3037222321,3111073729,3186263809,3262808641,3340724401,3420027361,3500733889,3582860449,3666423601,3751440001,3837926401,3925899649,4015376689,4106374561,4198910401,4293001441,4388665009,4485918529,4584779521,4685265601,4787394481,4891183969,4996651969,5103816481,5212695601,5323307521,5435670529,5549803009,5665723441,5783450401,5903002561,6024398689,6147657649,6272798401,6399840001,6528801601,6659702449,6792561889,6927399361,7064234401,7203086641,7343975809,7486921729,7631944321,7779063601,7928299681,8079672769,8233203169,8388911281,8546817601,8706942721,8869307329,9033932209,9200838241,9370046401,9541577761,9715453489,9891694849,10070323201,10251360001,10434826801,10620745249,10809137089,11000024161,11193428401,11389371841,11587876609,11788964929,11992659121,12198981601,12407954881,12619601569,12833944369,13051006081,13270809601,13493377921,13718734129,13946901409,14177903041,14411762401,14648502961,14888148289,15130722049,15376248001 mov $1,$0 pow $1,2 mul $1,2 sub $1,1 pow $1,2
284.222222
2,486
0.888194
b69846deed7219fe1961041406cfd24d87517e22
365
asm
Assembly
programs/oeis/137/A137893.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/137/A137893.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/137/A137893.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A137893: Fixed point of the morphism 0->100, 1->101, starting from a(1) = 1. ; 1,0,1,1,0,0,1,0,1,1,0,1,1,0,0,1,0,0,1,0,1,1,0,0,1,0,1,1,0,1,1,0,0,1,0,1,1,0,1,1,0,0,1,0,0,1,0,1,1,0,0,1,0,0,1,0,1,1,0,0,1,0,1,1,0,1,1,0,0,1,0,0,1,0,1,1,0,0,1,0,1,1,0,1,1,0,0,1,0,1,1,0,1,1,0,0,1,0,0,1,0,1,1,0,0 add $0,1 mul $0,2 mov $1,$0 lpb $0,2 div $1,3 gcd $1,$0 lpe sub $1,1
30.416667
211
0.536986
61767cf309cabfa7c8e227d8895a66e4489ad821
367
asm
Assembly
programs/oeis/069/A069549.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/069/A069549.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/069/A069549.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A069549: Smallest composite k such that phi(k) > k*(1-1/n). ; 4,4,9,25,25,49,49,121,121,121,121,169,169,289,289,289,289,361,361,529,529,529,529,841,841,841,841,841,841,961,961,1369,1369,1369,1369,1369,1369,1681,1681,1681,1681,1849,1849,2209,2209,2209,2209,2809,2809,2809 cal $0,151800 ; Least prime > n (version 2 of the "next prime" function). mov $1,$0 pow $1,2
52.428571
210
0.711172
43987837958e2bc25b464d12235b30186c382812
564
asm
Assembly
in/lib/sys_in_out.asm
Daliji/Diers
17ae90453827768e9949c96e9a9fcd7f601bccda
[ "MIT" ]
4
2020-08-25T07:30:24.000Z
2021-01-30T15:19:49.000Z
in/lib/sys_in_out.asm
Daliji/Diers
17ae90453827768e9949c96e9a9fcd7f601bccda
[ "MIT" ]
null
null
null
in/lib/sys_in_out.asm
Daliji/Diers
17ae90453827768e9949c96e9a9fcd7f601bccda
[ "MIT" ]
null
null
null
[bits 32] [global in_sys_call] [global ret_from_sys_call] [global sys_call] [extern sys_tick] [extern sys_call_table] [extern show_number] in_sys_call: pop esi push ebx push ecx push edx push edi push ebp push ds push es push fs mov bx,0x10 mov ds,bx mov es,bx mov bx,0x17 mov fs,bx jmp esi ret_from_sys_call: pop esi ;; cr3不变 pop fs pop es pop ds pop ebp pop edi pop edx pop ecx pop ebx jmp esi sys_call: push esi push E1 jmp in_sys_call E1: call [sys_call_table+eax*4] ;eax push E2 jmp ret_from_sys_call E2: pop esi iret
12
33
0.718085
b853ed317a6d9971ff5274fa5e0ff9a4aaa2dbdc
136
asm
Assembly
tests/macros/end_in_if_dup_macro_include.i.asm
cizo2000/sjasmplus
615d7c0e09a44aa2a923095fc9ed6dca6ecae4a4
[ "BSD-3-Clause" ]
220
2016-10-22T19:44:39.000Z
2022-03-29T20:57:04.000Z
tests/macros/end_in_if_dup_macro_include.i.asm
ped7g/sjasmplus
487635c8057cd5594c372d9b70bc00a3f3a1ecc4
[ "BSD-3-Clause" ]
153
2018-05-07T10:31:23.000Z
2022-03-30T04:35:59.000Z
tests/macros/end_in_if_dup_macro_include.i.asm
ped7g/sjasmplus
487635c8057cd5594c372d9b70bc00a3f3a1ecc4
[ "BSD-3-Clause" ]
51
2016-05-12T21:27:36.000Z
2022-03-27T15:16:16.000Z
MACRO test_end x? DUP 3 IF 0 < x? END ENDIF halt EDUP ENDM
15.111111
22
0.308824
8b7794fdb976acc832b4d504736f8a56e1690e65
322
asm
Assembly
53-100-Cubes-on-the-Floor.size.asm
blueset/7bh-solutions
988afddf87411bec06ec9e90179b55fb55345a5d
[ "MIT" ]
null
null
null
53-100-Cubes-on-the-Floor.size.asm
blueset/7bh-solutions
988afddf87411bec06ec9e90179b55fb55345a5d
[ "MIT" ]
null
null
null
53-100-Cubes-on-the-Floor.size.asm
blueset/7bh-solutions
988afddf87411bec06ec9e90179b55fb55345a5d
[ "MIT" ]
null
null
null
-- 7 Billion Humans -- -- 53: 100 Cubes on the Floor -- -- Size: 17/17 -- -- Speed: 106/103 -- a: if w != wall: step w jump a endif if n != wall: listenfor hi mem1 = calc n + 10 pickup c write mem1 drop endif tell s hi b: if e == datacube: step e mem1 = calc mem1 + 1 pickup c write mem1 drop jump b endif
10.733333
32
0.611801
361ba2a5c4c8acd45f94aa04954db57a7735f6c8
727
asm
Assembly
oeis/156/A156626.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/156/A156626.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/156/A156626.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A156626: a(0)=1; a(1)=2; a(2)=6; a(n+1) = 2*(n+1)*a(n) - n^2*a(n-1), n > 1. ; Submitted by Christian Krause ; 1,2,6,28,170,1252,10774,105764,1164298,14188468,189461222,2749300084,43058394154,723619035908,12984464393398,247704600763972,5005042735932554,106759075226130004,2396869357456172038,56491095210068416148,1394373970361058540202,35967268671137092229284,967640900600805241859414,27103323390806688486559588,789077486340895074411230218,23842360043940101152303188212,746629293321825838412746900774,24200546449675086895331377410484,810937846350193829935664644322858,28061166671765974010328749480906308 mov $2,1 mov $3,1 lpb $0 mul $1,$0 add $1,$2 mul $2,$0 sub $0,1 mov $3,$2 add $2,$1 mul $3,2 lpe mov $0,$3
42.764706
494
0.793673
962a13c53e931e1617944143cd3e014e7d5d3367
5,191
asm
Assembly
file.asm
antoniojema/aoc_2021_assemblymaybe
ea5facca9f4cabc13392038cf2fd05a8f1345646
[ "MIT" ]
null
null
null
file.asm
antoniojema/aoc_2021_assemblymaybe
ea5facca9f4cabc13392038cf2fd05a8f1345646
[ "MIT" ]
null
null
null
file.asm
antoniojema/aoc_2021_assemblymaybe
ea5facca9f4cabc13392038cf2fd05a8f1345646
[ "MIT" ]
null
null
null
global file_create, file_close, file_open, file_read_uint32, file_read_line extern cstr_to_uint32, printd, printlb, printchar section .text ;;------------------;; ;; file_create ;; ;;------------------;; ;; - Takes: ;; - Pointer to string with filename ;; - Permissions ;; - Creates a file ;; - Returns: ;; - File descriptor / error code file_create: push ebp mov ebp, esp ;; syscall mov eax, 8 mov ebx, [ebp+8] ;; filename mov ecx, [ebp+12] ;; permissions int 0x80 ;; Return file descriptor mov [ebp+12], eax pop ebp ret ;;-----------------;; ;; file_close ;; ;;-----------------;; ;; - Takes: ;; - File descriptor ;; - Closes a file ;; - Returns: ;; - Error code file_close: push ebp mov ebp, esp ;; syscall mov eax, 6 mov ebx, [ebp+8] ;; descriptor int 0x80 ;; Return file descriptor mov [ebp+8], eax pop ebp ret ;;----------------;; ;; file_open ;; ;;----------------;; ;; - Takes: ;; - Pointer to string with filename ;; - Access mode ;; - Permissions ;; - Creates a file ;; - Returns: ;; - File descriptor / error code file_open: push ebp mov ebp, esp ;; syscall mov eax, 5 mov ebx, [ebp+8 ] ;; filename mov ecx, [ebp+12] ;; access mode (0 (read-only), 1(write-only), 2(read-write)) mov edx, [ebp+16] ;; permissions int 0x80 ;; Return file descriptor mov [ebp+16], eax pop ebp ret ;;-----------------------;; ;; file_read_uint32 ;; ;;-----------------------;; ;; - Takes: ;; - File descriptor ;; - Returns: ;; - Next digit read by any separator file_read_uint32: push ebp mov ebp, esp sub esp, 144 ;; 4 -> File descriptor ;; 8 -> Last read digit ;; 136 -> Digits buffer ;; 140 -> Pointer to next digit in buffer ;; 144 -> argument mov eax, [ebp+8] mov [ebp-4], eax lea eax, [ebp-136] mov [ebp-140], eax ;; Read chars until find a digit check_digit: ;; Read syscall mov eax, 3 mov ebx, [ebp-4] lea ecx, [ebp-8] mov edx, 1 int 0x80 ;; If read-error, exit cmp eax, 1 jne end_read_uint32 mov al, [ebp-8] cmp al, '0' jl check_digit cmp al, '9' jg check_digit jmp middle_read_uint32 begin_read_uint32: ;; Read syscall mov eax, 3 mov ebx, [ebp-4] lea ecx, [ebp-8] mov edx, 1 int 0x80 ;; If read-error, exit cmp eax, 1 jne end_read_uint32 middle_read_uint32: ;; If not a digit, exit mov al, [ebp-8] cmp al, '0' jl end_read_uint32 cmp al, '9' jg end_read_uint32 ;; Store in buffer mov ebx, [ebp-140] mov byte [ebx], al add ebx, 1 mov [ebp-140], ebx jmp begin_read_uint32 end_read_uint32: ;; Store a null char (0) in buffer and reset pointer to beginning mov eax, [ebp-140] mov byte [eax], 0 lea eax, [ebp-136] mov [esp], eax call cstr_to_uint32 ;; Return uint32 mov eax, [esp] mov [ebp+8], eax lea eax, [ebp-136] sub eax, [ebp-140] ;; Return mov esp, ebp pop ebp ret ;;---------------------;; ;; file_read_line ;; ;;---------------------;; ;; - Takes: ;; - File descriptor ;; - Pointer to buffer ;; - Returns: ;; - eax: Number of bytes read file_read_line: push ebp mov ebp, esp sub esp, 4 ;; -8 -> File descriptor ;; -12 -> Pointer to buffer ;; 4 -> Pointer to current buffer byte ;; Set pointer to buffer begin mov eax, [ebp+12] mov [ebp-4], eax begin_read_line: ;; Read char mov eax, 3 mov ebx, [ebp+8] mov ecx, [ebp-4] mov edx, 1 int 0x80 ;; If nothing was read, exit loop cmp eax, 1 jne end_read_line ;; Else, increase pointer mov eax, [ebp-4] mov ebx, eax add eax, 1 mov [ebp-4], eax ;; If character was endline (0xA), exit loop cmp byte [ebx], 0xA je end_read_line ;; Else, back to begin jmp begin_read_line end_read_line: ;; Set null char mov eax, [ebp-4] mov byte [eax], 0 ;; Set number of bytes in eax sub eax, [ebp+12] ;; Return mov esp, ebp pop ebp ret
22.767544
90
0.437488
668c9e27aa2aa4c1199883ee64ff81ffd2b795b9
378
asm
Assembly
oeis/189/A189071.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/189/A189071.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/189/A189071.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A189071: The n-th derivative of x^10 evaluated at x=2. ; Submitted by Christian Krause ; 1024,5120,23040,92160,322560,967680,2419200,4838400,7257600,7257600,3628800,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 mov $1,4 mov $2,11 lpb $0 sub $0,1 sub $2,1 mul $1,$2 div $1,2 lpe mov $0,$1 mul $0,256
25.2
191
0.632275
a7351ee25c9e7b442bcef6ad118300bed9beff4c
952
asm
Assembly
programs/oeis/026/A026065.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/026/A026065.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/026/A026065.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A026065: a(n) = (d(n)-r(n))/5, where d = A026063 and r is the periodic sequence with fundamental period (1,4,0,0,0). ; 14,23,36,51,69,90,114,143,175,211,251,295,345,399,458,522,591,667,748,835,928,1027,1134,1247,1367,1494,1628,1771,1921,2079,2245,2419,2603,2795,2996,3206,3425,3655,3894,4143,4402,4671,4952,5243,5545,5858,6182,6519,6867,7227,7599,7983,8381 mov $15,$0 mov $17,$0 add $17,1 lpb $17,1 mov $0,$15 sub $17,1 sub $0,$17 mov $11,$0 mov $13,2 lpb $13,1 clr $0,11 mov $0,$11 sub $13,1 add $0,$13 add $0,12 bin $0,3 trn $1,1 mov $2,4 sub $7,13 mul $7,14 sub $2,$7 lpb $0,1 sub $0,$2 add $1,2 mov $2,$0 add $2,$1 add $0,$2 sub $2,$0 div $0,10 lpe mov $1,$0 mov $14,$13 lpb $14,1 mov $12,$1 sub $14,1 lpe lpe lpb $11,1 mov $11,0 sub $12,$1 lpe mov $1,$12 sub $1,6 add $16,$1 lpe mov $1,$16
19.04
239
0.537815
a12dedb2b5b719ee45aad74e7332291cdee49b90
628
asm
Assembly
ASM/asm/kbgprime.asm
kbilsted/CompilerTeknik
f4effdde5ee060eac1c186bc11dd261f1e47d958
[ "Apache-2.0" ]
null
null
null
ASM/asm/kbgprime.asm
kbilsted/CompilerTeknik
f4effdde5ee060eac1c186bc11dd261f1e47d958
[ "Apache-2.0" ]
null
null
null
ASM/asm/kbgprime.asm
kbilsted/CompilerTeknik
f4effdde5ee060eac1c186bc11dd261f1e47d958
[ "Apache-2.0" ]
null
null
null
; ; KBG prime ; ; find all primes within 31999 ; ; written by KBG (c) 2000 ; ; AX contains number to be tested (from 32000 down to 0) DOSSEG .MODEL SMALL .STACK 200h .DATA .CODE mov ax,@DATA mov ds,ax mov cx, 31999 again: mov si, 2 ; si = 2 primeTsTStart: cmp si, cx ; while cx > si je primeTstEnd ; mov ax, cx xor dx, dx div si cmp dx, 0 ; if cx % si == 0 then stop testing current number je primeTstEnd: inc si ; si++ jmp primeTstStart primeTstEnd: loop again ; if cx > 0 ; END OF SHOW mov ah,4ch int 21h END
13.652174
66
0.562102
800591c68c73f49d272740646d252b35caf78949
2,249
asm
Assembly
C/LoDosLib/critsect.asm
p-k-p/SysToolsLib
827be2799e541410cb5c11358cd4ce6859e171ad
[ "Apache-2.0" ]
232
2016-04-27T21:56:11.000Z
2022-03-29T09:02:15.000Z
C/LoDosLib/critsect.asm
p-k-p/SysToolsLib
827be2799e541410cb5c11358cd4ce6859e171ad
[ "Apache-2.0" ]
31
2016-05-09T09:05:36.000Z
2022-03-29T19:17:45.000Z
C/LoDosLib/critsect.asm
p-k-p/SysToolsLib
827be2799e541410cb5c11358cd4ce6859e171ad
[ "Apache-2.0" ]
94
2016-06-01T18:10:39.000Z
2022-03-26T10:44:57.000Z
page ,132 ;*****************************************************************************; ; ; ; FILE NAME: critsect.asm ; ; ; ; DESCRIPTION: Critical section management routines under Windows VMM ; ; ; ; NOTES: ; ; ; ; HISTORY: ; ; 1995/08/25 JFL Created this file. ; ; ; ; (c) Copyright 1995-2017 Hewlett Packard Enterprise Development LP ; ; Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 ; ;*****************************************************************************; INCLUDE ADEFINE.INC ; For the segment definitions .CODE ;-----------------------------------------------------------------------------; ; ; ; Function: BeginCriticalSection ; ; ; ; Description: Prevent VMM from switching virtual machines ; ; ; ; Parameters: None ; ; ; ; Returns: None ; ; ; ; Notes: ; ; ; ; Regs altered: AX. ; ; ; ; History: ; ; ; ; 1995/08/02 JFL Created this routine ; ; ; ;-----------------------------------------------------------------------------; CFASTPROC BeginCriticalSection mov ax, 1681H int 2FH ret ENDCFASTPROC BeginCriticalSection ;-----------------------------------------------------------------------------; ; ; ; Function: EndCriticalSection ; ; ; ; Description: Authorize VMM to switch virtual machines again ; ; ; ; Parameters: None ; ; ; ; Returns: None ; ; ; ; Notes: ; ; ; ; Regs altered: AX. ; ; ; ; History: ; ; ; ; 1995/08/02 JFL Created this routine ; ; ; ;-----------------------------------------------------------------------------; CFASTPROC EndCriticalSection mov ax, 1682H int 2FH ret ENDCFASTPROC EndCriticalSection END
28.1125
79
0.33526
4c047cffcd00bd45e9e5e6a1475f5f247f393260
5,688
asm
Assembly
Transynther/x86/_processed/AVXALIGN/_zr_/i7-8650U_0xd2_notsx.log_338_163.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/AVXALIGN/_zr_/i7-8650U_0xd2_notsx.log_338_163.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/AVXALIGN/_zr_/i7-8650U_0xd2_notsx.log_338_163.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r15 push %r8 push %rax push %rbp push %rcx push %rdi push %rsi lea addresses_WC_ht+0x8f3f, %rcx nop nop nop nop nop and $10226, %r10 vmovups (%rcx), %ymm3 vextracti128 $0, %ymm3, %xmm3 vpextrq $1, %xmm3, %rdi nop nop inc %rax lea addresses_D_ht+0x1ccff, %r8 nop nop inc %r10 movb $0x61, (%r8) nop nop nop nop sub $26410, %r10 lea addresses_D_ht+0xa3ff, %rdi inc %r15 mov $0x6162636465666768, %r8 movq %r8, %xmm2 vmovups %ymm2, (%rdi) nop nop and %r10, %r10 lea addresses_normal_ht+0x183e9, %r15 nop xor $7453, %rbp mov $0x6162636465666768, %rax movq %rax, %xmm5 vmovups %ymm5, (%r15) add $7641, %rdi lea addresses_A_ht+0xc8d7, %rsi lea addresses_UC_ht+0x151ff, %rdi sub $64253, %r8 mov $70, %rcx rep movsw nop nop nop nop add $33933, %rsi lea addresses_WC_ht+0xd49f, %r8 clflush (%r8) add %rbp, %rbp mov (%r8), %ecx nop nop nop nop nop xor $62225, %rdi lea addresses_UC_ht+0x15112, %rsi lea addresses_WC_ht+0x1e5ff, %rdi nop nop cmp $39787, %r15 mov $21, %rcx rep movsb nop nop nop nop nop sub $37866, %rax lea addresses_UC_ht+0x115ff, %rbp nop nop and $50453, %rax movups (%rbp), %xmm3 vpextrq $1, %xmm3, %rcx nop nop nop nop xor %r15, %r15 lea addresses_normal_ht+0x1bb7f, %rax add %r10, %r10 movl $0x61626364, (%rax) nop and $29006, %rax lea addresses_A_ht+0x10947, %r8 nop nop nop nop nop dec %r10 movw $0x6162, (%r8) and $11785, %rcx lea addresses_UC_ht+0x1cecf, %r15 nop nop nop dec %rsi mov $0x6162636465666768, %rax movq %rax, %xmm3 and $0xffffffffffffffc0, %r15 vmovntdq %ymm3, (%r15) nop nop nop nop inc %rax lea addresses_UC_ht+0x1ddff, %r15 nop xor %r8, %r8 mov (%r15), %eax nop dec %rcx lea addresses_UC_ht+0x3fff, %rbp nop nop and $45787, %rax mov (%rbp), %rcx nop nop nop nop lfence pop %rsi pop %rdi pop %rcx pop %rbp pop %rax pop %r8 pop %r15 pop %r10 ret .global s_faulty_load s_faulty_load: push %r12 push %r13 push %r14 push %r8 push %rcx push %rdi push %rdx // Store mov $0xc0f, %r8 nop nop xor %r14, %r14 mov $0x5152535455565758, %rcx movq %rcx, %xmm6 vmovups %ymm6, (%r8) cmp %r14, %r14 // Store mov $0x54f1ae00000005ff, %r8 nop nop cmp $223, %r12 movw $0x5152, (%r8) nop nop nop cmp $28878, %rcx // Faulty Load mov $0xdff, %r13 nop nop cmp $2194, %r8 movaps (%r13), %xmm2 vpextrq $1, %xmm2, %rcx lea oracles, %r14 and $0xff, %rcx shlq $12, %rcx mov (%r14,%rcx,1), %rcx pop %rdx pop %rdi pop %rcx pop %r8 pop %r14 pop %r13 pop %r12 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_P', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_P', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 4, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_NC', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 11, 'same': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_P', 'size': 16, 'AVXalign': True, 'NT': False, 'congruent': 0, 'same': True}} <gen_prepare_buffer> {'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 4, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 8, 'same': True}} {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 7, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 1, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 9, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 4, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 10, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 7, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 2, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'size': 32, 'AVXalign': False, 'NT': True, 'congruent': 3, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 7, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 8, 'same': False}} {'00': 338} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
25.506726
1,013
0.649789
0f77f88249b229c1e1b1637d63f4445e047f834d
883
asm
Assembly
src/tests/mds.asm
mguarnieri/revizor
a3d91b19d91bcc9a266b7f10e5b9631906ebfedd
[ "MIT" ]
29
2021-05-24T12:45:19.000Z
2022-03-16T16:53:10.000Z
src/tests/mds.asm
mguarnieri/revizor
a3d91b19d91bcc9a266b7f10e5b9631906ebfedd
[ "MIT" ]
3
2021-11-23T15:37:25.000Z
2022-01-24T12:01:44.000Z
src/tests/mds.asm
mguarnieri/revizor
a3d91b19d91bcc9a266b7f10e5b9631906ebfedd
[ "MIT" ]
3
2021-06-17T09:00:27.000Z
2022-03-28T03:42:01.000Z
.intel_syntax noprefix AND rax, 0b111111111111 # keep the mem. access within the sandbox #MOV rax, 46 MFENCE # put a value into store buffer; repeated several times to make sure we get a hit MOV qword ptr [r14], rax MOV rax, qword ptr [r14] SFENCE MOV qword ptr [r14], rax MOV rax, qword ptr [r14] SFENCE MOV qword ptr [r14], rax MOV rax, qword ptr [r14] SFENCE MOV qword ptr [r14], rax MOV rax, qword ptr [r14] SFENCE MOV qword ptr [r14], rax MOV rax, qword ptr [r14] SFENCE MOV qword ptr [r14], rax MOV rax, qword ptr [r14] SFENCE MOV qword ptr [r14], rax MOV rax, qword ptr [r14] SFENCE MOV qword ptr [r14], rax MOV rax, qword ptr [r14] SFENCE MOV qword ptr [r14], rax MOV rax, qword ptr [r14] # Read from a non-accessed address thus triggerring microcode assist ADD rcx, [r14 + 4096] #SHL rcx, 6 # dependent load #LFENCE AND rcx, 0b111111000000 MOV rdx, [r14 + rcx] MFENCE
19.622222
81
0.721404
772646289c2e5c151ef01b0b3af7b5d668abddf4
1,504
asm
Assembly
programs/oeis/259/A259555.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/259/A259555.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/259/A259555.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A259555: a(n) = 2*n^2 - 2*n + 17. ; 17,21,29,41,57,77,101,129,161,197,237,281,329,381,437,497,561,629,701,777,857,941,1029,1121,1217,1317,1421,1529,1641,1757,1877,2001,2129,2261,2397,2537,2681,2829,2981,3137,3297,3461,3629,3801,3977,4157,4341,4529,4721,4917,5117,5321,5529,5741,5957,6177,6401,6629,6861,7097,7337,7581,7829,8081,8337,8597,8861,9129,9401,9677,9957,10241,10529,10821,11117,11417,11721,12029,12341,12657,12977,13301,13629,13961,14297,14637,14981,15329,15681,16037,16397,16761,17129,17501,17877,18257,18641,19029,19421,19817,20217,20621,21029,21441,21857,22277,22701,23129,23561,23997,24437,24881,25329,25781,26237,26697,27161,27629,28101,28577,29057,29541,30029,30521,31017,31517,32021,32529,33041,33557,34077,34601,35129,35661,36197,36737,37281,37829,38381,38937,39497,40061,40629,41201,41777,42357,42941,43529,44121,44717,45317,45921,46529,47141,47757,48377,49001,49629,50261,50897,51537,52181,52829,53481,54137,54797,55461,56129,56801,57477,58157,58841,59529,60221,60917,61617,62321,63029,63741,64457,65177,65901,66629,67361,68097,68837,69581,70329,71081,71837,72597,73361,74129,74901,75677,76457,77241,78029,78821,79617,80417,81221,82029,82841,83657,84477,85301,86129,86961,87797,88637,89481,90329,91181,92037,92897,93761,94629,95501,96377,97257,98141,99029,99921,100817,101717,102621,103529,104441,105357,106277,107201,108129,109061,109997,110937,111881,112829,113781,114737,115697,116661,117629,118601,119577,120557,121541,122529,123521,124517 sub $1,$0 bin $1,2 mul $1,4 add $1,17
188
1,428
0.807181
7cdaaebb2dbfcfa45aa9ded3e67e3c18787ea99f
2,209
asm
Assembly
externals/mpir-3.0.0/mpn/powerpc64/mode64/sub_n.asm
JaminChan/eos_win
c03e57151cfe152d0d3120abb13226f4df74f37e
[ "MIT" ]
12
2021-09-29T14:50:06.000Z
2022-03-31T15:01:21.000Z
externals/mpir-3.0.0/mpn/powerpc64/mode64/sub_n.asm
JaminChan/eos_win
c03e57151cfe152d0d3120abb13226f4df74f37e
[ "MIT" ]
15
2021-12-24T22:53:49.000Z
2021-12-25T10:03:13.000Z
LibSource/mpir/mpn/powerpc64/mode64/sub_n.asm
ekzyis/CrypTool-2
1af234b4f74486fbfeb3b3c49228cc36533a8c89
[ "Apache-2.0" ]
10
2021-10-17T19:46:51.000Z
2022-03-18T02:57:57.000Z
dnl PowerPC-64 mpn_sub_n -- Subtract two limb vectors of the same length > 0 dnl and store difference in a third limb vector. dnl Copyright 1999, 2000, 2001 Free Software Foundation, Inc. dnl This file is part of the GNU MP Library. dnl The GNU MP Library is free software; you can redistribute it and/or modify dnl it under the terms of the GNU Lesser General Public License as published dnl by the Free Software Foundation; either version 2.1 of the License, or (at dnl your option) any later version. dnl The GNU MP Library is distributed in the hope that it will be useful, but dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public dnl License for more details. dnl You should have received a copy of the GNU Lesser General Public License dnl along with the GNU MP Library; see the file COPYING.LIB. If not, write dnl to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, dnl Boston, MA 02110-1301, USA. include(`../config.m4') C INPUT PARAMETERS C res_ptr r3 C s1_ptr r4 C s2_ptr r5 C size r6 C This code runs at 1.5 cycles/limb on the PPC630. ASM_START() PROLOGUE(mpn_sub_n) mtctr r6 C copy size into CTR addic r0,r6,-1 C set cy ld r8,0(r4) C load least significant s1 limb ld r0,0(r5) C load least significant s2 limb addi r3,r3,-8 C offset res_ptr, it's updated before it's used bdz L(eno) C If done, skip loop L(top): ld r9,8(r4) C load s1 limb ld r10,8(r5) C load s2 limb subfe r7,r0,r8 C subtract limbs with cy, set cy std r7,8(r3) C store result limb bdz L(ene) C decrement CTR and exit if done ldu r8,16(r4) C load s1 limb and update s1_ptr ldu r0,16(r5) C load s2 limb and update s2_ptr subfe r7,r10,r9 C subtract limbs with cy, set cy stdu r7,16(r3) C store result limb and update res_ptr bdnz L(top) C decrement CTR and loop back L(eno): subfe r7,r0,r8 std r7,8(r3) C store ultimate result limb subfe r3,r0,r0 C load !cy into ... subfic r3,r3,0 C ... return value register blr L(ene): subfe r7,r10,r9 std r7,16(r3) subfe r3,r0,r0 C load !cy into ... subfic r3,r3,0 C ... return value register blr EPILOGUE(mpn_sub_n)
35.063492
79
0.738796
be7f25ccd58b6ea53fe430252372182e92080816
243
asm
Assembly
programs/oeis/016/A016864.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/016/A016864.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/016/A016864.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A016864: a(n) = (5*n + 1)^4. ; 1,1296,14641,65536,194481,456976,923521,1679616,2825761,4477456,6765201,9834496,13845841,18974736,25411681,33362176,43046721,54700816,68574961,84934656,104060401,126247696 mul $0,5 add $0,1 pow $0,4 mov $1,$0
30.375
173
0.753086
86ef2f1dee2cac0db7401baada0438315ea59497
1,295
asm
Assembly
Lab2April/d2b.asm
forkkr/Assembly-Lab
e038fb965e45a88aa670a1158bf99a4b62ac374f
[ "MIT" ]
null
null
null
Lab2April/d2b.asm
forkkr/Assembly-Lab
e038fb965e45a88aa670a1158bf99a4b62ac374f
[ "MIT" ]
null
null
null
Lab2April/d2b.asm
forkkr/Assembly-Lab
e038fb965e45a88aa670a1158bf99a4b62ac374f
[ "MIT" ]
null
null
null
extern printf extern scanf extern gets SECTION .data int_in_fmt: db "%ld",0 int_out_fmt: db "%ld",0 int: dq 0 char: db 0 out_str_fmt: db "%s",10,0 in_str_fmt: db "%s",0 out_char_fmt: db "%c",10,0 in_char_fmt: db "%c",0 strs: db 0 SECTION .bss str: resb 100 arr: resq 100 SECTION .text global main main: push rbp mov rbp,rsp call scan_int push rax call binary mov rsi, strs call print_str leave ret binary: push rbp mov rbp,rsp mov rax,[rbp+16] cmp rax,0 je return mov rdx,0 mov rbx,2 div rbx push rdx push rax call binary pop rax pop rax call print_int return: leave ret print_str: push rdx push rcx push rax push rdi push rsi mov rdi,out_str_fmt mov rax,0 call printf pop rsi pop rdi pop rax pop rcx pop rdx ret ;scans 64 bit int and puts it on rax scan_int: push rdx push rcx push rax push rdi push rsi mov rdi,int_in_fmt mov rsi,int mov rax,0 call scanf pop rsi pop rdi pop rax pop rcx pop rdx mov rax,[int] ret ;print rax(64 bit int) print_int: push rdx push rcx push rax push rdi push rsi mov rdi,int_out_fmt mov rsi,rax mov rax,0 call printf pop rsi pop rdi pop rax pop rcx pop rdx ret
10.882353
36
0.633977
99948a84400fcfcbacb63473a83731d434ca9bdc
519
asm
Assembly
oeis/037/A037111.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/037/A037111.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/037/A037111.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A037111: Trajectory of 3 under map n->27n+1 if n odd, n->n/2 if n even ; Submitted by Jon Maiga ; 3,82,41,1108,554,277,7480,3740,1870,935,25246,12623,340822,170411,4601098,2300549,62114824,31057412,15528706,7764353,209637532,104818766,52409383,1415053342,707526671,19103220118 add $0,1 mov $1,$0 mov $0,3 lpb $1 mov $2,$0 mod $2,2 add $3,1 sub $3,$2 mov $4,$0 lpb $2 mul $0,9 add $0,1 mul $0,3 sub $0,2 sub $2,1 lpe lpb $3 div $0,2 sub $3,1 lpe sub $1,1 lpe mov $0,$4
18.535714
180
0.630058
454ec04ae88b69aec5ab5280dbca35fe41326ee3
719
asm
Assembly
oeis/025/A025228.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/025/A025228.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/025/A025228.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A025228: a(n) = a(1)*a(n-1) + a(2)*a(n-2) + ...+ a(n-1)*a(1) for n >= 3. ; Submitted by Jon Maiga ; 2,1,4,17,76,354,1704,8421,42508,218318,1137400,5996938,31940792,171605956,928931280,5061593709,27739833228,152809506582,845646470616,4699126915422,26209721959656,146681521121244,823429928805936,4635568494271458,26164055028730680,148028380046626572,839353395601384624,4769085923339484596,27148987714036365808,154826178654609946504,884416719050700918176,5059942789892711332861,28991380733173058343564,166337066846614898632422,955589820381552526558872,5496480887612472151994710 pow $1,$0 trn $0,1 seq $0,5572 ; Number of walks on cubic lattice starting and finishing on the xy plane and never going below it. add $0,$1
79.888889
476
0.819193
4f26e766c852454b70f1d6ad45b2b11505457eb5
715
asm
Assembly
programs/oeis/131/A131724.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/131/A131724.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/131/A131724.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A131724: Period 6: repeat [1, 9, 7, 13, 11, 9]. ; 1,9,7,13,11,9,1,9,7,13,11,9,1,9,7,13,11,9,1,9,7,13,11,9,1,9,7,13,11,9,1,9,7,13,11,9,1,9,7,13,11,9,1,9,7,13,11,9,1,9,7,13,11,9,1,9,7,13,11,9,1,9,7,13,11,9,1,9,7,13,11,9,1,9,7,13,11,9,1,9,7,13,11,9,1,9,7,13,11,9,1,9,7,13,11,9,1,9,7,13,11,9,1,9,7,13,11,9,1,9,7,13,11,9,1,9,7,13,11,9,1,9,7,13,11,9,1,9,7,13,11,9,1,9,7,13,11,9,1,9,7,13,11,9,1,9,7,13,11,9,1,9,7,13,11,9,1,9,7,13,11,9,1,9,7,13,11,9,1,9,7,13,11,9,1,9,7,13,11,9,1,9,7,13,11,9,1,9,7,13,11,9,1,9,7,13,11,9,1,9,7,13,11,9,1,9,7,13,11,9,1,9,7,13,11,9,1,9,7,13,11,9,1,9,7,13,11,9,1,9,7,13,11,9,1,9,7,13,11,9,1,9,7,13,11,9,1,9,7,13 mod $0,6 mul $0,3 add $0,1 lpb $0 mov $1,$0 sub $0,4 lpe mul $1,2 add $1,1
55
584
0.563636
8bf68ad2af230855f4507d242c7319339f4b4f81
890
asm
Assembly
session_02/03-rwmemoria/rwmemoria.asm
DigiOhhh/LabArchitettura2-2017-2018
da34b9a75ab2945ac70d5cbf69395d0db5172f6f
[ "MIT" ]
1
2019-03-06T13:26:10.000Z
2019-03-06T13:26:10.000Z
session_02/03-rwmemoria/rwmemoria.asm
DigiOhhh/LabArchitettura2-2017-2018
da34b9a75ab2945ac70d5cbf69395d0db5172f6f
[ "MIT" ]
null
null
null
session_02/03-rwmemoria/rwmemoria.asm
DigiOhhh/LabArchitettura2-2017-2018
da34b9a75ab2945ac70d5cbf69395d0db5172f6f
[ "MIT" ]
1
2019-03-06T13:25:28.000Z
2019-03-06T13:25:28.000Z
.data A: .space 400 # vettore con 100 elementi B: .space 400 # vettore con 100 elementi C: .space 4 # intero a 32 bit i: .space 4 # intero a 32 bit .text .globl main main: # Inizializzazione registri indirizzi la $s0, A la $s1, B la $s2, C la $s3, i # Inizializzazione valori (i=3, C=2) addi $t0, $zero, 3 # $t0=3 sw $t0, 0($s3) # i=$t0=3 addi $t0, $zero, 2 # $t0=2 sw $t0, 0($s2) # C=$t0=2 # Inizializzazione valori (B[i]=10) addi $t0, $zero, 4 # $t0 = 4 lw $t1, 0($s3) # $t1 = i mult $t0, $t1 # lo = $t0 * $t1 = i * 4 mflo $t0 # $t0 = lo = i*4, offset for B[i] add $t1, $s1, $t0 # $t1 = $s1+$t0, address of B[i] addi $t2, $zero, 10 # $t2 = 10 sw $t2, 0($t1) # B[i] = $t2 = 10 # calcolo epressione lw $t0, 0($t1) # $t0 = B[i] lw $t1, 0($s2) # $t1 = C add $t0, $t0, $t1 # $t0 += C addi $t0, $t0, 5 # $t0 += 5 sw $t0,396($s0) # A[99] = $t0
22.820513
52
0.525843
5cb1e4589e5fe9b440eb4f323fa3a1fb2e2ed42b
710
asm
Assembly
programs/oeis/049/A049001.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/049/A049001.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/049/A049001.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A049001: a(n) = prime(n)^2 - 2. ; 2,7,23,47,119,167,287,359,527,839,959,1367,1679,1847,2207,2807,3479,3719,4487,5039,5327,6239,6887,7919,9407,10199,10607,11447,11879,12767,16127,17159,18767,19319,22199,22799,24647,26567,27887,29927,32039,32759,36479,37247,38807,39599,44519,49727,51527,52439,54287,57119,58079,62999,66047,69167,72359,73439,76727,78959,80087,85847,94247,96719,97967,100487,109559,113567,120407,121799,124607,128879,134687,139127,143639,146687,151319,157607,160799,167279,175559,177239,185759,187487,192719,196247,201599,208847,212519,214367,218087,229439,237167,241079,248999,253007,259079,271439,273527,292679 seq $0,6005 ; The odd prime numbers together with 1. pow $0,2 max $0,4 sub $0,2
88.75
594
0.794366
55825b828e604a4089f9e2fe7faba397bff2fdcc
440
asm
Assembly
oeis/025/A025989.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/025/A025989.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/025/A025989.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A025989: Expansion of 1/((1-2x)(1-5x)(1-6x)(1-10x)). ; Submitted by Jon Maiga ; 1,23,347,4375,50211,546063,5750347,59371895,605580371,6130227103,61765086747,620509140615,6222647943331,62333853156143,623992946413547,6243906815856535,62463186581999091,624777847926261183 mov $1,1 mov $2,$0 mov $3,$0 lpb $2 mov $0,$3 sub $2,1 sub $0,$2 seq $0,16307 ; Expansion of 1/((1-2*x)*(1-6*x)*(1-10*x)). mul $1,5 add $1,$0 lpe mov $0,$1
25.882353
190
0.693182
ee4f6ea3c55c46031f527827a689c13be1a11163
431
asm
Assembly
libsrc/oz/ozserial/ozgetrxhandshaking.asm
andydansby/z88dk-mk2
51c15f1387293809c496f5eaf7b196f8a0e9b66b
[ "ClArtistic" ]
1
2020-09-15T08:35:49.000Z
2020-09-15T08:35:49.000Z
libsrc/oz/ozserial/ozgetrxhandshaking.asm
andydansby/z88dk-MK2
51c15f1387293809c496f5eaf7b196f8a0e9b66b
[ "ClArtistic" ]
null
null
null
libsrc/oz/ozserial/ozgetrxhandshaking.asm
andydansby/z88dk-MK2
51c15f1387293809c496f5eaf7b196f8a0e9b66b
[ "ClArtistic" ]
null
null
null
; ; Sharp OZ family functions ; ; ported from the OZ-7xx SDK by by Alexander R. Pruss ; by Stefano Bodrato - Oct. 2003 ; ; Serial libraries ; buffered serial input ; ; ------ ; $Id: ozgetrxhandshaking.asm,v 1.1 2003/10/21 17:15:21 stefano Exp $ ; XLIB ozgetrxhandshaking LIB serial_int XREF SerialBuffer XREF ozrxhandshaking ozgetrxhandshaking: ld a,(ozrxhandshaking) ld h,0 ld l,a ret
16.576923
69
0.663573
43c07c3260f1ff58ab81f68a9d60bb978508922d
5,884
asm
Assembly
Transynther/x86/_processed/US/_st_zr_/i7-8650U_0xd2.log_2666_271.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/US/_st_zr_/i7-8650U_0xd2.log_2666_271.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/US/_st_zr_/i7-8650U_0xd2.log_2666_271.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r11 push %r13 push %r14 push %r15 push %r9 push %rbp push %rcx push %rdi push %rsi lea addresses_A_ht+0xb8f7, %r11 nop nop nop xor %r9, %r9 movl $0x61626364, (%r11) cmp %r13, %r13 lea addresses_A_ht+0x1d0f7, %r10 nop nop nop nop nop cmp $61642, %rbp mov (%r10), %r14 nop dec %r10 lea addresses_WT_ht+0x1d585, %r11 clflush (%r11) nop nop nop nop add $45270, %rbp movw $0x6162, (%r11) nop nop nop nop and %r9, %r9 lea addresses_A_ht+0x277f, %rbp nop nop nop and %r13, %r13 movl $0x61626364, (%rbp) nop cmp $9184, %r14 lea addresses_normal_ht+0x1df17, %rsi lea addresses_D_ht+0x8587, %rdi nop nop cmp %r14, %r14 mov $18, %rcx rep movsb nop nop lfence lea addresses_WC_ht+0x1ee17, %rcx nop nop inc %rdi mov (%rcx), %r11 nop nop nop nop cmp %rsi, %rsi lea addresses_D_ht+0x97a7, %rsi lea addresses_D_ht+0x157c2, %rdi add %r13, %r13 mov $8, %rcx rep movsq nop xor $46925, %r15 pop %rsi pop %rdi pop %rcx pop %rbp pop %r9 pop %r15 pop %r14 pop %r13 pop %r11 pop %r10 ret .global s_faulty_load s_faulty_load: push %r15 push %r9 push %rax push %rbx push %rcx push %rdi push %rsi // REPMOV lea addresses_PSE+0x13bcb, %rsi mov $0x4d7, %rdi nop nop nop and %rax, %rax mov $109, %rcx rep movsl nop nop dec %rdi // Faulty Load lea addresses_US+0x1e4f7, %rdi nop nop xor %r15, %r15 mov (%rdi), %si lea oracles, %rax and $0xff, %rsi shlq $12, %rsi mov (%rax,%rsi,1), %rsi pop %rsi pop %rdi pop %rcx pop %rbx pop %rax pop %r9 pop %r15 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_US', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} {'OP': 'REPM', 'src': {'type': 'addresses_PSE', 'congruent': 2, 'same': False}, 'dst': {'type': 'addresses_P', 'congruent': 5, 'same': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_US', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': True}} {'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 9, 'same': True}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 1, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 3, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 5, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 4, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'size': 8, 'AVXalign': False, 'NT': True, 'congruent': 5, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 2, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 0, 'same': False}} {'33': 2654, '00': 12} 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 00 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 00 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 */
39.226667
2,999
0.656526
82fdddcd3ae910bb78bd6037a443b6ad921567b4
41,936
asm
Assembly
target/cos_117/disasm/iop_overlay1/COMM11.asm
jrrk2/cray-sim
52c9639808d6890517092637b188282c00cce4f7
[ "BSL-1.0" ]
49
2020-10-09T12:29:16.000Z
2022-03-12T02:33:35.000Z
target/cos_117/disasm/iop_overlay1/COMM11.asm
jrrk2/cray-sim
52c9639808d6890517092637b188282c00cce4f7
[ "BSL-1.0" ]
1
2021-12-29T15:59:25.000Z
2021-12-29T15:59:25.000Z
target/cos_117/disasm/iop_overlay1/COMM11.asm
jrrk2/cray-sim
52c9639808d6890517092637b188282c00cce4f7
[ "BSL-1.0" ]
6
2021-04-12T06:10:32.000Z
2022-02-08T23:11:19.000Z
0x0000 (0x000000) 0x2104- f:00020 d: 260 | A = OR[260] 0x0001 (0x000002) 0x290D- f:00024 d: 269 | OR[269] = A 0x0002 (0x000004) 0x2104- f:00020 d: 260 | A = OR[260] 0x0003 (0x000006) 0x1403- f:00012 d: 3 | A = A + 3 (0x0003) 0x0004 (0x000008) 0x1A00-0xFFFC f:00015 d: 0 | A = A & 65532 (0xFFFC) 0x0006 (0x00000C) 0x2904- f:00024 d: 260 | OR[260] = A 0x0007 (0x00000E) 0x2104- f:00020 d: 260 | A = OR[260] 0x0008 (0x000010) 0x291E- f:00024 d: 286 | OR[286] = A 0x0009 (0x000012) 0x1014- f:00010 d: 20 | A = 20 (0x0014) 0x000A (0x000014) 0x2B04- f:00025 d: 260 | OR[260] = A + OR[260] 0x000B (0x000016) 0x2104- f:00020 d: 260 | A = OR[260] 0x000C (0x000018) 0x2705- f:00023 d: 261 | A = A - OR[261] 0x000D (0x00001A) 0xB234- f:00131 d: 52 | R = OR[52], C = 1 0x000E (0x00001C) 0x000B- f:00000 d: 11 | PASS | **** non-standard encoding with D:0x000B **** 0x000F (0x00001E) 0x210D- f:00020 d: 269 | A = OR[269] 0x0010 (0x000020) 0x3904- f:00034 d: 260 | (OR[260]) = A 0x0011 (0x000022) 0x2D04- f:00026 d: 260 | OR[260] = OR[260] + 1 0x0012 (0x000024) 0x1028- f:00010 d: 40 | A = 40 (0x0028) 0x0013 (0x000026) 0x292D- f:00024 d: 301 | OR[301] = A 0x0014 (0x000028) 0x1800-0x012A f:00014 d: 0 | A = 298 (0x012A) 0x0016 (0x00002C) 0x292E- f:00024 d: 302 | OR[302] = A 0x0017 (0x00002E) 0x2119- f:00020 d: 281 | A = OR[281] 0x0018 (0x000030) 0x292F- f:00024 d: 303 | OR[303] = A 0x0019 (0x000032) 0x211C- f:00020 d: 284 | A = OR[284] 0x001A (0x000034) 0x2930- f:00024 d: 304 | OR[304] = A 0x001B (0x000036) 0x211D- f:00020 d: 285 | A = OR[285] 0x001C (0x000038) 0x2931- f:00024 d: 305 | OR[305] = A 0x001D (0x00003A) 0x1800-0x0138 f:00014 d: 0 | A = 312 (0x0138) 0x001F (0x00003E) 0x2932- f:00024 d: 306 | OR[306] = A 0x0020 (0x000040) 0x211E- f:00020 d: 286 | A = OR[286] 0x0021 (0x000042) 0x2933- f:00024 d: 307 | OR[307] = A 0x0022 (0x000044) 0x1010- f:00010 d: 16 | A = 16 (0x0010) 0x0023 (0x000046) 0x2934- f:00024 d: 308 | OR[308] = A 0x0024 (0x000048) 0x1011- f:00010 d: 17 | A = 17 (0x0011) 0x0025 (0x00004A) 0x2935- f:00024 d: 309 | OR[309] = A 0x0026 (0x00004C) 0x112D- f:00010 d: 301 | A = 301 (0x012D) 0x0027 (0x00004E) 0x5800- f:00054 d: 0 | B = A 0x0028 (0x000050) 0x1800-0x2B18 f:00014 d: 0 | A = 11032 (0x2B18) 0x002A (0x000054) 0x7C09- f:00076 d: 9 | R = OR[9] 0x002B (0x000056) 0x8602- f:00103 d: 2 | P = P + 2 (0x002D), A # 0 0x002C (0x000058) 0x7010- f:00070 d: 16 | P = P + 16 (0x003C) 0x002D (0x00005A) 0x2F04- f:00027 d: 260 | OR[260] = OR[260] - 1 0x002E (0x00005C) 0x3104- f:00030 d: 260 | A = (OR[260]) 0x002F (0x00005E) 0x2904- f:00024 d: 260 | OR[260] = A 0x0030 (0x000060) 0x2104- f:00020 d: 260 | A = OR[260] 0x0031 (0x000062) 0x2706- f:00023 d: 262 | A = A - OR[262] 0x0032 (0x000064) 0x8007- f:00100 d: 7 | P = P + 7 (0x0039), C = 0 0x0033 (0x000066) 0x2104- f:00020 d: 260 | A = OR[260] 0x0034 (0x000068) 0x2705- f:00023 d: 261 | A = A - OR[261] 0x0035 (0x00006A) 0x8003- f:00100 d: 3 | P = P + 3 (0x0038), C = 0 0x0036 (0x00006C) 0x8402- f:00102 d: 2 | P = P + 2 (0x0038), A = 0 0x0037 (0x00006E) 0x7002- f:00070 d: 2 | P = P + 2 (0x0039) 0x0038 (0x000070) 0x7003- f:00070 d: 3 | P = P + 3 (0x003B) 0x0039 (0x000072) 0x7C34- f:00076 d: 52 | R = OR[52] 0x003A (0x000074) 0x000B- f:00000 d: 11 | PASS | **** non-standard encoding with D:0x000B **** 0x003B (0x000076) 0x719B- f:00070 d: 411 | P = P + 411 (0x01D6) 0x003C (0x000078) 0x211E- f:00020 d: 286 | A = OR[286] 0x003D (0x00007A) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001) 0x003E (0x00007C) 0x2908- f:00024 d: 264 | OR[264] = A 0x003F (0x00007E) 0x3108- f:00030 d: 264 | A = (OR[264]) 0x0040 (0x000080) 0x2921- f:00024 d: 289 | OR[289] = A 0x0041 (0x000082) 0x211E- f:00020 d: 286 | A = OR[286] 0x0042 (0x000084) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002) 0x0043 (0x000086) 0x2908- f:00024 d: 264 | OR[264] = A 0x0044 (0x000088) 0x3108- f:00030 d: 264 | A = (OR[264]) 0x0045 (0x00008A) 0x2922- f:00024 d: 290 | OR[290] = A 0x0046 (0x00008C) 0x7596- f:00072 d: 406 | R = P + 406 (0x01DC) 0x0047 (0x00008E) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x0048 (0x000090) 0x2924- f:00024 d: 292 | OR[292] = A 0x0049 (0x000092) 0x311E- f:00030 d: 286 | A = (OR[286]) 0x004A (0x000094) 0x0808- f:00004 d: 8 | A = A > 8 (0x0008) 0x004B (0x000096) 0x2913- f:00024 d: 275 | OR[275] = A 0x004C (0x000098) 0x2113- f:00020 d: 275 | A = OR[275] 0x004D (0x00009A) 0x160C- f:00013 d: 12 | A = A - 12 (0x000C) 0x004E (0x00009C) 0x8602- f:00103 d: 2 | P = P + 2 (0x0050), A # 0 0x004F (0x00009E) 0x700B- f:00070 d: 11 | P = P + 11 (0x005A) 0x0050 (0x0000A0) 0x211E- f:00020 d: 286 | A = OR[286] 0x0051 (0x0000A2) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001) 0x0052 (0x0000A4) 0x2908- f:00024 d: 264 | OR[264] = A 0x0053 (0x0000A6) 0x3108- f:00030 d: 264 | A = (OR[264]) 0x0054 (0x0000A8) 0x2923- f:00024 d: 291 | OR[291] = A 0x0055 (0x0000AA) 0x211E- f:00020 d: 286 | A = OR[286] 0x0056 (0x0000AC) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002) 0x0057 (0x0000AE) 0x2908- f:00024 d: 264 | OR[264] = A 0x0058 (0x0000B0) 0x3108- f:00030 d: 264 | A = (OR[264]) 0x0059 (0x0000B2) 0x2924- f:00024 d: 292 | OR[292] = A 0x005A (0x0000B4) 0x7582- f:00072 d: 386 | R = P + 386 (0x01DC) 0x005B (0x0000B6) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x005C (0x0000B8) 0x2920- f:00024 d: 288 | OR[288] = A 0x005D (0x0000BA) 0x311E- f:00030 d: 286 | A = (OR[286]) 0x005E (0x0000BC) 0x0808- f:00004 d: 8 | A = A > 8 (0x0008) 0x005F (0x0000BE) 0x2913- f:00024 d: 275 | OR[275] = A 0x0060 (0x0000C0) 0x2113- f:00020 d: 275 | A = OR[275] 0x0061 (0x0000C2) 0x160C- f:00013 d: 12 | A = A - 12 (0x000C) 0x0062 (0x0000C4) 0x8602- f:00103 d: 2 | P = P + 2 (0x0064), A # 0 0x0063 (0x0000C6) 0x7006- f:00070 d: 6 | P = P + 6 (0x0069) 0x0064 (0x0000C8) 0x211E- f:00020 d: 286 | A = OR[286] 0x0065 (0x0000CA) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002) 0x0066 (0x0000CC) 0x2908- f:00024 d: 264 | OR[264] = A 0x0067 (0x0000CE) 0x3108- f:00030 d: 264 | A = (OR[264]) 0x0068 (0x0000D0) 0x2920- f:00024 d: 288 | OR[288] = A 0x0069 (0x0000D2) 0x7573- f:00072 d: 371 | R = P + 371 (0x01DC) 0x006A (0x0000D4) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x006B (0x0000D6) 0x2925- f:00024 d: 293 | OR[293] = A 0x006C (0x0000D8) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x006D (0x0000DA) 0x2926- f:00024 d: 294 | OR[294] = A 0x006E (0x0000DC) 0x311E- f:00030 d: 286 | A = (OR[286]) 0x006F (0x0000DE) 0x0808- f:00004 d: 8 | A = A > 8 (0x0008) 0x0070 (0x0000E0) 0x2913- f:00024 d: 275 | OR[275] = A 0x0071 (0x0000E2) 0x2113- f:00020 d: 275 | A = OR[275] 0x0072 (0x0000E4) 0x160C- f:00013 d: 12 | A = A - 12 (0x000C) 0x0073 (0x0000E6) 0x8602- f:00103 d: 2 | P = P + 2 (0x0075), A # 0 0x0074 (0x0000E8) 0x7014- f:00070 d: 20 | P = P + 20 (0x0088) 0x0075 (0x0000EA) 0x211E- f:00020 d: 286 | A = OR[286] 0x0076 (0x0000EC) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001) 0x0077 (0x0000EE) 0x2908- f:00024 d: 264 | OR[264] = A 0x0078 (0x0000F0) 0x3108- f:00030 d: 264 | A = (OR[264]) 0x0079 (0x0000F2) 0x2925- f:00024 d: 293 | OR[293] = A 0x007A (0x0000F4) 0x211E- f:00020 d: 286 | A = OR[286] 0x007B (0x0000F6) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002) 0x007C (0x0000F8) 0x2908- f:00024 d: 264 | OR[264] = A 0x007D (0x0000FA) 0x3108- f:00030 d: 264 | A = (OR[264]) 0x007E (0x0000FC) 0x2926- f:00024 d: 294 | OR[294] = A 0x007F (0x0000FE) 0x1800-0x01F7 f:00014 d: 0 | A = 503 (0x01F7) 0x0081 (0x000102) 0x292A- f:00024 d: 298 | OR[298] = A 0x0082 (0x000104) 0x1800-0x0274 f:00014 d: 0 | A = 628 (0x0274) 0x0084 (0x000108) 0x292B- f:00024 d: 299 | OR[299] = A 0x0085 (0x00010A) 0x11C0- f:00010 d: 448 | A = 448 (0x01C0) 0x0086 (0x00010C) 0x292C- f:00024 d: 300 | OR[300] = A 0x0087 (0x00010E) 0x7009- f:00070 d: 9 | P = P + 9 (0x0090) 0x0088 (0x000110) 0x1800-0x01B6 f:00014 d: 0 | A = 438 (0x01B6) 0x008A (0x000114) 0x292A- f:00024 d: 298 | OR[298] = A 0x008B (0x000116) 0x1800-0x0233 f:00014 d: 0 | A = 563 (0x0233) 0x008D (0x00011A) 0x292B- f:00024 d: 299 | OR[299] = A 0x008E (0x00011C) 0x1140- f:00010 d: 320 | A = 320 (0x0140) 0x008F (0x00011E) 0x292C- f:00024 d: 300 | OR[300] = A 0x0090 (0x000120) 0x2F04- f:00027 d: 260 | OR[260] = OR[260] - 1 0x0091 (0x000122) 0x3104- f:00030 d: 260 | A = (OR[260]) 0x0092 (0x000124) 0x2904- f:00024 d: 260 | OR[260] = A 0x0093 (0x000126) 0x2104- f:00020 d: 260 | A = OR[260] 0x0094 (0x000128) 0x2706- f:00023 d: 262 | A = A - OR[262] 0x0095 (0x00012A) 0x8007- f:00100 d: 7 | P = P + 7 (0x009C), C = 0 0x0096 (0x00012C) 0x2104- f:00020 d: 260 | A = OR[260] 0x0097 (0x00012E) 0x2705- f:00023 d: 261 | A = A - OR[261] 0x0098 (0x000130) 0x8003- f:00100 d: 3 | P = P + 3 (0x009B), C = 0 0x0099 (0x000132) 0x8402- f:00102 d: 2 | P = P + 2 (0x009B), A = 0 0x009A (0x000134) 0x7002- f:00070 d: 2 | P = P + 2 (0x009C) 0x009B (0x000136) 0x7003- f:00070 d: 3 | P = P + 3 (0x009E) 0x009C (0x000138) 0x7C34- f:00076 d: 52 | R = OR[52] 0x009D (0x00013A) 0x000B- f:00000 d: 11 | PASS | **** non-standard encoding with D:0x000B **** 0x009E (0x00013C) 0x212C- f:00020 d: 300 | A = OR[300] 0x009F (0x00013E) 0x140F- f:00012 d: 15 | A = A + 15 (0x000F) 0x00A0 (0x000140) 0x0804- f:00004 d: 4 | A = A > 4 (0x0004) 0x00A1 (0x000142) 0x2913- f:00024 d: 275 | OR[275] = A 0x00A2 (0x000144) 0x2104- f:00020 d: 260 | A = OR[260] 0x00A3 (0x000146) 0x290D- f:00024 d: 269 | OR[269] = A 0x00A4 (0x000148) 0x2104- f:00020 d: 260 | A = OR[260] 0x00A5 (0x00014A) 0x1403- f:00012 d: 3 | A = A + 3 (0x0003) 0x00A6 (0x00014C) 0x1A00-0xFFFC f:00015 d: 0 | A = A & 65532 (0xFFFC) 0x00A8 (0x000150) 0x2904- f:00024 d: 260 | OR[260] = A 0x00A9 (0x000152) 0x2104- f:00020 d: 260 | A = OR[260] 0x00AA (0x000154) 0x291F- f:00024 d: 287 | OR[287] = A 0x00AB (0x000156) 0x2113- f:00020 d: 275 | A = OR[275] 0x00AC (0x000158) 0x2504- f:00022 d: 260 | A = A + OR[260] 0x00AD (0x00015A) 0x2904- f:00024 d: 260 | OR[260] = A 0x00AE (0x00015C) 0x2104- f:00020 d: 260 | A = OR[260] 0x00AF (0x00015E) 0x2705- f:00023 d: 261 | A = A - OR[261] 0x00B0 (0x000160) 0xB234- f:00131 d: 52 | R = OR[52], C = 1 0x00B1 (0x000162) 0x000B- f:00000 d: 11 | PASS | **** non-standard encoding with D:0x000B **** 0x00B2 (0x000164) 0x210D- f:00020 d: 269 | A = OR[269] 0x00B3 (0x000166) 0x3904- f:00034 d: 260 | (OR[260]) = A 0x00B4 (0x000168) 0x2D04- f:00026 d: 260 | OR[260] = OR[260] + 1 0x00B5 (0x00016A) 0x211F- f:00020 d: 287 | A = OR[287] 0x00B6 (0x00016C) 0x290E- f:00024 d: 270 | OR[270] = A 0x00B7 (0x00016E) 0x2113- f:00020 d: 275 | A = OR[275] 0x00B8 (0x000170) 0x290D- f:00024 d: 269 | OR[269] = A 0x00B9 (0x000172) 0x210D- f:00020 d: 269 | A = OR[269] 0x00BA (0x000174) 0x8406- f:00102 d: 6 | P = P + 6 (0x00C0), A = 0 0x00BB (0x000176) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x00BC (0x000178) 0x390E- f:00034 d: 270 | (OR[270]) = A 0x00BD (0x00017A) 0x2F0D- f:00027 d: 269 | OR[269] = OR[269] - 1 0x00BE (0x00017C) 0x2D0E- f:00026 d: 270 | OR[270] = OR[270] + 1 0x00BF (0x00017E) 0x7206- f:00071 d: 6 | P = P - 6 (0x00B9) 0x00C0 (0x000180) 0x2120- f:00020 d: 288 | A = OR[288] 0x00C1 (0x000182) 0x1A00-0x0FFF f:00015 d: 0 | A = A & 4095 (0x0FFF) 0x00C3 (0x000186) 0x2920- f:00024 d: 288 | OR[288] = A 0x00C4 (0x000188) 0x211F- f:00020 d: 287 | A = OR[287] 0x00C5 (0x00018A) 0x1410- f:00012 d: 16 | A = A + 16 (0x0010) 0x00C6 (0x00018C) 0x2908- f:00024 d: 264 | OR[264] = A 0x00C7 (0x00018E) 0x3108- f:00030 d: 264 | A = (OR[264]) 0x00C8 (0x000190) 0x0A0D- f:00005 d: 13 | A = A < 13 (0x000D) 0x00C9 (0x000192) 0x2520- f:00022 d: 288 | A = A + OR[288] 0x00CA (0x000194) 0x0C0D- f:00006 d: 13 | A = A >> 13 (0x000D) 0x00CB (0x000196) 0x3908- f:00034 d: 264 | (OR[264]) = A 0x00CC (0x000198) 0x1008- f:00010 d: 8 | A = 8 (0x0008) 0x00CD (0x00019A) 0x2913- f:00024 d: 275 | OR[275] = A 0x00CE (0x00019C) 0x7515- f:00072 d: 277 | R = P + 277 (0x01E3) 0x00CF (0x00019E) 0x2123- f:00020 d: 291 | A = OR[291] 0x00D0 (0x0001A0) 0x2921- f:00024 d: 289 | OR[289] = A 0x00D1 (0x0001A2) 0x2124- f:00020 d: 292 | A = OR[292] 0x00D2 (0x0001A4) 0x2922- f:00024 d: 290 | OR[290] = A 0x00D3 (0x0001A6) 0x1018- f:00010 d: 24 | A = 24 (0x0018) 0x00D4 (0x0001A8) 0x2913- f:00024 d: 275 | OR[275] = A 0x00D5 (0x0001AA) 0x750E- f:00072 d: 270 | R = P + 270 (0x01E3) 0x00D6 (0x0001AC) 0x212C- f:00020 d: 300 | A = OR[300] 0x00D7 (0x0001AE) 0x17C0- f:00013 d: 448 | A = A - 448 (0x01C0) 0x00D8 (0x0001B0) 0x8402- f:00102 d: 2 | P = P + 2 (0x00DA), A = 0 0x00D9 (0x0001B2) 0x7008- f:00070 d: 8 | P = P + 8 (0x00E1) 0x00DA (0x0001B4) 0x2125- f:00020 d: 293 | A = OR[293] 0x00DB (0x0001B6) 0x2921- f:00024 d: 289 | OR[289] = A 0x00DC (0x0001B8) 0x2126- f:00020 d: 294 | A = OR[294] 0x00DD (0x0001BA) 0x2922- f:00024 d: 290 | OR[290] = A 0x00DE (0x0001BC) 0x1028- f:00010 d: 40 | A = 40 (0x0028) 0x00DF (0x0001BE) 0x2913- f:00024 d: 275 | OR[275] = A 0x00E0 (0x0001C0) 0x7503- f:00072 d: 259 | R = P + 259 (0x01E3) 0x00E1 (0x0001C2) 0x1028- f:00010 d: 40 | A = 40 (0x0028) 0x00E2 (0x0001C4) 0x292D- f:00024 d: 301 | OR[301] = A 0x00E3 (0x0001C6) 0x1800-0x015A f:00014 d: 0 | A = 346 (0x015A) 0x00E5 (0x0001CA) 0x292E- f:00024 d: 302 | OR[302] = A 0x00E6 (0x0001CC) 0x212A- f:00020 d: 298 | A = OR[298] 0x00E7 (0x0001CE) 0x292F- f:00024 d: 303 | OR[303] = A 0x00E8 (0x0001D0) 0x211F- f:00020 d: 287 | A = OR[287] 0x00E9 (0x0001D2) 0x2930- f:00024 d: 304 | OR[304] = A 0x00EA (0x0001D4) 0x212C- f:00020 d: 300 | A = OR[300] 0x00EB (0x0001D6) 0x2931- f:00024 d: 305 | OR[305] = A 0x00EC (0x0001D8) 0x212B- f:00020 d: 299 | A = OR[299] 0x00ED (0x0001DA) 0x2932- f:00024 d: 306 | OR[306] = A 0x00EE (0x0001DC) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x00EF (0x0001DE) 0x2933- f:00024 d: 307 | OR[307] = A 0x00F0 (0x0001E0) 0x101B- f:00010 d: 27 | A = 27 (0x001B) 0x00F1 (0x0001E2) 0x2934- f:00024 d: 308 | OR[308] = A 0x00F2 (0x0001E4) 0x101C- f:00010 d: 28 | A = 28 (0x001C) 0x00F3 (0x0001E6) 0x2935- f:00024 d: 309 | OR[309] = A 0x00F4 (0x0001E8) 0x101D- f:00010 d: 29 | A = 29 (0x001D) 0x00F5 (0x0001EA) 0x2936- f:00024 d: 310 | OR[310] = A 0x00F6 (0x0001EC) 0x112D- f:00010 d: 301 | A = 301 (0x012D) 0x00F7 (0x0001EE) 0x5800- f:00054 d: 0 | B = A 0x00F8 (0x0001F0) 0x1800-0x2B18 f:00014 d: 0 | A = 11032 (0x2B18) 0x00FA (0x0001F4) 0x7C09- f:00076 d: 9 | R = OR[9] 0x00FB (0x0001F6) 0x2913- f:00024 d: 275 | OR[275] = A 0x00FC (0x0001F8) 0x2F04- f:00027 d: 260 | OR[260] = OR[260] - 1 0x00FD (0x0001FA) 0x3104- f:00030 d: 260 | A = (OR[260]) 0x00FE (0x0001FC) 0x2904- f:00024 d: 260 | OR[260] = A 0x00FF (0x0001FE) 0x2104- f:00020 d: 260 | A = OR[260] 0x0100 (0x000200) 0x2706- f:00023 d: 262 | A = A - OR[262] 0x0101 (0x000202) 0x8007- f:00100 d: 7 | P = P + 7 (0x0108), C = 0 0x0102 (0x000204) 0x2104- f:00020 d: 260 | A = OR[260] 0x0103 (0x000206) 0x2705- f:00023 d: 261 | A = A - OR[261] 0x0104 (0x000208) 0x8003- f:00100 d: 3 | P = P + 3 (0x0107), C = 0 0x0105 (0x00020A) 0x8402- f:00102 d: 2 | P = P + 2 (0x0107), A = 0 0x0106 (0x00020C) 0x7002- f:00070 d: 2 | P = P + 2 (0x0108) 0x0107 (0x00020E) 0x7003- f:00070 d: 3 | P = P + 3 (0x010A) 0x0108 (0x000210) 0x7C34- f:00076 d: 52 | R = OR[52] 0x0109 (0x000212) 0x000B- f:00000 d: 11 | PASS | **** non-standard encoding with D:0x000B **** 0x010A (0x000214) 0x2113- f:00020 d: 275 | A = OR[275] 0x010B (0x000216) 0x8602- f:00103 d: 2 | P = P + 2 (0x010D), A # 0 0x010C (0x000218) 0x7014- f:00070 d: 20 | P = P + 20 (0x0120) 0x010D (0x00021A) 0x1028- f:00010 d: 40 | A = 40 (0x0028) 0x010E (0x00021C) 0x292D- f:00024 d: 301 | OR[301] = A 0x010F (0x00021E) 0x1800-0x0137 f:00014 d: 0 | A = 311 (0x0137) 0x0111 (0x000222) 0x292E- f:00024 d: 302 | OR[302] = A 0x0112 (0x000224) 0x2113- f:00020 d: 275 | A = OR[275] 0x0113 (0x000226) 0x292F- f:00024 d: 303 | OR[303] = A 0x0114 (0x000228) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x0115 (0x00022A) 0x2930- f:00024 d: 304 | OR[304] = A 0x0116 (0x00022C) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x0117 (0x00022E) 0x2931- f:00024 d: 305 | OR[305] = A 0x0118 (0x000230) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x0119 (0x000232) 0x2932- f:00024 d: 306 | OR[306] = A 0x011A (0x000234) 0x112D- f:00010 d: 301 | A = 301 (0x012D) 0x011B (0x000236) 0x5800- f:00054 d: 0 | B = A 0x011C (0x000238) 0x1800-0x2B18 f:00014 d: 0 | A = 11032 (0x2B18) 0x011E (0x00023C) 0x7C09- f:00076 d: 9 | R = OR[9] 0x011F (0x00023E) 0x70B7- f:00070 d: 183 | P = P + 183 (0x01D6) 0x0120 (0x000240) 0x212C- f:00020 d: 300 | A = OR[300] 0x0121 (0x000242) 0x17C0- f:00013 d: 448 | A = A - 448 (0x01C0) 0x0122 (0x000244) 0x8402- f:00102 d: 2 | P = P + 2 (0x0124), A = 0 0x0123 (0x000246) 0x7008- f:00070 d: 8 | P = P + 8 (0x012B) 0x0124 (0x000248) 0x104C- f:00010 d: 76 | A = 76 (0x004C) 0x0125 (0x00024A) 0x2921- f:00024 d: 289 | OR[289] = A 0x0126 (0x00024C) 0x1038- f:00010 d: 56 | A = 56 (0x0038) 0x0127 (0x00024E) 0x2922- f:00024 d: 290 | OR[290] = A 0x0128 (0x000250) 0x1050- f:00010 d: 80 | A = 80 (0x0050) 0x0129 (0x000252) 0x2923- f:00024 d: 291 | OR[291] = A 0x012A (0x000254) 0x7007- f:00070 d: 7 | P = P + 7 (0x0131) 0x012B (0x000256) 0x1038- f:00010 d: 56 | A = 56 (0x0038) 0x012C (0x000258) 0x2921- f:00024 d: 289 | OR[289] = A 0x012D (0x00025A) 0x1028- f:00010 d: 40 | A = 40 (0x0028) 0x012E (0x00025C) 0x2922- f:00024 d: 290 | OR[290] = A 0x012F (0x00025E) 0x1048- f:00010 d: 72 | A = 72 (0x0048) 0x0130 (0x000260) 0x2923- f:00024 d: 291 | OR[291] = A 0x0131 (0x000262) 0x2104- f:00020 d: 260 | A = OR[260] 0x0132 (0x000264) 0x290D- f:00024 d: 269 | OR[269] = A 0x0133 (0x000266) 0x2104- f:00020 d: 260 | A = OR[260] 0x0134 (0x000268) 0x1403- f:00012 d: 3 | A = A + 3 (0x0003) 0x0135 (0x00026A) 0x1A00-0xFFFC f:00015 d: 0 | A = A & 65532 (0xFFFC) 0x0137 (0x00026E) 0x2904- f:00024 d: 260 | OR[260] = A 0x0138 (0x000270) 0x2104- f:00020 d: 260 | A = OR[260] 0x0139 (0x000272) 0x291F- f:00024 d: 287 | OR[287] = A 0x013A (0x000274) 0x2121- f:00020 d: 289 | A = OR[289] 0x013B (0x000276) 0x2504- f:00022 d: 260 | A = A + OR[260] 0x013C (0x000278) 0x2904- f:00024 d: 260 | OR[260] = A 0x013D (0x00027A) 0x2104- f:00020 d: 260 | A = OR[260] 0x013E (0x00027C) 0x2705- f:00023 d: 261 | A = A - OR[261] 0x013F (0x00027E) 0xB234- f:00131 d: 52 | R = OR[52], C = 1 0x0140 (0x000280) 0x000B- f:00000 d: 11 | PASS | **** non-standard encoding with D:0x000B **** 0x0141 (0x000282) 0x210D- f:00020 d: 269 | A = OR[269] 0x0142 (0x000284) 0x3904- f:00034 d: 260 | (OR[260]) = A 0x0143 (0x000286) 0x2D04- f:00026 d: 260 | OR[260] = OR[260] + 1 0x0144 (0x000288) 0x1026- f:00010 d: 38 | A = 38 (0x0026) 0x0145 (0x00028A) 0x292D- f:00024 d: 301 | OR[301] = A 0x0146 (0x00028C) 0x2127- f:00020 d: 295 | A = OR[295] 0x0147 (0x00028E) 0x292E- f:00024 d: 302 | OR[302] = A 0x0148 (0x000290) 0x2128- f:00020 d: 296 | A = OR[296] 0x0149 (0x000292) 0x292F- f:00024 d: 303 | OR[303] = A 0x014A (0x000294) 0x211F- f:00020 d: 287 | A = OR[287] 0x014B (0x000296) 0x2930- f:00024 d: 304 | OR[304] = A 0x014C (0x000298) 0x2121- f:00020 d: 289 | A = OR[289] 0x014D (0x00029A) 0x0802- f:00004 d: 2 | A = A > 2 (0x0002) 0x014E (0x00029C) 0x2931- f:00024 d: 305 | OR[305] = A 0x014F (0x00029E) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x0150 (0x0002A0) 0x2932- f:00024 d: 306 | OR[306] = A 0x0151 (0x0002A2) 0x112D- f:00010 d: 301 | A = 301 (0x012D) 0x0152 (0x0002A4) 0x5800- f:00054 d: 0 | B = A 0x0153 (0x0002A6) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x0154 (0x0002A8) 0x7C09- f:00076 d: 9 | R = OR[9] 0x0155 (0x0002AA) 0x101E- f:00010 d: 30 | A = 30 (0x001E) 0x0156 (0x0002AC) 0x292D- f:00024 d: 301 | OR[301] = A 0x0157 (0x0002AE) 0x2127- f:00020 d: 295 | A = OR[295] 0x0158 (0x0002B0) 0x292E- f:00024 d: 302 | OR[302] = A 0x0159 (0x0002B2) 0x2128- f:00020 d: 296 | A = OR[296] 0x015A (0x0002B4) 0x292F- f:00024 d: 303 | OR[303] = A 0x015B (0x0002B6) 0x1001- f:00010 d: 1 | A = 1 (0x0001) 0x015C (0x0002B8) 0x2930- f:00024 d: 304 | OR[304] = A 0x015D (0x0002BA) 0x112D- f:00010 d: 301 | A = 301 (0x012D) 0x015E (0x0002BC) 0x5800- f:00054 d: 0 | B = A 0x015F (0x0002BE) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x0160 (0x0002C0) 0x7C09- f:00076 d: 9 | R = OR[9] 0x0161 (0x0002C2) 0x2122- f:00020 d: 290 | A = OR[290] 0x0162 (0x0002C4) 0x2913- f:00024 d: 275 | OR[275] = A 0x0163 (0x0002C6) 0x2123- f:00020 d: 291 | A = OR[291] 0x0164 (0x0002C8) 0x2914- f:00024 d: 276 | OR[276] = A 0x0165 (0x0002CA) 0x2114- f:00020 d: 276 | A = OR[276] 0x0166 (0x0002CC) 0x8439- f:00102 d: 57 | P = P + 57 (0x019F), A = 0 0x0167 (0x0002CE) 0x2113- f:00020 d: 275 | A = OR[275] 0x0168 (0x0002D0) 0x0801- f:00004 d: 1 | A = A > 1 (0x0001) 0x0169 (0x0002D2) 0x251F- f:00022 d: 287 | A = A + OR[287] 0x016A (0x0002D4) 0x290D- f:00024 d: 269 | OR[269] = A 0x016B (0x0002D6) 0x310D- f:00030 d: 269 | A = (OR[269]) 0x016C (0x0002D8) 0x290D- f:00024 d: 269 | OR[269] = A 0x016D (0x0002DA) 0x2113- f:00020 d: 275 | A = OR[275] 0x016E (0x0002DC) 0x1201- f:00011 d: 1 | A = A & 1 (0x0001) 0x016F (0x0002DE) 0x2908- f:00024 d: 264 | OR[264] = A 0x0170 (0x0002E0) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x0171 (0x0002E2) 0x2708- f:00023 d: 264 | A = A - OR[264] 0x0172 (0x0002E4) 0x8604- f:00103 d: 4 | P = P + 4 (0x0176), A # 0 0x0173 (0x0002E6) 0x210D- f:00020 d: 269 | A = OR[269] 0x0174 (0x0002E8) 0x0808- f:00004 d: 8 | A = A > 8 (0x0008) 0x0175 (0x0002EA) 0x290D- f:00024 d: 269 | OR[269] = A 0x0176 (0x0002EC) 0x210D- f:00020 d: 269 | A = OR[269] 0x0177 (0x0002EE) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF) 0x0178 (0x0002F0) 0x2915- f:00024 d: 277 | OR[277] = A 0x0179 (0x0002F2) 0x2115- f:00020 d: 277 | A = OR[277] 0x017A (0x0002F4) 0x1620- f:00013 d: 32 | A = A - 32 (0x0020) 0x017B (0x0002F6) 0x8007- f:00100 d: 7 | P = P + 7 (0x0182), C = 0 0x017C (0x0002F8) 0x2115- f:00020 d: 277 | A = OR[277] 0x017D (0x0002FA) 0x167F- f:00013 d: 127 | A = A - 127 (0x007F) 0x017E (0x0002FC) 0x8003- f:00100 d: 3 | P = P + 3 (0x0181), C = 0 0x017F (0x0002FE) 0x8402- f:00102 d: 2 | P = P + 2 (0x0181), A = 0 0x0180 (0x000300) 0x7002- f:00070 d: 2 | P = P + 2 (0x0182) 0x0181 (0x000302) 0x701B- f:00070 d: 27 | P = P + 27 (0x019C) 0x0182 (0x000304) 0x1020- f:00010 d: 32 | A = 32 (0x0020) 0x0183 (0x000306) 0x2915- f:00024 d: 277 | OR[277] = A 0x0184 (0x000308) 0x2115- f:00020 d: 277 | A = OR[277] 0x0185 (0x00030A) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF) 0x0186 (0x00030C) 0x290D- f:00024 d: 269 | OR[269] = A 0x0187 (0x00030E) 0x2113- f:00020 d: 275 | A = OR[275] 0x0188 (0x000310) 0x0801- f:00004 d: 1 | A = A > 1 (0x0001) 0x0189 (0x000312) 0x251F- f:00022 d: 287 | A = A + OR[287] 0x018A (0x000314) 0x290E- f:00024 d: 270 | OR[270] = A 0x018B (0x000316) 0x2113- f:00020 d: 275 | A = OR[275] 0x018C (0x000318) 0x1201- f:00011 d: 1 | A = A & 1 (0x0001) 0x018D (0x00031A) 0x2908- f:00024 d: 264 | OR[264] = A 0x018E (0x00031C) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x018F (0x00031E) 0x2708- f:00023 d: 264 | A = A - OR[264] 0x0190 (0x000320) 0x8607- f:00103 d: 7 | P = P + 7 (0x0197), A # 0 0x0191 (0x000322) 0x310E- f:00030 d: 270 | A = (OR[270]) 0x0192 (0x000324) 0x0A09- f:00005 d: 9 | A = A < 9 (0x0009) 0x0193 (0x000326) 0x250D- f:00022 d: 269 | A = A + OR[269] 0x0194 (0x000328) 0x0C09- f:00006 d: 9 | A = A >> 9 (0x0009) 0x0195 (0x00032A) 0x390E- f:00034 d: 270 | (OR[270]) = A 0x0196 (0x00032C) 0x7006- f:00070 d: 6 | P = P + 6 (0x019C) 0x0197 (0x00032E) 0x310E- f:00030 d: 270 | A = (OR[270]) 0x0198 (0x000330) 0x1A00-0xFF00 f:00015 d: 0 | A = A & 65280 (0xFF00) 0x019A (0x000334) 0x250D- f:00022 d: 269 | A = A + OR[269] 0x019B (0x000336) 0x390E- f:00034 d: 270 | (OR[270]) = A 0x019C (0x000338) 0x2D13- f:00026 d: 275 | OR[275] = OR[275] + 1 0x019D (0x00033A) 0x2F14- f:00027 d: 276 | OR[276] = OR[276] - 1 0x019E (0x00033C) 0x7239- f:00071 d: 57 | P = P - 57 (0x0165) 0x019F (0x00033E) 0x2102- f:00020 d: 258 | A = OR[258] 0x01A0 (0x000340) 0x1403- f:00012 d: 3 | A = A + 3 (0x0003) 0x01A1 (0x000342) 0x2908- f:00024 d: 264 | OR[264] = A 0x01A2 (0x000344) 0x3108- f:00030 d: 264 | A = (OR[264]) 0x01A3 (0x000346) 0x2913- f:00024 d: 275 | OR[275] = A 0x01A4 (0x000348) 0x1028- f:00010 d: 40 | A = 40 (0x0028) 0x01A5 (0x00034A) 0x292D- f:00024 d: 301 | OR[301] = A 0x01A6 (0x00034C) 0x1800-0x0123 f:00014 d: 0 | A = 291 (0x0123) 0x01A8 (0x000350) 0x292E- f:00024 d: 302 | OR[302] = A 0x01A9 (0x000352) 0x1800-0x0005 f:00014 d: 0 | A = 5 (0x0005) 0x01AB (0x000356) 0x292F- f:00024 d: 303 | OR[303] = A 0x01AC (0x000358) 0x2113- f:00020 d: 275 | A = OR[275] 0x01AD (0x00035A) 0x2930- f:00024 d: 304 | OR[304] = A 0x01AE (0x00035C) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x01AF (0x00035E) 0x2931- f:00024 d: 305 | OR[305] = A 0x01B0 (0x000360) 0x211F- f:00020 d: 287 | A = OR[287] 0x01B1 (0x000362) 0x2932- f:00024 d: 306 | OR[306] = A 0x01B2 (0x000364) 0x2122- f:00020 d: 290 | A = OR[290] 0x01B3 (0x000366) 0x2933- f:00024 d: 307 | OR[307] = A 0x01B4 (0x000368) 0x2123- f:00020 d: 291 | A = OR[291] 0x01B5 (0x00036A) 0x2934- f:00024 d: 308 | OR[308] = A 0x01B6 (0x00036C) 0x112D- f:00010 d: 301 | A = 301 (0x012D) 0x01B7 (0x00036E) 0x5800- f:00054 d: 0 | B = A 0x01B8 (0x000370) 0x1800-0x2B18 f:00014 d: 0 | A = 11032 (0x2B18) 0x01BA (0x000374) 0x7C09- f:00076 d: 9 | R = OR[9] 0x01BB (0x000376) 0x1028- f:00010 d: 40 | A = 40 (0x0028) 0x01BC (0x000378) 0x292D- f:00024 d: 301 | OR[301] = A 0x01BD (0x00037A) 0x1800-0x0123 f:00014 d: 0 | A = 291 (0x0123) 0x01BF (0x00037E) 0x292E- f:00024 d: 302 | OR[302] = A 0x01C0 (0x000380) 0x1800-0x0002 f:00014 d: 0 | A = 2 (0x0002) 0x01C2 (0x000384) 0x292F- f:00024 d: 303 | OR[303] = A 0x01C3 (0x000386) 0x112D- f:00010 d: 301 | A = 301 (0x012D) 0x01C4 (0x000388) 0x5800- f:00054 d: 0 | B = A 0x01C5 (0x00038A) 0x1800-0x2B18 f:00014 d: 0 | A = 11032 (0x2B18) 0x01C7 (0x00038E) 0x7C09- f:00076 d: 9 | R = OR[9] 0x01C8 (0x000390) 0x2F04- f:00027 d: 260 | OR[260] = OR[260] - 1 0x01C9 (0x000392) 0x3104- f:00030 d: 260 | A = (OR[260]) 0x01CA (0x000394) 0x2904- f:00024 d: 260 | OR[260] = A 0x01CB (0x000396) 0x2104- f:00020 d: 260 | A = OR[260] 0x01CC (0x000398) 0x2706- f:00023 d: 262 | A = A - OR[262] 0x01CD (0x00039A) 0x8007- f:00100 d: 7 | P = P + 7 (0x01D4), C = 0 0x01CE (0x00039C) 0x2104- f:00020 d: 260 | A = OR[260] 0x01CF (0x00039E) 0x2705- f:00023 d: 261 | A = A - OR[261] 0x01D0 (0x0003A0) 0x8003- f:00100 d: 3 | P = P + 3 (0x01D3), C = 0 0x01D1 (0x0003A2) 0x8402- f:00102 d: 2 | P = P + 2 (0x01D3), A = 0 0x01D2 (0x0003A4) 0x7002- f:00070 d: 2 | P = P + 2 (0x01D4) 0x01D3 (0x0003A6) 0x7003- f:00070 d: 3 | P = P + 3 (0x01D6) 0x01D4 (0x0003A8) 0x7C34- f:00076 d: 52 | R = OR[52] 0x01D5 (0x0003AA) 0x000B- f:00000 d: 11 | PASS | **** non-standard encoding with D:0x000B **** 0x01D6 (0x0003AC) 0x102A- f:00010 d: 42 | A = 42 (0x002A) 0x01D7 (0x0003AE) 0x292D- f:00024 d: 301 | OR[301] = A 0x01D8 (0x0003B0) 0x112D- f:00010 d: 301 | A = 301 (0x012D) 0x01D9 (0x0003B2) 0x5800- f:00054 d: 0 | B = A 0x01DA (0x0003B4) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x01DB (0x0003B6) 0x7C09- f:00076 d: 9 | R = OR[9] 0x01DC (0x0003B8) 0x311E- f:00030 d: 286 | A = (OR[286]) 0x01DD (0x0003BA) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF) 0x01DE (0x0003BC) 0x2913- f:00024 d: 275 | OR[275] = A 0x01DF (0x0003BE) 0x211E- f:00020 d: 286 | A = OR[286] 0x01E0 (0x0003C0) 0x2513- f:00022 d: 275 | A = A + OR[275] 0x01E1 (0x0003C2) 0x291E- f:00024 d: 286 | OR[286] = A 0x01E2 (0x0003C4) 0x0200- f:00001 d: 0 | EXIT 0x01E3 (0x0003C6) 0x2121- f:00020 d: 289 | A = OR[289] 0x01E4 (0x0003C8) 0x290F- f:00024 d: 271 | OR[271] = A 0x01E5 (0x0003CA) 0x2113- f:00020 d: 275 | A = OR[275] 0x01E6 (0x0003CC) 0x2910- f:00024 d: 272 | OR[272] = A 0x01E7 (0x0003CE) 0x2122- f:00020 d: 290 | A = OR[290] 0x01E8 (0x0003D0) 0x2911- f:00024 d: 273 | OR[273] = A 0x01E9 (0x0003D2) 0x7A03-0x021E f:00075 d: 3 | P = OR[3]+542 (0x021E) 0x01EB (0x0003D6) 0x210F- f:00020 d: 271 | A = OR[271] 0x01EC (0x0003D8) 0x0801- f:00004 d: 1 | A = A > 1 (0x0001) 0x01ED (0x0003DA) 0x2519- f:00022 d: 281 | A = A + OR[281] 0x01EE (0x0003DC) 0x290D- f:00024 d: 269 | OR[269] = A 0x01EF (0x0003DE) 0x310D- f:00030 d: 269 | A = (OR[269]) 0x01F0 (0x0003E0) 0x290D- f:00024 d: 269 | OR[269] = A 0x01F1 (0x0003E2) 0x210F- f:00020 d: 271 | A = OR[271] 0x01F2 (0x0003E4) 0x1201- f:00011 d: 1 | A = A & 1 (0x0001) 0x01F3 (0x0003E6) 0x2908- f:00024 d: 264 | OR[264] = A 0x01F4 (0x0003E8) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x01F5 (0x0003EA) 0x2708- f:00023 d: 264 | A = A - OR[264] 0x01F6 (0x0003EC) 0x8604- f:00103 d: 4 | P = P + 4 (0x01FA), A # 0 0x01F7 (0x0003EE) 0x210D- f:00020 d: 269 | A = OR[269] 0x01F8 (0x0003F0) 0x0808- f:00004 d: 8 | A = A > 8 (0x0008) 0x01F9 (0x0003F2) 0x290D- f:00024 d: 269 | OR[269] = A 0x01FA (0x0003F4) 0x210D- f:00020 d: 269 | A = OR[269] 0x01FB (0x0003F6) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF) 0x01FC (0x0003F8) 0x2912- f:00024 d: 274 | OR[274] = A 0x01FD (0x0003FA) 0x2D0F- f:00026 d: 271 | OR[271] = OR[271] + 1 0x01FE (0x0003FC) 0x2112- f:00020 d: 274 | A = OR[274] 0x01FF (0x0003FE) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF) 0x0200 (0x000400) 0x290D- f:00024 d: 269 | OR[269] = A 0x0201 (0x000402) 0x2110- f:00020 d: 272 | A = OR[272] 0x0202 (0x000404) 0x0801- f:00004 d: 1 | A = A > 1 (0x0001) 0x0203 (0x000406) 0x251F- f:00022 d: 287 | A = A + OR[287] 0x0204 (0x000408) 0x290E- f:00024 d: 270 | OR[270] = A 0x0205 (0x00040A) 0x2110- f:00020 d: 272 | A = OR[272] 0x0206 (0x00040C) 0x1201- f:00011 d: 1 | A = A & 1 (0x0001) 0x0207 (0x00040E) 0x2908- f:00024 d: 264 | OR[264] = A 0x0208 (0x000410) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x0209 (0x000412) 0x2708- f:00023 d: 264 | A = A - OR[264] 0x020A (0x000414) 0x8607- f:00103 d: 7 | P = P + 7 (0x0211), A # 0 0x020B (0x000416) 0x310E- f:00030 d: 270 | A = (OR[270]) 0x020C (0x000418) 0x0A09- f:00005 d: 9 | A = A < 9 (0x0009) 0x020D (0x00041A) 0x250D- f:00022 d: 269 | A = A + OR[269] 0x020E (0x00041C) 0x0C09- f:00006 d: 9 | A = A >> 9 (0x0009) 0x020F (0x00041E) 0x390E- f:00034 d: 270 | (OR[270]) = A 0x0210 (0x000420) 0x7006- f:00070 d: 6 | P = P + 6 (0x0216) 0x0211 (0x000422) 0x310E- f:00030 d: 270 | A = (OR[270]) 0x0212 (0x000424) 0x1A00-0xFF00 f:00015 d: 0 | A = A & 65280 (0xFF00) 0x0214 (0x000428) 0x250D- f:00022 d: 269 | A = A + OR[269] 0x0215 (0x00042A) 0x390E- f:00034 d: 270 | (OR[270]) = A 0x0216 (0x00042C) 0x2D10- f:00026 d: 272 | OR[272] = OR[272] + 1 0x0217 (0x00042E) 0x2F11- f:00027 d: 273 | OR[273] = OR[273] - 1 0x0218 (0x000430) 0x2111- f:00020 d: 273 | A = OR[273] 0x0219 (0x000432) 0x8E2E- f:00107 d: 46 | P = P - 46 (0x01EB), A # 0 0x021A (0x000434) 0x0200- f:00001 d: 0 | EXIT 0x021B (0x000436) 0x0000- f:00000 d: 0 | PASS 0x021C (0x000438) 0x0000- f:00000 d: 0 | PASS 0x021D (0x00043A) 0x0000- f:00000 d: 0 | PASS 0x021E (0x00043C) 0x0000- f:00000 d: 0 | PASS 0x021F (0x00043E) 0x0000- f:00000 d: 0 | PASS
80.491363
127
0.464017
0b9aa78bb261739d143c6a1299fbb143b3ea51fb
2,814
asm
Assembly
data/tilesets/forest_collision.asm
Dev727/ancientplatinum
8b212a1728cc32a95743e1538b9eaa0827d013a7
[ "blessing" ]
28
2019-11-08T07:19:00.000Z
2021-12-20T10:17:54.000Z
data/tilesets/forest_collision.asm
Dev727/ancientplatinum
8b212a1728cc32a95743e1538b9eaa0827d013a7
[ "blessing" ]
13
2020-01-11T17:00:40.000Z
2021-09-14T01:27:38.000Z
data/tilesets/forest_collision.asm
Dev727/ancientplatinum
8b212a1728cc32a95743e1538b9eaa0827d013a7
[ "blessing" ]
22
2020-05-28T17:31:38.000Z
2022-03-07T20:49:35.000Z
tilecoll WALL, WALL, WALL, WALL ; 00 tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 01 tilecoll WATER, WATER, WATER, WATER ; 02 tilecoll WATER, WATER, WATER, WATER ; 03 tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 04 tilecoll WALL, WALL, WALL, WALL ; 05 tilecoll FLOOR, WARP_CARPET_RIGHT, FLOOR, WARP_CARPET_RIGHT ; 06 tilecoll WATER, WATER, WATER, WATER ; 07 tilecoll HEADBUTT_TREE, HEADBUTT_TREE, HEADBUTT_TREE, FLOOR ; 08 tilecoll HEADBUTT_TREE, HEADBUTT_TREE, FLOOR, FLOOR ; 09 tilecoll WATER, WATER, WATER, WATER ; 0a tilecoll WATER, WATER, WATER, WATER ; 0b tilecoll HEADBUTT_TREE, FLOOR, HEADBUTT_TREE, FLOOR ; 0c tilecoll WATER, WATER, WATER, WATER ; 0d tilecoll FLOOR, HEADBUTT_TREE, FLOOR, HEADBUTT_TREE ; 0e tilecoll FLOOR, FLOOR, CUT_TREE, HEADBUTT_TREE ; 0f tilecoll HEADBUTT_TREE, FLOOR, HEADBUTT_TREE, HEADBUTT_TREE ; 10 tilecoll FLOOR, FLOOR, HEADBUTT_TREE, HEADBUTT_TREE ; 11 tilecoll FLOOR, HEADBUTT_TREE, HEADBUTT_TREE, HEADBUTT_TREE ; 12 tilecoll FLOOR, FLOOR, FLOOR, WALL ; 13 tilecoll HEADBUTT_TREE, FLOOR, FLOOR, FLOOR ; 14 tilecoll FLOOR, HEADBUTT_TREE, FLOOR, FLOOR ; 15 tilecoll FLOOR, FLOOR, HEADBUTT_TREE, FLOOR ; 16 tilecoll FLOOR, FLOOR, FLOOR, HEADBUTT_TREE ; 17 tilecoll WALL, HOP_LEFT, WALL, HOP_LEFT ; 18 tilecoll WALL, HOP_DOWN_LEFT, WALL, WALL ; 19 tilecoll HOP_DOWN, HOP_DOWN, WALL, WALL ; 1a tilecoll HOP_DOWN_RIGHT, WALL, WALL, WALL ; 1b tilecoll HOP_DOWN, FLOOR, WALL, FLOOR ; 1c tilecoll WALL, WALL, WALL, WALL ; 1d tilecoll WALL, WALL, WALL, WALL ; 1e tilecoll WALL, WALL, WALL, WALL ; 1f tilecoll WALL, FLOOR, FLOOR, FLOOR ; 20 tilecoll WALL, WALL, WALL, WALL ; 21 tilecoll WALL, WALL, WALL, WALL ; 22 tilecoll WALL, WALL, WALL, WALL ; 23 tilecoll WALL, WALL, WALL, DOOR ; 24 tilecoll WALL, WALL, WALL, WALL ; 25 tilecoll WALL, WALL, WALL, WALL ; 26 tilecoll WALL, WALL, WALL, WALL ; 27 tilecoll WALL, FLOOR, WALL, FLOOR ; 28 tilecoll WALL, FLOOR, WALL, FLOOR ; 29 tilecoll WALL, FLOOR, WALL, FLOOR ; 2a tilecoll WALL, FLOOR, WALL, FLOOR ; 2b tilecoll WALL, FLOOR, WALL, FLOOR ; 2c tilecoll WALL, FLOOR, WALL, FLOOR ; 2d tilecoll WALL, FLOOR, WALL, FLOOR ; 2e tilecoll WALL, FLOOR, WALL, FLOOR ; 2f tilecoll WALL, FLOOR, WALL, FLOOR ; 30 tilecoll WALL, FLOOR, WALL, FLOOR ; 31 tilecoll WALL, FLOOR, WALL, FLOOR ; 32 tilecoll WALL, FLOOR, WALL, FLOOR ; 33 tilecoll WALL, FLOOR, WALL, FLOOR ; 34 tilecoll WALL, FLOOR, WALL, FLOOR ; 35 tilecoll WALL, FLOOR, WALL, FLOOR ; 36 tilecoll WALL, FLOOR, WALL, FLOOR ; 37 tilecoll WALL, FLOOR, WALL, FLOOR ; 38 tilecoll WALL, FLOOR, WALL, FLOOR ; 39 tilecoll WALL, FLOOR, WALL, FLOOR ; 3a tilecoll WALL, FLOOR, WALL, FLOOR ; 3b tilecoll WALL, FLOOR, WALL, FLOOR ; 3c tilecoll WALL, FLOOR, WALL, FLOOR ; 3d tilecoll WALL, FLOOR, WALL, FLOOR ; 3e tilecoll WALL, FLOOR, WALL, FLOOR ; 3f
43.292308
65
0.727079
8b636f3d084089041a8febdc045b049a384618eb
9,924
asm
Assembly
Gathered CTF writeups/2017-05-18-confidence-finals/keygenme/rawasm.asm
mihaid-b/CyberSakura
f60e6b6bfd6898c69b84424b080090ae98f8076c
[ "MIT" ]
1
2022-03-27T06:00:41.000Z
2022-03-27T06:00:41.000Z
Gathered CTF writeups/2017-05-18-confidence-finals/keygenme/rawasm.asm
mihaid-b/CyberSakura
f60e6b6bfd6898c69b84424b080090ae98f8076c
[ "MIT" ]
null
null
null
Gathered CTF writeups/2017-05-18-confidence-finals/keygenme/rawasm.asm
mihaid-b/CyberSakura
f60e6b6bfd6898c69b84424b080090ae98f8076c
[ "MIT" ]
1
2022-03-27T06:01:42.000Z
2022-03-27T06:01:42.000Z
mag_consts= dword ptr -84h var_80= qword ptr -80h anonymous_3= qword ptr -70h anonymous_4= qword ptr -68h var_60= byte ptr -60h var_50= qword ptr -50h anonymous_5= qword ptr -48h var_40= qword ptr -40h anonymous_2= qword ptr -38h var_30= dword ptr -30h anonymous_1= qword ptr -28h var_20= qword ptr -20h hi_arg= qword ptr -18h a1= dword ptr 8 ;; -0x90: III ;; -0x80: HHH ;; -0x70: GGG ;; -0x60: FFF ;; -0x50: EEE ;; -0x40: DDD ;; -0x30: CCC ;; -0x20: BBB ;; -0x10: AAA push ebp mov ebp, esp sub esp, 84h mov [ebp+mag_consts], offset magic_consts lea edi, [ebp+var_20] mov esi, [ebp+a1] ;; [BBB] == [ARG] mov eax, [esi] mov [edi], eax mov eax, [esi+4] mov [edi+4], eax mov eax, [esi+8] mov [edi+8], eax mov eax, [esi+0Ch] mov [edi+0Ch], eax ;; loc_F4102F: loc_F4102F: ; CODE XREF: check_value+295j lea esi, [ebp+var_20] lea edi, [ebp+var_40] ;; [DDD] = [BBB] mov eax, [esi] mov [edi], eax mov eax, [esi+4] mov [edi+4], eax mov eax, [esi+8] mov [edi+8], eax mov eax, [esi+0Ch] mov [edi+0Ch], eax ;; [EEE] = 0 lea edi, [ebp+var_50] xor eax, eax mov dword ptr [edi], 1 mov [edi+4], eax mov [edi+8], eax mov [edi+0Ch], eax ;; [FFF] = [MAG[1]] mov esi, [ebp+mag_consts] add esi, 10h lea edi, [ebp+var_60] mov eax, [esi] mov [edi], eax mov eax, [esi+4] mov [edi+4], eax mov eax, [esi+8] mov [edi+8], eax mov eax, [esi+0Ch] mov [edi+0Ch], eax ;; loc_F41081: loc_F41081: ; CODE XREF: check_value+262j ;; ZF = TEST [FFF] & 1 ;; IF ZF GOTO loc_F4116A test [ebp+var_60], 1 jz loc_F4116A ;; [HHH] = 0 lea edx, [ebp+var_40] lea edi, [ebp+var_80] xor eax, eax mov [edi], eax mov [edi+4], eax mov [edi+8], eax mov [edi+0Ch], eax ;; [GGG] = [EEE] lea esi, [ebp+var_50] mov eax, [esi] mov [edi+10h], eax mov eax, [esi+4] mov [edi+14h], eax mov eax, [esi+8] mov [edi+18h], eax mov eax, [esi+0Ch] mov [edi+1Ch], eax ;; ECX = 0x80 mov ecx, 80h ;; loc_F410BD: loc_F410BD: ; CODE XREF: check_value:loc_F410FCj ;; CF = SHL([GGG; HHH]) shl dword ptr [edi], 1 rcl dword ptr [edi+4], 1 rcl dword ptr [edi+8], 1 rcl dword ptr [edi+0Ch], 1 rcl dword ptr [edi+10h], 1 rcl dword ptr [edi+14h], 1 rcl dword ptr [edi+18h], 1 rcl dword ptr [edi+1Ch], 1 ;; IF NOT CF GOTO loc_F410FC jnb short loc_F410FC ;; [GGG; HHH] += [0; DDD] mov eax, [edx] add [edi], eax mov eax, [edx+4] adc [edi+4], eax mov eax, [edx+8] adc [edi+8], eax mov eax, [edx+0Ch] adc [edi+0Ch], eax adc dword ptr [edi+10h], 0 adc dword ptr [edi+14h], 0 adc dword ptr [edi+18h], 0 adc dword ptr [edi+1Ch], 0 ;; loc_F410FC: loc_F410FC: ; CODE XREF: check_value+D4j ;; LOOP loc_F410BD loop loc_F410BD ;; [EEE] = 0 mov edx, [ebp+mag_consts] xor eax, eax mov [esi], eax mov [esi+4], eax mov [esi+8], eax mov [esi+0Ch], eax ;; ECX = 0x100 mov ecx, 100h ;; loc_F41116: loc_F41116: ; CODE XREF: check_value:loc_F41168j ;; CF = SHL [EEE; GGG; HHH] shl dword ptr [edi], 1 rcl dword ptr [edi+4], 1 rcl dword ptr [edi+8], 1 rcl dword ptr [edi+0Ch], 1 rcl dword ptr [edi+10h], 1 rcl dword ptr [edi+14h], 1 rcl dword ptr [edi+18h], 1 rcl dword ptr [edi+1Ch], 1 rcl dword ptr [esi], 1 rcl dword ptr [esi+4], 1 rcl dword ptr [esi+8], 1 rcl dword ptr [esi+0Ch], 1 ;; IF CF GOTO loc_F41152 jb short loc_F41152 ;; CF = CARRY [EEE] - [*MAG] mov eax, [esi] sub eax, [edx] mov eax, [esi+4] sbb eax, [edx+4] mov eax, [esi+8] sbb eax, [edx+8] mov eax, [esi+0Ch] sbb eax, [edx+0Ch] ;; IF CF GOTO loc_F41168 jb short loc_F41168 ;; loc_F41152; loc_F41152: ; CODE XREF: check_value+138j ;; [EEE] -= [*MAG] mov eax, [edx] sub [esi], eax mov eax, [edx+4] sbb [esi+4], eax mov eax, [edx+8] sbb [esi+8], eax mov eax, [edx+0Ch] sbb [esi+0Ch], eax ;; loc_F41168 loc_F41168: ; CODE XREF: check_value+150j ;; LOOP loc_F41116 loop loc_F41116 ;; loc_F4116A: loc_F4116A: ; CODE XREF: check_value+85j ;; [HHH] = 0 lea edx, [ebp+var_40] lea esi, [ebp+var_40] lea edi, [ebp+var_80] xor eax, eax mov [edi], eax mov [edi+4], eax mov [edi+8], eax mov [edi+0Ch], eax ;; [GGG] = [DDD] mov eax, [esi] mov [edi+10h], eax mov eax, [esi+4] mov [edi+14h], eax mov eax, [esi+8] mov [edi+18h], eax mov eax, [esi+0Ch] mov [edi+1Ch], eax ;; ECX = 0x80 mov ecx, 80h ;; loc_F4119C: loc_F4119C: ; CODE XREF: check_value:loc_F411DBj ;; CF = SHL [GGG; HHH] shl dword ptr [edi], 1 rcl dword ptr [edi+4], 1 rcl dword ptr [edi+8], 1 rcl dword ptr [edi+0Ch], 1 rcl dword ptr [edi+10h], 1 rcl dword ptr [edi+14h], 1 rcl dword ptr [edi+18h], 1 rcl dword ptr [edi+1Ch], 1 ;; IF NOT CF GOTO loc_F411DB jnb short loc_F411DB ;; [GGG; HHH] += [0; DDD] mov eax, [edx] add [edi], eax mov eax, [edx+4] adc [edi+4], eax mov eax, [edx+8] adc [edi+8], eax mov eax, [edx+0Ch] adc [edi+0Ch], eax adc dword ptr [edi+10h], 0 adc dword ptr [edi+14h], 0 adc dword ptr [edi+18h], 0 adc dword ptr [edi+1Ch], 0 ;; loc_F411DB loc_F411DB: ; CODE XREF: check_value+1B3j ;; LOOP loc_F4119C loop loc_F4119C ;; [DDD] = 0 mov edx, [ebp+mag_consts] xor eax, eax mov [esi], eax mov [esi+4], eax mov [esi+8], eax mov [esi+0Ch], eax ;; ECX = 0x100 mov ecx, 100h ;; loc_F411F5: loc_F411F5: ; CODE XREF: check_value:loc_F41247j ;; CF = SHL [DDD; GGG; HHH] shl dword ptr [edi], 1 rcl dword ptr [edi+4], 1 rcl dword ptr [edi+8], 1 rcl dword ptr [edi+0Ch], 1 rcl dword ptr [edi+10h], 1 rcl dword ptr [edi+14h], 1 rcl dword ptr [edi+18h], 1 rcl dword ptr [edi+1Ch], 1 rcl dword ptr [esi], 1 rcl dword ptr [esi+4], 1 rcl dword ptr [esi+8], 1 rcl dword ptr [esi+0Ch], 1 ;; IF CF GOTO loc_F41231 jb short loc_F41231 ;; CF = [DDD] - [*MAG] mov eax, [esi] sub eax, [edx] mov eax, [esi+4] sbb eax, [edx+4] mov eax, [esi+8] sbb eax, [edx+8] mov eax, [esi+0Ch] sbb eax, [edx+0Ch] ;; IF CF GOTO loc_F41247 jb short loc_F41247 ;; loc_F41231 loc_F41231: ; CODE XREF: check_value+217j ;; [DDD] -= [*MAG] mov eax, [edx] sub [esi], eax mov eax, [edx+4] sbb [esi+4], eax mov eax, [edx+8] sbb [esi+8], eax mov eax, [edx+0Ch] sbb [esi+0Ch], eax ;; loc_F41247: loc_F41247: ; CODE XREF: check_value+22Fj ;; LOOP loc_F411F5 loop loc_F411F5 ;; SHR [FFF] lea esi, [ebp+var_60] shr dword ptr [esi+0Ch], 1 rcr dword ptr [esi+8], 1 rcr dword ptr [esi+4], 1 rcr dword ptr [esi], 1 ;; ZF = [FFF] == 0 mov eax, [esi] or eax, [esi+4] or eax, [esi+8] or eax, [esi+0Ch] ;; IF NOT ZF GOTO loc_F41081 jnz loc_F41081 lea esi, [ebp+var_50] lea edi, [ebp+var_20] ;; [BBB] = [EEE] mov eax, [esi] mov [edi], eax mov eax, [esi+4] mov [edi+4], eax mov eax, [esi+8] mov [edi+8], eax mov eax, [esi+0Ch] mov [edi+0Ch], eax ;; MAG++ add [ebp+mag_consts], 20h cmp [ebp+mag_consts], offset aI3dragons ; "I<3Dragons" ;; CF = MAG < DRG ;; IF CF GOTO loc_F4102F jb loc_F4102F ;; [AAA] = 0 lea esi, [ebp+var_20] xor eax, eax mov [esi+10h], eax mov [esi+14h], eax mov [esi+18h], eax mov [esi+1Ch], eax ;; [AAA; BBB] += 0x31337 add dword ptr [esi], 31337h adc dword ptr [esi+4], 0 adc dword ptr [esi+8], 0 adc dword ptr [esi+0Ch], 0 adc dword ptr [esi+10h], 0 adc dword ptr [esi+14h], 0 adc dword ptr [esi+18h], 0 adc dword ptr [esi+1Ch], 0 lea edx, aI3dragons ; "I<3Dragons" ;; [CCC] = 0 lea edi, [ebp+var_30] xor eax, eax mov [edi], eax mov [edi+4], eax mov [edi+8], eax mov [edi+0Ch], eax ;; ECX = 0x100 mov ecx, 100h ;; loc_F412E9: loc_F412E9: ; CODE XREF: check_value:loc_F4133Bj ;; CF = SHL [CCC; AAA; BBB] shl dword ptr [esi], 1 rcl dword ptr [esi+4], 1 rcl dword ptr [esi+8], 1 rcl dword ptr [esi+0Ch], 1 rcl dword ptr [esi+10h], 1 rcl dword ptr [esi+14h], 1 rcl dword ptr [esi+18h], 1 rcl dword ptr [esi+1Ch], 1 rcl dword ptr [edi], 1 rcl dword ptr [edi+4], 1 rcl dword ptr [edi+8], 1 rcl dword ptr [edi+0Ch], 1 ;; IF CF GOTO loc_F41325 jb short loc_F41325 ;; CF = [CCC] - [DRG] mov eax, [edi] sub eax, [edx] mov eax, [edi+4] sbb eax, [edx+4] mov eax, [edi+8] sbb eax, [edx+8] mov eax, [edi+0Ch] sbb eax, [edx+0Ch] ;; IF CF GOTO loc_F4133B jb short loc_F4133B ;; loc_F41325: loc_F41325: ; CODE XREF: check_value+30Bj ;; [CCC] -= [DRG] mov eax, [edx] sub [edi], eax mov eax, [edx+4] sbb [edi+4], eax mov eax, [edx+8] sbb [edi+8], eax mov eax, [edx+0Ch] sbb [edi+0Ch], eax ;; loc_F4133B: loc_F4133B: ; CODE XREF: check_value+323j ;; LOOP loc_F412E9 loop loc_F412E9 ;; RETURN [CCC] == 0 mov eax, [edi] or eax, [edi+4] or eax, [edi+8] or eax, [edi+0Ch] sub eax, 1 sbb eax, eax mov esp, ebp pop ebp retn
21.668122
77
0.528617
4cf3fb0118d787b7e81a224c8073585073b80409
1,247
asm
Assembly
HW8/Problem4.asm
ewbrowntech/COMP-3350
bf797f743aca9fea8e9026e0652090663406fa0c
[ "CC0-1.0" ]
null
null
null
HW8/Problem4.asm
ewbrowntech/COMP-3350
bf797f743aca9fea8e9026e0652090663406fa0c
[ "CC0-1.0" ]
null
null
null
HW8/Problem4.asm
ewbrowntech/COMP-3350
bf797f743aca9fea8e9026e0652090663406fa0c
[ "CC0-1.0" ]
null
null
null
.386 .model flat,stdcall .stack 4096 ExitProcess proto,dwExitCode:dword TITLE Case Table Implementation - Ethan Brown (Problem4.asm) INCLUDE Irvine32.inc .data CaseTable BYTE 'A' DWORD Process_A EntrySize = 4 ; ($ - CaseTable) BYTE 'B' DWORD Process_B BYTE 'C' DWORD Process_C BYTE 'D' DWORD Process_D BYTE 'E' DWORD Process_E NumberOfEntries = ($ - CaseTable) / EntrySize msgA BYTE "Process_A", 0 msgB BYTE "Process_B", 0 msgC BYTE "Process_C", 0 msgD BYTE "Process_D", 0 msgE BYTE "Process_E", 0 prompt BYTE "Press A, B, C, D, E:", 0 .code Main PROC mov edx, OFFSET prompt Call WriteString call ReadChar mov ebx, OFFSET CaseTable mov ecx, NumberOfEntries L1: cmp al, [ebx] jne L2 call NEAR PTR [ebx + 1] call WriteString call crlf jmp L3 L2: add ebx, EntrySize loop L1 L3: exit main EndP Process_A PROC mov edx, offset msgA ret Process_A EndP Process_B PROC mov edx, offset msgB ret Process_B EndP Process_C PROC mov edx, OFFSET msgC ret Process_C EndP Process_D PROC mov edx, OFFSET msgD ret Process_D EndP Process_E PROC mov edx, OFFSET msgE ret Process_E EndP END main
16.626667
61
0.659984
b9298a72e55c2d124fe8c5c95b0b1572d3ccee91
695
asm
Assembly
source/modules/basic/expressions/floatonly/int.asm
paulscottrobson/mega-basic
f71750889136e2fdc4e6053c5696593318162bcf
[ "MIT" ]
3
2019-12-03T06:05:24.000Z
2021-03-24T01:51:07.000Z
source/modules/basic/expressions/floatonly/int.asm
paulscottrobson/mega-basic
f71750889136e2fdc4e6053c5696593318162bcf
[ "MIT" ]
null
null
null
source/modules/basic/expressions/floatonly/int.asm
paulscottrobson/mega-basic
f71750889136e2fdc4e6053c5696593318162bcf
[ "MIT" ]
null
null
null
; ******************************************************************************************* ; ******************************************************************************************* ; ; Name : int.asm ; Purpose : int( unary function ; Date : 22nd August 2019 ; Review : 1st September 2019 ; Author : Paul Robson (paul@robsons.org.uk) ; ; ******************************************************************************************* ; ******************************************************************************************* Unary_Int: ;; int( jsr EvaluateNumberX ; get value jsr CheckNextRParen ; check right bracket. jmp FPUToInteger ; Convert to integer.
40.882353
93
0.300719
34122c20193426c4b09a81255a022abf28dcf38a
772
asm
Assembly
oeis/246/A246474.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/246/A246474.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/246/A246474.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A246474: Number of length n+3 0..3 arrays with no pair in any consecutive four terms totalling exactly 3. ; Submitted by Jamie Morken(s4) ; 60,132,292,644,1420,3132,6908,15236,33604,74116,163468,360540,795196,1753860,3868260,8531716,18817292,41502844,91537404,201892100,445287044,982111492,2166115084,4777517212,10537145916,23240406916,51258331044,113053808004,249348022924,549954376892,1212962561788,2675273146500,5900500669892,13013963901572,28703200949644,63306902569180,139627769039932,307958739029508,679224380628196,1498076530296324,3304111799622156,7287447979872508,16072972490041340,35450056779704836,78187561539282180 add $0,3 seq $0,193641 ; Number of arrays of -1..1 integers x(1..n) with every x(i) in a subsequence of length 1 or 2 with sum zero. mul $0,4
96.5
488
0.836788
982c8aa63487efebccd11ec180df654d726ea3b7
2,851
a51
Assembly
programs/8051_stepper/servo_test_410_3.a51
tsavas/e123_project
59f9934ae2c7b271e07227a97a4b9ee7a5b3d757
[ "MIT" ]
null
null
null
programs/8051_stepper/servo_test_410_3.a51
tsavas/e123_project
59f9934ae2c7b271e07227a97a4b9ee7a5b3d757
[ "MIT" ]
null
null
null
programs/8051_stepper/servo_test_410_3.a51
tsavas/e123_project
59f9934ae2c7b271e07227a97a4b9ee7a5b3d757
[ "MIT" ]
null
null
null
; timer2_biflip.a51 use Timer2 to toggle LED, on interrupt by timer overflow $NOSYMBOLS ; keeps listing short $INCLUDE (C:\RIDE\INC\51\SILABS\c8051f410.inc) $INCLUDE (C:\SiLabs\VECTORS320.INC) ; Tom's vectors definition file STACKBOT EQU 80h ; put stack at start of scratch DIV12 EQU 0DFh ; timer clock mask to div by 12, in CKCON GLOBALINTEN EQU EA ; global interrupt enable TIM2INTEN EQU IE.5 TIM2_ENABLE EQU TMR2CN.2 SOFTFLAG EQU 0 ; software flag that ISR uses to talk to Main BLUE_LED EQU P0.0 ; LED to toggle HITIME SET 0FFh ; set start count close to the overflow val LOTIME SET 0F0H ; ...and this is the low byte ; port use: ; LED at P0.0 ORG 0 SJMP STARTUP ORG 80h STARTUP: ACALL USUAL_SETUP ACALL TIMER_INITS ACALL INT_SETUP STUCK: SJMP STUCK ; await interrupts. All the action is there ;------- INITIALIZATIONS USUAL_SETUP: ANL PCA0MD, #NOT(040h) ; Disable the WDT. ; Clear Watchdog Enable bit ; Configure the Oscillator ORL OSCICN, #04h ; sysclk = 24.5 Mhz / 8 mov P0MDOUT, #001h ; Enable the Port I/O Crossbar MOV XBR1, #40h ; Enable Crossbar RET TIMER_INITS: ANL CKCON, #DIV12 ; set timer clock to system/12 MOV TMR2CN, #04h ; enable timer 2, and 16-bit auto-reload MOV TMR2H, #HITIME MOV TMR2L, #LOTIME MOV TMR2RLH, #0FFh ; reload values (at first, close to ovflw value) MOV TMR2RLL, #060h RET ; ----NOW ENABLE INTERRUPTS---- INT_SETUP: SETB TIM2INTEN ; timer-2 interrupt enable SETB GLOBALINTEN ; Global int setb IT0 ; make INT0 Edge-sensitive (p. 22) setb IT1 ; ditto for INT1 ; setb PX1 ; you can try giving higher priority to INT1 (SFR "IP0", p. 25 of user's guide); ; name is from RIDE list, "IP"... setb EX0 ; ...and enable INT0 setb EX1 ; ...and INT1 mov IT01CF, #75h ; SiLabs special: makes both interrupts active-low, places them at P0.7, P0.5 ;mov IT01CF, #01h setb EA ; Global int enable (pp.31-32) RET ; --- INTERRUPT RESPONSE --- ; ISR: JUST TOGGLE LED ORG TIMER2VECTOR ISR: CPL BLUE_LED CLR TF2H ; Clear timer-2 overflow flag (does this clear interrupt flag?) RETI ORG INT0VECTOR ; this is defined in VECTORS3210.INC, included above. ; It is address 03h, the address to which micro hops ; in response to interrupt ZERO ISR0: PUSH ACC MOV A, TMR2RLL ADD A, #1Ah MOV TMR2RLL, A POP ACC RETI END
27.95098
100
0.578394
04da136fee0ac3f25218ec8d52b35e7c6684d54c
533
asm
Assembly
libsrc/spectrum/if1_getname.asm
dex4er/deb-z88dk
9ee4f23444fa6f6043462332a1bff7ae20a8504b
[ "ClArtistic" ]
1
2018-09-04T23:07:24.000Z
2018-09-04T23:07:24.000Z
libsrc/spectrum/if1_getname.asm
dex4er/deb-z88dk
9ee4f23444fa6f6043462332a1bff7ae20a8504b
[ "ClArtistic" ]
null
null
null
libsrc/spectrum/if1_getname.asm
dex4er/deb-z88dk
9ee4f23444fa6f6043462332a1bff7ae20a8504b
[ "ClArtistic" ]
null
null
null
; ; ZX IF1 & Microdrive functions ; ; char* if1_getname(char *location); ; ; Picks a file name from the specified location ; ; $Id: if1_getname.asm,v 1.2 2004/10/08 13:59:32 stefano Exp $ ; XLIB if1_getname tempmdvname: defs 11 if1_getname: pop bc ; ret addr pop hl ; location push hl push bc ld de,tempmdvname push de ld bc,10 ldir push de pop hl previous: dec hl ld a,(hl) cp ' ' jr z,previous inc hl ld (hl),0 pop hl ; pointer to temp name ret
14.026316
63
0.600375
fb1e14f7de77a33f3d47c778c05bb62a6bff3307
899
asm
Assembly
libsrc/_DEVELOPMENT/target/embedded/clib_target_cfg.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
libsrc/_DEVELOPMENT/target/embedded/clib_target_cfg.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
libsrc/_DEVELOPMENT/target/embedded/clib_target_cfg.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
1
2019-12-03T23:57:48.000Z
2019-12-03T23:57:48.000Z
IF !_CLIB_TARGET_CFG_ASM_ defc _CLIB_TARGET_CFG_ASM_ = 1 ; ************************************************************************** ; IF YOU MAKE CHANGES TO THIS FILE YOU MUST RECOMPILE THE EMBEDDED LIBRARIES ; ************************************************************************** ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; EMBEDDED - TARGET CLIB CONFIGURATION ;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;-------------------------------------------------------------- ;-- ARCHITECTURE CONSTANTS ------------------------------------ ;-------------------------------------------------------------- defc __embedded = 1 defc __clock_freq = 4000000 ; Hz defc __z80_cpu_info = $01 ; bit 0 = $01 = if set indicates an nmos z80 (if unsure set it) ; bit 1 = $02 = allow undocumented instruction "sll r" ENDIF
34.576923
76
0.342603
771923b72b2eede8ac6d1d12412f8d498678d844
695
asm
Assembly
oeis/159/A159498.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/159/A159498.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/159/A159498.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A159498: Numerator of Hermite(n, 6/13). ; Submitted by Christian Krause ; 1,12,-194,-10440,71436,14972112,58938504,-29656181088,-495322673520,74246441579712,2397728871804384,-222180226077773952,-11580918658301987136,762191973071827303680,60032860261440859119744,-2886298093438596491576832,-339002178646768313636024064,11541073945554710062815218688,2086399405850987250906376896000,-45179101014543009011291267745792,-13941006196549556233456247639061504,138118648499716066114853998292815872,100610685765105342938450693721572345856,180277958937375447631353993353489326080 add $0,1 mov $3,1 lpb $0 sub $0,1 add $2,$3 mov $3,$1 mov $1,$2 mul $2,12 mul $3,-338 mul $3,$0 lpe mov $0,$1
40.882353
495
0.827338
638220c69f18d495d3ea565037d0f65910fc8efd
59
asm
Assembly
verify/output/symbol.alfy.asm
alexandruradovici/alf-alfy-asm-public
43a73cc13c38f39125620fb9bd566c261cff1c73
[ "BSD-2-Clause" ]
null
null
null
verify/output/symbol.alfy.asm
alexandruradovici/alf-alfy-asm-public
43a73cc13c38f39125620fb9bd566c261cff1c73
[ "BSD-2-Clause" ]
2
2017-05-18T20:29:57.000Z
2017-05-19T19:03:07.000Z
verify/output/symbol.alfy.asm
alexandruradovici/alf-alfy-asm-language-public
43a73cc13c38f39125620fb9bd566c261cff1c73
[ "BSD-2-Clause" ]
null
null
null
start: set r2 2 set r3 's' add r4 r2 r3 write r4 stop
8.428571
13
0.627119
fdad3dc2db7fcb1e5645691d951ac2d73c98d333
433
asm
Assembly
oeis/020/A020807.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/020/A020807.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/020/A020807.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A020807: Decimal expansion of 1/sqrt(50). ; Submitted by Christian Krause ; 1,4,1,4,2,1,3,5,6,2,3,7,3,0,9,5,0,4,8,8,0,1,6,8,8,7,2,4,2,0,9,6,9,8,0,7,8,5,6,9,6,7,1,8,7,5,3,7,6,9,4,8,0,7,3,1,7,6,6,7,9,7,3,7,9,9,0,7,3,2,4,7,8,4,6,2,1,0,7,0,3,8,8,5,0,3,8,7,5,3,4,3,2,7,6,4,1,5,7,2 mov $1,1 mov $2,1 mov $3,$0 mul $3,4 lpb $3 add $1,$2 add $2,$1 mul $1,2 sub $3,1 lpe mov $4,10 pow $4,$0 div $2,$4 div $1,$2 mov $0,$1 mod $0,10
20.619048
201
0.547344
12ad05ccbc2d936c1a1f648337c184e1cf0991b1
550
asm
Assembly
programs/oeis/276/A276855.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/276/A276855.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/276/A276855.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A276855: Beatty sequence for (3 + golden ratio). ; 0,4,9,13,18,23,27,32,36,41,46,50,55,60,64,69,73,78,83,87,92,96,101,106,110,115,120,124,129,133,138,143,147,152,157,161,166,170,175,180,184,189,193,198,203,207,212,217,221,226,230,235,240,244,249,253,258,263,267,272,277,281,286,290,295,300,304,309,314,318,323,327,332,337,341,346,350,355,360,364,369,374,378,383,387,392,397,401,406,411,415,420,424,429,434,438,443,447,452,457 mov $2,$0 seq $0,26356 ; a(n) = floor((n-1)*phi) + n + 1, n > 0, where phi = (1+sqrt(5))/2. add $0,$2 add $0,$2 sub $0,2
61.111111
376
0.674545
403685c09b0643ca46bb4698129401c405991850
6,029
asm
Assembly
Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0xca_notsx.log_21829_1005.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0xca_notsx.log_21829_1005.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0xca_notsx.log_21829_1005.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r11 push %r14 push %rax push %rcx push %rdi push %rdx push %rsi lea addresses_WT_ht+0xa39a, %rax nop nop sub %rcx, %rcx movw $0x6162, (%rax) nop nop nop nop and $7638, %r14 lea addresses_D_ht+0xacda, %rsi lea addresses_A_ht+0x17f7a, %rdi nop nop add %rdx, %rdx mov $122, %rcx rep movsl cmp $17089, %rcx lea addresses_A_ht+0xa59a, %r14 nop nop cmp %rcx, %rcx mov $0x6162636465666768, %rdi movq %rdi, %xmm5 and $0xffffffffffffffc0, %r14 vmovntdq %ymm5, (%r14) nop nop nop nop add $61829, %r14 lea addresses_UC_ht+0xb6ca, %r14 clflush (%r14) nop xor %rdi, %rdi mov (%r14), %dx nop nop add %r11, %r11 lea addresses_WC_ht+0xf68a, %r14 nop nop nop nop nop sub $14227, %r11 vmovups (%r14), %ymm6 vextracti128 $1, %ymm6, %xmm6 vpextrq $0, %xmm6, %rcx nop nop nop nop nop sub %rcx, %rcx lea addresses_WC_ht+0x1715a, %r11 cmp %r14, %r14 mov (%r11), %di add %rsi, %rsi lea addresses_WC_ht+0x1191a, %rcx nop nop and $19211, %rdx mov $0x6162636465666768, %rdi movq %rdi, %xmm1 and $0xffffffffffffffc0, %rcx vmovaps %ymm1, (%rcx) nop nop sub $33997, %rax pop %rsi pop %rdx pop %rdi pop %rcx pop %rax pop %r14 pop %r11 ret .global s_faulty_load s_faulty_load: push %r13 push %r9 push %rax push %rdi push %rdx push %rsi // Store lea addresses_PSE+0x15d1a, %rax nop nop nop nop cmp $63784, %rdi mov $0x5152535455565758, %rdx movq %rdx, %xmm1 movups %xmm1, (%rax) nop nop nop nop nop add $53298, %rsi // Faulty Load lea addresses_PSE+0x15d1a, %rdx nop nop nop nop dec %r13 movups (%rdx), %xmm2 vpextrq $1, %xmm2, %rdi lea oracles, %rdx and $0xff, %rdi shlq $12, %rdi mov (%rdx,%rdi,1), %rdi pop %rsi pop %rdx pop %rdi pop %rax pop %r9 pop %r13 ret /* <gen_faulty_load> [REF] {'src': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 0, 'same': False, 'type': 'addresses_PSE'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 0, 'same': True, 'type': 'addresses_PSE'}, 'OP': 'STOR'} [Faulty Load] {'src': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 0, 'same': True, 'type': 'addresses_PSE'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'dst': {'NT': True, 'AVXalign': True, 'size': 2, 'congruent': 6, 'same': True, 'type': 'addresses_WT_ht'}, 'OP': 'STOR'} {'src': {'congruent': 5, 'same': False, 'type': 'addresses_D_ht'}, 'dst': {'congruent': 5, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'REPM'} {'dst': {'NT': True, 'AVXalign': False, 'size': 32, 'congruent': 7, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'STOR'} {'src': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 4, 'same': True, 'type': 'addresses_UC_ht'}, 'OP': 'LOAD'} {'src': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 4, 'same': True, 'type': 'addresses_WC_ht'}, 'OP': 'LOAD'} {'src': {'NT': True, 'AVXalign': False, 'size': 2, 'congruent': 5, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': True, 'size': 32, 'congruent': 10, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'STOR'} {'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 */
39.149351
2,999
0.659313
4e0cf0862729d8d2329158bda51163bc6543dcee
860
asm
Assembly
Working Disassembly/Levels/LBZ/Misc Object Data/Map - Cork Floor.asm
TeamASM-Blur/Sonic-3-Blue-Balls-Edition
7e8a2c5df02271615ff4cae529521e6b1560d6b1
[ "Apache-2.0" ]
5
2021-07-09T08:17:56.000Z
2022-02-27T19:57:47.000Z
Working Disassembly/Levels/LBZ/Misc Object Data/Map - Cork Floor.asm
TeamASM-Blur/Sonic-3-Blue-Balls-Edition
7e8a2c5df02271615ff4cae529521e6b1560d6b1
[ "Apache-2.0" ]
null
null
null
Working Disassembly/Levels/LBZ/Misc Object Data/Map - Cork Floor.asm
TeamASM-Blur/Sonic-3-Blue-Balls-Edition
7e8a2c5df02271615ff4cae529521e6b1560d6b1
[ "Apache-2.0" ]
null
null
null
Map_229EE8: dc.w Frame_229EEC-Map_229EE8 dc.w Frame_229F1E-Map_229EE8 Frame_229EEC: dc.w 8 dc.b $E0, $D, 0, 0,$FF,$E0 dc.b $E0, $D, 0, 0, 0, 0 dc.b $F0, $D, 0,$18,$FF,$E0 dc.b $F0, $D, 0,$20, 0, 0 dc.b 0, $D, 0,$38,$FF,$E0 dc.b 0, $D, 0,$40, 0, 0 dc.b $10, $D, 0,$40,$FF,$E0 dc.b $10, $D, 0,$38, 0, 0 Frame_229F1E: dc.w $10 dc.b $E0, 5, 0, 0,$FF,$E0 dc.b $E0, 5, 0, 4,$FF,$F0 dc.b $E0, 5, 0, 0, 0, 0 dc.b $E0, 5, 0, 4, 0,$10 dc.b $F0, 5, 0,$18,$FF,$E0 dc.b $F0, 5, 0,$1C,$FF,$F0 dc.b $F0, 5, 0,$20, 0, 0 dc.b $F0, 5, 0,$24, 0,$10 dc.b 0, 5, 0,$38,$FF,$E0 dc.b 0, 5, 0,$3C,$FF,$F0 dc.b 0, 5, 0,$40, 0, 0 dc.b 0, 5, 0,$44, 0,$10 dc.b $10, 5, 0,$40,$FF,$E0 dc.b $10, 5, 0,$44,$FF,$F0 dc.b $10, 5, 0,$38, 0, 0 dc.b $10, 5, 0,$3C, 0,$10
29.655172
40
0.433721
2395c3ed4e63771a308e1c3fd49bbdf61e64905d
122
asm
Assembly
programs/oeis/146/A146975.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/146/A146975.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/146/A146975.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A146975: First quintisection of A061043: A061043(5n). ; 0,3,8,3,24,7,48,63,16,99 mov $2,2 add $2,$0 mul $0,$2 dif $0,5
15.25
55
0.639344
b866102f74a806d7d709f2a6940d4b7384748e19
4,044
asm
Assembly
Transynther/x86/_processed/NC/_zr_/i7-7700_9_0xca_notsx.log_21829_1971.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NC/_zr_/i7-7700_9_0xca_notsx.log_21829_1971.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NC/_zr_/i7-7700_9_0xca_notsx.log_21829_1971.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r13 push %r8 push %rbx push %rdx lea addresses_normal_ht+0x15435, %rbx nop and $57155, %rdx movw $0x6162, (%rbx) nop nop nop nop nop add %r13, %r13 pop %rdx pop %rbx pop %r8 pop %r13 ret .global s_faulty_load s_faulty_load: push %r11 push %r12 push %r13 push %r15 push %r9 push %rax push %rdi // Faulty Load mov $0x37fc770000000c35, %r13 nop nop nop nop nop sub $24877, %r12 movb (%r13), %r11b lea oracles, %r15 and $0xff, %r11 shlq $12, %r11 mov (%r15,%r11,1), %r11 pop %rdi pop %rax pop %r9 pop %r15 pop %r13 pop %r12 pop %r11 ret /* <gen_faulty_load> [REF] {'src': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0, 'same': False, 'type': 'addresses_NC'}, 'OP': 'LOAD'} [Faulty Load] {'src': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 0, 'same': True, 'type': 'addresses_NC'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'dst': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 10, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'STOR'} {'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 */
61.272727
2,999
0.663699
4202e63598e35dc8abde7455fc62456caa45a82a
623
asm
Assembly
programs/oeis/195/A195605.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/195/A195605.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/195/A195605.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A195605: a(n) = (4*n*(n+2)+(-1)^n+1)/2 + 1. ; 2,7,18,31,50,71,98,127,162,199,242,287,338,391,450,511,578,647,722,799,882,967,1058,1151,1250,1351,1458,1567,1682,1799,1922,2047,2178,2311,2450,2591,2738,2887,3042,3199,3362,3527,3698,3871,4050,4231,4418,4607,4802,4999,5202,5407,5618,5831,6050,6271,6498,6727,6962,7199,7442,7687,7938,8191,8450,8711,8978,9247,9522,9799,10082,10367,10658,10951,11250,11551,11858,12167,12482,12799,13122,13447,13778,14111,14450,14791,15138,15487,15842,16199,16562,16927,17298,17671,18050,18431,18818,19207,19602,19999 mov $1,$0 add $0,1 pow $0,2 mul $0,2 gcd $1,2 mov $2,$1 sub $2,2 add $0,$2
51.916667
500
0.733547
0495d2216ccb8ebe7aef5c8d587e8cba7d64a4e6
127
asm
Assembly
tests/unreachable.asm
Liqi1003/lc3_vscode
a83f946637e29f47df0e4751ab2ce0afe92bdace
[ "Unlicense" ]
2
2021-09-12T12:45:47.000Z
2022-02-03T21:36:18.000Z
tests/unreachable.asm
Liqi1003/lc3_vscode
a83f946637e29f47df0e4751ab2ce0afe92bdace
[ "Unlicense" ]
null
null
null
tests/unreachable.asm
Liqi1003/lc3_vscode
a83f946637e29f47df0e4751ab2ce0afe92bdace
[ "Unlicense" ]
null
null
null
.ORIG x3000 ; TEST: Unreachable instruction BR SKIP_INSTRUCTION ADD R0, R0, #0 SKIP_INSTRUCTION ADD R0, R0, #0 .END
12.7
32
0.692913
cf8e5c3d03baa40fb15b4f8519fbb377ae8d326e
1,463
asm
Assembly
kernel/arch/x86_64/cpu/smp_trampoline.asm
qookei/quack
47808580dda218cb47d0c9ca04b51eb24f1e2266
[ "Zlib" ]
16
2019-06-25T15:18:03.000Z
2021-10-10T18:52:30.000Z
kernel/arch/x86_64/cpu/smp_trampoline.asm
qookei/quack
47808580dda218cb47d0c9ca04b51eb24f1e2266
[ "Zlib" ]
null
null
null
kernel/arch/x86_64/cpu/smp_trampoline.asm
qookei/quack
47808580dda218cb47d0c9ca04b51eb24f1e2266
[ "Zlib" ]
null
null
null
section .trampoline bits 16 global smp_entry KERN_DATA equ 0x500 KERN_DATA_HI equ 0xFFFF800000000500 KERNEL_VIRTUAL_BASE equ 0xFFFFFFFF80000000 extern init_pml4 smp_entry: cli cld jmp 0x0000:.reset_cs .reset_cs: xor ax, ax mov ds, ax mov es, ax mov fs, ax mov gs, ax mov ss, ax lgdt [gdt32_ptr] mov eax, cr0 or eax, 1 mov cr0, eax jmp 0x08:.prot_mode .prot_mode: bits 32 mov ax, 0x10 mov ds, ax mov es, ax mov fs, ax mov gs, ax mov ss, ax lgdt [gdt64_ptr] mov eax, cr4 or eax, 0x000000A0 mov cr4, eax mov eax, [KERN_DATA] mov cr3, eax mov ecx, 0xC0000080 rdmsr or eax, 0x00000901 wrmsr mov eax, cr0 or eax, 0x80010001 mov cr0, eax mov ecx, 0x277 mov eax, 0x05010406 xor edx, edx wrmsr jmp 0x08:.long_mode .long_mode: bits 64 mov ax, 0x0 mov ds, ax mov es, ax mov fs, ax mov gs, ax mov ss, ax mov rcx, KERN_DATA_HI xor rbp, rbp mov rsp, qword [rcx + 8] mov rax, qword [rcx + 16] mov rdi, qword [rcx + 24] mov rsi, qword [rcx + 32] jmp rax .l: hlt jmp .l ; data gdt32_start: dd 0x0 dd 0x0 dw 0xFFFF dw 0x0 db 0x0 db 10011010b db 11001111b db 0x0 dw 0xFFFF dw 0x0 db 0x0 db 10010010b db 11001111b db 0x0 gdt32_end: gdt32_ptr: dw gdt32_end - gdt32_start - 1 dd gdt32_start gdt64_start: dq 0 dq 0x00209A0000000000 gdt64_end: gdt64_ptr: dw gdt64_end - gdt64_start - 1 dq gdt64_start gdt64_ptr_high: dw gdt64_end - gdt64_start - 1 dq gdt64_start + 0xFFFF800000000000
11.611111
42
0.700615
6c9cc67d4e4143ded552e46116e8f773ffd61164
352
asm
Assembly
programs/oeis/100/A100530.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/100/A100530.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/100/A100530.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A100530: Numbers == 0,2,5,9 modulo 10. ; 0,2,5,9,10,12,15,19,20,22,25,29,30,32,35,39,40,42,45,49,50,52,55,59,60,62,65,69,70,72,75,79,80,82,85,89,90,92,95,99,100,102,105,109,110,112,115,119,120,122,125,129,130,132,135,139,140,142,145,149,150,152,155 lpb $0 add $1,1 mov $2,$0 sub $0,1 seq $2,10873 ; a(n) = n mod 4. add $1,$2 lpe mov $0,$1
29.333333
209
0.622159
99d346d0a858171dd38f9783cabfc5abc66aed4e
1,522
asm
Assembly
data/trainers/genders.asm
AtmaBuster/pokeplat-gen2
fa83b2e75575949b8f72cb2c48f7a1042e97f70f
[ "blessing" ]
6
2021-06-19T06:41:19.000Z
2022-02-15T17:12:33.000Z
data/trainers/genders.asm
AtmaBuster/pokeplat-gen2
fa83b2e75575949b8f72cb2c48f7a1042e97f70f
[ "blessing" ]
null
null
null
data/trainers/genders.asm
AtmaBuster/pokeplat-gen2
fa83b2e75575949b8f72cb2c48f7a1042e97f70f
[ "blessing" ]
2
2021-08-11T19:47:07.000Z
2022-01-01T07:07:56.000Z
; Used by BattleTowerText BTTrainerClassGenders: ; entries correspond to trainer classes db MALE ; ROARK db FEMALE ; GARDENIA db FEMALE ; MAYLENE db MALE ; WAKE db FEMALE ; FANTINA db MALE ; BYRON db FEMALE ; CANDICE db MALE ; VOLKNER db MALE ; RIVAL1 db MALE ; POKEMON_PROF db MALE ; AARON db FEMALE ; BERTHA db MALE ; FLINT db MALE ; LUCIAN db FEMALE ; CHAMPION db MALE ; BROCK db FEMALE ; MISTY db MALE ; LT_SURGE db MALE ; SCIENTIST db FEMALE ; ERIKA db MALE ; YOUNGSTER db MALE ; SCHOOLBOY db MALE ; BIRD_KEEPER db FEMALE ; LASS db FEMALE ; JANINE db MALE ; COOLTRAINERM db FEMALE ; COOLTRAINERF db FEMALE ; BEAUTY db MALE ; POKEMANIAC db MALE ; GRUNTM db MALE ; GENTLEMAN db FEMALE ; SKIER db FEMALE ; TEACHER db FEMALE ; SABRINA db MALE ; BUG_CATCHER db MALE ; FISHER db MALE ; SWIMMERM db FEMALE ; SWIMMERF db MALE ; SAILOR db MALE ; SUPER_NERD db MALE ; RIVAL2 db MALE ; GUITARIST db MALE ; HIKER db MALE ; BIKER db MALE ; BLAINE db MALE ; BURGLAR db MALE ; FIREBREATHER db MALE ; JUGGLER db MALE ; BLACKBELT_T db MALE ; EXECUTIVEM db MALE ; PSYCHIC_T db FEMALE ; PICNICKER db MALE ; CAMPER db FEMALE ; EXECUTIVEF db MALE ; SAGE db FEMALE ; MEDIUM db MALE ; BOARDER db MALE ; POKEFANM db FEMALE ; KIMONO_GIRL db FEMALE ; TWINS db FEMALE ; POKEFANF db MALE ; RED db MALE ; BLUE db MALE ; OFFICER db FEMALE ; GRUNTF db MALE ; MYSTICALMAN db FEMALE ; SCHOOLGIRL
21.138889
39
0.669514
32c1bd09a22f13a929a35ca580d269951b1a1c91
272
asm
Assembly
programs/oeis/062/A062748.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/062/A062748.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/062/A062748.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A062748: Fourth column (r=3) of FS(3) staircase array A062745. ; 3,9,19,34,55,83,119,164,219,285,363,454,559,679,815,968,1139,1329,1539,1770,2023,2299,2599,2924,3275,3653,4059,4494,4959,5455,5983,6544,7139,7769,8435,9138,9879,10659 mov $1,$0 add $1,4 bin $1,3 sub $1,1
34
168
0.720588
40f5dce90215077f835271946327910414892b31
394
asm
Assembly
programs/oeis/242/A242603.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/242/A242603.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/242/A242603.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A242603: Largest divisor of n not divisible by 7. Remove factors 7 from n. ; 1,2,3,4,5,6,1,8,9,10,11,12,13,2,15,16,17,18,19,20,3,22,23,24,25,26,27,4,29,30,31,32,33,34,5,36,37,38,39,40,41,6,43,44,45,46,47,48,1,50,51,52,53,54,55,8,57,58,59,60,61,62,9,64,65,66,67,68,69,10,71,72,73,74,75,76,11,78,79,80,81,82,83,12,85,86,87,88,89,90,13,92,93,94,95,96,97,2,99,100 add $0,1 lpb $0 dif $0,7 lpe
49.25
284
0.654822
4c3b0751533fe4c959d4fedcce4fc2b1a46c66ba
1,593
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0.log_6_1091.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0.log_6_1091.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0.log_6_1091.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r12 push %r14 push %r8 push %rax lea addresses_WT_ht+0xc0ce, %r12 nop and %r14, %r14 mov (%r12), %rax nop nop nop and $14363, %r8 pop %rax pop %r8 pop %r14 pop %r12 ret .global s_faulty_load s_faulty_load: push %r10 push %r13 push %r15 push %rbp push %rcx push %rdx push %rsi // Store lea addresses_RW+0x1520e, %rcx nop nop nop nop nop add %rbp, %rbp mov $0x5152535455565758, %r15 movq %r15, %xmm7 vmovups %ymm7, (%rcx) nop dec %r15 // Store lea addresses_US+0xec0e, %r10 nop nop and $10398, %r13 mov $0x5152535455565758, %r15 movq %r15, %xmm5 vmovups %ymm5, (%r10) nop nop nop nop and %rcx, %rcx // Faulty Load lea addresses_D+0x140e, %rsi nop nop nop and $47407, %r15 mov (%rsi), %r13 lea oracles, %rdx and $0xff, %r13 shlq $12, %r13 mov (%rdx,%r13,1), %r13 pop %rsi pop %rdx pop %rcx pop %rbp pop %r15 pop %r13 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_D', 'AVXalign': False, 'size': 8}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 8, 'type': 'addresses_RW', 'AVXalign': False, 'size': 32}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 11, 'type': 'addresses_US', 'AVXalign': False, 'size': 32}} [Faulty Load] {'src': {'NT': False, 'same': True, 'congruent': 0, 'type': 'addresses_D', 'AVXalign': False, 'size': 8}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'NT': False, 'same': False, 'congruent': 6, 'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 8}, 'OP': 'LOAD'} {'36': 6} 36 36 36 36 36 36 */
17.315217
124
0.646579
d23ad768191d897b31d2e5098090e3c8df59306f
2,163
asm
Assembly
programs/oeis/156/A156928.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/156/A156928.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/156/A156928.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A156928: G.f. of the z^1 coefficients of the FP1 in the second column of the A156921 matrix. ; 1,7,28,86,227,545,1230,2664,5613,11611,23728,48106,97031,195077,391394,784284,1570353,3142815,6288100,12579070,25161451,50326697,100657718,201320336,402646197,805298595,1610604120,3221215954,6442440463,12884890381,25769791178,51539593796,103079200121,206158413927,412316842764,824633701734,1649267421043,3298534861105,6597069742750,13194139507640,26388279039101,52776558103787,105553116235008,211106232499386,422212465030167,844424930093845,1688849860223410,3377699720484844,6755399441010113,13510798882063151,27021597764171828,54043195528391886,108086391056834811,216172782113723577,432345564227504134,864691128455068384,1729382256910200133,3458764513820466995,6917529027641004200,13835058055282082210,27670116110564241951,55340232221128565277,110680464442257215898,221360928884514521236,442721857769029136137,885443715538058370295,1770887431076116843100,3541774862152233793334,7083549724304467698563,14167099448608935513921,28334198897217871149678,56668397794435742426376,113336795588871484985101,226673591177742970108027,453347182355485940359504,906694364710971880868234,1813388729421943761891623,3626777458843887523944485,7253554917687775048056450,14507109835375550096286780,29014219670751100192754001,58028439341502200385695167,116056878683004400771584388,232113757366008801543369886,464227514732017603086948107,928455029464035206174111945,1856910058928070412348447190,3713820117856140824697125424,7427640235712281649394489813,14855280471424563298789226691,29710560942849126597578708728,59421121885698253195157681266,118842243771396506390315634991,237684487542793012780631551277,475368975085586025561263392874,950737950171172051122527085284,1901475900342344102245054479513,3802951800684688204490109277575,7605903601369376408980218883500,15211807202738752817960438105350 lpb $0 mov $2,$0 seq $2,247620 ; Start with a single hexagon; at n-th generation add a hexagon at each expandable vertex; a(n) is the sum of all label values at n-th generation. (See comment for construction rules.) add $1,$2 add $3,$0 sub $0,1 sub $1,$3 lpe add $1,1 mov $0,$1
154.5
1,776
0.896902
6da11e0e72d03dd1462b8dc1479fbdad6f5e9837
7,170
asm
Assembly
16F877A-FINAL.asm
Artoriuz/PIC-ASM-Maglock
a8980058a74870ab3290720ad712b1a16463c3f2
[ "MIT" ]
null
null
null
16F877A-FINAL.asm
Artoriuz/PIC-ASM-Maglock
a8980058a74870ab3290720ad712b1a16463c3f2
[ "MIT" ]
null
null
null
16F877A-FINAL.asm
Artoriuz/PIC-ASM-Maglock
a8980058a74870ab3290720ad712b1a16463c3f2
[ "MIT" ]
null
null
null
#INCLUDE <P16F877A.INC> __CONFIG _HS_OSC&_WDT_OFF&_PWRTE_ON&_CP_OFF #DEFINE OUTPUT_LED PORTC,3 #DEFINE PST_LCK 0x20,0 ;States to help with code flow #DEFINE PST_OPN 0x20,1 ;States to help with code flow #DEFINE BT_OPN_CLS PORTB,7 ;Open/Close button #DEFINE BT_PSW_CHG PORTB,6 ;Password change button #DEFINE MATRIX_1 PORTD,6 ;Keyboard #DEFINE MATRIX_2 PORTD,5 ;Keyboard #DEFINE MATRIX_3 PORTD,4 ;Keyboard #DEFINE MATRIX_A PORTD,3 ;Keyboard #DEFINE MATRIX_B PORTD,2 ;Keyboard #DEFINE MATRIX_C PORTD,1 ;Keyboard #DEFINE MATRIX_D PORTD,0 ;Keyboard ;Memory definitions #DEFINE PASS_PRESS_1 0x21 ;Value in the 1st key-press #DEFINE PASS_PRESS_2 0x22 ;Value in the 2nd key-press #DEFINE PASS_PRESS_3 0x23 ;Value in the 3rd key-press #DEFINE PASS_PRESS_4 0x24 ;Value in the 4th key-press #DEFINE PASSWORD_1 0x25 ;1st password value #DEFINE PASSWORD_2 0x26 ;2nd password value #DEFINE PASSWORD_3 0x27 ;3rd password value #DEFINE PASSWORD_4 0x28 ;4th password value ;Just goes to setup from here ORG 0x00 GOTO SETUP ;Interrupt routine ORG 0x04 ;Start of interrupt routine BTFSC INTCON,0 ;check which interruption happened (RBIF here) GOTO INTERRUPT_PRIORITY GOTO INTR_EXIT INTERRUPT_PRIORITY ;Here we check which interrupt happened BTFSC BT_OPN_CLS GOTO BT_INT_CHECK ;Open/Close operation BTFSC BT_PSW_CHG GOTO PASSWORD_CHANGE ;Password change operation GOTO INTERRUPT_PRIORITY PASSWORD_CHANGE BTFSS BT_PSW_CHG ;Just waiting the the key to be released GOTO PASSWORD_CHANGE_CONT GOTO PASSWORD_CHANGE PASSWORD_CHANGE_CONT BTFSC PST_LCK GOTO INTR_EXIT ;We can't continue unless the lock is open ;If the lock is open we can proceed capturing the new password CALL BT_PRESS_LOOP MOVWF PASSWORD_1 CALL BT_PRESS_LOOP MOVWF PASSWORD_2 CALL BT_PRESS_LOOP MOVWF PASSWORD_3 CALL BT_PRESS_LOOP MOVWF PASSWORD_4 ;Then we clear W just to be safe CLRW ;Then we can lock it again BSF PST_LCK BCF PST_OPN BSF OUTPUT_LED ;And we can finally leave the interruption GOTO INTR_EXIT ;In the Open/Close operation we always arrive here first ;And we wait for the key to be released BT_INT_CHECK BTFSS BT_OPN_CLS GOTO STATE_CHANGE_0 GOTO BT_INT_CHECK ;The course of the code changes if the lock is open or closed STATE_CHANGE_0 BTFSC PST_LCK GOTO STATE_CHANGE_PST_LCK BTFSC PST_OPN GOTO STATE_CHANGE_PST_OPN ;Again we wait for the key to be released then proceed to the password insertion STATE_CHANGE_PST_LCK BTFSS BT_OPN_CLS GOTO LCK GOTO STATE_CHANGE_PST_LCK ;Again we wait for the key to be released then proceed to locking STATE_CHANGE_PST_OPN BTFSS BT_OPN_CLS GOTO OPN GOTO STATE_CHANGE_PST_OPN ;Here we'll just lock things OPN BSF PST_LCK BCF PST_OPN BSF OUTPUT_LED GOTO INTR_EXIT ;Here we'll check if the user knows the correct password LCK ;Just to make sure everything stays at it should BSF PST_LCK BCF PST_OPN BSF OUTPUT_LED ;Calling the button press loop subroutine ;so we can get key-presses and store them CALL BT_PRESS_LOOP MOVWF PASS_PRESS_1 CALL BT_PRESS_LOOP MOVWF PASS_PRESS_2 CALL BT_PRESS_LOOP MOVWF PASS_PRESS_3 CALL BT_PRESS_LOOP MOVWF PASS_PRESS_4 ;Now we start to compare the pressed keys with the password MOVF PASS_PRESS_1,0 SUBWF PASSWORD_1,0 BTFSS STATUS,2 GOTO STAY_LOCKED MOVF PASS_PRESS_2,0 SUBWF PASSWORD_2,0 BTFSS STATUS,2 GOTO STAY_LOCKED MOVF PASS_PRESS_3,0 SUBWF PASSWORD_3,0 BTFSS STATUS,2 GOTO STAY_LOCKED MOVF PASS_PRESS_4,0 SUBWF PASSWORD_4,0 BTFSS STATUS,2 GOTO STAY_LOCKED ;If every key was correct we can open GOTO CAN_OPEN BT_PRESS_LOOP ;We energise each letter while waiting for presses in the numbers BSF MATRIX_A BCF MATRIX_B BCF MATRIX_C BCF MATRIX_D BTFSC MATRIX_1 GOTO A_1_PRESSED BTFSC MATRIX_2 GOTO A_2_PRESSED BTFSC MATRIX_3 GOTO A_3_PRESSED ;Energising the B line BCF MATRIX_A BSF MATRIX_B BCF MATRIX_C BCF MATRIX_D BTFSC MATRIX_1 GOTO B_1_PRESSED BTFSC MATRIX_2 GOTO B_2_PRESSED BTFSC MATRIX_3 GOTO B_3_PRESSED ;Energising the C line BCF MATRIX_A BCF MATRIX_B BSF MATRIX_C BCF MATRIX_D BTFSC MATRIX_1 GOTO C_1_PRESSED BTFSC MATRIX_2 GOTO C_2_PRESSED BTFSC MATRIX_3 GOTO C_3_PRESSED ;Energising the D line BCF MATRIX_A BCF MATRIX_B BCF MATRIX_C BSF MATRIX_D BTFSC MATRIX_1 GOTO D_1_PRESSED BTFSC MATRIX_2 GOTO D_2_PRESSED BTFSC MATRIX_3 GOTO D_3_PRESSED ;Back to the beginning of the loop if nothing was pressed GOTO BT_PRESS_LOOP ;Depending on which key was pressed, we load W with a different value ;and call for a subroutine that prevents keys from being capture multiple times A_1_PRESSED MOVLW b'00000001' CALL BT_RLS_CHK_ROUTINE RETURN A_2_PRESSED MOVLW b'00000010' CALL BT_RLS_CHK_ROUTINE RETURN A_3_PRESSED MOVLW b'00000011' CALL BT_RLS_CHK_ROUTINE RETURN B_1_PRESSED MOVLW b'00000100' CALL BT_RLS_CHK_ROUTINE RETURN B_2_PRESSED MOVLW b'00000101' CALL BT_RLS_CHK_ROUTINE RETURN B_3_PRESSED MOVLW b'00000111' CALL BT_RLS_CHK_ROUTINE RETURN C_1_PRESSED MOVLW b'00001000' CALL BT_RLS_CHK_ROUTINE RETURN C_2_PRESSED MOVLW b'00001001' CALL BT_RLS_CHK_ROUTINE RETURN C_3_PRESSED MOVLW b'00001010' CALL BT_RLS_CHK_ROUTINE RETURN D_1_PRESSED MOVLW b'00001011' CALL BT_RLS_CHK_ROUTINE RETURN D_2_PRESSED MOVLW b'00001100' CALL BT_RLS_CHK_ROUTINE RETURN D_3_PRESSED MOVLW b'00001101' CALL BT_RLS_CHK_ROUTINE RETURN BT_RLS_CHK_ROUTINE ;In this subroutine we prevent accidental key-presses BT_RLS_CHK_1 BTFSS MATRIX_1 GOTO BT_RLS_CHK_2 GOTO BT_RLS_CHK_1 BT_RLS_CHK_2 BTFSS MATRIX_2 GOTO BT_RLS_CHK_3 GOTO BT_RLS_CHK_2 BT_RLS_CHK_3 BTFSS MATRIX_3 RETURN GOTO BT_RLS_CHK_3 ;If the inserted password is wrong we arrive here STAY_LOCKED BSF OUTPUT_LED BSF PST_LCK BCF PST_OPN GOTO INTR_EXIT ;And if it's correct we arrive here CAN_OPEN BCF OUTPUT_LED BCF PST_LCK BSF PST_OPN GOTO INTR_EXIT ;Before exiting the interrupt we need to clean our mess INTR_EXIT BCF MATRIX_A BCF MATRIX_B BCF MATRIX_C BCF MATRIX_D CLRF PASS_PRESS_1 CLRF PASS_PRESS_2 CLRF PASS_PRESS_3 CLRF PASS_PRESS_4 BCF INTCON,0 ;And we also need to clear interrupt flags RETFIE SETUP ;Port configuration BSF STATUS,5 ;Switch to Bank 1 MOVLW b'11110000' MOVWF TRISD ;Set Port D pins to input/output MOVLW b'11000000' MOVWF TRISB ;Set Port B pins to input/output MOVLW b'00000000' MOVWF TRISC ;Set Port C pins to output MOVLW b'000000' MOVWF TRISA ;Set Port A pins to output MOVLW b'10001000'; MOVWF INTCON; ;interrupt enable bits (global, RB7:RB4) BCF STATUS,5 ;Switch back to Bank 0 ;Initially clearing everything CLRF PORTA CLRF PORTB CLRF PORTC CLRF PORTD BSF OUTPUT_LED BSF PST_LCK BCF PST_OPN ;Clearing the key-press values CLRF PASS_PRESS_1 CLRF PASS_PRESS_2 CLRF PASS_PRESS_3 CLRF PASS_PRESS_4 ;Default password MOVLW b'00000001' MOVWF PASSWORD_1 MOVLW b'00000010' MOVWF PASSWORD_2 MOVLW b'00000011' MOVWF PASSWORD_3 MOVLW b'00000100' MOVWF PASSWORD_4 GOTO START START GOTO START END
20.722543
80
0.777406
6365ad5b8f90a78aceee09e60b88093d0e567de5
770
asm
Assembly
oeis/108/A108215.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/108/A108215.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/108/A108215.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A108215: 4-almost primes equal to the product of two successive semiprimes. ; Submitted by Jon Maiga ; 24,54,90,140,210,315,462,550,650,858,1122,1190,1330,1482,1794,2254,2499,2805,3135,3306,3596,4030,4485,5106,5698,6314,6970,7310,7482,7917,8463,8742,8930,10070,11766,12765,13570,14042,14399,14762,15006,15867,17157,17822,18894,20022,20306,20735,21170,22630,24490,25122,25599,26726,28054,29913,31506,32574,33855,34595,36278,38994,40602,41006,41615,42230,43054,44517,45582,46010,46655,47306,47742,48399,49946,53110,55695,58539,61503,62997,64262,65786,67858,69430,70755,73158,76172,79786,82943,84099,85845 mov $2,$0 mov $3,2 lpb $3 mov $0,$2 add $1,$4 sub $3,1 add $0,$3 max $0,0 seq $0,88707 ; Semiprimes + 1. sub $0,1 mov $4,$0 lpe mul $1,$0 mov $0,$1
40.526316
501
0.742857
d195ddb26c3b00631d63145fbe324bd951c5ef52
555
asm
Assembly
code/S01E05/asm/02_ini_end.asm
fcatrin/bitabit
2f5dca6fde7a5413ff9e3d1119fb74a82735dd01
[ "MIT" ]
2
2020-07-25T21:02:47.000Z
2021-03-25T03:21:47.000Z
code/S01E05/asm/02_ini_end.asm
fcatrin/bitabit
2f5dca6fde7a5413ff9e3d1119fb74a82735dd01
[ "MIT" ]
null
null
null
code/S01E05/asm/02_ini_end.asm
fcatrin/bitabit
2f5dca6fde7a5413ff9e3d1119fb74a82735dd01
[ "MIT" ]
null
null
null
ini = 40000 chars = 960 ptr = 202 len = 204 org $2000 start lda #<ini sta ptr lda #>ini sta ptr+1 lda #<chars sta len lda #>chars sta len+1 ldy #0 loop lda 53770 sta (ptr),y inc ptr bne nopage inc ptr+1 nopage dec len lda len ora len+1 beq end lda len cmp #$FF bne loop dec len+1 jmp loop end jmp end
13.875
20
0.38018
50024badb8f353311fc049e6d019886fd758d568
1,090
asm
Assembly
scripts/seafoamislands2.asm
adhi-thirumala/EvoYellow
6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c
[ "Unlicense" ]
16
2018-08-28T21:47:01.000Z
2022-02-20T20:29:59.000Z
scripts/seafoamislands2.asm
adhi-thirumala/EvoYellow
6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c
[ "Unlicense" ]
5
2019-04-03T19:53:11.000Z
2022-03-11T22:49:34.000Z
scripts/seafoamislands2.asm
adhi-thirumala/EvoYellow
6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c
[ "Unlicense" ]
2
2019-12-09T19:46:02.000Z
2020-12-05T21:36:30.000Z
SeafoamIslands2Script: call EnableAutoTextBoxDrawing ld hl, wFlags_0xcd60 bit 7, [hl] res 7, [hl] jr z, .asm_46362 ld hl, Seafoam2HolesCoords call CheckBoulderCoords ret nc EventFlagAddress hl, EVENT_SEAFOAM2_BOULDER1_DOWN_HOLE ld a, [wCoordIndex] cp $1 jr nz, .asm_46340 SetEventReuseHL EVENT_SEAFOAM2_BOULDER1_DOWN_HOLE ld a, HS_SEAFOAM_ISLANDS_2_BOULDER_1 ld [wObjectToHide], a ld a, HS_SEAFOAM_ISLANDS_3_BOULDER_1 ld [wObjectToShow], a jr .asm_4634c .asm_46340 SetEventAfterBranchReuseHL EVENT_SEAFOAM2_BOULDER2_DOWN_HOLE, EVENT_SEAFOAM2_BOULDER1_DOWN_HOLE ld a, HS_SEAFOAM_ISLANDS_2_BOULDER_2 ld [wObjectToHide], a ld a, HS_SEAFOAM_ISLANDS_3_BOULDER_2 ld [wObjectToShow], a .asm_4634c ld a, [wObjectToHide] ld [wMissableObjectIndex], a predef HideObject ld a, [wObjectToShow] ld [wMissableObjectIndex], a predef_jump ShowObject .asm_46362 ld a, $a0 ld [wDungeonWarpDestinationMap], a ld hl, Seafoam2HolesCoords jp IsPlayerOnDungeonWarp Seafoam2HolesCoords: db $06,$12 db $06,$17 db $ff SeafoamIslands2TextPointers: dw BoulderText dw BoulderText
23.191489
96
0.805505
3cd31e366dff1d894372c140611bbf213e4f9a1e
3,978
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_21829_1887.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_21829_1887.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_21829_1887.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %rbx push %rdi push %rdx lea addresses_normal_ht+0xdff2, %rdx nop xor $21190, %rdi mov (%rdx), %rbx cmp $22953, %rdi pop %rdx pop %rdi pop %rbx ret .global s_faulty_load s_faulty_load: push %r14 push %r8 push %r9 push %rax push %rcx push %rdi // Faulty Load lea addresses_A+0x67f2, %r9 cmp $24855, %r14 movups (%r9), %xmm1 vpextrq $0, %xmm1, %r8 lea oracles, %rcx and $0xff, %r8 shlq $12, %r8 mov (%rcx,%r8,1), %r8 pop %rdi pop %rcx pop %rax pop %r9 pop %r8 pop %r14 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_A', 'same': False, 'size': 4, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} [Faulty Load] {'src': {'type': 'addresses_A', 'same': True, 'size': 16, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'type': 'addresses_normal_ht', 'same': False, 'size': 8, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'35': 21829} 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 */
75.056604
2,999
0.661388
74eefbf5eb66e80eb4e235ac385f7895a2b7e5a9
336
asm
Assembly
programs/oeis/069/A069816.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/069/A069816.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/069/A069816.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A069816: a(n) = (sum of digits of n)^2 - (sum of digits^2 of n). ; 0,0,0,0,0,0,0,0,0,0,0,2,4,6,8,10,12,14,16,18,0,4,8,12,16,20,24,28,32,36,0,6,12,18,24,30,36,42,48,54,0,8,16,24,32,40,48,56,64,72,0,10,20,30,40,50,60,70,80,90,0,12,24,36,48,60,72,84,96,108,0,14,28,42,56,70,84 mov $1,$0 mod $1,10 sub $0,$1 mul $1,$0 div $1,10 mul $1,2
33.6
208
0.598214
a9433480aae6e07144216d764b42950bfc65a244
150
asm
Assembly
sw/552tests/inst_tests/jr_0.asm
JPShen-UWM/ThreadKraken
849c510531f28e36d3469535737b2120bd774935
[ "MIT" ]
1
2022-02-15T16:03:25.000Z
2022-02-15T16:03:25.000Z
sw/552tests/inst_tests/jr_0.asm
JPShen-UWM/ThreadKraken
849c510531f28e36d3469535737b2120bd774935
[ "MIT" ]
null
null
null
sw/552tests/inst_tests/jr_0.asm
JPShen-UWM/ThreadKraken
849c510531f28e36d3469535737b2120bd774935
[ "MIT" ]
null
null
null
// Test provided by Karu lbi r1, 2 lbi r3, 4 // should jump to PC=0x000a // skip the 2 add instructions jr r1, 8 add r2, r1, r3 add r3, r1, r3 halt
15
30
0.666667
ebd0191859925af8dd8364edfc35128cdf5ca37a
19,010
asm
Assembly
third_party/codecs/xvidcore/src/image/x86_asm/interpolate8x8_xmm.asm
Narflex/sagetv
76cb5755e54fd3b01d2bb708a8a72af0aa1533f1
[ "Apache-2.0" ]
292
2015-08-10T18:34:55.000Z
2022-01-26T00:38:45.000Z
third_party/codecs/xvidcore/src/image/x86_asm/interpolate8x8_xmm.asm
Narflex/sagetv
76cb5755e54fd3b01d2bb708a8a72af0aa1533f1
[ "Apache-2.0" ]
366
2015-08-10T18:21:02.000Z
2022-01-22T20:03:41.000Z
third_party/codecs/xvidcore/src/image/x86_asm/interpolate8x8_xmm.asm
Narflex/sagetv
76cb5755e54fd3b01d2bb708a8a72af0aa1533f1
[ "Apache-2.0" ]
227
2015-08-10T22:24:29.000Z
2022-02-25T19:16:21.000Z
;/***************************************************************************** ; * ; * XVID MPEG-4 VIDEO CODEC ; * - mmx 8x8 block-based halfpel interpolation - ; * ; * Copyright(C) 2002-2008 Michael Militzer <michael@xvid.org> ; * 2002 Pascal Massimino <skal@planet-d.net> ; * ; * This program 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. ; * ; * This program 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 this program ; if not, write to the Free Software ; * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ; * ; ****************************************************************************/ %include "nasm.inc" ;============================================================================= ; Read only data ;============================================================================= DATA ALIGN SECTION_ALIGN mmx_one: times 8 db 1 TEXT cglobal interpolate8x8_halfpel_h_xmm cglobal interpolate8x8_halfpel_v_xmm cglobal interpolate8x8_halfpel_hv_xmm cglobal interpolate8x4_halfpel_h_xmm cglobal interpolate8x4_halfpel_v_xmm cglobal interpolate8x4_halfpel_hv_xmm cglobal interpolate8x8_halfpel_add_xmm cglobal interpolate8x8_halfpel_h_add_xmm cglobal interpolate8x8_halfpel_v_add_xmm cglobal interpolate8x8_halfpel_hv_add_xmm ;=========================================================================== ; ; void interpolate8x8_halfpel_h_xmm(uint8_t * const dst, ; const uint8_t * const src, ; const uint32_t stride, ; const uint32_t rounding); ; ;=========================================================================== %macro COPY_H_SSE_RND0 0 movq mm0, [_EAX] pavgb mm0, [_EAX+1] movq mm1, [_EAX+TMP1] pavgb mm1, [_EAX+TMP1+1] lea _EAX,[_EAX+2*TMP1] movq [TMP0],mm0 movq [TMP0+TMP1],mm1 %endmacro %macro COPY_H_SSE_RND1 0 movq mm0, [_EAX] movq mm1, [_EAX+TMP1] movq mm4, mm0 movq mm5, mm1 movq mm2, [_EAX+1] movq mm3, [_EAX+TMP1+1] pavgb mm0, mm2 pxor mm2, mm4 pavgb mm1, mm3 lea _EAX, [_EAX+2*TMP1] pxor mm3, mm5 pand mm2, mm7 pand mm3, mm7 psubb mm0, mm2 movq [TMP0], mm0 psubb mm1, mm3 movq [TMP0+TMP1], mm1 %endmacro ALIGN SECTION_ALIGN interpolate8x8_halfpel_h_xmm: mov _EAX, prm4 ; rounding mov TMP0, prm1 ; Dst test _EAX,_EAX mov _EAX, prm2 ; Src mov TMP1, prm3 ; stride jnz near .rounding1 COPY_H_SSE_RND0 lea TMP0,[TMP0+2*TMP1] COPY_H_SSE_RND0 lea TMP0,[TMP0+2*TMP1] COPY_H_SSE_RND0 lea TMP0,[TMP0+2*TMP1] COPY_H_SSE_RND0 ret .rounding1: ; we use: (i+j)/2 = ( i+j+1 )/2 - (i^j)&1 movq mm7, [mmx_one] COPY_H_SSE_RND1 lea TMP0, [TMP0+2*TMP1] COPY_H_SSE_RND1 lea TMP0,[TMP0+2*TMP1] COPY_H_SSE_RND1 lea TMP0,[TMP0+2*TMP1] COPY_H_SSE_RND1 ret ENDFUNC ;=========================================================================== ; ; void interpolate8x8_halfpel_v_xmm(uint8_t * const dst, ; const uint8_t * const src, ; const uint32_t stride, ; const uint32_t rounding); ; ;=========================================================================== %macro COPY_V_SSE_RND0 0 movq mm0, [_EAX] movq mm1, [_EAX+TMP1] pavgb mm0, mm1 pavgb mm1, [_EAX+2*TMP1] lea _EAX, [_EAX+2*TMP1] movq [TMP0], mm0 movq [TMP0+TMP1],mm1 %endmacro %macro COPY_V_SSE_RND1 0 movq mm0, mm2 movq mm1, [_EAX] movq mm2, [_EAX+TMP1] lea _EAX,[_EAX+2*TMP1] movq mm4, mm0 movq mm5, mm1 pavgb mm0, mm1 pxor mm4, mm1 pavgb mm1, mm2 pxor mm5, mm2 pand mm4, mm7 ; lsb's of (i^j)... pand mm5, mm7 ; lsb's of (i^j)... psubb mm0, mm4 ; ...are substracted from result of pavgb movq [TMP0], mm0 psubb mm1, mm5 ; ...are substracted from result of pavgb movq [TMP0+TMP1], mm1 %endmacro ALIGN SECTION_ALIGN interpolate8x8_halfpel_v_xmm: mov _EAX, prm4 ; rounding mov TMP0, prm1 ; Dst test _EAX,_EAX mov _EAX, prm2 ; Src mov TMP1, prm3 ; stride ; we process 2 line at a time jnz near .rounding1 COPY_V_SSE_RND0 lea TMP0, [TMP0+2*TMP1] COPY_V_SSE_RND0 lea TMP0, [TMP0+2*TMP1] COPY_V_SSE_RND0 lea TMP0, [TMP0+2*TMP1] COPY_V_SSE_RND0 ret .rounding1: ; we use: (i+j)/2 = ( i+j+1 )/2 - (i^j)&1 movq mm7, [mmx_one] movq mm2, [_EAX] ; loop invariant add _EAX, TMP1 COPY_V_SSE_RND1 lea TMP0,[TMP0+2*TMP1] COPY_V_SSE_RND1 lea TMP0,[TMP0+2*TMP1] COPY_V_SSE_RND1 lea TMP0,[TMP0+2*TMP1] COPY_V_SSE_RND1 ret ENDFUNC ;=========================================================================== ; ; void interpolate8x8_halfpel_hv_xmm(uint8_t * const dst, ; const uint8_t * const src, ; const uint32_t stride, ; const uint32_t rounding); ; ; ;=========================================================================== ; The trick is to correct the result of 'pavgb' with some combination of the ; lsb's of the 4 input values i,j,k,l, and their intermediate 'pavgb' (s and t). ; The boolean relations are: ; (i+j+k+l+3)/4 = (s+t+1)/2 - (ij&kl)&st ; (i+j+k+l+2)/4 = (s+t+1)/2 - (ij|kl)&st ; (i+j+k+l+1)/4 = (s+t+1)/2 - (ij&kl)|st ; (i+j+k+l+0)/4 = (s+t+1)/2 - (ij|kl)|st ; with s=(i+j+1)/2, t=(k+l+1)/2, ij = i^j, kl = k^l, st = s^t. ; Moreover, we process 2 lines at a times, for better overlapping (~15% faster). %macro COPY_HV_SSE_RND0 0 lea _EAX, [_EAX+TMP1] movq mm0, [_EAX] movq mm1, [_EAX+1] movq mm6, mm0 pavgb mm0, mm1 ; mm0=(j+k+1)/2. preserved for next step lea _EAX, [_EAX+TMP1] pxor mm1, mm6 ; mm1=(j^k). preserved for next step por mm3, mm1 ; ij |= jk movq mm6, mm2 pxor mm6, mm0 ; mm6 = s^t pand mm3, mm6 ; (ij|jk) &= st pavgb mm2, mm0 ; mm2 = (s+t+1)/2 pand mm3, mm7 ; mask lsb psubb mm2, mm3 ; apply. movq [TMP0], mm2 movq mm2, [_EAX] movq mm3, [_EAX+1] movq mm6, mm2 pavgb mm2, mm3 ; preserved for next iteration lea TMP0,[TMP0+TMP1] pxor mm3, mm6 ; preserved for next iteration por mm1, mm3 movq mm6, mm0 pxor mm6, mm2 pand mm1, mm6 pavgb mm0, mm2 pand mm1, mm7 psubb mm0, mm1 movq [TMP0], mm0 %endmacro %macro COPY_HV_SSE_RND1 0 lea _EAX, [_EAX+TMP1] movq mm0, [_EAX] movq mm1, [_EAX+1] movq mm6, mm0 pavgb mm0, mm1 ; mm0=(j+k+1)/2. preserved for next step lea _EAX, [_EAX+TMP1] pxor mm1, mm6 ; mm1=(j^k). preserved for next step pand mm3, mm1 movq mm6, mm2 pxor mm6, mm0 por mm3, mm6 pavgb mm2, mm0 pand mm3, mm7 psubb mm2, mm3 movq [TMP0], mm2 movq mm2, [_EAX] movq mm3, [_EAX+1] movq mm6, mm2 pavgb mm2, mm3 ; preserved for next iteration lea TMP0,[TMP0+TMP1] pxor mm3, mm6 ; preserved for next iteration pand mm1, mm3 movq mm6, mm0 pxor mm6, mm2 por mm1, mm6 pavgb mm0, mm2 pand mm1, mm7 psubb mm0, mm1 movq [TMP0], mm0 %endmacro ALIGN SECTION_ALIGN interpolate8x8_halfpel_hv_xmm: mov _EAX, prm4 ; rounding mov TMP0, prm1 ; Dst test _EAX, _EAX mov _EAX, prm2 ; Src mov TMP1, prm3 ; stride movq mm7, [mmx_one] ; loop invariants: mm2=(i+j+1)/2 and mm3= i^j movq mm2, [_EAX] movq mm3, [_EAX+1] movq mm6, mm2 pavgb mm2, mm3 pxor mm3, mm6 ; mm2/mm3 ready jnz near .rounding1 COPY_HV_SSE_RND0 add TMP0, TMP1 COPY_HV_SSE_RND0 add TMP0, TMP1 COPY_HV_SSE_RND0 add TMP0, TMP1 COPY_HV_SSE_RND0 ret .rounding1: COPY_HV_SSE_RND1 add TMP0, TMP1 COPY_HV_SSE_RND1 add TMP0, TMP1 COPY_HV_SSE_RND1 add TMP0, TMP1 COPY_HV_SSE_RND1 ret ENDFUNC ;=========================================================================== ; ; void interpolate8x4_halfpel_h_xmm(uint8_t * const dst, ; const uint8_t * const src, ; const uint32_t stride, ; const uint32_t rounding); ; ;=========================================================================== ALIGN SECTION_ALIGN interpolate8x4_halfpel_h_xmm: mov _EAX, prm4 ; rounding mov TMP0, prm1 ; Dst test _EAX,_EAX mov _EAX, prm2 ; Src mov TMP1, prm3 ; stride jnz near .rounding1 COPY_H_SSE_RND0 lea TMP0,[TMP0+2*TMP1] COPY_H_SSE_RND0 ret .rounding1: ; we use: (i+j)/2 = ( i+j+1 )/2 - (i^j)&1 movq mm7, [mmx_one] COPY_H_SSE_RND1 lea TMP0, [TMP0+2*TMP1] COPY_H_SSE_RND1 ret ENDFUNC ;=========================================================================== ; ; void interpolate8x4_halfpel_v_xmm(uint8_t * const dst, ; const uint8_t * const src, ; const uint32_t stride, ; const uint32_t rounding); ; ;=========================================================================== ALIGN SECTION_ALIGN interpolate8x4_halfpel_v_xmm: mov _EAX, prm4 ; rounding mov TMP0, prm1 ; Dst test _EAX,_EAX mov _EAX, prm2 ; Src mov TMP1, prm3 ; stride ; we process 2 line at a time jnz near .rounding1 COPY_V_SSE_RND0 lea TMP0, [TMP0+2*TMP1] COPY_V_SSE_RND0 ret .rounding1: ; we use: (i+j)/2 = ( i+j+1 )/2 - (i^j)&1 movq mm7, [mmx_one] movq mm2, [_EAX] ; loop invariant add _EAX, TMP1 COPY_V_SSE_RND1 lea TMP0,[TMP0+2*TMP1] COPY_V_SSE_RND1 ret ENDFUNC ;=========================================================================== ; ; void interpolate8x4_halfpel_hv_xmm(uint8_t * const dst, ; const uint8_t * const src, ; const uint32_t stride, ; const uint32_t rounding); ; ; ;=========================================================================== ; The trick is to correct the result of 'pavgb' with some combination of the ; lsb's of the 4 input values i,j,k,l, and their intermediate 'pavgb' (s and t). ; The boolean relations are: ; (i+j+k+l+3)/4 = (s+t+1)/2 - (ij&kl)&st ; (i+j+k+l+2)/4 = (s+t+1)/2 - (ij|kl)&st ; (i+j+k+l+1)/4 = (s+t+1)/2 - (ij&kl)|st ; (i+j+k+l+0)/4 = (s+t+1)/2 - (ij|kl)|st ; with s=(i+j+1)/2, t=(k+l+1)/2, ij = i^j, kl = k^l, st = s^t. ; Moreover, we process 2 lines at a times, for better overlapping (~15% faster). ALIGN SECTION_ALIGN interpolate8x4_halfpel_hv_xmm: mov _EAX, prm4 ; rounding mov TMP0, prm1 ; Dst test _EAX, _EAX mov _EAX, prm2 ; Src mov TMP1, prm3 ; stride movq mm7, [mmx_one] ; loop invariants: mm2=(i+j+1)/2 and mm3= i^j movq mm2, [_EAX] movq mm3, [_EAX+1] movq mm6, mm2 pavgb mm2, mm3 pxor mm3, mm6 ; mm2/mm3 ready jnz near .rounding1 COPY_HV_SSE_RND0 add TMP0, TMP1 COPY_HV_SSE_RND0 ret .rounding1: COPY_HV_SSE_RND1 add TMP0, TMP1 COPY_HV_SSE_RND1 ret ENDFUNC ;=========================================================================== ; ; The next functions combine both source halfpel interpolation step and the ; averaging (with rouding) step to avoid wasting memory bandwidth computing ; intermediate halfpel images and then averaging them. ; ;=========================================================================== %macro PROLOG0 0 mov TMP0, prm1 ; Dst mov _EAX, prm2 ; Src mov TMP1, prm3 ; BpS %endmacro %macro PROLOG1 0 PROLOG0 test prm4d, 1; Rounding? %endmacro %macro EPILOG 0 ret %endmacro ;=========================================================================== ; ; void interpolate8x8_halfpel_add_xmm(uint8_t * const dst, ; const uint8_t * const src, ; const uint32_t stride, ; const uint32_t rounding); ; ; ;=========================================================================== %macro ADD_FF 2 movq mm0, [_EAX+%1] movq mm1, [_EAX+%2] ;;--- ;; movq mm2, mm0 ;; movq mm3, mm1 ;;--- pavgb mm0, [TMP0+%1] pavgb mm1, [TMP0+%2] ;;-- ;; por mm2, [TMP0+%1] ;; por mm3, [TMP0+%2] ;; pand mm2, [mmx_one] ;; pand mm3, [mmx_one] ;; psubsb mm0, mm2 ;; psubsb mm1, mm3 ;;-- movq [TMP0+%1], mm0 movq [TMP0+%2], mm1 %endmacro ALIGN SECTION_ALIGN interpolate8x8_halfpel_add_xmm: ; 23c PROLOG1 ADD_FF 0, TMP1 lea _EAX,[_EAX+2*TMP1] lea TMP0,[TMP0+2*TMP1] ADD_FF 0, TMP1 lea _EAX,[_EAX+2*TMP1] lea TMP0,[TMP0+2*TMP1] ADD_FF 0, TMP1 lea _EAX,[_EAX+2*TMP1] lea TMP0,[TMP0+2*TMP1] ADD_FF 0, TMP1 EPILOG ENDFUNC ;=========================================================================== ; ; void interpolate8x8_halfpel_h_add_xmm(uint8_t * const dst, ; const uint8_t * const src, ; const uint32_t stride, ; const uint32_t rounding); ; ; ;=========================================================================== %macro ADD_FH_RND0 2 movq mm0, [_EAX+%1] movq mm1, [_EAX+%2] pavgb mm0, [_EAX+%1+1] pavgb mm1, [_EAX+%2+1] pavgb mm0, [TMP0+%1] pavgb mm1, [TMP0+%2] movq [TMP0+%1],mm0 movq [TMP0+%2],mm1 %endmacro %macro ADD_FH_RND1 2 movq mm0, [_EAX+%1] movq mm1, [_EAX+%2] movq mm4, mm0 movq mm5, mm1 movq mm2, [_EAX+%1+1] movq mm3, [_EAX+%2+1] pavgb mm0, mm2 ; lea ?? pxor mm2, mm4 pavgb mm1, mm3 pxor mm3, mm5 pand mm2, [mmx_one] pand mm3, [mmx_one] psubb mm0, mm2 psubb mm1, mm3 pavgb mm0, [TMP0+%1] pavgb mm1, [TMP0+%2] movq [TMP0+%1],mm0 movq [TMP0+%2],mm1 %endmacro ALIGN SECTION_ALIGN interpolate8x8_halfpel_h_add_xmm: ; 32c PROLOG1 jnz near .Loop1 ADD_FH_RND0 0, TMP1 lea _EAX,[_EAX+2*TMP1] lea TMP0,[TMP0+2*TMP1] ADD_FH_RND0 0, TMP1 lea _EAX,[_EAX+2*TMP1] lea TMP0,[TMP0+2*TMP1] ADD_FH_RND0 0, TMP1 lea _EAX,[_EAX+2*TMP1] lea TMP0,[TMP0+2*TMP1] ADD_FH_RND0 0, TMP1 EPILOG .Loop1: ; we use: (i+j)/2 = ( i+j+1 )/2 - (i^j)&1 ; movq mm7, [mmx_one] ADD_FH_RND1 0, TMP1 lea _EAX,[_EAX+2*TMP1] lea TMP0,[TMP0+2*TMP1] ADD_FH_RND1 0, TMP1 lea _EAX,[_EAX+2*TMP1] lea TMP0,[TMP0+2*TMP1] ADD_FH_RND1 0, TMP1 lea _EAX,[_EAX+2*TMP1] lea TMP0,[TMP0+2*TMP1] ADD_FH_RND1 0, TMP1 EPILOG ENDFUNC ;=========================================================================== ; ; void interpolate8x8_halfpel_v_add_xmm(uint8_t * const dst, ; const uint8_t * const src, ; const uint32_t stride, ; const uint32_t rounding); ; ; ;=========================================================================== %macro ADD_8_HF_RND0 0 movq mm0, [_EAX] movq mm1, [_EAX+TMP1] pavgb mm0, mm1 pavgb mm1, [_EAX+2*TMP1] lea _EAX,[_EAX+2*TMP1] pavgb mm0, [TMP0] pavgb mm1, [TMP0+TMP1] movq [TMP0],mm0 movq [TMP0+TMP1],mm1 %endmacro %macro ADD_8_HF_RND1 0 movq mm1, [_EAX+TMP1] movq mm2, [_EAX+2*TMP1] lea _EAX,[_EAX+2*TMP1] movq mm4, mm0 movq mm5, mm1 pavgb mm0, mm1 pxor mm4, mm1 pavgb mm1, mm2 pxor mm5, mm2 pand mm4, mm7 ; lsb's of (i^j)... pand mm5, mm7 ; lsb's of (i^j)... psubb mm0, mm4 ; ...are substracted from result of pavgb pavgb mm0, [TMP0] movq [TMP0], mm0 psubb mm1, mm5 ; ...are substracted from result of pavgb pavgb mm1, [TMP0+TMP1] movq [TMP0+TMP1], mm1 %endmacro ALIGN SECTION_ALIGN interpolate8x8_halfpel_v_add_xmm: PROLOG1 jnz near .Loop1 pxor mm7, mm7 ; this is a NOP ADD_8_HF_RND0 lea TMP0,[TMP0+2*TMP1] ADD_8_HF_RND0 lea TMP0,[TMP0+2*TMP1] ADD_8_HF_RND0 lea TMP0,[TMP0+2*TMP1] ADD_8_HF_RND0 EPILOG .Loop1: movq mm0, [_EAX] ; loop invariant movq mm7, [mmx_one] ADD_8_HF_RND1 movq mm0, mm2 lea TMP0,[TMP0+2*TMP1] ADD_8_HF_RND1 movq mm0, mm2 lea TMP0,[TMP0+2*TMP1] ADD_8_HF_RND1 movq mm0, mm2 lea TMP0,[TMP0+2*TMP1] ADD_8_HF_RND1 EPILOG ENDFUNC ; The trick is to correct the result of 'pavgb' with some combination of the ; lsb's of the 4 input values i,j,k,l, and their intermediate 'pavgb' (s and t). ; The boolean relations are: ; (i+j+k+l+3)/4 = (s+t+1)/2 - (ij&kl)&st ; (i+j+k+l+2)/4 = (s+t+1)/2 - (ij|kl)&st ; (i+j+k+l+1)/4 = (s+t+1)/2 - (ij&kl)|st ; (i+j+k+l+0)/4 = (s+t+1)/2 - (ij|kl)|st ; with s=(i+j+1)/2, t=(k+l+1)/2, ij = i^j, kl = k^l, st = s^t. ; Moreover, we process 2 lines at a times, for better overlapping (~15% faster). ;=========================================================================== ; ; void interpolate8x8_halfpel_hv_add_xmm(uint8_t * const dst, ; const uint8_t * const src, ; const uint32_t stride, ; const uint32_t rounding); ; ; ;=========================================================================== %macro ADD_HH_RND0 0 lea _EAX,[_EAX+TMP1] movq mm0, [_EAX] movq mm1, [_EAX+1] movq mm6, mm0 pavgb mm0, mm1 ; mm0=(j+k+1)/2. preserved for next step lea _EAX,[_EAX+TMP1] pxor mm1, mm6 ; mm1=(j^k). preserved for next step por mm3, mm1 ; ij |= jk movq mm6, mm2 pxor mm6, mm0 ; mm6 = s^t pand mm3, mm6 ; (ij|jk) &= st pavgb mm2, mm0 ; mm2 = (s+t+1)/2 pand mm3, mm7 ; mask lsb psubb mm2, mm3 ; apply. pavgb mm2, [TMP0] movq [TMP0], mm2 movq mm2, [_EAX] movq mm3, [_EAX+1] movq mm6, mm2 pavgb mm2, mm3 ; preserved for next iteration lea TMP0,[TMP0+TMP1] pxor mm3, mm6 ; preserved for next iteration por mm1, mm3 movq mm6, mm0 pxor mm6, mm2 pand mm1, mm6 pavgb mm0, mm2 pand mm1, mm7 psubb mm0, mm1 pavgb mm0, [TMP0] movq [TMP0], mm0 %endmacro %macro ADD_HH_RND1 0 lea _EAX,[_EAX+TMP1] movq mm0, [_EAX] movq mm1, [_EAX+1] movq mm6, mm0 pavgb mm0, mm1 ; mm0=(j+k+1)/2. preserved for next step lea _EAX,[_EAX+TMP1] pxor mm1, mm6 ; mm1=(j^k). preserved for next step pand mm3, mm1 movq mm6, mm2 pxor mm6, mm0 por mm3, mm6 pavgb mm2, mm0 pand mm3, mm7 psubb mm2, mm3 pavgb mm2, [TMP0] movq [TMP0], mm2 movq mm2, [_EAX] movq mm3, [_EAX+1] movq mm6, mm2 pavgb mm2, mm3 ; preserved for next iteration lea TMP0,[TMP0+TMP1] pxor mm3, mm6 ; preserved for next iteration pand mm1, mm3 movq mm6, mm0 pxor mm6, mm2 por mm1, mm6 pavgb mm0, mm2 pand mm1, mm7 psubb mm0, mm1 pavgb mm0, [TMP0] movq [TMP0], mm0 %endmacro ALIGN SECTION_ALIGN interpolate8x8_halfpel_hv_add_xmm: PROLOG1 movq mm7, [mmx_one] ; loop invariants: mm2=(i+j+1)/2 and mm3= i^j movq mm2, [_EAX] movq mm3, [_EAX+1] movq mm6, mm2 pavgb mm2, mm3 pxor mm3, mm6 ; mm2/mm3 ready jnz near .Loop1 ADD_HH_RND0 add TMP0, TMP1 ADD_HH_RND0 add TMP0, TMP1 ADD_HH_RND0 add TMP0, TMP1 ADD_HH_RND0 EPILOG .Loop1: ADD_HH_RND1 add TMP0, TMP1 ADD_HH_RND1 add TMP0, TMP1 ADD_HH_RND1 add TMP0, TMP1 ADD_HH_RND1 EPILOG ENDFUNC NON_EXEC_STACK
23.09842
80
0.565439
df2f98e18e36be61094a871eca82e56ae63e2262
294
asm
Assembly
data/mapHeaders/undergroundpathwe.asm
adhi-thirumala/EvoYellow
6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c
[ "Unlicense" ]
16
2018-08-28T21:47:01.000Z
2022-02-20T20:29:59.000Z
data/mapHeaders/undergroundpathwe.asm
adhi-thirumala/EvoYellow
6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c
[ "Unlicense" ]
5
2019-04-03T19:53:11.000Z
2022-03-11T22:49:34.000Z
data/mapHeaders/undergroundpathwe.asm
adhi-thirumala/EvoYellow
6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c
[ "Unlicense" ]
2
2019-12-09T19:46:02.000Z
2020-12-05T21:36:30.000Z
UndergroundPathWE_h: db UNDERGROUND ; tileset db UNDERGROUND_PATH_WE_HEIGHT, UNDERGROUND_PATH_WE_WIDTH ; dimensions (y, x) dw UndergroundPathWEBlocks, UndergroundPathWETextPointers, UndergroundPathWEScript ; blocks, texts, scripts db $00 ; connections dw UndergroundPathWEObject ; objects
42
108
0.836735
7882a8bfb806d2412445b6dc80f50a2a8297cb77
1,427
asm
Assembly
lab_06/inter_1.asm
MrLIVB/BMSTU_MDPL
37060559dee9c168f38b5f0a406a71eefc599e32
[ "MIT" ]
null
null
null
lab_06/inter_1.asm
MrLIVB/BMSTU_MDPL
37060559dee9c168f38b5f0a406a71eefc599e32
[ "MIT" ]
null
null
null
lab_06/inter_1.asm
MrLIVB/BMSTU_MDPL
37060559dee9c168f38b5f0a406a71eefc599e32
[ "MIT" ]
null
null
null
.model tiny .code .186 org 100h start proc near mov ax, 351Ch int 21h mov word ptr old_int1Ch, bx mov word ptr old_int1Ch+2, es ;mov ax, 251Ch ;mov dx, offset int1Ch_handler ;int 21h call int1Ch_handler mov ah, 1 int 21h mov ax, 251Ch mov dx, word ptr old_int1Ch+2 mov ds, dx mov dx, word ptr cs:old_int1Ch int 21h ret old_int1Ch dd ? start_position dw 50*0 + 75*2 start endp int1Ch_handler proc far pusha push es push ds push cs pop ds mov ah, 02h int 1Ah jc exit_handler mov al, ch call bcd2asc mov byte ptr output_line[2], ah mov byte ptr output_line[4], al mov al, cl call bcd2asc mov byte ptr output_line[10], ah mov byte ptr output_line[12], al mov al, dh call bcd2asc mov byte ptr output_line[16], ah mov byte ptr output_line[18], al mov cx, output_line_1 push 0B800h pop es mov di, word ptr start_position mov si, offset output_line cld rep movsb exit_handler: pop ds pop es popa jmp cs:old_int1Ch bcd2asc proc near mov ah, al and al, 0Fh shr ah, 4 add al, '0' add ah, '0' ret bcd2asc endp output_line db ' ',1Fh,'0',1Fh,'0',1Fh,'h',1Fh db ' ',1Fh,'0',1Fh,'0',1Fh,':',1Fh db '0',1Fh,'0',1Fh,' ',1Fh output_line_1 equ $-output_line int1Ch_handler endp end start
16.593023
46
0.608269
47f13a9058546b3c3c57c0883138f6cc4b52b879
672
asm
Assembly
oeis/005/A005605.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/005/A005605.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/005/A005605.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A005605: a(n) = a(n-1) + (-1)^(n-1) * a(n-2)^2 for n >= 2 with a(0) = 0 and a(1) = 1. ; Submitted by Jon Maiga ; 0,1,1,2,1,5,4,29,13,854,685,730001,260776,532901720777,464897598601,283984244007552571082330,67854466822576053925129,80647050844541158378200602801460469923692154029,76042822176765083934615573758195737396154487388,6503946809922006766819094043111959417441629341791327571534234531129122302370550354130015420229,721436005314891108663135717255571607066137390381149331420003464116879435428442564480964357685 mov $1,$0 add $1,1 mov $4,1 lpb $1 mov $0,$4 pow $0,2 sub $1,1 mov $4,$2 sub $4,1 mul $4,$3 add $0,$4 gcd $4,$3 mov $3,$0 lpe mov $0,$4
33.6
403
0.75744
5276bf884a3c75c62b4daa329738e19f67f98653
595
asm
Assembly
libsrc/_DEVELOPMENT/arch/zx/nirvanam/c/sdcc/NIRVANAM_fillC_callee.asm
grancier/z180
e83f35e36c9b4d1457e40585019430e901c86ed9
[ "ClArtistic" ]
null
null
null
libsrc/_DEVELOPMENT/arch/zx/nirvanam/c/sdcc/NIRVANAM_fillC_callee.asm
grancier/z180
e83f35e36c9b4d1457e40585019430e901c86ed9
[ "ClArtistic" ]
null
null
null
libsrc/_DEVELOPMENT/arch/zx/nirvanam/c/sdcc/NIRVANAM_fillC_callee.asm
grancier/z180
e83f35e36c9b4d1457e40585019430e901c86ed9
[ "ClArtistic" ]
1
2019-12-03T23:57:48.000Z
2019-12-03T23:57:48.000Z
; ---------------------------------------------------------------- ; Z88DK INTERFACE LIBRARY FOR THE NIRVANA ENGINE - by Einar Saukas ; ; See "nirvana-.h" for further details ; ---------------------------------------------------------------- ; void NIRVANAM_fillC(unsigned int attr, unsigned int lin, unsigned int col) ; callee SECTION code_clib SECTION code_nirvanam PUBLIC _NIRVANAM_fillC_callee EXTERN asm_NIRVANAM_fillC _NIRVANAM_fillC_callee: pop hl ; RET address pop bc ; attr pop de ; lin ld d,e ex (sp),hl ; col ld e,l jp asm_NIRVANAM_fillC
22.037037
76
0.54958
529f6fef41aba513a32734cbe7b10dd7770c2cc5
607
asm
Assembly
programs/oeis/081/A081352.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/081/A081352.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/081/A081352.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A081352: Main diagonal of square maze arrangement of natural numbers A081349. ; 1,7,11,21,29,43,55,73,89,111,131,157,181,211,239,273,305,343,379,421,461,507,551,601,649,703,755,813,869,931,991,1057,1121,1191,1259,1333,1405,1483,1559,1641,1721,1807,1891,1981,2069,2163,2255,2353,2449,2551,2651,2757,2861,2971,3079,3193,3305,3423,3539,3661,3781,3907,4031,4161,4289,4423,4555,4693,4829,4971,5111,5257,5401,5551,5699,5853,6005,6163,6319,6481,6641,6807,6971,7141,7309,7483,7655,7833,8009,8191,8371,8557,8741,8931,9119,9313,9505,9703,9899,10101 mov $1,$0 add $0,2 bin $0,2 mod $1,2 add $0,$1 mul $0,2 sub $0,1
55.181818
460
0.756178
1591b7d2836805a92f3ddc3413452b3984f2d683
6,853
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0_notsx.log_21829_724.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0_notsx.log_21829_724.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0_notsx.log_21829_724.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r12 push %r8 push %rax push %rbx push %rcx push %rdi push %rsi lea addresses_normal_ht+0x10c4a, %rbx nop nop nop xor %r8, %r8 mov (%rbx), %r10w nop nop nop nop and $3683, %rax lea addresses_WT_ht+0x14b1, %r12 clflush (%r12) nop nop nop cmp $41066, %r10 mov $0x6162636465666768, %r8 movq %r8, %xmm1 movups %xmm1, (%r12) nop nop nop nop nop sub $13687, %r12 lea addresses_A_ht+0xb6d4, %rsi lea addresses_WC_ht+0x3ec4, %rdi nop add %r8, %r8 mov $121, %rcx rep movsw nop nop nop nop xor %r12, %r12 lea addresses_WC_ht+0x6e44, %rdi inc %r8 vmovups (%rdi), %ymm1 vextracti128 $0, %ymm1, %xmm1 vpextrq $0, %xmm1, %r10 nop cmp %r10, %r10 lea addresses_WT_ht+0x6ac4, %rbx clflush (%rbx) nop nop nop nop nop dec %r12 mov (%rbx), %rcx nop nop nop nop nop xor %r8, %r8 lea addresses_D_ht+0x1e6c4, %r12 nop cmp $61090, %rsi mov $0x6162636465666768, %rbx movq %rbx, (%r12) dec %rax lea addresses_normal_ht+0x129ed, %rsi lea addresses_normal_ht+0x7ec4, %rdi nop inc %rbx mov $94, %rcx rep movsq nop nop nop cmp $27716, %rdi lea addresses_normal_ht+0xf6c4, %rdi nop nop nop nop and $1170, %rax mov $0x6162636465666768, %r10 movq %r10, %xmm7 movups %xmm7, (%rdi) nop nop nop lfence lea addresses_UC_ht+0x1d330, %rax clflush (%rax) nop cmp %r12, %r12 mov $0x6162636465666768, %rdi movq %rdi, %xmm6 vmovups %ymm6, (%rax) nop nop nop nop and $51159, %r12 lea addresses_D_ht+0x1cff4, %rdi nop nop xor $16422, %r12 mov $0x6162636465666768, %rax movq %rax, %xmm7 movups %xmm7, (%rdi) nop nop nop nop and %rcx, %rcx pop %rsi pop %rdi pop %rcx pop %rbx pop %rax pop %r8 pop %r12 pop %r10 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r13 push %r15 push %rdi push %rsi // Store lea addresses_RW+0x15c44, %rsi nop nop nop nop and $15168, %r11 movw $0x5152, (%rsi) nop nop nop nop inc %rsi // Faulty Load lea addresses_D+0xcac4, %r10 clflush (%r10) nop nop nop nop and %rsi, %rsi mov (%r10), %r11d lea oracles, %r13 and $0xff, %r11 shlq $12, %r11 mov (%r13,%r11,1), %r11 pop %rsi pop %rdi pop %r15 pop %r13 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_D', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'type': 'addresses_RW', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 6}} [Faulty Load] {'src': {'type': 'addresses_D', 'AVXalign': False, 'size': 4, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 2, 'NT': False, 'same': True, 'congruent': 1}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 0}} {'src': {'type': 'addresses_A_ht', 'congruent': 4, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WC_ht', 'congruent': 10, 'same': False}} {'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 7}, 'OP': 'LOAD'} {'src': {'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 11}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 10}} {'src': {'type': 'addresses_normal_ht', 'congruent': 0, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal_ht', 'congruent': 10, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 10}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 0}} {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 1}} {'36': 21829} 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 */
34.611111
2,999
0.660295
dbeca5b0752d2b7fc0ffbfa7cd8bd95948bf33ab
624
asm
Assembly
Library/SpecUI/CommonUI/CView/cviewPort.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
504
2018-11-18T03:35:53.000Z
2022-03-29T01:02:51.000Z
Library/SpecUI/CommonUI/CView/cviewPort.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
96
2018-11-19T21:06:50.000Z
2022-03-06T10:26:48.000Z
Library/SpecUI/CommonUI/CView/cviewPort.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
73
2018-11-19T20:46:53.000Z
2022-03-29T00:59:26.000Z
COMMENT @----------------------------------------------------------------------- Copyright (c) GeoWorks 1988 -- All Rights Reserved PROJECT: PC GEOS MODULE: OpenLook/View FILE: viewPort.asm ROUTINES: Name Description ---- ----------- GLB OLPortClass Open look port REVISION HISTORY: Name Date Description ---- ---- ----------- Tony 3/89 Initial version Chris 2/91 Put to sleep DESCRIPTION: $Id: cviewPort.asm,v 1.1 97/04/07 10:51:33 newdeal Exp $ -------------------------------------------------------------------------------@ This object went bye-bye. -cbh 2/ 5/91
23.111111
81
0.466346
f29510b65f48140ab7f929fad061baf31dfb86b4
6,676
asm
Assembly
c2000/C2000Ware_1_00_06_00/libraries/math/CLAmath/c28/source/CLAatan2.asm
ramok/Themis_ForHPSDR
d0f323a843ac0a488ef816ccb7c828032855a40a
[ "Unlicense" ]
null
null
null
c2000/C2000Ware_1_00_06_00/libraries/math/CLAmath/c28/source/CLAatan2.asm
ramok/Themis_ForHPSDR
d0f323a843ac0a488ef816ccb7c828032855a40a
[ "Unlicense" ]
null
null
null
c2000/C2000Ware_1_00_06_00/libraries/math/CLAmath/c28/source/CLAatan2.asm
ramok/Themis_ForHPSDR
d0f323a843ac0a488ef816ccb7c828032855a40a
[ "Unlicense" ]
1
2021-07-21T08:10:37.000Z
2021-07-21T08:10:37.000Z
;;############################################################################# ;; FILE: CLAatan2.asm ;; ;; DESCRIPTION: CLA arctan2 function ;; ;; Group: C2000 ;; Target Family: C28x+CLA ;; ;;############################################################################# ;; $TI Release: CLA Math Library 4.02.02.00 $ ;; $Release Date: Oct 18, 2018 $ ;; $Copyright: Copyright (C) 2018 Texas Instruments Incorporated - ;; http://www.ti.com/ ALL RIGHTS RESERVED $ ;;############################################################################# .cdecls C,LIST,"CLAmath.h" .include "CLAeabi.asm" ;;---------------------------------------------------------------------------- ;; Description: ;; The algorithm steps to calculate the "atan2" of the given ;; input X and Y is as follows: ;; ;; Step(1): if( abs(X) >= abs(Y) ) ;; Numerator = abs(Y) ;; Denominator = abs(X) ;; else ;; Numerator = abs(X) ;; Denominator = abs(Y) ;; ;; Step(2): Ratio = Numerator/Denominator ;; ;; Note: Ratio range = 0.0 to 1.0 ;; ;; Step(3): Use the upper 6-bits of the "Ratio" value as an ;; index into the table to obtain the coefficients ;; for a second order equation: ;; ;; _FPUatan2Table: ;; CoeffA0[0] ;; CoeffA1[0] ;; CoeffA2[0] ;; . ;; . ;; CoeffA0[63] ;; CoeffA1[63] ;; CoeffA2[63] ;; ;; Step(4): Calculate the angle using the folowing equation: ;; ;; arctan(Ratio) = A0 + A1*Ratio + A2*Ratio*Ratio ;; arctan(Ratio) = A0 + Ratio(A1 + A2*Ratio) ;; ;; Step(5): The final angle is determined as follows: ;; ;; if( X >= 0 and Y >= 0 and abs(X) >= abs(Y) ) ;; Angle = arctan(abs(Y)/abs(X)) ;; if( X >= 0 and Y >= 0 and abs(X) < abs(Y) ) ;; Angle = PI/2 - arctan(abs(X)/abs(Y)) ;; if( X < 0 and Y >= 0 and abs(X) < abs(Y) ) ;; Angle = PI/2 + arctan(abs(X)/abs(Y)) ;; if( X < 0 and Y >= 0 and abs(X) >= abs(Y) ) ;; Angle = PI - arctan(abs(Y)/abs(X)) ;; if( Y < 0 ) ;; Angle = -Angle ;; Equation: z = atan(y/x) ;; ;; Regs Used: MR0, MR1, MR2, MR3, MAR0,MAR1 ;; ;; Input: x , y two f32 values in memory ;; ;; Output: z f32 value in memory ;; MR0 = z f32 result ;; ;; Benchmark: Cycles = 44 ;; Instructions = 44 ;; ;; Scratchpad Usage: (Local Function Scratchpad Pointer (SP)) ;; ;; |_______|<- MR3 (SP+4) ;; |_______|<- atan2 temporary variable 2 (SP+2) ;; |_______|<- atan2 temporary variable 1 (SP+0) ;; ;;---------------------------------------------------------------------------- .def _CLAatan2 .sect "Cla1Prog:_CLAatan2" .align 2 .def __cla_CLAatan2_sp __cla_CLAatan2_sp .usect ".scratchpad:Cla1Prog:_CLAatan2",6,0,1 _CLAatan2: .asmfunc .asg __cla_CLAatan2_sp + 0, _atan2_tmp1 .asg __cla_CLAatan2_sp + 2, _atan2_tmp2 .asg __cla_CLAatan2_sp + 4, _save_MR3 ; Context Save MMOV32 @_save_MR3, MR3 ; MR0 = Y(fVal1) and MR1 = X(fVal2) is stored in the ; scratchpad memory MMOV32 @_atan2_tmp1,MR0 ;Y MMOV32 @_atan2_tmp2,MR1 ;X ; Perform Step (1): MABSF32 MR3,MR0 ; MR3 = abs(Y) MMOV32 MR2,MR3 ; Store abs(Y) in MR2 MABSF32 MR1,MR1 ; Store abs(X) in MR1 MMINF32 MR3,MR1 ; MR3 = numerator (A) = min(abs(Y),abs(X)) MMOV32 MR1,MR2,GT ; MR1 = denominator (B) = max(abs(Y),abs(X)) ; Ratio = A/B ; Perform Step (2): MEINVF32 MR2,MR1 ; MR2 = Ye = Estimate(1/Denominator) i.e 1/B MTESTTF LEQ ; Set TF if 1.0 >= abs(X) , this will be used in step 5 MMPYF32 MR0,MR2,MR1 ; MR0 = Ye*B MSUBF32 MR0,#2.0,MR0 ; MR0 = 2.0 - Ye*B MMPYF32 MR2,MR2,MR0 ; MR2 = Ye = Ye*(2.0 - Ye*B) (first estimate) MMPYF32 MR0,MR2,MR1 ; MR0 = Ye*B MSUBF32 MR0,#2.0,MR0 ; MR0 = 2.0 - Ye*B MMPYF32 MR2,MR2,MR0 ; MR2 = Ye = Ye*(2.0 - Ye*B) (second estimate) MMPYF32 MR0,MR2,MR3 ; MR0 = Ratio = A*Ye = A/B ; Perform Step (3): MMPYF32 MR2,MR0,#64.0 ; 64 = Elements In Table MF32TOUI16 MR2,MR2 ; MR2 = int(64*ratio) MADD32 MR2,MR2,MR2 ; MR2 = 2*MR2 MADD32 MR1,MR2,MR2 ; MR1 = 4*MR2 MADD32 MR2,MR2,MR1 ; MR2 = 6*MR2 this is the index value for the stored data array MMOV16 MAR0,MR2,#_CLAatan2Table+4 ; MAR0 points to A2, this will be used in step 4 MMOVI16 MAR1,#_CLAatan2HalfPITable+2 ; MAR1 points to pi/2, this will be used in step 5 MNOP MNOP ; Perform Step (4): ; arctan(Ratio) = A0 + Ratio(A1 + A2*Ratio) MMOV32 MR1,*MAR0[#-2]++ ; MR1 = A2 MMPYF32 MR1,MR1,MR0 ; MR1 = A2*Ratio || MMOV32 MR3,*MAR0[#-2]++ ; MR3 = A1 MADDF32 MR3,MR3,MR1 ; MR3 = A1 + A2*Ratio || MMOV32 MR1,*MAR0 ; MR1 = A0 MMPYF32 MR3,MR3,MR0 ; MR3 = Ratio*(A1 + A2*Ratio) MADDF32 MR3,MR1,MR3 ; MR3 = A0 + Ratio*(A1 + A2*Ratio) || MMOV32 MR2,@_atan2_tmp2 ; MR2 = X (set/clear NF,ZF for use below) ; Perform Step (5): MMOV32 MR1,*MAR1,UNC ; MR1 = pi/2 (no flag change) MNEGF32 MR0,MR1,UNC ; MR0 = -pi/2 (no flag change) MMOV32 MR3,MR2,EQ ; if (X == 0), MR3 = 0 MNEGF32 MR3,MR3,GEQ ; if (X >= 0) MR3 flip sign of atan(Ratio) MNEGF32 MR3,MR3,TF ; if (abs(X) >= abs(Y)) flip sign of atan(Ratio) MNEGF32 MR0,MR0,LT ; if (X < 0) MR0 = pi/2 MADDF32 MR0,MR0,MR1 ; MR0 = MR0+pi/2 ; if(X < 0) MR0 = pi ; if(X > 0) MR0 = 0 || MMOV32 MR2,@_atan2_tmp1 ; MR2 = Y (set/clear NF,ZF) MMOV32 MR0,MR1,NTF ; if(abs(X) < abs(Y) R3H = pi/2 MADDF32 MR3,MR3,MR0 ; MR3 = Angle ; Context Restore and Final Operations MRCNDD UNC MNEGF32 MR3,MR3,LT ; if (Y < 0) Angle = -Angle MMOV32 MR0,MR3 ; Store Y = atan2(X) MMOV32 MR3,@_save_MR3 .unasg _atan2_tmp1 .unasg _atan2_tmp2 .unasg _save_MR3 .endasmfunc ;; End of File
39.976048
97
0.466297
727588570cb5466179e670d56c7729830103f9bd
582
asm
Assembly
programs/oeis/115/A115067.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/115/A115067.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/115/A115067.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A115067: a(n) = (3*n^2 - n - 2)/2. ; 0,4,11,21,34,50,69,91,116,144,175,209,246,286,329,375,424,476,531,589,650,714,781,851,924,1000,1079,1161,1246,1334,1425,1519,1616,1716,1819,1925,2034,2146,2261,2379,2500,2624,2751,2881,3014,3150,3289,3431,3576,3724,3875,4029,4186,4346,4509,4675,4844,5016,5191,5369,5550,5734,5921,6111,6304,6500,6699,6901,7106,7314,7525,7739,7956,8176,8399,8625,8854,9086,9321,9559,9800,10044,10291,10541,10794,11050,11309,11571,11836,12104,12375,12649,12926,13206,13489,13775,14064,14356,14651,14949 mov $1,6 mul $1,$0 add $1,10 mul $1,$0 div $1,4 mov $0,$1
58.2
485
0.738832
72869cd8d0a9a7b30396b7e1d8e334353f635910
5,276
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_519_889.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_519_889.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_519_889.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r12 push %r15 push %rbp push %rcx push %rdi push %rsi lea addresses_A_ht+0xd37d, %rsi lea addresses_D_ht+0xc3fd, %rdi clflush (%rsi) nop nop nop nop nop add $22990, %r10 mov $15, %rcx rep movsw nop nop nop and %rbp, %rbp lea addresses_A_ht+0x1eb7d, %rbp add %r12, %r12 mov (%rbp), %rcx nop nop nop nop nop cmp %r12, %r12 lea addresses_A_ht+0x675d, %r12 nop xor $14367, %r15 mov $0x6162636465666768, %rdi movq %rdi, %xmm2 and $0xffffffffffffffc0, %r12 vmovaps %ymm2, (%r12) nop nop nop sub $18385, %r15 lea addresses_D_ht+0xae7d, %r15 clflush (%r15) nop add $49082, %rsi movups (%r15), %xmm1 vpextrq $1, %xmm1, %rbp nop nop nop xor %r15, %r15 lea addresses_UC_ht+0x3e7d, %r12 nop nop nop sub %rsi, %rsi mov (%r12), %cx nop nop nop and $14410, %rdi lea addresses_D_ht+0xf37d, %rdi nop sub %r12, %r12 movb (%rdi), %cl nop nop nop nop cmp $19149, %r12 lea addresses_WT_ht+0x2b7d, %r15 clflush (%r15) nop cmp %r10, %r10 vmovups (%r15), %ymm7 vextracti128 $1, %ymm7, %xmm7 vpextrq $0, %xmm7, %rdi add %rsi, %rsi lea addresses_D_ht+0x11f7d, %rsi nop nop nop nop nop cmp $15387, %r12 mov (%rsi), %r15d nop nop cmp $5580, %rdi lea addresses_UC_ht+0x1b043, %rcx and $47148, %r10 mov $0x6162636465666768, %rsi movq %rsi, %xmm1 movups %xmm1, (%rcx) cmp %rsi, %rsi lea addresses_D_ht+0xeffd, %rsi sub $23149, %rdi vmovups (%rsi), %ymm5 vextracti128 $0, %ymm5, %xmm5 vpextrq $1, %xmm5, %r12 nop nop nop nop and $7656, %rcx pop %rsi pop %rdi pop %rcx pop %rbp pop %r15 pop %r12 pop %r10 ret .global s_faulty_load s_faulty_load: push %r11 push %r12 push %r15 push %r8 push %rax push %rdi push %rdx // Store lea addresses_WT+0x98fd, %rdx nop and %rax, %rax mov $0x5152535455565758, %rdi movq %rdi, %xmm4 vmovaps %ymm4, (%rdx) xor %r15, %r15 // Faulty Load lea addresses_PSE+0x2b7d, %r15 sub %r8, %r8 mov (%r15), %r12 lea oracles, %r8 and $0xff, %r12 shlq $12, %r12 mov (%r8,%r12,1), %r12 pop %rdx pop %rdi 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': 4, 'type': 'addresses_PSE', 'congruent': 0}} {'dst': {'same': False, 'NT': False, 'AVXalign': True, 'size': 32, 'type': 'addresses_WT', 'congruent': 7}, 'OP': 'STOR'} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_PSE', 'congruent': 0}} <gen_prepare_buffer> {'dst': {'same': False, 'congruent': 6, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 11, 'type': 'addresses_A_ht'}} {'OP': 'LOAD', 'src': {'same': False, 'NT': True, 'AVXalign': False, 'size': 8, 'type': 'addresses_A_ht', 'congruent': 11}} {'dst': {'same': False, 'NT': True, 'AVXalign': True, 'size': 32, 'type': 'addresses_A_ht', 'congruent': 5}, 'OP': 'STOR'} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_D_ht', 'congruent': 5}} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_UC_ht', 'congruent': 6}} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_D_ht', 'congruent': 11}} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_WT_ht', 'congruent': 10}} {'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': True, 'size': 4, 'type': 'addresses_D_ht', 'congruent': 7}} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_UC_ht', 'congruent': 1}, 'OP': 'STOR'} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_D_ht', 'congruent': 7}} {'33': 519} 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 */
30.148571
1,556
0.650872
653cef3c57daeeb8ad18a9a54405286cb48617ba
4,654
asm
Assembly
Transynther/x86/_processed/P/_un_/i9-9900K_12_0xca.log_1_136.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/P/_un_/i9-9900K_12_0xca.log_1_136.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/P/_un_/i9-9900K_12_0xca.log_1_136.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r11 push %r13 push %r14 push %r9 push %rbp push %rcx push %rdi push %rsi lea addresses_D_ht+0x8b59, %rsi lea addresses_UC_ht+0x25bc, %rdi xor %r14, %r14 mov $102, %rcx rep movsb nop xor %rdi, %rdi lea addresses_A_ht+0xd3d9, %rsi lea addresses_normal_ht+0x14fd9, %rdi nop nop nop inc %r11 mov $21, %rcx rep movsw nop nop nop nop nop inc %rcx lea addresses_WC_ht+0x1add9, %rsi lea addresses_WT_ht+0x1e999, %rdi nop dec %r9 mov $65, %rcx rep movsl nop lfence lea addresses_WT_ht+0x6bd9, %rcx nop nop nop nop cmp $39648, %rsi vmovups (%rcx), %ymm4 vextracti128 $0, %ymm4, %xmm4 vpextrq $1, %xmm4, %r14 nop nop nop nop dec %rcx lea addresses_WT_ht+0x97c7, %rsi lea addresses_normal_ht+0x6849, %rdi nop nop nop nop nop and %r13, %r13 mov $56, %rcx rep movsl nop nop cmp %rcx, %rcx lea addresses_normal_ht+0x10e79, %rcx nop nop sub $51176, %r14 movl $0x61626364, (%rcx) nop nop nop nop nop sub %r11, %r11 lea addresses_A_ht+0xbe2f, %rsi lea addresses_UC_ht+0x1ab65, %rdi nop nop nop nop nop and %rbp, %rbp mov $113, %rcx rep movsw nop nop and %rcx, %rcx lea addresses_D_ht+0x10199, %rsi nop nop nop nop add %r11, %r11 movb (%rsi), %cl nop nop nop nop sub %rdi, %rdi lea addresses_WT_ht+0xe7d9, %rsi nop nop nop dec %r14 mov (%rsi), %di nop nop nop nop nop cmp $44614, %r11 lea addresses_WC_ht+0xa4b1, %rbp clflush (%rbp) nop and $31796, %r14 mov $0x6162636465666768, %r13 movq %r13, (%rbp) nop nop cmp %rcx, %rcx pop %rsi pop %rdi pop %rcx pop %rbp pop %r9 pop %r14 pop %r13 pop %r11 ret .global s_faulty_load s_faulty_load: push %r11 push %r13 push %rbp push %rcx push %rdi push %rdx push %rsi // REPMOV lea addresses_RW+0x15dd9, %rsi lea addresses_WT+0x36f9, %rdi nop nop nop nop add $55848, %r13 mov $32, %rcx rep movsl nop xor %r13, %r13 // Store lea addresses_PSE+0x95eb, %rdx nop nop nop nop sub %r11, %r11 movw $0x5152, (%rdx) nop nop nop nop cmp $21649, %rdx // Load lea addresses_A+0x1f359, %rsi xor %rcx, %rcx vmovups (%rsi), %ymm2 vextracti128 $0, %ymm2, %xmm2 vpextrq $0, %xmm2, %r13 nop nop nop nop nop and %rdx, %rdx // REPMOV lea addresses_A+0xa0e5, %rsi mov $0x3d9, %rdi nop nop nop xor %r13, %r13 mov $75, %rcx rep movsq nop nop inc %rsi // Faulty Load mov $0x3d9, %rdi nop nop nop and $47778, %r13 mov (%rdi), %rcx lea oracles, %r11 and $0xff, %rcx shlq $12, %rcx mov (%r11,%rcx,1), %rcx pop %rsi pop %rdx pop %rdi pop %rcx pop %rbp pop %r13 pop %r11 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'size': 2, 'NT': True, 'type': 'addresses_P', 'same': False, 'AVXalign': False, 'congruent': 0}} {'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_RW', 'congruent': 8}, 'dst': {'same': False, 'type': 'addresses_WT', 'congruent': 5}} {'OP': 'STOR', 'dst': {'size': 2, 'NT': False, 'type': 'addresses_PSE', 'same': False, 'AVXalign': False, 'congruent': 1}} {'OP': 'LOAD', 'src': {'size': 32, 'NT': False, 'type': 'addresses_A', 'same': False, 'AVXalign': False, 'congruent': 7}} {'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_A', 'congruent': 1}, 'dst': {'same': True, 'type': 'addresses_P', 'congruent': 0}} [Faulty Load] {'OP': 'LOAD', 'src': {'size': 8, 'NT': False, 'type': 'addresses_P', 'same': True, 'AVXalign': False, 'congruent': 0}} <gen_prepare_buffer> {'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_D_ht', 'congruent': 6}, 'dst': {'same': False, 'type': 'addresses_UC_ht', 'congruent': 0}} {'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_A_ht', 'congruent': 9}, 'dst': {'same': False, 'type': 'addresses_normal_ht', 'congruent': 10}} {'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_WC_ht', 'congruent': 9}, 'dst': {'same': True, 'type': 'addresses_WT_ht', 'congruent': 6}} {'OP': 'LOAD', 'src': {'size': 32, 'NT': False, 'type': 'addresses_WT_ht', 'same': False, 'AVXalign': False, 'congruent': 10}} {'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_WT_ht', 'congruent': 0}, 'dst': {'same': False, 'type': 'addresses_normal_ht', 'congruent': 4}} {'OP': 'STOR', 'dst': {'size': 4, 'NT': False, 'type': 'addresses_normal_ht', 'same': False, 'AVXalign': False, 'congruent': 5}} {'OP': 'REPM', 'src': {'same': True, 'type': 'addresses_A_ht', 'congruent': 1}, 'dst': {'same': False, 'type': 'addresses_UC_ht', 'congruent': 2}} {'OP': 'LOAD', 'src': {'size': 1, 'NT': False, 'type': 'addresses_D_ht', 'same': False, 'AVXalign': False, 'congruent': 6}} {'OP': 'LOAD', 'src': {'size': 2, 'NT': False, 'type': 'addresses_WT_ht', 'same': False, 'AVXalign': False, 'congruent': 10}} {'OP': 'STOR', 'dst': {'size': 8, 'NT': False, 'type': 'addresses_WC_ht', 'same': False, 'AVXalign': False, 'congruent': 2}} {'de': 1} de */
19.311203
152
0.650193
65fcde20dbf70be4b21395f98d2792a91e94e1de
32,421
asm
Assembly
Library/Spreadsheet/Spreadsheet/spreadsheetDrawUtils.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
504
2018-11-18T03:35:53.000Z
2022-03-29T01:02:51.000Z
Library/Spreadsheet/Spreadsheet/spreadsheetDrawUtils.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
96
2018-11-19T21:06:50.000Z
2022-03-06T10:26:48.000Z
Library/Spreadsheet/Spreadsheet/spreadsheetDrawUtils.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
73
2018-11-19T20:46:53.000Z
2022-03-29T00:59:26.000Z
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright (c) GeoWorks 1991 -- All Rights Reserved PROJECT: PC GEOS MODULE: GeoCalc FILE: spreadsheetDrawUtils.asm AUTHOR: Gene Anderson, Jun 6, 1991 ROUTINES: Name Description ---- ----------- EXT TranslateToVisible Translate GState for on-screen drawing EXT CreateGState Create and initialize GState for drawing EXT DestroyGState Destroy GState EXT InitGStateForDrawing Initialize GState for drawing EXT InvertActiveVisibleCell Invert active cell EXT InvertSelectedVisibleCell Invert selected cell EXT InvertSelectedVisibleRange Invert selected range EXT InvertSelectedRect Invert rectangle EXT WhiteoutVisibleCell Erase cell for redrawing EXT GetCellVisPos16 Get visual position of cell EXT GetCellVisBounds16 Get visual bounds of cell EXT GetRangeVisBounds16 Get visual bounds of range EXT GetCellRelBounds32 Get 32-bit bounds of cell EXT GetRangeRelBounds32 Get 32-bit bounds of range EXT CellSelected? Cell part of selection? EXT SingleCell? Single cell selected? EXT CellVisible? Cell visible? EXT RestrictToVisible Restrict range to visible region EXT SetCellGStateAttrs Setup GState attributes for a cell EXT InitGStateForDrawing Initialize GState for drawing operations REVISION HISTORY: Name Date Description ---- ---- ----------- Gene 6/ 6/91 Initial revision DESCRIPTION: Utility routines for drawing cells. $Id: spreadsheetDrawUtils.asm,v 1.1 97/04/07 11:13:22 newdeal Exp $ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ DrawCode segment resource COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% InitGStateForDrawing %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Initialize GState for drawing CALLED BY: CreateGState PASS: di - handle of GState RETURN: none DESTROYED: none PSEUDO CODE/STRATEGY: NOTE: the area color is initialized to black, because most area drawing in the spreadsheet is for inverting the selection. KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- eca 5/24/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ InitGStateForDrawing proc far uses ax .enter mov al, CMT_DITHER ;al <- ColorMapMode call GrSetLineColorMap ;set the color map mode to call GrSetAreaColorMap ; dither -- it gives reasonable call GrSetTextColorMap ; results for printing to B&W mov al, MM_COPY ;al <- MixMode (COPY) call GrSetMixMode mov ax, (C_BLACK or CF_INDEX shl 8) call GrSetAreaColor ; ; Set to draw text from the baseline ; mov ax, mask TM_DRAW_BASE ;al <- draw from baseline call GrSetTextMode ; ; Set the line end to something nice for cell borders. ; mov al, LE_SQUARECAP call GrSetLineEnd .leave ret InitGStateForDrawing endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TranslateToVisible %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Translate GState to visible range for drawing CALLED BY: SpreadsheetDraw(), CreateGState(), SpreadsheetInvertRangeLast PASS: ds:si - ptr to Spreadsheet instance di - handle of GState RETURN: none DESTROYED: none PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- eca 5/20/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TranslateToVisible proc near uses ax, bx, cx, dx class SpreadsheetClass EC < call ECCheckInstancePtr ;> ; ; Make sure this our GState, and see if the transformation ; is already valid. ; NOTE: be sure not to mark the transform valid if this is ; not our cached GState. ; cmp di, ds:[si].SSI_gstate ;our GState? jne doTransform ;branch if not ours test ds:[si].SSI_gsRefCount, mask SSRCAF_TRANSFORM_VALID jnz done ;branch if valid ; ; Mark the translation in the GState as valid ; ornf ds:[si].SSI_gsRefCount, mask SSRCAF_TRANSFORM_VALID doTransform: .enter ; ; Reset the translation to the default ; call GrSetDefaultTransform ; ; Add the translation to the visible range ; mov dx, ds:[si].SSI_offset.PD_x.high mov cx, ds:[si].SSI_offset.PD_x.low ;dx:cx <- x translation mov bx, ds:[si].SSI_offset.PD_y.high mov ax, ds:[si].SSI_offset.PD_y.low ;bx:ax <- y translation call GrApplyTranslationDWord .leave done: ret TranslateToVisible endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% CreateGState %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Create a GState to draw to the spreadsheet on screen CALLED BY: MoveActiveCell() PASS: ds:si - instance data of Spreadsheet RETURN: di - handle of GState ds:si - updated if necessary DESTROYED: none PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- eca 2/20/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ CreateGStateFar proc far call CreateGState ret CreateGStateFar endp CreateGState proc near class SpreadsheetClass EC < call ECCheckInstancePtr ; > mov di, ds:[si].SSI_gstate ;di <- handle of GState tst di ;any GState? jz createGState ;branch if no GState yet afterCreate: EC < push ax ;> EC < mov al, ds:[si].SSI_gsRefCount ;> EC < andnf al, mask SSRCAF_REF_COUNT ;> EC < cmp al, MAX_GSTATE_REF_COUNT ;> EC < ERROR_AE BAD_GS_REF_COUNT ;> EC < pop ax ;> inc ds:[si].SSI_gsRefCount ;one more reference ; ; Translate to the visible drawing area ; GOTO TranslateToVisible createGState: ; ; If we're in engine mode, don't connect the GState to the window ; test ds:[si].SSI_attributes, mask SA_ENGINE_MODE jnz engineMode ;branch if in engine mode ; ; Get a GState attached to our window ; mov si, ds:[si].SSI_chunk ;*ds:si <- our object push ax, bp mov ax, MSG_VIS_VUP_CREATE_GSTATE call ObjCallInstanceNoLock mov di, bp ;di <- handle of GState pop ax, bp jc initGState ;branch if successfully created ; ; We couldn't get a GState for our Window, so just create one ; doCreate: clr di ;di <- no Window call GrCreateState ; ; Initialize the GState for drawing ; initGState: mov si, ds:[si] add si, ds:[si].Spreadsheet_offset ;ds:si <- ptr to instance data call InitGStateForDrawing ;initialize drawing modes mov ds:[si].SSI_gstate, di ;save new GState mov ds:[si].SSI_curAttrs, INVALID_STYLE_TOKEN jmp afterCreate engineMode: mov si, ds:[si].SSI_chunk ;*ds:si <- our object jmp doCreate CreateGState endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DestroyGState %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Destroy GState used to draw spreadsheet CALLED BY: MoveActiveCell() PASS: ds:si - ptr to Spreadsheet instance RETURN: none DESTROYED: di PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- eca 2/20/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ DestroyGStateFar proc far call DestroyGState ret DestroyGStateFar endp DestroyGState proc near uses ax class SpreadsheetClass .enter EC < call ECCheckInstancePtr ;> mov al, ds:[si].SSI_gsRefCount andnf al, mask SSRCAF_REF_COUNT EC < tst al ;> EC < ERROR_Z BAD_GS_REF_COUNT ;> dec ds:[si].SSI_gsRefCount ;one less reference dec al jnz done ;branch if still references ; ; There are no more references, so nuke away ; clr di xchg di, ds:[si].SSI_gstate ;di <- handle of GState clr ds:[si].SSI_gsRefCount call GrDestroyState done: .leave ret DestroyGState endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% InvertActiveVisibleCell %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Select or deselect the active cell on screen CALLED BY: CellDraw() PASS: (ax,cx) - cell to invert (r,c) di - handle of GState ds:si - ptr to Spreadsheet instance data RETURN: none DESTROYED: (GState attrs changed) PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: Since this does an invert, this routine can be used for selecting or deselecting the active cell. NOTE: this routine should only be called for screen drawing REVISION HISTORY: Name Date Description ---- ---- ----------- eca 2/20/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ InvertActiveVisibleCellFar proc far call InvertActiveVisibleCell ret InvertActiveVisibleCellFar endp InvertActiveVisibleCell proc near class SpreadsheetClass uses ax, bx, cx, dx EC < call ECCheckInstancePtr ;> call CellVisible? ;on screen? jnc quit ;branch if not on screen .enter call GetCellVisBounds16 ;(ax,bx,cx,dx) <- bounds cmp ax, cx ;column hidden? je skipDraw ;branch if column hidden cmp bx, dx ;row hidden? je skipDraw ;branch if row hidden push ax mov al, MM_INVERT ;al <- MixMode (INVERT) call GrSetMixMode pop ax call GrFillRect inc ax ;2*size(inc REG)=2 bytes inc ax ;size(sub REG, #)=3 bytes inc bx inc bx dec cx dec cx dec dx dec dx test ds:[si].SSI_drawFlags, mask SDF_DRAW_GRID jz noGrid inc ax ;bump beyond grid inc bx noGrid: call GrFillRect mov al, MM_COPY ;al <- MixMode (COPY) call GrSetMixMode skipDraw: .leave quit: ret InvertActiveVisibleCell endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% InvertSelectedVisibleCell %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Invert a selected cell on screen CALLED BY: CellDraw(), SpreadsheetInvertRangeLast PASS: (ax, cx) - cell to invert (r,c) di - handle of GState ds:si - ptr to Spreadsheet instance data RETURN: none DESTROYED: bx, dx (GState attrs changed) PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: NOTE: this routine should only be called for screen drawing REVISION HISTORY: Name Date Description ---- ---- ----------- eca 2/20/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ InvertSelectedVisibleCellFar proc far call InvertSelectedVisibleCell ret InvertSelectedVisibleCellFar endp InvertSelectedVisibleCell proc near uses ax, cx EC < call ECCheckInstancePtr ;> call CellVisible? ;on screen? jnc done ;branch if not on screen .enter call GetCellVisBounds16 ;(ax,bx,cx,dx) <- bounds call InvertSelectedRect .leave done: ret InvertSelectedVisibleCell endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% InvertSelectedVisibleRange %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Invert a selected range CALLED BY: ExtendSelectionRow() PASS: (ax,cx) (bp,dx) - range to invert (r,c),(r,c) di - handle of GState ds:si - ptr to Spreadsheet instance data RETURN: none DESTROYED: ax, bx, cx, dx PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: NOTE: this routine should only be called for screen drawing REVISION HISTORY: Name Date Description ---- ---- ----------- eca 3/25/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ InvertSelectedVisibleRangeFar proc far call InvertSelectedVisibleRange ret InvertSelectedVisibleRangeFar endp InvertSelectedVisibleRange proc near uses bp .enter EC < call ECCheckInstancePtr ;> call RestrictToVisible jnc done ;branch if off scren call GetRangeVisBounds16 call InvertSelectedRect done: .leave ret InvertSelectedVisibleRange endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% InvertSelectedRect %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Invert a selected rectangle CALLED BY: InvertSelectedRange(), InvertSelectedCell() PASS: (ax,bx,cx,dx) - visual bounds of rectangle di - handle of GState RETURN: none DESTROYED: ax, bx, cx, dx PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- eca 3/25/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ InvertSelectedRect proc near .enter push ax mov al, MM_INVERT ;al <- MixMode (INVERT) call GrSetMixMode pop ax call GrFillRect ; ; Reset the draw mode for any subsequent drawing ; mov al, MM_COPY ;al <- MixMode (COPY) call GrSetMixMode .leave ret InvertSelectedRect endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GetCellVisBounds16 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Get the visual bounds of a cell (Window relative) CALLED BY: CellDraw(), MoveActiveCell() PASS: (ax,cx) - cell (r,c) ds:si - ptr to Spreadsheet instance data RETURN: (ax,bx,cx,dx) - bounds of cell DESTROYED: none PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- eca 2/20/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ GetCellVisBounds16 proc near class SpreadsheetClass .enter EC < call ECCheckInstancePtr ;> mov dx, ds:[si].SSI_visible.CR_start.CR_column call ColumnGetRelPos16 ;dx <- column offset push dx ;save column position push bx ;save column width mov dx, ds:[si].SSI_visible.CR_start.CR_row call RowGetRelPos16 ;dx <- row offset xchg bx, dx ;bx <- top of cell add dx, bx ;dx <- bottom of cell pop cx ;cx <- column width pop ax ;ax <- column position add cx, ax ;cx <- right of cell .leave ret GetCellVisBounds16 endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GetRangeVisBounds16 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Get the visual bounds of a range (Window relative) CALLED BY: InvertSelectedRange() PASS: ds:si - ptr to Spreadsheet instance (ax,cx) (bp,dx) - range to get bounds of RETURN: (ax,bx,cx,dx) - rectangle of bounds DESTROYED: none PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: Uses the somewhat dubious seeming algorithm for getting the bounds of (a,b,c,d) of (pos(a,b),pos(c+1,d+1)). However, because of the way the get position routines work, this isn't a problem. It just forces the routine to do the last add. REVISION HISTORY: Name Date Description ---- ---- ----------- eca 3/25/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ GetRangeVisBounds16 proc far uses di class SpreadsheetClass .enter EC < call ECCheckInstancePtr ;> EC < call ECCheckOrderedCoords ;> mov di, dx ;di <- column #2 mov dx, ds:[si].SSI_visible.CR_start.CR_column call ColumnGetRelPos16 ;dx <- column #1 position push dx mov dx, ds:[si].SSI_visible.CR_start.CR_row call RowGetRelPos16 ;dx <- row #1 position push dx mov ax, bp ;ax <- row #2 inc ax mov cx, di ;cx <- column #2 inc cx mov dx, ds:[si].SSI_visible.CR_start.CR_column call ColumnGetRelPos16 mov cx, dx ;cx <- column #2 +1 position mov dx, ds:[si].SSI_visible.CR_start.CR_row call RowGetRelPos16 ;dx <- row #2 +1 position pop bx ;bx <- row #1 position pop ax ;ax <- column #1 position .leave ret GetRangeVisBounds16 endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GetWinBounds32 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Get 32-bit bounds of visible window CALLED BY: RecalcVisibleRangeGState() PASS: ds:si - ptr to Spreadsheet instance ss:bp - inherited CellLocals di - handle of GState RETURN: ss:bp - CellLocals CL_docBounds - 32-bit window bounds (RectDWord) cx - width of Window dx - height of Window DESTROYED: none PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: This is a little complicated, so I'll explain. This routine was initially passed a GState or a Window. When we went to GrGetWinBoundsDWord instead of WinGetExtWinBounds, it had to be a gstate. The problem is, we don't want the gstate that has the translation to the visible portion applied, because that will screw up getting the extended bounds (we'll always get bounds relative to the translated origin). SO, we basically want to discard the gstate that was passed, but use the window that is attached to the gstate. This means we make a call to get the window handle and allocate a new gstate for it. It may be that this routine can be re-written to make all that more efficient, but I'll let gene handle that :) REVISION HISTORY: Name Date Description ---- ---- ----------- eca 7/18/91 Initial version jim 8/5/91 fixed for GrGetWinBoundsDWord %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ GetWinBounds32 proc far uses ds, si, ax, di locals local CellLocals .enter inherit EC < call ECCheckInstancePtr ;> call GrGetWinHandle ; ax = window handle mov di, ax ; di = window handle call GrCreateState ; di = gstate handle lea si, ss:locals.CL_docBounds segmov ds, ss ;ds:si <- ptr to RectDWord call GrGetWinBoundsDWord mov cx, ss:locals.CL_docBounds.RD_right.low mov ax, ss:locals.CL_docBounds.RD_right.high sub cx, ss:locals.CL_docBounds.RD_left.low sbb ax, ss:locals.CL_docBounds.RD_left.high mov dx, ss:locals.CL_docBounds.RD_bottom.low mov ax, ss:locals.CL_docBounds.RD_bottom.high sub dx, ss:locals.CL_docBounds.RD_top.low sbb ax, ss:locals.CL_docBounds.RD_top.high inc cx ;bounds are 0 to width-1 inc dx ;bounds are 0 to height-1 call GrDestroyState ; kill allocated gstate .leave ret GetWinBounds32 endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GetCellRelBounds32 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Get 32-bit bounds of a cell relative to specified origin CALLED BY: CellDraw(), MoveActiveCell() PASS: (ax,cx) - cell (r,c) ds:si - ptr to Spreadsheet instance data ss:bp - inherited CellLocals: CL_origin - origin cell RETURN: ss:bp - CellLocals: CL_docBounds - 32-bit cell bounds (RectDWord) DESTROYED: none PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- eca 2/20/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ GetCellRelBounds32 proc near uses ax, bx, cx, dx class SpreadsheetClass locals local CellLocals .enter inherit EC < call ECCheckInstancePtr ;> mov dx, ss:locals.CL_origin.CR_row call RowGetRelPos32 ;ax:dx <- position of row mov ss:locals.CL_docBounds.RD_top.low, dx mov ss:locals.CL_docBounds.RD_top.high, ax add dx, bx adc ax, 0 mov ss:locals.CL_docBounds.RD_bottom.low, dx mov ss:locals.CL_docBounds.RD_bottom.high, ax mov dx, ss:locals.CL_origin.CR_column call ColumnGetRelPos32 mov ss:locals.CL_docBounds.RD_left.low, dx mov ss:locals.CL_docBounds.RD_left.high, ax add dx, bx adc ax, 0 mov ss:locals.CL_docBounds.RD_right.low, dx mov ss:locals.CL_docBounds.RD_right.high, ax .leave ret GetCellRelBounds32 endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GetRangeRelBounds32 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Get bounds of range relative to specified origin CALLED BY: RangeDrawGrid() PASS: ds:si - ptr to Spreadsheet instance (ax,cx), (bx,dx) - bounds of range (r,c),(r,c) ss:bp - inherited CellLocals: CL_origin - origin cell RETURN: ss:bp - CellLocals: CL_docBounds - 32-bit bounds (RectDWord) DESTROYED: none PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- eca 6/ 6/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ GetRangeRelBounds32Far proc far call GetRangeRelBounds32 ret GetRangeRelBounds32Far endp GetRangeRelBounds32 proc near uses ax, bx, cx, dx locals local CellLocals .enter inherit EC < call ECCheckInstancePtr ;> push bx ;save bottom row push ax ;save top row push dx ;save right column mov dx, ss:locals.CL_origin.CR_column call ColumnGetRelPos32 ;ax:dx <- position of column mov ss:locals.CL_docBounds.RD_left.low, dx mov ss:locals.CL_docBounds.RD_left.high, ax pop cx ;cx <- right column inc cx ;cx <- right column + 1 mov dx, ss:locals.CL_origin.CR_column call ColumnGetRelPos32 ;ax:dx <- position of column mov ss:locals.CL_docBounds.RD_right.low, dx mov ss:locals.CL_docBounds.RD_right.high, ax pop ax ;ax <- top row mov dx, ss:locals.CL_origin.CR_row call RowGetRelPos32 ;ax:dx <- position of row mov ss:locals.CL_docBounds.RD_top.low, dx mov ss:locals.CL_docBounds.RD_top.high, ax pop ax ;ax <- bottom row inc ax ;ax <- bottom row + 1 mov dx, ss:locals.CL_origin.CR_row call RowGetRelPos32 ;ax:dx <- position of row mov ss:locals.CL_docBounds.RD_bottom.low, dx mov ss:locals.CL_docBounds.RD_bottom.high, ax .leave ret GetRangeRelBounds32 endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% CellSelected? %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: See if specified cell is selected CALLED BY: CellDraw(), MoveActiveCell() PASS: ds:si - ptr to instance data (ax,cx) - cell to check RETURN: carry - set if selected DESTROYED: none PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- eca 2/20/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ CellSelected? proc near class SpreadsheetClass EC < call ECCheckInstancePtr ;> cmp ax, ds:[si].SSI_selected.CR_start.CR_row jb notSelected cmp ax, ds:[si].SSI_selected.CR_end.CR_row ja notSelected cmp cx, ds:[si].SSI_selected.CR_start.CR_column jb notSelected cmp cx, ds:[si].SSI_selected.CR_end.CR_column ja notSelected stc ;<- indicate selected ret notSelected: clc ;<- indicate not selected ret CellSelected? endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SingleCell? %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: See if the selection is just a single cell (amoeba) CALLED BY: MoveActiveCell(), NotifyStyleChange() PASS: ds:si - ptr to instance data RETURN: carry - set if single cell DESTROYED: none PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- eca 3/ 5/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ SingleCell? proc far class SpreadsheetClass EC < call ECCheckInstancePtr ;> push ax mov ax, ds:[si].SSI_selected.CR_start.CR_row cmp ax, ds:[si].SSI_selected.CR_end.CR_row jne multiCell mov ax, ds:[si].SSI_selected.CR_start.CR_column cmp ax, ds:[si].SSI_selected.CR_end.CR_column jne multiCell stc ;indicate single cell done: pop ax ret multiCell: clc ;indicate multiple cells jmp done SingleCell? endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% CellVisible? %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: See if specified cell is visible CALLED BY: CellDraw(), MoveActiveCell() PASS: ds:si - ptr to instance data (ax,cx) - cell to check RETURN: carry - set if visible DESTROYED: none PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- eca 2/20/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ CellVisible? proc near class SpreadsheetClass EC < call ECCheckInstancePtr ;> cmp ax, ds:[si].SSI_visible.CR_start.CR_row jb notVisible cmp ax, ds:[si].SSI_visible.CR_end.CR_row ja notVisible cmp cx, ds:[si].SSI_visible.CR_start.CR_column jb notVisible cmp cx, ds:[si].SSI_visible.CR_end.CR_column ja notVisible stc ;<- indicate visible ret notVisible: clc ;<- indicate not visible ret CellVisible? endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% RestrictToVisible %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Restrict range to visible range CALLED BY: InvertSelectedRange() PASS: (ax,cx) (bp,dx) - range (r,c),(r,c) RETURN: carry - set if any part of range on screen (ax,cx) (bp,dx) - (new) range (r,c),(r,c) DESTROYED: none PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- eca 6/ 5/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ RestrictToVisible proc near class SpreadsheetClass EC < call ECCheckInstancePtr ;> cmp ax, ds:[si].SSI_visible.CR_end.CR_row ja notVisible ;below bottom cmp bp, ds:[si].SSI_visible.CR_start.CR_row jb notVisible ;above top cmp cx, ds:[si].SSI_visible.CR_end.CR_column ja notVisible ;off right side cmp dx, ds:[si].SSI_visible.CR_start.CR_column jb notVisible ;off left side push bx mov bx, ds:[si].SSI_visible.CR_start.CR_row cmp ax, bx ;top on screen? jae topOK mov ax, bx ;ax <- top visible row topOK: mov bx, ds:[si].SSI_visible.CR_start.CR_column cmp cx, bx ;left on screen? jae leftOK mov cx, bx ;cx <- left visible column leftOK: mov bx, ds:[si].SSI_visible.CR_end.CR_row cmp bp, bx ;bottom on screen? jbe bottomOK mov bp, bx ;bp <- bottom visible row bottomOK: mov bx, ds:[si].SSI_visible.CR_end.CR_column cmp dx, bx ;right on screen? jbe rightOK mov dx, bx ;dx <- right visible column rightOK: pop bx stc ;carry <- some visible portion ret notVisible: clc ;carry <- no part visible ret RestrictToVisible endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OrderRangeArgs %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Make sure range arguments are ordered CALLED BY: UTILITY PASS: (ax,cx), (dx,bx) - range args to order RETURN: (ax,cx), (dx,bx) - ordered range args DESTROYED: none PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- eca 10/16/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ OrderRangeArgs proc near .enter cmp ax, dx ;rows OK? jbe rowsOK xchg ax, dx rowsOK: cmp cx, bx ;columns OK? jbe colsOK xchg cx, bx colsOK: .leave ret OrderRangeArgs endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SetCellGStateAttrs %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Set attributes in GState for cell attributes. CALLED BY: CellDrawInt() PASS: di - handle of GState dx - style token ID ss:bp - inherited CellLocals CL_styleToken - last style token used ds:si - ptr to Spreadsheet instance RETURN: GState attrs set DESTROYED: none PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: NOTE: does not set the background color, since that is not usually used (ie. when == C_WHITE, no drawing is done) NOTE: it is assumed that locals.CL_styleToken will be initialized to -1 before calling RangeEnum() to call CellDrawInt(). If this is not the case, then the attributes in the GState may not be set correctly. REVISION HISTORY: Name Date Description ---- ---- ----------- eca 3/ 2/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ SetCellGStateAttrsFar proc far call SetCellGStateAttrs ret SetCellGStateAttrsFar endp SetCellGStateAttrs proc near uses ax, dx class SpreadsheetClass locals local CellLocals .enter inherit EC < call ECCheckInstancePtr ;> mov ax, dx ;ax <- style token ID ; ; Get cell attributes for given token if we don't have them already ; cmp ax, ss:locals.CL_styleToken ;known attributes? LONG je done ;branch if already known push di, es segmov es, ss, di lea di, locals.CL_cellAttrs ;es:di<-ptr to CellAttrs struct call StyleGetStyleByToken ;get associated styles pop di, es mov ss:locals.CL_styleToken, ax ;store new token ; ; Is the GState ours and already initialized? ; cmp di, ds:[si].SSI_gstate ;our GState? jne setAttrs ;branch if not ours cmp ds:[si].SSI_curAttrs, ax ;known attributes? je done ;branch if already set up mov ds:[si].SSI_curAttrs, ax ;store new token setAttrs: ; ; Set all the attrs at once ; push ds, si segmov ds, ss lea si, ss:locals.CL_buffer ;ds CheckHack <(size CL_buffer) ge (size TextAttr)> ; ; pointsize ; clr ah mov dx, ss:locals.CL_cellAttrs.CA_pointsize shr dx rcr ah shr dx rcr ah shr dx rcr ah ;dx.ah <- pointsize (WBFixed) movwbf ds:[si].TA_size, dxah ; ; font ; mov ax, ss:locals.CL_cellAttrs.CA_font mov ds:[si].TA_font, ax ; ; text color ; mov ax, ss:locals.CL_cellAttrs.CA_textAttrs.AI_color.low mov ds:[si].TA_color.low, ax mov ax, ss:locals.CL_cellAttrs.CA_textAttrs.AI_color.high mov ds:[si].TA_color.high, ax ; ; text mask ; mov al, ss:locals.CL_cellAttrs.CA_textAttrs.AI_grayScreen mov ds:[si].TA_mask, al ; ; text styles ; mov al, ss:locals.CL_cellAttrs.CA_style mov ds:[si].TA_styleSet, al mov ds:[si].TA_styleClear, 0xff ; ; Text mode ; mov ax, mask TM_DRAW_BASE or (mask TM_DRAW_BOTTOM or \ mask TM_DRAW_ACCENT shl 8) mov {word}ds:[si].TA_modeSet, ax ; ; FontWidth and FontWeight ; mov ax, {word}ss:locals.CL_cellAttrs.CA_fontWeight mov {word}ds:[si].TA_fontWeight, ax CheckHack <(offset TA_fontWidth) eq (offset TA_fontWeight)+1> CheckHack <(offset CA_fontWidth) eq (offset CA_fontWeight)+1> ; ; Set track kerning ; mov ax, {word}ss:locals.CL_cellAttrs.CA_trackKern mov ds:[si].TA_trackKern, ax ; ; zero everything else ; clr ax mov ds:[si].TA_spacePad.WBF_int, ax mov ds:[si].TA_spacePad.WBF_frac, al mov ds:[si].TA_pattern.GP_type, al CheckHack <PT_SOLID eq 0> call GrSetTextAttr pop ds, si done: .leave ret SetCellGStateAttrs endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% RedrawRulers %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Redraw the rulers CALLED BY: UTILITY PASS: ds:si - ptr to Spreadsheet instance RETURN: none DESTROYED: none PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- eca 6/23/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ RedrawRulers proc far uses ax .enter mov ax, MSG_VIS_RULER_INVALIDATE_WITH_SLAVES call SendToRuler .leave ret RedrawRulers endp DrawCode ends
26.772089
79
0.598871
f76df5f2a07f0ff04f90c24a241327a9cef79b26
433
asm
Assembly
programs/oeis/276/A276659.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/276/A276659.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/276/A276659.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A276659: Accumulation of the upper left triangle used in binomial transform of nonnegative integers. ; 0,2,11,39,114,300,741,1757,4052,9162,20415,44979,98214,212888,458633,982905,2097000,4456278,9436995,19922735,41942810,88080132,184549101,385875669,805306044,1677721250,3489660551,7247756907,15032385102,31138512432,64424508945 mov $1,$0 add $1,1 mov $2,1 lpb $1 mul $0,2 sub $2,$1 sub $1,1 lpe add $2,1 add $0,$2 sub $0,1
28.866667
227
0.766744
f29cd989c65e2f128cb68d8a0d001b4519a0bd7f
253
asm
Assembly
libsrc/_DEVELOPMENT/arch/zx/misc/c/sccz80/zx_visit_wc_attr_callee.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/_DEVELOPMENT/arch/zx/misc/c/sccz80/zx_visit_wc_attr_callee.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
1,600
2017-01-15T16:12:02.000Z
2022-03-31T12:11:12.000Z
libsrc/_DEVELOPMENT/arch/zx/misc/c/sccz80/zx_visit_wc_attr_callee.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
215
2017-01-17T10:43:03.000Z
2022-03-23T17:25:02.000Z
; void zx_visit_wc_attr(struct r_Rect8 *r, void *function) SECTION code_clib SECTION code_arch PUBLIC zx_visit_wc_attr_callee EXTERN asm_zx_visit_wc_attr zx_visit_wc_attr_callee: pop af pop de pop ix push af jp asm_zx_visit_wc_attr
14.055556
58
0.786561
943dbe595c5e091723e15f72307ba741d0435f8b
778
asm
Assembly
oeis/143/A143414.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/143/A143414.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/143/A143414.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A143414: Apéry-like numbers for the constant 1/e: a(n) = (1/(n-1)!)*Sum_{k = 0..n-1} binomial(n-1,k)*(2*n-k)!. ; Submitted by Christian Krause ; 0,2,30,492,9620,222630,5989242,184139480,6377545512,245868202890,10446648201110,485126443539012,24449173476952380,1329144227959100462,77535552689576436210,4831278674685354629040,320262424087652686405712,22505140377943037626931730,1671112636104402324415971342,130748376906612698607734925980,10751106712647645548223632290020,926916426482548205870962690236342,83612935145107202605358007351879530,7876004106155622104888740711567279752,773324072408007213168426153246656628600 mov $1,1 mov $2,1 mov $3,$0 lpb $3 mul $1,$0 mul $1,2 sub $3,1 mul $2,$3 add $1,$2 max $3,1 add $0,$3 lpe mul $1,$0 div $1,$2 mov $0,$1 mul $0,2
37.047619
472
0.790488
6220bf5a7fa2f0ea4370b73dcbceaf7d351a3dd5
329
asm
Assembly
programs/oeis/258/A258841.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/258/A258841.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/258/A258841.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A258841: a(n) = 9*n^2 - 237*n + 1927. ; 1927,1699,1489,1297,1123,967,829,709,607,523,457,409,379,367,373,397,439,499,577,673,787,919,1069,1237,1423,1627,1849,2089,2347,2623,2917,3229,3559,3907,4273,4657,5059,5479,5917,6373,6847,7339,7849,8377,8923,9487,10069 sub $0,13 mul $0,3 bin $0,2 mov $1,$0 div $1,3 mul $1,6 add $1,367
29.909091
220
0.699088
da51fb0a178c467bc699676f5c748580d5d663ce
3,605
asm
Assembly
boot/interrupts.asm
paule32/deBlows
c6fa70cd2a5c04f63f37e4e0f092db626b7fbf3a
[ "MIT" ]
null
null
null
boot/interrupts.asm
paule32/deBlows
c6fa70cd2a5c04f63f37e4e0f092db626b7fbf3a
[ "MIT" ]
null
null
null
boot/interrupts.asm
paule32/deBlows
c6fa70cd2a5c04f63f37e4e0f092db626b7fbf3a
[ "MIT" ]
null
null
null
; interrupts.asm ; contains all system exception interrupts ; and other system interface interrupts ; note: exception 15 and 20-31 are Intel Reserved %define i386 %macro SAVE_REGS 0 %ifdef i386 push eax push ebx push ecx push edx ; push esi ; push edi ; push ebp ; push esp %else push rax push rbx push rcx push rdx push rsi push rdi push rbp push rsp push r8 push r9 push r10 push r11 push r12 push r13 push r14 push r15 %endif push fs push gs %endmacro %macro RESTORE_REGS 0 pop gs pop fs %ifdef i386 ; pop esp ; pop ebp ; pop edi ; pop esi pop edx pop ecx pop ebx pop eax %else pop r15 pop r14 pop r13 pop r12 pop r11 pop r10 pop r9 pop r8 pop rsp pop rbp pop rdi pop rsi pop rdx pop rcx pop rbx pop rax %endif %endmacro %macro REGS_CALLEE 1 mov eax, 0x10 %ifdef i386 mov edi, eax mov esi, eax %else mov rdi, rax mov rsi, rax %endif cld call %1 %endmacro extern int_00 global int00 int00: SAVE_REGS REGS_CALLEE int_00 ; Divide by Zero #DE RESTORE_REGS iret [extern int_01] [global int01] int01: SAVE_REGS REGS_CALLEE int_01 ; Test Interrupt Handler RESTORE_REGS iret [extern int_02] [global int02] int02: SAVE_REGS REGS_CALLEE int_02 ; Test Interrupt Handler RESTORE_REGS iret [extern int_03] [global int03] int03: SAVE_REGS REGS_CALLEE int_03 ; Test Interrupt Handler RESTORE_REGS iret [extern int_04] [global int04] int04: SAVE_REGS REGS_CALLEE int_04 ; Test Interrupt Handler RESTORE_REGS iret [extern int_05] [global int05] int05: SAVE_REGS REGS_CALLEE int_05 ; Test Interrupt Handler RESTORE_REGS iret [extern int_06] [global int06] int06: SAVE_REGS REGS_CALLEE int_06 ; Test Interrupt Handler RESTORE_REGS iret [extern int_07] [global int07] int07: SAVE_REGS REGS_CALLEE int_07 ; Test Interrupt Handler RESTORE_REGS iret [extern int_08] [global int08] int08: SAVE_REGS REGS_CALLEE int_08 ; Test Interrupt Handler RESTORE_REGS iret [extern int_09] [global int09] int09: SAVE_REGS REGS_CALLEE int_09 ; Test Interrupt Handler RESTORE_REGS iret [extern int_10] [global int10] int10: SAVE_REGS REGS_CALLEE int_10 ; Test Interrupt Handler RESTORE_REGS iret [extern int_11] [global int11] int11: SAVE_REGS REGS_CALLEE int_11 ; Test Interrupt Handler RESTORE_REGS iret [extern int_12] [global int12] int12: SAVE_REGS REGS_CALLEE int_12 ; Test Interrupt Handler RESTORE_REGS iret [extern int_13] [global int13] int13: SAVE_REGS REGS_CALLEE int_13 ; Test Interrupt Handler RESTORE_REGS iret [extern int_14] [global int14] int14: SAVE_REGS REGS_CALLEE int_14 ; Test Interrupt Handler RESTORE_REGS iret ;; Exception 15 is an Intel Reserved Interrupt [extern int_15] [global int15] int15: SAVE_REGS REGS_CALLEE int_15 RESTORE_REGS iret ;;------------ [extern int_16] [global int16] int16: SAVE_REGS REGS_CALLEE int_16 ; Test Interrupt Handler RESTORE_REGS iret [extern int_17] [global int17] int17: SAVE_REGS REGS_CALLEE int_17 ; Test Interrupt Handler RESTORE_REGS iret [extern int_18] [global int18] int18: SAVE_REGS REGS_CALLEE int_18 ; Test Interrupt Handler RESTORE_REGS iret [extern int_19] [global int19] int19: SAVE_REGS REGS_CALLEE int_19 ; Test Interrupt Handler RESTORE_REGS iret ;; Exceptions 20-31 are Intel Reserved Interrupts ;; E n d o f E x c e p t i o n s I n t e r r u p t s [extern testint] [global int32] int32: SAVE_REGS REGS_CALLEE testint ; Test Interrupt Handler RESTORE_REGS iret
13.865385
58
0.723994
0abbb2faac6b0e2a8f813052d2439b9212091530
283
asm
Assembly
programs/oeis/074/A074617.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/074/A074617.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/074/A074617.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A074617: a(n) = 5^n + 8^n. ; 2,13,89,637,4721,35893,277769,2175277,17167841,136170853,1083507449,8638762717,68963617361,550976517013,4404150026729,35214889666957,281627564601281,2252562753138373,18018213206747609,144134261562183997 seq $0,74518 ; a(n) = 1^n + 5^n + 8^n. sub $0,1
47.166667
204
0.770318
4664af8bff11efa05f8ece8b250f00cca4ad3efd
656
asm
Assembly
oeis/133/A133476.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/133/A133476.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/133/A133476.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A133476: a(n) = Sum_{k>=0} binomial(n,5*k+1). ; Submitted by Jon Maiga ; 0,1,2,3,4,5,7,14,36,93,220,474,948,1807,3381,6385,12393,24786,50559,103702,211585,427351,854702,1698458,3368259,6690150,13333932,26667864,53457121,107232053,214978335,430470899,860941798,1720537327,3437550076,6869397265,13733091643,27466183286,54947296924,109933682017,219930610020,439924466026,879848932052,1759532283963,3518631073489,7036560738245,14072420067757,28144840135514,56291516582931,112587840692838,225183460127725,450374698997499,900749397994998,1801478430978922,3602903545666671 mov $3,$0 add $0,4 lpb $0 sub $0,5 mov $2,$3 bin $2,$0 add $1,$2 lpe mov $0,$1
46.857143
494
0.801829
0361f9bec53a9efb943fa701f653a938619648c6
477
asm
Assembly
programs/oeis/271/A271114.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/271/A271114.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/271/A271114.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A271114: Expansion of (1+x)*(2+x)/(1-x)^2. ; 2,7,13,19,25,31,37,43,49,55,61,67,73,79,85,91,97,103,109,115,121,127,133,139,145,151,157,163,169,175,181,187,193,199,205,211,217,223,229,235,241,247,253,259,265,271,277,283,289,295,301,307,313,319,325,331,337,343,349,355,361,367,373,379,385,391,397,403,409,415,421,427,433,439,445,451,457,463,469,475,481,487,493,499,505,511,517,523,529,535,541,547,553,559,565,571,577,583,589,595 mul $0,6 pow $1,$0 add $1,$0 add $1,1 mov $0,$1
53
382
0.69392
d6cadeee18e1e5e3884baa64b8b9fb8c824de6c2
6,715
asm
Assembly
Transynther/x86/_processed/AVXALIGN/_st_sm_/i9-9900K_12_0xa0_notsx.log_3_640.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/AVXALIGN/_st_sm_/i9-9900K_12_0xa0_notsx.log_3_640.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/AVXALIGN/_st_sm_/i9-9900K_12_0xa0_notsx.log_3_640.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r13 push %rax push %rbp push %rbx push %rcx push %rdi push %rsi lea addresses_normal_ht+0x2e2b, %rsi lea addresses_UC_ht+0x92eb, %rdi and %rbx, %rbx mov $40, %rcx rep movsl nop nop nop nop nop inc %rdi lea addresses_UC_ht+0xcf6b, %rbp nop nop and %r10, %r10 mov (%rbp), %rbx nop nop cmp %rbx, %rbx lea addresses_normal_ht+0x73cc, %rsi lea addresses_A_ht+0xa7b7, %rdi nop nop nop nop nop add $29367, %rax mov $24, %rcx rep movsb nop nop add $49377, %rbp lea addresses_D_ht+0x1a32b, %rsi lea addresses_normal_ht+0x550b, %rdi nop nop inc %r13 mov $26, %rcx rep movsw nop nop nop nop cmp %rbp, %rbp lea addresses_normal_ht+0x124cb, %rsi lea addresses_D_ht+0x6cab, %rdi clflush (%rdi) nop nop xor %rbx, %rbx mov $42, %rcx rep movsl nop nop nop inc %r13 lea addresses_normal_ht+0xbfe3, %rsi lea addresses_WC_ht+0xb13f, %rdi clflush (%rsi) and %rax, %rax mov $29, %rcx rep movsq nop and %rcx, %rcx lea addresses_UC_ht+0xcd2b, %r10 nop nop nop xor $6907, %rbx mov (%r10), %esi nop nop and %rax, %rax lea addresses_D_ht+0x15773, %rsi lea addresses_UC_ht+0x2cbb, %rdi nop nop nop nop nop cmp %rbx, %rbx mov $7, %rcx rep movsq nop inc %rax lea addresses_D_ht+0x1d05f, %rsi lea addresses_A_ht+0x19beb, %rdi nop and %rbp, %rbp mov $39, %rcx rep movsw nop nop nop mfence pop %rsi pop %rdi pop %rcx pop %rbx pop %rbp pop %rax pop %r13 pop %r10 ret .global s_faulty_load s_faulty_load: push %r12 push %r15 push %rbp push %rbx push %rcx push %rdi push %rdx push %rsi // Store lea addresses_WT+0x1c6ab, %rbx xor %rbp, %rbp movl $0x51525354, (%rbx) add $52655, %r15 // REPMOV lea addresses_RW+0xd979, %rsi lea addresses_D+0x6cab, %rdi clflush (%rsi) nop nop nop nop nop sub $12534, %r15 mov $52, %rcx rep movsq nop nop nop nop nop inc %rbx // Store lea addresses_A+0x9d05, %rsi nop nop nop nop nop and $4926, %rcx mov $0x5152535455565758, %r12 movq %r12, (%rsi) nop nop nop xor %rdx, %rdx // Load lea addresses_D+0x36eb, %rbp nop nop nop nop lfence movb (%rbp), %bl nop and $58216, %rbx // Store lea addresses_D+0x816b, %rsi dec %rbp mov $0x5152535455565758, %r12 movq %r12, (%rsi) nop nop nop nop xor $19297, %r15 // Store mov $0x786e2400000002ab, %rsi nop nop nop sub %r15, %r15 mov $0x5152535455565758, %r12 movq %r12, %xmm0 movups %xmm0, (%rsi) nop nop and %rsi, %rsi // Load lea addresses_D+0xbd2b, %rsi add %rbx, %rbx movb (%rsi), %dl nop nop inc %rbx // Store lea addresses_PSE+0x15cab, %rbp nop nop nop nop xor %r15, %r15 mov $0x5152535455565758, %r12 movq %r12, %xmm5 vmovups %ymm5, (%rbp) nop nop nop nop add %r12, %r12 // Store lea addresses_A+0xd04b, %r15 nop nop nop nop nop cmp $40405, %rcx mov $0x5152535455565758, %rdx movq %rdx, (%r15) cmp %rcx, %rcx // Load lea addresses_A+0x98ab, %rcx nop nop nop nop nop and $48281, %rsi movaps (%rcx), %xmm6 vpextrq $1, %xmm6, %rbp nop nop nop cmp %rdx, %rdx // Load lea addresses_A+0xf2ab, %rsi nop nop nop nop nop and $30685, %rbp mov (%rsi), %di inc %rdx // Store mov $0x786e2400000002ab, %rbp clflush (%rbp) nop nop nop add $42425, %rdi movw $0x5152, (%rbp) nop nop nop add $5432, %rsi // Store lea addresses_WC+0x87db, %r15 nop nop nop nop and $60203, %rsi mov $0x5152535455565758, %r12 movq %r12, (%r15) nop nop nop cmp $59235, %rdx // Faulty Load mov $0x786e2400000002ab, %rdi nop add %r12, %r12 movb (%rdi), %cl lea oracles, %rdx and $0xff, %rcx shlq $12, %rcx mov (%rdx,%rcx,1), %rcx pop %rsi pop %rdx pop %rdi pop %rcx pop %rbx pop %rbp pop %r15 pop %r12 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_NC', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'type': 'addresses_WT', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 7}} {'src': {'type': 'addresses_RW', 'congruent': 1, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_D', 'congruent': 9, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_A', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 1}} {'src': {'type': 'addresses_D', 'AVXalign': True, 'size': 1, 'NT': False, 'same': False, 'congruent': 3}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'type': 'addresses_D', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 4}} {'OP': 'STOR', 'dst': {'type': 'addresses_NC', 'AVXalign': False, 'size': 16, 'NT': False, 'same': True, 'congruent': 0}} {'src': {'type': 'addresses_D', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 7}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'type': 'addresses_PSE', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 8}} {'OP': 'STOR', 'dst': {'type': 'addresses_A', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 5}} {'src': {'type': 'addresses_A', 'AVXalign': True, 'size': 16, 'NT': False, 'same': False, 'congruent': 6}, 'OP': 'LOAD'} {'src': {'type': 'addresses_A', 'AVXalign': True, 'size': 2, 'NT': False, 'same': False, 'congruent': 11}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'type': 'addresses_NC', 'AVXalign': False, 'size': 2, 'NT': False, 'same': True, 'congruent': 0}} {'OP': 'STOR', 'dst': {'type': 'addresses_WC', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 4}} [Faulty Load] {'src': {'type': 'addresses_NC', 'AVXalign': False, 'size': 1, 'NT': True, 'same': True, 'congruent': 0}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'type': 'addresses_normal_ht', 'congruent': 6, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_UC_ht', 'congruent': 6, 'same': False}} {'src': {'type': 'addresses_UC_ht', 'AVXalign': True, 'size': 8, 'NT': False, 'same': False, 'congruent': 1}, 'OP': 'LOAD'} {'src': {'type': 'addresses_normal_ht', 'congruent': 0, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_A_ht', 'congruent': 1, 'same': False}} {'src': {'type': 'addresses_D_ht', 'congruent': 6, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal_ht', 'congruent': 5, 'same': False}} {'src': {'type': 'addresses_normal_ht', 'congruent': 4, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_D_ht', 'congruent': 8, 'same': True}} {'src': {'type': 'addresses_normal_ht', 'congruent': 3, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WC_ht', 'congruent': 2, 'same': False}} {'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 4, 'NT': False, 'same': True, 'congruent': 7}, 'OP': 'LOAD'} {'src': {'type': 'addresses_D_ht', 'congruent': 3, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_UC_ht', 'congruent': 4, 'same': False}} {'src': {'type': 'addresses_D_ht', 'congruent': 1, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_A_ht', 'congruent': 3, 'same': False}} {'52': 3} 52 52 52 */
19.634503
152
0.645867
b3ec896e312acd0501f96c155b8fbca5e7a74675
7,319
asm
Assembly
assembly/asmsbs3e/chapter11/showchar/showchar.asm
ash1247/DocumentsWindows
66f65b5170a1ba766cfae08b7104b63ab87331c2
[ "MIT" ]
5
2015-12-10T15:03:12.000Z
2019-02-20T21:39:53.000Z
assembly/asmsbs3e/chapter11/showchar/showchar.asm
ash1247/DocumentsWindows
66f65b5170a1ba766cfae08b7104b63ab87331c2
[ "MIT" ]
null
null
null
assembly/asmsbs3e/chapter11/showchar/showchar.asm
ash1247/DocumentsWindows
66f65b5170a1ba766cfae08b7104b63ab87331c2
[ "MIT" ]
9
2015-11-25T08:56:56.000Z
2020-11-30T18:08:44.000Z
; Executable name : SHOWCHAR ; Version : 1.0 ; Created date : 5/11/2009 ; Last update : 5/15/2009 ; Author : Jeff Duntemann ; Description : A simple program in assembly for Linux, using NASM 2.05, ; demonstrating discontinuous string writes to memory using STOSB without ; REP. The program loops through characters 32 through 255 and writes a ; simple "ASCII chart" in a display buffer. The chart consists of 8 lines ; of 32 characters, with the lines not continuous in memory. ; ; Note that the output to the console from this program will NOT display ; correctly unless you have enabled the IBM850 character encoding in ; the terminal program being used to display the console! For more on ; this issue, and how to enable IBM850, see p. 177 in the book. ; ; Build using these commands: ; nasm -f elf -g -F stabs showchar.asm ; ld -o showchar showchar.o ; SECTION .data ; Section containing initialised data EOL equ 10 ; Linux end-of-line character FILLCHR equ 32 ; Default to ASCII space character CHRTROW equ 2 ; Chart begins 2 lines from top CHRTLEN equ 32 ; Each chart line shows 32 chars ; This escape sequence will clear the console terminal and place the ; text cursor to the origin (1,1) on virtually all Linux consoles: ClrHome db 27,"[2J",27,"[01;01H" CLRLEN equ $-ClrHome ; Length of term clear string SECTION .bss ; Section containing uninitialized data COLS equ 81 ; Line length + 1 char for EOL ROWS equ 25 ; Number of lines in display VidBuff resb COLS*ROWS ; Buffer size adapts to ROWS & COLS SECTION .text ; Section containing code global _start ; Linker needs this to find the entry point! ; This macro clears the Linux console terminal and sets the cursor position ; to 1,1, using a single predefined escape sequence. %macro ClearTerminal 0 pushad ; Save all registers mov eax,4 ; Specify sys_write call mov ebx,1 ; Specify File Descriptor 1: Standard Output mov ecx,ClrHome ; Pass offset of the error message mov edx,CLRLEN ; Pass the length of the message int 80H ; Make kernel call popad ; Restore all registers %endmacro ;------------------------------------------------------------------------- ; Show: Display a text buffer to the Linux console ; UPDATED: 5/13/2009 ; IN: Nothing ; RETURNS: Nothing ; MODIFIES: Nothing ; CALLS: Linux sys_write ; DESCRIPTION: Sends the buffer VidBuff to the Linux console via sys_write. ; The number of bytes sent to the console is calculated by ; multiplying the COLS equate by the ROWS equate. Show: pushad ; Save all registers mov eax,4 ; Specify sys_write call mov ebx,1 ; Specify File Descriptor 1: Standard Output mov ecx,VidBuff ; Pass offset of the buffer mov edx,COLS*ROWS ; Pass the length of the buffer int 80H ; Make kernel call popad ; Restore all registers ret ; And go home! ;------------------------------------------------------------------------- ; ClrVid: Clears a text buffer to spaces and replaces all EOLs ; UPDATED: 5/13/2009 ; IN: Nothing ; RETURNS: Nothing ; MODIFIES: VidBuff, DF ; CALLS: Nothing ; DESCRIPTION: Fills the buffer VidBuff with a predefined character ; (FILLCHR) and then places an EOL character at the end ; of every line, where a line ends every COLS bytes in ; VidBuff. ClrVid: push eax ; Save caller's registers push ecx push edi cld ; Clear DF; we're counting up-memory mov al,FILLCHR ; Put the buffer filler char in AL mov edi,VidBuff ; Point destination index at buffer mov ecx,COLS*ROWS ; Put count of chars stored into ECX rep stosb ; Blast chars at the buffer ; Buffer is cleared; now we need to re-insert the EOL char after each line: mov edi,VidBuff ; Point destination at buffer again dec edi ; Start EOL position count at VidBuff char 0 mov ecx,ROWS ; Put number of rows in count register PtEOL: add edi,COLS ; Add column count to EDU mov byte [edi],EOL ; Store EOL char at end of row loop PtEOL ; Loop back if still more lines pop edi ; Restore caller's registers pop ecx pop eax ret ; and go home! ;------------------------------------------------------------------------- ; Ruler: Generates a "1234567890"-style ruler at X,Y in text buffer ; UPDATED: 5/13/2009 ; IN: The 1-based X position (row #) is passed in EBX ; The 1-based Y position (column #) is passed in EAX ; The length of the ruler in chars is passed in ECX ; RETURNS: Nothing ; MODIFIES: VidBuff ; CALLS: Nothing ; DESCRIPTION: Writes a ruler to the video buffer VidBuff, at the 1-based ; X,Y position passed in EBX,EAX. The ruler consists of a ; repeating sequence of the digits 1 through 0. The ruler ; will wrap to subsequent lines and overwrite whatever EOL ; characters fall within its length, if it will noy fit ; entirely on the line where it begins. Note that the Show ; procedure must be called after Ruler to display the ruler ; on the console. Ruler: push eax ; Save the registers we change push ebx push ecx push edi mov edi,VidBuff ; Load video address to EDI dec eax ; Adjust Y value down by 1 for address calculation dec ebx ; Adjust X value down by 1 for address calculation mov ah,COLS ; Move screen width to AH mul ah ; Do 8-bit multiply AL*AH to AX add edi,eax ; Add Y offset into vidbuff to EDI add edi,ebx ; Add X offset into vidbuf to EDI ; EDI now contains the memory address in the buffer where the ruler ; is to begin. Now we display the ruler, starting at that position: mov al,'1' ; Start ruler with digit '1' DoChar: stosb ; Note that there's no REP prefix! add al,'1' ; Bump the character value in AL up by 1 aaa ; Adjust AX to make this a BCD addition add al,'0' ; Make sure we have binary 3 in AL's high nybble loop DoChar ; Go back & do another char until ECX goes to 0 pop edi ; Restore the registers we changed pop ecx pop ebx pop eax ret ; And go home! ;------------------------------------------------------------------------- ; MAIN PROGRAM: _start: nop ; This no-op keeps gdb happy... ; Get the console and text display text buffer ready to go: ClearTerminal ; Send terminal clear string to console call ClrVid ; Init/clear the video buffer ; Show a 64-character ruler above the table display: mov eax,1 ; Start ruler at display position 1,1 mov ebx,1 mov ecx,32 ; Make ruler 32 characters wide call Ruler ; Generate the ruler ; Now let's generate the chart itself: mov edi,VidBuff ; Start with buffer address in EDI add edi,COLS*CHRTROW ; Begin table display down CHRTROW lines mov ecx,224 ; Show 256 chars minus first 32 mov al,32 ; Start with char 32; others won't show .DoLn: mov bl,CHRTLEN ; Each line will consist of 32 chars .DoChr: stosb ; Note that there's no REP prefix! jcxz AllDone ; When the full set is printed, quit inc al ; Bump the character value in AL up by 1 dec bl ; Decrement the line counter by one loopnz .DoChr ; Go back & do another char until BL goes to 0 add edi,COLS-CHRTLEN ; Move EDI to start of next line jmp .DoLn ; Start display of the next line ; Having written all that to the buffer, send the buffer to the console: AllDone: call Show ; Refresh the buffer to the console Exit: mov eax,1 ; Code for Exit Syscall mov ebx,0 ; Return a code of zero int 80H ; Make kernel call
39.139037
77
0.69586
a01f329cf733294eea113bd61378ed2dbf2a2aaf
122
asm
Assembly
asm/fork.asm
icefoxen/lang
628185020123aabe4753f96c6ab4378637a2dbf5
[ "MIT" ]
null
null
null
asm/fork.asm
icefoxen/lang
628185020123aabe4753f96c6ab4378637a2dbf5
[ "MIT" ]
null
null
null
asm/fork.asm
icefoxen/lang
628185020123aabe4753f96c6ab4378637a2dbf5
[ "MIT" ]
null
null
null
; Let's see if we can assemble a forkbomb... ;segment .text ;global _start _start: mov eax, 2; int 0x80; jmp _start;
12.2
44
0.680328
a2c1ec9ceb56305a7059816651f930d4d26b878d
1,356
asm
Assembly
src/test/ref/array-16bit-lookup.asm
jbrandwood/kickc
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
[ "MIT" ]
2
2022-03-01T02:21:14.000Z
2022-03-01T04:33:35.000Z
src/test/ref/array-16bit-lookup.asm
jbrandwood/kickc
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
[ "MIT" ]
null
null
null
src/test/ref/array-16bit-lookup.asm
jbrandwood/kickc
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
[ "MIT" ]
null
null
null
// Test KickC performance for 16-bit array lookup function from article "Optimizing C array lookups for the 6502" // http://8bitworkshop.com/blog/compilers/2019/03/17/cc65-optimization.html // Commodore 64 PRG executable file .file [name="array-16bit-lookup.prg", type="prg", segments="Program"] .segmentdef Program [segments="Basic, Code, Data"] .segmentdef Basic [start=$0801] .segmentdef Code [start=$80d] .segmentdef Data [startAfter="Code"] .segment Basic :BasicUpstart(main) .segment Code main: { .label SCREEN = $400 .label __0 = 4 ldx #0 __b1: // getValue(idx) txa sta.z getValue.index lda #0 sta.z getValue.index+1 jsr getValue // SCREEN[idx] = getValue(idx) txa asl tay lda.z __0 sta SCREEN,y lda.z __0+1 sta SCREEN+1,y // for(unsigned char idx : 0..128) inx cpx #$81 bne __b1 // } rts } // __zp(4) unsigned int getValue(__zp(2) unsigned int index) getValue: { .label index = 2 .label return = 4 // index & 0x7f lda #$7f and.z index // arr16[index & 0x7f] & 0xff asl tay lda #$ff and arr16,y // (arr16[index & 0x7f] & 0xff) >> 1 lsr // return (unsigned int)((arr16[index & 0x7f] & 0xff) >> 1); sta.z return lda #0 sta.z return+1 // } rts } .segment Data arr16: .fill 2*$80, 0
22.229508
113
0.612094
c6d8fbbb4c84c9a9e26d700286b272e3e82e488b
1,449
asm
Assembly
maps/AzaleaMart.asm
Dev727/ancientplatinum
8b212a1728cc32a95743e1538b9eaa0827d013a7
[ "blessing" ]
28
2019-11-08T07:19:00.000Z
2021-12-20T10:17:54.000Z
maps/AzaleaMart.asm
Dev727/ancientplatinum
8b212a1728cc32a95743e1538b9eaa0827d013a7
[ "blessing" ]
13
2020-01-11T17:00:40.000Z
2021-09-14T01:27:38.000Z
maps/AzaleaMart.asm
Dev727/ancientplatinum
8b212a1728cc32a95743e1538b9eaa0827d013a7
[ "blessing" ]
22
2020-05-28T17:31:38.000Z
2022-03-07T20:49:35.000Z
object_const_def ; object_event constants const AZALEAMART_CLERK const AZALEAMART_COOLTRAINER_M const AZALEAMART_BUG_CATCHER AzaleaMart_MapScripts: db 0 ; scene scripts db 0 ; callbacks AzaleaMartClerkScript: opentext pokemart MARTTYPE_STANDARD, MART_AZALEA closetext end AzaleaMartCooltrainerMScript: jumptextfaceplayer AzaleaMartCooltrainerMText AzaleaMartBugCatcherScript: jumptextfaceplayer AzaleaMartBugCatcherText AzaleaMartCooltrainerMText: text "There's no GREAT" line "BALL here. #" para "BALLS will have" line "to do." para "I wish KURT would" line "make me some of" cont "his custom BALLS." done AzaleaMartBugCatcherText: text "A GREAT BALL is" line "better for catch-" cont "ing #MON than a" cont "# BALL." para "But KURT's might" line "be better some-" cont "times." done AzaleaMart_MapEvents: db 0, 0 ; filler db 2 ; warp events warp_event 2, 7, AZALEA_TOWN, 3 warp_event 3, 7, AZALEA_TOWN, 3 db 0 ; coord events db 0 ; bg events db 3 ; object events object_event 1, 3, SPRITE_CLERK, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, AzaleaMartClerkScript, -1 object_event 2, 5, SPRITE_COOLTRAINER_M, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, AzaleaMartCooltrainerMScript, -1 object_event 7, 2, SPRITE_BUG_CATCHER, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 2, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, AzaleaMartBugCatcherScript, -1
23.754098
153
0.763975
5a4c872260c1039ae330ca0688f7133b79fa6c9d
390
asm
Assembly
oeis/183/A183977.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/183/A183977.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/183/A183977.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A183977: 1/4 the number of (n+1)X(n+1) binary arrays with all 2X2 subblock sums the same ; Submitted by Christian Krause ; 4,8,14,26,46,86,158,302,574,1118,2174,4286,8446,16766,33278,66302,132094,263678 mov $3,$0 seq $0,209726 ; 1/4 the number of (n+1) X 8 0..2 arrays with every 2 X 2 subblock having distinct clockwise edge differences. mov $2,2 pow $2,$3 add $0,$2 sub $0,15 mul $0,2
32.5
125
0.712821
09e3ff2519fbef889f363cfc3642d8909fb90c93
863
asm
Assembly
programs/oeis/291/A291181.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/291/A291181.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/291/A291181.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A291181: p-INVERT of the positive integers, where p(S) = 1 - 8*S. ; 8,80,792,7840,77608,768240,7604792,75279680,745192008,7376640400,73021211992,722835479520,7155333583208,70830500352560,701149669942392,6940666199071360,68705512320771208,680114457008640720,6732439057765635992,66644276120647719200,659710322148711556008,6530458945366467840880,64644879131515966852792,639918332369793200687040,6334538444566416040017608,62705466113294367199489040,620720122688377255954872792,6144495760770478192349238880,60824237485016404667537516008,602097879089393568483025921200,5960154553408919280162721695992,58999447654999799233144191038720,584034321996589073051279188691208,5781343772310890931279647695873360,57229403401112320239745197770042392,566512690238812311466172330004550560 add $0,1 seq $0,122653 ; a(n) = 10*a(n-1) - a(n-2) with a(0)=0, a(1)=6. div $0,6 mul $0,8
107.875
703
0.876014
f9c64b93499e8c97d75f56a21a909e8441fc0ef0
3,682
nasm
Assembly
winxp_sp3/trun/custom_rev_shell/win_reverse_shell.nasm
danf42/vulnserver
1b01aaa0f0b5706b5bc24c5f64d99dddcdcfe913
[ "MIT" ]
null
null
null
winxp_sp3/trun/custom_rev_shell/win_reverse_shell.nasm
danf42/vulnserver
1b01aaa0f0b5706b5bc24c5f64d99dddcdcfe913
[ "MIT" ]
null
null
null
winxp_sp3/trun/custom_rev_shell/win_reverse_shell.nasm
danf42/vulnserver
1b01aaa0f0b5706b5bc24c5f64d99dddcdcfe913
[ "MIT" ]
null
null
null
global _start section .text _start: ; clear direction flags cld ; WSAStartup() - initiates use of the Winsock DLL by a process xor eax, eax mov ax, 0x0190 ; sizeof (struct WSAData) sub esp, eax ; allocate space for WSAData struct push esp ; push pointer to WSAData struct push eax ; push the version parameter mov ebx, 0x71ab6a55 ; ws2_32.dll WSAStartup WinXP SP3 call ebx ; call WSAStartup ; sleep for 30 seconds xor eax, eax ; zero out eax push eax ; bAlertable (False) mov ax, 0x7530 ; move 30 seconds (30,000 ms) into AX push eax ; dwMilliseconds (30,000 mx) mov ebx, 0x7c802446 ; kernel32.dll/Sleep call ebx ; WSASocketA - create the socket xor eax, eax ; clear eax push eax ; dwFlags push eax ; group push eax ; lpProtocolInfo xor ebx, ebx ; clear out ebx mov bl, 6 ; setup for protocol push ebx ; protocol inc eax ; setup for type push eax ; type inc eax ; setup for af push eax ; af mov ebx, 0x71ab8b6a ; Address of WSASocketA WinXP SP3 xor eax, eax ; clear eax call ebx ; call WSASocketA xchg eax, esi ; save socket into ESI ; connect() - connect to attacker machine push 0x80c7a8c0 ; sockaddr.sin_addr.s_addr: 192.168.199.128 push word 0x0F27 ; sockaddr.sin_port 9999 xor ebx, ebx ; clear ebx add bl, 2 ; sockaddr.sin_family : AF_INET = 2 push word bx mov edx, esp ; pointer for s push byte 16 ; length push edx ; pointer to s push esi ; saved socket mov ebx, 0x71ab4a07 ; address of connect WinXP SP3 call ebx ; call connect ; setup pointer to cmd mov edx, 0x646d6363 ; cmdd shr edx, 8 ; cmd push edx ; push edx onto the stack mov ebx, esp ; pointer to "cmd" ; setup pointer to processinfo xor edx, edx xor ecx, ecx ; clear out ecx mov cl, 0x04 loop1: push edx loop loop1 mov edi, esp ; move pointer into ebx ; setup startupinfo push esi ; hStdError - saved socket push esi ; hStdOutput - saved socket push esi ; hStdInput -saved socket push edx ; pReserved2 - NULL push edx ; cbReserved2 -NULL xor eax, eax inc eax rol eax, 8 push eax ; dwFlags - STARTF_USESTDHANDLES 0x00000100 push edx ; dwFillAttribute - NULL push edx ; dwYCountChars - NULL push edx ; dwXCountChars - NULL push edx ; dwYSize - NULL push edx ; dwXSize - NULL push edx ; dwY - NULL push edx ; dwX - NULL push edx ; pTitle - NULL push edx ; pDesktop - NULL push edx ; pReserved - NULL xor eax, eax add al, 44 push eax ; cb - size of structure mov eax, esp ; pStartupInfo ; CreateProcessA() push ebx ; pProcessInfo push eax ; pStartupInfo push edx ; CurrentDirectory - NULL push edx ; pEnvironment - NULL push edx ; CreationFlags - 0 xor eax, eax inc eax push eax ; InheritHandles -TRUE - 1 push edx ; pThreadAttributes -NULL push edx ; pProcessAttributes - NULL push ebx ; pCommandLine - pointer to "cmd" push edx ; ApplicationName - NULL mov ebx, 0x7c80236b ; CreateProcessA WinXP SP3 call ebx ; WaitForSingleObject push edx ; time to wait - 0=don't enter wait state push dword [edi] ; pProcessInfo (process handle) mov eax, 0x7c802530 ; kernel32.dll/WaitForSingleObject call eax ; call WaitForSingleObject ; Exit push edx mov ebx, 0x7c81cafa ; ExitProcess(exitcode) call ebx
29.693548
66
0.620315
ce4dacaae90623512c44e04c06e61c581d807a90
45,880
asm
Assembly
Build/Interpreters/beebOzmoo/asm/text.asm
polluks/Puddle-BuildTools
c1762d53a33002b62d8cffe3db129505a387bec3
[ "BSD-2-Clause" ]
38
2021-06-18T12:56:15.000Z
2022-03-12T20:38:40.000Z
Build/Interpreters/beebOzmoo/asm/text.asm
polluks/Puddle-BuildTools
c1762d53a33002b62d8cffe3db129505a387bec3
[ "BSD-2-Clause" ]
2
2021-06-20T16:28:12.000Z
2021-11-17T21:33:56.000Z
Build/Interpreters/beebOzmoo/asm/text.asm
polluks/Puddle-BuildTools
c1762d53a33002b62d8cffe3db129505a387bec3
[ "BSD-2-Clause" ]
6
2021-06-18T18:18:36.000Z
2021-12-22T08:01:32.000Z
; text opcodes ;TRACE_READTEXT = 1 ;TRACE_TOKENISE = 1 ;TRACE_SHOW_DICT_ENTRIES = 1 ;TRACE_PRINT_ARRAYS = 1 ;SFTODODATA 2 !ifndef ACORN { ; SFTODO!? .text_tmp !byte 0 .current_character !byte 0 } .petscii_char_read = zp_temp ; only ENTER + cursor + F1-F8 possible on a C64 ; SFTODO: It may be a good idea to tweak this to reflect the fact we have F1-F9 or F1-F10 on Acorn (depending on what the f0 key is mapped to), but I'll leave it alone for now until the handling of function keys settles down. num_terminating_characters !byte 1 terminating_characters !byte $0d !ifdef Z5PLUS { !byte $81,$82,$83,$84,$85,$86,$87,$88,$89,$8a,$8b,$8c parse_terminating_characters ; read terminating characters list ($2e) ; must be one of function keys 129-154, 252-254. ; 129-132: cursor u/d/l/r ; 133-144: F1-F12 (only F1-F8 on C64) ; 145-154: keypad 0-9 (not on C64 of course) ; 252 menu click (V6) (not C64) ; 253 double click (V6) (not C64) ; 254 single click (not C64) ; 255 means any function key lda story_start + header_terminating_chars_table ; 5c ldx story_start + header_terminating_chars_table + 1 ; 18 bne + cmp #0 bne + rts + jsr set_z_address ; read terminator ldy #1 - jsr read_next_byte cmp #$ff bne + ; all function keys (already the default) lda #$0d ; 13 keys in total (enter+cursor+F1-F8) sta num_terminating_characters rts + cmp #$8d ; F8=8c. Any higher values are not accepted in C64 mode bpl + sta terminating_characters,y iny + cmp #$00 bne - sty num_terminating_characters rts } !ifdef BENCHMARK { ; SFTODO +make_acorn_screen_hole ; SFTODO: Annoying duplication here... benchmark_commands !ifndef ACORN { ; !pet "turn statue w:turn it e:turn it n:n:open door:",255,0 !pet 255,"turn statue w:turn it e:turn it n:n:open door:n:turn flashlight on:n:examine model:press green:g:g:press black:g:press white:g:press green:g:g:press black:press blue:press green:g:g:g:press red:g:g:take ring:e:e:take yellow card:s:take slide:put it in slide projector:turn slide projector on:focus slide projector:take film:examine film projector:remove cap:drop it:put film in film projector:turn film projector on:examine screen:n:w:w:s:e:e:examine piano:open lid:take violet card:play tomorrow:push piano n:d:s:take dirty pillar:n:u:push piano s:g:d:n:take meter:s:u:drop pillar:w:w:w:drop ring:drop meter:e:drop yellow and violet:n:drop letter and photo:s:w:enter fireplace:take brick and drop it:u:u:u:e:d:take penguin:u:w:d:d:d:take indigo card:e:drop penguin:e:drop indigo:w:examine red statue:examine white statue:examine blue statue:e:e:move painting:take green card:examine safe:turn dial right 3:turn dial left 7:turn dial right 5:open safe:take grater:w:drop green:w:drop grater:e:open closet:enter closet:pull third peg:open door:n:examine newel:turn newel:e:take sack:open window:open sack:take finch:drop sack:w:w:s:move mat:take red card:n:e:s:pull second peg:open door:n:drop red:w:drop finch:e:enter closet:take bucket:n:n:unlock patio door:open door:n:take orange card:e:n:n:examine cannon:fill bucket with water:e:s:w:s:s:enter closet:hang bucket on third peg:n:u:open closet:s:wait:wait:open door:n:open panel:open trunk:take hydrant:d:d:w:drop hydrant:e:take all:n:w:w:d:open door:s:take blue card:n:turn computer on:examine it:put red in slot:put yellow in slot:put orange in slot:put green in slot:put blue in slot:put indigo in slot:put violet in slot:examine display:u:take matchbox:open it:take match:drop matchbox:e:e:n:e:n:n:take cannon ball:put it in cannon:light match:light fuse:open compartment:take mask:e:s:w:s:s:w:drop mask:e:s:open mailbox:take yellowed piece of paper:take card:examine card:drop card:n:n:w:take thin:e:n:n:nw:take shovel:ne:n:put thin on yellowed:n:w:n:w:n:w:s:w:w:n:w:s:e:s:e:n:e:s:w:n:w:s:w:n:w:s:w:n:e:n:e:n:e:e:n:e:s:e:e:s:e:n:e:n:e:s:w:s:w:s:e:n:w:s:dig ground with shovel:take stamp:n:e:s:w:n:e:n:e:n:w:s:w:s:w:n:w:w:n:w:s:w:w:s:w:s:w:s:e:n:e:s:e:n:e:s:e:n:w:s:w:n:w:n:e:s:e:e:n:e:s:e:s:e:s:w:s:e:s:s:w:drop stamp:e:drop all except flashlight:w:take red statuette:e:u:open door:enter closet:take skis:n:d:n:n:e:n:n:n:drop flashlight:s:e:e:wear skis:n:take match:light red statue:put wax on match:take skis off:swim:s:d:d:w:u:u:n:n:u:light match:light red statue:lift left end of plank:pull chain:burn rope:stand on right end of plank:wait:blow statue out:drop skis:drop statue:take ladder and flashlight:d:hang ladder on hooks:examine safe:turn dial left 4:turn dial right 5:turn dial left 7:open safe:take film:u:s:e:s:w:s:s:w:drop film:call 576-3190:n:w:d:take toupee:take peg and note:read note:u:e:e:s:u:s:put peg in hole:get gun:shoot herman:get sword:kill herman with sword:get shears:kill herman with shears:untie hildegarde:",255,0 } else { !text 255,"turn statue w:turn it e:turn it n:n:open door:n:turn flashlight on:n:examine model:press green:g:g:press black:g:press white:g:press green:g:g:press black:press blue:press green:g:g:g:press red:g:g:take ring:e:e:take yellow card:s:take slide:put it in slide projector:turn slide projector on:focus slide projector:take film:examine film projector:remove cap:drop it:put film in film projector:turn film projector on:examine screen:n:w:w:s:e:e:examine piano:open lid:take violet card:play tomorrow:push piano n:d:s:take dirty pillar:n:u:push piano s:g:d:n:take meter:s:u:drop pillar:w:w:w:drop ring:drop meter:e:drop yellow and violet:n:drop letter and photo:s:w:enter fireplace:take brick and drop it:u:u:u:e:d:take penguin:u:w:d:d:d:take indigo card:e:drop penguin:e:drop indigo:w:examine red statue:examine white statue:examine blue statue:e:e:move painting:take green card:examine safe:turn dial right 3:turn dial left 7:turn dial right 5:open safe:take grater:w:drop green:w:drop grater:e:open closet:enter closet:pull third peg:open door:n:examine newel:turn newel:e:take sack:open window:open sack:take finch:drop sack:w:w:s:move mat:take red card:n:e:s:pull second peg:open door:n:drop red:w:drop finch:e:enter closet:take bucket:n:n:unlock patio door:open door:n:take orange card:e:n:n:examine cannon:fill bucket with water:e:s:w:s:s:enter closet:hang bucket on third peg:n:u:open closet:s:wait:wait:open door:n:open panel:open trunk:take hydrant:d:d:w:drop hydrant:e:take all:n:w:w:d:open door:s:take blue card:n:turn computer on:examine it:put red in slot:put yellow in slot:put orange in slot:put green in slot:put blue in slot:put indigo in slot:put violet in slot:examine display:u:take matchbox:open it:take match:drop matchbox:e:e:n:e:n:n:take cannon ball:put it in cannon:light match:light fuse:open compartment:take mask:e:s:w:s:s:w:drop mask:e:s:open mailbox:take yellowed piece of paper:take card:examine card:drop card:n:n:w:take thin:e:n:n:nw:take shovel:ne:n:put thin on yellowed:n:w:n:w:n:w:s:w:w:n:w:s:e:s:e:n:e:s:w:n:w:s:w:n:w:s:w:n:e:n:e:n:e:e:n:e:s:e:e:s:e:n:e:n:e:s:w:s:w:s:e:n:w:s:dig ground with shovel:take stamp:n:e:s:w:n:e:n:e:n:w:s:w:s:w:n:w:w:n:w:s:w:w:s:w:s:w:s:e:n:e:s:e:n:e:s:e:n:w:s:w:n:w:n:e:s:e:e:n:e:s:e:s:e:s:w:s:e:s:s:w:drop stamp:e:drop all except flashlight:w:take red statuette:e:u:open door:enter closet:take skis:n:d:n:n:e:n:n:n:drop flashlight:s:e:e:wear skis:n:take match:light red statue:put wax on match:take skis off:swim:s:d:d:w:u:u:n:n:u:light match:light red statue:lift left end of plank:pull chain:burn rope:stand on right end of plank:wait:blow statue out:drop skis:drop statue:take ladder and flashlight:d:hang ladder on hooks:examine safe:turn dial left 4:turn dial right 5:turn dial left 7:open safe:take film:u:s:e:s:w:s:s:w:drop film:call 576-3190:n:w:d:take toupee:take peg and note:read note:u:e:e:s:u:s:put peg in hole:get gun:shoot herman:get sword:kill herman with sword:get shears:kill herman with shears:untie hildegarde:",255,0 } benchmark_read_char lda benchmark_commands beq +++ inc benchmark_read_char + 1 bne + inc benchmark_read_char + 2 + cmp #255 beq ++ sta .petscii_char_read jsr translate_petscii_to_zscii +++ rts ++ jsr dollar !ifndef ACORN { lda $a0 jsr print_byte_as_hex lda $a1 jsr print_byte_as_hex lda $a2 } else { jsr kernal_readtime pha tya jsr print_byte_as_hex txa jsr print_byte_as_hex pla } jsr print_byte_as_hex jsr space jsr printchar_flush lda #13 rts } z_ins_print_char ; lda #0 ; sta alphabet_offset ; sta escape_char_counter ; sta abbreviation_command lda z_operand_value_low_arr ; jsr invert_case ; jsr translate_zscii_to_petscii jmp streams_print_output z_ins_new_line lda #13 jmp streams_print_output !ifdef Z4PLUS { z_ins_read_char ; read_char 1 [time routine] -> (result) ; ignore argument 0 (always 1) ; ldy z_operand_value_low_arr ; optional time routine arguments jsr printchar_flush jsr turn_on_cursor ldy #0 tya sty .read_text_time sty .read_text_time + 1 ldy z_operand_count cpy #3 bne .read_char_loop ldy z_operand_value_high_arr + 1 sty .read_text_time ldy z_operand_value_low_arr + 1 sty .read_text_time + 1 ldy z_operand_value_high_arr + 2 sty .read_text_routine ldy z_operand_value_low_arr + 2 sty .read_text_routine + 1 !ifndef ACORN { !ifdef USE_BLINKING_CURSOR { jsr init_cursor_timer } } jsr init_read_text_timer .read_char_loop jsr read_char cmp #0 beq .read_char_loop ; timer routine returned false pha jsr turn_off_cursor ; lda current_window ; bne .no_need_to_start_buffering ; lda is_buffered_window ; beq .no_need_to_start_buffering jsr start_buffering ; .no_need_to_start_buffering pla cmp #1 bne + lda #0 ; time routine returned true, and read_char should return 0 + tax lda #0 jmp z_store_result } !ifdef Z5PLUS { z_ins_tokenise_text ; tokenise text parse dictionary flag ; setup string_array ldx z_operand_value_low_arr lda z_operand_value_high_arr stx string_array clc adc #>story_start sta string_array + 1 ; setup user dictionary, if supplied lda z_operand_count cmp #3 bcc .no_user_dictionary ldx z_operand_value_low_arr + 2 txa ora z_operand_value_high_arr + 2 beq .no_user_dictionary ; user dictionary lda z_operand_value_high_arr + 2 ; X is already set jsr parse_user_dictionary jmp .tokenise_main .no_user_dictionary ; Setup default dictionary lda dict_is_default bne + jsr parse_default_dictionary + .tokenise_main ; setup parse_array and flag ldy #0 lda z_operand_count cmp #4 bcc .flag_set ldy z_operand_value_low_arr + 3 .flag_set ldx z_operand_value_low_arr + 1 lda z_operand_value_high_arr + 1 jmp tokenise_text ; SFTODO +make_acorn_screen_hole z_ins_encode_text ; encode_text zscii-text length from coded-text ; setup string_array ldx z_operand_value_low_arr lda z_operand_value_high_arr stx string_array clc adc #>story_start sta string_array + 1 ; setup length (seems okay to ignore) ; ldx z_operand_value_low_arr + 1 ; setup from ldx z_operand_value_low_arr + 2 stx .wordstart ; do the deed jsr encode_text ; save result ldx z_operand_value_low_arr + 3 lda z_operand_value_high_arr + 3 stx string_array clc adc #>story_start sta string_array + 1 ldy #0 - lda zword,y sta (string_array),y iny cpy #6 bne - rts } z_ins_print_addr ldx z_operand_value_low_arr lda z_operand_value_high_arr jsr set_z_address jmp print_addr z_ins_print_paddr ; Packed address is now in (z_operand_value_high_arr, z_operand_value_low_arr) lda z_operand_value_high_arr ldx z_operand_value_low_arr jsr set_z_paddress jmp print_addr z_ins_print ldy z_pc lda z_pc + 1 ldx z_pc + 2 jsr set_z_himem_address jsr print_addr jsr get_z_himem_address stx zp_temp tax tya ldy zp_temp jmp set_z_pc z_ins_print_ret jsr z_ins_print lda #$0d jsr streams_print_output lda #0 ldx #1 jmp stack_return_from_routine ; ============================= New unified read instruction z_ins_read ; z3: sread text parse ; z4: sread text parse time routine ; z5: aread text parse time routine -> (result) jsr printchar_flush !ifdef ACORN_CURSOR_PASS_THROUGH { !ifdef ACORN_CURSOR_EDIT_READ { ; Since we're reading a line of text here, we temporarily re-enable cursor ; editing. jsr do_osbyte_set_cursor_editing_x_0 } } !ifdef Z3 { ; Z1 - Z3 should redraw the status line before input jsr draw_status_line } !ifdef Z4PLUS { ; arguments that need to be copied to their own locations because there *may* be a timed interrupt call ldx z_operand_count stx .read_text_operand_count ldy z_operand_value_low_arr + 1 sty .read_parse_buffer ldy z_operand_value_high_arr + 1 sty .read_parse_buffer + 1 lda #0 tay cpx #3 bcc + ; time and routine are omitted ldy z_operand_value_high_arr + 3 sty .read_text_routine ldy z_operand_value_low_arr + 3 sty .read_text_routine + 1 lda z_operand_value_high_arr + 2 ldy z_operand_value_low_arr + 2 + sta .read_text_time sty .read_text_time + 1 } ; Read input lda z_operand_value_high_arr ldx z_operand_value_low_arr jsr read_text !ifdef TRACE_READTEXT { jsr print_following_string !ifndef ACORN { !pet "read_text ",0 } else { !text "read_text ",0 } ldx z_operand_value_low_arr lda z_operand_value_high_arr jsr printx jsr space jsr printa jsr colon ldx string_array lda string_array+1 jsr printx jsr space jsr printa !ifdef Z5PLUS { jsr colon lda .read_text_return_value jsr printa } jsr newline ldy #0 - lda (string_array),y jsr printa jsr space iny cpy #10 bne - jsr newline } !ifdef Z5PLUS { ; parse it as well? In Z5, this can be avoided by setting parse to 0 ldx .read_text_operand_count cpx #2 bcc .read_done lda .read_parse_buffer ora .read_parse_buffer + 1 beq .read_done ; Setup default dictionary lda dict_is_default bne + jsr parse_default_dictionary + } !ifdef Z3 { lda z_operand_value_high_arr + 1 ldx z_operand_value_low_arr + 1 } else { lda .read_parse_buffer + 1 ldx .read_parse_buffer } ldy #0 jsr tokenise_text !ifdef TRACE_TOKENISE { ldy #0 - lda (parse_array),y jsr printa jsr space iny cpy #10 bne - jsr newline } .read_done !ifdef ACORN_CURSOR_PASS_THROUGH { !ifdef ACORN_CURSOR_EDIT_READ { ldx #1 jsr do_osbyte_set_cursor_editing } } jsr start_buffering ; debug - print parsearray !ifdef TRACE_PRINT_ARRAYS { ldy #0 - lda (string_array),y tax jsr printx lda #$20 jsr streams_print_output iny cpy #12 bne - lda #$0d jsr streams_print_output ldy #0 - lda (parse_array),y tax jsr printx lda #$20 jsr streams_print_output iny cpy #16 bne - lda #$0d jsr streams_print_output } !ifdef DEBUG { !ifdef PREOPT { jsr print_following_string !raw "[preopt mode. type xxx to exit early.]",13,0 !ifdef Z5PLUS { ldy #2 } else { ldy #1 } .check_next_preopt_exit_char lda (string_array),y cmp #$78 bne .not_preopt_exit iny !ifdef Z5PLUS { cpy #5 } else { cpy #4 } bne .check_next_preopt_exit_char ; Exit PREOPT mode ldx #1 jmp print_optimized_vm_map .not_preopt_exit } } !ifdef Z5PLUS { lda #0 ldx .read_text_return_value jmp z_store_result } else { rts } ; ============================= End of new unified read instruction !ifdef Z5PLUS { z_ins_check_unicode lda #0 tax jmp z_store_result z_ins_print_unicode lda #$28 ; ( jsr streams_print_output lda #$23 ; # jsr streams_print_output jsr print_num_unsigned lda #$29 ; ) jmp streams_print_output } convert_zchar_to_char ; input: a=zchar ; output: a=char ; side effects: ; used registers: a,y cmp #$20 beq +++ cmp #6 bcc +++ sec sbc #6 clc adc alphabet_offset tay lda (alphabet_table),y +++ rts translate_petscii_to_zscii ldx #character_translation_table_in_end - character_translation_table_in - 1 - cmp character_translation_table_in,x bcc .no_match beq .translation_match dex dex bpl - .no_match ; cmp #$60 ; bcc .no_shadow ; cmp #$80 ; bcs .no_shadow ; eor #$a0 ; .no_shadow !ifndef ACORN { cmp #$41 bcc .case_conversion_done cmp #$5b bcs .not_lower_case ; Lower case. $41 -> $61 ora #$20 bcc .case_conversion_done .not_lower_case cmp #$c1 bcc .case_conversion_done cmp #$db bcs .case_conversion_done ; Upper case. $c1 -> $41 and #$7f .case_conversion_done } rts .translation_match dex lda character_translation_table_in,x rts convert_char_to_zchar ; input: a=char ; output: store zchars in z_temp,x. Increase x. Exit if x >= ZCHARS_PER_ENTRY ; side effects: ; used registers: a,x ; NOTE: This routine can't convert space (code 0) or newline (code 7 in A2) properly, but there's no need to either. ; jsr translate_petscii_to_zscii sty zp_temp + 4 ldy #0 - cmp (alphabet_table),y beq .found_char_in_alphabet iny cpy #26*3 bne - ; Char is not in alphabet pha lda #5 sta z_temp,x inx lda #6 sta z_temp,x inx pla pha lsr lsr lsr lsr lsr sta z_temp,x pla and #%00011111 inx bne .store_last_char ; Always branch ; tax ; !ifdef DEBUG { ; jsr printx ; } ; lda #ERROR_INVALID_CHAR ; jsr fatalerror .found_char_in_alphabet cpy #26 bcc .found_in_a0 lda #4 ; Shift to A1 cpy #26*2 bcc .found_in_a1 lda #5 ; Shift to A2 .found_in_a1 ; stx zp_temp + 3 ; ldx zp_temp + 4 sta z_temp,x inx sty zp_temp + 2 ; Remember old Y value tay ; Holds 4 for A1 or 5 for A2 lda zp_temp + 2 - sec sbc #26 dey cpy #4 bcs - ; ldy zp_temp + 2 ; Restore old Y value tay .found_in_a0 tya clc adc #6 ; ldx zp_temp + 4 .store_last_char sta z_temp,x inx .convert_return ldy zp_temp + 4 rts .first_word = z_temp ; !byte 0,0 .last_word = z_temp + 2 ; !byte 0,0 .median_word = z_temp + 4 ; !byte 0,0 .final_word = zp_temp; !byte 0 .is_word_found = zp_temp + 1 ; !byte 0 .triplet_counter = zp_temp + 2; !byte 0 ; SFTODODATA 2 .last_char_index !byte 0 .parse_array_index !byte 0 .dictionary_address = zp_temp + 3 ; !byte 0,0 ; .zword !byte 0,0,0,0,0,0 !ifdef Z4PLUS { ZCHARS_PER_ENTRY = 9 } else { ZCHARS_PER_ENTRY = 6 } ZCHAR_BYTES_PER_ENTRY = ZCHARS_PER_ENTRY * 2 / 3 ZWORD_OFFSET = 6 - ZCHAR_BYTES_PER_ENTRY encode_text ; input .wordstart ; registers: a,x,y ; side effects: .last_char_index, .triplet_counter, zword ldy .wordstart ; Pointer to current character ldx #0 ; Next position in z_temp - lda (string_array),y jsr convert_char_to_zchar cpx #ZCHARS_PER_ENTRY bcs .done_converting_to_zchars iny cpy .wordend bcc - ; Pad rest of word lda #5 ; Pad character - sta z_temp,x inx cpx #ZCHARS_PER_ENTRY bcc - .done_converting_to_zchars ldx #0 ; x = start of current triplet ldy #0 ; Pointer to next character in buffer - lda z_temp,y sta zword + ZWORD_OFFSET,x iny lda z_temp,y asl asl asl asl rol zword + ZWORD_OFFSET,x asl rol zword + ZWORD_OFFSET,x iny ora z_temp,y sta zword + ZWORD_OFFSET + 1,x iny inx inx cpx #(2 * (ZCHARS_PER_ENTRY / 3)) bcc - lda zword + 4 ora #$80 sta zword + 4 rts ; SFTODO +make_acorn_screen_hole find_word_in_dictionary ; convert word to zchars and find it in the dictionary ; see: http://inform-fiction.org/zmachine/standards/z1point1/sect13.html ; http://inform-fiction.org/manual/html/s2.html#s2_5 ; input: ; y = index in parse_array to store result in ; parse_array = indirect address to parse_array ; string_array = indirect address to string being parsed ; .wordstart = index in string_array to first char of current word ; .wordend = index in string_array to last char of current word ; output: puts address in parse_array[y] and parse_array[y+1] ; side effects: ; used registers: a,x sty .parse_array_index ; store away the index for later ; lda #0 ; ldx #5 ; - sta .zword,x ; clear zword buffer ; dex ; bpl - lda #1 sta .is_word_found ; assume success until proven otherwise jsr encode_text !ifdef TRACE_TOKENISE { ; print zword (6 or 9 bytes) jsr newline ldx zword jsr printx jsr comma ldx zword + 1 jsr printx jsr comma ldx zword + 2 jsr printx jsr comma ldx zword + 3 jsr printx jsr comma ldx zword + 4 jsr printx jsr comma ldx zword + 5 jsr printx jsr newline } ; find entry in dictionary, using binary search ; Step 1: Set start and end of dictionary lda #0 sta .final_word sta .first_word sta .first_word + 1 lda dict_num_entries + 1 ; This is stored High-endian tax ora dict_num_entries ; This is stored High-endian bne + jmp .no_entry_found + txa sec sbc #1 sta .last_word lda dict_num_entries sbc #0 sta .last_word + 1 !ifdef Z5PLUS { lda dict_ordered bne .loop_check_next_entry jmp .find_word_in_unordered_dictionary } ; Step 2: Calculate the median word .loop_check_next_entry lda .last_word cmp .first_word bne .more_than_one_word ldx .last_word + 1 cpx .first_word + 1 bne .more_than_one_word ; This is the last possible word that can match dec .final_word ; Signal that this is the last possible word .more_than_one_word sec sbc .first_word tax lda .last_word + 1 sbc .first_word + 1 lsr tay txa ror clc adc .first_word sta .median_word sta multiplicand tya adc .first_word + 1 sta .median_word + 1 sta multiplicand + 1 ; Step 3: Set the address of the median word lda dict_len_entries sta multiplier lda #0 sta multiplier + 1 jsr mult16 lda product clc adc dict_entries tax lda product + 1 adc dict_entries + 1 sta .dictionary_address stx .dictionary_address + 1 jsr set_z_address ; show the dictonary word !ifdef TRACE_SHOW_DICT_ENTRIES { jsr dollar lda .dictionary_address jsr print_byte_as_hex lda .dictionary_address + 1 jsr print_byte_as_hex ; lda z_address + 2 ; jsr print_byte_as_hex jsr space ; jsr pause lda z_address + 1 pha lda z_address + 2 pha ; lda z_address+1 ; jsr printa ; jsr comma ; lda z_address+2 ; jsr printa jsr print_addr pla sta z_address + 2 pla sta z_address + 1 } ; check if correct entry ldy #0 .loop_check_entry jsr read_next_byte ; !ifdef TRACE_SHOW_DICT_ENTRIES { ; jsr printa ; jsr space ; } !ifdef Z4PLUS { cmp zword,y } else { cmp zword + 2,y } bne .zchars_differ iny cpy #ZCHAR_BYTES_PER_ENTRY bne .loop_check_entry beq .found_dict_entry ; Always branch .zchars_differ php lda .final_word beq .not_final_word plp bne .no_entry_found ; Always branch .not_final_word plp bcs .larger_than_sought_word ; The median word is smaller than the sought word !ifdef TRACE_SHOW_DICT_ENTRIES { lda #60 jsr streams_print_output jsr newline } lda .median_word clc adc #1 sta .first_word lda .median_word + 1 adc #0 sta .first_word + 1 jmp .loop_check_next_entry ; Always branch .larger_than_sought_word ; The median word is larger than the sought word !ifdef TRACE_SHOW_DICT_ENTRIES { lda #62 jsr streams_print_output jsr newline } lda .median_word cmp .first_word bne .median_is_not_first ldy .median_word + 1 cpy .first_word + 1 beq .no_entry_found .median_is_not_first sec sbc #1 sta .last_word lda .median_word + 1 sbc #0 sta .last_word + 1 jmp .loop_check_next_entry ; Always branch ; no entry found .no_entry_found !ifdef TRACE_SHOW_DICT_ENTRIES { lda #60 jsr streams_print_output lda #62 jsr streams_print_output jsr newline } lda #0 sta .dictionary_address sta .dictionary_address + 1 sta .is_word_found lda .ignore_unknown_words beq .store_find_result ldy .parse_array_index iny iny rts ; After adding an rts above, the following code can't be reached anyway. ;!ifdef TRACE_SHOW_DICT_ENTRIES { ; beq .store_find_result ; Only needed if TRACE_SHOW_DICT_ENTRIES is set ;} .found_dict_entry ; store result into parse_array and exit !ifdef TRACE_SHOW_DICT_ENTRIES { lda #61 jsr streams_print_output jsr newline } .store_find_result ldy .parse_array_index lda .dictionary_address sta (parse_array),y iny lda .dictionary_address + 1 sta (parse_array),y iny rts !ifdef Z5PLUS { .find_word_in_unordered_dictionary ; In the end, jump to either .found_dict_entry or .no_entry_found ldx dict_entries stx .dictionary_address + 1 ; Stored with high-byte first! lda dict_entries + 1 sta .dictionary_address ; Stored with high-byte first! .unordered_check_next_word jsr set_z_address ; check if correct entry ldy #0 .unordered_loop_check_entry jsr read_next_byte !ifdef Z4PLUS { cmp zword,y } else { cmp zword + 2,y } bne .unordered_not_a_match iny cpy #ZCHAR_BYTES_PER_ENTRY bne .unordered_loop_check_entry beq .found_dict_entry ; Always branch .unordered_not_a_match inc .first_word bne + inc .first_word + 1 + lda .last_word cmp .first_word lda .last_word + 1 sbc .first_word + 1 bcc + ; No more words to check lda .dictionary_address + 1 clc adc dict_len_entries tax sta .dictionary_address + 1 lda .dictionary_address adc #0 sta .dictionary_address bcc .unordered_check_next_word ; Always branch + bcs .no_entry_found ; Always branch } ; End of !ifdef Z5PLUS !ifndef ACORN { !ifdef USE_BLINKING_CURSOR { init_cursor_timer lda #0 sta s_cursormode ; calculate timer interval in jiffys (1/60 second NTSC, 1/50 second PAL) sta .cursor_time_jiffy sta .cursor_time_jiffy + 1 lda USE_BLINKING_CURSOR sta .cursor_time_jiffy + 2 update_cursor_timer ; calculate when the next cursor update occurs jsr kernal_readtime ; read current time (in jiffys) clc adc .cursor_time_jiffy + 2 sta .cursor_jiffy + 2 txa adc .cursor_time_jiffy + 1 sta .cursor_jiffy + 1 tya adc .cursor_time_jiffy sta .cursor_jiffy rts } } !ifdef Z4PLUS { init_read_text_timer lda .read_text_time ora .read_text_time + 1 bne + rts ; no timer + ; calculate timer interval in jiffys (1/60 second NTSC, 1/50 second PAL) lda .read_text_time sta multiplier + 1 lda .read_text_time + 1 sta multiplier lda #0 sta multiplicand + 1 !ifndef ACORN { lda #6 } else { lda #5 ; our kernal_readtime uses 1/50 second jiffys } sta multiplicand ; t*6 to get jiffies jsr mult16 lda product sta .read_text_time_jiffy + 2 lda product + 1 sta .read_text_time_jiffy + 1 lda product + 2 sta .read_text_time_jiffy update_read_text_timer ; prepare time for next routine call (current time + time_jiffy) jsr kernal_readtime ; read current time (in jiffys) clc adc .read_text_time_jiffy + 2 sta .read_text_jiffy + 2 txa adc .read_text_time_jiffy + 1 sta .read_text_jiffy + 1 tya adc .read_text_time_jiffy sta .read_text_jiffy rts } getchar_and_maybe_toggle_darkmode !ifndef ACORN { !ifdef NODARKMODE { jmp kernal_getchar } else { jsr kernal_getchar cmp #133 bne + jsr toggle_darkmode ldx #40 ; Side effect to help when called from MORE prompt lda #0 + rts } } else { ; ACORN ; In non-teletext modes, copying characters with COPY will only work if they ; share the current OS foreground and background colours. There's a fair ; chance the OS colours are still set to reverse video from drawing the ; status bar; s_printchar would set these correctly the next time it's ; called, but we need to make sure this is right now so COPY works. (We ; can't make this work perfectly if the game mixes normal and reverse video ; a lot, but this will fix things for the typical game anyway.) jsr s_reverse_to_os_reverse !ifndef ACORN_OSRDCH { lda #osbyte_read_key ldx #0 jsr do_osbyte_y_0 bcc + ldx #0 + txa } else { ; Some emulators (e.g. BeebEm 4.15) don't allow text to be pasted in unless ; it's read via OSRDCH, so we allow the use of OSRDCH as a workaround. This ; will break games which rely on timers being able to break into user ; input. jsr osrdch } jmp check_user_interface_controls } read_char ; return: 0,1: return value of routine (false, true) ; any other number: char value !ifdef BENCHMARK { jsr benchmark_read_char cmp #0 beq + cmp #58 ; colon bne ++ lda #13 ++ rts + } !ifndef ACORN { !ifdef USE_BLINKING_CURSOR { ; check if time for to update the blinking cursor ; http://www.6502.org/tutorials/compare_beyond.html#2.2 jsr kernal_readtime ; read start time (in jiffys) in a,x,y (low to high) cmp .cursor_jiffy + 2 txa sbc .cursor_jiffy + 1 tya sbc .cursor_jiffy bcc .no_cursor_blink ; blink the cursor ; ; set up next time out jsr update_cursor_timer ; cursor on/off depending on if s_cursormode is even/odd lda #CURSORCHAR ; cursor on sta cursor_character jsr update_cursor inc s_cursormode lda s_cursormode and #$01 beq .no_cursor_blink lda #$20 ; blank space, cursor off sta cursor_character jsr update_cursor .no_cursor_blink } } !ifdef Z4PLUS { ; check if time for routine call ; http://www.6502.org/tutorials/compare_beyond.html#2.2 lda .read_text_time ora .read_text_time + 1 beq .no_timer jsr kernal_readtime ; read start time (in jiffys) in a,x,y (low to high) cmp .read_text_jiffy + 2 txa sbc .read_text_jiffy + 1 tya sbc .read_text_jiffy bcc .no_timer .call_routine ; current time >= .read_text_jiffy. Time to call routine jsr turn_off_cursor lda .read_text_routine sta z_operand_value_high_arr ldx .read_text_routine + 1 stx z_operand_value_low_arr lda #z_exe_mode_return_from_read_interrupt ldx #0 ldy #0 jsr stack_call_routine ; let the interrupt routine start, so we need to rts. jsr z_execute ; Restore buffering setting ; lda .text_tmp ; sta is_buffered_window jsr printchar_flush jsr turn_on_cursor ; Interrupt routine has been executed, with value in word ; z_interrupt_return_value ; set up next time out jsr update_read_text_timer ; just return the value: 0 or 1 (true or false) lda z_interrupt_return_value ora z_interrupt_return_value + 1 beq + lda #1 + rts } .no_timer jsr getchar_and_maybe_toggle_darkmode cmp #$00 beq read_char sta .petscii_char_read jmp translate_petscii_to_zscii !ifndef ACORN { s_cursorswitch !byte 0 !ifdef USE_BLINKING_CURSOR { s_cursormode !byte 0 } turn_on_cursor lda #1 sta s_cursorswitch bne update_cursor ; always branch turn_off_cursor lda #0 sta s_cursorswitch update_cursor sty object_temp ldy zp_screencolumn lda s_cursorswitch bne + ; no cursor lda (zp_screenline),y and #$7f sta (zp_screenline),y ldy object_temp rts + ; cursor lda cursor_character sta (zp_screenline),y lda current_cursor_colour sta (zp_colourline),y ldy object_temp rts } !ifndef ACORN { !ifdef USE_BLINKING_CURSOR { reset_cursor_blink ; resets the cursor timer and blink mode ; effectively puts the cursor back on the screen for another timer duration lda #$00 sta .cursor_jiffy sta .cursor_jiffy + 1 sta .cursor_jiffy + 2 lda #$01 sta s_cursormode rts } } ; SFTODO +make_acorn_screen_hole read_text ; read line from keyboard into an array (address: a/x) ; See also: http://inform-fiction.org/manual/html/s2.html#p54 ; input: a,x, .read_text_time (Z4PLUS), .read_text_routine (Z4PLUS) ; output: string_array, .read_text_return_value (Z5PLUS) ; side effects: zp_screencolumn, zp_screenline, .read_text_jiffy ; used registers: a,x,y stx string_array clc adc #>story_start sta string_array + 1 jsr printchar_flush ; clear [More] counter jsr clear_num_rows !ifndef ACORN { !ifdef USE_BLINKING_CURSOR { jsr init_cursor_timer } } !ifdef Z4PLUS { ; check timer usage jsr init_read_text_timer } ldy #0 lda (string_array),y !ifdef Z5PLUS { tax inx stx .read_text_char_limit } else { sta .read_text_char_limit } ; store start column iny !ifdef Z5PLUS { tya clc adc (string_array),y } else { lda #0 sta (string_array),y ; default is empty string (0 in pos 1) tya } sta .read_text_column ; turn on blinking cursor jsr turn_on_cursor .readkey jsr get_cursor ; x=row, y=column stx .read_text_cursor sty .read_text_cursor + 1 jsr read_char cmp #0 bne + ; timer routine returned false ; did the routine draw something on the screen? jsr get_cursor ; x=row, y=column cpy .read_text_cursor + 1 beq .readkey ; text changed, redraw input line jsr turn_off_cursor jsr clear_num_rows !ifdef Z5PLUS { ; lda #$0d ; Enter ; jsr s_printchar ; lda #$3e ; ">" ; jsr s_printchar ldy #1 lda (string_array),y tax .p0 cpx #0 beq .p1 iny lda (string_array),y jsr translate_zscii_to_petscii !ifdef DEBUG { bcc .could_convert cmp #0 beq .done_printing_this_char jsr print_bad_zscii_code jmp .done_printing_this_char .could_convert } else { bcs .done_printing_this_char } jsr s_printchar !ifndef ACORN { !ifdef USE_BLINKING_CURSOR { jsr reset_cursor_blink } } .done_printing_this_char dex jmp .p0 .p1 } else { ldy #1 .p0 lda (string_array),y ; default is empty string (0 in pos 1) beq .p1 jsr translate_zscii_to_petscii !ifdef DEBUG { bcc .could_convert cmp #0 beq .done_printing_this_char jsr print_bad_zscii_code jmp .done_printing_this_char .could_convert } else { bcs .done_printing_this_char } jsr s_printchar !ifndef ACORN { !ifdef USE_BLINKING_CURSOR { jsr reset_cursor_blink } } .done_printing_this_char iny jmp .p0 .p1 } jsr turn_on_cursor jmp .readkey + cmp #1 bne + ; timer routine returned true ; clear input and return ldy #1 lda #0 sta (string_array),y jmp .read_text_done ; a should hold 0 to return 0 here ; check terminating characters + ldy #0 - cmp terminating_characters,y beq .read_text_done iny cpy num_terminating_characters bne - + cmp #8 ; SF: ZSCII delete bne + ; allow delete if anything in the buffer ldy .read_text_column cpy #2 bcc .readkey dec .read_text_column !ifndef ACORN { jsr turn_off_cursor } lda .petscii_char_read jsr s_printchar ; print the delete char !ifndef ACORN { !ifdef USE_BLINKING_CURSOR { jsr reset_cursor_blink } jsr turn_on_cursor } !ifdef Z5PLUS { ldy #1 lda (string_array),y ; number of characters in the array sec sbc #1 sta (string_array),y } jmp .readkey ; don't store in the array + ; disallow cursor keys etc ; SF: Note that this is part of read_text, used only by z_ins_read, and ; therefore we are reading a line of text here. The following code will ; filter out superficially interesting things like Escape and function keys, ; but as we're just reading a line of text that's probably OK. This is ; upstream code anyway and we're in the ZSCII world here, so this is ; presumably well tested. (ozmoo doesn't appear to support custom ; terminating characters in Z5, so some of the more exotic possibilities are ; probably not relevant in practice.) Although I doubt there's the memory to ; do it properly, this would probably also mean we could implement history ; recall/editing using the cursor keys here without preventing the ; possibility of a game using the cursor keys for its own purposes, as the ; game would probably read them using z_ins_read_char. SFTODO: UPDATE THIS COMMENT cmp #32 bcs ++ jmp .readkey ++ cmp #128 bcc .char_is_ok cmp #155 bpl + jmp .readkey + cmp #252 bcc .char_is_ok jmp .readkey ; print the allowed char and store in the array .char_is_ok ldx .read_text_column ; compare with size of keybuffer cpx .read_text_char_limit bcc + jmp .readkey + ; keybuffer < maxchars pha txa !ifdef Z5PLUS { ldy #1 sta (string_array),y ; number of characters in the array } tay !ifdef Z5PLUS { iny } lda .petscii_char_read jsr s_printchar !ifndef ACORN { !ifdef USE_BLINKING_CURSOR { jsr reset_cursor_blink } jsr update_cursor } pla ; convert to lower case ; SF: We are working with ZSCII here, so this is nothing to do with PETSCII. ; I suspect this is done to comply with 3.7 of the Z-machine specification. cmp #$41 bcc .dont_invert_case cmp #$5b bcs .dont_invert_case ora #$20 .dont_invert_case sta (string_array),y ; store new character in the array inc .read_text_column !ifndef Z5PLUS { iny lda #0 sta (string_array),y ; store 0 after last char } jmp .readkey .read_text_done pha ; the terminating character, usually newline !ifdef Z5PLUS { sta .read_text_return_value } ; turn off blinking cursor jsr turn_off_cursor !ifndef Z5PLUS { ; Store terminating 0, in case characters were deleted at the end. ldy .read_text_column ; compare with size of keybuffer lda #0 sta (string_array),y } pla ; the terminating character, usually newline beq + jsr s_printchar; print terminating char unless 0 (0 indicates timer abort) !ifndef ACORN { !ifdef USE_BLINKING_CURSOR { jsr reset_cursor_blink } } ; jsr start_buffering + rts ; SFTODODATA 7+10 .read_parse_buffer !byte 0,0 .read_text_cursor !byte 0,0 .read_text_column !byte 0 .read_text_char_limit !byte 0 .read_text_operand_count !byte 0 !ifdef Z4PLUS { .read_text_time !byte 0,0 ; update interval in 1/10 seconds .read_text_time_jiffy !byte 0,0,0 ; update interval in jiffys .read_text_jiffy !byte 0,0,0 ; current time .read_text_routine !byte 0,0 ; called with .read_text_time intervals } !ifdef Z5PLUS { .read_text_return_value !byte 0 ; return value } !ifndef ACORN { !ifdef USE_BLINKING_CURSOR { .cursor_jiffy !byte 0,0,0 ; next cursor update time .cursor_time_jiffy !byte 0,0,0 ; time between cursor updates } } ; SFTODO +make_acorn_screen_hole tokenise_text ; divide read_line input into words and look up them in the dictionary ; input: string_array should be pointing to the text array ; (this will be okay if called immediately after read_text) ; a/x should be the address of the parse array ; input: - string_array ; - x,a: address of parse_array ; - y: flag (1 = don't add unknown words to parse_array) ; output: parse_array ; side effects: ; used registers: a,x,y sty .ignore_unknown_words stx parse_array clc adc #>story_start sta parse_array + 1 lda #2 sta .wordoffset ; where to store the next word in parse_array ldy #0 sty .numwords ; no words found yet lda (parse_array),y sta .maxwords !ifdef Z5PLUS { iny lda (string_array),y ; number of chars in text string tax inx stx .textend iny ; sets y to 2 = start position in text } else { - iny lda (string_array),y bne - dey sty .textend ldy #1 ; start position in text } ; look over text and find each word .find_word_loop ; skip initial space cpy .textend beq + bcs .parsing_done + lda (string_array),y cmp #$20 bne .start_of_word iny bne .find_word_loop ; Always branch .start_of_word ; start of next word found (y is first character of new word) sty .wordstart - ; look for the end of the word lda (string_array),y cmp #$20 beq .space_found ; check for terminators ldx num_terminators -- cmp terminators - 1,x beq .terminator_found dex bne -- ; check if end of string cpy .textend bcs .word_found iny bne - ; Always branch .terminator_found cpy .wordstart beq .word_found .space_found dey .word_found ; word found. Look it up in the dictionary iny sty .wordend ; .wordend is the last character of the word + 1 ; update parse_array lda .wordoffset tay clc adc #4 sta .wordoffset jsr find_word_in_dictionary ; will update y inc .numwords lda .is_word_found bne .store_word_in_parse_array lda .ignore_unknown_words bne .find_next_word ; word unknown, and we shouldn't store unknown words .store_word_in_parse_array lda .wordend sec sbc .wordstart sta (parse_array),y ; length iny lda .wordstart sta (parse_array),y ; start index ; find the next word .find_next_word ldy #1 lda .numwords sta (parse_array),y ; num of words ldy .wordend lda .numwords cmp .maxwords bne .find_word_loop .parsing_done lda .numwords ldy #1 sta (parse_array),y rts ;SFTODODATA 7 .maxwords !byte 0 .numwords !byte 0 .wordoffset !byte 0 .textend !byte 0 .wordstart !byte 0 .wordend !byte 0 .ignore_unknown_words !byte 0 get_next_zchar ; returns the next zchar in a ; side effects: z_address ; used registers: a,x,y ldx zchar_triplet_cnt cpx #2 bne .just_read ; extract 3 zchars (5 bits each) ; stop bit remains in packed_text + 1 jsr read_next_byte sta packed_text jsr read_next_byte sta packed_text + 1 and #$1f sta zchars lda packed_text lsr ror packed_text + 1 lsr ror packed_text + 1 and #$1f sta zchars + 2 lda packed_text + 1 lsr lsr lsr sta zchars + 1 ldx #0 bit packed_text bpl + inx + stx packed_text + 1 ldx zchar_triplet_cnt .just_read lda zchars,x dex bpl + init_get_zchar ; Setup for reading zchars from packed string ; side effects: - ; used registers: x ldx #2 + stx zchar_triplet_cnt rts ; .zchar_triplet_cnt !byte 0 was_last_zchar ; only call after a get_next_zchar ; returns a=0 if current zchar is the last zchar, else > 0 lda zchar_triplet_cnt ; 0 - 2 cmp #2 bne + lda packed_text + 1 eor #1 + rts get_abbreviation_offset ; abbreviation is 32(abbreviation_command-1)+a sta .current_zchar dey tya asl asl asl asl asl clc adc .current_zchar asl ; byte -> word tay rts ;SFTODODATA 1 .current_zchar !byte 0 print_addr ; print zchar-encoded text ; input: (z_address set with set_z_addr or set_z_paddr) ; output: ; side effects: z_address ; used registers: a,x,y lda #0 sta alphabet_offset sta escape_char_counter sta abbreviation_command jsr init_get_zchar .print_chars_loop jsr get_next_zchar ldy abbreviation_command beq .l0 ; handle abbreviation jsr get_abbreviation_offset ; need to store state before calling print_addr recursively txa pha lda z_address pha lda z_address + 1 pha lda z_address + 2 pha lda zchars pha lda zchars + 1 pha lda zchars + 2 pha lda packed_text pha lda packed_text + 1 pha lda zchar_triplet_cnt pha lda story_start + header_abbreviations ; high byte ldx story_start + header_abbreviations + 1 ; low byte jsr set_z_address tya jsr skip_bytes_z_address jsr read_next_byte ; 0 pha jsr read_next_byte ; 33 tax pla jsr set_z_address ; abbreviation index is word, *2 for bytes asl z_address + 2 rol z_address + 1 rol z_address ; print the abbreviation jsr print_addr ; restore state pla sta zchar_triplet_cnt pla sta packed_text + 1 pla sta packed_text pla sta zchars + 2 pla sta zchars + 1 pla sta zchars pla sta z_address + 2 pla sta z_address + 1 pla sta z_address pla tax lda #0 sta alphabet_offset jmp .next_zchar .l0 ldy escape_char_counter beq .l0a ; handle the two characters that make up an escaped character ldy #5 - asl escape_char dey bne - ora escape_char sta escape_char dec escape_char_counter beq + jmp .next_zchar + lda escape_char ; jsr translate_zscii_to_petscii jsr streams_print_output jmp .next_zchar .l0a ; If alphabet A2, special treatment for code 6 and 7! ldy alphabet_offset cpy #52 bne .not_A2 ; newline? cmp #7 bne .l0b lda #13 bne .print_normal_char ; Always jump .l0b ; Direct jump for all normal chars in A2 bcs .l6 ; escape char? cmp #6 bne .l1 lda #2 sta escape_char_counter lda #0 sta escape_char beq .sta_offset .not_A2 cmp #6 bcs .l6 .l1 ; Space? cmp #0 bne .l2 ; space lda #$20 bne .print_normal_char ; Always jump .l2 cmp #4 bcc .abbreviation bne .l3 ; change to A1 lda #26 sta alphabet_offset jmp .next_zchar .l3 ; This can only be #5: Change to A2 ; cmp #5 ; bne .l6 ; change to A2 lda #52 sta alphabet_offset jmp .next_zchar .l5 ; abbreviation command? .abbreviation ; cmp #4 ; bcs .l6 sta abbreviation_command ; 1, 2 or 3 jmp .next_zchar .l6 ; normal char jsr convert_zchar_to_char .print_normal_char jsr streams_print_output ; change back to A0 lda #0 .sta_offset sta alphabet_offset .next_zchar jsr was_last_zchar beq + jmp .print_chars_loop + rts ; .escape_char !byte 0 ; .escape_char_counter !byte 0 ; .abbreviation_command !byte 0 ; .zchars !byte 0,0,0 ; .packedtext !byte 0,0 ; .alphabet_offset !byte 0 default_alphabet ; 26 * 3 !raw "abcdefghijklmnopqrstuvwxyz" !raw "ABCDEFGHIJKLMNOPQRSTUVWXYZ" !raw 32,13,"0123456789.,!?_#'",34,47,92,"-:()" !ifdef ACORN_OSRDCH { ; BeebEm (4.15, at least) pokes code into memory at $100 to implement paste ; via OSRDCH, so we need to relocate these buffers to avoid problems. print_buffer !fill 81 print_buffer2 !fill 81 }
24.534759
3,011
0.704163