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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
64deb808bdabb961569837a32608095d4713c7f6 | 4,726 | asm | Assembly | main.asm | itsPiyush01/calculator_x64 | 62551178d8d4fb8af2b0dc7702ac0368131d73b0 | [
"MIT"
] | null | null | null | main.asm | itsPiyush01/calculator_x64 | 62551178d8d4fb8af2b0dc7702ac0368131d73b0 | [
"MIT"
] | null | null | null | main.asm | itsPiyush01/calculator_x64 | 62551178d8d4fb8af2b0dc7702ac0368131d73b0 | [
"MIT"
] | null | null | null | section .data
welcomeText db "################ Welcome to ASM_Calculator ################",10,0
command_text db 10,"Choose an operator : +, -, *, or /",10,0
invalid db "Invalid operator ",10,"Give inputs again",10,0
exit_text db "For exit Enter 'X' or ctrl + c ",10,0
text1 db "Enter 1st number :",0
text2 db "Enter 2st number :",0
equal_char db " = ",0
operator_input db "0",0
section .bss
n1 resb 64;
n2 resb 64;
n3 resb 64;
result resb 64;
num1 resb 64; 16 byte reserve name variable
num2 resb 64; 16 byte reserve name variable
digitSpace resb 100
digitSpacePos resb 8; is enough for 64 bit
section .text
global _start
%macro exit 0
mov rax,60
mov rdi ,0
syscall
%endmacro
%macro displayString 1
mov rax,0
mov rax,%1
call _print
%endmacro
%macro displayInteger 1
mov rax,0
mov rax,[%1]
call _printRAXInt
%endmacro
%macro takeInput 1
mov rsi,%1
call _getInput
%endmacro
%macro strToInt 2
mov rdx,%1
call _stringToInteger
mov [%2] ,rax
%endmacro
_addition:
mov rax,operator_input
mov rbx,'+ '
mov [operator_input],rbx
mov rax,[num1]
add rax, [num2]
mov [result],rax
ret
_subtraction:
mov rbx,'- '
mov [operator_input],rbx
mov rax,[num1]
sub rax,[num2]
mov [result],rax
ret
_multiplication:
mov rbx,'* '
mov [operator_input],rbx
mov rax,[num1]
mov rbx,[num2]
mul rbx
mov [result],rax
ret
_division:
mov rbx,'/ '
mov [operator_input],rbx
mov rdx,0
mov rax,[num1]
mov rbx,[num2]
div rbx
mov [result],rax
ret
_exit:
mov rax,60
mov rdi ,0
syscall
_welcome:
displayString welcomeText
ret
_menu:
displayString command_text
displayString exit_text
takeInput operator_input
mov rax,operator_input
mov cl,[rax]
; if user enter X or X
cmp cl ,'X'
je _exit
; je hello
cmp cl ,'x'
je _exit; both are working macros and label here why ?
displayString text1
takeInput n1
displayString text2
takeInput n2
strToInt n1,num1
strToInt n2,num2
mov rax,operator_input
mov cl,[rax]
cmp cl,'+'
je _addition
cmp cl,'-'
je _subtraction
cmp cl,'*'
je _multiplication
cmp cl,'/'
je _division
displayString invalid
call _menu
ret
_print_result:
; num1 + num2 = result
displayInteger num1
displayString operator_input
displayInteger num2
displayString equal_char
displayInteger result
ret
_main:
call _menu
call _print_result
call _main
_start:
call _welcome
call _main
exit
_print:
push rax
mov rbx,0; to count the length of the string
_print_loop:
inc rax
inc rbx
mov cl,[rax];rcx 8 bit equivalent
cmp cl,0; if it is zero it means end of the String
jne _print_loop
;print the code
mov rax,1
mov rdi,1
pop rsi
mov rdx,rbx
syscall
ret
; For taking number from user
_getInput:
mov rax ,0 ;id 0 means sys_in
mov rdi , 0; 0=>standard_input , 1=>standard_output , 2=>standard_error
; mov rsi ,num; where we're going to save the data
mov rdx ,16
syscall
ret
_printRAXInt:
mov rcx,digitSpace
mov rbx ,32;which is space
; mov rbx,10; which is newline
mov [rcx],rbx;
inc rcx
mov [digitSpacePos], rcx ; measures how far we are on the string
_printRAXLoop:
mov rdx,0; to insure it not mess up our division
mov rbx,10
div rbx ; div the value
push rax; store the value for now
add rdx ,48 ; add to the remainder 3 + 48 to convert it to character
;rdx store the remainder
mov rcx,[digitSpacePos];
mov [rcx],dl; lower 8 byte of the rdx that we got , mov it to our digit space
inc rcx
mov [digitSpacePos],rcx
pop rax
cmp rax,0 ; compare it to the 0
jne _printRAXLoop; if it is not equal to zero then re run the loop
_printRAXLoop2:
mov rcx,[digitSpacePos]
mov rax,1
mov rdi,1
mov rsi ,rcx
mov rdx ,1
syscall
mov rcx,[digitSpacePos]
dec rcx
mov [digitSpacePos],rcx
cmp rcx,digitSpace
jge _printRAXLoop2
ret
_stringToInteger:
; mov rdx, num ; our string
atoi:
xor rax, rax ; zero a "result so far"
.top:
movzx rcx, byte [rdx] ; get a character
inc rdx ; ready for next one
cmp rcx, '0' ; valid?
jb .done
cmp rcx, '9'
ja .done
sub rcx, '0' ; "convert" character to number
imul rax, 10 ; multiply "result so far" by ten
add rax, rcx ; add in current digit
jmp .top ; until done
.done:
ret | 18.317829 | 85 | 0.619763 |
ac2dc2acf33d8b220b84c22f159e1612e12a8c3d | 5,516 | asm | Assembly | u7-common/patch-eop-produceItemLabelText.asm | JohnGlassmyer/UltimaHacks | f9a114e00c4a1edf1ac7792b465feff2c9b88ced | [
"MIT"
] | 68 | 2018-03-04T22:34:22.000Z | 2022-03-10T15:18:32.000Z | u7-common/patch-eop-produceItemLabelText.asm | ptrie/UltimaHacks | 2c3557a86d94ad8b54b26bc395b9aed1604f8be1 | [
"MIT"
] | 19 | 2018-11-20T04:06:49.000Z | 2021-11-08T16:37:10.000Z | u7-common/patch-eop-produceItemLabelText.asm | ptrie/UltimaHacks | 2c3557a86d94ad8b54b26bc395b9aed1604f8be1 | [
"MIT"
] | 4 | 2020-09-01T17:57:36.000Z | 2022-01-04T20:51:11.000Z | ; Produce text to label a clicked item, substituting the item's weight or
; bulk in place of its name if the Shift key or Ctrl key, respectively, is held.
;
; The original game did not reveal any information about the bulk of items to
; the player other than by blocking attempts to place items inside of containers
; having insufficient space.
[bits 16]
startPatch EXE_LENGTH, eop-produceItemLabelText
startBlockAt addr_eop_produceItemLabelText
push bp
mov bp, sp
; bp-based stack frame:
%assign arg_itemLabelType 0x08
%assign arg_ibo 0x06
%assign arg_pn_string 0x04
%assign ____callerIp 0x02
%assign ____callerBp 0x00
%assign var_itemType -0x02
%assign var_itemFrame -0x04
%assign var_itemQuantity -0x06
%assign var_valueOfItem -0x08
%assign var_valueOfContents -0x0A
%assign var_capacityOfItem -0x0C
%assign var_valueString -0x0E
%assign var_valueLength -0x10
%assign var_templateVarCount -0x12
%assign var_templateBuffer -0x62
add sp, var_templateBuffer
push si
push di
; get type
mov es, word [dseg_itemBufferSegment]
mov bx, [bp+arg_ibo]
mov ax, [es:bx+4]
and ax, 0x3FF
mov [bp+var_itemType], ax
; truncate string before doing anything else
mov bx, [bp+arg_pn_string]
mov byte [bx], 0
mov byte [bx+79], 0
mov ax, [bp+arg_itemLabelType]
cmp ax, ItemLabelType_NAME
jz produceItemNameText
cmp ax, ItemLabelType_WEIGHT
jz produceWeightText
cmp ax, ItemLabelType_BULK
jz produceBulkText
jmp procEnd
weightString db 'weight', 0
bulkString db 'bulk', 0
itemTemplate db ': %d.%d', 0
itemContentsTemplate db ': %d.%d (contents: %d.%d)', 0
itemContentsCapacityTemplate db ': %d.%d (contents: %d.%d of %d.%d)', 0
contentsTemplate db ' of contents: %d.%d', 0
produceWeightText:
lea ax, [bp+arg_ibo]
push ax
callFromOverlay Item_getWeight
pop cx
mov word [bp+var_valueOfItem], ax
lea ax, [bp+arg_ibo]
push ax
callFromOverlay determineWeightOfContents
pop cx
mov word [bp+var_valueOfContents], ax
cmp word [bp+var_valueOfItem], 0
jz dontIncludeWeightOfContents
add word [bp+var_valueOfItem], ax
dontIncludeWeightOfContents:
mov word [bp+var_capacityOfItem], 0
mov si, offsetInCodeSegment(weightString)
mov cx, 6
jmp haveValues
produceBulkText:
push word [bp+arg_ibo]
callVarArgsEopFromOverlay determineItemBulk, 1
pop cx
mov word [bp+var_valueOfItem], ax
lea ax, [bp+arg_ibo]
push ax
callFromOverlay determineBulkOfContents
pop cx
mov word [bp+var_valueOfContents], ax
push word [bp+var_itemType]
callFromOverlay getItemTypeBulk
pop cx
mov word [bp+var_capacityOfItem], ax
mov si, offsetInCodeSegment(bulkString)
mov cx, 4
haveValues:
mov word [bp+var_valueLength], cx
; copy value string from code segment into stack
lea di, [bp+var_templateBuffer]
fmemcpy ss, di, cs, si, cx
mov word [bp+var_templateVarCount], 0
%macro pushDiv10 1
mov ax, %1
mov dl, 10
div dl
movzx cx, ah
push cx
inc word [bp+var_templateVarCount]
mov cl, al
push cx
inc word [bp+var_templateVarCount]
%endmacro
cmp word [bp+var_valueOfItem], 0
jnz haveItem
cmp word [bp+var_valueOfContents], 0
jz procEnd
mov si, offsetInCodeSegment(contentsTemplate)
pushDiv10 word [bp+var_valueOfContents]
jmp applyTemplate
haveItem:
cmp word [bp+var_valueOfContents], 0
jnz haveItemAndContents
mov si, offsetInCodeSegment(itemTemplate)
pushDiv10 word [bp+var_valueOfItem]
jmp applyTemplate
haveItemAndContents:
cmp word [bp+var_capacityOfItem], 0
jnz haveItemAndContentsAndCapacity
mov si, offsetInCodeSegment(itemContentsTemplate)
pushDiv10 word [bp+var_valueOfContents]
pushDiv10 word [bp+var_valueOfItem]
jmp applyTemplate
haveItemAndContentsAndCapacity:
mov si, offsetInCodeSegment(itemContentsCapacityTemplate)
pushDiv10 word [bp+var_capacityOfItem]
pushDiv10 word [bp+var_valueOfContents]
pushDiv10 word [bp+var_valueOfItem]
applyTemplate:
mov cx, 80
sub cx, [bp+var_valueLength]
; copy template from code segment into stack
lea di, [bp+var_templateBuffer]
add di, [bp+var_valueLength]
fmemcpy ss, di, cs, si, cx
sprintfTemplate:
lea ax, [bp+var_templateBuffer]
push ax
push word [bp+arg_pn_string]
callFromOverlay sprintf
pop cx
pop cx
mov ax, [bp+var_templateVarCount]
shl ax, 1
add sp, ax
jmp procEnd
produceItemNameText:
; get frame
mov es, word [dseg_itemBufferSegment]
mov bx, [bp+arg_ibo]
mov ax, [es:bx+4]
and ax, 0x7C00
shr ax, 10
mov [bp+var_itemFrame], ax
; get quantity
mov ax, [bp+var_itemType]
mov dx, 3
imul dx
mov bx, ax
mov al, [dseg_itemTypeInfo+1+bx]
and ax, 0xF
cmp ax, 3
jnz itemTypeHasNoQuantity
lea ax, [bp+arg_ibo]
push ax
callFromOverlay Item_getQuantity
pop cx
mov word [bp+var_itemQuantity], ax
jmp haveQuantity
itemTypeHasNoQuantity:
mov word [bp+var_itemQuantity], 0
haveQuantity:
callProduceItemDisplayName
procEnd:
pop di
pop si
mov sp, bp
pop bp
retn
endBlockAt off_eop_produceItemLabelText_end
endPatch
| 24.192982 | 80 | 0.680928 |
95571f468dae236ddc6f8c26a6524971699b7ec1 | 75,467 | asm | Assembly | Source/vs/GeoIP.asm | LeGone/daspirum | 21b904140fd51e881f38d43a8d0af0befdfc5cea | [
"MIT"
] | null | null | null | Source/vs/GeoIP.asm | LeGone/daspirum | 21b904140fd51e881f38d43a8d0af0befdfc5cea | [
"MIT"
] | null | null | null | Source/vs/GeoIP.asm | LeGone/daspirum | 21b904140fd51e881f38d43a8d0af0befdfc5cea | [
"MIT"
] | null | null | null | ; Listing generated by Microsoft (R) Optimizing Compiler Version 16.00.40219.01
TITLE C:\Work\daspirum\Source\src\GeoIP.cpp
.686P
.XMM
include listing.inc
.model flat
INCLUDELIB OLDNAMES
PUBLIC ??_R4iosockstream@dlib@@6B@ ; dlib::iosockstream::`RTTI Complete Object Locator'
PUBLIC ??_R3iosockstream@dlib@@8 ; dlib::iosockstream::`RTTI Class Hierarchy Descriptor'
PUBLIC ??_R2iosockstream@dlib@@8 ; dlib::iosockstream::`RTTI Base Class Array'
PUBLIC ??_R1A@?0A@EA@iosockstream@dlib@@8 ; dlib::iosockstream::`RTTI Base Class Descriptor at (0,-1,0,64)'
PUBLIC ??_R0?AViosockstream@dlib@@@8 ; dlib::iosockstream `RTTI Type Descriptor'
PUBLIC ??0sockstreambuf@dlib@@QAE@PAVconnection@1@@Z ; dlib::sockstreambuf::sockstreambuf
PUBLIC ?flush_output_on_read@sockstreambuf@dlib@@QAEXXZ ; dlib::sockstreambuf::flush_output_on_read
PUBLIC ?get@?$shared_ptr_thread_safe@Vconnection@dlib@@@dlib@@QBEPAVconnection@2@XZ ; dlib::shared_ptr_thread_safe<dlib::connection>::get
PUBLIC ??C?$scoped_ptr@Vsockstreambuf@dlib@@U?$default_deleter@Vsockstreambuf@dlib@@@2@@dlib@@QBEPAVsockstreambuf@1@XZ ; dlib::scoped_ptr<dlib::sockstreambuf,dlib::default_deleter<dlib::sockstreambuf> >::operator->
PUBLIC ?get@?$scoped_ptr@Vsockstreambuf@dlib@@U?$default_deleter@Vsockstreambuf@dlib@@@2@@dlib@@QBEPAVsockstreambuf@2@XZ ; dlib::scoped_ptr<dlib::sockstreambuf,dlib::default_deleter<dlib::sockstreambuf> >::get
PUBLIC ??$?0Vconnection@dlib@@@?$shared_ptr_thread_safe@Vconnection@dlib@@@dlib@@QAE@PAVconnection@1@@Z ; dlib::shared_ptr_thread_safe<dlib::connection>::shared_ptr_thread_safe<dlib::connection><dlib::connection>
PUBLIC ??$reset@Vconnection@dlib@@@?$shared_ptr_thread_safe@Vconnection@dlib@@@dlib@@QAEXPAVconnection@1@@Z ; dlib::shared_ptr_thread_safe<dlib::connection>::reset<dlib::connection>
PUBLIC ?open@iosockstream@dlib@@QAEXABUnetwork_address@2@@Z ; dlib::iosockstream::open
PUBLIC ??0?$scoped_ptr@Vtimeout@dlib@@U?$default_deleter@Vtimeout@dlib@@@2@@dlib@@QAE@PAVtimeout@1@@Z ; dlib::scoped_ptr<dlib::timeout,dlib::default_deleter<dlib::timeout> >::scoped_ptr<dlib::timeout,dlib::default_deleter<dlib::timeout> >
PUBLIC ??0?$scoped_ptr@Vsockstreambuf@dlib@@U?$default_deleter@Vsockstreambuf@dlib@@@2@@dlib@@QAE@PAVsockstreambuf@1@@Z ; dlib::scoped_ptr<dlib::sockstreambuf,dlib::default_deleter<dlib::sockstreambuf> >::scoped_ptr<dlib::sockstreambuf,dlib::default_deleter<dlib::sockstreambuf> >
PUBLIC ??0iosockstream@dlib@@QAE@ABUnetwork_address@1@@Z ; dlib::iosockstream::iosockstream
PUBLIC ??0?$shared_ptr_thread_safe@Vconnection@dlib@@@dlib@@QAE@XZ ; dlib::shared_ptr_thread_safe<dlib::connection>::shared_ptr_thread_safe<dlib::connection>
PUBLIC ??$_Move@AAPAUshared_ptr_thread_safe_node@dlib@@@std@@YA$$QAPAUshared_ptr_thread_safe_node@dlib@@AAPAU12@@Z ; std::_Move<dlib::shared_ptr_thread_safe_node * &>
PUBLIC ??$swap@PAUshared_ptr_thread_safe_node@dlib@@@std@@YAXAAPAUshared_ptr_thread_safe_node@dlib@@0@Z ; std::swap<dlib::shared_ptr_thread_safe_node *>
PUBLIC ?swap@?$shared_ptr_thread_safe@Vconnection@dlib@@@dlib@@QAEXAAV12@@Z ; dlib::shared_ptr_thread_safe<dlib::connection>::swap
PUBLIC ?reset@?$shared_ptr_thread_safe@Vconnection@dlib@@@dlib@@QAEXXZ ; dlib::shared_ptr_thread_safe<dlib::connection>::reset
PUBLIC ??D?$shared_ptr_thread_safe@Vconnection@dlib@@@dlib@@QBEAAVconnection@1@XZ ; dlib::shared_ptr_thread_safe<dlib::connection>::operator*
PUBLIC ??C?$shared_ptr_thread_safe@Vconnection@dlib@@@dlib@@QBEPAVconnection@1@XZ ; dlib::shared_ptr_thread_safe<dlib::connection>::operator->
PUBLIC ?reset@?$scoped_ptr@Vsockstreambuf@dlib@@U?$default_deleter@Vsockstreambuf@dlib@@@2@@dlib@@QAEXPAVsockstreambuf@2@@Z ; dlib::scoped_ptr<dlib::sockstreambuf,dlib::default_deleter<dlib::sockstreambuf> >::reset
PUBLIC ??B?$scoped_ptr@Vsockstreambuf@dlib@@U?$default_deleter@Vsockstreambuf@dlib@@@2@@dlib@@QBE_NXZ ; dlib::scoped_ptr<dlib::sockstreambuf,dlib::default_deleter<dlib::sockstreambuf> >::operator bool
PUBLIC ?close@iosockstream@dlib@@QAEXK@Z ; dlib::iosockstream::close
PUBLIC ??R?$default_deleter@Vtimeout@dlib@@@dlib@@QBEXPAVtimeout@1@@Z ; dlib::default_deleter<dlib::timeout>::operator()
PUBLIC ??1?$scoped_ptr@Vtimeout@dlib@@U?$default_deleter@Vtimeout@dlib@@@2@@dlib@@QAE@XZ ; dlib::scoped_ptr<dlib::timeout,dlib::default_deleter<dlib::timeout> >::~scoped_ptr<dlib::timeout,dlib::default_deleter<dlib::timeout> >
PUBLIC ??1?$shared_ptr_thread_safe@Vconnection@dlib@@@dlib@@QAE@XZ ; dlib::shared_ptr_thread_safe<dlib::connection>::~shared_ptr_thread_safe<dlib::connection>
PUBLIC ??R?$default_deleter@Vsockstreambuf@dlib@@@dlib@@QBEXPAVsockstreambuf@1@@Z ; dlib::default_deleter<dlib::sockstreambuf>::operator()
PUBLIC ??1?$scoped_ptr@Vsockstreambuf@dlib@@U?$default_deleter@Vsockstreambuf@dlib@@@2@@dlib@@QAE@XZ ; dlib::scoped_ptr<dlib::sockstreambuf,dlib::default_deleter<dlib::sockstreambuf> >::~scoped_ptr<dlib::sockstreambuf,dlib::default_deleter<dlib::sockstreambuf> >
PUBLIC ??_Giosockstream@dlib@@UAEPAXI@Z ; dlib::iosockstream::`scalar deleting destructor'
PUBLIC ??1iosockstream@dlib@@UAE@XZ ; dlib::iosockstream::~iosockstream
PUBLIC ??_Diosockstream@dlib@@QAEXXZ ; dlib::iosockstream::`vbase destructor'
PUBLIC ??_7iosockstream@dlib@@6B@ ; dlib::iosockstream::`vftable'
PUBLIC ??_8iosockstream@dlib@@7B?$basic_istream@DU?$char_traits@D@std@@@std@@@ ; dlib::iosockstream::`vbtable'
PUBLIC ??_8iosockstream@dlib@@7B?$basic_ostream@DU?$char_traits@D@std@@@std@@@ ; dlib::iosockstream::`vbtable'
EXTRN ??_Eiosockstream@dlib@@UAEPAXI@Z:PROC ; dlib::iosockstream::`vector deleting destructor'
; COMDAT ??_8iosockstream@dlib@@7B?$basic_ostream@DU?$char_traits@D@std@@@std@@@
CONST SEGMENT
??_8iosockstream@dlib@@7B?$basic_ostream@DU?$char_traits@D@std@@@std@@@ DD 00H ; dlib::iosockstream::`vbtable'
DD 018H
CONST ENDS
; COMDAT ??_8iosockstream@dlib@@7B?$basic_istream@DU?$char_traits@D@std@@@std@@@
CONST SEGMENT
??_8iosockstream@dlib@@7B?$basic_istream@DU?$char_traits@D@std@@@std@@@ DD 00H ; dlib::iosockstream::`vbtable'
DD 028H
CONST ENDS
; COMDAT ??_7iosockstream@dlib@@6B@
CONST SEGMENT
??_7iosockstream@dlib@@6B@ DD FLAT:??_R4iosockstream@dlib@@6B@ ; dlib::iosockstream::`vftable'
DD FLAT:??_Eiosockstream@dlib@@UAEPAXI@Z
CONST ENDS
; COMDAT ??_R4iosockstream@dlib@@6B@
rdata$r SEGMENT
??_R4iosockstream@dlib@@6B@ DD 00H ; dlib::iosockstream::`RTTI Complete Object Locator'
DD 028H
DD 00H
DD FLAT:??_R0?AViosockstream@dlib@@@8
DD FLAT:??_R3iosockstream@dlib@@8
rdata$r ENDS
; COMDAT ??_R3iosockstream@dlib@@8
rdata$r SEGMENT
??_R3iosockstream@dlib@@8 DD 00H ; dlib::iosockstream::`RTTI Class Hierarchy Descriptor'
DD 03H
DD 0aH
DD FLAT:??_R2iosockstream@dlib@@8
rdata$r ENDS
; COMDAT ??_R2iosockstream@dlib@@8
rdata$r SEGMENT
??_R2iosockstream@dlib@@8 DD FLAT:??_R1A@?0A@EA@iosockstream@dlib@@8 ; dlib::iosockstream::`RTTI Base Class Array'
DD FLAT:??_R1A@?0A@EA@?$basic_iostream@DU?$char_traits@D@std@@@std@@8
DD FLAT:??_R1A@?0A@EA@?$basic_istream@DU?$char_traits@D@std@@@std@@8
DD FLAT:??_R1A@A@3FA@?$basic_ios@DU?$char_traits@D@std@@@std@@8
DD FLAT:??_R1A@A@3EA@ios_base@std@@8
DD FLAT:??_R17A@3EA@?$_Iosb@H@std@@8
DD FLAT:??_R1BA@?0A@EA@?$basic_ostream@DU?$char_traits@D@std@@@std@@8
DD FLAT:??_R1A@A@3FA@?$basic_ios@DU?$char_traits@D@std@@@std@@8
DD FLAT:??_R1A@A@3EA@ios_base@std@@8
DD FLAT:??_R17A@3EA@?$_Iosb@H@std@@8
rdata$r ENDS
; COMDAT ??_R1A@?0A@EA@iosockstream@dlib@@8
rdata$r SEGMENT
??_R1A@?0A@EA@iosockstream@dlib@@8 DD FLAT:??_R0?AViosockstream@dlib@@@8 ; dlib::iosockstream::`RTTI Base Class Descriptor at (0,-1,0,64)'
DD 09H
DD 00H
DD 0ffffffffH
DD 00H
DD 040H
DD FLAT:??_R3iosockstream@dlib@@8
rdata$r ENDS
; COMDAT ??_R0?AViosockstream@dlib@@@8
_DATA SEGMENT
??_R0?AViosockstream@dlib@@@8 DD FLAT:??_7type_info@@6B@ ; dlib::iosockstream `RTTI Type Descriptor'
DD 00H
DB '.?AViosockstream@dlib@@', 00H
$SG-50591 DB 00H
ORG $+1
$SG-50586 DB 0dH, 0aH, 0dH, 0aH, 00H
ORG $+3
$SG-50587 DB ' HTTP/1.0', 0dH, 0aH, 'Host: ', 00H
ORG $+2
$SG-50588 DB '?ip=', 00H
ORG $+3
$SG-50589 DB 'GET ', 00H
ORG $+3
$SG-50590 DB 'c:->', 00H
ORG $+3
$SG-50636 DB '.', 0aH, 00H
ORG $+1
$SG-50637 DB 0aH, 0aH, 'Error detected at line ', 00H
ORG $+2
$SG-50638 DB '.', 0aH, 00H
ORG $+1
$SG-50639 DB 'e:\library\dlib\dlib\set/set_kernel_c.h', 00H
$SG-50640 DB 'Error detected in file ', 00H
$SG-50641 DB '.', 0aH, 0aH, 00H
$SG-50642 DB 'void __thiscall dlib::set_kernel_c<class dlib::set_kerne'
DB 'l_1<unsigned long,class dlib::binary_search_tree_kernel_2<uns'
DB 'igned long,char,class dlib::memory_manager_kernel_2<char,100>'
DB ',struct std::less<unsigned long> >,class dlib::memory_manager'
DB '_kernel_2<char,100> > >::remove_any(unsigned long &)', 00H
$SG-50643 DB 'Error detected in function ', 00H
$SG-50644 DB '.', 0aH, 00H
ORG $+1
$SG-50645 DB 'this->size() != 0', 00H
ORG $+2
$SG-50646 DB 'Failing expression was ', 00H
$SG-50647 DB 0aH, 00H
ORG $+2
$SG-50648 DB 0aH, 09H, 'this: ', 00H
ORG $+3
$SG-50649 DB 0aH, 09H, 'size must be greater than zero if an item is t'
DB 'o be removed', 00H
ORG $+3
$SG-50650 DB 09H, 'void set::remove_any', 00H
ORG $+2
$SG-50651 DB '.', 0aH, 00H
ORG $+1
$SG-50652 DB 0aH, 0aH, 'Error detected at line ', 00H
ORG $+2
$SG-50653 DB '.', 0aH, 00H
ORG $+1
$SG-50654 DB 'e:\library\dlib\dlib\set/set_kernel_c.h', 00H
$SG-50655 DB 'Error detected in file ', 00H
$SG-50656 DB '.', 0aH, 0aH, 00H
$SG-50657 DB 'const unsigned long &__thiscall dlib::set_kernel_c<class'
DB ' dlib::set_kernel_1<unsigned long,class dlib::binary_search_t'
DB 'ree_kernel_2<unsigned long,char,class dlib::memory_manager_ke'
DB 'rnel_2<char,100>,struct std::less<unsigned long> >,class dlib'
DB '::memory_manager_kernel_2<char,100> > >::element(void) const', 00H
$SG-50658 DB 'Error detected in function ', 00H
$SG-50659 DB '.', 0aH, 00H
ORG $+1
$SG-50660 DB 'this->current_element_valid() == true', 00H
ORG $+2
$SG-50661 DB 'Failing expression was ', 00H
$SG-50662 DB 0aH, 00H
ORG $+2
$SG-50663 DB 0aH, 09H, 'this: ', 00H
ORG $+3
$SG-50664 DB 0aH, 09H, 'you can''t access the current element if it do'
DB 'esn''t exist', 00H
ORG $+1
$SG-50665 DB 09H, 'const T& set::element() const', 00H
ORG $+1
$SG-50666 DB '.', 0aH, 00H
ORG $+1
$SG-50667 DB 0aH, 0aH, 'Error detected at line ', 00H
ORG $+2
$SG-50668 DB '.', 0aH, 00H
ORG $+1
$SG-50669 DB 'e:\library\dlib\dlib\set/set_kernel_c.h', 00H
$SG-50670 DB 'Error detected in file ', 00H
$SG-50671 DB '.', 0aH, 0aH, 00H
$SG-50672 DB 'const unsigned long &__thiscall dlib::set_kernel_c<class'
DB ' dlib::set_kernel_1<unsigned long,class dlib::binary_search_t'
DB 'ree_kernel_2<unsigned long,char,class dlib::memory_manager_ke'
DB 'rnel_2<char,100>,struct std::less<unsigned long> >,class dlib'
DB '::memory_manager_kernel_2<char,100> > >::element(void)', 00H
ORG $+2
$SG-50673 DB 'Error detected in function ', 00H
$SG-50674 DB '.', 0aH, 00H
ORG $+1
$SG-50675 DB 'this->current_element_valid() == true', 00H
ORG $+2
$SG-50676 DB 'Failing expression was ', 00H
$SG-50677 DB 0aH, 00H
ORG $+2
$SG-50678 DB 0aH, 09H, 'this: ', 00H
ORG $+3
$SG-50679 DB 0aH, 09H, 'you can''t access the current element if it do'
DB 'esn''t exist', 00H
ORG $+1
$SG-50680 DB 09H, 'const T& set::element', 00H
ORG $+1
$SG-50681 DB '.', 0aH, 00H
ORG $+1
$SG-50682 DB 0aH, 0aH, 'Error detected at line ', 00H
ORG $+2
$SG-50683 DB '.', 0aH, 00H
ORG $+1
$SG-50684 DB 'e:\library\dlib\dlib\binary_search_tree/binary_search_tr'
DB 'ee_kernel_c.h', 00H
ORG $+2
$SG-50685 DB 'Error detected in file ', 00H
$SG-50686 DB '.', 0aH, 0aH, 00H
$SG-50688 DB 'Error detected in function ', 00H
$SG-50687 DB 'void __thiscall dlib::binary_search_tree_kernel_c<class '
DB 'dlib::binary_search_tree_kernel_2<unsigned long,class dlib::m'
DB 'ember_function_pointer<void,void,void,void>,class dlib::memor'
DB 'y_manager_kernel_2<char,10>,struct std::less<unsigned long> >'
DB ' >::remove_any(unsigned long &,class dlib::member_function_po'
DB 'inter<void,void,void,void> &)', 00H
ORG $+2
$SG-50689 DB '.', 0aH, 00H
ORG $+1
$SG-50690 DB 'this->size() != 0 && (static_cast<const void*>(&d) != st'
DB 'atic_cast<void*>(&r))', 00H
ORG $+2
$SG-50691 DB 'Failing expression was ', 00H
$SG-50692 DB 0aH, 00H
ORG $+2
$SG-50693 DB 0aH, 09H, '&r: ', 00H
ORG $+3
$SG-50694 DB 0aH, 09H, '&d: ', 00H
ORG $+3
$SG-50695 DB 0aH, 09H, 'this: ', 00H
ORG $+3
$SG-50696 DB 0aH, 09H, 'tree must not be empty if something is going t'
DB 'o be removed', 00H
ORG $+3
$SG-50697 DB 09H, 'void binary_search_tree::remove_any', 00H
ORG $+3
$SG-50698 DB '.', 0aH, 00H
ORG $+1
$SG-50699 DB 0aH, 0aH, 'Error detected at line ', 00H
ORG $+2
$SG-50700 DB '.', 0aH, 00H
ORG $+1
$SG-50702 DB 'Error detected in file ', 00H
$SG-50703 DB '.', 0aH, 0aH, 00H
$SG-50701 DB 'e:\library\dlib\dlib\binary_search_tree/binary_search_tr'
DB 'ee_kernel_c.h', 00H
ORG $+2
$SG-50704 DB 'class dlib::map_pair<unsigned long,class dlib::member_fu'
DB 'nction_pointer<void,void,void,void> > &__thiscall dlib::binar'
DB 'y_search_tree_kernel_c<class dlib::binary_search_tree_kernel_'
DB '2<unsigned long,class dlib::member_function_pointer<void,void'
DB ',void,void>,class dlib::memory_manager_kernel_2<char,10>,stru'
DB 'ct std::less<unsigned long> > >::element(void)', 00H
ORG $+1
$SG-50705 DB 'Error detected in function ', 00H
$SG-50706 DB '.', 0aH, 00H
ORG $+1
$SG-50707 DB 'this->current_element_valid() == true', 00H
ORG $+2
$SG-50708 DB 'Failing expression was ', 00H
$SG-50709 DB 0aH, 00H
ORG $+2
$SG-50710 DB 0aH, 09H, 'this: ', 00H
ORG $+3
$SG-50711 DB 0aH, 09H, 'you can''t access the current element if it do'
DB 'esn''t exist', 00H
ORG $+1
$SG-50712 DB 09H, 'map_pair<domain,range>& binary_search_tree::element'
DB '()', 00H
ORG $+1
$SG-50713 DB '.', 0aH, 00H
ORG $+1
$SG-50714 DB 0aH, 0aH, 'Error detected at line ', 00H
ORG $+2
$SG-50715 DB '.', 0aH, 00H
ORG $+1
$SG-50717 DB 'Error detected in file ', 00H
$SG-50718 DB '.', 0aH, 0aH, 00H
$SG-50716 DB 'e:\library\dlib\dlib\binary_search_tree/binary_search_tr'
DB 'ee_kernel_c.h', 00H
ORG $+2
$SG-50719 DB 'const class dlib::map_pair<unsigned long,class dlib::mem'
DB 'ber_function_pointer<void,void,void,void> > &__thiscall dlib:'
DB ':binary_search_tree_kernel_c<class dlib::binary_search_tree_k'
DB 'ernel_2<unsigned long,class dlib::member_function_pointer<voi'
DB 'd,void,void,void>,class dlib::memory_manager_kernel_2<char,10'
DB '>,struct std::less<unsigned long> > >::element(void) const', 00H
ORG $+1
$SG-50720 DB 'Error detected in function ', 00H
$SG-50721 DB '.', 0aH, 00H
ORG $+1
$SG-50722 DB 'this->current_element_valid() == true', 00H
ORG $+2
$SG-50723 DB 'Failing expression was ', 00H
$SG-50724 DB 0aH, 00H
ORG $+2
$SG-50725 DB 0aH, 09H, 'this: ', 00H
ORG $+3
$SG-50726 DB 0aH, 09H, 'you can''t access the current element if it do'
DB 'esn''t exist', 00H
ORG $+1
$SG-50728 DB '.', 0aH, 00H
ORG $+1
$SG-50727 DB 09H, 'const map_pair<domain,range>& binary_search_tree::e'
DB 'lement() const', 00H
ORG $+1
$SG-50729 DB 0aH, 0aH, 'Error detected at line ', 00H
ORG $+2
$SG-50730 DB '.', 0aH, 00H
ORG $+1
$SG-50732 DB 'Error detected in file ', 00H
$SG-50733 DB '.', 0aH, 0aH, 00H
$SG-50731 DB 'e:\library\dlib\dlib\binary_search_tree/binary_search_tr'
DB 'ee_kernel_c.h', 00H
ORG $+2
$SG-50734 DB 'void __thiscall dlib::binary_search_tree_kernel_c<class '
DB 'dlib::binary_search_tree_kernel_2<unsigned __int64,struct dli'
DB 'b::timer_base *,class dlib::memory_manager_kernel_2<char,100>'
DB ',struct std::less<unsigned __int64> > >::remove_any(unsigned '
DB '__int64 &,struct dlib::timer_base *&)', 00H
ORG $+3
$SG-50735 DB 'Error detected in function ', 00H
$SG-50736 DB '.', 0aH, 00H
ORG $+1
$SG-50737 DB 'this->size() != 0 && (static_cast<const void*>(&d) != st'
DB 'atic_cast<void*>(&r))', 00H
ORG $+2
$SG-50738 DB 'Failing expression was ', 00H
$SG-50739 DB 0aH, 00H
ORG $+2
$SG-50740 DB 0aH, 09H, '&r: ', 00H
ORG $+3
$SG-50741 DB 0aH, 09H, '&d: ', 00H
ORG $+3
$SG-50742 DB 0aH, 09H, 'this: ', 00H
ORG $+3
$SG-50743 DB 0aH, 09H, 'tree must not be empty if something is going t'
DB 'o be removed', 00H
ORG $+3
$SG-50744 DB 09H, 'void binary_search_tree::remove_any', 00H
ORG $+3
$SG-50745 DB '.', 0aH, 00H
ORG $+1
$SG-50746 DB 0aH, 0aH, 'Error detected at line ', 00H
ORG $+2
$SG-50747 DB '.', 0aH, 00H
ORG $+1
$SG-50749 DB 'Error detected in file ', 00H
$SG-50750 DB '.', 0aH, 0aH, 00H
$SG-50748 DB 'e:\library\dlib\dlib\binary_search_tree/binary_search_tr'
DB 'ee_kernel_c.h', 00H
ORG $+2
$SG-50751 DB 'class dlib::map_pair<unsigned __int64,struct dlib::timer'
DB '_base *> &__thiscall dlib::binary_search_tree_kernel_c<class '
DB 'dlib::binary_search_tree_kernel_2<unsigned __int64,struct dli'
DB 'b::timer_base *,class dlib::memory_manager_kernel_2<char,100>'
DB ',struct std::less<unsigned __int64> > >::element(void)', 00H
ORG $+2
$SG-50752 DB 'Error detected in function ', 00H
$SG-50753 DB '.', 0aH, 00H
ORG $+1
$SG-50754 DB 'this->current_element_valid() == true', 00H
ORG $+2
$SG-50755 DB 'Failing expression was ', 00H
$SG-50756 DB 0aH, 00H
ORG $+2
$SG-50757 DB 0aH, 09H, 'this: ', 00H
ORG $+3
$SG-50758 DB 0aH, 09H, 'you can''t access the current element if it do'
DB 'esn''t exist', 00H
ORG $+1
$SG-50759 DB 09H, 'map_pair<domain,range>& binary_search_tree::element'
DB '()', 00H
ORG $+1
$SG-50760 DB '.', 0aH, 00H
ORG $+1
$SG-50761 DB 0aH, 0aH, 'Error detected at line ', 00H
ORG $+2
$SG-50762 DB '.', 0aH, 00H
ORG $+1
$SG-50763 DB 'e:\library\dlib\dlib\binary_search_tree/binary_search_tr'
DB 'ee_kernel_c.h', 00H
ORG $+2
$SG-50764 DB 'Error detected in file ', 00H
$SG-50765 DB '.', 0aH, 0aH, 00H
$SG-50767 DB 'Error detected in function ', 00H
$SG-50766 DB 'const class dlib::map_pair<unsigned __int64,struct dlib:'
DB ':timer_base *> &__thiscall dlib::binary_search_tree_kernel_c<'
DB 'class dlib::binary_search_tree_kernel_2<unsigned __int64,stru'
DB 'ct dlib::timer_base *,class dlib::memory_manager_kernel_2<cha'
DB 'r,100>,struct std::less<unsigned __int64> > >::element(void) '
DB 'const', 00H
ORG $+2
$SG-50768 DB '.', 0aH, 00H
ORG $+1
$SG-50769 DB 'this->current_element_valid() == true', 00H
ORG $+2
$SG-50770 DB 'Failing expression was ', 00H
$SG-50771 DB 0aH, 00H
ORG $+2
$SG-50772 DB 0aH, 09H, 'this: ', 00H
ORG $+3
$SG-50773 DB 0aH, 09H, 'you can''t access the current element if it do'
DB 'esn''t exist', 00H
$SG-50774 DB 09H, 'const map_pair<domain,range>& binary_search_tree::e'
DB 'lement() const', 00H
; Function compile flags: /Odtp
; COMDAT ??$_Move@AAPAUshared_ptr_thread_safe_node@dlib@@@std@@YA$$QAPAUshared_ptr_thread_safe_node@dlib@@AAPAU12@@Z
_TEXT SEGMENT
__Arg$ = 8 ; size = 4
??$_Move@AAPAUshared_ptr_thread_safe_node@dlib@@@std@@YA$$QAPAUshared_ptr_thread_safe_node@dlib@@AAPAU12@@Z PROC ; std::_Move<dlib::shared_ptr_thread_safe_node * &>, COMDAT
; File e:\program files (x86)\microsoft visual studio 10.0\vc\include\utility
; Line 94
push ebp
mov ebp, esp
; Line 95
mov eax, DWORD PTR __Arg$[ebp]
; Line 96
pop ebp
ret 0
??$_Move@AAPAUshared_ptr_thread_safe_node@dlib@@@std@@YA$$QAPAUshared_ptr_thread_safe_node@dlib@@AAPAU12@@Z ENDP ; std::_Move<dlib::shared_ptr_thread_safe_node * &>
; Function compile flags: /Odtp
_TEXT ENDS
; COMDAT ??$swap@PAUshared_ptr_thread_safe_node@dlib@@@std@@YAXAAPAUshared_ptr_thread_safe_node@dlib@@0@Z
_TEXT SEGMENT
__Tmp$ = -4 ; size = 4
__Left$ = 8 ; size = 4
__Right$ = 12 ; size = 4
??$swap@PAUshared_ptr_thread_safe_node@dlib@@@std@@YAXAAPAUshared_ptr_thread_safe_node@dlib@@0@Z PROC ; std::swap<dlib::shared_ptr_thread_safe_node *>, COMDAT
; Line 101
push ebp
mov ebp, esp
push ecx
; Line 102
mov eax, DWORD PTR __Left$[ebp]
push eax
call ??$_Move@AAPAUshared_ptr_thread_safe_node@dlib@@@std@@YA$$QAPAUshared_ptr_thread_safe_node@dlib@@AAPAU12@@Z ; std::_Move<dlib::shared_ptr_thread_safe_node * &>
add esp, 4
mov ecx, DWORD PTR [eax]
mov DWORD PTR __Tmp$[ebp], ecx
; Line 103
mov edx, DWORD PTR __Right$[ebp]
push edx
call ??$_Move@AAPAUshared_ptr_thread_safe_node@dlib@@@std@@YA$$QAPAUshared_ptr_thread_safe_node@dlib@@AAPAU12@@Z ; std::_Move<dlib::shared_ptr_thread_safe_node * &>
add esp, 4
mov ecx, DWORD PTR __Left$[ebp]
mov edx, DWORD PTR [eax]
mov DWORD PTR [ecx], edx
; Line 104
lea eax, DWORD PTR __Tmp$[ebp]
push eax
call ??$_Move@AAPAUshared_ptr_thread_safe_node@dlib@@@std@@YA$$QAPAUshared_ptr_thread_safe_node@dlib@@AAPAU12@@Z ; std::_Move<dlib::shared_ptr_thread_safe_node * &>
add esp, 4
mov ecx, DWORD PTR __Right$[ebp]
mov edx, DWORD PTR [eax]
mov DWORD PTR [ecx], edx
; Line 105
mov esp, ebp
pop ebp
ret 0
??$swap@PAUshared_ptr_thread_safe_node@dlib@@@std@@YAXAAPAUshared_ptr_thread_safe_node@dlib@@0@Z ENDP ; std::swap<dlib::shared_ptr_thread_safe_node *>
; Function compile flags: /Odtp
_TEXT ENDS
; COMDAT ??R?$default_deleter@Vsockstreambuf@dlib@@@dlib@@QBEXPAVsockstreambuf@1@@Z
_TEXT SEGMENT
tv74 = -16 ; size = 4
_this$ = -12 ; size = 4
$T351901 = -8 ; size = 4
$T351900 = -4 ; size = 4
_item$ = 8 ; size = 4
??R?$default_deleter@Vsockstreambuf@dlib@@@dlib@@QBEXPAVsockstreambuf@1@@Z PROC ; dlib::default_deleter<dlib::sockstreambuf>::operator(), COMDAT
; _this$ = ecx
; File e:\library\dlib\dlib\smart_pointers\scoped_ptr.h
; Line 20
push ebp
mov ebp, esp
sub esp, 16 ; 00000010H
mov DWORD PTR _this$[ebp], ecx
; Line 21
mov eax, DWORD PTR _item$[ebp]
mov DWORD PTR $T351901[ebp], eax
mov ecx, DWORD PTR $T351901[ebp]
mov DWORD PTR $T351900[ebp], ecx
cmp DWORD PTR $T351900[ebp], 0
je SHORT $LN3@operator
push 1
mov edx, DWORD PTR $T351900[ebp]
mov eax, DWORD PTR [edx]
mov ecx, DWORD PTR $T351900[ebp]
mov edx, DWORD PTR [eax]
call edx
mov DWORD PTR tv74[ebp], eax
jmp SHORT $LN1@operator
$LN3@operator:
mov DWORD PTR tv74[ebp], 0
$LN1@operator:
; Line 22
mov esp, ebp
pop ebp
ret 4
??R?$default_deleter@Vsockstreambuf@dlib@@@dlib@@QBEXPAVsockstreambuf@1@@Z ENDP ; dlib::default_deleter<dlib::sockstreambuf>::operator()
; Function compile flags: /Odtp
_TEXT ENDS
; COMDAT ??R?$default_deleter@Vtimeout@dlib@@@dlib@@QBEXPAVtimeout@1@@Z
_TEXT SEGMENT
tv70 = -16 ; size = 4
_this$ = -12 ; size = 4
$T351907 = -8 ; size = 4
$T351906 = -4 ; size = 4
_item$ = 8 ; size = 4
??R?$default_deleter@Vtimeout@dlib@@@dlib@@QBEXPAVtimeout@1@@Z PROC ; dlib::default_deleter<dlib::timeout>::operator(), COMDAT
; _this$ = ecx
; Line 20
push ebp
mov ebp, esp
sub esp, 16 ; 00000010H
mov DWORD PTR _this$[ebp], ecx
; Line 21
mov eax, DWORD PTR _item$[ebp]
mov DWORD PTR $T351907[ebp], eax
mov ecx, DWORD PTR $T351907[ebp]
mov DWORD PTR $T351906[ebp], ecx
cmp DWORD PTR $T351906[ebp], 0
je SHORT $LN3@operator@2
push 1
mov edx, DWORD PTR $T351906[ebp]
mov eax, DWORD PTR [edx]
mov ecx, DWORD PTR $T351906[ebp]
mov edx, DWORD PTR [eax]
call edx
mov DWORD PTR tv70[ebp], eax
jmp SHORT $LN1@operator@2
$LN3@operator@2:
mov DWORD PTR tv70[ebp], 0
$LN1@operator@2:
; Line 22
mov esp, ebp
pop ebp
ret 4
??R?$default_deleter@Vtimeout@dlib@@@dlib@@QBEXPAVtimeout@1@@Z ENDP ; dlib::default_deleter<dlib::timeout>::operator()
; Function compile flags: /Odtp
_TEXT ENDS
; COMDAT ??B?$scoped_ptr@Vsockstreambuf@dlib@@U?$default_deleter@Vsockstreambuf@dlib@@@2@@dlib@@QBE_NXZ
_TEXT SEGMENT
_this$ = -4 ; size = 4
??B?$scoped_ptr@Vsockstreambuf@dlib@@U?$default_deleter@Vsockstreambuf@dlib@@@2@@dlib@@QBE_NXZ PROC ; dlib::scoped_ptr<dlib::sockstreambuf,dlib::default_deleter<dlib::sockstreambuf> >::operator bool, COMDAT
; _this$ = ecx
; Line 105
push ebp
mov ebp, esp
push ecx
mov DWORD PTR _this$[ebp], ecx
; Line 106
mov eax, DWORD PTR _this$[ebp]
xor ecx, ecx
cmp DWORD PTR [eax], 0
setne cl
mov al, cl
; Line 107
mov esp, ebp
pop ebp
ret 0
??B?$scoped_ptr@Vsockstreambuf@dlib@@U?$default_deleter@Vsockstreambuf@dlib@@@2@@dlib@@QBE_NXZ ENDP ; dlib::scoped_ptr<dlib::sockstreambuf,dlib::default_deleter<dlib::sockstreambuf> >::operator bool
; Function compile flags: /Odtp
_TEXT ENDS
; COMDAT ?get@?$scoped_ptr@Vsockstreambuf@dlib@@U?$default_deleter@Vsockstreambuf@dlib@@@2@@dlib@@QBEPAVsockstreambuf@2@XZ
_TEXT SEGMENT
_this$ = -4 ; size = 4
?get@?$scoped_ptr@Vsockstreambuf@dlib@@U?$default_deleter@Vsockstreambuf@dlib@@@2@@dlib@@QBEPAVsockstreambuf@2@XZ PROC ; dlib::scoped_ptr<dlib::sockstreambuf,dlib::default_deleter<dlib::sockstreambuf> >::get, COMDAT
; _this$ = ecx
; Line 100
push ebp
mov ebp, esp
push ecx
mov DWORD PTR _this$[ebp], ecx
; Line 101
mov eax, DWORD PTR _this$[ebp]
mov eax, DWORD PTR [eax]
; Line 102
mov esp, ebp
pop ebp
ret 0
?get@?$scoped_ptr@Vsockstreambuf@dlib@@U?$default_deleter@Vsockstreambuf@dlib@@@2@@dlib@@QBEPAVsockstreambuf@2@XZ ENDP ; dlib::scoped_ptr<dlib::sockstreambuf,dlib::default_deleter<dlib::sockstreambuf> >::get
; Function compile flags: /Odtp
_TEXT ENDS
; COMDAT ??C?$scoped_ptr@Vsockstreambuf@dlib@@U?$default_deleter@Vsockstreambuf@dlib@@@2@@dlib@@QBEPAVsockstreambuf@1@XZ
_TEXT SEGMENT
_this$ = -4 ; size = 4
??C?$scoped_ptr@Vsockstreambuf@dlib@@U?$default_deleter@Vsockstreambuf@dlib@@@2@@dlib@@QBEPAVsockstreambuf@1@XZ PROC ; dlib::scoped_ptr<dlib::sockstreambuf,dlib::default_deleter<dlib::sockstreambuf> >::operator->, COMDAT
; _this$ = ecx
; Line 89
push ebp
mov ebp, esp
push ecx
mov DWORD PTR _this$[ebp], ecx
; Line 96
mov eax, DWORD PTR _this$[ebp]
mov eax, DWORD PTR [eax]
; Line 97
mov esp, ebp
pop ebp
ret 0
??C?$scoped_ptr@Vsockstreambuf@dlib@@U?$default_deleter@Vsockstreambuf@dlib@@@2@@dlib@@QBEPAVsockstreambuf@1@XZ ENDP ; dlib::scoped_ptr<dlib::sockstreambuf,dlib::default_deleter<dlib::sockstreambuf> >::operator->
; Function compile flags: /Odtp
_TEXT ENDS
; COMDAT ?reset@?$scoped_ptr@Vsockstreambuf@dlib@@U?$default_deleter@Vsockstreambuf@dlib@@@2@@dlib@@QAEXPAVsockstreambuf@2@@Z
_TEXT SEGMENT
_this$ = -8 ; size = 4
_del$153075 = -1 ; size = 1
_p$ = 8 ; size = 4
?reset@?$scoped_ptr@Vsockstreambuf@dlib@@U?$default_deleter@Vsockstreambuf@dlib@@@2@@dlib@@QAEXPAVsockstreambuf@2@@Z PROC ; dlib::scoped_ptr<dlib::sockstreambuf,dlib::default_deleter<dlib::sockstreambuf> >::reset, COMDAT
; _this$ = ecx
; Line 67
push ebp
mov ebp, esp
sub esp, 8
mov DWORD PTR _this$[ebp], ecx
; Line 68
mov eax, DWORD PTR _this$[ebp]
cmp DWORD PTR [eax], 0
je SHORT $LN1@reset
; Line 71
mov ecx, DWORD PTR _this$[ebp]
mov edx, DWORD PTR [ecx]
push edx
lea ecx, DWORD PTR _del$153075[ebp]
call ??R?$default_deleter@Vsockstreambuf@dlib@@@dlib@@QBEXPAVsockstreambuf@1@@Z ; dlib::default_deleter<dlib::sockstreambuf>::operator()
$LN1@reset:
; Line 74
mov eax, DWORD PTR _this$[ebp]
mov ecx, DWORD PTR _p$[ebp]
mov DWORD PTR [eax], ecx
; Line 75
mov esp, ebp
pop ebp
ret 4
?reset@?$scoped_ptr@Vsockstreambuf@dlib@@U?$default_deleter@Vsockstreambuf@dlib@@@2@@dlib@@QAEXPAVsockstreambuf@2@@Z ENDP ; dlib::scoped_ptr<dlib::sockstreambuf,dlib::default_deleter<dlib::sockstreambuf> >::reset
; Function compile flags: /Odtp
_TEXT ENDS
; COMDAT ?get@?$shared_ptr_thread_safe@Vconnection@dlib@@@dlib@@QBEPAVconnection@2@XZ
_TEXT SEGMENT
_this$ = -4 ; size = 4
?get@?$shared_ptr_thread_safe@Vconnection@dlib@@@dlib@@QBEPAVconnection@2@XZ PROC ; dlib::shared_ptr_thread_safe<dlib::connection>::get, COMDAT
; _this$ = ecx
; File e:\library\dlib\dlib\smart_pointers\shared_ptr_thread_safe.h
; Line 365
push ebp
mov ebp, esp
push ecx
mov DWORD PTR _this$[ebp], ecx
mov eax, DWORD PTR _this$[ebp]
mov eax, DWORD PTR [eax]
mov esp, ebp
pop ebp
ret 0
?get@?$shared_ptr_thread_safe@Vconnection@dlib@@@dlib@@QBEPAVconnection@2@XZ ENDP ; dlib::shared_ptr_thread_safe<dlib::connection>::get
; Function compile flags: /Odtp
_TEXT ENDS
; COMDAT ??C?$shared_ptr_thread_safe@Vconnection@dlib@@@dlib@@QBEPAVconnection@1@XZ
_TEXT SEGMENT
_this$ = -4 ; size = 4
??C?$shared_ptr_thread_safe@Vconnection@dlib@@@dlib@@QBEPAVconnection@1@XZ PROC ; dlib::shared_ptr_thread_safe<dlib::connection>::operator->, COMDAT
; _this$ = ecx
; Line 355
push ebp
mov ebp, esp
push ecx
mov DWORD PTR _this$[ebp], ecx
; Line 362
mov eax, DWORD PTR _this$[ebp]
mov eax, DWORD PTR [eax]
; Line 363
mov esp, ebp
pop ebp
ret 0
??C?$shared_ptr_thread_safe@Vconnection@dlib@@@dlib@@QBEPAVconnection@1@XZ ENDP ; dlib::shared_ptr_thread_safe<dlib::connection>::operator->
; Function compile flags: /Odtp
_TEXT ENDS
; COMDAT ??D?$shared_ptr_thread_safe@Vconnection@dlib@@@dlib@@QBEAAVconnection@1@XZ
_TEXT SEGMENT
_this$ = -4 ; size = 4
??D?$shared_ptr_thread_safe@Vconnection@dlib@@@dlib@@QBEAAVconnection@1@XZ PROC ; dlib::shared_ptr_thread_safe<dlib::connection>::operator*, COMDAT
; _this$ = ecx
; Line 343
push ebp
mov ebp, esp
push ecx
mov DWORD PTR _this$[ebp], ecx
; Line 350
mov eax, DWORD PTR _this$[ebp]
mov eax, DWORD PTR [eax]
; Line 351
mov esp, ebp
pop ebp
ret 0
??D?$shared_ptr_thread_safe@Vconnection@dlib@@@dlib@@QBEAAVconnection@1@XZ ENDP ; dlib::shared_ptr_thread_safe<dlib::connection>::operator*
; Function compile flags: /Odtp
_TEXT ENDS
; COMDAT ??0?$shared_ptr_thread_safe@Vconnection@dlib@@@dlib@@QAE@XZ
_TEXT SEGMENT
_this$ = -4 ; size = 4
??0?$shared_ptr_thread_safe@Vconnection@dlib@@@dlib@@QAE@XZ PROC ; dlib::shared_ptr_thread_safe<dlib::connection>::shared_ptr_thread_safe<dlib::connection>, COMDAT
; _this$ = ecx
; Line 95
push ebp
mov ebp, esp
push ecx
mov DWORD PTR _this$[ebp], ecx
mov eax, DWORD PTR _this$[ebp]
mov DWORD PTR [eax], 0
mov ecx, DWORD PTR _this$[ebp]
mov DWORD PTR [ecx+4], 0
mov eax, DWORD PTR _this$[ebp]
mov esp, ebp
pop ebp
ret 0
??0?$shared_ptr_thread_safe@Vconnection@dlib@@@dlib@@QAE@XZ ENDP ; dlib::shared_ptr_thread_safe<dlib::connection>::shared_ptr_thread_safe<dlib::connection>
; Function compile flags: /Odtp
_TEXT ENDS
; COMDAT ?flush_output_on_read@sockstreambuf@dlib@@QAEXXZ
_TEXT SEGMENT
_this$ = -4 ; size = 4
?flush_output_on_read@sockstreambuf@dlib@@QAEXXZ PROC ; dlib::sockstreambuf::flush_output_on_read, COMDAT
; _this$ = ecx
; File e:\library\dlib\dlib\sockstreambuf\sockstreambuf.h
; Line 72
push ebp
mov ebp, esp
push ecx
mov DWORD PTR _this$[ebp], ecx
; Line 73
mov eax, DWORD PTR _this$[ebp]
mov BYTE PTR [eax+72], 1
; Line 74
mov esp, ebp
pop ebp
ret 0
?flush_output_on_read@sockstreambuf@dlib@@QAEXXZ ENDP ; dlib::sockstreambuf::flush_output_on_read
; Function compile flags: /Odtp
; COMDAT ?swap@?$shared_ptr_thread_safe@Vconnection@dlib@@@dlib@@QAEXAAV12@@Z
_TEXT SEGMENT
_this$ = -4 ; size = 4
_b$ = 8 ; size = 4
?swap@?$shared_ptr_thread_safe@Vconnection@dlib@@@dlib@@QAEXAAV12@@Z PROC ; dlib::shared_ptr_thread_safe<dlib::connection>::swap, COMDAT
; _this$ = ecx
; File e:\library\dlib\dlib\smart_pointers\shared_ptr_thread_safe.h
; Line 389
push ebp
mov ebp, esp
push ecx
mov DWORD PTR _this$[ebp], ecx
; Line 390
mov eax, DWORD PTR _b$[ebp]
push eax
mov ecx, DWORD PTR _this$[ebp]
push ecx
call ??$swap@PAVconnection@dlib@@@std@@YAXAAPAVconnection@dlib@@0@Z ; std::swap<dlib::connection *>
add esp, 8
; Line 391
mov edx, DWORD PTR _b$[ebp]
add edx, 4
push edx
mov eax, DWORD PTR _this$[ebp]
add eax, 4
push eax
call ??$swap@PAUshared_ptr_thread_safe_node@dlib@@@std@@YAXAAPAUshared_ptr_thread_safe_node@dlib@@0@Z ; std::swap<dlib::shared_ptr_thread_safe_node *>
add esp, 8
; Line 392
mov esp, ebp
pop ebp
ret 4
?swap@?$shared_ptr_thread_safe@Vconnection@dlib@@@dlib@@QAEXAAV12@@Z ENDP ; dlib::shared_ptr_thread_safe<dlib::connection>::swap
_TEXT ENDS
; COMDAT xdata$x
; File e:\library\dlib\dlib\smart_pointers\scoped_ptr.h
xdata$x SEGMENT
__unwindtable$??1?$scoped_ptr@Vsockstreambuf@dlib@@U?$default_deleter@Vsockstreambuf@dlib@@@2@@dlib@@QAE@XZ DD 0ffffffffH
DD FLAT:__unwindfunclet$??1?$scoped_ptr@Vsockstreambuf@dlib@@U?$default_deleter@Vsockstreambuf@dlib@@@2@@dlib@@QAE@XZ$0
__ehfuncinfo$??1?$scoped_ptr@Vsockstreambuf@dlib@@U?$default_deleter@Vsockstreambuf@dlib@@@2@@dlib@@QAE@XZ DD 019930522H
DD 01H
DD FLAT:__unwindtable$??1?$scoped_ptr@Vsockstreambuf@dlib@@U?$default_deleter@Vsockstreambuf@dlib@@@2@@dlib@@QAE@XZ
DD 2 DUP(00H)
DD 2 DUP(00H)
DD 00H
DD 01H
; Function compile flags: /Odtp
xdata$x ENDS
; COMDAT ??1?$scoped_ptr@Vsockstreambuf@dlib@@U?$default_deleter@Vsockstreambuf@dlib@@@2@@dlib@@QAE@XZ
_TEXT SEGMENT
_this$ = -20 ; size = 4
_del$153071 = -13 ; size = 1
__$EHRec$ = -12 ; size = 12
??1?$scoped_ptr@Vsockstreambuf@dlib@@U?$default_deleter@Vsockstreambuf@dlib@@@2@@dlib@@QAE@XZ PROC ; dlib::scoped_ptr<dlib::sockstreambuf,dlib::default_deleter<dlib::sockstreambuf> >::~scoped_ptr<dlib::sockstreambuf,dlib::default_deleter<dlib::sockstreambuf> >, COMDAT
; _this$ = ecx
; Line 56
push ebp
mov ebp, esp
push -1
push __ehhandler$??1?$scoped_ptr@Vsockstreambuf@dlib@@U?$default_deleter@Vsockstreambuf@dlib@@@2@@dlib@@QAE@XZ
mov eax, DWORD PTR fs:0
push eax
sub esp, 8
mov eax, DWORD PTR ___security_cookie
xor eax, ebp
push eax
lea eax, DWORD PTR __$EHRec$[ebp]
mov DWORD PTR fs:0, eax
mov DWORD PTR _this$[ebp], ecx
mov DWORD PTR __$EHRec$[ebp+8], 0
; Line 57
mov eax, DWORD PTR _this$[ebp]
cmp DWORD PTR [eax], 0
je SHORT $LN2@scoped_ptr
; Line 60
mov ecx, DWORD PTR _this$[ebp]
mov edx, DWORD PTR [ecx]
push edx
lea ecx, DWORD PTR _del$153071[ebp]
call ??R?$default_deleter@Vsockstreambuf@dlib@@@dlib@@QBEXPAVsockstreambuf@1@@Z ; dlib::default_deleter<dlib::sockstreambuf>::operator()
$LN2@scoped_ptr:
; Line 62
mov DWORD PTR __$EHRec$[ebp+8], -1
mov ecx, DWORD PTR _this$[ebp]
call ??1noncopyable@noncopyable_@boost@@IAE@XZ ; boost::noncopyable_::noncopyable::~noncopyable
mov ecx, DWORD PTR __$EHRec$[ebp]
mov DWORD PTR fs:0, ecx
pop ecx
mov esp, ebp
pop ebp
ret 0
_TEXT ENDS
; COMDAT text$x
text$x SEGMENT
__unwindfunclet$??1?$scoped_ptr@Vsockstreambuf@dlib@@U?$default_deleter@Vsockstreambuf@dlib@@@2@@dlib@@QAE@XZ$0:
mov ecx, DWORD PTR _this$[ebp]
jmp ??1noncopyable@noncopyable_@boost@@IAE@XZ ; boost::noncopyable_::noncopyable::~noncopyable
__ehhandler$??1?$scoped_ptr@Vsockstreambuf@dlib@@U?$default_deleter@Vsockstreambuf@dlib@@@2@@dlib@@QAE@XZ:
mov edx, DWORD PTR [esp+8]
lea eax, DWORD PTR [edx+12]
mov ecx, DWORD PTR [edx-12]
xor ecx, eax
call @__security_check_cookie@4
mov eax, OFFSET __ehfuncinfo$??1?$scoped_ptr@Vsockstreambuf@dlib@@U?$default_deleter@Vsockstreambuf@dlib@@@2@@dlib@@QAE@XZ
jmp ___CxxFrameHandler3
text$x ENDS
??1?$scoped_ptr@Vsockstreambuf@dlib@@U?$default_deleter@Vsockstreambuf@dlib@@@2@@dlib@@QAE@XZ ENDP ; dlib::scoped_ptr<dlib::sockstreambuf,dlib::default_deleter<dlib::sockstreambuf> >::~scoped_ptr<dlib::sockstreambuf,dlib::default_deleter<dlib::sockstreambuf> >
; Function compile flags: /Odtp
; COMDAT ??0?$scoped_ptr@Vsockstreambuf@dlib@@U?$default_deleter@Vsockstreambuf@dlib@@@2@@dlib@@QAE@PAVsockstreambuf@1@@Z
_TEXT SEGMENT
_this$ = -4 ; size = 4
_p$ = 8 ; size = 4
??0?$scoped_ptr@Vsockstreambuf@dlib@@U?$default_deleter@Vsockstreambuf@dlib@@@2@@dlib@@QAE@PAVsockstreambuf@1@@Z PROC ; dlib::scoped_ptr<dlib::sockstreambuf,dlib::default_deleter<dlib::sockstreambuf> >::scoped_ptr<dlib::sockstreambuf,dlib::default_deleter<dlib::sockstreambuf> >, COMDAT
; _this$ = ecx
; Line 51
push ebp
mov ebp, esp
push ecx
mov DWORD PTR _this$[ebp], ecx
mov ecx, DWORD PTR _this$[ebp]
call ??0noncopyable@noncopyable_@boost@@IAE@XZ ; boost::noncopyable_::noncopyable::noncopyable
mov eax, DWORD PTR _this$[ebp]
mov ecx, DWORD PTR _p$[ebp]
mov DWORD PTR [eax], ecx
mov eax, DWORD PTR _this$[ebp]
mov esp, ebp
pop ebp
ret 4
??0?$scoped_ptr@Vsockstreambuf@dlib@@U?$default_deleter@Vsockstreambuf@dlib@@@2@@dlib@@QAE@PAVsockstreambuf@1@@Z ENDP ; dlib::scoped_ptr<dlib::sockstreambuf,dlib::default_deleter<dlib::sockstreambuf> >::scoped_ptr<dlib::sockstreambuf,dlib::default_deleter<dlib::sockstreambuf> >
_TEXT ENDS
; COMDAT xdata$x
xdata$x SEGMENT
__unwindtable$??1?$scoped_ptr@Vtimeout@dlib@@U?$default_deleter@Vtimeout@dlib@@@2@@dlib@@QAE@XZ DD 0ffffffffH
DD FLAT:__unwindfunclet$??1?$scoped_ptr@Vtimeout@dlib@@U?$default_deleter@Vtimeout@dlib@@@2@@dlib@@QAE@XZ$0
__ehfuncinfo$??1?$scoped_ptr@Vtimeout@dlib@@U?$default_deleter@Vtimeout@dlib@@@2@@dlib@@QAE@XZ DD 019930522H
DD 01H
DD FLAT:__unwindtable$??1?$scoped_ptr@Vtimeout@dlib@@U?$default_deleter@Vtimeout@dlib@@@2@@dlib@@QAE@XZ
DD 2 DUP(00H)
DD 2 DUP(00H)
DD 00H
DD 01H
; Function compile flags: /Odtp
xdata$x ENDS
; COMDAT ??1?$scoped_ptr@Vtimeout@dlib@@U?$default_deleter@Vtimeout@dlib@@@2@@dlib@@QAE@XZ
_TEXT SEGMENT
_this$ = -20 ; size = 4
_del$153022 = -13 ; size = 1
__$EHRec$ = -12 ; size = 12
??1?$scoped_ptr@Vtimeout@dlib@@U?$default_deleter@Vtimeout@dlib@@@2@@dlib@@QAE@XZ PROC ; dlib::scoped_ptr<dlib::timeout,dlib::default_deleter<dlib::timeout> >::~scoped_ptr<dlib::timeout,dlib::default_deleter<dlib::timeout> >, COMDAT
; _this$ = ecx
; Line 56
push ebp
mov ebp, esp
push -1
push __ehhandler$??1?$scoped_ptr@Vtimeout@dlib@@U?$default_deleter@Vtimeout@dlib@@@2@@dlib@@QAE@XZ
mov eax, DWORD PTR fs:0
push eax
sub esp, 8
mov eax, DWORD PTR ___security_cookie
xor eax, ebp
push eax
lea eax, DWORD PTR __$EHRec$[ebp]
mov DWORD PTR fs:0, eax
mov DWORD PTR _this$[ebp], ecx
mov DWORD PTR __$EHRec$[ebp+8], 0
; Line 57
mov eax, DWORD PTR _this$[ebp]
cmp DWORD PTR [eax], 0
je SHORT $LN2@scoped_ptr@2
; Line 60
mov ecx, DWORD PTR _this$[ebp]
mov edx, DWORD PTR [ecx]
push edx
lea ecx, DWORD PTR _del$153022[ebp]
call ??R?$default_deleter@Vtimeout@dlib@@@dlib@@QBEXPAVtimeout@1@@Z ; dlib::default_deleter<dlib::timeout>::operator()
$LN2@scoped_ptr@2:
; Line 62
mov DWORD PTR __$EHRec$[ebp+8], -1
mov ecx, DWORD PTR _this$[ebp]
call ??1noncopyable@noncopyable_@boost@@IAE@XZ ; boost::noncopyable_::noncopyable::~noncopyable
mov ecx, DWORD PTR __$EHRec$[ebp]
mov DWORD PTR fs:0, ecx
pop ecx
mov esp, ebp
pop ebp
ret 0
_TEXT ENDS
; COMDAT text$x
text$x SEGMENT
__unwindfunclet$??1?$scoped_ptr@Vtimeout@dlib@@U?$default_deleter@Vtimeout@dlib@@@2@@dlib@@QAE@XZ$0:
mov ecx, DWORD PTR _this$[ebp]
jmp ??1noncopyable@noncopyable_@boost@@IAE@XZ ; boost::noncopyable_::noncopyable::~noncopyable
__ehhandler$??1?$scoped_ptr@Vtimeout@dlib@@U?$default_deleter@Vtimeout@dlib@@@2@@dlib@@QAE@XZ:
mov edx, DWORD PTR [esp+8]
lea eax, DWORD PTR [edx+12]
mov ecx, DWORD PTR [edx-12]
xor ecx, eax
call @__security_check_cookie@4
mov eax, OFFSET __ehfuncinfo$??1?$scoped_ptr@Vtimeout@dlib@@U?$default_deleter@Vtimeout@dlib@@@2@@dlib@@QAE@XZ
jmp ___CxxFrameHandler3
text$x ENDS
??1?$scoped_ptr@Vtimeout@dlib@@U?$default_deleter@Vtimeout@dlib@@@2@@dlib@@QAE@XZ ENDP ; dlib::scoped_ptr<dlib::timeout,dlib::default_deleter<dlib::timeout> >::~scoped_ptr<dlib::timeout,dlib::default_deleter<dlib::timeout> >
; Function compile flags: /Odtp
; COMDAT ??0?$scoped_ptr@Vtimeout@dlib@@U?$default_deleter@Vtimeout@dlib@@@2@@dlib@@QAE@PAVtimeout@1@@Z
_TEXT SEGMENT
_this$ = -4 ; size = 4
_p$ = 8 ; size = 4
??0?$scoped_ptr@Vtimeout@dlib@@U?$default_deleter@Vtimeout@dlib@@@2@@dlib@@QAE@PAVtimeout@1@@Z PROC ; dlib::scoped_ptr<dlib::timeout,dlib::default_deleter<dlib::timeout> >::scoped_ptr<dlib::timeout,dlib::default_deleter<dlib::timeout> >, COMDAT
; _this$ = ecx
; Line 51
push ebp
mov ebp, esp
push ecx
mov DWORD PTR _this$[ebp], ecx
mov ecx, DWORD PTR _this$[ebp]
call ??0noncopyable@noncopyable_@boost@@IAE@XZ ; boost::noncopyable_::noncopyable::noncopyable
mov eax, DWORD PTR _this$[ebp]
mov ecx, DWORD PTR _p$[ebp]
mov DWORD PTR [eax], ecx
mov eax, DWORD PTR _this$[ebp]
mov esp, ebp
pop ebp
ret 4
??0?$scoped_ptr@Vtimeout@dlib@@U?$default_deleter@Vtimeout@dlib@@@2@@dlib@@QAE@PAVtimeout@1@@Z ENDP ; dlib::scoped_ptr<dlib::timeout,dlib::default_deleter<dlib::timeout> >::scoped_ptr<dlib::timeout,dlib::default_deleter<dlib::timeout> >
_TEXT ENDS
; COMDAT xdata$x
; File e:\library\dlib\dlib\sockstreambuf\sockstreambuf.h
xdata$x SEGMENT
__unwindtable$??0sockstreambuf@dlib@@QAE@PAVconnection@1@@Z DD 0ffffffffH
DD FLAT:__unwindfunclet$??0sockstreambuf@dlib@@QAE@PAVconnection@1@@Z$0
__ehfuncinfo$??0sockstreambuf@dlib@@QAE@PAVconnection@1@@Z DD 019930522H
DD 01H
DD FLAT:__unwindtable$??0sockstreambuf@dlib@@QAE@PAVconnection@1@@Z
DD 2 DUP(00H)
DD 2 DUP(00H)
DD 00H
DD 01H
; Function compile flags: /Odtp
xdata$x ENDS
; COMDAT ??0sockstreambuf@dlib@@QAE@PAVconnection@1@@Z
_TEXT SEGMENT
_this$ = -16 ; size = 4
__$EHRec$ = -12 ; size = 12
_con_$ = 8 ; size = 4
??0sockstreambuf@dlib@@QAE@PAVconnection@1@@Z PROC ; dlib::sockstreambuf::sockstreambuf, COMDAT
; _this$ = ecx
; Line 45
push ebp
mov ebp, esp
push -1
push __ehhandler$??0sockstreambuf@dlib@@QAE@PAVconnection@1@@Z
mov eax, DWORD PTR fs:0
push eax
push ecx
mov eax, DWORD PTR ___security_cookie
xor eax, ebp
push eax
lea eax, DWORD PTR __$EHRec$[ebp]
mov DWORD PTR fs:0, eax
mov DWORD PTR _this$[ebp], ecx
mov ecx, DWORD PTR _this$[ebp]
call DWORD PTR __imp_??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAE@XZ
mov DWORD PTR __$EHRec$[ebp+8], 0
mov eax, DWORD PTR _this$[ebp]
mov DWORD PTR [eax], OFFSET ??_7sockstreambuf@dlib@@6B@
mov ecx, DWORD PTR _this$[ebp]
mov edx, DWORD PTR _con_$[ebp]
mov DWORD PTR [ecx+60], edx
mov eax, DWORD PTR _this$[ebp]
mov DWORD PTR [eax+64], 0
mov ecx, DWORD PTR _this$[ebp]
mov DWORD PTR [ecx+68], 0
mov edx, DWORD PTR _this$[ebp]
mov BYTE PTR [edx+72], 0
; Line 46
mov ecx, DWORD PTR _this$[ebp]
call ?init@sockstreambuf@dlib@@IAEXXZ ; dlib::sockstreambuf::init
; Line 47
mov DWORD PTR __$EHRec$[ebp+8], -1
mov eax, DWORD PTR _this$[ebp]
mov ecx, DWORD PTR __$EHRec$[ebp]
mov DWORD PTR fs:0, ecx
pop ecx
mov esp, ebp
pop ebp
ret 4
_TEXT ENDS
; COMDAT text$x
text$x SEGMENT
__unwindfunclet$??0sockstreambuf@dlib@@QAE@PAVconnection@1@@Z$0:
mov ecx, DWORD PTR _this$[ebp]
jmp DWORD PTR __imp_??1?$basic_streambuf@DU?$char_traits@D@std@@@std@@UAE@XZ
__ehhandler$??0sockstreambuf@dlib@@QAE@PAVconnection@1@@Z:
mov edx, DWORD PTR [esp+8]
lea eax, DWORD PTR [edx+12]
mov ecx, DWORD PTR [edx-8]
xor ecx, eax
call @__security_check_cookie@4
mov eax, OFFSET __ehfuncinfo$??0sockstreambuf@dlib@@QAE@PAVconnection@1@@Z
jmp ___CxxFrameHandler3
text$x ENDS
??0sockstreambuf@dlib@@QAE@PAVconnection@1@@Z ENDP ; dlib::sockstreambuf::sockstreambuf
; COMDAT xdata$x
; File e:\library\dlib\dlib\smart_pointers\shared_ptr_thread_safe.h
xdata$x SEGMENT
__unwindtable$??$?0Vconnection@dlib@@@?$shared_ptr_thread_safe@Vconnection@dlib@@@dlib@@QAE@PAVconnection@1@@Z DD 0ffffffffH
DD 00H
DD 0ffffffffH
DD 00H
__catchsym$??$?0Vconnection@dlib@@@?$shared_ptr_thread_safe@Vconnection@dlib@@@dlib@@QAE@PAVconnection@1@@Z$3 DD 040H
DD 00H
DD 00H
DD FLAT:__catch$??$?0Vconnection@dlib@@@?$shared_ptr_thread_safe@Vconnection@dlib@@@dlib@@QAE@PAVconnection@1@@Z$0
__tryblocktable$??$?0Vconnection@dlib@@@?$shared_ptr_thread_safe@Vconnection@dlib@@@dlib@@QAE@PAVconnection@1@@Z DD 00H
DD 00H
DD 01H
DD 01H
DD FLAT:__catchsym$??$?0Vconnection@dlib@@@?$shared_ptr_thread_safe@Vconnection@dlib@@@dlib@@QAE@PAVconnection@1@@Z$3
__ehfuncinfo$??$?0Vconnection@dlib@@@?$shared_ptr_thread_safe@Vconnection@dlib@@@dlib@@QAE@PAVconnection@1@@Z DD 019930522H
DD 02H
DD FLAT:__unwindtable$??$?0Vconnection@dlib@@@?$shared_ptr_thread_safe@Vconnection@dlib@@@dlib@@QAE@PAVconnection@1@@Z
DD 01H
DD FLAT:__tryblocktable$??$?0Vconnection@dlib@@@?$shared_ptr_thread_safe@Vconnection@dlib@@@dlib@@QAE@PAVconnection@1@@Z
DD 2 DUP(00H)
DD 00H
DD 01H
; Function compile flags: /Odtp
xdata$x ENDS
; COMDAT ??$?0Vconnection@dlib@@@?$shared_ptr_thread_safe@Vconnection@dlib@@@dlib@@QAE@PAVconnection@1@@Z
_TEXT SEGMENT
tv76 = -48 ; size = 4
tv72 = -44 ; size = 4
tv81 = -40 ; size = 4
_this$ = -36 ; size = 4
$T361256 = -32 ; size = 4
$T361255 = -28 ; size = 4
$T361252 = -24 ; size = 4
$T361251 = -20 ; size = 4
__$EHRec$ = -16 ; size = 16
_p$ = 8 ; size = 4
??$?0Vconnection@dlib@@@?$shared_ptr_thread_safe@Vconnection@dlib@@@dlib@@QAE@PAVconnection@1@@Z PROC ; dlib::shared_ptr_thread_safe<dlib::connection>::shared_ptr_thread_safe<dlib::connection><dlib::connection>, COMDAT
; _this$ = ecx
; Line 101
push ebp
mov ebp, esp
push -1
push __ehhandler$??$?0Vconnection@dlib@@@?$shared_ptr_thread_safe@Vconnection@dlib@@@dlib@@QAE@PAVconnection@1@@Z
mov eax, DWORD PTR fs:0
push eax
push ecx
sub esp, 32 ; 00000020H
push ebx
push esi
push edi
mov eax, DWORD PTR ___security_cookie
xor eax, ebp
push eax
lea eax, DWORD PTR __$EHRec$[ebp+4]
mov DWORD PTR fs:0, eax
mov DWORD PTR __$EHRec$[ebp], esp
mov DWORD PTR _this$[ebp], ecx
mov eax, DWORD PTR _this$[ebp]
mov ecx, DWORD PTR _p$[ebp]
mov DWORD PTR [eax], ecx
; Line 108
mov DWORD PTR __$EHRec$[ebp+12], 0
; Line 109
push 32 ; 00000020H
call DWORD PTR __imp_??2@YAPAXI@Z
add esp, 4
mov DWORD PTR tv81[ebp], eax
mov edx, DWORD PTR tv81[ebp]
mov DWORD PTR $T361252[ebp], edx
cmp DWORD PTR $T361252[ebp], 0
je SHORT $LN4@connection@3
mov ecx, DWORD PTR $T361252[ebp]
call ??0shared_ptr_thread_safe_node@dlib@@QAE@XZ ; dlib::shared_ptr_thread_safe_node::shared_ptr_thread_safe_node
mov DWORD PTR tv72[ebp], eax
jmp SHORT $LN5@connection@3
$LN4@connection@3:
mov DWORD PTR tv72[ebp], 0
$LN5@connection@3:
mov eax, DWORD PTR tv72[ebp]
mov DWORD PTR $T361251[ebp], eax
mov ecx, DWORD PTR _this$[ebp]
mov edx, DWORD PTR $T361251[ebp]
mov DWORD PTR [ecx+4], edx
; Line 110
jmp SHORT $LN8@connection@3
__catch$??$?0Vconnection@dlib@@@?$shared_ptr_thread_safe@Vconnection@dlib@@@dlib@@QAE@PAVconnection@1@@Z$0:
; Line 113
mov eax, DWORD PTR _p$[ebp]
mov DWORD PTR $T361256[ebp], eax
mov ecx, DWORD PTR $T361256[ebp]
mov DWORD PTR $T361255[ebp], ecx
cmp DWORD PTR $T361255[ebp], 0
je SHORT $LN6@connection@3
push 1
mov ecx, DWORD PTR $T361255[ebp]
call ??_Gconnection@dlib@@QAEPAXI@Z
mov DWORD PTR tv76[ebp], eax
jmp SHORT $LN7@connection@3
$LN6@connection@3:
mov DWORD PTR tv76[ebp], 0
$LN7@connection@3:
; Line 114
push 0
push 0
call __CxxThrowException@8
; Line 115
mov DWORD PTR __$EHRec$[ebp+12], -1
mov eax, $LN2@connection@3
ret 0
$LN8@connection@3:
mov DWORD PTR __$EHRec$[ebp+12], -1
$LN2@connection@3:
; Line 116
mov eax, DWORD PTR _this$[ebp]
$LN3@connection@3:
mov ecx, DWORD PTR __$EHRec$[ebp+4]
mov DWORD PTR fs:0, ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
_TEXT ENDS
; COMDAT text$x
text$x SEGMENT
__ehhandler$??$?0Vconnection@dlib@@@?$shared_ptr_thread_safe@Vconnection@dlib@@@dlib@@QAE@PAVconnection@1@@Z:
mov edx, DWORD PTR [esp+8]
lea eax, DWORD PTR [edx+12]
mov ecx, DWORD PTR [edx-52]
xor ecx, eax
call @__security_check_cookie@4
mov eax, OFFSET __ehfuncinfo$??$?0Vconnection@dlib@@@?$shared_ptr_thread_safe@Vconnection@dlib@@@dlib@@QAE@PAVconnection@1@@Z
jmp ___CxxFrameHandler3
text$x ENDS
??$?0Vconnection@dlib@@@?$shared_ptr_thread_safe@Vconnection@dlib@@@dlib@@QAE@PAVconnection@1@@Z ENDP ; dlib::shared_ptr_thread_safe<dlib::connection>::shared_ptr_thread_safe<dlib::connection><dlib::connection>
; Function compile flags: /Odtp
; COMDAT ??1?$shared_ptr_thread_safe@Vconnection@dlib@@@dlib@@QAE@XZ
_TEXT SEGMENT
tv139 = -40 ; size = 4
tv133 = -36 ; size = 4
tv94 = -32 ; size = 4
_this$ = -28 ; size = 4
$T361284 = -24 ; size = 4
$T361283 = -20 ; size = 4
$T361280 = -16 ; size = 4
$T361279 = -12 ; size = 4
$T361276 = -8 ; size = 4
$T361275 = -4 ; size = 4
??1?$shared_ptr_thread_safe@Vconnection@dlib@@@dlib@@QAE@XZ PROC ; dlib::shared_ptr_thread_safe<dlib::connection>::~shared_ptr_thread_safe<dlib::connection>, COMDAT
; _this$ = ecx
; Line 145
push ebp
mov ebp, esp
sub esp, 40 ; 00000028H
mov DWORD PTR _this$[ebp], ecx
; Line 146
mov eax, DWORD PTR _this$[ebp]
cmp DWORD PTR [eax+4], 0
je $LN6@shared_ptr@6
; Line 148
mov ecx, DWORD PTR _this$[ebp]
mov ecx, DWORD PTR [ecx+4]
call ?lock@mutex@dlib@@QBEXXZ ; dlib::mutex::lock
; Line 149
mov edx, DWORD PTR _this$[ebp]
mov eax, DWORD PTR [edx+4]
cmp DWORD PTR [eax+24], 1
jne $LN4@shared_ptr@6
; Line 152
mov ecx, DWORD PTR _this$[ebp]
mov edx, DWORD PTR [ecx+4]
cmp DWORD PTR [edx+28], 0
je SHORT $LN3@shared_ptr@6
; Line 154
mov eax, DWORD PTR _this$[ebp]
mov ecx, DWORD PTR [eax]
push ecx
mov edx, DWORD PTR _this$[ebp]
mov eax, DWORD PTR [edx+4]
mov ecx, DWORD PTR [eax+28]
mov edx, DWORD PTR _this$[ebp]
mov eax, DWORD PTR [edx+4]
mov edx, DWORD PTR [eax+28]
mov eax, DWORD PTR [ecx]
mov ecx, edx
mov edx, DWORD PTR [eax]
call edx
; Line 156
mov eax, DWORD PTR _this$[ebp]
mov ecx, DWORD PTR [eax+4]
call ?unlock@mutex@dlib@@QBEXXZ ; dlib::mutex::unlock
; Line 157
mov ecx, DWORD PTR _this$[ebp]
mov edx, DWORD PTR [ecx+4]
mov eax, DWORD PTR [edx+28]
mov DWORD PTR $T361276[ebp], eax
mov ecx, DWORD PTR $T361276[ebp]
mov DWORD PTR $T361275[ebp], ecx
cmp DWORD PTR $T361275[ebp], 0
je SHORT $LN8@shared_ptr@6
push 1
mov edx, DWORD PTR $T361275[ebp]
mov eax, DWORD PTR [edx]
mov ecx, DWORD PTR $T361275[ebp]
mov edx, DWORD PTR [eax+4]
call edx
mov DWORD PTR tv94[ebp], eax
jmp SHORT $LN9@shared_ptr@6
$LN8@shared_ptr@6:
mov DWORD PTR tv94[ebp], 0
$LN9@shared_ptr@6:
; Line 159
jmp SHORT $LN2@shared_ptr@6
$LN3@shared_ptr@6:
; Line 161
mov eax, DWORD PTR _this$[ebp]
mov ecx, DWORD PTR [eax+4]
call ?unlock@mutex@dlib@@QBEXXZ ; dlib::mutex::unlock
; Line 162
mov ecx, DWORD PTR _this$[ebp]
mov edx, DWORD PTR [ecx]
mov DWORD PTR $T361280[ebp], edx
mov eax, DWORD PTR $T361280[ebp]
mov DWORD PTR $T361279[ebp], eax
cmp DWORD PTR $T361279[ebp], 0
je SHORT $LN10@shared_ptr@6
push 1
mov ecx, DWORD PTR $T361279[ebp]
call ??_Gconnection@dlib@@QAEPAXI@Z
mov DWORD PTR tv133[ebp], eax
jmp SHORT $LN2@shared_ptr@6
$LN10@shared_ptr@6:
mov DWORD PTR tv133[ebp], 0
$LN2@shared_ptr@6:
; Line 166
mov ecx, DWORD PTR _this$[ebp]
mov edx, DWORD PTR [ecx+4]
mov DWORD PTR $T361284[ebp], edx
mov eax, DWORD PTR $T361284[ebp]
mov DWORD PTR $T361283[ebp], eax
cmp DWORD PTR $T361283[ebp], 0
je SHORT $LN12@shared_ptr@6
push 1
mov ecx, DWORD PTR $T361283[ebp]
call ??_Gshared_ptr_thread_safe_node@dlib@@QAEPAXI@Z
mov DWORD PTR tv139[ebp], eax
jmp SHORT $LN13@shared_ptr@6
$LN12@shared_ptr@6:
mov DWORD PTR tv139[ebp], 0
$LN13@shared_ptr@6:
; Line 168
jmp SHORT $LN6@shared_ptr@6
$LN4@shared_ptr@6:
; Line 170
mov ecx, DWORD PTR _this$[ebp]
mov edx, DWORD PTR [ecx+4]
mov eax, DWORD PTR [edx+24]
sub eax, 1
mov ecx, DWORD PTR _this$[ebp]
mov edx, DWORD PTR [ecx+4]
mov DWORD PTR [edx+24], eax
; Line 171
mov eax, DWORD PTR _this$[ebp]
mov ecx, DWORD PTR [eax+4]
call ?unlock@mutex@dlib@@QBEXXZ ; dlib::mutex::unlock
$LN6@shared_ptr@6:
; Line 174
mov esp, ebp
pop ebp
ret 0
??1?$shared_ptr_thread_safe@Vconnection@dlib@@@dlib@@QAE@XZ ENDP ; dlib::shared_ptr_thread_safe<dlib::connection>::~shared_ptr_thread_safe<dlib::connection>
; Function compile flags: /Odtp
; COMDAT ??$reset@Vconnection@dlib@@@?$shared_ptr_thread_safe@Vconnection@dlib@@@dlib@@QAEXPAVconnection@1@@Z
_TEXT SEGMENT
tv72 = -16 ; size = 4
_this$ = -12 ; size = 4
$T363257 = -8 ; size = 8
_p$ = 8 ; size = 4
??$reset@Vconnection@dlib@@@?$shared_ptr_thread_safe@Vconnection@dlib@@@dlib@@QAEXPAVconnection@1@@Z PROC ; dlib::shared_ptr_thread_safe<dlib::connection>::reset<dlib::connection>, COMDAT
; _this$ = ecx
; Line 315
push ebp
mov ebp, esp
sub esp, 16 ; 00000010H
mov DWORD PTR _this$[ebp], ecx
; Line 323
mov eax, DWORD PTR _p$[ebp]
push eax
lea ecx, DWORD PTR $T363257[ebp]
call ??$?0Vconnection@dlib@@@?$shared_ptr_thread_safe@Vconnection@dlib@@@dlib@@QAE@PAVconnection@1@@Z ; dlib::shared_ptr_thread_safe<dlib::connection>::shared_ptr_thread_safe<dlib::connection><dlib::connection>
mov DWORD PTR tv72[ebp], eax
mov ecx, DWORD PTR _this$[ebp]
push ecx
mov ecx, DWORD PTR tv72[ebp]
call ?swap@?$shared_ptr_thread_safe@Vconnection@dlib@@@dlib@@QAEXAAV12@@Z ; dlib::shared_ptr_thread_safe<dlib::connection>::swap
lea ecx, DWORD PTR $T363257[ebp]
call ??1?$shared_ptr_thread_safe@Vconnection@dlib@@@dlib@@QAE@XZ ; dlib::shared_ptr_thread_safe<dlib::connection>::~shared_ptr_thread_safe<dlib::connection>
; Line 324
mov esp, ebp
pop ebp
ret 4
??$reset@Vconnection@dlib@@@?$shared_ptr_thread_safe@Vconnection@dlib@@@dlib@@QAEXPAVconnection@1@@Z ENDP ; dlib::shared_ptr_thread_safe<dlib::connection>::reset<dlib::connection>
; Function compile flags: /Odtp
_TEXT ENDS
; COMDAT ?reset@?$shared_ptr_thread_safe@Vconnection@dlib@@@dlib@@QAEXXZ
_TEXT SEGMENT
tv71 = -16 ; size = 4
_this$ = -12 ; size = 4
$T363261 = -8 ; size = 8
?reset@?$shared_ptr_thread_safe@Vconnection@dlib@@@dlib@@QAEXXZ PROC ; dlib::shared_ptr_thread_safe<dlib::connection>::reset, COMDAT
; _this$ = ecx
; Line 310
push ebp
mov ebp, esp
sub esp, 16 ; 00000010H
mov DWORD PTR _this$[ebp], ecx
; Line 311
lea ecx, DWORD PTR $T363261[ebp]
call ??0?$shared_ptr_thread_safe@Vconnection@dlib@@@dlib@@QAE@XZ ; dlib::shared_ptr_thread_safe<dlib::connection>::shared_ptr_thread_safe<dlib::connection>
mov DWORD PTR tv71[ebp], eax
mov eax, DWORD PTR _this$[ebp]
push eax
mov ecx, DWORD PTR tv71[ebp]
call ?swap@?$shared_ptr_thread_safe@Vconnection@dlib@@@dlib@@QAEXAAV12@@Z ; dlib::shared_ptr_thread_safe<dlib::connection>::swap
lea ecx, DWORD PTR $T363261[ebp]
call ??1?$shared_ptr_thread_safe@Vconnection@dlib@@@dlib@@QAE@XZ ; dlib::shared_ptr_thread_safe<dlib::connection>::~shared_ptr_thread_safe<dlib::connection>
; Line 312
mov esp, ebp
pop ebp
ret 0
?reset@?$shared_ptr_thread_safe@Vconnection@dlib@@@dlib@@QAEXXZ ENDP ; dlib::shared_ptr_thread_safe<dlib::connection>::reset
PUBLIC __$ArrayPad$
; COMDAT xdata$x
; File e:\library\dlib\dlib\iosockstream\iosockstream.h
xdata$x SEGMENT
__unwindtable$?close@iosockstream@dlib@@QAEXK@Z DD 0ffffffffH
DD 00H
DD 00H
DD FLAT:__unwindfunclet$?close@iosockstream@dlib@@QAEXK@Z$2
DD 0ffffffffH
DD 00H
__catchsym$?close@iosockstream@dlib@@QAEXK@Z$3 DD 040H
DD 00H
DD 00H
DD FLAT:__catch$?close@iosockstream@dlib@@QAEXK@Z$0
__tryblocktable$?close@iosockstream@dlib@@QAEXK@Z DD 00H
DD 01H
DD 02H
DD 01H
DD FLAT:__catchsym$?close@iosockstream@dlib@@QAEXK@Z$3
__ehfuncinfo$?close@iosockstream@dlib@@QAEXK@Z DD 019930522H
DD 03H
DD FLAT:__unwindtable$?close@iosockstream@dlib@@QAEXK@Z
DD 01H
DD FLAT:__tryblocktable$?close@iosockstream@dlib@@QAEXK@Z
DD 2 DUP(00H)
DD 00H
DD 01H
; Function compile flags: /Odtp
xdata$x ENDS
; COMDAT ?close@iosockstream@dlib@@QAEXK@Z
_TEXT SEGMENT
tv150 = -296 ; size = 4
_this$ = -292 ; size = 4
_junk$149656 = -288 ; size = 100
__$ArrayPad$ = -180 ; size = 4
_t$149648 = -176 ; size = 160
__$EHRec$ = -16 ; size = 16
_timeout$ = 8 ; size = 4
?close@iosockstream@dlib@@QAEXK@Z PROC ; dlib::iosockstream::close, COMDAT
; _this$ = ecx
; Line 93
push ebp
mov ebp, esp
push -1
push __ehhandler$?close@iosockstream@dlib@@QAEXK@Z
mov eax, DWORD PTR fs:0
push eax
push ecx
sub esp, 280 ; 00000118H
mov eax, DWORD PTR ___security_cookie
xor eax, ebp
mov DWORD PTR __$ArrayPad$[ebp], eax
push ebx
push esi
push edi
push eax
lea eax, DWORD PTR __$EHRec$[ebp+4]
mov DWORD PTR fs:0, eax
mov DWORD PTR __$EHRec$[ebp], esp
mov DWORD PTR _this$[ebp], ecx
; Line 94
push 0
mov eax, DWORD PTR _this$[ebp]
mov ecx, DWORD PTR [eax]
mov edx, DWORD PTR _this$[ebp]
add edx, DWORD PTR [ecx+4]
mov ecx, edx
call DWORD PTR __imp_?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PAV32@@Z
; Line 96
mov DWORD PTR __$EHRec$[ebp+12], 0
; Line 97
mov ecx, DWORD PTR _this$[ebp]
add ecx, 36 ; 00000024H
call ??B?$scoped_ptr@Vsockstreambuf@dlib@@U?$default_deleter@Vsockstreambuf@dlib@@@2@@dlib@@QBE_NXZ ; dlib::scoped_ptr<dlib::sockstreambuf,dlib::default_deleter<dlib::sockstreambuf> >::operator bool
movzx eax, al
test eax, eax
je $LN5@close@4
; Line 99
mov ecx, DWORD PTR _timeout$[ebp]
push ecx
push OFFSET ?shutdown@connection@dlib@@QAEHXZ ; dlib::connection::shutdown
mov ecx, DWORD PTR _this$[ebp]
add ecx, 28 ; 0000001cH
call ??D?$shared_ptr_thread_safe@Vconnection@dlib@@@dlib@@QBEAAVconnection@1@XZ ; dlib::shared_ptr_thread_safe<dlib::connection>::operator*
push eax
lea ecx, DWORD PTR _t$149648[ebp]
call ??$?0Vconnection@dlib@@@timeout@dlib@@QAE@AAVconnection@1@P821@AEHXZK@Z ; dlib::timeout::timeout<dlib::connection>
mov DWORD PTR tv150[ebp], eax
mov BYTE PTR __$EHRec$[ebp+12], 1
; Line 102
push 0
mov ecx, DWORD PTR _this$[ebp]
add ecx, 36 ; 00000024H
call ?reset@?$scoped_ptr@Vsockstreambuf@dlib@@U?$default_deleter@Vsockstreambuf@dlib@@@2@@dlib@@QAEXPAVsockstreambuf@2@@Z ; dlib::scoped_ptr<dlib::sockstreambuf,dlib::default_deleter<dlib::sockstreambuf> >::reset
; Line 104
mov ecx, DWORD PTR _this$[ebp]
add ecx, 28 ; 0000001cH
call ??C?$shared_ptr_thread_safe@Vconnection@dlib@@@dlib@@QBEPAVconnection@1@XZ ; dlib::shared_ptr_thread_safe<dlib::connection>::operator->
mov ecx, eax
call ?shutdown_outgoing@connection@dlib@@QAEHXZ ; dlib::connection::shutdown_outgoing
test eax, eax
je SHORT $LN2@close@4
; Line 107
mov ecx, DWORD PTR _this$[ebp]
add ecx, 28 ; 0000001cH
call ??C?$shared_ptr_thread_safe@Vconnection@dlib@@@dlib@@QBEPAVconnection@1@XZ ; dlib::shared_ptr_thread_safe<dlib::connection>::operator->
mov ecx, eax
call ?shutdown@connection@dlib@@QAEHXZ ; dlib::connection::shutdown
; Line 109
jmp SHORT $LN3@close@4
$LN2@close@4:
; Line 113
push 100 ; 00000064H
lea edx, DWORD PTR _junk$149656[ebp]
push edx
mov ecx, DWORD PTR _this$[ebp]
add ecx, 28 ; 0000001cH
call ??C?$shared_ptr_thread_safe@Vconnection@dlib@@@dlib@@QBEPAVconnection@1@XZ ; dlib::shared_ptr_thread_safe<dlib::connection>::operator->
mov ecx, eax
call ?read@connection@dlib@@QAEJPADJ@Z ; dlib::connection::read
test eax, eax
jle SHORT $LN3@close@4
jmp SHORT $LN2@close@4
$LN3@close@4:
; Line 115
mov BYTE PTR __$EHRec$[ebp+12], 0
lea ecx, DWORD PTR _t$149648[ebp]
call ??1timeout@dlib@@UAE@XZ ; dlib::timeout::~timeout
$LN5@close@4:
; Line 116
jmp SHORT $LN9@close@4
__catch$?close@iosockstream@dlib@@QAEXK@Z$0:
; Line 119
mov ecx, DWORD PTR _this$[ebp]
add ecx, 28 ; 0000001cH
call ?reset@?$shared_ptr_thread_safe@Vconnection@dlib@@@dlib@@QAEXXZ ; dlib::shared_ptr_thread_safe<dlib::connection>::reset
; Line 120
push 0
push 0
call __CxxThrowException@8
; Line 121
mov DWORD PTR __$EHRec$[ebp+12], -1
mov eax, __tryend$?close@iosockstream@dlib@@QAEXK@Z$1
ret 0
$LN9@close@4:
mov DWORD PTR __$EHRec$[ebp+12], -1
__tryend$?close@iosockstream@dlib@@QAEXK@Z$1:
; Line 122
mov ecx, DWORD PTR _this$[ebp]
add ecx, 28 ; 0000001cH
call ?reset@?$shared_ptr_thread_safe@Vconnection@dlib@@@dlib@@QAEXXZ ; dlib::shared_ptr_thread_safe<dlib::connection>::reset
$LN8@close@4:
; Line 123
mov ecx, DWORD PTR __$EHRec$[ebp+4]
mov DWORD PTR fs:0, ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, DWORD PTR __$ArrayPad$[ebp]
xor ecx, ebp
call @__security_check_cookie@4
mov esp, ebp
pop ebp
ret 4
_TEXT ENDS
; COMDAT text$x
text$x SEGMENT
__unwindfunclet$?close@iosockstream@dlib@@QAEXK@Z$2:
lea ecx, DWORD PTR _t$149648[ebp]
jmp ??1timeout@dlib@@UAE@XZ ; dlib::timeout::~timeout
__ehhandler$?close@iosockstream@dlib@@QAEXK@Z:
mov edx, DWORD PTR [esp+8]
lea eax, DWORD PTR [edx+12]
mov ecx, DWORD PTR [edx-300]
xor ecx, eax
call @__security_check_cookie@4
mov ecx, DWORD PTR [edx-168]
xor ecx, eax
call @__security_check_cookie@4
mov eax, OFFSET __ehfuncinfo$?close@iosockstream@dlib@@QAEXK@Z
jmp ___CxxFrameHandler3
text$x ENDS
?close@iosockstream@dlib@@QAEXK@Z ENDP ; dlib::iosockstream::close
; COMDAT xdata$x
xdata$x SEGMENT
__unwindtable$?open@iosockstream@dlib@@QAEXABUnetwork_address@2@@Z DD 0ffffffffH
DD FLAT:__unwindfunclet$?open@iosockstream@dlib@@QAEXABUnetwork_address@2@@Z$0
__ehfuncinfo$?open@iosockstream@dlib@@QAEXABUnetwork_address@2@@Z DD 019930522H
DD 01H
DD FLAT:__unwindtable$?open@iosockstream@dlib@@QAEXABUnetwork_address@2@@Z
DD 2 DUP(00H)
DD 2 DUP(00H)
DD 00H
DD 01H
; Function compile flags: /Odtp
xdata$x ENDS
; COMDAT ?open@iosockstream@dlib@@QAEXABUnetwork_address@2@@Z
_TEXT SEGMENT
tv84 = -28 ; size = 4
_this$ = -24 ; size = 4
$T369621 = -20 ; size = 4
$T369620 = -16 ; size = 4
__$EHRec$ = -12 ; size = 12
_addr$ = 8 ; size = 4
?open@iosockstream@dlib@@QAEXABUnetwork_address@2@@Z PROC ; dlib::iosockstream::open, COMDAT
; _this$ = ecx
; Line 61
push ebp
mov ebp, esp
push -1
push __ehhandler$?open@iosockstream@dlib@@QAEXABUnetwork_address@2@@Z
mov eax, DWORD PTR fs:0
push eax
sub esp, 16 ; 00000010H
mov eax, DWORD PTR ___security_cookie
xor eax, ebp
push eax
lea eax, DWORD PTR __$EHRec$[ebp]
mov DWORD PTR fs:0, eax
mov DWORD PTR _this$[ebp], ecx
; Line 62
push 10000 ; 00002710H
mov ecx, DWORD PTR _this$[ebp]
call ?close@iosockstream@dlib@@QAEXK@Z ; dlib::iosockstream::close
; Line 63
mov eax, DWORD PTR _addr$[ebp]
push eax
call ?connect@dlib@@YAPAVconnection@1@ABUnetwork_address@1@@Z ; dlib::connect
add esp, 4
push eax
mov ecx, DWORD PTR _this$[ebp]
add ecx, 28 ; 0000001cH
call ??$reset@Vconnection@dlib@@@?$shared_ptr_thread_safe@Vconnection@dlib@@@dlib@@QAEXPAVconnection@1@@Z ; dlib::shared_ptr_thread_safe<dlib::connection>::reset<dlib::connection>
; Line 64
push 76 ; 0000004cH
call DWORD PTR __imp_??2@YAPAXI@Z
add esp, 4
mov DWORD PTR $T369621[ebp], eax
mov DWORD PTR __$EHRec$[ebp+8], 0
cmp DWORD PTR $T369621[ebp], 0
je SHORT $LN3@open@3
mov ecx, DWORD PTR _this$[ebp]
add ecx, 28 ; 0000001cH
call ?get@?$shared_ptr_thread_safe@Vconnection@dlib@@@dlib@@QBEPAVconnection@2@XZ ; dlib::shared_ptr_thread_safe<dlib::connection>::get
push eax
mov ecx, DWORD PTR $T369621[ebp]
call ??0sockstreambuf@dlib@@QAE@PAVconnection@1@@Z ; dlib::sockstreambuf::sockstreambuf
mov DWORD PTR tv84[ebp], eax
jmp SHORT $LN4@open@3
$LN3@open@3:
mov DWORD PTR tv84[ebp], 0
$LN4@open@3:
mov ecx, DWORD PTR tv84[ebp]
mov DWORD PTR $T369620[ebp], ecx
mov DWORD PTR __$EHRec$[ebp+8], -1
mov edx, DWORD PTR $T369620[ebp]
push edx
mov ecx, DWORD PTR _this$[ebp]
add ecx, 36 ; 00000024H
call ?reset@?$scoped_ptr@Vsockstreambuf@dlib@@U?$default_deleter@Vsockstreambuf@dlib@@@2@@dlib@@QAEXPAVsockstreambuf@2@@Z ; dlib::scoped_ptr<dlib::sockstreambuf,dlib::default_deleter<dlib::sockstreambuf> >::reset
; Line 72
mov ecx, DWORD PTR _this$[ebp]
add ecx, 36 ; 00000024H
call ??C?$scoped_ptr@Vsockstreambuf@dlib@@U?$default_deleter@Vsockstreambuf@dlib@@@2@@dlib@@QBEPAVsockstreambuf@1@XZ ; dlib::scoped_ptr<dlib::sockstreambuf,dlib::default_deleter<dlib::sockstreambuf> >::operator->
mov ecx, eax
call ?flush_output_on_read@sockstreambuf@dlib@@QAEXXZ ; dlib::sockstreambuf::flush_output_on_read
; Line 73
mov ecx, DWORD PTR _this$[ebp]
add ecx, 36 ; 00000024H
call ?get@?$scoped_ptr@Vsockstreambuf@dlib@@U?$default_deleter@Vsockstreambuf@dlib@@@2@@dlib@@QBEPAVsockstreambuf@2@XZ ; dlib::scoped_ptr<dlib::sockstreambuf,dlib::default_deleter<dlib::sockstreambuf> >::get
push eax
mov eax, DWORD PTR _this$[ebp]
mov ecx, DWORD PTR [eax]
mov edx, DWORD PTR _this$[ebp]
add edx, DWORD PTR [ecx+4]
mov ecx, edx
call DWORD PTR __imp_?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PAV32@@Z
; Line 74
push 0
push 0
mov eax, DWORD PTR _this$[ebp]
mov ecx, DWORD PTR [eax]
mov edx, DWORD PTR _this$[ebp]
add edx, DWORD PTR [ecx+4]
mov ecx, edx
call DWORD PTR __imp_?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXH_N@Z
; Line 75
mov ecx, DWORD PTR __$EHRec$[ebp]
mov DWORD PTR fs:0, ecx
pop ecx
mov esp, ebp
pop ebp
ret 4
_TEXT ENDS
; COMDAT text$x
text$x SEGMENT
__unwindfunclet$?open@iosockstream@dlib@@QAEXABUnetwork_address@2@@Z$0:
mov eax, DWORD PTR $T369621[ebp]
push eax
call DWORD PTR __imp_??3@YAXPAX@Z
pop ecx
ret 0
__ehhandler$?open@iosockstream@dlib@@QAEXABUnetwork_address@2@@Z:
mov edx, DWORD PTR [esp+8]
lea eax, DWORD PTR [edx+12]
mov ecx, DWORD PTR [edx-20]
xor ecx, eax
call @__security_check_cookie@4
mov eax, OFFSET __ehfuncinfo$?open@iosockstream@dlib@@QAEXABUnetwork_address@2@@Z
jmp ___CxxFrameHandler3
text$x ENDS
?open@iosockstream@dlib@@QAEXABUnetwork_address@2@@Z ENDP ; dlib::iosockstream::open
; COMDAT xdata$x
xdata$x SEGMENT
__unwindtable$??1iosockstream@dlib@@UAE@XZ DD 0ffffffffH
DD FLAT:__unwindfunclet$??1iosockstream@dlib@@UAE@XZ$0
DD 00H
DD FLAT:__unwindfunclet$??1iosockstream@dlib@@UAE@XZ$1
DD 01H
DD FLAT:__unwindfunclet$??1iosockstream@dlib@@UAE@XZ$2
DD 02H
DD FLAT:__unwindfunclet$??1iosockstream@dlib@@UAE@XZ$3
__ehfuncinfo$??1iosockstream@dlib@@UAE@XZ DD 019930522H
DD 04H
DD FLAT:__unwindtable$??1iosockstream@dlib@@UAE@XZ
DD 2 DUP(00H)
DD 2 DUP(00H)
DD 00H
DD 01H
; Function compile flags: /Odtp
xdata$x ENDS
; COMDAT ??1iosockstream@dlib@@UAE@XZ
_TEXT SEGMENT
_this$ = -16 ; size = 4
__$EHRec$ = -12 ; size = 12
??1iosockstream@dlib@@UAE@XZ PROC ; dlib::iosockstream::~iosockstream, COMDAT
; _this$ = ecx
; Line 54
push ebp
mov ebp, esp
push -1
push __ehhandler$??1iosockstream@dlib@@UAE@XZ
mov eax, DWORD PTR fs:0
push eax
push ecx
mov eax, DWORD PTR ___security_cookie
xor eax, ebp
push eax
lea eax, DWORD PTR __$EHRec$[ebp]
mov DWORD PTR fs:0, eax
mov DWORD PTR _this$[ebp], ecx
mov eax, DWORD PTR _this$[ebp]
mov ecx, DWORD PTR [eax-40]
mov edx, DWORD PTR [ecx+4]
mov eax, DWORD PTR _this$[ebp]
mov DWORD PTR [eax+edx-40], OFFSET ??_7iosockstream@dlib@@6B@
mov DWORD PTR __$EHRec$[ebp+8], 3
; Line 55
push 10000 ; 00002710H
mov ecx, DWORD PTR _this$[ebp]
sub ecx, 40 ; 00000028H
call ?close@iosockstream@dlib@@QAEXK@Z ; dlib::iosockstream::close
; Line 56
mov BYTE PTR __$EHRec$[ebp+8], 2
mov ecx, DWORD PTR _this$[ebp]
sub ecx, 4
call ??1?$scoped_ptr@Vsockstreambuf@dlib@@U?$default_deleter@Vsockstreambuf@dlib@@@2@@dlib@@QAE@XZ ; dlib::scoped_ptr<dlib::sockstreambuf,dlib::default_deleter<dlib::sockstreambuf> >::~scoped_ptr<dlib::sockstreambuf,dlib::default_deleter<dlib::sockstreambuf> >
mov BYTE PTR __$EHRec$[ebp+8], 1
mov ecx, DWORD PTR _this$[ebp]
sub ecx, 12 ; 0000000cH
call ??1?$shared_ptr_thread_safe@Vconnection@dlib@@@dlib@@QAE@XZ ; dlib::shared_ptr_thread_safe<dlib::connection>::~shared_ptr_thread_safe<dlib::connection>
mov BYTE PTR __$EHRec$[ebp+8], 0
mov ecx, DWORD PTR _this$[ebp]
sub ecx, 16 ; 00000010H
call ??1?$scoped_ptr@Vtimeout@dlib@@U?$default_deleter@Vtimeout@dlib@@@2@@dlib@@QAE@XZ ; dlib::scoped_ptr<dlib::timeout,dlib::default_deleter<dlib::timeout> >::~scoped_ptr<dlib::timeout,dlib::default_deleter<dlib::timeout> >
mov DWORD PTR __$EHRec$[ebp+8], -1
mov ecx, DWORD PTR _this$[ebp]
sub ecx, 16 ; 00000010H
call DWORD PTR __imp_??1?$basic_iostream@DU?$char_traits@D@std@@@std@@UAE@XZ
mov ecx, DWORD PTR __$EHRec$[ebp]
mov DWORD PTR fs:0, ecx
pop ecx
mov esp, ebp
pop ebp
ret 0
_TEXT ENDS
; COMDAT text$x
text$x SEGMENT
__unwindfunclet$??1iosockstream@dlib@@UAE@XZ$0:
mov ecx, DWORD PTR _this$[ebp]
sub ecx, 16 ; 00000010H
jmp DWORD PTR __imp_??1?$basic_iostream@DU?$char_traits@D@std@@@std@@UAE@XZ
__unwindfunclet$??1iosockstream@dlib@@UAE@XZ$1:
mov ecx, DWORD PTR _this$[ebp]
sub ecx, 16 ; 00000010H
jmp ??1?$scoped_ptr@Vtimeout@dlib@@U?$default_deleter@Vtimeout@dlib@@@2@@dlib@@QAE@XZ ; dlib::scoped_ptr<dlib::timeout,dlib::default_deleter<dlib::timeout> >::~scoped_ptr<dlib::timeout,dlib::default_deleter<dlib::timeout> >
__unwindfunclet$??1iosockstream@dlib@@UAE@XZ$2:
mov ecx, DWORD PTR _this$[ebp]
sub ecx, 12 ; 0000000cH
jmp ??1?$shared_ptr_thread_safe@Vconnection@dlib@@@dlib@@QAE@XZ ; dlib::shared_ptr_thread_safe<dlib::connection>::~shared_ptr_thread_safe<dlib::connection>
__unwindfunclet$??1iosockstream@dlib@@UAE@XZ$3:
mov ecx, DWORD PTR _this$[ebp]
sub ecx, 4
jmp ??1?$scoped_ptr@Vsockstreambuf@dlib@@U?$default_deleter@Vsockstreambuf@dlib@@@2@@dlib@@QAE@XZ ; dlib::scoped_ptr<dlib::sockstreambuf,dlib::default_deleter<dlib::sockstreambuf> >::~scoped_ptr<dlib::sockstreambuf,dlib::default_deleter<dlib::sockstreambuf> >
__ehhandler$??1iosockstream@dlib@@UAE@XZ:
mov edx, DWORD PTR [esp+8]
lea eax, DWORD PTR [edx+12]
mov ecx, DWORD PTR [edx-8]
xor ecx, eax
call @__security_check_cookie@4
mov eax, OFFSET __ehfuncinfo$??1iosockstream@dlib@@UAE@XZ
jmp ___CxxFrameHandler3
text$x ENDS
??1iosockstream@dlib@@UAE@XZ ENDP ; dlib::iosockstream::~iosockstream
; COMDAT xdata$x
xdata$x SEGMENT
__unwindtable$??0iosockstream@dlib@@QAE@ABUnetwork_address@1@@Z DD 0ffffffffH
DD FLAT:__unwindfunclet$??0iosockstream@dlib@@QAE@ABUnetwork_address@1@@Z$0
DD 00H
DD FLAT:__unwindfunclet$??0iosockstream@dlib@@QAE@ABUnetwork_address@1@@Z$1
DD 01H
DD FLAT:__unwindfunclet$??0iosockstream@dlib@@QAE@ABUnetwork_address@1@@Z$2
DD 02H
DD FLAT:__unwindfunclet$??0iosockstream@dlib@@QAE@ABUnetwork_address@1@@Z$3
DD 03H
DD FLAT:__unwindfunclet$??0iosockstream@dlib@@QAE@ABUnetwork_address@1@@Z$4
__ehfuncinfo$??0iosockstream@dlib@@QAE@ABUnetwork_address@1@@Z DD 019930522H
DD 05H
DD FLAT:__unwindtable$??0iosockstream@dlib@@QAE@ABUnetwork_address@1@@Z
DD 2 DUP(00H)
DD 2 DUP(00H)
DD 00H
DD 01H
; Function compile flags: /Odtp
xdata$x ENDS
; COMDAT ??0iosockstream@dlib@@QAE@ABUnetwork_address@1@@Z
_TEXT SEGMENT
_this$ = -20 ; size = 4
$T369645 = -16 ; size = 4
__$EHRec$ = -12 ; size = 12
_addr$ = 8 ; size = 4
_$initVBases$ = 12 ; size = 4
??0iosockstream@dlib@@QAE@ABUnetwork_address@1@@Z PROC ; dlib::iosockstream::iosockstream, COMDAT
; _this$ = ecx
; Line 40
push ebp
mov ebp, esp
push -1
push __ehhandler$??0iosockstream@dlib@@QAE@ABUnetwork_address@1@@Z
mov eax, DWORD PTR fs:0
push eax
sub esp, 8
mov eax, DWORD PTR ___security_cookie
xor eax, ebp
push eax
lea eax, DWORD PTR __$EHRec$[ebp]
mov DWORD PTR fs:0, eax
mov DWORD PTR _this$[ebp], ecx
mov DWORD PTR $T369645[ebp], 0
cmp DWORD PTR _$initVBases$[ebp], 0
je SHORT $LN1@iosockstre
mov eax, DWORD PTR _this$[ebp]
mov DWORD PTR [eax], OFFSET ??_8iosockstream@dlib@@7B?$basic_istream@DU?$char_traits@D@std@@@std@@@
mov ecx, DWORD PTR _this$[ebp]
mov DWORD PTR [ecx+16], OFFSET ??_8iosockstream@dlib@@7B?$basic_ostream@DU?$char_traits@D@std@@@std@@@
mov ecx, DWORD PTR _this$[ebp]
add ecx, 40 ; 00000028H
call DWORD PTR __imp_??0?$basic_ios@DU?$char_traits@D@std@@@std@@IAE@XZ
mov DWORD PTR __$EHRec$[ebp+8], 0
mov edx, DWORD PTR $T369645[ebp]
or edx, 1
mov DWORD PTR $T369645[ebp], edx
$LN1@iosockstre:
push 0
push 0
mov ecx, DWORD PTR _this$[ebp]
call DWORD PTR __imp_??0?$basic_iostream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z
mov DWORD PTR __$EHRec$[ebp+8], 1
mov eax, DWORD PTR _this$[ebp]
mov ecx, DWORD PTR [eax]
mov edx, DWORD PTR [ecx+4]
mov eax, DWORD PTR _this$[ebp]
mov DWORD PTR [eax+edx], OFFSET ??_7iosockstream@dlib@@6B@
push 0
mov ecx, DWORD PTR _this$[ebp]
add ecx, 24 ; 00000018H
call ??0?$scoped_ptr@Vtimeout@dlib@@U?$default_deleter@Vtimeout@dlib@@@2@@dlib@@QAE@PAVtimeout@1@@Z ; dlib::scoped_ptr<dlib::timeout,dlib::default_deleter<dlib::timeout> >::scoped_ptr<dlib::timeout,dlib::default_deleter<dlib::timeout> >
mov BYTE PTR __$EHRec$[ebp+8], 2
mov ecx, DWORD PTR _this$[ebp]
add ecx, 28 ; 0000001cH
call ??0?$shared_ptr_thread_safe@Vconnection@dlib@@@dlib@@QAE@XZ ; dlib::shared_ptr_thread_safe<dlib::connection>::shared_ptr_thread_safe<dlib::connection>
mov BYTE PTR __$EHRec$[ebp+8], 3
push 0
mov ecx, DWORD PTR _this$[ebp]
add ecx, 36 ; 00000024H
call ??0?$scoped_ptr@Vsockstreambuf@dlib@@U?$default_deleter@Vsockstreambuf@dlib@@@2@@dlib@@QAE@PAVsockstreambuf@1@@Z ; dlib::scoped_ptr<dlib::sockstreambuf,dlib::default_deleter<dlib::sockstreambuf> >::scoped_ptr<dlib::sockstreambuf,dlib::default_deleter<dlib::sockstreambuf> >
mov BYTE PTR __$EHRec$[ebp+8], 4
; Line 41
mov ecx, DWORD PTR _addr$[ebp]
push ecx
mov ecx, DWORD PTR _this$[ebp]
call ?open@iosockstream@dlib@@QAEXABUnetwork_address@2@@Z ; dlib::iosockstream::open
; Line 42
mov DWORD PTR __$EHRec$[ebp+8], -1
mov eax, DWORD PTR _this$[ebp]
mov ecx, DWORD PTR __$EHRec$[ebp]
mov DWORD PTR fs:0, ecx
pop ecx
mov esp, ebp
pop ebp
ret 8
_TEXT ENDS
; COMDAT text$x
text$x SEGMENT
__unwindfunclet$??0iosockstream@dlib@@QAE@ABUnetwork_address@1@@Z$0:
mov eax, DWORD PTR $T369645[ebp]
and eax, 1
je $LN5@iosockstre
and DWORD PTR $T369645[ebp], -2 ; fffffffeH
mov ecx, DWORD PTR _this$[ebp]
add ecx, 40 ; 00000028H
jmp DWORD PTR __imp_??1?$basic_ios@DU?$char_traits@D@std@@@std@@UAE@XZ
$LN5@iosockstre:
ret 0
__unwindfunclet$??0iosockstream@dlib@@QAE@ABUnetwork_address@1@@Z$1:
mov ecx, DWORD PTR _this$[ebp]
add ecx, 24 ; 00000018H
jmp DWORD PTR __imp_??1?$basic_iostream@DU?$char_traits@D@std@@@std@@UAE@XZ
__unwindfunclet$??0iosockstream@dlib@@QAE@ABUnetwork_address@1@@Z$2:
mov ecx, DWORD PTR _this$[ebp]
add ecx, 24 ; 00000018H
jmp ??1?$scoped_ptr@Vtimeout@dlib@@U?$default_deleter@Vtimeout@dlib@@@2@@dlib@@QAE@XZ ; dlib::scoped_ptr<dlib::timeout,dlib::default_deleter<dlib::timeout> >::~scoped_ptr<dlib::timeout,dlib::default_deleter<dlib::timeout> >
__unwindfunclet$??0iosockstream@dlib@@QAE@ABUnetwork_address@1@@Z$3:
mov ecx, DWORD PTR _this$[ebp]
add ecx, 28 ; 0000001cH
jmp ??1?$shared_ptr_thread_safe@Vconnection@dlib@@@dlib@@QAE@XZ ; dlib::shared_ptr_thread_safe<dlib::connection>::~shared_ptr_thread_safe<dlib::connection>
__unwindfunclet$??0iosockstream@dlib@@QAE@ABUnetwork_address@1@@Z$4:
mov ecx, DWORD PTR _this$[ebp]
add ecx, 36 ; 00000024H
jmp ??1?$scoped_ptr@Vsockstreambuf@dlib@@U?$default_deleter@Vsockstreambuf@dlib@@@2@@dlib@@QAE@XZ ; dlib::scoped_ptr<dlib::sockstreambuf,dlib::default_deleter<dlib::sockstreambuf> >::~scoped_ptr<dlib::sockstreambuf,dlib::default_deleter<dlib::sockstreambuf> >
__ehhandler$??0iosockstream@dlib@@QAE@ABUnetwork_address@1@@Z:
mov edx, DWORD PTR [esp+8]
lea eax, DWORD PTR [edx+12]
mov ecx, DWORD PTR [edx-12]
xor ecx, eax
call @__security_check_cookie@4
mov eax, OFFSET __ehfuncinfo$??0iosockstream@dlib@@QAE@ABUnetwork_address@1@@Z
jmp ___CxxFrameHandler3
text$x ENDS
??0iosockstream@dlib@@QAE@ABUnetwork_address@1@@Z ENDP ; dlib::iosockstream::iosockstream
; Function compile flags: /Odtp
; COMDAT ??_Diosockstream@dlib@@QAEXXZ
_TEXT SEGMENT
_this$ = -4 ; size = 4
??_Diosockstream@dlib@@QAEXXZ PROC ; dlib::iosockstream::`vbase destructor', COMDAT
; _this$ = ecx
push ebp
mov ebp, esp
push ecx
mov DWORD PTR _this$[ebp], ecx
mov ecx, DWORD PTR _this$[ebp]
add ecx, 40 ; 00000028H
call ??1iosockstream@dlib@@UAE@XZ ; dlib::iosockstream::~iosockstream
mov ecx, DWORD PTR _this$[ebp]
add ecx, 40 ; 00000028H
call DWORD PTR __imp_??1?$basic_ios@DU?$char_traits@D@std@@@std@@UAE@XZ
mov esp, ebp
pop ebp
ret 0
??_Diosockstream@dlib@@QAEXXZ ENDP ; dlib::iosockstream::`vbase destructor'
; Function compile flags: /Odtp
_TEXT ENDS
; COMDAT ??_Giosockstream@dlib@@UAEPAXI@Z
_TEXT SEGMENT
_this$ = -4 ; size = 4
___flags$ = 8 ; size = 4
??_Giosockstream@dlib@@UAEPAXI@Z PROC ; dlib::iosockstream::`scalar deleting destructor', COMDAT
; _this$ = ecx
push ebp
mov ebp, esp
push ecx
mov DWORD PTR _this$[ebp], ecx
mov ecx, DWORD PTR _this$[ebp]
sub ecx, 40 ; 00000028H
call ??_Diosockstream@dlib@@QAEXXZ
mov eax, DWORD PTR ___flags$[ebp]
and eax, 1
je SHORT $LN1@scalar@277
mov ecx, DWORD PTR _this$[ebp]
sub ecx, 40 ; 00000028H
push ecx
call DWORD PTR __imp_??3@YAXPAX@Z
add esp, 4
$LN1@scalar@277:
mov eax, DWORD PTR _this$[ebp]
sub eax, 40 ; 00000028H
mov esp, ebp
pop ebp
ret 4
??_Giosockstream@dlib@@UAEPAXI@Z ENDP ; dlib::iosockstream::`scalar deleting destructor'
END
| 37.980372 | 286 | 0.724264 |
ec600f6eb9e554624e68f40f2e34d821b8aefc14 | 614 | asm | Assembly | libsrc/stdio/enterprise/fputc_cons.asm | grancier/z180 | e83f35e36c9b4d1457e40585019430e901c86ed9 | [
"ClArtistic"
] | null | null | null | libsrc/stdio/enterprise/fputc_cons.asm | grancier/z180 | e83f35e36c9b4d1457e40585019430e901c86ed9 | [
"ClArtistic"
] | null | null | null | libsrc/stdio/enterprise/fputc_cons.asm | grancier/z180 | e83f35e36c9b4d1457e40585019430e901c86ed9 | [
"ClArtistic"
] | 1 | 2019-12-03T23:57:48.000Z | 2019-12-03T23:57:48.000Z | ;
; Enterprise 64/128 C Library
;
; Fputc_cons
;
; Stefano Bodrato - 2011
;
;
; $Id: fputc_cons.asm,v 1.5 2016/05/15 20:15:45 dom Exp $
;
SECTION code_clib
PUBLIC fputc_cons_native
;
; Entry: hl = points to char
;
.fputc_cons_native
ld hl,2
add hl,sp
ld a,(hl)
IF STANDARDESCAPECHARS
cp 10
ELSE
cp 13
ENDIF
jr nz,nocr
call doput
IF STANDARDESCAPECHARS
ld a,13
ELSE
ld a,10
ENDIF
.nocr
cp 12
jr nz,doput
ld a,1ah ;CLEAR-HOME
.doput
ld b,a
ld a,66h ; output channel (video)
rst 30h ; EXOS
defb 7 ; character output
ret
| 13.06383 | 57 | 0.609121 |
ecd461d455895af830e1f3138b405f8ad62b6463 | 366 | asm | Assembly | shellcode/pic.asm | IMULMUL/redteam | d8ad2009a354d466e11fda6074dd4610f82089ee | [
"MIT"
] | 640 | 2019-03-12T17:32:45.000Z | 2022-03-23T08:21:15.000Z | shellcode/pic.asm | kaisaryousuf/redteam | d8ad2009a354d466e11fda6074dd4610f82089ee | [
"MIT"
] | 1 | 2018-07-09T15:59:57.000Z | 2018-07-09T21:43:38.000Z | shellcode/pic.asm | kaisaryousuf/redteam | d8ad2009a354d466e11fda6074dd4610f82089ee | [
"MIT"
] | 138 | 2019-03-15T20:13:05.000Z | 2022-02-13T13:27:41.000Z | ; nasm -felf64 test.asm -o test.o && ld test.o -o test && chmod u+x test && ./test
SYS_WRITE equ 1
SYS_EXIT equ 60
STD_OUTPUT equ 1
section .text
global _start
_start:
mov rax, SYS_WRITE
mov rdi, STD_OUTPUT
lea rsi, [rel msg]
mov rdx, msglen
syscall
mov rax, SYS_EXIT
mov rdi, 0
syscall
msg: db `Shellcode: "Hello world!"\n`
msglen equ $-msg
| 18.3 | 82 | 0.672131 |
b7c1ce390745369603622651fb4545d5d9bedc98 | 6,129 | asm | Assembly | darkworldspawn.asm | KScl/z3rasm | 7739c9bd6a0c803b1e4e1f435af3178b8e04207b | [
"MIT"
] | null | null | null | darkworldspawn.asm | KScl/z3rasm | 7739c9bd6a0c803b1e4e1f435af3178b8e04207b | [
"MIT"
] | null | null | null | darkworldspawn.asm | KScl/z3rasm | 7739c9bd6a0c803b1e4e1f435af3178b8e04207b | [
"MIT"
] | null | null | null | ;================================================================================
; Dark World Spawn Location Fix & Master Sword Grove Fix
;--------------------------------------------------------------------------------
DarkWorldSaveFix:
LDA.b #$70 : PHA : PLB ; thing we wrote over - data bank change
JSL.l MasterSwordFollowerClear
JSL.l StatSaveCounter
RTL
;--------------------------------------------------------------------------------
DoWorldFix:
LDA InvertedMode : BEQ +
JMP DoWorldFix_Inverted
+
LDA.l Bugfix_MirrorlessSQToLW : BEQ .skip_mirror_check
LDA $7EF353 : AND #$02 : BEQ .noMirror ; check if we have the mirror
.skip_mirror_check ; alt entrance point
LDA $7EF3C5 : CMP.b #$03 : !BLT .aga1Alive ; check if agahnim 1 is alive
BRA .done
.noMirror
.aga1Alive
LDA #$00 : STA $7EF3CA ; set flag to light world
LDA $7EF3CC : CMP #$07 : BNE + : LDA.b #$08 : STA $7EF3CC : + ; convert frog to dwarf
.done
RTL
;--------------------------------------------------------------------------------
SetDeathWorldChecked:
LDA InvertedMode : BEQ +
JMP SetDeathWorldChecked_Inverted
+
LDA $1B : BEQ .outdoors
LDA $040C : CMP #$FF : BNE .dungeon
LDA $A0 : BNE ++
LDA $A1 : BNE ++ ; Prevent cheesing your way to top of pyramid by bombing yourself at High stakes chest game.
LDA GanonPyramidRespawn : BNE .pyramid ; if flag is set, force respawn at pyramid on death to ganon
++
.outdoors
JMP DoWorldFix
.dungeon
LDA Bugfix_PreAgaDWDungeonDeathToFakeDW : BNE .done ; if the bugfix is enabled, we do nothing on death in dungeon
JMP DoWorldFix_skip_mirror_check
.pyramid
LDA #$40 : STA $7EF3CA ; set flag to dark world
LDA $7EF3CC : CMP #$08 : BNE + : LDA.b #$07 : STA $7EF3CC : + ; convert dwarf to frog
.done
RTL
;================================================================================
DoWorldFix_Inverted:
LDA.l Bugfix_MirrorlessSQToLW : BEQ .skip_mirror_check
LDA $7EF353 : AND #$02 : BEQ .noMirror ; check if we have the mirror
.skip_mirror_check ; alt entrance point
LDA $7EF3C5 : CMP.b #$03 : !BLT .aga1Alive ; check if agahnim 1 is alive
BRA .done
.noMirror
.aga1Alive
LDA #$40 : STA $7EF3CA ; set flag to dark world
LDA $7EF3CC
CMP #$07 : BEQ .clear ; clear frog
CMP #$08 : BEQ .clear ; clear dwarf - consider flute implications
BRA .done
.clear
LDA.b #$00 : STA $7EF3CC ; clear follower
.done
RTL
;--------------------------------------------------------------------------------
SetDeathWorldChecked_Inverted:
LDA $1B : BEQ .outdoors
LDA $040C : CMP #$FF : BNE .dungeon
LDA $A0 : BNE ++
LDA $A1 : BNE ++ ; Prevent cheesing your way to top of castle by bombing yourself at High stakes chest game.
LDA GanonPyramidRespawn : BNE .castle ; if flag is set, force respawn at pyramid on death to ganon
++
.outdoors
JMP DoWorldFix
.dungeon
LDA Bugfix_PreAgaDWDungeonDeathToFakeDW : BNE .done ; if the bugfix is enabled, we do nothing on death in dungeon
JMP DoWorldFix_Inverted_skip_mirror_check
.castle
LDA #$00 : STA $7EF3CA ; set flag to dark world
LDA $7EF3CC : CMP #$07 : BNE + : LDA.b #$08 : STA $7EF3CC : + ; convert frog to dwarf
.done
RTL
;================================================================================
;--------------------------------------------------------------------------------
FakeWorldFix:
LDA FixFakeWorld : BEQ +
LDA $8A : AND.b #$40 : STA $7EF3CA
+
RTL
;--------------------------------------------------------------------------------
MasterSwordFollowerClear:
LDA $7EF3CC
CMP #$0E : BEQ .clear ; clear master sword follower
RTL
.clear
LDA.b #$00 : STA $7EF3CC ; clear follower
RTL
;--------------------------------------------------------------------------------
FixAgahnimFollowers:
LDA.b #$00 : STA $7EF3CC ; clear follower
JSL PrepDungeonExit ; thing we wrote over
RTL
;--------------------------------------------------------------------------------
macro FillToMinimum(base,filler,compare)
LDA.l <compare> : !SUB.l <base> : !BLT ?done
STA.l <filler>
?done:
endmacro
macro SetMinimum(base,compare)
LDA.l <compare> : !SUB.l <base> : !BLT ?done
LDA.l <compare> : STA.l <base>
?done:
endmacro
RefreshRainAmmo:
LDA $7EF3C5 : CMP.b #$01 : BEQ + : RTL : + ; check if we're in rain state
.rain
LDA $7EF3C8
+ CMP.b #$03 : BNE + ; Uncle
%FillToMinimum($7EF36E,$7EF373,RainDeathRefillMagic_Uncle)
%FillToMinimum($7EF343,$7EF375,RainDeathRefillBombs_Uncle)
%FillToMinimum($7EF377,$7EF376,RainDeathRefillArrows_Uncle)
%SetMinimum($7EF38B,RainDeathRefillKeys_Uncle)
BRL .done
+ CMP.b #$02 : BNE + ; Cell
%FillToMinimum($7EF36E,$7EF373,RainDeathRefillMagic_Cell)
%FillToMinimum($7EF343,$7EF375,RainDeathRefillBombs_Cell)
%FillToMinimum($7EF377,$7EF376,RainDeathRefillArrows_Cell)
%SetMinimum($7EF38B,RainDeathRefillKeys_Cell)
BRA .done
+ CMP.b #$04 : BNE + ; Mantle
%FillToMinimum($7EF36E,$7EF373,RainDeathRefillMagic_Mantle)
%FillToMinimum($7EF343,$7EF375,RainDeathRefillBombs_Mantle)
%FillToMinimum($7EF377,$7EF376,RainDeathRefillArrows_Mantle)
%SetMinimum($7EF38B,RainDeathRefillKeys_Mantle)
+
.done
RTL
;--------------------------------------------------------------------------------
!INFINITE_ARROWS = "$7F50C8"
!INFINITE_BOMBS = "$7F50C9"
!INFINITE_MAGIC = "$7F50CA"
SetEscapeAssist:
LDA $7EF3C5 : CMP.b #$01 : BNE .notrain ; check if we're in rain state
.rain
LDA.l EscapeAssist
BIT.b #$04 : BEQ + : STA !INFINITE_MAGIC : +
BIT.b #$02 : BEQ + : STA !INFINITE_BOMBS : +
BIT.b #$01 : BEQ + : STA !INFINITE_ARROWS : +
BRA ++
.notrain
LDA.l EscapeAssist : BIT.b #$04 : BEQ + : LDA.b #$00 : STA !INFINITE_MAGIC : +
LDA.l EscapeAssist : BIT.b #$02 : BEQ + : LDA.b #$00 : STA !INFINITE_BOMBS : +
LDA.l EscapeAssist : BIT.b #$01 : BEQ + : LDA.b #$00 : STA !INFINITE_ARROWS : +
++
RTL
;--------------------------------------------------------------------------------
SetSilverBowMode:
LDA SilverArrowsUseRestriction : BEQ + ; fix bow type for restricted arrow mode
LDA $7EF340 : CMP.b #$3 : !BLT +
!SUB.b #$02 : STA $7EF340
+
RTL
;================================================================================
| 36.266272 | 114 | 0.572035 |
1c94323905fb22ec6185eb2480ca93e58a3b8717 | 41,524 | asm | Assembly | test/arch/Efront Setup.asm | yunxu1019/efront | b30398485e702785ae7360190e50fe329addcfb3 | [
"MIT"
] | 1 | 2019-04-26T02:56:54.000Z | 2019-04-26T02:56:54.000Z | test/arch/Efront Setup.asm | yunxu1019/efront | b30398485e702785ae7360190e50fe329addcfb3 | [
"MIT"
] | 3 | 2019-06-10T02:59:29.000Z | 2021-06-06T01:09:58.000Z | test/arch/Efront Setup.asm | yunxu1019/efront | b30398485e702785ae7360190e50fe329addcfb3 | [
"MIT"
] | 1 | 2020-08-16T03:19:29.000Z | 2020-08-16T03:19:29.000Z | .386
.model flat,stdcall
option casemap:none
__UNICODE__ equ 1
include windows.inc
include user32.inc
include kernel32.inc
include gdi32.inc
includelib gdi32.lib
include shell32.inc
includelib shell32.lib
includelib user32.lib
includelib kernel32.lib
include gdiplus.inc
includelib gdiplus.lib
WM_DPICHANGED equ 002E0h
WM_DPICHANGED_BEFOREPARENT equ 002E2h
WM_DPICHANGED_AFTERPARENT equ 002E3h
WM_GETDPISCALEDSIZE equ 002E4h
MDT_EFFECTIVE_DPI equ 0
MDT_ANGULAR_DPI equ 1
MDT_RAW_DPI equ 2
MDT_DEFAULT equ MDT_EFFECTIVE_DPI
GdiplusStartupInput struct
GdiplusVersion DWORD ?; // Must be 1
DebugEventCallback DWORD ?; // Ignored on free builds
SuppressBackgroundThread DWORD ?; // FALSE unless you're prepared to call
SuppressExternalCodecs DWORD ?; // FALSE unless you want GDI+ only to use
GdiplusStartupInput ends
DotsChangeParam struct
x real4 ?
y real4 ?
r real4 ?
DotsChangeParam ends
SRECT struct
x dd ?
y dd ?
w dd ?
h dd ?
SRECT ends
EFRONT_BUTTON struct
back dd ?
clip dd ?
text dd ?
leng dd ?
rect dd ?
EFRONT_BUTTON ends
DEVICE_PRIMARY equ 0
DEVICE_IMMERSIVE equ 1
.data
gpstart GdiplusStartupInput <1,0,0,0>;
shellOperator db "open"
assocname db "assoc.bat"
unassoc db "unassoc.bat"
uninstall db "cmd.exe"
uninstallParam db "/c cd ..& rd /s /q ."
uninstallName db "卸载.scr",0,0
uninstallSize dd 0
uninstallRest dd 0
shcoreName db "shcore.dll",0
dpiProcName db a"SetProcessDpiAwareness",0
factorName db a"GetScaleFactorForMonitor",0
dpiforName db a"GetDpiForMonitor",0
; shellName db "shell32.dll",0
; browseName db a"SHBrowseForFolderW",0
fontFamily db "仿宋",0
fontFamili db "宋体",0
factor dd 4
szClassName db 'efront.cc/baiplay',0
szCaptionMain db '白前安装程序',0
onekey1 db '一键安装',0
onekey2 db '正在安装',0,0,0
onekey3 db ' 完成 ',0
onekey4 db '一键卸载',0
onekey5 db '正在卸载',0
onekey_rect real4 336,208,100,100
szText db '白前'
titlerect real4 18,20,150,50
logodots real4 464.054, 574.786, 93.042, 57.856, 416.684, 192.928, 393.0, 2.0, 656.528, 27.884, 786.0, 177.952, 786.0, 395.0, 786.0, 612.048, 610.048, 788.0, 393.0, 788.0, 175.952, 788.0, 0.0, 612.048, 0.0, 395.0, 67.346, 325.95, 47.566, 97.362, 47.566, 97.362, 222.956, 95.026, 325.226, 415.644, 464.054, 574.786
closeline real4 480, 30, 480, 0, 420, 0, 420.15, 2.995, 420.598, 5.96, 421.34, 8.866, 422.368, 11.683, 423.673, 14.383, 425.24, 16.939, 427.055, 19.327,429.099, 21.521, 431.352, 23.5, 433.791, 25.244, 436.392, 26.736, 439.129, 27.961, 441.975, 28.907, 444.901, 29.563, 447.878, 29.925
crossline real4 1024, 80.441, 943.559, 0, 512, 431.559, 80.441, 0, 0, 80.441, 431.559, 512, 0, 943.559, 80.441, 1024, 512, 592.441, 943.559, 1024, 1024, 943.559, 592.441, 512, 1024, 80.441
setupline real4 322, 200, 422, 200, 422, 232, 322, 232
r1 real4 1.0
r3 real4 3.0
width_10 real4 6.0
logo_c DotsChangeParam<7.0,5.0,0.78>
close_c DotsChangeParam<10.0,-1.0,1.0>
cross_c DotsChangeParam<454.0,8.0,0.012>
factor_ratio real4 4.0
w_rect SRECT <0,0,480,360>
g_rect real4 -1,-1,481,-1,481,361,-1,361,-1,-1
m_actived dd 0
m_percent real4 -0.0058
m_delta real4 0.003
m_processed real4 -1
m_moved dd 0
m_current dd 0
m_origin dd -1
m_active dd 0
m_left real4 0.0
m_top real4 0.0
m_arrow dd IDC_ARROW
m_hand dd IDC_HAND
m_cursor dd ?
m_folder real4 0,0,0,0
isuninstall dd 0
m_pos POINT <0,0>
close EFRONT_BUTTON<0,0,0,0,0>
setup EFRONT_BUTTON<0,0,0,0,0>
ground EFRONT_BUTTON<0,0,0,0,0>
folder word MAX_PATH dup(?)
buffer word MAX_PATH dup(?)
buffer2 word MAX_PATH dup(?)
program db "ProgramFiles",0
folderTitle db "选择安装目录",0
szErrOpenFile db '无法打开源文件!'
szErrCreateFile db '创建文件失败!',0
hiddensetup dd 0
hiddenmark db "/s"
hiddenmark1 db "/h"
findmark db "*.*"
folder_rect real4 20,320,440,21
hWinMain dd 0
bitmap dd 0
.data?
logoline real4 14400 dup(?)
shcore dd ?
hInstance dd ?
gptoken dd ?
factorProc dd ?
monitorProc dd ?
filelist dd 24000 dup(?)
filecount dd 0
datatotal dd 0
dataindex dd 0
datapassed dd 0
nametotal dd ?
dataoffset dd ?
nameoffset dd ?
namecache dd MAX_PATH dup(?)
datacache dd 36000 dup(?)
datawrite dd 36000 dup(?)
;
;
;
.code
issetting proc
local delta
fld1
fsub m_percent
fdiv m_delta
fistp delta
mov eax,delta
shr eax,31
.if eax
mov eax,0
.else
fld m_processed
fdiv m_delta
fistp delta
mov eax,delta
shr eax,31
.if eax
mov eax,0
.else
mov eax,1
.endif
.endif
ret
issetting endp
setupstart proc
local threadId
invoke issetting
.if eax
ret
.endif
fld m_delta
fstp m_processed;
invoke CreateThread,NULL,0,\
offset _Extract,NULL,\
NULL,addr threadId
invoke CloseHandle,eax
ret
setupstart endp
opensetup proc
local @hFile
local filename[MAX_PATH]:WORD
invoke GetModuleFileName ,0,addr filename, sizeof filename
invoke CreateFile,addr filename,GENERIC_READ,FILE_SHARE_READ,0,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,0
.if eax==INVALID_HANDLE_VALUE
invoke MessageBox,hWinMain,addr szErrOpenFile,NULL,MB_OK or MB_ICONEXCLAMATION
ret
.endif
mov @hFile,eax
ret
opensetup endp
readcount proc h
local buff[8]:byte,readed,b
mov readed,0
invoke SetFilePointer,h,-8,NULL,FILE_END
lea esi,buff
invoke ReadFile,h,esi,sizeof buff,addr readed,0
mov ecx,readed
.if isuninstall
dec ecx
.endif
mov eax,0
mov ebx,0
mov edx,0
.while ecx>0
dec ecx
mov al,BYTE ptr buff[ecx]
push ecx
mov b,eax
and eax,01111111b
mov cl,dl
shl eax,cl
pop ecx
add ebx,eax
mov eax,b
shr eax,7
.break .if !eax
add edx,7
.endw
mov eax,ebx
ret
readcount endp
atow proc srcstart,srcleng,dststart
mov ecx,srcstart
mov edx,ecx
add edx,srcleng
mov ebx,dststart
mov eax,0
.while ecx<edx
mov al,BYTE ptr[ecx]
.if al=='/'
mov WORD ptr[ebx],92
.else
mov WORD ptr[ebx],ax
.endif
add ebx,2
inc ecx
.endw
.if eax
mov WORD ptr[ebx],0
.endif
ret
atow endp
copy proc srcstart,srcleng,dststart
mov ecx,srcstart
mov edx,ecx
add edx,srcleng
mov ebx,dststart
mov eax,0
.while ecx<edx
mov ah,BYTE ptr [ecx]
inc ecx
mov al,BYTE ptr [ecx]
inc ecx
mov WORD ptr[ebx],ax
add ebx,2
.endw
.if eax
mov WORD ptr[ebx],0
.endif
ret
copy endp
initnano proc
invoke lstrcpy,addr namecache,addr folder
invoke foldersize,addr folder
add eax,offset namecache
mov WORD ptr[eax],92
add eax,2
ret
initnano endp
writenano proc h,nametype,nameleng,isfolder,dataleng
local namebuff,namereaded,hdst,fsize
local namecode,databuff,datareaded
mov eax,95555h
invoke GlobalAlloc,GMEM_FIXED or GMEM_ZEROINIT,nameleng
mov namebuff,eax
mov eax,nameleng
invoke SetFilePointer,h,nameoffset,NULL,FILE_END
invoke ReadFile,h,namebuff,nameleng,addr namereaded,0
invoke initnano
mov fsize,eax
.if nametype==0
invoke atow,namebuff,nameleng,fsize
.else
invoke copy,namebuff,nameleng,fsize
.endif
.if isfolder
.if isuninstall
invoke RemoveDirectory,addr namecache
.else
invoke CreateDirectory,addr namecache,NULL
.endif
.else
.if isuninstall
invoke DeleteFile,addr namecache
.else
mov databuff,eax
invoke CreateFile,addr namecache,GENERIC_WRITE,FILE_SHARE_READ,0,CREATE_ALWAYS,FILE_ATTRIBUTE_NORMAL,0
.if eax==INVALID_HANDLE_VALUE
ret
.endif
mov hdst,eax
invoke decodePackW,h,dataoffset,dataleng,hdst,addr datapassed
invoke CloseHandle,hdst
.endif
.endif
invoke GlobalFree,namebuff
invoke GlobalFree,namecode
ret
writenano endp
processed proc count
local current,total
finit
fild datatotal
.if !isuninstall
fiadd uninstallSize
.endif
fistp total
fild dataindex
fiadd datapassed
fist current
fidiv total
fstp m_processed
ret
processed endp
readindex proc h
local count,buffname[MAX_PATH]:WORD,
local buffstart,buff,list
local buffleng,listleng,nameleng,dataleng,nametype,isfolder
local readed
local temp
invoke readcount,h
mov count,eax
mov eax,-8
add eax,ecx
sub eax,count
mov buffstart,eax
invoke GlobalAlloc,GMEM_FIXED or GMEM_ZEROINIT,count
.if !eax
invoke MessageBox,NULL,addr szErrOpenFile,addr szCaptionMain,MB_OK
ret
.endif
mov buff,eax
mov eax,count
shl eax,3
invoke GlobalAlloc,GMEM_FIXED or GMEM_ZEROINIT,eax
.if !eax
invoke MessageBox,NULL,addr szErrOpenFile,addr szCaptionMain,MB_OK
ret
.endif
mov list,eax
invoke SetFilePointer,h,buffstart,NULL,FILE_END
invoke ReadFile,h,buff,count,addr readed,0
mov eax,readed
invoke decodeLEB128,buff,readed,list
mov listleng,eax
mov nametotal,0
mov datatotal,0
mov eax,10008h
mov ecx,0
mov edx,listleng
.while ecx<edx
mov eax,list
mov ebx,ecx
shl ebx,2
add ebx,eax
mov eax,DWORD ptr[ebx]
mov nameleng,eax
and eax,1
mov nametype,eax
mov eax,nameleng
shr eax,1
mov nameleng,eax
add ebx,4
mov eax,DWORD ptr[ebx]
.if eax==0
mov isfolder,1
mov dataleng,0
.else
mov isfolder,0
dec eax
mov dataleng,eax
.endif
mov eax,datatotal
add eax,dataleng
mov datatotal,eax
mov eax,nametotal
add eax,nameleng
mov nametotal,eax
mov ebx,ecx
shl ebx,3
add ebx,offset filelist
mov eax,nametype
mov DWORD ptr[ebx],eax
mov eax,nameleng
mov DWORD ptr[ebx+4],eax
mov eax,isfolder
mov DWORD ptr[ebx+8],eax
mov eax,dataleng
mov DWORD ptr[ebx+12],eax
add ecx,2
.endw
shr edx,1
mov filecount,edx
mov eax,buffstart
sub eax,nametotal
mov nameoffset,eax
mov uninstallRest,eax
sub eax,datatotal
mov dataoffset,eax
invoke SetFilePointer,h,dataoffset,NULL,FILE_END
add eax,1
sub eax,uninstallRest
mov uninstallSize,eax
invoke GlobalFree,buff
invoke GlobalFree,list
ret
readindex endp
parseCommandLine proc
invoke GetCommandLine
local paramstart
local param2start
local inquote
mov ecx,eax
mov eax,0
mov inquote,0
mov paramstart,0
mov param2start,0
mov edx,ecx
add edx,MAX_PATH
add edx,10
.while ecx<edx
mov ax,WORD ptr[ecx]
.if eax==0
.break
.endif
.if eax==39 || eax==34
.if eax==inquote
mov inquote,0
add ecx,2
.else
mov inquote,eax
.endif
.endif
.if !inquote
mov ebx,ecx
.if !paramstart
.while eax==32 || eax==9
add ebx,2
mov ax,WORD ptr[ebx]
mov paramstart,ebx
.endw
.elseif !param2start
.while eax==32 || eax==9
add ebx,2
mov ax,WORD ptr[ebx]
mov param2start,ebx
.endw
.endif
.if ebx>ecx
sub ebx,2
mov ecx,ebx
.endif
.endif
add ecx,2
.endw
.if paramstart && ecx>paramstart
mov eax,paramstart
mov ax,WORD ptr[eax]
.if ax==47
mov hiddensetup,1
.if param2start
invoke lstrcpy,offset buffer2,param2start
.endif
.elseif param2start
invoke lstrcpy,offset buffer2,paramstart
mov eax,paramstart
mov ebx,param2start
sub ebx,eax
mov eax,offset buffer2
add eax,ebx
sub eax,2
mov ebx,eax
mov ax,WORD ptr[ebx]
.while ax==32||ax==9
mov WORD ptr[ebx],0
sub ebx,2
mov ax,WORD ptr[ebx]
.endw
mov eax,param2start
mov ax,WORD ptr[eax]
.if ax==47
mov hiddensetup,1
.endif
.else
invoke lstrcpy,offset buffer2,paramstart
.endif
.endif
ret
parseCommandLine endp
folderpath proc p,s,d
local a
mov eax,p
mov ecx,0
mov edx,s
mov a,0
.while ecx<edx
mov ebx,eax
add ebx,ecx
mov bx,WORD ptr[ebx]
and bx,0ffh
.if ebx=='\'||ebx=='/'
mov a,ecx
.endif
add ecx,2
.endw
invoke lstrcpy,d,p
lea eax,d
add eax,a
mov WORD ptr[eax],0
ret
folderpath endp
programinit proc
local h
local filename[MAX_PATH]:WORD
invoke opensetup
mov h,eax
invoke readcount,h
.if !eax
invoke GetModuleFileName,0,addr filename,sizeof filename
invoke foldersize,addr filename
lea ebx,filename
add eax,ebx
.while WORD ptr[eax]!='\' && eax>ebx
sub eax,2
.endw
mov WORD ptr[eax],0
invoke lstrcpy,addr buffer2,addr filename;
invoke lstrcpy,addr onekey1,addr onekey4
invoke lstrcpy,addr onekey2,addr onekey5
mov isuninstall,1
.else
mov isuninstall,0
.endif
invoke CloseHandle,h
ret
programinit endp
_Extract proc lParam
local h,e,nametype,nameleng,isfolder,dataleng
local flash:FLASHWINFO
local delta
local writed
local hdata,readed,hdst
mov writed,0
invoke opensetup
mov h,eax
invoke readindex,h
.if isuninstall
mov ecx,filecount
shl ecx,4
mov edx,0
mov delta,3
fld m_delta
fimul delta
fstp m_delta
mov eax,nameoffset
add eax,nametotal
mov nameoffset,eax
.else
mov ecx,0
mov delta,16
mov edx,filecount
shl edx,4
.endif
.while ecx!=edx
mov eax,10000h
.if isuninstall
sub ecx,16
.endif
mov ebx,DWORD ptr[ecx+offset filelist]
mov nametype,ebx
mov ebx,DWORD ptr[ecx+offset filelist+4]
mov nameleng,ebx
mov ebx,DWORD ptr[ecx+offset filelist+8]
mov isfolder,ebx
mov ebx,DWORD ptr[ecx+offset filelist+12]
mov dataleng,ebx
.if !isuninstall
add ecx,16
.endif
push ecx
push edx
shr ecx,4
invoke processed,ecx
.if isuninstall
mov eax,nameoffset
sub eax,nameleng
mov nameoffset,eax
.endif
invoke writenano,h,nametype,nameleng,isfolder,dataleng
.if !isuninstall
mov eax,nameoffset
add eax,nameleng
mov nameoffset,eax
mov eax,dataoffset
add eax,dataleng
mov dataoffset,eax
mov eax,dataindex
add eax,dataleng
mov dataindex,eax
.endif
pop edx
pop ecx
.endw
.if !isuninstall && uninstallSize
invoke GlobalAlloc,GMEM_FIXED or GMEM_ZEROINIT,uninstallSize
mov hdata,eax
invoke SetFilePointer,h,0,NULL,FILE_BEGIN
mov ecx,uninstallSize
sub ecx,1
add ecx,uninstallRest
invoke ReadFile,h,hdata,ecx,addr readed,0
invoke SetFilePointer,h,uninstallRest,NULL,FILE_END
mov ecx,0
sub ecx,uninstallRest
mov ebx,hdata
add ebx,uninstallSize
add ebx,uninstallRest
dec ebx
invoke ReadFile,h,ebx,ecx,addr readed,0
mov ecx,uninstallSize
dec ecx
add ecx,hdata
mov BYTE ptr[ecx],0
invoke initnano
invoke lstrcpy,eax,addr uninstallName
invoke CreateFile,addr namecache,GENERIC_WRITE,FILE_SHARE_READ,0,CREATE_ALWAYS,FILE_ATTRIBUTE_NORMAL,0
mov hdst,eax
invoke WriteFile,hdst,hdata,uninstallSize,addr writed,NULL
mov uninstallSize,0
invoke processed,0
invoke GlobalFree,hdata
invoke CloseHandle,hdst
.endif
invoke CloseHandle,h
invoke ShellExecute,NULL,addr shellOperator,addr assocname,NULL,addr folder,SW_HIDE
.if hWinMain
mov flash.cbSize,sizeof flash
mov eax,hWinMain
mov flash.hwnd,eax
mov flash.dwFlags,FLASHW_TIMERNOFG
mov flash.uCount,1
mov flash.dwTimeout,0
invoke FlashWindowEx,addr flash
.endif
fld1
fstp m_processed
ret
_Extract endp
foldersize proc f
mov ebx, f
mov ecx,0
.while TRUE
mov ax,WORD ptr[ebx]
.break .if ecx>MAX_PATH
.if ax==0
mov eax,ecx
shl eax,1
.break
.endif
add ebx,2
inc ecx
.endw
ret
foldersize endp
folderfind proc mark
local finded:WIN32_FIND_DATA,temppath[MAX_PATH]:WORD
local h,s
invoke lstrcpy,addr temppath,offset buffer
invoke lstrcat,addr temppath,mark
invoke FindFirstFile,addr temppath,addr finded
.if eax!=INVALID_HANDLE_VALUE
.if finded.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY
mov h,eax
mov s,0
.repeat
mov eax,s
add eax,1
mov s,eax
invoke FindNextFile,h,addr finded
.until (eax==FALSE||s>2)
invoke FindClose,eax
.if s>2
mov eax,1
.else
mov eax,0
.endif
.else
mov eax,1
.endif
.else
mov eax,0
.endif
ret
folderfind endp
folderinit proc
local bufferat
invoke lstrcpy,offset buffer,offset buffer2
invoke foldersize,offset buffer
add eax,offset buffer
mov ebx,eax
.if WORD ptr [ebx-2]!="\"
mov WORD ptr [ebx],"\"
add ebx,2
mov WORD ptr [ebx],0
.endif
mov bufferat,ebx
invoke folderfind,addr findmark
.if eax
invoke folderfind,addr assocname
mov ebx,bufferat
.if !eax
mov ecx,offset szText
mov ax,WORD ptr [ecx]
mov WORD ptr [ebx],ax
mov ax,WORD ptr [ecx+2]
mov WORD ptr [ebx+2],ax
mov WORD ptr [ebx+4],0
add ebx,4
.endif
mov bufferat,ebx
.endif
.if WORD ptr[ebx-2]=="\"
mov ebx,bufferat
mov WORD ptr[ebx-2],0
.endif
invoke lstrcpy,offset folder,offset buffer
ret
folderinit endp
choosingfn proc hWnd,uMsg,lParam,lpData
local pszPath[MAX_PATH] :WORD
mov eax,uMsg
.if eax==BFFM_INITIALIZED
invoke SendMessage,hWnd,BFFM_SETSELECTION,TRUE,addr folder
.elseif eax==BFFM_SELCHANGED
; ret
invoke SHGetPathFromIDList,lParam,addr buffer2
invoke SendMessage,hWnd,BFFM_SETSTATUSTEXT,0,addr pszPath
.endif
mov eax,0
ret
choosingfn endp
choosedist proc,hWnd
local info:BROWSEINFO,image,locat
; invoke foldersize
; invoke SHGetFolderLocation,hWinMain,offset folder,eax ,addr locat,MAX_PATH
; mov locat,eax
mov eax,hWnd
mov info.hwndOwner,eax
mov info.pidlRoot,NULL
mov info.pszDisplayName,offset buffer
mov info.lpszTitle,offset folderTitle
mov info.lpfn,choosingfn
mov info.ulFlags,BIF_EDITBOX or BIF_NEWDIALOGSTYLE or BIF_RETURNONLYFSDIRS or BIF_STATUSTEXT
mov info.iImage,0
mov info.lParam,0
mov info.ulFlags,0
invoke SHBrowseForFolder,addr info
ret
choosedist endp
brizer_t proc _a,_b,_c,_d,_t
local sum
local t1,t2,t3,s1,s2,s3
fld _t
fst t1
fmul _t
fst t2
fmul _t
fstp t3
fld1
fsub _t
fst s1
fmul s1
fst s2
fmul s1
fstp s3
fld _a
fmul s3
fld _b
fmul r3
fmul t1
fmul s2
fadd
fld _c
fmul r3
fmul t2
fmul s1
fadd
fld _d
fmul t3
fadd
fstp sum
mov eax,sum
ret
brizer_t endp
brizer proc x1,y1,x2,y2,x3,y3,x4,y4,b
local count,total,linesize,d
local t:REAL4
mov eax,b
xor edx,edx
mov ebx,24
div ebx
mov count,eax
mov eax,sizeof logodots
div ebx
xor edx,edx
mov total,eax
mov eax,sizeof logoline
mov ebx,total
div ebx
xor edx,edx
mov linesize,eax
mov ebx,count
mul ebx
mov ebx,eax
add ebx,offset logoline
mov ecx,0
mov eax,0
.while ecx<linesize
mov d,ecx
finit
fild d
fidiv linesize
fstp t
.if eax==0
invoke brizer_t,x1,x2,x3,x4,t
mov REAL4 ptr[ebx],eax
mov eax,1
.elseif
invoke brizer_t,y1,y2,y3,y4,t
mov REAL4 ptr[ebx],eax
mov eax,0
.endif
add ebx,4
add ecx,4
.endw
ret
brizer endp
_DrawText proc @gp,color,textoffset,fSize,rect,fFamily,rectref
local font,format,brush,family,sz,x,y,r,textlength
fild fSize
fstp sz
invoke GdipCreateFontFamilyFromName,fFamily,NULL,addr family
invoke GdipCreateFont, family,sz,0,0,addr font
invoke GdipCreateStringFormat, 00007400h,0,addr format
invoke GdipSetStringFormatTrimming,format,5
invoke GdipCreateSolidFill,color,addr brush
invoke foldersize,textoffset
shr eax,1
mov textlength,eax
.if rectref
invoke GdipMeasureString,@gp,textoffset,textlength,font,rect,format,rectref,addr x,addr y
.endif
invoke GdipDrawString,@gp,textoffset,textlength,font,rect,format,brush
invoke GdipDeleteFontFamily,family
invoke GdipDeleteFont,font
invoke GdipDeleteBrush,brush
invoke GdipDeleteStringFormat,format
ret
_DrawText endp
_DrawButton proc gp,b:EFRONT_BUTTON,fillcolor,bordercolor,outline,outcolor
local pen,brush
.if b.back!=0
invoke GdipCreateSolidFill,fillcolor,addr brush
invoke GdipFillPath,gp,brush,b.back
invoke GdipDeleteBrush,brush
.endif
.if b.text!=0
invoke _DrawText,gp,bordercolor,b.text,b.clip,b.rect,offset fontFamili,0
.elseif b.clip!=0
invoke GdipCreateSolidFill,bordercolor,addr brush
invoke GdipFillPath,gp,brush,b.clip
invoke GdipDeleteBrush,brush
.endif
.if outline!=0
invoke GdipCreatePen1,outcolor,outline,0,addr pen
invoke GdipDrawPath,gp,pen,b.back
invoke GdipDeletePen,pen
.endif
ret
_DrawButton endp
_CreatePath proc doffset,dlen
local path,dend
mov eax,dlen
add eax,7
shr eax,3
mov dend,eax
invoke GdipCreatePath,0,addr path
invoke GdipAddPathPolygon,path,doffset,dend
invoke GdipSetPathFillMode,path,1
mov eax,path
ret
_CreatePath endp
_ChangeLine proc @index:DWORD,@leng:DWORD,@c:DotsChangeParam
local x,y,r
local endl,@factor:REAL4
fld1
fstp @factor
mov eax,@index
add eax,@leng
mov endl,eax
fld @c.x
fmul @factor
fstp x
fld @c.y
fmul @factor
fstp y
fld @c.r
fmul @factor
fstp r
mov ebx,@index
mov eax,0
.while ebx <endl
finit
fld REAL4 ptr[ebx]
fmul r
.if eax==0
mov eax,1
fadd x
.elseif
fadd y
mov eax,0
.endif
fstp REAL4 ptr[ebx]
add ebx,4
.endw
ret
_ChangeLine endp
_Brizerline proc
local enddots
mov ebx,offset logodots
mov ecx,0
.while ecx<sizeof logodots
push ebx
push ecx
invoke brizer,REAL4 ptr[ebx],REAL4 ptr[ebx+4],\
REAL4 ptr[ebx+8],REAL4 ptr[ebx+12],\
REAL4 ptr[ebx+16],REAL4 ptr[ebx+20],\
REAL4 ptr[ebx+24],REAL4 ptr[ebx+28],ecx
pop ecx
pop ebx
add ebx,24
add ecx,24
.endw
ret
_Brizerline endp
drawtitle proc @gp
invoke _DrawText,@gp,0ff629436h,offset szText,42,offset titlerect,offset fontFamily,0
ret
drawtitle endp
drawlogo proc @gp
local count,percented,pen
mov count,sizeof logoline
fild count
fmul m_percent
fistp percented
.if isuninstall
invoke GdipCreatePen1,0ff336600h,width_10,0,addr pen
.else
invoke GdipCreatePen1,0ffd4d6d6h,width_10,0,addr pen
.endif
mov eax,percented
shr eax,31
.if eax
invoke GdipResetPath,ground.clip
mov ecx,sizeof logoline
shr ecx,3
add eax,offset logoline
invoke GdipAddPathLine2,ground.clip,eax,ecx
invoke GdipDrawPath,@gp,pen,ground.clip
ret
.endif
.if percented>sizeof logoline
mov percented,sizeof logoline
.endif
.if isuninstall
mov eax,sizeof logoline
sub eax,percented
.else
mov eax,percented
.endif
shr eax,3
mov percented,eax
invoke GdipSetPenColor,pen,0ffd4d6d6h
invoke GdipResetPath,ground.clip
mov eax,percented
shl eax,3
add eax,offset logoline
mov ebx,sizeof logoline
shr ebx,3
sub ebx,percented
invoke GdipAddPathLine2,ground.clip,eax,ebx
invoke GdipDrawPath,@gp,pen,ground.clip
invoke GdipSetPenColor,pen,0ff336600h
invoke GdipResetPath,ground.clip
invoke GdipAddPathLine2,ground.clip,offset logoline,percented
invoke GdipDrawPath,@gp,pen,ground.clip
invoke GdipDeletePen,pen
ret
drawlogo endp
drawclose proc @gp
.if m_current==offset close
.if m_actived
invoke _DrawButton,@gp,close,0ff882200h,0ffffffffh,0,0
.else
invoke _DrawButton,@gp,close,0ffcc4400h,0ffffffffh,0,0
.endif
.else
invoke _DrawButton,@gp,close,0ff323634h,0ff336622h,1,0ff666666h
.endif
ret
drawclose endp
drawsetup proc @gp
.if m_current==offset setup
.if m_actived||(setup.text==offset onekey2)
invoke _DrawButton,@gp,setup,0ff325614h,0ff629436h,2,0ff629436h
.else
invoke _DrawButton,@gp,setup,0ff327624h,0ffd2f4c6h,2,0ff629436h
.endif
.else
invoke _DrawButton,@gp,setup,0ff426426h,0ffc2e496h,2,0ff629436h
.endif
ret
drawsetup endp
drawsleep proc @gp
local color
.if m_current==offset folder
.if m_actived
mov color,0ff922416h
.else
mov color,0ffc24436h
.endif
.else
mov color,0ff629436h
.endif
invoke _DrawText,@gp,color,offset folder,16,offset folder_rect,offset fontFamili,offset m_folder
ret
drawsleep endp
drawfolder proc @gp
local tback:EFRONT_BUTTON,path,left,top,right,bottom
mov eax,offset m_folder
fld REAL4 ptr[eax+12]
fistp bottom
.if bottom!=0
fld REAL4 ptr[eax]
fstp left
fld REAL4 ptr[eax+4]
fstp top
fld REAL4 ptr[eax+8]
fadd left
fstp right
fld REAL4 ptr[eax+12]
fadd top
fstp bottom
invoke GdipCreatePath,0,addr path
invoke GdipAddPathLine,path,left,top,right,top
invoke GdipAddPathLine,path,right,top,right,bottom
invoke GdipAddPathLine,path,right,bottom,left,bottom
invoke GdipAddPathLine,path,left,bottom,left,top
mov eax,path
mov tback.back,eax
mov tback.clip,0
mov tback.text,0
invoke _DrawButton,@gp,tback,0fff2f6f4h,0,0,0
invoke GdipDeletePath,path
invoke drawlogo,@gp
.endif
invoke drawsleep,@gp
ret
drawfolder endp
isinfolder proc
local temp
mov ebx,offset m_folder
fld REAL4 ptr[ebx]
fsub m_left
fstp temp
mov eax,temp
shr eax,31
.if eax==0
ret
.endif
fld REAL4 ptr [ebx+4]
fsub m_top
fstp temp
mov eax,temp
shr eax,31
.if eax==0
ret
.endif
fld REAL4 ptr[ebx]
fadd REAL4 ptr[ebx+8]
fsub m_left
fstp temp
mov eax,temp
shr eax,31
.if eax==1
mov eax,0
ret
.endif
fld REAL4 ptr[ebx+4]
fadd REAL4 ptr[ebx+12]
fsub m_top
fstp temp
mov eax,temp
shr eax,31
.if eax==1
mov eax,0
ret
.endif
mov eax,1
ret
isinfolder endp
_CreateShapes proc @gp
invoke _CreatePath,addr crossline,sizeof crossline
mov close.clip,eax
invoke _CreatePath,addr closeline,sizeof closeline
mov close.back,eax
invoke _CreatePath,addr setupline,sizeof setupline
mov setup.back,eax
mov setup.text,offset onekey1
mov setup.clip,16
mov setup.rect,offset onekey_rect
invoke _CreatePath,addr logoline,sizeof logoline
mov ground.clip,eax
invoke _CreatePath,addr g_rect,sizeof g_rect
mov ground.back,eax
invoke _DrawButton,@gp,ground,0ff323634h,0fff2f6f4h,0,0
invoke drawlogo,@gp
invoke drawclose,@gp
invoke drawsetup,@gp
invoke drawtitle,@gp
invoke drawsleep,@gp
ret
_CreateShapes endp
_DeleteShapes proc
invoke GdipDeletePath,close.clip
invoke GdipDeletePath,close.back
invoke GdipDeletePath,setup.back
invoke GdipDeletePath,ground.clip
invoke GdipDeletePath,ground.back
ret
_DeleteShapes endp
_SetCursor proc
local temp
fld m_processed
fchs
fdiv m_delta
fistp temp
mov eax,temp
shr eax,31
.if eax
ret
.endif
mov eax,m_cursor
.if m_current==offset folder
.if eax!=m_hand
mov eax,m_hand
mov m_cursor,eax
invoke SetCursor,eax
.endif
.else
.if (eax!=m_arrow)
mov eax,m_arrow
mov m_cursor,eax
invoke SetCursor,eax
.endif
.endif
ret
_SetCursor endp
_UpdateCursor proc hWnd
local r:RECT;
local x,y
local p:POINT
invoke GetCursorPos,addr p
invoke GetWindowRect,hWnd,addr r
mov eax,p.x
sub eax,r.left
mov x,eax
mov eax,p.y
sub eax,r.top
mov y,eax
fild x
fmul factor_ratio
fidiv factor
fstp m_left
fild y
fmul factor_ratio
fidiv factor
fstp m_top
ret
_UpdateCursor endp
_Frame proc hWnd
local @gp,@hDc,dc
local @hGdi
local ratio :REAL4
local delta
local matrix
local isIn
invoke GetDC,hWnd;
mov dc,eax
invoke CreateCompatibleDC,dc
mov @hDc,eax
.if bitmap==0
invoke CreateCompatibleBitmap,dc,w_rect.w,w_rect.h
mov bitmap,eax
invoke BitBlt,@hDc,0,0,w_rect.w,w_rect.h,dc,0,0,SRCCOPY
.endif
invoke SelectObject,@hDc,bitmap
; mov eax,dc
finit
fild factor
fdiv factor_ratio
fstp ratio
invoke GdipCreateFromHDC,@hDc,addr @gp
invoke GdipSetTextRenderingHint,@gp,3
invoke GdipSetSmoothingMode,@gp,4
invoke GdipCreateMatrix,addr matrix
invoke GdipScaleMatrix,matrix,ratio,ratio,1
invoke GdipSetWorldTransform,@gp,matrix
invoke GdipDeleteMatrix,matrix
.if close.clip==0
invoke _CreateShapes,@gp
jmp @F
.endif
finit
fld m_processed
fsub m_percent
fdiv m_delta
fistp delta
mov eax,delta
shr eax,31
.if eax==0
fld m_percent
fadd m_delta
fstp m_percent
invoke drawlogo,@gp
fld m_percent
mov delta,100
fimul delta
fistp delta
mov eax,delta
.if eax>23
.if eax>=100
mov setup.text,offset onekey3
.else
xor edx,edx
mov bx,10
div bx
mov ebx,offset onekey2
add ax,'0'
add dx,'0'
mov WORD ptr[ebx], 12288
mov WORD ptr[ebx+2], 32
mov WORD ptr[ebx+4],ax
mov WORD ptr[ebx+6],dx
mov WORD ptr[ebx+8],"%"
invoke drawsetup,@gp
.endif
.endif
.endif
call issetting
.if eax
jmp @F
.endif
invoke _UpdateCursor,hWnd
invoke GdipIsVisiblePathPoint,close.back,m_left,m_top,@gp,addr isIn
.if isIn
mov m_current,offset close
.else
invoke GdipIsVisiblePathPoint,setup.back,m_left,m_top,@gp,addr isIn
.if isIn
mov m_current,offset setup
.else
mov m_current,0
invoke isinfolder
.if eax
mov m_current,offset folder
.endif
.endif
.endif
invoke _SetCursor
mov eax,m_current
mov ebx,m_actived
.if eax!=m_origin
.elseif ebx!=m_active
.else
jmp @F
.endif
.if (m_origin==offset close)||(m_current==offset close)
invoke drawclose,@gp
.endif
.if (m_origin==offset setup)||(m_current==offset setup)
invoke drawsetup,@gp
.endif
.if (m_origin==offset folder)||(m_current==offset folder)
invoke drawsleep,@gp
.endif
mov eax,m_current
mov ebx,m_actived
mov m_origin,eax
mov m_active,ebx
@@:
invoke lstrcmp,offset buffer,offset folder
.if eax
invoke folderinit
invoke drawfolder,@gp
.endif
invoke GdipReleaseDC,@gp,@hDc
invoke GdipDeleteGraphics,@gp
invoke BitBlt,dc,0,0,w_rect.w,w_rect.h,@hDc,0,0,SRCCOPY
invoke ReleaseDC,hWnd,dc
invoke DeleteDC,@hDc
ret
_Frame endp
;
;
;
_LeftMove proc hWnd
local p:POINT,tmp
invoke GetCursorPos,addr p
.if m_moved!=1
finit
fild p.x
fisub m_pos.x
fst tmp
fmul tmp
fild p.y
fsub m_pos.y
fst tmp
fmul tmp
fadd
fistp tmp
mov eax,factor
.if tmp>=eax
mov m_moved,1
.else
ret
.endif
.endif
mov eax,p.x
sub eax,m_pos.x
add eax,w_rect.x
mov w_rect.x,eax
mov eax,p.y
sub eax,m_pos.y
add eax,w_rect.y
mov w_rect.y,eax
invoke MoveWindow,hWnd,w_rect.x,w_rect.y,w_rect.w,w_rect.h,FALSE
mov eax,p.x
mov m_pos.x,eax
mov eax,p.y
mov m_pos.y,eax
ret
_LeftMove endp
_LeftDown proc hWnd
local r:RECT
invoke GetCursorPos,addr m_pos
invoke GetWindowRect,hWnd,addr r
mov eax,r.left
mov w_rect.x,eax
mov eax,r.top
mov w_rect.y,eax
mov m_actived,TRUE
mov m_moved,FALSE
ret
_LeftDown endp
_MouseMove proc hWnd
.if m_actived
invoke _LeftMove,hWnd
ret
.endif
invoke _UpdateCursor,hWnd
ret
_MouseMove endp
_LeftUp proc hWnd
.if m_moved
mov m_actived,0
ret
.endif
mov m_moved,0
mov m_active,0
invoke issetting
.if eax
.elseif m_current==offset close
invoke SendMessage,hWnd,WM_CLOSE,NULL,NULL
.elseif m_current==offset setup
.if setup.text==offset onekey1
mov setup.text,offset onekey2
invoke _Frame,hWnd
invoke setupstart
.else
invoke SendMessage,hWnd,WM_CLOSE,NULL,NULL
.endif
.elseif m_current==offset folder
invoke choosedist,hWnd
.endif
mov m_actived,0
ret
_LeftUp endp
_InitFactor proc
local info :MONITORINFO
local p:POINT,tmp,m
invoke GetCursorPos,addr p
invoke MonitorFromPoint,p.x,p.y,MONITOR_DEFAULTTOPRIMARY
mov m,eax
.if m==0
ret
.endif
mov info.cbSize,sizeof info
invoke GetMonitorInfo,m,addr info
mov eax, info.rcMonitor.left
mov ebx, info.rcMonitor.top
mov eax,w_rect.w
mov ebx,w_rect.h
mov ecx,info.rcWork.right
add ecx,info.rcWork.left
sub ecx,eax
mov edx,info.rcWork.bottom
add edx,info.rcWork.top
sub edx,ebx
shr ecx,1
shr edx,1
mov w_rect.x,ecx
mov w_rect.y,edx
ret
_InitFactor endp
_SetFactor proc
local desktop,w,h,w1,h1
invoke GetSystemMetrics,SM_CXSCREEN
mov w,eax
invoke GetSystemMetrics,SM_CYSCREEN
mov h,eax
invoke LoadLibrary,offset shcoreName
mov shcore,eax
invoke GetProcAddress,eax,offset dpiProcName
.if eax != 0
push DWORD ptr 1 ;切换分辨率自动缩放
; push DWORD ptr 2 ;切换分辨率手动缩放
call eax
.endif
invoke GetSystemMetrics,SM_CXSCREEN
mov w1,eax
invoke GetSystemMetrics,SM_CYSCREEN
mov h1,eax
mov eax,w_rect.w
mov ebx,w1
mul ebx
mov ebx,w
div ebx
mov w_rect.w,eax
mov eax,w_rect.h
mov ebx,h1
mul ebx
mov ebx,h
div ebx
mov w_rect.h,eax
mov eax,w1
shl eax,2
mov ebx,w
xor edx,edx
div ebx
mov factor,eax
call _InitFactor
ret
_SetFactor endp
_ProcWinMain proc uses ebx edi esi,hWnd,uMsg,wParam,lParam
local @stPs:PAINTSTRUCT
mov eax,uMsg
.if eax==WM_CREATE
invoke SetTimer,hWnd,1,17,NULL
invoke GetWindowLong,hWnd,GWL_EXSTYLE
invoke SetWindowLong,hWnd,GWL_EXSTYLE,eax
invoke SetLayeredWindowAttributes,hWnd,0,255,2
.elseif eax==WM_LBUTTONDOWN
invoke _LeftDown,hWnd
invoke SetCapture,hWnd
.elseif eax==WM_LBUTTONUP
invoke _LeftUp,hWnd
.elseif eax==WM_MOUSELEAVE
invoke _MouseMove,hWnd
.elseif eax==WM_MOUSEMOVE
invoke _MouseMove,hWnd
; .elseif eax==WM_DPICHANGED_BEFOREPARENT
; invoke _SetFactor
; invoke SetWindowPos,hWnd,NULL,w_rect.x,w_rect.y,w_rect.w,w_rect.h,SWP_NOMOVE
; .elseif eax==WM_DPICHANGED
; invoke _SetFactor
; invoke SetWindowPos,hWnd,NULL,w_rect.x,w_rect.y,w_rect.w,w_rect.h,SWP_NOMOVE
; .elseif eax==WM_GETDPISCALEDSIZE
; invoke _SetFactor
; invoke SetWindowPos,hWnd,NULL,w_rect.x,w_rect.y,w_rect.w,w_rect.h,SWP_NOMOVE
.elseif eax==WM_TIMER
.if dataindex
invoke processed,0
.endif
invoke _Frame,hWnd
.elseif eax==WM_SHOWWINDOW
.elseif eax==WM_SETCURSOR
invoke _SetCursor
.elseif eax== WM_PAINT
; mov eax,hWnd
; .if eax==hWinMain
; mov eax,0
; ret
; .endif
invoke BeginPaint,hWnd,addr @stPs
invoke EndPaint,hWnd,addr @stPs
.elseif eax==WM_CLOSE
call issetting
.if eax
ret
.endif
invoke DestroyWindow,hWnd
invoke PostQuitMessage,NULL
invoke KillTimer,hWnd,1
.else
invoke DefWindowProc,hWnd,uMsg,wParam,lParam
ret
.endif
ret
_ProcWinMain endp
_WinMain proc
local @stWndClass:WNDCLASSEX
local @stMsg:MSG,hWnd
invoke GetModuleHandle,NULL
mov hInstance,eax
;
;
mov @stWndClass.cbSize,sizeof WNDCLASSEX
mov @stWndClass.style, CS_BYTEALIGNWINDOW
mov @stWndClass.lpfnWndProc,offset _ProcWinMain
mov @stWndClass.cbClsExtra,NULL
mov @stWndClass.cbWndExtra,NULL
push hInstance
pop @stWndClass.hInstance
mov @stWndClass.hbrBackground,COLOR_BACKGROUND
mov @stWndClass.lpszMenuName,NULL
mov @stWndClass.lpszClassName,offset szClassName
invoke LoadIcon,hInstance,1000h
mov @stWndClass.hIcon,eax
invoke LoadCursor,NULL,IDC_HAND
mov m_hand,eax
invoke LoadCursor,NULL,IDC_ARROW
mov m_arrow,eax
mov @stWndClass.hCursor,eax
mov @stWndClass.hIconSm,0
invoke RegisterClassEx,addr @stWndClass
invoke CreateWindowEx,0,\
offset szClassName,offset szCaptionMain,\
WS_POPUP,\
w_rect.x,w_rect.y,w_rect.w,w_rect.h,\
NULL,NULL,hInstance,NULL
mov hWnd,eax
mov hWinMain,eax
invoke ShowWindow,eax,SW_SHOWNORMAL
invoke _Frame,hWnd
invoke UpdateWindow,hWnd
.while TRUE
invoke GetMessage,addr @stMsg,NULL,0,0
.break .if eax ==0
invoke TranslateMessage,addr @stMsg
invoke DispatchMessage,addr @stMsg
.endw
mov eax,@stMsg.wParam
ret
_WinMain endp
removeall proc
local info:SHELLEXECUTEINFO
local param[MAX_PATH]:WORD
local direc[MAX_PATH]:WORD
invoke lstrcpy,addr param,addr uninstallParam
invoke foldersize,addr param
mov ebx,eax
lea eax,param
add eax,ebx
sub eax,2
mov WORD ptr[eax],'"'
invoke lstrcat,addr param,addr folder
invoke foldersize,addr param
mov ebx,eax
lea eax,param
add eax,ebx
mov WORD ptr[eax],'"'
mov WORD ptr[eax+2],0
invoke folderpath,addr folder,sizeof folder,addr direc
mov info.cbSize , sizeof info;
mov info.fMask , SEE_MASK_NOCLOSEPROCESS;
mov info.hwnd , NULL;
mov info.lpVerb , NULL;
mov info.lpFile , offset uninstall ;
lea eax,param
mov info.lpParameters , eax;
lea eax,direc
mov info.lpDirectory , eax;
mov info.nShow , SW_HIDE;
mov info.hInstApp , NULL;
invoke ShellExecuteEx,addr info
ret
removeall endp
start:
invoke _ChangeLine,addr logodots,sizeof logodots,logo_c
invoke _ChangeLine,addr closeline,sizeof closeline,close_c
invoke _ChangeLine,addr crossline,sizeof crossline,cross_c
invoke _Brizerline
invoke _SetFactor
;invoke GetEnvironmentVariable,offset program,offset buffer2,MAX_PATH
invoke SHGetSpecialFolderPath,NULL,offset buffer2,CSIDL_PROGRAM_FILES,FALSE
invoke parseCommandLine
invoke programinit
invoke folderinit
.if hiddensetup
invoke _Extract,NULL
.else
invoke GdiplusStartup,offset gptoken,offset gpstart,NULL
call _WinMain
invoke _DeleteShapes
invoke GdiplusShutdown,gptoken
.endif
.if filecount
.if isuninstall
invoke removeall
.endif
.endif
invoke ExitProcess,NULL
end start | 24.483491 | 314 | 0.628697 |
698db5983467670174cf2ec687431611313c9912 | 533 | asm | Assembly | Tables/message_queue_macros.asm | TinfoilAsteroid/EliteNext | 417511cefd3d5c7dd7a46b0354eec801ea2c9ca2 | [
"Unlicense"
] | 9 | 2021-09-29T22:08:15.000Z | 2022-03-23T05:35:43.000Z | Tables/message_queue_macros.asm | TinfoilAsteroid/EliteNext | 417511cefd3d5c7dd7a46b0354eec801ea2c9ca2 | [
"Unlicense"
] | 1 | 2022-01-21T12:35:42.000Z | 2022-01-21T17:47:24.000Z | Tables/message_queue_macros.asm | TinfoilAsteroid/EliteNext | 417511cefd3d5c7dd7a46b0354eec801ea2c9ca2 | [
"Unlicense"
] | 1 | 2022-01-15T10:13:49.000Z | 2022-01-15T10:13:49.000Z |
AnyMessagesMacro: MACRO NoMessageTarget
ld a, (MessageCount)
and a
jr z, NoMessageTarget
ENDM
AnyHyperSpaceMacro: MACRO NoMessageText
ld hl,(InnerHyperCount)
ld a,h
or l
jr z, NoMessageText
ENDM
| 38.071429 | 69 | 0.298311 |
305b2db7b2e1d8c74c075543137c1eabb7b9c07b | 9,181 | asm | Assembly | Transynther/x86/_processed/NONE/_ht_zr_un_/i9-9900K_12_0xa0.log_21829_2.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_ht_zr_un_/i9-9900K_12_0xa0.log_21829_2.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_ht_zr_un_/i9-9900K_12_0xa0.log_21829_2.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 %r15
push %r8
push %rbp
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_normal_ht+0x28c6, %rbx
nop
nop
nop
xor %r8, %r8
mov (%rbx), %cx
nop
and %rcx, %rcx
lea addresses_A_ht+0x7206, %r13
clflush (%r13)
nop
nop
nop
nop
add %r15, %r15
mov (%r13), %cx
nop
nop
nop
nop
xor $29716, %r13
lea addresses_UC_ht+0xcbe6, %rsi
lea addresses_normal_ht+0x16806, %rdi
nop
inc %rbp
mov $42, %rcx
rep movsw
nop
nop
dec %rsi
lea addresses_UC_ht+0x9e86, %rsi
nop
nop
nop
nop
nop
add $23528, %rcx
mov $0x6162636465666768, %r13
movq %r13, %xmm1
vmovups %ymm1, (%rsi)
nop
nop
nop
nop
nop
add %rbp, %rbp
lea addresses_A_ht+0xcb06, %rsi
lea addresses_A_ht+0xd9c6, %rdi
clflush (%rsi)
nop
nop
nop
nop
add %r13, %r13
mov $12, %rcx
rep movsq
nop
nop
nop
nop
nop
and %r13, %r13
lea addresses_UC_ht+0x1eb06, %rdi
nop
dec %rsi
mov $0x6162636465666768, %rbp
movq %rbp, (%rdi)
nop
nop
nop
nop
add $3597, %rcx
lea addresses_WC_ht+0x1c306, %rcx
nop
nop
nop
xor $7865, %r15
mov (%rcx), %esi
nop
nop
and %r8, %r8
lea addresses_normal_ht+0x1c906, %rbx
nop
nop
inc %r13
mov $0x6162636465666768, %rcx
movq %rcx, %xmm0
vmovups %ymm0, (%rbx)
nop
nop
nop
nop
cmp %rbx, %rbx
lea addresses_A_ht+0xf236, %rbp
nop
nop
and %rcx, %rcx
mov $0x6162636465666768, %rsi
movq %rsi, %xmm6
movups %xmm6, (%rbp)
nop
nop
nop
nop
and %rdi, %rdi
lea addresses_UC_ht+0x19606, %r13
clflush (%r13)
nop
nop
and %r8, %r8
mov $0x6162636465666768, %rbp
movq %rbp, %xmm4
and $0xffffffffffffffc0, %r13
vmovntdq %ymm4, (%r13)
nop
nop
dec %rbp
lea addresses_D_ht+0x14992, %rbp
nop
dec %rsi
vmovups (%rbp), %ymm2
vextracti128 $0, %ymm2, %xmm2
vpextrq $1, %xmm2, %rdi
nop
add $48623, %rdi
lea addresses_A_ht+0x17c06, %rbx
nop
xor $51553, %r13
mov $0x6162636465666768, %r15
movq %r15, %xmm2
movups %xmm2, (%rbx)
sub %rbp, %rbp
lea addresses_A_ht+0x10b74, %rsi
sub %r13, %r13
movl $0x61626364, (%rsi)
cmp %r15, %r15
lea addresses_D_ht+0x95c4, %rsi
lea addresses_UC_ht+0x1c57e, %rdi
nop
cmp %r15, %r15
mov $39, %rcx
rep movsb
nop
sub $5981, %r15
lea addresses_WT_ht+0x143c6, %rsi
lea addresses_WT_ht+0x1da06, %rdi
nop
nop
nop
nop
and $36894, %r15
mov $110, %rcx
rep movsl
nop
nop
nop
nop
nop
xor %r15, %r15
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %r8
pop %r15
pop %r13
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r13
push %r14
push %r8
push %rbx
push %rcx
push %rdi
// Load
lea addresses_PSE+0x6f06, %rbx
nop
nop
nop
nop
nop
and %r8, %r8
mov (%rbx), %di
nop
nop
cmp $31216, %rbx
// Store
lea addresses_D+0x558a, %r12
nop
nop
nop
sub $34712, %r13
movl $0x51525354, (%r12)
nop
add %rbx, %rbx
// Store
mov $0x2857c10000000f38, %rdi
nop
inc %rcx
mov $0x5152535455565758, %r8
movq %r8, (%rdi)
nop
nop
nop
nop
sub %r12, %r12
// Store
lea addresses_US+0xe8e6, %rcx
dec %r13
movl $0x51525354, (%rcx)
nop
sub %r8, %r8
// Store
lea addresses_A+0x14306, %r14
nop
nop
cmp %rcx, %rcx
movl $0x51525354, (%r14)
nop
nop
nop
nop
dec %r12
// Faulty Load
lea addresses_WT+0x12306, %r12
nop
add %r13, %r13
vmovups (%r12), %ymm7
vextracti128 $1, %ymm7, %xmm7
vpextrq $0, %xmm7, %rbx
lea oracles, %r14
and $0xff, %rbx
shlq $12, %rbx
mov (%r14,%rbx,1), %rbx
pop %rdi
pop %rcx
pop %rbx
pop %r8
pop %r14
pop %r13
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': True, 'same': False, 'congruent': 0, 'type': 'addresses_WT', 'AVXalign': False, 'size': 4}, 'OP': 'LOAD'}
{'src': {'NT': False, 'same': False, 'congruent': 10, 'type': 'addresses_PSE', 'AVXalign': False, 'size': 2}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 1, 'type': 'addresses_D', 'AVXalign': False, 'size': 4}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_NC', 'AVXalign': False, 'size': 8}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 2, 'type': 'addresses_US', 'AVXalign': False, 'size': 4}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 11, 'type': 'addresses_A', 'AVXalign': False, 'size': 4}}
[Faulty Load]
{'src': {'NT': False, 'same': True, 'congruent': 0, 'type': 'addresses_WT', 'AVXalign': False, 'size': 32}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'NT': False, 'same': True, 'congruent': 6, 'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 2}, 'OP': 'LOAD'}
{'src': {'NT': False, 'same': False, 'congruent': 7, 'type': 'addresses_A_ht', 'AVXalign': False, 'size': 2}, 'OP': 'LOAD'}
{'src': {'same': False, 'congruent': 4, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 8, 'type': 'addresses_normal_ht'}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 3, 'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 32}}
{'src': {'same': False, 'congruent': 9, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 6, 'type': 'addresses_A_ht'}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 8, 'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 8}}
{'src': {'NT': False, 'same': True, 'congruent': 10, 'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 4}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 7, 'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 32}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': True, 'congruent': 4, 'type': 'addresses_A_ht', 'AVXalign': False, 'size': 16}}
{'OP': 'STOR', 'dst': {'NT': True, 'same': False, 'congruent': 5, 'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 32}}
{'src': {'NT': False, 'same': False, 'congruent': 1, 'type': 'addresses_D_ht', 'AVXalign': False, 'size': 32}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 7, 'type': 'addresses_A_ht', 'AVXalign': False, 'size': 16}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 1, 'type': 'addresses_A_ht', 'AVXalign': False, 'size': 4}}
{'src': {'same': False, 'congruent': 1, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 3, 'type': 'addresses_UC_ht'}}
{'src': {'same': False, 'congruent': 1, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 8, 'type': 'addresses_WT_ht'}}
{'65': 1, '49': 2, '64': 2, '00': 21820, '03': 2, '72': 2}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
| 31.227891 | 2,999 | 0.653088 |
c28b34cff0670463023d089ee548867f022ecb2d | 551 | asm | Assembly | programs/oeis/289/A289296.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/289/A289296.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/289/A289296.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A289296: a(n) = (n - 1)*(2*floor(n/2) + 1).
; -1,0,3,6,15,20,35,42,63,72,99,110,143,156,195,210,255,272,323,342,399,420,483,506,575,600,675,702,783,812,899,930,1023,1056,1155,1190,1295,1332,1443,1482,1599,1640,1763,1806,1935,1980,2115,2162,2303,2352,2499,2550,2703,2756,2915,2970,3135,3192,3363,3422,3599,3660,3843,3906,4095,4160,4355,4422,4623,4692,4899,4970,5183,5256,5475,5550,5775,5852,6083,6162,6399,6480,6723,6806,7055,7140,7395,7482,7743,7832,8099,8190,8463,8556,8835,8930,9215,9312,9603,9702
mov $1,$0
gcd $0,2
sub $1,1
add $0,$1
mul $0,$1
| 61.222222 | 455 | 0.722323 |
9520ad5929ca38ee53f91c776f9d3eeaeae81181 | 632 | asm | Assembly | data/pokemon/base_stats/horsea.asm | opiter09/ASM-Machina | 75d8e457b3e82cc7a99b8e70ada643ab02863ada | [
"CC0-1.0"
] | 1 | 2022-02-15T00:19:44.000Z | 2022-02-15T00:19:44.000Z | data/pokemon/base_stats/horsea.asm | opiter09/ASM-Machina | 75d8e457b3e82cc7a99b8e70ada643ab02863ada | [
"CC0-1.0"
] | null | null | null | data/pokemon/base_stats/horsea.asm | opiter09/ASM-Machina | 75d8e457b3e82cc7a99b8e70ada643ab02863ada | [
"CC0-1.0"
] | null | null | null | db DEX_HORSEA ; pokedex id
db 30, 40, 70, 60, 70
; hp atk def spd spc
db WATER, WATER ; type
db 225 ; catch rate
db 83 ; base exp
INCBIN "gfx/pokemon/front/horsea.pic", 0, 1 ; sprite dimensions
dw HorseaPicFront, HorseaPicBack
db BUBBLE, NO_MOVE, NO_MOVE, NO_MOVE ; level 1 learnset
db GROWTH_MEDIUM_FAST ; growth rate
; tm/hm learnset
tmhm TOXIC, TAKE_DOWN, DOUBLE_EDGE, BUBBLEBEAM, WATER_GUN, \
ICE_BEAM, BLIZZARD, RAGE, MIMIC, DOUBLE_TEAM, \
BIDE, SWIFT, SKULL_BASH, REST, SUBSTITUTE, \
SURF
; end
db 0 ; padding
| 26.333333 | 77 | 0.607595 |
09e05999e77b0d0a7eb1a20f2ac7edc137f0d170 | 7,466 | asm | Assembly | Transynther/x86/_processed/US/_zr_/i7-7700_9_0xca_notsx.log_21829_38.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/US/_zr_/i7-7700_9_0xca_notsx.log_21829_38.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/US/_zr_/i7-7700_9_0xca_notsx.log_21829_38.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 %r15
push %r8
push %r9
push %rax
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_WT_ht+0xd6e9, %rsi
lea addresses_WC_ht+0xd7d1, %rdi
nop
nop
nop
nop
xor %r9, %r9
mov $57, %rcx
rep movsq
sub $64526, %rdx
lea addresses_D_ht+0x15f81, %rcx
clflush (%rcx)
nop
nop
nop
nop
nop
cmp $42062, %rax
movl $0x61626364, (%rcx)
add $5219, %rcx
lea addresses_UC_ht+0xe881, %rcx
nop
add $6252, %rsi
movb $0x61, (%rcx)
sub %r9, %r9
lea addresses_D_ht+0xa161, %rsi
lea addresses_D_ht+0x16a41, %rdi
and $14671, %r9
mov $40, %rcx
rep movsq
sub %rax, %rax
lea addresses_UC_ht+0x14de1, %rsi
nop
nop
add %r8, %r8
mov (%rsi), %rcx
nop
and %r8, %r8
lea addresses_WT_ht+0xb161, %rdi
nop
nop
sub $64529, %rdx
movw $0x6162, (%rdi)
nop
sub %rsi, %rsi
lea addresses_normal_ht+0x4161, %r9
nop
nop
nop
nop
xor %rdx, %rdx
mov $0x6162636465666768, %rsi
movq %rsi, %xmm1
movups %xmm1, (%r9)
nop
nop
add $13520, %rdx
lea addresses_WT_ht+0xb881, %rax
nop
nop
nop
nop
add %r9, %r9
mov $0x6162636465666768, %rcx
movq %rcx, (%rax)
nop
nop
nop
nop
and %rsi, %rsi
lea addresses_A_ht+0x5f6d, %rsi
lea addresses_D_ht+0x3a09, %rdi
cmp %r15, %r15
mov $24, %rcx
rep movsb
nop
nop
cmp %r15, %r15
lea addresses_D_ht+0x155c1, %rax
nop
nop
xor $10609, %rcx
movw $0x6162, (%rax)
nop
add $10926, %rdi
lea addresses_A_ht+0x13661, %rsi
lea addresses_normal_ht+0x1ea61, %rdi
nop
nop
inc %r15
mov $38, %rcx
rep movsq
nop
nop
nop
and %rax, %rax
lea addresses_UC_ht+0x18461, %rcx
nop
nop
nop
nop
sub %rax, %rax
mov $0x6162636465666768, %r9
movq %r9, (%rcx)
nop
nop
sub %rax, %rax
lea addresses_UC_ht+0x22e1, %rax
clflush (%rax)
nop
cmp %r9, %r9
and $0xffffffffffffffc0, %rax
vmovntdqa (%rax), %ymm1
vextracti128 $0, %ymm1, %xmm1
vpextrq $1, %xmm1, %r8
nop
nop
cmp %rax, %rax
lea addresses_D_ht+0x12b61, %rcx
clflush (%rcx)
nop
xor %rax, %rax
vmovups (%rcx), %ymm7
vextracti128 $1, %ymm7, %xmm7
vpextrq $1, %xmm7, %r15
nop
nop
nop
nop
inc %r15
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rax
pop %r9
pop %r8
pop %r15
ret
.global s_faulty_load
s_faulty_load:
push %r15
push %r8
push %r9
push %rbx
push %rdx
// Faulty Load
lea addresses_US+0x14961, %rbx
xor %r8, %r8
mov (%rbx), %r9
lea oracles, %r15
and $0xff, %r9
shlq $12, %r9
mov (%r15,%r9,1), %r9
pop %rdx
pop %rbx
pop %r9
pop %r8
pop %r15
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 0, 'same': False, 'type': 'addresses_US'}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 0, 'same': True, 'type': 'addresses_US'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'congruent': 3, 'same': False, 'type': 'addresses_WT_ht'}, 'dst': {'congruent': 4, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'REPM'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 5, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 4, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'STOR'}
{'src': {'congruent': 8, 'same': False, 'type': 'addresses_D_ht'}, 'dst': {'congruent': 4, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'REPM'}
{'src': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 7, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'LOAD'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 4, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 10, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 5, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'STOR'}
{'src': {'congruent': 2, 'same': False, 'type': 'addresses_A_ht'}, 'dst': {'congruent': 3, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'REPM'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 5, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'STOR'}
{'src': {'congruent': 7, 'same': False, 'type': 'addresses_A_ht'}, 'dst': {'congruent': 6, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'REPM'}
{'dst': {'NT': False, 'AVXalign': True, 'size': 8, 'congruent': 6, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'STOR'}
{'src': {'NT': True, 'AVXalign': False, 'size': 32, 'congruent': 7, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'LOAD'}
{'src': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 7, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'}
{'00': 21829}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
| 37.707071 | 2,999 | 0.655371 |
ff7d0df964e4b4ef9902a157a8f2eece8fdac565 | 762 | asm | Assembly | programs/oeis/239/A239462.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/239/A239462.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/239/A239462.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A239462: A239459(n) / n.
; 11,41,91,161,251,361,491,641,811,10001,12101,14401,16901,19601,22501,25601,28901,32401,36101,40001,44101,48401,52901,57601,62501,67601,72901,78401,84101,90001,96101,102401,108901,115601,122501,129601,136901,144401,152101,160001,168101,176401,184901,193601,202501,211601,220901,230401,240101,250001,260101,270401,280901,291601,302501,313601,324901,336401,348101,360001,372101,384401,396901,409601,422501,435601,448901,462401,476101,490001,504101,518401,532901,547601,562501,577601,592901,608401,624101,640001,656101,672401,688901,705601,722501,739601,756901,774401,792101,810001,828101,846401,864901,883601,902501,921601,940901,960401,980101,10000001
add $0,1
mov $1,$0
pow $1,2
lpb $0
div $0,10
mul $1,10
lpe
mov $0,$1
add $0,1
| 58.615385 | 651 | 0.800525 |
41c37c98d7f9d875aa4f26896f9a84f0e7104f32 | 98,351 | asm | Assembly | projects/Links_Awakening_gb_noconfig.windfish/disassembly/bank_18.asm | jverkoey/awaken | 743755248996deb7181ae92f6e60be5656439c44 | [
"Apache-2.0"
] | 68 | 2020-12-16T10:06:48.000Z | 2022-03-29T19:54:01.000Z | projects/Links_Awakening_gb_noconfig.windfish/disassembly/bank_18.asm | jverkoey/awaken | 743755248996deb7181ae92f6e60be5656439c44 | [
"Apache-2.0"
] | 62 | 2020-12-19T04:28:41.000Z | 2021-02-15T22:18:16.000Z | projects/Links_Awakening_gb_noconfig.windfish/disassembly/bank_18.asm | jverkoey/awaken | 743755248996deb7181ae92f6e60be5656439c44 | [
"Apache-2.0"
] | 4 | 2021-01-17T03:51:22.000Z | 2021-01-21T16:26:53.000Z | SECTION "ROM Bank 18", ROMX[$4000], BANK[$18]
db $FA, $16, $C1, $A7, $20, $09, $3C, $EA
db $16, $C1, $3E, $14, $EA, $FF, $D6, $F0
db $EE, $FE, $48, $C2, $78, $43, $CD, $5E
db $43, $CD, $AF, $7C, $F0, $F0, $C7, $2D
db $40, $98, $40, $D9, $40, $CE, $41, $55
db $42, $6E, $42, $A9, $42, $AF, $EA, $01
db $D2, $FA, $49, $DB, $E6, $01, $28, $12
db $F0, $99, $21, $EF, $FF, $96, $C6, $28
db $FE, $50, $CD, $19, $7D, $30, $35, $C3
db $B6, $42, $F0, $99, $FE, $4C, $30, $2C
db $3E, $4C, $E0, $99, $CD, $95, $14, $CD
db $3B, $09, $1E, $0B, $21, $00, $DB, $2A
db $FE, $09, $28, $10, $1D, $7B, $FE, $FF
db $20, $F5, $3E, $DB, $CD, $88, $40, $CD
db $8D, $3B, $70, $C9, $3E, $DC, $CD, $88
db $40, $CD, $8D, $3B, $F0, $E7, $1F, $1F
db $1F, $1F, $E6, $01, $CD, $87, $3B, $C9
db $5F, $F0, $99, $F5, $3E, $10, $E0, $99
db $7B, $CD, $97, $21, $F1, $E0, $99, $C9
db $CD, $7C, $40, $FA, $9F, $C1, $A7, $20
db $37, $CD, $8D, $3B, $FA, $77, $C1, $A7
db $28, $07, $70, $3E, $DE, $CD, $88, $40
db $C9, $FA, $5D, $DB, $FE, $03, $38, $F2
db $FA, $92, $DB, $C6, $2C, $EA, $92, $DB
db $FA, $91, $DB, $CE, $01, $EA, $91, $DB
db $CD, $91, $08, $36, $FF, $CD, $D2, $27
db $CD, $C1, $45, $3E, $01, $EA, $00, $C5
db $C9, $3E, $02, $E0, $A1, $EA, $67, $C1
db $CD, $91, $08, $20, $0D, $3E, $35, $EA
db $68, $D3, $3E, $01, $EA, $15, $D2, $C3
db $8D, $3B, $C9, $3E, $30, $E0, $CD, $3E
db $18, $E0, $CE, $C3, $B5, $44, $3E, $30
db $E0, $CD, $3E, $68, $E0, $CE, $C3, $B5
db $44, $3E, $38, $E0, $CE, $3E, $08, $E0
db $CD, $C3, $09, $44, $3E, $38, $E0, $CE
db $3E, $08, $E0, $CD, $C3, $5E, $44, $C9
db $03, $03, $03, $03, $03, $03, $03, $01
db $02, $04, $03, $01, $02, $04, $03, $01
db $02, $04, $03, $01, $02, $04, $03, $01
db $02, $04, $03, $03, $03, $03, $03, $04
db $03, $01, $02, $04, $03, $01, $02, $04
db $03, $01, $02, $04, $03, $01, $02, $04
db $03, $01, $02, $02, $02, $02, $02, $02
db $02, $02, $01, $01, $05, $05, $05, $05
db $05, $05, $01, $01, $04, $01, $05, $01
db $04, $01, $05, $01, $04, $01, $05, $01
db $04, $01, $05, $01, $04, $01, $05, $05
db $05, $05, $01, $01, $05, $01, $04, $01
db $05, $01, $04, $01, $05, $01, $04, $01
db $05, $01, $04, $01, $05, $01, $04, $04
db $04, $04, $04, $04, $01, $01, $01, $01
db $05, $05, $05, $05, $01, $01, $01, $01
db $04, $01, $05, $01, $04, $01, $05, $01
db $04, $01, $05, $01, $04, $01, $05, $01
db $04, $01, $05, $05, $01, $01, $01, $01
db $05, $01, $04, $01, $05, $01, $04, $01
db $05, $01, $04, $01, $05, $01, $04, $01
db $05, $01, $04, $04, $04, $04, $3E, $02
db $E0, $A1, $EA, $67, $C1, $FA, $11, $D2
db $A7, $20, $20, $FA, $10, $D2, $FE, $00
db $CC, $09, $41, $FA, $10, $D2, $FE, $01
db $CC, $14, $41, $FA, $10, $D2, $FE, $38
db $CC, $F3, $40, $FA, $10, $D2, $FE, $70
db $CC, $FE, $40, $FA, $10, $D2, $C6, $01
db $EA, $10, $D2, $5F, $FA, $11, $D2, $CE
db $00, $EA, $11, $D2, $57, $FE, $06, $20
db $12, $7B, $FE, $20, $20, $0D, $3E, $DD
db $CD, $88, $40, $AF, $EA, $00, $C5, $CD
db $8D, $3B, $C9, $FA, $12, $D2, $3C, $FE
db $1C, $20, $08, $FA, $13, $D2, $3C, $EA
db $13, $D2, $AF, $EA, $12, $D2, $FA, $13
db $D2, $5F, $50, $21, $20, $41, $19, $7E
db $CD, $87, $3B, $21, $5A, $41, $19, $7E
db $EA, $B1, $C3, $21, $94, $41, $19, $7E
db $EA, $B2, $C3, $C9, $C9, $FA, $9F, $C1
db $A7, $20, $10, $EA, $15, $D2, $CD, $91
db $08, $36, $70, $3E, $10, $EA, $68, $D3
db $CD, $8D, $3B, $C3, $7C, $40, $CD, $91
db $08, $20, $0E, $3E, $02, $EA, $4A, $DB
db $21, $49, $DB, $CB, $C6, $CD, $8D, $3B
db $C9, $FE, $08, $20, $06, $35, $3E, $DF
db $CD, $88, $40, $3E, $6C, $E0, $9D, $3E
db $02, $E0, $A1, $F0, $98, $E0, $EE, $F0
db $99, $D6, $0C, $E0, $EC, $11, $6C, $47
db $AF, $E0, $F1, $CD, $D0, $3C, $C3, $7C
db $40, $FA, $9F, $C1, $A7, $20, $0C, $EA
db $67, $C1, $CD, $8D, $3B, $70, $3E, $E0
db $CD, $88, $40, $C3, $7C, $40, $00, $00
db $60, $00, $00, $08, $62, $00, $00, $10
db $64, $00, $00, $18, $66, $00, $10, $00
db $68, $00, $10, $08, $6A, $00, $10, $10
db $6C, $00, $10, $18, $6E, $00, $00, $00
db $70, $00, $00, $08, $72, $00, $00, $10
db $74, $00, $00, $18, $76, $00, $10, $00
db $68, $00, $10, $08, $6A, $00, $10, $10
db $6C, $00, $10, $18, $6E, $00, $00, $00
db $78, $00, $00, $08, $7A, $00, $00, $10
db $7C, $00, $00, $18, $7E, $00, $10, $00
db $68, $00, $10, $08, $6A, $00, $10, $10
db $6C, $00, $10, $18, $6E, $00, $00, $00
db $7E, $20, $00, $08, $7C, $20, $00, $10
db $7A, $20, $00, $18, $78, $20, $10, $00
db $6E, $20, $10, $08, $6C, $20, $10, $10
db $6A, $20, $10, $18, $68, $20, $00, $00
db $76, $20, $00, $08, $74, $20, $00, $10
db $72, $20, $00, $18, $70, $20, $10, $00
db $6E, $20, $10, $08, $6C, $20, $10, $10
db $6A, $20, $10, $18, $68, $20, $F0, $F1
db $17, $17, $17, $17, $17, $E6, $E0, $5F
db $50, $21, $BE, $42, $19, $0E, $08, $CD
db $26, $3D, $3E, $04, $CD, $D0, $3D, $C9
db $21, $10, $C2, $09, $36, $4A, $21, $50
db $C3, $09, $36, $98, $CD, $65, $3B, $CD
db $E9, $43, $CD, $AF, $7C, $F0, $F0, $C7
db $94, $43, $9F, $43, $CD, $ED, $27, $21
db $D0, $C3, $09, $77, $CD, $8D, $3B, $FA
db $15, $D2, $A7, $C2, $B8, $43, $21, $D0
db $C3, $09, $34, $7E, $1E, $00, $E6, $30
db $28, $01, $1C, $7B, $CD, $87, $3B, $C9
db $C9, $58, $00, $58, $20, $5A, $00, $5A
db $20, $5C, $00, $5E, $00, $5E, $20, $5C
db $20, $F0, $00, $50, $00, $F0, $08, $52
db $00, $00, $00, $54, $00, $00, $08, $56
db $00, $F0, $00, $52, $20, $F0, $08, $50
db $20, $00, $00, $56, $20, $00, $08, $54
db $20, $F0, $F1, $FE, $04, $30, $06, $11
db $B9, $43, $C3, $3B, $3C, $D6, $04, $17
db $17, $17, $17, $E6, $F0, $5F, $50, $21
db $C9, $43, $19, $0E, $04, $CD, $26, $3D
db $C9, $CD, $39, $28, $3E, $1B, $EA, $00
db $D6, $21, $01, $D6, $F0, $CF, $C6, $02
db $5F, $22, $F0, $D0, $22, $3E, $85, $22
db $3E, $00, $22, $3E, $04, $22, $3E, $7F
db $22, $3E, $7F, $22, $3E, $06, $22, $3E
db $0C, $22, $7B, $22, $F0, $D0, $C6, $01
db $22, $3E, $85, $22, $3E, $01, $22, $3E
db $7F, $22, $3E, $7F, $22, $3E, $7F, $22
db $3E, $7F, $22, $3E, $0D, $22, $7B, $22
db $F0, $D0, $C6, $02, $22, $3E, $C5, $22
db $3E, $7F, $22, $36, $00, $C9, $CD, $39
db $28, $3E, $1B, $EA, $00, $D6, $21, $01
db $D6, $F0, $CF, $C6, $02, $5F, $22, $F0
db $D0, $C6, $03, $22, $3E, $C5, $22, $3E
db $7F, $22, $7B, $22, $F0, $D0, $C6, $04
db $22, $3E, $85, $22, $3E, $02, $22, $3E
db $7F, $22, $3E, $7F, $22, $3E, $7F, $22
db $3E, $7F, $22, $3E, $0E, $22, $7B, $22
db $F0, $D0, $C6, $05, $22, $3E, $85, $22
db $3E, $03, $22, $3E, $05, $22, $3E, $7F
db $22, $3E, $7F, $22, $3E, $07, $22, $3E
db $0F, $22, $36, $00, $C9, $CD, $39, $28
db $3E, $15, $EA, $00, $D6, $21, $01, $D6
db $F0, $CF, $C6, $02, $5F, $22, $F0, $D0
db $22, $3E, $83, $22, $3E, $00, $22, $3E
db $04, $22, $3E, $06, $22, $3E, $0C, $22
db $7B, $22, $F0, $D0, $C6, $01, $22, $3E
db $83, $22, $3E, $01, $22, $3E, $7F, $22
db $3E, $7F, $22, $3E, $0D, $22, $7B, $22
db $F0, $D0, $C6, $02, $22, $3E, $83, $22
db $3E, $02, $22, $3E, $7F, $22, $3E, $7F
db $22, $3E, $0E, $22, $7B, $22, $F0, $D0
db $C6, $03, $22, $3E, $83, $22, $3E, $03
db $22, $3E, $05, $22, $3E, $07, $22, $3E
db $0F, $22, $36, $00, $C9, $F0, $EC, $FE
db $50, $D2, $E5, $48, $21, $10, $C2, $09
db $36, $3E, $FA, $14, $D2, $A7, $28, $04
db $3D, $EA, $14, $D2, $FA, $18, $D2, $A7
db $28, $04, $3D, $EA, $18, $D2, $CD, $4F
db $48, $CD, $AF, $7C, $F0, $F0, $C7, $53
db $45, $85, $45, $B3, $45, $C2, $46, $55
db $47, $6E, $47, $FA, $49, $DB, $E6, $02
db $28, $0B, $CD, $F5, $7C, $30, $1B, $3E
db $89, $CD, $85, $21, $C9, $F0, $98, $FE
db $30, $38, $0F, $3E, $2F, $E0, $98, $CD
db $95, $14, $3E, $85, $CD, $85, $21, $CD
db $8D, $3B, $F0, $E7, $1F, $1F, $1F, $E6
db $01, $CD, $87, $3B, $C9, $FA, $9F, $C1
db $A7, $20, $1F, $FA, $77, $C1, $A7, $20
db $10, $1E, $0B, $21, $00, $DB, $2A, $FE
db $09, $28, $10, $1D, $7B, $FE, $FF, $20
db $F5, $CD, $8D, $3B, $70, $3E, $8A, $CD
db $85, $21, $C9, $CD, $8D, $3B, $3E, $87
db $C3, $85, $21, $FA, $9F, $C1, $A7, $20
db $1E, $3E, $30, $EA, $68, $D3, $CD, $8D
db $3B, $AF, $EA, $10, $D2, $EA, $11, $D2
db $EA, $12, $D2, $EA, $13, $D2, $EA, $17
db $D2, $EA, $14, $D2, $EA, $18, $D2, $C9
db $00, $00, $00, $00, $00, $00, $00, $00
db $00, $00, $00, $00, $00, $00, $00, $00
db $00, $00, $00, $00, $00, $00, $00, $00
db $01, $02, $03, $04, $00, $00, $00, $00
db $00, $00, $00, $00, $00, $00, $00, $00
db $01, $02, $03, $04, $00, $00, $00, $00
db $00, $00, $00, $00, $00, $00, $00, $00
db $01, $02, $03, $04, $00, $00, $00, $00
db $00, $00, $00, $00, $01, $02, $03, $04
db $00, $00, $00, $00, $00, $00, $02, $01
db $02, $01, $02, $01, $02, $01, $00, $00
db $00, $00, $00, $01, $00, $01, $00, $01
db $00, $01, $00, $01, $00, $01, $00, $01
db $00, $01, $02, $01, $02, $01, $02, $01
db $02, $01, $02, $01, $02, $01, $02, $01
db $02, $01, $02, $01, $02, $01, $02, $01
db $02, $01, $02, $01, $02, $01, $02, $01
db $02, $01, $02, $01, $02, $01, $02, $01
db $02, $01, $02, $01, $02, $02, $02, $02
db $02, $02, $02, $02, $04, $04, $04, $04
db $04, $04, $04, $04, $04, $04, $04, $04
db $02, $03, $02, $03, $02, $03, $02, $03
db $02, $03, $02, $02, $03, $04, $05, $06
db $05, $06, $05, $06, $05, $06, $05, $06
db $05, $06, $05, $06, $05, $06, $04, $02
db $03, $02, $03, $02, $03, $02, $03, $02
db $03, $02, $03, $02, $04, $05, $04, $05
db $03, $02, $03, $02, $03, $02, $03, $02
db $01, $01, $01, $01, $01, $01, $00, $00
db $00, $00, $3E, $02, $E0, $A1, $EA, $67
db $C1, $FA, $10, $D2, $C6, $01, $EA, $10
db $D2, $FA, $11, $D2, $CE, $00, $EA, $11
db $D2, $FA, $11, $D2, $FE, $05, $20, $10
db $FA, $10, $D2, $FE, $F0, $20, $09, $CD
db $8D, $3B, $CD, $91, $08, $36, $20, $C9
db $FA, $12, $D2, $3C, $FE, $14, $20, $08
db $FA, $13, $D2, $3C, $EA, $13, $D2, $AF
db $EA, $12, $D2, $FA, $13, $D2, $5F, $50
db $21, $26, $46, $19, $7E, $CD, $87, $3B
db $21, $D8, $45, $19, $7E, $21, $B0, $C2
db $09, $77, $21, $74, $46, $19, $7E, $EA
db $15, $D2, $FA, $11, $D2, $57, $FA, $10
db $D2, $5F, $FE, $CC, $20, $05, $7A, $FE
db $00, $28, $10, $7B, $FE, $BE, $20, $05
db $7A, $FE, $05, $28, $01, $C9, $3E, $28
db $EA, $14, $D2, $CD, $8C, $08, $36, $28
db $C9, $00, $00, $40, $00, $00, $08, $42
db $00, $00, $10, $44, $00, $CD, $91, $08
db $20, $0A, $36, $70, $3E, $10, $EA, $68
db $D3, $CD, $8D, $3B, $3E, $02, $E0, $A1
db $CD, $7A, $45, $C9, $90, $10, $CD, $7A
db $45, $CD, $91, $08, $20, $0F, $3E, $01
db $EA, $4A, $DB, $21, $49, $DB, $CB, $CE
db $CD, $8D, $3B, $70, $C9, $FE, $08, $20
db $06, $35, $3E, $88, $CD, $85, $21, $3E
db $6C, $E0, $9D, $3E, $02, $E0, $A1, $F0
db $98, $E0, $EE, $F0, $99, $D6, $0C, $E0
db $EC, $11, $6C, $47, $AF, $E0, $F1, $CD
db $D0, $3C, $C9, $00, $00, $50, $00, $00
db $08, $52, $00, $10, $00, $54, $00, $10
db $08, $56, $00, $F8, $10, $58, $00, $08
db $10, $5A, $00, $18, $10, $5C, $00, $00
db $18, $5E, $00, $10, $18, $5E, $40, $00
db $00, $50, $00, $00, $08, $52, $00, $10
db $00, $4A, $00, $10, $08, $4C, $00, $F8
db $10, $58, $00, $08, $10, $4E, $00, $18
db $10, $5C, $00, $00, $18, $5E, $00, $10
db $18, $5E, $40, $00, $00, $50, $00, $00
db $08, $52, $00, $10, $00, $54, $00, $10
db $08, $56, $00, $F8, $10, $60, $00, $08
db $10, $5A, $00, $18, $10, $62, $00, $00
db $18, $5E, $00, $10, $18, $5E, $40, $00
db $00, $46, $00, $00, $08, $48, $00, $10
db $00, $4A, $00, $10, $08, $4C, $00, $F8
db $10, $60, $00, $08, $10, $4E, $00, $18
db $10, $62, $00, $00, $18, $5E, $00, $10
db $18, $5E, $40, $FF, $FF, $FF, $FF, $64
db $00, $66, $00, $64, $40, $66, $40, $66
db $60, $64, $60, $66, $20, $64, $20, $21
db $B0, $C2, $09, $7E, $E0, $F1, $F0, $EC
db $C6, $03, $E0, $EC, $11, $3B, $48, $CD
db $3B, $3C, $3E, $02, $CD, $D0, $3D, $CD
db $BA, $3D, $CD, $8C, $08, $28, $04, $3E
db $03, $18, $05, $21, $B0, $C3, $09, $7E
db $17, $17, $E6, $FC, $5F, $17, $17, $17
db $E6, $E0, $83, $5F, $50, $21, $AB, $47
db $19, $0E, $09, $CD, $26, $3D, $3E, $09
db $CD, $D0, $3D, $CD, $8C, $08, $C8, $F0
db $EE, $D6, $18, $E0, $EE, $F0, $EC, $D6
db $10, $E0, $EC, $21, $49, $47, $0E, $03
db $CD, $26, $3D, $3E, $03, $CD, $D0, $3D
db $C9, $00, $FC, $76, $00, $00, $04, $78
db $00, $00, $0C, $7A, $00, $00, $FC, $7C
db $00, $00, $04, $78, $00, $00, $0C, $7E
db $00, $68, $00, $6A, $00, $6C, $00, $6E
db $00, $70, $00, $70, $20, $6A, $20, $68
db $20, $6E, $20, $6C, $20, $72, $00, $74
db $00, $74, $20, $72, $20, $CD, $FD, $48
db $F0, $E7, $1F, $1F, $1F, $1F, $E6, $01
db $CD, $87, $3B, $FA, $15, $D2, $A7, $28
db $03, $CD, $87, $3B, $C9, $FA, $14, $D2
db $A7, $28, $20, $F0, $EE, $D6, $18, $E0
db $EE, $F0, $EC, $D6, $10, $E0, $EC, $21
db $49, $47, $0E, $03, $CD, $26, $3D, $3E
db $03, $CD, $D0, $3D, $CD, $BA, $3D, $3E
db $07, $E0, $F1, $F0, $F1, $FE, $02, $30
db $13, $21, $B1, $48, $3D, $20, $03, $21
db $BD, $48, $0E, $03, $CD, $26, $3D, $3E
db $03, $C3, $D0, $3D, $11, $C1, $48, $CD
db $3B, $3C, $3E, $02, $C3, $D0, $3D, $F0
db $00, $70, $00, $F0, $08, $72, $00, $00
db $00, $74, $00, $00, $08, $76, $00, $21
db $47, $49, $0E, $04, $CD, $26, $3D, $F0
db $F0, $C7, $68, $49, $7A, $49, $B2, $49
db $F0, $F8, $E6, $20, $28, $08, $21, $00
db $C2, $09, $7E, $D6, $10, $77, $CD, $8D
db $3B, $C9, $CD, $AF, $7C, $FA, $7F, $DB
db $A7, $C0, $CD, $0E, $7D, $30, $2A, $FA
db $0E, $DB, $FE, $0D, $20, $1E, $3E, $0E
db $EA, $0E, $DB, $3E, $01, $EA, $7F, $DB
db $3E, $04, $E0, $F4, $CD, $91, $08, $36
db $60, $CD, $2B, $7F, $3E, $16, $CD, $85
db $21, $C3, $8D, $3B, $3E, $9C, $CD, $85
db $21, $C9, $3E, $02, $E0, $A1, $EA, $67
db $C1, $CD, $91, $08, $20, $0E, $CD, $8D
db $3B, $36, $01, $3E, $02, $E0, $F2, $AF
db $EA, $67, $C1, $C9, $FE, $40, $20, $05
db $21, $F4, $FF, $36, $11, $30, $09, $21
db $40, $C2, $09, $36, $FC, $CD, $DA, $7D
db $C9, $FF, $FF, $FF, $FF, $54, $00, $54
db $60, $54, $40, $54, $20, $56, $00, $56
db $20, $52, $00, $52, $20, $11, $E1, $49
db $CD, $3B, $3C, $CD, $61, $7D, $CD, $83
db $7D, $F0, $F0, $C7, $0C, $4A, $45, $4A
db $50, $4A, $77, $4A, $21, $40, $C3, $09
db $CB, $F6, $CD, $ED, $27, $E6, $07, $5F
db $50, $21, $5A, $63, $19, $7E, $21, $00
db $C2, $09, $77, $21, $52, $63, $19, $7E
db $21, $10, $C2, $09, $77, $CD, $6E, $64
db $F0, $DA, $FE, $07, $28, $01, $C9, $CD
db $91, $08, $CD, $ED, $27, $E6, $7F, $F6
db $40, $77, $C3, $8D, $3B, $CD, $91, $08
db $20, $05, $36, $60, $CD, $8D, $3B, $C9
db $CD, $91, $08, $20, $10, $36, $60, $21
db $D0, $C3, $09, $70, $21, $40, $C3, $09
db $CB, $B6, $C3, $8D, $3B, $E6, $04, $3E
db $01, $28, $01, $3C, $C3, $87, $3B, $00
db $00, $01, $02, $02, $02, $01, $00, $21
db $D0, $C3, $09, $7E, $34, $1F, $1F, $1F
db $E6, $07, $5F, $50, $21, $6F, $4A, $19
db $7E, $21, $10, $C3, $09, $77, $CD, $B4
db $3B, $CD, $91, $08, $20, $1C, $CD, $8D
db $3B, $70, $AF, $CD, $87, $3B, $3E, $0E
db $E0, $F2, $F0, $EE, $E0, $D7, $F0, $EC
db $C6, $00, $E0, $D8, $3E, $01, $CD, $53
db $09, $C9, $FE, $30, $20, $23, $3E, $7D
db $CD, $01, $3C, $38, $1C, $F0, $D7, $21
db $00, $C2, $19, $77, $F0, $D8, $21, $10
db $C2, $19, $77, $21, $B0, $C2, $19, $34
db $C5, $D5, $C1, $3E, $18, $CD, $25, $3C
db $C1, $CD, $91, $08, $1E, $03, $FE, $50
db $30, $05, $FE, $20, $38, $01, $1C, $7B
db $C3, $87, $3B, $00, $00, $70, $00, $00
db $08, $72, $00, $10, $00, $74, $00, $10
db $08, $74, $20, $00, $00, $72, $20, $00
db $08, $70, $20, $10, $00, $74, $00, $10
db $08, $74, $20, $00, $00, $78, $20, $00
db $08, $76, $20, $10, $00, $74, $00, $10
db $08, $74, $20, $00, $00, $76, $00, $00
db $08, $78, $00, $10, $00, $74, $00, $10
db $08, $74, $20, $7A, $00, $7C, $00, $7E
db $00, $7E, $20, $F0, $F1, $17, $17, $17
db $17, $E6, $F0, $5F, $50, $21, $EB, $4A
db $19, $0E, $04, $CD, $26, $3D, $3E, $04
db $CD, $D0, $3D, $F0, $E7, $1F, $1F, $1F
db $1F, $1F, $E6, $01, $CD, $87, $3B, $CD
db $30, $7E, $C6, $0C, $FE, $18, $30, $0F
db $CD, $20, $7E, $C6, $10, $FE, $20, $30
db $06, $7B, $C6, $02, $CD, $87, $3B, $CD
db $AF, $7C, $F0, $F6, $FE, $A8, $CA, $F6
db $4B, $11, $2B, $4B, $FA, $0E, $DB, $FE
db $09, $30, $03, $11, $2F, $4B, $AF, $E0
db $F1, $F0, $EE, $C6, $18, $E0, $EE, $F0
db $EC, $C6, $08, $E0, $EC, $CD, $3B, $3C
db $CD, $BA, $3D, $CD, $61, $7D, $F0, $F0
db $C7, $A7, $4B, $C5, $4B, $DF, $4B, $CD
db $02, $7D, $30, $18, $FA, $0E, $DB, $FE
db $08, $20, $08, $3E, $67, $CD, $85, $21
db $C3, $8D, $3B, $3E, $66, $38, $02, $3E
db $6B, $CD, $85, $21, $C9, $FA, $9F, $C1
db $A7, $20, $0E, $CD, $8D, $3B, $FA, $77
db $C1, $A7, $20, $05, $3E, $68, $C3, $85
db $21, $70, $3E, $69, $C3, $85, $21, $FA
db $9F, $C1, $A7, $20, $10, $CD, $8D, $3B
db $70, $CD, $98, $08, $3E, $09, $EA, $0E
db $DB, $3E, $0D, $E0, $A5, $C9, $CD, $61
db $7D, $F0, $F0, $C7, $08, $4C, $26, $4C
db $31, $4C, $44, $4C, $5A, $4C, $7D, $4C
db $CD, $02, $7D, $30, $18, $FA, $0E, $DB
db $FE, $09, $20, $08, $3E, $34, $CD, $85
db $21, $C3, $8D, $3B, $3E, $33, $38, $02
db $3E, $39, $CD, $85, $21, $C9, $FA, $9F
db $C1, $A7, $20, $04, $CD, $8D, $3B, $C9
db $C9, $CD, $8D, $3B, $3E, $08, $EA, $95
db $DB, $AF, $EA, $6B, $C1, $EA, $6C, $C1
db $EA, $96, $DB, $C9, $FA, $6B, $C1, $FE
db $04, $20, $0E, $FA, $9F, $C1, $A7, $20
db $08, $CD, $8D, $3B, $3E, $35, $CD, $85
db $21, $C9, $FA, $9F, $C1, $A7, $20, $1C
db $CD, $8D, $3B, $FA, $77, $C1, $A7, $20
db $0D, $CD, $98, $08, $3E, $0A, $EA, $0E
db $DB, $3E, $0D, $E0, $A5, $C9, $35, $3E
db $37, $CD, $85, $21, $C9, $CD, $02, $7D
db $30, $05, $3E, $38, $CD, $85, $21, $C9
db $62, $20, $60, $20, $66, $20, $64, $20
db $6C, $00, $6E, $00, $68, $00, $6A, $00
db $6A, $20, $68, $20, $6C, $00, $6E, $00
db $9A, $10, $9C, $10, $21, $40, $C4, $09
db $7E, $A7, $20, $12, $34, $FA, $69, $DB
db $16, $B1, $E6, $02, $28, $02, $16, $CD
db $F0, $F6, $BA, $C2, $76, $7E, $11, $88
db $4C, $AF, $E0, $E8, $FA, $0E, $DB, $FE
db $0B, $30, $15, $FA, $69, $DB, $E6, $02
db $20, $07, $FA, $0E, $DB, $FE, $0A, $38
db $07, $3E, $01, $E0, $E8, $11, $94, $4C
db $CD, $3B, $3C, $CD, $61, $7D, $F0, $E7
db $1F, $1F, $1F, $1F, $E6, $01, $CD, $87
db $3B, $CD, $AF, $7C, $F0, $F0, $C7, $FF
db $4C, $35, $4D, $55, $4D, $8F, $4D, $CD
db $0E, $7D, $30, $30, $FA, $56, $DB, $FE
db $80, $3E, $78, $28, $10, $F0, $E8, $A7
db $20, $0E, $FA, $0E, $DB, $FE, $0B, $3E
db $5A, $38, $02, $3E, $5F, $C3, $85, $21
db $FA, $0E, $DB, $FE, $0A, $20, $08, $3E
db $5C, $CD, $85, $21, $C3, $8D, $3B, $3E
db $5B, $CD, $85, $21, $C9, $FA, $77, $C1
db $A7, $20, $10, $3E, $01, $E0, $F2, $EA
db $7F, $DB, $CD, $91, $08, $36, $80, $CD
db $8D, $3B, $C9, $3E, $59, $CD, $85, $21
db $CD, $8D, $3B, $70, $C9, $CD, $91, $08
db $20, $11, $3E, $0B, $EA, $0E, $DB, $3E
db $0D, $E0, $A5, $3E, $5D, $CD, $85, $21
db $C3, $8D, $3B, $3E, $02, $E0, $A1, $EA
db $67, $C1, $AF, $E0, $F1, $F0, $EC, $D6
db $0E, $E0, $EC, $F0, $EE, $D6, $04, $E0
db $EE, $11, $A0, $4C, $CD, $3B, $3C, $CD
db $BA, $3D, $3E, $02, $C3, $87, $3B, $FA
db $9F, $C1, $A7, $20, $0D, $EA, $7F, $DB
db $EA, $67, $C1, $CD, $98, $08, $CD, $8D
db $3B, $70, $C9, $00, $F8, $60, $00, $00
db $00, $62, $00, $00, $08, $64, $00, $00
db $F8, $66, $00, $00, $00, $68, $00, $00
db $08, $6A, $00, $02, $00, $06, $04, $F0
db $F1, $CB, $27, $CB, $27, $5F, $CB, $27
db $83, $5F, $50, $21, $A3, $4D, $19, $0E
db $03, $CD, $26, $3D, $F0, $E7, $1F, $1F
db $1F, $1F, $E6, $01, $CD, $87, $3B, $CD
db $61, $7D, $CD, $AF, $7C, $F0, $F0, $C7
db $EE, $4D, $0B, $4E, $32, $4E, $CD, $0E
db $7D, $30, $17, $FA, $0E, $DB, $A7, $1E
db $2A, $28, $0B, $1E, $2C, $FE, $01, $20
db $05, $CD, $8D, $3B, $1E, $2B, $7B, $CD
db $85, $21, $C9, $FA, $9F, $C1, $A7, $20
db $20, $FA, $77, $C1, $A7, $20, $11, $3E
db $02, $EA, $0E, $DB, $3E, $0D, $E0, $A5
db $3E, $28, $CD, $85, $21, $C3, $8D, $3B
db $3E, $27, $CD, $85, $21, $CD, $8D, $3B
db $70, $C9, $FA, $9F, $C1, $A7, $20, $07
db $CD, $98, $08, $CD, $8D, $3B, $70, $C9
db $21, $D0, $C2, $09, $7E, $A7, $C2, $50
db $50, $F0, $F8, $E6, $20, $C2, $76, $7E
db $CD, $E2, $08, $F0, $F0, $C7, $68, $4E
db $81, $4E, $9B, $4E, $C1, $4E, $E8, $4E
db $FF, $4E, $32, $4F, $6F, $4F, $BD, $4F
db $FA, $76, $DB, $21, $F9, $4E, $BE, $20
db $0F, $23, $FA, $77, $DB, $BE, $20, $08
db $23, $FA, $78, $DB, $BE, $CA, $76, $7E
db $C9, $CD, $91, $08, $36, $90, $F0, $EE
db $E0, $D7, $F0, $EC, $E0, $D8, $3E, $02
db $CD, $53, $09, $3E, $06, $E0, $F2, $CD
db $8D, $3B, $C9, $CD, $31, $50, $CD, $91
db $08, $20, $05, $36, $60, $C3, $8D, $3B
db $1E, $FC, $D6, $08, $E6, $10, $28, $02
db $1E, $04, $21, $40, $C2, $09, $73, $21
db $50, $C2, $09, $36, $FC, $CD, $CD, $7D
db $C9, $CD, $31, $50, $CD, $91, $08, $20
db $1E, $36, $48, $3E, $02, $CD, $01, $3C
db $F0, $D7, $21, $00, $C2, $19, $77, $F0
db $D8, $21, $10, $C2, $19, $77, $21, $E0
db $C2, $19, $36, $20, $CD, $8D, $3B, $C9
db $CD, $16, $50, $CD, $91, $08, $20, $08
db $3E, $E1, $CD, $EE, $4F, $CD, $8D, $3B
db $C9, $40, $60, $60, $E2, $E3, $E4, $CD
db $16, $50, $FA, $9F, $C1, $A7, $20, $29
db $21, $B0, $C2, $09, $5E, $16, $00, $7B
db $EA, $01, $D2, $3C, $FE, $03, $20, $01
db $AF, $77, $21, $F9, $4E, $19, $7E, $21
db $76, $DB, $19, $BE, $28, $E2, $21, $FC
db $4E, $19, $7E, $CD, $EE, $4F, $CD, $8D
db $3B, $C9, $CD, $16, $50, $FA, $9F, $C1
db $A7, $C0, $CD, $8D, $3B, $FA, $77, $C1
db $A7, $20, $29, $3E, $CA, $CD, $01, $3C
db $3E, $26, $E0, $F4, $F0, $D7, $21, $00
db $C2, $19, $77, $F0, $D8, $21, $10, $C2
db $19, $77, $21, $D0, $C2, $19, $36, $01
db $21, $E0, $C2, $19, $36, $C0, $CD, $91
db $08, $36, $C0, $C9, $35, $35, $C9, $21
db $FE, $4F, $0E, $03, $CD, $26, $3D, $CD
db $40, $50, $CD, $91, $08, $C0, $CD, $AF
db $3D, $3E, $E5, $CD, $EE, $4F, $CD, $8D
db $3B, $FA, $01, $D2, $5F, $50, $21, $F9
db $4E, $19, $7E, $21, $76, $DB, $19, $77
db $57, $7B, $A7, $20, $12, $21, $4C, $DB
db $72, $16, $0C, $CD, $95, $3E, $AF, $EA
db $4B, $DB, $3E, $0B, $E0, $A5, $C9, $FE
db $01, $20, $05, $21, $4D, $DB, $72, $C9
db $21, $45, $DB, $72, $C9, $CD, $16, $50
db $FA, $9F, $C1, $A7, $20, $27, $21, $40
db $C4, $09, $7E, $A7, $20, $05, $34, $3E
db $3B, $E0, $F2, $CD, $D0, $7D, $21, $50
db $C2, $09, $35, $35, $35, $F0, $EC, $FE
db $F0, $38, $0A, $CD, $2B, $7F, $AF, $EA
db $67, $C1, $CD, $76, $7E, $C9, $5F, $F0
db $99, $F5, $3E, $20, $E0, $99, $7B, $CD
db $97, $21, $F1, $E0, $99, $C9, $00, $FC
db $70, $00, $00, $04, $72, $00, $00, $0C
db $70, $20, $00, $FC, $74, $00, $00, $04
db $76, $00, $00, $0C, $74, $20, $21, $FE
db $4F, $F0, $E7, $E6, $08, $28, $03, $21
db $0A, $50, $0E, $03, $CD, $26, $3D, $18
db $17, $7E, $00, $7E, $20, $7E, $40, $7E
db $60, $F0, $E7, $1F, $1F, $1F, $E6, $01
db $E0, $F1, $11, $29, $50, $CD, $3B, $3C
db $3E, $02, $E0, $A1, $EA, $67, $C1, $3E
db $04, $E0, $9D, $AF, $EA, $9B, $C1, $C9
db $CD, $C9, $50, $CD, $91, $08, $CA, $76
db $7E, $CB, $4F, $3E, $E4, $28, $02, $3E
db $44, $EA, $97, $DB, $C9, $10, $00, $7C
db $00, $10, $08, $7C, $60, $20, $00, $7C
db $00, $20, $08, $7C, $60, $30, $F8, $78
db $00, $30, $00, $7A, $00, $30, $08, $7A
db $20, $30, $10, $78, $20, $40, $F8, $78
db $40, $40, $00, $7A, $40, $40, $08, $7A
db $60, $40, $10, $78, $60, $10, $00, $7C
db $50, $10, $08, $7C, $30, $20, $00, $7C
db $50, $20, $08, $7C, $30, $30, $F8, $78
db $10, $30, $00, $7A, $10, $30, $08, $7A
db $30, $30, $10, $78, $30, $40, $F8, $78
db $50, $40, $00, $7A, $50, $40, $08, $7A
db $70, $40, $10, $78, $70, $0C, $0C, $04
db $02, $F0, $EC, $D6, $05, $E0, $EC, $CD
db $91, $08, $0E, $0C, $FE, $B0, $38, $0D
db $D6, $B0, $1F, $1F, $E6, $03, $5F, $50
db $21, $C5, $50, $19, $4E, $21, $65, $50
db $F0, $E7, $E6, $04, $28, $03, $21, $95
db $50, $CD, $26, $3D, $3E, $04, $CD, $D0
db $3D, $C9, $0E, $00, $11, $FA, $50, $CD
db $D0, $3C, $21, $D0, $C3, $09, $7E, $3D
db $77, $CA, $76, $7E, $CB, $67, $1E, $01
db $28, $02, $1E, $FF, $CB, $47, $20, $07
db $21, $40, $C2, $09, $7E, $83, $77, $C3
db $CD, $7D, $50, $00, $52, $00, $52, $20
db $50, $20, $54, $00, $56, $00, $56, $20
db $54, $20, $CD, $68, $51, $11, $22, $51
db $CD, $3B, $3C, $FA, $0F, $C5, $5F, $50
db $21, $10, $C2, $19, $F0, $EF, $1E, $00
db $BE, $38, $02, $1E, $02, $F0, $E7, $1F
db $1F, $1F, $1F, $1F, $E6, $01, $83, $CD
db $87, $3B, $CD, $AF, $7C, $CD, $0E, $7D
db $30, $05, $3E, $96, $CD, $85, $21, $C9
db $FA, $74, $DB, $A7, $CA, $76, $7E, $C0
db $74, $00, $76, $00, $70, $00, $72, $00
db $76, $20, $74, $20, $72, $20, $70, $20
db $CD, $68, $51, $11, $70, $51, $CD, $3B
db $3C, $FA, $0F, $C5, $5F, $50, $21, $00
db $C2, $19, $F0, $EE, $1E, $00, $BE, $30
db $02, $1E, $02, $F0, $E7, $1F, $1F, $1F
db $1F, $1F, $E6, $01, $83, $CD, $87, $3B
db $18, $B0, $50, $00, $52, $00, $52, $20
db $50, $20, $54, $00, $56, $00, $56, $20
db $54, $20, $58, $00, $5A, $00, $58, $00
db $5A, $00, $5A, $20, $58, $20, $5A, $20
db $58, $20, $FA, $74, $DB, $A7, $C2, $76
db $7E, $11, $AA, $51, $CD, $3B, $3C, $F0
db $E7, $E6, $3F, $20, $08, $CD, $4F, $7E
db $21, $80, $C3, $09, $73, $CD, $D9, $7C
db $CD, $61, $7D, $CD, $06, $7E, $21, $20
db $C3, $09, $35, $35, $21, $10, $C3, $09
db $7E, $A7, $28, $04, $E6, $80, $28, $0E
db $70, $21, $20, $C3, $09, $70, $F0, $E7
db $E6, $1F, $20, $02, $36, $0C, $F0, $EF
db $E0, $EC, $CD, $AF, $7C, $CD, $BA, $3D
db $CD, $0E, $7D, $D0, $1E, $00, $FA, $A5
db $DB, $A7, $20, $0D, $1C, $F0, $F6, $FE
db $CC, $28, $06, $1C, $FE, $CD, $28, $01
db $1C, $FA, $6A, $DB, $E6, $02, $28, $04
db $7B, $C6, $04, $5F, $FA, $73, $DB, $A7
db $28, $05, $3E, $52, $C3, $8E, $21, $7B
db $C6, $4A, $C3, $8E, $21, $78, $00, $7A
db $00, $7C, $00, $7E, $00, $7A, $20, $78
db $20, $7E, $20, $7C, $20, $CD, $68, $51
db $11, $4D, $52, $CD, $3B, $3C, $FA, $0F
db $C5, $5F, $50, $21, $00, $C2, $19, $F0
db $EE, $1E, $00, $BE, $30, $02, $1E, $02
db $F0, $E7, $1F, $1F, $1F, $1F, $1F, $E6
db $01, $83, $CD, $87, $3B, $C3, $5A, $51
db $5A, $20, $58, $20, $5E, $20, $5C, $20
db $58, $00, $5A, $00, $5C, $00, $5E, $00
db $11, $88, $52, $CD, $3B, $3C, $F0, $E7
db $1F, $1F, $1F, $E6, $01, $CD, $87, $3B
db $3E, $02, $E0, $A1, $EA, $67, $C1, $CD
db $06, $7E, $21, $20, $C3, $09, $35, $35
db $21, $10, $C3, $09, $7E, $E6, $80, $E0
db $E8, $28, $06, $70, $21, $20, $C3, $09
db $70, $F0, $F0, $C7, $D4, $52, $01, $53
db $2A, $53, $4F, $53, $CD, $91, $08, $C0
db $21, $40, $C2, $09, $36, $0C, $CD, $DA
db $7D, $F0, $EE, $FE, $20, $20, $0F, $3E
db $01, $CD, $BA, $59, $3E, $01, $E0, $9E
db $C5, $CD, $7C, $08, $C1, $C9, $FE, $48
db $C0, $CD, $91, $08, $36, $40, $C3, $8D
db $3B, $CD, $91, $08, $20, $0D, $3E, $E3
db $CD, $85, $21, $CD, $91, $08, $36, $10
db $CD, $8D, $3B, $F0, $E8, $A7, $28, $11
db $21, $40, $C4, $09, $7E, $35, $A7, $20
db $08, $36, $08, $21, $20, $C3, $09, $36
db $12, $C9, $CD, $13, $53, $FA, $9F, $C1
db $A7, $20, $1B, $CD, $91, $08, $20, $0A
db $36, $10, $3E, $E5, $CD, $85, $21, $C3
db $8D, $3B, $1E, $02, $FE, $08, $30, $02
db $1E, $00, $7B, $CD, $BA, $59, $C9, $CD
db $13, $53, $FA, $9F, $C1, $A7, $20, $69
db $CD, $91, $08, $28, $0C, $1E, $01, $FE
db $08, $38, $02, $1E, $02, $7B, $C3, $BA
db $59, $F0, $E7, $1F, $1F, $1F, $E6, $01
db $C6, $02, $CD, $87, $3B, $21, $74, $DB
db $36, $01, $F0, $EE, $E6, $FC, $FE, $E0
db $28, $09, $21, $40, $C2, $09, $36, $EC
db $CD, $DA, $7D, $FA, $0F, $C5, $5F, $50
db $21, $40, $C2, $19, $36, $F4, $F0, $E7
db $1F, $1F, $1F, $E6, $01, $C6, $04, $21
db $B0, $C3, $19, $77, $D5, $C5, $D5, $C1
db $CD, $DA, $7D, $C1, $D1, $21, $00, $C2
db $19, $7E, $FE, $F0, $20, $0B, $CD, $76
db $7E, $AF, $EA, $73, $DB, $AF, $EA, $67
db $C1, $C9, $CD, $7E, $54, $CD, $61, $7D
db $21, $98, $FF, $F0, $EE, $96, $C6, $04
db $FE, $08, $30, $0D, $21, $99, $FF, $F0
db $EC, $C6, $04, $96, $38, $03, $CD, $B4
db $7C, $21, $98, $FF, $F0, $EE, $96, $C6
db $06, $FE, $0C, $30, $6D, $21, $99, $FF
db $F0, $EC, $96, $C6, $08, $FE, $04, $30
db $61, $1E, $20, $FA, $00, $DB, $FE, $03
db $28, $09, $1E, $10, $FA, $01, $DB, $FE
db $03, $20, $4F, $F0, $CB, $A3, $28, $4A
db $3E, $02, $E0, $BA, $3E, $3A, $E0, $9D
db $3E, $02, $E0, $9E, $3E, $01, $E0, $A1
db $CD, $3B, $09, $F0, $EE, $E0, $98, $F0
db $EC, $C6, $08, $E0, $99, $FE, $50, $30
db $22, $F0, $CB, $E6, $08, $28, $1C, $21
db $D0, $C3, $09, $7E, $34, $E6, $18, $28
db $11, $21, $9D, $FF, $34, $21, $50, $C2
db $09, $36, $04, $CD, $D0, $7D, $3E, $01
db $E0, $BA, $C9, $21, $D0, $C3, $09, $36
db $08, $C9, $F0, $EC, $FE, $1B, $38, $0D
db $21, $50, $C2, $09, $36, $FD, $CD, $D0
db $7D, $3E, $00, $E0, $BA, $C9, $44, $00
db $44, $20, $74, $00, $74, $20, $46, $00
db $46, $20, $76, $00, $76, $20, $F0, $F7
db $FE, $01, $20, $02, $E0, $F1, $11, $6E
db $54, $CD, $3B, $3C, $21, $C0, $C2, $09
db $7E, $C6, $FC, $FE, $F0, $D0, $E0, $EC
db $11, $76, $54, $CD, $3B, $3C, $F0, $EC
db $C6, $10, $E0, $EC, $21, $EF, $FF, $BE
db $38, $EE, $CD, $BA, $3D, $C9, $24, $00
db $3E, $00, $11, $AE, $54, $CD, $D0, $3C
db $CD, $61, $7D, $CD, $91, $08, $CA, $76
db $7E, $1E, $01, $FE, $40, $38, $0D, $20
db $0A, $21, $10, $C2, $09, $7E, $C6, $04
db $77, $18, $01, $1D, $7B, $CD, $87, $3B
db $CD, $91, $08, $1E, $FE, $E6, $20, $28
db $02, $1E, $FC, $21, $50, $C2, $09, $73
db $21, $40, $C2, $09, $36, $FF, $F0, $E7
db $E6, $03, $C0, $CD, $CD, $7D, $C9, $21
db $B0, $C2, $09, $7E, $A7, $C2, $B2, $54
db $FA, $FD, $D8, $E6, $20, $C2, $A0, $58
db $CD, $70, $58, $CD, $61, $7D, $CD, $06
db $7E, $21, $20, $C3, $09, $35, $21, $10
db $C3, $09, $7E, $E6, $80, $28, $06, $70
db $21, $20, $C3, $09, $70, $CD, $AF, $7C
db $F0, $F0, $C7, $3D, $55, $B5, $55, $DA
db $55, $73, $56, $E9, $56, $1D, $57, $56
db $57, $81, $57, $9F, $57, $21, $D0, $C3
db $09, $34, $3E, $7F, $A6, $20, $2A, $3E
db $C4, $CD, $01, $3C, $38, $23, $F0, $D7
db $D6, $08, $21, $00, $C2, $19, $77, $F0
db $D8, $C6, $02, $21, $10, $C2, $19, $77
db $21, $E0, $C2, $19, $36, $60, $21, $40
db $C3, $19, $36, $C1, $21, $B0, $C2, $19
db $34, $FA, $73, $DB, $A7, $20, $0B, $CD
db $F5, $7C, $30, $05, $3E, $E0, $CD, $85
db $21, $C9, $CD, $20, $7E, $C6, $13, $FE
db $26, $D0, $CD, $30, $7E, $C6, $20, $FE
db $40, $D0, $CD, $3B, $09, $CD, $95, $14
db $FA, $46, $C1, $A7, $C0, $FA, $0F, $C5
db $5F, $50, $21, $10, $C3, $19, $7E, $A7
db $C0, $CD, $8D, $3B, $3E, $E1, $CD, $85
db $21, $CD, $B8, $59, $C9, $FA, $9F, $C1
db $A7, $20, $1E, $CD, $8D, $3B, $FA, $77
db $C1, $A7, $20, $0E, $3E, $2F, $EA, $68
db $D3, $EA, $C8, $C3, $CD, $87, $08, $36
db $50, $C9, $36, $08, $3E, $E4, $CD, $85
db $21, $C9, $3E, $01, $EA, $67, $C1, $3E
db $02, $E0, $A1, $CD, $87, $08, $20, $06
db $36, $C0, $CD, $8D, $3B, $C9, $1E, $00
db $FE, $40, $30, $1A, $1E, $02, $FE, $10
db $38, $14, $1E, $00, $FE, $3C, $30, $0C
db $FE, $20, $28, $0A, $FE, $21, $28, $06
db $FE, $22, $28, $02, $1E, $01, $7B, $CD
db $87, $3B, $C9, $01, $02, $01, $02, $01
db $01, $02, $02, $01, $02, $01, $02, $01
db $01, $02, $02, $01, $02, $01, $02, $01
db $01, $02, $02, $01, $02, $01, $02, $01
db $01, $02, $02, $01, $02, $01, $02, $01
db $01, $02, $02, $01, $02, $01, $02, $01
db $01, $02, $02, $01, $02, $01, $02, $01
db $01, $02, $02, $01, $02, $01, $02, $01
db $01, $02, $02, $01, $02, $01, $02, $01
db $01, $02, $02, $01, $02, $01, $02, $01
db $01, $02, $02, $01, $02, $01, $02, $01
db $01, $02, $02, $01, $02, $01, $02, $01
db $01, $02, $02, $3E, $01, $EA, $67, $C1
db $3E, $02, $E0, $A1, $CD, $87, $08, $20
db $14, $EA, $C8, $C3, $3E, $11, $E0, $F4
db $CD, $91, $08, $36, $08, $3E, $02, $CD
db $87, $3B, $C3, $8D, $3B, $21, $D0, $C2
db $09, $5E, $50, $F0, $E7, $E6, $07, $20
db $14, $34, $7E, $FE, $60, $30, $0E, $E6
db $0F, $20, $0A, $21, $20, $C3, $09, $36
db $10, $3E, $24, $E0, $F2, $21, $13, $56
db $19, $7E, $FE, $02, $20, $0D, $F0, $E7
db $E6, $3F, $20, $05, $21, $F2, $FF, $36
db $27, $3E, $02, $CD, $87, $3B, $21, $10
db $C3, $09, $7E, $A7, $28, $12, $1E, $01
db $21, $20, $C3, $09, $7E, $D6, $F8, $E6
db $80, $20, $01, $1C, $7B, $CD, $87, $3B
db $C9, $3E, $02, $E0, $A1, $CD, $91, $08
db $20, $2A, $36, $10, $21, $10, $C2, $09
db $7E, $C6, $04, $77, $21, $B0, $C3, $09
db $7E, $3C, $77, $FE, $04, $20, $15, $21
db $10, $C3, $09, $36, $18, $21, $10, $C2
db $09, $7E, $C6, $18, $77, $3E, $08, $E0
db $F2, $CD, $8D, $3B, $C9, $3E, $02, $E0
db $A1, $21, $10, $C3, $09, $7E, $A7, $20
db $2C, $CD, $8D, $3B, $CD, $91, $08, $36
db $08, $3E, $24, $E0, $F4, $F0, $EE, $E0
db $D7, $F0, $EC, $C6, $10, $E0, $D8, $3E
db $01, $CD, $53, $09, $F0, $EE, $C6, $10
db $E0, $D7, $F0, $EC, $C6, $10, $E0, $D8
db $3E, $01, $CD, $53, $09, $C9, $CD, $91
db $08, $20, $21, $CD, $8D, $3B, $F0, $B0
db $EA, $68, $D3, $3E, $FF, $CD, $87, $3B
db $3E, $E2, $CD, $85, $21, $3E, $03, $CD
db $BA, $59, $3E, $03, $E0, $9E, $C5, $CD
db $7C, $08, $C1, $C9, $3E, $05, $C3, $87
db $3B, $3E, $C8, $CD, $01, $3C, $21, $00
db $C2, $19, $36, $F8, $21, $E0, $C2, $19
db $36, $20, $21, $10, $C2, $19, $36, $48
db $CD, $76, $7E, $CD, $2B, $7F, $C9, $C9
db $00, $00, $60, $00, $00, $08, $62, $00
db $00, $10, $64, $00, $00, $18, $66, $00
db $10, $00, $68, $00, $10, $08, $6A, $00
db $10, $10, $6C, $00, $10, $18, $6E, $00
db $00, $00, $60, $00, $00, $08, $70, $00
db $00, $10, $64, $00, $00, $18, $66, $00
db $10, $00, $68, $00, $10, $08, $6A, $00
db $10, $10, $6C, $00, $10, $18, $6E, $00
db $00, $00, $72, $00, $00, $08, $74, $00
db $00, $10, $64, $00, $00, $18, $66, $00
db $10, $00, $76, $00, $10, $08, $6A, $00
db $10, $10, $6C, $00, $10, $18, $6E, $00
db $00, $00, $78, $00, $00, $08, $7A, $00
db $00, $10, $7C, $00, $00, $18, $7E, $00
db $10, $00, $78, $40, $10, $08, $7A, $40
db $10, $10, $7C, $40, $10, $18, $7E, $40
db $00, $00, $68, $40, $00, $08, $6A, $40
db $00, $10, $6C, $40, $00, $18, $6E, $40
db $10, $00, $60, $40, $10, $08, $62, $40
db $10, $10, $64, $40, $10, $18, $66, $40
db $0E, $00, $68, $40, $0E, $08, $6A, $40
db $0E, $10, $6C, $40, $0E, $18, $6E, $40
db $10, $00, $FF, $40, $10, $08, $FF, $40
db $10, $10, $FF, $40, $10, $18, $FF, $40
db $17, $03, $26, $00, $17, $09, $26, $00
db $17, $0F, $26, $00, $17, $15, $26, $00
db $F0, $F1, $17, $17, $17, $17, $17, $E6
db $E0, $5F, $50, $21, $A0, $57, $19, $0E
db $08, $CD, $26, $3D, $21, $10, $C3, $09
db $7E, $A7, $C8, $F0, $EF, $E0, $EC, $21
db $60, $58, $0E, $04, $CD, $26, $3D, $3E
db $04, $CD, $D0, $3D, $CD, $BA, $3D, $C9
db $CD, $77, $59, $FA, $24, $C1, $A7, $C0
db $F0, $F0, $C7, $B3, $58, $C7, $58, $E7
db $58, $FC, $58, $21, $10, $C2, $09, $36
db $68, $21, $00, $C2, $09, $36, $80, $CD
db $91, $08, $36, $20, $C3, $8D, $3B, $CD
db $91, $08, $20, $1A, $FA, $4A, $DB, $FE
db $00, $20, $13, $FA, $66, $C1, $A7, $FE
db $40, $20, $0B, $CD, $8D, $3B, $CD, $91
db $08, $36, $20, $CD, $31, $57, $C9, $CD
db $91, $08, $20, $05, $36, $C8, $C3, $8D
db $3B, $FE, $10, $3E, $01, $38, $01, $3C
db $CD, $87, $3B, $C9, $CD, $91, $08, $20
db $06, $CD, $31, $57, $C3, $76, $7E, $FE
db $B0, $20, $00, $CD, $91, $08, $FE, $80
db $20, $06, $35, $3E, $E6, $CD, $85, $21
db $CD, $91, $08, $16, $00, $FE, $10, $1E
db $02, $38, $06, $1D, $FE, $20, $38, $01
db $14, $21, $90, $C3, $09, $72, $7B, $CD
db $87, $3B, $C9, $FF, $04, $FF, $00, $FF
db $0C, $FF, $00, $FF, $04, $FF, $00, $FF
db $0C, $FF, $00, $FF, $14, $FF, $00, $FC
db $04, $70, $00, $FC, $0C, $72, $00, $0C
db $04, $74, $00, $0C, $0C, $76, $00, $0C
db $14, $78, $00, $0C, $04, $7A, $00, $0C
db $0C, $7C, $00, $0C, $14, $7E, $00, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $00
db $00, $01, $02, $03, $03, $02, $01, $F0
db $E7, $1F, $1F, $1F, $1F, $00, $00, $E6
db $07, $5F, $50, $21, $6F, $59, $19, $F0
db $EC, $86, $E0, $EC, $21, $90, $C3, $09
db $7E, $A7, $28, $0D, $F0, $E7, $1F, $1F
db $1F, $1F, $1F, $1F, $E6, $01, $3C, $E0
db $F1, $F0, $F1, $17, $17, $E6, $FC, $5F
db $17, $17, $E6, $F0, $83, $5F, $50, $21
db $33, $59, $19, $0E, $05, $C3, $26, $3D
db $3E, $00, $1E, $10, $21, $B5, $D1, $22
db $1D, $20, $FC, $C9, $42, $20, $40, $20
db $40, $00, $42, $00, $44, $00, $46, $00
db $46, $20, $44, $20, $48, $00, $4A, $00
db $4C, $00, $4E, $00, $4A, $20, $48, $20
db $4E, $20, $4C, $20, $50, $00, $52, $00
db $54, $00, $54, $20, $52, $20, $50, $20
db $06, $04, $02, $00, $79, $EA, $0F, $C5
db $CD, $91, $08, $28, $4E, $FE, $10, $20
db $12, $35, $F0, $99, $F5, $3E, $28, $E0
db $99, $3E, $1F, $CD, $97, $21, $F1, $E0
db $99, $3E, $0F, $FE, $01, $20, $0D, $AF
db $EA, $67, $C1, $3E, $31, $EA, $68, $D3
db $3E, $05, $E0, $B0, $AF, $EA, $B0, $C3
db $11, $C4, $59, $CD, $3B, $3C, $3E, $6C
db $E0, $9D, $3E, $02, $E0, $A1, $3E, $03
db $E0, $9E, $F0, $98, $21, $00, $C2, $09
db $77, $F0, $99, $D6, $10, $21, $10, $C2
db $09, $77, $C9, $21, $40, $C4, $09, $7E
db $A7, $20, $45, $FA, $6B, $C1, $FE, $04
db $20, $31, $34, $CD, $91, $08, $36, $70
db $3E, $10, $EA, $68, $D3, $3E, $FF, $E0
db $BF, $F0, $98, $21, $55, $D1, $CD, $85
db $5A, $F0, $99, $21, $75, $D1, $CD, $85
db $5A, $AF, $21, $95, $D1, $CD, $85, $5A
db $F0, $9E, $21, $B5, $D1, $1E, $10, $22
db $1D, $20, $FC, $C9, $08, $08, $08, $09
db $0A, $0A, $0A, $09, $08, $F8, $06, $01
db $FA, $C8, $C3, $A7, $28, $55, $F0, $E7
db $1F, $1F, $1F, $1F, $E6, $07, $5F, $50
db $21, $8C, $5A, $19, $7E, $E0, $F1, $F0
db $E7, $E6, $1F, $20, $3E, $3E, $C9, $CD
db $01, $3C, $38, $37, $F0, $D8, $21, $10
db $C2, $19, $D6, $08, $77, $C5, $F0, $E7
db $1F, $1F, $1F, $1F, $1F, $E6, $01, $4F
db $21, $94, $5A, $09, $F0, $D7, $86, $21
db $00, $C2, $19, $77, $21, $96, $5A, $09
db $7E, $21, $40, $C2, $19, $77, $21, $50
db $C2, $19, $36, $FC, $21, $D0, $C3, $19
db $36, $40, $C1, $11, $C4, $59, $CD, $3B
db $3C, $FA, $4F, $C1, $A7, $C0, $21, $80
db $C4, $09, $7E, $A7, $28, $09, $3D, $20
db $06, $35, $3E, $7A, $CD, $8E, $21, $21
db $00, $C3, $09, $7E, $A7, $28, $53, $FE
db $30, $20, $3A, $AF, $EA, $67, $C1, $F0
db $98, $D6, $58, $C6, $03, $FE, $06, $30
db $0A, $F0, $99, $D6, $50, $C6, $03, $FE
db $06, $38, $08, $70, $21, $80, $C4, $09
db $36, $1C, $C9, $21, $F2, $FF, $36, $0B
db $21, $F3, $FF, $36, $03, $21, $57, $C1
db $36, $18, $21, $58, $C1, $36, $04, $21
db $98, $FF, $34, $18, $0C, $30, $13, $FE
db $10, $20, $06, $35, $3E, $7B, $CD, $8E
db $21, $3E, $02, $E0, $A1, $3E, $6A, $E0
db $9D, $C9, $FA, $74, $DB, $21, $BC, $C1
db $B6, $C0, $FA, $10, $DB, $A7, $CA, $70
db $5C, $CD, $9E, $3B, $3E, $02, $E0, $A1
db $EA, $67, $C1, $CD, $61, $7D, $FA, $68
db $D4, $A7, $28, $04, $3D, $EA, $68, $D4
db $F0, $F0, $C7, $9D, $5B, $B4, $5B, $D2
db $5B, $0B, $5C, $3F, $5C, $FA, $1C, $C1
db $FE, $03, $C8, $3E, $40, $EA, $68, $D4
db $3E, $0F, $E0, $A5, $3E, $01, $CD, $87
db $3B, $C3, $8D, $3B, $FA, $68, $D4, $A7
db $20, $17, $3E, $18, $EA, $68, $D4, $21
db $80, $C3, $09, $36, $01, $3E, $04, $CD
db $87, $3B, $3E, $10, $E0, $A5, $CD, $8D
db $3B, $C9, $FA, $68, $D4, $A7, $20, $32
db $21, $40, $C2, $09, $36, $F4, $CD, $DA
db $7D, $F0, $E7, $E6, $08, $1E, $04, $28
db $01, $1C, $7B, $CD, $87, $3B, $CD, $20
db $7E, $C6, $02, $FE, $04, $D0, $21, $B0
db $C3, $09, $36, $02, $21, $80, $C3, $09
db $36, $02, $3E, $10, $EA, $68, $D4, $CD
db $8D, $3B, $C9, $FA, $68, $D4, $A7, $20
db $2D, $FA, $10, $DB, $3D, $5F, $FA, $63
db $C1, $BB, $28, $10, $A7, $28, $0D, $1E
db $1C, $CD, $ED, $27, $E6, $3F, $20, $0F
db $1E, $1E, $18, $0B, $1E, $1B, $FA, $47
db $DB, $FE, $80, $30, $02, $1E, $1D, $7B
db $CD, $8E, $21, $CD, $8D, $3B, $C9, $AF
db $EA, $10, $DB, $EA, $67, $C1, $CD, $8D
db $3B, $70, $21, $D0, $C3, $09, $36, $FF
db $F0, $EE, $21, $55, $D1, $CD, $69, $5C
db $21, $75, $D1, $F0, $EC, $1E, $10, $22
db $3D, $1D, $20, $FB, $3E, $02, $21, $B5
db $D1, $1E, $10, $22, $1D, $20, $FC, $C9
db $FA, $6B, $C1, $FE, $04, $C0, $F0, $F6
db $21, $E0, $C3, $09, $77, $21, $20, $C2
db $09, $70, $21, $30, $C2, $09, $70, $21
db $80, $C3, $09, $5E, $50, $21, $F0, $59
db $19, $E5, $FA, $20, $C1, $1F, $1F, $1F
db $E1, $E6, $01, $B6, $CD, $87, $3B, $21
db $D0, $C3, $09, $7E, $E0, $E8, $E6, $0F
db $5F, $50, $21, $55, $D1, $19, $F0, $9F
db $77, $F0, $A0, $21, $3B, $C1, $86, $21
db $75, $D1, $19, $77, $21, $B5, $D1, $19
db $F0, $9E, $77, $21, $B0, $C2, $09, $7E
db $E0, $E9, $E6, $0F, $5F, $50, $21, $95
db $D1, $19, $F0, $A2, $77, $FA, $1C, $C1
db $FE, $02, $28, $14, $FA, $24, $C1, $A7
db $20, $0E, $FA, $9F, $C1, $A7, $20, $0D
db $21, $9A, $FF, $F0, $9B, $B6, $28, $05
db $21, $D0, $C3, $09, $34, $21, $B0, $C2
db $09, $34, $F0, $E8, $3C, $E6, $0F, $5F
db $50, $21, $55, $D1, $19, $7E, $21, $00
db $C2, $09, $77, $21, $75, $D1, $19, $7E
db $21, $10, $C2, $09, $77, $21, $B5, $D1
db $19, $7E, $21, $80, $C3, $09, $77, $F0
db $E9, $3C, $E6, $0F, $5F, $50, $21, $10
db $C3, $09, $7E, $F5, $21, $95, $D1, $19
db $5E, $21, $10, $C3, $09, $73, $CD, $8C
db $08, $21, $24, $C1, $B6, $20, $44, $F1
db $BB, $28, $3D, $A7, $28, $2F, $7B, $A7
db $20, $36, $CD, $9E, $3B, $21, $80, $C2
db $09, $7E, $FE, $02, $C8, $21, $70, $C4
db $09, $7E, $3D, $FE, $02, $38, $05, $3E
db $07, $E0, $F4, $C9, $F0, $EC, $E0, $D8
db $F0, $EE, $E0, $D7, $3E, $0E, $E0, $F2
db $3E, $0C, $C3, $53, $09, $7B, $FE, $08
db $3E, $08, $30, $02, $3E, $24, $E0, $F2
db $C3, $9E, $3B, $F1, $C9, $00, $01, $FF
db $00, $10, $F0, $CD, $61, $7D, $3E, $01
db $E0, $A4, $3C, $E0, $A1, $EA, $67, $C1
db $F0, $CC, $E6, $03, $5F, $50, $21, $85
db $5D, $19, $FA, $09, $C1, $F5, $86, $E6
db $0F, $5F, $F1, $E6, $F0, $B3, $EA, $09
db $C1, $F0, $CC, $1F, $1F, $E6, $03, $5F
db $50, $21, $88, $5D, $19, $FA, $09, $C1
db $86, $EA, $09, $C1, $FA, $9F, $C1, $A7
db $20, $18, $F0, $CC, $E6, $10, $28, $06
db $FA, $09, $C1, $C3, $97, $21, $F0, $CC
db $E6, $20, $28, $06, $FA, $09, $C1, $C3
db $85, $21, $F0, $CC, $E6, $40, $28, $06
db $FA, $09, $C1, $C3, $8E, $21, $C9, $CD
db $61, $7D, $F0, $E7, $E6, $03, $20, $04
db $21, $BF, $C1, $34, $C9, $5E, $00, $5E
db $20, $00, $F8, $50, $00, $00, $00, $52
db $00, $00, $08, $54, $00, $00, $10, $56
db $00, $21, $01, $5E, $0E, $04, $CD, $26
db $3D, $3E, $02, $CD, $D0, $3D, $F0, $F0
db $C7, $27, $5E, $30, $5E, $4B, $5E, $21
db $00, $C2, $09, $36, $50, $C3, $8D, $3B
db $CD, $61, $7D, $CD, $91, $08, $C0, $CD
db $0E, $7D, $D0, $FA, $97, $DB, $FE, $E4
db $20, $03, $C3, $8D, $3B, $3E, $E6, $CD
db $97, $21, $C9, $CD, $61, $7D, $FA, $9F
db $C1, $A7, $20, $13, $3E, $0A, $CD, $36
db $4C, $CD, $91, $08, $36, $20, $CD, $8D
db $3B, $70, $21, $AC, $D8, $CB, $E6, $C9
db $F0, $F7, $FE, $16, $CA, $11, $5E, $F0
db $EC, $C6, $01, $E0, $EC, $11, $FD, $5D
db $CD, $3B, $3C, $CD, $AF, $7C, $CD, $61
db $7D, $CD, $0E, $7D, $30, $0F, $FA, $CE
db $DB, $A7, $3E, $10, $28, $04, $F0, $F7
db $C6, $08, $CD, $85, $21, $C9, $60, $00
db $62, $00, $62, $20, $60, $20, $64, $00
db $66, $00, $66, $20, $64, $20, $68, $00
db $6A, $00, $6C, $00, $6E, $00, $6A, $20
db $68, $20, $6E, $20, $6C, $20, $FA, $6B
db $DB, $E6, $02, $CA, $76, $7E, $FA, $7B
db $DB, $A7, $C2, $76, $7E, $F0, $F8, $E6
db $10, $C2, $76, $7E, $21, $C0, $C2, $09
db $7E, $A7, $C2, $DD, $60, $79, $EA, $0F
db $C5, $11, $96, $5E, $CD, $3B, $3C, $CD
db $D9, $7C, $CD, $06, $7E, $21, $20, $C3
db $09, $35, $35, $21, $10, $C3, $09, $7E
db $A7, $E0, $E8, $28, $04, $E6, $80, $28
db $06, $70, $21, $20, $C3, $09, $70, $F0
db $F0, $C7, $22, $5F, $54, $5F, $62, $5F
db $7C, $5F, $AD, $5F, $D1, $5F, $E3, $5F
db $FA, $5F, $12, $60, $35, $60, $3D, $60
db $59, $60, $7B, $60, $21, $D0, $C3, $09
db $70, $C9, $CD, $3F, $5F, $CD, $61, $7D
db $CD, $20, $7E, $21, $80, $C3, $09, $73
db $F0, $98, $FE, $90, $30, $08, $3E, $35
db $CD, $8E, $21, $CD, $8D, $3B, $C9, $F0
db $E8, $A7, $28, $03, $E6, $80, $C8, $F0
db $E7, $E6, $3F, $20, $06, $21, $20, $C3
db $09, $36, $10, $C9, $CD, $3F, $5F, $CD
db $61, $7D, $3E, $36, $CD, $8E, $21, $C3
db $8D, $3B, $CD, $3F, $5F, $CD, $61, $7D
db $CD, $20, $7E, $C6, $08, $FE, $10, $D0
db $CD, $30, $7E, $C6, $10, $FE, $20, $D0
db $CD, $8D, $3B, $C9, $CD, $1C, $5F, $CD
db $61, $7D, $CD, $20, $7E, $21, $80, $C3
db $09, $73, $FA, $A4, $C1, $A7, $28, $11
db $F0, $98, $21, $00, $C2, $09, $C6, $10
db $77, $F0, $99, $21, $10, $C2, $09, $77
db $C9, $AF, $EA, $9B, $C1, $CD, $91, $08
db $36, $10, $C3, $8D, $3B, $CD, $1C, $5F
db $CD, $61, $7D, $3E, $02, $E0, $A1, $EA
db $67, $C1, $3E, $00, $E0, $9E, $C5, $CD
db $7C, $08, $C1, $CD, $91, $08, $20, $08
db $3E, $37, $CD, $8E, $21, $CD, $8D, $3B
db $C9, $CD, $1C, $5F, $CD, $61, $7D, $3E
db $02, $E0, $A1, $3E, $38, $CD, $8E, $21
db $C3, $8D, $3B, $CD, $1C, $5F, $3E, $02
db $E0, $A1, $CD, $61, $7D, $3E, $39, $CD
db $8E, $21, $21, $B0, $C2, $09, $70, $C3
db $8D, $3B, $CD, $1C, $5F, $3E, $02, $E0
db $A1, $CD, $61, $7D, $21, $B0, $C2, $09
db $34, $7E, $FE, $A0, $20, $03, $C3, $8D
db $3B, $C9, $CD, $1C, $5F, $3E, $02, $E0
db $A1, $CD, $61, $7D, $3E, $C2, $CD, $01
db $3C, $21, $00, $C2, $19, $36, $12, $21
db $10, $C2, $19, $36, $88, $21, $C0, $C2
db $19, $34, $C3, $8D, $3B, $CD, $1C, $5F
db $3E, $02, $E0, $A1, $C9, $3E, $02, $E0
db $A1, $F0, $EC, $FE, $3E, $38, $03, $C3
db $8D, $3B, $21, $50, $C2, $09, $36, $06
db $21, $80, $C3, $09, $36, $03, $C3, $D0
db $7D, $3E, $02, $E0, $A1, $21, $40, $C2
db $09, $36, $FA, $21, $80, $C3, $09, $36
db $01, $CD, $DA, $7D, $F0, $EE, $FE, $18
db $30, $08, $CD, $91, $08, $36, $60, $CD
db $8D, $3B, $C9, $3E, $02, $E0, $A1, $CD
db $91, $08, $28, $07, $21, $80, $C3, $09
db $36, $02, $C9, $21, $40, $C2, $09, $36
db $F4, $21, $80, $C3, $09, $36, $01, $CD
db $DA, $7D, $F0, $EE, $FE, $F0, $20, $0F
db $AF, $EA, $67, $C1, $21, $08, $D8, $CB
db $E6, $7E, $E0, $F8, $C3, $76, $7E, $CD
db $20, $7E, $7B, $EE, $01, $E0, $9E, $C5
db $CD, $7C, $08, $C1, $C9, $50, $00, $52
db $00, $52, $20, $50, $20, $54, $00, $56
db $00, $56, $20, $54, $20, $58, $00, $5A
db $00, $5C, $00, $5E, $00, $5A, $20, $58
db $20, $5E, $20, $5C, $20, $11, $BD, $60
db $CD, $3B, $3C, $CD, $D9, $7C, $F0, $F0
db $C7, $F1, $60, $23, $61, $39, $61, $5D
db $61, $21, $80, $C3, $09, $36, $02, $21
db $50, $C2, $09, $36, $F4, $CD, $D0, $7D
db $F0, $EC, $FE, $70, $30, $1C, $3E, $3B
db $CD, $8E, $21, $3E, $03, $E0, $9E, $FA
db $0F, $C5, $5F, $50, $21, $80, $C3, $19
db $36, $03, $C5, $CD, $7C, $08, $C1, $CD
db $8D, $3B, $C9, $FA, $0F, $C5, $5F, $50
db $21, $80, $C3, $19, $36, $03, $CD, $61
db $7D, $3E, $3A, $CD, $8E, $21, $C3, $8D
db $3B, $FA, $0F, $C5, $5F, $50, $21, $80
db $C3, $19, $36, $03, $FA, $70, $C1, $FE
db $22, $38, $02, $36, $01, $CD, $61, $7D
db $FA, $0F, $C5, $5F, $50, $21, $90, $C2
db $19, $34, $C3, $8D, $3B, $21, $80, $C3
db $09, $36, $01, $21, $40, $C2, $09, $36
db $F8, $CD, $DA, $7D, $F0, $EE, $FE, $E0
db $20, $03, $CD, $76, $7E, $C9, $FA, $73
db $DB, $A7, $C2, $F4, $59, $FA, $74, $DB
db $A7, $C0, $FA, $FD, $D8, $E6, $20, $C2
db $76, $7E, $FA, $0E, $DB, $FE, $07, $DA
db $76, $7E, $11, $96, $5E, $CD, $3B, $3C
db $FA, $24, $C1, $A7, $C0, $CD, $AF, $7C
db $F0, $F0, $C7, $B1, $61, $BE, $61, $DB
db $61, $FB, $61, $2E, $62, $3D, $62, $52
db $62, $3E, $4D, $EA, $68, $D3, $E0, $B0
db $E0, $BD, $CD, $8D, $3B, $C9, $FA, $9F
db $C1, $A7, $20, $16, $CD, $30, $7E, $C6
db $14, $FE, $28, $30, $0D, $3E, $01, $EA
db $67, $C1, $CD, $91, $08, $36, $18, $CD
db $8D, $3B, $C9, $FA, $9F, $C1, $A7, $20
db $19, $CD, $91, $08, $20, $08, $3E, $D5
db $CD, $85, $21, $CD, $8D, $3B, $1E, $02
db $FE, $0C, $38, $02, $1E, $04, $7B, $CD
db $87, $3B, $C9, $FA, $9F, $C1, $A7, $20
db $2C, $CD, $8D, $3B, $FA, $77, $C1, $A7
db $20, $1A, $36, $06, $AF, $EA, $6B, $C1
db $EA, $6C, $C1, $EA, $7C, $D4, $EA, $96
db $DB, $3E, $09, $EA, $95, $DB, $3E, $4E
db $EA, $68, $D3, $C9, $AF, $EA, $67, $C1
db $3E, $D6, $CD, $85, $21, $C9, $FA, $9F
db $C1, $A7, $20, $08, $CD, $91, $08, $36
db $60, $CD, $8D, $3B, $C9, $CD, $91, $08
db $20, $03, $CD, $8D, $3B, $1E, $00, $FE
db $54, $38, $02, $1E, $04, $7B, $CD, $87
db $3B, $C9, $C9, $65, $64, $54, $52, $22
db $22, $32, $37, $37, $37, $57, $56, $26
db $21, $C4, $C5, $D5, $D4, $C4, $C5, $D5
db $D5, $C5, $C4, $C4, $C5, $D5, $D4, $AB
db $A9, $AC, $AA, $AB, $A9, $AB, $AA, $AC
db $A9, $AB, $A9, $AC, $AE, $CD, $61, $7D
db $F0, $F6, $FE, $B4, $20, $07, $AF, $EA
db $72, $D4, $EA, $73, $D4, $FA, $73, $D4
db $A7, $28, $4C, $FA, $72, $D4, $5F, $50
db $21, $53, $62, $19, $FA, $73, $D4, $BE
db $20, $2D, $21, $61, $62, $19, $F0, $F6
db $BE, $20, $24, $AF, $EA, $73, $D4, $FA
db $72, $D4, $3C, $EA, $72, $D4, $FE, $0E
db $20, $0D, $AF, $EA, $72, $D4, $3E, $02
db $E0, $F2, $D5, $CD, $E0, $62, $D1, $21
db $6F, $62, $19, $7E, $C3, $85, $21, $AF
db $EA, $72, $D4, $EA, $73, $D4, $3E, $1D
db $E0, $F2, $3E, $AD, $CD, $85, $21, $C9
db $21, $39, $D7, $36, $C6, $3E, $28, $EA
db $16, $D4, $3E, $20, $E0, $CD, $C6, $10
db $E0, $D8, $3E, $80, $E0, $CE, $C6, $08
db $E0, $D7, $3E, $02, $CD, $53, $09, $CD
db $39, $28, $21, $01, $D6, $FA, $00, $D6
db $5F, $C6, $0A, $EA, $00, $D6, $16, $00
db $19, $F0, $CF, $22, $F0, $D0, $22, $3E
db $81, $22, $3E, $68, $22, $3E, $77, $22
db $F0, $CF, $22, $F0, $D0, $3C, $22, $3E
db $81, $22, $3E, $69, $22, $3E, $4B, $22
db $36, $00, $3E, $01, $E0, $AC, $F0, $CD
db $E6, $F0, $C6, $10, $E0, $AE, $F0, $CE
db $E6, $F0, $C6, $08, $E0, $AD, $F0, $F6
db $5F, $16, $00, $21, $00, $D8, $19, $CB
db $E6, $C9, $10, $20, $30, $40, $50, $60
db $70, $80, $18, $28, $38, $48, $58, $68
db $78, $88, $21, $B0, $C2, $09, $7E, $A7
db $C2, $E3, $63, $CD, $61, $7D, $CD, $91
db $08, $20, $5B, $CD, $ED, $27, $E6, $07
db $5F, $50, $21, $5A, $63, $19, $7E, $21
db $00, $C2, $09, $77, $21, $52, $63, $19
db $7E, $21, $10, $C2, $09, $77, $CD, $6E
db $64, $F0, $DA, $FE, $00, $28, $09, $FE
db $06, $28, $05, $FE, $09, $28, $01, $C9
db $CD, $91, $08, $CD, $ED, $27, $E6, $3F
db $C6, $40, $77, $3E, $BF, $1E, $05, $CD
db $13, $3C, $38, $1A, $F0, $D7, $21, $00
db $C2, $19, $77, $F0, $D8, $21, $10, $C2
db $19, $77, $21, $B0, $C2, $19, $36, $01
db $21, $40, $C3, $19, $CB, $B6, $C9, $FF
db $FF, $FF, $FF, $6C, $00, $6C, $20, $68
db $00, $6A, $00, $60, $00, $62, $00, $64
db $00, $66, $00, $11, $CF, $63, $CD, $3B
db $3C, $CD, $61, $7D, $CD, $83, $7D, $F0
db $F0, $C7, $FA, $63, $03, $64, $29, $64
db $5C, $64, $CD, $91, $08, $36, $30, $CD
db $8D, $3B, $C9, $CD, $91, $08, $20, $15
db $CD, $ED, $27, $E6, $3F, $C6, $70, $77
db $CD, $ED, $27, $E6, $07, $C6, $05, $CD
db $25, $3C, $CD, $8D, $3B, $1E, $01, $FE
db $18, $30, $01, $1C, $7B, $CD, $87, $3B
db $C9, $CD, $CD, $7D, $CD, $9E, $3B, $CD
db $B4, $3B, $21, $A0, $C2, $09, $7E, $E6
db $0F, $20, $05, $CD, $91, $08, $20, $0E
db $CD, $91, $08, $36, $30, $CD, $8D, $3B
db $21, $40, $C3, $09, $CB, $F6, $F0, $E7
db $1F, $1F, $1F, $1F, $E6, $01, $C6, $03
db $CD, $87, $3B, $C9, $CD, $91, $08, $CA
db $76, $7E, $1E, $01, $FE, $18, $38, $01
db $1C, $7B, $CD, $87, $3B, $C9, $C5, $21
db $00, $C2, $09, $7E, $D6, $01, $E0, $DB
db $E6, $F0, $E0, $CE, $CB, $37, $21, $10
db $C2, $09, $4F, $7E, $D6, $07, $E0, $DC
db $E6, $F0, $E0, $CD, $B1, $4F, $06, $00
db $21, $11, $D7, $7C, $09, $67, $C1, $7E
db $E0, $AF, $5F, $FA, $A5, $DB, $57, $CD
db $DB, $29, $E0, $DA, $C9, $EC, $14, $CD
db $C6, $68, $F0, $EA, $FE, $01, $CA, $7C
db $7E, $CD, $61, $7D, $CD, $12, $3F, $21
db $B0, $C2, $09, $7E, $A7, $20, $06, $34
db $CD, $87, $08, $36, $20, $CD, $8C, $08
db $28, $1B, $FA, $3E, $C1, $A7, $FE, $01
db $20, $05, $21, $F2, $FF, $36, $33, $A7
db $20, $0B, $3E, $02, $E0, $A1, $3E, $6A
db $E0, $9D, $CD, $90, $69, $CD, $83, $7D
db $CD, $E0, $3B, $FA, $3E, $C1, $A7, $20
db $03, $CD, $B4, $3B, $CD, $CD, $7D, $CD
db $9E, $3B, $CD, $06, $7E, $21, $20, $C3
db $09, $35, $35, $35, $21, $10, $C3, $09
db $7E, $E6, $80, $E0, $E8, $A7, $28, $09
db $70, $21, $20, $C3, $09, $70, $CD, $AF
db $3D, $CD, $AB, $65, $CD, $20, $7E, $21
db $80, $C3, $09, $73, $CD, $30, $7E, $FE
db $00, $28, $0B, $50, $21, $A3, $64, $19
db $7E, $21, $50, $C2, $09, $77, $F0, $E8
db $A7, $28, $28, $21, $20, $C3, $09, $36
db $10, $CD, $ED, $27, $E6, $0F, $D6, $08
db $21, $40, $C2, $09, $77, $CD, $20, $7E
db $C6, $28, $FE, $50, $38, $0D, $3E, $08
db $CD, $30, $3C, $F0, $D8, $21, $40, $C2
db $09, $86, $77, $CD, $72, $65, $F0, $E7
db $1F, $1F, $1F, $1F, $E6, $01, $CD, $87
db $3B, $C9, $CD, $8C, $08, $28, $04, $3E
db $03, $18, $19, $CD, $87, $08, $20, $2A
db $21, $B0, $C2, $09, $7E, $FE, $05, $30
db $05, $34, $3E, $01, $18, $06, $CD, $ED
db $27, $E6, $03, $3C, $EA, $05, $D2, $FE
db $01, $20, $04, $3E, $0A, $E0, $F4, $CD
db $91, $08, $36, $00, $21, $D0, $C3, $09
db $36, $00, $C9, $FA, $05, $D2, $A7, $C8
db $D1, $3D, $C7, $C8, $65, $1F, $66, $A9
db $66, $C8, $65, $01, $01, $01, $02, $02
db $03, $03, $03, $03, $03, $02, $02, $01
db $CD, $91, $08, $20, $1A, $21, $D0, $C3
db $09, $7E, $FE, $0D, $CA, $E8, $65, $34
db $5F, $50, $21, $BB, $65, $19, $7E, $CD
db $87, $3B, $CD, $91, $08, $36, $01, $C9
db $CD, $ED, $27, $E6, $03, $CA, $06, $67
db $3E, $01, $C3, $94, $65, $04, $05, $05
db $05, $05, $05, $05, $05, $05, $05, $05
db $06, $07, $08, $08, $08, $08, $08, $07
db $06, $01, $08, $10, $08, $08, $02, $00
db $00, $00, $FC, $F8, $F0, $F8, $E0, $90
db $A0, $00, $00, $00, $00, $00, $00, $CD
db $91, $08, $20, $30, $21, $D0, $C3, $09
db $7E, $FE, $15, $CA, $06, $67, $34, $5F
db $50, $21, $F5, $65, $19, $7E, $CD, $87
db $3B, $21, $0A, $66, $19, $5E, $21, $80
db $C3, $09, $7E, $A7, $20, $04, $7B, $2F
db $3C, $5F, $21, $40, $C2, $09, $73, $CD
db $91, $08, $36, $03, $C9, $09, $09, $0A
db $0A, $0B, $0B, $0C, $0C, $09, $09, $0A
db $0A, $0B, $0B, $0C, $0C, $09, $09, $0A
db $0A, $0B, $0B, $0C, $0C, $09, $09, $09
db $09, $09, $09, $09, $09, $09, $09, $0D
db $0E, $0F, $10, $11, $11, $11, $01, $0C
db $0C, $0C, $0C, $0C, $0C, $0C, $0C, $08
db $08, $08, $08, $08, $08, $08, $08, $00
db $00, $00, $00, $00, $00, $00, $00, $00
db $00, $00, $00, $00, $00, $00, $00, $F0
db $E0, $D0, $C0, $C0, $E0, $F0, $00, $00
db $00, $CD, $91, $08, $20, $57, $21, $D0
db $C3, $09, $7E, $FE, $2A, $CA, $06, $67
db $5F, $FE, $28, $20, $07, $FA, $1C, $C1
db $FE, $0A, $28, $01, $34, $50, $21, $55
db $66, $19, $7E, $CD, $87, $3B, $21, $7F
db $66, $19, $5E, $21, $80, $C3, $09, $7E
db $A7, $20, $04, $7B, $2F, $3C, $5F, $21
db $40, $C2, $09, $73, $CD, $8C, $08, $28
db $17, $CD, $20, $7E, $C6, $30, $FE, $60
db $38, $0E, $21, $D0, $C3, $09, $7E, $FE
db $18, $30, $05, $3E, $10, $CD, $25, $3C
db $CD, $91, $08, $36, $03, $C9, $AF, $EA
db $05, $D2, $CD, $87, $08, $CD, $ED, $27
db $E6, $0F, $C6, $0C, $77, $C9, $00, $F8
db $6C, $00, $00, $00, $6E, $00, $00, $00
db $60, $00, $00, $08, $62, $00, $FD, $F8
db $6E, $20, $FD, $00, $6C, $20, $FF, $F8
db $6C, $00, $FF, $00, $6E, $00, $00, $00
db $64, $00, $00, $08, $66, $00, $FD, $F8
db $6E, $20, $FD, $00, $6C, $20, $00, $F8
db $6E, $20, $00, $00, $6C, $20, $00, $00
db $60, $00, $00, $08, $62, $00, $FD, $F8
db $6C, $00, $FD, $00, $6E, $00, $FD, $F0
db $6C, $00, $FD, $F8, $6E, $00, $00, $F8
db $6E, $20, $00, $00, $6C, $20, $00, $00
db $60, $00, $00, $08, $62, $00, $00, $00
db $6E, $20, $00, $08, $6C, $20, $00, $00
db $64, $00, $00, $08, $66, $00, $FD, $F8
db $6E, $20, $FD, $00, $6C, $20, $FD, $08
db $6E, $20, $FD, $10, $6C, $20, $00, $00
db $68, $00, $00, $08, $6A, $00, $FD, $F8
db $6E, $20, $FD, $00, $6C, $20, $00, $F8
db $6C, $00, $00, $00, $6E, $00, $00, $00
db $60, $00, $00, $08, $62, $00, $00, $00
db $FF, $00, $00, $00, $FF, $00, $00, $F0
db $6C, $00, $00, $F8, $6E, $00, $00, $00
db $60, $00, $00, $08, $62, $00, $00, $00
db $FF, $00, $00, $00, $FF, $00, $00, $E8
db $6C, $00, $00, $F0, $6E, $00, $00, $00
db $60, $00, $00, $08, $62, $00, $00, $00
db $FF, $00, $00, $00, $FF, $00, $F8, $10
db $6C, $00, $F8, $18, $6E, $00, $00, $00
db $68, $00, $00, $08, $6A, $00, $FD, $F8
db $6E, $20, $FD, $00, $6C, $20, $F0, $08
db $6C, $00, $F0, $10, $6E, $00, $00, $00
db $68, $00, $00, $08, $6A, $00, $FD, $F8
db $6E, $20, $FD, $00, $6C, $20, $FC, $08
db $6E, $20, $FC, $10, $6C, $20, $00, $00
db $68, $00, $00, $08, $6A, $00, $FD, $F8
db $6E, $20, $FD, $00, $6C, $20, $00, $10
db $6E, $20, $00, $18, $6C, $20, $00, $00
db $68, $00, $00, $08, $6A, $00, $FD, $F8
db $6E, $20, $FD, $00, $6C, $20, $04, $08
db $6E, $20, $04, $10, $6C, $20, $00, $00
db $68, $00, $00, $08, $6A, $00, $FD, $F8
db $6E, $20, $FD, $00, $6C, $20, $08, $00
db $6C, $00, $08, $08, $6E, $00, $00, $00
db $64, $00, $00, $08, $66, $00, $00, $00
db $FF, $00, $00, $00, $FF, $00, $08, $F8
db $6C, $00, $08, $00, $6E, $00, $00, $00
db $60, $00, $00, $08, $62, $00, $00, $00
db $FF, $00, $00, $00, $FF, $00, $05, $F0
db $6C, $00, $05, $F8, $6E, $00, $00, $00
db $60, $00, $00, $08, $62, $00, $00, $00
db $FF, $00, $00, $00, $FF, $00, $F4, $F0
db $6E, $20, $F4, $F8, $6C, $20, $00, $00
db $60, $00, $00, $08, $62, $00, $00, $00
db $FF, $00, $00, $00, $FF, $00, $3E, $80
db $EA, $C0, $D5, $EA, $C2, $D5, $F0, $F1
db $CB, $27, $CB, $27, $50, $CB, $27, $5F
db $CB, $12, $CB, $27, $CB, $12, $83, $5F
db $7A, $CE, $00, $57, $AF, $E0, $E8, $21
db $80, $C3, $09, $7E, $A7, $20, $08, $3C
db $E0, $E8, $21, $ED, $FF, $CB, $EE, $21
db $16, $67, $19, $0E, $06, $E5, $FA, $C0
db $C3, $5F, $16, $00, $21, $30, $C0, $19
db $E5, $D1, $E1, $79, $E0, $D7, $FA, $23
db $C1, $4F, $CD, $87, $3D, $F0, $D7, $4F
db $FA, $C2, $D5, $FE, $80, $20, $06, $7E
db $C6, $08, $EA, $C2, $D5, $F0, $EC, $86
db $12, $23, $13, $C5, $FA, $55, $C1, $4F
db $46, $F0, $E8, $A7, $28, $06, $78, $2F
db $3C, $C6, $08, $47, $FA, $C0, $D5, $FE
db $80, $20, $0B, $F0, $E8, $A7, $78, $20
db $02, $C6, $08, $EA, $C0, $D5, $F0, $EE
db $80, $91, $12, $23, $13, $C1, $2A, $12
db $FE, $FF, $20, $04, $1B, $AF, $12, $13
db $13, $F0, $ED, $AE, $23, $12, $13, $0D
db $20, $AE, $3E, $08, $EA, $C1, $D5, $3E
db $04, $EA, $C3, $D5, $FA, $23, $C1, $4F
db $3E, $06, $CD, $D0, $3D, $C3, $19, $3D
db $00, $FE, $FD, $FE, $00, $02, $03, $02
db $00, $04, $08, $0C, $10, $0C, $08, $04
db $21, $10, $C0, $F0, $E7, $1F, $1F, $1F
db $F5, $E6, $07, $CD, $A3, $69, $F1, $C6
db $04, $E6, $07, $C5, $E5, $5F, $16, $00
db $21, $80, $69, $19, $46, $21, $88, $69
db $19, $4E, $E1, $F0, $99, $80, $C6, $F6
db $22, $F0, $98, $81, $C6, $FC, $22, $36
db $24, $23, $36, $00, $23, $C1, $C9, $21
db $B0, $C2, $09, $7E, $FE, $02, $CA, $ED
db $6E, $A7, $C2, $3E, $6F, $F0, $EA, $FE
db $01, $20, $61, $F0, $EE, $E0, $D7, $F0
db $EC, $E0, $D8, $3E, $02, $CD, $53, $09
db $3E, $0C, $E0, $E8, $CD, $FC, $69, $3E
db $F4, $E0, $E8, $CD, $FC, $69, $CD, $88
db $3F, $C3, $76, $7E, $3E, $BD, $CD, $01
db $3C, $38, $38, $21, $60, $C4, $09, $7E
db $21, $60, $C4, $19, $77, $F0, $D7, $21
db $00, $C2, $19, $77, $F0, $D8, $21, $10
db $C2, $19, $77, $F0, $DA, $21, $10, $C3
db $19, $77, $21, $B0, $C2, $19, $36, $01
db $F0, $E8, $21, $40, $C2, $19, $77, $21
db $E0, $C2, $19, $36, $20, $21, $60, $C3
db $19, $36, $01, $C9, $CD, $C9, $6E, $F0
db $F6, $21, $E0, $C3, $09, $BE, $28, $0E
db $F0, $EE, $FE, $98, $D2, $76, $7E, $F0
db $EC, $FE, $70, $D2, $76, $7E, $CD, $61
db $7D, $CD, $83, $7D, $CD, $CD, $7D, $CD
db $06, $7E, $F0, $F0, $C7, $75, $6A, $96
db $6A, $68, $6B, $A9, $6B, $B9, $6C, $E5
db $6C, $36, $6D, $4F, $6D, $21, $60, $C3
db $09, $36, $03, $CD, $91, $08, $36, $C0
db $21, $50, $C4, $09, $36, $80, $CD, $AF
db $3D, $21, $40, $C2, $09, $36, $08, $C3
db $8D, $3B, $08, $F8, $08, $F8, $CD, $08
db $6E, $CD, $20, $7E, $C6, $1C, $FE, $38
db $30, $2B, $CD, $40, $7E, $C6, $20, $FE
db $40, $30, $22, $3E, $10, $CD, $30, $3C
db $F0, $D7, $2F, $3C, $21, $50, $C2, $09
db $77, $F0, $D8, $2F, $3C, $21, $40, $C2
db $09, $77, $CD, $8D, $3B, $36, $03, $21
db $C0, $C2, $09, $36, $FF, $21, $50, $C4
db $09, $7E, $A7, $20, $0B, $CD, $8D, $3B
db $36, $02, $CD, $91, $08, $36, $20, $C9
db $21, $20, $C3, $09, $70, $21, $10, $C3
db $09, $7E, $D6, $28, $28, $0D, $1E, $08
db $E6, $80, $20, $02, $1E, $F8, $21, $20
db $C3, $09, $73, $21, $A0, $C2, $09, $7E
db $E6, $03, $28, $12, $5F, $50, $21, $93
db $6A, $19, $7E, $21, $50, $C2, $09, $77
db $21, $40, $C2, $09, $36, $00, $21, $A0
db $C2, $09, $7E, $1F, $1F, $E6, $03, $28
db $12, $5F, $50, $21, $91, $6A, $19, $7E
db $21, $40, $C2, $09, $77, $21, $50, $C2
db $09, $36, $00, $CD, $91, $08, $20, $0E
db $CD, $ED, $27, $E6, $7F, $C6, $40, $77
db $21, $F0, $C2, $09, $36, $10, $21, $F0
db $C2, $09, $7E, $A7, $28, $0C, $FE, $08
db $20, $03, $CD, $65, $6D, $3E, $02, $C3
db $87, $3B, $CD, $25, $6E, $F0, $E7, $1F
db $1F, $1F, $E6, $01, $CD, $87, $3B, $C9
db $CD, $91, $08, $20, $33, $CD, $8D, $3B
db $36, $03, $F0, $99, $F5, $D6, $14, $E0
db $99, $3E, $20, $CD, $25, $3C, $F1, $E0
db $99, $21, $20, $C3, $09, $36, $EC, $21
db $50, $C4, $09, $36, $30, $CD, $ED, $27
db $E6, $03, $21, $C0, $C2, $09, $77, $A7
db $20, $05, $CD, $91, $08, $36, $10, $C9
db $CD, $A0, $6C, $3E, $02, $CD, $87, $3B
db $C9, $21, $C0, $C2, $09, $7E, $FE, $FF
db $28, $42, $CD, $20, $7E, $C6, $18, $FE
db $30, $30, $39, $CD, $40, $7E, $C6, $18
db $FE, $30, $30, $30, $21, $20, $C4, $09
db $7E, $A7, $20, $28, $FA, $37, $C1, $A7
db $28, $22, $3E, $20, $CD, $30, $3C, $F0
db $D7, $2F, $3C, $21, $50, $C2, $09, $77
db $F0, $D8, $2F, $3C, $21, $40, $C2, $09
db $77, $CD, $91, $08, $36, $0B, $CD, $8D
db $3B, $36, $06, $C9, $21, $C0, $C2, $09
db $7E, $FE, $FF, $28, $08, $A7, $20, $30
db $CD, $91, $08, $20, $2B, $3E, $20, $CD
db $30, $3C, $F0, $D7, $2F, $3C, $21, $50
db $C2, $09, $96, $E6, $80, $20, $04, $34
db $34, $34, $34, $35, $35, $F0, $D8, $2F
db $3C, $21, $40, $C2, $09, $96, $E6, $80
db $20, $04, $34, $34, $34, $34, $35, $35
db $21, $10, $C3, $09, $7E, $FE, $40, $38
db $0C, $21, $20, $C3, $09, $7E, $E6, $80
db $20, $03, $70, $18, $10, $21, $20, $C3
db $09, $F0, $E7, $E6, $01, $20, $01, $34
db $7E, $E6, $80, $20, $30, $21, $50, $C4
db $09, $7E, $A7, $28, $10, $F0, $EE, $FE
db $A8, $30, $0A, $F0, $EC, $FE, $90, $38
db $1C, $FE, $C0, $30, $18, $CD, $8D, $3B
db $36, $04, $CD, $A0, $6C, $CD, $91, $08
db $CD, $ED, $27, $E6, $3F, $C6, $20, $77
db $3E, $FF, $C3, $87, $3B, $CD, $B4, $3B
db $21, $20, $C4, $09, $7E, $A7, $28, $0A
db $CD, $AF, $3D, $21, $C0, $C2, $09, $36
db $FF, $C9, $CD, $25, $6E, $C3, $5D, $6B
db $CD, $AF, $3D, $21, $20, $C3, $09, $70
db $C9, $00, $00, $D0, $D0, $40, $40, $80
db $80, $08, $98, $38, $78, $F8, $A8, $F8
db $A8, $CD, $91, $08, $20, $26, $21, $10
db $C3, $09, $36, $28, $CD, $8D, $3B, $36
db $05, $CD, $ED, $27, $E6, $07, $5F, $50
db $21, $A9, $6C, $19, $7E, $21, $10, $C2
db $09, $77, $21, $B1, $6C, $19, $7E, $21
db $00, $C2, $09, $77, $C9, $3E, $08, $CD
db $25, $3C, $F0, $EE, $FE, $09, $38, $2F
db $FE, $97, $30, $2B, $F0, $EC, $FE, $20
db $38, $25, $FE, $70, $30, $21, $CD, $8D
db $3B, $36, $01, $21, $50, $C4, $09, $CD
db $ED, $27, $E6, $3F, $C6, $20, $77, $21
db $40, $C2, $09, $7E, $2F, $3C, $77, $21
db $50, $C2, $09, $7E, $2F, $3C, $77, $C3
db $5D, $6B, $00, $09, $12, $15, $18, $15
db $12, $09, $00, $F7, $EE, $EB, $E8, $EB
db $EE, $F7, $00, $09, $12, $15, $CD, $91
db $08, $20, $0A, $36, $20, $CD, $8D, $3B
db $36, $07, $C3, $A0, $6C, $FE, $08, $38
db $03, $CD, $85, $6C, $C3, $5D, $6B, $CD
db $91, $08, $20, $0C, $21, $C0, $C2, $09
db $36, $FF, $CD, $8D, $3B, $36, $03, $C9
db $FE, $08, $C2, $03, $6E, $3E, $0D, $E0
db $F4, $F0, $99, $F5, $D6, $08, $E0, $99
db $3E, $1F, $CD, $30, $3C, $F1, $E0, $99
db $CD, $1B, $7B, $E6, $0F, $E0, $E8, $1E
db $00, $CD, $86, $6D, $1E, $01, $F0, $E8
db $83, $E6, $0F, $E0, $E8, $1E, $0F, $50
db $21, $80, $C2, $19, $7E, $A7, $28, $13
db $21, $A0, $C3, $19, $7E, $FE, $BD, $20
db $0A, $21, $B0, $C2, $19, $7E, $FE, $02
db $20, $01, $04, $1D, $7B, $FE, $FF, $20
db $DF, $78, $06, $00, $FE, $03, $30, $4A
db $3E, $BD, $CD, $01, $3C, $38, $43, $F0
db $D7, $21, $00, $C2, $19, $77, $F0, $D8
db $21, $DA, $FF, $96, $21, $10, $C2, $19
db $77, $21, $B0, $C2, $19, $36, $02, $21
db $40, $C3, $19, $36, $02, $21, $60, $C3
db $19, $36, $4C, $C5, $F0, $E8, $4F, $21
db $26, $6D, $09, $7E, $21, $40, $C2, $19
db $77, $21, $22, $6D, $09, $7E, $21, $50
db $C2, $19, $77, $21, $E0, $C2, $19, $36
db $20, $C1, $C9, $3E, $02, $C3, $87, $3B
db $21, $10, $C2, $09, $7E, $D6, $28, $77
db $F0, $EF, $D6, $28, $E0, $EF, $CD, $9E
db $3B, $21, $10, $C2, $09, $7E, $C6, $28
db $77, $CD, $BA, $3D, $C9, $1E, $0F, $50
db $21, $80, $C2, $19, $7E, $FE, $05, $20
db $6D, $21, $A0, $C3, $19, $7E, $FE, $03
db $28, $08, $FE, $00, $28, $04, $FE, $02
db $20, $5C, $21, $00, $C2, $19, $F0, $EE
db $96, $C6, $18, $FE, $30, $30, $4F, $21
db $10, $C2, $19, $F0, $EC, $96, $C6, $20
db $FE, $40, $30, $42, $F0, $99, $F5, $F0
db $98, $F5, $7E, $E0, $99, $21, $00, $C2
db $19, $7E, $E0, $98, $D5, $3E, $20, $CD
db $30, $3C, $D1, $F0, $D8, $2F, $3C, $20
db $02, $3E, $20, $21, $40, $C2, $09, $77
db $F0, $D7, $2F, $3C, $20, $02, $3E, $20
db $21, $50, $C2, $09, $77, $F1, $E0, $98
db $F1, $E0, $99, $CD, $8D, $3B, $36, $03
db $21, $C0, $C2, $09, $36, $01, $1D, $7B
db $FE, $FF, $20, $83, $C9, $00, $FC, $60
db $00, $00, $04, $62, $00, $00, $0C, $60
db $20, $00, $FC, $64, $00, $00, $04, $66
db $00, $00, $0C, $64, $20, $00, $FC, $68
db $00, $00, $04, $6A, $00, $00, $0C, $68
db $20, $F0, $F1, $FE, $FF, $C8, $17, $17
db $E6, $FC, $5F, $17, $E6, $F8, $83, $5F
db $50, $21, $A5, $6E, $19, $0E, $03, $CD
db $26, $3D, $C3, $19, $3D, $1E, $00, $1E
db $60, $1E, $40, $1E, $20, $11, $E5, $6E
db $CD, $3B, $3C, $CD, $61, $7D, $CD, $E2
db $08, $F0, $E7, $1F, $1F, $E6, $01, $CD
db $87, $3B, $CD, $EB, $3B, $CD, $BF, $3B
db $38, $15, $21, $10, $C4, $09, $7E, $A7
db $28, $10, $F0, $EE, $E0, $D7, $F0, $EC
db $E0, $D8, $3E, $02, $CD, $53, $09, $C3
db $76, $7E, $CD, $CD, $7D, $CD, $91, $08
db $C0, $CD, $9E, $3B, $21, $A0, $C2, $09
db $7E, $A7, $C2, $76, $7E, $C9, $6C, $00
db $6C, $20, $6E, $00, $6E, $20, $11, $36
db $6F, $CD, $3B, $3C, $CD, $61, $7D, $CD
db $83, $7D, $CD, $CD, $7D, $F0, $E7, $E6
db $03, $20, $10, $21, $10, $C3, $09, $7E
db $D6, $10, $28, $07, $E6, $80, $28, $02
db $34, $34, $35, $F0, $E7, $1F, $1F, $1F
db $E6, $01, $CD, $87, $3B, $F0, $F0, $C7
db $76, $6F, $84, $6F, $94, $6F, $CD, $91
db $08, $20, $08, $36, $20, $CD, $AF, $3D
db $CD, $8D, $3B, $C9, $CD, $91, $08, $20
db $0A, $36, $20, $3E, $20, $CD, $25, $3C
db $CD, $8D, $3B, $C9, $CD, $B4, $3B, $CD
db $91, $08, $C0, $CD, $9E, $3B, $21, $A0
db $C2, $09, $7E, $A7, $C2, $76, $7E, $C9
db $21, $B0, $C2, $09, $7E, $A7, $C2, $66
db $71, $21, $40, $C3, $09, $CB, $F6, $CD
db $44, $71, $CD, $0E, $38, $CD, $12, $3F
db $CD, $61, $7D, $FA, $8F, $C1, $A7, $28
db $31, $21, $D0, $C2, $09, $7E, $A7, $20
db $09, $34, $3E, $25, $CD, $97, $21, $C3
db $2B, $7F, $FE, $01, $20, $05, $3E, $3F
db $E0, $F4, $34, $21, $20, $C3, $09, $36
db $20, $CD, $06, $7E, $21, $10, $C3, $09
db $7E, $FE, $78, $D8, $CD, $BD, $27, $C3
db $76, $7E, $F0, $F0, $C7, $0B, $70, $13
db $70, $2B, $70, $67, $70, $DC, $70, $F8
db $70, $0C, $71, $3E, $07, $EA, $05, $D2
db $C3, $8D, $3B, $CD, $91, $08, $36, $80
db $AF, $EA, $01, $D2, $EA, $02, $D2, $FA
db $05, $D2, $3C, $E6, $07, $EA, $05, $D2
db $C3, $8D, $3B, $CD, $91, $08, $20, $2A
db $36, $FF, $21, $30, $C4, $09, $CB, $8E
db $1E, $0F, $50, $21, $A0, $C3, $19, $7E
db $FE, $BC, $20, $0D, $21, $B0, $C2, $19
db $7E, $A7, $28, $05, $21, $80, $C2, $19
db $70, $1D, $7B, $FE, $FF, $20, $E4, $C3
db $8D, $3B, $C9, $78, $68, $58, $48, $38
db $28, $00, $00, $00, $00, $00, $00, $CD
db $91, $08, $20, $0A, $21, $30, $C4, $09
db $CB, $CE, $CD, $8D, $3B, $AF, $E6, $1F
db $20, $55, $21, $D0, $C3, $09, $7E, $FE
db $06, $30, $4C, $3E, $BC, $CD, $01, $3C
db $38, $45, $3E, $31, $E0, $F2, $21, $D0
db $C3, $09, $C5, $4E, $34, $21, $5B, $70
db $09, $7E, $21, $00, $C2, $19, $77, $21
db $61, $70, $09, $7E, $21, $10, $C2, $19
db $77, $21, $10, $C3, $19, $36, $1C, $21
db $D0, $C3, $19, $71, $21, $30, $C4, $19
db $7E, $E6, $7B, $77, $21, $60, $C3, $19
db $36, $01, $21, $B0, $C2, $19, $36, $01
db $21, $40, $C3, $19, $CB, $F6, $C1, $F0
db $E7, $1F, $1F, $1F, $1F, $1F, $E6, $01
db $CD, $87, $3B, $C9, $FA, $01, $D2, $FE
db $06, $20, $11, $21, $D0, $C3, $09, $70
db $AF, $EA, $01, $D2, $CD, $91, $08, $36
db $40, $CD, $8D, $3B, $CD, $CF, $70, $C9
db $CD, $91, $08, $20, $0E, $3E, $FF, $EA
db $01, $D2, $21, $50, $C4, $09, $36, $40
db $CD, $8D, $3B, $C9, $21, $50, $C4, $09
db $7E, $A7, $20, $05, $CD, $8D, $3B, $36
db $01, $3E, $02, $CD, $87, $3B, $C9, $C9
db $00, $F8, $60, $00, $00, $00, $62, $00
db $00, $08, $64, $00, $00, $F8, $66, $00
db $00, $00, $62, $00, $00, $08, $64, $00
db $10, $00, $68, $00, $00, $00, $62, $00
db $00, $08, $64, $00, $F0, $F1, $17, $17
db $E6, $FC, $5F, $CB, $27, $83, $5F, $50
db $21, $20, $71, $19, $0E, $03, $CD, $26
db $3D, $3E, $01, $C3, $D0, $3D, $6E, $00
db $6E, $20, $6E, $40, $6E, $60, $11, $5E
db $71, $CD, $3B, $3C, $CD, $61, $7D, $CD
db $E2, $08, $F0, $F0, $C7, $DF, $71, $4C
db $72, $69, $72, $8C, $72, $B9, $72, $28
db $38, $48, $58, $68, $78, $38, $68, $48
db $58, $48, $58, $18, $88, $28, $78, $60
db $40, $28, $78, $78, $28, $60, $40, $28
db $78, $28, $78, $50, $50, $38, $68, $50
db $50, $38, $68, $38, $68, $38, $68, $38
db $68, $28, $78, $38, $48, $68, $58, $20
db $30, $40, $40, $30, $20, $60, $60, $50
db $70, $70, $50, $38, $38, $58, $58, $70
db $70, $30, $30, $70, $70, $50, $50, $30
db $70, $70, $30, $30, $70, $40, $60, $70
db $30, $60, $40, $30, $30, $50, $50, $70
db $70, $40, $40, $50, $40, $50, $40, $F0
db $98, $F5, $F0, $99, $F5, $FA, $05, $D2
db $17, $E6, $FE, $5F, $17, $E6, $FC, $83
db $21, $D0, $C3, $09, $86, $5F, $50, $21
db $7F, $71, $19, $7E, $E0, $98, $21, $AF
db $71, $19, $7E, $E0, $99, $F0, $E7, $A9
db $E6, $03, $20, $05, $3E, $10, $CD, $25
db $3C, $21, $EE, $FF, $F0, $98, $96, $C6
db $03, $FE, $06, $30, $13, $21, $EC, $FF
db $F0, $99, $96, $C6, $03, $FE, $06, $30
db $07, $21, $01, $D2, $34, $CD, $8D, $3B
db $F1, $E0, $99, $F1, $E0, $98, $CD, $CD
db $7D, $F0, $E7, $1F, $1F, $1F, $E6, $01
db $CD, $87, $3B, $C9, $04, $0C, $14, $1C
db $24, $2C, $34, $3C, $FA, $01, $D2, $FE
db $FF, $20, $13, $21, $D0, $C3, $09, $5E
db $50, $21, $44, $72, $19, $7E, $21, $50
db $C4, $09, $77, $CD, $8D, $3B, $C3, $39
db $72, $21, $50, $C4, $09, $7E, $A7, $20
db $18, $21, $40, $C3, $09, $CB, $B6, $3E
db $20, $CD, $25, $3C, $21, $20, $C3, $09
db $36, $F4, $3E, $31, $E0, $F2, $CD, $8D
db $3B, $C3, $39, $72, $CD, $B4, $3B, $CD
db $36, $72, $CD, $06, $7E, $F0, $E7, $E6
db $03, $20, $0A, $21, $20, $C3, $09, $7E
db $FE, $0C, $28, $01, $34, $F0, $EC, $FE
db $88, $30, $05, $F0, $EE, $FE, $A8, $D8
db $CD, $8D, $3B, $3E, $FF, $CD, $87, $3B
db $C9, $C9, $7A, $10, $7E, $30, $7A, $30
db $7E, $10, $7C, $10, $7C, $30, $F0, $F8
db $E6, $20, $C2, $76, $7E, $21, $B0, $C2
db $09, $7E, $A7, $28, $20, $11, $BA, $72
db $CD, $D0, $3C, $CD, $61, $7D, $CD, $CD
db $7D, $CD, $06, $7E, $21, $20, $C3, $09
db $35, $35, $21, $10, $C3, $09, $7E, $E6
db $80, $C2, $76, $7E, $C9, $21, $20, $C4
db $09, $7E, $A7, $28, $04, $3E, $07, $E0
db $F1, $CD, $3B, $76, $F0, $F0, $A7, $20
db $1F, $FA, $4A, $DB, $FE, $02, $20, $18
db $FA, $66, $C1, $A7, $28, $12, $CD, $8D
db $3B, $21, $30, $C4, $09, $CB, $FE, $CB
db $D6, $21, $60, $C3, $09, $36, $10, $C9
db $F0, $EA, $FE, $05, $28, $15, $CD, $7C
db $7E, $21, $80, $C2, $09, $7E, $A7, $20
db $09, $21, $10, $D8, $CB, $EE, $3E, $02
db $E0, $F2, $C9, $CD, $61, $7D, $CD, $E2
db $08, $CD, $EB, $3B, $F0, $F0, $FE, $05
db $30, $05, $CD, $AF, $7C, $18, $03, $CD
db $BF, $3B, $F0, $F0, $C7, $75, $73, $76
db $73, $89, $73, $D3, $73, $42, $74, $64
db $74, $8F, $74, $A0, $74, $B7, $74, $EC
db $74, $08, $75, $1C, $75, $C9, $CD, $91
db $08, $36, $80, $3E, $39, $EA, $68, $D3
db $E0, $B0, $E0, $BD, $E0, $BF, $C3, $8D
db $3B, $F0, $EE, $21, $40, $C4, $09, $77
db $F0, $EC, $21, $D0, $C2, $09, $D6, $14
db $77, $CD, $91, $08, $20, $06, $36, $FF
db $CD, $8D, $3B, $C9, $1E, $08, $E6, $04
db $28, $02, $1E, $F8, $21, $40, $C2, $09
db $73, $CD, $DA, $7D, $C9, $F8, $08, $10
db $00, $00, $08, $F0, $00, $F0, $00, $F0
db $F0, $F8, $08, $08, $F8, $F8, $08, $FC
db $02, $FC, $02, $FC, $FC, $10, $10, $10
db $10, $10, $10, $CD, $91, $08, $20, $06
db $36, $80, $CD, $8D, $3B, $C9, $E6, $1F
db $20, $5F, $F0, $F1, $FE, $06, $28, $4E
db $3E, $13, $E0, $F4, $3E, $7F, $CD, $01
db $3C, $C5, $F0, $F1, $4F, $21, $B0, $C3
db $19, $77, $21, $B5, $73, $09, $F0, $D7
db $86, $21, $00, $C2, $19, $77, $21, $BB
db $73, $09, $F0, $D8, $86, $21, $10, $C2
db $19, $77, $21, $C1, $73, $09, $7E, $21
db $40, $C2, $19, $77, $21, $C7, $73, $09
db $7E, $21, $50, $C2, $19, $77, $21, $CD
db $73, $09, $7E, $21, $20, $C3, $19, $77
db $21, $B0, $C2, $19, $77, $C1, $21, $B0
db $C3, $09, $7E, $FE, $07, $28, $02, $3C
db $77, $C9, $CD, $91, $08, $20, $05, $36
db $80, $C3, $8D, $3B, $1E, $07, $FE, $60
db $30, $0C, $FE, $40, $30, $09, $FE, $30
db $38, $04, $FE, $20, $38, $01, $1C, $7B
db $CD, $87, $3B, $C9, $CD, $91, $08, $20
db $1C, $36, $40, $21, $40, $C3, $09, $CB
db $BE, $21, $30, $C4, $09, $CB, $B6, $CD
db $8D, $3B, $F0, $EE, $EA, $01, $D2, $F0
db $EC, $EA, $02, $D2, $C9, $21, $50, $C2
db $09, $36, $04, $CD, $D0, $7D, $C9, $CD
db $91, $08, $20, $0B, $36, $20, $21, $40
db $C2, $09, $36, $08, $CD, $8D, $3B, $C9
db $CD, $91, $08, $20, $0E, $CD, $91, $08
db $CD, $ED, $27, $E6, $1F, $C6, $08, $77
db $CD, $8D, $3B, $CD, $DA, $7D, $C9, $CD
db $91, $08, $20, $2F, $21, $90, $C3, $09
db $34, $7E, $FE, $03, $38, $13, $CD, $ED
db $27, $E6, $01, $20, $0C, $CD, $8D, $3B
db $3E, $09, $77, $CD, $91, $08, $36, $20
db $C9, $CD, $91, $08, $36, $40, $CD, $8D
db $3B, $35, $35, $21, $40, $C2, $09, $7E
db $2F, $3C, $77, $C9, $CD, $91, $08, $20
db $16, $36, $20, $3E, $18, $CD, $25, $3C
db $21, $50, $C2, $09, $7E, $CB, $7E, $28
db $03, $2F, $3C, $77, $CD, $8D, $3B, $C9
db $21, $20, $C4, $09, $7E, $A7, $20, $05
db $CD, $91, $08, $20, $03, $CD, $8D, $3B
db $CD, $CD, $7D, $C9, $F0, $98, $F5, $F0
db $99, $F5, $FA, $01, $D2, $E0, $98, $FA
db $02, $D2, $E0, $99, $3E, $08, $CD, $25
db $3C, $FA, $01, $D2, $21, $EE, $FF, $96
db $C6, $01, $FE, $02, $30, $17, $FA, $02
db $D2, $21, $EC, $FF, $96, $C6, $01, $FE
db $02, $30, $0A, $CD, $8D, $3B, $36, $06
db $CD, $91, $08, $36, $20, $F1, $E0, $99
db $F1, $E0, $98, $CD, $CD, $7D, $C9, $F0
db $F8, $7A, $10, $F0, $00, $7C, $10, $F0
db $08, $7C, $30, $F0, $10, $7A, $30, $00
db $00, $7E, $10, $00, $08, $7E, $30, $F0
db $F8, $70, $00, $F0, $00, $7C, $10, $F0
db $08, $7C, $30, $F0, $10, $7A, $30, $00
db $00, $7E, $10, $00, $08, $7E, $30, $F0
db $F8, $70, $00, $F0, $00, $7C, $10, $F0
db $08, $7C, $30, $F0, $10, $7A, $30, $00
db $00, $7E, $10, $00, $08, $74, $20, $F0
db $F8, $70, $00, $F0, $00, $7C, $10, $F0
db $08, $7C, $30, $F0, $10, $70, $20, $00
db $00, $7E, $10, $00, $08, $74, $20, $F0
db $F8, $70, $00, $F0, $00, $7C, $10, $F0
db $08, $7C, $30, $F0, $10, $70, $20, $00
db $00, $74, $00, $00, $08, $74, $20, $F0
db $F8, $70, $00, $F0, $00, $78, $00, $F0
db $08, $7C, $30, $F0, $10, $70, $20, $00
db $00, $74, $00, $00, $08, $74, $20, $F0
db $F8, $70, $00, $F0, $00, $78, $00, $F0
db $08, $78, $20, $F0, $10, $70, $20, $00
db $00, $74, $00, $00, $08, $74, $20, $F0
db $F8, $70, $00, $F0, $00, $78, $00, $F0
db $08, $78, $20, $F0, $10, $70, $20, $00
db $00, $74, $00, $00, $08, $74, $20, $F0
db $F8, $70, $00, $F0, $00, $72, $00, $F0
db $08, $72, $20, $F0, $10, $70, $20, $00
db $00, $74, $00, $00, $08, $74, $20, $76
db $00, $76, $20, $F0, $F1, $17, $17, $17
db $E6, $F8, $5F, $17, $83, $5F, $50, $21
db $5F, $75, $19, $0E, $06, $CD, $26, $3D
db $3E, $06, $CD, $D0, $3D, $F0, $EA, $FE
db $01, $28, $07, $F0, $F0, $FE, $05, $DA
db $F7, $76, $21, $40, $C4, $09, $7E, $E0
db $E8, $F0, $EE, $96, $CB, $2F, $E0, $E1
db $CB, $2F, $E0, $E2, $CB, $2F, $E0, $E3
db $CB, $2F, $E0, $E4, $CB, $2F, $E0, $E5
db $CB, $2F, $E0, $E6, $21, $D0, $C2, $09
db $7E, $E0, $E9, $F0, $EC, $D6, $20, $BE
db $38, $65, $E0, $EC, $AF, $E0, $F1, $21
db $E1, $FF, $F0, $E8, $86, $E0, $EE, $23
db $E5, $11, $37, $76, $CD, $3B, $3C, $FA
db $C7, $DB, $A7, $20, $3B, $21, $EC, $FF
db $F0, $99, $96, $C6, $0C, $FE, $18, $30
db $2F, $21, $EE, $FF, $F0, $98, $96, $5F
db $C6, $0C, $FE, $18, $30, $22, $7B, $1E
db $20, $E6, $80, $28, $02, $1E, $E0, $7B
db $E0, $9A, $AF, $E0, $9B, $3E, $18, $EA
db $3E, $C1, $3E, $10, $EA, $C7, $DB, $3E
db $08, $EA, $94, $DB, $3E, $03, $E0, $F3
db $E1, $F0, $E9, $5F, $F0, $EC, $D6, $10
db $E0, $EC, $93, $E6, $80, $28, $A3, $CD
db $BA, $3D, $C9, $62, $00, $64, $00, $60
db $00, $60, $20, $64, $20, $62, $20, $66
db $00, $68, $00, $60, $00, $60, $20, $68
db $20, $66, $20, $6C, $00, $6E, $00, $6A
db $00, $6A, $20, $6E, $20, $6C, $20, $00
db $01, $02, $01, $03, $04, $05, $04, $06
db $07, $08, $07, $11, $FB, $76, $CD, $3B
db $3C, $CD, $61, $7D, $CD, $83, $7D, $CD
db $B4, $3B, $F0, $F0, $C7, $4B, $77, $A5
db $77, $FA, $FC, $00, $04, $06, $04, $00
db $FC, $FA, $FC, $CD, $91, $08, $20, $20
db $CD, $ED, $27, $E6, $3F, $C6, $30, $77
db $E6, $07, $5F, $50, $21, $43, $77, $19
db $7E, $21, $40, $C2, $09, $77, $21, $41
db $77, $19, $7E, $21, $50, $C2, $09, $77
db $CD, $CD, $7D, $CD, $9E, $3B, $21, $B0
db $C2, $09, $7E, $21, $1F, $77, $A7, $28
db $15, $CD, $0E, $7D, $30, $0D, $21, $C0
db $C2, $09, $7E, $E6, $03, $C6, $7C, $34
db $CD, $8E, $21, $21, $27, $77, $F0, $E7
db $1F, $1F, $1F, $E6, $03, $5F, $50, $19
db $7E, $CD, $87, $3B, $C9, $CD, $91, $08
db $20, $05, $CD, $8D, $3B, $70, $C9, $21
db $23, $77, $CD, $96, $77, $C9, $00, $FC
db $70, $00, $00, $04, $72, $00, $00, $0C
db $70, $20, $00, $FC, $74, $00, $00, $04
db $72, $00, $00, $0C, $74, $20, $00, $FC
db $76, $00, $00, $04, $72, $00, $00, $0C
db $76, $20, $00, $FC, $74, $00, $00, $04
db $72, $00, $00, $0C, $74, $20, $10, $11
db $12, $11, $F0, $F1, $17, $17, $E6, $FC
db $5F, $17, $E6, $F8, $83, $5F, $50, $21
db $B6, $77, $19, $0E, $03, $CD, $26, $3D
db $CD, $61, $7D, $CD, $19, $3D, $21, $D0
db $C3, $09, $7E, $1F, $1F, $1F, $E6, $03
db $5F, $50, $21, $E6, $77, $19, $7E, $21
db $10, $C3, $09, $77, $CD, $83, $7D, $CD
db $CD, $7D, $CD, $9E, $3B, $F0, $F0, $C7
db $38, $78, $0B, $79, $1C, $79, $F8, $FA
db $00, $06, $08, $06, $00, $FA, $F8, $FA
db $CD, $91, $08, $20, $32, $CD, $ED, $27
db $E6, $1F, $C6, $20, $77, $E6, $07, $5F
db $50, $21, $30, $78, $19, $7E, $21, $40
db $C2, $09, $77, $21, $2E, $78, $19, $7E
db $21, $50, $C2, $09, $77, $21, $B0, $C2
db $09, $34, $7E, $E6, $07, $20, $05, $3E
db $0A, $CD, $25, $3C, $CD, $8D, $3B, $21
db $D0, $C3, $09, $7E, $34, $E6, $7F, $20
db $41, $3E, $02, $CD, $01, $3C, $38, $3A
db $21, $30, $C4, $19, $CB, $86, $F0, $D7
db $21, $00, $C2, $19, $77, $F0, $D8, $21
db $10, $C2, $19, $77, $F0, $DA, $21, $10
db $C3, $19, $77, $21, $20, $C3, $19, $36
db $08, $21, $E0, $C2, $19, $36, $40, $21
db $40, $C4, $19, $36, $01, $C5, $D5, $C1
db $3E, $10, $CD, $25, $3C, $C1, $3E, $08
db $E0, $F2, $CD, $4F, $7E, $F0, $9E, $EE
db $01, $BB, $20, $3A, $CD, $20, $7E, $C6
db $20, $FE, $40, $30, $31, $CD, $40, $7E
db $C6, $20, $FE, $40, $30, $28, $FA, $37
db $C1, $A7, $28, $22, $CD, $8D, $3B, $36
db $02, $CD, $91, $08, $36, $12, $3E, $20
db $CD, $30, $3C, $F0, $D7, $2F, $3C, $21
db $50, $C2, $09, $77, $F0, $D8, $2F, $3C
db $21, $40, $C2, $09, $77, $C9, $CD, $B4
db $3B, $F0, $E7, $1F, $1F, $E6, $03, $CD
db $87, $3B, $C9, $CD, $91, $08, $20, $09
db $36, $20, $CD, $8D, $3B, $70, $CD, $AF
db $3D, $C3, $6F, $78, $CD, $91, $08, $20
db $04, $CD, $8D, $3B, $70, $C3, $01, $79
db $6C, $74, $6D, $75, $64, $74, $65, $75
db $CD, $8A, $7A, $CD, $61, $7D, $F0, $F0
db $A7, $C2, $02, $7A, $CD, $91, $08, $CA
db $EB, $79, $FE, $07, $C2, $EE, $79, $C5
db $21, $00, $C2, $09, $7E, $C6, $07, $D6
db $08, $E6, $F0, $E0, $CE, $CB, $37, $21
db $10, $C2, $09, $4F, $7E, $C6, $07, $D6
db $10, $E6, $F0, $E0, $CD, $B1, $4F, $06
db $00, $21, $11, $D7, $7C, $09, $C5, $D1
db $67, $C1, $7E, $E0, $AF, $FE, $D3, $28
db $04, $FE, $5C, $20, $1C, $FA, $A5, $DB
db $A7, $20, $16, $CD, $A6, $20, $F0, $EE
db $E0, $D7, $F0, $EC, $E0, $D8, $3E, $02
db $CD, $53, $09, $3E, $2F, $E0, $F2, $18
db $52, $FA, $A5, $DB, $A7, $CA, $EE, $79
db $F0, $AF, $FE, $AB, $20, $5B, $36, $AC
db $54, $5D, $21, $B0, $C2, $09, $72, $21
db $C0, $C2, $09, $73, $21, $90, $C2, $09
db $36, $01, $CD, $87, $08, $36, $80, $21
db $00, $C2, $09, $F0, $CE, $77, $21, $10
db $C2, $09, $F0, $CD, $77, $21, $A2, $C1
db $34, $FA, $CD, $C3, $A7, $28, $05, $D6
db $04, $EA, $CD, $C3, $CD, $91, $08, $70
db $3E, $12, $E0, $F4, $11, $28, $79, $D5
db $C3, $A7, $7A, $C3, $76, $7E, $FE, $10
db $30, $0F, $21, $40, $C4, $09, $7E, $A7
db $C0, $3E, $09, $EA, $9E, $C1, $CD, $F6
db $3B, $C9, $CD, $87, $08, $20, $3A, $21
db $00, $C2, $09, $7E, $E0, $CE, $21, $10
db $C2, $09, $7E, $E0, $CD, $21, $B0, $C2
db $09, $56, $21, $C0, $C2, $09, $5E, $3E
db $AB, $12, $CD, $76, $7E, $F0, $F6, $FE
db $74, $C8, $21, $A2, $C1, $35, $FA, $CD
db $C3, $FE, $0C, $30, $05, $C6, $04, $EA
db $CD, $C3, $11, $2C, $79, $D5, $C3, $A7
db $7A, $C9, $06, $FE, $24, $00, $03, $04
db $24, $10, $05, $0A, $24, $00, $05, $FE
db $24, $10, $02, $04, $24, $00, $04, $0A
db $24, $10, $03, $FF, $24, $00, $01, $04
db $24, $10, $02, $09, $24, $00, $01, $00
db $24, $10, $FF, $04, $24, $00, $00, $06
db $24, $10, $00, $01, $24, $00, $FE, $03
db $24, $10, $FF, $05, $24, $00, $FF, $01
db $24, $10, $FD, $03, $24, $00, $FE, $05
db $24, $10, $CD, $91, $08, $28, $17, $1F
db $1F, $E6, $07, $CB, $27, $CB, $27, $5F
db $CB, $27, $83, $5F, $50, $21, $42, $7A
db $19, $0E, $03, $CD, $26, $3D, $C9, $CD
db $39, $28, $FA, $00, $D6, $5F, $16, $00
db $21, $01, $D6, $19, $C6, $0A, $EA, $00
db $D6, $D1, $F0, $CF, $22, $F0, $D0, $22
db $3E, $81, $22, $1A, $13, $22, $1A, $13
db $22, $F0, $CF, $22, $F0, $D0, $3C, $22
db $3E, $81, $22, $1A, $13, $22, $1A, $22
db $AF, $77, $C9, $00, $00, $01, $01, $01
db $02, $02, $02, $00, $00, $0F, $0F, $0F
db $0E, $0E, $0E, $08, $08, $07, $07, $07
db $06, $06, $06, $08, $08, $09, $09, $09
db $0A, $0A, $0A, $04, $04, $03, $03, $03
db $02, $02, $02, $0C, $0C, $0D, $0D, $0D
db $0E, $0E, $0E, $04, $04, $05, $05, $05
db $06, $06, $06, $0C, $0C, $0B, $0B, $0B
db $0A, $0A, $0A, $F0, $D7, $07, $E6, $01
db $5F, $F0, $D8, $07, $17, $E6, $02, $B3
db $17, $17, $17, $E6, $18, $67, $F0, $D8
db $CB, $7F, $28, $02, $2F, $3C, $57, $F0
db $D7, $CB, $7F, $28, $02, $2F, $3C, $BA
db $30, $0D, $CB, $2F, $CB, $2F, $84, $5F
db $50, $21, $DB, $7A, $19, $7E, $C9, $7A
db $CB, $2F, $CB, $2F, $84, $5F, $50, $21
db $FB, $7A, $19, $7E, $C9, $11, $10, $0F
db $0E, $3E, $02, $E0, $A1, $EA, $A4, $C1
db $EA, $C6, $C1, $79, $3C, $EA, $A6, $C1
db $AF, $CD, $3B, $09, $EA, $3E, $C1, $F0
db $9E, $5F, $16, $00, $21, $5D, $7B, $19
db $7E, $E0, $9D, $CD, $40, $7C, $CD, $61
db $7D, $F0, $E7, $E6, $03, $20, $04, $3E
db $0B, $E0, $F4, $F0, $F0, $A7, $28, $18
db $3E, $30, $CD, $30, $3C, $F0, $D7, $2F
db $3C, $E0, $9B, $F0, $D8, $2F, $3C, $E0
db $9A, $C5, $CD, $D6, $20, $C1, $18, $0D
db $CD, $CD, $7D, $CD, $91, $08, $20, $13
db $3E, $30, $CD, $25, $3C, $CD, $D5, $3B
db $30, $63, $AF, $EA, $C6, $C1, $CD, $76
db $7E, $18, $5A, $3E, $06, $EA, $9E, $C1
db $CD, $F6, $3B, $21, $A0, $C2, $09, $7E
db $A7, $20, $4B, $CD, $9E, $3B, $FA, $A5
db $DB, $A7, $28, $41, $CD, $6E, $64, $21
db $50, $C2, $09, $7E, $A7, $28, $36, $1E
db $9E, $CB, $7F, $20, $02, $1E, $9F, $F0
db $AF, $BB, $20, $29, $3E, $68, $CD, $01
db $3C, $21, $00, $C2, $19, $F0, $CE, $C6
db $08, $77, $21, $10, $C2, $19, $F0, $CD
db $C6, $10, $77, $F0, $AF, $FE, $9E, $3E
db $00, $28, $01, $3C, $21, $80, $C3, $19
db $77, $CD, $91, $08, $70, $C9, $CD, $91
db $08, $70, $3E, $07, $E0, $F2, $F0, $EE
db $E0, $D7, $F0, $EC, $E0, $D8, $3E, $05
db $CD, $53, $09, $C9, $36, $00, $36, $20
db $11, $3C, $7C, $CD, $3B, $3C, $F0, $EE
db $21, $98, $FF, $96, $CB, $2F, $CB, $2F
db $E0, $D7, $E0, $D9, $F0, $EF, $21, $99
db $FF, $96, $CB, $2F, $CB, $2F, $E0, $D8
db $E0, $DA, $FA, $C0, $C3, $5F, $16, $00
db $21, $30, $C0, $19, $E5, $D1, $3E, $03
db $E0, $DB, $21, $E7, $FF, $AE, $E6, $01
db $20, $07, $F0, $99, $21, $D8, $FF, $86
db $12, $13, $F0, $98, $21, $D7, $FF, $86
db $C6, $04, $12, $13, $3E, $24, $12, $13
db $3E, $00, $12, $13, $F0, $D7, $21, $D9
db $FF, $86, $E0, $D7, $F0, $D8, $21, $DA
db $FF, $86, $E0, $D8, $F0, $DB, $3D, $20
db $C7, $3E, $03, $CD, $D0, $3D, $C9, $CD
db $D5, $3B, $30, $1F, $CD, $4A, $09, $CD
db $42, $09, $FA, $A6, $C1, $A7, $28, $11
db $5F, $50, $21, $9F, $C3, $19, $7E, $FE
db $03, $20, $06, $21, $8F, $C2, $19, $36
db $00, $37, $C9, $A7, $C9, $06, $04, $02
db $00, $21, $80, $C3, $09, $5E, $50, $21
db $D5, $7C, $19, $E5, $21, $D0, $C3, $09
db $34, $7E, $1F, $1F, $1F, $1F, $E1, $E6
db $01, $B6, $C3, $87, $3B, $58, $F0, $99
db $21, $EF, $FF, $96, $C6, $18, $FE, $38
db $18, $17, $F0, $99, $21, $EF, $FF, $96
db $C6, $14, $FE, $38, $18, $0B, $58, $F0
db $99, $21, $EF, $FF, $96, $C6, $14, $FE
db $28, $30, $44, $F0, $98, $21, $EE, $FF
db $96, $C6, $10, $FE, $20, $30, $38, $1C
db $F0, $EB, $FE, $C4, $28, $0C, $D5, $CD
db $4F, $7E, $F0, $9E, $EE, $01, $BB, $D1
db $20, $25, $21, $AD, $C1, $36, $01, $FA
db $9F, $C1, $21, $4F, $C1, $B6, $21, $46
db $C1, $B6, $21, $34, $C1, $B6, $20, $0F
db $FA, $9A, $DB, $FE, $80, $20, $08, $F0
db $CC, $E6, $10, $28, $02, $37, $C9, $A7
db $C9, $F0, $EA, $FE, $05, $20, $1A, $FA
db $95, $DB, $FE, $07, $28, $13, $21, $A8
db $C1, $FA, $9F, $C1, $B6, $21, $4F, $C1
db $B6, $20, $06, $FA, $24, $C1, $A7, $28
db $01, $F1, $C9, $21, $10, $C4, $09, $7E
db $A7, $28, $41, $3D, $77, $CD, $B8, $3E
db $21, $40, $C2, $09, $7E, $F5, $21, $50
db $C2, $09, $7E, $F5, $21, $F0, $C3, $09
db $7E, $21, $40, $C2, $09, $77, $21, $00
db $C4, $09, $7E, $21, $50, $C2, $09, $77
db $CD, $CD, $7D, $21, $30, $C4, $09, $7E
db $E6, $20, $20, $03, $CD, $9E, $3B, $21
db $50, $C2, $09, $F1, $77, $21, $40, $C2
db $09, $F1, $77, $F1, $C9, $CD, $DA, $7D
db $C5, $79, $C6, $10, $4F, $CD, $DA, $7D
db $C1, $C9, $21, $40, $C2, $09, $7E, $A7
db $28, $23, $F5, $CB, $37, $E6, $F0, $21
db $60, $C2, $09, $86, $77, $CB, $12, $21
db $00, $C2, $09, $F1, $1E, $00, $CB, $7F
db $28, $02, $1E, $F0, $CB, $37, $E6, $0F
db $B3, $CB, $1A, $8E, $77, $C9, $21, $20
db $C3, $09, $7E, $A7, $28, $F7, $F5, $CB
db $37, $E6, $F0, $21, $30, $C3, $09, $86
db $77, $CB, $12, $21, $10, $C3, $18, $D2
db $1E, $00, $F0, $98, $21, $00, $C2, $09
db $96, $CB, $7F, $28, $01, $1C, $57, $C9
db $1E, $02, $F0, $99, $21, $10, $C2, $09
db $96, $CB, $7F, $20, $01, $1C, $57, $C9
db $1E, $02, $F0, $99, $21, $EC, $FF, $96
db $CB, $7F, $20, $01, $1C, $57, $C9, $CD
db $20, $7E, $7B, $E0, $D7, $7A, $CB, $7F
db $28, $02, $2F, $3C, $F5, $CD, $30, $7E
db $7B, $E0, $D8, $7A, $CB, $7F, $28, $02
db $2F, $3C, $D1, $BA, $30, $04, $F0, $D7
db $18, $02, $F0, $D8, $5F, $C9, $21, $80
db $C2, $09, $70, $C9, $21, $C0, $C2, $09
db $7E, $C7, $88, $7E, $99, $7E, $AA, $7E
db $CD, $91, $08, $36, $A0, $21, $20, $C4
db $09, $36, $FF, $21, $C0, $C2, $09, $34
db $C9, $CD, $91, $08, $20, $0B, $36, $C0
db $21, $20, $C4, $09, $36, $FF, $CD, $93
db $7E, $C9, $CD, $91, $08, $20, $0C, $CD
db $D7, $08, $CD, $BD, $27, $CD, $2B, $7F
db $C3, $7A, $3F, $CD, $BF, $7E, $C9, $E6
db $07, $20, $1D, $CD, $ED, $27, $E6, $1F
db $D6, $10, $5F, $21, $EE, $FF, $86, $77
db $CD, $ED, $27, $E6, $1F, $D6, $14, $5F
db $21, $EC, $FF, $86, $77, $CD, $E1, $7E
db $C9, $CD, $67, $7D, $F0, $EE, $E0, $D7
db $F0, $EC, $E0, $D8, $3E, $02, $CD, $53
db $09, $3E, $13, $E0, $F4, $C9, $3E, $36
db $CD, $01, $3C, $F0, $D7, $21, $00, $C2
db $19, $77, $F0, $D8, $21, $10, $C2, $19
db $77, $F0, $F9, $A7, $28, $08, $21, $50
db $C2, $09, $36, $F0, $18, $0C, $21, $20
db $C3, $19, $36, $10, $21, $10, $C3, $19
db $36, $08, $CD, $76, $7E, $21, $F4, $FF
db $36, $1A, $C9, $21, $00, $D8, $F0, $F6
db $5F, $FA, $A5, $DB, $57, $F0, $F7, $FE
db $1A, $30, $05, $FE, $06, $38, $01, $14
db $19, $7E, $F6, $20, $77, $E0, $F8, $C9
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
| 47.952706 | 47 | 0.375126 |
d6e09466d6ed2b297cd447c5fafaf116f9c887df | 700 | asm | Assembly | oeis/068/A068963.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/068/A068963.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/068/A068963.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A068963: a(n) = Sum_{d|n} phi(d^3).
; Submitted by Jon Maiga
; 1,5,19,37,101,95,295,293,505,505,1211,703,2029,1475,1919,2341,4625,2525,6499,3737,5605,6055,11639,5567,12601,10145,13627,10915,23549,9595,28831,18725,23009,23125,29795,18685,49285,32495,38551,29593,67241,28025,77659,44807,51005,58195,101615,44479,101137,63005,87875,75073,146069,68135,122311,86435,123481,117745,201899,71003,223261,144155,148975,149797,204929,115045,296275,171125,221141,148975,352871,147965,383689,246425,239419,240463,357245,192755,486799,236441,367921,336205,564899,207385,467125
add $0,1
mov $2,$0
lpb $0
mov $3,$2
gcd $3,$0
sub $0,1
mov $4,$2
div $4,$3
mov $3,$4
pow $3,2
add $1,$3
lpe
mov $0,$1
| 38.888889 | 501 | 0.737143 |
15f2bd6419d3fd3d060f11ee88c2287898ae4fc8 | 479 | asm | Assembly | programs/oeis/076/A076178.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/076/A076178.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/076/A076178.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A076178: a(n) = 2*n^2 - A077071(n).
; 0,0,0,2,2,4,6,10,10,12,14,18,20,24,28,34,34,36,38,42,44,48,52,58,60,64,68,74,78,84,90,98,98,100,102,106,108,112,116,122,124,128,132,138,142,148,154,162,164,168,172,178,182,188,194,202,206,212,218,226,232
mov $4,$0
mov $7,$0
lpb $4,1
mov $0,$7
sub $4,1
sub $0,$4
mov $2,$0
mov $3,$0
lpb $2,1
cmp $2,1
mov $6,$3
lpb $6,1
div $3,2
sub $6,$3
lpe
lpe
mov $5,$6
trn $5,1
mul $5,2
add $1,$5
lpe
| 19.16 | 205 | 0.546973 |
c14841cea6cf0eb57036c02c04bbfc061e244874 | 7,910 | asm | Assembly | src/main/asm/FFTARando.asm | TojiKitten/FFTA-randomizer | f425474d3f420c46030d78c01ae501be161c9a54 | [
"MIT"
] | 3 | 2021-04-30T06:08:11.000Z | 2021-11-15T14:31:19.000Z | src/main/asm/FFTARando.asm | TojiKitten/FFTA-randomizer | f425474d3f420c46030d78c01ae501be161c9a54 | [
"MIT"
] | null | null | null | src/main/asm/FFTARando.asm | TojiKitten/FFTA-randomizer | f425474d3f420c46030d78c01ae501be161c9a54 | [
"MIT"
] | null | null | null | /*
// This file is included in the randomizer as a reference.
// https://github.com/Kingcom/armips was used to assembler the instructions, which was then used as a diff to include in the randomizer.
*/
.open "FFTA_Randomized.gba","FFTA_Randomized_ASM.gba",0x08000000
.gba
freeSpace equ 0x08A39920
// Inject Animation AnimationHelpers
// Start of Leonarth's animation fix Engine Hacks ASM at https://github.com/LeonarthCG/FFTA_Engine_Hacks
.org 0x080988B0
helper1Inject:
ldr r3,=WeaponRedirect+1
bx r3
.pool
.org 0x08021004
helper2Inject:
ldr r3,=AnimationHelper+1
bx r3
.pool
.org 0x0809767C
helper3Inject:
ldr r3,=SpecialHelper1+1
bx r3
.pool
.org 0x08097734
helper4Inject:
ldr r3,=SpecialHelper2+1
bx r3
.pool
// End Animation Helper Inject
// Inject the unlock jobs hack where they're initialized
.org 0x080C9342
jobInject:
.align 8
ldr r3,=UnlockJobs+1
bx r3
.pool
// Inject locations to all be written at the same time
.org 0x08030126
locationInject:
.align 8
ldr r3,=PlaceLocations+1
bx r3
.pool
// Branch away from placing Sprohm in the beginning of the game
.org 0x080306D6
PreventSprohmPlacement:
mov r0,0
// Branch away from placing a city
.org 0x0804880C
PreventLocationPlacement:
mov r0,0
// Stop clan comparison from being made
.org 0x080CF802
StopClans:
nop
.org freeSpace
.align 4
// For every job, set it to be discovered
UnlockJobs:
discoveryStart:
discoverJobMemory equ 0x080C9574
mov r6,0x05
jobLoop:
mov r0,r6
bl discoverJob
add r6,r6,1
cmp r6,0x2F
blt jobLoop
discoverEnd:
.align 8
ldr r3,=0x080C93C2+1
bx r3
.func discoverJob
mov r1,0x1
.align 8
ldr r4,=discoverJobMemory+1
bx r4
pop r15
.endfunc
.pool
// For every location, look at its value in the randomized location block and place it at the value
PlaceLocations:
locationStart:
placeLocationMemory equ 0x08030044
mov r7,0x00
locationLoop:
mov r0,r7
ldr r1,=mapLocations
ldrb r1,[r1,r7]
bl placeLocation
add r7,r7,1
cmp r7,0x1E
blt locationLoop
locationEnd:
.align 8
unlockPaths:
ldr r3,=0x02002E58
mov r0, 0x0B
strb r0,[r3,0x00]
unlockCutscenes:
ldr r3,=0x02001FF7
mov r0, 0xF8
strb r0,[r3, 0x00]
mov r0, 0x17
strb r0,[r3,0x1]
mov r0,0x40
strb r0,[r3, 0x05]
mov r7, 0x03
ldr r3,=0x0803013A+1
bx r3
.func placeLocation
mov r2,0x1
.align 8
ldr r4,=placeLocationMemory+1
bx r4
pop r15
.endfunc
.pool
// This is updated by the randomizer
mapLocations:
.area 30,0
.byte 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20, 21, 22,23,24,25,26,27,28,29
.endarea
.align 4
// Start of Leonarth's animation fix Engine Hacks ASM at https://github.com/LeonarthCG/FFTA_Engine_Hacks
AnimationHelpers:
WeaponRedirect:
cmp r1,0x50
blt weaponSkip
cmp r1,0x78
bhi weaponSkip
push r4
mov r4,0x1
lsl r4,0xD
orr r1,r4 // Animation ID | 0x2000
pop r4
weaponSkip:
ldr r3,=0x80975DC
mov lr,r3
mov r3,1
bl lr
weaponRedirectEnd:
ldr r3,=0x80988B8
mov lr,r3
cmp r5,0x0
bl lr
SpecialHelper1:
cmp r5,0xEC
blo special1Skip
ldr r3,=0x1FFF
cmp r5,r3
bhi special1Skip
sub r5,0xEC
lsl r5,0x2
add r5,0xEC
special1Skip:
add r2,r5,r2
str r2,[sp,0x4]
mov r2,0x0
str r2,[sp,0x8]
ldr r3,=0x8097685
bx r3
.pool
SpecialHelper2:
mov r8,r0
mov r6,0x1
lsl r0,r4,0x18
asr r0,r0,0x18
cmp r7,0xEC
blo special2Skip
ldr r3,=0x1FFF
cmp r7,r3
bhi special2Skip
sub r7,0xEC
lsl r7,2
add r7,0xEC
special2Skip:
add r7,r0
mov r4,r5
add r4,0x4C
ldr r0,[r5,0x40]
ldr r3,=0x8097745
bx r3
.pool
weaponAnimationTable equ 0x08a39c40
specialAnimationTable equ 0x08a80aa0
AnimationHelper:
push lr
push r4,r5
mov r5,r0
mov r2,r1
ldr r1,=0x8390E44
lsl r0,0x2
add r0,r1
ldr r3,[r0]
mov r0,0x3
ldr r4,=0x1FFF
cmp r2,r4
bhi custom
cmp r2,0xEC
bhs specialAnimation
b regular
custom:
and r2,r4
mov r4,0x50
ldr r3,=weaponAnimationTable
lsl r5,0x2
ldr r3,[r3,r5]
and r0,r2
sub r2,r4
b aftercustom
specialAnimation:
and r0,r2
sub r2,0xEC
ldr r3,=specialAnimationTable
lsl r5,0x2
ldr r3,[r3,r5]
b aftercustom
regular:
and r0,r2
aftercustom:
cmp r0,0x2
bhi goto8021030
cmp r0,0x1
blo goto8021030
mov r1,0x4
neg r1,r1
and r1,r2
lsl r0,r1,0x1
add r0,r1
lsl r0,0x1
add r0,0xC
mov r2,0xC
b EndAnimationHelper
goto8021030:
mov r1,0x4
neg r1,r1
and r1,r2
lsl r0,r1,0x1
add r0,r1
lsl r0,0x1
mov r2,0x0
EndAnimationHelper:
add r0,r3
//if no animation, standing animation
ldr r1,[r0]
cmp r1,0x0
bne hasAnimation
add r0,r3,r2
hasAnimation:
pop r4,r5
pop r1
bx r1
.pool
// End animation helpers
.close | 27.852113 | 136 | 0.420228 |
bdfb1516d0e22574f0bfcd968807b601c9175426 | 486 | asm | Assembly | oeis/315/A315471.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/315/A315471.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/315/A315471.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A315471: Coordination sequence Gal.3.52.3 where G.u.t.v denotes the coordination sequence for a vertex of type v in tiling number t in the Galebach list of u-uniform tilings.
; Submitted by Jamie Morken(s1)
; 1,6,11,16,21,26,32,38,43,48,53,58,64,70,75,80,85,90,96,102,107,112,117,122,128,134,139,144,149,154,160,166,171,176,181,186,192,198,203,208,213,218,224,230,235,240,245,250,256,262
mov $2,$0
sub $0,1
mul $0,25
div $0,6
mul $0,4
div $0,5
add $2,9
add $0,$2
add $0,$2
sub $0,14
| 32.4 | 180 | 0.707819 |
fbd0a4ebc75971f2fc9953616ed4facd36ecd3d0 | 217 | asm | Assembly | libsrc/_DEVELOPMENT/string/c/sdcc_iy/strtok.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null | libsrc/_DEVELOPMENT/string/c/sdcc_iy/strtok.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null | libsrc/_DEVELOPMENT/string/c/sdcc_iy/strtok.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null |
; char *strtok(char * restrict s1, const char * restrict s2)
SECTION code_string
PUBLIC _strtok
EXTERN asm_strtok
_strtok:
pop af
pop hl
pop de
push de
push hl
push af
jp asm_strtok
| 10.333333 | 60 | 0.654378 |
9431b72377ca992b5b6bb7248b1b8aacd7789ca7 | 591 | asm | Assembly | oeis/022/A022526.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/022/A022526.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/022/A022526.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A022526: Nexus numbers (n+1)^10-n^10.
; 1,1023,58025,989527,8717049,50700551,222009073,791266575,2413042577,6513215599,15937424601,35979939623,75941127625,151396163127,287395735649,522861237151,916482272673,1554473326175,2560599031177,4108933742199,6439880978201,9880041813223,14866588422225,21976869751727,31964050675249,45799664012751,64724036441273,90305634600775,124510466604777,169782766699799,229138286980801,306271619861823,405679078421825,532798768795327,694169599455849,897611086547351,1152425932354873,1469627475570375
mov $1,1
add $1,$0
pow $0,10
pow $1,10
sub $1,$0
mov $0,$1
| 59.1 | 490 | 0.861252 |
4742b5168eb42fcfe893256d1e4961c90ab05c35 | 12,521 | asm | Assembly | P6/data_P6_2/ALUTest162.asm | alxzzhou/BUAA_CO_2020 | b54bf367081a5a11701ebc3fc78a23494aecca9e | [
"Apache-2.0"
] | 1 | 2022-01-23T09:24:47.000Z | 2022-01-23T09:24:47.000Z | P6/data_P6_2/ALUTest162.asm | alxzzhou/BUAA_CO_2020 | b54bf367081a5a11701ebc3fc78a23494aecca9e | [
"Apache-2.0"
] | null | null | null | P6/data_P6_2/ALUTest162.asm | alxzzhou/BUAA_CO_2020 | b54bf367081a5a11701ebc3fc78a23494aecca9e | [
"Apache-2.0"
] | null | null | null | lhu $4,8($0)
subu $1,$1,$3
sllv $5,$5,$3
sra $4,$4,16
lw $3,12($0)
xori $3,$3,48310
sll $3,$4,30
addiu $5,$5,13096
sb $4,3($0)
srav $3,$3,$3
or $0,$5,$3
srlv $4,$4,$3
addu $3,$4,$3
nor $4,$5,$3
slt $3,$3,$3
slti $4,$4,13969
slt $4,$4,$3
srlv $4,$4,$3
slt $3,$2,$3
xori $3,$6,23600
and $1,$5,$3
subu $4,$1,$3
sll $6,$6,26
sltiu $6,$0,-30369
lw $4,4($0)
slti $3,$6,-9250
xori $2,$2,9879
ori $6,$6,31933
srlv $3,$3,$3
lhu $0,0($0)
sb $0,15($0)
sw $5,16($0)
nor $3,$3,$3
ori $0,$0,29281
srlv $5,$1,$3
andi $5,$6,30405
srl $1,$3,0
and $1,$3,$3
subu $3,$3,$3
lb $0,15($0)
sltiu $3,$1,4541
sb $6,6($0)
sra $6,$3,4
addiu $4,$1,9639
xori $4,$1,45798
sw $3,4($0)
or $3,$3,$3
slti $4,$4,-5867
subu $6,$3,$3
addiu $4,$4,-20557
sw $3,8($0)
sllv $1,$0,$3
and $6,$5,$3
sra $3,$4,25
sw $4,12($0)
subu $4,$3,$3
addu $3,$1,$3
and $4,$6,$3
srl $5,$4,1
sltiu $5,$4,7267
sllv $3,$3,$3
subu $5,$3,$3
and $1,$5,$3
sllv $5,$3,$3
andi $4,$1,17075
sltu $3,$4,$3
sltu $1,$1,$3
and $0,$4,$3
lb $3,16($0)
andi $6,$0,242
nor $0,$4,$3
lb $5,7($0)
lbu $3,12($0)
lbu $3,5($0)
subu $5,$5,$3
sltu $5,$3,$3
subu $4,$3,$3
ori $4,$4,52525
nor $0,$3,$3
or $4,$3,$3
sltiu $4,$1,10972
sb $3,8($0)
lhu $0,16($0)
lh $4,12($0)
slt $1,$3,$3
sb $4,7($0)
sllv $4,$3,$3
subu $0,$1,$3
sllv $5,$6,$3
sltiu $4,$0,-4013
addiu $4,$0,-23487
xori $5,$3,63159
subu $1,$1,$3
sb $4,11($0)
sra $4,$3,19
lh $3,4($0)
and $3,$3,$3
srl $3,$4,20
sltiu $4,$4,-2948
sh $4,4($0)
ori $5,$5,4628
srav $3,$1,$3
slti $5,$0,-10245
sra $1,$1,28
sltiu $3,$3,-12101
sltu $4,$1,$3
subu $4,$4,$3
lw $5,4($0)
subu $5,$4,$3
srav $4,$0,$3
sh $4,6($0)
and $3,$5,$3
sllv $1,$1,$3
andi $4,$4,49124
srav $3,$6,$3
sw $4,16($0)
lhu $1,16($0)
andi $1,$4,48386
andi $3,$3,51693
srlv $4,$5,$3
srl $4,$3,22
ori $3,$3,35347
subu $1,$0,$3
sllv $3,$3,$3
addiu $1,$2,4741
sb $1,14($0)
subu $3,$0,$3
lbu $1,13($0)
andi $5,$4,52245
lbu $1,12($0)
nor $4,$1,$3
sltu $3,$4,$3
slt $3,$3,$3
addiu $4,$4,-18028
or $4,$4,$3
addiu $6,$6,-10214
sltiu $5,$5,7817
subu $3,$1,$3
sh $4,8($0)
lhu $4,6($0)
lhu $6,16($0)
lw $4,12($0)
srav $3,$3,$3
lw $1,0($0)
addu $3,$3,$3
sb $3,0($0)
addiu $4,$0,-8075
lb $4,9($0)
addiu $1,$1,-18102
xori $2,$2,53074
nor $1,$3,$3
and $1,$1,$3
sh $3,16($0)
xori $3,$4,48257
xori $1,$5,35987
sb $3,12($0)
srav $5,$3,$3
nor $6,$5,$3
lw $4,0($0)
addu $5,$5,$3
nor $4,$4,$3
addiu $4,$4,3678
addiu $5,$3,-7941
sltu $0,$4,$3
sw $4,0($0)
sb $3,5($0)
addiu $2,$2,-15452
slt $4,$3,$3
sb $5,11($0)
lbu $1,2($0)
srlv $4,$3,$3
addu $0,$1,$3
addiu $4,$6,-1233
subu $0,$0,$3
sltu $3,$3,$3
or $5,$5,$3
or $3,$4,$3
subu $4,$4,$3
lh $4,14($0)
lh $3,16($0)
lbu $3,9($0)
sb $4,13($0)
addu $1,$3,$3
nor $6,$3,$3
lh $6,8($0)
slt $3,$0,$3
lh $4,14($0)
xori $5,$5,47693
sb $1,4($0)
addu $1,$0,$3
addiu $3,$5,30693
sw $5,16($0)
lhu $4,10($0)
lhu $3,14($0)
slt $1,$6,$3
addiu $5,$5,25067
sh $4,4($0)
srav $5,$5,$3
sltiu $3,$3,-10891
sra $4,$6,18
subu $6,$3,$3
sra $1,$5,23
sb $4,0($0)
sb $3,6($0)
andi $5,$5,26604
srlv $5,$1,$3
xor $5,$1,$3
xori $3,$5,55176
sllv $3,$3,$3
lh $3,0($0)
xori $5,$5,21546
srl $3,$5,17
andi $4,$4,18563
addiu $1,$3,9998
addu $0,$0,$3
slti $4,$4,6497
addu $5,$5,$3
lhu $3,6($0)
xor $6,$3,$3
nor $5,$3,$3
or $5,$3,$3
slti $3,$3,24831
subu $5,$3,$3
subu $3,$3,$3
addu $4,$3,$3
xor $4,$2,$3
srl $4,$4,25
srlv $6,$4,$3
subu $4,$4,$3
xori $3,$4,47116
srl $4,$4,22
lb $1,0($0)
srlv $5,$4,$3
or $5,$5,$3
ori $6,$1,64810
xor $5,$1,$3
nor $1,$3,$3
lh $4,2($0)
addu $3,$1,$3
subu $4,$1,$3
sra $5,$1,9
sw $3,0($0)
lbu $3,11($0)
lb $4,6($0)
lh $3,16($0)
lhu $5,0($0)
slt $4,$4,$3
srlv $4,$1,$3
lhu $1,2($0)
sll $0,$0,22
nor $4,$5,$3
sltu $1,$3,$3
xor $6,$3,$3
nor $3,$3,$3
addiu $5,$3,-31256
addu $5,$5,$3
andi $3,$0,48818
lbu $5,16($0)
xori $3,$0,1915
addu $4,$1,$3
addu $3,$1,$3
xori $3,$4,41436
nor $5,$0,$3
addu $0,$4,$3
sll $1,$0,7
sltu $3,$4,$3
sw $5,16($0)
subu $3,$0,$3
and $4,$5,$3
sb $4,1($0)
sllv $1,$5,$3
addu $3,$4,$3
nor $3,$2,$3
addiu $5,$4,22871
xori $5,$5,3998
srlv $4,$1,$3
lbu $4,6($0)
sw $3,0($0)
srlv $1,$3,$3
sw $4,0($0)
andi $1,$1,52108
lb $3,14($0)
andi $1,$5,38486
sll $3,$3,30
xori $5,$5,26581
addiu $4,$0,21069
subu $0,$3,$3
sllv $1,$1,$3
subu $4,$5,$3
lhu $5,4($0)
addu $4,$3,$3
sh $3,0($0)
sllv $4,$5,$3
lbu $1,12($0)
slti $5,$3,-20738
addu $4,$1,$3
slt $3,$3,$3
lbu $3,14($0)
andi $3,$3,22590
and $1,$1,$3
sltiu $1,$1,31175
subu $4,$3,$3
slt $4,$4,$3
sw $1,12($0)
subu $3,$1,$3
subu $6,$6,$3
xor $1,$0,$3
ori $6,$4,17054
addiu $1,$5,-4113
addiu $1,$6,26298
lhu $3,14($0)
sltu $1,$0,$3
subu $5,$1,$3
lw $5,16($0)
sb $3,16($0)
sh $1,6($0)
subu $0,$3,$3
sra $4,$5,7
subu $4,$4,$3
subu $4,$4,$3
ori $3,$3,4268
nor $5,$1,$3
lw $4,16($0)
sll $1,$4,7
addiu $6,$3,11554
subu $4,$3,$3
subu $6,$3,$3
addiu $4,$4,-4263
sw $3,0($0)
sh $4,6($0)
or $6,$3,$3
srav $3,$4,$3
subu $5,$5,$3
srav $4,$6,$3
lb $3,5($0)
sh $4,0($0)
sb $4,10($0)
addu $4,$3,$3
sra $5,$4,9
or $1,$5,$3
sw $0,16($0)
xor $3,$3,$3
addu $4,$0,$3
addu $3,$5,$3
xor $5,$5,$3
srlv $4,$3,$3
lh $1,0($0)
sh $6,6($0)
subu $4,$1,$3
sll $4,$4,5
or $1,$5,$3
addiu $4,$4,9815
sltiu $3,$5,17373
sltiu $3,$3,8489
lw $3,0($0)
sltiu $0,$4,32655
srl $4,$5,7
and $0,$5,$3
addiu $5,$5,28991
subu $3,$3,$3
or $3,$1,$3
sllv $0,$0,$3
lhu $4,10($0)
sw $4,4($0)
sb $1,16($0)
lh $0,6($0)
sll $3,$5,15
subu $3,$3,$3
sb $3,11($0)
lw $4,12($0)
srlv $0,$0,$3
sh $4,2($0)
sltiu $4,$4,-27359
lw $1,16($0)
xor $5,$3,$3
xori $5,$5,2602
lbu $5,5($0)
srl $3,$6,19
xori $6,$1,49193
sll $5,$5,10
andi $0,$5,29339
xori $3,$3,2422
sra $0,$0,10
ori $4,$4,15326
nor $3,$3,$3
ori $4,$4,60197
sra $3,$3,24
nor $4,$3,$3
sra $3,$4,1
and $0,$1,$3
srl $1,$1,28
srl $4,$3,29
srlv $3,$3,$3
sb $6,0($0)
srlv $3,$3,$3
andi $3,$5,36955
subu $3,$5,$3
xor $3,$5,$3
sw $5,4($0)
nor $6,$5,$3
srl $0,$0,0
sh $3,16($0)
slt $1,$1,$3
srlv $4,$4,$3
subu $5,$4,$3
nor $5,$1,$3
srav $3,$0,$3
sltu $6,$6,$3
lhu $4,2($0)
addiu $6,$6,-19702
srlv $4,$1,$3
ori $3,$2,37159
xor $5,$5,$3
addu $5,$5,$3
sb $4,0($0)
subu $5,$4,$3
sra $4,$1,26
xor $1,$5,$3
and $4,$4,$3
sll $5,$3,22
lbu $5,10($0)
sb $3,15($0)
sh $4,10($0)
subu $0,$0,$3
sra $4,$5,24
ori $3,$3,6718
sltiu $3,$3,26375
lbu $4,6($0)
sw $0,4($0)
slti $1,$1,20293
sltu $0,$0,$3
srl $0,$3,28
nor $1,$1,$3
or $4,$4,$3
addiu $4,$5,130
lbu $3,1($0)
addiu $3,$1,-1619
addu $1,$3,$3
addiu $4,$4,-5189
lhu $0,2($0)
srav $6,$4,$3
sra $0,$0,25
or $1,$6,$3
lw $1,12($0)
subu $4,$4,$3
sltiu $4,$5,-2649
addu $4,$5,$3
and $4,$4,$3
subu $1,$3,$3
slt $3,$3,$3
or $4,$3,$3
lw $4,12($0)
nor $1,$6,$3
lw $1,4($0)
srav $5,$6,$3
sltu $1,$4,$3
lw $1,16($0)
sllv $1,$3,$3
subu $3,$3,$3
slt $5,$1,$3
andi $5,$5,51230
xor $6,$0,$3
addiu $3,$3,-27329
sh $6,2($0)
srav $4,$0,$3
sltiu $3,$5,-653
and $3,$3,$3
sb $3,11($0)
addiu $3,$0,8930
addiu $3,$3,-27479
xori $4,$4,10937
lw $3,12($0)
subu $0,$4,$3
sll $5,$3,27
slt $3,$4,$3
subu $3,$1,$3
srav $3,$3,$3
lw $1,0($0)
subu $3,$3,$3
sltu $5,$4,$3
sh $5,2($0)
srl $6,$0,6
sb $4,3($0)
and $1,$1,$3
and $0,$0,$3
nor $4,$5,$3
lw $1,4($0)
srav $3,$1,$3
lbu $6,7($0)
nor $3,$3,$3
addu $4,$4,$3
lbu $5,15($0)
addiu $3,$3,-18263
addu $0,$4,$3
addiu $0,$4,20308
sll $0,$1,18
addiu $1,$3,-20068
lb $5,4($0)
slt $1,$6,$3
slti $4,$6,8915
lw $3,4($0)
addiu $5,$5,-8206
and $1,$1,$3
addiu $3,$3,1830
sllv $5,$3,$3
subu $4,$5,$3
xori $4,$3,2074
slti $5,$5,2019
or $4,$0,$3
addiu $3,$1,-5194
srlv $4,$4,$3
or $1,$1,$3
slti $3,$3,-30833
sltiu $3,$4,-21643
subu $0,$3,$3
slt $5,$4,$3
addu $6,$5,$3
slti $1,$3,-32462
sra $1,$1,7
sltiu $5,$5,-7990
sll $3,$1,20
lbu $3,5($0)
srl $5,$1,24
subu $3,$0,$3
srlv $3,$3,$3
nor $5,$3,$3
sllv $5,$1,$3
sllv $4,$5,$3
sra $4,$1,23
sb $6,4($0)
addiu $3,$1,31122
sltiu $5,$3,-2910
lbu $0,13($0)
sra $4,$6,10
subu $0,$4,$3
lbu $3,0($0)
addu $5,$0,$3
lw $5,8($0)
addu $4,$5,$3
slti $3,$3,-9519
sltiu $3,$3,-27079
srlv $3,$4,$3
addu $0,$6,$3
sltu $3,$0,$3
srlv $4,$4,$3
xor $0,$0,$3
addiu $5,$6,27581
sltiu $4,$4,-22060
or $0,$3,$3
sra $3,$6,17
sh $3,4($0)
sltu $3,$3,$3
srlv $3,$3,$3
sltu $1,$5,$3
and $3,$1,$3
addu $0,$0,$3
lbu $1,2($0)
sltu $3,$6,$3
andi $0,$5,55672
sra $0,$6,24
addiu $4,$3,13549
slt $4,$1,$3
sll $6,$6,26
xori $4,$2,5560
andi $1,$4,58717
or $3,$3,$3
sh $4,6($0)
xor $1,$1,$3
subu $4,$6,$3
nor $3,$3,$3
srav $3,$3,$3
nor $5,$5,$3
sltiu $5,$6,-6762
lh $3,2($0)
and $4,$3,$3
lhu $1,10($0)
addu $6,$3,$3
lw $4,0($0)
ori $0,$1,16817
ori $3,$3,36706
sltu $4,$3,$3
lh $3,6($0)
sltu $5,$5,$3
xor $1,$1,$3
sll $6,$3,28
nor $3,$3,$3
addu $4,$4,$3
sh $5,16($0)
slti $1,$1,118
lw $6,8($0)
and $4,$3,$3
sll $3,$6,19
addiu $1,$5,-10370
sll $4,$4,10
xori $3,$1,28193
sw $1,12($0)
or $4,$1,$3
addiu $3,$3,-13198
lb $5,0($0)
and $4,$3,$3
addu $4,$5,$3
andi $3,$3,47127
andi $4,$3,15382
sh $4,8($0)
addiu $3,$3,21923
sltiu $1,$3,-28046
srav $1,$5,$3
sltiu $5,$0,24416
addiu $5,$5,13432
sltiu $0,$4,8897
lh $3,0($0)
lh $4,0($0)
subu $3,$6,$3
sra $3,$0,10
lh $4,0($0)
sltiu $1,$5,-14125
sll $3,$5,19
xori $3,$3,9715
and $1,$4,$3
xori $4,$1,38399
or $4,$4,$3
sllv $5,$5,$3
lb $5,3($0)
xor $3,$5,$3
ori $3,$3,27295
lbu $4,12($0)
sltu $4,$3,$3
sllv $3,$5,$3
nor $2,$2,$3
andi $3,$6,29945
and $5,$0,$3
andi $1,$1,35958
sltiu $3,$3,-23591
addu $3,$3,$3
lhu $5,16($0)
lh $5,14($0)
lh $3,4($0)
srlv $1,$1,$3
sw $6,4($0)
sb $1,8($0)
xor $1,$4,$3
lw $1,8($0)
lhu $5,8($0)
srav $5,$0,$3
sll $4,$4,26
lh $5,0($0)
ori $3,$3,28143
lhu $1,8($0)
lh $5,4($0)
addu $1,$5,$3
srlv $4,$2,$3
lbu $3,13($0)
srav $1,$5,$3
sh $1,12($0)
addu $1,$4,$3
sh $5,16($0)
sltiu $5,$5,-12488
lw $6,0($0)
lhu $4,2($0)
and $4,$4,$3
srl $5,$3,15
and $4,$1,$3
srav $3,$5,$3
srav $4,$3,$3
sh $3,4($0)
slti $3,$4,20223
srlv $3,$1,$3
lb $4,14($0)
lhu $4,14($0)
xor $3,$5,$3
srlv $3,$1,$3
lb $3,14($0)
ori $5,$3,2122
slt $3,$4,$3
addiu $3,$3,-105
slti $3,$0,507
sw $6,4($0)
and $5,$5,$3
sb $4,5($0)
sltiu $3,$6,-24557
andi $3,$4,51329
subu $4,$6,$3
lw $4,0($0)
sll $4,$3,7
sw $4,16($0)
sltiu $4,$4,376
and $4,$4,$3
sra $2,$2,21
sltu $4,$3,$3
lbu $4,7($0)
lh $4,16($0)
or $5,$5,$3
addu $6,$4,$3
slt $6,$6,$3
lhu $4,0($0)
sra $3,$4,6
sllv $0,$3,$3
lh $5,0($0)
sllv $3,$3,$3
addu $5,$5,$3
sltu $3,$3,$3
srl $5,$4,19
slti $5,$5,-20800
sll $6,$1,26
lh $4,12($0)
subu $5,$5,$3
xori $5,$5,64026
lbu $5,0($0)
xor $4,$4,$3
xori $6,$4,20118
andi $1,$4,38877
slt $1,$3,$3
sltiu $6,$4,31515
lhu $0,4($0)
srlv $1,$5,$3
lh $6,16($0)
subu $4,$4,$3
subu $4,$3,$3
lh $5,8($0)
lw $3,16($0)
srlv $3,$3,$3
sb $1,12($0)
lw $4,12($0)
sltiu $3,$3,-7253
srlv $1,$0,$3
slti $1,$4,-32411
srlv $3,$3,$3
sltiu $1,$3,-333
srav $5,$3,$3
lh $5,4($0)
sllv $1,$4,$3
ori $3,$3,24593
or $6,$6,$3
and $1,$4,$3
sltiu $4,$4,17037
addiu $3,$5,26418
andi $0,$5,60536
srlv $3,$3,$3
sra $3,$4,24
nor $4,$5,$3
sltu $3,$5,$3
andi $3,$1,44256
sw $3,16($0)
slti $4,$5,-14113
slti $1,$3,5786
srlv $5,$5,$3
sllv $6,$4,$3
sll $5,$4,30
subu $3,$3,$3
addu $1,$1,$3
slti $1,$3,13187
xori $5,$3,56750
xor $3,$4,$3
srlv $3,$3,$3
addiu $4,$4,-14345
andi $5,$1,57669
lw $5,8($0)
andi $3,$1,6233
ori $4,$5,9713
addiu $5,$5,-6389
slt $6,$3,$3
lw $3,12($0)
nor $1,$1,$3
andi $5,$4,10595
lb $3,10($0)
lbu $3,5($0)
lw $5,8($0)
lhu $4,8($0)
srav $6,$6,$3
lh $3,2($0)
sllv $5,$3,$3
subu $5,$5,$3
and $5,$5,$3
slti $1,$3,-71
slt $3,$5,$3
lw $5,4($0)
andi $6,$4,58741
andi $3,$3,65114
lh $3,6($0)
sra $3,$4,29
sb $5,1($0)
addiu $3,$3,-17021
andi $1,$3,5556
addu $3,$3,$3
sll $6,$3,23
addu $5,$5,$3
slti $3,$3,-21879
addu $4,$1,$3
subu $5,$2,$3
andi $1,$5,1145
sb $3,13($0)
sh $3,4($0)
lb $4,14($0)
sh $4,10($0)
lh $1,4($0)
sll $3,$5,30
sw $4,16($0)
lh $5,14($0)
subu $3,$3,$3
xor $5,$4,$3
srl $1,$5,16
sw $3,12($0)
slti $6,$3,17919
or $4,$3,$3
lhu $5,10($0)
slt $6,$6,$3
sll $4,$1,10
srav $3,$3,$3
addu $3,$1,$3
sltiu $4,$1,-9962
and $4,$3,$3
sllv $5,$5,$3
slt $5,$3,$3
sb $5,14($0)
srl $4,$2,0
sra $3,$4,12
sltu $4,$4,$3
lw $5,16($0)
srav $1,$0,$3
subu $4,$4,$3
sltiu $3,$3,-25060
sra $1,$3,31
sltu $4,$6,$3
nor $0,$4,$3
sw $4,4($0)
lw $3,16($0)
lh $5,2($0)
addiu $3,$3,26770
srlv $4,$4,$3
addiu $6,$1,-19421
sh $4,8($0)
sw $3,12($0)
sw $0,16($0)
sb $4,14($0)
lh $4,14($0)
lhu $3,12($0)
lhu $3,0($0)
subu $4,$3,$3
lb $4,16($0)
subu $3,$3,$3
addu $0,$3,$3
sb $4,10($0)
andi $3,$0,22475
or $1,$5,$3
ori $4,$3,52691
addu $0,$0,$3
srl $0,$3,2
addu $5,$5,$3
nor $5,$3,$3
lw $1,16($0)
srav $4,$3,$3
sltu $3,$4,$3
addu $1,$1,$3
addu $3,$3,$3
and $4,$5,$3
addu $3,$3,$3
sll $4,$3,29
or $3,$3,$3
sra $4,$1,4
lh $3,0($0)
srl $5,$5,21
addu $1,$4,$3
addiu $3,$4,25356
srl $3,$3,22
sllv $1,$3,$3
sb $3,1($0)
sltu $1,$3,$3
lb $3,13($0)
lbu $4,15($0)
subu $6,$0,$3
slt $4,$4,$3
xor $0,$0,$3
sh $3,14($0)
sltiu $4,$4,-30171
lbu $4,1($0)
srlv $3,$2,$3
xori $5,$3,24257
sw $1,8($0)
srav $0,$1,$3
or $5,$3,$3
lb $1,6($0)
srav $4,$3,$3
slt $0,$0,$3
lw $3,12($0)
sb $6,5($0)
addiu $1,$4,-25692
addu $5,$4,$3
addu $1,$5,$3
| 14.084364 | 18 | 0.520406 |
ac6433bbaf528c9480a3ca4462e93b9c0884c887 | 136,413 | asm | Assembly | s2.sounddriver.asm | kramlat/Open-Source-Sonic-ROM-Base | ba438ade0c74bc563aa83e4cd9cd08d4aded55af | [
"BSD-3-Clause"
] | 5 | 2021-01-20T21:26:30.000Z | 2021-06-17T05:25:42.000Z | s2.sounddriver.asm | kramlat/Open-Source-Sonic-ROM-Base | ba438ade0c74bc563aa83e4cd9cd08d4aded55af | [
"BSD-3-Clause"
] | 4 | 2021-01-23T06:28:25.000Z | 2021-05-13T08:40:57.000Z | s2.sounddriver.asm | ArcadeTV/msu-md-sonic2 | 23d24dda3758a1fd341c01e7f7e94e11780a2608 | [
"CC0-1.0"
] | null | null | null | ; Sonic the Hedgehog 2 disassembled Z80 sound driver
; Disassembled by Xenowhirl for AS
; Additional disassembly work by RAS Oct 2008
; RAS' work merged into SVN by Flamewing
; ---------------------------------------------------------------------------
FixDriverBugs = 0
OptimiseDriver = 0
; ---------------------------------------------------------------------------
; NOTES:
;
; Set your editor's tab width to 8 characters wide for viewing this file.
;
; This code is compressed in the ROM, but you can edit it here as uncompressed
; and it will automatically be assembled and compressed into the correct place
; during the build process.
;
; This Z80 code can use labels and equates defined in the 68k code,
; and the 68k code can use the labels and equates defined in here.
; This is fortunate, as they contain references to each other's addresses.
;
; If you want to add significant amounts of extra code to this driver,
; I suggest putting your code as far down as possible, after the function zloc_12FC.
; That will make you less likely to run into space shortages from dislocated data alignment.
;
; >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
; setup defines and macros and stuff
; Okay, I spent a freakin' weekend trying to figure out this Z80 engine
; (cause I just love it so much ;) ), and this is pretty much everything I've
; got; it's probably about 95% figured out.
; - I didn't do 68K queueing completely... it's in there, I'm just a little fuzzy right now
; I briefly touched the Saxman decoder though I'm not using it; I figured someone
; else can play with that. I think playing music out of ROM is just dandy,
; even if it does require a little post-processing to work. And actually, with
; some tweaks, I think I can get this beast on relative addresses... heheheh
; LOTS of decoding work and relabelling of unknowns! This is a much more complete disasm ;)
; zComRange: @ 1B80h
; +00h -- Priority of current SFX (cleared when 1-up song is playing)
; +01h -- tempo clock
; +02h -- current tempo
; +03h -- Pause/unpause flag: 7Fh for pause; 80h for unpause (set from 68K)
; +04h -- total volume levels to continue decreasing volume before fade out considered complete (starts at 28h, works downward)
; +05h -- delay ticker before next volume decrease
; +06h -- communication value
; +07h -- "DAC is updating" flag (set to FFh until completion of DAC track change)
; +08h -- When NOT set to 80h, 68K request new sound index to play
; +09h -- SFX to Play queue slot
; +0Ah -- Play stereo sound queue slot
; +0Bh -- Unknown SFX Queue slot
; +0Ch -- Address to table of voices
;
; +0Eh -- Set to 80h while fading in (disabling SFX) then 00h
; +0Fh -- Same idea as +05h, except for fade IN
; +10h -- Same idea as +04h, except for fade IN
; +11h -- 80h set indicating 1-up song is playing (stops other sounds)
; +12h -- main tempo value
; +13h -- original tempo for speed shoe restore
; +14h -- Speed shoes flag
; +15h -- If 80h, FM Channel 6 is NOT in use (DAC enabled)
; +16h -- value of which music bank to use (0 for MusicPoint1, $80 for MusicPoint2)
; +17h -- Pal mode flag
;
; ** zTracksStart starts @ +18h
;
; 1B98 base
; Track 1 = DAC
; Then 6 FM
; Then 3 PSG
;
;
; 1B98 = DAC
; 1BC2 = FM 1
; 1BEC = FM 2
; 1C16 = FM 3
; 1C40 = FM 4
; 1C6A = FM 5
; 1C94 = FM 6
; 1CBE = PSG 1
; 1CE8 = PSG 2
; 1D12 = PSG 3 (tone or noise)
;
; 1D3C = SFX FM 3
; 1D66 = SFX FM 4
; 1D90 = SFX FM 5
; 1DBA = SFX PSG 1
; 1DE4 = SFX PSG 2
; 1E0E = SFX PSG 3 (tone or noise)
;
;
zTrack STRUCT DOTS
; "playback control"; bits:
; 1 (02h): seems to be "track is at rest"
; 2 (04h): SFX is overriding this track
; 3 (08h): modulation on
; 4 (10h): do not attack next note
; 7 (80h): track is playing
PlaybackControl: ds.b 1
; "voice control"; bits:
; 2 (04h): If set, bound for part II, otherwise 0 (see zWriteFMIorII)
; -- bit 2 has to do with sending key on/off, which uses this differentiation bit directly
; 7 (80h): PSG Track
VoiceControl: ds.b 1
TempoDivider: ds.b 1 ; timing divisor; 1 = Normal, 2 = Half, 3 = Third...
DataPointerLow: ds.b 1 ; Track's position low byte
DataPointerHigh: ds.b 1 ; Track's position high byte
Transpose: ds.b 1 ; Transpose (from coord flag E9)
Volume: ds.b 1 ; channel volume (only applied at voice changes)
AMSFMSPan: ds.b 1 ; Panning / AMS / FMS settings
VoiceIndex: ds.b 1 ; Current voice in use OR current PSG tone
VolFlutter: ds.b 1 ; PSG flutter (dynamically effects PSG volume for decay effects)
StackPointer: ds.b 1 ; "Gosub" stack position offset (starts at 2Ah, i.e. end of track, and each jump decrements by 2)
DurationTimeout: ds.b 1 ; current duration timeout; counting down to zero
SavedDuration: ds.b 1 ; last set duration (if a note follows a note, this is reapplied to 0Bh)
;
; ; 0Dh / 0Eh change a little depending on track -- essentially they hold data relevant to the next note to play
SavedDAC: ; DAC: Next drum to play
FreqLow: ds.b 1 ; FM/PSG: frequency low byte
FreqHigh: ds.b 1 ; FM/PSG: frequency high byte
NoteFillTimeout: ds.b 1 ; Currently set note fill; counts down to zero and then cuts off note
NoteFillMaster: ds.b 1 ; Reset value for current note fill
ModulationPtrLow: ds.b 1 ; low byte of address of current modulation setting
ModulationPtrHigh: ds.b 1 ; high byte of address of current modulation setting
ModulationWait: ds.b 1 ; Wait for ww period of time before modulation starts
ModulationSpeed: ds.b 1 ; Modulation Speed
ModulationDelta: ds.b 1 ; Modulation change per Mod. Step
ModulationSteps: ds.b 1 ; Number of steps in modulation (divided by 2)
ModulationValLow: ds.b 1 ; Current modulation value low byte
ModulationValHigh: ds.b 1 ; Current modulation value high byte
Detune: ds.b 1 ; Set by detune coord flag E1; used to add directly to FM/PSG frequency
VolTLMask: ds.b 1 ; zVolTLMaskTbl value set during voice setting (value based on algorithm indexing zGain table)
PSGNoise: ds.b 1 ; PSG noise setting
VoicePtrLow: ds.b 1 ; low byte of custom voice table (for SFX)
VoicePtrHigh: ds.b 1 ; high byte of custom voice table (for SFX)
TLPtrLow: ds.b 1 ; low byte of where TL bytes of current voice begin (set during voice setting)
TLPtrHigh: ds.b 1 ; high byte of where TL bytes of current voice begin (set during voice setting)
LoopCounters: ds.b $A ; Loop counter index 0
; ... open ...
GoSubStack: ; start of next track, every two bytes below this is a coord flag "gosub" (F8h) return stack
;
; The bytes between +20h and +29h are "open"; starting at +20h and going up are possible loop counters
; (for coord flag F7) while +2Ah going down (never AT 2Ah though) are stacked return addresses going
; down after calling coord flag F8h. Of course, this does mean collisions are possible with either
; or other track memory if you're not careful with these! No range checking is performed!
;
; All tracks are 2Ah bytes long
zTrack ENDSTRUCT
zVar STRUCT DOTS
SFXPriorityVal: ds.b 1
TempoTimeout: ds.b 1
CurrentTempo: ds.b 1 ; Stores current tempo value here
StopMusic: ds.b 1 ; Set to 7Fh to pause music, set to 80h to unpause. Otherwise 00h
FadeOutCounter: ds.b 1
FadeOutDelay: ds.b 1
Communication: ds.b 1 ; Unused byte used to synchronise gameplay events with music
DACUpdating: ds.b 1 ; Set to FFh while DAC is updating, then back to 00h
QueueToPlay: ds.b 1 ; if NOT set to 80h, means new index was requested by 68K
SFXToPlay: ds.b 1 ; When Genesis wants to play "normal" sound, it writes it here
SFXStereoToPlay: ds.b 1 ; When Genesis wants to play alternating stereo sound, it writes it here
SFXUnknown: ds.b 1 ; Unknown type of sound queue, but it's in Genesis code like it was once used
VoiceTblPtr: ds.b 2 ; address of the voices
FadeInFlag: ds.b 1
FadeInDelay: ds.b 1
FadeInCounter: ds.b 1
1upPlaying: ds.b 1
TempoMod: ds.b 1
TempoTurbo: ds.b 1 ; Stores the tempo if speed shoes are acquired (or 7Bh is played anywho)
SpeedUpFlag: ds.b 1
DACEnabled: ds.b 1
MusicBankNumber: ds.b 1
IsPalFlag: ds.b 1 ; I think this flags if system is PAL
zVar ENDSTRUCT
; equates: standard (for Genesis games) addresses in the memory map
zYM2612_A0 = $4000
zYM2612_D0 = $4001
zYM2612_A1 = $4002
zYM2612_D1 = $4003
zBankRegister = $6000
zPSG = $7F11
zROMWindow = $8000
; more equates: addresses specific to this program (besides labelled addresses)
zMusicData = $1380 ; don't change this unless you change all the pointers in the BINCLUDE'd music too...
zStack = zMusicData+$800 ; 1B80h
phase zStack
zAbsVar: zVar
zTracksStart: ; This is the beginning of all BGM track memory
zSongDACFMStart:
zSongDAC: zTrack
zSongFMStart:
zSongFM1: zTrack
zSongFM2: zTrack
zSongFM3: zTrack
zSongFM4: zTrack
zSongFM5: zTrack
zSongFM6: zTrack
zSongFMEnd:
zSongDACFMEnd:
zSongPSGStart:
zSongPSG1: zTrack
zSongPSG2: zTrack
zSongPSG3: zTrack
zSongPSGEnd:
zTracksEnd:
zTracksSFXStart:
zSFX_FMStart:
zSFX_FM3: zTrack
zSFX_FM4: zTrack
zSFX_FM5: zTrack
zSFX_FMEnd:
zSFX_PSGStart:
zSFX_PSG1: zTrack
zSFX_PSG2: zTrack
zSFX_PSG3: zTrack
zSFX_PSGEnd:
zTracksSFXEnd:
zTracksSaveStart: ; When extra life plays, it backs up a large amount of memory (all track data plus 36 bytes)
zSaveVar: zVar
zSaveSongDAC: zTrack
zSaveSongFM1: zTrack
zSaveSongFM2: zTrack
zSaveSongFM3: zTrack
zSaveSongFM4: zTrack
zSaveSongFM5: zTrack
zSaveSongFM6: zTrack
zSaveSongPSG1: zTrack
zSaveSongPSG2: zTrack
zSaveSongPSG3: zTrack
zTracksSaveEnd:
; see the very end for another set of variables
dephase
MUSIC_TRACK_COUNT = (zTracksEnd-zTracksStart)/zTrack.len
MUSIC_DAC_FM_TRACK_COUNT = (zSongDACFMEnd-zSongDACFMStart)/zTrack.len
MUSIC_FM_TRACK_COUNT = (zSongFMEnd-zSongFMStart)/zTrack.len
MUSIC_PSG_TRACK_COUNT = (zSongPSGEnd-zSongPSGStart)/zTrack.len
SFX_TRACK_COUNT = (zTracksSFXEnd-zTracksSFXStart)/zTrack.len
SFX_FM_TRACK_COUNT = (zSFX_FMEnd-zSFX_FMStart)/zTrack.len
SFX_PSG_TRACK_COUNT = (zSFX_PSGEnd-zSFX_PSGStart)/zTrack.len
; in what I believe is an unfortunate design choice in AS,
; both the phased and unphased PCs must be within the target processor's range,
; which means phase is useless here despite being designed to fix this problem...
; oh well, I set it up to fix this later when processing the .p file
!org 0 ; Z80 code starting at address 0 has special meaning to s2p2bin.exe
CPU Z80UNDOC
listing purecode
; macro to perform a bank switch... after using this,
; the start of zROMWindow points to the start of the given 68k address,
; rounded down to the nearest $8000 byte boundary
bankswitch macro addr68k
xor a ; a = 0
ld e,1 ; e = 1
ld hl,zBankRegister
cnt := 0
rept 9
; this is either ld (hl),a or ld (hl),e
db (73h|((((addr68k)&(1<<(15+cnt)))==0)<<2))
cnt := (cnt+1)
endm
endm
; macro to make a certain error message clearer should you happen to get it...
rsttarget macro {INTLABEL}
if ($&7)||($>38h)
fatal "Function __LABEL__ is at 0\{$}h, but must be at a multiple of 8 bytes <= 38h to be used with the rst instruction."
endif
if "__LABEL__"<>""
__LABEL__ label $
endif
endm
; function to decide whether an offset's full range won't fit in one byte
offsetover1byte function from,maxsize, ((from&0FFh)>(100h-maxsize))
; macro to make sure that ($ & 0FF00h) == (($+maxsize) & 0FF00h)
ensure1byteoffset macro maxsize
if offsetover1byte($,maxsize)
startpad := $
align 100h
if MOMPASS=1
endpad := $
if endpad-startpad>=1h
; warn because otherwise you'd have no clue why you're running out of space so fast
warning "had to insert \{endpad-startpad}h bytes of padding before improperly located data at 0\{startpad}h in Z80 code"
endif
endif
endif
endm
; function to turn a 68k address into a word the Z80 can use to access it,
; assuming the correct bank has been switched to first
zmake68kPtr function addr,zROMWindow+(addr&7FFFh)
; >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
; Z80 'ROM' start:
;zEntryPoint:
di ; disable interrupts
ld sp,zStack
jp zloc_167
; ---------------------------------------------------------------------------
; zbyte_7:
zPalModeByte:
db 0
; ||||||||||||||| S U B R O U T I N E |||||||||||||||||||||||||||||||||||||||
if OptimiseDriver=0 ; This is redundant: the Z80 is slow enough to not need to worry about this
align 8
;zsub_8
zFMBusyWait: rsttarget
; Performs the annoying task of waiting for the FM to not be busy
ld a,(zYM2612_A0)
add a,a
jr c,zFMBusyWait
ret
; End of function zFMBusyWait
endif
; ||||||||||||||| S U B R O U T I N E |||||||||||||||||||||||||||||||||||||||
align 8
;zsub_10
zWriteFMIorII: rsttarget
bit 2,(ix+zTrack.VoiceControl)
jr z,zWriteFMI
jr zWriteFMII
; End of function zWriteFMIorII
; ||||||||||||||| S U B R O U T I N E |||||||||||||||||||||||||||||||||||||||
align 8
;zsub_18
zWriteFMI: rsttarget
; Write reg/data pair to part I; 'a' is register, 'c' is data
if OptimiseDriver=0
push af
rst zFMBusyWait ; 'rst' is like 'call' but only works for 8-byte aligned addresses <= 38h
pop af
endif
ld (zYM2612_A0),a
push af
if OptimiseDriver=0
rst zFMBusyWait
endif
ld a,c
ld (zYM2612_D0),a
pop af
ret
; End of function zWriteFMI
; ||||||||||||||| S U B R O U T I N E |||||||||||||||||||||||||||||||||||||||
align 8
;zsub_28
zWriteFMII: rsttarget
; Write reg/data pair to part II; 'a' is register, 'c' is data
if OptimiseDriver=0
push af
rst zFMBusyWait
pop af
endif
ld (zYM2612_A1),a
push af
if OptimiseDriver=0
rst zFMBusyWait
endif
ld a,c
ld (zYM2612_D1),a
pop af
ret
; End of function zWriteFMII
; ||||||||||||||| S U B R O U T I N E |||||||||||||||||||||||||||||||||||||||
org 38h
zVInt: rsttarget
; This is called every VBLANK (38h is the interrupt entry point,
; and VBLANK is the only one Z80 is hooked up to.)
push af ; Save 'af'
exx ; Effectively backs up 'bc', 'de', and 'hl'
call zBankSwitchToMusic ; Bank switch to the music (depending on which BGM is playing in my version)
xor a ; Clear 'a'
ld (zDoSFXFlag),a ; Not updating SFX (updating music)
ld ix,zAbsVar ; ix points to zComRange
ld a,(zAbsVar.StopMusic) ; Get pause/unpause flag
or a ; test 'a'
jr z,zUpdateEverything ; If zero, go to zUpdateEverything
call zPauseMusic
jp zUpdateDAC ; Now update the DAC
; ---------------------------------------------------------------------------
;zloc_51
zUpdateEverything:
ld a,(zAbsVar.FadeOutCounter) ; are we fading out?
or a
call nz,zUpdateFadeout ; If so, update that
ld a,(zAbsVar.FadeInFlag) ; are we fading in?
or a
call nz,zUpdateFadeIn ; If so, update that
ld a,(zAbsVar.SFXToPlay) ; zComRange+09h -- play normal sound
or (ix+zVar.SFXStereoToPlay) ; zComRange+0Ah -- play stereo sound (alternating speakers)
or (ix+zVar.SFXUnknown) ; zComRange+0Bh -- "unknown" slot
call nz,zCycleQueue ; If any of those are non-zero, cycle queue
; Apparently if this is 80h, it does not play anything new,
; otherwise it cues up the next play (flag from 68K for new item)
ld a,(zAbsVar.QueueToPlay)
cp 80h
call nz,zPlaySoundByIndex ; If not 80h, we need to play something new!
; Spindash update
ld a,(zSpindashPlayingCounter)
or a
jr z,+ ; if the spindash counter is already 0, branch
dec a ; decrease the spindash sound playing counter
ld (zSpindashPlayingCounter),a
+
; If the system is PAL, then this performs some timing adjustments
; (i.e. you need to update 1.2x as much to keep up the same rate)
ld hl,zPalModeByte ; Get address of zPalModeByte
ld a,(zAbsVar.IsPalFlag) ; Get IsPalFlag -> 'a'
and (hl) ; 'And' them together
jr z,+ ; If it comes out zero, do nothing
ld hl,zPALUpdTick
dec (hl)
jr nz,+
ld (hl),5 ; every 6 frames (0-5) you need to "double update" to sort of keep up
call zUpdateMusic
+
call zUpdateMusic
; Now all of the SFX tracks are updated in a similar manner to "zUpdateMusic"...
bankswitch SoundIndex ; Bank switch to sound effects
ld a,80h
ld (zDoSFXFlag),a ; Set zDoSFXFlag = 80h (updating sound effects)
; FM SFX channels
ld b,SFX_FM_TRACK_COUNT ; Only 3 FM channels for SFX (FM3, FM4, FM5)
- push bc
ld de,zTrack.len ; Spacing between tracks
add ix,de ; Next track
bit 7,(ix+zTrack.PlaybackControl) ; Is it playing?
call nz,zFMUpdateTrack ; If it is, go update it
pop bc
djnz -
; PSG SFX channels
ld b,SFX_PSG_TRACK_COUNT ; All PSG channels available
- push bc
ld de,zTrack.len ; Spacing between tracks
add ix,de ; Next track
bit 7,(ix+zTrack.PlaybackControl) ; Is it playing?
call nz,zPSGUpdateTrack ; If it is, go update it
pop bc
djnz -
; Now we update the DAC... this only does anything if there's a new DAC
; sound to be played. This is called after updating the DAC track.
; Otherwise it just mucks with the timing loop, forcing an update.
zUpdateDAC:
bankswitch SndDAC_Start ; Bankswitch to the DAC data
ld a,(zCurDAC) ; Get currently playing DAC sound
or a
jp m,+ ; If one is queued (80h+), go to it!
exx ; Otherwise restore registers from mirror regs
ld b,1 ; b=1 (initial feed to the DAC "djnz" loops, i.e. UPDATE RIGHT AWAY)
pop af
ei ; enable interrupts
ret
+
; If you get here, it's time to start a new DAC sound...
ld a,80h
ex af,af' ;'
ld a,(zCurDAC) ; Get current DAC sound
sub 81h ; Subtract 81h (first DAC index is 81h)
ld (zCurDAC),a ; Store that as current DAC sound
; The following two instructions are dangerous: they discard the upper
; two bits of zCurDAC, meaning you can only have 40h DAC samples.
add a,a
add a,a ; a *= 4 (each DAC entry is a pointer and length, 2+2)
add a,zDACPtrTbl&0FFh ; Get low byte into table -> 'a'
ld (zloc_104+1),a ; store into the instruction after zloc_104 (self-modifying code)
add a,zDACLenTbl-zDACPtrTbl ; How to offset to length versus pointer
ld (zloc_107+2),a ; store into the instruction after zloc_107 (self-modifying code)
pop af
ld hl,zWriteToDAC
ex (sp),hl ; Jump to zWriteToDAC
zloc_104:
ld hl,(zDACPtrTbl) ; "self-modified code" -- sets start address of DAC sample for zWriteToDAC
zloc_107:
ld de,(zDACLenTbl) ; "self-modified code" -- sets length of DAC sample for zWriteToDAC
zloc_10B:
ld bc,100h ; "self-modified code" -- From zloc_22A; sets b=1 (the 100h part of it) UPDATE RIGHT AWAY and c="data rate delay" for this DAC sample, the future 'b' setting
ei ; enable interrupts
ret
; End of function zVInt
; ||||||||||||||| S U B R O U T I N E |||||||||||||||||||||||||||||||||||||||
; Updates all tracks; queues notes and durations!
;zsub_110
zUpdateMusic:
call TempoWait ; This is a tempo waiting function
; DAC updates
ld a,0FFh
ld (zAbsVar.DACUpdating),a ; Store FFh to DACUpdating
ld ix,zTracksStart ; Point "ix" to zTracksStart
bit 7,(ix+zTrack.PlaybackControl) ; Is bit 7 (80h) set on playback control byte? (means "is playing")
call nz,zDACUpdateTrack ; If so, zDACUpdateTrack
xor a ; Clear a
ld (zAbsVar.DACUpdating),a ; Store 0 to DACUpdating
ld b,MUSIC_FM_TRACK_COUNT ; Loop 6 times (FM)...
- push bc
ld de,zTrack.len ; Space between tracks
add ix,de ; Go to next track
bit 7,(ix+zTrack.PlaybackControl) ; Is bit 7 (80h) set on playback control byte? (means "is playing")
call nz,zFMUpdateTrack ; If so...
pop bc
djnz -
ld b,MUSIC_PSG_TRACK_COUNT ; Loop 3 times (PSG)...
- push bc
ld de,zTrack.len ; Space between tracks
add ix,de ; Go to next track
bit 7,(ix+zTrack.PlaybackControl) ; Is this track playing?
call nz,zPSGUpdateTrack ; If so...
pop bc
djnz -
ret
; End of function zUpdateMusic
; ||||||||||||||| S U B R O U T I N E |||||||||||||||||||||||||||||||||||||||
;zsub_14C
TempoWait:
; Tempo works as divisions of the 60Hz clock (there is a fix supplied for
; PAL that "kind of" keeps it on track.) Every time the internal music clock
; overflows, it will update. So a tempo of 80h will update every other
; frame, or 30 times a second.
ld ix,zAbsVar ; ix points to zComRange
ld a,(ix+zVar.CurrentTempo) ; tempo value
add a,(ix+zVar.TempoTimeout) ; Adds previous value to
ld (ix+zVar.TempoTimeout),a ; Store this as new
ret c ; If addition overflowed (answer greater than FFh), return
; So if adding tempo value did NOT overflow, then we add 1 to all durations
ld hl,zTracksStart+zTrack.DurationTimeout ; Start at first track's delay counter (counting up to delay)
ld de,zTrack.len ; Offset between tracks
ld b,MUSIC_TRACK_COUNT ; Loop for all tracks
- inc (hl) ; Increasing delay tick counter to target
add hl,de ; Next track...
djnz -
ret
; End of function TempoWait
; ---------------------------------------------------------------------------
zloc_167:
im 1 ; set interrupt mode 1
call zClearTrackPlaybackMem
ei ; enable interrupts
ld iy,zDACDecodeTbl
ld de,0
; This controls the update rate for the DAC...
; My speculation for the rate at which the DAC updates:
; Z80 clock = 3.57954MHz = 3579540Hz (not sure?)
; zWaitLoop (immediately below) is waiting for someone to set
; 'de' (length of DAC sample) to non-zero
; The DAC code is sync'ed with VBLANK somehow, but I haven't quite got that
; one figure out yet ... tests on emulator seem to confirm it though.
; Next, there are "djnz" loops which do busy-waits. (Two of them, which is
; where the '2' comes from in my guess equation.) The DACMasterPlaylist
; appears to use '1' as the lowest input value to these functions. (Which,
; given the djnz, would be the fastest possible value.)
; The rate seems to be calculated by 3579540Hz / (60Hz + (speed * 4)) / 2
; This "waitLoop" waits if the DAC has no data, or else it drops out!
; zloc_174:
zWaitLoop:
ld a,d
or e
jr z,zWaitLoop ; As long as 'de' (length of sample) = 0, wait...
; 'hl' is the pointer to the sample, 'de' is the length of the sample,
; and 'iy' points to the translation table; let's go...
; The "djnz $" loops control the playback rate of the DAC
; (the higher the 'b' value, the slower it will play)
; As for the actual encoding of the data, it is described by jman2050:
; "As for how the data is compressed, lemme explain that real quick:
; First, it is a lossy compression. So if you recompress a PCM sample this way,
; you will lose precision in data. Anyway, what happens is that each compressed data
; is separated into nybbles (1 4-bit section of a byte). This first nybble of data is
; read, and used as an index to a table containing the following data:
; 0,1,2,4,8,$10,$20,$40,$80,$FF,$FE,$FC,$F8,$F0,$E0,$C0." [zDACDecodeTbl / zbyte_1B3]
; "So if the nybble were equal to F, it'd extract $C0 from the tale. If it were 8,
; it would extract $80 from the table. ... Anyway, there is also another byte of data
; that we'll call 'd'. At the start of decompression, d is $80. What happens is that d
; is then added to the data extracted from the table using the nybble. So if the nybble
; were 4, the 8 would be extracted from the table, then added to d, which is $80,
; resulting in $88. This result is then put back into d, then fed into the YM2612 for
; processing. Then the next nybble is read, the data is extracted from the table, then
; is added to d (remember, d is now changed because of the previous operation), then is
; put back into d, then is fed into the YM2612. This process is repeated until the number
; of bytes as defined in the table above are read and decompressed."
; In our case, the so-called 'd' value is shadow register 'a'
zWriteToDAC:
djnz $ ; Busy wait for specific amount of time in 'b'
di ; disable interrupts (while updating DAC)
ld a,2Ah ; DAC port
ld (zYM2612_A0),a ; Set DAC port register
ld a,(hl) ; Get next DAC byte
rlca
rlca
rlca
rlca
and 0Fh ; UPPER 4-bit offset into zDACDecodeTbl
ld (zloc_18B+2),a ; store into the instruction after zloc_18B (self-modifying code)
ex af,af' ; shadow register 'a' is the 'd' value for 'jman2050' encoding
zloc_18B:
add a,(iy+0) ; Get byte from zDACDecodeTbl (self-modified to proper index)
ld (zYM2612_D0),a ; Write this byte to the DAC
ex af,af' ; back to regular registers
ld b,c ; reload 'b' with wait value
ei ; enable interrupts (done updating DAC, busy waiting for next update)
djnz $ ; Busy wait for specific amount of time in 'b'
di ; disable interrupts (while updating DAC)
push af
pop af
ld a,2Ah ; DAC port
ld (zYM2612_A0),a ; Set DAC port register
ld b,c ; reload 'b' with wait value
ld a,(hl) ; Get next DAC byte
inc hl ; Next byte in DAC stream...
dec de ; One less byte
and 0Fh ; LOWER 4-bit offset into zDACDecodeTbl
ld (zloc_1A8+2),a ; store into the instruction after zloc_1A8 (self-modifying code)
ex af,af' ; shadow register 'a' is the 'd' value for 'jman2050' encoding
zloc_1A8:
add a,(iy+0) ; Get byte from zDACDecodeTbl (self-modified to proper index)
ld (zYM2612_D0),a ; Write this byte to the DAC
ex af,af' ; back to regular registers
ei ; enable interrupts (done updating DAC, busy waiting for next update)
jp zWaitLoop ; Back to the wait loop; if there's more DAC to write, we come back down again!
; ---------------------------------------------------------------------------
; 'jman2050' DAC decode lookup table
;zbyte_1B3
zDACDecodeTbl:
db 0, 1, 2, 4, 8, 10h, 20h, 40h
db 80h, -1, -2, -4, -8, -10h, -20h, -40h
; The following two tables are used for when an SFX terminates
; its track to properly restore the music track it temporarily took
; over. Note that an important rule here is that no SFX may use
; DAC, FM Channel 1, FM Channel 2, or FM Channel 6, period.
; Thus there's also only SFX tracks starting at FM Channel 3.
; The zeroes appear after FM 3 because it calculates the offsets into
; these tables by their channel assignment, where between Channel 3
; and Channel 4 there is a gap numerically.
ensure1byteoffset 10h
;zbyte_1C3
zMusicTrackOffs:
; These are offsets to different music tracks starting with FM3
dw zSongFM3, 0000h, zSongFM4, zSongFM5 ; FM3, 0, FM4, FM5
dw zSongPSG1, zSongPSG2, zSongPSG3, zSongPSG3 ; PSG1, PSG2, PSG3, PSG3 (noise alternate)
ensure1byteoffset 10h
;zbyte_1D3
zSFXTrackOffs:
; These are offsets to different sound effect tracks starting with FM3
dw zSFX_FM3, 0000h, zSFX_FM4, zSFX_FM5 ; FM3, 0, FM4, FM5
dw zSFX_PSG1, zSFX_PSG2, zSFX_PSG3, zSFX_PSG3 ; PSG1, PSG2, PSG3, PSG3 (noise alternate)
; ---------------------------------------------------------------------------
zDACUpdateTrack:
dec (ix+zTrack.DurationTimeout) ; Subtract 1 from (zTracksStart+0Bh) [Track 1's delay start]
ret nz ; Return if not zero yet
ld l,(ix+zTrack.DataPointerLow) ; Low byte of DAC track current address (zTracksStart+3)
ld h,(ix+zTrack.DataPointerHigh) ; High byte of DAC track current address (zTracksStart+4)
- ld a,(hl) ; Get next byte from DAC Track
inc hl ; Move to next position...
cp 0E0h ; Check if is coordination flag
jr c,+ ; Not coord flag? Skip to '+'
call zCoordFlag ; Handle coordination flag
jp - ; Loop back around...
+
or a ; Test 'a' for 80h not set, which is a note duration
jp p,zloc_20E ; If note duration, jump to zloc_20E (note that "hl" is already incremented)
ld (ix+zTrack.SavedDAC),a ; This is a note; store it here
ld a,(hl) ; Get next byte...
or a ; Test 'a' for 80h not set, which is a note duration
jp p,zloc_20D ; Is this a duration this time?? If so, jump to zloc_20D (only difference is to increment "hl")
; Note followed a note... apparently recycles the previous duration
ld a,(ix+zTrack.SavedDuration) ; Current DAC note ticker goal value -> 'a'
ld (ix+zTrack.DurationTimeout),a ; Use it again
jr zDACAfterDur ; Jump to after duration subroutine...
; ---------------------------------------------------------------------------
zloc_20D:
inc hl ; Goes to next byte (after duration byte)
zloc_20E:
call zSetDuration
;zloc_211
zDACAfterDur:
ld (ix+zTrack.DataPointerLow),l ; Stores "hl" to the DAC track pointer memory
ld (ix+zTrack.DataPointerHigh),h
bit 2,(ix+zTrack.PlaybackControl) ; Is SFX overriding this track?
ret nz ; If so, we're done
ld a,(ix+zTrack.SavedDAC) ; Check next note to play
cp 80h ; Is it a rest?
ret z ; If so, quit
sub 81h ; Otherwise, transform note into an index... (we're selecting which drum to play!)
add a,a ; Multiply by 2...
add a,zDACMasterPlaylist&0FFh ; Offset into list
ld (zloc_22A+2),a ; store into the instruction after zloc_22A (self-modifying code)
zloc_22A:
ld bc,(zDACMasterPlaylist) ; Load appropriate drum info -> bc
ld a,c ; DAC sample number (81h base) -> 'a'
ld (zCurDAC),a ; Store current DAC sound to play
ld a,b ; Data rate delay -> 'b'
ld (zloc_10B+1),a ; store into the instruction after zloc_10B (self-modifying code)
ret
; ||||||||||||||| S U B R O U T I N E |||||||||||||||||||||||||||||||||||||||
;zsub_237
zFMUpdateTrack:
dec (ix+zTrack.DurationTimeout) ; Decrement duration
jr nz,+ ; If not time-out yet, go do updates only
res 4,(ix+zTrack.PlaybackControl) ; When duration over, clear "do not attack" bit 4 (0x10) of track's play control
call zFMDoNext ; Handle coordination flags, get next note and duration
call zFMPrepareNote ; Prepares to play next note
call zFMNoteOn ; Actually key it (if allowed)
call zDoModulation ; Update modulation (if modulation doesn't change, we do not return here)
jp zFMUpdateFreq ; Applies frequency update from modulation
+
call zNoteFillUpdate ; Applies "note fill" (time until cut-off); NOTE: Will not return here if "note fill" expires
call zDoModulation ; Update modulation (if modulation doesn't change, we do not return here)
jp zFMUpdateFreq ; Applies frequency update from modulation
; End of function zFMUpdateTrack
; ||||||||||||||| S U B R O U T I N E |||||||||||||||||||||||||||||||||||||||
;zsub_258
zFMDoNext:
ld l,(ix+zTrack.DataPointerLow) ; Load track position low byte
ld h,(ix+zTrack.DataPointerHigh) ; Load track position high byte
res 1,(ix+zTrack.PlaybackControl) ; Clear bit 1 (02h) "track is rest" from track
- ld a,(hl)
inc hl ; Increment track to next byte
cp 0E0h ; Is it a control byte / "coordination flag"?
jr c,+ ; If not, jump over
call zCoordFlag ; Handle coordination flag
jr - ; Go around, get next byte
+
push af
call zFMNoteOff ; Send key off
pop af
or a ; Test 'a' for 80h not set, which is a note duration
jp p,+ ; If duration, jump to '+'
call zFMSetFreq ; Otherwise, this is a note; call zFMSetFreq
ld a,(hl) ; Get next byte
or a ; Test 'a' for 80h set, which is a note
jp m,zFinishTrackUpdate ; If this is a note, jump to zFinishTrackUpdate
inc hl ; Otherwise, go to next byte; a duration
+
call zSetDuration
jp zFinishTrackUpdate ; Either way, jumping to zFinishTrackUpdate...
; End of function zFMDoNext
; ---------------------------------------------------------------------------
; zloc_285:
;zGetFrequency
zFMSetFreq:
; 'a' holds a note to get frequency for
sub 80h
jr z,zFMDoRest ; If this is a rest, jump to zFMDoRest
add a,(ix+zTrack.Transpose) ; Add current channel transpose (coord flag E9)
add a,a ; Offset into Frequency table...
if OptimiseDriver
ld d,12*2 ; 12 notes per octave
ld c,0 ; clear c (will hold octave bits)
- sub d ; Subtract 1 octave from the note
jr c,+ ; If this is less than zero, we are done
inc c ; One octave up
jr -
+
add a,d ; Add 1 octave back (so note index is positive)
sla c
sla c
sla c ; multiply octave value by 8, to get final octave bits
endif
add a,zFrequencies&0FFh
ld (zloc_292+2),a ; store into the instruction after zloc_292 (self-modifying code)
; ld d,a
; adc a,(zFrequencies&0FF00h)>>8
; sub d
; ld (zloc_292+3),a ; this is how you could store the high byte of the pointer too (unnecessary if it's in the right range)
zloc_292:
ld de,(zFrequencies) ; Stores frequency into "de"
ld (ix+zTrack.FreqLow),e ; Frequency low byte -> trackPtr + 0Dh
if OptimiseDriver
ld a,d
or c
ld (ix+zTrack.FreqHigh),a ; Frequency high byte -> trackPtr + 0Eh
else
ld (ix+zTrack.FreqHigh),d ; Frequency high byte -> trackPtr + 0Eh
endif
ret
; ---------------------------------------------------------------------------
;zloc_29D
zFMDoRest:
set 1,(ix+zTrack.PlaybackControl) ; Set bit 1 (track is at rest)
xor a ; Clear 'a'
ld (ix+zTrack.FreqLow),a ; Zero out FM Frequency
ld (ix+zTrack.FreqHigh),a ; Zero out FM Frequency
ret
; ||||||||||||||| S U B R O U T I N E |||||||||||||||||||||||||||||||||||||||
;zsub_2A9
zSetDuration:
ld c,a ; 'a' = current duration
ld b,(ix+zTrack.TempoDivider) ; Divisor; causes multiplication of duration for every number higher than 1
- djnz +
ld (ix+zTrack.SavedDuration),a ; Store new duration into ticker goal of this track (this is reused if a note follows a note without a new duration)
ld (ix+zTrack.DurationTimeout),a ; Sets it on ticker (counts to zero)
ret
+
add a,c ; Will multiply duration based on 'b'
jp -
; End of function zSetDuration
; ---------------------------------------------------------------------------
;zloc_2BA
zFinishTrackUpdate:
; Common finish-up routine used by FM or PSG
ld (ix+zTrack.DataPointerLow),l ; Stores "hl" to the track pointer memory
ld (ix+zTrack.DataPointerHigh),h
ld a,(ix+zTrack.SavedDuration) ; Last set duration
ld (ix+zTrack.DurationTimeout),a ; ... put into ticker
bit 4,(ix+zTrack.PlaybackControl) ; Is bit 4 (10h) "do not attack next note" set on playback?
ret nz ; If so, quit
ld a,(ix+zTrack.NoteFillMaster) ; Master "note fill" value -> a
ld (ix+zTrack.NoteFillTimeout),a ; Reset 0Fh "note fill" value to master
ld (ix+zTrack.VolFlutter),0 ; Reset PSG flutter byte
bit 3,(ix+zTrack.PlaybackControl) ; is modulation turned on?
ret z ; if not, quit
ld l,(ix+zTrack.ModulationPtrLow) ; Otherwise, get address of modulation setting
ld h,(ix+zTrack.ModulationPtrHigh)
jp zSetModulation ; ... and go do it!
; ||||||||||||||| S U B R O U T I N E |||||||||||||||||||||||||||||||||||||||
;zsub_2E3
zNoteFillUpdate:
ld a,(ix+zTrack.NoteFillTimeout) ; Get current note fill value
or a
ret z ; If zero, return!
dec (ix+zTrack.NoteFillTimeout) ; Decrement note fill
ret nz ; If not zero, return
set 1,(ix+zTrack.PlaybackControl) ; Set bit 1 (track is at rest)
pop de ; return address -> 'de' (will not return to z*UpdateTrack function!!)
bit 7,(ix+zTrack.VoiceControl) ; Is this a PSG track?
jp nz,zPSGNoteOff ; If so, jump to zPSGNoteOff
jp zFMNoteOff ; Else, jump to zFMNoteOff
; End of function zNoteFillUpdate
; ||||||||||||||| S U B R O U T I N E |||||||||||||||||||||||||||||||||||||||
;zsub_2FB
zDoModulation:
pop de ; keep return address -> de (MAY not return to caller)
bit 1,(ix+zTrack.PlaybackControl) ; Is "track in rest"?
ret nz ; If so, quit
bit 3,(ix+zTrack.PlaybackControl) ; Is modulation on?
ret z ; If not, quit
ld a,(ix+zTrack.ModulationWait) ; 'ww' period of time before modulation starts
or a
jr z,+ ; if zero, go to it!
dec (ix+zTrack.ModulationWait) ; Otherwise, decrement timer
ret ; return if decremented (does NOT return to z*UpdateTrack!!)
+
dec (ix+zTrack.ModulationSpeed) ; Decrement modulation speed counter
ret nz ; Return if not yet zero
ld l,(ix+zTrack.ModulationPtrLow)
ld h,(ix+zTrack.ModulationPtrHigh) ; 'hl' points to modulation setting
inc hl ; skip passed 'ww' period of time
ld a,(hl) ; Get modulation speed
ld (ix+zTrack.ModulationSpeed),a ; Restore speed counter
ld a,(ix+zTrack.ModulationSteps) ; Get number of steps in modulation
or a
jr nz,+ ; If not zero, skip to '+'
; If steps have reached zero...
inc hl ; passed mod speed
inc hl ; passed mod change per mod step
ld a,(hl) ; get number of steps in modulation
ld (ix+zTrack.ModulationSteps),a ; restore modulation steps
ld a,(ix+zTrack.ModulationDelta) ; get modulation change per mod step
neg ; flip it negative
ld (ix+zTrack.ModulationDelta),a ; store negated value
ret
+
dec (ix+zTrack.ModulationSteps) ; Decrement the step
ld l,(ix+zTrack.ModulationValLow)
ld h,(ix+zTrack.ModulationValHigh) ; Get 16-bit modulation value
; This is a 16-bit sign extension for 'bc'
if OptimiseDriver
ld a,(ix+zTrack.ModulationDelta) ; Get current modulation change per step -> 'a'
ld c,a
rla ; Carry contains sign of delta
sbc a,a ; a = 0 or -1 if carry is 0 or 1
ld b,a ; bc = sign extension of delta
else
ld b,0
ld c,(ix+zTrack.ModulationDelta) ; Get current modulation change per step -> 'c'
bit 7,c
jp z,+
ld b,0FFh ; Sign extend if negative
+
endif
add hl,bc ; Add to current modulation value
ld (ix+zTrack.ModulationValLow),l
ld (ix+zTrack.ModulationValHigh),h ; Store new 16-bit modulation value
ld c,(ix+zTrack.FreqLow) ; frequency low byte -> c
ld b,(ix+zTrack.FreqHigh) ; frequency high byte -> b
add hl,bc ; Add modulation value
ex de,hl
jp (hl) ; WILL return to z*UpdateTrack
; End of function zDoModulation
; ---------------------------------------------------------------------------
; This the note -> frequency setting lookup
; the same array is found at $729CE in Sonic 1, and at $C9C44 in Ristar
; zword_359:
ensure1byteoffset 8Ch
zPSGFrequencies:
dw 356h, 326h, 2F9h, 2CEh, 2A5h, 280h, 25Ch, 23Ah, 21Ah, 1FBh, 1DFh, 1C4h
dw 1ABh, 193h, 17Dh, 167h, 153h, 140h, 12Eh, 11Dh, 10Dh, 0FEh, 0EFh, 0E2h
dw 0D6h, 0C9h, 0BEh, 0B4h, 0A9h, 0A0h, 97h, 8Fh, 87h, 7Fh, 78h, 71h
dw 6Bh, 65h, 5Fh, 5Ah, 55h, 50h, 4Bh, 47h, 43h, 40h, 3Ch, 39h
dw 36h, 33h, 30h, 2Dh, 2Bh, 28h, 26h, 24h, 22h, 20h, 1Fh, 1Dh
dw 1Bh, 1Ah, 18h, 17h, 16h, 15h, 13h, 12h, 11h, 0
; ---------------------------------------------------------------------------
;zloc_3E5
zFMPrepareNote:
bit 1,(ix+zTrack.PlaybackControl) ; Is track in rest?
ret nz ; If so, quit
ld e,(ix+zTrack.FreqLow) ; Get frequency low
ld d,(ix+zTrack.FreqHigh) ; Get frequency high
ld a,d
or e
jp z,zloc_4C5 ; If de == 0, go to zloc_4C5
;zloc_3F5
zFMUpdateFreq:
bit 2,(ix+zTrack.PlaybackControl) ; Is SFX overriding this track?
ret nz ; If so, quit!
; This is a 16-bit sign extension of (ix+19h)
if OptimiseDriver
ld a,(ix+zTrack.Detune) ; Get detune value
ld l,a
rla ; Carry contains sign of detune
sbc a,a ; a = 0 or -1 if carry is 0 or 1
ld h,a ; hl = sign extension of detune
else
ld h,0 ; h = 0
ld l,(ix+zTrack.Detune) ; Get detune value
bit 7,l ; Did prior value have 80h set?
jr z,+ ; If not, skip next step
ld h,0FFh ; h = FFh
+
endif
add hl,de ; Alter frequency just a tad
ld c,h ; Upper part of frequency as data to FM ('c')
ld a,(ix+zTrack.VoiceControl) ; "voice control" byte -> 'a'
and 3 ; Strip to only channel assignment
add a,0A4h ; Change to proper register
rst zWriteFMIorII ; Write it!
ld c,l ; lower part of frequency
sub 4 ; A0h+ register
rst zWriteFMIorII ; Write it!
ret
; ||||||||||||||| S U B R O U T I N E |||||||||||||||||||||||||||||||||||||||
;zsub_414
zPSGUpdateTrack:
dec (ix+zTrack.DurationTimeout) ; decrement current duration timeout..
jr nz,+ ; If not time-out yet, go do updates only
res 4,(ix+zTrack.PlaybackControl) ; Reset "do not attack next note" bit
call zPSGDoNext ; Handle coordination flags, get next note and duration
call zPSGDoNoteOn ; Actually key it (if allowed)
call zPSGDoVolFX ; This applies PSG volume as well as its special volume-based effects that I call "flutter"
call zDoModulation ; Update modulation (if modulation doesn't change, we do not return here)
jp zPSGUpdateFreq
+
call zNoteFillUpdate ; Applies "note fill" (time until cut-off); NOTE: Will not return here if "note fill" expires
call zPSGUpdateVolFX ; Update volume effects
call zDoModulation ; Update modulation (if modulation doesn't change, we do not return here)
jp zPSGUpdateFreq
; End of function zPSGUpdateTrack
; ||||||||||||||| S U B R O U T I N E |||||||||||||||||||||||||||||||||||||||
;zsub_438
zPSGDoNext:
ld l,(ix+zTrack.DataPointerLow) ; Load track position low byte
ld h,(ix+zTrack.DataPointerHigh) ; Load track position high byte
res 1,(ix+zTrack.PlaybackControl) ; Clear bit 1 (02h) "track is rest" from track
- ld a,(hl)
inc hl ; Increment track to next byte
cp 0E0h ; Is it a control byte / "coordination flag"?
jr c,+ ; If not, jump over
call zCoordFlag ; Handle coordination flag
jr - ; Go around, get next byte
+
or a ; Test 'a' for 80h not set, which is a note duration
jp p,+ ; If note duration, jump to '+'
call zPSGSetFreq ; Get frequency for this note
ld a,(hl) ; Get next byte
or a ; Test 'a' for 80h set, which is a note
jp m,zFinishTrackUpdate ; If this is a note, jump to zFinishTrackUpdate
inc hl ; Otherwise, go to next byte; a duration
+
call zSetDuration
jp zFinishTrackUpdate ; Either way, jumping to zFinishTrackUpdate...
; End of function zPSGDoNext
; ---------------------------------------------------------------------------
;zloc_460
zPSGSetFreq:
sub 81h ; a = a-$81 (zero-based index from lowest note)
jr c,+ ; If carry (only time that happens if 80h because of earlier logic) this is a rest!
add a,(ix+zTrack.Transpose) ; Add current channel transpose (coord flag E9)
add a,a ; Multiply note value by 2
add a,zPSGFrequencies&0FFh ; Point to proper place in table
ld (zloc_46D+2),a ; store into the instruction after zloc_46D (self-modifying code)
zloc_46D:
ld de,(zPSGFrequencies) ; Gets appropriate frequency setting -> 'de'
ld (ix+zTrack.FreqLow),e ; Frequency low byte -> trackPtr + 0Dh
ld (ix+zTrack.FreqHigh),d ; Frequency high byte -> trackPtr + 0Eh
ret
+
; If you get here, we're doing a PSG rest
set 1,(ix+zTrack.PlaybackControl) ; Set "track in rest" bit
ld a,0FFh
ld (ix+zTrack.FreqLow),a ; Frequency low byte = FFh
ld (ix+zTrack.FreqHigh),a ; Frequency hight byte = FFh
jp zPSGNoteOff ; Send PSG Note Off
; ||||||||||||||| S U B R O U T I N E |||||||||||||||||||||||||||||||||||||||
;zsub_487
zPSGDoNoteOn:
bit 7,(ix+zTrack.FreqHigh) ; If track is at rest (frequency was set to FFh)...
jr nz,zloc_4C5 ; jump to zloc_4C5
ld e,(ix+zTrack.FreqLow) ; Frequency low byte -> e
ld d,(ix+zTrack.FreqHigh) ; Frequency high byte -> d
;zloc_493
zPSGUpdateFreq:
ld a,(ix+zTrack.PlaybackControl) ; Get playback control byte
and 6
ret nz ; If either bit 1 ("track in rest") and 2 ("SFX overriding this track"), quit!
; This is a 16-bit sign extension of (ix+19h) -> 'hl'
if OptimiseDriver
ld a,(ix+zTrack.Detune) ; Get detune value
ld l,a
rla ; Carry contains sign of detune
sbc a,a ; a = 0 or -1 if carry is 0 or 1
ld h,a ; hl = sign extension of detune
else
ld h,0
ld l,(ix+zTrack.Detune) ; hl = detune value (coord flag E9)
bit 7,l ; Did prior value have 80h set?
jr z,+ ; If not, skip next step
ld h,0FFh ; sign extend negative value
+
endif
add hl,de ; Alter frequency just a tad
; This picks out the reg to write to the PSG
ld a,(ix+zTrack.VoiceControl) ; Get "voice control" byte...
cp 0E0h ; Is it E0h?
jr nz,+ ; If not, skip next step
ld a,0C0h ; a = C0h instead of E0h
+
ld b,a ; 'a' -> 'b'
ld a,l ; Frequency low byte -> 'a'
and 0Fh ; Keep only lower four bits (first PSG reg write only applies d0-d3 of freq)
or b ; Apply register bits
ld (zPSG),a ; Write it to PSG!
ld a,l ; Get frequency low byte -> 'a'
srl h ; (h >> 1); lowest bit into carry
rra ; (a >> 1); carry from 'h' applied at end
srl h ; ... and so on ...
rra
rra
rra ; in C, basically (hl >> 4) (except possible garbage from the rotation in upper bits)
and 3Fh ; keep only lower 6 bits (PSG d4-d9)
ld (zPSG),a ; Write other frequency byte to PSG!
ret
; ---------------------------------------------------------------------------
zloc_4C5:
set 1,(ix+zTrack.PlaybackControl) ; Set "track at rest" bit
ret
; End of function zPSGDoNoteOn
; ||||||||||||||| S U B R O U T I N E |||||||||||||||||||||||||||||||||||||||
;zsub_4CA
zPSGUpdateVolFX:
ld a,(ix+zTrack.VoiceIndex) ; Get current PSG tone
or a ; Test if it's zero
ret z ; If it is, return!
; Otherwise, fall into zPSGDoVolFX...
; ||||||||||||||| S U B R O U T I N E |||||||||||||||||||||||||||||||||||||||
;zsub_4CF
zPSGDoVolFX:
ld b,(ix+zTrack.Volume) ; Channel volume -> 'b'
ld a,(ix+zTrack.VoiceIndex) ; Current PSG tone -> 'a'
or a ; Test it
jr z,zPSGUpdateVol ; If tone is zero, jump to zPSGUpdateVol
ld hl,zPSG_FlutterTbl ; hl points to zPSG_FlutterTbl table
dec a ; a--
add a,a ; a *= 2
ld e,a
ld d,0 ; de = a
add hl,de ; Offset into pointer table...
ld a,(hl) ; Get low byte -> 'a'
inc hl ; Next byte
ld h,(hl) ; Get high byte into 'h'
add a,(ix+zTrack.VolFlutter) ; Apply PSG flutter (provides dynamic volume for special effects)
ld l,a
adc a,h
sub l
ld h,a ; Basically, hl = (hl+(ix+zTrack.VolFlutter))
ld a,(hl) ; Get byte from this location
inc (ix+zTrack.VolFlutter) ; Increment PSG flutter value
or a ; test byte from before
jp p,+ ; Is it a positive value?
cp 80h ; Check if it's 80h (terminator to the "flutter" list)
jr z,zVolEnvHold ; If it is, then jump to zVolEnvHold (which just keeps at this flutter value, i.e. no more changes in volume)
+
add a,b ; Apply this "flutter" to channel volume -> 'a'
ld b,a ; a -> 'b'
;zloc_4F9
zPSGUpdateVol:
ld a,(ix+zTrack.PlaybackControl) ; get playback control byte
and 6
ret nz ; If either bit 1 ("track in rest") and 2 ("SFX overriding this track"), quit!
bit 4,(ix+zTrack.PlaybackControl) ; is "do not attack next note" set?
jr nz,zloc_515 ; If so, jump to zloc_515
zloc_505:
ld a,b ; 'b' -> 'a'
cp 10h ; Did the level get pushed below silence level? (i.e. a > 0Fh)
jr c,+
ld a,0Fh ; If so, fix it!
+
or (ix+zTrack.VoiceControl) ; Apply channel info (which PSG to set!)
or 10h ; This bit marks it as an attenuation level assignment (along with channel info just above)
ld (zPSG),a ; Write to PSG!!
ret
; ---------------------------------------------------------------------------
zloc_515: ; If you get here, then "do not attack next note" was set...
ld a,(ix+zTrack.NoteFillMaster) ; Get master "note fill" value
or a ; test it
jr z,zloc_505 ; If it's zero, then just process normally
ld a,(ix+zTrack.NoteFillTimeout) ; Otherwise, get current "note fill" value
or a ; Test it
jr nz,zloc_505 ; If it's not zero, then just process normally
ret
; ---------------------------------------------------------------------------
; zloc_522:
zVolEnvHold:
; This just decrements the flutter to keep it in place; no more volume changes in this list
if FixDriverBugs
dec (ix+zTrack.VolFlutter)
dec (ix+zTrack.VolFlutter) ; Put index back (before final volume value)
jr zPSGDoVolFX ; Loop back and update volume
else
; DANGER! This effectively halts all future volume updates, breaking fades.
dec (ix+zTrack.VolFlutter) ; Put index back (before flag 80h)
ret ; Return and don't update volume on this frame (!!!)
endif
; End of function zPSGDoVolFX
; ||||||||||||||| S U B R O U T I N E |||||||||||||||||||||||||||||||||||||||
;zsub_526
zPSGNoteOff:
bit 2,(ix+zTrack.PlaybackControl) ; Is "SFX override" bit set?
ret nz ; If so, quit!
ld a,(ix+zTrack.VoiceControl) ; Get "voice control" byte (loads upper bits which specify attenuation setting)
; |a| |1Fh|
; VOL1 0x90 = 100 1xxxx vol 4b xxxx = attenuation value
; VOL2 0xb0 = 101 1xxxx vol 4b
; VOL3 0xd0 = 110 1xxxx vol 4b
or 1Fh ; Attenuation Off
ld (zPSG),a
if FixDriverBugs
; Without zInitMusicPlayback forcefully muting all channels, there's the
; risk of music accidentally playing noise because it can't detect if
; the PSG4/noise channel needs muting, on track initialisation.
; This bug can be heard be playing the End of Level music in CNZ, whose
; music uses the noise channel. S&K's driver contains a fix just like this.
cp 0DFh ; Are we stopping PSG3?
ret nz
ld a,0FFh ; If so, stop noise channel while we're at it
ld (zPSG),a ; Stop noise channel
endif
ret
; End of function zPSGNoteOff
; ---------------------------------------------------------------------------
; lookup table of FM note frequencies for instruments and sound effects
if OptimiseDriver
ensure1byteoffset 18h
else
ensure1byteoffset 0C0h
endif
; zbyte_534:
zFrequencies:
dw 025Eh,0284h,02ABh,02D3h,02FEh,032Dh,035Ch,038Fh,03C5h,03FFh,043Ch,047Ch
if OptimiseDriver=0 ; We will calculate these, instead, which will save space
dw 0A5Eh,0A84h,0AABh,0AD3h,0AFEh,0B2Dh,0B5Ch,0B8Fh,0BC5h,0BFFh,0C3Ch,0C7Ch
dw 125Eh,1284h,12ABh,12D3h,12FEh,132Dh,135Ch,138Fh,13C5h,13FFh,143Ch,147Ch
dw 1A5Eh,1A84h,1AABh,1AD3h,1AFEh,1B2Dh,1B5Ch,1B8Fh,1BC5h,1BFFh,1C3Ch,1C7Ch
dw 225Eh,2284h,22ABh,22D3h,22FEh,232Dh,235Ch,238Fh,23C5h,23FFh,243Ch,247Ch
dw 2A5Eh,2A84h,2AABh,2AD3h,2AFEh,2B2Dh,2B5Ch,2B8Fh,2BC5h,2BFFh,2C3Ch,2C7Ch
dw 325Eh,3284h,32ABh,32D3h,32FEh,332Dh,335Ch,338Fh,33C5h,33FFh,343Ch,347Ch
dw 3A5Eh,3A84h,3AABh,3AD3h,3AFEh,3B2Dh,3B5Ch,3B8Fh,3BC5h,3BFFh,3C3Ch,3C7Ch ; 96 entries
endif
;zloc_5F4
zPSGSilenceAll:
ld hl,zPSG ; PSG reg
ld (hl),9Fh ; Stop channel 0
ld (hl),0BFh ; Stop channel 1
ld (hl),0DFh ; Stop channel 2
ld (hl),0FFh ; Stop noise channel
ret
; ||||||||||||||| S U B R O U T I N E |||||||||||||||||||||||||||||||||||||||
;zsub_600
zPauseMusic:
jp m,+ ; If we are to unpause music, branch
ld a,(zPaused) ; Get paused flag
or a ; Are we paused already?
ret nz ; If so, return
ld a,0FFh ; a = 0FFh
ld (zPaused),a ; Set paused flag
call zFMSilenceAll
jp zPSGSilenceAll
+
if OptimiseDriver
xor a ; a = 0
ld (zAbsVar.StopMusic),a ; Clear pause/unpause flag
else
push ix ; Save ix (nothing uses this, beyond this point...)
ld (ix+zVar.StopMusic),0 ; Clear pause/unpause flag
xor a ; a = 0
endif
ld (zPaused),a ; Clear paused flag
ld ix,zSongDACFMStart ; ix = pointer to track RAM
ld b,MUSIC_DAC_FM_TRACK_COUNT ; 1 DAC + 6 FM
call zResumeTrack
bankswitch SoundIndex ; Now for SFX
ld a,0FFh ; a = 0FFH
ld (zDoSFXFlag),a ; Set flag to say we are updating SFX
ld ix,zSFX_FMStart ; ix = pointer to SFX track RAM
ld b,SFX_FM_TRACK_COUNT ; 3 FM
call zResumeTrack
xor a ; a = 0
ld (zDoSFXFlag),a ; Clear SFX updating flag
if OptimiseDriver=0
call zBankSwitchToMusic ; Back to music (Pointless: music isn't updated until the next frame)
pop ix ; Restore ix (nothing uses this, beyond this point...)
endif
ret
; End of function zPauseMusic
; ||||||||||||||| S U B R O U T I N E |||||||||||||||||||||||||||||||||||||||
;zsub_64D
zResumeTrack:
bit 7,(ix+zTrack.PlaybackControl) ; Is track playing?
jr z,+ ; Branch if not
bit 2,(ix+zTrack.PlaybackControl) ; Is SFX overriding track?
jr nz,+ ; Branch if not
if OptimiseDriver=0
; cfSetVoiceCont already does this
ld c,(ix+zTrack.AMSFMSPan) ; AMS/FMS/panning flags
ld a,(ix+zTrack.VoiceControl) ; Get voice control bits...
and 3 ; ... the FM portion of them
add a,0B4h ; Command to select AMS/FMS/panning register
rst zWriteFMIorII
endif
push bc ; Save bc
ld c,(ix+zTrack.VoiceIndex) ; Current track FM instrument
call cfSetVoiceCont
pop bc ; Restore bc
+
ld de,zTrack.len ; de = Track size
add ix,de ; Advance to next track
djnz zResumeTrack ; loop
ret
; End of function zResumeTrack
; ||||||||||||||| S U B R O U T I N E |||||||||||||||||||||||||||||||||||||||
;zsub_674
zCycleQueue:
ld a,(zAbsVar.QueueToPlay) ; Check if a sound request was made zComRange+08h
cp 80h ; Is queue slot equal to 80h?
ret nz ; If not, return
ld hl,zAbsVar.SFXToPlay ; Get address of next sound
ld a,(zAbsVar.SFXPriorityVal) ; Get current SFX priority
ld c,a ; a -> c
ld b,3 ; b = 3
- ld a,(hl) ; Get sound to play -> 'a'
ld e,a ; 'a' -> 'e'
ld (hl),0 ; Clear it back to zero (we got it)
inc hl ; hl = pointer to next queue item
cp MusID__First ; Is it before first music?
jr c,zlocQueueNext ; if so, branch
cp CmdID__First ; Is it a special command?
jr nc,zlocQueueItem ; If so, branch
sub SndID__First ; Subtract first SFX index
jr c,zlocQueueItem ; If it was music, branch
add a,zSFXPriority&0FFh ; a = low byte of pointer to SFX priority
ld l,a ; l = low byte of pointer to SFX priority
adc a,(zSFXPriority&0FF00h)>>8 ; a = low byte of pointer to SFX priority + high byte of same pointer
sub l ; a = high byte of pointer to SFX priority
ld h,a ; hl = pointer to SFX priority
ld a,(hl) ; Get SFX priority
cp c ; Is the new SFX of a higher priority?
jr c,+ ; Branch if not
ld c,a ; Save new priority
call zlocQueueItem ; Queue the new SFX
+
ld a,c ; Get back SFX priority
or a ; Is it negative (jumping sound)?
ret m ; Return if so
ld (zAbsVar.SFXPriorityVal),a ; Store the new priority
ret
; ---------------------------------------------------------------------------
zlocQueueNext:
djnz -
ret
; ---------------------------------------------------------------------------
zlocQueueItem:
ld a,e ; restore a to be the last queue item read
ld (zAbsVar.QueueToPlay),a ; Put it as the next item to play
ret
; End of function zCycleQueue
; ||||||||||||||| S U B R O U T I N E |||||||||||||||||||||||||||||||||||||||
; zsub_6B2:
zPlaySoundByIndex:
or a ; is it sound 00?
jp z,zClearTrackPlaybackMem ; if yes, branch to RESET EVERYTHING!!
if MusID__First-1 == 80h
ret p ; return if it was (invalidates 00h-7Fh; maybe we don't want that someday?)
else
cp MusID__First
ret c ; return if id is less than the first music id
endif
ld (ix+zVar.QueueToPlay),80h ; Rewrite zComRange+8 flag so we know nothing new is coming in
cp MusID__End ; is it music (less than index 20)?
jp c,zPlayMusic ; if yes, branch to play the music
cp SndID__First ; is it not a sound? (this check is redundant if MusID__End == SndID__First...)
ret c ; if it isn't a sound, return (do nothing)
cp SndID__End ; is it a sound (less than index 71)?
jp c,zPlaySound_CheckRing ; if yes, branch to play the sound
cp CmdID__First ; is it after the last regular sound but before the first special sound command (between 71 and 78)?
ret c ; if yes, return (do nothing)
cp MusID_Pause ; is it sound 7E or 7F (pause all or resume all)
ret nc ; if yes, return (those get handled elsewhere)
; Otherwise, this is a special command to the music engine...
sub CmdID__First ; convert index 78-7D to a lookup into the following jump table
add a,a
add a,a
ld (zloc_6D5+1),a ; store into the instruction after zloc_6D5 (self-modifying code)
zloc_6D5:
jr $
; ---------------------------------------------------------------------------
zCommandIndex:
CmdPtr_StopSFX: jp zStopSoundEffects ; sound test index 78
db 0
CmdPtr_FadeOut: jp zFadeOutMusic ; 79
db 0
CmdPtr_SegaSound: jp zPlaySegaSound ; 7A
db 0
CmdPtr_SpeedUp: jp zSpeedUpMusic ; 7B
db 0
CmdPtr_SlowDown: jp zSlowDownMusic ; 7C
db 0
CmdPtr_Stop: jp zStopSoundAndMusic ; 7D
db 0
CmdPtr__End:
; ---------------------------------------------------------------------------
; zloc_6EF:
zPlaySegaSound:
if FixDriverBugs
; reset panning (don't want Sega sound playing on only one speaker)
ld a,0B6h ; Set Panning / AMS / FMS
ld c,0C0h ; default Panning / AMS / FMS settings (only stereo L/R enabled)
rst zWriteFMII ; Set it!
endif
ld a,2Bh ; DAC enable/disable register
ld c,80h ; Command to enable DAC
rst zWriteFMI
bankswitch Snd_Sega ; Want Sega sound
ld hl,zmake68kPtr(Snd_Sega) ; was: 9E8Ch
ld de,(Snd_Sega_End - Snd_Sega)/2 ; was: 30BAh
ld a,2Ah ; DAC data register
ld (zYM2612_A0),a ; Select it
ld c,80h ; If QueueToPlay is not this, stops Sega PCM
- ld a,(hl) ; Get next PCM byte
ld (zYM2612_D0),a ; Send to DAC
inc hl ; Advance pointer
nop
ld b,0Ch ; Sega PCM pitch
djnz $ ; Delay loop
nop
ld a,(zAbsVar.QueueToPlay) ; Get next item to play
cp c ; Is it 80h?
jr nz,+ ; If not, stop Sega PCM
ld a,(hl) ; Get next PCM byte
ld (zYM2612_D0),a ; Send to DAC
inc hl ; Advance pointer
nop
ld b,0Ch ; Sega PCM pitch
djnz $ ; Delay loop
nop
dec de ; 2 less bytes to play
ld a,d ; a = d
or e ; Is de zero?
jp nz,- ; If not, loop
+
call zBankSwitchToMusic
ld a,(zAbsVar.DACEnabled) ; DAC status
ld c,a ; c = DAC status
ld a,2Bh ; DAC enable/disable register
rst zWriteFMI
ret
; ---------------------------------------------------------------------------
; zloc_73D:
zPlayMusic:
if FixDriverBugs=0
; This is a workaround for a bug, where playing a new song will distort any SFX that were already playing
push af
call zStopSoundEffects ; Stop all sounds before starting BGM
pop af
endif
ld (zCurSong),a ; Get current BGM
cp MusID_ExtraLife ; If NOT 1-up sound...
jr nz,zloc_784 ; ... skip over the following code
; The following code disables all sound (technically for duration of 1-up)
ld a,(zAbsVar.1upPlaying) ; Check if 1-up sound is already playing
or a ; Test it
jr nz,zBGMLoad ; If it is, then just reload it! (I suppose a humorous restore-to-1up could happen otherwise... with no good results after that)
ld ix,zTracksStart ; Starting at beginning of all tracks...
ld de,zTrack.len ; Each track size
ld b,MUSIC_TRACK_COUNT ; All 10 (DAC, 6FM, 3PSG) tracks
- res 2,(ix+zTrack.PlaybackControl) ; Clear "SFX is overriding" bit (no SFX are allowed!)
add ix,de ; Next track
djnz -
ld ix,zTracksSFXStart ; 'ix' points to start of SFX track memory (10 prior tracks were DAC, 6 FM, 3 PSG)
ld b,SFX_TRACK_COUNT ; 6 SFX tracks total (3FM, 3PSG)
- res 7,(ix+zTrack.PlaybackControl) ; Clear "is playing" bit! (No SFX allowed!)
add ix,de ; Next track
djnz -
; This performs a "massive" backup of all of the current track positions
; for restoration after 1-up BGM completes
ld de,zTracksSaveStart ; Backup memory address
ld hl,zAbsVar ; Starts from zComRange
ld bc,zTracksSaveEnd-zTracksSaveStart ; for this many bytes
ldir ; Go!
ld a,80h
ld (zAbsVar.1upPlaying),a ; Set 1-up song playing flag
xor a
ld (zAbsVar.SFXPriorityVal),a ; Clears SFX priority
jr zBGMLoad ; Now load 1-up BGM
; ---------------------------------------------------------------------------
zloc_784:
xor a
ld (zAbsVar.1upPlaying),a ; clear 1-up is playing flag (it isn't)
ld (zAbsVar.FadeInCounter),a ; clear fade-in frame count
ld (zAbsVar.FadeOutCounter),a ; clear fade-out frame count
;zloc_78E
zBGMLoad:
call zInitMusicPlayback
ld a,(zCurSong) ; So, let's take your desired song, put it into 'a'
sub MusID__First ; Make it a zero-based entry ...
ld e,a ; Transform 'a' into 16-bit de
ld d,0
ld hl,zSpedUpTempoTable ; Load 'hl' of "sped up" tempos [I think]
add hl,de ; Offset by 16-bit version of song index to proper tempo
ld a,(hl) ; Get value at this location -> 'a'
ld (zAbsVar.TempoTurbo),a ; Store 'a' here (provides an alternate tempo or something for speed up mode)
ld hl,zMasterPlaylist ; Get address of the zMasterPlaylist
add hl,de ; Add the 16-bit offset here
ld a,(hl) ; Get "fixed" index
ld b,a ; 'a' -> 'b'
; The following instructions enable a bankswitch routine
and 80h ; Get only 'bank' bit
ld (zAbsVar.MusicBankNumber),a ; Store this (use to enable alternate bank)
ld a,b ; Restore 'a'
add a,a ; Adding a+a causes a possible overflow and a multiplication by 2
add a,a ; Now multiplied by 4 and another possible overflow
ld c,a ; Result -> 'c'
ccf ; Invert carry flag...
sbc a,a ; ... so that this sets a to FFh if bit 6 of original a was clear (allow PAL double-update), zero otherwise (do not allow PAL double-update)
ld (zAbsVar.IsPalFlag),a ; Set IsPalFlag
ld a,c ; Put prior multiply result back in
add a,a ; Now multiplied by 8!
sbc a,a ; This is FFh if bit 5 of original a was set (uncompressed song), zero otherwise (compressed song)
push af ; Backing up result...?
ld a,b ; Put 80h based index -> 'a'
and 1Fh ; Strip the flag bits
add a,a ; multiply by 2; now 'a' is offset into music table, save for the $8000
ld e,a
ld d,0 ; de = a
ld hl,zROMWindow
add hl,de ; "hl" now contains 2-byte offset for music address table lookup
push hl ; Save 'hl' (will be damaged by bank switch)
call zBankSwitchToMusic ; Bank switch to start of music in ROM!
pop hl ; Restore 'hl'
ld e,(hl)
inc hl
ld d,(hl) ; Getting offset within bank to music -> de
; If we bypass the Saxman decompressor, the Z80 engine starts
; with the assumption that we're already decompressed with 'de' pointing
; at the decompressed data (which just so happens to be the ROM window)
pop af
or a ; Was the uncompressed song flag set?
jr nz,+ ; Bypass the Saxman decompressor if so
; This begins a call to the Saxman decompressor:
ex de,hl
exx
push hl
push de
push bc
if OptimiseDriver=0
exx
endif
call zSaxmanDec
exx
pop bc
pop de
pop hl
exx
ld de,zMusicData ; Saxman compressed songs start at zMusicData (1380h)
+
; Begin common track init code
push de
pop ix ; ix = de (BGM's starting address)
ld e,(ix+0) ; Get voice table pointer low byte -> 'e'
ld d,(ix+1) ; Get voice table pointer high byte -> 'd'
ld (zAbsVar.VoiceTblPtr),de ; Set master copy of this value in local memory
ld a,(ix+5) ; Get main tempo value
ld (zAbsVar.TempoMod),a ; Store it at (zComRange+12h)
ld b,a ; tempo -> 'b'
ld a,(zAbsVar.SpeedUpFlag) ; Get found speed shoe flag (zComRange+14h) (preloaded before this)
or a ; test it
ld a,b ; Restore normal song tempo
jr z,+ ; if the speed shoe flag was zero, skip this step
ld a,(zAbsVar.TempoTurbo) ; Put the corresponding speed shoe tempo for song
+
ld (zAbsVar.CurrentTempo),a ; Current tempo for TempoWait
ld (zAbsVar.TempoTimeout),a ; Tempo accumulator for TempoWait
ld a,5
ld (zPALUpdTick),a ; reset PAL update tick to 5 (update immediately)
push ix
pop hl ; hl = ix (BGM's starting address)
ld de,6
add hl,de ; +06h (to DAC pointer)
ld a,(ix+2) ; Get number of FM+DAC channels this BGM has
or a ; Test it
jp z,zloc_884 ; If zero, then don't init any
ld b,a ; 'a' -> 'b' (num FM+DAC channels this song, for loop)
push iy ; Save 'iy'
ld iy,zTracksStart ; 'iy' points to start of track memory
ld c,(ix+4) ; Get tempo divider -> 'c'
if FixDriverBugs=0
; The bugfix in zInitMusicPlayback does this, already
ld de,zFMDACInitBytes ; 'de' points to zFMDACInitBytes
endif
- ld (iy+zTrack.PlaybackControl),82h ; Set "track is playing" bit and "track at rest" bit
if FixDriverBugs=0
; The bugfix in zInitMusicPlayback does this, already
ld a,(de) ; Get current byte from zFMDACInitBytes -> 'a'
inc de ; will get next byte from zFMDACInitBytes next time
ld (iy+zTrack.VoiceControl),a ; Store this byte to "voice control" byte
endif
ld (iy+zTrack.TempoDivider),c ; Store timing divisor from header for this track
ld (iy+zTrack.StackPointer),zTrack.GoSubStack ; set "gosub" (coord flag F8h) stack init value (starts at end of this track's memory)
ld (iy+zTrack.AMSFMSPan),0C0h ; default Panning / AMS / FMS settings (only stereo L/R enabled)
ld (iy+zTrack.DurationTimeout),1 ; set current duration timeout to 1 (should expire next update, play first note, etc.)
if FixDriverBugs=0
; The bugfix in zInitMusicPlayback does this, already
push de ; saving zFMDACInitBytes pointer
endif
push bc ; saving number of channels and tempo divider ('bc' gets needlessly damaged by 'ldi' instructions coming up)
ld a,iyl ; current track pointer low byte -> 'a'
add a,zTrack.DataPointerLow
ld e,a
adc a,iyu
sub e
ld d,a ; de = iy + 3 ('de' is pointing to track offset address)
if OptimiseDriver
ld bc,4
ldir ; while (bc-- > 0) *de++ = *hl++; (copy track address, default key offset, default volume)
else
ldi ; *de++ = *hl++ (copy track address low byte from header to track's copy of this value)
ldi ; *de++ = *hl++ (copy track address high byte from header to track's copy of this value)
ldi ; *de++ = *hl++ (default key offset, typically 0, can be set later by coord flag E9)
ldi ; *de++ = *hl++ (track default volume)
endif
ld de,zTrack.len ; size of all tracks -> 'de'
add iy,de ; offset to next track!
pop bc ; restore 'bc' (number of channels and tempo divider)
if FixDriverBugs=0
; The bugfix in zInitMusicPlayback does this, already
pop de ; restore 'de' (zFMDACInitBytes current pointer)
endif
djnz - ; loop for all tracks we're init'ing...
; End of FM+DAC track init loop
pop iy ; restore 'iy'
ld a,(ix+2) ; 'ix' still points to start of BGM; get number of FM+DAC -> 'a'
cp 7 ; Does it equal 7? (6 FM channels)
jr nz,+ ; If not, skip this next part
xor a ; Clear 'a'
if OptimiseDriver=0
ld c,a ; c = 0
endif
jr zloc_87E ; jump to zloc_87E
+
; Silence FM Channel 6 specifically if it's not in use
if OptimiseDriver=0
; A later call to zFMNoteOff does this, already
ld a,28h ; Key on/off FM register
ld c,6 ; FM channel 6
rst zWriteFMI ; All operators off
endif
if FixDriverBugs=0
; The added zFMSilenceChannel does this, already
ld a,42h ; Starting at FM Channel 6 Operator 1 Total Level register
ld c,0FFh ; Silence value
ld b,4 ; Write to all four FM Channel 6 operators
; Set all TL values to silence!
- rst zWriteFMII
add a,4 ; Next operator
djnz -
endif
; Panning isn't normally set until zSetVoice.
; This is a problem for the DAC track since it never uses zSetVoice
; (or at least it shouldn't), so we reset the panning here.
ld a,0B6h ; Set Panning / AMS / FMS
ld c,0C0h ; default Panning / AMS / FMS settings (only stereo L/R enabled)
rst zWriteFMII ; Set it!
ld a,80h ; FM Channel 6 is NOT in use (will enable DAC)
if OptimiseDriver=0
ld c,a ; Set this as value to be used in FM register write coming up...
endif
zloc_87E:
if OptimiseDriver
ld c,a
endif
ld (zAbsVar.DACEnabled),a ; Note whether FM Channel 6 is in use (enables DAC if not)
ld a,2Bh ; Set DAC Enable appropriately
rst zWriteFMI ; Set it!
; End of DAC/FM init, begin PSG init
zloc_884:
ld a,(ix+3) ; Get number of PSG tracks
or a ; Test it
jp z,zloc_8D0 ; If zero, skip this part!
ld b,a ; 'a' -> 'b' (num PSG tracks this song, for loop)
push iy ; Save 'iy'
ld iy,zSongPSG1 ; 'iy' points to start of PSG track memory (7 prior tracks were DAC and 6 FM)
ld c,(ix+4) ; Get tempo divider -> 'c'
if FixDriverBugs=0
; The bugfix in zInitMusicPlayback does this, already
ld de,zPSGInitBytes ; 'de' points to zPSGInitBytes
endif
- ld (iy+zTrack.PlaybackControl),82h ; Set "track is playing" bit and "track at rest" bit
if FixDriverBugs=0
; The bugfix in zInitMusicPlayback does this, already
ld a,(de) ; Get current byte from zPSGInitBytes -> 'a'
inc de ; will get next byte from zPSGInitBytes next time
ld (iy+zTrack.VoiceControl),a ; Store this byte to "voice control" byte
endif
ld (iy+zTrack.TempoDivider),c ; Store timing divisor from header for this track
ld (iy+zTrack.StackPointer),zTrack.GoSubStack ; "gosub" stack init value
ld (iy+zTrack.DurationTimeout),1 ; set current duration timeout to 1 (should expire next update, play first note, etc.)
if FixDriverBugs=0
; The bugfix in zInitMusicPlayback does this, already
push de ; saving zPSGInitBytes pointer
endif
push bc ; saving number of channels and tempo divider ('bc' gets needlessly damaged by 'ldi' instructions coming up)
ld a,iyl ; current track pointer low byte -> 'a'
add a,zTrack.DataPointerLow
ld e,a
adc a,iyu
sub e
ld d,a ; de = iy + 3 ('de' is pointing to track offset address)
if OptimiseDriver
ld bc,4
ldir ; while (bc-- > 0) *de++ = *hl++; (copy track address, default key offset, default volume)
else
ldi ; *de++ = *hl++ (copy track address low byte from header to track's copy of this value)
ldi ; *de++ = *hl++ (copy track address high byte from header to track's copy of this value)
ldi ; *de++ = *hl++ (default key offset, typically 0, can be set later by coord flag E9)
ldi ; *de++ = *hl++ (track default volume)
endif
inc hl ; Get default PSG tone
ld a,(hl) ; -> 'a'
inc hl ; This byte is usually the same as the prior, unused
ld (iy+zTrack.VoiceIndex),a ; Store current PSG tone
ld de,zTrack.len ; size of all tracks -> 'de'
add iy,de ; offset to next track!
pop bc ; restore 'bc' (number of channels and tempo divider)
if FixDriverBugs=0
; The bugfix in zInitMusicPlayback does this, already
pop de ; restore 'de' (zPSGInitBytes current pointer)
endif
djnz - ; loop for all tracks we're init'ing...
pop iy ; restore 'iy'
; End of PSG tracks init, begin SFX tracks init
zloc_8D0:
ld ix,zTracksSFXStart ; 'ix' points to start of SFX track memory (10 prior tracks were DAC, 6 FM, 3 PSG)
ld b,SFX_TRACK_COUNT ; 6 SFX tracks total (3FM, 3PSG)
ld de,zTrack.len ; size between tracks
zloc_8D9:
bit 7,(ix+zTrack.PlaybackControl) ; Is this track currently playing?
jr z,zloc_8FB ; If not, jump to zloc_8FB (no work to do!)
ld a,(ix+zTrack.VoiceControl) ; Get "voice control" byte...
or a ; Test it
jp m,+ ; If this is a PSG track, jump to '+'
sub 2 ; Otherwise, subtract 2...
add a,a ; ... multiply by 2 (preparing to index starting from FM 3 only)
jr zloc_8F1 ; Jump to zloc_8F1 (general track setup)
+
rra
rra
rra
rra
and 0Fh ; for PSG, just shift it down by 4 and we have its index!
zloc_8F1:
add a,zMusicTrackOffs&0FFh ; get offset into appropriate music track...
ld (zloc_8F6+1),a ; store into the instruction after zloc_8F6 (self-modifying code)
zloc_8F6:
ld hl,(zMusicTrackOffs) ; This loads address of corresponding MUSIC track (the track that this SFX track would normally play over)
if FixDriverBugs
set 2,(hl) ; Set the "SFX override" bit
else
res 2,(hl) ; Clear the "SFX override" bit (Why??? According to S1's driver, this should be a 'set')
endif
zloc_8FB:
add ix,de ; Next track..
djnz zloc_8D9 ; Loop for all tracks
; End of SFX tracks init...
ld ix,zSongFM1 ; 'ix' points to first FM music track
ld b,MUSIC_FM_TRACK_COUNT ; For all 6 of those...
if FixDriverBugs
; zFMNoteOff isn't enough to silence the entire channel:
; For added measure, we set Total Level and Release Rate, too.
- push bc
bit 2,(ix+zTrack.PlaybackControl) ; Is bit 2 (SFX overriding) set?
call z,zFMSilenceChannel ; If not, branch
add ix,de ; Next track
pop bc
djnz -
else
- call zFMNoteOff ; Send Key Off
add ix,de ; Next track
djnz -
endif
ld b,MUSIC_PSG_TRACK_COUNT ; For all 3 PSG tracks...
- call zPSGNoteOff ; Send Note Off
add ix,de ; Next track
djnz -
ret
if FixDriverBugs
zFMSilenceChannel:
call zSetMaxRelRate
ld a,(ix+zTrack.VoiceControl) ; Get voice control byte
and 3 ; Channels only!
add a,40h ; Set total level...
ld c,7Fh ; ... to minimum envelope amplitude...
call zFMOperatorWriteLoop ; ... for all operators of this track's channel
jp zFMNoteOff
zSetMaxRelRate:
ld a,(ix+zTrack.VoiceControl) ; Get voice control byte
and 3 ; Channels only!
add a,80h ; Add register 80, set D1L to minimum and RR to maximum...
ld c,0FFh ; ... for all operators on this track's channel
zFMOperatorWriteLoop:
ld b,4 ; Loop 4 times
.loop:
rst zWriteFMIorII ; Write to part I or II, as appropriate
add a,4 ; a += 4
djnz .loop ; Loop
ret
endif
; ---------------------------------------------------------------------------
; FM channel assignment bits
;zbyte_916
zFMDACInitBytes:
db 6, 0, 1, 2, 4, 5, 6 ; first byte is for DAC; then notice the 0, 1, 2 then 4, 5, 6; this is the gap between parts I and II for YM2612 port writes
; Default values for PSG tracks
;zbyte_91D
zPSGInitBytes:
db 80h,0A0h,0C0h ; Specifically, these configure writes to the PSG port for each channel
; zloc_920:
zPlaySound_CheckRing:
ld c,a ; Store sound index -> 'c'
ld a,(ix+zVar.1upPlaying) ; Get "is 1-up playing" flag...
or (ix+zVar.FadeInFlag) ; Or it with fading in flag
jp nz,zloc_KillSFXPrio ; If either is set, SFX cannot be played!!
xor a
ld (zSpindashActiveFlag),a ; Clear spindash sound flag
ld a,c ; Sound index -> 'a'
cp SndID_Ring ; is this the ring sound?
jr nz,zPlaySound_CheckGloop ; if not, branch
; This is the ring sound...
ld a,(zRingSpeaker) ; 0 plays left, FFh plays right
or a ; Test it
jr nz,+ ; If it's not zero, we skip this next step
ld c,SndID_RingLeft ; do something different (probably speaker change)...
+
cpl ; If it was 0, it's now FFh, or vice versa
ld (zRingSpeaker),a ; Store new ring speaker value (other side)
jp zPlaySound ; now play the play the ring sound
; ---------------------------------------------------------------------------
; zloc_942:
zPlaySound_CheckGloop:
if OptimiseDriver=0
ld a,c
endif
cp SndID_Gloop ; is this the bloop/gloop noise?
jr nz,zPlaySound_CheckSpindash ; if not, branch
ld a,(zGloopFlag)
cpl
ld (zGloopFlag),a
or a
ret z ; sometimes don't play it
jp zPlaySound ; now play the gloop sound
; ---------------------------------------------------------------------------
; zloc_953:
zPlaySound_CheckSpindash:
if OptimiseDriver=0
ld a,c
endif
cp SndID_SpindashRev ; is this the spindash rev sound playing?
jr nz,zPlaySound ; if not, branch
ld a,(zSpindashPlayingCounter)
or a
ld a,(zSpindashExtraFrequencyIndex)
jr nz,+ ; if the spindash sound is already playing, branch
ld a,-1 ; reset the extra frequency (becomes 0 on the next line)
+
inc a ; increase the frequency
cp 0Ch
jr nc,+
ld (zSpindashExtraFrequencyIndex),a
+
ld a,3Ch
ld (zSpindashPlayingCounter),a
ld a,-1
ld (zSpindashActiveFlag),a
; zloc_975:
zPlaySound:
bankswitch SoundIndex ; Switch to SFX banks
ld hl,zmake68kPtr(SoundIndex) ; 'hl' points to beginning of SFX bank in ROM window
ld a,c ; 'c' -> 'a'
sub SndID__First ; Bring 'a' down to index value
add a,a ; Multiply it by 2
ld e,a
ld d,0 ; de = a
add hl,de ; now hl points to a pointer in the SoundIndex list (such as rom_ptr_z80 Sound20)
ld a,(hl)
inc hl
ld h,(hl)
ld l,a ; now hl points to a sound's data (such as Sound20: ...)
ld e,(hl)
inc hl
ld d,(hl) ; 'de' points to custom voice table (if any; otherwise is 0000h)
inc hl
ld (zloc_A26+1),de ; store into the instruction after zloc_A26 (self-modifying code)
ld c,(hl) ; Timing divisor -> 'c'
inc hl
ld b,(hl) ; Total channels used -> 'b'
inc hl
zloc_99F:
push bc ; backup divisor/channel usage
xor a ; a = 0 (will end up being NO CUSTOM VOICE TABLE!)
ld (zloc_A1D+1),a ; store into the instruction after zloc_A1D (self-modifying code) (Kind of pointless, always sets it to zero... maybe PSG would've had custom "flutter" tables?)
push hl ; save current position within sound (offset 04h)
inc hl ; next byte...
ld a,(hl) ; Track sound def -> 'a' (if 80h set, it's PSG, otherwise it's FM) -- note this also tells what channel it's on (80, A0, C0 for PSG, FM channel assignments otherwise)
or a ; test it
jp m,+ ; if bit 7 (80h) set (meaning PSG track), skip next part...
sub 2 ; Subtract 2 from this value
add a,a ; Multiply it by 2
jp zloc_9CA ; This is an FM sound track...
+
; This is a PSG track!
; Always ends up writing zero to voice table pointer?
ld (zloc_A1D+1),a ; store into the instruction after zloc_A1D (self-modifying code)
cp 0C0h ; Is this PSG3?
jr nz,+ ; If not, skip this part
push af
or 1Fh ; Set silence on PSG!
ld (zPSG),a
xor 20h
ld (zPSG),a
pop af
+
rra
rra
rra
rra
and 0Fh ; for PSG, just shift it down by 4 and we have its index!
zloc_9CA:
add a,zMusicTrackOffs&0FFh ; Offset to corresponding music track
ld (zloc_9CF+1),a ; store into the instruction after zloc_9CF (self-modifying code)
zloc_9CF:
ld hl,(zMusicTrackOffs) ; 'hl' is now start of corresponding music track
set 2,(hl) ; Set "SFX is overriding this track!" bit
add a,zSFXTrackOffs-zMusicTrackOffs ; Jump to corresponding SFX track
ld (zloc_9D9+2),a ; store into the instruction after zloc_9D9 (self-modifying code)
zloc_9D9:
ld ix,(zSFXTrackOffs) ; 'ix' is now start of corresponding SFX track
; Little bit busy there, but basically for a given 'a' value, where a == 0
; means first SFX track (FM3), 'hl' now points to the music track and 'ix' points
; to the SFX track that both correspond to track 'a'
; Now we're going to clear this SFX track...
ld e,ixl
ld d,ixu ; de = ix
push de ; save 'de'
ld l,e ; hl = de (start of SFX track)
ld h,d
ld (hl),0 ; store 00h on first byte of track
inc de ; next byte...
ld bc,zTrack.len-1 ; For all bytes in the track, minus 1 (since we're copying 00h from first byte)
ldir ; Clear track memory!
pop de ; Restore 'de' (start of SFX track yet again)
pop hl ; Get 'hl' back from way before (offset of sound in ROM + 04h)
; ld a,e
; add a,zTrack.PlaybackControl
; ld e,a
; adc a,d
; sub e
; ld d,a
ldi ; *de++ = *hl++ (write playback control byte) (... not really sure why this is used)
ldi ; *de++ = *hl++ (write voice control byte) (sets whether is PSG or what)
pop bc ; restore 'bc'...
push bc ; ... Um, back it up again!
ld (ix+zTrack.TempoDivider),c ; Set timing divisor of SFX track
ld (ix+zTrack.DurationTimeout),1 ; current duration timeout to 1 (will expire immediately and thus update)
ld (ix+zTrack.StackPointer),zTrack.GoSubStack ; Reset track "gosub" stack
ld a,e
add a,zTrack.DataPointerLow-zTrack.TempoDivider
ld e,a
adc a,d
sub e
ld d,a ; de += 1 (skip timing divisor; already set)
if OptimiseDriver
ld bc,3
ldir ; while (bc-- > 0) *de++ = *hl++; (copy track address, default key offset)
else
ldi ; *de++ = *hl++ (track position low byte)
ldi ; *de++ = *hl++ (track position high byte)
ldi ; *de++ = *hl++ (key offset)
endif
; If spindash active, the following block updates its frequency specially:
ld a,(zSpindashActiveFlag)
or a
jr z,+ ; If spindash not last sound played, skip this
ld a,(zSpindashExtraFrequencyIndex) ; Get current frequency index
dec de ; Go back to key offset
ex de,hl ; hl <=> de
add a,(hl) ; Add spindash key offset!
ex de,hl ; de <=> hl (just done because we wanted add a,(hl))
ld (de),a ; Store it!
inc de ; Go passed key offset again
+
ldi ; *de++ = *hl++ (channel volume)
zloc_A1D: ; Modified way back within zloc_99F
ld a,0 ; "self-modified code"; if 00h, no custom voice table defined for this track
or a ; Test it
jr nz,+ ; If not zero, skip next part...
ld (ix+zTrack.AMSFMSPan),0C0h ; Default panning / AMS / FMS settings (just L/R Stereo enabled)
zloc_A26:
ld de,0 ; "self-modified code" ; This will be modified to custom voice table address (possibly still 0000h)
ld (ix+zTrack.VoicePtrLow),e ; low byte of custom voice table (for SFX)
ld (ix+zTrack.VoicePtrHigh),d ; high byte of custom voice table (for SFX)
+
pop bc ; restore divisor (c) and channel counts (b0)
dec b ; One less FM channel
jp nz,zloc_99F ; If more to go, loop!
jp zBankSwitchToMusic ; Otherwise, prepare to do music...
; ---------------------------------------------------------------------------
zloc_KillSFXPrio:
xor a
ld (zAbsVar.SFXPriorityVal),a ; Reset SFX priority
ret
; End of function zPlaySoundByIndex
; ||||||||||||||| S U B R O U T I N E |||||||||||||||||||||||||||||||||||||||
; zsub_A3C:
zStopSoundEffects:
xor a
ld (zAbsVar.SFXPriorityVal),a ; Reset SFX priority
ld ix,zTracksSFXStart ; 'ix' points to start of SFX track memory (10 prior tracks were DAC, 6 FM, 3 PSG)
ld b,SFX_TRACK_COUNT ; All 6 SFX tracks...
zloc_A46:
push bc ; Save 'bc'
bit 7,(ix+zTrack.PlaybackControl) ; Check if this track was playing
jp z,zloc_AB6 ; If not
res 7,(ix+zTrack.PlaybackControl) ; You're not playing anymore!
res 4,(ix+zTrack.PlaybackControl) ; Not not attacking, either
ld a,(ix+zTrack.VoiceControl) ; Get "voice control" byte
or a ; Test it
jp m,zloc_A89 ; If 80h set (PSG Track) jump to zloc_A89
push af
call zFMNoteOff ; FM Key off
pop af
push ix
sub 2 ; Determine proper corresponding music track (starting on FM3, so subtract 2 from channel assignment)
add a,a ; Multiply by 2 (each index 2 bytes)
add a,zMusicTrackOffs&0FFh ; Get offset -> 'a'
ld (zloc_A6C+2),a ; store into the instruction after zloc_A6C (self-modifying code)
zloc_A6C:
ld ix,(zMusicTrackOffs) ; "self-modified code"; will load appropriate corresponding music track address
bit 2,(ix+zTrack.PlaybackControl) ; Was this music track is overridden by an SFX track?
jr z,+ ; If not, do nothing
res 2,(ix+zTrack.PlaybackControl) ; Otherwise, tell it is is no longer!
set 1,(ix+zTrack.PlaybackControl) ; Set track to rest
ld a,(ix+zTrack.VoiceIndex) ; Get current voice
call zSetVoiceMusic ; Reset FM voice
+
pop ix
jp zloc_AB6 ; jump down to loop
; ---------------------------------------------------------------------------
zloc_A89:
push af
call zPSGNoteOff ; PSG Note off
pop af
push ix
rra
rra
rra
rra
and 0Fh ; 'a' is now 08, 0A, 0C, or 0E
add a,zMusicTrackOffs&0FFh
ld (zloc_A9B+2),a ; store into the instruction after zloc_A9B (self-modifying code)
zloc_A9B:
ld ix,(zMusicTrackOffs) ; self-modified code from just above; 'ix' points to corresponding Music PSG track
res 2,(ix+zTrack.PlaybackControl) ; tell this track it is is no longer overridden by SFX!
set 1,(ix+zTrack.PlaybackControl) ; Set track to rest
ld a,(ix+zTrack.VoiceControl) ; Get voice control
cp 0E0h ; Is this a PSG 3 noise (not tone) track?
jr nz,+ ; If it isn't, don't do next part (non-PSG Noise doesn't restore)
ld a,(ix+zTrack.PSGNoise) ; Get PSG noise setting
ld (zPSG),a ; Write it to PSG
+
pop ix
zloc_AB6:
ld de,zTrack.len
add ix,de ; Got to next track
pop bc ; Restore 'bc'
djnz zloc_A46 ; Loop around...
ret
; End of function zStopSoundEffects
; ---------------------------------------------------------------------------
; zloc_ABF:
zFadeOutMusic:
ld a,3
ld (zAbsVar.FadeOutDelay),a ; Set delay ticker to 3
ld a,28h
ld (zAbsVar.FadeOutCounter),a ; Set total frames to decrease volume over
xor a
ld (zSongDAC.PlaybackControl),a ; Stop DAC track (can't fade it)
ld (zAbsVar.SpeedUpFlag),a ; No speed shoe tempo?
ret
; ||||||||||||||| S U B R O U T I N E |||||||||||||||||||||||||||||||||||||||
;zsub_AD1
zUpdateFadeout:
ld a,(zAbsVar.FadeOutDelay) ; Get current tick count before next volume decrease
or a
jr z,+ ; If not yet zero...
dec (ix+zVar.FadeOutDelay) ; Just decrement it
ret
+
dec (ix+zVar.FadeOutCounter) ; Otherwise, decrement fadeout!
jp z,zClearTrackPlaybackMem ; If it hits zero, clear everything!
ld (ix+zVar.FadeOutDelay),3 ; Otherwise, reload tick count with 3
push ix
ld ix,zSongFM1 ; 'ix' points to first FM music track
ld b,MUSIC_FM_TRACK_COUNT ; 6 FM tracks to follow...
zloc_AED:
bit 7,(ix+zTrack.PlaybackControl) ; Is this track playing?
jr z,zloc_B04 ; If not, do nothing
inc (ix+zTrack.Volume) ; increment channel volume (remember -- higher is quieter!)
jp p,+ ; don't let it overflow
res 7,(ix+zTrack.PlaybackControl) ; otherwise, stop playing this track
jr zloc_B04 ; just loop
+
push bc
call zSetChanVol ; need to update volume
pop bc
zloc_B04:
ld de,zTrack.len
add ix,de ; Next track
djnz zloc_AED ; Keep going for all FM tracks...
ld b,MUSIC_PSG_TRACK_COUNT ; 3 PSG tracks to follow...
zloc_B0D:
bit 7,(ix+zTrack.PlaybackControl) ; Is this track playing?
jr z,zloc_B2C ; If not, do nothing
inc (ix+zTrack.Volume) ; increment channel volume (remember -- higher is quieter!)
ld a,10h
cp (ix+zTrack.Volume) ; don't let volume go over 0Fh on PSG tracks!
jp nc,+
res 7,(ix+zTrack.PlaybackControl) ; Otherwise, stop playing this track
jr zloc_B2C
+
push bc
ld b,(ix+zTrack.Volume) ; Channel volume -> 'b'
if FixDriverBugs
ld a,(ix+zTrack.VoiceIndex)
or a ; Is this track using volume envelope 0 (no envelope)?
call z,zPSGUpdateVol ; If so, update volume (this code is only run on envelope 1+, so we need to do it here for envelope 0)
else
; DANGER! This code ignores volume envelopes, breaking fade on envelope-using tracks.
; (It's also a part of the envelope-processing code, so calling it here is redundant)
; This is only useful for envelope 0 (no envelope).
call zPSGUpdateVol ; Update volume (ignores current envelope!!!)
endif
pop bc
zloc_B2C:
ld de,zTrack.len
add ix,de ; Next track
djnz zloc_B0D ; Keep going for all PSG tracks...
pop ix
ret
; End of function zUpdateFadeout
; ||||||||||||||| S U B R O U T I N E |||||||||||||||||||||||||||||||||||||||
;zsub_B36
zFMSilenceAll:
ld a,28h ; Start at FM KEY ON/OFF register
ld b,3 ; Three key on/off per part
- ld c,b ; Current key off -> 'c'
dec c ; c--
rst zWriteFMI ; Write key off for part I
set 2,c ; Set part II select
rst zWriteFMI ; Write key off for part II
djnz -
ld a,30h ; Starting at FM register 30h...
ld c,0FFh ; Write dummy kill-all values
ld b,60h ; ... up to register 90h
- rst zWriteFMI ; ... on part I
rst zWriteFMII ; ... and part II
inc a ; Next register!
djnz -
ret
; End of function zFMSilenceAll
; ---------------------------------------------------------------------------
; zloc_B4E:
zStopSoundAndMusic:
xor a
ld (zAbsVar.StopMusic),a
; ||||||||||||||| S U B R O U T I N E |||||||||||||||||||||||||||||||||||||||
;zsub_B52
zClearTrackPlaybackMem:
; This totally wipes out the track memory and resets playback hardware
ld a,2Bh ; DAC Enable register
ld c,80h ; Enable DAC
rst zWriteFMI ; Write it!
ld a,c ; 80h -> 'a'
ld (zAbsVar.DACEnabled),a ; Store that to DAC Enabled byte
ld a,27h ; Channel 3 special settings
ld c,0 ; All clear
rst zWriteFMI ; Write it!
; This performs a full clear across all track/playback memory
ld hl,zAbsVar
ld de,zAbsVar+1
ld (hl),0 ; Starting byte is 00h
ld bc,(zTracksSFXEnd-zAbsVar)-1 ; For 695 bytes...
ldir ; 695 bytes of clearing! (Because it will keep copying the byte prior to the byte after; thus 00h repeatedly)
ld a,80h
ld (zAbsVar.QueueToPlay),a ; Nothing is queued
call zFMSilenceAll ; Silence FM
jp zPSGSilenceAll ; Silence PSG
; End of function zClearTrackPlaybackMem
; ||||||||||||||| S U B R O U T I N E |||||||||||||||||||||||||||||||||||||||
;zsub_B78
zInitMusicPlayback:
; This function saves some of the queue/flag items and
; otherwise resets all music-related playback memory and
; silences the hardware. Used prior to playing a new song.
; Very similar to zClearTrackPlaybackMem except that it is
; specific to the music tracks...
; Save some queues/flags:
ld ix,zAbsVar
ld b,(ix+zVar.SFXPriorityVal)
ld c,(ix+zVar.1upPlaying) ; 1-up playing flag
push bc
ld b,(ix+zVar.SpeedUpFlag) ; speed shoe flag
ld c,(ix+zVar.FadeInCounter) ; fade in frames
push bc
ld b,(ix+zVar.SFXToPlay) ; SFX queue slot
ld c,(ix+zVar.SFXStereoToPlay) ; Stereo SFX queue slot
push bc
; The following clears all playback memory and non-SFX tracks
ld hl,zAbsVar
ld de,zAbsVar+1
ld (hl),0
ld bc,(zTracksEnd-zAbsVar)-1 ; this many bytes (from start of zComRange to just short of end of PSG3 music track)
ldir
; Restore those queue/flags:
pop bc
ld (ix+zVar.SFXToPlay),b ; SFX queue slot
ld (ix+zVar.SFXStereoToPlay),c ; Stereo SFX queue slot
pop bc
ld (ix+zVar.SpeedUpFlag),b ; speed shoe flag
ld (ix+zVar.FadeInCounter),c ; fade in frames
pop bc
ld (ix+zVar.SFXPriorityVal),b
ld (ix+zVar.1upPlaying),c ; 1-up playing flag
ld a,80h
ld (zAbsVar.QueueToPlay),a
if FixDriverBugs
; If a music file's header doesn't define each and every channel, they
; won't be silenced by zloc_8FB, because their tracks aren't properly
; initialised. This can cause hanging notes. So, we'll set them up
; properly here.
ld ix,zTracksStart ; Start at the first music track...
ld b,MUSIC_TRACK_COUNT ; ...and continue to the last
ld de,zTrack.len
ld hl,zFMDACInitBytes ; This continues into zPSGInitBytes
- ld a,(hl)
inc hl
ld (ix+zTrack.VoiceControl),a ; Set channel type while we're at it, so subroutines understand what the track is
add ix,de ; Next track
djnz - ; loop for all channels
ret
else
; This silences all channels, even those being used by SFX!
; zloc_8FB does the same thing, only better (it doesn't affect SFX channels)
call zFMSilenceAll
jp zPSGSilenceAll
endif
; End of function zInitMusicPlayback
; ---------------------------------------------------------------------------
; zloc_BBE:
; increases the tempo of the music
zSpeedUpMusic:
ld b,80h
ld a,(zAbsVar.1upPlaying)
or a
ld a,(zAbsVar.TempoTurbo)
jr z,zSetTempo
jr zSetTempo_1up
; ===========================================================================
; zloc_BCB:
; returns the music tempo to normal
zSlowDownMusic:
ld b,0
ld a,(zAbsVar.1upPlaying)
or a
ld a,(zAbsVar.TempoMod)
jr z,zSetTempo
jr zSetTempo_1up
; ===========================================================================
; helper routines for changing the tempo
zSetTempo:
ld (zAbsVar.CurrentTempo),a ; Store new tempo value
ld a,b
ld (zAbsVar.SpeedUpFlag),a
ret
; ---------------------------------------------------------------------------
;zloc_BE0
zSetTempo_1up:
ld (zSaveVar.CurrentTempo),a ; Store new tempo value
ld a,b
ld (zSaveVar.SpeedUpFlag),a
ret
; ||||||||||||||| S U B R O U T I N E |||||||||||||||||||||||||||||||||||||||
;zsub_BE8
zUpdateFadeIn:
ld a,(zAbsVar.FadeInDelay) ; Get current tick count before next volume increase
or a
jr z,+ ; If not yet zero...
dec (ix+zVar.FadeInDelay) ; Just decrement it
ret
+
ld a,(zAbsVar.FadeInCounter) ; Get current fade out frame count
or a
jr nz,+ ; If fadeout hasn't reached zero yet, skip this
ld a,(zSongDAC.PlaybackControl) ; Get DAC's playback control byte
and 0FBh ; Clear "SFX is overriding" bit
ld (zSongDAC.PlaybackControl),a ; Set that
xor a
ld (zAbsVar.FadeInFlag),a ; Done fading-in, SFX can play now
ret
+
dec (ix+zVar.FadeInCounter) ; Otherwise, we decrement fadein!
ld (ix+zVar.FadeInDelay),2 ; Otherwise, reload tick count with 2 (little faster than fadeout)
push ix
ld ix,zSongFM1 ; 'ix' points to first FM music track
ld b,MUSIC_FM_TRACK_COUNT ; 6 FM tracks to follow...
- bit 7,(ix+zTrack.PlaybackControl) ; Is this track playing?
jr z,+ ; If not, do nothing
dec (ix+zTrack.Volume) ; decrement channel volume (remember -- lower is louder!)
push bc
call zSetChanVol ; need to update volume
pop bc
+
ld de,zTrack.len
add ix,de ; Next track
djnz - ; Keep going for all FM tracks...
ld b,MUSIC_PSG_TRACK_COUNT ; 3 PSG tracks to follow...
- bit 7,(ix+zTrack.PlaybackControl) ; Is this track playing?
jr z,+ ; If not, do nothing
dec (ix+zTrack.Volume) ; decrement channel volume (remember -- lower is louder!)
push bc
ld b,(ix+zTrack.Volume) ; Channel volume -> 'b'
if FixDriverBugs
ld a,(ix+zTrack.VoiceIndex)
or a ; Is this track using volume envelope 0 (no envelope)?
call z,zPSGUpdateVol ; If so, update volume (this code is only run on envelope 1+, so we need to do it here for envelope 0)
else
; DANGER! This code ignores volume envelopes, breaking fade on envelope-using tracks.
; (It's also a part of the envelope-processing code, so calling it here is redundant)
; This is only useful for envelope 0 (no envelope).
call zPSGUpdateVol ; Update volume (ignores current envelope!!!)
endif
pop bc
+
ld de,zTrack.len
add ix,de ; Next track
djnz - ; Keep going for all PSG tracks...
pop ix
ret
; End of function zUpdateFadeIn
; ||||||||||||||| S U B R O U T I N E |||||||||||||||||||||||||||||||||||||||
;zsub_C46
zFMNoteOn:
ld a,(ix+zTrack.PlaybackControl) ; Get playback control byte
and 6
ret nz ; If either bit 1 ("track in rest") and 2 ("SFX overriding this track"), quit!
ld a,(ix+zTrack.VoiceControl) ; Get "voice control" byte
or 0F0h ; Turn on ALL operators
ld c,a ; Set as data to write to FM
ld a,28h ; Write to KEY ON/OFF port (key ON in this case)
rst zWriteFMI ; do it!
ret
; End of function zFMNoteOn
; ||||||||||||||| S U B R O U T I N E |||||||||||||||||||||||||||||||||||||||
;zsub_C56
zFMNoteOff:
ld a,(ix+zTrack.PlaybackControl) ; Load this track's playback control byte
and 14h ; Are bits 4 (no attack) or 2 (SFX overriding) set?
ret nz ; If they are, return
ld a,28h ; Otherwise, send a KEY ON/OFF
ld c,(ix+zTrack.VoiceControl) ; Track's data for this key operation
; Format of key on/off:
; 4321 .ccc
; Where 4321 are the bits for which operator,
; and ccc is which channel (0-2 for channels 1-3, 4-6 for channels 4-6 WATCH BIT GAP)
rst zWriteFMI ; Write to part I (Note this particular register is ALWAYS sent to part I)
ret
; End of function zFMNoteOff
; ||||||||||||||| S U B R O U T I N E |||||||||||||||||||||||||||||||||||||||
; performs a bank switch to where the music for the current track is at
; (there are two possible bank locations for music)
; zsub_C63:
zBankSwitchToMusic:
ld a,(zAbsVar.MusicBankNumber)
or a
jr nz,+
bankswitch MusicPoint1
ret
+
bankswitch MusicPoint2
ret
; End of function zBankSwitchToMusic
; ---------------------------------------------------------------------------
;zloc_C89
zCoordFlag:
sub 0E0h
if OptimiseDriver
ld c,a
add a,a
add a,c
else
add a,a
add a,a
endif
ld (coordflagLookup+1),a ; store into the instruction after coordflagLookup (self-modifying code)
ld a,(hl)
inc hl
; This is the lookup for Coordination flag routines
;zloc_C92
coordflagLookup:
jr $
; ---------------------------------------------------------------------------
jp cfPanningAMSFMS ; E0
if OptimiseDriver=0
db 0
endif
; ---------------------------------------------------------------------------
jp cfDetune ; E1
if OptimiseDriver=0
db 0
endif
; ---------------------------------------------------------------------------
jp cfSetCommunication ; E2
if OptimiseDriver=0
db 0
endif
; ---------------------------------------------------------------------------
jp cfJumpReturn ; E3
if OptimiseDriver=0
db 0
endif
; ---------------------------------------------------------------------------
jp cfFadeInToPrevious ; E4
if OptimiseDriver=0
db 0
endif
; ---------------------------------------------------------------------------
jp cfSetTempoDivider ; E5
if OptimiseDriver=0
db 0
endif
; ---------------------------------------------------------------------------
jp cfChangeFMVolume ; E6
if OptimiseDriver=0
db 0
endif
; ---------------------------------------------------------------------------
jp cfPreventAttack ; E7
if OptimiseDriver=0
db 0
endif
; ---------------------------------------------------------------------------
jp cfNoteFill ; E8
if OptimiseDriver=0
db 0
endif
; ---------------------------------------------------------------------------
jp cfChangeTransposition ; E9
if OptimiseDriver=0
db 0
endif
; ---------------------------------------------------------------------------
jp cfSetTempo ; EA
if OptimiseDriver=0
db 0
endif
; ---------------------------------------------------------------------------
jp cfSetTempoMod ; EB
if OptimiseDriver=0
db 0
endif
; ---------------------------------------------------------------------------
jp cfChangePSGVolume ; EC
if OptimiseDriver=0
db 0
endif
; ---------------------------------------------------------------------------
jp cfClearPush ; ED
if OptimiseDriver=0
db 0
endif
; ---------------------------------------------------------------------------
jp cfStopSpecialFM4 ; EE
if OptimiseDriver=0
db 0
endif
; ---------------------------------------------------------------------------
jp cfSetVoice ; EF
if OptimiseDriver=0
db 0
endif
; ---------------------------------------------------------------------------
jp cfModulation ; F0
if OptimiseDriver=0
db 0
endif
; ---------------------------------------------------------------------------
jp cfEnableModulation ; F1
if OptimiseDriver=0
db 0
endif
; ---------------------------------------------------------------------------
jp cfStopTrack ; F2
if OptimiseDriver=0
db 0
endif
; ---------------------------------------------------------------------------
jp cfSetPSGNoise ; F3
if OptimiseDriver=0
db 0
endif
; ---------------------------------------------------------------------------
jp cfDisableModulation ; F4
if OptimiseDriver=0
db 0
endif
; ---------------------------------------------------------------------------
jp cfSetPSGTone ; F5
if OptimiseDriver=0
db 0
endif
; ---------------------------------------------------------------------------
jp cfJumpTo ; F6
if OptimiseDriver=0
db 0
endif
; ---------------------------------------------------------------------------
jp cfRepeatAtPos ; F7
if OptimiseDriver=0
db 0
endif
; ---------------------------------------------------------------------------
jp cfJumpToGosub ; F8
if OptimiseDriver=0
db 0
endif
; ---------------------------------------------------------------------------
jp cfOpF9 ; F9
if OptimiseDriver=0
db 0
endif
; ---------------------------------------------------------------------------
; (via Saxman's doc): panning, AMS, FMS
;zloc_CFC
cfPanningAMSFMS:
;Panning, AMS, FMS
;* xx - Value (reg a)
; o Bit 7 - Left channel status
; o Bit 6 - Right channel Status
; o Bit 5-3 - AMS
; o Bit 2 - 0
; o Bit 1-0 - FMS
; Subject to verification, but even though you COULD set
; AMS/FMS values, it does not appear that's what they intended
; here; instead it appears they only meant for panning control.
; I say this because it retains prior AMS/FMS settings ("and 37h")
bit 7,(ix+zTrack.VoiceControl) ; a PSG track
ret m ; If so, quit!
if FixDriverBugs=0
; This check is in the wrong place.
; If this flag is triggered by a music track while it's being overridden
; by an SFX, it will use the old panning when the SFX ends.
; This is because zTrack.AMSFMSPan doesn't get updated.
bit 2,(ix+zTrack.PlaybackControl) ; If "SFX overriding" bit set...
ret nz ; return
endif
ld c,a ; input val 'a' -> c
ld a,(ix+zTrack.AMSFMSPan) ; old PAF value
and 37h ; retains bits 0-2, 3-4?
or c ; OR'd with new settings
ld (ix+zTrack.AMSFMSPan),a ; new PAF value
if FixDriverBugs
; The check should only stop hardware access, like this.
bit 2,(ix+zTrack.PlaybackControl) ; If "SFX overriding" bit set...
ret nz ; return
endif
ld c,a ; a -> c (YM2612 data write)
ld a,(ix+zTrack.VoiceControl) ; Get voice control byte
and 3 ; Channels only!
add a,0B4h ; Add register B4, stereo output control and LFO sensitivity
rst zWriteFMIorII ; depends on bit 2 of (ix+zTrack.VoiceControl)
ret
; ---------------------------------------------------------------------------
; (via Saxman's doc): Alter note values by xx
; More or less a pitch bend; this is applied to the frequency as a signed value
;zloc_D1A cfAlterNotesUNK cfAlterNotes:
cfDetune:
ld (ix+zTrack.Detune),a ; set new detune value
ret
; ---------------------------------------------------------------------------
; Set otherwise unused communication byte to parameter
; Used for triggering a boss' attacks in Ristar
;zloc_D1E cfUnknown1
cfSetCommunication:
ld (zAbsVar.Communication),a
ret
; ---------------------------------------------------------------------------
; Return (Sonic 1 & 2)
;zloc_D22
cfJumpReturn:
ld c,(ix+zTrack.StackPointer) ; Get current stack offset -> 'c'
ld b,0 ; b = 0
push ix
pop hl ; hl = ix
add hl,bc ; hl += bc (latest item on "gosub" stack)
ld a,(hl)
inc hl
ld h,(hl)
ld l,a ; hl = address from "gosub" stack
inc c
inc c
ld (ix+zTrack.StackPointer),c ; add 2 to "gosub" stack offset (pop)
ret
; ---------------------------------------------------------------------------
; Fade-in to previous song (needed on DAC channel, Sonic 1 & 2)
;zloc_D35
cfFadeInToPrevious:
; This performs a "massive" restoration of all of the current
; track positions as they were prior to 1-up BGM
ld hl,zTracksSaveStart ; Backup memory address
ld de,zAbsVar ; Ends at zComRange
ld bc,zTracksSaveEnd-zTracksSaveStart ; for this many bytes
ldir ; Go!
call zBankSwitchToMusic
ld a,(zSongDAC.PlaybackControl) ; Get DAC's playback bit
or 4
ld (zSongDAC.PlaybackControl),a ; Set "SFX is overriding" on it (not normal, but will work for this purpose)
ld a,(zAbsVar.FadeInCounter) ; Get current count of many frames to continue bringing volume up
ld c,a
ld a,28h
sub c ; a = 28h - c (don't overlap fade-ins?)
ld c,a ; 'a' -> 'c'
ld b,MUSIC_FM_TRACK_COUNT ; 6 FM tracks to follow...
ld ix,zSongFM1 ; 'ix' points to first FM music track
- bit 7,(ix+zTrack.PlaybackControl) ; Is this track playing?
jr z,+ ; If not, do nothing
set 1,(ix+zTrack.PlaybackControl) ; Mark track at rest
ld a,(ix+zTrack.Volume) ; Get channel volume
add a,c ; Apply current fade value
ld (ix+zTrack.Volume),a ; Store it back
if OptimiseDriver=0
; This bit is always cleared (see zPlayMusic)
bit 2,(ix+zTrack.PlaybackControl) ; Is track being overridden by SFX?
jr nz,+ ; If so, skip next part
endif
push bc
ld a,(ix+zTrack.VoiceIndex) ; Get voice
call zSetVoiceMusic ; Update voice (and set volume)
pop bc
+
ld de,zTrack.len
add ix,de ; Next track
djnz - ; Keep going for all FM tracks...
ld b,MUSIC_PSG_TRACK_COUNT ; 3 PSG tracks to follow...
- bit 7,(ix+zTrack.PlaybackControl) ; Is this track playing?
jr z,+ ; If not, do nothing
set 1,(ix+zTrack.PlaybackControl) ; Set track at rest
call zPSGNoteOff ; Shut off PSG
ld a,(ix+zTrack.Volume) ; Get channel volume
add a,c ; Apply current fade value
ld (ix+zTrack.Volume),a ; Store it back
if FixDriverBugs
; Restore PSG noise type
ld a,(ix+zTrack.VoiceControl)
cp 0E0h ; Is this the Noise Channel?
jr nz,+ ; If not, branch
ld a,(ix+zTrack.PSGNoise)
ld (zPSG),a ; Restore Noise setting
endif
+
ld de,zTrack.len
add ix,de ; Next track
djnz - ; Keep going for all FM tracks...
ld a,80h
ld (zAbsVar.FadeInFlag),a ; Stop any SFX during fade-in
ld a,28h
ld (zAbsVar.FadeInCounter),a ; Fade in for 28h frames
xor a
ld (zAbsVar.1upPlaying),a ; Set to zero; 1-up ain't playin' no more
ld a,(zAbsVar.DACEnabled) ; DAC not yet enabled...
ld c,a
ld a,2Bh
rst zWriteFMI ; Tell hardware his DAC ain't enabled yet either
pop bc
pop bc
pop bc ; These screw with the return address to make sure DAC doesn't run any further
jp zUpdateDAC ; But we update DAC regardless
; ---------------------------------------------------------------------------
; Change tempo divider to xx
;zloc_DB7
cfSetTempoDivider:
ld (ix+zTrack.TempoDivider),a ; Set tempo divider on this track only
ret
; ---------------------------------------------------------------------------
; (via Saxman's doc): Change channel volume BY xx; xx is signed
;zloc_DBB cfSetVolume
cfChangeFMVolume:
add a,(ix+zTrack.Volume) ; Add to current volume
ld (ix+zTrack.Volume),a ; Update volume
jp zSetChanVol ; Immediately set this new volume
; ---------------------------------------------------------------------------
; (via Saxman's doc): prevent next note from attacking
;zloc_DC4
cfPreventAttack:
set 4,(ix+zTrack.PlaybackControl) ; Set bit 4 (10h) on playback control; do not attack next note
dec hl ; Takes no argument, so just put it back
ret
; ---------------------------------------------------------------------------
; (via Saxman's doc): set note fill amount to xx
;zloc_DCA
cfNoteFill:
ld (ix+zTrack.NoteFillTimeout),a ; Note fill value (modifiable)
ld (ix+zTrack.NoteFillMaster),a ; Note fill value (master copy, rewrites +0Fh when necessary)
ret
; ---------------------------------------------------------------------------
; (via Saxman's doc): add xx to channel key
;zloc_DD1 cfAddKey:
cfChangeTransposition:
add a,(ix+zTrack.Transpose) ; Add to current transpose value
ld (ix+zTrack.Transpose),a ; Store updated transpose value
ret
; ---------------------------------------------------------------------------
; (via Saxman's doc): set music tempo to xx
;zloc_DD8
cfSetTempo:
ld (zAbsVar.CurrentTempo),a ; Set tempo
ret
; ---------------------------------------------------------------------------
; (via Saxman's doc): Change Tempo Modifier to xx for ALL channels
;zloc_DDC
cfSetTempoMod:
push ix ; Save 'ix'
ld ix,zTracksStart ; Start at beginning of track memory
ld de,zTrack.len ; Track size
ld b,MUSIC_TRACK_COUNT ; All 10 tracks
- ld (ix+zTrack.TempoDivider),a ; Sets the timing divisor for ALL tracks; this can result in total half-speed, quarter-speed, etc.
add ix,de
djnz -
pop ix ; Restore 'ix'
ret
; ---------------------------------------------------------------------------
; This controls which TL registers are set for a particular
; algorithm; it actually makes more sense to look at a zVolTLMaskTbl entry as a bitfield.
; Bit 0-4 set which TL operators are actually effected for setting a volume;
; this table helps implement the following from the Sega Tech reference:
; "To make a note softer, only change the TL of the slots (the output operators).
; Changing the other operators will affect the flavor of the note."
; zloc_DF1:
ensure1byteoffset 8
zVolTLMaskTbl:
db 8, 8, 8, 8
db 0Ch,0Eh,0Eh,0Fh
; ---------------------------------------------------------------------------
; (via Saxman's doc): Change channel volume TO xx; xx is signed (Incorrect, see below)
; However, I've noticed this is incorrect; first of all, you'll notice
; it's still doing an addition, not a forced set. Furthermore, it's
; not actually altering the FM yet; basically, until the next voice
; switch, this volume change will not come into effect. Maybe a better
; description of it is "change volume by xx when voice changes", which
; makes sense given some voices are quieter/louder than others, and a
; volume change at voice may be necessary... or my guess anyway.
; Alternatively, just think of it as a volume setting optimized for PSG :P
;zloc_DF9 cfChangeVolume
cfChangePSGVolume:
add a,(ix+zTrack.Volume) ; Add to channel volume
ld (ix+zTrack.Volume),a ; Store updated volume
ret
; ---------------------------------------------------------------------------
; Unused command EDh
; This used to be Sonic 1's cfClearPush. The whole Push SFX feature
; was retained when the driver was ported to Z80, but eventually removed in Beta 5.
; This broken code is all that's left of it.
;zlocret_E00 cfUnused cfUnused1
cfClearPush:
if (OptimiseDriver=0)&&(FixDriverBugs=0)
; Dangerous! It doesn't put back the byte read, meaning one gets skipped!
ret
endif
; ---------------------------------------------------------------------------
; Unused command EEh
; This used to be Sonic 1's cfStopSpecialFM4. But the Special SFX function hasn't been ported...
;zloc_E01 cfVoiceUNK cfUnused2
cfStopSpecialFM4:
dec hl ; Put back byte; does nothing
ret
; ---------------------------------------------------------------------------
; (via Saxman's doc): set voice selection to xx
;zloc_E03
cfSetVoice:
ld (ix+zTrack.VoiceIndex),a ; Set current voice
ld c,a ; a -> c (saving for later, if we go to cfSetVoiceCont)
bit 2,(ix+zTrack.PlaybackControl) ; If "SFX is overriding this track" bit set...
ret nz ; .. return!
push hl ; Save 'hl'
call cfSetVoiceCont ; Set the new voice!
pop hl ; Restore 'hl'
ret
; ||||||||||||||| S U B R O U T I N E |||||||||||||||||||||||||||||||||||||||
;zsub_E12
cfSetVoiceCont:
ld a,(zDoSFXFlag) ; Check SFX flag 0 = updating music, 80h means busy (don't supply me a sound, plz), FFh set means updating SFX (use custom voice table)
or a ; test
ld a,c ; c -> a (restored 'a')
jr z,zSetVoiceMusic ; If not busy, jump to zSetVoiceMusic (set 'hl' to VoiceTblPtr)
ld l,(ix+zTrack.VoicePtrLow) ; get low byte of custom voice table
ld h,(ix+zTrack.VoicePtrHigh) ; get high byte of custom voice table
jr zSetVoice ; Do not set 'hl' to VoiceTblPtr
; End of function cfSetVoiceCont
; ||||||||||||||| S U B R O U T I N E |||||||||||||||||||||||||||||||||||||||
;zsub_E21
zSetVoiceMusic:
; Set 'hl' to normal voice table pointer
ld hl,(zAbsVar.VoiceTblPtr)
;zloc_E24
zSetVoice:
; This does the actual setting of the FM registers for the specific voice
; 'a' is the voice index to set
; 'hl' is set to the address of the voice table pointer (can be substituted, probably mainly for SFX)
if OptimiseDriver
ld e,a
ld d,0
ld b,25
- add hl,de
djnz -
else
push hl ; push 'hl' for the end of the following block...
; The following is a crazy block designed to 'multiply' our target voice value by 25...
; Where a single voice is 25 bytes long
ld c,a ; a -> c
ld b,0 ; b = 0 (so only low byte of 'bc' is set, basically voice to set)
add a,a ; a *= 2 (indexing something...)
ld l,a ; low byte of 'hl' set to 'a'
ld h,b ; high byte = 0
add hl,hl ; hl *= 2
add hl,hl ; hl *= 2 (total hl * 4!!)
ld e,l
ld d,h ; de = hl
add hl,hl ; hl *= 2
add hl,de ; hl += de
add hl,bc ; hl += bc (waaah!)
pop de ; old 'hl' value -> 'de'
add hl,de ; hl += de (Adds address from the very beginning)
; End crazy multiply-by-25 block
endif
; Sets up a value for future Total Level setting...
ld a,(hl) ; Get feedback/algorithm -> a
inc hl ; next byte of voice...
ld (zloc_E65+1),a ; self-modifying code; basically enables 'a' restored to its current value later
ld c,a ; a -> c (will be data to YM2612)
ld a,(ix+zTrack.VoiceControl) ; Get "voice control" byte
and 3 ; only keep bits 0-2 (bit 2 specifies which chip to write to)
add a,0B0h ; add to get appropriate feedback/algorithm register
rst zWriteFMIorII ; Write new value to appropriate part
; detune/coarse freq, all channels
sub 80h ; Subtract 80h from 'a' (Detune/coarse frequency of operator 1 register)
ld b,4 ; Do next 4 bytes (operator 1, 2, 3, and 4)
- ld c,(hl) ; Get next detune/coarse freq
inc hl ; next voice byte
rst zWriteFMIorII ; Write this detune/coarse freq
add a,4 ; Next detune/coarse freq register
djnz -
push af ; saving 'a' for much later... will be restored when time to "Total Level"
; other regs up to just before "Total Level", all channels
add a,10h ; we're at 40h+, now at 50h+ (RS/AR of operator 1 register)
ld b,10h ; Perform 16 writes (basically goes through RS/AR, AM/D1R, D2R, D1L)
- ld c,(hl) ; Get next reg data value
inc hl ; next voice byte
rst zWriteFMIorII ; Write to FM
add a,4 ; Next register
djnz -
; Now going to set "stereo output control and LFO sensitivity"
add a,24h ; Sets to reg B4h+ (stereo output control and LFO sensitivity)
ld c,(ix+zTrack.AMSFMSPan) ; Panning / AMS / FMS settings from track
rst zWriteFMIorII ; Write it!
ld (ix+zTrack.TLPtrLow),l ; Save current position (TL bytes begin)
ld (ix+zTrack.TLPtrHigh),h ; ... for updating volume correctly later later
zloc_E65:
ld a,0 ; "self-modified code" -- 'a' will actually be set to the feedback/algorithm byte
and 7 ; Only keeping the "algorithm" part of it
add a,zVolTLMaskTbl&0FFh ; Adds offset to zVolTLMaskTbl table (low byte only)
ld e,a ; Puts this low byte into 'e'
ld d,(zVolTLMaskTbl&0FF00h)>>8 ; Get high byte -> 'd'
ld a,(de) ; Get this zVolTLMaskTbl value by algorithm
ld (ix+zTrack.VolTLMask),a ; Store this zVolTLMaskTbl value into (ix+1Ah)
ld e,a ; Store zVolTLMaskTbl value -> 'e'
ld d,(ix+zTrack.Volume) ; Store channel volume -> 'd'
pop af ; Restore 'a'; it's now back at appropriate 40h+ register for Total Level setting!
; Set "Total Levels" (general volume control)
zSetFMTLs:
ld b,4 ; Loop 4 times (for each Total Level register on this channel)
- ld c,(hl) ; Get next TL byte -> c
inc hl ; Next voice byte...
rr e ; zVolTLMaskTbl value is rotated right; if the bit 0 of this value prior to the rotate was reset (0)...
jr nc,++ ; ... then we make the jump here (just write the TL value directly, don't modify it)
; Otherwise, apply channel volume to TL here
; It's not appropriate to alter ALL TL values, only
; the ones which are "slots" (output operators)
push af ; Save 'a'
if FixDriverBugs
res 7,c
endif
ld a,d ; Channel volume -> d
add a,c ; Add it to the TL value
if FixDriverBugs
; Prevent attenuation overflow (volume underflow)
jp p,+
ld a,7Fh
endif
+
ld c,a ; Modified value -> c
pop af ; Restore 'a'
+
rst zWriteFMIorII ; Write TL value
add a,4 ; Next TL reg...
djnz -
ret
; End of function zSetVoiceMusic
; ||||||||||||||| S U B R O U T I N E |||||||||||||||||||||||||||||||||||||||
;zsub_E8A
zSetChanVol:
bit 7,(ix+zTrack.VoiceControl) ; a PSG track
ret nz ; If so, quit!
bit 2,(ix+zTrack.PlaybackControl) ; If playback control byte "SFX is overriding this track" bit set...
ret nz ; ... then quit!
ld e,(ix+zTrack.VolTLMask) ; zVolTLMaskTbl value from last voice setting (marks which specific TL operators need updating)
ld a,(ix+zTrack.VoiceControl) ; Load current voice control byte
and 3 ; Keep only bits 0-2
add a,40h ; Add 40h -- appropriate TL register
ld d,(ix+zTrack.Volume) ; Get channel volume
bit 7,d ; If bit 7 (80h) is set...
ret nz ; ... then quit!
push hl ; Save 'hl'
ld l,(ix+zTrack.TLPtrLow) ; low byte of where TL bytes begin (set during last voice setting)
ld h,(ix+zTrack.TLPtrHigh) ; high byte of where TL bytes begin (set during last voice setting)
call zSetFMTLs ; Set the appropriate Total Levels
pop hl ; Restore 'hl'
ret
; End of function zSetChanVol
; ---------------------------------------------------------------------------
; (via Saxman's doc): F0wwxxyyzz - modulation
; o ww - Wait for ww period of time before modulation starts
; o xx - Modulation Speed
; o yy - Modulation change per Mod. Step
; o zz - Number of steps in modulation
;zloc_EB0
cfModulation:
set 3,(ix+zTrack.PlaybackControl) ; Set bit 3 (08h) of "playback control" byte (modulation on)
dec hl ; Move 'hl' back one...
ld (ix+zTrack.ModulationPtrLow),l ; Back up modulation setting address into (ix+11h), (ix+12h)
ld (ix+zTrack.ModulationPtrHigh),h
;zloc_EBB
zSetModulation:
; Sets up modulation for this track; expects 'hl' to point to modulation
; configuration info...
; Heh, using some undoc instructions here...
ld a,ixl ; Get lower byte of current track address (ew :P)
add a,zTrack.ModulationWait ; ... and add 19 bytes to it
ld e,a ; put that into 'e'
adc a,ixu ; If carry occurred, add that to upper part of address
sub e ; subtract 'e'
ld d,a ; Basically, 'd' is now the appropriate upper byte of the address, completing de = (ix + 19)
; Copying next three bytes
if OptimiseDriver
ld bc,3
ldir ; while (bc-- > 0) *de++ = *hl++; (wait, modulation speed, modulation change)
else
ldi ; *(de)++ = *(hl)++ (Wait for ww period of time before modulation starts)
ldi ; *(de)++ = *(hl)++ (Modulation Speed)
ldi ; *(de)++ = *(hl)++ (Modulation change per Mod. Step)
endif
ld a,(hl) ; Get Number of steps in modulation
inc hl ; Next byte...
srl a ; divide number of steps by 2
ld (ix+zTrack.ModulationSteps),a ; Store this step count into trackPtr+16h
bit 4,(ix+zTrack.PlaybackControl) ; Is bit 4 "do not attack next note" (10h) set?
ret nz ; If so, quit!
xor a ; Clear 'a'
ld (ix+zTrack.ModulationValLow),a ; Clear modulation value low byte
ld (ix+zTrack.ModulationValHigh),a ; Clear modulation value high byte
ret
; ---------------------------------------------------------------------------
; (via Saxman's doc): Turn on modulation
;zloc_EDE
cfEnableModulation:
dec hl
set 3,(ix+zTrack.PlaybackControl) ; Playback byte bit 3 (08h) -- modulation on
ret
; ---------------------------------------------------------------------------
; (via Saxman's doc): stop the track
;zloc_EE4
cfStopTrack:
res 7,(ix+zTrack.PlaybackControl) ; Clear playback byte bit 7 (80h) -- currently playing (not anymore)
res 4,(ix+zTrack.PlaybackControl) ; Clear playback byte bit 4 (10h) -- do not attack
bit 7,(ix+zTrack.VoiceControl) ; Is voice control bit 7 (80h) a PSG track set?
jr nz,zStopPSGTrack ; If so, skip this next part...
ld a,(zAbsVar.DACUpdating) ; Is DAC updating? (FF if so)
or a ; test it
jp m,zDACStopTrack ; If DAC is updating, go here (we're in a DAC track)
call zFMNoteOff ; Otherwise, stop this FM track
jr +
;zcall_zsub_526
zStopPSGTrack:
call zPSGNoteOff
+
; General stop track continues here...
ld a,(zDoSFXFlag) ; Check if we're an SFX track
or a ; test it
jp p,zStopMusicTrack ; If not, jump to zStopMusicTrack
xor a ; a = 0
ld (zAbsVar.SFXPriorityVal),a ; Reset SFX priority
ld a,(ix+zTrack.VoiceControl) ; Load "voice control" byte
or a ; test it..
jp m,zStopPSGSFXTrack ; If this is PSG SFX track, jump to zStopPSGSFXTrack
push ix ; save 'ix'
; This is an FM SFX track that's trying to stop
sub 2 ; Take channel assignment - 2 (since SFX never use FM 1 or FM 2)
add a,a ; a *= 2 (each table entry is 2 bytes wide)
add a,zMusicTrackOffs&0FFh ; Get low byte value from zMusicTrackOffs
ld (zloc_F1D+2),a ; store into the instruction after zloc_F1D (self-modifying code)
zloc_F1D:
ld ix,(zMusicTrackOffs) ; self-modified code from just above; 'ix' points to corresponding Music FM track
bit 2,(ix+zTrack.PlaybackControl) ; If "SFX is overriding this track" is not set...
jp z,+ ; Skip this part (i.e. if SFX was not overriding this track, then nothing to restore)
call zBankSwitchToMusic ; Bank switch back to music track
res 2,(ix+zTrack.PlaybackControl) ; Clear SFX is overriding this track from playback control
set 1,(ix+zTrack.PlaybackControl) ; Set track as resting bit
ld a,(ix+zTrack.VoiceIndex) ; Get voice this track was using
call zSetVoiceMusic ; And set it! (takes care of volume too)
bankswitch SoundIndex
+
pop ix ; restore 'ix'
pop bc ; removing return address from stack; will not return to coord flag loop
pop bc ; removing return address from stack; will not return to z*UpdateTrack function
ret
; ---------------------------------------------------------------------------
zStopPSGSFXTrack:
push ix ; save 'ix'
; Keep in mind that we just entered with a PSG "voice control" byte
; which is one of the following values (PSG1-3/3N) -- 80h, A0h, C0h, E0h
rra
rra
rra
rra ; in effect, ">> 4"
and 0Fh ; 'a' is now 08, 0A, 0C, or 0E
add a,zMusicTrackOffs&0FFh
ld (zloc_F5A+2),a ; store into the instruction after zloc_A5A (self-modifying code)
zloc_F5A:
ld ix,(zMusicTrackOffs) ; self-modified code from just above; 'ix' points to corresponding Music PSG track
res 2,(ix+zTrack.PlaybackControl) ; Clear SFX is overriding this track from playback control
set 1,(ix+zTrack.PlaybackControl) ; Set track as resting bit
ld a,(ix+zTrack.VoiceControl) ; Get voice control byte
cp 0E0h ; Is this a PSG 3 noise (not tone) track?
jr nz,+ ; If it isn't, don't do next part (non-PSG Noise doesn't restore)
ld a,(ix+zTrack.PSGNoise) ; Get PSG noise setting
ld (zPSG),a ; Write it to PSG
+
pop ix ; restore 'ix'
;zloc_F75
zStopMusicTrack:
pop bc ; removing return address from stack; will not return to coord flag loop
;zloc_F76
zDACStopTrack:
pop bc ; removing return address from stack; will not return to z*UpdateTrack function (anything othat than DAC) or not to coord flag loop (if DAC)
ret
; ---------------------------------------------------------------------------
; (via Saxman's doc): Change current PSG noise to xx (For noise channel, E0-E7)
;zloc_F78
cfSetPSGNoise:
ld (ix+zTrack.VoiceControl),0E0h ; This is a PSG noise track now!
ld (ix+zTrack.PSGNoise),a ; Save PSG noise setting for restoration if SFX overrides it
bit 2,(ix+zTrack.PlaybackControl) ; If SFX is currently overriding it, don't actually set it!
ret nz
ld (zPSG),a ; Otherwise, please do
ret
; ---------------------------------------------------------------------------
; (via Saxman's doc): Turn off modulation
;zloc_F88
cfDisableModulation:
dec hl ; No parameters used, must back up a byte
res 3,(ix+zTrack.PlaybackControl) ; Clear "modulation on" bit setting
ret
; ---------------------------------------------------------------------------
; (via Saxman's doc): Change current PSG tone to xx
;zloc_F8E
cfSetPSGTone:
ld (ix+zTrack.VoiceIndex),a ; Set current PSG tone
ret
; ---------------------------------------------------------------------------
; (via Saxman's doc): jump to position yyyy
;zloc_F92
cfJumpTo:
ld h,(hl) ; Get hight byte of jump destination (since pointer advanced to it)
ld l,a ; Put low byte (already retrieved)
ret
; ---------------------------------------------------------------------------
; (via Saxman's doc): $F7xxyyzzzz - repeat section of music
; * xx - loop index, for loops within loops without confusing the engine.
; o EXAMPLE: Some notes, then a section that is looped twice, then some more notes, and finally the whole thing is looped three times.
; The "inner" loop (the section that is looped twice) would have an xx of 01, looking something along the lines of F70102zzzz, whereas the "outside" loop (the whole thing loop) would have an xx of 00, looking something like F70003zzzz.
; * yy - number of times to repeat
; o NOTE: This includes the initial encounter of the F7 flag, not number of times to repeat AFTER hitting the flag.
; * zzzz - position to loop back to
;zloc_F95
cfRepeatAtPos:
; Loop index is in 'a'
ld c,(hl) ; Get next byte (number of repeats) -> 'c'
inc hl ; Next byte...
push hl ; Save 'hl'
add a,zTrack.LoopCounters ; Add to make loop index offset (starts at 20h in track memory)
ld l,a ; Set hl = offset index
ld h,0
ld e,ixl ; Set 'de' to beginning of track
ld d,ixu
add hl,de ; hl is now pointing to track memory offset for this loop
ld a,(hl) ; Get loop count at this address
or a ; Test it
jr nz,+ ; If not zero, then skip next step (i.e. we're currently looping)
ld (hl),c ; Otherwise, set it to the new number of repeats
+
dec (hl) ; One less loop
pop hl ; Restore 'hl' (now at the position)
jr z,+ ; If counted to zero, skip the rest of this (hence start loop count of 1 terminates the loop without ever looping)
ld a,(hl) ; Get low byte of jump address
inc hl ; Next byte
ld h,(hl) ; Get high byte of jump address -> 'h'
ld l,a ; Put low byte of jump address -> 'l'
; Note then that this loop command only works AFTER the section you mean to loop
ret
+
; If you get here, the loop terminated; just bypass the loop jump address
inc hl
inc hl
ret
; ---------------------------------------------------------------------------
; (via Saxman's doc): jump to position yyyy (keep previous position in memory for returning)
;zloc_FB3
cfJumpToGosub:
ld c,a ; a -> c
ld a,(ix+zTrack.StackPointer) ; Get current "stack" offset (starts at 2Ah, i.e. beginning of next track)
sub 2 ; Move back by two (we need to store a new return address)
ld (ix+zTrack.StackPointer),a ; Set current stack offset
ld b,(hl) ; Get high byte of jump position -> 'b'
inc hl ; Next byte...
ex de,hl ; hl <=> de
add a,ixl ; Add low byte of current track pointer to stack offset (low byte of stack location)
ld l,a ; Keep this in 'l'
adc a,ixu ; Update high byte, if necessary
sub l ; Fixup
ld h,a ; a -> 'h' (Simply, we just did hl = ix + stack_offset)
ld (hl),e ; Store current address low byte (just after jump) into stack
inc hl ; Next byte
ld (hl),d ; Store current address high byte (just after jump) into stack
ld h,b
ld l,c ; hl = bc (current location is where you wanted to jump to)
ret
; ---------------------------------------------------------------------------
; Leftover from Sonic 1: was used in SYZ's music.
;zloc_FCC
cfOpF9:
ld a,88h ; D1L/RR of Operator 3
ld c,0Fh ; Loaded with fixed value (max RR, 1TL?)
rst zWriteFMI ; Written to part I
ld a,8Ch ; D1L/RR of Operator 4
ld c,0Fh ; Loaded with fixed value (max RR, 1TL?)
rst zWriteFMI ; Written to part I
dec hl ; Doesn't take an arg, so put back one byte
ret
; ---------------------------------------------------------------------------
;zbyte_FD8h
zSFXPriority:
db 80h,70h,70h,70h,70h,70h,70h,70h,70h,70h,68h,70h,70h,70h,60h,70h
db 70h,60h,70h,60h,70h,70h,70h,70h,70h,70h,70h,70h,70h,70h,70h,7Fh
db 6Fh,70h,70h,70h,70h,70h,70h,70h,70h,70h,70h,70h,70h,6Fh,70h,70h
db 70h,60h,60h,70h,70h,70h,70h,70h,70h,70h,60h,62h,60h,60h,60h,70h
db 70h,70h,70h,70h,60h,60h,60h,6Fh,70h,70h,6Fh,6Fh,70h,71h,70h,70h
db 6Fh
; zoff_1029:
;zPSG_Index
zPSG_FlutterTbl:
; Basically, for any tone 0-11, dynamic volume adjustments are applied to produce a pseudo-decay,
; or sometimes a ramp up for "soft" sounds, or really any other volume effect you might want!
; Remember on PSG that the higher the value, the quieter it gets (it's attenuation, not volume);
; 0 is thus loudest, and increasing values decay, until level $F (silent)
dw byte_1043, byte_105A, byte_1061, byte_1072
dw byte_108C, byte_107D, byte_10B6, byte_10D2
dw byte_10FA, byte_110B, byte_1149, byte_1165
dw byte_11E5
byte_1043:
db 0,0,0,1,1,1,2,2,2,3,3,3,4,4,4,5
db 5,5,6,6,6,7,80h
byte_105A:
db 0,2,4,6,8,10h,80h
byte_1061:
db 0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,80h
byte_1072:
db 0,0,2,3,4,4,5,5,5,6,80h
byte_107D:
db 3,3,3,2,2,2,2,1,1,1,0,0,0,0,80h
byte_108C:
db 0,0,0,0,0,0,0,0,0,0,1,1
db 1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2
db 2,2,2,2,3,3,3,3,3,3,3,3,4,80h
byte_10B6:
db 0,0,0,0,0,0,1,1,1,1,1,2,2,2,2,2
db 3,3,3,4,4,4,5,5,5,6,7,80h
byte_10D2:
db 0,0,0,0,0,1,1,1,1,1,2,2,2,2,2,2
db 3,3,3,3,3,4,4,4,4,4,5,5,5,5,5,6
db 6,6,6,6,7,7,7,80h
byte_10FA:
db 0,1,2,3,4,5,6,7,8,9,0Ah,0Bh,0Ch,0Dh,0Eh,0Fh,80h
byte_110B:
db 0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1
db 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
db 1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2
db 2,2,3,3,3,3,3,3,3,3,3,3,4,80h
byte_1149:
db 4,4,4,3,3,3,2,2,2,1,1,1,1,1,1,1
db 2,2,2,2,2,3,3,3,3,3,4,80h
byte_1165:
db 4,4,3,3,2,2,1,1,1,1,1,1,1,1,1,1
db 1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2
db 2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3
db 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3
db 3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4
db 4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5
db 5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6
db 6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,80h
byte_11E5:
db 0Eh,0Dh,0Ch,0Bh,0Ah,9,8,7,6,5,4,3,2,1,0,80h
; END of zPSG_FlutterTbl ---------------------------
; zbyte_11F5h:
zMasterPlaylist:
; Music IDs
offset := MusicPoint2
ptrsize := 2
idstart := 80h
; note: +20h means uncompressed, here
; +40h is a flag that forces PAL mode off when set
zMusIDPtr_2PResult: db id(MusPtr_2PResult) ; 92
zMusIDPtr_EHZ: db id(MusPtr_EHZ) ; 81
zMusIDPtr_MCZ_2P: db id(MusPtr_MCZ_2P) ; 85
zMusIDPtr_OOZ: db id(MusPtr_OOZ) ; 8F
zMusIDPtr_MTZ: db id(MusPtr_MTZ) ; 82
zMusIDPtr_HTZ: db id(MusPtr_HTZ) ; 94
zMusIDPtr_ARZ: db id(MusPtr_ARZ) ; 86
zMusIDPtr_CNZ_2P: db id(MusPtr_CNZ_2P) ; 80
zMusIDPtr_CNZ: db id(MusPtr_CNZ) ; 83
zMusIDPtr_DEZ: db id(MusPtr_DEZ) ; 87
zMusIDPtr_MCZ: db id(MusPtr_MCZ) ; 84
zMusIDPtr_EHZ_2P: db id(MusPtr_EHZ_2P) ; 91
zMusIDPtr_SCZ: db id(MusPtr_SCZ) ; 8E
zMusIDPtr_CPZ: db id(MusPtr_CPZ) ; 8C
zMusIDPtr_WFZ: db id(MusPtr_WFZ) ; 90
zMusIDPtr_HPZ: db id(MusPtr_HPZ) ; 9B
zMusIDPtr_Options: db id(MusPtr_Options) ; 89
zMusIDPtr_SpecStage: db id(MusPtr_SpecStage) ; 88
zMusIDPtr_Boss: db id(MusPtr_Boss) ; 8D
zMusIDPtr_EndBoss: db id(MusPtr_EndBoss) ; 8B
zMusIDPtr_Ending: db id(MusPtr_Ending) ; 8A
zMusIDPtr_SuperSonic: db id(MusPtr_SuperSonic) ; 93
zMusIDPtr_Invincible: db id(MusPtr_Invincible) ; 99
zMusIDPtr_ExtraLife: db id(MusPtr_ExtraLife)+20h; B5
zMusIDPtr_Title: db id(MusPtr_Title) ; 96
zMusIDPtr_EndLevel: db id(MusPtr_EndLevel) ; 97
zMusIDPtr_GameOver: db id(MusPtr_GameOver)+20h ; B8
zMusIDPtr_Continue: db (MusPtr_Continue-MusicPoint1)/ptrsize ; 0
zMusIDPtr_Emerald: db id(MusPtr_Emerald)+20h ; BA
zMusIDPtr_Credits: db id(MusPtr_Credits)+20h ; BD
zMusIDPtr_Countdown: db id(MusPtr_Drowning)+40h ; DC
zMusIDPtr__End:
; Tempo with speed shoe tempo for each song
;zbyte_1214
zSpedUpTempoTable:
db 68h,0BEh,0FFh,0F0h
db 0FFh,0DEh,0FFh,0DDh
db 68h, 80h,0D6h, 7Bh
db 7Bh,0FFh,0A8h,0FFh
db 87h,0FFh,0FFh,0C9h
db 97h,0FFh,0FFh,0CDh
db 0CDh,0AAh,0F2h,0DBh
db 0D5h,0F0h, 80h
; DAC sample pointers and lengths
ensure1byteoffset 1Ch
;zDACPtr_Index:
;zbyte_1233:
zDACPtrTbl:
zDACPtr_Sample1: dw zmake68kPtr(SndDAC_Sample1)
;zbyte_1235
zDACLenTbl:
dw SndDAC_Sample1_End-SndDAC_Sample1
zDACPtr_Sample2: dw zmake68kPtr(SndDAC_Sample2)
dw SndDAC_Sample2_End-SndDAC_Sample2
zDACPtr_Sample3: dw zmake68kPtr(SndDAC_Sample3)
dw SndDAC_Sample3_End-SndDAC_Sample3
zDACPtr_Sample4: dw zmake68kPtr(SndDAC_Sample4)
dw SndDAC_Sample4_End-SndDAC_Sample4
zDACPtr_Sample5: dw zmake68kPtr(SndDAC_Sample5)
dw SndDAC_Sample5_End-SndDAC_Sample5
zDACPtr_Sample6: dw zmake68kPtr(SndDAC_Sample6)
dw SndDAC_Sample6_End-SndDAC_Sample6
zDACPtr_Sample7: dw zmake68kPtr(SndDAC_Sample7)
dw SndDAC_Sample7_End-SndDAC_Sample7
; something else for DAC sounds
; First byte selects one of the DAC samples. The number that
; follows it is a wait time between each nibble written to the DAC
; (thus higher = slower)
ensure1byteoffset 22h
; zbyte_124F:
zDACMasterPlaylist:
; DAC samples IDs
offset := zDACPtrTbl
ptrsize := 2+2
idstart := 81h
db id(zDACPtr_Sample1),17h ; 81h
db id(zDACPtr_Sample2),1 ; 82h
db id(zDACPtr_Sample3),6 ; 83h
db id(zDACPtr_Sample4),8 ; 84h
db id(zDACPtr_Sample5),1Bh ; 85h
db id(zDACPtr_Sample6),0Ah ; 86h
db id(zDACPtr_Sample7),1Bh ; 87h
db id(zDACPtr_Sample5),12h ; 88h
db id(zDACPtr_Sample5),15h ; 89h
db id(zDACPtr_Sample5),1Ch ; 8Ah
db id(zDACPtr_Sample5),1Dh ; 8Bh
db id(zDACPtr_Sample6),2 ; 8Ch
db id(zDACPtr_Sample6),5 ; 8Dh
db id(zDACPtr_Sample6),8 ; 8Eh
db id(zDACPtr_Sample7),8 ; 8Fh
db id(zDACPtr_Sample7),0Bh ; 90h
db id(zDACPtr_Sample7),12h ; 91h
; ||||||||||||||| S U B R O U T I N E |||||||||||||||||||||||||||||||||||||||
;zsub_1271
zSaxmanDec:
if OptimiseDriver
xor a
ld b,a
ld d,a
ld e,a
else
exx
ld bc,0
ld de,0
endif
exx
ld de,zMusicData
ld c,(hl)
inc hl
ld b,(hl) ; bc = (hl) i.e. "size of song"
inc hl
ld (zGetNextByte+1),hl ; modify inst. @ zGetNextByte -- set to beginning of decompression stream
if OptimiseDriver=0
inc bc
endif
ld (zDecEndOrGetByte+1),bc ; modify inst. @ zDecEndOrGetByte -- set to length of song, +1
;zloc_1288
zSaxmanReadLoop:
exx ; shadow reg set
if OptimiseDriver
srl b ; b >> 1 (just a mask that lets us know when we need to reload)
jr c,+ ; if it's set, we still have bits left in 'c'; jump to '+'
; If you get here, we're out of bits in 'c'!
call zDecEndOrGetByte ; get next byte -> 'a'
ld c,a ; a -> 'c'
ld b,7Fh ; b = 7Fh (7 new bits in 'c')
+
srl c ; test next bit of 'c'
exx ; normal reg set
jr nc,+ ; if bit not set, it's a compression bit; jump to '+'
else
srl c ; c >> 1 (active control byte)
srl b ; b >> 1 (just a mask that lets us know when we need to reload)
bit 0,b ; test next bit of 'b'
jr nz,+ ; if it's set, we still have bits left in 'c'; jump to '+'
; If you get here, we're out of bits in 'c'!
call zDecEndOrGetByte ; get next byte -> 'a'
ld c,a ; a -> 'c'
ld b,0FFh ; b = FFh (8 new bits in 'c')
+
bit 0,c ; test next bit of 'c'
exx ; normal reg set
jr z,+ ; if bit not set, it's a compression bit; jump to '+'
endif
; If you get here, there's a non-compressed byte
call zDecEndOrGetByte ; get next byte -> 'a'
ld (de),a ; store it directly to the target memory address
inc de ; de++
exx ; shadow reg set
inc de ; Also increase shadow-side 'de'... relative pointer only, does not point to output Z80_RAM
exx ; normal reg set
jr zSaxmanReadLoop ; loop back around...
+
call zDecEndOrGetByte ; get next byte -> 'a'
ld c,a ; a -> 'c' (low byte of target address)
call zDecEndOrGetByte ; get next byte -> 'a'
ld b,a ; a -> 'b' (high byte of target address + count)
and 0Fh ; keep only lower four bits...
add a,3 ; add 3 (minimum 3 bytes are to be read in this mode)
push af ; save 'a'...
ld a,b ; b -> 'a' (low byte of target address)
rlca
rlca
rlca
rlca
and 0Fh ; basically (b >> 4) & 0xF (upper four bits now exclusively as lower four bits)
ld b,a ; a -> 'b' (only upper four bits of value make up part of the address)
ld a,c
add a,12h
ld c,a
adc a,b
sub c
and 0Fh
ld b,a ; bc += 12h
pop af ; restore 'a' (byte count to read; no less than 3)
exx ; shadow reg set
push de ; keep current 'de' (relative pointer) value...
ld l,a ; how many bytes we will read -> 'hl'
ld h,0
add hl,de ; add current relative pointer...
ex de,hl ; effectively, de += a
exx ; normal reg set
pop hl ; shadow 'de' -> 'hl' (relative pointer, prior to all bytes read, relative)
or a ; Clear carry
sbc hl,bc ; hl -= bc
jr nc,+ ; if result positive, jump to '+'
ex de,hl ; current output pointer -> 'hl'
ld b,a ; how many bytes to load -> 'b'
- ld (hl),0 ; fill in zeroes that many times
inc hl
djnz -
ex de,hl ; output pointer updated
jr zSaxmanReadLoop ; loop back around...
+
ld hl,zMusicData ; point at beginning of decompression point
add hl,bc ; move ahead however many bytes
ld c,a
ld b,0
ldir
jr zSaxmanReadLoop
; End of function zSaxmanDec
; ||||||||||||||| S U B R O U T I N E |||||||||||||||||||||||||||||||||||||||
; This is an ugly countdown to zero implemented in repeatedly modifying code!!
; But basically, it starts at the full length of the song +1 (so it can decrement)
; and waits until 'hl' decrements to zero
;zsub_12E8
zDecEndOrGetByte:
ld hl,0 ; "self-modified code" -- starts at full length of song +1, waits until it gets to 1...
if OptimiseDriver
ld a,h
or l
jr z,+ ; If 'h' and 'l' both equal zero, we quit!!
endif
dec hl ; ... where this will be zero
ld (zDecEndOrGetByte+1),hl ; "self-modifying code" -- update the count in case it's not zero
if OptimiseDriver=0
ld a,h
or l
jr z,+ ; If 'h' and 'l' both equal zero, we quit!!
endif
;zloc_12F3
zGetNextByte:
ld hl,0 ; "self-modified code" -- get address of next compressed byte
ld a,(hl) ; put it into -> 'a'
inc hl ; next byte...
ld (zGetNextByte+1),hl ; change inst @ zGetNextByte so it loads next compressed byte
ret ; still going...
+
pop hl ; throws away return address to this function call so that next 'ret' exits decompressor (we're done!)
ret ; Exit decompressor
; End of function zDecEndOrGetByte
; ---------------------------------------------------------------------------
; space for a few global variables
zPALUpdTick: db 0 ; zbyte_12FE ; This counts from 0 to 5 to periodically "double update" for PAL systems (basically every 6 frames you need to update twice to keep up)
zCurDAC: db 0 ; zbyte_12FF ; seems to indicate DAC sample playing status
zCurSong: db 0 ; zbyte_1300 ; currently playing song index
zDoSFXFlag: db 0 ; zbyte_1301; Flag to indicate we're updating SFX (and thus use custom voice table); set to FFh while doing SFX, 0 when not.
zRingSpeaker: db 0 ; zbyte_1302 ; stereo alternation flag. 0 = next one plays on left, -1 = next one plays on right
zGloopFlag: db 0 ; zbyte_1303 ; if -1, don't play the gloop sound next time
zSpindashPlayingCounter: db 0 ; zbyte_1304
zSpindashExtraFrequencyIndex: db 0 ; zbyte_1305
zSpindashActiveFlag: db 0 ; zbyte_1306 ; -1 if spindash charge was the last sound that played
zPaused: db 0 ; zbyte_1307 ; 0 = normal, -1 = pause all sound and music
; end of Z80 'ROM'
if $>zMusicData
fatal "Your Z80 code won't fit before the music.. It's \{$-zMusicData}h bytes past the start of music data \{zMusicData}h"
endif
| 35.907607 | 246 | 0.651609 |
c5544ad5f62b30886eb69a37509566edcbb72f39 | 11,329 | asm | Assembly | editFx.asm | neilbaldwin/Pulsar | 8cc11ab4cb4117dc44022b7645b02f777a672bf2 | [
"BSD-2-Clause-FreeBSD"
] | 11 | 2021-04-08T14:24:52.000Z | 2022-03-25T00:45:27.000Z | editFx.asm | neilbaldwin/Pulsar | 8cc11ab4cb4117dc44022b7645b02f777a672bf2 | [
"BSD-2-Clause-FreeBSD"
] | 3 | 2021-09-17T03:10:36.000Z | 2021-09-17T03:16:45.000Z | editFx.asm | neilbaldwin/Pulsar | 8cc11ab4cb4117dc44022b7645b02f777a672bf2 | [
"BSD-2-Clause-FreeBSD"
] | 1 | 2021-04-08T14:24:54.000Z | 2021-04-08T14:24:54.000Z | ;---------------------------------------------------------------
; EDIT FX
;---------------------------------------------------------------
editFx:
;jmp editorLoop
.IF SRAM_MAP=32
lda #SRAM_FX_BANK
jsr setMMC1r1
.ENDIF
ldx fxCursorY
lda fxRowsIndex,x
ldx editorCurrentFx
clc
adc editFxAddressLo,x
sta fxVector
lda editFxAddressHi,x
adc #$00
sta fxVector+1
lda writeScreen
beq @a
jsr writeFxScreen
dec writeScreen
beq @a
jsr writeFxHeaderFooter
lda #$01
sta dmaUpdateHeader
sta dmaUpdateTitle
lda #$00
sta writeScreen
jmp editorLoop
@a: jsr globalKeys ;global keys
lda writeScreen ;if mode has changed, this flag will be !=0
beq @b
jmp editFxExit ;if changed, don't do any more keys
@b: jsr processKeys
.IF SRAM_MAP=32
lda #SRAM_FX_BANK
jsr setMMC1r1
.ENDIF
ldy fxCursorX
jsr fxKeysHoldA_UDLR
ldy fxCursorX
jsr fxKeysTapA
jsr fxKeysTapB
jsr fxKeysHoldAB_TapUDLR
jsr fxKeysHoldSelect_UDLR
jsr moveAroundEditor ;global routine for moving around editors
editFxExit:
updateCursor fxCursorX,fxCursorY,fxCursorColumns,fxCursorRows,fxColumnCursorType
jsr fxPlayMarkers
jsr fxSmartTranspose
jmp editorLoop
fxSmartTranspose:
lda PAD1_firea
beq @x
lda PAD1_sel
beq @x
lda PAD1_dlr
bne @transpose
lda PAD1_dud
eor #$FF
clc
adc #$01
bne @transpose
@x: rts
@transpose: sta tmp4
ldy editorCurrentFx
lda editFxAddressLo,y
sta tmp0
lda editFxAddressHi,y
sta tmp1
ldy fxCursorX
lda (fxVector),y
sta tmp2
lda #NUMBER_OF_NOTES
sta tmp3
lda fxCursorX
cmp #FX_COLUMN_PITCH_A
beq @tranPitch
cmp #FX_COLUMN_PITCH_B
beq @tranPitch
cmp #FX_COLUMN_PITCH_C
beq @tranPitch
cmp #FX_COLUMN_PITCH_D
beq @tranPitch
cmp #FX_COLUMN_VOLUME_A
beq @tranVol
cmp #FX_COLUMN_VOLUME_B
beq @tranVol
cmp #FX_COLUMN_VOLUME_D
beq @tranVol
jmp @tranDuty
@tranVol: tay
dey
lda (tmp0),y
iny
cmp #$FF
beq @noVol
lda (tmp0),y
ldx PAD1_dud
beq @freeVol
cmp tmp2
bne @noVol
@freeVol: clc
adc tmp4
bmi @noVol
cmp #$10
bcs @noVol
sta (tmp0),y
@noVol: tya
clc
adc #BYTES_PER_FX_TABLE_STEP
cmp #(STEPS_PER_FX_TABLE * BYTES_PER_FX_TABLE_STEP)
bcc @tranVol
ldy fxCursorX
lda (fxVector),y
sta editBuffer
lda #$01
sta writeScreen
rts
@tranPitch: cmp #FX_COLUMN_PITCH_D
bne @tranPitch1
ldy #$10
sty tmp3
@tranPitch1: tay
lda (tmp0),y
cmp #$FF
beq @noPitch
ldx PAD1_dud
beq @freePitch
cmp tmp2
bne @noPitch
@freePitch: clc
adc tmp4
bmi @noPitch
cmp tmp3
bcs @noPitch
sta (tmp0),y
@noPitch: tya
clc
adc #BYTES_PER_FX_TABLE_STEP
cmp #(STEPS_PER_FX_TABLE * BYTES_PER_FX_TABLE_STEP)
bcc @tranPitch1
ldy fxCursorX
lda (fxVector),y
sta editBuffer
lda #$01
sta writeScreen
rts
@tranDuty: tay
lda tmp4
asl a
asl a
asl a
asl a
asl a
asl a
sta tmp4
tya
@tranDuty1: tay
dey
dey
lda (tmp0),y
iny
iny
cmp #$FF
beq @noDuty
lda (tmp0),y
ldx PAD1_dud
beq @freeDuty
cmp tmp2
bne @noDuty
@freeDuty: clc
adc tmp4
sta (tmp0),y
@noDuty: tya
clc
adc #BYTES_PER_FX_TABLE_STEP
cmp #(STEPS_PER_FX_TABLE* BYTES_PER_FX_TABLE_STEP)
bcc @tranDuty1
ldy fxCursorX
lda (fxVector),y
sta editBuffer
lda #$01
sta writeScreen
rts
fxPlayMarkers: lda plyrFxTable
bmi @x
cmp editorCurrentFx
bne @x
ldy plyrFxTableIndex
cpy #$10
bcs @x
lda fxCursorRows,y
sec
sbc #$01
sta SPR05_Y
sta SPR06_Y
lda #SPR_RIGHT_ARROW
sta SPR05_CHAR
lda #SPR_LEFT_ARROW
sta SPR06_CHAR
lda #26+48
sta SPR05_X
clc
adc #14*8
sta SPR06_X
@x: rts
fxKeysHoldAB_TapUDLR:
lda PAD1_firea
beq @x
lda PAD1_fireb
beq @x
lda PAD1_dud
beq @noUD
bpl @down
jsr fxDeleteRow
ldy fxCursorX
lda (fxVector),y
cmp #$FF
beq @a
sta editFxLastValue,y
@a: sta editBuffer
lda #$01
sta editBufferFlag
@a1: lda #$01
sta writeScreen
rts
@down: jsr fxInsertRow
ldy fxCursorX
lda (fxVector),y
sta editBuffer
lda #$01
sta writeScreen
lda #$01
sta editBufferFlag
rts
@noUD: lda PAD1_dlr
beq @x
@x: rts
fxDeleteRow:
ldx editorCurrentFx
lda editFxAddressLo,x
sta tmp0
lda editFxAddressHi,x
sta tmp1
lda fxCursorY
cmp #STEPS_PER_FX_TABLE-1
beq @x
tay
iny
lda fxRowsIndex,y
tay
ldx #$00
@a: lda (tmp0),y
sta copyBuffer,x
inx
iny
cpy #(STEPS_PER_FX_TABLE * BYTES_PER_FX_TABLE_STEP)
bcc @a
lda fxCursorY
tay
lda fxRowsIndex,y
tay
ldx #$00
@b: lda copyBuffer,x
sta (tmp0),y
inx
iny
cpy #((STEPS_PER_FX_TABLE-1) * BYTES_PER_FX_TABLE_STEP)
bcc @b
ldy #STEPS_PER_FX_TABLE-1
lda fxRowsIndex,y
tay
lda #$FF
sta (tmp0),y ;note a
iny
lda #$0F
sta (tmp0),y ;vol a
iny
lda #$80
sta (tmp0),y ;duty a
iny
lda #$FF
sta (tmp0),y ;note b
iny
lda #$0F
sta (tmp0),y ;vol b
iny
lda #$80
sta (tmp0),y ;duty b
iny
lda #$FF
sta (tmp0),y ;note c
iny
lda #$FF
sta (tmp0),y ;note d
iny
lda #$0F
sta (tmp0),y ;vol d
lda #$FF
sta copyBufferObjectType
jsr editorUpdateCopyInfo
@x: rts
fxInsertRow: ldx editorCurrentFx
lda editFxAddressLo,x
sta tmp0
lda editFxAddressHi,x
sta tmp1
lda fxCursorY
cmp #STEPS_PER_FX_TABLE-1
beq @x
tay
lda fxRowsIndex,y
tay
ldx #$00
@a: lda (tmp0),y
sta copyBuffer,x
inx
iny
cpy #(STEPS_PER_FX_TABLE * BYTES_PER_FX_TABLE_STEP)
bcc @a
lda fxCursorY
tay
iny
lda fxRowsIndex,y
tay
ldx #$00
@b: lda copyBuffer,x
sta (tmp0),y
inx
iny
cpy #(STEPS_PER_FX_TABLE * BYTES_PER_FX_TABLE_STEP)
bcc @b
lda #$FF
sta copyBufferObjectType
jsr editorUpdateCopyInfo
@x: rts
fxKeysHoldSelect_UDLR:
;rts ;*new controls*
lda PAD1_sel
beq @x
lda PAD1_firea
ora PAD1_fireb
bne @x
lda PAD1_dud
ora keysRepeatUD
beq @noUD
clc
adc editorCurrentFx
bpl @a
lda #$00
beq @b
@a: cmp #NUMBER_OF_FX_TABLES
bcs @x
@b: sta editorCurrentFx
lda #$02
sta writeScreen
rts
@noUD: lda PAD1_dlr
beq @x
bmi fxCopyData
jsr fxPasteData
@x: rts
fxCopyData: lda editorMode
sta copyBufferObjectType
ldx editorCurrentFx
stx copyBufferObject
lda editFxAddressLo,x
sta tmp0
lda editFxAddressHi,x
sta tmp1
ldx #$00
ldy fxCursorY
sty copyBufferStartIndex
@copyLoop: lda (tmp0),y
sta copyBuffer,x
inx
iny
cpy #(STEPS_PER_FX_TABLE*BYTES_PER_FX_TABLE_STEP)
bcc @copyLoop
stx copyBufferLength
@x: jsr editorUpdateCopyInfo
rts
fxPasteData: lda copyBufferObjectType
bmi @x ;nothing to copy
cmp editorMode
bne @x ;wrong object type
ldx editorCurrentFx
lda editFxAddressLo,x
sta tmp0
lda editFxAddressHi,x
sta tmp1
ldy fxCursorY
ldx #$00
@b: lda copyBuffer,x
sta (tmp0),y
inx
iny
cpx copyBufferLength
bcs @a
cpy #(STEPS_PER_FX_TABLE*BYTES_PER_FX_TABLE_STEP)
bcc @b
@a: lda #$01
sta writeScreen
rts
@x: lda #ERROR_PASTE
sta errorMessageNumber
rts
fxKeysHoldA_UDLR:
lda PAD1_fireb;keysHoldB
beq @noB
rts
@noB: lda PAD1_sel
bne @x
lda PAD1_firea;keysHoldA ;hold A + U/D/L/R = modify value
bne @holdA
lda editBufferFlag
beq @x
lda editBuffer
sta (fxVector),y
@notEditing: lda #$00
sta editBufferFlag
beq @x
@holdA: lda editBufferFlag
bne @editing
inc editBufferFlag
lda (fxVector),y
sta editBuffer
@editing: ldy fxCursorX
lda keysRepeatLR
ora PAD1_dlr
beq @noLR
cpy #FX_COLUMN_DUTY_A
beq @dutyAdd
cpy #FX_COLUMN_DUTY_B
beq @dutyAdd
bne @addValue
@noLR: lda keysRepeatUD
ora PAD1_dud
beq @x
bne @dutySkip
@dutyAdd: eor #$FF
clc
adc #$01
@dutySkip: bmi @posAdd
lda fxNegativeAdd,y
jmp @addValue
@posAdd: lda fxPositiveAdd,y
@addValue: clc
adc editBuffer
cpy #FX_COLUMN_DUTY_A
beq @noLimit
cpy #FX_COLUMN_DUTY_B
beq @noLimit
and #$FF
bpl @notNeg
lda #$00
beq @noLimit
@notNeg: cmp fxMaxValues,y
bcc @noLimit
lda fxMaxValues,y
@noLimit: sta editBuffer
sta editFxLastValue,y
jsr editFxUpdateScreenValue
@x: rts
fxKeysTapB:
lda PAD1_sel
beq @x
lda keysTapB
beq @x
lda fxClearValue,y
sta (fxVector),y
sta editBuffer
jmp editFxUpdateScreenValue
@x: rts
fxKeysTapA: ldy fxCursorX
lda keysTapA
beq @a
.IF 0=1
lda PAD1_fireb
beq @notDel
lda fxClearValue,y
sta (fxVector),y
sta editBuffer
jmp editFxUpdateScreenValue
.ENDIF
@notDel:
lda editFxLastValue,y
sta (fxVector),y
sta editBuffer
jsr editFxUpdateScreenValue
@a: rts
fxClearValue:
.BYTE $FF,$0F,$00,$FF,$0F,$00,$FF,$FF,$0F
fxPositiveAdd: .BYTE 12 ;pitch a
.BYTE 1 ;volume a
.BYTE $40 ;duty a
.BYTE 12 ;pitch b
.BYTE 1 ;volume b
.BYTE $40 ;duty b
.BYTE 12 ;pitch c
.BYTE $10 ;pitch d
.BYTE 1 ;volume a
fxNegativeAdd: .BYTE -12 ;pitch a
.BYTE -1 ;volume a
.BYTE -$40 ;duty a
.BYTE -12 ;pitch b
.BYTE -1 ;volume b
.BYTE -$40 ;duty b
.BYTE -12 ;pitch c
.BYTE -$10 ;pitch d
.BYTE -1 ;volume a
fxMaxValues: .BYTE NUMBER_OF_NOTES-1
.BYTE $0F
.BYTE 0
.BYTE NUMBER_OF_NOTES-1
.BYTE $0F
.BYTE 0
.BYTE NUMBER_OF_NOTES-1
.BYTE $1F
.BYTE $0F
editFxUpdateScreenValue:
pha
ldx fxCursorY
lda rowOffsetFx,x
ldx fxCursorX
clc
adc columnOffsetFx,x
tax
pla
ldy fxCursorX
cpy #FX_COLUMN_DUTY_A
beq @printDuty
cpy #FX_COLUMN_DUTY_B
beq @printDuty
cpy #FX_COLUMN_VOLUME_A
beq @printVolume
cpy #FX_COLUMN_VOLUME_B
beq @printVolume
cpy #FX_COLUMN_VOLUME_D
beq @printVolume
@printNote: jmp phexWindow3 ;note number
@printVolume: and #$0F
sta windowBuffer,x
rts
@printDuty: jmp fxPrintDuty
writeFxScreen:
ldx #$00
ldy fxFirstRow ;first write row numbers to buffer
@a: tya
jsr phexRow
iny
cpx #$20
bcc @a
ldx editorCurrentFx
lda editFxAddressLo,x
sta tmp0
lda editFxAddressHi,x
sta tmp1
ldx #$00
ldy #$00
@b: lda (tmp0),y
jsr phexWindow3 ;note number
iny
lda (tmp0),y ;volume
and #$0F
sta windowBuffer,x
inx
iny
lda (tmp0),y ;duty
jsr fxPrintDuty
iny
lda (tmp0),y
jsr phexWindow3 ;note number
iny
lda (tmp0),y ;volume
and #$0F
sta windowBuffer,x
inx
iny
lda (tmp0),y ;duty
jsr fxPrintDuty
iny
lda (tmp0),y
jsr phexWindow3 ;note number
iny
lda (tmp0),y
jsr phexWindow3 ;note number
iny
lda (tmp0),y ;volume
and #$0F
sta windowBuffer,x
inx
lda #CHR_SPACE
sta windowBuffer,x
inx
iny
cpx #(14 * 16)
bcc @b
rts
fxPrintDuty: and #%11000000
lsr a
lsr a
lsr a
lsr a
lsr a
lsr a
clc
adc #CHR_DUTY_00_SMALL
sta windowBuffer,x
inx
rts
writeFxHeaderFooter:
ldx #$00 ;write header and title bars to buffer
@c: lda titleFx,x
sta titleBuffer,x
lda headerFx,x
sta headerBuffer,x
inx
cpx #$11
bne @c
ldx #$06 ;print current fx number in title bar
lda editorCurrentFx
jsr phexTitle
rts
fxCursorColumns:
.BYTE $53
.BYTE $53+(2*8)
.BYTE $53+(3*8)
.BYTE $53+(4*8)
.BYTE $53+(6*8)
.BYTE $53+(7*8)
.BYTE $53+(8*8)
.BYTE $53+(10*8)
.BYTE $53+(12*8)
fxCursorRows:
.REPEAT 16,i
.BYTE $28 + (i*8)
.ENDREPEAT
rowOffsetFx:
.REPEAT 16,i
.BYTE i*14
.ENDREPEAT
columnOffsetFx:
.BYTE 0,2,3
.BYTE 4,6,7
.BYTE 8
.BYTE 10,12
;
;0 = no cursor, 1=8x8, 2=8x16, 3=8x24
;
fxColumnCursorType:
.BYTE 2,1,1,2,1,1,2,2,1
| 15.455662 | 82 | 0.670845 |
f7f6ad2a4ef36c8bdc8b2f59d6a7a19e35089d7d | 405 | asm | Assembly | oeis/191/A191373.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/191/A191373.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/191/A191373.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A191373: Sum of binomial coefficients C(i+j,i) modulo 2 over all pairs (i,j) of positive integers satisfying 5i+j=n.
; Submitted by Jamie Morken(s4)
; 1,1,1,1,1,2,1,2,1,2,2,3,1,2,2,4,1,2,2,4,2,3,3,5,1,3,2,5,2,3,4,6,1,3,2,6,2,3,4,6,2,4,3,7,3,5,5,8,1,4,3,8,2,3,5,8,2,4,3,8,4,6,6,9,1,5,3,9,2,3,6,9,2,4,3,9
lpb $0
sub $0,4
mov $2,$0
add $3,1
bin $2,$3
mod $2,2
add $1,$2
lpe
mov $0,$1
add $0,1
| 27 | 153 | 0.582716 |
4994097aac3169ddc75e7d44ce25b481efdd4f1a | 1,407 | asm | Assembly | programs/oeis/081/A081406.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/081/A081406.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/081/A081406.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A081406: a(n) = (n+1)*a(n-3), a(0)=a(1)=a(2)=1 for n>1.
; 1,1,1,4,5,6,28,40,54,280,440,648,3640,6160,9720,58240,104720,174960,1106560,2094400,3674160,24344320,48171200,88179840,608608000,1252451200,2380855680,17041024000,36321084800,71425670400,528271744000,1162274713600,2357047123200,17961239296000,40679614976000,84853696435200,664565853952000,1545825369088000,3309294160972800,26582634158080000,63378840132608000,138990354760857600,1143053268797440000,2788668965834752000,6254565964238592000,52580450364682240000,131067441394233344000,300219166283452416000,2576442067869429760000,6553372069711667200000,15311177480456073216000,133974987529210347520000,347328719694718361600000,826803583944627953664000,7368624314106569113600000,19450408302904228249600000,47127804284843793358848000,427380210218181008588800000,1147574089871349466726400000,2827668257090627601530880000,26070192823309041523916800000,71149593572023666937036800000,178143100196709538896445440000,1668492340691778657530675200000,4624723582181538350907392000000,11757444612982829567165399040000,111788986826349170054555238400000,314481203588344607861702656000000,811263678295815240134412533760000,7825229077844441903818866688000000,22328165454772467158180888576000000,58410984837298697289677702430720000,571241722682644258978777268224000000
add $0,1
mov $2,100
lpb $0
mov $1,$2
mul $2,$0
sub $0,1
trn $0,2
lpe
div $1,100
mov $0,$1
| 100.5 | 1,249 | 0.889837 |
56cca420e01918fd39932624c009fffdea1abca5 | 16,616 | asm | Assembly | x86/GenMacros.asm | lucabrivio/asmFish-fasmg | e1d082dcc493bfa18baee0933c113c7a92cd70d8 | [
"BSD-3-Clause"
] | 1 | 2021-07-08T10:54:07.000Z | 2021-07-08T10:54:07.000Z | x86/GenMacros.asm | lucabrivio/asmFish-fasmg | e1d082dcc493bfa18baee0933c113c7a92cd70d8 | [
"BSD-3-Clause"
] | null | null | null | x86/GenMacros.asm | lucabrivio/asmFish-fasmg | e1d082dcc493bfa18baee0933c113c7a92cd70d8 | [
"BSD-3-Clause"
] | 1 | 2020-04-19T16:49:48.000Z | 2020-04-19T16:49:48.000Z |
macro ShiftBB delta, b, t
if delta = DELTA_N
shl b, 8
else if delta = DELTA_S
shr b, 8
else if delta = DELTA_NE
mov t, not FileHBB
and b, t
shl b, 9
else if delta = DELTA_SE
mov t, not FileHBB
and b, t
shr b, 7
else if delta = DELTA_NW
mov t, not FileABB
and b, t
shl b, 7
else if delta = DELTA_SW
mov t, not FileABB
and b, t
shr b, 9
else
err 'delta in shift_bb strange'
end if
end macro
macro attacks_from_pawn color, res, square
if color = White
mov res, qword[WhitePawnAttacks+8*square]
else if color = Black
mov res, qword[BlackPawnAttacks+8*square]
else
err 'color in attacks_from_pawn strange'
end if
end macro
macro CastlingJmp Rights, JmpTrue, JmpFalse
; in: rbp address of Pos
; r13 their pieces
; r14 all pieces
; out eax = 0 if castling is illegal
; eax = -1 if castling is legal
; assumed to have passed path test and rights test
local ksq_loop
mov rax, qword[rbp+Pos.typeBB+8*Pawn]
or rax, qword[rbp+Pos.typeBB+8*King]
and rax, r13
test rax, qword[rbp-Thread.rootPos+Thread.castling_kingpawns+8*(Rights)]
jnz JmpFalse
mov rdx, qword[rbp+Pos.typeBB+8*Knight]
and rdx, r13
test rdx, qword[rbp-Thread.rootPos+Thread.castling_knights+8*(Rights)]
jnz JmpFalse
movzx r11d, byte[rbp-Thread.rootPos+Thread.castling_ksqpath+8*(Rights)]
mov r10, qword[rbp+Pos.typeBB+8*Rook]
or r10, qword[rbp+Pos.typeBB+8*Queen]
and r10, r13
mov r9, qword[rbp+Pos.typeBB+8*Bishop]
or r9, qword[rbp+Pos.typeBB+8*Queen]
and r9, r13
movzx eax, byte[rbp-Thread.rootPos+Thread.castling_rfrom+Rights]
mov rdx, r14
btr rdx, rax
RookAttacks rax, 56*(((Rights) and 2) shr 1)+(((Rights) and 1) xor 1)*(SQ_G1-SQ_C1)+SQ_C1, rdx, r8
test rax, r10
jnz JmpFalse
test r11d, r11d
jz JmpTrue
ksq_loop:
movzx edx, byte[rbp-Thread.rootPos+Thread.castling_ksqpath+8*(Rights)+r11]
RookAttacks rax, rdx, r14, r8
test rax, r10
jnz JmpFalse
BishopAttacks rax, rdx, r14, r8
test rax, r9
jnz JmpFalse
sub r11d, 1
jnz ksq_loop
end macro
macro generate_promotions Type, Delta, pon7, target
local Outer, OuterDone, Inner, InnerDone
if Type = QUIET_CHECKS
movzx eax, byte [rbx+State.ksq]
xor ecx, ecx
bts rcx, rax
end if
mov rsi, pon7
ShiftBB Delta, rsi, rdx
and rsi, target
jz OuterDone
Outer:
bsf rdx, rsi
if Type = CAPTURES | Type = EVASIONS | Type = NON_EVASIONS
imul eax, edx, 65
add eax, 64*64*(MOVE_TYPE_PROM+3) - 64*Delta
mov dword[rdi], eax
lea rdi, [rdi+sizeof.ExtMove]
end if
if Type = QUIETS | Type = EVASIONS | Type = NON_EVASIONS
imul eax, edx, 65
add eax, 64*64*(MOVE_TYPE_PROM+2) - 64*Delta
mov dword[rdi+0*sizeof.ExtMove], eax
sub eax, 64*64*(1)
mov dword[rdi+1*sizeof.ExtMove], eax
sub eax, 64*64*(1)
mov dword[rdi+2*sizeof.ExtMove], eax
lea rdi, [rdi+3*sizeof.ExtMove]
end if
if Type = QUIET_CHECKS
imul eax, edx, 65
test rcx, qword[KnightAttacks+8*rdx]
jz InnerDone
add eax, 64*64*(MOVE_TYPE_PROM+0) - 64*Delta
mov dword[rdi], eax
lea rdi, [rdi+sizeof.ExtMove]
end if
InnerDone:
_blsr rsi, rsi, rax
jnz Outer
OuterDone:
end macro
; generate_pawn_jmp generates targets for uncommon operations in pawn move gen
; first we have promotions
; then ep captures
macro generate_pawn_jmp Us, Type
local Them, TRank8BB, TRank7BB, TRank3BB, Up, Right, Left
local b1, b2, eS, pawnsNotOn7, pawnsOn7, enemies
b1 equ r8
b2 equ r9
eS equ r10
pawnsNotOn7 equ r11
pawnsOn7 equ r12
enemies equ r13
if Us = White
Them = Black
TRank8BB = Rank8BB
TRank7BB = Rank7BB
TRank3BB = Rank3BB
Up = DELTA_N
Right = DELTA_NE
Left = DELTA_NW
else
Them = White
TRank8BB = Rank1BB
TRank7BB = Rank2BB
TRank3BB = Rank6BB
Up = DELTA_S
Right = DELTA_SW
Left = DELTA_SE
end if
calign 8
.CheckProm:
if Type = CAPTURES
mov eS, r14
not eS
else if Type = EVASIONS
and eS, r15
end if
generate_promotions Type, Right, pawnsOn7, enemies
generate_promotions Type, Left, pawnsOn7, enemies
generate_promotions Type, Up, pawnsOn7, eS
jmp .PromDone
if Type = CAPTURES | Type = EVASIONS | Type = NON_EVASIONS
calign 8
.CaptureEp:
bsf rax, b1
shl eax, 6
or eax, edx
mov dword[rdi], eax
lea rdi, [rdi+sizeof.ExtMove]
_blsr b1, b1, rcx
jnz .CaptureEp
jmp .CaptureEpDone
end if
end macro
macro generate_pawn_moves Us, Type
local Them, TRank8BB, TRank7BB, TRank3BB, Up, Right, Left
local b1, b2, eS, pawnsNotOn7, pawnsOn7, enemies
local SkipDCPawns, SinglePush, SinglePushDone, DoublePush, DoublePushDone
local CaptureRight, CaptureRightDone, CaptureLeft, CaptureLeftDone
if Us = White
Them = Black
TRank8BB = Rank8BB
TRank7BB = Rank7BB
TRank3BB = Rank3BB
Up = DELTA_N
Right = DELTA_NE
Left = DELTA_NW
else
Them = White
TRank8BB = Rank1BB
TRank7BB = Rank2BB
TRank3BB = Rank6BB
Up = DELTA_S
Right = DELTA_SW
Left = DELTA_SE
end if
b1 equ r8
b2 equ r9
eS equ r10
pawnsNotOn7 equ r11
pawnsOn7 equ r12
enemies equ r13
mov rax, qword[rbp+Pos.typeBB+8*Pawn]
and rax, qword[rbp+Pos.typeBB+8*Us]
mov pawnsOn7, TRank7BB
_andn pawnsNotOn7, pawnsOn7, rax
and pawnsOn7, rax
if Type = EVASIONS
mov enemies, qword[rbp+Pos.typeBB+8*Them]
and enemies, r15
else if Type = CAPTURES
mov enemies, r15
else
mov enemies, qword[rbp+Pos.typeBB+8*Them]
end if
; Single and double pawn pushes, no promotions
if Type <> CAPTURES
if Type = QUIETS | Type = QUIET_CHECKS
mov eS, r15
else
mov eS, r14
not eS
end if
mov b1, pawnsNotOn7
ShiftBB Up, b1, rax
and b1, eS
mov b2, TRank3BB
and b2, b1
ShiftBB Up, b2, rax
and b2, eS
if Type = EVASIONS
and b1, r15
and b2, r15
end if
if Type = QUIET_CHECKS
movzx edx, byte[rbx+State.ksq]
attacks_from_pawn Them, rax, rdx
and b1, rax
and b2, rax
and rdx, 7
mov rax, pawnsNotOn7
mov rcx, qword [FileBB+8*rdx]
_andn rcx, rcx, eS
and rax, qword[rbx+State.dcCandidates]
jz SkipDCPawns
ShiftBB Up, rax, rdx
and rax, rcx
mov rcx, TRank3BB
and rcx, rax
ShiftBB Up, rcx, rdx
and rcx, eS
or b1, rax
or b2, rcx
SkipDCPawns:
end if
test b1, b1
jz SinglePushDone
SinglePush:
bsf rax, b1
imul eax, (1 shl 6) + (1 shl 0)
sub eax, (Up shl 6) + (0 shl 0)
mov dword[rdi], eax
lea rdi, [rdi+sizeof.ExtMove]
_blsr b1, b1, rcx
jnz SinglePush
SinglePushDone:
test b2, b2
jz DoublePushDone
DoublePush:
bsf rax, b2
imul eax, (1 shl 6) + (1 shl 0)
sub eax, ((Up+Up) shl 6)
mov dword[rdi], eax
lea rdi, [rdi+sizeof.ExtMove]
_blsr b2, b2, rcx
jnz DoublePush
DoublePushDone:
end if
if Type = EVASIONS
mov rax, TRank8BB
test pawnsOn7, pawnsOn7
jz .PromDone
test rax, r15
jnz .CheckProm
else
mov rax, TRank8BB
test pawnsOn7, pawnsOn7
jnz .CheckProm
end if
.PromDone:
if Type = CAPTURES | Type = EVASIONS | Type = NON_EVASIONS
mov b1, pawnsNotOn7
mov b2, pawnsNotOn7
ShiftBB Right, b1, rax
ShiftBB Left, b2, rax
and b1, enemies
and b2, enemies
test b1, b1
jz CaptureRightDone
CaptureRight:
bsf rax, b1
imul eax, (1 shl 6) + (1 shl 0)
sub eax, (Right shl 6) + (0 shl 0)
mov dword[rdi], eax
lea rdi, [rdi+sizeof.ExtMove]
_blsr b1, b1, rcx
jnz CaptureRight
CaptureRightDone:
test b2, b2
jz CaptureLeftDone
CaptureLeft:
bsf rax, b2
imul eax, (1 shl 6) + (1 shl 0)
sub eax, (Left shl 6) + (0 shl 0)
mov dword[rdi], eax
lea rdi, [rdi+sizeof.ExtMove]
_blsr b2, b2, rcx
jnz CaptureLeft
CaptureLeftDone:
movzx edx, byte[rbx+State.epSquare]
lea eax, [rdx-Up]
cmp edx, 64
jae .CaptureEpDone
if Type = EVASIONS
bt r15, rax
jnc .CaptureEpDone
end if
attacks_from_pawn Them, b1, rdx
or edx, MOVE_TYPE_EPCAP shl 12
and b1, pawnsNotOn7
jnz .CaptureEp
.CaptureEpDone:
end if
end macro
; generate moves Knight, Bishop, Rook, and Queen
macro generate_moves Us, Pt, Checks
local Outer, OuterDone, Inner, InnerDone
lea r11, [rbp+Pos.pieceList+16*(8*Us+Pt)]
movzx edx, byte[r11]
cmp edx, 64
jae OuterDone
Outer:
if Checks = QUIET_CHECKS
mov r10, qword[rbx+State.checkSq+8*Pt]
mov rsi, qword[rbx+State.dcCandidates]
if Pt = Bishop
mov rax, qword[BishopAttacksPDEP+8*rdx]
and rax, r10
test rax, r15
jz InnerDone
else if Pt = Rook
mov rax, qword[RookAttacksPDEP+8*rdx]
and rax, r10
test rax, r15
jz InnerDone
else if Pt = Queen
mov rax, qword[BishopAttacksPDEP+8*rdx]
or rax, qword[RookAttacksPDEP+8*rdx]
and rax, r10
test rax, r15
jz InnerDone
end if
bt rsi, rdx
jc InnerDone
if Pt = Knight
mov rsi, qword[KnightAttacks+8*rdx]
else if Pt = Bishop
BishopAttacks rsi, rdx, r14, rax
else if Pt = Rook
RookAttacks rsi, rdx, r14, rax
else if Pt = Queen
BishopAttacks rsi, rdx, r14, rax
RookAttacks r9, rdx, r14, rax
or rsi, r9
end if
else
if Pt = Knight
mov rsi, qword[KnightAttacks+8*rdx]
else if Pt = Bishop
BishopAttacks rsi, rdx, r14, rax
else if Pt = Rook
RookAttacks rsi, rdx, r14, rax
else if Pt = Queen
BishopAttacks rsi, rdx, r14, rax
RookAttacks r9, rdx, r14, rax
or rsi, r9
end if
end if
if Checks = QUIET_CHECKS
and rsi, r10
end if
shl edx, 6
and rsi, r15
jz InnerDone
Inner:
bsf rax, rsi
or eax, edx
mov dword[rdi], eax
lea rdi, [rdi+sizeof.ExtMove]
_blsr rsi, rsi, rax
jnz Inner
InnerDone:
add r11, 1
movzx edx, byte[r11]
cmp edx, 64
jb Outer
OuterDone:
end macro
; generate_jmp generates targets for uncommon operations in move gen
; first we do castling and then generate_pawn_jmp
macro generate_jmp Us, Type
local CastlingOODone, CastlingOOGood, CastlingOOOGood
local CheckOOQuiteCheck, CheckOOOQuiteCheck
if Type <> CAPTURES & Type <> EVASIONS
calign 8
.CastlingOO:
if Type = NON_EVASIONS
CastlingJmp (2*Us+0), CastlingOOGood, CastlingOODone
CastlingOOGood:
mov eax, dword[rbp-Thread.rootPos+Thread.castling_movgen+4*(2*Us+0)]
mov dword[rdi], eax
lea rdi, [rdi+sizeof.ExtMove]
else
if Us = White
call CastleOOLegal_White
else
call CastleOOLegal_Black
end if
if Type eq QUIET_CHECKS
mov ecx, dword[rbp-Thread.rootPos+Thread.castling_movgen+4*(2*Us+0)]
mov dword[rdi], ecx
test eax, eax
jnz CheckOOQuiteCheck
else
and eax, sizeof.ExtMove
mov ecx, dword[rbp-Thread.rootPos+Thread.castling_movgen+4*(2*Us+0)]
mov dword[rdi], ecx
add rdi, rax
end if
end if
CastlingOODone:
movzx eax, byte[rbx+State.castlingRights]
mov rcx, qword[rbp-Thread.rootPos+Thread.castling_path+8*(2*Us+1)]
and eax, 2 shl (2*Us)
xor eax, 2 shl (2*Us)
and rcx, r14
or rax, rcx
jnz .CastlingDone
.CastlingOOO:
if Type = NON_EVASIONS
CastlingJmp (2*Us+1), CastlingOOOGood, .CastlingDone
CastlingOOOGood:
mov eax, dword[rbp-Thread.rootPos+Thread.castling_movgen+4*(2*Us+1)]
mov dword[rdi], eax
lea rdi, [rdi+sizeof.ExtMove]
jmp .CastlingDone
else
if Us eq White
call CastleOOOLegal_White
else if Us eq Black
call CastleOOOLegal_Black
end if
if Type eq QUIET_CHECKS
mov ecx, dword[rbp-Thread.rootPos+Thread.castling_movgen+4*(2*Us+1)]
test eax, eax
mov dword[rdi], ecx
jnz CheckOOOQuiteCheck
jmp .CastlingDone
else
and eax, sizeof.ExtMove
mov ecx, dword[rbp-Thread.rootPos+Thread.castling_movgen+4*(2*Us+1)]
mov dword[rdi], ecx
add rdi, rax
jmp .CastlingDone
end if
end if
if Type = QUIET_CHECKS
calign 8
CheckOOQuiteCheck:
call Move_GivesCheck
and eax, 8
add rdi, rax
jmp CastlingOODone
calign 8
CheckOOOQuiteCheck:
call Move_GivesCheck
and eax, 8
add rdi, rax
jmp .CastlingDone
end if
end if
generate_pawn_jmp Us, Type
end macro
macro generate_all Us, Type
local KingMoves, KingMovesDone
generate_pawn_moves Us, Type
generate_moves Us, Knight, Type
generate_moves Us, Bishop, Type
generate_moves Us, Rook, Type
generate_moves Us, Queen, Type
if Type <> CAPTURES & Type <> EVASIONS
movzx r9d, byte[rbx+State.castlingRights]
mov r10, qword[rbp-Thread.rootPos+Thread.castling_path+8*(2*Us+0)]
mov r11, qword[rbp-Thread.rootPos+Thread.castling_path+8*(2*Us+1)]
and r10, r14
and r11, r14
end if
if Type <> QUIET_CHECKS & Type <> EVASIONS
mov rsi, qword[rbp+Pos.typeBB+8*King]
and rsi, qword[rbp+Pos.typeBB+8*Us]
bsf rdx, rsi
mov rcx, qword[KingAttacks+8*rdx]
shl edx, 6
and rcx, r15
jz KingMovesDone
KingMoves:
bsf rax, rcx
or eax, edx
mov dword[rdi], eax
lea rdi, [rdi+sizeof.ExtMove]
_blsr rcx, rcx, r8
jnz KingMoves
KingMovesDone:
end if
if Type <> CAPTURES & Type <> EVASIONS
; check for castling; since this is rare, the castling functions are included in generate_jmp
mov edx, r9d
and r9d, 1 shl (2*Us)
xor r9d, 1 shl (2*Us)
and edx, 2 shl (2*Us)
xor edx, 2 shl (2*Us)
mov r13, qword[rbp+Pos.typeBB+8*(Us xor 1)]
or r9, r10
jz .CastlingOO
or rdx, r11
jz .CastlingOOO
.CastlingDone:
end if
end macro
| 29.35689 | 104 | 0.538637 |
fc95105c14f1f16e13908f627e0b65570917b911 | 19,863 | asm | Assembly | Dump (complete other files)/GPS Code/Propeller Code/28509-PAM-7Q-gps_example_c_v1.0/gps_example_c/libgps/cmm/Simple_NMEA_Parser.asm | Mauvai/Quadcopter-FYP-legacy | 161f2842d06d30aad06895efa198dc0ee28a27c2 | [
"MIT"
] | null | null | null | Dump (complete other files)/GPS Code/Propeller Code/28509-PAM-7Q-gps_example_c_v1.0/gps_example_c/libgps/cmm/Simple_NMEA_Parser.asm | Mauvai/Quadcopter-FYP-legacy | 161f2842d06d30aad06895efa198dc0ee28a27c2 | [
"MIT"
] | null | null | null | Dump (complete other files)/GPS Code/Propeller Code/28509-PAM-7Q-gps_example_c_v1.0/gps_example_c/libgps/cmm/Simple_NMEA_Parser.asm | Mauvai/Quadcopter-FYP-legacy | 161f2842d06d30aad06895efa198dc0ee28a27c2 | [
"MIT"
] | null | null | null | GNU assembler version 2.21 (propeller-elf)
using BFD version (propellergcc_v1_0_0_2162) 2.21.
options passed : -lmm -cmm -ahdlnsg=cmm/Simple_NMEA_Parser.asm
input file : C:\Users\dharris\AppData\Local\Temp\ccGb5XHD.s
output file : cmm/Simple_NMEA_Parser.o
target : propeller-parallax-elf
time stamp :
1 .text
2 .Ltext0
3 .global _gps_start
4 _gps_start
5 .LFB1
6 .file 1 "Simple_NMEA_Parser.c"
1:Simple_NMEA_Parser.c **** /*
2:Simple_NMEA_Parser.c ****
3:Simple_NMEA_Parser.c **** Simple_NMEA_Parser.c
4:Simple_NMEA_Parser.c ****
5:Simple_NMEA_Parser.c **** This library provides basic NMEA parsing capabilities. It is designed to take raw NMEA strings,
6:Simple_NMEA_Parser.c **** parse the data out of them, and make the data available to a parent application.
7:Simple_NMEA_Parser.c ****
8:Simple_NMEA_Parser.c **** */
9:Simple_NMEA_Parser.c ****
10:Simple_NMEA_Parser.c **** #include "simpletools.h"
11:Simple_NMEA_Parser.c **** #include "fdserial.h"
12:Simple_NMEA_Parser.c ****
13:Simple_NMEA_Parser.c **** #define INBUFF_SIZE 128
14:Simple_NMEA_Parser.c ****
15:Simple_NMEA_Parser.c **** //Type definitions
16:Simple_NMEA_Parser.c **** typedef unsigned char byte;
17:Simple_NMEA_Parser.c ****
18:Simple_NMEA_Parser.c **** typedef struct nmea_data_s
19:Simple_NMEA_Parser.c **** {
20:Simple_NMEA_Parser.c **** int fix; //fix quality, 0=invalid, 1=GPS, 2=DGPS, etc...
21:Simple_NMEA_Parser.c **** float lat_dds; //current latitude in decimal degress
22:Simple_NMEA_Parser.c **** float lon_dds; //current longitude in decimal degrees
23:Simple_NMEA_Parser.c **** int sats_tracked; //current number of satellites tracked by the GPS
24:Simple_NMEA_Parser.c **** int altitude; //current altitude, in meters
25:Simple_NMEA_Parser.c **** float heading; //current direction of travel, in degrees
26:Simple_NMEA_Parser.c **** float velocity; //current speed if travel, in knots
27:Simple_NMEA_Parser.c **** int date; //current date, raw format
28:Simple_NMEA_Parser.c **** int time; //current UTC time, raw format
29:Simple_NMEA_Parser.c **** int mag_var; //current magnetic variation
30:Simple_NMEA_Parser.c ****
31:Simple_NMEA_Parser.c **** } nmea_data;
32:Simple_NMEA_Parser.c ****
33:Simple_NMEA_Parser.c ****
34:Simple_NMEA_Parser.c **** //Function Prototypes
35:Simple_NMEA_Parser.c **** void gps_run(void *par);
36:Simple_NMEA_Parser.c **** void ParseGGA(int, byte *);
37:Simple_NMEA_Parser.c **** void ParseRMC(int, byte *);
38:Simple_NMEA_Parser.c ****
39:Simple_NMEA_Parser.c ****
40:Simple_NMEA_Parser.c **** //Global variable declarations
41:Simple_NMEA_Parser.c **** int _gps_rx_pin, _gps_baud;
42:Simple_NMEA_Parser.c **** nmea_data gps_data;
43:Simple_NMEA_Parser.c ****
44:Simple_NMEA_Parser.c **** byte tempBuff[16];
45:Simple_NMEA_Parser.c ****
46:Simple_NMEA_Parser.c ****
47:Simple_NMEA_Parser.c **** unsigned char *gps_start(int gps_rx_pin, int gps_baud)
48:Simple_NMEA_Parser.c **** {
7 .loc 1 48 0
8 .LVL0
9 0000 031F lpushm #16+15
10 .LCFI0
49:Simple_NMEA_Parser.c ****
50:Simple_NMEA_Parser.c **** _gps_rx_pin = gps_rx_pin;
11 .loc 1 50 0
12 0002 670000 mviw r7,#__gps_rx_pin
13 0005 107F wrlong r0, r7
51:Simple_NMEA_Parser.c **** _gps_baud = gps_baud;
14 .loc 1 51 0
15 0007 670000 mviw r7,#__gps_baud
52:Simple_NMEA_Parser.c ****
53:Simple_NMEA_Parser.c ****
54:Simple_NMEA_Parser.c ****
55:Simple_NMEA_Parser.c **** cog_run(&gps_run, 50);
16 .loc 1 55 0
17 000a 600000 mviw r0,#_gps_run
18 .LVL1
51:Simple_NMEA_Parser.c **** _gps_baud = gps_baud;
19 .loc 1 51 0
20 000d 117F wrlong r1, r7
21 .loc 1 55 0
22 000f A132 mov r1, #50
23 .LVL2
24 0011 060000 lcall #_cog_run
25 .LVL3
56:Simple_NMEA_Parser.c ****
57:Simple_NMEA_Parser.c **** return tempBuff;
58:Simple_NMEA_Parser.c ****
59:Simple_NMEA_Parser.c **** }
26 .loc 1 59 0
27 0014 600000 mviw r0,#_tempBuff
28 0017 051F lpopret #16+15
29 .LFE1
30 .global _ParseGGA
31 _ParseGGA
32 .LFB3
60:Simple_NMEA_Parser.c ****
61:Simple_NMEA_Parser.c **** void gps_run(void *par)
62:Simple_NMEA_Parser.c **** {
63:Simple_NMEA_Parser.c ****
64:Simple_NMEA_Parser.c **** const char gprmc_str[] = "GPRMC";
65:Simple_NMEA_Parser.c **** const char gpgga_str[] = "GPGGA";
66:Simple_NMEA_Parser.c **** fdserial *gps_ser;
67:Simple_NMEA_Parser.c **** byte ch;
68:Simple_NMEA_Parser.c **** byte inBuff[INBUFF_SIZE];
69:Simple_NMEA_Parser.c **** byte tempBuff[16];
70:Simple_NMEA_Parser.c **** int idx, j;
71:Simple_NMEA_Parser.c ****
72:Simple_NMEA_Parser.c ****
73:Simple_NMEA_Parser.c ****
74:Simple_NMEA_Parser.c **** memset(inBuff, 0, INBUFF_SIZE);
75:Simple_NMEA_Parser.c **** memset(tempBuff, 0, 16);
76:Simple_NMEA_Parser.c ****
77:Simple_NMEA_Parser.c **** low(26);
78:Simple_NMEA_Parser.c ****
79:Simple_NMEA_Parser.c **** gps_ser = fdserial_open(_gps_rx_pin, 1, 0, _gps_baud);
80:Simple_NMEA_Parser.c **** for(;;)
81:Simple_NMEA_Parser.c **** {
82:Simple_NMEA_Parser.c **** ch = fdserial_rxChar(gps_ser);
83:Simple_NMEA_Parser.c ****
84:Simple_NMEA_Parser.c **** if(ch != '$')
85:Simple_NMEA_Parser.c **** continue;
86:Simple_NMEA_Parser.c ****
87:Simple_NMEA_Parser.c **** // memset(inBuff, 0, INBUFF_SIZE);
88:Simple_NMEA_Parser.c **** idx = 0;
89:Simple_NMEA_Parser.c **** do
90:Simple_NMEA_Parser.c **** {
91:Simple_NMEA_Parser.c **** ch = fdserial_rxChar(gps_ser);
92:Simple_NMEA_Parser.c **** inBuff[idx++] = ch;
93:Simple_NMEA_Parser.c ****
94:Simple_NMEA_Parser.c **** }while(ch != 13);
95:Simple_NMEA_Parser.c ****
96:Simple_NMEA_Parser.c **** inBuff[idx] = 0; //null terminate
97:Simple_NMEA_Parser.c ****
98:Simple_NMEA_Parser.c **** //parse out the first field
99:Simple_NMEA_Parser.c **** idx=0; //reset buffer offset pointer
100:Simple_NMEA_Parser.c **** for(j=0; inBuff[idx]!=',' || j>=15; idx++,j++)
101:Simple_NMEA_Parser.c **** tempBuff[j] = inBuff[idx];
102:Simple_NMEA_Parser.c ****
103:Simple_NMEA_Parser.c **** tempBuff[j]=0; //null terminate
104:Simple_NMEA_Parser.c ****
105:Simple_NMEA_Parser.c **** if(strcmp(gprmc_str, tempBuff)==0)
106:Simple_NMEA_Parser.c **** ParseRMC(idx, inBuff);
107:Simple_NMEA_Parser.c **** if(strcmp(gpgga_str, tempBuff)==0)
108:Simple_NMEA_Parser.c **** ParseGGA(idx, inBuff);
109:Simple_NMEA_Parser.c ****
110:Simple_NMEA_Parser.c ****
111:Simple_NMEA_Parser.c ****
112:Simple_NMEA_Parser.c **** }
113:Simple_NMEA_Parser.c ****
114:Simple_NMEA_Parser.c **** }
115:Simple_NMEA_Parser.c ****
116:Simple_NMEA_Parser.c **** void ParseGGA(int idx, byte *buff)
117:Simple_NMEA_Parser.c **** {
33 .loc 1 117 0
34 .LVL4
118:Simple_NMEA_Parser.c **** int j;
119:Simple_NMEA_Parser.c ****
120:Simple_NMEA_Parser.c **** idx++;
121:Simple_NMEA_Parser.c **** for(j=0; buff[idx]!=',' || j>=15; idx++,j++)
35 .loc 1 121 0
36 0019 B7 mov r7, #0
116:Simple_NMEA_Parser.c **** void ParseGGA(int idx, byte *buff)
37 .loc 1 116 0
38 001a 1100 add r1, r0
39 .LVL5
40 001c 650000 mviw r5,#_tempBuff
41 .loc 1 121 0
42 001f 7F07 brs #.L3
43 .LVL6
44 .L4
116:Simple_NMEA_Parser.c **** void ParseGGA(int idx, byte *buff)
45 .loc 1 116 0 discriminator 2
46 0021 D44570 xmov r4,r5 add r4,r7
47 .loc 1 121 0 discriminator 2
48 0024 2710 add r7, #1
49 .LVL7
122:Simple_NMEA_Parser.c **** tempBuff[j] = buff[idx];
50 .loc 1 122 0 discriminator 2
51 0026 164E wrbyte r6, r4
52 .LVL8
53 .L3
116:Simple_NMEA_Parser.c **** void ParseGGA(int idx, byte *buff)
54 .loc 1 116 0 discriminator 1
55 0028 D66170 xmov r6,r1 add r6,r7
56 002b 2610 add r6, #1
121:Simple_NMEA_Parser.c **** for(j=0; buff[idx]!=',' || j>=15; idx++,j++)
57 .loc 1 121 0 discriminator 1
58 002d 166C rdbyte r6, r6
59 002f 362C20 cmps r6, #44 wz,wc
60 0032 75ED IF_NE brs #.L4
61 0034 27F2 cmps r7, #15 wz,wc
62 0036 73E9 IF_AE brs #.L4
123:Simple_NMEA_Parser.c ****
124:Simple_NMEA_Parser.c **** tempBuff[j]=0; //null terminate
63 .loc 1 124 0
64 0038 660000 mviw r6,#_tempBuff
65 003b 1670 add r6, r7
66 003d B7 mov r7, #0
67 .LVL9
68 003e 176E wrbyte r7, r6
125:Simple_NMEA_Parser.c ****
126:Simple_NMEA_Parser.c ****
127:Simple_NMEA_Parser.c ****
128:Simple_NMEA_Parser.c ****
129:Simple_NMEA_Parser.c **** }
69 .loc 1 129 0
70 0040 02 lret
71 .LFE3
72 .global _gps_run
73 _gps_run
74 .LFB2
62:Simple_NMEA_Parser.c **** {
75 .loc 1 62 0
76 .LVL10
77 0041 034C lpushm #(4<<4)+12
78 .LCFI1
79 0043 F3982084 sub sp, #152
80 .LCFI2
65:Simple_NMEA_Parser.c **** const char gpgga_str[] = "GPGGA";
81 .loc 1 65 0
82 0047 56475047 mvi r6,#1195855943
82 47
74:Simple_NMEA_Parser.c **** memset(inBuff, 0, INBUFF_SIZE);
83 .loc 1 74 0
84 004c B1 mov r1, #0
65:Simple_NMEA_Parser.c **** const char gpgga_str[] = "GPGGA";
85 .loc 1 65 0
86 004d C704 leasp r7,#4
74:Simple_NMEA_Parser.c **** memset(inBuff, 0, INBUFF_SIZE);
87 .loc 1 74 0
88 004f CD18 leasp r13,#24
65:Simple_NMEA_Parser.c **** const char gpgga_str[] = "GPGGA";
89 .loc 1 65 0
90 0051 F0100C08 wrlong r6, sp
91 0055 A641 mov r6, #65
74:Simple_NMEA_Parser.c **** memset(inBuff, 0, INBUFF_SIZE);
92 .loc 1 74 0
93 0057 A280 mov r2, #128
65:Simple_NMEA_Parser.c **** const char gpgga_str[] = "GPGGA";
94 .loc 1 65 0
95 0059 F0070C04 wrword r6, r7
74:Simple_NMEA_Parser.c **** memset(inBuff, 0, INBUFF_SIZE);
96 .loc 1 74 0
97 005d 0A0D mov r0, r13
98 .LVL11
99 005f 060000 lcall #_memset
75:Simple_NMEA_Parser.c **** memset(tempBuff, 0, 16);
100 .loc 1 75 0
101 0062 B1 mov r1, #0
102 0063 A210 mov r2, #16
103 0065 C008 leasp r0,#8
104 0067 060000 lcall #_memset
77:Simple_NMEA_Parser.c **** low(26);
105 .loc 1 77 0
106 006a A01A mov r0, #26
107 006c 060000 lcall #_low
79:Simple_NMEA_Parser.c **** gps_ser = fdserial_open(_gps_rx_pin, 1, 0, _gps_baud);
108 .loc 1 79 0
109 006f 670000 mviw r7,#__gps_rx_pin
110 0072 A101 mov r1, #1
111 0074 B2 mov r2, #0
112 0075 107D rdlong r0, r7
113 0077 670000 mviw r7,#__gps_baud
114 007a 137D rdlong r3, r7
115 007c 060000 lcall #_fdserial_open
116 007f 0AC0 mov r12, r0
117 .LVL12
118 .L15
82:Simple_NMEA_Parser.c **** ch = fdserial_rxChar(gps_ser);
119 .loc 1 82 0
120 0081 0A0C mov r0, r12
121 0083 060000 lcall #_fdserial_rxChar
122 .LVL13
84:Simple_NMEA_Parser.c **** if(ch != '$')
123 .loc 1 84 0
124 0086 30FF40 and r0,#255
125 .LVL14
126 0089 302420 cmps r0, #36 wz,wc
127 008c 75F3 IF_NE brs #.L15
128 008e BE mov r14, #0
129 .L7
130 .LVL15
91:Simple_NMEA_Parser.c **** ch = fdserial_rxChar(gps_ser);
131 .loc 1 91 0 discriminator 1
132 008f 0A0C mov r0, r12
133 0091 060000 lcall #_fdserial_rxChar
61:Simple_NMEA_Parser.c **** void gps_run(void *par)
134 .loc 1 61 0 discriminator 1
135 0094 0A7D mov r7, r13
91:Simple_NMEA_Parser.c **** ch = fdserial_rxChar(gps_ser);
136 .loc 1 91 0 discriminator 1
137 0096 30FF40 and r0,#255
138 .LVL16
61:Simple_NMEA_Parser.c **** void gps_run(void *par)
139 .loc 1 61 0 discriminator 1
140 0099 17E0 add r7, r14
94:Simple_NMEA_Parser.c **** }while(ch != 13);
141 .loc 1 94 0 discriminator 1
142 009b 20D2 cmps r0, #13 wz,wc
92:Simple_NMEA_Parser.c **** inBuff[idx++] = ch;
143 .loc 1 92 0 discriminator 1
144 009d 2E10 add r14, #1
145 .LVL17
146 009f 107E wrbyte r0, r7
94:Simple_NMEA_Parser.c **** }while(ch != 13);
147 .loc 1 94 0 discriminator 1
148 00a1 75EC IF_NE brs #.L7
96:Simple_NMEA_Parser.c **** inBuff[idx] = 0; //null terminate
149 .loc 1 96 0
150 00a3 1ED0 add r14, r13
151 .LVL18
152 00a5 B7 mov r7, #0
153 00a6 17EE wrbyte r7, r14
154 .LVL19
99:Simple_NMEA_Parser.c **** idx=0; //reset buffer offset pointer
155 .loc 1 99 0
156 00a8 BE mov r14, #0
100:Simple_NMEA_Parser.c **** for(j=0; inBuff[idx]!=',' || j>=15; idx++,j++)
157 .loc 1 100 0
158 00a9 7F08 brs #.L8
159 .LVL20
160 .L9
61:Simple_NMEA_Parser.c **** void gps_run(void *par)
161 .loc 1 61 0 discriminator 2
162 00ab C608 leasp r6,#8
163 00ad 16E0 add r6, r14
100:Simple_NMEA_Parser.c **** for(j=0; inBuff[idx]!=',' || j>=15; idx++,j++)
164 .loc 1 100 0 discriminator 2
165 00af 2E10 add r14, #1
166 .LVL21
101:Simple_NMEA_Parser.c **** tempBuff[j] = inBuff[idx];
167 .loc 1 101 0 discriminator 2
168 00b1 176E wrbyte r7, r6
169 .LVL22
170 .L8
61:Simple_NMEA_Parser.c **** void gps_run(void *par)
171 .loc 1 61 0 discriminator 1
172 00b3 D77DE0 xmov r7,r13 add r7,r14
100:Simple_NMEA_Parser.c **** for(j=0; inBuff[idx]!=',' || j>=15; idx++,j++)
173 .loc 1 100 0 discriminator 1
174 00b6 177C rdbyte r7, r7
175 00b8 372C20 cmps r7, #44 wz,wc
176 00bb 75EE IF_NE brs #.L9
177 00bd 2EF2 cmps r14, #15 wz,wc
178 00bf 73EA IF_AE brs #.L9
103:Simple_NMEA_Parser.c **** tempBuff[j]=0; //null terminate
179 .loc 1 103 0
180 00c1 C708 leasp r7,#8
181 00c3 17E0 add r7, r14
182 00c5 B6 mov r6, #0
107:Simple_NMEA_Parser.c **** if(strcmp(gpgga_str, tempBuff)==0)
183 .loc 1 107 0
184 00c6 F21000A0 mov r0, sp
185 .LVL23
186 00ca C108 leasp r1,#8
103:Simple_NMEA_Parser.c **** tempBuff[j]=0; //null terminate
187 .loc 1 103 0
188 00cc 167E wrbyte r6, r7
107:Simple_NMEA_Parser.c **** if(strcmp(gpgga_str, tempBuff)==0)
189 .loc 1 107 0
190 00ce 060000 lcall #_strcmp
191 00d1 2002 cmps r0, #0 wz,wc
192 00d3 450000 IF_NE brw #.L15
108:Simple_NMEA_Parser.c **** ParseGGA(idx, inBuff);
193 .loc 1 108 0
194 00d6 0B0E1D xmov r0,r14 mov r1,r13
195 00d9 060000 lcall #_ParseGGA
196 00dc 4F0000 brw #.L15
197 .LFE2
198 .global _ParseRMC
199 _ParseRMC
200 .LFB4
130:Simple_NMEA_Parser.c ****
131:Simple_NMEA_Parser.c **** void ParseRMC(int idx, byte *buff)
132:Simple_NMEA_Parser.c **** {
201 .loc 1 132 0
202 .LVL24
133:Simple_NMEA_Parser.c ****
134:Simple_NMEA_Parser.c **** }
203 .loc 1 134 0
204 00df 02 lret
205 .LFE4
206 .comm _tempBuff,16,4
207 .comm _gps_data,40,4
208 .comm __gps_baud,4,4
209 .comm __gps_rx_pin,4,4
277 .Letext0
278 .file 2 "C:/Users/dharris/Documents/SimpleIDE/Learn/Simple Libraries/TextDevices/libsimpletext/sim
279 .file 3 "C:/Users/dharris/Documents/SimpleIDE/Learn/Simple Libraries/TextDevices/libfdserial/fdser
DEFINED SYMBOLS
C:\Users\dharris\AppData\Local\Temp\ccGb5XHD.s:2 .text:00000000 .Ltext0
C:\Users\dharris\AppData\Local\Temp\ccGb5XHD.s:4 .text:00000000 _gps_start
C:\Users\dharris\AppData\Local\Temp\ccGb5XHD.s:5 .text:00000000 .LFB1
C:\Users\dharris\AppData\Local\Temp\ccGb5XHD.s:9 .text:00000000 L0
*COM*:00000004 __gps_rx_pin
*COM*:00000004 __gps_baud
C:\Users\dharris\AppData\Local\Temp\ccGb5XHD.s:73 .text:00000041 _gps_run
*COM*:00000010 _tempBuff
C:\Users\dharris\AppData\Local\Temp\ccGb5XHD.s:29 .text:00000019 .LFE1
C:\Users\dharris\AppData\Local\Temp\ccGb5XHD.s:31 .text:00000019 _ParseGGA
C:\Users\dharris\AppData\Local\Temp\ccGb5XHD.s:32 .text:00000019 .LFB3
C:\Users\dharris\AppData\Local\Temp\ccGb5XHD.s:71 .text:00000041 .LFE3
C:\Users\dharris\AppData\Local\Temp\ccGb5XHD.s:74 .text:00000041 .LFB2
C:\Users\dharris\AppData\Local\Temp\ccGb5XHD.s:118 .text:00000081 .L15
C:\Users\dharris\AppData\Local\Temp\ccGb5XHD.s:197 .text:000000df .LFE2
C:\Users\dharris\AppData\Local\Temp\ccGb5XHD.s:199 .text:000000df _ParseRMC
C:\Users\dharris\AppData\Local\Temp\ccGb5XHD.s:200 .text:000000df .LFB4
C:\Users\dharris\AppData\Local\Temp\ccGb5XHD.s:205 .text:000000e0 .LFE4
*COM*:00000028 _gps_data
C:\Users\dharris\AppData\Local\Temp\ccGb5XHD.s:211 .debug_frame:00000000 .Lframe0
C:\Users\dharris\AppData\Local\Temp\ccGb5XHD.s:277 .text:000000e0 .Letext0
C:\Users\dharris\AppData\Local\Temp\ccGb5XHD.s:281 .debug_info:00000000 .Ldebug_info0
C:\Users\dharris\AppData\Local\Temp\ccGb5XHD.s:797 .debug_abbrev:00000000 .Ldebug_abbrev0
C:\Users\dharris\AppData\Local\Temp\ccGb5XHD.s:1206 .debug_loc:00000000 .LLST0
C:\Users\dharris\AppData\Local\Temp\ccGb5XHD.s:1218 .debug_loc:00000022 .LLST1
C:\Users\dharris\AppData\Local\Temp\ccGb5XHD.s:1230 .debug_loc:00000044 .LLST2
C:\Users\dharris\AppData\Local\Temp\ccGb5XHD.s:1239 .debug_loc:00000059 .LLST3
C:\Users\dharris\AppData\Local\Temp\ccGb5XHD.s:1246 .debug_loc:0000006c .LLST4
C:\Users\dharris\AppData\Local\Temp\ccGb5XHD.s:1268 .debug_loc:000000a3 .LLST5
C:\Users\dharris\AppData\Local\Temp\ccGb5XHD.s:1286 .debug_loc:000000d0 .LLST6
C:\Users\dharris\AppData\Local\Temp\ccGb5XHD.s:1293 .debug_loc:000000e3 .LLST7
C:\Users\dharris\AppData\Local\Temp\ccGb5XHD.s:1304 .debug_loc:00000101 .LLST8
C:\Users\dharris\AppData\Local\Temp\ccGb5XHD.s:1320 .debug_loc:0000012b .LLST9
C:\Users\dharris\AppData\Local\Temp\ccGb5XHD.s:1355 .debug_line:00000000 .Ldebug_line0
C:\Users\dharris\AppData\Local\Temp\ccGb5XHD.s:1357 .debug_str:00000000 .LASF2
C:\Users\dharris\AppData\Local\Temp\ccGb5XHD.s:1359 .debug_str:0000000a .LASF0
C:\Users\dharris\AppData\Local\Temp\ccGb5XHD.s:1361 .debug_str:00000013 .LASF1
UNDEFINED SYMBOLS
_cog_run
_memset
_low
_fdserial_open
_fdserial_rxChar
_strcmp
| 45.040816 | 129 | 0.606756 |
5b7ca96cfdd0db55dd91771ca813e29067f46de7 | 5,387 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2.log_12435_26.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2.log_12435_26.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2.log_12435_26.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r11
push %r12
push %r14
push %rax
push %rcx
push %rdi
push %rsi
lea addresses_normal_ht+0xdbfe, %r11
nop
nop
dec %r12
mov $0x6162636465666768, %r14
movq %r14, %xmm1
movups %xmm1, (%r11)
sub $51701, %r10
lea addresses_WT_ht+0xdeff, %rsi
lea addresses_WT_ht+0xeb4e, %rdi
sub %rax, %rax
mov $73, %rcx
rep movsq
sub %r10, %r10
pop %rsi
pop %rdi
pop %rcx
pop %rax
pop %r14
pop %r12
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r14
push %r15
push %r9
push %rbx
push %rdi
push %rdx
// Store
lea addresses_D+0x13d2e, %rbx
add $54117, %r14
movw $0x5152, (%rbx)
nop
inc %r15
// Store
lea addresses_D+0x6d2e, %r9
sub $29195, %r10
movb $0x51, (%r9)
nop
nop
nop
nop
dec %rbx
// Store
mov $0xd3e08000000092e, %rbx
nop
nop
nop
nop
and $17533, %r9
mov $0x5152535455565758, %rdi
movq %rdi, (%rbx)
add $6434, %r9
// Load
lea addresses_WC+0x38ae, %rdx
clflush (%rdx)
nop
sub $38337, %r9
vmovntdqa (%rdx), %ymm1
vextracti128 $0, %ymm1, %xmm1
vpextrq $1, %xmm1, %r10
nop
xor $15429, %rdx
// Faulty Load
lea addresses_RW+0x1f12e, %r9
nop
nop
nop
xor $26248, %r14
mov (%r9), %rbx
lea oracles, %r15
and $0xff, %rbx
shlq $12, %rbx
mov (%r15,%rbx,1), %rbx
pop %rdx
pop %rdi
pop %rbx
pop %r9
pop %r15
pop %r14
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_RW', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 9, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 9, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_NC', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 11, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WC', 'size': 32, 'AVXalign': False, 'NT': True, 'congruent': 6, 'same': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_RW', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 4, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 5, 'same': False}}
{'32': 12435}
32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
*/
| 44.891667 | 2,999 | 0.656581 |
efa9f7aceef9037850203ed06db7632c0757e137 | 34,815 | asm | Assembly | Library/GrObj/GrObj/grobjOther.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 504 | 2018-11-18T03:35:53.000Z | 2022-03-29T01:02:51.000Z | Library/GrObj/GrObj/grobjOther.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 96 | 2018-11-19T21:06:50.000Z | 2022-03-06T10:26:48.000Z | Library/GrObj/GrObj/grobjOther.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 73 | 2018-11-19T20:46:53.000Z | 2022-03-29T00:59:26.000Z | COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) GeoWorks 1989 -- All Rights Reserved
PROJECT: PC GEOS
MODULE: Admin
FILE: objectOther.asm
AUTHOR: Steve Scholl, Nov 15, 1991
Routines:
Name Description
---- -----------
Method Handlers:
Name Description
---- -----------
GrObjGetCenter
GrObjEvaluateParentPoint
GrObjEvaluatePARENTPointForEdit
GrObjSetActionNotificationOutput
GrObjUnsuspendActionNotification
GrObjSuspendActionNotification
REVISION HISTORY:
Name Date Description
---- ---- -----------
Steve 11/15/91 Initial revision
DESCRIPTION:
$Id: grobjOther.asm,v 1.1 97/04/04 18:07:20 newdeal Exp $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GrObjAlmostRequiredCode segment resource
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GrObjSetActionNotificationOutput
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
Specify the message and output descriptor for grobjects to
send notification to when an action is performed on them.
Grobjects will use this notification in the body if they
don't have one of their own. Many uses of the grobj will
have no notification. This is for special uses like the
chart library which needs to know when pieces of the chart
have become selected, been moved, etc.
When a grobject sends out a notification it will put
its OD in cx:dx and bp will contain GrObjActionNotificationType.
PASS:
*(ds:si) - instance data of object
ds:[bx] - instance data of object
ds:[di] - master part of object (if any)
es - segment of GrObjClass
cx:dx - optr of object to notify
passing cx=0 will clear the data and suspension
bp - message to send
RETURN:
nothing
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This method should be optimized for SMALL SIZE over SPEED
Common cases:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 2/20/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GrObjSetActionNotificationOutput method dynamic GrObjClass,
MSG_GO_SET_ACTION_NOTIFICATION_OUTPUT
uses ax
.enter
; Attribute manager is not permitted to send action notifications
;
test ds:[di].GOI_optFlags, mask GOOF_ATTRIBUTE_MANAGER
jnz done
BitSet ds:[di].GOI_optFlags, GOOF_HAS_ACTION_NOTIFICATION
jcxz clearBit
dirty:
call ObjMarkDirty
mov ax, ATTR_GO_ACTION_NOTIFICATION
call GrObjGlobalSetActionNotificationOutput
done:
.leave
ret
clearBit:
BitClr ds:[di].GOI_optFlags, GOOF_HAS_ACTION_NOTIFICATION
jmp dirty
GrObjSetActionNotificationOutput endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GrObjSuspendActionNotification
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
Prevent grobject from sending out any action notifications.
If the grobject has no action notification od it will
will still record the suspension and the suspension will
be in place when the action output is set.
Nested suspends and unsuspends are allowed.
PASS:
*(ds:si) - instance data of object
ds:[bx] - instance data of object
ds:[di] - master part of object (if any)
es - segment of GrObjClass
RETURN:
none
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This method should be optimized for SMALL SIZE over SPEED
Common cases:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 3/26/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GrObjSuspendActionNotification method dynamic GrObjClass,
MSG_GO_SUSPEND_ACTION_NOTIFICATION
uses ax
.enter
; Don't waste space in the attribute manager. It can't
; send notifications so it is no use to suspend it.
;
test ds:[di].GOI_optFlags, mask GOOF_ATTRIBUTE_MANAGER
jnz done
mov ax,ATTR_GO_ACTION_NOTIFICATION
call GrObjGlobalSuspendActionNotification
done:
.leave
ret
GrObjSuspendActionNotification endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GrObjUnsuspendActionNotification
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
Counterbalance a call to MSG_GO_SUSPEND_ACTION_NOTIFICATION.
If all suspends have been balanced the grobject will be
free to send out action notification. However, it will not
send action notifications that were aborted during the suspended
period. If the grobject is not suspend the message will be ignored.
PASS:
*(ds:si) - instance data of object
ds:[bx] - instance data of object
ds:[di] - master part of object (if any)
es - segment of GrObjClass
RETURN:
nothing
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This method should be optimized for SMALL SIZE over SPEED
Common cases:
action notification var data exists
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 3/26/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GrObjUnsuspendActionNotification method dynamic GrObjClass,
MSG_GO_UNSUSPEND_ACTION_NOTIFICATION
uses ax
.enter
test ds:[di].GOI_optFlags, mask GOOF_ATTRIBUTE_MANAGER
jnz done
mov ax,ATTR_GO_ACTION_NOTIFICATION
call GrObjGlobalUnsuspendActionNotification
done:
.leave
ret
GrObjUnsuspendActionNotification endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GrObjGetCenter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Fill the passed PointDWFixed with the center of the object
PASS:
*(ds:si) - instance data of object
ds:[bx] - instance data of object
ds:[di] - master part of object (if any)
es - segment of GrObjClass
ss:bp - PointDWFixed - empty
RETURN:
ss:bp - PointDWFixed - filled with center
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 8/ 8/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GrObjGetCenter method dynamic GrObjClass, MSG_GO_GET_CENTER
uses cx,di,si
.enter
mov si,ds:[di].GOI_normalTransform
mov si,ds:[si]
add si,offset OT_center ;source offset
segmov es,ss,cx ;dest seg
mov di,bp ;dest offset
mov cx,size PointDWFixed/2
rep movsw
.leave
ret
GrObjGetCenter endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GrObjAfterAddedToBody
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Sent to object just after it is added to the body
PASS:
*(ds:si) - instance data of object
ds:[bx] - instance data of object
ds:[di] - master part of object (if any)
es - segment of GrObjClass
RETURN:
nothing
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 11/19/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GrObjAfterAddedToBody method dynamic GrObjClass, MSG_GO_AFTER_ADDED_TO_BODY
.enter
EC < test ds:[di].GOI_optFlags, mask GOOF_FLOATER >
EC < ERROR_NZ FLOATER_IN_DOCUMENT >
call ObjMarkDirty
ornf ds:[di].GOI_optFlags, mask GOOF_ADDED_TO_BODY
.leave
ret
GrObjAfterAddedToBody endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GrObjBeforeRemovedFromBody
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Sent to object just before it is removed from the body
PASS:
*(ds:si) - instance data of object
ds:[bx] - instance data of object
ds:[di] - master part of object (if any)
es - segment of GrObjClass
RETURN:
nothing
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 11/19/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GrObjBeforeRemovedFromBody method dynamic GrObjClass,
MSG_GO_BEFORE_REMOVED_FROM_BODY
.enter
call ObjMarkDirty
andnf ds:[di].GOI_optFlags, not mask GOOF_ADDED_TO_BODY
.leave
ret
GrObjBeforeRemovedFromBody endm
GrObjAlmostRequiredCode ends
GrObjRequiredInteractiveCode segment resource
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GrObjEvaluatePARENTPointForEdit
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Have object evaluate the passed point in terms
of editing. (ie could the object edit it self
at this point)(eg for a bitmap, anywhere within
its bounds, for a spline, somewhere along the spline
or drawn control points).
PASS:
*(ds:si) - instance data of object
ds:[bx] - instance data of object
ds:[di] - master part of object (if any)
es - segment of GrObjClass
ss:bp - PointDWFixed in PARENT coordinate system
RETURN:
al - EvaluatePositionRating
dx - EvaluatePositionNotes
DESTROYED:
ah
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This method should be optimized for SMALL SIZE over SPEED
Common cases:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 4/29/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GrObjEvaluatePARENTPointForEdit method dynamic GrObjClass,
MSG_GO_EVALUATE_PARENT_POINT_FOR_EDIT
.enter
; Call evaluate point to get the EvaluatePositionNotes
; but return the evaluate as none as the default
;
mov ax,MSG_GO_EVALUATE_PARENT_POINT_FOR_SELECTION
call ObjCallInstanceNoLock
mov al,EVALUATE_NONE
.leave
ret
GrObjEvaluatePARENTPointForEdit endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GrObjEvaluatePARENTPointForSelection
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: GrObj evaluates point to determine if it should be
selected by it. This default handler evaluates as
HIGH and BLOCKS_OUT_LOWER_OBJECTS any point that is
within the bounds of the object.
PASS:
*(ds:si) - instance data of object
ds:[bx] - instance data of object
ds:[di] - master part of object (if any)
es - segment of GrObjClass
ss:bp - PointDWFixed in PARENT coordinates
RETURN:
al - EvaluatePositionRating
dx - EvaluatePositionNotes
DESTROYED:
ah
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 11/16/89 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GrObjEvaluatePARENTPointForSelection method dynamic GrObjClass,
MSG_GO_EVALUATE_PARENT_POINT_FOR_SELECTION
bounds local RectWWFixed
point local PointWWFixed
uses cx
.enter
mov bx,ss:[bp] ;orig bp,PARENT pt frame
; Convert point to OBJECT and store in stack frame.
; If OBJECT coord won't fit in WWF then bail
;
push bp ;local frame
lea bp, ss:[point]
call GrObjConvertNormalPARENTToWWFOBJECT
pop bp ;local frame
jnc notInBounds
; Get bounds of object in OBJECT coords system
;
push bp
lea bp,ss:[bounds]
CallMod GrObjGetWWFOBJECTBounds
pop bp
; Calc hit zone
;
mov dx,MINIMUM_SELECT_DELTA
; Point ds:si at bounds and es:di at point
; for several routines
;
push ds,si ;object ptr
mov ax,ss
mov ds,ax
mov es,ax
lea si,ss:[bounds]
lea di,ss:[point]
; Expand bounds to include object and hit zone
;
CallMod GrObjGlobalExpandRectWWFixedByWWFixed
; Check for point in outer bounds
;
CallMod GrObjGlobalIsPointWWFixedInsideRectWWFixed?
pop ds,si ;object ptr
jnc notInBounds
; Point evaluates high and object blots out
; out any other objects beneath it that might
; be interested in the point.
;
mov al,EVALUATE_HIGH
mov dx,mask EPN_BLOCKS_LOWER_OBJECTS
checkSelectionLock:
pushf
GrObjDeref di,ds,si
test ds:[di].GOI_locks, mask GOL_SELECT
jnz selectionLock
donePop:
popf
.leave
ret
selectionLock:
BitSet dx, EPN_SELECTION_LOCK_SET
jmp donePop
notInBounds:
; The point is not even within the outer bounds of the
; object. We are not interested in this point
;
mov al,EVALUATE_NONE
clr dx ;doesn't block out
jmp checkSelectionLock
GrObjEvaluatePARENTPointForSelection endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GrObjEvaluatePARENTPointForSelectionWithLineWidth
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Some useful hit detection functionality for rectangular
objects that includes the line width. The default
handler doesn't include the line width
CALLED BY: INTERNAL UTILITY
PASS:
*ds:si - grobject
ss:bp - PointDWFixed in PARENT coordinates
RETURN:
al - EvaluatePositionRating
dx - EvaluatePositionNotes
DESTROYED:
ah
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This routine should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 11/24/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GrObjEvaluatePARENTPointForSelectionWithLineWidth proc far
bounds local RectWWFixed
point local PointWWFixed
xAdjust local WWFixed
yAdjust local WWFixed
class GrObjClass
uses cx
.enter
EC < call ECGrObjCheckLMemObject >
mov bx,ss:[bp] ;orig bp,PARENT pt frame
; Convert point to OBJECT and store in stack frame.
; If OBJECT coord won't fit in WWF then bail
;
push bp ;local frame
lea bp, ss:[point]
call GrObjConvertNormalPARENTToWWFOBJECT
pop bp ;local frame
jc continue
jmp notEvenClose
continue:
; Get bounds of object in OBJECT coords system
;
push bp
lea bp,ss:[bounds]
CallMod GrObjGetWWFOBJECTBounds
pop bp
call GrObjGlobalGetLineWidthPlusSlopHitDetectionAdjust
movwwf xAdjust,dxcx
movwwf yAdjust,bxax
; Point ds:si at bounds and es:di at point
; for several routines
;
push ds,si ;object ptr
mov di,ss
mov ds,di
mov es,di
lea si,ss:[bounds]
lea di,ss:[point]
; Expand bounds to include object and hit zone
;
movwwf dxcx,xAdjust
movwwf bxax,yAdjust
call GrObjGlobalAsymetricExpandRectWWFixedByWWFixed
; Check for point in outer bounds
;
CallMod GrObjGlobalIsPointWWFixedInsideRectWWFixed?
jnc notInBoundsPop
; Collapse bounds by twice hit zone to get inner rectangle.
;
negwwf dxcx
shlwwf dxcx
movwwf bxax,yAdjust
negwwf bxax
shlwwf bxax
call GrObjGlobalAsymetricExpandRectWWFixedByWWFixed
; Check for point in inner rectangle
;
CallMod GrObjGlobalIsPointWWFixedInsideRectWWFixed?
pop ds,si ;object ptr
call GrObjGlobalCompleteHitDetectionWithAreaAttrCheck
checkSelectionLock:
GrObjDeref di,ds,si
test ds:[di].GOI_locks, mask GOL_SELECT
jnz selectionLock
done:
.leave
ret
selectionLock:
BitSet dx, EPN_SELECTION_LOCK_SET
jmp done
notInBoundsPop:
; The point is not even within the outer bounds of the
; object. We are not interested in this point
;
pop ds,si ;object ptr
notEvenClose:
movnf al,EVALUATE_NONE
clr dx
jmp checkSelectionLock
GrObjEvaluatePARENTPointForSelectionWithLineWidth endp
GrObjRequiredInteractiveCode ends
GrObjExtInteractiveCode segment resource
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GrObjGetAnchorDOCUMENT
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Get coords of anchor point specified by
GrObjHandleSpecification in DOCUMENT coords
PASS:
*(ds:si) - instance data of object
ds:[bx] - instance data of object
ds:[di] - master part of object (if any)
es - segment of GrObjClass
ss:bp - GrObjHandleAnchorData
GOHAD_handle - GrObjHandleSpecification
RETURN:
ss:bp - GrObjHandleAnchorData
GOHAD_anchor - point
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 11/26/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GrObjGetAnchorDOCUMENT method dynamic GrObjClass, MSG_GO_GET_ANCHOR_DOCUMENT
uses cx
.enter
EC < test ds:[di].GOI_optFlags, mask GOOF_IN_GROUP >
EC < ERROR_NZ OBJECT_CANNOT_BE_IN_A_GROUP >
mov cl,ss:[bp].GOHAD_handle
call GrObjGetNormalDOCUMENTHandleCoords
.leave
ret
GrObjGetAnchorDOCUMENT endm
GrObjExtInteractiveCode ends
GrObjMiscUtilsCode segment resource
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GrObjMakeInstruction
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Make this object an instruction object
PASS:
*(ds:si) - instance data of object
ds:[bx] - instance data of object
ds:[di] - master part of object (if any)
es - segment of GrObjClass
RETURN:
nothing
DESTROYED:
ax
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This method should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 8/31/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GrObjMakeInstruction method dynamic GrObjClass,
MSG_GO_MAKE_INSTRUCTION
uses cx, dx
.enter
mov ax, MSG_GO_MAKE_NOT_INSTRUCTION
call GrObjGenerateAttributeFlagsChangeUndo
call ObjMarkDirty
;
; Check to see if instructions are invisible. If so, then we need
; to unselect and invalidate this object so that it may become
; invisible. Don't do this for an (the) attribute manager. Sets dx
; true if object needs to be invalidated.
;
clr dx ;Do not invalidate
test ds:[di].GOI_optFlags, mask GOOF_ATTRIBUTE_MANAGER
jnz setFlag
call GrObjGetDrawFlagsFromBody
test ax, mask GODF_DRAW_INSTRUCTIONS
jnz setFlag
; Unselect this object. Must be done before INSTRUCTION bit is
; changed because they object cannot "Draw Handles" if it is an
; instruction object and instructions are not drawn.
dec dx ;Okay, invalidate
mov ax, MSG_GO_BECOME_UNSELECTED
call ObjCallInstanceNoLock
GrObjDeref di,ds,si
setFlag:
BitSet ds:[di].GOI_attrFlags, GOAF_INSTRUCTION
mov cx, mask GOUINT_GROBJ_SELECT
call GrObjOptSendUINotification
tst dx ;Should we invalidate?
jz done
push bp
mov ax, MSG_VIS_INVALIDATE
call ObjCallInstanceNoLock ;Destroys: ax,cx,dx,bp
pop bp
done:
.leave
ret
GrObjMakeInstruction endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GrObjMakeNotInstruction
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Make this object not an instruction object
PASS:
*(ds:si) - instance data of object
ds:[bx] - instance data of object
ds:[di] - master part of object (if any)
es - segment of GrObjClass
RETURN:
nothing
DESTROYED:
ax
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This method should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 8/31/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GrObjMakeNotInstruction method dynamic GrObjClass,
MSG_GO_MAKE_NOT_INSTRUCTION
uses cx
.enter
mov ax, MSG_GO_MAKE_INSTRUCTION
call GrObjGenerateAttributeFlagsChangeUndo
call ObjMarkDirty
BitClr ds:[di].GOI_attrFlags,GOAF_INSTRUCTION
mov cx,mask GOUINT_GROBJ_SELECT
call GrObjOptSendUINotification
; Check to see if we have to invalidate and thus redraw this object
; because it was made "NOT_INSTRUCTION" while instructions were
; invisible.
call GrObjGetDrawFlagsFromBody
test ax, mask GODF_DRAW_INSTRUCTIONS
jnz done ;Not invisible.. bail
GrObjDeref di,ds,si
test ds:[di].GOI_optFlags, mask GOOF_ATTRIBUTE_MANAGER
jnz done ;Attr mgr.. bail
push dx, bp
mov ax, MSG_VIS_INVALIDATE
call ObjCallInstanceNoLock ;Destroys: ax,cx,dx,bp
pop dx, bp
done:
.leave
ret
GrObjMakeNotInstruction endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GrObjSetWrapTextType
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Set the GrObjWrapTextType for this object
PASS:
*(ds:si) - instance data of object
ds:[bx] - instance data of object
ds:[di] - master part of object (if any)
es - segment of GrObjClass
cl - GrObjWrapTextType
RETURN:
nothing
DESTROYED:
ax
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This method should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 8/31/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GrObjSetWrapTextType method dynamic GrObjClass,
MSG_GO_SET_WRAP_TEXT_TYPE
uses cx
.enter
EC < cmp cl,GrObjWrapTextType >
EC < ERROR_AE GROBJ_BAD_GROBJ_WRAP_TEXT_TYPE >
test ds:[di].GOI_locks, mask GOL_WRAP
jnz done
;
; If we set the wrap type to be wrap inside, be sure to make
; the object appear unfilled. Otherwise, you can't see the
; text anyway. --JimG 8/31/99
;
cmp cl, GOWTT_WRAP_INSIDE
jne afterInside
call GrObjGlobalUndoIgnoreActions ; no undoing this action
push cx
mov ax, MSG_GO_SET_AREA_MASK
mov cl, SDM_0
call ObjCallInstanceNoLock ; set unfilled (area = 0%)
pop cx
call GrObjGlobalUndoAcceptActions ; restore undos
afterInside:
call GrObjGenerateUndoChangeGrObjFlagsChain
clr ah
mov al,cl
mov cl,offset GOAF_WRAP
shl ax,cl
mov cx, ds:[di].GOI_attrFlags
mov bx, cx
andnf bx, mask GOAF_WRAP
cmp ax, bx
jz done
andnf cx, not mask GOAF_WRAP
or ax, cx
mov ds:[di].GOI_attrFlags,ax
call ObjMarkDirty
mov bp, GOANT_WRAP_CHANGED
call GrObjOptNotifyAction
mov cx,mask GOUINT_GROBJ_SELECT
call GrObjOptSendUINotification
done:
.leave
ret
GrObjSetWrapTextType endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GrObjCheckActionModes
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Get GrObjActionModes
PASS:
*(ds:si) - instance data of object
ds:[bx] - instance data of object
ds:[di] - master part of object (if any)
es - segment of GrObjClass
RETURN:
carry set if GrObjActionModes not clear
DESTROYED:
ax
REVISION HISTORY:
Name Date Description
---- ---- -----------
jon 18 jan 1993 initial revision
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GrObjCheckActionModes method dynamic GrObjClass, MSG_GO_CHECK_ACTION_MODES
.enter
test ds:[di].GOI_actionModes, mask GrObjActionModes
jz done
stc
done:
.leave
ret
GrObjCheckActionModes endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GrObjSetPasteInside
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Set/reset the GOAF_PASTE_INSIDE bit
PASS:
*(ds:si) - instance data of object
ds:[bx] - instance data of object
ds:[di] - master part of object (if any)
es - segment of GrObjClass
cl - TRUE or FALSE
RETURN:
nothing
DESTROYED:
ax
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This method should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 8/31/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GrObjSetPasteInside method dynamic GrObjClass,
MSG_GO_SET_PASTE_INSIDE
.enter
test ds:[di].GOI_optFlags,mask GOOF_ATTRIBUTE_MANAGER
jnz done
call GrObjGenerateUndoChangeGrObjFlagsChain
call ObjMarkDirty
BitClr ds:[di].GOI_attrFlags, GOAF_PASTE_INSIDE
tst cl
jz done
BitSet ds:[di].GOI_attrFlags, GOAF_PASTE_INSIDE
done:
.leave
ret
GrObjSetPasteInside endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GrObjSetInsertDeleteMoveAllowed
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Set/reset the GOAF_INSERT_DELETE_MOVE_ALLOWED bit
PASS:
*(ds:si) - instance data of object
ds:[bx] - instance data of object
ds:[di] - master part of object (if any)
es - segment of GrObjClass
cl - TRUE or FALSE
RETURN:
nothing
DESTROYED:
ax
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This method should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 8/31/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GrObjSetInsertDeleteMoveAllowed method dynamic GrObjClass,
MSG_GO_SET_INSERT_DELETE_MOVE_ALLOWED
uses cx
.enter
call GrObjGenerateUndoChangeGrObjFlagsChain
call ObjMarkDirty
BitClr ds:[di].GOI_attrFlags, GOAF_INSERT_DELETE_MOVE_ALLOWED
tst cl
jz sendUI
BitSet ds:[di].GOI_attrFlags, GOAF_INSERT_DELETE_MOVE_ALLOWED
sendUI:
mov cx,mask GOUINT_GROBJ_SELECT
call GrObjOptSendUINotification
.leave
ret
GrObjSetInsertDeleteMoveAllowed endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GrObjSetInsertDeleteResizeAllowed
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Set/reset the GOAF_INSERT_DELETE_RESIZE_ALLOWED bit
PASS:
*(ds:si) - instance data of object
ds:[bx] - instance data of object
ds:[di] - master part of object (if any)
es - segment of GrObjClass
cl - TRUE or FALSE
RETURN:
nothing
DESTROYED:
ax
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This method should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 8/31/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GrObjSetInsertDeleteResizeAllowed method dynamic GrObjClass,
MSG_GO_SET_INSERT_DELETE_RESIZE_ALLOWED
uses cx
.enter
call GrObjGenerateUndoChangeGrObjFlagsChain
call ObjMarkDirty
BitClr ds:[di].GOI_attrFlags, GOAF_INSERT_DELETE_RESIZE_ALLOWED
tst cl
jz sendUI
BitSet ds:[di].GOI_attrFlags, GOAF_INSERT_DELETE_RESIZE_ALLOWED
sendUI:
mov cx,mask GOUINT_GROBJ_SELECT
call GrObjOptSendUINotification
.leave
ret
GrObjSetInsertDeleteResizeAllowed endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GrObjSetInsertDeleteDeleteAllowed
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Set/reset the GOAF_INSERT_DELETE_DELETE_ALLOWED bit
PASS:
*(ds:si) - instance data of object
ds:[bx] - instance data of object
ds:[di] - master part of object (if any)
es - segment of GrObjClass
cl - TRUE or FALSE
RETURN:
nothing
DESTROYED:
ax
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This method should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 8/31/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GrObjSetInsertDeleteDeleteAllowed method dynamic GrObjClass,
MSG_GO_SET_INSERT_DELETE_DELETE_ALLOWED
uses cx
.enter
call GrObjGenerateUndoChangeGrObjFlagsChain
call ObjMarkDirty
BitClr ds:[di].GOI_attrFlags, GOAF_INSERT_DELETE_DELETE_ALLOWED
tst cl
jz sendUI
BitSet ds:[di].GOI_attrFlags, GOAF_INSERT_DELETE_DELETE_ALLOWED
sendUI:
mov cx,mask GOUINT_GROBJ_SELECT
call GrObjOptSendUINotification
.leave
ret
GrObjSetInsertDeleteDeleteAllowed endm
GrObjMiscUtilsCode ends
GrObjAttributesCode segment resource
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GrObjSetGrObjAttrFlags
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Set/reset GrObjAttrFlags
PASS:
*(ds:si) - instance data of object
ds:[bx] - instance data of object
ds:[di] - master part of object (if any)
es - segment of GrObjClass
cx - GrObjAttrFlags to set
dx - GrObjAttrFlags to reset
RETURN:
nothing
DESTROYED:
ax
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This method should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 9/11/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GrObjSetGrObjAttrFlags method dynamic GrObjClass,
MSG_GO_SET_GROBJ_ATTR_FLAGS
uses cx,dx,bp
.enter
test ds:[di].GOI_optFlags, mask GOOF_ATTRIBUTE_MANAGER
jnz attrMgr
undo:
call GrObjGenerateUndoChangeGrObjFlagsChain
mov ax,ds:[di].GOI_attrFlags
push ax ;orig flags
not dx
andnf ax,dx ;reset
ornf ax,cx ;set
mov ds:[di].GOI_attrFlags,ax
call ObjMarkDirty
pop cx ;orig flags
; Check for any of the wrap bits changing.
;
xor cx,ax ;orig flags, new flags
and cx,mask GOAF_WRAP
jnz wrapNotification
uiUpdate:
mov cx,mask GOUINT_GROBJ_SELECT
call GrObjOptSendUINotification
.leave
ret
attrMgr:
; Not allowed to set the no default bits in the attribute manager
;
andnf cx,not NO_DEFAULT_GROBJ_ATTR_FLAGS
jmp undo
wrapNotification:
mov bp, GOANT_WRAP_CHANGED
call GrObjOptNotifyAction
jmp uiUpdate
GrObjSetGrObjAttrFlags endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GrObjGetGrObjAttrFlags
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Get GrObjAttrFlags
PASS:
*(ds:si) - instance data of object
ds:[bx] - instance data of object
ds:[di] - master part of object (if any)
es - segment of GrObjClass
RETURN:
cx - GrObjAttrFlags
DESTROYED:
ax
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This method should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 9/11/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GrObjGetGrObjAttrFlags method dynamic GrObjClass,
MSG_GO_GET_GROBJ_ATTR_FLAGS
.enter
mov cx,ds:[di].GOI_attrFlags
.leave
ret
GrObjGetGrObjAttrFlags endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GrObjGenerateUndoChangeGrObjFlagsChain
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Generate an undo chain for changing an objects GrObjFlags
CALLED BY: INTERNAL
GrObjRemoveGrObj
PASS: *ds:si - group
RETURN:
nothing
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
none
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This routine should be optimized for SMALL SIZE over SPEED
Common cases:
unknown
REVISION HISTORY:
Name Date Description
---- ---- -----------
srs 8/ 4/92 Initial version
JimG 7/13/94 Changed to use ..AttributeFlagsChangeUndo
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GrObjGenerateUndoChangeGrObjFlagsChain proc far
class GrObjClass
uses ax,cx,dx,di
.enter
GrObjDeref di,ds,si
mov dx, mask GrObjAttrFlags ;reset them all
mov cx,ds:[di].GOI_attrFlags ;set these
mov ax,MSG_GO_SET_GROBJ_ATTR_FLAGS ;undo message
call GrObjGenerateAttributeFlagsChangeUndo
.leave
ret
GrObjGenerateUndoChangeGrObjFlagsChain endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GrObjGenerateAttributeFlagsChangeUndo
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Generates a generic attribute flags change undo chain.
CALLED BY: INTERNAL
GrObjMakeInstruction, GrObjMakeNotInstruction,
GrObjGenerateUndoChangeGrObjFlagsChain
PASS: *ds:si = GrObj object
ax = Message to send for undo
cx, dx, bp = Message params
RETURN: nothing
DESTROYED: nothing
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
JimG 7/13/94 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GrObjGenerateAttributeFlagsChangeUndo proc far
uses bx
.enter
EC < call ECGrObjCheckLMemObject >
push cx, dx
mov cx, handle attrFlagsString
mov dx, offset attrFlagsString
call GrObjGlobalStartUndoChain
pop cx, dx
jc endChain
clr bx ;no AddUndoActionFlags
call GrObjGlobalAddFlagsUndoAction
endChain:
call GrObjGlobalEndUndoChain
.leave
ret
GrObjGenerateAttributeFlagsChangeUndo endp
GrObjAttributesCode ends
| 22.26023 | 79 | 0.60316 |
39eedbd84409a905a0273fc9d9acb817cef72e25 | 4,371 | asm | Assembly | constants/radio_constants.asm | Dev727/ancientplatinum | 8b212a1728cc32a95743e1538b9eaa0827d013a7 | [
"blessing"
] | 28 | 2019-11-08T07:19:00.000Z | 2021-12-20T10:17:54.000Z | constants/radio_constants.asm | Dev727/ancientplatinum | 8b212a1728cc32a95743e1538b9eaa0827d013a7 | [
"blessing"
] | 13 | 2020-01-11T17:00:40.000Z | 2021-09-14T01:27:38.000Z | constants/radio_constants.asm | Dev727/ancientplatinum | 8b212a1728cc32a95743e1538b9eaa0827d013a7 | [
"blessing"
] | 22 | 2020-05-28T17:31:38.000Z | 2022-03-07T20:49:35.000Z | ; radio channel ids
; indexes for:
; - RadioChannelSongs (see data/radio/channel_music.asm)
; - PlayRadioShow/RadioJumptable (see engine/pokegear/radio.asm)
; - RadioChannels (see engine/pokegear/pokegear.asm)
const_def
const OAKS_POKEMON_TALK ; 00
const POKEDEX_SHOW ; 01
const POKEMON_MUSIC ; 02
const LUCKY_CHANNEL ; 03
const BUENAS_PASSWORD ; 04
const PLACES_AND_PEOPLE ; 05
const LETS_ALL_SING ; 06
const ROCKET_RADIO ; 07
const POKE_FLUTE_RADIO ; 08
const UNOWN_RADIO ; 09
const EVOLUTION_RADIO ; 0a
; internal indexes for channel segments
const OAKS_POKEMON_TALK_2 ; 0b
const OAKS_POKEMON_TALK_3 ; 0c
const OAKS_POKEMON_TALK_4 ; 0d
const OAKS_POKEMON_TALK_5 ; 0e
const OAKS_POKEMON_TALK_6 ; 0f
const OAKS_POKEMON_TALK_7 ; 10
const OAKS_POKEMON_TALK_8 ; 11
const OAKS_POKEMON_TALK_9 ; 12
const POKEDEX_SHOW_2 ; 13
const POKEDEX_SHOW_3 ; 14
const POKEDEX_SHOW_4 ; 15
const POKEDEX_SHOW_5 ; 16
const POKEMON_MUSIC_2 ; 17
const POKEMON_MUSIC_3 ; 18
const POKEMON_MUSIC_4 ; 19
const POKEMON_MUSIC_5 ; 1a
const POKEMON_MUSIC_6 ; 1b
const POKEMON_MUSIC_7 ; 1c
const LETS_ALL_SING_2 ; 1d
const LUCKY_NUMBER_SHOW_2 ; 1e
const LUCKY_NUMBER_SHOW_3 ; 1f
const LUCKY_NUMBER_SHOW_4 ; 20
const LUCKY_NUMBER_SHOW_5 ; 21
const LUCKY_NUMBER_SHOW_6 ; 22
const LUCKY_NUMBER_SHOW_7 ; 23
const LUCKY_NUMBER_SHOW_8 ; 24
const LUCKY_NUMBER_SHOW_9 ; 25
const LUCKY_NUMBER_SHOW_10 ; 26
const LUCKY_NUMBER_SHOW_11 ; 27
const LUCKY_NUMBER_SHOW_12 ; 28
const LUCKY_NUMBER_SHOW_13 ; 29
const LUCKY_NUMBER_SHOW_14 ; 2a
const LUCKY_NUMBER_SHOW_15 ; 2b
const PLACES_AND_PEOPLE_2 ; 2c
const PLACES_AND_PEOPLE_3 ; 2d
const PLACES_AND_PEOPLE_4 ; 2e
const PLACES_AND_PEOPLE_5 ; 2f
const PLACES_AND_PEOPLE_6 ; 30
const PLACES_AND_PEOPLE_7 ; 31
const ROCKET_RADIO_2 ; 32
const ROCKET_RADIO_3 ; 33
const ROCKET_RADIO_4 ; 34
const ROCKET_RADIO_5 ; 35
const ROCKET_RADIO_6 ; 36
const ROCKET_RADIO_7 ; 37
const ROCKET_RADIO_8 ; 38
const ROCKET_RADIO_9 ; 39
const ROCKET_RADIO_10 ; 3a
const OAKS_POKEMON_TALK_10 ; 3b
const OAKS_POKEMON_TALK_11 ; 3c
const OAKS_POKEMON_TALK_12 ; 3d
const OAKS_POKEMON_TALK_13 ; 3e
const OAKS_POKEMON_TALK_14 ; 3f
const BUENAS_PASSWORD_2 ; 40
const BUENAS_PASSWORD_3 ; 41
const BUENAS_PASSWORD_4 ; 42
const BUENAS_PASSWORD_5 ; 43
const BUENAS_PASSWORD_6 ; 44
const BUENAS_PASSWORD_7 ; 45
const BUENAS_PASSWORD_8 ; 46
const BUENAS_PASSWORD_9 ; 47
const BUENAS_PASSWORD_10 ; 48
const BUENAS_PASSWORD_11 ; 49
const BUENAS_PASSWORD_12 ; 4a
const BUENAS_PASSWORD_13 ; 4b
const BUENAS_PASSWORD_14 ; 4c
const BUENAS_PASSWORD_15 ; 4d
const BUENAS_PASSWORD_16 ; 4e
const BUENAS_PASSWORD_17 ; 4f
const BUENAS_PASSWORD_18 ; 50
const BUENAS_PASSWORD_19 ; 51
const BUENAS_PASSWORD_20 ; 52
const BUENAS_PASSWORD_21 ; 53
const RADIO_SCROLL ; 54
const POKEDEX_SHOW_6 ; 55
const POKEDEX_SHOW_7 ; 56
const POKEDEX_SHOW_8 ; 57
; PlayRadio.StationPointers indexes (see engine/pokegear/pokegear.asm)
const_def
const MAPRADIO_POKEMON_CHANNEL
const MAPRADIO_OAKS_POKEMON_TALK
const MAPRADIO_POKEDEX_SHOW
const MAPRADIO_POKEMON_MUSIC
const MAPRADIO_LUCKY_CHANNEL
const MAPRADIO_UNOWN
const MAPRADIO_PLACES_PEOPLE
const MAPRADIO_LETS_ALL_SING
const MAPRADIO_ROCKET
; These tables in engine/pokegear/radio.asm are all sized to a power of 2
; so there's no need for a rejection sampling loop
NUM_OAKS_POKEMON_TALK_ADVERBS EQU 16 ; OaksPKMNTalk8.Adverbs
NUM_OAKS_POKEMON_TALK_ADJECTIVES EQU 16 ; OaksPKMNTalk9.Adjectives
NUM_PNP_PEOPLE_ADJECTIVES EQU 16 ; PeoplePlaces5.Adjectives
NUM_PNP_PLACES_ADJECTIVES EQU 16 ; PeoplePlaces7.Adjectives
; BuenasPasswordTable sizes (see data/radio/buenas_passwords.asm)
NUM_PASSWORD_CATEGORIES EQU 11
NUM_PASSWORDS_PER_CATEGORY EQU 3
; GetBuenasPassword.StringFunctionJumpTable indexes (see engine/pokegear/radio.asm)
const_def
const BUENA_MON
const BUENA_ITEM
const BUENA_MOVE
const BUENA_STRING
| 34.690476 | 83 | 0.727294 |
5d2a006f201434cd6a8e9dcbcf8bcd97f7a15b5e | 60 | asm | Assembly | gfx/pokemon/golduck/anim_idle.asm | Dev727/ancientplatinum | 8b212a1728cc32a95743e1538b9eaa0827d013a7 | [
"blessing"
] | 28 | 2019-11-08T07:19:00.000Z | 2021-12-20T10:17:54.000Z | gfx/pokemon/golduck/anim_idle.asm | Dev727/ancientplatinum | 8b212a1728cc32a95743e1538b9eaa0827d013a7 | [
"blessing"
] | 13 | 2020-01-11T17:00:40.000Z | 2021-09-14T01:27:38.000Z | gfx/pokemon/golduck/anim_idle.asm | Dev727/ancientplatinum | 8b212a1728cc32a95743e1538b9eaa0827d013a7 | [
"blessing"
] | 22 | 2020-05-28T17:31:38.000Z | 2022-03-07T20:49:35.000Z | setrepeat 2
frame 0, 10
frame 7, 15
dorepeat 1
endanim
| 10 | 12 | 0.7 |
c85f77754042a6c7054af368f401471b1a719589 | 1,644 | asm | Assembly | programs/oeis/131/A131524.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/131/A131524.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/131/A131524.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A131524: Number of possible palindromic rows (or columns) in an n X n crossword puzzle.
; 0,0,1,1,2,2,4,4,7,7,12,12,20,20,33,33,54,54,88,88,143,143,232,232,376,376,609,609,986,986,1596,1596,2583,2583,4180,4180,6764,6764,10945,10945,17710,17710,28656,28656,46367,46367,75024,75024,121392,121392,196417,196417,317810,317810,514228,514228,832039,832039,1346268,1346268,2178308,2178308,3524577,3524577,5702886,5702886,9227464,9227464,14930351,14930351,24157816,24157816,39088168,39088168,63245985,63245985,102334154,102334154,165580140,165580140,267914295,267914295,433494436,433494436,701408732,701408732,1134903169,1134903169,1836311902,1836311902,2971215072,2971215072,4807526975,4807526975,7778742048,7778742048,12586269024,12586269024,20365011073,20365011073,32951280098,32951280098,53316291172,53316291172,86267571271,86267571271,139583862444,139583862444,225851433716,225851433716,365435296161,365435296161,591286729878,591286729878,956722026040,956722026040,1548008755919,1548008755919,2504730781960,2504730781960,4052739537880,4052739537880,6557470319841,6557470319841,10610209857722,10610209857722,17167680177564,17167680177564,27777890035287,27777890035287,44945570212852,44945570212852,72723460248140,72723460248140,117669030460993,117669030460993,190392490709134,190392490709134,308061521170128,308061521170128,498454011879263,498454011879263,806515533049392,806515533049392,1304969544928656,1304969544928656,2111485077978049,2111485077978049,3416454622906706,3416454622906706,5527939700884756,5527939700884756,8944394323791463,8944394323791463
mov $1,1
mov $3,2
lpb $0,1
sub $0,2
mov $2,$1
mov $1,$3
add $3,$2
lpe
sub $1,1
| 126.461538 | 1,465 | 0.864964 |
def1c9171f1882122cae1b5ff1a093498ee832c1 | 1,307 | asm | Assembly | sw/552tests/rand_simple/t_2_ld.asm | JPShen-UWM/ThreadKraken | 849c510531f28e36d3469535737b2120bd774935 | [
"MIT"
] | 1 | 2022-02-15T16:03:25.000Z | 2022-02-15T16:03:25.000Z | sw/552tests/rand_simple/t_2_ld.asm | JPShen-UWM/ThreadKraken | 849c510531f28e36d3469535737b2120bd774935 | [
"MIT"
] | null | null | null | sw/552tests/rand_simple/t_2_ld.asm | JPShen-UWM/ThreadKraken | 849c510531f28e36d3469535737b2120bd774935 | [
"MIT"
] | null | null | null | // seed 2
lbi r0, 79 // icount 0
slbi r0, 230 // icount 1
lbi r1, 29 // icount 2
slbi r1, 63 // icount 3
lbi r2, 134 // icount 4
slbi r2, 128 // icount 5
lbi r3, 213 // icount 6
slbi r3, 126 // icount 7
lbi r4, 192 // icount 8
slbi r4, 75 // icount 9
lbi r5, 170 // icount 10
slbi r5, 255 // icount 11
lbi r6, 134 // icount 12
slbi r6, 248 // icount 13
lbi r7, 41 // icount 14
slbi r7, 64 // icount 15
andni r1, r1, 1 // icount 16
ld r4, r1, 14 // icount 17
andni r6, r6, 1 // icount 18
ld r6, r6, 0 // icount 19
andni r7, r7, 1 // icount 20
ld r6, r7, 4 // icount 21
andni r0, r0, 1 // icount 22
ld r6, r0, 10 // icount 23
andni r3, r3, 1 // icount 24
ld r6, r3, 12 // icount 25
andni r3, r3, 1 // icount 26
ld r0, r3, 12 // icount 27
andni r2, r2, 1 // icount 28
ld r3, r2, 14 // icount 29
andni r1, r1, 1 // icount 30
ld r3, r1, 6 // icount 31
andni r1, r1, 1 // icount 32
ld r2, r1, 10 // icount 33
andni r5, r5, 1 // icount 34
ld r3, r5, 8 // icount 35
andni r7, r7, 1 // icount 36
ld r2, r7, 2 // icount 37
andni r5, r5, 1 // icount 38
ld r5, r5, 2 // icount 39
andni r7, r7, 1 // icount 40
ld r5, r7, 0 // icount 41
andni r0, r0, 1 // icount 42
ld r7, r0, 6 // icount 43
andni r3, r3, 1 // icount 44
ld r3, r3, 14 // icount 45
andni r0, r0, 1 // icount 46
ld r5, r0, 6 // icount 47
halt // icount 48
| 25.627451 | 28 | 0.612089 |
d362b521bae3b5c6ff4c97435d010f78a8732058 | 4,249 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0xca_notsx.log_21829_451.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_0xca_notsx.log_21829_451.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_0xca_notsx.log_21829_451.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r11
push %r14
push %rbp
lea addresses_WC_ht+0x11b8c, %r10
add %rbp, %rbp
mov (%r10), %r11w
nop
cmp %r14, %r14
pop %rbp
pop %r14
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r8
push %r9
push %rax
push %rbp
push %rdi
push %rdx
// Load
lea addresses_normal+0x5a4c, %r10
nop
nop
nop
nop
sub %rdi, %rdi
mov (%r10), %rdx
nop
nop
cmp $13406, %rdx
// Faulty Load
lea addresses_normal+0x1e18c, %r10
nop
nop
nop
nop
inc %r8
movb (%r10), %al
lea oracles, %rdx
and $0xff, %rax
shlq $12, %rax
mov (%rdx,%rax,1), %rax
pop %rdx
pop %rdi
pop %rbp
pop %rax
pop %r9
pop %r8
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_normal', 'size': 2, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'same': False, 'congruent': 5, 'NT': False, 'type': 'addresses_normal', 'size': 8, 'AVXalign': False}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'same': True, 'congruent': 0, 'NT': False, 'type': 'addresses_normal', 'size': 1, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'same': False, 'congruent': 9, 'NT': False, 'type': 'addresses_WC_ht', 'size': 2, 'AVXalign': False}, 'OP': 'LOAD'}
{'34': 21829}
34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34
*/
| 58.205479 | 2,999 | 0.660861 |
f83490cec47a936c6f7ca0a641414cd95839388b | 636 | asm | Assembly | libsrc/_DEVELOPMENT/sound/bit/z80/asm_bit_fx/_bitfx_16.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null | libsrc/_DEVELOPMENT/sound/bit/z80/asm_bit_fx/_bitfx_16.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null | libsrc/_DEVELOPMENT/sound/bit/z80/asm_bit_fx/_bitfx_16.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null |
SECTION code_sound_bit
PUBLIC _bitfx_16
INCLUDE "clib_target_cfg.asm"
_bitfx_16:
; blirp
ld b,255
expl:
push af
ld a,__sound_bit_toggle
ld h,0
ld l,b
and (hl)
ld l,a
pop af
xor l
INCLUDE "sound/bit/z80/output_bit_device_2.inc"
push bc
dly:
nop
djnz dly
pop bc
push af
ld a,__sound_bit_toggle
ld h,0
ld l,b
and (hl)
ld l,a
pop af
xor l
INCLUDE "sound/bit/z80/output_bit_device_2.inc"
push bc
push af
ld a,255
sub b
ld b,a
pop af
dly2:
nop
djnz dly2
pop bc
djnz expl
ret
| 9.217391 | 50 | 0.561321 |
339b668ec68fa162a6e7a94dce7ffa39200abec1 | 1,695 | asm | Assembly | programs/oeis/256/A256494.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/256/A256494.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/256/A256494.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A256494: Expansion of -x^2*(x^3+x-1) / ((x-1)*(x+1)*(2*x-1)*(x^2+1)).
; 0,1,1,2,3,7,13,26,51,103,205,410,819,1639,3277,6554,13107,26215,52429,104858,209715,419431,838861,1677722,3355443,6710887,13421773,26843546,53687091,107374183,214748365,429496730,858993459,1717986919,3435973837,6871947674,13743895347,27487790695,54975581389,109951162778,219902325555,439804651111,879609302221,1759218604442,3518437208883,7036874417767,14073748835533,28147497671066,56294995342131,112589990684263,225179981368525,450359962737050,900719925474099,1801439850948199,3602879701896397,7205759403792794,14411518807585587,28823037615171175,57646075230342349,115292150460684698,230584300921369395,461168601842738791,922337203685477581,1844674407370955162,3689348814741910323,7378697629483820647,14757395258967641293,29514790517935282586,59029581035870565171,118059162071741130343,236118324143482260685,472236648286964521370,944473296573929042739,1888946593147858085479,3777893186295716170957,7555786372591432341914,15111572745182864683827,30223145490365729367655,60446290980731458735309,120892581961462917470618,241785163922925834941235,483570327845851669882471,967140655691703339764941,1934281311383406679529882,3868562622766813359059763,7737125245533626718119527,15474250491067253436239053,30948500982134506872478106,61897001964269013744956211,123794003928538027489912423,247588007857076054979824845,495176015714152109959649690,990352031428304219919299379,1980704062856608439838598759,3961408125713216879677197517,7922816251426433759354395034,15845632502852867518708790067,31691265005705735037417580135,63382530011411470074835160269,126765060022822940149670320538
mov $1,2
pow $1,$0
add $1,3
div $1,5
mov $0,$1
| 188.333333 | 1,574 | 0.903835 |
6468c67c9379c87f2d590e2ab5f630e30c12256c | 38 | asm | Assembly | libsrc/stdio/dbos/fgetc_cons.asm | teknoplop/z88dk | bb03fbfd6b2ab0f397a1358559089f9cd3706485 | [
"ClArtistic"
] | null | null | null | libsrc/stdio/dbos/fgetc_cons.asm | teknoplop/z88dk | bb03fbfd6b2ab0f397a1358559089f9cd3706485 | [
"ClArtistic"
] | null | null | null | libsrc/stdio/dbos/fgetc_cons.asm | teknoplop/z88dk | bb03fbfd6b2ab0f397a1358559089f9cd3706485 | [
"ClArtistic"
] | null | null | null | PUBLIC fgetc_cons
.fgetc_cons
ret
| 7.6 | 19 | 0.763158 |
51a8b32106e0cd92cf59bbae31eea997d31eec83 | 495 | asm | Assembly | oeis/023/A023503.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/023/A023503.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/023/A023503.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A023503: Greatest prime divisor of prime(n) - 1.
; Submitted by Jamie Morken(s2)
; 2,2,3,5,3,2,3,11,7,5,3,5,7,23,13,29,5,11,7,3,13,41,11,3,5,17,53,3,7,7,13,17,23,37,5,13,3,83,43,89,5,19,3,7,11,7,37,113,19,29,17,5,5,2,131,67,5,23,7,47,73,17,31,13,79,11,7,173,29,11,179,61,31,7,191,97,11,5,17,19,7,43,3,73,17,7,19,23,11,233,239,3,7,83,251,127,13,29,5,13
add $0,1
seq $0,6005 ; The odd prime numbers together with 1.
sub $0,2
seq $0,6530 ; Gpf(n): greatest prime dividing n, for n >= 2; a(1)=1.
| 55 | 270 | 0.646465 |
49c30750f36e6deb5359daebc5fcad19cea9d107 | 3,148 | asm | Assembly | Transynther/x86/_processed/AVXALIGN/_zr_/i3-7100_9_0xca_notsx.log_274_190.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/AVXALIGN/_zr_/i3-7100_9_0xca_notsx.log_274_190.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/AVXALIGN/_zr_/i3-7100_9_0xca_notsx.log_274_190.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r12
push %r13
push %r9
push %rbx
push %rdi
push %rsi
lea addresses_UC_ht+0x10fe9, %rbx
nop
nop
nop
nop
xor %r10, %r10
mov $0x6162636465666768, %r12
movq %r12, (%rbx)
nop
nop
nop
and $10786, %r13
lea addresses_A_ht+0x14de9, %rdi
nop
add %r9, %r9
vmovups (%rdi), %ymm3
vextracti128 $0, %ymm3, %xmm3
vpextrq $0, %xmm3, %rsi
nop
nop
cmp %r10, %r10
lea addresses_D_ht+0x13c29, %rdi
nop
nop
nop
nop
nop
cmp %rsi, %rsi
mov $0x6162636465666768, %r10
movq %r10, %xmm1
and $0xffffffffffffffc0, %rdi
vmovaps %ymm1, (%rdi)
nop
nop
nop
nop
nop
sub $12254, %r13
pop %rsi
pop %rdi
pop %rbx
pop %r9
pop %r13
pop %r12
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r13
push %r14
push %r15
push %r9
push %rax
push %rbp
push %rsi
// Store
lea addresses_UC+0x1dde9, %r14
nop
nop
nop
nop
nop
xor %r15, %r15
mov $0x5152535455565758, %rsi
movq %rsi, %xmm2
movups %xmm2, (%r14)
xor $50903, %rbp
// Store
mov $0xa93d900000007e9, %rax
nop
nop
nop
inc %r9
movw $0x5152, (%rax)
nop
nop
nop
nop
add %r14, %r14
// Faulty Load
lea addresses_normal+0x1bde9, %rsi
clflush (%rsi)
nop
nop
nop
nop
nop
cmp $63382, %r15
vmovntdqa (%rsi), %ymm3
vextracti128 $0, %ymm3, %xmm3
vpextrq $1, %xmm3, %r14
lea oracles, %rsi
and $0xff, %r14
shlq $12, %r14
mov (%rsi,%r14,1), %r14
pop %rsi
pop %rbp
pop %rax
pop %r9
pop %r15
pop %r14
pop %r13
ret
/*
<gen_faulty_load>
[REF]
{'src': {'same': True, 'congruent': 0, 'NT': False, 'type': 'addresses_normal', 'size': 1, 'AVXalign': False}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 8, 'NT': False, 'type': 'addresses_UC', 'size': 16, 'AVXalign': False}}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 7, 'NT': False, 'type': 'addresses_NC', 'size': 2, 'AVXalign': False}}
[Faulty Load]
{'src': {'same': True, 'congruent': 0, 'NT': True, 'type': 'addresses_normal', 'size': 32, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 8, 'NT': False, 'type': 'addresses_UC_ht', 'size': 8, 'AVXalign': False}}
{'src': {'same': False, 'congruent': 10, 'NT': False, 'type': 'addresses_A_ht', 'size': 32, 'AVXalign': False}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 2, 'NT': False, 'type': 'addresses_D_ht', 'size': 32, 'AVXalign': True}}
{'00': 274}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
| 23.669173 | 821 | 0.65756 |
f9b11c8d6c024d65c9c2383d3b69c5ddf1ac4e25 | 1,769 | asm | Assembly | Bootloader.asm | Th3Matt/FlameOS-Rewrite3 | aeed3fd72bf96acc08b1fd91ad190603690bffb1 | [
"MIT"
] | null | null | null | Bootloader.asm | Th3Matt/FlameOS-Rewrite3 | aeed3fd72bf96acc08b1fd91ad190603690bffb1 | [
"MIT"
] | 1 | 2021-10-03T14:53:14.000Z | 2021-10-03T14:53:14.000Z | Bootloader.asm | Th3Matt/FlameOS-Rewrite3 | aeed3fd72bf96acc08b1fd91ad190603690bffb1 | [
"MIT"
] | null | null | null | [ org 0x7C00 ]
[ BITS 16 ]
SVO equ 0x2000 ; System variables offset
MMO equ 0x3000 ; Memory map offset
jmp 0:0x7C05
Boot:
mov ax, 0
mov ds, ax
mov es, ax
cli
mov ss, ax
mov sp, 0x2000
sti
mov ds:[SVO], dl
mov di, MMO
push dword 0
.getMemoryMap:
mov eax, 0xE820
mov edx, 'SMAP'
xor ebx, ebx
mov ecx, 0x100
;int 0x15
jnc .MMTest
mov ax, 0xB800
mov es, ax
xor di, di
mov byte es:[di], 0x41 ; Error A - Unable to get memory map.
mov byte es:[di+1], ah
jmp $
.MMTest:
pop eax
add eax, ecx
cmp ebx, 0
jz .MMDone
mov di, bx
jmp .getMemoryMap
.MMDone:
.A20:
mov ax, 0x2402
int 0x15
jnc .A20GateCheckNoError
mov ax, 0xB800 ; Error B - Unable to check A20.
mov es, ax
xor di, di
mov word es:[di], 0xCF42
jmp $
.A20GateCheckNoError:
cmp al, 0
jg .A20GateDone
mov ax, 0x2401
int 0x15
jnc .A20GateDone
mov ax, 0xB800 ; Error C - Unable to enable A20.
mov es, ax
xor di, di
mov word es:[di], 0xCF43
jmp $
.A20GateDone:
.diskLoad:
.reset:
xor ax, ax
int 0x13
.load:
mov cx, 0x02
mov dh, 0
mov dl, ds:[SVO]
mov al, 20
push ax
mov ah, 0x02
mov bx, 0x2000
mov es, bx
xor bx, bx
int 0x13
pop cx
jc .counter
cmp al, cl
je .done
.counter:
cmp byte [.C], 3
jge .err
add byte [.C], 1
jmp .reset
.err:
mov ax, 0xB800 ; Error D - Drive read timeout.
mov es, ax
xor di, di
mov word es:[di], 0xCF44
jmp $
.done:
jmp 0x2000:0
.C: db 0x0
times 510-($-$$) db 0
dw 0xAA55 | 13.607692 | 62 | 0.521198 |
058ce0f4a188fe21c32f73784c46792efbdd7119 | 594 | asm | Assembly | oeis/046/A046030.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/046/A046030.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/046/A046030.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A046030: Digits are squares.
; Submitted by Simon Strandgaard
; 0,1,4,9,10,11,14,19,40,41,44,49,90,91,94,99,100,101,104,109,110,111,114,119,140,141,144,149,190,191,194,199,400,401,404,409,410,411,414,419,440,441,444,449,490,491,494,499,900,901,904,909,910,911,914,919,940,941,944,949,990,991,994,999,1000,1001,1004,1009,1010,1011,1014,1019,1040,1041,1044,1049,1090,1091,1094,1099,1100,1101,1104,1109,1110,1111,1114,1119,1140,1141,1144,1149,1190,1191,1194,1199,1400,1401,1404,1409
mov $3,1
lpb $0
mov $2,$0
div $0,4
mod $2,4
pow $2,2
mul $2,$3
add $1,$2
mul $3,10
lpe
mov $0,$1
| 37.125 | 417 | 0.705387 |
2db2623d6d18dba7cc26aea7e0b4cb4bcd6ec2f9 | 1,038 | asm | Assembly | libsrc/stdio/__scanf_handle_i.asm | grancier/z180 | e83f35e36c9b4d1457e40585019430e901c86ed9 | [
"ClArtistic"
] | 8 | 2017-01-18T12:02:17.000Z | 2021-06-12T09:40:28.000Z | libsrc/stdio/__scanf_handle_i.asm | grancier/z180 | e83f35e36c9b4d1457e40585019430e901c86ed9 | [
"ClArtistic"
] | 1 | 2017-03-06T07:41:56.000Z | 2017-03-06T07:41:56.000Z | libsrc/stdio/__scanf_handle_i.asm | RC2014Z80/z88dk | e5b9447b970e5fae26544b6d8aa5957c98ba0e6a | [
"ClArtistic"
] | 3 | 2017-03-07T03:19:40.000Z | 2021-09-15T17:59:19.000Z |
MODULE __scanf_handle_i
SECTION code_clib
PUBLIC __scanf_handle_i
EXTERN __scanf_common_start
EXTERN __scanf_getchar
EXTERN scanf_exit
EXTERN asm_isodigit
EXTERN __scanf_parse_number
EXTERN __scanf_b_fmt_entry_from_i
EXTERN __scanf_d_fmt_entry_from_i
EXTERN __scanf_o_fmt_entry_from_i
EXTERN __scanf_x_fmt_leader_found
EXTERN __scanf_x_only_0_on_stream
__scanf_handle_i:
call __scanf_common_start
jp c,scanf_exit
; Determine the radix if we can
cp '0'
jr z,handle_i_fmt_octalorhex
cp '%'
jp z,__scanf_b_fmt_entry_from_i
; It must be decimal
jp __scanf_d_fmt_entry_from_i
handle_i_fmt_octalorhex:
call __scanf_getchar
jp c,__scanf_x_only_0_on_stream
cp 'x'
jp z,__scanf_x_fmt_leader_found
cp 'X'
jp z,__scanf_x_fmt_leader_found
; Must be octal then
jp __scanf_o_fmt_entry_from_i
| 28.054054 | 44 | 0.659923 |
c467e3fc253eba10d10bf84fe7ebbb59e279d23c | 598 | asm | Assembly | oeis/173/A173766.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/173/A173766.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/173/A173766.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A173766: (10^n+11)/3.
; 7,37,337,3337,33337,333337,3333337,33333337,333333337,3333333337,33333333337,333333333337,3333333333337,33333333333337,333333333333337,3333333333333337,33333333333333337,333333333333333337,3333333333333333337,33333333333333333337,333333333333333333337,3333333333333333333337,33333333333333333333337,333333333333333333333337,3333333333333333333333337,33333333333333333333333337,333333333333333333333333337,3333333333333333333333333337,33333333333333333333333333337,333333333333333333333333333337
add $0,1
mov $1,10
pow $1,$0
sub $1,6
mul $1,4
div $1,12
add $1,6
mov $0,$1
| 49.833333 | 496 | 0.869565 |
aaf0e74ea959b6ceab28656c36a8755b90ebd50c | 1,229 | asm | Assembly | programs/oeis/123/A123208.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/123/A123208.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/123/A123208.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A123208: Start with 1, then alternately add 2 or double.
; 1,3,6,8,16,18,36,38,76,78,156,158,316,318,636,638,1276,1278,2556,2558,5116,5118,10236,10238,20476,20478,40956,40958,81916,81918,163836,163838,327676,327678,655356,655358,1310716,1310718,2621436,2621438,5242876,5242878,10485756,10485758,20971516,20971518,41943036,41943038,83886076,83886078,167772156,167772158,335544316,335544318,671088636,671088638,1342177276,1342177278,2684354556,2684354558,5368709116,5368709118,10737418236,10737418238,21474836476,21474836478,42949672956,42949672958,85899345916,85899345918,171798691836,171798691838,343597383676,343597383678,687194767356,687194767358,1374389534716,1374389534718,2748779069436,2748779069438,5497558138876,5497558138878,10995116277756,10995116277758,21990232555516,21990232555518,43980465111036,43980465111038,87960930222076,87960930222078,175921860444156,175921860444158,351843720888316,351843720888318,703687441776636,703687441776638,1407374883553276,1407374883553278,2814749767106556,2814749767106558,5629499534213116,5629499534213118
mul $0,2
add $0,1
mov $2,$0
add $2,1
lpb $0,1
sub $0,1
add $1,1
mul $1,2
add $2,1
add $1,$2
mov $2,$0
trn $2,2
sub $1,$2
sub $1,4
trn $2,1
mov $0,$2
lpe
| 58.52381 | 993 | 0.827502 |
90bec67df90a74c2023e0714f391c05397226e74 | 828 | asm | Assembly | programs/oeis/230/A230539.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/230/A230539.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/230/A230539.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A230539: a(n) = 3*n*2^(3*n-1).
; 0,12,192,2304,24576,245760,2359296,22020096,201326592,1811939328,16106127360,141733920768,1236950581248,10720238370816,92358976733184,791648371998720,6755399441055744,57420895248973824,486388759756013568,4107282860161892352,34587645138205409280,290536219160925437952,2434970217729660813312,20365205457375344984064,170005193383307227693056,1416709944860893564108800,11787026741242634453385216,97922991388784963151200256,812398150781030805402550272,6731298963614255244763987968,55707301767842112370460590080,460513694614161462262474211328,3802951800684688204490109616128,31374352355648677687043404333056,258600722446558797905327453896704,2129653008383425394514461385031680,17524001897555043246290425111117824,144086237824341466691721273135857664
mov $2,8
pow $2,$0
mul $0,$2
div $0,8
mul $0,12
| 92 | 745 | 0.902174 |
647484d1c86307de4f00c796bd358d9668057516 | 7,434 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2_notsx.log_526_1349.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2_notsx.log_526_1349.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2_notsx.log_526_1349.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r12
push %r13
push %r8
push %r9
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_normal_ht+0x9ef4, %rsi
nop
nop
nop
nop
nop
and $59874, %rbx
mov $0x6162636465666768, %rcx
movq %rcx, %xmm3
movups %xmm3, (%rsi)
nop
xor %r12, %r12
lea addresses_A_ht+0xf0f4, %r9
nop
sub $54322, %rbx
mov (%r9), %r8d
nop
nop
nop
nop
nop
cmp $54534, %r12
lea addresses_WT_ht+0x1a6f4, %r8
nop
nop
nop
nop
xor %r13, %r13
movw $0x6162, (%r8)
nop
nop
nop
nop
add %rbx, %rbx
lea addresses_D_ht+0x12cbc, %r12
clflush (%r12)
nop
nop
nop
nop
nop
xor %r9, %r9
mov (%r12), %rsi
nop
nop
nop
sub %r13, %r13
lea addresses_normal_ht+0x2ef4, %rsi
lea addresses_WC_ht+0x4620, %rdi
cmp $1617, %r9
mov $112, %rcx
rep movsq
nop
nop
nop
nop
nop
cmp %rsi, %rsi
lea addresses_A_ht+0x164f4, %rsi
lea addresses_D_ht+0x15ef4, %rdi
clflush (%rsi)
and $22617, %rbx
mov $106, %rcx
rep movsq
nop
add $59490, %r9
lea addresses_D_ht+0x1e474, %r12
nop
nop
nop
sub %rdi, %rdi
mov (%r12), %r13d
nop
nop
nop
nop
cmp $64871, %r9
lea addresses_normal_ht+0x1d7d8, %r13
nop
nop
nop
add %r12, %r12
movups (%r13), %xmm6
vpextrq $0, %xmm6, %rcx
nop
nop
nop
nop
cmp %rdi, %rdi
lea addresses_normal_ht+0x1e2c, %rbx
nop
nop
nop
cmp $806, %r13
movb (%rbx), %r9b
nop
nop
sub %rcx, %rcx
lea addresses_D_ht+0xe934, %rsi
lea addresses_WC_ht+0x1baf4, %rdi
nop
nop
nop
nop
add $44392, %r8
mov $66, %rcx
rep movsl
nop
nop
nop
nop
nop
and $57130, %r8
lea addresses_normal_ht+0x10318, %rdi
nop
nop
xor %rsi, %rsi
mov (%rdi), %cx
sub %r9, %r9
lea addresses_WT_ht+0x89f4, %rsi
lea addresses_WC_ht+0x1ecca, %rdi
clflush (%rdi)
nop
and $52507, %r9
mov $126, %rcx
rep movsb
nop
nop
nop
add $48938, %rbx
lea addresses_A_ht+0xe8c4, %rsi
lea addresses_UC_ht+0x12ae0, %rdi
nop
nop
nop
nop
nop
add $32873, %r12
mov $118, %rcx
rep movsq
sub $49556, %r13
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %r9
pop %r8
pop %r13
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r12
push %rbp
push %rbx
push %rcx
push %rdi
push %rsi
// Load
lea addresses_A+0x143f4, %rcx
nop
nop
nop
add $41507, %rbp
vmovups (%rcx), %ymm7
vextracti128 $0, %ymm7, %xmm7
vpextrq $0, %xmm7, %r11
nop
nop
nop
nop
nop
and %rcx, %rcx
// REPMOV
lea addresses_WC+0x76f4, %rsi
lea addresses_WT+0x186f4, %rdi
nop
inc %rbp
mov $74, %rcx
rep movsw
nop
nop
xor %r11, %r11
// Load
lea addresses_normal+0x15074, %rdi
nop
nop
nop
nop
nop
and %rbp, %rbp
mov (%rdi), %r12
nop
add %r12, %r12
// Store
lea addresses_A+0x10bf8, %rsi
nop
dec %rcx
movl $0x51525354, (%rsi)
nop
add %r12, %r12
// Store
lea addresses_WT+0xb6f4, %rdi
nop
nop
nop
xor $29932, %rbx
mov $0x5152535455565758, %r12
movq %r12, %xmm7
movups %xmm7, (%rdi)
nop
nop
nop
nop
nop
dec %rsi
// Load
lea addresses_UC+0x4876, %rbx
cmp $51490, %r11
mov (%rbx), %edi
cmp %rbp, %rbp
// Faulty Load
lea addresses_UC+0x1a6f4, %rbx
nop
nop
nop
nop
nop
dec %rcx
mov (%rbx), %rbp
lea oracles, %rsi
and $0xff, %rbp
shlq $12, %rbp
mov (%rsi,%rbp,1), %rbp
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %r12
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_UC', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}}
{'OP': 'LOAD', 'src': {'type': 'addresses_A', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 8, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WC', 'congruent': 11, 'same': False}, 'dst': {'type': 'addresses_WT', 'congruent': 9, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_normal', 'size': 8, 'AVXalign': True, 'NT': True, 'congruent': 7, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 2, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WT', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 11, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_UC', 'size': 4, 'AVXalign': False, 'NT': True, 'congruent': 1, 'same': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_UC', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 11, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 9, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 3, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 10, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 1, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 6, 'same': True}, 'dst': {'type': 'addresses_D_ht', 'congruent': 10, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 6, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 2, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 1, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 6, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 8, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 1, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 6, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 1, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 4, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 1, 'same': True}}
{'37': 526}
37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37
*/
| 25.458904 | 1,577 | 0.651063 |
b58b5597c02ac456b4b0a06e25dbda547e20c733 | 481 | asm | Assembly | oeis/177/A177138.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/177/A177138.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/177/A177138.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A177138: Numbers of the form (n!*(n+1))/2 with n or (n+1) prime.
; 1,3,12,60,360,2520,20160,19958400,239500800,3113510400,43589145600,177843714048000,3201186852864000,60822550204416000,1216451004088320000,12926008369442488320000,310224200866619719680000,4420880996869850977271808000000
seq $0,93515 ; Numbers k such that either k or k-1 is a prime.
seq $0,142 ; Factorial numbers: n! = 1*2*3*4*...*n (order of symmetric group S_n, number of permutations of n letters).
div $0,2
| 68.714286 | 220 | 0.777547 |
35e01c82c83b45881d6c422ef85455840325a819 | 1,382 | asm | Assembly | programs/oeis/181/A181389.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/181/A181389.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/181/A181389.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A181389: Absolute difference between (sum of previous terms) and (n-th-even square) with a(1) = 2.
; 2,2,0,12,20,28,36,44,52,60,68,76,84,92,100,108,116,124,132,140,148,156,164,172,180,188,196,204,212,220,228,236,244,252,260,268,276,284,292,300,308,316,324,332,340,348,356,364,372,380,388,396,404,412,420,428,436,444,452,460,468,476,484,492,500,508,516,524,532,540,548,556,564,572,580,588,596,604,612,620,628,636,644,652,660,668,676,684,692,700,708,716,724,732,740,748,756,764,772,780,788,796,804,812,820,828,836,844,852,860,868,876,884,892,900,908,916,924,932,940,948,956,964,972,980,988,996,1004,1012,1020,1028,1036,1044,1052,1060,1068,1076,1084,1092,1100,1108,1116,1124,1132,1140,1148,1156,1164,1172,1180,1188,1196,1204,1212,1220,1228,1236,1244,1252,1260,1268,1276,1284,1292,1300,1308,1316,1324,1332,1340,1348,1356,1364,1372,1380,1388,1396,1404,1412,1420,1428,1436,1444,1452,1460,1468,1476,1484,1492,1500,1508,1516,1524,1532,1540,1548,1556,1564,1572,1580,1588,1596,1604,1612,1620,1628,1636,1644,1652,1660,1668,1676,1684,1692,1700,1708,1716,1724,1732,1740,1748,1756,1764,1772,1780,1788,1796,1804,1812,1820,1828,1836,1844,1852,1860,1868,1876,1884,1892,1900,1908,1916,1924,1932,1940,1948,1956,1964,1972,1980
mul $0,4
mov $1,5
mov $3,3
lpb $0,1
sub $0,1
mov $2,$0
sub $2,4
add $3,3
trn $1,$3
trn $2,1
add $2,4
add $1,$2
mov $0,$1
sub $3,1
lpe
mul $1,2
sub $1,8
| 65.809524 | 1,107 | 0.732272 |
099f5b66a633b2799bfe0e658d861bf228457618 | 983 | asm | Assembly | x86/linux/getdents/getdents.asm | fbaligant/shellcodes | 4e450068b7fe43ceb47240741f2cca4e351932be | [
"MIT"
] | 3 | 2016-03-22T19:30:22.000Z | 2021-07-13T18:55:05.000Z | x86/linux/getdents/getdents.asm | fbaligant/shellcodes | 4e450068b7fe43ceb47240741f2cca4e351932be | [
"MIT"
] | null | null | null | x86/linux/getdents/getdents.asm | fbaligant/shellcodes | 4e450068b7fe43ceb47240741f2cca4e351932be | [
"MIT"
] | 2 | 2015-12-16T17:04:53.000Z | 2020-11-01T02:27:36.000Z | BITS 32
GLOBAL _start
_start:
jmp get_eip
run:
xor eax, eax
xor edi, edi
inc edi
inc edi
inc edi
inc edi
; fd = sys_open(".", 0, 0)
add eax, edi ; sys_open
inc eax
pop ebx ; filename
xor ecx, ecx ; flags = 0
xor edx, edx ; mode = 0
int 0x80
test eax,eax ; file exists?
jz error
mov ebx, eax ; fd
; getdents(fd,esp,0x1337)
mov edx, 0x1337 ;size
sub esp, edx ;make room on the stack
mov ecx, esp ;buffer
mov eax, 0x8d ;sys_getdents
int 0x80
mov edx, eax ;size
; close(fd)
mov eax, edi ; 4 + 2
inc eax
inc eax
int 0x80 ; fd in ebx
; sys_write
mov ecx, esp ; buffer
mov ebx, edi ; fd 4
mov eax, edi ; sys_write
int 0x80 ; size in edx
add esp, edx ; free up stack
error:
; sys_exit
xor eax, eax
inc eax
xor ebx,ebx
int 0x80
get_eip:
call run
filename:
db '.', 0x0
| 15.854839 | 43 | 0.535097 |
e849df5548d475c7c58d49178f4b8620a74ca16e | 4,613 | asm | Assembly | Projects/SchoolProjects/Project 8/Matrix.asm | Mani9723/X86-MASM-Assembly | 2a29fa34fba0548dc118690a2ab80e5d32675172 | [
"MIT"
] | null | null | null | Projects/SchoolProjects/Project 8/Matrix.asm | Mani9723/X86-MASM-Assembly | 2a29fa34fba0548dc118690a2ab80e5d32675172 | [
"MIT"
] | null | null | null | Projects/SchoolProjects/Project 8/Matrix.asm | Mani9723/X86-MASM-Assembly | 2a29fa34fba0548dc118690a2ab80e5d32675172 | [
"MIT"
] | null | null | null | INCLUDE Irvine32.inc
INCLUDE Macros.inc
.data
array DWORD 4 DUP(?)
rowSize = ($ - array)
DWORD 4 DUP(?)
DWORD 4 DUP(?)
DWORD 4 DUP(?)
siz WORD 4
overhund DWORD 16 DUP(?)
rowIndex DWORD ?
colIndex DWORD ?
sum DWORD 0
cout DWORD 0;
count DWORD 1
num DWORD 0
.code
;================M A I N========================
main PROC
mWrite <"This program manipulates a two-dimensional array">
call crlf
call run
exit
main endp
;=================================================
run PROC
mWrite<" Enter 16 values: (0-200)">
call crlf
call fillarray
call crlf
mWrite"========================================="
call crlf
mWrite " Right-Justified Values in 4X4 Matrix"
call crlf
call print
call crlf
mWrite"========================================="
call crlf
call readR
mov ecx, rowSize
call sumRow
call crlf
mWrite"========================================="
call crlf
call readC
mov ecx, rowSize
call sumCol
call crlf
call readChar
mWrite"========================================="
call crlf
mWrite" There are "
push eax
mov eax, cout
call writedec
mWrite" values >= 100"
pop eax
call crlf
mWritespace
call printHund
call crlf
call readchar
mWrite"========================================="
call crlf
mWrite<" Press any key to exchange rows 1 and 3">
call readchar
call exchange
mWrite"========================================="
call crlf
ret
run endp
;==========================================
fillarray PROC
xor eax, eax
mov edi, OFFSET overhund
mov ecx, LENGTHOF array*4
mov esi, OFFSET array
l1:
push eax
mWritespace
inc num
mov eax, num
call writedec
mWrite ": "
pop eax
call readInt
.IF eax > 200 || eax < 0
mWrite "ERROR: 0 < Value <= 200"
call crlf
dec num
jmp l1
.ENDIF
.IF eax >= 100
call addsum
.ENDIF
mov [esi], eax
add esi, TYPE array
loop l1
ret
fillarray endp
;==========================================
readR PROC
mWritespace
mWrite <"Enter a row (0-3): ">
call readInt
mov rowIndex, eax
ret
readR endp
;==========================================
readC PROC
mWritespace
mWrite <"Enter a column (0-3): ">
call readInt
mov colIndex, eax
ret
readC endp
;==============================================
print PROC
push eax
xor eax, eax
mov ecx, LENGTHOF array*4
mov esi, OFFSET array
l1:
mWritespace
mov eax, [esi]
.IF eax < 10
mWriteSpace
.ENDIF
.IF eax < 100
mWritespace
.ENDIF
call writedec
inc count
.IF count > 4
call crlf
call crlf
sub count, 4
.ENDIF
add esi, TYPE array
loop l1
pop eax
ret
print endp
;===============================================;
exchange PROC ;
mov edi, OFFSET array
mov esi, OFFSET array
mov ebx, 16
add edi, ebx
mov ecx, 48
add esi, ecx
label1:
.IF count > 4
jmp exs
.ENDIF
mov eax, [edi]
mov ebp, [esi]
xchg eax, ebp
mov [edi], eax
mov [esi], ebp
add edi, 4
add esi, 4
inc count
jmp label1 ;
exs:
call crlf
mov count, 1
call print ;
ret ;
exchange endp ;
;===============================================;
sumRow PROC USES ebx ecx esi
mul ecx ; rowIndex*rowSize = eax*Ecx
push eax
mov eax, ecx
mov edx, 0
div siz
mov ecx, eax
pop eax
mov ebx, OFFSET array
add ebx, eax
mov eax, 0
mov esi, 0
l1:
mov edx, [ebx+esi]
add eax, edx
add esi, 4
loop l1
push eax
mWrite " The sum of row "
mov eax, rowIndex
call writedec
mWrite " is: "
pop eax
call writedec
call crlf
ret
sumRow endp
;================================================
sumCol PROC USES ebx ecx esi
add ecx, eax ; rowIndex*rowSize = eax*Ecx
push eax
mov eax, ecx
mov edx, 0
div siz
mov ecx, eax
pop eax
mov ebx, OFFSET array
mov eax, colIndex
imul eax, 4
add ebx, eax
mov eax, 0
mov esi, 0
l1:
mov edx, [ebx+esi]
add eax, edx
add esi, rowSize
loop l1
push eax
mWrite " The sum of column "
mov eax, colIndex
call writedec
mWrite " is: "
pop eax
call writedec
call crlf
ret
sumCol endp
;=================================
addsum PROC
mov [edi], eax
add edi, TYPE array
inc cout
ret
addsum endp
printHund PROC
mov edi, OFFSET overhund
mov ecx, cout
l1:
.IF eax == 0
jmp exs
.ENDIF
mov eax, [edi]
add edi, TYPE overhund
call writedec
mWritespace
loop l1
exs:
ret
printHund endp
;==================================
end main
| 18.233202 | 61 | 0.520486 |
216b0b081ff220a32f0140cbabd80fd946d0f44c | 1,299 | asm | Assembly | libsrc/target/gb/stdio/pointxy_MODE1.asm | Frodevan/z88dk | f27af9fe840ff995c63c80a73673ba7ee33fffac | [
"ClArtistic"
] | 640 | 2017-01-14T23:33:45.000Z | 2022-03-30T11:28:42.000Z | libsrc/target/gb/stdio/pointxy_MODE1.asm | Frodevan/z88dk | f27af9fe840ff995c63c80a73673ba7ee33fffac | [
"ClArtistic"
] | 1,600 | 2017-01-15T16:12:02.000Z | 2022-03-31T12:11:12.000Z | libsrc/target/gb/stdio/pointxy_MODE1.asm | Frodevan/z88dk | f27af9fe840ff995c63c80a73673ba7ee33fffac | [
"ClArtistic"
] | 215 | 2017-01-17T10:43:03.000Z | 2022-03-23T17:25:02.000Z |
SECTION code_driver
PUBLIC pointxy_MODE1
GLOBAL vpeek_read_screen
GLOBAL generic_console_vpeek
GLOBAL screendollar_no_inverse_with_count
GLOBAL generic_console_font32
GLOBAL __mode
INCLUDE "target/gb/def/gb_globals.def"
;Entry: c = x,
; b = y
;Exit: nc = success
; a = character,
; c = failure
pointxy_MODE1:
ld hl,sp + -8
ld sp,hl
push hl ;Save buffer
call vpeek_read_screen
ld hl,generic_console_font32
ld a,(hl+)
ld h,(hl)
ld l,a
; Gameboy fonts are in GBDK format.
ld a,(hl+) ;Font type
inc hl ;Skips to the start of encoding table if present
and 3
ld de,128
cp FONT_128ENCODING
jr z,add_offset
ld de,0
cp FONT_NOENCODING
jr z,add_offset
ld d,1
add_offset:
add hl,de ;Now points to the font set
ld b,32
pop de ;Get the buffer back
call screendollar_no_inverse_with_count
push af
pop bc
add sp,8
push bc
pop af
ret
| 25.470588 | 72 | 0.491917 |
05ab25417a8ee6d388571696300cb50e596aaa0a | 1,187 | asm | Assembly | SLIDE_TextMode.asm | XlogicX/CactusCon2017 | d4cc716169dc8c6c2956c57079eb64342d5432bf | [
"BSD-2-Clause"
] | 2 | 2018-12-23T17:19:34.000Z | 2019-08-23T16:15:57.000Z | SLIDE_TextMode.asm | XlogicX/CactusCon2017 | d4cc716169dc8c6c2956c57079eb64342d5432bf | [
"BSD-2-Clause"
] | null | null | null | SLIDE_TextMode.asm | XlogicX/CactusCon2017 | d4cc716169dc8c6c2956c57079eb64342d5432bf | [
"BSD-2-Clause"
] | null | null | null | %include 'textmode.h'
call draw_border
mov di, 160 * 2 + 8 ;where to place cursor
mov si, line01 ;fetch the text
mov ah, 0x0A ;color
call slide_line
mov di, 160 * 4 + 16 ;where to place cursor
mov si, line02 ;fetch the text
call slide_line
call wait_loop
mov di, 160 * 8 + 8 ;where to place cursor
mov si, line03 ;fetch the text
call slide_line
call wait_loop
mov di, 160 * 10 + 16 ;where to place cursor
mov si, line04 ;fetch the text
call slide_line
mov di, 160 * 11 + 16 ;where to place cursor
mov si, line05 ;fetch the text
call slide_line
jmp endloop
endloop:
jmp endloop
%include 'slide_frame.h'
%include 'pause.h'
line01 db 0x15, 0x07, ' Graphics Mode 0x03:'
line02 db 0x20, 0x07, ' "Text Mode" - 80x25 characters'
line03 db 0x1B, 0x07, ' Each caracter is 2 bytes:'
line04 db 0x34, 0x07, ' Background Color - Text Color - Code 437 character'
line05 db 0x2D, ' 4 bits - 4 bits - 8 bits'
titlemessage db 0x13, 'Text Mode Graphics'
;BIOS sig and padding
times 510-($-$$) db 0
dw 0xAA55
;the 'screen' state is stored in memory and the 'di' register points to
;a memory location of one of the 'pixels' or colored characters | 24.22449 | 75 | 0.694187 |
2925b2470f02f35b43af78f047a9a3fac9364c95 | 904 | asm | Assembly | libsrc/adt/linkedlist/ADTemptylistadd.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 640 | 2017-01-14T23:33:45.000Z | 2022-03-30T11:28:42.000Z | libsrc/adt/linkedlist/ADTemptylistadd.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 1,600 | 2017-01-15T16:12:02.000Z | 2022-03-31T12:11:12.000Z | libsrc/adt/linkedlist/ADTemptylistadd.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 215 | 2017-01-17T10:43:03.000Z | 2022-03-23T17:25:02.000Z | ; 02.2003 aralbrec
SECTION code_clib
PUBLIC ADTemptylistadd
; enter: HL = LIST.count+1
; DE = new NODE.next
; item stored in new NODE
; exit : initialize list data structures for one item
; carry set to indicate success
.ADTemptylistadd
dec hl
ld (hl),1
inc hl
ld (hl),0 ; list count = 1
inc hl
ld (hl),1 ; current is INLIST
inc hl ; hl = current
dec de
dec de ; de = new NODE
ld (hl),d
inc hl
ld (hl),e ; current = new NODE
inc hl
ld (hl),d
inc hl
ld (hl),e ; head = new NODE
inc hl
ld (hl),d
inc hl
ld (hl),e ; tail = new NODE
inc de
inc de ; de = new NODE.next
xor a
ld (de),a
inc de
ld (de),a ; new NODE.next = NULL
inc de
ld (de),a
inc de
ld (de),a ; new NODE.prev = NULL
scf
ret
| 20.088889 | 53 | 0.507743 |
97880817d39f67ca9d2215260e065b8fc213d963 | 280 | asm | Assembly | programs/oeis/038/A038866.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/038/A038866.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/038/A038866.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A038866: (n+4)^3 - n^3.
; 124,208,316,448,604,784,988,1216,1468,1744,2044,2368,2716,3088,3484,3904,4348,4816,5308,5824,6364,6928,7516,8128,8764,9424,10108,10816,11548,12304,13084,13888,14716,15568,16444,17344,18268,19216,20188
mov $1,$0
add $1,6
mul $1,$0
mul $1,12
add $1,124
| 31.111111 | 202 | 0.721429 |
ac820ecfe14b7de6e62811dab36ded6b8d64c59a | 227 | asm | Assembly | programs/oeis/010/A010712.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/010/A010712.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/010/A010712.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A010712: Period 2: repeat (4,7).
; 4,7,4,7,4,7,4,7,4,7,4,7,4,7,4,7,4,7,4,7,4,7,4,7,4,7,4,7,4,7,4,7,4,7,4,7,4,7,4,7,4,7,4,7,4,7,4,7,4,7,4,7,4,7,4,7,4,7,4,7,4,7,4,7,4,7,4,7,4,7,4,7,4,7,4,7,4,7,4,7,4
mod $0,2
mul $0,3
add $0,4
| 32.428571 | 163 | 0.519824 |
90783ab75f30822f81342055ac795a22a9529eee | 271 | asm | Assembly | data/mapHeaders/Route16Gate2F.asm | AmateurPanda92/pokemon-rby-dx | f7ba1cc50b22d93ed176571e074a52d73360da93 | [
"MIT"
] | 9 | 2020-07-12T19:44:21.000Z | 2022-03-03T23:32:40.000Z | data/mapHeaders/Route16Gate2F.asm | JStar-debug2020/pokemon-rby-dx | c2fdd8145d96683addbd8d9075f946a68d1527a1 | [
"MIT"
] | 7 | 2020-07-16T10:48:52.000Z | 2021-01-28T18:32:02.000Z | data/mapHeaders/Route16Gate2F.asm | JStar-debug2020/pokemon-rby-dx | c2fdd8145d96683addbd8d9075f946a68d1527a1 | [
"MIT"
] | 2 | 2021-03-28T18:33:43.000Z | 2021-05-06T13:12:09.000Z | Route16Gate2F_h:
db GATE ; tileset
db ROUTE_16_GATE_2F_HEIGHT, ROUTE_16_GATE_2F_WIDTH ; dimensions (y, x)
dw Route16Gate2F_Blocks ; blocks
dw Route16Gate2F_TextPointers ; texts
dw Route16Gate2F_Script ; scripts
db 0 ; connections
dw Route16Gate2F_Object ; objects
| 30.111111 | 71 | 0.811808 |
3b6c06b9fb8d9382865626c12e9df47df61ef428 | 15,447 | asm | Assembly | ugbc/src/hw/vic1/text_at.asm | spotlessmind1975/ugbasic | 1df3c8fde8e80b479ece86b4ff2b97b599d57ff4 | [
"Apache-2.0"
] | 10 | 2021-10-03T13:44:25.000Z | 2022-03-10T23:53:32.000Z | ugbc/src/hw/vic1/text_at.asm | spotlessmind1975/ugbasic | 1df3c8fde8e80b479ece86b4ff2b97b599d57ff4 | [
"Apache-2.0"
] | 379 | 2021-08-12T09:46:09.000Z | 2022-03-27T11:29:12.000Z | ugbc/src/hw/vic1/text_at.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.
; ****************************************************************************/
;* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
;* *
;* TEXT AT GIVEN POSITION ON VIC-I *
;* *
;* by Marco Spedaletti *
;* *
;* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
TEXTPTR = $20
TEXTSIZE = $24
TABSTODRAW = $36
SCREENCODE = $2E
TEXTATDECODE:
CMP #32
BCS TEXTATXSP128
JMP TEXTATSP128
TEXTATXSP128:
CMP #64
BCS TEXTATXSP0
JMP TEXTATDECODE0
TEXTATXSP0:
CMP #96
BCS TEXTATXSM64
JMP TEXTATSM64
TEXTATXSM64:
CMP #160
BCS TEXTATXSP64
JMP TEXTATSP64
TEXTATXSP64:
CMP #192
BCS TEXTATX2SM64
JMP TEXTATSM64
TEXTATX2SM64:
CMP #224
BCS TEXTATX2SM192
JMP TEXTATSM192
TEXTATX2SM192:
JMP TEXTATDECODE0
TEXTATSP64:
CLC
ADC #64
JMP TEXTATDECODE0
TEXTATSP128:
ADC #128
JMP TEXTATDECODE0
TEXTATSM64:
SBC #63
JMP TEXTATDECODE0
TEXTATSM192:
SBC #191
JMP TEXTATDECODE0
TEXTATDECODE0:
STA SCREENCODE
RTS
TEXTAT:
LDA TEXTSIZE
BNE TEXTATGO
RTS
TEXTATGO:
LDA TEXTADDRESS
STA COPYOFTEXTADDRESS
LDA TEXTADDRESS+1
STA COPYOFTEXTADDRESS+1
LDA #0
STA TABSTODRAW
LDA COLORMAPADDRESS
STA COPYOFCOLORMAPADDRESS
LDA COLORMAPADDRESS+1
STA COPYOFCOLORMAPADDRESS+1
SEI
LDA CURRENTMODE
CMP #0
BNE TEXTATGO0X
JMP TEXTATTILEMODE
TEXTATGO0X:
CMP #1
BNE TEXTATGO1X
JMP TEXTATTILEMODE
TEXTATGO1X:
CMP #2
BNE TEXTATGO2X
JMP TEXTATBITMAPMODE
TEXTATGO2X:
CMP #3
BNE TEXTATGO3X
JMP TEXTATBITMAPMODE
TEXTATGO3X:
CMP #4
BNE TEXTATGO4X
JMP TEXTATTILEMODE
TEXTATGO4X:
CLI
RTS
;-----------------------------------------------------------------------------
; BITMAP MODE
;-----------------------------------------------------------------------------
TEXTATBITMAPMODE:
; RTS
; LDX XCURSYS
; LDY YCURSYS
; CLC
; LDA PLOTVBASELO,Y ;table of $A000 row base addresses
; ADC PLOT8LO,X ;+ (8 * Xcell)
; STA PLOTDEST ;= cell address
; LDA PLOTVBASEHI,Y ;do the high byte
; ADC PLOT8HI,X
; STA PLOTDEST+1
; CLC
; TXA
; ADC PLOTCVBASELO,Y ;table of $8400 row base addresses
; STA PLOTCDEST ;= cell address
; LDA #0
; ADC PLOTCVBASEHI,Y ;do the high byte
; STA PLOTCDEST+1
; LDX TEXTSIZE
; LDY #$0
; TEXTATBMLOOP2:
; LDA TABSTODRAW
; BEQ TEXTATBMNSKIPTAB
; JMP TEXTATBMSKIPTAB
; TEXTATBMNSKIPTAB:
; LDA (TEXTPTR),Y
; CMP #31
; BCS TEXTATBMXCC
; JMP TEXTATBMCC
; TEXTATBMXCC:
; JSR TEXTATDECODE
; JMP TEXTATBMSP0
; TEXTATBMTAB:
; LDA XCURSYS
; TEXTATBMTAB2:
; CMP TABCOUNT
; BCC TEXTATBMTAB3
; SEC
; SBC TABCOUNT
; JMP TEXTATBMTAB2
; TEXTATBMTAB3:
; STA TMPPTR
; LDA TABCOUNT
; SEC
; SBC TMPPTR
; STA TABSTODRAW
; JMP TEXTATBMNEXT
; TEXTATBMCC:
; CMP #09
; BEQ TEXTATBMTAB
; CMP #01
; BEQ TEXTATBMPEN
; CMP #02
; BEQ TEXTATBMPAPER
; CMP #03
; BEQ TEXTATBMCMOVEPREPARE
; CMP #04
; BEQ TEXTATBMXAT
; JMP TEXTATBMNEXT
; TEXTATBMXAT:
; JMP TEXTATBMAT
; TEXTATBMPEN:
; INC TEXTPTR
; DEX
; LDA TEXTWW
; AND #$2
; BEQ TEXTATBMPENDISABLED
; LDA (TEXTPTR), Y
; ASL A
; ASL A
; ASL A
; ASL A
; STA TEXTPEN
; TEXTATBMPENDISABLED:
; INC TEXTPTR
; DEY
; JMP TEXTATBMNEXT
; TEXTATBMPAPER:
; INC TEXTPTR
; DEX
; LDA TEXTWW
; AND #$1
; BEQ TEXTATBMPAPERDISABLED
; LDA (TEXTPTR), Y
; STA TEXTPAPER
; TEXTATBMPAPERDISABLED:
; INC TEXTPTR
; DEY
; JMP TEXTATBMNEXT
; TEXTATBMCMOVEPREPARE:
; INC TEXTPTR
; DEX
; LDA (TEXTPTR), Y
; STA CLINEX
; INC TEXTPTR
; DEX
; LDA (TEXTPTR), Y
; STA CLINEY
; TEXTATBMCMOVE:
; CLC
; LDA CLINEX
; ADC XCURSYS
; STA XCURSYS
; LDA CLINEY
; ADC YCURSYS
; STA YCURSYS
; JMP TEXTATBMNEXT
; TEXTATBMAT:
; INC TEXTPTR
; DEX
; LDA (TEXTPTR), Y
; SEC
; SBC XCURSYS
; STA CLINEX
; INC TEXTPTR
; DEX
; LDA (TEXTPTR), Y
; SEC
; SBC YCURSYS
; STA CLINEY
; JMP TEXTATBMCMOVE
; TEXTATBMSP0:
; TYA
; PHA
; TXA
; PHA
; LDX XCURSYS
; LDY YCURSYS
; CLC
; LDA PLOTVBASELO,Y ;table of $A000 row base addresses
; ADC PLOT8LO,X ;+ (8 * Xcell)
; STA PLOTDEST ;= cell address
; LDA PLOTVBASEHI,Y ;do the high byte
; ADC PLOT8HI,X
; STA PLOTDEST+1
; CLC
; TXA
; ADC PLOTCVBASELO,Y ;table of $8400 row base addresses
; STA PLOTCDEST ;= cell address
; LDA #0
; ADC PLOTCVBASEHI,Y ;do the high byte
; STA PLOTCDEST+1
; CLC
; TXA
; ADC PLOTC2VBASELO,Y ;table of $8400 row base addresses
; STA PLOTC2DEST ;= cell address
; LDA #0
; ADC PLOTC2VBASEHI,Y ;do the high byte
; STA PLOTC2DEST+1
; PLA
; TAX
; PLA
; TAY
; TYA
; PHA
; LDY #0
; LDA SCREENCODE
; STA TMPPTR
; LDA #0
; STA TMPPTR+1
; CLC
; ASL TMPPTR
; ROL TMPPTR+1
; CLC
; ASL TMPPTR
; ROL TMPPTR+1
; CLC
; ASL TMPPTR
; ROL TMPPTR+1
; CLC
; LDA #$0
; ADC TMPPTR
; STA TMPPTR
; LDA #$98
; ADC TMPPTR+1
; STA TMPPTR+1
; TEXTATBMSP0L1:
; LDA CURRENTMODE
; CMP #3
; BEQ TEXTATBMSP0L1B3
; TEXTATBMSP0L1B2:
; LDA (TMPPTR),Y
; STA (PLOTDEST),Y
; JMP TEXTATBMSP0L1X
; TEXTATBMSP0L1B3:
; LDA (TMPPTR),Y
; CLC
; ASL
; ORA (TMPPTR),Y
; STA (PLOTDEST),Y
; JMP TEXTATBMSP0L1X
; TEXTATBMSP0L1X:
; INY
; CPY #8
; BNE TEXTATBMSP0L1
; LDA CURRENTMODE
; CMP #3
; BEQ TEXTATBMC3
; LDA TEXTWW
; AND #$2
; BEQ TEXTATBMCNOPEN
; LDY #0
; LDA (PLOTCDEST),Y
; ORA TEXTPEN
; STA (PLOTCDEST),Y
; TEXTATBMCNOPEN:
; LDA TEXTWW
; AND #$1
; BEQ TEXTATBMCNOPAPER
; LDA (PLOTCDEST),Y
; AND #$f0
; ORA TEXTPAPER
; STA (PLOTCDEST),Y
; TEXTATBMCNOPAPER:
; JMP TEXTATBMF
; TEXTATBMC3:
; LDA TEXTWW
; AND #$2
; BEQ TEXTATBMC3NOPEN
; LDY #0
; LDA TEXTPEN
; STA (PLOTC2DEST),Y
; LDA #0
; STA (PLOTCDEST),Y
; LDA TEXTPEN
; ASL
; ASL
; ASL
; ASL
; ORA (PLOTCDEST),Y
; STA (PLOTCDEST),Y
; TEXTATBMC3NOPEN:
; JMP TEXTATBMF
; TEXTATBMF:
; PLA
; TAY
; JMP TEXTATBMINCX
; TEXTATBMSKIPTAB:
; DEC TABSTODRAW
; JMP TEXTATBMINCX
; TEXTATBMINCX:
; INC XCURSYS
; LDA XCURSYS
; CMP CURRENTTILESWIDTH
; BEQ TEXTATBMNEXT2
; JMP TEXTATBMNEXT
; TEXTATBMNEXT2:
; LDA #0
; STA XCURSYS
; INC YCURSYS
; LDA YCURSYS
; CMP CURRENTTILESHEIGHT
; BEQ TEXTATBMNEXT3
; JMP TEXTATBMNEXT
; TEXTATBMNEXT3:
; ; scrolling ?
; TEXTATBMNEXT:
; LDA TABSTODRAW
; BEQ TEXTATBMXLOOP2
; JMP TEXTATBMLOOP2
; TEXTATBMXLOOP2:
; INY
; DEX
; BEQ TEXTATBMEND
; JMP TEXTATBMLOOP2
; TEXTATBMEND:
; CLI
RTS
;-----------------------------------------------------------------------------
; TILE MODE
;-----------------------------------------------------------------------------
TEXTATTILEMODE:
LDX YCURSYS
BEQ TEXTATSKIP
TEXTATLOOP1:
CLC
LDA CURRENTTILESWIDTH
ADC COPYOFTEXTADDRESS
STA COPYOFTEXTADDRESS
LDA #0
ADC COPYOFTEXTADDRESS+1
STA COPYOFTEXTADDRESS+1
DEX
BNE TEXTATLOOP1
LDX YCURSYS
TEXTATLOOPC1:
CLC
LDA CURRENTTILESWIDTH
ADC COPYOFCOLORMAPADDRESS
STA COPYOFCOLORMAPADDRESS
LDA #0
ADC COPYOFCOLORMAPADDRESS+1
STA COPYOFCOLORMAPADDRESS+1
DEX
BNE TEXTATLOOPC1
TEXTATSKIP:
CLC
LDA XCURSYS
ADC COPYOFTEXTADDRESS
STA COPYOFTEXTADDRESS
LDA #0
ADC COPYOFTEXTADDRESS+1
STA COPYOFTEXTADDRESS+1
CLC
LDA XCURSYS
ADC COPYOFCOLORMAPADDRESS
STA COPYOFCOLORMAPADDRESS
LDA #0
ADC COPYOFCOLORMAPADDRESS+1
STA COPYOFCOLORMAPADDRESS+1
LDX TEXTSIZE
LDY #$0
TEXTATLOOP2:
LDA TABSTODRAW
BEQ TEXTATNSKIPTAB
JMP TEXTATSKIPTAB
TEXTATNSKIPTAB:
LDA (TEXTPTR),Y
CMP #31
BCS TEXTATXCC
JMP TEXTATCC
TEXTATXCC:
JSR TEXTATDECODE
JMP TEXTATSP0
TEXTATTAB:
LDA XCURSYS
TEXTATTAB2:
CMP TABCOUNT
BCC TEXTATTAB3
SEC
SBC TABCOUNT
JMP TEXTATTAB2
TEXTATTAB3:
STA TMPPTR
LDA TABCOUNT
SEC
SBC TMPPTR
STA TABSTODRAW
JMP TEXTATNEXT
TEXTATCC:
CMP #13
BEQ TEXTATLF
CMP #10
BEQ TEXTATLF
CMP #09
BEQ TEXTATTAB
CMP #01
BEQ TEXTATPEN
CMP #02
BEQ TEXTATPAPER
CMP #03
BEQ TEXTATCMOVEPREPARE
CMP #04
BEQ TEXTATXAT
CMP #05
BEQ TEXTATCLS
JMP TEXTATNEXT
TEXTATCLS:
INC TEXTPTR
DEX
JSR CLS
JMP TEXTATNEXT
TEXTATXAT:
JMP TEXTATAT
TEXTATLF:
SEC
LDA CURRENTTILESWIDTH
SBC XCURSYS
SBC #1
CLC
ADC COPYOFTEXTADDRESS
STA COPYOFTEXTADDRESS
LDA #0
ADC COPYOFTEXTADDRESS+1
STA COPYOFTEXTADDRESS+1
SEC
LDA CURRENTTILESWIDTH
SBC XCURSYS
SBC #1
CLC
ADC COPYOFCOLORMAPADDRESS
STA COPYOFCOLORMAPADDRESS
LDA #0
ADC COPYOFCOLORMAPADDRESS+1
STA COPYOFCOLORMAPADDRESS+1
JMP TEXTATNEXT2
TEXTATPEN:
INC TEXTPTR
DEX
LDA TEXTWW
AND #$2
BEQ TEXTATPENDISABLED
LDA (TEXTPTR), Y
STA _PEN
TEXTATPENDISABLED:
INC TEXTPTR
DEY
JMP TEXTATNEXT
TEXTATPAPER:
INC TEXTPTR
DEX
LDA TEXTWW
AND #$1
BEQ TEXTATPAPERDISABLED
LDA (TEXTPTR), Y
; STA $d021
; STA $d020
TEXTATPAPERDISABLED:
INC TEXTPTR
DEY
JMP TEXTATNEXT
TEXTATCMOVEPREPARE:
INC TEXTPTR
DEX
LDA (TEXTPTR), Y
STA CLINEX
INC TEXTPTR
DEX
LDA (TEXTPTR), Y
STA CLINEY
TEXTATCMOVE:
CLC
LDA CLINEX
ADC XCURSYS
CMP #$80
BCS TEXTATCMOVESKIPX
CMP CURRENTTILESWIDTH
BCS TEXTATCMOVESKIPX
STA XCURSYS
LDA CLINEX
CMP #$80
BCC TEXTATCMOVEADDPX
TEXTATCMOVESUBPX:
EOR #$FF
CLC
ADC #$1
STA CLINEX
SEC
LDA COPYOFTEXTADDRESS
SBC CLINEX
STA COPYOFTEXTADDRESS
LDA COPYOFTEXTADDRESS+1
SBC #0
STA COPYOFTEXTADDRESS+1
SEC
LDA COPYOFCOLORMAPADDRESS
SBC CLINEX
STA COPYOFCOLORMAPADDRESS
LDA COPYOFCOLORMAPADDRESS+1
SBC #0
STA COPYOFCOLORMAPADDRESS+1
JMP TEXTATCMOVESKIPX
TEXTATCMOVEADDPX:
CLC
ADC COPYOFTEXTADDRESS
STA COPYOFTEXTADDRESS
LDA #0
ADC COPYOFTEXTADDRESS+1
STA COPYOFTEXTADDRESS+1
JMP TEXTATCMOVESKIPX
TEXTATCMOVESKIPX:
CLC
LDA CLINEY
ADC YCURSYS
CMP #$80
BCS TEXTATCMOVESKIPY
CMP CURRENTTILESHEIGHT
BCS TEXTATCMOVESKIPY
STA YCURSYS
TEXTATCMOVEADDPY:
TXA
PHA
LDA CLINEY
CMP #$80
BCC TEXTATCMOVELOOPYP
JMP TEXTATCMOVELOOPYM
TEXTATCMOVELOOPYP:
TAX
TEXTATCMOVELOOPY:
CLC
LDA CURRENTTILESWIDTH
ADC COPYOFTEXTADDRESS
STA COPYOFTEXTADDRESS
LDA #0
ADC COPYOFTEXTADDRESS+1
STA COPYOFTEXTADDRESS+1
CLC
LDA CURRENTTILESWIDTH
ADC COPYOFCOLORMAPADDRESS
STA COPYOFCOLORMAPADDRESS
LDA #0
ADC COPYOFCOLORMAPADDRESS+1
STA COPYOFCOLORMAPADDRESS+1
DEX
BNE TEXTATCMOVELOOPY
PLA
TAX
JMP TEXTATCMOVESKIPY
TEXTATCMOVELOOPYM:
EOR #$FF
CLC
ADC #$1
STA CLINEY
TAX
TEXTATCMOVELOOPY2:
SEC
LDA COPYOFTEXTADDRESS
SBC CURRENTTILESWIDTH
STA COPYOFTEXTADDRESS
LDA COPYOFTEXTADDRESS+1
SBC #0
STA COPYOFTEXTADDRESS+1
SEC
LDA COPYOFCOLORMAPADDRESS
SBC CURRENTTILESWIDTH
STA COPYOFCOLORMAPADDRESS
LDA COPYOFCOLORMAPADDRESS+1
SBC #0
STA COPYOFCOLORMAPADDRESS+1
DEX
BNE TEXTATCMOVELOOPY2
PLA
TAX
JMP TEXTATCMOVESKIPY
TEXTATCMOVESKIPY:
INC TEXTPTR
DEY
JMP TEXTATNEXT
TEXTATAT:
INC TEXTPTR
DEX
LDA (TEXTPTR), Y
SEC
SBC XCURSYS
STA CLINEX
INC TEXTPTR
DEX
LDA (TEXTPTR), Y
SEC
SBC YCURSYS
STA CLINEY
JMP TEXTATCMOVE
TEXTATSP0:
STA (COPYOFTEXTADDRESS),Y
LDA TEXTWW
AND #$2
BEQ TEXTATCNOPEN
LDA _PEN
AND #$07
STA (COPYOFCOLORMAPADDRESS),Y
TEXTATCNOPEN:
JMP TEXTATINCX
TEXTATSKIPTAB:
DEC TABSTODRAW
JMP TEXTATINCX
TEXTATINCX:
INC XCURSYS
LDA XCURSYS
CMP CURRENTTILESWIDTH
BEQ TEXTATNEXT2
JMP TEXTATNEXT
TEXTATNEXT2:
LDA #0
STA XCURSYS
INC YCURSYS
LDA YCURSYS
CMP CURRENTTILESHEIGHT
BEQ TEXTATNEXT3
JMP TEXTATNEXT
TEXTATNEXT3:
LDA COPYOFTEXTADDRESS
PHA
LDA COPYOFTEXTADDRESS+1
PHA
LDA #$FE
STA DIRECTION
JSR VSCROLLT
PLA
STA COPYOFTEXTADDRESS+1
PLA
STA COPYOFTEXTADDRESS
DEC YCURSYS
SEC
LDA COPYOFTEXTADDRESS
SBC CURRENTTILESWIDTH
STA COPYOFTEXTADDRESS
LDA COPYOFTEXTADDRESS+1
SBC #0
STA COPYOFTEXTADDRESS+1
SEC
LDA COPYOFCOLORMAPADDRESS
SBC CURRENTTILESWIDTH
STA COPYOFCOLORMAPADDRESS
LDA COPYOFCOLORMAPADDRESS+1
SBC #0
STA COPYOFCOLORMAPADDRESS+1
TEXTATNEXT:
LDA TABSTODRAW
BEQ TEXTATXLOOP2
JMP TEXTATLOOP2
TEXTATXLOOP2:
INY
DEX
BEQ TEXTATEND
JMP TEXTATLOOP2
TEXTATEND:
CLI
RTS
| 18.345606 | 80 | 0.583867 |
15e6459aaf2691fbf39a5bf65baf1252009a169b | 7,960 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2.log_21829_444.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2.log_21829_444.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2.log_21829_444.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r11
push %r14
push %r15
push %r8
push %rcx
push %rdi
push %rsi
lea addresses_WC_ht+0xc7b6, %rsi
lea addresses_WT_ht+0x3bb6, %rdi
nop
nop
nop
nop
nop
xor $37018, %r10
mov $6, %rcx
rep movsq
nop
and $30951, %r11
lea addresses_WT_ht+0x11736, %rsi
lea addresses_WC_ht+0x1391e, %rdi
nop
nop
nop
xor $43608, %r15
mov $119, %rcx
rep movsb
nop
cmp $47628, %rcx
lea addresses_D_ht+0x1cfb6, %r15
nop
nop
nop
nop
nop
sub $65318, %r8
mov (%r15), %edi
nop
nop
nop
nop
nop
cmp %rdi, %rdi
lea addresses_UC_ht+0x276, %rsi
lea addresses_WT_ht+0xb7b6, %rdi
and %r14, %r14
mov $124, %rcx
rep movsq
nop
nop
and $49766, %r10
lea addresses_D_ht+0x20ac, %rdi
nop
nop
nop
nop
inc %r8
mov $0x6162636465666768, %rcx
movq %rcx, %xmm2
movups %xmm2, (%rdi)
nop
cmp %r8, %r8
lea addresses_WT_ht+0x79e8, %rcx
nop
nop
nop
nop
nop
add $25160, %rdi
mov (%rcx), %r10w
add %rcx, %rcx
lea addresses_UC_ht+0x1c7b6, %rsi
clflush (%rsi)
nop
and %rcx, %rcx
movb (%rsi), %r10b
nop
nop
nop
nop
nop
add %r15, %r15
lea addresses_UC_ht+0x12a76, %r8
nop
nop
nop
nop
add $52245, %r14
mov $0x6162636465666768, %rsi
movq %rsi, %xmm0
movups %xmm0, (%r8)
nop
nop
nop
nop
sub %r8, %r8
lea addresses_WT_ht+0xcef0, %rsi
lea addresses_A_ht+0x13bb6, %rdi
nop
nop
nop
nop
nop
add $46925, %r8
mov $108, %rcx
rep movsb
add %rdi, %rdi
lea addresses_A_ht+0x1da76, %rsi
nop
nop
dec %r10
movl $0x61626364, (%rsi)
nop
nop
nop
nop
cmp %r8, %r8
lea addresses_normal_ht+0x5196, %rsi
lea addresses_WT_ht+0x197b6, %rdi
cmp %r11, %r11
mov $92, %rcx
rep movsw
inc %r11
lea addresses_UC_ht+0x1db48, %rsi
lea addresses_D_ht+0x113b6, %rdi
nop
and $61960, %r11
mov $9, %rcx
rep movsb
nop
nop
nop
nop
nop
add %rsi, %rsi
pop %rsi
pop %rdi
pop %rcx
pop %r8
pop %r15
pop %r14
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r13
push %r14
push %r8
push %r9
push %rdx
push %rsi
// Store
lea addresses_US+0x1ff46, %r9
clflush (%r9)
nop
nop
nop
nop
add $56733, %rsi
mov $0x5152535455565758, %r8
movq %r8, %xmm3
movups %xmm3, (%r9)
nop
nop
nop
nop
nop
sub %r14, %r14
// Store
lea addresses_UC+0xbf40, %r13
clflush (%r13)
nop
nop
nop
nop
nop
sub $52340, %rdx
mov $0x5152535455565758, %r8
movq %r8, %xmm3
movntdq %xmm3, (%r13)
nop
nop
nop
nop
nop
add $64873, %r11
// Store
mov $0x4742900000000d26, %rsi
nop
nop
nop
dec %r14
mov $0x5152535455565758, %rdx
movq %rdx, (%rsi)
and %r13, %r13
// Faulty Load
lea addresses_normal+0x5bb6, %r14
and $37581, %rdx
mov (%r14), %r13
lea oracles, %r11
and $0xff, %r13
shlq $12, %r13
mov (%r11,%r13,1), %r13
pop %rsi
pop %rdx
pop %r9
pop %r8
pop %r14
pop %r13
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_normal', 'size': 4, 'AVXalign': True, 'NT': False, 'congruent': 0, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_US', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 3, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC', 'size': 16, 'AVXalign': False, 'NT': True, 'congruent': 0, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_NC', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 4, 'same': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_normal', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}}
<gen_prepare_buffer>
{'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 11, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 4, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 2, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'size': 4, 'AVXalign': False, 'NT': True, 'congruent': 6, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 5, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 6, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 1, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 1, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 9, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 5, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 11, 'same': True}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 6, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 3, 'same': True}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 9, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 10, 'same': False}}
{'34': 21829}
34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34
*/
| 32.096774 | 2,999 | 0.658291 |
5edb28f35651d1c763fdafc578c0dbc0cc3f64db | 297 | asm | Assembly | projects/project2_lc3_symbol_table_python/p2.asm | pegurnee/2015-01-341 | f7de0e905196083c2ce8068f258e7db6fa80fa28 | [
"MIT"
] | null | null | null | projects/project2_lc3_symbol_table_python/p2.asm | pegurnee/2015-01-341 | f7de0e905196083c2ce8068f258e7db6fa80fa28 | [
"MIT"
] | null | null | null | projects/project2_lc3_symbol_table_python/p2.asm | pegurnee/2015-01-341 | f7de0e905196083c2ce8068f258e7db6fa80fa28 | [
"MIT"
] | null | null | null | ; this is the second sample source
;
.ORIG x2000
LD R1, A
ENTER BRz TARGET ; this is a comment
ADD R1, R1, 6
BR ENTER
;
TARGET ST R1, X
PUTS
HALT
X .FILL 0xFFFF
Y .BLKW 3
A .FILL 0x0001
.END
| 18.5625 | 45 | 0.451178 |
e9e644e1c94c04ee07431987399621193093ae74 | 16,304 | asm | Assembly | MarkO/COCOIODRV-4C.asm | MarkO-555/CoCoIO-NIC-Base-Code | f3084e1f1a351d950812ea351f777b279a2a2110 | [
"BSD-3-Clause"
] | 1 | 2021-12-12T04:03:37.000Z | 2021-12-12T04:03:37.000Z | MarkO/COCOIODRV-4C.asm | MarkO-555/CoCoIO-NIC-Base-Code | f3084e1f1a351d950812ea351f777b279a2a2110 | [
"BSD-3-Clause"
] | null | null | null | MarkO/COCOIODRV-4C.asm | MarkO-555/CoCoIO-NIC-Base-Code | f3084e1f1a351d950812ea351f777b279a2a2110 | [
"BSD-3-Clause"
] | 1 | 2021-12-14T04:18:19.000Z | 2021-12-14T04:18:19.000Z | ;*********************************************************************
;* Title: COCOIODRV-4C.asm
;*********************************************************************
;* Author: R. Allen Murphey, & MarkO
;*
;* License: Contributed 2021 by R. Allen Murphey to CoCoIO Development
;*
;* Description: CoCoIO with WIZnet W5100S driver code
;*
;* Documentation: https://www.wiznet.io/product-item/w5100s/
;*
;* Include Files: W5100SEQU.asm - W5100S Equates
;* COCOIOEQU.asm - CoCoIO Equates
;* COCOIOCFG.asm - CoCoIO Config Data
;*
;* Assembler: lwasm 1.4.2
;*
;* Revision History:
;* Rev # Date Who Comments
;* ----- ----------- ------ ---------------------------------------
;* 00 2021 RAM Initial Reset and Config functions
;*********************************************************************
include "W5100SEQU.asm"
include "COCOIOEQU.asm"
PIA0BD: equ $FF02 ; PIA 0 PORT B DATA
PIA0BC: equ $FF03 ; PIA 0 PORT B CONTROL
POLCAT: equ $A000
CHROUT: equ $A002
org $7800
RESETP: jmp W5100_RST ;$7800
CONFIG: jmp W5100_CFG ;$7803
SETREG: jmp W5100_SETREG ;$7806
GATEWAY: jmp W5100_GATEWAY ;$7809
SUBNET: jmp W5100_SUBNET ;$780C
HARDWARE: jmp W5100_HARDWARE ;$780F
IPADDR: jmp W5100_IPADDR ;$7812
MPISLOT: jmp MPISLOT1 ;$7815
DISPGW: jmp DISP_GATEWAY ;$7818
DISPSN: jmp DISP_SUBNET ;$781B
DISPHW: jmp DISP_HARDWARE ;$781E
DISPIPADD: jmp DISP_IPADDR ;$7821
; |12345678901234567890123456789012|
LABEL01: fcc "COCOIO NIC DRIVER v0.00.04c"
fcb $0D,$0A,$00
; fcb $00
LABEL02: fcc "R. Allen Murphey, MarkO"
fcb $0D,$0A,$00
; fcb $00
LABEL03: fcc " & Rick Ulland"
fcb $0D,$0A,$00
; fcb $00
LABEL04: fcc "Copyleft 2021, The CoCoIO Group"
fcb $0D,$0A,$0D,$0A,$00
; fcb $00
LABEL10: fcc "WizNet5100: "
; fcb $0D,$0A,$00
fcb $00
LABEL11: fcc "Located @FF68"
fcb $0D,$0A,$00
; fcb $00
LABEL12: fcc "Located @FF78"
fcb $0D,$0A,$00
; fcb $00
LABEL13: fcc "NOT Located"
fcb $0D,$0A,$00
; fcb $00
COCOIOPORT: fdb $0000
GWLABEL: fcc "GATEWAY: "
; fcb $0D,$0A,$00
fcb $00
MYGATEWAY: ; My Gateway IP Address
fcb 192,168,254,254
SNLABEL: fcc "SUBNET: "
; fcb $0D,$0A,$00
fcb $00
MYSUBNET: ; My Subnet Mask
fcb 255,255,255,0
MALABEL: fcc "MAC ADDRESS: "
; fcb $0D,$0A,$00
fcb $00
MYMAC: ; My Source Hardware Address
fcb $00,$08,$DC,$00,$00,$01
IPLABEL: fcc "IP ADDRESS: "
; fcb $0D,$0A,$00
fcb $00
MYIP: ; My Source IP Address
fcb 192,168,254,10
; End of My CoCoIO configuration
COCOIOTST1: fdb $00
COCOIOTST2: fdb $00
COCOIOTST3: fdb $00
COCOIOTST4: fdb $00
W5100_RST: ; Reset the CoCoIO WIZnet 5100S and Determine the I/O Port location
; jsr MPISLOT1
; jsr DALLY
ldd #LABEL01 ; Driver Banner 01, Hello World Message
jsr DISPSTR0 ; Display the Label
ldd #LABEL02 ; Driver Banner 02
jsr DISPSTR0 ; Display the Label
ldd #LABEL03 ; Driver Banner 03
jsr DISPSTR0 ; Display the Label
ldd #LABEL04 ; Driver Banner 04
jsr DISPSTR0 ; Display the Label
; Find the CoCoIO Port, or Not..
ldd #LABEL10 ; Driver Banner 10, WizNet5100 Status
jsr DISPSTR0 ; Display the Label
jsr TRYCIO0
ldd COCOIOPORT
bne INITEXIT
ldd #LABEL13 ; Driver Banner 13, WizNet5100 NOT Located
jsr DISPSTR0 ; Display the Label
INITEXIT: rts
; Lets Check $FF68
TRYCIO0: lda CIO0CMND ; Read the current value of MR from CoCoIO Command
ora #%10000000 ; Flip bit 7 RST to 1 = init all W5100S registers - autoclear in 3 SYS_CLK
ldb #3 ; Time Out Loop, Three Tries
sta CIO0CMND ; Trigger the reset
RST0DONE: lda CIO0CMND ; Now read command register to check bit 7 clears when reset is done
anda #%10000000 ; Mask bit 7 RST to 1
bmi CONTCIO0 ; Loop, Timed-Out, Move to Next Section
decb ; Loop Count-Down
bne RST0DONE ; if bit 7, then A was negative, keep checking bit
CONTCIO0: ldb #3 ; Time Out Loop, Three Tries
SET0MODE: ora #%00000011 ; bit 7 cleared, setup Ping Block disabled, no PPPoE, AutoIncrement, and Indirect Bus Mode
sta CIO0CMND ; configure the chip and done
lda CIO0CMND ; readback mode
cmpa #%00000011 ; is it what we want?
beq DISLAB0 ; Branch to Display Label
decb ; Loop Count-Down
bne SET0MODE ; no, try again
jmp TRYCIO1 ; OK, lets Check $FF78
DISLAB0: ldd CIO0CMND ; We Found the WizNet, save the I/O Location
std COCOIOPORT
ldd #LABEL11 ; Driver Banner 11, WizNet5100 @FF68
jsr DISPSTR0 ; Display the Label
rts
TRYCIO1: lda CIO1CMND ; Read the current value of MR from CoCoIO Command
ora #%10000000 ; Flip bit 7 RST to 1 = init all W5100S registers - autoclear in 3 SYS_CLK
ldb #3 ; Time Out Loop
sta CIO1CMND ; Trigger the reset
RST1DONE: lda CIO0CMND ; Now read command register to check bit 7 clears when reset is done
anda #%10000000 ; Mask bit 7 RST to 1
bmi CONTCIO1 ; Loop, Timed-Out, Move to Next Section
decb ; Loop Count-Down
bne RST1DONE ; if bit 7, then A was negative, keep checking bit
CONTCIO1: ldb #3 ; Time Out Loop
SET1MODE: ora #%00000011 ; bit 7 cleared, setup Ping Block disabled, no PPPoE, AutoIncrement, and Indirect Bus Mode
sta CIO1CMND ; configure the chip and done
lda CIO1CMND ; readback mode
cmpa #%00000011 ; is it what we want?
beq DISLAB1 ; Branch to Display Label
decb ; Loop Count-Down
bne SET1MODE ; no, try again
jmp TRY1EXIT ; Nope, CoCoIO is Not Here
DISLAB1: ldd CIO1CMND ; We Found the WizNet, save the I/O Location
std COCOIOPORT
ldd #LABEL12 ; Driver Banner 12, WizNet5100 @FF78
jsr DISPSTR0 ; Display the Label
TRY1EXIT: rts
W5100_CFG: ; Configure the CoCoIO WIZnet W5100S
; jsr MPISLOT1
; jsr DALLY
; Bring up layer 3 default route
ldd #GAR0 ; W5100S Gateway Address Register 0
ldx #MYGATEWAY ; Get the location of the Gateway data
ldy #4 ; Setup for loop counting
jsr W5100_SETREG
; Bring up layer 3 network mask
ldd #SUBR0 ; W5100S Subnet Mask Address Register 0
ldx #MYSUBNET ; Get the location of the Subnet data
ldy #4 ; Setup for loop counting
jsr W5100_SETREG
; Bring up layer 2 address
ldd #SHAR0 ; W5100S Source Hardware Address Register 0
ldx #MYMAC ; Get the location of the MAC data
ldy #6 ; Setup for loop counting
jsr W5100_SETREG
; Bring up layer 3 address
ldd #SIPR0 ; W5100S Source IP Register 0
ldx #MYIP ; Get the location of the IP data
ldy #4 ; Setup for loop counting
jsr W5100_SETREG
rts
W5100_SETREG: ; Configure the Registers; D for Start, Y for Length, X for Data
pshs x,y ; Save Data Address and Length
ldy COCOIOPORT
ldx [,y]
sta CIOADDR,x ; CoCoIO Address Register MSB
stb CIOADDR+1,x ; CoCoIO Address Register LSB
puls x,y ; Restore Data Address and Length
; jsr DALLY
tfr y,d ; Setup B for loop counting
tfr x,y ; Copy COCOIOPORT value to Y
SETLOOP: lda ,x+ ; Load A with the next byte of Gateway
sta CIODATA,y ; Store it to W5100S
; jsr DALLY
decb ; Decrement loop counter
bne SETLOOP ; No, go back and do more
; jsr DALLY
rts
W5100_GATEWAY: ; Configure the Gateway address
W5100_SUBNET: ; Next the Subnet Mask
W5100_HARDWARE: ; Next the Source Hardware Address
W5100_IPADDR: ; Next the Source IP Address
rts
DISP_GATEWAY: ; D for Start, Y for length
ldd #GWLABEL
jsr DISPSTR0 ; Display the Label
ldd #GAR0 ; W5100S Gateway Address Register 0
ldy #4 ; Setup for loop counting
jmp W5100_DISREG ; Read the Registers
DISP_SUBNET:
ldd #SNLABEL
jsr DISPSTR0 ; Display the Label
ldd #SUBR0 ; W5100S Subnet Mask Address Register 0
ldy #4 ; Setup for loop counting
jmp W5100_DISREG ; Read the Registers
DISP_HARDWARE:
ldd #MALABEL
jsr DISPSTR0 ; Display the Label
ldd #SHAR0 ; W5100S Source Hardware Address Register 0
ldy #6 ; Setup for loop counting
jmp W5100_DISREG ; Read the Registers
DISP_IPADDR:
ldd #IPLABEL
jsr DISPSTR0 ; Display the Label
ldd #SIPR0 ; W5100S Source IP Register 0
ldy #4 ; Setup for loop counting
jmp W5100_DISREG ; Read the Registers
W5100_DISREG: ; Display the Registers; D for Start, Y for Length
; ldd #GWLABEL
; jsr DISPSTR0 ; Display the Label
; ldd #GAR0 ; W5100S Gateway Address Register 0
pshs x ; Save X
ldx [COCOIOPORT]
sta CIOADDR,x ; CoCoIO Address Register MSB
stb CIOADDR+1,x ; CoCoIO Address Register LSB
tfr y,d ; Setup B for loop counting
DISLOOP:
jsr BIN2HEX
jsr DISPB2H
decb ; Decrement loop counter
bne DISLOOP ; No, go back and do more
puls x ; Restore X
rts
MPISLOT1: ; Configure Multipack SCS to slot 1
lda $FF7F ; Read the MPI slot control
anda #%11110000 ; zero out the SCS nybble for MPI slot 1
sta $FF7F ; Write the updated SCS
rts
DILLY: lda PIA0BD ; clear any pending VSYNC interrupt on PIA0
DILLY1: lda PIA0BC ; load up the current flags
bpl DILLY1 ; if bit 7 not set, keep checking flags
lda PIA0BD ; clear the interrupt that just happened
rts
DALLY: pshs x
ldx #$1000 ; A maximum delay loop
DALLY1: leax -1,x ; Decrement X
bne DALLY1 ; if X>0 not done yet
puls x
rts
BIN2HEX: ; W5100 Read DATA and Output HEX in ASCII
pshs d ; Save D ( A&B ) for later
; ldx [COCOIOPORT] ; X is already Loaded with
lda CIODATA,x ; GET DATA from W5100, ( or BINVAL )
;
; CONVERT MORE SIGNIFICANT DIGIT TO ASCII
;
tfr a,b ; SAVE ORIGINAL BINARY VALUE MOVE HIGH DIGIT TO LOW DIGIT
lsra
lsra
lsra
lsra
cmpa #9 ; BRANCH IF HIGH DIGIT IS DECIMAL
bls B2H30 ; ELSE ADD 7 S0 AFTER ADDING '0' THE
adda #7 ; CHARACTER WILL BE IN 'A'..'F'
B2H30: adda #'0' ; ADD ASCII 0 TO MAKE A CHARACTER
sta HEX1VAL ; STORE ASCII DATA
;
; CONVERT LESS SIGNIFICANT DIGIT TO ASCII
;
andb #$0f ; MASK OFF LOW DIGIT
cmpb #9 ; BRANCH IF LOW DIGIT IS DECIMAL
bls B2H30LD ; ELSE ADD 7 SO AFTER ADDING '0' THE
addb #7 ; CHARACTER WILL BE IN 'A'..'F'
B2H30LD: addb #'0' ; ADD ASCII 0 TO MAKE A CHARACTER
stb HEX2VAL ; STORE ASCII DATA
puls d ; Restore D ( A&B )
rts
DISPB2H: lda HEX1VAL
jsr [CHROUT]
lda HEX2VAL
jsr [CHROUT]
rts
BINVAL: fcb $00
HEX1VAL: fcb $00
HEX2VAL: fcb $00
DISPSTR0: ; This Sends a NULL Terminated String to CHROUT, MAX 256 Bytes
pshs d,x,y ; Save D ( A&B ), X & Y for later
tfr d,x ; Copy D to X, for Head of StringZ
ldb #0 ; Setup B for MAX loop, 256
DISPSTRLP: lda ,x+ ; Load A with the byte of the String
beq DISPSTRX ; End of String Reached
jsr [CHROUT] ; Output Character on Screen
decb ; Decrement loop counter
bne DISPSTRLP ; No, go back and do more
DISPSTRX:
puls d,x,y ; Restore D ( A&B ), X & Y
rts
BUFRSOC0: ; This sets up Socket 0, with 8KB RX and TX Buffers
ldd #RMSR ; RX Memory Size Register
sta CIO0ADDR ; CoCoIO Address Register MSB
stb CIO0ADDR+1 ; CoCoIO Address Register LSB
; jsr DALLY
lda #MSR_8KB_S0 ; Memory Size, 8KB, Socket 0
sta CIO0DATA ; Store it to W5100S
; jsr DALLY
; ldd #TMSR ; TX Memory Size Register
; sta CIO0ADDR ; CoCoIO Address Register MSB
; stb CIO0ADDR+1 ; CoCoIO Address Register LSB
; jsr DALLY
lda #MSR_8KB_S0 ; Memory Size, 8KB, Socket 0
sta CIO0DATA ; Store it to W5100S
; jsr DALLY
rts
INITSOC0:
; The Local Port.
ldd #S0_PORTR0 ; Socket 0 Source Port Register 0
sta CIO0ADDR ; CoCoIO Address Register MSB
stb CIO0ADDR+1 ; CoCoIO Address Register LSB
; jsr DALLY
ldd #$C000 ; Port $C000
sta CIO0DATA ; Store it to W5100S
stb CIO0DATA ; Store it to W5100S
; jsr DALLY
ldd #S0_MR ; Socket 0 Mode Register
sta CIO0ADDR ; CoCoIO Address Register MSB
stb CIO0ADDR+1 ; CoCoIO Address Register LSB
; jsr DALLY
lda #S_CR_OPEN ; Open Command
sta CIO0DATA ; Store it to W5100S
; jsr DALLY
rts
; S0_MR
FORGNIP: ; Foreign IP Address
fcb 192,168,254,100
FORGNPORT: ; Foreign Port
fdb 20000
FORGNC: ; My Source Hardware Address
fcb $00,$08,$DC,$00,$00,$01
FORGNP: ; My Source IP Address
fcb 192,168,254,10
; include "COCOIOCFG.asm"
end RESET ; End of driver
| 35.598253 | 120 | 0.495277 |
ecea2a5196889cb780ce207150ba483863cec325 | 542 | asm | Assembly | oeis/111/A111250.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/111/A111250.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/111/A111250.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A111250: Numbers n such that 7*n + 10 is prime.
; Submitted by Jon Maiga
; 1,3,7,9,13,21,27,31,33,37,39,43,49,51,57,67,73,79,81,87,91,93,109,111,117,121,133,139,141,147,157,159,163,169,177,181,183,187,193,207,211,219,223,229,231,237,241,249,259,267,271,277,297,303,319,333,339,343,351,363,367,369,373,379,381,387,397,399,411,421,423,427,433,439,451,453,457,463,471,483,489,493,501,507,519,523,531,537,541,549,553,559,571,573,577,583,589,601,603,607
mov $1,$0
add $1,1
seq $1,33868 ; Numbers n such that 7*n-11 is prime.
mov $0,$1
sub $0,3
| 54.2 | 375 | 0.706642 |
a0e4abea81b4a5cc066734a9b7487a8b9ed6900c | 28,926 | asm | Assembly | monitor/io_library.asm | mfkiwl/QNICE-FPGA-hyperRAM | aabc8291ac1e0c4666c51f84acddf599d7521e53 | [
"BSD-3-Clause"
] | 53 | 2016-04-12T07:22:49.000Z | 2022-03-25T09:24:48.000Z | monitor/io_library.asm | mfkiwl/QNICE-FPGA-hyperRAM | aabc8291ac1e0c4666c51f84acddf599d7521e53 | [
"BSD-3-Clause"
] | 196 | 2020-06-05T04:59:50.000Z | 2021-03-13T21:27:11.000Z | monitor/io_library.asm | mfkiwl/QNICE-FPGA-hyperRAM | aabc8291ac1e0c4666c51f84acddf599d7521e53 | [
"BSD-3-Clause"
] | 15 | 2017-07-31T11:26:56.000Z | 2022-02-22T14:22:46.000Z | ;
;;=======================================================================================
;; The collection of input/output related functions starts here
;;=======================================================================================
;
; Define io system specific constants and memory areas etc. It is expected that the
; basic definitions from sysdef.asm have been included somewhere before!
;
;***************************************************************************************
;* IO$DUMP_MEMORY prints a hexadecimal memory dump of a specified memory region.
;*
;* R8: Contains the start address
;* R9: Contains the end address (inclusive)
;*
;* The contents of R8 and R9 are preserved during the run of this function.
;***************************************************************************************
;
IO$DUMP_MEMORY INCRB ; Get a new register page
MOVE R8, R0 ; R0 will be the loop counter
MOVE R8, R1 ; This will be needed to restore R8 later
MOVE R9, R3
ADD 0x0001, R3 ; That is necessary since we want the last
; address printed, too
MOVE 0xFFFF, R4 ; Set R4 - this is the column counter - to -1
_IO$DUMP_MEMORY_LOOP CMP R3, R0 ; Have we reached the end of the memory area?
RBRA _IO$DUMP_MEMORY_EXIT, !N ; Yes - that is it, so exit this routine
ADD 0x0001, R4 ; Next column
AND 0x0007, R4 ; We compute mod 8
RBRA _IO$DUMP_MEMORY_CONTENT, !Z; if the result is not equal 0 we do not
; need an address printed
RSUB IO$PUT_CRLF, 1 ; Print a CR/LF pair
MOVE R0, R8 ; Print address
RSUB IO$PUT_W_HEX, 1
MOVE IO$COLON_DELIMITER, R8 ; Print a colon followed by a space
RSUB IO$PUTS, 1
_IO$DUMP_MEMORY_CONTENT MOVE @R0++, R8 ; Print the memory contents of this location
RSUB IO$PUT_W_HEX, 1
MOVE ' ', R8 ; Print a space
RSUB IO$PUTCHAR, 1
RBRA _IO$DUMP_MEMORY_LOOP, 1 ; Continue the print loop
_IO$DUMP_MEMORY_EXIT RSUB IO$PUT_CRLF, 1 ; Print a last CR/LF pair
MOVE R1, R8 ; Restore R8,
DECRB ; switch back to the correct register page
RET
;
;***************************************************************************************
;* IO$GET_W_HEX reads four hex nibbles from stdin and returns the corresponding
;* value in R8
;*
;* Illegal characters (not 1-9A-F or a-f) will generate a bell signal. The only
;* exception to this behaviour is the character 'x' which will erase any input
;* up to this point. This has the positive effect that a hexadecimal value can
;* be entered as 0x.... or just as ....
;***************************************************************************************
;
IO$GET_W_HEX INCRB ; Get a new register page
MOVE R9, R2 ; Save R9 and R10
MOVE R10, R3
_IO$GET_W_HEX_REDO XOR R0, R0 ; Clear R0
MOVE 4, R1 ; We need four characters
MOVE IO$HEX_NIBBLES, R9 ; Pointer to list of valid chars
_IO$GET_W_HEX_INPUT RSUB IO$GETCHAR, 1 ; Read a character into R8
RSUB CHR$TO_UPPER, 1 ; Convert to upper case
CMP 'X', R8 ; Was it an 'X'?
RBRA _IO$GET_W_HEX_REDO, Z ; Yes - redo from start :-)
RSUB STR$STRCHR, 1 ; Is it a valid character?
MOVE R10, R10 ; Result equal zero?
RBRA _IO$GET_W_HEX_VALID, !Z ; No
MOVE CHR$BELL, R8 ; Yes - generate a beep :-)
RSUB IO$PUTCHAR, 1
RBRA _IO$GET_W_HEX_INPUT, 1 ; Retry
_IO$GET_W_HEX_VALID RSUB IO$PUTCHAR, 1 ; Echo character
SUB IO$HEX_NIBBLES, R10 ; Get number of character
SHL 4, R0
ADD R10, R0
SUB 0x0001, R1
RBRA _IO$GET_W_HEX_INPUT, !Z ; Read next character
MOVE R0, R8
MOVE R2, R9 ; Restore R9 and R10
MOVE R3, R10
DECRB ; Restore previous register page
RET
;
;***************************************************************************************
;* IO$PUT_W_HEX prints a machine word in hexadecimal notation.
;*
;* R8: Contains the machine word to be printed in hex notation.
;*
;* The contents of R8 are being preserved during the run of this function.
;***************************************************************************************
;
IO$PUT_W_HEX INCRB ; Get a new register page
MOVE 0x0004, R0 ; Save constant for nibble shifting
MOVE R0, R4 ; Set loop counter to four
MOVE R8, R5 ; Copy contents of R8 for later restore
MOVE IO$HEX_NIBBLES, R1 ; Create a pointer to the list of nibbles
; Push four ASCII characters to the stack
_IO$PWH_SCAN MOVE R1, R2 ; and create a scratch copy of this pointer
MOVE R8, R3 ; Create a local copy of the machine word
AND 0x000f, R3 ; Only the four LSBs are of interest
ADD R3, R2 ; Adjust pointer to the desired nibble
MOVE @R2, @--SP ; and save the ASCII character to the stack
SHR 4, R8 ; Shift R8 four places right
SUB 0x0001, R4 ; Decrement loop counter
RBRA _IO$PWH_SCAN, !Z ; and continue with the next nibble
; Now read these characters back and print them
MOVE R0, R4 ; Initialize loop counter
_IO$PWH_PRINT MOVE @SP++, R8 ; Fetch a character from the stack
RSUB IO$PUTCHAR, 1 ; and print it
SUB 0x0001, R4 ; Decrement loop counter
RBRA _IO$PWH_PRINT, !Z ; and continue with the next character
; That is all...
MOVE R5, R8 ; Restore contents of R8
DECRB ; Restore correct register page
RET
;
;***************************************************************************************
;* IO$GETCHAR reads a character either from the first UART in the system or from an
;* attached USB keyboard. This depends on the setting of bit 0 of the switch register.
;* If SW[0] == 0, then the character is read from the UART, otherwise it is read from
;* the keyboard data register.
;*
;* R8 will contain the character read in its lower eight bits.
;***************************************************************************************
;
IO$GETCHAR INCRB
MOVE IO$SWITCH_REG, R0
_IO$GETCHAR_ENTRY MOVE @R0, R1 ; Read the switch register
AND 0x0001, R1 ; Lowest bit set?
RBRA _IO$GETCHAR_UART, Z ; No, read from UART
RSUB KBD$GETCHAR, 1 ; Yes, read from USB-keyboard
MOVE IO$KBD_STATE, R3 ; Preserve modifier keys
MOVE @R3, R2
RBRA _IO$GETCHAR_SPECIAL, 1 ; One char successfully read
_IO$GETCHAR_UART RSUB UART$GETCHAR, 1 ; Read from UART
MOVE 0, R2 ; Make sure: no USB phantom modifiers
_IO$GETCHAR_SPECIAL CMP KBD$CTRL_E, R8 ; CTRL-E?
RBRA QMON$WARMSTART, Z ; Return to monitor immediately!
CMP KBD$CTRL_F, R8 ; CTRL-F?
RBRA _IO$GETCHAR_SU1, Z ; Yes: scroll up 1 line
CMP KBD$CUR_DOWN, R8 ; No: Cursor Down key?
RBRA _IO$GETCHAR_NO_FCD, !Z ; No
_IO$GETCHAR_SU1 MOVE 1, R8 ; VGA$SCROLL_UP_1 in manual mode
RSUB VGA$SCROLL_UP_1, 1 ; Perform scroll up
RBRA _IO$GETCHAR_ENTRY, 1 ; Wait for next character
_IO$GETCHAR_NO_FCD CMP KBD$CTRL_B, R8 ; CTRL-B?
RBRA _IO$GETCHAR_SD1, Z ; Yes: scroll down 1 line
CMP KBD$CUR_UP, R8 ; No: Cursor Up key?
RBRA _IO$GETCHAR_NO_BCU, !Z ; No
_IO$GETCHAR_SD1 RSUB VGA$SCROLL_DOWN_1, 1 ; Perform scroll down
RBRA _IO$GETCHAR_ENTRY, 1 ; Wait for next character
_IO$GETCHAR_NO_BCU AND KBD$CTRL, R2 ; CTRL pressed?
RBRA _IO$GETCHAR_NO_CTRL, Z ; No
CMP KBD$PG_DOWN, R8 ; Yes: CTRL+Page Down?
RBRA _IO$GETCHAR_NO_CPGD, !Z ; No
MOVE 10, R8 ; Yes: scroll up 10 lines
RSUB VGA$SCROLL_UP,1
RBRA _IO$GETCHAR_ENTRY, 1 ; Wait for next character
_IO$GETCHAR_NO_CPGD CMP KBD$PG_UP, R8 ; CTRL+Page Up?
RBRA _IO$GETCHAR_NO_CTRL, !Z ; No
MOVE 10, R8 ; Yes: scroll down 10 lines
RSUB VGA$SCROLL_DOWN, 1
RBRA _IO$GETCHAR_ENTRY, 1 ; Wait for next character
_IO$GETCHAR_NO_CTRL CMP KBD$PG_DOWN, R8 ; Page Down?
RBRA _IO$GETCHAR_NO_PGD, !Z ; No
MOVE 40, R8 ; Yes: scroll up one screen
RSUB VGA$SCROLL_UP, 1
RBRA _IO$GETCHAR_ENTRY, 1 ; Wait for next character
_IO$GETCHAR_NO_PGD CMP KBD$PG_UP, R8 ; Page Up?
RBRA _IO$GETCHAR_NO_PGU, !Z ; No
MOVE 40, R8 ; Yes: scroll down one screen
RSUB VGA$SCROLL_DOWN, 1
RBRA _IO$GETCHAR_ENTRY, 1 ; Wait for next character
_IO$GETCHAR_NO_PGU CMP KBD$HOME, R8 ; Home?
RBRA _IO$GETCHAR_NO_HM, !Z ; No
MOVE 0, R8 ; Yes: scroll to the very top
RSUB VGA$SCROLL_HOME_END, 1
RBRA _IO$GETCHAR_ENTRY, 1 ; Wait for next character
_IO$GETCHAR_NO_HM CMP KBD$END, R8 ; End?
RBRA _IO$GETCHAR_FIN, !Z ; No: Normal Key
MOVE 1, R8 ; Yes: scroll to the very bottom
RSUB VGA$SCROLL_HOME_END, 1
RBRA _IO$GETCHAR_ENTRY, 1 ; Wait for next character
_IO$GETCHAR_FIN DECRB
RET
;
;***************************************************************************************
;* IO$GETS reads a zero terminated string from STDIN and echos typing on STDOUT
;*
;* ALWAYS PREFER IO$GETS_S OVER THIS FUNCTION!
;*
;* It accepts CR, LF and CR/LF as input terminator, so it directly works with various
;* terminal settings on UART and also with keyboards on PS/2 ("USB"). Furtheron, it
;* accepts BACKSPACE for editing the string.
;*
;* R8 has to point to a preallocated memory area to store the input line
;***************************************************************************************
;
IO$GETS MOVE R9, @--SP ; save original R9
MOVE R10, @--SP ; save original R10
XOR R9, R9 ; R9 = 0: unlimited chars
XOR R10, R10 ; R10 = 0: no LF at end of str.
RSUB IO$GETS_CORE, 1 ; get the unlimited string
MOVE @SP++, R10 ; restore original R10
MOVE @SP++, R9 ; restore original R9
RET
;
;***************************************************************************************
;* IO$GETS_S reads a zero terminated string from STDIN into a buffer with a
;* specified maximum size and echos typing on STDOUT
;*
;* It accepts CR, LF and CR/LF as input terminator, so it directly works with various
;* terminal settings on UART and also with keyboards on PS/2 ("USB"). Furtheron, it
;* accepts BACKSPACE for editing the string.
;*
;* A maximum amount of (R9 - 1) characters will be read, because the function will
;* add the zero terminator to the string, which then results in R9 words.
;*
;* R8 has to point to a preallocated memory area to store the input line
;* R9 specifies the size of the buffer, so (R9 - 1) characters can be read;
;* if R9 == 0, then an unlimited amount of characters is being read
;***************************************************************************************
;
IO$GETS_S MOVE R10, @--SP ; save original R10
XOR R10, R10 ; R10 = 0: no LF at end of str.
RSUB IO$GETS_CORE, 1 ; get string
MOVE @SP++, R10 ; restore original R10
RET
;
;***************************************************************************************
;* IO$GETS_SLF reads a zero terminated string from STDIN into a buffer with a specified
;* maximum size and echos typing on STDOUT. A line feed character is added
;* to the string in case the function is ended not "prematurely" by
;* reaching the buffer size, but by pressing CR or LF or CR/LF.
;*
;* It accepts CR, LF and CR/LF as input terminator, so it directly works with various
;* terminal settings on UART and also with keyboards on PS/2 ("USB"). Furtheron, it
;* accepts BACKSPACE for editing the string.
;*
;* A maximum amount of (R9 - 1) characters will be read, because the function will
;* add the zero terminator to the string, which then results in R9 words.
;*
;* R8 has to point to a preallocated memory area to store the input line
;* R9 specifies the size of the buffer, so (R9 - 1) characters can be read;
;* if R9 == 0, then an unlimited amount of characters is being read
;***************************************************************************************
;
IO$GETS_SLF MOVE R10, @--SP ; save original R10
MOVE 1, R10 ; R10 = 1: add LF, if the function
; ends regularly, i.e. by a key
; stroke (LF, CR or CR/LF)
RSUB IO$GETS_CORE, 1 ; get string
MOVE @SP++, R10 ; restore original R10
RET
;
;***************************************************************************************
;* IO$GETS_CORE implements the various gets variants.
;*
;* Refer to the comments for IO$GETS, IO$GET_S and IO$GET_SLF
;*
;* R8 has to point to a preallocated memory area to store the input line
;* R9 specifies the size of the buffer, so (R9 - 1) characters can be read;
;* if R9 == 0, then an unlimited amount of characters is being read
;* R10 specifies the LF behaviour: R10 = 0 means never add LF, R10 = 1 means: add a
;* LF when the input is ended by a key stroke (LF, CR or CR/LF) in contrast to
;* automatically ending due to a full buffer
;***************************************************************************************
;
IO$GETS_CORE INCRB
MOVE R10, @--SP ; save original R10
MOVE R11, @--SP ; save original R11
MOVE R12, @--SP ; save original R12
MOVE R10, R12 ; R12 = add LF flag
XOR R11, R11 ; R11 = character counter = 0
MOVE R9, R10 ; R10 = max characters
SUB 1, R10 ; R10 = R9 - 1 characters
MOVE R8, R0 ; save original R8
MOVE R8, R1 ; R1 = working pointer
_IO$GETS_LOOP CMP R9, 0 ; unlimited characters?
RBRA _IO$GETS_GETC, Z ; yes
CMP R11, R10 ; buffer size - 1 reached?
RBRA _IO$GETS_ZT, Z ; yes: add zero terminator
ADD 1, R11 ; no: next character
_IO$GETS_GETC RSUB IO$GETCHAR, 1 ; get char from STDIN
CMP R8, 0x000D ; accept CR as line end
RBRA _IO$GETS_CR, Z
CMP R8, 0x000A ; accept LF as line end
RBRA _IO$GETS_LF, Z
CMP R8, 0x0008 ; use BACKSPACE for editing
RBRA _IO$GETS_BS, Z
CMP R8, 0x007F ; treat DEL key as BS, e.g. for ..
RBRA _IO$GETS_DEL, Z ; .. MAC compatibility in EMU
_IO$GETS_ADDBUF MOVE R8, @R1++ ; store char to buffer
_IO$GETS_ECHO RSUB IO$PUTCHAR, 1 ; echo char on STDOUT
RBRA _IO$GETS_LOOP, 1 ; next character
_IO$GETS_LF CMP R12, 0 ; evaluate LF flag
RBRA _IO$GETS_ZT, Z ; 0 = do not add LF flag
MOVE 0x000A, @R1++ ; add LF
_IO$GETS_ZT MOVE 0, @R1 ; add zero terminator
MOVE R0, R8 ; restore original R8
MOVE @SP++, R12 ; restore original R12
MOVE @SP++, R11 ; restore original R11
MOVE @SP++, R10 ; restore original R10
DECRB
RET
; For also accepting CR/LF, we need to do a non-blocking
; check on STDIN, if there is another character waiting.
; IO$GETCHAR is a blocking call, so we cannot use it here.
; STDIN = UART, if bit #0 of IO$SWITCH_REG = 0, otherwise
; STDIN = PS/2 ("USB") keyboard
;
; At a terminal speed of 115200 baud = 14.400 chars/sec
; (for being save, let us assume only 5.000 chars/sec)
; and a CPU frequency of 50 MHz we need to wait about
; 10.000 CPU cycles until we check, if the terminal program
; did send one other character. The loop at GETS_CR_WAIT
; costs about 7 cycles per iteration, so we loop (rounded up)
; 2.000 times.
; As a simplification, we assume the same waiting time
; for a PS/2 ("USB") keyboard
_IO$GETS_CR MOVE 2000, R3 ; CPU speed vs. transmit speed
_IO$GETS_CRWAIT SUB 1, R3
RBRA _IO$GETS_CRWAIT, !Z
MOVE IO$SWITCH_REG, R2 ; read the switch register
MOVE @R2, R2
AND 0x0001, R2 ; lowest bit set?
RBRA _IO$GETS_CRUART, Z ; no: read from UART
MOVE IO$KBD_STATE, R2 ; read the keyboard status reg.
MOVE @R2, R2
AND 0x0001, R2 ; char waiting/lowest bit set?
RBRA _IO$GETS_LF, Z ; no: then add zero term. and ret.
MOVE IO$KBD_DATA, R2 ; yes: read waiting character
MOVE @R2, R2
RBRA _IO$GETS_CR_LF, 1 ; check for LF
_IO$GETS_CRUART MOVE IO$UART_SRA, R2 ; read UART status register
MOVE @R2, R2
AND 0x0001, R2 ; is there a character waiting?
RBRA _IO$GETS_LF, Z ; no: then add zero term. and ret.
MOVE IO$UART_RHRA, R2 ; yes: read waiting character
MOVE @R2, R2
_IO$GETS_CR_LF CMP R2, 0x000A ; is it a LF (so we have CR/LF)?
RBRA _IO$GETS_LF, Z ; yes: then add zero trm. and ret.
; it is CR/SOMETHING, so add both: CR and "something" to
; the string and go on waiting for input, but only of the
; buffer is large enough. Otherwise only add CR.
MOVE 0x000D, @R1++ ; add CR
CMP R9, 0 ; unlimited characters?
RBRA _IO$GETS_CRSS, Z ; yes: go on and add SOMETHING
CMP R11, R10 ; buffer size - 1 reached?
RBRA _IO$GETS_ZT, Z ; yes: add zero terminator and end
ADD 1, R11 ; increase amount of stored chars
_IO$GETS_CRSS MOVE R2, R8 ; no: prepare to add SOMETHING
RBRA _IO$GETS_ADDBUF, 1 ; add it to buffer and go on
; handle BACKSPACE for editing and accept DEL as alias for BS
;
; For STDOUT = UART it is kind of trivial, because you "just"
; need to rely on the fact, that the terminal settings are
; correct and then the terminal program takes care of the
; nitty gritty details like moving the cursor and scrolling.
;
; For STDOUT = VGA, this needs to be done manually by this
; routine.
_IO$GETS_DEL MOVE 0x0008, R8 ; treat DEL as BS
_IO$GETS_BS SUB 1, R11 ; do not count DEL/BS character
CMP R0, R1 ; beginning of string?
RBRA _IO$GETS_LOOP, Z ; yes: ignore BACKSPACE key
SUB 1, R1 ; delete last char in memory
SUB 1, R11 ; do not count last char in mem.
MOVE IO$SWITCH_REG, R2 ; read the switch register
MOVE @R2, R2
AND 0x0002, R2 ; bit #1 set?
RBRA _IO$GETS_ECHO, Z ; no: STDOUT = UART: just echo
MOVE VGA$CR_X, R2 ; R2: HW X-register
MOVE VGA$CR_Y, R3 ; R3: HW Y-register
MOVE VGA$CHAR, R4 ; R4: HW put/get character reg.
MOVE _VGA$X, R5 ; R5: SW X-register
MOVE _VGA$Y, R6 ; R6: SW Y-register
CMP @R2, 0 ; cursor already at leftmost pos.?
RBRA _IO$GETS_BSLUP, Z ; yes: scroll one line up
SUB 1, @R2 ; cursor one position to the left
SUB 1, @R5
_IO$GETS_BSX MOVE 0x0020, @R4 ; delete char on the screen
RBRA _IO$GETS_LOOP, 1 ; next char/key
_IO$GETS_BSLUP CMP @R3, VGA$MAX_Y ; cursor already bottom line?
RBRA _IO$GETS_BSSUP, Z ; yes: scroll screen up
SUB 1, @R3 ; cursor one line up
SUB 1, @R6
_IO$GETS_BSXLU MOVE VGA$MAX_X, @R2 ; cursor to the rightpost pos.
MOVE VGA$MAX_X, @R5
RBRA _IO$GETS_BSX, 1 ; delete char on screen and go on
_IO$GETS_BSSUP MOVE VGA$OFFS_DISPLAY, R7 ; if RW > DISP then do not
MOVE VGA$OFFS_RW, R8 ; scroll up the screen
CMP @R8, @R7 ; see VGA$SCROLL_UP_1 for
RBRA _IO$GETS_BSUPSP, N ; an explanation
SUB VGA$CHARS_PER_LINE, @R7 ; do the visual scrolling
_IO$GETS_BSUPSP SUB VGA$CHARS_PER_LINE, @R8 ; scroll the RW window
CMP @R7, @R8 ; if after the scrolling
RBRA _IO$GETS_NOCRS, !Z ; RW = DISP then show
MOVE VGA$STATE, R8 ; the cursor
OR VGA$EN_HW_CURSOR, @R8
_IO$GETS_NOCRS MOVE VGA$MAX_Y, @R3 ; cursor to bottom
MOVE VGA$MAX_Y, @R6
RBRA _IO$GETS_BSXLU, 1 ; cursor to rightmost pos.
;
;***************************************************************************************
;* IO$PUTS prints a null terminated string.
;*
;* R8: Pointer to the string to be printed. Of each word only the lower eight bits
;* will be printed. The terminating word has to be zero.
;*
;* The contents of R8 are being preserved during the run of this function.
;***************************************************************************************
;
IO$PUTS INCRB ; Get a new register page
MOVE R8, R1 ; Save contents of R8
MOVE R8, R0 ; Local copy of the string pointer
_IO$PUTS_LOOP MOVE @R0++, R8 ; Get a character from the string
AND 0x00FF, R8 ; Only the lower eight bits are relevant
RBRA _IO$PUTS_END, Z ; Return when the string end has been reached
RSUB IO$PUTCHAR, 1 ; Print this character
RBRA _IO$PUTS_LOOP, 1 ; Continue with the next character
_IO$PUTS_END MOVE R1, R8 ; Restore contents of R8
DECRB ; Restore correct register page
RET
;
;***************************************************************************************
;* IO$PUT_CRLF prints actually a LF/CR (the reason for this is that curses on the
;* MAC, where the emulation currently runs, has problems with CR/LF, but
;* not with LF/CR)
;***************************************************************************************
;
IO$PUT_CRLF INCRB ; Get a new register page
MOVE R8, R0 ; Save contents of R8
MOVE 0x0A, R8
RSUB IO$PUTCHAR, 1
MOVE 0x0D, R8
RSUB IO$PUTCHAR, 1
MOVE R0, R8 ; Restore contents of R8
DECRB ; Return to previous register page
RET
;
;***************************************************************************************
;* IO$PUTCHAR prints a single character.
;*
;* R8: Contains the character to be printed
;
;* The contents of R8 are being preserved during the run of this function.
;***************************************************************************************
;
IO$PUTCHAR INCRB
MOVE R8, R2 ; Avoid printing a zero character in...
AND KBD$SPECIAL, R2 ; ...case somebody directly syscalls...
RBRA _IO$PUTCHAR_END, !Z ; ...here with a special key in R8
MOVE IO$SWITCH_REG, R0
MOVE @R0, R1 ; Read the switch register
AND 0x0002, R1 ; Bit 1 set?
RBRA _IO$PUTCHAR_UART, Z ; No, write to UART
RSUB VGA$PUTCHAR, 1 ; Yes, write to VGA-controller
RBRA _IO$PUTCHAR_END, 1 ; Finish
_IO$PUTCHAR_UART RSUB UART$PUTCHAR, 1
_IO$PUTCHAR_END DECRB
RET
;
;***************************************************************************************
;* IO$TIL
;*
;* Show a four nibble hex value on the TIL-display
;*
;* R8: Contains the value to be displayed
;***************************************************************************************
;
IO$TIL INCRB
MOVE IO$TIL_DISPLAY, R0
MOVE R8, @R0
DECRB
RET
;
;***************************************************************************************
; Constants, etc.
;***************************************************************************************
;
IO$HEX_NIBBLES .ASCII_W "0123456789ABCDEF"
IO$COLON_DELIMITER .ASCII_W ": "
| 56.16699 | 101 | 0.456648 |
c163b3759925e8b62c6113ba62e4f627c3ca6ecf | 192 | asm | Assembly | libsrc/_DEVELOPMENT/error/z80/error_llzc.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 640 | 2017-01-14T23:33:45.000Z | 2022-03-30T11:28:42.000Z | libsrc/_DEVELOPMENT/error/z80/error_llzc.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 1,600 | 2017-01-15T16:12:02.000Z | 2022-03-31T12:11:12.000Z | libsrc/_DEVELOPMENT/error/z80/error_llzc.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 215 | 2017-01-17T10:43:03.000Z | 2022-03-23T17:25:02.000Z |
SECTION code_clib
SECTION code_error
PUBLIC error_llzc
EXTERN error_lzc
pop hl
error_llzc:
; set dehl'dehl = 0
; set carry flag
exx
call error_lzc
exx
jp error_lzc
| 9.6 | 22 | 0.692708 |
7ace5c21e84ab8093b2e51a94c639a3231d26d21 | 4,639 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0.log_21829_451.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0.log_21829_451.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0.log_21829_451.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r15
push %r8
push %rbx
push %rcx
push %rdi
push %rdx
lea addresses_D_ht+0x5f67, %r15
nop
nop
nop
sub $34383, %rbx
mov (%r15), %r10
nop
nop
nop
nop
nop
and %rdi, %rdi
lea addresses_D_ht+0x1c1e7, %r8
nop
nop
nop
nop
nop
and %rcx, %rcx
movb (%r8), %dl
nop
nop
nop
nop
nop
cmp %rbx, %rbx
lea addresses_UC_ht+0x11fa7, %rbx
nop
nop
nop
nop
nop
and %r10, %r10
and $0xffffffffffffffc0, %rbx
vmovaps (%rbx), %ymm1
vextracti128 $1, %ymm1, %xmm1
vpextrq $1, %xmm1, %rdi
nop
nop
nop
xor %r10, %r10
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %r8
pop %r15
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r12
push %r13
push %rax
push %rcx
push %rdi
// Faulty Load
lea addresses_RW+0x1bb67, %r11
nop
nop
nop
nop
nop
xor %r12, %r12
mov (%r11), %cx
lea oracles, %r13
and $0xff, %rcx
shlq $12, %rcx
mov (%r13,%rcx,1), %rcx
pop %rdi
pop %rcx
pop %rax
pop %r13
pop %r12
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': True, 'same': False, 'congruent': 0, 'type': 'addresses_RW', 'AVXalign': True, 'size': 16}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'NT': False, 'same': True, 'congruent': 0, 'type': 'addresses_RW', 'AVXalign': False, 'size': 2}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'NT': False, 'same': False, 'congruent': 9, 'type': 'addresses_D_ht', 'AVXalign': False, 'size': 8}, 'OP': 'LOAD'}
{'src': {'NT': False, 'same': False, 'congruent': 6, 'type': 'addresses_D_ht', 'AVXalign': False, 'size': 1}, 'OP': 'LOAD'}
{'src': {'NT': False, 'same': False, 'congruent': 6, 'type': 'addresses_UC_ht', 'AVXalign': True, 'size': 32}, 'OP': 'LOAD'}
{'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
*/
| 45.038835 | 2,999 | 0.660703 |
0a3bc8135eca77e2ba249503b909167d66f09fde | 55,221 | asm | Assembly | stressfs.asm | jmac006/XV6-Project-2 | eff1ff0c64845ecde2331d21428c655b7305fe1e | [
"MIT-0"
] | null | null | null | stressfs.asm | jmac006/XV6-Project-2 | eff1ff0c64845ecde2331d21428c655b7305fe1e | [
"MIT-0"
] | null | null | null | stressfs.asm | jmac006/XV6-Project-2 | eff1ff0c64845ecde2331d21428c655b7305fe1e | [
"MIT-0"
] | null | null | null |
_stressfs: file format elf32-i386
Disassembly of section .text:
00001000 <main>:
#include "fs.h"
#include "fcntl.h"
int
main(int argc, char *argv[])
{
1000: 55 push %ebp
int fd, i;
char path[] = "stressfs0";
1001: b8 30 00 00 00 mov $0x30,%eax
#include "fs.h"
#include "fcntl.h"
int
main(int argc, char *argv[])
{
1006: 89 e5 mov %esp,%ebp
1008: 57 push %edi
1009: 56 push %esi
100a: 53 push %ebx
char data[512];
printf(1, "stressfs starting\n");
memset(data, 'a', sizeof(data));
for(i = 0; i < 4; i++)
100b: 31 db xor %ebx,%ebx
#include "fs.h"
#include "fcntl.h"
int
main(int argc, char *argv[])
{
100d: 83 e4 f0 and $0xfffffff0,%esp
1010: 81 ec 20 02 00 00 sub $0x220,%esp
int fd, i;
char path[] = "stressfs0";
char data[512];
printf(1, "stressfs starting\n");
1016: c7 44 24 04 61 18 00 movl $0x1861,0x4(%esp)
101d: 00
memset(data, 'a', sizeof(data));
101e: 8d 74 24 20 lea 0x20(%esp),%esi
{
int fd, i;
char path[] = "stressfs0";
char data[512];
printf(1, "stressfs starting\n");
1022: c7 04 24 01 00 00 00 movl $0x1,(%esp)
int
main(int argc, char *argv[])
{
int fd, i;
char path[] = "stressfs0";
1029: 66 89 44 24 1e mov %ax,0x1e(%esp)
102e: c7 44 24 16 73 74 72 movl $0x65727473,0x16(%esp)
1035: 65
1036: c7 44 24 1a 73 73 66 movl $0x73667373,0x1a(%esp)
103d: 73
char data[512];
printf(1, "stressfs starting\n");
103e: e8 7d 04 00 00 call 14c0 <printf>
memset(data, 'a', sizeof(data));
1043: c7 44 24 08 00 02 00 movl $0x200,0x8(%esp)
104a: 00
104b: c7 44 24 04 61 00 00 movl $0x61,0x4(%esp)
1052: 00
1053: 89 34 24 mov %esi,(%esp)
1056: e8 95 01 00 00 call 11f0 <memset>
for(i = 0; i < 4; i++)
if(fork() > 0)
105b: e8 fa 02 00 00 call 135a <fork>
1060: 85 c0 test %eax,%eax
1062: 0f 8f c3 00 00 00 jg 112b <main+0x12b>
char data[512];
printf(1, "stressfs starting\n");
memset(data, 'a', sizeof(data));
for(i = 0; i < 4; i++)
1068: 83 c3 01 add $0x1,%ebx
106b: 83 fb 04 cmp $0x4,%ebx
106e: 75 eb jne 105b <main+0x5b>
1070: bf 04 00 00 00 mov $0x4,%edi
if(fork() > 0)
break;
printf(1, "write %d\n", i);
1075: 89 5c 24 08 mov %ebx,0x8(%esp)
path[8] += i;
fd = open(path, O_CREATE | O_RDWR);
1079: bb 14 00 00 00 mov $0x14,%ebx
for(i = 0; i < 4; i++)
if(fork() > 0)
break;
printf(1, "write %d\n", i);
107e: c7 44 24 04 74 18 00 movl $0x1874,0x4(%esp)
1085: 00
1086: c7 04 24 01 00 00 00 movl $0x1,(%esp)
108d: e8 2e 04 00 00 call 14c0 <printf>
path[8] += i;
1092: 89 f8 mov %edi,%eax
1094: 00 44 24 1e add %al,0x1e(%esp)
fd = open(path, O_CREATE | O_RDWR);
1098: 8d 44 24 16 lea 0x16(%esp),%eax
109c: c7 44 24 04 02 02 00 movl $0x202,0x4(%esp)
10a3: 00
10a4: 89 04 24 mov %eax,(%esp)
10a7: e8 f6 02 00 00 call 13a2 <open>
10ac: 89 c7 mov %eax,%edi
10ae: 66 90 xchg %ax,%ax
for(i = 0; i < 20; i++)
// printf(fd, "%d\n", i);
write(fd, data, sizeof(data));
10b0: c7 44 24 08 00 02 00 movl $0x200,0x8(%esp)
10b7: 00
10b8: 89 74 24 04 mov %esi,0x4(%esp)
10bc: 89 3c 24 mov %edi,(%esp)
10bf: e8 be 02 00 00 call 1382 <write>
printf(1, "write %d\n", i);
path[8] += i;
fd = open(path, O_CREATE | O_RDWR);
for(i = 0; i < 20; i++)
10c4: 83 eb 01 sub $0x1,%ebx
10c7: 75 e7 jne 10b0 <main+0xb0>
// printf(fd, "%d\n", i);
write(fd, data, sizeof(data));
close(fd);
10c9: 89 3c 24 mov %edi,(%esp)
printf(1, "read\n");
fd = open(path, O_RDONLY);
10cc: bb 14 00 00 00 mov $0x14,%ebx
path[8] += i;
fd = open(path, O_CREATE | O_RDWR);
for(i = 0; i < 20; i++)
// printf(fd, "%d\n", i);
write(fd, data, sizeof(data));
close(fd);
10d1: e8 b4 02 00 00 call 138a <close>
printf(1, "read\n");
10d6: c7 44 24 04 7e 18 00 movl $0x187e,0x4(%esp)
10dd: 00
10de: c7 04 24 01 00 00 00 movl $0x1,(%esp)
10e5: e8 d6 03 00 00 call 14c0 <printf>
fd = open(path, O_RDONLY);
10ea: 8d 44 24 16 lea 0x16(%esp),%eax
10ee: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
10f5: 00
10f6: 89 04 24 mov %eax,(%esp)
10f9: e8 a4 02 00 00 call 13a2 <open>
10fe: 89 c7 mov %eax,%edi
for (i = 0; i < 20; i++)
read(fd, data, sizeof(data));
1100: c7 44 24 08 00 02 00 movl $0x200,0x8(%esp)
1107: 00
1108: 89 74 24 04 mov %esi,0x4(%esp)
110c: 89 3c 24 mov %edi,(%esp)
110f: e8 66 02 00 00 call 137a <read>
close(fd);
printf(1, "read\n");
fd = open(path, O_RDONLY);
for (i = 0; i < 20; i++)
1114: 83 eb 01 sub $0x1,%ebx
1117: 75 e7 jne 1100 <main+0x100>
read(fd, data, sizeof(data));
close(fd);
1119: 89 3c 24 mov %edi,(%esp)
111c: e8 69 02 00 00 call 138a <close>
wait();
1121: e8 44 02 00 00 call 136a <wait>
exit();
1126: e8 37 02 00 00 call 1362 <exit>
112b: 89 df mov %ebx,%edi
112d: 8d 76 00 lea 0x0(%esi),%esi
1130: e9 40 ff ff ff jmp 1075 <main+0x75>
1135: 66 90 xchg %ax,%ax
1137: 66 90 xchg %ax,%ax
1139: 66 90 xchg %ax,%ax
113b: 66 90 xchg %ax,%ax
113d: 66 90 xchg %ax,%ax
113f: 90 nop
00001140 <strcpy>:
#include "user.h"
#include "x86.h"
char*
strcpy(char *s, char *t)
{
1140: 55 push %ebp
1141: 89 e5 mov %esp,%ebp
1143: 8b 45 08 mov 0x8(%ebp),%eax
1146: 8b 4d 0c mov 0xc(%ebp),%ecx
1149: 53 push %ebx
char *os;
os = s;
while((*s++ = *t++) != 0)
114a: 89 c2 mov %eax,%edx
114c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
1150: 83 c1 01 add $0x1,%ecx
1153: 0f b6 59 ff movzbl -0x1(%ecx),%ebx
1157: 83 c2 01 add $0x1,%edx
115a: 84 db test %bl,%bl
115c: 88 5a ff mov %bl,-0x1(%edx)
115f: 75 ef jne 1150 <strcpy+0x10>
;
return os;
}
1161: 5b pop %ebx
1162: 5d pop %ebp
1163: c3 ret
1164: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
116a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
00001170 <strcmp>:
int
strcmp(const char *p, const char *q)
{
1170: 55 push %ebp
1171: 89 e5 mov %esp,%ebp
1173: 8b 55 08 mov 0x8(%ebp),%edx
1176: 53 push %ebx
1177: 8b 4d 0c mov 0xc(%ebp),%ecx
while(*p && *p == *q)
117a: 0f b6 02 movzbl (%edx),%eax
117d: 84 c0 test %al,%al
117f: 74 2d je 11ae <strcmp+0x3e>
1181: 0f b6 19 movzbl (%ecx),%ebx
1184: 38 d8 cmp %bl,%al
1186: 74 0e je 1196 <strcmp+0x26>
1188: eb 2b jmp 11b5 <strcmp+0x45>
118a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
1190: 38 c8 cmp %cl,%al
1192: 75 15 jne 11a9 <strcmp+0x39>
p++, q++;
1194: 89 d9 mov %ebx,%ecx
1196: 83 c2 01 add $0x1,%edx
}
int
strcmp(const char *p, const char *q)
{
while(*p && *p == *q)
1199: 0f b6 02 movzbl (%edx),%eax
p++, q++;
119c: 8d 59 01 lea 0x1(%ecx),%ebx
}
int
strcmp(const char *p, const char *q)
{
while(*p && *p == *q)
119f: 0f b6 49 01 movzbl 0x1(%ecx),%ecx
11a3: 84 c0 test %al,%al
11a5: 75 e9 jne 1190 <strcmp+0x20>
11a7: 31 c0 xor %eax,%eax
p++, q++;
return (uchar)*p - (uchar)*q;
11a9: 29 c8 sub %ecx,%eax
}
11ab: 5b pop %ebx
11ac: 5d pop %ebp
11ad: c3 ret
11ae: 0f b6 09 movzbl (%ecx),%ecx
}
int
strcmp(const char *p, const char *q)
{
while(*p && *p == *q)
11b1: 31 c0 xor %eax,%eax
11b3: eb f4 jmp 11a9 <strcmp+0x39>
11b5: 0f b6 cb movzbl %bl,%ecx
11b8: eb ef jmp 11a9 <strcmp+0x39>
11ba: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
000011c0 <strlen>:
return (uchar)*p - (uchar)*q;
}
uint
strlen(char *s)
{
11c0: 55 push %ebp
11c1: 89 e5 mov %esp,%ebp
11c3: 8b 4d 08 mov 0x8(%ebp),%ecx
int n;
for(n = 0; s[n]; n++)
11c6: 80 39 00 cmpb $0x0,(%ecx)
11c9: 74 12 je 11dd <strlen+0x1d>
11cb: 31 d2 xor %edx,%edx
11cd: 8d 76 00 lea 0x0(%esi),%esi
11d0: 83 c2 01 add $0x1,%edx
11d3: 80 3c 11 00 cmpb $0x0,(%ecx,%edx,1)
11d7: 89 d0 mov %edx,%eax
11d9: 75 f5 jne 11d0 <strlen+0x10>
;
return n;
}
11db: 5d pop %ebp
11dc: c3 ret
uint
strlen(char *s)
{
int n;
for(n = 0; s[n]; n++)
11dd: 31 c0 xor %eax,%eax
;
return n;
}
11df: 5d pop %ebp
11e0: c3 ret
11e1: eb 0d jmp 11f0 <memset>
11e3: 90 nop
11e4: 90 nop
11e5: 90 nop
11e6: 90 nop
11e7: 90 nop
11e8: 90 nop
11e9: 90 nop
11ea: 90 nop
11eb: 90 nop
11ec: 90 nop
11ed: 90 nop
11ee: 90 nop
11ef: 90 nop
000011f0 <memset>:
void*
memset(void *dst, int c, uint n)
{
11f0: 55 push %ebp
11f1: 89 e5 mov %esp,%ebp
11f3: 8b 55 08 mov 0x8(%ebp),%edx
11f6: 57 push %edi
}
static inline void
stosb(void *addr, int data, int cnt)
{
asm volatile("cld; rep stosb" :
11f7: 8b 4d 10 mov 0x10(%ebp),%ecx
11fa: 8b 45 0c mov 0xc(%ebp),%eax
11fd: 89 d7 mov %edx,%edi
11ff: fc cld
1200: f3 aa rep stos %al,%es:(%edi)
stosb(dst, c, n);
return dst;
}
1202: 89 d0 mov %edx,%eax
1204: 5f pop %edi
1205: 5d pop %ebp
1206: c3 ret
1207: 89 f6 mov %esi,%esi
1209: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00001210 <strchr>:
char*
strchr(const char *s, char c)
{
1210: 55 push %ebp
1211: 89 e5 mov %esp,%ebp
1213: 8b 45 08 mov 0x8(%ebp),%eax
1216: 53 push %ebx
1217: 8b 55 0c mov 0xc(%ebp),%edx
for(; *s; s++)
121a: 0f b6 18 movzbl (%eax),%ebx
121d: 84 db test %bl,%bl
121f: 74 1d je 123e <strchr+0x2e>
if(*s == c)
1221: 38 d3 cmp %dl,%bl
1223: 89 d1 mov %edx,%ecx
1225: 75 0d jne 1234 <strchr+0x24>
1227: eb 17 jmp 1240 <strchr+0x30>
1229: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
1230: 38 ca cmp %cl,%dl
1232: 74 0c je 1240 <strchr+0x30>
}
char*
strchr(const char *s, char c)
{
for(; *s; s++)
1234: 83 c0 01 add $0x1,%eax
1237: 0f b6 10 movzbl (%eax),%edx
123a: 84 d2 test %dl,%dl
123c: 75 f2 jne 1230 <strchr+0x20>
if(*s == c)
return (char*)s;
return 0;
123e: 31 c0 xor %eax,%eax
}
1240: 5b pop %ebx
1241: 5d pop %ebp
1242: c3 ret
1243: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
1249: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00001250 <gets>:
char*
gets(char *buf, int max)
{
1250: 55 push %ebp
1251: 89 e5 mov %esp,%ebp
1253: 57 push %edi
1254: 56 push %esi
int i, cc;
char c;
for(i=0; i+1 < max; ){
1255: 31 f6 xor %esi,%esi
return 0;
}
char*
gets(char *buf, int max)
{
1257: 53 push %ebx
1258: 83 ec 2c sub $0x2c,%esp
int i, cc;
char c;
for(i=0; i+1 < max; ){
cc = read(0, &c, 1);
125b: 8d 7d e7 lea -0x19(%ebp),%edi
gets(char *buf, int max)
{
int i, cc;
char c;
for(i=0; i+1 < max; ){
125e: eb 31 jmp 1291 <gets+0x41>
cc = read(0, &c, 1);
1260: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
1267: 00
1268: 89 7c 24 04 mov %edi,0x4(%esp)
126c: c7 04 24 00 00 00 00 movl $0x0,(%esp)
1273: e8 02 01 00 00 call 137a <read>
if(cc < 1)
1278: 85 c0 test %eax,%eax
127a: 7e 1d jle 1299 <gets+0x49>
break;
buf[i++] = c;
127c: 0f b6 45 e7 movzbl -0x19(%ebp),%eax
gets(char *buf, int max)
{
int i, cc;
char c;
for(i=0; i+1 < max; ){
1280: 89 de mov %ebx,%esi
cc = read(0, &c, 1);
if(cc < 1)
break;
buf[i++] = c;
1282: 8b 55 08 mov 0x8(%ebp),%edx
if(c == '\n' || c == '\r')
1285: 3c 0d cmp $0xd,%al
for(i=0; i+1 < max; ){
cc = read(0, &c, 1);
if(cc < 1)
break;
buf[i++] = c;
1287: 88 44 1a ff mov %al,-0x1(%edx,%ebx,1)
if(c == '\n' || c == '\r')
128b: 74 0c je 1299 <gets+0x49>
128d: 3c 0a cmp $0xa,%al
128f: 74 08 je 1299 <gets+0x49>
gets(char *buf, int max)
{
int i, cc;
char c;
for(i=0; i+1 < max; ){
1291: 8d 5e 01 lea 0x1(%esi),%ebx
1294: 3b 5d 0c cmp 0xc(%ebp),%ebx
1297: 7c c7 jl 1260 <gets+0x10>
break;
buf[i++] = c;
if(c == '\n' || c == '\r')
break;
}
buf[i] = '\0';
1299: 8b 45 08 mov 0x8(%ebp),%eax
129c: c6 04 30 00 movb $0x0,(%eax,%esi,1)
return buf;
}
12a0: 83 c4 2c add $0x2c,%esp
12a3: 5b pop %ebx
12a4: 5e pop %esi
12a5: 5f pop %edi
12a6: 5d pop %ebp
12a7: c3 ret
12a8: 90 nop
12a9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
000012b0 <stat>:
int
stat(char *n, struct stat *st)
{
12b0: 55 push %ebp
12b1: 89 e5 mov %esp,%ebp
12b3: 56 push %esi
12b4: 53 push %ebx
12b5: 83 ec 10 sub $0x10,%esp
int fd;
int r;
fd = open(n, O_RDONLY);
12b8: 8b 45 08 mov 0x8(%ebp),%eax
12bb: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
12c2: 00
12c3: 89 04 24 mov %eax,(%esp)
12c6: e8 d7 00 00 00 call 13a2 <open>
if(fd < 0)
12cb: 85 c0 test %eax,%eax
stat(char *n, struct stat *st)
{
int fd;
int r;
fd = open(n, O_RDONLY);
12cd: 89 c3 mov %eax,%ebx
if(fd < 0)
12cf: 78 27 js 12f8 <stat+0x48>
return -1;
r = fstat(fd, st);
12d1: 8b 45 0c mov 0xc(%ebp),%eax
12d4: 89 1c 24 mov %ebx,(%esp)
12d7: 89 44 24 04 mov %eax,0x4(%esp)
12db: e8 da 00 00 00 call 13ba <fstat>
close(fd);
12e0: 89 1c 24 mov %ebx,(%esp)
int r;
fd = open(n, O_RDONLY);
if(fd < 0)
return -1;
r = fstat(fd, st);
12e3: 89 c6 mov %eax,%esi
close(fd);
12e5: e8 a0 00 00 00 call 138a <close>
return r;
12ea: 89 f0 mov %esi,%eax
}
12ec: 83 c4 10 add $0x10,%esp
12ef: 5b pop %ebx
12f0: 5e pop %esi
12f1: 5d pop %ebp
12f2: c3 ret
12f3: 90 nop
12f4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
int fd;
int r;
fd = open(n, O_RDONLY);
if(fd < 0)
return -1;
12f8: b8 ff ff ff ff mov $0xffffffff,%eax
12fd: eb ed jmp 12ec <stat+0x3c>
12ff: 90 nop
00001300 <atoi>:
return r;
}
int
atoi(const char *s)
{
1300: 55 push %ebp
1301: 89 e5 mov %esp,%ebp
1303: 8b 4d 08 mov 0x8(%ebp),%ecx
1306: 53 push %ebx
int n;
n = 0;
while('0' <= *s && *s <= '9')
1307: 0f be 11 movsbl (%ecx),%edx
130a: 8d 42 d0 lea -0x30(%edx),%eax
130d: 3c 09 cmp $0x9,%al
int
atoi(const char *s)
{
int n;
n = 0;
130f: b8 00 00 00 00 mov $0x0,%eax
while('0' <= *s && *s <= '9')
1314: 77 17 ja 132d <atoi+0x2d>
1316: 66 90 xchg %ax,%ax
n = n*10 + *s++ - '0';
1318: 83 c1 01 add $0x1,%ecx
131b: 8d 04 80 lea (%eax,%eax,4),%eax
131e: 8d 44 42 d0 lea -0x30(%edx,%eax,2),%eax
atoi(const char *s)
{
int n;
n = 0;
while('0' <= *s && *s <= '9')
1322: 0f be 11 movsbl (%ecx),%edx
1325: 8d 5a d0 lea -0x30(%edx),%ebx
1328: 80 fb 09 cmp $0x9,%bl
132b: 76 eb jbe 1318 <atoi+0x18>
n = n*10 + *s++ - '0';
return n;
}
132d: 5b pop %ebx
132e: 5d pop %ebp
132f: c3 ret
00001330 <memmove>:
void*
memmove(void *vdst, void *vsrc, int n)
{
1330: 55 push %ebp
char *dst, *src;
dst = vdst;
src = vsrc;
while(n-- > 0)
1331: 31 d2 xor %edx,%edx
return n;
}
void*
memmove(void *vdst, void *vsrc, int n)
{
1333: 89 e5 mov %esp,%ebp
1335: 56 push %esi
1336: 8b 45 08 mov 0x8(%ebp),%eax
1339: 53 push %ebx
133a: 8b 5d 10 mov 0x10(%ebp),%ebx
133d: 8b 75 0c mov 0xc(%ebp),%esi
char *dst, *src;
dst = vdst;
src = vsrc;
while(n-- > 0)
1340: 85 db test %ebx,%ebx
1342: 7e 12 jle 1356 <memmove+0x26>
1344: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
*dst++ = *src++;
1348: 0f b6 0c 16 movzbl (%esi,%edx,1),%ecx
134c: 88 0c 10 mov %cl,(%eax,%edx,1)
134f: 83 c2 01 add $0x1,%edx
{
char *dst, *src;
dst = vdst;
src = vsrc;
while(n-- > 0)
1352: 39 da cmp %ebx,%edx
1354: 75 f2 jne 1348 <memmove+0x18>
*dst++ = *src++;
return vdst;
}
1356: 5b pop %ebx
1357: 5e pop %esi
1358: 5d pop %ebp
1359: c3 ret
0000135a <fork>:
name: \
movl $SYS_ ## name, %eax; \
int $T_SYSCALL; \
ret
SYSCALL(fork)
135a: b8 01 00 00 00 mov $0x1,%eax
135f: cd 40 int $0x40
1361: c3 ret
00001362 <exit>:
SYSCALL(exit)
1362: b8 02 00 00 00 mov $0x2,%eax
1367: cd 40 int $0x40
1369: c3 ret
0000136a <wait>:
SYSCALL(wait)
136a: b8 03 00 00 00 mov $0x3,%eax
136f: cd 40 int $0x40
1371: c3 ret
00001372 <pipe>:
SYSCALL(pipe)
1372: b8 04 00 00 00 mov $0x4,%eax
1377: cd 40 int $0x40
1379: c3 ret
0000137a <read>:
SYSCALL(read)
137a: b8 05 00 00 00 mov $0x5,%eax
137f: cd 40 int $0x40
1381: c3 ret
00001382 <write>:
SYSCALL(write)
1382: b8 10 00 00 00 mov $0x10,%eax
1387: cd 40 int $0x40
1389: c3 ret
0000138a <close>:
SYSCALL(close)
138a: b8 15 00 00 00 mov $0x15,%eax
138f: cd 40 int $0x40
1391: c3 ret
00001392 <kill>:
SYSCALL(kill)
1392: b8 06 00 00 00 mov $0x6,%eax
1397: cd 40 int $0x40
1399: c3 ret
0000139a <exec>:
SYSCALL(exec)
139a: b8 07 00 00 00 mov $0x7,%eax
139f: cd 40 int $0x40
13a1: c3 ret
000013a2 <open>:
SYSCALL(open)
13a2: b8 0f 00 00 00 mov $0xf,%eax
13a7: cd 40 int $0x40
13a9: c3 ret
000013aa <mknod>:
SYSCALL(mknod)
13aa: b8 11 00 00 00 mov $0x11,%eax
13af: cd 40 int $0x40
13b1: c3 ret
000013b2 <unlink>:
SYSCALL(unlink)
13b2: b8 12 00 00 00 mov $0x12,%eax
13b7: cd 40 int $0x40
13b9: c3 ret
000013ba <fstat>:
SYSCALL(fstat)
13ba: b8 08 00 00 00 mov $0x8,%eax
13bf: cd 40 int $0x40
13c1: c3 ret
000013c2 <link>:
SYSCALL(link)
13c2: b8 13 00 00 00 mov $0x13,%eax
13c7: cd 40 int $0x40
13c9: c3 ret
000013ca <mkdir>:
SYSCALL(mkdir)
13ca: b8 14 00 00 00 mov $0x14,%eax
13cf: cd 40 int $0x40
13d1: c3 ret
000013d2 <chdir>:
SYSCALL(chdir)
13d2: b8 09 00 00 00 mov $0x9,%eax
13d7: cd 40 int $0x40
13d9: c3 ret
000013da <dup>:
SYSCALL(dup)
13da: b8 0a 00 00 00 mov $0xa,%eax
13df: cd 40 int $0x40
13e1: c3 ret
000013e2 <getpid>:
SYSCALL(getpid)
13e2: b8 0b 00 00 00 mov $0xb,%eax
13e7: cd 40 int $0x40
13e9: c3 ret
000013ea <sbrk>:
SYSCALL(sbrk)
13ea: b8 0c 00 00 00 mov $0xc,%eax
13ef: cd 40 int $0x40
13f1: c3 ret
000013f2 <sleep>:
SYSCALL(sleep)
13f2: b8 0d 00 00 00 mov $0xd,%eax
13f7: cd 40 int $0x40
13f9: c3 ret
000013fa <uptime>:
SYSCALL(uptime)
13fa: b8 0e 00 00 00 mov $0xe,%eax
13ff: cd 40 int $0x40
1401: c3 ret
00001402 <shm_open>:
SYSCALL(shm_open)
1402: b8 16 00 00 00 mov $0x16,%eax
1407: cd 40 int $0x40
1409: c3 ret
0000140a <shm_close>:
SYSCALL(shm_close)
140a: b8 17 00 00 00 mov $0x17,%eax
140f: cd 40 int $0x40
1411: c3 ret
1412: 66 90 xchg %ax,%ax
1414: 66 90 xchg %ax,%ax
1416: 66 90 xchg %ax,%ax
1418: 66 90 xchg %ax,%ax
141a: 66 90 xchg %ax,%ax
141c: 66 90 xchg %ax,%ax
141e: 66 90 xchg %ax,%ax
00001420 <printint>:
write(fd, &c, 1);
}
static void
printint(int fd, int xx, int base, int sgn)
{
1420: 55 push %ebp
1421: 89 e5 mov %esp,%ebp
1423: 57 push %edi
1424: 56 push %esi
1425: 89 c6 mov %eax,%esi
1427: 53 push %ebx
1428: 83 ec 4c sub $0x4c,%esp
char buf[16];
int i, neg;
uint x;
neg = 0;
if(sgn && xx < 0){
142b: 8b 5d 08 mov 0x8(%ebp),%ebx
142e: 85 db test %ebx,%ebx
1430: 74 09 je 143b <printint+0x1b>
1432: 89 d0 mov %edx,%eax
1434: c1 e8 1f shr $0x1f,%eax
1437: 84 c0 test %al,%al
1439: 75 75 jne 14b0 <printint+0x90>
neg = 1;
x = -xx;
} else {
x = xx;
143b: 89 d0 mov %edx,%eax
static char digits[] = "0123456789ABCDEF";
char buf[16];
int i, neg;
uint x;
neg = 0;
143d: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp)
1444: 89 75 c0 mov %esi,-0x40(%ebp)
x = -xx;
} else {
x = xx;
}
i = 0;
1447: 31 ff xor %edi,%edi
1449: 89 ce mov %ecx,%esi
144b: 8d 5d d7 lea -0x29(%ebp),%ebx
144e: eb 02 jmp 1452 <printint+0x32>
do{
buf[i++] = digits[x % base];
1450: 89 cf mov %ecx,%edi
1452: 31 d2 xor %edx,%edx
1454: f7 f6 div %esi
1456: 8d 4f 01 lea 0x1(%edi),%ecx
1459: 0f b6 92 8b 18 00 00 movzbl 0x188b(%edx),%edx
}while((x /= base) != 0);
1460: 85 c0 test %eax,%eax
x = xx;
}
i = 0;
do{
buf[i++] = digits[x % base];
1462: 88 14 0b mov %dl,(%ebx,%ecx,1)
}while((x /= base) != 0);
1465: 75 e9 jne 1450 <printint+0x30>
if(neg)
1467: 8b 55 c4 mov -0x3c(%ebp),%edx
x = xx;
}
i = 0;
do{
buf[i++] = digits[x % base];
146a: 89 c8 mov %ecx,%eax
146c: 8b 75 c0 mov -0x40(%ebp),%esi
}while((x /= base) != 0);
if(neg)
146f: 85 d2 test %edx,%edx
1471: 74 08 je 147b <printint+0x5b>
buf[i++] = '-';
1473: 8d 4f 02 lea 0x2(%edi),%ecx
1476: c6 44 05 d8 2d movb $0x2d,-0x28(%ebp,%eax,1)
while(--i >= 0)
147b: 8d 79 ff lea -0x1(%ecx),%edi
147e: 66 90 xchg %ax,%ax
1480: 0f b6 44 3d d8 movzbl -0x28(%ebp,%edi,1),%eax
1485: 83 ef 01 sub $0x1,%edi
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
1488: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
148f: 00
1490: 89 5c 24 04 mov %ebx,0x4(%esp)
1494: 89 34 24 mov %esi,(%esp)
1497: 88 45 d7 mov %al,-0x29(%ebp)
149a: e8 e3 fe ff ff call 1382 <write>
buf[i++] = digits[x % base];
}while((x /= base) != 0);
if(neg)
buf[i++] = '-';
while(--i >= 0)
149f: 83 ff ff cmp $0xffffffff,%edi
14a2: 75 dc jne 1480 <printint+0x60>
putc(fd, buf[i]);
}
14a4: 83 c4 4c add $0x4c,%esp
14a7: 5b pop %ebx
14a8: 5e pop %esi
14a9: 5f pop %edi
14aa: 5d pop %ebp
14ab: c3 ret
14ac: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
uint x;
neg = 0;
if(sgn && xx < 0){
neg = 1;
x = -xx;
14b0: 89 d0 mov %edx,%eax
14b2: f7 d8 neg %eax
int i, neg;
uint x;
neg = 0;
if(sgn && xx < 0){
neg = 1;
14b4: c7 45 c4 01 00 00 00 movl $0x1,-0x3c(%ebp)
14bb: eb 87 jmp 1444 <printint+0x24>
14bd: 8d 76 00 lea 0x0(%esi),%esi
000014c0 <printf>:
}
// Print to the given fd. Only understands %d, %x, %p, %s.
void
printf(int fd, char *fmt, ...)
{
14c0: 55 push %ebp
14c1: 89 e5 mov %esp,%ebp
14c3: 57 push %edi
char *s;
int c, i, state;
uint *ap;
state = 0;
14c4: 31 ff xor %edi,%edi
}
// Print to the given fd. Only understands %d, %x, %p, %s.
void
printf(int fd, char *fmt, ...)
{
14c6: 56 push %esi
14c7: 53 push %ebx
14c8: 83 ec 3c sub $0x3c,%esp
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
14cb: 8b 5d 0c mov 0xc(%ebp),%ebx
char *s;
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
14ce: 8d 45 10 lea 0x10(%ebp),%eax
}
// Print to the given fd. Only understands %d, %x, %p, %s.
void
printf(int fd, char *fmt, ...)
{
14d1: 8b 75 08 mov 0x8(%ebp),%esi
char *s;
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
14d4: 89 45 d4 mov %eax,-0x2c(%ebp)
for(i = 0; fmt[i]; i++){
14d7: 0f b6 13 movzbl (%ebx),%edx
14da: 83 c3 01 add $0x1,%ebx
14dd: 84 d2 test %dl,%dl
14df: 75 39 jne 151a <printf+0x5a>
14e1: e9 c2 00 00 00 jmp 15a8 <printf+0xe8>
14e6: 66 90 xchg %ax,%ax
c = fmt[i] & 0xff;
if(state == 0){
if(c == '%'){
14e8: 83 fa 25 cmp $0x25,%edx
14eb: 0f 84 bf 00 00 00 je 15b0 <printf+0xf0>
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
14f1: 8d 45 e2 lea -0x1e(%ebp),%eax
14f4: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
14fb: 00
14fc: 89 44 24 04 mov %eax,0x4(%esp)
1500: 89 34 24 mov %esi,(%esp)
c = fmt[i] & 0xff;
if(state == 0){
if(c == '%'){
state = '%';
} else {
putc(fd, c);
1503: 88 55 e2 mov %dl,-0x1e(%ebp)
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
1506: e8 77 fe ff ff call 1382 <write>
150b: 83 c3 01 add $0x1,%ebx
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
150e: 0f b6 53 ff movzbl -0x1(%ebx),%edx
1512: 84 d2 test %dl,%dl
1514: 0f 84 8e 00 00 00 je 15a8 <printf+0xe8>
c = fmt[i] & 0xff;
if(state == 0){
151a: 85 ff test %edi,%edi
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
c = fmt[i] & 0xff;
151c: 0f be c2 movsbl %dl,%eax
if(state == 0){
151f: 74 c7 je 14e8 <printf+0x28>
if(c == '%'){
state = '%';
} else {
putc(fd, c);
}
} else if(state == '%'){
1521: 83 ff 25 cmp $0x25,%edi
1524: 75 e5 jne 150b <printf+0x4b>
if(c == 'd'){
1526: 83 fa 64 cmp $0x64,%edx
1529: 0f 84 31 01 00 00 je 1660 <printf+0x1a0>
printint(fd, *ap, 10, 1);
ap++;
} else if(c == 'x' || c == 'p'){
152f: 25 f7 00 00 00 and $0xf7,%eax
1534: 83 f8 70 cmp $0x70,%eax
1537: 0f 84 83 00 00 00 je 15c0 <printf+0x100>
printint(fd, *ap, 16, 0);
ap++;
} else if(c == 's'){
153d: 83 fa 73 cmp $0x73,%edx
1540: 0f 84 a2 00 00 00 je 15e8 <printf+0x128>
s = "(null)";
while(*s != 0){
putc(fd, *s);
s++;
}
} else if(c == 'c'){
1546: 83 fa 63 cmp $0x63,%edx
1549: 0f 84 35 01 00 00 je 1684 <printf+0x1c4>
putc(fd, *ap);
ap++;
} else if(c == '%'){
154f: 83 fa 25 cmp $0x25,%edx
1552: 0f 84 e0 00 00 00 je 1638 <printf+0x178>
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
1558: 8d 45 e6 lea -0x1a(%ebp),%eax
155b: 83 c3 01 add $0x1,%ebx
155e: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
1565: 00
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
putc(fd, c);
}
state = 0;
1566: 31 ff xor %edi,%edi
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
1568: 89 44 24 04 mov %eax,0x4(%esp)
156c: 89 34 24 mov %esi,(%esp)
156f: 89 55 d0 mov %edx,-0x30(%ebp)
1572: c6 45 e6 25 movb $0x25,-0x1a(%ebp)
1576: e8 07 fe ff ff call 1382 <write>
} else if(c == '%'){
putc(fd, c);
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
putc(fd, c);
157b: 8b 55 d0 mov -0x30(%ebp),%edx
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
157e: 8d 45 e7 lea -0x19(%ebp),%eax
1581: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
1588: 00
1589: 89 44 24 04 mov %eax,0x4(%esp)
158d: 89 34 24 mov %esi,(%esp)
} else if(c == '%'){
putc(fd, c);
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
putc(fd, c);
1590: 88 55 e7 mov %dl,-0x19(%ebp)
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
1593: e8 ea fd ff ff call 1382 <write>
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
1598: 0f b6 53 ff movzbl -0x1(%ebx),%edx
159c: 84 d2 test %dl,%dl
159e: 0f 85 76 ff ff ff jne 151a <printf+0x5a>
15a4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
putc(fd, c);
}
state = 0;
}
}
}
15a8: 83 c4 3c add $0x3c,%esp
15ab: 5b pop %ebx
15ac: 5e pop %esi
15ad: 5f pop %edi
15ae: 5d pop %ebp
15af: c3 ret
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
c = fmt[i] & 0xff;
if(state == 0){
if(c == '%'){
state = '%';
15b0: bf 25 00 00 00 mov $0x25,%edi
15b5: e9 51 ff ff ff jmp 150b <printf+0x4b>
15ba: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
} else if(state == '%'){
if(c == 'd'){
printint(fd, *ap, 10, 1);
ap++;
} else if(c == 'x' || c == 'p'){
printint(fd, *ap, 16, 0);
15c0: 8b 45 d4 mov -0x2c(%ebp),%eax
15c3: b9 10 00 00 00 mov $0x10,%ecx
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
putc(fd, c);
}
state = 0;
15c8: 31 ff xor %edi,%edi
} else if(state == '%'){
if(c == 'd'){
printint(fd, *ap, 10, 1);
ap++;
} else if(c == 'x' || c == 'p'){
printint(fd, *ap, 16, 0);
15ca: c7 04 24 00 00 00 00 movl $0x0,(%esp)
15d1: 8b 10 mov (%eax),%edx
15d3: 89 f0 mov %esi,%eax
15d5: e8 46 fe ff ff call 1420 <printint>
ap++;
15da: 83 45 d4 04 addl $0x4,-0x2c(%ebp)
15de: e9 28 ff ff ff jmp 150b <printf+0x4b>
15e3: 90 nop
15e4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
} else if(c == 's'){
s = (char*)*ap;
15e8: 8b 45 d4 mov -0x2c(%ebp),%eax
ap++;
15eb: 83 45 d4 04 addl $0x4,-0x2c(%ebp)
ap++;
} else if(c == 'x' || c == 'p'){
printint(fd, *ap, 16, 0);
ap++;
} else if(c == 's'){
s = (char*)*ap;
15ef: 8b 38 mov (%eax),%edi
ap++;
if(s == 0)
s = "(null)";
15f1: b8 84 18 00 00 mov $0x1884,%eax
15f6: 85 ff test %edi,%edi
15f8: 0f 44 f8 cmove %eax,%edi
while(*s != 0){
15fb: 0f b6 07 movzbl (%edi),%eax
15fe: 84 c0 test %al,%al
1600: 74 2a je 162c <printf+0x16c>
1602: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
1608: 88 45 e3 mov %al,-0x1d(%ebp)
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
160b: 8d 45 e3 lea -0x1d(%ebp),%eax
ap++;
if(s == 0)
s = "(null)";
while(*s != 0){
putc(fd, *s);
s++;
160e: 83 c7 01 add $0x1,%edi
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
1611: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
1618: 00
1619: 89 44 24 04 mov %eax,0x4(%esp)
161d: 89 34 24 mov %esi,(%esp)
1620: e8 5d fd ff ff call 1382 <write>
} else if(c == 's'){
s = (char*)*ap;
ap++;
if(s == 0)
s = "(null)";
while(*s != 0){
1625: 0f b6 07 movzbl (%edi),%eax
1628: 84 c0 test %al,%al
162a: 75 dc jne 1608 <printf+0x148>
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
putc(fd, c);
}
state = 0;
162c: 31 ff xor %edi,%edi
162e: e9 d8 fe ff ff jmp 150b <printf+0x4b>
1633: 90 nop
1634: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
1638: 8d 45 e5 lea -0x1b(%ebp),%eax
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
putc(fd, c);
}
state = 0;
163b: 31 ff xor %edi,%edi
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
163d: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
1644: 00
1645: 89 44 24 04 mov %eax,0x4(%esp)
1649: 89 34 24 mov %esi,(%esp)
164c: c6 45 e5 25 movb $0x25,-0x1b(%ebp)
1650: e8 2d fd ff ff call 1382 <write>
1655: e9 b1 fe ff ff jmp 150b <printf+0x4b>
165a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
} else {
putc(fd, c);
}
} else if(state == '%'){
if(c == 'd'){
printint(fd, *ap, 10, 1);
1660: 8b 45 d4 mov -0x2c(%ebp),%eax
1663: b9 0a 00 00 00 mov $0xa,%ecx
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
putc(fd, c);
}
state = 0;
1668: 66 31 ff xor %di,%di
} else {
putc(fd, c);
}
} else if(state == '%'){
if(c == 'd'){
printint(fd, *ap, 10, 1);
166b: c7 04 24 01 00 00 00 movl $0x1,(%esp)
1672: 8b 10 mov (%eax),%edx
1674: 89 f0 mov %esi,%eax
1676: e8 a5 fd ff ff call 1420 <printint>
ap++;
167b: 83 45 d4 04 addl $0x4,-0x2c(%ebp)
167f: e9 87 fe ff ff jmp 150b <printf+0x4b>
while(*s != 0){
putc(fd, *s);
s++;
}
} else if(c == 'c'){
putc(fd, *ap);
1684: 8b 45 d4 mov -0x2c(%ebp),%eax
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
putc(fd, c);
}
state = 0;
1687: 31 ff xor %edi,%edi
while(*s != 0){
putc(fd, *s);
s++;
}
} else if(c == 'c'){
putc(fd, *ap);
1689: 8b 00 mov (%eax),%eax
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
168b: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
1692: 00
1693: 89 34 24 mov %esi,(%esp)
while(*s != 0){
putc(fd, *s);
s++;
}
} else if(c == 'c'){
putc(fd, *ap);
1696: 88 45 e4 mov %al,-0x1c(%ebp)
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
1699: 8d 45 e4 lea -0x1c(%ebp),%eax
169c: 89 44 24 04 mov %eax,0x4(%esp)
16a0: e8 dd fc ff ff call 1382 <write>
putc(fd, *s);
s++;
}
} else if(c == 'c'){
putc(fd, *ap);
ap++;
16a5: 83 45 d4 04 addl $0x4,-0x2c(%ebp)
16a9: e9 5d fe ff ff jmp 150b <printf+0x4b>
16ae: 66 90 xchg %ax,%ax
000016b0 <free>:
static Header base;
static Header *freep;
void
free(void *ap)
{
16b0: 55 push %ebp
Header *bp, *p;
bp = (Header*)ap - 1;
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
16b1: a1 44 1b 00 00 mov 0x1b44,%eax
static Header base;
static Header *freep;
void
free(void *ap)
{
16b6: 89 e5 mov %esp,%ebp
16b8: 57 push %edi
16b9: 56 push %esi
16ba: 53 push %ebx
16bb: 8b 5d 08 mov 0x8(%ebp),%ebx
Header *bp, *p;
bp = (Header*)ap - 1;
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
16be: 8b 08 mov (%eax),%ecx
void
free(void *ap)
{
Header *bp, *p;
bp = (Header*)ap - 1;
16c0: 8d 53 f8 lea -0x8(%ebx),%edx
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
16c3: 39 d0 cmp %edx,%eax
16c5: 72 11 jb 16d8 <free+0x28>
16c7: 90 nop
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
16c8: 39 c8 cmp %ecx,%eax
16ca: 72 04 jb 16d0 <free+0x20>
16cc: 39 ca cmp %ecx,%edx
16ce: 72 10 jb 16e0 <free+0x30>
16d0: 89 c8 mov %ecx,%eax
free(void *ap)
{
Header *bp, *p;
bp = (Header*)ap - 1;
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
16d2: 39 d0 cmp %edx,%eax
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
16d4: 8b 08 mov (%eax),%ecx
free(void *ap)
{
Header *bp, *p;
bp = (Header*)ap - 1;
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
16d6: 73 f0 jae 16c8 <free+0x18>
16d8: 39 ca cmp %ecx,%edx
16da: 72 04 jb 16e0 <free+0x30>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
16dc: 39 c8 cmp %ecx,%eax
16de: 72 f0 jb 16d0 <free+0x20>
break;
if(bp + bp->s.size == p->s.ptr){
16e0: 8b 73 fc mov -0x4(%ebx),%esi
16e3: 8d 3c f2 lea (%edx,%esi,8),%edi
16e6: 39 cf cmp %ecx,%edi
16e8: 74 1e je 1708 <free+0x58>
bp->s.size += p->s.ptr->s.size;
bp->s.ptr = p->s.ptr->s.ptr;
} else
bp->s.ptr = p->s.ptr;
16ea: 89 4b f8 mov %ecx,-0x8(%ebx)
if(p + p->s.size == bp){
16ed: 8b 48 04 mov 0x4(%eax),%ecx
16f0: 8d 34 c8 lea (%eax,%ecx,8),%esi
16f3: 39 f2 cmp %esi,%edx
16f5: 74 28 je 171f <free+0x6f>
p->s.size += bp->s.size;
p->s.ptr = bp->s.ptr;
} else
p->s.ptr = bp;
16f7: 89 10 mov %edx,(%eax)
freep = p;
16f9: a3 44 1b 00 00 mov %eax,0x1b44
}
16fe: 5b pop %ebx
16ff: 5e pop %esi
1700: 5f pop %edi
1701: 5d pop %ebp
1702: c3 ret
1703: 90 nop
1704: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
bp = (Header*)ap - 1;
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
break;
if(bp + bp->s.size == p->s.ptr){
bp->s.size += p->s.ptr->s.size;
1708: 03 71 04 add 0x4(%ecx),%esi
170b: 89 73 fc mov %esi,-0x4(%ebx)
bp->s.ptr = p->s.ptr->s.ptr;
170e: 8b 08 mov (%eax),%ecx
1710: 8b 09 mov (%ecx),%ecx
1712: 89 4b f8 mov %ecx,-0x8(%ebx)
} else
bp->s.ptr = p->s.ptr;
if(p + p->s.size == bp){
1715: 8b 48 04 mov 0x4(%eax),%ecx
1718: 8d 34 c8 lea (%eax,%ecx,8),%esi
171b: 39 f2 cmp %esi,%edx
171d: 75 d8 jne 16f7 <free+0x47>
p->s.size += bp->s.size;
171f: 03 4b fc add -0x4(%ebx),%ecx
p->s.ptr = bp->s.ptr;
} else
p->s.ptr = bp;
freep = p;
1722: a3 44 1b 00 00 mov %eax,0x1b44
bp->s.size += p->s.ptr->s.size;
bp->s.ptr = p->s.ptr->s.ptr;
} else
bp->s.ptr = p->s.ptr;
if(p + p->s.size == bp){
p->s.size += bp->s.size;
1727: 89 48 04 mov %ecx,0x4(%eax)
p->s.ptr = bp->s.ptr;
172a: 8b 53 f8 mov -0x8(%ebx),%edx
172d: 89 10 mov %edx,(%eax)
} else
p->s.ptr = bp;
freep = p;
}
172f: 5b pop %ebx
1730: 5e pop %esi
1731: 5f pop %edi
1732: 5d pop %ebp
1733: c3 ret
1734: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
173a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
00001740 <malloc>:
return freep;
}
void*
malloc(uint nbytes)
{
1740: 55 push %ebp
1741: 89 e5 mov %esp,%ebp
1743: 57 push %edi
1744: 56 push %esi
1745: 53 push %ebx
1746: 83 ec 1c sub $0x1c,%esp
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
1749: 8b 45 08 mov 0x8(%ebp),%eax
if((prevp = freep) == 0){
174c: 8b 1d 44 1b 00 00 mov 0x1b44,%ebx
malloc(uint nbytes)
{
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
1752: 8d 48 07 lea 0x7(%eax),%ecx
1755: c1 e9 03 shr $0x3,%ecx
if((prevp = freep) == 0){
1758: 85 db test %ebx,%ebx
malloc(uint nbytes)
{
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
175a: 8d 71 01 lea 0x1(%ecx),%esi
if((prevp = freep) == 0){
175d: 0f 84 9b 00 00 00 je 17fe <malloc+0xbe>
1763: 8b 13 mov (%ebx),%edx
1765: 8b 7a 04 mov 0x4(%edx),%edi
base.s.ptr = freep = prevp = &base;
base.s.size = 0;
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
if(p->s.size >= nunits){
1768: 39 fe cmp %edi,%esi
176a: 76 64 jbe 17d0 <malloc+0x90>
176c: 8d 04 f5 00 00 00 00 lea 0x0(,%esi,8),%eax
morecore(uint nu)
{
char *p;
Header *hp;
if(nu < 4096)
1773: bb 00 80 00 00 mov $0x8000,%ebx
1778: 89 45 e4 mov %eax,-0x1c(%ebp)
177b: eb 0e jmp 178b <malloc+0x4b>
177d: 8d 76 00 lea 0x0(%esi),%esi
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){
1780: 8b 02 mov (%edx),%eax
if(p->s.size >= nunits){
1782: 8b 78 04 mov 0x4(%eax),%edi
1785: 39 fe cmp %edi,%esi
1787: 76 4f jbe 17d8 <malloc+0x98>
1789: 89 c2 mov %eax,%edx
p->s.size = nunits;
}
freep = prevp;
return (void*)(p + 1);
}
if(p == freep)
178b: 3b 15 44 1b 00 00 cmp 0x1b44,%edx
1791: 75 ed jne 1780 <malloc+0x40>
morecore(uint nu)
{
char *p;
Header *hp;
if(nu < 4096)
1793: 8b 45 e4 mov -0x1c(%ebp),%eax
1796: 81 fe 00 10 00 00 cmp $0x1000,%esi
179c: bf 00 10 00 00 mov $0x1000,%edi
17a1: 0f 43 fe cmovae %esi,%edi
17a4: 0f 42 c3 cmovb %ebx,%eax
nu = 4096;
p = sbrk(nu * sizeof(Header));
17a7: 89 04 24 mov %eax,(%esp)
17aa: e8 3b fc ff ff call 13ea <sbrk>
if(p == (char*)-1)
17af: 83 f8 ff cmp $0xffffffff,%eax
17b2: 74 18 je 17cc <malloc+0x8c>
return 0;
hp = (Header*)p;
hp->s.size = nu;
17b4: 89 78 04 mov %edi,0x4(%eax)
free((void*)(hp + 1));
17b7: 83 c0 08 add $0x8,%eax
17ba: 89 04 24 mov %eax,(%esp)
17bd: e8 ee fe ff ff call 16b0 <free>
return freep;
17c2: 8b 15 44 1b 00 00 mov 0x1b44,%edx
}
freep = prevp;
return (void*)(p + 1);
}
if(p == freep)
if((p = morecore(nunits)) == 0)
17c8: 85 d2 test %edx,%edx
17ca: 75 b4 jne 1780 <malloc+0x40>
return 0;
17cc: 31 c0 xor %eax,%eax
17ce: eb 20 jmp 17f0 <malloc+0xb0>
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){
if(p->s.size >= nunits){
17d0: 89 d0 mov %edx,%eax
17d2: 89 da mov %ebx,%edx
17d4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
if(p->s.size == nunits)
17d8: 39 fe cmp %edi,%esi
17da: 74 1c je 17f8 <malloc+0xb8>
prevp->s.ptr = p->s.ptr;
else {
p->s.size -= nunits;
17dc: 29 f7 sub %esi,%edi
17de: 89 78 04 mov %edi,0x4(%eax)
p += p->s.size;
17e1: 8d 04 f8 lea (%eax,%edi,8),%eax
p->s.size = nunits;
17e4: 89 70 04 mov %esi,0x4(%eax)
}
freep = prevp;
17e7: 89 15 44 1b 00 00 mov %edx,0x1b44
return (void*)(p + 1);
17ed: 83 c0 08 add $0x8,%eax
}
if(p == freep)
if((p = morecore(nunits)) == 0)
return 0;
}
}
17f0: 83 c4 1c add $0x1c,%esp
17f3: 5b pop %ebx
17f4: 5e pop %esi
17f5: 5f pop %edi
17f6: 5d pop %ebp
17f7: c3 ret
base.s.size = 0;
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
if(p->s.size >= nunits){
if(p->s.size == nunits)
prevp->s.ptr = p->s.ptr;
17f8: 8b 08 mov (%eax),%ecx
17fa: 89 0a mov %ecx,(%edx)
17fc: eb e9 jmp 17e7 <malloc+0xa7>
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
if((prevp = freep) == 0){
base.s.ptr = freep = prevp = &base;
17fe: c7 05 44 1b 00 00 48 movl $0x1b48,0x1b44
1805: 1b 00 00
base.s.size = 0;
1808: ba 48 1b 00 00 mov $0x1b48,%edx
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
if((prevp = freep) == 0){
base.s.ptr = freep = prevp = &base;
180d: c7 05 48 1b 00 00 48 movl $0x1b48,0x1b48
1814: 1b 00 00
base.s.size = 0;
1817: c7 05 4c 1b 00 00 00 movl $0x0,0x1b4c
181e: 00 00 00
1821: e9 46 ff ff ff jmp 176c <malloc+0x2c>
1826: 66 90 xchg %ax,%ax
1828: 66 90 xchg %ax,%ax
182a: 66 90 xchg %ax,%ax
182c: 66 90 xchg %ax,%ax
182e: 66 90 xchg %ax,%ax
00001830 <uacquire>:
#include "uspinlock.h"
#include "x86.h"
void
uacquire(struct uspinlock *lk)
{
1830: 55 push %ebp
xchg(volatile uint *addr, uint newval)
{
uint result;
// The + in "+m" denotes a read-modify-write operand.
asm volatile("lock; xchgl %0, %1" :
1831: b9 01 00 00 00 mov $0x1,%ecx
1836: 89 e5 mov %esp,%ebp
1838: 8b 55 08 mov 0x8(%ebp),%edx
183b: 90 nop
183c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
1840: 89 c8 mov %ecx,%eax
1842: f0 87 02 lock xchg %eax,(%edx)
// The xchg is atomic.
while(xchg(&lk->locked, 1) != 0)
1845: 85 c0 test %eax,%eax
1847: 75 f7 jne 1840 <uacquire+0x10>
;
// Tell the C compiler and the processor to not move loads or stores
// past this point, to ensure that the critical section's memory
// references happen after the lock is acquired.
__sync_synchronize();
1849: 0f ae f0 mfence
}
184c: 5d pop %ebp
184d: c3 ret
184e: 66 90 xchg %ax,%ax
00001850 <urelease>:
void urelease (struct uspinlock *lk) {
1850: 55 push %ebp
1851: 89 e5 mov %esp,%ebp
1853: 8b 45 08 mov 0x8(%ebp),%eax
__sync_synchronize();
1856: 0f ae f0 mfence
// Release the lock, equivalent to lk->locked = 0.
// This code can't use a C assignment, since it might
// not be atomic. A real OS would use C atomics here.
asm volatile("movl $0, %0" : "+m" (lk->locked) : );
1859: c7 00 00 00 00 00 movl $0x0,(%eax)
}
185f: 5d pop %ebp
1860: c3 ret
| 30.191908 | 70 | 0.424331 |
3134d3d63de91025aa1e0a87521a126538d8f360 | 1,077 | asm | Assembly | Compiler/Test/Generator/IfFor/002.asm | try1117/PascalCompiler | 4890b8d1f2142c163a5bdf71227f805b429204f9 | [
"MIT"
] | null | null | null | Compiler/Test/Generator/IfFor/002.asm | try1117/PascalCompiler | 4890b8d1f2142c163a5bdf71227f805b429204f9 | [
"MIT"
] | null | null | null | Compiler/Test/Generator/IfFor/002.asm | try1117/PascalCompiler | 4890b8d1f2142c163a5bdf71227f805b429204f9 | [
"MIT"
] | null | null | null | include c:\masm32\include\masm32rt.inc
.xmm
.const
.code
start:
push ebp
mov ebp, esp
sub esp, 8
push 123
pop dword ptr [ebp - 4]
push 123
pop dword ptr [ebp - 8]
push dword ptr [ebp - 4]
push dword ptr [ebp - 8]
pop ebx
cmp dword ptr [esp - 0], ebx
setl al
sub al, 1
movsx eax, al
mov dword ptr [esp - 0], eax
pop eax
test eax, eax
jz $IFFAIL0@
push 1
pop eax
printf("%d\n", eax)
jmp $IFEND1@
$IFFAIL0@:
push 0
pop eax
printf("%d\n", eax)
$IFEND1@:
push dword ptr [ebp - 4]
push 123
pop ebx
cmp dword ptr [esp - 0], ebx
setg al
sub al, 1
movsx eax, al
mov dword ptr [esp - 0], eax
pop eax
test eax, eax
jz $IFFAIL2@
push 1
pop eax
printf("%d\n", eax)
jmp $IFEND3@
$IFFAIL2@:
push 0
pop eax
printf("%d\n", eax)
$IFEND3@:
push 124
pop dword ptr [ebp - 8]
push dword ptr [ebp - 8]
push dword ptr [ebp - 4]
pop ebx
cmp dword ptr [esp - 0], ebx
setg al
sub al, 1
movsx eax, al
mov dword ptr [esp - 0], eax
pop eax
test eax, eax
jz $IFFAIL4@
push 1
pop eax
printf("%d\n", eax)
jmp $IFEND5@
$IFFAIL4@:
push 0
pop eax
printf("%d\n", eax)
$IFEND5@:
mov esp, ebp
pop ebp
exit
end start
| 13.632911 | 38 | 0.665738 |
5947318b4445f9230f5805e74352d2fed27ff19d | 300 | asm | Assembly | programs/oeis/129/A129370.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/129/A129370.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/129/A129370.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A129370: a(n)=n^2-(n-1)^2*(1-(-1)^n)/8.
; 0,1,4,8,16,21,36,40,64,65,100,96,144,133,196,176,256,225,324,280,400,341,484,408,576,481,676,560,784,645,900,736,1024,833,1156,936,1296,1045,1444,1160,1600,1281,1764,1408
sub $0,1
mov $2,$0
mul $2,$0
add $0,2
pow $0,2
dif $2,2
add $0,$2
sub $0,2
div $0,2
| 23.076923 | 172 | 0.633333 |
0e3176277c2844694e7c6becb0138033845ab0d6 | 290 | asm | Assembly | programs/oeis/038/A038129.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/038/A038129.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/038/A038129.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A038129: Beatty sequence for cube root of 2.
; 0,1,2,3,5,6,7,8,10,11,12,13,15,16,17,18,20,21,22,23,25,26,27,28,30,31,32,34,35,36,37,39,40,41,42,44,45,46,47,49,50,51,52,54,55,56,57,59,60,61,62,64,65,66,68,69,70,71,73,74,75,76,78,79,80,81,83,84,85,86,88,89
mov $1,320
mul $1,$0
div $1,254
| 41.428571 | 209 | 0.655172 |
ac264d5857a957ce79dd86a7d455dc5a7cbab515 | 106 | asm | Assembly | boot.asm | kevinlmadison/rust_kernel | 38c51a33dda591841d217e2ae7a92b429eaa6252 | [
"Apache-2.0"
] | null | null | null | boot.asm | kevinlmadison/rust_kernel | 38c51a33dda591841d217e2ae7a92b429eaa6252 | [
"Apache-2.0"
] | null | null | null | boot.asm | kevinlmadison/rust_kernel | 38c51a33dda591841d217e2ae7a92b429eaa6252 | [
"Apache-2.0"
] | null | null | null | global start
section .text
bits 32
start:
; print 'OK' to screen
mov dword [0xb8000], 0x2f4b2f4f
halt
| 11.777778 | 32 | 0.726415 |
93477af06b40366d1cd5271c1452cf02f9666fdd | 128 | asm | Assembly | libsrc/_DEVELOPMENT/math/float/math32/lm32/c/sdcc/sqr_fastcall.asm | Frodevan/z88dk | f27af9fe840ff995c63c80a73673ba7ee33fffac | [
"ClArtistic"
] | 640 | 2017-01-14T23:33:45.000Z | 2022-03-30T11:28:42.000Z | libsrc/_DEVELOPMENT/math/float/math32/lm32/c/sdcc/sqr_fastcall.asm | Frodevan/z88dk | f27af9fe840ff995c63c80a73673ba7ee33fffac | [
"ClArtistic"
] | 1,600 | 2017-01-15T16:12:02.000Z | 2022-03-31T12:11:12.000Z | libsrc/_DEVELOPMENT/math/float/math32/lm32/c/sdcc/sqr_fastcall.asm | Frodevan/z88dk | f27af9fe840ff995c63c80a73673ba7ee33fffac | [
"ClArtistic"
] | 215 | 2017-01-17T10:43:03.000Z | 2022-03-23T17:25:02.000Z |
SECTION code_fp_math32
PUBLIC _sqr_fastcall
EXTERN m32_fssqr_fastcall
defc _sqr_fastcall = m32_fssqr_fastcall
| 18.285714 | 43 | 0.773438 |
2095eea3057ae4c63dfce0b53d081819884703f7 | 223 | asm | Assembly | tests/assembly/transfer operations/0200.asm | danecreekphotography/6502ts | 85716cf12f879d7c16c297de3251888c32abba6a | [
"MIT"
] | null | null | null | tests/assembly/transfer operations/0200.asm | danecreekphotography/6502ts | 85716cf12f879d7c16c297de3251888c32abba6a | [
"MIT"
] | null | null | null | tests/assembly/transfer operations/0200.asm | danecreekphotography/6502ts | 85716cf12f879d7c16c297de3251888c32abba6a | [
"MIT"
] | null | null | null | ; 0200 - TAX
.segment "VECTORS"
.word $eaea
.word init
.word $eaea
.code
init:
tax ; Positive number case, A will be $42.
tax ; Zero number case, A will be $0.
tax ; Negative number case, A will be %10010101. | 17.153846 | 52 | 0.64574 |
036512b0c4e034912540f752981c313b00dd98a8 | 208 | asm | Assembly | libsrc/_DEVELOPMENT/threads/mutex/c/sdcc_iy/mtx_init.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null | libsrc/_DEVELOPMENT/threads/mutex/c/sdcc_iy/mtx_init.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null | libsrc/_DEVELOPMENT/threads/mutex/c/sdcc_iy/mtx_init.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null |
; int mtx_init(mtx_t *mtx, int type)
SECTION code_threads_mutex
PUBLIC _mtx_init
EXTERN asm_mtx_init
_mtx_init:
pop af
pop hl
pop bc
push bc
push hl
push af
jp asm_mtx_init
| 9.904762 | 36 | 0.673077 |
728ec0083e63e52192e95b5ba8b1f80e6f8d9e6f | 341 | asm | Assembly | libsrc/_DEVELOPMENT/l/z80/longlong/l_neg_64_dehldehl.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 640 | 2017-01-14T23:33:45.000Z | 2022-03-30T11:28:42.000Z | libsrc/_DEVELOPMENT/l/z80/longlong/l_neg_64_dehldehl.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 1,600 | 2017-01-15T16:12:02.000Z | 2022-03-31T12:11:12.000Z | libsrc/_DEVELOPMENT/l/z80/longlong/l_neg_64_dehldehl.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 215 | 2017-01-17T10:43:03.000Z | 2022-03-23T17:25:02.000Z |
SECTION code_clib
SECTION code_l
PUBLIC l_neg_64_dehldehl
EXTERN l_cpl_64_dehldehl, l_inc_64_dehldehl
l_neg_64_dehldehl:
; negate dehl'dehl
;
; enter : dehl'dehl = longlong
;
; exit : dehl'dehl = -longlong
;
; uses : af, de, hl, de', hl', carry unaffected
call l_cpl_64_dehldehl
jp l_inc_64_dehldehl
| 16.238095 | 51 | 0.683284 |
1a3ef941b975c64b701c45aaf9a31c68bbd32c41 | 717 | asm | Assembly | programs/oeis/183/A183139.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/183/A183139.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/183/A183139.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A183139: a(n) = [1/r]+[2/r]+...+[n/r], where r=sqrt(2) and []=floor.
; 0,1,3,5,8,12,16,21,27,34,41,49,58,67,77,88,100,112,125,139,153,168,184,200,217,235,254,273,293,314,335,357,380,404,428,453,479,505,532,560,588,617,647,678,709,741,774,807,841,876,912,948,985,1023,1061,1100,1140,1181,1222,1264,1307,1350,1394,1439,1484,1530,1577,1625,1673,1722,1772,1822,1873,1925,1978,2031,2085,2140,2195,2251,2308,2365,2423,2482,2542,2602,2663,2725,2787,2850,2914,2979,3044,3110,3177,3244,3312,3381,3451,3521
mov $2,$0
mov $3,$0
lpb $2
mov $0,$3
sub $2,1
sub $0,$2
add $0,1
pow $0,2
seq $0,339183 ; Number of partitions of n into two parts such that the smaller part is a nonzero square.
add $1,$0
lpe
mov $0,$1
| 44.8125 | 427 | 0.687587 |
b6cfaa424814a643c71028413b06f449b83c4b0e | 8,454 | asm | Assembly | original/27 - Tutorial Twenty Seven.asm | rodoherty1/6502-Examples | 86db5035a324ef161327f28452ba625d43668924 | [
"MIT"
] | null | null | null | original/27 - Tutorial Twenty Seven.asm | rodoherty1/6502-Examples | 86db5035a324ef161327f28452ba625d43668924 | [
"MIT"
] | null | null | null | original/27 - Tutorial Twenty Seven.asm | rodoherty1/6502-Examples | 86db5035a324ef161327f28452ba625d43668924 | [
"MIT"
] | null | null | null | ;*******************************************************************************
;* Tutorial Twenty-Seven Bars and Gauges *
;* *
;* Written By John C. Dale *
;* Tutorial #27 *
;* Date : 17th Dec, 2017 *
;* *
;*******************************************************************************
;* *
;*******************************************************************************
WATCH XVALUE
WATCH YVALUE
WATCH YPOS
WATCH XPOS
;*******************************************************************************
;* *
;*******************************************************************************
*=$9000
GetKey = $FFE4
XSCRNLOC = $14
YSCRNLOC = $17
YGAUGLOC = $19
jmp START
XVALUE ; X Velocity Value
BYTE 00
YVALUE ; Y Velocity Value
BYTE 00
YPOS ; Y Position (Height)
BYTE 00
XPOS ; X Position
BYTE 00
XINDEXPOS
BYTE 00
YINDEXPOS
BYTE 00
YGAUGEINDEX
BYTE 00
XBARCHARACTERS
BYTE $20,$65,$54,$47,$5D,$48,$59,$67,$67
; 0 1 2 3 4 5 6 7 8
YBARCHARACTERS
BYTE $20,$77,$45,$44,$40,$46,$52,$6F,$6F
; 0 1 2 3 4 5 6 7 8
YGAUGECHARACTERS
BYTE $20,$63,$77,$78,$E2,$F9,$EF,$E4,$E4
; 0 1 2 3 4 5 6 7 8
YSCREENOFFSETLO
BYTE $00,$28,$50,$78,$A0,$C8,$F0,$18,$40,$68,$90,$B8,$E0
BYTE $08,$30,$58,$80,$A8,$D0,$F8,$20,$48,$70,$98,$C0,$E8
YSCREENOFFSETHI
BYTE $00,$00,$00,$00,$00,$00,$00,$01,$01,$01,$01,$01,$01
BYTE $02,$02,$02,$02,$02,$02,$02,$03,$03,$03,$03,$03,$03
START
ldx#0
ldy#0
@LOOP
lda XBARCHARACTERS,x
ora #128
@SCRLOC
sta $0401,y
tya
clc
adc#40
bcc @noadd
inc @SCRLOC +2
@noadd
tay
inx
cpx #9
bne @LOOP
ldx#0
@LOOP1
lda YBARCHARACTERS,x
ora #128
sta $05E0,x
inx
cpx #9
bne @LOOP1
initYBar $044E,22
initYBar $044D,22
initXBar $0799,34
MAINLOOP
jsr $FFE4
cmp #0
beq MAINLOOP
@TEST_LEFT
cmp #"d"
bne @TEST_RIGHT
inc XPOS
jmp SHOW_ON_BAR
@TEST_RIGHT
cmp #"a"
bne @TEST_UP
dec XPOS
jmp SHOW_ON_BAR
@TEST_UP
cmp #"w"
bne @TEST_DOWN
inc YPOS
jmp SHOW_ON_BAR
@TEST_DOWN
cmp #"z"
bne @TEST_INCREASE
dec YPOS
jmp SHOW_ON_BAR
@TEST_INCREASE
cmp #"i"
bne @TEST_DECREASE
inc YValue
jmp SHOW_ON_BAR
@TEST_DECREASE
cmp #"m"
bne @TEST_EXIT
dec YValue
jmp SHOW_ON_BAR
@TEST_EXIT
cmp #"x"
bne MAINLOOP
rts
SHOW_ON_BAR
lda XPOS
showXBar $0799, $80
lda YPOS
eor #$FF
showYBar $044E, $58
lda YVALUE
eor #$FF
showYGauge $044D, $00
jmp MAINLOOP
DELAY
KT_LOOPER
ldx #255 ; Loop For 255 Y Cycles
KT_OUTERLOOP
ldy #255 ; Loop 255 times
KT_INNERLOOP
dey ; Decrease Inner Loop Index
bne KT_INNERLOOP ; Hit Zero?, No, Loop Round
dex ; Yes, Decrease Outer Loop Index
bne KT_OUTERLOOP ; Hit Zero?, No, Loop Round
rts ; Yes, Exit
defm initYBar ; Parameters STARTLOC, ITERATIONS
ldx #</1
lda #>/1
sta @SCREENLOC+2
stx @SCREENLOC+1
ldx #0
@LOOP
lda #160
@SCREENLOC
sta /1
clc
lda #40
adc @SCREENLOC+1
sta @SCREENLOC+1
lda #0
adc @SCREENLOC+2
sta @SCREENLOC+2
inx
cpx #/2
bne @LOOP
endm
defm initXBar ; Parameters STARTLOC, ITERATIONS
ldx #0
@LOOP
lda #160
sta /1,x
inx
cpx #/2
bne @LOOP
endm
defm showXCentreBar
pha ; Store Away Value Safely
bmi @NEGATIVEVALUE
lsr ; Divide By 2
lsr ; Divide By 4
lsr ; Divide By 8
cmp XINDEXPOS
beq XPOSSAME
pha
lda XBARCHARACTERS
ora #$80
ldy #0
sta (XSCRNLOC),y
pla
XPOSSAME
sta XINDEXPOS
sta $0401
clc
adc #</1
sta XSCRNLOC
lda #0
adc #>/1
sta XSCRNLOC + 1
pla
and #$07
tay
iny
jmp @END
@NEGATIVEVALUE
eor #$FF
clc
adc #1
lsr
lsr
lsr
clc
adc #01
cmp XINDEXPOS
beq XPOSSAME1
pha
lda XBARCHARACTERS
ora #$80
ldy #0
sta (XSCRNLOC),y
pla
XPOSSAME1
sta XINDEXPOS
sta $0401
lda #</1
sec
sbc XINDEXPOS
sta XSCRNLOC
lda #>/1
sbc #0
sta XSCRNLOC + 1
pla
and #$07
tay
iny
@END
sty $0400
lda XBARCHARACTERS,y
ora #128
ldy #0
sta (SCRNLOC),y
endm
defm showXBar ; Start Screen Location, Offset value
clc
adc #/2 ; Adds Centre Ofset
pha ; Store Away Value Safely
lsr ; Divide By 2
lsr ; Divide By 4
lsr ; Divide By 8
cmp XINDEXPOS
beq XPOSSAME
pha ; Store Away New XINDEXPOS Temporarily
lda XBARCHARACTERS
ora #$80
ldy #0
sta (XSCRNLOC),y ; Blank out last location
pla ; Get back New XINDEXPOS
XPOSSAME
sta XINDEXPOS
sta $0401
clc
adc #</1
sta XSCRNLOC
lda #0
adc #>/1
sta XSCRNLOC + 1
pla
and #$07
tay
iny
sty $0400
lda XBARCHARACTERS,y
ora #128
ldy #0
sta (XSCRNLOC),y
endm
defm showYBar ; Start Screen Location, Offset value
clc
adc #/2 ; Adds Centre Ofset
pha ; Store Away Value Safely
lsr ; Divide By 2
lsr ; Divide By 4
lsr ; Divide By 8
cmp YINDEXPOS
beq YPOSSAME
pha ; Store Away New XINDEXPOS Temporarily
lda YBARCHARACTERS
ora #$80
ldy #0
sta (YSCRNLOC),y ; Blank out last location
pla ; Get back New XINDEXPOS
YPOSSAME
sta YINDEXPOS
tax
sta $0401
clc
lda #0
adc YSCREENOFFSETLO,x
sta YSCRNLOC
lda #0
adc YSCREENOFFSETHI,x
sta YSCRNLOC + 1
clc
lda YSCRNLOC
adc #</1
sta YSCRNLOC
lda YSCRNLOC + 1
adc #>/1
sta YSCRNLOC + 1
pla
and #$07
tay
iny
sty $0400
lda YBARCHARACTERS,y
ora #128
ldy #0
sta (YSCRNLOC),y
endm
defm showYGauge ; Start Screen Location, Offset value
clc
adc #/2 ; Adds Centre Offset
pha ; Store Away Value Safely
lsr ; Divide By 2
lsr ; Divide By 4
lsr ; Divide By 8
cmp YGAUGEINDEX ; Is new location same as old location?
beq YSAME ; Yes, then skip the next instructions
pha ; Store Away New XINDEXPOS Temporarily
lda YGAUGECHARACTERS; Get first character from GAUGE Character Set
;ora #$80
ldy #0
sta (YGAUGLOC),y ; Blank out last location
pla ; Get back New XINDEXPOS
YSAME
sta YGAUGEINDEX ; Store New Location
tax ; transfer to index register
clc
lda #0
adc YSCREENOFFSETLO,x ; Add screen row offset (lo)
sta YGAUGLOC ; store in pointer (lo)
lda #0
adc YSCREENOFFSETHI,x ; Add screen row offset (hi)
sta YGAUGLOC + 1 ; store in pointer (hi)
clc
lda YGAUGLOC ; Get screen pointer (lo)
adc #</1 ; Add screen location (lo)
sta YGAUGLOC ; Store back to pointer (lo)
lda YGAUGLOC + 1 ; Get screen pointer (hi)
adc #>/1 ; Add screen location (hi)
sta YGAUGLOC + 1 ; Store back pointer (hi)
pla ; Get back Value from stack
and #$07 ; mask off the 3 least significant bits (value/8)
tay ; Move to index register
iny ; add 1
lda YGAUGECHARACTERS,y ; Get corresponding YGaugeCharacter From Set
eor #$80 ; invert the character
ldy #0 ; init Y
sta (YGAUGLOC),y ; store character on screen
endm | 22.247368 | 80 | 0.479655 |
c87ba6217e19c69933117d04c286861f099378b0 | 938 | asm | Assembly | src/test/resources/MIPS/PreProcessor/Comparison/If Directive Test.asm | ParkerTenBroeck/Retargetable-Assembler | 78fe4acfd1a4513239174d255f45e04c4c0dfe3d | [
"Apache-2.0"
] | 1 | 2021-05-16T16:36:32.000Z | 2021-05-16T16:36:32.000Z | src/test/resources/MIPS/PreProcessor/Comparison/If Directive Test.asm | ParkerTenBroeck/Retargetable-Assembler | 78fe4acfd1a4513239174d255f45e04c4c0dfe3d | [
"Apache-2.0"
] | null | null | null | src/test/resources/MIPS/PreProcessor/Comparison/If Directive Test.asm | ParkerTenBroeck/Retargetable-Assembler | 78fe4acfd1a4513239174d255f45e04c4c0dfe3d | [
"Apache-2.0"
] | null | null | null | ;if1
.if true
if1right
.elseif false
if1wrong
.elseif true
if1wrong
.else
if1wrong
.endif
;if2
.if false
if2wrong
.elseif false
if2wrong
.elseif false
if2wrong
.else
if2right
.endif
;if3
.if false
if3wrong
.elseif false
if3wrong
.elseif true
if3right
.else
if3wrong
.endif
;if4
.if false
if4wrong
.elseif true
if4right
.elseif false
if4wrong
.else
if4wrong
.endif
;if5
.if false
if5wrong
.elseif false
if5wrong
.elseif false
if5wrong
.else
if5right
.endif
;set to true for errors
.if false
;if6
.if false
if6wrong
.elseif false
if6wrong
.elseif true
if6wrong
.else
if6wrong
.elseif false
if6wrong
.endif
;if7
.if false
if7wrong
.elseif false
if7wrong
.elseif true
if7wrong
.else
if7wrong
.else
if7wrong
.endif
.endif | 11.301205 | 23 | 0.603412 |
6a1165b69106363eb9fe4efa6ce03038a0144e8f | 3,531 | asm | Assembly | src/autogenerated/textBank5.asm | jannone/westen | e3883ded0f150355e43d68d69d5e102b2024eec4 | [
"Apache-2.0"
] | 49 | 2021-09-22T04:12:15.000Z | 2022-02-25T07:16:48.000Z | src/autogenerated/textBank5.asm | jannone/westen | e3883ded0f150355e43d68d69d5e102b2024eec4 | [
"Apache-2.0"
] | 2 | 2021-09-26T19:46:28.000Z | 2021-09-28T00:25:06.000Z | src/autogenerated/textBank5.asm | jannone/westen | e3883ded0f150355e43d68d69d5e102b2024eec4 | [
"Apache-2.0"
] | 4 | 2021-09-26T16:45:52.000Z | 2022-01-09T21:20:17.000Z | ; line: 'I just arrived at Westen House.'
; size in bytes: 32
line_0:
db #1f,#3b,#00,#7a,#90,#8c,#8e,#00,#69,#8a,#8a,#79,#92,#71,#6f,#00
db #69,#8e,#00,#5d,#71,#8c,#8e,#71,#82,#00,#39,#84,#90,#8c,#71,#14
end_line_0:
; line: 'santi.ontanon@gmail.com'
; size in bytes: 24
line_1:
db #17,#8c,#69,#82,#8e,#79,#14,#84,#82,#8e,#69,#82,#84,#82,#05,#75
db #7f,#69,#79,#7e,#14,#6d,#84,#7f
end_line_1:
; line: 'I found a note in the corpse.'
; size in bytes: 30
line_2:
db #1d,#3b,#00,#73,#84,#90,#82,#6f,#00,#69,#00,#82,#84,#8e,#71,#00
db #79,#82,#00,#8e,#77,#71,#00,#6d,#84,#8a,#86,#8c,#71,#14
end_line_2:
; line: 'It worked! I killed it!'
; size in bytes: 24
line_3:
db #17,#3b,#8e,#00,#95,#84,#8a,#7c,#71,#6f,#02,#00,#3b,#00,#7c,#79
db #7e,#7e,#71,#6f,#00,#79,#8e,#02
end_line_3:
; line: 'Ok, it is now clear that something'
; size in bytes: 35
line_4:
db #22,#4a,#7c,#10,#00,#79,#8e,#00,#79,#8c,#00,#82,#84,#95,#00,#6d
db #7e,#71,#69,#8a,#00,#8e,#77,#69,#8e,#00,#8c,#84,#7f,#71,#8e,#77
db #79,#82,#75
end_line_4:
; line: 'Westen House'
; size in bytes: 13
line_5:
db #0c,#5d,#71,#8c,#8e,#71,#82,#00,#39,#84,#90,#8c,#71
end_line_5:
; line: 'name is not Westen, but Westenra.'
; size in bytes: 34
line_6:
db #21,#82,#69,#7f,#71,#00,#79,#8c,#00,#82,#84,#8e,#00,#5d,#71,#8c
db #8e,#71,#82,#10,#00,#6b,#90,#8e,#00,#5d,#71,#8c,#8e,#71,#82,#8a
db #69,#14
end_line_6:
; line: 'Most pages are torn, but I found'
; size in bytes: 33
line_7:
db #20,#44,#84,#8c,#8e,#00,#86,#69,#75,#71,#8c,#00,#69,#8a,#71,#00
db #8e,#84,#8a,#82,#10,#00,#6b,#90,#8e,#00,#3b,#00,#73,#84,#90,#82
db #6f
end_line_7:
; line: 'standing on top of the object.'
; size in bytes: 31
line_8:
db #1e,#8c,#8e,#69,#82,#6f,#79,#82,#75,#00,#84,#82,#00,#8e,#84,#86
db #00,#84,#73,#00,#8e,#77,#71,#00,#84,#6b,#7a,#71,#6d,#8e,#14
end_line_8:
; line: 'the basement of the house. I noticed they'
; size in bytes: 42
line_9:
db #29,#8e,#77,#71,#00,#6b,#69,#8c,#71,#7f,#71,#82,#8e,#00,#84,#73
db #00,#8e,#77,#71,#00,#77,#84,#90,#8c,#71,#14,#00,#3b,#00,#82,#84
db #8e,#79,#6d,#71,#6f,#00,#8e,#77,#71,#9b
end_line_9:
; line: 'Westen House, and part of a key that you'
; size in bytes: 41
line_10:
db #28,#5d,#71,#8c,#8e,#71,#82,#00,#39,#84,#90,#8c,#71,#10,#00,#69
db #82,#6f,#00,#86,#69,#8a,#8e,#00,#84,#73,#00,#69,#00,#7c,#71,#9b
db #00,#8e,#77,#69,#8e,#00,#9b,#84,#90
end_line_10:
; line: 'circle! I will now use the name of this month'
; size in bytes: 46
line_11:
db #2d,#6d,#79,#8a,#6d,#7e,#71,#02,#00,#3b,#00,#95,#79,#7e,#7e,#00
db #82,#84,#95,#00,#90,#8c,#71,#00,#8e,#77,#71,#00,#82,#69,#7f,#71
db #00,#84,#73,#00,#8e,#77,#79,#8c,#00,#7f,#84,#82,#8e,#77
end_line_11:
; line: 'this is for the Westenra family...'
; size in bytes: 35
line_12:
db #22,#8e,#77,#79,#8c,#00,#79,#8c,#00,#73,#84,#8a,#00,#8e,#77,#71
db #00,#5d,#71,#8c,#8e,#71,#82,#8a,#69,#00,#73,#69,#7f,#79,#7e,#9b
db #14,#14,#14
end_line_12:
; line: 'Westen, who died on October 16th. In his will, Mr.'
; size in bytes: 51
line_13:
db #32,#5d,#71,#8c,#8e,#71,#82,#10,#00,#95,#77,#84,#00,#6f,#79,#71
db #6f,#00,#84,#82,#00,#4a,#6d,#8e,#84,#6b,#71,#8a,#00,#17,#22,#8e
db #77,#14,#00,#3b,#82,#00,#77,#79,#8c,#00,#95,#79,#7e,#7e,#10,#00
db #44,#8a,#14
end_line_13:
; line: 'How strange, this part of the'
; size in bytes: 30
line_14:
db #1d,#39,#84,#95,#00,#8c,#8e,#8a,#69,#82,#75,#71,#10,#00,#8e,#77
db #79,#8c,#00,#86,#69,#8a,#8e,#00,#84,#73,#00,#8e,#77,#71
end_line_14:
| 35.666667 | 70 | 0.5565 |
fb8db5206c8573daa9f5065897802eaabb753e1d | 237 | asm | Assembly | 16-Little-Exterminator-2.speed.asm | blueset/7bh-solutions | 988afddf87411bec06ec9e90179b55fb55345a5d | [
"MIT"
] | null | null | null | 16-Little-Exterminator-2.speed.asm | blueset/7bh-solutions | 988afddf87411bec06ec9e90179b55fb55345a5d | [
"MIT"
] | null | null | null | 16-Little-Exterminator-2.speed.asm | blueset/7bh-solutions | 988afddf87411bec06ec9e90179b55fb55345a5d | [
"MIT"
] | null | null | null | -- 7 Billion Humans --
-- 16: Little Exterminator 2 --
-- Size: 14/8 --
-- Speed: 9/10 --
step s
step s
step s
a:
step s
if c != datacube:
jump a
endif
pickup c
step e
step e
step e
b:
step e
if s == shredder:
giveto s
endif
jump b
| 9.115385 | 31 | 0.624473 |
c437d8412ace3602ac035d03c8bad61ab1197bd0 | 679 | asm | Assembly | oeis/121/A121907.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/121/A121907.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/121/A121907.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A121907: Expansion of g.f.: (1 + x + x^2)/(1 - 2*x - 2*x^2).
; Submitted by Jon Maiga
; 1,3,9,24,66,180,492,1344,3672,10032,27408,74880,204576,558912,1526976,4171776,11397504,31138560,85072128,232421376,634987008,1734816768,4739607552,12948848640,35376912384,96651522048,264056868864,721416781824,1970947301376,5384728166400,14711350935552,40192158203904,109807018278912,299998352965632,819610742489088,2239218190909440,6117657866797056,16713752115412992,45662819964420096,124753144159666176,340831928248172544,931170144815677440,2544004146127699968,6950348581886754816
mov $3,1
lpb $0
sub $0,1
mov $2,$3
add $3,$1
mov $1,$2
mul $3,2
lpe
mov $0,$3
mul $0,6
div $0,4
| 42.4375 | 483 | 0.793814 |
1ada1bab522cb1e385a6c538030e4ab4515aa026 | 564 | asm | Assembly | oeis/121/A121839.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/121/A121839.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/121/A121839.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A121839: Decimal expansion of Sum_{k>=1} 1/C(k), where C(k) is a Catalan Number (A000108).
; Submitted by Jon Maiga
; 1,8,0,6,1,3,3,0,5,0,7,7,0,7,6,3,4,8,9,1,5,2,9,2,3,6,7,0,0,6,3,1,8,0,3,2,5,4,5,9,5,8,4,9,9,9,1,5,2,3,2,9,1,4,4,6,9,7,7,2,6,6,3,7,9,5,0,2,7,6,9,6,9,3,8,9,4,9,0,6,1,4,9,7,0,7,2,2,2,1,6,9,8,3,1,3,7,8,5,2
mov $2,5
mov $3,$0
mul $3,7
lpb $3
mul $1,$3
mul $2,2
mov $5,$3
mul $5,2
add $5,1
mul $2,$5
add $1,$2
div $1,$5
div $2,$5
sub $3,1
lpe
div $1,3
mul $1,2
mov $4,10
pow $4,$0
div $2,$4
div $1,$2
add $1,$4
mov $0,$1
mod $0,10
| 19.448276 | 201 | 0.535461 |
30b516a8037786d15c4c84aded3bf6b45f371911 | 794 | asm | Assembly | programs/oeis/324/A324400.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/324/A324400.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/324/A324400.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A324400: Lexicographically earliest sequence such that a(i) = a(j) => f(i) = f(j) for all i, j >= 1, where f(n) = -1 if n = 2^k and k > 0, and f(n) = n for all other numbers.
; 1,2,3,2,4,5,6,2,7,8,9,10,11,12,13,2,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,2,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,2,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95
mov $5,2
mov $7,$0
lpb $5
mov $0,$7
sub $5,1
add $0,$5
sub $0,1
mov $4,$0
add $0,1
mov $2,$0
lpb $2
add $4,$2
mov $8,$0
lpb $8
mov $0,1
sub $2,1
div $8,2
lpe
lpe
mov $3,$5
mov $6,$4
lpb $3
mov $1,$6
sub $3,1
lpe
lpe
lpb $7
sub $1,$6
mov $7,0
lpe
mov $0,$1
| 22.685714 | 287 | 0.54534 |
abf1e79808ca9390205ce23764d0c944dbdad1c9 | 1,099 | asm | Assembly | programs/oeis/123/A123168.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/123/A123168.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/123/A123168.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A123168: Continued fraction for c = sqrt(2)*(exp(sqrt(2))-1)/(exp(sqrt(2))+1).
; 0,1,6,5,14,9,22,13,30,17,38,21,46,25,54,29,62,33,70,37,78,41,86,45,94,49,102,53,110,57,118,61,126,65,134,69,142,73,150,77,158,81,166,85,174,89,182,93,190,97,198,101,206,105,214,109,222,113,230,117,238,121,246,125,254,129,262,133,270,137,278,141,286,145,294,149,302,153,310,157,318,161,326,165,334,169,342,173,350,177,358,181,366,185,374,189,382,193,390,197,398,201,406,205,414,209,422,213,430,217,438,221,446,225,454,229,462,233,470,237,478,241,486,245,494,249,502,253,510,257,518,261,526,265,534,269,542,273,550,277,558,281,566,285,574,289,582,293,590,297,598,301,606,305,614,309,622,313,630,317,638,321,646,325,654,329,662,333,670,337,678,341,686,345,694,349,702,353,710,357,718,361,726,365,734,369,742,373,750,377,758,381,766,385,774,389,782,393,790,397,798,401,806,405,814,409,822,413,830,417,838,421,846,425,854,429,862,433,870,437,878,441,886,445,894,449,902,453,910,457,918,461,926,465,934,469,942,473,950,477,958,481,966,485,974,489,982,493,990,497
mov $1,$0
mov $2,$0
gcd $2,2
mul $1,$2
mul $1,2
trn $1,$2
| 109.9 | 958 | 0.717015 |
8e14b655690c80dc456ae87feaac85e43ad6b4a5 | 2,049 | asm | Assembly | include/apple2.asm | puzzud/retroleague | e11932ffaaf7ee07571e9971cf12bbf7f1457d89 | [
"MIT"
] | 4 | 2017-11-06T20:37:16.000Z | 2021-02-05T15:55:20.000Z | include/apple2.asm | puzzud/retroleague | e11932ffaaf7ee07571e9971cf12bbf7f1457d89 | [
"MIT"
] | 11 | 2016-09-06T17:42:23.000Z | 2016-09-26T18:50:24.000Z | include/apple2.asm | puzzud/retroleague | e11932ffaaf7ee07571e9971cf12bbf7f1457d89 | [
"MIT"
] | 2 | 2020-03-28T21:41:22.000Z | 2020-05-08T09:18:25.000Z | ;
; Apple II generic definitions.
;
HI_RES_PAGE_SIZE = 8192
HI_RES_PAGE_1 = $2000
HI_RES_PAGE_2 = $4000
KEYBOARD = $c000
CLR80STORE = $c000
SET80STORE = $c001
CLRAUXRD = $c002
SETAUXRD = $c003
CLRAUXWR = $c004
SETAUXWR = $c005
CLRCXROM = $c006
SETCXROM = $c007
CLRAUXZP = $c008
SETAUXZP = $c009
CLRC3ROM = $c00A
SETC3ROM = $c00B
CLR80VID = $c00C
SET80VID = $c00D
CLRALTCH = $c00E
SETALTCH = $c00F
STROBE = $c010
RDLCBNK2 = $c011
RDLCRAM = $c012
RDRAMRD = $c013
RDRAMWR = $c014
RDCXROM = $c015
RDAUXZP = $c016
RDC3ROM = $c017
RD80COL = $c018
RDVBLBAR = $c019
RDTEXT = $c01A
RDMIXED = $c01B
RDPAGE2 = $c01C
RDHIRES = $c01D
RDALTCH = $c01E
RD80VID = $c01F
TAPEOUT = $c020
SPEAKER = $c030
;STROBE = $c040
CLRTEXT = $c050
SETTEXT = $c051
CLRMIXED = $c052
SETMIXED = $c053
PAGE1 = $c054
PAGE2 = $c055
CLRHIRES = $c056
SETHIRES = $c057
SETAN0 = $c058
CLRAN0 = $c059
SETAN1 = $c05A
CLRAN1 = $c05B
SETAN2 = $c05C
CLRAN2 = $c05D
SETAN3 = $c05E
SETDHIRES= $c05E
CLRAN3 = $c05F
CLRDHIRES= $c05F
TAPEIN = $c060
PB3 = $c060
OPNAPPLE = $c061
PB0 = $c061
CLSAPPLE = $c062
PB1 = $c062
PB2 = $c063
PADDLE0 = $c064
PADDLE1 = $c065
PADDLE2 = $c066
PADDLE3 = $c067
PDLTRIG = $c070
SETIOUDIS= $c07E
CLRIOUDIS= $c07E
ROMIN = $c081
LCBANK2 = $c083
LCBANK1 = $c08B
SCREEN_LINE_WIDTH = 40
SCREEN_LINE_HEIGHT = 192
SCREEN_CHAR_WIDTH = 35
SCREEN_CHAR_HEIGHT = 24
START_OF_RAM = $0c00
JOYSTICK_UP = $01
JOYSTICK_DOWN = $02
JOYSTICK_LEFT = $04
JOYSTICK_RIGHT = $08
JOYSTICK_BUTTON0 = $10
JOYSTICK_BUTTON1 = $20
JOYSTICK_BUTTON2 = $40
JOYSTICK_BUTTON3 = $80
CONTROLLER_LEFT = JOYSTICK_LEFT
CONTROLLER_RIGHT = JOYSTICK_RIGHT
CONTROLLER_UP = JOYSTICK_UP
CONTROLLER_DOWN = JOYSTICK_DOWN
CONTROLLER_BUTTON0 = JOYSTICK_BUTTON0
CONTROLLER_BUTTON1 = JOYSTICK_BUTTON1
CONTROLLER_BUTTON2 = JOYSTICK_BUTTON2
CONTROLLER_BUTTON3 = JOYSTICK_BUTTON3
| 15.406015 | 40 | 0.651537 |
2d024055705acfb5f639d1ccbc372f1a378ee8a7 | 167 | asm | Assembly | libsrc/_DEVELOPMENT/l/z80/integer/l_incu_hl.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 640 | 2017-01-14T23:33:45.000Z | 2022-03-30T11:28:42.000Z | libsrc/_DEVELOPMENT/l/z80/integer/l_incu_hl.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 1,600 | 2017-01-15T16:12:02.000Z | 2022-03-31T12:11:12.000Z | libsrc/_DEVELOPMENT/l/z80/integer/l_incu_hl.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 215 | 2017-01-17T10:43:03.000Z | 2022-03-23T17:25:02.000Z |
SECTION code_clib
SECTION code_l
PUBLIC l_incu_hl
l_incu_hl:
; uses : hl
; z set on overflow
inc l
ret nz
inc h
ret nz
dec hl
ret
| 8.35 | 22 | 0.592814 |
aac00fbbb31e801a49b06110753f2e18f2470d03 | 3,667 | asm | Assembly | Transynther/x86/_processed/AVXALIGN/_st_sm_/i7-8650U_0xd2_notsx.log_144_1361.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/AVXALIGN/_st_sm_/i7-8650U_0xd2_notsx.log_144_1361.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/AVXALIGN/_st_sm_/i7-8650U_0xd2_notsx.log_144_1361.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r11
push %r14
push %r15
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_UC_ht+0x1cf3d, %rsi
nop
xor $2304, %rbx
mov $0x6162636465666768, %r11
movq %r11, %xmm7
movups %xmm7, (%rsi)
nop
cmp %r11, %r11
lea addresses_WC_ht+0x1df3d, %r14
nop
add $23807, %r11
movb $0x61, (%r14)
nop
sub $47324, %rbx
lea addresses_D_ht+0x17b3d, %rsi
lea addresses_WC_ht+0x1c83d, %rdi
nop
nop
nop
inc %r10
mov $67, %rcx
rep movsw
sub %rcx, %rcx
lea addresses_normal_ht+0x243d, %rsi
lea addresses_WT_ht+0x1d73d, %rdi
nop
nop
nop
nop
nop
cmp %rbx, %rbx
mov $91, %rcx
rep movsq
nop
nop
nop
cmp %rdi, %rdi
lea addresses_normal_ht+0x1877d, %rsi
lea addresses_D_ht+0x1633d, %rdi
clflush (%rsi)
nop
cmp %r15, %r15
mov $20, %rcx
rep movsw
sub $12183, %r15
lea addresses_A_ht+0x1223d, %r10
nop
nop
nop
nop
add %rsi, %rsi
movb (%r10), %r15b
nop
nop
nop
and $38472, %r11
lea addresses_A_ht+0x1d73d, %rcx
nop
nop
nop
nop
nop
xor %rsi, %rsi
movl $0x61626364, (%rcx)
nop
nop
nop
sub %rbx, %rbx
lea addresses_WC_ht+0x1673d, %rcx
clflush (%rcx)
nop
nop
xor $15488, %rbx
movb $0x61, (%rcx)
nop
nop
nop
nop
dec %rcx
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %r15
pop %r14
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r14
push %r15
push %r9
push %rbp
push %rsi
// Store
lea addresses_PSE+0xf73d, %rsi
nop
nop
nop
cmp %r12, %r12
mov $0x5152535455565758, %rbp
movq %rbp, %xmm4
vmovups %ymm4, (%rsi)
nop
nop
xor %r14, %r14
// Faulty Load
lea addresses_PSE+0xf73d, %r15
nop
nop
nop
nop
nop
xor $30605, %r9
mov (%r15), %rbp
lea oracles, %r12
and $0xff, %rbp
shlq $12, %rbp
mov (%r12,%rbp,1), %rbp
pop %rsi
pop %rbp
pop %r9
pop %r15
pop %r14
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_PSE', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_PSE', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_PSE', 'size': 8, 'AVXalign': False, 'NT': True, 'congruent': 0, 'same': True}}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 10, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 4, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 2, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 11, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 6, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 6, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 7, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 9, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 11, 'same': False}}
{'58': 144}
58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58
*/
| 22.635802 | 431 | 0.655031 |
8a6a7d61c1ed14fa7dfee4a51d813be85154fb53 | 602 | asm | Assembly | oeis/014/A014205.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/014/A014205.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/014/A014205.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A014205: (1/12)*(n+5)*(n+1)*n^2.
; 0,1,7,24,60,125,231,392,624,945,1375,1936,2652,3549,4655,6000,7616,9537,11799,14440,17500,21021,25047,29624,34800,40625,47151,54432,62524,71485,81375,92256,104192,117249,131495,147000,163836,182077,201799,223080,246000,270641,297087,325424,355740,388125,422671,459472,498624,540225,584375,631176,680732,733149,788535,847000,908656,973617,1041999,1113920,1189500,1268861,1352127,1439424,1530880,1626625,1726791,1831512,1940924,2055165,2174375,2298696,2428272,2563249,2703775,2850000,3002076,3160157
mov $1,$0
mul $0,2
add $1,1
bin $1,2
add $0,$1
mul $0,$1
div $0,3
| 54.727273 | 499 | 0.782392 |
269833944cdf432c8a65d2d648b2bed62959e7a1 | 1,007 | asm | Assembly | programs/oeis/008/A008585.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/008/A008585.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/008/A008585.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A008585: a(n) = 3*n.
; 0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57,60,63,66,69,72,75,78,81,84,87,90,93,96,99,102,105,108,111,114,117,120,123,126,129,132,135,138,141,144,147,150,153,156,159,162,165,168,171,174,177,180,183,186,189,192,195,198,201,204,207,210,213,216,219,222,225,228,231,234,237,240,243,246,249,252,255,258,261,264,267,270,273,276,279,282,285,288,291,294,297,300,303,306,309,312,315,318,321,324,327,330,333,336,339,342,345,348,351,354,357,360,363,366,369,372,375,378,381,384,387,390,393,396,399,402,405,408,411,414,417,420,423,426,429,432,435,438,441,444,447,450,453,456,459,462,465,468,471,474,477,480,483,486,489,492,495,498,501,504,507,510,513,516,519,522,525,528,531,534,537,540,543,546,549,552,555,558,561,564,567,570,573,576,579,582,585,588,591,594,597,600,603,606,609,612,615,618,621,624,627,630,633,636,639,642,645,648,651,654,657,660,663,666,669,672,675,678,681,684,687,690,693,696,699,702,705,708,711,714,717,720,723,726,729,732,735,738,741,744,747
mov $1,$0
mul $1,3
| 167.833333 | 963 | 0.727905 |
852e52de9df6ba3d4311782d55d0cbaa0df6a03a | 47,347 | asm | Assembly | 45/qb/ir/lsmain.asm | minblock/msdos | 479ffd237d9bb7cc83cb06361db2c4ef42dfbac0 | [
"Apache-2.0"
] | null | null | null | 45/qb/ir/lsmain.asm | minblock/msdos | 479ffd237d9bb7cc83cb06361db2c4ef42dfbac0 | [
"Apache-2.0"
] | null | null | null | 45/qb/ir/lsmain.asm | minblock/msdos | 479ffd237d9bb7cc83cb06361db2c4ef42dfbac0 | [
"Apache-2.0"
] | null | null | null |
;======================================================================
; Module: LsMain.asm - main module of 'lister' component
;
; Purpose:
; The Lister is responsible for converting one logical line
; of pcode to its ASCII source equivalent. A logical line
; may consist of several physical lines, with each physical
; line terminated by an underscore_remark. The pcode may
; be in any scan-state from SS_rude to SS_executable. The
; pcode resides in a far (non DS) segment. The lister's
; main interface to the rest of BASIC is the entry point
; ListLine().
;
;
;=======================================================================*/
include version.inc
LSMAIN_ASM = ON
includeOnce architec
includeOnce context
includeOnce heap
includeOnce lister
includeOnce lsint
includeOnce names
includeOnce optables
includeOnce parser
includeOnce pcode
includeOnce prstab
includeOnce qblist
includeOnce rtps
includeOnce scanner
includeOnce txtmgr
includeOnce util
assumes DS,DGROUP
assumes SS,DGROUP
assumes ES,NOTHING
;-----------------------------------------------------------------------
; NOTE NOTE NOTE NOTE NOTE
;
; A powerful debugging aid is to set a break point at ListLine
; just before the line of interest is to be listed. When in
; the breakpoint, set fDebugList non-zero. This will cause
; the intermediate list-node-tree to be symbolically dumped
;
;-----------------------------------------------------------------------
;-----------------------------------------------------------------------
; Notation:
;
; This module deals heavily with lists of nodes.
;
; The list:
; (a)->(b)->( )->(f)->(g)
; |
; +-->(c)->(d)->(e)
;
; is equivalent to the representation:
;
; [a b [c d e] f g]
;
; Where b is a sibling of a, d is a sibling of c, and the entire list [c d e]
; is a sibling of b.
;
; Functions which operate on a list of nodes use the notation
; [oldList] ==> [newList]
; to indicate how the list is transformed. For example, a function
; which inserts 'newNode' into a list would be documented as:
; [x y z] ==> [newNode x y z]
;
; The way a line of pcode is listed (converted to ASCII text) is by
; dispatching to a "ListRule" for each opcode. These ListRules are
; labeled LrXXX (i.e. LrBos handles opBos and LrBinaryOp handles
; all binary operators). These ListRule functions all work together
; to manipulate to global lists, the "Root" list and the "Temp" list.
; By the time the end-of-line is reached, the Root list contains
; a complete description of the text to be listed. The Temp list is
; only used for 1 ListRule's temporary needs. Nothing is passed
; on the Temp list from one ListRule to another.
;
; All the nodes which make up these lists physically reside within
; the buffer bdNodes. Since this buffer is a heap entry that can move,
; all nodes are refered to as offsets into the buffer. The first byte
; of the buffer is not used, allowing 0 to represent end-of-list.
; Nodes are of different types and lengths length. The first field
; in each node is LN_sib (offset to sibling node), followed by LN_type
; (type of node).
;
; Algorithm:
;
; ListLine consists of 2 stages. Stage1 reads the pcode,
; building an list-node description of the line. Stage2
; traverses this node description and appends ASCII text
; to the output buffer. Stage2 dumps the last node in the list
; first, then the next to last, etc.
;
; Example of how an line of pcode is listed.
;
; Original ASCII Source: a(x,y)=1+2
; pcode: opBol opLit(1) opLit(2) opAdd
; opId(x) opId(y) opAIdSt(a,2) opBol/opEot
;
; The following chart represents snapshots in time of the
; current state of the lister's data structures during Stage1:
;
; next opcode oNodeRoot's tree
; ----------- -----------------
; opBol NULL
; opLit(1) NULL
; opLit(2) [1]
; opAdd [2 1]
; opId(x) [[2 + 1]]
; opId(y) [x [2 + 1]]
; opAIdSt(a,2) [y x [2 + 1]]
; opBol/opEot [[2 + 1] = [) y , x ( a]
;
; Stage2 then output's 'a', '(', 'x', ',', 'y', ')', '=', '1', '+', '2'
;
;-----------------------------------------------------------------------
sBegin RT
EXTRN B$IFOUT:far ;binary to ASCII numeric conversion
EXTRN B$FHEX:far ;binary to ASCII base 16 conversion
EXTRN B$FOCT:far ;binary to ASCII base 8 conversion
sEnd RT
sBegin DATA
;-----------------------------------+
; Inter-component Global variables: |
;-----------------------------------+
PUBLIC otxListNext, otxListNextInc, cLeadingSpaces
otxListNext DW 0 ;text offset to opBol for next line to be listed
; by ListLine(). Set by ListLine at exit.
otxListNextInc DW 0 ;text offset to opBol for next line after current
; line, even if it is from an included file.
; Set by ListLine at exit.
cLeadingSpaces DB 0 ;Could of leading spaces in listed line
; Set by ListLine at exit.
PUBLIC otxLsCursor ;Public to non-lister components
PUBLIC otxLsCursorTmp, ndLsCursor, colLsCursor ;PUBLIC to modules w/i lister
otxLsCursor DW 0 ;See ListLine header for description
otxLsCursorTmp DW 0 ;See ListLine header for description
ndLsCursor DW 0 ;node equivalent to otxLsCursor
colLsCursor DW 0 ;column equivalent to otxLsCursor
lnTypeFindSave DB 0
PUBLIC fLsIncluded
fLsIncluded DB 0 ;set TRUE if this line is from an $INCLUDE file
; (i.e. opInclude was found in it). This allows
; ASCII Save to not send it to the file being saved.
;flags which get reset each beginning of line
PUBLIC lsBolFlags
lsBolFlags DB 0 ;FBOL_xxx masks
;flags which get reset each beginning of stmt
PUBLIC lsBosFlags, lsBosFlags2, lsBosFlagsWord
lsBosFlagsWord LABEL WORD
lsBosFlags DB 0 ;FBOS_xxx masks
lsBosFlags2 DB 0 ;FBOS2_xxx masks
;variables used by ChkLineWrap to insert _<CrLf> in lines longer than 255 bytes
;
colLastTok DW 0
colLastLine DW 0
PUBLIC fLsDynArrays
fLsDynArrays DB 0 ;Initialized to FALSE by AsciiSave, set TRUE when
; $DYNAMIC is listed, set FALSE when $STATIC is listed
; Tested by AsciiSave.
QUOTE = 022H ;quote char (")
;--------------------------+
; Lister Local variables: |
;--------------------------+
CB_NODES_MIN equ 200 ;never let node buffer get < 200 free bytes
CB_NODES_GROW equ 400 ;when it does, grow it by 400
;Note: this isn't because one node can be
; 200 bytes long, its because one dispatch
; can produce many nodes, which together
; can be 200 bytes in length. For example,
; CALL x (x1,x2,x3,...,x50)
;bdNodes is a table descriptor for a growable buffer in the table-heap used
; to accumulate the generated listing. It contains node entries
; which represent current line being listed.
EVEN
PUBLIC bdNodes
bdNodes bd <0,0,0>
PUBLIC fGotBol
fGotBol DB 0 ;non-zero after 1st opBol
;UNDEFINED if no leading spaces on line
;else count of leading spaces
;oNodeRoot is an offset (initially NULL) into bdNodes for the node which
; is the root of a tree of nodes used to represent current line being listed.
;
PUBLIC oNodeRoot
oNodeRoot DW 0
;oNodeTemp is an offset (initially NULL) into bdNodes for the node which
; is the root of a temporary tree of nodes used to construct complex
; nodes which will eventyally be pushed onto oNodeRoot's list.
;
PUBLIC oNodeTemp
oNodeTemp DW 0
PUBLIC opList2, opList
opList2 DW 0 ;2 * opcode being listed. Used
; by individual listers to index
; tables of opcode related data
opList DW 0 ;value of current opcode before
;masking with OPCODE_MASK
PUBLIC cLsArgs
cLsArgs DB 0 ;temporary for counting down args
sEnd DATA
subttl List Debugging Functions
sBegin LIST
assumes CS,LIST
;===========================================================================
; Outer Loop of Lister
;===========================================================================
;***************************************************************************
; ushort FAR ListLine(otx, pbdDst)
;
; Purpose:
; Converts one line of pcode to its ASCII source equivalent.
; The pcode may be in any scan-state from SS_rude to SS_executable.
; The pcode resides in a far (non DS) segment indicated by grsCur.oRsCur.
; The buffer pointed to by pbdDst is grown if necessary EXCEPT FOR
; THE SPECIAL CASE when pbdDst->cbLogical < 80, in which case,
; the output is truncated. This special case is for listing WATCH
; expressions, which list to a static buffer that can't be grown.
; All normal callers call this with pbdDst->cbLogical >= 80.
;
; Entry:
; parm1: ushort oText - the offset into the current text table for
; for the 1st opcode of the line to be listed.
; parm2: char *pbdDst - points to destination buffer to
; filled with the resulting ASCII source.
; The global variable otxLsCursor = text offset for stmt to isolate
; columns for. Causes column for otxLsCursor to be returned in dx.
;
; Exit:
; returns UNDEFINED if out-of-memory-error
; else returns actual number of bytes listed to pbdDst.
; Text in pbdDst is 0-byte terminated (0 not included in byte count)
; The global variable 'otxListNext' = text offset to opBol for next
; line to be listed by ListLine. Set by ListLine at exit to speed
; up actions like listing 1 screen full, or ASCII Save.
; The global variable 'otxListNextInc' is set to text offset to opBol
; for next line after current line, even if it is from an included
; file.
; dx is set to UNDEFINED if otxLsCursor is not within this line.
; Otherwise, it represents the column offset into the ASCII
; output buffer where the opcode for otxLsCursor is.
; This is used by the User Interface code so it can
; highlight the current statement and position the cursor to errors.
; The global variable 'fLsIncluded' is set TRUE if this line
; is from an $INCLUDE file (i.e. opInclude was found in it).
; This allows ASCII Save to not send it to the file being saved.
; cLeadingSpaces is set to the number of leading spaces
; that were on the line.
;
;***************************************************************************
cProc ListLine <PUBLIC,NODATA,FAR>,<si,di>
parmW otxParm
parmW pbdDst
localV numBuf,8 ;holds number for B$IFOUT
localW spSave
localW pbDstWarning
localW hTxdCurSeg ;handle of current text seg
cBegin ListLine
mov Word Ptr [lsBosFlagsWord],NULL ; clear any leftover flags
ListLineRestart:
mov [spSave],sp ;save for restart-ability
mov si,[otxParm] ;si = offset for 1st opcode to list
sub di,di ;di = offset to 1st node to output
inc di ;1st node must not be 0, because
; we use NULL to indicate end-of-list.
; This is much cheaper than using
; UNDEFINED to indicate end-of-list.
sub ax,ax ;ax = 0
mov [fGotBol],al ;so we can stop at 2nd opBol
mov [fLsIncluded],al ;default to FALSE
mov [oNodeRoot],ax ;oNodeRoot = 0
mov [oNodeTemp],ax ;temp stack head = 0
dec ax ;ax = UNDEFINED
mov [ndLsCursor],ax
mov [colLsCursor],ax
mov dx,[otxLsCursor]
mov [otxLsCursorTmp],dx
cmp dx,si
jae StmtInLine ;brif stmt is in or beyond line to list
; or if otxLsCursor == UNDEFINED
mov [otxLsCursorTmp],ax ;otxLsCursorTmp = UNDEFINED
StmtInLine:
cmp [bdNodes.BD_pb],NULL
jne GotBuffer ;brif we already have node buffer
; Always allocate the node buffer if this is for compiler list support.
;Allocate the buffer which holds nodes
; BdAlloc(&bdNodes, 0, IT_NO_OWNERS)
PUSHI ax,<dataOFFSET bdNodes>
PUSHI ax,CB_NODES_GROW ;initial size of nodes buffer
PUSHI ax,<IT_NO_OWNERS>;heap type
call BdAlloc
or ax,ax
je J1_ListErrExit ;brif out-of-memory error
GotBuffer:
GetTextSegAddr:
GETSEG es,[txdCur.TXD_bdlText_seg],,<SIZE,LOAD> ;[4]
;es = segment for current text tbl
jmp SHORT Stg1Loop
GetRoom:
call GrowBdNodes ;grow node buffer
jne GotRoom ;branch if not out-of-memory
J1_ListErrExit:
DJMP jmp SHORT ListErrExit
;We created node for token of interest, and it is on top of Root stack.
;Replace topNode with [<topNnode> <LNT_CURSOR node>], so Stage2 loop
;will save column of this token.
;
SetNdLsCursor:
mov [ndLsCursor],di
mov [otxLsCursorTmp],UNDEFINED ;make sure we don't branch here again
jmp SHORT SetNdRet
; Stage1:
; The outer loop of Stage1 fetches the next opcode, maps it
; to a function, and jumps to the function, which jumps
; back to the top of the loop. The function for the 2nd encountered
; opBol/opEot terminates this loop by not jumping back to
; the top of the loop. If the text is in SS_Executable
; state, after fetching the executor, it maps to the opcode
; associated with this executor. The functions dispatched
; to by this loop can expect:
;
; DS -> DGROUP
; ES -> the segment with the current text table
; SI -> the next opcode to be fetched,
; DI -> next free byte in buffer described by bdNodes.
;
; The current text table is locked in order to avoid the need to continually
; update es after each FAR call.
;
;THE FOLLOWING IS TRUE FOR QBx but not EB [11]
; Stage1's outer loop guarentees at least CB_NODES_MIN free bytes
; in the buffer, which is large enough for all the nodes that could
; be emitted by a single dispatch. Any dispatches that could require
; more than this call GrowBdNodes themselves.
; The outer loop is the only place during Stage1 which
; grows bdNodes, which is the only time heap movement can
; occur. When it does this, it fixes up ES and DI.
;
PUBLIC Stg1Loop
Stg1Loop:
DbAssertRel [oNodeTemp],e,0,LIST,<node found on temp stack at Stg1Loop>
;make sure bdNodes > CB_NODES_MIN bytes, updating ES for movement
mov ax,CB_NODES_MIN ;ax = min free we need
add ax,di ;ax = size we need buffer to be
sub ax,[bdNodes.BD_cbLogical] ;ax = free space
jnc GetRoom ;brif not enough free bytes exist
GotRoom:
cmp si,[otxLsCursorTmp]
jae SetNdLsCursor ;brif caller wants to know column
; of token for the last opcode listed.
; Control returns to SetNdRet.
SetNdRet:
lods WORD PTR es:[si] ;ax = opcode
cmp [txdCur.TXD_scanState],SS_EXECUTE
jne GotOpcode
;convert to opcode since text table's scan state is SS_EXECUTE
xchg bx,ax ;bx = executor's adr
GetSegAddr CODE ;ax = adr of CODE seg
mov ds,ax ;ds = adr of CODE seg
mov ax,[bx-2] ;ax = executor's opcode
push ss
pop ds ;restore ds = DGROUP
GotOpcode:
mov [opList],ax ;save for individual list rules
and ah,HIGH OPCODE_MASK ;upper bits sometimes used for operands
mov bx,ax ;bx = opcode
shl bx,1 ;bx = opcode * 2
mov [opList2],bx ;save index for individual list rules
jmp [mpOpLister + bx] ;dispatch to lister function
;function will branch back to Stg1Loop
; or Stage2
;Some serious error has occured while listing (like out-of-memory)
; return error code
;
ListErrExit:
mov ax,UNDEFINED ;return error result
jmp ListLineExit ;return ax
;!!!WARNING!!! No heap movement can occur during Stage2, because
; we convert all bdNode offsets to pointers while reversing the direction
; of the list.
;This is not a problem in EB since the node buffer is static.
;
; Stage2:
; Taking the tree which was built in step1, do a post-order traversal
; dispatching to a special function for each node type. Each of these
; functions appends text to the current output line.
; global register conventions:
;
; Stage2Inc is branched to when the terminating bol is for an included
; line. In this case, otxListNextInc has already been set.
;
;
PUBLIC Stage2, Stage2Inc
Stage2:
call GrowBdNodes ;this test will ensure that we
; have not written past end of buffer
mov [otxListNextInc],si ;save it for caller
Stage2Inc:
mov [otxListNext],si ;save it for caller
;If there was a node that contained token of interest, replace
;the node type with LNT_CURSOR (similar to a break-point), so
;we don't have to compare at every stage2 dispatch.
mov bx,[ndLsCursor]
inc bx
je NoNdLsCursor ;brif line doesn't contain otxLsCursor
add bx,[bdNodes.BD_pb] ;convert offset to ptr
mov al,LNT_CURSOR
xchg [bx+LN_type-1],al
mov [lnTypeFindSave],al
NoNdLsCursor:
mov di,[pbdDst] ;di points to destination buffer dsc
mov ax,[di.BD_cbLogical] ;ax = max size of buffer
mov di,[di.BD_pb] ;di points to destination buffer
mov [colLastTok],di
mov [colLastLine],di
add ax,di ;ax points beyond end of buffer
sub ax,42d ;42 bytes is enough for an id, reserved
; word, number, or char[s] node
; Spaces/String/Col nodes check
; for themselves
DJMP jc ListDstFull ;brif dst doesn't even have 42 bytes
mov [pbDstWarning],ax
mov si,[oNodeRoot] ;si = offset to root node
or si,si
je Stg2Done ;brif nothing to list
sub ax,ax ;prev node = NULL
push ax ;this will stop EndOfListLoop
;si=offset to start of list of nodes, to be listed in reverse order, i.e. last
; node in list will be listed first, start of list will be listed last.
FindEndOfList:
sub cx,cx ;prev node = NULL
;si = offset to current node,
;cx points to previous node (if start of list, cx = 0),
;Traverse si's list to the end, then start listing nodes in reverse order
;
EndOfListLoop:
add si,[bdNodes.BD_pb] ;convert offset to ptr
xchg cx,LN_sib[si] ;cx = offset to next node (if any)
;swap ptr from prev->next to next->prev
; so we can work our way back
jcxz ListNodeSi ;brif we're at the end-of-list
xchg cx,si ;cx points to prev node
;si = offset to current node
jmp SHORT EndOfListLoop
;si points to last node in list, list it, then list all the nodes which
; came before it in the linked-list
;di points to destination of next ASCII byte to be listed
;
DbPub ListNodeSi
ListNodeSi:
cmp di,[pbDstWarning]
DJMP jae ListDstFull ;brif destination buf almost full
mov bl,LN_type[si] ;bx = node type
DispNodeBl:
sub bh,bh ;bh = 0
jmp [mpNodeLister + bx] ;dispatch to lister function
;function will branch back to Stg2Cont
;si still points to node which was just listed.
; now, advance to previous sibling to be listed and list it.
;
DbPub Stg2Cont
Stg2Cont:
mov si,LN_sib[si] ;si points to left sibling of node
FLoadActive
jne ChkLineWrap ;see if _CrLf needs to be inserted
; for a line > 250 chars long
; (so BASCOM can read it)
; jumps back to either LineWrapRet
LineWrapRet:
or si,si ; we just listed (0 if start-of-list)
jne ListNodeSi ;brif not at start of list yet
EndOfList:
pop si ;recover node stacked by ListChildList:
or si,si ;test for stopper pushed just before
; FindEndOfList:
jne Stg2Cont ;brif still more to list
;else, we've reached the 0 stopper
; pushed by ListChildList
;NOTE: This is branched to by StaticBufFull
Stg2Done:
sub ch,ch ;clear high byte
mov cl,[fGotBol] ;cl = number of leading spaces or
;UNDEFINED.
inc cl ;check for UNDEFINED
jz NoLeadingSpc ;return 0 if no leading spaces
dec cl ;return number of leading spaces
NoLeadingSpc:
;Many opcode listers leave a space at the end, in case they are
;followed by something else. If the last char in the line is
;a space, and the line does not contain only white space,
;eliminate the last space, and then 0-byte terminate the line.
mov ax,di ;ax points beyond last destination byte
mov bx,[pbdDst]
sub ax,[bx.BD_pb] ;ax = number bytes listed to buffer
je NoTrailSpc ;brif 0 bytes listed
cmp BYTE PTR -1[di],' '
jne NoTrailSpc ;brif last byte is not " "
cmp ax,cx ;is the line blank?
je NoTrailSpc ;brif so, preserve trailing space
dec di ;eliminate trailing space
dec ax ;decrement return value (byte count)
NoTrailSpc:
mov BYTE PTR [di],0 ;0-byte terminate text
ListLineExit: ;return ax
push cx ;save leading space count
push ax ;save byte count
mov bx,[pbdDst]
call SetLsCursor ;dx = col equivalent to otxLsCursor
pop ax ;ax = byte count
pop cx ;cx = leading space count
mov [cLeadingSpaces],cl ;record leading space count in
; static
;NOTE: we can't release space held by bdNodes, or else we risk
;causing an out-of-memory error while trying to draw the debug
;screen, which would be an infinite loop. If necessary, we could
;reset it in ParseNewInit
;;; mov [bdNodes.BD_cbLogical],0 ;Reset the buffer which holds nodes
cEnd ListLine
;******
;NOTE
; Code below this point accesses variables on ListLine's BP frame.
; Don't insert any CEND macros between here and the next CEND.
;
;******
; ListDstFull
;
;Branched to when destination buffer is almost full
;Grows destination buffer (if possible) and tries again from the start
;of ListLine. We have to do it from the start, since no heap movement
;can occur during stage 2 (for speed of typical case).
;
;For RELEASE code in EB we just assume that when we get here it must be
;
ListDstFullDS:
ListDstFull:
mov sp,[spSave]
; destination buffer
mov bx,[pbdDst] ;bx points to destination buf desc.
mov ax,[bx.BD_cbLogical]
cmp ax,80d
jb StaticBufFull
add ax,128d ;try 128 bytes more
push bx ;pass pbdDst to BdRealloc
push ax ;pass cbNew to BdRealloc
call TxtGrowPsSrcEmScratch ;make sure bdEmScratch and
;ps.bdpSrc both get updated
or ax,ax
jne NotOm ;brif not out-of-memory
jmp ListErrExit ;return UNDEFINED
NotOm:
jmp ListLineRestart
StaticBufFull:
jmp Stg2Done ;0-terminate line and return to caller
;We're doing an ASCII Save
;see if _<space><CR><LF> needs to be emitted for a line > 250 chars long
; (so BASCOM can read it)
; si points to node for next token to list
; di = column we're about to write next token to
; [colLastTok] = column we wrote last token to (initially 0)
; [colLastLine] = column which began last physical line (initially 0)
;
DbPub ChkLineWrap
ChkLineWrap:
.errnz LNT_CHAR_TOK - 0
.errnz LNT_STR - 2
.errnz LNT_ENSTR - 4
.errnz LNT_CSSTR - 6
.errnz LNT_LITSTR - 8
;The following node types start lexical tokens
.errnz LNT_ONAM - 10
.errnz LNT_LIST - 12
.errnz LNT_RW - 14
.errnz LNT_SPACES - 16
.errnz LNT_NUM - 18
.errnz LNT_COL - 20
.errnz LNT_CHAR - 22
.errnz LNT_CURSOR - 24
or si,si
je EndOfList1 ;brif end of linked list of nodes
cmp LN_type[si],LNT_ONAM
jb J1_LineWrapRet ;brif this node does not necessarily
; begin a lexical token. For example:
; "string" = 3 nodes: char,str,char
; X$ = 2 nodes: oNam,char
EndOfList1:
mov [colLastTok],di
J1_LineWrapRet:
jmp LineWrapRet
;***************************************************************************
; ChkDstFull
; Purpose:
; Make sure there's room in destination buffer for a new item.
; If pbdDst.cbLogical < 80, buffer is static and cannot be grown,
; just truncate listing (used by WatchName)
; Entry:
; di = current pointer into destination buffer
; cx = number new bytes needed in destination buffer
; [18]for EB ds need not point to DGROUP. If there is no room then DS
; is restored to DGROUP before restarting ListLine.
; Exit:
; If there's room, this function returns, else, ListLine
; is restarted after growing buffer.
; Preserves:
; all registers except flags and ax
;
;***************************************************************************
assumes DS,NOTHING
DbPub ChkDstFull
ChkDstFull PROC NEAR
mov ax,di ;ax = current dest ptr
add ax,cx ;ax = result dest ptr (end of string)
jc ListDstFullDS ;brif wrapped past FFFF
; (buf too small)
cmp ax,[pbDstWarning]
jae ListDstFullDS ;brif string too big -
; grow dst buffer
ret
ChkDstFull ENDP
assumes DS,DGROUP
;***************************************************************************
; GrowBdNodes
; Purpose:
; Grow the temporary buffer filled by Stg1Loop if necessary.
; Entry:
; di = current offset into bdNodes buffer
; Exit:
; ax = zero if out-of-memory (or out of static buffer space),
; condition codes set accordingly
; es = segment adr of current text table
; Preserves: cx
;
;***************************************************************************
PUBLIC GrowBdNodes
GrowBdNodes PROC NEAR
mov ax,CB_NODES_MIN ;ax = min free we need
add ax,di ;ax = size we need buffer to be
sub ax,[bdNodes.BD_cbLogical] ;ax = free space
jc GrowExit ;brif enough free bytes exist
;ax is nonzero, psw.ZR is FALSE
push cx ;save caller's cx
PUSHI ax,<dataOFFSET bdNodes>
PUSHI ax,CB_NODES_GROW
call BdGrow
GETSEG es,[txdCur.TXD_bdlText_seg],,<SIZE,LOAD> ;[4]
;es = segment for current text tbl
pop cx ;restore caller's cx
or ax,ax ;test BdGrow's return value
GrowExit:
ret
GrowBdNodes ENDP
sEnd LIST
sBegin DATA
mpNodeLister LABEL WORD
DW LISTOFFSET ListCharsNode
DW LISTOFFSET ListStrNode
DW LISTOFFSET ListEnStrNode
DW LISTOFFSET ListCsStrNode
DW LISTOFFSET ListLitStrNode
DW LISTOFFSET ListONamNode
DW LISTOFFSET ListChildList
DW LISTOFFSET ListRwNode
DW LISTOFFSET ListSpacesNode
DW LISTOFFSET ListNumNode
DW LISTOFFSET ListColNode
DW LISTOFFSET ListCharsNode
DW LISTOFFSET ListCursorNode
.errnz LNT_CHAR_TOK - 0
.errnz LNT_STR - 2
.errnz LNT_ENSTR - 4
.errnz LNT_CSSTR - 6
.errnz LNT_LITSTR - 8
.errnz LNT_ONAM - 10
.errnz LNT_LIST - 12
.errnz LNT_RW - 14
.errnz LNT_SPACES - 16
.errnz LNT_NUM - 18
.errnz LNT_COL - 20
.errnz LNT_CHAR - 22
.errnz LNT_CURSOR - 24
sEnd DATA
sBegin LIST
assumes CS,LIST
;===========================================================================
; Stage 2 Node Listing Functions
;
; This section contains one routine for listing each node type.
; On Entry, they can all assume
; DS points to DGROUP segment
; DI points to next destination byte (buffer is within DS)
; SI points to node being listed
; ES contains garbage
;
;===========================================================================
;***************************************************************************
; ListChildList
; Purpose:
; This node has no atomic ASCII source directly associated with it,
; i.e. it is a hierarchy node which exists just to hold children
; to sibling nodes.
;
;***************************************************************************
ListChildList:
push si ;gets popped by EndOfList:
mov si,WORD PTR LN_val_list[si]
;si = offset to start of child list
jmp FindEndOfList ;recursively list it
;***************************************************************************
; ListONamNode
; Purpose:
; Copy the content of an LNT_ONAM node to the output buffer.
; Value is a 16 bit name table offset for identifier associated with
; this node.
;
;***************************************************************************
ListONamNode:
push di ; pass dest byte ptr to CopyONamPb
push word ptr [si.LN_val_oNam] ; pass oNam to CopyONamPb
call CopyONamPb ;copy name to destination buffer
;ax = # bytes in name
add di,ax ;update destination ptr
jmp Stg2Cont
;***************************************************************************
; ListCursorNode
; Purpose:
; Return column offset for this node in colLsCursor.
; It represents the column that corresponds with the opcode
; at text offset otxLsCursor.
;
;***************************************************************************
ListCursorNode:
mov ax,di ;ax points to next destination byte
mov bx,[pbdDst]
sub ax,[bx.BD_pb] ;ax = number bytes listed to buffer
mov [colLsCursor],ax
mov bl,[lnTypeFindSave]
jmp DispNodeBl
;***************************************************************************
; ListCharsNode
; Purpose:
; Copy the content of an LNT_CHAR node to the output buffer.
; Value is 0, 1 or 2 ASCII characters associated with this node.
;
;***************************************************************************
ListCharsNode:
mov ax,WORD PTR [si.LN_val_char]
cmp ax,"OT"
je GotTo
CharLoop:
or al,al
je NoChar ;brif NULL char in this node
CharLoop1:
mov [di],al ;copy char to destination buffer
inc di ;can't use stosb because ES <> DS
mov al,ah ;al = 2nd char (if any)
sub ah,ah ;don't output more than 2 chars
jmp SHORT CharLoop
NoChar:
jmp Stg2Cont
;It is space-cheaper to put spaces around TO here than in
;DIM's Stage1 code.
;
GotTo:
mov [di],"T " ;list " T"
inc di ;can't use stosb because ES <> DS
inc di
mov ax," O" ;list "O "
jmp SHORT CharLoop1
;***************************************************************************
; ListRwNode
; Purpose:
; Copy the content of an LNT_RW node to the output buffer.
; value is a 16 bit reserved word table offset for
; reserved word or special character associated with this node.
;
;***************************************************************************
ListRwNode:
jmp FAR PTR ListRwNodeCP
sEnd LIST
sBegin CP
assumes CS,CP
DbPub ListRwNodeCP
ListRwNodeCP:
push si ;preserve si
mov ax,ds ;don't use push, need speed
mov es,ax ;es = DGROUP
mov ax,WORD PTR [si.LN_val_orw]
mov si,ax ;si = resword offset + 1st letter
mov al,ah ;al = (1st letter - 'A') * 4
xor ah,ah
shr al,1
shr al,1 ;al = 1st letter - 'A'
mov bx,ax
shl bx,1 ;bx = word offset into tRw table
add al,'A' ;al = 1st letter
stosb ;store 1st letter of res word
and si,03FFH ;si = offset into res word table
mov ax,cs ;ax = current address of CP segment
mov es,ax
assumes ES,CP
add si,es:tRw[bx] ;convert offset to ptr
call GetRwFromTabCP ;cx = size of res word's name
;dx = size of res word's atr block
;si points to 1st letter of name
assumes ES,NOTHING
mov ax,es ;don't use push, need speed
mov ds,ax ;ds = CP segment
assumes DS,CP
mov ax,ss ;don't use push, need speed
mov es,ax ;es = DGROUP
rep movsb ;copy reserved word from CP segment
; to DGROUP table
lodsb ;al = res word's flags
test al,RWF_STR
je NotStrRw ;brif res word does not end with '$'
mov al,'$'
stosb ;list "$"
NotStrRw:
mov ax,ss ;don't use push, need speed
mov ds,ax ;ds = DGROUP
assumes DS,DGROUP
pop si ;restore si
jmp FAR PTR Stg2Cont
;*************************************************************************
; GetRwFromTabCP
; Purpose:
; extract an entry from the reserved word table
; Entry:
; si points to first char of entry in reserved word table
; which is the second char of the reserved word since the
; first char is not stored in the table
; for GetRwFromTabList:
; es = segment address of reserved word table (i.e. CP) [09]
; Exit:
; cx = size of res word's name
; dx = size of res word's atr block
; si points to 1st byte of res word name
; preserves bx,di,es
;
; GetRwFromTab is a FAR entry point. It has the following DIFFERENCE:
; es is not expected to be anything on entry,
; on exit ax = size of res word's name instead of cx
; Does not guarantee that bx and es are preserved
;*************************************************************************
PUBLIC GetRwFromTabCP
GetRwFromTabCP PROC NEAR
lods BYTE PTR es:[si] ;al = (cbNam << 4) + cbAtr
inc al ;test al for FF
jz CbsInWord ;brif cbNam and cbAtr stored
; in following word
dec al ;restore al = Cbs
sub ah,ah ;ax = (cbNam << 4) + cbAtr
mov dx,ax ;dx = (cbNam << 4) + cbAtr
shr ax,1
shr ax,1
shr ax,1
shr ax,1 ;ax = cbNam
mov cx,ax ;cx = cbNam
and dl,15 ;dl = cbAtr
ret
CbsInWord:
lods WORD PTR es:[si] ;al = #bytes of attributes
;ah = #bytes in reserved word
mov cl,ah
xor ch,ch ;cx = #bytes in reserved word
xor ah,ah
xchg dx,ax ;dx = #bytes of attributes
ret
GetRwFromTabCP ENDP
sEnd CP
sBegin LIST
assumes CS,LIST
;***************************************************************************
; ListStrNode/ListLitStrNode
; Rewritten for revision [18]
; Purpose:
; Copy the content of an LNT_STR node to the output buffer.
; Value is a 16 bit offset followed by 16 bit count
; which identifies where the string is in the text table.
;
; Special processing is needed for listing LitStrNode's
; to handle listing '"' in a string.
;
; Entry:
; bx = LNT_STR or LNT_LITSTR
;
;***************************************************************************
ListLitStrNode:
DbPub ListStrNode
ListStrNode:
push si ;preserve si
mov cx,WORD PTR [si.LN_val_cbStr]
;cx = length of string
mov si,WORD PTR [si.LN_val_oStr]
;si = offset into text table to string
call ChkDstFull ;make sure there's room for cx bytes
; in dest buffer. If not, don't return
GETSEG ds,[txdCur.TXD_bdlText_seg],,<SIZE,LOAD> ;[4]
;ds = seg for current text table
push ss
pop es ;es = DGROUP
rep movsb
push es
pop ds ;restore ds = DGROUP
LSNZeroLenExit:
pop si ;restore si
jmp Stg2Cont
;***************************************************************************
; ListEnStrNode
; Purpose:
; Decode and copy the content of an LNT_ENSTR node to the output buffer.
; Value is a 16 bit offset followed by 16 bit count
; which identifies where the encoded string is in the text table.
; An encoded string consists of standard ascii text, with character
; runs of > 3 identical chars contained in a "compression" record.
; The compression record, and format is described in prsutil.asm,
; and basically consists of a flag byte, followed by a byte containing
; the repetition factor, and the final byte is the character which
; was repeated.
;
;***************************************************************************
DbPub ListEnStrNode
ListEnStrNode:
push si ;preserve si
mov cx,WORD PTR [si.LN_val_cbEnStr]
;cx = length of string
jcxz ListEnStrExit ;brif no text to list
mov si,WORD PTR [si.LN_val_oEnStr]
;si = offset into text table to string
call ChkDstFull ;make sure there's room for cx bytes
; in dest buffer. If not, don't return
GETSEG ds,[txdCur.TXD_bdlText_seg],,<SIZE,LOAD> ;[4]
;ds = seg for current text table
push ss
pop es ;es = DGROUP
EnStrLoop:
lodsb ;get char
cmp al,STR_EncodedText ;is this the start of a compression
je ExpandText ; record? brif so
stosb ;list char
EnStrCont:
loop EnStrLoop ;continue until all chars listed
push es
pop ds ;restore ds = DGROUP
ListEnStrExit:
pop si ;restore si
jmp Stg2Cont
ExpandText:
lodsw ;al = cbChars, ah = char
dec cx
dec cx ;adjust for size of compression record
push cx ;save cbCompressed
mov bx,di ;bx = current dest ptr
add bx,cx ;bx = result dest ptr (end of string)
; before expanding text
mov cl,al
sub ch,ch ;cx = cbExpand
mov al,ah ;al = char
add bx,cx ;bx = result dest ptr after expansion
jc J1_ListDstFull ;brif wrapped past FFFF (buf too small)
cmp bx,es:[pbDstWarning]
jae J1_ListDstFull ;brif string too big - grow dst buffer
rep stosb ;blast out the encoded char string
pop cx ;recover cbLeft to list
jmp short EnStrCont ;continue listing encoded string
J1_ListDstFull:
push es
pop ds ;reset ds to DGROUP
jmp ListDstFull
;***************************************************************************
; ListCsStrNode
; Purpose:
; Copy the content of an LNT_CSSTR node to the output buffer.
; Value is a 16 bit offset followed by 16 bit count
; which identifies where the string is in the LIST segment.
;
;***************************************************************************
ListCsStrNode:
push si ;preserve si
mov si,WORD PTR [si.LN_val_CsStr]
;si = offset into LIST segment to
; str255 struct for string
push ds
pop es ;es = DGROUP
push cs
pop ds ;ds = code segment (LIST)
lodsb ;al = length of string constant
;si points to 1st byte of string
cbw ;ax = length of string constant
; NOTE: implies no LIST string constant
; is longer than 128 bytes (very safe)
xchg cx,ax ;cx = length of string
rep movsb ;copy string to destination buffer
push es
pop ds ;restore ds = DGROUP
pop si ;restore si
jmp Stg2Cont
;***************************************************************************
; ListSpacesNode
; Purpose:
; Copy the content of an LNT_SPACES node to the output buffer.
; Value is a 16 bit count of spaces
;
;***************************************************************************
ListSpacesNode:
mov cx,WORD PTR [si.LN_val_cbSpaces]
;cx = number of spaces to emit
;cx = number of spaces to list
ListCol1:
call ChkDstFull ;make sure there's room for cx bytes
; in dest buffer. If not, don't return
push ds
pop es ;es = DGROUP
mov al,' '
rep stosb ;store spaces in destination buffer
J1_Stg2Cont:
jmp Stg2Cont ;return to outer loop
;***************************************************************************
; ListColNode
; Purpose:
; Emit white space until we get to indicated column.
; Value is a 16 bit column to advance to.
; High bit of argument is set if at least 1 space needs
; to be output even if we're beyond the specified column.
;
;***************************************************************************
ListColNode:
mov bx,[pbdDst]
mov cx,[bx.BD_pb] ;cx points to destination buffer
mov ax,WORD PTR [si.LN_val_col]
mov dx,ax ;high bit of dx is set if at least
; 1 space is to be output
and ah,7Fh ;ax = column to advance to
add cx,ax
;cx points to column to advance to
sub cx,di ;subtract current column
ja ListCol1 ;brif not already past that column
mov cx,1
or dx,dx
js ListCol1 ;always list at least 1 space
jmp SHORT J1_Stg2Cont ;return to outer loop
subttl List a numeric constant
;Table which maps LIT_xxx to runtime library's value types as follows:
;
; If the high bit is set, its a "special" number and:
; the low 7 bits mean: 00cbbbbb where:
; c = 0 for 16 bit integer, 1 for 32 bit integer,
; bbbbb = base value (2, 8 or 16)
; Else the remaining 7 bits are the "runtime" value type
; The runtime uses the convention that the low 4 bits = length of value
;
OrdConstStart 0
OrdConst LIT_I2 ; % suffix
OrdConst LIT_O2 ; &O prefix
OrdConst LIT_H2 ; &H prefix
OrdConst LIT_I4 ; & suffix
OrdConst LIT_O4 ; &&O prefix
OrdConst LIT_H4 ; &&H prefix
OrdConst LIT_R4 ; ! suffix
OrdConst LIT_R8 ; # suffix
OrdConst LIT_STR ; "xxx"
SNM_LONG EQU 40H ;indicates LONG special number
mpLtToRt LABEL WORD
DB VT_I2,0 ;LIT_I2
DB 084H,'O' ;LIT_O2
DB 090H,'H' ;LIT_H2
DB VT_I4,'&' ;LIT_I4
DB 0C4H,'O' ;LIT_O4
DB 0D0H,'H' ;LIT_H4
DB VT_R4,'!' ;LIT_R4
DB VT_R8,'#' ;LIT_R8
;***************************************************************************
; ListNumNode
; Purpose:
; List a numeric constant to the output buffer.
;
;***************************************************************************
DbPub ListNumNode
ListNumNode:
push si ;preserve node ptr
GETSEG es,[txdCur.TXD_bdlText_seg],,<SIZE,LOAD> ;[4]
; es = seg for current text table
xor bh,bh
mov bl,[si.LN_val_clNum] ;bx = type of num (LIT_D2...LIT_LINENUM)
mov si,[si.LN_val_otxNum] ;es:si points to number
cmp bl,LIT_LINENUM
je ListUnsigned ;brif linenum
.errnz LIT_I2
or bl,bl ;I2?
jz ListSigned
shl bx,1
mov ax,[mpLtToRt+bx] ;al = runtime's value type
;ah = explicit type char
or al,al
js HexNum ;brif hex/octal/binary constant
push ds ;swap ds,es
push es
pop ds ;ds = seg adr of text table
pop es ;es = DGROUP
mov cx,ax ;cx = runtime's value type
and cx,000FH ;cx = # bytes in value
push di
lea di,[numBuf] ;di points to temp 8 byte buffer
rep movsb ;copy value from pcode to numBuf
pop di ;restore di=ptr to next list byte
push es
pop ds ;restore ds = es = DGROUP
;al=runtime's value type, ah=explicit type char
CallFout:
lea bx,[numBuf] ;bx points to temp 8 byte buffer
cmp ah,'&'
jne NotLong
push ax
mov ax,[bx]
cwd ;dx = 0 if ax <= 7FFF, else FFFF
sub dx,[bx+2] ;dx = 0 if number could be represented
; as a short integer (i.e. '&' required)
pop ax
je NotLong ;brif '&' is necessary
sub ah,ah ;else list no explicit char
NotLong:
call far ptr ListNum ;copy ASCII number to di
NumDone:
pop si ;restore node ptr
jmp Stg2Cont ;return to outer loop
ListSigned:
mov si,es:[si] ;Get number to si
; jmp short ListUnsigned
DbPub ListUnsigned
ListUnsigned:
;16-bit integer in si
push ds
pop es ;es=ds=dgroup
xchg ax,si ;put number in ax
xor cx,cx ;Initialize count of digits
mov bx,10
;While >10, divide by 10, counting digits
NextDig:
inc cx ;Count all digits
cmp ax,bx ;Less than 10?
jb SaveDig
xor dx,dx ;Extend to DWord
div bx ;Next digit is remainder in dx
push dx ;Save digit on stack
jmp NextDig
SaveDig:
add al,"0" ;Add ASCII bias
stosb ;List a digit
pop ax ;Get next digit from stack
loop SaveDig
xchg si,ax ;Last thing popped was node pointer
mov byte ptr [di],0 ;Terminate with zero
jmp Stg2Cont
;al & SNM_LONG is non-zero if LONG, ah = 'H', 'O', 'B' for hex,octal,binary
;es = text table's segment
;di = pointer to next byte to be listed (destination)
HexNum:
push ax ;save fLong
xchg bx,ax ;bl = fLong, bh = base char
lods WORD PTR es:[si] ;ax = low word of constant
xchg dx,ax ;dx = low word of constant
sub ax,ax ;default high word = 0
test bl,SNM_LONG
je NotLongHex ;branch if I2 constant
lods WORD PTR es:[si] ;ax = high word of constant
NotLongHex:
mov bl,'&' ;list '&'
mov [di],bx ;store &H, &O, or &B
inc di
inc di
xchg ax,dx ;dx:ax = I4 to output
push dx ;save high-word
call far ptr ListBaseNum
pop dx ;restore high-word
pop ax ;al = fLong
or dx,dx
jne NumDone ;brif implicitly long
test al,SNM_LONG
je NumDone ;brif implicitly short
mov BYTE PTR [di],'&' ;list second '&' to indicate long
inc di
jmp SHORT NumDone ;return to outer loop
;***************************************************************************
; ListBaseNum
; Purpose:
; Copy the ASCII equivalent of a hex/octal number to a buffer
; NOTE:
; This function assumes that the following runtime functions
; cannot result in a runtime error: B$FCONVBASE, B$IFOUT
; Entry:
; dx:ax = I4 to output
; ds:di points to destination buffer
; dh = 'H' or 'O' for hex/octal
; Exit:
; di points beyond last byte of number (i.e. TO 0-byte terminator)
; es = ds
;
;***************************************************************************
cProc ListBaseNum,<PUBLIC,FAR>,<si>
cBegin
; bh = 'H' for Hex, 'O' for Octal
; dx:ax = I4 to convert
; di points to next free byte in output buffer
;
DoConv:
mov cx,0F04h ;ch=mask, cl=shift count
cmp bh,'H'
je GotHex
mov cx,0703h ;ch=mask, cl=shift count
DbAssertRelB bh,e,'O',LIST,<ListBaseNum called with bad dh>
GotHex:
lea bx,[di+12d] ;bx points to end of 12 byte buffer
call B$FCONVBASE ;dx points to 1st byte of result
;bx = number of digits
;es = ds
mov cx,bx ;cx = number of digits
mov si,dx ;bx points to 1st digit
rep movsb ;copy ASCII string to list buffer
LBNExit:
mov BYTE PTR [di],0 ;0 terminate result
cEnd
;***************************************************************************
; ListNum
; Purpose:
; Copy the ASCII equivalent of a binary number to a buffer
; Used by WATCH pcode as well as lister.
; Entry:
; al = type of number (VT_I2, VT_I4, VT_R4, VT_R8, VT_CY (EB specific))
; ah = explicit terminating char (i.e. %, !, &, #, @ (EB specific))
; bx points to 1st byte of binary number (in DS)
; di points to destination buffer (in DS)
; Exit:
; di points beyond last byte of number (i.e. TO 0-byte terminator)
; es = ds
;
;***************************************************************************
cProc ListNum,<PUBLIC,FAR>,<si>
cBegin
push ds
pop es ;es = DGROUP
push ax ;save ah=explicit type char
; pass B$IFOUT ptr to value in es:bx
; pass B$IFOUT valTyp in al
call B$IFOUT ;bx = adr of ascii string
;ax = byte count
pop dx ;restore dh = explicit type char
cmp BYTE PTR [bx],' '
jne NoSpc ;brif no leading space
inc bx ;skip leading space
dec ax
NoSpc:
xchg cx,ax ;cx = # bytes in ASCII string
mov si,bx ;si points to start of ASCII string
;copy ascii string from BIFOUT's static buffer to result buffer
NumLoop:
lodsb ;al = next byte to transfer
stosb ;list it
cmp al,'E'
je Not0to9
cmp al,'D'
je Not0to9
cmp al,'.'
jne Its0to9
cmp dh,'#'
je Its0to9 ;. isn't strong enough to not list #
;else 10.5# would list as 10.5 (R4)
cmp dh,'@'
je Its0to9 ;same goes for @
Not0to9:
sub dh,dh ;no explicit type needed, we got
; a period, E or D
Its0to9:
loop NumLoop
or dh,dh
je LnExit ;brif not explicit type char needed
mov al,dh ;al = explicit type char
stosb ;list it
LnExit:
mov BYTE PTR [di],0 ;0 terminate result
cEnd
;***************************************************************************
; SetLsCursor ; - function added in this rev.
; Entry:
; ax = number of bytes in line
; bx = pbdDst
; [colLsCursor] = column of interest (equivalent to otxLsCursor)
; Exit:
; dx = column of interest (equivalent to otxLsCursor)
;
;***************************************************************************
cProc SetLsCursor,<NEAR>,<si>
cBegin
mov cx,UNDEFINED ;for cheaper comparisons below
mov dx,[colLsCursor]
cmp dx,cx
jne NotStmtEnd ;brif colLsCursor already set
cmp [ndLsCursor],cx
je NoColCursor ;brif otxLsCursor wasn't in line
xchg dx,ax ;else, this is it, dx=column
;Make sure that column of interest isn't pointing to a blank,
;If it is, make first token after blank column of interest
NotStmtEnd:
cmp dx,cx
je NoColCursor ;brif otxLsCursor not in this line
mov si,[bx.BD_pb] ;si points to 1st byte of result
add si,dx ;si points to column of interest
SkipBlanks:
lodsb ;al = byte at column of interest
cmp al,' '
je SkipBlanks
cmp al,0
je NoColCursor ;brif blanks are at end-of-line
dec si ;si points to 1st non blank
mov dx,si
sub dx,[bx.BD_pb] ;dx = offset to 1st non blank
NoColCursor:
cEnd
;***************************************************************************
; B$FConvBase
; Purpose:
; Convert an I4 to ASCII Hex/Octal/Binary without causing any
; Heap Movement. This is needed by QBI.
; Entry:
; BX points beyond last byte of 11 byte buffer (32 bytes for _BFBIN)
; CH = Mask, CL = Shift count, i.e.
; 0703 for Octal, 0F04 for Hex
; DX:AX = number to convert
; Exit:
; DX points to 1st byte of resulting string
; BX = number of digits in resulting string
; ES = DS
;
;***************************************************************************
cProc B$FCONVBASE,<NEAR>,<DI>
cBegin
MOV DI,BX ;DI points beyond destination
XCHG AX,BX ;DX:AX = I4 to be converted
STD ;move from high to low
PUSH DS ;set ES=DS
POP ES
XOR AH,AH ;init char count
; At this point the following conditions exist:
; AH = Character count
; CH = Mask
; CL = Shift count
; DX:BX = I4 to convert
; DI = pointer to digit buffer
; Perform the conversion by shifting DX:BX by CL bits and masm out
; unused bits with CH. Take this number and convert to ascii char
; representing digit. Stuff the char in the buffer, bump the char
; count and continue until no non-zero digits remain.
CONVERT_LOOP:
MOV AL,BL ;Bring number to accumulator
AND AL,CH ;Mask down to the bits that count
;Trick 6-byte hex conversion
ADD AL,90H
DAA
ADC AL,40H
DAA ;Number in hex now
STOSB ;Save in string
INC AH ;Count the digits
PUSH CX ;Save mask/shift count
XOR CH,CH ;zero out mask, leaving shift count
SHIFT_LOOP:
SHR DX,1 ;shift low bit into carry, zero high bit
RCR BX,1 ;rotate carry into low word
LOOP SHIFT_LOOP ;repeat shift count times
POP CX ;recover mask/shift count
PUSH BX
OR BX,DX ;is rest of I4 = 0?
POP BX
JNZ CONVERT_LOOP ;brif not, convert next digit
CLD ;Restore direction UP
INC DI ;Point to most significant digit
MOV DX,DI ;Put string pointer in DX
MOV BL,AH ;Digit count in BX (BH already zero)
cEnd
sEnd LIST
end
| 31.252145 | 79 | 0.657909 |
67a1487358a648528bb8b731012565d2dc6a989b | 65,053 | asm | Assembly | uniqnew.asm | Vignesh-Nadar/xv6 | 601dda244865540bb0ace21a2ff5ae7e6cf181f9 | [
"MIT-0"
] | null | null | null | uniqnew.asm | Vignesh-Nadar/xv6 | 601dda244865540bb0ace21a2ff5ae7e6cf181f9 | [
"MIT-0"
] | null | null | null | uniqnew.asm | Vignesh-Nadar/xv6 | 601dda244865540bb0ace21a2ff5ae7e6cf181f9 | [
"MIT-0"
] | null | null | null |
_uniqnew: file format elf32-i386
Disassembly of section .text:
00000000 <readLine>:
char buf[MAX_BUF];
int argumentIndex = 1;
int optionCD = 1; // 1 for no option // 2 for -C // 3 for option -D
int optionI = 0; // 1 for option -I
int readLine(char *line, int fd) {
0: 55 push %ebp
1: 89 e5 mov %esp,%ebp
3: 83 ec 28 sub $0x28,%esp
memset(line, 0, MAX_BUF);
6: c7 44 24 08 00 04 00 movl $0x400,0x8(%esp)
d: 00
e: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
15: 00
16: 8b 45 08 mov 0x8(%ebp),%eax
19: 89 04 24 mov %eax,(%esp)
1c: e8 b0 06 00 00 call 6d1 <memset>
char *dst = line;
21: 8b 45 08 mov 0x8(%ebp),%eax
24: 89 45 f4 mov %eax,-0xc(%ebp)
while ((read(fd, buf, 1)) > 0) {
27: eb 47 jmp 70 <readLine+0x70>
if (buf[0] == '\n') {
29: 0f b6 05 40 11 00 00 movzbl 0x1140,%eax
30: 3c 0a cmp $0xa,%al
32: 75 14 jne 48 <readLine+0x48>
*dst++ = buf[0];
34: 8b 45 f4 mov -0xc(%ebp),%eax
37: 8d 50 01 lea 0x1(%eax),%edx
3a: 89 55 f4 mov %edx,-0xc(%ebp)
3d: 0f b6 15 40 11 00 00 movzbl 0x1140,%edx
44: 88 10 mov %dl,(%eax)
break;
46: eb 47 jmp 8f <readLine+0x8f>
} else {
*dst++ = buf[0];
48: 8b 45 f4 mov -0xc(%ebp),%eax
4b: 8d 50 01 lea 0x1(%eax),%edx
4e: 89 55 f4 mov %edx,-0xc(%ebp)
51: 0f b6 15 40 11 00 00 movzbl 0x1140,%edx
58: 88 10 mov %dl,(%eax)
if ((dst - line) + 1 > MAX_BUF) {
5a: 8b 55 f4 mov -0xc(%ebp),%edx
5d: 8b 45 08 mov 0x8(%ebp),%eax
60: 29 c2 sub %eax,%edx
62: 89 d0 mov %edx,%eax
64: 83 c0 01 add $0x1,%eax
67: 3d 00 04 00 00 cmp $0x400,%eax
6c: 7e 02 jle 70 <readLine+0x70>
break;
6e: eb 1f jmp 8f <readLine+0x8f>
int optionI = 0; // 1 for option -I
int readLine(char *line, int fd) {
memset(line, 0, MAX_BUF);
char *dst = line;
while ((read(fd, buf, 1)) > 0) {
70: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
77: 00
78: c7 44 24 04 40 11 00 movl $0x1140,0x4(%esp)
7f: 00
80: 8b 45 0c mov 0xc(%ebp),%eax
83: 89 04 24 mov %eax,(%esp)
86: e8 0b 08 00 00 call 896 <read>
8b: 85 c0 test %eax,%eax
8d: 7f 9a jg 29 <readLine+0x29>
}
}
}
//adding \n to line end if it doesn't have one..
if (*(dst - 1) != '\n') *dst = '\n';
8f: 8b 45 f4 mov -0xc(%ebp),%eax
92: 83 e8 01 sub $0x1,%eax
95: 0f b6 00 movzbl (%eax),%eax
98: 3c 0a cmp $0xa,%al
9a: 74 06 je a2 <readLine+0xa2>
9c: 8b 45 f4 mov -0xc(%ebp),%eax
9f: c6 00 0a movb $0xa,(%eax)
return dst - line;
a2: 8b 55 f4 mov -0xc(%ebp),%edx
a5: 8b 45 08 mov 0x8(%ebp),%eax
a8: 29 c2 sub %eax,%edx
aa: 89 d0 mov %edx,%eax
}
ac: c9 leave
ad: c3 ret
000000ae <caseIgnoreComparison>:
int caseIgnoreComparison(const char *first, const char *second) {
ae: 55 push %ebp
af: 89 e5 mov %esp,%ebp
b1: 83 ec 10 sub $0x10,%esp
uchar chA, chB;
chA = *first;
b4: 8b 45 08 mov 0x8(%ebp),%eax
b7: 0f b6 00 movzbl (%eax),%eax
ba: 88 45 ff mov %al,-0x1(%ebp)
chB = *second;
bd: 8b 45 0c mov 0xc(%ebp),%eax
c0: 0f b6 00 movzbl (%eax),%eax
c3: 88 45 fe mov %al,-0x2(%ebp)
if (chA >= 'A' && chA <= 'Z')
c6: 80 7d ff 40 cmpb $0x40,-0x1(%ebp)
ca: 76 0a jbe d6 <caseIgnoreComparison+0x28>
cc: 80 7d ff 5a cmpb $0x5a,-0x1(%ebp)
d0: 77 04 ja d6 <caseIgnoreComparison+0x28>
chA = 'a' + (chA - 'A');
d2: 80 45 ff 20 addb $0x20,-0x1(%ebp)
if (chB >= 'A' && chB <= 'Z')
d6: 80 7d fe 40 cmpb $0x40,-0x2(%ebp)
da: 76 0c jbe e8 <caseIgnoreComparison+0x3a>
dc: 80 7d fe 5a cmpb $0x5a,-0x2(%ebp)
e0: 77 06 ja e8 <caseIgnoreComparison+0x3a>
chB = 'a' + (chB - 'A');
e2: 80 45 fe 20 addb $0x20,-0x2(%ebp)
while (*first && chA == chB)
e6: eb 2a jmp 112 <caseIgnoreComparison+0x64>
e8: eb 28 jmp 112 <caseIgnoreComparison+0x64>
{
first++;
ea: 83 45 08 01 addl $0x1,0x8(%ebp)
second++;
ee: 83 45 0c 01 addl $0x1,0xc(%ebp)
if (chA >= 'A' && chA <= 'Z')
f2: 80 7d ff 40 cmpb $0x40,-0x1(%ebp)
f6: 76 0a jbe 102 <caseIgnoreComparison+0x54>
f8: 80 7d ff 5a cmpb $0x5a,-0x1(%ebp)
fc: 77 04 ja 102 <caseIgnoreComparison+0x54>
chA = 'a' + (chA - 'A');
fe: 80 45 ff 20 addb $0x20,-0x1(%ebp)
if (chB >= 'A' && chB <= 'Z')
102: 80 7d fe 40 cmpb $0x40,-0x2(%ebp)
106: 76 0a jbe 112 <caseIgnoreComparison+0x64>
108: 80 7d fe 5a cmpb $0x5a,-0x2(%ebp)
10c: 77 04 ja 112 <caseIgnoreComparison+0x64>
chB = 'a' + (chB - 'A');
10e: 80 45 fe 20 addb $0x20,-0x2(%ebp)
if (chA >= 'A' && chA <= 'Z')
chA = 'a' + (chA - 'A');
if (chB >= 'A' && chB <= 'Z')
chB = 'a' + (chB - 'A');
while (*first && chA == chB)
112: 8b 45 08 mov 0x8(%ebp),%eax
115: 0f b6 00 movzbl (%eax),%eax
118: 84 c0 test %al,%al
11a: 74 09 je 125 <caseIgnoreComparison+0x77>
11c: 0f b6 45 ff movzbl -0x1(%ebp),%eax
120: 3a 45 fe cmp -0x2(%ebp),%al
123: 74 c5 je ea <caseIgnoreComparison+0x3c>
chA = 'a' + (chA - 'A');
if (chB >= 'A' && chB <= 'Z')
chB = 'a' + (chB - 'A');
}
return (uchar) *first - (uchar) *second;
125: 8b 45 08 mov 0x8(%ebp),%eax
128: 0f b6 00 movzbl (%eax),%eax
12b: 0f b6 d0 movzbl %al,%edx
12e: 8b 45 0c mov 0xc(%ebp),%eax
131: 0f b6 00 movzbl (%eax),%eax
134: 0f b6 c0 movzbl %al,%eax
137: 29 c2 sub %eax,%edx
139: 89 d0 mov %edx,%eax
}
13b: c9 leave
13c: c3 ret
0000013d <uniq>:
void uniq(int fd, char *name) {
13d: 55 push %ebp
13e: 89 e5 mov %esp,%ebp
140: 83 ec 38 sub $0x38,%esp
char *prev = NULL, *cur = NULL;
143: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
14a: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
char *line = (char *) malloc(MAX_BUF * sizeof(char));
151: c7 04 24 00 04 00 00 movl $0x400,(%esp)
158: e8 ad 0b 00 00 call d0a <malloc>
15d: 89 45 e4 mov %eax,-0x1c(%ebp)
int count = 0;
160: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp)
while ((readLine(line, fd)) > 0) {
167: e9 e8 01 00 00 jmp 354 <uniq+0x217>
if (prev == NULL) {
16c: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
170: 0f 85 b8 00 00 00 jne 22e <uniq+0xf1>
prev = (char *) malloc(MAX_BUF * sizeof(char));
176: c7 04 24 00 04 00 00 movl $0x400,(%esp)
17d: e8 88 0b 00 00 call d0a <malloc>
182: 89 45 f4 mov %eax,-0xc(%ebp)
cur = (char *) malloc(MAX_BUF * sizeof(char));
185: c7 04 24 00 04 00 00 movl $0x400,(%esp)
18c: e8 79 0b 00 00 call d0a <malloc>
191: 89 45 f0 mov %eax,-0x10(%ebp)
memmove(prev, line, MAX_BUF);
194: c7 44 24 08 00 04 00 movl $0x400,0x8(%esp)
19b: 00
19c: 8b 45 e4 mov -0x1c(%ebp),%eax
19f: 89 44 24 04 mov %eax,0x4(%esp)
1a3: 8b 45 f4 mov -0xc(%ebp),%eax
1a6: 89 04 24 mov %eax,(%esp)
1a9: e8 8b 06 00 00 call 839 <memmove>
memmove(cur, line, MAX_BUF);
1ae: c7 44 24 08 00 04 00 movl $0x400,0x8(%esp)
1b5: 00
1b6: 8b 45 e4 mov -0x1c(%ebp),%eax
1b9: 89 44 24 04 mov %eax,0x4(%esp)
1bd: 8b 45 f0 mov -0x10(%ebp),%eax
1c0: 89 04 24 mov %eax,(%esp)
1c3: e8 71 06 00 00 call 839 <memmove>
count = 1;
1c8: c7 45 ec 01 00 00 00 movl $0x1,-0x14(%ebp)
if (optionCD == 1) {
1cf: a1 04 11 00 00 mov 0x1104,%eax
1d4: 83 f8 01 cmp $0x1,%eax
1d7: 75 20 jne 1f9 <uniq+0xbc>
printf(1, "%s", cur);
1d9: 8b 45 f0 mov -0x10(%ebp),%eax
1dc: 89 44 24 08 mov %eax,0x8(%esp)
1e0: c7 44 24 04 ec 0d 00 movl $0xdec,0x4(%esp)
1e7: 00
1e8: c7 04 24 01 00 00 00 movl $0x1,(%esp)
1ef: e8 2a 08 00 00 call a1e <printf>
1f4: e9 41 01 00 00 jmp 33a <uniq+0x1fd>
}
else if (optionCD == 2)
1f9: a1 04 11 00 00 mov 0x1104,%eax
1fe: 83 f8 02 cmp $0x2,%eax
201: 0f 85 33 01 00 00 jne 33a <uniq+0x1fd>
{
printf(1, "%d %s", count, cur);
207: 8b 45 f0 mov -0x10(%ebp),%eax
20a: 89 44 24 0c mov %eax,0xc(%esp)
20e: 8b 45 ec mov -0x14(%ebp),%eax
211: 89 44 24 08 mov %eax,0x8(%esp)
215: c7 44 24 04 ef 0d 00 movl $0xdef,0x4(%esp)
21c: 00
21d: c7 04 24 01 00 00 00 movl $0x1,(%esp)
224: e8 f5 07 00 00 call a1e <printf>
229: e9 0c 01 00 00 jmp 33a <uniq+0x1fd>
}
} else {
memmove(cur, line, MAX_BUF);
22e: c7 44 24 08 00 04 00 movl $0x400,0x8(%esp)
235: 00
236: 8b 45 e4 mov -0x1c(%ebp),%eax
239: 89 44 24 04 mov %eax,0x4(%esp)
23d: 8b 45 f0 mov -0x10(%ebp),%eax
240: 89 04 24 mov %eax,(%esp)
243: e8 f1 05 00 00 call 839 <memmove>
int cmp_result;
if (optionI) {
248: a1 20 11 00 00 mov 0x1120,%eax
24d: 85 c0 test %eax,%eax
24f: 74 17 je 268 <uniq+0x12b>
cmp_result = caseIgnoreComparison(cur, prev);
251: 8b 45 f4 mov -0xc(%ebp),%eax
254: 89 44 24 04 mov %eax,0x4(%esp)
258: 8b 45 f0 mov -0x10(%ebp),%eax
25b: 89 04 24 mov %eax,(%esp)
25e: e8 4b fe ff ff call ae <caseIgnoreComparison>
263: 89 45 e8 mov %eax,-0x18(%ebp)
266: eb 15 jmp 27d <uniq+0x140>
} else {
cmp_result = strcmp(cur, prev);
268: 8b 45 f4 mov -0xc(%ebp),%eax
26b: 89 44 24 04 mov %eax,0x4(%esp)
26f: 8b 45 f0 mov -0x10(%ebp),%eax
272: 89 04 24 mov %eax,(%esp)
275: e8 f1 03 00 00 call 66b <strcmp>
27a: 89 45 e8 mov %eax,-0x18(%ebp)
}
if (cmp_result == 0)
27d: 83 7d e8 00 cmpl $0x0,-0x18(%ebp)
281: 75 30 jne 2b3 <uniq+0x176>
{
count++;
283: 83 45 ec 01 addl $0x1,-0x14(%ebp)
if (optionI) {
287: a1 20 11 00 00 mov 0x1120,%eax
28c: 85 c0 test %eax,%eax
28e: 0f 84 a6 00 00 00 je 33a <uniq+0x1fd>
memmove(cur, prev, MAX_BUF);
294: c7 44 24 08 00 04 00 movl $0x400,0x8(%esp)
29b: 00
29c: 8b 45 f4 mov -0xc(%ebp),%eax
29f: 89 44 24 04 mov %eax,0x4(%esp)
2a3: 8b 45 f0 mov -0x10(%ebp),%eax
2a6: 89 04 24 mov %eax,(%esp)
2a9: e8 8b 05 00 00 call 839 <memmove>
2ae: e9 87 00 00 00 jmp 33a <uniq+0x1fd>
}
}
else {
if (optionCD == 1)
2b3: a1 04 11 00 00 mov 0x1104,%eax
2b8: 83 f8 01 cmp $0x1,%eax
2bb: 75 1d jne 2da <uniq+0x19d>
{
printf(1, "%s", cur);
2bd: 8b 45 f0 mov -0x10(%ebp),%eax
2c0: 89 44 24 08 mov %eax,0x8(%esp)
2c4: c7 44 24 04 ec 0d 00 movl $0xdec,0x4(%esp)
2cb: 00
2cc: c7 04 24 01 00 00 00 movl $0x1,(%esp)
2d3: e8 46 07 00 00 call a1e <printf>
2d8: eb 59 jmp 333 <uniq+0x1f6>
} else if (optionCD == 3 && count > 1)
2da: a1 04 11 00 00 mov 0x1104,%eax
2df: 83 f8 03 cmp $0x3,%eax
2e2: 75 23 jne 307 <uniq+0x1ca>
2e4: 83 7d ec 01 cmpl $0x1,-0x14(%ebp)
2e8: 7e 1d jle 307 <uniq+0x1ca>
{
printf(1, "%s", prev);
2ea: 8b 45 f4 mov -0xc(%ebp),%eax
2ed: 89 44 24 08 mov %eax,0x8(%esp)
2f1: c7 44 24 04 ec 0d 00 movl $0xdec,0x4(%esp)
2f8: 00
2f9: c7 04 24 01 00 00 00 movl $0x1,(%esp)
300: e8 19 07 00 00 call a1e <printf>
305: eb 2c jmp 333 <uniq+0x1f6>
} else if (optionCD == 2)
307: a1 04 11 00 00 mov 0x1104,%eax
30c: 83 f8 02 cmp $0x2,%eax
30f: 75 22 jne 333 <uniq+0x1f6>
{
printf(1, "%d %s", count, prev);
311: 8b 45 f4 mov -0xc(%ebp),%eax
314: 89 44 24 0c mov %eax,0xc(%esp)
318: 8b 45 ec mov -0x14(%ebp),%eax
31b: 89 44 24 08 mov %eax,0x8(%esp)
31f: c7 44 24 04 ef 0d 00 movl $0xdef,0x4(%esp)
326: 00
327: c7 04 24 01 00 00 00 movl $0x1,(%esp)
32e: e8 eb 06 00 00 call a1e <printf>
}
count = 1;
333: c7 45 ec 01 00 00 00 movl $0x1,-0x14(%ebp)
}
}
memmove(prev, cur, MAX_BUF);
33a: c7 44 24 08 00 04 00 movl $0x400,0x8(%esp)
341: 00
342: 8b 45 f0 mov -0x10(%ebp),%eax
345: 89 44 24 04 mov %eax,0x4(%esp)
349: 8b 45 f4 mov -0xc(%ebp),%eax
34c: 89 04 24 mov %eax,(%esp)
34f: e8 e5 04 00 00 call 839 <memmove>
void uniq(int fd, char *name) {
char *prev = NULL, *cur = NULL;
char *line = (char *) malloc(MAX_BUF * sizeof(char));
int count = 0;
while ((readLine(line, fd)) > 0) {
354: 8b 45 08 mov 0x8(%ebp),%eax
357: 89 44 24 04 mov %eax,0x4(%esp)
35b: 8b 45 e4 mov -0x1c(%ebp),%eax
35e: 89 04 24 mov %eax,(%esp)
361: e8 9a fc ff ff call 0 <readLine>
366: 85 c0 test %eax,%eax
368: 0f 8f fe fd ff ff jg 16c <uniq+0x2f>
count = 1;
}
}
memmove(prev, cur, MAX_BUF);
}
if ((optionCD == 3 && count > 1)) {
36e: a1 04 11 00 00 mov 0x1104,%eax
373: 83 f8 03 cmp $0x3,%eax
376: 75 23 jne 39b <uniq+0x25e>
378: 83 7d ec 01 cmpl $0x1,-0x14(%ebp)
37c: 7e 1d jle 39b <uniq+0x25e>
printf(1, "%s", cur);
37e: 8b 45 f0 mov -0x10(%ebp),%eax
381: 89 44 24 08 mov %eax,0x8(%esp)
385: c7 44 24 04 ec 0d 00 movl $0xdec,0x4(%esp)
38c: 00
38d: c7 04 24 01 00 00 00 movl $0x1,(%esp)
394: e8 85 06 00 00 call a1e <printf>
399: eb 2c jmp 3c7 <uniq+0x28a>
} else if (optionCD == 2) {
39b: a1 04 11 00 00 mov 0x1104,%eax
3a0: 83 f8 02 cmp $0x2,%eax
3a3: 75 22 jne 3c7 <uniq+0x28a>
printf(1, "%d %s", count, cur);
3a5: 8b 45 f0 mov -0x10(%ebp),%eax
3a8: 89 44 24 0c mov %eax,0xc(%esp)
3ac: 8b 45 ec mov -0x14(%ebp),%eax
3af: 89 44 24 08 mov %eax,0x8(%esp)
3b3: c7 44 24 04 ef 0d 00 movl $0xdef,0x4(%esp)
3ba: 00
3bb: c7 04 24 01 00 00 00 movl $0x1,(%esp)
3c2: e8 57 06 00 00 call a1e <printf>
}
free(prev);
3c7: 8b 45 f4 mov -0xc(%ebp),%eax
3ca: 89 04 24 mov %eax,(%esp)
3cd: e8 ff 07 00 00 call bd1 <free>
free(cur);
3d2: 8b 45 f0 mov -0x10(%ebp),%eax
3d5: 89 04 24 mov %eax,(%esp)
3d8: e8 f4 07 00 00 call bd1 <free>
free(line);
3dd: 8b 45 e4 mov -0x1c(%ebp),%eax
3e0: 89 04 24 mov %eax,(%esp)
3e3: e8 e9 07 00 00 call bd1 <free>
}
3e8: c9 leave
3e9: c3 ret
000003ea <readOperators>:
int readOperators(int argc, char *argv[]) {
3ea: 55 push %ebp
3eb: 89 e5 mov %esp,%ebp
3ed: 83 ec 28 sub $0x28,%esp
if (argumentIndex >= argc - 1) {
3f0: 8b 45 08 mov 0x8(%ebp),%eax
3f3: 8d 50 ff lea -0x1(%eax),%edx
3f6: a1 00 11 00 00 mov 0x1100,%eax
3fb: 39 c2 cmp %eax,%edx
3fd: 7f 0a jg 409 <readOperators+0x1f>
return 0;
3ff: b8 00 00 00 00 mov $0x0,%eax
404: e9 81 00 00 00 jmp 48a <readOperators+0xa0>
}
char *options = "cdiCDI";
409: c7 45 f4 f5 0d 00 00 movl $0xdf5,-0xc(%ebp)
char *arg = argv[argumentIndex];
410: a1 00 11 00 00 mov 0x1100,%eax
415: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx
41c: 8b 45 0c mov 0xc(%ebp),%eax
41f: 01 d0 add %edx,%eax
421: 8b 00 mov (%eax),%eax
423: 89 45 f0 mov %eax,-0x10(%ebp)
if (arg[0] != '-' || (strchr(options, arg[1]) == 0)) {
426: 8b 45 f0 mov -0x10(%ebp),%eax
429: 0f b6 00 movzbl (%eax),%eax
42c: 3c 2d cmp $0x2d,%al
42e: 75 1f jne 44f <readOperators+0x65>
430: 8b 45 f0 mov -0x10(%ebp),%eax
433: 83 c0 01 add $0x1,%eax
436: 0f b6 00 movzbl (%eax),%eax
439: 0f be c0 movsbl %al,%eax
43c: 89 44 24 04 mov %eax,0x4(%esp)
440: 8b 45 f4 mov -0xc(%ebp),%eax
443: 89 04 24 mov %eax,(%esp)
446: e8 aa 02 00 00 call 6f5 <strchr>
44b: 85 c0 test %eax,%eax
44d: 75 22 jne 471 <readOperators+0x87>
printf(1, "Not a valid option for UNIQ : %s\n", arg);
44f: 8b 45 f0 mov -0x10(%ebp),%eax
452: 89 44 24 08 mov %eax,0x8(%esp)
456: c7 44 24 04 fc 0d 00 movl $0xdfc,0x4(%esp)
45d: 00
45e: c7 04 24 01 00 00 00 movl $0x1,(%esp)
465: e8 b4 05 00 00 call a1e <printf>
return 0;
46a: b8 00 00 00 00 mov $0x0,%eax
46f: eb 19 jmp 48a <readOperators+0xa0>
} else {
argumentIndex++;
471: a1 00 11 00 00 mov 0x1100,%eax
476: 83 c0 01 add $0x1,%eax
479: a3 00 11 00 00 mov %eax,0x1100
return arg[1];
47e: 8b 45 f0 mov -0x10(%ebp),%eax
481: 83 c0 01 add $0x1,%eax
484: 0f b6 00 movzbl (%eax),%eax
487: 0f be c0 movsbl %al,%eax
}
}
48a: c9 leave
48b: c3 ret
0000048c <main>:
int main(int argc, char *argv[]) {
48c: 55 push %ebp
48d: 89 e5 mov %esp,%ebp
48f: 83 e4 f0 and $0xfffffff0,%esp
492: 83 ec 20 sub $0x20,%esp
int fd;
int c;
if (argc <= 1) {
495: 83 7d 08 01 cmpl $0x1,0x8(%ebp)
499: 7f 19 jg 4b4 <main+0x28>
uniq(0, "");
49b: c7 44 24 04 1e 0e 00 movl $0xe1e,0x4(%esp)
4a2: 00
4a3: c7 04 24 00 00 00 00 movl $0x0,(%esp)
4aa: e8 8e fc ff ff call 13d <uniq>
exit();
4af: e8 ca 03 00 00 call 87e <exit>
} else if (argc == 2) {
4b4: 83 7d 08 02 cmpl $0x2,0x8(%ebp)
4b8: 75 65 jne 51f <main+0x93>
if ((fd = open(argv[1], 0)) < 0) {
4ba: 8b 45 0c mov 0xc(%ebp),%eax
4bd: 83 c0 04 add $0x4,%eax
4c0: 8b 00 mov (%eax),%eax
4c2: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
4c9: 00
4ca: 89 04 24 mov %eax,(%esp)
4cd: e8 ec 03 00 00 call 8be <open>
4d2: 89 44 24 1c mov %eax,0x1c(%esp)
4d6: 83 7c 24 1c 00 cmpl $0x0,0x1c(%esp)
4db: 79 25 jns 502 <main+0x76>
printf(1, "uniq: cannot open %s\n", argv[1]);
4dd: 8b 45 0c mov 0xc(%ebp),%eax
4e0: 83 c0 04 add $0x4,%eax
4e3: 8b 00 mov (%eax),%eax
4e5: 89 44 24 08 mov %eax,0x8(%esp)
4e9: c7 44 24 04 1f 0e 00 movl $0xe1f,0x4(%esp)
4f0: 00
4f1: c7 04 24 01 00 00 00 movl $0x1,(%esp)
4f8: e8 21 05 00 00 call a1e <printf>
exit();
4fd: e8 7c 03 00 00 call 87e <exit>
}
uniq(fd, argv[1]);
502: 8b 45 0c mov 0xc(%ebp),%eax
505: 83 c0 04 add $0x4,%eax
508: 8b 00 mov (%eax),%eax
50a: 89 44 24 04 mov %eax,0x4(%esp)
50e: 8b 44 24 1c mov 0x1c(%esp),%eax
512: 89 04 24 mov %eax,(%esp)
515: e8 23 fc ff ff call 13d <uniq>
exit();
51a: e8 5f 03 00 00 call 87e <exit>
} else if (argc >= 3) {
51f: 83 7d 08 02 cmpl $0x2,0x8(%ebp)
523: 0f 8e e8 00 00 00 jle 611 <main+0x185>
while ((c = readOperators(argc, argv)) > 0) {
529: eb 48 jmp 573 <main+0xe7>
if (c == 'c' || c == 'C')
52b: 83 7c 24 18 63 cmpl $0x63,0x18(%esp)
530: 74 07 je 539 <main+0xad>
532: 83 7c 24 18 43 cmpl $0x43,0x18(%esp)
537: 75 0a jne 543 <main+0xb7>
{
optionCD = 2;
539: c7 05 04 11 00 00 02 movl $0x2,0x1104
540: 00 00 00
}
if (c == 'd' || c == 'D')
543: 83 7c 24 18 64 cmpl $0x64,0x18(%esp)
548: 74 07 je 551 <main+0xc5>
54a: 83 7c 24 18 44 cmpl $0x44,0x18(%esp)
54f: 75 0a jne 55b <main+0xcf>
{
optionCD = 3;
551: c7 05 04 11 00 00 03 movl $0x3,0x1104
558: 00 00 00
}
if (c == 'i' || c == 'I')
55b: 83 7c 24 18 69 cmpl $0x69,0x18(%esp)
560: 74 07 je 569 <main+0xdd>
562: 83 7c 24 18 49 cmpl $0x49,0x18(%esp)
567: 75 0a jne 573 <main+0xe7>
{
optionI = 1;
569: c7 05 20 11 00 00 01 movl $0x1,0x1120
570: 00 00 00
exit();
}
uniq(fd, argv[1]);
exit();
} else if (argc >= 3) {
while ((c = readOperators(argc, argv)) > 0) {
573: 8b 45 0c mov 0xc(%ebp),%eax
576: 89 44 24 04 mov %eax,0x4(%esp)
57a: 8b 45 08 mov 0x8(%ebp),%eax
57d: 89 04 24 mov %eax,(%esp)
580: e8 65 fe ff ff call 3ea <readOperators>
585: 89 44 24 18 mov %eax,0x18(%esp)
589: 83 7c 24 18 00 cmpl $0x0,0x18(%esp)
58e: 7f 9b jg 52b <main+0x9f>
if (c == 'i' || c == 'I')
{
optionI = 1;
}
}
if ((fd = open(argv[argc - 1], 0)) < 0) {
590: 8b 45 08 mov 0x8(%ebp),%eax
593: 05 ff ff ff 3f add $0x3fffffff,%eax
598: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx
59f: 8b 45 0c mov 0xc(%ebp),%eax
5a2: 01 d0 add %edx,%eax
5a4: 8b 00 mov (%eax),%eax
5a6: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
5ad: 00
5ae: 89 04 24 mov %eax,(%esp)
5b1: e8 08 03 00 00 call 8be <open>
5b6: 89 44 24 1c mov %eax,0x1c(%esp)
5ba: 83 7c 24 1c 00 cmpl $0x0,0x1c(%esp)
5bf: 79 25 jns 5e6 <main+0x15a>
printf(1, "uniq: cannot open %s\n", argv[1]);
5c1: 8b 45 0c mov 0xc(%ebp),%eax
5c4: 83 c0 04 add $0x4,%eax
5c7: 8b 00 mov (%eax),%eax
5c9: 89 44 24 08 mov %eax,0x8(%esp)
5cd: c7 44 24 04 1f 0e 00 movl $0xe1f,0x4(%esp)
5d4: 00
5d5: c7 04 24 01 00 00 00 movl $0x1,(%esp)
5dc: e8 3d 04 00 00 call a1e <printf>
exit();
5e1: e8 98 02 00 00 call 87e <exit>
}
uniq(fd, argv[argc - 1]);
5e6: 8b 45 08 mov 0x8(%ebp),%eax
5e9: 05 ff ff ff 3f add $0x3fffffff,%eax
5ee: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx
5f5: 8b 45 0c mov 0xc(%ebp),%eax
5f8: 01 d0 add %edx,%eax
5fa: 8b 00 mov (%eax),%eax
5fc: 89 44 24 04 mov %eax,0x4(%esp)
600: 8b 44 24 1c mov 0x1c(%esp),%eax
604: 89 04 24 mov %eax,(%esp)
607: e8 31 fb ff ff call 13d <uniq>
exit();
60c: e8 6d 02 00 00 call 87e <exit>
}
exit();
611: e8 68 02 00 00 call 87e <exit>
00000616 <stosb>:
"cc");
}
static inline void
stosb(void *addr, int data, int cnt)
{
616: 55 push %ebp
617: 89 e5 mov %esp,%ebp
619: 57 push %edi
61a: 53 push %ebx
asm volatile("cld; rep stosb" :
61b: 8b 4d 08 mov 0x8(%ebp),%ecx
61e: 8b 55 10 mov 0x10(%ebp),%edx
621: 8b 45 0c mov 0xc(%ebp),%eax
624: 89 cb mov %ecx,%ebx
626: 89 df mov %ebx,%edi
628: 89 d1 mov %edx,%ecx
62a: fc cld
62b: f3 aa rep stos %al,%es:(%edi)
62d: 89 ca mov %ecx,%edx
62f: 89 fb mov %edi,%ebx
631: 89 5d 08 mov %ebx,0x8(%ebp)
634: 89 55 10 mov %edx,0x10(%ebp)
"=D" (addr), "=c" (cnt) :
"0" (addr), "1" (cnt), "a" (data) :
"memory", "cc");
}
637: 5b pop %ebx
638: 5f pop %edi
639: 5d pop %ebp
63a: c3 ret
0000063b <strcpy>:
#include "user.h"
#include "x86.h"
char*
strcpy(char *s, char *t)
{
63b: 55 push %ebp
63c: 89 e5 mov %esp,%ebp
63e: 83 ec 10 sub $0x10,%esp
char *os;
os = s;
641: 8b 45 08 mov 0x8(%ebp),%eax
644: 89 45 fc mov %eax,-0x4(%ebp)
while((*s++ = *t++) != 0)
647: 90 nop
648: 8b 45 08 mov 0x8(%ebp),%eax
64b: 8d 50 01 lea 0x1(%eax),%edx
64e: 89 55 08 mov %edx,0x8(%ebp)
651: 8b 55 0c mov 0xc(%ebp),%edx
654: 8d 4a 01 lea 0x1(%edx),%ecx
657: 89 4d 0c mov %ecx,0xc(%ebp)
65a: 0f b6 12 movzbl (%edx),%edx
65d: 88 10 mov %dl,(%eax)
65f: 0f b6 00 movzbl (%eax),%eax
662: 84 c0 test %al,%al
664: 75 e2 jne 648 <strcpy+0xd>
;
return os;
666: 8b 45 fc mov -0x4(%ebp),%eax
}
669: c9 leave
66a: c3 ret
0000066b <strcmp>:
int
strcmp(const char *p, const char *q)
{
66b: 55 push %ebp
66c: 89 e5 mov %esp,%ebp
while(*p && *p == *q)
66e: eb 08 jmp 678 <strcmp+0xd>
p++, q++;
670: 83 45 08 01 addl $0x1,0x8(%ebp)
674: 83 45 0c 01 addl $0x1,0xc(%ebp)
}
int
strcmp(const char *p, const char *q)
{
while(*p && *p == *q)
678: 8b 45 08 mov 0x8(%ebp),%eax
67b: 0f b6 00 movzbl (%eax),%eax
67e: 84 c0 test %al,%al
680: 74 10 je 692 <strcmp+0x27>
682: 8b 45 08 mov 0x8(%ebp),%eax
685: 0f b6 10 movzbl (%eax),%edx
688: 8b 45 0c mov 0xc(%ebp),%eax
68b: 0f b6 00 movzbl (%eax),%eax
68e: 38 c2 cmp %al,%dl
690: 74 de je 670 <strcmp+0x5>
p++, q++;
return (uchar)*p - (uchar)*q;
692: 8b 45 08 mov 0x8(%ebp),%eax
695: 0f b6 00 movzbl (%eax),%eax
698: 0f b6 d0 movzbl %al,%edx
69b: 8b 45 0c mov 0xc(%ebp),%eax
69e: 0f b6 00 movzbl (%eax),%eax
6a1: 0f b6 c0 movzbl %al,%eax
6a4: 29 c2 sub %eax,%edx
6a6: 89 d0 mov %edx,%eax
}
6a8: 5d pop %ebp
6a9: c3 ret
000006aa <strlen>:
uint
strlen(char *s)
{
6aa: 55 push %ebp
6ab: 89 e5 mov %esp,%ebp
6ad: 83 ec 10 sub $0x10,%esp
int n;
for(n = 0; s[n]; n++)
6b0: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp)
6b7: eb 04 jmp 6bd <strlen+0x13>
6b9: 83 45 fc 01 addl $0x1,-0x4(%ebp)
6bd: 8b 55 fc mov -0x4(%ebp),%edx
6c0: 8b 45 08 mov 0x8(%ebp),%eax
6c3: 01 d0 add %edx,%eax
6c5: 0f b6 00 movzbl (%eax),%eax
6c8: 84 c0 test %al,%al
6ca: 75 ed jne 6b9 <strlen+0xf>
;
return n;
6cc: 8b 45 fc mov -0x4(%ebp),%eax
}
6cf: c9 leave
6d0: c3 ret
000006d1 <memset>:
void*
memset(void *dst, int c, uint n)
{
6d1: 55 push %ebp
6d2: 89 e5 mov %esp,%ebp
6d4: 83 ec 0c sub $0xc,%esp
stosb(dst, c, n);
6d7: 8b 45 10 mov 0x10(%ebp),%eax
6da: 89 44 24 08 mov %eax,0x8(%esp)
6de: 8b 45 0c mov 0xc(%ebp),%eax
6e1: 89 44 24 04 mov %eax,0x4(%esp)
6e5: 8b 45 08 mov 0x8(%ebp),%eax
6e8: 89 04 24 mov %eax,(%esp)
6eb: e8 26 ff ff ff call 616 <stosb>
return dst;
6f0: 8b 45 08 mov 0x8(%ebp),%eax
}
6f3: c9 leave
6f4: c3 ret
000006f5 <strchr>:
char*
strchr(const char *s, char c)
{
6f5: 55 push %ebp
6f6: 89 e5 mov %esp,%ebp
6f8: 83 ec 04 sub $0x4,%esp
6fb: 8b 45 0c mov 0xc(%ebp),%eax
6fe: 88 45 fc mov %al,-0x4(%ebp)
for(; *s; s++)
701: eb 14 jmp 717 <strchr+0x22>
if(*s == c)
703: 8b 45 08 mov 0x8(%ebp),%eax
706: 0f b6 00 movzbl (%eax),%eax
709: 3a 45 fc cmp -0x4(%ebp),%al
70c: 75 05 jne 713 <strchr+0x1e>
return (char*)s;
70e: 8b 45 08 mov 0x8(%ebp),%eax
711: eb 13 jmp 726 <strchr+0x31>
}
char*
strchr(const char *s, char c)
{
for(; *s; s++)
713: 83 45 08 01 addl $0x1,0x8(%ebp)
717: 8b 45 08 mov 0x8(%ebp),%eax
71a: 0f b6 00 movzbl (%eax),%eax
71d: 84 c0 test %al,%al
71f: 75 e2 jne 703 <strchr+0xe>
if(*s == c)
return (char*)s;
return 0;
721: b8 00 00 00 00 mov $0x0,%eax
}
726: c9 leave
727: c3 ret
00000728 <gets>:
char*
gets(char *buf, int max)
{
728: 55 push %ebp
729: 89 e5 mov %esp,%ebp
72b: 83 ec 28 sub $0x28,%esp
int i, cc;
char c;
for(i=0; i+1 < max; ){
72e: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
735: eb 4c jmp 783 <gets+0x5b>
cc = read(0, &c, 1);
737: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
73e: 00
73f: 8d 45 ef lea -0x11(%ebp),%eax
742: 89 44 24 04 mov %eax,0x4(%esp)
746: c7 04 24 00 00 00 00 movl $0x0,(%esp)
74d: e8 44 01 00 00 call 896 <read>
752: 89 45 f0 mov %eax,-0x10(%ebp)
if(cc < 1)
755: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
759: 7f 02 jg 75d <gets+0x35>
break;
75b: eb 31 jmp 78e <gets+0x66>
buf[i++] = c;
75d: 8b 45 f4 mov -0xc(%ebp),%eax
760: 8d 50 01 lea 0x1(%eax),%edx
763: 89 55 f4 mov %edx,-0xc(%ebp)
766: 89 c2 mov %eax,%edx
768: 8b 45 08 mov 0x8(%ebp),%eax
76b: 01 c2 add %eax,%edx
76d: 0f b6 45 ef movzbl -0x11(%ebp),%eax
771: 88 02 mov %al,(%edx)
if(c == '\n' || c == '\r')
773: 0f b6 45 ef movzbl -0x11(%ebp),%eax
777: 3c 0a cmp $0xa,%al
779: 74 13 je 78e <gets+0x66>
77b: 0f b6 45 ef movzbl -0x11(%ebp),%eax
77f: 3c 0d cmp $0xd,%al
781: 74 0b je 78e <gets+0x66>
gets(char *buf, int max)
{
int i, cc;
char c;
for(i=0; i+1 < max; ){
783: 8b 45 f4 mov -0xc(%ebp),%eax
786: 83 c0 01 add $0x1,%eax
789: 3b 45 0c cmp 0xc(%ebp),%eax
78c: 7c a9 jl 737 <gets+0xf>
break;
buf[i++] = c;
if(c == '\n' || c == '\r')
break;
}
buf[i] = '\0';
78e: 8b 55 f4 mov -0xc(%ebp),%edx
791: 8b 45 08 mov 0x8(%ebp),%eax
794: 01 d0 add %edx,%eax
796: c6 00 00 movb $0x0,(%eax)
return buf;
799: 8b 45 08 mov 0x8(%ebp),%eax
}
79c: c9 leave
79d: c3 ret
0000079e <stat>:
int
stat(char *n, struct stat *st)
{
79e: 55 push %ebp
79f: 89 e5 mov %esp,%ebp
7a1: 83 ec 28 sub $0x28,%esp
int fd;
int r;
fd = open(n, O_RDONLY);
7a4: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
7ab: 00
7ac: 8b 45 08 mov 0x8(%ebp),%eax
7af: 89 04 24 mov %eax,(%esp)
7b2: e8 07 01 00 00 call 8be <open>
7b7: 89 45 f4 mov %eax,-0xc(%ebp)
if(fd < 0)
7ba: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
7be: 79 07 jns 7c7 <stat+0x29>
return -1;
7c0: b8 ff ff ff ff mov $0xffffffff,%eax
7c5: eb 23 jmp 7ea <stat+0x4c>
r = fstat(fd, st);
7c7: 8b 45 0c mov 0xc(%ebp),%eax
7ca: 89 44 24 04 mov %eax,0x4(%esp)
7ce: 8b 45 f4 mov -0xc(%ebp),%eax
7d1: 89 04 24 mov %eax,(%esp)
7d4: e8 fd 00 00 00 call 8d6 <fstat>
7d9: 89 45 f0 mov %eax,-0x10(%ebp)
close(fd);
7dc: 8b 45 f4 mov -0xc(%ebp),%eax
7df: 89 04 24 mov %eax,(%esp)
7e2: e8 bf 00 00 00 call 8a6 <close>
return r;
7e7: 8b 45 f0 mov -0x10(%ebp),%eax
}
7ea: c9 leave
7eb: c3 ret
000007ec <atoi>:
int
atoi(const char *s)
{
7ec: 55 push %ebp
7ed: 89 e5 mov %esp,%ebp
7ef: 83 ec 10 sub $0x10,%esp
int n;
n = 0;
7f2: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp)
while('0' <= *s && *s <= '9')
7f9: eb 25 jmp 820 <atoi+0x34>
n = n*10 + *s++ - '0';
7fb: 8b 55 fc mov -0x4(%ebp),%edx
7fe: 89 d0 mov %edx,%eax
800: c1 e0 02 shl $0x2,%eax
803: 01 d0 add %edx,%eax
805: 01 c0 add %eax,%eax
807: 89 c1 mov %eax,%ecx
809: 8b 45 08 mov 0x8(%ebp),%eax
80c: 8d 50 01 lea 0x1(%eax),%edx
80f: 89 55 08 mov %edx,0x8(%ebp)
812: 0f b6 00 movzbl (%eax),%eax
815: 0f be c0 movsbl %al,%eax
818: 01 c8 add %ecx,%eax
81a: 83 e8 30 sub $0x30,%eax
81d: 89 45 fc mov %eax,-0x4(%ebp)
atoi(const char *s)
{
int n;
n = 0;
while('0' <= *s && *s <= '9')
820: 8b 45 08 mov 0x8(%ebp),%eax
823: 0f b6 00 movzbl (%eax),%eax
826: 3c 2f cmp $0x2f,%al
828: 7e 0a jle 834 <atoi+0x48>
82a: 8b 45 08 mov 0x8(%ebp),%eax
82d: 0f b6 00 movzbl (%eax),%eax
830: 3c 39 cmp $0x39,%al
832: 7e c7 jle 7fb <atoi+0xf>
n = n*10 + *s++ - '0';
return n;
834: 8b 45 fc mov -0x4(%ebp),%eax
}
837: c9 leave
838: c3 ret
00000839 <memmove>:
void*
memmove(void *vdst, void *vsrc, int n)
{
839: 55 push %ebp
83a: 89 e5 mov %esp,%ebp
83c: 83 ec 10 sub $0x10,%esp
char *dst, *src;
dst = vdst;
83f: 8b 45 08 mov 0x8(%ebp),%eax
842: 89 45 fc mov %eax,-0x4(%ebp)
src = vsrc;
845: 8b 45 0c mov 0xc(%ebp),%eax
848: 89 45 f8 mov %eax,-0x8(%ebp)
while(n-- > 0)
84b: eb 17 jmp 864 <memmove+0x2b>
*dst++ = *src++;
84d: 8b 45 fc mov -0x4(%ebp),%eax
850: 8d 50 01 lea 0x1(%eax),%edx
853: 89 55 fc mov %edx,-0x4(%ebp)
856: 8b 55 f8 mov -0x8(%ebp),%edx
859: 8d 4a 01 lea 0x1(%edx),%ecx
85c: 89 4d f8 mov %ecx,-0x8(%ebp)
85f: 0f b6 12 movzbl (%edx),%edx
862: 88 10 mov %dl,(%eax)
{
char *dst, *src;
dst = vdst;
src = vsrc;
while(n-- > 0)
864: 8b 45 10 mov 0x10(%ebp),%eax
867: 8d 50 ff lea -0x1(%eax),%edx
86a: 89 55 10 mov %edx,0x10(%ebp)
86d: 85 c0 test %eax,%eax
86f: 7f dc jg 84d <memmove+0x14>
*dst++ = *src++;
return vdst;
871: 8b 45 08 mov 0x8(%ebp),%eax
}
874: c9 leave
875: c3 ret
00000876 <fork>:
name: \
movl $SYS_ ## name, %eax; \
int $T_SYSCALL; \
ret
SYSCALL(fork)
876: b8 01 00 00 00 mov $0x1,%eax
87b: cd 40 int $0x40
87d: c3 ret
0000087e <exit>:
SYSCALL(exit)
87e: b8 02 00 00 00 mov $0x2,%eax
883: cd 40 int $0x40
885: c3 ret
00000886 <wait>:
SYSCALL(wait)
886: b8 03 00 00 00 mov $0x3,%eax
88b: cd 40 int $0x40
88d: c3 ret
0000088e <pipe>:
SYSCALL(pipe)
88e: b8 04 00 00 00 mov $0x4,%eax
893: cd 40 int $0x40
895: c3 ret
00000896 <read>:
SYSCALL(read)
896: b8 05 00 00 00 mov $0x5,%eax
89b: cd 40 int $0x40
89d: c3 ret
0000089e <write>:
SYSCALL(write)
89e: b8 10 00 00 00 mov $0x10,%eax
8a3: cd 40 int $0x40
8a5: c3 ret
000008a6 <close>:
SYSCALL(close)
8a6: b8 15 00 00 00 mov $0x15,%eax
8ab: cd 40 int $0x40
8ad: c3 ret
000008ae <kill>:
SYSCALL(kill)
8ae: b8 06 00 00 00 mov $0x6,%eax
8b3: cd 40 int $0x40
8b5: c3 ret
000008b6 <exec>:
SYSCALL(exec)
8b6: b8 07 00 00 00 mov $0x7,%eax
8bb: cd 40 int $0x40
8bd: c3 ret
000008be <open>:
SYSCALL(open)
8be: b8 0f 00 00 00 mov $0xf,%eax
8c3: cd 40 int $0x40
8c5: c3 ret
000008c6 <mknod>:
SYSCALL(mknod)
8c6: b8 11 00 00 00 mov $0x11,%eax
8cb: cd 40 int $0x40
8cd: c3 ret
000008ce <unlink>:
SYSCALL(unlink)
8ce: b8 12 00 00 00 mov $0x12,%eax
8d3: cd 40 int $0x40
8d5: c3 ret
000008d6 <fstat>:
SYSCALL(fstat)
8d6: b8 08 00 00 00 mov $0x8,%eax
8db: cd 40 int $0x40
8dd: c3 ret
000008de <link>:
SYSCALL(link)
8de: b8 13 00 00 00 mov $0x13,%eax
8e3: cd 40 int $0x40
8e5: c3 ret
000008e6 <mkdir>:
SYSCALL(mkdir)
8e6: b8 14 00 00 00 mov $0x14,%eax
8eb: cd 40 int $0x40
8ed: c3 ret
000008ee <chdir>:
SYSCALL(chdir)
8ee: b8 09 00 00 00 mov $0x9,%eax
8f3: cd 40 int $0x40
8f5: c3 ret
000008f6 <dup>:
SYSCALL(dup)
8f6: b8 0a 00 00 00 mov $0xa,%eax
8fb: cd 40 int $0x40
8fd: c3 ret
000008fe <getpid>:
SYSCALL(getpid)
8fe: b8 0b 00 00 00 mov $0xb,%eax
903: cd 40 int $0x40
905: c3 ret
00000906 <sbrk>:
SYSCALL(sbrk)
906: b8 0c 00 00 00 mov $0xc,%eax
90b: cd 40 int $0x40
90d: c3 ret
0000090e <sleep>:
SYSCALL(sleep)
90e: b8 0d 00 00 00 mov $0xd,%eax
913: cd 40 int $0x40
915: c3 ret
00000916 <uptime>:
SYSCALL(uptime)
916: b8 0e 00 00 00 mov $0xe,%eax
91b: cd 40 int $0x40
91d: c3 ret
0000091e <changepriority>:
SYSCALL(changepriority)
91e: b8 16 00 00 00 mov $0x16,%eax
923: cd 40 int $0x40
925: c3 ret
00000926 <processstatus>:
SYSCALL(processstatus)
926: b8 17 00 00 00 mov $0x17,%eax
92b: cd 40 int $0x40
92d: c3 ret
0000092e <randomgen>:
SYSCALL(randomgen)
92e: b8 18 00 00 00 mov $0x18,%eax
933: cd 40 int $0x40
935: c3 ret
00000936 <randomgenrange>:
SYSCALL(randomgenrange)
936: b8 19 00 00 00 mov $0x19,%eax
93b: cd 40 int $0x40
93d: c3 ret
0000093e <putc>:
#include "stat.h"
#include "user.h"
static void
putc(int fd, char c)
{
93e: 55 push %ebp
93f: 89 e5 mov %esp,%ebp
941: 83 ec 18 sub $0x18,%esp
944: 8b 45 0c mov 0xc(%ebp),%eax
947: 88 45 f4 mov %al,-0xc(%ebp)
write(fd, &c, 1);
94a: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
951: 00
952: 8d 45 f4 lea -0xc(%ebp),%eax
955: 89 44 24 04 mov %eax,0x4(%esp)
959: 8b 45 08 mov 0x8(%ebp),%eax
95c: 89 04 24 mov %eax,(%esp)
95f: e8 3a ff ff ff call 89e <write>
}
964: c9 leave
965: c3 ret
00000966 <printint>:
static void
printint(int fd, int xx, int base, int sgn)
{
966: 55 push %ebp
967: 89 e5 mov %esp,%ebp
969: 56 push %esi
96a: 53 push %ebx
96b: 83 ec 30 sub $0x30,%esp
static char digits[] = "0123456789ABCDEF";
char buf[16];
int i, neg;
uint x;
neg = 0;
96e: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
if(sgn && xx < 0){
975: 83 7d 14 00 cmpl $0x0,0x14(%ebp)
979: 74 17 je 992 <printint+0x2c>
97b: 83 7d 0c 00 cmpl $0x0,0xc(%ebp)
97f: 79 11 jns 992 <printint+0x2c>
neg = 1;
981: c7 45 f0 01 00 00 00 movl $0x1,-0x10(%ebp)
x = -xx;
988: 8b 45 0c mov 0xc(%ebp),%eax
98b: f7 d8 neg %eax
98d: 89 45 ec mov %eax,-0x14(%ebp)
990: eb 06 jmp 998 <printint+0x32>
} else {
x = xx;
992: 8b 45 0c mov 0xc(%ebp),%eax
995: 89 45 ec mov %eax,-0x14(%ebp)
}
i = 0;
998: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
do{
buf[i++] = digits[x % base];
99f: 8b 4d f4 mov -0xc(%ebp),%ecx
9a2: 8d 41 01 lea 0x1(%ecx),%eax
9a5: 89 45 f4 mov %eax,-0xc(%ebp)
9a8: 8b 5d 10 mov 0x10(%ebp),%ebx
9ab: 8b 45 ec mov -0x14(%ebp),%eax
9ae: ba 00 00 00 00 mov $0x0,%edx
9b3: f7 f3 div %ebx
9b5: 89 d0 mov %edx,%eax
9b7: 0f b6 80 08 11 00 00 movzbl 0x1108(%eax),%eax
9be: 88 44 0d dc mov %al,-0x24(%ebp,%ecx,1)
}while((x /= base) != 0);
9c2: 8b 75 10 mov 0x10(%ebp),%esi
9c5: 8b 45 ec mov -0x14(%ebp),%eax
9c8: ba 00 00 00 00 mov $0x0,%edx
9cd: f7 f6 div %esi
9cf: 89 45 ec mov %eax,-0x14(%ebp)
9d2: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
9d6: 75 c7 jne 99f <printint+0x39>
if(neg)
9d8: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
9dc: 74 10 je 9ee <printint+0x88>
buf[i++] = '-';
9de: 8b 45 f4 mov -0xc(%ebp),%eax
9e1: 8d 50 01 lea 0x1(%eax),%edx
9e4: 89 55 f4 mov %edx,-0xc(%ebp)
9e7: c6 44 05 dc 2d movb $0x2d,-0x24(%ebp,%eax,1)
while(--i >= 0)
9ec: eb 1f jmp a0d <printint+0xa7>
9ee: eb 1d jmp a0d <printint+0xa7>
putc(fd, buf[i]);
9f0: 8d 55 dc lea -0x24(%ebp),%edx
9f3: 8b 45 f4 mov -0xc(%ebp),%eax
9f6: 01 d0 add %edx,%eax
9f8: 0f b6 00 movzbl (%eax),%eax
9fb: 0f be c0 movsbl %al,%eax
9fe: 89 44 24 04 mov %eax,0x4(%esp)
a02: 8b 45 08 mov 0x8(%ebp),%eax
a05: 89 04 24 mov %eax,(%esp)
a08: e8 31 ff ff ff call 93e <putc>
buf[i++] = digits[x % base];
}while((x /= base) != 0);
if(neg)
buf[i++] = '-';
while(--i >= 0)
a0d: 83 6d f4 01 subl $0x1,-0xc(%ebp)
a11: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
a15: 79 d9 jns 9f0 <printint+0x8a>
putc(fd, buf[i]);
}
a17: 83 c4 30 add $0x30,%esp
a1a: 5b pop %ebx
a1b: 5e pop %esi
a1c: 5d pop %ebp
a1d: c3 ret
00000a1e <printf>:
// Print to the given fd. Only understands %d, %x, %p, %s.
void
printf(int fd, char *fmt, ...)
{
a1e: 55 push %ebp
a1f: 89 e5 mov %esp,%ebp
a21: 83 ec 38 sub $0x38,%esp
char *s;
int c, i, state;
uint *ap;
state = 0;
a24: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp)
ap = (uint*)(void*)&fmt + 1;
a2b: 8d 45 0c lea 0xc(%ebp),%eax
a2e: 83 c0 04 add $0x4,%eax
a31: 89 45 e8 mov %eax,-0x18(%ebp)
for(i = 0; fmt[i]; i++){
a34: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
a3b: e9 7c 01 00 00 jmp bbc <printf+0x19e>
c = fmt[i] & 0xff;
a40: 8b 55 0c mov 0xc(%ebp),%edx
a43: 8b 45 f0 mov -0x10(%ebp),%eax
a46: 01 d0 add %edx,%eax
a48: 0f b6 00 movzbl (%eax),%eax
a4b: 0f be c0 movsbl %al,%eax
a4e: 25 ff 00 00 00 and $0xff,%eax
a53: 89 45 e4 mov %eax,-0x1c(%ebp)
if(state == 0){
a56: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
a5a: 75 2c jne a88 <printf+0x6a>
if(c == '%'){
a5c: 83 7d e4 25 cmpl $0x25,-0x1c(%ebp)
a60: 75 0c jne a6e <printf+0x50>
state = '%';
a62: c7 45 ec 25 00 00 00 movl $0x25,-0x14(%ebp)
a69: e9 4a 01 00 00 jmp bb8 <printf+0x19a>
} else {
putc(fd, c);
a6e: 8b 45 e4 mov -0x1c(%ebp),%eax
a71: 0f be c0 movsbl %al,%eax
a74: 89 44 24 04 mov %eax,0x4(%esp)
a78: 8b 45 08 mov 0x8(%ebp),%eax
a7b: 89 04 24 mov %eax,(%esp)
a7e: e8 bb fe ff ff call 93e <putc>
a83: e9 30 01 00 00 jmp bb8 <printf+0x19a>
}
} else if(state == '%'){
a88: 83 7d ec 25 cmpl $0x25,-0x14(%ebp)
a8c: 0f 85 26 01 00 00 jne bb8 <printf+0x19a>
if(c == 'd'){
a92: 83 7d e4 64 cmpl $0x64,-0x1c(%ebp)
a96: 75 2d jne ac5 <printf+0xa7>
printint(fd, *ap, 10, 1);
a98: 8b 45 e8 mov -0x18(%ebp),%eax
a9b: 8b 00 mov (%eax),%eax
a9d: c7 44 24 0c 01 00 00 movl $0x1,0xc(%esp)
aa4: 00
aa5: c7 44 24 08 0a 00 00 movl $0xa,0x8(%esp)
aac: 00
aad: 89 44 24 04 mov %eax,0x4(%esp)
ab1: 8b 45 08 mov 0x8(%ebp),%eax
ab4: 89 04 24 mov %eax,(%esp)
ab7: e8 aa fe ff ff call 966 <printint>
ap++;
abc: 83 45 e8 04 addl $0x4,-0x18(%ebp)
ac0: e9 ec 00 00 00 jmp bb1 <printf+0x193>
} else if(c == 'x' || c == 'p'){
ac5: 83 7d e4 78 cmpl $0x78,-0x1c(%ebp)
ac9: 74 06 je ad1 <printf+0xb3>
acb: 83 7d e4 70 cmpl $0x70,-0x1c(%ebp)
acf: 75 2d jne afe <printf+0xe0>
printint(fd, *ap, 16, 0);
ad1: 8b 45 e8 mov -0x18(%ebp),%eax
ad4: 8b 00 mov (%eax),%eax
ad6: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
add: 00
ade: c7 44 24 08 10 00 00 movl $0x10,0x8(%esp)
ae5: 00
ae6: 89 44 24 04 mov %eax,0x4(%esp)
aea: 8b 45 08 mov 0x8(%ebp),%eax
aed: 89 04 24 mov %eax,(%esp)
af0: e8 71 fe ff ff call 966 <printint>
ap++;
af5: 83 45 e8 04 addl $0x4,-0x18(%ebp)
af9: e9 b3 00 00 00 jmp bb1 <printf+0x193>
} else if(c == 's'){
afe: 83 7d e4 73 cmpl $0x73,-0x1c(%ebp)
b02: 75 45 jne b49 <printf+0x12b>
s = (char*)*ap;
b04: 8b 45 e8 mov -0x18(%ebp),%eax
b07: 8b 00 mov (%eax),%eax
b09: 89 45 f4 mov %eax,-0xc(%ebp)
ap++;
b0c: 83 45 e8 04 addl $0x4,-0x18(%ebp)
if(s == 0)
b10: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
b14: 75 09 jne b1f <printf+0x101>
s = "(null)";
b16: c7 45 f4 35 0e 00 00 movl $0xe35,-0xc(%ebp)
while(*s != 0){
b1d: eb 1e jmp b3d <printf+0x11f>
b1f: eb 1c jmp b3d <printf+0x11f>
putc(fd, *s);
b21: 8b 45 f4 mov -0xc(%ebp),%eax
b24: 0f b6 00 movzbl (%eax),%eax
b27: 0f be c0 movsbl %al,%eax
b2a: 89 44 24 04 mov %eax,0x4(%esp)
b2e: 8b 45 08 mov 0x8(%ebp),%eax
b31: 89 04 24 mov %eax,(%esp)
b34: e8 05 fe ff ff call 93e <putc>
s++;
b39: 83 45 f4 01 addl $0x1,-0xc(%ebp)
} else if(c == 's'){
s = (char*)*ap;
ap++;
if(s == 0)
s = "(null)";
while(*s != 0){
b3d: 8b 45 f4 mov -0xc(%ebp),%eax
b40: 0f b6 00 movzbl (%eax),%eax
b43: 84 c0 test %al,%al
b45: 75 da jne b21 <printf+0x103>
b47: eb 68 jmp bb1 <printf+0x193>
putc(fd, *s);
s++;
}
} else if(c == 'c'){
b49: 83 7d e4 63 cmpl $0x63,-0x1c(%ebp)
b4d: 75 1d jne b6c <printf+0x14e>
putc(fd, *ap);
b4f: 8b 45 e8 mov -0x18(%ebp),%eax
b52: 8b 00 mov (%eax),%eax
b54: 0f be c0 movsbl %al,%eax
b57: 89 44 24 04 mov %eax,0x4(%esp)
b5b: 8b 45 08 mov 0x8(%ebp),%eax
b5e: 89 04 24 mov %eax,(%esp)
b61: e8 d8 fd ff ff call 93e <putc>
ap++;
b66: 83 45 e8 04 addl $0x4,-0x18(%ebp)
b6a: eb 45 jmp bb1 <printf+0x193>
} else if(c == '%'){
b6c: 83 7d e4 25 cmpl $0x25,-0x1c(%ebp)
b70: 75 17 jne b89 <printf+0x16b>
putc(fd, c);
b72: 8b 45 e4 mov -0x1c(%ebp),%eax
b75: 0f be c0 movsbl %al,%eax
b78: 89 44 24 04 mov %eax,0x4(%esp)
b7c: 8b 45 08 mov 0x8(%ebp),%eax
b7f: 89 04 24 mov %eax,(%esp)
b82: e8 b7 fd ff ff call 93e <putc>
b87: eb 28 jmp bb1 <printf+0x193>
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
b89: c7 44 24 04 25 00 00 movl $0x25,0x4(%esp)
b90: 00
b91: 8b 45 08 mov 0x8(%ebp),%eax
b94: 89 04 24 mov %eax,(%esp)
b97: e8 a2 fd ff ff call 93e <putc>
putc(fd, c);
b9c: 8b 45 e4 mov -0x1c(%ebp),%eax
b9f: 0f be c0 movsbl %al,%eax
ba2: 89 44 24 04 mov %eax,0x4(%esp)
ba6: 8b 45 08 mov 0x8(%ebp),%eax
ba9: 89 04 24 mov %eax,(%esp)
bac: e8 8d fd ff ff call 93e <putc>
}
state = 0;
bb1: 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++){
bb8: 83 45 f0 01 addl $0x1,-0x10(%ebp)
bbc: 8b 55 0c mov 0xc(%ebp),%edx
bbf: 8b 45 f0 mov -0x10(%ebp),%eax
bc2: 01 d0 add %edx,%eax
bc4: 0f b6 00 movzbl (%eax),%eax
bc7: 84 c0 test %al,%al
bc9: 0f 85 71 fe ff ff jne a40 <printf+0x22>
putc(fd, c);
}
state = 0;
}
}
}
bcf: c9 leave
bd0: c3 ret
00000bd1 <free>:
static Header base;
static Header *freep;
void
free(void *ap)
{
bd1: 55 push %ebp
bd2: 89 e5 mov %esp,%ebp
bd4: 83 ec 10 sub $0x10,%esp
Header *bp, *p;
bp = (Header*)ap - 1;
bd7: 8b 45 08 mov 0x8(%ebp),%eax
bda: 83 e8 08 sub $0x8,%eax
bdd: 89 45 f8 mov %eax,-0x8(%ebp)
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
be0: a1 2c 11 00 00 mov 0x112c,%eax
be5: 89 45 fc mov %eax,-0x4(%ebp)
be8: eb 24 jmp c0e <free+0x3d>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
bea: 8b 45 fc mov -0x4(%ebp),%eax
bed: 8b 00 mov (%eax),%eax
bef: 3b 45 fc cmp -0x4(%ebp),%eax
bf2: 77 12 ja c06 <free+0x35>
bf4: 8b 45 f8 mov -0x8(%ebp),%eax
bf7: 3b 45 fc cmp -0x4(%ebp),%eax
bfa: 77 24 ja c20 <free+0x4f>
bfc: 8b 45 fc mov -0x4(%ebp),%eax
bff: 8b 00 mov (%eax),%eax
c01: 3b 45 f8 cmp -0x8(%ebp),%eax
c04: 77 1a ja c20 <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)
c06: 8b 45 fc mov -0x4(%ebp),%eax
c09: 8b 00 mov (%eax),%eax
c0b: 89 45 fc mov %eax,-0x4(%ebp)
c0e: 8b 45 f8 mov -0x8(%ebp),%eax
c11: 3b 45 fc cmp -0x4(%ebp),%eax
c14: 76 d4 jbe bea <free+0x19>
c16: 8b 45 fc mov -0x4(%ebp),%eax
c19: 8b 00 mov (%eax),%eax
c1b: 3b 45 f8 cmp -0x8(%ebp),%eax
c1e: 76 ca jbe bea <free+0x19>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
break;
if(bp + bp->s.size == p->s.ptr){
c20: 8b 45 f8 mov -0x8(%ebp),%eax
c23: 8b 40 04 mov 0x4(%eax),%eax
c26: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx
c2d: 8b 45 f8 mov -0x8(%ebp),%eax
c30: 01 c2 add %eax,%edx
c32: 8b 45 fc mov -0x4(%ebp),%eax
c35: 8b 00 mov (%eax),%eax
c37: 39 c2 cmp %eax,%edx
c39: 75 24 jne c5f <free+0x8e>
bp->s.size += p->s.ptr->s.size;
c3b: 8b 45 f8 mov -0x8(%ebp),%eax
c3e: 8b 50 04 mov 0x4(%eax),%edx
c41: 8b 45 fc mov -0x4(%ebp),%eax
c44: 8b 00 mov (%eax),%eax
c46: 8b 40 04 mov 0x4(%eax),%eax
c49: 01 c2 add %eax,%edx
c4b: 8b 45 f8 mov -0x8(%ebp),%eax
c4e: 89 50 04 mov %edx,0x4(%eax)
bp->s.ptr = p->s.ptr->s.ptr;
c51: 8b 45 fc mov -0x4(%ebp),%eax
c54: 8b 00 mov (%eax),%eax
c56: 8b 10 mov (%eax),%edx
c58: 8b 45 f8 mov -0x8(%ebp),%eax
c5b: 89 10 mov %edx,(%eax)
c5d: eb 0a jmp c69 <free+0x98>
} else
bp->s.ptr = p->s.ptr;
c5f: 8b 45 fc mov -0x4(%ebp),%eax
c62: 8b 10 mov (%eax),%edx
c64: 8b 45 f8 mov -0x8(%ebp),%eax
c67: 89 10 mov %edx,(%eax)
if(p + p->s.size == bp){
c69: 8b 45 fc mov -0x4(%ebp),%eax
c6c: 8b 40 04 mov 0x4(%eax),%eax
c6f: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx
c76: 8b 45 fc mov -0x4(%ebp),%eax
c79: 01 d0 add %edx,%eax
c7b: 3b 45 f8 cmp -0x8(%ebp),%eax
c7e: 75 20 jne ca0 <free+0xcf>
p->s.size += bp->s.size;
c80: 8b 45 fc mov -0x4(%ebp),%eax
c83: 8b 50 04 mov 0x4(%eax),%edx
c86: 8b 45 f8 mov -0x8(%ebp),%eax
c89: 8b 40 04 mov 0x4(%eax),%eax
c8c: 01 c2 add %eax,%edx
c8e: 8b 45 fc mov -0x4(%ebp),%eax
c91: 89 50 04 mov %edx,0x4(%eax)
p->s.ptr = bp->s.ptr;
c94: 8b 45 f8 mov -0x8(%ebp),%eax
c97: 8b 10 mov (%eax),%edx
c99: 8b 45 fc mov -0x4(%ebp),%eax
c9c: 89 10 mov %edx,(%eax)
c9e: eb 08 jmp ca8 <free+0xd7>
} else
p->s.ptr = bp;
ca0: 8b 45 fc mov -0x4(%ebp),%eax
ca3: 8b 55 f8 mov -0x8(%ebp),%edx
ca6: 89 10 mov %edx,(%eax)
freep = p;
ca8: 8b 45 fc mov -0x4(%ebp),%eax
cab: a3 2c 11 00 00 mov %eax,0x112c
}
cb0: c9 leave
cb1: c3 ret
00000cb2 <morecore>:
static Header*
morecore(uint nu)
{
cb2: 55 push %ebp
cb3: 89 e5 mov %esp,%ebp
cb5: 83 ec 28 sub $0x28,%esp
char *p;
Header *hp;
if(nu < 4096)
cb8: 81 7d 08 ff 0f 00 00 cmpl $0xfff,0x8(%ebp)
cbf: 77 07 ja cc8 <morecore+0x16>
nu = 4096;
cc1: c7 45 08 00 10 00 00 movl $0x1000,0x8(%ebp)
p = sbrk(nu * sizeof(Header));
cc8: 8b 45 08 mov 0x8(%ebp),%eax
ccb: c1 e0 03 shl $0x3,%eax
cce: 89 04 24 mov %eax,(%esp)
cd1: e8 30 fc ff ff call 906 <sbrk>
cd6: 89 45 f4 mov %eax,-0xc(%ebp)
if(p == (char*)-1)
cd9: 83 7d f4 ff cmpl $0xffffffff,-0xc(%ebp)
cdd: 75 07 jne ce6 <morecore+0x34>
return 0;
cdf: b8 00 00 00 00 mov $0x0,%eax
ce4: eb 22 jmp d08 <morecore+0x56>
hp = (Header*)p;
ce6: 8b 45 f4 mov -0xc(%ebp),%eax
ce9: 89 45 f0 mov %eax,-0x10(%ebp)
hp->s.size = nu;
cec: 8b 45 f0 mov -0x10(%ebp),%eax
cef: 8b 55 08 mov 0x8(%ebp),%edx
cf2: 89 50 04 mov %edx,0x4(%eax)
free((void*)(hp + 1));
cf5: 8b 45 f0 mov -0x10(%ebp),%eax
cf8: 83 c0 08 add $0x8,%eax
cfb: 89 04 24 mov %eax,(%esp)
cfe: e8 ce fe ff ff call bd1 <free>
return freep;
d03: a1 2c 11 00 00 mov 0x112c,%eax
}
d08: c9 leave
d09: c3 ret
00000d0a <malloc>:
void*
malloc(uint nbytes)
{
d0a: 55 push %ebp
d0b: 89 e5 mov %esp,%ebp
d0d: 83 ec 28 sub $0x28,%esp
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
d10: 8b 45 08 mov 0x8(%ebp),%eax
d13: 83 c0 07 add $0x7,%eax
d16: c1 e8 03 shr $0x3,%eax
d19: 83 c0 01 add $0x1,%eax
d1c: 89 45 ec mov %eax,-0x14(%ebp)
if((prevp = freep) == 0){
d1f: a1 2c 11 00 00 mov 0x112c,%eax
d24: 89 45 f0 mov %eax,-0x10(%ebp)
d27: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
d2b: 75 23 jne d50 <malloc+0x46>
base.s.ptr = freep = prevp = &base;
d2d: c7 45 f0 24 11 00 00 movl $0x1124,-0x10(%ebp)
d34: 8b 45 f0 mov -0x10(%ebp),%eax
d37: a3 2c 11 00 00 mov %eax,0x112c
d3c: a1 2c 11 00 00 mov 0x112c,%eax
d41: a3 24 11 00 00 mov %eax,0x1124
base.s.size = 0;
d46: c7 05 28 11 00 00 00 movl $0x0,0x1128
d4d: 00 00 00
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
d50: 8b 45 f0 mov -0x10(%ebp),%eax
d53: 8b 00 mov (%eax),%eax
d55: 89 45 f4 mov %eax,-0xc(%ebp)
if(p->s.size >= nunits){
d58: 8b 45 f4 mov -0xc(%ebp),%eax
d5b: 8b 40 04 mov 0x4(%eax),%eax
d5e: 3b 45 ec cmp -0x14(%ebp),%eax
d61: 72 4d jb db0 <malloc+0xa6>
if(p->s.size == nunits)
d63: 8b 45 f4 mov -0xc(%ebp),%eax
d66: 8b 40 04 mov 0x4(%eax),%eax
d69: 3b 45 ec cmp -0x14(%ebp),%eax
d6c: 75 0c jne d7a <malloc+0x70>
prevp->s.ptr = p->s.ptr;
d6e: 8b 45 f4 mov -0xc(%ebp),%eax
d71: 8b 10 mov (%eax),%edx
d73: 8b 45 f0 mov -0x10(%ebp),%eax
d76: 89 10 mov %edx,(%eax)
d78: eb 26 jmp da0 <malloc+0x96>
else {
p->s.size -= nunits;
d7a: 8b 45 f4 mov -0xc(%ebp),%eax
d7d: 8b 40 04 mov 0x4(%eax),%eax
d80: 2b 45 ec sub -0x14(%ebp),%eax
d83: 89 c2 mov %eax,%edx
d85: 8b 45 f4 mov -0xc(%ebp),%eax
d88: 89 50 04 mov %edx,0x4(%eax)
p += p->s.size;
d8b: 8b 45 f4 mov -0xc(%ebp),%eax
d8e: 8b 40 04 mov 0x4(%eax),%eax
d91: c1 e0 03 shl $0x3,%eax
d94: 01 45 f4 add %eax,-0xc(%ebp)
p->s.size = nunits;
d97: 8b 45 f4 mov -0xc(%ebp),%eax
d9a: 8b 55 ec mov -0x14(%ebp),%edx
d9d: 89 50 04 mov %edx,0x4(%eax)
}
freep = prevp;
da0: 8b 45 f0 mov -0x10(%ebp),%eax
da3: a3 2c 11 00 00 mov %eax,0x112c
return (void*)(p + 1);
da8: 8b 45 f4 mov -0xc(%ebp),%eax
dab: 83 c0 08 add $0x8,%eax
dae: eb 38 jmp de8 <malloc+0xde>
}
if(p == freep)
db0: a1 2c 11 00 00 mov 0x112c,%eax
db5: 39 45 f4 cmp %eax,-0xc(%ebp)
db8: 75 1b jne dd5 <malloc+0xcb>
if((p = morecore(nunits)) == 0)
dba: 8b 45 ec mov -0x14(%ebp),%eax
dbd: 89 04 24 mov %eax,(%esp)
dc0: e8 ed fe ff ff call cb2 <morecore>
dc5: 89 45 f4 mov %eax,-0xc(%ebp)
dc8: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
dcc: 75 07 jne dd5 <malloc+0xcb>
return 0;
dce: b8 00 00 00 00 mov $0x0,%eax
dd3: eb 13 jmp de8 <malloc+0xde>
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
if((prevp = freep) == 0){
base.s.ptr = freep = prevp = &base;
base.s.size = 0;
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
dd5: 8b 45 f4 mov -0xc(%ebp),%eax
dd8: 89 45 f0 mov %eax,-0x10(%ebp)
ddb: 8b 45 f4 mov -0xc(%ebp),%eax
dde: 8b 00 mov (%eax),%eax
de0: 89 45 f4 mov %eax,-0xc(%ebp)
return (void*)(p + 1);
}
if(p == freep)
if((p = morecore(nunits)) == 0)
return 0;
}
de3: e9 70 ff ff ff jmp d58 <malloc+0x4e>
}
de8: c9 leave
de9: c3 ret
| 36.362772 | 69 | 0.436582 |
4792dfab03efbab29388579ee31210e237524354 | 1,941 | asm | Assembly | programs/oeis/339/A339252.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/339/A339252.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/339/A339252.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A339252: a(0) = 1, a(1) = 4, a(2) = 11, and a(n) = 4*a(n-1) - 4*a(n-2) for n >= 3.
; 1,4,11,28,68,160,368,832,1856,4096,8960,19456,41984,90112,192512,409600,868352,1835008,3866624,8126464,17039360,35651584,74448896,155189248,322961408,671088640,1392508928,2885681152,5972688896,12348030976,25501368320,52613349376,108447924224,223338299392,459561500672,944892805120,1941325217792,3985729650688,8177617731584,16767552323584,34359738368000,70368744177664,144036023238656,294669116243968,602532372021248,1231453023109120,2515682604351488,5136918324969472,10484942882471936,21392098230009856,43628621390151680,88946092640567296,181269885001662464,369295169444380672,752101137770872832,1531223873305968640,3116490942140383232,6341068275337658368,12898309332789100544,26228964229805768704,53322619588066672640,108374621433043615744,220208007379907772416,447333543787456626688,908502145630195417088,1844674407370955161600,3744689046963038978048,7600058558368335265792,15421478045621185150976,31285677949011399540736,63456799613560857559040,128684486658197832073216,260910748178547898056704,528905046081400263933952,1071977191611409463508992,2172288582120036798300160,4401245562034509339164672,8915827919657890163458048,18058329430493523297173504,36570006043342532534861824,74046706451396036950753280,149906801632214017663565824,303440380723271922851250176,614134316364231620750737408,1242775742563838791597948928,2514565704798428683388846080,5087159848938359567163588608,10290376576559723535098970112,20812866910485455871741526016,42089961335702929346570223616,85108377700869893899314790400,172073665460667858210978267136,347861151039191857246653906944,703149942314095996142702559232,1421155165099616555584194609152,2872020891142082237765968199680,5803462904169862728727094362112,11725768052111121963844504649728,23689220591765036940469641150464,47853810158615659906500546002944
mov $1,$0
mul $0,3
add $0,5
mov $2,2
pow $2,$1
mul $0,$2
div $0,4
| 176.454545 | 1,788 | 0.905204 |
895709ed3134b1158e97ea4872abce432492eda8 | 18,740 | asm | Assembly | onnxruntime/core/mlas/lib/amd64/SgemmKernelFma3.asm | srkreddy1238/onnxruntime | 6d80253502686208190c81e21053caeb78f797c9 | [
"MIT"
] | null | null | null | onnxruntime/core/mlas/lib/amd64/SgemmKernelFma3.asm | srkreddy1238/onnxruntime | 6d80253502686208190c81e21053caeb78f797c9 | [
"MIT"
] | null | null | null | onnxruntime/core/mlas/lib/amd64/SgemmKernelFma3.asm | srkreddy1238/onnxruntime | 6d80253502686208190c81e21053caeb78f797c9 | [
"MIT"
] | null | null | null | ;++
;
; Copyright (c) Microsoft Corporation. All rights reserved.
;
; Licensed under the MIT License.
;
; Module Name:
;
; SgemmKernelFma3.asm
;
; Abstract:
;
; This module implements the kernels for the single precision matrix/matrix
; multiply operation (SGEMM).
;
; This implementation uses AVX fused multiply/add instructions.
;
;--
.xlist
INCLUDE macamd64.inc
INCLUDE SgemmKernelCommon.inc
.list
EXTERN MlasMaskMoveAvx:NEAR
;
; ComputeBlockFma3By32
;
; This macro multiplies and accumulates for a 32xN block (where N is 1,3)
; of the output matrix.
;
; Arguments:
;
; Count - Supplies the number of rows to access from matrix A.
;
; VectorOffset - Supplies the byte offset from matrix B to fetch elements.
;
; BroadcastOffset - Supplies the byte offset from matrix A to fetch elements.
;
; Implicit Arguments:
;
; rcx - Supplies the address into the matrix A data.
;
; rdx - Supplies the address into the matrix B data.
;
; r10 - Supplies the length in bytes of a row from matrix A.
;
; ymm4-ymm15 - Supplies the block accumulators.
;
ComputeBlockFma3By32 MACRO Count, VectorOffset, BroadcastOffset
IF Count EQ 1
vbroadcastss ymm3,DWORD PTR [rcx+BroadcastOffset]
vfmadd231ps ymm4,ymm3,YMMWORD PTR [rdx+VectorOffset]
vfmadd231ps ymm5,ymm3,YMMWORD PTR [rdx+VectorOffset+32]
vfmadd231ps ymm6,ymm3,YMMWORD PTR [rdx+rbx+VectorOffset]
vfmadd231ps ymm7,ymm3,YMMWORD PTR [rdx+rbx+VectorOffset+32]
ENDIF
ENDM
;
; ComputeBlockFma3By16
;
; This macro multiplies and accumulates for a 16xN block (where N is 1,3,6)
; of the output matrix.
;
; Arguments:
;
; Count - Supplies the number of rows to access from matrix A.
;
; VectorOffset - Supplies the byte offset from matrix B to fetch elements.
;
; BroadcastOffset - Supplies the byte offset from matrix A to fetch elements.
;
; Implicit Arguments:
;
; rbx - Supplies the address into the matrix A data plus 3 rows.
;
; rcx - Supplies the address into the matrix A data.
;
; rdx - Supplies the address into the matrix B data.
;
; r10 - Supplies the length in bytes of a row from matrix A.
;
; ymm4-ymm15 - Supplies the block accumulators.
;
ComputeBlockFma3By16 MACRO Count, VectorOffset, BroadcastOffset
IF Count EQ 1
vbroadcastss ymm3,DWORD PTR [rcx+BroadcastOffset]
vfmadd231ps ymm4,ymm3,YMMWORD PTR [rdx+VectorOffset]
vfmadd231ps ymm5,ymm3,YMMWORD PTR [rdx+VectorOffset+32]
ELSE
vmovaps ymm0,YMMWORD PTR [rdx+VectorOffset]
vmovaps ymm1,YMMWORD PTR [rdx+VectorOffset+32]
vbroadcastss ymm3,DWORD PTR [rcx+BroadcastOffset]
vfmadd231ps ymm4,ymm3,ymm0
vfmadd231ps ymm5,ymm3,ymm1
IF Count GE 3
vbroadcastss ymm3,DWORD PTR [rcx+r10+BroadcastOffset]
vfmadd231ps ymm6,ymm3,ymm0
vfmadd231ps ymm7,ymm3,ymm1
vbroadcastss ymm3,DWORD PTR [rcx+r10*2+BroadcastOffset]
vfmadd231ps ymm8,ymm3,ymm0
vfmadd231ps ymm9,ymm3,ymm1
ENDIF
IF Count GE 6
vbroadcastss ymm3,DWORD PTR [rbx+BroadcastOffset]
vfmadd231ps ymm10,ymm3,ymm0
vfmadd231ps ymm11,ymm3,ymm1
vbroadcastss ymm3,DWORD PTR [rbx+r10+BroadcastOffset]
vfmadd231ps ymm12,ymm3,ymm0
vfmadd231ps ymm13,ymm3,ymm1
vbroadcastss ymm3,DWORD PTR [rbx+r10*2+BroadcastOffset]
vfmadd231ps ymm14,ymm3,ymm0
vfmadd231ps ymm15,ymm3,ymm1
ENDIF
ENDIF
ENDM
;
; ComputeBlockFma3By8
;
; Macro Description:
;
; This macro multiplies and accumulates for a 8xN block (where N is 1,3,6)
; of the output matrix.
;
; Arguments:
;
; Count - Supplies the number of rows to access from matrix A.
;
; VectorOffset - Supplies the byte offset from matrix B to fetch elements.
;
; BroadcastOffset - Supplies the byte offset from matrix A to fetch elements.
;
; Implicit Arguments:
;
; rbx - Supplies the address into the matrix A data plus 3 rows.
;
; rcx - Supplies the address into the matrix A data.
;
; rdx - Supplies the address into the matrix B data.
;
; r10 - Supplies the length in bytes of a row from matrix A.
;
; ymm4-ymm15 - Supplies the block accumulators.
;
ComputeBlockFma3By8 MACRO Count, VectorOffset, BroadcastOffset
IF Count EQ 1
vbroadcastss ymm3,DWORD PTR [rcx+BroadcastOffset]
vfmadd231ps ymm5,ymm3,YMMWORD PTR [rdx+VectorOffset]
ELSE
vmovaps ymm0,YMMWORD PTR [rdx+VectorOffset]
vbroadcastss ymm3,DWORD PTR [rcx+BroadcastOffset]
vfmadd231ps ymm5,ymm3,ymm0
IF Count GE 3
vbroadcastss ymm3,DWORD PTR [rcx+r10+BroadcastOffset]
vfmadd231ps ymm7,ymm3,ymm0
vbroadcastss ymm3,DWORD PTR [rcx+r10*2+BroadcastOffset]
vfmadd231ps ymm9,ymm3,ymm0
ENDIF
IF Count GE 6
vbroadcastss ymm3,DWORD PTR [rbx+BroadcastOffset]
vfmadd231ps ymm11,ymm3,ymm0
vbroadcastss ymm3,DWORD PTR [rbx+r10+BroadcastOffset]
vfmadd231ps ymm13,ymm3,ymm0
vbroadcastss ymm3,DWORD PTR [rbx+r10*2+BroadcastOffset]
vfmadd231ps ymm15,ymm3,ymm0
ENDIF
ENDIF
ENDM
;++
;
; Routine Description:
;
; This routine is an inner kernel to compute matrix multiplication for a
; set of rows.
;
; Arguments:
;
; A (rcx) - Supplies the address of matrix A.
;
; B (rdx) - Supplies the address of matrix B. The matrix data has been packed
; using MlasSgemmCopyPackB or MlasSgemmTransposePackB.
;
; C (r8) - Supplies the address of matrix C.
;
; CountK (r9) - Supplies the number of columns from matrix A and the number
; of rows from matrix B to iterate over.
;
; CountM - Supplies the maximum number of rows that can be processed for
; matrix A and matrix C. The actual number of rows handled for this
; invocation depends on the kernel implementation.
;
; CountN - Supplies the number of columns from matrix B and matrix C to iterate
; over.
;
; lda - Supplies the first dimension of matrix A.
;
; ldc - Supplies the first dimension of matrix C.
;
; Alpha - Supplies the scaler multiplier (see SGEMM definition).
;
; Return Value:
;
; Returns the number of rows handled.
;
;--
SgemmKernelFma3Function MACRO Mode
NESTED_ENTRY MlasSgemmKernel&Mode&Fma3, _TEXT
SgemmKernelAvxEntry
;
; Process 6 rows of the matrices.
;
cmp r11,6
jb ProcessCountMLessThan6
mov r11d,6 ; return 6 rows handled
cmp rbp,8
jbe ProcessRemainingCountN6
ProcessNextColumnLoop16x6:
lea rbx,[r10*2+r10]
add rbx,rcx ; compute matrix A plus 3 rows
ComputeBlockFma3Loop ComputeBlockFma3By16, 6
lea rcx,[r8+rax*2] ; compute matrix C plus 2 rows
lea rbx,[r8+rax*4] ; compute matrix C plus 4 rows
IFDIFI <Mode>, <Add>
vmulps ymm4,ymm4,ymm2 ; multiply by alpha
vmulps ymm5,ymm5,ymm2
vmulps ymm6,ymm6,ymm2
vmulps ymm7,ymm7,ymm2
vmulps ymm8,ymm8,ymm2
vmulps ymm9,ymm9,ymm2
vmulps ymm10,ymm10,ymm2
vmulps ymm11,ymm11,ymm2
vmulps ymm12,ymm12,ymm2
vmulps ymm13,ymm13,ymm2
vmulps ymm14,ymm14,ymm2
vmulps ymm15,ymm15,ymm2
ENDIF
sub rbp,16
jb OutputMasked16x6Block
IFIDNI <Mode>, <Add>
vfmadd213ps ymm4,ymm2,YMMWORD PTR [r8]
vfmadd213ps ymm5,ymm2,YMMWORD PTR [r8+32]
vfmadd213ps ymm6,ymm2,YMMWORD PTR [r8+rax]
vfmadd213ps ymm7,ymm2,YMMWORD PTR [r8+rax+32]
vfmadd213ps ymm8,ymm2,YMMWORD PTR [rcx]
vfmadd213ps ymm9,ymm2,YMMWORD PTR [rcx+32]
vfmadd213ps ymm10,ymm2,YMMWORD PTR [rcx+rax]
vfmadd213ps ymm11,ymm2,YMMWORD PTR [rcx+rax+32]
vfmadd213ps ymm12,ymm2,YMMWORD PTR [rbx]
vfmadd213ps ymm13,ymm2,YMMWORD PTR [rbx+32]
vfmadd213ps ymm14,ymm2,YMMWORD PTR [rbx+rax]
vfmadd213ps ymm15,ymm2,YMMWORD PTR [rbx+rax+32]
ENDIF
vmovups YMMWORD PTR [r8],ymm4
vmovups YMMWORD PTR [r8+32],ymm5
vmovups YMMWORD PTR [r8+rax],ymm6
vmovups YMMWORD PTR [r8+rax+32],ymm7
vmovups YMMWORD PTR [rcx],ymm8
vmovups YMMWORD PTR [rcx+32],ymm9
vmovups YMMWORD PTR [rcx+rax],ymm10
vmovups YMMWORD PTR [rcx+rax+32],ymm11
vmovups YMMWORD PTR [rbx],ymm12
vmovups YMMWORD PTR [rbx+32],ymm13
vmovups YMMWORD PTR [rbx+rax],ymm14
vmovups YMMWORD PTR [rbx+rax+32],ymm15
add r8,16*4 ; advance matrix C by 16 columns
mov rcx,rsi ; reload matrix A
vzeroall
cmp rbp,8
ja ProcessNextColumnLoop16x6
test rbp,rbp
jz ExitKernel
ProcessRemainingCountN6:
lea rbx,[r10*2+r10]
add rbx,rcx ; compute matrix A plus 3 rows
ComputeBlockFma3Loop ComputeBlockFma3By8, 6
lea rcx,[r8+rax*2] ; compute matrix C plus 2 rows
lea rbx,[r8+rax*4] ; compute matrix C plus 4 rows
IFDIFI <Mode>, <Add>
vmulps ymm5,ymm5,ymm2 ; multiply by alpha
vmulps ymm7,ymm7,ymm2
vmulps ymm9,ymm9,ymm2
vmulps ymm11,ymm11,ymm2
vmulps ymm13,ymm13,ymm2
vmulps ymm15,ymm15,ymm2
ENDIF
cmp rbp,8
jb OutputMasked8x6Block
IFIDNI <Mode>, <Add>
vfmadd213ps ymm5,ymm2,YMMWORD PTR [r8]
vfmadd213ps ymm7,ymm2,YMMWORD PTR [r8+rax]
vfmadd213ps ymm9,ymm2,YMMWORD PTR [rcx]
vfmadd213ps ymm11,ymm2,YMMWORD PTR [rcx+rax]
vfmadd213ps ymm13,ymm2,YMMWORD PTR [rbx]
vfmadd213ps ymm15,ymm2,YMMWORD PTR [rbx+rax]
ENDIF
vmovups YMMWORD PTR [r8],ymm5
vmovups YMMWORD PTR [r8+rax],ymm7
vmovups YMMWORD PTR [rcx],ymm9
vmovups YMMWORD PTR [rcx+rax],ymm11
vmovups YMMWORD PTR [rbx],ymm13
vmovups YMMWORD PTR [rbx+rax],ymm15
jmp ExitKernelAndZeroUpper
OutputMasked16x6Block:
IFIDNI <Mode>, <Add>
vfmadd213ps ymm4,ymm2,YMMWORD PTR [r8]
vfmadd213ps ymm6,ymm2,YMMWORD PTR [r8+rax]
vfmadd213ps ymm8,ymm2,YMMWORD PTR [rcx]
vfmadd213ps ymm10,ymm2,YMMWORD PTR [rcx+rax]
vfmadd213ps ymm12,ymm2,YMMWORD PTR [rbx]
vfmadd213ps ymm14,ymm2,YMMWORD PTR [rbx+rax]
ENDIF
vmovups YMMWORD PTR [r8],ymm4
vmovups YMMWORD PTR [r8+rax],ymm6
vmovups YMMWORD PTR [rcx],ymm8
vmovups YMMWORD PTR [rcx+rax],ymm10
vmovups YMMWORD PTR [rbx],ymm12
vmovups YMMWORD PTR [rbx+rax],ymm14
add r8,8*4 ; advance matrix C by 8 columns
add rcx,8*4 ; advance matrix C plus 2 rows by 8 columns
add rbx,8*4 ; advance matrix C plus 4 rows by 8 columns
add rbp,8 ; correct for over-subtract above
OutputMasked8x6Block:
mov DWORD PTR SgemmKernelFrame.CountN[rsp],ebp
vbroadcastss ymm0,DWORD PTR SgemmKernelFrame.CountN[rsp]
vpcmpgtd ymm0,ymm0,YMMWORD PTR [MlasMaskMoveAvx]
IFIDNI <Mode>, <Add>
vmaskmovps ymm4,ymm0,YMMWORD PTR [r8]
vmaskmovps ymm6,ymm0,YMMWORD PTR [r8+rax]
vmaskmovps ymm8,ymm0,YMMWORD PTR [rcx]
vmaskmovps ymm10,ymm0,YMMWORD PTR [rcx+rax]
vmaskmovps ymm12,ymm0,YMMWORD PTR [rbx]
vmaskmovps ymm14,ymm0,YMMWORD PTR [rbx+rax]
vfmadd213ps ymm5,ymm2,ymm4
vfmadd213ps ymm7,ymm2,ymm6
vfmadd213ps ymm9,ymm2,ymm8
vfmadd213ps ymm11,ymm2,ymm10
vfmadd213ps ymm13,ymm2,ymm12
vfmadd213ps ymm15,ymm2,ymm14
ENDIF
vmaskmovps YMMWORD PTR [r8],ymm0,ymm5
vmaskmovps YMMWORD PTR [r8+rax],ymm0,ymm7
vmaskmovps YMMWORD PTR [rcx],ymm0,ymm9
vmaskmovps YMMWORD PTR [rcx+rax],ymm0,ymm11
vmaskmovps YMMWORD PTR [rbx],ymm0,ymm13
vmaskmovps YMMWORD PTR [rbx+rax],ymm0,ymm15
;
; Restore non-volatile registers and return.
;
ExitKernelAndZeroUpper:
vzeroupper
ExitKernel:
SgemmKernelAvxExit
;
; Process 3 rows of the matrices.
;
ProcessCountMLessThan6:
cmp r11,3
jb ProcessCountMLessThan3
mov r11d,3 ; return 3 rows handled
cmp rbp,8
jbe ProcessRemainingCountN3
ProcessNextColumnLoop16x3:
ComputeBlockFma3Loop ComputeBlockFma3By16, 3
IFDIFI <Mode>, <Add>
vmulps ymm4,ymm4,ymm2 ; multiply by alpha
vmulps ymm5,ymm5,ymm2
vmulps ymm6,ymm6,ymm2
vmulps ymm7,ymm7,ymm2
vmulps ymm8,ymm8,ymm2
vmulps ymm9,ymm9,ymm2
ENDIF
sub rbp,16
jb OutputMasked16x3Block
IFIDNI <Mode>, <Add>
vfmadd213ps ymm4,ymm2,YMMWORD PTR [r8]
vfmadd213ps ymm5,ymm2,YMMWORD PTR [r8+32]
vfmadd213ps ymm6,ymm2,YMMWORD PTR [r8+rax]
vfmadd213ps ymm7,ymm2,YMMWORD PTR [r8+rax+32]
vfmadd213ps ymm8,ymm2,YMMWORD PTR [r8+rax*2]
vfmadd213ps ymm9,ymm2,YMMWORD PTR [r8+rax*2+32]
ENDIF
vmovups YMMWORD PTR [r8],ymm4
vmovups YMMWORD PTR [r8+32],ymm5
vmovups YMMWORD PTR [r8+rax],ymm6
vmovups YMMWORD PTR [r8+rax+32],ymm7
vmovups YMMWORD PTR [r8+rax*2],ymm8
vmovups YMMWORD PTR [r8+rax*2+32],ymm9
add r8,16*4 ; advance matrix C by 16 columns
mov rcx,rsi ; reload matrix A
vzeroall
cmp rbp,8
ja ProcessNextColumnLoop16x3
test rbp,rbp
jz ExitKernel
ProcessRemainingCountN3:
ComputeBlockFma3Loop ComputeBlockFma3By8, 3
IFDIFI <Mode>, <Add>
vmulps ymm5,ymm5,ymm2 ; multiply by alpha
vmulps ymm7,ymm7,ymm2
vmulps ymm9,ymm9,ymm2
ENDIF
cmp rbp,8
jb OutputMasked8x3Block
IFIDNI <Mode>, <Add>
vfmadd213ps ymm5,ymm2,YMMWORD PTR [r8]
vfmadd213ps ymm7,ymm2,YMMWORD PTR [r8+rax]
vfmadd213ps ymm9,ymm2,YMMWORD PTR [r8+rax*2]
ENDIF
vmovups YMMWORD PTR [r8],ymm5
vmovups YMMWORD PTR [r8+rax],ymm7
vmovups YMMWORD PTR [r8+rax*2],ymm9
jmp ExitKernelAndZeroUpper
OutputMasked16x3Block:
IFIDNI <Mode>, <Add>
vfmadd213ps ymm4,ymm2,YMMWORD PTR [r8]
vfmadd213ps ymm6,ymm2,YMMWORD PTR [r8+rax]
vfmadd213ps ymm8,ymm2,YMMWORD PTR [r8+rax*2]
ENDIF
vmovups YMMWORD PTR [r8],ymm4
vmovups YMMWORD PTR [r8+rax],ymm6
vmovups YMMWORD PTR [r8+rax*2],ymm8
add r8,8*4 ; advance matrix C by 8 columns
add rbp,8 ; correct for over-subtract above
OutputMasked8x3Block:
mov DWORD PTR SgemmKernelFrame.CountN[rsp],ebp
vbroadcastss ymm0,DWORD PTR SgemmKernelFrame.CountN[rsp]
vpcmpgtd ymm0,ymm0,YMMWORD PTR [MlasMaskMoveAvx]
IFIDNI <Mode>, <Add>
vmaskmovps ymm4,ymm0,YMMWORD PTR [r8]
vmaskmovps ymm6,ymm0,YMMWORD PTR [r8+rax]
vmaskmovps ymm8,ymm0,YMMWORD PTR [r8+rax*2]
vfmadd213ps ymm5,ymm2,ymm4
vfmadd213ps ymm7,ymm2,ymm6
vfmadd213ps ymm9,ymm2,ymm8
ENDIF
vmaskmovps YMMWORD PTR [r8],ymm0,ymm5
vmaskmovps YMMWORD PTR [r8+rax],ymm0,ymm7
vmaskmovps YMMWORD PTR [r8+rax*2],ymm0,ymm9
jmp ExitKernelAndZeroUpper
;
; Process 1 row of the matrices.
;
ProcessCountMLessThan3:
mov r11d,1 ; return 1 row handled
cmp rbp,32
jb ProcessRemainingCountN1LessThan32
mov rbx,r9
shl rbx,6 ; compute 16*CountK*sizeof(float)
ProcessNextColumnLoop32x1:
ComputeBlockFma3Loop ComputeBlockFma3By32, 1
add rdx,rbx ; advance matrix B by 16*CountK floats
IFDIFI <Mode>, <Add>
vmulps ymm4,ymm4,ymm2 ; multiply by alpha
vmulps ymm5,ymm5,ymm2
vmulps ymm6,ymm6,ymm2
vmulps ymm7,ymm7,ymm2
ELSE
vfmadd213ps ymm4,ymm2,YMMWORD PTR [r8]
vfmadd213ps ymm5,ymm2,YMMWORD PTR [r8+32]
vfmadd213ps ymm6,ymm2,YMMWORD PTR [r8+64]
vfmadd213ps ymm7,ymm2,YMMWORD PTR [r8+96]
ENDIF
sub rbp,32
vmovups YMMWORD PTR [r8],ymm4
vmovups YMMWORD PTR [r8+32],ymm5
vmovups YMMWORD PTR [r8+64],ymm6
vmovups YMMWORD PTR [r8+96],ymm7
add r8,32*4 ; advance matrix C by 32 columns
mov rcx,rsi ; reload matrix A
vzeroall
cmp rbp,32
jae ProcessNextColumnLoop32x1
test rbp,rbp
jz ExitKernel
ProcessRemainingCountN1LessThan32:
cmp rbp,8
jbe ProcessRemainingCountN1
ProcessNextColumnLoop16x1:
ComputeBlockFma3Loop ComputeBlockFma3By16, 1
IFDIFI <Mode>, <Add>
vmulps ymm4,ymm4,ymm2 ; multiply by alpha
vmulps ymm5,ymm5,ymm2
ENDIF
sub rbp,16
jb OutputMasked16x1Block
IFIDNI <Mode>, <Add>
vfmadd213ps ymm4,ymm2,YMMWORD PTR [r8]
vfmadd213ps ymm5,ymm2,YMMWORD PTR [r8+32]
ENDIF
vmovups YMMWORD PTR [r8],ymm4
vmovups YMMWORD PTR [r8+32],ymm5
add r8,16*4 ; advance matrix C by 16 columns
mov rcx,rsi ; reload matrix A
vzeroall
cmp rbp,8
ja ProcessNextColumnLoop16x1
test rbp,rbp
jz ExitKernel
ProcessRemainingCountN1:
ComputeBlockFma3Loop ComputeBlockFma3By8, 1
IFDIFI <Mode>, <Add>
vmulps ymm5,ymm5,ymm2 ; multiply by alpha
ENDIF
cmp rbp,8
jb OutputMasked8x1Block
IFIDNI <Mode>, <Add>
vfmadd213ps ymm5,ymm2,YMMWORD PTR [r8]
ENDIF
vmovups YMMWORD PTR [r8],ymm5
jmp ExitKernelAndZeroUpper
OutputMasked16x1Block:
IFIDNI <Mode>, <Add>
vfmadd213ps ymm4,ymm2,YMMWORD PTR [r8]
ENDIF
vmovups YMMWORD PTR [r8],ymm4
add r8,8*4 ; advance matrix C by 8 columns
add rbp,8 ; correct for over-subtract above
OutputMasked8x1Block:
mov DWORD PTR SgemmKernelFrame.CountN[rsp],ebp
vbroadcastss ymm0,DWORD PTR SgemmKernelFrame.CountN[rsp]
vpcmpgtd ymm0,ymm0,YMMWORD PTR [MlasMaskMoveAvx]
IFIDNI <Mode>, <Add>
vmaskmovps ymm4,ymm0,YMMWORD PTR [r8]
vfmadd213ps ymm5,ymm2,ymm4
ENDIF
vmaskmovps YMMWORD PTR [r8],ymm0,ymm5
jmp ExitKernelAndZeroUpper
NESTED_END MlasSgemmKernel&Mode&Fma3, _TEXT
ENDM
SgemmKernelFma3Function Zero
SgemmKernelFma3Function Add
END
| 32.534722 | 87 | 0.637353 |
ffa38b39d8cb9fe537488a6351fff40919db5cd0 | 3,380 | asm | Assembly | programs/oeis/222/A222410.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/222/A222410.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/222/A222410.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A222410: Partial sums of A008534, or crystal ball sequence for {A_6}* lattice.
; 1,15,113,575,2171,6581,16955,38613,79885,153091,275661,471395,771863,1217945,1861511,2767241,4014585,5699863,7938505,10867431,14647571,19466525,25541363,33121565,42492101,53976651,67940965,84796363,105003375,129075521,157583231,191157905,230496113,276363935,329601441,391127311,461943595,543140613,635901995,741509861,861350141,996918035,1149823613,1321797555,1514697031,1730511721,1971369975,2239545113,2537461865,2867702951,3233015801,3636319415,4080711363,4569474925,5106086371,5694222381,6337767605,7040822363,7807710485,8642987291,9551447711,10538134545,11608346863,12767648545,14021876961,15377151791,16839883985,18416784863,20114875355,21941495381,23904313371,26011335925,28270917613,30691770915,33282976301,36053992451,39014666615,42175245113,45546383975,49139159721,52965080281,57036096055,61364611113,65963494535,70846091891,76026236861,81518262995,87337015613,93497863845,100016712811,106910015941,114194787435,121888614863,130009671905,138576731231,147609177521,157127020625,167150908863,177702142465,188802687151,200475187851,212742982565,225630116363,239161355525,253362201821,268258906931,283878487005,300248737363,317398247335,335356415241,354153463511,373820453945,394389303113,415892797895,438364611161,461839317591,486352409635,511940313613,538640405955,566491029581,595531510421,625802174075,657344362613,690200451515,724413866751,760029102001,797091736015,835648450113,875747045825,917436462671,960766796081,1005789315455,1052556482363,1101121968885,1151540676091,1203868752661,1258163613645,1314483959363,1372889794445,1433442447011,1496204587991,1561240250585,1628614849863,1698395202505,1770649546681,1845447562071,1922860390025,2002960653863,2085822479315,2171521515101,2260134953651,2351741551965,2446421652613,2544257204875,2645331786021,2749730622731,2857540612655,2968850346113,3083750127935,3202331999441,3324689760561,3450918992095,3581117078113,3715383228495,3853818501611,3996525827141,4143610029035,4295177848613,4451337967805,4612201032531,4777879676221,4948488543475,5124144313863,5304965725865,5491073600951,5682590867801,5879642586665,6082355973863,6290860426425,6505287546871,6725771168131,6952447378605,7185454547363,7424933349485,7671026791541,7923880237211,8183641433045,8450460534363,8724490131295,9005885274961,9294803503791,9591404869985,9895851966113,10208309951855,10528946580881,10857932227871,11195439915675,11541645342613,11896726909915,12260865749301,12634245750701,13017053590115,13409478757613,13811713585475,14223953276471,14646395932281,15079242582055,15522697211113,15976966789785,16442261302391,16918793776361,17406780311495,17906440109363,18417995502845,18941671985811,19477698242941,20026306179685,20587730952363,21162210998405,21749988066731,22351307248271,22966417006625,23595569208863,24239019156465,24897025616401,25569850852351,26257760656065,26961024378863,27679914963275,28414708974821,29165686633931,29933131848005,30717332243613,31518579198835,32337167875741,33173397253011,34027570158695,34899993303113,35790977311895,36700836759161,37629890200841,38578460208135,39546873401113,40535460482455,41544556271331,42574499737421,43625634035075,44698306537613,45792868871765,46909676952251
mov $2,$0
pow $0,2
sub $2,1
mov $3,3
add $3,$0
add $3,$2
mov $1,$3
mul $1,$3
add $1,2
add $3,1
mul $1,$3
mul $1,4
div $1,288
mul $1,14
add $1,1
| 177.894737 | 3,153 | 0.899704 |
2fe9e4ce6a2f6dae2ae06ecac57812292deee954 | 622 | asm | Assembly | audio/music/pkmnhealed.asm | opiter09/ASM-Machina | 75d8e457b3e82cc7a99b8e70ada643ab02863ada | [
"CC0-1.0"
] | 1 | 2022-02-15T00:19:44.000Z | 2022-02-15T00:19:44.000Z | audio/music/pkmnhealed.asm | opiter09/ASM-Machina | 75d8e457b3e82cc7a99b8e70ada643ab02863ada | [
"CC0-1.0"
] | null | null | null | audio/music/pkmnhealed.asm | opiter09/ASM-Machina | 75d8e457b3e82cc7a99b8e70ada643ab02863ada | [
"CC0-1.0"
] | null | null | null | Music_PkmnHealed_Ch1::
tempo 144
volume 7, 7
duty_cycle 2
toggle_perfect_pitch
note_type 12, 8, 1
rest 2
pitch_slide 1, 4, B_
note B_, 2
pitch_slide 1, 3, E_
note B_, 2
pitch_slide 1, 4, E_
note E_, 2
rest 4
pitch_slide 1, 5, B_
note E_, 4
pitch_slide 1, 4, B_
note B_, 4
sound_ret
Music_PkmnHealed_Ch2::
duty_cycle 2
note_type 12, 12, 3
octave 4
note B_, 4
note B_, 4
note B_, 2
note G#, 2
note_type 12, 12, 4
octave 5
note E_, 8
sound_ret
Music_PkmnHealed_Ch3::
note_type 12, 1, 0
octave 4
note E_, 2
rest 2
note E_, 2
rest 2
note E_, 2
note G#, 2
note E_, 6
rest 2
sound_ret
| 12.958333 | 22 | 0.680064 |
dae68ef7b313a82ab15bb44729c6ebf91f6f06a7 | 8,627 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca_notsx.log_21829_1023.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca_notsx.log_21829_1023.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca_notsx.log_21829_1023.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r14
push %r15
push %r9
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_UC_ht+0xb870, %r9
nop
nop
nop
cmp $1052, %r14
movl $0x61626364, (%r9)
nop
nop
nop
nop
nop
xor %r9, %r9
lea addresses_WT_ht+0x3470, %rsi
lea addresses_WT_ht+0x1e88c, %rdi
xor %r14, %r14
mov $81, %rcx
rep movsq
nop
nop
nop
nop
and %r9, %r9
lea addresses_D_ht+0x1bcf8, %rsi
nop
nop
nop
nop
cmp $33388, %rbx
mov $0x6162636465666768, %r11
movq %r11, %xmm0
vmovups %ymm0, (%rsi)
nop
nop
xor $25684, %r11
lea addresses_UC_ht+0xdc72, %r11
nop
nop
dec %rsi
movb (%r11), %bl
nop
nop
nop
nop
xor %rdi, %rdi
lea addresses_normal_ht+0x19070, %r11
clflush (%r11)
mfence
vmovups (%r11), %ymm3
vextracti128 $1, %ymm3, %xmm3
vpextrq $0, %xmm3, %rsi
nop
nop
and %rbx, %rbx
lea addresses_D_ht+0x15c70, %r14
nop
nop
nop
nop
nop
sub %rsi, %rsi
mov $0x6162636465666768, %r9
movq %r9, %xmm2
movups %xmm2, (%r14)
nop
inc %r9
lea addresses_WC_ht+0xbbb0, %rdi
inc %rsi
mov (%rdi), %r14
nop
nop
add $34942, %r11
lea addresses_D_ht+0x1ab70, %r14
nop
nop
nop
add %rbx, %rbx
mov (%r14), %rdi
nop
nop
nop
nop
dec %rcx
lea addresses_UC_ht+0x1adb0, %rcx
nop
xor %rdi, %rdi
mov (%rcx), %rsi
nop
nop
nop
nop
nop
add $12743, %rdi
lea addresses_WC_ht+0x18fd2, %rsi
nop
add %rdi, %rdi
movw $0x6162, (%rsi)
nop
nop
nop
nop
nop
cmp %rcx, %rcx
lea addresses_WC_ht+0x1870, %rsi
lea addresses_UC_ht+0x290, %rdi
xor %r15, %r15
mov $29, %rcx
rep movsw
nop
nop
nop
inc %r11
lea addresses_WT_ht+0x270, %rbx
nop
nop
sub $30507, %r15
mov $0x6162636465666768, %rsi
movq %rsi, %xmm1
movups %xmm1, (%rbx)
sub $41449, %r9
lea addresses_WC_ht+0xa210, %rsi
lea addresses_A_ht+0x11870, %rdi
cmp %r9, %r9
mov $2, %rcx
rep movsl
nop
nop
sub %rbx, %rbx
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %r9
pop %r15
pop %r14
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r12
push %r14
push %r15
push %rbp
push %rcx
push %rdx
// Store
lea addresses_WC+0x1a704, %r15
nop
xor %r12, %r12
movw $0x5152, (%r15)
nop
nop
cmp %rdx, %rdx
// Store
lea addresses_PSE+0xe177, %rbp
nop
nop
nop
add %r11, %r11
movw $0x5152, (%rbp)
inc %r14
// Load
mov $0xc50, %r11
clflush (%r11)
nop
nop
nop
nop
nop
xor $50360, %r15
mov (%r11), %rcx
xor %r11, %r11
// Load
lea addresses_A+0xc6e0, %r15
nop
nop
nop
nop
xor %r14, %r14
mov (%r15), %r12w
nop
inc %rdx
// Store
mov $0x1f7f10000000ed0, %r14
nop
inc %rdx
movw $0x5152, (%r14)
nop
and $35204, %r12
// Store
mov $0x670, %rcx
nop
nop
nop
and $30105, %r15
mov $0x5152535455565758, %rbp
movq %rbp, %xmm0
vmovups %ymm0, (%rcx)
nop
nop
nop
nop
nop
sub $63891, %r14
// Faulty Load
lea addresses_WT+0x1c070, %r12
nop
nop
nop
inc %r11
vmovups (%r12), %ymm6
vextracti128 $0, %ymm6, %xmm6
vpextrq $1, %xmm6, %rbp
lea oracles, %r12
and $0xff, %rbp
shlq $12, %rbp
mov (%r12,%rbp,1), %rbp
pop %rdx
pop %rcx
pop %rbp
pop %r15
pop %r14
pop %r12
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WT', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WC', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_PSE', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 0}}
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_P', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 3}}
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_A', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 3}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_NC', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 5}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_P', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 9}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_WT', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_UC_ht', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 8}}
{'OP': 'REPM', 'src': {'same': False, 'congruent': 8, 'type': 'addresses_WT_ht'}, 'dst': {'same': True, 'congruent': 1, 'type': 'addresses_WT_ht'}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_D_ht', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 3}}
{'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_UC_ht', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 0}}
{'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_normal_ht', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 11}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_D_ht', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 10}}
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WC_ht', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 5}}
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_D_ht', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 5}}
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_UC_ht', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 5}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WC_ht', 'NT': True, 'AVXalign': True, 'size': 2, 'congruent': 0}}
{'OP': 'REPM', 'src': {'same': False, 'congruent': 11, 'type': 'addresses_WC_ht'}, 'dst': {'same': False, 'congruent': 5, 'type': 'addresses_UC_ht'}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WT_ht', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 9}}
{'OP': 'REPM', 'src': {'same': False, 'congruent': 5, 'type': 'addresses_WC_ht'}, 'dst': {'same': False, 'congruent': 11, 'type': 'addresses_A_ht'}}
{'39': 21829}
39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39
*/
| 31.485401 | 2,999 | 0.650168 |
f18387d6868f8b32ae12e126c77528b169540a65 | 6,945 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_21829_177.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_177.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_177.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 %r9
push %rax
push %rbp
push %rbx
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_WT_ht+0x14b14, %rax
nop
nop
nop
and $56154, %rsi
mov $0x6162636465666768, %rbp
movq %rbp, %xmm5
vmovups %ymm5, (%rax)
nop
nop
nop
add %r11, %r11
lea addresses_normal_ht+0x4664, %rdx
clflush (%rdx)
nop
and %rbx, %rbx
mov $0x6162636465666768, %rsi
movq %rsi, (%rdx)
nop
and %rdx, %rdx
lea addresses_WC_ht+0x1c727, %rsi
nop
nop
nop
add $26826, %r9
movw $0x6162, (%rsi)
nop
add %rdx, %rdx
lea addresses_A_ht+0x5e27, %rsi
lea addresses_UC_ht+0x527, %rdi
nop
nop
nop
add %rax, %rax
mov $57, %rcx
rep movsb
nop
xor %rbp, %rbp
lea addresses_WT_ht+0x8f27, %rsi
lea addresses_normal_ht+0xf533, %rdi
nop
nop
nop
and %rbp, %rbp
mov $0, %rcx
rep movsb
nop
nop
cmp %rdi, %rdi
lea addresses_WT_ht+0xb27, %rsi
lea addresses_A_ht+0x17933, %rdi
nop
nop
sub %r11, %r11
mov $117, %rcx
rep movsl
nop
nop
sub %r9, %r9
lea addresses_normal_ht+0x16f27, %rsi
lea addresses_A_ht+0x12f0f, %rdi
clflush (%rsi)
and $55648, %rdx
mov $51, %rcx
rep movsw
cmp $28795, %rcx
lea addresses_WT_ht+0x877, %rsi
lea addresses_A_ht+0x1e227, %rdi
xor $20655, %rax
mov $41, %rcx
rep movsl
nop
nop
nop
nop
inc %r9
lea addresses_D_ht+0x1c2e7, %rsi
lea addresses_WT_ht+0x10d27, %rdi
nop
nop
add $42269, %rbp
mov $116, %rcx
rep movsl
nop
nop
nop
nop
nop
sub $46013, %rdx
lea addresses_WC_ht+0xaa87, %rbp
nop
nop
nop
nop
sub %r11, %r11
movw $0x6162, (%rbp)
nop
and %r11, %r11
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %rax
pop %r9
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r8
push %rax
push %rbp
push %rbx
push %rcx
// Store
lea addresses_RW+0x5c67, %rbx
nop
nop
nop
nop
nop
dec %rcx
mov $0x5152535455565758, %r10
movq %r10, %xmm4
movups %xmm4, (%rbx)
inc %r11
// Faulty Load
lea addresses_D+0x1b727, %r8
nop
cmp %rbp, %rbp
vmovups (%r8), %ymm1
vextracti128 $0, %ymm1, %xmm1
vpextrq $0, %xmm1, %rbx
lea oracles, %rcx
and $0xff, %rbx
shlq $12, %rbx
mov (%rcx,%rbx,1), %rbx
pop %rcx
pop %rbx
pop %rbp
pop %rax
pop %r8
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_D', 'congruent': 0}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_RW', 'congruent': 6}, 'OP': 'STOR'}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_D', 'congruent': 0}}
<gen_prepare_buffer>
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_WT_ht', 'congruent': 0}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_normal_ht', 'congruent': 0}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_WC_ht', 'congruent': 11}, 'OP': 'STOR'}
{'dst': {'same': False, 'congruent': 9, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 8, 'type': 'addresses_A_ht'}}
{'dst': {'same': False, 'congruent': 1, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 10, 'type': 'addresses_WT_ht'}}
{'dst': {'same': False, 'congruent': 1, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 10, 'type': 'addresses_WT_ht'}}
{'dst': {'same': False, 'congruent': 3, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 11, 'type': 'addresses_normal_ht'}}
{'dst': {'same': False, 'congruent': 8, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 2, 'type': 'addresses_WT_ht'}}
{'dst': {'same': False, 'congruent': 9, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 6, 'type': 'addresses_D_ht'}}
{'dst': {'same': False, 'NT': True, 'AVXalign': False, 'size': 2, 'type': 'addresses_WC_ht', 'congruent': 4}, 'OP': 'STOR'}
{'36': 21829}
36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36
*/
| 37.540541 | 2,999 | 0.661051 |
84ed469bd0ba97da09d4090a9ed8eea75b48a9d0 | 5,460 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca.log_21829_1064.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca.log_21829_1064.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca.log_21829_1064.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r11
push %r13
push %rax
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_normal_ht+0x1a6e7, %rax
nop
nop
cmp $122, %rdi
movw $0x6162, (%rax)
and $6627, %rbx
lea addresses_D_ht+0x4a5c, %rsi
lea addresses_normal_ht+0xa675, %rdi
nop
nop
nop
nop
inc %r10
mov $115, %rcx
rep movsb
nop
xor %rax, %rax
lea addresses_WT_ht+0x8249, %rsi
lea addresses_WC_ht+0x76c9, %rdi
nop
nop
add %r11, %r11
mov $108, %rcx
rep movsw
nop
nop
nop
nop
and $35342, %r13
lea addresses_normal_ht+0x132e9, %rdi
nop
nop
nop
nop
and $31812, %rbx
mov (%rdi), %r13w
nop
nop
dec %rbx
lea addresses_WC_ht+0x17cf7, %r10
and $63845, %rax
mov $0x6162636465666768, %rsi
movq %rsi, %xmm1
movups %xmm1, (%r10)
nop
nop
and $19944, %r11
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rax
pop %r13
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r13
push %r8
push %rbp
push %rcx
push %rdi
push %rdx
// Store
lea addresses_A+0x14c49, %rcx
nop
nop
nop
nop
nop
sub $61947, %rdx
mov $0x5152535455565758, %r12
movq %r12, %xmm2
vmovups %ymm2, (%rcx)
nop
cmp %rbp, %rbp
// Faulty Load
lea addresses_PSE+0x1749, %rcx
and %rdi, %rdi
mov (%rcx), %r13w
lea oracles, %rcx
and $0xff, %r13
shlq $12, %r13
mov (%rcx,%r13,1), %r13
pop %rdx
pop %rdi
pop %rcx
pop %rbp
pop %r8
pop %r13
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'size': 16, 'NT': False, 'type': 'addresses_PSE', 'same': False, 'AVXalign': False, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'size': 32, 'NT': False, 'type': 'addresses_A', 'same': False, 'AVXalign': False, 'congruent': 6}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'size': 2, 'NT': False, 'type': 'addresses_PSE', 'same': True, 'AVXalign': False, 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'size': 2, 'NT': False, 'type': 'addresses_normal_ht', 'same': True, 'AVXalign': False, 'congruent': 0}}
{'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_D_ht', 'congruent': 0}, 'dst': {'same': False, 'type': 'addresses_normal_ht', 'congruent': 0}}
{'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_WT_ht', 'congruent': 8}, 'dst': {'same': False, 'type': 'addresses_WC_ht', 'congruent': 6}}
{'OP': 'LOAD', 'src': {'size': 2, 'NT': False, 'type': 'addresses_normal_ht', 'same': True, 'AVXalign': False, 'congruent': 5}}
{'OP': 'STOR', 'dst': {'size': 16, 'NT': False, 'type': 'addresses_WC_ht', 'same': False, 'AVXalign': False, 'congruent': 1}}
{'33': 21829}
33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33
*/
| 43.68 | 2,999 | 0.661905 |
e926d87fbbe65d860c9392bc9c1f18ba1c52e68f | 652 | asm | Assembly | oeis/019/A019564.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/019/A019564.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/019/A019564.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A019564: Coordination sequence for C_8 lattice.
; Submitted by Christian Krause
; 1,128,2816,27008,157184,658048,2187520,6140800,15158272,33830016,69629696,134110592,244396544,425000576,710003968,1145628544,1793234944,2732779648,4066763520,5924704640,8468168192,11896386176,16452499712,22430456704,30182597632,40127962240,52761349888,68663166336,88510089728,113086588544,143297324288,180180471680,224921989120,278870872192,343555422976,420700567936,512246257152,620366977664,747492413696,896329286528,1069884406784,1271488971904,1504824141568,1773947923840,2083323404800
mul $0,2
seq $0,8416 ; Coordination sequence for 8-dimensional cubic lattice.
| 93.142857 | 490 | 0.874233 |
b550f8af1be2a24225573e07db51f3bb8e33fc80 | 28,340 | asm | Assembly | lib/cryptlib/crypt/s1-win32.asm | mtatton/qodem | 0b95200f30efb4e29f646b9df1dd770b46ddd3c2 | [
"CC0-1.0"
] | 131 | 2015-05-21T18:17:16.000Z | 2022-02-07T01:45:28.000Z | lib/cryptlib/crypt/s1-win32.asm | mtatton/qodem | 0b95200f30efb4e29f646b9df1dd770b46ddd3c2 | [
"CC0-1.0"
] | 86 | 2015-04-28T22:43:50.000Z | 2022-02-08T22:35:29.000Z | lib/cryptlib/crypt/s1-win32.asm | mtatton/qodem | 0b95200f30efb4e29f646b9df1dd770b46ddd3c2 | [
"CC0-1.0"
] | 32 | 2016-10-22T16:44:49.000Z | 2022-01-30T23:09:15.000Z | ; Don't even think of reading this code
; It was automatically generated by sha1-586.pl
; Which is a perl program used to generate the x86 assember for
; any of elf, a.out, BSDI, Win32, gaswin (for GNU as on Win32) or Solaris
; eric <eay@cryptsoft.com>
;
segment .text
global _sha1_block_asm_data_order
_sha1_block_asm_data_order:
mov ecx, [12+esp]
push esi
shl ecx, 6
mov esi, [12+esp]
push ebp
add ecx, esi
push ebx
mov ebp, [16+esp]
push edi
mov edx, [12+ebp]
sub esp, 108
mov edi, [16+ebp]
mov ebx, [8+ebp]
mov [68+esp], ecx
; First we need to setup the X array
L000start:
; First, load the words onto the stack in network byte order
mov eax, [esi]
mov ecx, [4+esi]
bswap eax
bswap ecx
mov [esp], eax
mov [4+esp], ecx
mov eax, [8+esi]
mov ecx, [12+esi]
bswap eax
bswap ecx
mov [8+esp], eax
mov [12+esp], ecx
mov eax, [16+esi]
mov ecx, [20+esi]
bswap eax
bswap ecx
mov [16+esp], eax
mov [20+esp], ecx
mov eax, [24+esi]
mov ecx, [28+esi]
bswap eax
bswap ecx
mov [24+esp], eax
mov [28+esp], ecx
mov eax, [32+esi]
mov ecx, [36+esi]
bswap eax
bswap ecx
mov [32+esp], eax
mov [36+esp], ecx
mov eax, [40+esi]
mov ecx, [44+esi]
bswap eax
bswap ecx
mov [40+esp], eax
mov [44+esp], ecx
mov eax, [48+esi]
mov ecx, [52+esi]
bswap eax
bswap ecx
mov [48+esp], eax
mov [52+esp], ecx
mov eax, [56+esi]
mov ecx, [60+esi]
bswap eax
bswap ecx
mov [56+esp], eax
mov [60+esp], ecx
; We now have the X array on the stack
; starting at sp-4
mov [132+esp], esi
L001shortcut:
;
; Start processing
mov eax, [ebp]
mov ecx, [4+ebp]
; 00_15 0
mov esi, ebx
mov ebp, eax
xor esi, edx
rol ebp, 5
and esi, ecx
add ebp, edi
ror ecx, 1
mov edi, [esp]
ror ecx, 1
xor esi, edx
lea ebp, [1518500249+edi*1+ebp]
mov edi, ecx
add esi, ebp
xor edi, ebx
mov ebp, esi
and edi, eax
rol ebp, 5
add ebp, edx
mov edx, [4+esp]
ror eax, 1
xor edi, ebx
ror eax, 1
lea ebp, [1518500249+edx*1+ebp]
add edi, ebp
; 00_15 2
mov edx, eax
mov ebp, edi
xor edx, ecx
rol ebp, 5
and edx, esi
add ebp, ebx
ror esi, 1
mov ebx, [8+esp]
ror esi, 1
xor edx, ecx
lea ebp, [1518500249+ebx*1+ebp]
mov ebx, esi
add edx, ebp
xor ebx, eax
mov ebp, edx
and ebx, edi
rol ebp, 5
add ebp, ecx
mov ecx, [12+esp]
ror edi, 1
xor ebx, eax
ror edi, 1
lea ebp, [1518500249+ecx*1+ebp]
add ebx, ebp
; 00_15 4
mov ecx, edi
mov ebp, ebx
xor ecx, esi
rol ebp, 5
and ecx, edx
add ebp, eax
ror edx, 1
mov eax, [16+esp]
ror edx, 1
xor ecx, esi
lea ebp, [1518500249+eax*1+ebp]
mov eax, edx
add ecx, ebp
xor eax, edi
mov ebp, ecx
and eax, ebx
rol ebp, 5
add ebp, esi
mov esi, [20+esp]
ror ebx, 1
xor eax, edi
ror ebx, 1
lea ebp, [1518500249+esi*1+ebp]
add eax, ebp
; 00_15 6
mov esi, ebx
mov ebp, eax
xor esi, edx
rol ebp, 5
and esi, ecx
add ebp, edi
ror ecx, 1
mov edi, [24+esp]
ror ecx, 1
xor esi, edx
lea ebp, [1518500249+edi*1+ebp]
mov edi, ecx
add esi, ebp
xor edi, ebx
mov ebp, esi
and edi, eax
rol ebp, 5
add ebp, edx
mov edx, [28+esp]
ror eax, 1
xor edi, ebx
ror eax, 1
lea ebp, [1518500249+edx*1+ebp]
add edi, ebp
; 00_15 8
mov edx, eax
mov ebp, edi
xor edx, ecx
rol ebp, 5
and edx, esi
add ebp, ebx
ror esi, 1
mov ebx, [32+esp]
ror esi, 1
xor edx, ecx
lea ebp, [1518500249+ebx*1+ebp]
mov ebx, esi
add edx, ebp
xor ebx, eax
mov ebp, edx
and ebx, edi
rol ebp, 5
add ebp, ecx
mov ecx, [36+esp]
ror edi, 1
xor ebx, eax
ror edi, 1
lea ebp, [1518500249+ecx*1+ebp]
add ebx, ebp
; 00_15 10
mov ecx, edi
mov ebp, ebx
xor ecx, esi
rol ebp, 5
and ecx, edx
add ebp, eax
ror edx, 1
mov eax, [40+esp]
ror edx, 1
xor ecx, esi
lea ebp, [1518500249+eax*1+ebp]
mov eax, edx
add ecx, ebp
xor eax, edi
mov ebp, ecx
and eax, ebx
rol ebp, 5
add ebp, esi
mov esi, [44+esp]
ror ebx, 1
xor eax, edi
ror ebx, 1
lea ebp, [1518500249+esi*1+ebp]
add eax, ebp
; 00_15 12
mov esi, ebx
mov ebp, eax
xor esi, edx
rol ebp, 5
and esi, ecx
add ebp, edi
ror ecx, 1
mov edi, [48+esp]
ror ecx, 1
xor esi, edx
lea ebp, [1518500249+edi*1+ebp]
mov edi, ecx
add esi, ebp
xor edi, ebx
mov ebp, esi
and edi, eax
rol ebp, 5
add ebp, edx
mov edx, [52+esp]
ror eax, 1
xor edi, ebx
ror eax, 1
lea ebp, [1518500249+edx*1+ebp]
add edi, ebp
; 00_15 14
mov edx, eax
mov ebp, edi
xor edx, ecx
rol ebp, 5
and edx, esi
add ebp, ebx
ror esi, 1
mov ebx, [56+esp]
ror esi, 1
xor edx, ecx
lea ebp, [1518500249+ebx*1+ebp]
mov ebx, esi
add edx, ebp
xor ebx, eax
mov ebp, edx
and ebx, edi
rol ebp, 5
add ebp, ecx
mov ecx, [60+esp]
ror edi, 1
xor ebx, eax
ror edi, 1
lea ebp, [1518500249+ecx*1+ebp]
add ebx, ebp
; 16_19 16
nop
mov ebp, [esp]
mov ecx, [8+esp]
xor ecx, ebp
mov ebp, [32+esp]
xor ecx, ebp
mov ebp, [52+esp]
xor ecx, ebp
mov ebp, edi
rol ecx, 1
xor ebp, esi
mov [esp], ecx
and ebp, edx
lea ecx, [1518500249+eax*1+ecx]
xor ebp, esi
mov eax, ebx
add ecx, ebp
rol eax, 5
ror edx, 1
add ecx, eax
mov eax, [4+esp]
mov ebp, [12+esp]
xor eax, ebp
mov ebp, [36+esp]
xor eax, ebp
mov ebp, [56+esp]
ror edx, 1
xor eax, ebp
rol eax, 1
mov ebp, edx
xor ebp, edi
mov [4+esp], eax
and ebp, ebx
lea eax, [1518500249+esi*1+eax]
xor ebp, edi
mov esi, ecx
rol esi, 5
ror ebx, 1
add eax, esi
ror ebx, 1
add eax, ebp
; 16_19 18
mov ebp, [8+esp]
mov esi, [16+esp]
xor esi, ebp
mov ebp, [40+esp]
xor esi, ebp
mov ebp, [60+esp]
xor esi, ebp
mov ebp, ebx
rol esi, 1
xor ebp, edx
mov [8+esp], esi
and ebp, ecx
lea esi, [1518500249+edi*1+esi]
xor ebp, edx
mov edi, eax
add esi, ebp
rol edi, 5
ror ecx, 1
add esi, edi
mov edi, [12+esp]
mov ebp, [20+esp]
xor edi, ebp
mov ebp, [44+esp]
xor edi, ebp
mov ebp, [esp]
ror ecx, 1
xor edi, ebp
rol edi, 1
mov ebp, ecx
xor ebp, ebx
mov [12+esp], edi
and ebp, eax
lea edi, [1518500249+edx*1+edi]
xor ebp, ebx
mov edx, esi
rol edx, 5
ror eax, 1
add edi, edx
ror eax, 1
add edi, ebp
; 20_39 20
mov edx, [16+esp]
mov ebp, [24+esp]
xor edx, ebp
mov ebp, [48+esp]
xor edx, ebp
mov ebp, [4+esp]
xor edx, ebp
mov ebp, esi
rol edx, 1
xor ebp, eax
mov [16+esp], edx
xor ebp, ecx
lea edx, [1859775393+ebx*1+edx]
mov ebx, edi
rol ebx, 5
ror esi, 1
add ebx, ebp
ror esi, 1
add edx, ebx
; 20_39 21
mov ebx, [20+esp]
mov ebp, [28+esp]
xor ebx, ebp
mov ebp, [52+esp]
xor ebx, ebp
mov ebp, [8+esp]
xor ebx, ebp
mov ebp, edi
rol ebx, 1
xor ebp, esi
mov [20+esp], ebx
xor ebp, eax
lea ebx, [1859775393+ecx*1+ebx]
mov ecx, edx
rol ecx, 5
ror edi, 1
add ecx, ebp
ror edi, 1
add ebx, ecx
; 20_39 22
mov ecx, [24+esp]
mov ebp, [32+esp]
xor ecx, ebp
mov ebp, [56+esp]
xor ecx, ebp
mov ebp, [12+esp]
xor ecx, ebp
mov ebp, edx
rol ecx, 1
xor ebp, edi
mov [24+esp], ecx
xor ebp, esi
lea ecx, [1859775393+eax*1+ecx]
mov eax, ebx
rol eax, 5
ror edx, 1
add eax, ebp
ror edx, 1
add ecx, eax
; 20_39 23
mov eax, [28+esp]
mov ebp, [36+esp]
xor eax, ebp
mov ebp, [60+esp]
xor eax, ebp
mov ebp, [16+esp]
xor eax, ebp
mov ebp, ebx
rol eax, 1
xor ebp, edx
mov [28+esp], eax
xor ebp, edi
lea eax, [1859775393+esi*1+eax]
mov esi, ecx
rol esi, 5
ror ebx, 1
add esi, ebp
ror ebx, 1
add eax, esi
; 20_39 24
mov esi, [32+esp]
mov ebp, [40+esp]
xor esi, ebp
mov ebp, [esp]
xor esi, ebp
mov ebp, [20+esp]
xor esi, ebp
mov ebp, ecx
rol esi, 1
xor ebp, ebx
mov [32+esp], esi
xor ebp, edx
lea esi, [1859775393+edi*1+esi]
mov edi, eax
rol edi, 5
ror ecx, 1
add edi, ebp
ror ecx, 1
add esi, edi
; 20_39 25
mov edi, [36+esp]
mov ebp, [44+esp]
xor edi, ebp
mov ebp, [4+esp]
xor edi, ebp
mov ebp, [24+esp]
xor edi, ebp
mov ebp, eax
rol edi, 1
xor ebp, ecx
mov [36+esp], edi
xor ebp, ebx
lea edi, [1859775393+edx*1+edi]
mov edx, esi
rol edx, 5
ror eax, 1
add edx, ebp
ror eax, 1
add edi, edx
; 20_39 26
mov edx, [40+esp]
mov ebp, [48+esp]
xor edx, ebp
mov ebp, [8+esp]
xor edx, ebp
mov ebp, [28+esp]
xor edx, ebp
mov ebp, esi
rol edx, 1
xor ebp, eax
mov [40+esp], edx
xor ebp, ecx
lea edx, [1859775393+ebx*1+edx]
mov ebx, edi
rol ebx, 5
ror esi, 1
add ebx, ebp
ror esi, 1
add edx, ebx
; 20_39 27
mov ebx, [44+esp]
mov ebp, [52+esp]
xor ebx, ebp
mov ebp, [12+esp]
xor ebx, ebp
mov ebp, [32+esp]
xor ebx, ebp
mov ebp, edi
rol ebx, 1
xor ebp, esi
mov [44+esp], ebx
xor ebp, eax
lea ebx, [1859775393+ecx*1+ebx]
mov ecx, edx
rol ecx, 5
ror edi, 1
add ecx, ebp
ror edi, 1
add ebx, ecx
; 20_39 28
mov ecx, [48+esp]
mov ebp, [56+esp]
xor ecx, ebp
mov ebp, [16+esp]
xor ecx, ebp
mov ebp, [36+esp]
xor ecx, ebp
mov ebp, edx
rol ecx, 1
xor ebp, edi
mov [48+esp], ecx
xor ebp, esi
lea ecx, [1859775393+eax*1+ecx]
mov eax, ebx
rol eax, 5
ror edx, 1
add eax, ebp
ror edx, 1
add ecx, eax
; 20_39 29
mov eax, [52+esp]
mov ebp, [60+esp]
xor eax, ebp
mov ebp, [20+esp]
xor eax, ebp
mov ebp, [40+esp]
xor eax, ebp
mov ebp, ebx
rol eax, 1
xor ebp, edx
mov [52+esp], eax
xor ebp, edi
lea eax, [1859775393+esi*1+eax]
mov esi, ecx
rol esi, 5
ror ebx, 1
add esi, ebp
ror ebx, 1
add eax, esi
; 20_39 30
mov esi, [56+esp]
mov ebp, [esp]
xor esi, ebp
mov ebp, [24+esp]
xor esi, ebp
mov ebp, [44+esp]
xor esi, ebp
mov ebp, ecx
rol esi, 1
xor ebp, ebx
mov [56+esp], esi
xor ebp, edx
lea esi, [1859775393+edi*1+esi]
mov edi, eax
rol edi, 5
ror ecx, 1
add edi, ebp
ror ecx, 1
add esi, edi
; 20_39 31
mov edi, [60+esp]
mov ebp, [4+esp]
xor edi, ebp
mov ebp, [28+esp]
xor edi, ebp
mov ebp, [48+esp]
xor edi, ebp
mov ebp, eax
rol edi, 1
xor ebp, ecx
mov [60+esp], edi
xor ebp, ebx
lea edi, [1859775393+edx*1+edi]
mov edx, esi
rol edx, 5
ror eax, 1
add edx, ebp
ror eax, 1
add edi, edx
; 20_39 32
mov edx, [esp]
mov ebp, [8+esp]
xor edx, ebp
mov ebp, [32+esp]
xor edx, ebp
mov ebp, [52+esp]
xor edx, ebp
mov ebp, esi
rol edx, 1
xor ebp, eax
mov [esp], edx
xor ebp, ecx
lea edx, [1859775393+ebx*1+edx]
mov ebx, edi
rol ebx, 5
ror esi, 1
add ebx, ebp
ror esi, 1
add edx, ebx
; 20_39 33
mov ebx, [4+esp]
mov ebp, [12+esp]
xor ebx, ebp
mov ebp, [36+esp]
xor ebx, ebp
mov ebp, [56+esp]
xor ebx, ebp
mov ebp, edi
rol ebx, 1
xor ebp, esi
mov [4+esp], ebx
xor ebp, eax
lea ebx, [1859775393+ecx*1+ebx]
mov ecx, edx
rol ecx, 5
ror edi, 1
add ecx, ebp
ror edi, 1
add ebx, ecx
; 20_39 34
mov ecx, [8+esp]
mov ebp, [16+esp]
xor ecx, ebp
mov ebp, [40+esp]
xor ecx, ebp
mov ebp, [60+esp]
xor ecx, ebp
mov ebp, edx
rol ecx, 1
xor ebp, edi
mov [8+esp], ecx
xor ebp, esi
lea ecx, [1859775393+eax*1+ecx]
mov eax, ebx
rol eax, 5
ror edx, 1
add eax, ebp
ror edx, 1
add ecx, eax
; 20_39 35
mov eax, [12+esp]
mov ebp, [20+esp]
xor eax, ebp
mov ebp, [44+esp]
xor eax, ebp
mov ebp, [esp]
xor eax, ebp
mov ebp, ebx
rol eax, 1
xor ebp, edx
mov [12+esp], eax
xor ebp, edi
lea eax, [1859775393+esi*1+eax]
mov esi, ecx
rol esi, 5
ror ebx, 1
add esi, ebp
ror ebx, 1
add eax, esi
; 20_39 36
mov esi, [16+esp]
mov ebp, [24+esp]
xor esi, ebp
mov ebp, [48+esp]
xor esi, ebp
mov ebp, [4+esp]
xor esi, ebp
mov ebp, ecx
rol esi, 1
xor ebp, ebx
mov [16+esp], esi
xor ebp, edx
lea esi, [1859775393+edi*1+esi]
mov edi, eax
rol edi, 5
ror ecx, 1
add edi, ebp
ror ecx, 1
add esi, edi
; 20_39 37
mov edi, [20+esp]
mov ebp, [28+esp]
xor edi, ebp
mov ebp, [52+esp]
xor edi, ebp
mov ebp, [8+esp]
xor edi, ebp
mov ebp, eax
rol edi, 1
xor ebp, ecx
mov [20+esp], edi
xor ebp, ebx
lea edi, [1859775393+edx*1+edi]
mov edx, esi
rol edx, 5
ror eax, 1
add edx, ebp
ror eax, 1
add edi, edx
; 20_39 38
mov edx, [24+esp]
mov ebp, [32+esp]
xor edx, ebp
mov ebp, [56+esp]
xor edx, ebp
mov ebp, [12+esp]
xor edx, ebp
mov ebp, esi
rol edx, 1
xor ebp, eax
mov [24+esp], edx
xor ebp, ecx
lea edx, [1859775393+ebx*1+edx]
mov ebx, edi
rol ebx, 5
ror esi, 1
add ebx, ebp
ror esi, 1
add edx, ebx
; 20_39 39
mov ebx, [28+esp]
mov ebp, [36+esp]
xor ebx, ebp
mov ebp, [60+esp]
xor ebx, ebp
mov ebp, [16+esp]
xor ebx, ebp
mov ebp, edi
rol ebx, 1
xor ebp, esi
mov [28+esp], ebx
xor ebp, eax
lea ebx, [1859775393+ecx*1+ebx]
mov ecx, edx
rol ecx, 5
ror edi, 1
add ecx, ebp
ror edi, 1
add ebx, ecx
; 40_59 40
mov ecx, [32+esp]
mov ebp, [40+esp]
xor ecx, ebp
mov ebp, [esp]
xor ecx, ebp
mov ebp, [20+esp]
xor ecx, ebp
mov ebp, edx
rol ecx, 1
or ebp, edi
mov [32+esp], ecx
and ebp, esi
lea ecx, [2400959708+eax*1+ecx]
mov eax, edx
ror edx, 1
and eax, edi
or ebp, eax
mov eax, ebx
rol eax, 5
add ebp, eax
mov eax, [36+esp]
add ecx, ebp
mov ebp, [44+esp]
xor eax, ebp
mov ebp, [4+esp]
xor eax, ebp
mov ebp, [24+esp]
ror edx, 1
xor eax, ebp
rol eax, 1
mov ebp, ebx
mov [36+esp], eax
or ebp, edx
lea eax, [2400959708+esi*1+eax]
mov esi, ebx
and ebp, edi
and esi, edx
or ebp, esi
mov esi, ecx
rol esi, 5
ror ebx, 1
add ebp, esi
ror ebx, 1
add eax, ebp
; 40_59 41
; 40_59 42
mov esi, [40+esp]
mov ebp, [48+esp]
xor esi, ebp
mov ebp, [8+esp]
xor esi, ebp
mov ebp, [28+esp]
xor esi, ebp
mov ebp, ecx
rol esi, 1
or ebp, ebx
mov [40+esp], esi
and ebp, edx
lea esi, [2400959708+edi*1+esi]
mov edi, ecx
ror ecx, 1
and edi, ebx
or ebp, edi
mov edi, eax
rol edi, 5
add ebp, edi
mov edi, [44+esp]
add esi, ebp
mov ebp, [52+esp]
xor edi, ebp
mov ebp, [12+esp]
xor edi, ebp
mov ebp, [32+esp]
ror ecx, 1
xor edi, ebp
rol edi, 1
mov ebp, eax
mov [44+esp], edi
or ebp, ecx
lea edi, [2400959708+edx*1+edi]
mov edx, eax
and ebp, ebx
and edx, ecx
or ebp, edx
mov edx, esi
rol edx, 5
ror eax, 1
add ebp, edx
ror eax, 1
add edi, ebp
; 40_59 43
; 40_59 44
mov edx, [48+esp]
mov ebp, [56+esp]
xor edx, ebp
mov ebp, [16+esp]
xor edx, ebp
mov ebp, [36+esp]
xor edx, ebp
mov ebp, esi
rol edx, 1
or ebp, eax
mov [48+esp], edx
and ebp, ecx
lea edx, [2400959708+ebx*1+edx]
mov ebx, esi
ror esi, 1
and ebx, eax
or ebp, ebx
mov ebx, edi
rol ebx, 5
add ebp, ebx
mov ebx, [52+esp]
add edx, ebp
mov ebp, [60+esp]
xor ebx, ebp
mov ebp, [20+esp]
xor ebx, ebp
mov ebp, [40+esp]
ror esi, 1
xor ebx, ebp
rol ebx, 1
mov ebp, edi
mov [52+esp], ebx
or ebp, esi
lea ebx, [2400959708+ecx*1+ebx]
mov ecx, edi
and ebp, eax
and ecx, esi
or ebp, ecx
mov ecx, edx
rol ecx, 5
ror edi, 1
add ebp, ecx
ror edi, 1
add ebx, ebp
; 40_59 45
; 40_59 46
mov ecx, [56+esp]
mov ebp, [esp]
xor ecx, ebp
mov ebp, [24+esp]
xor ecx, ebp
mov ebp, [44+esp]
xor ecx, ebp
mov ebp, edx
rol ecx, 1
or ebp, edi
mov [56+esp], ecx
and ebp, esi
lea ecx, [2400959708+eax*1+ecx]
mov eax, edx
ror edx, 1
and eax, edi
or ebp, eax
mov eax, ebx
rol eax, 5
add ebp, eax
mov eax, [60+esp]
add ecx, ebp
mov ebp, [4+esp]
xor eax, ebp
mov ebp, [28+esp]
xor eax, ebp
mov ebp, [48+esp]
ror edx, 1
xor eax, ebp
rol eax, 1
mov ebp, ebx
mov [60+esp], eax
or ebp, edx
lea eax, [2400959708+esi*1+eax]
mov esi, ebx
and ebp, edi
and esi, edx
or ebp, esi
mov esi, ecx
rol esi, 5
ror ebx, 1
add ebp, esi
ror ebx, 1
add eax, ebp
; 40_59 47
; 40_59 48
mov esi, [esp]
mov ebp, [8+esp]
xor esi, ebp
mov ebp, [32+esp]
xor esi, ebp
mov ebp, [52+esp]
xor esi, ebp
mov ebp, ecx
rol esi, 1
or ebp, ebx
mov [esp], esi
and ebp, edx
lea esi, [2400959708+edi*1+esi]
mov edi, ecx
ror ecx, 1
and edi, ebx
or ebp, edi
mov edi, eax
rol edi, 5
add ebp, edi
mov edi, [4+esp]
add esi, ebp
mov ebp, [12+esp]
xor edi, ebp
mov ebp, [36+esp]
xor edi, ebp
mov ebp, [56+esp]
ror ecx, 1
xor edi, ebp
rol edi, 1
mov ebp, eax
mov [4+esp], edi
or ebp, ecx
lea edi, [2400959708+edx*1+edi]
mov edx, eax
and ebp, ebx
and edx, ecx
or ebp, edx
mov edx, esi
rol edx, 5
ror eax, 1
add ebp, edx
ror eax, 1
add edi, ebp
; 40_59 49
; 40_59 50
mov edx, [8+esp]
mov ebp, [16+esp]
xor edx, ebp
mov ebp, [40+esp]
xor edx, ebp
mov ebp, [60+esp]
xor edx, ebp
mov ebp, esi
rol edx, 1
or ebp, eax
mov [8+esp], edx
and ebp, ecx
lea edx, [2400959708+ebx*1+edx]
mov ebx, esi
ror esi, 1
and ebx, eax
or ebp, ebx
mov ebx, edi
rol ebx, 5
add ebp, ebx
mov ebx, [12+esp]
add edx, ebp
mov ebp, [20+esp]
xor ebx, ebp
mov ebp, [44+esp]
xor ebx, ebp
mov ebp, [esp]
ror esi, 1
xor ebx, ebp
rol ebx, 1
mov ebp, edi
mov [12+esp], ebx
or ebp, esi
lea ebx, [2400959708+ecx*1+ebx]
mov ecx, edi
and ebp, eax
and ecx, esi
or ebp, ecx
mov ecx, edx
rol ecx, 5
ror edi, 1
add ebp, ecx
ror edi, 1
add ebx, ebp
; 40_59 51
; 40_59 52
mov ecx, [16+esp]
mov ebp, [24+esp]
xor ecx, ebp
mov ebp, [48+esp]
xor ecx, ebp
mov ebp, [4+esp]
xor ecx, ebp
mov ebp, edx
rol ecx, 1
or ebp, edi
mov [16+esp], ecx
and ebp, esi
lea ecx, [2400959708+eax*1+ecx]
mov eax, edx
ror edx, 1
and eax, edi
or ebp, eax
mov eax, ebx
rol eax, 5
add ebp, eax
mov eax, [20+esp]
add ecx, ebp
mov ebp, [28+esp]
xor eax, ebp
mov ebp, [52+esp]
xor eax, ebp
mov ebp, [8+esp]
ror edx, 1
xor eax, ebp
rol eax, 1
mov ebp, ebx
mov [20+esp], eax
or ebp, edx
lea eax, [2400959708+esi*1+eax]
mov esi, ebx
and ebp, edi
and esi, edx
or ebp, esi
mov esi, ecx
rol esi, 5
ror ebx, 1
add ebp, esi
ror ebx, 1
add eax, ebp
; 40_59 53
; 40_59 54
mov esi, [24+esp]
mov ebp, [32+esp]
xor esi, ebp
mov ebp, [56+esp]
xor esi, ebp
mov ebp, [12+esp]
xor esi, ebp
mov ebp, ecx
rol esi, 1
or ebp, ebx
mov [24+esp], esi
and ebp, edx
lea esi, [2400959708+edi*1+esi]
mov edi, ecx
ror ecx, 1
and edi, ebx
or ebp, edi
mov edi, eax
rol edi, 5
add ebp, edi
mov edi, [28+esp]
add esi, ebp
mov ebp, [36+esp]
xor edi, ebp
mov ebp, [60+esp]
xor edi, ebp
mov ebp, [16+esp]
ror ecx, 1
xor edi, ebp
rol edi, 1
mov ebp, eax
mov [28+esp], edi
or ebp, ecx
lea edi, [2400959708+edx*1+edi]
mov edx, eax
and ebp, ebx
and edx, ecx
or ebp, edx
mov edx, esi
rol edx, 5
ror eax, 1
add ebp, edx
ror eax, 1
add edi, ebp
; 40_59 55
; 40_59 56
mov edx, [32+esp]
mov ebp, [40+esp]
xor edx, ebp
mov ebp, [esp]
xor edx, ebp
mov ebp, [20+esp]
xor edx, ebp
mov ebp, esi
rol edx, 1
or ebp, eax
mov [32+esp], edx
and ebp, ecx
lea edx, [2400959708+ebx*1+edx]
mov ebx, esi
ror esi, 1
and ebx, eax
or ebp, ebx
mov ebx, edi
rol ebx, 5
add ebp, ebx
mov ebx, [36+esp]
add edx, ebp
mov ebp, [44+esp]
xor ebx, ebp
mov ebp, [4+esp]
xor ebx, ebp
mov ebp, [24+esp]
ror esi, 1
xor ebx, ebp
rol ebx, 1
mov ebp, edi
mov [36+esp], ebx
or ebp, esi
lea ebx, [2400959708+ecx*1+ebx]
mov ecx, edi
and ebp, eax
and ecx, esi
or ebp, ecx
mov ecx, edx
rol ecx, 5
ror edi, 1
add ebp, ecx
ror edi, 1
add ebx, ebp
; 40_59 57
; 40_59 58
mov ecx, [40+esp]
mov ebp, [48+esp]
xor ecx, ebp
mov ebp, [8+esp]
xor ecx, ebp
mov ebp, [28+esp]
xor ecx, ebp
mov ebp, edx
rol ecx, 1
or ebp, edi
mov [40+esp], ecx
and ebp, esi
lea ecx, [2400959708+eax*1+ecx]
mov eax, edx
ror edx, 1
and eax, edi
or ebp, eax
mov eax, ebx
rol eax, 5
add ebp, eax
mov eax, [44+esp]
add ecx, ebp
mov ebp, [52+esp]
xor eax, ebp
mov ebp, [12+esp]
xor eax, ebp
mov ebp, [32+esp]
ror edx, 1
xor eax, ebp
rol eax, 1
mov ebp, ebx
mov [44+esp], eax
or ebp, edx
lea eax, [2400959708+esi*1+eax]
mov esi, ebx
and ebp, edi
and esi, edx
or ebp, esi
mov esi, ecx
rol esi, 5
ror ebx, 1
add ebp, esi
ror ebx, 1
add eax, ebp
; 40_59 59
; 20_39 60
mov esi, [48+esp]
mov ebp, [56+esp]
xor esi, ebp
mov ebp, [16+esp]
xor esi, ebp
mov ebp, [36+esp]
xor esi, ebp
mov ebp, ecx
rol esi, 1
xor ebp, ebx
mov [48+esp], esi
xor ebp, edx
lea esi, [3395469782+edi*1+esi]
mov edi, eax
rol edi, 5
ror ecx, 1
add edi, ebp
ror ecx, 1
add esi, edi
; 20_39 61
mov edi, [52+esp]
mov ebp, [60+esp]
xor edi, ebp
mov ebp, [20+esp]
xor edi, ebp
mov ebp, [40+esp]
xor edi, ebp
mov ebp, eax
rol edi, 1
xor ebp, ecx
mov [52+esp], edi
xor ebp, ebx
lea edi, [3395469782+edx*1+edi]
mov edx, esi
rol edx, 5
ror eax, 1
add edx, ebp
ror eax, 1
add edi, edx
; 20_39 62
mov edx, [56+esp]
mov ebp, [esp]
xor edx, ebp
mov ebp, [24+esp]
xor edx, ebp
mov ebp, [44+esp]
xor edx, ebp
mov ebp, esi
rol edx, 1
xor ebp, eax
mov [56+esp], edx
xor ebp, ecx
lea edx, [3395469782+ebx*1+edx]
mov ebx, edi
rol ebx, 5
ror esi, 1
add ebx, ebp
ror esi, 1
add edx, ebx
; 20_39 63
mov ebx, [60+esp]
mov ebp, [4+esp]
xor ebx, ebp
mov ebp, [28+esp]
xor ebx, ebp
mov ebp, [48+esp]
xor ebx, ebp
mov ebp, edi
rol ebx, 1
xor ebp, esi
mov [60+esp], ebx
xor ebp, eax
lea ebx, [3395469782+ecx*1+ebx]
mov ecx, edx
rol ecx, 5
ror edi, 1
add ecx, ebp
ror edi, 1
add ebx, ecx
; 20_39 64
mov ecx, [esp]
mov ebp, [8+esp]
xor ecx, ebp
mov ebp, [32+esp]
xor ecx, ebp
mov ebp, [52+esp]
xor ecx, ebp
mov ebp, edx
rol ecx, 1
xor ebp, edi
mov [esp], ecx
xor ebp, esi
lea ecx, [3395469782+eax*1+ecx]
mov eax, ebx
rol eax, 5
ror edx, 1
add eax, ebp
ror edx, 1
add ecx, eax
; 20_39 65
mov eax, [4+esp]
mov ebp, [12+esp]
xor eax, ebp
mov ebp, [36+esp]
xor eax, ebp
mov ebp, [56+esp]
xor eax, ebp
mov ebp, ebx
rol eax, 1
xor ebp, edx
mov [4+esp], eax
xor ebp, edi
lea eax, [3395469782+esi*1+eax]
mov esi, ecx
rol esi, 5
ror ebx, 1
add esi, ebp
ror ebx, 1
add eax, esi
; 20_39 66
mov esi, [8+esp]
mov ebp, [16+esp]
xor esi, ebp
mov ebp, [40+esp]
xor esi, ebp
mov ebp, [60+esp]
xor esi, ebp
mov ebp, ecx
rol esi, 1
xor ebp, ebx
mov [8+esp], esi
xor ebp, edx
lea esi, [3395469782+edi*1+esi]
mov edi, eax
rol edi, 5
ror ecx, 1
add edi, ebp
ror ecx, 1
add esi, edi
; 20_39 67
mov edi, [12+esp]
mov ebp, [20+esp]
xor edi, ebp
mov ebp, [44+esp]
xor edi, ebp
mov ebp, [esp]
xor edi, ebp
mov ebp, eax
rol edi, 1
xor ebp, ecx
mov [12+esp], edi
xor ebp, ebx
lea edi, [3395469782+edx*1+edi]
mov edx, esi
rol edx, 5
ror eax, 1
add edx, ebp
ror eax, 1
add edi, edx
; 20_39 68
mov edx, [16+esp]
mov ebp, [24+esp]
xor edx, ebp
mov ebp, [48+esp]
xor edx, ebp
mov ebp, [4+esp]
xor edx, ebp
mov ebp, esi
rol edx, 1
xor ebp, eax
mov [16+esp], edx
xor ebp, ecx
lea edx, [3395469782+ebx*1+edx]
mov ebx, edi
rol ebx, 5
ror esi, 1
add ebx, ebp
ror esi, 1
add edx, ebx
; 20_39 69
mov ebx, [20+esp]
mov ebp, [28+esp]
xor ebx, ebp
mov ebp, [52+esp]
xor ebx, ebp
mov ebp, [8+esp]
xor ebx, ebp
mov ebp, edi
rol ebx, 1
xor ebp, esi
mov [20+esp], ebx
xor ebp, eax
lea ebx, [3395469782+ecx*1+ebx]
mov ecx, edx
rol ecx, 5
ror edi, 1
add ecx, ebp
ror edi, 1
add ebx, ecx
; 20_39 70
mov ecx, [24+esp]
mov ebp, [32+esp]
xor ecx, ebp
mov ebp, [56+esp]
xor ecx, ebp
mov ebp, [12+esp]
xor ecx, ebp
mov ebp, edx
rol ecx, 1
xor ebp, edi
mov [24+esp], ecx
xor ebp, esi
lea ecx, [3395469782+eax*1+ecx]
mov eax, ebx
rol eax, 5
ror edx, 1
add eax, ebp
ror edx, 1
add ecx, eax
; 20_39 71
mov eax, [28+esp]
mov ebp, [36+esp]
xor eax, ebp
mov ebp, [60+esp]
xor eax, ebp
mov ebp, [16+esp]
xor eax, ebp
mov ebp, ebx
rol eax, 1
xor ebp, edx
mov [28+esp], eax
xor ebp, edi
lea eax, [3395469782+esi*1+eax]
mov esi, ecx
rol esi, 5
ror ebx, 1
add esi, ebp
ror ebx, 1
add eax, esi
; 20_39 72
mov esi, [32+esp]
mov ebp, [40+esp]
xor esi, ebp
mov ebp, [esp]
xor esi, ebp
mov ebp, [20+esp]
xor esi, ebp
mov ebp, ecx
rol esi, 1
xor ebp, ebx
mov [32+esp], esi
xor ebp, edx
lea esi, [3395469782+edi*1+esi]
mov edi, eax
rol edi, 5
ror ecx, 1
add edi, ebp
ror ecx, 1
add esi, edi
; 20_39 73
mov edi, [36+esp]
mov ebp, [44+esp]
xor edi, ebp
mov ebp, [4+esp]
xor edi, ebp
mov ebp, [24+esp]
xor edi, ebp
mov ebp, eax
rol edi, 1
xor ebp, ecx
mov [36+esp], edi
xor ebp, ebx
lea edi, [3395469782+edx*1+edi]
mov edx, esi
rol edx, 5
ror eax, 1
add edx, ebp
ror eax, 1
add edi, edx
; 20_39 74
mov edx, [40+esp]
mov ebp, [48+esp]
xor edx, ebp
mov ebp, [8+esp]
xor edx, ebp
mov ebp, [28+esp]
xor edx, ebp
mov ebp, esi
rol edx, 1
xor ebp, eax
mov [40+esp], edx
xor ebp, ecx
lea edx, [3395469782+ebx*1+edx]
mov ebx, edi
rol ebx, 5
ror esi, 1
add ebx, ebp
ror esi, 1
add edx, ebx
; 20_39 75
mov ebx, [44+esp]
mov ebp, [52+esp]
xor ebx, ebp
mov ebp, [12+esp]
xor ebx, ebp
mov ebp, [32+esp]
xor ebx, ebp
mov ebp, edi
rol ebx, 1
xor ebp, esi
mov [44+esp], ebx
xor ebp, eax
lea ebx, [3395469782+ecx*1+ebx]
mov ecx, edx
rol ecx, 5
ror edi, 1
add ecx, ebp
ror edi, 1
add ebx, ecx
; 20_39 76
mov ecx, [48+esp]
mov ebp, [56+esp]
xor ecx, ebp
mov ebp, [16+esp]
xor ecx, ebp
mov ebp, [36+esp]
xor ecx, ebp
mov ebp, edx
rol ecx, 1
xor ebp, edi
mov [48+esp], ecx
xor ebp, esi
lea ecx, [3395469782+eax*1+ecx]
mov eax, ebx
rol eax, 5
ror edx, 1
add eax, ebp
ror edx, 1
add ecx, eax
; 20_39 77
mov eax, [52+esp]
mov ebp, [60+esp]
xor eax, ebp
mov ebp, [20+esp]
xor eax, ebp
mov ebp, [40+esp]
xor eax, ebp
mov ebp, ebx
rol eax, 1
xor ebp, edx
mov [52+esp], eax
xor ebp, edi
lea eax, [3395469782+esi*1+eax]
mov esi, ecx
rol esi, 5
ror ebx, 1
add esi, ebp
ror ebx, 1
add eax, esi
; 20_39 78
mov esi, [56+esp]
mov ebp, [esp]
xor esi, ebp
mov ebp, [24+esp]
xor esi, ebp
mov ebp, [44+esp]
xor esi, ebp
mov ebp, ecx
rol esi, 1
xor ebp, ebx
mov [56+esp], esi
xor ebp, edx
lea esi, [3395469782+edi*1+esi]
mov edi, eax
rol edi, 5
ror ecx, 1
add edi, ebp
ror ecx, 1
add esi, edi
; 20_39 79
mov edi, [60+esp]
mov ebp, [4+esp]
xor edi, ebp
mov ebp, [28+esp]
xor edi, ebp
mov ebp, [48+esp]
xor edi, ebp
mov ebp, eax
rol edi, 1
xor ebp, ecx
mov [60+esp], edi
xor ebp, ebx
lea edi, [3395469782+edx*1+edi]
mov edx, esi
rol edx, 5
add edx, ebp
mov ebp, [128+esp]
ror eax, 1
add edi, edx
ror eax, 1
; End processing
;
mov edx, [12+ebp]
add edx, ecx
mov ecx, [4+ebp]
add ecx, esi
mov esi, eax
mov eax, [ebp]
mov [12+ebp], edx
add eax, edi
mov edi, [16+ebp]
add edi, ebx
mov ebx, [8+ebp]
add ebx, esi
mov [ebp], eax
mov esi, [132+esp]
mov [8+ebp], ebx
add esi, 64
mov eax, [68+esp]
mov [16+ebp], edi
cmp esi, eax
mov [4+ebp], ecx
jl NEAR L000start
add esp, 108
pop edi
pop ebx
pop ebp
pop esi
ret
global _sha1_block_asm_host_order
_sha1_block_asm_host_order:
mov ecx, [12+esp]
push esi
shl ecx, 6
mov esi, [12+esp]
push ebp
add ecx, esi
push ebx
mov ebp, [16+esp]
push edi
mov edx, [12+ebp]
sub esp, 108
mov edi, [16+ebp]
mov ebx, [8+ebp]
mov [68+esp], ecx
; First we need to setup the X array
mov eax, [esi]
mov ecx, [4+esi]
mov [esp], eax
mov [4+esp], ecx
mov eax, [8+esi]
mov ecx, [12+esi]
mov [8+esp], eax
mov [12+esp], ecx
mov eax, [16+esi]
mov ecx, [20+esi]
mov [16+esp], eax
mov [20+esp], ecx
mov eax, [24+esi]
mov ecx, [28+esi]
mov [24+esp], eax
mov [28+esp], ecx
mov eax, [32+esi]
mov ecx, [36+esi]
mov [32+esp], eax
mov [36+esp], ecx
mov eax, [40+esi]
mov ecx, [44+esi]
mov [40+esp], eax
mov [44+esp], ecx
mov eax, [48+esi]
mov ecx, [52+esi]
mov [48+esp], eax
mov [52+esp], ecx
mov eax, [56+esi]
mov ecx, [60+esi]
mov [56+esp], eax
mov [60+esp], ecx
jmp L001shortcut
| 16.611958 | 74 | 0.588603 |
012faaf46d06abd412726cd46c96c8718ba18371 | 473 | asm | Assembly | hybrid.asm | davidgiven/cshell | 19fee656094fd98349691dcb1776f0c28546a676 | [
"BSD-2-Clause"
] | 3 | 2020-12-06T23:34:02.000Z | 2021-12-21T20:05:07.000Z | hybrid.asm | davidgiven/cshell | 19fee656094fd98349691dcb1776f0c28546a676 | [
"BSD-2-Clause"
] | null | null | null | hybrid.asm | davidgiven/cshell | 19fee656094fd98349691dcb1776f0c28546a676 | [
"BSD-2-Clause"
] | 1 | 2022-01-16T17:57:43.000Z | 2022-01-16T17:57:43.000Z | .include "c64.inc"
.include "cshell.inc"
.cpu "6502"
BASIC_HEADER
cmp #'c'
bne not_cshell
cpx #'s'
bne not_cshell
cpy #'h'
bne not_cshell
jsr print
.null 'This program is running from CShell.'
rts
not_cshell:
jsr print
.null 'This program is running from Basic.'
rts
print:
pla ; low byte
sta 2
pla ; high byte
sta 3
ldy #1
-
lda (2), y
inc 2
bne +
inc 3
+
tax ; set flags for A
beq +
jsr CHROUT
jmp -
+
lda 3
pha
lda 2
pha
rts
| 10.06383 | 45 | 0.632135 |
03290a1b20fca1ea425ef99d9b2e29e2cfcf5e4c | 1,857 | asm | Assembly | programs/oeis/158/A158638.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/158/A158638.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/158/A158638.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A158638: a(n) = 48*n^2 + 1.
; 1,49,193,433,769,1201,1729,2353,3073,3889,4801,5809,6913,8113,9409,10801,12289,13873,15553,17329,19201,21169,23233,25393,27649,30001,32449,34993,37633,40369,43201,46129,49153,52273,55489,58801,62209,65713,69313,73009,76801,80689,84673,88753,92929,97201,101569,106033,110593,115249,120001,124849,129793,134833,139969,145201,150529,155953,161473,167089,172801,178609,184513,190513,196609,202801,209089,215473,221953,228529,235201,241969,248833,255793,262849,270001,277249,284593,292033,299569,307201,314929,322753,330673,338689,346801,355009,363313,371713,380209,388801,397489,406273,415153,424129,433201,442369,451633,460993,470449,480001,489649,499393,509233,519169,529201,539329,549553,559873,570289,580801,591409,602113,612913,623809,634801,645889,657073,668353,679729,691201,702769,714433,726193,738049,750001,762049,774193,786433,798769,811201,823729,836353,849073,861889,874801,887809,900913,914113,927409,940801,954289,967873,981553,995329,1009201,1023169,1037233,1051393,1065649,1080001,1094449,1108993,1123633,1138369,1153201,1168129,1183153,1198273,1213489,1228801,1244209,1259713,1275313,1291009,1306801,1322689,1338673,1354753,1370929,1387201,1403569,1420033,1436593,1453249,1470001,1486849,1503793,1520833,1537969,1555201,1572529,1589953,1607473,1625089,1642801,1660609,1678513,1696513,1714609,1732801,1751089,1769473,1787953,1806529,1825201,1843969,1862833,1881793,1900849,1920001,1939249,1958593,1978033,1997569,2017201,2036929,2056753,2076673,2096689,2116801,2137009,2157313,2177713,2198209,2218801,2239489,2260273,2281153,2302129,2323201,2344369,2365633,2386993,2408449,2430001,2451649,2473393,2495233,2517169,2539201,2561329,2583553,2605873,2628289,2650801,2673409,2696113,2718913,2741809,2764801,2787889,2811073,2834353,2857729,2881201,2904769,2928433,2952193,2976049
mov $1,$0
pow $1,2
mul $1,48
add $1,1
| 232.125 | 1,787 | 0.845988 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.