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
347cef3226245c6fe1f11fd76331982b0b2de922
643
asm
Assembly
libsrc/oz/ozgfx/ozsavescreen.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/oz/ozgfx/ozsavescreen.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
1,600
2017-01-15T16:12:02.000Z
2022-03-31T12:11:12.000Z
libsrc/oz/ozgfx/ozsavescreen.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
215
2017-01-17T10:43:03.000Z
2022-03-23T17:25:02.000Z
; ; Sharp OZ family functions ; ; ported from the OZ-7xx SDK by by Alexander R. Pruss ; by Stefano Bodrato - Oct. 2003 ; ; ; ; ; ------ ; $Id: ozsavescreen.asm,v 1.4 2016-07-14 17:44:17 pauloscustodio Exp $ ; SECTION code_clib PUBLIC ozsavescreen PUBLIC _ozsavescreen ;EXTERN ozrestorescreen PUBLIC ozsccopy EXTERN ozactivepage EXTERN ozcopy ozsavescreen: _ozsavescreen: ld de,0 push de ld hl,968h push hl ld hl,(ozactivepage) ld d,4 ;; e=0 still ozsccopy: ld bc,2400 call ozcopy pop hl pop hl ret
16.487179
70
0.575428
e0aea000df6238a1fc14940b282070a203bc873f
29,885
asm
Assembly
base/ntos/ke/i386/spinlock.asm
npocmaka/Windows-Server-2003
5c6fe3db626b63a384230a1aa6b92ac416b0765f
[ "Unlicense" ]
17
2020-11-13T13:42:52.000Z
2021-09-16T09:13:13.000Z
base/ntos/ke/i386/spinlock.asm
sancho1952007/Windows-Server-2003
5c6fe3db626b63a384230a1aa6b92ac416b0765f
[ "Unlicense" ]
2
2020-10-19T08:02:06.000Z
2020-10-19T08:23:18.000Z
base/ntos/ke/i386/spinlock.asm
sancho1952007/Windows-Server-2003
5c6fe3db626b63a384230a1aa6b92ac416b0765f
[ "Unlicense" ]
14
2020-11-14T09:43:20.000Z
2021-08-28T08:59:57.000Z
TITLE "Spin Locks" ;++ ; ; Copyright (c) 1989 Microsoft Corporation ; ; Module Name: ; ; spinlock.asm ; ; Abstract: ; ; This module implements the routines for acquiring and releasing ; spin locks. ; ; Author: ; ; Bryan Willman (bryanwi) 13 Dec 89 ; ; Environment: ; ; Kernel mode only. ; ; Revision History: ; ; Ken Reneris (kenr) 22-Jan-1991 ; Removed KeAcquireSpinLock macros, and made functions ;-- PAGE .586p include ks386.inc include callconv.inc ; calling convention macros include i386\kimacro.inc include mac386.inc include irqli386.inc EXTRNP _KeBugCheckEx,5 _TEXT$00 SEGMENT PARA PUBLIC 'CODE' ASSUME DS:FLAT, ES:FLAT, SS:NOTHING, FS:NOTHING, GS:NOTHING PAGE SUBTTL "Ke Acquire Spin Lock At DPC Level" ;++ ; ; VOID ; KefAcquireSpinLockAtDpcLevel ( ; IN PKSPIN_LOCK SpinLock ; ) ; ; Routine Description: ; ; This function acquires a kernel spin lock. ; ; N.B. This function assumes that the current IRQL is set properly. ; It neither raises nor lowers IRQL. ; ; Arguments: ; ; (ecx) SpinLock - Supplies a pointer to an kernel spin lock. ; ; Return Value: ; ; None. ; ;-- align 16 cPublicFastCall KefAcquireSpinLockAtDpcLevel, 1 cPublicFpo 0, 0 if DBG push ecx CurrentIrql pop ecx cmp al, DISPATCH_LEVEL jl short asld50 endif ifdef NT_UP fstRET KefAcquireSpinLockAtDpcLevel else ; ; Attempt to assert the lock ; asld10: ACQUIRE_SPINLOCK ecx,<short asld20> fstRET KefAcquireSpinLockAtDpcLevel ; ; Lock is owned, spin till it looks free, then go get it again. ; align 4 asld20: SPIN_ON_SPINLOCK ecx,<short asld10> endif if DBG asld50: stdCall _KeBugCheckEx,<IRQL_NOT_GREATER_OR_EQUAL,ecx,eax,0,0> int 3 ; help debugger backtrace. endif fstENDP KefAcquireSpinLockAtDpcLevel ;++ ; ; VOID ; KeAcquireSpinLockAtDpcLevel ( ; IN PKSPIN_LOCK SpinLock ; ) ; ; Routine Description: ; ; Thunk for standard call callers ; ;-- cPublicProc _KeAcquireSpinLockAtDpcLevel, 1 cPublicFpo 1,0 ifndef NT_UP mov ecx,[esp+4] ; SpinLock aslc10: ACQUIRE_SPINLOCK ecx,<short aslc20> stdRET _KeAcquireSpinLockAtDpcLevel aslc20: SPIN_ON_SPINLOCK ecx,<short aslc10> endif stdRET _KeAcquireSpinLockAtDpcLevel stdENDP _KeAcquireSpinLockAtDpcLevel PAGE SUBTTL "Ke Release Spin Lock From Dpc Level" ;++ ; ; VOID ; KefReleaseSpinLockFromDpcLevel ( ; IN PKSPIN_LOCK SpinLock ; ) ; ; Routine Description: ; ; This function releases a kernel spin lock. ; ; N.B. This function assumes that the current IRQL is set properly. ; It neither raises nor lowers IRQL. ; ; Arguments: ; ; (ecx) SpinLock - Supplies a pointer to an executive spin lock. ; ; Return Value: ; ; None. ; ;-- align 16 cPublicFastCall KefReleaseSpinLockFromDpcLevel ,1 cPublicFpo 0,0 ifndef NT_UP RELEASE_SPINLOCK ecx endif fstRET KefReleaseSpinLockFromDpcLevel fstENDP KefReleaseSpinLockFromDpcLevel ;++ ; ; VOID ; KeReleaseSpinLockFromDpcLevel ( ; IN PKSPIN_LOCK SpinLock ; ) ; ; Routine Description: ; ; Thunk for standard call callers ; ;-- cPublicProc _KeReleaseSpinLockFromDpcLevel, 1 cPublicFpo 1,0 ifndef NT_UP mov ecx, [esp+4] ; (ecx) = SpinLock RELEASE_SPINLOCK ecx endif stdRET _KeReleaseSpinLockFromDpcLevel stdENDP _KeReleaseSpinLockFromDpcLevel PAGE SUBTTL "Ki Acquire Kernel Spin Lock" ;++ ; ; VOID ; FASTCALL ; KiAcquireSpinLock ( ; IN PKSPIN_LOCK SpinLock ; ) ; ; Routine Description: ; ; This function acquires a kernel spin lock. ; ; N.B. This function assumes that the current IRQL is set properly. ; It neither raises nor lowers IRQL. ; ; Arguments: ; ; (ecx) SpinLock - Supplies a pointer to an kernel spin lock. ; ; Return Value: ; ; None. ; ;-- align 16 cPublicFastCall KiAcquireSpinLock ,1 cPublicFpo 0,0 ifndef NT_UP ; ; Attempt to assert the lock ; asl10: ACQUIRE_SPINLOCK ecx,<short asl20> fstRET KiAcquireSpinLock ; ; Lock is owned, spin till it looks free, then go get it again. ; align 4 asl20: SPIN_ON_SPINLOCK ecx,<short asl10> else fstRET KiAcquireSpinLock endif fstENDP KiAcquireSpinLock PAGE SUBTTL "Ki Release Kernel Spin Lock" ;++ ; ; VOID ; FASTCALL ; KiReleaseSpinLock ( ; IN PKSPIN_LOCK SpinLock ; ) ; ; Routine Description: ; ; This function releases a kernel spin lock. ; ; N.B. This function assumes that the current IRQL is set properly. ; It neither raises nor lowers IRQL. ; ; Arguments: ; ; (ecx) SpinLock - Supplies a pointer to an executive spin lock. ; ; Return Value: ; ; None. ; ;-- align 16 cPublicFastCall KiReleaseSpinLock ,1 cPublicFpo 0,0 ifndef NT_UP RELEASE_SPINLOCK ecx endif fstRET KiReleaseSpinLock fstENDP KiReleaseSpinLock PAGE SUBTTL "Try to acquire Kernel Spin Lock" ;++ ; ; BOOLEAN ; KeTryToAcquireSpinLock ( ; IN PKSPIN_LOCK SpinLock, ; OUT PKIRQL OldIrql ; ) ; ; Routine Description: ; ; This function attempts acquires a kernel spin lock. If the ; spinlock is busy, it is not acquire and FALSE is returned. ; ; Arguments: ; ; SpinLock (TOS+4) - Supplies a pointer to an kernel spin lock. ; OldIrql (TOS+8) = Location to store old irql ; ; Return Value: ; TRUE - Spinlock was acquired & irql was raise ; FALSE - SpinLock was not acquired - irql is unchanged. ; ;-- align dword cPublicProc _KeTryToAcquireSpinLock ,2 cPublicFpo 2,0 ifdef NT_UP ; UP Version of KeTryToAcquireSpinLock RaiseIrql DISPATCH_LEVEL mov ecx, [esp+8] ; (ecx) -> ptr to OldIrql mov [ecx], al ; save OldIrql mov eax, 1 ; Return TRUE stdRET _KeTryToAcquireSpinLock else ; MP Version of KeTryToAcquireSpinLock mov edx,[esp+4] ; (edx) -> spinlock ; ; First check the spinlock without asserting a lock ; TEST_SPINLOCK edx,<short ttsl10> ; ; Spinlock looks free raise irql & try to acquire it ; ; ; raise to dispatch_level ; RaiseIrql DISPATCH_LEVEL mov edx, [esp+4] ; (edx) -> spinlock mov ecx, [esp+8] ; (ecx) = Return OldIrql ACQUIRE_SPINLOCK edx,<short ttsl20> mov [ecx], al ; save OldIrql mov eax, 1 ; spinlock was acquired, return TRUE stdRET _KeTryToAcquireSpinLock ttsl10: xor eax, eax ; return FALSE YIELD stdRET _KeTryToAcquireSpinLock ttsl20: YIELD mov ecx, eax ; (ecx) = OldIrql LowerIrql ecx xor eax, eax ; return FALSE stdRET _KeTryToAcquireSpinLock endif stdENDP _KeTryToAcquireSpinLock PAGE SUBTTL "Ki Try to acquire Kernel Spin Lock" ;++ ; ; BOOLEAN ; FASTCALL ; KeTryToAcquireSpinLockAtDpcLevel ( ; IN PKSPIN_LOCK SpinLock ; ) ; ; Routine Description: ; ; This function attempts acquires a kernel spin lock. If the ; spinlock is busy, it is not acquire and FALSE is returned. ; ; Arguments: ; ; SpinLock (ecx) - Supplies a pointer to an kernel spin lock. ; ; Return Value: ; ; TRUE - Spinlock was acquired ; FALSE - SpinLock was not acquired ; ;-- align dword cPublicFastCall KeTryToAcquireSpinLockAtDpcLevel ,1 cPublicFpo 0, 0 ; ; First check the spinlock without asserting a lock ; ifndef NT_UP TEST_SPINLOCK ecx, <short atsl20> ; ; Spinlock looks free try to acquire it. ; ACQUIRE_SPINLOCK ecx, <short atsl20> endif mov eax, 1 ; spinlock was acquired, return TRUE fstRET KeTryToAcquireSpinLockAtDpcLevel ifndef NT_UP atsl20: YIELD ; xor eax, eax ; return FALSE fstRET KeTryToAcquireSpinLockAtDpclevel endif fstENDP KeTryToAcquireSpinLockAtDpcLevel ;++ ; ; BOOLEAN ; KeTestSpinLock ( ; IN PKSPIN_LOCK SpinLock ; ) ; ; Routine Description: ; ; This function tests a kernel spin lock. If the spinlock is ; busy, FALSE is returned. If not, TRUE is returned. The spinlock ; is never acquired. This is provided to allow code to spin at low ; IRQL, only raising the IRQL when there is a reasonable hope of ; acquiring the lock. ; ; Arguments: ; ; SpinLock (ecx) - Supplies a pointer to a kernel spin lock. ; ; Return Value: ; TRUE - Spinlock appears available ; FALSE - SpinLock is busy ; ;-- cPublicFastCall KeTestSpinLock ,1 TEST_SPINLOCK ecx,<short tso10> mov eax, 1 fstRET KeTestSpinLock tso10: YIELD xor eax, eax fstRET KeTestSpinLock fstENDP KeTestSpinLock page ,132 subttl "Acquire In Stack Queued SpinLock At Dpc Level" ifdef QLOCK_STAT_GATHER EXTRNP KiQueueStatTrySucceeded,2,,FASTCALL EXTRNP KiQueueStatTryFailed,1,,FASTCALL EXTRNP KiQueueStatTry,1,,FASTCALL EXTRNP KiQueueStatAcquireQueuedLock,1,,FASTCALL EXTRNP KiQueueStatAcquireQueuedLockRTS,1,,FASTCALL EXTRNP KiQueueStatTryAcquire,3,,FASTCALL EXTRNP KiQueueStatReleaseQueuedLock,2,,FASTCALL EXTRNP KiQueueStatAcquire,1,,FASTCALL EXTRNP KiQueueStatRelease,1,,FASTCALL EXTRNP KiAcquireQueuedLock,1,,FASTCALL EXTRNP KiReleaseQueuedLock,1,,FASTCALL ; ; The following routines are used to wrap the actual calls to the ; real routines which have been usurped here by patching the import ; table. ; cPublicFastCall __cap_KeAcquireQueuedSpinLock,1 sub esp, 8 ; make room to save time push ecx ; save args rdtsc ; get time mov [esp].4, eax ; save low part mov [esp].8, edx ; save high part mov ecx, [esp] ; restore arg fstCall KiQueueStatAcquireQueuedLock acqst: mov ecx, esp ; set arg pointer for data accum push eax ; save result fstCall KiQueueStatAcquire pop eax ; restore result add esp, 12 ; restore stack pointer fstRET __cap_KeAcquireQueuedSpinLock fstENDP __cap_KeAcquireQueuedSpinLock cPublicFastCall __cap_KeAcquireQueuedSpinLockRaiseToSynch,1 sub esp, 8 ; make room to save time push ecx ; save args rdtsc ; get time mov [esp].4, eax ; save low part mov [esp].8, edx ; save high part mov ecx, [esp] ; restore arg fstCall KiQueueStatAcquireQueuedLockRTS jmp short acqst ; use common code to finish fstENDP __cap_KeAcquireQueuedSpinLockRaiseToSynch cPublicFastCall __cap_KeTryToAcquireQueuedSpinLockRaiseToSynch,2 push ecx ; save arg push SYNCH_LEVEL tryst: fstCall KiQueueStatTryAcquire push eax ; save result mov ecx, esp fstCall KiQueueStatTry pop eax ; restore result add esp, 4 ; drop saved arg or eax, eax ; some assembly callers expect appropriate flags fstRET __cap_KeTryToAcquireQueuedSpinLockRaiseToSynch fstENDP __cap_KeTryToAcquireQueuedSpinLockRaiseToSynch cPublicFastCall __cap_KeTryToAcquireQueuedSpinLock,2 push ecx ; save arg push DISPATCH_LEVEL jmp short tryst ; use common code to finish fstENDP __cap_KeTryToAcquireQueuedSpinLock cPublicFastCall __cap_KeReleaseQueuedSpinLock,2 push ecx ; save args mov ecx, esp ; set arg for stat release routine push edx ; save other arg fstCall KiQueueStatRelease pop edx pop ecx fstCall KiQueueStatReleaseQueuedLock fstRET __cap_KeReleaseQueuedSpinLock fstENDP __cap_KeReleaseQueuedSpinLock ; ; KeAcquireQueuedSpinLockAtDpcLevel ; KeReleaseQueuedSpinLockFromDpcLevel ; ; These two routines are defined here in assembly code so ; as to capture the caller's address. ; cPublicFastCall KeAcquireQueuedSpinLockAtDpcLevel,1 sub esp, 8 ; make room to save time push ecx ; save args rdtsc ; get time mov [esp].4, eax ; save low part mov [esp].8, edx ; save high part mov ecx, [esp] ; restore arg fstCall KiAcquireQueuedLock mov ecx, esp fstCall KiQueueStatAcquire add esp, 12 ; restore SP fstRET KeAcquireQueuedSpinLockAtDpcLevel fstENDP KeAcquireQueuedSpinLockAtDpcLevel cPublicFastCall KeReleaseQueuedSpinLockFromDpcLevel,1 push ecx ; save args mov ecx, esp ; set arg for stat release routine fstCall KiQueueStatRelease pop ecx fstCall KiReleaseQueuedLock fstRET KeReleaseQueuedSpinLockFromDpcLevel fstENDP KeReleaseQueuedSpinLockFromDpcLevel ; ; KiCaptureQueuedSpinlockRoutines ; ; Replace the import table entries for the x86 HAL queued spinlock ; routines with our statistic capturing variety. ; EXTRNP KeAcquireQueuedSpinLock,1,IMPORT,FASTCALL EXTRNP KeAcquireQueuedSpinLockRaiseToSynch,1,IMPORT,FASTCALL EXTRNP KeTryToAcquireQueuedSpinLockRaiseToSynch,2,IMPORT,FASTCALL EXTRNP KeTryToAcquireQueuedSpinLock,2,IMPORT,FASTCALL EXTRNP KeReleaseQueuedSpinLock,2,IMPORT,FASTCALL cPublicFastCall KiCaptureQueuedSpinlockRoutines,0 mov eax, @__cap_KeAcquireQueuedSpinLock@4 mov [__imp_@KeAcquireQueuedSpinLock@4], eax mov eax, @__cap_KeAcquireQueuedSpinLockRaiseToSynch@4 mov [__imp_@KeAcquireQueuedSpinLockRaiseToSynch@4], eax mov eax, @__cap_KeTryToAcquireQueuedSpinLockRaiseToSynch@8 mov [__imp_@KeTryToAcquireQueuedSpinLockRaiseToSynch@8], eax mov eax, @__cap_KeTryToAcquireQueuedSpinLock@8 mov [__imp_@KeTryToAcquireQueuedSpinLock@8], eax mov eax, @__cap_KeReleaseQueuedSpinLock@8 mov [__imp_@KeReleaseQueuedSpinLock@8], eax fstRet KiCaptureQueuedSpinlockRoutines fstENDP KiCaptureQueuedSpinlockRoutines else ;++ ; ; VOID ; FASTCALL ; KeAcquireInStackQueuedSpinLockAtDpcLevel ( ; IN PKSPIN_LOCK SpinLock, ; IN PKLOCK_QUEUE_HANDLE LockHandle ; ) ; ; Routine Description: ; ; This function acquires the specified in stack queued spin lock at the ; current IRQL. ; ; Arguments: ; ; SpinLock (ecx) - Supplies the address of a spin lock. ; ; LockHandle (edx) - Supplies the address of an in stack lock handle. ; ; Return Value: ; ; None. ;-- align 16 cPublicFastCall KeAcquireInStackQueuedSpinLockAtDpcLevel,2 cPublicFpo 0,0 ifndef NT_UP xor eax, eax ; set next link to NULL mov [edx].LqhNext, eax ; mov [edx].LqhLock, ecx ; set spin lock address lea ecx, dword ptr [edx+LqhNext] ; compute address of lock queue jmp short @KeAcquireQueuedSpinLockAtDpcLevel@4 ; finish in common code else fstRET KeAcquireInStackQueuedSpinLockAtDpcLevel endif fstENDP KeAcquireInStackQueuedSpinLockAtDpcLevel page ,132 subttl "Acquire Queued SpinLock" ;++ ; ; VOID ; KeAcquireQueuedSpinLockAtDpcLevel ( ; IN PKSPIN_LOCK_QUEUE QueuedLock ; ) ; ; Routine Description: ; ; This function acquires the specified queued spinlock. ; No change to IRQL is made, IRQL is not returned. It is ; expected IRQL is sufficient to avoid context switch. ; ; Unlike the equivalent Ke versions of these routines, ; the argument to this routine is the address of the ; lock queue entry (for the lock to be acquired) in the ; PRCB rather than the LockQueueNumber. This saves us ; a couple of instructions as the address can be calculated ; at compile time. ; ; NOTE: This code may be modified for use during textmode ; setup if this is an MP kernel running with a UP HAL. ; ; Arguments: ; ; LockQueueEntry (ecx) - Supplies the address of the queued ; spinlock entry in this processor's ; PRCB. ; ; Return Value: ; ; None. ; ; N.B. ecx is preserved, assembly code callers can take advantage ; of this by avoiding setting up ecx for the call to release if ; the caller can preserve the lock that long. ; ;-- ; compile time assert sizeof(KSPIN_LOCK_QUEUE) == 8 .errnz (LOCK_QUEUE_HEADER_SIZE - 8) align 16 cPublicFastCall KeAcquireQueuedSpinLockAtDpcLevel,1 cPublicFpo 0,0 ifndef NT_UP ; Get address of the actual lock. mov edx, [ecx].LqLock ifdef CAPKERN_SYNCH_POINTS push edx push 000010101h ; 1 Dword, Timestamp, Subcode = 1 call _CAP_Log_NInt add esp, 8 endif mov eax, ecx ; save Lock Queue entry address ; Exchange the value of the lock with the address of this ; Lock Queue entry. xchg [edx], eax cmp eax, 0 ; check if lock is held jnz short @f ; jiff held ; note: the actual lock address will be word aligned, we use ; the bottom two bits as indicators, bit 0 is LOCK_QUEUE_WAIT, ; bit 1 is LOCK_QUEUE_OWNER. or edx, LOCK_QUEUE_OWNER ; mark self as lock owner mov [ecx].LqLock, edx ; lock has been acquired, return. aqsl20: endif fstRET KeAcquireQueuedSpinLockAtDpcLevel ifndef NT_UP @@: if DBG ; make sure it isn't already held by THIS processor. test edx, LOCK_QUEUE_OWNER jz short @f ; KeBugCheckEx(SPIN_LOCK_ALREADY_OWNED, ; actual lock address, ; my context, ; previous acquirer, ; 2); stdCall _KeBugCheckEx,<SPIN_LOCK_ALREADY_OWNED,edx,ecx,eax,2> @@: endif ; The lock is already held by another processor. Set the wait ; bit in this processor's Lock Queue entry, then set the next ; field in the Lock Queue entry of the last processor to attempt ; to acquire the lock (this is the address returned by the xchg ; above) to point to THIS processor's lock queue entry. or edx, LOCK_QUEUE_WAIT ; set lock bit mov [ecx].LqLock, edx mov [eax].LqNext, ecx ; set previous acquirer's ; next field. ifdef CAPKERN_SYNCH_POINTS and edx, 0FFFFFFFCh push edx xor edx, edx ; Wait. aqsl30: inc edx test [ecx].LqLock, LOCK_QUEUE_WAIT ; check if still waiting jz short aqsl40 ; jif lock acquired YIELD ; fire avoidance. jmp short aqsl30 ; else, continue waiting aqsl40: push edx push 000020104h ; 2 Dwords, Timestamp, Subcode = 4 call _CAP_Log_NInt add esp, 12 jmp short aqsl20 else ; Wait. @@: test [ecx].LqLock, LOCK_QUEUE_WAIT ; check if still waiting jz short aqsl20 ; jif lock acquired YIELD ; fire avoidance. jmp short @b ; else, continue waiting endif endif fstENDP KeAcquireQueuedSpinLockAtDpcLevel page ,132 subttl "Release In Stack Queued SpinLock From Dpc Level" ;++ ; ; VOID ; FASTCALL ; KeReleaseInStackQueuedSpinLockFromDpcLevel ( ; IN PKLOCK_QUEUE_HANDLE LockHandle ; ) ; ; Routine Description: ; ; This function releases a queued spinlock and preserves the current ; IRQL. ; ; Arguments: ; ; LockHandle (ecx) - Supplies the address of a lock handle. ; ; Return Value: ; ; None. ; ;-- cPublicFastCall KeReleaseInStackQueuedSpinLockFromDpcLevel,1 cPublicFpo 0,0 ifndef NT_UP lea ecx, dword ptr[ecx+LqhNext] ; compute address of lock queue jmp short @KeReleaseQueuedSpinLockFromDpcLevel@4 ; finish in common code else fstRET KeReleaseInStackQueuedSpinLockFromDpcLevel endif fstENDP KeReleaseInStackQueuedSpinLockFromDpcLevel page ,132 subttl "Release Queued SpinLock" ;++ ; ; VOID ; KeReleaseQueuedSpinLockFromDpcLevel ( ; IN PKSPIN_LOCK_QUEUE QueuedLock ; ) ; ; Routine Description: ; ; This function releases a queued spinlock. ; No change to IRQL is made, IRQL is not returned. It is ; expected IRQL is sufficient to avoid context switch. ; ; NOTE: This code may be modified for use during textmode ; setup if this is an MP kernel running with a UP HAL. ; ; Arguments: ; ; LockQueueEntry (ecx) - Supplies the address of the queued ; spinlock entry in this processor's ; PRCB. ; ; Return Value: ; ; None. ; ;-- cPublicFastCall KeReleaseQueuedSpinLockFromDpcLevel,1 cPublicFpo 0,0 .errnz (LOCK_QUEUE_OWNER - 2) ; error if not bit 1 for btr ifndef NT_UP mov eax, ecx ; need in eax for cmpxchg mov edx, [ecx].LqNext mov ecx, [ecx].LqLock ifdef CAPKERN_SYNCH_POINTS push ecx and ecx, 0FFFFFFFCh push ecx push 000010107h ; 1 Dword, Timestamp, Subcode = 7 call _CAP_Log_NInt add esp, 8 pop ecx endif ; Quick check: If Lock Queue entry's Next field is not NULL, ; there is another waiter. Don't bother with ANY atomic ops ; in this case. ; ; N.B. Careful ordering, the test will clear the CF bit and set ; the ZF bit appropriately if the Next Field (in EDX) is zero. ; The BTR will set the CF bit to the previous value of the owner ; bit. test edx, edx ; Clear the "I am owner" field in the Lock entry. btr ecx, 1 ; clear owner bit if DBG jnc short rqsl90 ; bugcheck if was not set ; tests CF endif mov [eax].LqLock, ecx ; clear lock bit in queue entry jnz short rqsl40 ; jif another processor waits ; tests ZF xor edx, edx ; new lock owner will be NULL push eax ; save &PRCB->LockQueue[Number] ; Use compare exchange to attempt to clear the actual lock. ; If there are still no processors waiting for the lock when ; the compare exchange happens, the old contents of the lock ; should be the address of this lock entry (eax). lock cmpxchg [ecx], edx ; store 0 if no waiters pop eax ; restore lock queue address jnz short rqsl60 ; jif store failed ; The lock has been released. Return to caller. endif fstRET KeReleaseQueuedSpinLockFromDpcLevel ifndef NT_UP ; Another processor is waiting on this lock. Hand the lock ; to that processor by getting the address of its LockQueue ; entry, turning ON its owner bit and OFF its wait bit. rqsl40: xor [edx].LqLock, (LOCK_QUEUE_OWNER+LOCK_QUEUE_WAIT) ; Done, the other processor now owns the lock, clear the next ; field in my LockQueue entry (to preserve the order for entering ; the queue again) and return. mov [eax].LqNext, 0 fstRET KeReleaseQueuedSpinLockFromDpcLevel ; We get here if another processor is attempting to acquire ; the lock but had not yet updated the next field in this ; processor's Queued Lock Next field. Wait for the next ; field to be updated. ifdef CAPKERN_SYNCH_POINTS rqsl60: push ecx xor ecx, ecx rqsl70: inc ecx mov edx, [eax].LqNext test edx, edx ; check if still 0 jnz short rqsl80 ; jif Next field now set. YIELD ; wait a bit jmp short rqsl70 ; continue waiting rqsl80: push ecx push 000020104h ; 2 Dwords, Timestamp, Subcode = 4 call _CAP_Log_NInt add esp, 12 jmp short rqsl40 else rqsl60: mov edx, [eax].LqNext test edx, edx ; check if still 0 jnz short rqsl40 ; jif Next field now set. YIELD ; wait a bit jmp short rqsl60 ; continue waiting endif if DBG rqsl90: stdCall _KeBugCheckEx,<SPIN_LOCK_NOT_OWNED,ecx,eax,0,0> int 3 ; help debugger back trace. endif endif fstENDP KeReleaseQueuedSpinLockFromDpcLevel endif page ,132 subttl "Try to Acquire Queued SpinLock" ;++ ; ; LOGICAL ; KeTryToAcquireQueuedSpinLockAtRaisedIrql ( ; IN PKSPIN_LOCK_QUEUE QueuedLock ; ) ; ; Routine Description: ; ; This function attempts to acquire the specified queued spinlock. ; No change to IRQL is made, IRQL is not returned. It is ; expected IRQL is sufficient to avoid context switch. ; ; NOTE: This code may be modified for use during textmode ; setup if this is an MP kernel running with a UP HAL. ; ; Arguments: ; ; LockQueueEntry (ecx) - Supplies the address of the queued ; spinlock entry in this processor's ; PRCB. ; ; Return Value: ; ; TRUE if the lock was acquired, FALSE otherwise. ; N.B. ZF is set if FALSE returned, clear otherwise. ; ;-- align 16 cPublicFastCall KeTryToAcquireQueuedSpinLockAtRaisedIrql,1 cPublicFpo 0,0 ifndef NT_UP ; Get address of Lock Queue entry mov edx, [ecx].LqLock ifdef CAPKERN_SYNCH_POINTS push edx push 000010108h ; 1 Dword, Timestamp, Subcode = 8 call _CAP_Log_NInt add esp, 8 endif ; Store the Lock Queue entry address in the lock ONLY if the ; current lock value is 0. xor eax, eax ; old value must be 0 lock cmpxchg [edx], ecx jnz short taqsl60 ; Lock has been acquired. ; note: the actual lock address will be word aligned, we use ; the bottom two bits as indicators, bit 0 is LOCK_QUEUE_WAIT, ; bit 1 is LOCK_QUEUE_OWNER. or edx, LOCK_QUEUE_OWNER ; mark self as lock owner mov [ecx].LqLock, edx ifdef QLOCK_STAT_GATHER mov edx, [esp] fstCall KiQueueStatTrySucceeded endif or eax, 1 ; return TRUE fstRET KeTryToAcquireQueuedSpinLockAtRaisedIrql taqsl60: if 0 ; note: it is not fatal if the current processor already owns the ; lock as this is perfectly normal - just return FALSE. test edx, LOCK_QUEUE_OWNER jz short @f stdCall _KeBugCheckEx,<SPIN_LOCK_ALREADY_OWNED, edx, ecx,0,1> @@: endif ; The lock is already held by another processor. Indicate ; failure to the caller. ifdef QLOCK_STAT_GATHER fstCall KiQueueStatTryFailed endif xor eax, eax ; return FALSE fstRET KeTryToAcquireQueuedSpinLockAtRaisedIrql ; In the event that this is an MP kernel running with a UP ; HAL, the following UP version is copied over the MP version ; during kernel initialization. public _KeTryToAcquireQueuedSpinLockAtRaisedIrqlUP _KeTryToAcquireQueuedSpinLockAtRaisedIrqlUP: endif ; UP version, always succeed. xor eax, eax or eax, 1 fstRet KeTryToAcquireQueuedSpinLockAtRaisedIrql fstENDP KeTryToAcquireQueuedSpinLockAtRaisedIrql _TEXT$00 ends end
26.376876
85
0.59652
279c5a6eeece17493b016287a1b786553990bf33
339
asm
Assembly
programs/oeis/103/A103435.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/103/A103435.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/103/A103435.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A103435: a(n) = 2^n * Fibonacci(n). ; 0,2,4,16,48,160,512,1664,5376,17408,56320,182272,589824,1908736,6176768,19988480,64684032,209321984,677380096,2192048128,7093616640,22955425792,74285318144,240392339456,777925951488,2517421260800 mov $3,1 lpb $0 sub $0,1 add $2,$3 add $1,$2 mov $3,$1 mul $1,2 sub $3,$2 mov $2,$3 lpe
24.214286
197
0.702065
53ea4959e5154afa83ff0a5e712cfb602c361e47
8,111
asm
Assembly
functions/delete.asm
perrada69/CalmCommander
a54ba46866d42d9c389c123f8d94a7b1f674ed8b
[ "MIT" ]
28
2020-05-08T08:13:37.000Z
2022-02-18T07:42:42.000Z
functions/delete.asm
perrada69/CalmCommander
a54ba46866d42d9c389c123f8d94a7b1f674ed8b
[ "MIT" ]
2
2020-05-09T15:54:10.000Z
2020-06-11T08:31:53.000Z
functions/delete.asm
perrada69/CalmCommander
a54ba46866d42d9c389c123f8d94a7b1f674ed8b
[ "MIT" ]
null
null
null
moredelete call savescr ld hl,10 * 256 + 10 ld bc,60 * 256 + 5 ld a,16 call window ld hl,11*256+11 ld a,16 ld de,moredeletetxt call print ld hl,numsel call ROZHOD2 ld a,(hl) inc hl ld h,(hl) ld l,a push hl ex de,hl call PROVYP add a,a ld (CPPX1+1),hl ld (CPPX3+1),a ld hl,0 ld (PROGPROM),hl ld hl,NUMBUF ld de,NUMBUF+1 ld bc,5 ld a,32 ld (hl),a ldir ld hl,NUMBUF xor a ld (NUMBUF+3),a ld (numadr+1),hl pop hl call DECIMAL3 ld hl,18*256+11 ld a,16 ld de,NUMBUF call print ld hl,60*256+15 ld a,48 ld de,yestxt call print ld hl,60*256+14 ld a,16 ld de,notxt call print mdeletewait call INKEY cp 1 jp z,copyend cp 13 jr z,mdeletecont jr mdeletewait mdeletecont ld hl,11*256+11 ld a,16 ld de,deleting call print ld hl,numsel call ROZHOD2 ld a,(hl) inc hl ld d,(hl) ld e,a call PROVYP add a,a ld (DPPX1+1),hl ld (DPPX3+1),a ld hl,0 ld (PROGPROM),hl ld hl,$4000+160*15+23 + 1 + 62 ld (hl),"|" ld hl,0 deletenext push hl call find83 call BUFF83 call BUFF83 ld hl,(foundfile) ld de,ban1 ld a,0 call specific_search jp z,nemazat ld hl,(foundfile) ld de,ban2 ld a,0 call specific_search jp z,nemazat ld hl,(foundfile) bit 7,(hl) jp z,nemazat res 7,(hl) ld ix,TMP83 ;zjisti jestli se jedná o adresář bit 7,(ix+7) jr nz,isdirdelm xor a ld (smazdirm+1),a jr dcm isdirdelm ld a,1 ld (smazdirm+1),a dcm ld b,11 ld hl,TMP83 ACCCAC ;vynuluj všechny stavové bity v názvu (7.) res 7,(hl) inc hl djnz ACCCAC ld a,$ff ld (TMP83+11),a call dospage smazdirm ld a,0 or a jr z,nenidirm xor a ld (vymaz_vse_v_adresari+1),a ld a,3 ld hl,TMP83 call $01b1 call nc,vymaz_vse_v_adresari jr pokrm nenidirm ld d,00000000b ld e,0 ld hl,TMP83 set 1,e call 0148h ld hl,TMP83 call $0124 pokrm call basicpage ;------------------------ ld hl,(PROGPROM) inc hl ld (PROGPROM),hl DPPX1 ld de,0 or a sbc hl,de jr c,DPPNE1 DPPX3 ld b,1 ld (PROGPROM),hl call PROGRES DPPNE1 nemazat ld hl,ALLFILES call ROZHOD2 ld a,(hl) inc hl ld d,(hl) ld e,a pop hl or a sbc hl,de add hl,de jp z,mmorekonec inc hl jp deletenext mmorekonec ld hl,0 ld hl,ALLFILES call ROZHOD2 xor a ld (hl),a inc hl ld (hl),a ld hl,POSKURZL call ROZHOD xor a ld (hl),a call loadscr ld hl,pozicel call ROZHOD2 ld a,(hl) inc hl ld h,(hl) ld l,a ld bc,38 * 256 + 27 ld a,0 call window call reload_dir ld hl,adrl call ROZHOD2 ld a,(hl) inc hl ld h,(hl) ld l,a ld (adrs+1),hl call getroot_reload call showwin ld a,32 call writecur ;--------------------------- call PROHOD call dospage ld hl,pathl call ROZHOD2 ld a,(hl) inc hl ld h,(hl) ld l,a xor a call $01b1 call basicpage ld hl,0 ld hl,ALLFILES call ROZHOD2 xor a ld (hl),a inc hl ld (hl),a ld hl,POSKURZL call ROZHOD xor a ld (hl),a ld hl,pozicel call ROZHOD2 ld a,(hl) inc hl ld h,(hl) ld l,a ld bc,38 * 256 + 27 ld a,0 call window call reload_dir ld hl,adrl call ROZHOD2 ld a,(hl) inc hl ld h,(hl) ld l,a ld (adrs+1),hl call getroot_reload call showwin call PROHOD call dospage ld hl,pathl call ROZHOD2 ld a,(hl) inc hl ld h,(hl) ld l,a xor a call $01b1 call basicpage call freespace jp loop0 delete xor a ld (yestoall),a ld hl,numsel call ROZHOD2 ld a,(hl) inc hl ld h,(hl) ld l,a or h jp nz,moredelete ld hl,POSKURZL call ROZHOD ld a,(hl) ld l,a ld h,0 push hl ld hl,STARTWINL call ROZHOD2 ld a,(hl) inc hl ld h,(hl) ld l,a ex de,hl pop hl add hl,de push hl inc hl call find83 pop hl call FINDLFN call BUFF83 ld hl,(foundfile) ld de,ban1 ld a,0 call specific_search jp z,loop0 ld hl,(foundfile) ld de,ban2 ld a,0 call specific_search jp z,loop0 call savescr ld hl,10 * 256 + 10 ld bc,60 * 256 + 5 ld a,16 call window ld hl,11*256+11 ld a,16 ld de,onedeletetxt call print ld hl,LFNNAME ld de,bfname ld bc,35 ldir ld hl,bfname+37 xor a ld (hl),a ld hl,34*256+11 ld a,16 ld de,bfname call print ld hl,60*256+15 ld a,48 ld de,yestxt call print ld hl,60*256+14 ld a,16 ld de,notxt call print deletewait call INKEY cp 1 jp z,copyend cp 13 jr z,deletecont jr deletewait deletecont DT ld ix,TMP83 bit 7,(ix+7) jr nz,isdirdel xor a ld (smazdir+1),a jr dc isdirdel ld a,1 ld (smazdir+1),a dc ld b,11 ld hl,TMP83 CCCAC ;vynuluj všechny stavové bity v názvu (7.) res 7,(hl) inc hl djnz CCCAC ld a,$ff ld (TMP83+11),a call dospage smazdir ld a,0 or a jr z,nenidir xor a ld (vymaz_vse_v_adresari+1),a ld a,3 ld hl,TMP83 ED call $01b1 call nc,vymaz_vse_v_adresari jr pokr nenidir ld d,00000000b ld e,0 ld hl,TMP83 set 1,e call 0148h ld hl,TMP83 call $0124 pokr call basicpage ;------------------------ KON ld hl,0 ld hl,ALLFILES call ROZHOD2 xor a ld (hl),a inc hl ld (hl),a ld hl,POSKURZL call ROZHOD xor a ld (hl),a call dospage ld hl,pathl call ROZHOD2 ld a,(hl) inc hl ld h,(hl) ld l,a xor a call $01b1 call basicpage call reload_dir call loadscr ld hl,pozicel call ROZHOD2 ld a,(hl) inc hl ld h,(hl) ld l,a ld bc,38 * 256 + 27 ld a,0 call window ld hl,adrl call ROZHOD2 ld a,(hl) inc hl ld h,(hl) ld l,a ld (adrs+1),hl call getroot_reload call showwin ld a,32 call writecur ;--------------------------- call PROHOD call dospage ld hl,pathl call ROZHOD2 ld a,(hl) inc hl ld h,(hl) ld l,a xor a call $01b1 call basicpage ld hl,0 ld hl,ALLFILES call ROZHOD2 xor a ld (hl),a inc hl ld (hl),a ld hl,POSKURZL call ROZHOD xor a ld (hl),a ;call loadscr ld hl,pozicel call ROZHOD2 ld a,(hl) inc hl ld h,(hl) ld l,a ld bc,38 * 256 + 27 ld a,0 call window call reload_dir ld hl,adrl call ROZHOD2 ld a,(hl) inc hl ld h,(hl) ld l,a ld (adrs+1),hl call getroot_reload call showwin call PROHOD call dospage ld hl,pathl call ROZHOD2 ld a,(hl) inc hl ld h,(hl) ld l,a xor a call $01b1 call basicpage call freespace jp loop0 errordel defb "Directory is not empty. Delete?",0 vymaz_vse_v_adresari ld a,0 or a jr nz,smaz ld a,(yestoall) cp 1 jr z,smaz ld a,1 ld (vymaz_vse_v_adresari+1),a call savescr ld hl,10 * 256 + 10 ld bc,60 * 256 + 5 ld a,16 call window ld hl,11*256+11 ld a,16 ld de,errordel call print ld hl,60*256+15 ld a,48 ld de,yestxt call print ld hl,11*256+15 ld a,16 ld de,yesall call print ld hl,60*256+14 ld a,16 ld de,notxt call print edeletewait call INKEY cp 1 jp z,ecopyend cp 13 jr z,smaz cp 32 jr z,toall jr edeletewait toall ld a,1 ld (yestoall),a ld hl,11*256+15 ld a,16 ld de,yesallsp call print ld hl,11*256+11 ld a,16 ld de,deleting call print ld hl,$4000+160*15+23 + 1 + 62 ld (hl),"|" smaz ld hl,60*256+14 ld a,16 ld de,pleasewait call print ld hl,60*256+15 ld a,16 ld de,spaces call print call dospage xor a ;change path ld hl,TMP83 call $01b1 ;změň adresář ld d,00000000b ld e,0 ld hl,vse set 1,e call 0148h ld hl,vse call $0124 xor a ;change path ld hl,parrentdir call $01b1 ;změň adresář ld a,3 ;zkus znova smazat ld hl,TMP83 call $01b1 ;změň adresář ecopyend ld a,(yestoall) or a ret nz call loadscr ret vse defb "*.*",255 parrentdir defb "..",255 yestoall defb 0 deleting defb "Deleting... ",0
12.052006
55
0.586611
2b9ffe6c8dcefdfb0f869d117f6a03723c88b3d4
392
asm
Assembly
packedBCD.asm
tamim87/Assembly-Samples
99290b8df6484ff9b46afa5bd1dc2f6bc31f29dd
[ "MIT" ]
null
null
null
packedBCD.asm
tamim87/Assembly-Samples
99290b8df6484ff9b46afa5bd1dc2f6bc31f29dd
[ "MIT" ]
null
null
null
packedBCD.asm
tamim87/Assembly-Samples
99290b8df6484ff9b46afa5bd1dc2f6bc31f29dd
[ "MIT" ]
null
null
null
;bcd to binary org 100h mov al,03h call packedBCD jmp done packedBCD near proc pushf push ax push bx push cx mov bl,'5' mov al,'9' and al ,0fh and bl ,0fh rol bl,04h or al,bl pop cx pop bx pop ax popf ret packedBCD endp done: ret
9.560976
20
0.433673
0661e6ccba7137de6d5e2a346d5c6b9b92680e20
985
asm
Assembly
programas/ensamblador/division_con_saltos.asm
AdolfoMX/La-Biblioteca
095d37f43c35bdcfe8b996eab11370515dd13c61
[ "MIT" ]
null
null
null
programas/ensamblador/division_con_saltos.asm
AdolfoMX/La-Biblioteca
095d37f43c35bdcfe8b996eab11370515dd13c61
[ "MIT" ]
null
null
null
programas/ensamblador/division_con_saltos.asm
AdolfoMX/La-Biblioteca
095d37f43c35bdcfe8b996eab11370515dd13c61
[ "MIT" ]
null
null
null
; division de un numero haciendo uso de registros de saltos ;------------- Seccion de datos ------------- section .data ; cadena de texto msg db 0xA,0xD,"no es posible dividir entre cero",0xA,0xD lonmsg equ $-msg section .bss resultado resb 1 ;------------- Seccion de texto ------------- section .text global _start: _start: mov eax, 4 ; variable donde almacena un 4 para la division mov edx, 0 mov ebx, 2 ; variable donde almacena un 2 para la division cmp ebx, 0 ; compara ebx si es un valor cero je escero div ebx ; division de forma implicita add ebx, 48 mov [resultado], ebx ; impresion de mensaje por pantalla mov eax, 4 mov ebx, 1 mov ecx, resultado mov edx, 1 int 0x80 jmp salir ; manda un mensaje si el denominador es un cero escero: mov eax, 4 mov ebx, 1 mov ecx, msg mov edx, lonmsg int 0x80 ; indica a la maquina si el programa se ejecuto de forma exitosa salir: mov eax, 1 mov ebx, 0 int 0x80
18.942308
65
0.650761
376be6b8149a61ad01d2fe5f6a29691deb5d6f77
486
nasm
Assembly
Projetos/src/F-Assembly/src/nasm/max.nasm
Fogelman/Z01.1
5a40e721a6bf000ba1016c2addad579a25618d49
[ "Unlicense" ]
null
null
null
Projetos/src/F-Assembly/src/nasm/max.nasm
Fogelman/Z01.1
5a40e721a6bf000ba1016c2addad579a25618d49
[ "Unlicense" ]
91
2018-08-24T11:41:28.000Z
2018-12-09T15:09:02.000Z
Projetos/src/F-Assembly/src/nasm/max.nasm
Fogelman/Z01.1
5a40e721a6bf000ba1016c2addad579a25618d49
[ "Unlicense" ]
1
2018-12-05T19:22:27.000Z
2018-12-05T19:22:27.000Z
; Arquivo: Max.nasm ; Curso: Elementos de Sistemas ; Criado por: Luciano Soares ; Data: 27/03/2017 ; Log : ; - Rafael Corsi portado para Z01 ; Calcula R2 = max(R0, R1) (R0,R1,R2 se referem a RAM[0],RAM[1],RAM[2]) ; ou seja, o maior valor que estiver, ou em R0 ou R1 sera copiado para R2 ; Estamos considerando número inteiros leaw $0, %A movw (%A), %D leaw $1, %A subw %D, (%A), %S leaw $9, %A jg %S nop leaw $1, %A movw (%A), %D leaw $2, %A movw %D, (%A)
21.130435
74
0.600823
eaa77543466c77af944d3c5673974ff85990492b
18
asm
Assembly
test/invalid-vxcall.asm
kspalaiologos/asmbf
c98a51d61724a46855de291a27d68a49a034810b
[ "MIT" ]
67
2020-08-03T06:26:35.000Z
2022-03-24T19:50:51.000Z
test/invalid-vxcall.asm
pyautogui/asmbf
37c54a8a62df2fc4bab28bdeb43237b4905cbecd
[ "MIT" ]
55
2019-10-02T19:37:08.000Z
2020-06-12T19:40:53.000Z
test/invalid-vxcall.asm
pyautogui/asmbf
37c54a8a62df2fc4bab28bdeb43237b4905cbecd
[ "MIT" ]
9
2019-05-18T11:59:41.000Z
2020-06-21T20:40:25.000Z
vxcall sto r1, 3
6
16
0.666667
707aa533928dbeedbfd57a92ddb315cbb7abd503
18,128
asm
Assembly
kernel/regs.asm
iocoder/upcr
3de4cb76177b4fee5403c8630acf8c7ffac515d1
[ "MIT" ]
null
null
null
kernel/regs.asm
iocoder/upcr
3de4cb76177b4fee5403c8630acf8c7ffac515d1
[ "MIT" ]
null
null
null
kernel/regs.asm
iocoder/upcr
3de4cb76177b4fee5403c8630acf8c7ffac515d1
[ "MIT" ]
null
null
null
;############################################################################### ;# FILE NAME: KERNEL/REGS.ASM ;# DESCRIPTION: DUMP CPU REGISTERS ;# AUTHOR: RAMSES A. ;############################################################################### ;# ;# UPCR OPERATING SYSTEM FOR X86_64 ARCHITECTURE ;# COPYRIGHT (C) 2021 RAMSES A. ;# ;# PERMISSION IS HEREBY GRANTED, FREE OF CHARGE, TO ANY PERSON OBTAINING A COPY ;# OF THIS SOFTWARE AND ASSOCIATED DOCUMENTATION FILES (THE "SOFTWARE"), TO DEAL ;# IN THE SOFTWARE WITHOUT RESTRICTION, INCLUDING WITHOUT LIMITATION THE RIGHTS ;# TO USE, COPY, MODIFY, MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL ;# COPIES OF THE SOFTWARE, AND TO PERMIT PERSONS TO WHOM THE SOFTWARE IS ;# FURNISHED TO DO SO, SUBJECT TO THE FOLLOWING CONDITIONS: ;# ;# THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN ALL ;# COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. ;# ;############################################################################### ;# ;# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ;# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ;# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ;# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ;# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ;# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ;# SOFTWARE. ;# ;############################################################################### ;############################################################################### ;# INCLUDES # ;############################################################################### ;# COMMON DEFINITIONS USED BY KERNEL INCLUDE "kernel/macro.inc" ;############################################################################### ;# GLOBALS # ;############################################################################### ;# GLOBAL SYMBOLS PUBLIC KREGDUMP ;############################################################################### ;# TEXT SECTION # ;############################################################################### ;# TEXT SECTION SEGMENT ".text" ;#-----------------------------------------------------------------------------# ;# KREGDUMP() # ;#-----------------------------------------------------------------------------# KREGDUMP: ;# PRINT HEADING PUSH RDI LEA RDI, [RIP+KREGHD] CALL KCONSTR POP RDI ;# PRINT INTERRUPT NAME PUSH RDI LEA RDI, [RIP+KREGEXPN] CALL KCONSTR POP RDI PUSH RDI MOV RAX, [RDI+SFRAME_NBR] SHL RAX, 5 LEA RDI, [RIP+KREGSTR] ADD RDI, RAX CALL KCONSTR POP RDI ;# NEW LINE PUSH RDI MOV RDI, '\n' CALL KCONCHR POP RDI ;# PRINT INTERRUPT CODE PUSH RDI LEA RDI, [RIP+KREGEXPC] CALL KCONSTR POP RDI PUSH RDI MOV RDI, [RDI+SFRAME_NBR] CALL KCONHEX POP RDI ;# NEW LINE PUSH RDI MOV RDI, '\n' CALL KCONCHR POP RDI ;# PRINT ERR CODE PUSH RDI LEA RDI, [RIP+KREGCODE] CALL KCONSTR POP RDI PUSH RDI MOV RDI, [RDI+SFRAME_ERR] CALL KCONHEX POP RDI ;# NEW LINE PUSH RDI MOV RDI, '\n' CALL KCONCHR POP RDI ;# PRINT CPU CORE NUMBER PUSH RDI LEA RDI, [RIP+KREGCORE] CALL KCONSTR POP RDI PUSH RDI XOR RAX, RAX MOV EAX, [0xFEE00020] SHR EAX, 24 MOV RDI, RAX CALL KCONDEC POP RDI ;# HORIZONTAL LINE PUSH RDI LEA RDI, [RIP+KREGHR] CALL KCONSTR POP RDI ;# PRINT CS PUSH RDI LEA RDI, [RIP+KREGCS] CALL KCONSTR POP RDI PUSH RDI MOV RDI, [RDI+SFRAME_CS] CALL KCONHEX POP RDI ;# PRINT RIP PUSH RDI LEA RDI, [RIP+KREGRIP] CALL KCONSTR POP RDI PUSH RDI MOV RDI, [RDI+SFRAME_RIP] CALL KCONHEX POP RDI ;# PRINT RFLAGS PUSH RDI LEA RDI, [RIP+KREGFLG] CALL KCONSTR POP RDI PUSH RDI MOV RDI, [RDI+SFRAME_RFLAGS] CALL KCONHEX POP RDI ;# NEW LINE PUSH RDI MOV RDI, '\n' CALL KCONCHR POP RDI ;# PRINT SS PUSH RDI LEA RDI, [RIP+KREGSS] CALL KCONSTR POP RDI PUSH RDI MOV RDI, [RDI+SFRAME_SS] CALL KCONHEX POP RDI ;# PRINT RSP PUSH RDI LEA RDI, [RIP+KREGRSP] CALL KCONSTR POP RDI PUSH RDI MOV RDI, [RDI+SFRAME_RSP] CALL KCONHEX POP RDI ;# HORIZONTAL LINE PUSH RDI LEA RDI, [RIP+KREGHR] CALL KCONSTR POP RDI ;# PRINT RAX PUSH RDI LEA RDI, [RIP+KREGRAX] CALL KCONSTR POP RDI PUSH RDI MOV RDI, [RDI+SFRAME_RAX] CALL KCONHEX POP RDI ;# PRINT RBX PUSH RDI LEA RDI, [RIP+KREGRBX] CALL KCONSTR POP RDI PUSH RDI MOV RDI, [RDI+SFRAME_RBX] CALL KCONHEX POP RDI ;# PRINT RCX PUSH RDI LEA RDI, [RIP+KREGRCX] CALL KCONSTR POP RDI PUSH RDI MOV RDI, [RDI+SFRAME_RCX] CALL KCONHEX POP RDI ;# NEW LINE PUSH RDI MOV RDI, '\n' CALL KCONCHR POP RDI ;# PRINT RDX PUSH RDI LEA RDI, [RIP+KREGRDX] CALL KCONSTR POP RDI PUSH RDI MOV RDI, [RDI+SFRAME_RDX] CALL KCONHEX POP RDI ;# PRINT RSI PUSH RDI LEA RDI, [RIP+KREGRSI] CALL KCONSTR POP RDI PUSH RDI MOV RDI, [RDI+SFRAME_RSI] CALL KCONHEX POP RDI ;# PRINT RDI PUSH RDI LEA RDI, [RIP+KREGRDI] CALL KCONSTR POP RDI PUSH RDI MOV RDI, [RDI+SFRAME_RDI] CALL KCONHEX POP RDI ;# NEW LINE PUSH RDI MOV RDI, '\n' CALL KCONCHR POP RDI ;# PRINT RBP PUSH RDI LEA RDI, [RIP+KREGRBP] CALL KCONSTR POP RDI PUSH RDI MOV RDI, [RDI+SFRAME_RBP] CALL KCONHEX POP RDI ;# HORIZONTAL LINE PUSH RDI LEA RDI, [RIP+KREGHR] CALL KCONSTR POP RDI ;# PRINT R8 PUSH RDI LEA RDI, [RIP+KREGR8] CALL KCONSTR POP RDI PUSH RDI MOV RDI, [RDI+SFRAME_R8] CALL KCONHEX POP RDI ;# PRINT R9 PUSH RDI LEA RDI, [RIP+KREGR9] CALL KCONSTR POP RDI PUSH RDI MOV RDI, [RDI+SFRAME_R9] CALL KCONHEX POP RDI ;# PRINT R10 PUSH RDI LEA RDI, [RIP+KREGR10] CALL KCONSTR POP RDI PUSH RDI MOV RDI, [RDI+SFRAME_R10] CALL KCONHEX POP RDI ;# NEW LINE PUSH RDI MOV RDI, '\n' CALL KCONCHR POP RDI ;# PRINT R11 PUSH RDI LEA RDI, [RIP+KREGR11] CALL KCONSTR POP RDI PUSH RDI MOV RDI, [RDI+SFRAME_R11] CALL KCONHEX POP RDI ;# PRINT R12 PUSH RDI LEA RDI, [RIP+KREGR12] CALL KCONSTR POP RDI PUSH RDI MOV RDI, [RDI+SFRAME_R12] CALL KCONHEX POP RDI ;# PRINT R13 PUSH RDI LEA RDI, [RIP+KREGR13] CALL KCONSTR POP RDI PUSH RDI MOV RDI, [RDI+SFRAME_R13] CALL KCONHEX POP RDI ;# NEW LINE PUSH RDI MOV RDI, '\n' CALL KCONCHR POP RDI ;# PRINT R14 PUSH RDI LEA RDI, [RIP+KREGR14] CALL KCONSTR POP RDI PUSH RDI MOV RDI, [RDI+SFRAME_R14] CALL KCONHEX POP RDI ;# PRINT R15 PUSH RDI LEA RDI, [RIP+KREGR15] CALL KCONSTR POP RDI PUSH RDI MOV RDI, [RDI+SFRAME_R15] CALL KCONHEX POP RDI ;# HORIZONTAL LINE PUSH RDI LEA RDI, [RIP+KREGHR] CALL KCONSTR POP RDI ;# DONE XOR RAX, RAX RET ;############################################################################### ;# DATA SECTION # ;############################################################################### ;# DATA SECTION SEGMENT ".data" ;#-----------------------------------------------------------------------------# ;# LOGGING STRINGS # ;#-----------------------------------------------------------------------------# ;# HEADING KREGHD: DB "\n" DB " " DB "------------------------------------------------" DB "------------------------------------------------" DB "\n" DB " REGISTER DUMP:" DB "\n" DB " " DB "------------------------------------------------" DB "------------------------------------------------" DB "\n" DB "\n" DB "\0" ;# HORIZONTAL LINE KREGHR: DB "\n" DB "\n" DB " " DB "------------------------------------------------" DB "------------------------------------------------" DB "\n" DB "\n" DB "\0" ;# REGISTERS KREGEXPN: DB " INTERRUPT NAME: \0" KREGEXPC: DB " INTERRUPT VECTOR: \0" KREGCODE: DB " ERROR CODE: \0" KREGCORE: DB " CPU CORE: \0" KREGCS: DB " CS: \0" KREGRIP: DB " RIP: \0" KREGFLG: DB " RFLAGS: \0" KREGSS: DB " SS: \0" KREGRSP: DB " RSP: \0" KREGRAX: DB " RAX: \0" KREGRBX: DB " RBX: \0" KREGRCX: DB " RCX: \0" KREGRDX: DB " RDX: \0" KREGRSI: DB " RSI: \0" KREGRDI: DB " RDI: \0" KREGRBP: DB " RBP: \0" KREGR8: DB " R8: \0" KREGR9: DB " R9: \0" KREGR10: DB " R10: \0" KREGR11: DB " R11: \0" KREGR12: DB " R12: \0" KREGR13: DB " R13: \0" KREGR14: DB " R14: \0" KREGR15: DB " R15: \0" ;# EXCEPTION NAMES KREGSTR: DB "DIVISION BY ZERO EXCEPTION \0" ;# 0x00 DB "DEBUG EXCEPTION \0" ;# 0x01 DB "NON MASKABLE INTERRUPT \0" ;# 0x02 DB "BREAKPOINT EXCEPTION \0" ;# 0x03 DB "OVERFLOW EXCEPTION \0" ;# 0x04 DB "BOUND RANGE \0" ;# 0x05 DB "INVALID OPCODE \0" ;# 0x06 DB "DEVICE NOT AVAILABLE \0" ;# 0x07 DB "DOUBLE FAULT \0" ;# 0x08 DB "UNSUPPORTED \0" ;# 0x09 DB "INVALID TSS \0" ;# 0x0A DB "SEGMENT NOT PRESENT \0" ;# 0x0B DB "STACK EXCEPTION \0" ;# 0x0C DB "GENERAL PROTECTION ERROR \0" ;# 0x0D DB "PAGE FAULT \0" ;# 0x0E DB "RESERVED \0" ;# 0x0F DB "X87 FLOATING POINT EXCEPTION \0" ;# 0x10 DB "ALIGNMENT CHECK \0" ;# 0x11 DB "MACHINE CHECK \0" ;# 0x12 DB "SIMD FLOATING POINT EXCEPTION \0" ;# 0x13 DB "RESERVED \0" ;# 0x14 DB "CONTROL PROTECTION EXCEPTION \0" ;# 0x15 DB "RESERVED \0" ;# 0x16 DB "RESERVED \0" ;# 0x17 DB "RESERVED \0" ;# 0x18 DB "RESERVED \0" ;# 0x19 DB "RESERVED \0" ;# 0x1A DB "RESERVED \0" ;# 0x1B DB "HYPERVISOR INJECTION EXCEPTION \0" ;# 0x1C DB "VMM COMMUNICATION EXCEPTION \0" ;# 0x1D DB "SECURITY EXCEPTION \0" ;# 0x1E DB "RESERVED \0" ;# 0x1F DB "SVC SYSTEM CALL \0" ;# 0x20 DB "SMP ENABLE CORE \0" ;# 0x21 DB "LOCAL TIMER IRQ \0" ;# 0x22 DB "LOCAL THERM SENSOR IRQ \0" ;# 0x23 DB "LOCAL PERF COUNTER IRQ \0" ;# 0x24 DB "LOCAL LINT0 IRQ \0" ;# 0x25 DB "LOCAL LINT1 IRQ \0" ;# 0x26 DB "LOCAL ERROR IRQ \0" ;# 0x27 DB "LOCAL SPURIOUS IRQ \0" ;# 0x28 DB "LOCAL SCHEDULER IRQ \0" ;# 0x29 DB "LOCAL RESERVED IRQ \0" ;# 0x2A DB "LOCAL RESERVED IRQ \0" ;# 0x2B DB "LOCAL RESERVED IRQ \0" ;# 0x2C DB "LOCAL RESERVED IRQ \0" ;# 0x2D DB "LOCAL RESERVED IRQ \0" ;# 0x2E DB "LOCAL RESERVED IRQ \0" ;# 0x2F DB "HARDWARE IRQ00 \0" ;# 0x30 DB "HARDWARE IRQ01 \0" ;# 0x31 DB "HARDWARE IRQ02 \0" ;# 0x32 DB "HARDWARE IRQ03 \0" ;# 0x33 DB "HARDWARE IRQ04 \0" ;# 0x34 DB "HARDWARE IRQ05 \0" ;# 0x35 DB "HARDWARE IRQ06 \0" ;# 0x36 DB "HARDWARE IRQ07 \0" ;# 0x37 DB "HARDWARE IRQ08 \0" ;# 0x38 DB "HARDWARE IRQ09 \0" ;# 0x39 DB "HARDWARE IRQ10 \0" ;# 0x3A DB "HARDWARE IRQ11 \0" ;# 0x3B DB "HARDWARE IRQ12 \0" ;# 0x3C DB "HARDWARE IRQ13 \0" ;# 0x3D DB "HARDWARE IRQ14 \0" ;# 0x3E DB "HARDWARE IRQ15 \0" ;# 0x3F ;# "0123456789ABCDEF0123456789ABCDEF"
35.337232
81
0.323643
a1afb614b8c554e8b8e97ba537f8f730d771e90c
381
asm
Assembly
Student/examples/Correct/Subprograms/Correct_211.asm
SoftMoore/CPRL-Kt
c2dfdbd5b30ed6175f419398071e2f98e582d23a
[ "Unlicense" ]
6
2021-02-02T10:08:02.000Z
2022-03-24T08:10:44.000Z
Student/examples/Correct/Subprograms/Correct_211.asm
SoftMoore/CPRL-Kt
c2dfdbd5b30ed6175f419398071e2f98e582d23a
[ "Unlicense" ]
1
2021-02-27T21:55:26.000Z
2021-02-28T12:39:29.000Z
Student/examples/Correct/Subprograms/Correct_211.asm
SoftMoore/CPRL-Kt
c2dfdbd5b30ed6175f419398071e2f98e582d23a
[ "Unlicense" ]
6
2020-02-24T13:51:32.000Z
2021-06-05T19:02:05.000Z
PROGRAM 4 BR L5 L0: PROC 0 LDLADDR -8 LOADW LOADW LDLADDR -4 LOADW CMP BGE L3 LDLADDR -8 LOADW LDLADDR -8 LOADW LOADW LDCINT 1 ADD STOREW BR L4 L3: RET 8 L4: RET 8 L5: LDGADDR 0 LDCINT 13 STOREW LDGADDR 0 LDCINT 10 CALL L0 LDCSTR "n = " PUTSTR LDGADDR 0 LOADW PUTINT PUTEOL HALT
9.769231
16
0.548556
44e0e9a60883a1fd75b8fe29b2464e21fa21479f
5,413
asm
Assembly
Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0x48.log_21829_2144.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0x48.log_21829_2144.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0x48.log_21829_2144.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 %r15 push %rax push %rbp push %rbx push %rcx push %rdi push %rsi lea addresses_D_ht+0x124af, %r12 sub $2665, %rbp mov $0x6162636465666768, %r15 movq %r15, %xmm6 vmovups %ymm6, (%r12) nop nop nop nop nop dec %r15 lea addresses_D_ht+0xccd5, %rcx nop nop nop nop cmp %r12, %r12 movb (%rcx), %bl nop nop nop nop and $65427, %r15 lea addresses_normal_ht+0x9e6f, %rdi nop nop xor $32858, %rbx movups (%rdi), %xmm4 vpextrq $1, %xmm4, %r12 nop nop nop cmp $60952, %r12 lea addresses_WT_ht+0x16477, %r12 clflush (%r12) nop cmp $6249, %rax movups (%r12), %xmm0 vpextrq $1, %xmm0, %rbp nop nop nop nop xor %r12, %r12 lea addresses_UC_ht+0x354b, %r12 nop nop nop cmp %rbx, %rbx movw $0x6162, (%r12) nop sub %rax, %rax lea addresses_WT_ht+0xe12f, %rsi lea addresses_D_ht+0x184af, %rdi clflush (%rdi) xor $9041, %r15 mov $6, %rcx rep movsq nop nop nop xor %rbp, %rbp pop %rsi pop %rdi pop %rcx pop %rbx pop %rbp pop %rax pop %r15 pop %r12 ret .global s_faulty_load s_faulty_load: push %r11 push %r12 push %r13 push %r14 push %r9 push %rdx // Faulty Load lea addresses_WC+0x5caf, %rdx nop nop nop cmp $27042, %r12 mov (%rdx), %r13 lea oracles, %r11 and $0xff, %r13 shlq $12, %r13 mov (%r11,%r13,1), %r13 pop %rdx pop %r9 pop %r14 pop %r13 pop %r12 pop %r11 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_WC', 'AVXalign': False, 'congruent': 0, 'size': 16, 'same': False, 'NT': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_WC', 'AVXalign': False, 'congruent': 0, 'size': 8, 'same': True, 'NT': False}} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 7, 'size': 32, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 0, 'size': 1, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 6, 'size': 16, 'same': True, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 3, 'size': 16, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 2, 'size': 2, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 7, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 9, 'same': False}} {'00': 21829} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
42.622047
2,999
0.658969
7e2c310face4f8c727b74cbd7904e0a735014e13
13,705
asm
Assembly
kernel/iodev/ps2.asm
leonardoruilova/xos
1e72d2294a7373dbbd601e6796a8a95d0d7056a8
[ "MIT" ]
1
2021-03-21T19:49:05.000Z
2021-03-21T19:49:05.000Z
kernel/iodev/ps2.asm
leonardoruilova/xos
1e72d2294a7373dbbd601e6796a8a95d0d7056a8
[ "MIT" ]
null
null
null
kernel/iodev/ps2.asm
leonardoruilova/xos
1e72d2294a7373dbbd601e6796a8a95d0d7056a8
[ "MIT" ]
null
null
null
;; xOS32 ;; Copyright (C) 2016-2017 by Omar Mohammad. use32 ; PS/2 Keyboard Commands PS2_KBD_RESET = 0xFF PS2_KBD_SET_AUTOREPEAT = 0xF3 PS2_KBD_SET_SCANCODE = 0xF0 PS2_KBD_ENABLE_MB = 0xFA PS2_KBD_ENABLE = 0xF4 PS2_KBD_DISABLE = 0xF5 PS2_KBD_SET_LEDS = 0xED ; PS/2 Keyboard LEDs Bitfield PS2_KBD_SCROLL_LOCK = 0x01 PS2_KBD_NUM_LOCK = 0x02 PS2_KBD_CAPS_LOCK = 0x04 ; Some "Control" Keys LEFT_SHIFT = 0x36 RIGHT_SHIFT = 0x2A CAPS_LOCK = 0x3A NUM_LOCK = 0x45 ; Keyboard Status Bitfield KBD_STATUS_SHIFT = 0x01 KBD_STATUS_CAPS_LOCK = 0x02 KBD_STATUS_NUM_LOCK = 0x04 ; PS/2 Mouse Commands PS2_MOUSE_COMMAND = 0xD4 PS2_MOUSE_DEFAULTS = 0xF6 PS2_MOUSE_ENABLE_AUX = 0xA8 PS2_MOUSE_DISABLE_AUX = 0xA9 PS2_MOUSE_GET_ID = 0xF2 PS2_MOUSE_RESET = 0xFF PS2_MOUSE_ENABLE = 0xF4 PS2_MOUSE_DISABLE = 0xF5 PS2_MOUSE_SET_RESOLUTION = 0xE8 PS2_MOUSE_SET_SPEED = 0xF3 ; Format Of PS/2 Mouse Packet Data MOUSE_LEFT_BTN = 0x01 MOUSE_RIGHT_BTN = 0x02 MOUSE_MIDDLE_BTN = 0x04 MOUSE_X_SIGN = 0x10 MOUSE_Y_SIGN = 0x20 MOUSE_X_OVERFLOW = 0x40 MOUSE_Y_OVERFLOW = 0x80 ; Keyboard Stuff kbd_status db 0 kbd_leds db 0 last_scancode db 0 last_character db 0 old_scancode db 0 ; Mouse Speed mouse_speed db 0 ; 0 normal speed, 1 -> 4 fast speeds mouse_id db 0 align 4 mouse_data dd 0 mouse_x dd 0 mouse_y dd 0 mouse_old_data dd 0 mouse_old_x dd 0 mouse_old_y dd 0 align 4 ; these contain the initial x/y pos at the moment the button was pressed mouse_initial_x dd 0 mouse_initial_y dd 0 align 4 mouse_x_max dd 0 mouse_y_max dd 0 mouse_cursor dd 0 mouse_width dd 0 mouse_height dd 0 mouse_visible db 0 mouse_packet: .data db 0 .x db 0 .y db 0 mouse_irq_state db 0 ps2_present db 0 ; acpi determines this field using fadt ; wait_ps2_write: ; Waits to write to the PS/2 controller wait_ps2_write: push eax .wait: in al, 0x64 test al, 2 jnz .wait pop eax ret ; wait_ps2_read: ; Waits to read the PS/2 controller wait_ps2_read: push eax .wait: in al, 0x64 test al, 1 jz .wait pop eax ret ; ps2_send: ; Sends a PS/2 command ; In\ AL = Command/data byte ; Out\ AL = Returned ACK byte ps2_send: call wait_ps2_write out 0x60, al call wait_ps2_read in al, 0x60 ret ; ps2_send_noack: ; Sends a PS/2 command without waiting for ack ; In\ AL = Command/data byte ; Out\ Nothing ps2_send_noack: call wait_ps2_write out 0x60, al ret ; ps2_reset: ; Resets the PC using the PS/2 controller ps2_reset: cli mov al, 0xFF out 0x21, al out 0xA1, al mov ecx, 64 .loop: mov al, 0xFE out 0x64, al loop .loop ret ; ps2_init: ; Initializes the PS/2 controller & devices ps2_init: cmp [ps2_present], 0 je .finish mov esi, .msg call kprint call ps2_kbd_init call ps2_mouse_init .finish: ret .msg db "Initializing PS/2 controller...",10,0 ; ps2_kbd_init: ; Initializes the PS/2 keyboard ps2_kbd_init: mov al, IRQ_BASE+0x01 mov ebp, ps2_kbd_irq ; irq handler call install_isr mov [kbd_status], 0 .reset_again: mov al, PS2_KBD_RESET call ps2_send cmp al, 0xFF je .no_kbd cmp al, 0xFC je .no_kbd cmp al, 0xFD je .no_kbd cmp al, 0xFE je .reset_again mov ecx, 3 .wait_for_success: call wait_ps2_read in al, 0x60 cmp al, 0xAA je .continue jmp .wait_for_success .continue: ; autorepeat rate mov al, PS2_KBD_SET_AUTOREPEAT call ps2_send mov al, 0x20 call ps2_send ; scancode set 2 mov al, PS2_KBD_SET_SCANCODE call ps2_send mov al, 2 call ps2_send ; turn on the numlock LED mov al, PS2_KBD_NUM_LOCK call ps2_kbd_set_leds ; enable numlock by default for comfortability mov [kbd_status], KBD_STATUS_NUM_LOCK ; enable keyboard mov al, PS2_KBD_ENABLE call ps2_send call iowait call iowait ; unmask the PIC IRQ mov al, 1 call irq_unmask ret .no_kbd: mov esi, .no_kbd_msg call kprint ret .no_kbd_msg db "ps2: keyboard not present.",10,0 ; ps2_kbd_set_leds: ; Sets the LEDs of the PS/2 keyboard ; In\ AL = LED bitfield ; Out\ Nothing align 32 ps2_kbd_set_leds: push eax mov al, PS2_KBD_SET_LEDS call ps2_send pop eax push eax call ps2_send pop eax mov [kbd_leds], al ret ; ps2_kbd_irq: ; PS/2 Keyboard IRQ Handler align 32 ps2_kbd_irq: pusha in al, 0x60 ; read the scancode ; check for control keys cmp al, LEFT_SHIFT je .turn_on_shift cmp al, RIGHT_SHIFT je .turn_on_shift cmp al, LEFT_SHIFT or 0x80 ; was the left shift released? je .turn_off_shift cmp al, RIGHT_SHIFT or 0x80 ; right shift released? je .turn_off_shift cmp al, CAPS_LOCK ; caps lock? je .toggle_caps_lock cmp al, NUM_LOCK ; num lock? je .toggle_num_lock cmp al, 0xE0 je .escape_sequence ; now the key is most likely a letter or number... ; soon I'll add support for NumLock and the numpad ; but for now, we'll assume it's a "printable" character test al, 0x80 ; key released? jnz .finish ; ignore it and eax, 0x7F mov [last_scancode], al ; check if it is an arrow key/numpad key cmp [last_scancode], 0x47 ; numpad 7/Home jl .start cmp [last_scancode], 0x52 ; numpad 0/Insert jg .start ; was it a gray key or numpad key? cmp [old_scancode], 0xE0 ; escape sequence je .gray_key ; now we know it was a numpad key -- treat it like a gray key if numpad is off test [kbd_status], KBD_STATUS_NUM_LOCK jz .gray_key ; it's a numpad key -- no denying anymore... jmp .start .escape_sequence: mov [old_scancode], 0xE0 jmp .finish .start: mov [old_scancode], 0 ; depending on shift and caps lock state, use the appropriate key mapping ;cmp [kbd_status], 0 ;je .normal test [kbd_status], KBD_STATUS_SHIFT jnz .shift test [kbd_status], KBD_STATUS_CAPS_LOCK jnz .caps_lock test [kbd_status], KBD_STATUS_SHIFT or KBD_STATUS_CAPS_LOCK jnz .shift_caps_lock jmp .normal .normal: add eax, ascii_codes mov al, [eax] mov [last_character], al jmp .event .shift: add eax, ascii_codes_shift mov al, [eax] mov [last_character], al jmp .event .caps_lock: add eax, ascii_codes_caps_lock mov al, [eax] mov [last_character], al jmp .event .shift_caps_lock: add eax, ascii_codes_shift_caps_lock mov al, [eax] mov [last_character], al jmp .event .gray_key: mov [old_scancode], 0 mov [last_character], 0 .event: call wm_kbd_event ; notify the wm which will notify apps waiting for events jmp .finish .turn_on_shift: or [kbd_status], KBD_STATUS_SHIFT jmp .finish .turn_off_shift: and [kbd_status], not KBD_STATUS_SHIFT jmp .finish .toggle_caps_lock: test [kbd_status], KBD_STATUS_CAPS_LOCK jz .turn_on_caps_lock .turn_off_caps_lock: and [kbd_status], not KBD_STATUS_CAPS_LOCK mov al, [kbd_leds] and al, not PS2_KBD_CAPS_LOCK call ps2_kbd_set_leds jmp .finish .turn_on_caps_lock: or [kbd_status], KBD_STATUS_CAPS_LOCK mov al, [kbd_leds] or al, PS2_KBD_CAPS_LOCK call ps2_kbd_set_leds jmp .finish .toggle_num_lock: test [kbd_status], KBD_STATUS_NUM_LOCK jz .turn_on_num_lock .turn_off_num_lock: and [kbd_status], not KBD_STATUS_NUM_LOCK mov al, [kbd_leds] and al, not PS2_KBD_NUM_LOCK call ps2_kbd_set_leds jmp .finish .turn_on_num_lock: or [kbd_status], KBD_STATUS_NUM_LOCK mov al, [kbd_leds] or al, PS2_KBD_NUM_LOCK call ps2_kbd_set_leds .finish: mov al, 0x20 out 0x20, al popa iret ; ps2_kbd_read: ; Reads from the PS/2 keyboard ; In\ Nothing ; Out\ AH = ASCII Scancode ; Out\ AL = ASCII Character ps2_kbd_read: mov ah, [last_scancode] mov al, [last_character] ret ; ps2_mouse_send: ; Sends mouse data to the PS/2 mouse ; In\ AL = Data ; Out\ AL = ACK byte ps2_mouse_send: push eax call wait_ps2_write mov al, PS2_MOUSE_COMMAND out 0x64, al call wait_ps2_write pop eax out 0x60, al call wait_ps2_read in al, 0x60 ret ; ps2_mouse_init: ; Initializes the PS/2 Mouse ps2_mouse_init: mov al, IRQ_BASE+12 mov ebp, ps2_mouse_irq call install_isr ; NOTE: At least in QEMU, PS/2 mouse initialision fails if the keyboard can send IRQs ; The work-arounds are either CLI or Masking the PS/2 keyboard IRQ ; If someone knows, is there is a reason for this or is it a bug in QEMU? ; This doesn't happen in VBox, Bochs or in two real PCs. call iowait call iowait mov al, 1 call irq_mask ; enable auxiliary mouse device call wait_ps2_write mov al, PS2_MOUSE_ENABLE_AUX out 0x64, al call iowait ; this command doesn't generate an ack, so wait for it to finish ; reset the mouse mov al, PS2_MOUSE_RESET call ps2_mouse_send mov ecx, 3 .loop: cmp al, 0 je .no_mouse cmp al, 0xFF je .no_mouse cmp al, 0xFC je .no_mouse cmp al, 0xFD je .no_mouse cmp al, 0xAA je .reset_finish call wait_ps2_read in al, 0x60 loop .loop jmp .no_mouse .reset_finish: ; read mouseID byte call wait_ps2_read in al, 0x60 cmp al, 0 jne .no_mouse mov [mouse_id], al ; demand the mouse ID again mov al, PS2_MOUSE_GET_ID call ps2_mouse_send cmp al, 0xFA jne .no_mouse call wait_ps2_read in al, 0x60 cmp al, 0 jne .no_mouse ; disable mouse packets mov al, PS2_MOUSE_DISABLE call ps2_mouse_send cmp al, 0xFA jne .no_mouse ; set default values mov al, PS2_MOUSE_DEFAULTS call ps2_mouse_send cmp al, 0xFA jne .no_mouse ; set resolution ;mov al, PS2_MOUSE_SET_RESOLUTION ;call ps2_mouse_send ;mov al, 0 ;call ps2_mouse_send ; set packets per second ;mov al, PS2_MOUSE_SET_SPEED ;call ps2_mouse_send ;mov al, 200 ;call ps2_mouse_send ; some mice don't support 200 packets/second ; on those mice, use the default rate 100 packets ;cmp al, 0xFA ;je .after ;mov esi, .100_msg ;call kprint ;mov al, PS2_MOUSE_SET_SPEED ;call ps2_mouse_send ;mov al, 100 ;call ps2_mouse_send .after: ; enable packets mov al, PS2_MOUSE_ENABLE call ps2_mouse_send cmp al, 0xFA jne .no_mouse ; enable irq12 call wait_ps2_write mov al, 0x20 out 0x64, al call wait_ps2_read in al, 0x60 or al, 2 push eax call wait_ps2_write mov al, 0x60 out 0x64, al call wait_ps2_write pop eax out 0x60, al ; apparantly delays here are needed in some hardware ; it doesn't hurt anyway ;) call iowait call iowait call iowait call iowait ; unmask the mouse irq mov al, 12 call irq_unmask ; and keyboard irq also mov al, 1 call irq_unmask ret .no_mouse: mov esi, .no_mouse_msg call kprint ret .no_mouse_msg db "ps2: mouse not present.",10,0 .100_msg db "ps2: mouse doesn't support 200 packets/sec, using default...",10,0 ; ps2_mouse_irq: ; PS/2 Mouse IRQ Handler align 32 ps2_mouse_irq: pusha ; is the byte from the mouse or keyboard? in al, 0x64 test al, 0x20 jz .done in al, 0x60 mov dl, [mouse_irq_state] or dl, dl jz .data cmp dl, 1 je .x cmp dl, 2 je .y mov [mouse_irq_state], 0 jmp .done .data: ;test al, MOUSE_X_OVERFLOW OR MOUSE_Y_OVERFLOW ;jnz .done test al, 8 ; align jz .done mov [mouse_packet.data], al inc [mouse_irq_state] jmp .done .x: mov [mouse_packet.x], al inc [mouse_irq_state] jmp .done .y: mov [mouse_packet.y], al xor dl, dl mov [mouse_irq_state], dl call update_mouse test [mouse_data], MOUSE_LEFT_BTN jz .redraw call wm_mouse_event jmp .done .redraw: call redraw_mouse jmp .done .done: mov al, 0x20 out 0xa0, al out 0x20, al popa iret ; update_mouse: ; Updates the mouse position align 32 update_mouse: ; if the mouse data doesn't have proper alignment, ignore the packet ;test [mouse_packet.data], 8 ;jz .quit ; if the overflow bits are set, ignore the packet ;test [mouse_packet.data], MOUSE_X_OVERFLOW ;jnz .quit ;test [mouse_packet.data], MOUSE_Y_OVERFLOW ;jnz .quit ; save the old mouse state before determining its new state mov eax, [mouse_data] mov [mouse_old_data], eax mov al, [mouse_packet.data] mov [mouse_data], eax mov eax, [mouse_x] mov [mouse_old_x], eax mov eax, [mouse_y] mov [mouse_old_y], eax .do_x: ; do the x pos first movzx eax, [mouse_packet.x] test [mouse_packet.data], MOUSE_X_SIGN jnz .x_neg .x_pos: add [mouse_x], eax jmp .do_y .x_neg: not al inc al sub [mouse_x], eax jns .do_y xor eax, eax mov [mouse_x], eax .do_y: ; do the same for y position movzx eax, [mouse_packet.y] test [mouse_packet.data], MOUSE_Y_SIGN jnz .y_neg .y_pos: sub [mouse_y], eax jns .check_x xor eax, eax mov [mouse_y], eax jmp .check_x .y_neg: not al inc al add [mouse_y], eax .check_x: mov eax, [mouse_x] cmp eax, [mouse_x_max] jge .x_max jmp .check_y .x_max: mov eax, [mouse_x_max] mov [mouse_x], eax .check_y: mov eax, [mouse_y] cmp eax, [screen.height] jge .y_max jmp .quit .y_max: mov eax, [screen.height] dec eax mov [mouse_y], eax .quit: ret ; show_mouse: ; Shows the mouse cursor align 32 show_mouse: mov [mouse_visible], 1 call redraw_mouse ret ; hide_mouse: ; Hides the mouse cursor align 32 hide_mouse: mov [mouse_visible], 0 call redraw_screen ; redraw screen objects to hide mouse ;) ret ; redraw_mouse: ; Redraws the mouse align 32 redraw_mouse: test [mouse_visible], 1 jz .only_screen ; only redraw if the mouse has actually been "moved" ; for click events, don't redraw -- it prevents flickering ;mov eax, [mouse_x] ;cmp eax, [mouse_old_x] ;jne .redraw ;mov eax, [mouse_y] ;cmp eax, [mouse_old_y] ;jne .redraw ;jmp .only_screen .redraw: call use_back_buffer call unlock_screen call redraw_screen call use_front_buffer ; just for testing ;) ;mov eax, [mouse_x] ;mov ebx, [mouse_y] ;mov esi, 16 ;mov edi, 16 ;mov edx, 0xd8d8d8 ;call fill_rect mov eax, [mouse_x] mov ebx, [mouse_y] mov esi, [mouse_width] mov edi, [mouse_height] mov ecx, 0xd8d8d8 ; transparent color mov edx, [mouse_cursor] call blit_buffer ;call use_back_buffer ;call unlock_screen ret align 32 .only_screen: call use_back_buffer call unlock_screen call redraw_screen ret
16.104583
86
0.726888
a778c12773bfaef1066696965d63d0ef747498ea
101
asm
Assembly
c64/kapi_nm.asm
alexkazik/disk2easyflash
1ee3b54756cab104ad7a131576ad663dfde6436c
[ "0BSD" ]
1
2021-04-08T05:41:41.000Z
2021-04-08T05:41:41.000Z
c64/kapi_nm.asm
alexkazik/disk2easyflash
1ee3b54756cab104ad7a131576ad663dfde6436c
[ "0BSD" ]
null
null
null
c64/kapi_nm.asm
alexkazik/disk2easyflash
1ee3b54756cab104ad7a131576ad663dfde6436c
[ "0BSD" ]
null
null
null
.const ULTIMAX = false .const BANK_START = $8000 .const BANK_SIZE = $4000 .import source "main.asm"
16.833333
25
0.722772
d88c3bbdd39e215d3f544de74b579add4d25d5d5
4,066
asm
Assembly
Proejct_02.asm
Rufian55/Assembly
e86b8f6920a774bc7648b781effa34545d5ad1ab
[ "MIT" ]
1
2016-11-17T23:39:01.000Z
2016-11-17T23:39:01.000Z
Proejct_02.asm
Rufian55/Assembly
e86b8f6920a774bc7648b781effa34545d5ad1ab
[ "MIT" ]
null
null
null
Proejct_02.asm
Rufian55/Assembly
e86b8f6920a774bc7648b781effa34545d5ad1ab
[ "MIT" ]
null
null
null
TITLE Program #2 (Project_02.asm) ; Author: Chris Kearns ; Date: 17 Apr 2016 ; Description: Program calculates Fibonacci numbers. ; Displays program title, programmer’s name, gets user’s name, and greets user. ; Prompts user to enter number of Fibonacci terms to be displayed. ; Advises user to enter an integer in the range [1 ... 46]. ; Gets and validate user input (n). ; Calculates and displays Fibonacci numbers from 1 to nth term inclusive. ; Results displayed 5 terms per line with 5 spaces between terms. ; Displays parting message including user’s name and terminates. INCLUDE Irvine32.inc UPLIM EQU 46 ; Upper Limit of User Input that program will accept. TAB = 9 ; Ascii code for tab. .data intro_1 BYTE "Welcome to ""Kearns_Project02.asm"" by Chris Kearns",13,10,13,10,0 EC_1 BYTE "Outputted Fibonaccis are aligned in columns!",13,10,13,10,0 userMsg_1 BYTE "Please enter your name, maximum of 30 characters",13,10,0 userMsg_2 BYTE "Hello ",0 userName BYTE 31 dup(0) userMsg_3 BYTE ", welcome to the Fibonacci Number Generator!",13,10,13,10,0 userMsg_4 BYTE "If you enter an int from 1 to ",0 userMsg_5 BYTE " inclusive",13,10 BYTE "I will display for you the Fibonacci number sequence",13,10 BYTE "from 1 to your entered int.",13,10,0 userMsg_6 BYTE "Enter the number of Fibonacci terms you wish to see: ",13,10,0 userMsg_7 BYTE "I'm sorry, you've input an out of range value!" BYTE " Please enter an int from 1 to ",0 userMsg_8 BYTE " inclusive:",0 userInt DWORD ? ; The user's desired number of Fibonacci numbers. tabSprs DWORD ? ; A computed int used to suppress tabs for higher # of digit Fibonaccis (userInt-11). fibEAX DWORD ? ; Used to temp store EAX as we need this register to check for 5th Fibonacci as mult. of 5. fibEBX DWORD 5 ; Used as our divisor for checking ECX for multiple of 5 condition. five_ BYTE " ",0 ;String of 5 spaces. userMsg_Y BYTE "Thank you, ",0 userMsg_Z BYTE ", for trying ""Kearns_Project02.asm,""",13,10 BYTE "the Fibonacci Number Generator!",13,10,13,10,0 .code main PROC ;Introduction mov EDX, OFFSET intro_1 call writeString mov EDX, OFFSET EC_1 call writeString mov EDX, OFFSET usermsg_1 call writeString mov EDX, OFFSET userName mov ECX, sizeof userName call readString call CrLf mov EDX, OFFSET userMsg_2 call writeString mov edx, offset userName call writeString mov EDX, OFFSET userMsg_3 call writeString ;User Instructions mov EDX, OFFSET userMsg_4 call writeString mov EAX, UPLIM call writeDec mov EDX, OFFSET userMsg_5 call writeString mov EDX, OFFSET userMsg_6 call writeString ;Get User Data do: call readInt mov userInt, EAX ;while cmp EAX, 0 jbe inputBad cmp EAX, UPLIM ja inputBad jmp inputOK inputBad: mov EDX, OFFSET userMsg_7 call writeString mov eax, UPLIM call writeDec mov EDX, OFFSET userMsg_8 call writeString jmp do inputOK: call CrLf ;end do while loop ;Process tabSprs (Used to suppress column tab seperators above Fibonacci sequence 35) mov eax, userInt sub eax, 11 mov tabSprs, eax ;Display Fibonaccis mov ECX, userInt mov EAX, 1 mov EBX, 0 mov EDX, OFFSET five_ generate: add EAX, EBX call writeDec call writeString pushad ; pushad to store registers. mov al, TAB call writeChar cmp ECX, tabSprs ; skip the tab when displaying > 35 Fibonacci's jbe skipTab call writeChar skipTab: popad ; popad to restore registers. xchg EAX, EBX mov fibEAX, EAX ; store register manually mov fibEBX, EBX ; store register manually xchg EAX, EBX mov EBX, 5 mov EDX,0 div EBX cmp EDX, 0 jnz notMult5 ; skips the newline unless 5 numbers have been displayed. call CrLf notMult5: mov EAX, fibEAX ; restore registers manually mov EBX, fibEBX ; just to see the difference with pushad & popad. mov EDX, OFFSET five_ loop generate ;Farewell call CrLf call CrLf mov EDX, OFFSET userMsg_Y call writeString mov EDX, OFFSET userName call writeString mov EDX, OFFSET userMsg_Z call writeString exit main ENDP END main
26.75
108
0.737334
4f158edd51d2817d213ba95e2aac156ef4f15431
1,452
asm
Assembly
ffight/lcs/enemy/56.asm
zengfr/arcade_game_romhacking_sourcecode_top_secret_data
a4a0c86c200241494b3f1834cd0aef8dc02f7683
[ "Apache-2.0" ]
6
2020-10-14T15:29:10.000Z
2022-02-12T18:58:54.000Z
ffight/lcs/enemy/56.asm
zengfr/arcade_game_romhacking_sourcecode_top_secret_data
a4a0c86c200241494b3f1834cd0aef8dc02f7683
[ "Apache-2.0" ]
null
null
null
ffight/lcs/enemy/56.asm
zengfr/arcade_game_romhacking_sourcecode_top_secret_data
a4a0c86c200241494b3f1834cd0aef8dc02f7683
[ "Apache-2.0" ]
1
2020-12-17T08:59:10.000Z
2020-12-17T08:59:10.000Z
copyright zengfr site:http://github.com/zengfr/romhack 0039FA movem.l D0-D3, -(A6) 0039FE movem.l D0-D3, -(A6) 009ACA dbra D5, $9ac8 027100 move.w #$48, ($56,A6) [enemy+50] 027106 tst.b ($36,A6) [enemy+56] 0271E4 move.w #$48, ($56,A6) [enemy+50] 0271EA tst.b ($36,A6) [enemy+56] 02749C move.w #$48, ($56,A6) [enemy+50] 0274A2 tst.b ($36,A6) [enemy+56] 027522 move.w #$48, ($56,A6) [enemy+50] 027528 tst.b ($36,A6) [enemy+56] 027848 move.w #$48, ($56,A6) [enemy+50] 02784E tst.b ($36,A6) [enemy+56] 0278CE move.w #$48, ($56,A6) [enemy+50] 0278D4 tst.b ($36,A6) [enemy+56] 035C9C move.w #$48, ($56,A6) [enemy+54] 035CA2 tst.b ($2e,A6) [enemy+56] 035D12 move.w #$48, ($56,A6) [enemy+54] 035D18 tst.b ($2e,A6) [enemy+56] 036108 move.w #$48, ($56,A6) [enemy+54] 03610E tst.b ($2e,A6) [enemy+56] 03619A move.w #$48, ($56,A6) [enemy+54] 0361A0 tst.b ($2e,A6) [enemy+56] 0392B0 move.w #$66, ($56,A6) [enemy+54] 0392B6 move.w #$5, ($52,A6) [enemy+56] 03987C move.w #$48, ($56,A6) [enemy+54] 039882 tst.b ($2e,A6) [enemy+56] 0398EE move.w #$48, ($56,A6) [enemy+54] 0398F4 tst.b ($2e,A6) [enemy+56] 039D04 move.w #$58, ($56,A6) [enemy+50] 039D0A tst.b ($2e,A6) [enemy+56] 03A222 move.w #$48, ($56,A6) [enemy+54] 03A228 tst.b ($2e,A6) [enemy+56] 03A294 move.w #$48, ($56,A6) [enemy+54] 03A29A tst.b ($2e,A6) [enemy+56] copyright zengfr site:http://github.com/zengfr/romhack
36.3
54
0.595041
8817433512f1c71bed3aede4b00404d0a57ed589
981
asm
Assembly
Windows/Detector/_Detector.asm
fplu/Detector
1e214f70e309f4e46533b8ad155e2f3ef9a86c6d
[ "MIT" ]
15
2022-03-11T16:42:40.000Z
2022-03-18T09:18:21.000Z
Windows/Detector/_Detector.asm
fplu/Detector
1e214f70e309f4e46533b8ad155e2f3ef9a86c6d
[ "MIT" ]
null
null
null
Windows/Detector/_Detector.asm
fplu/Detector
1e214f70e309f4e46533b8ad155e2f3ef9a86c6d
[ "MIT" ]
4
2020-11-16T13:45:45.000Z
2022-03-12T03:07:31.000Z
GLOBAL _ModifiedThread GLOBAL _ThreadWhichModify section .text ; makes this executable align 4096 ; aligns on page size for both x86 and x64 architectures, ensure that _ModifiedThread and codeToModify are on the same page _ThreadWhichModify: mov byte[rel Sync], 1 ; Synchronize the thread, but too early in order to exploit the FIFO property of the processor cache. mov byte[rel codeToModify + 1], 1 ; Transform 'mov eax, 0' into 'mov eax, 1'. ret _ModifiedThread: cmp byte[rel Sync], 0 ; Wait for the synchronisation. jz _ModifiedThread ; ;If a DBI is here, or a debug interrupts the detection will occur. ;In order to detect VM you should add several CPUID here (depending on your processor). codeToModify: ; 0B8h is the opcode for mov eax, imm32, here imm32 is 0. db 0B8h, 00h, 00h, 00h, 00h ; mov eax, 0 ret section .data ; Makes this writable and ensure it is not in the same memory page than the code above. Sync : db 0
35.035714
135
0.72579
5ca1ca7e403a2b8758afe59ea8ba4d8d1e725aa7
288
asm
Assembly
basic/01_hello_world/helloworld68.asm
bellshade/Assembly
94e1ab38f9f217b414cf1d19f9c52c052b7ec2e0
[ "MIT" ]
6
2021-11-12T14:13:57.000Z
2022-02-18T08:24:42.000Z
basic/01_hello_world/helloworld68.asm
AdityaFitrianaNS/Assembly
c412279c8042300e77ec862c13e19f0c1cdf71af
[ "MIT" ]
2
2021-11-22T00:50:03.000Z
2021-11-24T01:14:24.000Z
basic/01_hello_world/helloworld68.asm
AdityaFitrianaNS/Assembly
c412279c8042300e77ec862c13e19f0c1cdf71af
[ "MIT" ]
4
2021-11-22T00:18:36.000Z
2022-03-22T06:35:31.000Z
SECTION .data pesan db 'bellshade', 0Ah SECTION .text global _start _start: mov edx, 13 mov ecx, pesan mov ebx, 1 mov eax, 4 int 80h mov ebx, 0 ; return 0 jika status exit bersifat error mov eax, 1 ; mengaktifkan SYS_EXIT (kernal opcode 1) int 80h
16.941176
58
0.642361
0bc7284ff8042f2b76ce5c79f33030cabe82ad42
12,711
asm
Assembly
Driver/Printer/Fax/Group3/group3QuickNumber.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
504
2018-11-18T03:35:53.000Z
2022-03-29T01:02:51.000Z
Driver/Printer/Fax/Group3/group3QuickNumber.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
96
2018-11-19T21:06:50.000Z
2022-03-06T10:26:48.000Z
Driver/Printer/Fax/Group3/group3QuickNumber.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
73
2018-11-19T20:46:53.000Z
2022-03-29T00:59:26.000Z
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright (c) Geoworks 1994. All rights reserved. GEOWORKS CONFIDENTIAL PROJECT: Pasta MODULE: Fax FILE: group3QuickNumber.asm AUTHOR: Andy Chiu, Oct 6, 1993 ROUTINES: Name Description ---- ----------- QuickNumbersListSetCurrentSelection Routine that is called when an item has been selected from the quick numbers list. This will replace the text in the fax # with the number from the list. QuickNumbersListRequestItemMoniker Writes the corresponding moniker to the Quick Number List from the file of quick numbers. QuickNumbersListVisOpen This routine tells the Group3NumberText object to apply it's message if it has been modified. This way we can unselect an item if the user has modified the number in any way. REVISION HISTORY: Name Date Description ---- ---- ----------- AC 10/ 6/93 Initial revision DESCRIPTION: Routines to handle the quick number attributes of Fax UI. $Id: group3QuickNumber.asm,v 1.1 97/04/18 11:53:01 newdeal Exp $ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% QuickNumbersListSetCurrentSelection %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Routine that is called when an item has been selected from the quick numbers list. This will replace the text in the fax # with the number from the list. CALLED BY: MSG_QUICK_NUMBERS_LIST_SET_CURRENT_SELECTION PASS: *ds:si = QuickNumbersListClass object ds:di = QuickNumbersListClass instance data ds:bx = QuickNumbersListClass object (same as *ds:si) es = segment of QuickNumbersListClass ax = message # cx = current selection bp = num of selections dl = GenItemGroupStateFlags RETURN: nothing DESTROYED: ax, cx, dx, bp SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- AC 10/ 6/93 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ QuickNumbersListSetCurrentSelection method dynamic QuickNumbersListClass, MSG_QUICK_NUMBERS_LIST_SET_CURRENT_SELECTION push ds ; save segment of this obj push cx ; item to get ; ; Get the chunk array that contains the quick list. ; mov si, offset FaxDialogBox mov ax, MSG_FAX_INFO_GET_QUICK_LIST_HANDLES call ObjCallInstanceNoLock ; ax <- heap handle ; cx <- chunk handle ; ; See if the heap is zero. If it is, it means that we couldn't ; get that information from the fax file information and we ; have to fake it like there is no information. ; tst ax jz doNotWriteNumber ; ; Else the handles are OK. Find out the appropiate entry that the ; user put in. ; mov_tr bx, ax ; bx <- mem handle call MemLock ; ax <- segment mov ds, ax mov si, cx ; *ds:si <- chunk array ; ; Make sure an actual number is being selected and not because ; we put a bogus element in the list ; call ChunkArrayGetCount ; cx <- # of elements jcxz doNotWriteNumberAndUnlockBlock ; no number to write pop ax call ChunkArrayElementToPtr ; ds:di <- element needed ; ; Now get the chunk that contains the string and put ; that element into the number text of the fax ui ; mov si, ds:[di].QNCH_numberChunk mov bp, ds:[si] ; ds:bp <- string clr cx ; null terminated string mov dx, ds mov es, dx replaceText:: pop ds ; *ds:si = obj to call mov si, offset Group3NumberText mov ax, MSG_VIS_TEXT_REPLACE_ALL_PTR call ObjCallInstanceNoLock ; ; If there is a name associated with this number put the name in ; the text field ; mov dx, es mov bp, es:[di].QNCH_nameChunk tst bp jz short markUnused mov bp, es:[bp] clr cx ; null terminated string mov si, offset Group3NameText mov ax, MSG_VIS_TEXT_REPLACE_ALL_PTR call ObjCallInstanceNoLock if _USE_PALM_ADDR_BOOK ; ; Also make set the marker that an address book entry is used ; mov si, offset AddrBookList mov ax, MSG_ADDRESS_BOOK_LIST_SET_ADDRESS_USED call ObjCallInstanceNoLock endif ; ; Release the VMBlock and exit ; call MemUnlock exit: ret markUnused: if _USE_PALM_ADDR_BOOK ; ; One last thing. Tell the address book that an address book element ; is not being used anymore ; mov si, offset AddrBookList mov ax, MSG_ADDRESS_BOOK_LIST_SET_ADDRESS_NOT_USED call ObjCallInstanceNoLock endif jmp exit ; ; Release the VMBlock and exit doNotWriteNumberAndUnlockBlock: call MemUnlock ; ; Write a null string into the number text ; doNotWriteNumber: pop ax ; just restore the stack mov dx, cs mov bp, offset blankString pop ds ; *ds:si = obj to call mov si, offset Group3UI:Group3NumberText mov ax, MSG_VIS_TEXT_REPLACE_ALL_PTR call ObjCallInstanceNoLock jmp exit QuickNumbersListSetCurrentSelection endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% QuickNumbersListRequestItemMoniker %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Writes the corresponding moniker to the Quick Number List From the file of quick numbers. CALLED BY: MSG_QUICK_NUMBERS_LIST_REQUEST_ITEM_MONIKER PASS: *ds:si = QuickNumbersListClass object ds:di = QuickNumbersListClass instance data ds:bx = QuickNumbersListClass object (same as *ds:si) es = segment of QuickNumbersList ax = message # ^lcx:dx = the dynamic list requesting the moniker bp = the position of the item requested RETURN: nothing DESTROYED: ax, cx, dx, bp SIDE EFFECTS: PSEUDO CODE/STRATEGY: nn REVISION HISTORY: Name Date Description ---- ---- ----------- AC 10/ 6/93 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ QuickNumbersListRequestItemMoniker method dynamic QuickNumbersListClass, MSG_QUICK_NUMBERS_LIST_REQUEST_ITEM_MONIKER ; ; Save the pointer the list. This is currently *ds:dx ; push ds, dx ; ; Get the chunk array that we have in memory locally. ; mov si, offset FaxDialogBox mov ax, MSG_FAX_INFO_GET_QUICK_LIST_HANDLES call ObjCallInstanceNoLock ; ax <- Heap handle for c-array ; cx <- chunk handle for list ; ; See if the heap handle is zero. If it is, it means we were not ; able to get the information from the file and we have to fake it ; as an empty file. ; tst ax jz writeNoElements ; ; We have non zero handles, so they should be pointing to valid ; chunk arrays. ; mov_tr bx, ax ; bx <- mem handle call MemLock ; ax <- segment mov ds, ax mov si, cx ; *ds:si <- chunk array ; ; See if any items are in the chunk array ; tst bp jnz getElement call ChunkArrayGetCount ; cx <- number of items jcxz writeNoElementsAndUnlockBlock ; ; Get the element that is requested and write it to the ; dynamic list ; getElement: mov ax, bp ; element # wanted call ChunkArrayElementToPtr ; ds:di <- element mov bp, ds:[di].QNCH_nameChunk tst bp jnz replaceText mov bp, ds:[di].QNCH_numberChunk replaceText: mov dx, ds:[bp] mov cx, ds ; cx:dx <- string to pass mov_tr bp, ax ; bp <- element wanted pop ds, si ; ds:si <- object mov ax, MSG_GEN_DYNAMIC_LIST_REPLACE_ITEM_TEXT call ObjCallInstanceNoLock ; ; Unlock the mem block and exit ; call MemUnlock exit: ret ; ; Handle this condition to unlock the block so we can share code with ; the error that couldn't read from the information file writeNoElementsAndUnlockBlock: call MemUnlock ; ; There are really no strings in the list, so give the ; list a string to show that there aren't any writeNoElements: mov bx, handle StringBlock call MemLock push es mov es, ax mov_tr cx, ax ;assume es:StringBlock mov dx, es:[NoQuickNumbers] ;assume es:nothing pop es pop ds, si ; ds:si <- object mov ax, MSG_GEN_DYNAMIC_LIST_REPLACE_ITEM_TEXT call ObjCallInstanceNoLock call MemUnlock jmp exit ; cx:dx <- string to pass QuickNumbersListRequestItemMoniker endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% QuickNumbersListVisOpen %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: This routine tells the Group3NumberText object to apply it's message if it has been modified. This way we can unselect an item if the user has modified the number in any way. CALLED BY: MSG_VIS_OPEN PASS: *ds:si = QuickNumbersListClass object ds:di = QuickNumbersListClass instance data ds:bx = QuickNumbersListClass object (same as *ds:si) es = segment of QuickNumbersListClass ax = message # RETURN: nothing DESTROYED: ax, cx, dx, bp SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- AC 10/10/93 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ QuickNumbersListVisOpen method dynamic QuickNumbersListClass, MSG_VIS_OPEN ; ; Make sure that the super class is called ; mov di, offset QuickNumbersListClass call ObjCallSuperNoLock ; ; We are checking here if the quick list has to be deselected. ; If no item in the list is selected, then the point is moot. ; mov ax, MSG_GEN_ITEM_GROUP_GET_SELECTION ; ax <- selection call ObjCallInstanceNoLock mov_tr bx, ax jc done ; ; Well, we know now that an element has been chosen. Lets check if ; it should still be selected. First check to see if the number ; text has been modified. ; mov di, si mov si, offset Group3NumberText mov ax, MSG_GEN_TEXT_IS_MODIFIED ; carry set if modified call ObjCallInstanceNoLock jc setNoneSelected ; ; If the name has been changed and it's a address book entry in ; the list, then make the list un-selected. ; mov si, offset Group3NameText mov ax, MSG_GEN_TEXT_IS_MODIFIED call ObjCallInstanceNoLock jnc done mov bp, bx mov si, di mov ax, MSG_QUICK_NUMBERS_LIST_CHECK_IF_ADDR call ObjCallInstanceNoLock jnc done setNoneSelected: ; ; If it has been modified, then make sure that we have no selections ; mov si, di mov ax, MSG_GEN_ITEM_GROUP_SET_NONE_SELECTED call ObjCallInstanceNoLock done: ret QuickNumbersListVisOpen endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% QuickNumbersListCheckIfAddr %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Passed an element number this method will tell if that item is a address book entry in the quick list. CALLED BY: MSG_QUICK_NUMBERS_LIST_CHECK_IF_ADDR PASS: *ds:si = QuickNumbersListClass object ds:di = QuickNumbersListClass instance data ds:bx = QuickNumbersListClass object (same as *ds:si) es = segment of QuickNumbersListClass ax = message # bp = entry number wanted RETURN: carry set if it's an address book entry DESTROYED: nothing SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- AC 12/ 2/93 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ QuickNumbersListCheckIfAddr method dynamic QuickNumbersListClass, MSG_QUICK_NUMBERS_LIST_CHECK_IF_ADDR uses ax, cx, bp .enter push bp ; save entry wanted ; ; Lock the quick numbers list and get that element. ; mov si, offset FaxDialogBox mov ax, MSG_FAX_INFO_GET_FILE_HANDLE call ObjCallInstanceNoLock ; ax <- file handle ;; mov bx, es:[faxInformationFileHan] mov_tr bx, ax call VMGetMapBlock ; ax <- block handle call VMLock ; ax <- segment ; bp <- mem handle mov ds, ax mov ds, ax mov ax, ds:[FIFI_heapBlock] mov si, ds:[FIFI_chunkArrayHandle] call VMUnlock ; ; Lock down the chunk array. ; call VMLock ; ax <- segment ; bp <- mem handle mov ds, ax ; *ds:si <- chunk array ; ; Get the element requested and see if it has a name entry ; pop ax ; element # wanted call ChunkArrayElementToPtr ; ds:di <- element tst ds:[di].QNCH_nameChunk clc jz done stc done: call VMUnlock .leave ret QuickNumbersListCheckIfAddr endm
26.208247
79
0.637637
80759375c7b8cabce0484ef93a000ef83ae93843
196
asm
Assembly
libsrc/_DEVELOPMENT/math/float/math32/c/sdcc/cm32_sdcc___fslt.asm
ahjelm/z88dk
c4de367f39a76b41f6390ceeab77737e148178fa
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/_DEVELOPMENT/math/float/math32/c/sdcc/cm32_sdcc___fslt.asm
C-Chads/z88dk
a4141a8e51205c6414b4ae3263b633c4265778e6
[ "ClArtistic" ]
1,600
2017-01-15T16:12:02.000Z
2022-03-31T12:11:12.000Z
libsrc/_DEVELOPMENT/math/float/math32/c/sdcc/cm32_sdcc___fslt.asm
C-Chads/z88dk
a4141a8e51205c6414b4ae3263b633c4265778e6
[ "ClArtistic" ]
215
2017-01-17T10:43:03.000Z
2022-03-23T17:25:02.000Z
SECTION code_fp_math32 PUBLIC cm32_sdcc___fslt EXTERN m32_compare ; Entry: stack: float right, float left, ret cm32_sdcc___fslt: call m32_compare ret c dec hl ret
13.066667
44
0.688776
809be9df912574a3d2d7000cceb7510436ee49fc
473
asm
Assembly
programs/oeis/189/A189717.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/189/A189717.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/189/A189717.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A189717: Partial sums of A156595. ; 0,1,2,2,3,3,3,4,4,4,5,6,6,7,7,7,8,9,9,10,11,11,12,12,12,13,14,14,15,16,16,17,17,17,18,18,18,19,20,20,21,21,21,22,23,23,24,25,25,26,26,26,27,27,27,28,29,29,30,30,30,31,31,31,32,33,33,34,34,34,35,36,36,37,38,38,39,39,39,40,40,40,41,42,42,43,43,43,44,44,44,45,46,46,47,47,47,48,49,49 mov $2,$0 mov $3,$0 lpb $2 mov $0,$3 sub $2,1 sub $0,$2 lpb $0 mul $0,2 sub $0,1 dif $0,3 lpe mod $0,3 add $1,$0 lpe mov $0,$1
24.894737
282
0.585624
8275e811cccf48e46b6161e8e52d167caffe041e
912
asm
Assembly
libsrc/graphics/drawbox.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
38
2021-06-18T12:56:15.000Z
2022-03-12T20:38:40.000Z
libsrc/graphics/drawbox.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
2
2021-06-20T16:28:12.000Z
2021-11-17T21:33:56.000Z
libsrc/graphics/drawbox.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
6
2021-06-18T18:18:36.000Z
2021-12-22T08:01:32.000Z
SECTION code_graphics PUBLIC drawbox ; ; $Id: drawbox.asm $ ; ; *********************************************************************** ; ; Draw a box. ; Generic version ; ; Stefano Bodrato - March 2002 ; ; ; IN: HL = (x,y) ; BC = (width,heigth) ; .drawbox ld a,2 cp b ret nc cp c ret nc push bc push hl ; -- Vertical lines -- push hl ld a,h add a,b dec a ld h,a pop de .rowloop push bc call p_sub inc l ex de,hl call p_sub inc l ex de,hl pop bc dec c jr nz,rowloop pop hl pop bc ; -- Horizontal lines -- inc h dec b dec b push hl ld a,l add a,c dec a ld l,a pop de .vrowloop push bc call p_sub inc h ex de,hl call p_sub inc h ex de,hl pop bc djnz vrowloop ret .p_sub push hl push de ld de, p_RET1 push de jp (ix) ; execute PLOT at (h,l) .p_RET1 pop de pop hl ret
9.6
73
0.513158
9eed67f9715ea67bcd43d462d46c586bb1bd613f
386
asm
Assembly
libsrc/_DEVELOPMENT/arch/ts2068/misc/c/sccz80/tshc_scroll_up_pix.asm
Frodevan/z88dk
f27af9fe840ff995c63c80a73673ba7ee33fffac
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/_DEVELOPMENT/arch/ts2068/misc/c/sccz80/tshc_scroll_up_pix.asm
Frodevan/z88dk
f27af9fe840ff995c63c80a73673ba7ee33fffac
[ "ClArtistic" ]
1,600
2017-01-15T16:12:02.000Z
2022-03-31T12:11:12.000Z
libsrc/_DEVELOPMENT/arch/ts2068/misc/c/sccz80/tshc_scroll_up_pix.asm
Frodevan/z88dk
f27af9fe840ff995c63c80a73673ba7ee33fffac
[ "ClArtistic" ]
215
2017-01-17T10:43:03.000Z
2022-03-23T17:25:02.000Z
; void tshc_scroll_up_pix(uchar prows, uchar pix) SECTION code_clib SECTION code_arch PUBLIC tshc_scroll_up_pix EXTERN asm0_tshc_scroll_up_pix tshc_scroll_up_pix: pop af pop hl pop de push de push hl push af jp asm0_tshc_scroll_up_pix ; SDCC bridge for Classic IF __CLASSIC PUBLIC _tshc_scroll_up_pix defc _tshc_scroll_up_pix = tshc_scroll_up_pix ENDIF
13.785714
49
0.784974
83995b9caaf9bad2faa6bc79674cfbf26dc1649d
352
asm
Assembly
oeis/010/A010153.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/010/A010153.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/010/A010153.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A010153: Continued fraction for sqrt(75) (or 5*sqrt(3)). ; 8,1,1,1,16,1,1,1,16,1,1,1,16,1,1,1,16,1,1,1,16,1,1,1,16,1,1,1,16,1,1,1,16,1,1,1,16,1,1,1,16,1,1,1,16,1,1,1,16,1,1,1,16,1,1,1,16,1,1,1,16,1,1,1,16,1,1,1,16,1,1,1,16,1,1,1,16,1,1,1,16,1,1,1,16,1,1,1,16,1,1,1,16,1,1,1,16,1,1,1 mov $1,$0 min $0,1 add $0,3 dif $1,2 gcd $1,2 pow $1,$0 mov $0,$1
32
225
0.568182
435fc5f6dce37a49e392d01634d431386fa4dc45
696
asm
Assembly
travis/test/br3392711.asm
johannkoenig/nasm
47918f69201058980d793230e993d59be0522c84
[ "BSD-2-Clause" ]
1,052
2018-12-07T19:57:03.000Z
2022-03-31T07:06:00.000Z
travis/test/br3392711.asm
johannkoenig/nasm
47918f69201058980d793230e993d59be0522c84
[ "BSD-2-Clause" ]
17
2020-07-02T10:40:48.000Z
2022-02-02T20:21:33.000Z
travis/test/br3392711.asm
johannkoenig/nasm
47918f69201058980d793230e993d59be0522c84
[ "BSD-2-Clause" ]
138
2019-10-03T23:11:37.000Z
2022-03-28T20:16:27.000Z
; ; In br33927711 we've not been expanding %?? and %*?? correctly ; section .text %define label(prefix, suffix) prefix %+ suffix label_1: mov eax, label(%??, _1) label_2: mov eax, label(%?, _2) %define label0123456789a0123456789a0123456789a0123456789a0123456789a0123456789a0123456789(prefix, suffix) prefix %+ suffix label0123456789a0123456789a0123456789a0123456789a0123456789a0123456789a0123456789_1: mov eax, label0123456789a0123456789a0123456789a0123456789a0123456789a0123456789a0123456789(%??, _1) label0123456789a0123456789a0123456789a0123456789a0123456789a0123456789a0123456789_2: mov eax, label0123456789a0123456789a0123456789a0123456789a0123456789a0123456789a0123456789(%??, _2)
36.631579
122
0.840517
6bf158ac748f3b8775fddee7f2d1a8c46e9388b8
439
asm
Assembly
oeis/087/A087172.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/087/A087172.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/087/A087172.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A087172: Greatest Fibonacci number that does not exceed n. ; 1,2,3,3,5,5,5,8,8,8,8,8,13,13,13,13,13,13,13,13,21,21,21,21,21,21,21,21,21,21,21,21,21,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,55,89,89,89,89,89,89,89,89,89,89,89,89 mov $2,$0 mov $0,1 mov $1,1 lpb $2 add $0,$1 sub $1,$0 gcd $1,$3 trn $2,$1 lpe
33.769231
289
0.633257
ca576965e9e6e627ced684b8d47ed0c5c2ed259c
3,256
asm
Assembly
src/startup.asm
JeppeSRC/STM32-Lib
a2f8df31a6fc5f810c036bb8859f3c75979de03f
[ "MIT" ]
null
null
null
src/startup.asm
JeppeSRC/STM32-Lib
a2f8df31a6fc5f810c036bb8859f3c75979de03f
[ "MIT" ]
null
null
null
src/startup.asm
JeppeSRC/STM32-Lib
a2f8df31a6fc5f810c036bb8859f3c75979de03f
[ "MIT" ]
null
null
null
.syntax unified .thumb .section .isr_vector,"ax" .global isr_vector .global Reset_Handler .global Default_Handler .extern _textend .extern _datastart .extern _dataend .extern _bssstart .extern _bssend .extern main //.extern C_Default_Handler .macro IRQ handler .word \handler .weak \handler .set \handler, Default_Handler .endm .thumb isr_vector: .word 0x20004000 //intitial SP value top of memory (16K) .word Reset_Handler IRQ NMI_Handler IRQ HardFault_Handler IRQ MMFault_Handler IRQ BusFault_Handler IRQ UsageFault_Handler .word 0 .word 0 .word 0 .word 0 IRQ SVCall_Handler .word 0 .word 0 IRQ PendSV_Handler IRQ SysTick_Handler IRQ WWDG_Handler //position 0 IRQ PVD_Handler IRQ TAMP_Handerl IRQ RTC_WKUP_Handler IRQ FLASH_Handler IRQ RCC_Handler IRQ EXTI0_Handler IRQ EXTI1_Handler IRQ EXTI2TS_Handler IRQ EXTI3_Handler IRQ EXTI4_Handler IRQ DMA1_CH1_Handler IRQ DMA1_CH2_Handler IRQ DMA1_CH3_Handler IRQ DMA1_CH4_Handler IRQ DMA1_CH5_Handler IRQ DMA1_CH6_Handler IRQ DMA1_CH7_Handler IRQ ADC1_Handler IRQ CANTX_Handler IRQ CANRXD_Handler IRQ RXI_Handler IRQ SCE_Handler IRQ EXTI5_9_Handler IRQ TIM15_Handler IRQ TIM16_Handler IRQ TIM17_Handler IRQ TIM18_DAC2_Handler IRQ TIM2_Handler IRQ TIM3_Handler IRQ TIM4_Handler IRQ I2C1_EV_Handler IRQ I2C1_ER_Handler IRQ I2C2_EV_Handler IRQ I2C2_ER_Handler IRQ SPI1_Handler IRQ SPI2_Handler IRQ USART1_Handler IRQ USART2_Handler IRQ USART3_Handler IRQ EXTI15_10_Handler IRQ RTC_ALARM_IT_Handler IRQ CEC_Handler IRQ TIM12_Handler IRQ TIM13_Handler IRQ TIM14_Handler .word 0 .word 0 .word 0 .word 0 IRQ TIM5_Handler IRQ SPI3_Handler .word 0 .word 0 IRQ TIM6_DAC1_Handler IRQ TIM7_Handler IRQ DMA2_CH1_Handler IRQ DMA2_CH2_Handler IRQ DMA2_CH3_Handler IRQ DMA2_CH4_Handler IRQ DMA2_CH5_Handler IRQ SDADC1_Handler IRQ SDADC2_Handler IRQ SDADC3_Handler IRQ COMP1_2_Handler .word 0 .word 0 .word 0 .word 0 .word 0 .word 0 .word 0 .word 0 .word 0 IRQ USB_HP_Handler IRQ USB_LP_Handler IRQ USB_WAKEUP_Handler .word 0 IRQ TIM19_Handler .word 0 .word 0 IRQ FPU_Handler .align 4 TEXT_END: .word _textend SI_START: .word _sidatastart DATA_START: .word _datastart DATA_END: .word _dataend BSS_START: .word _bssstart BSS_END: .word _bssend .thumb_func Reset_Handler: ldr r0, =0x20004000 mov sp, r0 # Enable FPU ldr r0, =0xE000ED88 ldr r1, =0x00F00000 ldr r2, [r0] orr r2, r1 str r2, [r0] dsb isb ldr r0, SI_START ldr r1, DATA_START ldr r2, DATA_END subs r2, r1 beq DataZero DataCopy: ldr r3, [r0], #4 str r3, [r1], #4 subs r2, #4 bne DataCopy DataZero: ldr r0, BSS_START ldr r1, BSS_END subs r1, r0 beq Main eor r2, r2 BssZero: str r2, [r0], #4 subs r1, #4 bne BssZero Main: eor r0, r0 eor r1, r1 bl main .thumb_func Default_Handler: //bl C_Default_Handler b .
17.6
60
0.676904
0dccd0b166528b86f669c04ec133b67302e66a73
579
asm
Assembly
resources/asm/test04-basic-input.asm
aa-dav/SimpX
892966fa8bba27ffe505c53ea10d8e39fbe9fbf5
[ "MIT" ]
null
null
null
resources/asm/test04-basic-input.asm
aa-dav/SimpX
892966fa8bba27ffe505c53ea10d8e39fbe9fbf5
[ "MIT" ]
null
null
null
resources/asm/test04-basic-input.asm
aa-dav/SimpX
892966fa8bba27ffe505c53ea10d8e39fbe9fbf5
[ "MIT" ]
1
2021-12-28T03:14:00.000Z
2021-12-28T03:14:00.000Z
; ******************************************************************* ; * test04.asm - ввод символов с клавиатуры с мгновенной их печатью * ; ******************************************************************* #include "simple_lib.inc" ; Строка с приветствием str dw "Press keys..." 13 0 start ; Вводим символы с клавиатуры и печатаем их на экране... r0 <- str call zstrPrint ; печатаем строку с приветствием loop call inputChar ; вводим (блокирующе) символ с клавиатуры call printSpChar ; тут же печатаем его (со спец-символами) pc <- loop ; и зацикливаемся...
34.058824
69
0.547496
df23a53372b301ce07cbbdc3201eefaa12338111
79,193
asm
Assembly
Source/ZFAM020.asm
walmartlabs/zFAM
f57e36adec60c0c03d2fb86cd944b2ce0c43f8f5
[ "Apache-2.0" ]
21
2018-04-17T15:37:29.000Z
2021-09-26T20:19:16.000Z
Source/ZFAM020.asm
wizardofzos/zFAM
f57e36adec60c0c03d2fb86cd944b2ce0c43f8f5
[ "Apache-2.0" ]
null
null
null
Source/ZFAM020.asm
wizardofzos/zFAM
f57e36adec60c0c03d2fb86cd944b2ce0c43f8f5
[ "Apache-2.0" ]
9
2016-12-02T16:08:12.000Z
2017-10-27T04:07:02.000Z
* * PROGRAM: ZFAM020 * AUTHOR: Rich Jackson and Randy Frerking * COMMENTS: zFAM - z/OS File Access Manager * * This program is executed as the Query Mode GET/SELECT * service called by the ZFAM001 control program. * * This program will process primary column index requests * only. * *********************************************************************** * Start Dynamic Storage Area * *********************************************************************** DFHEISTG DSECT REGSAVE DS 16F Register Save Area BAS_REG DS F BAS return register RJ_REG DS F BAS return register - RJ_00** RX_REG DS F BAS return register - RX_00** RD_REG DS F BAS return register - RD_00** APPLID DS CL08 CICS Applid SYSID DS CL04 CICS SYSID USERID DS CL08 CICS USERID RA_ADDR DS F Response Array address (base) RA_PTR DS F Response array address (build) RA_LEN DS F Response Array length WS_LEN DS F WEB SEND Array length PA_ADDR DS F Parser Array address PA_LEN DS F Parser Array length FK_ADDR DS F zFAM Key record address FK_LEN DS F zFAM Key record length FF_ADDR DS F zFAM File record address FF_LEN DS F zFAM File record length CI_ADDR DS F zFAM CI record address CI_LEN DS F zFAM CI record length FD_ADDR DS F Container field address FD_LEN DS F Container field length DS 0F W_INDEX DS F Parser array index W_ADDR DS F Beginning data area address W_F_LEN DS CL08 Packed decimal field length W_T_LEN DS CL08 Packed decimal total length W_COUNT DS CL08 Packed decimal field count W_COLUMN DS CL08 Packed decimal field column W_PDWA DS CL08 Packed decimal field column DS 0F C_NAME DS CL16 Field Name (container name) C_LENGTH DS F Field Length (container data) DS 0F W_PRI_ID DS CL01 Primary column ID flag * *********************************************************************** * zFAM090 communication area * * Logging for ZFAM020 exceptional conditions * *********************************************************************** C_LOG DS 0F C_STATUS DS CL03 HTTP Status code C_REASON DS CL02 Reason Code C_USERID DS CL08 UserID C_PROG DS CL08 Service program name C_FILE DS CL08 File name C_FIELD DS CL16 Field name E_LOG EQU *-C_LOG Commarea Data length L_LOG DS H Commarea length * *********************************************************************** * File resources. * *********************************************************************** WK_FCT DS 0F zFAM Key structure FCT name WK_TRAN DS CL04 zFAM transaction ID WK_DD DS CL04 zFAM KEY DD name * WK_LEN DS H zFAM Key structure length * WF_FCT DS 0F zFAM File structure FCT name WF_TRAN DS CL04 zFAM transaction ID WF_DD DS CL04 zFAM FILE DD name * WF_LEN DS H zFAM File structure length * *********************************************************************** * Primary Index information * *********************************************************************** DS 0F PI_TYPE DS CL01 Actual key type DS 0F PI_COL DS CL04 Actual key column DS 0F PI_LEN DS CL04 Actual key lenth DS 0F PI_NAME DS CL16 Primary key field name *********************************************************************** * FAxxKEY record key. * *********************************************************************** DS 0F WK_KEY DS CL255 zFAM Key record key * *********************************************************************** * FAxxFILE record key. * *********************************************************************** WF_KEY DS 0F zFAM File record key WF_IDN DS CL06 ID Number WF_NC DS CL02 Named Counter WF_SEG DS H Segment number WF_SUFX DS H Suffix number WF_NULL DS F Zeroes (not used) * *********************************************************************** * Spanned Segment number * *********************************************************************** DS 0F SS_SEG DS H Spanned segment number * *********************************************************************** * SELECT options. * * Primary Key attributes must be included for SELECT requests using * * secondary column index. This is necessary as the Primary Key must * * be returned on all SELECT requests. * *********************************************************************** O_TABLE DS 0F O_P_COL DS PL04 Primary Key column number O_P_LEN DS PL04 Primary Key field length O_P_TYPE DS CL01 Primary Key field type DS CL03 Alignment O_P_NAME DS CL16 Primary Key field name * O_FORM DS CL09 Format message * FIXED - delimited by field size * XML - tags using field name * JSON - tags using field name * DELIMITER - field delimiter * Default - FIXED * DS CL03 Alignment * O_DIST DS CL03 Distinct messages returned * YES - Duplicates not returned * NO - Duplicates returned * Default - NO * DS CL01 Alignment * O_MODE DS CL08 Type of SELECT process * ONLINE - Synchronous request * OFFLINE - Asynchronous request * Default - ONLINE * O_SORT DS CL16 Sort order by field name * FieldName - Ascending sort by field * Default - Primary key * O_ROWS DS CL06 Maximum rows returned * 0 - All available rows * 1-999999 - Maximum rows returned * Default - 0 (All available) * DS CL02 Alignment O_WITH DS CL02 Type of Read (WITH) * UR - Uncommitted Read * CR - Committed Read * Default - UR * DS CL02 Alignment E_TABLE EQU *-O_TABLE Length of Option table * *********************************************************************** * Spanned segment status information * *********************************************************************** DS 0F W_LENGTH DS CL08 Field length (spanned/remaining) W_WIDTH DS F Field width W_FF_A DS F FAxxFILE data address W_LO DS F Column range low W_HI DS F Column range high W_REL_D DS F Relative displacement W_REL_L DS F Relative length W_SEG DS H Current segment number * *********************************************************************** * Trace entry * *********************************************************************** DS 0F W_46_M DS CL08 Trace entry paragraph * *********************************************************************** * Chunked Message Transfer - JSON and XML initial message length. * *********************************************************************** DS 0F M_LENGTH DS F HTTP initial message length *********************************************************************** * RECEIVE Media Type * * The following values override the OPTIONS(FORMAT=) parameter * *********************************************************************** DS 0F R_TYPE DS CL01 HTTP Media type - bit indicator R_PLAIN EQU X'80' text/plain (fixed) R_JSON EQU X'40' text/json R_XML EQU X'20' text/xml R_DELIM EQU X'10' text/delimited DS 0F R_LENGTH DS F HTTP WEB RECEIVE length R_MEDIA DS CL56 HTTP Media type - text from client * *********************************************************************** * End Dynamic Storage Area * *********************************************************************** * *********************************************************************** * Start Parser Array (maximum 256 fields) * *********************************************************************** * PA_DSECT DSECT P_ID DS PL02 Field ID P_SEC DS PL02 Field level security P_COL DS PL04 Field column P_LEN DS PL04 Field length P_TYPE DS CL01 Field type P_WHERE DS CL01 WHERE indicator P_SEG DS H Field record segment P_NAME DS CL16 Field Name E_PA EQU *-P_ID PA entry length *********************************************************************** * End Parser Array * *********************************************************************** * *********************************************************************** * Start Response Array buffer * *********************************************************************** RA_DSECT DSECT R_PRI DS CL255 Primary Key R_FIELD DS CL01 Field entry E_RA EQU *-R_PRI RA entry length * * *********************************************************************** * End Response Array buffer * *********************************************************************** * *********************************************************************** * Start Field Data buffer * *********************************************************************** FD_DSECT DSECT * * *********************************************************************** * End Field Data buffer * *********************************************************************** * *********************************************************************** * zFAM KEY store record buffer * *********************************************************************** COPY ZFAMDKA *********************************************************************** * zFAM FILE store record buffer * *********************************************************************** COPY ZFAMDFA * * * *********************************************************************** *********************************************************************** * Control Section - ZFAM020 * *********************************************************************** *********************************************************************** ZFAM020 DFHEIENT CODEREG=(R2,R3),DATAREG=R11,EIBREG=R12 ZFAM020 AMODE 31 ZFAM020 RMODE 31 B SYSDATE BRANCH AROUND LITERALS DC CL08'ZFAM020 ' DC CL48' -- Query Mode SELECT service ' DC CL08' ' DC CL08'&SYSDATE' DC CL08' ' DC CL08'&SYSTIME' SYSDATE DS 0H *********************************************************************** * Issue GET CONTAINER for Parser Array. * *********************************************************************** SY_0000 DS 0H MVC C_NAME,C_ARRAY Move parser array container MVC C_LENGTH,S_PA_LEN Move parser array length BAS R14,GC_0010 Issue GET CONTAINER ST R9,PA_ADDR Save parser array address MVC PA_LEN,C_LENGTH Move parser array length *********************************************************************** * Issue WEB RECEIVE to obtain Media Type * *********************************************************************** SY_0001 DS 0H EXEC CICS WEB RECEIVE X MEDIATYPE(R_MEDIA) X LENGTH (R_LENGTH) X SET (R1) X NOHANDLE * XC R_TYPE,R_TYPE Clear RECEIVE Media Type OC R_MEDIA,HEX_40 Set upper case CLC R_MEDIA(10),M_PLAIN text/plain requested? BC B'0111',*+8 ... no, continue MVI R_TYPE,R_PLAIN ... yes, set text/plain bit CLC R_MEDIA(09),M_JSON text/json requested? BC B'0111',*+8 ... no, continue MVI R_TYPE,R_JSON ... yes, set text/json bit CLC R_MEDIA(08),M_XML text/xml requested? BC B'0111',*+8 ... no, continue MVI R_TYPE,R_XML ... yes, set text/xml bit CLC R_MEDIA(14),M_DELIM text/delim requested? BC B'0111',*+8 ... no, continue MVI R_TYPE,R_DELIM ... yes, set text/delim bit * CLC R_MEDIA(16),A_JSON application/json requested? BC B'0111',*+8 ... no, continue MVI R_TYPE,R_JSON ... yes, set text/json bit CLC R_MEDIA(15),A_XML application/xml requested? BC B'0111',*+8 ... no, continue MVI R_TYPE,R_XML ... yes, set text/xml bit * *********************************************************************** * Issue GET CONTAINER for OPTIONS table. * *********************************************************************** SY_0010 DS 0H MVC C_NAME,C_OPTION Move OPTIONS table container MVC C_LENGTH,S_OT_LEN Move OPTIONS table length BAS R14,GC_0020 Issue GET CONTAINER * *********************************************************************** * Set RECEIVE Media Type using OPTIONS(FORMAT=xxxx) Parameter * * The OPTIONS and FORMAT parameter is the original means to request * * zQL response array format. Now, both Media Type or OPTIONS/FORMAT * * can be specified with Media Type taking priority. * *********************************************************************** SY_0011 DS 0H OC R_TYPE,R_TYPE Is RECEIVE Media Type zeroes? BC B'0111',SY_0019 ... no, RECEIVE has priority * MVI R_TYPE,R_PLAIN Set FORMAT(FIXED) default CLC O_FORM,S_FIXED FORMAT(FIXED) requested? BC B'0111',*+8 ... no, continue MVI R_TYPE,R_PLAIN ... yes, set text/plain bit CLC O_FORM,S_JSON FORMAT(JSON ) requested? BC B'0111',*+8 ... no, continue MVI R_TYPE,R_JSON ... yes, set text/json bit CLC O_FORM,S_XML FORMAT(XML ) requested? BC B'0111',*+8 ... no, continue MVI R_TYPE,R_XML ... yes, set text/xml bit CLC O_FORM,S_DELIM FORMAT(DELIM) requested? BC B'0111',*+8 ... no, continue MVI R_TYPE,R_DELIM ... yes, set text/delim bit * *********************************************************************** * Address Parser Array. * *********************************************************************** SY_0019 DS 0H L R4,PA_LEN Load parser array length L R5,PA_ADDR Load parser array address USING PA_DSECT,R5 ... tell assembler LA R6,E_PA Load parser array entry length *********************************************************************** * Scan parser array and mark the segment * *********************************************************************** SY_0020 DS 0H XR R8,R8 Clear sign bits in register ZAP W_COLUMN,P_COL Move PA column to work area CVB R9,W_COLUMN Convert to binary D R8,=F'32000' Divide column by segment size LA R9,1(,R9) Relative to one. STH R9,P_SEG Mark segment number *********************************************************************** * Continue scan of parser array until EOPA * *********************************************************************** SY_0022 DS 0H LA R5,0(R6,R5) Point to next PA entry SR R4,R6 Subtract PA entry length BC B'0011',SY_0020 Continue PA scan *********************************************************************** * Segment array initialization complete. * * Prepare to scan parser array. * *********************************************************************** SY_0028 DS 0H L R4,PA_LEN Load parser array length L R5,PA_ADDR Load parser array address USING PA_DSECT,R5 ... tell assembler LA R6,E_PA Load parser array entry length OI W_F_LEN+7,X'0C' Set packed decimal sign bit OI W_COUNT+7,X'0C' Set packed decimal sign bit *********************************************************************** * Scan parser array tallying field lengths * *********************************************************************** SY_0030 DS 0H CLC P_ID,PD_ONE Primary key? BC B'1000',SY_0035 ... yes, skip tally AP W_F_LEN,P_LEN Add field length to total AP W_COUNT,PD_ONE Increment field count SY_0035 DS 0H CLC P_ID,PD_ONE Primary ID field? BC B'0111',SY_0050 ... no, continue parsing MVI W_PRI_ID,C'Y' ... yes, set primary ID flag *********************************************************************** * Issue GET CONTAINER for Primary Column Index * *********************************************************************** SY_0040 DS 0H MVC PI_NAME,P_NAME Move field name MVC PI_TYPE,P_TYPE Move field type MVC PI_LEN,P_LEN Move field length MVC PI_COL,P_COL Move field column * MVC C_NAME,P_NAME Move container name MVC C_LENGTH,P_LEN Move field length AP W_F_LEN,P_LEN Add field length to total BAS R14,GC_0010 Issue GET CONTAINER * ST R9,FD_ADDR Save field data address MVC FD_LEN,C_LENGTH Move field data length *********************************************************************** * Adjust field entry length then continue tallying field lengths * *********************************************************************** SY_0050 DS 0H LA R5,0(R6,R5) Point to next PA entry SR R4,R6 Subtract field entry length BC B'0011',SY_0030 Continue scan until EOT *********************************************************************** * Check results of scan and branch accordingly * *********************************************************************** SY_0060 DS 0H CLI W_PRI_ID,C'Y' Primary ID flag set? BC B'0111',ER_40001 ... no, SYNTAX error *********************************************************************** * Calculate GETMAIN length for Response Array * *********************************************************************** SY_0070 DS 0H CVB R1,W_F_LEN Convert field length to binary XC W_PDWA,W_PDWA Clear packed decimal work area MVC W_PDWA+4(4),PI_LEN Move primary key length CVB R13,W_PDWA Convert key length to binary AR R1,R13 Add key length to response * CLI R_TYPE,R_PLAIN Delimit by fixed length? BC B'1000',SY_0078 ... yes, set GETMAIN length * XR R14,R14 Clear even register CVB R15,W_COUNT Convert field county to binary * CLI R_TYPE,R_XML Delimit by XML tags? BC B'1000',SY_0072 ... yes, set length CLI R_TYPE,R_JSON Delimit by JSON tags? BC B'1000',SY_0074 ... yes, set length CLI R_TYPE,R_DELIM Delimit by pipe character? BC B'1000',SY_0076 ... yes, set length BC B'1111',SY_0078 ... no, default FIXED *********************************************************************** * Include XML tags in total length * *********************************************************************** SY_0072 DS 0H M R14,=F'37' Multiply count by XML length AR R1,R15 Add XML tags to field length BC B'1111',SY_0078 Set GETMAIN length *********************************************************************** * Include JSON tags in total length * *********************************************************************** SY_0074 DS 0H M R14,=F'24' Multiply count by JSON length AR R1,R15 Add JSON tags to field length A R1,=F'32' Add JSON tags to key field BC B'1111',SY_0078 Set GETMAIN length *********************************************************************** * Include PIPE tags in total length * *********************************************************************** SY_0076 DS 0H M R14,=F'1' Multiply count by PIPE length AR R1,R15 Add PIPE tags to field length BC B'1111',SY_0078 Set GETMAIN length *********************************************************************** * Issue GETMAIN for Response Array using total field length. * *********************************************************************** SY_0078 DS 0H ST R1,C_LENGTH Save in work area BAS R14,GM_0010 Issue GETMAIN ST R9,RA_ADDR Save Response Array address MVC RA_LEN,C_LENGTH Save Response Array length *********************************************************************** * Determine Primary Index field type and branch when numeric. * * Set key as character. * *********************************************************************** SY_0080 DS 0H OI PI_TYPE,X'40' Set upper case bit CLI PI_TYPE,C'N' Numeric? BC B'1000',SY_0090 ... yes, set key accordingly ZAP W_LENGTH,PI_LEN Move PA length to work area CVB R6,W_LENGTH Convert to binary MVI WK_KEY,X'40' Set first byte of key to space LR R1,R6 Load PI field length S R1,=F'1' Subtract one for space S R1,=F'1' Subtract one for EX MVC LA R14,WK_KEY Load target field address LA R14,1(,R14) Point past space LA R15,WK_KEY Load source field address EX R1,MVC_0080 Execute MVC instruction * L R1,FD_LEN Load field data length S R1,=F'1' Subtract one for EX MVC LA R14,WK_KEY Load FAxxKEY key address L R15,FD_ADDR Load field data address EX R1,MVC_0081 Execute MVC instruction * BC B'1111',SY_0100 Read FAxxKEY MVC_0080 MVC 0(0,R14),0(R15) Initial with spaces MVC_0081 MVC 0(0,R14),0(R15) Move PI to key *********************************************************************** * Set key as numeric. * *********************************************************************** SY_0090 DS 0H ZAP W_LENGTH,PI_LEN Move PA length to work area CVB R6,W_LENGTH Convert to binary MVI WK_KEY,X'F0' Set first byte of key to zero LR R1,R6 Load PI field length S R1,=F'1' Subtract one for zero S R1,=F'1' Subtract one for EX MVC LA R14,WK_KEY Load target field address LA R14,1(,R14) Point past zero LA R15,WK_KEY Load source field address EX R1,MVC_0090 Execute MVC instruction * L R1,FD_LEN Load field data length SR R6,R1 Subtract PI from maximum * S R1,=F'1' Subtract one for EX MVC LA R14,WK_KEY Load FAxxKEY key address LA R14,0(R6,R14) Adjust for field length L R15,FD_ADDR Load field data address EX R1,MVC_0091 Execute MVC instruction * BC B'1111',SY_0100 Read FAxxKEY MVC_0090 MVC 0(0,R14),0(R15) Initial with zeroes MVC_0091 MVC 0(0,R14),0(R15) Move PI to key *********************************************************************** * Issue READ for FAxxKEY using Primary Column Index. * *********************************************************************** SY_0100 DS 0H LA R1,E_DK Load KEY record length STH R1,WK_LEN Save KEY record length BAS R14,FK_0010 Issue READ for KEY structure OC EIBRESP,EIBRESP Normal response? BC B'0111',ER_20401 ... no, STATUS(204) ST R10,FK_ADDR Save KEY buffer address MVC FK_LEN,WK_LEN Save KEY buffer length USING DK_DSECT,R10 ... tell assembler *********************************************************************** * Issue READ for FAxxFILE using Primary Column Index. * *********************************************************************** SY_0110 DS 0H DROP R10 ... tell assembler L R5,PA_ADDR Load Parser Array address MVC WF_LEN,S_DF_LEN Move FILE record length MVC WF_SEG,P_SEG Set segment number BAS R14,FF_0010 Issue READ for FILE structure OC EIBRESP,EIBRESP Normal response? BC B'0111',ER_20402 ... no, STATUS(204) ST R10,FF_ADDR Save FILE buffer address USING DF_DSECT,R10 ... tell assembler MVC FF_LEN,WF_LEN Save FILE buffer length LA R1,DF_DATA Load data portion ST R1,W_FF_A Save data portion *********************************************************************** * Initialize Response Array and Primary column index. * *********************************************************************** SY_0120 DS 0H DROP R5 ... tell assembler L R8,PA_LEN Load parser array length L R9,PA_ADDR Load parser array address USING PA_DSECT,R9 ... tell assembler * L R5,RA_LEN Load response array length L R4,RA_ADDR Load response array address USING RA_DSECT,R4 ... tell assembler ST R4,RA_PTR Save RA pointer * STM 0,15,REGSAVE Save registers LA R14,HEX_00 Load source address LA R15,0 Load source length ICM R15,B'1000',HEX_00 Move pad byte MVCL R4,R14 Move nulls to response array LM 0,15,REGSAVE Load registers * CLI R_TYPE,R_JSON Result set JSON? BC B'0111',*+8 ... no, continue BAS R14,RJ_0010 ... yes, create JSON tag * L R4,RA_PTR Load RA pointer ZAP W_LENGTH,PI_LEN Move field data length CVB R1,W_LENGTH Load into register S R1,=F'1' Subtract one for EX MVC LR R14,R4 Load RA primary key address L R15,W_FF_A Load field data address ZAP W_COLUMN,PI_COL Move field column CVB R6,W_COLUMN Load into register S R6,=F'1' Make relative to zero LA R15,0(R6,R15) Adjust address with column EX R1,MVC_0120 Execute MVC instruction BC B'1111',SY_0130 Skip EX MVC MVC_0120 MVC 0(0,R14),0(R15) Move primaary key to RA *********************************************************************** * Adjust Response Array address and length * *********************************************************************** SY_0130 DS 0H ZAP W_LENGTH,PI_LEN Move field data length CVB R1,W_LENGTH Load into register SR R5,R1 Adjust Response Array length LA R4,0(R1,R4) Point to first field ST R4,RA_PTR Save as Response Array base * CLI R_TYPE,R_JSON Result set JSON? BC B'0111',*+8 ... no, continue BAS R14,RJ_0020 ... yes, create JSON tag * *********************************************************************** * Prepare to scan parser array for field definitions * *********************************************************************** SY_0140 DS 0H L R8,PA_LEN Load parser array length L R9,PA_ADDR Load parser array address *********************************************************************** * Scan Parser Array for field definitions. * *********************************************************************** SY_0150 DS 0H CLC P_ID,PD_ONE Primary index? BC B'1000',SY_0165 ... yes, get next entry CLC P_ID,PD_NINES Entry already processed? BC B'1000',SY_0160 ... yes, get next entry BC B'1111',SY_0170 ... no, check HI/LO range *********************************************************************** * Adjust Parser Array address and length * *********************************************************************** SY_0160 DS 0H SY_0165 DS 0H LA R1,E_PA Load parser array entry length LA R9,0(R1,R9) Point to next PA entry SR R8,R1 Subtract PA entry length BC B'0011',SY_0150 Continue when more entries BC B'1111',SY_0250 Scan PA for unprocessed entries *********************************************************************** * Check column number for HI/LO range for current segment * *********************************************************************** SY_0170 DS 0H ZAP W_COLUMN,P_COL Move PA column to work area CVB R1,W_COLUMN Load in R1 C R1,W_HI Is column beyond segment range? BC B'0011',SY_0160 ... yes, get next PA entry C R1,W_LO Is column before segment range? BC B'0100',SY_0160 ... yes, get next PA entry * MVC P_ID,PD_NINES Mark field as processed * *********************************************************************** * Calculate relative offset from current segment. * * * * To calculate relative offset from current segment: * * 1). Subtract 1 from current segment number, giving the * * relative segment number. * * 2). Multiple relative segment number by 32,000 giving the * * segment displacement. * * 3). Subtract segment displacement from column number giving * * relative displacement. * * * * For example, column 50 would be calculated as such: * * 1). Subtract 1 from current segment. Segment 1 will contain * * columns 1 thru 32,000. So for column 50, the relative segment * * number for step 1 would be zero. * * 2). Multiply relative segment zero by 32,000 giving segment * * displacement, which in this case is zero. * * 3). Subtract segment displacement from the column, which in this * * case is 50, giving the relative displacement of 50. * * * * Another example, column 64,075 would be calculated as such: * * 1). Subtract 1 from current segment. Segment 3 will contain * * columns 64,001 thru 96,000, so for column 64,075 the relative * * segment for step 1 would be two. * * 2). Multiply relative segment two by 32,000, giving segment * * displacement, which in this case would be 64,000. * * 3). Subtract segment displacement from the column, which in this * * case would be 64,000 from 64,075 resulting in a relative * * displacement of 75 * * * *********************************************************************** SY_0180 DS 0H XR R6,R6 Clear R6 * LH R7,DF_SEG Load segment number LH R7,W_SEG Load current segment number S R7,=F'1' Get relative segment number M R6,S_32K Multiply by max segment size * ... giving segment displacement ZAP W_COLUMN,P_COL Load column number CVB R1,W_COLUMN Convert from PD to binary SR R1,R7 Subtract segment displacement * ... giving relative displacement S R1,=F'1' ... then make relative to zero ST R1,W_REL_D Save relative displacement * ZAP W_LENGTH,P_LEN Set source length L R4,RA_PTR Load RA pointer * CLI R_TYPE,R_JSON Result set JSON? BC B'0111',*+8 ... no, continue BAS R14,RJ_0030 ... yes, create JSON tag * *********************************************************************** * Calculate width to determine if field spans a segment. * *********************************************************************** SY_0185 DS 0H L R1,W_REL_D Load relative displacement CVB R6,W_LENGTH Convert length to binary AR R6,R1 Add relative displacement ST R6,W_WIDTH Save field width C R6,S_32K Wider than 32K? BC B'0011',SY_0200 ... yes, spanned segment *********************************************************************** * Move field to Response Array. * *********************************************************************** SY_0190 DS 0H STM 0,15,REGSAVE Save registers CVB R7,W_LENGTH Set source length L R1,W_REL_D Load relative displacement L R6,W_FF_A Set source address LA R6,0(R1,R6) Add relative displacement LR R5,R7 Set target length * L R4,RA_PTR Set target address * MVCL R4,R6 Move field to Response Array LM 0,15,REGSAVE Load registers * CVB R1,W_LENGTH Load field length L R4,RA_PTR Load current RA pointer LA R4,0(R1,R4) Load the new RA pointer ST R4,RA_PTR Save the new RA pointer * CLI R_TYPE,R_JSON Result set JSON? BC B'0111',*+8 ... no, continue BAS R14,RJ_0040 ... yes, create JSON tag * BC B'1111',SY_0140 Continue Parser Array process *********************************************************************** * Field spans segments. * *********************************************************************** SY_0200 DS 0H STM 0,15,REGSAVE Save registers L R1,W_REL_D Load relative displacement L R6,W_WIDTH Load field width SR R6,R1 Subtract relative displacement ST R6,W_WIDTH Save field width *********************************************************************** * Move spanned segment field to Response Array * *********************************************************************** SY_0210 DS 0H L R6,W_REL_D Load relative displacement L R1,S_32K Load 32K length SR R1,R6 Subtract relative displacement ST R1,W_REL_L Set relative length L R6,W_FF_A Set source address L R15,W_REL_D Load relative displacement LA R6,0(R15,R6) Adjust relative displacement LR R5,R1 Set source length LR R7,R1 Set target length * L R4,RA_PTR Set target address * MVCL R4,R6 Move field to Response Array * L R1,W_REL_L Load relative length L R4,RA_PTR Load current RA pointer LA R4,0(R1,R4) Load the new RA pointer ST R4,RA_PTR Save the new RA pointer * CVB R1,W_LENGTH Convert current field length S R1,W_REL_L Subtract relative length CVD R1,W_LENGTH Save remaining length * XC W_REL_D,W_REL_D Zero relative displacement L R1,W_WIDTH Load width L R15,W_REL_L Load relative length SR R1,R15 Subtract relative length ST R1,W_WIDTH Save width * LH R1,WF_SEG Load segment number LA R1,1(0,R1) Increment by one STH R1,WF_SEG Save segment number * MVC WF_LEN,S_DF_LEN Move FILE record length BAS R14,FF_0010 Issue READ for FILE structure OC EIBRESP,EIBRESP Normal response? BC B'0111',ER_20403 ... no, STATUS(204) ST R10,FF_ADDR Save FILE buffer address USING DF_DSECT,R10 ... tell assembler LA R1,DF_DATA Load data portion ST R1,W_FF_A Save data portion MVC FF_LEN,WF_LEN Save FILE buffer length MVC SS_SEG,WF_SEG Save spanned segment number * CLC W_WIDTH,S_32K Width more than 32K? BC B'0011',SY_0210 ... yes, move spanned segments * *********************************************************************** * Move remainder of spanned segment field to Response Array. * *********************************************************************** SY_0220 DS 0H L R1,W_REL_D Load relative displacement BC B'1111',SY_0185 Move remainder to RA *********************************************************************** * Scan parser array if there are any fields that are yet to be * * processed. When fields in the parser array are not on the current * * record segment, the entry is skipped requiring the parser array to * * be scanned until all entries are tagged as processed by the '999' * * P_ID. * *********************************************************************** SY_0250 DS 0H L R8,PA_LEN Load parser array length L R9,PA_ADDR Load parser array address LA R1,E_PA Load parser array entry length *********************************************************************** * Search for unprocessed parser array entry * *********************************************************************** SY_0260 DS 0H CLC P_ID,PD_ONE Primary index? BC B'1000',SY_0270 ... yes, continue CLC P_ID,PD_NINES Processed entry? BC B'1000',SY_0270 ... yes, continue L R8,PA_LEN Load parser array length L R9,PA_ADDR Load parser array address * MVC WF_LEN,S_DF_LEN Move FILE record length MVC WF_SEG,P_SEG Set segment number BAS R14,FF_0010 Issue READ for FILE structure OC EIBRESP,EIBRESP Normal response? BC B'0111',ER_20405 ... no, STATUS(204) ST R10,FF_ADDR Save FILE buffer address USING DF_DSECT,R10 ... tell assembler MVC FF_LEN,WF_LEN Save FILE buffer length LA R1,DF_DATA Load data portion ST R1,W_FF_A Save data portion * BC B'1111',SY_0140 Process parser array *********************************************************************** * Check parser array entries until EOPA * *********************************************************************** SY_0270 DS 0H LA R9,0(R1,R9) point to next PA entry SR R8,R1 Subtract PA entry length BC B'0011',SY_0260 Continue when more PA entries BC B'1111',SY_0300 Send response array when EOPA * *********************************************************************** * Send response * *********************************************************************** SY_0300 DS 0H L r4,RA_PTR Load RA pointer * CLI R_TYPE,R_JSON Result set JSON? BC B'0111',*+8 ... no, continue BAS R14,RJ_0050 ... yes, create JSON tag * BAS R14,WS_0010 Issue WEB SEND BC B'1111',RETURN Return to CICS *********************************************************************** * Secondar Column Index section * *********************************************************************** SY_0400 DS 0H * *********************************************************************** * Return to caller * ********************************************************************** RETURN DS 0H EXEC CICS RETURN * *********************************************************************** * Issue GET CONTAINER (SET Register) * * This is used for Parser Array and Primary Column Index * *********************************************************************** GC_0010 DS 0H ST R14,BAS_REG Save return register * EXEC CICS GET CONTAINER(C_NAME) X SET(R9) X FLENGTH(C_LENGTH) X CHANNEL(C_CHAN) X NOHANDLE * L R14,BAS_REG Load return register BCR B'1111',R14 Return to caller * *********************************************************************** * Issue GET CONTAINER for Options Table (INTO EISTG) * *********************************************************************** GC_0020 DS 0H ST R14,BAS_REG Save return register * EXEC CICS GET CONTAINER(C_NAME) X INTO(O_TABLE) X FLENGTH(C_LENGTH) X CHANNEL(C_CHAN) X NOHANDLE * L R14,BAS_REG Load return register BCR B'1111',R14 Return to caller * * *********************************************************************** * Issue GETMAIN for Response Array * *********************************************************************** GM_0010 DS 0H ST R14,BAS_REG Save return register * EXEC CICS GETMAIN X SET(R9) X FLENGTH(C_LENGTH) X INITIMG(HEX_00) X NOHANDLE * L R14,BAS_REG Load return register BCR B'1111',R14 Return to caller * *********************************************************************** * Issue READ for FAxxKEY structure * *********************************************************************** FK_0010 DS 0H ST R14,BAS_REG Save return register MVC WK_FCT(08),SK_FCT Move KEY structure name MVC WK_TRAN,EIBTRNID Move KEY structure ID * CLC O_WITH,=C'UR' Uncommitted read request? BC B'1000',FK_00UR ... yes, issue READ w/o UPDATE BC B'0111',FK_00CR ... no, issue READ w/ UPDATE * *********************************************************************** * Uncommitted READ (WITH(UR)) * *********************************************************************** FK_00UR DS 0H EXEC CICS READ FILE(WK_FCT) X SET(R10) X RIDFLD (WK_KEY) X LENGTH (WK_LEN) X NOHANDLE BC B'1111',FK_0020 Continue process * *********************************************************************** * Committed READ (WITH(CR)) * *********************************************************************** FK_00CR DS 0H EXEC CICS READ FILE(WK_FCT) X SET(R10) X RIDFLD (WK_KEY) X LENGTH (WK_LEN) X UPDATE X NOHANDLE BC B'1111',FK_0020 Continue process * *********************************************************************** * Set FILE structure key fields and return * *********************************************************************** FK_0020 DS 0H USING DK_DSECT,R10 ... tell assembler * MVC WF_DD,DK_DD Move FILE structure name MVC WF_IDN,DK_F_IDN Move FILE IDN MVC WF_NC,DK_F_NC Move FILE NC * DROP R10 ... tell assembler * L R14,BAS_REG Load return register BCR B'1111',R14 Return to caller * *********************************************************************** * Issue READ for FAxxFILE structure * * When the spanned segment number is equal to the WF_SEG, then the * * segment has already been read during spanned segment processing. * *********************************************************************** FF_0010 DS 0H ST R14,BAS_REG Save return register * CLC SS_SEG,WF_SEG Segment numbers equal? BC B'1000',FF_0020 ... yes, record is in the buffer * MVC WF_TRAN,EIBTRNID Move FILE structure ID * EXEC CICS READ FILE(WF_FCT) X SET(R10) X RIDFLD (WF_KEY) X LENGTH (WF_LEN) X NOHANDLE * USING DF_DSECT,R10 ... tell assembler * MVC W_SEG,DF_SEG Move segment number LH R1,DF_SEG Load segment number XR R6,R6 Clear R6 L R7,S_32K Load maximum segment size MR R6,R1 Create Column HI range ST R7,W_HI Save as segment HI range S R7,S_32K Subtract segment size A R7,=F'1' Add one to create segment LO ST R7,W_LO Save as segment LO range * FF_0020 DS 0H L R14,BAS_REG Load return register BCR B'1111',R14 Return to caller DROP R10 ... tell assembler * *********************************************************************** * Transfer control to error logging program zFAM090 * *********************************************************************** PC_0010 DS 0H LA R1,E_LOG Load COMMAREA length STH R1,L_LOG Save COMMAREA length * EXEC CICS XCTL PROGRAM(ZFAM090) X COMMAREA(C_LOG) X LENGTH (L_LOG) X NOHANDLE * EXEC CICS WEB SEND X FROM (H_CRLF) X FROMLENGTH(H_TWO) X ACTION (H_ACTION) X MEDIATYPE (H_MEDIA) X STATUSCODE(H_500) X STATUSTEXT(H_500_T) X STATUSLEN (H_500_L) X SRVCONVERT X NOHANDLE * BC B'1111',RETURN Return (if XCTL fails) *********************************************************************** * Send response (WEB SEND) * *********************************************************************** WS_0010 DS 0H ST R14,BAS_REG Save return register L R4,RA_ADDR Load response array address USING RA_DSECT,R4 ... tell assembler * MVC WS_LEN,RA_LEN Set WEB SEND length * CLI R_TYPE,R_JSON Result set JSON? BC B'0111',*+8 ... no, continue BAS R14,RJ_0060 ... yes, get RA length * EXEC CICS WEB WRITE X HTTPHEADER (H_ROWS) X NAMELENGTH (H_ROWS_L) X VALUE (M_ROWS) X VALUELENGTH(M_ROWS_L) X NOHANDLE * EXEC CICS WEB SEND X FROM (RA_DSECT) X FROMLENGTH(WS_LEN) X ACTION (H_ACTION) X MEDIATYPE (H_MEDIA) X STATUSCODE(H_200) X STATUSTEXT(H_200_T) X STATUSLEN (H_200_L) X SRVCONVERT X NOHANDLE * L R14,BAS_REG Load return register BCR B'1111',R14 Return to caller * *********************************************************************** * JSON pre-key tags - begin. * *********************************************************************** RJ_0010 DS 0H ST R14,RJ_REG Save return register * STM 0,15,REGSAVE Save all registers * L R4,RA_PTR Load response array pointer *********************************************************************** * Create Primary key JSON tag. * *********************************************************************** RJ_0013 DS 0H MVI 0(R4),C'{' Move JSON bracket MVI 1(R4),C'"' Move double quote LA R4,2(0,R4) Bump RA * LA R6,PI_NAME Load Primary name address LA R5,16 Load Primary name max length *********************************************************************** * Space marks end of Primary Key name * *********************************************************************** RJ_0014 DS 0H CLI 0(R6),C' ' End of Primary name? BC B'1000',RJ_0015 ... yes, mark JSON field end MVC 0(1,R4),0(R6) ... no, use to create JSON tag LA R4,1(,R4) Bump RA LA R6,1(,R6) Bump Primary name pointer BCT R5,RJ_0014 Continue moving Primary name *********************************************************************** * Mark end of Primary key JSON tag. When the field is 'character' * * set the double quotes before data is moved to the response array. * *********************************************************************** RJ_0015 DS 0H MVI 0(R4),C'"' Move double quote MVI 1(R4),C':' Move colon LA R4,2(,R4) Bump RA CLI PI_TYPE,C'N' Numeric field? BC B'1000',RJ_0019 ... yes, continue MVI 0(R4),C'"' ... no, move double quote LA R4,1(,R4) Bump RA *********************************************************************** * JSON pre-key tags - finish. * *********************************************************************** RJ_0019 DS 0H ST R4,RA_PTR Save RA pointer LM 0,15,REGSAVE Load all registers L R14,RJ_REG Load return register BCR B'1111',R14 Return to caller * *********************************************************************** * JSON post-key tags - begin. * * When processing character field, include the double quote. * *********************************************************************** RJ_0020 DS 0H ST R14,RJ_REG Save return register * STM 0,15,REGSAVE Save all registers * L R4,RA_PTR Load response array pointer CLI O_P_TYPE,C'N' Numeric field? BC B'1000',RJ_0021 ... yes, continue MVI 0(R4),C'"' ... no, move double quote LA R4,1(,R4) Bump RA *********************************************************************** * The comma to separate JSON fields is moved before each data field * * is created. This insures that a trailing comma is not included in * * the response array. * *********************************************************************** RJ_0021 DS 0H *********************************************************************** * JSON post-key tags - finish. * *********************************************************************** RJ_0029 DS 0H ST R4,RA_PTR Save RA pointer LM 0,15,REGSAVE Load all registers L R14,RJ_REG Load return register BCR B'1111',R14 Return to caller * *********************************************************************** * JSON pre-field tags - begin. * * Include the comma, which separates each record in the array. * *********************************************************************** RJ_0030 DS 0H ST R14,RJ_REG Save return register * STM 0,15,REGSAVE Save all registers * L R4,RA_PTR Load response array pointer MVI 0(R4),C',' Move a comma LA R4,1(0,R4) Bump RA *********************************************************************** * Create field JSON tag. * *********************************************************************** RJ_0031 DS 0H MVI 0(R4),C'"' Move double quote LA R4,1(0,R4) Bump RA * LA R6,P_NAME Load PA field name address LA R5,16 Load PA field name max length *********************************************************************** * Space marks end of field names * *********************************************************************** RJ_0032 DS 0H CLI 0(R6),C' ' End of field name? BC B'1000',RJ_0033 ... yes, mark JSON field end MVC 0(1,R4),0(R6) ... no, use to create JSON tag LA R4,1(,R4) Bump RA LA R6,1(,R6) Bump Primary name pointer BCT R5,RJ_0032 Continue moving field name *********************************************************************** * Mark end of field name JSON tag. When the field is 'character' * * set the double quotes before data is moved to the response array. * *********************************************************************** RJ_0033 DS 0H MVI 0(R4),C'"' Move double quote MVI 1(R4),C':' Move colon LA R4,2(,R4) Bump RA CLI P_TYPE,C'N' Numeric field? BC B'1000',RJ_0039 ... yes, continue MVI 0(R4),C'"' ... no, move double quote LA R4,1(,R4) Bump RA *********************************************************************** * JSON pre-field tags - finish. * *********************************************************************** RJ_0039 DS 0H ST R4,RA_PTR Save RA pointer LM 0,15,REGSAVE Load all registers L R14,RJ_REG Load return register BCR B'1111',R14 Return to caller * *********************************************************************** * JSON post-field tags - begin. * * When processing character field, include the double quote. * *********************************************************************** RJ_0040 DS 0H ST R14,RJ_REG Save return register * STM 0,15,REGSAVE Save all registers * L R4,RA_PTR Load response array pointer CLI P_TYPE,C'N' Numeric field? BC B'1000',RJ_0041 ... yes, continue MVI 0(R4),C'"' ... no, move double quote LA R4,1(,R4) Bump RA *********************************************************************** * The comma to separate JSON fields is moved before each data field * * is created. This insures that a trailing comma is not included in * * the response array. * *********************************************************************** RJ_0041 DS 0H *********************************************************************** * JSON post-field tags - finish. * *********************************************************************** RJ_0049 DS 0H ST R4,RA_PTR Save RA pointer LM 0,15,REGSAVE Load all registers L R14,RJ_REG Load return register BCR B'1111',R14 Return to caller * *********************************************************************** * JSON end of array indicator. * *********************************************************************** RJ_0050 DS 0H ST R14,RJ_REG Save return register * STM 0,15,REGSAVE Save all registers * L R4,RA_PTR Load response array pointer MVI 0(R4),C'}' Move JSON end of array marker LA R4,1(,R4) Bump RA ST R4,RA_PTR Save RA pointer * LM 0,15,REGSAVE Load all registers L R14,RJ_REG Load return register BCR B'1111',R14 Return to caller * *********************************************************************** * Set WEB SEND length by scanning Response Array until hitting a null * * character. The GETMAIN for the Response Array is calculated using * * the maximum field names of 16 bytes, however the actual field names * * can be from 1-16 bytes. * *********************************************************************** RJ_0060 DS 0H ST R14,RJ_REG Save return register * STM 0,15,REGSAVE Save all registers * XR R15,R15 Response Array counter L R6,RA_ADDR Load response array address L R5,RA_LEN Load response array length *********************************************************************** * Search Response Array for null character * *********************************************************************** RJ_0061 DS 0H CLI 0(R6),X'00' Null character? BC B'1000',RJ_0062 ... yes, set WEB SEND length LA R15,1(0,R15) Add 1 to RA counter LA R6,1(,R6) Bump RA pointer BCT R5,RJ_0061 Continue searching for null *********************************************************************** * Set WEB SEND length using R15 counter. * *********************************************************************** RJ_0062 DS 0H ST R15,WS_LEN Save WEB SEND length * LM 0,15,REGSAVE Load all registers L R14,RJ_REG Load return register BCR B'1111',R14 Return to caller * * *********************************************************************** * Issue TRACE command. * *********************************************************************** TR_0010 DS 0H ST R14,BAS_REG Save return register STM 0,15,REGSAVE Save registers * * BC B'1111',TR_0020 Bypass trace * EXEC CICS ENTER TRACENUM(T_46) X FROM(W_46_M) X FROMLENGTH(T_LEN) X RESOURCE(T_RES) X NOHANDLE * TR_0020 DS 0H LM 0,15,REGSAVE Load registers L R14,BAS_REG Load return register BCR B'1111',R14 Return to caller * *********************************************************************** * STATUS(204) * *********************************************************************** ER_20401 DS 0H MVC C_STATUS,S_204 Set STATUS MVC C_REASON,=C'01' Set REASON BC B'1111',PC_0010 Transfer control to logging *********************************************************************** * STATUS(204) * *********************************************************************** ER_20402 DS 0H MVC C_STATUS,S_204 Set STATUS MVC C_REASON,=C'02' Set REASON BC B'1111',PC_0010 Transfer control to logging *********************************************************************** * STATUS(204) * *********************************************************************** ER_20403 DS 0H MVC C_STATUS,S_204 Set STATUS MVC C_REASON,=C'03' Set REASON BC B'1111',PC_0010 Transfer control to logging *********************************************************************** * STATUS(204) * *********************************************************************** ER_20404 DS 0H MVC C_STATUS,S_204 Set STATUS MVC C_REASON,=C'04' Set REASON BC B'1111',PC_0010 Transfer control to logging *********************************************************************** * STATUS(204) * *********************************************************************** ER_20405 DS 0H MVC C_STATUS,S_204 Set STATUS MVC C_REASON,=C'05' Set REASON BC B'1111',PC_0010 Transfer control to logging *********************************************************************** * STATUS(400) * *********************************************************************** ER_40001 DS 0H MVC C_STATUS,S_400 Set STATUS MVC C_REASON,=C'01' Set REASON BC B'1111',PC_0010 Transfer control to logging * *********************************************************************** * Define Constant fields * *********************************************************************** * DS 0F HEX_00 DC XL01'00' Nulls DS 0F HEX_40 DC 16XL01'40' Spaces DS 0F S_204 DC CL03'204' HTTP STATUS(204) DS 0F S_400 DC CL03'400' HTTP STATUS(400) DS 0F ONE DC F'1' One S_OT_LEN DC F'80' OPTIONS table maximum length S_PA_LEN DC F'8192' Parser Array maximum length S_FD_LEN DC F'65000' Field Define maximum length S_RA_LEN DC F'3200000' Response Array maximum length DS 0F S_DF_LEN DC H'32700' FAxxFILE maximum length DS 0F S_32K DC F'32000' Maximum segment length DS 0F PD_ZERO DC XL02'000F' Packed decimal zeroes PD_ONE DC XL02'001F' Packed decimal zeroes PD_NINES DC XL02'999F' Packed decimal nines ZD_ONE DC CL04'0001' Zoned decimal 0001 DS 0F ZFAM090 DC CL08'ZFAM090 ' zFAM Loggin and error program SK_FCT DC CL08'FAxxKEY ' zFAM KEY structure SF_FCT DC CL08'FAxxFILE' zFAM FILE structure C_CHAN DC CL16'ZFAM-CHANNEL ' zFAM channel C_OPTION DC CL16'ZFAM-OPTIONS ' OPTIONS container C_TTL DC CL16'ZFAM-TTL ' TTL container C_ARRAY DC CL16'ZFAM-ARRAY ' ARRAY container DS 0F S_FIXED DC CL09'FIXED ' Format FIXED DS 0F S_XML DC CL09'XML ' Format XML DS 0F S_JSON DC CL09'JSON ' Format JSON DS 0F S_DELIM DC CL09'DELIMITER' Format DELIMITER DS 0F *********************************************************************** * HTTP resources * *********************************************************************** H_TWO DC F'2' Length of CRLF H_CRLF DC XL02'0D25' Carriage Return Line Feed H_500 DC H'500' HTTP STATUS(500) H_500_L DC F'48' HTTP STATUS TEXT Length H_500_T DC CL16'03 Service unava' HTTP STATUS TEXT Length DC CL16'ilable and loggi' ... continued DC CL16'ng disabled ' ... and complete DS 0F H_200 DC H'200' HTTP STATUS(200) H_200_L DC F'32' HTTP STATUS TEXT Length H_200_T DC CL16'00 Request succe' HTTP STATUS TEXT Length DC CL16'ssful. ' ... continued DS 0F H_ACTION DC F'02' HTTP SEND ACTION(IMMEDIATE) H_MEDIA DC CL56'text/plain' HTTP Media type DS 0F M_ROWS_L DC F'04' HTTP Header message length M_ROWS DC CL04'0001' HTTP Header message H_ROWS_L DC F'09' HTTP Header length H_ROWS DC CL09'zFAM-Rows' HTTP Header DS 0F *********************************************************************** * Trace resources * *********************************************************************** T_46 DC H'46' Trace number T_46_M DC CL08'Build RA' Trace message T_RES DC CL08'zFAM020 ' Trace resource T_LEN DC H'08' Trace resource length * *********************************************************************** * Media type resources * *********************************************************************** DS 0H M_PLAIN DC CL10'TEXT/PLAIN' Equates to FORMAT=FIXED M_JSON DC CL09'TEXT/JSON' Equates to FORMAT=JSON M_XML DC CL08'TEXT/XML' Equates to FORMAT=XML M_DELIM DC CL14'TEXT/DELIMITED' Equates to FORMAT=DELIMITED DS 0H A_JSON DC CL16'APPLICATION/JSON' Equates to FORMAT=JSON A_XML DC CL15'APPLICATION/XML' Equates to FORMAT=XML *********************************************************************** * JSON characters. * *********************************************************************** DS 0H T_JSON DC XL01'BB' JSON trailer T_JSON_L EQU *-T_JSON JSON trailer length DS 0H H_XML DC CL16'<zFAM_ResultsArr' XML header DC CL03'ay>' H_XML_L EQU *-H_XML XML header length DS 0H T_XML DC CL16'</zFAM_ResultsAr' XML trailer DC CL04'ray>' T_XML_L EQU *-T_XML XML trailer length DS 0H L_SQUIG DC CL01'{' Left squiggle bracket R_SQUIG DC CL01'}' Right squiggle bracket L_SQUARE DC XL01'BA' Left square bracket R_SQUARE DC XL01'BB' Right square bracket A_COMMA DC CL01',' A comma D_QUOTE DC CL01'"' Double quote * *********************************************************************** * Literal Pool * *********************************************************************** LTORG * * *********************************************************************** * Register assignment * *********************************************************************** DS 0F R0 EQU 0 R1 EQU 1 R2 EQU 2 R3 EQU 3 R4 EQU 4 R5 EQU 5 R6 EQU 6 R7 EQU 7 R8 EQU 8 R9 EQU 9 R10 EQU 10 R11 EQU 11 R12 EQU 12 R13 EQU 13 R14 EQU 14 R15 EQU 15 * PRINT ON *********************************************************************** * End of Program - ZFAM020 * ********************************************************************** END ZFAM020
53.581191
73
0.35613
83efa55b96d4c4420a4c8556e797830842022546
457
asm
Assembly
char counter(DOS)/malloc.asm
E011011101001/Homeworks
7098b103118de53779523045045a238d88764fc9
[ "MIT" ]
6
2019-05-15T04:09:57.000Z
2019-11-13T16:26:21.000Z
char counter(DOS)/malloc.asm
E011011101001/Homeworks
7098b103118de53779523045045a238d88764fc9
[ "MIT" ]
null
null
null
char counter(DOS)/malloc.asm
E011011101001/Homeworks
7098b103118de53779523045045a238d88764fc9
[ "MIT" ]
null
null
null
assume cs:code, es:alloc public malloc alloc segment allocPtr dw 2 dw 0ffh dup(0) alloc ends code segment ; short malloc(short size); public malloc malloc proc far push bp mov bp, sp mov ax, es:[allocPtr] mov cx, [bp + 6] add word ptr es:[allocPtr], cx mov sp, bp pop bp retf 2 malloc endp ; void set_es(); public set_es set_es proc far mov ax, alloc mov es, ax retf set_es endp code ends end
11.146341
34
0.636761
5c87983c68159bb714214297ef8143be92272b12
1,593
asm
Assembly
externals/mpir-3.0.0/mpn/x86_64/nehalem/copyi.asm
JaminChan/eos_win
c03e57151cfe152d0d3120abb13226f4df74f37e
[ "MIT" ]
1
2018-08-14T03:52:21.000Z
2018-08-14T03:52:21.000Z
externals/mpir-3.0.0/mpn/x86_64/nehalem/copyi.asm
JaminChan/eos_win
c03e57151cfe152d0d3120abb13226f4df74f37e
[ "MIT" ]
null
null
null
externals/mpir-3.0.0/mpn/x86_64/nehalem/copyi.asm
JaminChan/eos_win
c03e57151cfe152d0d3120abb13226f4df74f37e
[ "MIT" ]
null
null
null
dnl mpn_copyi dnl Copyright 2009 Jason Moxham dnl This file is part of the MPIR Library. dnl The MPIR 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 MPIR 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 MPIR 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 ret mpn_copyi(mp_ptr,mp_ptr,mp_size_t) C rax rdi, rsi, rdx ASM_START() PROLOGUE(mpn_copyi) mov $3,%rcx lea -24(%rsi,%rdx,8),%rsi lea -24(%rdi,%rdx,8),%rdi sub %rdx,%rcx jnc skiplp ALIGN(16) lp: movdqu (%rsi,%rcx,8),%xmm0 movdqu 16(%rsi,%rcx,8),%xmm1 add $4,%rcx movdqu %xmm1,16-32(%rdi,%rcx,8) movdqu %xmm0,-32(%rdi,%rcx,8) jnc lp skiplp: cmp $2,%rcx ja case0 je case1 jp case2 case3: movdqu (%rsi,%rcx,8),%xmm0 mov 16(%rsi,%rcx,8),%rax mov %rax,16(%rdi,%rcx,8) movdqu %xmm0,(%rdi,%rcx,8) ret case2: movdqu (%rsi,%rcx,8),%xmm0 movdqu %xmm0,(%rdi,%rcx,8) ret case1: mov (%rsi,%rcx,8),%rax mov %rax,(%rdi,%rcx,8) case0: ret EPILOGUE()
27
79
0.711864
531646585bf877131bfe9dd50944e6b472c80110
396
asm
Assembly
programs/oeis/327/A327032.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/327/A327032.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/327/A327032.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A327032: a(n) = T(n, 4) with T(n, k) = Sum_{d|k} phi(d)*binomial(n - 1 + k/d, k/d). ; 0,4,12,27,53,95,159,252,382,558,790,1089,1467,1937,2513,3210,4044,5032,6192,7543,9105,10899,12947,15272,17898,20850,24154,27837,31927,36453,41445,46934,52952,59532,66708,74515,82989,92167,102087,112788,124310,136694 lpb $0 mov $2,$0 sub $0,1 add $2,2 add $1,$2 bin $2,$0 add $1,$2 lpe mov $0,$1
30.461538
217
0.65404
a37cf319ec6133180c08fd14472143e760b6d457
8,362
asm
Assembly
Transynther/x86/_processed/AVXALIGN/_zr_/i3-7100_9_0x84_notsx.log_5148_2764.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/AVXALIGN/_zr_/i3-7100_9_0x84_notsx.log_5148_2764.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/AVXALIGN/_zr_/i3-7100_9_0x84_notsx.log_5148_2764.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r11 push %r13 push %r14 push %r9 push %rbx push %rcx push %rdi push %rsi lea addresses_UC_ht+0x3ce6, %rdi nop nop nop inc %r11 mov (%rdi), %r14 nop nop nop nop nop add %r14, %r14 lea addresses_normal_ht+0x2422, %r9 nop nop nop nop dec %r13 mov $0x6162636465666768, %rcx movq %rcx, %xmm5 vmovups %ymm5, (%r9) nop inc %rdi lea addresses_WC_ht+0xed5e, %r14 nop nop nop nop inc %rbx mov $0x6162636465666768, %r11 movq %r11, %xmm2 and $0xffffffffffffffc0, %r14 vmovaps %ymm2, (%r14) nop nop nop nop nop sub $42617, %r14 lea addresses_normal_ht+0x187bc, %rdi inc %rbx movl $0x61626364, (%rdi) nop sub %r9, %r9 lea addresses_D_ht+0x1ca06, %r11 nop nop nop sub $8982, %r14 and $0xffffffffffffffc0, %r11 vmovntdqa (%r11), %ymm0 vextracti128 $0, %ymm0, %xmm0 vpextrq $0, %xmm0, %rbx nop nop nop nop nop sub $21852, %rcx lea addresses_WC_ht+0xd946, %rsi lea addresses_UC_ht+0x17ee6, %rdi nop nop nop cmp %r11, %r11 mov $50, %rcx rep movsb nop sub $1825, %rcx lea addresses_UC_ht+0x1d7e6, %r13 nop xor %rcx, %rcx mov $0x6162636465666768, %rdi movq %rdi, (%r13) nop sub $37873, %rsi lea addresses_D_ht+0x120b6, %rsi lea addresses_WT_ht+0x1c3e6, %rdi nop nop xor %rbx, %rbx mov $77, %rcx rep movsw nop nop nop nop nop cmp %rbx, %rbx lea addresses_WC_ht+0x110e2, %rsi lea addresses_UC_ht+0x137e6, %rdi clflush (%rsi) and %r11, %r11 mov $93, %rcx rep movsw nop cmp %r14, %r14 lea addresses_WC_ht+0x19bee, %rsi nop nop nop cmp %r13, %r13 movb $0x61, (%rsi) nop nop xor %r9, %r9 lea addresses_WC_ht+0x1dbe6, %rdi nop nop sub $44407, %rsi movups (%rdi), %xmm3 vpextrq $1, %xmm3, %rbx nop add %r11, %r11 lea addresses_WT_ht+0x1ae9e, %r13 nop cmp %r14, %r14 vmovups (%r13), %ymm6 vextracti128 $0, %ymm6, %xmm6 vpextrq $0, %xmm6, %rbx nop nop mfence lea addresses_UC_ht+0xdfe6, %r11 nop nop nop nop nop sub %r13, %r13 movw $0x6162, (%r11) nop nop dec %r13 lea addresses_normal_ht+0x15be6, %rsi lea addresses_WC_ht+0x1d66, %rdi nop nop nop sub %rbx, %rbx mov $51, %rcx rep movsl and $59495, %rdi pop %rsi pop %rdi pop %rcx pop %rbx pop %r9 pop %r14 pop %r13 pop %r11 ret .global s_faulty_load s_faulty_load: push %r12 push %r13 push %r14 push %rax push %rcx push %rdi push %rsi // Load lea addresses_PSE+0x1c9ba, %rdi nop nop nop and $41859, %rax mov (%rdi), %r14d nop nop nop nop and $50152, %r14 // Store lea addresses_D+0x137e6, %rdi sub $886, %rax movl $0x51525354, (%rdi) cmp %rdi, %rdi // Store lea addresses_D+0xe9e6, %r14 nop nop nop cmp $64322, %rsi mov $0x5152535455565758, %r12 movq %r12, %xmm6 movups %xmm6, (%r14) nop nop nop xor %r14, %r14 // Faulty Load lea addresses_US+0xbfe6, %rax nop nop xor %r14, %r14 movb (%rax), %r12b lea oracles, %rax and $0xff, %r12 shlq $12, %r12 mov (%rax,%r12,1), %r12 pop %rsi pop %rdi pop %rcx pop %rax pop %r14 pop %r13 pop %r12 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_US', 'same': True, 'size': 32, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_PSE', 'same': False, 'size': 4, 'congruent': 2, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_D', 'same': False, 'size': 4, 'congruent': 5, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_D', 'same': False, 'size': 16, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} [Faulty Load] {'src': {'type': 'addresses_US', 'same': True, 'size': 1, 'congruent': 0, 'NT': True, 'AVXalign': True}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'type': 'addresses_UC_ht', 'same': False, 'size': 8, 'congruent': 8, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_normal_ht', 'same': False, 'size': 32, 'congruent': 2, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_WC_ht', 'same': False, 'size': 32, 'congruent': 2, 'NT': False, 'AVXalign': True}, 'OP': 'STOR'} {'dst': {'type': 'addresses_normal_ht', 'same': False, 'size': 4, 'congruent': 1, 'NT': True, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_D_ht', 'same': True, 'size': 32, 'congruent': 5, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_WC_ht', 'congruent': 4, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 8, 'same': False}, 'OP': 'REPM'} {'dst': {'type': 'addresses_UC_ht', 'same': False, 'size': 8, 'congruent': 11, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_D_ht', 'congruent': 4, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 10, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_WC_ht', 'congruent': 2, 'same': True}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 11, 'same': False}, 'OP': 'REPM'} {'dst': {'type': 'addresses_WC_ht', 'same': False, 'size': 1, 'congruent': 3, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_WC_ht', 'same': False, 'size': 16, 'congruent': 8, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_WT_ht', 'same': False, 'size': 32, 'congruent': 2, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_UC_ht', 'same': False, 'size': 2, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_normal_ht', 'congruent': 10, 'same': True}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 6, 'same': True}, 'OP': 'REPM'} {'00': 5148} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
33.051383
2,999
0.656781
272a155fd5a8da345f6026134c86849bcc2214da
379
asm
Assembly
src/firmware-tests/Platform/Adc/Initialisation/VddAsVoltageReferenceTest.asm
pete-restall/Cluck2Sesame-Prototype
99119b6748847a7b6aeadc4bee42cbed726f7fdc
[ "MIT" ]
1
2019-12-12T09:07:08.000Z
2019-12-12T09:07:08.000Z
src/firmware-tests/Platform/Adc/Initialisation/VddAsVoltageReferenceTest.asm
pete-restall/Cluck2Sesame-Prototype
99119b6748847a7b6aeadc4bee42cbed726f7fdc
[ "MIT" ]
null
null
null
src/firmware-tests/Platform/Adc/Initialisation/VddAsVoltageReferenceTest.asm
pete-restall/Cluck2Sesame-Prototype
99119b6748847a7b6aeadc4bee42cbed726f7fdc
[ "MIT" ]
null
null
null
#include "Platform.inc" #include "FarCalls.inc" #include "Adc.inc" #include "TestFixture.inc" radix decimal VddAsVoltageReferenceTest code global testArrange testArrange: banksel ADCON0 bsf ADCON0, VCFG testAct: fcall initialiseAdc testAssert: banksel ADCON0 movf ADCON0, W andlw (1 << VCFG) .assert "W == 0, 'Expected voltage reference is VDD.'" return end
14.576923
55
0.738786
a8b3dffc48e965dd87fa3541bfd86e3b4860227e
506
asm
Assembly
programs/oeis/003/A003451.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/003/A003451.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/003/A003451.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A003451: Number of nonequivalent dissections of an n-gon into 3 polygons by nonintersecting diagonals up to rotation. ; 1,4,8,16,25,40,56,80,105,140,176,224,273,336,400,480,561,660,760,880,1001,1144,1288,1456,1625,1820,2016,2240,2465,2720,2976,3264,3553,3876,4200,4560,4921,5320,5720,6160,6601,7084,7568,8096,8625,9200,9776,10400 mov $1,$0 add $0,1 mov $2,$1 mov $3,2 lpb $0,1 sub $0,1 add $2,$1 sub $2,$0 add $3,1 add $3,$2 trn $2,$0 sub $3,1 add $3,$2 lpe sub $3,$1 sub $3,1 add $1,$3
24.095238
211
0.677866
aefb14a7d64d9b9a5c99cf1756cfa123d8d420ae
516
asm
Assembly
programs/oeis/292/A292290.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/292/A292290.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/292/A292290.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A292290: Number of vertices of type A at level n of the hyperbolic Pascal pyramid. ; 0,0,3,6,12,27,66,168,435,1134,2964,7755,20298,53136,139107,364182,953436,2496123,6534930,17108664,44791059,117264510,307002468,803742891,2104226202,5508935712,14422580931,37758807078,98853840300,258802713819,677554301154,1773860189640,4644026267763,12158218613646,31830629573172,83333670105867,218170380744426,571177472127408,1495362035637795,3914908634785974 sub $0,1 lpb $0,1 sub $0,1 add $1,$2 add $2,$1 add $1,3 lpe
46.909091
361
0.812016
d8f1d3a70823e34309d0f67ca7779522a6b0949f
375
asm
Assembly
programs/oeis/127/A127116.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/127/A127116.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/127/A127116.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A127116: n! in base 9. ; 1,1,2,6,26,143,880,6820,61270,612700,6740700,83088500,1211283600,17058212600,270017301300,4560302022000,82065335385000,1648341372414000,34076827548280000,725735500635080000,17178403115182870000 seq $0,142 ; Factorial numbers: n! = 1*2*3*4*...*n (order of symmetric group S_n, number of permutations of n letters). seq $0,7095 ; Numbers in base 9.
62.5
195
0.781333
cb4b296cb70cc7f9463cb8dc4fa2dcba04bb58c4
637
asm
Assembly
oeis/064/A064321.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/064/A064321.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/064/A064321.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A064321: n*(n-1)^3*(n-2)^3*(n-3). ; Submitted by Jon Maiga ; 0,0,0,0,864,17280,144000,756000,2963520,9483264,26127360,64152000,143748000,298995840,584648064,1085142240,1926288000,3290112000,5433384960,8710395264,13600573920,20741616000,30968784000,45361118880,65295324864,92508134400,129168000000,177957000000,242163885600,325789236864,433663735680,571580604000,746443296000,966429573120,1241173131264,1581963989760,2001968892000,2516473008000,3143144269440,3902321708064,4817329208640,5914816128000,7225126272000,8782696762560,10626488367264,12800448904320 sub $0,1 bin $0,2 mov $1,$0 pow $0,2 bin $1,2 mul $0,$1 div $0,9 mul $0,288
49
498
0.828885
7f861d24b833afe5ef91bbd3b54a76bc9c8993b2
6,874
asm
Assembly
build/output.asm
gcoulby/JP
9c058be14f6eda6af3eef6493734d230104812eb
[ "MIT" ]
null
null
null
build/output.asm
gcoulby/JP
9c058be14f6eda6af3eef6493734d230104812eb
[ "MIT" ]
null
null
null
build/output.asm
gcoulby/JP
9c058be14f6eda6af3eef6493734d230104812eb
[ "MIT" ]
null
null
null
;-------------------------------------------------------- ; File Created by SDCC : free open source ANSI-C Compiler ; Version 4.1.0 #12072 (MINGW32) ;-------------------------------------------------------- .module output .optsdcc -mgbz80 ;-------------------------------------------------------- ; Public variables in this module ;-------------------------------------------------------- .globl _song0 .globl _song_Data ;-------------------------------------------------------- ; special function registers ;-------------------------------------------------------- ;-------------------------------------------------------- ; ram data ;-------------------------------------------------------- .area _DATA _song_Data:: .ds 4 ;-------------------------------------------------------- ; absolute external ram data ;-------------------------------------------------------- .area _DABS (ABS) ;-------------------------------------------------------- ; global & static initialisations ;-------------------------------------------------------- .area _HOME .area _GSINIT .area _GSFINAL .area _GSINIT ;P:\04_Computer_Science\C_CPP\Gameboy\00_jp_up\output.c:73: const unsigned char * song_Data[] = { ld hl, #_song_Data ld a, #<(_song0) ld (hl+), a ld (hl), #>(_song0) ld hl, #(_song_Data + 0x0002) xor a, a ld (hl+), a ld (hl), a ;-------------------------------------------------------- ; Home ;-------------------------------------------------------- .area _HOME .area _HOME ;-------------------------------------------------------- ; code ;-------------------------------------------------------- .area _CODE .area _CODE _song0: .db #0x00 ; 0 .db #0xa2 ; 162 .db #0x34 ; 52 '4' .db #0x96 ; 150 .db #0x37 ; 55 '7' .db #0x99 ; 153 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x20 ; 32 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x20 ; 32 .db #0x20 ; 32 .db #0x00 ; 0 .db #0x9d ; 157 .db #0x34 ; 52 '4' .db #0x00 ; 0 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x99 ; 153 .db #0x34 ; 52 '4' .db #0x91 ; 145 .db #0x37 ; 55 '7' .db #0x99 ; 153 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x20 ; 32 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x20 ; 32 .db #0x20 ; 32 .db #0x00 ; 0 .db #0xa0 ; 160 .db #0x34 ; 52 '4' .db #0x00 ; 0 .db #0x00 ; 0 .db #0x00 ; 0 .db #0xa2 ; 162 .db #0x34 ; 52 '4' .db #0x96 ; 150 .db #0x37 ; 55 '7' .db #0x99 ; 153 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x20 ; 32 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x20 ; 32 .db #0x20 ; 32 .db #0x00 ; 0 .db #0x9d ; 157 .db #0x34 ; 52 '4' .db #0x00 ; 0 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x99 ; 153 .db #0x34 ; 52 '4' .db #0x91 ; 145 .db #0x37 ; 55 '7' .db #0x99 ; 153 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x20 ; 32 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x20 ; 32 .db #0x20 ; 32 .db #0x00 ; 0 .db #0x9d ; 157 .db #0x34 ; 52 '4' .db #0x00 ; 0 .db #0x00 ; 0 .db #0x00 ; 0 .db #0xa2 ; 162 .db #0x34 ; 52 '4' .db #0x92 ; 146 .db #0x37 ; 55 '7' .db #0x99 ; 153 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x20 ; 32 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x20 ; 32 .db #0x20 ; 32 .db #0x00 ; 0 .db #0x9d ; 157 .db #0x34 ; 52 '4' .db #0x00 ; 0 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x99 ; 153 .db #0x34 ; 52 '4' .db #0x8d ; 141 .db #0x37 ; 55 '7' .db #0x99 ; 153 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x20 ; 32 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x20 ; 32 .db #0x20 ; 32 .db #0x00 ; 0 .db #0xa0 ; 160 .db #0x34 ; 52 '4' .db #0x00 ; 0 .db #0x00 ; 0 .db #0x00 ; 0 .db #0xa2 ; 162 .db #0x34 ; 52 '4' .db #0x92 ; 146 .db #0x37 ; 55 '7' .db #0x99 ; 153 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x20 ; 32 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x20 ; 32 .db #0x20 ; 32 .db #0x00 ; 0 .db #0x9d ; 157 .db #0x34 ; 52 '4' .db #0x00 ; 0 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x99 ; 153 .db #0x34 ; 52 '4' .db #0x8d ; 141 .db #0x37 ; 55 '7' .db #0x99 ; 153 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x00 ; 0 .db #0xa2 ; 162 .db #0x34 ; 52 '4' .db #0x96 ; 150 .db #0x37 ; 55 '7' .db #0x99 ; 153 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x20 ; 32 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x20 ; 32 .db #0x20 ; 32 .db #0x00 ; 0 .db #0x9d ; 157 .db #0x34 ; 52 '4' .db #0x00 ; 0 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x99 ; 153 .db #0x34 ; 52 '4' .db #0x91 ; 145 .db #0x37 ; 55 '7' .db #0x99 ; 153 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x20 ; 32 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x20 ; 32 .db #0x20 ; 32 .db #0x00 ; 0 .db #0xa0 ; 160 .db #0x34 ; 52 '4' .db #0x00 ; 0 .db #0x00 ; 0 .db #0x00 ; 0 .db #0xa2 ; 162 .db #0x34 ; 52 '4' .db #0x96 ; 150 .db #0x37 ; 55 '7' .db #0x99 ; 153 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x20 ; 32 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x20 ; 32 .db #0x20 ; 32 .db #0x00 ; 0 .db #0x9d ; 157 .db #0x34 ; 52 '4' .db #0x00 ; 0 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x99 ; 153 .db #0x34 ; 52 '4' .db #0x91 ; 145 .db #0x37 ; 55 '7' .db #0x99 ; 153 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x20 ; 32 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x20 ; 32 .db #0x20 ; 32 .db #0x00 ; 0 .db #0x9d ; 157 .db #0x34 ; 52 '4' .db #0x00 ; 0 .db #0x00 ; 0 .db #0x00 ; 0 .db #0xa2 ; 162 .db #0x34 ; 52 '4' .db #0x92 ; 146 .db #0x37 ; 55 '7' .db #0x99 ; 153 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x20 ; 32 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x20 ; 32 .db #0x20 ; 32 .db #0x00 ; 0 .db #0x9d ; 157 .db #0x34 ; 52 '4' .db #0x00 ; 0 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x99 ; 153 .db #0x34 ; 52 '4' .db #0x8d ; 141 .db #0x37 ; 55 '7' .db #0x99 ; 153 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x20 ; 32 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x20 ; 32 .db #0x20 ; 32 .db #0x00 ; 0 .db #0xa0 ; 160 .db #0x34 ; 52 '4' .db #0x00 ; 0 .db #0x00 ; 0 .db #0x00 ; 0 .db #0xa2 ; 162 .db #0x34 ; 52 '4' .db #0x92 ; 146 .db #0x37 ; 55 '7' .db #0x99 ; 153 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x20 ; 32 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x20 ; 32 .db #0x20 ; 32 .db #0x00 ; 0 .db #0x9d ; 157 .db #0x34 ; 52 '4' .db #0x00 ; 0 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x99 ; 153 .db #0x34 ; 52 '4' .db #0x8d ; 141 .db #0x37 ; 55 '7' .db #0x99 ; 153 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x20 ; 32 .db #0x20 ; 32 .db #0x20 ; 32 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x91 ; 145 .db #0x37 ; 55 '7' .db #0x99 ; 153 .db #0x00 ; 0 .area _CABS (ABS)
18.379679
97
0.439191
dfa85a45eda1d969d247d523cdb15bc667026a9b
626
asm
Assembly
uw1/call-eop-mouseLookOrMoveCursor.asm
JohnGlassmyer/UltimaHacks
f9a114e00c4a1edf1ac7792b465feff2c9b88ced
[ "MIT" ]
68
2018-03-04T22:34:22.000Z
2022-03-10T15:18:32.000Z
uw1/call-eop-mouseLookOrMoveCursor.asm
ptrie/UltimaHacks
2c3557a86d94ad8b54b26bc395b9aed1604f8be1
[ "MIT" ]
19
2018-11-20T04:06:49.000Z
2021-11-08T16:37:10.000Z
uw1/call-eop-mouseLookOrMoveCursor.asm
ptrie/UltimaHacks
2c3557a86d94ad8b54b26bc395b9aed1604f8be1
[ "MIT" ]
4
2020-09-01T17:57:36.000Z
2022-01-04T20:51:11.000Z
%ifndef EXE_LENGTH %include "../UltimaPatcher.asm" %include "include/uw1.asm" %include "include/uw1-eop.asm" defineAddress 14, 0x0B16, moveCursor defineAddress 14, 0x0B5B, doneMovingCursor %define pushYDelta push di %endif [bits 16] startPatch EXE_LENGTH, \ call mouselook eop instead of updating cursor position startBlockAt addr_moveCursor %assign var_mouseXDelta -0x0A ; di == mouseYDelta push word [bp+var_mouseXDelta] pushYDelta push word varArgsEopArg(mouseLookOrMoveCursor, 2) callFromLoadModule varArgsEopDispatcher add sp, 6 jmp calcJump(off_doneMovingCursor) endBlock endPatch
20.866667
56
0.773163
4e777d84e998df682b5428647e87469196540c7a
384
asm
Assembly
programs/oeis/185/A185453.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/185/A185453.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/185/A185453.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A185453: Trajectory of 1 under repeated application of the map in A185452. ; 1,3,8,4,2,1,3,8,4,2,1,3,8,4,2,1,3,8,4,2,1,3,8,4,2,1,3,8,4,2,1,3,8,4,2,1,3,8,4,2,1,3,8,4,2,1,3,8,4,2,1,3,8,4,2,1,3,8,4,2,1,3,8,4,2,1,3,8,4,2,1,3,8,4,2,1,3,8,4,2,1,3,8,4,2,1,3,8,4,2,1,3,8,4,2,1,3,8,4,2,1,3,8,4,2,1,3,8,4 add $0,1 mod $0,5 mov $3,1 add $$0,$0 mul $3,3 add $$1,$3 mov $1,$0 div $1,2 add $1,1
29.538462
219
0.559896
1281b4c100bccb295732a244240e1ebd12619505
567
asm
Assembly
programs/oeis/273/A273834.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/273/A273834.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/273/A273834.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A273834: First differences of number of active (ON,black) cells in n-th stage of growth of two-dimensional cellular automaton defined by "Rule 961", based on the 5-celled von Neumann neighborhood. ; 3,17,24,31,41,47,57,63,73,79,89,95,105,111,121,127,137,143,153,159,169,175,185,191,201,207,217,223,233,239,249,255,265,271,281,287,297,303,313,319,329,335,345,351,361,367,377,383,393,399,409,415,425,431 mov $5,$0 lpb $0 sub $0,1 add $1,8 mov $2,$5 trn $3,3 mov $4,3 sub $5,$5 add $5,3 trn $5,$2 add $5,1 lpe add $3,$5 add $1,$3 add $4,3 add $1,$4
28.35
204
0.675485
14f7b5923d2bc65f8c8026482af86826934e6cb9
5,033
asm
Assembly
iod/con2/java8/sprite_drop.asm
olifink/smsqe
c546d882b26566a46d71820d1539bed9ea8af108
[ "BSD-2-Clause" ]
null
null
null
iod/con2/java8/sprite_drop.asm
olifink/smsqe
c546d882b26566a46d71820d1539bed9ea8af108
[ "BSD-2-Clause" ]
null
null
null
iod/con2/java8/sprite_drop.asm
olifink/smsqe
c546d882b26566a46d71820d1539bed9ea8af108
[ "BSD-2-Clause" ]
null
null
null
; Sprite dropping code V1.11  1985 Tony Tebby ; 2003 Marcel Kilgus ; ; 2003-02-11 1.10 Added alpha blending code (MK) ; 2005-03-27 1.11 Extension for empty (solid) mask (MK) ; 2013-04-28 1.12 xdef'd the aur2rgb_tab table (wl) ; 2020-02-07 1.13 faster code for long words, eliminated some dead code ; ; d0 s ; d1 s ; d2 s ; d3 s ; d4 s ; d5 c s sprite width / sprite word counter ; d6 c s row counter ; d7 s ; ; a0 s ; a3 c s new pointer to screen ; a4 s pointer to sprite pattern ; a5 c s pointer to sprite pointers / pointer to sprite mask ; a6 c p address increment of screen ; section driver ; xdef sp_drop xdef sp_dropi xref rgb2aur_tab xdef aur2rgb_tab ; sp_drop move.l a5,a4 ; set pointer to sprite pattern add.l (a5)+,a4 move.l a5,d3 move.l (a5),a5 move.l a5,d4 beq.s sp_dropi ; ... sprite mask ptr is 0 add.l d3,a5 ; absolute sprite mask ptr sp_dropi move.l a5,d0 ; any mask? beq.s sp_nomask tst.l d5 ; alpha blending requested (MSW positive)? bpl.s alpha_dropi sp_line move.l d5,d4 ; set counter move.l a3,d0 btst #0,d0 ; odd address? bne.s odd ; yes, address byte by byte ; long_word move.l (a5)+,d0 not.l d0 and.l (a3),d0 move.l (a4)+,d1 eor.l d1,d0 move.l d0,(a3)+ subq.w #1,d4 ; next long word bgt.s long_word ; ... there is another one next_line add.w a6,a3 ; move address to next line dbra d6,sp_line ; next line rts odd move.l (a5)+,d0 ; 1st byte not.l d0 move.b (a3),d1 swap d1 ; = left shift by 16 bits move.w 1(a3),d1 ; 2nd + 3rd bytes lsl.l #8,d1 move.b 3(a3),d1 ; 4th byte and.l d1,d0 move.l (a4)+,d1 eor.l d1,d0 move.b d0,3(a3) lsr.l #8,d0 move.w d0,1(a3) swap d0 ; = right shift by 16 bits move.b d0,(a3) addq.l #4,a3 subq.w #1,d4 ; next long word bgt.s odd ; ... there is another one bra.s next_line ; sp_nomask move.l d5,d4 ; set counter ; snm_long_word move.l (a4)+,(a3)+ subq.w #1,d4 ; next long word bgt.s snm_long_word ; ... there is another one add.w a6,a3 ; move address to next line dbra d6,sp_nomask ; next line rts ; alpha_dropi move.l a1,-(sp) lea aur2rgb_tab(pc),a0 lea rgb2aur_tab(pc),a1 swap d5 ; get real sprite width moveq #4,d0 ; calculata pattern padding sub.w d5,d0 and.w #3,d0 swap d5 move.w d0,d5 ; and save it swap d5 move.l d5,-(sp) ; alpha_line move.l (sp),d5 ; restore counter swap d6 clr.w d6 ; alpha_loop clr.w d0 move.b (a4)+,d0 ; source move.b (a5)+,d6 ; alpha channel beq.s alpha_loope ; completely transparent cmp.b #255,d6 beq.s alpha_write ; completely opaque clr.w d3 move.b (a3),d3 ; destination add.w d0,d0 add.w d3,d3 move.w (a0,d0.w),d0 ; convert to R3G3B3 move.w (a0,d3.w),d3 move.w d0,d1 move.w d0,d2 move.w d3,d4 move.w d3,d7 and.w #%000000111,d0 ; split into components and.w #%000111000,d1 and.w #%111000000,d2 and.w #%000000111,d3 ; split into components and.w #%000111000,d4 and.w #%111000000,d7 sub.w d3,d0 ; source - destination sub.w d4,d1 sub.w d7,d2 muls d6,d0 ; (source - destination) * alpha muls d6,d1 muls d6,d2 asr.l #8,d0 ; normalize asr.l #8,d1 asr.l #8,d2 and.w #$FFF8,d1 ; and cut and.w #$FFC0,d2 add.w d3,d0 add.w d4,d1 add.w d7,d2 or.w d1,d0 or.w d2,d0 move.b (a1,d0.w),d0 alpha_write move.b d0,(a3) alpha_loope addq.w #1,a3 subq.w #1,d5 ; next byte bgt.s alpha_loop ; ... there is another one swap d5 add.w d5,a3 ; add padding add.w d5,a4 swap d6 add.w a6,a3 ; move address to next line dbra d6,alpha_line ; next line move.l (sp)+,d5 move.l (sp)+,a1 rts aur2rgb_tab dc.w $000,$040,$008,$048,$002,$003,$00A,$00B dc.w $080,$0C0,$088,$0C8,$082,$0C3,$08A,$0CB dc.w $010,$050,$018,$058,$012,$013,$01A,$01B dc.w $090,$0D0,$098,$0D8,$092,$0D3,$09A,$0DB dc.w $004,$005,$00C,$00D,$006,$007,$00E,$00F dc.w $084,$0C5,$08C,$0CD,$086,$0C7,$08E,$0CF dc.w $014,$015,$01C,$01D,$016,$017,$01E,$01F dc.w $094,$0D5,$09C,$0DD,$096,$0D7,$09E,$0DF dc.w $100,$140,$108,$148,$102,$143,$10A,$14B dc.w $180,$1C0,$188,$1C8,$182,$1C3,$18A,$1CB dc.w $110,$150,$118,$158,$112,$153,$11A,$15B dc.w $190,$1D0,$198,$1D8,$192,$1D3,$19A,$1DB dc.w $104,$145,$10C,$14D,$106,$147,$10E,$14F dc.w $184,$1C5,$18C,$1CD,$186,$1C7,$18E,$1CF dc.w $114,$155,$11C,$15D,$116,$157,$11E,$15F dc.w $194,$1D5,$19C,$1DD,$196,$1D7,$19E,$1DF dc.w $020,$060,$028,$068,$022,$023,$02A,$02B dc.w $0A0,$0E0,$0A8,$0E8,$0A2,$0E3,$0AA,$0EB dc.w $030,$070,$038,$078,$032,$033,$03A,$03B dc.w $0B0,$0F0,$0B8,$0F8,$0B2,$0F3,$0BA,$0FB dc.w $024,$025,$02C,$02D,$026,$027,$02E,$02F dc.w $0A4,$0E5,$0AC,$0ED,$0A6,$0E7,$0AE,$0EF dc.w $034,$035,$03C,$03D,$036,$037,$03E,$03F dc.w $0B4,$0F5,$0BC,$0FD,$0B6,$0F7,$0BE,$0FF dc.w $120,$160,$128,$168,$122,$163,$12A,$16B dc.w $1A0,$1E0,$1A8,$1E8,$1A2,$1E3,$1AA,$1EB dc.w $130,$170,$138,$178,$132,$173,$13A,$17B dc.w $1B0,$1F0,$1B8,$1F8,$1B2,$1F3,$1BA,$1FB dc.w $124,$165,$12C,$16D,$126,$167,$12E,$16F dc.w $1A4,$1E5,$1AC,$1ED,$1A6,$1E7,$1AE,$1EF dc.w $134,$175,$13C,$17D,$136,$177,$13E,$17F dc.w $1B4,$1F5,$1BC,$1FD,$1B6,$1F7,$1BE,$1FF end
23.193548
73
0.637195
cb6d59affb4993d4935b20a6ccdf990c8353da3c
467
asm
Assembly
programs/oeis/001/A001842.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/001/A001842.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/001/A001842.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A001842: Expansion of Sum_{n>=0} x^(4*n+3)/(1 - x^(4*n+3)). ; 0,0,0,1,0,0,1,1,0,1,0,1,1,0,1,2,0,0,1,1,0,2,1,1,1,0,0,2,1,0,2,1,0,2,0,2,1,0,1,2,0,0,2,1,1,2,1,1,1,1,0,2,0,0,2,2,1,2,0,1,2,0,1,3,0,0,2,1,0,2,2,1,1,0,0,3,1,2,2,1,0,2,0,1,2,0,1,2,1,0,2,2,1,2,1,2,1,0,1,3 mov $2,$0 lpb $0 mov $3,$2 mov $4,$0 cmp $4,0 add $0,$4 dif $3,$0 cmp $3,$2 cmp $3,0 mul $3,$0 sub $0,1 mov $5,1 lpb $5 add $1,1 add $5,$3 mod $5,4 lpe lpe mov $0,$1
20.304348
201
0.475375
4f76e6f8a82244f74f02ee2be4bc116f32cc0a05
70
asm
Assembly
8085_programming/gnu_8085_rev/zero.asm
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
16
2018-11-26T08:39:42.000Z
2019-05-08T10:09:52.000Z
8085_programming/gnu_8085_rev/zero.asm
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
8
2020-05-04T06:29:26.000Z
2022-02-12T05:33:16.000Z
8085_programming/gnu_8085_rev/zero.asm
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
5
2020-02-11T16:02:21.000Z
2021-02-05T07:48:30.000Z
LXI B,2050 PUSH B LXI B,3060 PUSH B POP B HLT
10
14
0.471429
6b503b92dab28ebc56d0cf44ac0c098c0764427b
1,775
asm
Assembly
src/util/icon/nextrec.asm
olifink/qspread
d6403d210bdad9966af5d2a0358d4eed3f1e1c02
[ "MIT" ]
null
null
null
src/util/icon/nextrec.asm
olifink/qspread
d6403d210bdad9966af5d2a0358d4eed3f1e1c02
[ "MIT" ]
null
null
null
src/util/icon/nextrec.asm
olifink/qspread
d6403d210bdad9966af5d2a0358d4eed3f1e1c02
[ "MIT" ]
null
null
null
* Sprite nextrec * * Mode 4 * +|-------------------+ * -gg g g wwww - * |g g g rww | * |gg ggg rwrw | * |g gwww rwr w | * |g wgrrrw rwr | * | www wwwrwrwwwww| * | wrrrw rwr w| * | www wwwrwrwwwwr w| * | wrrrw rwr w w| * |ww wwwrwrwwwr wr w| * |w rwr w w w| * |w rr rwr rr wr wwww| * |w wr w w | * |w r rr rrr wwww | * |w w | * |wwwwwwwwwwwwww | * +|-------------------+ * section sprite xdef mes_nextrec xref mes_zero mes_nextrec dc.w $0100,$0000 dc.w 20,16,0,0 dc.l mcs_nextrec-* dc.l mes_zero-* dc.l 0 mcs_nextrec dc.w $D400,$0101 dc.w $E0E0,$0000 dc.w $9400,$0000 dc.w $60E0,$0000 dc.w $DC00,$0001 dc.w $A0E0,$0000 dc.w $8703,$8183 dc.w $20A0,$0000 dc.w $8C0B,$42C7 dc.w $0000,$0000 dc.w $0E0E,$757F dc.w $F0F0,$0000 dc.w $111F,$081C dc.w $1010,$0000 dc.w $3939,$D7FF dc.w $90D0,$0000 dc.w $447C,$2070 dc.w $9090,$0000 dc.w $C7C7,$5CFE dc.w $90D0,$0000 dc.w $8081,$84C4 dc.w $9090,$0000 dc.w $81B3,$04B6 dc.w $F0F0,$0000 dc.w $8283,$0404 dc.w $8080,$0000 dc.w $80AC,$0777 dc.w $8080,$0000 dc.w $8080,$0404 dc.w $0000,$0000 dc.w $FFFF,$FCFC dc.w $0000,$0000 end mms_nextrec dc.w $D4D4,$0101 dc.w $E0E0,$0000 dc.w $9494,$0000 dc.w $E0E0,$0000 dc.w $DCDC,$0101 dc.w $E0E0,$0000 dc.w $8787,$8383 dc.w $A0A0,$0000 dc.w $8F8F,$C7C7 dc.w $0000,$0000 dc.w $0E0E,$7F7F dc.w $F0F0,$0000 dc.w $1F1F,$1C1C dc.w $1010,$0000 dc.w $3939,$FFFF dc.w $D0D0,$0000 dc.w $7C7C,$7070 dc.w $9090,$0000 dc.w $C7C7,$FEFE dc.w $D0D0,$0000 dc.w $8181,$C4C4 dc.w $9090,$0000 dc.w $B3B3,$B6B6 dc.w $F0F0,$0000 dc.w $8383,$0404 dc.w $8080,$0000 dc.w $ACAC,$7777 dc.w $8080,$0000 dc.w $8080,$0404 dc.w $0000,$0000 dc.w $FFFF,$FCFC dc.w $0000,$0000 * end
17.401961
24
0.567887
f68acb2467e42195304d154d26d5e992eae8f4c4
491
asm
Assembly
oeis/097/A097971.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/097/A097971.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/097/A097971.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A097971: Number of alternating runs in all permutations of [n] (the permutation 732569148 has four alternating runs: 732, 2569, 91 and 148). ; Submitted by Jamie Morken(s1.) ; 2,10,56,360,2640,21840,201600,2056320,22982400,279417600,3672345600,51891840000,784604620800,12640852224000,216202162176000,3912561709056000,74694359900160000,1500289571708928000,31627726106296320000,698242876346695680000 mov $1,$0 add $0,1 add $1,2 add $0,$1 lpb $1 mul $0,$1 sub $1,1 lpe div $0,6 mul $0,2
32.733333
223
0.780041
2a642df4f80ec1376603c4c6ef598186c44087f3
255
asm
Assembly
test5.asm
napobear/py6502
bdcc27649d46adf343ad212bf44669ef514b6a84
[ "Apache-2.0" ]
null
null
null
test5.asm
napobear/py6502
bdcc27649d46adf343ad212bf44669ef514b6a84
[ "Apache-2.0" ]
null
null
null
test5.asm
napobear/py6502
bdcc27649d46adf343ad212bf44669ef514b6a84
[ "Apache-2.0" ]
null
null
null
; Testing filling 10 memory locations with the ; values from 0 to 9 ; Now with labels START = 0 END = 10 LDX #START FOO TXA STA $10,X INX CPX #END BEQ DONE JMP FOO DONE: NOP
14.166667
47
0.490196
480090f4aa6d230b49b1215b59e060a9f47c3e6c
2,360
asm
Assembly
session_09/01-logicalstack/logicalstack.asm
DigiOhhh/LabArchitettura2-2017-2018
da34b9a75ab2945ac70d5cbf69395d0db5172f6f
[ "MIT" ]
1
2019-03-06T13:26:10.000Z
2019-03-06T13:26:10.000Z
session_09/01-logicalstack/logicalstack.asm
DigiOhhh/LabArchitettura2-2017-2018
da34b9a75ab2945ac70d5cbf69395d0db5172f6f
[ "MIT" ]
null
null
null
session_09/01-logicalstack/logicalstack.asm
DigiOhhh/LabArchitettura2-2017-2018
da34b9a75ab2945ac70d5cbf69395d0db5172f6f
[ "MIT" ]
1
2019-03-06T13:25:28.000Z
2019-03-06T13:25:28.000Z
.data stack : .word 0 # Puntatore all'ultimo elemento inserito nello stack stack_n : .word 0 # Nummero di elementi attualmente nello stack x_str : .asciiz "X: " y_str : .asciiz "Y: " angle_str : .asciiz "Theta: " empty_str : .asciiz "Stack is empty!\n" nl : .asciiz "\n" sep : .asciiz "-----------\n" # Nodo di esempio: # struct{ # int x; # int y; # int angle; # int *next; # } .text .globl stack_push .globl stack_pop .globl stack_print # Input : # a0 : x value # a1 : y value # a2 : angle value # Output: # --------- stack_push: # Inserisce un elemento nello stack move $t0, $a0 move $t1, $a1 move $t2, $a2 la $t8, stack lw $t7, 0($t8) la $t9, stack_n li $a0, 16 # malloc(4*4 bytes) li $v0, 9 syscall sw $t0, 0($v0) # inizializza nuovo nodo sw $t1, 4($v0) sw $t2, 8($v0) sw $t7, 12($v0) # next = *old_stack lw $t3, 0($t9) # stack_n++ addi $t3, $t3, 1 sw $v0, 0($t8) # aggiorna lo stack pointer al nodo appena creato sw $t3, 0($t9) # aggiorna il contatore di elementi jr $ra # ritorna al chiamante # Input: # --------- # Output : # $v0 : address of popped element or 0 if stack is empty stack_pop: la $t9, stack_n lw $t0, 0($t9) bne $t0, $zero, pop move $v0, $zero j pop_exit pop: la $t8, stack lw $v0, 0($t8) # Vogliamo restituire l'indirizzo dell'elemento appena rimosso lw $t7, 12($v0) subi $t0, $t0, 1 # stack_n-- sw $t7, 0($t8) # aggiorna lo stack pointer al nodo successivo a quello rimosso sw $t0, 0($t9) # aggiorna il contatore di elementi pop_exit: jr $ra # I/O : --------------- stack_print: la $t8, stack la $t9, stack_n lw $t7, 0($t9) lw $t0, 0($t8) beq $t7, 0, empty_stack print_loop: beq $t7, 0, end_loop # Stampa X li $v0, 4 la $a0, x_str syscall li $v0, 1 lw $a0, 0($t0) syscall li $v0, 4 la $a0, nl syscall # Stampa Y li $v0, 4 la $a0, y_str syscall li $v0, 1 lw $a0, 4($t0) syscall li $v0, 4 la $a0, nl syscall # Stampa Angolo li $v0, 4 la $a0, angle_str syscall li $v0, 1 lw $a0, 8($t0) syscall li $v0, 4 la $a0, nl syscall # Stampa Separatore li $v0, 4 la $a0, sep syscall lw $t0, 12($t0) # Prossimo elemento subi $t7, $t7, 1 # Decrementa contatore j print_loop empty_stack: li $v0, 4 la $a0, empty_str syscall # Stampa Separatore li $v0, 4 la $a0, sep syscall end_loop: jr $ra
16.164384
81
0.604237
e9d12d844a5646488d88cf31234e172d904521e4
787
asm
Assembly
programs/oeis/085/A085440.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/085/A085440.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/085/A085440.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A085440: a(n) = Sum_{i=1..n} binomial(i+1,2)^5. ; 1,244,8020,108020,867395,4951496,22161864,82628040,267156165,770440540,2022773116,4909947484,11150268935,23913084560,48796284560,95322158736,179163294729,325374464580,572984364580,981394464580,1639143014731,2675722491224,4277290592600,6707290592600,10333198795725,15660847522476,23378034080844,34409422280620,49985076052495,71725337593120,101745178232096,142781612082464,198348273781265,272921825653140,372165479953140,503195602093716,674898104677459,898302153597160,1187019590397160,1557759433597160,2030927859957461,2631325189022204,3388952605137180,4339942655037180,5527628960684055,7003772091073456,8829960148091824 lpb $0 mov $2,$0 add $2,1 cal $2,248720 ; a(n) = (n*(n+1))^5. sub $0,1 add $1,$2 lpe div $1,32 add $1,1
60.538462
621
0.832274
f740526c3b8c1fec7ccf46773665bfc20b59c4fb
4,334
asm
Assembly
base/new/entrance/warden/unit0/res/zzzhead_64.asm
frednora/gramado
90df547127c2402d0a6eb1db04c65c24389e0034
[ "BSD-2-Clause" ]
609
2017-08-28T01:58:35.000Z
2022-03-01T12:11:21.000Z
landos/kernel/1pump/arch/x86_64/pumpcore/zzzhead_64.asm
dalalsunil1986/gramado
cdb1b699c737a7340ffc5b23f01fc8b274c9db92
[ "BSD-2-Clause" ]
30
2017-09-01T01:40:18.000Z
2021-08-01T22:28:56.000Z
landos/kernel/1pump/arch/x86_64/pumpcore/zzzhead_64.asm
dalalsunil1986/gramado
cdb1b699c737a7340ffc5b23f01fc8b274c9db92
[ "BSD-2-Clause" ]
65
2017-10-05T02:27:29.000Z
2022-01-03T21:18:15.000Z
;; ;; File: 1pump/arch/x86/pumpcore/head_64.asm ;; ;; The entry point of the base kernel for the x86_64 arch. ;; This documment will includo some other files. ;; ;; 2021 - Created by Fred Nora. ;; - ported from the 32bit version ;; ; See: ; kernel/include/land/ %include "land/head.inc" ; ; Segmento .head_x86_64: ; Parte inicial do kernel. ; Esse marcador precisa ficar no começo do arquivo. ; ; segment .head_x86_64 __HEAD [bits 64] ; Imports. extern _code_begin extern _data_end extern _bss_end ; Multiboot support. MULTIBOOT_MAGIC equ 0x1badb002 MULTIBOOT_PAGE_ALIGN equ 0x1 MULTIBOOT_MEMORY_INFO equ 0x2 MULTIBOOT_VIDEO_MODE equ 0x4 multiboot_flags equ MULTIBOOT_PAGE_ALIGN | MULTIBOOT_MEMORY_INFO | MULTIBOOT_VIDEO_MODE multiboot_checksum equ -(MULTIBOOT_MAGIC + multiboot_flags) ;;================================== ;; _kernel_begin: ;; Boot x86_64 entry point. ;; The kernel starts here for x86_64 arch. ;; global _kernel_begin _kernel_begin: ; #bugbug ; Porque estamos usando um jmp, sem nem mesmo configurarmos ; os registradores de segmento. Estamos confiando na configuração ; feita pelo BL.BIN. ; Bom mesmos seria começarmos com a configuração da gdt e dos ; registradores de segmento. ; #todo ; Precismos carregar a gdt o mais rápido possível. .Lheadhang: cli hlt JMP .Lheadhang ; #todo ; Ainda não sei se é possivel realizar esse salto. ; Então vamos parar por aqui. JMP START align 4 ;; ============================================================= mboot_start: ; +-------------------+ ;0 | magic: 0x1BADB002 | (required) ;4 | flags | (required) ;8 | checksum | (required) ; +-------------------+ ;8 | header_addr | (present if flags[16] is set) ;12 | load_addr | (present if flags[16] is set) ;16 | load_end_addr | (present if flags[16] is set) ;20 | bss_end_addr | (present if flags[16] is set) ;24 | entry_addr | (present if flags[16] is set) ; +-------------------+ dd MULTIBOOT_MAGIC dd multiboot_flags dd multiboot_checksum ; fields used if MULTIBOOT_AOUT_KLUDGE is set in ; MULTIBOOT_HEADER_FLAGS ; for MULTIBOOT_MEMORY_INFO dd 0x00000000 ;; header_addr - mboot_start ; these are PHYSICAL addresses dd 0x00000000 ;; load_addr - _code_begin ; start of kernel .text (code) section dd 0x00000000 ;; load_end_addr - _data_end ; end of kernel .data section dd 0x00000000 ;; bss_end_addr - _bss_end ; end of kernel BSS dd 0x00000000 ;; entry_addr - _kernel_begin ; kernel entry point (initial EIP) ; for MULTIBOOT_VIDEO_MODE dd 0x00000000 ;; mode_type dd 800 ;; width dd 600 ;; height dd 24 ;; depth mboot_end: ;; ============================================================= align 4 %include "head/header.inc" ;; ... ; Restart the boot routine. START: cld cli ; IN: ; al = 'G' (Graphic Mode). ; al = 'T' (Text Mode). ; ebx = LFB. ; ecx = BootBlock pointer. ; edx = BootBlock pointer. ; ebp = BootBlock pointer. ; #importante ; AL e EBX foram configurados pelo BL.BIN ?? ; See: head.asm ;call head_init jmp head_init ; Not reached not_reached_loop: cli hlt jmp not_reached_loop ; Includes: ; ======== ; Esses includes são padronizados. Não acrescentar outros. ; Inicialização. ; Funções de apoio à inicialização do Kernel 32bit. %include "head/head.asm" %include "head/headlib.asm" ; Interrupções de hardware (irqs) e faults. %include "hw/hw.asm" %include "hw/hwlib.asm" ; Interrupções de software. %include "sw/sw.asm" %include "sw/swlib.asm" ;================================================================= ; DATA: ; Início do Segmento de dados. ; Coloca uma assinatura no todo. segment .data global _data_start _data_start: db 0x55 db 0xAA ;================================================================= ; BSS: ; Início do segmento BSS. ; Coloca uma assinatura no todo. ; Mas normalmente limpamos essa área. segment .bss global _bss_start _bss_start: ;db 0x55 ;db 0xAA ; ; End ;
21.038835
99
0.593216
7606d81f78b847e60251db4f9ca65fe3f15516ad
670
asm
Assembly
oeis/152/A152729.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/152/A152729.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/152/A152729.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A152729: a(n) = (n-2)^4 - a(n-1) - a(n-2), with a(1) = a(2) = 0. ; 0,0,1,15,65,176,384,736,1281,2079,3201,4720,6720,9296,12545,16575,21505,27456,34560,42960,52801,64239,77441,92576,109824,129376,151425,176175,203841,234640,268800,306560,348161,393855,443905,498576,558144,622896,693121,769119,851201,939680,1034880,1137136,1246785,1364175,1489665,1623616,1766400,1918400,2080001,2251599,2433601,2626416,2830464,3046176,3273985,3514335,3767681,4034480,4315200,4610320,4920321,5245695,5586945,5944576,6319104,6711056,7120961,7549359,7996801,8463840,8951040,9458976 pow $0,2 sub $0,2 mul $0,2 lpb $0 sub $0,4 add $1,$0 sub $0,1 trn $0,1 add $1,1 lpe mov $0,$1
44.666667
497
0.747761
41413122be5e58555702d3bdfeaad48fd641ee76
271
asm
Assembly
programs/oeis/105/A105452.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/105/A105452.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/105/A105452.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A105452: Numerator of (7 n -1)/3. ; 2,13,20,9,34,41,16,55,62,23,76,83,30,97,104,37,118,125,44,139,146,51,160,167,58,181,188,65,202,209,72,223,230,79,244,251,86,265,272,93,286,293,100,307,314,107,328,335,114,349 mul $0,7 mov $1,$0 add $0,6 mov $2,$1 gcd $2,3 div $0,$2
27.1
176
0.653137
1ed388430e2628cd864a4374650749144a807277
5,191
asm
Assembly
Transynther/x86/_processed/US/_st_un_sm_/i9-9900K_12_0xca_notsx.log_62_1.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/US/_st_un_sm_/i9-9900K_12_0xca_notsx.log_62_1.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/US/_st_un_sm_/i9-9900K_12_0xca_notsx.log_62_1.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 %r13 push %r14 push %r15 push %rbx push %rcx push %rdi push %rsi lea addresses_WT_ht+0x19cd7, %r12 clflush (%r12) nop nop nop cmp $46369, %rsi mov $0x6162636465666768, %r14 movq %r14, %xmm5 vmovups %ymm5, (%r12) nop nop nop nop cmp %r12, %r12 lea addresses_UC_ht+0x1db01, %rsi lea addresses_WC_ht+0xfb1, %rdi nop nop lfence mov $121, %rcx rep movsb and $24731, %rbx lea addresses_UC_ht+0x8911, %rcx mfence mov $0x6162636465666768, %r12 movq %r12, (%rcx) sub %r12, %r12 lea addresses_A_ht+0xd071, %rdi sub $46304, %r12 mov (%rdi), %ebx nop nop nop nop nop cmp %r15, %r15 lea addresses_A_ht+0xd9b1, %r14 nop nop nop nop cmp $51417, %rbx movw $0x6162, (%r14) nop nop nop nop cmp $16877, %r15 lea addresses_WT_ht+0x5719, %rsi lea addresses_A_ht+0x81b1, %rdi clflush (%rsi) nop nop nop xor $34617, %r13 mov $91, %rcx rep movsq nop nop nop inc %rbx lea addresses_UC_ht+0xac03, %r12 nop nop nop cmp $5405, %rdi mov $0x6162636465666768, %r15 movq %r15, %xmm7 movups %xmm7, (%r12) nop nop nop nop nop add %r13, %r13 lea addresses_normal_ht+0xf231, %r12 clflush (%r12) xor %r14, %r14 mov (%r12), %esi nop nop nop inc %r13 lea addresses_WT_ht+0xb4d1, %rdi clflush (%rdi) nop nop nop nop cmp $54429, %rbx movw $0x6162, (%rdi) nop nop nop nop nop add $50048, %rsi lea addresses_UC_ht+0xdc76, %r12 nop add %r13, %r13 movups (%r12), %xmm5 vpextrq $0, %xmm5, %rsi nop nop nop nop add %rdi, %rdi lea addresses_normal_ht+0x2df9, %r12 nop nop cmp %r15, %r15 mov (%r12), %esi nop nop nop nop nop add $8450, %rcx lea addresses_UC_ht+0x2017, %r15 clflush (%r15) nop nop nop nop cmp %r14, %r14 movups (%r15), %xmm4 vpextrq $1, %xmm4, %rcx nop nop xor $32753, %rbx lea addresses_D_ht+0x1b2d1, %rsi lea addresses_UC_ht+0x1b211, %rdi nop cmp %r14, %r14 mov $125, %rcx rep movsl nop add $6956, %r15 pop %rsi pop %rdi pop %rcx pop %rbx pop %r15 pop %r14 pop %r13 pop %r12 ret .global s_faulty_load s_faulty_load: push %r11 push %r12 push %r13 push %rbp push %rbx push %rdx push %rsi // Store lea addresses_US+0x9b1, %r12 nop sub $808, %rbp mov $0x5152535455565758, %r11 movq %r11, %xmm7 movaps %xmm7, (%r12) nop nop nop nop nop inc %rdx // Store mov $0x77fb550000000451, %rsi nop nop nop nop nop sub $9676, %r13 mov $0x5152535455565758, %rbx movq %rbx, (%rsi) nop nop nop and $17577, %rbx // Faulty Load lea addresses_US+0x9b1, %r13 nop nop nop cmp %r12, %r12 movb (%r13), %r11b lea oracles, %rbx and $0xff, %r11 shlq $12, %r11 mov (%rbx,%r11,1), %r11 pop %rsi pop %rdx pop %rbx pop %rbp pop %r13 pop %r12 pop %r11 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_US', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 0}} {'OP': 'STOR', 'dst': {'same': True, 'type': 'addresses_US', 'NT': False, 'AVXalign': True, 'size': 16, 'congruent': 0}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_NC', 'NT': False, 'AVXalign': True, 'size': 8, 'congruent': 5}} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_US', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 0}} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WT_ht', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 1}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 2, 'type': 'addresses_UC_ht'}, 'dst': {'same': False, 'congruent': 7, 'type': 'addresses_WC_ht'}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_UC_ht', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 4}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_A_ht', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 6}} {'OP': 'STOR', 'dst': {'same': True, 'type': 'addresses_A_ht', 'NT': False, 'AVXalign': True, 'size': 2, 'congruent': 11}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 3, 'type': 'addresses_WT_ht'}, 'dst': {'same': False, 'congruent': 11, 'type': 'addresses_A_ht'}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_UC_ht', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 0}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_normal_ht', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 7}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WT_ht', 'NT': True, 'AVXalign': False, 'size': 2, 'congruent': 4}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_UC_ht', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 0}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_normal_ht', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 2}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_UC_ht', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 1}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 3, 'type': 'addresses_D_ht'}, 'dst': {'same': False, 'congruent': 5, 'type': 'addresses_UC_ht'}} {'7a': 1, 'fc': 1, '32': 1, '0c': 1, '92': 1, 'c6': 1, '08': 1, 'c0': 1, 'da': 1, 'e6': 2, 'ac': 1, '58': 41, 'de': 1, '34': 1, 'c4': 1, '6c': 1, 'fa': 1, '20': 1, '5e': 1, 'f0': 1, 'f8': 1} 58 58 58 f8 58 58 58 c0 c6 58 0c 58 da 58 58 58 58 58 92 58 32 5e 58 58 08 7a f0 58 58 58 58 58 e6 c4 58 58 58 fc e6 58 58 58 58 58 20 de 58 58 ac 58 58 58 58 58 34 58 6c 58 58 fa 58 58 */
21.36214
190
0.639761
2fc1038af43333e622e9eacf6b8f60400a44ce19
67
asm
Assembly
tests/optimizer/E007.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
tests/optimizer/E007.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
69
2021-08-28T10:34:30.000Z
2022-03-20T19:16:19.000Z
tests/optimizer/E007.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; in add $0,-1 mul $0,2 sub $0,-3 ; out sub $0,1 mul $0,2 add $0,3
7.444444
9
0.522388
c92d1061ea3787ee3acfa5e3dbe4aa8f4958ad21
494
asm
Assembly
libsrc/_DEVELOPMENT/z180/z180/asm_z180_outp.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/_DEVELOPMENT/z180/z180/asm_z180_outp.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
1,600
2017-01-15T16:12:02.000Z
2022-03-31T12:11:12.000Z
libsrc/_DEVELOPMENT/z180/z180/asm_z180_outp.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
215
2017-01-17T10:43:03.000Z
2022-03-23T17:25:02.000Z
; =============================================================== ; Nov 2014 ; =============================================================== ; ; void z180_outp(uint16_t port, uint8_t data) ; ; Write data to 16-bit port. ; ; =============================================================== SECTION code_clib SECTION code_z180 PUBLIC asm_z180_outp PUBLIC asm_cpu_outp asm_z180_outp: asm_cpu_outp: ; enter : bc = port ; l = data ; ; uses : none out (c),l ret
17.642857
65
0.382591
f182ffaab7a76f26416f4df9dd7cbbdcc7f3fb23
301
asm
Assembly
programs/oeis/278/A278129.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/278/A278129.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/278/A278129.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A278129: a(n) = 348*2^n - 188. ; 160,508,1204,2596,5380,10948,22084,44356,88900,177988,356164,712516,1425220,2850628,5701444,11403076,22806340,45612868,91225924,182452036,364904260,729808708,1459617604,2919235396,5838470980,11676942148,23353884484 mov $1,2 pow $1,$0 sub $1,1 mul $1,348 add $1,160
33.444444
216
0.777409
16d04ecccb1e0378a3bab8c85ea76ceedd449128
581
asm
Assembly
simple_screen_example.asm
juhovh/spectrum
417e60164e63902ae221c449f5a645c18e01d9c5
[ "Unlicense" ]
26
2015-03-08T13:51:48.000Z
2021-11-16T22:14:46.000Z
simple_screen_example.asm
ktuukkan/spectrum
2f0283e44459402a9dcdc4afb1e4838fdda6782f
[ "Unlicense" ]
null
null
null
simple_screen_example.asm
ktuukkan/spectrum
2f0283e44459402a9dcdc4afb1e4838fdda6782f
[ "Unlicense" ]
4
2015-06-13T15:55:09.000Z
2019-12-25T07:32:22.000Z
org $8000 include utils.asm ourcolour equ PAPER_BLACK+INK_BLUE+BRIGHT main: ;; Clear everything on the screen call ClearScreen ;; Set border colour to black ld a,INK_BLACK out ($fe),a ;; We want to write 768 bytes to $5800 ld hl,$5800 ld bc,768 loop: ;; Load the colour we want ld (hl),ourcolour ;; Increase hl and decrease bc inc hl dec bc ;; Check if bc is completely 0 ld a,b or c ;; Continue loop if not 0 jr nz,loop ;; Set some pixels to check that our blue colour works ld b,0 ld c,0 call SetPixel inc b inc c call SetPixel di halt end main
14.525
55
0.697074
d6c3186ba9254ac15c2e91945f81cb6630ce2866
362
asm
Assembly
libc/setjmp/longjmp.asm
greck2908/LudOS
db38455eb33dfc0dfc6d4be102e6bd54d852eee8
[ "MIT" ]
44
2018-01-28T20:07:48.000Z
2022-02-11T22:58:49.000Z
libc/setjmp/longjmp.asm
greck2908/LudOS
db38455eb33dfc0dfc6d4be102e6bd54d852eee8
[ "MIT" ]
2
2017-09-12T15:38:16.000Z
2017-11-05T12:19:01.000Z
libc/setjmp/longjmp.asm
greck2908/LudOS
db38455eb33dfc0dfc6d4be102e6bd54d852eee8
[ "MIT" ]
8
2018-08-17T13:30:57.000Z
2021-06-25T16:56:12.000Z
global _longjmp global longjmp _longjmp: longjmp: mov edx, [esp+4] mov eax, [esp+8] test eax,eax jnz lbl inc eax lbl: mov ebx, [edx] mov esi, [edx+4] mov edi, [edx+8] mov ebp, [edx+12] mov ecx, [edx+16] mov esp, ecx mov ecx, [edx+20] jmp ecx
18.1
27
0.453039
979a6ec101d3f32c8e48434b655015e4a6694e50
46,326
asm
Assembly
timem.asm
joeofportland/project4final
4140c7c9293205eb6dcdadb5c8ed537e8e5c2f59
[ "MIT-0" ]
null
null
null
timem.asm
joeofportland/project4final
4140c7c9293205eb6dcdadb5c8ed537e8e5c2f59
[ "MIT-0" ]
null
null
null
timem.asm
joeofportland/project4final
4140c7c9293205eb6dcdadb5c8ed537e8e5c2f59
[ "MIT-0" ]
null
null
null
_timem: file format elf32-i386 Disassembly of section .text: 00000000 <main>: #define NULL_PTR ((char*)0) int main(int argc, char *argv[]) { 0: 55 push %ebp 1: 89 e5 mov %esp,%ebp 3: 83 e4 f0 and $0xfffffff0,%esp 6: 81 ec a0 00 00 00 sub $0xa0,%esp char *p[MAX_ARGS]; static int status = 1; //start time date(&r1); c: 8d 44 24 78 lea 0x78(%esp),%eax 10: 89 04 24 mov %eax,(%esp) 13: e8 c2 04 00 00 call 4da <date> // check for args if (argc < 2) 18: 83 7d 08 01 cmpl $0x1,0x8(%ebp) 1c: 7f 19 jg 37 <main+0x37> { printf(2, "minimum one command after 'timem'"); 1e: c7 44 24 04 d0 09 00 movl $0x9d0,0x4(%esp) 25: 00 26: c7 04 24 02 00 00 00 movl $0x2,(%esp) 2d: e8 d0 05 00 00 call 602 <printf> 32: e9 96 01 00 00 jmp 1cd <main+0x1cd> } else if (argc > MAX_ARGS+1) 37: 83 7d 08 15 cmpl $0x15,0x8(%ebp) 3b: 7e 19 jle 56 <main+0x56> { printf(2, "Hit maximum commands.\n"); 3d: c7 44 24 04 f2 09 00 movl $0x9f2,0x4(%esp) 44: 00 45: c7 04 24 02 00 00 00 movl $0x2,(%esp) 4c: e8 b1 05 00 00 call 602 <printf> 51: e9 77 01 00 00 jmp 1cd <main+0x1cd> } else { int i; int pid = fork(); 56: e8 d7 03 00 00 call 432 <fork> 5b: 89 84 24 98 00 00 00 mov %eax,0x98(%esp) // negative (fork failed) if (pid < 0) 62: 83 bc 24 98 00 00 00 cmpl $0x0,0x98(%esp) 69: 00 6a: 79 22 jns 8e <main+0x8e> printf(2, "'%s' has failed.\n", argv[0]); 6c: 8b 45 0c mov 0xc(%ebp),%eax 6f: 8b 00 mov (%eax),%eax 71: 89 44 24 08 mov %eax,0x8(%esp) 75: c7 44 24 04 09 0a 00 movl $0xa09,0x4(%esp) 7c: 00 7d: c7 04 24 02 00 00 00 movl $0x2,(%esp) 84: e8 79 05 00 00 call 602 <printf> 89: e9 c0 00 00 00 jmp 14e <main+0x14e> else if (pid > 0) 8e: 83 bc 24 98 00 00 00 cmpl $0x0,0x98(%esp) 95: 00 96: 7e 1d jle b5 <main+0xb5> { //parent pid = wait(); 98: e8 a5 03 00 00 call 442 <wait> 9d: 89 84 24 98 00 00 00 mov %eax,0x98(%esp) //end time date(&r2); a4: 8d 44 24 60 lea 0x60(%esp),%eax a8: 89 04 24 mov %eax,(%esp) ab: e8 2a 04 00 00 call 4da <date> b0: e9 99 00 00 00 jmp 14e <main+0x14e> } else { for (i = 0; i < argc-1; i++) b5: c7 84 24 9c 00 00 00 movl $0x0,0x9c(%esp) bc: 00 00 00 00 c0: eb 2b jmp ed <main+0xed> p[i] = argv[i+1]; c2: 8b 84 24 9c 00 00 00 mov 0x9c(%esp),%eax c9: 83 c0 01 add $0x1,%eax cc: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx d3: 8b 45 0c mov 0xc(%ebp),%eax d6: 01 d0 add %edx,%eax d8: 8b 10 mov (%eax),%edx da: 8b 84 24 9c 00 00 00 mov 0x9c(%esp),%eax e1: 89 54 84 10 mov %edx,0x10(%esp,%eax,4) //end time date(&r2); } else { for (i = 0; i < argc-1; i++) e5: 83 84 24 9c 00 00 00 addl $0x1,0x9c(%esp) ec: 01 ed: 8b 45 08 mov 0x8(%ebp),%eax f0: 83 e8 01 sub $0x1,%eax f3: 3b 84 24 9c 00 00 00 cmp 0x9c(%esp),%eax fa: 7f c6 jg c2 <main+0xc2> p[i] = argv[i+1]; p[i] = NULL_PTR; fc: 8b 84 24 9c 00 00 00 mov 0x9c(%esp),%eax 103: c7 44 84 10 00 00 00 movl $0x0,0x10(%esp,%eax,4) 10a: 00 //execute command status = exec(p[0], p); 10b: 8b 44 24 10 mov 0x10(%esp),%eax 10f: 8d 54 24 10 lea 0x10(%esp),%edx 113: 89 54 24 04 mov %edx,0x4(%esp) 117: 89 04 24 mov %eax,(%esp) 11a: e8 53 03 00 00 call 472 <exec> 11f: a3 8c 0c 00 00 mov %eax,0xc8c if (status) 124: a1 8c 0c 00 00 mov 0xc8c,%eax 129: 85 c0 test %eax,%eax 12b: 74 1c je 149 <main+0x149> printf(2, "exec '%s' failed", p[0]); 12d: 8b 44 24 10 mov 0x10(%esp),%eax 131: 89 44 24 08 mov %eax,0x8(%esp) 135: c7 44 24 04 1b 0a 00 movl $0xa1b,0x4(%esp) 13c: 00 13d: c7 04 24 02 00 00 00 movl $0x2,(%esp) 144: e8 b9 04 00 00 call 602 <printf> exit(); 149: e8 ec 02 00 00 call 43a <exit> } int s1 = r1.hour * 3600 + r1.minute * 60 + r1.second; 14e: 8b 84 24 80 00 00 00 mov 0x80(%esp),%eax 155: 69 d0 10 0e 00 00 imul $0xe10,%eax,%edx 15b: 8b 44 24 7c mov 0x7c(%esp),%eax 15f: c1 e0 02 shl $0x2,%eax 162: 89 c1 mov %eax,%ecx 164: c1 e1 04 shl $0x4,%ecx 167: 29 c1 sub %eax,%ecx 169: 89 c8 mov %ecx,%eax 16b: 01 c2 add %eax,%edx 16d: 8b 44 24 78 mov 0x78(%esp),%eax 171: 01 d0 add %edx,%eax 173: 89 84 24 94 00 00 00 mov %eax,0x94(%esp) int s2 = r2.hour * 3600 + r2.minute * 60 + r2.second; 17a: 8b 44 24 68 mov 0x68(%esp),%eax 17e: 69 d0 10 0e 00 00 imul $0xe10,%eax,%edx 184: 8b 44 24 64 mov 0x64(%esp),%eax 188: c1 e0 02 shl $0x2,%eax 18b: 89 c1 mov %eax,%ecx 18d: c1 e1 04 shl $0x4,%ecx 190: 29 c1 sub %eax,%ecx 192: 89 c8 mov %ecx,%eax 194: 01 c2 add %eax,%edx 196: 8b 44 24 60 mov 0x60(%esp),%eax 19a: 01 d0 add %edx,%eax 19c: 89 84 24 90 00 00 00 mov %eax,0x90(%esp) printf(2, "\nTime: %d seconds\n", s2-s1); 1a3: 8b 84 24 94 00 00 00 mov 0x94(%esp),%eax 1aa: 8b 94 24 90 00 00 00 mov 0x90(%esp),%edx 1b1: 29 c2 sub %eax,%edx 1b3: 89 d0 mov %edx,%eax 1b5: 89 44 24 08 mov %eax,0x8(%esp) 1b9: c7 44 24 04 2c 0a 00 movl $0xa2c,0x4(%esp) 1c0: 00 1c1: c7 04 24 02 00 00 00 movl $0x2,(%esp) 1c8: e8 35 04 00 00 call 602 <printf> } exit(); 1cd: e8 68 02 00 00 call 43a <exit> 000001d2 <stosb>: "cc"); } static inline void stosb(void *addr, int data, int cnt) { 1d2: 55 push %ebp 1d3: 89 e5 mov %esp,%ebp 1d5: 57 push %edi 1d6: 53 push %ebx asm volatile("cld; rep stosb" : 1d7: 8b 4d 08 mov 0x8(%ebp),%ecx 1da: 8b 55 10 mov 0x10(%ebp),%edx 1dd: 8b 45 0c mov 0xc(%ebp),%eax 1e0: 89 cb mov %ecx,%ebx 1e2: 89 df mov %ebx,%edi 1e4: 89 d1 mov %edx,%ecx 1e6: fc cld 1e7: f3 aa rep stos %al,%es:(%edi) 1e9: 89 ca mov %ecx,%edx 1eb: 89 fb mov %edi,%ebx 1ed: 89 5d 08 mov %ebx,0x8(%ebp) 1f0: 89 55 10 mov %edx,0x10(%ebp) "=D" (addr), "=c" (cnt) : "0" (addr), "1" (cnt), "a" (data) : "memory", "cc"); } 1f3: 5b pop %ebx 1f4: 5f pop %edi 1f5: 5d pop %ebp 1f6: c3 ret 000001f7 <strcpy>: #include "user.h" #include "x86.h" char* strcpy(char *s, char *t) { 1f7: 55 push %ebp 1f8: 89 e5 mov %esp,%ebp 1fa: 83 ec 10 sub $0x10,%esp char *os; os = s; 1fd: 8b 45 08 mov 0x8(%ebp),%eax 200: 89 45 fc mov %eax,-0x4(%ebp) while((*s++ = *t++) != 0) 203: 90 nop 204: 8b 45 08 mov 0x8(%ebp),%eax 207: 8d 50 01 lea 0x1(%eax),%edx 20a: 89 55 08 mov %edx,0x8(%ebp) 20d: 8b 55 0c mov 0xc(%ebp),%edx 210: 8d 4a 01 lea 0x1(%edx),%ecx 213: 89 4d 0c mov %ecx,0xc(%ebp) 216: 0f b6 12 movzbl (%edx),%edx 219: 88 10 mov %dl,(%eax) 21b: 0f b6 00 movzbl (%eax),%eax 21e: 84 c0 test %al,%al 220: 75 e2 jne 204 <strcpy+0xd> ; return os; 222: 8b 45 fc mov -0x4(%ebp),%eax } 225: c9 leave 226: c3 ret 00000227 <strcmp>: int strcmp(const char *p, const char *q) { 227: 55 push %ebp 228: 89 e5 mov %esp,%ebp while(*p && *p == *q) 22a: eb 08 jmp 234 <strcmp+0xd> p++, q++; 22c: 83 45 08 01 addl $0x1,0x8(%ebp) 230: 83 45 0c 01 addl $0x1,0xc(%ebp) } int strcmp(const char *p, const char *q) { while(*p && *p == *q) 234: 8b 45 08 mov 0x8(%ebp),%eax 237: 0f b6 00 movzbl (%eax),%eax 23a: 84 c0 test %al,%al 23c: 74 10 je 24e <strcmp+0x27> 23e: 8b 45 08 mov 0x8(%ebp),%eax 241: 0f b6 10 movzbl (%eax),%edx 244: 8b 45 0c mov 0xc(%ebp),%eax 247: 0f b6 00 movzbl (%eax),%eax 24a: 38 c2 cmp %al,%dl 24c: 74 de je 22c <strcmp+0x5> p++, q++; return (uchar)*p - (uchar)*q; 24e: 8b 45 08 mov 0x8(%ebp),%eax 251: 0f b6 00 movzbl (%eax),%eax 254: 0f b6 d0 movzbl %al,%edx 257: 8b 45 0c mov 0xc(%ebp),%eax 25a: 0f b6 00 movzbl (%eax),%eax 25d: 0f b6 c0 movzbl %al,%eax 260: 29 c2 sub %eax,%edx 262: 89 d0 mov %edx,%eax } 264: 5d pop %ebp 265: c3 ret 00000266 <strlen>: uint strlen(char *s) { 266: 55 push %ebp 267: 89 e5 mov %esp,%ebp 269: 83 ec 10 sub $0x10,%esp int n; for(n = 0; s[n]; n++) 26c: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp) 273: eb 04 jmp 279 <strlen+0x13> 275: 83 45 fc 01 addl $0x1,-0x4(%ebp) 279: 8b 55 fc mov -0x4(%ebp),%edx 27c: 8b 45 08 mov 0x8(%ebp),%eax 27f: 01 d0 add %edx,%eax 281: 0f b6 00 movzbl (%eax),%eax 284: 84 c0 test %al,%al 286: 75 ed jne 275 <strlen+0xf> ; return n; 288: 8b 45 fc mov -0x4(%ebp),%eax } 28b: c9 leave 28c: c3 ret 0000028d <memset>: void* memset(void *dst, int c, uint n) { 28d: 55 push %ebp 28e: 89 e5 mov %esp,%ebp 290: 83 ec 0c sub $0xc,%esp stosb(dst, c, n); 293: 8b 45 10 mov 0x10(%ebp),%eax 296: 89 44 24 08 mov %eax,0x8(%esp) 29a: 8b 45 0c mov 0xc(%ebp),%eax 29d: 89 44 24 04 mov %eax,0x4(%esp) 2a1: 8b 45 08 mov 0x8(%ebp),%eax 2a4: 89 04 24 mov %eax,(%esp) 2a7: e8 26 ff ff ff call 1d2 <stosb> return dst; 2ac: 8b 45 08 mov 0x8(%ebp),%eax } 2af: c9 leave 2b0: c3 ret 000002b1 <strchr>: char* strchr(const char *s, char c) { 2b1: 55 push %ebp 2b2: 89 e5 mov %esp,%ebp 2b4: 83 ec 04 sub $0x4,%esp 2b7: 8b 45 0c mov 0xc(%ebp),%eax 2ba: 88 45 fc mov %al,-0x4(%ebp) for(; *s; s++) 2bd: eb 14 jmp 2d3 <strchr+0x22> if(*s == c) 2bf: 8b 45 08 mov 0x8(%ebp),%eax 2c2: 0f b6 00 movzbl (%eax),%eax 2c5: 3a 45 fc cmp -0x4(%ebp),%al 2c8: 75 05 jne 2cf <strchr+0x1e> return (char*)s; 2ca: 8b 45 08 mov 0x8(%ebp),%eax 2cd: eb 13 jmp 2e2 <strchr+0x31> } char* strchr(const char *s, char c) { for(; *s; s++) 2cf: 83 45 08 01 addl $0x1,0x8(%ebp) 2d3: 8b 45 08 mov 0x8(%ebp),%eax 2d6: 0f b6 00 movzbl (%eax),%eax 2d9: 84 c0 test %al,%al 2db: 75 e2 jne 2bf <strchr+0xe> if(*s == c) return (char*)s; return 0; 2dd: b8 00 00 00 00 mov $0x0,%eax } 2e2: c9 leave 2e3: c3 ret 000002e4 <gets>: char* gets(char *buf, int max) { 2e4: 55 push %ebp 2e5: 89 e5 mov %esp,%ebp 2e7: 83 ec 28 sub $0x28,%esp int i, cc; char c; for(i=0; i+1 < max; ){ 2ea: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) 2f1: eb 4c jmp 33f <gets+0x5b> cc = read(0, &c, 1); 2f3: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp) 2fa: 00 2fb: 8d 45 ef lea -0x11(%ebp),%eax 2fe: 89 44 24 04 mov %eax,0x4(%esp) 302: c7 04 24 00 00 00 00 movl $0x0,(%esp) 309: e8 44 01 00 00 call 452 <read> 30e: 89 45 f0 mov %eax,-0x10(%ebp) if(cc < 1) 311: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 315: 7f 02 jg 319 <gets+0x35> break; 317: eb 31 jmp 34a <gets+0x66> buf[i++] = c; 319: 8b 45 f4 mov -0xc(%ebp),%eax 31c: 8d 50 01 lea 0x1(%eax),%edx 31f: 89 55 f4 mov %edx,-0xc(%ebp) 322: 89 c2 mov %eax,%edx 324: 8b 45 08 mov 0x8(%ebp),%eax 327: 01 c2 add %eax,%edx 329: 0f b6 45 ef movzbl -0x11(%ebp),%eax 32d: 88 02 mov %al,(%edx) if(c == '\n' || c == '\r') 32f: 0f b6 45 ef movzbl -0x11(%ebp),%eax 333: 3c 0a cmp $0xa,%al 335: 74 13 je 34a <gets+0x66> 337: 0f b6 45 ef movzbl -0x11(%ebp),%eax 33b: 3c 0d cmp $0xd,%al 33d: 74 0b je 34a <gets+0x66> gets(char *buf, int max) { int i, cc; char c; for(i=0; i+1 < max; ){ 33f: 8b 45 f4 mov -0xc(%ebp),%eax 342: 83 c0 01 add $0x1,%eax 345: 3b 45 0c cmp 0xc(%ebp),%eax 348: 7c a9 jl 2f3 <gets+0xf> break; buf[i++] = c; if(c == '\n' || c == '\r') break; } buf[i] = '\0'; 34a: 8b 55 f4 mov -0xc(%ebp),%edx 34d: 8b 45 08 mov 0x8(%ebp),%eax 350: 01 d0 add %edx,%eax 352: c6 00 00 movb $0x0,(%eax) return buf; 355: 8b 45 08 mov 0x8(%ebp),%eax } 358: c9 leave 359: c3 ret 0000035a <stat>: int stat(char *n, struct stat *st) { 35a: 55 push %ebp 35b: 89 e5 mov %esp,%ebp 35d: 83 ec 28 sub $0x28,%esp int fd; int r; fd = open(n, O_RDONLY); 360: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 367: 00 368: 8b 45 08 mov 0x8(%ebp),%eax 36b: 89 04 24 mov %eax,(%esp) 36e: e8 07 01 00 00 call 47a <open> 373: 89 45 f4 mov %eax,-0xc(%ebp) if(fd < 0) 376: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 37a: 79 07 jns 383 <stat+0x29> return -1; 37c: b8 ff ff ff ff mov $0xffffffff,%eax 381: eb 23 jmp 3a6 <stat+0x4c> r = fstat(fd, st); 383: 8b 45 0c mov 0xc(%ebp),%eax 386: 89 44 24 04 mov %eax,0x4(%esp) 38a: 8b 45 f4 mov -0xc(%ebp),%eax 38d: 89 04 24 mov %eax,(%esp) 390: e8 fd 00 00 00 call 492 <fstat> 395: 89 45 f0 mov %eax,-0x10(%ebp) close(fd); 398: 8b 45 f4 mov -0xc(%ebp),%eax 39b: 89 04 24 mov %eax,(%esp) 39e: e8 bf 00 00 00 call 462 <close> return r; 3a3: 8b 45 f0 mov -0x10(%ebp),%eax } 3a6: c9 leave 3a7: c3 ret 000003a8 <atoi>: int atoi(const char *s) { 3a8: 55 push %ebp 3a9: 89 e5 mov %esp,%ebp 3ab: 83 ec 10 sub $0x10,%esp int n; n = 0; 3ae: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp) while('0' <= *s && *s <= '9') 3b5: eb 25 jmp 3dc <atoi+0x34> n = n*10 + *s++ - '0'; 3b7: 8b 55 fc mov -0x4(%ebp),%edx 3ba: 89 d0 mov %edx,%eax 3bc: c1 e0 02 shl $0x2,%eax 3bf: 01 d0 add %edx,%eax 3c1: 01 c0 add %eax,%eax 3c3: 89 c1 mov %eax,%ecx 3c5: 8b 45 08 mov 0x8(%ebp),%eax 3c8: 8d 50 01 lea 0x1(%eax),%edx 3cb: 89 55 08 mov %edx,0x8(%ebp) 3ce: 0f b6 00 movzbl (%eax),%eax 3d1: 0f be c0 movsbl %al,%eax 3d4: 01 c8 add %ecx,%eax 3d6: 83 e8 30 sub $0x30,%eax 3d9: 89 45 fc mov %eax,-0x4(%ebp) atoi(const char *s) { int n; n = 0; while('0' <= *s && *s <= '9') 3dc: 8b 45 08 mov 0x8(%ebp),%eax 3df: 0f b6 00 movzbl (%eax),%eax 3e2: 3c 2f cmp $0x2f,%al 3e4: 7e 0a jle 3f0 <atoi+0x48> 3e6: 8b 45 08 mov 0x8(%ebp),%eax 3e9: 0f b6 00 movzbl (%eax),%eax 3ec: 3c 39 cmp $0x39,%al 3ee: 7e c7 jle 3b7 <atoi+0xf> n = n*10 + *s++ - '0'; return n; 3f0: 8b 45 fc mov -0x4(%ebp),%eax } 3f3: c9 leave 3f4: c3 ret 000003f5 <memmove>: void* memmove(void *vdst, void *vsrc, int n) { 3f5: 55 push %ebp 3f6: 89 e5 mov %esp,%ebp 3f8: 83 ec 10 sub $0x10,%esp char *dst, *src; dst = vdst; 3fb: 8b 45 08 mov 0x8(%ebp),%eax 3fe: 89 45 fc mov %eax,-0x4(%ebp) src = vsrc; 401: 8b 45 0c mov 0xc(%ebp),%eax 404: 89 45 f8 mov %eax,-0x8(%ebp) while(n-- > 0) 407: eb 17 jmp 420 <memmove+0x2b> *dst++ = *src++; 409: 8b 45 fc mov -0x4(%ebp),%eax 40c: 8d 50 01 lea 0x1(%eax),%edx 40f: 89 55 fc mov %edx,-0x4(%ebp) 412: 8b 55 f8 mov -0x8(%ebp),%edx 415: 8d 4a 01 lea 0x1(%edx),%ecx 418: 89 4d f8 mov %ecx,-0x8(%ebp) 41b: 0f b6 12 movzbl (%edx),%edx 41e: 88 10 mov %dl,(%eax) { char *dst, *src; dst = vdst; src = vsrc; while(n-- > 0) 420: 8b 45 10 mov 0x10(%ebp),%eax 423: 8d 50 ff lea -0x1(%eax),%edx 426: 89 55 10 mov %edx,0x10(%ebp) 429: 85 c0 test %eax,%eax 42b: 7f dc jg 409 <memmove+0x14> *dst++ = *src++; return vdst; 42d: 8b 45 08 mov 0x8(%ebp),%eax } 430: c9 leave 431: c3 ret 00000432 <fork>: name: \ movl $SYS_ ## name, %eax; \ int $T_SYSCALL; \ ret SYSCALL(fork) 432: b8 01 00 00 00 mov $0x1,%eax 437: cd 40 int $0x40 439: c3 ret 0000043a <exit>: SYSCALL(exit) 43a: b8 02 00 00 00 mov $0x2,%eax 43f: cd 40 int $0x40 441: c3 ret 00000442 <wait>: SYSCALL(wait) 442: b8 03 00 00 00 mov $0x3,%eax 447: cd 40 int $0x40 449: c3 ret 0000044a <pipe>: SYSCALL(pipe) 44a: b8 04 00 00 00 mov $0x4,%eax 44f: cd 40 int $0x40 451: c3 ret 00000452 <read>: SYSCALL(read) 452: b8 05 00 00 00 mov $0x5,%eax 457: cd 40 int $0x40 459: c3 ret 0000045a <write>: SYSCALL(write) 45a: b8 10 00 00 00 mov $0x10,%eax 45f: cd 40 int $0x40 461: c3 ret 00000462 <close>: SYSCALL(close) 462: b8 15 00 00 00 mov $0x15,%eax 467: cd 40 int $0x40 469: c3 ret 0000046a <kill>: SYSCALL(kill) 46a: b8 06 00 00 00 mov $0x6,%eax 46f: cd 40 int $0x40 471: c3 ret 00000472 <exec>: SYSCALL(exec) 472: b8 07 00 00 00 mov $0x7,%eax 477: cd 40 int $0x40 479: c3 ret 0000047a <open>: SYSCALL(open) 47a: b8 0f 00 00 00 mov $0xf,%eax 47f: cd 40 int $0x40 481: c3 ret 00000482 <mknod>: SYSCALL(mknod) 482: b8 11 00 00 00 mov $0x11,%eax 487: cd 40 int $0x40 489: c3 ret 0000048a <unlink>: SYSCALL(unlink) 48a: b8 12 00 00 00 mov $0x12,%eax 48f: cd 40 int $0x40 491: c3 ret 00000492 <fstat>: SYSCALL(fstat) 492: b8 08 00 00 00 mov $0x8,%eax 497: cd 40 int $0x40 499: c3 ret 0000049a <link>: SYSCALL(link) 49a: b8 13 00 00 00 mov $0x13,%eax 49f: cd 40 int $0x40 4a1: c3 ret 000004a2 <mkdir>: SYSCALL(mkdir) 4a2: b8 14 00 00 00 mov $0x14,%eax 4a7: cd 40 int $0x40 4a9: c3 ret 000004aa <chdir>: SYSCALL(chdir) 4aa: b8 09 00 00 00 mov $0x9,%eax 4af: cd 40 int $0x40 4b1: c3 ret 000004b2 <dup>: SYSCALL(dup) 4b2: b8 0a 00 00 00 mov $0xa,%eax 4b7: cd 40 int $0x40 4b9: c3 ret 000004ba <getpid>: SYSCALL(getpid) 4ba: b8 0b 00 00 00 mov $0xb,%eax 4bf: cd 40 int $0x40 4c1: c3 ret 000004c2 <sbrk>: SYSCALL(sbrk) 4c2: b8 0c 00 00 00 mov $0xc,%eax 4c7: cd 40 int $0x40 4c9: c3 ret 000004ca <sleep>: SYSCALL(sleep) 4ca: b8 0d 00 00 00 mov $0xd,%eax 4cf: cd 40 int $0x40 4d1: c3 ret 000004d2 <uptime>: SYSCALL(uptime) 4d2: b8 0e 00 00 00 mov $0xe,%eax 4d7: cd 40 int $0x40 4d9: c3 ret 000004da <date>: SYSCALL(date) 4da: b8 16 00 00 00 mov $0x16,%eax 4df: cd 40 int $0x40 4e1: c3 ret 000004e2 <timem>: SYSCALL(timem) 4e2: b8 17 00 00 00 mov $0x17,%eax 4e7: cd 40 int $0x40 4e9: c3 ret 000004ea <getuid>: SYSCALL(getuid) 4ea: b8 18 00 00 00 mov $0x18,%eax 4ef: cd 40 int $0x40 4f1: c3 ret 000004f2 <getgid>: SYSCALL(getgid) 4f2: b8 19 00 00 00 mov $0x19,%eax 4f7: cd 40 int $0x40 4f9: c3 ret 000004fa <getppid>: SYSCALL(getppid) 4fa: b8 1a 00 00 00 mov $0x1a,%eax 4ff: cd 40 int $0x40 501: c3 ret 00000502 <setuid>: SYSCALL(setuid) 502: b8 1b 00 00 00 mov $0x1b,%eax 507: cd 40 int $0x40 509: c3 ret 0000050a <setgid>: SYSCALL(setgid) 50a: b8 1c 00 00 00 mov $0x1c,%eax 50f: cd 40 int $0x40 511: c3 ret 00000512 <getprocs>: SYSCALL(getprocs) 512: b8 1d 00 00 00 mov $0x1d,%eax 517: cd 40 int $0x40 519: c3 ret 0000051a <setpriority>: SYSCALL(setpriority) 51a: b8 1e 00 00 00 mov $0x1e,%eax 51f: cd 40 int $0x40 521: c3 ret 00000522 <putc>: #include "stat.h" #include "user.h" static void putc(int fd, char c) { 522: 55 push %ebp 523: 89 e5 mov %esp,%ebp 525: 83 ec 18 sub $0x18,%esp 528: 8b 45 0c mov 0xc(%ebp),%eax 52b: 88 45 f4 mov %al,-0xc(%ebp) write(fd, &c, 1); 52e: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp) 535: 00 536: 8d 45 f4 lea -0xc(%ebp),%eax 539: 89 44 24 04 mov %eax,0x4(%esp) 53d: 8b 45 08 mov 0x8(%ebp),%eax 540: 89 04 24 mov %eax,(%esp) 543: e8 12 ff ff ff call 45a <write> } 548: c9 leave 549: c3 ret 0000054a <printint>: static void printint(int fd, int xx, int base, int sgn) { 54a: 55 push %ebp 54b: 89 e5 mov %esp,%ebp 54d: 56 push %esi 54e: 53 push %ebx 54f: 83 ec 30 sub $0x30,%esp static char digits[] = "0123456789ABCDEF"; char buf[16]; int i, neg; uint x; neg = 0; 552: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) if(sgn && xx < 0){ 559: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 55d: 74 17 je 576 <printint+0x2c> 55f: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 563: 79 11 jns 576 <printint+0x2c> neg = 1; 565: c7 45 f0 01 00 00 00 movl $0x1,-0x10(%ebp) x = -xx; 56c: 8b 45 0c mov 0xc(%ebp),%eax 56f: f7 d8 neg %eax 571: 89 45 ec mov %eax,-0x14(%ebp) 574: eb 06 jmp 57c <printint+0x32> } else { x = xx; 576: 8b 45 0c mov 0xc(%ebp),%eax 579: 89 45 ec mov %eax,-0x14(%ebp) } i = 0; 57c: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) do{ buf[i++] = digits[x % base]; 583: 8b 4d f4 mov -0xc(%ebp),%ecx 586: 8d 41 01 lea 0x1(%ecx),%eax 589: 89 45 f4 mov %eax,-0xc(%ebp) 58c: 8b 5d 10 mov 0x10(%ebp),%ebx 58f: 8b 45 ec mov -0x14(%ebp),%eax 592: ba 00 00 00 00 mov $0x0,%edx 597: f7 f3 div %ebx 599: 89 d0 mov %edx,%eax 59b: 0f b6 80 90 0c 00 00 movzbl 0xc90(%eax),%eax 5a2: 88 44 0d dc mov %al,-0x24(%ebp,%ecx,1) }while((x /= base) != 0); 5a6: 8b 75 10 mov 0x10(%ebp),%esi 5a9: 8b 45 ec mov -0x14(%ebp),%eax 5ac: ba 00 00 00 00 mov $0x0,%edx 5b1: f7 f6 div %esi 5b3: 89 45 ec mov %eax,-0x14(%ebp) 5b6: 83 7d ec 00 cmpl $0x0,-0x14(%ebp) 5ba: 75 c7 jne 583 <printint+0x39> if(neg) 5bc: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 5c0: 74 10 je 5d2 <printint+0x88> buf[i++] = '-'; 5c2: 8b 45 f4 mov -0xc(%ebp),%eax 5c5: 8d 50 01 lea 0x1(%eax),%edx 5c8: 89 55 f4 mov %edx,-0xc(%ebp) 5cb: c6 44 05 dc 2d movb $0x2d,-0x24(%ebp,%eax,1) while(--i >= 0) 5d0: eb 1f jmp 5f1 <printint+0xa7> 5d2: eb 1d jmp 5f1 <printint+0xa7> putc(fd, buf[i]); 5d4: 8d 55 dc lea -0x24(%ebp),%edx 5d7: 8b 45 f4 mov -0xc(%ebp),%eax 5da: 01 d0 add %edx,%eax 5dc: 0f b6 00 movzbl (%eax),%eax 5df: 0f be c0 movsbl %al,%eax 5e2: 89 44 24 04 mov %eax,0x4(%esp) 5e6: 8b 45 08 mov 0x8(%ebp),%eax 5e9: 89 04 24 mov %eax,(%esp) 5ec: e8 31 ff ff ff call 522 <putc> buf[i++] = digits[x % base]; }while((x /= base) != 0); if(neg) buf[i++] = '-'; while(--i >= 0) 5f1: 83 6d f4 01 subl $0x1,-0xc(%ebp) 5f5: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 5f9: 79 d9 jns 5d4 <printint+0x8a> putc(fd, buf[i]); } 5fb: 83 c4 30 add $0x30,%esp 5fe: 5b pop %ebx 5ff: 5e pop %esi 600: 5d pop %ebp 601: c3 ret 00000602 <printf>: // Print to the given fd. Only understands %d, %x, %p, %s. void printf(int fd, char *fmt, ...) { 602: 55 push %ebp 603: 89 e5 mov %esp,%ebp 605: 83 ec 38 sub $0x38,%esp char *s; int c, i, state; uint *ap; state = 0; 608: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp) ap = (uint*)(void*)&fmt + 1; 60f: 8d 45 0c lea 0xc(%ebp),%eax 612: 83 c0 04 add $0x4,%eax 615: 89 45 e8 mov %eax,-0x18(%ebp) for(i = 0; fmt[i]; i++){ 618: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) 61f: e9 7c 01 00 00 jmp 7a0 <printf+0x19e> c = fmt[i] & 0xff; 624: 8b 55 0c mov 0xc(%ebp),%edx 627: 8b 45 f0 mov -0x10(%ebp),%eax 62a: 01 d0 add %edx,%eax 62c: 0f b6 00 movzbl (%eax),%eax 62f: 0f be c0 movsbl %al,%eax 632: 25 ff 00 00 00 and $0xff,%eax 637: 89 45 e4 mov %eax,-0x1c(%ebp) if(state == 0){ 63a: 83 7d ec 00 cmpl $0x0,-0x14(%ebp) 63e: 75 2c jne 66c <printf+0x6a> if(c == '%'){ 640: 83 7d e4 25 cmpl $0x25,-0x1c(%ebp) 644: 75 0c jne 652 <printf+0x50> state = '%'; 646: c7 45 ec 25 00 00 00 movl $0x25,-0x14(%ebp) 64d: e9 4a 01 00 00 jmp 79c <printf+0x19a> } else { putc(fd, c); 652: 8b 45 e4 mov -0x1c(%ebp),%eax 655: 0f be c0 movsbl %al,%eax 658: 89 44 24 04 mov %eax,0x4(%esp) 65c: 8b 45 08 mov 0x8(%ebp),%eax 65f: 89 04 24 mov %eax,(%esp) 662: e8 bb fe ff ff call 522 <putc> 667: e9 30 01 00 00 jmp 79c <printf+0x19a> } } else if(state == '%'){ 66c: 83 7d ec 25 cmpl $0x25,-0x14(%ebp) 670: 0f 85 26 01 00 00 jne 79c <printf+0x19a> if(c == 'd'){ 676: 83 7d e4 64 cmpl $0x64,-0x1c(%ebp) 67a: 75 2d jne 6a9 <printf+0xa7> printint(fd, *ap, 10, 1); 67c: 8b 45 e8 mov -0x18(%ebp),%eax 67f: 8b 00 mov (%eax),%eax 681: c7 44 24 0c 01 00 00 movl $0x1,0xc(%esp) 688: 00 689: c7 44 24 08 0a 00 00 movl $0xa,0x8(%esp) 690: 00 691: 89 44 24 04 mov %eax,0x4(%esp) 695: 8b 45 08 mov 0x8(%ebp),%eax 698: 89 04 24 mov %eax,(%esp) 69b: e8 aa fe ff ff call 54a <printint> ap++; 6a0: 83 45 e8 04 addl $0x4,-0x18(%ebp) 6a4: e9 ec 00 00 00 jmp 795 <printf+0x193> } else if(c == 'x' || c == 'p'){ 6a9: 83 7d e4 78 cmpl $0x78,-0x1c(%ebp) 6ad: 74 06 je 6b5 <printf+0xb3> 6af: 83 7d e4 70 cmpl $0x70,-0x1c(%ebp) 6b3: 75 2d jne 6e2 <printf+0xe0> printint(fd, *ap, 16, 0); 6b5: 8b 45 e8 mov -0x18(%ebp),%eax 6b8: 8b 00 mov (%eax),%eax 6ba: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp) 6c1: 00 6c2: c7 44 24 08 10 00 00 movl $0x10,0x8(%esp) 6c9: 00 6ca: 89 44 24 04 mov %eax,0x4(%esp) 6ce: 8b 45 08 mov 0x8(%ebp),%eax 6d1: 89 04 24 mov %eax,(%esp) 6d4: e8 71 fe ff ff call 54a <printint> ap++; 6d9: 83 45 e8 04 addl $0x4,-0x18(%ebp) 6dd: e9 b3 00 00 00 jmp 795 <printf+0x193> } else if(c == 's'){ 6e2: 83 7d e4 73 cmpl $0x73,-0x1c(%ebp) 6e6: 75 45 jne 72d <printf+0x12b> s = (char*)*ap; 6e8: 8b 45 e8 mov -0x18(%ebp),%eax 6eb: 8b 00 mov (%eax),%eax 6ed: 89 45 f4 mov %eax,-0xc(%ebp) ap++; 6f0: 83 45 e8 04 addl $0x4,-0x18(%ebp) if(s == 0) 6f4: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 6f8: 75 09 jne 703 <printf+0x101> s = "(null)"; 6fa: c7 45 f4 3f 0a 00 00 movl $0xa3f,-0xc(%ebp) while(*s != 0){ 701: eb 1e jmp 721 <printf+0x11f> 703: eb 1c jmp 721 <printf+0x11f> putc(fd, *s); 705: 8b 45 f4 mov -0xc(%ebp),%eax 708: 0f b6 00 movzbl (%eax),%eax 70b: 0f be c0 movsbl %al,%eax 70e: 89 44 24 04 mov %eax,0x4(%esp) 712: 8b 45 08 mov 0x8(%ebp),%eax 715: 89 04 24 mov %eax,(%esp) 718: e8 05 fe ff ff call 522 <putc> s++; 71d: 83 45 f4 01 addl $0x1,-0xc(%ebp) } else if(c == 's'){ s = (char*)*ap; ap++; if(s == 0) s = "(null)"; while(*s != 0){ 721: 8b 45 f4 mov -0xc(%ebp),%eax 724: 0f b6 00 movzbl (%eax),%eax 727: 84 c0 test %al,%al 729: 75 da jne 705 <printf+0x103> 72b: eb 68 jmp 795 <printf+0x193> putc(fd, *s); s++; } } else if(c == 'c'){ 72d: 83 7d e4 63 cmpl $0x63,-0x1c(%ebp) 731: 75 1d jne 750 <printf+0x14e> putc(fd, *ap); 733: 8b 45 e8 mov -0x18(%ebp),%eax 736: 8b 00 mov (%eax),%eax 738: 0f be c0 movsbl %al,%eax 73b: 89 44 24 04 mov %eax,0x4(%esp) 73f: 8b 45 08 mov 0x8(%ebp),%eax 742: 89 04 24 mov %eax,(%esp) 745: e8 d8 fd ff ff call 522 <putc> ap++; 74a: 83 45 e8 04 addl $0x4,-0x18(%ebp) 74e: eb 45 jmp 795 <printf+0x193> } else if(c == '%'){ 750: 83 7d e4 25 cmpl $0x25,-0x1c(%ebp) 754: 75 17 jne 76d <printf+0x16b> putc(fd, c); 756: 8b 45 e4 mov -0x1c(%ebp),%eax 759: 0f be c0 movsbl %al,%eax 75c: 89 44 24 04 mov %eax,0x4(%esp) 760: 8b 45 08 mov 0x8(%ebp),%eax 763: 89 04 24 mov %eax,(%esp) 766: e8 b7 fd ff ff call 522 <putc> 76b: eb 28 jmp 795 <printf+0x193> } else { // Unknown % sequence. Print it to draw attention. putc(fd, '%'); 76d: c7 44 24 04 25 00 00 movl $0x25,0x4(%esp) 774: 00 775: 8b 45 08 mov 0x8(%ebp),%eax 778: 89 04 24 mov %eax,(%esp) 77b: e8 a2 fd ff ff call 522 <putc> putc(fd, c); 780: 8b 45 e4 mov -0x1c(%ebp),%eax 783: 0f be c0 movsbl %al,%eax 786: 89 44 24 04 mov %eax,0x4(%esp) 78a: 8b 45 08 mov 0x8(%ebp),%eax 78d: 89 04 24 mov %eax,(%esp) 790: e8 8d fd ff ff call 522 <putc> } state = 0; 795: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp) int c, i, state; uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ 79c: 83 45 f0 01 addl $0x1,-0x10(%ebp) 7a0: 8b 55 0c mov 0xc(%ebp),%edx 7a3: 8b 45 f0 mov -0x10(%ebp),%eax 7a6: 01 d0 add %edx,%eax 7a8: 0f b6 00 movzbl (%eax),%eax 7ab: 84 c0 test %al,%al 7ad: 0f 85 71 fe ff ff jne 624 <printf+0x22> putc(fd, c); } state = 0; } } } 7b3: c9 leave 7b4: c3 ret 000007b5 <free>: static Header base; static Header *freep; void free(void *ap) { 7b5: 55 push %ebp 7b6: 89 e5 mov %esp,%ebp 7b8: 83 ec 10 sub $0x10,%esp Header *bp, *p; bp = (Header*)ap - 1; 7bb: 8b 45 08 mov 0x8(%ebp),%eax 7be: 83 e8 08 sub $0x8,%eax 7c1: 89 45 f8 mov %eax,-0x8(%ebp) for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 7c4: a1 ac 0c 00 00 mov 0xcac,%eax 7c9: 89 45 fc mov %eax,-0x4(%ebp) 7cc: eb 24 jmp 7f2 <free+0x3d> if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) 7ce: 8b 45 fc mov -0x4(%ebp),%eax 7d1: 8b 00 mov (%eax),%eax 7d3: 3b 45 fc cmp -0x4(%ebp),%eax 7d6: 77 12 ja 7ea <free+0x35> 7d8: 8b 45 f8 mov -0x8(%ebp),%eax 7db: 3b 45 fc cmp -0x4(%ebp),%eax 7de: 77 24 ja 804 <free+0x4f> 7e0: 8b 45 fc mov -0x4(%ebp),%eax 7e3: 8b 00 mov (%eax),%eax 7e5: 3b 45 f8 cmp -0x8(%ebp),%eax 7e8: 77 1a ja 804 <free+0x4f> free(void *ap) { Header *bp, *p; bp = (Header*)ap - 1; for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 7ea: 8b 45 fc mov -0x4(%ebp),%eax 7ed: 8b 00 mov (%eax),%eax 7ef: 89 45 fc mov %eax,-0x4(%ebp) 7f2: 8b 45 f8 mov -0x8(%ebp),%eax 7f5: 3b 45 fc cmp -0x4(%ebp),%eax 7f8: 76 d4 jbe 7ce <free+0x19> 7fa: 8b 45 fc mov -0x4(%ebp),%eax 7fd: 8b 00 mov (%eax),%eax 7ff: 3b 45 f8 cmp -0x8(%ebp),%eax 802: 76 ca jbe 7ce <free+0x19> if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) break; if(bp + bp->s.size == p->s.ptr){ 804: 8b 45 f8 mov -0x8(%ebp),%eax 807: 8b 40 04 mov 0x4(%eax),%eax 80a: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx 811: 8b 45 f8 mov -0x8(%ebp),%eax 814: 01 c2 add %eax,%edx 816: 8b 45 fc mov -0x4(%ebp),%eax 819: 8b 00 mov (%eax),%eax 81b: 39 c2 cmp %eax,%edx 81d: 75 24 jne 843 <free+0x8e> bp->s.size += p->s.ptr->s.size; 81f: 8b 45 f8 mov -0x8(%ebp),%eax 822: 8b 50 04 mov 0x4(%eax),%edx 825: 8b 45 fc mov -0x4(%ebp),%eax 828: 8b 00 mov (%eax),%eax 82a: 8b 40 04 mov 0x4(%eax),%eax 82d: 01 c2 add %eax,%edx 82f: 8b 45 f8 mov -0x8(%ebp),%eax 832: 89 50 04 mov %edx,0x4(%eax) bp->s.ptr = p->s.ptr->s.ptr; 835: 8b 45 fc mov -0x4(%ebp),%eax 838: 8b 00 mov (%eax),%eax 83a: 8b 10 mov (%eax),%edx 83c: 8b 45 f8 mov -0x8(%ebp),%eax 83f: 89 10 mov %edx,(%eax) 841: eb 0a jmp 84d <free+0x98> } else bp->s.ptr = p->s.ptr; 843: 8b 45 fc mov -0x4(%ebp),%eax 846: 8b 10 mov (%eax),%edx 848: 8b 45 f8 mov -0x8(%ebp),%eax 84b: 89 10 mov %edx,(%eax) if(p + p->s.size == bp){ 84d: 8b 45 fc mov -0x4(%ebp),%eax 850: 8b 40 04 mov 0x4(%eax),%eax 853: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx 85a: 8b 45 fc mov -0x4(%ebp),%eax 85d: 01 d0 add %edx,%eax 85f: 3b 45 f8 cmp -0x8(%ebp),%eax 862: 75 20 jne 884 <free+0xcf> p->s.size += bp->s.size; 864: 8b 45 fc mov -0x4(%ebp),%eax 867: 8b 50 04 mov 0x4(%eax),%edx 86a: 8b 45 f8 mov -0x8(%ebp),%eax 86d: 8b 40 04 mov 0x4(%eax),%eax 870: 01 c2 add %eax,%edx 872: 8b 45 fc mov -0x4(%ebp),%eax 875: 89 50 04 mov %edx,0x4(%eax) p->s.ptr = bp->s.ptr; 878: 8b 45 f8 mov -0x8(%ebp),%eax 87b: 8b 10 mov (%eax),%edx 87d: 8b 45 fc mov -0x4(%ebp),%eax 880: 89 10 mov %edx,(%eax) 882: eb 08 jmp 88c <free+0xd7> } else p->s.ptr = bp; 884: 8b 45 fc mov -0x4(%ebp),%eax 887: 8b 55 f8 mov -0x8(%ebp),%edx 88a: 89 10 mov %edx,(%eax) freep = p; 88c: 8b 45 fc mov -0x4(%ebp),%eax 88f: a3 ac 0c 00 00 mov %eax,0xcac } 894: c9 leave 895: c3 ret 00000896 <morecore>: static Header* morecore(uint nu) { 896: 55 push %ebp 897: 89 e5 mov %esp,%ebp 899: 83 ec 28 sub $0x28,%esp char *p; Header *hp; if(nu < 4096) 89c: 81 7d 08 ff 0f 00 00 cmpl $0xfff,0x8(%ebp) 8a3: 77 07 ja 8ac <morecore+0x16> nu = 4096; 8a5: c7 45 08 00 10 00 00 movl $0x1000,0x8(%ebp) p = sbrk(nu * sizeof(Header)); 8ac: 8b 45 08 mov 0x8(%ebp),%eax 8af: c1 e0 03 shl $0x3,%eax 8b2: 89 04 24 mov %eax,(%esp) 8b5: e8 08 fc ff ff call 4c2 <sbrk> 8ba: 89 45 f4 mov %eax,-0xc(%ebp) if(p == (char*)-1) 8bd: 83 7d f4 ff cmpl $0xffffffff,-0xc(%ebp) 8c1: 75 07 jne 8ca <morecore+0x34> return 0; 8c3: b8 00 00 00 00 mov $0x0,%eax 8c8: eb 22 jmp 8ec <morecore+0x56> hp = (Header*)p; 8ca: 8b 45 f4 mov -0xc(%ebp),%eax 8cd: 89 45 f0 mov %eax,-0x10(%ebp) hp->s.size = nu; 8d0: 8b 45 f0 mov -0x10(%ebp),%eax 8d3: 8b 55 08 mov 0x8(%ebp),%edx 8d6: 89 50 04 mov %edx,0x4(%eax) free((void*)(hp + 1)); 8d9: 8b 45 f0 mov -0x10(%ebp),%eax 8dc: 83 c0 08 add $0x8,%eax 8df: 89 04 24 mov %eax,(%esp) 8e2: e8 ce fe ff ff call 7b5 <free> return freep; 8e7: a1 ac 0c 00 00 mov 0xcac,%eax } 8ec: c9 leave 8ed: c3 ret 000008ee <malloc>: void* malloc(uint nbytes) { 8ee: 55 push %ebp 8ef: 89 e5 mov %esp,%ebp 8f1: 83 ec 28 sub $0x28,%esp Header *p, *prevp; uint nunits; nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; 8f4: 8b 45 08 mov 0x8(%ebp),%eax 8f7: 83 c0 07 add $0x7,%eax 8fa: c1 e8 03 shr $0x3,%eax 8fd: 83 c0 01 add $0x1,%eax 900: 89 45 ec mov %eax,-0x14(%ebp) if((prevp = freep) == 0){ 903: a1 ac 0c 00 00 mov 0xcac,%eax 908: 89 45 f0 mov %eax,-0x10(%ebp) 90b: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 90f: 75 23 jne 934 <malloc+0x46> base.s.ptr = freep = prevp = &base; 911: c7 45 f0 a4 0c 00 00 movl $0xca4,-0x10(%ebp) 918: 8b 45 f0 mov -0x10(%ebp),%eax 91b: a3 ac 0c 00 00 mov %eax,0xcac 920: a1 ac 0c 00 00 mov 0xcac,%eax 925: a3 a4 0c 00 00 mov %eax,0xca4 base.s.size = 0; 92a: c7 05 a8 0c 00 00 00 movl $0x0,0xca8 931: 00 00 00 } for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ 934: 8b 45 f0 mov -0x10(%ebp),%eax 937: 8b 00 mov (%eax),%eax 939: 89 45 f4 mov %eax,-0xc(%ebp) if(p->s.size >= nunits){ 93c: 8b 45 f4 mov -0xc(%ebp),%eax 93f: 8b 40 04 mov 0x4(%eax),%eax 942: 3b 45 ec cmp -0x14(%ebp),%eax 945: 72 4d jb 994 <malloc+0xa6> if(p->s.size == nunits) 947: 8b 45 f4 mov -0xc(%ebp),%eax 94a: 8b 40 04 mov 0x4(%eax),%eax 94d: 3b 45 ec cmp -0x14(%ebp),%eax 950: 75 0c jne 95e <malloc+0x70> prevp->s.ptr = p->s.ptr; 952: 8b 45 f4 mov -0xc(%ebp),%eax 955: 8b 10 mov (%eax),%edx 957: 8b 45 f0 mov -0x10(%ebp),%eax 95a: 89 10 mov %edx,(%eax) 95c: eb 26 jmp 984 <malloc+0x96> else { p->s.size -= nunits; 95e: 8b 45 f4 mov -0xc(%ebp),%eax 961: 8b 40 04 mov 0x4(%eax),%eax 964: 2b 45 ec sub -0x14(%ebp),%eax 967: 89 c2 mov %eax,%edx 969: 8b 45 f4 mov -0xc(%ebp),%eax 96c: 89 50 04 mov %edx,0x4(%eax) p += p->s.size; 96f: 8b 45 f4 mov -0xc(%ebp),%eax 972: 8b 40 04 mov 0x4(%eax),%eax 975: c1 e0 03 shl $0x3,%eax 978: 01 45 f4 add %eax,-0xc(%ebp) p->s.size = nunits; 97b: 8b 45 f4 mov -0xc(%ebp),%eax 97e: 8b 55 ec mov -0x14(%ebp),%edx 981: 89 50 04 mov %edx,0x4(%eax) } freep = prevp; 984: 8b 45 f0 mov -0x10(%ebp),%eax 987: a3 ac 0c 00 00 mov %eax,0xcac return (void*)(p + 1); 98c: 8b 45 f4 mov -0xc(%ebp),%eax 98f: 83 c0 08 add $0x8,%eax 992: eb 38 jmp 9cc <malloc+0xde> } if(p == freep) 994: a1 ac 0c 00 00 mov 0xcac,%eax 999: 39 45 f4 cmp %eax,-0xc(%ebp) 99c: 75 1b jne 9b9 <malloc+0xcb> if((p = morecore(nunits)) == 0) 99e: 8b 45 ec mov -0x14(%ebp),%eax 9a1: 89 04 24 mov %eax,(%esp) 9a4: e8 ed fe ff ff call 896 <morecore> 9a9: 89 45 f4 mov %eax,-0xc(%ebp) 9ac: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 9b0: 75 07 jne 9b9 <malloc+0xcb> return 0; 9b2: b8 00 00 00 00 mov $0x0,%eax 9b7: eb 13 jmp 9cc <malloc+0xde> nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; if((prevp = freep) == 0){ base.s.ptr = freep = prevp = &base; base.s.size = 0; } for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ 9b9: 8b 45 f4 mov -0xc(%ebp),%eax 9bc: 89 45 f0 mov %eax,-0x10(%ebp) 9bf: 8b 45 f4 mov -0xc(%ebp),%eax 9c2: 8b 00 mov (%eax),%eax 9c4: 89 45 f4 mov %eax,-0xc(%ebp) return (void*)(p + 1); } if(p == freep) if((p = morecore(nunits)) == 0) return 0; } 9c7: e9 70 ff ff ff jmp 93c <malloc+0x4e> } 9cc: c9 leave 9cd: c3 ret
33.963343
60
0.434767
db41bbae6ce6fd9b3013ff040fc6b8779332b4b5
6,110
asm
Assembly
demos/commands/data.asm
haroldo-ok/blockly-z80
64421fb294a849cb91bcb99c2958f272456145bc
[ "Apache-2.0" ]
16
2015-10-18T22:56:07.000Z
2022-03-20T19:47:07.000Z
demos/commands/data.asm
mcanthony/blockly-z80
64421fb294a849cb91bcb99c2958f272456145bc
[ "Apache-2.0" ]
1
2021-11-28T07:19:38.000Z
2021-11-29T22:10:43.000Z
demos/commands/data.asm
mcanthony/blockly-z80
64421fb294a849cb91bcb99c2958f272456145bc
[ "Apache-2.0" ]
3
2015-10-18T22:56:10.000Z
2021-11-26T02:24:54.000Z
;============================================================== ; Data ;============================================================== PaletteData: db $00,$3F,$00,$10,$15,$04,$05,$06,$16,$08,$1A,$0C,$0F,$1F,$1F,$30 db $00,$3F,$00,$10,$15,$04,$05,$06,$16,$08,$1A,$0C,$0F,$1F,$1F,$30 PaletteDataEnd: ; VDP initialisation data VDPInitData: db $04,$80,$00,$81,$ff,$82,$ff,$85,$ff,$86,$ff,$87,$00,$88,$00,$89,$ff,$8a VDPInitDataEnd: ; VDP initialisation data VDPInitDataSG1000: ; db $04,$80,$00,$81,$ff,$82,$ff,$85,$ff,$86,$ff,$87 db $00,$80,$40,$81,$0F,$82,$00,$83,$01,$84,$01,$85,$04,$86,$08,$87; VDPInitDataSG1000End: FontData: db 00h,00h,00h,00h,00h,00h,00h,00h,18h,18h,18h,18h,18h,00h,18h,00h db 6ch,6ch,6ch,00h,00h,00h,00h,00h,36h,36h,7fh,36h,7fh,36h,36h,00h db 0ch,3fh,68h,3eh,0bh,7eh,18h,00h,60h,66h,0ch,18h,30h,66h,06h,00h db 38h,6ch,6ch,38h,6dh,66h,3bh,00h,0ch,18h,30h,00h,00h,00h,00h,00h db 0ch,18h,30h,30h,30h,18h,0ch,00h,30h,18h,0ch,0ch,0ch,18h,30h,00h db 00h,18h,7eh,3ch,7eh,18h,00h,00h,00h,18h,18h,7eh,18h,18h,00h,00h db 00h,00h,00h,00h,00h,18h,18h,30h,00h,00h,00h,7eh,00h,00h,00h,00h db 00h,00h,00h,00h,00h,18h,18h,00h,00h,06h,0ch,18h,30h,60h,00h,00h db 3ch,66h,6eh,7eh,76h,66h,3ch,00h,18h,38h,18h,18h,18h,18h,7eh,00h db 3ch,66h,06h,0ch,18h,30h,7eh,00h,3ch,66h,06h,1ch,06h,66h,3ch,00h db 0ch,1ch,3ch,6ch,7eh,0ch,0ch,00h,7eh,60h,7ch,06h,06h,66h,3ch,00h db 1ch,30h,60h,7ch,66h,66h,3ch,00h,7eh,06h,0ch,18h,30h,30h,30h,00h db 3ch,66h,66h,3ch,66h,66h,3ch,00h,3ch,66h,66h,3eh,06h,0ch,38h,00h db 00h,00h,18h,18h,00h,18h,18h,00h,00h,00h,18h,18h,00h,18h,18h,30h db 0ch,18h,30h,60h,30h,18h,0ch,00h,00h,00h,7eh,00h,7eh,00h,00h,00h db 30h,18h,0ch,06h,0ch,18h,30h,00h,3ch,66h,0ch,18h,18h,00h,18h,00h db 3ch,66h,6eh,6ah,6eh,60h,3ch,00h,3ch,66h,66h,7eh,66h,66h,66h,00h db 7ch,66h,66h,7ch,66h,66h,7ch,00h,3ch,66h,60h,60h,60h,66h,3ch,00h db 78h,6ch,66h,66h,66h,6ch,78h,00h,7eh,60h,60h,7ch,60h,60h,7eh,00h db 7eh,60h,60h,7ch,60h,60h,60h,00h,3ch,66h,60h,6eh,66h,66h,3ch,00h db 66h,66h,66h,7eh,66h,66h,66h,00h,7eh,18h,18h,18h,18h,18h,7eh,00h db 3eh,0ch,0ch,0ch,0ch,6ch,38h,00h,66h,6ch,78h,70h,78h,6ch,66h,00h db 60h,60h,60h,60h,60h,60h,7eh,00h,63h,77h,7fh,6bh,6bh,63h,63h,00h db 66h,66h,76h,7eh,6eh,66h,66h,00h,3ch,66h,66h,66h,66h,66h,3ch,00h db 7ch,66h,66h,7ch,60h,60h,60h,00h,3ch,66h,66h,66h,6ah,6ch,36h,00h db 7ch,66h,66h,7ch,6ch,66h,66h,00h,3ch,66h,60h,3ch,06h,66h,3ch,00h db 7eh,18h,18h,18h,18h,18h,18h,00h,66h,66h,66h,66h,66h,66h,3ch,00h db 66h,66h,66h,66h,66h,3ch,18h,00h,63h,63h,6bh,6bh,7fh,77h,63h,00h db 66h,66h,3ch,18h,3ch,66h,66h,00h,66h,66h,66h,3ch,18h,18h,18h,00h db 7eh,06h,0ch,18h,30h,60h,7eh,00h,7ch,60h,60h,60h,60h,60h,7ch,00h db 00h,60h,30h,18h,0ch,06h,00h,00h,3eh,06h,06h,06h,06h,06h,3eh,00h db 18h,3ch,66h,42h,00h,00h,00h,00h,00h,00h,00h,00h,00h,00h,00h,ffh db 1ch,36h,30h,7ch,30h,30h,7eh,00h,00h,00h,3ch,06h,3eh,66h,3eh,00h db 60h,60h,7ch,66h,66h,66h,7ch,00h,00h,00h,3ch,66h,60h,66h,3ch,00h db 06h,06h,3eh,66h,66h,66h,3eh,00h,00h,00h,3ch,66h,7eh,60h,3ch,00h db 1ch,30h,30h,7ch,30h,30h,30h,00h,00h,00h,3eh,66h,66h,3eh,06h,3ch db 60h,60h,7ch,66h,66h,66h,66h,00h,18h,00h,38h,18h,18h,18h,3ch,00h db 18h,00h,38h,18h,18h,18h,18h,70h,60h,60h,66h,6ch,78h,6ch,66h,00h db 38h,18h,18h,18h,18h,18h,3ch,00h,00h,00h,36h,7fh,6bh,6bh,63h,00h db 00h,00h,7ch,66h,66h,66h,66h,00h,00h,00h,3ch,66h,66h,66h,3ch,00h db 00h,00h,7ch,66h,66h,7ch,60h,60h,00h,00h,3eh,66h,66h,3eh,06h,07h db 00h,00h,6ch,76h,60h,60h,60h,00h,00h,00h,3eh,60h,3ch,06h,7ch,00h db 30h,30h,7ch,30h,30h,30h,1ch,00h,00h,00h,66h,66h,66h,66h,3eh,00h db 00h,00h,66h,66h,66h,3ch,18h,00h,00h,00h,63h,6bh,6bh,7fh,36h,00h db 00h,00h,66h,3ch,18h,3ch,66h,00h,00h,00h,66h,66h,66h,3eh,06h,3ch db 00h,00h,7eh,0ch,18h,30h,7eh,00h,0ch,18h,18h,70h,18h,18h,0ch,00h db 18h,18h,18h,00h,18h,18h,18h,00h,30h,18h,18h,0eh,18h,18h,30h,00h db 31h,6bh,46h,00h,00h,00h,00h,00h FontDataEnd: OrcData: ; Orc sprite adapted from http://opengameart.org/content/16x16-16x24-32x32-rpg-enemies-updated db 03h,04h,03h,00h,07h,09h,04h,03h,07h,3Bh,00h,07h,3Fh,51h,0Ch,33h,01h,3Eh,01h,04h,05h,19h,02h,01h,07h,39h,04h,03h,13h,35h,02h,09h db 28h,5Bh,20h,04h,20h,5Ah,00h,27h,66h,FEh,01h,61h,66h,BFh,01h,60h,00h,7Bh,00h,07h,08h,1Dh,08h,06h,1Ch,26h,00h,1Ch,00h,3Eh,00h,00h db C0h,20h,C0h,00h,E0h,10h,20h,C0h,E0h,9Ch,20h,C0h,FCh,02h,30h,CCh,80h,7Ch,80h,20h,A0h,18h,C0h,00h,E0h,18h,A0h,40h,C8h,2Ch,40h,90h db 14h,DAh,04h,20h,04h,5Ah,00h,E4h,66h,7Fh,80h,86h,66h,FDh,80h,06h,00h,DEh,00h,E0h,10h,B8h,10h,60h,38h,64h,00h,38h,00h,7Ch,00h,00h db 03h,04h,03h,00h,07h,09h,04h,03h,07h,3Bh,00h,07h,3Fh,51h,0Ch,33h,01h,3Eh,01h,04h,05h,19h,02h,01h,07h,39h,04h,03h,13h,35h,02h,09h db 28h,5Bh,20h,04h,30h,4Ah,10h,27h,36h,6Eh,01h,31h,36h,7Fh,01h,30h,35h,5Dh,04h,32h,06h,39h,06h,00h,00h,1Fh,00h,00h,00h,00h,00h,00h db C0h,20h,C0h,00h,E0h,10h,20h,C0h,E0h,9Ch,20h,C0h,FCh,02h,30h,CCh,80h,7Ch,80h,20h,A0h,18h,C0h,00h,E0h,1Ch,A0h,40h,C8h,2Ch,40h,90h db 14h,DAh,04h,20h,0Ch,52h,08h,E4h,6Ch,72h,88h,84h,60h,FCh,80h,00h,00h,D0h,00h,E0h,00h,50h,00h,E0h,F0h,68h,10h,E0h,00h,F8h,00h,00h db 03h,04h,03h,00h,07h,09h,04h,03h,07h,3Bh,00h,07h,3Fh,51h,0Ch,33h,01h,3Eh,01h,04h,05h,19h,02h,01h,07h,39h,04h,03h,13h,35h,02h,09h db 28h,5Bh,20h,04h,20h,5Ah,00h,27h,66h,FEh,01h,61h,66h,BFh,01h,60h,00h,7Bh,00h,07h,08h,1Dh,08h,06h,1Ch,26h,00h,1Ch,00h,3Eh,00h,00h db C0h,20h,C0h,00h,E0h,10h,20h,C0h,E0h,9Ch,20h,C0h,FCh,02h,30h,CCh,80h,7Ch,80h,20h,A0h,18h,C0h,00h,E0h,18h,A0h,40h,C8h,2Ch,40h,90h db 14h,DAh,04h,20h,04h,5Ah,00h,E4h,66h,7Fh,80h,86h,66h,FDh,80h,06h,00h,DEh,00h,E0h,10h,B8h,10h,60h,38h,64h,00h,38h,00h,7Ch,00h,00h db 03h,04h,03h,00h,07h,09h,04h,03h,07h,3Bh,00h,07h,3Fh,51h,0Ch,33h,01h,3Eh,01h,04h,05h,19h,02h,01h,07h,39h,04h,03h,13h,35h,02h,09h db 28h,5Bh,20h,04h,30h,4Ah,10h,27h,36h,4Eh,11h,21h,06h,3Fh,01h,00h,00h,0Bh,00h,07h,00h,0Ah,00h,07h,0Fh,16h,08h,07h,00h,1Fh,00h,00h db C0h,20h,C0h,00h,E0h,10h,20h,C0h,E0h,9Ch,20h,C0h,FCh,02h,30h,CCh,80h,7Ch,80h,20h,A0h,18h,C0h,00h,E0h,1Ch,A0h,40h,C8h,2Ch,40h,90h db 14h,DAh,04h,20h,0Ch,52h,08h,E4h,6Ch,76h,80h,8Ch,6Ch,FEh,80h,0Ch,ACh,BAh,20h,4Ch,60h,9Ch,60h,00h,00h,F8h,00h,00h,00h,00h,00h,00h OrcDataEnd:
67.142857
131
0.71293
750670816fa5fae568800ec492553bed1a29ed98
402
asm
Assembly
programs/oeis/000/A000855.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/000/A000855.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/000/A000855.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A000855: Final two digits of 2^n. ; 1,2,4,8,16,32,64,28,56,12,24,48,96,92,84,68,36,72,44,88,76,52,4,8,16,32,64,28,56,12,24,48,96,92,84,68,36,72,44,88,76,52,4,8,16,32,64,28,56,12,24,48,96,92,84,68,36,72,44,88,76,52,4,8,16,32,64,28,56,12,24,48,96,92,84,68,36,72,44,88,76,52,4,8,16,32,64,28,56,12,24,48,96,92,84,68,36,72,44,88 mov $1,1 mov $2,$0 lpb $2 mul $1,2 mod $1,100 sub $2,1 lpe mov $0,$1
33.5
289
0.626866
56b3b8737560ade27b2c1bd722fa9c099c0cab91
725
asm
Assembly
Examples/ch07/WriteBin.asm
satadriver/LiunuxOS_t
c6222f04b6e734002cbf1aa366eb62e51f0ebbe5
[ "Apache-2.0" ]
null
null
null
Examples/ch07/WriteBin.asm
satadriver/LiunuxOS_t
c6222f04b6e734002cbf1aa366eb62e51f0ebbe5
[ "Apache-2.0" ]
null
null
null
Examples/ch07/WriteBin.asm
satadriver/LiunuxOS_t
c6222f04b6e734002cbf1aa366eb62e51f0ebbe5
[ "Apache-2.0" ]
null
null
null
TITLE Displaying Binary Bits (WriteBin.asm) ; Display a 32-bit integer in binary. ; Last Update: 07/22/01 INCLUDE Irvine16.inc .data binValue DWORD 1234ABCDh ; sample binary value buffer BYTE 32 dup(0),0 .code main PROC mov ax,@data mov ds,ax mov eax,binValue ; number to display mov ecx,32 ; number of bits in EAX mov esi,offset buffer L1: shl eax,1 ; shift high bit into Carry flag mov BYTE PTR [esi],'0' ; choose 0 as default digit jnc L2 ; if no Carry, jump to L2 mov BYTE PTR [esi],'1' ; else move 1 to buffer L2: inc esi ; next buffer position loop L1 ; shift another bit to left mov edx,OFFSET buffer ; display the buffer call WriteString call Crlf exit main ENDP END main
21.323529
58
0.702069
09abf7cb6ae01a55a61a0f3dcb0e665187b4e768
603
asm
Assembly
programs/oeis/140/A140359.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/140/A140359.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/140/A140359.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A140359: a(n) = 2*a(n-1) + a(n-2) - 2*a(n-3). ; 1,1,6,11,26,51,106,211,426,851,1706,3411,6826,13651,27306,54611,109226,218451,436906,873811,1747626,3495251,6990506,13981011,27962026,55924051,111848106,223696211,447392426,894784851,1789569706,3579139411,7158278826,14316557651,28633115306,57266230611,114532461226,229064922451,458129844906,916259689811,1832519379626,3665038759251,7330077518506,14660155037011,29320310074026,58640620148051,117281240296106,234562480592211,469124961184426,938249922368851,1876499844737706,3752999689475411,7505999378950826 mov $1,2 pow $1,$0 div $1,3 mul $1,5 add $1,1
67
507
0.825871
c8da0f01bdd759774f8e69a37f8e7b6a958af3e9
403
asm
Assembly
programs/oeis/127/A127750.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/127/A127750.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/127/A127750.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A127750: Row sums of inverse of number triangle A(n,k) = 1/(2n+1) if k <= n <= 2k, 0 otherwise. ; 1,3,2,5,2,4,2,7,2,4,2,6,2,4,2,9,2,4,2,6,2,4,2,8,2,4,2,6,2,4,2,11,2,4,2,6,2,4,2,8,2,4,2,6,2,4,2,10,2,4,2,6,2,4,2,8,2,4,2,6,2,4,2,13,2,4,2,6,2,4,2,8,2,4,2,6,2,4,2,10,2,4,2,6,2,4,2,8,2,4,2,6,2,4,2,12,2,4,2,6 mov $2,$0 lpb $0 mod $0,2 add $1,1 add $1,$0 div $2,2 mul $0,$2 lpe add $1,1 mov $0,$1
28.785714
206
0.531017
fc4ff4cddf92afd579480dc642003c5cb97148cf
35,133
asm
Assembly
dasm/src/test/atari2600/boing26.asm
zeh/dasmjs
8af59ccbba4fd1f4c9404e6078dca6770e0b251b
[ "Naumen", "Condor-1.1", "MS-PL" ]
16
2017-01-08T18:10:59.000Z
2021-02-16T17:46:35.000Z
dasm/src/test/atari2600/boing26.asm
paul80nd/dasmjs
3530f5cfd0761a83bb4d2cb5ae0612fef44b9291
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
dasm/src/test/atari2600/boing26.asm
paul80nd/dasmjs
3530f5cfd0761a83bb4d2cb5ae0612fef44b9291
[ "Naumen", "Condor-1.1", "MS-PL" ]
4
2019-08-17T21:03:29.000Z
2020-12-04T14:48:13.000Z
processor 6502 ; TIA (Stella) write-only registers ; Vsync equ $00 Vblank equ $01 Wsync equ $02 Rsync equ $03 Nusiz0 equ $04 Nusiz1 equ $05 ColuP0 equ $06 ColuP1 equ $07 Colupf equ $08 ColuBK equ $09 Ctrlpf equ $0A Refp0 equ $0B Refp1 equ $0C Pf0 equ $0D Pf1 equ $0E Pf2 equ $0F RESP0 equ $10 RESP1 equ $11 Resm0 equ $12 Resm1 equ $13 Resbl equ $14 Audc0 equ $15 Audc1 equ $16 Audf0 equ $17 Audf1 equ $18 Audv0 equ $19 Audv1 equ $1A GRP0 equ $1B GRP1 equ $1C Enam0 equ $1D Enam1 equ $1E Enabl equ $1F HMP0 equ $20 HMP1 equ $21 Hmm0 equ $22 Hmm1 equ $23 Hmbl equ $24 VdelP0 equ $25 VdelP1 equ $26 Vdelbl equ $27 Resmp0 equ $28 Resmp1 equ $29 HMOVE equ $2A Hmclr equ $2B Cxclr equ $2C ; ; TIA (Stella) read-only registers ; Cxm0p equ $00 Cxm1p equ $01 Cxp0fb equ $02 Cxp1fb equ $03 Cxm0fb equ $04 Cxm1fb equ $05 Cxblpf equ $06 Cxppmm equ $07 Inpt0 equ $08 Inpt1 equ $09 Inpt2 equ $0A Inpt3 equ $0B Inpt4 equ $0C Inpt5 equ $0D ; ; RAM definitions ; Note: The system RAM maps in at 0080-00FF and also at 0180-01FF. It is ; used for variables and the system stack. The programmer must make sure ; the stack never grows so deep as to overwrite the variables. ; RamStart equ $0080 RamEnd equ $00FF StackBottom equ $00FF StackTop equ $0080 ; ; 6532 (RIOT) registers ; SWCHA equ $0280 Swacnt equ $0281 SWCHB equ $0282 Swbcnt equ $0283 Intim equ $0284 Tim1t equ $0294 Tim8t equ $0295 Tim64t equ $0296 T1024t equ $0297 ; ; ROM definitions ; RomStart equ $F000 RomEnd equ $FFFF IntVectors equ $FFFA ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; s1 EQU $80 s2 EQU $82 s3 EQU $84 s4 EQU $86 s5 EQU $88 s6 EQU $8A DelayPTR EQU $8C LoopCount EQU $8E TopDelay EQU $8F BottomDelay EQU $90 MoveCount EQU $91 Temp EQU $92 RotateDir EQU $93 SkipFrame EQU $94 VerticalDir EQU $95 HorizontalDir EQU $96 VerticalPos EQU $97 HorizontalPos EQU $98 SoundQ EQU $99 SkipMove EQU $9a EggMode EQU $9b FrameCycle EQU $9c EggMusic EQU $9d ORG $F000 Cart_Init: SEI ; Disable interrupts.: CLD ; Clear "decimal" mode. LDX #$FF TXS ; Clear the stack Common_Init: LDX #$28 ; Clear the TIA registers ($04-$2C) LDA #$00 TIAClear: STA $04,X DEX BPL TIAClear ; loop exits with X=$FF LDX #$FF RAMClear: STA $00,X ; Clear the RAM ($FF-$80) DEX BMI RAMClear ; loop exits with X=$7F LDX #$FF TXS ; Reset the stack IOClear: STA Swbcnt ; console I/O always set to INPUT STA Swacnt ; set controller I/O to INPUT DemoInit: LDA #$01 STA VdelP0 STA VdelP1 LDA #$03 STA Nusiz0 STA Nusiz1 LDA #$36 ; a nice shade of red STA ColuP0 STA ColuP1 LDA #$ff ; page to get gfx from initially STA s1+1 STA s2+1 STA s3+1 STA s4+1 STA s5+1 STA s6+1 LDA #0 ; offset in the gfx data STA s1 LDA #50 ; offset in the gfx data STA s2 LDA #100 ; offset in the gfx data STA s3 LDA #150 ; offset in the gfx data STA s4 LDA #200 ; offset in the gfx data STA s5 LDA #0 ; vestigial! STA s6 LDA #$01 ; +1 or -1, rotating the ball STA RotateDir LDA #$01 ; Vertical direction, +1 or -1 STA VerticalDir LDA #$01 ; Same for horizontal STA HorizontalDir STA SoundQ ; Start out by making a noise LDA #1 STA SkipFrame STA SkipMove LDA #0 STA TopDelay STA MoveCount LDA #120 STA BottomDelay LDA #$f2 STA DelayPTR+1 LDA #$1d+36 ;????? STA DelayPTR STA Wsync NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP STA RESP0 STA RESP1 LDA #$50 ;????? STA HMP1 LDA #$40 ;????? STA HMP0 STA Wsync STA HMOVE STA Wsync LDA #$0f STA ColuBK NewScreen: LDA #$02 STA Wsync ; Wait for horizontal sync STA Vblank ; Turn on Vblank STA Vsync ; Turn on Vsync STA Wsync ; Leave Vsync on for 3 lines STA Wsync STA Wsync LDA #$00 STA Vsync ; Turn Vsync off LDA #43 ; Vblank for 37 lines ; changed from 43 to 53 for 45 lines PAL STA Tim64t ; 43*64intvls=2752=8256colclks=36.2lines JSR DoSound ; was too big to leave inline :P INC FrameCycle ; we'll use this for color cycling and ; possibly for sound DEC SkipFrame BNE Movement ; skip the animation most of the time LDA #3 ; number of frames to skip STA SkipFrame ; if it's zero, reset it SkipSkip: LDA EggMode ; check for easter egg :) CMP #0 ; no? how sad. BNE Movement LDA RotateDir ; which direction to rotate it in? CLC ADC s1+1 ; add that to the gfx page ORA #$F8 ; there are only 8 so mask the rest STA s1+1 STA s2+1 STA s3+1 STA s4+1 STA s5+1 Movement: LDA #$1 BIT SWCHB ; is someone pushing reset? BNE NoReset ; no? how sad. STA EggMode ; set egg mode JMP MoveDelay NoReset: LDA #0 STA EggMode ; no select = no easter egg. ; yes, I could have made it harder to find. ; gimme a break, I'm feeling good ;) MoveDelay: JSR CheckEgg ; override animation if necessary LDA SkipMove INC SkipMove AND #1 ; basically i lamed out and said BNE MoveHorizontal ; "skip every other frame" JMP VblankLoop MoveHorizontal: LDA HorizontalPos ; i couldn't figure out how to use HMOVE CLC ; without blowing up yet, so let's glom ADC HorizontalDir ; onto the joystick routines STA HorizontalPos LDA HorizontalDir CMP #0 BMI GoLeft GoRight: JSR Right LDA HorizontalPos CMP #112 ; i also haven't figured out how to make the BNE MoveVertical ; sprite go all the way to the right edge! LDA HorizontalDir ; since we're not using the 6th copy LDA #$FF STA HorizontalDir LDA #1 ; if we're reversing direction, we've hit a wall STA SoundQ ; so make a sound LDA RotateDir EOR #$FE STA RotateDir ; and change 1 into -1 (255) JMP MoveVertical GoLeft: JSR Left LDA HorizontalPos CMP #1 BNE MoveVertical LDA #$01 STA HorizontalDir STA SoundQ LDA RotateDir EOR #$FE STA RotateDir MoveVertical: LDA VerticalPos CLC ADC VerticalDir STA VerticalPos LDA VerticalDir CMP #0 BMI GoUp GoDown: JSR Down LDA VerticalPos CMP #120 ; kind of a rough approximation, yeah BNE EndMove LDA #$FF STA VerticalDir LDA #1 STA SoundQ LDA RotateDir EOR #$FE STA RotateDir JMP EndMove GoUp: JSR UP LDA VerticalPos CMP #1 BNE EndMove LDA #$01 STA VerticalDir STA SoundQ LDA RotateDir EOR #$FE STA RotateDir EndMove: JMP VblankLoop UP: LDA TopDelay BEQ U1 DEC TopDelay INC BottomDelay U1: RTS ; was JMP VblankLoop Down: LDA BottomDelay BEQ D1 INC TopDelay DEC BottomDelay D1: RTS; was JMP VblankLoop Right: LDX MoveCount INX STX MoveCount CPX #3 BNE R2 LDX DelayPTR DEX STX DelayPTR CPX #$1c ;????? BNE R1 LDA #$1d ;????? STA DelayPTR LDA #2 STA MoveCount RTS; was JMP VblankLoop R1: LDA #0 STA MoveCount R2: LDA #$f0 STA HMP0 STA HMP1 STA Wsync STA HMOVE RTS; was JMP VblankLoop Left: LDX MoveCount DEX STX MoveCount CPX #$ff BNE L2 LDX DelayPTR INX STX DelayPTR CPX #$1d+37 ; indexing into a code segment with a literal - naughty BNE L1 LDA #$1d+36 ; indexing into a code segment with a literal - naughty STA DelayPTR LDA #0 STA MoveCount RTS; was JMP VblankLoop L1: LDA #2 STA MoveCount L2: LDA #$10 STA HMP0 STA HMP1 STA Wsync STA HMOVE RTS; was JMP VblankLoop ORG $F200 VblankLoop: LDA Intim BNE VblankLoop ; wait for vblank timer STA Wsync ; finish waiting for the current line STA Vblank ; Turn off Vblank ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ScreenStart: LDY TopDelay INY ;????? X1: STA Wsync DEY BNE X1 LDY #4 ;????? X2: DEY BPL X2 LDA #49 ; 50 pixels high STA LoopCount JMP (DelayPTR) JNDelay: .byte $c9,$c9,$c9,$c9,$c9,$c9,$c9,$c9,$c9 .byte $c9,$c9,$c9,$c9,$c9,$c9,$c9,$c9,$c9 .byte $c9,$c9,$c9,$c9,$c9,$c9,$c9,$c9,$c9 .byte $c9,$c9,$c9,$c9,$c9,$c9,$c9,$c9,$c9,$c9,$c5 NOP X3: NOP NOP NOP LDY LoopCount LDA (s1),Y STA GRP0 LDA (s2),Y STA GRP1 LDA (s3),Y STA GRP0 ; LDA (s6),Y lda $00 LDA #$00 STA Temp LDA (s5),Y TAX LDA (s4),Y LDY Temp STA GRP1 STX GRP0 STY GRP1 STA GRP0 DEC LoopCount BPL X3 LDA #0 STA GRP0 STA GRP1 STA GRP0 STA GRP1 NOP NOP NOP NOP NOP NOP NOP LDY BottomDelay INY ;????? X4: STA Wsync DEY BNE X4 LDA #$02 STA Vblank STA Wsync ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; OverscanStart: LDA #34 ;skip 30 lines (overscan) STA Tim64t OverscanLoop: LDA Intim BNE OverscanLoop ; wait for Overscan timer OverscanDone: STA Wsync ; finish waiting for the current line JMP NewScreen ; sound routine ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; DoSound: LDA EggMode ; if egg mode is set, we do it differently CMP #0 BEQ StartSound LDA EggMusic AND #$7F ; we're doing 16 bars of 8th notes TAY LDA FrameCycle AND #1 BEQ UseSet2 UseSet1: LDA EggMusic1,Y ; channel 1 notes CMP #0 BEQ SetVol1 STA Audf0 LDA #5 ; I guess we'll try this for now STA Audc0 LDA #3 SetVol1: STA Audv0 LDA EggMusic2,Y ; channel 2 notes CMP #0 BEQ SetVol2 STA Audf1 LDA #8 ; I guess we'll try this for now STA Audc1 LDA #5 ; left hand s/b quieter SetVol2: STA Audv1 JMP ChangeNote UseSet2: LDA EggMusic3,Y ; channel 1 notes CMP #0 BEQ SetVol1a STA Audf0 LDA #5 ; I guess we'll try this for now STA Audc0 LDA #15 SetVol1a: STA Audv0 LDA EggMusic4,Y ; channel 2 notes CMP #0 BEQ SetVol2a STA Audf1 LDA #1 ; I guess we'll try this for now STA Audc1 LDA #12 ; left hand s/b quieter SetVol2a: STA Audv1 ChangeNote: LDA FrameCycle ; so we can skip every 3, 7 or 15 frames AND #$07 ; let's try 15 BNE EndSound INY STY EggMusic BNE EndSound StartSound: LDA FrameCycle ; so we can skip every 3, 7 or 15 frames AND #$03 ; let's try 15 BNE EndSound LDA SoundQ ; is there sound to be played? CMP #0 BEQ EndSound ; no? how sad. TAY CPY #1 ; if it's note #1 we can't do the cheezy echo. BEQ DoVoice1 DEY DoVoice2: LDA SoundFData,Y ; basically you just set SoundQ to an STA Audf1 ; offset and put frequency, control and LDA SoundCData,Y ; volume data in the data segment below STA Audc1 ; with zero termination. I was gonna do LDA SoundVData,Y ; a channel multiplexing music thing ; but I'm too lame. LSR ; Divide volume in half for the cheezy echo STA Audv1 INY DoVoice1: LDA SoundFData,Y ; see above STA Audf0 LDA SoundCData,Y STA Audc0 LDA SoundVData,Y STA Audv0 CMP #0 BNE NextNote ; if it's not zero there's more STA Audf0 STA Audc0 STA Audv1 STA SoundQ ; otherwise we turn off the sound and empty the Q JMP EndSound NextNote: INC SoundQ EndSound: RTS CheckEgg: LDA EggMode CMP #0 BEQ NoEgg ; no egg? how sad! LDA FrameCycle ; hey, it works in adventure STA ColuP0 STA ColuP1 LDA #$F6 STA s1+1 STA s2+1 STA s3+1 STA s4+1 STA s5+1 LDA #1 STA SoundQ RTS NoEgg: LDA #$36 ; otherwise set the color back to the STA ColuP0 ; lovely shade of red. this egg works much STA ColuP1 ; more smoothly than I expected. LDA #0 STA EggMusic RTS ; egg sound data ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ORG $F400 EggMusic3: .byte 23,0,23,0,23,23,0,0 .byte 23,0,23,0,23,23,0,0 .byte 23,0,19,0,29,0,26,0 .byte 23,23,23,23,0,0,0,0 .byte 22,0,22,0,22,0,22,0 .byte 22,0,23,0,23,0,23,0 .byte 23,0,26,0,26,0,23,0 .byte 26,26,26,26,19,19,19,19 .byte 23,0,23,0,23,23,0,0 .byte 23,0,23,0,23,23,0,0 .byte 23,0,19,0,29,0,26,0 .byte 23,23,23,23,0,0,0,0 .byte 22,0,22,0,22,0,22,0 .byte 22,0,23,0,23,0,23,0 .byte 19,0,19,0,22,0,28,0 .byte 29,29,29,29,14,14,14,14 EggMusic4: .byte 15,15,$00,$00,21,21,$00,$00 .byte 15,15,$00,$00,21,21,$00,$00 .byte 15,15,$00,$00,21,21,$00,$00 .byte 15,15,$00,$00,21,21,$00,$00 .byte 11,11,$00,$00,15,15,$00,$00 .byte 15,15,$00,$00,21,21,$00,$00 .byte 21,21,$00,$00,13,13,$00,$00 .byte 21,21,$00,$00,18,18,16,16 .byte 15,15,$00,$00,21,21,$00,$00 .byte 15,15,$00,$00,21,21,$00,$00 .byte 15,15,$00,$00,21,21,$00,$00 .byte 15,15,$00,$00,21,21,$00,$00 .byte 11,11,$00,$00,15,15,$00,$00 .byte 15,15,$00,$00,21,21,$00,$00 .byte 21,21,$00,$00,13,13,$00,$00 .byte 15,15,21,21,18,18,16,16 ORG $F500 EggMusic1: .byte 19,0,19,0,19,19,0,0 .byte 19,0,19,0,19,19,0,0 .byte 19,0,14,0,23,0,22,0 .byte 19,19,19,19,0,0,0,0 .byte 17,0,17,0,17,0,17,0 .byte 17,0,19,0,19,0,19,0 .byte 19,0,20,0,20,0,17,0 .byte 19,19,19,19,15,15,15,15 .byte 19,0,19,0,19,19,0,0 .byte 19,0,19,0,19,19,0,0 .byte 19,0,14,0,23,0,22,0 .byte 19,19,19,19,0,0,0,0 .byte 17,0,17,0,17,0,17,0 .byte 17,0,19,0,19,0,19,0 .byte 15,0,15,0,17,0,22,0 .byte 23,23,23,23,23,23,23,23 EggMusic2: .byte 28,0,1,$00,28,0,1,$00 .byte 28,0,1,$00,28,0,1,$00 .byte 28,0,1,$00,28,0,1,$00 .byte 28,0,1,$00,28,0,1,$00 .byte 28,0,1,$00,28,0,1,$00 .byte 28,0,1,$00,28,0,1,$00 .byte 28,0,1,$00,28,0,1,$00 .byte 28,0,1,$00,28,0,1,$00 .byte 28,0,1,$00,28,0,1,$00 .byte 28,0,1,$00,28,0,1,$00 .byte 28,0,1,$00,28,0,1,$00 .byte 28,0,1,$00,28,0,1,$00 .byte 28,0,1,$00,28,0,1,$00 .byte 28,0,1,$00,28,0,1,$00 .byte 28,0,1,$00,28,0,1,$00 .byte 28,0,1,$00,28,0,1,$00 ; graphics data (boing ball) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ORG $F600 ; first column .byte $33,$37,$3e,$3c,$36,$33,$31,$00 .byte $00,$00,$00,$00,$00,$00,$00,$00 .byte $03,$03,$03,$03,$03,$03,$03,$00 .byte $3f,$00,$1f,$06,$06,$06,$06,$0e .byte $06,$00,$03,$03,$01,$00,$01,$03 .byte $03,$00,$31,$31,$31,$3f,$31,$31 .byte $31,$00 ; second column .byte $9f,$31,$31,$31,$31,$31,$b1,$00 .byte $33,$37,$3e,$33,$31,$31,$3f,$00 .byte $03,$03,$03,$f3,$03,$03,$fb,$00 .byte $ff,$00,$9e,$03,$01,$1f,$31,$31 .byte $1f,$00,$1b,$bb,$f3,$e3,$f3,$bb .byte $1b,$00,$b1,$b1,$bf,$b1,$b1,$9b .byte $8e,$00 ; third column .byte $3e,$b3,$b1,$b1,$b1,$b3,$be,$00 .byte $9f,$31,$31,$b1,$b1,$b1,$1f,$00 .byte $39,$73,$e3,$3b,$1b,$1b,$f1,$00 .byte $ff,$00,$1e,$03,$81,$9f,$b1,$b1 .byte $1f,$00,$1b,$1b,$5b,$fb,$fb,$b9 .byte $18,$00,$b0,$b0,$bf,$b1,$b1,$31 .byte $3f,$00 ; fourth column .byte $3f,$30,$b0,$b0,$b0,$30,$30,$00 .byte $3f,$b1,$b1,$bf,$b1,$b1,$3f,$00 .byte $f3,$1b,$1b,$1b,$1b,$1b,$f3,$00 .byte $ff,$00,$1e,$03,$81,$9f,$b1,$b1 .byte $1f,$00,$19,$1b,$f8,$19,$1b,$b3 .byte $e1,$00,$30,$30,$3f,$b1,$b1,$b1 .byte $3f,$00 ; fifth column .byte $63,$63,$7f,$63,$63,$36,$1c,$00 .byte $00,$80,$80,$00,$80,$80,$00,$00 .byte $18,$18,$58,$f8,$f8,$b8,$18,$00 .byte $ff,$00,$20,$00,$90,$98,$9c,$8e .byte $0e,$00,$f0,$18,$18,$f0,$00,$30 .byte $e0,$00,$0c,$0c,$0c,$9e,$b3,$b3 .byte $33,$00 ; sound data (bounce noise) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ORG $F700 SoundFData: .byte $1f,$19,$1a,$1b,$1c,$1d,$1e,$1f ORG $F750 SoundCData: .byte $07,$06,$06,$06,$06,$06,$06,$06 ORG $F7A0 SoundVData: .byte $0f,$0b,$0a,$08,$06,$04,$02,$00 ORG $F800 ; first column .byte $00,$00,$00,$00,$00,$00,$00,$00 .byte $01,$01,$03,$06,$06,$0d,$03,$23 .byte $23,$23,$23,$27,$47,$46,$48,$f8 .byte $38,$38,$38,$3c,$3c,$3c,$3c,$3d .byte $19,$01,$21,$20,$10,$10,$18,$08 .byte $0c,$0d,$01,$00,$00,$00,$00,$00 .byte $00,$00 ; second column .byte $00,$00,$03,$03,$0e,$0e,$8e,$8e .byte $9f,$1f,$18,$00,$60,$e0,$e0,$e0 .byte $e0,$e0,$e3,$ef,$9f,$1f,$1f,$1f .byte $1f,$0f,$0f,$0f,$0e,$10,$38,$f8 .byte $f8,$fc,$fc,$fc,$fe,$fe,$79,$60 .byte $40,$e0,$e0,$f0,$78,$3c,$1d,$08 .byte $00,$00 ; third column .byte $00,$40,$78,$3e,$1f,$0f,$06,$08 .byte $3c,$fc,$fc,$fe,$fe,$7f,$7e,$78 .byte $60,$40,$c0,$c0,$c0,$e0,$e0,$e0 .byte $e1,$e7,$ff,$0f,$0f,$0f,$0f,$07 .byte $07,$07,$02,$04,$3c,$fc,$fe,$fe .byte $fe,$7e,$7f,$38,$00,$70,$f8,$78 .byte $1c,$0e ; fourth column .byte $00,$00,$00,$00,$98,$fc,$1e,$1f .byte $0f,$07,$03,$00,$0e,$7e,$fe,$7f .byte $7f,$7f,$3f,$3f,$3f,$3c,$00,$60 .byte $e0,$e0,$e0,$e0,$f0,$f0,$f0,$f1 .byte $ff,$cf,$0f,$0f,$07,$07,$07,$06 .byte $08,$38,$f0,$f1,$72,$70,$60,$60 .byte $40,$00 ; fifth column .byte $00,$00,$00,$00,$00,$00,$00,$00 .byte $80,$d0,$b8,$18,$18,$0c,$0c,$06 .byte $06,$06,$84,$9c,$7c,$7c,$7c,$3c .byte $3c,$3c,$3e,$3e,$3c,$22,$42,$c2 .byte $c2,$c4,$c4,$c4,$c0,$88,$f0,$60 .byte $c0,$c0,$80,$80,$00,$00,$00,$00 .byte $00,$00 ORG $F900 ; first column .byte $00,$00,$00,$00,$00,$00,$00,$00 .byte $01,$01,$02,$06,$04,$0b,$17,$27 .byte $27,$27,$07,$0f,$4f,$4e,$40,$b0 .byte $70,$70,$30,$30,$30,$30,$38,$39 .byte $3f,$27,$07,$23,$01,$11,$11,$00 .byte $08,$09,$03,$01,$00,$00,$00,$00 .byte $00,$00 ; second column .byte $00,$00,$01,$01,$18,$1c,$dc,$9c .byte $3c,$3c,$3b,$61,$01,$81,$81,$81 .byte $81,$81,$83,$8f,$ff,$7f,$7f,$7f .byte $3f,$3f,$3f,$3f,$3e,$20,$00,$e0 .byte $e0,$e0,$f0,$f0,$f8,$f8,$ff,$e3 .byte $81,$81,$c0,$e0,$f0,$78,$3f,$10 .byte $00,$00 ; third column .byte $00,$01,$c0,$fc,$7e,$3f,$1e,$00 .byte $30,$f0,$f8,$f8,$f8,$fc,$fd,$fb .byte $e3,$81,$01,$01,$00,$00,$00,$00 .byte $81,$87,$9f,$7f,$7f,$3f,$3f,$3f .byte $1f,$1f,$1e,$08,$30,$f0,$f0,$f8 .byte $f8,$f8,$fc,$fb,$61,$41,$f0,$f8 .byte $1c,$00 ; fourth column .byte $00,$80,$60,$18,$00,$7c,$7c,$3e .byte $3f,$1f,$1f,$0c,$08,$78,$fc,$fc .byte $fc,$fe,$fe,$fe,$ff,$fc,$60,$00 .byte $80,$80,$80,$c0,$c0,$c0,$c0,$c1 .byte $ef,$df,$1f,$1f,$1f,$1f,$1f,$1e .byte $10,$21,$e1,$e1,$e3,$e4,$e0,$c0 .byte $80,$00 ; fifth column .byte $00,$00,$00,$00,$00,$00,$00,$00 .byte $00,$90,$b8,$38,$38,$1c,$1c,$0e .byte $0e,$0e,$00,$19,$f8,$f8,$f8,$f8 .byte $f8,$f8,$f8,$fc,$ff,$66,$06,$86 .byte $86,$84,$8c,$0c,$0c,$00,$60,$c0 .byte $c0,$80,$80,$00,$00,$00,$00,$00 .byte $00,$00 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ORG $FA00 ; first column .byte $00,$00,$00,$00,$00,$00,$00,$00 .byte $01,$02,$06,$04,$08,$0b,$17,$2f .byte $2f,$0f,$0f,$0e,$5e,$5f,$10,$a0 .byte $60,$60,$60,$60,$60,$60,$60,$31 .byte $37,$2f,$0f,$07,$07,$03,$13,$01 .byte $01,$09,$03,$01,$00,$00,$00,$00 .byte $00,$00 ; second column .byte $00,$00,$00,$03,$18,$38,$38,$38 .byte $38,$78,$7f,$e7,$87,$07,$07,$07 .byte $07,$03,$00,$0c,$7c,$fc,$fc,$fe .byte $fe,$fe,$fe,$fe,$ff,$60,$40,$80 .byte $80,$c0,$c0,$c0,$e0,$e0,$e7,$ef .byte $87,$03,$83,$81,$c1,$60,$33,$0b .byte $00,$00 ; third column .byte $00,$06,$c1,$f0,$f8,$7c,$7f,$30 .byte $20,$c0,$e0,$e0,$e0,$f0,$f1,$f7 .byte $e7,$87,$07,$07,$03,$03,$03,$03 .byte $00,$06,$1e,$fe,$fe,$ff,$ff,$ff .byte $7f,$7f,$7e,$78,$00,$c0,$e0,$e0 .byte $f0,$f0,$f0,$ff,$e7,$83,$c1,$e1 .byte $f1,$10 ; fourth column .byte $00,$00,$80,$60,$10,$70,$f8,$fc .byte $fc,$7e,$3f,$3c,$10,$60,$e0,$f0 .byte $f0,$f0,$f8,$f8,$fc,$ff,$e3,$83 .byte $03,$01,$01,$01,$01,$01,$01,$00 .byte $0e,$be,$7e,$7e,$7e,$7e,$7e,$3f .byte $31,$03,$c3,$c3,$c2,$e4,$e0,$e0 .byte $c0,$00 ; fifth column .byte $00,$00,$00,$00,$00,$00,$80,$40 .byte $30,$00,$70,$f0,$78,$78,$38,$3c .byte $3c,$1e,$18,$11,$f1,$f1,$f1,$f1 .byte $f1,$f0,$f0,$f8,$fa,$e6,$8e,$0e .byte $0c,$0c,$0c,$0c,$18,$10,$40,$c0 .byte $80,$80,$00,$00,$00,$00,$00,$00 .byte $00,$00 ORG $FB00 ; first column .byte $00,$00,$00,$00,$00,$00,$00,$01 .byte $01,$02,$06,$04,$09,$12,$1e,$0e .byte $1e,$1c,$1c,$1c,$1c,$3d,$33,$03 .byte $c3,$c3,$c3,$41,$41,$61,$61,$60 .byte $66,$7f,$0f,$0f,$0f,$07,$07,$03 .byte $03,$00,$07,$03,$01,$00,$00,$00 .byte $00,$00 ; second column .byte $00,$00,$01,$03,$01,$11,$70,$70 .byte $70,$70,$e7,$ff,$9f,$1f,$1f,$1f .byte $1f,$1f,$1c,$10,$70,$f0,$f0,$f0 .byte $f8,$f8,$f8,$f8,$f9,$e7,$c3,$03 .byte $03,$01,$01,$01,$80,$80,$87,$df .byte $bf,$1f,$0f,$87,$c3,$61,$33,$13 .byte $00,$00 ; third column .byte $00,$02,$e3,$e1,$f0,$f0,$f9,$f3 .byte $c3,$01,$81,$80,$80,$80,$c1,$c7 .byte $df,$9f,$1f,$1f,$1f,$0f,$0f,$0f .byte $0e,$00,$18,$f8,$f8,$f8,$fc,$fc .byte $fc,$fc,$ff,$f9,$c1,$01,$00,$80 .byte $80,$c0,$e0,$e7,$ef,$87,$07,$c3 .byte $f3,$32 ; fourth column .byte $00,$00,$c0,$f0,$62,$41,$e0,$f0 .byte $f8,$fc,$fe,$fd,$70,$00,$80,$c0 .byte $c0,$c0,$e0,$e0,$e0,$f3,$ef,$8f .byte $0f,$0f,$0f,$07,$07,$07,$07,$02 .byte $0c,$3c,$fc,$fc,$fc,$fc,$fc,$fd .byte $f3,$47,$87,$87,$86,$8e,$c8,$d0 .byte $80,$00 ; fifth column .byte $00,$00,$00,$00,$00,$00,$80,$c0 .byte $70,$20,$60,$e0,$f0,$f0,$f8,$78 .byte $78,$7c,$3a,$23,$c3,$c3,$c3,$c1 .byte $e1,$e1,$e1,$e1,$e2,$fe,$9c,$1c .byte $1c,$1c,$3c,$38,$38,$30,$48,$90 .byte $90,$a0,$40,$00,$00,$00,$00,$00 .byte $00,$00 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ORG $FC00 ; first column .byte $00,$00,$00,$00,$00,$00,$00,$00 .byte $02,$00,$01,$01,$0b,$12,$0c,$18 .byte $18,$18,$38,$38,$38,$31,$3f,$4f .byte $87,$c7,$c7,$47,$47,$47,$47,$46 .byte $44,$5c,$1e,$1e,$0e,$0f,$0f,$07 .byte $07,$02,$06,$03,$01,$00,$00,$00 .byte $00,$00 ; second column .byte $00,$00,$01,$03,$07,$23,$61,$61 .byte $e1,$e1,$c6,$de,$be,$3f,$3f,$3f .byte $3f,$3f,$3c,$30,$40,$c0,$c0,$c0 .byte $c0,$c0,$e0,$e0,$e1,$ff,$df,$0f .byte $0f,$07,$07,$07,$03,$03,$04,$9e .byte $fe,$3f,$1f,$1f,$8f,$47,$24,$0f .byte $01,$00 ; third column .byte $00,$08,$07,$83,$c0,$e0,$f1,$ff .byte $c7,$07,$07,$03,$03,$01,$00,$06 .byte $1f,$7f,$7f,$7f,$7f,$7f,$7f,$3f .byte $3e,$38,$20,$e0,$e0,$e0,$e0,$f0 .byte $f0,$f0,$f1,$ff,$c7,$07,$03,$03 .byte $03,$01,$01,$86,$9f,$9f,$0f,$87 .byte $e3,$3c ; fourth column .byte $00,$00,$80,$f0,$e6,$43,$c1,$c0 .byte $e0,$e0,$f0,$fb,$f3,$83,$03,$01 .byte $01,$01,$00,$80,$80,$83,$df,$bf .byte $3f,$3f,$3f,$3f,$1f,$1f,$1f,$1e .byte $10,$20,$e0,$f0,$f0,$f0,$f0,$f1 .byte $ff,$cf,$0e,$0e,$0e,$0e,$88,$80 .byte $40,$00 ; fifth column .byte $00,$00,$00,$00,$00,$00,$80,$c0 .byte $f0,$60,$40,$c0,$e0,$e0,$f0,$f0 .byte $f8,$f8,$fe,$e6,$07,$03,$83,$83 .byte $83,$83,$83,$83,$82,$dc,$bc,$38 .byte $78,$78,$78,$78,$70,$78,$08,$90 .byte $30,$20,$40,$00,$00,$00,$00,$00 .byte $00,$00 ORG $FD00 ; first column .byte $00,$00,$00,$00,$00,$00,$00,$00 .byte $00,$00,$01,$01,$03,$14,$08,$18 .byte $18,$10,$30,$30,$30,$31,$6f,$5f .byte $8f,$8f,$8f,$0f,$0f,$0f,$0f,$4e .byte $48,$58,$38,$38,$1c,$1c,$0e,$0e .byte $0e,$06,$04,$02,$01,$00,$00,$00 .byte $00,$00 ; second column .byte $00,$00,$00,$03,$07,$23,$23,$43 .byte $c3,$c3,$84,$9c,$fc,$7c,$7c,$7c .byte $7c,$fc,$ff,$f1,$81,$01,$81,$81 .byte $80,$80,$80,$80,$81,$9f,$bf,$3f .byte $3f,$3f,$1f,$1f,$1f,$0f,$08,$18 .byte $7c,$fc,$7e,$3e,$1f,$1f,$04,$0e .byte $01,$00 ; third column .byte $00,$0c,$0f,$07,$83,$81,$c1,$ef .byte $df,$1f,$0f,$0f,$0f,$07,$06,$00 .byte $1c,$7c,$fc,$fc,$fe,$fe,$fe,$ff .byte $fe,$f8,$e0,$00,$00,$80,$80,$80 .byte $c0,$c0,$e1,$e7,$df,$1f,$0f,$0f .byte $0f,$07,$07,$00,$1c,$fe,$3e,$0f .byte $85,$7c ; fourth column .byte $00,$00,$00,$c0,$fe,$8f,$07,$83 .byte $81,$c0,$e0,$e3,$ff,$8f,$0f,$07 .byte $07,$03,$03,$03,$01,$02,$1e,$7e .byte $fe,$fe,$fe,$7f,$7f,$7f,$7f,$7e .byte $70,$00,$c0,$c0,$c0,$c0,$c0,$c1 .byte $ee,$de,$1e,$1c,$1c,$1e,$1c,$10 .byte $20,$00 ; fifth column .byte $00,$00,$00,$00,$00,$00,$80,$c0 .byte $e0,$e0,$08,$80,$80,$c4,$c0,$e2 .byte $e0,$f0,$f6,$ee,$0e,$06,$06,$06 .byte $06,$07,$07,$07,$05,$19,$78,$f8 .byte $f0,$f2,$f0,$f0,$f0,$f8,$90,$30 .byte $20,$40,$40,$80,$00,$00,$00,$00 .byte $00,$00 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ORG $FE00 ; first column .byte $00,$00,$00,$00,$00,$00,$00,$01 .byte $01,$03,$03,$07,$07,$04,$08,$10 .byte $10,$30,$30,$31,$21,$20,$6f,$5f .byte $9f,$9f,$9f,$1f,$1f,$1f,$1f,$4e .byte $48,$50,$30,$38,$18,$1c,$0c,$0e .byte $0e,$07,$04,$00,$00,$00,$00,$00 .byte $00,$00 ; second column .byte $00,$00,$01,$03,$07,$07,$47,$cf .byte $cf,$8f,$88,$18,$78,$f8,$f8,$f8 .byte $f8,$fc,$ff,$f3,$83,$03,$03,$01 .byte $01,$01,$01,$01,$00,$9f,$bf,$7f .byte $7f,$3f,$3f,$3f,$1f,$1f,$18,$10 .byte $78,$fc,$fc,$7e,$3e,$1f,$0c,$00 .byte $00,$00 ; third column .byte $00,$3c,$9e,$8f,$07,$83,$80,$8f .byte $ff,$3f,$1f,$1f,$1f,$0f,$0e,$08 .byte $18,$78,$f8,$f8,$fc,$fc,$fc,$fc .byte $ff,$f9,$e1,$01,$01,$00,$00,$00 .byte $80,$80,$81,$87,$ff,$3f,$1f,$1f .byte $0f,$0f,$0f,$00,$18,$7c,$3e,$1e .byte $0f,$06 ; fourth column .byte $00,$00,$00,$80,$fe,$8f,$07,$03 .byte $03,$81,$c0,$c3,$ef,$9f,$1f,$0f .byte $0f,$0f,$07,$07,$03,$00,$1c,$7c .byte $fc,$fe,$fe,$fe,$fe,$fe,$fe,$ff .byte $f1,$41,$81,$81,$81,$81,$81,$c0 .byte $ce,$fc,$3c,$3c,$3c,$38,$38,$30 .byte $20,$00 ; fifth column .byte $00,$00,$00,$00,$00,$00,$00,$80 .byte $c0,$f0,$88,$08,$80,$84,$c4,$c2 .byte $c2,$e0,$e6,$ee,$0e,$0e,$0e,$0e .byte $0e,$0f,$0f,$07,$05,$19,$70,$f0 .byte $f0,$f0,$f0,$f0,$e4,$e8,$b0,$30 .byte $60,$40,$c0,$80,$00,$00,$00,$00 .byte $00,$00 ORG $FF00 ; first column .byte $00,$00,$00,$00,$00,$00,$00,$00 .byte $00,$01,$01,$03,$07,$04,$01,$31 .byte $31,$31,$21,$21,$61,$60,$4e,$fe .byte $3e,$1e,$1e,$1e,$1f,$1f,$1f,$1e .byte $18,$10,$30,$30,$18,$18,$1c,$0c .byte $0e,$0f,$00,$00,$00,$00,$00,$00 .byte $00,$00 ; second column .byte $00,$00,$03,$03,$07,$07,$87,$cf .byte $8f,$8f,$88,$10,$70,$f0,$f0,$f8 .byte $f8,$f8,$fb,$f7,$87,$07,$07,$07 .byte $03,$03,$03,$03,$02,$1e,$3e,$fe .byte $fe,$7f,$7f,$7f,$3f,$3f,$38,$00 .byte $60,$f0,$f8,$7c,$3c,$1e,$0c,$0c .byte $00,$00 ; third column .byte $00,$20,$fe,$8f,$07,$07,$02,$8e .byte $be,$7f,$3f,$3f,$3f,$1f,$1e,$18 .byte $00,$70,$f0,$f0,$f0,$f8,$f8,$f8 .byte $fd,$fb,$e3,$03,$03,$03,$01,$01 .byte $01,$01,$00,$07,$bf,$7f,$7f,$3f .byte $3f,$1f,$1f,$08,$10,$78,$7c,$1e .byte $0f,$00 ; fourth column .byte $00,$00,$00,$00,$dc,$be,$0f,$07 .byte $03,$01,$81,$83,$cf,$bf,$3f,$1f .byte $1f,$1f,$0f,$0f,$0f,$04,$18,$78 .byte $f8,$fc,$fc,$fc,$fc,$fc,$fc,$fd .byte $f3,$c3,$03,$03,$03,$03,$83,$82 .byte $8c,$bc,$7c,$38,$39,$38,$38,$60 .byte $40,$00 ; fifth column .byte $00,$00,$00,$00,$00,$00,$00,$80 .byte $c0,$f0,$98,$08,$08,$84,$84,$86 .byte $c2,$c2,$c4,$fe,$1e,$1e,$1e,$1e .byte $0e,$0e,$0e,$0e,$0d,$11,$70,$f2 .byte $e2,$e2,$e0,$e0,$e0,$c8,$b0,$30 .byte $60,$40,$c0,$80,$00,$00,$00,$00 .byte $00,$00 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; Set up the 6502 interrupt vector table ; ORG IntVectors NMI .word Cart_Init Reset .word Cart_Init IRQ .word Cart_Init ; END
29.773729
89
0.428828
64d7bada88a5054658b31cef4f77cbdee5d8bfc8
3,446
asm
Assembly
lib/chibiakumas/SrcALL/V1_SimpleTile.asm
gilbertfrancois/msx
f34418180820df067530f31bd9727ef1c65a7989
[ "Apache-2.0" ]
null
null
null
lib/chibiakumas/SrcALL/V1_SimpleTile.asm
gilbertfrancois/msx
f34418180820df067530f31bd9727ef1c65a7989
[ "Apache-2.0" ]
null
null
null
lib/chibiakumas/SrcALL/V1_SimpleTile.asm
gilbertfrancois/msx
f34418180820df067530f31bd9727ef1c65a7989
[ "Apache-2.0" ]
null
null
null
ifdef BuildCPC TileWidth2 equ 1 endif ifdef BuildENT TileWidth2 equ 1 endif ifdef BuildSAM TileWidth4 equ 1 endif ifdef BuildZXS TileWidth1 equ 1 endif ifdef BuildTI8 TileWidth1 equ 1 endif ifdef BuildMSX ifdef BuildMSX_MSX1 TileWidth1 equ 1 else TileWidth4 equ 1 endif endif ifdef BuildSxx ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ShowTile: ;A=Tilenum, BC=XYpos push af call GetVDPScreenPos pop af add 128 out (vdpData),a ld a,0 out (vdpData),a ret endif ifdef BuildGBx ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ShowTile: ;A=Tilenum, BC=XYpos push af ld d,0 ld e,a ld hl,RawPalettes add hl,de ld d,(hl) push de call GetVDPScreenPos pop de pop af add 128 ld (hl),a ifdef BuildGBC ld a,1 ;Turn on GBC extras ld (&FF4F),a ld (hl),d ld a,0 ;Turn off GBC extras ld (&FF4F),a endif ret endif ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ifndef BuildCONSOLE ShowTile: ;A=Tilenum, BC=XYpos ifdef TileWidth2 rlc b ;Convert Xpos to byte position endif ifdef TileWidth4 rlc b rlc b endif rlc c ;Convert 8x8 tile Ypos to line rlc c rlc c push bc push af ld h,0 ld l,a or a rl l ;Convert Tilenumber to memory location rl h rl l rl h rl l rl h ifdef TileWidth2 rl l rl h endif ifdef TileWidth4 rl l rl h rl l rl h endif ;push hl ;&80 ;call Monitor_PushedRegister ld de,RawBitmap add hl,de ex de,hl call GetScreenPos ;Get Screen pos from BC ld c,8 AgainY: ifdef TileWidth2 ;No of bytes per tile ld b,8/4 endif ifdef TileWidth1 ld b,8/8 endif ifdef TileWidth4 ld b,8/2 endif AgainX: ld a,(de) SetScrByte a inc de djnz AgainX call GetNextLine dec c jp nz,AgainY pop af pop bc ifdef BuildZXS ;Apply the Spectrum palette ld hl,RawPalettes ld d,0 ld e,a add hl,de ld a,(hl) push af call GetColMemPos pop af ld (hl),a endif ifdef BuildMSX_MSX1 ld hl,RawPalettes ;Apply the MSX1 palette ld d,0 ld e,a or a ;Clear Carry Flag rl d rl e rl d rl e rl d rl e add hl,de push hl call GetColMemPos pop hl ld b,8 ;MSX1 palette uses 8 lines MSXPalAgain: ld a,(hl) inc hl out (VdpOut_Data),a djnz MSXPalAgain endif ret else ifdef BuildMSX_MSX1VDP ;MSX1 hardware tilemap ShowTile: ;A=Tilenum, BC=XYpos push af call GetVDPScreenPos pop af add 128 out (VdpOut_Data),a ret endif ifdef BuildMSX_MSXVDP ShowTile: push bc ;MSX2 VDP BLIT tilemap push de push hl ld d,b ld e,c ld h,0 add 128 ld l,a call CopyTileToScreen pop hl pop de pop bc ret endif ifdef V9K ifdef BuildCPC ShowTile: push bc ;CPC V9K Blit tilemap *UNTESTED* push de push hl ld d,b ld e,c ld h,0 add 128 ld l,a call CopyTileToScreen pop hl pop de pop bc ret endif endif endif
15.522523
111
0.52989
ce49df2a30bf7f7ca8afc23177a2568679a3f106
170
asm
Assembly
libsrc/_DEVELOPMENT/adt/bv_stack/c/sdcc_iy/bv_stack_max_size.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
libsrc/_DEVELOPMENT/adt/bv_stack/c/sdcc_iy/bv_stack_max_size.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
libsrc/_DEVELOPMENT/adt/bv_stack/c/sdcc_iy/bv_stack_max_size.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
; size_t bv_stack_max_size(bv_stack_t *s) SECTION code_adt_bv_stack PUBLIC _bv_stack_max_size EXTERN _b_vector_max_size defc _bv_stack_max_size = _b_vector_max_size
15.454545
44
0.858824
c8f2d13d8b17479133b8f911277b01c7027cab27
10,400
asm
Assembly
P6/data_P6_2/MDTest120.asm
alxzzhou/BUAA_CO_2020
b54bf367081a5a11701ebc3fc78a23494aecca9e
[ "Apache-2.0" ]
1
2022-01-23T09:24:47.000Z
2022-01-23T09:24:47.000Z
P6/data_P6_2/MDTest120.asm
alxzzhou/BUAA_CO_2020
b54bf367081a5a11701ebc3fc78a23494aecca9e
[ "Apache-2.0" ]
null
null
null
P6/data_P6_2/MDTest120.asm
alxzzhou/BUAA_CO_2020
b54bf367081a5a11701ebc3fc78a23494aecca9e
[ "Apache-2.0" ]
null
null
null
ori $ra,$ra,0xf lui $4,12328 srav $4,$4,$4 multu $1,$4 mflo $4 lb $4,14($0) ori $3,$2,41525 mfhi $1 div $5,$ra mtlo $1 lb $1,10($0) divu $6,$ra lui $0,14876 lb $5,14($0) divu $3,$ra srav $1,$2,$2 mthi $4 lui $3,36908 mtlo $5 divu $6,$ra multu $4,$1 addu $6,$4,$4 sll $4,$4,10 mthi $5 lui $6,44346 mult $3,$1 lb $2,13($0) mthi $6 div $1,$ra mflo $6 addiu $3,$6,4365 sb $4,1($0) addu $6,$2,$1 ori $1,$3,34493 div $5,$ra mthi $5 mflo $4 lui $1,34450 sll $5,$6,28 ori $1,$2,40586 lui $4,62368 lui $4,26096 addiu $0,$0,-25531 sb $4,1($0) mthi $0 sb $0,10($0) addu $5,$5,$5 mfhi $3 lui $5,57884 lui $4,2160 divu $0,$ra mult $2,$2 divu $3,$ra sb $1,15($0) div $5,$ra lb $2,9($0) mult $1,$1 addiu $0,$2,-12919 mfhi $4 addiu $5,$6,-21288 addiu $5,$5,-13319 div $4,$ra lb $1,6($0) multu $2,$2 sb $1,7($0) multu $1,$1 mflo $2 lb $3,6($0) sll $2,$1,17 sb $0,2($0) ori $4,$6,2233 lui $1,2401 sb $6,15($0) mthi $5 mult $0,$2 sb $4,3($0) mtlo $1 mfhi $5 lui $4,41939 mflo $4 sll $5,$2,1 mflo $5 mflo $4 sb $3,11($0) mthi $4 ori $5,$5,63106 mflo $6 lui $4,51781 mfhi $1 mult $5,$4 mthi $3 lb $2,7($0) addu $6,$2,$4 lui $5,30874 sb $1,12($0) addu $4,$5,$4 ori $2,$2,9934 ori $2,$6,59354 multu $1,$1 mthi $5 addiu $0,$0,28205 mult $5,$0 addu $5,$6,$6 divu $4,$ra mflo $4 srav $6,$6,$6 lui $4,26304 sll $3,$3,8 mflo $1 mult $5,$4 lb $1,5($0) sll $6,$2,17 lui $1,51438 ori $5,$4,45578 mtlo $4 mult $1,$2 addiu $3,$3,-27536 srav $3,$5,$3 lb $4,15($0) srav $1,$3,$3 mfhi $5 div $4,$ra lb $5,1($0) srav $4,$1,$4 mfhi $4 divu $4,$ra div $6,$ra sll $1,$1,19 mthi $2 mflo $6 multu $0,$4 mflo $1 mtlo $6 addiu $4,$4,-32321 addiu $3,$5,-9590 lb $1,14($0) addu $6,$6,$6 addu $0,$0,$2 addu $4,$2,$2 mtlo $6 addiu $4,$0,22599 sb $4,11($0) lui $5,35277 mthi $6 ori $3,$3,12156 mtlo $6 divu $1,$ra mflo $4 addiu $2,$2,1859 sb $2,10($0) divu $1,$ra multu $1,$5 addiu $5,$3,16683 mfhi $4 addu $1,$4,$4 lui $1,24316 div $6,$ra srav $4,$4,$1 sb $0,3($0) divu $1,$ra mfhi $5 mtlo $3 lb $4,9($0) srav $4,$0,$3 srav $3,$3,$3 multu $5,$4 mflo $2 addu $4,$0,$4 mflo $5 srav $3,$0,$3 sb $2,9($0) mtlo $0 mthi $3 mtlo $2 lui $4,41068 sb $4,16($0) addiu $4,$4,1843 mthi $0 addu $1,$2,$5 mthi $4 divu $4,$ra srav $4,$1,$1 mtlo $3 divu $1,$ra divu $5,$ra mflo $5 mflo $4 addu $5,$0,$4 divu $4,$ra lb $4,7($0) mthi $1 mtlo $5 mflo $4 mthi $3 mtlo $3 mflo $4 mtlo $5 mflo $1 srav $0,$2,$2 mfhi $3 sb $5,6($0) mtlo $3 sll $5,$4,18 mthi $4 multu $5,$5 div $4,$ra mtlo $5 mfhi $3 srav $4,$4,$4 mult $3,$3 sll $5,$1,16 mflo $0 lb $1,10($0) div $0,$ra srav $4,$2,$2 sb $5,14($0) divu $4,$ra mtlo $4 sb $4,7($0) ori $4,$5,47278 mfhi $4 lui $3,40126 lui $4,15426 ori $2,$1,17848 ori $2,$2,40234 addiu $2,$2,-806 addiu $4,$4,27811 addu $4,$1,$1 divu $5,$ra addiu $4,$1,-27671 addiu $5,$2,28368 lui $4,45035 sll $4,$5,10 lui $6,662 divu $4,$ra multu $1,$2 mult $4,$5 lui $5,7831 sll $0,$0,24 addiu $5,$3,-1457 ori $5,$2,45406 mthi $6 mthi $1 mfhi $1 mtlo $0 divu $4,$ra lb $4,15($0) lb $3,15($0) divu $1,$ra div $1,$ra mthi $1 multu $0,$4 srav $3,$6,$3 lui $3,54517 lui $0,32872 div $2,$ra sll $5,$5,4 mtlo $5 mfhi $5 lb $4,11($0) mtlo $3 sb $4,15($0) addu $1,$1,$1 lb $6,10($0) mtlo $1 div $1,$ra divu $6,$ra sb $5,6($0) mthi $5 multu $2,$4 srav $1,$1,$1 sll $4,$5,29 mtlo $5 mult $1,$1 mflo $1 mtlo $4 mflo $4 mthi $1 lb $4,4($0) ori $6,$1,2316 ori $4,$4,1519 mtlo $5 multu $1,$0 lb $4,5($0) mthi $1 lui $5,55944 sll $4,$4,31 addiu $4,$4,28063 addu $6,$0,$1 mthi $4 sll $4,$6,4 multu $0,$2 sb $5,6($0) mflo $6 ori $1,$1,28107 mflo $1 mult $5,$5 sb $4,4($0) ori $2,$2,13938 addiu $4,$4,1716 addu $0,$2,$2 lb $4,3($0) mfhi $1 sb $1,13($0) lui $4,14157 addiu $1,$5,31018 mflo $4 mthi $6 mthi $3 lui $4,674 div $5,$ra lb $5,5($0) multu $4,$1 ori $1,$1,48124 srav $3,$5,$3 divu $4,$ra mflo $4 sll $6,$2,18 mult $3,$1 lb $3,15($0) mult $4,$1 sll $1,$6,11 mfhi $4 addiu $5,$5,12201 srav $4,$4,$4 sll $1,$1,25 mtlo $5 sll $0,$0,10 mthi $5 lui $5,22927 mtlo $3 addiu $0,$5,4320 sb $5,6($0) lui $5,53522 mflo $0 srav $1,$1,$2 divu $2,$ra sb $1,9($0) divu $5,$ra divu $4,$ra mfhi $5 mthi $6 multu $4,$6 divu $4,$ra mult $1,$3 addu $0,$1,$0 divu $1,$ra mult $1,$6 multu $4,$5 mflo $4 addu $1,$1,$1 div $5,$ra mult $4,$2 div $2,$ra divu $0,$ra sll $5,$4,21 mflo $6 mult $6,$5 div $5,$ra mtlo $0 addu $1,$6,$6 addu $3,$0,$3 mfhi $4 srav $4,$2,$4 addu $4,$4,$1 sll $1,$2,28 mflo $5 lb $4,14($0) addu $1,$4,$3 addiu $6,$2,-26487 lui $2,25369 sll $4,$0,23 multu $4,$4 lb $4,4($0) lui $4,654 lui $3,17678 mult $1,$2 mult $1,$2 divu $6,$ra mfhi $4 lb $4,8($0) divu $4,$ra mult $5,$5 srav $4,$4,$4 ori $0,$0,63708 addu $4,$2,$2 addu $4,$5,$1 addiu $5,$2,-971 multu $4,$5 divu $4,$ra mtlo $4 divu $5,$ra mfhi $5 mult $2,$2 div $6,$ra sb $4,11($0) sll $1,$1,13 multu $4,$2 srav $5,$4,$1 mtlo $4 mthi $0 addu $5,$5,$2 lui $5,23778 sb $0,16($0) sb $0,13($0) mflo $5 mult $5,$2 mflo $5 addiu $3,$6,5482 mtlo $5 div $5,$ra div $4,$ra mthi $4 sll $1,$1,27 div $2,$ra sll $4,$4,19 sb $1,8($0) div $4,$ra srav $5,$2,$5 sll $3,$3,13 mflo $5 mult $5,$4 srav $6,$1,$2 div $4,$ra srav $6,$6,$4 mult $0,$3 multu $4,$4 sll $4,$3,1 mfhi $0 addu $2,$2,$2 divu $4,$ra multu $5,$2 mflo $6 ori $4,$6,32145 div $5,$ra mtlo $4 ori $2,$1,49782 srav $4,$4,$4 multu $5,$1 addiu $5,$5,5234 lui $5,32983 div $4,$ra sb $4,9($0) mtlo $1 mult $4,$6 srav $6,$1,$1 mtlo $1 sll $5,$4,0 addiu $3,$2,20960 mtlo $4 mfhi $2 div $4,$ra mfhi $1 mtlo $4 mflo $5 addiu $1,$1,-31898 mtlo $6 lui $4,6920 sb $4,8($0) addiu $0,$5,4863 mult $5,$1 lb $5,5($0) div $5,$ra divu $1,$ra mtlo $4 ori $3,$1,12084 mflo $4 sb $6,7($0) addu $1,$4,$0 div $4,$ra addiu $4,$0,16820 mfhi $5 sll $0,$6,14 divu $5,$ra lui $4,20128 addu $4,$2,$5 sb $5,5($0) lb $5,13($0) div $4,$ra div $3,$ra mfhi $5 div $6,$ra lb $6,2($0) div $1,$ra mult $3,$4 srav $5,$1,$5 sb $5,13($0) addiu $5,$1,9592 mthi $5 sll $4,$5,26 addu $0,$5,$5 srav $4,$4,$4 addiu $3,$5,-16159 sb $1,5($0) mult $4,$6 lui $4,24467 multu $2,$4 sb $0,15($0) sb $3,6($0) ori $4,$4,19947 divu $3,$ra lb $5,14($0) lui $4,26 mult $2,$2 multu $4,$4 mthi $4 ori $5,$4,29275 multu $4,$4 mflo $6 mtlo $4 div $1,$ra sll $2,$6,11 lui $1,61127 mthi $6 div $0,$ra mflo $6 multu $3,$3 lui $4,14398 sb $0,4($0) addiu $1,$1,10712 div $4,$ra div $5,$ra srav $4,$4,$1 sb $1,6($0) mtlo $4 mthi $5 mfhi $0 sll $5,$1,2 mult $4,$2 mfhi $3 mult $4,$4 sb $2,13($0) srav $4,$4,$4 mult $4,$4 div $5,$ra mult $1,$2 divu $1,$ra div $5,$ra mthi $3 mthi $6 mflo $5 multu $6,$4 lui $3,11560 mflo $4 mflo $1 lb $5,13($0) div $1,$ra div $1,$ra mult $4,$5 mtlo $4 multu $5,$5 lui $4,35502 srav $1,$2,$2 ori $1,$1,2173 srav $0,$0,$0 divu $2,$ra lb $1,3($0) multu $4,$4 mult $5,$4 multu $0,$0 mfhi $3 mflo $6 mfhi $4 divu $2,$ra mtlo $6 mtlo $6 mfhi $4 sb $6,15($0) mflo $1 addiu $2,$5,1805 addiu $2,$5,24288 sb $3,11($0) mthi $5 multu $1,$3 mflo $1 div $1,$ra mflo $4 mult $4,$6 div $2,$ra mthi $6 mtlo $5 mult $1,$1 ori $3,$3,47433 divu $3,$ra lb $3,12($0) sll $3,$3,28 mflo $6 lui $0,52862 mtlo $5 mult $4,$4 mflo $6 divu $5,$ra mflo $0 div $4,$ra ori $1,$4,61371 sb $1,5($0) lb $1,12($0) sll $6,$6,26 addu $0,$1,$2 lui $5,1964 ori $1,$1,29402 srav $1,$4,$4 lui $1,11841 mtlo $4 mult $4,$3 div $5,$ra mflo $5 div $4,$ra multu $3,$3 sll $0,$2,21 mult $5,$1 sb $1,13($0) mult $4,$4 mult $2,$2 mthi $3 addiu $2,$0,14416 mtlo $5 sll $3,$5,13 sb $2,9($0) mtlo $2 multu $4,$4 lb $4,13($0) divu $2,$ra lui $1,48433 multu $4,$1 div $4,$ra mthi $5 ori $5,$0,35133 srav $5,$4,$0 srav $1,$2,$1 srav $1,$2,$4 div $2,$ra srav $4,$5,$5 addiu $4,$4,26350 lui $1,8566 mflo $4 lui $1,23343 divu $6,$ra mflo $1 ori $3,$3,12288 addiu $4,$6,8600 addiu $0,$0,-23469 mtlo $3 sb $1,11($0) srav $5,$5,$3 sll $1,$1,20 ori $4,$1,25673 mtlo $2 sb $5,13($0) multu $3,$2 mult $1,$4 mult $4,$4 sb $5,4($0) lb $0,3($0) ori $1,$2,23117 sb $1,2($0) ori $2,$2,37327 mult $4,$0 addiu $5,$2,-4909 mthi $1 mflo $1 mflo $5 mthi $4 mflo $5 mult $3,$2 mflo $1 mfhi $1 mtlo $1 lui $4,32840 mtlo $5 mult $4,$2 sb $4,14($0) mfhi $4 addu $5,$4,$4 sll $5,$3,6 lb $1,11($0) srav $5,$2,$4 lb $4,6($0) addiu $1,$2,10118 srav $5,$4,$5 addu $1,$2,$2 mfhi $4 mfhi $1 mfhi $4 mtlo $1 mthi $0 div $5,$ra multu $4,$0 sb $4,8($0) mfhi $5 mtlo $1 mflo $4 sll $6,$4,20 mflo $4 addiu $3,$1,20117 lb $4,3($0) mthi $1 addu $4,$4,$4 lui $4,5756 mflo $5 lui $1,60900 mfhi $6 mthi $5 sb $0,15($0) mtlo $0 mthi $4 multu $3,$0 mult $6,$4 mfhi $0 addiu $5,$5,-16456 lb $4,7($0) sb $5,10($0) srav $4,$6,$6 divu $4,$ra div $0,$ra sll $1,$2,13 mflo $3 lb $1,15($0) multu $5,$2 addu $4,$4,$6 sll $6,$5,28 mthi $6 div $4,$ra srav $3,$5,$3 div $4,$ra srav $3,$1,$3 mult $3,$4 mthi $5 lui $0,33904 ori $2,$4,42496 sb $5,13($0) mflo $4 mtlo $5 lui $1,47917 lb $1,2($0) sll $6,$2,5 addu $5,$6,$5 mtlo $1 mfhi $4 sll $5,$6,22 addu $3,$3,$3 div $1,$ra divu $0,$ra srav $2,$2,$1 mfhi $6 divu $4,$ra sb $4,8($0) divu $4,$ra addiu $1,$4,3553 mult $4,$1 sb $4,14($0) lb $1,13($0) sb $2,11($0) mfhi $4 mfhi $2 mult $0,$5 ori $4,$4,3445 divu $1,$ra div $5,$ra mflo $4 mult $4,$2 srav $4,$1,$1 divu $5,$ra mthi $6 mfhi $4 addiu $1,$2,-23005 mfhi $0 addu $4,$4,$5 sb $1,0($0) mult $6,$4 ori $4,$0,42812 mult $1,$4 div $5,$ra addiu $4,$4,17910 addu $4,$5,$3 mult $4,$2 addiu $1,$2,-27071 ori $1,$4,20054 srav $3,$3,$3 multu $5,$2 lui $4,26034 mflo $3 multu $1,$2 divu $1,$ra addiu $1,$0,18093 ori $4,$4,52517 lui $1,50971 sll $4,$3,31 addu $2,$2,$2 addiu $0,$2,4062 multu $6,$6 addiu $5,$5,12039 multu $2,$2 mfhi $5 divu $1,$ra divu $1,$ra ori $4,$1,8344 mult $1,$4 divu $4,$ra lui $3,53240 ori $1,$6,65009 mult $5,$6 mfhi $6 mtlo $4 sll $0,$0,1 ori $2,$2,2827 mflo $5 srav $1,$4,$1 mtlo $4 addu $5,$2,$2 mult $1,$4 addu $4,$4,$3 sb $1,16($0) sll $2,$2,27 mflo $0 mult $2,$2 lui $4,38115 mflo $6 lui $4,53978 mtlo $5 divu $0,$ra mthi $4 addiu $1,$1,14828 sll $4,$4,22 srav $1,$5,$5 addu $0,$1,$0 div $5,$ra mult $1,$4 mthi $4 lui $4,9184 div $1,$ra mtlo $1 lui $3,60020 mflo $5 addiu $4,$4,-32572 mthi $5 mult $3,$5 addiu $1,$1,-16774 multu $2,$4 mtlo $1 sb $1,7($0) srav $2,$1,$2 sb $4,12($0) mfhi $6 sll $2,$4,13 mult $4,$4 mflo $5 sll $4,$2,24 mfhi $5 addu $6,$3,$3 mthi $1 mult $2,$2 divu $4,$ra mult $4,$3 sb $3,8($0) lui $4,59677 multu $4,$1 addu $3,$3,$3 mfhi $4 divu $6,$ra divu $0,$ra sb $1,4($0) div $1,$ra mult $5,$4 mtlo $1 divu $2,$ra ori $0,$2,37751 mflo $1 mfhi $4 sb $4,7($0) div $3,$ra addu $6,$1,$5 srav $5,$6,$5 srav $2,$2,$4 mfhi $1 mthi $4 mflo $3 ori $1,$4,42985 mthi $4 sb $5,2($0) mflo $6 mthi $1 mfhi $3 mfhi $5 lui $3,27137 mflo $3 lui $4,21854 lb $4,4($0) lui $5,17182
11.685393
18
0.569423
c52cd7863dd8612d49134073e40250f0b5bf69fd
458
asm
Assembly
libsrc/fcntl/test/write.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/fcntl/test/write.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
1,600
2017-01-15T16:12:02.000Z
2022-03-31T12:11:12.000Z
libsrc/fcntl/test/write.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
215
2017-01-17T10:43:03.000Z
2022-03-23T17:25:02.000Z
; Dummy function to keep rest of libs happy ; ; $Id: write.asm,v 1.4 2016-03-06 21:39:54 dom Exp $ ; SECTION code_clib PUBLIC write PUBLIC _write INCLUDE "target/test/def/test_cmds.def" .write ._write pop af pop hl pop de pop bc push bc push de push hl push af ld b,c ld a,CMD_WRITEBLOCK call SYSCALL ret
16.962963
52
0.497817
8a02d627f4f48996bba87e0b9e5fb728ca20869d
442
asm
Assembly
code/non1996/29.asm
KongoHuster/assembly-exercise
1c4a44c60c0e93a1350ed4f887aeaf1414702a51
[ "0BSD" ]
1
2021-08-20T03:57:29.000Z
2021-08-20T03:57:29.000Z
code/non1996/29.asm
KongoHuster/assembly-exercise
1c4a44c60c0e93a1350ed4f887aeaf1414702a51
[ "0BSD" ]
null
null
null
code/non1996/29.asm
KongoHuster/assembly-exercise
1c4a44c60c0e93a1350ed4f887aeaf1414702a51
[ "0BSD" ]
null
null
null
DATA SEGMENT ARRAY DW 1, 2, 1 DATA ENDS CODE SEGMENT ASSUME CS:CODE, DS:DATA START: MOV AX, DATA MOV DS, AX MOV BX, 0 MOV DX, 0 MOV AX, ARRAY[BX] FIRST: CMP AX, ARRAY[BX + 2] JNZ SECOND INC DL SECOND: CMP AX, ARRAY[BX + 4] JNZ THIRD INC DL CMP DL, 2 JZ COUT THIRD: MOV AX, ARRAY[BX + 2] CMP AX, ARRAY[BX + 4] JNZ COUT INC DL COUT: MOV AH, 02H ADD DL, '0' INT 21H MOV AH, 04CH INT 21H CODE ENDS END START
10.52381
24
0.626697
5e7cc55b962badb3f1fdb5b4838347b19371ccbe
617
asm
Assembly
programs/oeis/273/A273337.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/273/A273337.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/273/A273337.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A273337: First differences of number of active (ON,black) cells in n-th stage of growth of two-dimensional cellular automaton defined by "Rule 657", based on the 5-celled von Neumann neighborhood. ; 3,13,31,32,40,48,56,64,72,80,88,96,104,112,120,128,136,144,152,160,168,176,184,192,200,208,216,224,232,240,248,256,264,272,280,288,296,304,312,320,328,336,344,352,360,368,376,384,392,400,408,416,424,432 mov $2,$0 mov $4,$0 mul $4,2 mov $0,$4 mov $3,4 mul $4,2 lpb $0 add $5,6 mov $0,$5 sub $0,1 mov $4,0 lpe trn $4,4 mul $4,2 add $0,$4 add $0,6 sub $0,$3 add $1,1 add $1,$0 lpb $2 add $1,8 sub $2,1 lpe
22.851852
204
0.672609
cf584d5ac79229ee45fb670f66f2dc7dbd8d9fa0
10,880
asm
Assembly
math_functions/mb_div_x_0.asm
pran-jal/WinRAR-Keygen-GUI
6c3b59e0c1b10302cd820bda143b5196eb7c5277
[ "MIT" ]
null
null
null
math_functions/mb_div_x_0.asm
pran-jal/WinRAR-Keygen-GUI
6c3b59e0c1b10302cd820bda143b5196eb7c5277
[ "MIT" ]
null
null
null
math_functions/mb_div_x_0.asm
pran-jal/WinRAR-Keygen-GUI
6c3b59e0c1b10302cd820bda143b5196eb7c5277
[ "MIT" ]
1
2021-12-28T15:18:08.000Z
2021-12-28T15:18:08.000Z
;/********************************************************************* ;* Filename: _mb_div_x.asm ;* Author: Aiyu Xiao (xiao_ai_yu@live.cn, OR doublesine@tju.edu.cn) ;*********************************************************************/ TITLE mb_div_x.asm ;------------------------------- ; FOR X64 ;------------------------------- IFDEF _M_X64 .CODE ; Undecorate symbol name is ; unsigned __int64 __fastcall accel::math::mb_div_u64(unsigned __int64 dividend[], unsigned __int64 length, unsigned __int64 divisor) ; rcx = src ; rdx = length ; r8 = divisor ?mb_div_u64@math@accel@@YA_KQEA_K_K1@Z PROC test rdx, rdx ; if (rdx(length) == 0) { jnz start_div ; div r8 ; rax = rdx:rax / r8; rdx = rdx:rax % r8; ### if r8 is zero, here can triggle a divided-by-zero exception. ; ### so if divisor is zero, the exception will reveal that there is a bug. mov rax, 0FFFFFFFFFFFFFFFFH ; ret ; return 0xffffffffffffffff; ### to tell caller that arguments are invalid. start_div: ; } else { push rsi ; save rsi; mov rsi, rcx ; rsi = rcx(src); mov rcx, rdx ; rcx = rdx(length); mov rax, rdx ; rax = rdx(length); shl rax, 3 ; rax *= 8; ### rax = 8 * length add rsi, rax ; rsi += rax jnc no_overflow ; if (carry_flag == 1) { pop rsi ; recover rsi; xor rax, rax ; return 0; ret ; } no_overflow: ; std ; flags.DF = 1; xor rdx, rdx ; rdx = 0; sub rsi, 8 ; rsi -= 8; ### let rsi point to the last integer in src. cycle0: ; do { lodsq ; rax = qword ptr[rsi]; rsi -= 8; div r8 ; rax = rdx:rax / r8(divisor), rdx = rdx:rax % r8(divisor); mov qword ptr[rsi + 8], rax ; qword ptr[rsi + 8] = rax; loop cycle0 ; rcx--; ; } while(rcx != 0); mov rax, rdx ; rax = rdx; cld ; flags.DF = 0; ### According to MSDN: https://msdn.microsoft.com/en-us/library/7td56tzs(v=vs.140).aspx, ; ### it should be cleared. pop rsi ; } ret ?mb_div_u64@math@accel@@YA_KQEA_K_K1@Z ENDP ; Undecorate symbol name is ; unsigned __int64 __fastcall accel::math::_udiv128(uint64_t dividend_l, uint64_t dividend_h, ; uint64_t divisor, ; uint64_t* remainder) ; rcx = dividend_l ; rdx = dividend_h ; r8 = divisor ; r9 = remainder ?_udiv128@math@accel@@YA_K_K00PEA_K@Z PROC mov rax, rcx ; rax = rcx(dividend_l); div r8 ; rdx:rax(dividend_h:dividend_l) / r8(divisor); test r9, r9 ; if (remainder != nullptr) { jz not_need_remainder ; mov qword ptr[r9], rdx ; *remainder = rdx; not_need_remainder: ; } ret ; return rax; ?_udiv128@math@accel@@YA_K_K00PEA_K@Z ENDP ; Undecorate symbol name is ; unsigned __int64 __fastcall accel::math::u128_div_u64(const uint64_t (&dividend)[2], ; uint64_t divisor) ; rcx = dividend ; rdx = divisor ; ; label prefix: F2 ?u128_div_u64@math@accel@@YA_KAEAY01$$CB_K_K@Z PROC mov r8, rdx ; r8 = rdx(divisor); cmp qword ptr[rcx + 8], rdx ; if (dividend[1] < rdx(divisor)) { jnb F2_condition1 ; F2_condition0: ; mov rax, qword ptr[rcx] ; rax = dividend[0]; mov rdx, qword ptr[rcx + 8] ; rdx = dividend[1]; div r8 ; rdx:rax(dividend[1]:dividend[0]) / r8(divisor); mov rax, rdx ; rax = rdx; ret ; return rax; F2_condition1: ; } else { mov rax, qword ptr[rcx + 8] ; rax = dividend[1]; xor rdx, rdx ; rdx = 0; div r8 ; rdx:rax(0:dividend[1]) / r8(divisor); mov rax, qword ptr[rcx] ; rax = dividend[0]; div r8 ; rdx:rax / r8(divisor); mov rax, rdx ; rax = rdx; ret ; return rax ; } ?u128_div_u64@math@accel@@YA_KAEAY01$$CB_K_K@Z ENDP ; Undecorate symbol name is ; unsigned __int64 __fastcall accel::math::u128_div_u64(const uint64_t (&dividend)[2], ; uint64_t divisor, ; uint64_t (&quotient)[2]) ; rcx = dividend ; rdx = divisor ; r8 = quotient ; ; label prefix: F3 ?u128_div_u64@math@accel@@YA_KAEAY01$$CB_K_KAEAY01_K@Z PROC mov r9, rdx ; r9 = rdx(divisor); cmp qword ptr[rcx + 8], rdx ; if (dividend[1] < rdx(divisor)) { jnb F3_condition1 ; F3_condition0: ; mov rax, qword ptr[rcx] ; rax = dividend[0]; mov rdx, qword ptr[rcx + 8] ; rdx = dividend[1]; div r9 ; rdx:rax(dividend[1]:dividend[0]) / r9(divisor); mov qword ptr[r8], rax ; quotient[0] = rax; mov qword ptr[r8 + 8], 0 ; quotient[1] = 0; mov rax, rdx ; rax = rdx; ret ; return rax; F3_condition1: ; } else { mov rax, qword ptr[rcx + 8] ; rax = dividend[1]; xor rdx, rdx ; rdx = 0; div r9 ; rdx:rax(0:dividend[1]) / r9(divisor); mov r10, rax ; r10 = rax; mov rax, qword ptr[rcx] ; rax = dividend[0]; div r9 ; rdx:rax / r9(divisor); mov qword ptr[r8], rax ; quotient[0] = rax; mov qword ptr[r8 + 8], r10 ; quotient[1] = r10; mov rax, rdx ; rax = rdx; ret ; return rax; ; } ?u128_div_u64@math@accel@@YA_KAEAY01$$CB_K_KAEAY01_K@Z ENDP ; Undecorate symbol name is ; void __fastcall accel::math::u128_div_u128(const uint64_t (&dividend)[2], ; const uint64_t (&divisor)[2], ; uint64_t (&quotient)[2], ; uint64_t (&remainder)[2]); ; rcx = dividend ; rdx = divisor ; r8 = quotient ; r9 = remainder ; ; label prefix: F4 ?u128_div_u128@math@accel@@YAXAEAY01$$CB_K0AEAY01_K1@Z PROC mov rax, qword ptr[rdx + 8] test rax, rax jnz F4_long_division push r9 mov rdx, qword ptr[rdx] call ?u128_div_u64@math@accel@@YA_KAEAY01$$CB_K_KAEAY01_K@Z pop r9 mov qword ptr[r9], rax mov qword ptr[r9 + 8], 0 ret F4_long_division: push rsi push rdi mov rsi, r8 mov rdi, r9 mov r8, rcx mov r9, rdx mov rax, qword ptr[r8] mov rdx, qword ptr[r8 + 8] mov r10, qword ptr[r9] mov r11, qword ptr[r9 + 8] bsr rcx, r11 inc rcx shrd r10, r11, cl shrd rax, rdx, cl shr rdx, cl div r10 mov rcx, rax mul r11 mov r10, rax mov rax, qword ptr[r9] mul rcx add rdx, r10 jnc F4_no_carry dec rcx sub rax, qword ptr[r9] sbb rdx, r11 F4_no_carry: mov r10, rax mov r11, rdx mov rax, qword ptr[r8] mov rdx, qword ptr[r8 + 8] sub rax, r10 sbb rdx, r11 jnc F4_all_done add rax, qword ptr[r9] adc rdx, qword ptr[r9 + 8] dec rcx F4_all_done: mov qword ptr[rsi], rcx mov qword ptr[rsi + 8], 0 mov qword ptr[rdi], rax mov qword ptr[rdi + 8], rdx pop rdi pop rsi ret ?u128_div_u128@math@accel@@YAXAEAY01$$CB_K0AEAY01_K1@Z ENDP ; Undecorate symbol name is ; void __fastcall accel::math::u128_div_u128(const uint64_t (&dividend)[2], ; const uint64_t (&divisor)[2], ; uint64_t (&quotient)[2]); ; rcx = dividend ; rdx = divisor ; r8 = quotient ; ; label prefix: F5 ?u128_div_u128@math@accel@@YAXAEAY01$$CB_K0AEAY01_K@Z PROC mov rax, qword ptr[rdx + 8] test rax, rax jnz F5_long_division mov rdx, qword ptr[rdx] call ?u128_div_u64@math@accel@@YA_KAEAY01$$CB_K_KAEAY01_K@Z ret F5_long_division: push rsi push rdi mov rsi, rcx mov rdi, rdx mov rax, qword ptr[rsi] mov rdx, qword ptr[rsi + 8] mov r9, qword ptr[rdi] mov r10, qword ptr[rdi] mov r11, qword ptr[rdi + 8] bsr rcx, r11 inc rcx shrd r10, r11, cl shrd rax, rdx, cl shr rdx, cl div r10 mov rcx, rax mul r11 mov r10, rax mov rax, r9 mul rcx add rdx, r10 jc F5_with_carry cmp rdx, qword ptr[rsi + 8] ja F5_with_carry jb F5_all_done cmp rax, qword ptr[rsi] jbe F5_all_done F5_with_carry: dec rcx F5_all_done: mov qword ptr[r8], rcx mov qword ptr[r8 + 8], 0 pop rdi pop rsi ret ?u128_div_u128@math@accel@@YAXAEAY01$$CB_K0AEAY01_K@Z ENDP ENDIF ;------------------------------- ; FOR X86 ;------------------------------- IFDEF _M_IX86 .MODEL FLAT .CODE ; Undecorate symbol name is ; unsigned __int64 __fastcall accel::math::mb_div_u32(unsigned __int32 src[], unsigned __int32 length, unsigned __int32 divisor) ; ecx = src ; edx = length ; [esp + 4] = divisor ?mb_div_u32@math@accel@@YAIQAIII@Z PROC test edx, edx jnz _start_div div dword ptr[esp + 4] mov eax, 0ffffffffh ret 4 _start_div: push esi mov esi, ecx mov ecx, edx mov eax, edx shl eax, 2 add esi, eax jnc _no_overflow pop esi xor eax, eax ret 4 _no_overflow: std xor edx, edx sub esi, 4 _cycle0: lodsd div dword ptr[esp + 4 + 4] mov dword ptr[esi + 4], eax loop _cycle0 mov eax, edx cld pop esi ret 4 ?mb_div_u32@math@accel@@YAIQAIII@Z ENDP ENDIF END
33.894081
146
0.472151
5b7dc7f34e3b6e9a2d8fa80d29888a1d16e1f943
6,613
asm
Assembly
Transynther/x86/_processed/NC/_zr_/i9-9900K_12_0xa0_notsx.log_15_731.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NC/_zr_/i9-9900K_12_0xa0_notsx.log_15_731.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NC/_zr_/i9-9900K_12_0xa0_notsx.log_15_731.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 %r15 push %r8 push %rbp push %rcx push %rdi push %rsi lea addresses_WC_ht+0x11601, %rbp nop add $47281, %r13 movb (%rbp), %r15b sub %r10, %r10 lea addresses_WC_ht+0x15201, %rsi lea addresses_A_ht+0x16101, %rdi clflush (%rdi) nop nop nop nop add $26252, %r8 mov $92, %rcx rep movsw nop nop nop add $20195, %rdi lea addresses_WC_ht+0x1e941, %rsi lea addresses_WT_ht+0xa01, %rdi clflush (%rdi) nop nop nop nop nop add %r15, %r15 mov $72, %rcx rep movsl nop nop add $28800, %r10 lea addresses_A_ht+0xa01, %rbp nop nop nop add $31510, %r13 mov (%rbp), %r15w nop nop nop nop xor $9712, %r15 lea addresses_normal_ht+0x15201, %r15 clflush (%r15) nop nop nop nop nop add $9410, %r8 mov (%r15), %bp nop sub %rbp, %rbp lea addresses_UC_ht+0x19e99, %r8 nop nop and $1098, %r10 vmovups (%r8), %ymm5 vextracti128 $1, %ymm5, %xmm5 vpextrq $1, %xmm5, %rdi nop nop nop nop dec %rsi lea addresses_D_ht+0x11a01, %rsi nop nop nop nop nop sub %rdi, %rdi movw $0x6162, (%rsi) nop nop and $57514, %rcx lea addresses_UC_ht+0x16e01, %r8 nop nop nop add $782, %r13 mov $0x6162636465666768, %rsi movq %rsi, (%r8) nop cmp %rbp, %rbp lea addresses_D_ht+0x1e01, %rbp nop nop nop dec %r10 movb (%rbp), %r15b nop nop nop nop dec %r15 lea addresses_A_ht+0x15b9e, %rbp nop nop nop and $26458, %rcx mov $0x6162636465666768, %r8 movq %r8, (%rbp) nop nop nop and $44067, %rdi lea addresses_WT_ht+0x4ce1, %rsi lea addresses_WC_ht+0x6c01, %rdi sub %r10, %r10 mov $60, %rcx rep movsb nop nop sub %rcx, %rcx lea addresses_normal_ht+0xce01, %rbp nop nop nop nop and $24696, %r10 mov (%rbp), %r15d nop nop nop nop and $13711, %r10 lea addresses_D_ht+0xeb71, %rcx nop nop nop nop and %rdi, %rdi mov $0x6162636465666768, %rsi movq %rsi, (%rcx) nop add %r15, %r15 pop %rsi pop %rdi pop %rcx pop %rbp pop %r8 pop %r15 pop %r13 pop %r10 ret .global s_faulty_load s_faulty_load: push %r14 push %r8 push %r9 push %rax push %rbp push %rcx push %rdi push %rsi // Store lea addresses_A+0x78ac, %r9 cmp %r14, %r14 movl $0x51525354, (%r9) nop nop and $23160, %r8 // REPMOV lea addresses_D+0xa035, %rsi lea addresses_D+0x10001, %rdi nop nop nop nop nop sub %r8, %r8 mov $51, %rcx rep movsq nop nop nop nop cmp %r14, %r14 // Store lea addresses_A+0x3a01, %r9 nop nop and %rdi, %rdi movw $0x5152, (%r9) nop nop nop nop nop add $16641, %r9 // Store lea addresses_WC+0xf341, %rax nop nop nop xor $7651, %r8 mov $0x5152535455565758, %rsi movq %rsi, %xmm7 vmovntdq %ymm7, (%rax) sub %r8, %r8 // Store lea addresses_WT+0xa401, %rsi add %rcx, %rcx mov $0x5152535455565758, %rbp movq %rbp, (%rsi) // Exception!!! nop nop mov (0), %r9 nop nop sub $26658, %rax // Store lea addresses_PSE+0x17201, %rcx xor $43532, %rax movw $0x5152, (%rcx) nop nop nop and %rbp, %rbp // Store mov $0x5e8ffb0000000dc9, %rdi nop nop and %rcx, %rcx movb $0x51, (%rdi) nop nop nop xor $19902, %rsi // Store lea addresses_US+0x144f9, %rax clflush (%rax) nop nop nop nop nop add %rsi, %rsi movb $0x51, (%rax) nop nop nop xor $41826, %rsi // Store lea addresses_WT+0x13381, %rax and %r14, %r14 movb $0x51, (%rax) nop nop nop nop nop dec %r14 // Faulty Load mov $0x6cce160000000601, %rdi nop nop nop nop xor %r14, %r14 vmovups (%rdi), %ymm7 vextracti128 $0, %ymm7, %xmm7 vpextrq $0, %xmm7, %r9 lea oracles, %r8 and $0xff, %r9 shlq $12, %r9 mov (%r8,%r9,1), %r9 pop %rsi pop %rdi pop %rcx pop %rbp pop %rax pop %r9 pop %r8 pop %r14 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_NC', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'type': 'addresses_A', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 0}} {'src': {'type': 'addresses_D', 'congruent': 2, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_D', 'congruent': 9, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_A', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 10}} {'OP': 'STOR', 'dst': {'type': 'addresses_WC', 'AVXalign': False, 'size': 32, 'NT': True, 'same': False, 'congruent': 5}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 7}} {'OP': 'STOR', 'dst': {'type': 'addresses_PSE', 'AVXalign': True, 'size': 2, 'NT': False, 'same': False, 'congruent': 10}} {'OP': 'STOR', 'dst': {'type': 'addresses_NC', 'AVXalign': True, 'size': 1, 'NT': False, 'same': False, 'congruent': 3}} {'OP': 'STOR', 'dst': {'type': 'addresses_US', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 3}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 7}} [Faulty Load] {'src': {'type': 'addresses_NC', 'AVXalign': False, 'size': 32, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 11}, 'OP': 'LOAD'} {'src': {'type': 'addresses_WC_ht', 'congruent': 9, 'same': True}, 'OP': 'REPM', 'dst': {'type': 'addresses_A_ht', 'congruent': 8, 'same': False}} {'src': {'type': 'addresses_WC_ht', 'congruent': 5, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WT_ht', 'congruent': 10, 'same': False}} {'src': {'type': 'addresses_A_ht', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 10}, 'OP': 'LOAD'} {'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 9}, 'OP': 'LOAD'} {'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 1}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'size': 2, 'NT': True, 'same': False, 'congruent': 9}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 10}} {'src': {'type': 'addresses_D_ht', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 8}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 0}} {'src': {'type': 'addresses_WT_ht', 'congruent': 4, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WC_ht', 'congruent': 8, 'same': False}} {'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 9}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 0}} {'00': 15} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
19.681548
149
0.641313
5dd9bdc7888a61039d25d633d0effce6ac55d4bf
1,519
asm
Assembly
vpx_dsp/arm/idct_neon.asm
clear39/avcode-libvpx
f4653c1efc0a8d758195572de34ae05271453d93
[ "BSD-3-Clause" ]
2,151
2020-04-18T07:31:17.000Z
2022-03-31T08:39:18.000Z
vpx_dsp/arm/idct_neon.asm
clear39/avcode-libvpx
f4653c1efc0a8d758195572de34ae05271453d93
[ "BSD-3-Clause" ]
395
2020-04-18T08:22:18.000Z
2021-12-08T13:04:49.000Z
vpx_dsp/arm/idct_neon.asm
clear39/avcode-libvpx
f4653c1efc0a8d758195572de34ae05271453d93
[ "BSD-3-Clause" ]
338
2015-01-17T12:36:51.000Z
2022-03-22T16:12:11.000Z
; ; Copyright (c) 2016 The WebM project authors. All Rights Reserved. ; ; Use of this source code is governed by a BSD-style license ; that can be found in the LICENSE file in the root of the source ; tree. An additional intellectual property rights grant can be found ; in the file PATENTS. All contributing project authors may ; be found in the AUTHORS file in the root of the source tree. ; INCLUDE ./vpx_config.asm ; Helper functions used to load tran_low_t into int16, narrowing if ; necessary. ; $dst0..3 are d registers with the pairs assumed to be contiguous in ; non-high-bitdepth builds. q0-q3 are used as temporaries in high-bitdepth. MACRO LOAD_TRAN_LOW_TO_S16 $dst0, $dst1, $dst2, $dst3, $src IF CONFIG_VP9_HIGHBITDEPTH vld1.s32 {q0,q1}, [$src]! vld1.s32 {q2,q3}, [$src]! vmovn.i32 $dst0, q0 vmovn.i32 $dst1, q1 vmovn.i32 $dst2, q2 vmovn.i32 $dst3, q3 ELSE vld1.s16 {$dst0-$dst1,$dst2-$dst3}, [$src]! ENDIF MEND ; $dst0..3 are d registers. q0-q3 are used as temporaries in high-bitdepth. MACRO LOAD_TRAN_LOW_TO_S16X2 $dst0, $dst1, $dst2, $dst3, $src IF CONFIG_VP9_HIGHBITDEPTH vld2.s32 {q0,q1}, [$src]! vld2.s32 {q2,q3}, [$src]! vmovn.i32 $dst0, q0 vmovn.i32 $dst1, q2 vmovn.i32 $dst2, q1 vmovn.i32 $dst3, q3 ELSE vld2.s16 {$dst0,$dst1,$dst2,$dst3}, [$src]! ENDIF MEND END
32.319149
79
0.620145
db1e857af08d57a4caac745dafc3be945897c0e0
1,327
asm
Assembly
programs/oeis/085/A085350.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/085/A085350.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/085/A085350.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A085350: Binomial transform of poly-Bernoulli numbers A027649. ; 1,5,23,101,431,1805,7463,30581,124511,504605,2038103,8211461,33022991,132623405,532087943,2133134741,8546887871,34230598205,137051532983,548593552421,2195536471151,8785632669005,35152991029223,140643345176501,562667523884831,2250952525075805,9004657388912663,36021171421478981,144092311283400911,576392121926058605,2305637118081599303,9222754363458491861,36891635127230251391,147568393529109857405,590279133177005985143,2361133209889723607141,9444582871103993428271,37778481579051270712205,151114376600110973846183,604458857252161568376821,2417839481563799292483551,9671370083920656226863005,38685516808679002078238423,154742176653705139825312901,618969034871787953838329231,2475877124258053998964549805,9903511451344922546691897863,39614054668317809839268687381,158456245262085598314578037311,633825060814785470130822012605,2535300482558471111140817640503,10141202648131872136415859332261,40564812746221451621221203639791,162259257445967695711558113491405,649037049167116450526252350762343,2596148254818202805145069093439541,10384593193722022229700455444928671,41538373298235721946162358993226205,166153494762985786866731047613439383,664613983762071844713169025375361221 mov $2,4 pow $2,$0 mov $3,$0 mov $0,3 pow $0,$3 mov $1,2 mul $1,$2 sub $1,$0 mov $0,$1
102.076923
1,173
0.911831
3bf5f177dffa38ad908a5777a3ad766eed093799
216
asm
Assembly
asm/Audio2/acp_saw_test.asm
clydeshaffer/GameTankEmulator
ed84475c8de65973b1366898b8a12784ed0b8c46
[ "MIT" ]
3
2020-04-16T13:28:07.000Z
2021-08-17T03:39:19.000Z
asm/Audio2/acp_saw_test.asm
clydeshaffer/GameTankEmulator
ed84475c8de65973b1366898b8a12784ed0b8c46
[ "MIT" ]
null
null
null
asm/Audio2/acp_saw_test.asm
clydeshaffer/GameTankEmulator
ed84475c8de65973b1366898b8a12784ed0b8c46
[ "MIT" ]
null
null
null
DAC = $8001 .org $0200 RESET: CLI LDA #$80 STA $00 Forever: JMP Forever IRQ: NOP NOP CLC LDA $00 ADC $02 STA DAC STA $00 RTI NMI: RTI .org $0FFA .dw NMI .dw RESET .dw IRQ
8.307692
13
0.532407
526164e4bba9d1148ce16fc14bf2f73af9960d75
49,969
asm
Assembly
Application/AssemblyCode/working_and_tmp_asm_files/old_main_assembly.asm
t0ddpar0dy/Handmade_Pacman
68cfdd355bd26e5f5d8d8d6ba344a71f2e19fd70
[ "MIT" ]
null
null
null
Application/AssemblyCode/working_and_tmp_asm_files/old_main_assembly.asm
t0ddpar0dy/Handmade_Pacman
68cfdd355bd26e5f5d8d8d6ba344a71f2e19fd70
[ "MIT" ]
null
null
null
Application/AssemblyCode/working_and_tmp_asm_files/old_main_assembly.asm
t0ddpar0dy/Handmade_Pacman
68cfdd355bd26e5f5d8d8d6ba344a71f2e19fd70
[ "MIT" ]
null
null
null
JUC r6 start_menu ///calls start_game. start_Game: JAL r6 initlevel JAL r6 INIT_PACMAN mainGameLoop: JAL r6 PACMAN_UPDATE_STATE JAL r6 PACMAN_DRAW_GLYPH JUC r6 mainGameLoop //:::::::::::::BEGIN PACMAN STATE MACHINE:::::::::::::::::::::::::: //:::::::::::::BEGIN PACMAN STATE MACHINE:::::::::::::::::::::::::: //:::::::::::::BEGIN PACMAN STATE MACHINE:::::::::::::::::::::::::: //register usage: r14 used to save return address of this function. //registers r0, r1 destroyed as general purpose, r4 used to store state address // STATES: // For the '0' states, the state feild will evaluate to 0 if masked with 0x0F (15). // the ZERO ('0') states are where pacman is centered on a tile. // In the 0 state pacman will continue MOVIng forward unless the player inputs a direction // if pacman reaches any state0 and a ghost position is this tile, nextstate is dead1. // // 0x10: pacmanUP0 (16) --centered on tile, facing up. nextstate will be up1, unless player input // 0x20: pacmanDOWN0 (32) --centered on tile, facing down. nextstate is player input direction, else down1 // 0x30: pacmanLEFT0 (48) --centered on tile, facing left. nextstate is player input direction, else left1 // 0x40: pacmanRIGHT0 (64) --centered on tile, facing right. nextstate is player input direction, else right1 // The rest of the states are defined with the following pattern // the number in parenthesis is the decimal value. // // 0x11 pacmanUP1 (17) //nextstate up2, if player inputs down then nextstate down0 // 0x12 pacmanUP2 (18) //nextstate up3, if player pushes down then nextstate down3 // 0x13 pacmanUP3 (19) //nextstate up0, if player pushes down then nextstate down2 // // 0x21 pacmanDOWN1 (33) //nextstate down2, if player inputs up then nextstate up0 // 0x22 pacmanDOWN2 (34) //nextstate down3, if player inputs up then nextstate up3 // 0x23 pacmanDOWN3 (35) //nextstate down0, if player inputs up then nextstate up2 // // 0x31 pacmanLEFT1 (49) //nextstate left2, if player inputs right then nextstate right0 // 0x32 pacmanLEFT2 (50) //nextstate left3, if player inputs right then nextstate right3 // 0x33 pacmanLEFT3 (51) //nextstate left0, if player inputs right then nextstate right2 // // 0x41 pacmanRIGHT1 (65) //nextstate right2, if player inputs right then nextstate left0 // 0x42 pacmanRIGHT2 (66) //nextstate right3, if player inputs right then nextstate left3 // 0x43 pacmanRIGHT3 (67) //nextstate right0, if player inputs right then nextstate left2 // // 0x01 pacmanDEAD1 (1) //nextstate dead2 // 0x02 pacmanDEAD2 (2) //nextstate dead3 // 0x03 pacmanDEAD3 (3) //nextstate dead4 // 0x04 pacmanDEAD4 (4) //nextstate pacleft0, reset position, do magic to clear his board tile. /////THIS FUNCTION UPDATES PACMAN STATEMACHINE BY ONE STEP. // // The first thing it does is check the timer. If the timer is not active, it immediately leaves. // Otherwise: // check what state pacman is in // check controller input accordingly, // update state & position variables // reset timer // PACMAN_UPDATE_STATE: MOV r15 r14 //store old return adress LUI 255 r0 //check timer by making address ORI 242 r0 LOAD r0 r0 //then loading its value and cmp to 1 CMPI 1 r0 JNE r6 endPacmanStateUpdate //if timer was not active, do not update state. // //else, continue on to update pacman state: // //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: //:::::::::::::::::GET CURRENT STATE ADDRESS:::::::::::::::::::::::: //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: //CURRENT STATE state address 13201, store address in r4 LUI 51 r4 ORI 145 r4 //store address in r4 //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: //:::::::::::::::::::::::::::ZERO STATES:::::::::::::::::::::::::::: //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: // // If in a ZERO state: // check if on a ghost, if so die. // otherwise, check player input in all directions and start MOVIng. // if player has made no input selections, keep going in current direction. // CHECK IF PACMAN HIT GHOST: (Any ghost position is on pacmans square) // if hit, set nextstate to dead, // jump to reset timer to progress to next state. // // if position = AnyGhostPosition // nextstate = pacmanDEAD1 // JUC endPacmanState_SetTimer //Check if in a '0' state: LOAD r1 r4 //read current state, address in r4 MOV r1 r0 //copy STATE into temp register. ANDI 15 r0 //mask it by ANDing it with 0xF (15) CMPI 0 r0 //if masked value is not zero, check if it is in another state JNE r6 UpStates //by branching to the next comparison, to check if it is an upstate //check if up/down controls are pushed: state0_updown: JAL r6 CheckUP //CheckUP is a function that checks if controller up button is pushed MOV r0 r1 //store the result of checkup in r1 JAL r6 CheckDOWN //CheckDOWN is a function that checks if controller down button is pushed CMP r0 r1 //compare the results of both checkup and checkdown, by comparing r1 and r0 BEQ state0_leftright //if controller UP/DOWN are pushed together, input could be left or right CMPI 1 r0 //Else, check if down was pushed. r0 will be 1 if down was pushed BEQ pacmanTryMoveDOWN BUC pacmanTryMoveUP //check if left/right controls are pushed: state0_leftright: JAL r6 CheckRIGHT //CheckLEFT is a function that checks if controller up button is pushed MOV r0 r1 //store the result of checkLEFT in r1 JAL r6 CheckLEFT //CheckRIGHT is a function that checks if controller right button is pushed CMP r0 r1 //compare the results of both checkup and checkdown, by comparing r1 and r0 BEQ state0_NoInput //if controller LEFT/RIGHT are pushed together and up/down was not processed exclusively, entire dpad pushed CMPI 1 r0 //Else, check if RIGHT was pushed. r0 will be 1 if right was pushed BEQ pacmanTryMoveLEFT BUC pacmanTryMoveRIGHT state0_NoInput: LOAD r1 r4 //load state CMPI 16 r1 //check if in up0 state. BEQ pacmanMoveUP //if not in up0 state, check if in down0 state CMPI 32 r1 //check if in down0 state. BEQ pacmanMoveDOWN //if not in down0 state, check if in left0 state, else: CMPI 48 r1 //check if in left0 state. BEQ pacmanMoveLEFT CMPI 64 r1 //check if in right0 state. BEQ pacmanMoveRIGHT //if not in right0 state, do not update state. JUC r6 endPacmanState_SetTimer pacmanMoveUP: JAL r6 pacman_isWallUP CMPI 1 r0 //check if wall is above JEQ r6 endPacmanState_SetTimer //if there is wall, do not update state, reset timer. else: MOV r4 r0 // move state address to r0 to prepare for setStateUP call JAL r6 setStateUP1 // set pacman state to up1 JUC r6 endPacmanState_SetTimer pacmanMoveDOWN: JAL r6 pacman_isWallDOWN CMPI 1 r0 //check if wall is below JEQ r6 endPacmanState_SetTimer //if there is wall, do not update state, reset timer. else: MOV r4 r0 // move state address to r0 to prepare for setState call JAL r6 setStateDOWN1 // set pacman state JUC r6 endPacmanState_SetTimer pacmanMoveLEFT: JAL r6 pacman_isWallLEFT CMPI 1 r0 //check if wall is left JEQ r6 endPacmanState_SetTimer //if there is wall, do not update state, reset timer. else: MOV r4 r0 // move state address to r0 to prepare for setState call JAL r6 setStateLEFT1 // set pacman state to left1 JUC r6 endPacmanState_SetTimer pacmanMoveRIGHT: JAL r6 pacman_isWallRIGHT CMPI 1 r0 //check if wall is right JEQ r6 endPacmanState_SetTimer //if there is wall, do not update state, reset timer. else: MOV r4 r0 // move state address to r0 to prepare for setState call JAL r6 setStateRIGHT1 // set pacman state JUC r6 endPacmanState_SetTimer pacmanTryMoveUP: JAL r6 pacman_isWallUP CMPI 1 r0 //check if wall is above JEQ r6 state0_NoInput MOV r4 r0 // move state address to r0 to prepare for setStateUP call JAL r6 setStateUP1 // set pacman state to up1 JUC r6 endPacmanState_SetTimer pacmanTryMoveDOWN: JAL r6 pacman_isWallDOWN CMPI 1 r0 //check if wall is below JEQ r6 state0_NoInput MOV r4 r0 // move state address to r0 to prepare for setState call JAL r6 setStateDOWN1 // set pacman state JUC r6 endPacmanState_SetTimer pacmanTryMoveLEFT: JAL r6 pacman_isWallLEFT CMPI 1 r0 //check if wall is left JEQ r6 state0_NoInput MOV r4 r0 // move state address to r0 to prepare for setState call JAL r6 setStateLEFT1 // set pacman state to left1 JUC r6 endPacmanState_SetTimer pacmanTryMoveRIGHT: JAL r6 pacman_isWallRIGHT CMPI 1 r0 //check if wall is right JEQ r6 state0_NoInput MOV r4 r0 // move state address to r0 to prepare for setState call JAL r6 setStateRIGHT1 // set pacman state JUC r6 endPacmanState_SetTimer ////:::::::::::::::::::::::End Zero States:::::::::::::::::::::::::: UpStates: //if we are traveling up and not centered on a tile, we will //continue to travel up, thus only the down button must be checked. //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: //::::::::::::::::::::::::::pacmanUP1::::::::::::::::::::::::::::::: //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: pacmanUP1: LOAD r1 r4 //read current state, address in r4 CMPI 17 r1 //if state is pacmanUP1 BNE pacmanUP2 JAL r6 CheckDOWN //check if down control is pushed CMPI 1 r0 BNE UP1Cont UP1Rev: MOV r4 r0 // move state address to r0 to prepare for setState call JAL r6 setStateDOWN0 // set pacman state JUC r6 endPacmanState_SetTimer UP1Cont: MOV r4 r0 // move state address to r0 to prepare for setState call JAL r6 setStateUP2 // set pacman state JUC r6 endPacmanState_SetTimer //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: //::::::::::::::::::::::::::pacmanUP2::::::::::::::::::::::::::::::: //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: pacmanUP2: LOAD r1 r4 //read current state, address in r4 CMPI 18 r1 //if state is pacmanUP2 BNE pacmanUP3 JAL r6 CheckDOWN //check if down control is pushed CMPI 1 r0 BNE UP2Cont //if button isnt pushed, skip to up2cont otherwise do the following: MOV r4 r0 // move state address to r0 to prepare for setState call JAL r6 setStateDOWN3 // set pacman state JUC r6 endPacmanState_SetTimer UP2Cont: LUI 51 r0 //update pacman position by making position address in r0 ORI 144 r0 LOAD r1 r0 //then getting it in r1 ADDI 53 r1 //adding one STOR r1 r0 //and storing back to position address in r0 MOV r4 r0 // move state address to r0 to prepare for setState call JAL r6 setStateUP3 // set pacman state JUC r6 endPacmanState_SetTimer //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: //::::::::::::::::::::::::::pacmanUP3::::::::::::::::::::::::::::::: //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: pacmanUP3: LOAD r1 r4 //read current state, address in r4 CMPI 19 r1 //if state is pacmanUP3 BNE pacmanDOWN1 //set spot in FBCPY to a blank glyph. LUI 51 r1 //make address 13200 where pacman location is stored ORI 144 r1 JAL r6 FBpos_2_CPpos MOVI 0 r0 STOR r0 r1 JAL r6 CheckDOWN //check if down control is pushed CMPI 1 r0 BNE UP3Cont //if button isnt pushed, skip down 4 lines, otherwise do the following: MOV r4 r0 // move state address to r0 to prepare for setState call JAL r6 setStateDOWN2 // set pacman state JUC r6 endPacmanState_SetTimer UP3Cont: MOV r4 r0 // move state address to r0 to prepare for setState call JAL r6 setStateUP0 // set pacman state JUC r6 endPacmanState_SetTimer //::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: DownStates: //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: //::::::::::::::::::::::::::pacmanDOWN1::::::::::::::::::::::::::::: //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: pacmanDOWN1: LOAD r1 r4 //read current state, address in r4 CMPI 33 r1 //if state is pacmanDOWN1 BNE pacmanDOWN2 JAL r6 CheckUP //check if control is pushed CMPI 1 r0 BNE D1C //if button isnt pushed, skip down 4 lines, otherwise do the following: MOV r4 r0 // move state address to r0 to prepare for setState call JAL r6 setStateUP0 // set pacman state JUC r6 endPacmanState_SetTimer D1C: MOV r4 r0 // move state address to r0 to prepare for setState call JAL r6 setStateDOWN2 // set pacman state JUC r6 endPacmanState_SetTimer //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: //::::::::::::::::::::::::::pacmanDOWN2::::::::::::::::::::::::::::: //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: pacmanDOWN2: LOAD r1 r4 //read current state, address in r4 CMPI 34 r1 //if state is pacmanDOWN2 BNE pacmanDOWN3 JAL r6 CheckUP //check if control is pushed CMPI 1 r0 BNE D2C //if button isnt pushed, skip down 9 lines, otherwise do the following: MOV r4 r0 // move state address to r0 to prepare for setState call JAL r6 setStateUP3 // set pacman state //and storing back to position address in r0 JUC r6 endPacmanState_SetTimer D2C: LUI 51 r0 //update pacman position by making position address in r0 ORI 144 r0 LOAD r1 r0 //then getting it in r1 ADDI -53 r1 //adding one STOR r1 r0 MOV r4 r0 // move state address to r0 to prepare for setState call JAL r6 setStateDOWN3 // set pacman state JUC r6 endPacmanState_SetTimer //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: //::::::::::::::::::::::::::pacmanDOWN3::::::::::::::::::::::::::::: //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: pacmanDOWN3: LOAD r1 r4 //read current state, address in r4 CMPI 35 r1 //check state BNE pacmanLEFT1 // //set spot in FBCPY to a blank glyph. LUI 51 r1 //make address 13200 where pacman location is stored ORI 144 r1 JAL r6 FBpos_2_CPpos MOVI 0 r0 STOR r0 r1 JAL r6 CheckUP //check if down control is pushed CMPI 1 r0 BNE D3C //if button isnt pushed, skip down 4 lines, otherwise do the following: MOV r4 r0 // move state address to r0 to prepare for setState call JAL r6 setStateUP2 // set pacman state JUC r6 endPacmanState_SetTimer D3C: MOV r4 r0 // move state address to r0 to prepare for setState call JAL r6 setStateDOWN0 // set pacman state JUC r6 endPacmanState_SetTimer //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: LeftStates: //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: //::::::::::::::::::::::::::pacmanLEFT1::::::::::::::::::::::::::::: //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: pacmanLEFT1: LOAD r1 r4 //read current state, address in r4 CMPI 49 r1 //check state BNE pacmanLEFT2 JAL r6 CheckRIGHT //check if control is pushed CMPI 1 r0 BNE L1C //if button isnt pushed, skip down 4 lines, otherwise do the following: MOV r4 r0 // move state address to r0 to prepare for setState call JAL r6 setStateRIGHT0 // set pacman state JUC r6 endPacmanState_SetTimer L1C: MOV r4 r0 // move state address to r0 to prepare for setState call JAL r6 setStateLEFT2 // set pacman state JUC r6 endPacmanState_SetTimer //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: //::::::::::::::::::::::::::pacmanLEFT2::::::::::::::::::::::::::::: //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: pacmanLEFT2: LOAD r1 r4 //read current state, address in r4 CMPI 50 r1 //check state BNE pacmanLEFT3 JAL r6 CheckRIGHT //check if control is pushed CMPI 1 r0 BNE L2C //if button isnt pushed, skip down 9 lines, otherwise do the following: MOV r4 r0 // move state address to r0 to prepare for setState call JAL r6 setStateRIGHT3 // set pacman state JUC r6 endPacmanState_SetTimer L2C: LUI 51 r0 //update pacman position by making position address in r0 ORI 144 r0 LOAD r1 r0 //then getting it in r1 ADDI 1 r1 //adding one JAL r6 SetPosition_WarpLeftSide //setting it to either its position or the 'warp' position. STOR r1 r0 //and storing back to position address in r0 MOV r4 r0 // move state address to r0 to prepare for setState call JAL r6 setStateLEFT3 // set pacman state JUC r6 endPacmanState_SetTimer //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: //::::::::::::::::::::::::::pacmanLEFT3::::::::::::::::::::::::::::: //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: pacmanLEFT3: LOAD r1 r4 //read current state, address in r4 CMPI 51 r1 //check state BNE pacmanRIGHT1 // //set spot in FBCPY to a blank glyph. LUI 51 r1 //make address 13200 where pacman location is stored ORI 144 r1 JAL r6 FBpos_2_CPpos MOVI 0 r0 STOR r0 r1 JAL r6 CheckRIGHT //check if down control is pushed CMPI 1 r0 BNE L3C //if button isnt pushed, skip down 4 lines, otherwise do the following: MOV r4 r0 // move state address to r0 to prepare for setState call JAL r6 setStateRIGHT2 // set pacman state JUC r6 endPacmanState_SetTimer L3C: MOV r4 r0 // move state address to r0 to prepare for setState call JAL r6 setStateLEFT0 // set pacman state JUC r6 endPacmanState_SetTimer //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: RightStates: //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: //::::::::::::::::::::::::::pacmanRIGHT1::::::::::::::::::::::::::::: //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: pacmanRIGHT1: LOAD r1 r4 //read current state, address in r4 CMPI 65 r1 //check state BNE pacmanRIGHT2 JAL r6 CheckLEFT //check if control is pushed CMPI 1 r0 BNE R1C //if button isnt pushed, skip down 4 lines, otherwise do the following: MOV r4 r0 // move state address to r0 to prepare for setState call JAL r6 setStateLEFT0 // set pacman state JUC r6 endPacmanState_SetTimer R1C: MOV r4 r0 // move state address to r0 to prepare for setState call JAL r6 setStateRIGHT2 // set pacman state JUC r6 endPacmanState_SetTimer //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: //::::::::::::::::::::::::::pacmanRIGHT2:::::::::::::::::::::::::::: //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: pacmanRIGHT2: LOAD r1 r4 //read current state, address in r4 CMPI 66 r1 //check state BNE pacmanRIGHT3 JAL r6 CheckLEFT //check if control is pushed CMPI 1 r0 BNE R2C //if button isnt pushed, skip down 9 lines, otherwise do the following: MOV r4 r0 // move state address to r0 to prepare for setState call JAL r6 setStateLEFT3 // set pacman state JUC r6 endPacmanState_SetTimer R2C: LUI 51 r0 //update pacman position by making position address in r0 ORI 144 r0 LOAD r1 r0 //then getting it in r1 ADDI -1 r1 //adding one JAL r6 SetPosition_WarpRightSide //set position to warped side or current position. STOR r1 r0 //and storing back to position address in r0 MOV r4 r0 // move state address to r0 to prepare for setState call JAL r6 setStateRIGHT3 // set pacman state JUC r6 endPacmanState_SetTimer //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: //::::::::::::::::::::::::::pacmanRIGHT3::::::::::::::::::::::::::::: //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: pacmanRIGHT3: LOAD r1 r4 //read current state, address in r4 CMPI 67 r1 //check state BNE pacmanDEAD1 // //set spot in FBCPY to a blank glyph. LUI 51 r1 //make address 13200 where pacman location is stored ORI 144 r1 JAL r6 FBpos_2_CPpos MOVI 0 r0 STOR r0 r1 JAL r6 CheckLEFT //check if LEFT control is pushed CMPI 1 r0 BNE R3C //if button isnt pushed, skip down 4 lines, otherwise do the following: MOV r4 r0 // move state address to r0 to prepare for setState call JAL r6 setStateLEFT2 // set pacman state JUC r6 endPacmanState_SetTimer R3C: MOV r4 r0 // move state address to r0 to prepare for setState call JAL r6 setStateRIGHT0 // set pacman state JUC r6 endPacmanState_SetTimer //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: DeadStates: pacmanDEAD1: LOAD r1 r4 //read current state, address in r4 CMPI 1 r1 //if state is pacmanDEAD1 BNE pacmanDEAD2 // MOV r4 r0 // move state address to r0 to prepare for setState call JAL r6 setStateDEAD2 // set pacman state JUC r6 endPacmanState_SetTimer pacmanDEAD2: LOAD r1 r4 //read current state, address in r4 CMPI 1 r1 //if state is pacmanDEAD1 BNE pacmanDEAD3 // MOV r4 r0 // move state address to r0 to prepare for setState call JAL r6 setStateDEAD3 // set pacman state JUC r6 endPacmanState_SetTimer pacmanDEAD3: LOAD r1 r4 //read current state, address in r4 CMPI 1 r1 //if state is pacmanDEAD1 BNE pacmanDEAD4 // MOV r4 r0 // move state address to r0 to prepare for setState call JAL r6 setStateDEAD4 // set pacman state JUC r6 endPacmanState_SetTimer pacmanDEAD4: MOV r4 r0 // //default case, move state address to r0 to prepare for setState call JAL r6 setStateLEFT0 // set pacman state JUC r6 endPacmanState_SetTimer LUI 51 r0 //update pacman position by making position address in r0 ORI 144 r0 LOAD r1 r0 //then getting it in r1 ADDI 1 r1 //adding one STOR r1 r0 //and storing back to position address in r0 endPacmanState_SetTimer: LUI 255 r0 //make timer reset address ORI 243 r0 MOVI 55 r1 //set 512+256 miliseconds on timer //TIMER SET STOR r1 r0 endPacmanStateUpdate: MOV r14 r15 //restore old return adress RETX //return PACMAN_DRAW_GLYPH: //pacman's draw glyph // // if opentimer == 1 // load open timer // open timer in 65510 //make of timer address in r1 LUI 255 r1 ORI 230 r1 LOAD r1 r1 //store result back in r1 //r2 has the mouth condition address LUI 51 r2 ORI 146 r2 LOAD r4 r2 //check to see if timer is 1 CMPI 1 r1 //check condition code BNE AFTER_MOUTH_TOGGLE //if timer is 1, invert the mouth condition //get the value of the mouth condition XORI 1 r4 //MOUTH POSITION IN r4 //store back in memory STOR r4 r2 //after toggling, reset timer to toggle again next time it activates: //added mouth toggle timer reset~! LUI 255 r1 ORI 231 r1 LUI 1 r2 STOR r2 r1 //store 250 ms on timer. //TIMER SET MOUTH AFTER_MOUTH_TOGGLE: //MOUTH POSITION IN r4 //cleaned up register usage a bit //MAKE PACMAN LOCATION ADDRESS IN r2 LUI 51 r2 ORI 144 r2 //MAKE PACMAN STATE ADDRESS IN r3 LUI 51 r3 ORI 145 r3 //load location of pacman INTO r0 LOAD r0 r2 //CHECK IF STATE UP0 drawUP0: load r5 r3 CMPI 16 r5 BNE drawUP1 //else check if in state UP1 //check the condition of the mouth //if open CMPI 1 R4 BNE CLOSED_STATE_UP0 MOV r0 r1 LUI 1 r0 //load PACMAN_OPEN_UP_0 ORI 8 r0 STOR r0 r1 ADDI -53 r1 //get location below pacman MOV r15 r14 JAL r6 FBpos_2_CPpos //get the position in frame buffer copy LOAD r0 r1 //load the glyph in frame buffer copy JAL r6 CPpos_2_FBpos //get the position in the frame buffer MOV r14 r15 STOR r0 r1 //store the glyph back in. RETX CLOSED_STATE_UP0: MOV r0 r1 LUI 0 r0 //load PACMAN_CLOSED_UP_0 ORI 212 r0 STOR r0 r1 ADDI -53 r1 //get location below pacman MOV r15 r14 JAL r6 FBpos_2_CPpos //get the position in frame buffer copy LOAD r0 r1 //load the glyph in frame buffer copy JAL r6 CPpos_2_FBpos //get the position in the frame buffer MOV r14 r15 STOR r0 r1 RETX //CHECK IF STATE UP1 drawUP1: LOAD R5 R3 CMPI 17 r5 BNE drawUP2 //else check if in state UP2 //CHECK CONDITION OF MOUTH //IF OPEN CMPI 1 R4 BNE CLOSED_STATE_UP1 //GET PACMAN_OPEN_6...GLYPH NUM 270 MOV r0 r1 MOVI 255 r0 ADDI 15 R0 //R1 SHOULD BE 270 NOW STOR R0 R1 //LOAD GLYPH INTO POSITION ADDI 53 R1 // GET POSITION ABOVE PACMAN //NOW NEED TO LOAD PACMAN_OPEN_UP5 //IT IS GLPYH NUM 269 MOVI 255 R0 ADDI 14 R0 STOR r0 r1 //STORE POSITION ABOVE PACMAN RETX CLOSED_STATE_UP1: //LOAD PACMAN_CLOSED_UP6 //IT'S GLYPH 218 MOVI 218 R1 STOR R1 R0 //LOAD INTO POSITION ADDI 53 R0 // GET POSITION ABOVE PACMAN //fixed this, was negative, needed positive //NOW NEED TO LOAD PMANCLOSED_UP_5 //IT'S GLYPH 217 MOVI 217 R1 STOR R1 R0 //LOAD INTO POSITION RETX //CHECK IF STATE UP2 drawUP2: LOAD R5 R3 CMPI 18 r5 BNE drawUP3 //else check if in state UP3 //CHECK CONDITION OF MOUTH //IF OPEN CMPI 1 R4 BNE CLOSED_STATE_UP2 //GET PMANOPEN_UP_4 //THIS IS GLYPH 268 MOVI 255 r1 ADDI 13 R1 //R1 SHOULD BE 268 NOW STOR R1 R0 //LOAD INTO POSITION ADDI 53 R0 // GET POSITION ABOVE PACMAN //NOW NEED TO LOAD PMANOPEN_Up_3 //ITS IN LOCATION 267 MOVI 255 R1 ADDI 12 R1 STOR r1 r0 //STORE POSITION ABOVE PACMAN RETX CLOSED_STATE_UP2: //LOAD PMANCLOSED_Up_4 //are these right? //IT'S GLYPH 216 MOVI 216 R1 STOR R1 R0 //LOAD INTO POSITION ADDI 53 R0 // GET POSITION ABOVE PACMAN //NOW NEED TO LOAD PMANCLOSED_Up_3 //IT'S GLYPH 215 MOVI 215 R1 ///wait what? STOR R1 R0 //LOAD INTO POSITION RETX //CHECK IF STATE UP3 drawUP3: LOAD R5 R3 CMPI 19 r5 BNE drawDOWN0 //else check if in state drawDOWN0 //CHECK CONDITION OF MOUTH //IF OPEN CMPI 1 R4 BNE CLOSED_STATE_UP3 //GET PMANOPEN_Up_1 //THIS IS GLYPH 265 MOVI 255 r1 ADDI 10 R1 //R1 SHOULD BE 265 NOW STOR R1 R0 //LOAD POSITION ADDI -53 R0 // GET POSITION BELOW PACMAN //NOW NEED TO PMANOPEN_Up_2 //ITS IN LOCATION 266 MOVI 255 R1 ADDI 11 R1 //R1 SHOULD BE 266 STOR r1 r0 //STORE POSITION BELOW PACMAN RETX CLOSED_STATE_UP3: //LOAD PMANCLOSED_Up_1 //IT'S GLYPH 213 MOVI 213 R1 //wait what? STOR R1 R0 //LOAD INTO POSITION ADDI -53 R0 // GET POSITION BELOW PACMAN //NOW NEED TO LOAD PMANCLOSED_Up_2 //IT'S GLYPH 266 MOVI 255 r1 ADDI 11 r1 //R1 should be 266 STOR r1 r0 //STORE POSITION BELOW PACMAN RETX //COPY AND PASTING FROM STATE 1 //CHECK IF STATE DOWN0 drawDOWN0: LOAD R5 R3 CMPI 32 r5 BNE drawDOWN1 //else check if in state UP1 //check the condition of the mouth //if open CMPI 1 R4 BNE CLOSED_STATE_DOWN0 //load PMANOPEN_DOWN_0 MOV r0 r1 //GLYPH 219 MOVI 219 R0 STOR r0 r1 ADDI 53 r1 //get location ABOVE pacman MOV r15 r14 JAL r6 FBpos_2_CPpos //get the position in frame buffer copy LOAD r0 r1 //load the glyph in frame buffer copy JAL r6 CPpos_2_FBpos //get the position in the frame buffer MOV r14 r15 STOR r0 r1 RETX CLOSED_STATE_DOWN0: MOV r0 r1 LUI 0 r0 //load PMANCLOSED_DOWN_0 // GLYPH 179 MOVI 179 R0 STOR r0 r1 ADDI 53 r1 //get location ABOVE pacman MOV r15 r14 JAL r6 FBpos_2_CPpos //get the position in frame buffer copy LOAD r0 r1 //load the glyph in frame buffer copy JAL r6 CPpos_2_FBpos //get the position in the frame buffer MOV r14 r15 STOR r0 r1 RETX //CHECK IF STATE DOWN1 drawDOWN1: LOAD R5 R3 CMPI 33 r5 BNE drawDOWN2 //else check if in state DOWN2 //CHECK CONDITION OF MOUTH //IF OPEN CMPI 1 R4 BNE CLOSED_STATE_DOWN1 //GET PMANOPEN_Down_1...in GLYPH 220 MOVI 220 r1 STOR R1 R0 //LOAD POSITION ADDI -53 R0 // GET POSITION BELOW PACMAN //NOW NEED TO LOAD PMANOPEN_Down_2 //ITS IN LOCATION 221 MOVI 221 R1 STOR r1 r0 //STORE POSITION BELOW PACMAN RETX CLOSED_STATE_DOWN1: //LOAD PMANCLOSED_Down_1 //IT'S GLYPH 180 MOVI 180 R1 STOR R1 R0 //LOAD INTO POSITION ADDI -53 R0 // GET POSITION BELOW PACMAN //NOW NEED TO LOAD PMANCLOSED_Down_2 //IT'S GLYPH 181 MOVI 181 R1 STOR R1 R0 //LOAD INTO POSITION RETX //CHECK IF STATE DOWN2 drawDOWN2: LOAD R5 R3 CMPI 34 r5 BNE drawDOWN3 //else check if in state DOWN2 //CHECK CONDITION OF MOUTH //IF OPEN CMPI 1 R4 BNE CLOSED_STATE_DOWN2 //GET PMANOPEN_DOWN_3 //THIS IS GLYPH 222 MOVI 222 r1 STOR R1 R0 //LOAD POSITION ADDI -53 R0 // GET POSITION BELOW PACMAN //NOW NEED TO LOAD PMANOPEN_Down_4 //ITS IN LOCATION 223 MOVI 223 R1 STOR r1 r0 //STORE POSITION ABOVE PACMAN RETX CLOSED_STATE_DOWN2: //LOAD PMANCLOSED_DOWN_3 //IT'S GLYPH 182 MOVI 182 R1 STOR R1 R0 //LOAD INTO POSITION ADDI -53 R0 // GET POSITION BELOW PACMAN //NOW NEED TO LOAD PMANCLOSE_Down_4 //IT'S GLYPH 183 MOVI 183 R1 STOR R1 R0 //LOAD INTO POSITION RETX //CHECK IF STATE DOWN3 drawDOWN3: LOAD R5 R3 CMPI 35 r5 BNE drawLEFT0 //else check if in state drawDOWN0 //CHECK CONDITION OF MOUTH //IF OPEN CMPI 1 R4 BNE CLOSED_STATE_DOWN3 //GET PMANOPEN_Down_6 //THIS IS GLYPH 225 MOVI 225 r1 STOR R1 R0 //LOAD POSITION ADDI 53 R0 // GET POSITION ABOVE PACMAN //NOW NEED TO PMANOPEN_Down_5 //ITS IN LOCATION 224 MOVI 224 R1 STOR r1 r0 //STORE POSITION ABOVE PACMAN RETX CLOSED_STATE_DOWN3: //LOAD PMANCLOSED_Down_6 //IT'S GLYPH 185 MOVI 185 R1 STOR R1 R0 //LOAD INTO POSITION ADDI 53 R0 // GET POSITION ABOVE PACMAN //NOW NEED TO LOAD PMANOPEN_Down_5 (SAME AS PMANCLOSED) //IT'S GLYPH 224 MOVI 224 R1 //is this right? i guess its same as pmanclosed? STOR r1 r0 //STORE POSITION ABOVE PACMAN RETX // COPY AND PASTED FROM DOWN STATES //CHECK IF STATE LEFT0 drawLEFT0: LOAD R5 R3 CMPI 48 r5 BNE drawLEFT1 //else check if in state LEFT1 //check the condition of the mouth //if open CMPI 1 R4 BNE CLOSED_STATE_LEFT0 //load PMANOPEN_LEFT_0 //GLYPH 226 MOV r0 r1 MOVI 226 R0 STOR r0 r1 ADDI -1 r1 //get location TO THE RIGHT MOV r15 r14 JAL r6 SetPosition_WarpRightSide JAL r6 FBpos_2_CPpos //get the position in frame buffer copy LOAD r0 r1 //load the glyph in frame buffer copy JAL r6 CPpos_2_FBpos //get the position in the frame buffer MOV r14 r15 STOR r0 r1 RETX CLOSED_STATE_LEFT0: MOV r0 r1 LUI 0 r0 //load PMANCLOSED_LEFT_0 // GLYPH 186 MOVI 186 R0 STOR r0 r1 ADDI -1 r1 //get location TO THE RIGHT MOV r15 r14 JAL r6 SetPosition_WarpRightSide JAL r6 FBpos_2_CPpos //get the position in frame buffer copy LOAD r0 r1 //load the glyph in frame buffer copy JAL r6 CPpos_2_FBpos //get the position in the frame buffer MOV r14 r15 STOR r0 r1 RETX //CHECK IF STATE LEFT1 drawLEFT1: LOAD R5 R3 CMPI 49 r5 BNE drawLEFT2 //else check if in state LEFT2 //CHECK CONDITION OF MOUTH //IF OPEN CMPI 1 R4 BNE CLOSED_STATE_LEFT1 //GET PMANOPEN_Left_6...in GLYPH 232 MOV r0 r1 MOVI 232 r0 STOR R0 R1 //LOAD POSITION ADDI 1 R1 //GET POSITION TO THE LEFT OF PACMAN MOV r15 r14 JAL r6 SetPosition_WarpLeftSide MOV r14 r15 //NOW NEED TO PMANOPEN_Left_5 //ITS IN LOCATION 231 MOVI 231 R0 STOR r0 r1 //STORE POSITION BELOW PACMAN RETX CLOSED_STATE_LEFT1: //LOAD PMANCLOSED_Left_6 //IT'S GLYPH 192 MOV r0 r1 MOVI 192 R0 STOR R0 R1 //LOAD INTO POSITION ADDI 1 R1 // GET POSITION TO THE LEFT OF PACMAN MOV r15 r14 JAL r6 SetPosition_WarpLeftSide MOV r14 r15 //NOW NEED TO LOAD PMANCLOSED_Left_5 //IT'S GLYPH 191 MOVI 191 R0 STOR R0 R1 //LOAD INTO POSITION RETX //CHECK IF STATE LEFT2 drawLEFT2: LOAD R5 R3 CMPI 50 r5 BNE drawLEFT3 //else check if in state LEFT2 //CHECK CONDITION OF MOUTH //IF OPEN CMPI 1 R4 BNE CLOSED_STATE_LEFT2 //GET PMANOPEN_Left_4 //THIS IS GLYPH 230 MOV R0 R1 MOVI 230 r0 STOR R0 R1 //LOAD POSITION ADDI 1 R1 // GET POSITION TO THE LEFT OF PACMAN MOV r15 r14 JAL r6 SetPosition_WarpLeftSide MOV r14 r15 //NOW NEED TO LOAD PMANOPEN_Left_3 //ITS IN LOCATION 229 MOVI 229 R0 STOR r0 r1 //STORE POSITION ABOVE PACMAN RETX CLOSED_STATE_LEFT2: //LOAD PMANCLOSED_Left_4 //IT'S GLYPH 190 MOV R0 R1 MOVI 190 R0 STOR R0 R1 //LOAD INTO POSITION ADDI 1 R1 // GET POSITION BELOW PACMAN MOV r15 r14 JAL r6 SetPosition_WarpLeftSide MOV r14 r15 //NOW NEED TO LOAD PMANCLOSED_Left_3 //IT'S GLYPH 189 MOVI 189 R0 STOR R0 R1 //LOAD INTO POSITION RETX //CHECK IF STATE LEFT3 drawLEFT3: LOAD R5 R3 CMPI 51 r5 BNE drawRIGHT0 //else check if in state drawRIGHT0 //CHECK CONDITION OF MOUTH //IF OPEN CMPI 1 R4 BNE CLOSED_STATE_LEFT3 //GET PMANOPEN_Left_1 //THIS IS GLYPH 227 MOV r0 r1 MOVI 227 r0 STOR R0 R1 //LOAD POSITION ADDI -1 R1 // GET POSITION TO THE RIGHT OF PACMAN MOV r15 r14 JAL r6 SetPosition_WarpRightSide MOV r14 r15 //NOW NEED TO PMANOPEN_Left_2 //ITS IN LOCATION 228 MOVI 228 R0 STOR r0 r1 //STORE POSITION ABOVE PACMAN RETX CLOSED_STATE_LEFT3: //LOAD PMANCLOSED_Left_1 //IT'S GLYPH 187 MOV r0 r1 MOVI 187 R0 STOR R0 R1 //LOAD INTO POSITION ADDI -1 R1 // GET POSITION TO THE RIGHT PACMAN MOV r15 r14 JAL r6 SetPosition_WarpRightSide MOV r14 r15 //NOW NEED TO LOAD PMANCLOSED_Left_2 (SAME AS PMANCLOSED) //IT'S GLYPH 188 MOVI 188 R0 STOR r0 r1 //STORE POSITION ABOVE PACMAN RETX // COPY AND PASTE FROM LEFT //CHECK IF STATE RIGHT0 drawRIGHT0: LOAD R5 R3 CMPI 64 r5 BNE drawRIGHT1 //else check if in state RIGHT1 //check the condition of the mouth //if open CMPI 1 R4 BNE CLOSED_STATE_RIGHT0 //load PMANOPEN_RIGHT_0 //GLYPH 245 MOV R0 R1 MOVI 245 R0 STOR r0 r1 ADDI 1 r1 //get location TO THE LEFT MOV r15 r14 JAL r6 SetPosition_WarpLeftSide JAL r6 FBpos_2_CPpos //get the position in frame buffer copy LOAD r0 r1 //load the glyph in frame buffer copy JAL r6 CPpos_2_FBpos //get the position in the frame buffer MOV r14 r15 STOR r0 r1 RETX CLOSED_STATE_RIGHT0: MOV R0 R1 LUI 0 r0 //load PMANCLOSED_RIGHT_0 // GLYPH 205 MOVI 205 R0 STOR r0 r1 ADDI 1 r1 //get location TO THE LEFT MOV r15 r14 JAL r6 SetPosition_WarpLeftSide JAL r6 FBpos_2_CPpos //get the position in frame buffer copy LOAD r0 r1 //load the glyph in frame buffer copy JAL r6 CPpos_2_FBpos //get the position in the frame buffer MOV r14 r15 STOR r0 r1 RETX //CHECK IF STATE RIGHT1 drawRIGHT1: LOAD R5 R3 CMPI 65 r5 BNE drawRIGHT2 //else check if in state RIGHT2 //CHECK CONDITION OF MOUTH //IF OPEN CMPI 1 R4 BNE CLOSED_STATE_RIGHT1 //GET PMANOPEN_Right_1...in GLYPH 246 MOV r0 r1 MOVI 246 r0 STOR R0 R1 //LOAD POSITION ADDI -1 R1 // GET POSITION TO THE RIGHT OF PACMAN MOV r15 r14 JAL r6 SetPosition_WarpRightSide MOV r14 r15 //NOW NEED TO PMANOPEN_Right_2 //ITS IN LOCATION 247 MOVI 247 R0 STOR r0 r1 //STORE POSITION BELOW PACMAN RETX CLOSED_STATE_RIGHT1: //LOAD PMANCLOSED_Right_1 //IT'S GLYPH 206 MOV r0 r1 MOVI 206 R0 STOR R0 R1 //LOAD INTO POSITION ADDI -1 R1 // GET POSITION TO THE RIGHT OF PACMAN MOV r15 r14 JAL r6 SetPosition_WarpRightSide MOV r14 r15 //NOW NEED TO LOAD PMANCLOSED_Right_2 //IT'S GLYPH 207 MOVI 207 R0 STOR R0 R1 //LOAD INTO POSITION RETX //CHECK IF STATE RIGHT2 drawRIGHT2: LOAD R5 R3 CMPI 66 r5 BNE drawRIGHT3 //else check if in state RIGHT2 //CHECK CONDITION OF MOUTH //IF OPEN CMPI 1 R4 BNE CLOSED_STATE_RIGHT2 //GET PMANOPEN_Right_3 //THIS IS GLYPH 248 MOV R0 R1 MOVI 248 r0 STOR R0 R1 //LOAD POSITION ADDI -1 R1 // GET POSITION TO THE RIGHT OF PACMAN MOV r15 r14 JAL r6 SetPosition_WarpRightSide MOV r14 r15 //NOW NEED TO LOAD PMANOPEN_Right_4 //ITS IN LOCATION 249 MOVI 249 R0 STOR R0 R1 //STORE POSITION ABOVE PACMAN RETX CLOSED_STATE_RIGHT2: //LOAD PMANCLOSED_Right_3 //IT'S GLYPH 208 MOV R0 R1 //swap registers so function to setposition_warpright call will work...... I hope.... MOVI 208 R0 STOR R0 R1 //LOAD INTO POSITION ADDI -1 R1 // GET POSITION TO THE RIGHT PACMAN MOV r15 r14 JAL r6 SetPosition_WarpRightSide MOV r14 r15 //NOW NEED TO LOAD PMANCLOSED_Right_4 //IT'S GLYPH 209 MOVI 209 R0 STOR R0 R1 //LOAD INTO POSITION RETX //CHECK IF STATE RIGHT3 drawRIGHT3: LOAD R5 R3 CMPI 67 r5 BNE drawDEAD1 //else check if in state drawRIGHT0 //CHECK CONDITION OF MOUTH //IF OPEN CMPI 1 R4 BNE CLOSED_STATE_RIGHT3 //GET PMANOPEN_Right_6 //THIS IS GLYPH 251 MOV r0 r1 MOVI 251 r0 STOR R0 R1 //LOAD POSITION ADDI 1 R1 // GET POSITION TO THE LEFT OF PACMAN MOV r15 r14 JAL r6 SetPosition_WarpLeftSide MOV r14 r15 //NOW NEED TO PMANOPEN_Right_5 //ITS IN LOCATION 250 MOVI 250 R0 STOR r0 r1 //STORE POSITION ABOVE PACMAN RETX CLOSED_STATE_RIGHT3: //LOAD PMANCLOSED_Right_6 //IT'S GLYPH 211 MOV r0 r1 MOVI 211 R0 STOR R0 R1 //LOAD INTO POSITION ADDI 1 R1 // GET POSITION TO THE LEFT PACMAN MOV r15 r14 JAL r6 SetPosition_WarpLeftSide MOV r14 r15 //NOW NEED TO LOAD PMANCLOSED_Right_5 (SAME AS PMANCLOSED) //IT'S GLYPH 210 MOVI 210 R0 STOR r0 r1 //STORE POSITION ABOVE PACMAN RETX //CHECK IF STATE DEAD 0 drawDEAD1: LOAD R5 R3 CMPI 1 R5 BNE drawDEAD2 //else check if in state RIGHT2 //LOAD PMANDEAD0 //ASSUMING GLYPH 448 MOV r0 r1 LUI 1 R0 ORI 192 RO STOR R0 R1 //LOAD INTO POSITION RETX drawDEAD2: LOAD R5 R3 CMPI 2 R5 BNE drawDEAD3 //LOAD PMANDEAD1 //ASSUMING GLYPH 449 MOV r0 r1 LUI 1 R0 ORI 193 RO STOR R0 R1 //LOAD INTO POSITION RETX drawDEAD3: LOAD R5 R3 CMPI 3 R5 BNE drawDEAD4 //LOAD PMANDEAD3 //ASSUMING GLYPH 450 MOV r0 r1 LUI 1 R0 ORI 194 RO STOR R0 R1 //LOAD INTO POSITION RETX drawDEAD4: LOAD R5 R3 CMPI 4 R5 BNE drawDEAD3 //LOAD PMANDEAD3 //ASSUMING GLYPH 451 MOV r0 r1 LUI 1 R0 ORI 195 RO STOR R0 R1 //LOAD INTO POSITION RETX RETX INIT_PACMAN: LUI 255 r0 //make timer reset address ORI 243 r0 LUI 4 r1 //set 512+256 miliseconds on timer //TIMER SET STOR r1 r0 //set pacman state to left0 LUI 51 r4 ORI 145 r4 MOVI 48 r1 STOR r1 r4 //set pacman initial mouth toggle to 1 LUI 51 r4 ORI 146 r4 MOVI 1 r1 STOR r1 r4 //set pacman mouth toggle timer LUI 255 r1 ORI 231 r1 MOVI 250 r2 STOR r2 r1 //store 250 ms on timer. //TIMER SET //put pacman on initial spot in map LUI 51 r4 ORI 144 r4 //store address in r4 LUI 63 r1 # make address for top corner in frame buffer ORI 255 r1 MOVI 53 r8 MULI -28 r8 ADD r8 r1 # Offset by rows ADDI -26 r1 # Offset by columns STOR R1 r4 //initialize lives left LUI 51 r4 //lives left addr ORI 244 r4 //lives left addr MOVI 4 r0 STOR r0 r4 MOV r15 r14 JAL r6 drawLivesLeft MOV r14 r15 RETX //CHECK_DIRECTION functions. Use only register r0 and ra for safety. This way when calling these functions, //only the r0 and ra registers must be preserved first if they are important. CheckRIGHT: LUI 255 r0 //make right address in r0 ORI 248 r0 LOAD r0 r0 //save result back into r0 RETX CheckLEFT: LUI 255 r0 //make address in r0 ORI 249 r0 LOAD r0 r0 //save result back into r0 RETX //return CheckUP: LUI 255 r0 ORI 251 r0 LOAD r0 r0 RETX CheckDOWN: LUI 255 r0 ORI 250 r0 LOAD r0 r0 RETX pacman_isWallUP: LUI 51 r0 //make address 13200 where pacman location is stored ORI 144 r0 LOAD r0 r0 //save result back into r0 ADDI 53 r0 //increment r0 to get location of square above pacman (53 adress spaces higher in memory) LOAD r0 r0 // LOAD glyph number MOVI 100 r9 MULI 8 r9 CMP r0 r9 SGE r0 // use Scond instruction to set r0 to 1 if r0 is greater or equal to 800, else 0 if not. RETX // return to calling function pacman_isWallDOWN: LUI 51 r0 //make address 13200 where pacman location is stored ORI 144 r0 LOAD r0 r0 //save result back into r0 ADDI -53 r0 //increment r0 to get location of square below pacman (53 adress spaces lower in memory) LOAD r0 r0 // LOAD glyph number MOVI 100 r9 MULI 8 r9 CMP r0 r9 SGE r0 // use Scond instruction to set r0 to 1 if r0 is greater or equal to 800, else 0 if not. RETX // return to calling function pacman_isWallLEFT: LUI 51 r0 //make address 13200 where pacman location is stored ORI 144 r0 LOAD r0 r0 //save result back into r0 ADDI 1 r0 //increment r0 to get location of square left of pacman (1 space higher in memory) LOAD r0 r0 // LOAD glyph number MOVI 100 r9 MULI 8 r9 CMP r0 r9 SGE r0 // use Scond instruction to set r0 to 1 if r0 is greater or equal to 800, else 0 if not. RETX // return to calling function pacman_isWallRIGHT: LUI 51 r0 //make address 13200 where pacman location is stored ORI 144 r0 LOAD r0 r0 //save result back into r0 ADDI -1 r0 //increment r0 to get location of square right of pacman (1 space lower in memory) LOAD r0 r0 MOVI 100 r9 MULI 8 r9 CMP r0 r9 SGE r0 // use Scond instruction to set r0 to 1 if r0 is greater or equal to 800, else 0 if not. RETX // return to calling function ///check the position passed in r1, sets r1 to equal r1 if not on warp, ///otherwise sets r1 to warped position. SetPosition_WarpLeftSide: LUI 63 r7 # make address for checking location ORI 255 r7 MOVI 53 r9 MULI -19 r9 ADD r9 r7 # Offset by rows ADDI -12 r7 # Offset by columns CMP r1 r7 BNE endWarpLeftSide ADDI -28 r7 MOV r7 r1 endWarpLeftSide: RETX SetPosition_WarpRightSide: LUI 63 r7 # make address for checking location ORI 255 r7 MOVI 53 r9 MULI -19 r9 ADD r9 r7 # Offset by rows ADDI -12 r7 ADDI -29 r7 # Offset by columns CMP r1 r7 BNE endWarpRightSide ADDI 28 r7 MOV r7 r1 endWarpRightSide: RETX FBpos_2_CPpos: LUI 14 r7 MULI -1 r7 ADD r7 r1 RETX CPpos_2_FBpos: LUI 14 r7 ADD r7 r1 RETX ///::::::::::::::::::END PACMAN STATE MACHINE:::::::::::::::::::::: ///::::::::::::::::::END PACMAN STATE MACHINE:::::::::::::::::::::: ///::::::::::::::::::END PACMAN STATE MACHINE:::::::::::::::::::::: ///::::::::::::::::::STATE MACHINE HELPERS FOR ALL MACHINES:::::::::::::::: // The following functions assume 'state address' has been moved to r0 //**actorUP** setStateUP0: MOVI 16 r1 STOR r1 r0 RETX setStateUP1: MOVI 17 r1 STOR r1 r0 RETX setStateUP2: MOVI 18 r1 STOR r1 r0 RETX setStateUP3: MOVI 19 r1 STOR r1 r0 RETX //**actorDOWN** setStateDOWN0: MOVI 32 r1 STOR r1 r0 RETX setStateDOWN1: MOVI 33 r1 STOR r1 r0 RETX setStateDOWN2: MOVI 34 r1 STOR r1 r0 RETX setStateDOWN3: MOVI 35 r1 STOR r1 r0 RETX //**actorLEFT** setStateLEFT0: MOVI 48 r1 STOR r1 r0 RETX setStateLEFT1: MOVI 49 r1 STOR r1 r0 RETX setStateLEFT2: MOVI 50 r1 STOR r1 r0 RETX setStateLEFT3: MOVI 51 r1 STOR r1 r0 RETX //**actorRIGHT** setStateRIGHT0: MOVI 64 r1 STOR r1 r0 RETX setStateRIGHT1: MOVI 65 r1 STOR r1 r0 RETX setStateRIGHT2: MOVI 66 r1 STOR r1 r0 RETX setStateRIGHT3: MOVI 67 r1 STOR r1 r0 RETX //**pacmanDEAD** setStateDEAD1: MOVI 1 r1 STOR r1 r0 RETX setStateDEAD2: MOVI 2 r1 STOR r1 r0 RETX setStateDEAD3: MOVI 3 r1 STOR r1 r0 RETX setStateDEAD4: MOVI 4 r1 STOR r1 r0 RETX /////:::::::::::END ALL STATE MACHINE LOGIC::::::::::::::::::////// /////HELPER FUNCTIONS FOR MAIN GAME LOGIC //// drawLivesLeft: LUI 63 r1 # make address for writting location in frame buffer ORI 255 r1 MOVI 53 r8 MULI -37 r8 ADD r8 r1 # Offset by rows ADDI -14 r1 # Offset by columns //zero out space where lives drawn MOVI 0 r0 // number of lives drawn MOVI 0 r2 // blank glyph livesClearLoop: CMPI 5 r0 BEQ endlivesClearLoop STOR r2 r1 ADDI -1 r1 ADDI 1 r0 BUC livesClearLoop endlivesClearLoop: ADDI 5 r1 //reset address LUI 51 r8 //lives left addr ORI 244 r8 //lives left addr LOAD r8 r8 MOVI 0 r0 MOVI 226 r2 //pman glyph livesLoop: CMP r0 r8 BEQ endlivesLoop STOR r2 r1 ADDI -1 r1 ADDI 1 r0 BUC livesLoop endlivesLoop: RETX initlevel: //Initialize pill remaining counter in gamestate by MOVIng 244 Pills left on board to addr 13301 LUI 51 r4 ORI 245 r4 MOVI 244 r0 STOR r0 r4 //initialize map in fb only. LUI 55 r0 // Make the address for where init function starts ORI 182 r0 // MOV r0 r3 // r3 current address of where we are reading from memory LUI 63 r1 # make address for writting location in frame buffer ORI 255 r1 MOVI 53 r8 MULI -5 r8 ADD r8 r1 # Offset by rows ADDI -13 r1 # Offset by columns MOVI 0 r6 loopi: CMPI 31 r6 BEQ endloopi #this should support labels, jump endloopi MOVI 0 r7 loopj: CMPI 28 r7 BEQ endloopj #jump to endloopj MOV r6 r4 MULI 53 r4 ADD r7 r4 MULI -1 r4 ADD r1 r4 LOAD r5 r3 STOR r5 r4 SUBI 1 r3 ADDI 1 r7 BUC loopj endloopj: ADDI 1 r6 BUC loopi endloopi: //make the copy of the map in memory in fbcp LUI 55 r0 // Make the address for where init function starts ORI 182 r0 // MOV r0 r3 // r3 current address of where we are reading from memory LUI 49 r1 # make address for writting location in frame buffer copy ORI 255 r1 MOVI 53 r8 MULI -5 r8 ADD r8 r1 # Offset by rows ADDI -13 r1 # Offset by columns MOVI 0 r6 loopi2: CMPI 31 r6 BEQ endloopi2 #this should support labels, jump endloopi MOVI 0 r7 loopj2: CMPI 28 r7 BEQ endloopj2 #jump to endloopj MOV r6 r4 MULI 53 r4 ADD r7 r4 MULI -1 r4 ADD r1 r4 LOAD r5 r3 STOR r5 r4 SUBI 1 r3 ADDI 1 r7 BUC loopj2 endloopj2: ADDI 1 r6 BUC loopi2 endloopi2: RETX //*************************************** //************Start Menu***************** //*************************************** // A(114) - Z(139) // !(140) // 0(169) - 9(178) start_menu: // zero out map MOV r15 r14 JAL r9 clear_screen MOV r14 r15 MOVI 0 r8 // zero out r8 for toggle return address LUI 63 r0 // top left most glyph address ORI 255 r0 ADDI -106 r0 ADDI -106 r0 ADDI -106 r0 ADDI -106 r0 // offset rows by 4 down ADDI -22 r0 // and 22 columns MOVI 129 r1 // Store 'P' STOR r1 r0 ADDI -1 r0 MOVI 114 r1 // Store 'A' STOR r1 r0 ADDI -1 r0 MOV r0 r10 // save this location to draw closed mouth too MOVI 245 r1 // Store 'pacman0' STOR r1 r0 ADDI -1 r0 MOVI 126 r1 // Store 'M' STOR r1 r0 ADDI -1 r0 MOVI 114 r1 // Store 'A' STOR r1 r0 ADDI -1 r0 MOVI 127 r1 // Store 'N' STOR r1 r0 ADDI -1 r0 MOVI 0 r1 // Store ' ' STOR r1 r0 ADDI -1 r0 MOVI 171 r1 // Store '2' STOR r1 r0 ADDI -1 r0 LUI 1 r1 // Store 'pill' ORI 15 r1 STOR r1 r0 ADDI -1 r0 MOVI 169 r1 // Store '0' STOR r1 r0 ADDI 6 r0 ADDI -106 r0 ADDI -106 r0 ADDI -106 r0 ADDI -106 r0 // offset rows by 4 down MOVI 129 r1 // Store 'P' STOR r1 r0 ADDI -1 r0 MOVI 131 r1 // Store 'R' STOR r1 r0 ADDI -1 r0 MOVI 118 r1 // Store 'E' STOR r1 r0 ADDI -1 r0 MOVI 132 r1 // Store 'S' STOR r1 r0 ADDI -1 r0 MOVI 132 r1 // Store 'S' STOR r1 r0 ADDI 6 r0 ADDI -106 r0 ADDI -106 r0 ADDI -106 r0 ADDI -106 r0 MOVI 133 r1 // Store 'T' STOR r1 r0 ADDI -1 r0 MOVI 128 r1 // Store 'O' STOR r1 r0 ADDI -1 r0 MOVI 0 r1 // Store ' ' STOR r1 r0 ADDI -1 r0 MOVI 115 r1 // Store 'B' STOR r1 r0 ADDI -1 r0 MOVI 118 r1 // Store 'E' STOR r1 r0 ADDI -1 r0 MOVI 120 r1 // Store 'G' STOR r1 r0 ADDI -1 r0 MOVI 122 r1 // Store 'I' STOR r1 r0 ADDI -1 r0 MOVI 127 r1 // Store 'N' STOR r1 r0 ADDI 5 r0 ADDI 106 r0 ADDI 106 r0 LUI 255 r4 // start timer ORI 231 r4 MOVI 250 r5 // .5 seconds (500 milliseconds) ADDI 125 r5 ADDI 125 r5 STOR r5 r4 BUC flash_start dead_menu: // zero out map MOV r15 r14 JAL r9 clear_screen MOV r14 r15 MOVI 0 r8 // zero out r8 for toggle return address LUI 63 r0 // top left most glyph address ORI 255 r0 ADDI -106 r0 ADDI -106 r0 ADDI -106 r0 ADDI -106 r0 // offset rows by 4 down ADDI -22 r0 // and 22 columns MOVI 120 r1 // Store 'G' STOR r1 r0 ADDI -1 r0 MOVI 114 r1 // Store 'A' STOR r1 r0 ADDI -1 r0 MOV r0 r10 // save this location to draw closed mouth too MOVI 126 r1 // Store 'M' STOR r1 r0 ADDI -1 r0 MOVI 118 r1 // Store 'E' STOR r1 r0 ADDI -1 r0 MOVI 0 r1 // Store ' ' STOR r1 r0 ADDI -1 r0 MOV r0 r10 // save this location to draw closed mouth too MOVI 245 r1 // Store 'pacman0' STOR r1 r0 ADDI -1 r0 MOVI 135 r1 // Store 'V' STOR r1 r0 ADDI -1 r0 MOVI 118 r1 // Store 'E' STOR r1 r0 ADDI -1 r0 MOVI 131 r1 // Store 'R' STOR r1 r0 ADDI -1 r0 MOVI 140 r1 // Store '!' STOR r1 r0 ADDI 6 r0 ADDI -106 r0 ADDI -106 r0 ADDI -106 r0 ADDI -106 r0 // offset rows by 4 down MOVI 129 r1 // Store 'P' STOR r1 r0 ADDI -1 r0 MOVI 131 r1 // Store 'R' STOR r1 r0 ADDI -1 r0 MOVI 118 r1 // Store 'E' STOR r1 r0 ADDI -1 r0 MOVI 132 r1 // Store 'S' STOR r1 r0 ADDI -1 r0 MOVI 132 r1 // Store 'S' STOR r1 r0 ADDI 6 r0 ADDI -106 r0 ADDI -106 r0 ADDI -106 r0 ADDI -106 r0 MOVI 133 r1 // Store 'T' STOR r1 r0 ADDI -1 r0 MOVI 128 r1 // Store 'O' STOR r1 r0 ADDI -1 r0 MOVI 0 r1 // Store ' ' STOR r1 r0 ADDI -1 r0 MOVI 115 r1 // Store 'B' STOR r1 r0 ADDI -1 r0 MOVI 118 r1 // Store 'E' STOR r1 r0 ADDI -1 r0 MOVI 120 r1 // Store 'G' STOR r1 r0 ADDI -1 r0 MOVI 122 r1 // Store 'I' STOR r1 r0 ADDI -1 r0 MOVI 127 r1 // Store 'N' STOR r1 r0 ADDI 5 r0 ADDI 106 r0 ADDI 106 r0 LUI 255 r4 // start timer ORI 231 r4 MOVI 250 r5 // .5 seconds (500 milliseconds) ADDI 125 r5 ADDI 125 r5 STOR r5 r4 BUC flash_start flash_start: MOV r0 r7 //check if start button has been pressed on NES controller MOV r15 r14 JAL r9 Homescreencheckstart MOV r14 r15 LUI 255 r3 // calculate timer return value address ORI 230 r3 LOAD r3 r3 // load timer rv into r3 CMPI 1 r3 BNE choose_draw MOV r15 r14 JAL r9 toggle MOV r14 r15 choose_draw: // choose whether to draw 'start' or 'blank' CMPI 1 r8 BNE draw_blank draw_start: MOVI 205 r1 // Draw closed pacmanRIGHT0 STOR r1 r10 MOVI 132 r1 // Store 'S' STOR r1 r7 ADDI -1 r7 MOVI 133 r1 // Store 'T' STOR r1 r7 ADDI -1 r7 MOVI 114 r1 // Store 'A' STOR r1 r7 ADDI -1 r7 MOVI 131 r1 // Store 'R' STOR r1 r7 ADDI -1 r7 MOVI 133 r1 // Store 'T' STOR r1 r7 JUC r9 flash_start draw_blank: MOVI 245 r1 STOR r1 r10 MOVI 0 r1 // otherwise draw nothing STOR r1 r7 ADDI -1 r7 MOVI 0 r1 STOR r1 r7 ADDI -1 r7 MOVI 0 r1 STOR r1 r7 ADDI -1 r7 MOVI 0 r1 STOR r1 r7 ADDI -1 r7 MOVI 0 r1 STOR r1 r7 JUC r9 flash_start toggle: XORI 1 r8 // toggle rv LUI 255 r4 // reset timer ORI 231 r4 LUI 2 r5 // really close to 500, maybe 512 STOR r5 r4 RETX Homescreencheckstart: MOVI 0 r2 // Check 'START' LUI 255 r2 ORI 252 r2 LOAD r2 r2 CMPI 1 r2 JEQ r9 start_Game // if start asserted, start game RETX clear_screen: MOV r2 r10 //save this register MOV r3 r11 // save this register MOVI 0 r0 // zero-out temp LUI 63 r2 // create glyph address ORI 255 r2 LUI 8 r3 // create counter constraint of 2120 (# of glyphs) ORI 72 r3 MOVI 0 r1 // glyph 0 to be drawn clearscreenloop: STOR r1 r2 // draw glyph ADDI -1 r2 // decrement address pointer ADDI 1 r0 // increment counter CMP r0 r3 // check counter <= 2120 BLT clearscreenloop MOV r10 r2 // else restore the reg's MOV r11 r3 RETX //*** end start menu**///
24.700445
129
0.669355
ac50c624d78fb4ee2a5f69d612b8ed23f4b9edb4
179
asm
Assembly
test/imm64.asm
ystk/debian-nasm
aeb5ae6e38f73788ef70a2b41c384dd7503bce66
[ "BSD-2-Clause" ]
null
null
null
test/imm64.asm
ystk/debian-nasm
aeb5ae6e38f73788ef70a2b41c384dd7503bce66
[ "BSD-2-Clause" ]
null
null
null
test/imm64.asm
ystk/debian-nasm
aeb5ae6e38f73788ef70a2b41c384dd7503bce66
[ "BSD-2-Clause" ]
null
null
null
bits 64 mov rax,11223344h mov rax,dword 11223344h mov eax,11223344h mov [rax],dword 11223344h ; 32-bit operation mov qword [rax],11223344h mov qword [rax],dword 11223344h
22.375
46
0.75419
e4e0533f744d5634faa192801146b32f735b2e99
10,198
asm
Assembly
C5515_Support_Files/C5515_Lib/dsplib_2.40.00/55x_src/craw.asm
HeroSizy/Sizy
89bc29940dc7666591259730b5112efd0a626043
[ "Unlicense" ]
null
null
null
C5515_Support_Files/C5515_Lib/dsplib_2.40.00/55x_src/craw.asm
HeroSizy/Sizy
89bc29940dc7666591259730b5112efd0a626043
[ "Unlicense" ]
null
null
null
C5515_Support_Files/C5515_Lib/dsplib_2.40.00/55x_src/craw.asm
HeroSizy/Sizy
89bc29940dc7666591259730b5112efd0a626043
[ "Unlicense" ]
null
null
null
;*********************************************************** ; Version 2.40.00 ;*********************************************************** ; Note: a symbol "SI_BUGS" is used to make a work around for silicon ; 5510 version1.0. If you are going to use the code on 5510 version1.0 ; silicon, you have to put switch -d"SI_BUGS" when you compile the code. ;**************************************************************** ; Function: corr_raw ; Processor: C55xx ; Description: raw full length correlation of two vectors ; ; ; Usage: ushort corr_raw(DATA *x, DATA *r, ushort nx, ushort nr) ; ; Copyright Texas instruments Inc, 2000 ; History: ; - Modified save and restore AR5/AR6/AR7 to XAR5/XAR6/XAR7 registers. ; Li Yuan - 08/14/01 ; ; - Added overflow checking and overflow is returned in T0 instead of ; AC0 register ; Zhengting He - 10/25/2006 ;**************************************************************** .ARMS_off ;enable assembler for ARMS=0 .CPL_on ;enable assembler for CPL=1 .mmregs ;enable mem mapped register names .global _corr_raw .text _corr_raw ; Stack frame ; ----------- RET_ADDR_SZ .set 1 ;return address REG_SAVE_SZ .set 6 ;save-on-entry registers saved FRAME_SZ .set 2 ;local variables ARG_BLK_SZ .set 0 ;argument block ; Register usage ; -------------- PARAM_OFFSET .set FRAME_SZ + REG_SAVE_SZ .asg "0 + FRAME_SZ", SAVE_AR6 .asg "2 + FRAME_SZ", SAVE_AR7 .asg "4 + FRAME_SZ", SAVE_AR5 .asg 0 + REG_SAVE_SZ + FRAME_SZ, RETURN_ADDR .asg 0, y_orig .asg AR0, x_ptr .asg XAR0, Xx_ptr .asg AR1, y_ptr .asg XAR1, Xy_ptr .asg AR2, r_ptr .asg AR3, mac_cnt .asg AR4, x_save .asg XAR4, Xx_save .asg AR6, x2_save .asg XAR6, Xx2_save .asg AR5, y_save .asg XAR5, Xy_save .asg AR7, region1_and_3_loop_cnt .asg T0, nx .asg T1, ny .asg AC2, odd .asg AC1, B .asg AC0, A ; .asg AC0, oflag ;returned value .asg T0, oflag ; for C55, return value in T0, c54 in AC0 ; ; Allocate the local frame and argument block( +1 is for dbl alignment) ;---------------------------------------------------------------- PSH mmap(ST0_55) PSH mmap(ST1_55) PSH mmap(ST2_55) PSH mmap(ST3_55) AADD #-(ARG_BLK_SZ + FRAME_SZ + REG_SAVE_SZ +1), SP ; ; Save any save-on-entry registers that are used ; Configure the status registers as needed. ;---------------------------------------------------------------- MOV XAR5, dbl(*SP(#(SAVE_AR5))) ; PSHM XAR5 || BSET #ST1_SXMD, ST1_55 MOV XAR6, dbl(*SP(#(SAVE_AR6))) ; PSHM XAR6 || BSET #ST1_FRCT, ST1_55 MOV XAR7, dbl(*SP(#(SAVE_AR7))) ; PSHM XAR7 ;---------- X pointer setup ; x_ptr - X pointer as passed ; x_save - X+nx ; x2_save - X MOV Xx_ptr, Xx2_save ; MOV Xx_ptr, Xx_save ; MOV x_ptr, A ADD nx, A MOV A, x_save ;---------- Y pointer setup ; y_ptr - Y pointer as passed ; y_orig - Unchainged original Y pointer MOV Xy_ptr, Xy_save MOV Xy_ptr ,dbl(*sp(#(y_orig))) ; Initialize MAC cnt for regions 1 & 3, these will be ; calculated in one loop, since the number of elements is the ; same in each region. ;---------------------------------------------------------------- MOV nx, B SUB #4, B ; region1_and_3_loop_cnt = B MOV B, region1_and_3_loop_cnt SUB #1, x_save ; ---- ODD detection ---- ; Due to the Dual MAC, we need to know if the region 1 and region 3 ; are odd or even in length. If the number is odd, then we will need ; to do an extra MAC outside of the loop. ; TC1 = bit(region1_and_3_loop_cnt, @#0) ; Test to see if the LSB ; of NR is set. If it is, ; then we have an odd number BTST @#0, region1_and_3_loop_cnt, TC1 ; If !#0 (even), then we actually have an odd number of MAC's to ; do! MOV #0, odd ; if (!TC1) execute(D_unit) .if $isdefed("SI_BUGS") XCC temp000529, !TC1 .else XCCPART temp000529, !TC1 .endif MOV #-1, odd ; Setup the odd flag for later use temp000529: ; Begin Region 1: ;---------------------------------------------------------------- REGION1: MOV Xy_save, Xy_ptr MOV Xx_save, Xx_ptr ; For the dual MAC, we need to divide by two followed ; by a subsequent subtraction by 1 only if we have and odd number ; of MAC's to do. ; region1_and_3_loop_cnt = region1_and_3_loop_cnt >> #1; SFTL region1_and_3_loop_cnt, #-1 ; if (odd<#0) execute(d_unit) .if $isdefed("SI_BUGS") XCC temp000529b, odd < #0 .else XCCPART temp000529b, odd < #0 .endif SUB #1, region1_and_3_loop_cnt temp000529b: MOV region1_and_3_loop_cnt, BRC0 MOV #0, mac_cnt ; 2 cycles ; Calculate first couple of elements outside of the loop ; ---- 1 ----- MPYMR *x_ptr, *y_ptr+, A MOV HI(A), *r_ptr+ ; ---- 2 and Pointer stuff ---- MPYM *x_ptr-, *y_ptr-, A || ADD #2, y_save MACMR *x_ptr, *y_ptr, A, A MOV Xx_save, XCDP MOV Xy_save, Xx_ptr MOV Xx_ptr, Xy_ptr ADD #1, x_ptr, y_ptr ; Setup the secondary point in case ; we enter the Dual MAC MOV HI(A), *r_ptr+ ;If there is an even number, skip the extra MAC BCC REGION1_LOOP, odd == #0 ; ---- 3 ----- REGION1_extra_mac: MPYM *x_ptr-, *CDP-, A || ADD #1, y_save MACM *x_ptr-, *CDP-, A MACMR *x_ptr-, *CDP-, A || MOV x_save, CDP MOV Xy_save, Xx_ptr MOV Xx_ptr, Xy_ptr ADD #1, x_ptr, y_ptr ADD #1, mac_cnt MOV mac_cnt, CSR MOV HI(A), *r_ptr+ REGION1_LOOP: RPTBLOCAL endlocal1 ADD #2, y_save ; ---- Preload A ---- MPY *x_ptr-, *CDP-, B :: MPY *y_ptr-, *CDP-, A ; ---- Main Dual MAC loop ---- RPTADD CSR, #2 MAC *x_ptr-, *CDP-, B :: MAC *y_ptr-, *CDP-, A ; ---- Cleanup MAC ---- MACMR *x_ptr, *CDP, B MACM *y_ptr-, *CDP-, A MACMR *y_ptr-, *CDP-, A ; ---- Reload Pointers ---- MOV Xx_save, XCDP MOV Xy_save, Xx_ptr MOV Xx_ptr, Xy_ptr ADD #1, x_ptr, y_ptr ; ---- Store ---- MOV HI(B), *r_ptr+ endlocal1: MOV HI(A), *r_ptr+ ; ---- Reload Pointers ---- MOV dbl(*sp(#(y_orig))), Xy_save MOV Xx2_save, Xx_save ; ; Begin Loop for Region 2: ;---------------------------------------------------------------- REGION2: MOV ny, A SUB nx, A MOV A, DR3 MOV DR3, BRC0 MOV nx, mac_cnt MOV Xx_save, Xx_ptr SUB #3, mac_cnt MOV Xy_save, Xy_ptr REGION2_LOOP: MOV mac_cnt, CSR RPTBLOCAL localend2 ; ---- Setup pointers ---- ADD #1, y_save ; ---- Preload A ---- MPYM *x_ptr+, *y_ptr+, A ; ---- Main MAC loop ---- ; MOV mac_cnt, CSR ; moved out of loop for reduce cycle RPT CSR MACM *x_ptr+, *y_ptr+, A, A ; ---- Cleanup ---- MACMR *x_ptr+, *y_ptr+, A, A ; ---- Setup for subsequent passes through Region 2 ---- MOV Xx_save, Xx_ptr MOV Xy_save, Xy_ptr ; ---- Store ---- localend2: MOV HI(A), *r_ptr+ ; ; Begin REGION3 loop: ;---------------------------------------------------------------- REGION3: MOV region1_and_3_loop_cnt, BRC0 MOV Xx_save, XCDP MOV Xy_save, Xx_ptr MOV Xx_ptr, Xy_ptr ADD #1, x_ptr, y_ptr ; We are re-loading mac_cnt to remove the dependency ; from the region 2 setup code MOV nx, mac_cnt SUB #5, mac_cnt MOV mac_cnt, CSR REGION3_LOOP: RPTBLOCAL localend3 ADD #2, y_save ; ---- Preload A ---- MPY *x_ptr+, *CDP+, B :: MPY *y_ptr+, *CDP+, A ; ---- Main Dual MAC loop ---- RPTSUB CSR, #2 MAC *x_ptr+, *CDP+, B :: MAC *y_ptr+, *CDP+, A ; ---- Cleanup MAC ---- MACMR *y_ptr, *CDP, A MACM *x_ptr+, *CDP+, B MACMR *x_ptr, *CDP, B ; ---- Reload Pointers ---- MOV Xx_save, XCDP MOV Xy_save, Xx_ptr MOV Xx_ptr, Xy_ptr ADD #1, x_ptr, y_ptr ; ---- Store ---- MOV HI(B), *r_ptr+ localend3: MOV HI(A), *r_ptr+ ; ; Calculate last correlation elements outside of loop ;---------------------------------------------------------------- BCC REGION3_FINAL, odd == #0 ; ---- 3 ----- MPYM *x_ptr+, *CDP+, A || ADD #1, y_save MACM *x_ptr+, *CDP+, A MACMR *x_ptr, *CDP, A MOV Xx_save, XCDP MOV Xy_save, Xx_ptr MOV HI(A), *r_ptr+ ; ---- 2 ----- REGION3_FINAL: MPYM *x_ptr+, *CDP+, A MACMR *x_ptr, *CDP-, A MOV HI(A), *r_ptr+ ; ---- 1 ----- MPYM *x_ptr, *CDP, A MOV HI(A), *r_ptr+ ; ; Check if overflow occurred, and setup return value ;---------------------------------------------------------------- MOV #0, oflag .if $isdefed("SI_BUGS") XCC dummy1, overflow(A) .else XCCPART dummy1, overflow(A) .endif ; dummy1: MOV #1, A ; bug! put in oflag dummy1: MOV #1, oflag ; .if $isdefed("SI_BUGS") XCC dummy2, overflow(B) .else XCCPART dummy2, overflow(B) .endif ; dummy1: MOV #1, A ; bug! put in oflag dummy2: MOV #1, oflag ; Restore status regs to expected C-convention values as needed ; Restore any save-on-entry registers that are used ;---------------------------------------------------------------- MOV dbl(*SP(#(SAVE_AR7))), XAR7 ; POPM AR7 || BCLR #ST1_SATD, ST1_55 MOV dbl(*SP(#(SAVE_AR6))), XAR6 ; POPM AR6 || BCLR SATA MOV dbl(*SP(#(SAVE_AR5))), XAR5 ; POPM AR5 || BCLR #ST1_FRCT, ST1_55 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; Deallocate the local frame and argument block ;---------------------------------------------------------------- AADD #(ARG_BLK_SZ + FRAME_SZ + REG_SAVE_SZ +1), SP POP mmap(ST3_55) POP mmap(ST2_55) POP mmap(ST1_55) POP mmap(ST0_55) ; ; Return to calling function ;---------------------------------------------------------------- return ; RETD ;---------------------------------------------------------------- ;End of file
26.215938
73
0.516376
8ea34c16680e80d12e6595e2f21cce0b2aac0bda
368
asm
Assembly
programs/oeis/098/A098971.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/098/A098971.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/098/A098971.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A098971: a(0)=1; for n > 0, a(n)=a(floor(n/2))+2*a(floor(n/4)). ; 1,3,5,5,11,11,11,11,21,21,21,21,21,21,21,21,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85,171,171,171,171,171 mul $0,2 add $0,1 log $0,2 mov $1,2 pow $1,$0 div $1,2 mul $1,4 div $1,3 mul $1,2 add $1,1
26.285714
209
0.605978
39efd9e19b2fd65fd3b9a97acea58398b2191f4c
308
asm
Assembly
programs/oeis/301/A301647.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/301/A301647.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/301/A301647.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A301647: a(n) = n^3 - (n mod 2). ; 0,8,26,64,124,216,342,512,728,1000,1330,1728,2196,2744,3374,4096,4912,5832,6858,8000,9260,10648,12166,13824,15624,17576,19682,21952,24388,27000,29790,32768,35936,39304,42874,46656,50652,54872,59318,64000,68920,74088,79506,85184,91124 add $0,1 pow $0,3 div $0,2 mul $0,2
38.5
235
0.730519
b6d4ededfb011cde7e56e54e88742c9d4159365b
376
asm
Assembly
libsrc/target/zx81/chroma81/zx_aaddrcright.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/target/zx81/chroma81/zx_aaddrcright.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
1,600
2017-01-15T16:12:02.000Z
2022-03-31T12:11:12.000Z
libsrc/target/zx81/chroma81/zx_aaddrcright.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
215
2017-01-17T10:43:03.000Z
2022-03-23T17:25:02.000Z
; uchar __FASTCALL__ *zx_aaddrcright(void *attraddr) ; Stefano, 2014.12 SECTION code_clib PUBLIC zx_aaddrcright PUBLIC _zx_aaddrcright EXTERN HRG_LineStart .zx_aaddrcright ._zx_aaddrcright ; hl = valid attribute address ; hl = new attribute address right one character with line wrap ; TODO: carry if off screen inc hl ; ld a,$5a ; cp h ret
17.904762
66
0.718085
f899c70452d722c8c5c42f40c4513e6bfb80aedd
6,405
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca.log_21829_1806.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca.log_21829_1806.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca.log_21829_1806.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 %r13 push %r14 push %r8 push %r9 push %rbx push %rsi lea addresses_A_ht+0x1a24d, %rbx nop nop add $604, %r9 mov $0x6162636465666768, %r13 movq %r13, %xmm5 vmovups %ymm5, (%rbx) nop cmp %r12, %r12 lea addresses_D_ht+0xe179, %rsi clflush (%rsi) nop nop add %r8, %r8 movb (%rsi), %r14b sub %r12, %r12 pop %rsi pop %rbx pop %r9 pop %r8 pop %r14 pop %r13 pop %r12 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r12 push %r9 push %rax push %rbp push %rdx // Store mov $0x449, %r9 nop nop nop nop and $12157, %rdx mov $0x5152535455565758, %rax movq %rax, %xmm7 movups %xmm7, (%r9) nop nop xor %r9, %r9 // Store lea addresses_WC+0x1ca49, %r12 nop nop nop nop inc %r11 mov $0x5152535455565758, %r9 movq %r9, %xmm7 movups %xmm7, (%r12) nop nop nop nop nop sub %rax, %rax // Store lea addresses_RW+0x8261, %r12 nop cmp $57417, %r9 movb $0x51, (%r12) nop nop add $22286, %rbp // Store lea addresses_WT+0x76f2, %r12 nop nop nop nop and $3885, %r10 mov $0x5152535455565758, %rbp movq %rbp, %xmm4 vmovups %ymm4, (%r12) nop nop nop nop cmp $44278, %rbp // Store lea addresses_WT+0x1e0a9, %r11 and $22592, %r12 movb $0x51, (%r11) and $48604, %r10 // Store lea addresses_RW+0x13f79, %r12 nop nop nop cmp %rax, %rax mov $0x5152535455565758, %rdx movq %rdx, %xmm2 vmovups %ymm2, (%r12) nop nop xor %rbp, %rbp // Store mov $0x5856710000000bc9, %r11 and $61484, %rax mov $0x5152535455565758, %r9 movq %r9, %xmm7 movntdq %xmm7, (%r11) nop nop nop nop add $27799, %r9 // Store lea addresses_RW+0x2e29, %r9 nop nop inc %r11 movw $0x5152, (%r9) nop nop xor $20896, %r11 // Faulty Load lea addresses_RW+0x1b849, %rax nop inc %r11 movb (%rax), %r12b lea oracles, %rdx and $0xff, %r12 shlq $12, %r12 mov (%rdx,%r12,1), %r12 pop %rdx pop %rbp pop %rax pop %r9 pop %r12 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'size': 2, 'NT': False, 'type': 'addresses_RW', 'same': False, 'AVXalign': False, 'congruent': 0}} {'OP': 'STOR', 'dst': {'size': 16, 'NT': False, 'type': 'addresses_P', 'same': False, 'AVXalign': False, 'congruent': 9}} {'OP': 'STOR', 'dst': {'size': 16, 'NT': False, 'type': 'addresses_WC', 'same': False, 'AVXalign': False, 'congruent': 9}} {'OP': 'STOR', 'dst': {'size': 1, 'NT': False, 'type': 'addresses_RW', 'same': False, 'AVXalign': False, 'congruent': 3}} {'OP': 'STOR', 'dst': {'size': 32, 'NT': False, 'type': 'addresses_WT', 'same': False, 'AVXalign': False, 'congruent': 0}} {'OP': 'STOR', 'dst': {'size': 1, 'NT': False, 'type': 'addresses_WT', 'same': False, 'AVXalign': False, 'congruent': 1}} {'OP': 'STOR', 'dst': {'size': 32, 'NT': False, 'type': 'addresses_RW', 'same': False, 'AVXalign': False, 'congruent': 2}} {'OP': 'STOR', 'dst': {'size': 16, 'NT': True, 'type': 'addresses_NC', 'same': False, 'AVXalign': False, 'congruent': 4}} {'OP': 'STOR', 'dst': {'size': 2, 'NT': False, 'type': 'addresses_RW', 'same': False, 'AVXalign': False, 'congruent': 4}} [Faulty Load] {'OP': 'LOAD', 'src': {'size': 1, 'NT': False, 'type': 'addresses_RW', 'same': True, 'AVXalign': False, 'congruent': 0}} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'size': 32, 'NT': False, 'type': 'addresses_A_ht', 'same': False, 'AVXalign': False, 'congruent': 1}} {'OP': 'LOAD', 'src': {'size': 1, 'NT': True, 'type': 'addresses_D_ht', 'same': False, 'AVXalign': False, 'congruent': 4}} {'32': 21829} 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 */
35.583333
2,999
0.651678
3a85aae6174b43a03ad8ac1304cec44d320becf3
656
asm
Assembly
programs/oeis/166/A166677.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/166/A166677.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/166/A166677.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A166677: a(n)= n*(a(n-1)+4), a(0)=1. ; 1,5,18,66,280,1420,8544,59836,478720,4308516,43085200,473937244,5687246976,73934210740,1035078950416,15526184256300,248418948100864,4223122117714756,76016198118865680,1444307764258447996,28886155285168960000,606609260988548160084,13345403741748059521936,306944286060205369004620,7366662865444928856110976,184166571636123221402774500,4788330862539203756472137104,129284933288558501424747701916,3619978132079638039892935653760,104979365830309503156895133959156,3149380974909285094706854018774800,97630810222187837935912474582018924 mov $1,1 mov $2,1 lpb $0 sub $0,1 add $1,4 mul $1,$2 add $2,1 lpe mov $0,$1
50.461538
531
0.849085
1a462922c15c1c117b6388b20266fadc3e3f5411
251
asm
Assembly
oeis/272/A272688.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/272/A272688.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/272/A272688.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A272688: The antibracket constants {x_n}^n. ; Submitted by Christian Krause ; 1,1,6,72,1120,21600,498960,13453440,415134720,14435366400 mov $1,1 lpb $0 max $1,$3 add $3,$1 mul $3,$0 sub $0,1 add $2,1 mul $1,$2 add $3,$1 lpe mov $0,$1
15.6875
59
0.63745
de1f0806d671db5f0f0736d7fa87537465b9ad4a
1,650
asm
Assembly
duel-chat.asm
LeifBloomquist/ArtilleryDuel
7f42f069284ba6067136c29e2ade80d3ac9b5583
[ "MIT" ]
1
2015-06-01T08:53:18.000Z
2015-06-01T08:53:18.000Z
duel-chat.asm
LeifBloomquist/ArtilleryDuel
7f42f069284ba6067136c29e2ade80d3ac9b5583
[ "MIT" ]
null
null
null
duel-chat.asm
LeifBloomquist/ArtilleryDuel
7f42f069284ba6067136c29e2ade80d3ac9b5583
[ "MIT" ]
null
null
null
; duel-chat.asm ; Weather War III Packet Chat routines ; ============================================================== ; Display contents of a chat packet. ; Moved to main game thread. No longer in IRQ. ; ============================================================== SHOWCHATMSG ;First, check for a zero-length chat message. Ignore if it is. lda INPACKET+$2D ;First byte of message text bne CHATOK jmp SHOWCHATMSG_x CHATOK ;Clear the bottom of the screen. PLOT 0,24 PRINT " " ;Force a zero-termination, no matter what lda #$00 sta INPACKET+$2D+$27 ;39 decimal ;Print the message PLOT 0,24 PRINT CG_YEL PRINTSTRING (INPACKET+$2D) ; Ping sound jsr SOUND_CHAT SHOWCHATMSG_x ; Clear the packet flags. lda #$00 sta PACKET_RECEIVED sta CHAT_RECEIVED rts ; ============================================================== ; Chat Input - in main game thread. ; ============================================================== CHATINPUT PLOT 0,24 PRINT " " PLOT 0,24 PRINT 158 ; Yellow ;Clear chat text buffer lda #$00 ldx #$27 clearchat1 sta CHATTEXT,x dex bne clearchat1 lda #$00 sta $cc ; Force cursor to flash sta JOYOK ; Turn off joystick input jsr FILTERED_TEXT ; Could check carry for run-stop sty CHATPACKET+2 ; Length returned in y lda #$01 sta $cc ; Turn off cursor flashing jsr SENDCHAT ;Send the message and wait for ack ; Ping sound jsr SOUND_CHAT PLOT 0,24 PRINT " " rts
21.153846
65
0.512121
0a537858df059228f6018e95b4450f13cdd37ec4
1,311
asm
Assembly
programs/oeis/067/A067080.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/067/A067080.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/067/A067080.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A067080: If n = ab...def in decimal notation then the left digitorial function Ld(n) = ab...def*ab...de*ab...d*...*ab*a. ; 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,40,42,44,46,48,50,52,54,56,58,90,93,96,99,102,105,108,111,114,117,160,164,168,172,176,180,184,188,192,196,250,255,260,265,270,275,280,285,290,295,360,366,372,378,384,390,396,402,408,414,490,497,504,511,518,525,532,539,546,553,640,648,656,664,672,680,688,696,704,712,810,819,828,837,846,855,864,873,882,891,1000,1010,1020,1030,1040,1050,1060,1070,1080,1090,1210,1221,1232,1243,1254,1265,1276,1287,1298,1309,1440,1452,1464,1476,1488,1500,1512,1524,1536,1548,1690,1703,1716,1729,1742,1755,1768,1781,1794,1807,1960,1974,1988,2002,2016,2030,2044,2058,2072,2086,2250,2265,2280,2295,2310,2325,2340,2355,2370,2385,2560,2576,2592,2608,2624,2640,2656,2672,2688,2704,2890,2907,2924,2941,2958,2975,2992,3009,3026,3043,3240,3258,3276,3294,3312,3330,3348,3366,3384,3402,3610,3629,3648,3667,3686,3705,3724,3743,3762,3781,8000,8040,8080,8120,8160,8200,8240,8280,8320,8360,8820,8862,8904,8946,8988,9030,9072,9114,9156,9198,9680,9724,9768,9812,9856,9900,9944,9988,10032,10076,10580,10626,10672,10718,10764,10810,10856,10902,10948,10994,11520,11568,11616,11664,11712,11760,11808,11856,11904,11952,12500 add $0,1 mov $1,1 lpb $0 mul $1,$0 div $0,10 lpe
131.1
1,133
0.754386
4bed17d9960995e632cd231726658d79e08820b7
841
asm
Assembly
oeis/239/A239056.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/239/A239056.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/239/A239056.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A239056: Sum of the parts in the partitions of 4n into 4 parts with smallest part = 1. ; 4,32,120,304,600,1056,1708,2560,3672,5080,6776,8832,11284,14112,17400,21184,25432,30240,35644,41600,48216,55528,63480,72192,81700,91936,103032,115024,127832,141600,156364,172032,188760,206584,225400,245376,266548,288800,312312,337120,363096,390432,419164,449152,480600,513544,547832,583680,621124,660000,700536,742768,786520,832032,879340,928256,979032,1031704,1086072,1142400,1200724,1260832,1323000,1387264,1453400,1521696,1592188,1664640,1739352,1816360,1895416,1976832,2060644,2146592,2235000 mov $1,1 mov $4,$0 mov $7,$0 add $0,1 mov $2,$7 mov $6,$7 add $6,1 add $1,$6 add $1,$7 pow $6,2 add $2,$6 div $2,3 add $2,$0 mul $2,2 mul $2,$1 mov $1,$2 mov $5,$4 mul $5,$4 mov $3,$5 mul $3,4 add $1,$3 mul $5,$4 mov $3,$5 mul $3,4 add $1,$3 mov $0,$1
28.033333
498
0.734839
c2c21c812aaf1e4130feaf75c89e9b0436006b06
425
asm
Assembly
oeis/025/A025998.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/025/A025998.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/025/A025998.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A025998: Expansion of 1/((1-2x)(1-5x)(1-8x)(1-10x)). ; Submitted by Jon Maiga ; 1,25,409,5565,68481,792645,8815129,95390845,1012475761,10596550965,109756131849,1127967674925,11523334499041,117184641488485,1187466959384569,11999684812451805,120997224186474321 mov $1,1 mov $2,$0 mov $3,$0 lpb $2 mov $0,$3 sub $2,1 sub $0,$2 seq $0,16297 ; Expansion of 1/((1-2x)(1-5x)(1-8x)). mul $1,10 add $1,$0 lpe mov $0,$1
25
180
0.696471
cc52ff5e187517774686f28c4f81b81c7834c410
76
asm
Assembly
PrintingFloat.asm
WilsenHernandez/MIPS-Tutorial
9d6fe9c4a0db6013c65288f20e1471ea77466171
[ "MIT" ]
null
null
null
PrintingFloat.asm
WilsenHernandez/MIPS-Tutorial
9d6fe9c4a0db6013c65288f20e1471ea77466171
[ "MIT" ]
null
null
null
PrintingFloat.asm
WilsenHernandez/MIPS-Tutorial
9d6fe9c4a0db6013c65288f20e1471ea77466171
[ "MIT" ]
null
null
null
.data myFloat: .float 3.1416 .text li $v0, 2 lwc1 $f12, myFloat syscall
12.666667
23
0.671053
16f674f5f926b57b3e931b1508e5cf99631f0963
1,435
asm
Assembly
programs/oeis/217/A217366.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/217/A217366.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/217/A217366.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A217366: a(n) = ((n+6) / gcd(n+6,4)) * (n / gcd(n,4)). ; 0,7,2,27,5,55,9,91,14,135,20,187,27,247,35,315,44,391,54,475,65,567,77,667,90,775,104,891,119,1015,135,1147,152,1287,170,1435,189,1591,209,1755,230,1927,252,2107,275,2295,299,2491,324,2695,350,2907,377,3127,405,3355,434,3591,464,3835,495,4087,527,4347,560,4615,594,4891,629,5175,665,5467,702,5767,740,6075,779,6391,819,6715,860,7047,902,7387,945,7735,989,8091,1034,8455,1080,8827,1127,9207,1175,9595,1224,9991,1274,10395,1325,10807,1377,11227,1430,11655,1484,12091,1539,12535,1595,12987,1652,13447,1710,13915,1769,14391,1829,14875,1890,15367,1952,15867,2015,16375,2079,16891,2144,17415,2210,17947,2277,18487,2345,19035,2414,19591,2484,20155,2555,20727,2627,21307,2700,21895,2774,22491,2849,23095,2925,23707,3002,24327,3080,24955,3159,25591,3239,26235,3320,26887,3402,27547,3485,28215,3569,28891,3654,29575,3740,30267,3827,30967,3915,31675,4004,32391,4094,33115,4185,33847,4277,34587,4370,35335,4464,36091,4559,36855,4655,37627,4752,38407,4850,39195,4949,39991,5049,40795,5150,41607,5252,42427,5355,43255,5459,44091,5564,44935,5670,45787,5777,46647,5885,47515,5994,48391,6104,49275,6215,50167,6327,51067,6440,51975,6554,52891,6669,53815,6785,54747,6902,55687,7020,56635,7139,57591,7259,58555,7380,59527,7502,60507,7625,61495,7749,62491,7874,63495 mov $1,$0 add $0,6 lpb $0 mul $0,2 lpb $0 mov $2,$0 mod $0,8 mul $1,$2 lpe mul $0,2 mod $0,8 lpe div $1,16
84.411765
1,247
0.751916
64d34a3ab9c23d134ee0744860f770c9c49d3d43
1,797
asm
Assembly
programs/oeis/200/A200431.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/200/A200431.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/200/A200431.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A200431: Number of -n..n arrays x(0..3) of 4 elements with zero sum and no two or three adjacent elements summing to zero. ; 0,20,92,248,520,940,1540,2352,3408,4740,6380,8360,10712,13468,16660,20320,24480,29172,34428,40280,46760,53900,61732,70288,79600,89700,100620,112392,125048,138620,153140,168640,185152,202708,221340,241080,261960,284012,307268,331760,357520,384580,412972,442728,473880,506460,540500,576032,613088,651700,691900,733720,777192,822348,869220,917840,968240,1020452,1074508,1130440,1188280,1248060,1309812,1373568,1439360,1507220,1577180,1649272,1723528,1799980,1878660,1959600,2042832,2128388,2216300,2306600,2399320,2494492,2592148,2692320,2795040,2900340,3008252,3118808,3232040,3347980,3466660,3588112,3712368,3839460,3969420,4102280,4238072,4376828,4518580,4663360,4811200,4962132,5116188,5273400,5433800,5597420,5764292,5934448,6107920,6284740,6464940,6648552,6835608,7026140,7220180,7417760,7618912,7823668,8032060,8244120,8459880,8679372,8902628,9129680,9360560,9595300,9833932,10076488,10323000,10573500,10828020,11086592,11349248,11616020,11886940,12162040,12441352,12724908,13012740,13304880,13601360,13902212,14207468,14517160,14831320,15149980,15473172,15800928,16133280,16470260,16811900,17158232,17509288,17865100,18225700,18591120,18961392,19336548,19716620,20101640,20491640,20886652,21286708,21691840,22102080,22517460,22938012,23363768,23794760,24231020,24672580,25119472,25571728,26029380,26492460,26961000,27435032,27914588,28399700,28890400,29386720,29888692,30396348,30909720,31428840,31953740,32484452,33021008,33563440,34111780,34666060,35226312,35792568,36364860,36943220,37527680,38118272,38715028,39317980,39927160,40542600,41164332,41792388,42426800 mov $1,-4 mov $2,$0 mul $2,2 mul $1,$2 sub $1,7 bin $1,2 mul $1,12 mul $1,$2 div $1,576 mul $1,4
128.357143
1,573
0.844185
d345c61c733abd4a368377b9c80e777ca743e1bb
2,206
asm
Assembly
tools/DOSBox-0.74Win/FSysFAT/avt/p1_asm/X2_PROC/xsem4_03d_ct.asm
cyberitsec/antivirus
812be691c2a24cc4488ec848b64b57558c0311ab
[ "MIT" ]
1
2021-09-28T23:47:40.000Z
2021-09-28T23:47:40.000Z
tools/DOSBox-0.74Win/FSysFAT/avt/p1_asm/X2_PROC/xsem4_03d_ct.asm
cyberitsec/antivirus
812be691c2a24cc4488ec848b64b57558c0311ab
[ "MIT" ]
null
null
null
tools/DOSBox-0.74Win/FSysFAT/avt/p1_asm/X2_PROC/xsem4_03d_ct.asm
cyberitsec/antivirus
812be691c2a24cc4488ec848b64b57558c0311ab
[ "MIT" ]
null
null
null
;doua proceduri ca in C de adunare a doi vectori - transmiterea parametrilor invers de la coada listei parametrilor spre varf ;transfer toti parametrii mai putin rezultat prin referinta-pointer pe stiva; functii FAR deci model large ;void addvect1(int n, int *a,int *b, int *rez);//se considera int pe doi octeti ;pointer la rezultat este de asemenea pe stiva ;tema de gandire ;int* addvect2(int n, int *a,int *b); ;pointer-referinta la rezultat este aruncata in registrii DX:AX dar oricum se foloseste referinta la rez de pe stiva ;ambele functii folosesc aceeasi stiva dar la momentul executiei stiva are parametrii proprii fiecarei functii-proceduri .model large Parametri SEGMENT n dw 5 a dw 3, 1, 4,-3,-1 b dw 7,12,27,-3, 1 rez dw 5 dup(?) Parametri ENDS Stiva SEGMENT dw 12 dup (?) varf label word Stiva ENDS Apelator SEGMENT ASSUME DS:Parametri,SS:Stiva,CS:Apelator start: mov ax,Parametri mov ds,ax mov ax,Stiva mov ss,ax mov sp,offset varf ;lea sp,a ;punere referinte - pointeri la adresele parametrilor pe stiva ;invers de Pascal- exact ca in C, asta daca se va interfata cu prog scrise in C mov ax,offset rez push ax mov ax,offset b push ax mov ax,offset a push ax mov ax, offset n push ax CALL FAR PTR addvect1 mov ax,4c00h int 21h Apelator ENDS Procedura SEGMENT ASSUME CS:PROCEDURA ;Procedura: void addvect1(int n, int *a, int *b, int *rez); addvect1 PROC FAR push BP ;secventa tipica de acces mov BP,SP xor SI,SI ;punere in CX a dimensiunii vectorilor mov bx,[bp+6] ; mov cx,[bx] ; in cx este n acum start_bucla: mov bx, [bp+8] mov ax, [bx][si] ; adica muta in ax ce valoare este adresata din ds:[bx+si];adresare bazata si indexata mov bx, [bp+10] add ax, [bx][si] ;se aduna primul numar din vector cu primul din vect2 si tot asa ;depunere rezultat mov bx, [bp+12] mov [bx][si],ax add si,2 loop start_bucla ;implicit CX=CX-1;do while cx!=0 pop bp ret 8h addvect1 ENDP Procedura ENDS end start
25.356322
127
0.657298
ec5cc32ddabe599387ce364cabce748790f12966
194
asm
Assembly
mc-sema/validator/x86/tests/INC16r.asm
randolphwong/mcsema
eb5b376736e7f57ff0a61f7e4e5a436bbb874720
[ "BSD-3-Clause" ]
2
2021-08-07T16:21:29.000Z
2021-11-17T10:58:37.000Z
mc-sema/validator/x86/tests/INC16r.asm
randolphwong/mcsema
eb5b376736e7f57ff0a61f7e4e5a436bbb874720
[ "BSD-3-Clause" ]
null
null
null
mc-sema/validator/x86/tests/INC16r.asm
randolphwong/mcsema
eb5b376736e7f57ff0a61f7e4e5a436bbb874720
[ "BSD-3-Clause" ]
null
null
null
BITS 32 ;TEST_FILE_META_BEGIN ;TEST_TYPE=TEST_F ;TEST_IGNOREFLAGS= ;TEST_FILE_META_END ; INC16r xor dx, dx mov dx, 0x30 ;TEST_BEGIN_RECORDING inc dx ;TEST_END_RECORDING
14.923077
25
0.721649
68ccec2b7a5e534d240ecc1d509e7ad7810a7656
1,333
asm
Assembly
misc/program_pro.asm
a1393323447/x86-Assambely
1daf3041fe6f44948925ceb7bb6668950dcbab25
[ "MIT" ]
3
2021-05-04T13:59:36.000Z
2021-08-23T16:03:13.000Z
misc/program_pro.asm
a1393323447/x86-Assambely
1daf3041fe6f44948925ceb7bb6668950dcbab25
[ "MIT" ]
null
null
null
misc/program_pro.asm
a1393323447/x86-Assambely
1daf3041fe6f44948925ceb7bb6668950dcbab25
[ "MIT" ]
null
null
null
SETCHAR equ 0x07 section head align=16 vstart=0 Size dd ProgramEnd ; 4B 0x00 SegmentAddr: CodeSeg dd section.code.start ; 4B 0x04 DataSeg dd section.data.start ; 4B 0x08 StackSeg dd section.stack.start; 4B 0x0c SegmentNum: SegNum db (SegmentNum - SegmentAddr)/4 ; 1B 0x10 Entry: dw CodeStart ; 2B 0x11 偏移地址 dd section.code.start ; 4B 0x13 段地址 section code align=16 vstart=0 CodeStart: mov ax, [StackSeg] ; 设置栈空间, 使用程序自己的栈空间 mov sp, StackEnd mov ss, ax mov ax, [DataSeg] ; 传参 mov ds, ax ; 将段地址设置为字符串所在位置 call PrintLines ; 调用函数 jmp $ PrintLines: .setup: push ax push bx push cx push dx mov cx, HelloEnd - SayHello ; 计算字符串长度 xor si, si mov bl, SETCHAR .putc: mov al, [si] inc si mov ah, 0x0e ; 设置中断属性, 0x0e: 打字机模式 int 0x10 ; 使用 0x10 号中断 loop .putc .return: pop dx pop cx pop bx pop ax ret section data align=16 vstart=0 SayHello db 'Hello there!' db 0x0d, 0x0a db 'This is a test!' db 0x0d, 0x0a db 'If you see this message, then the test successed.' db 0x00 HelloEnd: section stack align=16 vstart=0 times 128 db 0 StackEnd: section end align=16 ProgramEnd:
21.852459
63
0.591148
f2e31dab0027533fed4464cc54568705b33cbd19
456
asm
Assembly
src/firmware-tests/Platform/Timer0/Initialisation/InitialisationChainTest.asm
pete-restall/Cluck2Sesame-Prototype
99119b6748847a7b6aeadc4bee42cbed726f7fdc
[ "MIT" ]
1
2019-12-12T09:07:08.000Z
2019-12-12T09:07:08.000Z
src/firmware-tests/Platform/Timer0/Initialisation/InitialisationChainTest.asm
pete-restall/Cluck2Sesame-Prototype
99119b6748847a7b6aeadc4bee42cbed726f7fdc
[ "MIT" ]
null
null
null
src/firmware-tests/Platform/Timer0/Initialisation/InitialisationChainTest.asm
pete-restall/Cluck2Sesame-Prototype
99119b6748847a7b6aeadc4bee42cbed726f7fdc
[ "MIT" ]
null
null
null
#include "Platform.inc" #include "FarCalls.inc" #include "Timer0.inc" #include "TestFixture.inc" #include "../InitialiseAfterTimer0Mock.inc" radix decimal InitialisationChainTest code global testArrange testArrange: fcall initialiseInitialiseAfterTimer0Mock testAct: fcall initialiseTimer0 testAssert: banksel calledInitialiseAfterTimer0 .assert "calledInitialiseAfterTimer0 != 0, 'Next initialiser in chain was not called.'" return end
19
88
0.798246
5995000c6b1e7ebb04d0c852ed4e4b29026586ef
869
asm
Assembly
sw/552tests/rand_simple/t_2_sll.asm
JPShen-UWM/ThreadKraken
849c510531f28e36d3469535737b2120bd774935
[ "MIT" ]
1
2022-02-15T16:03:25.000Z
2022-02-15T16:03:25.000Z
sw/552tests/rand_simple/t_2_sll.asm
JPShen-UWM/ThreadKraken
849c510531f28e36d3469535737b2120bd774935
[ "MIT" ]
null
null
null
sw/552tests/rand_simple/t_2_sll.asm
JPShen-UWM/ThreadKraken
849c510531f28e36d3469535737b2120bd774935
[ "MIT" ]
null
null
null
// seed 2 lbi r0, 84 // icount 0 slbi r0, 166 // icount 1 lbi r1, 190 // icount 2 slbi r1, 160 // icount 3 lbi r2, 156 // icount 4 slbi r2, 28 // icount 5 lbi r3, 244 // icount 6 slbi r3, 35 // icount 7 lbi r4, 75 // icount 8 slbi r4, 181 // icount 9 lbi r5, 188 // icount 10 slbi r5, 239 // icount 11 lbi r6, 139 // icount 12 slbi r6, 122 // icount 13 lbi r7, 240 // icount 14 slbi r7, 49 // icount 15 sll r0, r7, r7 // icount 16 sll r1, r4, r7 // icount 17 sll r6, r5, r2 // icount 18 sll r3, r6, r5 // icount 19 sll r4, r3, r7 // icount 20 sll r3, r6, r3 // icount 21 sll r7, r7, r2 // icount 22 sll r4, r0, r6 // icount 23 sll r1, r4, r0 // icount 24 sll r1, r4, r3 // icount 25 sll r3, r7, r5 // icount 26 sll r6, r5, r6 // icount 27 sll r6, r2, r1 // icount 28 sll r2, r7, r2 // icount 29 sll r5, r6, r2 // icount 30 sll r6, r7, r3 // icount 31 halt // icount 32
24.828571
27
0.619102
75bd992cc4661b64f8079aa961767d411c7a3d84
615
asm
Assembly
unittests/ASM/OpSize/66_76.asm
cobalt2727/FEX
13087f8425aeaad28dc81bed46a83e1d72ff0db8
[ "MIT" ]
628
2020-03-06T14:01:32.000Z
2022-03-31T06:35:14.000Z
unittests/ASM/OpSize/66_76.asm
cobalt2727/FEX
13087f8425aeaad28dc81bed46a83e1d72ff0db8
[ "MIT" ]
576
2020-03-06T08:25:12.000Z
2022-03-30T04:05:29.000Z
unittests/ASM/OpSize/66_76.asm
cobalt2727/FEX
13087f8425aeaad28dc81bed46a83e1d72ff0db8
[ "MIT" ]
38
2020-03-07T06:10:00.000Z
2022-03-29T09:27:36.000Z
%ifdef CONFIG { "RegData": { "XMM0": ["0x00000000FFFFFFFF", "0x00000000FFFFFFFF"], "XMM1": ["0x00000000FFFFFFFF", "0x00000000FFFFFFFF"], "XMM2": ["0x61626364FFFFFFFF", "0x51525354FFFFFFFF"] }, "MemoryRegions": { "0x100000000": "4096" } } %endif mov rdx, 0xe0000000 mov rax, 0x71727374FFFFFFFF mov [rdx + 8 * 0], rax mov rax, 0x41424344FFFFFFFF mov [rdx + 8 * 1], rax mov rax, 0x61626364FFFFFFFF mov [rdx + 8 * 2], rax mov rax, 0x51525354FFFFFFFF mov [rdx + 8 * 3], rax movapd xmm0, [rdx] pcmpeqd xmm0, [rdx + 8 * 2] movapd xmm1, [rdx] movapd xmm2, [rdx + 8 * 2] pcmpeqd xmm1, xmm2 hlt
18.088235
57
0.653659
bdbe3fa321967de9bb2f7b63b5e2b7b085a76a63
2,810
asm
Assembly
programs/oeis/326/A326367.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/326/A326367.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/326/A326367.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A326367: Number of tilings of an equilateral triangle of side length n with unit triangles (of side length 1) and exactly two unit "lozenges" or "diamonds" (also of side length 1). ; 0,0,24,126,387,915,1845,3339,5586,8802,13230,19140,26829,36621,48867,63945,82260,104244,130356,161082,196935,238455,286209,340791,402822,472950,551850,640224,738801,848337,969615,1103445,1250664,1412136,1588752,1781430,1991115,2218779,2465421,2732067,3019770,3329610,3662694,4020156,4403157,4812885,5250555,5717409,6214716,6743772,7305900,7902450,8534799,9204351,9912537,10660815,11450670,12283614,13161186,14084952,15056505,16077465,17149479,18274221,19453392,20688720,21981960,23334894,24749331,26227107,27770085,29380155,31059234,32809266,34632222,36530100,38504925,40558749,42693651,44911737,47215140,49606020,52086564,54658986,57325527,60088455,62950065,65912679,68978646,72150342,75430170,78820560,82323969,85942881,89679807,93537285,97517880,101624184,105858816,110224422,114723675,119359275,124133949,129050451,134111562,139320090,144678870,150190764,155858661,161685477,167674155,173827665,180149004,186641196,193307292,200150370,207173535,214379919,221772681,229355007,237130110,245101230,253271634,261644616,270223497,279011625,288012375,297229149,306665376,316324512,326210040,336325470,346674339,357260211,368086677,379157355,390475890,402045954,413871246,425955492,438302445,450915885,463799619,476957481,490393332,504111060,518114580,532407834,546994791,561879447,577065825,592557975,608359974,624475926,640909962,657666240,674748945,692162289,709910511,727997877,746428680,765207240,784337904,803825046,823673067,843886395,864469485,885426819,906762906,928482282,950589510,973089180,995985909,1019284341,1042989147,1067105025,1091636700,1116588924,1141966476,1167774162,1194016815,1220699295,1247826489,1275403311,1303434702,1331925630,1360881090,1390306104,1420205721,1450585017,1481449095,1512803085,1544652144,1577001456,1609856232,1643221710,1677103155,1711505859,1746435141,1781896347,1817894850,1854436050,1891525374,1929168276,1967370237,2006136765,2045473395,2085385689,2125879236,2166959652,2208632580,2250903690,2293778679,2337263271,2381363217,2426084295,2471432310,2517413094,2564032506,2611296432,2659210785,2707781505,2757014559,2806915941,2857491672,2908747800,2960690400,3013325574,3066659451,3120698187,3175447965,3230914995,3287105514,3344025786,3401682102,3460080780,3519228165,3579130629,3639794571,3701226417,3763432620,3826419660,3890194044,3954762306,4020131007,4086306735,4153296105,4221105759,4289742366,4359212622 mov $12,$0 mov $14,$0 lpb $14,1 clr $0,12 mov $0,$12 sub $14,1 sub $0,$14 mov $11,$0 lpb $11,1 mov $0,$9 sub $11,1 sub $0,$11 mov $5,$0 bin $5,2 mov $6,27 mul $6,$5 trn $6,3 add $10,$6 lpe add $13,$10 lpe mov $1,$13
108.076923
2,357
0.842705
c94649e55cc6662312c1c2d3e7bf83075944a896
385
asm
Assembly
oeis/086/A086936.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/086/A086936.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/086/A086936.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A086936: Number of primes between n and p(n) inclusive. ; Submitted by Jamie Morken(w1) ; 1,2,2,2,3,3,4,4,5,6,7,7,8,8,9,10,11,11,12,12,13,14,15,15,16,17,18,19,20,20,21,21,22,23,24,25,26,26,27,28,29,29,30,30,31,32,33,33,34,35,36,37,38,38,39,40,41,42,43,43,44,44,45,46,47,48,49,49,50,51,52,52,53,53 mov $1,$0 seq $1,230980 ; Number of primes <= n, starting at n=0. sub $0,$1 add $0,1
42.777778
208
0.654545