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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
647e61406b5f2aa66e365f33bd53ca8f27cc9ef3
| 1,874
|
asm
|
Assembly
|
programs/oeis/304/A304387.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/304/A304387.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/304/A304387.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A304387: a(n) = 27*2^n - 5.
; 22,49,103,211,427,859,1723,3451,6907,13819,27643,55291,110587,221179,442363,884731,1769467,3538939,7077883,14155771,28311547,56623099,113246203,226492411,452984827,905969659,1811939323,3623878651,7247757307,14495514619,28991029243,57982058491,115964116987,231928233979,463856467963,927712935931,1855425871867,3710851743739,7421703487483,14843406974971,29686813949947,59373627899899,118747255799803,237494511599611,474989023199227,949978046398459,1899956092796923,3799912185593851,7599824371187707,15199648742375419,30399297484750843,60798594969501691,121597189939003387,243194379878006779,486388759756013563,972777519512027131,1945555039024054267,3891110078048108539,7782220156096217083,15564440312192434171,31128880624384868347,62257761248769736699,124515522497539473403,249031044995078946811,498062089990157893627,996124179980315787259,1992248359960631574523,3984496719921263149051,7968993439842526298107,15937986879685052596219,31875973759370105192443,63751947518740210384891,127503895037480420769787,255007790074960841539579,510015580149921683079163,1020031160299843366158331,2040062320599686732316667,4080124641199373464633339,8160249282398746929266683,16320498564797493858533371,32640997129594987717066747,65281994259189975434133499,130563988518379950868267003,261127977036759901736534011,522255954073519803473068027,1044511908147039606946136059,2089023816294079213892272123,4178047632588158427784544251,8356095265176316855569088507,16712190530352633711138177019,33424381060705267422276354043,66848762121410534844552708091,133697524242821069689105416187,267395048485642139378210832379,534790096971284278756421664763,1069580193942568557512843329531,2139160387885137115025686659067,4278320775770274230051373318139,8556641551540548460102746636283,17113283103081096920205493272571
mov $1,2
pow $1,$0
sub $1,1
mul $1,27
add $1,22
mov $0,$1
| 187.4
| 1,784
| 0.922625
|
2861a375a5abcf86a3636449a44d9bb23a31f242
| 457
|
asm
|
Assembly
|
uw1/call-eop-tryKeyAndMouseBindings.asm
|
JohnGlassmyer/UltimaHacks
|
f9a114e00c4a1edf1ac7792b465feff2c9b88ced
|
[
"MIT"
] | 68
|
2018-03-04T22:34:22.000Z
|
2022-03-10T15:18:32.000Z
|
uw1/call-eop-tryKeyAndMouseBindings.asm
|
ptrie/UltimaHacks
|
2c3557a86d94ad8b54b26bc395b9aed1604f8be1
|
[
"MIT"
] | 19
|
2018-11-20T04:06:49.000Z
|
2021-11-08T16:37:10.000Z
|
uw1/call-eop-tryKeyAndMouseBindings.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 12, 0x0018, tryHandlersInMainLoop
%endif
[bits 16]
startPatch EXE_LENGTH, \
call eop tryKeyAndMouseBindings to respond to multiple simultaneous keys
startBlockAt addr_tryHandlersInMainLoop
push varArgsEopArg(tryKeyAndMouseBindings, 0)
callFromLoadModule varArgsEopDispatcher
add sp, 2
endBlockOfLength 11
endPatch
| 22.85
| 74
| 0.803063
|
875ea1d5b16aca17258f7d32f1b6aac22c9fe3be
| 474
|
asm
|
Assembly
|
libsrc/_DEVELOPMENT/fcntl/z80/drivers/terminal/tty/asm_tty_state_get_3.asm
|
meesokim/z88dk
|
5763c7778f19a71d936b3200374059d267066bb2
|
[
"ClArtistic"
] | null | null | null |
libsrc/_DEVELOPMENT/fcntl/z80/drivers/terminal/tty/asm_tty_state_get_3.asm
|
meesokim/z88dk
|
5763c7778f19a71d936b3200374059d267066bb2
|
[
"ClArtistic"
] | null | null | null |
libsrc/_DEVELOPMENT/fcntl/z80/drivers/terminal/tty/asm_tty_state_get_3.asm
|
meesokim/z88dk
|
5763c7778f19a71d936b3200374059d267066bb2
|
[
"ClArtistic"
] | null | null | null |
SECTION code_fcntl
PUBLIC asm_tty_state_get_3
EXTERN l_inc_hl, asm_tty_state_get_2
EXTERN asm0_tty_state_param_store
asm_tty_state_get_3:
; c = ascii char
; stack = & tty.action
; first store next state
pop hl
ld de,asm_tty_state_get_2
call asm0_tty_state_param_store
; hl = & tty.state
; c = parameter
; a = 0
call l_inc_hl - 5 ; hl = & tty.param_3
ld (hl),c ; store param
ret
| 16.344828
| 51
| 0.616034
|
3944de409edf60031796d27effe0e4634ae1b550
| 1,599
|
asm
|
Assembly
|
PRG/levels/Ice/6-5.asm
|
narfman0/smb3_pp1
|
38a58adafff67a403591e38875e9fae943a5fe76
|
[
"Unlicense"
] | null | null | null |
PRG/levels/Ice/6-5.asm
|
narfman0/smb3_pp1
|
38a58adafff67a403591e38875e9fae943a5fe76
|
[
"Unlicense"
] | null | null | null |
PRG/levels/Ice/6-5.asm
|
narfman0/smb3_pp1
|
38a58adafff67a403591e38875e9fae943a5fe76
|
[
"Unlicense"
] | null | null | null |
; Original address was $ACEA
; 6-5 outside / powerup / goal
.word W605_UnderL ; Alternate level layout
.word W605_UnderO ; Alternate object layout
.byte LEVEL1_SIZE_06 | LEVEL1_YSTART_170
.byte LEVEL2_BGPAL_00 | LEVEL2_OBJPAL_08 | LEVEL2_XSTART_18
.byte LEVEL3_TILESET_03 | LEVEL3_VSCROLL_LOCKED | LEVEL3_PIPENOTEXIT
.byte LEVEL4_BGBANK_INDEX(12) | LEVEL4_INITACT_NOTHING
.byte LEVEL5_BGM_OVERWORLD | LEVEL5_TIME_400
.byte $60, $0E, $1F, $61, $0E, $8F, $63, $0E, $8F, $65, $0E, $8F, $67, $0E, $8F, $69
.byte $0E, $8F, $6B, $0E, $8F, $6D, $0E, $8F, $6F, $0E, $8F, $71, $0E, $86, $73, $0C
.byte $87, $75, $06, $80, $75, $0A, $88, $77, $04, $81, $77, $0E, $86, $79, $00, $8F
.byte $20, $00, $4D, $12, $01, $C2, $13, $08, $C2, $37, $0C, $E1, $E0, $52, $20, $60
.byte $1E, $1F, $60, $2E, $1F, $61, $2E, $84, $63, $2E, $84, $65, $2E, $84, $67, $2E
.byte $84, $69, $2E, $84, $6B, $2E, $84, $6D, $2E, $84, $6F, $2E, $84, $71, $26, $88
.byte $73, $26, $88, $75, $26, $88, $77, $26, $88, $79, $20, $8F, $57, $1C, $11, $35
.byte $20, $01, $37, $24, $91, $E1, $64, $96, $E2, $52, $41, $60, $3F, $10, $61, $38
.byte $17, $62, $38, $17, $63, $38, $17, $64, $38, $17, $65, $38, $17, $66, $38, $17
.byte $67, $38, $17, $68, $38, $17, $69, $38, $17, $6A, $38, $17, $6B, $38, $17, $6C
.byte $38, $17, $6D, $38, $17, $6E, $38, $17, $6F, $38, $17, $70, $38, $17, $71, $38
.byte $17, $72, $38, $17, $73, $38, $17, $74, $38, $17, $75, $38, $17, $76, $38, $17
.byte $77, $38, $17, $78, $38, $17, $79, $38, $17, $1A, $38, $10, $27, $37, $41, $A2
.byte $13, $47, $C2, $14, $43, $C2, $40, $4C, $09, $FF
| 63.96
| 85
| 0.523452
|
a66d59e2f568e41444753d104e5b3a6b516b44a0
| 219
|
nasm
|
Assembly
|
Chapter03/data-manipulation/xchg.nasm
|
firebitsbr/Penetration-Testing-with-Shellcode
|
2d756bccace6b727e050b2010ebf23e08d221fdc
|
[
"MIT"
] | 30
|
2018-05-15T21:45:09.000Z
|
2022-03-23T20:04:25.000Z
|
Chapter03/data-manipulation/xchg.nasm
|
naveenselvan/Penetration-Testing-with-Shellcode
|
2d756bccace6b727e050b2010ebf23e08d221fdc
|
[
"MIT"
] | 1
|
2020-10-19T13:03:32.000Z
|
2020-11-24T05:50:17.000Z
|
Chapter03/data-manipulation/xchg.nasm
|
naveenselvan/Penetration-Testing-with-Shellcode
|
2d756bccace6b727e050b2010ebf23e08d221fdc
|
[
"MIT"
] | 18
|
2018-02-20T21:21:23.000Z
|
2022-01-26T04:19:28.000Z
|
global _start
section .text
_start:
mov rax, 0x1234
mov rbx, 0x5678
xchg rax, rbx
mov rcx, 0x9876
xchg rcx,[mem1]
mov rax, 60
mov rdi, 0
syscall
section .data
mem1: dw 0x1234
| 12.166667
| 19
| 0.598174
|
0e17a086943dc54158f44ab6d871fc53c63204a8
| 134
|
asm
|
Assembly
|
libsrc/target/sam/graphics/res_MODE2.asm
|
ahjelm/z88dk
|
c4de367f39a76b41f6390ceeab77737e148178fa
|
[
"ClArtistic"
] | 640
|
2017-01-14T23:33:45.000Z
|
2022-03-30T11:28:42.000Z
|
libsrc/target/sam/graphics/res_MODE2.asm
|
C-Chads/z88dk
|
a4141a8e51205c6414b4ae3263b633c4265778e6
|
[
"ClArtistic"
] | 1,600
|
2017-01-15T16:12:02.000Z
|
2022-03-31T12:11:12.000Z
|
libsrc/target/sam/graphics/res_MODE2.asm
|
C-Chads/z88dk
|
a4141a8e51205c6414b4ae3263b633c4265778e6
|
[
"ClArtistic"
] | 215
|
2017-01-17T10:43:03.000Z
|
2022-03-23T17:25:02.000Z
|
;
; Plotting in Sam modes
;
SECTION code_graphics
PUBLIC res_MODE2
res_MODE2:
defc NEEDunplot = 1
INCLUDE "pixel_MODE2.inc"
| 11.166667
| 26
| 0.731343
|
1ec5090a527d014295c62cd9d5ae43252db76176
| 10,473
|
asm
|
Assembly
|
223bytes-windows-x86-reverse-tcp-nullfree-PIC.asm
|
cwaazywabbit/shellcodes
|
86d66693053f8ec5c679ed0adb409cb7612b48bb
|
[
"MIT"
] | null | null | null |
223bytes-windows-x86-reverse-tcp-nullfree-PIC.asm
|
cwaazywabbit/shellcodes
|
86d66693053f8ec5c679ed0adb409cb7612b48bb
|
[
"MIT"
] | null | null | null |
223bytes-windows-x86-reverse-tcp-nullfree-PIC.asm
|
cwaazywabbit/shellcodes
|
86d66693053f8ec5c679ed0adb409cb7612b48bb
|
[
"MIT"
] | 2
|
2021-07-09T09:01:45.000Z
|
2021-11-18T08:43:58.000Z
|
;-------------------------------------------------------------------------------------------;
; Author: Shadi Habbal (@Kerpanic), @TheCyberBebop
; Tested on: Windows 10.0.16299 (x86)
; Version: 1.0 (06 June 2021)
;-------------------------------------------------------------------------------------------;
; Characteristics: 223 bytes, Position-Independent-Code (PIC), NULL-free, Reverse TCP shell
; Bonus: keeps track of EIP after each call to find_function
;-------------------------------------------------------------------------------------------;
; Assumptions: ws2_32.dll is already loaded and win sockets are initialized
;-------------------------------------------------------------------------------------------;
fake_start:
;int3 ; bp for windbg, remove when not debugging
find_function:
pushad ; EBX has base_address of module to enumerate
mov eax, [ebx+0x3c] ; offset to PE signature
mov edi, [ebx+eax+0x78] ; Export Table Directory RVA
add edi, ebx ; Export Table Directory VMA
mov ecx, [edi+0x18] ; NumberOfNames
mov eax, [edi+0x20] ; AddressOfNames RVA
add eax, ebx ; AddressOfNames VMA
mov [ebp-4], eax ; save AddressOfNames VMA for later use
find_function_loop:
jecxz find_function_finished ; jmp to end if ECX = 0
dec ecx ; dec our names counter
mov eax, [ebp-4] ; restore AddressOfNames VMA
mov esi, [eax+ecx*4] ; get RVA of the symbol name
add esi, ebx ; ESI = VMA of the current symbol names
compute_hash:
xor eax, eax ; EAX = 0
cdq ; EDX = 0 (CDQ converts double quad (extends EAX to EDX which clears EDX)
cld ; clear Direction Flag
compute_hash_again:
lodsb ; load the next byte from ESI into AL and automatically increase ESI based on DF
test al, al
jz compute_hash_finished
ror edx, 0x0d ; rotate EDX 13 bits to the right
add edx, eax ; add the new byte to the accumulator
jmp compute_hash_again
compute_hash_finished:
find_function_compare:
cmp edx, [esp+0x24] ; compare computed hash with the requested hash on stack
jnz find_function_loop ; if not found, move on to next function
mov edx, [edi+0x24] ; AddressOfNameOrdinals RVA: MAKE SURE THE OFFSET ESP+0x24 HOLDS THE PRECOMPUTED HASH, IT MAY VARY
add edx, ebx ; AddressOfNameOrdinals VMA
mov cx, [edx+ecx*2] ; get the function's AddressOfNameOrdinals
mov edx, [edi+0x1c] ; AddressOfFunctions RVA
add edx, ebx ; AddressOfFunctions VMA
mov eax, [edx+ecx*4] ; get the function RVA
add eax, ebx ; get the function VMA
mov [esp+0x1c], eax ; overwrite stack version of EAX from pushad
find_function_finished:
popad ; restore the state of EBX, ECX, EDI (and other junk REGs)
pop esi ; pop ret addr
pop edx ; remove function hash off top of stack
push esi ; put ret addr back to stack to simulate a call with the next jmp
jmp eax ; call the found function without storing a ret addr on stack. The one we already have will be used at the end of the function's logic to return to our shell at the right position
real_start:
; w00tw00t goes here. Your egghunter enters the shellcode at this block.
; Most modern egghunters check for the tag by looping. ECX is therefore used and is 0 before entering the shellcode.
; We assume that the egghunter is using EDI to jmp/call into the shellcode.
; EAX = junk
; EBX = addr of w00tw00t
; ECX = 0 (ECX is used as counter in the egghunter and reaches 0 before executing our shellcode)
; EDX = junk
; ESI = junk
; EDI = addr of real_start
; SEH-egghunter jumps here based on @EDI
lea edi, [edi-0x5B] ; EDI = address of find_function. 0x5B is the size of the find_function block
; EAX = junk
; EBX = addr of w00tw00t
; ECX = 0
; EDX = junk
; ESI = junk
; EDI = addr of find_function
mov ebp, esp ; save top of stack frame
add esp, 0xffffffee ; give us 12 bytes buffer on stack to avoid clobbering it when saving our pointers
find_kernel32:
; ECX should be NULL
mov esi, fs:[ecx+30h] ; ESI = &(PEB) ([fs:0x30])
mov esi, [esi+0ch] ; ESI = PEB->Ldr
mov esi, [esi+0x14] ; ESI = PEB->Ldr.InMemOrder (program module)
lodsd ; EAX = [ESI] (ntdll.dll)
xchg eax, esi ; ESI = EAX
lodsd ; EAX = [ESI] (KERNEL32.dll)
mov esi, [eax+0x10] ; ESI = DllBase KERNEL32.dll (EAX - 0x8 + 0x18)
mov [ebp-8], esi ; save base address of kernel32.dll on stack for later
; EAX = junk
; EBX = addr of w00tw00t
; ECX = 0
; EDX = junk
; ESI = junk
; EDI = addr of find_function
find_ws2_32:
xchg eax, esi ; ESI = EAX (current module)
lodsd ; EAX = [ESI] (next module)
mov ebx, [eax+0x28] ; EBX = BaseDllName
cmp byte ptr [ebx+3*2], 0x5F ; 4th letter match "_" ? this should be changed should your vulnerable application load modules with _ as their 4th char.
jne find_ws2_32 ; No: try next module.
mov ebx, [eax+0x10] ; EBX = base address of ws2_32.dll
; EAX = junk
; EBX = baseaddr of ws2_32.dll
; ECX = 0
; EDX = junk
; ESI = junk
; EDI = addr of find_function
start_prepare_sockaddr_in:
push ecx ; (create_sockaddr_in) push sin_zero[]
push ecx ; (create_sockaddr_in) push sin_zero[] - twice because it's an 8 byte array
call_wsasocket:
push ecx ; push dwFlags
push ecx ; push g
push ecx ; push lpProtocolInfo
push ecx ; push protocol (NULL). When not set, it's auto picked based on type and af
push 1 ; push type (SOCK_STREAM=1)
push 2 ; push af (AF_INET=2)
push 0xadf509d9 ; "WSASocketA" hash
call edi ; call find_function
; EAX = socket handle
; EBX = baseaddr of ws2_32.dll
; ECX = junk
; EDX = junk
; ESI = address of create_sockaddr_in
; EDI = addr of find_function
create_sockaddr_in: ; we need to prepare sockaddr_in struct for use
push 0x4c31a8c0 ; push sin_addr (192.168.49.76) - REMEMBER it's reversed
mov ecx, 0xA3EEFFFE ;
neg ecx ; ECX = 0x5c110002
push ecx ; push (sin_family 0x0002 + sin_port 0x115c)
push esp ; push pointer to sockaddr_in struct which is now on the top of the stack
pop ecx ; ECX = pointer to sockaddr_in struct on stack
; EAX = socket handle
; EBX = baseaddr of ws2_32.dll
; ECX = pointer to sockaddr_in struct on stack
; EDX = junk
; ESI = address of start_prepare_startupinfoa
; EDI = addr of find_function
start_prepare_startupinfoa:
; EAX holds socket handle so we put it on the stack for the create_startupinfoa block in advance before it's overwritten by "connect"
; pipe err/out/in to hSocket
push eax ; push hStdError
push eax ; push hStdOutput
push eax ; push hStdInput
call_connect:
push 0x10 ; push sizeof(sockaddr_in)
push ecx ; push *name
push eax ; push hSocket
push 0x60aaf9ec ; "connect" hash
call edi ; call find_function
; EAX = 0
; EBX = baseaddr of ws2_32.dll
; ECX = junk
; EDX = 0
; ESI = address of create_startupinfoa
; EDI = addr of find_function
create_startupinfoa:
; hStdError / hStdOutput / hStdInput already set on stack above
push eax ; push lpReserved2 (NULL)
push eax ; push cbReserved & wShowWindow
mov dl, 0xFF
inc dx
push edx ; push dwFlags (0x100)
push 10
pop ecx
dup:
push eax ; push NULL ECX times
loop dup
push 0x44 ; push cb
push esp ; push pointer to the STARTUPINFOA struct
pop ecx ; ECX = pointer of STARTUPINFOA struct
; EAX = 0
; EBX = baseaddr of ws2_32.dll
; ECX = pointer of STARTUPINFOA struct
; EDX = 0x00000100
; ESI = address of create_startupinfoa
; EDI = addr of find_function
create_cmd_string:
push 'd' ; push "d\\0"
push word 0x6D63 ; push "cm"
push esp ; get pointer to string
pop edx ; EDX = ptr to "cmd\\0"
; EAX = 0
; EBX = baseaddr of ws2_32.dll
; ECX = pointer of STARTUPINFOA struct
; EDX = pointer of "cmd\\0"
; ESI = address of create_startupinfoa
; EDI = addr of find_function
call_createprocessa:
push esp ; push lpProcessInformation. We don't care if the stack is polluted at this stage. It doesn't affect the next call.
; otherwise do "lea ebx, [esp-390]; push ebx"
push ecx ; push lpStartupInfo
push eax ; push lpCurrentDirectory
push eax ; push lpEnvironment
push eax ; push dwCreationFlags
push 1 ; push bInheritHandles (0x01 (TRUE))
push eax ; push lpThreadAttributes
push eax ; push lpProcessAttributes
push edx ; push lpCommandLine
push eax ; push lpApplicationName
push 0x16b3fe72 ; CreateProcess
mov ebx, [ebp-8] ; EBX = baseaddr of kernel32
call edi ; call find_function
; EAX = 1
; EBX = baseaddr of kernel32.dll
; ECX = junk
; EDX = 0
; ESI = address of call_exitprocess
; EDI = addr of find_function
call_exitprocess:
; expects uExitCode, but we don't care so we use whatever on stack
push 0x73e2d87e ; "ExitProcess" hash
; push 0x60e0ceef ; "ExitThread" hash
call edi ; call find_function
| 42.573171
| 209
| 0.562685
|
d04e1904b8d22537ec9d7d3edf7a44630701bb80
| 1,417
|
asm
|
Assembly
|
Examples/ch12/BorlandCPP/ReadSec/ReadSec.asm
|
satadriver/LiunuxOS_t
|
c6222f04b6e734002cbf1aa366eb62e51f0ebbe5
|
[
"Apache-2.0"
] | null | null | null |
Examples/ch12/BorlandCPP/ReadSec/ReadSec.asm
|
satadriver/LiunuxOS_t
|
c6222f04b6e734002cbf1aa366eb62e51f0ebbe5
|
[
"Apache-2.0"
] | null | null | null |
Examples/ch12/BorlandCPP/ReadSec/ReadSec.asm
|
satadriver/LiunuxOS_t
|
c6222f04b6e734002cbf1aa366eb62e51f0ebbe5
|
[
"Apache-2.0"
] | null | null | null |
TITLE Reading Disk Sectors (ReadSec.asm)
; The ReadSector procedure is called from a 16-bit
; Real-mode application written in Borland C++ 5.01.
; It can read FAT12, FAT16, and FAT32 disks under
; MS-DOS, and Windows 95/98/Me.
; Last update: 12/5/01
Public _ReadSector
.model small
.386
DiskIO STRUC
strtSector DD ? ; starting sector number
nmSectors DW 1 ; number of sectors
bufferOfs DW ? ; buffer offset
bufferSeg DW ? ; buffer segment
DiskIO ENDS
.data
diskStruct DiskIO <>
.code
;----------------------------------------------------------
_ReadSector PROC NEAR C
ARG bufferPtr:WORD, startSector:DWORD, driveNumber:WORD, \
numSectors:WORD
;
; Read n sectors from a specified disk drive.
; Receives: pointer to buffer that will hold the sector,
; data, starting sector number, drive number,
; and number of sectors.
; Returns: nothing
;----------------------------------------------------------
enter 0,0
pusha
mov eax,startSector
mov diskStruct.strtSector,eax
mov ax,numSectors
mov diskStruct.nmSectors,ax
mov ax,bufferPtr
mov diskStruct.bufferOfs,ax
push ds
pop diskStruct.bufferSeg
mov ax,7305h ; ABSDiskReadWrite
mov cx,0FFFFh ; always this value
mov dx,driveNumber ; drive number
mov bx,OFFSET diskStruct ; sector number
mov si,0 ; read mode
int 21h ; read disk sector
popa
leave
ret
_ReadSector ENDP
END
| 25.303571
| 59
| 0.65561
|
9dd9206d3cdae141215924f08f1049a2ca4ef4dc
| 45,570
|
asm
|
Assembly
|
P6/P6Judger - 100 testpoints/testpoint/testpoint81.asm
|
flyinglandlord/BUAA-CO-2021
|
1aa28b09762dfb2376ed2aac4126839f0e6fcf93
|
[
"MIT"
] | 5
|
2021-12-05T12:58:26.000Z
|
2022-03-31T02:05:13.000Z
|
P6/P6Judger - 100 testpoints/testpoint/testpoint81.asm
|
OliverDu8-24/BUAA-CO-2021
|
9959abd90de9039d751bab64f153547e76066665
|
[
"MIT"
] | null | null | null |
P6/P6Judger - 100 testpoints/testpoint/testpoint81.asm
|
OliverDu8-24/BUAA-CO-2021
|
9959abd90de9039d751bab64f153547e76066665
|
[
"MIT"
] | 2
|
2021-12-19T11:49:48.000Z
|
2021-12-22T10:25:38.000Z
|
ori $1, $0, 0
ori $2, $0, 12
ori $3, $0, 14
ori $4, $0, 3
sw $3, 0($0)
sw $2, 4($0)
sw $2, 8($0)
sw $2, 12($0)
sw $3, 16($0)
sw $4, 20($0)
sw $3, 24($0)
sw $1, 28($0)
sw $2, 32($0)
sw $2, 36($0)
sw $2, 40($0)
sw $2, 44($0)
sw $4, 48($0)
sw $4, 52($0)
sw $1, 56($0)
sw $1, 60($0)
sw $3, 64($0)
sw $2, 68($0)
sw $2, 72($0)
sw $4, 76($0)
sw $3, 80($0)
sw $4, 84($0)
sw $4, 88($0)
sw $4, 92($0)
sw $1, 96($0)
sw $2, 100($0)
sw $3, 104($0)
sw $4, 108($0)
sw $4, 112($0)
sw $1, 116($0)
sw $3, 120($0)
sw $2, 124($0)
bgez $2, TAG1
sw $2, 0($2)
bgez $2, TAG1
mtlo $2
TAG1:
sh $2, 0($2)
slti $1, $2, 2
sb $2, 0($2)
bgtz $1, TAG2
TAG2:
lui $3, 12
sb $3, 0($1)
sll $0, $0, 0
mfhi $1
TAG3:
lui $4, 5
beq $1, $4, TAG4
mflo $3
sll $0, $0, 0
TAG4:
sw $1, 0($1)
blez $1, TAG5
mthi $1
sltiu $1, $1, 0
TAG5:
mflo $1
mfhi $3
lh $1, 0($1)
beq $3, $1, TAG6
TAG6:
mfhi $3
sh $3, 0($1)
addiu $1, $1, 9
mfhi $2
TAG7:
mtlo $2
lh $4, 0($2)
bgtz $4, TAG8
lw $1, 0($4)
TAG8:
andi $4, $1, 7
mfhi $2
bltz $1, TAG9
lhu $3, 0($2)
TAG9:
lbu $4, 0($3)
and $3, $4, $3
sra $4, $4, 5
lui $4, 11
TAG10:
lui $1, 8
sll $0, $0, 0
blez $2, TAG11
sltiu $3, $2, 6
TAG11:
lb $2, 0($3)
subu $2, $3, $2
sllv $1, $2, $2
sltu $3, $3, $2
TAG12:
mult $3, $3
mtlo $3
mthi $3
sltiu $1, $3, 1
TAG13:
sb $1, 0($1)
andi $1, $1, 8
mfhi $2
bltz $2, TAG14
TAG14:
mfhi $3
lui $2, 2
addu $3, $3, $2
subu $4, $3, $2
TAG15:
sll $2, $4, 14
or $4, $2, $4
sb $4, 0($4)
bgez $4, TAG16
TAG16:
lui $2, 10
sll $1, $2, 3
lui $1, 1
mfhi $1
TAG17:
multu $1, $1
mflo $3
multu $3, $1
lui $4, 11
TAG18:
lui $2, 3
sll $0, $0, 0
beq $2, $2, TAG19
sll $4, $4, 11
TAG19:
bgtz $4, TAG20
mflo $1
mtlo $1
sh $1, 0($4)
TAG20:
addi $2, $1, 6
mthi $2
lhu $1, 0($2)
xor $3, $2, $1
TAG21:
mtlo $3
bgez $3, TAG22
multu $3, $3
bne $3, $3, TAG22
TAG22:
divu $3, $3
ori $3, $3, 12
beq $3, $3, TAG23
sh $3, 0($3)
TAG23:
sllv $4, $3, $3
bgez $4, TAG24
mthi $4
lui $4, 14
TAG24:
lui $2, 3
divu $4, $2
lui $2, 14
beq $2, $2, TAG25
TAG25:
lui $1, 1
sll $0, $0, 0
sll $0, $0, 0
slti $4, $2, 2
TAG26:
slti $3, $4, 1
mult $3, $4
sw $4, 0($4)
mtlo $3
TAG27:
srl $4, $3, 7
mtlo $4
ori $3, $3, 8
slt $3, $3, $3
TAG28:
lh $3, 0($3)
sllv $4, $3, $3
slti $1, $4, 5
sh $3, 0($4)
TAG29:
lb $2, 0($1)
sw $1, 0($2)
mthi $2
slt $4, $2, $1
TAG30:
bne $4, $4, TAG31
ori $1, $4, 10
bne $1, $1, TAG31
mfhi $3
TAG31:
andi $4, $3, 6
xor $1, $3, $4
lbu $3, 0($3)
bne $1, $3, TAG32
TAG32:
xori $2, $3, 10
mfhi $3
lui $2, 0
lh $3, 0($2)
TAG33:
mflo $4
lbu $3, 0($4)
sb $4, 0($3)
mthi $3
TAG34:
mult $3, $3
lui $4, 0
lui $3, 3
beq $3, $4, TAG35
TAG35:
sll $1, $3, 7
or $1, $1, $1
mthi $3
mtlo $3
TAG36:
multu $1, $1
beq $1, $1, TAG37
sll $0, $0, 0
sra $4, $1, 2
TAG37:
slti $3, $4, 10
mthi $4
mthi $4
mflo $1
TAG38:
lui $4, 14
slti $2, $4, 4
lui $3, 15
lui $4, 12
TAG39:
lui $2, 13
sll $0, $0, 0
sll $0, $0, 0
mthi $2
TAG40:
and $2, $2, $2
bne $2, $2, TAG41
mfhi $4
sll $0, $0, 0
TAG41:
blez $4, TAG42
sll $0, $0, 0
mflo $1
bne $1, $4, TAG42
TAG42:
mfhi $1
sll $0, $0, 0
sll $0, $0, 0
bgtz $1, TAG43
TAG43:
mtlo $2
nor $1, $2, $2
and $4, $1, $1
srlv $2, $2, $1
TAG44:
sb $2, 0($2)
lui $3, 5
beq $3, $3, TAG45
sh $2, 0($2)
TAG45:
sllv $1, $3, $3
divu $3, $3
sll $0, $0, 0
lui $1, 13
TAG46:
sll $0, $0, 0
mthi $3
sra $1, $3, 13
blez $1, TAG47
TAG47:
mthi $1
mflo $2
xori $3, $2, 8
multu $2, $3
TAG48:
addiu $4, $3, 13
mult $3, $3
addu $4, $4, $4
bgtz $4, TAG49
TAG49:
mfhi $4
lui $3, 12
mtlo $3
sh $3, 0($4)
TAG50:
sll $0, $0, 0
bgtz $3, TAG51
lb $2, 0($2)
mthi $3
TAG51:
multu $2, $2
bltz $2, TAG52
lui $3, 6
bgtz $2, TAG52
TAG52:
sll $0, $0, 0
or $1, $3, $3
mthi $1
mtlo $3
TAG53:
mtlo $1
mult $1, $1
divu $1, $1
sll $0, $0, 0
TAG54:
sll $2, $2, 8
sw $2, 0($2)
sh $2, 0($2)
mult $2, $2
TAG55:
sb $2, 0($2)
lui $3, 3
sllv $3, $3, $3
mthi $3
TAG56:
mfhi $3
mtlo $3
sll $0, $0, 0
blez $1, TAG57
TAG57:
addu $2, $1, $1
beq $1, $2, TAG58
lui $4, 3
subu $4, $2, $1
TAG58:
mult $4, $4
sll $0, $0, 0
bltz $4, TAG59
sltu $3, $4, $4
TAG59:
sll $3, $3, 1
lb $1, 0($3)
srl $3, $3, 8
mthi $3
TAG60:
lw $2, 0($3)
bne $3, $3, TAG61
lh $3, 0($2)
mfhi $1
TAG61:
lbu $1, 0($1)
sw $1, 0($1)
multu $1, $1
xori $4, $1, 5
TAG62:
lui $3, 4
bne $4, $4, TAG63
addu $3, $4, $3
multu $4, $3
TAG63:
blez $3, TAG64
addu $2, $3, $3
div $3, $3
bgtz $2, TAG64
TAG64:
addu $2, $2, $2
addiu $2, $2, 11
sll $0, $0, 0
mflo $3
TAG65:
addu $3, $3, $3
slti $3, $3, 15
beq $3, $3, TAG66
subu $4, $3, $3
TAG66:
srl $1, $4, 4
mfhi $2
bgtz $2, TAG67
multu $2, $4
TAG67:
mult $2, $2
sub $1, $2, $2
srlv $2, $1, $1
mfhi $3
TAG68:
bne $3, $3, TAG69
lw $2, 0($3)
slt $1, $2, $2
beq $3, $3, TAG69
TAG69:
mfhi $4
mthi $1
andi $1, $4, 15
mult $1, $1
TAG70:
mfhi $1
beq $1, $1, TAG71
lui $3, 11
mflo $4
TAG71:
mult $4, $4
sb $4, 0($4)
sra $4, $4, 10
lh $3, 0($4)
TAG72:
bgtz $3, TAG73
mult $3, $3
sh $3, 0($3)
lui $4, 8
TAG73:
lui $1, 0
sltiu $2, $4, 1
divu $4, $4
sll $0, $0, 0
TAG74:
mtlo $2
sh $2, 0($2)
bgtz $2, TAG75
mtlo $2
TAG75:
lui $3, 13
blez $2, TAG76
xori $3, $3, 11
mfhi $3
TAG76:
lui $3, 9
mult $3, $3
bne $3, $3, TAG77
mtlo $3
TAG77:
xori $2, $3, 9
sll $0, $0, 0
lhu $2, 0($1)
sb $2, 0($2)
TAG78:
mthi $2
lh $3, 0($2)
mtlo $2
blez $2, TAG79
TAG79:
xori $4, $3, 6
lhu $3, 0($4)
xori $4, $4, 5
and $1, $3, $3
TAG80:
mfhi $1
xor $1, $1, $1
lw $4, 0($1)
mtlo $1
TAG81:
blez $4, TAG82
multu $4, $4
lw $4, 0($4)
add $4, $4, $4
TAG82:
mfhi $3
sw $4, 0($3)
beq $4, $4, TAG83
mthi $3
TAG83:
add $1, $3, $3
mtlo $3
mtlo $3
mult $3, $1
TAG84:
mflo $2
mult $2, $1
beq $2, $1, TAG85
srl $2, $2, 8
TAG85:
mtlo $2
beq $2, $2, TAG86
mflo $1
beq $1, $1, TAG86
TAG86:
lh $4, 0($1)
lw $2, 0($1)
mthi $2
ori $2, $2, 15
TAG87:
mfhi $1
mfhi $4
sh $2, 0($1)
bltz $4, TAG88
TAG88:
lui $4, 11
srl $4, $4, 14
mflo $2
srl $1, $2, 2
TAG89:
bltz $1, TAG90
sra $3, $1, 14
srav $2, $1, $3
sb $2, 0($2)
TAG90:
bgtz $2, TAG91
mfhi $4
beq $2, $4, TAG91
mtlo $2
TAG91:
lui $2, 5
multu $4, $2
lh $1, 0($4)
mult $2, $4
TAG92:
xor $2, $1, $1
lb $1, 0($2)
mflo $2
lhu $2, 0($1)
TAG93:
bltz $2, TAG94
addu $3, $2, $2
sh $3, 0($2)
sll $3, $3, 7
TAG94:
beq $3, $3, TAG95
mtlo $3
bne $3, $3, TAG95
subu $1, $3, $3
TAG95:
bne $1, $1, TAG96
lb $3, 0($1)
bgez $1, TAG96
sltu $2, $1, $1
TAG96:
mthi $2
beq $2, $2, TAG97
sra $3, $2, 14
lbu $1, 0($2)
TAG97:
lb $4, 0($1)
mthi $1
sltiu $2, $4, 11
mthi $4
TAG98:
lui $1, 11
beq $1, $1, TAG99
lui $2, 6
sllv $1, $2, $2
TAG99:
lui $1, 2
sll $0, $0, 0
sll $0, $0, 0
beq $1, $4, TAG100
TAG100:
lui $2, 6
bgez $4, TAG101
sh $4, 0($4)
slt $3, $2, $4
TAG101:
mult $3, $3
bne $3, $3, TAG102
sh $3, 0($3)
slt $4, $3, $3
TAG102:
lh $3, 0($4)
add $2, $3, $3
sh $4, 0($2)
sb $3, 0($2)
TAG103:
mfhi $3
mfhi $2
mthi $3
sb $3, 0($2)
TAG104:
bltz $2, TAG105
lui $4, 11
subu $2, $2, $2
mult $4, $2
TAG105:
mfhi $2
lui $3, 15
addu $3, $2, $2
sltiu $4, $3, 11
TAG106:
lui $1, 7
or $2, $4, $1
sll $0, $0, 0
slti $4, $1, 2
TAG107:
mflo $1
lui $1, 9
ori $3, $1, 5
sll $0, $0, 0
TAG108:
sll $0, $0, 0
blez $3, TAG109
lui $1, 11
mfhi $4
TAG109:
mthi $4
bltz $4, TAG110
lui $4, 3
sll $0, $0, 0
TAG110:
sll $0, $0, 0
srav $4, $3, $3
div $4, $4
sll $0, $0, 0
TAG111:
mtlo $4
sb $4, -18432($4)
slti $3, $4, 13
lui $3, 10
TAG112:
mflo $1
bne $3, $1, TAG113
addu $4, $1, $1
add $2, $3, $4
TAG113:
mfhi $1
mtlo $2
lbu $2, 0($1)
lui $3, 2
TAG114:
blez $3, TAG115
sll $2, $3, 1
mtlo $3
xor $4, $2, $2
TAG115:
bgez $4, TAG116
srl $2, $4, 0
lhu $2, 0($4)
sh $2, 0($2)
TAG116:
lhu $1, 0($2)
mult $2, $2
mtlo $2
beq $1, $2, TAG117
TAG117:
mthi $1
sh $1, 0($1)
ori $2, $1, 10
mult $2, $1
TAG118:
lb $3, 0($2)
multu $2, $2
mflo $4
mtlo $4
TAG119:
subu $3, $4, $4
beq $3, $4, TAG120
sw $3, 0($3)
mfhi $4
TAG120:
mtlo $4
lh $4, 0($4)
mult $4, $4
sw $4, 0($4)
TAG121:
lui $2, 1
sh $2, 0($4)
blez $4, TAG122
sll $0, $0, 0
TAG122:
srl $1, $2, 8
lui $4, 11
mtlo $2
mthi $1
TAG123:
slt $1, $4, $4
mflo $2
bne $1, $2, TAG124
ori $2, $2, 8
TAG124:
mthi $2
sll $0, $0, 0
bgez $2, TAG125
sll $0, $0, 0
TAG125:
bltz $3, TAG126
sw $3, 0($3)
mfhi $1
div $3, $1
TAG126:
mthi $1
xori $2, $1, 8
mthi $1
lui $3, 4
TAG127:
slti $2, $3, 10
lui $4, 5
srav $2, $4, $3
lui $4, 14
TAG128:
bne $4, $4, TAG129
lui $1, 14
mfhi $1
srlv $3, $1, $4
TAG129:
mthi $3
bltz $3, TAG130
lui $2, 9
nor $2, $2, $2
TAG130:
sll $0, $0, 0
sll $0, $0, 0
mflo $2
lui $4, 14
TAG131:
bne $4, $4, TAG132
mflo $3
lui $2, 4
bgez $3, TAG132
TAG132:
sll $0, $0, 0
bgtz $2, TAG133
xor $1, $2, $2
bltz $2, TAG133
TAG133:
mflo $2
mult $1, $1
bgtz $2, TAG134
mthi $1
TAG134:
bgtz $2, TAG135
sh $2, 0($2)
sb $2, 0($2)
lui $1, 12
TAG135:
div $1, $1
mult $1, $1
or $3, $1, $1
sra $3, $1, 2
TAG136:
sll $0, $0, 0
mult $3, $1
bltz $3, TAG137
sll $3, $3, 12
TAG137:
lui $1, 1
lui $2, 0
mfhi $1
sll $0, $0, 0
TAG138:
sll $0, $0, 0
sll $0, $0, 0
mthi $2
addi $1, $2, 6
TAG139:
mfhi $3
mtlo $1
mthi $3
blez $3, TAG140
TAG140:
sh $3, 0($3)
nor $4, $3, $3
addu $2, $4, $4
divu $2, $2
TAG141:
bltz $2, TAG142
lh $2, 2($2)
lb $1, 0($2)
bltz $2, TAG142
TAG142:
mtlo $1
div $1, $1
lb $4, 0($1)
lui $3, 7
TAG143:
bgtz $3, TAG144
div $3, $3
lw $4, 0($3)
bne $3, $3, TAG144
TAG144:
lui $3, 13
sltiu $1, $4, 7
mfhi $2
lui $3, 1
TAG145:
mflo $1
mfhi $2
lui $4, 10
sll $0, $0, 0
TAG146:
srl $3, $4, 2
mthi $3
mfhi $1
sll $0, $0, 0
TAG147:
sll $0, $0, 0
bne $3, $3, TAG148
sll $0, $0, 0
beq $2, $2, TAG148
TAG148:
mtlo $2
bgez $2, TAG149
lbu $3, 0($2)
bne $2, $3, TAG149
TAG149:
sh $3, 0($3)
lui $1, 1
sltu $4, $1, $3
mult $1, $1
TAG150:
mult $4, $4
mflo $3
beq $3, $3, TAG151
multu $3, $3
TAG151:
mtlo $3
mflo $3
sltu $2, $3, $3
multu $2, $3
TAG152:
mult $2, $2
bgtz $2, TAG153
lh $4, 0($2)
mfhi $3
TAG153:
sltiu $2, $3, 15
xor $3, $2, $2
lui $4, 15
lui $3, 0
TAG154:
bgez $3, TAG155
mthi $3
andi $1, $3, 11
srl $1, $3, 1
TAG155:
sll $0, $0, 0
mtlo $1
mthi $1
sb $2, 0($2)
TAG156:
mult $2, $2
mthi $2
lui $1, 5
beq $1, $2, TAG157
TAG157:
sll $0, $0, 0
bltz $1, TAG158
sll $0, $0, 0
lui $4, 9
TAG158:
srav $4, $4, $4
sll $0, $0, 0
subu $2, $4, $4
mflo $4
TAG159:
lui $1, 2
sb $4, 0($4)
mfhi $1
bgtz $1, TAG160
TAG160:
sra $4, $1, 3
or $2, $4, $4
addi $4, $4, 10
bgtz $4, TAG161
TAG161:
lbu $2, 0($4)
mfhi $1
addiu $2, $1, 3
mult $1, $2
TAG162:
sh $2, 0($2)
addu $2, $2, $2
subu $3, $2, $2
multu $2, $3
TAG163:
multu $3, $3
lui $4, 13
mflo $4
addu $3, $4, $3
TAG164:
multu $3, $3
sb $3, 0($3)
mfhi $3
sb $3, 0($3)
TAG165:
lhu $1, 0($3)
beq $3, $1, TAG166
ori $2, $1, 10
mtlo $3
TAG166:
lui $3, 5
mfhi $1
mthi $1
mtlo $1
TAG167:
nor $3, $1, $1
addiu $4, $3, 3
sb $1, 0($4)
mthi $4
TAG168:
mflo $2
ori $1, $4, 13
lui $1, 12
sll $0, $0, 0
TAG169:
lui $3, 13
bltz $3, TAG170
mflo $4
bgtz $2, TAG170
TAG170:
lb $3, 0($4)
sh $4, 0($3)
mtlo $4
sh $3, 0($3)
TAG171:
lh $2, 0($3)
multu $2, $3
sw $3, 0($3)
mthi $2
TAG172:
sb $2, 0($2)
mthi $2
lui $1, 7
multu $2, $1
TAG173:
blez $1, TAG174
mflo $3
addiu $2, $1, 9
mflo $1
TAG174:
lui $3, 8
mtlo $1
lui $2, 15
sllv $3, $2, $2
TAG175:
lui $1, 13
srl $3, $3, 0
sllv $3, $3, $3
sll $0, $0, 0
TAG176:
mult $2, $2
div $2, $2
sll $0, $0, 0
lui $3, 11
TAG177:
sll $0, $0, 0
lui $3, 2
sll $0, $0, 0
lui $3, 9
TAG178:
sll $0, $0, 0
mthi $3
sllv $2, $3, $3
lui $3, 13
TAG179:
mthi $3
bgez $3, TAG180
lui $1, 1
sb $3, 0($1)
TAG180:
sll $0, $0, 0
srlv $4, $4, $1
lui $3, 11
sll $0, $0, 0
TAG181:
srl $4, $3, 13
beq $3, $3, TAG182
sll $0, $0, 0
bne $3, $4, TAG182
TAG182:
sb $4, 0($4)
ori $3, $4, 13
sra $3, $4, 4
srl $2, $4, 0
TAG183:
lhu $2, 0($2)
slt $4, $2, $2
mtlo $2
srlv $3, $2, $4
TAG184:
mtlo $3
mflo $2
lw $2, 0($2)
mult $2, $3
TAG185:
lbu $1, 0($2)
addiu $1, $2, 6
mult $1, $2
mflo $3
TAG186:
bgtz $3, TAG187
lui $4, 10
sw $4, 0($4)
xor $3, $3, $4
TAG187:
sb $3, -8272($3)
divu $3, $3
mflo $4
lhu $4, -8272($3)
TAG188:
beq $4, $4, TAG189
lui $2, 4
lui $3, 8
lh $2, 0($3)
TAG189:
sll $0, $0, 0
mfhi $4
slt $2, $2, $2
xor $1, $2, $2
TAG190:
mflo $2
mfhi $1
sb $2, 0($1)
sb $1, 0($2)
TAG191:
addiu $1, $1, 6
sltiu $2, $1, 5
bltz $2, TAG192
mflo $1
TAG192:
mthi $1
mthi $1
multu $1, $1
sb $1, 0($1)
TAG193:
mthi $1
lb $4, 0($1)
div $4, $1
beq $1, $4, TAG194
TAG194:
addu $4, $4, $4
div $4, $4
mthi $4
lhu $3, 0($4)
TAG195:
beq $3, $3, TAG196
addu $1, $3, $3
bltz $1, TAG196
add $3, $3, $3
TAG196:
bne $3, $3, TAG197
sltiu $2, $3, 12
beq $2, $3, TAG197
xori $2, $2, 14
TAG197:
xor $2, $2, $2
sh $2, 0($2)
addi $1, $2, 6
sh $2, 0($2)
TAG198:
beq $1, $1, TAG199
multu $1, $1
sw $1, 0($1)
mtlo $1
TAG199:
mflo $4
mthi $1
addiu $3, $1, 5
lui $4, 0
TAG200:
bgez $4, TAG201
srav $4, $4, $4
blez $4, TAG201
lui $3, 12
TAG201:
or $4, $3, $3
lui $4, 14
multu $4, $4
multu $3, $4
TAG202:
sll $0, $0, 0
sltiu $1, $2, 1
bne $2, $2, TAG203
mtlo $1
TAG203:
bgtz $1, TAG204
andi $3, $1, 11
addu $4, $1, $1
mfhi $3
TAG204:
mflo $4
addiu $4, $3, 11
mthi $3
beq $4, $3, TAG205
TAG205:
lui $1, 9
sltiu $1, $1, 11
mult $1, $1
bltz $4, TAG206
TAG206:
sw $1, 0($1)
mflo $3
ori $1, $1, 11
lui $4, 10
TAG207:
mthi $4
bltz $4, TAG208
sll $0, $0, 0
xori $4, $4, 10
TAG208:
xori $2, $4, 11
xori $3, $2, 0
sll $0, $0, 0
bne $3, $3, TAG209
TAG209:
slt $2, $3, $3
sra $2, $2, 6
beq $3, $2, TAG210
mult $3, $2
TAG210:
mfhi $3
blez $2, TAG211
mfhi $2
srlv $2, $2, $3
TAG211:
mtlo $2
sltu $4, $2, $2
bne $2, $4, TAG212
sw $2, 0($2)
TAG212:
mtlo $4
ori $3, $4, 0
or $4, $3, $4
bgtz $4, TAG213
TAG213:
addiu $3, $4, 5
mflo $1
mfhi $1
beq $1, $3, TAG214
TAG214:
multu $1, $1
mflo $3
bgez $1, TAG215
multu $3, $3
TAG215:
lw $2, 0($3)
beq $2, $2, TAG216
lbu $3, 0($2)
add $4, $3, $3
TAG216:
lw $3, 0($4)
sltiu $4, $3, 12
mfhi $2
beq $2, $4, TAG217
TAG217:
lh $1, 0($2)
mtlo $2
andi $3, $2, 14
bgtz $1, TAG218
TAG218:
mult $3, $3
mult $3, $3
mfhi $1
lui $3, 15
TAG219:
multu $3, $3
sll $0, $0, 0
sll $0, $0, 0
mthi $3
TAG220:
lui $3, 12
mflo $2
bgez $3, TAG221
mflo $4
TAG221:
srlv $1, $4, $4
sb $4, 0($1)
beq $1, $4, TAG222
mfhi $2
TAG222:
mthi $2
sll $2, $2, 12
sll $0, $0, 0
div $2, $2
TAG223:
lhu $1, 0($1)
mult $1, $1
lw $3, 0($1)
sb $1, 0($3)
TAG224:
mtlo $3
bgez $3, TAG225
sra $4, $3, 6
lh $4, 0($4)
TAG225:
nor $2, $4, $4
lui $3, 5
mflo $3
lui $3, 0
TAG226:
lui $3, 3
mflo $4
mult $4, $3
mtlo $3
TAG227:
sh $4, 0($4)
mfhi $3
subu $1, $3, $4
lw $4, 0($3)
TAG228:
lbu $2, 0($4)
mthi $4
lbu $3, 0($4)
srl $4, $4, 9
TAG229:
sw $4, 0($4)
sw $4, 0($4)
mflo $2
mult $2, $4
TAG230:
lui $3, 6
blez $2, TAG231
lui $4, 1
lui $3, 3
TAG231:
lui $1, 0
sll $0, $0, 0
mult $3, $3
sra $4, $1, 14
TAG232:
srl $1, $4, 1
sb $4, 0($4)
mult $1, $1
lhu $1, 0($4)
TAG233:
multu $1, $1
mtlo $1
lh $2, 0($1)
mfhi $3
TAG234:
or $4, $3, $3
lb $1, 0($3)
mflo $3
mflo $1
TAG235:
bne $1, $1, TAG236
ori $4, $1, 9
mtlo $4
lw $1, 0($1)
TAG236:
sh $1, 0($1)
mult $1, $1
slti $3, $1, 8
bltz $3, TAG237
TAG237:
lb $3, 0($3)
xor $3, $3, $3
mult $3, $3
mult $3, $3
TAG238:
andi $3, $3, 1
mthi $3
lbu $3, 0($3)
lh $2, 0($3)
TAG239:
beq $2, $2, TAG240
mtlo $2
lhu $1, 0($2)
lui $2, 9
TAG240:
lb $3, 0($2)
mthi $2
lb $2, 0($3)
add $1, $2, $3
TAG241:
sub $2, $1, $1
xori $4, $1, 11
blez $4, TAG242
addu $2, $1, $1
TAG242:
mfhi $1
nor $4, $2, $1
mult $1, $1
divu $2, $4
TAG243:
mflo $1
bgtz $4, TAG244
xori $3, $4, 0
srl $3, $1, 11
TAG244:
mult $3, $3
bne $3, $3, TAG245
addu $1, $3, $3
mthi $1
TAG245:
bgtz $1, TAG246
mthi $1
sra $4, $1, 13
lui $3, 13
TAG246:
ori $2, $3, 14
bne $2, $2, TAG247
mthi $2
addiu $2, $3, 5
TAG247:
lui $4, 3
divu $2, $4
bltz $4, TAG248
sll $0, $0, 0
TAG248:
bgtz $4, TAG249
addiu $1, $4, 7
slti $1, $1, 4
lhu $4, 0($4)
TAG249:
beq $4, $4, TAG250
sll $0, $0, 0
bgez $4, TAG250
mfhi $1
TAG250:
bgtz $1, TAG251
multu $1, $1
lb $3, 0($1)
bltz $3, TAG251
TAG251:
ori $2, $3, 6
mfhi $1
bltz $1, TAG252
mtlo $2
TAG252:
sb $1, 0($1)
mthi $1
lui $2, 7
divu $2, $2
TAG253:
lui $4, 11
sll $0, $0, 0
ori $2, $2, 15
sll $0, $0, 0
TAG254:
bltz $2, TAG255
sll $0, $0, 0
ori $4, $2, 6
srl $4, $2, 11
TAG255:
sh $4, -224($4)
mult $4, $4
sw $4, -224($4)
lui $3, 11
TAG256:
addiu $2, $3, 10
sll $0, $0, 0
mfhi $1
divu $2, $2
TAG257:
sb $1, 0($1)
sllv $1, $1, $1
beq $1, $1, TAG258
mfhi $1
TAG258:
subu $2, $1, $1
mthi $2
lui $3, 1
sll $0, $0, 0
TAG259:
sw $2, 0($2)
lui $4, 9
mflo $3
srl $2, $4, 1
TAG260:
bne $2, $2, TAG261
mthi $2
sll $0, $0, 0
multu $2, $2
TAG261:
lw $1, 0($1)
mult $1, $1
mtlo $1
lw $2, 0($1)
TAG262:
mfhi $4
lbu $1, 0($2)
lbu $3, 0($4)
bne $4, $2, TAG263
TAG263:
addi $4, $3, 14
bgez $4, TAG264
sh $4, 0($3)
sh $4, 0($4)
TAG264:
bgez $4, TAG265
lh $1, 0($4)
mflo $3
beq $1, $4, TAG265
TAG265:
lb $3, 0($3)
multu $3, $3
lbu $4, 0($3)
lhu $4, 0($4)
TAG266:
divu $4, $4
lui $1, 5
srav $4, $4, $1
srav $3, $1, $1
TAG267:
lui $1, 15
sll $0, $0, 0
bltz $2, TAG268
sll $0, $0, 0
TAG268:
mtlo $2
lw $2, 0($2)
ori $2, $2, 2
mthi $2
TAG269:
srav $3, $2, $2
mfhi $4
beq $3, $3, TAG270
lh $3, 0($4)
TAG270:
lui $1, 0
mult $1, $1
lbu $2, 0($3)
or $2, $1, $2
TAG271:
bltz $2, TAG272
lui $4, 3
mfhi $2
mtlo $2
TAG272:
multu $2, $2
andi $4, $2, 9
sh $2, 0($4)
xori $3, $2, 2
TAG273:
mflo $4
mtlo $3
andi $2, $3, 12
sw $4, 0($4)
TAG274:
mthi $2
mtlo $2
bne $2, $2, TAG275
mthi $2
TAG275:
slt $4, $2, $2
mthi $2
bgtz $2, TAG276
mthi $2
TAG276:
sra $2, $4, 3
sb $2, 0($2)
sb $4, 0($2)
bgez $2, TAG277
TAG277:
lui $3, 0
mthi $2
lb $1, 0($3)
addiu $4, $3, 7
TAG278:
lui $1, 9
lb $3, 0($4)
lb $3, 0($4)
beq $3, $3, TAG279
TAG279:
addu $1, $3, $3
bgez $1, TAG280
lb $2, 0($1)
beq $1, $2, TAG280
TAG280:
mflo $4
lui $1, 3
bne $4, $2, TAG281
srl $2, $4, 9
TAG281:
bne $2, $2, TAG282
lb $2, 0($2)
mflo $2
ori $3, $2, 15
TAG282:
lui $1, 15
div $3, $1
sb $3, 0($3)
bne $1, $1, TAG283
TAG283:
and $2, $1, $1
bltz $2, TAG284
lui $4, 15
lui $3, 12
TAG284:
sllv $3, $3, $3
blez $3, TAG285
sll $0, $0, 0
bgez $3, TAG285
TAG285:
mtlo $3
sll $0, $0, 0
slt $3, $3, $3
sh $3, 0($3)
TAG286:
slti $4, $3, 9
mflo $4
mthi $4
xori $3, $4, 7
TAG287:
blez $3, TAG288
mthi $3
beq $3, $3, TAG288
sltu $2, $3, $3
TAG288:
sw $2, 0($2)
or $4, $2, $2
mthi $4
mflo $1
TAG289:
mtlo $1
bne $1, $1, TAG290
mult $1, $1
sll $0, $0, 0
TAG290:
beq $2, $2, TAG291
mfhi $1
bltz $1, TAG291
mfhi $3
TAG291:
bne $3, $3, TAG292
sll $0, $0, 0
mthi $3
mthi $3
TAG292:
multu $3, $3
bne $3, $3, TAG293
nor $3, $3, $3
sll $0, $0, 0
TAG293:
bgtz $1, TAG294
sra $1, $1, 9
beq $1, $1, TAG294
slt $1, $1, $1
TAG294:
lui $4, 12
lb $2, 0($1)
lui $2, 15
sll $4, $4, 11
TAG295:
addiu $1, $4, 1
mfhi $1
mflo $2
lb $1, -144($1)
TAG296:
multu $1, $1
andi $1, $1, 3
ori $4, $1, 6
mult $4, $4
TAG297:
divu $4, $4
lh $3, 0($4)
sh $4, 0($4)
bgez $3, TAG298
TAG298:
sllv $3, $3, $3
mthi $3
bgtz $3, TAG299
addi $2, $3, 12
TAG299:
lbu $4, 0($2)
bgez $4, TAG300
mfhi $3
beq $4, $2, TAG300
TAG300:
mthi $3
and $1, $3, $3
mult $3, $1
bne $3, $1, TAG301
TAG301:
sll $1, $1, 0
bltz $1, TAG302
addiu $3, $1, 7
sb $1, 0($3)
TAG302:
and $2, $3, $3
lbu $2, 0($3)
beq $3, $3, TAG303
div $3, $3
TAG303:
sh $2, 0($2)
lui $3, 14
mfhi $3
multu $2, $3
TAG304:
mflo $2
lhu $3, 0($2)
mfhi $2
xori $1, $2, 2
TAG305:
mfhi $1
mfhi $2
bgtz $1, TAG306
andi $3, $2, 3
TAG306:
beq $3, $3, TAG307
lb $2, 0($3)
divu $2, $2
sw $3, 0($2)
TAG307:
beq $2, $2, TAG308
mtlo $2
divu $2, $2
lui $1, 15
TAG308:
ori $3, $1, 2
bltz $3, TAG309
sb $3, 0($3)
lb $2, 0($1)
TAG309:
lw $4, 0($2)
mflo $1
lw $1, 0($2)
sll $0, $0, 0
TAG310:
sll $0, $0, 0
beq $1, $1, TAG311
srav $1, $1, $1
beq $1, $1, TAG311
TAG311:
and $3, $1, $1
mflo $2
bne $2, $3, TAG312
mfhi $2
TAG312:
beq $2, $2, TAG313
lh $2, 0($2)
lui $2, 6
div $2, $2
TAG313:
bltz $2, TAG314
lui $2, 7
lui $2, 14
mthi $2
TAG314:
bgez $2, TAG315
sll $0, $0, 0
bne $2, $2, TAG315
sh $2, 0($2)
TAG315:
sll $1, $3, 7
bne $3, $1, TAG316
mult $1, $3
mflo $2
TAG316:
beq $2, $2, TAG317
lui $1, 4
mthi $2
div $2, $1
TAG317:
mflo $3
multu $1, $3
mfhi $4
bne $4, $4, TAG318
TAG318:
and $3, $4, $4
mfhi $2
mtlo $4
addiu $3, $2, 5
TAG319:
bne $3, $3, TAG320
multu $3, $3
addu $1, $3, $3
andi $1, $3, 13
TAG320:
lui $3, 1
sll $0, $0, 0
bgtz $3, TAG321
lui $2, 10
TAG321:
mflo $1
mthi $2
bne $2, $1, TAG322
lbu $3, 0($1)
TAG322:
mult $3, $3
multu $3, $3
multu $3, $3
multu $3, $3
TAG323:
sh $3, 0($3)
bgez $3, TAG324
lui $4, 10
mflo $2
TAG324:
mtlo $2
mthi $2
bltz $2, TAG325
mthi $2
TAG325:
sll $0, $0, 0
divu $3, $2
bltz $3, TAG326
nor $1, $3, $2
TAG326:
lui $1, 4
multu $1, $1
sll $0, $0, 0
mfhi $2
TAG327:
mult $2, $2
mflo $1
slti $4, $1, 12
mthi $4
TAG328:
mult $4, $4
mflo $2
multu $2, $4
sb $4, 0($4)
TAG329:
mult $2, $2
lhu $3, 0($2)
sw $3, 0($3)
add $3, $2, $3
TAG330:
mtlo $3
sb $3, 0($3)
bne $3, $3, TAG331
multu $3, $3
TAG331:
sh $3, 0($3)
addu $1, $3, $3
bltz $3, TAG332
lh $1, 0($1)
TAG332:
mthi $1
lui $2, 14
lh $1, 0($1)
sll $0, $0, 0
TAG333:
beq $1, $1, TAG334
sw $1, 0($1)
sw $1, 0($1)
mflo $3
TAG334:
multu $3, $3
bne $3, $3, TAG335
sra $1, $3, 8
andi $1, $3, 13
TAG335:
bgez $1, TAG336
lui $1, 8
mfhi $3
mtlo $3
TAG336:
mult $3, $3
addu $4, $3, $3
lh $3, 0($4)
lui $3, 4
TAG337:
bne $3, $3, TAG338
sra $3, $3, 5
mflo $2
bgtz $3, TAG338
TAG338:
mflo $4
xori $3, $4, 9
lh $1, 0($2)
lui $1, 3
TAG339:
lui $2, 4
lui $3, 11
addu $1, $1, $2
sll $0, $0, 0
TAG340:
multu $1, $1
addu $2, $1, $1
mflo $4
mtlo $4
TAG341:
mthi $4
bgez $4, TAG342
sw $4, 0($4)
mthi $4
TAG342:
bgez $4, TAG343
sra $2, $4, 12
sw $2, 0($2)
lui $4, 2
TAG343:
mthi $4
and $4, $4, $4
lui $1, 0
mflo $4
TAG344:
mfhi $4
bltz $4, TAG345
mfhi $3
lui $3, 14
TAG345:
mflo $3
sh $3, 0($3)
sltu $3, $3, $3
and $4, $3, $3
TAG346:
lbu $3, 0($4)
lbu $2, 0($3)
mflo $4
sw $4, 0($3)
TAG347:
mthi $4
lhu $1, 0($4)
lui $4, 3
bgtz $1, TAG348
TAG348:
addu $2, $4, $4
beq $2, $2, TAG349
sll $0, $0, 0
lhu $3, 0($4)
TAG349:
sb $3, 0($3)
blez $3, TAG350
xori $4, $3, 3
lui $2, 14
TAG350:
xor $1, $2, $2
multu $1, $2
addiu $4, $2, 10
mthi $1
TAG351:
xor $4, $4, $4
blez $4, TAG352
sw $4, 0($4)
sra $4, $4, 6
TAG352:
add $2, $4, $4
multu $2, $4
sw $2, 0($4)
mfhi $4
TAG353:
slti $4, $4, 9
sra $3, $4, 2
multu $4, $3
lui $1, 8
TAG354:
addiu $3, $1, 5
multu $1, $1
sll $0, $0, 0
sltu $2, $1, $3
TAG355:
mflo $1
mtlo $2
beq $2, $2, TAG356
mfhi $4
TAG356:
sh $4, 0($4)
bgez $4, TAG357
lui $2, 3
mult $2, $4
TAG357:
mflo $4
mfhi $3
lui $1, 5
sll $0, $0, 0
TAG358:
sll $2, $1, 6
mflo $2
mfhi $3
mflo $2
TAG359:
sb $2, 0($2)
beq $2, $2, TAG360
lui $3, 15
lui $3, 12
TAG360:
lui $3, 9
sll $0, $0, 0
bltz $3, TAG361
sll $0, $0, 0
TAG361:
srl $2, $1, 3
sllv $4, $2, $1
bne $4, $4, TAG362
sll $0, $0, 0
TAG362:
beq $4, $4, TAG363
mfhi $1
bgez $4, TAG363
lw $3, 0($4)
TAG363:
divu $3, $3
sll $0, $0, 0
sll $0, $0, 0
bgez $2, TAG364
TAG364:
mflo $4
sltiu $3, $2, 6
sll $0, $0, 0
mfhi $3
TAG365:
sh $3, 0($3)
lui $1, 7
sltiu $4, $1, 11
addi $2, $3, 8
TAG366:
addu $2, $2, $2
lbu $4, 0($2)
lui $4, 2
addu $3, $4, $4
TAG367:
mult $3, $3
div $3, $3
sll $0, $0, 0
sll $0, $0, 0
TAG368:
beq $3, $3, TAG369
divu $3, $3
lb $3, 0($3)
sh $3, 0($3)
TAG369:
bgtz $3, TAG370
sll $0, $0, 0
sb $2, 0($3)
sb $3, 0($3)
TAG370:
sb $2, 0($2)
divu $2, $2
lui $3, 3
srlv $3, $3, $2
TAG371:
sllv $1, $3, $3
sra $2, $3, 15
mfhi $2
sb $2, 0($2)
TAG372:
beq $2, $2, TAG373
lhu $2, 0($2)
andi $1, $2, 8
lui $4, 15
TAG373:
lui $2, 15
sll $0, $0, 0
mtlo $3
lui $2, 4
TAG374:
lui $2, 1
lui $3, 4
mflo $2
sb $3, 0($2)
TAG375:
lui $1, 14
mfhi $2
srlv $2, $2, $1
beq $2, $2, TAG376
TAG376:
srl $2, $2, 5
mthi $2
mflo $4
mtlo $2
TAG377:
lui $1, 0
sltiu $4, $4, 0
mtlo $4
lui $3, 14
TAG378:
sll $0, $0, 0
addiu $2, $3, 14
divu $3, $3
sll $0, $0, 0
TAG379:
bne $1, $1, TAG380
sb $1, 0($1)
lhu $1, 0($1)
lui $2, 5
TAG380:
bne $2, $2, TAG381
subu $2, $2, $2
multu $2, $2
lui $4, 2
TAG381:
sltiu $4, $4, 1
mfhi $4
bgez $4, TAG382
mfhi $2
TAG382:
blez $2, TAG383
lui $1, 6
beq $1, $1, TAG383
lb $4, 0($1)
TAG383:
lui $3, 6
nor $2, $4, $3
bgez $3, TAG384
mthi $2
TAG384:
mfhi $1
mflo $2
sltiu $3, $1, 3
beq $1, $2, TAG385
TAG385:
slti $1, $3, 8
lui $4, 3
slt $2, $4, $3
mthi $1
TAG386:
lui $1, 6
mthi $1
bgtz $1, TAG387
multu $2, $2
TAG387:
sll $0, $0, 0
addiu $3, $1, 11
mthi $1
sll $0, $0, 0
TAG388:
bne $3, $3, TAG389
mflo $1
beq $1, $3, TAG389
subu $2, $3, $1
TAG389:
mfhi $4
beq $4, $4, TAG390
sll $0, $0, 0
sh $4, 0($4)
TAG390:
sltu $1, $4, $4
lui $3, 6
mthi $1
mtlo $1
TAG391:
bne $3, $3, TAG392
mfhi $3
lhu $3, 0($3)
mult $3, $3
TAG392:
sub $2, $3, $3
mtlo $2
mthi $2
mfhi $3
TAG393:
mthi $3
bgtz $3, TAG394
sltu $3, $3, $3
lui $1, 13
TAG394:
mthi $1
sll $0, $0, 0
mfhi $4
sll $0, $0, 0
TAG395:
bne $2, $2, TAG396
lh $3, 0($2)
mult $2, $2
sw $3, 0($3)
TAG396:
andi $2, $3, 1
mtlo $3
lhu $4, 0($2)
mthi $2
TAG397:
mthi $4
bgez $4, TAG398
lui $3, 2
bgtz $4, TAG398
TAG398:
sll $0, $0, 0
sll $0, $0, 0
lui $3, 3
sll $0, $0, 0
TAG399:
sw $4, 0($4)
lhu $3, 0($4)
xori $4, $4, 6
sh $4, 0($4)
TAG400:
sllv $3, $4, $4
srlv $4, $3, $4
lb $1, -384($3)
lhu $2, 0($4)
TAG401:
and $1, $2, $2
srav $2, $1, $1
bne $2, $2, TAG402
mfhi $3
TAG402:
bne $3, $3, TAG403
srl $2, $3, 11
sll $4, $2, 14
bgtz $4, TAG403
TAG403:
multu $4, $4
bne $4, $4, TAG404
ori $2, $4, 7
sh $4, 0($4)
TAG404:
mtlo $2
bne $2, $2, TAG405
subu $1, $2, $2
andi $1, $1, 13
TAG405:
lui $3, 4
bne $1, $1, TAG406
mthi $1
bltz $1, TAG406
TAG406:
addiu $3, $3, 11
mtlo $3
lui $3, 3
mtlo $3
TAG407:
bltz $3, TAG408
sll $0, $0, 0
multu $3, $3
lui $1, 2
TAG408:
mult $1, $1
bltz $1, TAG409
mfhi $3
lui $1, 2
TAG409:
ori $2, $1, 5
beq $2, $1, TAG410
mthi $1
ori $3, $1, 5
TAG410:
bne $3, $3, TAG411
srlv $3, $3, $3
mtlo $3
mflo $4
TAG411:
div $4, $4
bgez $4, TAG412
lbu $3, -4096($4)
mfhi $4
TAG412:
lui $3, 10
sll $0, $0, 0
sll $0, $0, 0
lui $2, 3
TAG413:
beq $2, $2, TAG414
lui $3, 3
mtlo $3
lb $3, 0($2)
TAG414:
lui $2, 7
div $3, $3
mult $3, $2
slt $2, $3, $2
TAG415:
beq $2, $2, TAG416
lui $4, 0
addi $2, $2, 13
bgtz $4, TAG416
TAG416:
mtlo $2
sb $2, 0($2)
bne $2, $2, TAG417
lui $3, 2
TAG417:
sll $0, $0, 0
xori $1, $3, 7
sll $0, $0, 0
mtlo $1
TAG418:
beq $1, $1, TAG419
sll $0, $0, 0
mult $1, $1
mflo $2
TAG419:
xori $1, $2, 7
bne $1, $2, TAG420
lbu $2, 0($2)
mthi $2
TAG420:
lui $4, 13
divu $4, $2
mflo $3
bgtz $2, TAG421
TAG421:
sll $0, $0, 0
sll $0, $0, 0
mthi $3
bne $3, $2, TAG422
TAG422:
multu $2, $2
srl $3, $2, 13
sb $2, 0($2)
bne $2, $2, TAG423
TAG423:
lbu $2, 0($3)
mult $3, $2
sll $2, $2, 7
mult $3, $3
TAG424:
bgtz $2, TAG425
add $1, $2, $2
multu $1, $2
multu $1, $1
TAG425:
sb $1, 0($1)
bne $1, $1, TAG426
addiu $4, $1, 5
mfhi $1
TAG426:
lui $1, 11
mflo $4
mtlo $4
sltiu $2, $1, 12
TAG427:
mfhi $3
sw $3, 0($3)
beq $2, $3, TAG428
mtlo $2
TAG428:
lb $4, 0($3)
bne $3, $3, TAG429
mult $3, $4
bne $3, $3, TAG429
TAG429:
sw $4, 0($4)
bgtz $4, TAG430
multu $4, $4
sb $4, 0($4)
TAG430:
andi $3, $4, 7
lui $3, 6
divu $3, $3
lui $4, 4
TAG431:
bgtz $4, TAG432
mfhi $2
xori $3, $2, 11
mfhi $2
TAG432:
or $4, $2, $2
lbu $3, 0($4)
and $1, $3, $2
mthi $1
TAG433:
lui $1, 3
bne $1, $1, TAG434
mfhi $1
bne $1, $1, TAG434
TAG434:
sb $1, 0($1)
srav $1, $1, $1
bne $1, $1, TAG435
mthi $1
TAG435:
addiu $2, $1, 3
blez $2, TAG436
lbu $2, 0($1)
lh $4, 0($1)
TAG436:
srav $3, $4, $4
srl $1, $3, 6
sra $1, $4, 4
bgtz $4, TAG437
TAG437:
add $1, $1, $1
sh $1, 0($1)
beq $1, $1, TAG438
and $1, $1, $1
TAG438:
andi $3, $1, 13
lui $4, 4
mfhi $1
sw $1, 0($1)
TAG439:
blez $1, TAG440
lui $2, 12
and $3, $1, $2
mtlo $2
TAG440:
bne $3, $3, TAG441
nor $4, $3, $3
sb $3, 1($4)
sw $4, 0($3)
TAG441:
slt $2, $4, $4
bgtz $2, TAG442
sw $2, 1($4)
bne $4, $4, TAG442
TAG442:
mtlo $2
mtlo $2
srl $2, $2, 9
bne $2, $2, TAG443
TAG443:
ori $4, $2, 7
divu $4, $4
beq $2, $4, TAG444
mfhi $2
TAG444:
lui $1, 15
or $2, $1, $1
lui $1, 13
beq $1, $2, TAG445
TAG445:
lui $1, 6
lui $1, 8
mfhi $1
lh $1, 0($1)
TAG446:
beq $1, $1, TAG447
ori $4, $1, 11
div $1, $4
sh $4, 0($4)
TAG447:
addu $1, $4, $4
mthi $4
mthi $1
slti $1, $1, 10
TAG448:
mtlo $1
sh $1, 0($1)
lui $4, 4
sll $0, $0, 0
TAG449:
bltz $4, TAG450
sll $0, $0, 0
sllv $1, $4, $2
mfhi $4
TAG450:
bgez $4, TAG451
sltiu $4, $4, 10
beq $4, $4, TAG451
lui $4, 0
TAG451:
mtlo $4
lui $1, 0
mflo $4
sub $3, $4, $1
TAG452:
beq $3, $3, TAG453
mthi $3
sub $2, $3, $3
bne $3, $2, TAG453
TAG453:
and $4, $2, $2
div $4, $4
sltiu $3, $4, 4
mflo $3
TAG454:
lbu $4, 0($3)
bne $4, $4, TAG455
sh $4, 0($4)
bne $4, $3, TAG455
TAG455:
addu $2, $4, $4
mult $2, $2
blez $2, TAG456
slt $2, $2, $2
TAG456:
lui $1, 8
mult $2, $1
or $4, $2, $2
sll $0, $0, 0
TAG457:
bltz $2, TAG458
sltu $3, $2, $2
sll $4, $2, 15
sh $4, 0($2)
TAG458:
lui $3, 3
lhu $1, 0($4)
lui $2, 5
mtlo $4
TAG459:
sll $0, $0, 0
bgez $2, TAG460
divu $2, $2
beq $2, $2, TAG460
TAG460:
srl $4, $2, 9
subu $3, $4, $2
subu $2, $2, $4
mthi $3
TAG461:
subu $3, $2, $2
lhu $2, 0($3)
beq $2, $2, TAG462
sltiu $2, $2, 1
TAG462:
slti $2, $2, 6
sltu $1, $2, $2
beq $1, $1, TAG463
sb $1, 0($2)
TAG463:
bne $1, $1, TAG464
sh $1, 0($1)
mfhi $2
multu $2, $1
TAG464:
mtlo $2
mthi $2
ori $4, $2, 15
divu $2, $2
TAG465:
or $4, $4, $4
mfhi $3
beq $3, $3, TAG466
mult $3, $4
TAG466:
multu $3, $3
multu $3, $3
lui $1, 11
mult $1, $1
TAG467:
blez $1, TAG468
mult $1, $1
sll $0, $0, 0
srlv $3, $1, $1
TAG468:
sll $0, $0, 0
sll $0, $0, 0
sll $0, $0, 0
mthi $3
TAG469:
sll $0, $0, 0
bltz $4, TAG470
sltiu $4, $4, 7
mthi $4
TAG470:
mflo $2
ori $3, $2, 2
lw $2, 0($4)
lui $4, 2
TAG471:
bgez $4, TAG472
sll $0, $0, 0
lb $4, 0($4)
blez $4, TAG472
TAG472:
divu $4, $4
bltz $4, TAG473
multu $4, $4
mfhi $4
TAG473:
mthi $4
beq $4, $4, TAG474
sb $4, 0($4)
sra $2, $4, 12
TAG474:
mthi $2
mult $2, $2
bltz $2, TAG475
mthi $2
TAG475:
multu $2, $2
sub $4, $2, $2
xor $3, $2, $2
slti $4, $4, 1
TAG476:
mult $4, $4
srav $3, $4, $4
mfhi $2
subu $1, $2, $3
TAG477:
lui $3, 13
div $1, $3
bgez $3, TAG478
nor $1, $1, $3
TAG478:
lui $3, 2
sll $0, $0, 0
bne $1, $1, TAG479
div $3, $1
TAG479:
addiu $3, $3, 10
sll $0, $0, 0
bltz $4, TAG480
lbu $3, 0($4)
TAG480:
lui $4, 1
bne $4, $3, TAG481
xori $1, $4, 4
and $2, $4, $4
TAG481:
sh $2, 0($2)
or $2, $2, $2
andi $1, $2, 11
mthi $2
TAG482:
mfhi $4
mthi $4
lhu $3, 0($1)
multu $4, $1
TAG483:
blez $3, TAG484
lui $3, 8
sb $3, 0($3)
bgtz $3, TAG484
TAG484:
addu $1, $3, $3
mult $3, $3
sll $0, $0, 0
bgtz $3, TAG485
TAG485:
lui $4, 10
xori $1, $4, 13
lh $4, 0($2)
lh $1, 0($4)
TAG486:
bgtz $1, TAG487
mflo $1
lh $2, 0($1)
sh $1, 0($1)
TAG487:
mfhi $4
ori $2, $4, 13
lb $3, 0($2)
bgtz $4, TAG488
TAG488:
ori $3, $3, 14
or $3, $3, $3
sb $3, 0($3)
andi $1, $3, 10
TAG489:
lh $4, 0($1)
subu $4, $1, $1
addiu $1, $1, 6
sh $1, 0($1)
TAG490:
slt $3, $1, $1
mthi $1
mult $3, $3
beq $3, $1, TAG491
TAG491:
multu $3, $3
bltz $3, TAG492
mthi $3
mthi $3
TAG492:
beq $3, $3, TAG493
mflo $2
sh $2, 0($2)
mthi $3
TAG493:
sh $2, 0($2)
andi $4, $2, 6
mult $4, $4
sltiu $2, $2, 14
TAG494:
sb $2, 0($2)
lb $1, 0($2)
srav $1, $2, $1
sllv $3, $1, $2
TAG495:
bne $3, $3, TAG496
addiu $1, $3, 6
beq $3, $3, TAG496
mflo $4
TAG496:
ori $3, $4, 9
mtlo $3
sw $3, 0($4)
srlv $1, $3, $4
TAG497:
sltu $1, $1, $1
srlv $2, $1, $1
bgez $2, TAG498
mult $1, $2
TAG498:
sb $2, 0($2)
bne $2, $2, TAG499
mflo $3
lui $2, 4
TAG499:
divu $2, $2
bgez $2, TAG500
mtlo $2
sh $2, 0($2)
TAG500:
multu $2, $2
lui $3, 12
lui $3, 7
sll $2, $3, 15
TAG501:
blez $2, TAG502
mthi $2
bgez $2, TAG502
addiu $2, $2, 14
TAG502:
bne $2, $2, TAG503
nor $3, $2, $2
andi $4, $2, 8
divu $2, $2
TAG503:
bne $4, $4, TAG504
addiu $4, $4, 1
multu $4, $4
mtlo $4
TAG504:
bgez $4, TAG505
mult $4, $4
lb $2, 0($4)
lbu $1, 0($2)
TAG505:
mtlo $1
sllv $1, $1, $1
sw $1, 0($1)
xor $2, $1, $1
TAG506:
bne $2, $2, TAG507
mthi $2
bgez $2, TAG507
lui $3, 11
TAG507:
lui $1, 7
mult $3, $1
mtlo $3
addiu $2, $1, 2
TAG508:
sll $0, $0, 0
and $4, $2, $3
mfhi $4
mfhi $2
TAG509:
sb $2, 0($2)
mthi $2
mfhi $2
lui $4, 10
TAG510:
blez $4, TAG511
sll $0, $0, 0
sll $0, $0, 0
addiu $4, $4, 14
TAG511:
bgez $4, TAG512
sll $0, $0, 0
addiu $2, $4, 0
addu $4, $4, $4
TAG512:
bne $4, $4, TAG513
lui $1, 13
blez $1, TAG513
mtlo $1
TAG513:
mtlo $1
div $1, $1
blez $1, TAG514
sll $0, $0, 0
TAG514:
divu $4, $4
multu $4, $4
sll $0, $0, 0
mtlo $3
TAG515:
sll $0, $0, 0
mflo $1
sll $0, $0, 0
sll $0, $0, 0
TAG516:
subu $1, $1, $1
lui $2, 1
sll $0, $0, 0
bgez $1, TAG517
TAG517:
sub $2, $1, $1
lbu $1, 0($1)
lh $3, 0($2)
multu $3, $3
TAG518:
bne $3, $3, TAG519
slt $1, $3, $3
bne $1, $1, TAG519
mthi $1
TAG519:
lui $4, 7
lui $4, 5
beq $4, $4, TAG520
sltiu $1, $4, 3
TAG520:
blez $1, TAG521
lb $4, 0($1)
sll $1, $4, 12
addi $3, $1, 2
TAG521:
bltz $3, TAG522
mthi $3
sb $3, 0($3)
mult $3, $3
TAG522:
slt $1, $3, $3
bne $3, $1, TAG523
sh $3, 0($1)
slt $4, $1, $1
TAG523:
mult $4, $4
sw $4, 0($4)
lbu $1, 0($4)
multu $1, $1
TAG524:
mthi $1
lw $1, 0($1)
bltz $1, TAG525
sw $1, 0($1)
TAG525:
mflo $2
mfhi $1
mflo $4
beq $1, $4, TAG526
TAG526:
sw $4, 0($4)
bgez $4, TAG527
mthi $4
lui $4, 0
TAG527:
mtlo $4
beq $4, $4, TAG528
sb $4, 0($4)
divu $4, $4
TAG528:
mflo $1
mfhi $2
sh $4, 0($4)
lui $3, 7
TAG529:
addiu $1, $3, 15
srl $2, $3, 0
mflo $3
addi $3, $3, 2
TAG530:
sh $3, 0($3)
lbu $4, 0($3)
sh $4, 0($4)
beq $4, $3, TAG531
TAG531:
sll $2, $4, 13
and $1, $4, $2
beq $4, $2, TAG532
srlv $1, $2, $4
TAG532:
mthi $1
andi $3, $1, 8
multu $1, $3
sh $3, -4096($1)
TAG533:
multu $3, $3
mthi $3
slti $2, $3, 7
sb $2, 0($2)
TAG534:
lui $1, 13
bgez $1, TAG535
sb $2, 0($2)
lh $3, 0($1)
TAG535:
mult $3, $3
lui $3, 10
lui $1, 5
sll $0, $0, 0
TAG536:
addu $4, $4, $4
or $2, $4, $4
mthi $2
addu $2, $4, $4
TAG537:
mthi $2
sllv $3, $2, $2
sltiu $1, $2, 10
lbu $3, 0($1)
TAG538:
multu $3, $3
lui $1, 14
mflo $2
mtlo $3
TAG539:
lui $4, 8
bltz $2, TAG540
subu $2, $2, $2
sll $0, $0, 0
TAG540:
mfhi $3
multu $3, $2
mfhi $4
bgez $2, TAG541
TAG541:
sh $4, 0($4)
lh $2, 0($4)
lui $4, 3
mflo $1
TAG542:
mult $1, $1
bne $1, $1, TAG543
sw $1, 0($1)
beq $1, $1, TAG543
TAG543:
sub $3, $1, $1
srl $2, $3, 10
lhu $4, 0($1)
mthi $2
TAG544:
mult $4, $4
lui $3, 5
bne $4, $3, TAG545
sw $3, 0($4)
TAG545:
sll $0, $0, 0
mult $2, $2
addiu $1, $3, 1
mtlo $1
TAG546:
beq $1, $1, TAG547
mult $1, $1
lui $1, 4
bgez $1, TAG547
TAG547:
sra $4, $1, 11
divu $1, $4
lbu $4, -160($4)
mfhi $2
TAG548:
multu $2, $2
xori $2, $2, 10
sb $2, 0($2)
sb $2, 0($2)
TAG549:
nor $3, $2, $2
mfhi $3
bne $2, $3, TAG550
addiu $1, $3, 5
TAG550:
lb $4, 0($1)
slti $4, $4, 2
mfhi $4
mfhi $2
TAG551:
sll $2, $2, 15
sb $2, 0($2)
mfhi $1
multu $1, $2
TAG552:
sltu $4, $1, $1
lui $4, 3
srl $3, $1, 10
addu $1, $3, $4
TAG553:
sll $0, $0, 0
addu $3, $1, $1
multu $1, $1
addu $3, $1, $1
TAG554:
sll $0, $0, 0
srl $1, $3, 12
mult $1, $3
and $4, $1, $1
TAG555:
mfhi $2
mfhi $1
mflo $4
beq $1, $2, TAG556
TAG556:
sll $0, $0, 0
bne $3, $3, TAG557
srl $2, $4, 6
addiu $4, $2, 14
TAG557:
lui $4, 1
lui $2, 4
divu $2, $2
xor $4, $4, $2
TAG558:
beq $4, $4, TAG559
sll $0, $0, 0
mtlo $4
sb $4, 0($4)
TAG559:
divu $4, $4
sll $0, $0, 0
bltz $4, TAG560
sll $0, $0, 0
TAG560:
xori $4, $4, 10
mthi $4
sll $0, $0, 0
xori $2, $4, 14
TAG561:
lui $2, 6
beq $2, $2, TAG562
slti $3, $2, 15
lui $2, 14
TAG562:
bltz $2, TAG563
sll $0, $0, 0
multu $2, $2
mthi $2
TAG563:
slt $3, $2, $2
lui $4, 4
lw $3, 0($3)
sll $0, $0, 0
TAG564:
bltz $3, TAG565
div $3, $3
subu $4, $3, $3
andi $3, $3, 10
TAG565:
multu $3, $3
slti $3, $3, 12
addiu $3, $3, 5
blez $3, TAG566
TAG566:
lui $1, 14
blez $1, TAG567
sb $1, 0($3)
sltiu $3, $3, 7
TAG567:
lbu $1, 0($3)
multu $3, $3
lui $3, 9
div $3, $3
TAG568:
sll $0, $0, 0
lui $3, 3
lui $2, 15
multu $3, $3
TAG569:
srav $3, $2, $2
mult $3, $3
bgtz $2, TAG570
slti $4, $2, 12
TAG570:
mult $4, $4
and $3, $4, $4
sb $4, 0($3)
sb $4, 0($3)
TAG571:
mthi $3
lh $3, 0($3)
srlv $2, $3, $3
srav $3, $3, $3
TAG572:
bne $3, $3, TAG573
mthi $3
mthi $3
or $4, $3, $3
TAG573:
mtlo $4
lui $2, 13
mflo $4
sub $4, $4, $4
TAG574:
lui $3, 11
sll $0, $0, 0
sll $0, $0, 0
blez $4, TAG575
TAG575:
addiu $2, $3, 5
and $2, $3, $2
sll $0, $0, 0
bgez $2, TAG576
TAG576:
mflo $2
addiu $2, $3, 14
sll $0, $0, 0
sltu $3, $2, $2
TAG577:
mult $3, $3
nor $2, $3, $3
lui $3, 15
sll $0, $0, 0
TAG578:
sll $0, $0, 0
mult $3, $3
mtlo $3
nor $3, $3, $3
TAG579:
and $3, $3, $3
sll $0, $0, 0
addiu $2, $3, 3
mfhi $1
TAG580:
sb $1, -225($1)
bne $1, $1, TAG581
lui $3, 4
lhu $3, -225($1)
TAG581:
mthi $3
bltz $3, TAG582
sltiu $4, $3, 3
mtlo $3
TAG582:
sltu $3, $4, $4
mtlo $3
mult $3, $4
sll $3, $3, 4
TAG583:
mtlo $3
beq $3, $3, TAG584
mthi $3
srav $4, $3, $3
TAG584:
or $1, $4, $4
bgez $1, TAG585
ori $4, $1, 11
sw $4, 0($1)
TAG585:
lb $4, 0($4)
lbu $3, 0($4)
lui $3, 14
sb $4, 0($4)
TAG586:
divu $3, $3
sll $0, $0, 0
mflo $3
blez $3, TAG587
TAG587:
sra $3, $3, 11
lh $3, 0($3)
mflo $3
ori $1, $3, 0
TAG588:
bne $1, $1, TAG589
and $3, $1, $1
slti $1, $3, 1
sra $3, $1, 3
TAG589:
subu $3, $3, $3
bne $3, $3, TAG590
mtlo $3
lui $4, 11
TAG590:
multu $4, $4
subu $1, $4, $4
bgez $1, TAG591
sltiu $4, $1, 6
TAG591:
beq $4, $4, TAG592
slti $2, $4, 14
bgez $2, TAG592
addi $1, $2, 4
TAG592:
lbu $4, 0($1)
sub $3, $4, $1
lb $4, 0($1)
lhu $3, 31($4)
TAG593:
mfhi $3
mflo $2
mfhi $1
bne $3, $3, TAG594
TAG594:
mtlo $1
sb $1, 0($1)
mfhi $4
lbu $2, 0($4)
TAG595:
and $4, $2, $2
srl $3, $4, 5
mfhi $2
lui $3, 14
TAG596:
sll $0, $0, 0
bne $3, $3, TAG597
multu $3, $3
ori $1, $3, 8
TAG597:
srl $4, $1, 7
addiu $2, $1, 6
bgez $4, TAG598
mflo $2
TAG598:
bltz $2, TAG599
multu $2, $2
lui $3, 4
blez $3, TAG599
TAG599:
srl $4, $3, 8
sll $0, $0, 0
bne $3, $2, TAG600
sh $4, 0($2)
TAG600:
multu $2, $2
mult $2, $2
mflo $2
lui $4, 7
TAG601:
sll $0, $0, 0
sll $0, $0, 0
blez $4, TAG602
sll $0, $0, 0
TAG602:
xor $4, $4, $4
lui $1, 10
beq $4, $1, TAG603
divu $4, $1
TAG603:
mthi $1
ori $2, $1, 8
slti $4, $1, 14
sltu $3, $4, $1
TAG604:
mfhi $3
bne $3, $3, TAG605
mtlo $3
sll $0, $0, 0
TAG605:
div $3, $3
mfhi $4
sh $3, 0($4)
lw $4, 0($4)
TAG606:
lui $4, 2
sll $0, $0, 0
div $1, $1
mfhi $1
TAG607:
mflo $1
blez $1, TAG608
srav $1, $1, $1
xor $3, $1, $1
TAG608:
bltz $3, TAG609
lui $3, 12
lui $4, 14
mthi $3
TAG609:
mtlo $4
sll $0, $0, 0
bgtz $4, TAG610
sll $0, $0, 0
TAG610:
mthi $4
sll $0, $0, 0
mult $3, $3
beq $3, $4, TAG611
TAG611:
mthi $3
bne $3, $3, TAG612
sll $0, $0, 0
div $3, $3
TAG612:
mflo $2
or $3, $2, $2
sll $0, $0, 0
mfhi $4
TAG613:
blez $4, TAG614
sh $4, 0($4)
lw $4, 0($4)
blez $4, TAG614
TAG614:
sh $4, 0($4)
mfhi $1
lbu $1, 0($4)
sh $1, 0($4)
TAG615:
mthi $1
bne $1, $1, TAG616
sw $1, 0($1)
sltiu $4, $1, 14
TAG616:
addiu $3, $4, 3
lui $1, 4
sb $1, 0($4)
beq $1, $3, TAG617
TAG617:
mfhi $4
sll $0, $0, 0
mthi $2
sll $0, $0, 0
TAG618:
bltz $2, TAG619
lbu $4, 0($2)
beq $2, $2, TAG619
lui $2, 1
TAG619:
lui $4, 15
sll $0, $0, 0
and $4, $3, $2
sltu $2, $4, $2
TAG620:
nor $4, $2, $2
divu $2, $4
addiu $2, $2, 1
div $2, $4
TAG621:
mthi $2
sll $1, $2, 2
bltz $2, TAG622
sh $1, 0($1)
TAG622:
lh $2, 0($1)
sw $1, 0($2)
sb $2, 0($2)
sw $2, 0($2)
TAG623:
sh $2, 0($2)
lui $1, 9
mtlo $1
beq $2, $1, TAG624
TAG624:
srav $3, $1, $1
sll $0, $0, 0
or $2, $3, $3
sra $2, $1, 15
TAG625:
divu $2, $2
lhu $4, 0($2)
nor $4, $4, $4
lh $3, 0($2)
TAG626:
mthi $3
subu $1, $3, $3
beq $3, $3, TAG627
mult $1, $3
TAG627:
sw $1, 0($1)
mthi $1
sb $1, 0($1)
srlv $2, $1, $1
TAG628:
multu $2, $2
xori $2, $2, 0
mtlo $2
mflo $2
TAG629:
beq $2, $2, TAG630
and $3, $2, $2
addi $4, $2, 2
lbu $2, 0($2)
TAG630:
mult $2, $2
mfhi $4
lui $3, 11
srl $2, $3, 13
TAG631:
mtlo $2
lui $3, 3
sll $0, $0, 0
mtlo $2
TAG632:
bgez $3, TAG633
div $3, $3
div $3, $3
or $3, $3, $3
TAG633:
bne $3, $3, TAG634
or $1, $3, $3
bne $3, $3, TAG634
srl $3, $3, 14
TAG634:
subu $4, $3, $3
mflo $3
sra $2, $3, 12
sh $3, 0($2)
TAG635:
slti $1, $2, 1
multu $2, $2
lui $3, 13
slt $2, $1, $2
TAG636:
bgtz $2, TAG637
sltu $4, $2, $2
mfhi $1
bne $4, $4, TAG637
TAG637:
andi $1, $1, 1
sw $1, 0($1)
bgtz $1, TAG638
sllv $3, $1, $1
TAG638:
blez $3, TAG639
lbu $2, 0($3)
bgez $3, TAG639
mult $2, $2
TAG639:
beq $2, $2, TAG640
xor $1, $2, $2
lui $3, 14
sb $1, 0($3)
TAG640:
sh $3, 0($3)
mflo $2
sh $3, 0($3)
bne $2, $2, TAG641
TAG641:
sw $2, 0($2)
blez $2, TAG642
multu $2, $2
mflo $4
TAG642:
beq $4, $4, TAG643
mtlo $4
sw $4, 0($4)
mult $4, $4
TAG643:
sw $4, 0($4)
mtlo $4
lb $3, 0($4)
mfhi $3
TAG644:
lui $3, 7
sll $0, $0, 0
bltz $3, TAG645
xor $4, $3, $3
TAG645:
beq $4, $4, TAG646
lui $2, 11
bgez $2, TAG646
mtlo $2
TAG646:
lui $4, 15
bne $4, $2, TAG647
sll $0, $0, 0
divu $4, $2
TAG647:
beq $4, $4, TAG648
srav $2, $4, $4
div $4, $4
sw $2, 0($2)
TAG648:
blez $2, TAG649
mthi $2
divu $2, $2
bgtz $2, TAG649
TAG649:
srav $2, $2, $2
bgtz $2, TAG650
mult $2, $2
lui $1, 11
TAG650:
bgez $1, TAG651
srl $2, $1, 8
bgtz $1, TAG651
lb $2, 0($1)
TAG651:
mthi $2
bne $2, $2, TAG652
mtlo $2
bltz $2, TAG652
TAG652:
lb $2, 0($2)
sh $2, 0($2)
addiu $4, $2, 1
mtlo $2
TAG653:
ori $1, $4, 9
multu $1, $4
mthi $1
mult $1, $1
TAG654:
lbu $2, 0($1)
mthi $2
beq $1, $1, TAG655
mflo $3
TAG655:
andi $2, $3, 4
mthi $2
ori $3, $3, 3
xor $1, $3, $2
TAG656:
mthi $1
lui $1, 2
bgez $1, TAG657
addiu $3, $1, 14
TAG657:
bne $3, $3, TAG658
mflo $4
beq $4, $4, TAG658
mthi $4
TAG658:
sb $4, 0($4)
sb $4, 0($4)
lbu $3, 0($4)
sb $3, 0($4)
TAG659:
mult $3, $3
lbu $2, 0($3)
mfhi $3
sub $4, $3, $3
TAG660:
lbu $1, 0($4)
beq $1, $4, TAG661
mtlo $1
mthi $1
TAG661:
xori $1, $1, 8
addu $3, $1, $1
lhu $2, 0($3)
lbu $4, 0($3)
TAG662:
xor $4, $4, $4
mult $4, $4
subu $2, $4, $4
sw $4, 0($4)
TAG663:
xori $2, $2, 7
lui $2, 8
mflo $1
sll $0, $0, 0
TAG664:
beq $1, $1, TAG665
mult $1, $1
mtlo $1
mflo $3
TAG665:
lui $2, 10
mult $3, $3
divu $2, $2
lw $2, 0($3)
TAG666:
beq $2, $2, TAG667
mflo $4
srlv $1, $4, $4
srlv $2, $4, $4
TAG667:
xori $3, $2, 3
blez $2, TAG668
sw $3, 0($2)
sb $2, 0($3)
TAG668:
bgez $3, TAG669
mtlo $3
mult $3, $3
mtlo $3
TAG669:
mflo $3
bne $3, $3, TAG670
mtlo $3
nor $4, $3, $3
TAG670:
beq $4, $4, TAG671
mtlo $4
sh $4, 0($4)
mfhi $2
TAG671:
andi $1, $2, 3
sllv $4, $2, $1
sh $4, 0($1)
addi $4, $1, 1
TAG672:
lui $1, 7
sb $1, 0($4)
mthi $4
divu $4, $1
TAG673:
sll $0, $0, 0
mult $1, $1
mtlo $1
sll $0, $0, 0
TAG674:
lb $2, 0($3)
sb $2, 0($2)
sra $1, $2, 5
mflo $4
TAG675:
multu $4, $4
sll $0, $0, 0
bne $4, $4, TAG676
mflo $1
TAG676:
sw $1, 0($1)
bne $1, $1, TAG677
sltiu $1, $1, 14
lui $3, 3
TAG677:
sll $0, $0, 0
div $1, $3
sll $0, $0, 0
sb $3, 0($1)
TAG678:
mtlo $1
and $4, $1, $1
div $1, $4
slt $1, $1, $1
TAG679:
mflo $4
bltz $4, TAG680
sb $4, 0($4)
xor $1, $1, $1
TAG680:
add $3, $1, $1
bgez $1, TAG681
lui $3, 10
mflo $4
TAG681:
mflo $1
lb $2, 0($1)
mtlo $1
sllv $2, $4, $4
TAG682:
div $2, $2
lhu $3, 0($2)
mult $2, $3
bne $2, $3, TAG683
TAG683:
lui $4, 6
sll $0, $0, 0
sll $0, $0, 0
nor $1, $4, $4
TAG684:
mthi $1
multu $1, $1
bgtz $1, TAG685
subu $4, $1, $1
TAG685:
sw $4, 0($4)
sh $4, 0($4)
mult $4, $4
sb $4, 0($4)
TAG686:
sw $4, 0($4)
lui $3, 12
sb $3, 0($4)
mtlo $3
TAG687:
lui $3, 13
sll $0, $0, 0
divu $3, $3
mthi $3
TAG688:
beq $3, $3, TAG689
sll $0, $0, 0
bgez $3, TAG689
sh $3, 0($3)
TAG689:
addu $4, $3, $3
sll $0, $0, 0
nor $1, $3, $3
beq $4, $3, TAG690
TAG690:
mthi $1
div $1, $1
mthi $1
slti $1, $1, 15
TAG691:
lb $3, 0($1)
sll $1, $3, 9
mult $3, $1
bgtz $1, TAG692
TAG692:
slt $4, $1, $1
srav $1, $1, $1
bne $1, $4, TAG693
ori $1, $1, 0
TAG693:
lw $1, 0($1)
lh $1, 0($1)
lui $4, 9
mult $1, $1
TAG694:
mult $4, $4
lui $3, 13
mfhi $1
beq $1, $1, TAG695
TAG695:
sb $1, 0($1)
bne $1, $1, TAG696
andi $2, $1, 14
beq $1, $2, TAG696
TAG696:
mult $2, $2
bne $2, $2, TAG697
mflo $3
lui $4, 12
TAG697:
bne $4, $4, TAG698
multu $4, $4
sll $0, $0, 0
bne $4, $4, TAG698
TAG698:
subu $3, $4, $4
mtlo $4
sra $1, $4, 7
bne $3, $3, TAG699
TAG699:
sh $1, -6144($1)
srl $1, $1, 8
srl $4, $1, 14
mthi $1
TAG700:
or $1, $4, $4
beq $4, $4, TAG701
nor $2, $4, $4
sh $2, 0($4)
TAG701:
sll $3, $2, 13
mtlo $3
beq $2, $3, TAG702
lui $2, 1
TAG702:
sra $2, $2, 3
bgtz $2, TAG703
sb $2, -8192($2)
mtlo $2
TAG703:
addu $1, $2, $2
bltz $1, TAG704
sra $4, $1, 6
bne $1, $4, TAG704
TAG704:
mult $4, $4
sb $4, -256($4)
mthi $4
lbu $2, -256($4)
TAG705:
sw $2, 0($2)
lui $3, 5
srav $4, $2, $3
mult $2, $2
TAG706:
mult $4, $4
mult $4, $4
bgtz $4, TAG707
lh $2, 0($4)
TAG707:
mflo $2
sh $2, 0($2)
srlv $2, $2, $2
mfhi $4
TAG708:
blez $4, TAG709
lw $1, 0($4)
multu $1, $4
sw $1, 0($1)
TAG709:
srlv $4, $1, $1
sw $4, 0($1)
sub $4, $1, $4
sb $4, 0($1)
TAG710:
mflo $2
sb $2, 0($4)
lhu $4, 0($4)
srl $3, $2, 12
TAG711:
bltz $3, TAG712
sra $3, $3, 7
mult $3, $3
bne $3, $3, TAG712
TAG712:
mfhi $2
blez $3, TAG713
srl $1, $3, 6
sw $1, 0($3)
TAG713:
sw $1, 0($1)
lui $3, 9
mflo $1
sll $0, $0, 0
TAG714:
multu $1, $1
sh $1, 0($1)
mtlo $1
sub $3, $1, $1
TAG715:
mtlo $3
lui $1, 13
lhu $3, 0($3)
mthi $1
TAG716:
multu $3, $3
lb $3, 0($3)
sra $2, $3, 8
sllv $2, $3, $3
TAG717:
mfhi $2
mthi $2
beq $2, $2, TAG718
or $3, $2, $2
TAG718:
sltiu $1, $3, 7
multu $3, $3
mtlo $3
bgez $1, TAG719
TAG719:
sltiu $1, $1, 0
sllv $4, $1, $1
bne $1, $4, TAG720
ori $2, $1, 3
TAG720:
blez $2, TAG721
sb $2, 0($2)
mthi $2
bltz $2, TAG721
TAG721:
sb $2, 0($2)
bgtz $2, TAG722
divu $2, $2
lui $4, 1
TAG722:
sw $4, 0($4)
bgtz $4, TAG723
slt $3, $4, $4
mthi $4
TAG723:
mtlo $3
multu $3, $3
slti $3, $3, 3
mthi $3
TAG724:
beq $3, $3, TAG725
mfhi $4
lui $3, 8
andi $3, $4, 2
TAG725:
bne $3, $3, TAG726
mult $3, $3
mflo $1
sb $3, 0($1)
TAG726:
mtlo $1
nor $3, $1, $1
lbu $2, 2($3)
lh $1, 2($3)
TAG727:
bne $1, $1, TAG728
sb $1, -256($1)
sh $1, -256($1)
lb $3, -256($1)
TAG728:
mult $3, $3
mflo $3
lw $1, 0($3)
sw $1, 0($3)
TAG729:
sll $0, $0, 0
mtlo $1
nor $2, $2, $2
mfhi $4
TAG730:
bltz $4, TAG731
or $3, $4, $4
sw $3, 0($4)
mfhi $1
TAG731:
bgez $1, TAG732
lb $4, 0($1)
mtlo $1
blez $1, TAG732
TAG732:
srav $1, $4, $4
srlv $1, $4, $1
lui $3, 2
bltz $3, TAG733
TAG733:
addu $3, $3, $3
sll $0, $0, 0
lui $4, 10
addu $4, $3, $4
TAG734:
bgez $4, TAG735
mtlo $4
mflo $1
mthi $4
TAG735:
mult $1, $1
mtlo $1
and $4, $1, $1
mult $4, $4
TAG736:
mthi $4
multu $4, $4
mfhi $4
lb $1, 0($4)
TAG737:
mult $1, $1
lw $4, 0($1)
andi $1, $4, 3
bgtz $1, TAG738
TAG738:
multu $1, $1
sll $4, $1, 13
blez $4, TAG739
mtlo $1
TAG739:
addu $2, $4, $4
lui $3, 4
lui $4, 7
bltz $3, TAG740
TAG740:
sll $0, $0, 0
mfhi $2
lui $2, 7
beq $2, $2, TAG741
TAG741:
srlv $3, $2, $2
mtlo $2
mthi $3
sll $0, $0, 0
TAG742:
multu $3, $3
bne $3, $3, TAG743
sra $4, $3, 12
lui $3, 10
TAG743:
multu $3, $3
lui $4, 6
bne $4, $4, TAG744
sll $4, $3, 0
TAG744:
mthi $4
srav $2, $4, $4
subu $4, $4, $4
beq $4, $2, TAG745
TAG745:
and $1, $4, $4
sub $3, $1, $1
bne $3, $1, TAG746
lhu $2, 0($1)
TAG746:
nor $1, $2, $2
blez $1, TAG747
subu $1, $1, $2
bgtz $1, TAG747
TAG747:
sll $3, $1, 12
srav $2, $3, $1
divu $3, $3
beq $1, $3, TAG748
TAG748:
mflo $3
bne $2, $2, TAG749
mthi $3
lui $2, 5
TAG749:
sll $0, $0, 0
sll $0, $0, 0
srlv $3, $2, $2
div $3, $3
TAG750:
nop
nop
test_end:
beq $0, $0, test_end
nop
| 12.020575
| 21
| 0.540334
|
a5382058d3a43383a32133744b2127b53370ac31
| 402
|
asm
|
Assembly
|
programs/oeis/021/A021546.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | 1
|
2021-03-15T11:38:20.000Z
|
2021-03-15T11:38:20.000Z
|
programs/oeis/021/A021546.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/021/A021546.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | null | null | null |
; A021546: Decimal expansion of 1/542.
; 0,0,1,8,4,5,0,1,8,4,5,0,1,8,4,5,0,1,8,4,5,0,1,8,4,5,0,1,8,4,5,0,1,8,4,5,0,1,8,4,5,0,1,8,4,5,0,1,8,4,5,0,1,8,4,5,0,1,8,4,5,0,1,8,4,5,0,1,8,4,5,0,1,8,4,5,0,1,8,4,5,0,1,8,4,5,0,1,8,4,5,0,1,8,4,5,0,1,8
lpb $0
mov $1,$0
trn $0,5
lpe
add $0,5
mov $2,2
add $2,$1
trn $2,4
lpb $0
mov $0,$2
add $0,3
trn $1,1
add $1,$2
add $1,$3
trn $2,3
mov $3,6
lpe
| 19.142857
| 199
| 0.514925
|
c5e6b01d3b8c65357262aa964895356f44445fe0
| 5,057
|
asm
|
Assembly
|
lista1/q6.asm
|
vags-cin/awesome-bootloader
|
1b64683ea804e01e49722a0d4f2e334ed8ffa4ae
|
[
"Apache-2.0"
] | 8
|
2017-05-25T02:43:26.000Z
|
2019-07-10T14:56:29.000Z
|
lista1/q6.asm
|
ovictoraurelio/awesome-bootloader
|
1b64683ea804e01e49722a0d4f2e334ed8ffa4ae
|
[
"Apache-2.0"
] | null | null | null |
lista1/q6.asm
|
ovictoraurelio/awesome-bootloader
|
1b64683ea804e01e49722a0d4f2e334ed8ffa4ae
|
[
"Apache-2.0"
] | null | null | null |
org 0x7c00
jmp 0x0000:start
; ♥ ♥ ♥ ♥ ♥
; Assembly is love
; @ovictoraurelio
; @jgfn1
; With contributions of Nathan Martins Freire.
;int number_programs
;int i
;int maior = 0
;int menor = 100000
;
;scanf(number_programs)
;for(i = 0; i < number_programs;i++)
;{
; scanf(inteiro[i])
; if(inteiro[i] > maior)
; maior = inteiro[i]
; if(inteiro[i] < menor)
; menor = inteiro[i]
;}
;printf(maior)
;printf(menor)
;
;Funçao de converter string pra inteiro
;int i;
;int s = 0;
;for(i=0; string[i] != '\0'; ++i)
;{
; s *= 10;
; s += string[i] - 48;
;}
mult: dw 1
dez: db 10
;Declaracao de variaveis
nProgramas: db 0
tmp: db 0
counter: db 0
maior: db 0
menor: db 0
start: ;inicio da main
; ax is a reg to geral use
; ds
xor ax,ax ;; ax=0
mov ds,ax
mov es, ax
mov ss, ax ; setup stack
mov sp, 0x7C00 ; stack grows downwards from 0x7C00
mov bx, nProgramas
call get_num
mov ax, word[nProgramas] ;coloca num em ax
call new_line
call print_int
call new_line
mov cx, word[nProgramas]
loopReadNumbers:
push cx
mov bx, tmp
call get_num
mov ax, word[tmp] ;coloca num em ax
call new_line
call print_int
call new_line
pop cx
loop loopReadNumbers
jmp end ;fim da main
get_num:
xor ax, ax
push ax ;manda ax para a pilha (vai servir em .transform)
mov di,bx ;manda o endereço em BX para DI
stosw ;joga em AX o endereço apontado por BX
mov si,bx ; manda si
.loop:
mov ah, 0 ;instrução para ler do teclado
int 16h ;interrupt de teclado
cmp al, 0x1b ;comparar com ESC
je end ;acabar programa
cmp al, 0x0d ;comparar com \n
je .transform ;fim da string
cmp al, '0' ;comparar al com '0'
jl .loop ;se for menor que '0' não é um número, ignore
cmp al, '9' ;comparar al com '9'
jg .loop ;se for maior que '9' não é um numero, ignore
xor ah, ah ;zerar ah
push ax ;mandar ah e al para a pilha pois al não pode ir sozinho, ah será ignorado
call print_char ;imprime o caracter recebido
stosb ;manda char em al para string e di++
jmp .loop ;próximo caractere
.transform: ;transformar string em numero
mov si,bx
lodsw ;lê num e coloca em ax
mov cx, ax ;coloca num (ax) em cx
pop ax ;pop na pilha (só se usa al)
cmp ax, 0 ;se for o \0
je .done ;acabou get_num
sub ax, 48 ;transform from char to int
mul word [mult] ;multiplica ax por mult (mul) e salva em dx:ax
add ax, cx ;soma o que já estava em num (cx) com o resultado de mult*ax
mov di, bx ;coloca num em di
stosw ;salva ax em num
;call print_char ;debug
mov ax, [mult] ;salva muti em ax
mul byte [dez] ;multiplica ax por 10
mov di, mult ;di = mult
stosw ;manda ax para mult
jmp .transform ;recomeça
.done:
ret
;To use this function, put the value you wanna print in the
;reg ax and be sure that there's no important data in the regs
;dx and cl.
print_int: ;mostra inteiro em al como string na tela
xor dx, dx
xor cl, cl
.sts: ;começa conversão (sts = send to stack)
div byte[dez] ;divide ax por cl(10) salva quociente em al e resto em ah
mov dl, ah ;manda ah pra dl
mov ah, 0 ;zera ah
push dx ;manda dx pra pilha
inc cl ;incrementa cl
cmp al, 0 ;compara o quociente(al) com 0
jne .sts ;se não for 0 manda próximo caractere para pilha
.print: ;caso contrário
pop ax ;pop na pilha pra ax
add al, 48 ;transforma numero em char
call print_char ;imprime char em al
dec cl ;decrementa cl
cmp cl, 0 ;compara cl com 0
jne .print ;se o contador não for 0, imprima o próximo char
ret ;caso contrario, retorne
;***
; ** Get a string
; mov di, STRING
; get_string
;
get_string:
.loop:
mov ah, 0 ;instruction to read of keyboard
int 16h ;interruption to read of keyboard
cmp al, 0x1B
je end ;if equal ESC jump to end
cmp al, 0x0D
je .done ;if equal ENTER done of string
call print_char ;show char on screen
stosb ;saves char on memory
;;counters...
inc ch ;counter that contain length of stringH
inc cl ;counter that contain length of stringL
jmp .loop ;return to loop, read antoher char
.done:
mov al, 0 ;adding 0 to knows end of string
stosb
ret
;***
; ** Print a string
; mov si, STRING
; print_string
print_string:
lodsb ; load al, si index and si++
cmp al,0 ; compare al with 0 (0, was set as end of string)
je endprintstring
mov ah,0xe ; instruction to show on screen
mov bh,13h
int 10h ; call video interrupt
jmp print_string
endprintstring: ret
;***
; ** Print new line
;***
new_line:
push ax
mov al, 10
call print_char
mov al, 13
call print_char
pop ax
ret
;***
; ** Print a char
;***/
print_char: ;imprime o caracter em al
push ax
mov ah, 0x0e ;instrução para imprimir na tela
int 10h ;interrup de tela
pop ax
ret
end:
jmp $
times 510 - ($ - $$) db 0
dw 0xaa55
| 22.277533
| 87
| 0.634368
|
168ce3ca871bb8e6dfd42a0a559cc1f48d117b13
| 5,901
|
asm
|
Assembly
|
Transynther/x86/_processed/NONE/_zr_/i7-8650U_0xd2_notsx.log_53_17.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 9
|
2020-08-13T19:41:58.000Z
|
2022-03-30T12:22:51.000Z
|
Transynther/x86/_processed/NONE/_zr_/i7-8650U_0xd2_notsx.log_53_17.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 1
|
2021-04-29T06:29:35.000Z
|
2021-05-13T21:02:30.000Z
|
Transynther/x86/_processed/NONE/_zr_/i7-8650U_0xd2_notsx.log_53_17.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 %r9
push %rax
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_UC_ht+0xabec, %rsi
lea addresses_WT_ht+0x105ac, %rdi
xor %r11, %r11
mov $118, %rcx
rep movsb
nop
sub $36031, %r9
lea addresses_UC_ht+0x14ac, %rsi
xor %r13, %r13
mov (%rsi), %r11
nop
nop
nop
cmp $59719, %r13
lea addresses_UC_ht+0xa72c, %rdi
nop
nop
nop
and $27696, %rdx
movw $0x6162, (%rdi)
nop
nop
nop
add $19034, %rcx
lea addresses_A_ht+0xdc68, %r13
dec %rdx
mov $0x6162636465666768, %rsi
movq %rsi, %xmm6
vmovups %ymm6, (%r13)
nop
nop
nop
nop
inc %rdx
lea addresses_UC_ht+0x90ac, %rsi
lea addresses_WC_ht+0xfe6c, %rdi
clflush (%rsi)
nop
nop
nop
nop
and $45615, %rax
mov $48, %rcx
rep movsq
nop
sub $58818, %r13
lea addresses_D_ht+0xe6c, %r11
nop
and $56769, %r13
movb (%r11), %cl
nop
sub %r9, %r9
lea addresses_normal_ht+0xeaec, %rsi
lea addresses_D_ht+0xc262, %rdi
nop
nop
nop
nop
nop
and $30686, %r9
mov $104, %rcx
rep movsb
nop
nop
nop
nop
nop
sub $4344, %rdi
lea addresses_UC_ht+0xedac, %r13
nop
nop
nop
nop
nop
add %rcx, %rcx
mov $0x6162636465666768, %rdi
movq %rdi, %xmm6
and $0xffffffffffffffc0, %r13
vmovntdq %ymm6, (%r13)
nop
nop
nop
sub %r11, %r11
lea addresses_normal_ht+0x88ac, %rcx
cmp %rdx, %rdx
mov (%rcx), %esi
nop
nop
sub %r9, %r9
lea addresses_A_ht+0x1a438, %r13
nop
nop
sub $60081, %r11
movl $0x61626364, (%r13)
nop
nop
nop
sub $25336, %r11
lea addresses_A_ht+0x1cabc, %rsi
lea addresses_A_ht+0x2827, %rdi
clflush (%rsi)
dec %rdx
mov $28, %rcx
rep movsl
cmp %rcx, %rcx
lea addresses_WC_ht+0x12b54, %r13
nop
inc %r9
movb (%r13), %dl
nop
nop
nop
add %rdx, %rdx
lea addresses_UC_ht+0x56ac, %rsi
lea addresses_WC_ht+0x64ac, %rdi
nop
nop
cmp $47276, %r13
mov $19, %rcx
rep movsq
nop
nop
nop
nop
nop
xor %r9, %r9
lea addresses_D_ht+0xe08c, %rdx
nop
nop
nop
and $9272, %r11
and $0xffffffffffffffc0, %rdx
movntdqa (%rdx), %xmm7
vpextrq $1, %xmm7, %r13
cmp $34114, %r11
lea addresses_UC_ht+0x11df8, %rdi
nop
nop
nop
nop
and $42433, %rcx
movb $0x61, (%rdi)
nop
nop
sub %r9, %r9
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rax
pop %r9
pop %r13
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r12
push %r14
push %r8
push %r9
push %rax
push %rcx
// Load
lea addresses_US+0x40cc, %rcx
clflush (%rcx)
sub $32007, %r8
mov (%rcx), %r9
nop
nop
nop
nop
xor $23011, %r8
// Store
lea addresses_US+0x72ac, %rcx
add $24590, %r12
movb $0x51, (%rcx)
nop
and %r9, %r9
// Store
lea addresses_D+0x98b4, %rax
cmp %r11, %r11
movb $0x51, (%rax)
nop
nop
nop
nop
nop
sub $19332, %r12
// Store
lea addresses_WT+0x72e4, %rax
nop
inc %r14
mov $0x5152535455565758, %r8
movq %r8, (%rax)
add %rax, %rax
// Faulty Load
lea addresses_A+0x158ac, %r14
nop
nop
nop
nop
nop
xor %r9, %r9
vmovups (%r14), %ymm0
vextracti128 $1, %ymm0, %xmm0
vpextrq $1, %xmm0, %rcx
lea oracles, %r12
and $0xff, %rcx
shlq $12, %rcx
mov (%r12,%rcx,1), %rcx
pop %rcx
pop %rax
pop %r9
pop %r8
pop %r14
pop %r12
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_A', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_US', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 4, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_US', 'size': 1, 'AVXalign': True, 'NT': False, 'congruent': 8, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D', 'size': 1, 'AVXalign': True, 'NT': False, 'congruent': 3, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WT', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_A', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}}
<gen_prepare_buffer>
{'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 5, 'same': True}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 8, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 7, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 6, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 2, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 11, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 3, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 3, 'same': True}}
{'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 4, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 1, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'size': 32, 'AVXalign': False, 'NT': True, 'congruent': 8, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 2, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 0, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 10, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'size': 16, 'AVXalign': False, 'NT': True, 'congruent': 3, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 2, 'same': False}}
{'00': 53}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
| 22.184211
| 158
| 0.645992
|
17b68c6334c82182a125741fe66dee0b99924956
| 482
|
asm
|
Assembly
|
libsrc/_DEVELOPMENT/math/float/am9511/c/sccz80/cam32_sccz80_zero.asm
|
ahjelm/z88dk
|
c4de367f39a76b41f6390ceeab77737e148178fa
|
[
"ClArtistic"
] | 640
|
2017-01-14T23:33:45.000Z
|
2022-03-30T11:28:42.000Z
|
libsrc/_DEVELOPMENT/math/float/am9511/c/sccz80/cam32_sccz80_zero.asm
|
C-Chads/z88dk
|
a4141a8e51205c6414b4ae3263b633c4265778e6
|
[
"ClArtistic"
] | 1,600
|
2017-01-15T16:12:02.000Z
|
2022-03-31T12:11:12.000Z
|
libsrc/_DEVELOPMENT/math/float/am9511/c/sccz80/cam32_sccz80_zero.asm
|
C-Chads/z88dk
|
a4141a8e51205c6414b4ae3263b633c4265778e6
|
[
"ClArtistic"
] | 215
|
2017-01-17T10:43:03.000Z
|
2022-03-23T17:25:02.000Z
|
SECTION code_fp_am9511
PUBLIC cam32_sccz80_zero
EXTERN asm_am9511_zero
; return a signed legal zero
;
; enter : stack = ret, DEHL = signed IEEE_float
;
; exit : DEHL = sccz80_float(signed 0 IEEE_float)
;
; uses : af, bc, de, hl
DEFC cam32_sccz80_zero = asm_am9511_zero ; enter stack = ret
; DEHL = IEEE_float
; return DEHL = IEEE_float
| 25.368421
| 74
| 0.522822
|
b5af675089d66db278c7f4ea1f1c1aee9785a460
| 77,594
|
asm
|
Assembly
|
reference_asm/title_screen.asm
|
tashiww/maten_tools
|
efaf43958639edfdcd342615f4c23ccba35d80ce
|
[
"MIT"
] | 1
|
2021-05-14T19:14:38.000Z
|
2021-05-14T19:14:38.000Z
|
reference_asm/title_screen.asm
|
tashiww/maten_tools
|
efaf43958639edfdcd342615f4c23ccba35d80ce
|
[
"MIT"
] | null | null | null |
reference_asm/title_screen.asm
|
tashiww/maten_tools
|
efaf43958639edfdcd342615f4c23ccba35d80ce
|
[
"MIT"
] | null | null | null |
; ########################################################################################
; # Generated by the active disassembly feature of the Exodus emulation platform
; #
; # Creation Date: 2021-1-8 10:24:13
; # Analysis Region: 0x00001000 - 0x00004000
; ########################################################################################
org $00001000
dc.w $8017, $8018, $8019, $801A, $801B, $801C, $801D, $801E, $801F, $8020, $8021, $8022, $8023, $8024, $8025, $8026, $8027, $8028, $8029, $802A, $802B, $802C, $802D, $802E, $802F ;0x0 (0x00001000-0x00001032, Entry count: 0x32)
loc_00001032:
dc.b $00, $00, $10, $4A ;0x0 (0x00001032-0x00001036, Entry count: 0x4) [Unknown data]
dc.l $0000103A
dc.b $42, $79, $00, $FF, $00, $1A, $08, $F9, $00, $00, $00, $FF, $00, $18, $4E, $75 ;0x0 (0x0000103A-0x0000104A, Entry count: 0x10) [Unknown data]
TRAP #5
ORI.w #$33FC, (A3,D0.w) ;Predicted (Code-scan)
dc.b $00, $FF, $00, $1A, $08, $F9, $00, $00, $00, $FF, $00, $18, $4E, $45, $00, $05, $42, $79, $00, $FF, $00, $1A, $08, $F9, $00, $00, $00, $FF, $00, $18, $4E, $45 ;0x0 (0x00001052-0x000010C6, Entry count: 0x74) [Unknown data]
dc.b $00, $73, $33, $FC, $02, $00, $00, $FF, $00, $1A, $08, $F9, $00, $00, $00, $FF, $00, $18, $4E, $45, $00, $02, $42, $79, $00, $FF, $00, $1A, $08, $F9, $00, $00 ;0x20
dc.b $00, $FF, $00, $18, $4E, $45, $00, $05, $33, $FC, $02, $00, $00, $FF, $00, $1A, $08, $F9, $00, $00, $00, $FF, $00, $18, $4E, $45, $00, $02, $42, $79, $00, $FF ;0x40
dc.b $00, $1A, $08, $F9, $00, $00, $00, $FF, $00, $18, $4E, $45, $00, $6F, $60, $8C, $00, $00, $10, $EC ;0x60
dc.l $000010CA
dc.b $61, $00, $0D, $94, $61, $00, $0D, $A8, $4E, $46, $00, $00, $10, $32, $4E, $46, $00, $00, $2B, $32, $4E, $46, $00, $00, $28, $6E, $4E, $46, $00, $00, $2D, $4A ;0x0 (0x000010CA-0x000010EC, Entry count: 0x22) [Unknown data]
dc.b $4E, $75 ;0x20
BSR.w loc_00001884
MOVE.w #$1000, D0
CLR.w D1
MOVEA.w #$C000, A1
JSR loc_00001C10
MOVE.w #$1000, D0
CLR.w D1
MOVEA.w #$E000, A1
JSR loc_00001C10
JSR loc_00001458
dc.l loc_00002B32
JSR loc_00001458
dc.l loc_0000286E
JSR loc_00001458
dc.l loc_00002D4A
TRAP #5
ORI.b #$7C, D1 ;Predicted (Code-scan)
ORI.b #$20, D0 ;Predicted (Code-scan)
LEA $00062C44, A6
BSR.w loc_00002384
MOVEA.l #$00002800, A5
LEA $00060E78, A6
BSR.w loc_00002384
MOVEA.l #$00006000, A5
LEA $000605EA, A6
BSR.w loc_00002384
LEA $0006413E, A0
MOVEQ #$00000010, D0
CLR.w D1
BSR.w loc_00001F58
LEA $0006284E, A0
MOVEQ #$00000010, D0
MOVEQ #$00000020, D1
BSR.w loc_00001F58
LEA $00060E58, A0
MOVEQ #$00000010, D0
MOVEQ #$00000060, D1
BSR.w loc_00001F58
MOVEM.l A0/D0, -(A7)
MOVE.w #$08C0, D0
JSR loc_00003B24
MOVEA.l A0, A5
MOVEM.l (A7)+, D0/A0
MOVE.l A5, -(A7)
LEA $0006415E, A6
BSR.w loc_00002384
MOVEQ #$00000027, D7
MOVEQ #$0000001B, D6
MOVE.l #$0000E000, D5
MOVEA.l A5, A6
BSR.w loc_00001CBA
LEA $0006286E, A6
BSR.w loc_00002384
MOVEQ #$00000027, D7
MOVEQ #$0000001B, D6
MOVE.l #$0000C000, D5
MOVEA.l A5, A6
BSR.w loc_00001CBA
MOVEA.l (A7)+, A5
MOVE.l A0, -(A7)
MOVEA.l A5, A0
JSR loc_00003B98
MOVEA.l (A7)+, A0
LEA loc_000013D4(PC), A0
MOVEA.w #$6000, A1
MOVE.w #$0108, D0
MOVE.w #$0168, D1
MOVEQ #3, D2
BSR.w loc_00002768
MOVE.w A0, $00FF07B4
JSR loc_00001416
dc.l loc_00001032
MOVEQ #1, D0
MOVEQ #$0000000F, D1
MOVEQ #1, D2
BSR.w loc_00002C7E
LEA $00064796, A0
CLR.w D0
BSR.w loc_00002DC8
CLR.l $00FF039C
CLR.l $00FF075C
BSET.b #2, $00FF0018
BSET.b #3, $00FF0018
TRAP #5
ORI.b #0, D1 ;Predicted (Code-scan)
ADDI.b #$FC, -(A6) ;Predicted (Code-scan)
MOVE.b (A4)+, (A4) ;Predicted (Code-scan)
dc.b $00, $FF, $07, $B2 ;0x0 (0x00001248-0x0000124C, Entry count: 0x4) [Unknown data]
MOVEQ #1, D0
BSR.w loc_00002350
MOVEQ #$00000014, D2
loc_00001254:
TRAP #5
ORI.b #$39, D1 ;Predicted (Code-scan)
ORI.b #$FF, D7 ;Predicted (Code-scan)
dc.b $27, $DA ;0x0 (0x0000125E-0x00001260, Entry count: 0x2) [Unknown data]
BNE.b loc_0000129A
SUBQ.w #1, $00FF07B2
DBF D2, loc_00001254
MOVE.w #$00A8, D2
loc_00001270:
TRAP #5
ORI.b #$39, D1 ;Predicted (Code-scan)
ORI.b #$FF, D7 ;Predicted (Code-scan)
dc.b $27, $DA ;0x0 (0x0000127A-0x0000127C, Entry count: 0x2) [Unknown data]
BNE.b loc_0000129A
MOVEA.w $00FF07B4, A0
MOVE.w #$0108, D0
MOVE.w #$00C0, D1
BSR.w loc_00002A1C
SUBQ.w #1, $00FF07B2
TST.w D2
BNE.b loc_00001270
loc_0000129A:
MOVEA.w $00FF07B4, A0 ;Predicted (Code-scan)
MOVE.w #$0108, D0 ;Predicted (Code-scan)
MOVE.w #$00C0, D1 ;Predicted (Code-scan)
BSR.w loc_000027F8 ;Predicted (Code-scan)
LEA loc_000013DC(PC), A0 ;Predicted (Code-scan)
MOVEA.w #$6000, A1 ;Predicted (Code-scan)
MOVE.w #$0120, D0 ;Predicted (Code-scan)
MOVE.w #$0118, D1 ;Predicted (Code-scan)
MOVEQ #7, D2 ;Predicted (Code-scan)
BSR.w loc_00002768 ;Predicted (Code-scan)
LEA loc_000013E4(PC), A0 ;Predicted (Code-scan)
MOVEA.w #$6000, A1 ;Predicted (Code-scan)
MOVE.w #$011C, D0 ;Predicted (Code-scan)
MOVE.w #$0138, D1 ;Predicted (Code-scan)
MOVEQ #7, D2 ;Predicted (Code-scan)
BSR.w loc_00002768 ;Predicted (Code-scan)
TRAP #5 ;Predicted (Code-scan)
ORI.b #$39, D1 ;Predicted (Code-scan)
ORI.b #$FF, D7 ;Predicted (Code-scan)
dc.b $27, $DA, $66, $32, $53, $79, $00, $FF, $07, $B2, $66, $EA, $30, $3C, $00, $FD, $61, $00, $10, $5C, $30, $3C, $01, $68, $4E, $45, $00, $01, $08, $39, $00, $07 ;0x0 (0x000012E2-0x0000132E, Entry count: 0x4C) [Unknown data]
dc.b $00, $FF, $27, $DA, $66, $10, $51, $C8, $FF, $F0, $42, $79, $00, $FF, $00, $00, $4E, $F9, $00, $00, $15, $6A, $30, $3C, $00, $FE, $61, $00, $10, $32, $33, $FC ;0x20
dc.b $00, $02, $00, $FF, $00, $00, $4E, $F9, $00, $00, $15, $6A ;0x40
loc_0000132E:
dc.w $000C
dc.b $00, $20, $0E, $00, $00, $64, $00, $20, $00, $20, $0E, $00, $00, $58, $00, $00, $00, $20, $0E, $00, $00, $4C, $FF, $E0, $00, $20, $0E, $00, $00, $40, $FF, $C0 ;0x0 (0x00001330-0x000013D4, Entry count: 0xA4) [Unknown data]
dc.b $00, $00, $0F, $00, $00, $30, $00, $20, $00, $00, $0F, $00, $00, $20, $00, $00, $00, $00, $0F, $00, $00, $10, $FF, $E0, $00, $00, $0F, $00, $00, $00, $FF, $C0 ;0x20
dc.b $00, $20, $06, $00, $00, $94, $00, $60, $00, $20, $0E, $00, $00, $88, $00, $40, $00, $00, $07, $00, $00, $80, $00, $60, $00, $00, $0F, $00, $00, $70, $00, $40 ;0x40
dc.b $00, $04, $00, $00, $08, $00, $00, $A6, $00, $20, $00, $00, $0C, $00, $00, $A2, $00, $00, $00, $00, $0C, $00, $00, $9E, $FF, $E0, $00, $00, $0C, $00, $00, $9A ;0x60
dc.b $FF, $C0, $00, $04, $00, $00, $0D, $00, $00, $C1, $00, $20, $00, $00, $0D, $00, $00, $B9, $00, $00, $00, $00, $0D, $00, $00, $B1, $FF, $E0, $00, $00, $0D, $00 ;0x80
dc.b $00, $A9, $FF, $C0 ;0xA0
loc_000013D4:
dc.w $000F
dc.l loc_0000132E
dc.b $FF, $FF ;0x0 (0x000013DA-0x000013DC, Entry count: 0x2) [Unknown data]
loc_000013DC:
dc.b $00, $0F, $00, $00, $13, $90, $FF, $FF ;0x0 (0x000013DC-0x000013E4, Entry count: 0x8) [Unknown data]
loc_000013E4:
dc.b $00, $0F, $00, $00, $13, $B2, $FF, $FF, $00, $20, $0E, $00 ;0x0 (0x000013E4-0x000013F0, Entry count: 0xC) [Unknown data]
loc_000013F0:
LEA $00FF07D6, A0
MOVEQ #$0000000F, D0
loc_000013F8:
CLR.l (A0)+
CLR.l (A0)
ADDA.l #$000001FC, A0
DBF D0, loc_000013F8
LEA $00FF07C6, A0
MOVEQ #7, D0
loc_0000140E:
CLR.w (A0)+
DBF D0, loc_0000140E
RTS
loc_00001416:
MOVE.l A5, $00FF07C2
MOVE.l A6, $00FF07BE
MOVEA.l (A7)+, A6
MOVEA.l (A6)+, A5
MOVE.l A6, -(A7)
MOVE.l D0, -(A7)
MOVE.w #0, -(A7)
MOVEQ #$0000000F, D0
LEA $00FF07D6, A6
loc_00001436:
TST.l (A6)
BEQ.w loc_0000149A
ADDA.l #$00000200, A6
DBF D0, loc_00001436
MOVE.w (A7)+, D0 ;Predicted (Code-scan)
MOVE.l (A7)+, D0 ;Predicted (Code-scan)
MOVEA.l $00FF07C2, A5 ;Predicted (Code-scan)
MOVEA.l $00FF07BE, A6 ;Predicted (Code-scan)
RTS ;Predicted (Code-scan)
loc_00001458:
MOVE.l A5, $00FF07C2
MOVE.l A6, $00FF07BE
MOVEA.l (A7)+, A6
MOVEA.l (A6)+, A5
MOVE.l A6, -(A7)
MOVE.l D0, -(A7)
MOVE.w #1, -(A7)
MOVEQ #$0000000F, D0
LEA $00FF25D6, A6
loc_00001478:
TST.l (A6)
BEQ.w loc_0000149A
SUBA.l #$00000200, A6
DBF D0, loc_00001478
MOVE.w (A7)+, D0 ;Predicted (Code-scan)
MOVE.l (A7)+, D0 ;Predicted (Code-scan)
MOVEA.l $00FF07C2, A5 ;Predicted (Code-scan)
MOVEA.l $00FF07BE, A6 ;Predicted (Code-scan)
RTS ;Predicted (Code-scan)
loc_0000149A:
MOVE.w (A7)+, $A(A6)
MOVE.l (A7)+, D0
MOVE.l (A5)+, (A6)
MOVE.l (A5), $4(A6)
MOVEA.l $00FF07C2, A5
MOVE.l D0, $00FF07C2
MOVE SR, D0
ANDI.w #$0F00, D0
MOVE.w D0, $50(A6)
MOVE.l $00FF07C2, D0
MOVE.w #1, $8(A6)
MOVE.l (A7), $10(A6)
SUBI.l #$0000000A, $10(A6)
MOVE.l A6, $C(A6)
ADDI.l #$00000200, $C(A6)
MOVE.w #$0500, $50(A6)
ADDA.l #$00000050, A6
MOVEM.l A5/A4/A3/A2/A1/A0/D7/D6/D5/D4/D3/D2/D1/D0, -(A6)
MOVE.l $00FF07BE, -(A6)
MOVEA.l $00FF07BE, A6
RTS
CLR.w $00FF07BC
CLR.w $00FF07B6
LEA $00FF07D6, A6
MOVE.l A6, $00FF07B8
loc_00001516:
MOVEA.l $00FF07B8, A6
TST.l (A6)
BEQ.w loc_000015CC
MOVE.w $00FF07C6, D0
BEQ.w loc_0000153E
TST.w $A(A6) ;Predicted (Code-scan)
BNE.w loc_0000153E ;Predicted (Code-scan)
CMP.w $00FF07B6, D0 ;Predicted (Code-scan)
BNE.w loc_000015CC ;Predicted (Code-scan)
loc_0000153E:
SUBQ.w #1, $8(A6)
BNE.w loc_000015CC
MOVEA.l $C(A6), A5
MOVE.l A5, USP
MOVE.l (A6), -(A7)
MOVE.w $50(A6), -(A7)
ADDA.l #$00000014, A6
MOVE.l (A6)+, $00FF07BE
MOVEM.l (A6)+, D0/D1/D2/D3/D4/D5/D6/D7/A0/A1/A2/A3/A4/A5
MOVEA.l $00FF07BE, A6
RTE
PEA loc_00001586(PC)
MOVE.l A6, $00FF07BE
MOVEA.l $00FF07B8, A6
MOVE.l $4(A6), -(A7)
MOVEA.l $00FF07BE, A6
RTS
loc_00001586:
TRAP #4
MOVEA.l $00FF07B8, A6
CLR.l (A6)
CLR.l $4(A6)
BRA.w loc_000015CC
MOVE.l A6, $00FF07BE
MOVEA.l $00FF07B8, A6
ADDA.l #$00000050, A6
MOVEM.l A5/A4/A3/A2/A1/A0/D7/D6/D5/D4/D3/D2/D1/D0, -(A6)
MOVE.l $00FF07BE, -(A6)
MOVEA.l $00FF07B8, A6
MOVE.l USP, A5
MOVE.l A5, $C(A6)
MOVE.w (A7)+, $50(A6)
MOVEA.l (A7)+, A5
MOVE.w (A5)+, $8(A6)
MOVE.l A5, (A6)
loc_000015CC:
MOVE.w $00FF0018, $52(A6)
ADDA.l #$00000200, A6
MOVE.l A6, $00FF07B8
MOVE.w $00FF07B6, D0
ADDQ.w #1, D0
MOVE.w D0, $00FF07B6
CMPI.w #$0010, D0
BCS.w loc_00001516
RTS
dc.b $23, $CE, $00, $FF, $07, $BE, $2C, $79, $00, $FF, $07, $B8, $DD, $FC, $00, $00, $00, $50, $48, $E6, $FF, $FC, $2D, $39, $00, $FF, $07, $BE, $2C, $79, $00, $FF ;0x0 (0x000015F8-0x00001704, Entry count: 0x10C) [Unknown data]
dc.b $07, $B8, $4E, $6D, $2D, $4D, $00, $0C, $3D, $5F, $00, $50, $2A, $5F, $28, $5D, $2C, $8D, $4D, $F9, $00, $FF, $07, $D6, $2A, $6C, $00, $04, $42, $40, $BB, $EE ;0x20
dc.b $00, $04, $67, $00, $00, $14, $DD, $FC, $00, $00, $02, $00, $52, $40, $0C, $40, $00, $10, $65, $EA, $60, $00, $00, $4A, $2F, $39, $00, $FF, $07, $B8, $3F, $39 ;0x40
dc.b $00, $FF, $07, $B6, $23, $CE, $00, $FF, $07, $B8, $33, $C0, $00, $FF, $07, $B6, $2A, $6E, $00, $0C, $49, $FA, $00, $10, $2B, $0C, $4E, $65, $2F, $2E, $00, $04 ;0x60
dc.b $3F, $2E, $00, $50, $4E, $73, $4E, $44, $2C, $79, $00, $FF, $07, $B8, $42, $96, $42, $AE, $00, $04, $33, $DF, $00, $FF, $07, $B6, $23, $DF, $00, $FF, $07, $B8 ;0x80
dc.b $2C, $79, $00, $FF, $07, $B8, $2A, $6E, $00, $0C, $4E, $65, $2F, $16, $3F, $2E, $00, $50, $DD, $FC, $00, $00, $00, $14, $23, $DE, $00, $FF, $07, $BE, $4C, $DE ;0xA0
dc.b $3F, $FF, $2C, $79, $00, $FF, $07, $BE, $4E, $73, $48, $E7, $80, $80, $41, $F9, $00, $FF, $07, $D2, $70, $06, $31, $50, $00, $02, $55, $48, $51, $C8, $FF, $F8 ;0xC0
dc.b $31, $79, $00, $FF, $07, $B6, $00, $02, $4C, $DF, $01, $01, $4E, $75, $48, $E7, $80, $80, $41, $F9, $00, $FF, $07, $C6, $70, $06, $30, $A8, $00, $02, $54, $48 ;0xE0
dc.b $51, $C8, $FF, $F8, $42, $50, $4C, $DF, $01, $01, $4E, $75 ;0x100
MOVE.w #$0100, $00A11100
loc_0000170C:
BTST.b #0, $00A11100
BNE.b loc_0000170C
BSR.w loc_00001798
BSR.b loc_00001726
MOVE.w #0, $00A11100
RTS
loc_00001726:
LEA $00FF27D8, A5
LEA $00A10003, A6
BSR.b loc_00001738
ADDQ.w #2, A6
ADDQ.w #1, A5
loc_00001738:
CLR.w D7
CMPI.b #$0D, -$2(A5)
BNE.b loc_00001760
MOVE.b #0, (A6)
NOP
NOP
MOVE.b (A6), D7
ASL.b #2, D7
MOVE.b #$40, (A6)
ANDI.w #$00C0, D7
MOVE.b (A6), D6
ANDI.w #$003F, D6
OR.b D6, D7
NOT.b D7
loc_00001760:
MOVE.l A5, -(A7)
MOVE.b (A5), D1
EOR.b D7, D1
AND.b D7, D1
MOVE.b D1, $2(A5)
CMP.b (A5), D7
BNE.b loc_0000177C
SUBQ.b #1, $6(A5)
BEQ.b loc_00001788
CLR.b $4(A5)
BRA.b loc_00001792
loc_0000177C:
MOVE.b D1, $4(A5) ;Predicted (Code-scan)
MOVE.b #$1E, $6(A5) ;Predicted (Code-scan)
BRA.b loc_00001792 ;Predicted (Code-scan)
loc_00001788:
MOVE.b D7, $4(A5)
MOVE.b #$0A, $6(A5)
loc_00001792:
MOVE.b D7, (A5)
MOVEA.l (A7)+, A5
RTS
loc_00001798:
LEA $00FF27D6, A0
CLR.w D1
BSR.b loc_000017A4
ADDQ.w #1, D1
loc_000017A4:
MOVEM.l A0/D3/D2/D1, -(A7)
LEA $00A10003, A0
MOVEQ #0, D0
MOVE.b D1, D0
ADD.l D0, D0
ADDA.l D0, A0
MOVEQ #0, D0
MOVE.l D0, D1
MOVE.b $6(A0), D3
SWAP D3
MOVE.b (A0), D3
MOVE.b #$40, $6(A0)
MOVE.b #$40, (A0)
NOP
MOVE.b (A0), D0
MOVE.b #0, (A0)
NOP
MOVE.b (A0), D1
MOVE.b #$40, (A0)
MOVE.w D0, D2
LSR.b #1, D0
ROR.w #1, D0
LSR.b #1, D0
ROL.w #1, D0
ROR.w #1, D2
LSR.b #1, D2
ROL.w #1, D2
OR.b D2, D0
ANDI.w #3, D0
LSL.b #2, D0
MOVE.w D1, D2
LSR.b #1, D1
ROR.w #1, D1
LSR.b #1, D1
ROL.w #1, D1
ROR.w #1, D2
LSR.b #1, D2
ROL.w #1, D2
OR.b D2, D1
ANDI.w #3, D1
OR.b D1, D0
MOVE.b (A0), D3
SWAP D3
MOVE.b $6(A0), D3
MOVEM.l (A7)+, D1/D2/D3/A0
MOVE.b D0, (A0,D1.w)
RTS
loc_0000181E:
MOVE.l D0, -(A7)
loc_00001820:
MOVE.w $00C00004, D0
BTST.l #1, D0
BNE.b loc_00001820
MOVE.l (A7)+, D0
RTS
loc_00001830:
MOVE.l D0, -(A7)
MOVE.w $00FF27E2, D0
BSET.l #4, D0
MOVE.w D0, $00FF27E2
MOVE.w D0, $00C00004
MOVE.l (A7)+, D0
RTS
loc_0000184C:
MOVE.l D0, -(A7)
MOVE.w $00FF27E2, D0
BCLR.l #4, D0
MOVE.w D0, $00FF27E2
MOVE.w D0, $00C00004
MOVE.l (A7)+, D0
RTS
loc_00001868:
MOVE.l D0, -(A7)
MOVE.w $00FF27E2, D0
BSET.l #6, D0
MOVE.w D0, $00FF27E2
MOVE.w D0, $00C00004
MOVE.l (A7)+, D0
RTS
loc_00001884:
MOVE.l D0, -(A7)
MOVE.w $00FF27E2, D0
BCLR.l #6, D0
MOVE.w D0, $00FF27E2
MOVE.w D0, $00C00004
MOVE.l (A7)+, D0
RTS
MOVE.l D0, -(A7)
MOVE.w $00FF27E2, D0
BSET.l #5, D0
MOVE.w D0, $00FF27E2
MOVE.w D0, $00C00004
MOVE.l (A7)+, D0
RTS
MOVE.l D0, -(A7)
MOVE.w $00FF27E2, D0
BCLR.l #5, D0
MOVE.w D0, $00FF27E2
MOVE.w D0, $00C00004
MOVE.l (A7)+, D0
RTS
BSR.w loc_0000181E
LEA $00C00004, A6
LEA $00FF27E0, A5
LEA loc_00001966(PC), A0
MOVE.w (A6), D0
MOVEQ #$00000017, D0
MOVE.w #$8000, D1
loc_000018F4:
MOVE.b (A0)+, D1
MOVE.w D1, (A5)+
MOVE.w D1, (A6)
ADDI.w #$0100, D1
DBF D0, loc_000018F4
MOVE.l #$40000080, $00C00004
MOVE.w #0, $00C00000
BSR.w loc_0000181E
BSR.w loc_0000184C
MOVE.l #$C0000000, $00C00004
LEA $00FF001A, A0
MOVEQ #$0000003F, D0
loc_0000192E:
MOVE.w #0, $00C00000
CLR.w (A0)+
DBF D0, loc_0000192E
MOVE.l #$40000010, $00C00004
MOVEQ #$00000027, D0
loc_00001948:
MOVE.w #0, $00C00000
DBF D0, loc_00001948
MOVEA.l #$00FF039C, A0
MOVE.w #$01E0, D0
loc_0000195E:
CLR.w (A0)+
DBF D0, loc_0000195E
RTS
loc_00001966:
dc.b $04, $14, $30, $34, $07, $5C, $00, $00, $00, $00, $FF, $00, $81, $2F, $00, $01, $01, $00, $00, $FF, $FF, $00, $00, $80 ;0x0 (0x00001966-0x0000197E, Entry count: 0x18) [Unknown data]
MOVE.w #$0100, $00A11200
MOVE.w #$001E, $00FF27DE
CLR.w $00FF0018
CLR.w $00FF011A
JSR loc_000013F0
JSR loc_0000262C
JSR loc_00003B0A
BSET.b #1, $00FF0018
BSR.w loc_000037F6
RTS
dc.b $3F, $00, $30, $39, $00, $FF, $00, $16, $B0, $79, $00, $FF, $00, $16, $67, $F8, $30, $1F, $4E, $75 ;0x0 (0x000019BA-0x000019CE, Entry count: 0x14) [Unknown data]
loc_000019CE:
TRAP #2 ;Predicted (Code-scan)
MOVEM.l A1/A0/D1/D0, -(A7) ;Predicted (Code-scan)
MOVE.w #$8F02, $00C00004 ;Predicted (Code-scan)
MOVE.w A1, D1 ;Predicted (Code-scan)
ANDI.w #$3FFF, D1 ;Predicted (Code-scan)
ORI.w #$4000, D1 ;Predicted (Code-scan)
MOVE.w D1, $00C00004 ;Predicted (Code-scan)
MOVE.w A1, D1 ;Predicted (Code-scan)
LSR.w #8, D1 ;Predicted (Code-scan)
LSR.w #6, D1 ;Predicted (Code-scan)
MOVE.w D1, $00C00004 ;Predicted (Code-scan)
LEA $00C00000, A1 ;Predicted (Code-scan)
SUBQ.l #1, D0 ;Predicted (Code-scan)
loc_00001A00:
MOVE.w (A0)+, (A1) ;Predicted (Code-scan)
DBF D0, loc_00001A00 ;Predicted (Code-scan)
MOVEM.l (A7)+, D0/D1/A0/A1 ;Predicted (Code-scan)
TRAP #3 ;Predicted (Code-scan)
RTS ;Predicted (Code-scan)
loc_00001A0E:
MOVE.w #$0100, $00A11100
loc_00001A16:
BTST.b #0, $00A11100
BNE.b loc_00001A16
BSR.w loc_00001830
MOVE.w (A3)+, (A2)
MOVE.w (A3)+, (A2)
MOVE.w (A3)+, (A2)
MOVE.w (A3)+, (A2)
MOVE.w (A3)+, (A2)
MOVE.w (A3)+, (A2)
MOVE.w (A3)+, (A2)
MOVE.w (A3)+, (A2)
MOVE.w #0, $00A11100
BSR.w loc_0000181E
RTS
MOVEM.l A2/A1/A0/D3/D2/D1/D0, -(A7)
CLR.l D2
MOVE.w D0, D2
LSL.l #1, D2
MOVE.l A0, D3
ADD.l D3, D2
EOR.l D3, D2
BTST.l #$11, D2
BEQ.b loc_00001A60
BSR.w loc_000019CE ;Predicted (Code-scan)
BRA.w loc_00001AF4 ;Predicted (Code-scan)
loc_00001A60:
LINK.w A3, #-$00000010
TRAP #2
MOVE.w A1, D1
LSR.w #8, D1
LSR.w #6, D1
ORI.w #$0080, D1
MOVE.w D1, -(A3)
MOVE.w A1, D1
ANDI.w #$3FFF, D1
ORI.w #$4000, D1
MOVE.w D1, -(A3)
MOVE.l A0, D1
SWAP D1
LSR.w #1, D1
ANDI.w #$007F, D1
ORI.w #$9700, D1
MOVE.w D1, -(A3)
MOVE.l A0, D1
LSR.l #1, D1
LSR.w #8, D1
ANDI.w #$00FF, D1
ORI.w #$9600, D1
MOVE.w D1, -(A3)
MOVE.w A0, D1
LSR.w #1, D1
ANDI.w #$00FF, D1
ORI.w #$9500, D1
MOVE.w D1, -(A3)
MOVE.w D0, D1
LSR.w #8, D1
ANDI.w #$00FF, D1
ORI.w #$9400, D1
MOVE.w D1, -(A3)
ANDI.w #$00FF, D0
ORI.w #$9300, D0
MOVE.w D0, -(A3)
MOVE.w #$8F02, -(A3)
LEA $00C00004, A2
BSR.w loc_00001A0E
MOVE.w A1, D1
ANDI.w #$3FFF, D1
ORI.w #$4000, D1
MOVE.w D1, (A2)
MOVE.w A1, D1
LSR.w #8, D1
LSR.w #6, D1
MOVE.w D1, (A2)
MOVE.w (A0), $00C00000
BSR.w loc_0000184C
TRAP #3
UNLK A3
loc_00001AF4:
MOVEM.l (A7)+, D0/D1/D2/D3/A0/A1/A2
RTS
MOVEM.l A2/A1/A0/D1/D0, -(A7)
LINK.w A3, #-$00000010
TRAP #2
MOVE.w #$0080, -(A3)
MOVE.w A1, D1
ANDI.w #$007F, D1
ORI.w #$C000, D1
MOVE.w D1, -(A3)
MOVE.l A0, D1
SWAP D1
LSR.w #1, D1
ANDI.w #$007F, D1
ORI.w #$9700, D1
MOVE.w D1, -(A3)
MOVE.l A0, D1
LSR.l #1, D1
LSR.w #8, D1
ANDI.w #$00FF, D1
ORI.w #$9600, D1
MOVE.w D1, -(A3)
MOVE.w A0, D1
LSR.w #1, D1
ANDI.w #$00FF, D1
ORI.w #$9500, D1
MOVE.w D1, -(A3)
MOVE.w D0, D1
LSR.w #8, D1
ANDI.w #$00FF, D1
ORI.w #$9400, D1
MOVE.w D1, -(A3)
ANDI.w #$00FF, D0
ORI.w #$9300, D0
MOVE.w D0, -(A3)
MOVE.w #$8F02, -(A3)
LEA $00C00004, A2
BSR.w loc_00001A0E
CMPA.l #$00F00000, A0
BCS.w loc_00001B88
MOVE.w A1, D1
ANDI.w #$007F, D1
ORI.w #$C000, D1
MOVE.w D1, (A2)
MOVE.w #0, (A2)
MOVE.w (A0), $00C00000
loc_00001B88:
BSR.w loc_0000184C
TRAP #3
UNLK A3
MOVEM.l (A7)+, D0/D1/A0/A1/A2
RTS
MOVEM.l A2/A1/A0/D0, -(A7)
LINK.w A3, #-$00000010
TRAP #2
MOVE.w #$0090, -(A3)
MOVE.w #$4000, -(A3)
MOVE.l A0, D0
SWAP D0
LSR.w #1, D0
ANDI.w #$007F, D0
ORI.w #$9700, D0
MOVE.w D0, -(A3)
MOVE.l A0, D0
LSR.l #1, D0
LSR.w #8, D0
ANDI.w #$00FF, D0
ORI.w #$9600, D0
MOVE.w D0, -(A3)
MOVE.w A0, D0
LSR.w #1, D0
ANDI.w #$00FF, D0
ORI.w #$9500, D0
MOVE.w D0, -(A3)
MOVE.w #$9400, -(A3)
MOVE.w #$9328, -(A3)
MOVE.w #$8F02, -(A3)
MOVEA.l #$00C00004, A2
BSR.w loc_00001A0E
CMPA.l #$00F00000, A0
BCS.b loc_00001C02
MOVE.w #$4000, (A2)
MOVE.w #$0010, (A2)
MOVE.w (A0), $00C00000
loc_00001C02:
BSR.w loc_0000184C
TRAP #3
UNLK A3
MOVEM.l (A7)+, D0/A0/A1/A2
RTS
loc_00001C10:
MOVEM.l A2/A1/A0/D1/D0, -(A7)
LINK.w A3, #-$00000010
TRAP #2
MOVE.w D1, -(A3)
MOVE.w A1, D1
LSR.w #8, D1
LSR.w #6, D1
ORI.w #$0080, D1
MOVE.w D1, -(A3)
MOVE.w A1, D1
ANDI.w #$3FFF, D1
ORI.w #$4000, D1
MOVE.w D1, -(A3)
MOVE.w #$9780, -(A3)
MOVE.w D0, D1
LSR.w #8, D1
ANDI.w #$00FF, D1
ORI.w #$9400, D1
MOVE.w D1, -(A3)
ANDI.w #$00FF, D0
ORI.w #$9300, D0
MOVE.w D0, -(A3)
MOVE.w #$8F01, -(A3)
LEA $00C00004, A2
MOVE.w #$0100, $00A11100
loc_00001C62:
BTST.b #0, $00A11100
BNE.b loc_00001C62
BSR.w loc_00001830
MOVE.w (A3)+, (A2)
MOVE.w (A3)+, (A2)
MOVE.w (A3)+, (A2)
MOVE.w (A3)+, (A2)
MOVE.w (A3)+, (A2)
MOVE.w (A3)+, (A2)
MOVE.w (A3)+, $00C00000
MOVE.w #0, $00A11100
BSR.w loc_0000181E
BSR.w loc_0000184C
MOVE.w #$8F02, $00C00004
TRAP #3
UNLK A3
MOVEM.l (A7)+, D0/D1/A0/A1/A2
RTS
MOVEQ #$00000040, D7
MOVE.b D7, $00A10009
MOVE.b D7, $00A1000B
MOVE.b D7, $00A1000D
RTS
loc_00001CBA:
TRAP #2
MOVEM.l A5/D3/D2, -(A7)
CLR.l D3
MOVE.w D5, D3
BSET.l #$0E, D3
BCLR.l #$0F, D3
LSL.l #2, D5
ANDI.l #$00030000, D5
MOVE.w D3, D5
SWAP D5
LEA $00C00000, A5
MOVE.l #$00800000, D3
loc_00001CE4:
MOVE.l D5, $4(A5)
MOVE.w D7, D2
loc_00001CEA:
MOVE.w (A6)+, (A5)
DBF D2, loc_00001CEA
ADD.l D3, D5
DBF D6, loc_00001CE4
MOVEM.l (A7)+, D2/D3/A5
TRAP #3
RTS
dc.b $48, $E7, $37, $04, $42, $85, $3A, $00, $3C, $01, $E3, $4D, $EF, $4E, $DA, $46, $06, $45, $C0, $00, $3E, $02, $53, $47, $3C, $03, $53, $46, $4E, $42, $42, $83 ;0x0 (0x00001CFE-0x00001E60, Entry count: 0x162) [Unknown data]
dc.b $36, $05, $08, $C3, $00, $0E, $08, $83, $00, $0F, $E5, $8D, $02, $85, $00, $03, $00, $00, $3A, $03, $48, $45, $4B, $F9, $00, $C0, $00, $00, $26, $3C, $00, $80 ;0x20
dc.b $00, $00, $2B, $45, $00, $04, $34, $07, $3A, $84, $51, $CA, $FF, $FC, $DA, $83, $51, $CE, $FF, $F0, $4E, $43, $4C, $DF, $20, $EC, $4E, $75, $4E, $42, $48, $E7 ;0x40
dc.b $E0, $00, $33, $FC, $8F, $02, $00, $C0, $00, $04, $34, $00, $E0, $4A, $EC, $4A, $02, $42, $00, $03, $02, $40, $3F, $FF, $33, $C0, $00, $C0, $00, $04, $33, $C2 ;0x60
dc.b $00, $C0, $00, $04, $53, $41, $30, $F9, $00, $C0, $00, $00, $51, $C9, $FF, $F8, $4C, $DF, $00, $07, $4E, $43, $4E, $75, $4E, $42, $48, $E7, $A0, $00, $34, $00 ;0x80
dc.b $02, $42, $3F, $FF, $00, $42, $40, $00, $33, $C2, $00, $C0, $00, $04, $E0, $48, $EC, $48, $33, $C0, $00, $C0, $00, $04, $33, $C1, $00, $C0, $00, $00, $4C, $DF ;0xA0
dc.b $00, $05, $4E, $43, $4E, $75, $4E, $42, $2F, $00, $32, $00, $E0, $49, $EC, $49, $02, $41, $00, $03, $02, $40, $3F, $FF, $33, $C0, $00, $C0, $00, $04, $33, $C1 ;0xC0
dc.b $00, $C0, $00, $04, $32, $39, $00, $C0, $00, $00, $20, $1F, $4E, $43, $4E, $75, $48, $E7, $C0, $00, $E3, $48, $EF, $49, $D0, $41, $D0, $48, $32, $02, $61, $98 ;0xE0
dc.b $4C, $DF, $00, $03, $4E, $75, $48, $E7, $C0, $00, $E3, $48, $EF, $49, $D0, $41, $D0, $48, $61, $B2, $34, $01, $4C, $DF, $00, $03, $4E, $75, $48, $E7, $FC, $00 ;0x100
dc.b $3A, $3C, $C0, $00, $60, $08, $48, $E7, $FC, $00, $3A, $3C, $E0, $00, $EF, $49, $E3, $48, $D0, $41, $D0, $45, $E1, $4C, $EB, $4C, $48, $A7, $A0, $00, $61, $86 ;0x120
dc.b $02, $41, $9F, $FF, $82, $44, $61, $00, $FF, $50, $54, $40, $51, $CA, $FF, $F0, $4C, $9F, $00, $05, $06, $40, $00, $80, $51, $CB, $FF, $E0, $4C, $DF, $00, $3F ;0x140
dc.b $4E, $75 ;0x160
MOVEM.l A1/D1/D0, -(A7)
MOVE.w #$1000, D0
CLR.w D1
MOVEA.w #$C000, A1
BSR.w loc_00001C10
MOVEM.l (A7)+, D0/D1/A1
RTS
dc.b $48, $E7, $C0, $40, $30, $3C, $10, $00, $42, $41, $32, $7C, $E0, $00, $61, $00, $FD, $88, $4C, $DF, $02, $03, $4E, $75, $48, $E7, $3F, $20, $48, $E7, $80, $80 ;0x0 (0x00001E78-0x00001F58, Entry count: 0xE0) [Unknown data]
dc.b $30, $3C, $00, $80, $61, $00, $1C, $86, $24, $48, $4C, $DF, $01, $01, $02, $00, $00, $0F, $02, $01, $00, $0F, $2F, $0A, $2F, $0A, $78, $07, $26, $18, $7A, $03 ;0x20
dc.b $7C, $07, $42, $87, $E9, $8F, $E3, $8B, $65, $04, $DE, $01, $60, $02, $DE, $00, $51, $CE, $FF, $F2, $24, $C7, $51, $CD, $FF, $E8, $51, $CC, $FF, $E0, $24, $5F ;0x40
dc.b $78, $1F, $22, $DA, $51, $CC, $FF, $FC, $24, $5F, $2F, $08, $20, $4A, $61, $00, $1C, $B0, $20, $5F, $4C, $DF, $04, $FC, $4E, $75, $48, $E7, $E0, $FE, $48, $E7 ;0x60
dc.b $80, $80, $30, $3C, $00, $80, $61, $00, $1C, $24, $24, $48, $4C, $DF, $01, $01, $36, $48, $49, $F9, $00, $06, $00, $00, $74, $2B, $20, $4C, $22, $4A, $10, $3C ;0x80
dc.b $00, $0F, $12, $3C, $00, $0E, $61, $00, $FF, $70, $28, $48, $20, $4A, $32, $4B, $30, $3C, $00, $40, $61, $00, $FB, $14, $D6, $FC, $00, $80, $51, $CA, $FF, $DC ;0xA0
dc.b $42, $80, $30, $0B, $2A, $40, $4D, $F9, $00, $06, $05, $80, $61, $00, $04, $3E, $2F, $08, $20, $4A, $61, $00, $1C, $4A, $20, $5F, $4C, $DF, $7F, $07, $4E, $75 ;0xC0
loc_00001F58:
MOVEM.l A1/A0/D0, -(A7)
LEA $00FF001A, A1
ADDA.w D1, A1
SUBQ.w #1, D0
loc_00001F66:
MOVE.w (A0)+, (A1)+
DBF D0, loc_00001F66
BSET.b #0, $00FF0018
MOVEM.l (A7)+, D0/A0/A1
RTS
dc.b $48, $E7, $80, $40, $43, $F9, $00, $FF, $00, $1A, $D2, $C1, $53, $40, $32, $C2, $51, $C8, $FF, $FC, $08, $F9, $00, $00, $00, $FF, $00, $18, $4C, $DF, $02, $01 ;0x0 (0x00001F7A-0x000021BC, Entry count: 0x242) [Unknown data]
dc.b $4E, $75, $48, $E7, $40, $80, $70, $00, $41, $FA, $01, $18, $30, $39, $00, $FF, $28, $10, $02, $40, $00, $FF, $12, $30, $00, $00, $E1, $49, $30, $39, $00, $FF ;0x20
dc.b $00, $16, $02, $40, $00, $FF, $12, $30, $00, $00, $30, $39, $00, $FF, $28, $10, $D0, $41, $33, $C0, $00, $FF, $28, $10, $4C, $DF, $01, $02, $4E, $75, $61, $C2 ;0x40
dc.b $C0, $C1, $48, $40, $06, $40, $01, $00, $C0, $C2, $E0, $88, $4E, $75, $48, $E7, $E0, $C0, $34, $09, $04, $40, $00, $10, $6B, $46, $48, $C0, $E9, $48, $41, $F9 ;0x60
dc.b $00, $06, $48, $E6, $D1, $C0, $48, $E7, $80, $80, $30, $3C, $00, $40, $61, $00, $1B, $1A, $22, $48, $4C, $DF, $01, $01, $2F, $09, $10, $3C, $00, $0F, $12, $3C ;0x80
dc.b $00, $0E, $61, $00, $FE, $72, $20, $5F, $32, $42, $30, $3C, $00, $20, $61, $00, $FA, $18, $61, $00, $1B, $6A, $EA, $4A, $00, $42, $E0, $00, $60, $00, $00, $30 ;0xA0
dc.b $34, $3C, $E5, $2F, $30, $7C, $C0, $00, $30, $06, $32, $07, $61, $00, $FD, $A6, $52, $40, $61, $00, $FD, $A0, $30, $06, $52, $41, $61, $00, $FD, $98, $52, $40 ;0xC0
dc.b $61, $00, $FD, $92, $4C, $DF, $03, $07, $4E, $75, $4C, $DF, $03, $07, $30, $7C, $C0, $00, $30, $06, $32, $07, $61, $00, $FD, $7C, $52, $41, $52, $42, $61, $00 ;0xE0
dc.b $FD, $74, $52, $46, $4E, $71, $4E, $71, $4E, $71, $4E, $71, $4E, $71, $4E, $71, $4E, $71, $4E, $71, $4C, $DF, $03, $07, $4E, $75, $2F, $0E, $23, $CE, $00, $FF ;0x100
dc.b $28, $12, $4D, $F9, $00, $FF, $28, $4E, $48, $E6, $FF, $FC, $2C, $5F, $4E, $75, $4D, $F9, $00, $FF, $28, $16, $4C, $DE, $3F, $FF, $2C, $79, $00, $FF, $28, $12 ;0x120
dc.b $4E, $75, $07, $9B, $F5, $FD, $62, $D5, $D6, $C6, $E4, $5A, $22, $1D, $0F, $93, $3C, $5B, $F1, $75, $1C, $78, $FB, $70, $2D, $69, $02, $E5, $5F, $23, $DB, $DE ;0x140
dc.b $2F, $FF, $9F, $53, $05, $EC, $99, $17, $AA, $18, $B6, $19, $C8, $26, $DA, $B4, $C1, $90, $56, $98, $88, $74, $2B, $E9, $D3, $34, $55, $E1, $8B, $C5, $01, $2C ;0x160
dc.b $D9, $41, $48, $EE, $0B, $71, $B9, $DF, $82, $A9, $30, $42, $29, $85, $BE, $6B, $F3, $58, $B1, $54, $7A, $15, $CF, $50, $F6, $0C, $3A, $51, $E2, $C2, $B8, $9D ;0x180
dc.b $57, $67, $06, $CD, $AF, $66, $2A, $0D, $11, $6E, $1A, $F0, $E7, $CB, $ED, $31, $24, $94, $F7, $A0, $FC, $D8, $6D, $F2, $80, $76, $65, $60, $8E, $B2, $4B, $96 ;0x1A0
dc.b $A3, $79, $59, $BD, $10, $A1, $44, $28, $3F, $89, $46, $64, $8F, $EB, $F9, $08, $9C, $D7, $A4, $E8, $AE, $C9, $EF, $63, $B0, $45, $43, $61, $38, $C7, $09, $BB ;0x1C0
dc.b $52, $16, $21, $1E, $0E, $7B, $4C, $04, $25, $47, $B5, $B7, $DD, $1F, $3D, $6C, $03, $5E, $D0, $35, $86, $39, $DC, $7E, $E3, $20, $A6, $A8, $CC, $84, $7C, $6A ;0x1E0
dc.b $C0, $E6, $83, $40, $0A, $2E, $B3, $CA, $5C, $81, $AB, $A2, $49, $F8, $27, $97, $8D, $BF, $37, $FE, $91, $3B, $32, $7F, $9E, $72, $4E, $92, $95, $3E, $87, $77 ;0x200
dc.b $14, $73, $CE, $BC, $A7, $4D, $D1, $D4, $6F, $AD, $33, $4A, $C3, $8C, $FA, $13, $5D, $E0, $12, $F4, $8A, $C4, $A5, $BA, $36, $1B, $68, $EA, $9A, $D2, $7D, $AC ;0x220
dc.b $00, $4F ;0x240
loc_000021BC:
MOVEM.l A2/A1/A0/D3/D2/D1/D0, -(A7)
CLR.l D2
MOVE.w D0, D2
LSL.l #1, D2
MOVE.l A0, D3
ADD.l D3, D2
EOR.l D3, D2
BTST.l #$11, D2
BEQ.w loc_0000220A
MOVE.w #$8F02, $00C00004 ;Predicted (Code-scan)
MOVE.w A1, D1 ;Predicted (Code-scan)
ANDI.w #$3FFF, D1 ;Predicted (Code-scan)
ORI.w #$4000, D1 ;Predicted (Code-scan)
MOVE.w D1, $00C00004 ;Predicted (Code-scan)
MOVE.w A1, D1 ;Predicted (Code-scan)
LSR.w #8, D1 ;Predicted (Code-scan)
LSR.w #6, D1 ;Predicted (Code-scan)
MOVE.w D1, $00C00004 ;Predicted (Code-scan)
LEA $00C00000, A1 ;Predicted (Code-scan)
SUBQ.l #1, D0 ;Predicted (Code-scan)
loc_00002200:
MOVE.w (A0)+, (A1) ;Predicted (Code-scan)
DBF D0, loc_00002200 ;Predicted (Code-scan)
BRA.w loc_0000229A ;Predicted (Code-scan)
loc_0000220A:
LINK.w A3, #-$00000010
MOVE.w A1, D1
LSR.w #8, D1
LSR.w #6, D1
ORI.w #$0080, D1
MOVE.w D1, -(A3)
MOVE.w A1, D1
ANDI.w #$3FFF, D1
ORI.w #$4000, D1
MOVE.w D1, -(A3)
MOVE.l A0, D1
SWAP D1
LSR.w #1, D1
ANDI.w #$007F, D1
ORI.w #$9700, D1
MOVE.w D1, -(A3)
MOVE.l A0, D1
LSR.l #1, D1
LSR.w #8, D1
ANDI.w #$00FF, D1
ORI.w #$9600, D1
MOVE.w D1, -(A3)
MOVE.w A0, D1
LSR.w #1, D1
ANDI.w #$00FF, D1
ORI.w #$9500, D1
MOVE.w D1, -(A3)
MOVE.w D0, D1
LSR.w #8, D1
ANDI.w #$00FF, D1
ORI.w #$9400, D1
MOVE.w D1, -(A3)
ANDI.w #$00FF, D0
ORI.w #$9300, D0
MOVE.w D0, -(A3)
MOVE.w #$8F02, -(A3)
LEA $00C00004, A2
BSR.w loc_00001A0E
MOVE.w A1, D1
ANDI.w #$3FFF, D1
ORI.w #$4000, D1
MOVE.w D1, (A2)
MOVE.w A1, D1
LSR.w #8, D1
LSR.w #6, D1
MOVE.w D1, (A2)
MOVE.w (A0), $00C00000
BSR.w loc_0000184C
UNLK A3
loc_0000229A:
MOVEM.l (A7)+, D0/D1/D2/D3/A0/A1/A2
RTS
dc.b $48, $E7, $C0, $C0, $33, $FC, $8F, $02, $00, $C0, $00, $04, $32, $09, $02, $41, $3F, $FF, $00, $41, $40, $00, $33, $C1, $00, $C0, $00, $04, $32, $09, $E0, $49 ;0x0 (0x000022A0-0x000022DC, Entry count: 0x3C) [Unknown data]
dc.b $EC, $49, $33, $C1, $00, $C0, $00, $04, $43, $F9, $00, $C0, $00, $00, $53, $80, $32, $98, $51, $C8, $FF, $FC, $4C, $DF, $03, $03, $4E, $75 ;0x20
TRAP #2
MOVEA.l #$000F6000, A1
MOVE.w #$1FFF, D1
MOVEA.l #$00A00000, A0
MOVE.w #$0100, $00A11200
MOVE.w #$0100, $00A11100
loc_000022FE:
BTST.b #0, $00A11100
BNE.b loc_000022FE
loc_00002308:
MOVE.b (A1)+, D0
loc_0000230A:
MOVE.b D0, (A0)
CMP.b (A0), D0
BNE.b loc_0000230A
ADDQ.l #1, A0
DBF D1, loc_00002308
MOVE.w #0, $00A01FFE
MOVE.w #0, $00A11100
MOVE.w #0, $00A11200
NOP
NOP
NOP
NOP
MOVE.w #$0100, $00A11200
MOVE.w #$C34F, D0
loc_00002342:
DBF D0, loc_00002342
CLR.w $00FF2852
TRAP #3
RTS
loc_00002350:
TST.w D0
BEQ.b loc_0000235C
CMP.w $00FF2852, D0
BNE.b loc_0000235E
loc_0000235C:
RTS ;Predicted (Code-scan)
loc_0000235E:
CMPI.w #$00FF, D0
BEQ.b loc_00002376
MOVE.w D0, $00FF2852
CMPI.w #$00FD, D0
BCS.b loc_00002376
CLR.w $00FF2852 ;Predicted (Code-scan)
loc_00002376:
MOVE.l A0, -(A7)
MOVEA.l #$00A01FFF, A0
TRAP #1
MOVEA.l (A7)+, A0
RTS
loc_00002384:
MOVEM.l A6/A5/A4/A3/A2/A1/A0/D7/D6/D5/D4/D3/D2/D1/D0, -(A7)
MOVE.l D0, -(A7)
MOVE.w #$0C00, D0
BSR.w loc_00003B24
MOVE.l (A7)+, D0
MOVE.l A0, -(A7)
MOVE.w (A6), D0
ANDI.w #$C000, D0
CMPI.w #$8000, D0
BEQ.b loc_000023AE
MOVEA.l (A7)+, A0 ;Predicted (Code-scan)
BSR.w loc_00003B98 ;Predicted (Code-scan)
MOVEM.l (A7)+, D0/D1/D2/D3/D4/D5/D6/D7/A0/A1/A2/A3/A4/A5/A6 ;Predicted (Code-scan)
RTS ;Predicted (Code-scan)
loc_000023AE:
TRAP #2
MOVEA.l A6, A4
CLR.l D0
MOVE.w (A6)+, D0
ANDI.w #$3FFF, D0
LSL.w #1, D0
ADDA.l D0, A4
MOVEA.l A0, A1
CLR.w D1
MOVE.w (A6)+, D0
MOVEQ #$00000010, D7
MOVE.w (A6)+, D6
; this is loop point for decompressing image data
CheckFirstBit:
LSL.w #1, D6 ; double d6, which came from $605f0 ish
BCS.w CopySingleWord ; check for overflow?
SUBQ.w #1, D7 ; d7 is bit counter, starting at $10
BNE.w Check2ndBit
MOVE.w (A6)+, D6
MOVEQ #$00000010, D7
; probably $23d8 ?
Check2ndBit:
LSL.w #1, D6
BCS.w RepeatedSequenceBranch
SUBQ.w #1, D7
BNE.w Check3rdBit
MOVE.w (A6)+, D6 ; new instruction byte?
MOVEQ #$00000010, D7
Check3rdBit:
LSL.w #1, D6
BCS.w loc_00002446
SUBQ.w #1, D7
BNE.w Check4thBit
MOVE.w (A6)+, D6
MOVEQ #$00000010, D7
Check4thBit:
LSL.w #1, D6
BCC.w loc_000025FA
SUBQ.w #1, D7
BNE.w loc_0000245E
MOVE.w (A6)+, D6
MOVEQ #$00000010, D7
BRA.w loc_0000245E
; $240c
CopySingleWord:
SUBQ.w #1, D7
BNE.w CopyImageByteToRAM
MOVE.w (A6)+, D6 ; new counter/ control byte?
MOVEQ #$00000010, D7
BRA.w CopyImageByteToRAM
; $241a , read 2 bits into D5...
RepeatedSequenceBranch:
SUBQ.w #1, D7
BNE.w loc_00002424
MOVE.w (A6)+, D6
MOVEQ #$00000010, D7 ; reset x counter ??
; we're copying first bit from the "control" byte into D5 !
loc_00002424:
CLR.w D5
LSL.w #1, D6
ROXL.w #1, D5 ; was 0, turned into 1, it might be pulling the carry bit over? X bit technically
SUBQ.w #1, D7
BNE.w loc_00002434
MOVE.w (A6)+, D6
MOVEQ #$00000010, D7
loc_00002434:
LSL.w #1, D6 ; copying next (2nd) bit into D5
ROXL.w #1, D5
SUBQ.w #1, D7
BNE.w SetupRepeatedSequence
MOVE.w (A6)+, D6
MOVEQ #$00000010, D7
BRA.w SetupRepeatedSequence
loc_00002446:
SUBQ.w #1, D7
BNE.w RepeatSingleWord
MOVE.w (A6)+, D6
MOVEQ #$00000010, D7
BRA.w RepeatSingleWord
CopyImageByteToRAM:
MOVE.w (A4)+, D0 ; next image byte
MOVE.w D0, (A1)+ ; into RAM at $32b8 + (2 * d1)
ADDQ.w #1, D1
BRA.w CheckByteCounter
loc_0000245E:
MOVEA.l A1, A3
SUBQ.l #2, A3
MOVE.w (A3), (A1)+
ADDQ.w #1, D1
BRA.w CheckByteCounter
RepeatSingleWord:
CLR.l D5
MOVEQ #8, D2
loc_0000246E:
LSL.w #1, D6
ROXL.w #1, D5
SUBQ.w #1, D7
BNE.w loc_0000247C
MOVE.w (A6)+, D6
MOVEQ #$00000010, D7
loc_0000247C:
DBF D2, loc_0000246E ; this started from 3rd bit set, now reading 8 more bits to get offset
ADDQ.w #1, D5
LSL.w #1, D5
MOVEA.l A1, A3
SUBA.l D5, A3
MOVE.w (A3), (A1)+
ADDQ.w #1, D1
BRA.w CheckByteCounter
; $2490
SetupRepeatedSequence:
TST.w D5 ; this was roxl'd from A6 lsl's
BEQ.w D5NoBits ; sets D2 to $8
SUBQ.w #1, D5 ; D5 is rotated bits from control byte, so bit 1 here was second bit from control byte
BEQ.w D5Bit1 ; this is actually first lsl no overflow, second lsl overflow to get $1
SUBQ.w #1, D5
BEQ.w D5Bit2 ; clears D4 as well... this is actually.. first lsl overflow, second lsl no overflow to get $2
CLR.l D5 ; 3 overflow condition i guess, bits 1 and 2 set
MOVEQ #2, D2 ; loop counter for roxls, set to $2 if any bits were set
GetSequenceRepeatCount:
LSL.w #1, D6 ; setting up d5 again with 2 bits
ROXL.w #1, D5
SUBQ.w #1, D7
BNE.w loc_000024B4
MOVE.w (A6)+, D6
MOVEQ #$00000010, D7
loc_000024B4:
DBF D2, GetSequenceRepeatCount
MOVE.w D5, D4
ADDQ.w #1, D4 ; d4 was 7 from 3 roxls, now $8
; this gets word size of repeated sequence.. to copy $3324 $4444 $3324 $4444, d3 will be set to 4
CLR.l D5
MOVEQ #3, D2 ; loop counter..
GetSequenceSize:
LSL.w #1, D6 ; d6 is 0...
ROXL.w #1, D5
SUBQ.w #1, D7
BNE.w loc_000024CE
MOVE.w (A6)+, D6
MOVEQ #$00000010, D7
loc_000024CE:
DBF D2, GetSequenceSize
MOVE.w D5, D3
ADDQ.w #1, D3 ; number of old bytes to copy?
CLR.l D5
MOVEQ #8, D2
; when copying previously written bytes, read next 8 bits to get negative offset amount
GetOldByteOffset:
LSL.w #1, D6
ROXL.w #1, D5
SUBQ.w #1, D7
BNE.w loc_000024E8
MOVE.w (A6)+, D6 ; new control byte, $bf2..
MOVEQ #$00000010, D7
loc_000024E8:
DBF D2, GetOldByteOffset
ADDQ.w #1, D5 ; d5 now $2
LSL.w #1, D5 ; now $4
BRA.w GetOlderByte
D5Bit2:
CLR.w D4
CLR.l D5
MOVEQ #3, D2
loc_000024FA:
LSL.w #1, D6
ROXL.w #1, D5
SUBQ.w #1, D7
BNE.w loc_00002508
MOVE.w (A6)+, D6
MOVEQ #$00000010, D7
loc_00002508:
DBF D2, loc_000024FA
MOVE.w D5, D3
ADDQ.w #1, D3 ;number of old bytes to copy?
CLR.l D5
MOVEQ #8, D2
loc_00002514:
LSL.w #1, D6
ROXL.w #1, D5
SUBQ.w #1, D7
BNE.w loc_00002522
MOVE.w (A6)+, D6
MOVEQ #$00000010, D7
loc_00002522:
DBF D2, loc_00002514
ADDQ.w #1, D5
LSL.w #1, D5
BRA.w GetOlderByte
D5NoBits:
CLR.w D4
MOVEQ #1, D3 ; number of old bytes to copy?
CLR.l D5
MOVEQ #8, D2
loc_00002536:
LSL.w #1, D6
ROXL.w #1, D5
SUBQ.w #1, D7
BNE.w loc_00002544
MOVE.w (A6)+, D6
MOVEQ #$00000010, D7
loc_00002544:
DBF D2, loc_00002536
ADDQ.w #1, D5
LSL.w #1, D5
GetOlderByte:
MOVEA.l A1, A3 ; A1 is next ram location to write $32c8
SUBA.w D5, A3 ; A3 went back 4 to $32c4, prev byte..
SetupOlderByteCopy:
MOVE.l A3, -(A7) ; this saves the location from which we're copying bytes. it's $3324 $4444
MOVE.l D3, D2
CopyOlderByte:
MOVE.w (A3)+, (A1)+
ADDQ.w #1, D1
DBF D2, CopyOlderByte ; length of repeating sequence (words)
MOVEA.l (A7)+, A3
DBF D4, SetupOlderByteCopy ; # of times to repeat sequence
BRA.w CheckByteCounter
D5Bit1:
CLR.l D5
MOVEQ #2, D2
loc_0000256A:
LSL.w #1, D6
ROXL.w #1, D5
SUBQ.w #1, D7
BNE.w loc_00002578
MOVE.w (A6)+, D6
MOVEQ #$00000010, D7
loc_00002578:
DBF D2, loc_0000256A
MOVE.w D5, D4
ADDQ.w #1, D4
CLR.l D5
MOVEQ #8, D2
loc_00002584:
LSL.w #1, D6
ROXL.w #1, D5
SUBQ.w #1, D7
BNE.w loc_00002592
MOVE.w (A6)+, D6
MOVEQ #$00000010, D7
loc_00002592:
DBF D2, loc_00002584
ADDQ.w #1, D5
LSL.w #1, D5
MOVEA.l A1, A3
SUBA.l D5, A3
loc_0000259E:
MOVE.w (A3), (A1)+
ADDQ.w #1, D1
DBF D4, loc_0000259E
; $25a6
CheckByteCounter:
CMPI.w #$0514, D1 ; check if byte counter < 1,300
BCS.w CheckFirstBit
MOVE.w D1, D2
SUBI.w #$0200, D2
CMPA.l #$00010000, A5 ; checking vram location? our logo is at $6000
BCC.w loc_000025DC ; overflow?
MOVEM.l A1/D0, -(A7)
MOVE.w D2, D0
MOVEA.w A5, A1
JSR loc_000021BC
MOVEM.l (A7)+, D0/A1
LSL.w #1, D2
ADDA.w D2, A5
MOVEA.l A0, A2
ADDA.w D2, A2
BRA.w loc_000025E6
loc_000025DC:
SUBQ.w #1, D2 ;Predicted (Code-scan)
MOVEA.l A0, A2 ;Predicted (Code-scan)
loc_000025E0:
MOVE.w (A2)+, (A5)+ ;Predicted (Code-scan)
DBF D2, loc_000025E0 ;Predicted (Code-scan)
loc_000025E6:
MOVE.w #$01FF, D2
MOVEA.l A0, A1
loc_000025EC:
MOVE.w (A2)+, (A1)+
DBF D2, loc_000025EC
MOVE.w #$0200, D1
BRA.w CheckFirstBit
loc_000025FA:
TST.w D1
BEQ.b loc_0000261E
CMPA.l #$00010000, A5
BCC.w loc_00002616
MOVE.w D1, D0
MOVEA.w A5, A1
JSR loc_000021BC
BRA.w loc_0000261E
loc_00002616:
SUBQ.w #1, D1
loc_00002618:
MOVE.w (A0)+, (A5)+
DBF D1, loc_00002618
loc_0000261E:
TRAP #3
MOVEA.l (A7)+, A0
BSR.w loc_00003B98
MOVEM.l (A7)+, D0/D1/D2/D3/D4/D5/D6/D7/A0/A1/A2/A3/A4/A5/A6
RTS
loc_0000262C:
LEA $00FF011C, A0
MOVE.w #1, (A0)+
CLR.l (A0)+
MOVE.w #1, (A0)+
MOVE.w #$009D, D0
loc_00002640:
CLR.l (A0)+
DBF D0, loc_00002640
MOVE.w #1, $00FF2854
CLR.w $00FF2856
RTS
loc_00002656:
TST.w (A0)
BNE.b loc_0000265C
loc_0000265A:
RTS ;Predicted (Code-scan)
loc_0000265C:
CMPI.w #$0200, D0
BCC.b loc_0000265A
CMPI.w #$0200, D1
BCC.b loc_0000265A
MOVEM.l A2/A1/A0/D7/D6/D5/D4/D3/D2/D1/D0, -(A7)
LEA $00FF011C, A1
MOVEA.l A1, A2
MOVE.w $00FF2854, D6
MOVE.w D6, D5
LSL.w #3, D6
ANDI.l #$000003FF, D6
ADDA.l D6, A1
MOVE.w $00FF2856, D6
LSL.w #3, D6
ANDI.l #$000003FF, D6
ADDA.l D6, A2
ADDQ.l #2, A2
MOVE.w (A2), D6
ANDI.w #$0F00, D6
OR.w D5, D6
MOVE.w D6, (A2)
CLR.w D7
BSR.b loc_00002710
MOVE.w D5, $00FF2854
SUBQ.w #1, D5
MOVE.w D5, $00FF2856
MOVEM.l (A7)+, D0/D1/D2/D3/D4/D5/D6/D7/A0/A1/A2
RTS
dc.b $4A, $50, $66, $02, $4E, $75, $0C, $40, $02, $00, $64, $F8, $0C, $41, $02, $00, $64, $F2, $48, $E7, $FF, $E0, $43, $F9, $00, $FF, $01, $1C, $24, $49, $3C, $39 ;0x0 (0x000026BA-0x00002710, Entry count: 0x56) [Unknown data]
dc.b $00, $FF, $28, $54, $3A, $06, $E7, $4E, $02, $86, $00, $00, $03, $FF, $D3, $C6, $3C, $39, $00, $FF, $01, $1E, $3E, $06, $02, $47, $00, $7F, $02, $46, $0F, $00 ;0x20
dc.b $8C, $45, $33, $C6, $00, $FF, $01, $1E, $61, $0C, $33, $C5, $00, $FF, $28, $54, $4C, $DF, $07, $FF, $4E, $75 ;0x40
loc_00002710:
MOVE.w (A0)+, D4
SUBQ.w #1, D4
LSR.w #5, D2
loc_00002716:
MOVE.w (A0)+, D6
ADD.w D1, D6
ADDQ.w #1, D5
MOVE.w D6, (A1)+
MOVE.w (A0)+, D6
TST.w D4
BEQ.b loc_00002728
OR.w D5, D6
BRA.b loc_0000272A
loc_00002728:
OR.w D7, D6
loc_0000272A:
MOVE.w D6, (A1)+
MOVE.w (A0)+, D6
ADD.w D2, D6
OR.w D3, D6
MOVE.w D6, (A1)+
MOVE.w (A0)+, D6
ADD.w D0, D6
TST.w D6
BNE.b loc_0000273E
ADDQ.w #1, D6 ;Predicted (Code-scan)
loc_0000273E:
MOVE.w D6, (A1)+
DBF D4, loc_00002716
RTS
loc_00002746:
MOVE.l D0, -(A7)
LEA $00FF285E, A2
LEA $00FF289E, A3
CLR.l D0
MOVE.w A0, D0
LSL.l #1, D0
ADDA.l D0, A2
LSL.l #1, D0
ADDA.l D0, A3
LSL.l #2, D0
ADDA.l D0, A3
MOVE.l (A7)+, D0
RTS
loc_00002768:
MOVEM.l A3/A2/A1/D4/D3/D2/D1/D0, -(A7)
LEA $00FF285E, A2
LEA $00FF289E, A3
CLR.w D3
loc_0000277A:
CMPI.w #$FFFF, (A2)
BEQ.b loc_0000279A
ADDQ.w #1, D3 ;Predicted (Code-scan)
ADDQ.l #2, A2 ;Predicted (Code-scan)
ADDA.l #$00000014, A3 ;Predicted (Code-scan)
CMPI.w #$0020, D3 ;Predicted (Code-scan)
BNE.b loc_0000277A ;Predicted (Code-scan)
MOVEA.w #$FFFF, A0 ;Predicted (Code-scan)
MOVEM.l (A7)+, D0/D1/D2/D3/A1/A2/A3 ;Predicted (Code-scan)
RTS ;Predicted (Code-scan)
loc_0000279A:
MOVE.l A0, (A3)+
MOVE.w #2, (A3)+
MOVE.w A1, (A3)+
EXT.l D0
LSL.l #6, D0
MOVE.l D0, (A3)+
ROL.w #8, D2
ROL.w #5, D2
MOVE.w D2, (A3)+
CLR.w (A3)+
EXT.l D1
LSL.l #6, D1
MOVE.l D1, (A3)+
MOVE.w (A0), (A2)
MOVEA.w D3, A0
MOVEM.l (A7)+, D0/D1/D2/D3/D4/A1/A2/A3
RTS
dc.b $48, $E7, $00, $30, $61, $80, $34, $BC, $FF, $FF, $4C, $DF, $0C, $00, $4E, $75, $33, $C0, $00, $FF, $28, $5A, $33, $C1, $00, $FF, $28, $5C, $4E, $75, $48, $E7 ;0x0 (0x000027C0-0x000027F8, Entry count: 0x38) [Unknown data]
dc.b $C0, $30, $61, $00, $FF, $62, $48, $C0, $D1, $AB, $00, $08, $48, $C1, $D3, $AB, $00, $10, $4C, $DF, $0C, $03, $4E, $75 ;0x20
loc_000027F8:
MOVEM.l A3/A2/D1/D0, -(A7) ;Predicted (Code-scan)
BSR.w loc_00002746 ;Predicted (Code-scan)
EXT.l D0 ;Predicted (Code-scan)
LSL.l #6, D0 ;Predicted (Code-scan)
MOVE.l D0, $8(A3) ;Predicted (Code-scan)
EXT.l D1 ;Predicted (Code-scan)
LSL.l #6, D1 ;Predicted (Code-scan)
MOVE.l D1, $10(A3) ;Predicted (Code-scan)
MOVEM.l (A7)+, D0/D1/A2/A3 ;Predicted (Code-scan)
RTS ;Predicted (Code-scan)
dc.b $48, $E7, $40, $30, $61, $00, $FF, $2A, $32, $2B, $00, $0E, $08, $C1, $00, $0D, $08, $C1, $00, $0C, $02, $41, $FF, $00, $4A, $40, $66, $08, $50, $41, $08, $81 ;0x0 (0x00002816-0x0000286E, Entry count: 0x58) [Unknown data]
dc.b $00, $0B, $60, $06, $58, $41, $08, $C1, $00, $0B, $37, $41, $00, $0E, $4C, $DF, $0C, $02, $4E, $75, $48, $E7, $80, $30, $61, $00, $FE, $F6, $30, $2B, $00, $0E ;0x20
dc.b $08, $80, $00, $0D, $08, $80, $00, $0C, $37, $40, $00, $0E, $08, $AB, $00, $04, $00, $0E, $4C, $DF, $0C, $01, $4E, $75 ;0x40
loc_0000286E:
dc.b $00, $00, $28, $80 ;0x0 (0x0000286E-0x00002872, Entry count: 0x4) [Unknown data]
dc.l $00002876
dc.b $08, $F9, $00, $01, $00, $FF, $00, $18, $4E, $75 ;0x0 (0x00002876-0x00002880, Entry count: 0xA) [Unknown data]
LEA $00FF285E, A0
MOVEQ #$0000001F, D0
loc_00002888:
MOVE.w #$FFFF, (A0)+
DBF D0, loc_00002888
MOVE.w #$013F, D0
LEA $00FF289E, A0
loc_0000289A:
CLR.w (A0)+
DBF D0, loc_0000289A
MOVE.w #$0080, $00FF285A
MOVE.w #$0080, $00FF285C
CLR.w $00FF2858
loc_000028B6:
TRAP #5
ORI.b #$1F, D1 ;Predicted (Code-scan)
loc_000028BC:
CLR.l D3
CLR.w D2
LEA $00FF289C, A4
LEA $00FF2B0A, A5
MOVEA.l #$FFFFFFFF, A2
loc_000028D2:
CMPI.w #$FFFF, (A4)
BEQ.b loc_00002906
MOVE.w $E(A5), D0
BTST.l #$0F, D0
BNE.b loc_00002906
BTST.l #$0E, D0
BNE.b loc_00002906
MOVE.w $C(A5), D0
ANDI.w #$1FFF, D0
CMP.w D0, D2
BCS.b loc_000028FC
BNE.b loc_00002906
CMP.l $10(A5), D3
BGT.b loc_00002906
loc_000028FC:
MOVEA.l A4, A2
MOVEA.l A5, A3
MOVE.l $10(A5), D3
MOVE.w D0, D2
loc_00002906:
SUBQ.l #2, A4
SUBA.l #$00000014, A5
DBF D7, loc_000028D2
CMPA.l #$FFFFFFFF, A2
BNE.b loc_0000293E
LEA $00FF289E, A5
MOVEQ #$0000001F, D0
loc_00002922:
BCLR.b #6, $E(A5)
ADDA.l #$00000014, A5
DBF D0, loc_00002922
BSET.b #1, $00FF0018
BRA.w loc_000028B6
loc_0000293E:
MOVE.w $E(A3), D0
BTST.l #$0D, D0
BEQ.b loc_00002968
TST.b D0 ;Predicted (Code-scan)
BNE.b loc_0000295C ;Predicted (Code-scan)
MOVE.b #4, D0 ;Predicted (Code-scan)
BCHG.l #$0C, D0 ;Predicted (Code-scan)
BTST.l #$0B, D0 ;Predicted (Code-scan)
BEQ.b loc_0000295C ;Predicted (Code-scan)
ADDQ.w #4, D0 ;Predicted (Code-scan)
loc_0000295C:
SUBQ.w #1, D0 ;Predicted (Code-scan)
MOVE.w D0, $E(A3) ;Predicted (Code-scan)
BTST.l #$0C, D0 ;Predicted (Code-scan)
BNE.b loc_0000296A ;Predicted (Code-scan)
loc_00002968:
BSR.b loc_00002974
loc_0000296A:
BSET.b #6, $E(A3)
BRA.w loc_000028BC-2
loc_00002974:
TST.w $00FF2858
BNE.b loc_000029AC
SUBQ.w #1, (A2)
BNE.b loc_000029AC
MOVEA.l A3, A4
MOVEA.l (A4)+, A0
ADDQ.w #4, (A4)
CLR.l D0
MOVE.w (A4), D0
ADDA.l D0, A0
MOVE.w (A0)+, D1
TST.w D1
BNE.b loc_0000299A
MOVE.w #$FFFF, (A2) ;Predicted (Code-scan)
BRA.w loc_000029E6 ;Predicted (Code-scan)
loc_0000299A:
CMPI.w #$FFFF, D1
BNE.b loc_000029A8
MOVEA.l A3, A4
MOVEA.l (A4)+, A0
CLR.w (A4)
MOVE.w (A0)+, D1
loc_000029A8:
MOVE.w D1, (A2)
ADDQ.w #2, (A4)
loc_000029AC:
MOVEA.l A3, A4
MOVEA.l (A4)+, A1
CLR.l D0
MOVE.w (A4)+, D0
ADDA.l D0, A1
TST.l (A1)
BEQ.b loc_000029E6
MOVEA.l (A1), A0
MOVE.w (A4)+, D2
MOVE.l (A4)+, D0
LSR.l #6, D0
ADDI.w #$0080, D0
SUB.w $00FF285A, D0
MOVE.w (A4)+, D3
ANDI.w #$E000, D3
ADDQ.l #2, A4
MOVE.l (A4)+, D1
LSR.l #6, D1
ADDI.w #$0080, D1
SUB.w $00FF285C, D1
BSR.w loc_00002656
loc_000029E6:
RTS
dc.b $48, $E7, $E0, $30, $45, $F9, $00, $FF, $28, $5E, $47, $F9, $00, $FF, $28, $9E, $48, $C0, $48, $C1, $74, $1F, $0C, $5A, $FF, $FF, $67, $08, $D1, $AB, $00, $08 ;0x0 (0x000029E8-0x00002A1C, Entry count: 0x34) [Unknown data]
dc.b $D3, $AB, $00, $10, $D7, $FC, $00, $00, $00, $14, $51, $CA, $FF, $EA, $4C, $DF, $0C, $07, $4E, $75 ;0x20
loc_00002A1C:
MOVEM.l A3/A2/A1/A0/D4/D3, -(A7)
TST.w D2
BEQ.b loc_00002A4E
BSR.w loc_00002746
MOVE.w D0, D3
MOVE.w D1, D4
EXT.l D3
EXT.l D4
LSL.l #6, D3
LSL.l #6, D4
SUB.l $8(A3), D3
SUB.l $10(A3), D4
DIVS.w D2, D3
DIVS.w D2, D4
EXT.l D3
EXT.l D4
ADD.l D3, $8(A3)
ADD.l D4, $10(A3)
SUBQ.w #1, D2
loc_00002A4E:
MOVEM.l (A7)+, D3/D4/A0/A1/A2/A3
RTS
dc.b $48, $E7, $00, $30, $61, $00, $FC, $EC, $26, $C9, $36, $FC, $00, $02, $36, $C0, $34, $91, $4C, $DF, $0C, $00, $4E, $75, $48, $E7, $00, $30, $61, $00, $FC, $D4 ;0x0 (0x00002A54-0x00002B32, Entry count: 0xDE) [Unknown data]
dc.b $E1, $58, $EB, $58, $37, $40, $00, $0C, $4C, $DF, $0C, $00, $4E, $75, $48, $E7, $80, $30, $61, $00, $FC, $BE, $30, $2B, $00, $0E, $08, $C0, $00, $0F, $37, $40 ;0x20
dc.b $00, $0E, $4C, $DF, $0C, $01, $4E, $75, $48, $E7, $80, $30, $61, $00, $FC, $A4, $30, $2B, $00, $0E, $08, $80, $00, $0F, $37, $40, $00, $0E, $4C, $DF, $0C, $01 ;0x40
dc.b $4E, $75, $48, $E7, $00, $30, $61, $00, $FC, $8A, $20, $53, $32, $6B, $00, $06, $4C, $DF, $0C, $00, $4E, $75, $48, $E7, $60, $30, $45, $F9, $00, $FF, $28, $5E ;0x60
dc.b $47, $F9, $00, $FF, $28, $9E, $74, $1F, $0C, $5A, $FF, $FF, $67, $0C, $32, $2B, $00, $0E, $08, $C1, $00, $0F, $37, $41, $00, $0E, $D7, $FC, $00, $00, $00, $14 ;0x80
dc.b $51, $CA, $FF, $E6, $4C, $DF, $0C, $06, $4E, $75, $48, $E7, $60, $30, $45, $F9, $00, $FF, $28, $5E, $47, $F9, $00, $FF, $28, $9E, $74, $1F, $0C, $5A, $FF, $FF ;0xA0
dc.b $67, $0C, $32, $2B, $00, $0E, $08, $81, $00, $0F, $37, $41, $00, $0E, $D7, $FC, $00, $00, $00, $14, $51, $CA, $FF, $E6, $4C, $DF, $0C, $06, $4E, $75 ;0xC0
loc_00002B32:
dc.b $00, $00, $2B, $42 ;0x0 (0x00002B32-0x00002B36, Entry count: 0x4) [Unknown data]
dc.l $00002B3A
dc.b $42, $79, $00, $FF, $01, $1A, $4E, $75 ;0x0 (0x00002B3A-0x00002B42, Entry count: 0x8) [Unknown data]
MOVEQ #3, D0
LEA $00FF2B20, A0
loc_00002B4A:
MOVE.w #$FFFF, (A0)+
CLR.w (A0)+
CLR.l (A0)+
DBF D0, loc_00002B4A
MOVEQ #$0000003F, D0
LEA $00FF001A, A6
LEA $00FF009A, A5
loc_00002B64:
MOVE.w (A6)+, (A5)+
DBF D0, loc_00002B64
MOVE.w #1, $00FF011A
CLR.w $00FF2B1E
loc_00002B78:
TRAP #5
ORI.b #$B9, D1 ;Predicted (Code-scan)
ORI.b #$FF, D0 ;Predicted (Code-scan)
ORI.b #8, (A0)+ ;Predicted (Code-scan)
MOVE.w #1, $00FF2B1E
loc_00002B8E:
LEA $00FF001A, A6
LEA $00FF009A, A5
MOVEQ #$0000003F, D0
loc_00002B9C:
MOVE.w (A6)+, (A5)+
DBF D0, loc_00002B9C
LEA $00FF001A, A6
LEA $00FF009A, A5
LEA $00FF2B20, A0
MOVEQ #3, D7
loc_00002BB6:
CMPI.b #$FF, (A0)
BEQ.w loc_00002C5C
CLR.w D0
MOVE.b (A0), D0
MOVE.w $4(A0), D1
loc_00002BC6:
MOVE.w (A6,D0.w), D2
MOVE.w D2, D4
ANDI.w #$000F, D4
MULU.w D1, D4
LSR.w #8, D4
LSR.w #4, D2
MOVE.w D2, D3
ANDI.w #$000F, D3
MULU.w D1, D3
LSR.w #4, D3
ANDI.w #$00F0, D3
OR.w D3, D4
LSR.w #4, D2
MULU.w D1, D2
ANDI.w #$0F00, D2
OR.w D2, D4
MOVE.w D4, (A5,D0.w)
CMP.b $1(A0), D0
BEQ.w loc_00002C00
ADDQ.w #2, D0
BRA.b loc_00002BC6
loc_00002C00:
TST.b $6(A0)
BEQ.b loc_00002C54
BPL.b loc_00002C34
SUB.w $2(A0), D1 ;Predicted (Code-scan)
BPL.b loc_00002C2E ;Predicted (Code-scan)
CLR.w D1 ;Predicted (Code-scan)
MOVE.b (A0), D1 ;Predicted (Code-scan)
CLR.w D2 ;Predicted (Code-scan)
MOVE.b $1(A0), D2 ;Predicted (Code-scan)
loc_00002C18:
CLR.w (A6,D1.w) ;Predicted (Code-scan)
CMP.w D2, D1 ;Predicted (Code-scan)
BEQ.b loc_00002C24 ;Predicted (Code-scan)
ADDQ.w #2, D1 ;Predicted (Code-scan)
BRA.b loc_00002C18 ;Predicted (Code-scan)
loc_00002C24:
BSR.w loc_00002E1C ;Predicted (Code-scan)
MOVE.w #$FFFF, (A0) ;Predicted (Code-scan)
CLR.w D1 ;Predicted (Code-scan)
loc_00002C2E:
MOVE.w D1, $4(A0) ;Predicted (Code-scan)
BRA.b loc_00002C54 ;Predicted (Code-scan)
loc_00002C34:
CMPI.w #$0100, D1
BCC.b loc_00002C4A
ADD.w $2(A0), D1
CMPI.w #$0100, D1
BCS.b loc_00002C50
MOVE.w #$0100, D1 ;Predicted (Code-scan)
BRA.b loc_00002C50 ;Predicted (Code-scan)
loc_00002C4A:
MOVE.w #$FFFF, (A0) ;Predicted (Code-scan)
CLR.w D1 ;Predicted (Code-scan)
loc_00002C50:
MOVE.w D1, $4(A0)
loc_00002C54:
MOVE.w #1, $00FF2B1E
loc_00002C5C:
ADDQ.l #8, A0
DBF D7, loc_00002BB6
TST.w $00FF2B1E
BEQ.w loc_00002B78
BSET.b #0, $00FF0018
CLR.w $00FF2B1E
BRA.w loc_00002B78
loc_00002C7E:
MOVEM.l A0/D3, -(A7)
BSR.b loc_00002CC4
TST.w D3
BMI.b loc_00002C98
LSL.w #1, D0
MOVE.b D0, (A0)+
LSL.w #1, D1
MOVE.b D1, (A0)+
MOVE.w D2, (A0)+
CLR.w (A0)+
MOVE.b #1, (A0)
loc_00002C98:
MOVE.w D3, D0
MOVEM.l (A7)+, D3/A0
RTS
dc.b $48, $E7, $10, $80, $61, $1E, $4A, $43, $6B, $12, $E3, $48, $10, $C0, $E3, $49, $10, $C1, $30, $C2, $30, $FC, $01, $00, $10, $BC, $00, $FF, $30, $03, $4C, $DF ;0x0 (0x00002CA0-0x00002CC4, Entry count: 0x24) [Unknown data]
dc.b $01, $08, $4E, $75 ;0x20
loc_00002CC4:
LEA $00FF2B38, A0
MOVEQ #3, D3
loc_00002CCC:
CMPI.b #$FF, (A0)
BEQ.b loc_00002CD8
SUBQ.w #8, A0 ;Predicted (Code-scan)
DBF D3, loc_00002CCC ;Predicted (Code-scan)
loc_00002CD8:
RTS
dc.b $48, $E7, $40, $86, $41, $F9, $00, $FF, $2B, $20, $E7, $48, $D0, $C0, $4D, $F9, $00, $FF, $00, $1A, $4B, $F9, $00, $FF, $00, $9A, $42, $40, $10, $10, $42, $41 ;0x0 (0x00002CDA-0x00002D4A, Entry count: 0x70) [Unknown data]
dc.b $12, $28, $00, $01, $3D, $B5, $00, $00, $00, $00, $B2, $40, $67, $04, $54, $40, $60, $F2, $30, $BC, $FF, $FF, $4C, $DF, $61, $02, $4E, $75, $48, $E7, $40, $86 ;0x20
dc.b $41, $F9, $00, $FF, $2B, $20, $E7, $48, $D0, $C0, $30, $BC, $FF, $FF, $4C, $DF, $61, $02, $4E, $75, $48, $E7, $80, $80, $41, $F9, $00, $FF, $2B, $20, $70, $03 ;0x40
dc.b $30, $BC, $FF, $FF, $50, $88, $51, $C8, $FF, $F8, $4C, $DF, $01, $01, $4E, $75 ;0x60
loc_00002D4A:
dc.b $00, $00, $2D, $54 ;0x0 (0x00002D4A-0x00002D4E, Entry count: 0x4) [Unknown data]
dc.l $00002D52
dc.b $4E, $75 ;0x0 (0x00002D52-0x00002D54, Entry count: 0x2) [Unknown data]
LEA $00FF2B40, A0
MOVEQ #$0000000F, D0
loc_00002D5C:
CLR.l (A0)+
DBF D0, loc_00002D5C
loc_00002D62:
TRAP #5
ORI.b #$F9, D1 ;Predicted (Code-scan)
dc.b $00, $FF, $2B, $40 ;0x0 (0x00002D68-0x00002D6C, Entry count: 0x4) [Unknown data]
MOVEQ #3, D7
loc_00002D6E:
TST.w (A0)
BEQ.w loc_00002DBE
SUBQ.w #1, $2(A0)
BNE.w loc_00002DBE
MOVEA.l $C(A0), A1
MOVE.w (A1)+, D0
BNE.b loc_00002D90
MOVEA.l $8(A0), A1 ;Predicted (Code-scan)
MOVE.w (A1)+, D0 ;Predicted (Code-scan)
LSL.w #1, D0 ;Predicted (Code-scan)
ADDA.w D0, A1 ;Predicted (Code-scan)
MOVE.w (A1)+, D0 ;Predicted (Code-scan)
loc_00002D90:
MOVE.w D0, $2(A0)
MOVEA.l $8(A0), A2
MOVE.w (A2)+, D0
SUBQ.w #1, D0
loc_00002D9C:
LEA $00FF001A, A3
ADDA.w $4(A0), A3
MOVE.w (A2)+, D1
LSL.w #1, D1
ADDA.w D1, A3
MOVE.w (A1)+, (A3)
DBF D0, loc_00002D9C
MOVE.l A1, $C(A0)
BSET.b #0, $00FF0018
loc_00002DBE:
ADDA.w #$0010, A0
DBF D7, loc_00002D6E
BRA.b loc_00002D62
loc_00002DC8:
MOVEM.l A1/D1, -(A7)
MOVE.w D0, D1
LEA $00FF2B70, A1
MOVEQ #3, D0
loc_00002DD6:
TST.w (A1)
BEQ.b loc_00002DE8
SUBA.w #$0010, A1 ;Predicted (Code-scan)
DBF D0, loc_00002DD6 ;Predicted (Code-scan)
MOVEM.l (A7)+, D1/A1 ;Predicted (Code-scan)
RTS ;Predicted (Code-scan)
loc_00002DE8:
LSL.w #5, D1
MOVE.w D1, $4(A1)
MOVE.l A0, $8(A1)
MOVE.w (A0)+, D1
MOVE.w D1, (A1)
LSL.w #1, D1
ADDA.w D1, A0
MOVE.l A0, $C(A1)
MOVE.w #1, $2(A1)
MOVEM.l (A7)+, D1/A1
RTS
dc.b $2F, $08, $41, $F9, $00, $FF, $2B, $40, $E9, $48, $D0, $C0, $42, $50, $20, $5F, $4E, $75 ;0x0 (0x00002E0A-0x00002E1C, Entry count: 0x12) [Unknown data]
loc_00002E1C:
MOVEM.l A0/D0, -(A7) ;Predicted (Code-scan)
LEA $00FF2B40, A0 ;Predicted (Code-scan)
MOVEQ #$0000000F, D0 ;Predicted (Code-scan)
loc_00002E28:
CLR.l (A0)+ ;Predicted (Code-scan)
DBF D0, loc_00002E28 ;Predicted (Code-scan)
MOVEM.l (A7)+, D0/A0 ;Predicted (Code-scan)
RTS ;Predicted (Code-scan)
dc.b $00, $00, $2E, $42, $00, $00, $2E, $3C, $61, $00, $F0, $22, $4E, $75, $4D, $F9, $00, $06, $05, $80, $2A, $7C, $00, $00, $B6, $00, $61, $00, $F5, $34, $61, $00 ;0x0 (0x00002E34-0x000037F6, Entry count: 0x9C2) [Unknown data]
dc.b $01, $76, $41, $F9, $00, $FF, $30, $36, $70, $07, $42, $50, $D0, $FC, $00, $0C, $51, $C8, $FF, $F8, $41, $F9, $00, $FF, $2B, $80, $23, $C8, $00, $FF, $30, $30 ;0x20
dc.b $4E, $45, $00, $01, $4D, $F9, $00, $FF, $30, $36, $7E, $07, $4A, $56, $67, $00, $00, $E2, $10, $2E, $00, $06, $67, $00, $00, $DA, $53, $00, $67, $00, $00, $4E ;0x40
dc.b $53, $00, $67, $00, $00, $7E, $61, $00, $00, $D6, $18, $2E, $00, $07, $08, $04, $00, $07, $67, $0E, $20, $6E, $00, $08, $61, $00, $02, $98, $42, $56, $60, $00 ;0x60
dc.b $00, $B2, $61, $00, $02, $B0, $53, $42, $53, $43, $42, $41, $48, $E7, $A0, $00, $61, $00, $EE, $D0, $54, $40, $51, $CA, $FF, $F8, $4C, $DF, $00, $05, $06, $40 ;0x80
dc.b $00, $80, $51, $CB, $FF, $E8, $42, $56, $60, $00, $00, $88, $61, $00, $00, $90, $18, $2E, $00, $07, $08, $04, $00, $07, $67, $08, $61, $00, $02, $26, $2D, $48 ;0xA0
dc.b $00, $08, $08, $04, $00, $06, $67, $10, $02, $44, $00, $03, $61, $00, $00, $EA, $42, $2E, $00, $06, $60, $00, $00, $5C, $1D, $7C, $00, $02, $00, $06, $42, $6E ;0xC0
dc.b $00, $04, $61, $00, $00, $5A, $42, $45, $42, $46, $1A, $2E, $00, $04, $1C, $2E, $00, $05, $54, $45, $B4, $45, $64, $02, $3A, $02, $54, $46, $B6, $46, $64, $02 ;0xE0
dc.b $3C, $03, $1D, $45, $00, $04, $1D, $46, $00, $05, $BA, $42, $66, $08, $BC, $43, $66, $04, $42, $2E, $00, $06, $94, $45, $E2, $4A, $D0, $42, $96, $46, $E2, $4B ;0x100
dc.b $D2, $43, $34, $05, $36, $06, $18, $2E, $00, $07, $02, $44, $00, $03, $61, $00, $00, $88, $DC, $FC, $00, $0C, $51, $CF, $FF, $14, $60, $00, $FF, $04, $42, $40 ;0x120
dc.b $42, $41, $42, $42, $42, $43, $10, $2E, $00, $02, $12, $2E, $00, $03, $14, $16, $16, $2E, $00, $01, $4E, $75, $0E, $E0, $00, $2C, $00, $0E, $0E, $EE, $04, $00 ;0x140
dc.b $0E, $E0, $00, $2C, $0E, $EE, $04, $00, $00, $EE, $0E, $E0, $00, $2C, $00, $EE, $04, $00, $0E, $EE, $48, $E7, $C0, $80, $41, $FA, $FF, $DC, $70, $05, $72, $56 ;0x160
dc.b $61, $00, $EF, $A2, $41, $FA, $FF, $E4, $70, $05, $72, $76, $61, $00, $EF, $96, $4C, $DF, $01, $03, $4E, $75, $48, $E7, $C0, $80, $41, $FA, $FF, $C0, $70, $02 ;0x180
dc.b $72, $5C, $61, $00, $EF, $80, $41, $FA, $FF, $C8, $70, $02, $72, $7C, $61, $00, $EF, $74, $4C, $DF, $01, $03, $4E, $75, $48, $E7, $FC, $00, $61, $00, $01, $76 ;0x1A0
dc.b $E1, $4C, $EB, $4C, $57, $42, $57, $43, $48, $A7, $E0, $00, $42, $45, $61, $00, $00, $86, $54, $40, $4A, $42, $6B, $10, $32, $3C, $85, $B2, $82, $44, $61, $00 ;0x1C0
dc.b $ED, $82, $54, $40, $51, $CA, $FF, $F8, $7A, $01, $61, $6A, $4C, $9F, $00, $07, $06, $40, $00, $80, $4A, $43, $6B, $3A, $48, $A7, $A0, $00, $32, $3C, $85, $B3 ;0x1E0
dc.b $82, $44, $61, $00, $ED, $5E, $54, $40, $4A, $42, $6B, $10, $32, $3C, $85, $B0, $82, $44, $61, $00, $ED, $4E, $54, $40, $51, $CA, $FF, $F8, $32, $3C, $8D, $B3 ;0x200
dc.b $82, $44, $61, $00, $ED, $3E, $4C, $9F, $00, $05, $06, $40, $00, $80, $51, $CB, $FF, $C8, $7A, $02, $61, $20, $54, $40, $4A, $42, $6B, $10, $32, $3C, $95, $B2 ;0x220
dc.b $82, $44, $61, $00, $ED, $1E, $54, $40, $51, $CA, $FF, $F8, $7A, $03, $61, $06, $4C, $DF, $00, $3F, $4E, $75, $48, $E7, $FE, $80, $61, $00, $ED, $34, $4A, $41 ;0x240
dc.b $67, $34, $41, $FA, $00, $4E, $36, $05, $E5, $4B, $3C, $01, $02, $46, $18, $00, $E0, $4E, $E6, $4E, $D6, $46, $42, $46, $1C, $30, $30, $00, $E7, $4E, $02, $41 ;0x260
dc.b $07, $FF, $04, $41, $05, $B0, $6B, $0E, $0C, $41, $00, $06, $64, $08, $DC, $41, $16, $30, $60, $10, $60, $04, $16, $3C, $00, $01, $32, $05, $E1, $49, $E7, $49 ;0x280
dc.b $06, $41, $85, $B0, $D2, $03, $82, $44, $61, $00, $EC, $B8, $4C, $DF, $01, $7F, $4E, $75, $00, $01, $02, $03, $01, $00, $03, $02, $02, $03, $00, $01, $03, $02 ;0x2A0
dc.b $01, $00, $04, $01, $05, $05, $04, $05, $00, $00, $04, $05, $05, $04, $05, $05, $00, $00, $04, $05, $04, $05, $05, $05, $00, $00, $04, $04, $04, $04, $04, $04 ;0x2C0
dc.b $00, $00, $48, $E7, $F0, $00, $20, $79, $00, $FF, $30, $30, $2F, $08, $61, $44, $53, $43, $3F, $00, $32, $02, $61, $00, $EC, $2E, $30, $1F, $06, $40, $00, $80 ;0x2E0
dc.b $51, $CB, $FF, $F0, $23, $C8, $00, $FF, $30, $30, $20, $5F, $4C, $DF, $00, $0F, $4E, $75, $48, $E7, $F7, $86, $61, $1C, $3A, $00, $3E, $02, $53, $47, $3C, $03 ;0x300
dc.b $53, $46, $2C, $48, $23, $C8, $00, $FF, $30, $30, $61, $00, $EB, $5A, $4C, $DF, $61, $EF, $4E, $75, $EF, $49, $E3, $48, $D0, $41, $06, $40, $C0, $00, $4E, $75 ;0x320
dc.b $48, $E7, $02, $80, $41, $F9, $00, $FF, $30, $8A, $7C, $07, $4A, $50, $67, $10, $90, $FC, $00, $0C, $51, $CE, $FF, $F6, $30, $06, $4C, $DF, $01, $40, $60, $FE ;0x340
dc.b $11, $40, $00, $02, $11, $41, $00, $03, $10, $82, $11, $43, $00, $01, $11, $44, $00, $07, $11, $7C, $00, $01, $00, $06, $30, $06, $4C, $DF, $01, $40, $4E, $75 ;0x360
dc.b $2F, $08, $C0, $FC, $00, $0C, $41, $F9, $00, $FF, $30, $36, $D0, $C0, $11, $7C, $00, $03, $00, $06, $20, $5F, $4E, $75, $48, $E7, $F8, $02, $C0, $FC, $00, $0C ;0x380
dc.b $4D, $F9, $00, $FF, $30, $36, $DD, $C0, $61, $00, $FD, $94, $18, $2E, $00, $07, $02, $44, $00, $03, $61, $00, $FE, $02, $4C, $DF, $40, $1F, $4E, $75, $48, $E7 ;0x3A0
dc.b $FC, $02, $C0, $FC, $00, $0C, $4D, $F9, $00, $FF, $30, $36, $DD, $C0, $61, $00, $FD, $6E, $02, $04, $00, $03, $1A, $2E, $00, $07, $02, $05, $00, $FC, $8A, $04 ;0x3C0
dc.b $1D, $45, $00, $07, $61, $00, $FF, $4E, $02, $45, $00, $03, $E1, $4D, $EB, $4D, $53, $42, $53, $43, $48, $E7, $A0, $00, $61, $00, $EB, $96, $02, $41, $9F, $FF ;0x3E0
dc.b $82, $45, $61, $00, $EB, $5E, $54, $40, $51, $CA, $FF, $EE, $4C, $DF, $00, $05, $06, $40, $00, $80, $51, $CB, $FF, $DE, $4C, $DF, $40, $3F, $4E, $75, $48, $E7 ;0x400
dc.b $FC, $00, $61, $00, $FF, $10, $C8, $FC, $00, $05, $53, $42, $53, $43, $48, $E7, $A0, $00, $61, $00, $EB, $5C, $3A, $01, $02, $45, $07, $F0, $0C, $45, $05, $B0 ;0x420
dc.b $66, $24, $3A, $01, $02, $45, $00, $0F, $67, $1C, $0C, $45, $00, $06, $65, $0A, $5B, $45, $0C, $45, $00, $06, $65, $02, $5B, $45, $DA, $44, $02, $41, $FF, $F0 ;0x440
dc.b $D2, $45, $61, $00, $EA, $FE, $54, $40, $51, $CA, $FF, $C8, $4C, $DF, $00, $05, $06, $40, $00, $80, $51, $CB, $FF, $B8, $4C, $DF, $00, $3F, $4E, $75, $2F, $0E ;0x460
dc.b $C0, $FC, $00, $0C, $4D, $F9, $00, $FF, $30, $36, $DD, $C0, $42, $40, $4A, $56, $67, $00, $00, $0A, $10, $2E, $00, $06, $2C, $5F, $4E, $75, $70, $FF, $2C, $5F ;0x480
dc.b $4E, $75, $2F, $04, $61, $00, $FE, $9A, $38, $00, $4E, $45, $00, $01, $30, $04, $61, $CC, $4A, $40, $66, $F4, $30, $04, $28, $1F, $4E, $75, $48, $E7, $FE, $80 ;0x4A0
dc.b $2F, $00, $30, $3C, $00, $20, $61, $00, $08, $28, $20, $1F, $42, $68, $00, $10, $31, $7C, $FF, $FF, $00, $12, $60, $34, $48, $E7, $FE, $80, $2F, $00, $30, $3C ;0x4C0
dc.b $00, $20, $61, $00, $08, $0C, $20, $1F, $31, $7C, $FF, $FF, $00, $10, $42, $68, $00, $12, $60, $18, $48, $E7, $FE, $80, $2F, $00, $30, $3C, $00, $20, $61, $00 ;0x4E0
dc.b $07, $F0, $20, $1F, $42, $68, $00, $10, $42, $68, $00, $12, $BC, $47, $64, $02, $3E, $06, $30, $87, $4A, $46, $6B, $00, $01, $98, $31, $40, $00, $02, $31, $41 ;0x500
dc.b $00, $04, $31, $42, $00, $06, $31, $43, $00, $08, $31, $46, $00, $0A, $3C, $04, $3E, $05, $34, $10, $3A, $02, $8A, $C6, $28, $05, $48, $44, $31, $46, $00, $0C ;0x520
dc.b $31, $47, $00, $0E, $42, $46, $30, $06, $02, $40, $00, $07, $66, $16, $08, $06, $00, $03, $66, $0A, $7E, $02, $61, $00, $01, $12, $60, $00, $00, $08, $7E, $03 ;0x540
dc.b $61, $00, $01, $08, $4E, $45, $00, $01, $10, $39, $00, $FF, $27, $DA, $08, $00, $00, $06, $66, $00, $01, $2E, $08, $00, $00, $05, $66, $00, $01, $26, $08, $00 ;0x560
dc.b $00, $04, $66, $00, $01, $50, $10, $39, $00, $FF, $27, $DC, $08, $00, $00, $00, $66, $16, $08, $00, $00, $01, $66, $2A, $08, $00, $00, $02, $66, $50, $08, $00 ;0x580
dc.b $00, $03, $66, $7E, $52, $46, $60, $9E, $4A, $45, $67, $F8, $7E, $03, $61, $00, $00, $BA, $53, $45, $94, $68, $00, $0C, $42, $46, $70, $67, $61, $00, $EF, $84 ;0x5A0
dc.b $60, $84, $36, $28, $00, $0E, $53, $43, $BA, $43, $64, $D8, $36, $28, $00, $0C, $D6, $42, $B6, $68, $00, $0A, $62, $CC, $34, $03, $7E, $03, $61, $00, $00, $8C ;0x5C0
dc.b $52, $45, $42, $46, $70, $67, $61, $00, $EF, $5A, $60, $00, $FF, $5A, $4A, $44, $67, $00, $00, $16, $7E, $03, $61, $72, $53, $44, $53, $42, $42, $46, $70, $67 ;0x5E0
dc.b $61, $00, $EF, $40, $60, $00, $FF, $40, $4A, $68, $00, $10, $67, $96, $7E, $03, $61, $58, $70, $67, $61, $00, $EF, $2C, $00, $42, $80, $00, $30, $82, $60, $00 ;0x600
dc.b $00, $CA, $36, $28, $00, $0C, $53, $43, $B8, $43, $64, $00, $00, $22, $36, $02, $52, $43, $B6, $68, $00, $0A, $62, $00, $00, $16, $34, $03, $7E, $03, $61, $2A ;0x620
dc.b $52, $44, $42, $46, $70, $67, $61, $00, $EE, $FA, $60, $00, $FE, $FA, $4A, $68, $00, $10, $67, $00, $FF, $50, $7E, $03, $61, $10, $70, $67, $61, $00, $EE, $E4 ;0x640
dc.b $00, $42, $C0, $00, $30, $82, $60, $00, $00, $82, $48, $E7, $28, $00, $30, $28, $00, $06, $54, $40, $C0, $C4, $D0, $68, $00, $02, $32, $28, $00, $08, $52, $41 ;0x660
dc.b $0C, $41, $00, $01, $66, $02, $4E, $71, $C2, $C5, $D2, $68, $00, $04, $34, $28, $00, $06, $36, $28, $00, $08, $28, $07, $61, $00, $E9, $4C, $4C, $DF, $00, $14 ;0x680
dc.b $4E, $75, $7E, $02, $61, $C4, $30, $82, $70, $66, $61, $00, $EE, $96, $60, $3A, $4E, $45, $00, $01, $10, $39, $00, $FF, $27, $DA, $08, $00, $00, $06, $66, $00 ;0x6A0
dc.b $00, $20, $08, $00, $00, $05, $66, $00, $00, $18, $08, $00, $00, $04, $66, $00, $00, $10, $60, $DC, $4A, $68, $00, $12, $6B, $00, $FE, $CA, $7E, $03, $61, $8A ;0x6C0
dc.b $7A, $FF, $30, $85, $70, $68, $61, $00, $EE, $5A, $3E, $10, $61, $00, $06, $76, $4C, $DF, $01, $7F, $4E, $75, $48, $E7, $40, $80, $42, $40, $12, $18, $67, $16 ;0x6E0
dc.b $0C, $01, $00, $0A, $65, $F6, $0C, $01, $00, $7B, $67, $F0, $0C, $01, $00, $7C, $67, $EA, $52, $40, $60, $E6, $4C, $DF, $01, $02, $4E, $75, $48, $E7, $C0, $E0 ;0x700
dc.b $45, $FA, $00, $92, $42, $40, $10, $18, $66, $0A, $12, $BC, $00, $00, $4C, $DF, $07, $03, $4E, $75, $12, $C0, $60, $00, $FF, $EC, $41, $F9, $00, $02, $16, $62 ;0x720
dc.b $4E, $75, $41, $F9, $00, $02, $16, $6A, $4E, $75, $41, $F9, $00, $02, $16, $72, $4E, $75, $41, $F9, $00, $02, $16, $7E, $4E, $75, $41, $F9, $00, $02, $16, $8A ;0x740
dc.b $4E, $75, $43, $F9, $00, $02, $16, $8E, $4E, $75, $41, $F9, $00, $02, $17, $8A, $4E, $75, $41, $F9, $00, $02, $17, $CA, $4E, $75, $41, $F9, $00, $02, $18, $2E ;0x760
dc.b $4E, $75, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $06, $41, $00, $50, $10, $10, $0C, $00, $00, $7B, $67, $0A ;0x780
dc.b $0C, $00, $00, $7C, $66, $08, $54, $41, $60, $02, $52, $41, $52, $88, $12, $C1, $60, $00, $FF, $72, $21, $23, $25, $27, $29, $2A, $2C, $2E, $30, $32, $34, $36 ;0x7A0
dc.b $38, $3A, $3C, $3E, $40, $43, $45, $47, $49, $4A, $4B, $4C, $4D, $4E, $51, $54, $57, $5A, $5D, $5E, $5F, $60, $61, $63, $65, $67, $68, $69, $6A, $6B, $6C, $6D ;0x7C0
dc.b $6E, $6F, $20, $22, $24, $26, $28, $42, $62, $64, $66, $1B, $1A, $4C, $4D, $0F, $0F, $0F, $0F, $0F, $48, $E7, $F0, $C0, $22, $48, $30, $7C, $C0, $00, $36, $00 ;0x7E0
dc.b $42, $42, $14, $19, $67, $42, $0C, $02, $00, $7B, $67, $12, $0C, $02, $00, $7C, $67, $0C, $0C, $02, $00, $0D, $66, $18, $52, $41, $30, $03, $60, $E2, $53, $40 ;0x800
dc.b $53, $41, $06, $42, $E4, $F0, $61, $00, $E7, $92, $52, $40, $52, $41, $60, $D0, $06, $42, $E4, $F0, $61, $00, $E7, $84, $52, $40, $60, $C4, $4E, $71, $4E, $71 ;0x820
dc.b $4E, $71, $4E, $71, $4E, $71, $4E, $71, $4C, $DF, $03, $0F, $4E, $75, $48, $E7, $F0, $C0, $22, $48, $30, $7C, $C0, $00, $36, $00, $42, $42, $14, $19, $67, $24 ;0x840
dc.b $0C, $02, $00, $7B, $67, $F4, $0C, $02, $00, $7C, $67, $EE, $0C, $02, $00, $0D, $66, $06, $54, $41, $30, $03, $60, $E2, $06, $42, $E4, $F0, $61, $00, $E7, $3C ;0x860
dc.b $52, $40, $60, $D6, $4C, $DF, $03, $0F, $4E, $75, $48, $E7, $00, $A0, $48, $E7, $80, $80, $30, $3C, $00, $10, $61, $00, $04, $58, $24, $48, $4C, $DF, $01, $01 ;0x880
dc.b $2F, $09, $22, $4A, $61, $00, $FE, $76, $20, $49, $22, $5F, $61, $10, $2F, $08, $20, $4A, $61, $00, $04, $B0, $20, $5F, $4C, $DF, $05, $00, $4E, $75, $48, $E7 ;0x8A0
dc.b $FF, $80, $3C, $00, $38, $00, $3E, $01, $42, $40, $10, $18, $67, $2C, $0C, $00, $00, $0D, $66, $06, $3C, $04, $54, $47, $60, $EE, $0C, $00, $00, $0E, $66, $04 ;0x8C0
dc.b $52, $46, $60, $E4, $0C, $00, $00, $03, $64, $04, $E1, $48, $10, $18, $61, $00, $E8, $C4, $4E, $71, $D2, $FC, $00, $40, $60, $CE, $4C, $DF, $01, $FF, $4E, $75 ;0x8E0
dc.b $48, $E7, $08, $C0, $2F, $00, $30, $3C, $00, $10, $61, $00, $03, $E4, $20, $1F, $78, $3F, $61, $56, $61, $00, $FF, $38, $61, $00, $04, $4A, $4C, $DF, $03, $10 ;0x900
dc.b $4E, $75, $48, $E7, $08, $C0, $2F, $00, $30, $3C, $00, $10, $61, $00, $03, $C2, $20, $1F, $78, $10, $61, $34, $61, $00, $FF, $16, $61, $00, $04, $28, $4C, $DF ;0x920
dc.b $03, $10, $4E, $75, $48, $E7, $08, $80, $2F, $00, $30, $3C, $00, $10, $61, $00, $03, $A0, $20, $1F, $2F, $09, $78, $0F, $61, $10, $22, $5F, $61, $00, $FF, $60 ;0x940
dc.b $61, $00, $04, $02, $4C, $DF, $01, $10, $4E, $75, $48, $E7, $FC, $00, $1A, $04, $22, $48, $30, $03, $66, $02, $76, $06, $0C, $43, $00, $07, $65, $02, $76, $06 ;0x960
dc.b $78, $01, $53, $43, $67, $06, $C8, $FC, $00, $0A, $60, $F6, $26, $04, $28, $02, $42, $41, $74, $10, $98, $83, $6B, $06, $52, $42, $72, $01, $60, $F6, $D8, $83 ;0x980
dc.b $4A, $41, $66, $0C, $0C, $43, $00, $01, $67, $06, $4A, $40, $67, $04, $14, $05, $12, $C2, $86, $FC, $00, $0A, $66, $DA, $12, $BC, $00, $00, $4C, $DF, $00, $3F ;0x9A0
dc.b $4E, $75 ;0x9C0
loc_000037F6:
MOVE.w #$FFFF, $00FF3096
RTS
dc.b $4A, $79, $00, $FF, $30, $96, $6A, $24, $48, $E7, $F8, $00, $70, $01, $72, $14, $74, $26, $36, $3C, $00, $07, $38, $3C, $00, $C3, $61, $00, $F9, $58, $33, $C0 ;0x0 (0x00003800-0x00003B0A, Entry count: 0x30A) [Unknown data]
dc.b $00, $FF, $30, $96, $4E, $45, $00, $01, $4C, $DF, $00, $1F, $4E, $75, $48, $E7, $80, $00, $30, $39, $00, $FF, $30, $96, $6B, $0C, $61, $00, $F9, $78, $33, $FC ;0x20
dc.b $FF, $FF, $00, $FF, $30, $96, $4C, $DF, $00, $01, $4E, $45, $00, $01, $4E, $75, $48, $E7, $FF, $FE, $3A, $00, $4D, $F9, $00, $FF, $30, $98, $48, $E7, $80, $80 ;0x40
dc.b $30, $3C, $00, $A0, $61, $00, $02, $BE, $2A, $48, $4C, $DF, $01, $01, $30, $39, $00, $FF, $30, $96, $6B, $00, $01, $7C, $61, $00, $F9, $52, $78, $04, $08, $05 ;0x60
dc.b $00, $01, $67, $02, $42, $44, $34, $7C, $F0, $00, $7E, $15, $3B, $7C, $00, $02, $00, $9E, $22, $4D, $72, $01, $61, $00, $01, $D2, $7C, $03, $26, $4D, $4A, $13 ;0x80
dc.b $67, $66, $0C, $46, $00, $25, $64, $00, $00, $94, $42, $40, $10, $1B, $0C, $00, $00, $03, $64, $04, $E1, $48, $10, $1B, $22, $4A, $61, $00, $E7, $2C, $D4, $FC ;0xA0
dc.b $00, $40, $B4, $FC, $B4, $C0, $66, $06, $34, $7C, $F0, $00, $60, $0A, $B4, $FC, $FF, $C0, $66, $04, $34, $7C, $AE, $00, $30, $04, $4E, $71, $4E, $45, $00, $01 ;0xC0
dc.b $08, $39, $00, $06, $00, $FF, $27, $DA, $66, $14, $08, $39, $00, $04, $00, $FF, $27, $DA, $66, $0A, $08, $39, $00, $05, $00, $FF, $27, $DA, $67, $04, $42, $40 ;0xE0
dc.b $42, $44, $51, $C8, $FF, $D8, $60, $96, $10, $10, $67, $50, $0C, $00, $00, $0C, $66, $06, $61, $00, $01, $46, $60, $50, $53, $6D, $00, $9E, $54, $47, $0C, $47 ;0x100
dc.b $00, $19, $67, $06, $52, $88, $60, $00, $FF, $6A, $4A, $6D, $00, $9E, $67, $38, $61, $00, $00, $D0, $7E, $17, $52, $88, $60, $00, $FF, $58, $7C, $03, $53, $6D ;0x120
dc.b $00, $9E, $54, $47, $0C, $47, $00, $19, $66, $00, $FF, $54, $4A, $6D, $00, $9E, $67, $16, $61, $00, $00, $AE, $7E, $17, $60, $00, $FF, $44, $61, $00, $00, $FC ;0x140
dc.b $08, $05, $00, $00, $66, $00, $00, $8C, $2F, $08, $42, $43, $70, $24, $72, $19, $30, $7C, $C0, $00, $08, $05, $00, $02, $67, $06, $0C, $43, $00, $32, $64, $36 ;0x160
dc.b $34, $3C, $E5, $2F, $08, $03, $00, $04, $66, $04, $34, $3C, $E5, $6E, $61, $00, $E4, $5E, $4E, $45, $00, $01, $52, $43, $08, $39, $00, $06, $00, $FF, $27, $DA ;0x180
dc.b $66, $14, $08, $39, $00, $04, $00, $FF, $27, $DA, $66, $0A, $08, $39, $00, $05, $00, $FF, $27, $DA, $67, $BE, $70, $24, $72, $19, $30, $7C, $C0, $00, $34, $3C ;0x1A0
dc.b $E5, $2F, $61, $00, $E4, $2A, $20, $5F, $4A, $13, $66, $0E, $14, $10, $67, $22, $52, $88, $0C, $02, $00, $0C, $67, $00, $FE, $96, $3B, $7C, $00, $02, $00, $9E ;0x1C0
dc.b $61, $20, $38, $3C, $00, $06, $7E, $17, $4A, $13, $66, $00, $FE, $B2, $60, $00, $FE, $A2, $2F, $08, $20, $4D, $61, $00, $01, $A0, $20, $5F, $4C, $DF, $7F, $FF ;0x1E0
dc.b $4E, $75, $74, $01, $48, $E7, $FF, $8A, $48, $E7, $80, $80, $30, $3C, $00, $50, $61, $00, $01, $12, $28, $48, $4C, $DF, $01, $01, $42, $80, $30, $3C, $CB, $06 ;0x200
dc.b $72, $22, $74, $03, $20, $4C, $61, $00, $E3, $32, $2A, $00, $04, $45, $00, $80, $7E, $21, $42, $46, $2C, $4C, $61, $00, $E2, $82, $06, $40, $00, $80, $51, $CA ;0x220
dc.b $FF, $E4, $2F, $08, $20, $4C, $61, $00, $01, $50, $20, $5F, $4C, $DF, $51, $FF, $4E, $45, $00, $04, $51, $CA, $FF, $AE, $4E, $75, $0C, $6D, $00, $02, $00, $9E ;0x240
dc.b $65, $08, $0C, $47, $00, $15, $67, $02, $61, $98, $48, $E7, $F8, $60, $24, $48, $42, $42, $14, $1A, $67, $00, $00, $88, $0C, $02, $00, $03, $64, $06, $12, $C2 ;0x260
dc.b $12, $DA, $60, $EC, $66, $16, $20, $5E, $16, $18, $67, $0E, $0C, $03, $00, $03, $64, $04, $12, $C3, $16, $18, $12, $C3, $60, $EE, $60, $D4, $0C, $02, $00, $04 ;0x280
dc.b $66, $10, $24, $1E, $42, $43, $16, $1A, $20, $49, $78, $0F, $61, $00, $FC, $F0, $60, $BE, $0C, $02, $00, $05, $66, $14, $14, $1A, $61, $00, $67, $20, $61, $00 ;0x2A0
dc.b $FA, $90, $4A, $11, $67, $04, $52, $89, $60, $F8, $60, $A4, $0C, $02, $00, $06, $66, $10, $20, $5E, $61, $00, $FA, $7A, $4A, $11, $67, $04, $52, $89, $60, $F8 ;0x2C0
dc.b $60, $8E, $0C, $02, $00, $0F, $64, $10, $0C, $02, $00, $0D, $67, $06, $0C, $02, $00, $0C, $66, $FE, $4A, $41, $66, $06, $12, $C2, $60, $00, $FF, $74, $42, $11 ;0x2E0
dc.b $20, $4A, $53, $88, $4C, $DF, $06, $1F, $4E, $75 ;0x300
loc_00003B0A:
MOVEM.l A0/D0, -(A7)
MOVE.w #$01FF, D0
LEA $00FF30B8, A0
loc_00003B18:
CLR.b (A0)+
DBF D0, loc_00003B18
MOVEM.l (A7)+, D0/A0
RTS
loc_00003B24:
MOVEM.l A3/A2/A1/D2/D1/D0, -(A7)
LEA $00FF32B8, A0
LEA $00FF30B8, A1
MOVE.w #$01FF, D1
ADDI.w #$000F, D0
LSR.w #4, D0
loc_00003B3E:
TST.b (A1)
BEQ.b loc_00003B50
loc_00003B42:
ADDQ.l #1, A1
ADDA.w #$0010, A0
DBF D1, loc_00003B3E
BRA.w loc_00003B96 ;Predicted (Code-scan)
loc_00003B50:
MOVEA.l A0, A2
MOVEA.l A1, A3
MOVE.w D0, D2
loc_00003B56:
TST.b (A1)
BNE.b loc_00003B42
SUBQ.w #1, D2
BEQ.b loc_00003B6C
ADDQ.l #1, A1
ADDA.w #$0010, A0
DBF D1, loc_00003B56
BRA.w loc_00003B96 ;Predicted (Code-scan)
loc_00003B6C:
MOVEQ #1, D2
loc_00003B6E:
LEA $00FF30B8, A1
MOVE.w #$01FF, D1
loc_00003B78:
CMP.b (A1)+, D2
BEQ.b loc_00003B82
DBF D1, loc_00003B78
BRA.b loc_00003B86
loc_00003B82:
ADDQ.b #1, D2
BRA.b loc_00003B6E
loc_00003B86:
SUBQ.w #1, D0
loc_00003B88:
MOVE.b D2, (A3)+
DBF D0, loc_00003B88
MOVEA.l A2, A0
MOVEM.l (A7)+, D0/D1/D2/A1/A2/A3
RTS
loc_00003B96:
BRA.b loc_00003B96 ;Predicted (Code-scan)
loc_00003B98:
MOVEM.l A0/D0, -(A7)
SUBA.l #$00FF32B8, A0
MOVE.l A0, D0
LSR.l #4, D0
LEA $00FF30B8, A0
ADDA.l D0, A0
MOVE.b (A0), D0
BEQ.b loc_00003BC0
loc_00003BB2:
CMP.b (A0), D0
BNE.b loc_00003BBA
CLR.b (A0)+
BRA.b loc_00003BB2
loc_00003BBA:
MOVEM.l (A7)+, D0/A0
RTS
loc_00003BC0:
BRA.b loc_00003BC0 ;Predicted (Code-scan)
dc.b $20, $39, $00, $FF, $CE, $D2, $02, $40, $07, $FF, $0C, $40, $01, $00, $64, $04, $70, $03, $4E, $75, $0C, $40, $04, $00, $64, $04, $42, $40, $4E, $75, $0C, $40 ;0x0 (0x00003BC2-0x00003D08, Entry count: 0x146) [Unknown data]
dc.b $05, $00, $64, $04, $70, $01, $4E, $75, $70, $02, $4E, $75, $48, $E7, $C0, $00, $02, $80, $00, $00, $07, $FF, $22, $39, $00, $FF, $CE, $D2, $02, $41, $07, $FF ;0x20
dc.b $B2, $40, $65, $14, $06, $80, $00, $00, $08, $00, $4A, $79, $00, $FF, $D6, $52, $67, $06, $53, $79, $00, $FF, $D6, $52, $22, $39, $00, $FF, $CE, $D2, $02, $81 ;0x40
dc.b $FF, $FF, $F8, $00, $D2, $80, $23, $C1, $00, $FF, $CE, $D2, $4C, $DF, $00, $03, $4E, $75, $48, $E7, $C0, $80, $61, $3A, $03, $D0, $4C, $DF, $01, $03, $4E, $75 ;0x60
dc.b $48, $E7, $C0, $80, $61, $2C, $03, $90, $4C, $DF, $01, $03, $4E, $75, $48, $E7, $40, $80, $61, $1E, $08, $01, $00, $0F, $66, $08, $03, $10, $67, $0C, $70, $01 ;0x80
dc.b $60, $0A, $03, $10, $66, $04, $70, $01, $60, $02, $42, $40, $4C, $DF, $01, $02, $4E, $75, $41, $F9, $00, $FF, $52, $B8, $53, $40, $32, $00, $08, $80, $00, $0F ;0xA0
dc.b $E6, $48, $48, $C0, $D1, $C0, $4E, $75, $48, $E7, $80, $80, $41, $F9, $00, $FF, $52, $B8, $70, $27, $42, $98, $51, $C8, $FF, $FC, $4C, $DF, $01, $01, $4E, $75 ;0xC0
dc.b $48, $E7, $80, $80, $53, $40, $02, $40, $00, $FF, $48, $C0, $41, $F9, $00, $FF, $53, $58, $D1, $C0, $10, $81, $4C, $DF, $01, $01, $4E, $75, $2F, $08, $53, $40 ;0xE0
dc.b $02, $40, $00, $FF, $48, $C0, $41, $F9, $00, $FF, $53, $58, $D1, $C0, $42, $80, $10, $10, $20, $5F, $4E, $75, $2F, $08, $53, $40, $02, $40, $00, $FF, $48, $C0 ;0x100
dc.b $41, $F9, $00, $FF, $53, $58, $D1, $C0, $52, $10, $20, $5F, $4E, $75, $2F, $08, $53, $40, $02, $40, $00, $FF, $48, $C0, $41, $F9, $00, $FF, $53, $58, $D1, $C0 ;0x120
dc.b $53, $10, $20, $5F, $4E, $75 ;0x140
MOVEM.l A1/A0/D2/D1, -(A7)
CLR.w D2
MOVEA.l #$00200001, A0
MOVEP.l $2(A0), D0
CMPI.l #$41425900, D0
BEQ.b loc_00003D40
MOVEP.l $2002(A0), D0
CMPI.l #$41425900, D0
BEQ.b loc_00003D40
CLR.l D0
MOVE.w #$07FF, D1
MOVEA.l A0, A1
loc_00003D34:
MOVEP.l D0, $0(A1)
ADDQ.l #8, A1
DBF D1, loc_00003D34
MOVEQ #-1, D2
loc_00003D40:
MOVE.l #$41425900, D0
MOVEP.l D0, $2(A0)
MOVEP.l D0, $2002(A0)
MOVE.w D2, D0
MOVEM.l (A7)+, D1/D2/A0/A1
RTS
dc.b $23, $FC, $00, $20, $00, $0B, $00, $FF, $53, $9A, $4E, $75, $48, $E7, $C0, $C0, $53, $40, $22, $79, $00, $FF, $53, $9A, $03, $09, $00, $00, $30, $C1, $58, $89 ;0x0 (0x00003D56-0x00004000, Entry count: 0x2AA) [Unknown data]
dc.b $51, $C8, $FF, $F6, $23, $C9, $00, $FF, $53, $9A, $4C, $DF, $03, $03, $4E, $75, $48, $E7, $C0, $C0, $53, $40, $22, $79, $00, $FF, $53, $9A, $58, $89, $51, $C8 ;0x20
dc.b $FF, $FC, $23, $C9, $00, $FF, $53, $9A, $4C, $DF, $03, $03, $4E, $75, $48, $E7, $C0, $C0, $53, $40, $22, $79, $00, $FF, $53, $9A, $32, $18, $03, $89, $00, $00 ;0x40
dc.b $58, $89, $51, $C8, $FF, $F6, $23, $C9, $00, $FF, $53, $9A, $4C, $DF, $03, $03, $4E, $75, $48, $E7, $E0, $C0, $20, $7C, $00, $20, $00, $0B, $22, $48, $D3, $FC ;0x60
dc.b $00, $00, $20, $00, $42, $42, $32, $3C, $07, $FB, $01, $08, $00, $00, $01, $89, $00, $00, $D4, $40, $58, $88, $58, $89, $51, $C9, $FF, $F0, $05, $88, $00, $00 ;0x80
dc.b $05, $89, $00, $00, $4C, $DF, $03, $07, $4E, $75, $48, $E7, $20, $C0, $20, $7C, $00, $20, $00, $0B, $42, $42, $32, $3C, $07, $FB, $01, $08, $00, $00, $D4, $40 ;0xA0
dc.b $58, $88, $51, $C9, $FF, $F6, $01, $08, $00, $00, $B4, $40, $67, $5A, $20, $7C, $00, $20, $00, $0B, $22, $48, $D3, $FC, $00, $00, $20, $00, $42, $42, $32, $3C ;0xC0
dc.b $07, $FB, $01, $09, $00, $00, $01, $88, $00, $00, $D4, $40, $58, $88, $58, $89, $51, $C9, $FF, $F0, $01, $09, $00, $00, $01, $88, $00, $00, $B4, $40, $67, $28 ;0xE0
dc.b $20, $7C, $00, $20, $00, $0B, $22, $48, $D3, $FC, $00, $00, $20, $00, $42, $42, $32, $3C, $07, $FC, $05, $88, $00, $00, $05, $89, $00, $00, $58, $88, $58, $89 ;0x100
dc.b $51, $C9, $FF, $F2, $70, $FF, $60, $02, $42, $40, $20, $7C, $00, $20, $00, $0B, $03, $48, $00, $00, $4C, $DF, $03, $04, $4E, $75, $48, $E7, $80, $80, $61, $00 ;0x120
dc.b $FE, $C0, $41, $F9, $00, $00, $3E, $FE, $70, $02, $61, $00, $FF, $02, $41, $F9, $00, $FF, $CA, $6E, $70, $01, $61, $00, $FE, $F6, $41, $F9, $00, $FF, $CA, $9E ;0x140
dc.b $70, $03, $61, $00, $FE, $EA, $41, $F9, $00, $FF, $CA, $B2, $70, $03, $61, $00, $FE, $DE, $41, $F9, $00, $FF, $DB, $66, $70, $02, $61, $00, $FE, $D2, $41, $F9 ;0x160
dc.b $00, $FF, $CE, $CE, $30, $3C, $0B, $D4, $E2, $48, $61, $00, $FE, $C2, $41, $F9, $00, $FF, $52, $B8, $30, $3C, $00, $E0, $E2, $48, $61, $00, $FE, $B2, $61, $00 ;0x180
dc.b $FE, $D2, $4C, $DF, $01, $01, $4E, $75, $61, $62, $79, $00, $48, $E7, $80, $80, $61, $00, $FE, $4E, $70, $02, $61, $00, $FE, $78, $41, $F9, $00, $FF, $CA, $6E ;0x1A0
dc.b $70, $01, $61, $00, $FE, $48, $41, $F9, $00, $FF, $CA, $9E, $70, $03, $61, $00, $FE, $3C, $41, $F9, $00, $FF, $CA, $B2, $70, $03, $61, $00, $FE, $30, $41, $F9 ;0x1C0
dc.b $00, $FF, $DB, $66, $70, $02, $61, $00, $FE, $24, $41, $F9, $00, $FF, $CE, $CE, $30, $3C, $0B, $D4, $E2, $48, $61, $00, $FE, $14, $41, $F9, $00, $FF, $52, $B8 ;0x1E0
dc.b $30, $3C, $00, $E0, $E2, $48, $61, $00, $FE, $04, $4C, $DF, $01, $01, $4E, $75, $48, $E7, $F8, $40, $2F, $08, $48, $E7, $80, $80, $30, $3C, $00, $20, $61, $00 ;0x200
dc.b $FB, $AE, $22, $48, $4C, $DF, $01, $01, $20, $49, $70, $07, $42, $98, $51, $C8, $FF, $FC, $70, $01, $72, $01, $74, $26, $76, $1A, $38, $3C, $00, $43, $61, $00 ;0x220
dc.b $F3, $40, $33, $40, $00, $1E, $70, $1D, $72, $16, $74, $08, $76, $04, $78, $03, $61, $00, $F0, $44, $70, $04, $72, $03, $61, $00, $F5, $EE, $61, $00, $F6, $74 ;0x240
dc.b $4E, $71, $4E, $71, $4E, $71, $4E, $71, $4E, $71, $4E, $71, $70, $1C, $72, $03, $61, $00, $F5, $DE, $61, $00, $F6, $5C, $4E, $71, $4E, $71, $4E, $71, $4E, $71 ;0x260
dc.b $4E, $71, $4E, $71, $4E, $71, $4E, $71, $4E, $71, $4E, $71, $4E, $71, $4E, $71, $42, $69, $00, $14, $42, $69, $00, $16, $42, $69, $00, $18, $33, $7C, $00, $03 ;0x280
dc.b $00, $1A, $33, $7C, $00, $03, $00, $1C, $61, $00 ;0x2A0
| 37.161877
| 228
| 0.541524
|
a6172b892a83b8863da673c98f0260a498da2a61
| 9,347
|
asm
|
Assembly
|
bomber-02/bomber.asm
|
leonhad/atari
|
fc960c556d433cea6dc95a6e65b2429397e41c6e
|
[
"Apache-2.0"
] | null | null | null |
bomber-02/bomber.asm
|
leonhad/atari
|
fc960c556d433cea6dc95a6e65b2429397e41c6e
|
[
"Apache-2.0"
] | null | null | null |
bomber-02/bomber.asm
|
leonhad/atari
|
fc960c556d433cea6dc95a6e65b2429397e41c6e
|
[
"Apache-2.0"
] | null | null | null |
processor 6502
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Include required files with VCS register memory mapping and macros
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
include "vcs.h"
include "macro.h"
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Declare the variables starting from memory address $80
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
seg.u Variables
org $80
JetXPos byte ; player0 x-position
JetYPos byte ; player0 y-position
BomberXPos byte ; player1 x-position
BomberYPos byte ; player1 y-position
JetSpritePtr word ; pointer to player0 sprite lookup table
JetColorPtr word ; pointer to player0 color lookup table
BomberSpritePtr word ; pointer to player1 sprite lookup table
BomberColorPtr word ; pointer to player1 color lookup table
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Define constants
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
JET_HEIGHT = 9 ; player0 sprite height (# rows in lookup table)
BOMBER_HEIGHT = 9 ; player1 sprite height (# rows in lookup table)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Start our ROM code at memory address $F000
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
seg Code
org $F000
Reset:
CLEAN_START ; call macro to reset memory and registers
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Initialize RAM variables and TIA registers
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
lda #10
sta JetYPos ; JetYPos = 10
lda #60
sta JetXPos ; JetXPos = 60
lda #83
sta BomberYPos ; BomberYPos = 83
lda #54
sta BomberXPos ; BomberXPos = 54
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Initialize pointers to the correct lookup table addresses
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
lda #<JetSprite
sta JetSpritePtr ; lo-byte pointer for jet sprite lookup table
lda #>JetSprite
sta JetSpritePtr+1 ; hi-byte pointer for jet sprite lookup table
lda #<JetColor
sta JetColorPtr ; lo-byte pointer for jet color lookup table
lda #>JetColor
sta JetColorPtr+1 ; hi-byte pointer for jet color lookup table
lda #<BomberSprite
sta BomberSpritePtr ; lo-byte pointer for enemy sprite lookup table
lda #>BomberSprite
sta BomberSpritePtr+1 ; hi-byte pointer for enemy sprite lookup table
lda #<BomberColor
sta BomberColorPtr ; lo-byte pointer for enemy color lookup table
lda #>BomberColor
sta BomberColorPtr+1 ; hi-byte pointer for enemy color lookup table
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Start the main display loop and frame rendering
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
StartFrame:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Display VSYNC and VBLANK
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
lda #2
sta VBLANK ; turn on VBLANK
sta VSYNC ; turn on VSYNC
REPEAT 3
sta WSYNC ; display 3 recommended lines of VSYNC
REPEND
lda #0
sta VSYNC ; turn off VSYNC
REPEAT 37
sta WSYNC ; display the 37 recommended lines of VBLANK
REPEND
sta VBLANK ; turn off VBLANK
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Display the 192 visible scanlines of our main game
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
GameVisibleLine:
lda #$84
sta COLUBK ; set background/river color to blue
lda #$C2
sta COLUPF ; set playfield/grass color to green
lda #%00000001
sta CTRLPF ; enable playfield reflection
lda #$F0
sta PF0 ; setting PF0 bit pattern
lda #$FC
sta PF1 ; setting PF1 bit pattern
lda #0
sta PF2 ; setting PF2 bit pattern
ldx #96 ; X counts the number of remaining scanlines
.GameLineLoop:
.AreWeInsideJetSprite: ; check if should render sprite player0
txa ; transfer X to A
sec ; make sure carry flag is set
sbc JetYPos ; subtract sprite Y coordinate
cmp JET_HEIGHT ; are we inside the sprite height bounds?
bcc .DrawSpriteP0 ; if result < SpriteHeight, call subroutine
lda #0 ; else, set lookup index to 0
.DrawSpriteP0:
;clc ; clears carry flag before addition
;adc JetAnimOffset ; jumps to correct sprite frame in memory
tay ; load Y so we can work with pointer
lda (JetSpritePtr),Y ; load player bitmap slice of data
sta WSYNC ; wait for next scanline
sta GRP0 ; set graphics for player 0
lda (JetColorPtr),Y ; load player color from lookup table
sta COLUP0 ; set color for player 0 slice
.AreWeInsideBomberSprite: ; check if should render sprite player1
txa ; transfer X to A
sec ; make sure carry flag is set
sbc BomberYPos ; subtract sprite Y coordinate
cmp BOMBER_HEIGHT ; are we inside the sprite height bounds?
bcc .DrawSpriteP1 ; if result < SpriteHeight, call subroutine
lda #0 ; else, set index to 0
.DrawSpriteP1:
tay
lda #%0000101
sta NUSIZ1 ; stretch player1 sprite
lda (BomberSpritePtr),Y ; load player bitmap slice of data
sta WSYNC ; wait for next scanline
sta GRP1 ; set graphics for player 0
lda (BomberColorPtr),Y ; load player color from lookup table
sta COLUP1 ; set color for player 0 slice
dex ; X--
bne .GameLineLoop ; repeat next main game scanline while X != 0
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Display Overscan
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
lda #2
sta VBLANK ; turn on VBLANK again
REPEAT 30
sta WSYNC ; display 30 recommended lines of VBlank Overscan
REPEND
lda #0
sta VBLANK ; turn off VBLANK
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Loop back to start a brand new frame
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
jmp StartFrame ; continue to display the next frame
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Declare ROM lookup tables
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
JetSprite:
.byte #%00000000 ;
.byte #%00010100 ; # #
.byte #%01111111 ; #######
.byte #%00111110 ; #####
.byte #%00011100 ; ###
.byte #%00011100 ; ###
.byte #%00001000 ; #
.byte #%00001000 ; #
.byte #%00001000 ; #
; Possible:
; JET_HIGHT = . - JetSprite
JetSpriteTurn:
.byte #%00000000 ;
.byte #%00001000 ; #
.byte #%00111110 ; #####
.byte #%00011100 ; ###
.byte #%00011100 ; ###
.byte #%00011100 ; ###
.byte #%00001000 ; #
.byte #%00001000 ; #
.byte #%00001000 ; #
BomberSprite:
.byte #%00000000 ;
.byte #%00001000 ; #
.byte #%00001000 ; #
.byte #%00101010 ; # # #
.byte #%00111110 ; #####
.byte #%01111111 ; #######
.byte #%00101010 ; # # #
.byte #%00001000 ; #
.byte #%00011100 ; ###
JetColor:
.byte #$00
.byte #$FE
.byte #$0C
.byte #$0E
.byte #$0E
.byte #$04
.byte #$BA
.byte #$0E
.byte #$08
JetColorTurn:
.byte #$00
.byte #$FE
.byte #$0C
.byte #$0E
.byte #$0E
.byte #$04
.byte #$0E
.byte #$0E
.byte #$08
BomberColor:
.byte #$00
.byte #$32
.byte #$32
.byte #$0E
.byte #$40
.byte #$40
.byte #$40
.byte #$40
.byte #$40
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Complete ROM size with exactly 4KB
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
org $FFFC ; move to position $FFFC
word Reset ; write 2 bytes with the program reset address
word Reset ; write 2 bytes with the interruption vector
| 38.15102
| 79
| 0.431796
|
720e7d8c11135bce1e3d685f67be94e8c66a275c
| 3,745
|
asm
|
Assembly
|
Meta/Minnow.asm
|
jaredwhitney/os3
|
05e0cda4670da093cc720d0dccbfeb29e788fa0f
|
[
"MIT"
] | 5
|
2015-02-25T01:28:09.000Z
|
2021-05-22T09:03:04.000Z
|
Meta/Minnow.asm
|
jaredwhitney/os3
|
05e0cda4670da093cc720d0dccbfeb29e788fa0f
|
[
"MIT"
] | 38
|
2015-02-10T18:37:11.000Z
|
2017-10-03T03:08:50.000Z
|
Meta/Minnow.asm
|
jaredwhitney/os3
|
05e0cda4670da093cc720d0dccbfeb29e788fa0f
|
[
"MIT"
] | 2
|
2016-05-06T22:48:46.000Z
|
2017-01-12T19:28:49.000Z
|
[bits 32]
dd Minnow.$FILE_END - Minnow.$FILE_START
db "OrcaHLL Class", 0
db "Minnow", 0
Minnow.$FILE_START :
Minnow.ReadFileBlock:
pop dword [Minnow.ReadFileBlock.returnVal]
pop ecx
mov [Minnow.ReadFileBlock.$local.block], ecx
pop ecx
mov [Minnow.ReadFileBlock.$local.fileType], ecx
pop ecx
mov [Minnow.ReadFileBlock.$local.fileName], ecx
push eax
push ebx
push edx
mov ecx, [Minnow.ReadFileBlock.$local.fileName]
mov eax, ecx ; INLINE ASSEMBLY
mov ecx, [Minnow.ReadFileBlock.$local.fileType]
mov ebx, ecx ; INLINE ASSEMBLY
call Minnow.nameAndTypeToPointer ; INLINE ASSEMBLY
mov eax, ecx ; INLINE ASSEMBLY
mov ecx, [Minnow.ReadFileBlock.$local.block]
mov ebx, ecx ; INLINE ASSEMBLY
call Minnow.readFileBlock ; INLINE ASSEMBLY
pop edx
pop ebx
pop eax
push dword [Minnow.ReadFileBlock.returnVal]
ret
;Vars:
Minnow.ReadFileBlock.$local.fileName :
dd 0x0
Minnow.ReadFileBlock.$local.block :
dd 0x0
Minnow.ReadFileBlock.$local.fileType :
dd 0x0
Minnow.ReadFileBlock.returnVal:
dd 0x0
Minnow.WriteFile:
pop dword [Minnow.WriteFile.returnVal]
pop ecx
mov [Minnow.WriteFile.$local.bufferSize], ecx
pop ecx
mov [Minnow.WriteFile.$local.buffer], ecx
pop ecx
mov [Minnow.WriteFile.$local.fileType], ecx
pop ecx
mov [Minnow.WriteFile.$local.fileName], ecx
push eax
push ebx
push edx
mov ecx, [Minnow.WriteFile.$local.fileName]
mov eax, ecx ; INLINE ASSEMBLY
mov ecx, [Minnow.WriteFile.$local.fileType]
mov ebx, ecx ; INLINE ASSEMBLY
mov ecx, [Minnow.WriteFile.$local.bufferSize]
mov edx, ecx ; INLINE ASSEMBLY
mov ecx, [Minnow.WriteFile.$local.buffer]
call Minnow.writeFile ; INLINE ASSEMBLY
pop edx
pop ebx
pop eax
push dword [Minnow.WriteFile.returnVal]
ret
;Vars:
Minnow.WriteFile.$local.fileName :
dd 0x0
Minnow.WriteFile.$local.buffer :
dd 0x0
Minnow.WriteFile.$local.fileType :
dd 0x0
Minnow.WriteFile.$local.bufferSize :
dd 0x0
Minnow.WriteFile.returnVal:
dd 0x0
Minnow.CheckExists:
pop dword [Minnow.CheckExists.returnVal]
pop ecx
mov [Minnow.CheckExists.$local.fileType], ecx
pop ecx
mov [Minnow.CheckExists.$local.fileName], ecx
push eax
push ebx
push edx
mov ecx, [Minnow.CheckExists.$local.fileName]
mov eax, ecx ; INLINE ASSEMBLY
mov ecx, [Minnow.CheckExists.$local.fileType]
mov ebx, ecx ; INLINE ASSEMBLY
call Minnow.nameAndTypeToPointer ; INLINE ASSEMBLY
cmp cl, 0xFF
jne Minnow.$loop_if.0_close
mov ecx, 0x0
pop edx
pop ebx
pop eax
push dword [Minnow.CheckExists.returnVal]
ret
Minnow.$loop_if.0_close :
mov ecx, 0xFF
pop edx
pop ebx
pop eax
push dword [Minnow.CheckExists.returnVal]
ret
;Vars:
Minnow.CheckExists.$local.fileName :
dd 0x0
Minnow.CheckExists.$local.fileType :
dd 0x0
Minnow.CheckExists.returnVal:
dd 0x0
Minnow.DeleteFile:
pop dword [Minnow.DeleteFile.returnVal]
pop ecx
mov [Minnow.DeleteFile.$local.fileType], ecx
pop ecx
mov [Minnow.DeleteFile.$local.fileName], ecx
push eax
push ebx
push edx
mov ecx, [Minnow.DeleteFile.$local.fileName]
mov eax, ecx ; INLINE ASSEMBLY
mov ecx, [Minnow.DeleteFile.$local.fileType]
mov ebx, ecx ; INLINE ASSEMBLY
call Minnow.nameAndTypeToPointer ; INLINE ASSEMBLY
mov eax, ecx ; INLINE ASSEMBLY
call Minnow.deleteFile ; INLINE ASSEMBLY
pop edx
pop ebx
pop eax
push dword [Minnow.DeleteFile.returnVal]
ret
;Vars:
Minnow.DeleteFile.$local.fileName :
dd 0x0
Minnow.DeleteFile.$local.fileType :
dd 0x0
Minnow.DeleteFile.returnVal:
dd 0x0
Minnow.ReadBlock:
pop dword [Minnow.ReadBlock.returnVal]
pop ecx
mov [Minnow.ReadBlock.$local.block], ecx
push eax
push ebx
push edx
mov ecx, [Minnow.ReadBlock.$local.block]
mov eax, ecx ; INLINE ASSEMBLY
call Minnow.getBuffer ; INLINE ASSEMBLY
pop edx
pop ebx
pop eax
push dword [Minnow.ReadBlock.returnVal]
ret
;Vars:
Minnow.ReadBlock.$local.block :
dd 0x0
Minnow.ReadBlock.returnVal:
dd 0x0
Minnow.$FILE_END :
| 21.278409
| 50
| 0.777036
|
6fbb6d1b2b9e90fe127097b1a772e4f843fd3cbc
| 568
|
asm
|
Assembly
|
programs/oeis/303/A303590.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/303/A303590.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/303/A303590.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A303590: Floor(n*beta)-1, where 1/alpha+1/beta=1, alpha being the number with continued fraction expansion [1;1,2,3,4,5,...] (A247844).
; 1,3,6,8,11,13,16,18,20,23,25,28,30,33,35,37,40,42,45,47,50,52,54,57,59,62,64,67,69,71,74,76,79,81,84,86,89,91,93,96,98,101,103,106,108,110,113,115,118,120,123,125,127,130,132,135,137,140,142,144,147,149,152,154,157,159,162,164,166,169,171,174,176
mov $3,$0
add $0,6
mov $1,$0
sub $0,6
mul $1,2
add $0,$1
mov $4,6
lpb $1
add $0,5
sub $1,1
lpe
lpb $4
sub $4,1
add $5,5
lpe
div $0,$5
sub $0,1
mov $2,$3
mul $2,2
add $0,$2
| 23.666667
| 248
| 0.642606
|
b7cff20082f8f6d5dcc4806e441ca14b5375302d
| 4,252
|
asm
|
Assembly
|
dino/lcs/etc/8.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
|
dino/lcs/etc/8.asm
|
zengfr/arcade_game_romhacking_sourcecode_top_secret_data
|
a4a0c86c200241494b3f1834cd0aef8dc02f7683
|
[
"Apache-2.0"
] | null | null | null |
dino/lcs/etc/8.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
00042A move.l D1, (A0)+
00042C dbra D0, $42a
0018AE add.l D0, ($8,A6)
0018B2 moveq #$0, D0 [123p+ 8, 123p+ A, base+744, enemy+ 8, enemy+ A, etc+ 8, etc+ A, item+ 8, item+ A]
00494E move.l D0, (A4)+
004950 move.l D0, (A4)+
004D3C move.l D0, (A4)+
004D3E move.l D0, (A4)+
009E64 move.w ($8,A6), D0
009E68 sub.w ($744,A5), D0 [etc+ 8]
00FCD8 move.w ($6,A2), ($8,A0) [etc+20]
00FCDE move.w ($c,A2), ($c,A0) [etc+ 8]
00FE3C move.w ($6,A2), ($8,A0) [enemy+20, etc+20, item+20]
00FE42 move.w ($8,A2), ($10,A0) [enemy+ 8, etc+ 8, item+ 8]
012744 move.w ($8,A3), D1
012748 move.w (A6)+, D3 [123p+ 8, enemy+ 8, etc+ 8, item+ 8]
012962 move.w ($8,A3), D1
012966 move.w (A6)+, D3 [123p+ 8, enemy+ 8, etc+ 8, item+ 8]
0131B0 sub.w D0, ($8,A6)
0131B4 move.b ($f,A0), ($50,A6) [123p+ 8, enemy+ 8, etc+ 8, item+ 8]
0131CE add.w D0, ($8,A6)
0131D2 move.b ($f,A0), ($50,A6) [123p+ 8, enemy+ 8, etc+ 8, item+ 8]
013550 sub.w D0, ($8,A6)
013554 move.b ($f,A0), ($50,A6) [123p+ 8, enemy+ 8, etc+ 8, item+ 8]
01359A sub.w D0, ($8,A6)
01359E move.b ($f,A0), ($50,A6) [123p+ 8, enemy+ 8, etc+ 8]
014258 move.w ($8,A0), D4
01425C move.w ($c,A0), D5 [123p+ 8, enemy+ 8, etc+ 8, item+ 8]
01480A move.w ($8,A0), D4
01480E move.w ($c,A0), D5 [etc+ 8]
0789DC move.w #$670, ($8,A0) [etc+20]
0789E2 clr.w ($c,A0) [etc+ 8]
07912C move.w #$38a, ($8,A6)
079132 move.w #$60, ($c,A6) [etc+ 8]
07B264 move.w #$40, ($8,A6) [etc+ 4]
07B26A move.w #$10, ($c,A6) [etc+ 8]
07B584 move.w #$180, ($8,A6) [etc+25]
07B58A move.w #$8, ($10,A6) [etc+ 8]
07B67A move.w ($744,A5), ($8,A6) [etc+A0, etc+A2]
07B680 jsr $12fe4.l [etc+ 8]
07B6EE move.w D0, ($8,A6) [base+744]
07B6F2 jsr $12fe4.l [etc+ 8]
07E75A move.w ($8,A3), ($8,A0) [etc+26]
07E760 move.w ($a,A3), ($66,A0) [etc+ 8]
07E79C move.w ($8,A3), ($8,A0) [etc+26]
07E7A2 move.w ($a,A3), ($66,A0) [etc+ 8]
08106C move.w #$e8, ($8,A6)
081072 move.w #$b8, ($c,A6) [etc+ 8]
083712 cmp.w ($8,A6), D0
083716 bcc $83804 [etc+ 8]
08883E move.w D0, ($8,A6)
088842 lea ($2e,PC) ; ($88872), A0 [etc+ 8]
08893A move.w ($c,PC,D0.w), ($8,A6)
088940 rts [etc+ 8]
08BE34 move.w D0, ($8,A6)
08BE38 move.w #$5, ($c,A6) [etc+ 8]
08C4E6 move.w ($8,A0), ($8,A6)
08C4EC move.w ($10,A0), ($10,A6) [etc+ 8]
08C504 subi.w #$4b, ($8,A6)
08C50A bra $8c514 [etc+ 8]
08C50E addi.w #$4c, ($8,A6)
08C514 tst.w ($14,A0) [etc+ 8]
08C7EE sub.w D0, ($8,A6)
08C7F2 move.w ($10,A6), D0 [etc+ 8]
0AAACA move.l (A0), D2
0AAACC move.w D0, (A0) [123p+11A, 123p+11C, 123p+11E, 123p+120, 123p+122, 123p+124, 123p+126, 123p+128, 123p+12A, enemy+BC, enemy+C0, enemy+C2, enemy+C4, enemy+CC, enemy+CE, enemy+D0, enemy+D2, enemy+D4, enemy+D6, enemy+D8, enemy+DA, enemy+DE, item+86, item+88, item+8A, item+98, item+9A, item+9C, item+9E, item+A0, item+A2, item+A4, item+A6, scr1]
0AAACE move.w D0, ($2,A0)
0AAAD2 cmp.l (A0), D0
0AAAD4 bne $aaafc
0AAAD8 move.l D2, (A0)+
0AAADA cmpa.l A0, A1 [123p+11A, 123p+11C, 123p+11E, 123p+120, 123p+122, 123p+124, 123p+126, 123p+128, 123p+12A, enemy+BC, enemy+C0, enemy+C2, enemy+C4, enemy+CC, enemy+CE, enemy+D0, enemy+D2, enemy+D4, enemy+D6, enemy+D8, enemy+DA, enemy+DE, item+86, item+88, item+8A, item+98, item+9A, item+9C, item+9E, item+A0, item+A2, item+A4, item+A6, scr1]
0AAAE6 move.l (A0), D2
0AAAE8 move.w D0, (A0) [123p+11A, 123p+11C, 123p+11E, 123p+120, 123p+122, 123p+124, 123p+126, 123p+128, 123p+12A, enemy+BC, enemy+C0, enemy+C2, enemy+C4, enemy+CC, enemy+CE, enemy+D0, enemy+D2, enemy+D4, enemy+D6, enemy+D8, enemy+DA, enemy+DE, item+86, item+88, item+8A, item+98, item+9A, item+9C, item+9E, item+A0, item+A2, item+A4, item+A6, scr1]
0AAAF4 move.l D2, (A0)+
0AAAF6 cmpa.l A0, A1 [123p+11A, 123p+11C, 123p+11E, 123p+120, 123p+122, 123p+124, 123p+126, 123p+128, 123p+12A, enemy+BC, enemy+C0, enemy+C2, enemy+C4, enemy+CC, enemy+CE, enemy+D0, enemy+D2, enemy+D4, enemy+D6, enemy+D8, enemy+DA, enemy+DE, item+86, item+88, item+8A, item+98, item+9A, item+9C, item+9E, item+A0, item+A2, item+A4, item+A6, scr1]
copyright zengfr site:http://github.com/zengfr/romhack
| 53.15
| 350
| 0.592192
|
87b27ffbff46ef5fab00fe7762af7be715be4de9
| 170
|
asm
|
Assembly
|
src/Core/InterruptHandlers/Joypad.asm
|
stoneface86/GameboyBoilerplateProj
|
7d2dedb2c3f6fe49819f8ca32c4f6308022d18c7
|
[
"MIT"
] | 25
|
2018-06-08T19:19:53.000Z
|
2021-10-03T05:07:38.000Z
|
src/Core/InterruptHandlers/Joypad.asm
|
stoneface86/GameboyBoilerplateProj
|
7d2dedb2c3f6fe49819f8ca32c4f6308022d18c7
|
[
"MIT"
] | 1
|
2020-07-14T20:15:47.000Z
|
2020-07-15T20:15:26.000Z
|
src/Core/InterruptHandlers/Joypad.asm
|
stoneface86/GameboyBoilerplateProj
|
7d2dedb2c3f6fe49819f8ca32c4f6308022d18c7
|
[
"MIT"
] | 6
|
2019-05-23T05:32:11.000Z
|
2020-04-26T21:26:00.000Z
|
include "./src/Includes.inc"
section "JoypadHandler", rom0
; Unused and really shouldn't be used
Joypad::
ld a, JOYPAD_INTERRUPT_CODE
ld [wLastInterrupt], a
reti
| 17
| 37
| 0.735294
|
9019b12f5d4cd00df9653363927ae172c638eff5
| 8,876
|
asm
|
Assembly
|
clock-2-0.asm
|
politechnik/pic-clock
|
339fb5f40cc0b2000cf3eb8657866d7d1d2c2e43
|
[
"BSD-3-Clause"
] | null | null | null |
clock-2-0.asm
|
politechnik/pic-clock
|
339fb5f40cc0b2000cf3eb8657866d7d1d2c2e43
|
[
"BSD-3-Clause"
] | null | null | null |
clock-2-0.asm
|
politechnik/pic-clock
|
339fb5f40cc0b2000cf3eb8657866d7d1d2c2e43
|
[
"BSD-3-Clause"
] | null | null | null |
;***************************************************************************;
; Digital clock listing, v 2.0 ;
; Author: Oleg TSaregorodtsev ;
;***************************************************************************;
; MCU Ports connecting: ;
;***************************************************************************;
; PORTA,0 2nd pin hour decads common ;
; PORTA,1 3rd pin hour units common ;
; PORTA,2 4th pin minute decads common ;
; PORTA,3 5th pin minute units common ;
; PORTA,4 6th pin low second point ;
; PORTA,5 7th pin high second point ;
; PORTC,0 11th pin non connected ;
; PORTC,1 12th pin non connected ;
; PORTC,2 13th pin non connected ;
; PORTC,3 14th pin minute setting button, active low ;
; PORTC,4 15th pin non connected ;
; PORTC,5 16th pin non connected ;
; PORTC,6 17th pin non connected ;
; PORTC,7 18th pin non connected ;
; PORTB,0 21th pin hour setting button, active low ;
; PORTB,1 22rd pin c segments ;
; PORTB,2 23th pin d segments ;
; PORTB,3 24th pin a segments ;
; PORTB,4 25th pin b segments ;
; PORTB,5 26th pin f segments ;
; PORTB,6 27th pin e segments ;
; PORTB,7 28th pin g segments ;
;***************************************************************************;
list p=pic16f873
include <pic16f873.inc>
__config _CP_ALL &_DEBUG_OFF &_CPD_OFF &_LVP_OFF &_BODEN_ON &_PWRTE_ON &_WDT_OFF &_HS_OSC
cblock 21h
HOUR10
HOUR
MIN10
MIN
SEC10
SEC
FLAGS
DEBOUNCE
MODE
OLD_MODE
; list of modes:
; MODE=xx000000 - normal, <HH_MM>
; MODE=xx000010 - edit hour decads counter, <_H:MM>
; MODE=xx000100 - edit hour units counter, <H_:MM>
; MODE=xx001000 - edit minute decads counter, <HH:_M>
; MODE=xx010000 - edit minute units counter, <HH:M_>
; MODE=xx100000 - show seconds, <MM:SS>
; *note: '_' means blinking
COUNTER
BLINKING_DIV
POINTER
AKKU
endc
constant _KEY_DEBOUNCE = D'10'; &*RTC
constant _ACCURACY = 0x3E
#define SHIFT STATUS,RP0 ; bank select bit
#define M_F FLAGS,0 ; mode key flag
#define S_F FLAGS,1 ; set key flag
#define CHANGE FLAGS,2 ; counters changing flag
#define PT_F FLAGS,3 ;
#define PT_L PORTA,4 ; low second point
#define PT_H PORTA,5 ; high second point
#define M_BTN PORTB,0 ; mode button press bit
#define S_BTN PORTC,3 ; set button press bit
org 0x000
BSF SHIFT ; bank 1
MOVLW B'11000000'
MOVWF OPTION_REG
MOVLW B'00000000'
MOVWF TRISA
MOVLW B'00000001'
MOVWF TRISB
MOVLW B'00001000'
MOVWF TRISC
CLRF PIE1
CLRF PIE2
MOVLW D'7'
MOVWF ADCON1
BCF SHIFT ; bank 0
CLRF STATUS
CLRF PORTA
CLRF PORTB
CLRF PORTC
CLRF INTCON
CLRF PIR1
CLRF PIR2
MOVLW B'00000001'
MOVWF T1CON
CLRF CCP1CON
CLRF CCP2CON
CLRF ADCON0
CLRF TMR1H
CLRF TMR1L
;
CLRF HOUR10
CLRF HOUR
CLRF MIN10
CLRF MIN
CLRF SEC10
CLRF SEC
CLRF FLAGS
CLRF DEBOUNCE
CLRF MODE
MOVLW B'00000001'
MOVWF OLD_MODE
CLRF COUNTER
CLRF BLINKING_DIV
CLRF POINTER
;
;======================== MAIN PROGRAM LOOP ========================
;
LOOP MOVLW 0xF6 ;RTC=2,5msec
ADDWF TMR1H,F
MOVLW _ACCURACY
ADDWF TMR1L,F
MOVLW B'00110000' ;mask of digit commons
ANDWF PORTA,F
CALL POINT ;set common
CALL DECODE
MOVWF PORTB ;set symbol
;
INCF POINTER,F
MOVLW D'4'
XORWF POINTER,W
BTFSC STATUS,Z
CLRF POINTER
;
INCF COUNTER,F
MOVLW D'200'
XORWF COUNTER,W
BTFSS STATUS,Z
GOTO MODE_5_CHECK
CLRF COUNTER
;
BCF PT_L
BCF PT_H
BTFSS PT_F
GOTO $+.4
BCF PT_F
CALL INCR
GOTO MODE_5_CHECK
;
BSF PT_F
BTFSC MODE,5 ; in MM:SS mode dots blinking are disabled
GOTO MODE_5_CHECK
BSF PT_L
BSF PT_H
;
MODE_5_CHECK
BTFSS MODE,5
GOTO MODE_0_CHECK
;
MOVF OLD_MODE,W
XORWF MODE,W
BTFSC STATUS,Z
GOTO BUTTONS
;
CLRF BLINKING_DIV
BSF SHIFT ; bank 1
CLRF TRISA
BCF SHIFT ; bank 0
;
MOVF MODE,W
MOVWF OLD_MODE
GOTO BUTTONS
;
MODE_0_CHECK
MOVF MODE,F
BTFSS STATUS,Z
GOTO MODE_BLINKING
;
MOVF OLD_MODE,W
XORWF MODE,W
BTFSC STATUS,Z
GOTO BUTTONS
;
CLRF BLINKING_DIV
MOVF HOUR10,F ;check to useless null
BTFSS STATUS,Z
GOTO $+.6
BSF SHIFT ; bank 1
MOVLW B'00000001'
MOVWF TRISA
BCF SHIFT ; bank 0
GOTO $+.4
BSF SHIFT ; bank 1
CLRF TRISA
BCF SHIFT ; bank 0
;
MOVF MODE,W
MOVWF OLD_MODE
;
GOTO BUTTONS
;
MODE_BLINKING
MOVF OLD_MODE,W
XORWF MODE,W
BTFSC STATUS,Z
GOTO $+.6
CLRF BLINKING_DIV
BSF SHIFT ; bank 1
CLRF TRISA
BCF SHIFT ; bank 0
GOTO $+.7
;
INCF BLINKING_DIV,F
MOVLW D'50'
XORWF BLINKING_DIV,W
BTFSS STATUS,Z
GOTO BUTTONS
CLRF BLINKING_DIV
;
RRF MODE,W
MOVWF AKKU
BSF SHIFT ; bank 1
COMF TRISA,W
BCF SHIFT ; bank 0
ANDWF AKKU,W
;
BSF SHIFT ; bank 1
MOVWF TRISA
BCF SHIFT ; bank 0
;
MOVF MODE,W
MOVWF OLD_MODE
BUTTONS
;
BTFSC M_F
GOTO M_PRESS
;
BTFSC S_F
GOTO S_PRESS
;
NEXT_M BTFSC M_BTN ;mode button press check
GOTO $+.3
BSF M_F
GOTO M_PRESS
;
NEXT_S BTFSC S_BTN ;setting button press check
GOTO $+.3
BSF S_F
GOTO S_PRESS
;
MAIN BTFSS PIR1,TMR1IF
GOTO $-1
BCF PIR1,TMR1IF
GOTO LOOP
;
;====================== END MAIN PROGRAM LOOP ======================
;
DECODE ADDWF PCL,1 ;digit symbols table
RETLW B'10000000' ;0
RETLW B'11101100' ;1
RETLW B'00100010' ;2
RETLW B'01100000' ;3
RETLW B'01001100' ;4
RETLW B'01010000' ;5
RETLW B'00010000' ;6
RETLW B'11100100' ;7
RETLW B'00000000' ;8
RETLW B'01000000' ;9
;
POINT BTFSC MODE,5
GOTO MM_SS
;
MOVF POINTER,W
ADDWF PCL,1
;
goto $+.4
goto $+.6
goto $+.8
goto $+.10
;
BSF PORTA,0
MOVF HOUR10,0
RETURN
;
BSF PORTA,1
MOVF HOUR,0
RETURN
;
BSF PORTA,2
MOVF MIN10,0
RETURN
;
BSF PORTA,3
MOVF MIN,0
RETURN
;
MM_SS BCF PT_L
BCF PT_H
MOVF POINTER,W
ADDWF PCL,1
;
goto $+.4
goto $+.6
goto $+.8
goto $+.10
;
BSF PORTA,0
MOVF MIN10,0
RETURN
;
BSF PORTA,1
MOVF MIN,0
RETURN
;
BSF PORTA,2
MOVF SEC10,0
RETURN
;
BSF PORTA,3
MOVF SEC,0
RETURN
;
M_PRESS MOVLW _KEY_DEBOUNCE
SUBWF DEBOUNCE,W
BTFSC STATUS,C ;
GOTO $+.3
;
INCF DEBOUNCE,F
GOTO MAIN
;
BTFSS M_BTN
GOTO $+.4
;
BCF M_F
CLRF DEBOUNCE
GOTO NEXT_S
;
BTFSS STATUS,Z
GOTO $+.3
;
CALL M_EVENT
INCF DEBOUNCE,F
GOTO MAIN
;
M_EVENT MOVF MODE,F
BTFSS STATUS,Z
GOTO $+.3
BSF MODE,1
RETURN
;
MOVLW B'00010000'
SUBWF MODE,W
BTFSC STATUS,C ;
GOTO $+.3
RLF MODE,F
RETURN
;
BTFSC MODE,5
GOTO $+.3
CLRF MODE
RETURN
;
MOVLW D'3'
SUBWF SEC10,W
BTFSC STATUS,C ;@@
CALL INC_M
CLRF SEC10
CLRF SEC
CLRF COUNTER
RETURN
;
S_PRESS MOVLW _KEY_DEBOUNCE
SUBWF DEBOUNCE,W
BTFSC STATUS,C ;
GOTO $+.3
;
INCF DEBOUNCE,F
GOTO MAIN
;
BTFSS S_BTN
GOTO $+.4
;
BCF S_F
CLRF DEBOUNCE
GOTO NEXT_S
;
BTFSS STATUS,Z
GOTO $+.3
;
CALL S_EVENT
INCF DEBOUNCE,F
GOTO MAIN
;
S_EVENT MOVF MODE,F
BTFSS STATUS,Z
GOTO $+.3
BSF MODE,5
RETURN
;
BTFSS MODE,1
GOTO $+.5
;
BSF CHANGE
CALL INC_H10
BCF CHANGE
RETURN
;
BTFSS MODE,2
GOTO $+.5
;
BSF CHANGE
CALL INC_H
BCF CHANGE
RETURN
;
BTFSS MODE,3
GOTO $+.5
;
BSF CHANGE
CALL INC_M10
BCF CHANGE
RETURN
;
BTFSS MODE,4
GOTO $+.5
;
BSF CHANGE
CALL INC_M
BCF CHANGE
RETURN
;
CLRF MODE
RETURN
;
INCR MOVLW D'9' ;increment second units counter
SUBWF SEC,W
BTFSC STATUS,C
GOTO $+.3
INCF SEC,F
RETURN
CLRF SEC
;
MOVLW D'5' ;increment second decads counter
SUBWF SEC10,W
BTFSC STATUS,C
GOTO $+.3
INCF SEC10,F
RETURN
CLRF SEC10
;
INC_M MOVLW D'9' ;increment minute units counter
SUBWF MIN,W
BTFSC STATUS,C
GOTO $+.3
INCF MIN,F
RETURN
CLRF MIN
;
BTFSS MODE,4
GOTO $+.3
BTFSC CHANGE
RETURN
;
INC_M10 MOVLW D'5' ;increment minute decads counter
SUBWF MIN10,W
BTFSC STATUS,C
GOTO $+.3
INCF MIN10,F
RETURN
CLRF MIN10
;
BTFSS MODE,3
GOTO $+.3
BTFSC CHANGE
RETURN
;
INC_H MOVLW D'2' ;if HOUR10=2, max HOUR=3
SUBWF HOUR10,W
BTFSS STATUS,C
GOTO $+.3
MOVLW D'3'
GOTO $+.2
;
MOVLW D'9' ;increment hour units counter
SUBWF HOUR,W
BTFSC STATUS,C
GOTO $+.3
INCF HOUR,F
RETURN
CLRF HOUR
;
BTFSS MODE,2
GOTO $+.3
BTFSC CHANGE
RETURN
;
INC_H10 MOVLW D'2' ;increment hour decads counter
SUBWF HOUR10,W
BTFSC STATUS,C
GOTO $+.6
INCF HOUR10,F
BSF SHIFT ; bank 1
BCF TRISA,0
BCF SHIFT ; bank 0
RETURN
;
CLRF HOUR10
BSF SHIFT ; bank 1
BSF TRISA,0
BCF SHIFT ; bank 0
RETURN
;
END
| 17.135135
| 89
| 0.600721
|
e58ab17102e9ef6629b85973ec746b75d0428fa6
| 505
|
asm
|
Assembly
|
programs/oeis/345/A345889.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/345/A345889.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/345/A345889.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A345889: Number of tilings of an n-cell circular array with rectangular tiles of any size, and where the number of possible colors of a tile is given by the smallest cell covered.
; 1,4,16,76,436,2956,23116,204556,2018956,21977356,261478156,3374988556,46964134156,700801318156,11162196262156,189005910310156,3390192763174156,64212742967590156,1280663747055910156,26826134832910630156,588826498721714470156
lpb $0
add $1,$0
add $0,1
add $1,2
mul $1,$0
sub $0,2
lpe
div $1,2
add $1,1
mov $0,$1
| 36.071429
| 225
| 0.780198
|
b6697441457f03b22751edff89a4dae54b5f35eb
| 1,240
|
asm
|
Assembly
|
libsrc/graphics/spectrum/cpm/pixel.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 640
|
2017-01-14T23:33:45.000Z
|
2022-03-30T11:28:42.000Z
|
libsrc/graphics/spectrum/cpm/pixel.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 1,600
|
2017-01-15T16:12:02.000Z
|
2022-03-31T12:11:12.000Z
|
libsrc/graphics/spectrum/cpm/pixel.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 215
|
2017-01-17T10:43:03.000Z
|
2022-03-23T17:25:02.000Z
|
;
; "pixel", SMC variant for the Spectrum +3 CP/M
; Stefano - 2016
;
;
; $Id: pixel.asm,v 1.1 2016-10-26 13:03:30 stefano Exp $
;
INCLUDE "graphics/grafix.inc"
SECTION code_clib
PUBLIC pixel
EXTERN pixeladdress
EXTERN __gfx_coords
EXTERN pixmode
EXTERN pixelbyte
EXTERN p3_peek
EXTERN p3_poke
;
; $Id: pixel.asm,v 1.1 2016-10-26 13:03:30 stefano Exp $
;
; ******************************************************************
;
; Plot pixel at (x,y) coordinate.
;
; Design & programming by Gunther Strube, Copyright (C) InterLogic 1995
;
; The (0,0) origin is placed at the top left corner.
;
; in: hl = (x,y) coordinate of pixel (h,l)
;
; registers changed after return:
; ..bc..../ixiy same
; af..dehl/.... different
;
.pixel
IF maxx <> 256
ld a,h
cp maxx
ret nc
ENDIF
ld a,l
cp maxy
ret nc ; y0 out of range
ld (__gfx_coords),hl
push bc
call pixeladdress
ld b,a
ld a,1
jr z, or_pixel ; pixel is at bit 0...
.plot_position rlca
djnz plot_position
.or_pixel ex de,hl
ld e,a
call p3_peek
push hl
;ex de,hl
ld hl,pixelbyte
ld (hl),a
ld a,e
.pixmode
or (hl)
nop
pop hl
call p3_poke
pop bc
ret
| 16.315789
| 71
| 0.579032
|
acae5cf527fe72e3a759002d043e063e3136db6a
| 132
|
asm
|
Assembly
|
src/test/resources/data/searchtests/opt-test2.asm
|
cpcitor/mdlz80optimizer
|
75070d984e1f08474e6d397c7e0eb66d8be0c432
|
[
"Apache-2.0"
] | 36
|
2020-06-29T06:52:26.000Z
|
2022-02-10T19:41:58.000Z
|
src/test/resources/data/searchtests/opt-test2.asm
|
cpcitor/mdlz80optimizer
|
75070d984e1f08474e6d397c7e0eb66d8be0c432
|
[
"Apache-2.0"
] | 39
|
2020-07-02T18:19:34.000Z
|
2022-03-27T18:08:54.000Z
|
src/test/resources/data/searchtests/opt-test2.asm
|
cpcitor/mdlz80optimizer
|
75070d984e1f08474e6d397c7e0eb66d8be0c432
|
[
"Apache-2.0"
] | 7
|
2020-07-02T06:00:05.000Z
|
2021-11-28T17:31:13.000Z
|
org #4000
xor a
ld b, (7 + 2) * 2
ld c, (7 + 2) * 2
ld (bc), a
loop:
jr loop
org #c000
var1: db 1
| 10.153846
| 21
| 0.393939
|
c24c3d42d28c28dfa1f4701f034a7579dbbdd206
| 597
|
asm
|
Assembly
|
oeis/185/A185717.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/185/A185717.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/185/A185717.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A185717: Expansion of q^(-1) * c(q^2) * (c(q) - c(q^4)) / 9 in powers of q^2 where c() is a cubic AGM theta function.
; Submitted by Jamie Morken(w3)
; 1,3,6,8,9,12,14,18,18,20,24,24,31,27,30,32,36,48,38,42,42,44,54,48,57,54,54,72,60,60,62,72,84,68,72,72,74,93,96,80,81,84,108,90,90,112,96,120,98,108,102,104,144,108,110,114,114,144,126,144,133,126,156,128,132,132,160,162,138,140,144,168,180,171,150,152,162,192,158,162,192,164,216,168,183,180,174,248,180,180,182,186,228,216,216,192,194,252,198,200
mul $0,2
seq $0,121443 ; Sum of divisors d of n which are odd and n/d is not divisible by 3.
| 85.285714
| 350
| 0.685092
|
302ebbe47cebf9c30d02db1b52c05223d792a6a1
| 11,877
|
asm
|
Assembly
|
transformy/tables/gen/004e.asm
|
mborik/regression
|
25b5f2204ce668594449e8ce804779288b895ac0
|
[
"MIT"
] | 3
|
2019-09-18T05:34:22.000Z
|
2020-12-04T17:46:52.000Z
|
transformy/tables/gen/004e.asm
|
mborik/regression
|
25b5f2204ce668594449e8ce804779288b895ac0
|
[
"MIT"
] | null | null | null |
transformy/tables/gen/004e.asm
|
mborik/regression
|
25b5f2204ce668594449e8ce804779288b895ac0
|
[
"MIT"
] | 1
|
2020-01-17T01:04:24.000Z
|
2020-01-17T01:04:24.000Z
|
ld a, 102
ld d,a
ld e,a
ld (basescradr + #01ed), de
ld (basescradr + #02ed), de
ld (basescradr + #06ae), de
ld (basescradr + #0989), de
ld (basescradr + #0a0c), de
ld (basescradr + #0d2b), de
ld (basescradr + #0d4a), de
ld (basescradr + #0e4a), de
ld (basescradr + #01ce), a
ld (basescradr + #02ce), a
ld (basescradr + #05ce), a
ld (basescradr + #05ed), a
ld (basescradr + #06ce), a
ld (basescradr + #06ed), a
ld (basescradr + #090d), a
ld (basescradr + #092c), a
ld (basescradr + #094b), a
ld (basescradr + #096a), a
ld (basescradr + #0a2c), a
ld (basescradr + #0a4b), a
ld (basescradr + #0a6a), a
ld (basescradr + #0a89), a
ld (basescradr + #0d0c), a
ld (basescradr + #0d6a), a
ld (basescradr + #0e0c), a
ld (basescradr + #0e2b), a
ld (basescradr + #0e6a), a
ld a, 112
ld (basescradr + #06b0), a
xor a
ld hl, basescradr + #0aaa
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
ld hl, basescradr + #0acb
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
ld hl, basescradr + #0aec
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
ld hl, basescradr + #120d
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
ld hl, basescradr + #120e
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
ld hl, basescradr + #122e
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
ld hl, basescradr + #122f
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
ld d,a
ld e,a
ld (basescradr + #084a), de
ld (basescradr + #0869), de
ld (basescradr + #0889), de
ld (basescradr + #0b0c), de
ld (basescradr + #0b2b), de
ld (basescradr + #0b4a), de
ld (basescradr + #0b69), de
ld (basescradr + #0c0c), de
ld (basescradr + #0c2b), de
ld (basescradr + #0c4a), de
ld (basescradr + #0c69), de
ld (basescradr + #0ecb), de
ld (basescradr + #0eec), de
ld hl, basescradr + #0f49
ld (hl), a
inc hl
ld (hl), a
inc hl
ld (hl), a
ld (basescradr + #0f69), de
ld (basescradr + #102e), de
ld (basescradr + #160d), de
ld (basescradr + #162f), de
ld (basescradr + #170e), de
ld (basescradr + #00cf), a
ld (basescradr + #00ee), a
ld (basescradr + #03ed), a
ld (basescradr + #04ce), a
ld (basescradr + #04ed), a
ld (basescradr + #07af), a
ld (basescradr + #07ce), a
ld (basescradr + #07ed), a
ld (basescradr + #080d), a
ld (basescradr + #082c), a
ld (basescradr + #08cb), a
ld (basescradr + #08ec), a
ld (basescradr + #0b89), a
ld (basescradr + #0bed), a
ld (basescradr + #0c89), a
ld (basescradr + #0ced), a
ld (basescradr + #0f0c), a
ld (basescradr + #0f2b), a
ld (basescradr + #0fab), a
ld (basescradr + #0fcc), a
ld (basescradr + #0fed), a
ld (basescradr + #100d), a
ld (basescradr + #104f), a
ld (basescradr + #124f), a
ld (basescradr + #172f), a
ld a, 120
ld (basescradr + #07b0), a
ld a, 252
ld (basescradr + #00d0), a
ld (basescradr + #04f2), a
ld (basescradr + #06d1), a
ld (basescradr + #0a13), a
ld (basescradr + #0a96), a
ld (basescradr + #0cb5), a
ld (basescradr + #0d56), a
ld (basescradr + #0dd4), a
ld (basescradr + #0ed4), a
ld (basescradr + #0ff3), a
ld (basescradr + #1132), a
ld a, 103
ld (basescradr + #01cf), a
ld (basescradr + #02cf), a
ld (basescradr + #05ee), a
ld (basescradr + #094c), a
ld (basescradr + #096b), a
ld (basescradr + #0a6b), a
ld (basescradr + #0a8a), a
ld (basescradr + #0d0d), a
ld (basescradr + #0e0d), a
ld (basescradr + #0e2c), a
ld a, 254
ld (basescradr + #01d0), a
ld (basescradr + #05f2), a
ld (basescradr + #07d1), a
ld (basescradr + #0934), a
ld (basescradr + #0996), a
ld (basescradr + #0b13), a
ld (basescradr + #0bb5), a
ld (basescradr + #0cd4), a
ld (basescradr + #0ef3), a
ld (basescradr + #0f35), a
ld (basescradr + #1032), a
ld a, 2
ld (basescradr + #02cd), a
ld (basescradr + #0969), a
ld (basescradr + #0a88), a
ld (basescradr + #0d0b), a
ld (basescradr + #0e0b), a
ld a, 255
ld hl, basescradr + #00f1
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
ld hl, basescradr + #02d0
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
ld hl, basescradr + #0812
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
ld hl, basescradr + #0833
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
ld hl, basescradr + #0854
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
ld hl, basescradr + #0855
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
ld hl, basescradr + #0875
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
ld hl, basescradr + #0876
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
ld hl, basescradr + #08b5
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
ld hl, basescradr + #08d4
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
ld hl, basescradr + #08f3
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
ld hl, basescradr + #0a34
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
ld hl, basescradr + #0af2
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
ld hl, basescradr + #0c13
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
ld hl, basescradr + #0cd3
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
ld hl, basescradr + #0db4
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
ld hl, basescradr + #1012
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
ld hl, basescradr + #1031
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
ld hl, basescradr + #1111
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
ld (basescradr + #06f2), a
ld (basescradr + #07f2), a
ld (basescradr + #0896), a
ld (basescradr + #0e56), a
ld (basescradr + #0e95), a
ld (basescradr + #0f56), a
ld (basescradr + #0f95), a
ld a, 128
ld (basescradr + #02d1), a
ld (basescradr + #08b6), a
ld (basescradr + #0956), a
ld (basescradr + #0ad5), a
ld (basescradr + #0b35), a
ld (basescradr + #0bf4), a
ld (basescradr + #0cf4), a
ld (basescradr + #0f57), a
ld (basescradr + #0f77), a
ld (basescradr + #1513), a
ld (basescradr + #1613), a
ld (basescradr + #1732), a
ld a, 3
ld (basescradr + #03cf), a
ld (basescradr + #04ee), a
ld (basescradr + #084c), a
ld (basescradr + #0b8a), a
ld (basescradr + #0f8a), a
ld (basescradr + #100e), a
ld (basescradr + #1430), a
ld (basescradr + #160f), a
ld a, 192
ld (basescradr + #01f2), a
ld (basescradr + #03d1), a
ld (basescradr + #07f3), a
ld (basescradr + #0877), a
ld (basescradr + #09d5), a
ld (basescradr + #0a56), a
ld (basescradr + #0af4), a
ld (basescradr + #0d14), a
ld (basescradr + #0d77), a
ld (basescradr + #0e77), a
ld (basescradr + #0f96), a
ld (basescradr + #1413), a
ld (basescradr + #1632), a
ld a, 7
ld (basescradr + #04cf), a
ld (basescradr + #0b6b), a
ld (basescradr + #0bcc), a
ld (basescradr + #0c8a), a
ld (basescradr + #0f0d), a
ld (basescradr + #0fee), a
ld (basescradr + #1330), a
ld a, 224
ld (basescradr + #02f2), a
ld (basescradr + #04d1), a
ld (basescradr + #0813), a
ld (basescradr + #08d5), a
ld (basescradr + #09f4), a
ld (basescradr + #0c35), a
ld (basescradr + #0c77), a
ld (basescradr + #0e14), a
ld (basescradr + #0e96), a
ld (basescradr + #0fb5), a
ld (basescradr + #1313), a
ld (basescradr + #1532), a
ld a, 6
ld (basescradr + #05cd), a
ld (basescradr + #05ec), a
ld (basescradr + #06cd), a
ld (basescradr + #06ec), a
ld (basescradr + #092b), a
ld (basescradr + #094a), a
ld (basescradr + #0a4a), a
ld (basescradr + #0a69), a
ld (basescradr + #0d69), a
ld a, 111
ld (basescradr + #05cf), a
ld (basescradr + #06ee), a
ld (basescradr + #0a4c), a
ld (basescradr + #0d8a), a
ld a, 248
ld (basescradr + #03f2), a
ld (basescradr + #05d1), a
ld (basescradr + #0834), a
ld (basescradr + #0b96), a
ld (basescradr + #0c56), a
ld (basescradr + #0c96), a
ld (basescradr + #0db5), a
ld (basescradr + #0e35), a
ld (basescradr + #0fd4), a
ld (basescradr + #1013), a
ld (basescradr + #1113), a
ld (basescradr + #1232), a
ld a, 127
ld hl, basescradr + #0d6b
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
ld (basescradr + #00ef), a
ld (basescradr + #01ef), a
ld (basescradr + #06cf), a
ld (basescradr + #090e), a
ld (basescradr + #092d), a
ld (basescradr + #0a0e), a
ld (basescradr + #0a2d), a
ld (basescradr + #0c2d), a
ld (basescradr + #0cee), a
ld (basescradr + #0d4c), a
ld (basescradr + #0e4c), a
ld (basescradr + #0ecd), a
ld (basescradr + #1030), a
ld (basescradr + #120f), a
ld (basescradr + #1631), a
ld a, 63
ld (basescradr + #07cf), a
ld (basescradr + #08cc), a
ld (basescradr + #0aab), a
ld (basescradr + #0b2d), a
ld (basescradr + #0c4c), a
ld (basescradr + #0dee), a
ld (basescradr + #1130), a
ld (basescradr + #130f), a
ld a, 1
ld (basescradr + #03ee), a
ld (basescradr + #086b), a
ld (basescradr + #08aa), a
ld (basescradr + #0aed), a
ld (basescradr + #0ccc), a
ld (basescradr + #0eab), a
ld (basescradr + #0f2c), a
ld a, 15
ld (basescradr + #07ee), a
ld (basescradr + #082d), a
ld (basescradr + #08ed), a
ld (basescradr + #0acc), a
ld (basescradr + #0c6b), a
ld (basescradr + #0cab), a
ld (basescradr + #0e8a), a
ld (basescradr + #0eee), a
ld (basescradr + #1051), a
ld (basescradr + #1230), a
ld (basescradr + #140f), a
ld a, 31
ld (basescradr + #080e), a
ld (basescradr + #0b4c), a
ld (basescradr + #0bab), a
ld (basescradr + #0fcd), a
ld (basescradr + #1731), a
ld a, 38
ld (basescradr + #090c), a
ld (basescradr + #0a2b), a
ld (basescradr + #0e69), a
ld a, 240
ld hl, basescradr + #0977
ld (hl), a
inc h
ld (hl), a
inc h
ld (hl), a
ld (basescradr + #08f4), a
ld (basescradr + #0913), a
ld (basescradr + #0b56), a
ld (basescradr + #0d35), a
ld (basescradr + #0d96), a
ld (basescradr + #0eb5), a
ld (basescradr + #0f14), a
ld (basescradr + #1213), a
ld (basescradr + #1332), a
ld (basescradr + #1432), a
ld a, 4
ld (basescradr + #09ca), a
ld (basescradr + #09eb), a
ld (basescradr + #0d88), a
ld (basescradr + #0dec), a
ld (basescradr + #112e), a
ld (basescradr + #114f), a
ld (basescradr + #150d), a
ld a, 68
ld d,a
ld e,a
ld (basescradr + #09a9), de
ld (basescradr + #0dcb), de
ld (basescradr + #110d), de
ld (basescradr + #152f), de
ld (basescradr + #09cb), a
ld (basescradr + #09ec), a
ld (basescradr + #0d89), a
ld (basescradr + #0daa), a
ld (basescradr + #0ded), a
ld (basescradr + #112f), a
ld (basescradr + #1150), a
ld (basescradr + #150e), a
ld a, 71
ld (basescradr + #09ed), a
ld (basescradr + #0dab), a
ld (basescradr + #150f), a
ld a, 95
ld (basescradr + #09cc), a
ld a, 66
ld (basescradr + #1151), a
ret
| 20.23339
| 29
| 0.550812
|
68476d317656379e6fed7fdd5e5b47c4f281c8d8
| 335
|
asm
|
Assembly
|
programs/oeis/127/A127112.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/127/A127112.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/127/A127112.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A127112: n! in base 4.
; 1,1,2,12,120,1320,23100,1032300,21312000,1120212000,31311330000,2120101110000,130203033300000,11303022030300000,1101030032302200000,103001313131311200000
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,7090 ; Numbers in base 4.
| 55.833333
| 155
| 0.770149
|
22e7e71972caf18df1fb10b12b96f4c8508b7c1f
| 384
|
asm
|
Assembly
|
oeis/155/A155198.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/155/A155198.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/155/A155198.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A155198: a(n)=9*a(n-1)+a(n-2), n>2 ; a(0)=1, a(1)=8, a(2)=72 .
; Submitted by Jon Maiga
; 1,8,72,656,5976,54440,495936,4517864,41156712,374928272,3415511160,31114528712,283446269568,2582130954824,23522624862984,214285754721680,1952094417358104,17783135510944616,162000314015859648
mov $3,1
lpb $0
sub $0,1
add $3,$1
add $2,$3
mov $1,$2
mov $2,$3
mul $3,8
lpe
mov $0,$3
| 25.6
| 192
| 0.692708
|
f78bbdbef59e5eb3c91aff8dd413ffea493920a3
| 872
|
a51
|
Assembly
|
a51test/(38)ADDC_A_Rn.a51
|
Aimini/51cpu
|
cdeb75510d1dcd867fbebe10e963c4dbecd5ff13
|
[
"MIT"
] | null | null | null |
a51test/(38)ADDC_A_Rn.a51
|
Aimini/51cpu
|
cdeb75510d1dcd867fbebe10e963c4dbecd5ff13
|
[
"MIT"
] | null | null | null |
a51test/(38)ADDC_A_Rn.a51
|
Aimini/51cpu
|
cdeb75510d1dcd867fbebe10e963c4dbecd5ff13
|
[
"MIT"
] | null | null | null |
MOV 0xD0,#0x00
MOV R0,#0x00
MOV R1,#0x01
MOV R2,#0x02
MOV R3,#0x03
MOV R4,#0x04
MOV R5,#0x05
MOV R6,#0x06
MOV R7,#0x07
MOV 0xD0,#0x08
MOV R0,#0x08
MOV R1,#0x09
MOV R2,#0x0A
MOV R3,#0x0B
MOV R4,#0x0C
MOV R5,#0x0D
MOV R6,#0x0E
MOV R7,#0x0F
MOV 0xD0,#0x10
MOV R0,#0x10
MOV R1,#0x11
MOV R2,#0x12
MOV R3,#0x13
MOV R4,#0x14
MOV R5,#0x15
MOV R6,#0x16
MOV R7,#0x17
MOV 0xD0,#0x18
MOV R0,#0x18
MOV R1,#0x19
MOV R2,#0x1A
MOV R3,#0x1B
MOV R4,#0x1C
MOV R5,#0x1D
MOV R6,#0x1E
MOV R7,#0x1F
DB 0xA5
MOV 0xD0,#0x00
ADDC A,R0
ADDC A,R1
ADDC A,R2
ADDC A,R3
ADDC A,R4
ADDC A,R5
ADDC A,R6
ADDC A,R7
MOV 0xD0,#0x08
ADDC A,R0
ADDC A,R1
ADDC A,R2
ADDC A,R3
ADDC A,R4
ADDC A,R5
ADDC A,R6
ADDC A,R7
MOV 0xD0,#0x10
ADDC A,R0
ADDC A,R1
ADDC A,R2
ADDC A,R3
ADDC A,R4
ADDC A,R5
ADDC A,R6
ADDC A,R7
MOV 0xD0,#0x18
ADDC A,R0
ADDC A,R1
ADDC A,R2
ADDC A,R3
ADDC A,R4
ADDC A,R5
ADDC A,R6
ADDC A,R7
| 10.634146
| 14
| 0.694954
|
d56796e9e86baca518b14a836a3fe63bb1f359c7
| 4,039
|
asm
|
Assembly
|
iod/iob/abuf.asm
|
olifink/smsqe
|
c546d882b26566a46d71820d1539bed9ea8af108
|
[
"BSD-2-Clause"
] | null | null | null |
iod/iob/abuf.asm
|
olifink/smsqe
|
c546d882b26566a46d71820d1539bed9ea8af108
|
[
"BSD-2-Clause"
] | null | null | null |
iod/iob/abuf.asm
|
olifink/smsqe
|
c546d882b26566a46d71820d1539bed9ea8af108
|
[
"BSD-2-Clause"
] | null | null | null |
; Buffering (allocate buffer) utility V2.00 1989 Tony Tebby QJUMP
section iou
xdef iob_abuf
xdef iob_anew
xdef iob_allc
xdef iob_lnew
xref gu_achpp
include 'dev8_keys_buf'
include 'dev8_mac_assert'
;+++
; This routine allocates a new buffer for output and sets the buffer
; pointers.
;
; This must not be called from an interrupt server
;
; This is a clean routine.
;
; d0 r status: 0, or err.imem
; a2 cr pointer to previous buffer (or zero) / new buffer
; a3 r pointer to next in
; all other registers preserved
;--
iob_abuf
ibab.reg reg a0
move.l a0,-(sp)
move.l buf_nxtb(a2),a0 ; is there already one?
move.l a0,d0
bne.s ibab_set ; ... yes
bsr.s iob_allc ; allocate a new one (d0=0)
blt.s ibab_exit
lea buf_strt(a0),a3 ; set return reg value
ibab_set
assert 0,buf_nxtb,buf_nxtl-4,buf_ptrp-8,buf_ptrg-$c,buf_attr-$10
add.w #buf_attr,a0
add.w #buf_attr,a2
move.l (a2),(a0) ; attributes
move.l -(a2),-(a0) ; get pointer
move.l -(a2),-(a0) ; put pointer
subq.l #buf_ptrp-buf_nxtb,a0
subq.l #buf_ptrp-buf_nxtb,a2
move.l a0,(a2) ; link
move.l a0,a2 ; ... now we use this one
move.l buf_ptrp(a2),a0
move.l a2,(a0) ; set in pointer
moveq #0,d0
ibab_exit
move.l (sp)+,a0
rts
;+++
; Allocate a new buffer. It is set up and linked in.
; To ensure that an interrupt server taking bytes out of the buffer does
; not make a total mess of the linking in code, the pointer to the get
; buffer list is temporarily set negative. The interrupt server should be
; able to handle this.
;
; The pointer to the put buffer should be zero.
;
; d0 cr 0 for dynamic, otherwise queue length / status 0 or err.imem
; a1 c p pointer to pointer to buffer for putting
; a2 c pointer to pointer to buffer for getting
; a2 r buffer pointer
; all other registers preserved
;---
iob_anew
iban.reg reg a0/a1/a3
movem.l iban.reg,-(sp)
bsr.s iob_allc ; allocate
beq.s iban_set
bra.s iban_exit ; ... bad
;+++
; Link in new buffer
; To ensure that an interrupt server taking bytes out of the buffer does
; not make a total mess of the linking in code, the pointer to the get
; buffer list is temporarily set negative. The interrupt server should be
; able to handle this.
;
; The pointer to the put buffer should be zero.
;
; d0 r 0
; a0 c p pointer to buffer
; a1 c p pointer to pointer to buffer for putting
; a2 c pointer to pointer to buffer for getting
; a2 r pointer to buffer
; all other registers preserved
;---
iob_lnew
movem.l iban.reg,-(sp)
iban_set
move.l a2,buf_ptrg(a0) ; put pointer to pointer
move.l a1,buf_ptrp(a0) ; get pointer to pointer
move.l a0,(a1) ; point to this put buffer
tas (a2) ; no pointer to get buffer list
move.l (a2),d0
bclr #31,d0
tst.l d0 ; any get buffer list?
bne.s iban_look ; ... yes
move.l a0,(a2) ; ... no, point to this buffer
bra.s iban_ok
iban_look
move.l d0,a1
move.l buf_nxtl(a1),d0 ; another in buffer list?
bne.s iban_look ; ... yes
move.l a0,buf_nxtl(a1) ; add buffer to list
bclr #7,(a2) ; and reset pointer to list
iban_ok
move.l a0,a2 ; set buffer address
moveq #0,d0 ; OK
iban_exit
movem.l (sp)+,iban.reg ; restore registers
rts
;+++
; Allocate a new buffer. It is set up but not linked in.
;
; d0 cr queue length / status 0 or err.imem
; a0 r buffer pointer
; all other registers preserved
;---
iob_allc
move.l d0,-(sp) ; save buffer length (normal return)
bgt.s iba_slen
move.l #buf.dyna-buf_strt-1,d0 ; allocate dynamic buffer
iba_slen
add.l #buf_strt+1,d0 ; header and one spare
move.l d0,-(sp)
jsr gu_achpp
bne.s ibab_exa ; ... no memory left
move.l a0,d0
add.l (sp)+,d0 ; end of buffer
add.w #buf_endb,a0
assert buf_endb,buf_nxtp-4,buf_nxtg-8
move.l d0,(a0)+ ; set end
moveq #buf_strt-buf_nxtp,d0
add.l a0,d0
move.l d0,(a0)+ ; ... in
move.l d0,(a0) ; ... and out
lea -buf_nxtg(a0),a0
move.l (sp)+,d0
beq.s ibab_rts ; ... dynamic
tas buf_nxtb(a0) ; mark it static queue
moveq #0,d0
ibab_rts
rts
ibab_exa
addq.l #8,sp
rts
end
| 25.086957
| 73
| 0.686556
|
173aa1b81f04ef91fe5aea8fb9941c0a5512a5d0
| 520
|
asm
|
Assembly
|
data/baseStats/magmar.asm
|
etdv-thevoid/pokemon-rgb-enhanced
|
5b244c1cf46aab98b9c820d1b7888814eb7fa53f
|
[
"MIT"
] | 1
|
2022-01-09T05:28:52.000Z
|
2022-01-09T05:28:52.000Z
|
data/baseStats/magmar.asm
|
ETDV-TheVoid/pokemon-rgb-enhanced
|
5b244c1cf46aab98b9c820d1b7888814eb7fa53f
|
[
"MIT"
] | null | null | null |
data/baseStats/magmar.asm
|
ETDV-TheVoid/pokemon-rgb-enhanced
|
5b244c1cf46aab98b9c820d1b7888814eb7fa53f
|
[
"MIT"
] | null | null | null |
db MAGMAR ; pokedex id
db 65 ; base hp
db 95 ; base attack
db 57 ; base defense
db 93 ; base speed
db 85 ; base special
db FIRE ; species type 1
db FIRE ; species type 2
db 45 ; catch rate
db 167 ; base exp yield
INCBIN "pic/gsmon/magmar.pic",0,1 ; 66, sprite dimensions
dw MagmarPicFront
dw MagmarPicBack
; attacks known at lvl 0
db SMOG
db 0
db 0
db 0
db 0 ; growth rate
; learnset
tmlearn 1,5,6,8
tmlearn 9,10,15
tmlearn 20
tmlearn 31,32
tmlearn 33,34,35,37,38
tmlearn 44
tmlearn 50,54
db BANK(MagmarPicFront)
| 17.931034
| 57
| 0.726923
|
bd70bf610266dbfc3b3f7aa9cc7f640cd2c6df1e
| 2,357
|
asm
|
Assembly
|
Systems Programming/Assignment 1/prog8.asm
|
neeladripal/bcse-lab
|
915d2f535ae95a062438fc85980419646a3951ad
|
[
"MIT"
] | null | null | null |
Systems Programming/Assignment 1/prog8.asm
|
neeladripal/bcse-lab
|
915d2f535ae95a062438fc85980419646a3951ad
|
[
"MIT"
] | null | null | null |
Systems Programming/Assignment 1/prog8.asm
|
neeladripal/bcse-lab
|
915d2f535ae95a062438fc85980419646a3951ad
|
[
"MIT"
] | 1
|
2021-08-06T14:39:53.000Z
|
2021-08-06T14:39:53.000Z
|
TITLE PROG8 {EXE} Find maximum and minimum from an array of numbers
;------------------------------------
.MODEL SMALL
.STACK
;------------------------------------
.DATA
INPTMSG DB "Array of elements? ", "$"
OUTMX DB "Max -> ", "$"
OUTMN DB 09H, "Min -> ", "$"
MAX DW 0FFFFH
MIN DW 7FFFH
;------------------------------------
.CODE
MAIN PROC FAR
MOV AX,@data ; Initialize segment registers
MOV DS,AX
MOV AH,09H
LEA DX,INPTMSG ; Display input prompt
INT 21H
INPTLOOP:
CALL INPT ; Request input
CMP DX,MAX ; Check if number > max
JLE CONT1
MOV MAX,DX ; Update max
CONT1:
CMP DX,MIN ; Check if number < min
JGE CONT2
MOV MIN,DX ; Update min
CONT2:
CMP AL,0DH ; Check if Enter
JE DISP
CMP AL,0AH ; Check if Linefeed
JNE INPTLOOP
DISP:
LEA DX,OUTMX
MOV AH,09H ; Display output message
INT 21H
MOV BX,MAX
CALL OUTPT ; Display max number
LEA DX,OUTMN
MOV AH,09H ; Display output message
INT 21H
MOV BX,MIN
CALL OUTPT ; Display min number
TATA:
MOV AH,4CH ; Terminate
INT 21H
MAIN ENDP
; Accept input of number
; ----------------------
INPT PROC NEAR
MOV DX,0000H
MOV CL,4
GETCH:
MOV AH,01H ; Request character input
INT 21H
CMP AL,' ' ; Check if Space
JE DONE
CMP AL,0DH ; Check if Linefeed
JE DONE
CMP AL,0AH ; Check if Enter
JE DONE
SHL DX,CL ; Left shift 4 bits
SUB AL,48 ; Find the numerical value from character
CMP AL,9
JLE ISNUM ; Check if 0-9 or A-F
SUB AL,7 ; for A-F
ISNUM:
OR DL,AL ; Store the character
JMP GETCH ; Loop to take next character
DONE:
RET
INPT ENDP
; Display Number
; -----------
OUTPT PROC NEAR
MOV CL,4
MOV DX,BX
MOV DL,DH ; Take first 4 bits
SHR DL,CL
CALL DISPCH
MOV DX,BX
MOV DL,DH ; The next 4 bits
CALL DISPCH
MOV DX,BX
SHR DL,CL ; The next 4 bits
CALL DISPCH
MOV DX,BX ; The last 4 bits
CALL DISPCH
RET
OUTPT ENDP
; Display hex-equivalent of decimal character
; -------------------------------------------
DISPCH PROC NEAR
AND DL,0FH
CMP DL,0AH
JL ISNUM2
ADD DL,7
ISNUM2:
ADD DL,48
MOV AH,02H
INT 21H
RET
DISPCH ENDP
END MAIN
| 19.008065
| 68
| 0.546882
|
bf972c2ee5be30510be30766e66c6192aa02b5dc
| 361
|
asm
|
Assembly
|
programs/oeis/099/A099892.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/099/A099892.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/099/A099892.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A099892: XOR BINOMIAL transform of A003188 (Gray code numbers); also the main diagonal of the XOR difference triangle A099891.
; 0,1,3,0,6,0,0,0,12,0,0,0,0,0,0,0,24,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,96
mul $0,2
trn $0,1
seq $0,99894 ; XOR BINOMIAL transform of A038712.
div $0,2
mul $0,3
div $0,2
| 36.1
| 135
| 0.65097
|
6552e0847913e6ec712bcd79716cbbee7b31115b
| 908
|
asm
|
Assembly
|
Bank_I/6_sqrt.asm
|
ndf-zz/fv1testing
|
1ea474b6d93e888f091de15bcaed0d5a57905f22
|
[
"CC0-1.0"
] | null | null | null |
Bank_I/6_sqrt.asm
|
ndf-zz/fv1testing
|
1ea474b6d93e888f091de15bcaed0d5a57905f22
|
[
"CC0-1.0"
] | null | null | null |
Bank_I/6_sqrt.asm
|
ndf-zz/fv1testing
|
1ea474b6d93e888f091de15bcaed0d5a57905f22
|
[
"CC0-1.0"
] | 1
|
2019-11-26T12:02:28.000Z
|
2019-11-26T12:02:28.000Z
|
; FV-1 Testing
;
; Program: Square root
;
; Determine special case sqrt(x) using log:
;
; log(sqrt(x)) = 0.5 * log(x)
;
; Note: Since log performs abs(x), the negative signal is
; incorrect.
;
; POT0: Offset
; POT1: Level
;
; Prepare LFOs
skp RUN,main
wlds SIN0,100,32767
main: rdax POT0,-1.0 ; load pot0 inverted
sof -2.0,-1.0 ; flip and offset
wrax REG0,0.0 ; save DC offset
cho rdal,SIN0 ; load SIN LFO
mulx POT1 ; scale test signal
rdax REG0,1.0 ; add the offset
wrax DACL,1.0 ; write to left output
wrax REG0,1.0 ; save input signal
log 0.5,0.0 ; take 0.5*log(abs(x)), acc is now s4_6
exp 1.0,0.0 ; 2**..., acc is back to s_23
wrax REG1,0.0 ; save intermediate value
ldax REG0 ; fetch original value
skp NEG,negate
ldax REG1 ; fetch positive value
skp 0,output
negate: ldax REG1 ; fetch positive value
sof -1.0,0.0 ; invert
output: wrax DACR,0.0 ; output to right channel
| 23.894737
| 57
| 0.67511
|
5c6f93b19ca8c2d8ab3aae1d0245fb3c74a329c8
| 3,995
|
asm
|
Assembly
|
source/string/functions/memory.asm
|
paulscottrobson/6502-basic
|
d4c360041bfa49427a506465e58bb0ef94beaa44
|
[
"MIT"
] | 3
|
2021-09-30T19:34:11.000Z
|
2021-10-31T06:55:50.000Z
|
source/string/functions/memory.asm
|
paulscottrobson/6502-Basic
|
d4c360041bfa49427a506465e58bb0ef94beaa44
|
[
"MIT"
] | null | null | null |
source/string/functions/memory.asm
|
paulscottrobson/6502-Basic
|
d4c360041bfa49427a506465e58bb0ef94beaa44
|
[
"MIT"
] | 1
|
2021-12-07T21:58:44.000Z
|
2021-12-07T21:58:44.000Z
|
; ************************************************************************************************
; ************************************************************************************************
;
; Name: memory.asm
; Purpose: String memory handler
; Created: 27th February 2021
; Reviewed: 8th March 2021
; Author: Paul Robson (paul@robsons.org.uk)
;
; ************************************************************************************************
; ************************************************************************************************
.section zeroPage
softMemAlloc: ; memory allocated for temporary strings
.fill 2 ; if MSB is zero needs resetting on allocation.
.send zeroPage
.section code
; ************************************************************************************************
;
; Allocate A bytes of soft string memory, and set the current pointer (softMemAlloc)
; to it with an empty string.
;
; Soft string is for intermediate calculations, and is allocate 256 bytes below the
; current end of memory. To store a string, it has to be 'concreted'
;
; ************************************************************************************************
AllocateSoftString: ; allocae soft string memory
sta tempShort ; save count
.pshy ; save Y
lda softMemAlloc+1 ; if the high byte is zero, it needs allocating.
bne _ASSDone
lda highMemory ; reset the soft memory alloc pointer.
sta softMemAlloc ; to speed up slightly, we only reset this when we first need it
ldy highMemory+1 ; but it needs to be reset before each command.
dey ; it is set to 1/4k below high memory, allowing space
sty softMemAlloc+1 ; for a concreted string.
_ASSDone:
sec ; allocate downwards enough memory
lda softMemAlloc ; subtract the memory requirements in A from
sbc tempShort ; the soft memory pointer
sta softMemAlloc
lda softMemAlloc+1
sbc #0
sta softMemAlloc+1
;
lda #0 ; empty that string, set the length = 0.
tay
sta (softMemAlloc),y
.puly ; restore Y and exit.
rts
; ************************************************************************************************
;
; Write character A to current soft string
;
; ************************************************************************************************
WriteSoftString:
sty tempShort ; save Y
;
pha ; save character on stack
ldy #0 ; get and bump length
lda (softMemAlloc),y
clc
adc #1
sta (softMemAlloc),y
tay ; offset in Y
;
pla ; get char and write.
sta (softMemAlloc),y
ldy tempShort ; restore Y and exit.
rts
; ************************************************************************************************
;
; Clone soft string at temp0 to TOS
;
; ************************************************************************************************
StrClone: ;; <clone>
tax ; set up stack.
.pshy
;
ldy #0 ; get length, add 1 for length
lda (temp0),y ; this is the bytes required.
clc
adc #1
jsr AllocateSoftString ; allocate soft memory
;
lda softMemAlloc ; copy that address to TOS
sta esInt0,x
lda softMemAlloc+1
sta esInt1,x
lda #0 ; zero upper 2 bytes
sta esInt2,x
sta esInt3,x
lda #$40 ; set type to string.
sta esType,x
;
jsr SCCopyTemp0 ; copy temp0 string to soft memory copy (concat.asm)
.puly
txa
rts
.send code
; ************************************************************************************************
;
; Changes and Updates
;
; ************************************************************************************************
;
; Date Notes
; ==== =====
; 07-Mar-21 Pre code read v0.01
;
; ************************************************************************************************
| 31.706349
| 98
| 0.427034
|
62329fb7e4ab23b25bcb62e09108e262d1652628
| 22,512
|
asm
|
Assembly
|
UniBank.asm
|
Cancer52/flamedriver
|
9ee6cf02c137dcd63e85a559907284283421e7ba
|
[
"0BSD"
] | 9
|
2017-10-09T20:28:45.000Z
|
2021-06-29T21:19:20.000Z
|
UniBank.asm
|
Cancer52/flamedriver
|
9ee6cf02c137dcd63e85a559907284283421e7ba
|
[
"0BSD"
] | 12
|
2018-08-01T13:52:20.000Z
|
2022-02-21T02:19:37.000Z
|
UniBank.asm
|
Cancer52/flamedriver
|
9ee6cf02c137dcd63e85a559907284283421e7ba
|
[
"0BSD"
] | 2
|
2018-02-17T19:50:36.000Z
|
2019-10-30T19:28:06.000Z
|
; ===========================================================================
; FM Universial Voice Bank
; ===========================================================================
SourceSMPS2ASM set 0
SourceDriver set 3
; Synth Bass 2
; Voice $00
; $3C
; $01, $00, $00, $00, $1F, $1F, $15, $1F, $11, $0D, $12, $05
; $07, $04, $09, $02, $55, $3A, $25, $1A, $1A, $80, $07, $80
smpsVcAlgorithm $04
smpsVcFeedback $07
smpsVcUnusedBits $00
smpsVcDetune $00, $00, $00, $00
smpsVcCoarseFreq $00, $00, $00, $01
smpsVcRateScale $00, $00, $00, $00
smpsVcAttackRate $1F, $15, $1F, $1F
smpsVcAmpMod $00, $00, $00, $00
smpsVcDecayRate1 $05, $12, $0D, $11
smpsVcDecayRate2 $02, $09, $04, $07
smpsVcDecayLevel $01, $02, $03, $05
smpsVcReleaseRate $0A, $05, $0A, $05
smpsVcTotalLevel $00, $07, $00, $1A
; Trumpet 1
; Voice $01
; $3D
; $01, $01, $01, $01, $94, $19, $19, $19, $0F, $0D, $0D, $0D
; $07, $04, $04, $04, $25, $1A, $1A, $1A, $15, $80, $80, $80
smpsVcAlgorithm $05
smpsVcFeedback $07
smpsVcUnusedBits $00
smpsVcDetune $00, $00, $00, $00
smpsVcCoarseFreq $01, $01, $01, $01
smpsVcRateScale $00, $00, $00, $02
smpsVcAttackRate $19, $19, $19, $14
smpsVcAmpMod $00, $00, $00, $00
smpsVcDecayRate1 $0D, $0D, $0D, $0F
smpsVcDecayRate2 $04, $04, $04, $07
smpsVcDecayLevel $01, $01, $01, $02
smpsVcReleaseRate $0A, $0A, $0A, $05
smpsVcTotalLevel $00, $00, $00, $15
; Slap Bass 2
; Voice $02
; $03
; $00, $D7, $33, $02, $5F, $9F, $5F, $1F, $13, $0F, $0A, $0A
; $10, $0F, $02, $09, $35, $15, $25, $1A, $13, $16, $15, $80
smpsVcAlgorithm $03
smpsVcFeedback $00
smpsVcUnusedBits $00
smpsVcDetune $00, $03, $0D, $00
smpsVcCoarseFreq $02, $03, $07, $00
smpsVcRateScale $00, $01, $02, $01
smpsVcAttackRate $1F, $1F, $1F, $1F
smpsVcAmpMod $00, $00, $00, $00
smpsVcDecayRate1 $0A, $0A, $0F, $13
smpsVcDecayRate2 $09, $02, $0F, $10
smpsVcDecayLevel $01, $02, $01, $03
smpsVcReleaseRate $0A, $05, $05, $05
smpsVcTotalLevel $00, $15, $16, $13
; Synth Bass 1
; Voice $03
; $34
; $70, $72, $31, $31, $1F, $1F, $1F, $1F, $10, $06, $06, $06
; $01, $06, $06, $06, $35, $1A, $15, $1A, $10, $83, $18, $83
smpsVcAlgorithm $04
smpsVcFeedback $06
smpsVcUnusedBits $00
smpsVcDetune $03, $03, $07, $07
smpsVcCoarseFreq $01, $01, $02, $00
smpsVcRateScale $00, $00, $00, $00
smpsVcAttackRate $1F, $1F, $1F, $1F
smpsVcAmpMod $00, $00, $00, $00
smpsVcDecayRate1 $06, $06, $06, $10
smpsVcDecayRate2 $06, $06, $06, $01
smpsVcDecayLevel $01, $01, $01, $03
smpsVcReleaseRate $0A, $05, $0A, $05
smpsVcTotalLevel $03, $18, $03, $10
; Bell Synth 1
; Voice $04
; $3E
; $77, $71, $32, $31, $1F, $1F, $1F, $1F, $0D, $06, $00, $00
; $08, $06, $00, $00, $15, $0A, $0A, $0A, $1B, $80, $80, $80
smpsVcAlgorithm $06
smpsVcFeedback $07
smpsVcUnusedBits $00
smpsVcDetune $03, $03, $07, $07
smpsVcCoarseFreq $01, $02, $01, $07
smpsVcRateScale $00, $00, $00, $00
smpsVcAttackRate $1F, $1F, $1F, $1F
smpsVcAmpMod $00, $00, $00, $00
smpsVcDecayRate1 $00, $00, $06, $0D
smpsVcDecayRate2 $00, $00, $06, $08
smpsVcDecayLevel $00, $00, $00, $01
smpsVcReleaseRate $0A, $0A, $0A, $05
smpsVcTotalLevel $00, $00, $00, $1B
; Bell Synth 2
; Voice $05
; $34
; $33, $41, $7E, $74, $5B, $9F, $5F, $1F, $04, $07, $07, $08
; $00, $00, $00, $00, $FF, $FF, $EF, $FF, $23, $80, $29, $87
smpsVcAlgorithm $04
smpsVcFeedback $06
smpsVcUnusedBits $00
smpsVcDetune $07, $07, $04, $03
smpsVcCoarseFreq $04, $0E, $01, $03
smpsVcRateScale $00, $01, $02, $01
smpsVcAttackRate $1F, $1F, $1F, $1B
smpsVcAmpMod $00, $00, $00, $00
smpsVcDecayRate1 $08, $07, $07, $04
smpsVcDecayRate2 $00, $00, $00, $00
smpsVcDecayLevel $0F, $0E, $0F, $0F
smpsVcReleaseRate $0F, $0F, $0F, $0F
smpsVcTotalLevel $07, $29, $00, $23
; Synth Brass 1
; Voice $06
; $3A
; $01, $07, $31, $71, $8E, $8E, $8D, $53, $0E, $0E, $0E, $03
; $00, $00, $00, $07, $1F, $FF, $1F, $0F, $18, $28, $27, $80
smpsVcAlgorithm $02
smpsVcFeedback $07
smpsVcUnusedBits $00
smpsVcDetune $07, $03, $00, $00
smpsVcCoarseFreq $01, $01, $07, $01
smpsVcRateScale $01, $02, $02, $02
smpsVcAttackRate $13, $0D, $0E, $0E
smpsVcAmpMod $00, $00, $00, $00
smpsVcDecayRate1 $03, $0E, $0E, $0E
smpsVcDecayRate2 $07, $00, $00, $00
smpsVcDecayLevel $00, $01, $0F, $01
smpsVcReleaseRate $0F, $0F, $0F, $0F
smpsVcTotalLevel $00, $27, $28, $18
; Synth like Bassoon
; Voice $07
; $3C
; $32, $32, $71, $42, $1F, $18, $1F, $1E, $07, $1F, $07, $1F
; $00, $00, $00, $00, $1F, $0F, $1F, $0F, $1E, $80, $0C, $80
smpsVcAlgorithm $04
smpsVcFeedback $07
smpsVcUnusedBits $00
smpsVcDetune $04, $07, $03, $03
smpsVcCoarseFreq $02, $01, $02, $02
smpsVcRateScale $00, $00, $00, $00
smpsVcAttackRate $1E, $1F, $18, $1F
smpsVcAmpMod $00, $00, $00, $00
smpsVcDecayRate1 $1F, $07, $1F, $07
smpsVcDecayRate2 $00, $00, $00, $00
smpsVcDecayLevel $00, $01, $00, $01
smpsVcReleaseRate $0F, $0F, $0F, $0F
smpsVcTotalLevel $00, $0C, $00, $1E
; Bell Horn type thing
; Voice $08
; $3C
; $71, $72, $3F, $34, $8D, $52, $9F, $1F, $09, $00, $00, $0D
; $00, $00, $00, $00, $23, $08, $02, $F7, $15, $80, $1D, $87
smpsVcAlgorithm $04
smpsVcFeedback $07
smpsVcUnusedBits $00
smpsVcDetune $03, $03, $07, $07
smpsVcCoarseFreq $04, $0F, $02, $01
smpsVcRateScale $00, $02, $01, $02
smpsVcAttackRate $1F, $1F, $12, $0D
smpsVcAmpMod $00, $00, $00, $00
smpsVcDecayRate1 $0D, $00, $00, $09
smpsVcDecayRate2 $00, $00, $00, $00
smpsVcDecayLevel $0F, $00, $00, $02
smpsVcReleaseRate $07, $02, $08, $03
smpsVcTotalLevel $07, $1D, $00, $15
; Synth Bass 3
; Voice $09
; $3D
; $01, $01, $00, $00, $8E, $52, $14, $4C, $08, $08, $0E, $03
; $00, $00, $00, $00, $1F, $1F, $1F, $1F, $1B, $80, $80, $9B
smpsVcAlgorithm $05
smpsVcFeedback $07
smpsVcUnusedBits $00
smpsVcDetune $00, $00, $00, $00
smpsVcCoarseFreq $00, $00, $01, $01
smpsVcRateScale $01, $00, $01, $02
smpsVcAttackRate $0C, $14, $12, $0E
smpsVcAmpMod $00, $00, $00, $00
smpsVcDecayRate1 $03, $0E, $08, $08
smpsVcDecayRate2 $00, $00, $00, $00
smpsVcDecayLevel $01, $01, $01, $01
smpsVcReleaseRate $0F, $0F, $0F, $0F
smpsVcTotalLevel $1B, $00, $00, $1B
; Synth Trumpet
; Voice $0A
; $3A
; $01, $01, $01, $02, $8D, $07, $07, $52, $09, $00, $00, $03
; $01, $02, $02, $00, $52, $02, $02, $28, $18, $22, $18, $80
smpsVcAlgorithm $02
smpsVcFeedback $07
smpsVcUnusedBits $00
smpsVcDetune $00, $00, $00, $00
smpsVcCoarseFreq $02, $01, $01, $01
smpsVcRateScale $01, $00, $00, $02
smpsVcAttackRate $12, $07, $07, $0D
smpsVcAmpMod $00, $00, $00, $00
smpsVcDecayRate1 $03, $00, $00, $09
smpsVcDecayRate2 $00, $02, $02, $01
smpsVcDecayLevel $02, $00, $00, $05
smpsVcReleaseRate $08, $02, $02, $02
smpsVcTotalLevel $00, $18, $22, $18
; Wood Block
; Voice $0B
; $3C
; $36, $31, $76, $71, $94, $9F, $96, $9F, $12, $00, $14, $0F
; $04, $0A, $04, $0D, $2F, $0F, $4F, $2F, $33, $80, $1A, $80
smpsVcAlgorithm $04
smpsVcFeedback $07
smpsVcUnusedBits $00
smpsVcDetune $07, $07, $03, $03
smpsVcCoarseFreq $01, $06, $01, $06
smpsVcRateScale $02, $02, $02, $02
smpsVcAttackRate $1F, $16, $1F, $14
smpsVcAmpMod $00, $00, $00, $00
smpsVcDecayRate1 $0F, $14, $00, $12
smpsVcDecayRate2 $0D, $04, $0A, $04
smpsVcDecayLevel $02, $04, $00, $02
smpsVcReleaseRate $0F, $0F, $0F, $0F
smpsVcTotalLevel $00, $1A, $00, $33
; Tubular Bell
; Voice $0C
; $34
; $33, $41, $7E, $74, $5B, $9F, $5F, $1F, $04, $07, $07, $08
; $00, $00, $00, $00, $FF, $FF, $EF, $FF, $23, $90, $29, $97
smpsVcAlgorithm $04
smpsVcFeedback $06
smpsVcUnusedBits $00
smpsVcDetune $07, $07, $04, $03
smpsVcCoarseFreq $04, $0E, $01, $03
smpsVcRateScale $00, $01, $02, $01
smpsVcAttackRate $1F, $1F, $1F, $1B
smpsVcAmpMod $00, $00, $00, $00
smpsVcDecayRate1 $08, $07, $07, $04
smpsVcDecayRate2 $00, $00, $00, $00
smpsVcDecayLevel $0F, $0E, $0F, $0F
smpsVcReleaseRate $0F, $0F, $0F, $0F
smpsVcTotalLevel $17, $29, $10, $23
; Strike Bass
; Voice $0D
; $38
; $63, $31, $31, $31, $10, $13, $1A, $1B, $0E, $00, $00, $00
; $00, $00, $00, $00, $3F, $0F, $0F, $0F, $1A, $19, $1A, $80
smpsVcAlgorithm $00
smpsVcFeedback $07
smpsVcUnusedBits $00
smpsVcDetune $03, $03, $03, $06
smpsVcCoarseFreq $01, $01, $01, $03
smpsVcRateScale $00, $00, $00, $00
smpsVcAttackRate $1B, $1A, $13, $10
smpsVcAmpMod $00, $00, $00, $00
smpsVcDecayRate1 $00, $00, $00, $0E
smpsVcDecayRate2 $00, $00, $00, $00
smpsVcDecayLevel $00, $00, $00, $03
smpsVcReleaseRate $0F, $0F, $0F, $0F
smpsVcTotalLevel $00, $1A, $19, $1A
; Elec Piano
; Voice $0E
; $3A
; $31, $25, $73, $41, $5F, $1F, $1F, $9C, $08, $05, $04, $05
; $03, $04, $02, $02, $2F, $2F, $1F, $2F, $29, $27, $1F, $80
smpsVcAlgorithm $02
smpsVcFeedback $07
smpsVcUnusedBits $00
smpsVcDetune $04, $07, $02, $03
smpsVcCoarseFreq $01, $03, $05, $01
smpsVcRateScale $02, $00, $00, $01
smpsVcAttackRate $1C, $1F, $1F, $1F
smpsVcAmpMod $00, $00, $00, $00
smpsVcDecayRate1 $05, $04, $05, $08
smpsVcDecayRate2 $02, $02, $04, $03
smpsVcDecayLevel $02, $01, $02, $02
smpsVcReleaseRate $0F, $0F, $0F, $0F
smpsVcTotalLevel $00, $1F, $27, $29
; Bright Piano
; Voice $0F
; $04
; $71, $41, $31, $31, $12, $12, $12, $12, $00, $00, $00, $00
; $00, $00, $00, $00, $0F, $0F, $0F, $0F, $23, $80, $23, $80
smpsVcAlgorithm $04
smpsVcFeedback $00
smpsVcUnusedBits $00
smpsVcDetune $03, $03, $04, $07
smpsVcCoarseFreq $01, $01, $01, $01
smpsVcRateScale $00, $00, $00, $00
smpsVcAttackRate $12, $12, $12, $12
smpsVcAmpMod $00, $00, $00, $00
smpsVcDecayRate1 $00, $00, $00, $00
smpsVcDecayRate2 $00, $00, $00, $00
smpsVcDecayLevel $00, $00, $00, $00
smpsVcReleaseRate $0F, $0F, $0F, $0F
smpsVcTotalLevel $00, $23, $00, $23
; $Curch Bell
; Voice $10
; $14
; $75, $72, $35, $32, $9F, $9F, $9F, $9F, $05, $05, $00, $0A
; $05, $05, $07, $05, $2F, $FF, $0F, $2F, $1E, $80, $14, $80
smpsVcAlgorithm $04
smpsVcFeedback $02
smpsVcUnusedBits $00
smpsVcDetune $03, $03, $07, $07
smpsVcCoarseFreq $02, $05, $02, $05
smpsVcRateScale $02, $02, $02, $02
smpsVcAttackRate $1F, $1F, $1F, $1F
smpsVcAmpMod $00, $00, $00, $00
smpsVcDecayRate1 $0A, $00, $05, $05
smpsVcDecayRate2 $05, $07, $05, $05
smpsVcDecayLevel $02, $00, $0F, $02
smpsVcReleaseRate $0F, $0F, $0F, $0F
smpsVcTotalLevel $00, $14, $00, $1E
; Synth Brass 2
; Voice $11
; $3D
; $01, $00, $01, $02, $12, $1F, $1F, $14, $07, $02, $02, $0A
; $05, $05, $05, $05, $2F, $2F, $2F, $AF, $1C, $80, $82, $80
smpsVcAlgorithm $05
smpsVcFeedback $07
smpsVcUnusedBits $00
smpsVcDetune $00, $00, $00, $00
smpsVcCoarseFreq $02, $01, $00, $01
smpsVcRateScale $00, $00, $00, $00
smpsVcAttackRate $14, $1F, $1F, $12
smpsVcAmpMod $00, $00, $00, $00
smpsVcDecayRate1 $0A, $02, $02, $07
smpsVcDecayRate2 $05, $05, $05, $05
smpsVcDecayLevel $0A, $02, $02, $02
smpsVcReleaseRate $0F, $0F, $0F, $0F
smpsVcTotalLevel $00, $02, $00, $1C
; Bell Piano
; Voice $12
; $1C
; $73, $72, $33, $32, $94, $99, $94, $99, $08, $0A, $08, $0A
; $00, $05, $00, $05, $3F, $4F, $3F, $4F, $1E, $80, $19, $80
smpsVcAlgorithm $04
smpsVcFeedback $03
smpsVcUnusedBits $00
smpsVcDetune $03, $03, $07, $07
smpsVcCoarseFreq $02, $03, $02, $03
smpsVcRateScale $02, $02, $02, $02
smpsVcAttackRate $19, $14, $19, $14
smpsVcAmpMod $00, $00, $00, $00
smpsVcDecayRate1 $0A, $08, $0A, $08
smpsVcDecayRate2 $05, $00, $05, $00
smpsVcDecayLevel $04, $03, $04, $03
smpsVcReleaseRate $0F, $0F, $0F, $0F
smpsVcTotalLevel $00, $19, $00, $1E
; Wet Wood Bass
; Voice $13
; $31
; $33, $01, $00, $00, $9F, $1F, $1F, $1F, $0D, $0A, $0A, $0A
; $0A, $07, $07, $07, $FF, $AF, $AF, $AF, $1E, $1E, $1E, $80
smpsVcAlgorithm $01
smpsVcFeedback $06
smpsVcUnusedBits $00
smpsVcDetune $00, $00, $00, $03
smpsVcCoarseFreq $00, $00, $01, $03
smpsVcRateScale $00, $00, $00, $02
smpsVcAttackRate $1F, $1F, $1F, $1F
smpsVcAmpMod $00, $00, $00, $00
smpsVcDecayRate1 $0A, $0A, $0A, $0D
smpsVcDecayRate2 $07, $07, $07, $0A
smpsVcDecayLevel $0A, $0A, $0A, $0F
smpsVcReleaseRate $0F, $0F, $0F, $0F
smpsVcTotalLevel $00, $1E, $1E, $1E
; Silent Bass
; Voice $14
; $3A
; $70, $76, $30, $71, $1F, $95, $1F, $1F, $0E, $0F, $05, $0C
; $07, $06, $06, $07, $2F, $4F, $1F, $5F, $21, $12, $28, $80
smpsVcAlgorithm $02
smpsVcFeedback $07
smpsVcUnusedBits $00
smpsVcDetune $07, $03, $07, $07
smpsVcCoarseFreq $01, $00, $06, $00
smpsVcRateScale $00, $00, $02, $00
smpsVcAttackRate $1F, $1F, $15, $1F
smpsVcAmpMod $00, $00, $00, $00
smpsVcDecayRate1 $0C, $05, $0F, $0E
smpsVcDecayRate2 $07, $06, $06, $07
smpsVcDecayLevel $05, $01, $04, $02
smpsVcReleaseRate $0F, $0F, $0F, $0F
smpsVcTotalLevel $00, $28, $12, $21
; Picked Bass
; Voice $15
; $28
; $71, $00, $30, $01, $1F, $1F, $1D, $1F, $13, $13, $06, $05
; $03, $03, $02, $05, $4F, $4F, $2F, $3F, $0E, $14, $1E, $80
smpsVcAlgorithm $00
smpsVcFeedback $05
smpsVcUnusedBits $00
smpsVcDetune $00, $03, $00, $07
smpsVcCoarseFreq $01, $00, $00, $01
smpsVcRateScale $00, $00, $00, $00
smpsVcAttackRate $1F, $1D, $1F, $1F
smpsVcAmpMod $00, $00, $00, $00
smpsVcDecayRate1 $05, $06, $13, $13
smpsVcDecayRate2 $05, $02, $03, $03
smpsVcDecayLevel $03, $02, $04, $04
smpsVcReleaseRate $0F, $0F, $0F, $0F
smpsVcTotalLevel $00, $1E, $14, $0E
; Xylophone
; Voice $16
; $3E
; $38, $01, $7A, $34, $59, $D9, $5F, $9C, $0F, $04, $0F, $0A
; $02, $02, $05, $05, $AF, $AF, $66, $66, $28, $80, $A3, $80
smpsVcAlgorithm $06
smpsVcFeedback $07
smpsVcUnusedBits $00
smpsVcDetune $03, $07, $00, $03
smpsVcCoarseFreq $04, $0A, $01, $08
smpsVcRateScale $02, $01, $03, $01
smpsVcAttackRate $1C, $1F, $19, $19
smpsVcAmpMod $00, $00, $00, $00
smpsVcDecayRate1 $0A, $0F, $04, $0F
smpsVcDecayRate2 $05, $05, $02, $02
smpsVcDecayLevel $06, $06, $0A, $0A
smpsVcReleaseRate $06, $06, $0F, $0F
smpsVcTotalLevel $00, $23, $00, $28
; Sine Flute
; Voice $17
; $39
; $32, $31, $72, $71, $1F, $1F, $1F, $1F, $00, $00, $00, $00
; $00, $00, $00, $00, $0F, $0F, $0F, $0F, $1B, $32, $28, $80
smpsVcAlgorithm $01
smpsVcFeedback $07
smpsVcUnusedBits $00
smpsVcDetune $07, $07, $03, $03
smpsVcCoarseFreq $01, $02, $01, $02
smpsVcRateScale $00, $00, $00, $00
smpsVcAttackRate $1F, $1F, $1F, $1F
smpsVcAmpMod $00, $00, $00, $00
smpsVcDecayRate1 $00, $00, $00, $00
smpsVcDecayRate2 $00, $00, $00, $00
smpsVcDecayLevel $00, $00, $00, $00
smpsVcReleaseRate $0F, $0F, $0F, $0F
smpsVcTotalLevel $00, $28, $32, $1B
; Pipe Organ
; Voice $18
; $07
; $34, $74, $32, $71, $1F, $1F, $1F, $1F, $0A, $0A, $05, $03
; $00, $00, $00, $00, $3F, $3F, $2F, $2F, $8A, $8A, $80, $80
smpsVcAlgorithm $07
smpsVcFeedback $00
smpsVcUnusedBits $00
smpsVcDetune $07, $03, $07, $03
smpsVcCoarseFreq $01, $02, $04, $04
smpsVcRateScale $00, $00, $00, $00
smpsVcAttackRate $1F, $1F, $1F, $1F
smpsVcAmpMod $00, $00, $00, $00
smpsVcDecayRate1 $03, $05, $0A, $0A
smpsVcDecayRate2 $00, $00, $00, $00
smpsVcDecayLevel $02, $02, $03, $03
smpsVcReleaseRate $0F, $0F, $0F, $0F
smpsVcTotalLevel $00, $00, $0A, $0A
; Synth Brass 2
; Voice $19
; $3A
; $31, $37, $31, $31, $8D, $8D, $8E, $53, $0E, $0E, $0E, $03
; $00, $00, $00, $00, $1F, $FF, $1F, $0F, $17, $28, $26, $80
smpsVcAlgorithm $02
smpsVcFeedback $07
smpsVcUnusedBits $00
smpsVcDetune $03, $03, $03, $03
smpsVcCoarseFreq $01, $01, $07, $01
smpsVcRateScale $01, $02, $02, $02
smpsVcAttackRate $13, $0E, $0D, $0D
smpsVcAmpMod $00, $00, $00, $00
smpsVcDecayRate1 $03, $0E, $0E, $0E
smpsVcDecayRate2 $00, $00, $00, $00
smpsVcDecayLevel $00, $01, $0F, $01
smpsVcReleaseRate $0F, $0F, $0F, $0F
smpsVcTotalLevel $00, $26, $28, $17
; Harpischord
; Voice $1A
; $3B
; $3A, $31, $71, $74, $DF, $1F, $1F, $DF, $00, $0A, $0A, $05
; $00, $05, $05, $03, $0F, $5F, $1F, $5F, $32, $1E, $0F, $80
smpsVcAlgorithm $03
smpsVcFeedback $07
smpsVcUnusedBits $00
smpsVcDetune $07, $07, $03, $03
smpsVcCoarseFreq $04, $01, $01, $0A
smpsVcRateScale $03, $00, $00, $03
smpsVcAttackRate $1F, $1F, $1F, $1F
smpsVcAmpMod $00, $00, $00, $00
smpsVcDecayRate1 $05, $0A, $0A, $00
smpsVcDecayRate2 $03, $05, $05, $00
smpsVcDecayLevel $05, $01, $05, $00
smpsVcReleaseRate $0F, $0F, $0F, $0F
smpsVcTotalLevel $00, $0F, $1E, $32
; Metallic Bass
; Voice $1B
; $05
; $04, $01, $02, $04, $8D, $1F, $15, $52, $06, $00, $00, $04
; $02, $08, $00, $00, $1F, $0F, $0F, $2F, $16, $90, $84, $8C
smpsVcAlgorithm $05
smpsVcFeedback $00
smpsVcUnusedBits $00
smpsVcDetune $00, $00, $00, $00
smpsVcCoarseFreq $04, $02, $01, $04
smpsVcRateScale $01, $00, $00, $02
smpsVcAttackRate $12, $15, $1F, $0D
smpsVcAmpMod $00, $00, $00, $00
smpsVcDecayRate1 $04, $00, $00, $06
smpsVcDecayRate2 $00, $00, $08, $02
smpsVcDecayLevel $02, $00, $00, $01
smpsVcReleaseRate $0F, $0F, $0F, $0F
smpsVcTotalLevel $0C, $04, $10, $16
; Alternate Metallic Bass
; Voice $1C
; $2C
; $71, $74, $32, $32, $1F, $12, $1F, $12, $00, $0A, $00, $0A
; $00, $00, $00, $00, $0F, $1F, $0F, $1F, $16, $80, $17, $80
smpsVcAlgorithm $04
smpsVcFeedback $05
smpsVcUnusedBits $00
smpsVcDetune $03, $03, $07, $07
smpsVcCoarseFreq $02, $02, $04, $01
smpsVcRateScale $00, $00, $00, $00
smpsVcAttackRate $12, $1F, $12, $1F
smpsVcAmpMod $00, $00, $00, $00
smpsVcDecayRate1 $0A, $00, $0A, $00
smpsVcDecayRate2 $00, $00, $00, $00
smpsVcDecayLevel $01, $00, $01, $00
smpsVcReleaseRate $0F, $0F, $0F, $0F
smpsVcTotalLevel $00, $17, $00, $16
; Backdropped Metallic Bass
; Voice $1D
; $3A
; $01, $07, $01, $01, $8E, $8E, $8D, $53, $0E, $0E, $0E, $03
; $00, $00, $00, $07, $1F, $FF, $1F, $0F, $18, $28, $27, $8F
smpsVcAlgorithm $02
smpsVcFeedback $07
smpsVcUnusedBits $00
smpsVcDetune $00, $00, $00, $00
smpsVcCoarseFreq $01, $01, $07, $01
smpsVcRateScale $01, $02, $02, $02
smpsVcAttackRate $13, $0D, $0E, $0E
smpsVcAmpMod $00, $00, $00, $00
smpsVcDecayRate1 $03, $0E, $0E, $0E
smpsVcDecayRate2 $07, $00, $00, $00
smpsVcDecayLevel $00, $01, $0F, $01
smpsVcReleaseRate $0F, $0F, $0F, $0F
smpsVcTotalLevel $0F, $27, $28, $18
; Sine like Bell
; Voice $1E
; $36
; $7A, $32, $51, $11, $1F, $1F, $59, $1C, $0A, $0D, $06, $0A
; $07, $00, $02, $02, $AF, $5F, $5F, $5F, $1E, $8B, $81, $80
smpsVcAlgorithm $06
smpsVcFeedback $06
smpsVcUnusedBits $00
smpsVcDetune $01, $05, $03, $07
smpsVcCoarseFreq $01, $01, $02, $0A
smpsVcRateScale $00, $01, $00, $00
smpsVcAttackRate $1C, $19, $1F, $1F
smpsVcAmpMod $00, $00, $00, $00
smpsVcDecayRate1 $0A, $06, $0D, $0A
smpsVcDecayRate2 $02, $02, $00, $07
smpsVcDecayLevel $05, $05, $05, $0A
smpsVcReleaseRate $0F, $0F, $0F, $0F
smpsVcTotalLevel $00, $01, $0B, $1E
; Synth like Metallic with Small Bell
; Voice $1F
; $3C
; $71, $72, $3F, $34, $8D, $52, $9F, $1F, $09, $00, $00, $0D
; $00, $00, $00, $00, $23, $08, $02, $F7, $15, $85, $1D, $8A
smpsVcAlgorithm $04
smpsVcFeedback $07
smpsVcUnusedBits $00
smpsVcDetune $03, $03, $07, $07
smpsVcCoarseFreq $04, $0F, $02, $01
smpsVcRateScale $00, $02, $01, $02
smpsVcAttackRate $1F, $1F, $12, $0D
smpsVcAmpMod $00, $00, $00, $00
smpsVcDecayRate1 $0D, $00, $00, $09
smpsVcDecayRate2 $00, $00, $00, $00
smpsVcDecayLevel $0F, $00, $00, $02
smpsVcReleaseRate $07, $02, $08, $03
smpsVcTotalLevel $0A, $1D, $05, $15
; Nice Synth like lead
; Voice $20
; $3E
; $77, $71, $32, $31, $1F, $1F, $1F, $1F, $0D, $06, $00, $00
; $08, $06, $00, $00, $15, $0A, $0A, $0A, $1B, $8F, $8F, $8F
smpsVcAlgorithm $06
smpsVcFeedback $07
smpsVcUnusedBits $00
smpsVcDetune $03, $03, $07, $07
smpsVcCoarseFreq $01, $02, $01, $07
smpsVcRateScale $00, $00, $00, $00
smpsVcAttackRate $1F, $1F, $1F, $1F
smpsVcAmpMod $00, $00, $00, $00
smpsVcDecayRate1 $00, $00, $06, $0D
smpsVcDecayRate2 $00, $00, $06, $08
smpsVcDecayLevel $00, $00, $00, $01
smpsVcReleaseRate $0A, $0A, $0A, $05
smpsVcTotalLevel $0F, $0F, $0F, $1B
; Rock Organ
; Voice $21
; $07
; $34, $74, $32, $71, $1F, $1F, $1F, $1F, $0A, $0A, $05, $03
; $00, $00, $00, $00, $3F, $3F, $2F, $2F, $8A, $8A, $8A, $8A
smpsVcAlgorithm $07
smpsVcFeedback $00
smpsVcUnusedBits $00
smpsVcDetune $07, $03, $07, $03
smpsVcCoarseFreq $01, $02, $04, $04
smpsVcRateScale $00, $00, $00, $00
smpsVcAttackRate $1F, $1F, $1F, $1F
smpsVcAmpMod $00, $00, $00, $00
smpsVcDecayRate1 $03, $05, $0A, $0A
smpsVcDecayRate2 $00, $00, $00, $00
smpsVcDecayLevel $02, $02, $03, $03
smpsVcReleaseRate $0F, $0F, $0F, $0F
smpsVcTotalLevel $0A, $0A, $0A, $0A
; Strike like Slap Bass
; Voice $22
; $20
; $36, $35, $30, $31, $DF, $DF, $9F, $9F, $07, $06, $09, $06
; $07, $06, $06, $08, $20, $10, $10, $F8, $19, $37, $13, $80
smpsVcAlgorithm $00
smpsVcFeedback $04
smpsVcUnusedBits $00
smpsVcDetune $03, $03, $03, $03
smpsVcCoarseFreq $01, $00, $05, $06
smpsVcRateScale $02, $02, $03, $03
smpsVcAttackRate $1F, $1F, $1F, $1F
smpsVcAmpMod $00, $00, $00, $00
smpsVcDecayRate1 $06, $09, $06, $07
smpsVcDecayRate2 $08, $06, $06, $07
smpsVcDecayLevel $0F, $01, $01, $02
smpsVcReleaseRate $08, $00, $00, $00
smpsVcTotalLevel $00, $13, $37, $19
| 33.450223
| 77
| 0.549885
|
d684699678912ec7c4ff80a7ccb582bb84a77eea
| 733
|
asm
|
Assembly
|
programs/oeis/318/A318935.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | 1
|
2021-03-15T11:38:20.000Z
|
2021-03-15T11:38:20.000Z
|
programs/oeis/318/A318935.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/318/A318935.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
; A318935: a(n) = Sum_{2^m divides n} 2^(3*m).
; 1,9,1,73,1,9,1,585,1,9,1,73,1,9,1,4681,1,9,1,73,1,9,1,585,1,9,1,73,1,9,1,37449,1,9,1,73,1,9,1,585,1,9,1,73,1,9,1,4681,1,9,1,73,1,9,1,585,1,9,1,73,1,9,1,299593,1,9,1,73,1,9,1,585,1,9,1,73,1,9,1,4681,1,9,1,73,1,9,1,585,1,9,1,73,1,9,1,37449,1,9,1,73,1,9,1,585,1,9,1,73,1,9,1,4681,1,9,1,73,1,9,1,585,1,9,1,73,1,9,1,2396745,1,9,1,73,1,9,1,585,1,9,1,73,1,9,1,4681,1,9,1,73,1,9,1,585,1,9,1,73,1,9,1,37449,1,9,1,73,1,9,1,585,1,9,1,73,1,9,1,4681,1,9,1,73,1,9,1,585,1,9,1,73,1,9,1,299593,1,9,1,73,1,9,1,585,1,9,1,73,1,9,1,4681,1,9,1,73,1,9,1,585,1,9,1,73,1,9,1,37449,1,9,1,73,1,9,1,585,1,9,1,73,1,9,1,4681,1,9,1,73,1,9,1,585,1,9
add $0,1
mul $0,2
gcd $0,1073741824
pow $0,3
mov $1,$0
div $1,7
| 73.3
| 620
| 0.592087
|
c9ca94e0e9e7083fbd8ec3529cbf496957b4939c
| 640
|
asm
|
Assembly
|
Quiz and Lab Assessment/Solution/3.asm
|
AhnafNSU/CSE331L-Section-1-Fall20-NSU
|
870d9527411f8a74336d8c90d3a09e5750d88af7
|
[
"MIT"
] | null | null | null |
Quiz and Lab Assessment/Solution/3.asm
|
AhnafNSU/CSE331L-Section-1-Fall20-NSU
|
870d9527411f8a74336d8c90d3a09e5750d88af7
|
[
"MIT"
] | null | null | null |
Quiz and Lab Assessment/Solution/3.asm
|
AhnafNSU/CSE331L-Section-1-Fall20-NSU
|
870d9527411f8a74336d8c90d3a09e5750d88af7
|
[
"MIT"
] | null | null | null |
.MODEL SMALL
.STACK 100H
.DATA
STRING DB "Predefined String is being used."
VOWEL DB ?
.CODE
MAIN PROC
MOV AX, @DATA
MOV DS, AX
MOV SI, OFFSET STRING
MOV BL, 00
BACK: MOV AL, [SI]
CMP AL,'$'
JZ FINAL
CMP AL,'A'
JZ COUNT
CMP AL,'E'
JZ COUNT
CMP AL,'I'
JZ COUNT
CMP AL,'O'
JZ COUNT
CMP AL,'U'
JZ COUNT
CMP AL,'a'
JZ COUNT
CMP AL,'e'
JZ COUNT
CMP AL,'i'
JZ COUNT
CMP AL,'o'
JZ COUNT
CMP AL,'u'
JZ COUNT
INC SI
JMP BACK
COUNT: INC BL
MOV VOWEL, BL
INC SI
JMP BACK
FINAL: MOV AH, 4CH
INT 21H
MAIN ENDP
END
| 13.061224
| 46
| 0.5375
|
20942e79ee4b40aafc3f8eeadfd1f039a0f21d30
| 62,176
|
asm
|
Assembly
|
target/cos_117/disasm/iop_overlay1/STRSTAT.asm
|
jrrk2/cray-sim
|
52c9639808d6890517092637b188282c00cce4f7
|
[
"BSL-1.0"
] | 49
|
2020-10-09T12:29:16.000Z
|
2022-03-12T02:33:35.000Z
|
target/cos_117/disasm/iop_overlay1/STRSTAT.asm
|
jrrk2/cray-sim
|
52c9639808d6890517092637b188282c00cce4f7
|
[
"BSL-1.0"
] | 1
|
2021-12-29T15:59:25.000Z
|
2021-12-29T15:59:25.000Z
|
target/cos_117/disasm/iop_overlay1/STRSTAT.asm
|
jrrk2/cray-sim
|
52c9639808d6890517092637b188282c00cce4f7
|
[
"BSL-1.0"
] | 6
|
2021-04-12T06:10:32.000Z
|
2022-02-08T23:11:19.000Z
|
0x0000 (0x000000) 0x2104- f:00020 d: 260 | A = OR[260]
0x0001 (0x000002) 0x290D- f:00024 d: 269 | OR[269] = A
0x0002 (0x000004) 0x2104- f:00020 d: 260 | A = OR[260]
0x0003 (0x000006) 0x1403- f:00012 d: 3 | A = A + 3 (0x0003)
0x0004 (0x000008) 0x1A00-0xFFFC f:00015 d: 0 | A = A & 65532 (0xFFFC)
0x0006 (0x00000C) 0x2904- f:00024 d: 260 | OR[260] = A
0x0007 (0x00000E) 0x2104- f:00020 d: 260 | A = OR[260]
0x0008 (0x000010) 0x2927- f:00024 d: 295 | OR[295] = A
0x0009 (0x000012) 0x102C- f:00010 d: 44 | A = 44 (0x002C)
0x000A (0x000014) 0x2B04- f:00025 d: 260 | OR[260] = A + OR[260]
0x000B (0x000016) 0x2104- f:00020 d: 260 | A = OR[260]
0x000C (0x000018) 0x2705- f:00023 d: 261 | A = A - OR[261]
0x000D (0x00001A) 0xB234- f:00131 d: 52 | R = OR[52], C = 1
0x000E (0x00001C) 0x000B- f:00000 d: 11 | PASS | **** non-standard encoding with D:0x000B ****
0x000F (0x00001E) 0x210D- f:00020 d: 269 | A = OR[269]
0x0010 (0x000020) 0x3904- f:00034 d: 260 | (OR[260]) = A
0x0011 (0x000022) 0x2D04- f:00026 d: 260 | OR[260] = OR[260] + 1
0x0012 (0x000024) 0x2127- f:00020 d: 295 | A = OR[295]
0x0013 (0x000026) 0x1428- f:00012 d: 40 | A = A + 40 (0x0028)
0x0014 (0x000028) 0x2926- f:00024 d: 294 | OR[294] = A
0x0015 (0x00002A) 0x211D- f:00020 d: 285 | A = OR[285]
0x0016 (0x00002C) 0x8402- f:00102 d: 2 | P = P + 2 (0x0018), A = 0
0x0017 (0x00002E) 0x7018- f:00070 d: 24 | P = P + 24 (0x002F)
0x0018 (0x000030) 0x2104- f:00020 d: 260 | A = OR[260]
0x0019 (0x000032) 0x290D- f:00024 d: 269 | OR[269] = A
0x001A (0x000034) 0x2104- f:00020 d: 260 | A = OR[260]
0x001B (0x000036) 0x1403- f:00012 d: 3 | A = A + 3 (0x0003)
0x001C (0x000038) 0x1A00-0xFFFC f:00015 d: 0 | A = A & 65532 (0xFFFC)
0x001E (0x00003C) 0x2904- f:00024 d: 260 | OR[260] = A
0x001F (0x00003E) 0x2104- f:00020 d: 260 | A = OR[260]
0x0020 (0x000040) 0x2925- f:00024 d: 293 | OR[293] = A
0x0021 (0x000042) 0x100C- f:00010 d: 12 | A = 12 (0x000C)
0x0022 (0x000044) 0x2B04- f:00025 d: 260 | OR[260] = A + OR[260]
0x0023 (0x000046) 0x2104- f:00020 d: 260 | A = OR[260]
0x0024 (0x000048) 0x2705- f:00023 d: 261 | A = A - OR[261]
0x0025 (0x00004A) 0xB234- f:00131 d: 52 | R = OR[52], C = 1
0x0026 (0x00004C) 0x000B- f:00000 d: 11 | PASS | **** non-standard encoding with D:0x000B ****
0x0027 (0x00004E) 0x210D- f:00020 d: 269 | A = OR[269]
0x0028 (0x000050) 0x3904- f:00034 d: 260 | (OR[260]) = A
0x0029 (0x000052) 0x2D04- f:00026 d: 260 | OR[260] = OR[260] + 1
0x002A (0x000054) 0x100C- f:00010 d: 12 | A = 12 (0x000C)
0x002B (0x000056) 0x0802- f:00004 d: 2 | A = A > 2 (0x0002)
0x002C (0x000058) 0x2924- f:00024 d: 292 | OR[292] = A
0x002D (0x00005A) 0x7E03-0x02A3 f:00077 d: 3 | R = OR[3]+675 (0x02A3)
0x002F (0x00005E) 0x7E03-0x0296 f:00077 d: 3 | R = OR[3]+662 (0x0296)
0x0031 (0x000062) 0x211B- f:00020 d: 283 | A = OR[283]
0x0032 (0x000064) 0x2928- f:00024 d: 296 | OR[296] = A
0x0033 (0x000066) 0x251C- f:00022 d: 284 | A = A + OR[284]
0x0034 (0x000068) 0x2929- f:00024 d: 297 | OR[297] = A
0x0035 (0x00006A) 0x1800-0x02BC f:00014 d: 0 | A = 700 (0x02BC)
0x0037 (0x00006E) 0x2403- f:00022 d: 3 | A = A + OR[3]
0x0038 (0x000070) 0x2920- f:00024 d: 288 | OR[288] = A
0x0039 (0x000072) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x003A (0x000074) 0x2921- f:00024 d: 289 | OR[289] = A
0x003B (0x000076) 0x1015- f:00010 d: 21 | A = 21 (0x0015)
0x003C (0x000078) 0x2922- f:00024 d: 290 | OR[290] = A
0x003D (0x00007A) 0x7E03-0x0221 f:00077 d: 3 | R = OR[3]+545 (0x0221)
0x003F (0x00007E) 0x1800-0x02CB f:00014 d: 0 | A = 715 (0x02CB)
0x0041 (0x000082) 0x2403- f:00022 d: 3 | A = A + OR[3]
0x0042 (0x000084) 0x2920- f:00024 d: 288 | OR[288] = A
0x0043 (0x000086) 0x1021- f:00010 d: 33 | A = 33 (0x0021)
0x0044 (0x000088) 0x2921- f:00024 d: 289 | OR[289] = A
0x0045 (0x00008A) 0x1006- f:00010 d: 6 | A = 6 (0x0006)
0x0046 (0x00008C) 0x2922- f:00024 d: 290 | OR[290] = A
0x0047 (0x00008E) 0x7E03-0x0221 f:00077 d: 3 | R = OR[3]+545 (0x0221)
0x0049 (0x000092) 0x211D- f:00020 d: 285 | A = OR[285]
0x004A (0x000094) 0x8402- f:00102 d: 2 | P = P + 2 (0x004C), A = 0
0x004B (0x000096) 0x703A- f:00070 d: 58 | P = P + 58 (0x0085)
0x004C (0x000098) 0x2125- f:00020 d: 293 | A = OR[293]
0x004D (0x00009A) 0x140A- f:00012 d: 10 | A = A + 10 (0x000A)
0x004E (0x00009C) 0x2908- f:00024 d: 264 | OR[264] = A
0x004F (0x00009E) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0050 (0x0000A0) 0x2920- f:00024 d: 288 | OR[288] = A
0x0051 (0x0000A2) 0x1002- f:00010 d: 2 | A = 2 (0x0002)
0x0052 (0x0000A4) 0x2922- f:00024 d: 290 | OR[290] = A
0x0053 (0x0000A6) 0x1001- f:00010 d: 1 | A = 1 (0x0001)
0x0054 (0x0000A8) 0x2923- f:00024 d: 291 | OR[291] = A
0x0055 (0x0000AA) 0x7E03-0x025F f:00077 d: 3 | R = OR[3]+607 (0x025F)
0x0057 (0x0000AE) 0x102E- f:00010 d: 46 | A = 46 (0x002E)
0x0058 (0x0000B0) 0x2913- f:00024 d: 275 | OR[275] = A
0x0059 (0x0000B2) 0x2113- f:00020 d: 275 | A = OR[275]
0x005A (0x0000B4) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF)
0x005B (0x0000B6) 0x290D- f:00024 d: 269 | OR[269] = A
0x005C (0x0000B8) 0x2121- f:00020 d: 289 | A = OR[289]
0x005D (0x0000BA) 0x0801- f:00004 d: 1 | A = A > 1 (0x0001)
0x005E (0x0000BC) 0x2527- f:00022 d: 295 | A = A + OR[295]
0x005F (0x0000BE) 0x290E- f:00024 d: 270 | OR[270] = A
0x0060 (0x0000C0) 0x2121- f:00020 d: 289 | A = OR[289]
0x0061 (0x0000C2) 0x1201- f:00011 d: 1 | A = A & 1 (0x0001)
0x0062 (0x0000C4) 0x2908- f:00024 d: 264 | OR[264] = A
0x0063 (0x0000C6) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0064 (0x0000C8) 0x2708- f:00023 d: 264 | A = A - OR[264]
0x0065 (0x0000CA) 0x8607- f:00103 d: 7 | P = P + 7 (0x006C), A # 0
0x0066 (0x0000CC) 0x310E- f:00030 d: 270 | A = (OR[270])
0x0067 (0x0000CE) 0x0A09- f:00005 d: 9 | A = A < 9 (0x0009)
0x0068 (0x0000D0) 0x250D- f:00022 d: 269 | A = A + OR[269]
0x0069 (0x0000D2) 0x0C09- f:00006 d: 9 | A = A >> 9 (0x0009)
0x006A (0x0000D4) 0x390E- f:00034 d: 270 | (OR[270]) = A
0x006B (0x0000D6) 0x7006- f:00070 d: 6 | P = P + 6 (0x0071)
0x006C (0x0000D8) 0x310E- f:00030 d: 270 | A = (OR[270])
0x006D (0x0000DA) 0x1A00-0xFF00 f:00015 d: 0 | A = A & 65280 (0xFF00)
0x006F (0x0000DE) 0x250D- f:00022 d: 269 | A = A + OR[269]
0x0070 (0x0000E0) 0x390E- f:00034 d: 270 | (OR[270]) = A
0x0071 (0x0000E2) 0x2D21- f:00026 d: 289 | OR[289] = OR[289] + 1
0x0072 (0x0000E4) 0x2125- f:00020 d: 293 | A = OR[293]
0x0073 (0x0000E6) 0x140B- f:00012 d: 11 | A = A + 11 (0x000B)
0x0074 (0x0000E8) 0x2908- f:00024 d: 264 | OR[264] = A
0x0075 (0x0000EA) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0076 (0x0000EC) 0x2920- f:00024 d: 288 | OR[288] = A
0x0077 (0x0000EE) 0x1003- f:00010 d: 3 | A = 3 (0x0003)
0x0078 (0x0000F0) 0x2922- f:00024 d: 290 | OR[290] = A
0x0079 (0x0000F2) 0x1002- f:00010 d: 2 | A = 2 (0x0002)
0x007A (0x0000F4) 0x2923- f:00024 d: 291 | OR[291] = A
0x007B (0x0000F6) 0x7E03-0x025F f:00077 d: 3 | R = OR[3]+607 (0x025F)
0x007D (0x0000FA) 0x1800-0x032C f:00014 d: 0 | A = 812 (0x032C)
0x007F (0x0000FE) 0x2403- f:00022 d: 3 | A = A + OR[3]
0x0080 (0x000100) 0x2920- f:00024 d: 288 | OR[288] = A
0x0081 (0x000102) 0x1007- f:00010 d: 7 | A = 7 (0x0007)
0x0082 (0x000104) 0x2922- f:00024 d: 290 | OR[290] = A
0x0083 (0x000106) 0x7E03-0x0221 f:00077 d: 3 | R = OR[3]+545 (0x0221)
0x0085 (0x00010A) 0x1800-0x02C7 f:00014 d: 0 | A = 711 (0x02C7)
0x0087 (0x00010E) 0x2403- f:00022 d: 3 | A = A + OR[3]
0x0088 (0x000110) 0x2920- f:00024 d: 288 | OR[288] = A
0x0089 (0x000112) 0x1045- f:00010 d: 69 | A = 69 (0x0045)
0x008A (0x000114) 0x2921- f:00024 d: 289 | OR[289] = A
0x008B (0x000116) 0x1006- f:00010 d: 6 | A = 6 (0x0006)
0x008C (0x000118) 0x2922- f:00024 d: 290 | OR[290] = A
0x008D (0x00011A) 0x7E03-0x0221 f:00077 d: 3 | R = OR[3]+545 (0x0221)
0x008F (0x00011E) 0x211E- f:00020 d: 286 | A = OR[286]
0x0090 (0x000120) 0x2920- f:00024 d: 288 | OR[288] = A
0x0091 (0x000122) 0x104C- f:00010 d: 76 | A = 76 (0x004C)
0x0092 (0x000124) 0x2921- f:00024 d: 289 | OR[289] = A
0x0093 (0x000126) 0x1002- f:00010 d: 2 | A = 2 (0x0002)
0x0094 (0x000128) 0x2922- f:00024 d: 290 | OR[290] = A
0x0095 (0x00012A) 0x1001- f:00010 d: 1 | A = 1 (0x0001)
0x0096 (0x00012C) 0x2923- f:00024 d: 291 | OR[291] = A
0x0097 (0x00012E) 0x7E03-0x025F f:00077 d: 3 | R = OR[3]+607 (0x025F)
0x0099 (0x000132) 0x7E03-0x027B f:00077 d: 3 | R = OR[3]+635 (0x027B)
0x009B (0x000136) 0x1800-0x02CE f:00014 d: 0 | A = 718 (0x02CE)
0x009D (0x00013A) 0x2403- f:00022 d: 3 | A = A + OR[3]
0x009E (0x00013C) 0x2920- f:00024 d: 288 | OR[288] = A
0x009F (0x00013E) 0x103B- f:00010 d: 59 | A = 59 (0x003B)
0x00A0 (0x000140) 0x2921- f:00024 d: 289 | OR[289] = A
0x00A1 (0x000142) 0x1006- f:00010 d: 6 | A = 6 (0x0006)
0x00A2 (0x000144) 0x2922- f:00024 d: 290 | OR[290] = A
0x00A3 (0x000146) 0x7E03-0x0221 f:00077 d: 3 | R = OR[3]+545 (0x0221)
0x00A5 (0x00014A) 0x7E03-0x027B f:00077 d: 3 | R = OR[3]+635 (0x027B)
0x00A7 (0x00014E) 0x1800-0x02D2 f:00014 d: 0 | A = 722 (0x02D2)
0x00A9 (0x000152) 0x2403- f:00022 d: 3 | A = A + OR[3]
0x00AA (0x000154) 0x2920- f:00024 d: 288 | OR[288] = A
0x00AB (0x000156) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x00AC (0x000158) 0x2921- f:00024 d: 289 | OR[289] = A
0x00AD (0x00015A) 0x104F- f:00010 d: 79 | A = 79 (0x004F)
0x00AE (0x00015C) 0x2922- f:00024 d: 290 | OR[290] = A
0x00AF (0x00015E) 0x7E03-0x0221 f:00077 d: 3 | R = OR[3]+545 (0x0221)
0x00B1 (0x000162) 0x7E03-0x027B f:00077 d: 3 | R = OR[3]+635 (0x027B)
0x00B3 (0x000166) 0x1800-0x02FA f:00014 d: 0 | A = 762 (0x02FA)
0x00B5 (0x00016A) 0x2403- f:00022 d: 3 | A = A + OR[3]
0x00B6 (0x00016C) 0x2920- f:00024 d: 288 | OR[288] = A
0x00B7 (0x00016E) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x00B8 (0x000170) 0x2921- f:00024 d: 289 | OR[289] = A
0x00B9 (0x000172) 0x104F- f:00010 d: 79 | A = 79 (0x004F)
0x00BA (0x000174) 0x2922- f:00024 d: 290 | OR[290] = A
0x00BB (0x000176) 0x7E03-0x0221 f:00077 d: 3 | R = OR[3]+545 (0x0221)
0x00BD (0x00017A) 0x7E03-0x027B f:00077 d: 3 | R = OR[3]+635 (0x027B)
0x00BF (0x00017E) 0x211D- f:00020 d: 285 | A = OR[285]
0x00C0 (0x000180) 0x8602- f:00103 d: 2 | P = P + 2 (0x00C2), A # 0
0x00C1 (0x000182) 0x7023- f:00070 d: 35 | P = P + 35 (0x00E4)
0x00C2 (0x000184) 0x1024- f:00010 d: 36 | A = 36 (0x0024)
0x00C3 (0x000186) 0x0801- f:00004 d: 1 | A = A > 1 (0x0001)
0x00C4 (0x000188) 0x2527- f:00022 d: 295 | A = A + OR[295]
0x00C5 (0x00018A) 0x1A00-0xFFFC f:00015 d: 0 | A = A & 65532 (0xFFFC)
0x00C7 (0x00018E) 0x2913- f:00024 d: 275 | OR[275] = A
0x00C8 (0x000190) 0x1028- f:00010 d: 40 | A = 40 (0x0028)
0x00C9 (0x000192) 0x0A01- f:00005 d: 1 | A = A < 1 (0x0001)
0x00CA (0x000194) 0x1624- f:00013 d: 36 | A = A - 36 (0x0024)
0x00CB (0x000196) 0x2914- f:00024 d: 276 | OR[276] = A
0x00CC (0x000198) 0x1028- f:00010 d: 40 | A = 40 (0x0028)
0x00CD (0x00019A) 0x292A- f:00024 d: 298 | OR[298] = A
0x00CE (0x00019C) 0x1800-0x014F f:00014 d: 0 | A = 335 (0x014F)
0x00D0 (0x0001A0) 0x292B- f:00024 d: 299 | OR[299] = A
0x00D1 (0x0001A2) 0x211D- f:00020 d: 285 | A = OR[285]
0x00D2 (0x0001A4) 0x292C- f:00024 d: 300 | OR[300] = A
0x00D3 (0x0001A6) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x00D4 (0x0001A8) 0x292D- f:00024 d: 301 | OR[301] = A
0x00D5 (0x0001AA) 0x2113- f:00020 d: 275 | A = OR[275]
0x00D6 (0x0001AC) 0x2930- f:00024 d: 304 | OR[304] = A
0x00D7 (0x0001AE) 0x2114- f:00020 d: 276 | A = OR[276]
0x00D8 (0x0001B0) 0x2931- f:00024 d: 305 | OR[305] = A
0x00D9 (0x0001B2) 0x1014- f:00010 d: 20 | A = 20 (0x0014)
0x00DA (0x0001B4) 0x2932- f:00024 d: 306 | OR[306] = A
0x00DB (0x0001B6) 0x112A- f:00010 d: 298 | A = 298 (0x012A)
0x00DC (0x0001B8) 0x5800- f:00054 d: 0 | B = A
0x00DD (0x0001BA) 0x1800-0x2518 f:00014 d: 0 | A = 9496 (0x2518)
0x00DF (0x0001BE) 0x7C09- f:00076 d: 9 | R = OR[9]
0x00E0 (0x0001C0) 0x7E03-0x027B f:00077 d: 3 | R = OR[3]+635 (0x027B)
0x00E2 (0x0001C4) 0x7A03-0x0208 f:00075 d: 3 | P = OR[3]+520 (0x0208)
0x00E4 (0x0001C8) 0x2125- f:00020 d: 293 | A = OR[293]
0x00E5 (0x0001CA) 0x1404- f:00012 d: 4 | A = A + 4 (0x0004)
0x00E6 (0x0001CC) 0x2908- f:00024 d: 264 | OR[264] = A
0x00E7 (0x0001CE) 0x3108- f:00030 d: 264 | A = (OR[264])
0x00E8 (0x0001D0) 0x2913- f:00024 d: 275 | OR[275] = A
0x00E9 (0x0001D2) 0x2113- f:00020 d: 275 | A = OR[275]
0x00EA (0x0001D4) 0x2724- f:00023 d: 292 | A = A - OR[292]
0x00EB (0x0001D6) 0x2913- f:00024 d: 275 | OR[275] = A
0x00EC (0x0001D8) 0x2119- f:00020 d: 281 | A = OR[281]
0x00ED (0x0001DA) 0x2513- f:00022 d: 275 | A = A + OR[275]
0x00EE (0x0001DC) 0x2919- f:00024 d: 281 | OR[281] = A
0x00EF (0x0001DE) 0x8002- f:00100 d: 2 | P = P + 2 (0x00F1), C = 0
0x00F0 (0x0001E0) 0x2D18- f:00026 d: 280 | OR[280] = OR[280] + 1
0x00F1 (0x0001E2) 0x2125- f:00020 d: 293 | A = OR[293]
0x00F2 (0x0001E4) 0x1405- f:00012 d: 5 | A = A + 5 (0x0005)
0x00F3 (0x0001E6) 0x2908- f:00024 d: 264 | OR[264] = A
0x00F4 (0x0001E8) 0x3108- f:00030 d: 264 | A = (OR[264])
0x00F5 (0x0001EA) 0x2924- f:00024 d: 292 | OR[292] = A
0x00F6 (0x0001EC) 0x2F04- f:00027 d: 260 | OR[260] = OR[260] - 1
0x00F7 (0x0001EE) 0x3104- f:00030 d: 260 | A = (OR[260])
0x00F8 (0x0001F0) 0x2904- f:00024 d: 260 | OR[260] = A
0x00F9 (0x0001F2) 0x2104- f:00020 d: 260 | A = OR[260]
0x00FA (0x0001F4) 0x2706- f:00023 d: 262 | A = A - OR[262]
0x00FB (0x0001F6) 0x8007- f:00100 d: 7 | P = P + 7 (0x0102), C = 0
0x00FC (0x0001F8) 0x2104- f:00020 d: 260 | A = OR[260]
0x00FD (0x0001FA) 0x2705- f:00023 d: 261 | A = A - OR[261]
0x00FE (0x0001FC) 0x8003- f:00100 d: 3 | P = P + 3 (0x0101), C = 0
0x00FF (0x0001FE) 0x8402- f:00102 d: 2 | P = P + 2 (0x0101), A = 0
0x0100 (0x000200) 0x7002- f:00070 d: 2 | P = P + 2 (0x0102)
0x0101 (0x000202) 0x7003- f:00070 d: 3 | P = P + 3 (0x0104)
0x0102 (0x000204) 0x7C34- f:00076 d: 52 | R = OR[52]
0x0103 (0x000206) 0x000B- f:00000 d: 11 | PASS | **** non-standard encoding with D:0x000B ****
0x0104 (0x000208) 0x2104- f:00020 d: 260 | A = OR[260]
0x0105 (0x00020A) 0x290D- f:00024 d: 269 | OR[269] = A
0x0106 (0x00020C) 0x2104- f:00020 d: 260 | A = OR[260]
0x0107 (0x00020E) 0x1403- f:00012 d: 3 | A = A + 3 (0x0003)
0x0108 (0x000210) 0x1A00-0xFFFC f:00015 d: 0 | A = A & 65532 (0xFFFC)
0x010A (0x000214) 0x2904- f:00024 d: 260 | OR[260] = A
0x010B (0x000216) 0x2104- f:00020 d: 260 | A = OR[260]
0x010C (0x000218) 0x2925- f:00024 d: 293 | OR[293] = A
0x010D (0x00021A) 0x2124- f:00020 d: 292 | A = OR[292]
0x010E (0x00021C) 0x0A02- f:00005 d: 2 | A = A < 2 (0x0002)
0x010F (0x00021E) 0x2504- f:00022 d: 260 | A = A + OR[260]
0x0110 (0x000220) 0x2904- f:00024 d: 260 | OR[260] = A
0x0111 (0x000222) 0x2104- f:00020 d: 260 | A = OR[260]
0x0112 (0x000224) 0x2705- f:00023 d: 261 | A = A - OR[261]
0x0113 (0x000226) 0xB234- f:00131 d: 52 | R = OR[52], C = 1
0x0114 (0x000228) 0x000B- f:00000 d: 11 | PASS | **** non-standard encoding with D:0x000B ****
0x0115 (0x00022A) 0x210D- f:00020 d: 269 | A = OR[269]
0x0116 (0x00022C) 0x3904- f:00034 d: 260 | (OR[260]) = A
0x0117 (0x00022E) 0x2D04- f:00026 d: 260 | OR[260] = OR[260] + 1
0x0118 (0x000230) 0x211A- f:00020 d: 282 | A = OR[282]
0x0119 (0x000232) 0x84D2- f:00102 d: 210 | P = P + 210 (0x01EB), A = 0
0x011A (0x000234) 0x2128- f:00020 d: 296 | A = OR[296]
0x011B (0x000236) 0x2729- f:00023 d: 297 | A = A - OR[297]
0x011C (0x000238) 0x84CF- f:00102 d: 207 | P = P + 207 (0x01EB), A = 0
0x011D (0x00023A) 0x7E03-0x02A3 f:00077 d: 3 | R = OR[3]+675 (0x02A3)
0x011F (0x00023E) 0x2125- f:00020 d: 293 | A = OR[293]
0x0120 (0x000240) 0x140C- f:00012 d: 12 | A = A + 12 (0x000C)
0x0121 (0x000242) 0x2920- f:00024 d: 288 | OR[288] = A
0x0122 (0x000244) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0123 (0x000246) 0x2921- f:00024 d: 289 | OR[289] = A
0x0124 (0x000248) 0x1002- f:00010 d: 2 | A = 2 (0x0002)
0x0125 (0x00024A) 0x2922- f:00024 d: 290 | OR[290] = A
0x0126 (0x00024C) 0x7E03-0x0221 f:00077 d: 3 | R = OR[3]+545 (0x0221)
0x0128 (0x000250) 0x2125- f:00020 d: 293 | A = OR[293]
0x0129 (0x000252) 0x1408- f:00012 d: 8 | A = A + 8 (0x0008)
0x012A (0x000254) 0x2908- f:00024 d: 264 | OR[264] = A
0x012B (0x000256) 0x3108- f:00030 d: 264 | A = (OR[264])
0x012C (0x000258) 0x2920- f:00024 d: 288 | OR[288] = A
0x012D (0x00025A) 0x1004- f:00010 d: 4 | A = 4 (0x0004)
0x012E (0x00025C) 0x2921- f:00024 d: 289 | OR[289] = A
0x012F (0x00025E) 0x1005- f:00010 d: 5 | A = 5 (0x0005)
0x0130 (0x000260) 0x2922- f:00024 d: 290 | OR[290] = A
0x0131 (0x000262) 0x1001- f:00010 d: 1 | A = 1 (0x0001)
0x0132 (0x000264) 0x2923- f:00024 d: 291 | OR[291] = A
0x0133 (0x000266) 0x7E03-0x025F f:00077 d: 3 | R = OR[3]+607 (0x025F)
0x0135 (0x00026A) 0x2125- f:00020 d: 293 | A = OR[293]
0x0136 (0x00026C) 0x1400- f:00012 d: 0 | A = A + 0 (0x0000)
0x0137 (0x00026E) 0x2920- f:00024 d: 288 | OR[288] = A
0x0138 (0x000270) 0x100B- f:00010 d: 11 | A = 11 (0x000B)
0x0139 (0x000272) 0x2921- f:00024 d: 289 | OR[289] = A
0x013A (0x000274) 0x100F- f:00010 d: 15 | A = 15 (0x000F)
0x013B (0x000276) 0x2922- f:00024 d: 290 | OR[290] = A
0x013C (0x000278) 0x7E03-0x0221 f:00077 d: 3 | R = OR[3]+545 (0x0221)
0x013E (0x00027C) 0x2125- f:00020 d: 293 | A = OR[293]
0x013F (0x00027E) 0x1409- f:00012 d: 9 | A = A + 9 (0x0009)
0x0140 (0x000280) 0x2908- f:00024 d: 264 | OR[264] = A
0x0141 (0x000282) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0142 (0x000284) 0x2920- f:00024 d: 288 | OR[288] = A
0x0143 (0x000286) 0x101C- f:00010 d: 28 | A = 28 (0x001C)
0x0144 (0x000288) 0x2921- f:00024 d: 289 | OR[289] = A
0x0145 (0x00028A) 0x1005- f:00010 d: 5 | A = 5 (0x0005)
0x0146 (0x00028C) 0x2922- f:00024 d: 290 | OR[290] = A
0x0147 (0x00028E) 0x1001- f:00010 d: 1 | A = 1 (0x0001)
0x0148 (0x000290) 0x2923- f:00024 d: 291 | OR[291] = A
0x0149 (0x000292) 0x7E03-0x025F f:00077 d: 3 | R = OR[3]+607 (0x025F)
0x014B (0x000296) 0x2125- f:00020 d: 293 | A = OR[293]
0x014C (0x000298) 0x1410- f:00012 d: 16 | A = A + 16 (0x0010)
0x014D (0x00029A) 0x2920- f:00024 d: 288 | OR[288] = A
0x014E (0x00029C) 0x1023- f:00010 d: 35 | A = 35 (0x0023)
0x014F (0x00029E) 0x2921- f:00024 d: 289 | OR[289] = A
0x0150 (0x0002A0) 0x1002- f:00010 d: 2 | A = 2 (0x0002)
0x0151 (0x0002A2) 0x2922- f:00024 d: 290 | OR[290] = A
0x0152 (0x0002A4) 0x7E03-0x0221 f:00077 d: 3 | R = OR[3]+545 (0x0221)
0x0154 (0x0002A8) 0x2125- f:00020 d: 293 | A = OR[293]
0x0155 (0x0002AA) 0x1411- f:00012 d: 17 | A = A + 17 (0x0011)
0x0156 (0x0002AC) 0x2920- f:00024 d: 288 | OR[288] = A
0x0157 (0x0002AE) 0x1026- f:00010 d: 38 | A = 38 (0x0026)
0x0158 (0x0002B0) 0x2921- f:00024 d: 289 | OR[289] = A
0x0159 (0x0002B2) 0x1002- f:00010 d: 2 | A = 2 (0x0002)
0x015A (0x0002B4) 0x2922- f:00024 d: 290 | OR[290] = A
0x015B (0x0002B6) 0x7E03-0x0221 f:00077 d: 3 | R = OR[3]+545 (0x0221)
0x015D (0x0002BA) 0x2125- f:00020 d: 293 | A = OR[293]
0x015E (0x0002BC) 0x140B- f:00012 d: 11 | A = A + 11 (0x000B)
0x015F (0x0002BE) 0x2908- f:00024 d: 264 | OR[264] = A
0x0160 (0x0002C0) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0161 (0x0002C2) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF)
0x0162 (0x0002C4) 0x2920- f:00024 d: 288 | OR[288] = A
0x0163 (0x0002C6) 0x102A- f:00010 d: 42 | A = 42 (0x002A)
0x0164 (0x0002C8) 0x2921- f:00024 d: 289 | OR[289] = A
0x0165 (0x0002CA) 0x1001- f:00010 d: 1 | A = 1 (0x0001)
0x0166 (0x0002CC) 0x2922- f:00024 d: 290 | OR[290] = A
0x0167 (0x0002CE) 0x1001- f:00010 d: 1 | A = 1 (0x0001)
0x0168 (0x0002D0) 0x2923- f:00024 d: 291 | OR[291] = A
0x0169 (0x0002D2) 0x7E03-0x025F f:00077 d: 3 | R = OR[3]+607 (0x025F)
0x016B (0x0002D6) 0x2125- f:00020 d: 293 | A = OR[293]
0x016C (0x0002D8) 0x1412- f:00012 d: 18 | A = A + 18 (0x0012)
0x016D (0x0002DA) 0x2920- f:00024 d: 288 | OR[288] = A
0x016E (0x0002DC) 0x102C- f:00010 d: 44 | A = 44 (0x002C)
0x016F (0x0002DE) 0x2921- f:00024 d: 289 | OR[289] = A
0x0170 (0x0002E0) 0x1003- f:00010 d: 3 | A = 3 (0x0003)
0x0171 (0x0002E2) 0x2922- f:00024 d: 290 | OR[290] = A
0x0172 (0x0002E4) 0x7E03-0x0221 f:00077 d: 3 | R = OR[3]+545 (0x0221)
0x0174 (0x0002E8) 0x2125- f:00020 d: 293 | A = OR[293]
0x0175 (0x0002EA) 0x140E- f:00012 d: 14 | A = A + 14 (0x000E)
0x0176 (0x0002EC) 0x2908- f:00024 d: 264 | OR[264] = A
0x0177 (0x0002EE) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0178 (0x0002F0) 0x2920- f:00024 d: 288 | OR[288] = A
0x0179 (0x0002F2) 0x1031- f:00010 d: 49 | A = 49 (0x0031)
0x017A (0x0002F4) 0x2921- f:00024 d: 289 | OR[289] = A
0x017B (0x0002F6) 0x1002- f:00010 d: 2 | A = 2 (0x0002)
0x017C (0x0002F8) 0x2922- f:00024 d: 290 | OR[290] = A
0x017D (0x0002FA) 0x1001- f:00010 d: 1 | A = 1 (0x0001)
0x017E (0x0002FC) 0x2923- f:00024 d: 291 | OR[291] = A
0x017F (0x0002FE) 0x7E03-0x025F f:00077 d: 3 | R = OR[3]+607 (0x025F)
0x0181 (0x000302) 0x102E- f:00010 d: 46 | A = 46 (0x002E)
0x0182 (0x000304) 0x2913- f:00024 d: 275 | OR[275] = A
0x0183 (0x000306) 0x2113- f:00020 d: 275 | A = OR[275]
0x0184 (0x000308) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF)
0x0185 (0x00030A) 0x290D- f:00024 d: 269 | OR[269] = A
0x0186 (0x00030C) 0x2121- f:00020 d: 289 | A = OR[289]
0x0187 (0x00030E) 0x0801- f:00004 d: 1 | A = A > 1 (0x0001)
0x0188 (0x000310) 0x2527- f:00022 d: 295 | A = A + OR[295]
0x0189 (0x000312) 0x290E- f:00024 d: 270 | OR[270] = A
0x018A (0x000314) 0x2121- f:00020 d: 289 | A = OR[289]
0x018B (0x000316) 0x1201- f:00011 d: 1 | A = A & 1 (0x0001)
0x018C (0x000318) 0x2908- f:00024 d: 264 | OR[264] = A
0x018D (0x00031A) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x018E (0x00031C) 0x2708- f:00023 d: 264 | A = A - OR[264]
0x018F (0x00031E) 0x8607- f:00103 d: 7 | P = P + 7 (0x0196), A # 0
0x0190 (0x000320) 0x310E- f:00030 d: 270 | A = (OR[270])
0x0191 (0x000322) 0x0A09- f:00005 d: 9 | A = A < 9 (0x0009)
0x0192 (0x000324) 0x250D- f:00022 d: 269 | A = A + OR[269]
0x0193 (0x000326) 0x0C09- f:00006 d: 9 | A = A >> 9 (0x0009)
0x0194 (0x000328) 0x390E- f:00034 d: 270 | (OR[270]) = A
0x0195 (0x00032A) 0x7006- f:00070 d: 6 | P = P + 6 (0x019B)
0x0196 (0x00032C) 0x310E- f:00030 d: 270 | A = (OR[270])
0x0197 (0x00032E) 0x1A00-0xFF00 f:00015 d: 0 | A = A & 65280 (0xFF00)
0x0199 (0x000332) 0x250D- f:00022 d: 269 | A = A + OR[269]
0x019A (0x000334) 0x390E- f:00034 d: 270 | (OR[270]) = A
0x019B (0x000336) 0x2D21- f:00026 d: 289 | OR[289] = OR[289] + 1
0x019C (0x000338) 0x2125- f:00020 d: 293 | A = OR[293]
0x019D (0x00033A) 0x140F- f:00012 d: 15 | A = A + 15 (0x000F)
0x019E (0x00033C) 0x2908- f:00024 d: 264 | OR[264] = A
0x019F (0x00033E) 0x3108- f:00030 d: 264 | A = (OR[264])
0x01A0 (0x000340) 0x2920- f:00024 d: 288 | OR[288] = A
0x01A1 (0x000342) 0x1003- f:00010 d: 3 | A = 3 (0x0003)
0x01A2 (0x000344) 0x2922- f:00024 d: 290 | OR[290] = A
0x01A3 (0x000346) 0x1002- f:00010 d: 2 | A = 2 (0x0002)
0x01A4 (0x000348) 0x2923- f:00024 d: 291 | OR[291] = A
0x01A5 (0x00034A) 0x7E03-0x025F f:00077 d: 3 | R = OR[3]+607 (0x025F)
0x01A7 (0x00034E) 0x2125- f:00020 d: 293 | A = OR[293]
0x01A8 (0x000350) 0x1418- f:00012 d: 24 | A = A + 24 (0x0018)
0x01A9 (0x000352) 0x2908- f:00024 d: 264 | OR[264] = A
0x01AA (0x000354) 0x3108- f:00030 d: 264 | A = (OR[264])
0x01AB (0x000356) 0x2920- f:00024 d: 288 | OR[288] = A
0x01AC (0x000358) 0x103F- f:00010 d: 63 | A = 63 (0x003F)
0x01AD (0x00035A) 0x2921- f:00024 d: 289 | OR[289] = A
0x01AE (0x00035C) 0x1005- f:00010 d: 5 | A = 5 (0x0005)
0x01AF (0x00035E) 0x2922- f:00024 d: 290 | OR[290] = A
0x01B0 (0x000360) 0x2120- f:00020 d: 288 | A = OR[288]
0x01B1 (0x000362) 0x8602- f:00103 d: 2 | P = P + 2 (0x01B3), A # 0
0x01B2 (0x000364) 0x7008- f:00070 d: 8 | P = P + 8 (0x01BA)
0x01B3 (0x000366) 0x1800-0x0329 f:00014 d: 0 | A = 809 (0x0329)
0x01B5 (0x00036A) 0x2403- f:00022 d: 3 | A = A + OR[3]
0x01B6 (0x00036C) 0x2920- f:00024 d: 288 | OR[288] = A
0x01B7 (0x00036E) 0x7E03-0x0221 f:00077 d: 3 | R = OR[3]+545 (0x0221)
0x01B9 (0x000372) 0x700A- f:00070 d: 10 | P = P + 10 (0x01C3)
0x01BA (0x000374) 0x2125- f:00020 d: 293 | A = OR[293]
0x01BB (0x000376) 0x1419- f:00012 d: 25 | A = A + 25 (0x0019)
0x01BC (0x000378) 0x2908- f:00024 d: 264 | OR[264] = A
0x01BD (0x00037A) 0x3108- f:00030 d: 264 | A = (OR[264])
0x01BE (0x00037C) 0x2920- f:00024 d: 288 | OR[288] = A
0x01BF (0x00037E) 0x1001- f:00010 d: 1 | A = 1 (0x0001)
0x01C0 (0x000380) 0x2923- f:00024 d: 291 | OR[291] = A
0x01C1 (0x000382) 0x7E03-0x025F f:00077 d: 3 | R = OR[3]+607 (0x025F)
0x01C3 (0x000386) 0x2125- f:00020 d: 293 | A = OR[293]
0x01C4 (0x000388) 0x141A- f:00012 d: 26 | A = A + 26 (0x001A)
0x01C5 (0x00038A) 0x2908- f:00024 d: 264 | OR[264] = A
0x01C6 (0x00038C) 0x3108- f:00030 d: 264 | A = (OR[264])
0x01C7 (0x00038E) 0x2920- f:00024 d: 288 | OR[288] = A
0x01C8 (0x000390) 0x1039- f:00010 d: 57 | A = 57 (0x0039)
0x01C9 (0x000392) 0x2921- f:00024 d: 289 | OR[289] = A
0x01CA (0x000394) 0x1005- f:00010 d: 5 | A = 5 (0x0005)
0x01CB (0x000396) 0x2922- f:00024 d: 290 | OR[290] = A
0x01CC (0x000398) 0x2120- f:00020 d: 288 | A = OR[288]
0x01CD (0x00039A) 0x8602- f:00103 d: 2 | P = P + 2 (0x01CF), A # 0
0x01CE (0x00039C) 0x7008- f:00070 d: 8 | P = P + 8 (0x01D6)
0x01CF (0x00039E) 0x1800-0x0329 f:00014 d: 0 | A = 809 (0x0329)
0x01D1 (0x0003A2) 0x2403- f:00022 d: 3 | A = A + OR[3]
0x01D2 (0x0003A4) 0x2920- f:00024 d: 288 | OR[288] = A
0x01D3 (0x0003A6) 0x7E03-0x0221 f:00077 d: 3 | R = OR[3]+545 (0x0221)
0x01D5 (0x0003AA) 0x700A- f:00070 d: 10 | P = P + 10 (0x01DF)
0x01D6 (0x0003AC) 0x2125- f:00020 d: 293 | A = OR[293]
0x01D7 (0x0003AE) 0x141B- f:00012 d: 27 | A = A + 27 (0x001B)
0x01D8 (0x0003B0) 0x2908- f:00024 d: 264 | OR[264] = A
0x01D9 (0x0003B2) 0x3108- f:00030 d: 264 | A = (OR[264])
0x01DA (0x0003B4) 0x2920- f:00024 d: 288 | OR[288] = A
0x01DB (0x0003B6) 0x1001- f:00010 d: 1 | A = 1 (0x0001)
0x01DC (0x0003B8) 0x2923- f:00024 d: 291 | OR[291] = A
0x01DD (0x0003BA) 0x7E03-0x025F f:00077 d: 3 | R = OR[3]+607 (0x025F)
0x01DF (0x0003BE) 0x2125- f:00020 d: 293 | A = OR[293]
0x01E0 (0x0003C0) 0x1414- f:00012 d: 20 | A = A + 20 (0x0014)
0x01E1 (0x0003C2) 0x2920- f:00024 d: 288 | OR[288] = A
0x01E2 (0x0003C4) 0x1046- f:00010 d: 70 | A = 70 (0x0046)
0x01E3 (0x0003C6) 0x2921- f:00024 d: 289 | OR[289] = A
0x01E4 (0x0003C8) 0x1008- f:00010 d: 8 | A = 8 (0x0008)
0x01E5 (0x0003CA) 0x2922- f:00024 d: 290 | OR[290] = A
0x01E6 (0x0003CC) 0x7E03-0x0221 f:00077 d: 3 | R = OR[3]+545 (0x0221)
0x01E8 (0x0003D0) 0x7E03-0x027B f:00077 d: 3 | R = OR[3]+635 (0x027B)
0x01EA (0x0003D4) 0x72D2- f:00071 d: 210 | P = P - 210 (0x0118)
0x01EB (0x0003D6) 0x2F04- f:00027 d: 260 | OR[260] = OR[260] - 1
0x01EC (0x0003D8) 0x3104- f:00030 d: 260 | A = (OR[260])
0x01ED (0x0003DA) 0x2904- f:00024 d: 260 | OR[260] = A
0x01EE (0x0003DC) 0x2104- f:00020 d: 260 | A = OR[260]
0x01EF (0x0003DE) 0x2706- f:00023 d: 262 | A = A - OR[262]
0x01F0 (0x0003E0) 0x8007- f:00100 d: 7 | P = P + 7 (0x01F7), C = 0
0x01F1 (0x0003E2) 0x2104- f:00020 d: 260 | A = OR[260]
0x01F2 (0x0003E4) 0x2705- f:00023 d: 261 | A = A - OR[261]
0x01F3 (0x0003E6) 0x8003- f:00100 d: 3 | P = P + 3 (0x01F6), C = 0
0x01F4 (0x0003E8) 0x8402- f:00102 d: 2 | P = P + 2 (0x01F6), A = 0
0x01F5 (0x0003EA) 0x7002- f:00070 d: 2 | P = P + 2 (0x01F7)
0x01F6 (0x0003EC) 0x7003- f:00070 d: 3 | P = P + 3 (0x01F9)
0x01F7 (0x0003EE) 0x7C34- f:00076 d: 52 | R = OR[52]
0x01F8 (0x0003F0) 0x000B- f:00000 d: 11 | PASS | **** non-standard encoding with D:0x000B ****
0x01F9 (0x0003F2) 0x1800-0x0322 f:00014 d: 0 | A = 802 (0x0322)
0x01FB (0x0003F6) 0x2403- f:00022 d: 3 | A = A + OR[3]
0x01FC (0x0003F8) 0x2920- f:00024 d: 288 | OR[288] = A
0x01FD (0x0003FA) 0x1024- f:00010 d: 36 | A = 36 (0x0024)
0x01FE (0x0003FC) 0x2921- f:00024 d: 289 | OR[289] = A
0x01FF (0x0003FE) 0x100C- f:00010 d: 12 | A = 12 (0x000C)
0x0200 (0x000400) 0x2922- f:00024 d: 290 | OR[290] = A
0x0201 (0x000402) 0x741A- f:00072 d: 26 | R = P + 26 (0x021B)
0x0202 (0x000404) 0x2128- f:00020 d: 296 | A = OR[296]
0x0203 (0x000406) 0x2729- f:00023 d: 297 | A = A - OR[297]
0x0204 (0x000408) 0x8403- f:00102 d: 3 | P = P + 3 (0x0207), A = 0
0x0205 (0x00040A) 0x7470- f:00072 d: 112 | R = P + 112 (0x0275)
0x0206 (0x00040C) 0x7204- f:00071 d: 4 | P = P - 4 (0x0202)
0x0207 (0x00040E) 0x2F04- f:00027 d: 260 | OR[260] = OR[260] - 1
0x0208 (0x000410) 0x3104- f:00030 d: 260 | A = (OR[260])
0x0209 (0x000412) 0x2904- f:00024 d: 260 | OR[260] = A
0x020A (0x000414) 0x2104- f:00020 d: 260 | A = OR[260]
0x020B (0x000416) 0x2706- f:00023 d: 262 | A = A - OR[262]
0x020C (0x000418) 0x8007- f:00100 d: 7 | P = P + 7 (0x0213), C = 0
0x020D (0x00041A) 0x2104- f:00020 d: 260 | A = OR[260]
0x020E (0x00041C) 0x2705- f:00023 d: 261 | A = A - OR[261]
0x020F (0x00041E) 0x8003- f:00100 d: 3 | P = P + 3 (0x0212), C = 0
0x0210 (0x000420) 0x8402- f:00102 d: 2 | P = P + 2 (0x0212), A = 0
0x0211 (0x000422) 0x7002- f:00070 d: 2 | P = P + 2 (0x0213)
0x0212 (0x000424) 0x7003- f:00070 d: 3 | P = P + 3 (0x0215)
0x0213 (0x000426) 0x7C34- f:00076 d: 52 | R = OR[52]
0x0214 (0x000428) 0x000B- f:00000 d: 11 | PASS | **** non-standard encoding with D:0x000B ****
0x0215 (0x00042A) 0x102A- f:00010 d: 42 | A = 42 (0x002A)
0x0216 (0x00042C) 0x292A- f:00024 d: 298 | OR[298] = A
0x0217 (0x00042E) 0x112A- f:00010 d: 298 | A = 298 (0x012A)
0x0218 (0x000430) 0x5800- f:00054 d: 0 | B = A
0x0219 (0x000432) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x021A (0x000434) 0x7C09- f:00076 d: 9 | R = OR[9]
0x021B (0x000436) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x021C (0x000438) 0x2914- f:00024 d: 276 | OR[276] = A
0x021D (0x00043A) 0x2122- f:00020 d: 290 | A = OR[290]
0x021E (0x00043C) 0x843A- f:00102 d: 58 | P = P + 58 (0x0258), A = 0
0x021F (0x00043E) 0x2114- f:00020 d: 276 | A = OR[276]
0x0220 (0x000440) 0x0801- f:00004 d: 1 | A = A > 1 (0x0001)
0x0221 (0x000442) 0x2520- f:00022 d: 288 | A = A + OR[288]
0x0222 (0x000444) 0x290D- f:00024 d: 269 | OR[269] = A
0x0223 (0x000446) 0x310D- f:00030 d: 269 | A = (OR[269])
0x0224 (0x000448) 0x290D- f:00024 d: 269 | OR[269] = A
0x0225 (0x00044A) 0x2114- f:00020 d: 276 | A = OR[276]
0x0226 (0x00044C) 0x1201- f:00011 d: 1 | A = A & 1 (0x0001)
0x0227 (0x00044E) 0x2908- f:00024 d: 264 | OR[264] = A
0x0228 (0x000450) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0229 (0x000452) 0x2708- f:00023 d: 264 | A = A - OR[264]
0x022A (0x000454) 0x8604- f:00103 d: 4 | P = P + 4 (0x022E), A # 0
0x022B (0x000456) 0x210D- f:00020 d: 269 | A = OR[269]
0x022C (0x000458) 0x0808- f:00004 d: 8 | A = A > 8 (0x0008)
0x022D (0x00045A) 0x290D- f:00024 d: 269 | OR[269] = A
0x022E (0x00045C) 0x210D- f:00020 d: 269 | A = OR[269]
0x022F (0x00045E) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF)
0x0230 (0x000460) 0x2913- f:00024 d: 275 | OR[275] = A
0x0231 (0x000462) 0x2D14- f:00026 d: 276 | OR[276] = OR[276] + 1
0x0232 (0x000464) 0x2113- f:00020 d: 275 | A = OR[275]
0x0233 (0x000466) 0x1620- f:00013 d: 32 | A = A - 32 (0x0020)
0x0234 (0x000468) 0x8007- f:00100 d: 7 | P = P + 7 (0x023B), C = 0
0x0235 (0x00046A) 0x2113- f:00020 d: 275 | A = OR[275]
0x0236 (0x00046C) 0x167E- f:00013 d: 126 | A = A - 126 (0x007E)
0x0237 (0x00046E) 0x8003- f:00100 d: 3 | P = P + 3 (0x023A), C = 0
0x0238 (0x000470) 0x8402- f:00102 d: 2 | P = P + 2 (0x023A), A = 0
0x0239 (0x000472) 0x7002- f:00070 d: 2 | P = P + 2 (0x023B)
0x023A (0x000474) 0x7003- f:00070 d: 3 | P = P + 3 (0x023D)
0x023B (0x000476) 0x1020- f:00010 d: 32 | A = 32 (0x0020)
0x023C (0x000478) 0x2913- f:00024 d: 275 | OR[275] = A
0x023D (0x00047A) 0x2113- f:00020 d: 275 | A = OR[275]
0x023E (0x00047C) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF)
0x023F (0x00047E) 0x290D- f:00024 d: 269 | OR[269] = A
0x0240 (0x000480) 0x2121- f:00020 d: 289 | A = OR[289]
0x0241 (0x000482) 0x0801- f:00004 d: 1 | A = A > 1 (0x0001)
0x0242 (0x000484) 0x2527- f:00022 d: 295 | A = A + OR[295]
0x0243 (0x000486) 0x290E- f:00024 d: 270 | OR[270] = A
0x0244 (0x000488) 0x2121- f:00020 d: 289 | A = OR[289]
0x0245 (0x00048A) 0x1201- f:00011 d: 1 | A = A & 1 (0x0001)
0x0246 (0x00048C) 0x2908- f:00024 d: 264 | OR[264] = A
0x0247 (0x00048E) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0248 (0x000490) 0x2708- f:00023 d: 264 | A = A - OR[264]
0x0249 (0x000492) 0x8607- f:00103 d: 7 | P = P + 7 (0x0250), A # 0
0x024A (0x000494) 0x310E- f:00030 d: 270 | A = (OR[270])
0x024B (0x000496) 0x0A09- f:00005 d: 9 | A = A < 9 (0x0009)
0x024C (0x000498) 0x250D- f:00022 d: 269 | A = A + OR[269]
0x024D (0x00049A) 0x0C09- f:00006 d: 9 | A = A >> 9 (0x0009)
0x024E (0x00049C) 0x390E- f:00034 d: 270 | (OR[270]) = A
0x024F (0x00049E) 0x7006- f:00070 d: 6 | P = P + 6 (0x0255)
0x0250 (0x0004A0) 0x310E- f:00030 d: 270 | A = (OR[270])
0x0251 (0x0004A2) 0x1A00-0xFF00 f:00015 d: 0 | A = A & 65280 (0xFF00)
0x0253 (0x0004A6) 0x250D- f:00022 d: 269 | A = A + OR[269]
0x0254 (0x0004A8) 0x390E- f:00034 d: 270 | (OR[270]) = A
0x0255 (0x0004AA) 0x2D21- f:00026 d: 289 | OR[289] = OR[289] + 1
0x0256 (0x0004AC) 0x2F22- f:00027 d: 290 | OR[290] = OR[290] - 1
0x0257 (0x0004AE) 0x723A- f:00071 d: 58 | P = P - 58 (0x021D)
0x0258 (0x0004B0) 0x0200- f:00001 d: 0 | EXIT
0x0259 (0x0004B2) 0x2120- f:00020 d: 288 | A = OR[288]
0x025A (0x0004B4) 0x3926- f:00034 d: 294 | (OR[294]) = A
0x025B (0x0004B6) 0x1028- f:00010 d: 40 | A = 40 (0x0028)
0x025C (0x0004B8) 0x292A- f:00024 d: 298 | OR[298] = A
0x025D (0x0004BA) 0x1800-0x000F f:00014 d: 0 | A = 15 (0x000F)
0x025F (0x0004BE) 0x292B- f:00024 d: 299 | OR[299] = A
0x0260 (0x0004C0) 0x2126- f:00020 d: 294 | A = OR[294]
0x0261 (0x0004C2) 0x292C- f:00024 d: 300 | OR[300] = A
0x0262 (0x0004C4) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0263 (0x0004C6) 0x292D- f:00024 d: 301 | OR[301] = A
0x0264 (0x0004C8) 0x1010- f:00010 d: 16 | A = 16 (0x0010)
0x0265 (0x0004CA) 0x292E- f:00024 d: 302 | OR[302] = A
0x0266 (0x0004CC) 0x2127- f:00020 d: 295 | A = OR[295]
0x0267 (0x0004CE) 0x292F- f:00024 d: 303 | OR[303] = A
0x0268 (0x0004D0) 0x2121- f:00020 d: 289 | A = OR[289]
0x0269 (0x0004D2) 0x2930- f:00024 d: 304 | OR[304] = A
0x026A (0x0004D4) 0x2123- f:00020 d: 291 | A = OR[291]
0x026B (0x0004D6) 0x2931- f:00024 d: 305 | OR[305] = A
0x026C (0x0004D8) 0x2122- f:00020 d: 290 | A = OR[290]
0x026D (0x0004DA) 0x2932- f:00024 d: 306 | OR[306] = A
0x026E (0x0004DC) 0x112A- f:00010 d: 298 | A = 298 (0x012A)
0x026F (0x0004DE) 0x5800- f:00054 d: 0 | B = A
0x0270 (0x0004E0) 0x1800-0x2518 f:00014 d: 0 | A = 9496 (0x2518)
0x0272 (0x0004E4) 0x7C09- f:00076 d: 9 | R = OR[9]
0x0273 (0x0004E6) 0x2921- f:00024 d: 289 | OR[289] = A
0x0274 (0x0004E8) 0x0200- f:00001 d: 0 | EXIT
0x0275 (0x0004EA) 0x1028- f:00010 d: 40 | A = 40 (0x0028)
0x0276 (0x0004EC) 0x292A- f:00024 d: 298 | OR[298] = A
0x0277 (0x0004EE) 0x1800-0x0123 f:00014 d: 0 | A = 291 (0x0123)
0x0279 (0x0004F2) 0x292B- f:00024 d: 299 | OR[299] = A
0x027A (0x0004F4) 0x1800-0x0005 f:00014 d: 0 | A = 5 (0x0005)
0x027C (0x0004F8) 0x292C- f:00024 d: 300 | OR[300] = A
0x027D (0x0004FA) 0x2128- f:00020 d: 296 | A = OR[296]
0x027E (0x0004FC) 0x292D- f:00024 d: 301 | OR[301] = A
0x027F (0x0004FE) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0280 (0x000500) 0x292E- f:00024 d: 302 | OR[302] = A
0x0281 (0x000502) 0x2127- f:00020 d: 295 | A = OR[295]
0x0282 (0x000504) 0x292F- f:00024 d: 303 | OR[303] = A
0x0283 (0x000506) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0284 (0x000508) 0x2930- f:00024 d: 304 | OR[304] = A
0x0285 (0x00050A) 0x1028- f:00010 d: 40 | A = 40 (0x0028)
0x0286 (0x00050C) 0x0A01- f:00005 d: 1 | A = A < 1 (0x0001)
0x0287 (0x00050E) 0x2931- f:00024 d: 305 | OR[305] = A
0x0288 (0x000510) 0x112A- f:00010 d: 298 | A = 298 (0x012A)
0x0289 (0x000512) 0x5800- f:00054 d: 0 | B = A
0x028A (0x000514) 0x1800-0x2518 f:00014 d: 0 | A = 9496 (0x2518)
0x028C (0x000518) 0x7C09- f:00076 d: 9 | R = OR[9]
0x028D (0x00051A) 0x2D28- f:00026 d: 296 | OR[296] = OR[296] + 1
0x028E (0x00051C) 0x7402- f:00072 d: 2 | R = P + 2 (0x0290)
0x028F (0x00051E) 0x0200- f:00001 d: 0 | EXIT
0x0290 (0x000520) 0x2127- f:00020 d: 295 | A = OR[295]
0x0291 (0x000522) 0x290E- f:00024 d: 270 | OR[270] = A
0x0292 (0x000524) 0x1028- f:00010 d: 40 | A = 40 (0x0028)
0x0293 (0x000526) 0x290D- f:00024 d: 269 | OR[269] = A
0x0294 (0x000528) 0x210D- f:00020 d: 269 | A = OR[269]
0x0295 (0x00052A) 0x8407- f:00102 d: 7 | P = P + 7 (0x029C), A = 0
0x0296 (0x00052C) 0x1800-0x2020 f:00014 d: 0 | A = 8224 (0x2020)
0x0298 (0x000530) 0x390E- f:00034 d: 270 | (OR[270]) = A
0x0299 (0x000532) 0x2F0D- f:00027 d: 269 | OR[269] = OR[269] - 1
0x029A (0x000534) 0x2D0E- f:00026 d: 270 | OR[270] = OR[270] + 1
0x029B (0x000536) 0x7207- f:00071 d: 7 | P = P - 7 (0x0294)
0x029C (0x000538) 0x0200- f:00001 d: 0 | EXIT
0x029D (0x00053A) 0x1026- f:00010 d: 38 | A = 38 (0x0026)
0x029E (0x00053C) 0x292A- f:00024 d: 298 | OR[298] = A
0x029F (0x00053E) 0x2118- f:00020 d: 280 | A = OR[280]
0x02A0 (0x000540) 0x292B- f:00024 d: 299 | OR[299] = A
0x02A1 (0x000542) 0x2119- f:00020 d: 281 | A = OR[281]
0x02A2 (0x000544) 0x292C- f:00024 d: 300 | OR[300] = A
0x02A3 (0x000546) 0x2125- f:00020 d: 293 | A = OR[293]
0x02A4 (0x000548) 0x292D- f:00024 d: 301 | OR[301] = A
0x02A5 (0x00054A) 0x2124- f:00020 d: 292 | A = OR[292]
0x02A6 (0x00054C) 0x292E- f:00024 d: 302 | OR[302] = A
0x02A7 (0x00054E) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x02A8 (0x000550) 0x292F- f:00024 d: 303 | OR[303] = A
0x02A9 (0x000552) 0x112A- f:00010 d: 298 | A = 298 (0x012A)
0x02AA (0x000554) 0x5800- f:00054 d: 0 | B = A
0x02AB (0x000556) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x02AC (0x000558) 0x7C09- f:00076 d: 9 | R = OR[9]
0x02AD (0x00055A) 0x2119- f:00020 d: 281 | A = OR[281]
0x02AE (0x00055C) 0x2524- f:00022 d: 292 | A = A + OR[292]
0x02AF (0x00055E) 0x2919- f:00024 d: 281 | OR[281] = A
0x02B0 (0x000560) 0x8002- f:00100 d: 2 | P = P + 2 (0x02B2), C = 0
0x02B1 (0x000562) 0x2D18- f:00026 d: 280 | OR[280] = OR[280] + 1
0x02B2 (0x000564) 0x211A- f:00020 d: 282 | A = OR[282]
0x02B3 (0x000566) 0x2724- f:00023 d: 292 | A = A - OR[292]
0x02B4 (0x000568) 0x291A- f:00024 d: 282 | OR[282] = A
0x02B5 (0x00056A) 0x0200- f:00001 d: 0 | EXIT
0x02B6 (0x00056C) 0x5354- f:00051 d: 340 | A = A & B | **** non-standard encoding with D:0x0154 ****
0x02B7 (0x00056E) 0x5245- f:00051 d: 69 | A = A & B | **** non-standard encoding with D:0x0045 ****
0x02B8 (0x000570) 0x414D- f:00040 d: 333 | C = 1, io 0515 = DN
0x02B9 (0x000572) 0x2053- f:00020 d: 83 | A = OR[83]
0x02BA (0x000574) 0x5441- f:00052 d: 65 | A = A + B | **** non-standard encoding with D:0x0041 ****
0x02BB (0x000576) 0x5455- f:00052 d: 85 | A = A + B | **** non-standard encoding with D:0x0055 ****
0x02BC (0x000578) 0x5320- f:00051 d: 288 | A = A & B | **** non-standard encoding with D:0x0120 ****
0x02BD (0x00057A) 0x4449- f:00042 d: 73 | C = 1, IOB = DN | **** non-standard encoding with D:0x0049 ****
0x02BE (0x00057C) 0x5350- f:00051 d: 336 | A = A & B | **** non-standard encoding with D:0x0150 ****
0x02BF (0x00057E) 0x4C41- f:00046 d: 65 | A = A >> B | **** non-standard encoding with D:0x0041 ****
0x02C0 (0x000580) 0x5900- f:00054 d: 256 | B = A | **** non-standard encoding with D:0x0100 ****
0x02C1 (0x000582) 0x4652- f:00043 d: 82 | C = 1, IOB = BZ | **** non-standard encoding with D:0x0052 ****
0x02C2 (0x000584) 0x414D- f:00040 d: 333 | C = 1, io 0515 = DN
0x02C3 (0x000586) 0x453A- f:00042 d: 314 | C = 1, IOB = DN | **** non-standard encoding with D:0x013A ****
0x02C4 (0x000588) 0x0000- f:00000 d: 0 | PASS
0x02C5 (0x00058A) 0x5241- f:00051 d: 65 | A = A & B | **** non-standard encoding with D:0x0041 ****
0x02C6 (0x00058C) 0x5445- f:00052 d: 69 | A = A + B | **** non-standard encoding with D:0x0045 ****
0x02C7 (0x00058E) 0x3A00- f:00035 d: 0 | (OR[0]) = A + (OR[0])
0x02C8 (0x000590) 0x424C- f:00041 d: 76 | C = 1, io 0114 = BZ
0x02C9 (0x000592) 0x4F43- f:00047 d: 323 | A = A << B | **** non-standard encoding with D:0x0143 ****
0x02CA (0x000594) 0x4B53- f:00045 d: 339 | A = A < B | **** non-standard encoding with D:0x0153 ****
0x02CB (0x000596) 0x0000- f:00000 d: 0 | PASS
0x02CC (0x000598) 0x4944- f:00044 d: 324 | A = A > B | **** non-standard encoding with D:0x0144 ****
0x02CD (0x00059A) 0x2020- f:00020 d: 32 | A = OR[32]
0x02CE (0x00059C) 0x2044- f:00020 d: 68 | A = OR[68]
0x02CF (0x00059E) 0x5351- f:00051 d: 337 | A = A & B | **** non-standard encoding with D:0x0151 ****
0x02D0 (0x0005A0) 0x2020- f:00020 d: 32 | A = OR[32]
0x02D1 (0x0005A2) 0x2020- f:00020 d: 32 | A = OR[32]
0x02D2 (0x0005A4) 0x2020- f:00020 d: 32 | A = OR[32]
0x02D3 (0x0005A6) 0x2044- f:00020 d: 68 | A = OR[68]
0x02D4 (0x0005A8) 0x4154- f:00040 d: 340 | C = 1, io 0524 = DN
0x02D5 (0x0005AA) 0x4153- f:00040 d: 339 | C = 1, io 0523 = DN
0x02D6 (0x0005AC) 0x4554- f:00042 d: 340 | C = 1, IOB = DN | **** non-standard encoding with D:0x0154 ****
0x02D7 (0x0005AE) 0x2020- f:00020 d: 32 | A = OR[32]
0x02D8 (0x0005B0) 0x2020- f:00020 d: 32 | A = OR[32]
0x02D9 (0x0005B2) 0x2020- f:00020 d: 32 | A = OR[32]
0x02DA (0x0005B4) 0x204A- f:00020 d: 74 | A = OR[74]
0x02DB (0x0005B6) 0x5351- f:00051 d: 337 | A = A & B | **** non-standard encoding with D:0x0151 ****
0x02DC (0x0005B8) 0x2020- f:00020 d: 32 | A = OR[32]
0x02DD (0x0005BA) 0x2044- f:00020 d: 68 | A = OR[68]
0x02DE (0x0005BC) 0x4320- f:00041 d: 288 | C = 1, io 0440 = BZ
0x02DF (0x0005BE) 0x4446- f:00042 d: 70 | C = 1, IOB = DN | **** non-standard encoding with D:0x0046 ****
0x02E0 (0x0005C0) 0x2020- f:00020 d: 32 | A = OR[32]
0x02E1 (0x0005C2) 0x5354- f:00051 d: 340 | A = A & B | **** non-standard encoding with D:0x0154 ****
0x02E2 (0x0005C4) 0x524D- f:00051 d: 77 | A = A & B | **** non-standard encoding with D:0x004D ****
0x02E3 (0x0005C6) 0x2020- f:00020 d: 32 | A = OR[32]
0x02E4 (0x0005C8) 0x204D- f:00020 d: 77 | A = OR[77]
0x02E5 (0x0005CA) 0x4249- f:00041 d: 73 | C = 1, io 0111 = BZ
0x02E6 (0x0005CC) 0x542F- f:00052 d: 47 | A = A + B | **** non-standard encoding with D:0x002F ****
0x02E7 (0x0005CE) 0x5320- f:00051 d: 288 | A = A & B | **** non-standard encoding with D:0x0120 ****
0x02E8 (0x0005D0) 0x2043- f:00020 d: 67 | A = OR[67]
0x02E9 (0x0005D2) 0x5552- f:00052 d: 338 | A = A + B | **** non-standard encoding with D:0x0152 ****
0x02EA (0x0005D4) 0x5220- f:00051 d: 32 | A = A & B | **** non-standard encoding with D:0x0020 ****
0x02EB (0x0005D6) 0x2054- f:00020 d: 84 | A = OR[84]
0x02EC (0x0005D8) 0x4F54- f:00047 d: 340 | A = A << B | **** non-standard encoding with D:0x0154 ****
0x02ED (0x0005DA) 0x414C- f:00040 d: 332 | C = 1, io 0514 = DN
0x02EE (0x0005DC) 0x2020- f:00020 d: 32 | A = OR[32]
0x02EF (0x0005DE) 0x4455- f:00042 d: 85 | C = 1, IOB = DN | **** non-standard encoding with D:0x0055 ****
0x02F0 (0x0005E0) 0x5241- f:00051 d: 65 | A = A & B | **** non-standard encoding with D:0x0041 ****
0x02F1 (0x0005E2) 0x5449- f:00052 d: 73 | A = A + B | **** non-standard encoding with D:0x0049 ****
0x02F2 (0x0005E4) 0x4F4E- f:00047 d: 334 | A = A << B | **** non-standard encoding with D:0x014E ****
0x02F3 (0x0005E6) 0x0000- f:00000 d: 0 | PASS
0x02F4 (0x0005E8) 0x2D2D- f:00026 d: 301 | OR[301] = OR[301] + 1
0x02F5 (0x0005EA) 0x2020- f:00020 d: 32 | A = OR[32]
0x02F6 (0x0005EC) 0x2D2D- f:00026 d: 301 | OR[301] = OR[301] + 1
0x02F7 (0x0005EE) 0x2D2D- f:00026 d: 301 | OR[301] = OR[301] + 1
0x02F8 (0x0005F0) 0x2D20- f:00026 d: 288 | OR[288] = OR[288] + 1
0x02F9 (0x0005F2) 0x202D- f:00020 d: 45 | A = OR[45]
0x02FA (0x0005F4) 0x2D2D- f:00026 d: 301 | OR[301] = OR[301] + 1
0x02FB (0x0005F6) 0x2D2D- f:00026 d: 301 | OR[301] = OR[301] + 1
0x02FC (0x0005F8) 0x2D2D- f:00026 d: 301 | OR[301] = OR[301] + 1
0x02FD (0x0005FA) 0x2D2D- f:00026 d: 301 | OR[301] = OR[301] + 1
0x02FE (0x0005FC) 0x2D2D- f:00026 d: 301 | OR[301] = OR[301] + 1
0x02FF (0x0005FE) 0x2D2D- f:00026 d: 301 | OR[301] = OR[301] + 1
0x0300 (0x000600) 0x2D2D- f:00026 d: 301 | OR[301] = OR[301] + 1
0x0301 (0x000602) 0x2020- f:00020 d: 32 | A = OR[32]
0x0302 (0x000604) 0x2D2D- f:00026 d: 301 | OR[301] = OR[301] + 1
0x0303 (0x000606) 0x2D2D- f:00026 d: 301 | OR[301] = OR[301] + 1
0x0304 (0x000608) 0x2D20- f:00026 d: 288 | OR[288] = OR[288] + 1
0x0305 (0x00060A) 0x202D- f:00020 d: 45 | A = OR[45]
0x0306 (0x00060C) 0x2D20- f:00026 d: 288 | OR[288] = OR[288] + 1
0x0307 (0x00060E) 0x2D2D- f:00026 d: 301 | OR[301] = OR[301] + 1
0x0308 (0x000610) 0x2020- f:00020 d: 32 | A = OR[32]
0x0309 (0x000612) 0x2D2D- f:00026 d: 301 | OR[301] = OR[301] + 1
0x030A (0x000614) 0x2D2D- f:00026 d: 301 | OR[301] = OR[301] + 1
0x030B (0x000616) 0x2D20- f:00026 d: 288 | OR[288] = OR[288] + 1
0x030C (0x000618) 0x202D- f:00020 d: 45 | A = OR[45]
0x030D (0x00061A) 0x2D2D- f:00026 d: 301 | OR[301] = OR[301] + 1
0x030E (0x00061C) 0x2D2D- f:00026 d: 301 | OR[301] = OR[301] + 1
0x030F (0x00061E) 0x2D20- f:00026 d: 288 | OR[288] = OR[288] + 1
0x0310 (0x000620) 0x202D- f:00020 d: 45 | A = OR[45]
0x0311 (0x000622) 0x2D2D- f:00026 d: 301 | OR[301] = OR[301] + 1
0x0312 (0x000624) 0x2D2D- f:00026 d: 301 | OR[301] = OR[301] + 1
0x0313 (0x000626) 0x202D- f:00020 d: 45 | A = OR[45]
0x0314 (0x000628) 0x2D2D- f:00026 d: 301 | OR[301] = OR[301] + 1
0x0315 (0x00062A) 0x2D2D- f:00026 d: 301 | OR[301] = OR[301] + 1
0x0316 (0x00062C) 0x2020- f:00020 d: 32 | A = OR[32]
0x0317 (0x00062E) 0x2D2D- f:00026 d: 301 | OR[301] = OR[301] + 1
0x0318 (0x000630) 0x2D2D- f:00026 d: 301 | OR[301] = OR[301] + 1
0x0319 (0x000632) 0x2D2D- f:00026 d: 301 | OR[301] = OR[301] + 1
0x031A (0x000634) 0x2D2D- f:00026 d: 301 | OR[301] = OR[301] + 1
0x031B (0x000636) 0x0000- f:00000 d: 0 | PASS
0x031C (0x000638) 0x454E- f:00042 d: 334 | C = 1, IOB = DN | **** non-standard encoding with D:0x014E ****
0x031D (0x00063A) 0x4420- f:00042 d: 32 | C = 1, IOB = DN | **** non-standard encoding with D:0x0020 ****
0x031E (0x00063C) 0x4F46- f:00047 d: 326 | A = A << B | **** non-standard encoding with D:0x0146 ****
0x031F (0x00063E) 0x2044- f:00020 d: 68 | A = OR[68]
0x0320 (0x000640) 0x4154- f:00040 d: 340 | C = 1, io 0524 = DN
0x0321 (0x000642) 0x412E- f:00040 d: 302 | C = 1, io 0456 = DN
0x0322 (0x000644) 0x0000- f:00000 d: 0 | PASS
0x0323 (0x000646) 0x2A2A- f:00025 d: 42 | OR[42] = A + OR[42]
0x0324 (0x000648) 0x2A2A- f:00025 d: 42 | OR[42] = A + OR[42]
0x0325 (0x00064A) 0x2A00- f:00025 d: 0 | OR[0] = A + OR[0]
0x0326 (0x00064C) 0x204D- f:00020 d: 77 | A = OR[77]
0x0327 (0x00064E) 0x4249- f:00041 d: 73 | C = 1, io 0111 = BZ
0x0328 (0x000650) 0x542F- f:00052 d: 47 | A = A + B | **** non-standard encoding with D:0x002F ****
0x0329 (0x000652) 0x5300- f:00051 d: 256 | A = A & B | **** non-standard encoding with D:0x0100 ****
0x032A (0x000654) 0x0000- f:00000 d: 0 | PASS
0x032B (0x000656) 0x0000- f:00000 d: 0 | PASS
| 82.571049
| 127
| 0.471114
|
22509169639724577d8a68e53499ceea7383b9bb
| 14
|
asm
|
Assembly
|
tests/once/once.asm
|
dommilosz/customasm
|
d2c55b52d64ea47f5cdb91cd8ec463f37ccadf32
|
[
"Apache-2.0"
] | null | null | null |
tests/once/once.asm
|
dommilosz/customasm
|
d2c55b52d64ea47f5cdb91cd8ec463f37ccadf32
|
[
"Apache-2.0"
] | null | null | null |
tests/once/once.asm
|
dommilosz/customasm
|
d2c55b52d64ea47f5cdb91cd8ec463f37ccadf32
|
[
"Apache-2.0"
] | null | null | null |
#once
#d8 0xCD
| 7
| 8
| 0.714286
|
c614d638f43a0a186e9199179ee09d140d437273
| 2,684
|
asm
|
Assembly
|
engine/battle/scale_sprites.asm
|
adhi-thirumala/EvoYellow
|
6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c
|
[
"Unlicense"
] | 16
|
2018-08-28T21:47:01.000Z
|
2022-02-20T20:29:59.000Z
|
engine/battle/scale_sprites.asm
|
adhi-thirumala/EvoYellow
|
6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c
|
[
"Unlicense"
] | 5
|
2019-04-03T19:53:11.000Z
|
2022-03-11T22:49:34.000Z
|
engine/battle/scale_sprites.asm
|
adhi-thirumala/EvoYellow
|
6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c
|
[
"Unlicense"
] | 2
|
2019-12-09T19:46:02.000Z
|
2020-12-05T21:36:30.000Z
|
; scales both uncompressed sprite chunks by two in every dimension (creating 2x2 output pixels per input pixel)
; assumes that input sprite chunks are 4x4 tiles, and the rightmost and bottommost 4 pixels will be ignored
; resulting in a 7*7 tile output sprite chunk
ScaleSpriteByTwo:
ld a, $0
call SwitchSRAMBankAndLatchClockData
call ScaleSpriteByTwo_
call PrepareRTCDataAndDisableSRAM
ret
ScaleSpriteByTwo_:
ld de, sSpriteBuffer1 + (4*4*8) - 5 ; last byte of input data, last 4 rows already skipped
ld hl, sSpriteBuffer0 + SPRITEBUFFERSIZE - 1 ; end of destination buffer
call ScaleLastSpriteColumnByTwo ; last tile column is special case
call ScaleFirstThreeSpriteColumnsByTwo ; scale first 3 tile columns
ld de, sSpriteBuffer2 + (4*4*8) - 5 ; last byte of input data, last 4 rows already skipped
ld hl, sSpriteBuffer1 + SPRITEBUFFERSIZE - 1 ; end of destination buffer
call ScaleLastSpriteColumnByTwo ; last tile column is special case
ScaleFirstThreeSpriteColumnsByTwo:
ld b, $3 ; 3 tile columns
.columnLoop
ld c, 4*8 - 4 ; $1c, 4 tiles minus 4 unused rows
.columnInnerLoop
push bc
ld a, [de]
ld bc, -(7*8)+1 ; $ffc9, scale lower nybble and seek to previous output column
call ScalePixelsByTwo
ld a, [de]
dec de
swap a
ld bc, 7*8+1-2 ; $37, scale upper nybble and seek back to current output column and to the next 2 rows
call ScalePixelsByTwo
pop bc
dec c
jr nz, .columnInnerLoop
dec de
dec de
dec de
dec de
ld a, b
ld bc, -7*8 ; $ffc8, skip one output column (which has already been written along with the current one)
add hl, bc
ld b, a
dec b
jr nz, .columnLoop
ret
ScaleLastSpriteColumnByTwo:
ld a, 4*8 - 4 ; $1c, 4 tiles minus 4 unused rows
ld [H_SPRITEINTERLACECOUNTER], a
ld bc, -1
.columnInnerLoop
ld a, [de]
dec de
swap a ; only high nybble contains information
call ScalePixelsByTwo
ld a, [H_SPRITEINTERLACECOUNTER]
dec a
ld [H_SPRITEINTERLACECOUNTER], a
jr nz, .columnInnerLoop
dec de ; skip last 4 rows of new column
dec de
dec de
dec de
ret
; scales the given 4 bits in a (4x1 pixels) to 2 output bytes (8x2 pixels)
; hl: destination pointer
; bc: destination pointer offset (added after the two bytes have been written)
ScalePixelsByTwo:
push hl
and $f
ld hl, DuplicateBitsTable
add l
ld l, a
jr nc, .noCarry
inc h
.noCarry
ld a, [hl]
pop hl
ld [hld], a ; write output byte twice to make it 2 pixels high
ld [hl], a
add hl, bc ; add offset
ret
; repeats each input bit twice
DuplicateBitsTable:
db $00, $03, $0c, $0f
db $30, $33, $3c, $3f
db $c0, $c3, $cc, $cf
db $f0, $f3, $fc, $ff
| 28.860215
| 111
| 0.703428
|
852519307dff41ecba6a53d85b9e1b5802a196dc
| 1,267
|
asm
|
Assembly
|
contrib/opensigcomp/tools/test/lzss.asm
|
dulton/reSipServer
|
ac4241df81c1e3eef2e678271ffef4dda1fc6747
|
[
"Apache-2.0"
] | 1
|
2019-04-15T14:10:58.000Z
|
2019-04-15T14:10:58.000Z
|
contrib/opensigcomp/tools/test/lzss.asm
|
dulton/reSipServer
|
ac4241df81c1e3eef2e678271ffef4dda1fc6747
|
[
"Apache-2.0"
] | null | null | null |
contrib/opensigcomp/tools/test/lzss.asm
|
dulton/reSipServer
|
ac4241df81c1e3eef2e678271ffef4dda1fc6747
|
[
"Apache-2.0"
] | 2
|
2019-10-31T09:11:09.000Z
|
2021-09-17T01:00:49.000Z
|
at (32)
:index pad (2)
:length_value pad (2)
:old_pointer pad (2)
at (42)
set (requested_feedback_location, 0)
at (64)
:byte_copy_left pad (2)
:byte_copy_right pad (2)
:input_bit_order pad (2)
:decompressed_pointer pad (2)
set (returned_parameters_location, 0)
align (64)
:initialize_memory
set (udvm_memory_size, 8192)
set (state_length, (udvm_memory_size - 64))
MULTILOAD (64, 4, circular_buffer, udvm_memory_size, 0,
circular_buffer)
:decompress_sigcomp_message
:next_character
INPUT-HUFFMAN (index, end_of_message, 2, 9, 0, 255, 16384, 4, 4096,
8191, 1)
COMPARE ($index, 8192, length, end_of_message, literal)
:literal
set (index_lsb, (index + 1))
OUTPUT (index_lsb, 1)
COPY-LITERAL (index_lsb, 1, $decompressed_pointer)
JUMP (next_character)
:length
INPUT-BITS (4, length_value, !)
ADD ($length_value, 3)
LOAD (old_pointer, $decompressed_pointer)
COPY-OFFSET ($index, $length_value, $decompressed_pointer)
OUTPUT ($old_pointer, $length_value)
JUMP (next_character)
:end_of_message
END-MESSAGE (requested_feedback_location,
returned_parameters_location, state_length, 64,
decompress_sigcomp_message, 6, 0)
:circular_buffer
| 20.111111
| 67
| 0.692976
|
9cb8fd247fcda7cb1e45355f494fb3bb90bcbd07
| 8,274
|
asm
|
Assembly
|
coverage/IN_CTS/0554-COVERAGE-ssa-updater-impl-h-133-256/work/variant/2_spirv_opt_asm/shader.frag.asm
|
asuonpaa/ShaderTests
|
6a3672040dcfa0d164d313224446496d1775a15e
|
[
"Apache-2.0"
] | null | null | null |
coverage/IN_CTS/0554-COVERAGE-ssa-updater-impl-h-133-256/work/variant/2_spirv_opt_asm/shader.frag.asm
|
asuonpaa/ShaderTests
|
6a3672040dcfa0d164d313224446496d1775a15e
|
[
"Apache-2.0"
] | 47
|
2021-03-11T07:42:51.000Z
|
2022-03-14T06:30:14.000Z
|
coverage/IN_CTS/0554-COVERAGE-ssa-updater-impl-h-133-256/work/variant/2_spirv_opt_asm/shader.frag.asm
|
asuonpaa/ShaderTests
|
6a3672040dcfa0d164d313224446496d1775a15e
|
[
"Apache-2.0"
] | 4
|
2021-03-09T13:37:19.000Z
|
2022-02-25T07:32:11.000Z
|
; SPIR-V
; Version: 1.0
; Generator: Khronos Glslang Reference Front End; 10
; Bound: 171
; Schema: 0
OpCapability Shader
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %4 "main" %43 %48
OpExecutionMode %4 OriginUpperLeft
OpSource ESSL 320
OpName %4 "main"
OpName %10 "func(f1;"
OpName %9 "x"
OpName %14 "_GLF_global_loop_count"
OpName %16 "f"
OpName %33 "buf0"
OpMemberName %33 0 "_GLF_uniform_float_values"
OpName %35 ""
OpName %43 "_GLF_color"
OpName %48 "gl_FragCoord"
OpName %87 "v"
OpName %91 "param"
OpDecorate %32 ArrayStride 16
OpMemberDecorate %33 0 Offset 0
OpDecorate %33 Block
OpDecorate %35 DescriptorSet 0
OpDecorate %35 Binding 0
OpDecorate %43 Location 0
OpDecorate %48 BuiltIn FragCoord
%2 = OpTypeVoid
%3 = OpTypeFunction %2
%6 = OpTypeFloat 32
%7 = OpTypePointer Function %6
%8 = OpTypeFunction %6 %7
%12 = OpTypeInt 32 1
%13 = OpTypePointer Private %12
%14 = OpVariable %13 Private
%15 = OpConstant %12 0
%17 = OpConstant %6 1
%24 = OpConstant %12 10
%25 = OpTypeBool
%28 = OpConstant %12 1
%30 = OpTypeInt 32 0
%31 = OpConstant %30 2
%32 = OpTypeArray %6 %31
%33 = OpTypeStruct %32
%34 = OpTypePointer Uniform %33
%35 = OpVariable %34 Uniform
%36 = OpTypePointer Uniform %6
%41 = OpTypeVector %6 4
%42 = OpTypePointer Output %41
%43 = OpVariable %42 Output
%47 = OpTypePointer Input %41
%48 = OpVariable %47 Input
%49 = OpConstant %30 0
%50 = OpTypePointer Input %6
%74 = OpConstant %6 0.100000001
%79 = OpConstant %30 1
%86 = OpTypePointer Function %41
%100 = OpConstant %6 0
%112 = OpConstantFalse %25
%113 = OpTypePointer Function %25
%115 = OpConstantTrue %25
%132 = OpUndef %6
%4 = OpFunction %2 None %3
%5 = OpLabel
%134 = OpVariable %113 Function %112
%135 = OpVariable %7 Function
%136 = OpVariable %7 Function
%137 = OpVariable %7 Function
%87 = OpVariable %86 Function
%91 = OpVariable %7 Function
OpSelectionMerge %110 None
OpSwitch %49 %111
%111 = OpLabel
OpStore %14 %15
%72 = OpAccessChain %50 %48 %49
%73 = OpLoad %6 %72
%75 = OpFOrdLessThan %25 %73 %74
OpSelectionMerge %77 None
OpBranchConditional %75 %76 %77
%76 = OpLabel
OpBranch %110
%77 = OpLabel
%80 = OpAccessChain %50 %48 %79
%81 = OpLoad %6 %80
%82 = OpFOrdLessThan %25 %81 %74
OpSelectionMerge %84 None
OpBranchConditional %82 %83 %84
%83 = OpLabel
OpBranch %110
%84 = OpLabel
%88 = OpAccessChain %36 %35 %15 %28
%89 = OpLoad %6 %88
%90 = OpCompositeConstruct %41 %89 %89 %89 %89
OpStore %87 %90
OpStore %91 %81
OpStore %134 %112
OpSelectionMerge %169 None
OpSwitch %49 %139
%139 = OpLabel
OpStore %136 %17
OpBranch %140
%140 = OpLabel
%141 = OpPhi %6 %17 %139 %149 %163
%142 = OpLoad %12 %14
%143 = OpSLessThan %25 %142 %24
OpLoopMerge %164 %163 None
OpBranchConditional %143 %144 %164
%144 = OpLabel
%145 = OpLoad %12 %14
%146 = OpIAdd %12 %145 %28
OpStore %14 %146
%147 = OpAccessChain %36 %35 %15 %15
%148 = OpLoad %6 %147
%149 = OpFAdd %6 %141 %148
OpStore %136 %149
%150 = OpAccessChain %36 %35 %15 %28
%151 = OpLoad %6 %150
%152 = OpCompositeConstruct %41 %151 %151 %151 %151
OpStore %43 %152
%153 = OpAccessChain %50 %48 %49
%154 = OpLoad %6 %153
%155 = OpFOrdGreaterThanEqual %25 %154 %151
OpSelectionMerge %158 None
OpBranchConditional %155 %156 %158
%156 = OpLabel
%157 = OpCompositeConstruct %41 %148 %148 %148 %148
OpStore %43 %157
OpBranch %158
%158 = OpLabel
%160 = OpFOrdLessThan %25 %81 %151
OpSelectionMerge %162 None
OpBranchConditional %160 %161 %162
%161 = OpLabel
OpStore %134 %115
OpStore %135 %149
OpBranch %164
%162 = OpLabel
OpBranch %163
%163 = OpLabel
OpBranch %140
%164 = OpLabel
%165 = OpPhi %6 %132 %140 %149 %161
%166 = OpPhi %6 %141 %140 %149 %161
%167 = OpPhi %25 %112 %140 %115 %161
OpSelectionMerge %168 None
OpBranchConditional %167 %169 %168
%168 = OpLabel
OpStore %134 %115
OpStore %135 %166
OpBranch %169
%169 = OpLabel
%170 = OpPhi %6 %165 %164 %166 %168
OpStore %137 %170
%107 = OpCompositeInsert %41 %170 %90 3
%109 = OpCompositeInsert %41 %170 %107 0
OpStore %87 %109
%101 = OpFOrdLessThan %25 %73 %100
OpSelectionMerge %103 None
OpBranchConditional %101 %102 %103
%102 = OpLabel
OpBranch %110
%103 = OpLabel
OpStore %43 %109
OpBranch %110
%110 = OpLabel
OpReturn
OpFunctionEnd
%10 = OpFunction %6 None %8
%9 = OpFunctionParameter %7
%11 = OpLabel
%120 = OpVariable %113 Function %112
%117 = OpVariable %7 Function
%16 = OpVariable %7 Function
OpSelectionMerge %116 None
OpSwitch %49 %119
%119 = OpLabel
OpStore %16 %17
OpBranch %18
%18 = OpLabel
%123 = OpPhi %6 %17 %119 %40 %21
%23 = OpLoad %12 %14
%26 = OpSLessThan %25 %23 %24
OpLoopMerge %20 %21 None
OpBranchConditional %26 %19 %20
%19 = OpLabel
%27 = OpLoad %12 %14
%29 = OpIAdd %12 %27 %28
OpStore %14 %29
%37 = OpAccessChain %36 %35 %15 %15
%38 = OpLoad %6 %37
%40 = OpFAdd %6 %123 %38
OpStore %16 %40
%44 = OpAccessChain %36 %35 %15 %28
%45 = OpLoad %6 %44
%46 = OpCompositeConstruct %41 %45 %45 %45 %45
OpStore %43 %46
%51 = OpAccessChain %50 %48 %49
%52 = OpLoad %6 %51
%55 = OpFOrdGreaterThanEqual %25 %52 %45
OpSelectionMerge %57 None
OpBranchConditional %55 %56 %57
%56 = OpLabel
%60 = OpCompositeConstruct %41 %38 %38 %38 %38
OpStore %43 %60
OpBranch %57
%57 = OpLabel
%61 = OpLoad %6 %9
%64 = OpFOrdLessThan %25 %61 %45
OpSelectionMerge %66 None
OpBranchConditional %64 %65 %66
%65 = OpLabel
OpStore %120 %115
OpStore %117 %40
OpBranch %20
%66 = OpLabel
OpBranch %21
%21 = OpLabel
OpBranch %18
%20 = OpLabel
%130 = OpPhi %6 %132 %18 %40 %65
%128 = OpPhi %6 %123 %18 %40 %65
%125 = OpPhi %25 %112 %18 %115 %65
OpSelectionMerge %121 None
OpBranchConditional %125 %116 %121
%121 = OpLabel
OpStore %120 %115
OpStore %117 %128
OpBranch %116
%116 = OpLabel
%129 = OpPhi %6 %130 %20 %128 %121
OpReturnValue %129
OpFunctionEnd
| 35.059322
| 61
| 0.484288
|
bdca6c3bfc0f8962998da666219356e53f302e9a
| 1,674
|
asm
|
Assembly
|
programs/oeis/191/A191008.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/191/A191008.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/191/A191008.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A191008: a(n) = (n*3^(n+1)+((5*3^(n+1)+(-1)^(n))/4))/4.
; 1,5,22,86,319,1139,3964,13532,45517,151313,498226,1627538,5281195,17039327,54705208,174877304,556916953,1767605981,5593383310,17651846030,55570626391,174557144075,547207226932,1712229064916,5348509347109,16680994498409,51949382866474,161567346713162,501859634480707,1557051686465783,4825573408468336,14939975272617968,46209690959492785,142798368303394997,440902991184934918,1360232632379054534,4193268873609912943,12917519550247986851,39765697438998704620,122336508681760346060,376127775139573734781,1155738072701599294145,3549278459953432151842,10894028105406199263746,33420662492856306215899,102477722008482043921679,314080369615185507586984,962182719614774650226792,2946372991151978333077897,9018593470378898146426253,27594203901905583880856446,84397882178023419967302398,258039457950990264876106375,788655808103730809550916667,2409579727063472473420542628,7359576089447257554565005764,22471238993112293066605150933,68591249153648440408545853721,209306343983880004851828763930,638516821520444065434059900090,1947343833267744348937900525171,5937411605922469504720864050215,18098375136125117887884079574752,55153546363448481784816700996576,168035901955564829717943489806689,511833494462352642244310629870949,1558677849174032386004372370965494,4745565644883020535827438556954422,14445293226731831740925280003037087,43961668556443805623104733005632723,133762372298076348070300878006462556,406919216780463837813862670988080828
mov $2,$0
add $0,1
mov $1,$2
add $1,$0
lpb $0
sub $0,1
mul $1,3
add $1,3
mov $4,2
lpe
mul $4,2
div $1,$4
mov $3,$1
mov $1,2
add $3,2
add $1,$3
sub $1,5
div $1,2
add $1,1
mov $0,$1
| 69.75
| 1,426
| 0.878734
|
c2fe52b939619adfd0ac4e8a40bfa41f44585d57
| 450
|
asm
|
Assembly
|
programs/oeis/110/A110805.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/110/A110805.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/110/A110805.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A110805: Sum of digits of n times number of digits of n.
; 1,2,3,4,5,6,7,8,9,2,4,6,8,10,12,14,16,18,20,4,6,8,10,12,14,16,18,20,22,6,8,10,12,14,16,18,20,22,24,8,10,12,14,16,18,20,22,24,26,10,12,14,16,18,20,22,24,26,28,12,14,16,18,20,22,24,26,28,30,14,16,18,20,22,24,26,28,30,32,16,18,20,22,24,26,28,30,32,34,18,20,22,24,26,28,30,32,34,36,3
add $0,1
lpb $0
mov $2,$0
div $0,10
mod $2,10
add $1,$2
add $3,6
lpe
mul $1,$3
div $1,6
mov $0,$1
| 30
| 281
| 0.615556
|
2653ca05e252c4dd01a34ac41ae0eb11afc63e77
| 406
|
asm
|
Assembly
|
programs/oeis/057/A057525.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/057/A057525.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/057/A057525.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
; A057525: Number of applications of f to reduce n to 1, where f(k) is the integer among k/2,(k+1)/4, (k+3)/4.
; 1,1,2,2,2,2,3,2,3,2,3,3,3,3,4,3,3,3,4,3,3,3,4,3,4,3,4,4,4,4,5,3,4,3,4,4,4,4,5,3,4,3,4,4,4,4,5,4,4,4,5,4,4,4,5,4,5,4,5,5,5,5,6,4,4,4,5,4,4,4,5,4,5,4,5,5,5,5,6,4,4,4,5,4,4,4,5,4,5,4
mov $1,1
lpb $0,1
mov $2,$0
gcd $0,2
mul $0,$2
div $0,2
add $0,1
div $0,2
sub $0,1
add $1,1
lpe
| 27.066667
| 181
| 0.534483
|
0961fdb01410461c5fd39707b1dc4d300372b94c
| 494
|
asm
|
Assembly
|
src/stars/examples/basics/hello_world2.asm
|
kevintmcdonnell/stars
|
ce0df570c546a8490ef4f9ceeb84c8e1132b2791
|
[
"MIT"
] | 9
|
2020-11-05T21:26:09.000Z
|
2022-03-04T15:24:40.000Z
|
src/stars/examples/basics/hello_world2.asm
|
kevintmcdonnell/stars
|
ce0df570c546a8490ef4f9ceeb84c8e1132b2791
|
[
"MIT"
] | 7
|
2020-11-06T15:59:40.000Z
|
2021-08-31T16:36:43.000Z
|
src/stars/examples/basics/hello_world2.asm
|
kevintmcdonnell/stars
|
ce0df570c546a8490ef4f9ceeb84c8e1132b2791
|
[
"MIT"
] | 1
|
2021-07-13T21:55:02.000Z
|
2021-07-13T21:55:02.000Z
|
# Hello world program
.data
greeting: .asciiz "Hello world!\n"
prompt1: .asciiz "Enter your age: "
output1: .asciiz "Your age in 5 years: "
.text
main:
# print greeting
li $v0, 4
la $a0, greeting
syscall
# display prompt
li $v0, 4
la $a0, prompt1
syscall
# read integer
li $v0, 5
syscall
# compute new age
move $t1, $v0
addi $t1, $t1, 5
# print output
li $v0, 4
la $a0, output1
syscall
li $v0, 1
move $a0, $t1
syscall
# terminate program
li $v0, 10
syscall
| 12.35
| 40
| 0.639676
|
1c3befed439d7174c4e7278d0d5b3d8e6f265a94
| 448
|
asm
|
Assembly
|
oeis/103/A103872.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/103/A103872.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/103/A103872.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A103872: a(n) = 3*trinomial(n+1,0) - trinomial(n+2,0).
; Submitted by Christian Krause
; 0,2,2,6,12,30,72,182,464,1206,3170,8426,22596,61074,166194,454950,1251984,3461574,9611190,26787378,74916660,210178458,591347988,1668172842,4717282752,13369522250,37970114702,108045430902
add $0,2
mov $1,1
mov $3,$0
mov $4,1
lpb $3
sub $3,1
div $4,-1
mul $4,$3
add $5,$1
add $1,1
mod $1,2
div $4,$5
add $2,$4
lpe
mov $0,$2
add $0,1
mul $0,2
| 20.363636
| 188
| 0.671875
|
5b3cd4078c87ecbaeef41af13ffca8b2a8e79c29
| 4,614
|
asm
|
Assembly
|
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0_notsx.log_21829_1954.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 9
|
2020-08-13T19:41:58.000Z
|
2022-03-30T12:22:51.000Z
|
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0_notsx.log_21829_1954.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 1
|
2021-04-29T06:29:35.000Z
|
2021-05-13T21:02:30.000Z
|
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0_notsx.log_21829_1954.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 %r15
push %rbx
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_UC_ht+0xe761, %r11
nop
nop
add %rdx, %rdx
mov $0x6162636465666768, %r15
movq %r15, %xmm5
vmovups %ymm5, (%r11)
nop
nop
xor %r11, %r11
lea addresses_normal_ht+0x3d11, %rsi
lea addresses_D_ht+0x6ea1, %rdi
nop
nop
nop
add $58776, %rdx
mov $102, %rcx
rep movsq
nop
nop
nop
sub %rcx, %rcx
lea addresses_D_ht+0x5821, %r15
nop
nop
nop
nop
cmp %rbx, %rbx
movw $0x6162, (%r15)
nop
dec %r11
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %r15
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r14
push %r9
push %rax
push %rcx
push %rdi
// Faulty Load
lea addresses_RW+0x176a1, %r14
nop
nop
dec %rax
movb (%r14), %cl
lea oracles, %rdi
and $0xff, %rcx
shlq $12, %rcx
mov (%rdi,%rcx,1), %rcx
pop %rdi
pop %rcx
pop %rax
pop %r9
pop %r14
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_RW', 'AVXalign': True, 'size': 8, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'type': 'addresses_RW', 'AVXalign': False, 'size': 1, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 5}}
{'src': {'type': 'addresses_normal_ht', 'congruent': 1, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_D_ht', 'congruent': 10, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 7}}
{'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
*/
| 51.266667
| 2,999
| 0.662765
|
7189762dc310de416f91933a82bee5b8cef2a821
| 117
|
asm
|
Assembly
|
sample.asm
|
wyznaga/cis-335-assn-7
|
61de76bdabb1065d4119ff71dc6401a7aed947ac
|
[
"Unlicense"
] | null | null | null |
sample.asm
|
wyznaga/cis-335-assn-7
|
61de76bdabb1065d4119ff71dc6401a7aed947ac
|
[
"Unlicense"
] | null | null | null |
sample.asm
|
wyznaga/cis-335-assn-7
|
61de76bdabb1065d4119ff71dc6401a7aed947ac
|
[
"Unlicense"
] | null | null | null |
LDA #5
STA X
MUL
LDA #4
MUL
STA Y
ADD
MUL
LDA X
MUL
ADD
LDA Y
ADD
STA Z
X RESW 1
T0 RESW 1
Y RESW 1
| 6.157895
| 12
| 0.581197
|
9786d38f6496204748d96d4ee5eedc2e08caf770
| 794
|
asm
|
Assembly
|
oeis/142/A142313.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/142/A142313.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/142/A142313.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A142313: Primes congruent to 2 mod 45.
; Submitted by Jon Maiga
; 2,47,137,227,317,587,677,857,947,1217,1307,1487,1667,1847,2027,2207,2297,2477,2657,2837,2927,3467,3557,3917,4007,4457,4547,4637,4817,5087,5717,5807,5897,5987,6257,6977,7247,7517,7607,7877,8147,8237,8597,8867,9137,9227,9497,9587,9677,9767,9857,10037,10487,10667,10847,10937,11027,11117,11657,11927,12107,12197,12377,12647,12917,13007,13187,13367,13457,13907,13997,14087,14177,14447,14537,14627,14717,14897,15077,15527,15797,15887,16067,16427,16607,16787,17327,17417,17597,17957,18047,18587,18947
mov $2,36
mul $2,$0
mov $4,1
lpb $2
mov $3,$4
seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0.
sub $0,$3
mov $1,$0
max $1,0
cmp $1,$0
mul $2,$1
sub $2,1
add $4,45
lpe
mov $0,$4
add $0,1
| 37.809524
| 496
| 0.730479
|
3eb21343a5b239a9694d14d487f7ef5fa87cdae9
| 1,152
|
asm
|
Assembly
|
1571/64tass/rel4.asm
|
silverdr/assembly
|
c2851f7033223e089285dce22443b7e219ed4f61
|
[
"Unlicense"
] | 23
|
2015-03-23T15:16:57.000Z
|
2022-03-18T12:43:42.000Z
|
1571/64tass/rel4.asm
|
silverdr/assembly
|
c2851f7033223e089285dce22443b7e219ed4f61
|
[
"Unlicense"
] | null | null | null |
1571/64tass/rel4.asm
|
silverdr/assembly
|
c2851f7033223e089285dce22443b7e219ed4f61
|
[
"Unlicense"
] | 8
|
2016-04-13T11:19:35.000Z
|
2021-12-22T07:39:00.000Z
|
;*
;*
;**********************************
;*
;*
;* setlst
;*
;*
;**********************************
;*
;*
setlst ldx lindx
lda nr,x
sta r1
dec r1
cmp #2
bne setl01
lda #$ff
sta r1
setl01
lda rs,x
sta r2
jsr getpnt
ldx lindx
cmp r1
bcc setl10
beq setl10
jsr dblbuf
jsr fndlst
bcc setl05
ldx lindx
sta lstchr,x
jmp dblbuf
setl05 jsr dblbuf
lda #$ff
sta r1
setl10 jsr fndlst
bcs setl40
jsr getpnt
setl40 ldx lindx
sta lstchr,x
rts
;*
;*
;*
;*********************************
;*
;*
;* fndlst
;*
;*
;*********************************
;*
;*
fndlst
jsr set00
ldy r1 ; offset to start at
fndl10 lda (dirbuf),y
bne fndl20
dey
cpy #2
bcc fndl30
dec r2 ; limit counter
bne fndl10
fndl30 dec r2
clc ; not found here
rts
fndl20 tya ; found the end char
sec
rts
| 13.879518
| 44
| 0.365451
|
478c59aa33905dfbc65bba46084bab20bdac7ae0
| 686
|
asm
|
Assembly
|
Laboratory/Lab02.asm
|
Ping6666/Assembly-Language-Projects
|
81a55e004815485c246fd209c45f2bf85bcce79f
|
[
"MIT"
] | 4
|
2021-04-12T05:08:12.000Z
|
2021-09-23T06:56:28.000Z
|
Laboratory/Lab02.asm
|
Ping6666/Assembly-Language-Projects
|
81a55e004815485c246fd209c45f2bf85bcce79f
|
[
"MIT"
] | null | null | null |
Laboratory/Lab02.asm
|
Ping6666/Assembly-Language-Projects
|
81a55e004815485c246fd209c45f2bf85bcce79f
|
[
"MIT"
] | null | null | null |
TITLE Homework02 (HW02.ASM)
INCLUDE Irvine32.inc
.data
Val1 SBYTE 03h
Val2 SBYTE 02h
Val3 SBYTE 8fh
Rval SDWORD ?
.code
main EQU start@0
main PROC
movsx eax, Val1 ;eax = Val1
movsx ebx, Val2 ;ebx = Val2
movsx ecx, Val3 ;ecx = Val3
add eax, ebx ;eax = Val1 + Val2
mov ebx, eax ;ebx = Val1 + Val2
shl eax, 3 ;eax = 8*eax
shl ebx, 1 ;eax = 2*eax
add eax, ebx ;eax = eax + ebx = 10*(Val1 + Val2)
shl ebx, 1 ;eax = 2*eax
add eax, ebx ;eax = eax + ebx = 14*(Val1 + Val2)
sub ecx, eax ;ecx = ecx - eax = Val3 – 14 * (Val1 + Val2)
neg ecx ;ecx = -ecx = - (Val3 – 14 * (Val1 + Val2))
mov Rval, ecx ;Rval = ecx
exit
main ENDP
END main
| 23.655172
| 59
| 0.588921
|
489275792a86378a6b17d36592a8dff8d77d88fb
| 4,855
|
asm
|
Assembly
|
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_21829_908.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 9
|
2020-08-13T19:41:58.000Z
|
2022-03-30T12:22:51.000Z
|
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_21829_908.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 1
|
2021-04-29T06:29:35.000Z
|
2021-05-13T21:02:30.000Z
|
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_21829_908.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 %rax
push %rbx
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_WT_ht+0x58c7, %rax
nop
nop
nop
nop
nop
add $15398, %r14
mov (%rax), %edx
nop
nop
nop
and $3520, %rdx
lea addresses_UC_ht+0x18d47, %rbx
nop
nop
nop
nop
nop
xor $44575, %rsi
mov (%rbx), %r11w
nop
nop
and $44481, %rbx
lea addresses_UC_ht+0x1219f, %rax
nop
nop
nop
nop
nop
add %r13, %r13
movups (%rax), %xmm7
vpextrq $0, %xmm7, %rsi
nop
add %r11, %r11
lea addresses_WT_ht+0x243, %rsi
lea addresses_WC_ht+0xe417, %rdi
nop
nop
nop
add $34935, %r14
mov $103, %rcx
rep movsq
sub $762, %r11
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %rax
pop %r14
pop %r13
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r8
push %rax
push %rdi
push %rdx
// Faulty Load
lea addresses_A+0x2a47, %rdi
nop
sub %rdx, %rdx
mov (%rdi), %r12
lea oracles, %rdx
and $0xff, %r12
shlq $12, %r12
mov (%rdx,%r12,1), %r12
pop %rdx
pop %rdi
pop %rax
pop %r8
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_A', 'congruent': 0}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_A', 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_WT_ht', 'congruent': 6}}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_UC_ht', 'congruent': 7}}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_UC_ht', 'congruent': 3}}
{'dst': {'same': False, 'congruent': 4, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 2, 'type': 'addresses_WT_ht'}}
{'35': 21829}
35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35
*/
| 46.682692
| 2,999
| 0.659732
|
6c196461f1cf0d9a13ca122be894dbf11c513042
| 433
|
asm
|
Assembly
|
oeis/115/A115302.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/115/A115302.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/115/A115302.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A115302: Permutation of natural numbers generated by 3-rowed array shown below.
; Submitted by Jamie Morken(w4)
; 1,4,2,7,5,3,10,8,6,13,11,9,16,14,12,19,17,15,22,20,18,25,23,21,28,26,24,31,29,27,34,32,30,37,35,33,40,38,36,43,41,39,46,44,42,49,47,45,52,50,48,55,53,51,58,56,54,61,59,57,64,62,60
mul $0,2
mov $1,5
mov $2,1
mov $3,3
lpb $0
sub $0,1
add $2,3
mov $4,$2
sub $4,$0
trn $0,$3
mov $3,$1
lpe
mov $0,$4
add $0,1
| 22.789474
| 181
| 0.632794
|
a020666840f702ba416025efa68ed71ea4a207c8
| 571
|
asm
|
Assembly
|
002-assembly/common-string-len.asm
|
dingjingmaster/learn-kernel
|
befb4ef7ff56145d268e79fe1d18a5c11433c11a
|
[
"MIT"
] | null | null | null |
002-assembly/common-string-len.asm
|
dingjingmaster/learn-kernel
|
befb4ef7ff56145d268e79fe1d18a5c11433c11a
|
[
"MIT"
] | null | null | null |
002-assembly/common-string-len.asm
|
dingjingmaster/learn-kernel
|
befb4ef7ff56145d268e79fe1d18a5c11433c11a
|
[
"MIT"
] | null | null | null |
.macro pushaq
push %rax
push %rcx
push %rdx
push %rbx
push %rbp
push %rsi
push %rdi
.endm # pushaq
.macro popaq
pop %rdi
pop %rsi
pop %rbp
pop %rbx
pop %rdx
pop %rcx
pop %rax
.endm # popaq
.extern print_int
.data
string: .ascii "This string has\na line break in it.\0"
.equ len, (. - string)
.text
.global _start
_start:
# 打印字符串长度应该是: 35
# FIXME:// 暂时结果错误 .......
pushaq
movq $0, %rdi
movq len(%rip), %rdi
call print_int
popaq
mov $60, %rax
xor %rdi, %rdi
syscall
.end
| 13.27907
| 55
| 0.558669
|
d61ea62b6f6b7af9d2830384c8543356053864ad
| 309
|
asm
|
Assembly
|
programs/oeis/300/A300659.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/300/A300659.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/300/A300659.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A300659: Product of digits of n!.
; 1,1,2,6,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
pow $0,2
div $0,2
mov $2,$0
mov $0,6
sub $2,5
div $0,$2
sub $1,$0
add $1,10
mod $1,10
mov $0,$1
| 22.071429
| 175
| 0.530744
|
b2c7c9a40e2a577e4ed379b9697e518acf9c0fb0
| 775
|
asm
|
Assembly
|
oeis/333/A333170.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/333/A333170.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/333/A333170.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A333170: a(n) = Sum_{k=0..n} phi(k^2 + 1), where phi is the Euler totient function (A000010).
; 1,2,6,10,26,38,74,94,142,182,282,342,454,518,714,826,1082,1194,1434,1614,2014,2206,2590,2798,3374,3686,4362,4650,5274,5694,6526,6958,7758,8190,9246,9858,11154,11698,12786,13546,15146,15958,17366,18086,19862,20874,22890,23658,25498,26698,29098,30398,32558,33678,36594,38002,41138,42338,45026,46766,50078,51938,55010,56594,60434,62546,66902,68694,72294,74674,79042,81562,85402,87322,92798,95486,101102,103470,108334,111454,117646,120718,126078,128574,135630,139242,146058,149082,155274,158986,167086
mov $3,$0
add $3,1
lpb $3
mov $0,$2
sub $3,1
sub $0,$3
pow $0,2
seq $0,10 ; Euler totient function phi(n): count numbers <= n and prime to n.
add $1,$0
lpe
mov $0,$1
| 51.666667
| 499
| 0.735484
|
c851c088620dc164784b8f4a0888b57fc472ecf6
| 383
|
asm
|
Assembly
|
programs/oeis/048/A048027.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | 1
|
2021-03-15T11:38:20.000Z
|
2021-03-15T11:38:20.000Z
|
programs/oeis/048/A048027.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/048/A048027.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
; A048027: Number of nonempty subsets of {1,2,...,n} in which exactly 1/2 of the elements are <= (n-3)/3.
; 0,0,0,0,0,5,6,7,35,44,54,219,285,363,1364,1819,2379,8567,11627,15503,54263,74612,100946,346103,480699,657799,2220074,3108104,4292144,14307149,20160074,28048799,92561039,131128139,183579395
mov $2,$0
sub $2,1
mov $0,$2
add $0,2
mov $1,$0
sub $2,1
div $2,3
bin $1,$2
sub $1,1
| 29.461538
| 190
| 0.70235
|
3384915a977ac6d79c1b50b9bbe5e30c31a63771
| 691
|
asm
|
Assembly
|
oeis/000/A000274.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/000/A000274.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/000/A000274.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A000274: Number of permutations of length n with 2 consecutive ascending pairs.
; Submitted by Jamie Morken(s1)
; 0,0,1,3,18,110,795,6489,59332,600732,6674805,80765135,1057289046,14890154058,224497707343,3607998868005,61576514013960,1112225784377144,21197714949305577,425131949816628507,8950146311929021210,197350726178034917670,4548464355722328578691,109369892917141446278513,2739002535664064045931468,71328191032918334529465300,1928714285530111765676741725,54078181313517364506859412199,1570270153696207917532510339422,47164185687803959237315756980482,1463716107552536665985661423532215
mov $3,$0
lpb $0
sub $0,1
mul $3,$0
mov $2,$3
add $3,$1
mov $1,$2
lpe
mov $0,$3
div $0,2
| 46.066667
| 476
| 0.84081
|
013c838e274f907c89136bb2e652a5ea2fd8b7d6
| 75
|
asm
|
Assembly
|
ac2021/exemplo3.asm
|
TulioEstrelaMarques/8085
|
ddd521436a8577d918837ea779c5bdebd458b00b
|
[
"MIT"
] | null | null | null |
ac2021/exemplo3.asm
|
TulioEstrelaMarques/8085
|
ddd521436a8577d918837ea779c5bdebd458b00b
|
[
"MIT"
] | null | null | null |
ac2021/exemplo3.asm
|
TulioEstrelaMarques/8085
|
ddd521436a8577d918837ea779c5bdebd458b00b
|
[
"MIT"
] | null | null | null |
MVI A,07
MVI B,00
VOLTA: INR B
CMP B
JNC VOLTA
HLT
| 9.375
| 15
| 0.48
|
cf93629c4bd214c9df9fb583254f561dcc4f75e2
| 538
|
nasm
|
Assembly
|
modules/taskman/tm_head.nasm
|
r-tty/radios
|
fdfaaadd256564ea3ed1b7fc408e7aecf648ae2b
|
[
"BSD-3-Clause"
] | null | null | null |
modules/taskman/tm_head.nasm
|
r-tty/radios
|
fdfaaadd256564ea3ed1b7fc408e7aecf648ae2b
|
[
"BSD-3-Clause"
] | null | null | null |
modules/taskman/tm_head.nasm
|
r-tty/radios
|
fdfaaadd256564ea3ed1b7fc408e7aecf648ae2b
|
[
"BSD-3-Clause"
] | null | null | null |
;-------------------------------------------------------------------------------
; tm_head.nasm - module header.
;-------------------------------------------------------------------------------
module $taskman
%include "module.ah"
exportdata ModuleInfo
section .data
ModuleInfo: instance tModInfoTag
field(Signature, DD RBM_SIGNATURE)
field(ModVersion, DD 1)
field(ModType, DB MODTYPE_KERNEL)
field(Flags, DB 0)
field(OStype, DW 1)
field(OSversion, DD 0)
field(Base, DD -1)
field(Entry, DD -1)
iend
| 22.416667
| 80
| 0.481413
|
36a0df25aabe2ad218acec589dec2f9b8a32c87d
| 472
|
asm
|
Assembly
|
libsrc/target/z88/net/sock_shutdown.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 640
|
2017-01-14T23:33:45.000Z
|
2022-03-30T11:28:42.000Z
|
libsrc/target/z88/net/sock_shutdown.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 1,600
|
2017-01-15T16:12:02.000Z
|
2022-03-31T12:11:12.000Z
|
libsrc/target/z88/net/sock_shutdown.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 215
|
2017-01-17T10:43:03.000Z
|
2022-03-23T17:25:02.000Z
|
;
; This file is automatically generated
;
; Do not edit!!!
;
; djm 12/2/2000
;
; ZSock Lib function: sock_shutdown
SECTION code_clib
PUBLIC sock_shutdown
PUBLIC _sock_shutdown
EXTERN no_zsock
INCLUDE "packages.def"
INCLUDE "zsock.def"
.sock_shutdown
._sock_shutdown
ld a,r_sock_shutdown
call_pkg(tcp_all)
ret nc
; We failed..are we installed?
cp rc_pnf
scf ;signal error
ret nz ;Internal error
call_pkg(tcp_ayt)
jr nc,sock_shutdown
jp no_zsock
| 15.225806
| 38
| 0.743644
|
700a808fcf8dacbcedfbbf1de297cf3cc629c6af
| 251
|
asm
|
Assembly
|
programs/oeis/130/A130784.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | 1
|
2021-03-15T11:38:20.000Z
|
2021-03-15T11:38:20.000Z
|
programs/oeis/130/A130784.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/130/A130784.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
; A130784: Period 3: repeat [1, 3, 2].
; 1,3,2,1,3,2,1,3,2,1,3,2,1,3,2,1,3,2,1,3,2,1,3,2,1,3,2,1,3,2,1,3,2,1,3,2,1,3,2,1,3,2,1,3,2,1,3,2,1,3,2,1,3,2,1,3,2,1,3,2,1,3,2,1,3,2,1,3,2,1,3,2,1,3,2,1,3,2,1,3,2,1,3,2,1,3
mov $1,$0
mul $1,2
mod $1,3
add $1,1
| 31.375
| 173
| 0.513944
|
ae86f967169bd3fd7c824255b9f2eba90da23810
| 2,369
|
asm
|
Assembly
|
Transynther/x86/_processed/NC/_ht_zr_/i7-7700_9_0x48.log_24_523.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 9
|
2020-08-13T19:41:58.000Z
|
2022-03-30T12:22:51.000Z
|
Transynther/x86/_processed/NC/_ht_zr_/i7-7700_9_0x48.log_24_523.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 1
|
2021-04-29T06:29:35.000Z
|
2021-05-13T21:02:30.000Z
|
Transynther/x86/_processed/NC/_ht_zr_/i7-7700_9_0x48.log_24_523.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 3
|
2020-07-14T17:07:07.000Z
|
2022-03-21T01:12:22.000Z
|
.global s_prepare_buffers
s_prepare_buffers:
push %r13
push %rbp
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_UC_ht+0x7705, %rsi
lea addresses_WC_ht+0x112be, %rdi
nop
nop
nop
nop
add %rbp, %rbp
mov $40, %rcx
rep movsw
nop
sub $22833, %rdx
lea addresses_WT_ht+0x176be, %rsi
lea addresses_UC_ht+0xd33e, %rdi
nop
nop
sub %r13, %r13
mov $87, %rcx
rep movsb
nop
xor $56309, %rdi
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbp
pop %r13
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r13
push %r8
push %rbp
push %rcx
push %rdi
push %rsi
// Store
lea addresses_UC+0x18ebe, %r13
nop
nop
add %rbp, %rbp
mov $0x5152535455565758, %rdi
movq %rdi, %xmm7
vmovaps %ymm7, (%r13)
nop
nop
nop
nop
nop
cmp $23349, %rsi
// Store
lea addresses_WT+0x143c4, %rsi
nop
nop
nop
nop
xor $41444, %r11
mov $0x5152535455565758, %r13
movq %r13, %xmm1
movntdq %xmm1, (%rsi)
nop
nop
nop
inc %rdi
// Store
mov $0x6be, %rcx
nop
nop
nop
nop
nop
sub $64255, %rdi
mov $0x5152535455565758, %r13
movq %r13, (%rcx)
nop
sub %rbp, %rbp
// Faulty Load
mov $0x7ed53400000006be, %rsi
nop
nop
nop
xor %r8, %r8
vmovups (%rsi), %ymm6
vextracti128 $0, %ymm6, %xmm6
vpextrq $1, %xmm6, %rbp
lea oracles, %rsi
and $0xff, %rbp
shlq $12, %rbp
mov (%rsi,%rbp,1), %rbp
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %r8
pop %r13
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_NC', 'AVXalign': False, 'congruent': 0, 'size': 2, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC', 'AVXalign': True, 'congruent': 11, 'size': 32, 'same': False, 'NT': True}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WT', 'AVXalign': False, 'congruent': 1, 'size': 16, 'same': False, 'NT': True}}
{'OP': 'STOR', 'dst': {'type': 'addresses_P', 'AVXalign': False, 'congruent': 8, 'size': 8, 'same': False, 'NT': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_NC', 'AVXalign': False, 'congruent': 0, 'size': 32, 'same': True, 'NT': False}}
<gen_prepare_buffer>
{'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 9, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 11, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 7, 'same': False}}
{'49': 4, '00': 20}
00 00 00 00 00 00 49 49 00 00 49 00 49 00 00 00 00 00 00 00 00 00 00 00
*/
| 18.653543
| 149
| 0.65133
|
4c1e7adf3cce45a2a33237a79bcf82bed86fffe8
| 210
|
asm
|
Assembly
|
libsrc/zxvgs/j0.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 640
|
2017-01-14T23:33:45.000Z
|
2022-03-30T11:28:42.000Z
|
libsrc/zxvgs/j0.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 1,600
|
2017-01-15T16:12:02.000Z
|
2022-03-31T12:11:12.000Z
|
libsrc/zxvgs/j0.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 215
|
2017-01-17T10:43:03.000Z
|
2022-03-23T17:25:02.000Z
|
;ZXVGS specific functions
;020121 (C) created by Yarek
SECTION code_clib
PUBLIC j0
PUBLIC _j0
;int j0()
;returns joystick 0 state
.j0
._j0
RST 8
DEFB $80
LD L,A
LD H,0 ;does H have any matter?
RET
| 11.052632
| 33
| 0.695238
|
fb7062ed763e0beaae0913c5ae5d598770a8eb7c
| 567
|
asm
|
Assembly
|
libsrc/_DEVELOPMENT/target/zx/driver/terminal/zx_01_output_char_32_tty_z88dk/zx_01_output_char_32_tty_z88dk_22_at.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 640
|
2017-01-14T23:33:45.000Z
|
2022-03-30T11:28:42.000Z
|
libsrc/_DEVELOPMENT/target/zx/driver/terminal/zx_01_output_char_32_tty_z88dk/zx_01_output_char_32_tty_z88dk_22_at.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 1,600
|
2017-01-15T16:12:02.000Z
|
2022-03-31T12:11:12.000Z
|
libsrc/_DEVELOPMENT/target/zx/driver/terminal/zx_01_output_char_32_tty_z88dk/zx_01_output_char_32_tty_z88dk_22_at.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 215
|
2017-01-17T10:43:03.000Z
|
2022-03-23T17:25:02.000Z
|
SECTION code_driver
SECTION code_driver_terminal_output
PUBLIC zx_01_output_char_32_tty_z88dk_22_at
zx_01_output_char_32_tty_z88dk_22_at:
; at x,y
; de = parameters *
do_y:
ld a,(de) ; biased y coord
inc de
inc a
jr z, do_x ; skip if -1
dec a
dec a
ld (ix+15),a ; set y coord
do_x:
ld a,(de) ; biased x coord
inc a
ret z ; skip if -1
dec a
dec a
ld (ix+14),a ; set x coord
ret
| 14.538462
| 47
| 0.488536
|
0e1136eca9fffaab72e555d5b8c2244e0828f07e
| 3,798
|
asm
|
Assembly
|
Pure64 v0.5.0 Distribution/src/init_smp.asm
|
svilerino/intel_multicore
|
346d8946168a71e298dbfefa0f0923419dc80daf
|
[
"MIT"
] | 1
|
2015-12-15T20:41:01.000Z
|
2015-12-15T20:41:01.000Z
|
Pure64 v0.5.0 Distribution/src/init_smp.asm
|
svilerino/intel_multicore
|
346d8946168a71e298dbfefa0f0923419dc80daf
|
[
"MIT"
] | null | null | null |
Pure64 v0.5.0 Distribution/src/init_smp.asm
|
svilerino/intel_multicore
|
346d8946168a71e298dbfefa0f0923419dc80daf
|
[
"MIT"
] | null | null | null |
; =============================================================================
; Pure64 -- a 64-bit OS loader written in Assembly for x86-64 systems
; Copyright (C) 2008-2012 Return Infinity -- see LICENSE.TXT
;
; INIT SMP
; =============================================================================
smp_setup:
mov al, '5' ; Start of MP init
mov [0x000B809C], al
mov al, '0'
mov [0x000B809E], al
; mov al, 'S'
; call serial_send_64
; Check if we want the AP's to be enabled.. if not then skip to end
; cmp byte [cfg_smpinit], 1 ; Check if SMP should be enabled
; jne noMP ; If not then skip SMP init
; Step 3: Start the AP's one by one
xor eax, eax
xor edx, edx
mov rsi, [os_LocalAPICAddress]
add rsi, 0x20 ; Add the offset for the APIC ID location
lodsd ; APIC ID is stored in bits 31:24
shr rax, 24 ; AL now holds the BSP CPU's APIC ID
mov dl, al ; Store BSP APIC ID in DL
mov al, '8' ; Start the AP's
mov [0x000B809E], al
mov rsi, 0x0000000000005100
xor eax, eax
xor ecx, ecx
mov cx, [cpu_detected]
smp_send_INIT:
cmp cx, 0
je smp_send_INIT_done
lodsb
cmp al, dl ; Is it the BSP?
je smp_send_INIT_skipcore
; Broadcast 'INIT' IPI to APIC ID in AL
mov rdi, [os_LocalAPICAddress]
shl eax, 24
mov dword [rdi+0x310], eax ; Interrupt Command Register (ICR); bits 63-32
mov eax, 0x00004500
mov dword [rdi+0x300], eax ; Interrupt Command Register (ICR); bits 31-0
smp_send_INIT_verify:
mov eax, [rdi+0x300] ; Interrupt Command Register (ICR); bits 31-0
bt eax, 12 ; Verify that the command completed
jc smp_send_INIT_verify
smp_send_INIT_skipcore:
dec cl
jmp smp_send_INIT
smp_send_INIT_done:
mov rax, [os_Counter_RTC]
add rax, 10
wait1:
mov rbx, [os_Counter_RTC]
cmp rax, rbx
jg wait1
; mov al, 'i'
; call serial_send_64
mov rsi, 0x0000000000005100
xor ecx, ecx
mov cx, [cpu_detected]
smp_send_SIPI:
cmp cx, 0
je smp_send_SIPI_done
lodsb
cmp al, dl ; Is it the BSP?
je smp_send_SIPI_skipcore
; Broadcast 'Startup' IPI to destination using vector 0x08 to specify entry-point is at the memory-address 0x00008000
mov rdi, [os_LocalAPICAddress]
shl eax, 24
mov dword [rdi+0x310], eax ; Interrupt Command Register (ICR); bits 63-32
mov eax, 0x00004608 ; Vector 0x08
mov dword [rdi+0x300], eax ; Interrupt Command Register (ICR); bits 31-0
smp_send_SIPI_verify:
mov eax, [rdi+0x300] ; Interrupt Command Register (ICR); bits 31-0
bt eax, 12 ; Verify that the command completed
jc smp_send_SIPI_verify
smp_send_SIPI_skipcore:
dec cl
jmp smp_send_SIPI
smp_send_SIPI_done:
mov al, 'A'
mov [0x000B809E], al
; mov al, 'S'
; call serial_send_64
; Let things settle (Give the AP's some time to finish)
mov rax, [os_Counter_RTC]
add rax, 20
wait3:
mov rbx, [os_Counter_RTC]
cmp rax, rbx
jg wait3
; Step 4: Finish up
noMP:
lock
inc word [cpu_activated] ; BSP adds one here
xor eax, eax
mov rsi, [os_LocalAPICAddress]
add rsi, 0x20 ; Add the offset for the APIC ID location
lodsd ; APIC ID is stored in bits 31:24
shr rax, 24 ; AL now holds the CPU's APIC ID (0 - 255)
mov [os_BSP], eax ; Store the BSP APIC ID
mov al, 'C'
mov [0x000B809E], al
; Calculate speed of CPU (At this point the RTC is firing at 1024Hz)
cpuid
xor edx, edx
xor eax, eax
mov rcx, [os_Counter_RTC]
add rcx, 10
rdtsc
push rax
speedtest:
mov rbx, [os_Counter_RTC]
cmp rbx, rcx
jl speedtest
rdtsc
pop rdx
sub rax, rdx
xor edx, edx
mov rcx, 10240
div rcx
mov [cpu_speed], ax
mov al, 'E'
mov [0x000B809E], al
cli ; Disable Interrupts
ret
; =============================================================================
; EOF
| 24.191083
| 119
| 0.632701
|
b5f4383a36ff11b18f2933debbd93d2409581bf9
| 417
|
asm
|
Assembly
|
programs/oeis/001/A001651.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/001/A001651.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/001/A001651.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A001651: Numbers not divisible by 3.
; 1,2,4,5,7,8,10,11,13,14,16,17,19,20,22,23,25,26,28,29,31,32,34,35,37,38,40,41,43,44,46,47,49,50,52,53,55,56,58,59,61,62,64,65,67,68,70,71,73,74,76,77,79,80,82,83,85,86,88,89,91,92,94,95,97,98,100,101,103,104,106,107,109,110,112,113,115,116,118,119,121,122,124,125,127,128,130,131,133,134,136,137,139,140,142,143,145,146,148,149
mov $1,3
mul $1,$0
div $1,2
add $1,1
mov $0,$1
| 46.333333
| 329
| 0.676259
|
91698674b3e19deaaad78ebf742b8f0c16d457be
| 2,757
|
asm
|
Assembly
|
Lab10/lab10_3r.asm
|
richardhyy/AssemblyLab
|
7e0ba3800f3db1e2f5d616ca89905963d1da0996
|
[
"MIT"
] | 3
|
2021-06-26T14:52:16.000Z
|
2021-11-23T03:48:48.000Z
|
Lab10/lab10_3r.asm
|
richardhyy/AssemblyLab
|
7e0ba3800f3db1e2f5d616ca89905963d1da0996
|
[
"MIT"
] | 1
|
2021-06-26T14:12:21.000Z
|
2021-06-26T14:18:54.000Z
|
Lab10/lab10_3r.asm
|
richardhyy/AssemblyLab
|
7e0ba3800f3db1e2f5d616ca89905963d1da0996
|
[
"MIT"
] | 4
|
2021-11-30T06:06:08.000Z
|
2022-03-16T03:55:42.000Z
|
; Task in Project1
; @ Improved dtoc function, supporting the conversion from dword HEX into string
;
; name: dtoc
; func: convert HEX dword(16bit) data into a string of DEC which ends with 0
; args: (ax) = lower 16bit
; (dx) = higher 16bit
; ds:si = where the string begins
assume cs:code
data segment
db 10 dup (0)
data ends
stack segment
dd 0,0
dd 0,0
stack ends
code segment
start: mov ax,data
mov ds,ax
mov ax,stack
mov ss,ax
mov sp,20H
mov si,0
mov ax,9768H ; sample data (l)
mov dx,005AH ; sample data (h)
call dtoc
mov dh,8
mov dl,3
mov cl,2
call show_str
mov ax,4c00H
int 21h
dtoc: push ax
push bx
push cx
push dx
push si
push di
mov bx,0
mov si,0
dtoc_s: mov cx,10
call divdw
add cl,30H ; DEC to ASCII
mov ds:[bx+si],cl ; remainder (ASCII)
mov cx,ax ; quotient
inc si
jcxz dtoc_done
jmp short dtoc_s
; reverse the output
dtoc_done: push si
sub si,1
mov cx,si
jcxz dtoc_ret
inc si
mov ax,si
mov cl,2
div cl
mov ch,0
mov cl,al ; quotient = number of step for swapping
mov di,si
sub di,1 ; position of the last char
mov si,0 ; position of the first char
dtoc_s1: mov al,ds:[bx+si]
mov ah,ds:[bx+di]
mov ds:[bx+si],ah
mov ds:[bx+di],al
sub di,1
inc si
loop dtoc_s1
dtoc_ret: pop si
mov ax,0
mov ds:[bx+si],ax
pop di
pop si
pop dx
pop cx
pop bx
pop ax
ret
show_str: push si
push di
push bx
push bp
push ax
push dx
push cx
mov ax,0B800H
mov es,ax
mov al,0A0H
mov bl,dh
mul bl
mov bp,ax ; first column of the line
mov al,2
mul dl
add bp,ax ; exact position
mov di,0
mov dl,cl
mov ch,0
str_s: mov cl,ds:[si]
jcxz done
mov es:[bp+di],cl
mov es:[bp+di+1],dl
add di,2
inc si
jmp short str_s
done: pop cx
pop dx
pop ax
pop bp
pop bx
pop di
pop si
ret
divdw: push bx
mov bx,0
push [bx+0]
push [bx+2]
push [bx+4]
push [bx+6]
push [bx+8]
push [bx+10]
mov [bx+0],ax ; dividend (lower)
mov [bx+2],dx ; dividend (higher)
mov [bx+4],cx ; divisor
mov dx,0
mov ax,[bx+2]
div cx
mov [bx+6],dx ; remainder of lhs H/N
add ax,ax
mov cx,8000H
mul cx
mov [bx+8],ax ; lower part of the lhs result
mov [bx+10],dx ; higher part of the lhs result
mov ax,[bx+6]
add ax,ax
mov cx,8000H
mul cx
add ax,[bx+0]
div word ptr [bx+4]
mov [bx+6],dx ; remainder
add [bx+8],ax
mov ax,[bx+8]
mov dx,[bx+10]
mov cx,[bx+6]
mov bx,0
pop [bx+10]
pop [bx+8]
pop [bx+6]
pop [bx+4]
pop [bx+2]
pop [bx+0]
pop bx
ret
code ends
end start
| 14.822581
| 80
| 0.581066
|
5be6ee45f5ab9aaab0de07bb03b9a26530ba33c3
| 685
|
asm
|
Assembly
|
programs/oeis/267/A267870.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | 1
|
2021-03-15T11:38:20.000Z
|
2021-03-15T11:38:20.000Z
|
programs/oeis/267/A267870.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/267/A267870.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
; A267870: Triangle read by rows giving successive states of cellular automaton generated by "Rule 237" initiated with a single ON (black) cell.
; 1,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
mov $1,4
trn $1,$0
gcd $1,2
sub $1,1
| 85.625
| 501
| 0.562044
|
5d2347452efa25f1e6bbd5a3780047211c76688f
| 1,476
|
asm
|
Assembly
|
p7zip_9.20.1/Asm/x64/7zCrcT8U.asm
|
mahmoudgalal/ZeeArchiver
|
a6d07f8a799c7e9210924235680278a5423909e7
|
[
"MIT"
] | 20
|
2018-11-01T21:07:12.000Z
|
2022-02-14T12:14:16.000Z
|
p7zip_9.20.1/Asm/x64/7zCrcT8U.asm
|
Mubashar9D/ZeeArchiver
|
4c1e255664b3c6012292f5f6d97b80be7964e90f
|
[
"MIT"
] | 3
|
2019-03-27T17:31:39.000Z
|
2022-02-23T20:53:32.000Z
|
p7zip_9.20.1/Asm/x64/7zCrcT8U.asm
|
Mubashar9D/ZeeArchiver
|
4c1e255664b3c6012292f5f6d97b80be7964e90f
|
[
"MIT"
] | 4
|
2019-11-10T23:28:42.000Z
|
2022-02-01T04:22:09.000Z
|
global CrcUpdateT8:function
global _CrcUpdateT8:function
SECTION .text
%macro CRC1b 0
movzx EDX, BYTE [RSI]
inc RSI
movzx EBX, AL
xor EDX, EBX
shr EAX, 8
xor EAX, [RDI + RDX * 4]
dec R8
%endmacro
align 16
CrcUpdateT8:
_CrcUpdateT8:
push RBX
; push RSI
; push RDI
push RBP
mov EAX, EDI ; EAX = CRC
; RSI = BUF
mov R8, RDX ; R8 = LEN
mov RDI, RCX ; RDI = table
test R8, R8
jz sl_end
sl:
test RSI, 7
jz sl_end
CRC1b
jnz sl
sl_end:
cmp R8, 16
jb crc_end
mov R9, R8
and R8, 7
add R8, 8
sub R9, R8
add R9, RSI
xor EAX, [RSI]
mov EBX, [RSI + 4]
movzx ECX, BL
align 16
main_loop:
mov EDX, [RDI + RCX*4 + 0C00h]
movzx EBP, BH
xor EDX, [RDI + RBP*4 + 0800h]
shr EBX, 16
movzx ECX, BL
xor EDX, [RSI + 8]
xor EDX, [RDI + RCX*4 + 0400h]
movzx ECX, AL
movzx EBP, BH
xor EDX, [RDI + RBP*4 + 0000h]
mov EBX, [RSI + 12]
xor EDX, [RDI + RCX*4 + 01C00h]
movzx EBP, AH
shr EAX, 16
movzx ECX, AL
xor EDX, [RDI + RBP*4 + 01800h]
movzx EBP, AH
mov EAX, [RDI + RCX*4 + 01400h]
add RSI, 8
xor EAX, [RDI + RBP*4 + 01000h]
movzx ECX, BL
xor EAX,EDX
cmp RSI, R9
jne main_loop
xor EAX, [RSI]
crc_end:
test R8, R8
jz fl_end
fl:
CRC1b
jnz fl
fl_end:
pop RBP
; pop RDI
; pop RSI
pop RBX
ret
end
| 14.192308
| 35
| 0.529133
|
5dd00174f6ab86d5119a21eba9fad16d2b4014b7
| 210
|
asm
|
Assembly
|
experiments/asm-call-c/asm_main.asm
|
daltonmatos/avrgcc-mixed-with-avrasm2
|
f28120af3089fdd150d7a609409c56f5408a1658
|
[
"BSD-3-Clause"
] | 2
|
2019-01-15T16:30:19.000Z
|
2019-08-15T02:31:22.000Z
|
experiments/asm-call-c/asm_main.asm
|
daltonmatos/avrgcc-mixed-with-avrasm2
|
f28120af3089fdd150d7a609409c56f5408a1658
|
[
"BSD-3-Clause"
] | null | null | null |
experiments/asm-call-c/asm_main.asm
|
daltonmatos/avrgcc-mixed-with-avrasm2
|
f28120af3089fdd150d7a609409c56f5408a1658
|
[
"BSD-3-Clause"
] | null | null | null |
.org 0x0000
;_other_routines:
; nop
; This funcions is just a stub. Its implementation will be in C
call_me_maybe:
nop
internal_to_asm:
ret
asm_main:
call internal_to_asm
call call_me_maybe
ret
| 12.352941
| 63
| 0.747619
|
9e37ea5057b80e57fd387869d6a0307be724fa02
| 538
|
asm
|
Assembly
|
oeis/113/A113657.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/113/A113657.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/113/A113657.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A113657: Decimal expansion of 1/1089.
; 0,0,0,9,1,8,2,7,3,6,4,5,5,4,6,3,7,2,8,1,9,1,0,0,0,9,1,8,2,7,3,6,4,5,5,4,6,3,7,2,8,1,9,1,0,0,0,9,1,8,2,7,3,6,4,5,5,4,6,3,7,2,8,1,9,1,0,0,0,9,1,8,2,7,3,6,4,5,5,4,6,3,7,2,8,1,9,1,0,0,0,9,1,8,2,7,3,6
seq $0,286519 ; Binary representation of the diagonal from the origin to the corner (or of the corner to the origin) of the n-th stage of growth of the two-dimensional cellular automaton defined by "Rule 659", based on the 5-celled von Neumann neighborhood.
add $2,$0
div $2,121
mov $0,$2
mod $0,10
| 59.777778
| 257
| 0.657993
|
dbb8018d6a8d08f27458b0eecfec02ff041a2f50
| 443
|
asm
|
Assembly
|
programs/oeis/057/A057050.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | 1
|
2021-03-15T11:38:20.000Z
|
2021-03-15T11:38:20.000Z
|
programs/oeis/057/A057050.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/057/A057050.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
; A057050: Let R(i,j) be the rectangle with antidiagonals 1; 2,3; 4,5,6; ...; each k is an R(i(k),j(k)) and A057050(n)=j(n^2).
; 1,3,2,6,4,1,7,3,11,6,16,10,3,15,7,21,12,2,18,7,25,13,33,20,6,28,13,37,21,4,30,12,40,21,1,31,10,42,20,54,31,7,43,18,56,30,3,43,15,57,28,72,42,11,57,25,73,40,6,56,21,73,37,91,54,16,72
mov $1,$0
add $0,2
mul $0,$1
cal $0,25676 ; Exponent of 8 (value of i) in n-th number of form 8^i*9^j.
sub $0,3
mov $1,$0
add $1,4
| 40.272727
| 183
| 0.613995
|
6a4de620707d1ced15f617820092d7ccbd6db33e
| 140,222
|
asm
|
Assembly
|
hello-subtract/base64x.asm
|
cerkit/asm-x86
|
9ccae81e8cf92c7678562856c673099c23496828
|
[
"MIT"
] | null | null | null |
hello-subtract/base64x.asm
|
cerkit/asm-x86
|
9ccae81e8cf92c7678562856c673099c23496828
|
[
"MIT"
] | null | null | null |
hello-subtract/base64x.asm
|
cerkit/asm-x86
|
9ccae81e8cf92c7678562856c673099c23496828
|
[
"MIT"
] | null | null | null |
;--------------------------------------------
; BASELIB - base64x.asm
; Copyright (c)2015,2016 Soffian Abdul Rasad
; All rights reserved. Read licence.txt
; For Linux64
;--------------------------------------------
; Compile : nasm -f elf64 thisfile.asm
; Link : ld thisfile.o -o thisfile
; Run : ./thisfile
;--------------------------------------------
global _start
section .data
hello db 'Hello World!',0x0A,0
section .text
_start:
;code here
call exitx
;----------------------------
;prnreg(1)
;Display 64-bit register
;Display formatted hex
;----------------------------
;RAX : Register to display
;----------------------------
;Ret : -
;Note : 16-digit Hex format
; : Unsigned
;----------------------------
align 8
prnreg:
push rdi
push rax
push rcx
push rbx
sub rsp,16
mov rbx,rax
cld
mov rdi,rsp
xor rax,rax
mov ecx,16
.begin: shld rax,rbx,4
add al,'0'
rol rbx,4
cmp al,'9'
jbe .go
add al,7
.go: stosb
xor al,al
sub rcx,1
jnz .begin
mov ebx,16
mov rax,rsp
call prnstr
add rsp,16
pop rbx
pop rcx
pop rax
pop rdi
ret
;--------------------------------
;prnregd(1)
;Display signed 64-bit Register
;--------------------------------
;RAX : Register to display
;--------------------------------
;Ret : -
;Note : 19-digit decimal format
;--------------------------------
align 8
prnregd:
push rax
push rcx
push rdx
push rsi
push rdi
push rbx
sub rsp,32
mov rbx,19
mov rsi,rax
test rax,rax
jns .nop
neg rax
.nop: mov rdi,rsp
add rdi,31
mov byte[rdi],0
mov rcx,10
.go: xor rdx,rdx
div rcx
add dl,30h
dec rdi
mov [rdi],dl
sub rbx,1
jnz .go
dec rdi
mov byte[rdi],'+'
test rsi,rsi
jns .nope
mov byte[rdi],'-'
.nope: mov rax,rdi
call prnstrz
add rsp,32
pop rbx
pop rdi
pop rsi
pop rdx
pop rcx
pop rax
ret
;--------------------------------
;prnregdu(1)
;Display unsigned 64-bit Register
;--------------------------------
;RAX : Register to display
;--------------------------------
;Ret : -
;Note : 20-digit decimal format
;--------------------------------
align 8
prnregdu:
push rax
push rcx
push rdx
push rdi
push rbx
sub rsp,32
mov rbx,20
mov rdi,rsp
add rdi,31
mov byte[rdi],0
mov rcx,10
.go: xor rdx,rdx
div rcx
add dl,30h
sub rdi,1
mov [rdi],dl
sub rbx,1
jnz .go
mov rax,rdi
call prnstrz
add rsp,32
pop rbx
pop rdi
pop rdx
pop rcx
pop rax
ret
;------------------------------------
;dumpreg(1)
;Display Register Dump
;------------------------------------
;Arg : Push type of display;
; 0 - unsigned hex
; 1 - unsigned int
; 2 - signed int
;------------------------------------
;Ret : -
;Note : RIP doesn't count argument
; : Arg must follow tightly
;------------------------------------
align 8
dumpreg:
push rbp
mov rbp,rsp
push rdx
push rcx
push rbx
push rax
push r15
push r14
push r13
push r12
push r11
push r10
push r9
push r8
push rdi
push rsi
push rdx
push rcx
push rbx
push rax
mov rbx,.disp
mov rdx,[rbp+16]
mov eax,'RAX|'
pop rcx
call rbx
mov eax,'RBX|'
pop rcx
call rbx
mov eax,'RCX|'
pop rcx
call rbx
call prnline
mov eax,'RDX|'
pop rcx
call rbx
mov eax,'RSI|'
pop rcx
call rbx
mov eax,'RDI|'
pop rcx
call rbx
call prnline
mov eax,'RBP|'
mov rcx,[rbp]
call rbx
mov eax,'RSP|'
lea rcx,[rbp+24]
call rbx
mov eax,'R8 |'
pop rcx
call rbx
call prnline
mov eax,'R9 |'
pop rcx
call rbx
mov eax,'R10|'
pop rcx
call rbx
mov eax,'R11|'
pop rcx
call rbx
call prnline
mov eax,'R12|'
pop rcx
call rbx
mov eax,'R13|'
pop rcx
call rbx
mov eax,'R14|'
pop rcx
call rbx
call prnline
mov eax,'R15|'
pop rcx
call rbx
mov eax,'RIP|'
mov rcx,[rbp+8]
sub rcx,7 ;8 in DLL/SO
call rbx
call prnline
pop rax
pop rbx
pop rcx
pop rdx
mov rsp,rbp
pop rbp
ret 8
.disp: call prnstreg
mov rax,rcx
cmp rdx,2
ja .def
cmp rdx,0
je .def
cmp rdx,2
je .2
cmp rdx,1
je .1
jmp .nxt
.2: call prnregd
jmp .nxt
.1: call prnregdu
jmp .nxt
.def: call prnreg
.nxt: call prnspace
retn
;-------------------------
;dumpseg
;Display segment registers
;-------------------------
;Arg : -
;-------------------------
;Ret : -
;Note : -
;-------------------------
align 8
dumpseg:
push rax
mov eax,'CS| '
call prnstreg
mov eax,cs
call .next
call prnspace
mov eax,'DS| '
call prnstreg
mov eax,ds
call .next
mov al,' '
call prnchr
mov eax,'SS| '
call prnstreg
mov eax,ss
call .next
mov al,' '
call prnchr
mov eax,'ES| '
call prnstreg
mov eax,es
call .next
call prnspace
mov eax,'FS| '
call prnstreg
mov eax,fs
call .next
call prnspace
mov eax,'GS| '
call prnstreg
mov eax,gs
call .next
pop rax
ret
.next: cmp rax,0xf
ja .ok
push '0'
call prnchrs
.ok: call prnhexu
ret
;-----------------------
;flags(1)
;Display RFLAG
;-----------------------
;Arg : pushfq
;-----------------------
;Ret : -
;Note : -
;-----------------------
align 8
flags:
push rcx
push rbx
push rax
cld
sub rsp,16
mov rax,'ODI SZ A'
mov rbx,0x0a43205020
xor ecx,ecx
mov [rsp],rax
mov [rsp+8],rbx
mov rax,rsp
call prnstrz
mov ebx,11
mov rax,[rsp+8*6]
call bitfield
add rsp,16
pop rax
pop rbx
pop rcx
ret 8
;--------------------------------
;stackview(1)
;Display stack
;--------------------------------
;RAX : Number of items to view
;--------------------------------
;Ret : -
;Note : content |hex_address
; : * Top of Stack(TOS)
; : 1 item = 8 bytes
;--------------------------------
align 8
stackview:
push rdx
push rcx
push rax
cmp rax,0
jle .done
mov rcx,rax
lea rdx,[rsp+rax*8+8*3]
.again: mov rax,[rdx]
call prnreg
mov rax,' |'
call prnstreg
sub rdx,8
mov rax,rdx
add rax,8
call prnreg
sub rcx,1
jz .ok
call prnline
jmp .again
.ok: mov eax,0x0A2A
call prnstreg
.done: pop rax
pop rcx
pop rdx
ret
;--------------------------
;memview(2)
;View memory dump
;--------------------------
;RBX : size (+up,-down)
;RAX : label,address
;--------------------------
;Ret : -
;Note : Leftmost is MSB
;--------------------------
align 8
memview:
push rax
push rbx
push rcx
push rsi
push rdi
push rdx
xor rdx,rdx
test rbx,rbx
jns .up
mov rdx,1
neg rbx
sub rax,8
.up: mov rcx,rbx
.next: mov rdi,7
.final: mov rsi,rax
xor rax,rax
.again: mov al,[rsi+rdi]
cmp al,0xf
ja .skip
push '0'
call prnchrs
.skip: call prnhexu
call prnspace
sub rdi,1
jns .again
push '|'
call prnchrs
mov rax,rsi
call prnreg
call prnline
add rax,8
test rdx,rdx
jz .ok
sub rax,16
.ok: sub rcx,8
jz .done
js .done
cmp rcx,8
jge .next
mov rdi,8
sub rdi,rcx
xchg rcx,rdi
sub rdi,1
.pad: mov rax,' '
call prnstreg
loop .pad
mov rax,rsi
test edx,edx
jnz .neg
add rax,8
jmp .final
.neg: sub rax,8
jmp .final
.done: pop rdx
pop rdi
pop rsi
pop rcx
pop rbx
pop rax
ret
;---------------------------------
;memviewc(2)
;View memory dump
;---------------------------------
;RBX : size
;RAX : label,address
;---------------------------------
;Ret : -
;Note : Leftmost is LSB
; : Emphasis on strings
;---------------------------------
align 8
memviewc:
push rax
push rbx
push rcx
push rsi
push rdi
push rdx
mov rcx,rbx
.go: mov rsi,rax
mov rbx,8
.final: call prnreg
mov rax,'| '
call prnstreg
mov rdi,rsi
.again: mov al,[rsi]
mov dl,[rsi]
call chr_isalpha
test rax,rax
jz .nope
mov al,dl
call prnchr
call prnspace
jmp .next
.nope: mov al,dl
cmp al,0xf
ja .full
push '0'
call prnchrs
.full: call prnhexu
.next: call prnspace
inc rsi
sub rbx,1
jnz .again
mov rax,rdi
add rax,8
call prnline
sub rcx,8
jz .done
js .done
cmp rcx,8
jge .go
mov rbx,rcx
jmp .final
.done: pop rdx
pop rdi
pop rsi
pop rcx
pop rbx
pop rax
ret
;----------------------------
;mem_reset(2)
;Clear memory of RBX bytes
;----------------------------
;RBX : size/bytes to clear
;RAX : offset / pointer
;----------------------------
;Ret : -
;Note : Clear by bytes
;----------------------------
align 8
mem_reset:
push rdi
push rcx
push rax
mov rcx,rbx
mov rdi,rax
mov al,0
rep stosb
pop rax
pop rcx
pop rdi
ret
;----------------------------
;mem_set(3)
;Set memory of RBX bytes
;----------------------------
;CL : Set byte to use
;RBX : size/bytes to set
;RAX : offset / pointer
;----------------------------
;Ret : -
;Note : Set by bytes
;----------------------------
align 8
mem_set:
push rdi
push rcx
push rax
push rdx
mov dl,cl
mov rcx,rbx
mov rdi,rax
mov al,dl
rep stosb
pop rdx
pop rax
pop rcx
pop rdi
ret
;-----------------------------------
;mem_insertr(2)
;Insert register content into memory
;-----------------------------------
;RBX : Value(s) to insert
;RAX : Memory location
;-----------------------------------
;Ret : -
;Note : -
;-----------------------------------
align 8
mem_insertr:
cmp rbx,0
jnz .ok
ret
.ok: push rdi
push rax
push rbx
cld
mov rdi,rax
.next: xor rax,rax
shld rax,rbx,8
test al,al
jz .nxt
.norm: stosb
.nxt: shl rbx,8
jnz .next
.done: pop rbx
pop rax
pop rdi
ret
;----------------------------
;mem_copy(3)
;Copy memory content of RCX bytes
;----------------------------
;RCX : Number of bytes to copy
;RBX : Source pointer
;RAX : Destination pointer
;----------------------------
;Ret : -
;Note : -
;----------------------------
align 8
mem_copy:
push rsi
push rdi
push rax
push rcx
mov rdi,rax
mov rsi,rbx
rep movsb
pop rcx
pop rax
pop rdi
pop rsi
ret
;----------------------------------
;mem_load(1)/2
;Load a file to memory
;----------------------------------
;RAX : Filename path string
;----------------------------------
;Ret : RAX - block pointer
; : RBX - Size
;Note : Should re-claim memory
; : File name must be 0-ended
;----------------------------------
align 8
mem_load:
push rbp
mov rbp,rsp
push rdx
push rcx
mov rbx,0
call file_open
mov rdx,rax ;file handle
call file_size
mov rcx,rax ;file size
call mem_alloc
mov rbx,rax ;buffer
mov rax,rdx ;file ptr
call file_read
mov rax,rdx
call file_close
mov rax,rbx ;block ptr
mov rbx,rcx ;size
pop rcx
pop rdx
mov rsp,rbp
pop rbp
ret
;----------------------------------
;opsize(2)/1
;Get size between 2 labels
;----------------------------------
;RBX : Label (reg64,add64)
;RAX : Label (reg64,add64)
;----------------------------------
;Ret : Size
;Note : Order of label is irrelevant
;----------------------------------
align 8
opsize:
sub rax,rbx
jns .ok
neg rax
.ok: ret
;----------------------------------
;opcode(2)
;Encode instrns between 2 labels
;----------------------------------
;RAX : Label 1 (first/lead label)
;RBX : Label 2
;----------------------------------
;Ret : -
;Note : Label 1 must be the first
; : Leftmost is MSB
;----------------------------------
align 8
opcode:
push rax
push rbx
push rcx
push rdx
mov rdx,rax
call opsize
test rax,rax
jz .quit
mov rcx,rax
mov rbx,rdx
add rbx,rcx
xor eax,eax
sub rbx,1
.again: mov al,[rbx]
cmp al,0xf
ja .nxt
push '0'
call prnchrs
.nxt: call prnhexu
call prnspace
sub rbx,1
loop .again
.quit: pop rdx
pop rcx
pop rbx
pop rax
ret
;-----------------------------
;prnint(1)
;Display Signed 64-bit Decimal
;-----------------------------
;RAX : Value to display
;-----------------------------
;Ret : -
;Note : -
;-----------------------------
align 8
prnint:
push rax
push rcx
push rdx
push rsi
push rdi
sub rsp,32
mov rsi,rax
test rax,rax
jns .nop
neg rax
.nop: mov rdi,rsp
add rdi,31
mov byte[rdi],0
mov rcx,10
.go: xor rdx,rdx
div rcx
add dl,30h
sub rdi,1
mov [rdi],dl
test rax,rax
jnz .go
test rsi,rsi
jns .done
sub rdi,1
mov byte[rdi],'-'
.done: mov rax,rdi
call prnstrz
add rsp,32
pop rdi
pop rsi
pop rdx
pop rcx
pop rax
ret
;-------------------------------
;prnintu(1)
;Display unsigned 64-bit Decimal
;-------------------------------
;RAX : Value to display
;-------------------------------
;Ret : -
;Note : -
;-------------------------------
align 8
prnintu:
push rax
push rcx
push rdx
push rdi
sub rsp,32
mov rdi,rsp
add rdi,31
mov byte[rdi],0
mov rcx,10
.go: xor rdx,rdx
div rcx
add dl,30h
sub rdi,1
mov [rdi],dl
test rax,rax
jnz .go
mov rax,rdi
call prnstrz
add rsp,32
pop rdi
pop rdx
pop rcx
pop rax
ret
;------------------------------------
;prnhex(1)
;Display 64-bit Signed Hexadecimal
;------------------------------------
;RAX : Value to display
;------------------------------------
;Ret : -
;Note : Imm must be in valid format
;------------------------------------
align 8
prnhex:
push rdi
push rax
push rcx
push rbx
sub rsp,32
mov rcx,rax
test rax,rax
jns .ok
neg rax
.ok: mov rbx,rax
mov rdi,rsp
add rdi,31
mov byte[rdi],0
xor rax,rax
.begin: shrd rax,rbx,4
shr rax,60
add al,'0'
shr rbx,4
cmp al,'9'
jbe .go
add al,7
.go: sub rdi,1
mov [rdi],al
xor al,al
test rbx,rbx
jnz .begin
test rcx,rcx
jns .done
dec rdi
mov byte[rdi],'-'
.done: mov rax,rdi
call prnstrz
add rsp,32
pop rbx
pop rcx
pop rax
pop rdi
ret
;-------------------------------------
;prnhexu(1)
;Display 64-bit Unsigned Hexadecimal
;-------------------------------------
;RAX : Value to display
;-------------------------------------
;Ret : -
;Note : Imm. must be in valid format
;-------------------------------------
align 8
prnhexu:
push rdi
push rax
push rbx
sub rsp,32
mov rbx,rax
mov rdi,rsp
add rdi,31
mov byte[rdi],0
xor rax,rax
.begin: shrd rax,rbx,4
shr rax,60
add al,'0'
shr rbx,4
cmp al,'9'
jbe .go
add al,7
.go: sub rdi,1
mov [rdi],al
xor al,al
test rbx,rbx
jnz .begin
mov rax,rdi
call prnstrz
add rsp,32
pop rbx
pop rax
pop rdi
ret
;-------------------------------------
;prnoct(1)
;Display 64-bit Octal (signed)
;-------------------------------------
;RAX : Value to display
;-------------------------------------
;Ret : -
;Note : Imm. must be in valid format
;-------------------------------------
align 8
prnoct:
push rax
push rcx
push rdx
push rsi
push rdi
sub rsp,32
mov rsi,rax
test rax,rax
jns .nop
neg rax
.nop: mov rdi,rsp
add rdi,31
mov byte[rdi],0
mov rcx,8
.go: xor rdx,rdx
div rcx
add dl,30h
dec rdi
mov [rdi],dl
test rax,rax
jnz .go
test rsi,rsi
jns .done
dec rdi
mov byte[rdi],'-'
.done: mov rax,rdi
call prnstrz
add rsp,32
pop rdi
pop rsi
pop rdx
pop rcx
pop rax
ret
;-------------------------------------
;prnoctu(1)
;Display 64-bit Octal (unsigned)
;-------------------------------------
;RAX : Value to display.
;-------------------------------------
;Ret : -
;Note : Imm. must be in valid format
;-------------------------------------
align 8
prnoctu:
push rax
push rcx
push rdx
push rdi
sub rsp,32
mov rdi,rsp
add rdi,31
mov byte[rdi],0
mov rcx,8
.go: xor rdx,rdx
div rcx
add dl,30h
sub rdi,1
mov [rdi],dl
test rax,rax
jnz .go
mov rax,rdi
call prnstrz
add rsp,32
pop rdi
pop rdx
pop rcx
pop rax
ret
;-------------------------------------
;prnbin(1)
;Convert to & Display Signed Binary
;-------------------------------------
;RAX : Value to display.
;-------------------------------------
;Ret : -
;Note : Imm. must be in valid format
;-------------------------------------
align 8
prnbin:
push rax
push rcx
push rdx
push rdi
sub rsp,80
mov rdx,rax
xor rcx,rcx
cld
mov rdi,rsp
test rdx,rdx
jnz .ok
mov al,'0'
stosb
jmp .done
.ok: test rax,rax
jns .ok2
mov al,'-'
stosb
neg rdx
.ok2: bsr rcx,rdx
.start: mov al,'0'
bt rdx,rcx
jnc .uno
mov al,'1'
.uno: stosb
sub rcx,1
jns .start
.done: xor al,al
stosb
mov rax,rsp
call prnstrz
add rsp,80
pop rdi
pop rdx
pop rcx
pop rax
ret
;-------------------------------------
;prnbinu(1)
;Convert to & Display unsigned Binary
;-------------------------------------
;RAX : Value to display
;-------------------------------------
;Ret : -
;Note : Imm. must be in valid format
;-------------------------------------
align 8
prnbinu:
push rax
push rcx
push rbx
push rdx
push rdi
sub rsp,64
mov rdx,rax
cld
mov rdi,rsp
test rax,rax
jnz .ok
mov al,'0'
stosb
mov ebx,1
jmp .done
.ok: bsr rcx,rdx
xor rbx,rbx ;index
.start: mov al,'0'
bt rdx,rcx
jnc .uno
mov al,'1'
.uno: stosb
add rbx,1
sub rcx,1
jns .start
.done: mov rax,rsp
call prnstr
add rsp,64
pop rdi
pop rdx
pop rbx
pop rcx
pop rax
ret
;------------------------------------
;prnbinf(3)
;Convert to & display Unsigned Binary
;with formatting options
;------------------------------------
;RCX : Separator. 1-with, 0-without
;RBX : Trim. 1-trim. 0-not trimmed
;RAX : Value to display
;------------------------------------
;Ret : -
;Note : Imm must be in valid format
;------------------------------------
align 8
prnbinf:
push rax
push rcx
push rbx
push rdx
push rdi
push rsi
sub rsp,16*5
mov rdx,rax
cld
mov rdi,rsp
mov esi,63
cmp rbx,1 ;trim
jne .start
test rax,rax
jnz .ok
mov al,'0'
stosb
mov ebx,1
jmp .done
.ok: bsr rsi,rdx
.start: xor rbx,rbx
.nxt: mov al,'0'
bt rdx,rsi
jnc .uno
mov al,'1'
.uno: stosb
add rbx,1
sub rsi,1
js .done
cmp rcx,1 ;separator
jne .nxt
.space: cmp rsi,47
je .spc
cmp rsi,31
je .spc
cmp rsi,15
je .spc
jmp .nxt
.spc: mov al,' '
stosb
add rbx,1
jmp .nxt
.done: mov rax,rsp
call prnstr
add rsp,16*5
pop rsi
pop rdi
pop rdx
pop rbx
pop rcx
pop rax
ret
;-------------------------------------
;prnbinb(1)
;Convert to & Display unsigned Binary
;-------------------------------------
;RAX : Value to display
;-------------------------------------
;Ret : -
;Note : Imm. must be in valid format
; ; Uses 8-bit separators
;-------------------------------------
align 8
prnbinb:
push rax
push rbx
push rdx
push rdi
sub rsp,86
xor rbx,rbx
mov rdx,rax
cld
mov rdi,rsp
test rax,rax
jnz .start
mov al,'0'
stosb
mov rbx,1
jmp .done
.start: mov al,'0'
shl rdx,1
jnc .uno
mov al,'1'
.uno: stosb
cmp rbx,7
je .nxt
cmp rbx,15
je .nxt
cmp rbx,23
je .nxt
cmp rbx,31
je .nxt
cmp rbx,39
je .nxt
cmp rbx,47
je .nxt
cmp rbx,55
je .nxt
jmp .ok2
.nxt: mov al,' '
stosb
.ok2: add rbx,1
cmp rbx,71
jnz .start
.done: mov rax,rsp
call prnstr
add rsp,86
pop rdi
pop rdx
pop rbx
pop rax
ret
;------------------------------------
;fpbin(1)
;Display 64-bit Floating Point Binary
;------------------------------------
;RAX : FP value to display
;------------------------------------
;Ret : -
;Note : -
;------------------------------------
align 8
fpbin:
push rdi
push rdx
push rcx
push rax
push rbx
sub rsp,16*5
mov rdx,rax
cld
mov rdi,rsp
mov ecx,63
.prb0: mov al,'0'
shl rdx,1
jnc .tmp0
mov al,'1'
.tmp0: stosb
test rcx,rcx
jz .prb1
sub rcx,1
cmp rcx,62
je .dot
cmp rcx,51
je .dot
cmp rcx,31
je .sep
jmp .prb0
.dot: mov al,'.'
stosb
jmp .prb0
.sep: mov al,'-'
stosb
jmp .prb0
.prb1: mov ebx,67
mov rax,rsp
call prnstr
add rsp,16*5
pop rbx
pop rax
pop rcx
pop rdx
pop rdi
ret
;------------------------------------
;fpbind(1)
;Display 32-bit Floating Point Binary
;------------------------------------
;EAX : FP Value to display
;------------------------------------
;Ret : -
;Note : -
;------------------------------------
align 8
fpbind:
push rdi
push rdx
push rcx
push rax
push rbx
sub rsp,16*3
mov edx,eax
cld
mov rdi,rsp
mov ecx,31
.prb0: mov al,'0'
shl edx,1
jnc .tmp0
mov al,'1'
.tmp0: stosb
test ecx,ecx
jz .prb1
sub ecx,1
cmp ecx,30
je .dot
cmp ecx,22
je .dot
jmp .prb0
.dot: mov al,'.'
stosb
jmp .prb0
.sep: mov al,'-'
stosb
jmp .prb0
.prb1: mov ebx,34
mov rax,rsp
call prnstr
add rsp,16*3
pop rbx
pop rax
pop rcx
pop rdx
pop rdi
ret
;---------------------------------
;prndbl(1)
;Display unrounded REAL8 precision
;---------------------------------
;RAX : Double value to display
;---------------------------------
;Ret : -
;Note : Use DQ for vars
;---------------------------------
align 8
prndbl:
push rbp
mov rbp,rsp
sub rsp,16*6
and rsp,-16
movdqa [rsp ],xmm0
movdqa [rsp+16],xmm1
movdqa [rsp+32],xmm2
movdqa [rsp+48],xmm3
movdqa [rsp+64],xmm4
movdqa [rsp+80],xmm5
push rax
push rbx
push rcx
push rdx
push rdi
push rsi
sub rsp,32
mov rcx,0x3ff0000000000000
mov rbx,0x3FB999999999999A
mov rdx,0x4024000000000000
movq xmm4,rcx
movq xmm2,rbx
movq xmm3,rdx
xor rsi,rsi
cld
mov rdi,rsp
bt rax,63
jnc .zero
mov byte[rdi],'-'
add rdi,1
btr rax,63
;----------------------
.zero: mov rbx,rax
test rax,rax
jnz .inv
mov eax,'0.0'
stosd
sub rdi,1
jmp .done
;----------------------
.inv: shr rbx,52
mov rcx,1023
cmp rbx,0x7ff
jne .norm
mov al,'#'
stosb
jmp .done
;----------------------
.norm: sub rbx,rcx
test rbx,rbx
js .small
cmp rbx,49
ja .big
;----------------------
.begin: movq xmm0,rax
movq xmm1,rax
mov rax,0
call sse_round
roundsd xmm0,xmm0,3
subsd xmm1,xmm0
xor rcx,rcx
xor rbx,rbx
jmp .int
;----------------------
.small: movq xmm0,rax
mov rsi,rax
xor rdx,rdx
mov rax,0
call sse_round
.c2: mulsd xmm0,xmm3
add edx,1
comisd xmm0,xmm4
jc .c2
cmp edx,16
jb .nope
movq rax,xmm0
mov rsi,-1
jmp .begin
.nope: mov rax,rsi
xor rsi,rsi
jmp .begin
;----------------------
.big: mov esi,1
xor rdx,rdx
movq xmm0,rax
mov rax,1
call sse_round
.c1: mulsd xmm0,xmm2
add edx,1
comisd xmm0,xmm3
jnc .c1
movq rax,xmm0
jmp .begin
;----------------------
.int: mulsd xmm0,xmm2 ;0.1
movq xmm5,xmm0
roundsd xmm5,xmm5,3
subsd xmm0,xmm5
mulsd xmm0,xmm3 ;10.0
cvtsd2si rax,xmm0
add rcx,1
add rbx,1
add al,30h
movq xmm0,xmm5
push rax
comisd xmm0,xmm4 ;1.0
jnc .int
.save: pop rax
stosb
sub rcx,1
jnz .save
cmp rsi,-2
je .done
mov al,'.'
stosb
comisd xmm1,xmm5
jnz .nxt
mov al,'0'
stosb
add rbx,1
jmp .enote
;----------------------
.nxt: test rsi,rsi
jns .frac
add rbx,1
.frac: mulsd xmm1,xmm3
movq xmm0,xmm1
roundsd xmm0,xmm0,3
subsd xmm1,xmm0
cvtsd2si rax,xmm0
add al,30h
stosb
add rbx,1
cmp rbx,16
jne .frac
;----------------------
.cutz: cmp byte[rdi-1],'0'
jne .enote
sub rdi,1
cmp byte[rdi-1],'.'
jnz .cutz
add rdi,1
;----------------------
.enote: test rsi,rsi
jz .done
mov ax,'E+'
test rsi,rsi
jns .plus
mov ax,'E-'
.plus: stosw
cvtsi2sd xmm0,rdx
mov rsi,-2
jmp .int
;----------------------
.done: xor al,al
stosb
mov rax,rsp
call prnstrz
add rsp,32
pop rsi
pop rdi
pop rdx
pop rcx
pop rbx
pop rax
movdqa xmm0,[rsp ]
movdqa xmm1,[rsp+16]
movdqa xmm2,[rsp+32]
movdqa xmm3,[rsp+48]
movdqa xmm4,[rsp+64]
movdqa xmm5,[rsp+80]
mov rsp,rbp
pop rbp
ret
;---------------------------------
;prndblr(1)
;Display rounded REAL8 precision
;---------------------------------
;RAX : Double value to display
;---------------------------------
;Ret : -
;Note : Use DQ for vars
;---------------------------------
align 8
prndblr:
push rbp
mov rbp,rsp
sub rsp,16*6
and rsp,-16
movdqa [rsp ],xmm0
movdqa [rsp+16],xmm1
movdqa [rsp+32],xmm2
movdqa [rsp+48],xmm3
movdqa [rsp+64],xmm4
movdqa [rsp+80],xmm5
push rax
push rbx
push rcx
push rdx
push rdi
push rsi
sub rsp,32
mov rcx,0x3ff0000000000000
mov rbx,0x3FB999999999999A
mov rdx,0x4024000000000000
movq xmm4,rcx
movq xmm2,rbx
movq xmm3,rdx
xor rsi,rsi
cld
mov rdi,rsp
bt rax,63
jnc .zero
mov byte[rdi],'-'
add rdi,1
btr rax,63
;----------------------
.zero: mov rbx,rax
test rax,rax
jnz .inv
mov eax,'0.0'
stosd
sub rdi,1
jmp .done
;----------------------
.inv: shr rbx,52
mov rcx,1023
cmp rbx,0x7ff
jne .norm
mov al,'#'
stosb
jmp .done
;----------------------
.norm: sub rbx,rcx
test rbx,rbx
js .small
cmp rbx,49
ja .big
;----------------------
.begin: movq xmm0,rax
movq xmm1,rax
mov rax,0
call sse_round
roundsd xmm0,xmm0,3
subsd xmm1,xmm0
xor rcx,rcx
xor rbx,rbx
jmp .int
;----------------------
.small: movq xmm0,rax
mov rsi,rax
xor rdx,rdx
mov rax,0
call sse_round
.c2: mulsd xmm0,xmm3
add edx,1
comisd xmm0,xmm4
jc .c2
cmp edx,16
jb .nope
movq rax,xmm0
mov rsi,-1
jmp .begin
.nope: mov rax,rsi
xor rsi,rsi
jmp .begin
;----------------------
.big: mov esi,1
xor rdx,rdx
movq xmm0,rax
mov rax,1
call sse_round
.c1: mulsd xmm0,xmm2
add edx,1
comisd xmm0,xmm3
jnc .c1
movq rax,xmm0
jmp .begin
;----------------------
.int: mulsd xmm0,xmm2 ;0.1
movq xmm5,xmm0
roundsd xmm5,xmm5,3
subsd xmm0,xmm5
mulsd xmm0,xmm3 ;10.0
cvtsd2si rax,xmm0
add rcx,1
add rbx,1
add al,30h
movq xmm0,xmm5
push rax
comisd xmm0,xmm4 ;1.0
jnc .int
.save: pop rax
stosb
sub rcx,1
jnz .save
cmp rsi,-2
je .done
mov al,'.'
stosb
comisd xmm1,xmm5
jnz .nxt
mov al,'0'
stosb
add rbx,1
jmp .enote
;----------------------
.nxt: push rdx
test rsi,rsi
jns .n1
add rbx,1
.n1: xor rdx,rdx
mov rax,0
call sse_round
.frac: mulsd xmm1,xmm3
comisd xmm1,xmm4
jnc .no
add rdx,1
movq xmm5,xmm1
mulsd xmm5,xmm3
roundsd xmm5,xmm5,0
comisd xmm5,xmm3
jnz .no
sub rdx,1
.no: add rbx,1
cmp rbx,16
jne .frac
xor rcx,rcx
movq xmm0,xmm1
roundsd xmm0,xmm0,0
.int2: mulsd xmm0,xmm2
movq xmm5,xmm0
roundsd xmm5,xmm5,3
subsd xmm0,xmm5
mulsd xmm0,xmm3
cvtsd2si rax,xmm0
add rcx,1
add al,30h
movq xmm0,xmm5
push rax
comisd xmm0,xmm4
jnc .int2
test rdx,rdx
jz .save2
.looop: push '0'
add rcx,1
sub rdx,1
jnz .looop
.save2: pop rax
stosb
sub rcx,1
jnz .save2
pop rdx
;----------------------
.cutz: cmp byte[rdi-1],'0'
jne .enote
sub rdi,1
cmp byte[rdi-1],'.'
jnz .cutz
add rdi,1
;----------------------
.enote: test rsi,rsi
jz .done
mov ax,'E+'
test rsi,rsi
jns .plus
mov ax,'E-'
.plus: stosw
cvtsi2sd xmm0,rdx
mov rsi,-2
jmp .int
;----------------------
.done: xor al,al
stosb
mov rax,rsp
call prnstrz
add rsp,32
pop rsi
pop rdi
pop rdx
pop rcx
pop rbx
pop rax
movdqa xmm0,[rsp ]
movdqa xmm1,[rsp+16]
movdqa xmm2,[rsp+32]
movdqa xmm3,[rsp+48]
movdqa xmm4,[rsp+64]
movdqa xmm5,[rsp+80]
mov rsp,rbp
pop rbp
ret
;---------------------------------
;prnflt(1)
;Display unrounded REAL4 precision
;---------------------------------
;EAX : Single value to display
;---------------------------------
;Ret : -
;Note : Use DD for vars
;---------------------------------
align 8
prnflt:
push rbp
mov rbp,rsp
sub rsp,16*6
and rsp,-16
movdqa [rsp ],xmm0
movdqa [rsp+16],xmm1
movdqa [rsp+32],xmm2
movdqa [rsp+48],xmm3
movdqa [rsp+64],xmm4
movdqa [rsp+80],xmm5
push rax
push rbx
push rcx
push rdx
push rdi
push rsi
sub rsp,16
mov ecx,0x3f800000
mov ebx,0x3DCCCCCD
mov edx,0x41200000
movd xmm4,ecx
movd xmm2,ebx
movd xmm3,edx
xor rsi,rsi
cld
mov rdi,rsp
bt eax,31
jnc .zero
mov byte[rdi],'-'
add rdi,1
btr eax,31
;----------------------
.zero: mov ebx,eax
test eax,eax
jnz .inv
mov eax,'0.0'
stosd
sub rdi,1
jmp .done
;----------------------
.inv: shr ebx,23
mov ecx,127
cmp ebx,0x7ff
jne .norm
mov al,'#'
stosb
jmp .done
;----------------------
.norm: sub ebx,ecx
test ebx,ebx
js .small
cmp ebx,19
ja .big
;----------------------
.begin: movd xmm0,eax
movd xmm1,eax
;mov eax,0
;call sse_round
roundss xmm0,xmm0,3
subss xmm1,xmm0
xor ecx,ecx
xor ebx,ebx
jmp .int
;----------------------
.small: movd xmm0,eax
mov esi,eax
xor edx,edx
mov eax,0
call sse_round
.c2: mulss xmm0,xmm3
add edx,1
comiss xmm0,xmm4
jc .c2
cmp edx,7
jb .nope
movd eax,xmm0
mov esi,-1
jmp .begin
.nope: mov eax,esi
xor esi,esi
jmp .begin
;----------------------
.big: mov esi,1
xor edx,edx
movd xmm0,eax
mov eax,1
call sse_round
.c1: mulss xmm0,xmm2
add edx,1
comiss xmm0,xmm3
jnc .c1
movd eax,xmm0
jmp .begin
;----------------------
.int: mov eax,0
call sse_round
.i: mulss xmm0,xmm2 ;0.1
movq xmm5,xmm0
roundss xmm5,xmm5,3
subss xmm0,xmm5
mulss xmm0,xmm3 ;10.0
cvtss2si eax,xmm0
add ecx,1
add ebx,1
add al,30h
movq xmm0,xmm5
push rax
comiss xmm0,xmm4 ;1.0
jnc .i
.save: pop rax
stosb
sub ecx,1
jnz .save
cmp esi,-2
je .done
mov al,'.'
stosb
comiss xmm1,xmm5
jnz .nxt
mov al,'0'
stosb
add ebx,1
jmp .enote
;----------------------
.nxt: mov eax,2
call sse_round
.frac: mulss xmm1,xmm3
movq xmm0,xmm1
roundss xmm0,xmm0,3
subss xmm1,xmm0
cvtss2si eax,xmm0
add al,30h
stosb
add ebx,1
cmp ebx,7
jne .frac
;----------------------
.cutz: cmp byte[rdi-1],'0'
jne .enote
sub rdi,1
cmp byte[rdi-1],'.'
jnz .cutz
add rdi,1
;----------------------
.enote: test esi,esi
jz .done
mov ax,'E+'
test esi,esi
jns .plus
mov ax,'E-'
.plus: stosw
cvtsi2ss xmm0,edx
mov esi,-2
jmp .int
;----------------------
.done: xor al,al
stosb
mov rax,rsp
call prnstrz
add rsp,16
pop rsi
pop rdi
pop rdx
pop rcx
pop rbx
pop rax
movdqa xmm0,[rsp ]
movdqa xmm1,[rsp+16]
movdqa xmm2,[rsp+32]
movdqa xmm3,[rsp+48]
movdqa xmm4,[rsp+64]
movdqa xmm5,[rsp+80]
mov rsp,rbp
pop rbp
ret
;---------------------------------
;prnfltr(1)
;Display rounded REAL4 precision
;---------------------------------
;EAX : Single value to display
;---------------------------------
;Ret : -
;Note : Use DD for vars
;---------------------------------
align 8
prnfltr:
push rbp
mov rbp,rsp
sub rsp,16*6
and rsp,-16
movdqa [rsp ],xmm0
movdqa [rsp+16],xmm1
movdqa [rsp+32],xmm2
movdqa [rsp+48],xmm3
movdqa [rsp+64],xmm4
movdqa [rsp+80],xmm5
push rax
push rbx
push rcx
push rdx
push rdi
push rsi
sub rsp,16
mov ecx,0x3f800000
mov ebx,0x3DCCCCCD
mov edx,0x41200000
movd xmm4,ecx
movd xmm2,ebx
movd xmm3,edx
xor rsi,rsi
cld
mov rdi,rsp
bt eax,31
jnc .zero
mov byte[rdi],'-'
add rdi,1
btr eax,31
;----------------------
.zero: mov ebx,eax
test eax,eax
jnz .inv
mov eax,'0.0'
stosd
sub rdi,1
jmp .done
;----------------------
.inv: shr ebx,23
mov ecx,127
cmp ebx,0x7ff
jne .norm
mov al,'#'
stosb
jmp .done
;----------------------
.norm: sub ebx,ecx
test ebx,ebx
js .small
cmp ebx,19
ja .big
;----------------------
.begin: movd xmm0,eax
movd xmm1,eax
roundss xmm0,xmm0,3
subss xmm1,xmm0
xor ecx,ecx
xor ebx,ebx
jmp .int
;----------------------
.small: movd xmm0,eax
mov esi,eax
xor edx,edx
mov eax,0
call sse_round
.c2: mulss xmm0,xmm3
add edx,1
comiss xmm0,xmm4
jc .c2
cmp edx,7
jb .nope
movd eax,xmm0
mov esi,-1
jmp .begin
.nope: mov eax,esi
xor esi,esi
jmp .begin
;----------------------
.big: mov esi,1
xor edx,edx
movd xmm0,eax
mov eax,1
call sse_round
.c1: mulss xmm0,xmm2
add edx,1
comiss xmm0,xmm3
jnc .c1
movd eax,xmm0
jmp .begin
;----------------------
.int: mov eax,0
call sse_round
.i: mulss xmm0,xmm2 ;0.1
movq xmm5,xmm0
roundss xmm5,xmm5,3
subss xmm0,xmm5
mulss xmm0,xmm3 ;10.0
cvtss2si eax,xmm0
add ecx,1
add ebx,1
add al,30h
movq xmm0,xmm5
push rax
comiss xmm0,xmm4 ;1.0
jnc .i
.save: pop rax
stosb
sub ecx,1
jnz .save
cmp esi,-2
je .done
mov al,'.'
stosb
comiss xmm1,xmm5
jnz .nxt
mov al,'0'
stosb
add ebx,1
jmp .enote
;----------------------
.nxt: push rdx
xor edx,edx
mov rax,0
call sse_round
.frac: mulss xmm1,xmm3
comiss xmm1,xmm4
jnc .no
add edx,1
movq xmm5,xmm1
mulss xmm5,xmm3
roundss xmm5,xmm5,0
comiss xmm5,xmm3
jnz .no
sub edx,1
.no: add ebx,1
cmp ebx,7
jne .frac
xor ecx,ecx
movq xmm0,xmm1
roundss xmm0,xmm0,0
.int2: mulss xmm0,xmm2
movq xmm5,xmm0
roundss xmm5,xmm5,3
subss xmm0,xmm5
mulss xmm0,xmm3
cvtss2si eax,xmm0
add ecx,1
add al,30h
movq xmm0,xmm5
push rax
comiss xmm0,xmm4
jnc .int2
test edx,edx
jz .save2
.looop: push '0'
add ecx,1
sub edx,1
jnz .looop
.save2: pop rax
stosb
sub ecx,1
jnz .save2
pop rdx
;----------------------
.cutz: cmp byte[rdi-1],'0'
jne .enote
sub rdi,1
cmp byte[rdi-1],'.'
jnz .cutz
add rdi,1
;----------------------
.enote: test esi,esi
jz .done
mov ax,'E+'
test esi,esi
jns .plus
mov ax,'E-'
.plus: stosw
cvtsi2ss xmm0,edx
mov esi,-2
jmp .int
;----------------------
.done: xor al,al
stosb
mov rax,rsp
call prnstrz
add rsp,16
pop rsi
pop rdi
pop rdx
pop rcx
pop rbx
pop rax
movdqa xmm0,[rsp ]
movdqa xmm1,[rsp+16]
movdqa xmm2,[rsp+32]
movdqa xmm3,[rsp+48]
movdqa xmm4,[rsp+64]
movdqa xmm5,[rsp+80]
mov rsp,rbp
pop rbp
ret
;---------------------------------
;prndble(2)
;Display REAL8 with decimal places
;---------------------------------
;RBX : Decimal places.
;RAX : Double value to display
;---------------------------------
;Ret : -
;Note : RBX must within reasonable range
; : RBX cannot be 0 or negative
; : Double is valid up to 16 digits
; : Rounding used = nearest
;---------------------------------
align 8
prndble:
push rbp
mov rbp,rsp
sub rsp,16*6
and rsp,-16
movdqa [rsp ],xmm0
movdqa [rsp+16],xmm1
movdqa [rsp+32],xmm2
movdqa [rsp+48],xmm3
movdqa [rsp+64],xmm4
movdqa [rsp+80],xmm5
push rax
push rbx
push rcx
push rdx
push rdi
push rsi
push rbp
sub rsp,64
mov rbp,rbx
mov rcx,0x3ff0000000000000
mov rbx,0x3FB999999999999A
mov rdx,0x4024000000000000
movq xmm4,rcx
movq xmm2,rbx
movq xmm3,rdx
xor rsi,rsi
cld
mov rdi,rsp
bt rax,63
jnc .zero
mov byte[rdi],'-'
add rdi,1
btr rax,63
;----------------------
.zero: mov rbx,rax
test rax,rax
jnz .inv
mov eax,'0.0'
stosd
sub rdi,1
jmp .done
;----------------------
.inv: shr rbx,52
mov rcx,1023
cmp rbx,0x7ff
jne .norm
mov al,'#'
stosb
jmp .done
;----------------------
.norm: sub rbx,rcx
test rbx,rbx
js .small
cmp rbx,49
ja .big
;----------------------
.begin: movq xmm0,rax
movq xmm1,rax
mov rax,0
call sse_round
roundsd xmm0,xmm0,3
subsd xmm1,xmm0
xor rcx,rcx
xor rbx,rbx
jmp .int
;----------------------
.small: movq xmm0,rax
mov rsi,rax
xor rdx,rdx
mov rax,0
call sse_round
.c2: mulsd xmm0,xmm3
add edx,1
comisd xmm0,xmm4
jc .c2
cmp edx,16
jb .nope
movq rax,xmm0
mov rsi,-1
jmp .begin
.nope: mov rax,rsi
xor rsi,rsi
jmp .begin
;----------------------
.big: mov esi,1
xor rdx,rdx
movq xmm0,rax
mov rax,1
call sse_round
.c1: mulsd xmm0,xmm2
add edx,1
comisd xmm0,xmm3
jnc .c1
movq rax,xmm0
jmp .begin
;----------------------
.int: mulsd xmm0,xmm2 ;0.1
movq xmm5,xmm0
roundsd xmm5,xmm5,3
subsd xmm0,xmm5
mulsd xmm0,xmm3 ;10.0
cvtsd2si rax,xmm0
add rcx,1
add rbx,1
add al,30h
movq xmm0,xmm5
push rax
comisd xmm0,xmm4 ;1.0
jnc .int
.save: pop rax
stosb
sub rcx,1
jnz .save
cmp rsi,-2
je .done
mov al,'.'
stosb
comisd xmm1,xmm5
jnz .nxt
mov al,'0'
stosb
add rbx,1
jmp .enote
;----------------------
.nxt: push rdx
test rsi,rsi
jns .n1
add rbx,1
.n1: xor rdx,rdx
mov rax,0
call sse_round
.frac: mulsd xmm1,xmm3
comisd xmm1,xmm4
jnc .no
add rdx,1
movq xmm5,xmm1
mulsd xmm5,xmm3
roundsd xmm5,xmm5,0
comisd xmm5,xmm3
jnz .no
sub rdx,1
.no: sub rbp,1
jnz .frac
xor rcx,rcx
movq xmm0,xmm1
roundsd xmm0,xmm0,0
.int2: mulsd xmm0,xmm2
movq xmm5,xmm0
roundsd xmm5,xmm5,3
subsd xmm0,xmm5
mulsd xmm0,xmm3
cvtsd2si rax,xmm0
add rcx,1
add al,30h
movq xmm0,xmm5
push rax
comisd xmm0,xmm4
jnc .int2
test rdx,rdx
jz .save2
.looop: push '0'
add rcx,1
sub rdx,1
jnz .looop
.save2: pop rax
stosb
sub rcx,1
jnz .save2
pop rdx
;----------------------
.enote: test rsi,rsi
jz .done
mov ax,'E+'
test rsi,rsi
jns .plus
mov ax,'E-'
.plus: stosw
cvtsi2sd xmm0,rdx
mov rsi,-2
jmp .int
;----------------------
.done: xor al,al
stosb
mov rax,rsp
call prnstrz
add rsp,64
pop rbp
pop rsi
pop rdi
pop rdx
pop rcx
pop rbx
pop rax
movdqa xmm0,[rsp ]
movdqa xmm1,[rsp+16]
movdqa xmm2,[rsp+32]
movdqa xmm3,[rsp+48]
movdqa xmm4,[rsp+64]
movdqa xmm5,[rsp+80]
mov rsp,rbp
pop rbp
ret
;----------------------------------------
;prndblx(1)
;Display extended precision (REAL10)
;----------------------------------------
;RAX : The address of a DT in memory
;----------------------------------------
;Ret : -
;Note : Var should be initd to FP (0.0)
; : Variable must be of type DT.
; : Displays unrounded precision
;----------------------------------------
;Stack partitioning
;val dt 0.0 ;rbp-10
;v1 dt 0.0 ;rbp-20
;v2 dt 0.0 ;rbp-30
;exp dq 0 ;rbp-38
;ten dq 10.0 ;rbp-46
;digit dd 0 ;rbp-50
;fstr rb 30 ;rbp-80
;save rb 512 ;rbp-592
;----------------------
align 8
prndblx:
push rbp
mov rbp,rsp
sub rsp,592
and rsp,-16
fxsave [rsp]
push rax
push rbx
push rcx
push rdx
push rdi
push rsi
mov rdx,0x4024000000000000
mov [rbp-46],rdx
mov qword[rbp-38],0
fninit
push rax
mov rax,1
call fpu_precision
pop rax
fldz
fst qword[rbp-10]
fst qword[rbp-20]
fst qword[rbp-30]
fistp dword[rbp-50]
xor rdx,rdx ;index
cld
lea rdi,[rbp-80]
mov rbx,rax
mov rax,[rbx]
mov [rbp-10],rax
mov ax,[rbx+8]
mov [rbp-2],ax
xor rbx,rbx
;--------------------------
.check: fld tword[rbp-10]
xor rax,rax
fxam
fnstsw ax
and eax,4500h
cmp eax,500h
je .err
cmp eax,100h
je .err
cmp eax,0
je .err
bt word[rbp-2],15
jnc .plus
mov al,'-'
stosb
btr word[rbp-2],15
fstp st0
fld tword[rbp-10]
.plus: fldz
fcomip st1
jnz .norm
mov eax,'0.0'
stosd
sub rdi,1
jmp .done
;--------------------------
.norm: fxtract
fstp st0
fistp qword[rbp-38]
mov rax,[rbp-38]
test rax,rax
js .small
cmp rax,60
jae .big
;--------------------------
.next: mov rcx,19 ;digit count
mov rax,3
call fpu_round
fld tword[rbp-10]
fld st0
frndint
fsub st1,st0
fstp tword[rbp-20] ;integer
fstp tword[rbp-30] ;fraction
;--------------------------
.temp1: xor rsi,rsi
fld tword[rbp-20]
jmp .int
;--------------------------
.big: mov bl,1
fld qword[rbp-46]
fld tword[rbp-10]
.nxt: fdiv st0,st1
inc rdx
fcomi st1
jnc .nxt
fstp tword[rbp-10]
fstp st0
jmp .next
;--------------------------
.small: fld qword[rbp-46]
fld tword[rbp-10]
.nxt2: fmul st0,st1
inc rdx
fld1
fcomip st1
jnc .nxt2
cmp rdx,19
jb .nope
fstp tword[rbp-10]
fstp st0
mov bl,2
jmp .next
.nope: fstp st0
xor rdx,rdx
fstp st0
jmp .next
;--------------------------
.int: fdiv qword[rbp-46]
fld st0
mov rax,3
call fpu_round
frndint
fsub st1,st0
fxch
fmul qword[rbp-46]
mov rax,0
call fpu_round
frndint
fistp dword[rbp-50]
mov al,[rbp-50]
push rax
inc rsi
fld1
fcomip st1
jbe .int
.get: pop rax
add al,30h
stosb
sub rcx,1
sub rsi,1
jnz .get
;--------------------------
.temp2: mov al,'.'
stosb
fstp st0
fld tword[rbp-30]
mov rax,1
call fpu_round
;--------------------------
.frac: fmul qword[rbp-46]
fld st0
frndint
fist dword[rbp-50]
mov al,[rbp-50]
add al,30h
stosb
fsubp st1,st0
sub rcx,1
jnz .frac
;--------------------------
.cutz: cmp byte[rdi-1],'0'
jne .done
sub rdi,1
cmp byte[rdi-1],'.'
jnz .cutz
add rdi,1
jmp .done
;--------------------------
.err: mov al,'#'
stosb
jmp .ok
;--------------------------
.done: cmp rdx,0
je .ok
mov ax,'e+'
cmp bl,1
je .yes
mov ax,'e-'
.yes: stosw
mov rax,rdx
mov rcx,10
xor rsi,rsi
.div: xor rdx,rdx
div rcx
add dl,30h
push rdx
inc rsi
test rax,rax
jnz .div
.again: pop rax
stosb
sub rsi,1
jnz .again
;--------------------------
.ok: xor al,al
stosb
lea rax,[rbp-80]
call prnstrz
pop rsi
pop rdi
pop rdx
pop rcx
pop rbx
pop rax
fxrstor [rsp]
mov rsp,rbp
pop rbp
ret
;------------------------------------
;dblsplit(1)/2
;Split a double into parts
;------------------------------------
;RAX : The FP value to split
;------------------------------------
;Ret : Integral part in RAX
; : Fraction part in RBX
;Note : Value in should in FP format
; : Deals normal FP value only
;------------------------------------
align 8
dblsplit:
push rbp
mov rbp,rsp
sub rsp,512
and rsp,-16
fxsave [rsp]
finit
push rax
mov rax,3
call fpu_round
fld qword[rsp]
fld st0
frndint
fsub st1,st0
fstp qword[rsp]
mov rax,[rsp]
fabs
fstp qword[rsp]
pop rbx
fxrstor [rsp]
mov rsp,rbp
pop rbp
ret
;-----------------------------
;fpdinfo(1)
;Display Double FP information
;-----------------------------
;RAX : FP value to analyze
;-----------------------------
;Note : -
;Ret : -
;-----------------------------
align 8
fpdinfo:
push rbp
mov rbp,rsp
sub rsp,512
and rsp,-16
fxsave [rsp]
push rax
push rdx
push rcx
call prnhexu
call prnline
call fpbin
call prnline
push rax
fninit
fld qword[rsp]
fxtract
fstp qword[rsp]
mov rdx,[rsp]
fistp qword[rsp]
pop rcx
mov rax,'SIGN: '
call prnstreg
mov eax,0x0a30
bt rdx,63
jnc .nope
mov eax,0x0a31
.nope: call prnstreg
mov rax,'EXP : '
call prnstreg
mov rax,rcx
call prnint
call prnline
mov rax,'MANT: '
call prnstreg
mov rax,rdx
btr rax,63
call prndbl
pop rcx
pop rdx
pop rax
fxrstor [rsp]
mov rsp,rbp
pop rbp
ret
;----------------------------
;fpfinfo(1)
;Display Float FP information
;----------------------------
;EAX : FP value to analyze
;----------------------------
;Ret : -
;Note : -
;----------------------------
align 8
fpfinfo:
push rbp
mov rbp,rsp
sub rsp,512
and rsp,-16
fxsave [rsp]
push rax
push rdx
push rcx
push rbx
call prnhexu
call prnline
call fpbind
call prnline
push rax
fninit
fld dword[rsp]
fxtract
fstp dword[rsp]
mov rdx,[rsp]
fistp dword[rsp]
pop rcx
mov rax,'SIGN: '
call prnstreg
mov al,'0'
bt edx,31
jnc .nope
mov al,'1'
.nope: call prnchr
call prnline
mov rax,'EXP : '
call prnstreg
mov rax,rcx
mov rbx,1
call prnintd
call prnline
mov rbx,6
mov rax,'MANT: '
call prnstreg
mov eax,edx
btr eax,31
call prnflt
pop rbx
pop rcx
pop rdx
pop rax
fxrstor [rsp]
mov rsp,rbp
pop rbp
ret
;---------------------------
;dec2str(2)
;Convert signed int to
;0-ended dec string
;---------------------------
;RBX : Buffer's address
;RAX : Integer to convert
;---------------------------
;Ret : String in buffer
;Note : Buffer must be large enough
;---------------------------
align 8
dec2str:
push rax
push rdx
push rcx
push rsi
push rdi
cld
mov rdi,rbx
xor rsi,rsi
mov rcx,10
test rax,rax
jns .more
mov byte[rdi],'-'
neg rax
inc rdi
.more: xor rdx,rdx
div rcx
push rdx
inc rsi
test rax,rax
jnz .more
.get: pop rax
add al,30h
stosb
sub rsi,1
jnz .get
xor al,al
stosb
pop rdi
pop rsi
pop rcx
pop rdx
pop rax
ret
;---------------------------
;dec2stru(2)
;Convert unsigned int to
;0-ended dec string
;---------------------------
;RBX : Buffer's address
;RAX : Integer to convert
;---------------------------
;Ret : String in buffer
;Note : Buffer must be large enough
;---------------------------
align 8
dec2stru:
push rax
push rdx
push rcx
push rsi
push rdi
cld
mov rdi,rbx
xor rsi,rsi
mov rcx,10
.more: xor rdx,rdx
div rcx
push rdx
inc rsi
test rax,rax
jnz .more
.get: pop rax
add al,30h
stosb
sub rsi,1
jnz .get
xor al,al
stosb
pop rdi
pop rsi
pop rcx
pop rdx
pop rax
ret
;---------------------------
;hex2str(2)
;Convert signed int to
;0-ended hex string
;---------------------------
;RBX : Buffer's address
;RAX : Integer to convert
;---------------------------
;Ret : String in buffer
;Note : Buffer must be large enough
;---------------------------
align 8
hex2str:
push rax
push rbx
push rcx
push rsi
push rdi
cld
mov rdi,rbx
test rax,rax
jns .plus
mov byte[rdi],'-'
neg rax
inc rdi
.plus: mov rbx,rax
xor rsi,rsi
.more: xor eax,eax
shrd rax,rbx,4
shr rax,60
add al,30h
cmp al,'9'
jbe .digit
add al,7
.digit: push rax
inc rsi
shr rbx,4
jnz .more
.get: pop rax
stosb
sub rsi,1
jnz .get
xor al,al
stosb
pop rdi
pop rsi
pop rcx
pop rbx
pop rax
ret
;---------------------------
;hex2stru(2)
;Convert unsigned int to
;0-ended hex string
;---------------------------
;RBX : Buffer's address
;RAX : Integer to convert
;---------------------------
;Ret : String in buffer
;Note : Buffer must be large enough
;---------------------------
align 8
hex2stru:
push rax
push rbx
push rcx
push rsi
push rdi
cld
mov rdi,rbx
mov rbx,rax
xor rsi,rsi
.more: xor eax,eax
shrd rax,rbx,4
shr rax,60
add al,30h
cmp al,'9'
jbe .digit
add al,7
.digit: push rax
inc rsi
shr rbx,4
jnz .more
.get: pop rax
stosb
sub rsi,1
jnz .get
xor al,al
stosb
pop rdi
pop rsi
pop rcx
pop rbx
pop rax
ret
;-------------------------------
;bin2str(2)
;Convert signed bin to
;0-ended string
;-------------------------------
;RBX : Buffer's address
;RAX : Integer to convert
;-------------------------------
;Ret : String in buffer
;Note : Buffer > 66 bytes
;-------------------------------
align 8
bin2str:
push rdi
push rax
push rcx
push rdx
cld
mov rdi,rbx
test rax,rax
jnz .norm
mov al,'0'
stosb
jmp .done
.norm: mov rdx,rax
bsr rcx,rax
test rax,rax
jns .plus
neg rax
mov byte[rdi],'-'
inc rdi
.plus: mov rdx,rax
bsr rcx,rax
.next: mov al,'0'
bt rdx,rcx
jnc .zero
mov al,'1'
.zero: stosb
sub rcx,1
jns .next
.done: xor al,al
stosb
pop rdx
pop rcx
pop rax
pop rdi
ret
;-------------------------------
;bin2stru(2)
;Convert unsigned bin to
;0-ended string
;-------------------------------
;RBX : Buffer's address
;RAX : Integer to convert
;-------------------------------
;Ret : String in buffer
;Note : Buffer > 64 bytes
;-------------------------------
align 8
bin2stru:
push rdi
push rax
push rcx
push rdx
cld
mov rdi,rbx
test rax,rax
jnz .norm
mov al,'0'
stosb
jmp .done
.norm: mov rdx,rax
bsr rcx,rax
.next: mov al,'0'
bt rdx,rcx
jnc .zero
mov al,'1'
.zero: stosb
sub rcx,1
jns .next
.done: xor al,al
stosb
pop rdx
pop rcx
pop rax
pop rdi
ret
;---------------------------------
;flt2str(2)
;Convert float to 0-ended string
;---------------------------------
;RBX : Address of buffer
;EAX : Single value to convert
;---------------------------------
;Ret : -
;Note : Use DD for vars
; : Buffer size > 15
;---------------------------------
align 8
flt2str:
push rbp
mov rbp,rsp
sub rsp,16*6
and rsp,-16
movdqa [rsp ],xmm0
movdqa [rsp+16],xmm1
movdqa [rsp+32],xmm2
movdqa [rsp+48],xmm3
movdqa [rsp+64],xmm4
movdqa [rsp+80],xmm5
push rax
push rbx
push rcx
push rdx
push rdi
push rsi
cld
mov edi,ebx
mov ecx,__float32__(1.0)
mov ebx,__float32__(0.1)
mov edx,__float32__(10.0)
movd xmm4,ecx
movd xmm2,ebx
movd xmm3,edx
xor rsi,rsi
bt eax,31
jnc .zero
mov byte[rdi],'-'
add rdi,1
btr eax,31
;----------------------
.zero: mov ebx,eax
test eax,eax
jnz .inv
mov eax,'0.0'
stosd
sub rdi,1
jmp .done
;----------------------
.inv: shr ebx,23
mov ecx,127
cmp ebx,0x7ff
jne .norm
mov al,'#'
stosb
jmp .done
;----------------------
.norm: sub ebx,ecx
test ebx,ebx
js .small
cmp ebx,19
ja .big
;----------------------
.begin: movd xmm0,eax
movd xmm1,eax
;mov eax,0
;call sse_round
roundss xmm0,xmm0,3
subss xmm1,xmm0
xor ecx,ecx
xor ebx,ebx
jmp .int
;----------------------
.small: movd xmm0,eax
mov esi,eax
xor edx,edx
mov eax,0
call sse_round
.c2: mulss xmm0,xmm3
add edx,1
comiss xmm0,xmm4
jc .c2
cmp edx,7
jb .nope
movd eax,xmm0
mov esi,-1
jmp .begin
.nope: mov eax,esi
xor esi,esi
jmp .begin
;----------------------
.big: mov esi,1
xor edx,edx
movd xmm0,eax
mov eax,1
call sse_round
.c1: mulss xmm0,xmm2
add edx,1
comiss xmm0,xmm3
jnc .c1
movd eax,xmm0
jmp .begin
;----------------------
.int: mov eax,0
call sse_round
.i: mulss xmm0,xmm2 ;0.1
movq xmm5,xmm0
roundss xmm5,xmm5,3
subss xmm0,xmm5
mulss xmm0,xmm3 ;10.0
cvtss2si eax,xmm0
add ecx,1
add ebx,1
add al,30h
movq xmm0,xmm5
push rax
comiss xmm0,xmm4 ;1.0
jnc .i
.save: pop rax
stosb
sub ecx,1
jnz .save
cmp esi,-2
je .done
mov al,'.'
stosb
comiss xmm1,xmm5
jnz .nxt
mov al,'0'
stosb
add ebx,1
jmp .enote
;----------------------
.nxt: push rdx
xor edx,edx
mov rax,0
call sse_round
.frac: mulss xmm1,xmm3
comiss xmm1,xmm4
jnc .no
add edx,1
movq xmm5,xmm1
mulss xmm5,xmm3
roundss xmm5,xmm5,0
comiss xmm5,xmm3
jnz .no
sub edx,1
.no: add ebx,1
cmp ebx,7
jne .frac
xor ecx,ecx
movq xmm0,xmm1
roundss xmm0,xmm0,0
.int2: mulss xmm0,xmm2
movq xmm5,xmm0
roundss xmm5,xmm5,3
subss xmm0,xmm5
mulss xmm0,xmm3
cvtss2si eax,xmm0
add ecx,1
add al,30h
movq xmm0,xmm5
push rax
comiss xmm0,xmm4
jnc .int2
test edx,edx
jz .save2
.looop: push '0'
add ecx,1
sub edx,1
jnz .looop
.save2: pop rax
stosb
sub ecx,1
jnz .save2
pop rdx
;----------------------
.cutz: cmp byte[rdi-1],'0'
jne .enote
sub rdi,1
cmp byte[rdi-1],'.'
jnz .cutz
add rdi,1
;----------------------
.enote: test esi,esi
jz .done
mov ax,'E+'
test esi,esi
jns .plus
mov ax,'E-'
.plus: stosw
cvtsi2ss xmm0,edx
mov esi,-2
jmp .int
;----------------------
.done: xor al,al
stosb
pop rsi
pop rdi
pop rdx
pop rcx
pop rbx
pop rax
movdqa xmm0,[rsp ]
movdqa xmm1,[rsp+16]
movdqa xmm2,[rsp+32]
movdqa xmm3,[rsp+48]
movdqa xmm4,[rsp+64]
movdqa xmm5,[rsp+80]
mov rsp,rbp
pop rbp
ret
;---------------------------------
;dbl2str(3)
;Convert double to 0-ended string
;with decimal places
;---------------------------------
;RCX : Address of buffer
;RBX : Decimal places
;RAX : Double value to display
;---------------------------------
;Ret : -
;Note : RBX must within reasonable range
; : RBX cannot be 0 or negative
; : Normals are valid up to 16 digits
; : Rounding used = nearest
; : Buffer > 24
;---------------------------------
align 8
dbl2str:
push rbp
mov rbp,rsp
sub rsp,16*6
and rsp,-16
movdqa [rsp ],xmm0
movdqa [rsp+16],xmm1
movdqa [rsp+32],xmm2
movdqa [rsp+48],xmm3
movdqa [rsp+64],xmm4
movdqa [rsp+80],xmm5
push rax
push rbx
push rcx
push rdx
push rdi
push rsi
push rbp
cld
mov rdi,rcx
mov rbp,rbx
mov rcx,0x3ff0000000000000
mov rbx,0x3FB999999999999A
mov rdx,0x4024000000000000
movq xmm4,rcx
movq xmm2,rbx
movq xmm3,rdx
xor rsi,rsi
bt rax,63
jnc .zero
mov byte[rdi],'-'
add rdi,1
btr rax,63
;----------------------
.zero: mov rbx,rax
test rax,rax
jnz .inv
mov eax,'0.0'
stosd
sub rdi,1
jmp .done
;----------------------
.inv: shr rbx,52
mov rcx,1023
cmp rbx,0x7ff
jne .norm
mov al,'#'
stosb
jmp .done
;----------------------
.norm: sub rbx,rcx
test rbx,rbx
js .small
cmp rbx,49
ja .big
;----------------------
.begin: movq xmm0,rax
movq xmm1,rax
mov rax,0
call sse_round
roundsd xmm0,xmm0,3
subsd xmm1,xmm0
xor rcx,rcx
xor rbx,rbx
jmp .int
;----------------------
.small: movq xmm0,rax
mov rsi,rax
xor rdx,rdx
mov rax,0
call sse_round
.c2: mulsd xmm0,xmm3
add edx,1
comisd xmm0,xmm4
jc .c2
cmp edx,16
jb .nope
movq rax,xmm0
mov rsi,-1
jmp .begin
.nope: mov rax,rsi
xor rsi,rsi
jmp .begin
;----------------------
.big: mov esi,1
xor rdx,rdx
movq xmm0,rax
mov rax,1
call sse_round
.c1: mulsd xmm0,xmm2
add edx,1
comisd xmm0,xmm3
jnc .c1
movq rax,xmm0
jmp .begin
;----------------------
.int: mulsd xmm0,xmm2 ;0.1
movq xmm5,xmm0
roundsd xmm5,xmm5,3
subsd xmm0,xmm5
mulsd xmm0,xmm3 ;10.0
cvtsd2si rax,xmm0
add rcx,1
add rbx,1
add al,30h
movq xmm0,xmm5
push rax
comisd xmm0,xmm4 ;1.0
jnc .int
.save: pop rax
stosb
sub rcx,1
jnz .save
cmp rsi,-2
je .done
mov al,'.'
stosb
comisd xmm1,xmm5
jnz .nxt
mov al,'0'
stosb
add rbx,1
jmp .enote
;----------------------
.nxt: push rdx
test rsi,rsi
jns .n1
add rbx,1
.n1: xor rdx,rdx
mov rax,0
call sse_round
.frac: mulsd xmm1,xmm3
comisd xmm1,xmm4
jnc .no
add rdx,1
movq xmm5,xmm1
mulsd xmm5,xmm3
roundsd xmm5,xmm5,0
comisd xmm5,xmm3
jnz .no
sub rdx,1
.no: sub rbp,1
jnz .frac
xor rcx,rcx
movq xmm0,xmm1
roundsd xmm0,xmm0,0
.int2: mulsd xmm0,xmm2
movq xmm5,xmm0
roundsd xmm5,xmm5,3
subsd xmm0,xmm5
mulsd xmm0,xmm3
cvtsd2si rax,xmm0
add rcx,1
add al,30h
movq xmm0,xmm5
push rax
comisd xmm0,xmm4
jnc .int2
test rdx,rdx
jz .save2
.looop: push '0'
add rcx,1
sub rdx,1
jnz .looop
.save2: pop rax
stosb
sub rcx,1
jnz .save2
pop rdx
;----------------------
.enote: test rsi,rsi
jz .done
mov ax,'E+'
test rsi,rsi
jns .plus
mov ax,'E-'
.plus: stosw
cvtsi2sd xmm0,rdx
mov rsi,-2
jmp .int
;----------------------
.done: xor al,al
stosb
pop rbp
pop rsi
pop rdi
pop rdx
pop rcx
pop rbx
pop rax
movdqa xmm0,[rsp ]
movdqa xmm1,[rsp+16]
movdqa xmm2,[rsp+32]
movdqa xmm3,[rsp+48]
movdqa xmm4,[rsp+64]
movdqa xmm5,[rsp+80]
mov rsp,rbp
pop rbp
ret
;------------------------------------
;dblx2str(2)
;Convert REAL10 to 0-ended string
;------------------------------------
;RBX : Address of buffer ( > 27 )
;RAX : Address of a DT in memory
;------------------------------------
;Ret : -
;Note : Variable must be of type DT
; : Unrounded precision
;------------------------------------
;Stack partitioning
;val dt 0.0 ;10
;v1 dt 0.0 ;20
;v2 dt 0.0 ;30
;exp dq 0 ;38
;ten dq 10.0 ;46
;digit dd 0 ;50
;save rb 512 ;562
;----------------------
align 8
dblx2str:
push rbp
mov rbp,rsp
sub rsp,562
and rsp,-16
fxsave [rsp]
push rax
push rbx
push rcx
push rdx
push rdi
push rsi
mov rdx,__float64__(10.0)
mov [rbp-46],rdx
mov qword[rbp-38],0
fninit
push rax
mov rax,1
call fpu_precision
pop rax
fldz
fst qword[rbp-10]
fst qword[rbp-20]
fst qword[rbp-30]
fistp dword[rbp-50]
xor rdx,rdx ;index
cld
mov rdi,rbx
mov rbx,rax
mov rax,[rbx]
mov [rbp-10],rax
mov ax,[rbx+8]
mov [rbp-2],ax
xor rbx,rbx
;--------------------------
.check: fld tword[rbp-10]
xor rax,rax
fxam
fnstsw ax
and eax,4500h
cmp eax,500h
je .err
cmp eax,100h
je .err
cmp eax,0
je .err
bt word[rbp-2],15
jnc .plus
mov al,'-'
stosb
btr word[rbp-2],15
fstp st0
fld tword[rbp-10]
.plus: fldz
fcomip st1
jnz .norm
mov eax,'0.0'
stosd
sub rdi,1
jmp .done
;--------------------------
.norm: fxtract
fstp st0
fistp qword[rbp-38]
mov rax,[rbp-38]
test rax,rax
js .small
cmp rax,60
jae .big
;--------------------------
.next: mov rcx,19 ;digit count
mov rax,3
call fpu_round
fld tword[rbp-10]
fld st0
frndint
fsub st1,st0
fstp tword[rbp-20] ;integer
fstp tword[rbp-30] ;fraction
;--------------------------
.temp1: xor rsi,rsi
fld tword[rbp-20]
jmp .int
;--------------------------
.big: mov bl,1
fld qword[rbp-46]
fld tword[rbp-10]
.nxt: fdiv st0,st1
inc rdx
fcomi st1
jnc .nxt
fstp tword[rbp-10]
fstp st0
jmp .next
;--------------------------
.small: fld qword[rbp-46]
fld tword[rbp-10]
.nxt2: fmul st0,st1
inc rdx
fld1
fcomip st1
jnc .nxt2
cmp rdx,19
jb .nope
fstp tword[rbp-10]
fstp st0
mov bl,2
jmp .next
.nope: fstp st0
xor rdx,rdx
fstp st0
jmp .next
;--------------------------
.int: fdiv qword[rbp-46]
fld st0
mov rax,3
call fpu_round
frndint
fsub st1,st0
fxch
fmul qword[rbp-46]
mov rax,0
call fpu_round
frndint
fistp dword[rbp-50]
mov al,[rbp-50]
push rax
inc rsi
fld1
fcomip st1
jbe .int
.get: pop rax
add al,30h
stosb
sub rcx,1
sub rsi,1
jnz .get
;--------------------------
.temp2: mov al,'.'
stosb
fstp st0
fld tword[rbp-30]
mov rax,1
call fpu_round
;--------------------------
.frac: fmul qword[rbp-46]
fld st0
frndint
fist dword[rbp-50]
mov al,[rbp-50]
add al,30h
stosb
fsubp st1,st0
sub rcx,1
jnz .frac
;--------------------------
.cutz: cmp byte[rdi-1],'0'
jne .done
sub rdi,1
cmp byte[rdi-1],'.'
jnz .cutz
add rdi,1
jmp .done
;--------------------------
.err: mov al,'#'
stosb
jmp .ok
;--------------------------
.done: cmp rdx,0
je .ok
mov ax,'e+'
cmp bl,1
je .yes
mov ax,'e-'
.yes: stosw
mov rax,rdx
mov rcx,10
xor rsi,rsi
.div: xor rdx,rdx
div rcx
add dl,30h
push rdx
inc rsi
test rax,rax
jnz .div
.again: pop rax
stosb
sub rsi,1
jnz .again
;--------------------------
.ok: xor al,al
stosb
pop rsi
pop rdi
pop rdx
pop rcx
pop rbx
pop rax
fxrstor [rsp]
mov rsp,rbp
pop rbp
ret
;-------------------------------------------
;readint/1
;Get multi suffix integer from keyboard
;-------------------------------------------
;Arg : -
;-------------------------------------------
;Ret : Integer in RAX
;Note : Expected Suffix- b(binary), d(dec)
; : h(hex), o,q(octal). d is optional
; : Variable must be of type DQ
; : Digits must be in valid format
;-------------------------------------------
align 8
readint:
sub rsp,80
mov rax,rsp
call readstr
cmp rax,-1
je .err
mov rax,rsp
call str2int
jmp .done
.err: mov rax,0
.done: add rsp,80
ret
;-------------------------------------
;readdbl/1
;Get double-precision from stdin
;-------------------------------------
;Arg : -
;-------------------------------------
;Ret : Double precision in RAX
;Note : Var must be initd to fp (0.0)
; : Var must be of type DQ
; : Doesn't take E format
; : Must use fp format for input
;-------------------------------------
align 8
readdbl:
sub rsp,64
mov rax,rsp
call readstr
cmp rax,-1
je .err
mov rax,rsp
call str2dbl
jmp .done
.err: mov rax,0
.done: add rsp,64
ret
;-------------------------------------
;readflt/1
;Get single-precision from stdin
;-------------------------------------
;Arg : -
;-------------------------------------
;Ret : Single precision in EAX
;Note : Var must be init to fp (0.0)
; : Doesn't take E format
; : Must use fp format for input
;-------------------------------------
align 8
readflt:
sub rsp,64
mov rax,rsp
call readstr
cmp rax,-1
je .err
mov rax,rsp
call str2flt
jmp .done
.err: mov eax,0
.done: add rsp,64
ret
;------------------------
;fpu_stack
;Display FPU stack
;------------------------
;Arg : -
;------------------------
;Ret : -
;Note : Display is real10
;------------------------
align 8
fpu_stack:
push rdi
push rdx
push rbx
push rax
sub rsp,32
xor rdx,rdx
mov rdi,rsp
cld
mov ax,'ST'
stosw
.again: mov al,dl
add al,30h
stosb
mov ax,': '
stosw
xor rax,rax
fxam
fnstsw ax
and eax,4500h ;Mask C3, C2 & C0
cmp eax,4100h ;Empty
jne .ok
mov eax,'...'
stosd
sub rdi,1
mov rax,rsp
mov rbx,8
call prnstr
jmp .ok2
.ok: mov rax,rsp
mov rbx,5
call prnstr
fstp tword[rsp+20]
fld tword[rsp+20]
fclex
lea rax,[rsp+20]
call prndblx
.ok2: cmp rdx,7
je .out
fincstp ;rotate stack
add rdx,1
mov rdi,rsp
call prnline
add rdi,2
jmp .again
.out: fincstp
call prnline
add rsp,32
pop rax
pop rbx
pop rdx
pop rdi
ret
;-----------------------
;fpu_sflag
;Display FPU Status Flag
;-----------------------
;Arg : -
;-----------------------
;Ret : -
;Note : -
;-----------------------
align 8
fpu_sflag:
push rax
push rdx
push rcx
push rdi
push rsi
sub rsp,16*4
mov rdi,rsp
mov rax,'B C3 TP '
stosq
mov rax,'TP TP C2'
stosq
mov rax,' C1 C0 I'
stosq
mov rax,'R SF P '
stosq
mov rax,' U O Z'
stosq
mov rax,' D I '
stosq
mov ax,0x000a
stosw
mov rax,rsp
call prnstrz
xor rax,rax
fnstsw ax
mov dx,ax
mov rsi,rax
mov rcx,15
mov rdi,rsp
.go1: mov eax,'0 '
shl dx,1
jnc .y
mov eax,'1 '
.y: stosd
sub rdi,1
sub rcx,1
jns .go1
.out: sub rdi,1
mov ax,0x003d
stosw
mov rax,rsp
call prnstrz
mov rax,rsi
call prnhexu
call prnline
add rsp,16*4
pop rsi
pop rdi
pop rcx
pop rdx
pop rax
ret
;------------------------
;fpu_cflag
;Display FPU Control Flag
;------------------------
;Arg : -
;------------------------
;Ret : -
;Note : -
;------------------------
align 8
fpu_cflag:
push rax
push rdx
push rcx
push rdi
push rsi
sub rsp,16*4
mov rax,' '
mov rdx,'IC RC RC'
mov rcx,' PC PC I'
mov rdi,'EM PM '
mov rsi,'UM OM ZM'
mov [rsp ],rax
mov [rsp+8 ],rdx
mov [rsp+16],rcx
mov [rsp+24],rdi
mov [rsp+32],rsi
mov rdx,' DM IM '
mov [rsp+40],rdx
mov eax,0x0a
xor rdx,rdx
mov [rsp+48],ax
mov rax,rsp
call prnstrz
fnstcw [rsp]
mov rcx,15
mov dx,[rsp]
mov rsi,rdx
cld
mov rdi,rsp
.go1: mov eax,'0 '
shl dx,1
jnc .y
mov eax,'1 '
.y: stosd
sub rdi,1
sub rcx,1
jns .go1
.out: sub rdi,1
mov ax,0x003d
stosw
mov rax,rsp
call prnstrz
mov rax,rsi
call prnhexu
call prnline
add rsp,16*4
pop rsi
pop rdi
pop rcx
pop rdx
pop rax
ret
;------------------------
;fpu_tag
;Display FPU Tag Register
;------------------------
;Arg : -
;------------------------
;Ret : -
;Note : 00 = valid
; : 01 = zero
; : 10 = invalid
; : 11 = empty
;------------------------
align 8
fpu_tag:
push rax
push rcx
push rdx
push rdi
sub rsp,32
xor rcx,rcx
xor rdx,rdx
mov rdi,rsp
mov rax,'T7 T6 T5'
stosq
mov rax,' T4 T3 T'
stosq
mov rax,'2 T1 T0 '
stosq
sub rdi,1
mov ax,0x000a
stosw
mov rax,rsp
call prnstrz
fstenv [rsp]
mov dx,[rsp+8]
push rdx
mov cx,8
.again: mov al,'0'
shl dx,1
jnc .nop
mov al,'1'
.nop: call prnchr
mov al,'0'
shl dx,1
jnc .nop2
mov al,'1'
.nop2: call prnchr
sub cx,1
jz .done
call prnspace
jmp .again
.done: mov al,'='
call prnchr
pop rax
call prnhexu
call prnline
add rsp,32
pop rdi
pop rdx
pop rcx
pop rax
ret
;---------------------------------
;fpu_reg(1)
;Display one FPU stack register
;---------------------------------
;RAX : Stack # to display (0-7)
;---------------------------------
;Ret : -
;Note : Special values show nothing
; : fld tword[x+16*2] ;st0
;---------------------------------
align 8
fpu_reg:
push rcx
push rax
xor rcx,rcx
test rax,rax
js .done
cmp rax,7
ja .done
.again: cmp rcx,rax
je .ok
fincstp
add rcx,1
cmp rcx,7
jne .again
.ok: fst qword[rsp]
fxam
fnstsw ax
and eax,4500h
cmp eax,4000h
jne .next
mov qword[rsp],0
jmp .nxt
.next: cmp eax,4100h
je .done
cmp eax,500h
je .done
cmp eax,100h
je .done
cmp eax,0
je .done
.nxt: mov rax,[rsp]
call prndbl
.done: pop rax
pop rcx
ret
;------------------------------
;fpu_copy(1)/1
;Copy a FPU register
;------------------------------
;RAX : Stack # to copy (0-7)
;------------------------------
;Ret : Copied value in RAX
;Note : -
;------------------------------
align 8
fpu_copy:
push rdi
push rax
mov rdi,rax
xor eax,eax
.go: cmp rax,rdi
jne .a
fst qword[rsp]
.a: fincstp
add rax,1
cmp rax,8
jne .go
.done: mov rax,[rsp]
add rsp,8
pop rdi
ret
;---------------------------------
;fpu_precision(1)
;Set FPU precision control
;---------------------------------
;RAX : Rounding mode;
; 0 = real8
; 1 = real10
; 2 = real4
;---------------------------------
;Ret : -
;Note : FSAVE/FINIT will reset it
;---------------------------------
align 8
fpu_precision:
sub rsp,8
fnstcw [rsp]
cmp rax,1
je .r10
cmp rax,2
je .r4
.r8: bts word[rsp],9
btr word[rsp],8
jmp .done
.r10: bts word[rsp],9
bts word[rsp],8
jmp .done
.r4: btr word[rsp],9
btr word[rsp],8
.done: fldcw [rsp]
add rsp,8
ret
;---------------------------------
;fpu_round(1)
;Set FPU rounding control
;---------------------------------
;RAX : Rounding mode;
; 0 = near
; 1 = down
; 2 = up
; 3 = zero
;---------------------------------
;Ret : -
;Note : FSAVE/FINIT will reset it
;---------------------------------
align 8
fpu_round:
push rbx
sub rsp,8
fnstcw [rsp]
mov bx,[rsp]
cmp rax,1
je .down
cmp rax,2
je .up
cmp rax,3
je .zero
.near: and bx,0xf3ff
jmp .done
.down: and bx,0xf7ff
or bx,0x400
jmp .done
.up: or bx,0x800
and bx,0xfbff
jmp .done
.zero: or bx,0xc00
.done: mov [rsp],bx
fldcw [rsp]
add rsp,8
pop rbx
ret
;---------------------------
;sse_round(1)
;Set SSE rounding control
;---------------------------
;RAX : Rounding mode;
; 0 = near
; 1 = down
; 2 = up
; 3 = zero
;---------------------------
;Ret : -
;Note : -
;---------------------------
align 8
sse_round:
push rbx
sub rsp,8
stmxcsr [rsp]
mov ebx,[rsp]
cmp rax,1
je .down
cmp rax,2
je .up
cmp rax,3
je .zero
.near: and ebx,0xffff9fff
jmp .done
.down: and ebx,0xffffbfff
or ebx,0x2000
jmp .done
.up: or ebx,0x4000
and ebx,0xffffdfff
jmp .done
.zero: or ebx,0x6000
.done: mov [rsp],ebx
ldmxcsr [rsp]
add rsp,8
pop rbx
ret
;---------------------------------
;sse_flags
;Display MXCSR register
;---------------------------------
;Arg : -
;---------------------------------
;Ret : -
;Note : -
;---------------------------------
align 8
sse_flags:
push rax
push rdx
push rcx
push rdi
push rsi
sub rsp,64
stmxcsr [rsp]
mov edx,[rsp]
mov esi,[rsp]
cld
mov rdi,rsp
mov rax,'FZ RC RC'
stosq
mov rax,' PM UM O'
stosq
mov rax,'M ZM DM '
stosq
mov rax,'IM DZ PE'
stosq
mov rax,' UE OE Z'
stosq
mov rax,'E DE IE '
stosq
sub rdi,1
mov eax,0x0a
stosw
mov rax,rsp
call prnstrz
mov ecx,15
mov rdi,rsp
.again: mov eax,'0 '
shl dx,1
jnc .ok
mov eax,'1 '
.ok: stosd
sub rdi,1
sub ecx,1
jns .again
sub rdi,1
mov ax,0x003d
stosw
mov rax,rsp
call prnstrz
mov eax,esi
call prnhexu
call prnline
add rsp,64
pop rsi
pop rdi
pop rcx
pop rdx
pop rax
ret
;-----------------------------
;prnmmx(2)
;Display MMX register
;-----------------------------
;RBX : Type of display:
; 0 - unsigned byte
; 1 - signed byte
; 2 - unsigned word
; 3 - signed word
; 4 - unsigned dword
; 5 - signed dword
;RAX : Register number(0-7)
;-----------------------------
;Ret : -
;Note: : -
;-----------------------------
align 8
prnmmx:
push rbp
mov rbp,rsp
sub rsp,512
and rsp,-16
fxsave [rsp]
push rax
push rbx
push rdi
push rcx
sub rsp,8
mov rcx,8
mov edi,ebx
cmp rax,0
je .mm0
cmp rax,1
je .mm1
cmp rax,2
je .mm2
cmp rax,3
je .mm3
cmp rax,4
je .mm4
cmp rax,5
je .mm5
cmp rax,6
je .mm6
cmp rax,7
je .mm7
jmp .done
.mm0: movq [rsp],mm0
jmp .nxt
.mm1: movq [rsp],mm1
jmp .nxt
.mm2: movq [rsp],mm2
jmp .nxt
.mm3: movq [rsp],mm3
jmp .nxt
.mm4: movq [rsp],mm4
jmp .nxt
.mm5: movq [rsp],mm5
jmp .nxt
.mm6: movq [rsp],mm6
jmp .nxt
.mm7: movq [rsp],mm7
.nxt: cmp edi,0
je .unsigned
cmp edi,2
je .unsigned
cmp edi,4
je .unsigned
jmp .signed
.unsigned:
mov edi,0
cmp ebx,0
je .ubyte
cmp ebx,2
je .uword
cmp ebx,4
je .udword
jmp .done
.signed:
mov edi,1
cmp ebx,1
je .sbyte
cmp ebx,3
je .sword
cmp ebx,5
je .sdword
jmp .done
.ubyte: mov ebx,edi
.l1: mov eax,[rsp+rcx-1]
and eax,0xff
call prnintb
call prnspace
sub rcx,1
jnz .l1
jmp .done
.uword: mov ebx,edi
.l3: mov eax,[rsp+rcx-2]
and eax,0xffff
call prnintw
call prnspace
sub rcx,2
jnz .l3
jmp .done
.udword:
mov ebx,edi
.l5: mov eax,[rsp+rcx-4]
call prnintd
call prnspace
sub rcx,4
jnz .l5
jmp .done
.sbyte: mov ebx,edi
.l2: mov eax,[rsp+rcx-1]
and eax,0xff
call prnintb
call prnspace
sub rcx,1
jnz .l2
jmp .done
.sword: mov ebx,edi
.l4: mov eax,[rsp+rcx-2]
and eax,0xffff
call prnintw
call prnspace
sub rcx,2
jnz .l4
jmp .done
.sdword:
mov ebx,edi
.l6: mov eax,[rsp+rcx-4]
call prnintd
call prnspace
sub rcx,4
jnz .l6
.done: add rsp,8
pop rcx
pop rdi
pop rbx
pop rax
fxrstor [rsp]
mov rsp,rbp
pop rbp
ret
;----------------------------------
;dumpmmx(1)
;Dump MMX registers
;----------------------------------
;RAX : Type of display:
; 0 - Unsigned integer BYTE
; 1 - Signed integer BYTE
; 2 - Unsigned integer WORD
; 3 - Signed integer WORD
; 4 - Unsigned integer DWORD
; 5 - Signed integer DWORD
;----------------------------------
;Ret : -
;Note : -
;----------------------------------
align 8
dumpmmx:
push rax
push rcx
push rbx
push rdx
mov rcx,rax
cmp rcx,5
ja .done
xor rdx,rdx
.again: mov eax,'mm'
call prnstreg
mov rax,rdx
call prnintu
mov eax,': '
call prnstreg
mov rax,rdx
mov rbx,rcx
call prnmmx
add rdx,1
cmp rdx,8
jz .done
call prnline
jmp .again
.done: call prnline
pop rdx
pop rbx
pop rcx
pop rax
ret
;-------------------------------------
;prnxmm(2)
;Display XMM register
;-------------------------------------
;RBX : Type of display:
; 0 - Signed integer BYTE
; 1 - Unsigned integer BYTE
; 2 - Signed integer WORD
; 3 - Unsigned integer WORD
; 4 - Signed integer DWORD
; 5 - Unsigned integer DWORD
; 6 - Signed integer QWORD
; 7 - Unsigned integer QWORD
; 8 - Singles
; 9 - Doubles
; 10- Unsigned hex
; 11- Signed hex
;RAX : Register number to display
;-------------------------------------
;Ret : -
;Note : -
;-------------------------------------
align 8
prnxmm:
push rax
push rbx
sub rsp,16
cmp eax,0
jz .xmm0
cmp eax,1
jz .xmm1
cmp eax,2
jz .xmm2
cmp eax,3
jz .xmm3
cmp eax,4
jz .xmm4
cmp eax,5
jz .xmm5
cmp eax,6
jz .xmm6
cmp eax,7
jz .xmm7
cmp eax,8
jz .xmm8
cmp eax,9
jz .xmm9
cmp eax,10
jz .xmm10
cmp eax,11
jz .xmm11
cmp eax,12
jz .xmm12
cmp eax,13
jz .xmm13
cmp eax,14
jz .xmm14
cmp eax,15
jz .xmm15
jmp .err
.xmm0: movdqu [rsp],xmm0
jmp .disp
.xmm1: movdqu [rsp],xmm1
jmp .disp
.xmm2: movdqu [rsp],xmm2
jmp .disp
.xmm3: movdqu [rsp],xmm3
jmp .disp
.xmm4: movdqu [rsp],xmm4
jmp .disp
.xmm5: movdqu [rsp],xmm5
jmp .disp
.xmm6: movdqu [rsp],xmm6
jmp .disp
.xmm7: movdqu [rsp],xmm7
jmp .disp
.xmm8: movdqu [rsp],xmm8
jmp .disp
.xmm9: movdqu [rsp],xmm9
jmp .disp
.xmm10: movdqu [rsp],xmm10
jmp .disp
.xmm11: movdqu [rsp],xmm11
jmp .disp
.xmm12: movdqu [rsp],xmm12
jmp .disp
.xmm13: movdqu [rsp],xmm13
jmp .disp
.xmm14: movdqu [rsp],xmm14
jmp .disp
.xmm15: movdqu [rsp],xmm15
.disp: cmp ebx,0
je .byte_unsigned
cmp ebx,1
je .byte_signed
cmp ebx,2
je .word_unsigned
cmp ebx,3
je .word_signed
cmp ebx,4
je .dword_unsigned
cmp ebx,5
je .dword_signed
cmp ebx,6
je .qword_unsigned
cmp ebx,7
je .qword_signed
cmp ebx,8
je .singles
cmp ebx,9
je .doubles
cmp ebx,10
je .hexu
cmp ebx,11
je .hex
jmp .err
.byte_signed:
mov ebx,1
jmp .byte
.byte_unsigned:
mov ebx,0
.byte: mov al,[rsp+15]
call prnintb
call prnspace
mov al,[rsp+14]
call prnintb
call prnspace
mov al,[rsp+13]
call prnintb
call prnspace
mov al,[rsp+12]
call prnintb
call prnspace
mov al,[rsp+11]
call prnintb
call prnspace
mov al,[rsp+10]
call prnintb
call prnspace
mov al,[rsp+9]
call prnintb
call prnspace
mov al,[rsp+8]
call prnintb
call prnspace
mov al,[rsp+7]
call prnintb
call prnspace
mov al,[rsp+6]
call prnintb
call prnspace
mov al,[rsp+5]
call prnintb
call prnspace
mov al,[rsp+4]
call prnintb
call prnspace
mov al,[rsp+3]
call prnintb
call prnspace
mov al,[rsp+2]
call prnintb
call prnspace
mov al,[rsp+1]
call prnintb
call prnspace
mov al,[rsp]
call prnintb
jmp .done
.word_signed:
mov ebx,1
jmp .word
.word_unsigned:
mov ebx,0
.word: mov ax,[rsp+14]
call prnintw
call prnspace
mov ax,[rsp+12]
call prnintw
call prnspace
mov ax,[rsp+10]
call prnintw
call prnspace
mov ax,[rsp+8]
call prnintw
call prnspace
mov al,'|'
call prnchr
call prnspace
mov ax,[rsp+6]
call prnintw
call prnspace
mov ax,[rsp+4]
call prnintw
call prnspace
mov ax,[rsp+2]
call prnintw
call prnspace
mov ax,[rsp]
call prnintw
jmp .done
.dword_signed:
mov ebx,1
jmp .dword
.dword_unsigned:
mov ebx,0
.dword: mov eax,[rsp+12]
call prnintd
call prnspace
mov eax,[rsp+8]
call prnintd
mov al,'|'
call prnchr
mov eax,[rsp+4]
call prnintd
call prnspace
mov eax,[rsp]
call prnintd
jmp .done
.qword_unsigned:
mov rax,[rsp+8]
call prnintu
mov al,'|'
call prnchr
mov rax,[rsp]
call prnintu
jmp .done
.qword_signed:
mov rax,[rsp+8]
call prnint
mov al,'|'
call prnchr
mov rax,[rsp]
call prnint
jmp .done
.singles:
mov eax,[rsp+12]
call prnfltr
mov al,'|'
call prnchr
mov eax,[rsp+8]
call prnfltr
mov al,'|'
call prnchr
mov eax,[rsp+4]
call prnfltr
mov al,'|'
call prnchr
mov eax,[rsp]
call prnfltr
jmp .done
.doubles:
mov rax,[rsp+8]
call prndblr
mov al,'|'
call prnchr
mov rax,[rsp]
call prndblr
jmp .done
.hex: mov rax,[rsp+8]
call prnhex
mov al,'|'
call prnchr
mov rax,[rsp]
call prnhex
jmp .done
.hexu: mov rax,[rsp+8]
call prnhexu
mov al,'|'
call prnchr
mov rax,[rsp]
call prnhexu
jmp .done
.err: mov al,'#'
call prnchr
.done: add rsp,16
pop rbx
pop rax
ret
;----------------------------------
;dumpxmm(1)
;Dump XMM registers
;----------------------------------
;RAX : Type of display:
; 0 - Unsigned integer BYTE
; 1 - Signed integer BYTE
; 2 - Unsigned integer WORD
; 3 - Signed integer WORD
; 4 - Unsigned integer DWORD
; 5 - Signed integer DWORD
; 6 - Unsigned integer QWORD
; 7 - Signed integer QWORD
; 8 - Singles
; 9 - Doubles
; 10 - Unsigned hex QWORD
; 11 - Signed hex QWORD
;----------------------------------
;Ret : -
;Note : -
;----------------------------------
align 8
dumpxmm:
push rax
push rcx
push rbx
push rdx
mov rcx,rax
cmp rcx,11
ja .done
xor rdx,rdx
.again: mov rax,'XMM'
call prnstreg
mov rax,rdx
call prnintu
cmp rdx,9
ja .nope
call prnspace
.nope: mov rax,': '
call prnstreg
mov rax,rdx
mov rbx,rcx
call prnxmm
add rdx,1
cmp rdx,16
jz .done
call prnline
jmp .again
.done: call prnline
pop rdx
pop rbx
pop rcx
pop rax
ret
;-------------------------------
;clearxmm
;Clear all xmm registers
;-------------------------------
;Arg : -
;-------------------------------
;Ret : -
;Note : -
;-------------------------------
align 8
clearxmm:
pxor xmm0,xmm0
pxor xmm1,xmm1
pxor xmm2,xmm2
pxor xmm3,xmm3
pxor xmm4,xmm4
pxor xmm5,xmm5
pxor xmm6,xmm6
pxor xmm7,xmm7
pxor xmm8,xmm8
pxor xmm9,xmm9
pxor xmm10,xmm10
pxor xmm11,xmm11
pxor xmm12,xmm12
pxor xmm13,xmm13
pxor xmm14,xmm14
pxor xmm15,xmm15
ret
;---------------------------------
;prnymm(2)
;Display YMM register
;---------------------------------
;RBX : Display as;
; 0 - Floats
; 1 - Doubles
;RAX : Register number
;---------------------------------
;Ret : -
;Note : Needs AVX CPU
; : Use qqword for transfers
;---------------------------------
align 8
prnymm:
push rax
push rbx
push rcx
push rdx
push rdi
push rsi
sub rsp,32
mov rdi,rax
mov rsi,rbx
mov eax,1
cpuid
bt ecx,28
jc .avx
mov rax,'avx#'
call prnstreg
jmp .done
.avx: mov rbx,rsi
mov rax,rdi
cmp rax,0
je .ymm0
cmp rax,1
je .ymm1
cmp rax,2
je .ymm2
cmp rax,3
je .ymm3
cmp rax,4
je .ymm4
cmp rax,5
je .ymm5
cmp rax,6
je .ymm6
cmp rax,7
je .ymm7
cmp rax,8
je .ymm8
cmp rax,9
je .ymm9
cmp rax,10
je .ymm10
cmp rax,11
je .ymm11
cmp rax,12
je .ymm12
cmp rax,13
je .ymm13
cmp rax,14
je .ymm14
cmp rax,15
je .ymm15
jmp .done
.ymm0: vmovdqu [rsp],ymm0
jmp .next
.ymm1: vmovdqu [rsp],ymm1
jmp .next
.ymm2: vmovdqu [rsp],ymm2
jmp .next
.ymm3: vmovdqu [rsp],ymm3
jmp .next
.ymm4: vmovdqu [rsp],ymm4
jmp .next
.ymm5: vmovdqu [rsp],ymm5
jmp .next
.ymm6: vmovdqu [rsp],ymm6
jmp .next
.ymm7: vmovdqu [rsp],ymm7
jmp .next
.ymm8: vmovdqu [rsp],ymm8
jmp .next
.ymm9: vmovdqu [rsp],ymm9
jmp .next
.ymm10: vmovdqu [rsp],ymm10
jmp .next
.ymm11: vmovdqu [rsp],ymm11
jmp .next
.ymm12: vmovdqu [rsp],ymm12
jmp .next
.ymm13: vmovdqu [rsp],ymm13
jmp .next
.ymm14: vmovdqu [rsp],ymm14
jmp .next
.ymm15: vmovdqu [rsp],ymm15
.next: cmp rbx,0
je .float
mov rax,[rsp+24]
call prndblr
push '|'
call prnchrs
mov rax,[rsp+16]
call prndblr
push '|'
call prnchrs
mov rax,[rsp+8]
call prndblr
push '|'
call prnchrs
mov rax,[rsp]
call prndblr
jmp .done
.float: mov eax,[rsp+28]
call prnfltr
push '|'
call prnchrs
mov eax,[rsp+24]
call prnfltr
push '|'
call prnchrs
mov eax,[rsp+20]
call prnfltr
push '|'
call prnchrs
mov eax,[rsp+16]
call prnfltr
push '|'
call prnchrs
mov eax,[rsp+12]
call prnfltr
push '|'
call prnchrs
mov eax,[rsp+8]
call prnfltr
push '|'
call prnchrs
mov eax,[rsp+4]
call prnfltr
push '|'
call prnchrs
mov eax,[rsp]
call prnfltr
.done: add rsp,32
pop rsi
pop rdi
pop rdx
pop rcx
pop rbx
pop rax
ret
;----------------------------------
;dumpymm(1)
;Dump YMM registers
;----------------------------------
;RAX : Type of display:
; 0 - Floats
; 1 - Doubles
;----------------------------------
;Ret : -
;Note : Needs AVX CPU
;----------------------------------
align 8
dumpymm:
push rax
push rcx
push rbx
push rdx
push rax
mov eax,1
cpuid
bt ecx,28
jc .avx
mov rax,'avx#'
call prnstreg
pop rax
jmp .done
.avx: pop rcx
cmp rcx,1
ja .done
xor rdx,rdx
.again: mov rax,'YMM'
call prnstreg
mov rax,rdx
call prnintu
cmp rdx,9
ja .nope
call prnspace
.nope: mov rax,': '
call prnstreg
mov rax,rdx
mov rbx,rcx
call prnymm
add rdx,1
cmp rdx,16
jz .done
call prnline
jmp .again
.done: call prnline
pop rdx
pop rbx
pop rcx
pop rax
ret
;-------------------------------
;clearymm
;Clear all ymm registers
;-------------------------------
;Arg : -
;-------------------------------
;Ret : -
;Note : Needs AVX CPU
;-------------------------------
align 8
clearymm:
push rax
push rcx
push rdx
push rbx
mov eax,1
cpuid
bt ecx,28
jc .avx
mov rax,'avx#'
call prnstreg
jmp .done
.avx: vzeroall
.done: pop rbx
pop rdx
pop rcx
pop rax
ret
;-------------------------------
;prnintd(2)
;Display 32-bit Decimal
;-------------------------------
;RBX : 0-unsigned. 1-signed
;EAX : Value to display.
;-------------------------------
;Ret : -
;Note : Internal use
;-------------------------------
align 8
prnintd:
push rax
push rcx
push rdx
push rsi
push rdi
sub rsp,16
xor rsi,rsi
test bl,bl
jz .nop
test eax,eax
jns .nop
neg eax
mov rsi,1
.nop: mov rdi,rsp
add rdi,15
mov byte[rdi],0
dec rdi
mov ecx,10
.go: xor rdx,rdx
div ecx
add dl,30h
mov [rdi],dl
dec rdi
test eax,eax
jnz .go
test bl,bl
jz .done
test rsi,rsi
jz .done
mov byte[rdi],'-'
dec rdi
.done: mov rax,rdi
add rax,1
call prnstrz
add rsp,16
pop rdi
pop rsi
pop rdx
pop rcx
pop rax
ret
;-------------------------------
;prnintw(2)
;Display 16-bit Decimal
;-------------------------------
;RBX : 0-unsigned. 1-signed
;AX : Value to display.
;-------------------------------
;Ret : -
;Note : Internal use
;-------------------------------
align 8
prnintw:
push rax
push rcx
push rdx
push rdi
push rsi
sub rsp,16
xor rsi,rsi
test bl,bl
jz .nop
test ax,ax
jns .nop
neg ax
mov rsi,1
.nop: mov rdi,rsp
add rdi,15
mov byte[rdi],0
dec rdi
mov cx,10
.go: xor rdx,rdx
div cx
add dl,30h
mov [rdi],dl
sub rdi,1
test ax,ax
jnz .go
test bl,bl
jz .nope
test rsi,rsi
jz .nope
mov byte[rdi],'-'
dec rdi
.nope: mov rax,rdi
add rax,1
call prnstrz
add rsp,16
pop rsi
pop rdi
pop rdx
pop rcx
pop rax
ret
;-------------------------------
;prnintb(2)
;Display Byte Decimal
;-------------------------------
;RBX : 0-unsigned. 1-signed
;AL : Value to display.
;-------------------------------
;Ret : -
;Note : Internal use
;-------------------------------
align 8
prnintb:
push rax
push rdx
push rcx
push rbx
push rdi
push rsi
sub rsp,16
cld
mov rdi,rsp
mov cl,10
xor rsi,rsi
mov dl,bl
xor rbx,rbx
test dl,dl
jz .nope
test al,al
jns .nope
mov byte[rdi],'-'
add rdi,1
neg al
.nope: xor ah,ah
div cl
mov bl,ah
push rbx
add rsi,1
test al,al
jnz .nope
.ok: pop rax
add al,30h
stosb
sub rsi,1
jnz .ok
xor al,al
stosb
mov rax,rsp
call prnstrz
add rsp,16
pop rsi
pop rdi
pop rbx
pop rcx
pop rdx
pop rax
ret
;---------------------------------------
;int2str(4)
;Convert int to string
;---------------------------------------
;RDX : Signness. 0=unsigned. 1=signed
;RCX : Target base (2, 8, 10 or 16)
;RBX : Buffers address
;RAX : Value
;---------------------------------------
;Ret : String in the sent buffer
;Note : Buffer size must reflect # of digits
; : String will be 0-ended
;---------------------------------------
align 8
int2str:
push rax
push rbx
push rcx
push rdx
push rdi
cld
mov rdi,rbx
test rax,rax
jnz .ok
mov al,'0'
stosb
jmp .done
.ok: test rdx,rdx
jz .uns
test rax,rax
jns .uns
neg rax
mov byte[rdi],'-'
add rdi,1
.uns: cmp rcx,2
je .bin
cmp rcx,8
je .oct
cmp rcx,10
je .dec
cmp rcx,16
je .hex
mov al,'#'
call prnchr
jmp .done
.bin: mov rdx,rax
bsr rcx,rax
.next: mov al,'0'
bt rdx,rcx
jnc .zero
mov al,'1'
.zero: stosb
sub rcx,1
jns .next
jmp .done
.dec:
.oct: xor rbx,rbx
.nxt: xor rdx,rdx
div rcx
push rdx
inc rbx
test rax,rax
jnz .nxt
.get: pop rax
add al,30h
stosb
sub rbx,1
jnz .get
jmp .done
.hex: mov rbx,rax
.leadz: xor rax,rax
shld rax,rbx,4
test al,al
jnz .more
shl rbx,4
jmp .leadz
.more: xor rax,rax
shld rax,rbx,4
add al,30h
cmp al,'9'
jbe .low
add al,7
.low: stosb
.skip: shl rbx,4
jnz .more
.done: xor al,al
stosb
pop rdi
pop rdx
pop rcx
pop rbx
pop rax
ret
;-----------------------------------------
;str2int(1)/1
;Convert 0-ended string to integer
;-----------------------------------------
;RAX : Address of the 0-ended string
;-----------------------------------------
;Ret : Integer in RAX
;Note : Expected Suffix- b(bin), d(dec)
; : h(hex), o,q(octal). 'd' is optional
; : String must be of type DB
; : Digits string must be valid
;-----------------------------------------
align 8
str2int:
push rbx
push rcx
push rdx
push rsi
push rdi
push r8
mov rsi,rax
xor rdi,rdi
xor r8,r8
call str_toupper
call str_length
mov rcx,rax
mov rbx,rax
mov al,[rsi]
add rsi,1
cmp al,'-'
jne .nope
sub rbx,1
mov r8b,1
jmp .pen
.get1: mov al,[rsi]
add rsi,1
.nope: push rax
.pen: sub rcx,1
jnz .get1
sub rbx,1
pop rax
cmp al,'H'
je .hex
cmp al,'O'
je .oct
cmp al,'Q'
je .oct
cmp al,'B'
je .bin
cmp al,'D'
je .dec
push rax
add rbx,1
.dec: mov rcx,rbx
mov rbx,1
mov rsi,10
.loopd: pop rax
cmp al,0x27
je .skipd
cmp al,'_'
je .skipd
sub al,30h
mul rbx
add rdi,rax
mov rax,rsi
mul rbx
mov rbx,rax
.skipd: sub rcx,1
jnz .loopd
jmp .done
.oct: mov rcx,rbx
mov rbx,1
mov rsi,8
.loopo: pop rax
cmp al,0x27
je .skipo
cmp al,'_'
je .skipo
sub al,30h
mul rbx
add rdi,rax
mov rax,rsi
mul rbx
mov rbx,rax
.skipo: sub rcx,1
jnz .loopo
jmp .done
.bin: mov rcx,rbx
xor rsi,rsi
.loopb: pop rax
cmp al,0x27
je .skipb
cmp al,'_'
je .skipb
cmp al,'1'
jne .zero
bts rdi,rsi
.zero: add rsi,1
.skipb: sub rcx,1
jnz .loopb
jmp .done
.hex: mov rcx,rbx
mov rbx,1
mov rsi,16
.looph: pop rax
cmp al,0x27
je .skiph
cmp al,'_'
je .skiph
cmp al,'9'
jbe .norm
sub al,7h
.norm: sub al,30h
mul rbx
add rdi,rax
mov rax,rsi
mul rbx
mov rbx,rax
.skiph: sub rcx,1
jnz .looph
jmp .done
.done: test r8,r8
jz .ok
neg rdi
.ok: mov rax,rdi
pop r8
pop rdi
pop rsi
pop rdx
pop rcx
pop rbx
ret
;------------------------------------
;str2dbl(1)/1
;Convert string to double
;------------------------------------
;RAX : Address of a 0-ended string
;------------------------------------
;Ret : Double-precision in RAX
;Note : -
;------------------------------------
align 8
str2dbl:
push rbp
mov rbp,rsp
sub rsp,544
and rsp,-16
fxsave [rsp]
push rcx
push rbx
push rdx
push rsi
push rdi
mov rcx,0x3ff0000000000000
mov [rbp-12],rcx
mov ebx,0x41200000
mov [rbp-4],ebx
mov rsi,rax
xor rax,rax
xor rdi,rdi
mov al,[rsi]
xor rbx,rbx
cmp al,'-'
jne .ok
mov rdi,1
.again: add rsi,1
mov al,[rsi]
.ok: cmp al,0
je .done
cmp al,'.'
jne .point
mov rdx,rbx
jmp .again
.point: sub al,30h
push rax
add rbx,1
jmp .again
.done: pop qword[rbp-28]
fninit
fild qword[rbp-28]
fstp qword[rbp-20]
mov rcx,rbx
sub rcx,1
.rr: fld qword[rbp-12]
fmul dword[rbp-4]
fst qword[rbp-12]
pop qword[rbp-28]
fild qword[rbp-28]
fmul st0,st1
fld qword[rbp-20]
fadd st0,st1
fstp qword[rbp-20]
fstp st0
fstp st0
sub rcx,1
jnz .rr
mov rcx,rbx
sub rcx,rdx
fld qword[rbp-20]
.d: fdiv dword[rbp-4]
sub rcx,1
jnz .d
.quit: fstp qword[rbp-20]
mov rax,[rbp-20]
cmp rdi,1
jne .out
bts rax,63
.out: pop rdi
pop rsi
pop rdx
pop rbx
pop rcx
fxrstor [rsp]
mov rsp,rbp
pop rbp
ret
;------------------------------------
;str2flt(1)/1
;Convert string to float
;------------------------------------
;RAX : Address of a 0-ended string
;------------------------------------
;Ret : Single-precision in EAX
;Note : -
;------------------------------------
align 8
str2flt:
push rbp
mov rbp,rsp
sub rsp,544
and rsp,-16
fxsave [rsp]
push rcx
push rbx
push rdx
push rsi
push rdi
mov dword[rbp-12],0x3f800000
mov dword[rbp-4],0x41200000
xor rbx,rbx
mov rsi,rax
xor rax,rax
xor rdi,rdi
mov al,[rsi]
cmp al,'-'
jne .ok
mov rdi,1
.again: add rsi,1
mov al,[rsi]
.ok: cmp al,0
je .done
cmp al,'.'
jne .point
mov rdx,rbx
jmp .again
.point: sub al,30h
push rax
add rbx,1
jmp .again
.done: pop qword[rbp-28]
fninit
fild dword[rbp-28]
fstp dword[rbp-20]
mov rcx,rbx
sub rcx,1
.rr: fld dword[rbp-12]
fmul dword[rbp-4]
fst dword[rbp-12]
pop qword[rbp-28]
fild dword[rbp-28]
fmul st0,st1
fld dword[rbp-20]
fadd st0,st1
fstp dword[rbp-20]
fstp st0
fstp st0
sub rcx,1
jnz .rr
mov rcx,rbx
sub rcx,rdx
fld dword[rbp-20]
.d: fdiv dword[rbp-4]
sub rcx,1
jnz .d
.quit: fstp dword[rbp-20]
mov eax,[rbp-20]
cmp rdi,1
jne .out
bts rax,31
.out: pop rdi
pop rsi
pop rdx
pop rbx
pop rcx
fxrstor [rsp]
mov rsp,rbp
pop rbp
ret
;------------------------------------
;dbl2int(1)/1
;Convert real to integer
;------------------------------------
;RAX : FP value to convert
;------------------------------------
;Ret : Integer in RAX
;Note : Precision will be truncated
; : Input must be in FP format
; : Use sse_round for rounding
;------------------------------------
align 8
dbl2int:
push rbp
mov rbp,rsp
sub rsp,16
and rsp,-16
movdqa [rsp],xmm0
movq xmm0,rax
cvtsd2si rax,xmm0
movdqa xmm0,[rsp]
mov rsp,rbp
pop rbp
ret
;--------------------------------
;int2dbl(1)/1
;Convert integer to real
;--------------------------------
;RAX : Integer value to convert
;--------------------------------
;Ret : Real in RAX
;Note : -
;--------------------------------
align 8
int2dbl:
push rbp
mov rbp,rsp
sub rsp,16
and rsp,-16
movdqa [rsp],xmm0
cvtsi2sd xmm0,rax
movq rax,xmm0
movdqa xmm0,[rsp]
mov rsp,rbp
pop rbp
ret
;----------------------------
;isint(1)/1
;Check if a double is a qualified integer
;----------------------------
;RAX : FP value to check
;----------------------------
;Ret : 0-no,1-yes
;Note : Test normal FP values only
;----------------------------
align 8
isint:
push rbp
mov rbp,rsp
sub rsp,512
and rsp,-16
fxsave [rsp]
push rcx
push rax
finit
fld qword[rsp]
fxtract
fstp st0
fistp qword[rsp]
pop rcx
add rcx,12
shl rax,cl
jz .done
mov rax,-1
.done: pop rcx
add rax,1
fxrstor [rsp]
mov rsp,rbp
pop rbp
ret
;------------------------------
;rndint/1
;Generate 1 random integer
;------------------------------
;RAX : -
;------------------------------
;Ret : Random integer in RAX
;Note : 0x8088405 is Delphi's magic number
;------------------------------
align 8
rndint:
push rbx
push rdx
rdtsc
mov rbx,rax
mov rax,0x8088405
mul rbx
ror rax,8
pop rdx
pop rbx
ret
;-------------------------------
;rand(1)/1
;Get 1 random unsigned int
;-------------------------------
;RAX : Max value (range, 0 to Max)
;-------------------------------
;Ret : Random int in RAX
;Note : 0 - MAX inclusive
; : 0x8088405 is Delphi's magic number
;-------------------------------
align 8
rand:
push rbx
push rcx
push rdx
push rsi
mov rbx,rax
bsr rcx,rax
xor rax,rax
add rcx,1
bts rax,rcx
sub rax,1
mov rcx,rax
rdtsc
mov esi,0x8088405
mul rsi
ror rax,8
and rax,rcx
cmp rax,rbx
jbe .done
shr rax,1
.done: pop rsi
pop rdx
pop rcx
pop rbx
ret
;-------------------------------
;randq(2)
;Generate unique random integers
;from 0 to MAX-1 and save in array
;-------------------------------
;RBX : Addr. of array initialized to -1
;RAX : MAX value
;-------------------------------
;Ret : Random elements in array
;Note : Example: MAX = 50
; elems TIMES 50 dq -1
;-------------------------------
align 8
randq:
push rax
push rbx
push rcx
push rdi
mov rcx,0
mov rdi,rax
.go: mov rax,rdi
call rand
cmp qword[rbx+rax*8],-1
jne .go
mov qword[rbx+rax*8],rcx
add rcx,1
cmp rcx,rdi
jne .go
pop rdi
pop rcx
pop rbx
pop rax
ret
;----------------------------
;factorial(1)/1
;Get factorial
;----------------------------
;RAX : +Value
;----------------------------
;Ret : Factorial in RAX
;Note : Limit to 20! only
;----------------------------
align 8
factorial:
push rbx
push rcx
push rdx
cmp rax,20
jbe .nxt1
xor rdx,rdx
jmp .done
.nxt1: cmp rax,1
ja .nxt
mov edx,1
jmp .done
.nxt: xor rdx,rdx
mov rcx,rax
sub rcx,1
mov rbx,rax
sub rbx,1
.go: mul rbx
add rdx,rax
sub rbx,1
sub rcx,1
jnz .go
.done: mov rax,rdx
pop rdx
pop rcx
pop rbx
ret
;---------------------------------
;powint(2)/1
;Calculate 64-bit integral power
;---------------------------------
;RBX : +Exponent/power (int)
;RAX : Base (int)
;---------------------------------
;Ret : Result in RAX
; : # if overflow
;Note : Var must be of type DQ
; : Takes +exponent only
;---------------------------------
align 8
powint:
push rdx
push rbx
push rcx
push rdx
push rsi
xor rsi,rsi
test rax,rax
jns .ok
neg rax
mov rsi,1
.ok: mov rcx,rax
cmp rax,2
je .base2
cmp rbx,1
jz .done
cmp rbx,0
jnz .nxt
mov rax,1
jmp .done
.nxt: test rbx,rbx
jnz .again
mov rax,1
jmp .done
.again: mul rcx
jo .overflow
sub rbx,1
cmp rbx,1
je .done
jmp .again
.base2: mov rax,1
mov rcx,rbx
shl rax,cl
jnz .done
.overflow:
mov al,'#'
call prnchr
xor rax,rax
jmp .ok2
.done: test rsi,rsi
jz .ok2
neg rax
.ok2: pop rsi
pop rdx
pop rcx
pop rbx
pop rdx
ret
;-------------------------------
;pow2(1)/1
;Calculate 2^n
;-------------------------------
;RAX : +pow (int). Max=63
;-------------------------------
;Ret : raised integer
;Note : RAX must be integer
;-------------------------------
align 8
pow2:
push rbp
mov rbp,rsp
sub rsp,512
and rsp,-16
fxsave [rsp]
cmp rax,63
jbe .ok
push '#'
call prnchrs
jmp .done
.ok: push rax
finit
fild qword[rsp]
fld1
fscale
fistp qword[rsp]
pop rax
.done: fxrstor [rsp]
mov rsp,rbp
pop rbp
ret
;--------------------------------
;iseven(1)/1
;Check if even number
;--------------------------------
;RAX : Number to check
;--------------------------------
;Ret : RAX - 0 if no. 1 if yes
;Note :
;--------------------------------
align 8
iseven:
shr ax,1
jnc .yes
mov eax,0
ret
.yes: mov eax,1
ret
;--------------------------------
;isodd(1)/1
;Check if odd number
;--------------------------------
;RAX : Integer to check
;--------------------------------
;Ret : RAX - 0 if no. 1 if yes
;Note :
;--------------------------------
align 8
isodd:
shr ax,1
jc .yes
mov eax,0
ret
.yes: mov eax,1
ret
;--------------------------------------
;bconv(2)
;Convert and display integer
;--------------------------------------
;RBX : Display base to use (2 to 36)
;RAX : Integer to convert
;--------------------------------------
;Ret : -
;Note : Imm value is limited to 32-bit
;--------------------------------------
align 8
bconv:
push rdx
push rax
push rcx
push rbx
xor rcx,rcx
.start: xor rdx,rdx
div rbx
push rdx
add rcx,1
test rax,rax
jnz .start
.fine: pop rax
add al,0x30
cmp rax,0x39
jbe .num
add al,7
.num: call prnchr
sub rcx,1
jnz .fine
.done: pop rbx
pop rcx
pop rax
pop rdx
ret
;-------------------------------------
;bitfield(3)
;Display a bitfield from a 64-bit data
;-------------------------------------
;RCX : lower bit
;RBX : higher bit
;RAX : Value to be extracted from
;-------------------------------------
;Ret : -
;Note : Display bit range
;-------------------------------------
align 8
bitfield:
push rbx
push rdi
push rsi
push rax
sub rsp,72
mov rdi,rsp
mov rsi,rax
.no: mov al,'0'
bt rsi,rbx
jnc .zero
mov al,'1'
.zero: stosb
cmp rbx,rcx
je .done
sub rbx,1
jmp .no
.done: xor al,al
stosb
mov rax,rsp
call prnstrz
add rsp,72
pop rax
pop rsi
pop rdi
pop rbx
ret
;-----------------------------
;addf(2)/1
;Floating Point ADD
;-----------------------------
;RBX : Value 2 in FP format
;RAX : Value 1 in FP format
;-----------------------------
;Ret : Value in RAX
;Note : RAX=RAX+RBX
;-----------------------------
align 8
addf:
push rbp
mov rbp,rsp
sub rsp,32
and rsp,-16
movdqa [rsp],xmm0
movdqa [rsp+16],xmm1
movq xmm0,rax
movq xmm1,rbx
addsd xmm0,xmm1
movq rax,xmm0
movdqa xmm0,[rsp]
movdqa xmm1,[rsp+16]
mov rsp,rbp
pop rbp
ret
;-----------------------------
;subf(2)/1
;Floating Point SUB
;-----------------------------
;RBX : Value 2 in FP format
;RAX : Value 1 in FP format
;-----------------------------
;Ret : Value in RAX
;Note : RAX=RAX-RBX
;-----------------------------
align 8
subf:
push rbp
mov rbp,rsp
sub rsp,32
and rsp,-16
movdqa [rsp],xmm0
movdqa [rsp+16],xmm1
movq xmm0,rax
movq xmm1,rbx
subsd xmm0,xmm1
movq rax,xmm0
movdqa xmm0,[rsp]
movdqa xmm1,[rsp+16]
mov rsp,rbp
pop rbp
ret
;-----------------------------
;mulf(2)/1
;Floating Point MUL
;-----------------------------
;RBX : Value 2 in FP format
;RAX : Value 1 in FP format
;-----------------------------
;Ret : Value in RAX
;Note : RAX=RAX*RBX
;-----------------------------
align 8
mulf:
push rbp
mov rbp,rsp
sub rsp,32
and rsp,-16
movdqa [rsp],xmm0
movdqa [rsp+16],xmm1
movq xmm0,rax
movq xmm1,rbx
mulsd xmm0,xmm1
movq rax,xmm0
movdqa xmm0,[rsp]
movdqa xmm1,[rsp+16]
mov rsp,rbp
pop rbp
ret
;-----------------------------
;divf(2)/1
;Floating Point DIV
;-----------------------------
;RBX : Divisor in FP format
;RAX : Dividend in FP format
;-----------------------------
;Ret : Value in RAX
;Note : RAX=RAX/RBX
;-----------------------------
align 8
divf:
push rbp
mov rbp,rsp
sub rsp,32
and rsp,-16
movdqa [rsp],xmm0
movdqa [rsp+16],xmm1
movq xmm0,rax
movq xmm1,rbx
divsd xmm0,xmm1
movq rax,xmm0
movdqa xmm0,[rsp]
movdqa xmm1,[rsp+16]
mov rsp,rbp
pop rbp
ret
;---------------------------------
;pow(2)/1
;Calculate x^n
;---------------------------------
;RBX : pow (fp)
;RAX : +base (fp)
;---------------------------------
;Ret : raised value (double)
;Note : Args. must be in doubles
; : base must be positive
;---------------------------------
align 8
pow:
push rbp
mov rbp,rsp
sub rsp,512
and rsp,-16
fxsave [rsp]
push rbx
push rax
finit
fld qword[rsp+8]
fld qword[rsp]
fyl2x ;n*log2(x)
fld st0
frndint
fxch
fsub st0,st1
f2xm1
fld1
faddp st1,st0
fscale
fstp qword[rsp]
pop rax
pop rbx
fxrstor [rsp]
mov rsp,rbp
pop rbp
ret
;--------------------------
;log10(1)/1
;Find Common Log of Base 10
;--------------------------
;RAX : +Real value in FP
;--------------------------
;Ret : Value in RAX
;Note : -
;--------------------------
align 8
log10:
push rbp
mov rbp,rsp
sub rsp,512
and rsp,-16
fxsave [rsp]
push rax
finit
fldlg2
fld qword[rsp]
fyl2x
fstp qword[rsp]
mov rax,[rsp]
add rsp,8
fxrstor [rsp]
mov rsp,rbp
pop rbp
ret
;--------------------------
;ln10(1)/1
;Find Natural Log
;--------------------------
;RAX : +Real value in FP
;--------------------------
;Ret : Value in RAX
;Note : -
;--------------------------
align 8
ln10:
push rbp
mov rbp,rsp
sub rsp,512
and rsp,-16
fxsave [rsp]
push rax
finit
fldln2
fld qword[rsp]
fyl2x
fstp qword[rsp]
pop rax
fxrstor [rsp]
mov rsp,rbp
pop rbp
ret
;---------------------------------------
;sqroot(1)/1
;Get square root of a given value
;---------------------------------------
;RAX : +FP double to be squared
;---------------------------------------
;Ret : Square root value in RAX
;Note : Var should be init as FP (0.0)
;---------------------------------------
align 8
sqroot:
push rbp
mov rbp,rsp
sub rsp,32
and rsp,-16
movdqa [rsp],xmm0
movdqa [rsp+16],xmm1
btr rax,63
movq xmm1,rax
sqrtsd xmm0,xmm1
movq rax,xmm0
movdqa xmm0,[rsp]
movdqa xmm1,[rsp+16]
mov rsp,rbp
pop rbp
ret
;-----------------------------
;fcalc(3)/1
;Two-Operands FP Calculator
;RAX = RAX op RBX
;-----------------------------
;RCX : Operations:
; 0 = +
; 1 = -
; 2 = *
; 3 = /
; 4 = ^
;RBX : Value 2 in FP format
;RAX : Value 1 in FP format
;-----------------------------
;Ret : Value in RAX
;Note : -
;-----------------------------
align 8
fcalc:
push rbp
mov rbp,rsp
sub rsp,512
and rsp,-16
fxsave [rsp]
finit
movq xmm0,rax
movq xmm1,rbx
cmp ecx,0
je .add
cmp ecx,1
je .sub
cmp ecx,2
je .mul
cmp ecx,3
je .div
cmp ecx,4
je .pow
push '#'
call prnchrs
jmp .err
.add: addsd xmm0,xmm1
jmp .done
.sub: subsd xmm0,xmm1
jmp .done
.mul: mulsd xmm0,xmm1
jmp .done
.div: divsd xmm0,xmm1
jmp .done
.pow: push rbx
push rax
fld qword[rsp+8]
fld qword[rsp]
fyl2x
fld st0
frndint
fxch
fsub st0,st1
f2xm1
fld1
faddp st1,st0
fscale
fstp qword[rsp]
pop rax
pop rbx
fxrstor [rsp]
mov rsp,rbp
pop rbp
ret
.done: movq rax,xmm0
.err: fxrstor [rsp]
mov rsp,rbp
pop rbp
ret
;---------------------------------------
;rad2deg(1)/1
;Convert Radian to Degree
;---------------------------------------
;RAX : FP value in RADIAN
;---------------------------------------
;Ret : DEGREE value in RAX
;Note : Var should be init as FP (0.0)
; : degree sym = 0xf8
; : 57.295779513
;---------------------------------------
align 8
rad2deg:
push rbp
mov rbp,rsp
sub rsp,32
and rsp,-16
movdqa [rsp],xmm0
movdqa [rsp+16],xmm1
movq xmm0,rax
mov rax,0x404CA5DC1A6394B6
movq xmm1,rax
mulsd xmm0,xmm1
movq rax,xmm0
movdqa xmm0,[rsp]
movdqa xmm1,[rsp+16]
mov rsp,rbp
pop rbp
ret
;---------------------------------------
;deg2rad(1)/1
;Convert Degree to Radian
;---------------------------------------
;RAX : FP value in DEGREE
;---------------------------------------
;Ret : RADIAN value in RAX
;Note : Var should be init as FP (0.0)
; : 0.0174532925
;---------------------------------------
align 8
deg2rad:
push rbp
mov rbp,rsp
sub rsp,32
and rsp,-16
movdqa [rsp],xmm0
movdqa [rsp+16],xmm1
movq xmm0,rax
mov rax,0x3F91DF46A1FAE711
movq xmm1,rax
mulsd xmm0,xmm1
movq rax,xmm0
movdqa xmm0,[rsp]
movdqa xmm1,[rsp+16]
mov rsp,rbp
pop rbp
ret
;---------------------------------------
;sine(1)/1
;Get sine value
;---------------------------------------
;RAX : FP value in RADIAN
;---------------------------------------
;Ret : Sine value in RAX
;Note : Var should be init as FP (0.0)
;---------------------------------------
align 8
sine:
push rbp
mov rbp,rsp
sub rsp,512
and rsp,-16
fxsave [rsp]
finit
push rax
fld qword[rsp]
fsin
fstp qword[rsp]
pop rax
fxrstor [rsp]
mov rsp,rbp
pop rbp
ret
;---------------------------------------
;tangent(1)/1
;Get tangent
;---------------------------------------
;RAX : FP value in RADIAN
;---------------------------------------
;Ret : Tangent value in RAX
;Note : Var should be init as FP (0.0)
;---------------------------------------
align 8
tangent:
push rbp
mov rbp,rsp
sub rsp,512
and rsp,-16
fxsave [rsp]
finit
push rax
fld qword[rsp]
fptan
fxch
fstp qword[rsp]
pop rax
fxrstor [rsp]
mov rsp,rbp
pop rbp
ret
;---------------------------------------
;cosine(1)/1
;Get cosine value
;---------------------------------------
;RAX : FP value in RADIAN
;---------------------------------------
;Ret : Cosine value in RAX
;Note : Var should be init as FP (0.0)
;---------------------------------------
align 8
cosine:
push rbp
mov rbp,rsp
sub rsp,512
and rsp,-16
fxsave [rsp]
finit
push rax
fld qword[rsp]
fcos
fstp qword[rsp]
pop rax
fxrstor [rsp]
mov rsp,rbp
pop rbp
ret
;---------------------------------------
;sincos(1)/2
;Get Sine and Cosine
;---------------------------------------
;RAX : FP value in RADIAN
;---------------------------------------
;Ret : Sine in RAX
; : Cosine in RBX
;Note : Var should be init as FP (0.0)
;---------------------------------------
align 8
sincos:
push rbp
mov rbp,rsp
sub rsp,512
and rsp,-16
fxsave [rsp]
push rbx
push rax
finit
fld qword[rsp]
fsincos
fstp qword[rsp]
pop rbx
fstp qword[rsp]
pop rax
fxrstor [rsp]
mov rsp,rbp
pop rbp
ret
;---------------------------------------
;atangent(1)/1
;Get arc-tangent
;---------------------------------------
;RAX : FP value in RADIAN
;---------------------------------------
;Ret : arc Tangent value in RAX
;Note : Var should be init as FP (0.0)
;---------------------------------------
align 8
atangent:
push rbp
mov rbp,rsp
sub rsp,512
and rsp,-16
fxsave [rsp]
push rax
finit
fld qword[rsp]
fld1
fpatan
fstp qword[rsp]
mov rax,[rsp]
add rsp,8
fxrstor [rsp]
mov rsp,rbp
pop rbp
ret
;--------------------------------
;chr_isdigit(1)/1
;Check if alphanumeric digit
;--------------------------------
;AL : Char to check
;--------------------------------
;Ret : RAX - 0 if no. 1 if yes
;Note : Digit '0' to '9' only.
;--------------------------------
align 8
chr_isdigit:
cmp al,'9'
ja .nope
cmp al,'0'
jb .nope
mov eax,1
ret
.nope: xor eax,eax
ret
;--------------------------------
;chr_isalpha(1)/1
;Check if alphabet
;--------------------------------
;AL : Char to check
;--------------------------------
;Ret : RAX - 0 if no. 1 if yes
;Note : 'A'-'Z' and 'a'-'z'
;--------------------------------
align 8
chr_isalpha:
and al,0xdf
cmp al,'A'
jb .nope
cmp al,'Z'
ja .nope
mov eax,1
ret
.nope: xor eax,eax
ret
;--------------------------------
;chr_islower(1)/1
;Check if lowercase
;--------------------------------
;AL : Character to check
;--------------------------------
;Ret : RAX - 0 if no. 1 if yes
;Note :
;--------------------------------
align 8
chr_islower:
bt ax,5
jc .yes
xor eax,eax
ret
.yes: mov eax,1
ret
;--------------------------------
;chr_isupper(1)/1
;Check if uppercase
;--------------------------------
;AL : Character to check
;--------------------------------
;Ret : RAX - 0 if no. 1 if yes
;Note :
;--------------------------------
align 8
chr_isupper:
bt ax,5
jnc .yes
xor eax,eax
ret
.yes: mov eax,1
ret
;---------------------------------
;chr_change(3)
;Change characters from a 0-ended string
;to a char in CL
;---------------------------------
;CL : Char substitute
;BL : The char to change
;RAX : Source address
;---------------------------------
;Ret : -
;Note : String is modified
;---------------------------------
align 8
chr_change:
push rax
push rdx
push rdi
push rsi
mov rsi,rax
call str_length
mov rdi,rax
.more: mov dl,[rsi]
cmp bl,dl
jnz .nope
mov [rsi],cl
.nope: inc rsi
sub rdi,1
jnz .more
pop rsi
pop rdi
pop rdx
pop rax
ret
;----------------------------
;chr_chcase(1)/1
;Alternate character case
;----------------------------
;AL : Character to change
;----------------------------
;Ret : RAX. Modified char
;Note :
;----------------------------
align 8
chr_chcase:
btc eax,5
ret
;-----------------------------
;chr_toupper(1)/1
;Change to uppercase
;-----------------------------
;AL : Character to change
;-----------------------------
;Ret : RAX. Modified char
;Note :
;-----------------------------
align 8
chr_toupper:
and al,0xdf
ret
;-----------------------------
;chr_tolower(1)/1
;Change to lowercase
;-----------------------------
;AL : Character to change
;-----------------------------
;Ret : RAX. Modified char
;Note :
;-----------------------------
align 8
chr_tolower:
or al,0x20
ret
;----------------------------------------
;chr_find(2)/1
;Find byte from a 0-ended string
;----------------------------------------
;RBX : String address to look from
;RAX : Character to find
;----------------------------------------
;Ret : Position in RAX. 0 if not found
;Note : Will stop at first one found
;----------------------------------------
align 8
chr_find:
push rdi
push rbx
mov rdi,rbx
xor rbx,rbx
cld
.again: scasb
jz .found
cmp byte[rdi],0
jz .nada
add rbx,1
jmp .again
.nada: mov rbx,-1
.found: mov rax,rbx
add rax,1
pop rbx
pop rdi
ret
;----------------------------------
;chr_count(2)/1
;Count a char from a 0-ended string
;----------------------------------
;RBX : String's address
;RAX : Character to count
;----------------------------------
;Ret : Count in RAX. 0 if none
;Note : -
;----------------------------------
align 8
chr_count:
push rdi
push rbx
mov rdi,rbx
xor rbx,rbx
cld
.again: scasb
jz .found
.next: cmp byte[rdi],0
jz .ends
jmp .again
.found: add rbx,1
jmp .next
.ends: mov rax,rbx
pop rbx
pop rdi
ret
;-----------------------------------
;ascii(1)
;Display ASCII equivalences
;-----------------------------------
;AL : Char or Hex value to display
;-----------------------------------
;Ret : -
;Note : -
;-----------------------------------
align 8
ascii:
push rcx
push rax
and rax,0xff
mov rcx,rax
mov al,cl
call prnchr
mov eax,' = '
call prnstreg
mov rax,rcx
cmp rax,15
ja .nope
call prnspace
mov rax,rcx
.nope: call prnhexu
pop rax
pop rcx
ret
;---------------------------------
;chr_shuffle(1)
;Shuffle a 0-ended string
;---------------------------------
;RAX : Address of target string
;------------------------------
;Ret : The same string shuffled
;Note : -
;---------------------------------
align 8
chr_shuffle:
push rax
push rbx
push rcx
push rdx
push rdi
push rsi
push rbp
mov rbp,rsp
mov rsi,rax
mov rdx,rax
call str_length
mov rbx,rax
mov rcx,rax
sub rsp,rax
and rsp,-16
mov rdi,rsp
mov al,0
rep stosb
mov rcx,rbx
mov rdi,rsp
push rdx
sub rbx,1
.go: mov dl,[rsi]
.find: mov rax,rbx
call rand
mov dh,[rdi+rax]
test dh,dh ;occupied?
jnz .find
mov [rdi+rax],dl
inc rsi
sub rcx,1
jnz .go
mov rcx,rbx
pop rdi
add rcx,1
mov rsi,rsp
rep movsb
mov rsp,rbp
pop rbp
pop rsi
pop rdi
pop rdx
pop rcx
pop rbx
pop rax
ret
;-----------------------------------------
;str_copy(3)
;Copy a string to another array
;-----------------------------------------
;RCX : Size of bytes to copy
;RBX : String's source address
;RAX : String's target address
;-----------------------------------------
;Ret : Copied string at the sent address
;Note : Target must fit the size to copy
; : Arrays should be of type DB/RB
;-----------------------------------------
align 8
str_copy:
push rcx
push rsi
push rdi
push rax
mov rdi,rax
mov rsi,rbx
rep movsb
pop rax
pop rdi
pop rsi
pop rcx
ret
;-------------------------------
;str_length(1)/1
;Find length of a 0-ended string
;-------------------------------
;RAX : String's address
;-------------------------------
;Ret : size in RAX.
;Note : -
;-------------------------------
align 8
str_length:
push rdi
push rcx
mov rdi,rax
mov rcx,-1
mov al,0
repne scasb
mov rax,-2
sub rax,rcx
pop rcx
pop rdi
ret
;-------------------------------
;str_length2(1)/1
;Fast string length (aligned)
;-------------------------------
;RAX : String's address
;-------------------------------
;Ret : size in RAX.
;Note : String must be aligned 16
;-------------------------------
align 8
str_length2:
push rbp
mov rbp,rsp
sub rsp,16
and rsp,-16
movdqa [rsp],xmm0
push rsi
push rdx
mov rsi,rax
pxor xmm0,xmm0
xor rax,rax
.again: pcmpeqb xmm0,[rsi+rax]
pmovmskb edx,xmm0
test rdx,rdx
jnz .zero
add rax,16
jmp .again
.zero: bsf rsi,rdx
add rax,rsi
pop rdx
pop rsi
movdqa xmm0,[rsp]
mov rsp,rbp
pop rbp
ret
;----------------------------------
;str_cmpz(2)/1
;Compare two 0-ended strings
;----------------------------------
;RBX : String 1 address
;RAX : String 2 address
;----------------------------------
;Ret : RAX - 1 if Equal, 0 if not
;Note : The two strings mus be 0-ended
;----------------------------------
align 8
str_cmpz:
push rdi
push rsi
push rbx
push rdx
push rcx
mov rsi,rbx
mov rdi,rax
call str_length
mov rbx,rax
mov rax,rsi
call str_length
cmp rax,rbx
jnz .nope
mov rcx,rax
rep cmpsb
jz .ok
.nope: mov eax,0
jmp .out
.ok: mov rax,1
.out: pop rcx
pop rdx
pop rbx
pop rsi
pop rdi
ret
;---------------------------------
;str_cmp(3)/1
;Compare strings with size
;---------------------------------
;RCX : Size of bytes to compare
;RBX : String 1 address
;RAX : String 2 address
;---------------------------------
;Ret : RAX - 1 if Equal, 0 if not
;Note : -
;---------------------------------
align 8
str_cmp:
push rdi
push rsi
push rcx
add rcx,1
mov rsi,rbx
mov rdi,rax
xor rax,rax
repe cmpsb
jecxz .done
jmp .out
.done: mov eax,1
.out: pop rcx
pop rsi
pop rdi
ret
;--------------------------------------
;str_toupper(1)
;Change 0-ended string to upper case
;--------------------------------------
;RAX : Address of the 0-ended string
;--------------------------------------
;Ret : The same string converted
;Note : -
;--------------------------------------
align 8
str_toupper:
push rsi
push rdi
push rax
cld
mov rdi,rax
mov rsi,rax
.go: mov al,[rsi]
add rsi,1
test al,al
jz .done
cmp al,'z'
ja .nope
cmp al,'a'
jb .nope
and al,0xdf
.nope: stosb
jmp .go
.done: pop rax
pop rdi
pop rsi
ret
;--------------------------------------
;str_tolower(1)
;Change 0-ended string to lower case
;--------------------------------------
;RAX : Address of the 0-ended string
;--------------------------------------
;Ret : The same string converted
;Note : -
;--------------------------------------
align 8
str_tolower:
push rsi
push rdi
push rax
cld
mov rdi,rax
mov rsi,rax
.go: mov al,[rsi]
add rsi,1
test al,al
jz .done
cmp al,'Z'
ja .nope
cmp al,'A'
jb .nope
or al,0x20
.nope: stosb
jmp .go
.done: pop rax
pop rdi
pop rsi
ret
;-------------------------------------
;str_reverse(1)
;Reverse 0-ended string
;-------------------------------------
;RAX : Address of the 0-ended string
;-------------------------------------
;Ret : The same string reversed
;Note : -
;-------------------------------------
align 8
str_reverse:
push rsi
push rdi
push rax
push rcx
mov rdi,rax
mov rsi,rax
xor rcx,rcx
.again: mov al,[rsi]
add rsi,1
test al,al
jz .copy
push rax
add rcx,1
jmp .again
.copy: pop rax
stosb
sub rcx,1
jnz .copy
.done: pop rcx
pop rax
pop rdi
pop rsi
ret
;-------------------------------------
;str_trim(2)
;Trim a 0-ended string
;-------------------------------------
;RBX : # of chars to cut
;RAX : Address of the 0-ended string
;-------------------------------------
;Ret : The same string trimmed
;Note : -
;-------------------------------------
align 8
str_trim:
push rax
push rbx
push rsi
mov rsi,rax
call str_length
cmp rbx,rax
jae .done
add rsi,rax
.cut: sub rsi,1
mov byte[rsi],0
sub rbx,1
jnz .cut
.done: pop rsi
pop rbx
pop rax
ret
;---------------------------------
;str_wordcnt(1)/1
;Count words of a 0-ended string
;---------------------------------
;RAX : Address of string
;---------------------------------
;Ret : Word count
;Note : Single char is a word
;---------------------------------
align 8
str_wordcnt:
push rbx
push rsi
xor rbx,rbx
mov rsi,rax
.rep: lodsb
test al,al
jz .back
cmp al,20h
jz .rep
cmp al,09h
jz .rep
.nxt: lodsb
test al,al
jz .done
cmp al,20h
jne .nxt1
.bck: add rbx,1
jmp .rep
.nxt1: cmp al,09h
jne .nxt
je .bck
.back: sub rbx,1
.done: mov rax,rbx
inc rax
pop rsi
pop rbx
ret
;------------------------------
;str_token(2)
;Display tokens off a 0-ended string
;------------------------------
;RBX : Addr of 0-ended delimiter string
;RAX : Addr of the string
;------------------------------
;Ret : -
;Note : eg, delimiter db '? .-',0
;------------------------------
align 8
str_token:
push rbp
push rdi
push rbx
push rax
push rcx
push rdx
push rsi
mov rbp,rsp
mov rsi,rax
call str_length
sub rsp,rax
sub rsp,1
cld
mov rdi,rsp
mov rcx,1
.again: lodsb
cmp al,0
jz .done
mov dl,al
call chr_find
test rax,rax
jnz .hit ;delimiter hit
xor rcx,rcx
mov al,dl
stosb
jmp .again
.hit: test rcx,rcx
jnz .again
mov al,0ah
stosb
add rcx,1
jmp .again
.done: xor al,al
stosb
mov rax,rsp
call prnstrz
mov rsp,rbp
pop rsi
pop rdx
pop rcx
pop rax
pop rbx
pop rdi
pop rbp
ret
;--------------------------------------
;str_find(3)/1
;Search for a sub-string
;--------------------------------------
;RCX : Size of source
;RBX : Addr of 0-ended search string
;RAX : Addr of source string
;--------------------------------------
;Ret : Address. -1 -Not found
;Note : Case-sensitive
;--------------------------------------
align 8
str_find:
push rbx
push rcx
push rdx
push rdi
push rsi
mov rsi,rax ;source string
mov rdi,rbx ;key string
mov rdx,rcx ;size
mov rax,rbx
call str_length
mov rcx,rax
mov rbx,rdi
.again: mov rax,rsi
call str_cmp
test rax,rax
jnz .done
add rsi,1
sub rdx,1
jnz .again
mov rax,-1
jmp .exit
.done: mov rax,rsi
.exit: pop rsi
pop rdi
pop rdx
pop rcx
pop rbx
ret
;--------------------------------------
;str_findz(2)/1
;Search for a sub-string from a C string
;--------------------------------------
;RBX : Addr of 0-ended search string
;RAX : Addr of 0-ended source string
;--------------------------------------
;Ret : Location. -1 = Not found
;Note : Case-sensitive
;--------------------------------------
align 8
str_findz:
push rbx
push rcx
push rdi
push rsi
mov rsi,rax ;source
mov rdi,rbx ;key
cld
mov rax,rdi
call str_length
mov rcx,rax
mov rbx,rdi
.next: mov rax,rsi
call str_cmp
test rax,rax
jnz .done
lodsb
test al,al
jnz .next
mov rsi,-1
.done: mov rax,rsi
pop rsi
pop rdi
pop rcx
pop rbx
ret
;-------------------------------------
;str_append(5)/1
;Combine two 0-ended strings with size
;-------------------------------------
;RDI : # number of bytes to copy
; 0 or -1 if copy all
;RDX : Separator byte. 0-if none
;RCX : Addr of buffer
;RBX : Addr of second string
;RAX : Addr of first string
;-------------------------------------
;Ret : 0-ended combined string
; : RAX - Combined string length
;Note : 1st string + 2nd string
; : Buffer must be large enough
;-------------------------------------
align 8
str_append:
push rbx
push rcx
push rsi
push rdi
push rcx
push rdi
mov rsi,rax
mov rdi,rcx
call str_length
mov rcx,rax
rep movsb
test dl,dl
jz .nope
mov al,dl
stosb
.nope: pop rcx
cmp rcx,0
jg .skip
mov rax,rbx
call str_length
mov rcx,rax
.skip: mov rsi,rbx
rep movsb
xor al,al
stosb
pop rax
call str_length
pop rdi
pop rsi
pop rcx
pop rbx
ret
;-------------------------------------
;str_appendz(4)/1
;Combine two 0-ended strings
;-------------------------------------
;RDX : Separator byte. 0-if none
;RCX : Addr of buffer
;RBX : Addr of second string
;RAX : Addr of first string
;-------------------------------------
;Ret : 0-ended combined string
; : RAX - Combined string length
;Note : 1st string + 2nd string
; : Buffer must be large enough
;-------------------------------------
align 8
str_appendz:
push rbx
push rcx
push rsi
push rdi
push rcx
mov rsi,rax
mov rdi,rcx
call str_length
mov rcx,rax
rep movsb
test dl,dl
jz .nope
mov al,dl
stosb
.nope: mov rax,rbx
call str_length
mov rcx,rax
mov rsi,rbx
rep movsb
xor al,al
stosb
pop rax
call str_length
pop rdi
pop rsi
pop rcx
pop rbx
ret
;-----------------------------
;sort_byte(3)
;Sort char/byte array
;-----------------------------
;RCX : 0-ascending, 1-descending
;RBX : Number of array elements
;RAX : Address of array (DB)
;-----------------------------
;Ret : Return the sorted array
;Note : Elements are of type DB
;-----------------------------
align 8
sort_byte:
push rbx
push rcx
push rdx
push rsi
push rdi
push rbp
sub rbx,1
mov rbp,rcx
mov rsi,rbx
.outer: mov rdi,1
push rbx
mov cl,[rax]
.inner: mov dl,[rax+rdi]
test rbp,rbp
jnz .down
cmp cl,dl
jbe .next
jmp .ok
.down: cmp cl,dl
ja .next
.ok: mov [rax+rdi],cl
mov [rax+rdi-1],dl
.next: mov cl,[rax+rdi]
add rdi,1
sub rbx,1
jnz .inner
pop rbx
sub rsi,1
jnz .outer
pop rbp
pop rdi
pop rsi
pop rdx
pop rcx
pop rbx
ret
;-----------------------------
;sort_int(3)
;Sort array of int
;-----------------------------
;RCX : 0-ascending, 1-descending
;RBX : Number of array elements
;RAX : Address of array (DQ)
;-----------------------------
;Ret : Return the sorted array
;Note : Elements are of type DQ
; : For signed integer
;-----------------------------
align 8
sort_int:
push rbx
push rcx
push rdx
push rsi
push rdi
push rbp
sub rbx,1
mov rsi,rbx
mov rbp,rcx
.outer: mov rdx,8
push rbx
mov rcx,[rax]
.inner: mov rdi,[rax+rdx]
test rbp,rbp
jnz .down
cmp rcx,rdi
jle .next
jmp .ok
.down: cmp rcx,rdi
jg .next
.ok: mov [rax+rdx],rcx
mov [rax+rdx-8],rdi
.next: mov rcx,[rax+rdx]
add rdx,8
sub rbx,1
jnz .inner
pop rbx
sub rsi,1
jnz .outer
pop rbp
pop rdi
pop rsi
pop rdx
pop rcx
pop rbx
ret
;-----------------------------
;sort_dbl(3)
;Sort array of doubles
;-----------------------------
;RCX : 0-ascending, 1-descending
;RBX : Number of array elements
;RAX : Address of array (DQ)
;-----------------------------
;Ret : Return the sorted array
;Note : Elements are of type DQ
;-----------------------------
align 8
sort_dbl:
push rbp
mov rbp,rsp
sub rsp,512
and rsp,-16
fxsave [rsp]
push rax
push rbx
push rdx
push rsi
mov rsi,rax
sub rbx,1
mov rdx,rbx
fninit
.inner: fld qword[rax+8]
fld qword[rax]
test rcx,rcx
jnz .down
fcomi st1
jb .nope
jz .zero
jmp .ok
.down: fcomi st1
ja .nope
jz .zero
.ok: fstp qword[rax+8]
fstp qword[rax]
jmp .nxt
.zero: test rcx,rcx
jnz .zero1
bt qword[rax],63
jnc .ok
fxch
jmp .nope
.zero1: bt qword[rax],63
jc .ok
fxch
.nope: fstp st0
fstp st0
.nxt: add rax,8
sub rbx,1
jnz .inner
mov rbx,rdx
sub rdx,1
jz .done
mov rax,rsi
jmp .inner
.done: pop rsi
pop rdx
pop rbx
pop rax
fxrstor [rsp]
mov rsp,rbp
pop rbp
ret
;-----------------------------
;sort_dblx(3)
;Sort array of extended doubles
;-----------------------------
;RCX : 0-ascending, 1-descending
;RBX : Number of array elements
;RAX : Address of array (DT)
;-----------------------------
;Ret : Return the sorted array
;Note : Elements are of type DT
;-----------------------------
align 8
sort_dblx:
push rbp
mov rbp,rsp
sub rsp,512
and rsp,-16
fxsave [rsp]
push rax
push rbx
push rdx
push rsi
mov rsi,rax
sub rbx,1
mov rdx,rbx
fninit
.inner: fld tword[rax+10]
fld tword[rax]
test rcx,rcx
jnz .down
fcomi st1
jb .nope
jz .zero
jmp .ok
.down: fcomi st1
ja .nope
jz .zero
.ok: fstp tword[rax+10]
fstp tword[rax]
jmp .nxt
.zero: test rcx,rcx
jnz .zero1
bt word[rax+8],15
jnc .ok
fxch
jmp .nope
.zero1: bt word[rax+8],15
jc .ok
fxch
.nope: fstp st0
fstp st0
.nxt: add rax,10
sub rbx,1
jnz .inner
mov rbx,rdx
sub rdx,1
jz .done
mov rax,rsi
jmp .inner
.done: pop rsi
pop rdx
pop rbx
pop rax
fxrstor [rsp]
mov rsp,rbp
pop rbp
ret
;-----------------------------
;sort_flt(2)
;Sort array of singles
;-----------------------------
;RCX : 0-ascending, 1-descending
;RBX : Number of array elements
;RAX : Address of array (DD)
;-----------------------------
;Ret : Return the sorted array
;Note : Elements are of type DD
;-----------------------------
align 8
sort_flt:
push rbp
mov rbp,rsp
sub rsp,512
and rsp,-16
fxsave [rsp]
push rax
push rbx
push rdx
push rsi
mov rsi,rax
sub rbx,1
mov rdx,rbx
finit
.inner: fld dword[rax+4]
fld dword[rax]
test rcx,rcx
jnz .down
fcomi st1
jb .nope
jz .zero
jmp .ok
.down: fcomi st1
ja .nope
jz .zero
.ok: fstp dword[rax+4]
fstp dword[rax]
jmp .nxt
.zero: test rcx,rcx
jnz .zero1
bt dword[rax],31
jnc .ok
fxch
jmp .nope
.zero1: bt dword[rax],31
jc .ok
fxch
.nope: fstp st0
fstp st0
.nxt: add rax,4
sub rbx,1
jnz .inner
mov rbx,rdx
sub rdx,1
jz .done
mov rax,rsi
jmp .inner
.done: pop rsi
pop rdx
pop rbx
pop rax
fxrstor [rsp]
mov rsp,rbp
pop rbp
ret
;-----------------------------------
;digitprob(2)/1
;Probe digit at location (signed)
;-----------------------------------
;RBX : Digit position (1=MSdigit)
;RAX : Value
;-----------------------------------
;Ret : Digit. -1 if error
;Note : -
;-----------------------------------
align 8
digitprob:
cmp rbx,0
jg .begin
mov rax,-1
ret
.begin: push rbx
push rcx
push rdx
push rdi
mov rcx,10
xor rdi,rdi
test rax,rax
jns .again
neg rax
.again: xor rdx,rdx
div rcx
push rdx
inc rdi
test rax,rax
jnz .again
mov rcx,8
cmp rdi,rbx
jae .norm
mov rax,rdi
mul rcx
add rsp,rax
mov rax,-1
jmp .done
.norm: mov rax,rbx
mul rcx
mov rbx,[rsp+rax-8]
mov rax,rdi
mul rcx
add rsp,rax
mov rax,rbx
.done: pop rdi
pop rdx
pop rcx
pop rbx
ret
;-----------------------------------
;digitprobu(2)/1
;Probe digit at position (unsigned)
;-----------------------------------
;RBX : Digit position (1=MSdigit)
;RAX : Value
;-----------------------------------
;Ret : Digit. -1 if error
;Note : -
;-----------------------------------
align 8
digitprobu:
cmp rbx,0
jg .begin
mov rax,-1
ret
.begin: push rbx
push rcx
push rdx
push rdi
mov rcx,10
xor rdi,rdi
.again: xor rdx,rdx
div rcx
push rdx
inc rdi
test rax,rax
jnz .again
mov rcx,8
cmp rdi,rbx
jae .norm
mov rax,rdi
mul rcx
add rsp,rax
mov rax,-1
jmp .done
.norm: mov rax,rbx
mul rcx
mov rbx,[rsp+rax-8]
mov rax,rdi
mul rcx
add rsp,rax
mov rax,rbx
.done: pop rdi
pop rdx
pop rcx
pop rbx
ret
;-----------------------------------
;digithprob(2)/1
;Probe a hex digit at a position (signed)
;-----------------------------------
;RBX : Digit position
;RAX : Hex value to look from
;-----------------------------------
;Ret : Digit. -1 if error
;Note : Posn #1 = Most signitificant
;-----------------------------------
align 8
digithprob:
cmp rbx,0
jg .begin
cmp rbx,16
jbe .begin
mov rax,-1
ret
.begin: push rbx
push rdi
mov rdi,rax
test rdi,rdi
jns .skipz
neg rdi
.skipz: xor rax,rax
shld rax,rdi,4
jnz .more
shl rdi,4
jmp .skipz
.more: sub rbx,1
jz .done
xor rax,rax
shl rdi,4
jz .nxt
shld rax,rdi,4
jmp .more
.nxt: mov rax,-1
.done: pop rdi
pop rbx
ret
;-----------------------------------
;digithprobu(2)/1
;Probe a hex digit at position (unsigned)
;-----------------------------------
;RBX : Digit position
;RAX : Hex value to look from
;-----------------------------------
;Ret : Digit. -1 if error
;Note : Posn #1 = Most signitificant
;-----------------------------------
align 8
digithprobu:
cmp rbx,0
jg .begin
cmp rbx,16
jbe .begin
mov rax,-1
ret
.begin: push rbx
push rdi
mov rdi,rax
.skipz: xor rax,rax
shld rax,rdi,4
jnz .more
shl rdi,4
jmp .skipz
.more: sub rbx,1
jz .done
xor rax,rax
shl rdi,4
jz .nxt
shld rax,rdi,4
jmp .more
.nxt: mov rax,-1
.done: pop rdi
pop rbx
ret
;-----------------------------------
;digitscan(2)/1
;Scan digit from a signed integer
;-----------------------------------
;RBX : the digit (one digit only)
;RAX : The source integer (signed)
;-----------------------------------
;Ret : Digit position. #1 = MSD
; : -1 = non-existent
;Note : -
;-----------------------------------
align 8
digitscan:
push rbx
push rcx
sub rsp,64
test rax,rax
jns .ok
neg rax
.ok: mov rcx,rbx
add rcx,30h
mov rbx,rsp
call dec2str
mov al,cl
mov rbx,rsp
call chr_find
test rax,rax
jnz .done
mov rax,-1
.done: add rsp,64
pop rcx
pop rbx
ret
;-----------------------------------
;digitscanu(2)/1
;Find digit from an unsigned integer
;-----------------------------------
;RBX : the digit (one digit only)
;RAX : The source integer (unsigned)
;-----------------------------------
;Ret : Digit position. #1 = MSD
; : -1 = non-existent
;Note : -
;-----------------------------------
align 8
digitscanu:
push rbx
push rcx
sub rsp,64
.ok: mov rcx,rbx
add rcx,30h
mov rbx,rsp
call dec2stru
mov al,cl
mov rbx,rsp
call chr_find
test rax,rax
jnz .done
mov rax,-1
.done: add rsp,64
pop rcx
pop rbx
ret
;-----------------------------------
;digithscan(2)/1
;Find digit from a signed hex
;-----------------------------------
;RBX : Hex digit to find
;RAX : The source hex (signed)
;-----------------------------------
;Ret : Digit position. #1 = MSD
; : -1 = non-existent
;Note : -
;-----------------------------------
align 8
digithscan:
push rbx
push rcx
sub rsp,64
test rax,rax
jns .ok
neg rax
.ok: mov rcx,rbx
add rcx,30h
cmp rcx,'9'
jbe .nop
add rcx,7
.nop: mov rbx,rsp
call hex2str
mov al,cl
mov rbx,rsp
call chr_find
test rax,rax
jnz .done
mov rax,-1
.done: add rsp,64
pop rcx
pop rbx
ret
;-----------------------------------
;digithscanu(2)/1
;Find digit from an unsigned hex
;-----------------------------------
;RBX : Hex digit to find
;RAX : The source hex (unsigned)
;-----------------------------------
;Ret : Digit position. #1 = MSD
; : -1 = non-existent
;Note : -
;-----------------------------------
align 8
digithscanu:
push rbx
push rcx
sub rsp,64
.ok: mov rcx,rbx
add rcx,30h
cmp rcx,'9'
jbe .nop
add rcx,7
.nop: mov rbx,rsp
call hex2stru
mov al,cl
mov rbx,rsp
call chr_find
test rax,rax
jnz .done
mov rax,-1
.done: add rsp,64
pop rcx
pop rbx
ret
;-------------------------------
;digitcount(1)/1
;Count digits of a signed decimal
;-------------------------------
;RAX : Integer to count
;-------------------------------
;Ret : Number of digits
;Note : Signed
;-------------------------------
align 8
digitcount:
push rbx
sub rsp,32
push rax
mov rbx,32
lea rax,[rsp+8]
call mem_reset
pop rax
mov rbx,rsp
test rax,rax
jns .p
neg rax
call dec2str
jmp .ok
.p: call dec2stru
.ok: mov rax,rsp
call str_length
add rsp,32
pop rbx
ret
;-------------------------------
;digitcountu(1)/1
;Count digits of an unsigned decimal
;-------------------------------
;RAX : Integer to count
;-------------------------------
;Ret : Number of digits
;Note : Unsigned
;-------------------------------
align 8
digitcountu:
push rbx
sub rsp,32
push rax
mov rbx,32
lea rax,[rsp+8]
call mem_reset
pop rax
mov rbx,rsp
call dec2stru
mov rax,rsp
call str_length
add rsp,32
pop rbx
ret
;-------------------------------
;digithcount(1)/1
;Count digits of a signed hex
;-------------------------------
;RAX : Hex integer to count
;-------------------------------
;Ret : Number of digits
;Note : Signed
;-------------------------------
align 8
digithcount:
push rbx
sub rsp,32
push rax
mov rbx,32
lea rax,[rsp+8]
call mem_reset
pop rax
mov rbx,rsp
test rax,rax
jns .p
neg rax
call hex2str
jmp .ok
.p: call hex2stru
.ok: mov rax,rsp
call str_length
add rsp,32
pop rbx
ret
;-------------------------------
;digithcountu(1)/1
;Count digits of an unsigned hex
;-------------------------------
;RAX : Hex integer to count
;-------------------------------
;Ret : Number of digits
;Note : Unsigned
;-------------------------------
align 8
digithcountu:
push rbx
sub rsp,32
push rax
mov rbx,32
lea rax,[rsp+8]
call mem_reset
pop rax
mov rbx,rsp
call hex2stru
mov rax,rsp
call str_length
add rsp,32
pop rbx
ret
;---------------------------
;aprnint(3)
;Display array of signed int
;---------------------------
;CL : Separator byte
;RBX : Number of elements
;RAX : Address of array
;---------------------------
;Ret : -
;Note : -
;---------------------------
align 8
aprnint:
push rax
push rsi
push rbx
mov rsi,rax
.again: mov rax,[rsi]
call prnint
mov al,cl
call prnchr
add rsi,8
sub rbx,1
jnz .again
pop rbx
pop rsi
pop rax
ret
;---------------------------
;aprnintu(3)
;Display array of unsigned int
;---------------------------
;CL : Separator byte
;RBX : Number of elements
;RAX : Address of array
;---------------------------
;Ret : -
;Note : -
;---------------------------
align 8
aprnintu:
push rax
push rsi
push rbx
mov rsi,rax
.again: mov rax,[rsi]
call prnintu
mov al,cl
call prnchr
add rsi,8
sub rbx,1
jnz .again
pop rbx
pop rsi
pop rax
ret
;---------------------------
;aprndbl(3)
;Display array of doubles
;---------------------------
;CL : Separator byte
;RBX : Number of elements
;RAX : Address of array
;---------------------------
;Ret : -
;Note : -
;---------------------------
align 8
aprndbl:
push rax
push rsi
push rbx
mov rsi,rax
.again: mov rax,[rsi]
call prndblr
mov al,cl
call prnchr
add rsi,8
sub rbx,1
jnz .again
pop rbx
pop rsi
pop rax
ret
;---------------------------
;aprnflt(3)
;Display array of floats
;---------------------------
;CL : Separator byte
;RBX : Number of elements
;RAX : Address of array
;---------------------------
;Ret : -
;Note : -
;---------------------------
align 8
aprnflt:
push rax
push rsi
push rbx
mov rsi,rax
.again: mov eax,[rsi]
call prnfltr
mov al,cl
call prnchr
add rsi,4
sub rbx,1
jnz .again
pop rbx
pop rsi
pop rax
ret
;---------------------------
;aprndblx(3)
;Display array of REAL10
;---------------------------
;CL : Separator byte
;RBX : Number of elements
;RAX : Address of array
;---------------------------
;Ret : -
;Note : -
;---------------------------
align 8
aprndblx:
push rax
push rsi
push rbx
mov rsi,rax
.again: mov rax,rsi
call prndblx
mov al,cl
call prnchr
add rsi,10
sub rbx,1
jnz .again
pop rbx
pop rsi
pop rax
ret
;------------------------------
;halt
;Pause screen
;------------------------------
;Arg : -
;------------------------------
;Ret :
;Note : Hit Enter to continue
;------------------------------
align 8
halt:
push rax
call readch
pop rax
ret
;-----------------------
;prnspace
;Print a space
;-----------------------
;Arg : -
;-----------------------
;Ret : -
;Note : -
;-----------------------
align 8
prnspace:
push 0x20
call prnchrs
ret
;-----------------------
;prnline
;Print a new line
;-----------------------
;Arg : -
;-----------------------
;Ret : -
;Note : -
;-----------------------
align 8
prnline:
push rax
mov al,0ah
call prnchr
pop rax
ret
;-----------------------
;prnspaces(1)
;Print whitespaces
;-----------------------
;arg1 : push Number of spaces
;-----------------------
;Ret : -
;Note : -
;-----------------------
align 8
prnspaces:
push rax
push rbx
push rcx
mov rbx,[rsp+8*4]
cmp rbx,0
jle .quit
sub rsp,rbx
mov rax,rsp
mov cl,0x20
call mem_set
call prnstr
add rsp,rbx
.quit: pop rcx
pop rbx
pop rax
ret 8
;-----------------------
;prnlines(1)
;Print new lines
;-----------------------
;arg1 : push Number of lines
;-----------------------
;Ret : -
;Note : -
;-----------------------
align 8
prnlines:
push rax
push rbx
push rcx
mov rbx,[rsp+8*4]
cmp rbx,0
jle .quit
sub rsp,rbx
mov rax,rsp
mov cl,0x0A
call mem_set
call prnstr
add rsp,rbx
.quit: pop rcx
pop rbx
pop rax
ret 8
;-----------------------
;prnchrp(2)
;Print char pattern
;-----------------------
;arg2 : push Byte value to use
;arg1 : push Number of times
;-----------------------
;Ret : -
;Note : -
;-----------------------
align 8
prnchrp:
push rbp
mov rbp,rsp
push rax
push rbx
push rcx
mov rbx,[rbp+16]
mov rcx,[rbp+24]
cmp rbx,0
jle .quit
sub rsp,rbx
mov rax,rsp
call mem_set
call prnstr
add rsp,rbx
.quit: pop rcx
pop rbx
pop rax
mov rsp,rbp
pop rbp
ret 16
;-------------------------------
;prnchrs(1)
;Display character from stack
;-------------------------------
;ARG : Push the char or [db]
;-------------------------------
;Ret : -
;Note : Use QWORD for [db] var
;-------------------------------
align 8
prnchrs:
push rax
mov al,[rsp+16]
call prnchr
pop rax
ret 8
;----------------------------
;prnchar(1)
;Display char variable
;----------------------------
;RAX : The char's address
;----------------------------
;Ret : -
;Note : -
;----------------------------
align 8
prnchar:
push rax
mov al,[rax]
call prnchr
pop rax
ret
;------------------------------
;prnstreg(1)
;Display short string off RAX
;------------------------------
;RAX : The string
;------------------------------
;Ret : -
;Note : -
;------------------------------
align 8
prnstreg:
push 0
push rax
mov rax,rsp
call prnstrz
pop rax
add rsp,8
ret
;--------------------------------
;prnstrd(2)
;Display string with delimiter
;--------------------------------
;BL : delimiter byte value
;RAX : Address of the string
;--------------------------------
;Ret : -
;Note : -
;--------------------------------
align 8
prnstrd:
push rax
push rcx
push rdi
push rsi
mov rsi,rax
mov rdi,rax
mov al,bl
mov rcx,-1
repne scasb
mov rax,-2
sub rax,rcx
mov byte[rsi+rax],0
mov rax,rsi
call prnstrz
pop rsi
pop rdi
pop rcx
pop rax
ret
;---------------------------------
;readchr(1)
;Get a char from mem/var
;---------------------------------
;RAX : Address of the char
;---------------------------------
;Ret : Char in the sent address
;Note : Takes single char only
; : Var is of type DB/RB
;---------------------------------
align 8
readchr:
push rax
push rcx
mov rcx,rax
call readch
mov [rcx],al
call readch
pop rcx
pop rax
ret
;------------------------------
;
; O.S. SPECIFICS
;
;------------------------------
;------------------------------
;prnchr(1)
;Display character in RAX/AL
;------------------------------
;AL : The char to display
;------------------------------
;Ret : -
;Note : -
;------------------------------
align 8
prnchr:
push rcx
push r11
push rdi
push rsi
push rdx
push rax
mov edx,1 ;size
mov rsi,rsp ;address
mov edi,1 ;std_out
mov eax,1 ;write
syscall
pop rax
pop rdx
pop rsi
pop rdi
pop r11
pop rcx
ret
;--------------------------------
;prnstr(2)
;Display string with size
;--------------------------------
;RBX : Size of string in bytes
;RAX : Address of the string
;--------------------------------
;Ret : -
;Note : -
;--------------------------------
align 8
prnstr:
cmp rbx,0
jg .next
ret
.next: push rdi
push rsi
push rdx
push rax
push rcx
push rbx
push r11
mov rdx,rbx ;size
mov rsi,rax ;address
mov edi,1 ;stdout
mov eax,1 ;write
syscall
pop r11
pop rbx
pop rcx
pop rax
pop rdx
pop rsi
pop rdi
ret
;------------------------------
;prnstrz(1)
;Display 0-ended string
;------------------------------
;RAX : Address of the string
;------------------------------
;Ret : -
;Note : -
;------------------------------
align 8
prnstrz:
push rsi
push rdx
push rax
push rcx
push rdi
push r11
mov rsi,rax
mov rdi,rax
xor al,al
mov rcx,-1
repne scasb
mov rdx,-2
sub rdx,rcx
cmp rdx,0
jle .done
mov edi,1
mov eax,edi
syscall
.done: pop r11
pop rdi
pop rcx
pop rax
pop rdx
pop rsi
ret
;--------------------------------
;readch/1
;Get a character from keyboard
;--------------------------------
;Arg : -
;--------------------------------
;Ret : The key in AL
;Note : Takes single char only
; : Used internally
; : Use halt if needed
;--------------------------------
align 8
readch:
push rdx
push rdi
push rsi
push rcx
push r11
sub rsp,8
mov rsi,rsp
mov edx,1
xor edi,edi
xor eax,eax
syscall
xor eax,eax
mov al,[rsp]
add rsp,8
pop r11
pop rcx
pop rsi
pop rdi
pop rdx
ret
;-------------------------------
;readstr(1)/1
;Get string from keyboard
;and 0-ended it
;-------------------------------
;RAX : Address of the buffer
;-------------------------------
;Ret : # of bytes entered in RAX
; : String in buffer
;Note : Buffer is of type DB/RB
; : Buffer must be large enough
; : Ret -1 signals error
; : String will be 0-ended
;-------------------------------
align 8
readstr:
push rdi
push rsi
push rdx
push rbx
push rcx
push r11
push r12
sub rsp,8
mov rbx,rax
mov rsi,rsp
xor rdi,rdi
mov edx,1
xor rax,rax
xor r12,r12
.rep: syscall
mov al,[rsp]
cmp al,0ah
je .done
mov [rbx],al
inc r12
add rbx,1
xor rax,rax
jmp .rep
.done: mov rax,r12
cmp rax,0
ja .quit
mov rax,-1
.quit: add rbx,1
mov byte[rbx],0
add rsp,8
pop r12
pop r11
pop rcx
pop rbx
pop rdx
pop rsi
pop rdi
ret
;------------------------------
;mem_alloc(1)/1
;Request memory of n bytes
;------------------------------
;RAX : Bytes requested
;------------------------------
;Ret : Pointer of the mem block
; -1 = if none
;Note : -
;------------------------------
align 8
mem_alloc:
push rbx
push rdi
push rcx
push r11
mov rbx,rax
mov rdi,0
mov rax,12 ;query breaker
syscall
add rax,rbx
mov rdi,rax
mov rax,12
syscall ;ask memory
test rax,rax
jns .pass
mov rax,-1
jmp .quit
.pass: sub rax,rbx ;granted. Block ptr
.quit: pop r11
pop rcx
pop rdi
pop rbx
ret
;------------------------------
;mem_free(1)/1
;Free memory allocated by mem_alloc
;------------------------------
;RAX : Pointer from mem_alloc
;------------------------------
;Ret : 1 - success
; -1 - fail
;Note : -
;------------------------------
align 8
mem_free:
test rax,rax
jns .exist
mov rax,-1
ret
.exist: push rbx
push rdi
push rcx
push r11
mov rbx,rax
mov rdi,0
mov rax,12
syscall
mov rax,1
pop r11
pop rcx
pop rdi
pop rbx
ret
;----------------------
;delay(1)
;Put execution at delay
;----------------------
;RAX : Milliseconds
;----------------------
;Ret : -
;Note : 1000ms = 1s
;----------------------
align 8
delay:
push r11
push rdi
push rsi
push rax
push rcx
push rdx
cmp rax,1000
jb .nxt
mov rdi,1000
xor rdx,rdx
div rdi
push rdx
push rax
jmp .ok
.nxt: mov rdi,1000000
mul rdi
push rax
push 0
.ok: lea rsi,[rsp+8]
lea rdi,[rsp]
mov rax,35
syscall
add rsp,16
pop rdx
pop rcx
pop rax
pop rsi
pop rdi
pop r11
ret
;-------------------------------------
;file_new(1)
;Create a new file
;-------------------------------------
;RAX : File name path string
;-------------------------------------
;Ret : -
;Note : Filename string must be 0-ended
; : Permission: User read and write
; : Will not overwrite current file
;-------------------------------------
; S_IRUSR=0x100 ;Read user
; S_IWUSR=0x80 ;Write user
; S_IXUSR=0x40 ;Execute user
; S_IRGRP=0x20 ;Read group
; S_IWGRP=0x10 ;Write group
; S_IXGRP=0x8 ;Execute group
; S_IROTH=0x4 ;Read other
; S_IWOTH=0x2 ;Write other
; S_IXOTH=0x1 ;Execute other
;O_FLAG
;------------
; O_APPEND= 0x400
; O_TRUNC = 0x200
; O_EXCL = 0x80
; O_CREAT = 0x40
; O_RDWR = 0x2
; O_WRONLY= 0x1
; O_RDONLY= 0x0
;--------------
align 8
file_new:
push rax
push rdx
push rsi
push rdi
push rcx
push r11
;user read and write
mov rdx,0x100 | 0x80
mov rsi,0x40
mov rdi,rax
mov rax,2
syscall
pop r11
pop rcx
pop rdi
pop rsi
pop rdx
pop rax
ret
;-------------------------------------
;file_open(2)/1
;Open an existing file for reading/writing
;-------------------------------------
;RBX : Operation;
; 0-Read
; 1-Write
;RAX : File name path string
;-------------------------------------
;Ret : File descriptor. -1 if error
;Note : Filename string must be 0-ended
;-------------------------------------
align 8
file_open:
push rsi
push rbx
push rdi
push rcx
push r11
mov rsi,rbx
mov rdi,rax
mov rax,2
syscall
test rax,rax
jns .ok
mov rax,'open#'
push rax
mov rax,rsp
call prnstrz
add rsp,8
mov rax,-1
.ok: pop r11
pop rcx
pop rdi
pop rbx
pop rsi
ret
;-------------------------------------
;file_read(3)/1
;Read from an existing opened file
;-------------------------------------
;RCX : Number of bytes to read
;RBX : Input buffer
;RAX : File handle from file_open
;-------------------------------------
;Ret : Number of actual read
;Note : Filename string must be 0-ended
; : RBX must be >= RCX
;-------------------------------------
align 8
file_read:
test rax,rax
jns .exist
mov rax,'read#'
push rax
mov rax,rsp
call prnstrz
add rsp,8
mov rax,-1
ret
.exist: push r11
push rbx
push rcx
push rdx
push rdi
push rsi
mov rdx,rcx
mov rsi,rbx
mov rdi,rax
mov rax,0
syscall
pop rsi
pop rdi
pop rdx
pop rcx
pop rbx
pop r11
ret
;-------------------------------------
;file_write(3)/1
;Write to an existing opened file
;-------------------------------------
;RCX : Number of bytes to write
;RBX : Input buffer
;RAX : File handle from file_open
;-------------------------------------
;Ret : Number of actual read
;Note : Filename string must be 0-ended
; : Do not include 0 as end of string
; : of the source (Linux only)
;-------------------------------------
align 8
file_write:
test rax,rax
jns .exist
mov rax,'writ#'
push rax
mov rax,rsp
call prnstrz
add rsp,8
mov rax,-1
ret
.exist: push r11
push rbx
push rcx
push rdx
push rdi
push rsi
mov rdx,rcx
mov rsi,rbx
mov rdi,rax
mov rax,1
syscall
pop rsi
pop rdi
pop rdx
pop rcx
pop rbx
pop r11
ret
;----------------------------
;file_close(1)/1
;Close a file opened by file_open
;----------------------------
;RAX : FD returned by file_open
;----------------------------
;Ret : Status. -1 if error
;Note : -
;----------------------------
align 8
file_close:
push rdi
push r11
push rcx
mov rdi,rax
mov rax,3
syscall
pop rcx
pop r11
pop rdi
ret
;-------------------------------
;file_size(1)/1
;Get filesize of an opened file
;-------------------------------
;RAX : File handle from file_open
;-------------------------------
;Ret : Size in bytes
;Note : -1 says error
; : May not correct on diff linux
;-------------------------------
align 8
file_size:
test rax,rax
jns .exist
mov rax,-1
ret
.exist: push rsi
push rdi
push rbx
push rcx
push r11
sub rsp,144
mov rsi,rsp
mov rdi,rax
mov rax,5
syscall
mov rax,[rsp+48]
add rsp,144
pop r11
pop rcx
pop rbx
pop rdi
pop rsi
ret
;------------------------------------
;file_copy(2)
;Copy a file to a new file
;------------------------------------
;RBX : Address of newfile name
;RAX : Address of source file name
;------------------------------------
;Ret : -
;Note : Both must be 0-ended string
;------------------------------------
align 8
file_copy:
push rbp
mov rbp,rsp
push rax
push rbx
push rcx
push rdx
push rdi
push rsi
mov rdi,rax
mov rax,rbx
call file_new
mov rax,rdi
mov rdi,rbx
mov rbx,0
call file_open
mov rsi,rax
call file_size
mov rcx,rax
call mem_alloc
mov rbx,rax
mov rdx,rax
mov rax,rsi
call file_read
mov rax,rsi
call file_close
mov rbx,1
mov rax,rdi
call file_open
mov rsi,rax
mov rbx,rdx
call file_write
mov rax,rdx
call mem_free
mov rax,rsi
call file_close
pop rsi
pop rdi
pop rdx
pop rcx
pop rbx
pop rax
mov rsp,rbp
pop rbp
ret
;-----------------------------
;exitp
;Pause screen & exit to system
;-----------------------------
;Arg : -
;-----------------------------
;Ret :
;Note : Put at the end of code
;-----------------------------
align 8
exitp:
mov al,0ah
call prnchr
call readch
xor edi,edi
mov eax,60
syscall
ret
;-------------------------------
;exitx
;Exit to system
;-------------------------------
;Arg : -
;-------------------------------
;Ret :
;Note : Put at the end of code
;-------------------------------
align 8
exitx:
mov al,0ah
call prnchr
xor edi,edi
mov eax,60
syscall
ret
;******** END OF ROUTINES ********
;report bugs/suggestions to:
;soffianabdulrasad @ gmail . com
| 15.634073
| 45
| 0.543966
|
4ed56b2be2fefd342c269e6145b43f9144abda83
| 959
|
asm
|
Assembly
|
s2/sfx-original/AF - Shield.asm
|
Cancer52/flamedriver
|
9ee6cf02c137dcd63e85a559907284283421e7ba
|
[
"0BSD"
] | 9
|
2017-10-09T20:28:45.000Z
|
2021-06-29T21:19:20.000Z
|
s2/sfx-original/AF - Shield.asm
|
Cancer52/flamedriver
|
9ee6cf02c137dcd63e85a559907284283421e7ba
|
[
"0BSD"
] | 12
|
2018-08-01T13:52:20.000Z
|
2022-02-21T02:19:37.000Z
|
s2/sfx-original/AF - Shield.asm
|
Cancer52/flamedriver
|
9ee6cf02c137dcd63e85a559907284283421e7ba
|
[
"0BSD"
] | 2
|
2018-02-17T19:50:36.000Z
|
2019-10-30T19:28:06.000Z
|
Sound2F_Shield_Header:
smpsHeaderStartSong 2
smpsHeaderVoice Sound2F_Shield_Voices
smpsHeaderTempoSFX $01
smpsHeaderChanSFX $01
smpsHeaderSFXChannel cFM5, Sound2F_Shield_FM5, $0C, $00
; FM5 Data
Sound2F_Shield_FM5:
smpsSetvoice $00
dc.b nRst, $01, nBb2, $05, smpsNoAttack, nB2, $26
smpsStop
Sound2F_Shield_Voices:
; Voice $00
; $30
; $30, $30, $30, $30, $9E, $A8, $AC, $DC, $0E, $0A, $04, $05
; $08, $08, $08, $08, $BF, $BF, $BF, $BF, $04, $2C, $14, $80
smpsVcAlgorithm $00
smpsVcFeedback $06
smpsVcUnusedBits $00
smpsVcDetune $03, $03, $03, $03
smpsVcCoarseFreq $00, $00, $00, $00
smpsVcRateScale $03, $02, $02, $02
smpsVcAttackRate $1C, $2C, $28, $1E
smpsVcAmpMod $00, $00, $00, $00
smpsVcDecayRate1 $05, $04, $0A, $0E
smpsVcDecayRate2 $08, $08, $08, $08
smpsVcDecayLevel $0B, $0B, $0B, $0B
smpsVcReleaseRate $0F, $0F, $0F, $0F
smpsVcTotalLevel $00, $14, $2C, $04
| 28.205882
| 62
| 0.627737
|
797d125cb33717040f9e80af8beda17519b7e457
| 42,263
|
asm
|
Assembly
|
setSeedX.asm
|
ansumanpalo/xv6-the_project
|
9d9a30bb6ce558b75ed2f81a4ad8635bf53ceff8
|
[
"MIT-0"
] | null | null | null |
setSeedX.asm
|
ansumanpalo/xv6-the_project
|
9d9a30bb6ce558b75ed2f81a4ad8635bf53ceff8
|
[
"MIT-0"
] | null | null | null |
setSeedX.asm
|
ansumanpalo/xv6-the_project
|
9d9a30bb6ce558b75ed2f81a4ad8635bf53ceff8
|
[
"MIT-0"
] | null | null | null |
_setSeedX: file format elf32-i386
Disassembly of section .text:
00000000 <main>:
#include "stat.h"
#include "user.h"
int
main(int argc, char *argv[])
{
0: 8d 4c 24 04 lea 0x4(%esp),%ecx
4: 83 e4 f0 and $0xfffffff0,%esp
7: ff 71 fc pushl -0x4(%ecx)
a: 55 push %ebp
b: 89 e5 mov %esp,%ebp
d: 51 push %ecx
e: 83 ec 04 sub $0x4,%esp
11: 89 c8 mov %ecx,%eax
setSeedX(atoi(argv[1]));
13: 8b 40 04 mov 0x4(%eax),%eax
16: 83 c0 04 add $0x4,%eax
19: 8b 00 mov (%eax),%eax
1b: 83 ec 0c sub $0xc,%esp
1e: 50 push %eax
1f: e8 d9 01 00 00 call 1fd <atoi>
24: 83 c4 10 add $0x10,%esp
27: 83 ec 0c sub $0xc,%esp
2a: 50 push %eax
2b: e8 58 03 00 00 call 388 <setSeedX>
30: 83 c4 10 add $0x10,%esp
exit();
33: e8 a8 02 00 00 call 2e0 <exit>
00000038 <stosb>:
"cc");
}
static inline void
stosb(void *addr, int data, int cnt)
{
38: 55 push %ebp
39: 89 e5 mov %esp,%ebp
3b: 57 push %edi
3c: 53 push %ebx
asm volatile("cld; rep stosb" :
3d: 8b 4d 08 mov 0x8(%ebp),%ecx
40: 8b 55 10 mov 0x10(%ebp),%edx
43: 8b 45 0c mov 0xc(%ebp),%eax
46: 89 cb mov %ecx,%ebx
48: 89 df mov %ebx,%edi
4a: 89 d1 mov %edx,%ecx
4c: fc cld
4d: f3 aa rep stos %al,%es:(%edi)
4f: 89 ca mov %ecx,%edx
51: 89 fb mov %edi,%ebx
53: 89 5d 08 mov %ebx,0x8(%ebp)
56: 89 55 10 mov %edx,0x10(%ebp)
"=D" (addr), "=c" (cnt) :
"0" (addr), "1" (cnt), "a" (data) :
"memory", "cc");
}
59: 90 nop
5a: 5b pop %ebx
5b: 5f pop %edi
5c: 5d pop %ebp
5d: c3 ret
0000005e <strcpy>:
#include "user.h"
#include "x86.h"
char*
strcpy(char *s, char *t)
{
5e: 55 push %ebp
5f: 89 e5 mov %esp,%ebp
61: 83 ec 10 sub $0x10,%esp
char *os;
os = s;
64: 8b 45 08 mov 0x8(%ebp),%eax
67: 89 45 fc mov %eax,-0x4(%ebp)
while((*s++ = *t++) != 0)
6a: 90 nop
6b: 8b 45 08 mov 0x8(%ebp),%eax
6e: 8d 50 01 lea 0x1(%eax),%edx
71: 89 55 08 mov %edx,0x8(%ebp)
74: 8b 55 0c mov 0xc(%ebp),%edx
77: 8d 4a 01 lea 0x1(%edx),%ecx
7a: 89 4d 0c mov %ecx,0xc(%ebp)
7d: 0f b6 12 movzbl (%edx),%edx
80: 88 10 mov %dl,(%eax)
82: 0f b6 00 movzbl (%eax),%eax
85: 84 c0 test %al,%al
87: 75 e2 jne 6b <strcpy+0xd>
;
return os;
89: 8b 45 fc mov -0x4(%ebp),%eax
}
8c: c9 leave
8d: c3 ret
0000008e <strcmp>:
int
strcmp(const char *p, const char *q)
{
8e: 55 push %ebp
8f: 89 e5 mov %esp,%ebp
while(*p && *p == *q)
91: eb 08 jmp 9b <strcmp+0xd>
p++, q++;
93: 83 45 08 01 addl $0x1,0x8(%ebp)
97: 83 45 0c 01 addl $0x1,0xc(%ebp)
}
int
strcmp(const char *p, const char *q)
{
while(*p && *p == *q)
9b: 8b 45 08 mov 0x8(%ebp),%eax
9e: 0f b6 00 movzbl (%eax),%eax
a1: 84 c0 test %al,%al
a3: 74 10 je b5 <strcmp+0x27>
a5: 8b 45 08 mov 0x8(%ebp),%eax
a8: 0f b6 10 movzbl (%eax),%edx
ab: 8b 45 0c mov 0xc(%ebp),%eax
ae: 0f b6 00 movzbl (%eax),%eax
b1: 38 c2 cmp %al,%dl
b3: 74 de je 93 <strcmp+0x5>
p++, q++;
return (uchar)*p - (uchar)*q;
b5: 8b 45 08 mov 0x8(%ebp),%eax
b8: 0f b6 00 movzbl (%eax),%eax
bb: 0f b6 d0 movzbl %al,%edx
be: 8b 45 0c mov 0xc(%ebp),%eax
c1: 0f b6 00 movzbl (%eax),%eax
c4: 0f b6 c0 movzbl %al,%eax
c7: 29 c2 sub %eax,%edx
c9: 89 d0 mov %edx,%eax
}
cb: 5d pop %ebp
cc: c3 ret
000000cd <strlen>:
uint
strlen(char *s)
{
cd: 55 push %ebp
ce: 89 e5 mov %esp,%ebp
d0: 83 ec 10 sub $0x10,%esp
int n;
for(n = 0; s[n]; n++)
d3: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp)
da: eb 04 jmp e0 <strlen+0x13>
dc: 83 45 fc 01 addl $0x1,-0x4(%ebp)
e0: 8b 55 fc mov -0x4(%ebp),%edx
e3: 8b 45 08 mov 0x8(%ebp),%eax
e6: 01 d0 add %edx,%eax
e8: 0f b6 00 movzbl (%eax),%eax
eb: 84 c0 test %al,%al
ed: 75 ed jne dc <strlen+0xf>
;
return n;
ef: 8b 45 fc mov -0x4(%ebp),%eax
}
f2: c9 leave
f3: c3 ret
000000f4 <memset>:
void*
memset(void *dst, int c, uint n)
{
f4: 55 push %ebp
f5: 89 e5 mov %esp,%ebp
stosb(dst, c, n);
f7: 8b 45 10 mov 0x10(%ebp),%eax
fa: 50 push %eax
fb: ff 75 0c pushl 0xc(%ebp)
fe: ff 75 08 pushl 0x8(%ebp)
101: e8 32 ff ff ff call 38 <stosb>
106: 83 c4 0c add $0xc,%esp
return dst;
109: 8b 45 08 mov 0x8(%ebp),%eax
}
10c: c9 leave
10d: c3 ret
0000010e <strchr>:
char*
strchr(const char *s, char c)
{
10e: 55 push %ebp
10f: 89 e5 mov %esp,%ebp
111: 83 ec 04 sub $0x4,%esp
114: 8b 45 0c mov 0xc(%ebp),%eax
117: 88 45 fc mov %al,-0x4(%ebp)
for(; *s; s++)
11a: eb 14 jmp 130 <strchr+0x22>
if(*s == c)
11c: 8b 45 08 mov 0x8(%ebp),%eax
11f: 0f b6 00 movzbl (%eax),%eax
122: 3a 45 fc cmp -0x4(%ebp),%al
125: 75 05 jne 12c <strchr+0x1e>
return (char*)s;
127: 8b 45 08 mov 0x8(%ebp),%eax
12a: eb 13 jmp 13f <strchr+0x31>
}
char*
strchr(const char *s, char c)
{
for(; *s; s++)
12c: 83 45 08 01 addl $0x1,0x8(%ebp)
130: 8b 45 08 mov 0x8(%ebp),%eax
133: 0f b6 00 movzbl (%eax),%eax
136: 84 c0 test %al,%al
138: 75 e2 jne 11c <strchr+0xe>
if(*s == c)
return (char*)s;
return 0;
13a: b8 00 00 00 00 mov $0x0,%eax
}
13f: c9 leave
140: c3 ret
00000141 <gets>:
char*
gets(char *buf, int max)
{
141: 55 push %ebp
142: 89 e5 mov %esp,%ebp
144: 83 ec 18 sub $0x18,%esp
int i, cc;
char c;
for(i=0; i+1 < max; ){
147: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
14e: eb 42 jmp 192 <gets+0x51>
cc = read(0, &c, 1);
150: 83 ec 04 sub $0x4,%esp
153: 6a 01 push $0x1
155: 8d 45 ef lea -0x11(%ebp),%eax
158: 50 push %eax
159: 6a 00 push $0x0
15b: e8 98 01 00 00 call 2f8 <read>
160: 83 c4 10 add $0x10,%esp
163: 89 45 f0 mov %eax,-0x10(%ebp)
if(cc < 1)
166: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
16a: 7e 33 jle 19f <gets+0x5e>
break;
buf[i++] = c;
16c: 8b 45 f4 mov -0xc(%ebp),%eax
16f: 8d 50 01 lea 0x1(%eax),%edx
172: 89 55 f4 mov %edx,-0xc(%ebp)
175: 89 c2 mov %eax,%edx
177: 8b 45 08 mov 0x8(%ebp),%eax
17a: 01 c2 add %eax,%edx
17c: 0f b6 45 ef movzbl -0x11(%ebp),%eax
180: 88 02 mov %al,(%edx)
if(c == '\n' || c == '\r')
182: 0f b6 45 ef movzbl -0x11(%ebp),%eax
186: 3c 0a cmp $0xa,%al
188: 74 16 je 1a0 <gets+0x5f>
18a: 0f b6 45 ef movzbl -0x11(%ebp),%eax
18e: 3c 0d cmp $0xd,%al
190: 74 0e je 1a0 <gets+0x5f>
gets(char *buf, int max)
{
int i, cc;
char c;
for(i=0; i+1 < max; ){
192: 8b 45 f4 mov -0xc(%ebp),%eax
195: 83 c0 01 add $0x1,%eax
198: 3b 45 0c cmp 0xc(%ebp),%eax
19b: 7c b3 jl 150 <gets+0xf>
19d: eb 01 jmp 1a0 <gets+0x5f>
cc = read(0, &c, 1);
if(cc < 1)
break;
19f: 90 nop
buf[i++] = c;
if(c == '\n' || c == '\r')
break;
}
buf[i] = '\0';
1a0: 8b 55 f4 mov -0xc(%ebp),%edx
1a3: 8b 45 08 mov 0x8(%ebp),%eax
1a6: 01 d0 add %edx,%eax
1a8: c6 00 00 movb $0x0,(%eax)
return buf;
1ab: 8b 45 08 mov 0x8(%ebp),%eax
}
1ae: c9 leave
1af: c3 ret
000001b0 <stat>:
int
stat(char *n, struct stat *st)
{
1b0: 55 push %ebp
1b1: 89 e5 mov %esp,%ebp
1b3: 83 ec 18 sub $0x18,%esp
int fd;
int r;
fd = open(n, O_RDONLY);
1b6: 83 ec 08 sub $0x8,%esp
1b9: 6a 00 push $0x0
1bb: ff 75 08 pushl 0x8(%ebp)
1be: e8 5d 01 00 00 call 320 <open>
1c3: 83 c4 10 add $0x10,%esp
1c6: 89 45 f4 mov %eax,-0xc(%ebp)
if(fd < 0)
1c9: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
1cd: 79 07 jns 1d6 <stat+0x26>
return -1;
1cf: b8 ff ff ff ff mov $0xffffffff,%eax
1d4: eb 25 jmp 1fb <stat+0x4b>
r = fstat(fd, st);
1d6: 83 ec 08 sub $0x8,%esp
1d9: ff 75 0c pushl 0xc(%ebp)
1dc: ff 75 f4 pushl -0xc(%ebp)
1df: e8 54 01 00 00 call 338 <fstat>
1e4: 83 c4 10 add $0x10,%esp
1e7: 89 45 f0 mov %eax,-0x10(%ebp)
close(fd);
1ea: 83 ec 0c sub $0xc,%esp
1ed: ff 75 f4 pushl -0xc(%ebp)
1f0: e8 13 01 00 00 call 308 <close>
1f5: 83 c4 10 add $0x10,%esp
return r;
1f8: 8b 45 f0 mov -0x10(%ebp),%eax
}
1fb: c9 leave
1fc: c3 ret
000001fd <atoi>:
int
atoi(const char *s)
{
1fd: 55 push %ebp
1fe: 89 e5 mov %esp,%ebp
200: 83 ec 10 sub $0x10,%esp
int n;
n = 0;
203: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp)
while('0' <= *s && *s <= '9')
20a: eb 25 jmp 231 <atoi+0x34>
n = n*10 + *s++ - '0';
20c: 8b 55 fc mov -0x4(%ebp),%edx
20f: 89 d0 mov %edx,%eax
211: c1 e0 02 shl $0x2,%eax
214: 01 d0 add %edx,%eax
216: 01 c0 add %eax,%eax
218: 89 c1 mov %eax,%ecx
21a: 8b 45 08 mov 0x8(%ebp),%eax
21d: 8d 50 01 lea 0x1(%eax),%edx
220: 89 55 08 mov %edx,0x8(%ebp)
223: 0f b6 00 movzbl (%eax),%eax
226: 0f be c0 movsbl %al,%eax
229: 01 c8 add %ecx,%eax
22b: 83 e8 30 sub $0x30,%eax
22e: 89 45 fc mov %eax,-0x4(%ebp)
atoi(const char *s)
{
int n;
n = 0;
while('0' <= *s && *s <= '9')
231: 8b 45 08 mov 0x8(%ebp),%eax
234: 0f b6 00 movzbl (%eax),%eax
237: 3c 2f cmp $0x2f,%al
239: 7e 0a jle 245 <atoi+0x48>
23b: 8b 45 08 mov 0x8(%ebp),%eax
23e: 0f b6 00 movzbl (%eax),%eax
241: 3c 39 cmp $0x39,%al
243: 7e c7 jle 20c <atoi+0xf>
n = n*10 + *s++ - '0';
return n;
245: 8b 45 fc mov -0x4(%ebp),%eax
}
248: c9 leave
249: c3 ret
0000024a <itoa>:
char*
itoa(int val, int base){
24a: 55 push %ebp
24b: 89 e5 mov %esp,%ebp
24d: 83 ec 10 sub $0x10,%esp
static char buf[32] = {0};
int i = 30;
250: c7 45 fc 1e 00 00 00 movl $0x1e,-0x4(%ebp)
for(; val && i ; --i, val /= base)
257: eb 29 jmp 282 <itoa+0x38>
buf[i] = "0123456789abcdef"[val % base];
259: 8b 45 08 mov 0x8(%ebp),%eax
25c: 99 cltd
25d: f7 7d 0c idivl 0xc(%ebp)
260: 89 d0 mov %edx,%eax
262: 0f b6 80 2d 08 00 00 movzbl 0x82d(%eax),%eax
269: 8b 55 fc mov -0x4(%ebp),%edx
26c: 81 c2 e0 0a 00 00 add $0xae0,%edx
272: 88 02 mov %al,(%edx)
static char buf[32] = {0};
int i = 30;
for(; val && i ; --i, val /= base)
274: 83 6d fc 01 subl $0x1,-0x4(%ebp)
278: 8b 45 08 mov 0x8(%ebp),%eax
27b: 99 cltd
27c: f7 7d 0c idivl 0xc(%ebp)
27f: 89 45 08 mov %eax,0x8(%ebp)
282: 83 7d 08 00 cmpl $0x0,0x8(%ebp)
286: 74 06 je 28e <itoa+0x44>
288: 83 7d fc 00 cmpl $0x0,-0x4(%ebp)
28c: 75 cb jne 259 <itoa+0xf>
buf[i] = "0123456789abcdef"[val % base];
return &buf[i+1];
28e: 8b 45 fc mov -0x4(%ebp),%eax
291: 83 c0 01 add $0x1,%eax
294: 05 e0 0a 00 00 add $0xae0,%eax
}
299: c9 leave
29a: c3 ret
0000029b <memmove>:
void*
memmove(void *vdst, void *vsrc, int n)
{
29b: 55 push %ebp
29c: 89 e5 mov %esp,%ebp
29e: 83 ec 10 sub $0x10,%esp
char *dst, *src;
dst = vdst;
2a1: 8b 45 08 mov 0x8(%ebp),%eax
2a4: 89 45 fc mov %eax,-0x4(%ebp)
src = vsrc;
2a7: 8b 45 0c mov 0xc(%ebp),%eax
2aa: 89 45 f8 mov %eax,-0x8(%ebp)
while(n-- > 0)
2ad: eb 17 jmp 2c6 <memmove+0x2b>
*dst++ = *src++;
2af: 8b 45 fc mov -0x4(%ebp),%eax
2b2: 8d 50 01 lea 0x1(%eax),%edx
2b5: 89 55 fc mov %edx,-0x4(%ebp)
2b8: 8b 55 f8 mov -0x8(%ebp),%edx
2bb: 8d 4a 01 lea 0x1(%edx),%ecx
2be: 89 4d f8 mov %ecx,-0x8(%ebp)
2c1: 0f b6 12 movzbl (%edx),%edx
2c4: 88 10 mov %dl,(%eax)
{
char *dst, *src;
dst = vdst;
src = vsrc;
while(n-- > 0)
2c6: 8b 45 10 mov 0x10(%ebp),%eax
2c9: 8d 50 ff lea -0x1(%eax),%edx
2cc: 89 55 10 mov %edx,0x10(%ebp)
2cf: 85 c0 test %eax,%eax
2d1: 7f dc jg 2af <memmove+0x14>
*dst++ = *src++;
return vdst;
2d3: 8b 45 08 mov 0x8(%ebp),%eax
}
2d6: c9 leave
2d7: c3 ret
000002d8 <fork>:
name: \
movl $SYS_ ## name, %eax; \
int $T_SYSCALL; \
ret
SYSCALL(fork)
2d8: b8 01 00 00 00 mov $0x1,%eax
2dd: cd 40 int $0x40
2df: c3 ret
000002e0 <exit>:
SYSCALL(exit)
2e0: b8 02 00 00 00 mov $0x2,%eax
2e5: cd 40 int $0x40
2e7: c3 ret
000002e8 <wait>:
SYSCALL(wait)
2e8: b8 03 00 00 00 mov $0x3,%eax
2ed: cd 40 int $0x40
2ef: c3 ret
000002f0 <pipe>:
SYSCALL(pipe)
2f0: b8 04 00 00 00 mov $0x4,%eax
2f5: cd 40 int $0x40
2f7: c3 ret
000002f8 <read>:
SYSCALL(read)
2f8: b8 05 00 00 00 mov $0x5,%eax
2fd: cd 40 int $0x40
2ff: c3 ret
00000300 <write>:
SYSCALL(write)
300: b8 10 00 00 00 mov $0x10,%eax
305: cd 40 int $0x40
307: c3 ret
00000308 <close>:
SYSCALL(close)
308: b8 15 00 00 00 mov $0x15,%eax
30d: cd 40 int $0x40
30f: c3 ret
00000310 <kill>:
SYSCALL(kill)
310: b8 06 00 00 00 mov $0x6,%eax
315: cd 40 int $0x40
317: c3 ret
00000318 <exec>:
SYSCALL(exec)
318: b8 07 00 00 00 mov $0x7,%eax
31d: cd 40 int $0x40
31f: c3 ret
00000320 <open>:
SYSCALL(open)
320: b8 0f 00 00 00 mov $0xf,%eax
325: cd 40 int $0x40
327: c3 ret
00000328 <mknod>:
SYSCALL(mknod)
328: b8 11 00 00 00 mov $0x11,%eax
32d: cd 40 int $0x40
32f: c3 ret
00000330 <unlink>:
SYSCALL(unlink)
330: b8 12 00 00 00 mov $0x12,%eax
335: cd 40 int $0x40
337: c3 ret
00000338 <fstat>:
SYSCALL(fstat)
338: b8 08 00 00 00 mov $0x8,%eax
33d: cd 40 int $0x40
33f: c3 ret
00000340 <link>:
SYSCALL(link)
340: b8 13 00 00 00 mov $0x13,%eax
345: cd 40 int $0x40
347: c3 ret
00000348 <mkdir>:
SYSCALL(mkdir)
348: b8 14 00 00 00 mov $0x14,%eax
34d: cd 40 int $0x40
34f: c3 ret
00000350 <chdir>:
SYSCALL(chdir)
350: b8 09 00 00 00 mov $0x9,%eax
355: cd 40 int $0x40
357: c3 ret
00000358 <dup>:
SYSCALL(dup)
358: b8 0a 00 00 00 mov $0xa,%eax
35d: cd 40 int $0x40
35f: c3 ret
00000360 <getpid>:
SYSCALL(getpid)
360: b8 0b 00 00 00 mov $0xb,%eax
365: cd 40 int $0x40
367: c3 ret
00000368 <sbrk>:
SYSCALL(sbrk)
368: b8 0c 00 00 00 mov $0xc,%eax
36d: cd 40 int $0x40
36f: c3 ret
00000370 <sleep>:
SYSCALL(sleep)
370: b8 0d 00 00 00 mov $0xd,%eax
375: cd 40 int $0x40
377: c3 ret
00000378 <uptime>:
SYSCALL(uptime)
378: b8 0e 00 00 00 mov $0xe,%eax
37d: cd 40 int $0x40
37f: c3 ret
00000380 <randomX>:
SYSCALL(randomX)
380: b8 16 00 00 00 mov $0x16,%eax
385: cd 40 int $0x40
387: c3 ret
00000388 <setSeedX>:
SYSCALL(setSeedX)
388: b8 17 00 00 00 mov $0x17,%eax
38d: cd 40 int $0x40
38f: c3 ret
00000390 <uniformR>:
SYSCALL(uniformR)
390: b8 18 00 00 00 mov $0x18,%eax
395: cd 40 int $0x40
397: c3 ret
00000398 <setdeadline>:
398: b8 19 00 00 00 mov $0x19,%eax
39d: cd 40 int $0x40
39f: c3 ret
000003a0 <putc>:
#include "stat.h"
#include "user.h"
static void
putc(int fd, char c)
{
3a0: 55 push %ebp
3a1: 89 e5 mov %esp,%ebp
3a3: 83 ec 18 sub $0x18,%esp
3a6: 8b 45 0c mov 0xc(%ebp),%eax
3a9: 88 45 f4 mov %al,-0xc(%ebp)
write(fd, &c, 1);
3ac: 83 ec 04 sub $0x4,%esp
3af: 6a 01 push $0x1
3b1: 8d 45 f4 lea -0xc(%ebp),%eax
3b4: 50 push %eax
3b5: ff 75 08 pushl 0x8(%ebp)
3b8: e8 43 ff ff ff call 300 <write>
3bd: 83 c4 10 add $0x10,%esp
}
3c0: 90 nop
3c1: c9 leave
3c2: c3 ret
000003c3 <printint>:
static void
printint(int fd, int xx, int base, int sgn)
{
3c3: 55 push %ebp
3c4: 89 e5 mov %esp,%ebp
3c6: 53 push %ebx
3c7: 83 ec 24 sub $0x24,%esp
static char digits[] = "0123456789ABCDEF";
char buf[16];
int i, neg;
uint x;
neg = 0;
3ca: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
if(sgn && xx < 0){
3d1: 83 7d 14 00 cmpl $0x0,0x14(%ebp)
3d5: 74 17 je 3ee <printint+0x2b>
3d7: 83 7d 0c 00 cmpl $0x0,0xc(%ebp)
3db: 79 11 jns 3ee <printint+0x2b>
neg = 1;
3dd: c7 45 f0 01 00 00 00 movl $0x1,-0x10(%ebp)
x = -xx;
3e4: 8b 45 0c mov 0xc(%ebp),%eax
3e7: f7 d8 neg %eax
3e9: 89 45 ec mov %eax,-0x14(%ebp)
3ec: eb 06 jmp 3f4 <printint+0x31>
} else {
x = xx;
3ee: 8b 45 0c mov 0xc(%ebp),%eax
3f1: 89 45 ec mov %eax,-0x14(%ebp)
}
i = 0;
3f4: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
do{
buf[i++] = digits[x % base];
3fb: 8b 4d f4 mov -0xc(%ebp),%ecx
3fe: 8d 41 01 lea 0x1(%ecx),%eax
401: 89 45 f4 mov %eax,-0xc(%ebp)
404: 8b 5d 10 mov 0x10(%ebp),%ebx
407: 8b 45 ec mov -0x14(%ebp),%eax
40a: ba 00 00 00 00 mov $0x0,%edx
40f: f7 f3 div %ebx
411: 89 d0 mov %edx,%eax
413: 0f b6 80 b0 0a 00 00 movzbl 0xab0(%eax),%eax
41a: 88 44 0d dc mov %al,-0x24(%ebp,%ecx,1)
}while((x /= base) != 0);
41e: 8b 5d 10 mov 0x10(%ebp),%ebx
421: 8b 45 ec mov -0x14(%ebp),%eax
424: ba 00 00 00 00 mov $0x0,%edx
429: f7 f3 div %ebx
42b: 89 45 ec mov %eax,-0x14(%ebp)
42e: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
432: 75 c7 jne 3fb <printint+0x38>
if(neg)
434: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
438: 74 2d je 467 <printint+0xa4>
buf[i++] = '-';
43a: 8b 45 f4 mov -0xc(%ebp),%eax
43d: 8d 50 01 lea 0x1(%eax),%edx
440: 89 55 f4 mov %edx,-0xc(%ebp)
443: c6 44 05 dc 2d movb $0x2d,-0x24(%ebp,%eax,1)
while(--i >= 0)
448: eb 1d jmp 467 <printint+0xa4>
putc(fd, buf[i]);
44a: 8d 55 dc lea -0x24(%ebp),%edx
44d: 8b 45 f4 mov -0xc(%ebp),%eax
450: 01 d0 add %edx,%eax
452: 0f b6 00 movzbl (%eax),%eax
455: 0f be c0 movsbl %al,%eax
458: 83 ec 08 sub $0x8,%esp
45b: 50 push %eax
45c: ff 75 08 pushl 0x8(%ebp)
45f: e8 3c ff ff ff call 3a0 <putc>
464: 83 c4 10 add $0x10,%esp
buf[i++] = digits[x % base];
}while((x /= base) != 0);
if(neg)
buf[i++] = '-';
while(--i >= 0)
467: 83 6d f4 01 subl $0x1,-0xc(%ebp)
46b: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
46f: 79 d9 jns 44a <printint+0x87>
putc(fd, buf[i]);
}
471: 90 nop
472: 8b 5d fc mov -0x4(%ebp),%ebx
475: c9 leave
476: c3 ret
00000477 <printf>:
// Print to the given fd. Only understands %d, %x, %p, %s.
void
printf(int fd, char *fmt, ...)
{
477: 55 push %ebp
478: 89 e5 mov %esp,%ebp
47a: 83 ec 28 sub $0x28,%esp
char *s;
int c, i, state;
uint *ap;
state = 0;
47d: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp)
ap = (uint*)(void*)&fmt + 1;
484: 8d 45 0c lea 0xc(%ebp),%eax
487: 83 c0 04 add $0x4,%eax
48a: 89 45 e8 mov %eax,-0x18(%ebp)
for(i = 0; fmt[i]; i++){
48d: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
494: e9 59 01 00 00 jmp 5f2 <printf+0x17b>
c = fmt[i] & 0xff;
499: 8b 55 0c mov 0xc(%ebp),%edx
49c: 8b 45 f0 mov -0x10(%ebp),%eax
49f: 01 d0 add %edx,%eax
4a1: 0f b6 00 movzbl (%eax),%eax
4a4: 0f be c0 movsbl %al,%eax
4a7: 25 ff 00 00 00 and $0xff,%eax
4ac: 89 45 e4 mov %eax,-0x1c(%ebp)
if(state == 0){
4af: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
4b3: 75 2c jne 4e1 <printf+0x6a>
if(c == '%'){
4b5: 83 7d e4 25 cmpl $0x25,-0x1c(%ebp)
4b9: 75 0c jne 4c7 <printf+0x50>
state = '%';
4bb: c7 45 ec 25 00 00 00 movl $0x25,-0x14(%ebp)
4c2: e9 27 01 00 00 jmp 5ee <printf+0x177>
} else {
putc(fd, c);
4c7: 8b 45 e4 mov -0x1c(%ebp),%eax
4ca: 0f be c0 movsbl %al,%eax
4cd: 83 ec 08 sub $0x8,%esp
4d0: 50 push %eax
4d1: ff 75 08 pushl 0x8(%ebp)
4d4: e8 c7 fe ff ff call 3a0 <putc>
4d9: 83 c4 10 add $0x10,%esp
4dc: e9 0d 01 00 00 jmp 5ee <printf+0x177>
}
} else if(state == '%'){
4e1: 83 7d ec 25 cmpl $0x25,-0x14(%ebp)
4e5: 0f 85 03 01 00 00 jne 5ee <printf+0x177>
if(c == 'd'){
4eb: 83 7d e4 64 cmpl $0x64,-0x1c(%ebp)
4ef: 75 1e jne 50f <printf+0x98>
printint(fd, *ap, 10, 1);
4f1: 8b 45 e8 mov -0x18(%ebp),%eax
4f4: 8b 00 mov (%eax),%eax
4f6: 6a 01 push $0x1
4f8: 6a 0a push $0xa
4fa: 50 push %eax
4fb: ff 75 08 pushl 0x8(%ebp)
4fe: e8 c0 fe ff ff call 3c3 <printint>
503: 83 c4 10 add $0x10,%esp
ap++;
506: 83 45 e8 04 addl $0x4,-0x18(%ebp)
50a: e9 d8 00 00 00 jmp 5e7 <printf+0x170>
} else if(c == 'x' || c == 'p'){
50f: 83 7d e4 78 cmpl $0x78,-0x1c(%ebp)
513: 74 06 je 51b <printf+0xa4>
515: 83 7d e4 70 cmpl $0x70,-0x1c(%ebp)
519: 75 1e jne 539 <printf+0xc2>
printint(fd, *ap, 16, 0);
51b: 8b 45 e8 mov -0x18(%ebp),%eax
51e: 8b 00 mov (%eax),%eax
520: 6a 00 push $0x0
522: 6a 10 push $0x10
524: 50 push %eax
525: ff 75 08 pushl 0x8(%ebp)
528: e8 96 fe ff ff call 3c3 <printint>
52d: 83 c4 10 add $0x10,%esp
ap++;
530: 83 45 e8 04 addl $0x4,-0x18(%ebp)
534: e9 ae 00 00 00 jmp 5e7 <printf+0x170>
} else if(c == 's'){
539: 83 7d e4 73 cmpl $0x73,-0x1c(%ebp)
53d: 75 43 jne 582 <printf+0x10b>
s = (char*)*ap;
53f: 8b 45 e8 mov -0x18(%ebp),%eax
542: 8b 00 mov (%eax),%eax
544: 89 45 f4 mov %eax,-0xc(%ebp)
ap++;
547: 83 45 e8 04 addl $0x4,-0x18(%ebp)
if(s == 0)
54b: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
54f: 75 25 jne 576 <printf+0xff>
s = "(null)";
551: c7 45 f4 3e 08 00 00 movl $0x83e,-0xc(%ebp)
while(*s != 0){
558: eb 1c jmp 576 <printf+0xff>
putc(fd, *s);
55a: 8b 45 f4 mov -0xc(%ebp),%eax
55d: 0f b6 00 movzbl (%eax),%eax
560: 0f be c0 movsbl %al,%eax
563: 83 ec 08 sub $0x8,%esp
566: 50 push %eax
567: ff 75 08 pushl 0x8(%ebp)
56a: e8 31 fe ff ff call 3a0 <putc>
56f: 83 c4 10 add $0x10,%esp
s++;
572: 83 45 f4 01 addl $0x1,-0xc(%ebp)
} else if(c == 's'){
s = (char*)*ap;
ap++;
if(s == 0)
s = "(null)";
while(*s != 0){
576: 8b 45 f4 mov -0xc(%ebp),%eax
579: 0f b6 00 movzbl (%eax),%eax
57c: 84 c0 test %al,%al
57e: 75 da jne 55a <printf+0xe3>
580: eb 65 jmp 5e7 <printf+0x170>
putc(fd, *s);
s++;
}
} else if(c == 'c'){
582: 83 7d e4 63 cmpl $0x63,-0x1c(%ebp)
586: 75 1d jne 5a5 <printf+0x12e>
putc(fd, *ap);
588: 8b 45 e8 mov -0x18(%ebp),%eax
58b: 8b 00 mov (%eax),%eax
58d: 0f be c0 movsbl %al,%eax
590: 83 ec 08 sub $0x8,%esp
593: 50 push %eax
594: ff 75 08 pushl 0x8(%ebp)
597: e8 04 fe ff ff call 3a0 <putc>
59c: 83 c4 10 add $0x10,%esp
ap++;
59f: 83 45 e8 04 addl $0x4,-0x18(%ebp)
5a3: eb 42 jmp 5e7 <printf+0x170>
} else if(c == '%'){
5a5: 83 7d e4 25 cmpl $0x25,-0x1c(%ebp)
5a9: 75 17 jne 5c2 <printf+0x14b>
putc(fd, c);
5ab: 8b 45 e4 mov -0x1c(%ebp),%eax
5ae: 0f be c0 movsbl %al,%eax
5b1: 83 ec 08 sub $0x8,%esp
5b4: 50 push %eax
5b5: ff 75 08 pushl 0x8(%ebp)
5b8: e8 e3 fd ff ff call 3a0 <putc>
5bd: 83 c4 10 add $0x10,%esp
5c0: eb 25 jmp 5e7 <printf+0x170>
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
5c2: 83 ec 08 sub $0x8,%esp
5c5: 6a 25 push $0x25
5c7: ff 75 08 pushl 0x8(%ebp)
5ca: e8 d1 fd ff ff call 3a0 <putc>
5cf: 83 c4 10 add $0x10,%esp
putc(fd, c);
5d2: 8b 45 e4 mov -0x1c(%ebp),%eax
5d5: 0f be c0 movsbl %al,%eax
5d8: 83 ec 08 sub $0x8,%esp
5db: 50 push %eax
5dc: ff 75 08 pushl 0x8(%ebp)
5df: e8 bc fd ff ff call 3a0 <putc>
5e4: 83 c4 10 add $0x10,%esp
}
state = 0;
5e7: 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++){
5ee: 83 45 f0 01 addl $0x1,-0x10(%ebp)
5f2: 8b 55 0c mov 0xc(%ebp),%edx
5f5: 8b 45 f0 mov -0x10(%ebp),%eax
5f8: 01 d0 add %edx,%eax
5fa: 0f b6 00 movzbl (%eax),%eax
5fd: 84 c0 test %al,%al
5ff: 0f 85 94 fe ff ff jne 499 <printf+0x22>
putc(fd, c);
}
state = 0;
}
}
}
605: 90 nop
606: c9 leave
607: c3 ret
00000608 <free>:
static Header base;
static Header *freep;
void
free(void *ap)
{
608: 55 push %ebp
609: 89 e5 mov %esp,%ebp
60b: 83 ec 10 sub $0x10,%esp
Header *bp, *p;
bp = (Header*)ap - 1;
60e: 8b 45 08 mov 0x8(%ebp),%eax
611: 83 e8 08 sub $0x8,%eax
614: 89 45 f8 mov %eax,-0x8(%ebp)
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
617: a1 08 0b 00 00 mov 0xb08,%eax
61c: 89 45 fc mov %eax,-0x4(%ebp)
61f: eb 24 jmp 645 <free+0x3d>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
621: 8b 45 fc mov -0x4(%ebp),%eax
624: 8b 00 mov (%eax),%eax
626: 3b 45 fc cmp -0x4(%ebp),%eax
629: 77 12 ja 63d <free+0x35>
62b: 8b 45 f8 mov -0x8(%ebp),%eax
62e: 3b 45 fc cmp -0x4(%ebp),%eax
631: 77 24 ja 657 <free+0x4f>
633: 8b 45 fc mov -0x4(%ebp),%eax
636: 8b 00 mov (%eax),%eax
638: 3b 45 f8 cmp -0x8(%ebp),%eax
63b: 77 1a ja 657 <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)
63d: 8b 45 fc mov -0x4(%ebp),%eax
640: 8b 00 mov (%eax),%eax
642: 89 45 fc mov %eax,-0x4(%ebp)
645: 8b 45 f8 mov -0x8(%ebp),%eax
648: 3b 45 fc cmp -0x4(%ebp),%eax
64b: 76 d4 jbe 621 <free+0x19>
64d: 8b 45 fc mov -0x4(%ebp),%eax
650: 8b 00 mov (%eax),%eax
652: 3b 45 f8 cmp -0x8(%ebp),%eax
655: 76 ca jbe 621 <free+0x19>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
break;
if(bp + bp->s.size == p->s.ptr){
657: 8b 45 f8 mov -0x8(%ebp),%eax
65a: 8b 40 04 mov 0x4(%eax),%eax
65d: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx
664: 8b 45 f8 mov -0x8(%ebp),%eax
667: 01 c2 add %eax,%edx
669: 8b 45 fc mov -0x4(%ebp),%eax
66c: 8b 00 mov (%eax),%eax
66e: 39 c2 cmp %eax,%edx
670: 75 24 jne 696 <free+0x8e>
bp->s.size += p->s.ptr->s.size;
672: 8b 45 f8 mov -0x8(%ebp),%eax
675: 8b 50 04 mov 0x4(%eax),%edx
678: 8b 45 fc mov -0x4(%ebp),%eax
67b: 8b 00 mov (%eax),%eax
67d: 8b 40 04 mov 0x4(%eax),%eax
680: 01 c2 add %eax,%edx
682: 8b 45 f8 mov -0x8(%ebp),%eax
685: 89 50 04 mov %edx,0x4(%eax)
bp->s.ptr = p->s.ptr->s.ptr;
688: 8b 45 fc mov -0x4(%ebp),%eax
68b: 8b 00 mov (%eax),%eax
68d: 8b 10 mov (%eax),%edx
68f: 8b 45 f8 mov -0x8(%ebp),%eax
692: 89 10 mov %edx,(%eax)
694: eb 0a jmp 6a0 <free+0x98>
} else
bp->s.ptr = p->s.ptr;
696: 8b 45 fc mov -0x4(%ebp),%eax
699: 8b 10 mov (%eax),%edx
69b: 8b 45 f8 mov -0x8(%ebp),%eax
69e: 89 10 mov %edx,(%eax)
if(p + p->s.size == bp){
6a0: 8b 45 fc mov -0x4(%ebp),%eax
6a3: 8b 40 04 mov 0x4(%eax),%eax
6a6: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx
6ad: 8b 45 fc mov -0x4(%ebp),%eax
6b0: 01 d0 add %edx,%eax
6b2: 3b 45 f8 cmp -0x8(%ebp),%eax
6b5: 75 20 jne 6d7 <free+0xcf>
p->s.size += bp->s.size;
6b7: 8b 45 fc mov -0x4(%ebp),%eax
6ba: 8b 50 04 mov 0x4(%eax),%edx
6bd: 8b 45 f8 mov -0x8(%ebp),%eax
6c0: 8b 40 04 mov 0x4(%eax),%eax
6c3: 01 c2 add %eax,%edx
6c5: 8b 45 fc mov -0x4(%ebp),%eax
6c8: 89 50 04 mov %edx,0x4(%eax)
p->s.ptr = bp->s.ptr;
6cb: 8b 45 f8 mov -0x8(%ebp),%eax
6ce: 8b 10 mov (%eax),%edx
6d0: 8b 45 fc mov -0x4(%ebp),%eax
6d3: 89 10 mov %edx,(%eax)
6d5: eb 08 jmp 6df <free+0xd7>
} else
p->s.ptr = bp;
6d7: 8b 45 fc mov -0x4(%ebp),%eax
6da: 8b 55 f8 mov -0x8(%ebp),%edx
6dd: 89 10 mov %edx,(%eax)
freep = p;
6df: 8b 45 fc mov -0x4(%ebp),%eax
6e2: a3 08 0b 00 00 mov %eax,0xb08
}
6e7: 90 nop
6e8: c9 leave
6e9: c3 ret
000006ea <morecore>:
static Header*
morecore(uint nu)
{
6ea: 55 push %ebp
6eb: 89 e5 mov %esp,%ebp
6ed: 83 ec 18 sub $0x18,%esp
char *p;
Header *hp;
if(nu < 4096)
6f0: 81 7d 08 ff 0f 00 00 cmpl $0xfff,0x8(%ebp)
6f7: 77 07 ja 700 <morecore+0x16>
nu = 4096;
6f9: c7 45 08 00 10 00 00 movl $0x1000,0x8(%ebp)
p = sbrk(nu * sizeof(Header));
700: 8b 45 08 mov 0x8(%ebp),%eax
703: c1 e0 03 shl $0x3,%eax
706: 83 ec 0c sub $0xc,%esp
709: 50 push %eax
70a: e8 59 fc ff ff call 368 <sbrk>
70f: 83 c4 10 add $0x10,%esp
712: 89 45 f4 mov %eax,-0xc(%ebp)
if(p == (char*)-1)
715: 83 7d f4 ff cmpl $0xffffffff,-0xc(%ebp)
719: 75 07 jne 722 <morecore+0x38>
return 0;
71b: b8 00 00 00 00 mov $0x0,%eax
720: eb 26 jmp 748 <morecore+0x5e>
hp = (Header*)p;
722: 8b 45 f4 mov -0xc(%ebp),%eax
725: 89 45 f0 mov %eax,-0x10(%ebp)
hp->s.size = nu;
728: 8b 45 f0 mov -0x10(%ebp),%eax
72b: 8b 55 08 mov 0x8(%ebp),%edx
72e: 89 50 04 mov %edx,0x4(%eax)
free((void*)(hp + 1));
731: 8b 45 f0 mov -0x10(%ebp),%eax
734: 83 c0 08 add $0x8,%eax
737: 83 ec 0c sub $0xc,%esp
73a: 50 push %eax
73b: e8 c8 fe ff ff call 608 <free>
740: 83 c4 10 add $0x10,%esp
return freep;
743: a1 08 0b 00 00 mov 0xb08,%eax
}
748: c9 leave
749: c3 ret
0000074a <malloc>:
void*
malloc(uint nbytes)
{
74a: 55 push %ebp
74b: 89 e5 mov %esp,%ebp
74d: 83 ec 18 sub $0x18,%esp
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
750: 8b 45 08 mov 0x8(%ebp),%eax
753: 83 c0 07 add $0x7,%eax
756: c1 e8 03 shr $0x3,%eax
759: 83 c0 01 add $0x1,%eax
75c: 89 45 ec mov %eax,-0x14(%ebp)
if((prevp = freep) == 0){
75f: a1 08 0b 00 00 mov 0xb08,%eax
764: 89 45 f0 mov %eax,-0x10(%ebp)
767: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
76b: 75 23 jne 790 <malloc+0x46>
base.s.ptr = freep = prevp = &base;
76d: c7 45 f0 00 0b 00 00 movl $0xb00,-0x10(%ebp)
774: 8b 45 f0 mov -0x10(%ebp),%eax
777: a3 08 0b 00 00 mov %eax,0xb08
77c: a1 08 0b 00 00 mov 0xb08,%eax
781: a3 00 0b 00 00 mov %eax,0xb00
base.s.size = 0;
786: c7 05 04 0b 00 00 00 movl $0x0,0xb04
78d: 00 00 00
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
790: 8b 45 f0 mov -0x10(%ebp),%eax
793: 8b 00 mov (%eax),%eax
795: 89 45 f4 mov %eax,-0xc(%ebp)
if(p->s.size >= nunits){
798: 8b 45 f4 mov -0xc(%ebp),%eax
79b: 8b 40 04 mov 0x4(%eax),%eax
79e: 3b 45 ec cmp -0x14(%ebp),%eax
7a1: 72 4d jb 7f0 <malloc+0xa6>
if(p->s.size == nunits)
7a3: 8b 45 f4 mov -0xc(%ebp),%eax
7a6: 8b 40 04 mov 0x4(%eax),%eax
7a9: 3b 45 ec cmp -0x14(%ebp),%eax
7ac: 75 0c jne 7ba <malloc+0x70>
prevp->s.ptr = p->s.ptr;
7ae: 8b 45 f4 mov -0xc(%ebp),%eax
7b1: 8b 10 mov (%eax),%edx
7b3: 8b 45 f0 mov -0x10(%ebp),%eax
7b6: 89 10 mov %edx,(%eax)
7b8: eb 26 jmp 7e0 <malloc+0x96>
else {
p->s.size -= nunits;
7ba: 8b 45 f4 mov -0xc(%ebp),%eax
7bd: 8b 40 04 mov 0x4(%eax),%eax
7c0: 2b 45 ec sub -0x14(%ebp),%eax
7c3: 89 c2 mov %eax,%edx
7c5: 8b 45 f4 mov -0xc(%ebp),%eax
7c8: 89 50 04 mov %edx,0x4(%eax)
p += p->s.size;
7cb: 8b 45 f4 mov -0xc(%ebp),%eax
7ce: 8b 40 04 mov 0x4(%eax),%eax
7d1: c1 e0 03 shl $0x3,%eax
7d4: 01 45 f4 add %eax,-0xc(%ebp)
p->s.size = nunits;
7d7: 8b 45 f4 mov -0xc(%ebp),%eax
7da: 8b 55 ec mov -0x14(%ebp),%edx
7dd: 89 50 04 mov %edx,0x4(%eax)
}
freep = prevp;
7e0: 8b 45 f0 mov -0x10(%ebp),%eax
7e3: a3 08 0b 00 00 mov %eax,0xb08
return (void*)(p + 1);
7e8: 8b 45 f4 mov -0xc(%ebp),%eax
7eb: 83 c0 08 add $0x8,%eax
7ee: eb 3b jmp 82b <malloc+0xe1>
}
if(p == freep)
7f0: a1 08 0b 00 00 mov 0xb08,%eax
7f5: 39 45 f4 cmp %eax,-0xc(%ebp)
7f8: 75 1e jne 818 <malloc+0xce>
if((p = morecore(nunits)) == 0)
7fa: 83 ec 0c sub $0xc,%esp
7fd: ff 75 ec pushl -0x14(%ebp)
800: e8 e5 fe ff ff call 6ea <morecore>
805: 83 c4 10 add $0x10,%esp
808: 89 45 f4 mov %eax,-0xc(%ebp)
80b: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
80f: 75 07 jne 818 <malloc+0xce>
return 0;
811: b8 00 00 00 00 mov $0x0,%eax
816: eb 13 jmp 82b <malloc+0xe1>
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){
818: 8b 45 f4 mov -0xc(%ebp),%eax
81b: 89 45 f0 mov %eax,-0x10(%ebp)
81e: 8b 45 f4 mov -0xc(%ebp),%eax
821: 8b 00 mov (%eax),%eax
823: 89 45 f4 mov %eax,-0xc(%ebp)
return (void*)(p + 1);
}
if(p == freep)
if((p = morecore(nunits)) == 0)
return 0;
}
826: e9 6d ff ff ff jmp 798 <malloc+0x4e>
}
82b: c9 leave
82c: c3 ret
| 33.918941
| 60
| 0.420581
|
3868d15639cea59dc2743e3ac3ed3f55b34bc902
| 170
|
asm
|
Assembly
|
src/Flow/_Miscellaneous.asm
|
fplu/Flow
|
99570c1f257b5e4b2698e09a503b8898666d42e5
|
[
"MIT"
] | 1
|
2022-03-11T20:13:16.000Z
|
2022-03-11T20:13:16.000Z
|
src/Flow/_Miscellaneous.asm
|
fplu/Flow
|
99570c1f257b5e4b2698e09a503b8898666d42e5
|
[
"MIT"
] | null | null | null |
src/Flow/_Miscellaneous.asm
|
fplu/Flow
|
99570c1f257b5e4b2698e09a503b8898666d42e5
|
[
"MIT"
] | 1
|
2022-03-11T20:13:18.000Z
|
2022-03-11T20:13:18.000Z
|
global GetGs
global clearTrapFlag
section .text ; makes this executable
USE64
clearTrapFlag:
PUSHF
AND word [rsp], 0FEFFh
POPF
ret
GetGs :
mov rax, gs
ret
| 9.444444
| 37
| 0.717647
|
ab1484a054b8423252b81af7424586cfb4c03834
| 237
|
asm
|
Assembly
|
libsrc/_DEVELOPMENT/math/float/am9511/lam32/c/sccz80/tan_fastcall.asm
|
ahjelm/z88dk
|
c4de367f39a76b41f6390ceeab77737e148178fa
|
[
"ClArtistic"
] | 640
|
2017-01-14T23:33:45.000Z
|
2022-03-30T11:28:42.000Z
|
libsrc/_DEVELOPMENT/math/float/am9511/lam32/c/sccz80/tan_fastcall.asm
|
C-Chads/z88dk
|
a4141a8e51205c6414b4ae3263b633c4265778e6
|
[
"ClArtistic"
] | 1,600
|
2017-01-15T16:12:02.000Z
|
2022-03-31T12:11:12.000Z
|
libsrc/_DEVELOPMENT/math/float/am9511/lam32/c/sccz80/tan_fastcall.asm
|
C-Chads/z88dk
|
a4141a8e51205c6414b4ae3263b633c4265778e6
|
[
"ClArtistic"
] | 215
|
2017-01-17T10:43:03.000Z
|
2022-03-23T17:25:02.000Z
|
SECTION code_fp_am9511
PUBLIC tan_fastcall
EXTERN asm_am9511_tan_fastcall
defc tan_fastcall = asm_am9511_tan_fastcall
; SDCC bridge for Classic
IF __CLASSIC
PUBLIC _tan_fastcall
defc _tan_fastcall = asm_am9511_tan_fastcall
ENDIF
| 16.928571
| 44
| 0.852321
|
95470c2cec16d30cdebe9192f1578c898ba827e5
| 919
|
asm
|
Assembly
|
assets/link/done.asm
|
AngryCanary/AngryCanary.github.io
|
fb176a90ec65df6d59cbff5c0e3818c9e415f757
|
[
"CC0-1.0"
] | null | null | null |
assets/link/done.asm
|
AngryCanary/AngryCanary.github.io
|
fb176a90ec65df6d59cbff5c0e3818c9e415f757
|
[
"CC0-1.0"
] | null | null | null |
assets/link/done.asm
|
AngryCanary/AngryCanary.github.io
|
fb176a90ec65df6d59cbff5c0e3818c9e415f757
|
[
"CC0-1.0"
] | null | null | null |
Elf64_Sym <0>
Elf64_Sym <offset aItmDeregistert - offset unk_470, 20h, 0, 0, \ ; "_ITM_deregisterTMCloneTable"
offset dword_0, 0>
Elf64_Sym <offset aPrintf - offset unk_470, 12h, 0, 0, offset dword_0,\ ; "printf"
0>
Elf64_Sym <offset aLibcStartMain - offset unk_470, 12h, 0, 0, \ ; "__libc_start_main"
offset dword_0, 0>
Elf64_Sym <offset aGmonStart - offset unk_470, 20h, 0, 0, \ ; "__gmon_start__"
offset dword_0, 0>
Elf64_Sym <offset aItmRegistertmc - offset unk_470, 20h, 0, 0, \ ; "_ITM_registerTMCloneTable"
offset dword_0, 0>
Elf64_Sym <offset aCxaFinalize - offset unk_470, 22h, 0, 0, \ ; "__cxa_finalize"
offset dword_0, 0>
| 70.692308
| 113
| 0.509249
|
5c6a886243fcbaedd8c977e126787f36542cf38a
| 7,168
|
asm
|
Assembly
|
Transynther/x86/_processed/NONE/_st_/i9-9900K_12_0xca.log_580_748.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 9
|
2020-08-13T19:41:58.000Z
|
2022-03-30T12:22:51.000Z
|
Transynther/x86/_processed/NONE/_st_/i9-9900K_12_0xca.log_580_748.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 1
|
2021-04-29T06:29:35.000Z
|
2021-05-13T21:02:30.000Z
|
Transynther/x86/_processed/NONE/_st_/i9-9900K_12_0xca.log_580_748.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 3
|
2020-07-14T17:07:07.000Z
|
2022-03-21T01:12:22.000Z
|
.global s_prepare_buffers
s_prepare_buffers:
push %r12
push %r14
push %r15
push %r8
push %r9
push %rbp
push %rcx
push %rdi
push %rsi
lea addresses_WC_ht+0x7127, %r9
nop
and %rbp, %rbp
movb (%r9), %r14b
cmp $46628, %r15
lea addresses_WT_ht+0x13b49, %rsi
inc %r12
movw $0x6162, (%rsi)
nop
nop
nop
nop
nop
sub %r12, %r12
lea addresses_UC_ht+0x19899, %rsi
lea addresses_WC_ht+0x13389, %rdi
nop
nop
nop
nop
and $49653, %rbp
mov $111, %rcx
rep movsl
nop
nop
nop
and $37290, %r15
lea addresses_normal_ht+0x14b49, %rsi
lea addresses_UC_ht+0x168a9, %rdi
and %r15, %r15
mov $71, %rcx
rep movsb
nop
nop
nop
nop
inc %rsi
lea addresses_WT_ht+0x5ec9, %r8
nop
nop
sub $56565, %rcx
movb (%r8), %r12b
nop
nop
nop
nop
add %rbp, %rbp
lea addresses_WC_ht+0x1dfc9, %rsi
lea addresses_WT_ht+0x1c749, %rdi
nop
cmp %r12, %r12
mov $123, %rcx
rep movsl
nop
nop
nop
nop
xor $13160, %rbp
lea addresses_A_ht+0xf799, %r14
clflush (%r14)
nop
nop
xor %rbp, %rbp
mov (%r14), %r12
nop
nop
dec %rcx
lea addresses_WT_ht+0x5ecb, %r15
clflush (%r15)
nop
mfence
mov (%r15), %r9d
nop
nop
nop
nop
add $61885, %rdi
lea addresses_A_ht+0x11449, %rsi
lea addresses_WC_ht+0xc695, %rdi
nop
nop
nop
inc %r8
mov $75, %rcx
rep movsw
nop
nop
nop
nop
nop
cmp %r15, %r15
lea addresses_WC_ht+0x16f99, %r9
nop
add $2286, %rdi
mov (%r9), %rbp
nop
nop
cmp %r12, %r12
lea addresses_UC_ht+0x1a919, %rbp
nop
nop
nop
nop
nop
sub $5600, %r12
vmovups (%rbp), %ymm3
vextracti128 $0, %ymm3, %xmm3
vpextrq $1, %xmm3, %rdi
nop
nop
nop
nop
nop
and %rcx, %rcx
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %r9
pop %r8
pop %r15
pop %r14
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r14
push %r8
push %rbp
push %rbx
push %rdi
push %rdx
// Load
lea addresses_RW+0x8349, %r14
nop
xor $57980, %r11
mov (%r14), %edx
nop
nop
nop
nop
nop
and $223, %r14
// Store
mov $0x4d0cd10000000933, %rbx
nop
nop
nop
nop
sub $64838, %r8
movl $0x51525354, (%rbx)
nop
nop
xor $53393, %rdi
// Store
lea addresses_D+0x25f9, %r8
nop
nop
nop
nop
cmp %rbp, %rbp
movw $0x5152, (%r8)
nop
xor $2940, %r11
// Store
lea addresses_WC+0x1b49, %rdx
sub $27868, %r8
movl $0x51525354, (%rdx)
nop
nop
nop
nop
nop
add %rbp, %rbp
// Store
lea addresses_WC+0x1b389, %r8
nop
nop
and %r11, %r11
mov $0x5152535455565758, %rbp
movq %rbp, %xmm5
vmovups %ymm5, (%r8)
nop
nop
nop
nop
inc %rbx
// Store
mov $0x883, %rdx
nop
nop
nop
nop
xor %rbp, %rbp
movb $0x51, (%rdx)
nop
dec %rbp
// Store
lea addresses_normal+0x1849, %r11
nop
nop
cmp %r14, %r14
mov $0x5152535455565758, %rdi
movq %rdi, %xmm2
movaps %xmm2, (%r11)
nop
nop
nop
nop
dec %rbx
// Faulty Load
lea addresses_WT+0x7b49, %r11
nop
nop
nop
xor $33751, %r14
mov (%r11), %r8d
lea oracles, %rdi
and $0xff, %r8
shlq $12, %r8
mov (%rdi,%r8,1), %r8
pop %rdx
pop %rdi
pop %rbx
pop %rbp
pop %r8
pop %r14
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'size': 2, 'NT': False, 'type': 'addresses_WT', 'same': True, 'AVXalign': False, 'congruent': 0}}
{'OP': 'LOAD', 'src': {'size': 4, 'NT': False, 'type': 'addresses_RW', 'same': False, 'AVXalign': False, 'congruent': 8}}
{'OP': 'STOR', 'dst': {'size': 4, 'NT': False, 'type': 'addresses_NC', 'same': False, 'AVXalign': False, 'congruent': 1}}
{'OP': 'STOR', 'dst': {'size': 2, 'NT': False, 'type': 'addresses_D', 'same': False, 'AVXalign': False, 'congruent': 4}}
{'OP': 'STOR', 'dst': {'size': 4, 'NT': False, 'type': 'addresses_WC', 'same': False, 'AVXalign': False, 'congruent': 9}}
{'OP': 'STOR', 'dst': {'size': 32, 'NT': False, 'type': 'addresses_WC', 'same': False, 'AVXalign': False, 'congruent': 3}}
{'OP': 'STOR', 'dst': {'size': 1, 'NT': False, 'type': 'addresses_P', 'same': False, 'AVXalign': False, 'congruent': 1}}
{'OP': 'STOR', 'dst': {'size': 16, 'NT': False, 'type': 'addresses_normal', 'same': False, 'AVXalign': True, 'congruent': 8}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'size': 4, 'NT': False, 'type': 'addresses_WT', 'same': True, 'AVXalign': False, 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'LOAD', 'src': {'size': 1, 'NT': False, 'type': 'addresses_WC_ht', 'same': False, 'AVXalign': False, 'congruent': 1}}
{'OP': 'STOR', 'dst': {'size': 2, 'NT': False, 'type': 'addresses_WT_ht', 'same': False, 'AVXalign': False, 'congruent': 9}}
{'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_UC_ht', 'congruent': 4}, 'dst': {'same': False, 'type': 'addresses_WC_ht', 'congruent': 6}}
{'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_normal_ht', 'congruent': 11}, 'dst': {'same': False, 'type': 'addresses_UC_ht', 'congruent': 5}}
{'OP': 'LOAD', 'src': {'size': 1, 'NT': False, 'type': 'addresses_WT_ht', 'same': False, 'AVXalign': False, 'congruent': 7}}
{'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_WC_ht', 'congruent': 7}, 'dst': {'same': True, 'type': 'addresses_WT_ht', 'congruent': 10}}
{'OP': 'LOAD', 'src': {'size': 8, 'NT': False, 'type': 'addresses_A_ht', 'same': False, 'AVXalign': False, 'congruent': 4}}
{'OP': 'LOAD', 'src': {'size': 4, 'NT': False, 'type': 'addresses_WT_ht', 'same': False, 'AVXalign': False, 'congruent': 1}}
{'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_A_ht', 'congruent': 8}, 'dst': {'same': True, 'type': 'addresses_WC_ht', 'congruent': 2}}
{'OP': 'LOAD', 'src': {'size': 8, 'NT': False, 'type': 'addresses_WC_ht', 'same': False, 'AVXalign': False, 'congruent': 2}}
{'OP': 'LOAD', 'src': {'size': 32, 'NT': False, 'type': 'addresses_UC_ht', 'same': False, 'AVXalign': False, 'congruent': 2}}
{'54': 580}
54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54
*/
| 25.6
| 1,739
| 0.648577
|
6688740ecb475e49e90d1153e5f78484992eb699
| 2,187
|
asm
|
Assembly
|
Python/examples/subtract.asm
|
tomxp411/8080Asm
|
0c11923933b0c12db109a8356b880fcc7f861d63
|
[
"MIT"
] | null | null | null |
Python/examples/subtract.asm
|
tomxp411/8080Asm
|
0c11923933b0c12db109a8356b880fcc7f861d63
|
[
"MIT"
] | null | null | null |
Python/examples/subtract.asm
|
tomxp411/8080Asm
|
0c11923933b0c12db109a8356b880fcc7f861d63
|
[
"MIT"
] | null | null | null |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; NAME: subtract.asm
; AUTHOR: Kevin Cole ("The Ubuntourist") <kevin.cole@novawebdevelopment.org>
; LASTMOD: 2020.11.13 (kjc)
;
; DESCRIPTION:
;
; A demonstration of subtracting and conditional branching. And
; an opportunity to investigate 2's-complement arithmetic.
;
; Completely arbitrary values that should be easy to see in LEDs
; or memory dumps:
;
; AA (10101010) indicates the sign of the result is unknown
; 00 (00000000) indicates the sign of the result is 0 (no sign)
; F0 (11110000) indicates the sign of the result is - (negative)
; 0F (00001111) indicates the sign of the result is + (positive)
;
; The HLT (halt instruction) should never be reached. If it is,
; something has gone terribly wrong.
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Code segment:
ORG 000h ; Set Program Counter to address 0
LXI H,SIGN ; Point to sign indicator
MVI M,0AAh ; Set sign indicator to 10101010 (unknown)
LOOP: LDA LESS ; Load value at LESS into Accumulator
MOV B,A ; Move value in Accumulator to Register B
LDA TOTAL ; Load value at TOTAL into Accumulator
SUB B ; Accumulator (TOTAL) minus Reg. B (LESS)
STA DIFF ; Store accumulator at DIFF (DIFF = TOTAL - LESS)
JZ ZERO ; If the difference equals zero (no sign)...
JM MINUS ; If the difference is less than zero (negative)...
JP PLUS ; If the difference is more than zero (positive)...
HLT ; WARNING! WARNING! DANGER, WILL ROBINSON!
ZERO: MVI M,000h ; Set sign indicator to 00000000
JMP LOOP ; Jump to start of code (infinite loop)
MINUS: MVI M,0F0h ; Set sign indicator to 11110000
JMP LOOP ; Jump to start of code (infinite loop)
PLUS: MVI M,00Fh ; Set sign indicator to 00001111
JMP LOOP ; Jump to start of code (infinite loop)
; Data segment:
ORG 100h ; Set Program Counter to address 100 (hex)
SIGN: DB 0AAh ; Sign of the result (address 100) = unknown (AA hex)
TOTAL: DB 005h ; Data Byte at address 101 = 5
LESS: DB 010h ; Data Byte at address 102 = 16 (10 octal)
DIFF: DB 000h ; Data Byte at address 103 = 0
END ; End
| 37.067797
| 78
| 0.651578
|
b840d73a926404c9bbaa7ed22bc1122c3c203845
| 515
|
asm
|
Assembly
|
oeis/159/A159897.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/159/A159897.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/159/A159897.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A159897: Decimal expansion of (843+58*sqrt(2))/839.
; Submitted by Jamie Morken(w3)
; 1,1,0,2,5,3,2,0,4,6,0,2,8,1,7,5,8,1,9,8,2,1,8,0,9,2,3,2,4,2,4,5,0,8,3,2,9,6,2,6,9,8,5,6,6,0,0,3,7,9,7,7,3,3,9,9,8,1,2,2,4,5,8,2,6,0,2,4,5,8,2,6,4,3,0,3,6,9,7,5,0,6,8,5,7,3,5,6,9,4,5,1,6,2,1,0,1,5,6,2
bin $1,$0
mov $2,2
mov $3,$0
mul $3,4
lpb $3
add $5,$2
add $1,$5
add $2,$1
mov $1,$2
sub $3,1
lpe
mul $1,2
add $2,$5
mov $4,10
pow $4,$0
add $5,$2
div $2,4
mul $2,50
add $2,$5
div $2,$4
div $1,$2
mov $0,$1
mod $0,10
| 18.392857
| 201
| 0.537864
|
94984d2ac5cc4e26993a8c969d3a1d18c55d9767
| 5,721
|
asm
|
Assembly
|
Regvalue/changeRegs_ia32.asm
|
pkuwangh/itracer
|
5d099719ba8a4b59e36e1b0f9a0ec4f3d146e2f6
|
[
"MIT"
] | null | null | null |
Regvalue/changeRegs_ia32.asm
|
pkuwangh/itracer
|
5d099719ba8a4b59e36e1b0f9a0ec4f3d146e2f6
|
[
"MIT"
] | null | null | null |
Regvalue/changeRegs_ia32.asm
|
pkuwangh/itracer
|
5d099719ba8a4b59e36e1b0f9a0ec4f3d146e2f6
|
[
"MIT"
] | null | null | null |
; Copyright 2002-2019 Intel Corporation.
;
; This software is provided to you as Sample Source Code as defined in the accompanying
; End User License Agreement for the Intel(R) Software Development Products ("Agreement")
; section 1.L.
;
; This software and the related documents are provided as is, with no express or implied
; warranties, other than those that are expressly stated in the License.
PUBLIC ChangeRegsWrapper
PUBLIC ChangeRegs
PUBLIC SaveRegsToMem
.686
.XMM
.model flat, c
extern gprval:dword
extern agprval:dword
extern stval:real10
extern astval:real10
extern xmmval:xmmword
extern axmmval:xmmword
IFDEF CONTEXT_USING_AVX
extern ymmval:ymmword
extern aymmval:ymmword
ENDIF
IFDEF CONTEXT_USING_AVX512F
extern zmmval:ymmword ; We don't care much about the size we just need reference to the variable.
extern azmmval:ymmword ; since there is no support yet for zmmword this is good enough
extern opmaskval:qword
extern aopmaskval:qword
ENDIF
extern fpSaveArea:dword
.code
; void ChangeRegsWrapper();
; This wrapper saves and restores the registers used by ChangeRegs.
; This is done in the wrapper since we want ChangeRegs to actually
; change the register values but not to affect the application itself.
; The tool may intercept ChangeRegs and replace it with its own function.
;
; Register usage:
; eax - used (implicitly) by xsave
; ebx - used for testing the gpr values
; ecx - used for holding a pointer to the fp save area (used by fxsave)
; edx - used (implicitly) by xsave
; st0 - used (implicitly) for loading a value to the FPU stack
; st2 - used for testing the FPU values
; xmm0 - used for testing the sse (xmm) values
; ymm1 - used for testing the avx (ymm) values
; zmm5 - used for testing the avx512 (zmm) values
; k3 - used for testing the opmask register values
ChangeRegsWrapper PROC
; Save the necessary GPRs
push eax
push ebx
push ecx
push edx
IFDEF CONTEXT_USING_AVX512F
; Save the necessary mask registers
; kmovw eax, k3
BYTE 0c5h
BYTE 0f8h
BYTE 093h
BYTE 0c3h
push eax
ENDIF
; Allign the fpSaveArea
lea ecx, fpSaveArea
add ecx, 40H
and ecx, 0ffffffc0H
; Save the floating-point state
IFDEF CONTEXT_USING_AVX
push edx
xor edx, edx
mov eax, 7
xsave [ecx]
ELSE
fxsave [ecx]
ENDIF
; Now call ChangeRegs - do the actual test.
; The tool may intercept this function and modify the register values itself.
call ChangeRegs
; Placeholder for PIN_ExecuteAt
call ExecuteAt
; Save the modified values to memory so the tool can ispect them.
; This is relevant only when the tool modifies the values.
call SaveRegsToMem
; Restore the floating-point state
IFDEF CONTEXT_USING_AVX
mov eax, 7
xrstor [ecx]
pop edx
ELSE
fxrstor [ecx]
ENDIF
IFDEF CONTEXT_USING_AVX512F
; Restore the mask registers
pop eax
;kmovw k3, eax
BYTE 0c5h
BYTE 0f8h
BYTE 092h
BYTE 0d8h
ENDIF
; Restore the GPRs
pop edx
pop ecx
pop ebx
pop eax
ret
ChangeRegsWrapper ENDP
; void ChangeRegs();
; For register usage see ChangeRegsWrapper above.
ChangeRegs PROC
; TEST: load the new value to ebx
mov ebx, gprval
; prepare the test value at the top of the FPU stack
fld real10 ptr stval
; TEST: load the new value to st2
fst st(2)
; TEST: load the new value to xmm0
movdqu xmm0, xmmword ptr xmmval
IFDEF CONTEXT_USING_AVX
; TEST: load the new value to ymm1
vmovdqu ymm1, ymmword ptr ymmval
ENDIF
IFDEF CONTEXT_USING_AVX512F
; TEST: load the new value to zmm5
;instead of simple:
; vmovdqu32 zmm5, zmmword ptr zmmval
;do:
; lea eax, zmmval
; vmovdqu32 zmm5,[eax]
; encode the avx512 instruction in bytes
; since we cannot insert relocation as assembler can we need this split of lea followed by move
push eax
lea eax, zmmval
BYTE 062h
BYTE 0f1h
BYTE 0feh
BYTE 048h
BYTE 06fh
BYTE 028h
; TEST: load the new value to k3
; instead of:
; kmovw k3, opmaskval
; do:
; lea rax opmaskval
; kmovw k3, [rax] (encoded in bytes)
lea eax, opmaskval
BYTE 0c5h
BYTE 0f8h
BYTE 090h
BYTE 018h
pop eax
ENDIF
ret
ChangeRegs ENDP
; void ExecuteAt();
ExecuteAt PROC
ret
ExecuteAt ENDP
; void SaveRegsToMem();
; Save the necessary registers to memory.
; The tool will then compare the value stored in memory to the ones it expects to find.
; For register usage see ChangeRegsWrapper above.
SaveRegsToMem PROC
; TEST: store the new value of ebx
mov agprval, ebx
; prepare the test value at the top of the FPU stack
fld st(2)
; TEST: store the new value of st2
fstp real10 ptr astval
; TEST: store the new value of xmm0
movdqu xmmword ptr axmmval, xmm0
IFDEF CONTEXT_USING_AVX
; TEST: store the new value of ymm1
vmovdqu ymmword ptr aymmval, ymm1
ENDIF
IFDEF CONTEXT_USING_AVX512F
; TEST: store the new value of zmm5
;instead of simple:
; vmovdqu64 zmmword ptr azmmval, zmm5
;do:
; lea eax, azmmval
; vmovdqu64 [eax], zmm5
;encode the avx512 instruction in bytes
push eax
lea eax, azmmval
BYTE 062h
BYTE 0f1h
BYTE 0feh
BYTE 048h
BYTE 07fh
BYTE 028h
; TEST: store the new value of k3
; instead of kmovw k3, opmaskval
;do:
; lea rax aopmaskval
; kmovw [eax], k3 (encoded in bytes)
lea eax, aopmaskval
BYTE 0c5h
BYTE 0f8h
BYTE 091h
BYTE 018h
pop eax
ENDIF
ret
SaveRegsToMem ENDP
end
| 25.426667
| 101
| 0.687118
|
282bbe2b3026930f709fae06cc7a1458cb87a976
| 10,329
|
asm
|
Assembly
|
kernel/kbd/keyboard.asm
|
gniuk/BOS
|
5e144deaab35e84b572c5374dcda25490dd5c737
|
[
"Unlicense"
] | null | null | null |
kernel/kbd/keyboard.asm
|
gniuk/BOS
|
5e144deaab35e84b572c5374dcda25490dd5c737
|
[
"Unlicense"
] | null | null | null |
kernel/kbd/keyboard.asm
|
gniuk/BOS
|
5e144deaab35e84b572c5374dcda25490dd5c737
|
[
"Unlicense"
] | null | null | null |
;----------------------------------------------------------;
; BOS 0.04 Christoffer Bubach, 2004-2005. ;
;----------------------------------------------------------;
; ;
; Keyboard functions. IRQ, INT's and more. ;
; ;
;----------------------------------------------------------;
;--------------;
; Variabels ;
;--------------;
;--------------------------------------------------------------------------------;
; _______________________ Keyboard buffer system ;
; | | | | | | | | | | | | ;
; +---------------------+ ;
; | +----------> kbd_head, here is where we put new scan-codes. ;
; +--------------------> kbd_tail, where we last read a key. this means ;
; that we have 4 new scan-codes to read before we catch up. ;
;--------------------------------------------------------------------------------;
kbd_buffer db ' A 64-byte '
db ' keyboard buffer '
kbd_head db 1 ; head must be +1 from tail
kbd_tail db 0
;-------------------------------------------------------------------------;
; _________________ Flag byte: ;
; |1|1|0|0|0|1|1|1| ;
; +---------------+ 1 = True 0 = False ;
; | | | | | | | +---> shift key ;
; | | | | | | +-----> ctrl key ;
; | | | | | +-------> alt key ;
; | | | | +---------> reserved bit ;
; | | | +-----------> reserved bit ;
; | | +-------------> reserved bit ;
; | +---------------> ctrl + alt + del ;
; +-----------------> key released ;
;-------------------------------------------------------------------------;
kbd_flags db 0 ; flag byte
;-------------------------------------------------------------------------;
; _________________ LED status byte: ;
; |0|0|0|0|0|1|1|1| ;
; +---------------+ 1 = True 0 = False ;
; | | +---> scroll lock ;
; | +-----> num lock ;
; +-------> caps lock ;
;-------------------------------------------------------------------------;
kbd_status db 0 ; LED statusbyte
;----------------------;
; Keyboard IRQ ;
;----------------------;
keyboard_isr:
push eax
;-------------------------;
; get the scancode ;
;-------------------------;
xor eax, eax
in al, 0x60
;------------------------------;
; check if key was released ;
;------------------------------;
test al, 0x80
jz .key_down
and byte [kbd_flags], 01111111b ; key up..
cmp al, 42+128 ; left shift up?
je .shift_up
cmp al, 54+128 ; right shift up?
je .shift_up
cmp al, 29+128 ; ctrl up?
je .ctrl_up
cmp al, 83+128 ; del up?
je .del_up
cmp al, 56+128 ; alt up?
je .alt_up
jmp .end
;--------------------;
; it was released ;
;--------------------;
.shift_up:
and byte [kbd_flags], 11111110b
jmp .end
.del_up:
jmp .CAD_off
.ctrl_up:
and byte [kbd_flags], 11111101b ; ctrl off.
jmp .CAD_off
.alt_up:
and byte [kbd_flags], 11111011b ; alt off.
jmp .CAD_off
.CAD_off:
test byte [kbd_flags], 01000000b
jz .CAD_is_off
and byte [kbd_flags], 10111111b ; ctrl+alt+del bit off.
.CAD_is_off:
jmp .end
;----------------------------------------------;
; a key was pressed, check for special keys ;
;----------------------------------------------;
.key_down:
or byte [kbd_flags], 10000000b
.shift:
cmp al, 42
jnz .check_rshift
or byte [kbd_flags], 00000001b
jmp .end
.check_rshift:
cmp al, 54
jnz .check_ctrl
or byte [kbd_flags], 00000001b
jmp .end
.check_ctrl:
cmp al, 29
jnz .check_alt
or byte [kbd_flags], 00000010b
jmp .end
.check_alt:
cmp al, 56
jnz .ctrl_alt_del
or byte [kbd_flags], 00000100b
jmp .end
.ctrl_alt_del:
test byte [kbd_flags], 00000110b ; check for ctrl+alt
jz .check_caps
cmp al, 83 ; check for delete
jne .check_caps
or byte [kbd_flags], 01000000b ; ctrl+alt+del bit on.
;-------------------------------------;
; toggle caps, num and scroll lock ;
;-------------------------------------;
.check_caps:
cmp al, 58
jnz .check_num
xor byte [kbd_status], 4
call update_leds
jmp .end
.check_num:
cmp al, 69
jnz .check_scroll
xor byte [kbd_status], 2
call update_leds
jmp .end
.check_scroll:
cmp al, 70
jnz .end
xor byte [kbd_status], 1
call update_leds
jmp .end
;-----------------------------------;
; put the scancode in the buffer ;
;-----------------------------------;
.end:
push eax
mov edi, kbd_buffer
xor eax, eax
mov al, [kbd_head]
add edi, eax
pop eax
stosb
cmp [kbd_head], 63 ; if we reach the buffer
jne .cont1 ; end, go back to 0.
cmp [kbd_tail], 0
je .error
mov [kbd_head], 0
jmp .quit
.cont1:
mov ah, [kbd_tail]
mov al, [kbd_head]
add al, 1
cmp ah, al
je .error
inc [kbd_head]
jmp .quit
.error:
call beep ; pc_speaker.inc
mov [kbd_head], 1 ; fix it as good
mov [kbd_tail], 0 ; as possible.. :S
.quit:
mov al, 0x20
out 0x20, al
pop eax
ret
;------------------------------;
; Update the keyboard LED's ;
;------------------------------;
update_leds:
push ax
call kbd_wait
mov al, 0xED
out 0x60, al
call kbd_wait
mov al, [kbd_status]
out 0x60, al
call kbd_wait
pop ax
ret
;------------------;
; keyboard wait ;
;------------------;
kbd_wait:
jmp $+2
in al, 0x64
test al, 1
jz .ok
jmp $+2
in al, 0x60
jmp kbd_wait
.ok:
test al, 2
jnz kbd_wait
ret
;-------------------------------------------------------;
; BOS INT to get a char. ;
; out: ah = scan code, al = ascii ;
; bh = flag-byte, bl = led-byte ;
;-------------------------------------------------------;
getc:
push esi
.no_new:
mov al, [kbd_head]
mov ah, [kbd_tail]
cmp ah, 63
jne .check2
cmp al, 0
je .no_new
mov [kbd_tail], 0
jmp .done_check
.check2:
mov bl, ah
inc bl
cmp bl, al
je .no_new
inc [kbd_tail]
.done_check:
mov esi, kbd_buffer
movzx eax, [kbd_tail]
add esi, eax
mov ah, byte [esi] ; ah = scancode
movzx esi, byte [esi] ; esi = scancode
;------------------;
; some checks.. ;
;------------------;
cmp ah, 0xFA
je .no_new
cmp ah, 0xE0
je .no_new
cmp ah, 0xE1
je .no_new
test ah, 0x80
jnz .no_new
;--------------------------------;
; check for caps, shift & alt ;
;--------------------------------;
test [kbd_status], 00000100b
jnz .caps
test [kbd_flags], 00000001b
jnz .shift
;------------------;
; normal keymap ;
;------------------;
mov al, [esi+keymap] ; scancode + keymap = ascii
jmp .end
;--------------------;
; capslock keymap ;
;--------------------;
.caps:
test [kbd_flags], 00000001b
jnz .caps_and_shift
mov al, [esi+keymap_caps]
jmp .end
;--------------------------;
; caps and shift keymap ;
;--------------------------;
.caps_and_shift:
mov al, [esi+keymap_caps_shift]
jmp .end
;-----------------;
; shift keymap ;
;-----------------;
.shift:
mov al, [esi+keymap_shift]
jmp .end
;---------------------------;
; set registers and exit ;
;---------------------------;
.end:
mov bl, [kbd_status]
mov bh, [kbd_flags]
pop esi
ret
;------------------------------;
; "press any key to..." ;
;------------------------------;
wait_key:
push eax
push ebx
push esi
.no_new:
mov al, [kbd_head]
mov ah, [kbd_tail]
cmp ah, 63
jne .check2
cmp al, 0
je .no_new
mov [kbd_tail], 0
jmp .done_check
.check2:
mov bl, ah
inc bl
cmp bl, al
je .no_new
inc [kbd_tail]
.done_check:
mov esi, kbd_buffer
movzx eax, [kbd_tail]
add esi, eax
mov ah, byte [esi] ; ah = scancode
cmp ah, 0xFA ; check for some stuff..
je .no_new
cmp ah, 0xE0
je .no_new
cmp ah, 0xE1
je .no_new
test ah, 0x80
jnz .no_new
pop esi
pop ebx
pop eax
ret
| 27.181579
| 88
| 0.331881
|
defcd90ee364885aaedd707b6bfdebce4eaac47c
| 597
|
asm
|
Assembly
|
programs/oeis/000/A000695.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/000/A000695.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/000/A000695.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | null | null | null |
; A000695: Moser-de Bruijn sequence: sums of distinct powers of 4.
; 0,1,4,5,16,17,20,21,64,65,68,69,80,81,84,85,256,257,260,261,272,273,276,277,320,321,324,325,336,337,340,341,1024,1025,1028,1029,1040,1041,1044,1045,1088,1089,1092,1093,1104,1105,1108,1109,1280,1281,1284,1285,1296,1297,1300,1301,1344,1345,1348,1349,1360,1361,1364,1365,4096,4097,4100,4101,4112,4113,4116,4117,4160,4161,4164,4165,4176,4177,4180,4181,4352,4353,4356,4357,4368,4369,4372,4373,4416,4417,4420,4421,4432,4433,4436,4437,5120,5121,5124,5125
seq $0,98871 ; Sums of distinct powers of 4 plus 1.
mul $0,3
sub $0,3
div $0,3
| 74.625
| 449
| 0.755444
|
56131ecb0ec895c325ff7903ca208762cfa79fab
| 1,189
|
asm
|
Assembly
|
programs/oeis/059/A059893.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/059/A059893.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/059/A059893.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
; A059893: Reverse the order of all but the most significant bit in binary expansion of n: if n = 1ab..yz then a(n) = 1zy..ba.
; 1,2,3,4,6,5,7,8,12,10,14,9,13,11,15,16,24,20,28,18,26,22,30,17,25,21,29,19,27,23,31,32,48,40,56,36,52,44,60,34,50,42,58,38,54,46,62,33,49,41,57,37,53,45,61,35,51,43,59,39,55,47,63,64,96,80,112,72,104,88,120,68,100,84,116,76,108,92,124,66,98,82,114,74,106,90,122,70,102,86,118,78,110,94,126,65,97,81,113,73,105,89,121,69,101,85,117,77,109,93,125,67,99,83,115,75,107,91,123,71,103,87,119,79,111,95,127,128,192,160,224,144,208,176,240,136,200,168,232,152,216,184,248,132,196,164,228,148,212,180,244,140,204,172,236,156,220,188,252,130,194,162,226,146,210,178,242,138,202,170,234,154,218,186,250,134,198,166,230,150,214,182,246,142,206,174,238,158,222,190,254,129,193,161,225,145,209,177,241,137,201,169,233,153,217,185,249,133,197,165,229,149,213,181,245,141,205,173,237,157,221,189,253,131,195,163,227,147,211,179,243,139,203,171,235,155,219,187,251,135,199,167,231,151,215,183,247,143,207,175
mov $2,$0
add $2,$0
mov $0,5
mul $2,2
sub $0,$2
sub $0,11
mov $1,$0
div $1,$0
sub $1,1
lpb $0,1
mul $1,2
sub $1,$0
div $0,2
add $1,$0
add $1,$0
lpe
div $1,2
| 56.619048
| 893
| 0.686291
|
74ade20ddb5fb56424ad21b976cd4f13f66274c2
| 1,749
|
asm
|
Assembly
|
04/fill/Fill.asm
|
natsumeqi/Nand2Tetris
|
8503e0dfd22bbfd50866cc1ac3c8d601f629e38b
|
[
"MIT"
] | null | null | null |
04/fill/Fill.asm
|
natsumeqi/Nand2Tetris
|
8503e0dfd22bbfd50866cc1ac3c8d601f629e38b
|
[
"MIT"
] | null | null | null |
04/fill/Fill.asm
|
natsumeqi/Nand2Tetris
|
8503e0dfd22bbfd50866cc1ac3c8d601f629e38b
|
[
"MIT"
] | null | null | null |
// This file is part of www.nand2tetris.org
// and the book "The Elements of Computing Systems"
// by Nisan and Schocken, MIT Press.
// File name: projects/04/Fill.asm
// Runs an infinite loop that listens to the keyboard input.
// When a key is pressed (any key), the program blackens the screen,
// i.e. writes "black" in every pixel;
// the screen should remain fully black as long as the key is pressed.
// When no key is pressed, the program clears the screen, i.e. writes
// "white" in every pixel;
// the screen should remain fully clear as long as no key is pressed.
// Put your code here.
//LOOP:
//key = KBD
//addr = SCREEN
// if key != 0
// @BLACK
// else
// @WHITE
// key = RAM[KBD]
// goto LOOP
// (BLACK)
// RAM[SCREEN] = -1
// (WHITE)
// RAM[SCREEN] = 0
(LOOP)
@KBD
D=M
@key
M=D // key = KBD
@SCREEN
D=A
@addr
M=D // addr = 16384
@key
D=M
@BLACK
D ;JNE
@WHITE
0 ;JMP
(BLACK) //set black to screen
@i
M=0
@8191
D=A
@n
M=D
(SETBLACK)
@i
D=M
@n
D=D-M
@LOOP //if i > n goto LOOP
D ;JGT
@addr
A=M
M=-1
@i // i = i + 1
M=M+1
@addr
M=M+1
@SETBLACK
0 ;JMP
(WHITE) // set white to screen
@i
M=0
@8191
D=A
@n
M=D
(SETWHITE)
@i
D=M
@n
D=D-M
@LOOP //if i > n goto LOOP
D ;JGT
@addr
A=M
M=0
@i // i = i + 1
M=M+1
@addr
M=M+1
@SETWHITE
0 ;JMP
| 15.208696
| 72
| 0.45283
|
b85c28e1a30f842cc28eac93eed7f76216cc3e60
| 530
|
asm
|
Assembly
|
oeis/141/A141544.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/141/A141544.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/141/A141544.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A141544: Odd numbers k such that 2k+5 is a prime.
; Submitted by Christian Krause
; 1,3,7,9,13,19,21,27,31,33,37,39,49,51,61,63,67,73,79,81,87,93,97,103,109,111,117,123,129,133,139,151,153,163,171,177,181,187,189,207,213,217,219,229,231,237,241,243,247,249,259,271,279,283,291,297,301,307
mov $2,36
mul $2,$0
mov $4,6
lpb $2
mov $3,$4
seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0.
sub $0,$3
mov $1,$0
max $1,0
cmp $1,$0
mul $2,$1
sub $2,1
add $4,4
lpe
mov $0,$4
div $0,2
sub $0,2
| 24.090909
| 206
| 0.64717
|
3747e58148f22798cba38751916317727eed521b
| 464
|
asm
|
Assembly
|
programs/oeis/171/A171784.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | 1
|
2021-03-15T11:38:20.000Z
|
2021-03-15T11:38:20.000Z
|
programs/oeis/171/A171784.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/171/A171784.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
; A171784: Fourth smallest divisor of smallest number having exactly n divisors.
; 6,8,4,8,4,4,4,8,4,8,4,4,4,8,4,8,4,4,4,8,4,4,4,4,4,8,4,8,4,4,4,4,4,8,4,4,4,8,4,8,4,4,4,8,4,4,4,4,4,8,4,4,4,4,4,8,4,8,4,4,4,4,4,8,4,4,4,8,4,8,4,4,4,4,4,8,4,4,4,8,4,4,4,4,4,8,4,4,4,4,4,4,4,8,4,4,4,8,4,8,4,4,4,8,4
mov $1,$0
mov $2,$0
cmp $2,0
add $0,$2
div $1,$0
add $0,3
add $1,1
cal $0,10051 ; Characteristic function of primes: 1 if n is prime, else 0.
mul $1,$0
mul $1,2
add $1,4
| 30.933333
| 211
| 0.594828
|
697606474f9304697f67f7c4df92027168aadc88
| 1,760
|
asm
|
Assembly
|
programs/oeis/116/A116556.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/116/A116556.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/116/A116556.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A116556: a(n) = 2*a(n-1) + 2*a(n-2), a(0)=0, a(1)=4.
; 0,4,8,24,64,176,480,1312,3584,9792,26752,73088,199680,545536,1490432,4071936,11124736,30393344,83036160,226859008,619790336,1693298688,4626178048,12638953472,34530263040,94338433024,257737392128,704151650304,1923778084864,5255859470336,14359275110400,39230269161472,107179088543744,292818715410432,799995607908352,2185628646637568,5971248509091840,16313754311458816,44570005641101312,121767519905120256,332675051092443136,908885141995126784,2483120386175139840,6784011056340533248,18534262885031346176,50636547882743758848,138341621535550210048,377956338836587937792,1032595920744276295680,2821104519161728466944,7707400879812009525248,21057010797947475984384,57528823355518971019264,157171668306932894007296,429400983324903730053120,1173145303263673248120832,3205092573177153956347904,8756475752881654408937472,23923136652117616730570752,65359224809998542279016448,178564722924232318019174400,487847895468461720596381696,1332825236785388077231112192,3641346264507699595654987776,9948343002586175345772199936,27179378534187749882854375424,74255443073547850457253150720,202869643215471200680215052288,554250172578038102274936406016,1514239631587018605910302916608,4136979608330113416370478645248,11302438479834264044561563123712,30878836176328754921864083537920,84362549312326037932851293323264,230482770977309585709430753722368,629690640579271247284564094091264,1720346823113161665987989695627264,4700074927384865826545107579437056,12840843500996054985066194550128640,35081836856761841623222604259131392,95845360715515793216577597618520064,261854395144555269679600403755302912,715399511720142125792356002747645952
mov $3,4
lpb $0
sub $0,1
mul $1,2
mov $2,$1
add $1,$3
mov $3,$2
lpe
mov $0,$1
| 135.384615
| 1,615
| 0.906818
|
ebcb227ac9f13d9f0b373f7a0e15554be722a8bf
| 7,047
|
asm
|
Assembly
|
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_7290_1391.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 9
|
2020-08-13T19:41:58.000Z
|
2022-03-30T12:22:51.000Z
|
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_7290_1391.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 1
|
2021-04-29T06:29:35.000Z
|
2021-05-13T21:02:30.000Z
|
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_7290_1391.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 3
|
2020-07-14T17:07:07.000Z
|
2022-03-21T01:12:22.000Z
|
.global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r12
push %r8
push %rax
push %rbp
push %rcx
push %rdi
push %rsi
lea addresses_WC_ht+0xb04d, %r11
nop
nop
nop
nop
add $3886, %rsi
movups (%r11), %xmm1
vpextrq $0, %xmm1, %rdi
nop
add $239, %rdi
lea addresses_WC_ht+0x10b69, %rdi
nop
nop
nop
dec %rbp
mov (%rdi), %si
nop
nop
nop
nop
inc %rax
lea addresses_WC_ht+0x1ce89, %rbp
clflush (%rbp)
nop
nop
sub %r8, %r8
mov $0x6162636465666768, %rsi
movq %rsi, %xmm4
vmovups %ymm4, (%rbp)
nop
nop
nop
nop
nop
inc %rbp
lea addresses_A_ht+0x14109, %rsi
lea addresses_WT_ht+0xc31b, %rdi
nop
nop
cmp %rax, %rax
mov $18, %rcx
rep movsq
nop
nop
nop
nop
xor $713, %rbp
lea addresses_UC_ht+0x16489, %rdi
nop
nop
nop
cmp %rbp, %rbp
mov (%rdi), %r11
nop
nop
nop
nop
nop
add $58253, %rbp
lea addresses_UC_ht+0x13d29, %rdi
nop
cmp $18143, %rbp
vmovups (%rdi), %ymm3
vextracti128 $1, %ymm3, %xmm3
vpextrq $1, %xmm3, %r8
nop
nop
add $2456, %rsi
lea addresses_UC_ht+0x6e39, %rsi
lea addresses_UC_ht+0x7c89, %rdi
nop
nop
sub $25222, %r12
mov $64, %rcx
rep movsq
nop
nop
nop
cmp $41682, %r11
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %rax
pop %r8
pop %r12
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r13
push %r14
push %r9
push %rax
push %rbx
push %rcx
// Store
lea addresses_UC+0x1e9c1, %rcx
nop
inc %r9
mov $0x5152535455565758, %r13
movq %r13, %xmm1
vmovups %ymm1, (%rcx)
nop
nop
nop
sub $38568, %rbx
// Store
lea addresses_WC+0x13d09, %r14
nop
mfence
mov $0x5152535455565758, %r9
movq %r9, %xmm5
movups %xmm5, (%r14)
nop
nop
inc %r10
// Store
lea addresses_PSE+0x11f09, %r14
clflush (%r14)
nop
nop
xor %rax, %rax
movb $0x51, (%r14)
nop
nop
nop
add %r10, %r10
// Store
lea addresses_normal+0x6689, %r13
nop
nop
cmp $62502, %r9
movl $0x51525354, (%r13)
nop
xor %rbx, %rbx
// Load
lea addresses_PSE+0x8435, %r13
nop
nop
nop
nop
nop
inc %rbx
mov (%r13), %r9w
// Exception!!!
nop
nop
nop
mov (0), %rax
nop
nop
nop
nop
xor %rax, %rax
// Faulty Load
lea addresses_normal+0x4c89, %r13
nop
nop
nop
nop
and %r14, %r14
mov (%r13), %r9d
lea oracles, %rcx
and $0xff, %r9
shlq $12, %r9
mov (%rcx,%r9,1), %r9
pop %rcx
pop %rbx
pop %rax
pop %r9
pop %r14
pop %r13
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_normal', 'same': False, 'size': 8, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_UC', 'same': False, 'size': 32, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_WC', 'same': False, 'size': 16, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_PSE', 'same': False, 'size': 1, 'congruent': 7, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_normal', 'same': False, 'size': 4, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_PSE', 'same': False, 'size': 2, 'congruent': 2, 'NT': False, 'AVXalign': True}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'type': 'addresses_normal', 'same': True, 'size': 4, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_WC_ht', 'same': False, 'size': 16, 'congruent': 2, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WC_ht', 'same': False, 'size': 2, 'congruent': 4, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_WC_ht', 'same': True, 'size': 32, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_A_ht', 'congruent': 7, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 1, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_UC_ht', 'same': False, 'size': 8, 'congruent': 8, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_UC_ht', 'same': False, 'size': 32, 'congruent': 5, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_UC_ht', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 9, 'same': True}, 'OP': 'REPM'}
{'34': 7290}
34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34
*/
| 32.325688
| 2,999
| 0.654889
|
89b2222d1ba35edbf9ca27cd529f919aa697c1e3
| 445
|
asm
|
Assembly
|
oeis/110/A110212.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/110/A110212.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/110/A110212.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A110212: a(n+3) = 6*a(n) - 5*a(n+2), a(0) = -1, a(1) = 5, a(2) = -25.
; Submitted by Jon Maiga
; -1,5,-25,119,-565,2675,-12661,59915,-283525,1341659,-6348805,30042875,-142164421,672729275,-3183389125,15063959099,-71283419845,337316764475,-1596200067781,7553299819835,-35742598512325,169135792154939,-800359161855685,3787340218204475
add $0,2
lpb $0
sub $0,1
mov $1,$3
mul $2,-6
sub $2,2
mov $3,$2
add $2,$1
lpe
mov $0,$1
div $0,2
| 27.8125
| 237
| 0.669663
|
db5645d4bdc09354874063808eb8f9337c816b62
| 1,652
|
asm
|
Assembly
|
src/tr.asm
|
K0ertis/STM8_CPPUTEST
|
2ded81f67f7d42aa8ad887ff9510306a59aaeb72
|
[
"MIT"
] | 1
|
2017-12-09T22:20:03.000Z
|
2017-12-09T22:20:03.000Z
|
src/tr.asm
|
K0ertis/STM8S_Template
|
2ded81f67f7d42aa8ad887ff9510306a59aaeb72
|
[
"MIT"
] | null | null | null |
src/tr.asm
|
K0ertis/STM8S_Template
|
2ded81f67f7d42aa8ad887ff9510306a59aaeb72
|
[
"MIT"
] | null | null | null |
;--------------------------------------------------------
; File Created by SDCC : free open source ANSI-C Compiler
; Version 3.6.0 #9615 (Linux)
;--------------------------------------------------------
.module tr
.optsdcc -mstm8
;--------------------------------------------------------
; Public variables in this module
;--------------------------------------------------------
.globl _main_internal
;--------------------------------------------------------
; ram data
;--------------------------------------------------------
.area DATA
;--------------------------------------------------------
; ram data
;--------------------------------------------------------
.area INITIALIZED
;--------------------------------------------------------
; absolute external ram data
;--------------------------------------------------------
.area DABS (ABS)
;--------------------------------------------------------
; global & static initialisations
;--------------------------------------------------------
.area HOME
.area GSINIT
.area GSFINAL
.area GSINIT
;--------------------------------------------------------
; Home
;--------------------------------------------------------
.area HOME
.area HOME
;--------------------------------------------------------
; code
;--------------------------------------------------------
.area CODE
; src/tr.c: 5: int main_internal() {
; -----------------------------------------
; function main_internal
; -----------------------------------------
_main_internal:
; src/tr.c: 8: while(1)
00102$:
jra 00102$
; src/tr.c: 13: return 1;
; src/tr.c: 14: }
ret
.area CODE
.area INITIALIZER
.area CABS (ABS)
| 30.592593
| 57
| 0.267554
|
1adb52f83dd2a5ccf7814221c7449793a2d21169
| 7,081
|
asm
|
Assembly
|
ugbc/src/hw/ef936x/put_image.asm
|
spotlessmind1975/ugbasic
|
1df3c8fde8e80b479ece86b4ff2b97b599d57ff4
|
[
"Apache-2.0"
] | 10
|
2021-10-03T13:44:25.000Z
|
2022-03-10T23:53:32.000Z
|
ugbc/src/hw/ef936x/put_image.asm
|
spotlessmind1975/ugbasic
|
1df3c8fde8e80b479ece86b4ff2b97b599d57ff4
|
[
"Apache-2.0"
] | 379
|
2021-08-12T09:46:09.000Z
|
2022-03-27T11:29:12.000Z
|
ugbc/src/hw/ef936x/put_image.asm
|
spotlessmind1975/ugbasic
|
1df3c8fde8e80b479ece86b4ff2b97b599d57ff4
|
[
"Apache-2.0"
] | 2
|
2021-11-08T19:37:50.000Z
|
2021-11-20T22:27:12.000Z
|
; /*****************************************************************************
; * ugBASIC - an isomorphic BASIC language compiler for retrocomputers *
; *****************************************************************************
; * Copyright 2021-2022 Marco Spedaletti (asimov@mclink.it)
; *
; * Licensed under the Apache License, Version 2.0 (the "License");
; * you may not use this file except in compliance with the License.
; * You may obtain a copy of the License at
; *
; * http://www.apache.org/licenses/LICENSE-2.0
; *
; * Unless required by applicable law or agreed to in writing, software
; * distributed under the License is distributed on an "AS IS" BASIS,
; * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
; * See the License for the specific language governing permissions and
; * limitations under the License.
; *----------------------------------------------------------------------------
; * Concesso in licenza secondo i termini della Licenza Apache, versione 2.0
; * (la "Licenza"); è proibito usare questo file se non in conformità alla
; * Licenza. Una copia della Licenza è disponibile all'indirizzo:
; *
; * http://www.apache.org/licenses/LICENSE-2.0
; *
; * Se non richiesto dalla legislazione vigente o concordato per iscritto,
; * il software distribuito nei termini della Licenza è distribuito
; * "COSì COM'è", SENZA GARANZIE O CONDIZIONI DI ALCUN TIPO, esplicite o
; * implicite. Consultare la Licenza per il testo specifico che regola le
; * autorizzazioni e le limitazioni previste dalla medesima.
; ****************************************************************************/
;* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
;* *
;* IMAGES ROUTINE FOR EF936X *
;* *
;* by Marco Spedaletti *
;* *
;* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
;--------------
PUTIMAGE
LDA CURRENTMODE
CMPA #0
BNE PUTIMAGE0X
JMP PUTIMAGE0
PUTIMAGE0X
CMPA #1
BNE PUTIMAGE1X
JMP PUTIMAGE1
PUTIMAGE1X
CMPA #2
BNE PUTIMAGE2X
JMP PUTIMAGE2
PUTIMAGE2X
CMPA #3
BNE PUTIMAGE3X
JMP PUTIMAGE3
PUTIMAGE3X
CMPA #4
BNE PUTIMAGE4X
JMP PUTIMAGE4
PUTIMAGE4X
RTS
PUTIMAGE1
PUTIMAGE4
RTS
PUTIMAGE0
PUTIMAGE2
PSHS Y
LDX BITMAPADDRESS
ANDCC #$FE
LDD <IMAGEY
LSLB
ROLA
LSLB
ROLA
LSLB
ROLA
TFR D, Y
ANDCC #$FE
LDD <IMAGEY
LSLB
ROLA
LSLB
ROLA
LSLB
ROLA
LSLB
ROLA
LSLB
ROLA
LEAY D, Y
TFR Y, D
LEAX D, X
ANDCC #$FE
LDD <IMAGEX
LSRA
RORB
LSRA
RORB
LSRA
RORB
LEAX D, X
PULS Y
LDA ,Y
LSRA
LSRA
LSRA
STA <IMAGEW
LDA 1,Y
STA <IMAGEH
STA <IMAGEH2
LEAY 2,Y
LDA <IMAGEW
LDB <IMAGEH
PSHS X,D
JMP PUTIMAGE2Y
PUTIMAGE3
PSHS Y
LDD <(IMAGEY)
LSLB
ROLA
ADDD #PLOTVBASE
TFR D, X
LDD , X
TFR D, X
LDB <(IMAGEX+1)
LSRB
LSRB
LEAX B, X
PULS Y
LDA ,Y
LSRA
LSRA
STA <IMAGEW
LDA 1,Y
STA <IMAGEH
STA <IMAGEH2
LEAY 2,Y
LDA <IMAGEW
LDB <IMAGEH
PSHS X,D
JMP PUTIMAGE2Y
PUTIMAGE2Y
LDA <IMAGET
LBEQ PUTIMAGE2YDEF
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
PUTIMAGE2YTRANS
LDA CURRENTMODE
; CMPA #2
; BEQ PUTIMAGE2YTRANS2
CMPA #3
BEQ PUTIMAGE2YTRANS3
JMP PUTIMAGE2YDEF
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
PUTIMAGE2YTRANS3
LDA $a7c0
ORA #$01
STA $a7c0
LDB <IMAGEW
DECB
PUTIMAGE2YTRANS3L1
LDA #0
STA <MATHPTR5
LDA B,Y
; 00 01 10 00
ANDA #$F0
; -> 00 00 00 00
BEQ PUTIMAGE2YTRANS3L1P4X
LDA <MATHPTR5
ORA #$F0
STA <MATHPTR5
PUTIMAGE2YTRANS3L1P4X
LDA B,Y
; 00 01 10 00
ANDA #$0F
; -> 00 01 00 00
BEQ PUTIMAGE2YTRANS3L1P3X
LDA <MATHPTR5
ORA #$0F
; MATH PTR = 00 11 00 00
STA <MATHPTR5
PUTIMAGE2YTRANS3L1P3X
LDA <MATHPTR5
; 00 11 11 00
EORA #$FF
; 11 00 00 11
STA <MATHPTR6
LDA B,X
; 00 00 00 00
ANDA <MATHPTR6
STA <MATHPTR6
; 00 00 00 00
LDA B,Y
ANDA <MATHPTR5
ORA <MATHPTR6
STA B,X
DECB
CMPB #0
BGE PUTIMAGE2YTRANS3L1
LDB <IMAGEW
LEAY B, Y
LDB CURRENTSL
LEAX B, X
DEC <IMAGEH
LDB <IMAGEH
CMPB #0
BEQ PUTIMAGE2YTRANS3COMMONE2
LDB <IMAGEW
DECB
JMP PUTIMAGE2YTRANS3L1
PUTIMAGE2YTRANS3COMMONE2
PULS X,D
STA <IMAGEW
STB <IMAGEH
LDA $a7c0
ANDA #$fe
STA $a7c0
LDB <IMAGEW
DECB
PUTIMAGE2YTRANS3L12
LDA #0
STA <MATHPTR5
LDA B,Y
; 00 01 10 00
ANDA #$F0
; -> 00 00 00 00
BEQ PUTIMAGE2YTRANS3L12P4X
LDA <MATHPTR5
ORA #$F0
STA <MATHPTR5
PUTIMAGE2YTRANS3L12P4X
LDA B,Y
; 00 01 10 00
ANDA #$0F
; -> 00 01 00 00
BEQ PUTIMAGE2YTRANS3L12P3X
LDA <MATHPTR5
ORA #$0F
; MATH PTR = 00 11 00 00
STA <MATHPTR5
PUTIMAGE2YTRANS3L12P3X
LDA <MATHPTR5
; 00 11 11 00
EORA #$FF
; 11 00 00 11
STA <MATHPTR6
LDA B,X
; 00 00 00 00
ANDA <MATHPTR6
STA <MATHPTR6
; 00 00 00 00
LDA B,Y
ANDA <MATHPTR5
ORA <MATHPTR6
STA B,X
DECB
CMPB #0
BGE PUTIMAGE2YTRANS3L12
LDB <IMAGEW
LEAY B, Y
LDB CURRENTSL
LEAX B, X
DEC <IMAGEH
LDB <IMAGEH
CMPB #0
BEQ PUTIMAGECOMMONE5
LDB <IMAGEW
DECB
JMP PUTIMAGE2YTRANS3L12
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
PUTIMAGE2YDEF
LDA $a7c0
ORA #$01
STA $a7c0
LDB <IMAGEW
DECB
PUTIMAGE2L1
LDA B,Y
STA B,X
DECB
CMPB #0
BGE PUTIMAGE2L1
LDB <IMAGEW
LEAY B, Y
LDB CURRENTSL
LEAX B, X
DEC <IMAGEH
LDB <IMAGEH
CMPB #0
BEQ PUTIMAGECOMMONE2
LDB <IMAGEW
DECB
JMP PUTIMAGE2L1
PUTIMAGECOMMONE2
PULS X,D
STA <IMAGEW
STB <IMAGEH
LDA $a7c0
ANDA #$fe
STA $a7c0
LDB <IMAGEW
DECB
PUTIMAGE2L12
LDA B,Y
STA B,X
DECB
CMPB #0
BGE PUTIMAGE2L12
LDB <IMAGEW
LEAY B, Y
LDB CURRENTSL
LEAX B, X
DEC <IMAGEH
LDB <IMAGEH
CMPB #0
BEQ PUTIMAGECOMMONE5
LDB <IMAGEW
DECB
JMP PUTIMAGE2L12
PUTIMAGECOMMONE5
; LDA CURRENTMODE
; CMPA #3
; BEQ PUTIMAGECOMMONE53
; LDU #4
; JMP PUTIMAGECOMMONE50
; PUTIMAGECOMMONE53
; LDU #16
; JMP PUTIMAGECOMMONE50
; PUTIMAGECOMMONE50
; LDA #0
; STA $A7DB
; PUTIMAGECOMMONE50L1
; LDD ,Y
; LEAY 2,Y
; STB $A7DA
; STA $A7DA
; LEAU -1, U
; CMPU #$FFFF
; BNE PUTIMAGECOMMONE50L1
PUTIMAGECOMMONE
RTS
| 17.398034
| 80
| 0.52196
|
d67ea7c8f1ee812430221105d813d4ff47a14eff
| 592
|
asm
|
Assembly
|
oeis/116/A116176.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/116/A116176.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/116/A116176.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A116176: a(n) = 9^n * n*(n+1).
; 0,18,486,8748,131220,1771470,22320522,267846264,3099363912,34867844010,383546284110,4142299868388,44059007691036,462619580755878,4804126415541810,49413871702715760,504021491367700752,5103217600097970114,51332365271573699382,513323652715736993820,5106219492803910096420,50551572978758709954558,498294076504907283837786,4892341842048180604952808,47859865846123505918016600,466633691999704182700661850,4535679486237124655850433182,43961201174298285125934967764,424958278018216756217371355052
add $0,1
mov $2,9
pow $2,$0
bin $0,2
mul $0,$2
div $0,81
mul $0,18
| 53.818182
| 490
| 0.863176
|
cbf34a999feec0cc9efbb36d9e8905d334f3f868
| 374
|
asm
|
Assembly
|
runtime/sources/x86/memcpy.x64-k1om.asm
|
wdv4758h/Yeppp-
|
deeca59a88bc2b014be802fd575757f7c26c180e
|
[
"BSD-3-Clause"
] | 30
|
2015-09-18T00:52:22.000Z
|
2021-11-03T17:44:30.000Z
|
runtime/sources/x86/memcpy.x64-k1om.asm
|
rguthrie3/Yeppp-Mirror
|
23cc725a7489d376558bef3e92e31fda014b6c47
|
[
"BSD-3-Clause"
] | 1
|
2017-02-09T04:53:29.000Z
|
2017-02-09T04:53:29.000Z
|
runtime/sources/x86/memcpy.x64-k1om.asm
|
rguthrie3/Yeppp-Mirror
|
23cc725a7489d376558bef3e92e31fda014b6c47
|
[
"BSD-3-Clause"
] | 6
|
2017-02-09T03:05:32.000Z
|
2022-03-17T06:50:19.000Z
|
#
# Yeppp! library runtime infrastructure
#
# This file is part of Yeppp! library and licensed under MIT license.
# See runtime/LICENSE.txt for details.
#
#
.include "common.inc"
BEGIN_X86_FUNCTION memcpy
BEGIN_X86_SUBFUNCTION _intel_fast_memcpy
CLD
MOV rcx, rdx
MOV rax, rdi
REP MOVSB
RET
END_X86_SUBFUNCTION _intel_fast_memcpy
END_X86_FUNCTION memcpy
| 18.7
| 69
| 0.76738
|
1bf8753497355e51f1ee84edff27366e6335235a
| 3,062
|
asm
|
Assembly
|
sources/ippcp/asm_intel64/pcprc4m7as.asm
|
ntyukaev/ipp-crypto
|
19b408cfd21a59f994b64dd47b18eb0c2f94e4e0
|
[
"Apache-2.0"
] | 30
|
2017-07-26T20:03:19.000Z
|
2021-10-14T23:38:54.000Z
|
sources/ippcp/asm_intel64/pcprc4m7as.asm
|
ntyukaev/ipp-crypto
|
19b408cfd21a59f994b64dd47b18eb0c2f94e4e0
|
[
"Apache-2.0"
] | 9
|
2018-09-25T18:32:42.000Z
|
2022-02-18T12:23:40.000Z
|
sources/ippcp/asm_intel64/pcprc4m7as.asm
|
ntyukaev/ipp-crypto
|
19b408cfd21a59f994b64dd47b18eb0c2f94e4e0
|
[
"Apache-2.0"
] | 14
|
2017-08-31T19:53:23.000Z
|
2021-02-27T01:08:14.000Z
|
;===============================================================================
; Copyright 2015-2020 Intel Corporation
;
; Licensed under the Apache License, Version 2.0 (the "License");
; you may not use this file except in compliance with the License.
; You may obtain a copy of the License at
;
; http://www.apache.org/licenses/LICENSE-2.0
;
; Unless required by applicable law or agreed to in writing, software
; distributed under the License is distributed on an "AS IS" BASIS,
; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
; See the License for the specific language governing permissions and
; limitations under the License.
;===============================================================================
;
;
; Purpose: Cryptography Primitive.
; ARCFour
;
; Content:
; ARCFourKernel()
;
;
%include "asmdefs.inc"
%include "ia_32e.inc"
%if (_IPP32E >= _IPP32E_M7)
segment .text align=IPP_ALIGN_FACTOR
;***************************************************************
;* Purpose: RC4 kernel
;*
;* void ARCFourProcessData(const Ipp8u *pSrc, Ipp8u *pDst, int len,
;* IppsARCFourState* pCtx)
;*
;***************************************************************
;;
;; Lib = M7
;;
;; Caller = ippsARCFourEncrypt
;; Caller = ippsARCFourDecrypt
;;
align IPP_ALIGN_FACTOR
IPPASM ARCFourProcessData,PUBLIC
USES_GPR rsi,rdi,rbx,rbp
USES_XMM
COMP_ABI 4
;; rdi: pSrc: BYTE, ; input stream
;; rsi: pDst: BYTE, ; output stream
;; rdx: len: DWORD, ; stream length
;; rcx: pCtx: BYTE ; context
movsxd r8, edx
test r8, r8 ; test length
mov rbp, rcx ; copy pointer context
jz .quit
movzx rax, byte [rbp+4] ; extract x
movzx rbx, byte [rbp+8] ; extract y
lea rbp, [rbp+12] ; sbox
add rax,1 ; x = (x+1)&0xFF
movzx rax, al
movzx rcx, byte [rbp+rax*4] ; tx = S[x]
;;
;; main code
;;
align IPP_ALIGN_FACTOR
.main_loop:
add rbx, rcx ; y = (x+tx)&0xFF
movzx rbx, bl
add rdi, 1
add rsi, 1
movzx rdx, byte [rbp+rbx*4] ; ty = S[y]
mov dword [rbp+rbx*4],ecx ; S[y] = tx
add rcx, rdx ; tmp_idx = (tx+ty)&0xFF
movzx rcx, cl
mov dword [rbp+rax*4],edx ; S[x] = ty
mov dl, byte [rbp+rcx*4] ; byte of gamma
add rax, 1 ; next x = (x+1)&0xFF
movzx rax, al
xor dl,byte [rdi-1] ; gamma ^= src
sub r8, 1
movzx rcx, byte [rbp+rax*4] ; next tx = S[x]
mov byte [rsi-1],dl ; store result
jne .main_loop
lea rbp, [rbp-12] ; pointer to context
sub rax, 1 ; actual new x counter
movzx rax, al
mov dword [rbp+4], eax ; update x conter
mov dword [rbp+8], ebx ; updtae y counter
.quit:
REST_XMM
REST_GPR
ret
ENDFUNC ARCFourProcessData
%endif
| 26.859649
| 80
| 0.512737
|
57ef99c4c691c807980a8e46934a57175f14b92b
| 3,888
|
asm
|
Assembly
|
lib/target/lm80c/classic/lm80c_crt0.asm
|
witchcraft2001/z88dk
|
11adca337a4125aff611ddfdf3fc2401e8dda5b2
|
[
"ClArtistic"
] | 2
|
2019-05-06T16:26:16.000Z
|
2021-06-22T19:11:29.000Z
|
lib/target/lm80c/classic/lm80c_crt0.asm
|
C-Chads/z88dk
|
a4141a8e51205c6414b4ae3263b633c4265778e6
|
[
"ClArtistic"
] | null | null | null |
lib/target/lm80c/classic/lm80c_crt0.asm
|
C-Chads/z88dk
|
a4141a8e51205c6414b4ae3263b633c4265778e6
|
[
"ClArtistic"
] | null | null | null |
;
; Startup for LM80-C
;
module lm80c_crt0
;--------
; Include zcc_opt.def to find out some info
;--------
defc crt0 = 1
INCLUDE "zcc_opt.def"
;--------
; Some scope definitions
;--------
EXTERN _main ;main() is always external to crt0 code
PUBLIC cleanup ;jp'd to by exit()
PUBLIC l_dcal ;jp(hl)
defc CONSOLE_COLUMNS = 32
defc CONSOLE_ROWS = 24
defc TAR__no_ansifont = 1
defc CRT_KEY_DEL = 12
defc __CPU_CLOCK = 3500000
PUBLIC PSG_AY_REG
PUBLIC PSG_AY_DATA
defc PSG_AY_REG = @01000000
defc PSG_AY_DATA = @01000001
EXTERN nmi_vectors
EXTERN asm_interrupt_handler
EXTERN __vdp_enable_status
EXTERN VDP_STATUS
defc TAR__clib_exit_stack_size = 0
defc TAR__register_sp = -1
defc TAR__fputc_cons_generic = 0
INCLUDE "target/lm80c/def/lm80c.def"
defc CRT_ORG_CODE = BASTXT
INCLUDE "crt/classic/crt_rules.inc"
org CRT_ORG_CODE
defc SYS_ADDRESS = CRT_ORG_CODE+16
defc SYS_DIGIT1 = ((SYS_ADDRESS & 0xF000) / 256 / 16)
defc SYS_DIGIT2 = ((SYS_ADDRESS & 0x0F00) / 256 )
defc SYS_DIGIT3 = ((SYS_ADDRESS & 0x00F0) / 16 )
defc SYS_DIGIT4 = ((SYS_ADDRESS & 0x000F) )
defc SYS_HEXDIGIT1 = ((SYS_DIGIT1+48)*(SYS_DIGIT1 <= 9)) + ((SYS_DIGIT1+65-10)*(SYS_DIGIT1 > 9))
defc SYS_HEXDIGIT2 = ((SYS_DIGIT2+48)*(SYS_DIGIT2 <= 9)) + ((SYS_DIGIT2+65-10)*(SYS_DIGIT2 > 9))
defc SYS_HEXDIGIT3 = ((SYS_DIGIT3+48)*(SYS_DIGIT3 <= 9)) + ((SYS_DIGIT3+65-10)*(SYS_DIGIT3 > 9))
defc SYS_HEXDIGIT4 = ((SYS_DIGIT4+48)*(SYS_DIGIT4 <= 9)) + ((SYS_DIGIT4+65-10)*(SYS_DIGIT4 > 9))
; BASIC header for the LM80-C
; 2020 SYS&H8253:END
basicstart:
defw (SYS_ADDRESS-2) ; pointer to next basic line in memory
defw FWN ; line number (as reference, Firmware number is used)
defb TOKENSYS ; SYS token code
defb 0x26, 0x48 ; "&H"
defb SYS_HEXDIGIT1 ; "8"
defb SYS_HEXDIGIT2 ; "2"
defb SYS_HEXDIGIT3 ; "5"
defb SYS_HEXDIGIT4 ; "3"
defb 0x3a ; ":"
defb 0x80 ; END token code
defb 0x00 ; end of BASIC line
defw 0x0000 ; NULL basic line number (resides at SYS_ADDRESS-2)
start:
ld (start1+1),sp
INCLUDE "crt/classic/crt_init_sp.asm"
INCLUDE "crt/classic/crt_init_atexit.asm"
call crt0_init_bss
ld (exitsp),sp
; Optional definition for auto MALLOC init
; it assumes we have free space between the end of
; the compiled program and the stack pointer
IF DEFINED_USING_amalloc
INCLUDE "crt/classic/crt_init_amalloc.asm"
ENDIF
; Setup NMI if required
; Apparently the NMI is buggy, a 0.01second tick is available
; via CTC3IV at 0x81ca which we could hook instead
; ld hl,interrupt
; ld (NMIUSR+1),hl
; ld a,195 ;JP
; ld (NMIUSR),a
call _main
cleanup:
push hl
call crt0_exit
; We should probably disable VDP interrupts before doing this
; ld hl,$45ED ;retn
; ld (NMIUSR),hl
pop bc
start1:
ld sp,0
ret
l_dcal:
jp (hl)
; VDP interrupt
IF 0
EXTERN __vdp_enable_status
EXTERN VDP_STATUS
interrupt:
push af
push hl
ld a,(__vdp_enable_status)
rlca
jr c,no_vbl
in a,(VDP_STATUS)
no_vbl:
ld hl,nmi_vectors
call asm_interrupt_handler
pop hl
pop af
retn
ENDIF
INCLUDE "crt/classic/crt_runtime_selection.asm"
INCLUDE "crt/classic/crt_section.asm"
| 25.92
| 104
| 0.57356
|
28da218ceb663af03f1c40c37e195f5a479f9323
| 309
|
asm
|
Assembly
|
libsrc/_DEVELOPMENT/adt/b_vector/c/sccz80/b_vector_capacity.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 640
|
2017-01-14T23:33:45.000Z
|
2022-03-30T11:28:42.000Z
|
libsrc/_DEVELOPMENT/adt/b_vector/c/sccz80/b_vector_capacity.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 1,600
|
2017-01-15T16:12:02.000Z
|
2022-03-31T12:11:12.000Z
|
libsrc/_DEVELOPMENT/adt/b_vector/c/sccz80/b_vector_capacity.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 215
|
2017-01-17T10:43:03.000Z
|
2022-03-23T17:25:02.000Z
|
; size_t b_vector_capacity(b_vector_t *v)
SECTION code_clib
SECTION code_adt_b_vector
PUBLIC b_vector_capacity
EXTERN asm_b_vector_capacity
defc b_vector_capacity = asm_b_vector_capacity
; SDCC bridge for Classic
IF __CLASSIC
PUBLIC _b_vector_capacity
defc _b_vector_capacity = b_vector_capacity
ENDIF
| 16.263158
| 46
| 0.857605
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.