hexsha stringlengths 40 40 | size int64 6 1.05M | ext stringclasses 3 values | lang stringclasses 1 value | max_stars_repo_path stringlengths 4 232 | max_stars_repo_name stringlengths 7 106 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 7 | max_stars_count int64 1 33.5k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 232 | max_issues_repo_name stringlengths 7 106 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 7 | max_issues_count int64 1 37.5k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 232 | max_forks_repo_name stringlengths 7 106 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 7 | max_forks_count int64 1 12.6k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 6 1.05M | avg_line_length float64 1.16 19.7k | max_line_length int64 2 938k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5b1beb4bb6177076eeffe67c9f59ce4a8ec49bce | 562 | asm | Assembly | string/cmp.asm | czfshine/assembly-exercise | 95c8be8331810dfd12f50e48109a4b2a8a978853 | [
"MIT"
] | 1 | 2018-05-16T13:01:26.000Z | 2018-05-16T13:01:26.000Z | string/cmp.asm | czfshine/assembly-exercise | 95c8be8331810dfd12f50e48109a4b2a8a978853 | [
"MIT"
] | null | null | null | string/cmp.asm | czfshine/assembly-exercise | 95c8be8331810dfd12f50e48109a4b2a8a978853 | [
"MIT"
] | null | null | null | DATA SEGMENT
STRING1 DB 'ABCDE'
COUNT DW $-STRING1
STRING2 DB 'ABCDE'
STRING3 DB 'MATCH$'
STRING4 DB 'NO MATCH$'
DATA ENDS
STACKS SEGMENT
;此处输入堆栈段代码
STACKS ENDS
CODES SEGMENT
ASSUME CS:CODES,DS:DATA,SS:STACKS
START:
MOV AX,DATA
MOV DS,AX
MOV es,AX
LEA SI,STRING1
LEA DI,STRING2
MOV CX,COUNT
CLD
REPE CMPSB
JNZ L1
JCXZ L2
L1: LEA CX,STRING4
MOV DX,CX
MOV AH,9
INT 21H
JMP L3
L2: LEA CX,STRING3
MOV DX,CX
MOV AH,9
INT 21H
L3:
;此处输入代码段代码
MOV AH,4CH
INT 21H
CODES ENDS
END START | 14.05 | 37 | 0.640569 |
08fdce9063ff7f03fa0e8602d6a16090ab50fa45 | 499 | asm | Assembly | smkrnl/tables/gdt_set.asm | medievalghoul/simplekernel | d63c4b9c380be0e2e0a0ee104ef2ed90b83ce6e8 | [
"MIT"
] | 19 | 2021-03-20T06:28:22.000Z | 2022-02-13T03:01:45.000Z | smkrnl/tables/gdt_set.asm | medievalghoul/simplekernel | d63c4b9c380be0e2e0a0ee104ef2ed90b83ce6e8 | [
"MIT"
] | 1 | 2021-04-29T02:06:59.000Z | 2021-04-30T14:55:49.000Z | smkrnl/tables/gdt_set.asm | medievalghoul/simplekernel | d63c4b9c380be0e2e0a0ee104ef2ed90b83ce6e8 | [
"MIT"
] | null | null | null | CODE32 equ 0x08 ; offset for setting up CS
DS_OFFSET equ 0x10 ;
global gdt_flush
section .text
gdt_flush:
mov eax, [esp + 4] ; load GDT register with start address of GDT
lgdt [eax]
mov ax, DS_OFFSET
mov ds, ax
mov es, ax
mov fs, ax
mov gs, ax
mov ss, ax
; in order to set up our segment register CS (Code Segment)
; we need to do a far jump with the selector offest 0x08
jmp CODE32:flush
flush:
; restore register
retn
| 19.192308 | 68 | 0.625251 |
ef8e4b54f2af0d1ea1750a46318e8a4c2d249467 | 567 | asm | Assembly | src/util/oli/qdos/jbpar.asm | olifink/qspread | d6403d210bdad9966af5d2a0358d4eed3f1e1c02 | [
"MIT"
] | null | null | null | src/util/oli/qdos/jbpar.asm | olifink/qspread | d6403d210bdad9966af5d2a0358d4eed3f1e1c02 | [
"MIT"
] | null | null | null | src/util/oli/qdos/jbpar.asm | olifink/qspread | d6403d210bdad9966af5d2a0358d4eed3f1e1c02 | [
"MIT"
] | null | null | null | ; get standard QDOS job parameters
;
section utility
include win1_mac_oli
xdef ut_jbpar
;+++
; get QDOS job parameters
;
; Entry Exit
; a1 ptr to command line
; a2 ptr to channel ist
; a7 bottom of data area preserved
;---
ut_jbpar
lea 4(sp),a2
move.l a2,a1
move.w (a1)+,d1 ; nr. of channels
mulu #4,d1
adda.l d1,a1
rts
end
| 21 | 64 | 0.409171 |
67b56ae54ab178d58240718f5a3d48588e35446e | 1,216 | asm | Assembly | programs/oeis/234/A234431.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/234/A234431.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/234/A234431.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A234431: Numbers that are the sum of 2 successive evil numbers (A001969).
; 3,8,11,15,19,22,27,32,35,38,43,47,51,56,59,63,67,70,75,79,83,88,91,94,99,104,107,111,115,118,123,128,131,134,139,143,147,152,155,158,163,168,171,175,179,182,187,191,195,200,203,207,211,214,219,224,227,230,235,239,243,248,251,255,259,262,267,271,275,280,283,286,291,296,299,303,307,310,315,319,323,328,331,335,339,342,347,352,355,358,363,367,371,376,379,382,387,392,395,399,403,406,411,416,419,422,427,431,435,440,443,447,451,454,459,463,467,472,475,478,483,488,491,495,499,502,507,512,515,518,523,527,531,536,539,542,547,552,555,559,563,566,571,575,579,584,587,591,595,598,603,608,611,614,619,623,627,632,635,638,643,648,651,655,659,662,667,672,675,678,683,687,691,696,699,703,707,710,715,719,723,728,731,734,739,744,747,751,755,758,763,767,771,776,779,783,787,790,795,800,803,806,811,815,819,824,827,831,835,838,843,847,851,856,859,862,867,872,875,879,883,886,891,896,899,902,907,911,915,920,923,926,931,936,939,943,947,950,955,959,963,968,971,975,979,982,987,992,995,998
mov $4,$0
mul $0,2
sub $2,$0
sub $2,2
cal $2,36585 ; Ternary Thue-Morse sequence: closed under a->abc, b->ac, c->b.
mov $1,$2
add $1,1
mov $3,$4
mul $3,4
add $1,$3
| 86.857143 | 974 | 0.722862 |
8e407a5aa1ca76c1bfde178b392470d759467df6 | 3,506 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_sm_/i7-7700_9_0xca.log_27_853.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_xt_sm_/i7-7700_9_0xca.log_27_853.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_xt_sm_/i7-7700_9_0xca.log_27_853.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r12
push %r13
push %r15
push %rbx
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_normal_ht+0x5b51, %rsi
lea addresses_WC_ht+0x15501, %rdi
nop
add %r12, %r12
mov $9, %rcx
rep movsb
nop
nop
nop
xor $42551, %rcx
lea addresses_A_ht+0x14e01, %r13
nop
nop
and $35406, %r15
mov (%r13), %bx
nop
nop
nop
nop
xor $15028, %r12
lea addresses_UC_ht+0x10501, %rcx
nop
nop
nop
nop
mfence
movb (%rcx), %r12b
nop
xor $49207, %rdi
lea addresses_WC_ht+0x63cd, %rdi
nop
nop
nop
inc %r12
movups (%rdi), %xmm3
vpextrq $0, %xmm3, %rbx
cmp $54156, %rbx
lea addresses_WC_ht+0x2e01, %rdi
inc %rcx
movups (%rdi), %xmm6
vpextrq $0, %xmm6, %r12
nop
nop
nop
nop
nop
and %r13, %r13
lea addresses_A_ht+0x1c152, %rsi
lea addresses_WC_ht+0x18401, %rdi
nop
cmp %rdx, %rdx
mov $58, %rcx
rep movsb
nop
nop
nop
nop
add $4865, %rdx
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %r15
pop %r13
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r13
push %r15
push %rax
push %rbp
push %rbx
push %rcx
push %rdx
// Store
lea addresses_WT+0x3f01, %r15
and %r13, %r13
mov $0x5152535455565758, %rcx
movq %rcx, (%r15)
nop
nop
nop
nop
nop
add $1350, %rcx
// Store
lea addresses_RW+0x1ca01, %rbp
cmp $6797, %rdx
movb $0x51, (%rbp)
nop
nop
nop
nop
xor $48546, %rbp
// Store
lea addresses_RW+0x7fc1, %rdx
nop
nop
nop
nop
cmp $14667, %rcx
mov $0x5152535455565758, %rax
movq %rax, %xmm7
vmovaps %ymm7, (%rdx)
nop
nop
nop
sub %r15, %r15
// Store
lea addresses_WC+0x557d, %r13
nop
nop
nop
nop
xor $13775, %rdx
movb $0x51, (%r13)
nop
nop
and $43278, %rdx
// Faulty Load
lea addresses_RW+0x1ca01, %r13
nop
nop
nop
nop
nop
sub $18434, %rbx
movb (%r13), %r15b
lea oracles, %rcx
and $0xff, %r15
shlq $12, %r15
mov (%rcx,%r15,1), %r15
pop %rdx
pop %rcx
pop %rbx
pop %rbp
pop %rax
pop %r15
pop %r13
ret
/*
<gen_faulty_load>
[REF]
{'src': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 2, 'NT': True, 'type': 'addresses_RW'}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'congruent': 7, 'AVXalign': False, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_WT'}}
{'OP': 'STOR', 'dst': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 1, 'NT': False, 'type': 'addresses_RW'}}
{'OP': 'STOR', 'dst': {'congruent': 6, 'AVXalign': True, 'same': False, 'size': 32, 'NT': True, 'type': 'addresses_RW'}}
{'OP': 'STOR', 'dst': {'congruent': 1, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_WC'}}
[Faulty Load]
{'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 1, 'NT': False, 'type': 'addresses_RW'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'congruent': 3, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'dst': {'congruent': 8, 'same': False, 'type': 'addresses_WC_ht'}}
{'src': {'congruent': 10, 'AVXalign': False, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_A_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 4, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_UC_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 2, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_WC_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 10, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_WC_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 0, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'dst': {'congruent': 7, 'same': False, 'type': 'addresses_WC_ht'}}
{'51': 27}
51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51
*/
| 19.477778 | 152 | 0.646606 |
569a2eee44cd9ad47597b84cd3818eb60c90c4ae | 28,759 | asm | Assembly | base/mvdm/dos/v86/cmd/edlin/edlcmd2.asm | npocmaka/Windows-Server-2003 | 5c6fe3db626b63a384230a1aa6b92ac416b0765f | [
"Unlicense"
] | 17 | 2020-11-13T13:42:52.000Z | 2021-09-16T09:13:13.000Z | base/mvdm/dos/v86/cmd/edlin/edlcmd2.asm | sancho1952007/Windows-Server-2003 | 5c6fe3db626b63a384230a1aa6b92ac416b0765f | [
"Unlicense"
] | 2 | 2020-10-19T08:02:06.000Z | 2020-10-19T08:23:18.000Z | base/mvdm/dos/v86/cmd/edlin/edlcmd2.asm | sancho1952007/Windows-Server-2003 | 5c6fe3db626b63a384230a1aa6b92ac416b0765f | [
"Unlicense"
] | 14 | 2020-11-14T09:43:20.000Z | 2021-08-28T08:59:57.000Z | PAGE 60,132
TITLE Edlcmd2 - PART2 procedures called from EDLIN
;/*
; * Microsoft Confidential
; * Copyright (C) Microsoft Corporation 1991
; * All Rights Reserved.
; */
;======================= START OF SPECIFICATIONS =========================
;
; MODULE NAME: EDLCMD2.SAL
;
; DESCRIPTIVE NAME: EDLIN ROUTINES
;
; FUNCTION: THIS MODULE PROVIDES ROUTINES NEEDED FOR EDLIN'S EXECUTION.
;
; ENTRY POINT: ANY CALLED ROUTINE
;
; EXIT NORMAL: NA
;
; EXIT ERROR : NA
;
; INTERNAL REFERENCES:
;
; EXTERNAL REFERENCES:
;
; ROUTINE: EDLCMD1 - ROUTINES MAY BE CALLED FROM EDLCMD1
; EDLMES - ROUTINES MAY BE CALLED FROM EDLMES
;
; NOTES: THIS MODULE IS TO BE PREPPED BY SALUT WITH THE "PR" OPTIONS.
; LINK EDLIN+EDLCMD1+EDLCMD2+EDLMES+EDLPARSE
;
;
; REVISION HISTORY:
;
; AN000 VERSION DOS 4.00 - REVISIONS MADE RELATE TO THE FOLLOWING:
;
; - IMPLEMENT SYSPARSE
; - IMPLEMENT MESSAGE RETRIEVER
; - IMPLEMENT DBCS ENABLING
; - ENHANCED VIDEO SUPPORT
; - EXTENDED OPENS
; - SCROLLING ERROR
;
; COPYRIGHT: "MS DOS EDLIN UTILITY"
; "VERSION 4.00 (C) COPYRIGHT 1988 Microsoft"
;
;======================= END OF SPECIFICATIONS ===========================
include edlequ.asm
include syscall.inc
CODE SEGMENT PUBLIC
CODE ENDS
CONST SEGMENT PUBLIC WORD
CONST ENDS
cstack segment stack
cstack ends
DATA SEGMENT PUBLIC WORD
DATA ENDS
DG GROUP CODE,CONST,cstack,DATA
CONST SEGMENT PUBLIC WORD
extrn msg_crlf:abs,msg_lf:abs,qmes_ptr:byte,ask_ptr:byte
extrn bak:byte,$$$file:byte,delflg:byte,loadmod:byte,txt1:byte
extrn txt2:byte,memful_ptr:word
extrn Del_Bak_Ptr:byte ;an000;dms;
extrn cont_ptr:byte ;an000;dms:6/10/87
CONST ENDS
DATA SEGMENT PUBLIC WORD
extrn ParamCt:WORD
extrn current:word,pointer:word,start:word,endtxt:word
extrn wrt_handle:word,editbuf:byte,ext_ptr:word,qflg:byte
extrn temp_path:byte,line_num:word,line_flag:byte
extrn line_num_buf_ptr:byte,arg_buf:byte,arg_buf_ptr:word
extrn olddat:byte,oldlen:word,newlen:word,param1:word,param2:word
extrn srchflg:byte,srchmod:byte,comline:word,lstfnd:word,numpos:word
extrn lstnum:word,last_mem:word,srchcnt:word,amnt_req:word
extrn lc_adj:byte ;an000;dms:6/10/87
extrn continue:byte ;an000;dms:6/10/87
extrn pg_count:byte ;an000;dms:6/10/87
extrn Disp_Len:byte ;an000;dms;
extrn Disp_Width:byte ;an000;dms;
extrn lc_flag:byte ;an000;dms:6/10/87
ifdef DBCS
extrn lbtbl:dword
endif
DATA ENDS
CODE SEGMENT PUBLIC
ASSUME CS:DG,DS:DG,SS:CStack,ES:DG
public findlin,shownum,loadbuf,crlf,lf,abortcom,unquote
public kill_bl,make_caps,display,dispone,make_cntrl
public query,quit,scanln,delbak,scaneof,memerr
public fndfirst,fndnext,replace
ifdef DBCS
public testkanj
endif
extrn std_printf:near,command:near,chkrange:near,ComErr:NEAR
extrn Xerror:near
extrn display_message:near
FINDLIN:
; Inputs
; BX = Line number to be located in buffer (0 means last line+1)
; Outputs:
; DX = Actual line found
; DI = Pointer to start of line DX
; Zero set if BX = DX (if specified line found)
; AL,CX destroyed. No other registers affected.
MOV DX,[CURRENT]
MOV DI,[POINTER]
CMP BX,DX ; fast find. Current = requested
retz
JA FINDIT ; start scanning at current?
OR BX,BX ; special case of EOF?
JZ FINDIT ; yes
MOV DX,1 ; set up for scan at beginning
MOV DI,OFFSET DG:START
CMP BX,DX ; at beginning?
retz
FINDIT:
MOV CX,[ENDTXT] ; count of bytes in buffer
SUB CX,DI ; for scan
SCANLN:
MOV AL,10 ; LF is what we look for.
OR AL,AL ; Clear zero flag for JCXZ
FINLIN:
JCXZ RET4 ; at end? Yes, no skip.
REPNE SCASB ; find EOL
INC DX ; increment count
CMP BX,DX ; find correct line?
JNZ FINLIN ; no, try again.
RET4: return
; Inputs:
; BX = Line number to be displayed
; Function:
; Displays line number on terminal in 8-character
; format, suppressing leading zeros.
; AX, CX, DX destroyed. No other registers affected.
SHOWNUM:
mov dx,offset dg:line_num_buf_ptr
mov line_num,bx
MOV line_flag,"*"
CMP BX,[CURRENT]
JZ STARLIN
MOV line_flag," "
STARLIN:
call std_printf
ret5: return
DISPONE:
MOV DI,1
DISPLAY:
; Inputs:
; BX = Line number
; SI = Pointer to text buffer
; DI = No. of lines
; Function:
; Ouputs specified no. of line to terminal, each
; with leading line number.
; Outputs:
; BX = Last line output.
; All registers destroyed.
MOV CX,[ENDTXT]
SUB CX,SI
retz ; no lines to display
;=========================================================================
; Initialize screen size and line counts for use by display.
;
; Date : 6/10/87
;=========================================================================
push ax ;an000;save affected regs
mov al,dg:disp_len ;an000;length of video display
mov pg_count,al ;an000;init. screen size ctr.
pop ax ;an000;restore affected regs
;=========================================================================
mov dx,di ;number of lines to print
;
; CX is the number of bytes in the buffer
; dx is the number of lines to be output
;
DISPLN:
SaveReg <CX,DX>
CALL SHOWNUM
RestoreReg <DX,CX>
mov di,offset dg:arg_buf
;
; Copy chars until CR/LF or end of line hit
;
OUTLN:
LODSB
CMP DI,254+offset dg:arg_buf ; are we at end of buffer?
JAE StoreDone ; Yes, do NOT store
CMP AL," "
JAE SEND
CMP AL,10
JZ SEND
CMP AL,13
JZ SEND
CMP AL,9
JZ SEND
MOV AH,"^"
OR AL,40h
XCHG AL,AH
STOSW
JMP short StoreDone
SEND:
stosb
StoreDone:
CMP AL,10 ; perform copy until LF is seen
LOOPNZ OUTLN
;
; Make sure buffer ends with CRLF
;
cmp byte ptr [di-1],10
jz Terminate
;
; No LF seen. See if CR
;
cmp byte ptr [di-1],CR
jz StoreLF
mov al,CR
stosb
StoreLF:
mov al,10
stosb
Terminate:
mov byte ptr [di],0
call EDLIN_DISP_COUNT ;an000;determine lines printed
; DMS:6/10/87
push dx
mov dx,offset dg:arg_buf_ptr
call std_printf
pop dx
JCXZ ret7
INC BX
call EDLIN_PG_COUNT ;an000;adjust screen line count
; DMS:6/10/87
cmp lc_flag,false ;an000;continue DISPLAY?
; DMS:6/10/87
JNZ DISPLN
DEC BX
ret7: return
FNDFIRST:
MOV DI,1+OFFSET DG:TXT1
mov byte ptr[olddat],1 ;replace with old value if none new
CALL GETTEXT
OR AL,AL ;Reset zero flag in case CX is zero
JCXZ RET7
cmp al,1ah ;terminated with a ^Z ?
jne sj8
mov byte ptr[olddat],0 ;do not replace with old value
sj8:
MOV [OLDLEN],CX
XOR CX,CX
CMP AL,0DH
JZ SETBUF
CMP BYTE PTR [SRCHFLG],0
JZ NXTBUF
SETBUF:
DEC SI
NXTBUF:
MOV [COMLINE],SI
MOV DI,1+OFFSET DG:TXT2
CALL GETTEXT
CMP BYTE PTR [SRCHFLG],0
JNZ NOTREPL
CMP AL,0DH
JNZ HAVCHR
DEC SI
HAVCHR:
MOV [COMLINE],SI
NOTREPL:
MOV [NEWLEN],CX
MOV BX,[PARAM1]
OR BX,BX
JNZ CALLER
cmp byte ptr[srchmod],0
jne sj9
mov bx,1 ;start from line number 1
jmp short sj9a
sj9:
MOV BX,[CURRENT]
INC BX ;Default search and replace to current+1
sj9a:
CALL CHKRANGE
CALLER:
CALL FINDLIN
MOV [LSTFND],DI
MOV [NUMPOS],DI
MOV [LSTNUM],DX
MOV BX,[PARAM2]
CMP BX,1
SBB BX,-1 ;Decrement everything except zero
CALL FINDLIN
MOV CX,DI
SUB CX,[LSTFND]
OR AL,-1
JCXZ aret
CMP CX,[OLDLEN]
jae sj10
aret: return
sj10:
MOV [SRCHCNT],CX
FNDNEXT:
; Inputs:
; [TXT1+1] has string to search for
; [OLDLEN] has length of the string
; [LSTFND] has starting position of search in text buffer
; [LSTNUM] has line number which has [LSTFND]
; [SRCHCNT] has length to be searched
; [NUMPOS] has beginning of line which has [LSTFND]
; Outputs:
; Zero flag set if match found
; [LSTFND],[LSTNUM],[SRCHCNT] updated for continuing the search
; [NUMPOS] has beginning of line in which match was made
MOV AL,[TXT1+1]
MOV CX,[SRCHCNT]
MOV DI,[LSTFND]
SCAN:
OR DI,DI ;Clear zero flag in case CX=0
REPNE SCASB ;look for first byte of string
retnz ;return if you don't find
ifdef DBCS
call kanji_check ;see if the found byte is on a character boundary
jnz scan
endif
MOV DX,CX
MOV BX,DI ;Save search position
MOV CX,[OLDLEN]
DEC CX
MOV SI,2 + OFFSET DG:TXT1
CMP AL,AL ;Set zero flag in case CX=0
REPE CMPSB
MOV CX,DX
MOV DI,BX
JNZ SCAN
MOV [SRCHCNT],CX
MOV CX,DI
MOV [LSTFND],DI
MOV DI,[NUMPOS]
SUB CX,DI
MOV AL,10
MOV DX,[LSTNUM]
;Determine line number of match
GETLIN:
INC DX
MOV BX,DI
REPNE SCASB
JZ GETLIN
DEC DX
MOV [LSTNUM],DX
MOV [NUMPOS],BX
XOR AL,AL
return
ifdef DBCS
;Kanji_check idea is to scan backwards to the first
; character which can't be a kanji or part of one
; (.lt. DB_SP_LO) then scan forward to see if the
; current byte is on character boundary
;
;Output ZR <==> we're on a character boundary
; NZ <==> we're not on character boundary i.e. No Match
kanji_check:
push ax ;save search character
push di
dec di ;point to the character we found
mov si,di ;start searching bakwards from there
std
srch_loop:
lodsb
cmp al,DB_SP_LO
jae srch_loop
inc si ;point to first non-kanji
cld ;forward search
kan_loop:
cmp si,di ;are we at current byte?
jae passed_char ;if we are, or are passed it, exit
call next_char ;otherwise advance si to next char
jmp short kan_loop ;and loop
passed_char:
pop di
pop ax
ret
;Next_char si points to a character boundary
; advance si to point to the beginning of the next char
;
;
next_char:
push ax
lodsb
call testkanj
jz not_kanj
inc si
not_kanj:
pop ax
ret
;--------------------------------------------------------------------;
; TESTKANJ ~ FIND OUT IS THE BYTE IS A KANJI PREFIX ;
; ;
; entry: AL byte to test ;
; ;
; exit: NZ if lead byte ortherwise ZR ;
; ;
; modifies: AX ;
; ;
;--------------------------------------------------------------------;
testkanj:
push ax
xchg ah,al ;put byte in ah
push ds
push si
lds si,cs:[lbtbl] ;get pointer to lead byte table
ktlop:
lodsb ;direction flag should be OK
or al,al ;are we at the end of table?
jz notlead ;brif so
cmp al,ah ;is START RANGE > CHARACTER?
ja notlead ;brif so, not a lead character (carry clear)
lodsb ;get second range byte
cmp ah,al ;is CHARACTER > END RANGE
ja ktlop ;brif so, not a lead character (check next range)
or al,al ;make NZ
notl_exit:
pop si
pop ds
pop ax
ret
notlead:
cmp al,al
jmp notl_exit
endif
GETTEXT:
; Inputs:
; SI points into command line buffer
; DI points to result buffer
; Function:
; Moves [SI] to [DI] until ctrl-Z (1AH) or
; RETURN (0DH) is found. Termination char not moved.
; Outputs:
; AL = Termination character
; CX = No of characters moved.
; SI points one past termination character
; DI points to next free location
XOR CX,CX
GETIT:
LODSB
;-----------------------------------------------------------------------
cmp al,quote_char ;a quote character?
jne sj101 ;no, skip....
lodsb ;yes, get quoted character
call make_cntrl
jmp short sj102
;-----------------------------------------------------------------------
sj101:
CMP AL,1AH
JZ DEFCHK
sj102:
CMP AL,0DH
JZ DEFCHK
STOSB
INC CX
JMP SHORT GETIT
DEFCHK:
OR CX,CX
JZ OLDTXT
PUSH DI
SUB DI,CX
MOV BYTE PTR [DI-1],cl
POP DI
return
OLDTXT:
cmp byte ptr[olddat],1 ;replace with old text?
je sj11 ;yes...
mov byte ptr[di-1],cl ;zero text buffer char count
return
sj11:
MOV CL,BYTE PTR [DI-1]
ADD DI,CX
return
REPLACE:
; Inputs:
; CX = Length of new text
; DX = Length of original text
; SI = Pointer to new text
; DI = Pointer to old text in buffer
; Function:
; New text replaces old text in buffer and buffer
; size is adjusted. CX or DX may be zero.
; CX, SI, DI all destroyed. No other registers affected.
CMP CX,DX
JZ COPYIN
PUSH SI
PUSH DI
PUSH CX
MOV SI,DI
ADD SI,DX
ADD DI,CX
MOV AX,[ENDTXT]
SUB AX,DX
ADD AX,CX
CMP AX,[LAST_MEM]
JAE MEMERR
XCHG AX,[ENDTXT]
MOV CX,AX
SUB CX,SI
CMP SI,DI
JA DOMOV
ADD SI,CX
ADD DI,CX
STD
DOMOV:
INC CX
REP MOVSB
CLD
POP CX
POP DI
POP SI
COPYIN:
REP MOVSB
return
MEMERR:
MOV DX,OFFSET DG:MEMFUL_ptr
call std_printf
JMP COMMAND
LOADBUF:
MOV DI,2 + OFFSET DG:EDITBUF
MOV CX,255
MOV DX,-1
LOADLP:
LODSB
STOSB
INC DX
CMP AL,13
LOOPNZ LOADLP
MOV [EDITBUF+1],DL
retz
TRUNCLP:
LODSB
INC DX
CMP AL,13
JNZ TRUNCLP
DEC DI
STOSB
return
SCANEOF:
cmp [loadmod],0
je sj52
;----- Load till physical end of file
cmp cx,word ptr[amnt_req]
jb sj51
xor al,al
inc al ;reset zero flag
return
sj51:
jcxz sj51b
push di ;get rid of any ^Z at the end of the file
add di,cx
dec di ;points to last char
cmp byte ptr [di],1ah
pop di
jne sj51b
dec cx
sj51b:
xor al,al ;set zero flag
call check_end ;check that we have a CRLF pair at the end
return
;----- Load till first ^Z is found
sj52:
PUSH DI
PUSH CX
MOV AL,1AH
or cx,cx
jz not_found ;skip with zero flag set
REPNE SCASB ;Scan for end of file mark
jnz not_found
LAHF ;Save flags momentarily
inc cx ;include the ^Z
SAHF ;Restore flags
not_found:
mov di,cx ;not found at the end
POP CX
LAHF ;Save flags momentarily
SUB CX,DI ;Reduce byte count if EOF found
SAHF ;Restore flags
POP DI
call check_end ;check that we have a CRLF pair at the end
return
;-----------------------------------------------------------------------
; If the end of file was found, then check that the last character
; in the file is a LF. If not put a CRLF pair in.
check_end:
jnz not_end ;end was not reached
pushf ;save return flag
push di ;save pointer to buffer
add di,cx ;points to one past end on text
dec di ;points to last character
cmp di,offset dg:start
je check_no
cmp byte ptr[di],0ah ;is a LF the last character?
je check_done ;yes, exit
check_no:
mov byte ptr[di+1],0dh ;no, put a CR
inc cx ;one more char in text
mov byte ptr[di+2],0ah ;put a LF
inc cx ;another character at the end
check_done:
pop di
popf
not_end:
return
CRLF:
push dx
mov ax,msg_crlf
call display_message
pop dx
return
LF:
mov ax,msg_lf
jmp display_message
ABORTCOM:
MOV AX,CS
MOV DS,AX
MOV ES,AX
MOV AX,cstack
MOV SS,AX
MOV SP,STACK
STI
CALL CRLF
JMP COMMAND
DELBAK:
;Delete old backup file (.BAK)
MOV BYTE PTR [DELFLG],1
MOV DI,[EXT_PTR]
MOV SI,OFFSET DG:BAK
MOVSW
MOVSW
MOVSB
MOV AH,UNLINK
MOV DX,OFFSET DG:TEMP_PATH
INT 21H
; $if c ;error ? ;an000; dms;
JNC $$IF1
cmp ax,Access_Denied ;file read only? ;an000; dms;
; $if e ;yes ;an000; dms;
JNE $$IF2
mov bx,[Wrt_Handle] ;close .$$$ file ;an000; dms;
mov ah,Close ;close function ;an000; dms;
int 21h ;close it ;an000; dms;
mov di,[Ext_Ptr] ;point to extension ;an000; dms;
mov si,offset dg:$$$File ;point to .$$$ extension;an000; dms;
movsw ;get .$$$ extension ;an000; dms;
movsw ; ;an000; dms;
movsb ; ;an000; dms;
mov dx,offset dg:Temp_Path ;point to .$$$ file ;an000; dms;
mov ah,Unlink ;delete it ;an000; dms;
int 21h ; ;an000; dms;
mov di,[Ext_Ptr] ;point to extension ;an000; dms;
mov si,offset dg:BAK ;point to .BAK extension;an000; dms;
movsw ;get .BAK extension ;an000; dms;
movsw ; ;an000; dms;
movsb ; ;an000; dms;
mov dx,offset dg:Del_Bak_Ptr;point to error message ;an000; dms;
jmp Xerror ;display message & exit ;an000; dms;
; $endif
$$IF2:
; $endif
$$IF1:
MOV DI,[EXT_PTR]
MOV SI,OFFSET DG:$$$FILE
MOVSW
MOVSW
MOVSB
return
;-----------------------------------------------------------------------;
; Will scan buffer given pointed to by SI and get rid of quote
;characters, compressing the line and adjusting the length at the
;begining of the line.
; Preserves al registers except flags and AX .
unquote:
push cx
push di
push si
mov di,si
mov cl,[si-1] ;length of buffer
xor ch,ch
mov al,quote_char
cld
unq_loop:
jcxz unq_done ;no more chars in the buffer, exit
repnz scasb ;search for quote character
jnz unq_done ;none found, exit
push cx ;save chars left in buffer
push di ;save pointer to quoted character
push ax ;save quote character
mov al,byte ptr[di] ;get quoted character
call make_cntrl
mov byte ptr[di],al
pop ax ;restore quote character
mov si,di
dec di ;points to the quote character
inc cx ;include the carriage return also
rep movsb ;compact line
pop di ;now points to after quoted character
pop cx
jcxz sj13 ;if quote char was last of line do not adjust
dec cx ;one less char left in the buffer
sj13: pop si
dec byte ptr[si-1] ;one less character in total buffer count also
push si
jmp short unq_loop
unq_done:
pop si
pop di
pop cx
return
;-----------------------------------------------------------------------;
; Convert the character in AL to the corresponding control
; character. AL has to be between @ and _ to be converted. That is,
; it has to be a capital letter. All other letters are left unchanged.
make_cntrl:
push ax
and ax,11100000b
cmp ax,01000000b
pop ax
jne sj14
and ax,00011111b
sj14:
return
;---- Kill spaces in buffer --------------------------------------------;
;=========================================================================
; kill_bl : Parses over spaces in a buffer.
;
; Date : 6/10/86
;=========================================================================
kill_bl:
push bx ;an000;save affected reg.
kill_bl_cont:
lodsb ;get rid of blanks
cmp al,9
je kill_bl_cont ;an000;it is a tab
cmp al,10
je kill_bl_cont ;an000;if LF
cmp al,' '
je kill_bl_cont ;an000;we have a space
ifdef DBCS ;an000;is this a kanji assembly
call testkanj ;an000;do we have a dbcs lead byte
; $if nz ;an000;yes, we have a lead byte
JZ $$IF5
cmp al,DB_SP_HI ;an000;is it DB_SP_HI
; $if z ;an000;it is DB_SP_HI
JNZ $$IF6
mov bl,ds:[si] ;an000;set up for compare
cmp bl,DB_SP_LO ;an000;is it DB_SP_LO
; $if z ;an000;we have an asian blank
JNZ $$IF7
lodsb ;an000;skip byte containing 81h
jmp kill_bl_cont
; $endif ;an000;
$$IF7:
; $endif ;an000;fall through no delim
$$IF6:
; found
; $endif ;an000;end test for dbcs lead byte
$$IF5:
endif ;an000;end conditional assembly
pop bx ;an000;restore affected reg.
return
;----- Capitalize the character in AL ----------------------------------;
; ;
; Input: ;
; ;
; AL contains a character to capitalize ;
; ;
; Output: ;
; ;
; AL contains a capitalized character ;
; ;
;-----------------------------------------------------------------------;
MAKE_CAPS:
CMP AL,"a"
JB CAPS1
CMP AL,"z"
ifdef DBCS
JA CAPS1 ; M003 MSKK TAR 476, kana chars
else
JG CAPS1
endif
AND AL,0DFH
CAPS1:
return
QUIT:
CMP ParamCt,1
JZ Quit1
CERR: JMP ComErr
Quit1: CMP Param1,0
JNZ CERR
MOV DX,OFFSET DG:QMES_ptr
call std_printf
IFDEF DBCS
CALL TESTKANJ
JZ ASCII
MOV AX, (STD_CON_INPUT_FLUSH SHL 8) + 0
INT 21H ; Eat the trailing byte.
JMP CRLF
ASCII:
ENDIF
;=========================================================================
; We are invoking the VAL_YN proc here. This will replace the
; method of Y/N validation used prior to DOS 4.00.
;
; Date : 6/10/87
;=========================================================================
call val_yn ;an000;pass Y/N byte in AL to macro
cmp ax,yes ;an000;did we return a Y
jz NoCRLF ;an000; dms; close the file
cmp ax,no ;an000; dms; return N?
; $if ne ;an000; dms; neither N or Y - reprompt
JE $$IF11
call crlf ; spit out crlf
jmp Quit1 ;an000; dms; reprompt
; $endif ;an000; dms;
$$IF11:
call crlf ; spit out CRLF
return ;an000; dms;
;=========================================================================
; End of Y/N validation check for qmes_ptr
;=========================================================================
NOCRLF:
MOV BX,[WRT_HANDLE]
MOV AH,CLOSE
INT 21H
MOV DX,OFFSET DG:TEMP_PATH
MOV AH,UNLINK
INT 21H
mov ah,exit
xor al,al
INT 21H
QUERY:
TEST BYTE PTR [QFLG],-1
retz
MOV DX,OFFSET DG:ASK_ptr
call std_printf
PUSH AX
CALL CRLF
POP AX
IFDEF DBCS
CALL TESTKANJ
JZ ASCII1
PUSH AX
MOV AX,(STD_CON_INPUT_FLUSH SHL 8) + 0
INT 21H ;Eat the trailing byte
XOR AX,AX
INC AX ; non zero flag
POP AX
return
ASCII1:
ENDIF
CMP AL,13 ;Carriage return means yes
retz
;=========================================================================
; We are invoking the VAL_YN proc here. This will replace the
; method of Y/N validation used prior to DOS 4.00.
; This invocation of val_yn will return ZR if Y is found, otherwise
; it will return NZ.
;
; Date : 6/10/87
;=========================================================================
call val_yn ;an000;pass Y/N byte in AL to macro
cmp ax,yes ;an000;did we return a Y
je Query_Exit ;an000; dms; exit Y/N validation
cmp ax,no ;an000; dms; N response?
jne Query ;an000; dms; no - reprompt user
cmp ax,yes ;an000; dms; must have N response - force
; NZ flag
Query_Exit:
;=========================================================================
; End of Y/N validation check for ask_ptr
;=========================================================================
return
;=========================================================================
; EDLIN_DISP_COUNT: This routine will determine the number of lines
; actually displayed to the screen. Lines displayed to
; the screen for one EDLIN line printed will be calculated
; by the following formula:
;
; LINES_PRINTED = (LINE_LEN + 10) / SCREEN_WIDTH
;
; LINES_PRINTED - Actual number of lines printed on screen
; for one EDLIN line. If LINES_PRINTED has
; a remainder, it will be rounded up.
;
; LINE_LEN - The length, in bytes, of the EDLIN line
; printed.
;
; SCREEN_WIDTH - The width in bytes of the current display.
;
; Inputs : DI - offset into buffer containing line printed
; DISP_WIDTH - width of current video output
;
; Outputs: LC_ADJ - factor to adjust line counter by
;
; Date : 6/10/87
;=========================================================================
EDLIN_DISP_COUNT proc near ;an000;lines printed
push dx ;an000;save affected regs
push di ;an000;
push ax ;an000;
push bx ;an000;
push cx ;an000;
mov bx,offset dg:arg_buf ;an000;arg_buf holds line
; printed
mov ax,di ;an000;where print line ends
sub ax,bx ;an000;diff = line's length
add ax,10 ;an000;adjust for leading blks
mov cl,dg:disp_width ;an000;set up for division
div cl ;an000;divide AX by the
; width of the console
cmp ah,0 ;an000;see if a remainder
; $if nz ;an000;if a remainder
JZ $$IF13
add al,1 ;an000;increment AL 1
; to round upward
; $endif ;an000;
$$IF13:
mov lc_adj,al ;an000;number of lines printed
; on console
pop cx ;an000;restore affected regs
pop bx ;an000;
pop ax ;an000;
pop di ;an000;
pop dx ;an000;
ret ;an000;return to caller
EDLIN_DISP_COUNT endp ;an000;end proc
;=========================================================================
; EDLIN_PG_COUNT : This routine determines whether or not we will continue
; displaying text lines based on the count of lines that
; can be output to the current video screen.
;
; Inputs : LC_ADJ - adjustment factor for number of lines printed
; PG_COUNT - number of lines remaining on current video
; display
; DX - holds the total number of lines to print
; CONTINUE - signals if the user wants to continue
; printing lines.
;
; Outputs: LC_FLAG - used to signal completion of print
;
; Date : 6/10/87
;=========================================================================
EDLIN_PG_COUNT proc near ;an000;track remaining lines
push ax ;an000;save affected regs
mov lc_flag,true ;an000;init. flag to signal
; continue printing
mov al,pg_count ;an000;set up for page adj.
cmp al,lc_adj ;an000;see if we are at end
; $if be ;an000
JNBE $$IF15
mov pg_count,0 ;an000;set pg_count to 0
; $else
JMP SHORT $$EN15
$$IF15:
sub al,lc_adj ;an000;adjust number of lines
mov pg_count,al ;an000;save remaining line ct.
; $endif ;an000;
$$EN15:
dec dx ;an000;decrease total number
; of lines to print by 1
; $if nz ;an000;more lines to print
JZ $$IF18
cmp pg_count,0 ;an000;have we printed screen
; $if be ;an000;we have printed screen
JNBE $$IF19
call EDLIN_PG_PROMPT ;an000;prompt the user to
; "Continue(Y/N)?"
cmp continue,true ;an000;did user say continue
; $if z ;an000;continue
JNZ $$IF20
mov al,dg:disp_len ;an000;begin init of screen
; dec al ;an000; length
mov pg_count,al ;an000;
; $else ;an000;do not continue
JMP SHORT $$EN20
$$IF20:
mov lc_flag,false ;an000;signal no more to print
; $endif ;an000;
$$EN20:
; $endif ;an000;
$$IF19:
; $else ;an000;total lines printed
JMP SHORT $$EN18
$$IF18:
mov lc_flag,false ;an000;signal no more to print
; $endif ;an000;
$$EN18:
pop ax ;an000;restore affected regs
ret ;an000;return to caller
EDLIN_PG_COUNT endp ;an000;end procedure
;=========================================================================
; EDLIN_PG_PROMPT : This routine prompts the user as to whether or not to
; continue printing lines to the video display, if lines
; are still present for printing.
;
; Inputs : none
;
; Outputs: CONTINUE - flag that signals other routines whether or
; not to continue printing.
;
; Date : 6/10/87
;=========================================================================
EDLIN_PG_PROMPT proc near ;an000;ask user to continue?
push dx ;an000;save affected regs.
push ax ;an000;
EPP_Reprompt:
mov dx,offset dg:cont_ptr ;an000;point to Continue msg.
call std_printf ;an000;invoke message ret.
push ax ;an000;save affected regs.
call crlf ;an000;send crlf
pop ax ;an000;restore affected regs.
call val_yn ;an000;Y/N validation
cmp ax,yes ;an000;did we have a Y
jz EPP_True_Exit ;an000;we had a Y
cmp ax,no ;an000;did we have a N
jz EPP_False_Exit ;an000;yes
jmp EPP_Reprompt ;an000;neither Y or N - reprompt
EPP_True_Exit:
mov Continue,True ;an000;flag Y found
jmp short EPP_Exit ;an000;exit routine
EPP_False_Exit:
mov Continue,False ;an000;flag N found
EPP_Exit:
pop ax ;an000;restore affected regs.
pop dx ;an000;
ret ;an000;return to caller
EDLIN_PG_PROMPT endp ;an000;end procedure
;=========================================================================
; val_yn: This proc validates a Y/N response entered by the user. The
; routine uses the new functionality of "GET EXTENDED COUNTRY
; INFORMATION" being implemented in DOS 4.00.
;
; Inputs : AL - character to be validated for Y/N response
;
; Outputs: AX - 00h = "N"o
; - 01h = "Y"es
;=========================================================================
val_yn proc near ;an000;validate Y/N response
push dx ;an000;save affected registers
push cx ;an000;
push bx ;an000;
mov dl,al ;an000;character to be checked for Y/N
mov ah,GetExtCntry ;an000;get extended country information
mov al,yn_chk ;an000;perform Y/N checking
mov cx,max_len ;an000;max. len. of Y/N char.
int 21h ;an000;invoke function
pop bx ;an000;restore affected registers
pop cx ;an000;
pop dx ;an000;
ret ;an000;return to caller
val_yn endp ;an000;end proc
code ends
end
| 23.906068 | 75 | 0.600925 |
8a9532b68223e9a57e78afac325bf0cf0dc64384 | 8,765 | asm | Assembly | DATABASE/RAND0M/russian-roulette.asm | EgeBalci/Shellcode | 2475af53b20186283b3eb1572d4de58650ad4652 | [
"MIT"
] | 2 | 2017-04-11T21:58:34.000Z | 2020-05-18T02:04:41.000Z | DATABASE/RAND0M/russian-roulette.asm | EgeBalci/Shellcode | 2475af53b20186283b3eb1572d4de58650ad4652 | [
"MIT"
] | null | null | null | DATABASE/RAND0M/russian-roulette.asm | EgeBalci/Shellcode | 2475af53b20186283b3eb1572d4de58650ad4652 | [
"MIT"
] | 4 | 2017-04-11T21:58:35.000Z | 2021-05-14T04:53:15.000Z | ;
; N
; A
; I E _
; S T _-' "'-,
; S T _-' | d$$b |
; S E _-' | $$$$ |
; U L _-' | Y$$P |
; R U _-'| | |
; O _-' _* | |
; R _-' |_-" __--''\ /
; _-' __--' __*--'
; -' __-'' __--*__-"`
; | _--'' __--*"__-'`
; |_--" .--=`"__-||"
; | | |\\ ||
; | .dUU | | \\ //
; | UUUU | _|___//
; | UUUU | |
; | UUUU | | [Matzec]
; | UUUU | |
; | UUUU | |
; | UUUU | |
; | UUP' | |
; | ___^-"`
; ""'
;
; This shellcode is admittedly kinda boring. But it can produce pretty funny
; results nonetheless.
;
; Enumerate all running processes on the system and kill a random process. You
; might kill yourself. Or you might kill ntoskrnl.exe! Who knows!
;
; This has the potential to bluescreen a system. So, be careful. :)
;
; 463 bytes, null bytes all over the place. Intended for use with encoders.
;
; frank2 <frank2 [D] dc949 [K] org>
global main
_main:
jmp dataOffset
getFuncByHash:
mov esi,[esp+8]
mov edi,[esi+0x3C] ; dos->e_lfanew
add edi,esi
mov ecx,[edi+0x78] ; export data
add ecx,esi
mov ebx,[ecx+0x20] ; AddressOfNames
add ebx,esi
xor eax,eax
push ecx
searchForFunc:
mov edx,[ebx+eax*4]
add edx,esi
mov edi,0x554E4441
hashString:
movzx ecx,byte [edx]
test ecx,ecx
jz short finishHash
rolRolFightDaPowa:
xor edi,ecx
rol edi,cl
shr ecx,1
jnz short rolRolFightDaPowa
inc edx
jmp short hashString
finishHash:
or edi,0x10101010
cmp edi,[esp+8]
jz short foundHash
inc eax
jmp short searchForFunc
foundHash:
pop ebx
mov edi,[ebx+0x1c]
add edi,esi
mov ebx,[ebx+0x24]
add ebx,esi
movzx ebx,word [ebx+eax*2]
mov ebx,[edi+ebx*4]
add ebx,esi
pop eax ; fix the stack
pop edx ; no idea why I did it this way
pop edx ; but I had some reason...
push eax ; it had to do with null bytes
ret
beginCode:
pop ebp
xor ecx,ecx
mov esi,[fs:ecx+0x30] ; PEB
mov esi,[esi+0xC] ; Ldr
mov esi,[esi+0xC] ; linked list of loaded modules
mov esi,[esi] ; loader info for ntdll.dll
push dword [esi+0x18] ; ntdll.dll image data
mov esi,[esi] ; loader info for kernel32.dll
push dword [esi+0x18] ; kernel32.dll image data
push dword [esp] ; " "
push dword [ebp] ; ExitThread hash
call getFuncByHash
cmp dword [ebx],0x4C44544E ; if this is the real ExitThread, it
; won't start with NTDL
jnz hasExitThread ; we have ExitThread, resume
push dword [esp+4] ; ntdll.dll image data
push dword [ebp+4] ; RtlExitUserThread hash
call getFuncByHash
hasExitThread:
mov [ebp],ebx ; store the exit func here
push dword [esp] ; kernel32.dll image data
push dword [ebp+8] ; LoadLibraryA hash
call getFuncByHash
mov [ebp+8],ebx ; store LoadLibraryA function
push dword [esp] ; kernel32.dll image data
push dword [ebp+0xC] ; OpenProcess hash
call getFuncByHash
mov [ebp+0xC],ebx ; store OpenProcess function
push dword [esp] ; kernel32.dll image data
push dword [ebp+0x10] ; TerminateProcess hash
call getFuncByHash
mov [ebp+0x10],ebx ; store TerminateProcess function
pop ebx ; get kernel32 off the stack
lea eax,[ebp+0x30] ; msvcrt.dll
push eax
call [ebp+8] ; load msvcrt.dll
push eax ; push the library onto the stack
push dword [esp] ; msvcrt.dll image data
push dword [ebp+0x14] ; malloc hash
call getFuncByHash
mov [ebp+0x14],ebx ; store malloc function
push dword [esp] ; msvcrt.dll image data
push dword [ebp+0x18] ; FREE HASH
call getFuncByHash
mov [ebp+0x18],ebx ; PUT HASH BACK
push dword [esp] ; msvcrt.dll image data
push dword [ebp+0x1C] ; srand hash
call getFuncByHash
mov [ebp+0x1C],ebx ; store srand function
push dword [esp] ; msvcrt.dll image data
push dword [ebp+0x20] ; rand hash
call getFuncByHash
mov [ebp+0x20],ebx ; store rand function
push dword [esp] ; msvcrt.dll image data
push dword [ebp+0x24] ; time hash
call getFuncByHash
mov [ebp+0x24],ebx ; store time function
pop ebx ; take msvcrt.dll off the stack
lea eax,[ebp+0x3B] ; psapi.dll
push eax
call [ebp+8] ; load psapi.dll
push eax ; psapi.dll image data
push dword [ebp+0x28] ; EnumProcesses hash
call getFuncByHash
mov [ebp+0x28],ebx ; store EnumProcesses function
push 0x1000
call [ebp+0x14] ; allocate data for pProcessIds
push eax ; push the buffer onto the stack
lea eax,[ebp+0x2C] ; address for pBytesReturned
push eax ; pBytesReturned
push 0x1000 ; cb
push dword [esp+8] ; pProcessIds
call [ebp+0x28] ; EnumProcesses(buf, 0x1000, &returned)
test eax,eax
jz bailOut ; EnumProcesses failed, bail.
shr dword [ebp+0x2C],2 ; number of process IDs
xor ebx,ebx
push ebx
call [ebp+0x24] ; get current time, which, rudely,
push eax ; is __cdecl
call [ebp+0x1C] ; use the time to seed the prng which,
add esp,8 ; also rudely, is __cdecl
rouletteRoutine:
call [ebp+0x20] ; rand()
xor edx,edx
idiv dword [ebp+0x2C] ; rand() % number of processes
mov esi,[esp] ; get the process id buffer
lea esi,[esi+edx*4] ; load the address of the target proc id
push dword [esi] ; dwProcessId
push ebx ; bInheritHandle (FALSE)
push 0x411 ; query information, read, terminate
call [ebp+0xC] ; open the process
test eax,eax
jz rouletteRoutine ; open process failed, try again
push ebx ; uExitCode
push eax ; hProcess
call [ebp+0x10] ; kill the process
test eax,eax
jz rouletteRoutine ; termination failed, try another one.
bailOut:
push dword [esp]
call [ebp+0x18] ; free the malloc'd buffer
xor eax,eax
push eax
call [ebp] ; exit the thread
dataOffset:
call beginCode
dd 0x58159F36 ; ExitThread
dd 0x795D941E ; RtlExitUserThread
dd 0xF816FF93 ; LoadLibraryA
dd 0xD4BF9875 ; OpenProcess
dd 0x78F07775 ; TerminateProcess
dd 0xFDFE9E13 ; malloc
dd 0xBC5271BA ; free
dd 0x73F6D750 ; srand
dd 0xDCF432F0 ; rand
dd 0x7CD4B1FE ; time
dd 0xB4599692 ; EnumProcesses
dd 0x554E4441 ; place to store number of processes
db "msvcrt.dll",0
db "psapi.dll",0
| 36.67364 | 80 | 0.454079 |
170f3231ee5c851cbb4b7e82540bad6ca33bcfca | 36,699 | asm | Assembly | PRACT0/SO1H_0/asm/gm_x.asm | so1h/SO1H | 7163aa1907b7f7ab70ab022012036c4fa0482e17 | [
"BSD-2-Clause"
] | null | null | null | PRACT0/SO1H_0/asm/gm_x.asm | so1h/SO1H | 7163aa1907b7f7ab70ab022012036c4fa0482e17 | [
"BSD-2-Clause"
] | null | null | null | PRACT0/SO1H_0/asm/gm_x.asm | so1h/SO1H | 7163aa1907b7f7ab70ab022012036c4fa0482e17 | [
"BSD-2-Clause"
] | null | null | null | bits 16
; glb intptr_t : int
; glb uintptr_t : unsigned
; glb intmax_t : int
; glb uintmax_t : unsigned
; glb int8_t : signed char
; glb int_least8_t : signed char
; glb int_fast8_t : signed char
; glb uint8_t : unsigned char
; glb uint_least8_t : unsigned char
; glb uint_fast8_t : unsigned char
; glb int16_t : short
; glb int_least16_t : short
; glb int_fast16_t : short
; glb uint16_t : unsigned short
; glb uint_least16_t : unsigned short
; glb uint_fast16_t : unsigned short
; glb int32_t : int
; glb int_least32_t : int
; glb int_fast32_t : int
; glb uint32_t : unsigned
; glb uint_least32_t : unsigned
; glb uint_fast32_t : unsigned
; glb imaxdiv_t : struct <something>
; glb bool_t : int
; glb pointer_t : * unsigned char
; glb funcion_t : * (
; prm <something> : * void
; ) * void
; glb manejador_t : * (void) void
; glb rti_t : * (void) void
; glb isr_t : * (void) void
; glb handler_t : * (void) void
; glb retardarThread_t : * (void) int
; glb ptrTVI_t : * * (void) void
; glb modoSO1_t : int
; glb lh_t : struct <something>
; glb address_t : struct <something>
; glb uPtrAdr_t : union <something>
; glb pid_t : int
; glb tid_t : int
; glb uid_t : int
; glb gid_t : int
; glb pindx_t : int
; glb tindx_t : int
; glb df_t : int
; glb dfs_t : int
; glb rindx_t : int
; glb tipoOrdenador : (void) unsigned char
; glb rebootLegacy : (void) void
; glb tipoTeclado : (void) unsigned char
; glb leerTeclaBIOS : (void) unsigned short
; glb leerTeclaExtBIOS : (void) unsigned short
; glb teclaListaBIOS : (void) unsigned short
; glb leerTeclaListaBDA : (void) unsigned short
; glb teclaListaBDA : (void) unsigned short
; glb printCarBIOS : (
; prm car : char
; ) int
; glb printCarPagBIOS : (
; prm car : char
; prm pag : unsigned char
; ) int
; glb printCarAtrPagBIOS : (
; prm car : char
; prm atr : unsigned char
; prm pag : unsigned char
; ) int
; glb printLnBIOS : (void) int
; glb printStrBIOS : (
; prm str : * char
; ) int
; glb printStrHastaBIOS : (
; prm str : * char
; prm n : unsigned short
; prm lleno : int
; ) int
; glb printDecBIOS : (
; prm num : unsigned short
; prm l : unsigned short
; ) int
; glb printLDecBIOS : (
; prm num : unsigned
; prm l : unsigned short
; ) int
; glb printIntBIOS : (
; prm num : short
; prm l : unsigned short
; ) int
; glb printLIntBIOS : (
; prm num : int
; prm l : unsigned short
; ) int
; glb printHexBIOS : (
; prm num : unsigned short
; prm l : unsigned short
; ) int
; glb printLHexBIOS : (
; prm num : unsigned
; prm l : unsigned short
; ) int
; glb printBinBIOS : (
; prm num : unsigned short
; prm l : unsigned short
; ) int
; glb printLBinBIOS : (
; prm num : unsigned
; prm l : unsigned short
; ) int
; glb printPtrBIOS : (
; prm ptr : * unsigned char
; ) int
; glb printByteBIOS : (
; prm b : unsigned char
; ) int
; glb printWordBIOS : (
; prm w : unsigned short
; ) int
; glb printCadBIOS : (
; prm cad : * char
; ) int
; glb esperarTicsBIOS : (
; prm tics : unsigned short
; ) void
; glb modoDeVideo : (void) unsigned char
; glb establecerModoDeVideo : (
; prm modo : unsigned char
; ) void
; glb paginaActiva : (void) unsigned char
; glb establecerPaginaActiva : (
; prm num : unsigned char
; ) void
; glb numPagsVideo : (void) unsigned char
; glb scrollPagBDA : (
; prm numLineas : unsigned char
; prm pag : unsigned char
; ) void
; glb scrollPagBIOS : (
; prm numLineas : unsigned char
; prm pag : unsigned char
; ) void
; glb scrollBIOS : (
; prm numLineas : unsigned char
; ) void
; glb goToXYPag : (
; prm fila : unsigned char
; prm columna : unsigned char
; prm pag : unsigned char
; ) void
; glb goToXYBIOS : (
; prm fila : unsigned char
; prm columna : unsigned char
; ) void
; glb setCursorBIOS : (
; prm linea1 : unsigned char
; prm linea2 : unsigned char
; ) void
; glb ocultaCursorBIOS : (void) void
; glb readXYPagBIOS : (
; prm fila : * unsigned char
; prm columna : * unsigned char
; prm linea1 : * unsigned char
; prm linea2 : * unsigned char
; prm pag : unsigned char
; ) void
; glb readXYBIOS : (
; prm fila : * unsigned char
; prm columna : * unsigned char
; prm linea1 : * unsigned char
; prm linea2 : * unsigned char
; ) void
; glb memBIOS : (void) unsigned short
; glb enviarBIOS : (
; prm car : char
; ) void
; glb recibirBIOS : (void) char
; glb hayApmBIOS : (
; prm version : * unsigned short
; ) int
; glb connectApmBIOS : (void) int
; glb disconnectApmBIOS : (void) int
; glb cpuIdleBIOS : (void) void
; glb cpuBusyBIOS : (void) void
; glb printCarVideo : (
; prm car : char
; ) int
; glb printLnVideo : (void) int
; glb printStrVideo : (
; prm str : * char
; ) int
; glb printStrHastaVideo : (
; prm str : * char
; prm n : unsigned short
; prm lleno : int
; ) int
; glb printDecVideo : (
; prm num : unsigned short
; prm l : unsigned short
; ) int
; glb printLDecVideo : (
; prm num : unsigned
; prm l : unsigned short
; ) int
; glb printIntVideo : (
; prm num : int
; prm l : unsigned short
; ) int
; glb printLIntVideo : (
; prm num : int
; prm l : unsigned short
; ) int
; glb printHexVideo : (
; prm num : unsigned short
; prm l : unsigned short
; ) int
; glb printLHexVideo : (
; prm num : unsigned
; prm l : unsigned short
; ) int
; glb printBinVideo : (
; prm num : unsigned short
; prm l : unsigned short
; ) int
; glb printLBinVideo : (
; prm num : unsigned
; prm l : unsigned short
; ) int
; glb printPtrVideo : (
; prm ptr : * unsigned char
; ) int
; glb printByteVideo : (
; prm b : unsigned char
; ) int
; glb printWordVideo : (
; prm w : unsigned short
; ) int
; glb printCadVideo : (
; prm cad : * char
; ) int
; glb finProgDOS : (
; prm error : int
; ) void
; RPN'ized expression: "21 "
; Expanded expression: "21 "
; Expression value: 21
; RPN'ized expression: "13 "
; Expanded expression: "13 "
; Expression value: 13
; glb hayMSDOS : (void) int
; glb hayDOSBox : (void) int
; glb hayWindowsNT : (void) int
; glb segPSP : (void) unsigned short
; glb versionMSDOS : (void) unsigned short
; glb entornoMSDOS : (void) * unsigned char
; glb valorMSDOS : (
; prm str : * char
; ) * unsigned char
; glb argcMSDOS : (void) int
; glb getArgvMSDOS : (
; prm n : unsigned short
; prm str : * char
; ) int
; glb openDOS : (
; prm nombre : * unsigned char
; prm modo : unsigned char
; ) int
; glb extendedOpenDOS : (
; prm nombre : * unsigned char
; prm modo : unsigned short
; prm atr : unsigned short
; prm accion : * unsigned short
; prm error : * unsigned short
; ) int
; glb closeDOS : (
; prm df : int
; ) int
; glb commitFileDOS : (
; prm df : int
; ) int
; glb createDOS : (
; prm nombre : * unsigned char
; prm atributo : unsigned short
; ) int
; glb readDOS : (
; prm df : int
; prm buf : * char
; prm n : int
; ) int
; glb writeDOS : (
; prm df : int
; prm buf : * char
; prm n : int
; ) int
; glb lseekDOS : (
; prm df : int
; prm pos : * unsigned
; prm whence : int
; ) int
; glb getdiskDOS : (void) int
; glb setdiskDOS : (
; prm drive : int
; ) int
; glb getcurdirDOS : (
; prm drive : int
; prm direc : * char
; ) int
; glb chdirDOS : (
; prm path : * char
; ) int
; glb findfirstDOS : (
; prm pathname : * char
; prm ffblk : * struct ffblk
; prm attrib : int
; ) int
; glb findnextDOS : (
; prm ffblk : * struct ffblk
; ) int
; glb modoAp_t : unsigned short
; glb tramaDWords_t : struct <something>
; glb tramaWords_t : struct <something>
; RPN'ized expression: "2 "
; Expanded expression: "2 "
; Expression value: 2
; RPN'ized expression: "2 "
; Expanded expression: "2 "
; Expression value: 2
; RPN'ized expression: "2 "
; Expanded expression: "2 "
; Expression value: 2
; RPN'ized expression: "2 "
; Expanded expression: "2 "
; Expression value: 2
; glb tramaBytes_t : struct <something>
; glb trama_t : union <something>
; RPN'ized expression: "8 "
; Expanded expression: "8 "
; Expression value: 8
; glb bloque_t : struct <something>
; glb ptrBloque_t : * struct <something>
; glb dobleEnlace_t : struct <something>
; glb c2c_t : struct <something>
; glb posicionC2c : (
; prm i : int
; prm c2c : struct <something>
; ) int
; glb eliminarC2c : (
; prm i : int
; prm c2c : struct <something>
; ) void
; glb apilarC2c : (
; prm i : int
; prm c2c : struct <something>
; ) void
; glb encolarC2c : (
; prm i : int
; prm c2c : struct <something>
; ) void
; glb desencolarC2c : (
; prm c2c : struct <something>
; ) int
; glb inicializarC2c : (
; prm c2c : * struct <something>
; prm e : * struct <something>
; prm cabecera : int
; prm compartida : int
; ) void
; glb ptrC2c_t : * struct <something>
; glb posicionPC2c : (
; prm i : int
; prm c2c : * struct <something>
; ) int
; glb eliminarPC2c : (
; prm i : int
; prm ptrC2c : * struct <something>
; ) void
; glb apilarPC2c : (
; prm i : int
; prm ptrC2c : * struct <something>
; ) void
; glb encolarPC2c : (
; prm i : int
; prm ptrC2c : * struct <something>
; ) void
; glb desencolarPC2c : (
; prm ptrC2c : * struct <something>
; ) int
; glb inicializarPC2c : (
; prm ptrC2c : * struct <something>
; prm e : * struct <something>
; prm cabecera : int
; prm compartida : int
; ) void
; glb callBack_t : * (
; prm arg : * void
; ) int
; RPN'ized expression: "10 "
; Expanded expression: "10 "
; Expression value: 10
; glb descCcb_t : struct <something>
; glb ccb_t : * struct <something>
; glb inicCcb : (
; prm ccb : * struct <something>
; prm max : unsigned short
; ) int
; glb encolarCcb : (
; prm cb : * (
; prm arg : * void
; ) int
; prm ccb : * struct <something>
; ) int
; glb desencolarCcb : (
; prm ccb : * struct <something>
; ) * (
; prm arg : * void
; ) int
; glb eliminarCcb : (
; prm cb : * (
; prm arg : * void
; ) int
; prm ccb : * struct <something>
; ) int
; glb eliminarSegCcb : (
; prm segmento : unsigned short
; prm ccb : * struct <something>
; ) int
; glb vaciarCcb : (
; prm ccb : * struct <something>
; ) int
; glb atenderCcb : (
; prm ccb : * struct <something>
; ) int
; glb estado_t : int
; glb dfa_t : struct <something>
; RPN'ized expression: "12 "
; Expanded expression: "12 "
; Expression value: 12
; RPN'ized expression: "80 "
; Expanded expression: "80 "
; Expression value: 80
; RPN'ized expression: "10 "
; Expanded expression: "10 "
; Expression value: 10
; glb descProceso_t : struct <something>
; glb descThread_t : struct <something>
; glb tipoFichero_t : int
; RPN'ized expression: "9 "
; Expanded expression: "9 "
; Expression value: 9
; glb descFichero_t : struct <something>
; glb tipoRecurso_t : int
; glb open_t : * (
; prm dfs : int
; prm modo : unsigned short
; ) int
; glb release_t : * (
; prm dfs : int
; ) int
; glb read_t : * (
; prm dfs : int
; prm dir : * unsigned char
; prm nbytes : unsigned short
; ) int
; glb aio_read_t : * (
; prm dfs : int
; prm dir : * unsigned char
; prm nbytes : unsigned short
; ) int
; glb write_t : * (
; prm dfs : int
; prm dir : * unsigned char
; prm nbytes : unsigned short
; ) int
; glb aio_write_t : * (
; prm dfs : int
; prm dir : * unsigned char
; prm nbytes : unsigned short
; ) int
; glb lseek_t : * (
; prm dfs : int
; prm pos : int
; prm whence : unsigned short
; ) int
; glb fcntl_t : * (
; prm dfs : int
; prm cmd : unsigned short
; prm arg : unsigned short
; ) int
; glb ioctl_t : * (
; prm dfs : int
; prm request : unsigned short
; prm arg : unsigned short
; ) int
; glb eliminar_t : * (
; prm pindx : int
; ) int
; RPN'ized expression: "12 "
; Expanded expression: "12 "
; Expression value: 12
; RPN'ized expression: "2 "
; Expanded expression: "2 "
; Expression value: 2
; RPN'ized expression: "2 "
; Expanded expression: "2 "
; Expression value: 2
; RPN'ized expression: "2 "
; Expanded expression: "2 "
; Expression value: 2
; glb descRecurso_t : struct <something>
; glb info_t : struct <something>
; glb cabecera_t : struct <something>
; RPN'ized expression: "16 1 + "
; Expanded expression: "17 "
; Expression value: 17
; RPN'ized expression: "16 2 + "
; Expanded expression: "18 "
; Expression value: 18
; RPN'ized expression: "2010 1 + "
; Expanded expression: "2011 "
; Expression value: 2011
; RPN'ized expression: "2010 2 + "
; Expanded expression: "2012 "
; Expression value: 2012
; RPN'ized expression: "20 1 + "
; Expanded expression: "21 "
; Expression value: 21
; RPN'ized expression: "20 2 + "
; Expanded expression: "22 "
; Expression value: 22
; RPN'ized expression: "14 1 + "
; Expanded expression: "15 "
; Expression value: 15
; RPN'ized expression: "14 2 + "
; Expanded expression: "16 "
; Expression value: 16
; RPN'ized expression: "16 16 + "
; Expanded expression: "32 "
; Expression value: 32
; RPN'ized expression: "2010 16 + "
; Expanded expression: "2026 "
; Expression value: 2026
; RPN'ized expression: "2010 1 + "
; Expanded expression: "2011 "
; Expression value: 2011
; RPN'ized expression: "2010 1 + "
; Expanded expression: "2011 "
; Expression value: 2011
; RPN'ized expression: "16 1 + "
; Expanded expression: "17 "
; Expression value: 17
; RPN'ized expression: "2010 1 + "
; Expanded expression: "2011 "
; Expression value: 2011
; RPN'ized expression: "20 14 + "
; Expanded expression: "34 "
; Expression value: 34
; glb e2PFR_t : struct <something>
; glb cPFR_t : int
; glb sigThread_t : * () int
; glb activarThread_t : * (
; prm tindx : int
; ) void
; glb buscarNuevoThreadActual_t : * (void) void
; glb bloquearThreadActual_t : * (
; prm rindx : int
; ) void
; glb descSO1H_t : struct <something>
; glb startBin : (void) void
; glb startExe : (void) void
; glb __start__ : (void) void
; glb modoSO1 : (void) int
; glb unidadBIOS : (void) unsigned char
; glb CSInicial : (void) unsigned short
; glb CS_SO1H : unsigned short
; glb RO_SO1H : unsigned short
; glb DS_SO1H : unsigned short
; glb BSS_SO1H : unsigned short
; glb SS_SO1H : unsigned short
; glb IMRInicial : unsigned short
; glb obtenerMapa : (void) void
; RPN'ized expression: "16 "
; Expanded expression: "16 "
; Expression value: 16
; glb nombreDF_t : [16u] char
; RPN'ized expression: "40 "
; Expanded expression: "40 "
; Expression value: 40
; glb comandoDF_t : [40u] char
; glb tipoDF_t : int
; glb entradaDF_t : struct <something>
; glb dirInicial : unsigned
; glb dirCargaFichero : unsigned
; glb dirFinal : unsigned
; glb reubicacion_t : struct <something>
; glb reubicacion : * struct <something>
; glb numER : unsigned
; glb ptrIndProcesoActual : * int
; glb ptrIndThreadActual : * int
; glb ptrTramaThread : * * union <something>
; glb ptrActivarAlEpilogo : * int
; glb ptrDescProceso : * struct <something>
; glb tamDescProceso : unsigned short
; glb ptrDescThread : * struct <something>
; glb tamDescThread : unsigned short
; glb ptrDescFichero : * struct <something>
; glb ptrDescRecurso : * struct <something>
; glb ptrC2cPFR : * struct <something>
; glb ptrE2PFR : * struct <something>
; glb ptrNivelActivacionSO1H : * int
; glb ptrEnHalt : * int
; glb ptrHayTic : * int
; glb ptrCcbAlEpilogo : * * struct <something>
; glb ptrSS_Thread : * unsigned short
; glb ptrSP_Thread : * unsigned short
; glb ptrSS_Kernel : * unsigned short
; glb ptrSP0_Kernel : * unsigned short
; glb SP0_SO1H : unsigned short
; glb ptrContRodajas : * unsigned
; glb ptrContTicsRodaja : * int
; glb ptrVIOrg : * * (void) void
; glb sigThread : * () int
; glb activarThread : * (
; prm tindx : int
; ) void
; glb buscarNuevoThreadActual : * (void) void
; glb bloquearThreadActual : * (
; prm rindx : int
; ) void
; glb ptrListaLibres : * * struct <something>
; glb ptrTamBloqueMax : * unsigned short
; glb inicProcesos_x : (void) void
; glb inicGM_x : (void) void
; glb inicGM_x : (void) void
section .text
global _inicGM_x
_inicGM_x:
push ebp
movzx ebp, sp
sub sp, 16
; loc primerSegLibre : (@-4): unsigned short
; loc sigSeg : (@-8): unsigned short
; loc memDisponible : (@-12): unsigned short
; loc ptrBloque : (@-16): * struct <something>
; RPN'ized expression: "primerSegLibre dirFinal 16 1 - + 4 >> = "
; Expanded expression: "(@-4) dirFinal *(4) 15 + 4 >>u =(2) "
; Fused expression: "dirFinal + *ax 15 >>u ax 4 =(172) *(@-4) ax "
section .relod
dd L3
section .text
db 0x66, 0xB8
L3:
dd _dirFinal
mov ebx, eax
mov esi, ebx
ror esi, 4
mov ds, si
shr esi, 28
mov eax, [si]
add eax, 15
shr eax, 4
mov [bp-4], ax
movzx eax, ax
section .rodata
L4:
db 10,10," primerSegLibre = "
times 1 db 0
section .text
; RPN'ized expression: "( L4 printStrVideo ) "
; Expanded expression: " L4 printStrVideo ()4 "
; Fused expression: "( L4 , printStrVideo )4 "
section .relod
dd L5
section .text
db 0x66, 0x68
L5:
dd L4
db 0x9A
section .relot
dd L6
section .text
L6:
dd _printStrVideo
sub sp, -4
; RPN'ized expression: "( 4 , primerSegLibre printHexVideo ) "
; Expanded expression: " 4 (@-4) *(2) printHexVideo ()8 "
; Fused expression: "( 4 , *(2) (@-4) , printHexVideo )8 "
push dword 4
mov ax, [bp-4]
movzx eax, ax
push eax
db 0x9A
section .relot
dd L7
section .text
L7:
dd _printHexVideo
sub sp, -8
; switch
; RPN'ized expression: "( modoSO1 ) "
; Expanded expression: " modoSO1 ()0 "
; Fused expression: "( modoSO1 )0 "
db 0x9A
section .relot
dd L10
section .text
L10:
dd _modoSO1
jmp L9
; {
; case
; RPN'ized expression: "modoSO1_Bin "
; Expanded expression: "0 "
; Expression value: 0
L11:
; RPN'ized expression: "sigSeg ( memBIOS ) 1024 16 / * = "
; Expanded expression: "(@-8) memBIOS ()0 64 * =(2) "
; Fused expression: "( memBIOS )0 * ax 64 =(172) *(@-8) ax "
db 0x9A
section .relot
dd L12
section .text
L12:
dd _memBIOS
imul eax, eax, 64
mov [bp-8], ax
movzx eax, ax
; break
jmp L8
; case
; RPN'ized expression: "modoSO1_Exe "
; Expanded expression: "1 "
; Expression value: 1
L13:
; loc <something> : * unsigned short
; loc <something> : unsigned
; loc <something> : unsigned
; RPN'ized expression: "sigSeg ( segPSP ) (something15) 4 << 2 (something16) + (something14) *u = "
; Expanded expression: "(@-8) segPSP ()0 4 << 2u + *(2) =(2) "
; Fused expression: "( segPSP )0 << ax 4 + ax 2u =(170) *(@-8) *ax "
db 0x9A
section .relot
dd L17
section .text
L17:
dd _segPSP
shl eax, 4
add eax, 2
mov ebx, eax
mov esi, ebx
ror esi, 4
mov ds, si
shr esi, 28
mov ax, [si]
movzx eax, ax
mov [bp-8], ax
movzx eax, ax
; break
jmp L8
; default
L18:
section .rodata
L19:
db 10," inicGM() ERROR: modoSO1() = "
times 1 db 0
section .text
; RPN'ized expression: "( L19 printStrVideo ) "
; Expanded expression: " L19 printStrVideo ()4 "
; Fused expression: "( L19 , printStrVideo )4 "
section .relod
dd L20
section .text
db 0x66, 0x68
L20:
dd L19
db 0x9A
section .relot
dd L21
section .text
L21:
dd _printStrVideo
sub sp, -4
; RPN'ized expression: "( 4 , ( modoSO1 ) printHexVideo ) "
; Expanded expression: " 4 modoSO1 ()0 printHexVideo ()8 "
; Fused expression: "( 4 , ( modoSO1 )0 , printHexVideo )8 "
push dword 4
db 0x9A
section .relot
dd L22
section .text
L22:
dd _modoSO1
push eax
db 0x9A
section .relot
dd L23
section .text
L23:
dd _printHexVideo
sub sp, -8
; RPN'ized expression: "( leerTeclaBIOS ) "
; Expanded expression: " leerTeclaBIOS ()0 "
; Fused expression: "( leerTeclaBIOS )0 "
db 0x9A
section .relot
dd L24
section .text
L24:
dd _leerTeclaBIOS
; }
jmp L8
L9:
cmp eax, 0
je L11
cmp eax, 1
je L13
jmp L18
L8:
; RPN'ized expression: "memDisponible sigSeg primerSegLibre - = "
; Expanded expression: "(@-12) (@-8) *(2) (@-4) *(2) - =(2) "
; Fused expression: "- *(@-8) *(@-4) =(172) *(@-12) ax "
mov ax, [bp-8]
movzx eax, ax
movzx ecx, word [bp-4]
sub eax, ecx
mov [bp-12], ax
movzx eax, ax
section .rodata
L25:
db " sigSeg = "
times 1 db 0
section .text
; RPN'ized expression: "( L25 printStrVideo ) "
; Expanded expression: " L25 printStrVideo ()4 "
; Fused expression: "( L25 , printStrVideo )4 "
section .relod
dd L26
section .text
db 0x66, 0x68
L26:
dd L25
db 0x9A
section .relot
dd L27
section .text
L27:
dd _printStrVideo
sub sp, -4
; RPN'ized expression: "( 4 , sigSeg printHexVideo ) "
; Expanded expression: " 4 (@-8) *(2) printHexVideo ()8 "
; Fused expression: "( 4 , *(2) (@-8) , printHexVideo )8 "
push dword 4
mov ax, [bp-8]
movzx eax, ax
push eax
db 0x9A
section .relot
dd L28
section .text
L28:
dd _printHexVideo
sub sp, -8
section .rodata
L29:
db " memDisponible = "
times 1 db 0
section .text
; RPN'ized expression: "( L29 printStrVideo ) "
; Expanded expression: " L29 printStrVideo ()4 "
; Fused expression: "( L29 , printStrVideo )4 "
section .relod
dd L30
section .text
db 0x66, 0x68
L30:
dd L29
db 0x9A
section .relot
dd L31
section .text
L31:
dd _printStrVideo
sub sp, -4
; RPN'ized expression: "( 4 , memDisponible printHexVideo ) "
; Expanded expression: " 4 (@-12) *(2) printHexVideo ()8 "
; Fused expression: "( 4 , *(2) (@-12) , printHexVideo )8 "
push dword 4
mov ax, [bp-12]
movzx eax, ax
push eax
db 0x9A
section .relot
dd L32
section .text
L32:
dd _printHexVideo
sub sp, -8
; loc <something> : * struct <something>
; loc <something> : unsigned
; RPN'ized expression: "ptrBloque primerSegLibre (something34) 4 << (something33) = "
; Expanded expression: "(@-16) (@-4) *(2) 4 << =(4) "
; Fused expression: "<< *(@-4) 4 =(204) *(@-16) ax "
mov ax, [bp-4]
movzx eax, ax
shl eax, 4
mov [bp-16], eax
; RPN'ized expression: "ptrBloque tam -> *u memDisponible 1 - = "
; Expanded expression: "(@-16) *(4) 0 + (@-12) *(2) 1 - =(2) "
; Fused expression: "+ *(@-16) 0 push-ax - *(@-12) 1 =(172) **sp ax "
mov eax, [bp-16]
push eax
mov ax, [bp-12]
movzx eax, ax
dec eax
pop ebx
mov esi, ebx
ror esi, 4
mov ds, si
shr esi, 28
mov [si], ax
movzx eax, ax
; loc <something> : unsigned short
; loc <something> : unsigned
; RPN'ized expression: "ptrBloque sig -> *u ptrBloque (something36) 4 >> (something35) ptrBloque tam -> *u + = "
; Expanded expression: "(@-16) *(4) 2 + (@-16) *(4) 4 >>u unsigned short (@-16) *(4) 0 + *(2) + =(2) "
; Fused expression: "+ *(@-16) 2 push-ax >>u *(@-16) 4 unsigned short push-ax + *(@-16) 0 + *sp *ax =(172) **sp ax "
mov eax, [bp-16]
add eax, 2
push eax
mov eax, [bp-16]
shr eax, 4
movzx eax, ax
push eax
mov eax, [bp-16]
mov ebx, eax
mov esi, ebx
ror esi, 4
mov ds, si
shr esi, 28
movzx ecx, word [si]
pop eax
add eax, ecx
pop ebx
mov esi, ebx
ror esi, 4
mov ds, si
shr esi, 28
mov [si], ax
movzx eax, ax
; RPN'ized expression: "ptrBloque ant -> *u ptrBloque sig -> *u = "
; Expanded expression: "(@-16) *(4) 4 + (@-16) *(4) 2 + *(2) =(2) "
; Fused expression: "+ *(@-16) 4 push-ax + *(@-16) 2 =(170) **sp *ax "
mov eax, [bp-16]
add eax, 4
push eax
mov eax, [bp-16]
add eax, 2
mov ebx, eax
mov esi, ebx
ror esi, 4
mov ds, si
shr esi, 28
mov ax, [si]
movzx eax, ax
pop ebx
mov esi, ebx
ror esi, 4
mov ds, si
shr esi, 28
mov [si], ax
movzx eax, ax
; loc <something> : * struct <something>
; loc <something> : unsigned
; RPN'ized expression: "ptrListaLibres *u ptrBloque sig -> *u (something38) 4 << (something37) = "
; Expanded expression: "ptrListaLibres *(4) (@-16) *(4) 2 + *(2) 4 << =(4) "
; Fused expression: "ptrListaLibres *(4) ax push-ax + *(@-16) 2 << *ax 4 =(204) **sp ax "
section .relod
dd L39
section .text
db 0x66, 0xB8
L39:
dd _ptrListaLibres
mov ebx, eax
mov esi, ebx
ror esi, 4
mov ds, si
shr esi, 28
mov eax, [si]
push eax
mov eax, [bp-16]
add eax, 2
mov ebx, eax
mov esi, ebx
ror esi, 4
mov ds, si
shr esi, 28
mov ax, [si]
movzx eax, ax
shl eax, 4
pop ebx
mov esi, ebx
ror esi, 4
mov ds, si
shr esi, 28
mov [si], eax
; RPN'ized expression: "ptrListaLibres *u tam -> *u 1 = "
; Expanded expression: "ptrListaLibres *(4) *(4) 0 + 1 =(2) "
; Fused expression: "ptrListaLibres *(4) ax + *ax 0 =(172) *ax 1 "
section .relod
dd L40
section .text
db 0x66, 0xB8
L40:
dd _ptrListaLibres
mov ebx, eax
mov esi, ebx
ror esi, 4
mov ds, si
shr esi, 28
mov eax, [si]
mov ebx, eax
mov esi, ebx
ror esi, 4
mov ds, si
shr esi, 28
mov eax, [si]
mov ebx, eax
mov eax, 1
mov esi, ebx
ror esi, 4
mov ds, si
shr esi, 28
mov [si], ax
movzx eax, ax
; loc <something> : unsigned short
; loc <something> : unsigned
; RPN'ized expression: "ptrListaLibres *u sig -> *u ptrBloque (something42) 4 >> (something41) = "
; Expanded expression: "ptrListaLibres *(4) *(4) 2 + (@-16) *(4) 4 >>u unsigned short =(2) "
; Fused expression: "ptrListaLibres *(4) ax + *ax 2 push-ax >>u *(@-16) 4 unsigned short =(172) **sp ax "
section .relod
dd L43
section .text
db 0x66, 0xB8
L43:
dd _ptrListaLibres
mov ebx, eax
mov esi, ebx
ror esi, 4
mov ds, si
shr esi, 28
mov eax, [si]
mov ebx, eax
mov esi, ebx
ror esi, 4
mov ds, si
shr esi, 28
mov eax, [si]
add eax, 2
push eax
mov eax, [bp-16]
shr eax, 4
movzx eax, ax
pop ebx
mov esi, ebx
ror esi, 4
mov ds, si
shr esi, 28
mov [si], ax
movzx eax, ax
; RPN'ized expression: "ptrListaLibres *u ant -> *u ptrListaLibres *u sig -> *u = "
; Expanded expression: "ptrListaLibres *(4) *(4) 4 + ptrListaLibres *(4) *(4) 2 + *(2) =(2) "
; Fused expression: "ptrListaLibres *(4) ax + *ax 4 push-ax ptrListaLibres *(4) ax + *ax 2 =(170) **sp *ax "
section .relod
dd L44
section .text
db 0x66, 0xB8
L44:
dd _ptrListaLibres
mov ebx, eax
mov esi, ebx
ror esi, 4
mov ds, si
shr esi, 28
mov eax, [si]
mov ebx, eax
mov esi, ebx
ror esi, 4
mov ds, si
shr esi, 28
mov eax, [si]
add eax, 4
push eax
section .relod
dd L45
section .text
db 0x66, 0xB8
L45:
dd _ptrListaLibres
mov ebx, eax
mov esi, ebx
ror esi, 4
mov ds, si
shr esi, 28
mov eax, [si]
mov ebx, eax
mov esi, ebx
ror esi, 4
mov ds, si
shr esi, 28
mov eax, [si]
add eax, 2
mov ebx, eax
mov esi, ebx
ror esi, 4
mov ds, si
shr esi, 28
mov ax, [si]
movzx eax, ax
pop ebx
mov esi, ebx
ror esi, 4
mov ds, si
shr esi, 28
mov [si], ax
movzx eax, ax
; RPN'ized expression: "ptrTamBloqueMax *u ptrBloque tam -> *u = "
; Expanded expression: "ptrTamBloqueMax *(4) (@-16) *(4) 0 + *(2) =(2) "
; Fused expression: "ptrTamBloqueMax *(4) ax push-ax + *(@-16) 0 =(170) **sp *ax "
section .relod
dd L46
section .text
db 0x66, 0xB8
L46:
dd _ptrTamBloqueMax
mov ebx, eax
mov esi, ebx
ror esi, 4
mov ds, si
shr esi, 28
mov eax, [si]
push eax
mov eax, [bp-16]
mov ebx, eax
mov esi, ebx
ror esi, 4
mov ds, si
shr esi, 28
mov ax, [si]
movzx eax, ax
pop ebx
mov esi, ebx
ror esi, 4
mov ds, si
shr esi, 28
mov [si], ax
movzx eax, ax
L1:
db 0x66
leave
retf
L47:
section .fxnsz noalloc
dd L47 - _inicGM_x
extern _dirFinal
extern _printStrVideo
extern _printHexVideo
extern _modoSO1
extern _memBIOS
extern _segPSP
extern _leerTeclaBIOS
extern _ptrListaLibres
extern _ptrTamBloqueMax
; Syntax/declaration table/stack:
; Bytes used: 13045/40960
; Macro table:
; Macro __SMALLER_C__ = `0x0100`
; Macro __SMALLER_C_32__ = ``
; Macro __HUGE__ = ``
; Macro __SMALLER_C_SCHAR__ = ``
; Bytes used: 74/5120
; Identifier table:
; Ident __floatsisf
; Ident __floatunsisf
; Ident __fixsfsi
; Ident __fixunssfsi
; Ident __addsf3
; Ident __subsf3
; Ident __negsf2
; Ident __mulsf3
; Ident __divsf3
; Ident __lesf2
; Ident __gesf2
; Ident intptr_t
; Ident uintptr_t
; Ident intmax_t
; Ident uintmax_t
; Ident int8_t
; Ident int_least8_t
; Ident int_fast8_t
; Ident uint8_t
; Ident uint_least8_t
; Ident uint_fast8_t
; Ident int16_t
; Ident int_least16_t
; Ident int_fast16_t
; Ident uint16_t
; Ident uint_least16_t
; Ident uint_fast16_t
; Ident int32_t
; Ident int_least32_t
; Ident int_fast32_t
; Ident uint32_t
; Ident uint_least32_t
; Ident uint_fast32_t
; Ident <something>
; Ident quot
; Ident rem
; Ident imaxdiv_t
; Ident FALSE
; Ident TRUE
; Ident bool_t
; Ident pointer_t
; Ident funcion_t
; Ident manejador_t
; Ident rti_t
; Ident isr_t
; Ident handler_t
; Ident retardarThread_t
; Ident ptrTVI_t
; Ident modoSO1_Bin
; Ident modoSO1_Exe
; Ident modoSO1_Bs
; Ident modoSO1_t
; Ident lo
; Ident hi
; Ident lh_t
; Ident offset
; Ident segment
; Ident address_t
; Ident ptr
; Ident adr
; Ident uPtrAdr_t
; Ident pid_t
; Ident tid_t
; Ident uid_t
; Ident gid_t
; Ident pindx_t
; Ident tindx_t
; Ident df_t
; Ident dfs_t
; Ident rindx_t
; Ident tipoOrdenador
; Ident rebootLegacy
; Ident tipoTeclado
; Ident leerTeclaBIOS
; Ident leerTeclaExtBIOS
; Ident teclaListaBIOS
; Ident leerTeclaListaBDA
; Ident teclaListaBDA
; Ident printCarBIOS
; Ident car
; Ident printCarPagBIOS
; Ident pag
; Ident printCarAtrPagBIOS
; Ident atr
; Ident printLnBIOS
; Ident printStrBIOS
; Ident str
; Ident printStrHastaBIOS
; Ident n
; Ident lleno
; Ident printDecBIOS
; Ident num
; Ident l
; Ident printLDecBIOS
; Ident printIntBIOS
; Ident printLIntBIOS
; Ident printHexBIOS
; Ident printLHexBIOS
; Ident printBinBIOS
; Ident printLBinBIOS
; Ident printPtrBIOS
; Ident printByteBIOS
; Ident b
; Ident printWordBIOS
; Ident w
; Ident printCadBIOS
; Ident cad
; Ident esperarTicsBIOS
; Ident tics
; Ident modoDeVideo
; Ident establecerModoDeVideo
; Ident modo
; Ident paginaActiva
; Ident establecerPaginaActiva
; Ident numPagsVideo
; Ident scrollPagBDA
; Ident numLineas
; Ident scrollPagBIOS
; Ident scrollBIOS
; Ident goToXYPag
; Ident fila
; Ident columna
; Ident goToXYBIOS
; Ident setCursorBIOS
; Ident linea1
; Ident linea2
; Ident ocultaCursorBIOS
; Ident readXYPagBIOS
; Ident readXYBIOS
; Ident memBIOS
; Ident enviarBIOS
; Ident recibirBIOS
; Ident hayApmBIOS
; Ident version
; Ident connectApmBIOS
; Ident disconnectApmBIOS
; Ident cpuIdleBIOS
; Ident cpuBusyBIOS
; Ident printCarVideo
; Ident printLnVideo
; Ident printStrVideo
; Ident printStrHastaVideo
; Ident printDecVideo
; Ident printLDecVideo
; Ident printIntVideo
; Ident printLIntVideo
; Ident printHexVideo
; Ident printLHexVideo
; Ident printBinVideo
; Ident printLBinVideo
; Ident printPtrVideo
; Ident printByteVideo
; Ident printWordVideo
; Ident printCadVideo
; Ident finProgDOS
; Ident error
; Ident ffblk
; Ident ff_reserved
; Ident ff_attrib
; Ident ff_ftime
; Ident ff_fdate
; Ident ff_fsize
; Ident ff_name
; Ident hayMSDOS
; Ident hayDOSBox
; Ident hayWindowsNT
; Ident segPSP
; Ident versionMSDOS
; Ident entornoMSDOS
; Ident valorMSDOS
; Ident argcMSDOS
; Ident getArgvMSDOS
; Ident openDOS
; Ident nombre
; Ident extendedOpenDOS
; Ident accion
; Ident closeDOS
; Ident df
; Ident commitFileDOS
; Ident createDOS
; Ident atributo
; Ident readDOS
; Ident buf
; Ident writeDOS
; Ident lseekDOS
; Ident pos
; Ident whence
; Ident getdiskDOS
; Ident setdiskDOS
; Ident drive
; Ident getcurdirDOS
; Ident direc
; Ident chdirDOS
; Ident path
; Ident findfirstDOS
; Ident pathname
; Ident attrib
; Ident findnextDOS
; Ident modoAp_t
; Ident DS
; Ident ES
; Ident EDI
; Ident ESI
; Ident EBP
; Ident ESP
; Ident EBX
; Ident EDX
; Ident ECX
; Ident EAX
; Ident IP
; Ident CS
; Ident Flags
; Ident tramaDWords_t
; Ident DI
; Ident rDI
; Ident SI
; Ident rSI
; Ident BP
; Ident rBP
; Ident SP
; Ident rSP
; Ident BX
; Ident rBX
; Ident DX
; Ident rDX
; Ident CX
; Ident rCX
; Ident AX
; Ident rAX
; Ident tramaWords_t
; Ident BL
; Ident BH
; Ident rB
; Ident DL
; Ident DH
; Ident rD
; Ident CL
; Ident CH
; Ident rC
; Ident AL
; Ident AH
; Ident rA
; Ident tramaBytes_t
; Ident td
; Ident tw
; Ident tb
; Ident trama_t
; Ident tam
; Ident sig
; Ident ant
; Ident aux
; Ident relleno
; Ident bloque_t
; Ident ptrBloque_t
; Ident cab
; Ident dobleEnlace_t
; Ident numElem
; Ident primero
; Ident cabecera
; Ident e
; Ident c2c_t
; Ident posicionC2c
; Ident i
; Ident c2c
; Ident eliminarC2c
; Ident apilarC2c
; Ident encolarC2c
; Ident desencolarC2c
; Ident inicializarC2c
; Ident compartida
; Ident ptrC2c_t
; Ident posicionPC2c
; Ident eliminarPC2c
; Ident ptrC2c
; Ident apilarPC2c
; Ident encolarPC2c
; Ident desencolarPC2c
; Ident inicializarPC2c
; Ident callBack_t
; Ident arg
; Ident in
; Ident out
; Ident max
; Ident callBack
; Ident descCcb_t
; Ident ccb_t
; Ident inicCcb
; Ident ccb
; Ident encolarCcb
; Ident cb
; Ident desencolarCcb
; Ident eliminarCcb
; Ident eliminarSegCcb
; Ident segmento
; Ident vaciarCcb
; Ident atenderCcb
; Ident libre
; Ident preparado
; Ident ejecutandose
; Ident bloqueado
; Ident estado_t
; Ident modoAp
; Ident dfs
; Ident dfa_t
; Ident pid
; Ident noStatus
; Ident status
; Ident ppindx
; Ident hpindx
; Ident c2cHijos
; Ident c2cThreads
; Ident CSProc
; Ident tamCodigo
; Ident desplBSS
; Ident desplPila
; Ident tamFichero
; Ident programa
; Ident comando
; Ident nfa
; Ident tfa
; Ident uid
; Ident gid
; Ident descProceso_t
; Ident tid
; Ident estado
; Ident esperandoPor
; Ident trama
; Ident ptindx
; Ident htindx
; Ident pindx
; Ident SSThread
; Ident SP0
; Ident descThread_t
; Ident flibre
; Ident fRegular
; Ident fedBloques
; Ident fedCaracteres
; Ident tuberia
; Ident tipoFichero_t
; Ident tipo
; Ident rindx
; Ident menor
; Ident shareMode
; Ident contAp_L
; Ident contAp_E
; Ident descFichero_t
; Ident rLibre
; Ident rDCaracteres
; Ident rDBloques
; Ident rTuberia
; Ident rGP
; Ident rGM
; Ident rSF
; Ident rOtro
; Ident tipoRecurso_t
; Ident open_t
; Ident release_t
; Ident read_t
; Ident dir
; Ident nbytes
; Ident aio_read_t
; Ident write_t
; Ident aio_write_t
; Ident lseek_t
; Ident fcntl_t
; Ident cmd
; Ident ioctl_t
; Ident request
; Ident eliminar_t
; Ident tindx
; Ident c2cFichRec
; Ident numVI
; Ident nVInt
; Ident irq
; Ident isr
; Ident open
; Ident release
; Ident read
; Ident aio_read
; Ident write
; Ident aio_write
; Ident lseek
; Ident fcntl
; Ident ioctl
; Ident eliminar
; Ident descRecurso_t
; Ident SP0_So1
; Ident IMR
; Ident modoSO1
; Ident ptrDebugWord
; Ident info_t
; Ident signatura
; Ident bytesUltSector
; Ident sectores
; Ident numDirReub
; Ident numParCabecera
; Ident minAlloc
; Ident maxAlloc
; Ident SS0
; Ident checkSum
; Ident IP0
; Ident CS0
; Ident offTablaReub
; Ident numOverlay
; Ident cabecera_t
; Ident Libres
; Ident Ocupados
; Ident e2DescProceso
; Ident e2DescThread
; Ident e2DescFichero
; Ident e2DescRecurso
; Ident e2Hijos
; Ident e2Threads
; Ident e2Preparados
; Ident e2Urgentes
; Ident e2POrdenados
; Ident e2TDormidos
; Ident e2FichRec
; Ident e2PFR_t
; Ident DPLibres
; Ident DPOcupados
; Ident DTLibres
; Ident DTOcupados
; Ident TPreparados
; Ident TUrgentes
; Ident POrdenados
; Ident TDormidos
; Ident DFLibres
; Ident DFOcupados
; Ident DRLibres
; Ident DROcupados
; Ident numColasPFR
; Ident cPFR_t
; Ident sigThread_t
; Ident activarThread_t
; Ident buscarNuevoThreadActual_t
; Ident bloquearThreadActual_t
; Ident ptrIndProcesoActual
; Ident ptrIndThreadActual
; Ident ptrTramaThread
; Ident ptrActivarAlEpilogo
; Ident ptrDescProceso
; Ident tamDescProceso
; Ident ptrDescThread
; Ident tamDescThread
; Ident ptrDescFichero
; Ident ptrDescRecurso
; Ident ptrC2cPFR
; Ident ptrE2PFR
; Ident ptrNivelActivacionSO1H
; Ident ptrEnHalt
; Ident ptrHayTic
; Ident ptrCcbAlEpilogo
; Ident ptrSS_Thread
; Ident ptrSP_Thread
; Ident ptrSS_Kernel
; Ident ptrSP0_Kernel
; Ident SP0_SO1H
; Ident ptrContRodajas
; Ident ptrContTicsRodaja
; Ident ptrVIOrg
; Ident sigThread
; Ident activarThread
; Ident buscarNuevoThreadActual
; Ident bloquearThreadActual
; Ident ptrListaLibres
; Ident ptrTamBloqueMax
; Ident descSO1H_t
; Ident startBin
; Ident startExe
; Ident __start__
; Ident unidadBIOS
; Ident CSInicial
; Ident CS_SO1H
; Ident RO_SO1H
; Ident DS_SO1H
; Ident BSS_SO1H
; Ident SS_SO1H
; Ident IMRInicial
; Ident obtenerMapa
; Ident nombreDF_t
; Ident comandoDF_t
; Ident so1h_0_DF
; Ident datos_DF
; Ident so1h_k_DF
; Ident proceso_DF
; Ident dram_DF
; Ident tipoDF_t
; Ident start
; Ident otro
; Ident SS
; Ident entradaDF_t
; Ident dirInicial
; Ident dirCargaFichero
; Ident dirFinal
; Ident entradaDF
; Ident origen
; Ident destino
; Ident reubicacion_t
; Ident reubicacion
; Ident numER
; Ident inicProcesos_x
; Ident inicGM_x
; Bytes used: 5261/16384
; Next label number: 48
; Compilation succeeded.
| 21.536972 | 119 | 0.657157 |
1e8a8fea7e9d2783ecda66044dbf209dc01e8890 | 914 | asm | Assembly | second.asm | jacmba/nerdy-nights | 64cf2cb1a02944a6932e9db2c6c12f032ab1dd4e | [
"WTFPL"
] | null | null | null | second.asm | jacmba/nerdy-nights | 64cf2cb1a02944a6932e9db2c6c12f032ab1dd4e | [
"WTFPL"
] | null | null | null | second.asm | jacmba/nerdy-nights | 64cf2cb1a02944a6932e9db2c6c12f032ab1dd4e | [
"WTFPL"
] | null | null | null | .inesprg 1
.ineschr 1
.inesmir 1
.inesmap 0
.bank 0
.org $8000
Reset:
sei
cld
ldx #$00
VBlank:
bit $2002
bpl VBlank
inx
cpx #$02
bne VBlank ; Wait for 2 V-Blank cycles
lda #%10000000 ;enable NMI
sta $2000
lda #%00010000 ;enable sprite rendering
sta $2001
lda $2002
lda #$3F
sta $2006
lda #$00
sta $2006
ldx #$00
LoadPalLoop:
lda Palette, x
sta $2007
inx
cpx #$20
bne LoadPalLoop
ldx #$00
LoadSpriteLoop:
lda Sprite, x
sta $0200, x
inx
cpx #$08
bne LoadSpriteLoop
Forever:
jmp Forever
Nmi:
lda #$00
sta $2003
lda #$02
sta $4014
rti
Palette:
.byte $0F,$31,$32,$33,$34,$35,$36,$37,$38,$39,$3A,$3B,$3C,$3D,$3E,$3F
.byte $0F,$05,$28,$08,$34,$35,$36,$37,$38,$39,$3A,$3B,$3C,$3D,$3E,$3F
Sprite:
.db $80, $36, $00, $80
.db $80, $37, $00, $88
.bank 1
.org $FFFA
.dw Nmi, Reset, 0
.bank 2
.incbin "mario.chr"
| 12.351351 | 71 | 0.577681 |
2d8e381fcfe3713a14964c3caca50b2ff39085ad | 47,360 | asm | Assembly | out/grep.asm | harveydong/learning-xv6 | 6bfe152a45e87dcca0ee1932625d3fe6dd34a203 | [
"MIT-0"
] | null | null | null | out/grep.asm | harveydong/learning-xv6 | 6bfe152a45e87dcca0ee1932625d3fe6dd34a203 | [
"MIT-0"
] | null | null | null | out/grep.asm | harveydong/learning-xv6 | 6bfe152a45e87dcca0ee1932625d3fe6dd34a203 | [
"MIT-0"
] | null | null | null |
.fs/grep: file format elf64-x86-64
Disassembly of section .text:
0000000000000000 <main>:
}
}
int
main(int argc, char *argv[])
{
0: 55 push %rbp
int fd, i;
char *pattern;
if(argc <= 1){
1: 83 ff 01 cmp $0x1,%edi
}
}
int
main(int argc, char *argv[])
{
4: 48 89 e5 mov %rsp,%rbp
7: 41 57 push %r15
9: 41 56 push %r14
b: 41 55 push %r13
d: 41 54 push %r12
f: 53 push %rbx
10: 50 push %rax
int fd, i;
char *pattern;
if(argc <= 1){
11: 7f 15 jg 28 <main+0x28>
printf(2, "usage: grep pattern [file ...]\n");
13: 48 c7 c6 20 08 00 00 mov $0x820,%rsi
1a: bf 02 00 00 00 mov $0x2,%edi
1f: 31 c0 xor %eax,%eax
21: e8 ba 04 00 00 callq 4e0 <printf>
26: eb 16 jmp 3e <main+0x3e>
exit();
}
pattern = argv[1];
if(argc <= 2){
28: 83 ff 02 cmp $0x2,%edi
2b: 41 89 fd mov %edi,%r13d
if(argc <= 1){
printf(2, "usage: grep pattern [file ...]\n");
exit();
}
pattern = argv[1];
2e: 4c 8b 76 08 mov 0x8(%rsi),%r14
if(argc <= 2){
32: 75 0f jne 43 <main+0x43>
grep(pattern, 0);
34: 31 f6 xor %esi,%esi
36: 4c 89 f7 mov %r14,%rdi
39: e8 2e 01 00 00 callq 16c <grep>
exit();
3e: e8 6a 03 00 00 callq 3ad <exit>
43: 48 8d 5e 10 lea 0x10(%rsi),%rbx
printf(2, "usage: grep pattern [file ...]\n");
exit();
}
pattern = argv[1];
if(argc <= 2){
47: 41 bc 02 00 00 00 mov $0x2,%r12d
grep(pattern, 0);
exit();
}
for(i = 2; i < argc; i++){
if((fd = open(argv[i], 0)) < 0){
4d: 48 8b 3b mov (%rbx),%rdi
50: 31 f6 xor %esi,%esi
52: e8 96 03 00 00 callq 3ed <open>
57: 85 c0 test %eax,%eax
59: 41 89 c7 mov %eax,%r15d
5c: 79 18 jns 76 <main+0x76>
printf(1, "grep: cannot open %s\n", argv[i]);
5e: 48 8b 13 mov (%rbx),%rdx
61: 48 c7 c6 40 08 00 00 mov $0x840,%rsi
68: bf 01 00 00 00 mov $0x1,%edi
6d: 31 c0 xor %eax,%eax
6f: e8 6c 04 00 00 callq 4e0 <printf>
74: eb c8 jmp 3e <main+0x3e>
exit();
}
grep(pattern, fd);
76: 89 c6 mov %eax,%esi
78: 4c 89 f7 mov %r14,%rdi
if(argc <= 2){
grep(pattern, 0);
exit();
}
for(i = 2; i < argc; i++){
7b: 41 ff c4 inc %r12d
if((fd = open(argv[i], 0)) < 0){
printf(1, "grep: cannot open %s\n", argv[i]);
exit();
}
grep(pattern, fd);
7e: e8 e9 00 00 00 callq 16c <grep>
close(fd);
83: 44 89 ff mov %r15d,%edi
86: 48 83 c3 08 add $0x8,%rbx
8a: e8 46 03 00 00 callq 3d5 <close>
if(argc <= 2){
grep(pattern, 0);
exit();
}
for(i = 2; i < argc; i++){
8f: 45 39 e5 cmp %r12d,%r13d
92: 7f b9 jg 4d <main+0x4d>
94: eb a8 jmp 3e <main+0x3e>
0000000000000096 <matchstar>:
return 0;
}
// matchstar: search for c*re at beginning of text
int matchstar(int c, char *re, char *text)
{
96: 55 push %rbp
97: 48 89 e5 mov %rsp,%rbp
9a: 41 55 push %r13
9c: 41 54 push %r12
9e: 53 push %rbx
9f: 51 push %rcx
a0: 41 89 fd mov %edi,%r13d
a3: 49 89 f4 mov %rsi,%r12
a6: 48 89 d3 mov %rdx,%rbx
do{ // a * matches zero or more instances
if(matchhere(re, text))
a9: 48 89 de mov %rbx,%rsi
ac: 4c 89 e7 mov %r12,%rdi
af: e8 28 00 00 00 callq dc <matchhere>
b4: 85 c0 test %eax,%eax
b6: 75 17 jne cf <matchstar+0x39>
return 1;
}while(*text!='\0' && (*text++==c || c=='.'));
b8: 0f be 0b movsbl (%rbx),%ecx
bb: 84 c9 test %cl,%cl
bd: 74 15 je d4 <matchstar+0x3e>
bf: 48 ff c3 inc %rbx
c2: 41 83 fd 2e cmp $0x2e,%r13d
c6: 74 e1 je a9 <matchstar+0x13>
c8: 44 39 e9 cmp %r13d,%ecx
cb: 74 dc je a9 <matchstar+0x13>
cd: eb 05 jmp d4 <matchstar+0x3e>
// matchstar: search for c*re at beginning of text
int matchstar(int c, char *re, char *text)
{
do{ // a * matches zero or more instances
if(matchhere(re, text))
return 1;
cf: b8 01 00 00 00 mov $0x1,%eax
}while(*text!='\0' && (*text++==c || c=='.'));
return 0;
}
d4: 5a pop %rdx
d5: 5b pop %rbx
d6: 41 5c pop %r12
d8: 41 5d pop %r13
da: 5d pop %rbp
db: c3 retq
00000000000000dc <matchhere>:
return 0;
}
// matchhere: search for re at beginning of text
int matchhere(char *re, char *text)
{
dc: 55 push %rbp
dd: 48 89 f2 mov %rsi,%rdx
e0: 48 89 e5 mov %rsp,%rbp
if(re[0] == '\0')
e3: 8a 07 mov (%rdi),%al
e5: 84 c0 test %al,%al
e7: 74 3a je 123 <matchhere+0x47>
return 1;
if(re[1] == '*')
e9: 8a 4f 01 mov 0x1(%rdi),%cl
ec: 80 f9 2a cmp $0x2a,%cl
ef: 75 0a jne fb <matchhere+0x1f>
if(re[0] == '$' && re[1] == '\0')
return *text == '\0';
if(*text!='\0' && (re[0]=='.' || re[0]==*text))
return matchhere(re+1, text+1);
return 0;
}
f1: 5d pop %rbp
int matchhere(char *re, char *text)
{
if(re[0] == '\0')
return 1;
if(re[1] == '*')
return matchstar(re[0], re+2, text);
f2: 48 8d 77 02 lea 0x2(%rdi),%rsi
f6: 0f be f8 movsbl %al,%edi
f9: eb 9b jmp 96 <matchstar>
if(re[0] == '$' && re[1] == '\0')
fb: 3c 24 cmp $0x24,%al
fd: 75 0e jne 10d <matchhere+0x31>
ff: 84 c9 test %cl,%cl
101: 75 0a jne 10d <matchhere+0x31>
return *text == '\0';
103: 31 c0 xor %eax,%eax
105: 80 3a 00 cmpb $0x0,(%rdx)
108: 0f 94 c0 sete %al
10b: eb 1f jmp 12c <matchhere+0x50>
if(*text!='\0' && (re[0]=='.' || re[0]==*text))
10d: 8a 0a mov (%rdx),%cl
10f: 84 c9 test %cl,%cl
111: 74 17 je 12a <matchhere+0x4e>
113: 3c 2e cmp $0x2e,%al
115: 74 04 je 11b <matchhere+0x3f>
117: 38 c8 cmp %cl,%al
119: 75 0f jne 12a <matchhere+0x4e>
return matchhere(re+1, text+1);
11b: 48 ff c2 inc %rdx
11e: 48 ff c7 inc %rdi
121: eb c0 jmp e3 <matchhere+0x7>
// matchhere: search for re at beginning of text
int matchhere(char *re, char *text)
{
if(re[0] == '\0')
return 1;
123: b8 01 00 00 00 mov $0x1,%eax
128: eb 02 jmp 12c <matchhere+0x50>
return matchstar(re[0], re+2, text);
if(re[0] == '$' && re[1] == '\0')
return *text == '\0';
if(*text!='\0' && (re[0]=='.' || re[0]==*text))
return matchhere(re+1, text+1);
return 0;
12a: 31 c0 xor %eax,%eax
}
12c: 5d pop %rbp
12d: c3 retq
000000000000012e <match>:
int matchhere(char*, char*);
int matchstar(int, char*, char*);
int
match(char *re, char *text)
{
12e: 55 push %rbp
12f: 48 89 e5 mov %rsp,%rbp
132: 41 54 push %r12
134: 53 push %rbx
if(re[0] == '^')
135: 80 3f 5e cmpb $0x5e,(%rdi)
int matchhere(char*, char*);
int matchstar(int, char*, char*);
int
match(char *re, char *text)
{
138: 49 89 fc mov %rdi,%r12
13b: 48 89 f3 mov %rsi,%rbx
if(re[0] == '^')
13e: 75 13 jne 153 <match+0x25>
do{ // must look at empty string
if(matchhere(re, text))
return 1;
}while(*text++ != '\0');
return 0;
}
140: 5b pop %rbx
141: 41 5c pop %r12
143: 5d pop %rbp
int
match(char *re, char *text)
{
if(re[0] == '^')
return matchhere(re+1, text);
144: 48 8d 7f 01 lea 0x1(%rdi),%rdi
148: eb 92 jmp dc <matchhere>
do{ // must look at empty string
if(matchhere(re, text))
return 1;
}while(*text++ != '\0');
14a: 48 ff c3 inc %rbx
14d: 80 7b ff 00 cmpb $0x0,-0x1(%rbx)
151: 74 14 je 167 <match+0x39>
match(char *re, char *text)
{
if(re[0] == '^')
return matchhere(re+1, text);
do{ // must look at empty string
if(matchhere(re, text))
153: 48 89 de mov %rbx,%rsi
156: 4c 89 e7 mov %r12,%rdi
159: e8 7e ff ff ff callq dc <matchhere>
15e: 85 c0 test %eax,%eax
160: 74 e8 je 14a <match+0x1c>
return 1;
162: b8 01 00 00 00 mov $0x1,%eax
}while(*text++ != '\0');
return 0;
}
167: 5b pop %rbx
168: 41 5c pop %r12
16a: 5d pop %rbp
16b: c3 retq
000000000000016c <grep>:
char buf[1024];
int match(char*, char*);
void
grep(char *pattern, int fd)
{
16c: 55 push %rbp
16d: 48 89 e5 mov %rsp,%rbp
170: 41 57 push %r15
172: 41 56 push %r14
174: 41 55 push %r13
176: 41 54 push %r12
178: 49 89 ff mov %rdi,%r15
17b: 53 push %rbx
17c: 48 83 ec 18 sub $0x18,%rsp
180: 89 75 cc mov %esi,-0x34(%rbp)
write(1, p, q+1 - p);
}
p = q+1;
}
if(p == buf)
m = 0;
183: 31 db xor %ebx,%ebx
{
int n, m;
char *p, *q;
m = 0;
while((n = read(fd, buf+m, sizeof(buf)-m-1)) > 0){
185: 8b 7d cc mov -0x34(%rbp),%edi
188: ba ff 03 00 00 mov $0x3ff,%edx
18d: 48 63 f3 movslq %ebx,%rsi
190: 29 da sub %ebx,%edx
192: 48 81 c6 80 0b 00 00 add $0xb80,%rsi
199: e8 27 02 00 00 callq 3c5 <read>
19e: 85 c0 test %eax,%eax
1a0: 0f 8e 93 00 00 00 jle 239 <grep+0xcd>
m += n;
1a6: 01 c3 add %eax,%ebx
buf[m] = '\0';
p = buf;
1a8: 49 c7 c4 80 0b 00 00 mov $0xb80,%r12
char *p, *q;
m = 0;
while((n = read(fd, buf+m, sizeof(buf)-m-1)) > 0){
m += n;
buf[m] = '\0';
1af: 48 63 c3 movslq %ebx,%rax
1b2: c6 80 80 0b 00 00 00 movb $0x0,0xb80(%rax)
p = buf;
while((q = strchr(p, '\n')) != 0){
1b9: be 0a 00 00 00 mov $0xa,%esi
1be: 4c 89 e7 mov %r12,%rdi
1c1: e8 e3 00 00 00 callq 2a9 <strchr>
1c6: 48 85 c0 test %rax,%rax
1c9: 49 89 c5 mov %rax,%r13
1cc: 74 35 je 203 <grep+0x97>
*q = 0;
1ce: 41 c6 45 00 00 movb $0x0,0x0(%r13)
if(match(pattern, p)){
1d3: 4c 89 e6 mov %r12,%rsi
1d6: 4c 89 ff mov %r15,%rdi
1d9: e8 50 ff ff ff callq 12e <match>
1de: 85 c0 test %eax,%eax
1e0: 4d 8d 75 01 lea 0x1(%r13),%r14
1e4: 74 18 je 1fe <grep+0x92>
*q = '\n';
write(1, p, q+1 - p);
1e6: 4c 89 f2 mov %r14,%rdx
buf[m] = '\0';
p = buf;
while((q = strchr(p, '\n')) != 0){
*q = 0;
if(match(pattern, p)){
*q = '\n';
1e9: 41 c6 45 00 0a movb $0xa,0x0(%r13)
write(1, p, q+1 - p);
1ee: 4c 89 e6 mov %r12,%rsi
1f1: 4c 29 e2 sub %r12,%rdx
1f4: bf 01 00 00 00 mov $0x1,%edi
1f9: e8 cf 01 00 00 callq 3cd <write>
}
p = q+1;
1fe: 4d 89 f4 mov %r14,%r12
201: eb b6 jmp 1b9 <grep+0x4d>
}
if(p == buf)
203: 49 81 fc 80 0b 00 00 cmp $0xb80,%r12
20a: 0f 84 73 ff ff ff je 183 <grep+0x17>
m = 0;
if(m > 0){
210: 85 db test %ebx,%ebx
212: 0f 8e 6d ff ff ff jle 185 <grep+0x19>
m -= p - buf;
218: 4c 89 e0 mov %r12,%rax
memmove(buf, p, m);
21b: 4c 89 e6 mov %r12,%rsi
21e: 48 c7 c7 80 0b 00 00 mov $0xb80,%rdi
p = q+1;
}
if(p == buf)
m = 0;
if(m > 0){
m -= p - buf;
225: 48 2d 80 0b 00 00 sub $0xb80,%rax
22b: 29 c3 sub %eax,%ebx
memmove(buf, p, m);
22d: 89 da mov %ebx,%edx
22f: e8 51 01 00 00 callq 385 <memmove>
234: e9 4c ff ff ff jmpq 185 <grep+0x19>
}
}
}
239: 48 83 c4 18 add $0x18,%rsp
23d: 5b pop %rbx
23e: 41 5c pop %r12
240: 41 5d pop %r13
242: 41 5e pop %r14
244: 41 5f pop %r15
246: 5d pop %rbp
247: c3 retq
0000000000000248 <strcpy>:
#include "user.h"
#include "x86.h"
char*
strcpy(char *s, const char *t)
{
248: 55 push %rbp
249: 48 89 f8 mov %rdi,%rax
char *os;
os = s;
while((*s++ = *t++) != 0)
24c: 31 d2 xor %edx,%edx
#include "user.h"
#include "x86.h"
char*
strcpy(char *s, const char *t)
{
24e: 48 89 e5 mov %rsp,%rbp
char *os;
os = s;
while((*s++ = *t++) != 0)
251: 8a 0c 16 mov (%rsi,%rdx,1),%cl
254: 88 0c 10 mov %cl,(%rax,%rdx,1)
257: 48 ff c2 inc %rdx
25a: 84 c9 test %cl,%cl
25c: 75 f3 jne 251 <strcpy+0x9>
;
return os;
}
25e: 5d pop %rbp
25f: c3 retq
0000000000000260 <strcmp>:
int
strcmp(const char *p, const char *q)
{
260: 55 push %rbp
261: 48 89 e5 mov %rsp,%rbp
while(*p && *p == *q)
264: 0f b6 07 movzbl (%rdi),%eax
267: 84 c0 test %al,%al
269: 74 0c je 277 <strcmp+0x17>
26b: 3a 06 cmp (%rsi),%al
26d: 75 08 jne 277 <strcmp+0x17>
p++, q++;
26f: 48 ff c7 inc %rdi
272: 48 ff c6 inc %rsi
275: eb ed jmp 264 <strcmp+0x4>
return (uchar)*p - (uchar)*q;
277: 0f b6 16 movzbl (%rsi),%edx
}
27a: 5d pop %rbp
int
strcmp(const char *p, const char *q)
{
while(*p && *p == *q)
p++, q++;
return (uchar)*p - (uchar)*q;
27b: 29 d0 sub %edx,%eax
}
27d: c3 retq
000000000000027e <strlen>:
uint
strlen(const char *s)
{
27e: 55 push %rbp
int n;
for(n = 0; s[n]; n++)
27f: 31 c0 xor %eax,%eax
return (uchar)*p - (uchar)*q;
}
uint
strlen(const char *s)
{
281: 48 89 e5 mov %rsp,%rbp
284: 48 8d 50 01 lea 0x1(%rax),%rdx
int n;
for(n = 0; s[n]; n++)
288: 80 7c 17 ff 00 cmpb $0x0,-0x1(%rdi,%rdx,1)
28d: 74 05 je 294 <strlen+0x16>
28f: 48 89 d0 mov %rdx,%rax
292: eb f0 jmp 284 <strlen+0x6>
;
return n;
}
294: 5d pop %rbp
295: c3 retq
0000000000000296 <memset>:
void*
memset(void *dst, int c, uint n)
{
296: 55 push %rbp
297: 49 89 f8 mov %rdi,%r8
}
static inline void
stosb(void *addr, int data, int cnt)
{
asm volatile("cld; rep stosb" :
29a: 89 d1 mov %edx,%ecx
29c: 89 f0 mov %esi,%eax
29e: 48 89 e5 mov %rsp,%rbp
2a1: fc cld
2a2: f3 aa rep stos %al,%es:(%rdi)
stosb(dst, c, n);
return dst;
}
2a4: 4c 89 c0 mov %r8,%rax
2a7: 5d pop %rbp
2a8: c3 retq
00000000000002a9 <strchr>:
char*
strchr(const char *s, char c)
{
2a9: 55 push %rbp
2aa: 48 89 e5 mov %rsp,%rbp
for(; *s; s++)
2ad: 8a 07 mov (%rdi),%al
2af: 84 c0 test %al,%al
2b1: 74 0a je 2bd <strchr+0x14>
if(*s == c)
2b3: 40 38 f0 cmp %sil,%al
2b6: 74 09 je 2c1 <strchr+0x18>
}
char*
strchr(const char *s, char c)
{
for(; *s; s++)
2b8: 48 ff c7 inc %rdi
2bb: eb f0 jmp 2ad <strchr+0x4>
if(*s == c)
return (char*)s;
return 0;
2bd: 31 c0 xor %eax,%eax
2bf: eb 03 jmp 2c4 <strchr+0x1b>
2c1: 48 89 f8 mov %rdi,%rax
}
2c4: 5d pop %rbp
2c5: c3 retq
00000000000002c6 <gets>:
char*
gets(char *buf, int max)
{
2c6: 55 push %rbp
2c7: 48 89 e5 mov %rsp,%rbp
2ca: 41 57 push %r15
2cc: 41 56 push %r14
2ce: 41 55 push %r13
2d0: 41 54 push %r12
2d2: 41 89 f7 mov %esi,%r15d
2d5: 53 push %rbx
2d6: 49 89 fc mov %rdi,%r12
2d9: 49 89 fe mov %rdi,%r14
int i, cc;
char c;
for(i=0; i+1 < max; ){
2dc: 31 db xor %ebx,%ebx
return 0;
}
char*
gets(char *buf, int max)
{
2de: 48 83 ec 18 sub $0x18,%rsp
int i, cc;
char c;
for(i=0; i+1 < max; ){
2e2: 44 8d 6b 01 lea 0x1(%rbx),%r13d
2e6: 45 39 fd cmp %r15d,%r13d
2e9: 7d 2c jge 317 <gets+0x51>
cc = read(0, &c, 1);
2eb: 48 8d 75 cf lea -0x31(%rbp),%rsi
2ef: 31 ff xor %edi,%edi
2f1: ba 01 00 00 00 mov $0x1,%edx
2f6: e8 ca 00 00 00 callq 3c5 <read>
if(cc < 1)
2fb: 85 c0 test %eax,%eax
2fd: 7e 18 jle 317 <gets+0x51>
break;
buf[i++] = c;
2ff: 8a 45 cf mov -0x31(%rbp),%al
302: 49 ff c6 inc %r14
305: 49 63 dd movslq %r13d,%rbx
308: 41 88 46 ff mov %al,-0x1(%r14)
if(c == '\n' || c == '\r')
30c: 3c 0a cmp $0xa,%al
30e: 74 04 je 314 <gets+0x4e>
310: 3c 0d cmp $0xd,%al
312: 75 ce jne 2e2 <gets+0x1c>
gets(char *buf, int max)
{
int i, cc;
char c;
for(i=0; i+1 < max; ){
314: 49 63 dd movslq %r13d,%rbx
break;
buf[i++] = c;
if(c == '\n' || c == '\r')
break;
}
buf[i] = '\0';
317: 41 c6 04 1c 00 movb $0x0,(%r12,%rbx,1)
return buf;
}
31c: 48 83 c4 18 add $0x18,%rsp
320: 4c 89 e0 mov %r12,%rax
323: 5b pop %rbx
324: 41 5c pop %r12
326: 41 5d pop %r13
328: 41 5e pop %r14
32a: 41 5f pop %r15
32c: 5d pop %rbp
32d: c3 retq
000000000000032e <stat>:
int
stat(const char *n, struct stat *st)
{
32e: 55 push %rbp
32f: 48 89 e5 mov %rsp,%rbp
332: 41 54 push %r12
334: 53 push %rbx
335: 48 89 f3 mov %rsi,%rbx
int fd;
int r;
fd = open(n, O_RDONLY);
338: 31 f6 xor %esi,%esi
33a: e8 ae 00 00 00 callq 3ed <open>
33f: 41 89 c4 mov %eax,%r12d
342: 83 c8 ff or $0xffffffff,%eax
if(fd < 0)
345: 45 85 e4 test %r12d,%r12d
348: 78 17 js 361 <stat+0x33>
return -1;
r = fstat(fd, st);
34a: 48 89 de mov %rbx,%rsi
34d: 44 89 e7 mov %r12d,%edi
350: e8 b0 00 00 00 callq 405 <fstat>
close(fd);
355: 44 89 e7 mov %r12d,%edi
int r;
fd = open(n, O_RDONLY);
if(fd < 0)
return -1;
r = fstat(fd, st);
358: 89 c3 mov %eax,%ebx
close(fd);
35a: e8 76 00 00 00 callq 3d5 <close>
return r;
35f: 89 d8 mov %ebx,%eax
}
361: 5b pop %rbx
362: 41 5c pop %r12
364: 5d pop %rbp
365: c3 retq
0000000000000366 <atoi>:
int
atoi(const char *s)
{
366: 55 push %rbp
int n;
n = 0;
367: 31 c0 xor %eax,%eax
return r;
}
int
atoi(const char *s)
{
369: 48 89 e5 mov %rsp,%rbp
int n;
n = 0;
while('0' <= *s && *s <= '9')
36c: 0f be 17 movsbl (%rdi),%edx
36f: 8d 4a d0 lea -0x30(%rdx),%ecx
372: 80 f9 09 cmp $0x9,%cl
375: 77 0c ja 383 <atoi+0x1d>
n = n*10 + *s++ - '0';
377: 6b c0 0a imul $0xa,%eax,%eax
37a: 48 ff c7 inc %rdi
37d: 8d 44 10 d0 lea -0x30(%rax,%rdx,1),%eax
381: eb e9 jmp 36c <atoi+0x6>
return n;
}
383: 5d pop %rbp
384: c3 retq
0000000000000385 <memmove>:
void*
memmove(void *vdst, const void *vsrc, int n)
{
385: 55 push %rbp
386: 48 89 f8 mov %rdi,%rax
char *dst;
const char *src;
dst = vdst;
src = vsrc;
while(n-- > 0)
389: 31 c9 xor %ecx,%ecx
return n;
}
void*
memmove(void *vdst, const void *vsrc, int n)
{
38b: 48 89 e5 mov %rsp,%rbp
38e: 89 d7 mov %edx,%edi
390: 29 cf sub %ecx,%edi
char *dst;
const char *src;
dst = vdst;
src = vsrc;
while(n-- > 0)
392: 85 ff test %edi,%edi
394: 7e 0d jle 3a3 <memmove+0x1e>
*dst++ = *src++;
396: 40 8a 3c 0e mov (%rsi,%rcx,1),%dil
39a: 40 88 3c 08 mov %dil,(%rax,%rcx,1)
39e: 48 ff c1 inc %rcx
3a1: eb eb jmp 38e <memmove+0x9>
return vdst;
}
3a3: 5d pop %rbp
3a4: c3 retq
00000000000003a5 <fork>:
name: \
movl $SYS_ ## name, %eax; \
int $T_SYSCALL; \
ret
SYSCALL(fork)
3a5: b8 01 00 00 00 mov $0x1,%eax
3aa: cd 40 int $0x40
3ac: c3 retq
00000000000003ad <exit>:
SYSCALL(exit)
3ad: b8 02 00 00 00 mov $0x2,%eax
3b2: cd 40 int $0x40
3b4: c3 retq
00000000000003b5 <wait>:
SYSCALL(wait)
3b5: b8 03 00 00 00 mov $0x3,%eax
3ba: cd 40 int $0x40
3bc: c3 retq
00000000000003bd <pipe>:
SYSCALL(pipe)
3bd: b8 04 00 00 00 mov $0x4,%eax
3c2: cd 40 int $0x40
3c4: c3 retq
00000000000003c5 <read>:
SYSCALL(read)
3c5: b8 05 00 00 00 mov $0x5,%eax
3ca: cd 40 int $0x40
3cc: c3 retq
00000000000003cd <write>:
SYSCALL(write)
3cd: b8 10 00 00 00 mov $0x10,%eax
3d2: cd 40 int $0x40
3d4: c3 retq
00000000000003d5 <close>:
SYSCALL(close)
3d5: b8 15 00 00 00 mov $0x15,%eax
3da: cd 40 int $0x40
3dc: c3 retq
00000000000003dd <kill>:
SYSCALL(kill)
3dd: b8 06 00 00 00 mov $0x6,%eax
3e2: cd 40 int $0x40
3e4: c3 retq
00000000000003e5 <exec>:
SYSCALL(exec)
3e5: b8 07 00 00 00 mov $0x7,%eax
3ea: cd 40 int $0x40
3ec: c3 retq
00000000000003ed <open>:
SYSCALL(open)
3ed: b8 0f 00 00 00 mov $0xf,%eax
3f2: cd 40 int $0x40
3f4: c3 retq
00000000000003f5 <mknod>:
SYSCALL(mknod)
3f5: b8 11 00 00 00 mov $0x11,%eax
3fa: cd 40 int $0x40
3fc: c3 retq
00000000000003fd <unlink>:
SYSCALL(unlink)
3fd: b8 12 00 00 00 mov $0x12,%eax
402: cd 40 int $0x40
404: c3 retq
0000000000000405 <fstat>:
SYSCALL(fstat)
405: b8 08 00 00 00 mov $0x8,%eax
40a: cd 40 int $0x40
40c: c3 retq
000000000000040d <link>:
SYSCALL(link)
40d: b8 13 00 00 00 mov $0x13,%eax
412: cd 40 int $0x40
414: c3 retq
0000000000000415 <mkdir>:
SYSCALL(mkdir)
415: b8 14 00 00 00 mov $0x14,%eax
41a: cd 40 int $0x40
41c: c3 retq
000000000000041d <chdir>:
SYSCALL(chdir)
41d: b8 09 00 00 00 mov $0x9,%eax
422: cd 40 int $0x40
424: c3 retq
0000000000000425 <dup>:
SYSCALL(dup)
425: b8 0a 00 00 00 mov $0xa,%eax
42a: cd 40 int $0x40
42c: c3 retq
000000000000042d <getpid>:
SYSCALL(getpid)
42d: b8 0b 00 00 00 mov $0xb,%eax
432: cd 40 int $0x40
434: c3 retq
0000000000000435 <sbrk>:
SYSCALL(sbrk)
435: b8 0c 00 00 00 mov $0xc,%eax
43a: cd 40 int $0x40
43c: c3 retq
000000000000043d <sleep>:
SYSCALL(sleep)
43d: b8 0d 00 00 00 mov $0xd,%eax
442: cd 40 int $0x40
444: c3 retq
0000000000000445 <uptime>:
SYSCALL(uptime)
445: b8 0e 00 00 00 mov $0xe,%eax
44a: cd 40 int $0x40
44c: c3 retq
000000000000044d <chmod>:
SYSCALL(chmod)
44d: b8 16 00 00 00 mov $0x16,%eax
452: cd 40 int $0x40
454: c3 retq
0000000000000455 <printint>:
write(fd, &c, 1);
}
static void
printint(int fd, int xx, int base, int sgn)
{
455: 55 push %rbp
456: 41 89 d0 mov %edx,%r8d
459: 48 89 e5 mov %rsp,%rbp
45c: 41 54 push %r12
45e: 53 push %rbx
45f: 41 89 fc mov %edi,%r12d
462: 48 83 ec 20 sub $0x20,%rsp
char buf[16];
int i, neg;
uint x;
neg = 0;
if(sgn && xx < 0){
466: 85 c9 test %ecx,%ecx
468: 74 12 je 47c <printint+0x27>
46a: 89 f0 mov %esi,%eax
46c: c1 e8 1f shr $0x1f,%eax
46f: 74 0b je 47c <printint+0x27>
neg = 1;
x = -xx;
471: 89 f0 mov %esi,%eax
int i, neg;
uint x;
neg = 0;
if(sgn && xx < 0){
neg = 1;
473: be 01 00 00 00 mov $0x1,%esi
x = -xx;
478: f7 d8 neg %eax
47a: eb 04 jmp 480 <printint+0x2b>
} else {
x = xx;
47c: 89 f0 mov %esi,%eax
static char digits[] = "0123456789ABCDEF";
char buf[16];
int i, neg;
uint x;
neg = 0;
47e: 31 f6 xor %esi,%esi
480: 48 8d 7d e0 lea -0x20(%rbp),%rdi
x = -xx;
} else {
x = xx;
}
i = 0;
484: 31 c9 xor %ecx,%ecx
do{
buf[i++] = digits[x % base];
486: 31 d2 xor %edx,%edx
488: 48 ff c7 inc %rdi
48b: 8d 59 01 lea 0x1(%rcx),%ebx
48e: 41 f7 f0 div %r8d
491: 89 d2 mov %edx,%edx
493: 8a 92 60 08 00 00 mov 0x860(%rdx),%dl
499: 88 57 ff mov %dl,-0x1(%rdi)
}while((x /= base) != 0);
49c: 85 c0 test %eax,%eax
49e: 74 04 je 4a4 <printint+0x4f>
x = xx;
}
i = 0;
do{
buf[i++] = digits[x % base];
4a0: 89 d9 mov %ebx,%ecx
4a2: eb e2 jmp 486 <printint+0x31>
}while((x /= base) != 0);
if(neg)
4a4: 85 f6 test %esi,%esi
4a6: 74 0b je 4b3 <printint+0x5e>
buf[i++] = '-';
4a8: 48 63 db movslq %ebx,%rbx
4ab: c6 44 1d e0 2d movb $0x2d,-0x20(%rbp,%rbx,1)
4b0: 8d 59 02 lea 0x2(%rcx),%ebx
while(--i >= 0)
4b3: ff cb dec %ebx
4b5: 83 fb ff cmp $0xffffffff,%ebx
4b8: 74 1d je 4d7 <printint+0x82>
putc(fd, buf[i]);
4ba: 48 63 c3 movslq %ebx,%rax
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
4bd: 48 8d 75 df lea -0x21(%rbp),%rsi
4c1: ba 01 00 00 00 mov $0x1,%edx
4c6: 8a 44 05 e0 mov -0x20(%rbp,%rax,1),%al
4ca: 44 89 e7 mov %r12d,%edi
4cd: 88 45 df mov %al,-0x21(%rbp)
4d0: e8 f8 fe ff ff callq 3cd <write>
4d5: eb dc jmp 4b3 <printint+0x5e>
if(neg)
buf[i++] = '-';
while(--i >= 0)
putc(fd, buf[i]);
}
4d7: 48 83 c4 20 add $0x20,%rsp
4db: 5b pop %rbx
4dc: 41 5c pop %r12
4de: 5d pop %rbp
4df: c3 retq
00000000000004e0 <printf>:
// Print to the given fd. Only understands %d, %x, %p, %s.
void
printf(int fd, char *fmt, ...)
{
4e0: 55 push %rbp
4e1: 48 89 e5 mov %rsp,%rbp
4e4: 41 56 push %r14
4e6: 41 55 push %r13
va_list ap;
char *s;
int c, i, state;
va_start(ap, fmt);
4e8: 48 8d 45 10 lea 0x10(%rbp),%rax
}
// Print to the given fd. Only understands %d, %x, %p, %s.
void
printf(int fd, char *fmt, ...)
{
4ec: 41 54 push %r12
4ee: 53 push %rbx
4ef: 41 89 fc mov %edi,%r12d
4f2: 49 89 f6 mov %rsi,%r14
va_list ap;
char *s;
int c, i, state;
va_start(ap, fmt);
state = 0;
4f5: 31 db xor %ebx,%ebx
}
// Print to the given fd. Only understands %d, %x, %p, %s.
void
printf(int fd, char *fmt, ...)
{
4f7: 48 83 ec 50 sub $0x50,%rsp
va_list ap;
char *s;
int c, i, state;
va_start(ap, fmt);
4fb: 48 89 45 a0 mov %rax,-0x60(%rbp)
4ff: 48 8d 45 b0 lea -0x50(%rbp),%rax
}
// Print to the given fd. Only understands %d, %x, %p, %s.
void
printf(int fd, char *fmt, ...)
{
503: 48 89 55 c0 mov %rdx,-0x40(%rbp)
507: 48 89 4d c8 mov %rcx,-0x38(%rbp)
50b: 4c 89 45 d0 mov %r8,-0x30(%rbp)
50f: 4c 89 4d d8 mov %r9,-0x28(%rbp)
va_list ap;
char *s;
int c, i, state;
va_start(ap, fmt);
513: c7 45 98 10 00 00 00 movl $0x10,-0x68(%rbp)
51a: 48 89 45 a8 mov %rax,-0x58(%rbp)
state = 0;
for(i = 0; fmt[i]; i++){
51e: 45 8a 2e mov (%r14),%r13b
521: 45 84 ed test %r13b,%r13b
524: 0f 84 8f 01 00 00 je 6b9 <printf+0x1d9>
c = fmt[i] & 0xff;
if(state == 0){
52a: 85 db test %ebx,%ebx
int c, i, state;
va_start(ap, fmt);
state = 0;
for(i = 0; fmt[i]; i++){
c = fmt[i] & 0xff;
52c: 41 0f be d5 movsbl %r13b,%edx
530: 41 0f b6 c5 movzbl %r13b,%eax
if(state == 0){
534: 75 23 jne 559 <printf+0x79>
if(c == '%'){
536: 83 f8 25 cmp $0x25,%eax
539: 0f 84 6d 01 00 00 je 6ac <printf+0x1cc>
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
53f: 48 8d 75 92 lea -0x6e(%rbp),%rsi
543: ba 01 00 00 00 mov $0x1,%edx
548: 44 89 e7 mov %r12d,%edi
54b: 44 88 6d 92 mov %r13b,-0x6e(%rbp)
54f: e8 79 fe ff ff callq 3cd <write>
554: e9 58 01 00 00 jmpq 6b1 <printf+0x1d1>
if(c == '%'){
state = '%';
} else {
putc(fd, c);
}
} else if(state == '%'){
559: 83 fb 25 cmp $0x25,%ebx
55c: 0f 85 4f 01 00 00 jne 6b1 <printf+0x1d1>
if(c == 'd'){
562: 83 f8 64 cmp $0x64,%eax
565: 75 2e jne 595 <printf+0xb5>
printint(fd, va_arg(ap, int), 10, 1);
567: 8b 55 98 mov -0x68(%rbp),%edx
56a: 83 fa 2f cmp $0x2f,%edx
56d: 77 0e ja 57d <printf+0x9d>
56f: 89 d0 mov %edx,%eax
571: 83 c2 08 add $0x8,%edx
574: 48 03 45 a8 add -0x58(%rbp),%rax
578: 89 55 98 mov %edx,-0x68(%rbp)
57b: eb 0c jmp 589 <printf+0xa9>
57d: 48 8b 45 a0 mov -0x60(%rbp),%rax
581: 48 8d 50 08 lea 0x8(%rax),%rdx
585: 48 89 55 a0 mov %rdx,-0x60(%rbp)
589: b9 01 00 00 00 mov $0x1,%ecx
58e: ba 0a 00 00 00 mov $0xa,%edx
593: eb 34 jmp 5c9 <printf+0xe9>
} else if(c == 'x' || c == 'p'){
595: 81 e2 f7 00 00 00 and $0xf7,%edx
59b: 83 fa 70 cmp $0x70,%edx
59e: 75 38 jne 5d8 <printf+0xf8>
printint(fd, va_arg(ap, int), 16, 0);
5a0: 8b 55 98 mov -0x68(%rbp),%edx
5a3: 83 fa 2f cmp $0x2f,%edx
5a6: 77 0e ja 5b6 <printf+0xd6>
5a8: 89 d0 mov %edx,%eax
5aa: 83 c2 08 add $0x8,%edx
5ad: 48 03 45 a8 add -0x58(%rbp),%rax
5b1: 89 55 98 mov %edx,-0x68(%rbp)
5b4: eb 0c jmp 5c2 <printf+0xe2>
5b6: 48 8b 45 a0 mov -0x60(%rbp),%rax
5ba: 48 8d 50 08 lea 0x8(%rax),%rdx
5be: 48 89 55 a0 mov %rdx,-0x60(%rbp)
5c2: 31 c9 xor %ecx,%ecx
5c4: ba 10 00 00 00 mov $0x10,%edx
5c9: 8b 30 mov (%rax),%esi
5cb: 44 89 e7 mov %r12d,%edi
5ce: e8 82 fe ff ff callq 455 <printint>
5d3: e9 d0 00 00 00 jmpq 6a8 <printf+0x1c8>
} else if(c == 's'){
5d8: 83 f8 73 cmp $0x73,%eax
5db: 75 56 jne 633 <printf+0x153>
s = va_arg(ap, char*);
5dd: 8b 55 98 mov -0x68(%rbp),%edx
5e0: 83 fa 2f cmp $0x2f,%edx
5e3: 77 0e ja 5f3 <printf+0x113>
5e5: 89 d0 mov %edx,%eax
5e7: 83 c2 08 add $0x8,%edx
5ea: 48 03 45 a8 add -0x58(%rbp),%rax
5ee: 89 55 98 mov %edx,-0x68(%rbp)
5f1: eb 0c jmp 5ff <printf+0x11f>
5f3: 48 8b 45 a0 mov -0x60(%rbp),%rax
5f7: 48 8d 50 08 lea 0x8(%rax),%rdx
5fb: 48 89 55 a0 mov %rdx,-0x60(%rbp)
5ff: 48 8b 18 mov (%rax),%rbx
if(s == 0)
s = "(null)";
602: 48 c7 c0 56 08 00 00 mov $0x856,%rax
609: 48 85 db test %rbx,%rbx
60c: 48 0f 44 d8 cmove %rax,%rbx
while(*s != 0){
610: 8a 03 mov (%rbx),%al
612: 84 c0 test %al,%al
614: 0f 84 8e 00 00 00 je 6a8 <printf+0x1c8>
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
61a: 48 8d 75 93 lea -0x6d(%rbp),%rsi
61e: ba 01 00 00 00 mov $0x1,%edx
623: 44 89 e7 mov %r12d,%edi
626: 88 45 93 mov %al,-0x6d(%rbp)
s = va_arg(ap, char*);
if(s == 0)
s = "(null)";
while(*s != 0){
putc(fd, *s);
s++;
629: 48 ff c3 inc %rbx
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
62c: e8 9c fd ff ff callq 3cd <write>
631: eb dd jmp 610 <printf+0x130>
s = "(null)";
while(*s != 0){
putc(fd, *s);
s++;
}
} else if(c == 'c'){
633: 83 f8 63 cmp $0x63,%eax
636: 75 32 jne 66a <printf+0x18a>
putc(fd, va_arg(ap, uint));
638: 8b 55 98 mov -0x68(%rbp),%edx
63b: 83 fa 2f cmp $0x2f,%edx
63e: 77 0e ja 64e <printf+0x16e>
640: 89 d0 mov %edx,%eax
642: 83 c2 08 add $0x8,%edx
645: 48 03 45 a8 add -0x58(%rbp),%rax
649: 89 55 98 mov %edx,-0x68(%rbp)
64c: eb 0c jmp 65a <printf+0x17a>
64e: 48 8b 45 a0 mov -0x60(%rbp),%rax
652: 48 8d 50 08 lea 0x8(%rax),%rdx
656: 48 89 55 a0 mov %rdx,-0x60(%rbp)
65a: 8b 00 mov (%rax),%eax
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
65c: ba 01 00 00 00 mov $0x1,%edx
661: 48 8d 75 94 lea -0x6c(%rbp),%rsi
665: 88 45 94 mov %al,-0x6c(%rbp)
668: eb 36 jmp 6a0 <printf+0x1c0>
putc(fd, *s);
s++;
}
} else if(c == 'c'){
putc(fd, va_arg(ap, uint));
} else if(c == '%'){
66a: 83 f8 25 cmp $0x25,%eax
66d: 75 0f jne 67e <printf+0x19e>
66f: 44 88 6d 95 mov %r13b,-0x6b(%rbp)
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
673: ba 01 00 00 00 mov $0x1,%edx
678: 48 8d 75 95 lea -0x6b(%rbp),%rsi
67c: eb 22 jmp 6a0 <printf+0x1c0>
67e: 48 8d 75 97 lea -0x69(%rbp),%rsi
682: ba 01 00 00 00 mov $0x1,%edx
687: 44 89 e7 mov %r12d,%edi
68a: c6 45 97 25 movb $0x25,-0x69(%rbp)
68e: e8 3a fd ff ff callq 3cd <write>
693: 48 8d 75 96 lea -0x6a(%rbp),%rsi
697: 44 88 6d 96 mov %r13b,-0x6a(%rbp)
69b: ba 01 00 00 00 mov $0x1,%edx
6a0: 44 89 e7 mov %r12d,%edi
6a3: e8 25 fd ff ff callq 3cd <write>
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
putc(fd, c);
}
state = 0;
6a8: 31 db xor %ebx,%ebx
6aa: eb 05 jmp 6b1 <printf+0x1d1>
state = 0;
for(i = 0; fmt[i]; i++){
c = fmt[i] & 0xff;
if(state == 0){
if(c == '%'){
state = '%';
6ac: bb 25 00 00 00 mov $0x25,%ebx
6b1: 49 ff c6 inc %r14
6b4: e9 65 fe ff ff jmpq 51e <printf+0x3e>
putc(fd, c);
}
state = 0;
}
}
}
6b9: 48 83 c4 50 add $0x50,%rsp
6bd: 5b pop %rbx
6be: 41 5c pop %r12
6c0: 41 5d pop %r13
6c2: 41 5e pop %r14
6c4: 5d pop %rbp
6c5: c3 retq
00000000000006c6 <free>:
static Header base;
static Header *freep;
void
free(void *ap)
{
6c6: 55 push %rbp
Header *bp, *p;
bp = (Header*)ap - 1;
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
6c7: 48 8b 05 b2 08 00 00 mov 0x8b2(%rip),%rax # f80 <freep>
void
free(void *ap)
{
Header *bp, *p;
bp = (Header*)ap - 1;
6ce: 48 8d 57 f0 lea -0x10(%rdi),%rdx
static Header base;
static Header *freep;
void
free(void *ap)
{
6d2: 48 89 e5 mov %rsp,%rbp
Header *bp, *p;
bp = (Header*)ap - 1;
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
6d5: 48 39 d0 cmp %rdx,%rax
6d8: 48 8b 08 mov (%rax),%rcx
6db: 72 14 jb 6f1 <free+0x2b>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
6dd: 48 39 c8 cmp %rcx,%rax
6e0: 72 0a jb 6ec <free+0x26>
6e2: 48 39 ca cmp %rcx,%rdx
6e5: 72 0f jb 6f6 <free+0x30>
6e7: 48 39 d0 cmp %rdx,%rax
6ea: 72 0a jb 6f6 <free+0x30>
static Header base;
static Header *freep;
void
free(void *ap)
{
6ec: 48 89 c8 mov %rcx,%rax
6ef: eb e4 jmp 6d5 <free+0xf>
Header *bp, *p;
bp = (Header*)ap - 1;
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
6f1: 48 39 ca cmp %rcx,%rdx
6f4: 73 e7 jae 6dd <free+0x17>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
break;
if(bp + bp->s.size == p->s.ptr){
6f6: 8b 77 f8 mov -0x8(%rdi),%esi
6f9: 49 89 f0 mov %rsi,%r8
6fc: 48 c1 e6 04 shl $0x4,%rsi
700: 48 01 d6 add %rdx,%rsi
703: 48 39 ce cmp %rcx,%rsi
706: 75 0e jne 716 <free+0x50>
bp->s.size += p->s.ptr->s.size;
708: 44 03 41 08 add 0x8(%rcx),%r8d
70c: 44 89 47 f8 mov %r8d,-0x8(%rdi)
bp->s.ptr = p->s.ptr->s.ptr;
710: 48 8b 08 mov (%rax),%rcx
713: 48 8b 09 mov (%rcx),%rcx
} else
bp->s.ptr = p->s.ptr;
716: 48 89 4f f0 mov %rcx,-0x10(%rdi)
if(p + p->s.size == bp){
71a: 8b 48 08 mov 0x8(%rax),%ecx
71d: 48 89 ce mov %rcx,%rsi
720: 48 c1 e1 04 shl $0x4,%rcx
724: 48 01 c1 add %rax,%rcx
727: 48 39 ca cmp %rcx,%rdx
72a: 75 0a jne 736 <free+0x70>
p->s.size += bp->s.size;
72c: 03 77 f8 add -0x8(%rdi),%esi
72f: 89 70 08 mov %esi,0x8(%rax)
p->s.ptr = bp->s.ptr;
732: 48 8b 57 f0 mov -0x10(%rdi),%rdx
} else
p->s.ptr = bp;
736: 48 89 10 mov %rdx,(%rax)
freep = p;
739: 48 89 05 40 08 00 00 mov %rax,0x840(%rip) # f80 <freep>
}
740: 5d pop %rbp
741: c3 retq
0000000000000742 <malloc>:
return freep;
}
void*
malloc(uint nbytes)
{
742: 55 push %rbp
743: 48 89 e5 mov %rsp,%rbp
746: 41 55 push %r13
748: 41 54 push %r12
74a: 53 push %rbx
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
74b: 89 fb mov %edi,%ebx
return freep;
}
void*
malloc(uint nbytes)
{
74d: 51 push %rcx
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
if((prevp = freep) == 0){
74e: 48 8b 0d 2b 08 00 00 mov 0x82b(%rip),%rcx # f80 <freep>
malloc(uint nbytes)
{
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
755: 48 83 c3 0f add $0xf,%rbx
759: 48 c1 eb 04 shr $0x4,%rbx
75d: ff c3 inc %ebx
if((prevp = freep) == 0){
75f: 48 85 c9 test %rcx,%rcx
762: 75 27 jne 78b <malloc+0x49>
base.s.ptr = freep = prevp = &base;
764: 48 c7 05 11 08 00 00 movq $0xf90,0x811(%rip) # f80 <freep>
76b: 90 0f 00 00
76f: 48 c7 05 16 08 00 00 movq $0xf90,0x816(%rip) # f90 <base>
776: 90 0f 00 00
77a: 48 c7 c1 90 0f 00 00 mov $0xf90,%rcx
base.s.size = 0;
781: c7 05 0d 08 00 00 00 movl $0x0,0x80d(%rip) # f98 <base+0x8>
788: 00 00 00
78b: 81 fb 00 10 00 00 cmp $0x1000,%ebx
791: 41 bc 00 10 00 00 mov $0x1000,%r12d
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
797: 48 8b 01 mov (%rcx),%rax
79a: 44 0f 43 e3 cmovae %ebx,%r12d
char *p;
Header *hp;
if(nu < 4096)
nu = 4096;
p = sbrk(nu * sizeof(Header));
79e: 45 89 e5 mov %r12d,%r13d
7a1: 41 c1 e5 04 shl $0x4,%r13d
if((prevp = freep) == 0){
base.s.ptr = freep = prevp = &base;
base.s.size = 0;
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
if(p->s.size >= nunits){
7a5: 8b 50 08 mov 0x8(%rax),%edx
7a8: 39 d3 cmp %edx,%ebx
7aa: 77 26 ja 7d2 <malloc+0x90>
if(p->s.size == nunits)
7ac: 75 08 jne 7b6 <malloc+0x74>
prevp->s.ptr = p->s.ptr;
7ae: 48 8b 10 mov (%rax),%rdx
7b1: 48 89 11 mov %rdx,(%rcx)
7b4: eb 0f jmp 7c5 <malloc+0x83>
else {
p->s.size -= nunits;
7b6: 29 da sub %ebx,%edx
7b8: 89 50 08 mov %edx,0x8(%rax)
p += p->s.size;
7bb: 48 c1 e2 04 shl $0x4,%rdx
7bf: 48 01 d0 add %rdx,%rax
p->s.size = nunits;
7c2: 89 58 08 mov %ebx,0x8(%rax)
}
freep = prevp;
7c5: 48 89 0d b4 07 00 00 mov %rcx,0x7b4(%rip) # f80 <freep>
return (void*)(p + 1);
7cc: 48 83 c0 10 add $0x10,%rax
7d0: eb 3a jmp 80c <malloc+0xca>
}
if(p == freep)
7d2: 48 3b 05 a7 07 00 00 cmp 0x7a7(%rip),%rax # f80 <freep>
7d9: 75 27 jne 802 <malloc+0xc0>
char *p;
Header *hp;
if(nu < 4096)
nu = 4096;
p = sbrk(nu * sizeof(Header));
7db: 44 89 ef mov %r13d,%edi
7de: e8 52 fc ff ff callq 435 <sbrk>
if(p == (char*)-1)
7e3: 48 83 f8 ff cmp $0xffffffffffffffff,%rax
7e7: 74 21 je 80a <malloc+0xc8>
return 0;
hp = (Header*)p;
hp->s.size = nu;
free((void*)(hp + 1));
7e9: 48 8d 78 10 lea 0x10(%rax),%rdi
nu = 4096;
p = sbrk(nu * sizeof(Header));
if(p == (char*)-1)
return 0;
hp = (Header*)p;
hp->s.size = nu;
7ed: 44 89 60 08 mov %r12d,0x8(%rax)
free((void*)(hp + 1));
7f1: e8 d0 fe ff ff callq 6c6 <free>
return freep;
7f6: 48 8b 05 83 07 00 00 mov 0x783(%rip),%rax # f80 <freep>
}
freep = prevp;
return (void*)(p + 1);
}
if(p == freep)
if((p = morecore(nunits)) == 0)
7fd: 48 85 c0 test %rax,%rax
800: 74 08 je 80a <malloc+0xc8>
return 0;
}
802: 48 89 c1 mov %rax,%rcx
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
if((prevp = freep) == 0){
base.s.ptr = freep = prevp = &base;
base.s.size = 0;
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
805: 48 8b 00 mov (%rax),%rax
return (void*)(p + 1);
}
if(p == freep)
if((p = morecore(nunits)) == 0)
return 0;
}
808: eb 9b jmp 7a5 <malloc+0x63>
freep = prevp;
return (void*)(p + 1);
}
if(p == freep)
if((p = morecore(nunits)) == 0)
return 0;
80a: 31 c0 xor %eax,%eax
}
}
80c: 5a pop %rdx
80d: 5b pop %rbx
80e: 41 5c pop %r12
810: 41 5d pop %r13
812: 5d pop %rbp
813: c3 retq
| 29.674185 | 75 | 0.437078 |
c59b6bfa7b12f893183adb5b41b405e0608d1b57 | 875 | asm | Assembly | Documentation/Code/add2.asm | geoffthorpe/ant-architecture | d85952e3050c352d5d715d9749171a335e6768f7 | [
"BSD-3-Clause"
] | null | null | null | Documentation/Code/add2.asm | geoffthorpe/ant-architecture | d85952e3050c352d5d715d9749171a335e6768f7 | [
"BSD-3-Clause"
] | null | null | null | Documentation/Code/add2.asm | geoffthorpe/ant-architecture | d85952e3050c352d5d715d9749171a335e6768f7 | [
"BSD-3-Clause"
] | 1 | 2020-07-15T04:09:05.000Z | 2020-07-15T04:09:05.000Z | # Barney Titmouse -- 11/02/96
# add2.asm-- A program that computes and prints the sum
# of two numbers specified at runtime by the user.
# Registers used:
# r2 - used to hold the result.
# r3 - used to hold the first number.
# r4 - used to hold the second number.
# r5 - used to hold the constant '\n'.
# Get first number from user, put into r3.
sys r3, 5 # read a number into r3
# Get second number from user, put into r4.
sys r4, 5 # read a number into r4
add r2, r3, r4 # compute the sum.
# Print out r2.
sys r2, 2 # print contents of r2.
# Print out a newline
lc r5, '\n' # load a newline character into r5
sys r5, 3 # print contents of r5
sys r0, 0 # Halt
# end of add2.asm.
| 31.25 | 56 | 0.536 |
ac858d3710d2c699a4f867976ea8a79da35b3fc6 | 3,521 | asm | Assembly | Octavo/Assembler/benchmarks/hailstone-arrays/hailstone-arrays.asm | laforest/Octavo | e3041ad98c58eeff1f59e65b01da1eb458a0d591 | [
"BSD-2-Clause"
] | 63 | 2015-03-16T08:37:44.000Z | 2021-11-15T00:35:14.000Z | Octavo/Assembler/benchmarks/hailstone-arrays/hailstone-arrays.asm | laforest/Octavo | e3041ad98c58eeff1f59e65b01da1eb458a0d591 | [
"BSD-2-Clause"
] | 55 | 2015-01-11T02:05:57.000Z | 2019-03-20T00:12:32.000Z | Octavo/Assembler/benchmarks/hailstone-arrays/hailstone-arrays.asm | laforest/Octavo | e3041ad98c58eeff1f59e65b01da1eb458a0d591 | [
"BSD-2-Clause"
] | 13 | 2016-05-13T10:23:45.000Z | 2021-11-15T00:35:13.000Z |
# Assembly code for Hailstone benchmark and initial test
# If x is odd, x = (3x+1)/2, else x = x / 2
# Rough syntax: if the first word is not a recognized command, it's a label for
# the next word, which is a command, followed by its arguments.
# Common library of definitions
include ../common/opcodes.asm
include ../common/conditions.asm
# Shared variables across all threads
lsb_mask shared 0xFFFFFFFFE
# Counter values must be N-1 for N passes
seeds_len shared 2
# name I/O port memory and number
seed_out port A 0
# Common private variables (pointer is common, but init creates per-thread data)
threads 0 1 2 3 4 5 6 7
seed private 0
newseed private 0
# base_addr increment offset
seeds_rd pointer seeds 1 0
seeds_wr pointer seeds 1 0
# Private to each thread as separate data memory copies
threads 0
seeds private 41 47 54
threads 1
seeds private 55 62 71
threads 2
seeds private 73 82 83
threads 3
seeds private 91 94 95
threads 4
seeds private 97 103 107
threads 5
seeds private 108 109 110
threads 6
seeds private 121 124 125
threads 7
seeds private 126 129 137
# Code
# Runtime code is thread-agnostic, but the assembler needs to know
# which thread(s) code will run in to manage the correct list of opcodes
# when loading them.
threads 0 1 2 3 4 5 6 7
# These are baked into the Opcode Decoder memory
preload nop add
# These are loaded at runtime
start load sub
load psr
load add*2
load add/2
load add/2u
init even # Init branch
init output # Init branch
init next_seed # Init branch
hailstone init seeds_rd # Init read pointer to start of array
init seeds_wr # Init write pointer to start of array
init hailstone # Init loop counter branch to length of array
next_seed add seed seeds_rd 0 # Load x
# Odd case: y = (3x+1)/2
add*2 newseed seed 0 # y = (x+0)*2 (2x)
bsa not_taken 0 lsb_mask even # Branch and cancel add*2 if loaded x (seed) was an even number (LSB == 0)
add newseed seed newseed # y = (x+y) (3x)
add/2u newseed 1 newseed # y = (1+y)/2 (3x+1)/2
jmp taken output # Go output the number
# Even case: y = x/2
even add/2u newseed seed 0 # y = (x+0)/2 (x/2)
nop 0 0 0 # even out cycle count of even/odd cases (to keep thread output in order)
output add seeds_wr 0 newseed # x = 0+y
add seed_out 0 newseed # output port = 0+x
ctz unpredicted seeds_len hailstone # Start over if we've processed whole array
jmp unpredicted next_seed # else, process the next array element
# Set starting point (PC) for each thread
program_counter start start start start start start start start
| 37.860215 | 130 | 0.534791 |
72704f169b082b063a38fe9783231201665e2c21 | 103,222 | asm | Assembly | tmp1/c55x-sim2/foo/Debug/gpio_Output_Pin_Example.asm | jwestmoreland/eZdsp-DBG-sim | f6eacd75d4f928dec9c751545e9e919d052e4ade | [
"MIT"
] | 1 | 2020-08-27T11:31:13.000Z | 2020-08-27T11:31:13.000Z | tmp1/c55x-sim2/foo/Debug/gpio_Output_Pin_Example.asm | jwestmoreland/eZdsp-DBG-sim | f6eacd75d4f928dec9c751545e9e919d052e4ade | [
"MIT"
] | null | null | null | tmp1/c55x-sim2/foo/Debug/gpio_Output_Pin_Example.asm | jwestmoreland/eZdsp-DBG-sim | f6eacd75d4f928dec9c751545e9e919d052e4ade | [
"MIT"
] | null | null | null | ;*******************************************************************************
;* TMS320C55x C/C++ Codegen PC v4.4.1 *
;* Date/Time created: Sat Sep 29 23:09:39 2018 *
;*******************************************************************************
.compiler_opts --hll_source=on --mem_model:code=flat --mem_model:data=large --object_format=coff --silicon_core_3_3 --symdebug:dwarf
.mmregs
.cpl_on
.arms_on
.c54cm_off
.asg AR6, FP
.asg XAR6, XFP
.asg DPH, MDP
.model call=c55_std
.model mem=large
.noremark 5002 ; code respects overwrite rules
;*******************************************************************************
;* GLOBAL FILE PARAMETERS *
;* *
;* Architecture : TMS320C55x *
;* Optimizing for : Speed *
;* Memory : Large Model (23-Bit Data Pointers) *
;* Calls : Normal Library ASM calls *
;* Debug Info : Standard TI Debug Information *
;*******************************************************************************
$C$DW$CU .dwtag DW_TAG_compile_unit
.dwattr $C$DW$CU, DW_AT_name("../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c")
.dwattr $C$DW$CU, DW_AT_producer("TMS320C55x C/C++ Codegen PC v4.4.1 Copyright (c) 1996-2012 Texas Instruments Incorporated")
.dwattr $C$DW$CU, DW_AT_TI_version(0x01)
.dwattr $C$DW$CU, DW_AT_comp_dir("F:\eZdsp_DBG\tmp1\c55x-sim2\foo\Debug")
;******************************************************************************
;* CINIT RECORDS *
;******************************************************************************
.sect ".cinit"
.align 1
.field 1,16
.field _PaSs_StAtE+0,24
.field 0,8
.field 1,16 ; _PaSs_StAtE @ 0
.sect ".cinit"
.align 1
.field 1,16
.field _PaSs+0,24
.field 0,8
.field 0,16 ; _PaSs @ 0
$C$DW$1 .dwtag DW_TAG_subprogram, DW_AT_name("GPIO_open")
.dwattr $C$DW$1, DW_AT_TI_symbol_name("_GPIO_open")
.dwattr $C$DW$1, DW_AT_type(*$C$DW$T$43)
.dwattr $C$DW$1, DW_AT_declaration
.dwattr $C$DW$1, DW_AT_external
$C$DW$2 .dwtag DW_TAG_formal_parameter
.dwattr $C$DW$2, DW_AT_type(*$C$DW$T$42)
$C$DW$3 .dwtag DW_TAG_formal_parameter
.dwattr $C$DW$3, DW_AT_type(*$C$DW$T$46)
.dwendtag $C$DW$1
$C$DW$4 .dwtag DW_TAG_subprogram, DW_AT_name("GPIO_close")
.dwattr $C$DW$4, DW_AT_TI_symbol_name("_GPIO_close")
.dwattr $C$DW$4, DW_AT_type(*$C$DW$T$45)
.dwattr $C$DW$4, DW_AT_declaration
.dwattr $C$DW$4, DW_AT_external
$C$DW$5 .dwtag DW_TAG_formal_parameter
.dwattr $C$DW$5, DW_AT_type(*$C$DW$T$43)
.dwendtag $C$DW$4
$C$DW$6 .dwtag DW_TAG_subprogram, DW_AT_name("GPIO_config")
.dwattr $C$DW$6, DW_AT_TI_symbol_name("_GPIO_config")
.dwattr $C$DW$6, DW_AT_type(*$C$DW$T$45)
.dwattr $C$DW$6, DW_AT_declaration
.dwattr $C$DW$6, DW_AT_external
$C$DW$7 .dwtag DW_TAG_formal_parameter
.dwattr $C$DW$7, DW_AT_type(*$C$DW$T$43)
$C$DW$8 .dwtag DW_TAG_formal_parameter
.dwattr $C$DW$8, DW_AT_type(*$C$DW$T$50)
.dwendtag $C$DW$6
$C$DW$9 .dwtag DW_TAG_subprogram, DW_AT_name("GPIO_getConfig")
.dwattr $C$DW$9, DW_AT_TI_symbol_name("_GPIO_getConfig")
.dwattr $C$DW$9, DW_AT_type(*$C$DW$T$45)
.dwattr $C$DW$9, DW_AT_declaration
.dwattr $C$DW$9, DW_AT_external
$C$DW$10 .dwtag DW_TAG_formal_parameter
.dwattr $C$DW$10, DW_AT_type(*$C$DW$T$43)
$C$DW$11 .dwtag DW_TAG_formal_parameter
.dwattr $C$DW$11, DW_AT_type(*$C$DW$T$50)
.dwendtag $C$DW$9
$C$DW$12 .dwtag DW_TAG_subprogram, DW_AT_name("GPIO_read")
.dwattr $C$DW$12, DW_AT_TI_symbol_name("_GPIO_read")
.dwattr $C$DW$12, DW_AT_type(*$C$DW$T$45)
.dwattr $C$DW$12, DW_AT_declaration
.dwattr $C$DW$12, DW_AT_external
$C$DW$13 .dwtag DW_TAG_formal_parameter
.dwattr $C$DW$13, DW_AT_type(*$C$DW$T$43)
$C$DW$14 .dwtag DW_TAG_formal_parameter
.dwattr $C$DW$14, DW_AT_type(*$C$DW$T$31)
$C$DW$15 .dwtag DW_TAG_formal_parameter
.dwattr $C$DW$15, DW_AT_type(*$C$DW$T$62)
.dwendtag $C$DW$12
$C$DW$16 .dwtag DW_TAG_subprogram, DW_AT_name("GPIO_write")
.dwattr $C$DW$16, DW_AT_TI_symbol_name("_GPIO_write")
.dwattr $C$DW$16, DW_AT_type(*$C$DW$T$45)
.dwattr $C$DW$16, DW_AT_declaration
.dwattr $C$DW$16, DW_AT_external
$C$DW$17 .dwtag DW_TAG_formal_parameter
.dwattr $C$DW$17, DW_AT_type(*$C$DW$T$43)
$C$DW$18 .dwtag DW_TAG_formal_parameter
.dwattr $C$DW$18, DW_AT_type(*$C$DW$T$31)
$C$DW$19 .dwtag DW_TAG_formal_parameter
.dwattr $C$DW$19, DW_AT_type(*$C$DW$T$19)
.dwendtag $C$DW$16
$C$DW$20 .dwtag DW_TAG_subprogram, DW_AT_name("GPIO_reset")
.dwattr $C$DW$20, DW_AT_TI_symbol_name("_GPIO_reset")
.dwattr $C$DW$20, DW_AT_type(*$C$DW$T$45)
.dwattr $C$DW$20, DW_AT_declaration
.dwattr $C$DW$20, DW_AT_external
$C$DW$21 .dwtag DW_TAG_formal_parameter
.dwattr $C$DW$21, DW_AT_type(*$C$DW$T$43)
.dwendtag $C$DW$20
$C$DW$22 .dwtag DW_TAG_subprogram, DW_AT_name("GPIO_configBit")
.dwattr $C$DW$22, DW_AT_TI_symbol_name("_GPIO_configBit")
.dwattr $C$DW$22, DW_AT_type(*$C$DW$T$45)
.dwattr $C$DW$22, DW_AT_declaration
.dwattr $C$DW$22, DW_AT_external
$C$DW$23 .dwtag DW_TAG_formal_parameter
.dwattr $C$DW$23, DW_AT_type(*$C$DW$T$43)
$C$DW$24 .dwtag DW_TAG_formal_parameter
.dwattr $C$DW$24, DW_AT_type(*$C$DW$T$52)
.dwendtag $C$DW$22
$C$DW$25 .dwtag DW_TAG_subprogram, DW_AT_name("printf")
.dwattr $C$DW$25, DW_AT_TI_symbol_name("_printf")
.dwattr $C$DW$25, DW_AT_type(*$C$DW$T$10)
.dwattr $C$DW$25, DW_AT_declaration
.dwattr $C$DW$25, DW_AT_external
$C$DW$26 .dwtag DW_TAG_formal_parameter
.dwattr $C$DW$26, DW_AT_type(*$C$DW$T$73)
$C$DW$27 .dwtag DW_TAG_unspecified_parameters
.dwendtag $C$DW$25
.global _gpioObj
.bss _gpioObj,2,0,0
$C$DW$28 .dwtag DW_TAG_variable, DW_AT_name("gpioObj")
.dwattr $C$DW$28, DW_AT_TI_symbol_name("_gpioObj")
.dwattr $C$DW$28, DW_AT_location[DW_OP_addr _gpioObj]
.dwattr $C$DW$28, DW_AT_type(*$C$DW$T$41)
.dwattr $C$DW$28, DW_AT_external
.global _hGpio
.bss _hGpio,2,0,2
$C$DW$29 .dwtag DW_TAG_variable, DW_AT_name("hGpio")
.dwattr $C$DW$29, DW_AT_TI_symbol_name("_hGpio")
.dwattr $C$DW$29, DW_AT_location[DW_OP_addr _hGpio]
.dwattr $C$DW$29, DW_AT_type(*$C$DW$T$42)
.dwattr $C$DW$29, DW_AT_external
.global _PaSs_StAtE
.bss _PaSs_StAtE,1,0,0
$C$DW$30 .dwtag DW_TAG_variable, DW_AT_name("PaSs_StAtE")
.dwattr $C$DW$30, DW_AT_TI_symbol_name("_PaSs_StAtE")
.dwattr $C$DW$30, DW_AT_location[DW_OP_addr _PaSs_StAtE]
.dwattr $C$DW$30, DW_AT_type(*$C$DW$T$69)
.dwattr $C$DW$30, DW_AT_external
.global _PaSs
.bss _PaSs,1,0,0
$C$DW$31 .dwtag DW_TAG_variable, DW_AT_name("PaSs")
.dwattr $C$DW$31, DW_AT_TI_symbol_name("_PaSs")
.dwattr $C$DW$31, DW_AT_location[DW_OP_addr _PaSs]
.dwattr $C$DW$31, DW_AT_type(*$C$DW$T$69)
.dwattr $C$DW$31, DW_AT_external
; F:\t\cc5p5\ccsv5\tools\compiler\c5500_4.4.1\bin\acp55.exe -@f:\\AppData\\Local\\Temp\\1163612
.sect ".text"
.align 4
.global _main
$C$DW$32 .dwtag DW_TAG_subprogram, DW_AT_name("main")
.dwattr $C$DW$32, DW_AT_low_pc(_main)
.dwattr $C$DW$32, DW_AT_high_pc(0x00)
.dwattr $C$DW$32, DW_AT_TI_symbol_name("_main")
.dwattr $C$DW$32, DW_AT_external
.dwattr $C$DW$32, DW_AT_TI_begin_file("../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c")
.dwattr $C$DW$32, DW_AT_TI_begin_line(0x76)
.dwattr $C$DW$32, DW_AT_TI_begin_column(0x06)
.dwattr $C$DW$32, DW_AT_TI_max_frame_size(0x04)
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 119,column 1,is_stmt,address _main
.dwfde $C$DW$CIE, _main
;*******************************************************************************
;* FUNCTION NAME: main *
;* *
;* Function Uses Regs : T0,AR1,AR2,AR3,XAR3,SP,TC1,M40,SATA,SATD,RDM,FRCT, *
;* SMUL *
;* Stack Frame : Compact (No Frame Pointer, w/ debug) *
;* Total Frame Size : 4 words *
;* (1 return address/alignment) *
;* (2 function parameters) *
;* (1 local values) *
;* Min System Stack : 1 word *
;*******************************************************************************
_main:
.dwcfi cfa_offset, 1
.dwcfi save_reg_to_mem, 91, -1
AADD #-3, SP
.dwcfi cfa_offset, 4
$C$DW$33 .dwtag DW_TAG_variable, DW_AT_name("result")
.dwattr $C$DW$33, DW_AT_TI_symbol_name("_result")
.dwattr $C$DW$33, DW_AT_type(*$C$DW$T$10)
.dwattr $C$DW$33, DW_AT_location[DW_OP_bregx 0x24 2]
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 122,column 2,is_stmt
AMOV #$C$FSL1, XAR3 ; |122|
MOV XAR3, dbl(*SP(#0))
$C$DW$34 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$34, DW_AT_low_pc(0x00)
.dwattr $C$DW$34, DW_AT_name("_printf")
.dwattr $C$DW$34, DW_AT_TI_call
CALL #_printf ; |122|
; call occurs [#_printf] ; |122|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 124,column 2,is_stmt
AMOV #$C$FSL2, XAR3 ; |124|
MOV XAR3, dbl(*SP(#0))
$C$DW$35 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$35, DW_AT_low_pc(0x00)
.dwattr $C$DW$35, DW_AT_name("_printf")
.dwattr $C$DW$35, DW_AT_TI_call
CALL #_printf ; |124|
; call occurs [#_printf] ; |124|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 126,column 5,is_stmt
$C$DW$36 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$36, DW_AT_low_pc(0x00)
.dwattr $C$DW$36, DW_AT_name("_gpio_output_pin_test")
.dwattr $C$DW$36, DW_AT_TI_call
CALL #_gpio_output_pin_test ; |126|
; call occurs [#_gpio_output_pin_test] ; |126|
MOV T0, *SP(#2) ; |126|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 127,column 5,is_stmt
MOV T0, AR1
|| MOV #0, AR2
CMP AR2 != AR1, TC1 ; |127|
BCC $C$L1,TC1 ; |127|
; branchcc occurs ; |127|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 129,column 9,is_stmt
AMOV #$C$FSL3, XAR3 ; |129|
MOV XAR3, dbl(*SP(#0))
$C$DW$37 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$37, DW_AT_low_pc(0x00)
.dwattr $C$DW$37, DW_AT_name("_printf")
.dwattr $C$DW$37, DW_AT_TI_call
CALL #_printf ; |129|
; call occurs [#_printf] ; |129|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 130,column 5,is_stmt
B $C$L2 ; |130|
; branch occurs ; |130|
$C$L1:
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 133,column 3,is_stmt
AMOV #$C$FSL4, XAR3 ; |133|
MOV XAR3, dbl(*SP(#0))
$C$DW$38 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$38, DW_AT_low_pc(0x00)
.dwattr $C$DW$38, DW_AT_name("_printf")
.dwattr $C$DW$38, DW_AT_TI_call
CALL #_printf ; |133|
; call occurs [#_printf] ; |133|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 136,column 9,is_stmt
MOV #0, *(#_PaSs_StAtE) ; |136|
$C$L2:
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 140,column 2,is_stmt
AMOV #$C$FSL5, XAR3 ; |140|
MOV XAR3, dbl(*SP(#0))
$C$DW$39 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$39, DW_AT_low_pc(0x00)
.dwattr $C$DW$39, DW_AT_name("_printf")
.dwattr $C$DW$39, DW_AT_TI_call
CALL #_printf ; |140|
; call occurs [#_printf] ; |140|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 142,column 5,is_stmt
$C$DW$40 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$40, DW_AT_low_pc(0x00)
.dwattr $C$DW$40, DW_AT_name("_gpio_pin_config_test")
.dwattr $C$DW$40, DW_AT_TI_call
CALL #_gpio_pin_config_test ; |142|
; call occurs [#_gpio_pin_config_test] ; |142|
MOV T0, *SP(#2) ; |142|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 143,column 5,is_stmt
MOV T0, AR1
|| MOV #0, AR2
CMP AR2 != AR1, TC1 ; |143|
BCC $C$L3,TC1 ; |143|
; branchcc occurs ; |143|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 145,column 9,is_stmt
AMOV #$C$FSL6, XAR3 ; |145|
MOV XAR3, dbl(*SP(#0))
$C$DW$41 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$41, DW_AT_low_pc(0x00)
.dwattr $C$DW$41, DW_AT_name("_printf")
.dwattr $C$DW$41, DW_AT_TI_call
CALL #_printf ; |145|
; call occurs [#_printf] ; |145|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 146,column 5,is_stmt
B $C$L4 ; |146|
; branch occurs ; |146|
$C$L3:
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 149,column 3,is_stmt
AMOV #$C$FSL7, XAR3 ; |149|
MOV XAR3, dbl(*SP(#0))
$C$DW$42 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$42, DW_AT_low_pc(0x00)
.dwattr $C$DW$42, DW_AT_name("_printf")
.dwattr $C$DW$42, DW_AT_TI_call
CALL #_printf ; |149|
; call occurs [#_printf] ; |149|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 152,column 9,is_stmt
MOV #0, *(#_PaSs_StAtE) ; |152|
$C$L4:
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 156,column 2,is_stmt
AMOV #$C$FSL8, XAR3 ; |156|
MOV XAR3, dbl(*SP(#0))
$C$DW$43 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$43, DW_AT_low_pc(0x00)
.dwattr $C$DW$43, DW_AT_name("_printf")
.dwattr $C$DW$43, DW_AT_TI_call
CALL #_printf ; |156|
; call occurs [#_printf] ; |156|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 159,column 9,is_stmt
MOV *(#_PaSs_StAtE), AR1 ; |159|
MOV AR1, *(#_PaSs) ; |159|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 164,column 1,is_stmt
AADD #3, SP
.dwcfi cfa_offset, 1
$C$DW$44 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$44, DW_AT_low_pc(0x00)
.dwattr $C$DW$44, DW_AT_TI_return
RET
; return occurs
.dwattr $C$DW$32, DW_AT_TI_end_file("../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c")
.dwattr $C$DW$32, DW_AT_TI_end_line(0xa4)
.dwattr $C$DW$32, DW_AT_TI_end_column(0x01)
.dwendentry
.dwendtag $C$DW$32
.sect ".text"
.align 4
.global _gpio_output_pin_test
$C$DW$45 .dwtag DW_TAG_subprogram, DW_AT_name("gpio_output_pin_test")
.dwattr $C$DW$45, DW_AT_low_pc(_gpio_output_pin_test)
.dwattr $C$DW$45, DW_AT_high_pc(0x00)
.dwattr $C$DW$45, DW_AT_TI_symbol_name("_gpio_output_pin_test")
.dwattr $C$DW$45, DW_AT_external
.dwattr $C$DW$45, DW_AT_type(*$C$DW$T$10)
.dwattr $C$DW$45, DW_AT_TI_begin_file("../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c")
.dwattr $C$DW$45, DW_AT_TI_begin_line(0xb0)
.dwattr $C$DW$45, DW_AT_TI_begin_column(0x06)
.dwattr $C$DW$45, DW_AT_TI_max_frame_size(0x0a)
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 177,column 1,is_stmt,address _gpio_output_pin_test
.dwfde $C$DW$CIE, _gpio_output_pin_test
;*******************************************************************************
;* FUNCTION NAME: gpio_output_pin_test *
;* *
;* Function Uses Regs : AC0,AC0,AC1,AC1,T0,T1,AR0,XAR0,AR1,XAR1,AR2,AR3,XAR3,*
;* SP,TC1,M40,SATA,SATD,RDM,FRCT,SMUL *
;* Stack Frame : Compact (No Frame Pointer, w/ debug) *
;* Total Frame Size : 10 words *
;* (2 return address/alignment) *
;* (2 function parameters) *
;* (6 local values) *
;* Min System Stack : 1 word *
;*******************************************************************************
_gpio_output_pin_test:
.dwcfi cfa_offset, 1
.dwcfi save_reg_to_mem, 91, -1
AADD #-9, SP
.dwcfi cfa_offset, 10
$C$DW$46 .dwtag DW_TAG_variable, DW_AT_name("status")
.dwattr $C$DW$46, DW_AT_TI_symbol_name("_status")
.dwattr $C$DW$46, DW_AT_type(*$C$DW$T$45)
.dwattr $C$DW$46, DW_AT_location[DW_OP_bregx 0x24 2]
$C$DW$47 .dwtag DW_TAG_variable, DW_AT_name("config")
.dwattr $C$DW$47, DW_AT_TI_symbol_name("_config")
.dwattr $C$DW$47, DW_AT_type(*$C$DW$T$51)
.dwattr $C$DW$47, DW_AT_location[DW_OP_bregx 0x24 3]
$C$DW$48 .dwtag DW_TAG_variable, DW_AT_name("writeVal")
.dwattr $C$DW$48, DW_AT_TI_symbol_name("_writeVal")
.dwattr $C$DW$48, DW_AT_type(*$C$DW$T$19)
.dwattr $C$DW$48, DW_AT_location[DW_OP_bregx 0x24 6]
$C$DW$49 .dwtag DW_TAG_variable, DW_AT_name("readVal")
.dwattr $C$DW$49, DW_AT_TI_symbol_name("_readVal")
.dwattr $C$DW$49, DW_AT_type(*$C$DW$T$19)
.dwattr $C$DW$49, DW_AT_location[DW_OP_bregx 0x24 7]
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 183,column 5,is_stmt
MOV #0, *SP(#6) ; |183|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 189,column 5,is_stmt
MOV *port(#7168), AR1 ; |189|
AND #0xfcff, AR1, AC0 ; |189|
BSET @#9, AC0 ; |189|
MOV AC0, *port(#7168) ; |189|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 192,column 5,is_stmt
AMOV #_gpioObj, XAR0 ; |192|
AMAR *SP(#2), XAR1
$C$DW$50 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$50, DW_AT_low_pc(0x00)
.dwattr $C$DW$50, DW_AT_name("_GPIO_open")
.dwattr $C$DW$50, DW_AT_TI_call
CALL #_GPIO_open ; |192|
; call occurs [#_GPIO_open] ; |192|
MOV XAR0, dbl(*(#_hGpio))
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 193,column 5,is_stmt
MOV dbl(*(#_hGpio)), XAR3
MOV XAR3, AC0
|| MOV #0, AC1 ; |193|
CMPU AC1 == AC0, TC1 ; |193|
BCC $C$L5,TC1 ; |193|
; branchcc occurs ; |193|
MOV #0, AR2
|| MOV *SP(#2), AR1 ; |193|
CMP AR2 == AR1, TC1 ; |193|
BCC $C$L6,TC1 ; |193|
; branchcc occurs ; |193|
$C$L5:
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 195,column 9,is_stmt
AMOV #$C$FSL9, XAR3 ; |195|
MOV XAR3, dbl(*SP(#0))
$C$DW$51 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$51, DW_AT_low_pc(0x00)
.dwattr $C$DW$51, DW_AT_name("_printf")
.dwattr $C$DW$51, DW_AT_TI_call
CALL #_printf ; |195|
; call occurs [#_printf] ; |195|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 196,column 9,is_stmt
MOV #-1, T0
B $C$L13 ; |196|
; branch occurs ; |196|
$C$L6:
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 200,column 3,is_stmt
AMOV #$C$FSL10, XAR3 ; |200|
MOV XAR3, dbl(*SP(#0))
$C$DW$52 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$52, DW_AT_low_pc(0x00)
.dwattr $C$DW$52, DW_AT_name("_printf")
.dwattr $C$DW$52, DW_AT_TI_call
CALL #_printf ; |200|
; call occurs [#_printf] ; |200|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 204,column 5,is_stmt
MOV dbl(*(#_hGpio)), XAR0
$C$DW$53 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$53, DW_AT_low_pc(0x00)
.dwattr $C$DW$53, DW_AT_name("_GPIO_reset")
.dwattr $C$DW$53, DW_AT_TI_call
CALL #_GPIO_reset ; |204|
; call occurs [#_GPIO_reset] ; |204|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 207,column 5,is_stmt
MOV #0, *SP(#3) ; |207|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 208,column 5,is_stmt
MOV #1, *SP(#4) ; |208|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 209,column 5,is_stmt
MOV #2, *SP(#5) ; |209|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 211,column 5,is_stmt
MOV dbl(*(#_hGpio)), XAR0
AMAR *SP(#3), XAR1
$C$DW$54 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$54, DW_AT_low_pc(0x00)
.dwattr $C$DW$54, DW_AT_name("_GPIO_configBit")
.dwattr $C$DW$54, DW_AT_TI_call
CALL #_GPIO_configBit ; |211|
; call occurs [#_GPIO_configBit] ; |211|
MOV T0, *SP(#2) ; |211|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 212,column 5,is_stmt
MOV #0, AR2
|| MOV T0, AR1
CMP AR2 == AR1, TC1 ; |212|
BCC $C$L7,TC1 ; |212|
; branchcc occurs ; |212|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 214,column 9,is_stmt
AMOV #$C$FSL11, XAR3 ; |214|
MOV XAR3, dbl(*SP(#0))
$C$DW$55 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$55, DW_AT_low_pc(0x00)
.dwattr $C$DW$55, DW_AT_name("_printf")
.dwattr $C$DW$55, DW_AT_TI_call
CALL #_printf ; |214|
; call occurs [#_printf] ; |214|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 215,column 9,is_stmt
MOV #-1, T0
B $C$L13 ; |215|
; branch occurs ; |215|
$C$L7:
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 219,column 5,is_stmt
MOV *SP(#6), T1 ; |219|
MOV dbl(*(#_hGpio)), XAR0
$C$DW$56 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$56, DW_AT_low_pc(0x00)
.dwattr $C$DW$56, DW_AT_name("_GPIO_write")
.dwattr $C$DW$56, DW_AT_TI_call
CALL #_GPIO_write ; |219|
|| MOV #0, T0
; call occurs [#_GPIO_write] ; |219|
MOV T0, *SP(#2) ; |219|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 220,column 5,is_stmt
MOV T0, AR1
|| MOV #0, AR2
CMP AR2 == AR1, TC1 ; |220|
BCC $C$L8,TC1 ; |220|
; branchcc occurs ; |220|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 222,column 9,is_stmt
AMOV #$C$FSL12, XAR3 ; |222|
MOV XAR3, dbl(*SP(#0))
$C$DW$57 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$57, DW_AT_low_pc(0x00)
.dwattr $C$DW$57, DW_AT_name("_printf")
.dwattr $C$DW$57, DW_AT_TI_call
CALL #_printf ; |222|
; call occurs [#_printf] ; |222|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 223,column 9,is_stmt
MOV #-1, T0
B $C$L13 ; |223|
; branch occurs ; |223|
$C$L8:
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 227,column 3,is_stmt
AMOV #$C$FSL13, XAR3 ; |227|
MOV XAR3, dbl(*SP(#0))
$C$DW$58 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$58, DW_AT_low_pc(0x00)
.dwattr $C$DW$58, DW_AT_name("_printf")
.dwattr $C$DW$58, DW_AT_TI_call
CALL #_printf ; |227|
; call occurs [#_printf] ; |227|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 231,column 5,is_stmt
AMAR *SP(#7), XAR1
MOV dbl(*(#_hGpio)), XAR0
$C$DW$59 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$59, DW_AT_low_pc(0x00)
.dwattr $C$DW$59, DW_AT_name("_GPIO_read")
.dwattr $C$DW$59, DW_AT_TI_call
CALL #_GPIO_read ; |231|
|| MOV #0, T0
; call occurs [#_GPIO_read] ; |231|
MOV T0, *SP(#2) ; |231|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 232,column 5,is_stmt
MOV T0, AR1
|| MOV #0, AR2
CMP AR2 == AR1, TC1 ; |232|
BCC $C$L9,TC1 ; |232|
; branchcc occurs ; |232|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 234,column 9,is_stmt
AMOV #$C$FSL14, XAR3 ; |234|
MOV XAR3, dbl(*SP(#0))
$C$DW$60 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$60, DW_AT_low_pc(0x00)
.dwattr $C$DW$60, DW_AT_name("_printf")
.dwattr $C$DW$60, DW_AT_TI_call
CALL #_printf ; |234|
; call occurs [#_printf] ; |234|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 235,column 9,is_stmt
MOV #-1, T0
B $C$L13 ; |235|
; branch occurs ; |235|
$C$L9:
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 239,column 3,is_stmt
AMOV #$C$FSL15, XAR3 ; |239|
MOV XAR3, dbl(*SP(#0))
$C$DW$61 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$61, DW_AT_low_pc(0x00)
.dwattr $C$DW$61, DW_AT_name("_printf")
.dwattr $C$DW$61, DW_AT_TI_call
CALL #_printf ; |239|
; call occurs [#_printf] ; |239|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 243,column 5,is_stmt
MOV *SP(#7), AR1 ; |243|
MOV *SP(#6), AR2 ; |243|
CMPU AR2 != AR1, TC1 ; |243|
BCC $C$L10,TC1 ; |243|
; branchcc occurs ; |243|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 245,column 9,is_stmt
AMOV #$C$FSL16, XAR3 ; |245|
MOV XAR3, dbl(*SP(#0))
$C$DW$62 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$62, DW_AT_low_pc(0x00)
.dwattr $C$DW$62, DW_AT_name("_printf")
.dwattr $C$DW$62, DW_AT_TI_call
CALL #_printf ; |245|
; call occurs [#_printf] ; |245|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 246,column 5,is_stmt
B $C$L11 ; |246|
; branch occurs ; |246|
$C$L10:
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 249,column 9,is_stmt
AMOV #$C$FSL17, XAR3 ; |249|
MOV XAR3, dbl(*SP(#0))
$C$DW$63 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$63, DW_AT_low_pc(0x00)
.dwattr $C$DW$63, DW_AT_name("_printf")
.dwattr $C$DW$63, DW_AT_TI_call
CALL #_printf ; |249|
; call occurs [#_printf] ; |249|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 250,column 9,is_stmt
MOV #-1, T0
B $C$L13 ; |250|
; branch occurs ; |250|
$C$L11:
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 254,column 5,is_stmt
MOV dbl(*(#_hGpio)), XAR0
$C$DW$64 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$64, DW_AT_low_pc(0x00)
.dwattr $C$DW$64, DW_AT_name("_GPIO_close")
.dwattr $C$DW$64, DW_AT_TI_call
CALL #_GPIO_close ; |254|
; call occurs [#_GPIO_close] ; |254|
MOV T0, *SP(#2) ; |254|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 255,column 5,is_stmt
MOV T0, AR1
|| MOV #0, AR2
CMP AR2 == AR1, TC1 ; |255|
BCC $C$L12,TC1 ; |255|
; branchcc occurs ; |255|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 257,column 9,is_stmt
AMOV #$C$FSL18, XAR3 ; |257|
MOV XAR3, dbl(*SP(#0))
$C$DW$65 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$65, DW_AT_low_pc(0x00)
.dwattr $C$DW$65, DW_AT_name("_printf")
.dwattr $C$DW$65, DW_AT_TI_call
CALL #_printf ; |257|
; call occurs [#_printf] ; |257|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 258,column 9,is_stmt
MOV #-1, T0
B $C$L13 ; |258|
; branch occurs ; |258|
$C$L12:
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 261,column 5,is_stmt
MOV #0, T0
$C$L13:
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 262,column 1,is_stmt
AADD #9, SP
.dwcfi cfa_offset, 1
$C$DW$66 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$66, DW_AT_low_pc(0x00)
.dwattr $C$DW$66, DW_AT_TI_return
RET
; return occurs
.dwattr $C$DW$45, DW_AT_TI_end_file("../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c")
.dwattr $C$DW$45, DW_AT_TI_end_line(0x106)
.dwattr $C$DW$45, DW_AT_TI_end_column(0x01)
.dwendentry
.dwendtag $C$DW$45
.sect ".text"
.align 4
.global _gpio_pin_config_test
$C$DW$67 .dwtag DW_TAG_subprogram, DW_AT_name("gpio_pin_config_test")
.dwattr $C$DW$67, DW_AT_low_pc(_gpio_pin_config_test)
.dwattr $C$DW$67, DW_AT_high_pc(0x00)
.dwattr $C$DW$67, DW_AT_TI_symbol_name("_gpio_pin_config_test")
.dwattr $C$DW$67, DW_AT_external
.dwattr $C$DW$67, DW_AT_type(*$C$DW$T$10)
.dwattr $C$DW$67, DW_AT_TI_begin_file("../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c")
.dwattr $C$DW$67, DW_AT_TI_begin_line(0x113)
.dwattr $C$DW$67, DW_AT_TI_begin_column(0x05)
.dwattr $C$DW$67, DW_AT_TI_max_frame_size(0x10)
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 276,column 1,is_stmt,address _gpio_pin_config_test
.dwfde $C$DW$CIE, _gpio_pin_config_test
;*******************************************************************************
;* FUNCTION NAME: gpio_pin_config_test *
;* *
;* Function Uses Regs : AC0,AC0,AC1,AC1,T0,AR0,XAR0,AR1,XAR1,AR2,AR3,XAR3,SP,*
;* TC1,M40,SATA,SATD,RDM,FRCT,SMUL *
;* Stack Frame : Compact (No Frame Pointer, w/ debug) *
;* Total Frame Size : 16 words *
;* (1 return address/alignment) *
;* (2 function parameters) *
;* (13 local values) *
;* Min System Stack : 1 word *
;*******************************************************************************
_gpio_pin_config_test:
.dwcfi cfa_offset, 1
.dwcfi save_reg_to_mem, 91, -1
AADD #-15, SP
.dwcfi cfa_offset, 16
$C$DW$68 .dwtag DW_TAG_variable, DW_AT_name("status")
.dwattr $C$DW$68, DW_AT_TI_symbol_name("_status")
.dwattr $C$DW$68, DW_AT_type(*$C$DW$T$45)
.dwattr $C$DW$68, DW_AT_location[DW_OP_bregx 0x24 2]
$C$DW$69 .dwtag DW_TAG_variable, DW_AT_name("config")
.dwattr $C$DW$69, DW_AT_TI_symbol_name("_config")
.dwattr $C$DW$69, DW_AT_type(*$C$DW$T$49)
.dwattr $C$DW$69, DW_AT_location[DW_OP_bregx 0x24 3]
$C$DW$70 .dwtag DW_TAG_variable, DW_AT_name("getConfig")
.dwattr $C$DW$70, DW_AT_TI_symbol_name("_getConfig")
.dwattr $C$DW$70, DW_AT_type(*$C$DW$T$49)
.dwattr $C$DW$70, DW_AT_location[DW_OP_bregx 0x24 9]
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 285,column 2,is_stmt
MOV *port(#7168), AR1 ; |285|
AND #0xfcff, AR1, AC0 ; |285|
BSET @#9, AC0 ; |285|
MOV AC0, *port(#7168) ; |285|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 286,column 5,is_stmt
MOV *port(#7168), AR1 ; |286|
AND #0xf3ff, AR1, AC0 ; |286|
BSET @#11, AC0 ; |286|
MOV AC0, *port(#7168) ; |286|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 287,column 2,is_stmt
MOV *port(#7168), AR1 ; |287|
AND #0x8fff, AR1, AC0 ; |287|
BSET @#12, AC0 ; |287|
MOV AC0, *port(#7168) ; |287|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 288,column 2,is_stmt
MOV *port(#7168), AR1 ; |288|
BCLR @#5, AR1 ; |288|
BSET @#5, AR1 ; |288|
MOV AR1, *port(#7168) ; |288|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 289,column 2,is_stmt
MOV *port(#7168), AR1 ; |289|
BCLR @#4, AR1 ; |289|
BSET @#4, AR1 ; |289|
MOV AR1, *port(#7168) ; |289|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 290,column 2,is_stmt
MOV *port(#7168), AR1 ; |290|
BCLR @#3, AR1 ; |290|
BSET @#3, AR1 ; |290|
MOV AR1, *port(#7168) ; |290|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 291,column 2,is_stmt
MOV *port(#7168), AR1 ; |291|
BCLR @#2, AR1 ; |291|
BSET @#2, AR1 ; |291|
MOV AR1, *port(#7168) ; |291|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 292,column 2,is_stmt
MOV *port(#7168), AR1 ; |292|
BCLR @#1, AR1 ; |292|
BSET @#1, AR1 ; |292|
MOV AR1, *port(#7168) ; |292|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 293,column 2,is_stmt
MOV *port(#7168), AR1 ; |293|
BCLR @#0, AR1 ; |293|
BSET @#0, AR1 ; |293|
MOV AR1, *port(#7168) ; |293|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 296,column 5,is_stmt
AMOV #_gpioObj, XAR0 ; |296|
AMAR *SP(#2), XAR1
$C$DW$71 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$71, DW_AT_low_pc(0x00)
.dwattr $C$DW$71, DW_AT_name("_GPIO_open")
.dwattr $C$DW$71, DW_AT_TI_call
CALL #_GPIO_open ; |296|
; call occurs [#_GPIO_open] ; |296|
MOV XAR0, dbl(*(#_hGpio))
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 297,column 5,is_stmt
MOV dbl(*(#_hGpio)), XAR3
MOV XAR3, AC0
|| MOV #0, AC1 ; |297|
CMPU AC1 == AC0, TC1 ; |297|
BCC $C$L14,TC1 ; |297|
; branchcc occurs ; |297|
MOV #0, AR2
|| MOV *SP(#2), AR1 ; |297|
CMP AR2 == AR1, TC1 ; |297|
BCC $C$L15,TC1 ; |297|
; branchcc occurs ; |297|
$C$L14:
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 299,column 9,is_stmt
AMOV #$C$FSL9, XAR3 ; |299|
MOV XAR3, dbl(*SP(#0))
$C$DW$72 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$72, DW_AT_low_pc(0x00)
.dwattr $C$DW$72, DW_AT_name("_printf")
.dwattr $C$DW$72, DW_AT_TI_call
CALL #_printf ; |299|
; call occurs [#_printf] ; |299|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 300,column 9,is_stmt
MOV #-1, T0
B $C$L22 ; |300|
; branch occurs ; |300|
$C$L15:
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 304,column 3,is_stmt
AMOV #$C$FSL10, XAR3 ; |304|
MOV XAR3, dbl(*SP(#0))
$C$DW$73 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$73, DW_AT_low_pc(0x00)
.dwattr $C$DW$73, DW_AT_name("_printf")
.dwattr $C$DW$73, DW_AT_TI_call
CALL #_printf ; |304|
; call occurs [#_printf] ; |304|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 308,column 5,is_stmt
MOV dbl(*(#_hGpio)), XAR0
$C$DW$74 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$74, DW_AT_low_pc(0x00)
.dwattr $C$DW$74, DW_AT_name("_GPIO_reset")
.dwattr $C$DW$74, DW_AT_TI_call
CALL #_GPIO_reset ; |308|
; call occurs [#_GPIO_reset] ; |308|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 311,column 5,is_stmt
MOV #65535, *SP(#3) ; |311|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 312,column 5,is_stmt
MOV #2019, *SP(#4) ; |312|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 313,column 5,is_stmt
MOV #0, *SP(#7) ; |313|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 314,column 5,is_stmt
MOV #0, *SP(#8) ; |314|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 315,column 2,is_stmt
MOV #0, *SP(#5) ; |315|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 316,column 2,is_stmt
MOV #0, *SP(#6) ; |316|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 318,column 5,is_stmt
MOV dbl(*(#_hGpio)), XAR0
AMAR *SP(#3), XAR1
$C$DW$75 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$75, DW_AT_low_pc(0x00)
.dwattr $C$DW$75, DW_AT_name("_GPIO_config")
.dwattr $C$DW$75, DW_AT_TI_call
CALL #_GPIO_config ; |318|
; call occurs [#_GPIO_config] ; |318|
MOV T0, *SP(#2) ; |318|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 319,column 5,is_stmt
MOV #0, AR2
|| MOV T0, AR1
CMP AR2 == AR1, TC1 ; |319|
BCC $C$L16,TC1 ; |319|
; branchcc occurs ; |319|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 321,column 9,is_stmt
AMOV #$C$FSL19, XAR3 ; |321|
MOV XAR3, dbl(*SP(#0))
$C$DW$76 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$76, DW_AT_low_pc(0x00)
.dwattr $C$DW$76, DW_AT_name("_printf")
.dwattr $C$DW$76, DW_AT_TI_call
CALL #_printf ; |321|
; call occurs [#_printf] ; |321|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 322,column 9,is_stmt
MOV #-1, T0
B $C$L22 ; |322|
; branch occurs ; |322|
$C$L16:
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 326,column 3,is_stmt
AMOV #$C$FSL20, XAR3 ; |326|
MOV XAR3, dbl(*SP(#0))
$C$DW$77 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$77, DW_AT_low_pc(0x00)
.dwattr $C$DW$77, DW_AT_name("_printf")
.dwattr $C$DW$77, DW_AT_TI_call
CALL #_printf ; |326|
; call occurs [#_printf] ; |326|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 330,column 5,is_stmt
AMAR *SP(#9), XAR1
MOV dbl(*(#_hGpio)), XAR0
$C$DW$78 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$78, DW_AT_low_pc(0x00)
.dwattr $C$DW$78, DW_AT_name("_GPIO_getConfig")
.dwattr $C$DW$78, DW_AT_TI_call
CALL #_GPIO_getConfig ; |330|
; call occurs [#_GPIO_getConfig] ; |330|
MOV T0, *SP(#2) ; |330|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 331,column 5,is_stmt
MOV T0, AR1
|| MOV #0, AR2
CMP AR2 == AR1, TC1 ; |331|
BCC $C$L17,TC1 ; |331|
; branchcc occurs ; |331|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 333,column 9,is_stmt
AMOV #$C$FSL21, XAR3 ; |333|
MOV XAR3, dbl(*SP(#0))
$C$DW$79 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$79, DW_AT_low_pc(0x00)
.dwattr $C$DW$79, DW_AT_name("_printf")
.dwattr $C$DW$79, DW_AT_TI_call
CALL #_printf ; |333|
; call occurs [#_printf] ; |333|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 334,column 9,is_stmt
MOV #-1, T0
B $C$L22 ; |334|
; branch occurs ; |334|
$C$L17:
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 338,column 3,is_stmt
AMOV #$C$FSL22, XAR3 ; |338|
MOV XAR3, dbl(*SP(#0))
$C$DW$80 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$80, DW_AT_low_pc(0x00)
.dwattr $C$DW$80, DW_AT_name("_printf")
.dwattr $C$DW$80, DW_AT_TI_call
CALL #_printf ; |338|
; call occurs [#_printf] ; |338|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 342,column 2,is_stmt
MOV *SP(#3), AR1 ; |342|
MOV *SP(#9), AR2 ; |342|
CMPU AR2 != AR1, TC1 ; |342|
BCC $C$L18,TC1 ; |342|
; branchcc occurs ; |342|
MOV *SP(#4), AR1 ; |342|
MOV *SP(#10), AR2 ; |342|
CMPU AR2 != AR1, TC1 ; |342|
BCC $C$L18,TC1 ; |342|
; branchcc occurs ; |342|
MOV *SP(#7), AR1 ; |342|
MOV *SP(#13), AR2 ; |342|
CMPU AR2 != AR1, TC1 ; |342|
BCC $C$L18,TC1 ; |342|
; branchcc occurs ; |342|
MOV *SP(#8), AR1 ; |342|
MOV *SP(#14), AR2 ; |342|
CMPU AR2 != AR1, TC1 ; |342|
BCC $C$L18,TC1 ; |342|
; branchcc occurs ; |342|
MOV *SP(#5), AR1 ; |342|
MOV *SP(#11), AR2 ; |342|
CMPU AR2 != AR1, TC1 ; |342|
BCC $C$L18,TC1 ; |342|
; branchcc occurs ; |342|
MOV *SP(#6), AR1 ; |342|
MOV *SP(#12), AR2 ; |342|
CMPU AR2 == AR1, TC1 ; |342|
BCC $C$L19,TC1 ; |342|
; branchcc occurs ; |342|
$C$L18:
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 349,column 3,is_stmt
AMOV #$C$FSL23, XAR3 ; |349|
MOV XAR3, dbl(*SP(#0))
$C$DW$81 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$81, DW_AT_low_pc(0x00)
.dwattr $C$DW$81, DW_AT_name("_printf")
.dwattr $C$DW$81, DW_AT_TI_call
CALL #_printf ; |349|
; call occurs [#_printf] ; |349|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 352,column 9,is_stmt
MOV #0, *(#_PaSs_StAtE) ; |352|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 354,column 2,is_stmt
B $C$L20 ; |354|
; branch occurs ; |354|
$C$L19:
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 357,column 3,is_stmt
AMOV #$C$FSL24, XAR3 ; |357|
MOV XAR3, dbl(*SP(#0))
$C$DW$82 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$82, DW_AT_low_pc(0x00)
.dwattr $C$DW$82, DW_AT_name("_printf")
.dwattr $C$DW$82, DW_AT_TI_call
CALL #_printf ; |357|
; call occurs [#_printf] ; |357|
$C$L20:
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 361,column 5,is_stmt
MOV dbl(*(#_hGpio)), XAR0
$C$DW$83 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$83, DW_AT_low_pc(0x00)
.dwattr $C$DW$83, DW_AT_name("_GPIO_close")
.dwattr $C$DW$83, DW_AT_TI_call
CALL #_GPIO_close ; |361|
; call occurs [#_GPIO_close] ; |361|
MOV T0, *SP(#2) ; |361|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 362,column 5,is_stmt
MOV T0, AR1
|| MOV #0, AR2
CMP AR2 == AR1, TC1 ; |362|
BCC $C$L21,TC1 ; |362|
; branchcc occurs ; |362|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 364,column 9,is_stmt
AMOV #$C$FSL18, XAR3 ; |364|
MOV XAR3, dbl(*SP(#0))
$C$DW$84 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$84, DW_AT_low_pc(0x00)
.dwattr $C$DW$84, DW_AT_name("_printf")
.dwattr $C$DW$84, DW_AT_TI_call
CALL #_printf ; |364|
; call occurs [#_printf] ; |364|
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 365,column 9,is_stmt
MOV #-1, T0
B $C$L22 ; |365|
; branch occurs ; |365|
$C$L21:
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 368,column 5,is_stmt
MOV #0, T0
$C$L22:
.dwpsn file "../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c",line 369,column 1,is_stmt
AADD #15, SP
.dwcfi cfa_offset, 1
$C$DW$85 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$85, DW_AT_low_pc(0x00)
.dwattr $C$DW$85, DW_AT_TI_return
RET
; return occurs
.dwattr $C$DW$67, DW_AT_TI_end_file("../c5535_bsl_revc/ezdsp5535_v1/c55xx_csl/ccs_v4.0_examples/gpio/CSL_GPIO_OutputPinExample/gpio_Output_Pin_Example.c")
.dwattr $C$DW$67, DW_AT_TI_end_line(0x171)
.dwattr $C$DW$67, DW_AT_TI_end_column(0x01)
.dwendentry
.dwendtag $C$DW$67
;*******************************************************************************
;* FAR STRINGS *
;*******************************************************************************
.sect ".const:.string"
.align 2
$C$FSL1: .string "CSL GPIO TESTS!",10,10,0
.align 2
$C$FSL2: .string "GPIO Output Pin Test!",10,0
.align 2
$C$FSL3: .string "GPIO Output Pin Test Passed!!",10,0
.align 2
$C$FSL4: .string "GPIO Output Pin Test Failed!!",10,0
.align 2
$C$FSL5: .string 10,"GPIO Configuration Test!",10,0
.align 2
$C$FSL6: .string "GPIO Configuration Test Passed!!",10,0
.align 2
$C$FSL7: .string "GPIO Configuration Test Failed!!",10,0
.align 2
$C$FSL8: .string 10,"CSL GPIO TESTS COMPLETED!!",10,10,0
.align 2
$C$FSL9: .string "GPIO_open failed",10,0
.align 2
$C$FSL10: .string "GPIO_open Successful",10,0
.align 2
$C$FSL11: .string "GPIO_configBit failed",10,0
.align 2
$C$FSL12: .string "GPIO_write Failed",10,0
.align 2
$C$FSL13: .string "GPIO_write Successful",10,0
.align 2
$C$FSL14: .string "GPIO_read failed",10,0
.align 2
$C$FSL15: .string "GPIO_read Successful",10,0
.align 2
$C$FSL16: .string "Data read is same as data written",10,0
.align 2
$C$FSL17: .string "Data read is not same as data written ",10,0
.align 2
$C$FSL18: .string "GPIO_close failed",10,0
.align 2
$C$FSL19: .string "GPIO_config failed",10,0
.align 2
$C$FSL20: .string "GPIO_config Successful",10,0
.align 2
$C$FSL21: .string "GPIO_getConfig failed",10,0
.align 2
$C$FSL22: .string "GPIO_getConfig Successful",10,0
.align 2
$C$FSL23: .string "Configuration Comparison Failed",10,0
.align 2
$C$FSL24: .string "Configuration Comparison Successful",10,0
;******************************************************************************
;* UNDEFINED EXTERNAL REFERENCES *
;******************************************************************************
.global _GPIO_open
.global _GPIO_close
.global _GPIO_config
.global _GPIO_getConfig
.global _GPIO_read
.global _GPIO_write
.global _GPIO_reset
.global _GPIO_configBit
.global _printf
;*******************************************************************************
;* TYPE INFORMATION *
;*******************************************************************************
$C$DW$T$30 .dwtag DW_TAG_enumeration_type
.dwattr $C$DW$T$30, DW_AT_byte_size(0x01)
$C$DW$86 .dwtag DW_TAG_enumerator, DW_AT_name("CSL_GPIO_PIN0"), DW_AT_const_value(0x00)
$C$DW$87 .dwtag DW_TAG_enumerator, DW_AT_name("CSL_GPIO_PIN1"), DW_AT_const_value(0x01)
$C$DW$88 .dwtag DW_TAG_enumerator, DW_AT_name("CSL_GPIO_PIN2"), DW_AT_const_value(0x02)
$C$DW$89 .dwtag DW_TAG_enumerator, DW_AT_name("CSL_GPIO_PIN3"), DW_AT_const_value(0x03)
$C$DW$90 .dwtag DW_TAG_enumerator, DW_AT_name("CSL_GPIO_PIN4"), DW_AT_const_value(0x04)
$C$DW$91 .dwtag DW_TAG_enumerator, DW_AT_name("CSL_GPIO_PIN5"), DW_AT_const_value(0x05)
$C$DW$92 .dwtag DW_TAG_enumerator, DW_AT_name("CSL_GPIO_PIN6"), DW_AT_const_value(0x06)
$C$DW$93 .dwtag DW_TAG_enumerator, DW_AT_name("CSL_GPIO_PIN7"), DW_AT_const_value(0x07)
$C$DW$94 .dwtag DW_TAG_enumerator, DW_AT_name("CSL_GPIO_PIN8"), DW_AT_const_value(0x08)
$C$DW$95 .dwtag DW_TAG_enumerator, DW_AT_name("CSL_GPIO_PIN9"), DW_AT_const_value(0x09)
$C$DW$96 .dwtag DW_TAG_enumerator, DW_AT_name("CSL_GPIO_PIN10"), DW_AT_const_value(0x0a)
$C$DW$97 .dwtag DW_TAG_enumerator, DW_AT_name("CSL_GPIO_PIN11"), DW_AT_const_value(0x0b)
$C$DW$98 .dwtag DW_TAG_enumerator, DW_AT_name("CSL_GPIO_PIN12"), DW_AT_const_value(0x0c)
$C$DW$99 .dwtag DW_TAG_enumerator, DW_AT_name("CSL_GPIO_PIN13"), DW_AT_const_value(0x0d)
$C$DW$100 .dwtag DW_TAG_enumerator, DW_AT_name("CSL_GPIO_PIN14"), DW_AT_const_value(0x0e)
$C$DW$101 .dwtag DW_TAG_enumerator, DW_AT_name("CSL_GPIO_PIN15"), DW_AT_const_value(0x0f)
$C$DW$102 .dwtag DW_TAG_enumerator, DW_AT_name("CSL_GPIO_PIN16"), DW_AT_const_value(0x10)
$C$DW$103 .dwtag DW_TAG_enumerator, DW_AT_name("CSL_GPIO_PIN17"), DW_AT_const_value(0x11)
$C$DW$104 .dwtag DW_TAG_enumerator, DW_AT_name("CSL_GPIO_PIN18"), DW_AT_const_value(0x12)
$C$DW$105 .dwtag DW_TAG_enumerator, DW_AT_name("CSL_GPIO_PIN19"), DW_AT_const_value(0x13)
$C$DW$106 .dwtag DW_TAG_enumerator, DW_AT_name("CSL_GPIO_PIN20"), DW_AT_const_value(0x14)
$C$DW$107 .dwtag DW_TAG_enumerator, DW_AT_name("CSL_GPIO_PIN21"), DW_AT_const_value(0x15)
$C$DW$108 .dwtag DW_TAG_enumerator, DW_AT_name("CSL_GPIO_PIN22"), DW_AT_const_value(0x16)
$C$DW$109 .dwtag DW_TAG_enumerator, DW_AT_name("CSL_GPIO_PIN23"), DW_AT_const_value(0x17)
$C$DW$110 .dwtag DW_TAG_enumerator, DW_AT_name("CSL_GPIO_PIN24"), DW_AT_const_value(0x18)
$C$DW$111 .dwtag DW_TAG_enumerator, DW_AT_name("CSL_GPIO_PIN25"), DW_AT_const_value(0x19)
$C$DW$112 .dwtag DW_TAG_enumerator, DW_AT_name("CSL_GPIO_PIN26"), DW_AT_const_value(0x1a)
$C$DW$113 .dwtag DW_TAG_enumerator, DW_AT_name("CSL_GPIO_PIN27"), DW_AT_const_value(0x1b)
$C$DW$114 .dwtag DW_TAG_enumerator, DW_AT_name("CSL_GPIO_PIN28"), DW_AT_const_value(0x1c)
$C$DW$115 .dwtag DW_TAG_enumerator, DW_AT_name("CSL_GPIO_PIN29"), DW_AT_const_value(0x1d)
$C$DW$116 .dwtag DW_TAG_enumerator, DW_AT_name("CSL_GPIO_PIN30"), DW_AT_const_value(0x1e)
$C$DW$117 .dwtag DW_TAG_enumerator, DW_AT_name("CSL_GPIO_PIN31"), DW_AT_const_value(0x1f)
.dwendtag $C$DW$T$30
$C$DW$T$31 .dwtag DW_TAG_typedef, DW_AT_name("CSL_GpioPinNum")
.dwattr $C$DW$T$31, DW_AT_type(*$C$DW$T$30)
.dwattr $C$DW$T$31, DW_AT_language(DW_LANG_C)
$C$DW$T$32 .dwtag DW_TAG_enumeration_type
.dwattr $C$DW$T$32, DW_AT_byte_size(0x01)
$C$DW$118 .dwtag DW_TAG_enumerator, DW_AT_name("CSL_GPIO_DIR_INPUT"), DW_AT_const_value(0x00)
$C$DW$119 .dwtag DW_TAG_enumerator, DW_AT_name("CSL_GPIO_DIR_OUTPUT"), DW_AT_const_value(0x01)
.dwendtag $C$DW$T$32
$C$DW$T$33 .dwtag DW_TAG_typedef, DW_AT_name("CSL_GpioDirection")
.dwattr $C$DW$T$33, DW_AT_type(*$C$DW$T$32)
.dwattr $C$DW$T$33, DW_AT_language(DW_LANG_C)
$C$DW$T$34 .dwtag DW_TAG_enumeration_type
.dwattr $C$DW$T$34, DW_AT_byte_size(0x01)
$C$DW$120 .dwtag DW_TAG_enumerator, DW_AT_name("CSL_GPIO_TRIG_RISING_EDGE"), DW_AT_const_value(0x00)
$C$DW$121 .dwtag DW_TAG_enumerator, DW_AT_name("CSL_GPIO_TRIG_FALLING_EDGE"), DW_AT_const_value(0x01)
$C$DW$122 .dwtag DW_TAG_enumerator, DW_AT_name("CSL_GPIO_TRIG_CLEAR_EDGE"), DW_AT_const_value(0x02)
.dwendtag $C$DW$T$34
$C$DW$T$35 .dwtag DW_TAG_typedef, DW_AT_name("CSL_GpioTriggerType")
.dwattr $C$DW$T$35, DW_AT_type(*$C$DW$T$34)
.dwattr $C$DW$T$35, DW_AT_language(DW_LANG_C)
$C$DW$T$22 .dwtag DW_TAG_structure_type
.dwattr $C$DW$T$22, DW_AT_byte_size(0x12)
$C$DW$123 .dwtag DW_TAG_member
.dwattr $C$DW$123, DW_AT_type(*$C$DW$T$21)
.dwattr $C$DW$123, DW_AT_name("RSVD0")
.dwattr $C$DW$123, DW_AT_TI_symbol_name("_RSVD0")
.dwattr $C$DW$123, DW_AT_data_member_location[DW_OP_plus_uconst 0x0]
.dwattr $C$DW$123, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$124 .dwtag DW_TAG_member
.dwattr $C$DW$124, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$124, DW_AT_name("IODIR1")
.dwattr $C$DW$124, DW_AT_TI_symbol_name("_IODIR1")
.dwattr $C$DW$124, DW_AT_data_member_location[DW_OP_plus_uconst 0x6]
.dwattr $C$DW$124, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$125 .dwtag DW_TAG_member
.dwattr $C$DW$125, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$125, DW_AT_name("IODIR2")
.dwattr $C$DW$125, DW_AT_TI_symbol_name("_IODIR2")
.dwattr $C$DW$125, DW_AT_data_member_location[DW_OP_plus_uconst 0x7]
.dwattr $C$DW$125, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$126 .dwtag DW_TAG_member
.dwattr $C$DW$126, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$126, DW_AT_name("IOINDATA1")
.dwattr $C$DW$126, DW_AT_TI_symbol_name("_IOINDATA1")
.dwattr $C$DW$126, DW_AT_data_member_location[DW_OP_plus_uconst 0x8]
.dwattr $C$DW$126, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$127 .dwtag DW_TAG_member
.dwattr $C$DW$127, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$127, DW_AT_name("IOINDATA2")
.dwattr $C$DW$127, DW_AT_TI_symbol_name("_IOINDATA2")
.dwattr $C$DW$127, DW_AT_data_member_location[DW_OP_plus_uconst 0x9]
.dwattr $C$DW$127, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$128 .dwtag DW_TAG_member
.dwattr $C$DW$128, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$128, DW_AT_name("IOOUTDATA1")
.dwattr $C$DW$128, DW_AT_TI_symbol_name("_IOOUTDATA1")
.dwattr $C$DW$128, DW_AT_data_member_location[DW_OP_plus_uconst 0xa]
.dwattr $C$DW$128, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$129 .dwtag DW_TAG_member
.dwattr $C$DW$129, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$129, DW_AT_name("IOOUTDATA2")
.dwattr $C$DW$129, DW_AT_TI_symbol_name("_IOOUTDATA2")
.dwattr $C$DW$129, DW_AT_data_member_location[DW_OP_plus_uconst 0xb]
.dwattr $C$DW$129, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$130 .dwtag DW_TAG_member
.dwattr $C$DW$130, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$130, DW_AT_name("IOINTEDG1")
.dwattr $C$DW$130, DW_AT_TI_symbol_name("_IOINTEDG1")
.dwattr $C$DW$130, DW_AT_data_member_location[DW_OP_plus_uconst 0xc]
.dwattr $C$DW$130, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$131 .dwtag DW_TAG_member
.dwattr $C$DW$131, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$131, DW_AT_name("IOINTEDG2")
.dwattr $C$DW$131, DW_AT_TI_symbol_name("_IOINTEDG2")
.dwattr $C$DW$131, DW_AT_data_member_location[DW_OP_plus_uconst 0xd]
.dwattr $C$DW$131, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$132 .dwtag DW_TAG_member
.dwattr $C$DW$132, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$132, DW_AT_name("IOINTEN1")
.dwattr $C$DW$132, DW_AT_TI_symbol_name("_IOINTEN1")
.dwattr $C$DW$132, DW_AT_data_member_location[DW_OP_plus_uconst 0xe]
.dwattr $C$DW$132, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$133 .dwtag DW_TAG_member
.dwattr $C$DW$133, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$133, DW_AT_name("IOINTEN2")
.dwattr $C$DW$133, DW_AT_TI_symbol_name("_IOINTEN2")
.dwattr $C$DW$133, DW_AT_data_member_location[DW_OP_plus_uconst 0xf]
.dwattr $C$DW$133, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$134 .dwtag DW_TAG_member
.dwattr $C$DW$134, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$134, DW_AT_name("IOINTFLG1")
.dwattr $C$DW$134, DW_AT_TI_symbol_name("_IOINTFLG1")
.dwattr $C$DW$134, DW_AT_data_member_location[DW_OP_plus_uconst 0x10]
.dwattr $C$DW$134, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$135 .dwtag DW_TAG_member
.dwattr $C$DW$135, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$135, DW_AT_name("IOINTFLG2")
.dwattr $C$DW$135, DW_AT_TI_symbol_name("_IOINTFLG2")
.dwattr $C$DW$135, DW_AT_data_member_location[DW_OP_plus_uconst 0x11]
.dwattr $C$DW$135, DW_AT_accessibility(DW_ACCESS_public)
.dwendtag $C$DW$T$22
$C$DW$T$23 .dwtag DW_TAG_typedef, DW_AT_name("CSL_GpioRegs")
.dwattr $C$DW$T$23, DW_AT_type(*$C$DW$T$22)
.dwattr $C$DW$T$23, DW_AT_language(DW_LANG_C)
$C$DW$136 .dwtag DW_TAG_TI_far_type
.dwattr $C$DW$136, DW_AT_type(*$C$DW$T$23)
$C$DW$137 .dwtag DW_TAG_TI_ioport_type
.dwattr $C$DW$137, DW_AT_type(*$C$DW$136)
$C$DW$T$24 .dwtag DW_TAG_volatile_type
.dwattr $C$DW$T$24, DW_AT_type(*$C$DW$137)
$C$DW$T$25 .dwtag DW_TAG_pointer_type
.dwattr $C$DW$T$25, DW_AT_type(*$C$DW$T$24)
.dwattr $C$DW$T$25, DW_AT_address_class(0x10)
$C$DW$T$26 .dwtag DW_TAG_typedef, DW_AT_name("CSL_GpioRegsOvly")
.dwattr $C$DW$T$26, DW_AT_type(*$C$DW$T$25)
.dwattr $C$DW$T$26, DW_AT_language(DW_LANG_C)
$C$DW$T$28 .dwtag DW_TAG_structure_type
.dwattr $C$DW$T$28, DW_AT_byte_size(0x02)
$C$DW$138 .dwtag DW_TAG_member
.dwattr $C$DW$138, DW_AT_type(*$C$DW$T$26)
.dwattr $C$DW$138, DW_AT_name("baseAddr")
.dwattr $C$DW$138, DW_AT_TI_symbol_name("_baseAddr")
.dwattr $C$DW$138, DW_AT_data_member_location[DW_OP_plus_uconst 0x0]
.dwattr $C$DW$138, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$139 .dwtag DW_TAG_member
.dwattr $C$DW$139, DW_AT_type(*$C$DW$T$27)
.dwattr $C$DW$139, DW_AT_name("numPins")
.dwattr $C$DW$139, DW_AT_TI_symbol_name("_numPins")
.dwattr $C$DW$139, DW_AT_data_member_location[DW_OP_plus_uconst 0x1]
.dwattr $C$DW$139, DW_AT_accessibility(DW_ACCESS_public)
.dwendtag $C$DW$T$28
$C$DW$T$41 .dwtag DW_TAG_typedef, DW_AT_name("CSL_GpioObj")
.dwattr $C$DW$T$41, DW_AT_type(*$C$DW$T$28)
.dwattr $C$DW$T$41, DW_AT_language(DW_LANG_C)
$C$DW$T$42 .dwtag DW_TAG_pointer_type
.dwattr $C$DW$T$42, DW_AT_type(*$C$DW$T$41)
.dwattr $C$DW$T$42, DW_AT_address_class(0x17)
$C$DW$T$43 .dwtag DW_TAG_typedef, DW_AT_name("GPIO_Handle")
.dwattr $C$DW$T$43, DW_AT_type(*$C$DW$T$42)
.dwattr $C$DW$T$43, DW_AT_language(DW_LANG_C)
$C$DW$T$29 .dwtag DW_TAG_structure_type
.dwattr $C$DW$T$29, DW_AT_byte_size(0x06)
$C$DW$140 .dwtag DW_TAG_member
.dwattr $C$DW$140, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$140, DW_AT_name("GPIODIRL")
.dwattr $C$DW$140, DW_AT_TI_symbol_name("_GPIODIRL")
.dwattr $C$DW$140, DW_AT_data_member_location[DW_OP_plus_uconst 0x0]
.dwattr $C$DW$140, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$141 .dwtag DW_TAG_member
.dwattr $C$DW$141, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$141, DW_AT_name("GPIODIRH")
.dwattr $C$DW$141, DW_AT_TI_symbol_name("_GPIODIRH")
.dwattr $C$DW$141, DW_AT_data_member_location[DW_OP_plus_uconst 0x1]
.dwattr $C$DW$141, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$142 .dwtag DW_TAG_member
.dwattr $C$DW$142, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$142, DW_AT_name("GPIOINTTRIGL")
.dwattr $C$DW$142, DW_AT_TI_symbol_name("_GPIOINTTRIGL")
.dwattr $C$DW$142, DW_AT_data_member_location[DW_OP_plus_uconst 0x2]
.dwattr $C$DW$142, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$143 .dwtag DW_TAG_member
.dwattr $C$DW$143, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$143, DW_AT_name("GPIOINTTRIGH")
.dwattr $C$DW$143, DW_AT_TI_symbol_name("_GPIOINTTRIGH")
.dwattr $C$DW$143, DW_AT_data_member_location[DW_OP_plus_uconst 0x3]
.dwattr $C$DW$143, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$144 .dwtag DW_TAG_member
.dwattr $C$DW$144, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$144, DW_AT_name("GPIOINTENAL")
.dwattr $C$DW$144, DW_AT_TI_symbol_name("_GPIOINTENAL")
.dwattr $C$DW$144, DW_AT_data_member_location[DW_OP_plus_uconst 0x4]
.dwattr $C$DW$144, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$145 .dwtag DW_TAG_member
.dwattr $C$DW$145, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$145, DW_AT_name("GPIOINTENAH")
.dwattr $C$DW$145, DW_AT_TI_symbol_name("_GPIOINTENAH")
.dwattr $C$DW$145, DW_AT_data_member_location[DW_OP_plus_uconst 0x5]
.dwattr $C$DW$145, DW_AT_accessibility(DW_ACCESS_public)
.dwendtag $C$DW$T$29
$C$DW$T$49 .dwtag DW_TAG_typedef, DW_AT_name("CSL_GpioConfig")
.dwattr $C$DW$T$49, DW_AT_type(*$C$DW$T$29)
.dwattr $C$DW$T$49, DW_AT_language(DW_LANG_C)
$C$DW$T$50 .dwtag DW_TAG_pointer_type
.dwattr $C$DW$T$50, DW_AT_type(*$C$DW$T$49)
.dwattr $C$DW$T$50, DW_AT_address_class(0x17)
$C$DW$T$36 .dwtag DW_TAG_structure_type
.dwattr $C$DW$T$36, DW_AT_byte_size(0x03)
$C$DW$146 .dwtag DW_TAG_member
.dwattr $C$DW$146, DW_AT_type(*$C$DW$T$31)
.dwattr $C$DW$146, DW_AT_name("pinNum")
.dwattr $C$DW$146, DW_AT_TI_symbol_name("_pinNum")
.dwattr $C$DW$146, DW_AT_data_member_location[DW_OP_plus_uconst 0x0]
.dwattr $C$DW$146, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$147 .dwtag DW_TAG_member
.dwattr $C$DW$147, DW_AT_type(*$C$DW$T$33)
.dwattr $C$DW$147, DW_AT_name("direction")
.dwattr $C$DW$147, DW_AT_TI_symbol_name("_direction")
.dwattr $C$DW$147, DW_AT_data_member_location[DW_OP_plus_uconst 0x1]
.dwattr $C$DW$147, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$148 .dwtag DW_TAG_member
.dwattr $C$DW$148, DW_AT_type(*$C$DW$T$35)
.dwattr $C$DW$148, DW_AT_name("trigger")
.dwattr $C$DW$148, DW_AT_TI_symbol_name("_trigger")
.dwattr $C$DW$148, DW_AT_data_member_location[DW_OP_plus_uconst 0x2]
.dwattr $C$DW$148, DW_AT_accessibility(DW_ACCESS_public)
.dwendtag $C$DW$T$36
$C$DW$T$51 .dwtag DW_TAG_typedef, DW_AT_name("CSL_GpioPinConfig")
.dwattr $C$DW$T$51, DW_AT_type(*$C$DW$T$36)
.dwattr $C$DW$T$51, DW_AT_language(DW_LANG_C)
$C$DW$T$52 .dwtag DW_TAG_pointer_type
.dwattr $C$DW$T$52, DW_AT_type(*$C$DW$T$51)
.dwattr $C$DW$T$52, DW_AT_address_class(0x17)
$C$DW$T$40 .dwtag DW_TAG_structure_type
.dwattr $C$DW$T$40, DW_AT_byte_size(0x48)
$C$DW$149 .dwtag DW_TAG_member
.dwattr $C$DW$149, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$149, DW_AT_name("EBSR")
.dwattr $C$DW$149, DW_AT_TI_symbol_name("_EBSR")
.dwattr $C$DW$149, DW_AT_data_member_location[DW_OP_plus_uconst 0x0]
.dwattr $C$DW$149, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$150 .dwtag DW_TAG_member
.dwattr $C$DW$150, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$150, DW_AT_name("RSVD0")
.dwattr $C$DW$150, DW_AT_TI_symbol_name("_RSVD0")
.dwattr $C$DW$150, DW_AT_data_member_location[DW_OP_plus_uconst 0x1]
.dwattr $C$DW$150, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$151 .dwtag DW_TAG_member
.dwattr $C$DW$151, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$151, DW_AT_name("PCGCR1")
.dwattr $C$DW$151, DW_AT_TI_symbol_name("_PCGCR1")
.dwattr $C$DW$151, DW_AT_data_member_location[DW_OP_plus_uconst 0x2]
.dwattr $C$DW$151, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$152 .dwtag DW_TAG_member
.dwattr $C$DW$152, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$152, DW_AT_name("PCGCR2")
.dwattr $C$DW$152, DW_AT_TI_symbol_name("_PCGCR2")
.dwattr $C$DW$152, DW_AT_data_member_location[DW_OP_plus_uconst 0x3]
.dwattr $C$DW$152, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$153 .dwtag DW_TAG_member
.dwattr $C$DW$153, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$153, DW_AT_name("PSRCR")
.dwattr $C$DW$153, DW_AT_TI_symbol_name("_PSRCR")
.dwattr $C$DW$153, DW_AT_data_member_location[DW_OP_plus_uconst 0x4]
.dwattr $C$DW$153, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$154 .dwtag DW_TAG_member
.dwattr $C$DW$154, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$154, DW_AT_name("PRCR")
.dwattr $C$DW$154, DW_AT_TI_symbol_name("_PRCR")
.dwattr $C$DW$154, DW_AT_data_member_location[DW_OP_plus_uconst 0x5]
.dwattr $C$DW$154, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$155 .dwtag DW_TAG_member
.dwattr $C$DW$155, DW_AT_type(*$C$DW$T$37)
.dwattr $C$DW$155, DW_AT_name("RSVD1")
.dwattr $C$DW$155, DW_AT_TI_symbol_name("_RSVD1")
.dwattr $C$DW$155, DW_AT_data_member_location[DW_OP_plus_uconst 0x6]
.dwattr $C$DW$155, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$156 .dwtag DW_TAG_member
.dwattr $C$DW$156, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$156, DW_AT_name("TIAFR")
.dwattr $C$DW$156, DW_AT_TI_symbol_name("_TIAFR")
.dwattr $C$DW$156, DW_AT_data_member_location[DW_OP_plus_uconst 0x14]
.dwattr $C$DW$156, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$157 .dwtag DW_TAG_member
.dwattr $C$DW$157, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$157, DW_AT_name("RSVD2")
.dwattr $C$DW$157, DW_AT_TI_symbol_name("_RSVD2")
.dwattr $C$DW$157, DW_AT_data_member_location[DW_OP_plus_uconst 0x15]
.dwattr $C$DW$157, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$158 .dwtag DW_TAG_member
.dwattr $C$DW$158, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$158, DW_AT_name("ODSCR")
.dwattr $C$DW$158, DW_AT_TI_symbol_name("_ODSCR")
.dwattr $C$DW$158, DW_AT_data_member_location[DW_OP_plus_uconst 0x16]
.dwattr $C$DW$158, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$159 .dwtag DW_TAG_member
.dwattr $C$DW$159, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$159, DW_AT_name("PDINHIBR1")
.dwattr $C$DW$159, DW_AT_TI_symbol_name("_PDINHIBR1")
.dwattr $C$DW$159, DW_AT_data_member_location[DW_OP_plus_uconst 0x17]
.dwattr $C$DW$159, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$160 .dwtag DW_TAG_member
.dwattr $C$DW$160, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$160, DW_AT_name("PDINHIBR2")
.dwattr $C$DW$160, DW_AT_TI_symbol_name("_PDINHIBR2")
.dwattr $C$DW$160, DW_AT_data_member_location[DW_OP_plus_uconst 0x18]
.dwattr $C$DW$160, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$161 .dwtag DW_TAG_member
.dwattr $C$DW$161, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$161, DW_AT_name("PDINHIBR3")
.dwattr $C$DW$161, DW_AT_TI_symbol_name("_PDINHIBR3")
.dwattr $C$DW$161, DW_AT_data_member_location[DW_OP_plus_uconst 0x19]
.dwattr $C$DW$161, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$162 .dwtag DW_TAG_member
.dwattr $C$DW$162, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$162, DW_AT_name("DMA0CESR1")
.dwattr $C$DW$162, DW_AT_TI_symbol_name("_DMA0CESR1")
.dwattr $C$DW$162, DW_AT_data_member_location[DW_OP_plus_uconst 0x1a]
.dwattr $C$DW$162, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$163 .dwtag DW_TAG_member
.dwattr $C$DW$163, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$163, DW_AT_name("DMA0CESR2")
.dwattr $C$DW$163, DW_AT_TI_symbol_name("_DMA0CESR2")
.dwattr $C$DW$163, DW_AT_data_member_location[DW_OP_plus_uconst 0x1b]
.dwattr $C$DW$163, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$164 .dwtag DW_TAG_member
.dwattr $C$DW$164, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$164, DW_AT_name("DMA1CESR1")
.dwattr $C$DW$164, DW_AT_TI_symbol_name("_DMA1CESR1")
.dwattr $C$DW$164, DW_AT_data_member_location[DW_OP_plus_uconst 0x1c]
.dwattr $C$DW$164, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$165 .dwtag DW_TAG_member
.dwattr $C$DW$165, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$165, DW_AT_name("DMA1CESR2")
.dwattr $C$DW$165, DW_AT_TI_symbol_name("_DMA1CESR2")
.dwattr $C$DW$165, DW_AT_data_member_location[DW_OP_plus_uconst 0x1d]
.dwattr $C$DW$165, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$166 .dwtag DW_TAG_member
.dwattr $C$DW$166, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$166, DW_AT_name("SDRAMCCR")
.dwattr $C$DW$166, DW_AT_TI_symbol_name("_SDRAMCCR")
.dwattr $C$DW$166, DW_AT_data_member_location[DW_OP_plus_uconst 0x1e]
.dwattr $C$DW$166, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$167 .dwtag DW_TAG_member
.dwattr $C$DW$167, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$167, DW_AT_name("CCR2")
.dwattr $C$DW$167, DW_AT_TI_symbol_name("_CCR2")
.dwattr $C$DW$167, DW_AT_data_member_location[DW_OP_plus_uconst 0x1f]
.dwattr $C$DW$167, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$168 .dwtag DW_TAG_member
.dwattr $C$DW$168, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$168, DW_AT_name("CGCR1")
.dwattr $C$DW$168, DW_AT_TI_symbol_name("_CGCR1")
.dwattr $C$DW$168, DW_AT_data_member_location[DW_OP_plus_uconst 0x20]
.dwattr $C$DW$168, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$169 .dwtag DW_TAG_member
.dwattr $C$DW$169, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$169, DW_AT_name("CGICR")
.dwattr $C$DW$169, DW_AT_TI_symbol_name("_CGICR")
.dwattr $C$DW$169, DW_AT_data_member_location[DW_OP_plus_uconst 0x21]
.dwattr $C$DW$169, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$170 .dwtag DW_TAG_member
.dwattr $C$DW$170, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$170, DW_AT_name("CGCR2")
.dwattr $C$DW$170, DW_AT_TI_symbol_name("_CGCR2")
.dwattr $C$DW$170, DW_AT_data_member_location[DW_OP_plus_uconst 0x22]
.dwattr $C$DW$170, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$171 .dwtag DW_TAG_member
.dwattr $C$DW$171, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$171, DW_AT_name("CGOCR")
.dwattr $C$DW$171, DW_AT_TI_symbol_name("_CGOCR")
.dwattr $C$DW$171, DW_AT_data_member_location[DW_OP_plus_uconst 0x23]
.dwattr $C$DW$171, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$172 .dwtag DW_TAG_member
.dwattr $C$DW$172, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$172, DW_AT_name("CCSSR")
.dwattr $C$DW$172, DW_AT_TI_symbol_name("_CCSSR")
.dwattr $C$DW$172, DW_AT_data_member_location[DW_OP_plus_uconst 0x24]
.dwattr $C$DW$172, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$173 .dwtag DW_TAG_member
.dwattr $C$DW$173, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$173, DW_AT_name("RSVD3")
.dwattr $C$DW$173, DW_AT_TI_symbol_name("_RSVD3")
.dwattr $C$DW$173, DW_AT_data_member_location[DW_OP_plus_uconst 0x25]
.dwattr $C$DW$173, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$174 .dwtag DW_TAG_member
.dwattr $C$DW$174, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$174, DW_AT_name("ECDR")
.dwattr $C$DW$174, DW_AT_TI_symbol_name("_ECDR")
.dwattr $C$DW$174, DW_AT_data_member_location[DW_OP_plus_uconst 0x26]
.dwattr $C$DW$174, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$175 .dwtag DW_TAG_member
.dwattr $C$DW$175, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$175, DW_AT_name("RSVD4")
.dwattr $C$DW$175, DW_AT_TI_symbol_name("_RSVD4")
.dwattr $C$DW$175, DW_AT_data_member_location[DW_OP_plus_uconst 0x27]
.dwattr $C$DW$175, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$176 .dwtag DW_TAG_member
.dwattr $C$DW$176, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$176, DW_AT_name("RAMSLPMDCNTLR1")
.dwattr $C$DW$176, DW_AT_TI_symbol_name("_RAMSLPMDCNTLR1")
.dwattr $C$DW$176, DW_AT_data_member_location[DW_OP_plus_uconst 0x28]
.dwattr $C$DW$176, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$177 .dwtag DW_TAG_member
.dwattr $C$DW$177, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$177, DW_AT_name("RSVD5")
.dwattr $C$DW$177, DW_AT_TI_symbol_name("_RSVD5")
.dwattr $C$DW$177, DW_AT_data_member_location[DW_OP_plus_uconst 0x29]
.dwattr $C$DW$177, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$178 .dwtag DW_TAG_member
.dwattr $C$DW$178, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$178, DW_AT_name("RAMSLPMDCNTLR2")
.dwattr $C$DW$178, DW_AT_TI_symbol_name("_RAMSLPMDCNTLR2")
.dwattr $C$DW$178, DW_AT_data_member_location[DW_OP_plus_uconst 0x2a]
.dwattr $C$DW$178, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$179 .dwtag DW_TAG_member
.dwattr $C$DW$179, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$179, DW_AT_name("RAMSLPMDCNTLR3")
.dwattr $C$DW$179, DW_AT_TI_symbol_name("_RAMSLPMDCNTLR3")
.dwattr $C$DW$179, DW_AT_data_member_location[DW_OP_plus_uconst 0x2b]
.dwattr $C$DW$179, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$180 .dwtag DW_TAG_member
.dwattr $C$DW$180, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$180, DW_AT_name("RAMSLPMDCNTLR4")
.dwattr $C$DW$180, DW_AT_TI_symbol_name("_RAMSLPMDCNTLR4")
.dwattr $C$DW$180, DW_AT_data_member_location[DW_OP_plus_uconst 0x2c]
.dwattr $C$DW$180, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$181 .dwtag DW_TAG_member
.dwattr $C$DW$181, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$181, DW_AT_name("RAMSLPMDCNTLR5")
.dwattr $C$DW$181, DW_AT_TI_symbol_name("_RAMSLPMDCNTLR5")
.dwattr $C$DW$181, DW_AT_data_member_location[DW_OP_plus_uconst 0x2d]
.dwattr $C$DW$181, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$182 .dwtag DW_TAG_member
.dwattr $C$DW$182, DW_AT_type(*$C$DW$T$38)
.dwattr $C$DW$182, DW_AT_name("RSVD6")
.dwattr $C$DW$182, DW_AT_TI_symbol_name("_RSVD6")
.dwattr $C$DW$182, DW_AT_data_member_location[DW_OP_plus_uconst 0x2e]
.dwattr $C$DW$182, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$183 .dwtag DW_TAG_member
.dwattr $C$DW$183, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$183, DW_AT_name("DMAIFR")
.dwattr $C$DW$183, DW_AT_TI_symbol_name("_DMAIFR")
.dwattr $C$DW$183, DW_AT_data_member_location[DW_OP_plus_uconst 0x30]
.dwattr $C$DW$183, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$184 .dwtag DW_TAG_member
.dwattr $C$DW$184, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$184, DW_AT_name("DMAIER")
.dwattr $C$DW$184, DW_AT_TI_symbol_name("_DMAIER")
.dwattr $C$DW$184, DW_AT_data_member_location[DW_OP_plus_uconst 0x31]
.dwattr $C$DW$184, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$185 .dwtag DW_TAG_member
.dwattr $C$DW$185, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$185, DW_AT_name("USBSCR")
.dwattr $C$DW$185, DW_AT_TI_symbol_name("_USBSCR")
.dwattr $C$DW$185, DW_AT_data_member_location[DW_OP_plus_uconst 0x32]
.dwattr $C$DW$185, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$186 .dwtag DW_TAG_member
.dwattr $C$DW$186, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$186, DW_AT_name("ESCR")
.dwattr $C$DW$186, DW_AT_TI_symbol_name("_ESCR")
.dwattr $C$DW$186, DW_AT_data_member_location[DW_OP_plus_uconst 0x33]
.dwattr $C$DW$186, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$187 .dwtag DW_TAG_member
.dwattr $C$DW$187, DW_AT_type(*$C$DW$T$38)
.dwattr $C$DW$187, DW_AT_name("RSVD7")
.dwattr $C$DW$187, DW_AT_TI_symbol_name("_RSVD7")
.dwattr $C$DW$187, DW_AT_data_member_location[DW_OP_plus_uconst 0x34]
.dwattr $C$DW$187, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$188 .dwtag DW_TAG_member
.dwattr $C$DW$188, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$188, DW_AT_name("DMA2CESR1")
.dwattr $C$DW$188, DW_AT_TI_symbol_name("_DMA2CESR1")
.dwattr $C$DW$188, DW_AT_data_member_location[DW_OP_plus_uconst 0x36]
.dwattr $C$DW$188, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$189 .dwtag DW_TAG_member
.dwattr $C$DW$189, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$189, DW_AT_name("DMA2CESR2")
.dwattr $C$DW$189, DW_AT_TI_symbol_name("_DMA2CESR2")
.dwattr $C$DW$189, DW_AT_data_member_location[DW_OP_plus_uconst 0x37]
.dwattr $C$DW$189, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$190 .dwtag DW_TAG_member
.dwattr $C$DW$190, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$190, DW_AT_name("DMA3CESR1")
.dwattr $C$DW$190, DW_AT_TI_symbol_name("_DMA3CESR1")
.dwattr $C$DW$190, DW_AT_data_member_location[DW_OP_plus_uconst 0x38]
.dwattr $C$DW$190, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$191 .dwtag DW_TAG_member
.dwattr $C$DW$191, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$191, DW_AT_name("DMA3CESR2")
.dwattr $C$DW$191, DW_AT_TI_symbol_name("_DMA3CESR2")
.dwattr $C$DW$191, DW_AT_data_member_location[DW_OP_plus_uconst 0x39]
.dwattr $C$DW$191, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$192 .dwtag DW_TAG_member
.dwattr $C$DW$192, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$192, DW_AT_name("CLKSTOP")
.dwattr $C$DW$192, DW_AT_TI_symbol_name("_CLKSTOP")
.dwattr $C$DW$192, DW_AT_data_member_location[DW_OP_plus_uconst 0x3a]
.dwattr $C$DW$192, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$193 .dwtag DW_TAG_member
.dwattr $C$DW$193, DW_AT_type(*$C$DW$T$39)
.dwattr $C$DW$193, DW_AT_name("RSVD8")
.dwattr $C$DW$193, DW_AT_TI_symbol_name("_RSVD8")
.dwattr $C$DW$193, DW_AT_data_member_location[DW_OP_plus_uconst 0x3b]
.dwattr $C$DW$193, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$194 .dwtag DW_TAG_member
.dwattr $C$DW$194, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$194, DW_AT_name("DIEIDR0")
.dwattr $C$DW$194, DW_AT_TI_symbol_name("_DIEIDR0")
.dwattr $C$DW$194, DW_AT_data_member_location[DW_OP_plus_uconst 0x40]
.dwattr $C$DW$194, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$195 .dwtag DW_TAG_member
.dwattr $C$DW$195, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$195, DW_AT_name("DIEIDR1")
.dwattr $C$DW$195, DW_AT_TI_symbol_name("_DIEIDR1")
.dwattr $C$DW$195, DW_AT_data_member_location[DW_OP_plus_uconst 0x41]
.dwattr $C$DW$195, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$196 .dwtag DW_TAG_member
.dwattr $C$DW$196, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$196, DW_AT_name("DIEIDR2")
.dwattr $C$DW$196, DW_AT_TI_symbol_name("_DIEIDR2")
.dwattr $C$DW$196, DW_AT_data_member_location[DW_OP_plus_uconst 0x42]
.dwattr $C$DW$196, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$197 .dwtag DW_TAG_member
.dwattr $C$DW$197, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$197, DW_AT_name("DIEIDR3")
.dwattr $C$DW$197, DW_AT_TI_symbol_name("_DIEIDR3")
.dwattr $C$DW$197, DW_AT_data_member_location[DW_OP_plus_uconst 0x43]
.dwattr $C$DW$197, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$198 .dwtag DW_TAG_member
.dwattr $C$DW$198, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$198, DW_AT_name("DIEIDR4")
.dwattr $C$DW$198, DW_AT_TI_symbol_name("_DIEIDR4")
.dwattr $C$DW$198, DW_AT_data_member_location[DW_OP_plus_uconst 0x44]
.dwattr $C$DW$198, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$199 .dwtag DW_TAG_member
.dwattr $C$DW$199, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$199, DW_AT_name("DIEIDR5")
.dwattr $C$DW$199, DW_AT_TI_symbol_name("_DIEIDR5")
.dwattr $C$DW$199, DW_AT_data_member_location[DW_OP_plus_uconst 0x45]
.dwattr $C$DW$199, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$200 .dwtag DW_TAG_member
.dwattr $C$DW$200, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$200, DW_AT_name("DIEIDR6")
.dwattr $C$DW$200, DW_AT_TI_symbol_name("_DIEIDR6")
.dwattr $C$DW$200, DW_AT_data_member_location[DW_OP_plus_uconst 0x46]
.dwattr $C$DW$200, DW_AT_accessibility(DW_ACCESS_public)
$C$DW$201 .dwtag DW_TAG_member
.dwattr $C$DW$201, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$201, DW_AT_name("DIEIDR7")
.dwattr $C$DW$201, DW_AT_TI_symbol_name("_DIEIDR7")
.dwattr $C$DW$201, DW_AT_data_member_location[DW_OP_plus_uconst 0x47]
.dwattr $C$DW$201, DW_AT_accessibility(DW_ACCESS_public)
.dwendtag $C$DW$T$40
$C$DW$T$53 .dwtag DW_TAG_typedef, DW_AT_name("CSL_SysRegs")
.dwattr $C$DW$T$53, DW_AT_type(*$C$DW$T$40)
.dwattr $C$DW$T$53, DW_AT_language(DW_LANG_C)
$C$DW$202 .dwtag DW_TAG_TI_far_type
.dwattr $C$DW$202, DW_AT_type(*$C$DW$T$53)
$C$DW$203 .dwtag DW_TAG_TI_ioport_type
.dwattr $C$DW$203, DW_AT_type(*$C$DW$202)
$C$DW$T$54 .dwtag DW_TAG_volatile_type
.dwattr $C$DW$T$54, DW_AT_type(*$C$DW$203)
$C$DW$T$55 .dwtag DW_TAG_pointer_type
.dwattr $C$DW$T$55, DW_AT_type(*$C$DW$T$54)
.dwattr $C$DW$T$55, DW_AT_address_class(0x10)
$C$DW$T$56 .dwtag DW_TAG_typedef, DW_AT_name("CSL_SysRegsOvly")
.dwattr $C$DW$T$56, DW_AT_type(*$C$DW$T$55)
.dwattr $C$DW$T$56, DW_AT_language(DW_LANG_C)
$C$DW$T$4 .dwtag DW_TAG_base_type
.dwattr $C$DW$T$4, DW_AT_encoding(DW_ATE_boolean)
.dwattr $C$DW$T$4, DW_AT_name("bool")
.dwattr $C$DW$T$4, DW_AT_byte_size(0x01)
$C$DW$T$5 .dwtag DW_TAG_base_type
.dwattr $C$DW$T$5, DW_AT_encoding(DW_ATE_signed_char)
.dwattr $C$DW$T$5, DW_AT_name("signed char")
.dwattr $C$DW$T$5, DW_AT_byte_size(0x01)
$C$DW$T$6 .dwtag DW_TAG_base_type
.dwattr $C$DW$T$6, DW_AT_encoding(DW_ATE_unsigned_char)
.dwattr $C$DW$T$6, DW_AT_name("unsigned char")
.dwattr $C$DW$T$6, DW_AT_byte_size(0x01)
$C$DW$T$27 .dwtag DW_TAG_typedef, DW_AT_name("Uint8")
.dwattr $C$DW$T$27, DW_AT_type(*$C$DW$T$6)
.dwattr $C$DW$T$27, DW_AT_language(DW_LANG_C)
$C$DW$T$7 .dwtag DW_TAG_base_type
.dwattr $C$DW$T$7, DW_AT_encoding(DW_ATE_signed_char)
.dwattr $C$DW$T$7, DW_AT_name("wchar_t")
.dwattr $C$DW$T$7, DW_AT_byte_size(0x01)
$C$DW$T$8 .dwtag DW_TAG_base_type
.dwattr $C$DW$T$8, DW_AT_encoding(DW_ATE_signed)
.dwattr $C$DW$T$8, DW_AT_name("short")
.dwattr $C$DW$T$8, DW_AT_byte_size(0x01)
$C$DW$T$44 .dwtag DW_TAG_typedef, DW_AT_name("Int16")
.dwattr $C$DW$T$44, DW_AT_type(*$C$DW$T$8)
.dwattr $C$DW$T$44, DW_AT_language(DW_LANG_C)
$C$DW$T$45 .dwtag DW_TAG_typedef, DW_AT_name("CSL_Status")
.dwattr $C$DW$T$45, DW_AT_type(*$C$DW$T$44)
.dwattr $C$DW$T$45, DW_AT_language(DW_LANG_C)
$C$DW$T$46 .dwtag DW_TAG_pointer_type
.dwattr $C$DW$T$46, DW_AT_type(*$C$DW$T$45)
.dwattr $C$DW$T$46, DW_AT_address_class(0x17)
$C$DW$204 .dwtag DW_TAG_TI_far_type
.dwattr $C$DW$204, DW_AT_type(*$C$DW$T$44)
$C$DW$T$69 .dwtag DW_TAG_volatile_type
.dwattr $C$DW$T$69, DW_AT_type(*$C$DW$204)
$C$DW$T$9 .dwtag DW_TAG_base_type
.dwattr $C$DW$T$9, DW_AT_encoding(DW_ATE_unsigned)
.dwattr $C$DW$T$9, DW_AT_name("unsigned short")
.dwattr $C$DW$T$9, DW_AT_byte_size(0x01)
$C$DW$T$19 .dwtag DW_TAG_typedef, DW_AT_name("Uint16")
.dwattr $C$DW$T$19, DW_AT_type(*$C$DW$T$9)
.dwattr $C$DW$T$19, DW_AT_language(DW_LANG_C)
$C$DW$205 .dwtag DW_TAG_TI_far_type
.dwattr $C$DW$205, DW_AT_type(*$C$DW$T$19)
$C$DW$T$20 .dwtag DW_TAG_volatile_type
.dwattr $C$DW$T$20, DW_AT_type(*$C$DW$205)
$C$DW$T$21 .dwtag DW_TAG_array_type
.dwattr $C$DW$T$21, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$T$21, DW_AT_language(DW_LANG_C)
.dwattr $C$DW$T$21, DW_AT_byte_size(0x06)
$C$DW$206 .dwtag DW_TAG_subrange_type
.dwattr $C$DW$206, DW_AT_upper_bound(0x05)
.dwendtag $C$DW$T$21
$C$DW$T$37 .dwtag DW_TAG_array_type
.dwattr $C$DW$T$37, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$T$37, DW_AT_language(DW_LANG_C)
.dwattr $C$DW$T$37, DW_AT_byte_size(0x0e)
$C$DW$207 .dwtag DW_TAG_subrange_type
.dwattr $C$DW$207, DW_AT_upper_bound(0x0d)
.dwendtag $C$DW$T$37
$C$DW$T$38 .dwtag DW_TAG_array_type
.dwattr $C$DW$T$38, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$T$38, DW_AT_language(DW_LANG_C)
.dwattr $C$DW$T$38, DW_AT_byte_size(0x02)
$C$DW$208 .dwtag DW_TAG_subrange_type
.dwattr $C$DW$208, DW_AT_upper_bound(0x01)
.dwendtag $C$DW$T$38
$C$DW$T$39 .dwtag DW_TAG_array_type
.dwattr $C$DW$T$39, DW_AT_type(*$C$DW$T$20)
.dwattr $C$DW$T$39, DW_AT_language(DW_LANG_C)
.dwattr $C$DW$T$39, DW_AT_byte_size(0x05)
$C$DW$209 .dwtag DW_TAG_subrange_type
.dwattr $C$DW$209, DW_AT_upper_bound(0x04)
.dwendtag $C$DW$T$39
$C$DW$T$62 .dwtag DW_TAG_pointer_type
.dwattr $C$DW$T$62, DW_AT_type(*$C$DW$T$19)
.dwattr $C$DW$T$62, DW_AT_address_class(0x17)
$C$DW$T$10 .dwtag DW_TAG_base_type
.dwattr $C$DW$T$10, DW_AT_encoding(DW_ATE_signed)
.dwattr $C$DW$T$10, DW_AT_name("int")
.dwattr $C$DW$T$10, DW_AT_byte_size(0x01)
$C$DW$T$11 .dwtag DW_TAG_base_type
.dwattr $C$DW$T$11, DW_AT_encoding(DW_ATE_unsigned)
.dwattr $C$DW$T$11, DW_AT_name("unsigned int")
.dwattr $C$DW$T$11, DW_AT_byte_size(0x01)
$C$DW$T$12 .dwtag DW_TAG_base_type
.dwattr $C$DW$T$12, DW_AT_encoding(DW_ATE_signed)
.dwattr $C$DW$T$12, DW_AT_name("long")
.dwattr $C$DW$T$12, DW_AT_byte_size(0x02)
$C$DW$T$13 .dwtag DW_TAG_base_type
.dwattr $C$DW$T$13, DW_AT_encoding(DW_ATE_unsigned)
.dwattr $C$DW$T$13, DW_AT_name("unsigned long")
.dwattr $C$DW$T$13, DW_AT_byte_size(0x02)
$C$DW$T$14 .dwtag DW_TAG_base_type
.dwattr $C$DW$T$14, DW_AT_encoding(DW_ATE_signed)
.dwattr $C$DW$T$14, DW_AT_name("long long")
.dwattr $C$DW$T$14, DW_AT_byte_size(0x04)
.dwattr $C$DW$T$14, DW_AT_bit_size(0x28)
.dwattr $C$DW$T$14, DW_AT_bit_offset(0x18)
$C$DW$T$15 .dwtag DW_TAG_base_type
.dwattr $C$DW$T$15, DW_AT_encoding(DW_ATE_unsigned)
.dwattr $C$DW$T$15, DW_AT_name("unsigned long long")
.dwattr $C$DW$T$15, DW_AT_byte_size(0x04)
.dwattr $C$DW$T$15, DW_AT_bit_size(0x28)
.dwattr $C$DW$T$15, DW_AT_bit_offset(0x18)
$C$DW$T$16 .dwtag DW_TAG_base_type
.dwattr $C$DW$T$16, DW_AT_encoding(DW_ATE_float)
.dwattr $C$DW$T$16, DW_AT_name("float")
.dwattr $C$DW$T$16, DW_AT_byte_size(0x02)
$C$DW$T$17 .dwtag DW_TAG_base_type
.dwattr $C$DW$T$17, DW_AT_encoding(DW_ATE_float)
.dwattr $C$DW$T$17, DW_AT_name("double")
.dwattr $C$DW$T$17, DW_AT_byte_size(0x02)
$C$DW$T$18 .dwtag DW_TAG_base_type
.dwattr $C$DW$T$18, DW_AT_encoding(DW_ATE_float)
.dwattr $C$DW$T$18, DW_AT_name("long double")
.dwattr $C$DW$T$18, DW_AT_byte_size(0x02)
$C$DW$T$71 .dwtag DW_TAG_base_type
.dwattr $C$DW$T$71, DW_AT_encoding(DW_ATE_signed_char)
.dwattr $C$DW$T$71, DW_AT_name("signed char")
.dwattr $C$DW$T$71, DW_AT_byte_size(0x01)
$C$DW$210 .dwtag DW_TAG_TI_far_type
.dwattr $C$DW$210, DW_AT_type(*$C$DW$T$71)
$C$DW$T$72 .dwtag DW_TAG_const_type
.dwattr $C$DW$T$72, DW_AT_type(*$C$DW$210)
$C$DW$T$73 .dwtag DW_TAG_pointer_type
.dwattr $C$DW$T$73, DW_AT_type(*$C$DW$T$72)
.dwattr $C$DW$T$73, DW_AT_address_class(0x17)
.dwattr $C$DW$CU, DW_AT_language(DW_LANG_C)
;***************************************************************
;* DWARF CIE ENTRIES *
;***************************************************************
$C$DW$CIE .dwcie 91
.dwcfi cfa_register, 36
.dwcfi cfa_offset, 0
.dwcfi undefined, 0
.dwcfi undefined, 1
.dwcfi undefined, 2
.dwcfi undefined, 3
.dwcfi undefined, 4
.dwcfi undefined, 5
.dwcfi undefined, 6
.dwcfi undefined, 7
.dwcfi undefined, 8
.dwcfi undefined, 9
.dwcfi undefined, 10
.dwcfi undefined, 11
.dwcfi undefined, 12
.dwcfi undefined, 13
.dwcfi same_value, 14
.dwcfi same_value, 15
.dwcfi undefined, 16
.dwcfi undefined, 17
.dwcfi undefined, 18
.dwcfi undefined, 19
.dwcfi undefined, 20
.dwcfi undefined, 21
.dwcfi undefined, 22
.dwcfi undefined, 23
.dwcfi undefined, 24
.dwcfi undefined, 25
.dwcfi same_value, 26
.dwcfi same_value, 27
.dwcfi same_value, 28
.dwcfi same_value, 29
.dwcfi same_value, 30
.dwcfi same_value, 31
.dwcfi undefined, 32
.dwcfi undefined, 33
.dwcfi undefined, 34
.dwcfi undefined, 35
.dwcfi undefined, 36
.dwcfi undefined, 37
.dwcfi undefined, 38
.dwcfi undefined, 39
.dwcfi undefined, 40
.dwcfi undefined, 41
.dwcfi undefined, 42
.dwcfi undefined, 43
.dwcfi undefined, 44
.dwcfi undefined, 45
.dwcfi undefined, 46
.dwcfi undefined, 47
.dwcfi undefined, 48
.dwcfi undefined, 49
.dwcfi undefined, 50
.dwcfi undefined, 51
.dwcfi undefined, 52
.dwcfi undefined, 53
.dwcfi undefined, 54
.dwcfi undefined, 55
.dwcfi undefined, 56
.dwcfi undefined, 57
.dwcfi undefined, 58
.dwcfi undefined, 59
.dwcfi undefined, 60
.dwcfi undefined, 61
.dwcfi undefined, 62
.dwcfi undefined, 63
.dwcfi undefined, 64
.dwcfi undefined, 65
.dwcfi undefined, 66
.dwcfi undefined, 67
.dwcfi undefined, 68
.dwcfi undefined, 69
.dwcfi undefined, 70
.dwcfi undefined, 71
.dwcfi undefined, 72
.dwcfi undefined, 73
.dwcfi undefined, 74
.dwcfi undefined, 75
.dwcfi undefined, 76
.dwcfi undefined, 77
.dwcfi undefined, 78
.dwcfi undefined, 79
.dwcfi undefined, 80
.dwcfi undefined, 81
.dwcfi undefined, 82
.dwcfi undefined, 83
.dwcfi undefined, 84
.dwcfi undefined, 85
.dwcfi undefined, 86
.dwcfi undefined, 87
.dwcfi undefined, 88
.dwcfi undefined, 89
.dwcfi undefined, 90
.dwcfi undefined, 91
.dwendentry
;***************************************************************
;* DWARF REGISTER MAP *
;***************************************************************
$C$DW$211 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AC0")
.dwattr $C$DW$211, DW_AT_location[DW_OP_reg0]
$C$DW$212 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AC0")
.dwattr $C$DW$212, DW_AT_location[DW_OP_reg1]
$C$DW$213 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AC0_G")
.dwattr $C$DW$213, DW_AT_location[DW_OP_reg2]
$C$DW$214 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AC1")
.dwattr $C$DW$214, DW_AT_location[DW_OP_reg3]
$C$DW$215 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AC1")
.dwattr $C$DW$215, DW_AT_location[DW_OP_reg4]
$C$DW$216 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AC1_G")
.dwattr $C$DW$216, DW_AT_location[DW_OP_reg5]
$C$DW$217 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AC2")
.dwattr $C$DW$217, DW_AT_location[DW_OP_reg6]
$C$DW$218 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AC2")
.dwattr $C$DW$218, DW_AT_location[DW_OP_reg7]
$C$DW$219 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AC2_G")
.dwattr $C$DW$219, DW_AT_location[DW_OP_reg8]
$C$DW$220 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AC3")
.dwattr $C$DW$220, DW_AT_location[DW_OP_reg9]
$C$DW$221 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AC3")
.dwattr $C$DW$221, DW_AT_location[DW_OP_reg10]
$C$DW$222 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AC3_G")
.dwattr $C$DW$222, DW_AT_location[DW_OP_reg11]
$C$DW$223 .dwtag DW_TAG_TI_assign_register, DW_AT_name("T0")
.dwattr $C$DW$223, DW_AT_location[DW_OP_reg12]
$C$DW$224 .dwtag DW_TAG_TI_assign_register, DW_AT_name("T1")
.dwattr $C$DW$224, DW_AT_location[DW_OP_reg13]
$C$DW$225 .dwtag DW_TAG_TI_assign_register, DW_AT_name("T2")
.dwattr $C$DW$225, DW_AT_location[DW_OP_reg14]
$C$DW$226 .dwtag DW_TAG_TI_assign_register, DW_AT_name("T3")
.dwattr $C$DW$226, DW_AT_location[DW_OP_reg15]
$C$DW$227 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AR0")
.dwattr $C$DW$227, DW_AT_location[DW_OP_reg16]
$C$DW$228 .dwtag DW_TAG_TI_assign_register, DW_AT_name("XAR0")
.dwattr $C$DW$228, DW_AT_location[DW_OP_reg17]
$C$DW$229 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AR1")
.dwattr $C$DW$229, DW_AT_location[DW_OP_reg18]
$C$DW$230 .dwtag DW_TAG_TI_assign_register, DW_AT_name("XAR1")
.dwattr $C$DW$230, DW_AT_location[DW_OP_reg19]
$C$DW$231 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AR2")
.dwattr $C$DW$231, DW_AT_location[DW_OP_reg20]
$C$DW$232 .dwtag DW_TAG_TI_assign_register, DW_AT_name("XAR2")
.dwattr $C$DW$232, DW_AT_location[DW_OP_reg21]
$C$DW$233 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AR3")
.dwattr $C$DW$233, DW_AT_location[DW_OP_reg22]
$C$DW$234 .dwtag DW_TAG_TI_assign_register, DW_AT_name("XAR3")
.dwattr $C$DW$234, DW_AT_location[DW_OP_reg23]
$C$DW$235 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AR4")
.dwattr $C$DW$235, DW_AT_location[DW_OP_reg24]
$C$DW$236 .dwtag DW_TAG_TI_assign_register, DW_AT_name("XAR4")
.dwattr $C$DW$236, DW_AT_location[DW_OP_reg25]
$C$DW$237 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AR5")
.dwattr $C$DW$237, DW_AT_location[DW_OP_reg26]
$C$DW$238 .dwtag DW_TAG_TI_assign_register, DW_AT_name("XAR5")
.dwattr $C$DW$238, DW_AT_location[DW_OP_reg27]
$C$DW$239 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AR6")
.dwattr $C$DW$239, DW_AT_location[DW_OP_reg28]
$C$DW$240 .dwtag DW_TAG_TI_assign_register, DW_AT_name("XAR6")
.dwattr $C$DW$240, DW_AT_location[DW_OP_reg29]
$C$DW$241 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AR7")
.dwattr $C$DW$241, DW_AT_location[DW_OP_reg30]
$C$DW$242 .dwtag DW_TAG_TI_assign_register, DW_AT_name("XAR7")
.dwattr $C$DW$242, DW_AT_location[DW_OP_reg31]
$C$DW$243 .dwtag DW_TAG_TI_assign_register, DW_AT_name("FP")
.dwattr $C$DW$243, DW_AT_location[DW_OP_regx 0x20]
$C$DW$244 .dwtag DW_TAG_TI_assign_register, DW_AT_name("XFP")
.dwattr $C$DW$244, DW_AT_location[DW_OP_regx 0x21]
$C$DW$245 .dwtag DW_TAG_TI_assign_register, DW_AT_name("PC")
.dwattr $C$DW$245, DW_AT_location[DW_OP_regx 0x22]
$C$DW$246 .dwtag DW_TAG_TI_assign_register, DW_AT_name("SP")
.dwattr $C$DW$246, DW_AT_location[DW_OP_regx 0x23]
$C$DW$247 .dwtag DW_TAG_TI_assign_register, DW_AT_name("XSP")
.dwattr $C$DW$247, DW_AT_location[DW_OP_regx 0x24]
$C$DW$248 .dwtag DW_TAG_TI_assign_register, DW_AT_name("BKC")
.dwattr $C$DW$248, DW_AT_location[DW_OP_regx 0x25]
$C$DW$249 .dwtag DW_TAG_TI_assign_register, DW_AT_name("BK03")
.dwattr $C$DW$249, DW_AT_location[DW_OP_regx 0x26]
$C$DW$250 .dwtag DW_TAG_TI_assign_register, DW_AT_name("BK47")
.dwattr $C$DW$250, DW_AT_location[DW_OP_regx 0x27]
$C$DW$251 .dwtag DW_TAG_TI_assign_register, DW_AT_name("ST0")
.dwattr $C$DW$251, DW_AT_location[DW_OP_regx 0x28]
$C$DW$252 .dwtag DW_TAG_TI_assign_register, DW_AT_name("ST1")
.dwattr $C$DW$252, DW_AT_location[DW_OP_regx 0x29]
$C$DW$253 .dwtag DW_TAG_TI_assign_register, DW_AT_name("ST2")
.dwattr $C$DW$253, DW_AT_location[DW_OP_regx 0x2a]
$C$DW$254 .dwtag DW_TAG_TI_assign_register, DW_AT_name("ST3")
.dwattr $C$DW$254, DW_AT_location[DW_OP_regx 0x2b]
$C$DW$255 .dwtag DW_TAG_TI_assign_register, DW_AT_name("MDP")
.dwattr $C$DW$255, DW_AT_location[DW_OP_regx 0x2c]
$C$DW$256 .dwtag DW_TAG_TI_assign_register, DW_AT_name("MDP05")
.dwattr $C$DW$256, DW_AT_location[DW_OP_regx 0x2d]
$C$DW$257 .dwtag DW_TAG_TI_assign_register, DW_AT_name("MDP67")
.dwattr $C$DW$257, DW_AT_location[DW_OP_regx 0x2e]
$C$DW$258 .dwtag DW_TAG_TI_assign_register, DW_AT_name("BRC0")
.dwattr $C$DW$258, DW_AT_location[DW_OP_regx 0x2f]
$C$DW$259 .dwtag DW_TAG_TI_assign_register, DW_AT_name("RSA0")
.dwattr $C$DW$259, DW_AT_location[DW_OP_regx 0x30]
$C$DW$260 .dwtag DW_TAG_TI_assign_register, DW_AT_name("RSA0_H")
.dwattr $C$DW$260, DW_AT_location[DW_OP_regx 0x31]
$C$DW$261 .dwtag DW_TAG_TI_assign_register, DW_AT_name("REA0")
.dwattr $C$DW$261, DW_AT_location[DW_OP_regx 0x32]
$C$DW$262 .dwtag DW_TAG_TI_assign_register, DW_AT_name("REA0_H")
.dwattr $C$DW$262, DW_AT_location[DW_OP_regx 0x33]
$C$DW$263 .dwtag DW_TAG_TI_assign_register, DW_AT_name("BRS1")
.dwattr $C$DW$263, DW_AT_location[DW_OP_regx 0x34]
$C$DW$264 .dwtag DW_TAG_TI_assign_register, DW_AT_name("BRC1")
.dwattr $C$DW$264, DW_AT_location[DW_OP_regx 0x35]
$C$DW$265 .dwtag DW_TAG_TI_assign_register, DW_AT_name("RSA1")
.dwattr $C$DW$265, DW_AT_location[DW_OP_regx 0x36]
$C$DW$266 .dwtag DW_TAG_TI_assign_register, DW_AT_name("RSA1_H")
.dwattr $C$DW$266, DW_AT_location[DW_OP_regx 0x37]
$C$DW$267 .dwtag DW_TAG_TI_assign_register, DW_AT_name("REA1")
.dwattr $C$DW$267, DW_AT_location[DW_OP_regx 0x38]
$C$DW$268 .dwtag DW_TAG_TI_assign_register, DW_AT_name("REA1_H")
.dwattr $C$DW$268, DW_AT_location[DW_OP_regx 0x39]
$C$DW$269 .dwtag DW_TAG_TI_assign_register, DW_AT_name("CSR")
.dwattr $C$DW$269, DW_AT_location[DW_OP_regx 0x3a]
$C$DW$270 .dwtag DW_TAG_TI_assign_register, DW_AT_name("RPTC")
.dwattr $C$DW$270, DW_AT_location[DW_OP_regx 0x3b]
$C$DW$271 .dwtag DW_TAG_TI_assign_register, DW_AT_name("CDP")
.dwattr $C$DW$271, DW_AT_location[DW_OP_regx 0x3c]
$C$DW$272 .dwtag DW_TAG_TI_assign_register, DW_AT_name("XCDP")
.dwattr $C$DW$272, DW_AT_location[DW_OP_regx 0x3d]
$C$DW$273 .dwtag DW_TAG_TI_assign_register, DW_AT_name("TRN0")
.dwattr $C$DW$273, DW_AT_location[DW_OP_regx 0x3e]
$C$DW$274 .dwtag DW_TAG_TI_assign_register, DW_AT_name("TRN1")
.dwattr $C$DW$274, DW_AT_location[DW_OP_regx 0x3f]
$C$DW$275 .dwtag DW_TAG_TI_assign_register, DW_AT_name("BSA01")
.dwattr $C$DW$275, DW_AT_location[DW_OP_regx 0x40]
$C$DW$276 .dwtag DW_TAG_TI_assign_register, DW_AT_name("BSA23")
.dwattr $C$DW$276, DW_AT_location[DW_OP_regx 0x41]
$C$DW$277 .dwtag DW_TAG_TI_assign_register, DW_AT_name("BSA45")
.dwattr $C$DW$277, DW_AT_location[DW_OP_regx 0x42]
$C$DW$278 .dwtag DW_TAG_TI_assign_register, DW_AT_name("BSA67")
.dwattr $C$DW$278, DW_AT_location[DW_OP_regx 0x43]
$C$DW$279 .dwtag DW_TAG_TI_assign_register, DW_AT_name("BSAC")
.dwattr $C$DW$279, DW_AT_location[DW_OP_regx 0x44]
$C$DW$280 .dwtag DW_TAG_TI_assign_register, DW_AT_name("CARRY")
.dwattr $C$DW$280, DW_AT_location[DW_OP_regx 0x45]
$C$DW$281 .dwtag DW_TAG_TI_assign_register, DW_AT_name("TC1")
.dwattr $C$DW$281, DW_AT_location[DW_OP_regx 0x46]
$C$DW$282 .dwtag DW_TAG_TI_assign_register, DW_AT_name("TC2")
.dwattr $C$DW$282, DW_AT_location[DW_OP_regx 0x47]
$C$DW$283 .dwtag DW_TAG_TI_assign_register, DW_AT_name("M40")
.dwattr $C$DW$283, DW_AT_location[DW_OP_regx 0x48]
$C$DW$284 .dwtag DW_TAG_TI_assign_register, DW_AT_name("SXMD")
.dwattr $C$DW$284, DW_AT_location[DW_OP_regx 0x49]
$C$DW$285 .dwtag DW_TAG_TI_assign_register, DW_AT_name("ARMS")
.dwattr $C$DW$285, DW_AT_location[DW_OP_regx 0x4a]
$C$DW$286 .dwtag DW_TAG_TI_assign_register, DW_AT_name("C54CM")
.dwattr $C$DW$286, DW_AT_location[DW_OP_regx 0x4b]
$C$DW$287 .dwtag DW_TAG_TI_assign_register, DW_AT_name("SATA")
.dwattr $C$DW$287, DW_AT_location[DW_OP_regx 0x4c]
$C$DW$288 .dwtag DW_TAG_TI_assign_register, DW_AT_name("SATD")
.dwattr $C$DW$288, DW_AT_location[DW_OP_regx 0x4d]
$C$DW$289 .dwtag DW_TAG_TI_assign_register, DW_AT_name("RDM")
.dwattr $C$DW$289, DW_AT_location[DW_OP_regx 0x4e]
$C$DW$290 .dwtag DW_TAG_TI_assign_register, DW_AT_name("FRCT")
.dwattr $C$DW$290, DW_AT_location[DW_OP_regx 0x4f]
$C$DW$291 .dwtag DW_TAG_TI_assign_register, DW_AT_name("SMUL")
.dwattr $C$DW$291, DW_AT_location[DW_OP_regx 0x50]
$C$DW$292 .dwtag DW_TAG_TI_assign_register, DW_AT_name("INTM")
.dwattr $C$DW$292, DW_AT_location[DW_OP_regx 0x51]
$C$DW$293 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AR0LC")
.dwattr $C$DW$293, DW_AT_location[DW_OP_regx 0x52]
$C$DW$294 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AR1LC")
.dwattr $C$DW$294, DW_AT_location[DW_OP_regx 0x53]
$C$DW$295 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AR2LC")
.dwattr $C$DW$295, DW_AT_location[DW_OP_regx 0x54]
$C$DW$296 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AR3LC")
.dwattr $C$DW$296, DW_AT_location[DW_OP_regx 0x55]
$C$DW$297 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AR4LC")
.dwattr $C$DW$297, DW_AT_location[DW_OP_regx 0x56]
$C$DW$298 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AR5LC")
.dwattr $C$DW$298, DW_AT_location[DW_OP_regx 0x57]
$C$DW$299 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AR6LC")
.dwattr $C$DW$299, DW_AT_location[DW_OP_regx 0x58]
$C$DW$300 .dwtag DW_TAG_TI_assign_register, DW_AT_name("AR7LC")
.dwattr $C$DW$300, DW_AT_location[DW_OP_regx 0x59]
$C$DW$301 .dwtag DW_TAG_TI_assign_register, DW_AT_name("CDPLC")
.dwattr $C$DW$301, DW_AT_location[DW_OP_regx 0x5a]
$C$DW$302 .dwtag DW_TAG_TI_assign_register, DW_AT_name("CIE_RETA")
.dwattr $C$DW$302, DW_AT_location[DW_OP_regx 0x5b]
.dwendtag $C$DW$CU
| 48.62082 | 186 | 0.677947 |
e09c4a4cfc139dcec32bf8398ce12a29f90d74ba | 334 | asm | Assembly | oeis/101/A101680.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/101/A101680.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/101/A101680.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A101680: A modular binomial transform of 10^n.
; Submitted by Christian Krause
; 1,11,111,1011,10111,111011,1100111,10001011,100010111,1100111011,11101100111,101110001011,1011000010111,11100000111011,110000001100111,1000000010001011,10000000100010111,110000001100111011
mul $0,2
seq $0,101623 ; Modular binomial transform of 10^n.
| 47.714286 | 190 | 0.832335 |
1a120b11c1aa2371a3d0ae81f80b9d7345e1da84 | 1,285 | asm | Assembly | samples/vasm_oldstyle/common/24bit_division.asm | MaverickAlex/x6502 | fdf25fd5ae6d2710ddce7c7a9bcbb63246f35460 | [
"BSD-4-Clause"
] | null | null | null | samples/vasm_oldstyle/common/24bit_division.asm | MaverickAlex/x6502 | fdf25fd5ae6d2710ddce7c7a9bcbb63246f35460 | [
"BSD-4-Clause"
] | 4 | 2021-12-23T00:53:24.000Z | 2021-12-28T19:37:29.000Z | samples/vasm_oldstyle/common/24bit_division.asm | MaverickAlex/x6502 | fdf25fd5ae6d2710ddce7c7a9bcbb63246f35460 | [
"BSD-4-Clause"
] | null | null | null | ; Executes an unsigned integer division of a 24-bit dividend by a 24-bit divisor
; the result goes to dividend and remainder variables
;
; Verz!!! 18-mar-2017
dividend .equ $0200 ; 3 bytes
divisor .equ $0203 ; 3 bytes
remainder .equ $0206 ; 3 bytes
pztemp .equ $020a ; 1 bytes
div24_init:
lda #0
sta dividend
sta dividend + 1
sta dividend + 2
sta divisor
sta divisor + 1
sta divisor + 2
sta remainder
sta remainder + 1
sta remainder + 2
sta pztemp
rts
div24:
lda #0 ;preset remainder to 0
sta remainder
sta remainder+1
sta remainder+2
ldx #24 ;repeat for each bit: ...
divloop:
asl dividend ;dividend lb & hb*2, msb -> Carry
rol dividend+1
rol dividend+2
rol remainder ;remainder lb & hb * 2 + msb from carry
rol remainder+1
rol remainder+2
lda remainder
sec
sbc divisor ;substract divisor to see if it fits in
tay ;lb result -> Y, for we may need it later
lda remainder+1
sbc divisor+1
sta pztemp
lda remainder+2
sbc divisor+2
bcc skip ;if carry=0 then divisor didn't fit in yet
sta remainder+2 ;else save substraction result as new remainder,
lda pztemp
sta remainder+1
sty remainder
inc dividend ;and INCrement result cause divisor fit in 1 times
skip:
dex
bne divloop
rts
| 21.065574 | 80 | 0.691829 |
9add08a75e0d2352aa59823b817feeb9f0e6a05e | 2,012 | asm | Assembly | tests/nas2cam_extseout/outboard.asm | twmacro/pyye | c4febd44be836bd87368da13c1fb0cf82838b687 | [
"BSD-3-Clause"
] | 17 | 2016-03-02T18:29:13.000Z | 2022-03-18T08:41:56.000Z | tests/nas2cam_extseout/outboard.asm | twmacro/pyye | c4febd44be836bd87368da13c1fb0cf82838b687 | [
"BSD-3-Clause"
] | 2 | 2021-04-15T02:11:10.000Z | 2021-12-06T12:49:57.000Z | tests/nas2cam_extseout/outboard.asm | twmacro/pyye | c4febd44be836bd87368da13c1fb0cf82838b687 | [
"BSD-3-Clause"
] | 6 | 2020-06-11T17:09:50.000Z | 2022-02-07T19:15:07.000Z | $***********************************************************************
$ THE FOLLOWING BULK DATA ENTRIES RELATED TO EXT. SUPERELEMENT 101
$ ARE FOR USE IN THE MAIN BULK DATA PORTION OF THE ASSEMBLY RUN
$***********************************************************************
$
SEBULK 101 EXTOP4 MANUAL 101
$
$ CORD2R DATA
$
CORD2R* 10 0 0.000000000E+00 0.000000000E+00
* 0.000000000E+00 0.100000000E+01 0.000000000E+00 0.000000000E+00
* 0.000000000E+00 0.100000000E+01 0.000000000E+00
$
$ SECONCT DATA
$
SECONCT 101 0 NO
3 3 11 11 19 19 27 27
1995001 1995001 1995002 1995002 1995003 1995003 1995004 1995004
1995005 1995005 1995006 1995006 1995007 1995007 1995008 1995008
1995009 1995009 1995010 1995010 1995011 1995011 1995012 1995012
1995013 1995013 1995014 1995014 1995015 1995015 1995016 1995016
1995017 1995017 1995018 1995018 1995019 1995019 1995020 1995020
1995021 1995021 1995022 1995022
$
$ BOUNDARY GRID DATA
$
GRID* 3 0 0.600000000E+03 0.000000000E+00
* 0.300000000E+03 0 0 0
GRID* 11 0 0.600000000E+03 0.300000000E+03
* 0.300000000E+03 10 0 0
GRID* 19 0 0.600000000E+03 0.300000000E+03
* 0.000000000E+00 0 0 0
GRID* 27 0 0.600000000E+03 0.000000000E+00
* 0.000000000E+00 0 0 0
$
$ SPOINT DATA
$
SPOINT 1995001 1995002 1995003 1995004 1995005 1995006 1995007 1995008
SPOINT 1995009 1995010 1995011 1995012 1995013 1995014 1995015 1995016
SPOINT 1995017 1995018 1995019 1995020 1995021 1995022
$***********************************************************************
| 47.904762 | 72 | 0.498509 |
a258b9a59e9c9082ea132ef33cb52dfc605e0317 | 2,527 | asm | Assembly | Transynther/x86/_processed/AVXALIGN/_st_/i9-9900K_12_0xa0_notsx.log_10_86.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/AVXALIGN/_st_/i9-9900K_12_0xa0_notsx.log_10_86.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/AVXALIGN/_st_/i9-9900K_12_0xa0_notsx.log_10_86.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r15
push %rax
push %rcx
lea addresses_D_ht+0x1864b, %rax
nop
nop
nop
nop
nop
cmp $61538, %rcx
mov (%rax), %r15
nop
nop
nop
nop
dec %r10
pop %rcx
pop %rax
pop %r15
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r13
push %r14
push %r15
push %rbp
push %rbx
push %rdx
// Store
lea addresses_A+0xcbfb, %r12
clflush (%r12)
nop
nop
nop
nop
xor %r13, %r13
mov $0x5152535455565758, %r15
movq %r15, %xmm6
vmovups %ymm6, (%r12)
nop
nop
sub %rbp, %rbp
// Store
lea addresses_WC+0x290b, %r12
nop
nop
nop
nop
cmp %rbx, %rbx
movl $0x51525354, (%r12)
nop
nop
nop
nop
dec %rbx
// Load
lea addresses_normal+0x1884b, %r14
nop
inc %r15
mov (%r14), %rbp
nop
nop
nop
nop
xor $33012, %rbx
// Load
lea addresses_D+0x1a15f, %r15
nop
nop
nop
nop
nop
add $9910, %r13
movntdqa (%r15), %xmm5
vpextrq $1, %xmm5, %rdx
dec %rbx
// Store
mov $0x97b, %rdx
and %r15, %r15
movb $0x51, (%rdx)
nop
nop
nop
nop
xor %r13, %r13
// Load
lea addresses_WC+0x1f14b, %rdx
cmp $49, %r12
mov (%rdx), %r15
nop
nop
xor %r12, %r12
// Faulty Load
lea addresses_RW+0x1a64b, %rbx
clflush (%rbx)
nop
nop
nop
and $19784, %r14
movb (%rbx), %r13b
lea oracles, %rbx
and $0xff, %r13
shlq $12, %r13
mov (%rbx,%r13,1), %r13
pop %rdx
pop %rbx
pop %rbp
pop %r15
pop %r14
pop %r13
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_RW', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_A', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 2}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC', 'AVXalign': True, 'size': 4, 'NT': False, 'same': False, 'congruent': 6}}
{'src': {'type': 'addresses_normal', 'AVXalign': True, 'size': 8, 'NT': False, 'same': False, 'congruent': 7}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_D', 'AVXalign': False, 'size': 16, 'NT': True, 'same': False, 'congruent': 1}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_P', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 4}}
{'src': {'type': 'addresses_WC', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 7}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'type': 'addresses_RW', 'AVXalign': True, 'size': 1, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_D_ht', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 10}, 'OP': 'LOAD'}
{'32': 10}
32 32 32 32 32 32 32 32 32 32
*/
| 17.548611 | 124 | 0.634349 |
495a7f559f9e6d75faa9af92f40655c48d3e4d93 | 444 | asm | Assembly | oeis/183/A183228.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/183/A183228.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/183/A183228.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A183228: a(n) is the base-5 digit sum of 10^n+1.
; 2,3,5,5,5,5,9,5,5,9,13,13,13,13,9,13,17,21,21,21,17,13,21,25,29,21,33,33,25,33,41,41,33,25,29,33,33,41,29,37,37,41,45,41,37,41,37,45,45,45,45,49,53,53,49,57,41,57,69,61,53,53,49,61,57,65,61,49,57,61,61,65,61,61,61,65,53,49,65,69,57,81,81,81,81,69,77,77,77,97,93,93,85,85,81,73,97,81,81,81
seq $0,79 ; Powers of 2: a(n) = 2^n.
seq $0,53824 ; Sum of digits of (n written in base 5).
add $0,1
| 63.428571 | 290 | 0.637387 |
64e94f77aced387821ce68081415cef52d58ffdd | 25,188 | asm | Assembly | src/CORE32/read.asm | masscry/dmc | c7638f7c524a65bc2af0876c76621d8a11da42bb | [
"BSL-1.0"
] | 86 | 2018-05-24T12:03:44.000Z | 2022-03-13T03:01:25.000Z | src/CORE32/read.asm | masscry/dmc | c7638f7c524a65bc2af0876c76621d8a11da42bb | [
"BSL-1.0"
] | 1 | 2019-05-30T01:38:40.000Z | 2019-10-26T07:15:01.000Z | src/CORE32/read.asm | masscry/dmc | c7638f7c524a65bc2af0876c76621d8a11da42bb | [
"BSL-1.0"
] | 14 | 2018-07-16T08:29:12.000Z | 2021-08-23T06:21:30.000Z | ;_ read.asm
; Copyright 1993 by Digital Mars
; All Rights Reserved
; $Revision: 1.1.1.1 $
include macros.asm
include stdio.asm
extrn __SET_ERRNO:near
ifdef _WIN32
extrn _ReadFile@20:near
extrn _SetFilePointer@16:near
comm __osfhnd:dword:0F0h
comm ___fhnd_info:byte:3Ch
else
extrn ___fhnd_info:byte
endif
begcode read
c_public read
;****************************************************************************
; int __clib read (int fd, void *buffer, unsigned len)
;
; The read function gets the number of bytes specified in len from the file
; associated with the file descriptor fd. The bytes are read into buffer.
; After the read operation, the pointer points to the next unread byte.
;
; This function returns the number of characters put into the buffer, which
; may be less than len if end of file was encountered. If an error occurs
; when reading the file, a -1 is returned and errno is set to EBADF.
;
; In text mode, each carriage-return-line-feed pair is replaced with a single
; line feed character. Only the single line-feed character is counted in the
; return value. Also, in text mode, a CTRL/Z character is treated as an end-
; of-file indicator.
;****************************************************************************
;----------------------------------------------------------------------------
;------ stack frame variables -----------------------------------------------
;----------------------------------------------------------------------------
next_compressed_byte = dword ptr -4
ifdef _WIN32
actual_bytes_read = dword ptr -8
localbytes = 8
else
localbytes = 4
endif
;----------------------------------------------------------------------------
;------ parameters ----------------------------------------------------------
;----------------------------------------------------------------------------
fd = 8
buffer = 12
len = 16
;----------------------------------------------------------------------------
;------ some miscellaneous manifest constants -------------------------------
;----------------------------------------------------------------------------
EOF_MARKER = 1AH
CR = 0DH
LF = 0AH
DOS_SEEK_CUR = 4201H
FILE_CURRENT = 01H
DOS_READ = 3FH
FHND_APPEND = 04H
FHND_DEVICE = 08H
FHND_EOF = 01H
FHND_TEXT = 10H
;----------------------------------------------------------------------------
;------ set up the stack frame ----------------------------------------------
;----------------------------------------------------------------------------
func read
push EBP
mov EBP,ESP
sub ESP,localbytes
push EBX
;----------------------------------------------------------------------------
;------ load and validate the file handle to EBX ----------------------------
;----------------------------------------------------------------------------
mov EBX,fd[EBP]
cmp EBX,_NFILE ; number of handles supported
jnb short RE12
;----------------------------------------------------------------------------
;------ ECX holds the number of bytes to read -- if it's zero, we're done ---
;----------------------------------------------------------------------------
mov ECX,len[EBP]
or ECX,ECX
je short RS14
;----------------------------------------------------------------------------
;------- if the file is text-mode, it requires extra processing -------------
;----------------------------------------------------------------------------
test ___fhnd_info[EBX],FHND_TEXT
jnz short RS9 ; jump if text mode
;----------------------------------------------------------------------------
;------ set up the buffer pointer for the read ------------------------------
;----------------------------------------------------------------------------
mov EDX,buffer[EBP]
;----------------------------------------------------------------------------
;------ call the operating system to do the read -- check for error ---------
;----------------------------------------------------------------------------
push ECX
push EDX
ifdef _WIN32
push 0 ; lpOverlapped
lea EAX,actual_bytes_read[EBP]
push EAX ; lpNumberOfBytesRead
push ECX ; nNumberOfBytesToRead
push EDX ; lpBuffer
push dword ptr __osfhnd[4*EBX] ;hFile
call _ReadFile@20
pop EDX
pop ECX
or EAX,EAX
jz short RE12
mov EAX,actual_bytes_read[EBP]
else
bdos DOS_READ
pop EDX
pop ECX
jc short RE12
endif
;----------------------------------------------------------------------------
;------ and return ----------------------------------------------------------
;----------------------------------------------------------------------------
RS13:
pop EBX
mov ESP,EBP
pop EBP
ret
;----------------------------------------------------------------------------
;------ we come here if ECX is zero: just return a zero --------------------
;----------------------------------------------------------------------------
RS14: xor EAX,EAX
jmp short RS13
;----------------------------------------------------------------------------
;------ set the error code and return a -1 ----------------------------------
;----------------------------------------------------------------------------
RE12: push dword ptr EBADF
call __SET_ERRNO
mov EAX,-1
jmp short RS13
;----------------------------------------------------------------------------
;------ save ESI and EDI for the text mode conversion -----------------------
;----------------------------------------------------------------------------
RS9: push ESI
push EDI
;----------------------------------------------------------------------------
;------ EDI points to the beginning of the buffer -- it will be used scan ---
;-------- the buffer for EOF and CR/LF pairs --------------------------------
;----------------------------------------------------------------------------
mov EDI,buffer[EBP]
;----------------------------------------------------------------------------
;------ turn off the EOF flag -----------------------------------------------
;----------------------------------------------------------------------------
and ___fhnd_info[EBX],not FHND_EOF
;----------------------------------------------------------------------------
;------ we will do all string operations in the UP direction -- set ES ------
;-------- equal to DS for string operations ---------------------------------
;----------------------------------------------------------------------------
cld
push DS
pop ES
;----------------------------------------------------------------------------
;------ each time around loop 1 we will fill the buffer up completely -- ----
;-------- if we convert one or more CR-LF pairs to CRs there will be more ---
;-------- room in the buffer and we will come back to the top of LOOP1 to ---
;-------- fill it out with a few more characters from the file, go on to ----
;-------- strip out any additional CR-LF pairs that were read in, and so ----
;-------- forth -- at the top of this loop, ES:DI points to the first empty -
;-------- character of the buffer, and ECX holds the number of empty spaces -
;-------- remaining ---------------------------------------------------------
;----------------------------------------------------------------------------
RL1:
;----------------------------------------------------------------------------
;------ call the operating system to do the read and then check for errors --
;----------------------------------------------------------------------------
mov EDX,EDI
push ECX
push EDX
ifdef _WIN32
push 0 ; lpOverlapped
lea EAX,actual_bytes_read[EBP]
push EAX ; lpNumberOfBytesRead
push ECX ; nNumberOfBytesToRead
push EDX ; lpBuffer
push dword ptr __osfhnd[4*EBX] ; hFile
call _ReadFile@20
pop EDX
pop ECX
or EAX,EAX
jz RE15
mov EAX,actual_bytes_read[EBP]
else
bdos DOS_READ
pop EDX
pop ECX
jc RE15
endif
;----------------------------------------------------------------------------
;------ set EDX to point to the first byte past the good data ---------------
;----------------------------------------------------------------------------
add EDX,EAX
;----------------------------------------------------------------------------
;------ we are at EOF if less bytes come back than we asked for (or we may --
;-------- be reading from the console, but either way we don't want to go ---
;-------- back to the file for more data) -----------------------------------
;----------------------------------------------------------------------------
cmp EAX,ECX
je short RS16 ; jump if we got all the bytes
;----------------------------------------------------------------------------
;------ indicate EOF and set ECX to the actual number of bytes read ---------
;----------------------------------------------------------------------------
or ___fhnd_info[EBX],FHND_EOF
mov ECX,EAX
RS16:
;----------------------------------------------------------------------------
;------ if we didn't read anything, we are done -----------------------------
;----------------------------------------------------------------------------
or ECX,ECX
jz RX1 ; jump if no data came back
;----------------------------------------------------------------------------
;------ scan the data just read in (EDI for ECX bytes) for an EOF (^Z) ------
;-------- byte -- don't lose EDI, it's the only pointer to the data we have -
;----------------------------------------------------------------------------
push EDI
mov AL,EOF_MARKER
repnz SCASB
jz short RR6 ; jump if EOF found
RJ6: pop EDI
;----------------------------------------------------------------------------
;------ set up for the loop below -- set ECX to the number of bytes in the --
;-------- buffer, AL to the character we will search for (CR) ---------------
;----------------------------------------------------------------------------
mov ECX,EDX
sub ECX,EDI
mov AL,CR
;----------------------------------------------------------------------------
;------ we set ESI to 0 to indicate that we have not yet found a CR-LF pair -
;----------------------------------------------------------------------------
xor ESI,ESI
;----------------------------------------------------------------------------
;------ loop 2 looks for the first CR-LF pair -- if none is found, there ----
;-------- may still be a CR in the final position of the buffer -- if so, ---
;-------- we will need to read ahead in the file to see if it is followed ---
;-------- by a CR -- if neither of these conditions occurs, we are ready to -
;-------- return ------------------------------------------------------------
;----------------------------------------------------------------------------
RL2: repnz SCASB
jnz RX1 ; jump if no potential CR-LFs found
cmp EDI,EDX
jae RS7 ; jump if CR is last char of buffer
cmp byte ptr [EDI],LF
jnz short RL2 ; fall through if CR-LF pair found
;----------------------------------------------------------------------------
;------ we have found a CR-LF pair and will need to compress the buffer -- --
;-------- set next_compressed_byte pointing to the CR which will later be ---
;-------- overwritten and ESI to the LF which is the beginning of the -------
;-------- string which will overwrite it ------------------------------------
;----------------------------------------------------------------------------
mov ESI,EDI
mov next_compressed_byte[EBP],EDI
dec next_compressed_byte[EBP]
;----------------------------------------------------------------------------
;------ each time around loop 3 another CR-LF pair is identified and the ----
;-------- data in the buffer is moved down to compress out the CRs -- set ---
;-------- up for LOOP4 as for LOOP2 above -- ECX is the number of bytes -----
;-------- left in the buffer, and AL is the CR we will be searching for -----
;----------------------------------------------------------------------------
RL3: mov ECX,EDX
sub ECX,EDI
mov AL,0DH
;----------------------------------------------------------------------------
;------ loop 4 is identical to loop 2 above, and searches for the next ------
;-------- CR-LF pair, or a single CR terminating the data -- it is ----------
;-------- duplicated because what we want to do coming out of it is much ----
;-------- different in each case -- it could be made into a subroutine, but -
;-------- this is the most time-critical part of the code (and it's not -----
;-------- very big) ---------------------------------------------------------
;----------------------------------------------------------------------------
RL4: repnz SCASB
jnz RX3 ; jump if no potential CR-LFs found
cmp EDI,EDX
jae short RS7 ; jump if CR is last char of buffer
cmp byte ptr [EDI],LF
jnz short RL4 ; fall through if CR-LF pair found
;----------------------------------------------------------------------------
;------ we have found another CR-LF pair and are ready to move a piece -- ---
;-------- the piece begins at ESI (a LF character), and ends just before ----
;-------- the CR at EDI-1, so its length is given by the following ----------
;-------- calculation into ECX: ---------------------------------------------
;----------------------------------------------------------------------------
mov ECX,EDI
dec ECX
sub ECX,ESI
;----------------------------------------------------------------------------
;------ now we use movsd to copy the piece -- the source of the move is ESI -
;-------- (not coincidentally), and the destination is next_compressed_byte -
;-------- ECX has the proper length -----------------------------------------
;----------------------------------------------------------------------------
mov EAX,EDI ; save EDI -- we're not done w/it yet
mov EDI,next_compressed_byte[EBP]
push ECX
shr ECX,2
rep movsd
pop ECX
and ECX,3
rep movsb
mov next_compressed_byte[EBP],EDI
mov EDI,EAX ; restore EDI
;----------------------------------------------------------------------------
;------ after the move above, ESI points to the CR of our CR-LF pair -- we --
;-------- increment ESI now so that the CR will be squeezed out -------------
;----------------------------------------------------------------------------
inc ESI
;----------------------------------------------------------------------------
;------ and go back to look for another CR-LF -------------------------------
;----------------------------------------------------------------------------
jmp short RL3
;----------------------------------------------------------------------------
;------ we come here when we discover an EOF (^Z) character in the data -- --
;-------- this indicates EOF, even for console input -- EDI points just -----
;-------- past the EOF marker, so subtracting one will back it up to point --
;-------- exactly to the EOF ------------------------------------------------
;----------------------------------------------------------------------------
RR6: dec EDI
;----------------------------------------------------------------------------
;------ we can't do an lseek on the console, so test for it and skip if so --
;----------------------------------------------------------------------------
test ___fhnd_info[EBX],FHND_DEVICE
jnz short RS19
;----------------------------------------------------------------------------
;------ for data files, back up the file pointer to the EOF character -- ----
;-------- this will allow the user to overwrite the EOF and extend the file -
;-------- EDI points to the EOF marker here and EDX just beyond the last ----
;-------- good data byte in the buffer -- subtract EDI from EDX to get the --
;-------- number of bytes following the EOF marker -- this is the number of -
;-------- bytes to back up --------------------------------------------------
;----------------------------------------------------------------------------
sub EDX,EDI
ifdef _WIN32
push FILE_CURRENT ; dwMoveMethod
push 0 ; lpDistanceToMoveHigh
push EDX ; lDistanceToMove
push dword ptr __osfhnd[4*EBX] ; hFile
call _SetFilePointer@16
cmp AX,-1
je short RE15
else
neg EDX
mov ECX,-1 ; to sign-extend CX:DX
mov EAX,DOS_SEEK_CUR
push ECX
push EDX
bdos
pop EDX
pop ECX
jc short RE15
endif
;----------------------------------------------------------------------------
;------ indicate EOF -- update EDX so it points to the EOF byte, which is ---
;-------- now the first byte after the valid data in the buffer; and return -
;-------- to join the processing of the line above --------------------------
;----------------------------------------------------------------------------
RS19: or ___fhnd_info[EBX],FHND_EOF
mov EDX,EDI
jmp RJ6
;----------------------------------------------------------------------------
;------ when the value in EBX is out of range, or when any DOS call returns -
;-------- with an unexpected error, we set errno to EBADF and return -1 -----
;----------------------------------------------------------------------------
RE15: push dword ptr EBADF
call __SET_ERRNO
mov EAX,-1
jmp RX0
;----------------------------------------------------------------------------
;------ we come here when the last character in the buffer is CR -- we need -
;-------- to peek at the next character in the file to see if it is a line --
;-------- feed -- if so, we compress the CR by replacing it with a line -----
;-------- feed and leaving the file pointer pointing after the LF character -
;-------- -- if the next character is not a line feed, we leave the CR in ---
;-------- the buffer and back up the file pointer so it will read the -------
;-------- character again ---------------------------------------------------
;----------------------------------------------------------------------------
;----------------------------------------------------------------------------
;------ if we are at EOF, the CR is not followed by LF -- leave it in place -
;----------------------------------------------------------------------------
RS7: test ___fhnd_info[EBX],FHND_EOF
jnz short RX3
;----------------------------------------------------------------------------
;------ read the next file character over the CR in the last position of ----
;-------- the buffer --------------------------------------------------------
;----------------------------------------------------------------------------
dec EDX
;----------------------------------------------------------------------------
;------ call the operating system to do the read and then check for errors --
;----------------------------------------------------------------------------
mov ECX,1
push ECX
push EDX
ifdef _WIN32
push 0 ; lpOverlapped
lea EAX,actual_bytes_read[EBP]
push EAX ; lpNumberOfBytesRead
push ECX ; nNumberOfBytesToRead
push EDX ; lpBuffer
push dword ptr __osfhnd[4*EBX] ; hFile
call _ReadFile@20
pop EDX
pop ECX
or EAX,EAX
jz short RE15
mov EAX,actual_bytes_read[EBP]
else
bdos DOS_READ
pop EDX
pop ECX
jc short RE15
endif
;----------------------------------------------------------------------------
;------ if there was no character to read, we were at EOF and didn't know ---
;-------- it -- jump to set the eof flags -----------------------------------
;----------------------------------------------------------------------------
or EAX,EAX
jz short RS10 ; jump if now at EOF
;----------------------------------------------------------------------------
;------ if the character is a line feed, we are done -- it has now replaced -
;-------- the CR in the buffer and the file pointer is ready to read the ----
;-------- next character after the LF ---------------------------------------
;----------------------------------------------------------------------------
cmp BYTE PTR -1[EDI],0AH
je short RX3
;----------------------------------------------------------------------------
;------ otherwise, the next character was not a LF -- we must first replace -
;-------- the CR in the data buffer: ----------------------------------------
;----------------------------------------------------------------------------
mov byte ptr -1[EDI],0DH
;----------------------------------------------------------------------------
;------ now back up so that the next read will get this character again -----
;----------------------------------------------------------------------------
ifdef _WIN32
push FILE_CURRENT ; dwMoveMethod
push 0 ; lpDistanceToMoveHigh
push -1 ; lDistanceToMove
push dword ptr __osfhnd[4*EBX] ; hFile
call _SetFilePointer@16
cmp AX,-1
je short RE15
else
mov ECX,-1
mov EDX,ECX ; to sign-extend CX:DX
mov EAX,DOS_SEEK_CUR
push ECX
push EDX
bdos
pop EDX
pop ECX
jc short RE15
endif
;----------------------------------------------------------------------------
;------ and jump to use the buffer with the CR at the end -------------------
;----------------------------------------------------------------------------
jmp short RX3
;----------------------------------------------------------------------------
;------ if we found eof while trying to peek ahead past a CR, set the EOF ---
;-------- flags (see the set_eof routine below for more information about ---
;-------- these flags), and use the buffer with the CR at the end -----------
;----------------------------------------------------------------------------
RS10: or ___fhnd_info[EBX],FHND_EOF
;----------------------------------------------------------------------------
;------ we come here when all CR-LF pairs have been located -- if ESI is ----
;-------- still 0, it means that we found no CR-LFs and no compression ------
;-------- needs to be done -- return right away -----------------------------
;----------------------------------------------------------------------------
RX3: cmp ESI,0
je short RX1
;----------------------------------------------------------------------------
;------ we found at least one CR-LF pair, so we need to compress the last ---
;-------- piece of the buffer -- the source of the move is ESI and the ------
;-------- destination is next_compressed_byte -- eCX is set to the number ---
;-------- of bytes from ESI to the end of the buffer ------------------------
;----------------------------------------------------------------------------
mov ECX,EDI
sub ECX,ESI
mov EDI,next_compressed_byte[EBP]
mov EAX,ECX
shr ECX,2
rep movsd
mov ECX,EAX
and ECX,3
rep movsb
;----------------------------------------------------------------------------
;------ for console input, we are done (since console input is always one ---
;-------- and only one line of input -- test for this condition -------------
;----------------------------------------------------------------------------
test ___fhnd_info[EBX],FHND_DEVICE
jnz short RX1
;----------------------------------------------------------------------------
;------ calculate the number of bytes remaining in the buffer -- if there ---
;-------- are none, we are done ---------------------------------------------
;----------------------------------------------------------------------------
mov ECX,ESI
sub ECX,EDI
jz short RX1
;----------------------------------------------------------------------------
;------ unless we have detected the end of the file, return to the top of ---
;-------- the loop to try and fill the buffer out -- EDI and ECX are used ---
;-------- to pass the location and length of the unused tail of the buffer --
;-------- to the code at the top of the loop --------------------------------
;----------------------------------------------------------------------------
test ___fhnd_info[EBX],FHND_EOF
jz RL1
;----------------------------------------------------------------------------
;------ return the number of characters in the buffer -----------------------
;----------------------------------------------------------------------------
RX1: mov EAX,EDI
sub EAX,buffer[EBP]
;----------------------------------------------------------------------------
;------ restore the registers, clear the stack frame and return -------------
;----------------------------------------------------------------------------
RX0: pop EDI
pop ESI
pop EBX
mov ESP,EBP
pop EBP
ret
c_endp read
endcode read
end
| 39.051163 | 79 | 0.368787 |
aa8289e2590d01b75d739b28c06e28798d74b0b8 | 74,670 | asm | Assembly | tester.asm | sloanetj/Xv6-Container-Support | 80a58b9ac7ead24c63d67ee21ab6cdc72243ab76 | [
"MIT-0"
] | null | null | null | tester.asm | sloanetj/Xv6-Container-Support | 80a58b9ac7ead24c63d67ee21ab6cdc72243ab76 | [
"MIT-0"
] | null | null | null | tester.asm | sloanetj/Xv6-Container-Support | 80a58b9ac7ead24c63d67ee21ab6cdc72243ab76 | [
"MIT-0"
] | null | null | null |
_tester: file format elf32-i386
Disassembly of section .text:
00000000 <main>:
// update head
head_tail[priority][0] = (head+1)%QSIZE;
return p;
}
int main(){
0: 8d 4c 24 04 lea 0x4(%esp),%ecx
4: 83 e4 f0 and $0xfffffff0,%esp
7: ff 71 fc pushl -0x4(%ecx)
a: 55 push %ebp
b: 89 e5 mov %esp,%ebp
d: 57 push %edi
e: 56 push %esi
f: 53 push %ebx
10: 51 push %ecx
11: 83 ec 34 sub $0x34,%esp
exit();
}
int mutex_create(char *name){
return mcreate(name);
14: 68 2e 0f 00 00 push $0xf2e
19: e8 a3 0a 00 00 call ac1 <mcreate>
1e: 89 c3 mov %eax,%ebx
if (fork() == 0){
20: e8 f4 09 00 00 call a19 <fork>
25: 83 c4 10 add $0x10,%esp
28: 85 c0 test %eax,%eax
2a: 75 1c jne 48 <main+0x48>
}
int mutex_delete(int muxid){
return mdelete(muxid);
}
int mutex_lock(int muxid){
return mlock(muxid);
2c: 83 ec 0c sub $0xc,%esp
2f: 53 push %ebx
30: e8 9c 0a 00 00 call ad1 <mlock>
printf(1, "child: about to exit while holding lock\n");
35: 59 pop %ecx
36: 5b pop %ebx
37: 68 fc 0f 00 00 push $0xffc
3c: 6a 01 push $0x1
3e: e8 7d 0b 00 00 call bc0 <printf>
exit();
43: e8 d9 09 00 00 call a21 <exit>
wait();
48: e8 dc 09 00 00 call a29 <wait>
return mlock(muxid);
4d: 83 ec 0c sub $0xc,%esp
50: 53 push %ebx
51: e8 7b 0a 00 00 call ad1 <mlock>
if (!mutex_lock(mux_id)){
56: 83 c4 10 add $0x10,%esp
59: 85 c0 test %eax,%eax
5b: 0f 84 86 00 00 00 je e7 <main+0xe7>
printf(1,"parent: was able to take the lock\n");
61: 50 push %eax
62: 50 push %eax
63: 68 28 10 00 00 push $0x1028
68: 6a 01 push $0x1
6a: e8 51 0b 00 00 call bc0 <printf>
}
int mutex_unlock(int muxid){
return munlock(muxid);
6f: 89 1c 24 mov %ebx,(%esp)
72: e8 62 0a 00 00 call ad9 <munlock>
77: 83 c4 10 add $0x10,%esp
return mcreate(name);
7a: 83 ec 0c sub $0xc,%esp
7d: 68 51 0f 00 00 push $0xf51
82: e8 3a 0a 00 00 call ac1 <mcreate>
87: 89 c3 mov %eax,%ebx
if (fork() == 0){
89: e8 8b 09 00 00 call a19 <fork>
8e: 83 c4 10 add $0x10,%esp
91: 85 c0 test %eax,%eax
93: 75 65 jne fa <main+0xfa>
return mlock(muxid);
95: 83 ec 0c sub $0xc,%esp
98: 53 push %ebx
99: e8 33 0a 00 00 call ad1 <mlock>
if (!mutex_lock(muxid)){
9e: 83 c4 10 add $0x10,%esp
a1: 85 c0 test %eax,%eax
a3: 0f 84 15 02 00 00 je 2be <main+0x2be>
a9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
int cv_wait(int muxid){
return waitcv(muxid);
}
int cv_signal(int muxid){
return signalcv(muxid);
b0: 83 ec 0c sub $0xc,%esp
b3: 53 push %ebx
b4: e8 30 0a 00 00 call ae9 <signalcv>
while (!cv_signal(muxid)){
b9: 83 c4 10 add $0x10,%esp
bc: 85 c0 test %eax,%eax
be: 74 f0 je b0 <main+0xb0>
return munlock(muxid);
c0: 83 ec 0c sub $0xc,%esp
c3: 53 push %ebx
c4: e8 10 0a 00 00 call ad9 <munlock>
if (!mutex_unlock(muxid)){
c9: 83 c4 10 add $0x10,%esp
cc: 85 c0 test %eax,%eax
ce: 0f 85 e5 01 00 00 jne 2b9 <main+0x2b9>
printf(1,"SIGNAL UNLOCK FAILURE\n");
d4: 50 push %eax
d5: 50 push %eax
d6: 68 6e 0f 00 00 push $0xf6e
db: 6a 01 push $0x1
dd: e8 de 0a 00 00 call bc0 <printf>
exit();
e2: e8 3a 09 00 00 call a21 <exit>
printf(1,"parent: can't take the lock\n");
e7: 52 push %edx
e8: 52 push %edx
e9: 68 34 0f 00 00 push $0xf34
ee: 6a 01 push $0x1
f0: e8 cb 0a 00 00 call bc0 <printf>
f5: 83 c4 10 add $0x10,%esp
f8: eb 80 jmp 7a <main+0x7a>
return mlock(muxid);
fa: 83 ec 0c sub $0xc,%esp
fd: 53 push %ebx
fe: e8 ce 09 00 00 call ad1 <mlock>
if (!mutex_lock(muxid)){
103: 83 c4 10 add $0x10,%esp
106: 85 c0 test %eax,%eax
108: 74 27 je 131 <main+0x131>
return waitcv(muxid);
10a: 83 ec 0c sub $0xc,%esp
10d: 53 push %ebx
10e: e8 ce 09 00 00 call ae1 <waitcv>
if (!cv_wait(muxid)){
113: 83 c4 10 add $0x10,%esp
116: 85 c0 test %eax,%eax
118: 0f 85 b3 01 00 00 jne 2d1 <main+0x2d1>
printf(1,"CV WAIT FAILURE\n");
11e: 50 push %eax
11f: 50 push %eax
120: 68 85 0f 00 00 push $0xf85
125: 6a 01 push $0x1
127: e8 94 0a 00 00 call bc0 <printf>
exit();
12c: e8 f0 08 00 00 call a21 <exit>
printf(1,"LOCK FAILURE\n");
131: 50 push %eax
132: 50 push %eax
133: 68 60 0f 00 00 push $0xf60
138: 6a 01 push $0x1
13a: e8 81 0a 00 00 call bc0 <printf>
exit();
13f: e8 dd 08 00 00 call a21 <exit>
if (prio_set(getpid(), 10) > 0){
144: e8 58 09 00 00 call aa1 <getpid>
149: 56 push %esi
14a: 56 push %esi
14b: 6a 0a push $0xa
14d: 50 push %eax
14e: e8 9e 09 00 00 call af1 <prio_set>
153: 83 c4 10 add $0x10,%esp
156: 85 c0 test %eax,%eax
158: 0f 8e fe 03 00 00 jle 55c <main+0x55c>
printf(1,"decrease priority: PASSED, should pass\n");
15e: 53 push %ebx
15f: 53 push %ebx
160: 68 4c 10 00 00 push $0x104c
165: 6a 01 push $0x1
167: e8 54 0a 00 00 call bc0 <printf>
16c: 83 c4 10 add $0x10,%esp
if (prio_set(getpid(), 0) > 0){
16f: e8 2d 09 00 00 call aa1 <getpid>
174: 52 push %edx
175: 52 push %edx
176: 6a 00 push $0x0
178: 50 push %eax
179: e8 73 09 00 00 call af1 <prio_set>
17e: 83 c4 10 add $0x10,%esp
181: 85 c0 test %eax,%eax
183: 0f 8e bd 03 00 00 jle 546 <main+0x546>
printf(1,"increase priority: PASSED, should fail\n");
189: 50 push %eax
18a: 50 push %eax
18b: 68 9c 10 00 00 push $0x109c
190: 6a 01 push $0x1
192: e8 29 0a 00 00 call bc0 <printf>
197: 83 c4 10 add $0x10,%esp
int pid = fork();
19a: e8 7a 08 00 00 call a19 <fork>
if (pid == 0){
19f: 85 c0 test %eax,%eax
int pid = fork();
1a1: 89 c3 mov %eax,%ebx
if (pid == 0){
1a3: 0f 84 9b 03 00 00 je 544 <main+0x544>
if (prio_set(pid, 15) > 0){
1a9: 57 push %edi
1aa: 57 push %edi
1ab: 6a 0f push $0xf
1ad: 50 push %eax
1ae: e8 3e 09 00 00 call af1 <prio_set>
1b3: 83 c4 10 add $0x10,%esp
1b6: 85 c0 test %eax,%eax
1b8: 0f 8e b4 03 00 00 jle 572 <main+0x572>
printf(1,"decrease child priority: PASSED, should pass\n");
1be: 56 push %esi
1bf: 56 push %esi
1c0: 68 ec 10 00 00 push $0x10ec
1c5: 6a 01 push $0x1
1c7: e8 f4 09 00 00 call bc0 <printf>
1cc: 83 c4 10 add $0x10,%esp
if (prio_set(pid, 10) > 0){
1cf: 52 push %edx
1d0: 52 push %edx
1d1: 6a 0a push $0xa
1d3: 53 push %ebx
1d4: e8 18 09 00 00 call af1 <prio_set>
1d9: 83 c4 10 add $0x10,%esp
1dc: 85 c0 test %eax,%eax
1de: 0f 8e ec 03 00 00 jle 5d0 <main+0x5d0>
printf(1,"set child priority to parent priority: PASSED, should pass\n");
1e4: 50 push %eax
1e5: 50 push %eax
1e6: 68 4c 11 00 00 push $0x114c
1eb: 6a 01 push $0x1
1ed: e8 ce 09 00 00 call bc0 <printf>
1f2: 83 c4 10 add $0x10,%esp
if (prio_set(pid, 1) > 0){
1f5: 50 push %eax
1f6: 50 push %eax
1f7: 6a 01 push $0x1
1f9: 53 push %ebx
1fa: e8 f2 08 00 00 call af1 <prio_set>
1ff: 83 c4 10 add $0x10,%esp
202: 85 c0 test %eax,%eax
204: 0f 8e b0 03 00 00 jle 5ba <main+0x5ba>
printf(1,"set child priority above parent: PASSED, should fail\n");
20a: 50 push %eax
20b: 50 push %eax
20c: 68 c4 11 00 00 push $0x11c4
211: 6a 01 push $0x1
213: e8 a8 09 00 00 call bc0 <printf>
218: 83 c4 10 add $0x10,%esp
return mcreate(name);
21b: 83 ec 0c sub $0xc,%esp
21e: be 05 00 00 00 mov $0x5,%esi
223: 68 d0 0f 00 00 push $0xfd0
228: e8 94 08 00 00 call ac1 <mcreate>
22d: 83 c4 10 add $0x10,%esp
230: 89 c3 mov %eax,%ebx
232: eb 09 jmp 23d <main+0x23d>
for(i=0; i<5; i++){
234: 83 ee 01 sub $0x1,%esi
237: 0f 84 4b 03 00 00 je 588 <main+0x588>
if (fork() == 0){
23d: e8 d7 07 00 00 call a19 <fork>
242: 85 c0 test %eax,%eax
244: 75 ee jne 234 <main+0x234>
return mlock(muxid);
246: 83 ec 0c sub $0xc,%esp
249: 53 push %ebx
24a: e8 82 08 00 00 call ad1 <mlock>
if (!mutex_lock(id)){
24f: 83 c4 10 add $0x10,%esp
252: 85 c0 test %eax,%eax
254: 0f 84 d7 fe ff ff je 131 <main+0x131>
printf(1,"%d\n", j);
25a: 56 push %esi
25b: 6a 01 push $0x1
25d: 68 d5 0f 00 00 push $0xfd5
262: 6a 01 push $0x1
264: e8 57 09 00 00 call bc0 <printf>
269: 83 c4 0c add $0xc,%esp
26c: 6a 02 push $0x2
26e: 68 d5 0f 00 00 push $0xfd5
273: 6a 01 push $0x1
275: e8 46 09 00 00 call bc0 <printf>
27a: 83 c4 0c add $0xc,%esp
27d: 6a 03 push $0x3
27f: 68 d5 0f 00 00 push $0xfd5
284: 6a 01 push $0x1
286: e8 35 09 00 00 call bc0 <printf>
printf(1,"\n");
28b: 5f pop %edi
28c: 58 pop %eax
28d: 68 e7 0f 00 00 push $0xfe7
292: 6a 01 push $0x1
294: e8 27 09 00 00 call bc0 <printf>
return munlock(muxid);
299: 89 1c 24 mov %ebx,(%esp)
29c: e8 38 08 00 00 call ad9 <munlock>
if (!mutex_unlock(id)){
2a1: 83 c4 10 add $0x10,%esp
2a4: 85 c0 test %eax,%eax
2a6: 75 11 jne 2b9 <main+0x2b9>
printf(1,"UNLOCK FAILURE\n");
2a8: 51 push %ecx
2a9: 51 push %ecx
2aa: 68 75 0f 00 00 push $0xf75
2af: 6a 01 push $0x1
2b1: e8 0a 09 00 00 call bc0 <printf>
2b6: 83 c4 10 add $0x10,%esp
exit();
2b9: e8 63 07 00 00 call a21 <exit>
printf(1,"SIGNAL LOCK FAILURE\n");
2be: 50 push %eax
2bf: 50 push %eax
2c0: 68 59 0f 00 00 push $0xf59
2c5: 6a 01 push $0x1
2c7: e8 f4 08 00 00 call bc0 <printf>
exit();
2cc: e8 50 07 00 00 call a21 <exit>
wait();
2d1: e8 53 07 00 00 call a29 <wait>
printf(1,"CV SUCCESS\n");
2d6: 50 push %eax
2d7: 50 push %eax
2d8: 68 96 0f 00 00 push $0xf96
2dd: 6a 01 push $0x1
2df: e8 dc 08 00 00 call bc0 <printf>
struct myproc *p0 = (struct myproc*)malloc(sizeof(struct myproc));
2e4: c7 04 24 08 00 00 00 movl $0x8,(%esp)
2eb: e8 30 0b 00 00 call e20 <malloc>
struct myproc *p1 = (struct myproc*)malloc(sizeof(struct myproc));
2f0: c7 04 24 08 00 00 00 movl $0x8,(%esp)
struct myproc *p0 = (struct myproc*)malloc(sizeof(struct myproc));
2f7: 89 c7 mov %eax,%edi
struct myproc *p1 = (struct myproc*)malloc(sizeof(struct myproc));
2f9: e8 22 0b 00 00 call e20 <malloc>
struct myproc *p2 = (struct myproc*)malloc(sizeof(struct myproc));
2fe: c7 04 24 08 00 00 00 movl $0x8,(%esp)
struct myproc *p1 = (struct myproc*)malloc(sizeof(struct myproc));
305: 89 c3 mov %eax,%ebx
struct myproc *p2 = (struct myproc*)malloc(sizeof(struct myproc));
307: e8 14 0b 00 00 call e20 <malloc>
struct myproc *p3 = (struct myproc*)malloc(sizeof(struct myproc));
30c: c7 04 24 08 00 00 00 movl $0x8,(%esp)
struct myproc *p2 = (struct myproc*)malloc(sizeof(struct myproc));
313: 89 c6 mov %eax,%esi
315: 89 45 dc mov %eax,-0x24(%ebp)
struct myproc *p3 = (struct myproc*)malloc(sizeof(struct myproc));
318: e8 03 0b 00 00 call e20 <malloc>
struct myproc *p4 = (struct myproc*)malloc(sizeof(struct myproc));
31d: c7 04 24 08 00 00 00 movl $0x8,(%esp)
struct myproc *p3 = (struct myproc*)malloc(sizeof(struct myproc));
324: 89 45 e4 mov %eax,-0x1c(%ebp)
struct myproc *p4 = (struct myproc*)malloc(sizeof(struct myproc));
327: e8 f4 0a 00 00 call e20 <malloc>
struct myproc *p5 = (struct myproc*)malloc(sizeof(struct myproc));
32c: c7 04 24 08 00 00 00 movl $0x8,(%esp)
struct myproc *p4 = (struct myproc*)malloc(sizeof(struct myproc));
333: 89 45 e0 mov %eax,-0x20(%ebp)
struct myproc *p5 = (struct myproc*)malloc(sizeof(struct myproc));
336: e8 e5 0a 00 00 call e20 <malloc>
p3->priority = 3; p3->name = "proc 3";
33b: 8b 55 e4 mov -0x1c(%ebp),%edx
struct myproc *p5 = (struct myproc*)malloc(sizeof(struct myproc));
33e: 89 c1 mov %eax,%ecx
p4->priority = 4; p4->name = "proc 4";
340: 8b 45 e0 mov -0x20(%ebp),%eax
p0->priority = 0; p0->name = "proc 0";
343: c7 07 00 00 00 00 movl $0x0,(%edi)
349: c7 47 04 a2 0f 00 00 movl $0xfa2,0x4(%edi)
p5->priority = 0; p5->name = "proc 5";
350: 83 c4 10 add $0x10,%esp
p1->priority = 1; p1->name = "proc 1";
353: c7 03 01 00 00 00 movl $0x1,(%ebx)
359: c7 43 04 a9 0f 00 00 movl $0xfa9,0x4(%ebx)
p2->priority = 2; p2->name = "proc 2";
360: c7 06 02 00 00 00 movl $0x2,(%esi)
366: c7 46 04 b0 0f 00 00 movl $0xfb0,0x4(%esi)
p3->priority = 3; p3->name = "proc 3";
36d: c7 02 03 00 00 00 movl $0x3,(%edx)
373: c7 42 04 b7 0f 00 00 movl $0xfb7,0x4(%edx)
p4->priority = 4; p4->name = "proc 4";
37a: c7 00 04 00 00 00 movl $0x4,(%eax)
380: c7 40 04 be 0f 00 00 movl $0xfbe,0x4(%eax)
p5->priority = 0; p5->name = "proc 5";
387: 31 c0 xor %eax,%eax
389: c7 01 00 00 00 00 movl $0x0,(%ecx)
38f: c7 41 04 c5 0f 00 00 movl $0xfc5,0x4(%ecx)
head_tail[m][n] = 0;
396: c7 80 a0 16 00 00 00 movl $0x0,0x16a0(%eax)
39d: 00 00 00
3a0: c7 80 a4 16 00 00 00 movl $0x0,0x16a4(%eax)
3a7: 00 00 00
3aa: 83 c0 08 add $0x8,%eax
for (m=0; m<PRIO_MAX; m++){
3ad: 83 f8 50 cmp $0x50,%eax
3b0: 75 e4 jne 396 <main+0x396>
int priority = p->priority;
3b2: 8b 37 mov (%edi),%esi
3b4: 89 4d d8 mov %ecx,-0x28(%ebp)
if (tail == ((head-1)%QSIZE)){
3b7: 8b 0c f5 a0 16 00 00 mov 0x16a0(,%esi,8),%ecx
int tail = head_tail[priority][1];
3be: 8b 14 f5 a4 16 00 00 mov 0x16a4(,%esi,8),%edx
if (tail == ((head-1)%QSIZE)){
3c5: 8d 41 ff lea -0x1(%ecx),%eax
int tail = head_tail[priority][1];
3c8: 89 55 d4 mov %edx,-0x2c(%ebp)
if (tail == ((head-1)%QSIZE)){
3cb: b9 64 00 00 00 mov $0x64,%ecx
3d0: 99 cltd
3d1: f7 f9 idiv %ecx
3d3: 8b 4d d4 mov -0x2c(%ebp),%ecx
3d6: 39 d1 cmp %edx,%ecx
3d8: 74 1e je 3f8 <main+0x3f8>
pqueues[priority][tail] = p;
3da: 6b c6 64 imul $0x64,%esi,%eax
3dd: 01 c8 add %ecx,%eax
3df: 89 3c 85 00 17 00 00 mov %edi,0x1700(,%eax,4)
head_tail[priority][1] = (tail+1)%QSIZE;
3e6: 8d 41 01 lea 0x1(%ecx),%eax
3e9: b9 64 00 00 00 mov $0x64,%ecx
3ee: 99 cltd
3ef: f7 f9 idiv %ecx
3f1: 89 14 f5 a4 16 00 00 mov %edx,0x16a4(,%esi,8)
int priority = p->priority;
3f8: 8b 33 mov (%ebx),%esi
if (tail == ((head-1)%QSIZE)){
3fa: b9 64 00 00 00 mov $0x64,%ecx
3ff: 8b 04 f5 a0 16 00 00 mov 0x16a0(,%esi,8),%eax
int tail = head_tail[priority][1];
406: 8b 3c f5 a4 16 00 00 mov 0x16a4(,%esi,8),%edi
if (tail == ((head-1)%QSIZE)){
40d: 83 e8 01 sub $0x1,%eax
410: 99 cltd
411: f7 f9 idiv %ecx
413: 39 d7 cmp %edx,%edi
415: 74 19 je 430 <main+0x430>
pqueues[priority][tail] = p;
417: 6b c6 64 imul $0x64,%esi,%eax
41a: 01 f8 add %edi,%eax
41c: 89 1c 85 00 17 00 00 mov %ebx,0x1700(,%eax,4)
head_tail[priority][1] = (tail+1)%QSIZE;
423: 8d 47 01 lea 0x1(%edi),%eax
426: 99 cltd
427: f7 f9 idiv %ecx
429: 89 14 f5 a4 16 00 00 mov %edx,0x16a4(,%esi,8)
int priority = p->priority;
430: 8b 4d dc mov -0x24(%ebp),%ecx
if (tail == ((head-1)%QSIZE)){
433: bf 64 00 00 00 mov $0x64,%edi
int priority = p->priority;
438: 8b 19 mov (%ecx),%ebx
if (tail == ((head-1)%QSIZE)){
43a: 8b 04 dd a0 16 00 00 mov 0x16a0(,%ebx,8),%eax
int tail = head_tail[priority][1];
441: 8b 34 dd a4 16 00 00 mov 0x16a4(,%ebx,8),%esi
if (tail == ((head-1)%QSIZE)){
448: 83 e8 01 sub $0x1,%eax
44b: 99 cltd
44c: f7 ff idiv %edi
44e: 39 d6 cmp %edx,%esi
450: 74 19 je 46b <main+0x46b>
pqueues[priority][tail] = p;
452: 6b c3 64 imul $0x64,%ebx,%eax
455: 01 f0 add %esi,%eax
457: 89 0c 85 00 17 00 00 mov %ecx,0x1700(,%eax,4)
head_tail[priority][1] = (tail+1)%QSIZE;
45e: 8d 46 01 lea 0x1(%esi),%eax
461: 99 cltd
462: f7 ff idiv %edi
464: 89 14 dd a4 16 00 00 mov %edx,0x16a4(,%ebx,8)
int priority = p->priority;
46b: 8b 4d e4 mov -0x1c(%ebp),%ecx
if (tail == ((head-1)%QSIZE)){
46e: bf 64 00 00 00 mov $0x64,%edi
int priority = p->priority;
473: 8b 31 mov (%ecx),%esi
if (tail == ((head-1)%QSIZE)){
475: 8b 04 f5 a0 16 00 00 mov 0x16a0(,%esi,8),%eax
int tail = head_tail[priority][1];
47c: 8b 1c f5 a4 16 00 00 mov 0x16a4(,%esi,8),%ebx
if (tail == ((head-1)%QSIZE)){
483: 83 e8 01 sub $0x1,%eax
486: 99 cltd
487: f7 ff idiv %edi
489: 39 d3 cmp %edx,%ebx
48b: 74 19 je 4a6 <main+0x4a6>
pqueues[priority][tail] = p;
48d: 6b c6 64 imul $0x64,%esi,%eax
490: 01 d8 add %ebx,%eax
492: 89 0c 85 00 17 00 00 mov %ecx,0x1700(,%eax,4)
head_tail[priority][1] = (tail+1)%QSIZE;
499: 8d 43 01 lea 0x1(%ebx),%eax
49c: 99 cltd
49d: f7 ff idiv %edi
49f: 89 14 f5 a4 16 00 00 mov %edx,0x16a4(,%esi,8)
int priority = p->priority;
4a6: 8b 4d e0 mov -0x20(%ebp),%ecx
if (tail == ((head-1)%QSIZE)){
4a9: bf 64 00 00 00 mov $0x64,%edi
int priority = p->priority;
4ae: 8b 31 mov (%ecx),%esi
if (tail == ((head-1)%QSIZE)){
4b0: 8b 04 f5 a0 16 00 00 mov 0x16a0(,%esi,8),%eax
int tail = head_tail[priority][1];
4b7: 8b 1c f5 a4 16 00 00 mov 0x16a4(,%esi,8),%ebx
if (tail == ((head-1)%QSIZE)){
4be: 83 e8 01 sub $0x1,%eax
4c1: 99 cltd
4c2: f7 ff idiv %edi
4c4: 39 d3 cmp %edx,%ebx
4c6: 74 19 je 4e1 <main+0x4e1>
pqueues[priority][tail] = p;
4c8: 6b c6 64 imul $0x64,%esi,%eax
4cb: 01 d8 add %ebx,%eax
4cd: 89 0c 85 00 17 00 00 mov %ecx,0x1700(,%eax,4)
head_tail[priority][1] = (tail+1)%QSIZE;
4d4: 8d 43 01 lea 0x1(%ebx),%eax
4d7: 99 cltd
4d8: f7 ff idiv %edi
4da: 89 14 f5 a4 16 00 00 mov %edx,0x16a4(,%esi,8)
int priority = p->priority;
4e1: 8b 4d d8 mov -0x28(%ebp),%ecx
if (tail == ((head-1)%QSIZE)){
4e4: bf 64 00 00 00 mov $0x64,%edi
int priority = p->priority;
4e9: 8b 31 mov (%ecx),%esi
if (tail == ((head-1)%QSIZE)){
4eb: 8b 04 f5 a0 16 00 00 mov 0x16a0(,%esi,8),%eax
int tail = head_tail[priority][1];
4f2: 8b 1c f5 a4 16 00 00 mov 0x16a4(,%esi,8),%ebx
if (tail == ((head-1)%QSIZE)){
4f9: 83 e8 01 sub $0x1,%eax
4fc: 99 cltd
4fd: f7 ff idiv %edi
4ff: 39 d3 cmp %edx,%ebx
501: 74 19 je 51c <main+0x51c>
pqueues[priority][tail] = p;
503: 6b c6 64 imul $0x64,%esi,%eax
506: 01 d8 add %ebx,%eax
508: 89 0c 85 00 17 00 00 mov %ecx,0x1700(,%eax,4)
head_tail[priority][1] = (tail+1)%QSIZE;
50f: 8d 43 01 lea 0x1(%ebx),%eax
512: 99 cltd
513: f7 ff idiv %edi
515: 89 14 f5 a4 16 00 00 mov %edx,0x16a4(,%esi,8)
struct myproc *p = pq_dequeue();
51c: e8 9f 01 00 00 call 6c0 <pq_dequeue>
while (p != NULL){
521: 83 f8 ff cmp $0xffffffff,%eax
524: 0f 84 1a fc ff ff je 144 <main+0x144>
printf(1, "%s\n",p->name);
52a: 57 push %edi
52b: ff 70 04 pushl 0x4(%eax)
52e: 68 cc 0f 00 00 push $0xfcc
533: 6a 01 push $0x1
535: e8 86 06 00 00 call bc0 <printf>
p = pq_dequeue();
53a: e8 81 01 00 00 call 6c0 <pq_dequeue>
53f: 83 c4 10 add $0x10,%esp
542: eb dd jmp 521 <main+0x521>
544: eb fe jmp 544 <main+0x544>
printf(1,"increase priority: FAILED, should fail\n");
546: 50 push %eax
547: 50 push %eax
548: 68 c4 10 00 00 push $0x10c4
54d: 6a 01 push $0x1
54f: e8 6c 06 00 00 call bc0 <printf>
554: 83 c4 10 add $0x10,%esp
557: e9 3e fc ff ff jmp 19a <main+0x19a>
printf(1,"decrease priority: FAILED, should pass\n");
55c: 51 push %ecx
55d: 51 push %ecx
55e: 68 74 10 00 00 push $0x1074
563: 6a 01 push $0x1
565: e8 56 06 00 00 call bc0 <printf>
56a: 83 c4 10 add $0x10,%esp
56d: e9 fd fb ff ff jmp 16f <main+0x16f>
printf(1,"decrease child priority: FAILED, should pass\n");
572: 51 push %ecx
573: 51 push %ecx
574: 68 1c 11 00 00 push $0x111c
579: 6a 01 push $0x1
57b: e8 40 06 00 00 call bc0 <printf>
580: 83 c4 10 add $0x10,%esp
583: e9 47 fc ff ff jmp 1cf <main+0x1cf>
588: be 0a 00 00 00 mov $0xa,%esi
wait();
58d: e8 97 04 00 00 call a29 <wait>
for(i=0; i<10; i++){
592: 83 ee 01 sub $0x1,%esi
595: 75 f6 jne 58d <main+0x58d>
return mdelete(muxid);
597: 83 ec 0c sub $0xc,%esp
59a: 53 push %ebx
59b: e8 29 05 00 00 call ac9 <mdelete>
if (!mutex_delete(id)){
5a0: 83 c4 10 add $0x10,%esp
5a3: 85 c0 test %eax,%eax
5a5: 75 3f jne 5e6 <main+0x5e6>
printf(1,"DELETE FAILURE\n");
5a7: 52 push %edx
5a8: 52 push %edx
5a9: 68 d9 0f 00 00 push $0xfd9
5ae: 6a 01 push $0x1
5b0: e8 0b 06 00 00 call bc0 <printf>
exit();
5b5: e8 67 04 00 00 call a21 <exit>
printf(1,"set child priority above parent: FAILED, should fail\n");
5ba: 50 push %eax
5bb: 50 push %eax
5bc: 68 fc 11 00 00 push $0x11fc
5c1: 6a 01 push $0x1
5c3: e8 f8 05 00 00 call bc0 <printf>
5c8: 83 c4 10 add $0x10,%esp
5cb: e9 4b fc ff ff jmp 21b <main+0x21b>
printf(1,"set child priority to parent priority: FAILED, should pass\n");
5d0: 50 push %eax
5d1: 50 push %eax
5d2: 68 88 11 00 00 push $0x1188
5d7: 6a 01 push $0x1
5d9: e8 e2 05 00 00 call bc0 <printf>
5de: 83 c4 10 add $0x10,%esp
5e1: e9 0f fc ff ff jmp 1f5 <main+0x1f5>
return mlock(muxid);
5e6: 83 ec 0c sub $0xc,%esp
5e9: 53 push %ebx
5ea: e8 e2 04 00 00 call ad1 <mlock>
if (!mutex_lock(id)){
5ef: 83 c4 10 add $0x10,%esp
5f2: 85 c0 test %eax,%eax
5f4: 0f 85 bf fc ff ff jne 2b9 <main+0x2b9>
printf(1,"DELETE SUCCESS\n");
5fa: 50 push %eax
5fb: 50 push %eax
5fc: 68 e9 0f 00 00 push $0xfe9
601: 6a 01 push $0x1
603: e8 b8 05 00 00 call bc0 <printf>
exit();
608: e8 14 04 00 00 call a21 <exit>
60d: 66 90 xchg %ax,%ax
60f: 90 nop
00000610 <init_queue>:
void init_queue(){
610: 55 push %ebp
611: b8 a0 16 00 00 mov $0x16a0,%eax
616: 89 e5 mov %esp,%ebp
618: 90 nop
619: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
head_tail[m][n] = 0;
620: c7 00 00 00 00 00 movl $0x0,(%eax)
626: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
62d: 83 c0 08 add $0x8,%eax
for (m=0; m<PRIO_MAX; m++){
630: 3d f0 16 00 00 cmp $0x16f0,%eax
635: 75 e9 jne 620 <init_queue+0x10>
}
637: 5d pop %ebp
638: c3 ret
639: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
00000640 <pq_enqueue>:
pq_enqueue (struct myproc *p){
640: 55 push %ebp
if (tail == ((head-1)%QSIZE)){
641: b9 1f 85 eb 51 mov $0x51eb851f,%ecx
pq_enqueue (struct myproc *p){
646: 89 e5 mov %esp,%ebp
648: 57 push %edi
649: 56 push %esi
int priority = p->priority;
64a: 8b 45 08 mov 0x8(%ebp),%eax
pq_enqueue (struct myproc *p){
64d: 53 push %ebx
int priority = p->priority;
64e: 8b 38 mov (%eax),%edi
if (tail == ((head-1)%QSIZE)){
650: 8b 04 fd a0 16 00 00 mov 0x16a0(,%edi,8),%eax
int tail = head_tail[priority][1];
657: 8b 1c fd a4 16 00 00 mov 0x16a4(,%edi,8),%ebx
if (tail == ((head-1)%QSIZE)){
65e: 8d 70 ff lea -0x1(%eax),%esi
661: 89 f0 mov %esi,%eax
663: f7 e9 imul %ecx
665: 89 f0 mov %esi,%eax
667: c1 f8 1f sar $0x1f,%eax
66a: c1 fa 05 sar $0x5,%edx
66d: 29 c2 sub %eax,%edx
66f: 6b d2 64 imul $0x64,%edx,%edx
672: 29 d6 sub %edx,%esi
674: 39 de cmp %ebx,%esi
676: 74 38 je 6b0 <pq_enqueue+0x70>
pqueues[priority][tail] = p;
678: 6b c7 64 imul $0x64,%edi,%eax
67b: 8b 75 08 mov 0x8(%ebp),%esi
67e: 01 d8 add %ebx,%eax
head_tail[priority][1] = (tail+1)%QSIZE;
680: 83 c3 01 add $0x1,%ebx
pqueues[priority][tail] = p;
683: 89 34 85 00 17 00 00 mov %esi,0x1700(,%eax,4)
head_tail[priority][1] = (tail+1)%QSIZE;
68a: 89 d8 mov %ebx,%eax
68c: f7 e9 imul %ecx
68e: 89 d8 mov %ebx,%eax
690: c1 f8 1f sar $0x1f,%eax
693: 89 d1 mov %edx,%ecx
695: c1 f9 05 sar $0x5,%ecx
698: 29 c1 sub %eax,%ecx
return 1;
69a: b8 01 00 00 00 mov $0x1,%eax
head_tail[priority][1] = (tail+1)%QSIZE;
69f: 6b c9 64 imul $0x64,%ecx,%ecx
6a2: 29 cb sub %ecx,%ebx
6a4: 89 1c fd a4 16 00 00 mov %ebx,0x16a4(,%edi,8)
}
6ab: 5b pop %ebx
6ac: 5e pop %esi
6ad: 5f pop %edi
6ae: 5d pop %ebp
6af: c3 ret
return -1;
6b0: b8 ff ff ff ff mov $0xffffffff,%eax
6b5: eb f4 jmp 6ab <pq_enqueue+0x6b>
6b7: 89 f6 mov %esi,%esi
6b9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
000006c0 <pq_dequeue>:
pq_dequeue(){
6c0: 55 push %ebp
int priority = 0;
6c1: 31 c9 xor %ecx,%ecx
pq_dequeue(){
6c3: 89 e5 mov %esp,%ebp
6c5: 56 push %esi
6c6: 53 push %ebx
6c7: 89 f6 mov %esi,%esi
6c9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
while (priority < PRIO_MAX && head_tail[priority][0] == head_tail[priority][1]) // queue is empty if head == tail
6d0: 8b 04 cd a0 16 00 00 mov 0x16a0(,%ecx,8),%eax
6d7: 3b 04 cd a4 16 00 00 cmp 0x16a4(,%ecx,8),%eax
6de: 75 30 jne 710 <pq_dequeue+0x50>
priority++;
6e0: 83 c1 01 add $0x1,%ecx
while (priority < PRIO_MAX && head_tail[priority][0] == head_tail[priority][1]) // queue is empty if head == tail
6e3: 83 f9 0a cmp $0xa,%ecx
6e6: 75 e8 jne 6d0 <pq_dequeue+0x10>
printf(1,"all queues are empty\n");
6e8: 83 ec 08 sub $0x8,%esp
6eb: be ff ff ff ff mov $0xffffffff,%esi
6f0: 68 18 0f 00 00 push $0xf18
6f5: 6a 01 push $0x1
6f7: e8 c4 04 00 00 call bc0 <printf>
6fc: 83 c4 10 add $0x10,%esp
}
6ff: 8d 65 f8 lea -0x8(%ebp),%esp
702: 89 f0 mov %esi,%eax
704: 5b pop %ebx
705: 5e pop %esi
706: 5d pop %ebp
707: c3 ret
708: 90 nop
709: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
struct myproc *p = pqueues[priority][head];
710: 6b d1 64 imul $0x64,%ecx,%edx
head_tail[priority][0] = (head+1)%QSIZE;
713: 8d 58 01 lea 0x1(%eax),%ebx
struct myproc *p = pqueues[priority][head];
716: 01 c2 add %eax,%edx
head_tail[priority][0] = (head+1)%QSIZE;
718: 89 d8 mov %ebx,%eax
struct myproc *p = pqueues[priority][head];
71a: 8b 34 95 00 17 00 00 mov 0x1700(,%edx,4),%esi
head_tail[priority][0] = (head+1)%QSIZE;
721: ba 1f 85 eb 51 mov $0x51eb851f,%edx
726: f7 ea imul %edx
728: 89 d8 mov %ebx,%eax
72a: c1 f8 1f sar $0x1f,%eax
72d: c1 fa 05 sar $0x5,%edx
730: 29 c2 sub %eax,%edx
732: 89 d8 mov %ebx,%eax
734: 6b d2 64 imul $0x64,%edx,%edx
737: 29 d0 sub %edx,%eax
739: 89 04 cd a0 16 00 00 mov %eax,0x16a0(,%ecx,8)
}
740: 8d 65 f8 lea -0x8(%ebp),%esp
743: 89 f0 mov %esi,%eax
745: 5b pop %ebx
746: 5e pop %esi
747: 5d pop %ebp
748: c3 ret
749: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
00000750 <mutex_create>:
int mutex_create(char *name){
750: 55 push %ebp
751: 89 e5 mov %esp,%ebp
}
753: 5d pop %ebp
return mcreate(name);
754: e9 68 03 00 00 jmp ac1 <mcreate>
759: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
00000760 <mutex_delete>:
int mutex_delete(int muxid){
760: 55 push %ebp
761: 89 e5 mov %esp,%ebp
}
763: 5d pop %ebp
return mdelete(muxid);
764: e9 60 03 00 00 jmp ac9 <mdelete>
769: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
00000770 <mutex_lock>:
int mutex_lock(int muxid){
770: 55 push %ebp
771: 89 e5 mov %esp,%ebp
}
773: 5d pop %ebp
return mlock(muxid);
774: e9 58 03 00 00 jmp ad1 <mlock>
779: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
00000780 <mutex_unlock>:
int mutex_unlock(int muxid){
780: 55 push %ebp
781: 89 e5 mov %esp,%ebp
}
783: 5d pop %ebp
return munlock(muxid);
784: e9 50 03 00 00 jmp ad9 <munlock>
789: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
00000790 <cv_wait>:
int cv_wait(int muxid){
790: 55 push %ebp
791: 89 e5 mov %esp,%ebp
}
793: 5d pop %ebp
return waitcv(muxid);
794: e9 48 03 00 00 jmp ae1 <waitcv>
799: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
000007a0 <cv_signal>:
int cv_signal(int muxid){
7a0: 55 push %ebp
7a1: 89 e5 mov %esp,%ebp
7a3: 5d pop %ebp
return signalcv(muxid);
7a4: e9 40 03 00 00 jmp ae9 <signalcv>
7a9: 66 90 xchg %ax,%ax
7ab: 66 90 xchg %ax,%ax
7ad: 66 90 xchg %ax,%ax
7af: 90 nop
000007b0 <strcpy>:
#include "user.h"
#include "x86.h"
char *
strcpy(char *s, char *t)
{
7b0: 55 push %ebp
7b1: 89 e5 mov %esp,%ebp
7b3: 53 push %ebx
7b4: 8b 45 08 mov 0x8(%ebp),%eax
7b7: 8b 4d 0c mov 0xc(%ebp),%ecx
char *os;
os = s;
while ((*s++ = *t++) != 0)
7ba: 89 c2 mov %eax,%edx
7bc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
7c0: 83 c1 01 add $0x1,%ecx
7c3: 0f b6 59 ff movzbl -0x1(%ecx),%ebx
7c7: 83 c2 01 add $0x1,%edx
7ca: 84 db test %bl,%bl
7cc: 88 5a ff mov %bl,-0x1(%edx)
7cf: 75 ef jne 7c0 <strcpy+0x10>
;
return os;
}
7d1: 5b pop %ebx
7d2: 5d pop %ebp
7d3: c3 ret
7d4: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
7da: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
000007e0 <strcmp>:
int
strcmp(const char *p, const char *q)
{
7e0: 55 push %ebp
7e1: 89 e5 mov %esp,%ebp
7e3: 53 push %ebx
7e4: 8b 55 08 mov 0x8(%ebp),%edx
7e7: 8b 4d 0c mov 0xc(%ebp),%ecx
while (*p && *p == *q) p++, q++;
7ea: 0f b6 02 movzbl (%edx),%eax
7ed: 0f b6 19 movzbl (%ecx),%ebx
7f0: 84 c0 test %al,%al
7f2: 75 1c jne 810 <strcmp+0x30>
7f4: eb 2a jmp 820 <strcmp+0x40>
7f6: 8d 76 00 lea 0x0(%esi),%esi
7f9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
800: 83 c2 01 add $0x1,%edx
803: 0f b6 02 movzbl (%edx),%eax
806: 83 c1 01 add $0x1,%ecx
809: 0f b6 19 movzbl (%ecx),%ebx
80c: 84 c0 test %al,%al
80e: 74 10 je 820 <strcmp+0x40>
810: 38 d8 cmp %bl,%al
812: 74 ec je 800 <strcmp+0x20>
return (uchar)*p - (uchar)*q;
814: 29 d8 sub %ebx,%eax
}
816: 5b pop %ebx
817: 5d pop %ebp
818: c3 ret
819: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
820: 31 c0 xor %eax,%eax
return (uchar)*p - (uchar)*q;
822: 29 d8 sub %ebx,%eax
}
824: 5b pop %ebx
825: 5d pop %ebp
826: c3 ret
827: 89 f6 mov %esi,%esi
829: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00000830 <strlen>:
uint
strlen(char *s)
{
830: 55 push %ebp
831: 89 e5 mov %esp,%ebp
833: 8b 4d 08 mov 0x8(%ebp),%ecx
int n;
for (n = 0; s[n]; n++)
836: 80 39 00 cmpb $0x0,(%ecx)
839: 74 15 je 850 <strlen+0x20>
83b: 31 d2 xor %edx,%edx
83d: 8d 76 00 lea 0x0(%esi),%esi
840: 83 c2 01 add $0x1,%edx
843: 80 3c 11 00 cmpb $0x0,(%ecx,%edx,1)
847: 89 d0 mov %edx,%eax
849: 75 f5 jne 840 <strlen+0x10>
;
return n;
}
84b: 5d pop %ebp
84c: c3 ret
84d: 8d 76 00 lea 0x0(%esi),%esi
for (n = 0; s[n]; n++)
850: 31 c0 xor %eax,%eax
}
852: 5d pop %ebp
853: c3 ret
854: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
85a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
00000860 <memset>:
void *
memset(void *dst, int c, uint n)
{
860: 55 push %ebp
861: 89 e5 mov %esp,%ebp
863: 57 push %edi
864: 8b 55 08 mov 0x8(%ebp),%edx
}
static inline void
stosb(void *addr, int data, int cnt)
{
asm volatile("cld; rep stosb" : "=D"(addr), "=c"(cnt) : "0"(addr), "1"(cnt), "a"(data) : "memory", "cc");
867: 8b 4d 10 mov 0x10(%ebp),%ecx
86a: 8b 45 0c mov 0xc(%ebp),%eax
86d: 89 d7 mov %edx,%edi
86f: fc cld
870: f3 aa rep stos %al,%es:(%edi)
stosb(dst, c, n);
return dst;
}
872: 89 d0 mov %edx,%eax
874: 5f pop %edi
875: 5d pop %ebp
876: c3 ret
877: 89 f6 mov %esi,%esi
879: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00000880 <strchr>:
char *
strchr(const char *s, char c)
{
880: 55 push %ebp
881: 89 e5 mov %esp,%ebp
883: 53 push %ebx
884: 8b 45 08 mov 0x8(%ebp),%eax
887: 8b 5d 0c mov 0xc(%ebp),%ebx
for (; *s; s++)
88a: 0f b6 10 movzbl (%eax),%edx
88d: 84 d2 test %dl,%dl
88f: 74 1d je 8ae <strchr+0x2e>
if (*s == c) return (char *)s;
891: 38 d3 cmp %dl,%bl
893: 89 d9 mov %ebx,%ecx
895: 75 0d jne 8a4 <strchr+0x24>
897: eb 17 jmp 8b0 <strchr+0x30>
899: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8a0: 38 ca cmp %cl,%dl
8a2: 74 0c je 8b0 <strchr+0x30>
for (; *s; s++)
8a4: 83 c0 01 add $0x1,%eax
8a7: 0f b6 10 movzbl (%eax),%edx
8aa: 84 d2 test %dl,%dl
8ac: 75 f2 jne 8a0 <strchr+0x20>
return 0;
8ae: 31 c0 xor %eax,%eax
}
8b0: 5b pop %ebx
8b1: 5d pop %ebp
8b2: c3 ret
8b3: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
8b9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
000008c0 <gets>:
char *
gets(char *buf, int max)
{
8c0: 55 push %ebp
8c1: 89 e5 mov %esp,%ebp
8c3: 57 push %edi
8c4: 56 push %esi
8c5: 53 push %ebx
int i, cc;
char c;
for (i = 0; i + 1 < max;) {
8c6: 31 f6 xor %esi,%esi
8c8: 89 f3 mov %esi,%ebx
{
8ca: 83 ec 1c sub $0x1c,%esp
8cd: 8b 7d 08 mov 0x8(%ebp),%edi
for (i = 0; i + 1 < max;) {
8d0: eb 2f jmp 901 <gets+0x41>
8d2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
cc = read(0, &c, 1);
8d8: 8d 45 e7 lea -0x19(%ebp),%eax
8db: 83 ec 04 sub $0x4,%esp
8de: 6a 01 push $0x1
8e0: 50 push %eax
8e1: 6a 00 push $0x0
8e3: e8 51 01 00 00 call a39 <read>
if (cc < 1) break;
8e8: 83 c4 10 add $0x10,%esp
8eb: 85 c0 test %eax,%eax
8ed: 7e 1c jle 90b <gets+0x4b>
buf[i++] = c;
8ef: 0f b6 45 e7 movzbl -0x19(%ebp),%eax
8f3: 83 c7 01 add $0x1,%edi
8f6: 88 47 ff mov %al,-0x1(%edi)
if (c == '\n' || c == '\r') break;
8f9: 3c 0a cmp $0xa,%al
8fb: 74 23 je 920 <gets+0x60>
8fd: 3c 0d cmp $0xd,%al
8ff: 74 1f je 920 <gets+0x60>
for (i = 0; i + 1 < max;) {
901: 83 c3 01 add $0x1,%ebx
904: 3b 5d 0c cmp 0xc(%ebp),%ebx
907: 89 fe mov %edi,%esi
909: 7c cd jl 8d8 <gets+0x18>
90b: 89 f3 mov %esi,%ebx
}
buf[i] = '\0';
return buf;
}
90d: 8b 45 08 mov 0x8(%ebp),%eax
buf[i] = '\0';
910: c6 03 00 movb $0x0,(%ebx)
}
913: 8d 65 f4 lea -0xc(%ebp),%esp
916: 5b pop %ebx
917: 5e pop %esi
918: 5f pop %edi
919: 5d pop %ebp
91a: c3 ret
91b: 90 nop
91c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
920: 8b 75 08 mov 0x8(%ebp),%esi
923: 8b 45 08 mov 0x8(%ebp),%eax
926: 01 de add %ebx,%esi
928: 89 f3 mov %esi,%ebx
buf[i] = '\0';
92a: c6 03 00 movb $0x0,(%ebx)
}
92d: 8d 65 f4 lea -0xc(%ebp),%esp
930: 5b pop %ebx
931: 5e pop %esi
932: 5f pop %edi
933: 5d pop %ebp
934: c3 ret
935: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
939: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00000940 <stat>:
int
stat(char *n, struct stat *st)
{
940: 55 push %ebp
941: 89 e5 mov %esp,%ebp
943: 56 push %esi
944: 53 push %ebx
int fd;
int r;
fd = open(n, O_RDONLY);
945: 83 ec 08 sub $0x8,%esp
948: 6a 00 push $0x0
94a: ff 75 08 pushl 0x8(%ebp)
94d: e8 0f 01 00 00 call a61 <open>
if (fd < 0) return -1;
952: 83 c4 10 add $0x10,%esp
955: 85 c0 test %eax,%eax
957: 78 27 js 980 <stat+0x40>
r = fstat(fd, st);
959: 83 ec 08 sub $0x8,%esp
95c: ff 75 0c pushl 0xc(%ebp)
95f: 89 c3 mov %eax,%ebx
961: 50 push %eax
962: e8 12 01 00 00 call a79 <fstat>
close(fd);
967: 89 1c 24 mov %ebx,(%esp)
r = fstat(fd, st);
96a: 89 c6 mov %eax,%esi
close(fd);
96c: e8 d8 00 00 00 call a49 <close>
return r;
971: 83 c4 10 add $0x10,%esp
}
974: 8d 65 f8 lea -0x8(%ebp),%esp
977: 89 f0 mov %esi,%eax
979: 5b pop %ebx
97a: 5e pop %esi
97b: 5d pop %ebp
97c: c3 ret
97d: 8d 76 00 lea 0x0(%esi),%esi
if (fd < 0) return -1;
980: be ff ff ff ff mov $0xffffffff,%esi
985: eb ed jmp 974 <stat+0x34>
987: 89 f6 mov %esi,%esi
989: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00000990 <atoi>:
int
atoi(const char *s)
{
990: 55 push %ebp
991: 89 e5 mov %esp,%ebp
993: 53 push %ebx
994: 8b 4d 08 mov 0x8(%ebp),%ecx
int n;
n = 0;
while ('0' <= *s && *s <= '9') n= n * 10 + *s++ - '0';
997: 0f be 11 movsbl (%ecx),%edx
99a: 8d 42 d0 lea -0x30(%edx),%eax
99d: 3c 09 cmp $0x9,%al
n = 0;
99f: b8 00 00 00 00 mov $0x0,%eax
while ('0' <= *s && *s <= '9') n= n * 10 + *s++ - '0';
9a4: 77 1f ja 9c5 <atoi+0x35>
9a6: 8d 76 00 lea 0x0(%esi),%esi
9a9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
9b0: 8d 04 80 lea (%eax,%eax,4),%eax
9b3: 83 c1 01 add $0x1,%ecx
9b6: 8d 44 42 d0 lea -0x30(%edx,%eax,2),%eax
9ba: 0f be 11 movsbl (%ecx),%edx
9bd: 8d 5a d0 lea -0x30(%edx),%ebx
9c0: 80 fb 09 cmp $0x9,%bl
9c3: 76 eb jbe 9b0 <atoi+0x20>
return n;
}
9c5: 5b pop %ebx
9c6: 5d pop %ebp
9c7: c3 ret
9c8: 90 nop
9c9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
000009d0 <memmove>:
void *
memmove(void *vdst, void *vsrc, int n)
{
9d0: 55 push %ebp
9d1: 89 e5 mov %esp,%ebp
9d3: 56 push %esi
9d4: 53 push %ebx
9d5: 8b 5d 10 mov 0x10(%ebp),%ebx
9d8: 8b 45 08 mov 0x8(%ebp),%eax
9db: 8b 75 0c mov 0xc(%ebp),%esi
char *dst, *src;
dst = vdst;
src = vsrc;
while (n-- > 0) *dst++= *src++;
9de: 85 db test %ebx,%ebx
9e0: 7e 14 jle 9f6 <memmove+0x26>
9e2: 31 d2 xor %edx,%edx
9e4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
9e8: 0f b6 0c 16 movzbl (%esi,%edx,1),%ecx
9ec: 88 0c 10 mov %cl,(%eax,%edx,1)
9ef: 83 c2 01 add $0x1,%edx
9f2: 39 d3 cmp %edx,%ebx
9f4: 75 f2 jne 9e8 <memmove+0x18>
return vdst;
}
9f6: 5b pop %ebx
9f7: 5e pop %esi
9f8: 5d pop %ebp
9f9: c3 ret
9fa: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
00000a00 <shm_get>:
char*
shm_get(char* name)
{
a00: 55 push %ebp
a01: 89 e5 mov %esp,%ebp
return shmget(name);
}
a03: 5d pop %ebp
return shmget(name);
a04: e9 00 01 00 00 jmp b09 <shmget>
a09: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
00000a10 <shm_rem>:
int
shm_rem(char* name)
{
a10: 55 push %ebp
a11: 89 e5 mov %esp,%ebp
return shmrem(name);
}
a13: 5d pop %ebp
return shmrem(name);
a14: e9 f8 00 00 00 jmp b11 <shmrem>
00000a19 <fork>:
name: \
movl $SYS_ ## name, %eax; \
int $T_SYSCALL; \
ret
SYSCALL(fork)
a19: b8 01 00 00 00 mov $0x1,%eax
a1e: cd 40 int $0x40
a20: c3 ret
00000a21 <exit>:
SYSCALL(exit)
a21: b8 02 00 00 00 mov $0x2,%eax
a26: cd 40 int $0x40
a28: c3 ret
00000a29 <wait>:
SYSCALL(wait)
a29: b8 03 00 00 00 mov $0x3,%eax
a2e: cd 40 int $0x40
a30: c3 ret
00000a31 <pipe>:
SYSCALL(pipe)
a31: b8 04 00 00 00 mov $0x4,%eax
a36: cd 40 int $0x40
a38: c3 ret
00000a39 <read>:
SYSCALL(read)
a39: b8 05 00 00 00 mov $0x5,%eax
a3e: cd 40 int $0x40
a40: c3 ret
00000a41 <write>:
SYSCALL(write)
a41: b8 10 00 00 00 mov $0x10,%eax
a46: cd 40 int $0x40
a48: c3 ret
00000a49 <close>:
SYSCALL(close)
a49: b8 15 00 00 00 mov $0x15,%eax
a4e: cd 40 int $0x40
a50: c3 ret
00000a51 <kill>:
SYSCALL(kill)
a51: b8 06 00 00 00 mov $0x6,%eax
a56: cd 40 int $0x40
a58: c3 ret
00000a59 <exec>:
SYSCALL(exec)
a59: b8 07 00 00 00 mov $0x7,%eax
a5e: cd 40 int $0x40
a60: c3 ret
00000a61 <open>:
SYSCALL(open)
a61: b8 0f 00 00 00 mov $0xf,%eax
a66: cd 40 int $0x40
a68: c3 ret
00000a69 <mknod>:
SYSCALL(mknod)
a69: b8 11 00 00 00 mov $0x11,%eax
a6e: cd 40 int $0x40
a70: c3 ret
00000a71 <unlink>:
SYSCALL(unlink)
a71: b8 12 00 00 00 mov $0x12,%eax
a76: cd 40 int $0x40
a78: c3 ret
00000a79 <fstat>:
SYSCALL(fstat)
a79: b8 08 00 00 00 mov $0x8,%eax
a7e: cd 40 int $0x40
a80: c3 ret
00000a81 <link>:
SYSCALL(link)
a81: b8 13 00 00 00 mov $0x13,%eax
a86: cd 40 int $0x40
a88: c3 ret
00000a89 <mkdir>:
SYSCALL(mkdir)
a89: b8 14 00 00 00 mov $0x14,%eax
a8e: cd 40 int $0x40
a90: c3 ret
00000a91 <chdir>:
SYSCALL(chdir)
a91: b8 09 00 00 00 mov $0x9,%eax
a96: cd 40 int $0x40
a98: c3 ret
00000a99 <dup>:
SYSCALL(dup)
a99: b8 0a 00 00 00 mov $0xa,%eax
a9e: cd 40 int $0x40
aa0: c3 ret
00000aa1 <getpid>:
SYSCALL(getpid)
aa1: b8 0b 00 00 00 mov $0xb,%eax
aa6: cd 40 int $0x40
aa8: c3 ret
00000aa9 <sbrk>:
SYSCALL(sbrk)
aa9: b8 0c 00 00 00 mov $0xc,%eax
aae: cd 40 int $0x40
ab0: c3 ret
00000ab1 <sleep>:
SYSCALL(sleep)
ab1: b8 0d 00 00 00 mov $0xd,%eax
ab6: cd 40 int $0x40
ab8: c3 ret
00000ab9 <uptime>:
SYSCALL(uptime)
ab9: b8 0e 00 00 00 mov $0xe,%eax
abe: cd 40 int $0x40
ac0: c3 ret
00000ac1 <mcreate>:
SYSCALL(mcreate)
ac1: b8 16 00 00 00 mov $0x16,%eax
ac6: cd 40 int $0x40
ac8: c3 ret
00000ac9 <mdelete>:
SYSCALL(mdelete)
ac9: b8 17 00 00 00 mov $0x17,%eax
ace: cd 40 int $0x40
ad0: c3 ret
00000ad1 <mlock>:
SYSCALL(mlock)
ad1: b8 18 00 00 00 mov $0x18,%eax
ad6: cd 40 int $0x40
ad8: c3 ret
00000ad9 <munlock>:
SYSCALL(munlock)
ad9: b8 19 00 00 00 mov $0x19,%eax
ade: cd 40 int $0x40
ae0: c3 ret
00000ae1 <waitcv>:
SYSCALL(waitcv)
ae1: b8 1a 00 00 00 mov $0x1a,%eax
ae6: cd 40 int $0x40
ae8: c3 ret
00000ae9 <signalcv>:
SYSCALL(signalcv)
ae9: b8 1b 00 00 00 mov $0x1b,%eax
aee: cd 40 int $0x40
af0: c3 ret
00000af1 <prio_set>:
SYSCALL(prio_set)
af1: b8 1c 00 00 00 mov $0x1c,%eax
af6: cd 40 int $0x40
af8: c3 ret
00000af9 <testpqeq>:
SYSCALL(testpqeq)
af9: b8 1d 00 00 00 mov $0x1d,%eax
afe: cd 40 int $0x40
b00: c3 ret
00000b01 <testpqdq>:
SYSCALL(testpqdq)
b01: b8 1e 00 00 00 mov $0x1e,%eax
b06: cd 40 int $0x40
b08: c3 ret
00000b09 <shmget>:
SYSCALL(shmget)
b09: b8 1f 00 00 00 mov $0x1f,%eax
b0e: cd 40 int $0x40
b10: c3 ret
00000b11 <shmrem>:
b11: b8 20 00 00 00 mov $0x20,%eax
b16: cd 40 int $0x40
b18: c3 ret
b19: 66 90 xchg %ax,%ax
b1b: 66 90 xchg %ax,%ax
b1d: 66 90 xchg %ax,%ax
b1f: 90 nop
00000b20 <printint>:
write(fd, &c, 1);
}
static void
printint(int fd, int xx, int base, int sgn)
{
b20: 55 push %ebp
b21: 89 e5 mov %esp,%ebp
b23: 57 push %edi
b24: 56 push %esi
b25: 53 push %ebx
b26: 83 ec 3c sub $0x3c,%esp
char buf[16];
int i, neg;
uint x;
neg = 0;
if (sgn && xx < 0) {
b29: 85 d2 test %edx,%edx
{
b2b: 89 45 c0 mov %eax,-0x40(%ebp)
neg = 1;
x = -xx;
b2e: 89 d0 mov %edx,%eax
if (sgn && xx < 0) {
b30: 79 76 jns ba8 <printint+0x88>
b32: f6 45 08 01 testb $0x1,0x8(%ebp)
b36: 74 70 je ba8 <printint+0x88>
x = -xx;
b38: f7 d8 neg %eax
neg = 1;
b3a: c7 45 c4 01 00 00 00 movl $0x1,-0x3c(%ebp)
} else {
x = xx;
}
i = 0;
b41: 31 f6 xor %esi,%esi
b43: 8d 5d d7 lea -0x29(%ebp),%ebx
b46: eb 0a jmp b52 <printint+0x32>
b48: 90 nop
b49: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
do {
buf[i++] = digits[x % base];
b50: 89 fe mov %edi,%esi
b52: 31 d2 xor %edx,%edx
b54: 8d 7e 01 lea 0x1(%esi),%edi
b57: f7 f1 div %ecx
b59: 0f b6 92 3c 12 00 00 movzbl 0x123c(%edx),%edx
} while ((x /= base) != 0);
b60: 85 c0 test %eax,%eax
buf[i++] = digits[x % base];
b62: 88 14 3b mov %dl,(%ebx,%edi,1)
} while ((x /= base) != 0);
b65: 75 e9 jne b50 <printint+0x30>
if (neg) buf[i++] = '-';
b67: 8b 45 c4 mov -0x3c(%ebp),%eax
b6a: 85 c0 test %eax,%eax
b6c: 74 08 je b76 <printint+0x56>
b6e: c6 44 3d d8 2d movb $0x2d,-0x28(%ebp,%edi,1)
b73: 8d 7e 02 lea 0x2(%esi),%edi
b76: 8d 74 3d d7 lea -0x29(%ebp,%edi,1),%esi
b7a: 8b 7d c0 mov -0x40(%ebp),%edi
b7d: 8d 76 00 lea 0x0(%esi),%esi
b80: 0f b6 06 movzbl (%esi),%eax
write(fd, &c, 1);
b83: 83 ec 04 sub $0x4,%esp
b86: 83 ee 01 sub $0x1,%esi
b89: 6a 01 push $0x1
b8b: 53 push %ebx
b8c: 57 push %edi
b8d: 88 45 d7 mov %al,-0x29(%ebp)
b90: e8 ac fe ff ff call a41 <write>
while (--i >= 0) putc(fd, buf[i]);
b95: 83 c4 10 add $0x10,%esp
b98: 39 de cmp %ebx,%esi
b9a: 75 e4 jne b80 <printint+0x60>
}
b9c: 8d 65 f4 lea -0xc(%ebp),%esp
b9f: 5b pop %ebx
ba0: 5e pop %esi
ba1: 5f pop %edi
ba2: 5d pop %ebp
ba3: c3 ret
ba4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
neg = 0;
ba8: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp)
baf: eb 90 jmp b41 <printint+0x21>
bb1: eb 0d jmp bc0 <printf>
bb3: 90 nop
bb4: 90 nop
bb5: 90 nop
bb6: 90 nop
bb7: 90 nop
bb8: 90 nop
bb9: 90 nop
bba: 90 nop
bbb: 90 nop
bbc: 90 nop
bbd: 90 nop
bbe: 90 nop
bbf: 90 nop
00000bc0 <printf>:
// Print to the given fd. Only understands %d, %x, %p, %s.
void
printf(int fd, char *fmt, ...)
{
bc0: 55 push %ebp
bc1: 89 e5 mov %esp,%ebp
bc3: 57 push %edi
bc4: 56 push %esi
bc5: 53 push %ebx
bc6: 83 ec 2c sub $0x2c,%esp
int c, i, state;
uint *ap;
state = 0;
ap = (uint *)(void *)&fmt + 1;
for (i = 0; fmt[i]; i++) {
bc9: 8b 75 0c mov 0xc(%ebp),%esi
bcc: 0f b6 1e movzbl (%esi),%ebx
bcf: 84 db test %bl,%bl
bd1: 0f 84 b3 00 00 00 je c8a <printf+0xca>
ap = (uint *)(void *)&fmt + 1;
bd7: 8d 45 10 lea 0x10(%ebp),%eax
bda: 83 c6 01 add $0x1,%esi
state = 0;
bdd: 31 ff xor %edi,%edi
ap = (uint *)(void *)&fmt + 1;
bdf: 89 45 d4 mov %eax,-0x2c(%ebp)
be2: eb 2f jmp c13 <printf+0x53>
be4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
c = fmt[i] & 0xff;
if (state == 0) {
if (c == '%') {
be8: 83 f8 25 cmp $0x25,%eax
beb: 0f 84 a7 00 00 00 je c98 <printf+0xd8>
write(fd, &c, 1);
bf1: 8d 45 e2 lea -0x1e(%ebp),%eax
bf4: 83 ec 04 sub $0x4,%esp
bf7: 88 5d e2 mov %bl,-0x1e(%ebp)
bfa: 6a 01 push $0x1
bfc: 50 push %eax
bfd: ff 75 08 pushl 0x8(%ebp)
c00: e8 3c fe ff ff call a41 <write>
c05: 83 c4 10 add $0x10,%esp
c08: 83 c6 01 add $0x1,%esi
for (i = 0; fmt[i]; i++) {
c0b: 0f b6 5e ff movzbl -0x1(%esi),%ebx
c0f: 84 db test %bl,%bl
c11: 74 77 je c8a <printf+0xca>
if (state == 0) {
c13: 85 ff test %edi,%edi
c = fmt[i] & 0xff;
c15: 0f be cb movsbl %bl,%ecx
c18: 0f b6 c3 movzbl %bl,%eax
if (state == 0) {
c1b: 74 cb je be8 <printf+0x28>
state = '%';
} else {
putc(fd, c);
}
} else if (state == '%') {
c1d: 83 ff 25 cmp $0x25,%edi
c20: 75 e6 jne c08 <printf+0x48>
if (c == 'd') {
c22: 83 f8 64 cmp $0x64,%eax
c25: 0f 84 05 01 00 00 je d30 <printf+0x170>
printint(fd, *ap, 10, 1);
ap++;
} else if (c == 'x' || c == 'p') {
c2b: 81 e1 f7 00 00 00 and $0xf7,%ecx
c31: 83 f9 70 cmp $0x70,%ecx
c34: 74 72 je ca8 <printf+0xe8>
printint(fd, *ap, 16, 0);
ap++;
} else if (c == 's') {
c36: 83 f8 73 cmp $0x73,%eax
c39: 0f 84 99 00 00 00 je cd8 <printf+0x118>
if (s == 0) s = "(null)";
while (*s != 0) {
putc(fd, *s);
s++;
}
} else if (c == 'c') {
c3f: 83 f8 63 cmp $0x63,%eax
c42: 0f 84 08 01 00 00 je d50 <printf+0x190>
putc(fd, *ap);
ap++;
} else if (c == '%') {
c48: 83 f8 25 cmp $0x25,%eax
c4b: 0f 84 ef 00 00 00 je d40 <printf+0x180>
write(fd, &c, 1);
c51: 8d 45 e7 lea -0x19(%ebp),%eax
c54: 83 ec 04 sub $0x4,%esp
c57: c6 45 e7 25 movb $0x25,-0x19(%ebp)
c5b: 6a 01 push $0x1
c5d: 50 push %eax
c5e: ff 75 08 pushl 0x8(%ebp)
c61: e8 db fd ff ff call a41 <write>
c66: 83 c4 0c add $0xc,%esp
c69: 8d 45 e6 lea -0x1a(%ebp),%eax
c6c: 88 5d e6 mov %bl,-0x1a(%ebp)
c6f: 6a 01 push $0x1
c71: 50 push %eax
c72: ff 75 08 pushl 0x8(%ebp)
c75: 83 c6 01 add $0x1,%esi
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
putc(fd, c);
}
state = 0;
c78: 31 ff xor %edi,%edi
write(fd, &c, 1);
c7a: e8 c2 fd ff ff call a41 <write>
for (i = 0; fmt[i]; i++) {
c7f: 0f b6 5e ff movzbl -0x1(%esi),%ebx
write(fd, &c, 1);
c83: 83 c4 10 add $0x10,%esp
for (i = 0; fmt[i]; i++) {
c86: 84 db test %bl,%bl
c88: 75 89 jne c13 <printf+0x53>
}
}
}
c8a: 8d 65 f4 lea -0xc(%ebp),%esp
c8d: 5b pop %ebx
c8e: 5e pop %esi
c8f: 5f pop %edi
c90: 5d pop %ebp
c91: c3 ret
c92: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
state = '%';
c98: bf 25 00 00 00 mov $0x25,%edi
c9d: e9 66 ff ff ff jmp c08 <printf+0x48>
ca2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
printint(fd, *ap, 16, 0);
ca8: 83 ec 0c sub $0xc,%esp
cab: b9 10 00 00 00 mov $0x10,%ecx
cb0: 6a 00 push $0x0
cb2: 8b 7d d4 mov -0x2c(%ebp),%edi
cb5: 8b 45 08 mov 0x8(%ebp),%eax
cb8: 8b 17 mov (%edi),%edx
cba: e8 61 fe ff ff call b20 <printint>
ap++;
cbf: 89 f8 mov %edi,%eax
cc1: 83 c4 10 add $0x10,%esp
state = 0;
cc4: 31 ff xor %edi,%edi
ap++;
cc6: 83 c0 04 add $0x4,%eax
cc9: 89 45 d4 mov %eax,-0x2c(%ebp)
ccc: e9 37 ff ff ff jmp c08 <printf+0x48>
cd1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
s = (char *)*ap;
cd8: 8b 45 d4 mov -0x2c(%ebp),%eax
cdb: 8b 08 mov (%eax),%ecx
ap++;
cdd: 83 c0 04 add $0x4,%eax
ce0: 89 45 d4 mov %eax,-0x2c(%ebp)
if (s == 0) s = "(null)";
ce3: 85 c9 test %ecx,%ecx
ce5: 0f 84 8e 00 00 00 je d79 <printf+0x1b9>
while (*s != 0) {
ceb: 0f b6 01 movzbl (%ecx),%eax
state = 0;
cee: 31 ff xor %edi,%edi
s = (char *)*ap;
cf0: 89 cb mov %ecx,%ebx
while (*s != 0) {
cf2: 84 c0 test %al,%al
cf4: 0f 84 0e ff ff ff je c08 <printf+0x48>
cfa: 89 75 d0 mov %esi,-0x30(%ebp)
cfd: 89 de mov %ebx,%esi
cff: 8b 5d 08 mov 0x8(%ebp),%ebx
d02: 8d 7d e3 lea -0x1d(%ebp),%edi
d05: 8d 76 00 lea 0x0(%esi),%esi
write(fd, &c, 1);
d08: 83 ec 04 sub $0x4,%esp
s++;
d0b: 83 c6 01 add $0x1,%esi
d0e: 88 45 e3 mov %al,-0x1d(%ebp)
write(fd, &c, 1);
d11: 6a 01 push $0x1
d13: 57 push %edi
d14: 53 push %ebx
d15: e8 27 fd ff ff call a41 <write>
while (*s != 0) {
d1a: 0f b6 06 movzbl (%esi),%eax
d1d: 83 c4 10 add $0x10,%esp
d20: 84 c0 test %al,%al
d22: 75 e4 jne d08 <printf+0x148>
d24: 8b 75 d0 mov -0x30(%ebp),%esi
state = 0;
d27: 31 ff xor %edi,%edi
d29: e9 da fe ff ff jmp c08 <printf+0x48>
d2e: 66 90 xchg %ax,%ax
printint(fd, *ap, 10, 1);
d30: 83 ec 0c sub $0xc,%esp
d33: b9 0a 00 00 00 mov $0xa,%ecx
d38: 6a 01 push $0x1
d3a: e9 73 ff ff ff jmp cb2 <printf+0xf2>
d3f: 90 nop
write(fd, &c, 1);
d40: 83 ec 04 sub $0x4,%esp
d43: 88 5d e5 mov %bl,-0x1b(%ebp)
d46: 8d 45 e5 lea -0x1b(%ebp),%eax
d49: 6a 01 push $0x1
d4b: e9 21 ff ff ff jmp c71 <printf+0xb1>
putc(fd, *ap);
d50: 8b 7d d4 mov -0x2c(%ebp),%edi
write(fd, &c, 1);
d53: 83 ec 04 sub $0x4,%esp
putc(fd, *ap);
d56: 8b 07 mov (%edi),%eax
write(fd, &c, 1);
d58: 6a 01 push $0x1
ap++;
d5a: 83 c7 04 add $0x4,%edi
putc(fd, *ap);
d5d: 88 45 e4 mov %al,-0x1c(%ebp)
write(fd, &c, 1);
d60: 8d 45 e4 lea -0x1c(%ebp),%eax
d63: 50 push %eax
d64: ff 75 08 pushl 0x8(%ebp)
d67: e8 d5 fc ff ff call a41 <write>
ap++;
d6c: 89 7d d4 mov %edi,-0x2c(%ebp)
d6f: 83 c4 10 add $0x10,%esp
state = 0;
d72: 31 ff xor %edi,%edi
d74: e9 8f fe ff ff jmp c08 <printf+0x48>
if (s == 0) s = "(null)";
d79: bb 34 12 00 00 mov $0x1234,%ebx
while (*s != 0) {
d7e: b8 28 00 00 00 mov $0x28,%eax
d83: e9 72 ff ff ff jmp cfa <printf+0x13a>
d88: 66 90 xchg %ax,%ax
d8a: 66 90 xchg %ax,%ax
d8c: 66 90 xchg %ax,%ax
d8e: 66 90 xchg %ax,%ax
00000d90 <free>:
static Header base;
static Header *freep;
void
free(void *ap)
{
d90: 55 push %ebp
Header *bp, *p;
bp = (Header *)ap - 1;
for (p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
d91: a1 80 16 00 00 mov 0x1680,%eax
{
d96: 89 e5 mov %esp,%ebp
d98: 57 push %edi
d99: 56 push %esi
d9a: 53 push %ebx
d9b: 8b 5d 08 mov 0x8(%ebp),%ebx
bp = (Header *)ap - 1;
d9e: 8d 4b f8 lea -0x8(%ebx),%ecx
da1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
for (p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
da8: 39 c8 cmp %ecx,%eax
daa: 8b 10 mov (%eax),%edx
dac: 73 32 jae de0 <free+0x50>
dae: 39 d1 cmp %edx,%ecx
db0: 72 04 jb db6 <free+0x26>
if (p >= p->s.ptr && (bp > p || bp < p->s.ptr)) break;
db2: 39 d0 cmp %edx,%eax
db4: 72 32 jb de8 <free+0x58>
if (bp + bp->s.size == p->s.ptr) {
db6: 8b 73 fc mov -0x4(%ebx),%esi
db9: 8d 3c f1 lea (%ecx,%esi,8),%edi
dbc: 39 fa cmp %edi,%edx
dbe: 74 30 je df0 <free+0x60>
bp->s.size += p->s.ptr->s.size;
bp->s.ptr = p->s.ptr->s.ptr;
} else
bp->s.ptr = p->s.ptr;
dc0: 89 53 f8 mov %edx,-0x8(%ebx)
if (p + p->s.size == bp) {
dc3: 8b 50 04 mov 0x4(%eax),%edx
dc6: 8d 34 d0 lea (%eax,%edx,8),%esi
dc9: 39 f1 cmp %esi,%ecx
dcb: 74 3a je e07 <free+0x77>
p->s.size += bp->s.size;
p->s.ptr = bp->s.ptr;
} else
p->s.ptr = bp;
dcd: 89 08 mov %ecx,(%eax)
freep = p;
dcf: a3 80 16 00 00 mov %eax,0x1680
}
dd4: 5b pop %ebx
dd5: 5e pop %esi
dd6: 5f pop %edi
dd7: 5d pop %ebp
dd8: c3 ret
dd9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
if (p >= p->s.ptr && (bp > p || bp < p->s.ptr)) break;
de0: 39 d0 cmp %edx,%eax
de2: 72 04 jb de8 <free+0x58>
de4: 39 d1 cmp %edx,%ecx
de6: 72 ce jb db6 <free+0x26>
{
de8: 89 d0 mov %edx,%eax
dea: eb bc jmp da8 <free+0x18>
dec: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
bp->s.size += p->s.ptr->s.size;
df0: 03 72 04 add 0x4(%edx),%esi
df3: 89 73 fc mov %esi,-0x4(%ebx)
bp->s.ptr = p->s.ptr->s.ptr;
df6: 8b 10 mov (%eax),%edx
df8: 8b 12 mov (%edx),%edx
dfa: 89 53 f8 mov %edx,-0x8(%ebx)
if (p + p->s.size == bp) {
dfd: 8b 50 04 mov 0x4(%eax),%edx
e00: 8d 34 d0 lea (%eax,%edx,8),%esi
e03: 39 f1 cmp %esi,%ecx
e05: 75 c6 jne dcd <free+0x3d>
p->s.size += bp->s.size;
e07: 03 53 fc add -0x4(%ebx),%edx
freep = p;
e0a: a3 80 16 00 00 mov %eax,0x1680
p->s.size += bp->s.size;
e0f: 89 50 04 mov %edx,0x4(%eax)
p->s.ptr = bp->s.ptr;
e12: 8b 53 f8 mov -0x8(%ebx),%edx
e15: 89 10 mov %edx,(%eax)
}
e17: 5b pop %ebx
e18: 5e pop %esi
e19: 5f pop %edi
e1a: 5d pop %ebp
e1b: c3 ret
e1c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
00000e20 <malloc>:
return freep;
}
void *
malloc(uint nbytes)
{
e20: 55 push %ebp
e21: 89 e5 mov %esp,%ebp
e23: 57 push %edi
e24: 56 push %esi
e25: 53 push %ebx
e26: 83 ec 0c sub $0xc,%esp
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1) / sizeof(Header) + 1;
e29: 8b 45 08 mov 0x8(%ebp),%eax
if ((prevp = freep) == 0) {
e2c: 8b 15 80 16 00 00 mov 0x1680,%edx
nunits = (nbytes + sizeof(Header) - 1) / sizeof(Header) + 1;
e32: 8d 78 07 lea 0x7(%eax),%edi
e35: c1 ef 03 shr $0x3,%edi
e38: 83 c7 01 add $0x1,%edi
if ((prevp = freep) == 0) {
e3b: 85 d2 test %edx,%edx
e3d: 0f 84 9d 00 00 00 je ee0 <malloc+0xc0>
e43: 8b 02 mov (%edx),%eax
e45: 8b 48 04 mov 0x4(%eax),%ecx
base.s.ptr = freep = prevp = &base;
base.s.size = 0;
}
for (p = prevp->s.ptr;; prevp = p, p = p->s.ptr) {
if (p->s.size >= nunits) {
e48: 39 cf cmp %ecx,%edi
e4a: 76 6c jbe eb8 <malloc+0x98>
e4c: 81 ff 00 10 00 00 cmp $0x1000,%edi
e52: bb 00 10 00 00 mov $0x1000,%ebx
e57: 0f 43 df cmovae %edi,%ebx
p = sbrk(nu * sizeof(Header));
e5a: 8d 34 dd 00 00 00 00 lea 0x0(,%ebx,8),%esi
e61: eb 0e jmp e71 <malloc+0x51>
e63: 90 nop
e64: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
for (p = prevp->s.ptr;; prevp = p, p = p->s.ptr) {
e68: 8b 02 mov (%edx),%eax
if (p->s.size >= nunits) {
e6a: 8b 48 04 mov 0x4(%eax),%ecx
e6d: 39 f9 cmp %edi,%ecx
e6f: 73 47 jae eb8 <malloc+0x98>
p->s.size = nunits;
}
freep = prevp;
return (void *)(p + 1);
}
if (p == freep)
e71: 39 05 80 16 00 00 cmp %eax,0x1680
e77: 89 c2 mov %eax,%edx
e79: 75 ed jne e68 <malloc+0x48>
p = sbrk(nu * sizeof(Header));
e7b: 83 ec 0c sub $0xc,%esp
e7e: 56 push %esi
e7f: e8 25 fc ff ff call aa9 <sbrk>
if (p == (char *)-1) return 0;
e84: 83 c4 10 add $0x10,%esp
e87: 83 f8 ff cmp $0xffffffff,%eax
e8a: 74 1c je ea8 <malloc+0x88>
hp->s.size = nu;
e8c: 89 58 04 mov %ebx,0x4(%eax)
free((void *)(hp + 1));
e8f: 83 ec 0c sub $0xc,%esp
e92: 83 c0 08 add $0x8,%eax
e95: 50 push %eax
e96: e8 f5 fe ff ff call d90 <free>
return freep;
e9b: 8b 15 80 16 00 00 mov 0x1680,%edx
if ((p = morecore(nunits)) == 0) return 0;
ea1: 83 c4 10 add $0x10,%esp
ea4: 85 d2 test %edx,%edx
ea6: 75 c0 jne e68 <malloc+0x48>
}
}
ea8: 8d 65 f4 lea -0xc(%ebp),%esp
if ((p = morecore(nunits)) == 0) return 0;
eab: 31 c0 xor %eax,%eax
}
ead: 5b pop %ebx
eae: 5e pop %esi
eaf: 5f pop %edi
eb0: 5d pop %ebp
eb1: c3 ret
eb2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
if (p->s.size == nunits)
eb8: 39 cf cmp %ecx,%edi
eba: 74 54 je f10 <malloc+0xf0>
p->s.size -= nunits;
ebc: 29 f9 sub %edi,%ecx
ebe: 89 48 04 mov %ecx,0x4(%eax)
p += p->s.size;
ec1: 8d 04 c8 lea (%eax,%ecx,8),%eax
p->s.size = nunits;
ec4: 89 78 04 mov %edi,0x4(%eax)
freep = prevp;
ec7: 89 15 80 16 00 00 mov %edx,0x1680
}
ecd: 8d 65 f4 lea -0xc(%ebp),%esp
return (void *)(p + 1);
ed0: 83 c0 08 add $0x8,%eax
}
ed3: 5b pop %ebx
ed4: 5e pop %esi
ed5: 5f pop %edi
ed6: 5d pop %ebp
ed7: c3 ret
ed8: 90 nop
ed9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
base.s.ptr = freep = prevp = &base;
ee0: c7 05 80 16 00 00 84 movl $0x1684,0x1680
ee7: 16 00 00
eea: c7 05 84 16 00 00 84 movl $0x1684,0x1684
ef1: 16 00 00
base.s.size = 0;
ef4: b8 84 16 00 00 mov $0x1684,%eax
ef9: c7 05 88 16 00 00 00 movl $0x0,0x1688
f00: 00 00 00
f03: e9 44 ff ff ff jmp e4c <malloc+0x2c>
f08: 90 nop
f09: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
prevp->s.ptr = p->s.ptr;
f10: 8b 08 mov (%eax),%ecx
f12: 89 0a mov %ecx,(%edx)
f14: eb b1 jmp ec7 <malloc+0xa7>
| 36.602941 | 114 | 0.445266 |
9383893a703a44048482b3f246c2fda09430fb6b | 29,206 | asm | Assembly | Eudora71/OpenSSL/crypto/sha/asm/s1_win32.asm | dusong7/eudora-win | 850a6619e6b0d5abc770bca8eb5f3b9001b7ccd2 | [
"BSD-3-Clause-Clear"
] | 10 | 2018-05-23T10:43:48.000Z | 2021-12-02T17:59:48.000Z | Eudora71/OpenSSL/crypto/sha/asm/s1_win32.asm | ivanagui2/hermesmail-code | 34387722d5364163c71b577fc508b567de56c5f6 | [
"BSD-3-Clause-Clear"
] | 1 | 2019-03-19T03:56:36.000Z | 2021-05-26T18:36:03.000Z | Eudora71/OpenSSL/crypto/sha/asm/s1_win32.asm | ivanagui2/hermesmail-code | 34387722d5364163c71b577fc508b567de56c5f6 | [
"BSD-3-Clause-Clear"
] | 11 | 2018-05-23T10:43:53.000Z | 2021-12-27T15:42:58.000Z | ; Don't even think of reading this code
; It was automatically generated by sha1-586.pl
; Which is a perl program used to generate the x86 assember for
; any of elf, a.out, BSDI, Win32, gaswin (for GNU as on Win32) or Solaris
; eric <eay@cryptsoft.com>
;
TITLE sha1-586.asm
.486
.model FLAT
_TEXT SEGMENT
PUBLIC _sha1_block_asm_data_order
_sha1_block_asm_data_order PROC NEAR
mov ecx, DWORD PTR 12[esp]
push esi
shl ecx, 6
mov esi, DWORD PTR 12[esp]
push ebp
add ecx, esi
push ebx
mov ebp, DWORD PTR 16[esp]
push edi
mov edx, DWORD PTR 12[ebp]
sub esp, 108
mov edi, DWORD PTR 16[ebp]
mov ebx, DWORD PTR 8[ebp]
mov DWORD PTR 68[esp],ecx
; First we need to setup the X array
$L000start:
; First, load the words onto the stack in network byte order
mov eax, DWORD PTR [esi]
mov ecx, DWORD PTR 4[esi]
bswap eax
bswap ecx
mov DWORD PTR [esp],eax
mov DWORD PTR 4[esp],ecx
mov eax, DWORD PTR 8[esi]
mov ecx, DWORD PTR 12[esi]
bswap eax
bswap ecx
mov DWORD PTR 8[esp],eax
mov DWORD PTR 12[esp],ecx
mov eax, DWORD PTR 16[esi]
mov ecx, DWORD PTR 20[esi]
bswap eax
bswap ecx
mov DWORD PTR 16[esp],eax
mov DWORD PTR 20[esp],ecx
mov eax, DWORD PTR 24[esi]
mov ecx, DWORD PTR 28[esi]
bswap eax
bswap ecx
mov DWORD PTR 24[esp],eax
mov DWORD PTR 28[esp],ecx
mov eax, DWORD PTR 32[esi]
mov ecx, DWORD PTR 36[esi]
bswap eax
bswap ecx
mov DWORD PTR 32[esp],eax
mov DWORD PTR 36[esp],ecx
mov eax, DWORD PTR 40[esi]
mov ecx, DWORD PTR 44[esi]
bswap eax
bswap ecx
mov DWORD PTR 40[esp],eax
mov DWORD PTR 44[esp],ecx
mov eax, DWORD PTR 48[esi]
mov ecx, DWORD PTR 52[esi]
bswap eax
bswap ecx
mov DWORD PTR 48[esp],eax
mov DWORD PTR 52[esp],ecx
mov eax, DWORD PTR 56[esi]
mov ecx, DWORD PTR 60[esi]
bswap eax
bswap ecx
mov DWORD PTR 56[esp],eax
mov DWORD PTR 60[esp],ecx
; We now have the X array on the stack
; starting at sp-4
mov DWORD PTR 132[esp],esi
$L001shortcut::
;
; Start processing
mov eax, DWORD PTR [ebp]
mov ecx, DWORD PTR 4[ebp]
; 00_15 0
mov ebp, eax
mov esi, ebx
rol ebp, 5
xor esi, edx
and esi, ecx
ror ecx, 2
add ebp, edi
mov edi, DWORD PTR [esp]
xor esi, edx
lea ebp, DWORD PTR 1518500249[edi*1+ebp]
add esi, ebp
; 00_15 1
mov ebp, esi
mov edi, ecx
rol ebp, 5
xor edi, ebx
and edi, eax
ror eax, 2
add ebp, edx
mov edx, DWORD PTR 4[esp]
xor edi, ebx
lea ebp, DWORD PTR 1518500249[edx*1+ebp]
add edi, ebp
; 00_15 2
mov ebp, edi
mov edx, eax
rol ebp, 5
xor edx, ecx
and edx, esi
ror esi, 2
add ebp, ebx
mov ebx, DWORD PTR 8[esp]
xor edx, ecx
lea ebp, DWORD PTR 1518500249[ebx*1+ebp]
add edx, ebp
; 00_15 3
mov ebp, edx
mov ebx, esi
rol ebp, 5
xor ebx, eax
and ebx, edi
ror edi, 2
add ebp, ecx
mov ecx, DWORD PTR 12[esp]
xor ebx, eax
lea ebp, DWORD PTR 1518500249[ecx*1+ebp]
add ebx, ebp
; 00_15 4
mov ebp, ebx
mov ecx, edi
rol ebp, 5
xor ecx, esi
and ecx, edx
ror edx, 2
add ebp, eax
mov eax, DWORD PTR 16[esp]
xor ecx, esi
lea ebp, DWORD PTR 1518500249[eax*1+ebp]
add ecx, ebp
; 00_15 5
mov ebp, ecx
mov eax, edx
rol ebp, 5
xor eax, edi
and eax, ebx
ror ebx, 2
add ebp, esi
mov esi, DWORD PTR 20[esp]
xor eax, edi
lea ebp, DWORD PTR 1518500249[esi*1+ebp]
add eax, ebp
; 00_15 6
mov ebp, eax
mov esi, ebx
rol ebp, 5
xor esi, edx
and esi, ecx
ror ecx, 2
add ebp, edi
mov edi, DWORD PTR 24[esp]
xor esi, edx
lea ebp, DWORD PTR 1518500249[edi*1+ebp]
add esi, ebp
; 00_15 7
mov ebp, esi
mov edi, ecx
rol ebp, 5
xor edi, ebx
and edi, eax
ror eax, 2
add ebp, edx
mov edx, DWORD PTR 28[esp]
xor edi, ebx
lea ebp, DWORD PTR 1518500249[edx*1+ebp]
add edi, ebp
; 00_15 8
mov ebp, edi
mov edx, eax
rol ebp, 5
xor edx, ecx
and edx, esi
ror esi, 2
add ebp, ebx
mov ebx, DWORD PTR 32[esp]
xor edx, ecx
lea ebp, DWORD PTR 1518500249[ebx*1+ebp]
add edx, ebp
; 00_15 9
mov ebp, edx
mov ebx, esi
rol ebp, 5
xor ebx, eax
and ebx, edi
ror edi, 2
add ebp, ecx
mov ecx, DWORD PTR 36[esp]
xor ebx, eax
lea ebp, DWORD PTR 1518500249[ecx*1+ebp]
add ebx, ebp
; 00_15 10
mov ebp, ebx
mov ecx, edi
rol ebp, 5
xor ecx, esi
and ecx, edx
ror edx, 2
add ebp, eax
mov eax, DWORD PTR 40[esp]
xor ecx, esi
lea ebp, DWORD PTR 1518500249[eax*1+ebp]
add ecx, ebp
; 00_15 11
mov ebp, ecx
mov eax, edx
rol ebp, 5
xor eax, edi
and eax, ebx
ror ebx, 2
add ebp, esi
mov esi, DWORD PTR 44[esp]
xor eax, edi
lea ebp, DWORD PTR 1518500249[esi*1+ebp]
add eax, ebp
; 00_15 12
mov ebp, eax
mov esi, ebx
rol ebp, 5
xor esi, edx
and esi, ecx
ror ecx, 2
add ebp, edi
mov edi, DWORD PTR 48[esp]
xor esi, edx
lea ebp, DWORD PTR 1518500249[edi*1+ebp]
add esi, ebp
; 00_15 13
mov ebp, esi
mov edi, ecx
rol ebp, 5
xor edi, ebx
and edi, eax
ror eax, 2
add ebp, edx
mov edx, DWORD PTR 52[esp]
xor edi, ebx
lea ebp, DWORD PTR 1518500249[edx*1+ebp]
add edi, ebp
; 00_15 14
mov ebp, edi
mov edx, eax
rol ebp, 5
xor edx, ecx
and edx, esi
ror esi, 2
add ebp, ebx
mov ebx, DWORD PTR 56[esp]
xor edx, ecx
lea ebp, DWORD PTR 1518500249[ebx*1+ebp]
add edx, ebp
; 00_15 15
mov ebp, edx
mov ebx, esi
rol ebp, 5
xor ebx, eax
and ebx, edi
ror edi, 2
add ebp, ecx
mov ecx, DWORD PTR 60[esp]
xor ebx, eax
lea ebp, DWORD PTR 1518500249[ecx*1+ebp]
add ebx, ebp
; 16_19 16
mov ecx, DWORD PTR 8[esp]
mov ebp, edi
xor ecx, DWORD PTR [esp]
xor ebp, esi
xor ecx, DWORD PTR 32[esp]
and ebp, edx
xor ecx, DWORD PTR 52[esp]
ror edx, 2
xor ebp, esi
rol ecx, 1
mov DWORD PTR [esp],ecx
lea ecx, DWORD PTR 1518500249[eax*1+ecx]
mov eax, ebx
add ecx, ebp
rol eax, 5
add ecx, eax
; 16_19 17
mov eax, DWORD PTR 12[esp]
mov ebp, edx
xor eax, DWORD PTR 4[esp]
xor ebp, edi
xor eax, DWORD PTR 36[esp]
and ebp, ebx
xor eax, DWORD PTR 56[esp]
ror ebx, 2
xor ebp, edi
rol eax, 1
mov DWORD PTR 4[esp],eax
lea eax, DWORD PTR 1518500249[esi*1+eax]
mov esi, ecx
add eax, ebp
rol esi, 5
add eax, esi
; 16_19 18
mov esi, DWORD PTR 16[esp]
mov ebp, ebx
xor esi, DWORD PTR 8[esp]
xor ebp, edx
xor esi, DWORD PTR 40[esp]
and ebp, ecx
xor esi, DWORD PTR 60[esp]
ror ecx, 2
xor ebp, edx
rol esi, 1
mov DWORD PTR 8[esp],esi
lea esi, DWORD PTR 1518500249[edi*1+esi]
mov edi, eax
add esi, ebp
rol edi, 5
add esi, edi
; 16_19 19
mov edi, DWORD PTR 20[esp]
mov ebp, ecx
xor edi, DWORD PTR 12[esp]
xor ebp, ebx
xor edi, DWORD PTR 44[esp]
and ebp, eax
xor edi, DWORD PTR [esp]
ror eax, 2
xor ebp, ebx
rol edi, 1
mov DWORD PTR 12[esp],edi
lea edi, DWORD PTR 1518500249[edx*1+edi]
mov edx, esi
add edi, ebp
rol edx, 5
add edi, edx
; 20_39 20
mov edx, DWORD PTR 16[esp]
mov ebp, esi
xor edx, DWORD PTR 24[esp]
ror esi, 2
xor edx, DWORD PTR 48[esp]
xor ebp, eax
xor edx, DWORD PTR 4[esp]
xor ebp, ecx
rol edx, 1
mov DWORD PTR 16[esp],edx
lea edx, DWORD PTR 1859775393[ebx*1+edx]
mov ebx, edi
rol ebx, 5
add edx, ebp
add edx, ebx
; 20_39 21
mov ebx, DWORD PTR 20[esp]
mov ebp, edi
xor ebx, DWORD PTR 28[esp]
ror edi, 2
xor ebx, DWORD PTR 52[esp]
xor ebp, esi
xor ebx, DWORD PTR 8[esp]
xor ebp, eax
rol ebx, 1
mov DWORD PTR 20[esp],ebx
lea ebx, DWORD PTR 1859775393[ecx*1+ebx]
mov ecx, edx
rol ecx, 5
add ebx, ebp
add ebx, ecx
; 20_39 22
mov ecx, DWORD PTR 24[esp]
mov ebp, edx
xor ecx, DWORD PTR 32[esp]
ror edx, 2
xor ecx, DWORD PTR 56[esp]
xor ebp, edi
xor ecx, DWORD PTR 12[esp]
xor ebp, esi
rol ecx, 1
mov DWORD PTR 24[esp],ecx
lea ecx, DWORD PTR 1859775393[eax*1+ecx]
mov eax, ebx
rol eax, 5
add ecx, ebp
add ecx, eax
; 20_39 23
mov eax, DWORD PTR 28[esp]
mov ebp, ebx
xor eax, DWORD PTR 36[esp]
ror ebx, 2
xor eax, DWORD PTR 60[esp]
xor ebp, edx
xor eax, DWORD PTR 16[esp]
xor ebp, edi
rol eax, 1
mov DWORD PTR 28[esp],eax
lea eax, DWORD PTR 1859775393[esi*1+eax]
mov esi, ecx
rol esi, 5
add eax, ebp
add eax, esi
; 20_39 24
mov esi, DWORD PTR 32[esp]
mov ebp, ecx
xor esi, DWORD PTR 40[esp]
ror ecx, 2
xor esi, DWORD PTR [esp]
xor ebp, ebx
xor esi, DWORD PTR 20[esp]
xor ebp, edx
rol esi, 1
mov DWORD PTR 32[esp],esi
lea esi, DWORD PTR 1859775393[edi*1+esi]
mov edi, eax
rol edi, 5
add esi, ebp
add esi, edi
; 20_39 25
mov edi, DWORD PTR 36[esp]
mov ebp, eax
xor edi, DWORD PTR 44[esp]
ror eax, 2
xor edi, DWORD PTR 4[esp]
xor ebp, ecx
xor edi, DWORD PTR 24[esp]
xor ebp, ebx
rol edi, 1
mov DWORD PTR 36[esp],edi
lea edi, DWORD PTR 1859775393[edx*1+edi]
mov edx, esi
rol edx, 5
add edi, ebp
add edi, edx
; 20_39 26
mov edx, DWORD PTR 40[esp]
mov ebp, esi
xor edx, DWORD PTR 48[esp]
ror esi, 2
xor edx, DWORD PTR 8[esp]
xor ebp, eax
xor edx, DWORD PTR 28[esp]
xor ebp, ecx
rol edx, 1
mov DWORD PTR 40[esp],edx
lea edx, DWORD PTR 1859775393[ebx*1+edx]
mov ebx, edi
rol ebx, 5
add edx, ebp
add edx, ebx
; 20_39 27
mov ebx, DWORD PTR 44[esp]
mov ebp, edi
xor ebx, DWORD PTR 52[esp]
ror edi, 2
xor ebx, DWORD PTR 12[esp]
xor ebp, esi
xor ebx, DWORD PTR 32[esp]
xor ebp, eax
rol ebx, 1
mov DWORD PTR 44[esp],ebx
lea ebx, DWORD PTR 1859775393[ecx*1+ebx]
mov ecx, edx
rol ecx, 5
add ebx, ebp
add ebx, ecx
; 20_39 28
mov ecx, DWORD PTR 48[esp]
mov ebp, edx
xor ecx, DWORD PTR 56[esp]
ror edx, 2
xor ecx, DWORD PTR 16[esp]
xor ebp, edi
xor ecx, DWORD PTR 36[esp]
xor ebp, esi
rol ecx, 1
mov DWORD PTR 48[esp],ecx
lea ecx, DWORD PTR 1859775393[eax*1+ecx]
mov eax, ebx
rol eax, 5
add ecx, ebp
add ecx, eax
; 20_39 29
mov eax, DWORD PTR 52[esp]
mov ebp, ebx
xor eax, DWORD PTR 60[esp]
ror ebx, 2
xor eax, DWORD PTR 20[esp]
xor ebp, edx
xor eax, DWORD PTR 40[esp]
xor ebp, edi
rol eax, 1
mov DWORD PTR 52[esp],eax
lea eax, DWORD PTR 1859775393[esi*1+eax]
mov esi, ecx
rol esi, 5
add eax, ebp
add eax, esi
; 20_39 30
mov esi, DWORD PTR 56[esp]
mov ebp, ecx
xor esi, DWORD PTR [esp]
ror ecx, 2
xor esi, DWORD PTR 24[esp]
xor ebp, ebx
xor esi, DWORD PTR 44[esp]
xor ebp, edx
rol esi, 1
mov DWORD PTR 56[esp],esi
lea esi, DWORD PTR 1859775393[edi*1+esi]
mov edi, eax
rol edi, 5
add esi, ebp
add esi, edi
; 20_39 31
mov edi, DWORD PTR 60[esp]
mov ebp, eax
xor edi, DWORD PTR 4[esp]
ror eax, 2
xor edi, DWORD PTR 28[esp]
xor ebp, ecx
xor edi, DWORD PTR 48[esp]
xor ebp, ebx
rol edi, 1
mov DWORD PTR 60[esp],edi
lea edi, DWORD PTR 1859775393[edx*1+edi]
mov edx, esi
rol edx, 5
add edi, ebp
add edi, edx
; 20_39 32
mov edx, DWORD PTR [esp]
mov ebp, esi
xor edx, DWORD PTR 8[esp]
ror esi, 2
xor edx, DWORD PTR 32[esp]
xor ebp, eax
xor edx, DWORD PTR 52[esp]
xor ebp, ecx
rol edx, 1
mov DWORD PTR [esp],edx
lea edx, DWORD PTR 1859775393[ebx*1+edx]
mov ebx, edi
rol ebx, 5
add edx, ebp
add edx, ebx
; 20_39 33
mov ebx, DWORD PTR 4[esp]
mov ebp, edi
xor ebx, DWORD PTR 12[esp]
ror edi, 2
xor ebx, DWORD PTR 36[esp]
xor ebp, esi
xor ebx, DWORD PTR 56[esp]
xor ebp, eax
rol ebx, 1
mov DWORD PTR 4[esp],ebx
lea ebx, DWORD PTR 1859775393[ecx*1+ebx]
mov ecx, edx
rol ecx, 5
add ebx, ebp
add ebx, ecx
; 20_39 34
mov ecx, DWORD PTR 8[esp]
mov ebp, edx
xor ecx, DWORD PTR 16[esp]
ror edx, 2
xor ecx, DWORD PTR 40[esp]
xor ebp, edi
xor ecx, DWORD PTR 60[esp]
xor ebp, esi
rol ecx, 1
mov DWORD PTR 8[esp],ecx
lea ecx, DWORD PTR 1859775393[eax*1+ecx]
mov eax, ebx
rol eax, 5
add ecx, ebp
add ecx, eax
; 20_39 35
mov eax, DWORD PTR 12[esp]
mov ebp, ebx
xor eax, DWORD PTR 20[esp]
ror ebx, 2
xor eax, DWORD PTR 44[esp]
xor ebp, edx
xor eax, DWORD PTR [esp]
xor ebp, edi
rol eax, 1
mov DWORD PTR 12[esp],eax
lea eax, DWORD PTR 1859775393[esi*1+eax]
mov esi, ecx
rol esi, 5
add eax, ebp
add eax, esi
; 20_39 36
mov esi, DWORD PTR 16[esp]
mov ebp, ecx
xor esi, DWORD PTR 24[esp]
ror ecx, 2
xor esi, DWORD PTR 48[esp]
xor ebp, ebx
xor esi, DWORD PTR 4[esp]
xor ebp, edx
rol esi, 1
mov DWORD PTR 16[esp],esi
lea esi, DWORD PTR 1859775393[edi*1+esi]
mov edi, eax
rol edi, 5
add esi, ebp
add esi, edi
; 20_39 37
mov edi, DWORD PTR 20[esp]
mov ebp, eax
xor edi, DWORD PTR 28[esp]
ror eax, 2
xor edi, DWORD PTR 52[esp]
xor ebp, ecx
xor edi, DWORD PTR 8[esp]
xor ebp, ebx
rol edi, 1
mov DWORD PTR 20[esp],edi
lea edi, DWORD PTR 1859775393[edx*1+edi]
mov edx, esi
rol edx, 5
add edi, ebp
add edi, edx
; 20_39 38
mov edx, DWORD PTR 24[esp]
mov ebp, esi
xor edx, DWORD PTR 32[esp]
ror esi, 2
xor edx, DWORD PTR 56[esp]
xor ebp, eax
xor edx, DWORD PTR 12[esp]
xor ebp, ecx
rol edx, 1
mov DWORD PTR 24[esp],edx
lea edx, DWORD PTR 1859775393[ebx*1+edx]
mov ebx, edi
rol ebx, 5
add edx, ebp
add edx, ebx
; 20_39 39
mov ebx, DWORD PTR 28[esp]
mov ebp, edi
xor ebx, DWORD PTR 36[esp]
ror edi, 2
xor ebx, DWORD PTR 60[esp]
xor ebp, esi
xor ebx, DWORD PTR 16[esp]
xor ebp, eax
rol ebx, 1
mov DWORD PTR 28[esp],ebx
lea ebx, DWORD PTR 1859775393[ecx*1+ebx]
mov ecx, edx
rol ecx, 5
add ebx, ebp
add ebx, ecx
; 40_59 40
mov ecx, DWORD PTR 32[esp]
mov ebp, edx
xor ecx, DWORD PTR 40[esp]
or ebp, edi
xor ecx, DWORD PTR [esp]
and ebp, esi
xor ecx, DWORD PTR 20[esp]
rol ecx, 1
mov DWORD PTR 32[esp],ecx
lea ecx, DWORD PTR 2400959708[eax*1+ecx]
mov eax, edx
ror edx, 2
and eax, edi
or ebp, eax
mov eax, ebx
rol eax, 5
add ebp, eax
add ecx, ebp
; 40_59 41
mov eax, DWORD PTR 36[esp]
mov ebp, ebx
xor eax, DWORD PTR 44[esp]
or ebp, edx
xor eax, DWORD PTR 4[esp]
and ebp, edi
xor eax, DWORD PTR 24[esp]
rol eax, 1
mov DWORD PTR 36[esp],eax
lea eax, DWORD PTR 2400959708[esi*1+eax]
mov esi, ebx
ror ebx, 2
and esi, edx
or ebp, esi
mov esi, ecx
rol esi, 5
add ebp, esi
add eax, ebp
; 40_59 42
mov esi, DWORD PTR 40[esp]
mov ebp, ecx
xor esi, DWORD PTR 48[esp]
or ebp, ebx
xor esi, DWORD PTR 8[esp]
and ebp, edx
xor esi, DWORD PTR 28[esp]
rol esi, 1
mov DWORD PTR 40[esp],esi
lea esi, DWORD PTR 2400959708[edi*1+esi]
mov edi, ecx
ror ecx, 2
and edi, ebx
or ebp, edi
mov edi, eax
rol edi, 5
add ebp, edi
add esi, ebp
; 40_59 43
mov edi, DWORD PTR 44[esp]
mov ebp, eax
xor edi, DWORD PTR 52[esp]
or ebp, ecx
xor edi, DWORD PTR 12[esp]
and ebp, ebx
xor edi, DWORD PTR 32[esp]
rol edi, 1
mov DWORD PTR 44[esp],edi
lea edi, DWORD PTR 2400959708[edx*1+edi]
mov edx, eax
ror eax, 2
and edx, ecx
or ebp, edx
mov edx, esi
rol edx, 5
add ebp, edx
add edi, ebp
; 40_59 44
mov edx, DWORD PTR 48[esp]
mov ebp, esi
xor edx, DWORD PTR 56[esp]
or ebp, eax
xor edx, DWORD PTR 16[esp]
and ebp, ecx
xor edx, DWORD PTR 36[esp]
rol edx, 1
mov DWORD PTR 48[esp],edx
lea edx, DWORD PTR 2400959708[ebx*1+edx]
mov ebx, esi
ror esi, 2
and ebx, eax
or ebp, ebx
mov ebx, edi
rol ebx, 5
add ebp, ebx
add edx, ebp
; 40_59 45
mov ebx, DWORD PTR 52[esp]
mov ebp, edi
xor ebx, DWORD PTR 60[esp]
or ebp, esi
xor ebx, DWORD PTR 20[esp]
and ebp, eax
xor ebx, DWORD PTR 40[esp]
rol ebx, 1
mov DWORD PTR 52[esp],ebx
lea ebx, DWORD PTR 2400959708[ecx*1+ebx]
mov ecx, edi
ror edi, 2
and ecx, esi
or ebp, ecx
mov ecx, edx
rol ecx, 5
add ebp, ecx
add ebx, ebp
; 40_59 46
mov ecx, DWORD PTR 56[esp]
mov ebp, edx
xor ecx, DWORD PTR [esp]
or ebp, edi
xor ecx, DWORD PTR 24[esp]
and ebp, esi
xor ecx, DWORD PTR 44[esp]
rol ecx, 1
mov DWORD PTR 56[esp],ecx
lea ecx, DWORD PTR 2400959708[eax*1+ecx]
mov eax, edx
ror edx, 2
and eax, edi
or ebp, eax
mov eax, ebx
rol eax, 5
add ebp, eax
add ecx, ebp
; 40_59 47
mov eax, DWORD PTR 60[esp]
mov ebp, ebx
xor eax, DWORD PTR 4[esp]
or ebp, edx
xor eax, DWORD PTR 28[esp]
and ebp, edi
xor eax, DWORD PTR 48[esp]
rol eax, 1
mov DWORD PTR 60[esp],eax
lea eax, DWORD PTR 2400959708[esi*1+eax]
mov esi, ebx
ror ebx, 2
and esi, edx
or ebp, esi
mov esi, ecx
rol esi, 5
add ebp, esi
add eax, ebp
; 40_59 48
mov esi, DWORD PTR [esp]
mov ebp, ecx
xor esi, DWORD PTR 8[esp]
or ebp, ebx
xor esi, DWORD PTR 32[esp]
and ebp, edx
xor esi, DWORD PTR 52[esp]
rol esi, 1
mov DWORD PTR [esp],esi
lea esi, DWORD PTR 2400959708[edi*1+esi]
mov edi, ecx
ror ecx, 2
and edi, ebx
or ebp, edi
mov edi, eax
rol edi, 5
add ebp, edi
add esi, ebp
; 40_59 49
mov edi, DWORD PTR 4[esp]
mov ebp, eax
xor edi, DWORD PTR 12[esp]
or ebp, ecx
xor edi, DWORD PTR 36[esp]
and ebp, ebx
xor edi, DWORD PTR 56[esp]
rol edi, 1
mov DWORD PTR 4[esp],edi
lea edi, DWORD PTR 2400959708[edx*1+edi]
mov edx, eax
ror eax, 2
and edx, ecx
or ebp, edx
mov edx, esi
rol edx, 5
add ebp, edx
add edi, ebp
; 40_59 50
mov edx, DWORD PTR 8[esp]
mov ebp, esi
xor edx, DWORD PTR 16[esp]
or ebp, eax
xor edx, DWORD PTR 40[esp]
and ebp, ecx
xor edx, DWORD PTR 60[esp]
rol edx, 1
mov DWORD PTR 8[esp],edx
lea edx, DWORD PTR 2400959708[ebx*1+edx]
mov ebx, esi
ror esi, 2
and ebx, eax
or ebp, ebx
mov ebx, edi
rol ebx, 5
add ebp, ebx
add edx, ebp
; 40_59 51
mov ebx, DWORD PTR 12[esp]
mov ebp, edi
xor ebx, DWORD PTR 20[esp]
or ebp, esi
xor ebx, DWORD PTR 44[esp]
and ebp, eax
xor ebx, DWORD PTR [esp]
rol ebx, 1
mov DWORD PTR 12[esp],ebx
lea ebx, DWORD PTR 2400959708[ecx*1+ebx]
mov ecx, edi
ror edi, 2
and ecx, esi
or ebp, ecx
mov ecx, edx
rol ecx, 5
add ebp, ecx
add ebx, ebp
; 40_59 52
mov ecx, DWORD PTR 16[esp]
mov ebp, edx
xor ecx, DWORD PTR 24[esp]
or ebp, edi
xor ecx, DWORD PTR 48[esp]
and ebp, esi
xor ecx, DWORD PTR 4[esp]
rol ecx, 1
mov DWORD PTR 16[esp],ecx
lea ecx, DWORD PTR 2400959708[eax*1+ecx]
mov eax, edx
ror edx, 2
and eax, edi
or ebp, eax
mov eax, ebx
rol eax, 5
add ebp, eax
add ecx, ebp
; 40_59 53
mov eax, DWORD PTR 20[esp]
mov ebp, ebx
xor eax, DWORD PTR 28[esp]
or ebp, edx
xor eax, DWORD PTR 52[esp]
and ebp, edi
xor eax, DWORD PTR 8[esp]
rol eax, 1
mov DWORD PTR 20[esp],eax
lea eax, DWORD PTR 2400959708[esi*1+eax]
mov esi, ebx
ror ebx, 2
and esi, edx
or ebp, esi
mov esi, ecx
rol esi, 5
add ebp, esi
add eax, ebp
; 40_59 54
mov esi, DWORD PTR 24[esp]
mov ebp, ecx
xor esi, DWORD PTR 32[esp]
or ebp, ebx
xor esi, DWORD PTR 56[esp]
and ebp, edx
xor esi, DWORD PTR 12[esp]
rol esi, 1
mov DWORD PTR 24[esp],esi
lea esi, DWORD PTR 2400959708[edi*1+esi]
mov edi, ecx
ror ecx, 2
and edi, ebx
or ebp, edi
mov edi, eax
rol edi, 5
add ebp, edi
add esi, ebp
; 40_59 55
mov edi, DWORD PTR 28[esp]
mov ebp, eax
xor edi, DWORD PTR 36[esp]
or ebp, ecx
xor edi, DWORD PTR 60[esp]
and ebp, ebx
xor edi, DWORD PTR 16[esp]
rol edi, 1
mov DWORD PTR 28[esp],edi
lea edi, DWORD PTR 2400959708[edx*1+edi]
mov edx, eax
ror eax, 2
and edx, ecx
or ebp, edx
mov edx, esi
rol edx, 5
add ebp, edx
add edi, ebp
; 40_59 56
mov edx, DWORD PTR 32[esp]
mov ebp, esi
xor edx, DWORD PTR 40[esp]
or ebp, eax
xor edx, DWORD PTR [esp]
and ebp, ecx
xor edx, DWORD PTR 20[esp]
rol edx, 1
mov DWORD PTR 32[esp],edx
lea edx, DWORD PTR 2400959708[ebx*1+edx]
mov ebx, esi
ror esi, 2
and ebx, eax
or ebp, ebx
mov ebx, edi
rol ebx, 5
add ebp, ebx
add edx, ebp
; 40_59 57
mov ebx, DWORD PTR 36[esp]
mov ebp, edi
xor ebx, DWORD PTR 44[esp]
or ebp, esi
xor ebx, DWORD PTR 4[esp]
and ebp, eax
xor ebx, DWORD PTR 24[esp]
rol ebx, 1
mov DWORD PTR 36[esp],ebx
lea ebx, DWORD PTR 2400959708[ecx*1+ebx]
mov ecx, edi
ror edi, 2
and ecx, esi
or ebp, ecx
mov ecx, edx
rol ecx, 5
add ebp, ecx
add ebx, ebp
; 40_59 58
mov ecx, DWORD PTR 40[esp]
mov ebp, edx
xor ecx, DWORD PTR 48[esp]
or ebp, edi
xor ecx, DWORD PTR 8[esp]
and ebp, esi
xor ecx, DWORD PTR 28[esp]
rol ecx, 1
mov DWORD PTR 40[esp],ecx
lea ecx, DWORD PTR 2400959708[eax*1+ecx]
mov eax, edx
ror edx, 2
and eax, edi
or ebp, eax
mov eax, ebx
rol eax, 5
add ebp, eax
add ecx, ebp
; 40_59 59
mov eax, DWORD PTR 44[esp]
mov ebp, ebx
xor eax, DWORD PTR 52[esp]
or ebp, edx
xor eax, DWORD PTR 12[esp]
and ebp, edi
xor eax, DWORD PTR 32[esp]
rol eax, 1
mov DWORD PTR 44[esp],eax
lea eax, DWORD PTR 2400959708[esi*1+eax]
mov esi, ebx
ror ebx, 2
and esi, edx
or ebp, esi
mov esi, ecx
rol esi, 5
add ebp, esi
add eax, ebp
; 20_39 60
mov esi, DWORD PTR 48[esp]
mov ebp, ecx
xor esi, DWORD PTR 56[esp]
ror ecx, 2
xor esi, DWORD PTR 16[esp]
xor ebp, ebx
xor esi, DWORD PTR 36[esp]
xor ebp, edx
rol esi, 1
mov DWORD PTR 48[esp],esi
lea esi, DWORD PTR 3395469782[edi*1+esi]
mov edi, eax
rol edi, 5
add esi, ebp
add esi, edi
; 20_39 61
mov edi, DWORD PTR 52[esp]
mov ebp, eax
xor edi, DWORD PTR 60[esp]
ror eax, 2
xor edi, DWORD PTR 20[esp]
xor ebp, ecx
xor edi, DWORD PTR 40[esp]
xor ebp, ebx
rol edi, 1
mov DWORD PTR 52[esp],edi
lea edi, DWORD PTR 3395469782[edx*1+edi]
mov edx, esi
rol edx, 5
add edi, ebp
add edi, edx
; 20_39 62
mov edx, DWORD PTR 56[esp]
mov ebp, esi
xor edx, DWORD PTR [esp]
ror esi, 2
xor edx, DWORD PTR 24[esp]
xor ebp, eax
xor edx, DWORD PTR 44[esp]
xor ebp, ecx
rol edx, 1
mov DWORD PTR 56[esp],edx
lea edx, DWORD PTR 3395469782[ebx*1+edx]
mov ebx, edi
rol ebx, 5
add edx, ebp
add edx, ebx
; 20_39 63
mov ebx, DWORD PTR 60[esp]
mov ebp, edi
xor ebx, DWORD PTR 4[esp]
ror edi, 2
xor ebx, DWORD PTR 28[esp]
xor ebp, esi
xor ebx, DWORD PTR 48[esp]
xor ebp, eax
rol ebx, 1
mov DWORD PTR 60[esp],ebx
lea ebx, DWORD PTR 3395469782[ecx*1+ebx]
mov ecx, edx
rol ecx, 5
add ebx, ebp
add ebx, ecx
; 20_39 64
mov ecx, DWORD PTR [esp]
mov ebp, edx
xor ecx, DWORD PTR 8[esp]
ror edx, 2
xor ecx, DWORD PTR 32[esp]
xor ebp, edi
xor ecx, DWORD PTR 52[esp]
xor ebp, esi
rol ecx, 1
mov DWORD PTR [esp],ecx
lea ecx, DWORD PTR 3395469782[eax*1+ecx]
mov eax, ebx
rol eax, 5
add ecx, ebp
add ecx, eax
; 20_39 65
mov eax, DWORD PTR 4[esp]
mov ebp, ebx
xor eax, DWORD PTR 12[esp]
ror ebx, 2
xor eax, DWORD PTR 36[esp]
xor ebp, edx
xor eax, DWORD PTR 56[esp]
xor ebp, edi
rol eax, 1
mov DWORD PTR 4[esp],eax
lea eax, DWORD PTR 3395469782[esi*1+eax]
mov esi, ecx
rol esi, 5
add eax, ebp
add eax, esi
; 20_39 66
mov esi, DWORD PTR 8[esp]
mov ebp, ecx
xor esi, DWORD PTR 16[esp]
ror ecx, 2
xor esi, DWORD PTR 40[esp]
xor ebp, ebx
xor esi, DWORD PTR 60[esp]
xor ebp, edx
rol esi, 1
mov DWORD PTR 8[esp],esi
lea esi, DWORD PTR 3395469782[edi*1+esi]
mov edi, eax
rol edi, 5
add esi, ebp
add esi, edi
; 20_39 67
mov edi, DWORD PTR 12[esp]
mov ebp, eax
xor edi, DWORD PTR 20[esp]
ror eax, 2
xor edi, DWORD PTR 44[esp]
xor ebp, ecx
xor edi, DWORD PTR [esp]
xor ebp, ebx
rol edi, 1
mov DWORD PTR 12[esp],edi
lea edi, DWORD PTR 3395469782[edx*1+edi]
mov edx, esi
rol edx, 5
add edi, ebp
add edi, edx
; 20_39 68
mov edx, DWORD PTR 16[esp]
mov ebp, esi
xor edx, DWORD PTR 24[esp]
ror esi, 2
xor edx, DWORD PTR 48[esp]
xor ebp, eax
xor edx, DWORD PTR 4[esp]
xor ebp, ecx
rol edx, 1
mov DWORD PTR 16[esp],edx
lea edx, DWORD PTR 3395469782[ebx*1+edx]
mov ebx, edi
rol ebx, 5
add edx, ebp
add edx, ebx
; 20_39 69
mov ebx, DWORD PTR 20[esp]
mov ebp, edi
xor ebx, DWORD PTR 28[esp]
ror edi, 2
xor ebx, DWORD PTR 52[esp]
xor ebp, esi
xor ebx, DWORD PTR 8[esp]
xor ebp, eax
rol ebx, 1
mov DWORD PTR 20[esp],ebx
lea ebx, DWORD PTR 3395469782[ecx*1+ebx]
mov ecx, edx
rol ecx, 5
add ebx, ebp
add ebx, ecx
; 20_39 70
mov ecx, DWORD PTR 24[esp]
mov ebp, edx
xor ecx, DWORD PTR 32[esp]
ror edx, 2
xor ecx, DWORD PTR 56[esp]
xor ebp, edi
xor ecx, DWORD PTR 12[esp]
xor ebp, esi
rol ecx, 1
mov DWORD PTR 24[esp],ecx
lea ecx, DWORD PTR 3395469782[eax*1+ecx]
mov eax, ebx
rol eax, 5
add ecx, ebp
add ecx, eax
; 20_39 71
mov eax, DWORD PTR 28[esp]
mov ebp, ebx
xor eax, DWORD PTR 36[esp]
ror ebx, 2
xor eax, DWORD PTR 60[esp]
xor ebp, edx
xor eax, DWORD PTR 16[esp]
xor ebp, edi
rol eax, 1
mov DWORD PTR 28[esp],eax
lea eax, DWORD PTR 3395469782[esi*1+eax]
mov esi, ecx
rol esi, 5
add eax, ebp
add eax, esi
; 20_39 72
mov esi, DWORD PTR 32[esp]
mov ebp, ecx
xor esi, DWORD PTR 40[esp]
ror ecx, 2
xor esi, DWORD PTR [esp]
xor ebp, ebx
xor esi, DWORD PTR 20[esp]
xor ebp, edx
rol esi, 1
mov DWORD PTR 32[esp],esi
lea esi, DWORD PTR 3395469782[edi*1+esi]
mov edi, eax
rol edi, 5
add esi, ebp
add esi, edi
; 20_39 73
mov edi, DWORD PTR 36[esp]
mov ebp, eax
xor edi, DWORD PTR 44[esp]
ror eax, 2
xor edi, DWORD PTR 4[esp]
xor ebp, ecx
xor edi, DWORD PTR 24[esp]
xor ebp, ebx
rol edi, 1
mov DWORD PTR 36[esp],edi
lea edi, DWORD PTR 3395469782[edx*1+edi]
mov edx, esi
rol edx, 5
add edi, ebp
add edi, edx
; 20_39 74
mov edx, DWORD PTR 40[esp]
mov ebp, esi
xor edx, DWORD PTR 48[esp]
ror esi, 2
xor edx, DWORD PTR 8[esp]
xor ebp, eax
xor edx, DWORD PTR 28[esp]
xor ebp, ecx
rol edx, 1
mov DWORD PTR 40[esp],edx
lea edx, DWORD PTR 3395469782[ebx*1+edx]
mov ebx, edi
rol ebx, 5
add edx, ebp
add edx, ebx
; 20_39 75
mov ebx, DWORD PTR 44[esp]
mov ebp, edi
xor ebx, DWORD PTR 52[esp]
ror edi, 2
xor ebx, DWORD PTR 12[esp]
xor ebp, esi
xor ebx, DWORD PTR 32[esp]
xor ebp, eax
rol ebx, 1
mov DWORD PTR 44[esp],ebx
lea ebx, DWORD PTR 3395469782[ecx*1+ebx]
mov ecx, edx
rol ecx, 5
add ebx, ebp
add ebx, ecx
; 20_39 76
mov ecx, DWORD PTR 48[esp]
mov ebp, edx
xor ecx, DWORD PTR 56[esp]
ror edx, 2
xor ecx, DWORD PTR 16[esp]
xor ebp, edi
xor ecx, DWORD PTR 36[esp]
xor ebp, esi
rol ecx, 1
mov DWORD PTR 48[esp],ecx
lea ecx, DWORD PTR 3395469782[eax*1+ecx]
mov eax, ebx
rol eax, 5
add ecx, ebp
add ecx, eax
; 20_39 77
mov eax, DWORD PTR 52[esp]
mov ebp, ebx
xor eax, DWORD PTR 60[esp]
ror ebx, 2
xor eax, DWORD PTR 20[esp]
xor ebp, edx
xor eax, DWORD PTR 40[esp]
xor ebp, edi
rol eax, 1
mov DWORD PTR 52[esp],eax
lea eax, DWORD PTR 3395469782[esi*1+eax]
mov esi, ecx
rol esi, 5
add eax, ebp
add eax, esi
; 20_39 78
mov esi, DWORD PTR 56[esp]
mov ebp, ecx
xor esi, DWORD PTR [esp]
ror ecx, 2
xor esi, DWORD PTR 24[esp]
xor ebp, ebx
xor esi, DWORD PTR 44[esp]
xor ebp, edx
rol esi, 1
mov DWORD PTR 56[esp],esi
lea esi, DWORD PTR 3395469782[edi*1+esi]
mov edi, eax
rol edi, 5
add esi, ebp
add esi, edi
; 20_39 79
mov edi, DWORD PTR 60[esp]
mov ebp, eax
xor edi, DWORD PTR 4[esp]
ror eax, 2
xor edi, DWORD PTR 28[esp]
xor ebp, ecx
xor edi, DWORD PTR 48[esp]
xor ebp, ebx
rol edi, 1
mov DWORD PTR 60[esp],edi
lea edi, DWORD PTR 3395469782[edx*1+edi]
mov edx, esi
rol edx, 5
add edi, ebp
add edi, edx
; End processing
;
mov ebp, DWORD PTR 128[esp]
mov edx, DWORD PTR 12[ebp]
add edx, ecx
mov ecx, DWORD PTR 4[ebp]
add ecx, esi
mov esi, eax
mov eax, DWORD PTR [ebp]
mov DWORD PTR 12[ebp],edx
add eax, edi
mov edi, DWORD PTR 16[ebp]
add edi, ebx
mov ebx, DWORD PTR 8[ebp]
add ebx, esi
mov DWORD PTR [ebp],eax
mov esi, DWORD PTR 132[esp]
mov DWORD PTR 8[ebp],ebx
add esi, 64
mov eax, DWORD PTR 68[esp]
mov DWORD PTR 16[ebp],edi
cmp esi, eax
mov DWORD PTR 4[ebp],ecx
jb $L000start
add esp, 108
pop edi
pop ebx
pop ebp
pop esi
ret
_sha1_block_asm_data_order ENDP
_TEXT ENDS
_TEXT SEGMENT
PUBLIC _sha1_block_asm_host_order
_sha1_block_asm_host_order PROC NEAR
mov ecx, DWORD PTR 12[esp]
push esi
shl ecx, 6
mov esi, DWORD PTR 12[esp]
push ebp
add ecx, esi
push ebx
mov ebp, DWORD PTR 16[esp]
push edi
mov edx, DWORD PTR 12[ebp]
sub esp, 108
mov edi, DWORD PTR 16[ebp]
mov ebx, DWORD PTR 8[ebp]
mov DWORD PTR 68[esp],ecx
; First we need to setup the X array
mov eax, DWORD PTR [esi]
mov ecx, DWORD PTR 4[esi]
mov DWORD PTR [esp],eax
mov DWORD PTR 4[esp],ecx
mov eax, DWORD PTR 8[esi]
mov ecx, DWORD PTR 12[esi]
mov DWORD PTR 8[esp],eax
mov DWORD PTR 12[esp],ecx
mov eax, DWORD PTR 16[esi]
mov ecx, DWORD PTR 20[esi]
mov DWORD PTR 16[esp],eax
mov DWORD PTR 20[esp],ecx
mov eax, DWORD PTR 24[esi]
mov ecx, DWORD PTR 28[esi]
mov DWORD PTR 24[esp],eax
mov DWORD PTR 28[esp],ecx
mov eax, DWORD PTR 32[esi]
mov ecx, DWORD PTR 36[esi]
mov DWORD PTR 32[esp],eax
mov DWORD PTR 36[esp],ecx
mov eax, DWORD PTR 40[esi]
mov ecx, DWORD PTR 44[esi]
mov DWORD PTR 40[esp],eax
mov DWORD PTR 44[esp],ecx
mov eax, DWORD PTR 48[esi]
mov ecx, DWORD PTR 52[esi]
mov DWORD PTR 48[esp],eax
mov DWORD PTR 52[esp],ecx
mov eax, DWORD PTR 56[esi]
mov ecx, DWORD PTR 60[esi]
mov DWORD PTR 56[esp],eax
mov DWORD PTR 60[esp],ecx
jmp $L001shortcut
_sha1_block_asm_host_order ENDP
_TEXT ENDS
END
| 20.086657 | 74 | 0.639184 |
d5fbb3eb354bf790b0b60fd12b663f4d08b03502 | 415 | asm | Assembly | oeis/206/A206156.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/206/A206156.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/206/A206156.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A206156: a(n) = Sum_{k=0..n} binomial(n,k)^(2*k).
; Submitted by Christian Krause
; 1,2,6,92,5410,1400652,2687407464,18947436116184,536104663173431874,130559883231879141946580,136031455187223511721647272376,483565526783420050082035900177878504,14487924180895151383693101563813954330590756
lpb $0
sub $0,1
add $2,1
mov $3,$0
add $3,$2
bin $3,$2
pow $3,$2
pow $3,2
add $1,$3
lpe
add $1,1
mov $0,$1
| 24.411765 | 206 | 0.73012 |
bfe58f9dfbea0eb2e12a1f5c4878140e6aac093d | 2,887 | asm | Assembly | vmidle.asm | groktrev/vmidle | ea3d133fe17b1848890baf99cc6b2b60635a32bf | [
"BSD-2-Clause"
] | null | null | null | vmidle.asm | groktrev/vmidle | ea3d133fe17b1848890baf99cc6b2b60635a32bf | [
"BSD-2-Clause"
] | null | null | null | vmidle.asm | groktrev/vmidle | ea3d133fe17b1848890baf99cc6b2b60635a32bf | [
"BSD-2-Clause"
] | null | null | null | ;*****************************************************************************
;Copyright (c) 2007, Trevor Scroggins
;All rights reserved.
;
;Redistribution and use in source and binary forms, with or without
;modification, are permitted provided that the following conditions are met:
;
;1. Redistributions of source code must retain the above copyright notice,
;this list of conditions and the following disclaimer.
;
;2. 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.
;
;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 HOLDER 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.
;*****************************************************************************
begin_resident:
dd 0x0000ffff
dw 0x8000
int28_prev:
dw strategy
dw interrupt
db "VMIDLE$ "
int28:
pushf
sti
hlt
popf
jmp far [cs:int28_prev]
align 16,int3
end_resident:
;*****************************************************************************
begin_transient:
request:
dd 0
strategy:
mov [cs:request],bx
mov [cs:request+0x02],es
retf
interrupt:
pusha
lds bx,[cs:request]
cmp byte [bx+0x02],0
jz short init
or word [bx+0x03],0x8101
exit:
popa
retf
init:
or word [bx+0x03],0x0100
mov word [bx+0x0e],end_resident
mov word [bx+0x10],cs
push cs
pop ds
mov dx,banner
mov ah,0x09
int 0x21
mov ax,0x3528
int 0x21
mov [cs:int28_prev],bx
mov [cs:int28_prev+0x02],es
mov dx,int28
mov ax,0x2528
int 0x21
jmp short exit
banner:
db "VMIDLE Device Version 1.0",13,10
db "Copyright (c) 2007, Trevor Scroggins",13,10
db "All rights reserved.",13,10
db "$"
end_transient:
;*****************************************************************************
| 31.043011 | 78 | 0.570142 |
2555b82fbb07e5270ff589001c524ac0a130e813 | 639 | asm | Assembly | programs/oeis/213/A213391.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/213/A213391.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/213/A213391.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A213391: Number of (w,x,y) with all terms in {0,...,n} and 2*max(w,x,y) < 3*min(w,x,y).
; 0,1,2,3,10,17,24,43,62,81,118,155,192,253,314,375,466,557,648,775,902,1029,1198,1367,1536,1753,1970,2187,2458,2729,3000,3331,3662,3993,4390,4787,5184,5653,6122,6591,7138,7685,8232,8863,9494,10125
mov $2,$0
mov $4,$0
lpb $2
mov $0,$4
sub $2,1
sub $0,$2
mov $5,$0
mov $7,0
mov $8,$0
lpb $5
mov $0,$8
sub $5,1
sub $0,$5
mov $6,$0
mul $0,3
sub $0,1
trn $6,2
add $6,$0
mod $0,9
lpb $0
cmp $6,$0
mov $0,2
lpe
mov $3,$6
div $3,2
add $7,$3
lpe
add $1,$7
lpe
mov $0,$1
| 18.794118 | 197 | 0.535211 |
51ea2c773e79226f61c2b7c188f04e8f04e6fa44 | 788 | asm | Assembly | Src/Q3.asm | OferMon/MIPS-Assembly-Exercises | 6f5699f2d1f5c3312467af038679eab238d33866 | [
"Apache-2.0"
] | null | null | null | Src/Q3.asm | OferMon/MIPS-Assembly-Exercises | 6f5699f2d1f5c3312467af038679eab238d33866 | [
"Apache-2.0"
] | null | null | null | Src/Q3.asm | OferMon/MIPS-Assembly-Exercises | 6f5699f2d1f5c3312467af038679eab238d33866 | [
"Apache-2.0"
] | null | null | null | .data 0x10020000
array: .space 80 # 20 words
.text
jal init_array
li $a0, 0x10020000
li $a1, 0x10040000
li $a2, 20
jal memory_copy_words
b end
#------------------------#
init_array:
la $t2, array
li $t3, 0
_init_array_loop_start:
li $v0, 42
li $a0, 0
li $a1, 101
syscall
subi $a0, $a0, 50
sw $a0, ($t2)
addi $t2, $t2, 4
addi $t3, $t3, 1
bne $t3, 20, _init_array_loop_start
subi $t2, $t2, 80
jr $ra
#------------------------#
memory_copy_words:
add $t0, $a0, $zero # source address
add $t1, $a1, $zero # destination address
add $t2, $a2, $zero # amount of words to copy
_memory_copy_words_loop_start:
lw $t3, ($t0)
sw $t3, ($t1)
addi $t0, $t0, 4
addi $t1, $t1, 4
subi $t2, $t2, 1
bne $t2, 0, _memory_copy_words_loop_start
jr $ra
#------------------------#
end:
| 17.130435 | 46 | 0.591371 |
0544ba04383f2e3759ddb855d9404e7edb4fff42 | 350 | asm | Assembly | oeis/040/A040648.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/040/A040648.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/040/A040648.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A040648: Continued fraction for sqrt(674).
; Submitted by Jamie Morken(s1)
; 25,1,24,1,50,1,24,1,50,1,24,1,50,1,24,1,50,1,24,1,50,1,24,1,50,1,24,1,50,1,24,1,50,1,24,1,50,1,24,1,50,1,24,1,50,1,24,1,50,1,24,1,50,1,24,1,50,1,24,1,50,1,24,1,50,1,24,1,50,1,24,1,50,1,24
gcd $0,262156
mul $0,42
mod $0,13
mov $1,$0
div $1,5
mul $1,20
add $0,$1
sub $0,2
| 26.923077 | 189 | 0.625714 |
2d9d07fe473e031f0d29cd0610421e27ab18e567 | 591 | asm | Assembly | programs/oeis/065/A065202.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/065/A065202.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/065/A065202.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A065202: Characteristic function of A065201: a(n) = if A065201(k) = n for some k then 1 else 0.
; 0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,1,1,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,1,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,0,1,1
add $0,1
mov $2,2
mov $3,$0
mov $4,$0
lpb $3
mov $5,$4
mov $6,0
lpb $5
add $6,1
mov $7,$0
div $0,$2
mod $7,$2
cmp $7,0
sub $5,$7
lpe
lpb $6
mov $1,1
cmp $6,0
cmp $6,0
lpe
add $2,1
mov $7,$0
cmp $7,1
cmp $7,0
sub $3,$7
lpe
mov $0,$1
| 19.064516 | 201 | 0.499154 |
e89b30f19288441bfb6e5b2f6c2e484c97423a03 | 267 | asm | Assembly | src/unimon_MC6850/dev_6850.asm | kuninet/K65-SBC | a0ee7e47bdc5990d5beff47f1b6af8d6b0aecb6a | [
"MIT"
] | null | null | null | src/unimon_MC6850/dev_6850.asm | kuninet/K65-SBC | a0ee7e47bdc5990d5beff47f1b6af8d6b0aecb6a | [
"MIT"
] | null | null | null | src/unimon_MC6850/dev_6850.asm | kuninet/K65-SBC | a0ee7e47bdc5990d5beff47f1b6af8d6b0aecb6a | [
"MIT"
] | null | null | null | ;;;
;;; MCS6850 Console Driver
;;;
INIT:
LDA #ACIA_V1
STA ACIACS
LDA #ACIA_V2
STA ACIACS
RTS
CONIN:
LDA ACIACS
AND #$01
BEQ CONIN
LDA ACIADT
RTS
CONST:
LDA ACIACS
AND #$01
RTS
CONOUT:
PHA
CO0:
LDA ACIACS
AND #$02
BEQ CO0
PLA
STA ACIADT
RTS
| 8.090909 | 26 | 0.64794 |
e8dc7e41143bb04474248d04b7a0def2a7996c4a | 891 | asm | Assembly | assembler/tests/t_9331_2/t_9331_2.asm | paulscottrobson/RCA-Cosmac-VIP-III | 5d3fcea325aacb7c99269f266bc14e30439cdc2b | [
"MIT"
] | null | null | null | assembler/tests/t_9331_2/t_9331_2.asm | paulscottrobson/RCA-Cosmac-VIP-III | 5d3fcea325aacb7c99269f266bc14e30439cdc2b | [
"MIT"
] | null | null | null | assembler/tests/t_9331_2/t_9331_2.asm | paulscottrobson/RCA-Cosmac-VIP-III | 5d3fcea325aacb7c99269f266bc14e30439cdc2b | [
"MIT"
] | null | null | null | , , , , , , , , , , , , , , ;
jc ,start ,gf0 , , , , , , , ;
lda ,mod0 ,15h , , , , ; Initialization
lda ,mod1 ,15h , , , , ; LACK of Low: Lch, High:
lda ,df0 ,03h , , , , ; Rch are assumed for the
lda ,df1 ,02h , , , , ; following comment relative
lda ,dp0 ,01h , , , , ; to channel
lda ,dp1 ,21h , , , , ; Stupid Toshiba assembler disregards
,gfs ,gf0 , , , , , , , , , ; ';' in first row!
start:
, , , , , , ,cp+ , , ,x ,si0 , , , ;
mads, ,x ,y ,0 , , ,cp+ , , , , , , , ;
, , , , ,wf0 , ,cp+ ,dp1 ,+ ,so1 ,w0 , , , ; data output (Lch)
wait_edge:
jnc ,wait_edge(down),LRF , , , , , , , ; down edge waiting
, , , , , , ,cp+ , , ,x ,si0 , , , ;
mads, ,x ,y ,0 , , ,cp+ , , , , , , , ;
, , , , ,wf0 , , , , ,so1 ,w0 , , , ; data output (Rch)
wait_SYNC:
jmp0 ,wait_SYNC(up-edge) , , , , , , , ; SYNC reset waiting
end
| 40.5 | 67 | 0.413019 |
8a79bf12602b73afbbcbd3690d9792cb99ceeeb3 | 881 | nasm | Assembly | Exams/3-Individual_exam_3/src/nasm/separacao.nasm | FelixLuciano/Elements-of-Computing-Systems | bf36e4f4bbaa75aebefd1b864514a146b371495d | [
"MIT"
] | null | null | null | Exams/3-Individual_exam_3/src/nasm/separacao.nasm | FelixLuciano/Elements-of-Computing-Systems | bf36e4f4bbaa75aebefd1b864514a146b371495d | [
"MIT"
] | null | null | null | Exams/3-Individual_exam_3/src/nasm/separacao.nasm | FelixLuciano/Elements-of-Computing-Systems | bf36e4f4bbaa75aebefd1b864514a146b371495d | [
"MIT"
] | 1 | 2022-02-20T21:45:28.000Z | 2022-02-20T21:45:28.000Z | ;-------------------------------------
; separacao.nasm
; Leia o README.md para detalhes
;-------------------------------------
; Separa primeiro byte
leaw $10, %A ; Insere o endereço de RAM[10] no reg. A
movw (%A), %D ; Copia o valor de RAM[10] no reg. D
leaw $255, %A ; Copia o valor de máscara 0000000011111111 no reg. A
andw %A, %D, %D ; Registra o resultado da operação AND no reg. D
leaw $0, %A ; Insere o endereço de RAM[0] no reg. A
movw %D, (%A) ; Copia o valor do reg. D na RAM[0]
; Separa segundo byte
leaw $10, %A ; Insere o endereço de RAM[10] no reg. A
movw (%A), %D ; Copia o valor de RAM[10] no reg. D
leaw $65280, %A ; Copia o valor de máscara 1111111100000000 no reg. A
andw %A, %D, %D ; Registra o resultado da operação AND no reg. D
leaw $1, %A ; Insere o endereço de RAM[1] no reg. A
movw %D, (%A) ; Copia o valor do reg. D na RAM[1]
| 41.952381 | 69 | 0.586833 |
5af5a7fc75adc91b744068cb9ae466acb2dbaed0 | 1,175 | asm | Assembly | LoopStatement.asm | akshithsriram/Hack-Computer | 2cdbe28defe554f449c3664417a5d120ab0863c2 | [
"CC0-1.0"
] | null | null | null | LoopStatement.asm | akshithsriram/Hack-Computer | 2cdbe28defe554f449c3664417a5d120ab0863c2 | [
"CC0-1.0"
] | null | null | null | LoopStatement.asm | akshithsriram/Hack-Computer | 2cdbe28defe554f449c3664417a5d120ab0863c2 | [
"CC0-1.0"
] | null | null | null | // Implementation of a Loop Statement in the Hack Machine Language
// Calculates the sum of all numbers in the sequence [start, stop] with step size 'inc'
// sum = start + (start + inc) + (start + 2*inc) + .. (till end is reached)
// e.g. start = 1, inc = 2 calculates the sum 1 + 3 + 5 + ... + 99
// Equivalent C program:
// i = start
// sum = 0
// while(i <= end)
// {
// sum = sum + i;
// i = i + inc;
// }
@start // Memory Location 16
D = M // D <-- start
@i // Memory Location 17
M = D // i <-- D = start
@inc // Memory Location 18
@end // Memory Location 19
@sum // Memory Location 20
M = 0 // sum <-- 0
(LOOP)
@i
D = M // D <-- i
@end
D = D - M // D <-- i - end
@END
D;JGT // Exit the loop if (i - end) > 0
@i
D = M // D = i
@sum
M = D + M // sum <-- sum + i
@inc
D = M
@i
M = M + D // i = i + inc
@LOOP
0;JMP // Repeat the instructions of LOOP
(END)
@END
0;JMP // Infinite loop, program termination | 21.759259 | 88 | 0.435745 |
41f875fc483bad3ae17161f0575ecab983f551d1 | 21,448 | asm | Assembly | EP1 - Rodando a baiana/EP1.asm | mateuslatrova/TecnicasDeProgramacao1 | 11e9a068ddd872ee74c2c474659982cc61f6570b | [
"MIT"
] | null | null | null | EP1 - Rodando a baiana/EP1.asm | mateuslatrova/TecnicasDeProgramacao1 | 11e9a068ddd872ee74c2c474659982cc61f6570b | [
"MIT"
] | null | null | null | EP1 - Rodando a baiana/EP1.asm | mateuslatrova/TecnicasDeProgramacao1 | 11e9a068ddd872ee74c2c474659982cc61f6570b | [
"MIT"
] | null | null | null | ########### EP1 - Rodando a baiana #############
# Dupla:
# Mateus Latrova Stephanin - NUSP 12542821
# Guilherme Mota Pereira - NUSP 12543307
#### Convenções utilizadas ####
# - Em relação aos registradores de float:
# O registrador $f0 foi usado como valor de retorno.
# Já os registradores $f1-$f5 foram usados como valores permanentes.
# Além disso, $f6-$f10 foram usados como valores temporários.
# Por fim, os registradores $f12-$f13 foram usados como argumento para as funções.
# - Em relação ao empilhamento/desempilhamento na chamada de funções:
# Empilhamos os valores dos registradores de variáveis temporárias, de argumento e de retorno
# sempre na função chamadora. Já os valores registradores de variáveis permanentes e de ende-
# reço de retorno foram empilhados na função chamada. Essa convenção foi retirada do seguinte
# conjunto de slides: https://courses.cs.washington.edu/courses/cse378/10sp/lectures/lec05-new.pdf
# - Em relação aos demais registradores:
# Foram utilizados segundo as convenções padrão do MIPS.
.data
# Variáveis globais:
R: .space 16 # alocação de um vetor de 4 elementos, que representará a matriz R(de rotação) 2x2
v: .space 8 # alocação do vetor v que será rotacionado.
v_rotacionado: .space 8 # alocação do vetor v rotacionado por um ângulo theta.
n_linhas: .word 2 # número de linhas da matriz
n_cols: .word 2 # número de colunas da matriz
menos_um: .float -1.0
angulo: .float 150.0 # [-90,90]
pi: .float 3.1416 # constante que representa o número irracional PI
cte_1e_min_4: .float 0.0001
# Variáveis usadas para auxiliar nos testes realizados na função principal
# (x é a abscissa do vetor, y é a sua ordenada e theta é o ângulo de rotação):
teste1_x: .float 4.0
teste1_y: .float 0.0
teste1_theta: .float 180.0 # graus
teste2_x: .float 0.0
teste2_y: .float 7.0
teste2_theta: .float 90.0 # graus
teste3_x: .float 1.0
teste3_y: .float 2.0
teste3_theta: .float 240.0 # graus
teste4_x: .float 0.0
teste4_y: .float -2.0
teste4_theta: .float 30.0 # graus
.text
# Função principal, a qual realiza diversos testes unitários para verificação do funcionamento do programa.
principal: li $t7, -1
mtc1 $t7, $f28
cvt.s.w $f28, $f28
la $a0, v
la $s0, R
la $s1, v_rotacionado
lw $s2, n_linhas
lw $s3, n_cols
#### 1o teste: v = (4,0) e theta = PI ####
l.s $f6, teste1_x
s.s $f6, 0($a0)
l.s $f7, teste1_y
s.s $f7, 4($a0)
l.s $f12, teste1_theta
sub $sp, $sp, 16 # ajuste do sp para empilhar $a0, $f6, $f7, $f12
# Empilhando variáveis:
sw $a0, 12($sp)
s.s $f6, 8($sp)
s.s $f7, 4($sp)
s.s $f12, 0($sp)
jal teste_unitario
# Desempilhando variáveis:
l.s $f12, 0($sp)
l.s $f7, 4($sp)
l.s $f6, 8($sp)
lw $a0, 12($sp)
add $sp, $sp, 16 # ajuste do sp para desempilhar $a0, $f6, $f7, $f12
#### 2o teste: v = (0,7) e theta = PI/2 ####
l.s $f6, teste2_x
s.s $f6, 0($a0)
l.s $f7, teste2_y
s.s $f7, 4($a0)
l.s $f12, teste2_theta
sub $sp, $sp, 16 # ajuste do sp para empilhar $a0, $f6, $f7, $f12
# Empilhando variáveis:
sw $a0, 12($sp)
s.s $f6, 8($sp)
s.s $f7, 4($sp)
s.s $f12, 0($sp)
jal teste_unitario
# Desempilhando variáveis:
l.s $f12, 0($sp)
l.s $f7, 4($sp)
l.s $f6, 8($sp)
lw $a0, 12($sp)
add $sp, $sp, 16
#### 3o teste: v = (1, 2) e theta = 4*PI/3 ####
l.s $f6, teste3_x
s.s $f6, 0($a0)
l.s $f7, teste3_y
s.s $f7, 4($a0)
l.s $f12, teste3_theta
sub $sp, $sp, 16 # ajuste do sp para empilhar $a0, $f6, $f7, $f12
# Empilhando variáveis:
sw $a0, 12($sp)
s.s $f6, 8($sp)
s.s $f7, 4($sp)
s.s $f12, 0($sp)
jal teste_unitario
# Desempilhando variáveis:
l.s $f12, 0($sp)
l.s $f7, 4($sp)
l.s $f6, 8($sp)
lw $a0, 12($sp)
add $sp, $sp, 16
#### 4o teste: v = (0, -2) e theta = PI/6 ####
l.s $f6, teste4_x
s.s $f6, 0($a0)
l.s $f7, teste4_y
s.s $f7, 4($a0)
l.s $f12, teste4_theta
sub $sp, $sp, 16 # ajuste do sp para empilhar $a0, $f6, $f7, $f12
# Empilhando variáveis:
sw $a0, 12($sp)
s.s $f6, 8($sp)
s.s $f7, 4($sp)
s.s $f12, 0($sp)
jal teste_unitario
# Desempilhando variáveis:
l.s $f12, 0($sp)
l.s $f7, 4($sp)
l.s $f6, 8($sp)
lw $a0, 12($sp)
add $sp, $sp, 16
# Terminar o programa.
li $v0, 10
syscall
# Função que testa a função rotaciona implementada mais abaixo, mostrando também o resultado da rotação.
# - Entrada: $a0(ponteiro para o início do vetor) e $f12(ângulo de rotação em radianos)
# - Saída: nenhuma(função do tipo void)
teste_unitario:
sub $sp, $sp, 12 # ajuste do sp para empilhar $a0, $f12 e $ra.
# Empilhar variáveis:
sw $ra, 8($sp)
sw $a0, 4($sp)
s.s $f12, 0($sp)
# Rotacionar vetor
jal rotaciona
# Desempilhar variáveis:
l.s $f12, 0($sp)
lw $a0, 4($sp)
lw $ra, 8($sp)
add $sp, $sp, 12 # ajuste do sp para desempilhar $a0, $f12 e $ra.
# Imprimir o vetor rotacionado
sub $sp, $sp, 4
sw $a0, 0($sp)
li $v0, 2
lwc1 $f12, 0($s1)
syscall
li $a0, ' '
li $v0, 11
syscall
li $v0, 2
lwc1 $f12, 4($s1)
syscall
li $a0, ' '
li $v0, 11
syscall
li $a0, '\n'
li $v0, 11
syscall
lw $a0, 0($sp)
add $sp, $sp, 4
# Voltar à função chamadora
jr $ra
# Função que realiza a rotação de um vetor por um dado ângulo.
# - Entrada: $a0(ponteiro para o início do vetor) e $f12(ângulo de rotação em radianos)
# - Saída: $v0(ponteiro para o início do vetor rotacionado)
rotaciona:
#### Gerar a matriz de rotação ####
sub $sp, $sp, 24 # ajuste do sp para empilhar $f6, $f7, $f8, $f12, $v0 e $ra.
# Empilhar variáveis:
sw $ra, 20($sp)
s.s $f6, 16($sp)
s.s $f7, 12($sp)
s.s $f8, 8($sp)
s.s $f12, 4($sp)
sw $v0, 0($sp)
# Montar a matriz de rotação e armazená-la em R:
jal matriz_de_rotacao
# Desempilhar variáveis:
lw $v0, 0($sp)
l.s $f12, 4($sp)
l.s $f8, 8($sp)
l.s $f7, 12($sp)
l.s $f6, 16($sp)
lw $ra, 20($sp)
add $sp, $sp, 24 # ajuste do sp para desempilhar $f6, $f7, $f8, $f12, $v0 e $ra.
#### Multiplicação da matriz de rotação pelo vetor ####
sub $sp, $sp, 24 # ajuste do sp para empilhar $ra, $a0, $a1, $f6, $f7, e $f8.
# Empilhar variáveis:
sw $ra, 20($sp)
sw $a0, 16($sp)
sw $a1, 12($sp)
s.s $f6, 8($sp)
s.s $f7, 4($sp)
s.s $f8, 0($sp)
la $a0, R
la $a1, v
jal mult_matriz_vetor # coloca o endereço do vetor rotacionado em $v0
# Desempilhar variáveis:
l.s $f8, 0($sp)
l.s $f7, 4($sp)
l.s $f6, 8($sp)
lw $a1, 12($sp)
lw $a0, 16($sp)
lw $ra, 20($sp)
add $sp, $sp, 24 # ajuste do sp para desempilhar $ra, $a0, $a1, $f6, $f7, e $f8.
la $v0, v_rotacionado
jr $ra
# Função que monta a matriz de rotação para um dado ângulo.
# - Entrada: $f12(ângulo de rotação em radianos)
# - Saída: $v0(ponteiro para o início da matriz)
matriz_de_rotacao:
#### Calcular o seno de theta ####
sub $sp, $sp, 16
# Empilhar variáveis:
sw $ra, 12($sp)
s.s $f6, 8($sp)
s.s $f8, 4($sp)
s.s $f12, 0($sp)
jal seno # argumento $f12
mov.s $f7, $f0 # $f7 = seno
#mov.s $f12, $f7
l.s $f12, 0($sp)
jal cosseno # f12 = seno
mov.s $f10, $f0 # $f10 = cosseno
# Desempilhar variáveis:
l.s $f12, 0($sp)
l.s $f8, 4($sp)
l.s $f6, 8($sp)
lw $ra, 12($sp)
add $sp, $sp, 16 # ajuste do sp para desempilhar $ra, $a0, $a1, $f6, $f7, e $f8.
mov.s $f8, $f7
mul.s $f8, $f8, $f28 # $f8 = -seno
# Montar a matriz de rotação:
s.s $f10, 0($s0) # R[0] = cosseno
s.s $f8, 4($s0) # R[1] = -seno
s.s $f7, 8($s0) # R[2] = seno
s.s $f10, 12($s0) # R[3] = cosseno
la $v0, R
jr $ra
# Função que realiza a multiplicação de uma matriz(à esquerda) por um vetor(à direita).
# - Entrada: $a0(ponteiro para o início da matriz) e $a1(ponteiro para o início do vetor)
# - Saída: $v0(ponteiro para o início do vetor resultado da multiplicação)
mult_matriz_vetor:
# Inicializar o vetor rotacionado:
sw $zero, 0($s1)
sw $zero, 4($s1)
# Realizar a multiplicação com 2 loops aninhados:
li $s4, 0 # i = 0
li $s5, 0 # j = 0
# $s2 contém nLinhas(2) e $s3 contém nCols(2)
laço_i: bge $s4, $s2, termino_laço_i # branch if i >= nLinhas
li $s5, 0
laço_j: bge $s5, $s3, termino_laço_j # branch if j >= nCols
add $t0, $s4, $s4
add $t0, $t0, $t0 # $t0 = 4 * i
add $t1, $s5, $s5
add $t1, $t1, $t1 # $t0 = 4 * j
# endereço de vRotacionado está em $s1
mul $t2, $t0, $s3 # $t2 = 4*i*nCols
add $t2, $t2, $t1 # $t2 = 4*i*nCols + 4*j
add $t3, $t2, $s0 # $t3 = endereço da posição da matriz que queremos acessar
add $t4, $t1, $a1 # $t4 = endereço da posição do vetor que queremos acessar
l.s $f6, ($t3) # $f6 = R[i*nCols+j]
l.s $f7, ($t4) # $f7 = v[j]
mul.s $f8, $f6, $f7 # $f8 = R[i*nCols+j]*v[j]
add $t5, $t0, $s1
l.s $f9, ($t5) # $f9 = vRotacionado[i]
add.s $f8, $f8, $f9 # $f8 = vRotacionado[i] + R[i*nCols+j]*v[j]
s.s $f8, ($t5)
addi $s5, $s5, 1
j laço_j
termino_laço_j: addi $s4, $s4, 1
j laço_i
termino_laço_i: la $v0, v_rotacionado
jr $ra
# Função que calcula o seno de um argumento em graus do registrador a0
# - Entrada: $f12: float - Ângulo entre 0 e 360º
# - Saída: $f0: float - Valor de sen($f12)
seno: mtc1 $zero, $f10 # f10: valor de 0 em float
sub $sp, $sp, 8
sw $ra, 0($sp)
sw $s6, 4($sp)
add $s6, $zero, -1 # k = s0 = -1
# 0) Adequação do argumento de graus para radianos
lwc1 $f2, pi # Carrega-se o valor aproximado da constante "pi" para $f2
li $t2, 180 # Coloca-se o valor de 180 no registrador $t2
mtc1 $t2, $f11
cvt.s.w $f11, $f11
# O valor de $f12 será o do ângulo em radianos
div.s $f12, $f12, $f11 # valor em radianos = (valor em graus)/180
mul.s $f12, $f12, $f2 # valor em radianos = pi*(valor em graus)/180
# Usar-se-á $f3 para a aproximação de sen(x) por meio da série de Taylor
lwc1 $f4, cte_1e_min_4 # Constante (1e-4) para a aproximação de sen(x)
jal loop_seno
loop_seno: sub $sp, $sp, 4
swc1 $f12, 0($sp) # Salva-se o valor do argumento ($f12)
add.s $f6, $f10, $f10# Resetamento do registrador $f6: f6 = 0
# 1) Incremento de k e calculo de (2k + 1)
add $s6, $s6, 1 # Incremento de k: k++
add $t1, $s6, $s6 # t1 = 2k
add $t1, $t1, 1 # t1: 2k + 1 (para o fatorial e o expooente)
# 2) Cálculo de (x)^(2k+1)
# argumento $f12 do seno é o mesmo daquele para a potência. (f12_seno = f12_base_potencia)
move $a1, $t1 # argumento da função "potencia" a1: t1 = 2k + 1
jal potencia # Cálculo de ($f12)^($a1) = (x)^(2k+1)
add.s $f6, $f6, $f0 # f6: (x)^(2k+1)
# 3) Cálculo de (-1)^(k) através da função "potencia"
li $t2, -1 # "Coloca-se", no registrador $f12, o valor -1.0
mtc1 $t2, $f12
cvt.s.w $f12, $f12
add $a1, $s6, $zero # Argumento $a1 = $s0 = k
jal potencia # Cálculo de (-1)^(k)
mul.s $f6, $f6, $f0 # $f6 = ((-1)^(k) * (x)^(2k+1))
# 4) Cálculo de (2k+1)! por meio da função "fatorial"
lwc1 $f12, 0($sp) # Recupera-se, da pilha, $f12, cujo valor é o argumento da função.
add $sp, $sp, 4
mtc1 $t1, $f13 # Passa-se $t1 = (2k + 1) como argumento da função fatorial
cvt.s.w $f13, $f13
jal fatorial # Calcula-se (2k + 1)!
mov.s $f9, $f0 # Move-se o resultado da função "fatorial" para o registrador $f9
div.s $f6, $f6, $f9 # ENFIM, calcula-se ((-1)^(k) * (x)^(2k+1))/(2k + 1)!
# 5) Checa-se se o termo calculado ($f6) é maior que 1e-4 ($f4).
abs.s $f8, $f6 # Calcula-se o módulo do termo calculado
c.lt.s $f4, $f8 # Checa-se se o módulo de $f6 é maior que 1e-4 ($f4).
bc1f end_seno # Se não for, termina-se a execução da função seno.
add.s $f3, $f3, $f6 # Caso contrário, adiciona-se o termo à soma e...
j loop_seno # ... repete-se a iteração.
end_seno:mov.s $f0, $f3 # Ao se acabar a execução da função, retornar-se-á a soma obtida ($f3)
lw $s6, 4($sp)
lw $ra, 0($sp) # Recupera-se o valor de $ra
add $sp, $sp, 8
jr $ra # Volta-se para a função chamadora
# Função que calcula o cosseno de um dado ângulo
# - Entrada: $f12 : float (ângulo)
# - Saída: $f0: float (o valor do cosseno do ângulo)
cosseno: add $s6, $zero, -1 # k = s0 = -1
mtc1 $zero, $f10 # f10: valor de 0 em float
sub $sp, $sp, 8
sw $ra, 0($sp)
swc1 $f3, 4($sp)
# 0) Adequação do argumento de graus para radianos
lwc1 $f2, pi # Carrega-se o valor aproximado da constante "pi" para $f2
li $t2, 180 # Coloca-se o valor de 180 no registrador $t2
mtc1 $t2, $f11
cvt.s.w $f11, $f11
# O valor de $f12 será o do ângulo em radianos
div.s $f12, $f12, $f11 # valor em radianos = (valor em graus)/180
mul.s $f12, $f12, $f2 # valor em radianos = pi*(valor em graus)/180
# Usar-se-á $f3 para a aproximação de sen(x) por meio da série de Taylor
mtc1 $zero, $f3
lwc1 $f4, cte_1e_min_4 # Constante (1e-4) para a aproximação de sen(x)
jal loop_cosseno
loop_cosseno: sub $sp, $sp, 4
swc1 $f12, 0($sp) # Salva-se o valor do argumento ($f12)
add.s $f6, $f10, $f10# Resetamento do registrador $f6: f6 = 0
# 1) Incremento de k e calculo de (2k + 1)
add $s6, $s6, 1 # Incremento de k: k++
add $t1, $s6, $s6 # t1 = 2k
# 2) Cálculo de (x)^(2k)
# argumento $f12 do seno é o mesmo daquele para a potência. (f12_seno = f12_base_potencia)
move $a1, $t1 # argumento da função "potencia" a1: t1 = 2k
jal potencia # Cálculo de ($f12)^($a1) = (x)^(2k)
add.s $f6, $f6, $f0 # f6: (x)^(2k)
# 3) Cálculo de (-1)^(k) através da função "potencia"
li $t2, -1 # "Coloca-se", no registrador $f12, o valor -1.0
mtc1 $t2, $f12
cvt.s.w $f12, $f12
add $a1, $s6, $zero # Argumento $a1 = $s0 = k
jal potencia # Cálculo de (-1)^(k)
mul.s $f6, $f6, $f0 # $f6 = ((-1)^(k) * (x)^(2k+1))
# 4) Cálculo de (2k)! por meio da função "fatorial"
lwc1 $f12, 0($sp) # Recupera-se, da pilha, $f12, cujo valor é o argumento da função.
add $sp, $sp, 4
mtc1 $t1, $f13 # Passa-se $t1 = (2k) como argumento da função fatorial
cvt.s.w $f13, $f13
jal fatorial # Calcula-se (2k)!
mov.s $f9, $f0 # Move-se o resultado da função "fatorial" para o registrador $f9
div.s $f6, $f6, $f9 # ENFIM, calcula-se ((-1)^(k) * (x)^(2k))/(2k)!
# 5) Checa-se se o termo calculado ($f6) é maior que 1e-4 ($f4).
abs.s $f8, $f6 # Calcula-se o módulo do termo calculado
c.lt.s $f4, $f8 # Checa-se se o módulo de $f6 é maior que 1e-4 ($f4).
bc1f end_cosseno # Se não for, termina-se a execução da função cosseno.
add.s $f3, $f3, $f6 # Caso contrário, adiciona-se o termo à soma e...
j loop_cosseno # ... repete-se a iteração.
end_cosseno:mov.s $f0, $f3 # Ao se acabar a execução da função, retornar-se-á a soma obtida ($f3)
lwc1 $f3, 4($sp)
lw $ra, 0($sp) # Recupera-se o valor de $ra
add $sp, $sp, 8
jr $ra # Volta-se para a função chamadora
# Função que calcula $a0 fatorial: ($a0)!
# Entrada: $f13 (n): float
# saida: $f0: float
fatorial: sub $sp, $sp, 8 # Armazena-se o valor de $ra...
sw $ra, 4($sp)
swc1 $f13, 0($sp) # ...e do argumento $f13
li $t0, 1
mtc1 $t0, $f8 # f8 = 1
cvt.s.w $f8, $f8
c.lt.s $f13, $f8 # Teste se n < 1
# Caso n >= 1, faz-se a recursão
bc1f else
# Caso n == 0, retorna-se 1:
mov.s $f0, $f8 # retorno do valor 1
add $sp, $sp, 8 # Reseta-se a pilha (fim da recursão)
jr $ra # Retorna-se para a função chamadora
# Passo da recursão
else: li $t0, 1 # "Inicializa-se" o registrador $f8 com 1.0
mtc1 $t0, $f8
cvt.s.w $f8, $f8
sub.s $f13, $f13, $f8 # Caso n >= 1, Subtrai-se 1 de n
jal fatorial # Faz-se o fatorial de n-1 (recursão)
lwc1 $f13, 0($sp) # Feita a recursão para (n-1), a função chamada recupera os valores de $f13...
lw $ra, 4($sp) #...de $ra. E ...
add $sp, $sp, 8
mul.s $f0, $f0, $f13 # enfim, retorna o valor de n * (n-1)!
jr $ra # Volta-se para a função chamadora
# Função que calcula $a0 elevado a $a1
# - Entradas: $f12: float (base) e # a1: int (expoente)
# - Sáida: #f0: float
potencia: sub $sp, $sp, 4 # Reserva-se o valor de $ra
sw $ra, 0($sp)
jal aux_potencia # Faz-se a recursão da potenciação
lw $ra, 0($sp)
add $sp, $sp, 4
slti $t0, $a1, 0 # Checa-se se a potência é negativa
beq $t0, 1, inv_pot # Caso a potência seja negativa, inverte-se o valor obtido por aux_potencia
jr $ra # Caso contrário, retorna o valor de inv_pot
inv_pot: add $t1, $zero, 1
mtc1 $t1, $f10
div.s $f12, $f10, $f12 #
jr $ra
# aux_potencia: Calcula Função a qual calcula ($a0)^(abs($a1)), em que abs() é a função módulo
aux_potencia: sub $sp, $sp, 12 # Guarda-se os valores de $ra, $a1 e $f12
sw $ra, 8($sp)
swc1 $f12, 4($sp) # $f12: base
sw $a1, 0($sp) # $a1: expoente
abs $a1, $a1
# Caso o expoente ($a1) é >= 0, faz-se a recursão,
bgt $a1, 0, recur_pot
# Caso contrário, se o expoente ($a1) é 0, retorna-se 1.0
li $t0, 1 # Coloca-se o valor de 1 no registrador de retorno $f0
mtc1 $t0, $f0
cvt.s.w $f0, $f0
lw $a1, 0($sp) # Recuprera-se, no caso base, os valores de $a1, $f12 e de $ra
lwc1 $f12, 4($sp)
lw $ra, 8($sp)
add $sp, $sp, 12
jr $ra # Volta-se para a função chamadora
# Passo da recursão
recur_pot: sub $a1, $a1, 1 # Subtrai-se um do expoente ($a1)
jal aux_potencia # Faz-se a recursão por meio de: "potencia($f12, $a1 - 1)"
mul.s $f0, $f0, $f12 # Retorna-se a multiplicação do valor obtido pela recursão pela base (a0)
lw $a1, 0($sp) # Recupera-se, após o passo da recursão, os valoures de $a1, $ f12 e $ra
lwc1 $f12, 4($sp)
lw $ra, 8($sp)
add $sp, $sp, 12
jr $ra # Retorna-se para a função chamadora
| 36.414261 | 109 | 0.49296 |
a45f4ed00150f4adf25e9ab5453290f16022e2e0 | 638 | asm | Assembly | oeis/084/A084172.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/084/A084172.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/084/A084172.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A084172: a(n) = 3*a(n-1) - a(n-2) - 3*a(n-3) + 2*a(n-4).
; 1,2,4,9,19,40,82,167,337,678,1360,2725,5455,10916,21838,43683,87373,174754,349516,699041,1398091,2796192,5592394,11184799,22369609,44739230,89478472,178956957,357913927,715827868,1431655750,2863311515,5726623045,11453246106,22906492228,45812984473,91625968963,183251937944,366503875906,733007751831,1466015503681,2932031007382,5864062014784,11728124029589,23456248059199,46912496118420,93824992236862,187649984473747,375299968947517,750599937895058,1501199875790140,3002399751580305,6004799503160635
mov $2,$0
add $0,3
mov $1,2
pow $1,$0
div $1,3
sub $1,$2
div $1,2
mov $0,$1
| 53.166667 | 501 | 0.80094 |
3b3ccea50256496675d9e745286e82336149a000 | 298 | asm | Assembly | tests/issue88/1.asm | NullMember/customasm | 6e34d6432583a41278e6b3596f1817ae82149531 | [
"Apache-2.0"
] | 414 | 2016-10-14T22:39:20.000Z | 2022-03-30T07:52:44.000Z | tests/issue88/1.asm | NullMember/customasm | 6e34d6432583a41278e6b3596f1817ae82149531 | [
"Apache-2.0"
] | 100 | 2018-03-22T16:12:24.000Z | 2022-03-26T09:19:23.000Z | tests/issue88/1.asm | NullMember/customasm | 6e34d6432583a41278e6b3596f1817ae82149531 | [
"Apache-2.0"
] | 47 | 2017-06-29T15:12:13.000Z | 2022-03-10T04:50:51.000Z | #subruledef reg {
ax => 0x0
bx => 0x1
cx => 0x2
}
#subruledef memaccess {
{o: s8}(%{r: reg}) => 0x00 @ r @ o
}
#subruledef arg {
{m: memaccess} => 0x00 @ m
%{r: reg} => 0x01 @ r
}
#ruledef {
mov {a: arg}, {a2: arg} => 0x10 @ a @ a2
}
mov (%ax), %bx ; error: no match | 14.9 | 44 | 0.47651 |
76c0efb9015a4022b18f80bd084e95dfd81db1be | 925 | asm | Assembly | programs/oeis/022/A022364.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/022/A022364.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/022/A022364.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A022364: Fibonacci sequence beginning 0, 30.
; 0,30,30,60,90,150,240,390,630,1020,1650,2670,4320,6990,11310,18300,29610,47910,77520,125430,202950,328380,531330,859710,1391040,2250750,3641790,5892540,9534330,15426870,24961200,40388070,65349270,105737340,171086610,276823950,447910560,724734510,1172645070,1897379580,3070024650,4967404230,8037428880,13004833110,21042261990,34047095100,55089357090,89136452190,144225809280,233362261470,377588070750,610950332220,988538402970,1599488735190,2588027138160,4187515873350,6775543011510,10963058884860,17738601896370,28701660781230,46440262677600,75141923458830,121582186136430,196724109595260,318306295731690,515030405326950,833336701058640,1348367106385590,2181703807444230,3530070913829820,5711774721274050
mov $1,3
mov $2,$0
mov $0,0
mov $3,2
lpb $2,1
lpb $4,1
mov $1,$5
trn $4,$3
lpe
mov $4,1
mov $5,$0
add $0,$1
sub $2,1
lpe
mov $1,$0
div $1,3
mul $1,30
| 44.047619 | 706 | 0.812973 |
39b8ced46512e1ca2e8fedfdfe517963d2251116 | 579 | asm | Assembly | oeis/267/A267540.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/267/A267540.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/267/A267540.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A267540: Primes p such that p (mod 3) = p (mod 5).
; Submitted by Jamie Morken(w2)
; 2,17,31,47,61,107,137,151,167,181,197,211,227,241,257,271,317,331,347,421,467,541,557,571,587,601,617,631,647,661,677,691,751,797,811,827,857,887,947,977,991,1021,1051,1097,1171,1187,1201,1217,1231,1277,1291
mov $2,332202
mov $6,1
lpb $2
add $1,5
mov $3,$6
seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0.
sub $0,$3
mov $5,$1
add $1,10
mov $4,$0
max $4,0
cmp $4,$0
mul $2,$4
sub $2,18
mod $5,2
add $5,$1
mov $6,$5
lpe
mov $0,$6
add $0,1
| 23.16 | 209 | 0.633851 |
d5ab5822dfbd6a7038bccbaf41be3313cad1205c | 202 | asm | Assembly | gfx/pokemon/exeggcute/anim.asm | Dev727/ancientplatinum | 8b212a1728cc32a95743e1538b9eaa0827d013a7 | [
"blessing"
] | 28 | 2019-11-08T07:19:00.000Z | 2021-12-20T10:17:54.000Z | gfx/pokemon/exeggcute/anim.asm | Dev727/ancientplatinum | 8b212a1728cc32a95743e1538b9eaa0827d013a7 | [
"blessing"
] | 13 | 2020-01-11T17:00:40.000Z | 2021-09-14T01:27:38.000Z | gfx/pokemon/exeggcute/anim.asm | Dev727/ancientplatinum | 8b212a1728cc32a95743e1538b9eaa0827d013a7 | [
"blessing"
] | 22 | 2020-05-28T17:31:38.000Z | 2022-03-07T20:49:35.000Z | frame 0, 08
setrepeat 2
frame 1, 04
frame 2, 04
dorepeat 2
frame 0, 01
setrepeat 3
frame 1, 03
frame 2, 03
dorepeat 7
frame 0, 01
frame 1, 04
frame 2, 04
frame 0, 08
frame 3, 08
endanim
| 11.882353 | 12 | 0.658416 |
1c8f83f436031868532d78856c0923bbedf608e4 | 655 | asm | Assembly | Z80/lloader/poke.asm | BleuLlama/LlamaVampireDrive | 63f5990f239afaf7a88373041bece0873eb7b67b | [
"MIT"
] | 4 | 2020-12-01T03:34:41.000Z | 2021-07-22T23:26:40.000Z | Z80/lloader/poke.asm | BleuLlama/LlamaVampireDrive | 63f5990f239afaf7a88373041bece0873eb7b67b | [
"MIT"
] | null | null | null | Z80/lloader/poke.asm | BleuLlama/LlamaVampireDrive | 63f5990f239afaf7a88373041bece0873eb7b67b | [
"MIT"
] | null | null | null | ; Poke
; Poke memory values
;
; 2016-06-15 Scott Lawrence
;
; This code is free for any use. MIT License, etc.
.module Poke
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; PokeMemory
PokeMemory:
ld hl, #str_address
call Print
call GetWordFromUser ; de has the word
push de ; store it aside
cp #0xff
jr z, PM_nlret
call PrintNL
ld hl, #str_data
call Print
call GetByteFromUser ; b has the data
cp #0xff
jr z, PM_nlret
call PrintNL
; and store it...
pop hl
ld (hl), b
xor a
ret
; if there was a problem, just return
PM_nlret:
pop de ; fix the stack
call PrintNL
xor a
ret
| 14.555556 | 70 | 0.58626 |
36e44e49402d3597fddfad7e0fcdd8db6a34a492 | 452 | asm | Assembly | programs/oeis/269/A269221.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/269/A269221.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/269/A269221.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A269221: Factorial of the sum of decimal digits of n.
; 1,1,2,6,24,120,720,5040,40320,362880,1,2,6,24,120,720,5040,40320,362880,3628800,2,6,24,120,720,5040,40320,362880,3628800,39916800,6,24,120,720,5040,40320,362880,3628800,39916800,479001600,24,120,720,5040
lpb $0
mov $2,$0
div $0,10
mod $2,10
add $1,$2
lpe
seq $1,142 ; Factorial numbers: n! = 1*2*3*4*...*n (order of symmetric group S_n, number of permutations of n letters).
mov $0,$1
| 37.666667 | 205 | 0.705752 |
7c44a4ac1b825a719099f767d101d6927b4b5307 | 43,571 | asm | Assembly | cat.asm | reubenct/OSproject-xv6 | 5257baa562465aa1a7402bf422ea94211e0e6687 | [
"MIT-0"
] | 1 | 2017-05-16T11:41:39.000Z | 2017-05-16T11:41:39.000Z | cat.asm | reubenct/OSproject-xv6 | 5257baa562465aa1a7402bf422ea94211e0e6687 | [
"MIT-0"
] | null | null | null | cat.asm | reubenct/OSproject-xv6 | 5257baa562465aa1a7402bf422ea94211e0e6687 | [
"MIT-0"
] | null | null | null |
_cat: file format elf32-i386
Disassembly of section .text:
00000000 <main>:
}
}
int
main(int argc, char *argv[])
{
0: 55 push %ebp
1: 89 e5 mov %esp,%ebp
3: 57 push %edi
4: 56 push %esi
int fd, i;
if(argc <= 1){
5: be 01 00 00 00 mov $0x1,%esi
}
}
int
main(int argc, char *argv[])
{
a: 53 push %ebx
b: 83 e4 f0 and $0xfffffff0,%esp
e: 83 ec 10 sub $0x10,%esp
11: 8b 45 0c mov 0xc(%ebp),%eax
int fd, i;
if(argc <= 1){
14: 83 7d 08 01 cmpl $0x1,0x8(%ebp)
18: 8d 58 04 lea 0x4(%eax),%ebx
1b: 7e 5a jle 77 <main+0x77>
1d: 8d 76 00 lea 0x0(%esi),%esi
cat(0);
exit();
}
for(i = 1; i < argc; i++){
if((fd = open(argv[i], 0)) < 0){
20: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
27: 00
28: 8b 03 mov (%ebx),%eax
2a: 89 04 24 mov %eax,(%esp)
2d: e8 70 03 00 00 call 3a2 <open>
32: 85 c0 test %eax,%eax
34: 89 c7 mov %eax,%edi
36: 78 20 js 58 <main+0x58>
printf(1, "cat: cannot open %s\n", argv[i]);
exit();
}
cat(fd);
38: 89 04 24 mov %eax,(%esp)
if(argc <= 1){
cat(0);
exit();
}
for(i = 1; i < argc; i++){
3b: 83 c6 01 add $0x1,%esi
3e: 83 c3 04 add $0x4,%ebx
if((fd = open(argv[i], 0)) < 0){
printf(1, "cat: cannot open %s\n", argv[i]);
exit();
}
cat(fd);
41: e8 4a 00 00 00 call 90 <cat>
close(fd);
46: 89 3c 24 mov %edi,(%esp)
49: e8 3c 03 00 00 call 38a <close>
if(argc <= 1){
cat(0);
exit();
}
for(i = 1; i < argc; i++){
4e: 3b 75 08 cmp 0x8(%ebp),%esi
51: 75 cd jne 20 <main+0x20>
exit();
}
cat(fd);
close(fd);
}
exit();
53: e8 0a 03 00 00 call 362 <exit>
exit();
}
for(i = 1; i < argc; i++){
if((fd = open(argv[i], 0)) < 0){
printf(1, "cat: cannot open %s\n", argv[i]);
58: 8b 03 mov (%ebx),%eax
5a: c7 44 24 04 61 08 00 movl $0x861,0x4(%esp)
61: 00
62: c7 04 24 01 00 00 00 movl $0x1,(%esp)
69: 89 44 24 08 mov %eax,0x8(%esp)
6d: e8 5e 04 00 00 call 4d0 <printf>
exit();
72: e8 eb 02 00 00 call 362 <exit>
main(int argc, char *argv[])
{
int fd, i;
if(argc <= 1){
cat(0);
77: c7 04 24 00 00 00 00 movl $0x0,(%esp)
7e: e8 0d 00 00 00 call 90 <cat>
exit();
83: e8 da 02 00 00 call 362 <exit>
88: 66 90 xchg %ax,%ax
8a: 66 90 xchg %ax,%ax
8c: 66 90 xchg %ax,%ax
8e: 66 90 xchg %ax,%ax
00000090 <cat>:
char buf[512];
void
cat(int fd)
{
90: 55 push %ebp
91: 89 e5 mov %esp,%ebp
93: 56 push %esi
94: 53 push %ebx
95: 83 ec 10 sub $0x10,%esp
98: 8b 75 08 mov 0x8(%ebp),%esi
int n;
while((n = read(fd, buf, sizeof(buf))) > 0) {
9b: eb 1f jmp bc <cat+0x2c>
9d: 8d 76 00 lea 0x0(%esi),%esi
if (write(1, buf, n) != n) {
a0: 89 5c 24 08 mov %ebx,0x8(%esp)
a4: c7 44 24 04 60 0b 00 movl $0xb60,0x4(%esp)
ab: 00
ac: c7 04 24 01 00 00 00 movl $0x1,(%esp)
b3: e8 ca 02 00 00 call 382 <write>
b8: 39 d8 cmp %ebx,%eax
ba: 75 28 jne e4 <cat+0x54>
void
cat(int fd)
{
int n;
while((n = read(fd, buf, sizeof(buf))) > 0) {
bc: c7 44 24 08 00 02 00 movl $0x200,0x8(%esp)
c3: 00
c4: c7 44 24 04 60 0b 00 movl $0xb60,0x4(%esp)
cb: 00
cc: 89 34 24 mov %esi,(%esp)
cf: e8 a6 02 00 00 call 37a <read>
d4: 83 f8 00 cmp $0x0,%eax
d7: 89 c3 mov %eax,%ebx
d9: 7f c5 jg a0 <cat+0x10>
if (write(1, buf, n) != n) {
printf(1, "cat: write error\n");
exit();
}
}
if(n < 0){
db: 75 20 jne fd <cat+0x6d>
printf(1, "cat: read error\n");
exit();
}
}
dd: 83 c4 10 add $0x10,%esp
e0: 5b pop %ebx
e1: 5e pop %esi
e2: 5d pop %ebp
e3: c3 ret
{
int n;
while((n = read(fd, buf, sizeof(buf))) > 0) {
if (write(1, buf, n) != n) {
printf(1, "cat: write error\n");
e4: c7 44 24 04 3e 08 00 movl $0x83e,0x4(%esp)
eb: 00
ec: c7 04 24 01 00 00 00 movl $0x1,(%esp)
f3: e8 d8 03 00 00 call 4d0 <printf>
exit();
f8: e8 65 02 00 00 call 362 <exit>
}
}
if(n < 0){
printf(1, "cat: read error\n");
fd: c7 44 24 04 50 08 00 movl $0x850,0x4(%esp)
104: 00
105: c7 04 24 01 00 00 00 movl $0x1,(%esp)
10c: e8 bf 03 00 00 call 4d0 <printf>
exit();
111: e8 4c 02 00 00 call 362 <exit>
116: 66 90 xchg %ax,%ax
118: 66 90 xchg %ax,%ax
11a: 66 90 xchg %ax,%ax
11c: 66 90 xchg %ax,%ax
11e: 66 90 xchg %ax,%ax
00000120 <strcpy>:
120: 55 push %ebp
121: 89 e5 mov %esp,%ebp
123: 53 push %ebx
124: 8b 45 08 mov 0x8(%ebp),%eax
127: 8b 4d 0c mov 0xc(%ebp),%ecx
12a: 89 c2 mov %eax,%edx
12c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
130: 83 c1 01 add $0x1,%ecx
133: 0f b6 59 ff movzbl -0x1(%ecx),%ebx
137: 83 c2 01 add $0x1,%edx
13a: 84 db test %bl,%bl
13c: 88 5a ff mov %bl,-0x1(%edx)
13f: 75 ef jne 130 <strcpy+0x10>
141: 5b pop %ebx
142: 5d pop %ebp
143: c3 ret
144: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
14a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
00000150 <strcmp>:
150: 55 push %ebp
151: 89 e5 mov %esp,%ebp
153: 56 push %esi
154: 53 push %ebx
155: 8b 55 08 mov 0x8(%ebp),%edx
158: 8b 4d 0c mov 0xc(%ebp),%ecx
15b: 0f b6 02 movzbl (%edx),%eax
15e: 0f b6 19 movzbl (%ecx),%ebx
161: 84 c0 test %al,%al
163: 75 1e jne 183 <strcmp+0x33>
165: eb 29 jmp 190 <strcmp+0x40>
167: 89 f6 mov %esi,%esi
169: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
170: 83 c2 01 add $0x1,%edx
173: 0f b6 02 movzbl (%edx),%eax
176: 8d 71 01 lea 0x1(%ecx),%esi
179: 0f b6 59 01 movzbl 0x1(%ecx),%ebx
17d: 84 c0 test %al,%al
17f: 74 0f je 190 <strcmp+0x40>
181: 89 f1 mov %esi,%ecx
183: 38 d8 cmp %bl,%al
185: 74 e9 je 170 <strcmp+0x20>
187: 29 d8 sub %ebx,%eax
189: 5b pop %ebx
18a: 5e pop %esi
18b: 5d pop %ebp
18c: c3 ret
18d: 8d 76 00 lea 0x0(%esi),%esi
190: 31 c0 xor %eax,%eax
192: 29 d8 sub %ebx,%eax
194: 5b pop %ebx
195: 5e pop %esi
196: 5d pop %ebp
197: c3 ret
198: 90 nop
199: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
000001a0 <strlen>:
1a0: 55 push %ebp
1a1: 89 e5 mov %esp,%ebp
1a3: 8b 4d 08 mov 0x8(%ebp),%ecx
1a6: 80 39 00 cmpb $0x0,(%ecx)
1a9: 74 12 je 1bd <strlen+0x1d>
1ab: 31 d2 xor %edx,%edx
1ad: 8d 76 00 lea 0x0(%esi),%esi
1b0: 83 c2 01 add $0x1,%edx
1b3: 80 3c 11 00 cmpb $0x0,(%ecx,%edx,1)
1b7: 89 d0 mov %edx,%eax
1b9: 75 f5 jne 1b0 <strlen+0x10>
1bb: 5d pop %ebp
1bc: c3 ret
1bd: 31 c0 xor %eax,%eax
1bf: 5d pop %ebp
1c0: c3 ret
1c1: eb 0d jmp 1d0 <memset>
1c3: 90 nop
1c4: 90 nop
1c5: 90 nop
1c6: 90 nop
1c7: 90 nop
1c8: 90 nop
1c9: 90 nop
1ca: 90 nop
1cb: 90 nop
1cc: 90 nop
1cd: 90 nop
1ce: 90 nop
1cf: 90 nop
000001d0 <memset>:
1d0: 55 push %ebp
1d1: 89 e5 mov %esp,%ebp
1d3: 57 push %edi
1d4: 8b 55 08 mov 0x8(%ebp),%edx
1d7: 8b 4d 10 mov 0x10(%ebp),%ecx
1da: 8b 45 0c mov 0xc(%ebp),%eax
1dd: 89 d7 mov %edx,%edi
1df: fc cld
1e0: f3 aa rep stos %al,%es:(%edi)
1e2: 89 d0 mov %edx,%eax
1e4: 5f pop %edi
1e5: 5d pop %ebp
1e6: c3 ret
1e7: 89 f6 mov %esi,%esi
1e9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
000001f0 <strchr>:
1f0: 55 push %ebp
1f1: 89 e5 mov %esp,%ebp
1f3: 53 push %ebx
1f4: 8b 45 08 mov 0x8(%ebp),%eax
1f7: 8b 5d 0c mov 0xc(%ebp),%ebx
1fa: 0f b6 10 movzbl (%eax),%edx
1fd: 84 d2 test %dl,%dl
1ff: 74 1d je 21e <strchr+0x2e>
201: 38 d3 cmp %dl,%bl
203: 89 d9 mov %ebx,%ecx
205: 75 0d jne 214 <strchr+0x24>
207: eb 17 jmp 220 <strchr+0x30>
209: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
210: 38 ca cmp %cl,%dl
212: 74 0c je 220 <strchr+0x30>
214: 83 c0 01 add $0x1,%eax
217: 0f b6 10 movzbl (%eax),%edx
21a: 84 d2 test %dl,%dl
21c: 75 f2 jne 210 <strchr+0x20>
21e: 31 c0 xor %eax,%eax
220: 5b pop %ebx
221: 5d pop %ebp
222: c3 ret
223: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
229: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00000230 <gets>:
230: 55 push %ebp
231: 89 e5 mov %esp,%ebp
233: 57 push %edi
234: 56 push %esi
235: 53 push %ebx
236: 31 f6 xor %esi,%esi
238: 8d 7d e7 lea -0x19(%ebp),%edi
23b: 83 ec 1c sub $0x1c,%esp
23e: eb 29 jmp 269 <gets+0x39>
240: 83 ec 04 sub $0x4,%esp
243: 6a 01 push $0x1
245: 57 push %edi
246: 6a 00 push $0x0
248: e8 2d 01 00 00 call 37a <read>
24d: 83 c4 10 add $0x10,%esp
250: 85 c0 test %eax,%eax
252: 7e 1d jle 271 <gets+0x41>
254: 0f b6 45 e7 movzbl -0x19(%ebp),%eax
258: 8b 55 08 mov 0x8(%ebp),%edx
25b: 89 de mov %ebx,%esi
25d: 3c 0a cmp $0xa,%al
25f: 88 44 1a ff mov %al,-0x1(%edx,%ebx,1)
263: 74 1b je 280 <gets+0x50>
265: 3c 0d cmp $0xd,%al
267: 74 17 je 280 <gets+0x50>
269: 8d 5e 01 lea 0x1(%esi),%ebx
26c: 3b 5d 0c cmp 0xc(%ebp),%ebx
26f: 7c cf jl 240 <gets+0x10>
271: 8b 45 08 mov 0x8(%ebp),%eax
274: c6 04 30 00 movb $0x0,(%eax,%esi,1)
278: 8d 65 f4 lea -0xc(%ebp),%esp
27b: 5b pop %ebx
27c: 5e pop %esi
27d: 5f pop %edi
27e: 5d pop %ebp
27f: c3 ret
280: 8b 45 08 mov 0x8(%ebp),%eax
283: 89 de mov %ebx,%esi
285: c6 04 30 00 movb $0x0,(%eax,%esi,1)
289: 8d 65 f4 lea -0xc(%ebp),%esp
28c: 5b pop %ebx
28d: 5e pop %esi
28e: 5f pop %edi
28f: 5d pop %ebp
290: c3 ret
291: eb 0d jmp 2a0 <stat>
293: 90 nop
294: 90 nop
295: 90 nop
296: 90 nop
297: 90 nop
298: 90 nop
299: 90 nop
29a: 90 nop
29b: 90 nop
29c: 90 nop
29d: 90 nop
29e: 90 nop
29f: 90 nop
000002a0 <stat>:
2a0: 55 push %ebp
2a1: 89 e5 mov %esp,%ebp
2a3: 56 push %esi
2a4: 53 push %ebx
2a5: 83 ec 08 sub $0x8,%esp
2a8: 6a 00 push $0x0
2aa: ff 75 08 pushl 0x8(%ebp)
2ad: e8 f0 00 00 00 call 3a2 <open>
2b2: 83 c4 10 add $0x10,%esp
2b5: 85 c0 test %eax,%eax
2b7: 78 27 js 2e0 <stat+0x40>
2b9: 83 ec 08 sub $0x8,%esp
2bc: ff 75 0c pushl 0xc(%ebp)
2bf: 89 c3 mov %eax,%ebx
2c1: 50 push %eax
2c2: e8 f3 00 00 00 call 3ba <fstat>
2c7: 89 c6 mov %eax,%esi
2c9: 89 1c 24 mov %ebx,(%esp)
2cc: e8 b9 00 00 00 call 38a <close>
2d1: 83 c4 10 add $0x10,%esp
2d4: 89 f0 mov %esi,%eax
2d6: 8d 65 f8 lea -0x8(%ebp),%esp
2d9: 5b pop %ebx
2da: 5e pop %esi
2db: 5d pop %ebp
2dc: c3 ret
2dd: 8d 76 00 lea 0x0(%esi),%esi
2e0: b8 ff ff ff ff mov $0xffffffff,%eax
2e5: eb ef jmp 2d6 <stat+0x36>
2e7: 89 f6 mov %esi,%esi
2e9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
000002f0 <atoi>:
2f0: 55 push %ebp
2f1: 89 e5 mov %esp,%ebp
2f3: 53 push %ebx
2f4: 8b 4d 08 mov 0x8(%ebp),%ecx
2f7: 0f be 11 movsbl (%ecx),%edx
2fa: 8d 42 d0 lea -0x30(%edx),%eax
2fd: 3c 09 cmp $0x9,%al
2ff: b8 00 00 00 00 mov $0x0,%eax
304: 77 1f ja 325 <atoi+0x35>
306: 8d 76 00 lea 0x0(%esi),%esi
309: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
310: 8d 04 80 lea (%eax,%eax,4),%eax
313: 83 c1 01 add $0x1,%ecx
316: 8d 44 42 d0 lea -0x30(%edx,%eax,2),%eax
31a: 0f be 11 movsbl (%ecx),%edx
31d: 8d 5a d0 lea -0x30(%edx),%ebx
320: 80 fb 09 cmp $0x9,%bl
323: 76 eb jbe 310 <atoi+0x20>
325: 5b pop %ebx
326: 5d pop %ebp
327: c3 ret
328: 90 nop
329: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
00000330 <memmove>:
330: 55 push %ebp
331: 89 e5 mov %esp,%ebp
333: 56 push %esi
334: 53 push %ebx
335: 8b 5d 10 mov 0x10(%ebp),%ebx
338: 8b 45 08 mov 0x8(%ebp),%eax
33b: 8b 75 0c mov 0xc(%ebp),%esi
33e: 85 db test %ebx,%ebx
340: 7e 14 jle 356 <memmove+0x26>
342: 31 d2 xor %edx,%edx
344: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
348: 0f b6 0c 16 movzbl (%esi,%edx,1),%ecx
34c: 88 0c 10 mov %cl,(%eax,%edx,1)
34f: 83 c2 01 add $0x1,%edx
352: 39 da cmp %ebx,%edx
354: 75 f2 jne 348 <memmove+0x18>
356: 5b pop %ebx
357: 5e pop %esi
358: 5d pop %ebp
359: c3 ret
0000035a <fork>:
35a: b8 01 00 00 00 mov $0x1,%eax
35f: cd 40 int $0x40
361: c3 ret
00000362 <exit>:
362: b8 02 00 00 00 mov $0x2,%eax
367: cd 40 int $0x40
369: c3 ret
0000036a <wait>:
36a: b8 03 00 00 00 mov $0x3,%eax
36f: cd 40 int $0x40
371: c3 ret
00000372 <pipe>:
372: b8 04 00 00 00 mov $0x4,%eax
377: cd 40 int $0x40
379: c3 ret
0000037a <read>:
37a: b8 05 00 00 00 mov $0x5,%eax
37f: cd 40 int $0x40
381: c3 ret
00000382 <write>:
382: b8 10 00 00 00 mov $0x10,%eax
387: cd 40 int $0x40
389: c3 ret
0000038a <close>:
38a: b8 15 00 00 00 mov $0x15,%eax
38f: cd 40 int $0x40
391: c3 ret
00000392 <kill>:
392: b8 06 00 00 00 mov $0x6,%eax
397: cd 40 int $0x40
399: c3 ret
0000039a <exec>:
39a: b8 07 00 00 00 mov $0x7,%eax
39f: cd 40 int $0x40
3a1: c3 ret
000003a2 <open>:
3a2: b8 0f 00 00 00 mov $0xf,%eax
3a7: cd 40 int $0x40
3a9: c3 ret
000003aa <mknod>:
3aa: b8 11 00 00 00 mov $0x11,%eax
3af: cd 40 int $0x40
3b1: c3 ret
000003b2 <unlink>:
3b2: b8 12 00 00 00 mov $0x12,%eax
3b7: cd 40 int $0x40
3b9: c3 ret
000003ba <fstat>:
3ba: b8 08 00 00 00 mov $0x8,%eax
3bf: cd 40 int $0x40
3c1: c3 ret
000003c2 <link>:
3c2: b8 13 00 00 00 mov $0x13,%eax
3c7: cd 40 int $0x40
3c9: c3 ret
000003ca <mkdir>:
3ca: b8 14 00 00 00 mov $0x14,%eax
3cf: cd 40 int $0x40
3d1: c3 ret
000003d2 <chdir>:
3d2: b8 09 00 00 00 mov $0x9,%eax
3d7: cd 40 int $0x40
3d9: c3 ret
000003da <dup>:
3da: b8 0a 00 00 00 mov $0xa,%eax
3df: cd 40 int $0x40
3e1: c3 ret
000003e2 <getpid>:
3e2: b8 0b 00 00 00 mov $0xb,%eax
3e7: cd 40 int $0x40
3e9: c3 ret
000003ea <sbrk>:
3ea: b8 0c 00 00 00 mov $0xc,%eax
3ef: cd 40 int $0x40
3f1: c3 ret
000003f2 <sleep>:
3f2: b8 0d 00 00 00 mov $0xd,%eax
3f7: cd 40 int $0x40
3f9: c3 ret
000003fa <uptime>:
3fa: b8 0e 00 00 00 mov $0xe,%eax
3ff: cd 40 int $0x40
401: c3 ret
00000402 <random>:
402: b8 16 00 00 00 mov $0x16,%eax
407: cd 40 int $0x40
409: c3 ret
0000040a <cprocstate>:
40a: b8 18 00 00 00 mov $0x18,%eax
40f: cd 40 int $0x40
411: c3 ret
00000412 <signalinfo>:
412: b8 19 00 00 00 mov $0x19,%eax
417: cd 40 int $0x40
419: c3 ret
0000041a <setseed>:
41a: b8 17 00 00 00 mov $0x17,%eax
41f: cd 40 int $0x40
421: c3 ret
422: 66 90 xchg %ax,%ax
424: 66 90 xchg %ax,%ax
426: 66 90 xchg %ax,%ax
428: 66 90 xchg %ax,%ax
42a: 66 90 xchg %ax,%ax
42c: 66 90 xchg %ax,%ax
42e: 66 90 xchg %ax,%ax
00000430 <printint>:
write(fd, &c, 1);
}
static void
printint(int fd, int xx, int base, int sgn)
{
430: 55 push %ebp
431: 89 e5 mov %esp,%ebp
433: 57 push %edi
434: 56 push %esi
435: 89 c6 mov %eax,%esi
437: 53 push %ebx
438: 83 ec 4c sub $0x4c,%esp
char buf[16];
int i, neg;
uint x;
neg = 0;
if(sgn && xx < 0){
43b: 8b 5d 08 mov 0x8(%ebp),%ebx
43e: 85 db test %ebx,%ebx
440: 74 09 je 44b <printint+0x1b>
442: 89 d0 mov %edx,%eax
444: c1 e8 1f shr $0x1f,%eax
447: 84 c0 test %al,%al
449: 75 75 jne 4c0 <printint+0x90>
neg = 1;
x = -xx;
} else {
x = xx;
44b: 89 d0 mov %edx,%eax
static char digits[] = "0123456789ABCDEF";
char buf[16];
int i, neg;
uint x;
neg = 0;
44d: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp)
454: 89 75 c0 mov %esi,-0x40(%ebp)
x = -xx;
} else {
x = xx;
}
i = 0;
457: 31 ff xor %edi,%edi
459: 89 ce mov %ecx,%esi
45b: 8d 5d d7 lea -0x29(%ebp),%ebx
45e: eb 02 jmp 462 <printint+0x32>
do{
buf[i++] = digits[x % base];
460: 89 cf mov %ecx,%edi
462: 31 d2 xor %edx,%edx
464: f7 f6 div %esi
466: 8d 4f 01 lea 0x1(%edi),%ecx
469: 0f b6 92 7d 08 00 00 movzbl 0x87d(%edx),%edx
}while((x /= base) != 0);
470: 85 c0 test %eax,%eax
x = xx;
}
i = 0;
do{
buf[i++] = digits[x % base];
472: 88 14 0b mov %dl,(%ebx,%ecx,1)
}while((x /= base) != 0);
475: 75 e9 jne 460 <printint+0x30>
if(neg)
477: 8b 55 c4 mov -0x3c(%ebp),%edx
x = xx;
}
i = 0;
do{
buf[i++] = digits[x % base];
47a: 89 c8 mov %ecx,%eax
47c: 8b 75 c0 mov -0x40(%ebp),%esi
}while((x /= base) != 0);
if(neg)
47f: 85 d2 test %edx,%edx
481: 74 08 je 48b <printint+0x5b>
buf[i++] = '-';
483: 8d 4f 02 lea 0x2(%edi),%ecx
486: c6 44 05 d8 2d movb $0x2d,-0x28(%ebp,%eax,1)
while(--i >= 0)
48b: 8d 79 ff lea -0x1(%ecx),%edi
48e: 66 90 xchg %ax,%ax
490: 0f b6 44 3d d8 movzbl -0x28(%ebp,%edi,1),%eax
495: 83 ef 01 sub $0x1,%edi
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
498: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
49f: 00
4a0: 89 5c 24 04 mov %ebx,0x4(%esp)
4a4: 89 34 24 mov %esi,(%esp)
4a7: 88 45 d7 mov %al,-0x29(%ebp)
4aa: e8 d3 fe ff ff call 382 <write>
buf[i++] = digits[x % base];
}while((x /= base) != 0);
if(neg)
buf[i++] = '-';
while(--i >= 0)
4af: 83 ff ff cmp $0xffffffff,%edi
4b2: 75 dc jne 490 <printint+0x60>
putc(fd, buf[i]);
}
4b4: 83 c4 4c add $0x4c,%esp
4b7: 5b pop %ebx
4b8: 5e pop %esi
4b9: 5f pop %edi
4ba: 5d pop %ebp
4bb: c3 ret
4bc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
uint x;
neg = 0;
if(sgn && xx < 0){
neg = 1;
x = -xx;
4c0: 89 d0 mov %edx,%eax
4c2: f7 d8 neg %eax
int i, neg;
uint x;
neg = 0;
if(sgn && xx < 0){
neg = 1;
4c4: c7 45 c4 01 00 00 00 movl $0x1,-0x3c(%ebp)
4cb: eb 87 jmp 454 <printint+0x24>
4cd: 8d 76 00 lea 0x0(%esi),%esi
000004d0 <printf>:
}
// Print to the given fd. Only understands %d, %x, %p, %s.
void
printf(int fd, char *fmt, ...)
{
4d0: 55 push %ebp
4d1: 89 e5 mov %esp,%ebp
4d3: 57 push %edi
char *s;
int c, i, state;
uint *ap;
state = 0;
4d4: 31 ff xor %edi,%edi
}
// Print to the given fd. Only understands %d, %x, %p, %s.
void
printf(int fd, char *fmt, ...)
{
4d6: 56 push %esi
4d7: 53 push %ebx
4d8: 83 ec 3c sub $0x3c,%esp
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
4db: 8b 5d 0c mov 0xc(%ebp),%ebx
char *s;
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
4de: 8d 45 10 lea 0x10(%ebp),%eax
}
// Print to the given fd. Only understands %d, %x, %p, %s.
void
printf(int fd, char *fmt, ...)
{
4e1: 8b 75 08 mov 0x8(%ebp),%esi
char *s;
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
4e4: 89 45 d4 mov %eax,-0x2c(%ebp)
for(i = 0; fmt[i]; i++){
4e7: 0f b6 13 movzbl (%ebx),%edx
4ea: 83 c3 01 add $0x1,%ebx
4ed: 84 d2 test %dl,%dl
4ef: 75 39 jne 52a <printf+0x5a>
4f1: e9 c2 00 00 00 jmp 5b8 <printf+0xe8>
4f6: 66 90 xchg %ax,%ax
c = fmt[i] & 0xff;
if(state == 0){
if(c == '%'){
4f8: 83 fa 25 cmp $0x25,%edx
4fb: 0f 84 bf 00 00 00 je 5c0 <printf+0xf0>
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
501: 8d 45 e2 lea -0x1e(%ebp),%eax
504: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
50b: 00
50c: 89 44 24 04 mov %eax,0x4(%esp)
510: 89 34 24 mov %esi,(%esp)
c = fmt[i] & 0xff;
if(state == 0){
if(c == '%'){
state = '%';
} else {
putc(fd, c);
513: 88 55 e2 mov %dl,-0x1e(%ebp)
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
516: e8 67 fe ff ff call 382 <write>
51b: 83 c3 01 add $0x1,%ebx
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
51e: 0f b6 53 ff movzbl -0x1(%ebx),%edx
522: 84 d2 test %dl,%dl
524: 0f 84 8e 00 00 00 je 5b8 <printf+0xe8>
c = fmt[i] & 0xff;
if(state == 0){
52a: 85 ff test %edi,%edi
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
c = fmt[i] & 0xff;
52c: 0f be c2 movsbl %dl,%eax
if(state == 0){
52f: 74 c7 je 4f8 <printf+0x28>
if(c == '%'){
state = '%';
} else {
putc(fd, c);
}
} else if(state == '%'){
531: 83 ff 25 cmp $0x25,%edi
534: 75 e5 jne 51b <printf+0x4b>
if(c == 'd'){
536: 83 fa 64 cmp $0x64,%edx
539: 0f 84 31 01 00 00 je 670 <printf+0x1a0>
printint(fd, *ap, 10, 1);
ap++;
} else if(c == 'x' || c == 'p'){
53f: 25 f7 00 00 00 and $0xf7,%eax
544: 83 f8 70 cmp $0x70,%eax
547: 0f 84 83 00 00 00 je 5d0 <printf+0x100>
printint(fd, *ap, 16, 0);
ap++;
} else if(c == 's'){
54d: 83 fa 73 cmp $0x73,%edx
550: 0f 84 a2 00 00 00 je 5f8 <printf+0x128>
s = "(null)";
while(*s != 0){
putc(fd, *s);
s++;
}
} else if(c == 'c'){
556: 83 fa 63 cmp $0x63,%edx
559: 0f 84 35 01 00 00 je 694 <printf+0x1c4>
putc(fd, *ap);
ap++;
} else if(c == '%'){
55f: 83 fa 25 cmp $0x25,%edx
562: 0f 84 e0 00 00 00 je 648 <printf+0x178>
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
568: 8d 45 e6 lea -0x1a(%ebp),%eax
56b: 83 c3 01 add $0x1,%ebx
56e: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
575: 00
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
putc(fd, c);
}
state = 0;
576: 31 ff xor %edi,%edi
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
578: 89 44 24 04 mov %eax,0x4(%esp)
57c: 89 34 24 mov %esi,(%esp)
57f: 89 55 d0 mov %edx,-0x30(%ebp)
582: c6 45 e6 25 movb $0x25,-0x1a(%ebp)
586: e8 f7 fd ff ff call 382 <write>
} else if(c == '%'){
putc(fd, c);
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
putc(fd, c);
58b: 8b 55 d0 mov -0x30(%ebp),%edx
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
58e: 8d 45 e7 lea -0x19(%ebp),%eax
591: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
598: 00
599: 89 44 24 04 mov %eax,0x4(%esp)
59d: 89 34 24 mov %esi,(%esp)
} else if(c == '%'){
putc(fd, c);
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
putc(fd, c);
5a0: 88 55 e7 mov %dl,-0x19(%ebp)
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
5a3: e8 da fd ff ff call 382 <write>
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
5a8: 0f b6 53 ff movzbl -0x1(%ebx),%edx
5ac: 84 d2 test %dl,%dl
5ae: 0f 85 76 ff ff ff jne 52a <printf+0x5a>
5b4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
putc(fd, c);
}
state = 0;
}
}
}
5b8: 83 c4 3c add $0x3c,%esp
5bb: 5b pop %ebx
5bc: 5e pop %esi
5bd: 5f pop %edi
5be: 5d pop %ebp
5bf: c3 ret
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
c = fmt[i] & 0xff;
if(state == 0){
if(c == '%'){
state = '%';
5c0: bf 25 00 00 00 mov $0x25,%edi
5c5: e9 51 ff ff ff jmp 51b <printf+0x4b>
5ca: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
} else if(state == '%'){
if(c == 'd'){
printint(fd, *ap, 10, 1);
ap++;
} else if(c == 'x' || c == 'p'){
printint(fd, *ap, 16, 0);
5d0: 8b 45 d4 mov -0x2c(%ebp),%eax
5d3: b9 10 00 00 00 mov $0x10,%ecx
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
putc(fd, c);
}
state = 0;
5d8: 31 ff xor %edi,%edi
} else if(state == '%'){
if(c == 'd'){
printint(fd, *ap, 10, 1);
ap++;
} else if(c == 'x' || c == 'p'){
printint(fd, *ap, 16, 0);
5da: c7 04 24 00 00 00 00 movl $0x0,(%esp)
5e1: 8b 10 mov (%eax),%edx
5e3: 89 f0 mov %esi,%eax
5e5: e8 46 fe ff ff call 430 <printint>
ap++;
5ea: 83 45 d4 04 addl $0x4,-0x2c(%ebp)
5ee: e9 28 ff ff ff jmp 51b <printf+0x4b>
5f3: 90 nop
5f4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
} else if(c == 's'){
s = (char*)*ap;
5f8: 8b 45 d4 mov -0x2c(%ebp),%eax
ap++;
5fb: 83 45 d4 04 addl $0x4,-0x2c(%ebp)
ap++;
} else if(c == 'x' || c == 'p'){
printint(fd, *ap, 16, 0);
ap++;
} else if(c == 's'){
s = (char*)*ap;
5ff: 8b 38 mov (%eax),%edi
ap++;
if(s == 0)
s = "(null)";
601: b8 76 08 00 00 mov $0x876,%eax
606: 85 ff test %edi,%edi
608: 0f 44 f8 cmove %eax,%edi
while(*s != 0){
60b: 0f b6 07 movzbl (%edi),%eax
60e: 84 c0 test %al,%al
610: 74 2a je 63c <printf+0x16c>
612: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
618: 88 45 e3 mov %al,-0x1d(%ebp)
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
61b: 8d 45 e3 lea -0x1d(%ebp),%eax
ap++;
if(s == 0)
s = "(null)";
while(*s != 0){
putc(fd, *s);
s++;
61e: 83 c7 01 add $0x1,%edi
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
621: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
628: 00
629: 89 44 24 04 mov %eax,0x4(%esp)
62d: 89 34 24 mov %esi,(%esp)
630: e8 4d fd ff ff call 382 <write>
} else if(c == 's'){
s = (char*)*ap;
ap++;
if(s == 0)
s = "(null)";
while(*s != 0){
635: 0f b6 07 movzbl (%edi),%eax
638: 84 c0 test %al,%al
63a: 75 dc jne 618 <printf+0x148>
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
putc(fd, c);
}
state = 0;
63c: 31 ff xor %edi,%edi
63e: e9 d8 fe ff ff jmp 51b <printf+0x4b>
643: 90 nop
644: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
648: 8d 45 e5 lea -0x1b(%ebp),%eax
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
putc(fd, c);
}
state = 0;
64b: 31 ff xor %edi,%edi
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
64d: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
654: 00
655: 89 44 24 04 mov %eax,0x4(%esp)
659: 89 34 24 mov %esi,(%esp)
65c: c6 45 e5 25 movb $0x25,-0x1b(%ebp)
660: e8 1d fd ff ff call 382 <write>
665: e9 b1 fe ff ff jmp 51b <printf+0x4b>
66a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
} else {
putc(fd, c);
}
} else if(state == '%'){
if(c == 'd'){
printint(fd, *ap, 10, 1);
670: 8b 45 d4 mov -0x2c(%ebp),%eax
673: b9 0a 00 00 00 mov $0xa,%ecx
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
putc(fd, c);
}
state = 0;
678: 66 31 ff xor %di,%di
} else {
putc(fd, c);
}
} else if(state == '%'){
if(c == 'd'){
printint(fd, *ap, 10, 1);
67b: c7 04 24 01 00 00 00 movl $0x1,(%esp)
682: 8b 10 mov (%eax),%edx
684: 89 f0 mov %esi,%eax
686: e8 a5 fd ff ff call 430 <printint>
ap++;
68b: 83 45 d4 04 addl $0x4,-0x2c(%ebp)
68f: e9 87 fe ff ff jmp 51b <printf+0x4b>
while(*s != 0){
putc(fd, *s);
s++;
}
} else if(c == 'c'){
putc(fd, *ap);
694: 8b 45 d4 mov -0x2c(%ebp),%eax
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
putc(fd, c);
}
state = 0;
697: 31 ff xor %edi,%edi
while(*s != 0){
putc(fd, *s);
s++;
}
} else if(c == 'c'){
putc(fd, *ap);
699: 8b 00 mov (%eax),%eax
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
69b: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
6a2: 00
6a3: 89 34 24 mov %esi,(%esp)
while(*s != 0){
putc(fd, *s);
s++;
}
} else if(c == 'c'){
putc(fd, *ap);
6a6: 88 45 e4 mov %al,-0x1c(%ebp)
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
6a9: 8d 45 e4 lea -0x1c(%ebp),%eax
6ac: 89 44 24 04 mov %eax,0x4(%esp)
6b0: e8 cd fc ff ff call 382 <write>
putc(fd, *s);
s++;
}
} else if(c == 'c'){
putc(fd, *ap);
ap++;
6b5: 83 45 d4 04 addl $0x4,-0x2c(%ebp)
6b9: e9 5d fe ff ff jmp 51b <printf+0x4b>
6be: 66 90 xchg %ax,%ax
000006c0 <free>:
6c0: 55 push %ebp
6c1: a1 40 0b 00 00 mov 0xb40,%eax
6c6: 89 e5 mov %esp,%ebp
6c8: 57 push %edi
6c9: 56 push %esi
6ca: 53 push %ebx
6cb: 8b 5d 08 mov 0x8(%ebp),%ebx
6ce: 8b 10 mov (%eax),%edx
6d0: 8d 4b f8 lea -0x8(%ebx),%ecx
6d3: 39 c8 cmp %ecx,%eax
6d5: 73 19 jae 6f0 <free+0x30>
6d7: 89 f6 mov %esi,%esi
6d9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
6e0: 39 d1 cmp %edx,%ecx
6e2: 72 1c jb 700 <free+0x40>
6e4: 39 d0 cmp %edx,%eax
6e6: 73 18 jae 700 <free+0x40>
6e8: 89 d0 mov %edx,%eax
6ea: 39 c8 cmp %ecx,%eax
6ec: 8b 10 mov (%eax),%edx
6ee: 72 f0 jb 6e0 <free+0x20>
6f0: 39 d0 cmp %edx,%eax
6f2: 72 f4 jb 6e8 <free+0x28>
6f4: 39 d1 cmp %edx,%ecx
6f6: 73 f0 jae 6e8 <free+0x28>
6f8: 90 nop
6f9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
700: 8b 73 fc mov -0x4(%ebx),%esi
703: 8d 3c f1 lea (%ecx,%esi,8),%edi
706: 39 d7 cmp %edx,%edi
708: 74 19 je 723 <free+0x63>
70a: 89 53 f8 mov %edx,-0x8(%ebx)
70d: 8b 50 04 mov 0x4(%eax),%edx
710: 8d 34 d0 lea (%eax,%edx,8),%esi
713: 39 f1 cmp %esi,%ecx
715: 74 23 je 73a <free+0x7a>
717: 89 08 mov %ecx,(%eax)
719: a3 40 0b 00 00 mov %eax,0xb40
71e: 5b pop %ebx
71f: 5e pop %esi
720: 5f pop %edi
721: 5d pop %ebp
722: c3 ret
723: 03 72 04 add 0x4(%edx),%esi
726: 89 73 fc mov %esi,-0x4(%ebx)
729: 8b 10 mov (%eax),%edx
72b: 8b 12 mov (%edx),%edx
72d: 89 53 f8 mov %edx,-0x8(%ebx)
730: 8b 50 04 mov 0x4(%eax),%edx
733: 8d 34 d0 lea (%eax,%edx,8),%esi
736: 39 f1 cmp %esi,%ecx
738: 75 dd jne 717 <free+0x57>
73a: 03 53 fc add -0x4(%ebx),%edx
73d: a3 40 0b 00 00 mov %eax,0xb40
742: 89 50 04 mov %edx,0x4(%eax)
745: 8b 53 f8 mov -0x8(%ebx),%edx
748: 89 10 mov %edx,(%eax)
74a: 5b pop %ebx
74b: 5e pop %esi
74c: 5f pop %edi
74d: 5d pop %ebp
74e: c3 ret
74f: 90 nop
00000750 <malloc>:
750: 55 push %ebp
751: 89 e5 mov %esp,%ebp
753: 57 push %edi
754: 56 push %esi
755: 53 push %ebx
756: 83 ec 0c sub $0xc,%esp
759: 8b 45 08 mov 0x8(%ebp),%eax
75c: 8b 15 40 0b 00 00 mov 0xb40,%edx
762: 8d 78 07 lea 0x7(%eax),%edi
765: c1 ef 03 shr $0x3,%edi
768: 83 c7 01 add $0x1,%edi
76b: 85 d2 test %edx,%edx
76d: 0f 84 a3 00 00 00 je 816 <malloc+0xc6>
773: 8b 02 mov (%edx),%eax
775: 8b 48 04 mov 0x4(%eax),%ecx
778: 39 cf cmp %ecx,%edi
77a: 76 74 jbe 7f0 <malloc+0xa0>
77c: 81 ff 00 10 00 00 cmp $0x1000,%edi
782: be 00 10 00 00 mov $0x1000,%esi
787: 8d 1c fd 00 00 00 00 lea 0x0(,%edi,8),%ebx
78e: 0f 43 f7 cmovae %edi,%esi
791: ba 00 80 00 00 mov $0x8000,%edx
796: 81 ff ff 0f 00 00 cmp $0xfff,%edi
79c: 0f 46 da cmovbe %edx,%ebx
79f: eb 10 jmp 7b1 <malloc+0x61>
7a1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
7a8: 8b 02 mov (%edx),%eax
7aa: 8b 48 04 mov 0x4(%eax),%ecx
7ad: 39 cf cmp %ecx,%edi
7af: 76 3f jbe 7f0 <malloc+0xa0>
7b1: 39 05 40 0b 00 00 cmp %eax,0xb40
7b7: 89 c2 mov %eax,%edx
7b9: 75 ed jne 7a8 <malloc+0x58>
7bb: 83 ec 0c sub $0xc,%esp
7be: 53 push %ebx
7bf: e8 26 fc ff ff call 3ea <sbrk>
7c4: 83 c4 10 add $0x10,%esp
7c7: 83 f8 ff cmp $0xffffffff,%eax
7ca: 74 1c je 7e8 <malloc+0x98>
7cc: 89 70 04 mov %esi,0x4(%eax)
7cf: 83 ec 0c sub $0xc,%esp
7d2: 83 c0 08 add $0x8,%eax
7d5: 50 push %eax
7d6: e8 e5 fe ff ff call 6c0 <free>
7db: 8b 15 40 0b 00 00 mov 0xb40,%edx
7e1: 83 c4 10 add $0x10,%esp
7e4: 85 d2 test %edx,%edx
7e6: 75 c0 jne 7a8 <malloc+0x58>
7e8: 31 c0 xor %eax,%eax
7ea: eb 1c jmp 808 <malloc+0xb8>
7ec: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
7f0: 39 cf cmp %ecx,%edi
7f2: 74 1c je 810 <malloc+0xc0>
7f4: 29 f9 sub %edi,%ecx
7f6: 89 48 04 mov %ecx,0x4(%eax)
7f9: 8d 04 c8 lea (%eax,%ecx,8),%eax
7fc: 89 78 04 mov %edi,0x4(%eax)
7ff: 89 15 40 0b 00 00 mov %edx,0xb40
805: 83 c0 08 add $0x8,%eax
808: 8d 65 f4 lea -0xc(%ebp),%esp
80b: 5b pop %ebx
80c: 5e pop %esi
80d: 5f pop %edi
80e: 5d pop %ebp
80f: c3 ret
810: 8b 08 mov (%eax),%ecx
812: 89 0a mov %ecx,(%edx)
814: eb e9 jmp 7ff <malloc+0xaf>
816: c7 05 40 0b 00 00 44 movl $0xb44,0xb40
81d: 0b 00 00
820: c7 05 44 0b 00 00 44 movl $0xb44,0xb44
827: 0b 00 00
82a: b8 44 0b 00 00 mov $0xb44,%eax
82f: c7 05 48 0b 00 00 00 movl $0x0,0xb48
836: 00 00 00
839: e9 3e ff ff ff jmp 77c <malloc+0x2c>
| 32.539955 | 59 | 0.406945 |
36888765db836d26bead77e268061d7d417728c7 | 717 | asm | Assembly | programs/oeis/251/A251924.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/251/A251924.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/251/A251924.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A251924: Numbers n such that the sum of the triangular numbers T(n) and T(n+1) is equal to a hexagonal number H(m) for some m.
; 0,34,1188,40390,1372104,46611178,1583407980,53789260174,1827251437968,62072759630770,2108646576008244,71631910824649558,2433376321462076760,82663163018885960314,2808114166320660573948,95393218491883573553950,3240561314557720840260384,110083691476470624995299138,3739604948885443528999910340,127036484570628609361001652454,4315500870452487274745056273128,146599993110813938731970911633930,4980084264897221429612265939280524,169176265013394714668085071023903918
mul $0,2
mov $1,2
mov $2,3
lpb $0
sub $0,1
add $2,$1
add $1,$2
add $1,$2
add $2,$1
lpe
div $1,4
mul $1,2
mov $0,$1
| 42.176471 | 461 | 0.825662 |
a6ebc3f708a13a372de2da59bbc7322ccd599b72 | 2,123 | asm | Assembly | source/lessons/lsn9-10/ex_subroutine.asm | MarsUniversity/ECE382 | 83d20fe5879567e09a1783a0027db6051f22f757 | [
"MIT"
] | null | null | null | source/lessons/lsn9-10/ex_subroutine.asm | MarsUniversity/ECE382 | 83d20fe5879567e09a1783a0027db6051f22f757 | [
"MIT"
] | 3 | 2017-12-24T23:20:03.000Z | 2018-12-05T15:36:27.000Z | source/lessons/lsn9-10/ex_subroutine.asm | MarsUniversity/ece382 | 83d20fe5879567e09a1783a0027db6051f22f757 | [
"MIT"
] | null | null | null | ;-------------------------------------------------------------------------------
; Name: Capt Jeff Falkinburg
; Term: Fall 2016
; MCU: MSP430G2553
; Lecture: Subroutines and the Stack
; Date: 7 September 2016
;-------------------------------------------------------------------------------
.cdecls C,LIST,"msp430.h" ; Include device header file
;-------------------------------------------------------------------------------
.def RESET ; Export program entry-point to
; make it known to linker.
;-------------------------------------------------------------------------------
.text ; Assemble into program memory.
.retain ; Override ELF conditional linking
; and retain current section.
.retainrefs ; And retain any sections that have
; references to current section.
;-------------------------------------------------------------------------------
RESET mov.w #__STACK_END,SP ; Initialize stackpointer
StopWDT mov.w #WDTPW|WDTHOLD,&WDTCTL ; Stop watchdog timer
;-------------------------------------------------------------------------------
; Main loop here
;-------------------------------------------------------------------------------
main:
mov.w #2, r10
mov.w #4, r11
call #addition
nop
nop
nop
nop
addition:
add.w r10, r11
ret
;-------------------------------------------------------------------------------
; Stack Pointer definition
;-------------------------------------------------------------------------------
.global __STACK_END
.sect .stack
;-------------------------------------------------------------------------------
; Interrupt Vectors
;-------------------------------------------------------------------------------
.sect ".reset" ; MSP430 RESET Vector
.short RESET
| 40.056604 | 80 | 0.285445 |
a237905908d6643baf7b4550cebc54b30835f3bc | 44,917 | asm | Assembly | xv6/ln.asm | ZhangHnu/xv6FileSystem | a1bb5b607c45f8fa833f8f7b62aa2563d2b9007c | [
"MIT"
] | null | null | null | xv6/ln.asm | ZhangHnu/xv6FileSystem | a1bb5b607c45f8fa833f8f7b62aa2563d2b9007c | [
"MIT"
] | null | null | null | xv6/ln.asm | ZhangHnu/xv6FileSystem | a1bb5b607c45f8fa833f8f7b62aa2563d2b9007c | [
"MIT"
] | null | null | null |
_ln: file format elf32-i386
Disassembly of section .text:
00000000 <main>:
#include "stat.h"
#include "user.h"
int
main(int argc, char *argv[])
{
0: 55 push %ebp
1: 89 e5 mov %esp,%ebp
3: 53 push %ebx
4: 83 e4 f0 and $0xfffffff0,%esp
7: 83 ec 10 sub $0x10,%esp
a: 8b 5d 0c mov 0xc(%ebp),%ebx
if(argc != 3){
d: 83 7d 08 03 cmpl $0x3,0x8(%ebp)
11: 74 19 je 2c <main+0x2c>
printf(2, "Usage: ln old new\n");
13: c7 44 24 04 de 06 00 movl $0x6de,0x4(%esp)
1a: 00
1b: c7 04 24 02 00 00 00 movl $0x2,(%esp)
22: e8 d9 03 00 00 call 400 <printf>
exit();
27: e8 78 02 00 00 call 2a4 <exit>
}
if(link(argv[1], argv[2]) < 0)
2c: 8b 43 08 mov 0x8(%ebx),%eax
2f: 89 44 24 04 mov %eax,0x4(%esp)
33: 8b 43 04 mov 0x4(%ebx),%eax
36: 89 04 24 mov %eax,(%esp)
39: e8 c6 02 00 00 call 304 <link>
3e: 85 c0 test %eax,%eax
40: 78 05 js 47 <main+0x47>
printf(2, "link %s %s: failed\n", argv[1], argv[2]);
exit();
42: e8 5d 02 00 00 call 2a4 <exit>
if(argc != 3){
printf(2, "Usage: ln old new\n");
exit();
}
if(link(argv[1], argv[2]) < 0)
printf(2, "link %s %s: failed\n", argv[1], argv[2]);
47: 8b 43 08 mov 0x8(%ebx),%eax
4a: 89 44 24 0c mov %eax,0xc(%esp)
4e: 8b 43 04 mov 0x4(%ebx),%eax
51: c7 44 24 04 f1 06 00 movl $0x6f1,0x4(%esp)
58: 00
59: c7 04 24 02 00 00 00 movl $0x2,(%esp)
60: 89 44 24 08 mov %eax,0x8(%esp)
64: e8 97 03 00 00 call 400 <printf>
69: eb d7 jmp 42 <main+0x42>
6b: 90 nop
6c: 90 nop
6d: 90 nop
6e: 90 nop
6f: 90 nop
00000070 <strcpy>:
#include "user.h"
#include "x86.h"
char*
strcpy(char *s, const char *t)
{
70: 55 push %ebp
char *os;
os = s;
while((*s++ = *t++) != 0)
71: 31 d2 xor %edx,%edx
#include "user.h"
#include "x86.h"
char*
strcpy(char *s, const char *t)
{
73: 89 e5 mov %esp,%ebp
75: 8b 45 08 mov 0x8(%ebp),%eax
78: 53 push %ebx
79: 8b 5d 0c mov 0xc(%ebp),%ebx
7c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
char *os;
os = s;
while((*s++ = *t++) != 0)
80: 0f b6 0c 13 movzbl (%ebx,%edx,1),%ecx
84: 88 0c 10 mov %cl,(%eax,%edx,1)
87: 83 c2 01 add $0x1,%edx
8a: 84 c9 test %cl,%cl
8c: 75 f2 jne 80 <strcpy+0x10>
;
return os;
}
8e: 5b pop %ebx
8f: 5d pop %ebp
90: c3 ret
91: eb 0d jmp a0 <strcmp>
93: 90 nop
94: 90 nop
95: 90 nop
96: 90 nop
97: 90 nop
98: 90 nop
99: 90 nop
9a: 90 nop
9b: 90 nop
9c: 90 nop
9d: 90 nop
9e: 90 nop
9f: 90 nop
000000a0 <strcmp>:
int
strcmp(const char *p, const char *q)
{
a0: 55 push %ebp
a1: 89 e5 mov %esp,%ebp
a3: 8b 4d 08 mov 0x8(%ebp),%ecx
a6: 56 push %esi
a7: 8b 55 0c mov 0xc(%ebp),%edx
aa: 53 push %ebx
while(*p && *p == *q)
ab: 0f b6 01 movzbl (%ecx),%eax
ae: 0f b6 1a movzbl (%edx),%ebx
b1: 84 c0 test %al,%al
b3: 74 23 je d8 <strcmp+0x38>
b5: 38 d8 cmp %bl,%al
b7: 74 10 je c9 <strcmp+0x29>
b9: eb 2d jmp e8 <strcmp+0x48>
bb: 90 nop
bc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
c0: 83 c1 01 add $0x1,%ecx
c3: 38 d8 cmp %bl,%al
c5: 75 21 jne e8 <strcmp+0x48>
p++, q++;
c7: 89 f2 mov %esi,%edx
}
int
strcmp(const char *p, const char *q)
{
while(*p && *p == *q)
c9: 0f b6 41 01 movzbl 0x1(%ecx),%eax
p++, q++;
cd: 8d 72 01 lea 0x1(%edx),%esi
}
int
strcmp(const char *p, const char *q)
{
while(*p && *p == *q)
d0: 0f b6 5a 01 movzbl 0x1(%edx),%ebx
d4: 84 c0 test %al,%al
d6: 75 e8 jne c0 <strcmp+0x20>
p++, q++;
return (uchar)*p - (uchar)*q;
d8: 0f b6 db movzbl %bl,%ebx
}
int
strcmp(const char *p, const char *q)
{
while(*p && *p == *q)
db: 31 c0 xor %eax,%eax
p++, q++;
return (uchar)*p - (uchar)*q;
dd: 29 d8 sub %ebx,%eax
}
df: 5b pop %ebx
e0: 5e pop %esi
e1: 5d pop %ebp
e2: c3 ret
e3: 90 nop
e4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
int
strcmp(const char *p, const char *q)
{
while(*p && *p == *q)
p++, q++;
return (uchar)*p - (uchar)*q;
e8: 0f b6 db movzbl %bl,%ebx
}
int
strcmp(const char *p, const char *q)
{
while(*p && *p == *q)
eb: 0f b6 c0 movzbl %al,%eax
p++, q++;
return (uchar)*p - (uchar)*q;
ee: 29 d8 sub %ebx,%eax
}
f0: 5b pop %ebx
f1: 5e pop %esi
f2: 5d pop %ebp
f3: c3 ret
f4: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
fa: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
00000100 <strlen>:
uint
strlen(const char *s)
{
100: 55 push %ebp
int n;
for(n = 0; s[n]; n++)
101: 31 c0 xor %eax,%eax
return (uchar)*p - (uchar)*q;
}
uint
strlen(const char *s)
{
103: 89 e5 mov %esp,%ebp
105: 8b 4d 08 mov 0x8(%ebp),%ecx
int n;
for(n = 0; s[n]; n++)
108: 80 39 00 cmpb $0x0,(%ecx)
10b: 74 0e je 11b <strlen+0x1b>
10d: 31 d2 xor %edx,%edx
10f: 90 nop
110: 83 c2 01 add $0x1,%edx
113: 80 3c 11 00 cmpb $0x0,(%ecx,%edx,1)
117: 89 d0 mov %edx,%eax
119: 75 f5 jne 110 <strlen+0x10>
;
return n;
}
11b: 5d pop %ebp
11c: c3 ret
11d: 8d 76 00 lea 0x0(%esi),%esi
00000120 <memset>:
void*
memset(void *dst, int c, uint n)
{
120: 55 push %ebp
121: 89 e5 mov %esp,%ebp
123: 8b 55 08 mov 0x8(%ebp),%edx
126: 57 push %edi
}
static inline void
stosb(void *addr, int data, int cnt)
{
asm volatile("cld; rep stosb" :
127: 8b 4d 10 mov 0x10(%ebp),%ecx
12a: 8b 45 0c mov 0xc(%ebp),%eax
12d: 89 d7 mov %edx,%edi
12f: fc cld
130: f3 aa rep stos %al,%es:(%edi)
stosb(dst, c, n);
return dst;
}
132: 89 d0 mov %edx,%eax
134: 5f pop %edi
135: 5d pop %ebp
136: c3 ret
137: 89 f6 mov %esi,%esi
139: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00000140 <strchr>:
char*
strchr(const char *s, char c)
{
140: 55 push %ebp
141: 89 e5 mov %esp,%ebp
143: 8b 45 08 mov 0x8(%ebp),%eax
146: 0f b6 4d 0c movzbl 0xc(%ebp),%ecx
for(; *s; s++)
14a: 0f b6 10 movzbl (%eax),%edx
14d: 84 d2 test %dl,%dl
14f: 75 12 jne 163 <strchr+0x23>
151: eb 1d jmp 170 <strchr+0x30>
153: 90 nop
154: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
158: 0f b6 50 01 movzbl 0x1(%eax),%edx
15c: 84 d2 test %dl,%dl
15e: 74 10 je 170 <strchr+0x30>
160: 83 c0 01 add $0x1,%eax
if(*s == c)
163: 38 ca cmp %cl,%dl
165: 75 f1 jne 158 <strchr+0x18>
return (char*)s;
return 0;
}
167: 5d pop %ebp
168: c3 ret
169: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
strchr(const char *s, char c)
{
for(; *s; s++)
if(*s == c)
return (char*)s;
return 0;
170: 31 c0 xor %eax,%eax
}
172: 5d pop %ebp
173: c3 ret
174: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
17a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
00000180 <gets>:
char*
gets(char *buf, int max)
{
180: 55 push %ebp
181: 89 e5 mov %esp,%ebp
183: 57 push %edi
184: 56 push %esi
int i, cc;
char c;
for(i=0; i+1 < max; ){
185: 31 f6 xor %esi,%esi
return 0;
}
char*
gets(char *buf, int max)
{
187: 53 push %ebx
188: 83 ec 2c sub $0x2c,%esp
18b: 8b 7d 08 mov 0x8(%ebp),%edi
int i, cc;
char c;
for(i=0; i+1 < max; ){
18e: eb 31 jmp 1c1 <gets+0x41>
cc = read(0, &c, 1);
190: 8d 45 e7 lea -0x19(%ebp),%eax
193: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
19a: 00
19b: 89 44 24 04 mov %eax,0x4(%esp)
19f: c7 04 24 00 00 00 00 movl $0x0,(%esp)
1a6: e8 11 01 00 00 call 2bc <read>
if(cc < 1)
1ab: 85 c0 test %eax,%eax
1ad: 7e 1a jle 1c9 <gets+0x49>
break;
buf[i++] = c;
1af: 0f b6 45 e7 movzbl -0x19(%ebp),%eax
gets(char *buf, int max)
{
int i, cc;
char c;
for(i=0; i+1 < max; ){
1b3: 89 de mov %ebx,%esi
cc = read(0, &c, 1);
if(cc < 1)
break;
buf[i++] = c;
if(c == '\n' || c == '\r')
1b5: 3c 0d cmp $0xd,%al
for(i=0; i+1 < max; ){
cc = read(0, &c, 1);
if(cc < 1)
break;
buf[i++] = c;
1b7: 88 44 1f ff mov %al,-0x1(%edi,%ebx,1)
if(c == '\n' || c == '\r')
1bb: 74 0c je 1c9 <gets+0x49>
1bd: 3c 0a cmp $0xa,%al
1bf: 74 08 je 1c9 <gets+0x49>
gets(char *buf, int max)
{
int i, cc;
char c;
for(i=0; i+1 < max; ){
1c1: 8d 5e 01 lea 0x1(%esi),%ebx
1c4: 3b 5d 0c cmp 0xc(%ebp),%ebx
1c7: 7c c7 jl 190 <gets+0x10>
break;
buf[i++] = c;
if(c == '\n' || c == '\r')
break;
}
buf[i] = '\0';
1c9: c6 04 37 00 movb $0x0,(%edi,%esi,1)
return buf;
}
1cd: 83 c4 2c add $0x2c,%esp
1d0: 89 f8 mov %edi,%eax
1d2: 5b pop %ebx
1d3: 5e pop %esi
1d4: 5f pop %edi
1d5: 5d pop %ebp
1d6: c3 ret
1d7: 89 f6 mov %esi,%esi
1d9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
000001e0 <stat>:
int
stat(const char *n, struct stat *st)
{
1e0: 55 push %ebp
1e1: 89 e5 mov %esp,%ebp
1e3: 83 ec 18 sub $0x18,%esp
int fd;
int r;
fd = open(n, O_RDONLY);
1e6: 8b 45 08 mov 0x8(%ebp),%eax
return buf;
}
int
stat(const char *n, struct stat *st)
{
1e9: 89 5d f8 mov %ebx,-0x8(%ebp)
1ec: 89 75 fc mov %esi,-0x4(%ebp)
int fd;
int r;
fd = open(n, O_RDONLY);
if(fd < 0)
return -1;
1ef: be ff ff ff ff mov $0xffffffff,%esi
stat(const char *n, struct stat *st)
{
int fd;
int r;
fd = open(n, O_RDONLY);
1f4: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
1fb: 00
1fc: 89 04 24 mov %eax,(%esp)
1ff: e8 e0 00 00 00 call 2e4 <open>
if(fd < 0)
204: 85 c0 test %eax,%eax
stat(const char *n, struct stat *st)
{
int fd;
int r;
fd = open(n, O_RDONLY);
206: 89 c3 mov %eax,%ebx
if(fd < 0)
208: 78 19 js 223 <stat+0x43>
return -1;
r = fstat(fd, st);
20a: 8b 45 0c mov 0xc(%ebp),%eax
20d: 89 1c 24 mov %ebx,(%esp)
210: 89 44 24 04 mov %eax,0x4(%esp)
214: e8 e3 00 00 00 call 2fc <fstat>
close(fd);
219: 89 1c 24 mov %ebx,(%esp)
int r;
fd = open(n, O_RDONLY);
if(fd < 0)
return -1;
r = fstat(fd, st);
21c: 89 c6 mov %eax,%esi
close(fd);
21e: e8 a9 00 00 00 call 2cc <close>
return r;
}
223: 89 f0 mov %esi,%eax
225: 8b 5d f8 mov -0x8(%ebp),%ebx
228: 8b 75 fc mov -0x4(%ebp),%esi
22b: 89 ec mov %ebp,%esp
22d: 5d pop %ebp
22e: c3 ret
22f: 90 nop
00000230 <atoi>:
int
atoi(const char *s)
{
230: 55 push %ebp
int n;
n = 0;
231: 31 c0 xor %eax,%eax
return r;
}
int
atoi(const char *s)
{
233: 89 e5 mov %esp,%ebp
235: 8b 4d 08 mov 0x8(%ebp),%ecx
238: 53 push %ebx
int n;
n = 0;
while('0' <= *s && *s <= '9')
239: 0f b6 11 movzbl (%ecx),%edx
23c: 8d 5a d0 lea -0x30(%edx),%ebx
23f: 80 fb 09 cmp $0x9,%bl
242: 77 1c ja 260 <atoi+0x30>
244: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
n = n*10 + *s++ - '0';
248: 0f be d2 movsbl %dl,%edx
24b: 83 c1 01 add $0x1,%ecx
24e: 8d 04 80 lea (%eax,%eax,4),%eax
251: 8d 44 42 d0 lea -0x30(%edx,%eax,2),%eax
atoi(const char *s)
{
int n;
n = 0;
while('0' <= *s && *s <= '9')
255: 0f b6 11 movzbl (%ecx),%edx
258: 8d 5a d0 lea -0x30(%edx),%ebx
25b: 80 fb 09 cmp $0x9,%bl
25e: 76 e8 jbe 248 <atoi+0x18>
n = n*10 + *s++ - '0';
return n;
}
260: 5b pop %ebx
261: 5d pop %ebp
262: c3 ret
263: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
269: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00000270 <memmove>:
void*
memmove(void *vdst, const void *vsrc, int n)
{
270: 55 push %ebp
271: 89 e5 mov %esp,%ebp
273: 56 push %esi
274: 8b 45 08 mov 0x8(%ebp),%eax
277: 53 push %ebx
278: 8b 5d 10 mov 0x10(%ebp),%ebx
27b: 8b 75 0c mov 0xc(%ebp),%esi
char *dst;
const char *src;
dst = vdst;
src = vsrc;
while(n-- > 0)
27e: 85 db test %ebx,%ebx
280: 7e 14 jle 296 <memmove+0x26>
n = n*10 + *s++ - '0';
return n;
}
void*
memmove(void *vdst, const void *vsrc, int n)
282: 31 d2 xor %edx,%edx
284: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
const char *src;
dst = vdst;
src = vsrc;
while(n-- > 0)
*dst++ = *src++;
288: 0f b6 0c 16 movzbl (%esi,%edx,1),%ecx
28c: 88 0c 10 mov %cl,(%eax,%edx,1)
28f: 83 c2 01 add $0x1,%edx
char *dst;
const char *src;
dst = vdst;
src = vsrc;
while(n-- > 0)
292: 39 da cmp %ebx,%edx
294: 75 f2 jne 288 <memmove+0x18>
*dst++ = *src++;
return vdst;
}
296: 5b pop %ebx
297: 5e pop %esi
298: 5d pop %ebp
299: c3 ret
29a: 90 nop
29b: 90 nop
0000029c <fork>:
name: \
movl $SYS_ ## name, %eax; \
int $T_SYSCALL; \
ret
SYSCALL(fork)
29c: b8 01 00 00 00 mov $0x1,%eax
2a1: cd 40 int $0x40
2a3: c3 ret
000002a4 <exit>:
SYSCALL(exit)
2a4: b8 02 00 00 00 mov $0x2,%eax
2a9: cd 40 int $0x40
2ab: c3 ret
000002ac <wait>:
SYSCALL(wait)
2ac: b8 03 00 00 00 mov $0x3,%eax
2b1: cd 40 int $0x40
2b3: c3 ret
000002b4 <pipe>:
SYSCALL(pipe)
2b4: b8 04 00 00 00 mov $0x4,%eax
2b9: cd 40 int $0x40
2bb: c3 ret
000002bc <read>:
SYSCALL(read)
2bc: b8 05 00 00 00 mov $0x5,%eax
2c1: cd 40 int $0x40
2c3: c3 ret
000002c4 <write>:
SYSCALL(write)
2c4: b8 10 00 00 00 mov $0x10,%eax
2c9: cd 40 int $0x40
2cb: c3 ret
000002cc <close>:
SYSCALL(close)
2cc: b8 15 00 00 00 mov $0x15,%eax
2d1: cd 40 int $0x40
2d3: c3 ret
000002d4 <kill>:
SYSCALL(kill)
2d4: b8 06 00 00 00 mov $0x6,%eax
2d9: cd 40 int $0x40
2db: c3 ret
000002dc <exec>:
SYSCALL(exec)
2dc: b8 07 00 00 00 mov $0x7,%eax
2e1: cd 40 int $0x40
2e3: c3 ret
000002e4 <open>:
SYSCALL(open)
2e4: b8 0f 00 00 00 mov $0xf,%eax
2e9: cd 40 int $0x40
2eb: c3 ret
000002ec <mknod>:
SYSCALL(mknod)
2ec: b8 11 00 00 00 mov $0x11,%eax
2f1: cd 40 int $0x40
2f3: c3 ret
000002f4 <unlink>:
SYSCALL(unlink)
2f4: b8 12 00 00 00 mov $0x12,%eax
2f9: cd 40 int $0x40
2fb: c3 ret
000002fc <fstat>:
SYSCALL(fstat)
2fc: b8 08 00 00 00 mov $0x8,%eax
301: cd 40 int $0x40
303: c3 ret
00000304 <link>:
SYSCALL(link)
304: b8 13 00 00 00 mov $0x13,%eax
309: cd 40 int $0x40
30b: c3 ret
0000030c <mkdir>:
SYSCALL(mkdir)
30c: b8 14 00 00 00 mov $0x14,%eax
311: cd 40 int $0x40
313: c3 ret
00000314 <chdir>:
SYSCALL(chdir)
314: b8 09 00 00 00 mov $0x9,%eax
319: cd 40 int $0x40
31b: c3 ret
0000031c <dup>:
SYSCALL(dup)
31c: b8 0a 00 00 00 mov $0xa,%eax
321: cd 40 int $0x40
323: c3 ret
00000324 <getpid>:
SYSCALL(getpid)
324: b8 0b 00 00 00 mov $0xb,%eax
329: cd 40 int $0x40
32b: c3 ret
0000032c <sbrk>:
SYSCALL(sbrk)
32c: b8 0c 00 00 00 mov $0xc,%eax
331: cd 40 int $0x40
333: c3 ret
00000334 <sleep>:
SYSCALL(sleep)
334: b8 0d 00 00 00 mov $0xd,%eax
339: cd 40 int $0x40
33b: c3 ret
0000033c <uptime>:
SYSCALL(uptime)
33c: b8 0e 00 00 00 mov $0xe,%eax
341: cd 40 int $0x40
343: c3 ret
344: 90 nop
345: 90 nop
346: 90 nop
347: 90 nop
348: 90 nop
349: 90 nop
34a: 90 nop
34b: 90 nop
34c: 90 nop
34d: 90 nop
34e: 90 nop
34f: 90 nop
00000350 <putc>:
#include "stat.h"
#include "user.h"
static void
putc(int fd, char c)
{
350: 55 push %ebp
351: 89 e5 mov %esp,%ebp
353: 83 ec 28 sub $0x28,%esp
356: 88 55 f4 mov %dl,-0xc(%ebp)
write(fd, &c, 1);
359: 8d 55 f4 lea -0xc(%ebp),%edx
35c: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
363: 00
364: 89 54 24 04 mov %edx,0x4(%esp)
368: 89 04 24 mov %eax,(%esp)
36b: e8 54 ff ff ff call 2c4 <write>
}
370: c9 leave
371: c3 ret
372: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
379: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00000380 <printint>:
static void
printint(int fd, int xx, int base, int sgn)
{
380: 55 push %ebp
381: 89 e5 mov %esp,%ebp
383: 57 push %edi
384: 56 push %esi
385: 89 c6 mov %eax,%esi
387: 53 push %ebx
388: 83 ec 1c sub $0x1c,%esp
char buf[16];
int i, neg;
uint x;
neg = 0;
if(sgn && xx < 0){
38b: 8b 45 08 mov 0x8(%ebp),%eax
38e: 85 c0 test %eax,%eax
390: 74 5e je 3f0 <printint+0x70>
392: 89 d0 mov %edx,%eax
394: c1 e8 1f shr $0x1f,%eax
397: 84 c0 test %al,%al
399: 74 55 je 3f0 <printint+0x70>
neg = 1;
x = -xx;
39b: 89 d0 mov %edx,%eax
int i, neg;
uint x;
neg = 0;
if(sgn && xx < 0){
neg = 1;
39d: bf 01 00 00 00 mov $0x1,%edi
x = -xx;
3a2: f7 d8 neg %eax
} else {
x = xx;
}
i = 0;
3a4: 31 db xor %ebx,%ebx
3a6: eb 02 jmp 3aa <printint+0x2a>
do{
buf[i++] = digits[x % base];
3a8: 89 d3 mov %edx,%ebx
3aa: 31 d2 xor %edx,%edx
3ac: f7 f1 div %ecx
3ae: 0f b6 92 0c 07 00 00 movzbl 0x70c(%edx),%edx
}while((x /= base) != 0);
3b5: 85 c0 test %eax,%eax
x = xx;
}
i = 0;
do{
buf[i++] = digits[x % base];
3b7: 88 54 1d d8 mov %dl,-0x28(%ebp,%ebx,1)
3bb: 8d 53 01 lea 0x1(%ebx),%edx
}while((x /= base) != 0);
3be: 75 e8 jne 3a8 <printint+0x28>
if(neg)
3c0: 85 ff test %edi,%edi
3c2: 74 08 je 3cc <printint+0x4c>
buf[i++] = '-';
3c4: c6 44 15 d8 2d movb $0x2d,-0x28(%ebp,%edx,1)
3c9: 8d 53 02 lea 0x2(%ebx),%edx
while(--i >= 0)
3cc: 8d 5a ff lea -0x1(%edx),%ebx
3cf: 90 nop
putc(fd, buf[i]);
3d0: 0f be 54 1d d8 movsbl -0x28(%ebp,%ebx,1),%edx
3d5: 89 f0 mov %esi,%eax
buf[i++] = digits[x % base];
}while((x /= base) != 0);
if(neg)
buf[i++] = '-';
while(--i >= 0)
3d7: 83 eb 01 sub $0x1,%ebx
putc(fd, buf[i]);
3da: e8 71 ff ff ff call 350 <putc>
buf[i++] = digits[x % base];
}while((x /= base) != 0);
if(neg)
buf[i++] = '-';
while(--i >= 0)
3df: 83 fb ff cmp $0xffffffff,%ebx
3e2: 75 ec jne 3d0 <printint+0x50>
putc(fd, buf[i]);
}
3e4: 83 c4 1c add $0x1c,%esp
3e7: 5b pop %ebx
3e8: 5e pop %esi
3e9: 5f pop %edi
3ea: 5d pop %ebp
3eb: c3 ret
3ec: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
neg = 0;
if(sgn && xx < 0){
neg = 1;
x = -xx;
} else {
x = xx;
3f0: 89 d0 mov %edx,%eax
static char digits[] = "0123456789ABCDEF";
char buf[16];
int i, neg;
uint x;
neg = 0;
3f2: 31 ff xor %edi,%edi
3f4: eb ae jmp 3a4 <printint+0x24>
3f6: 8d 76 00 lea 0x0(%esi),%esi
3f9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00000400 <printf>:
}
// Print to the given fd. Only understands %d, %x, %p, %s.
void
printf(int fd, const char *fmt, ...)
{
400: 55 push %ebp
401: 89 e5 mov %esp,%ebp
403: 57 push %edi
404: 56 push %esi
405: 53 push %ebx
406: 83 ec 2c sub $0x2c,%esp
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
409: 8b 5d 0c mov 0xc(%ebp),%ebx
40c: 0f b6 0b movzbl (%ebx),%ecx
40f: 84 c9 test %cl,%cl
411: 0f 84 89 00 00 00 je 4a0 <printf+0xa0>
char *s;
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
417: 8d 45 10 lea 0x10(%ebp),%eax
{
char *s;
int c, i, state;
uint *ap;
state = 0;
41a: 31 f6 xor %esi,%esi
ap = (uint*)(void*)&fmt + 1;
41c: 89 45 e4 mov %eax,-0x1c(%ebp)
41f: eb 21 jmp 442 <printf+0x42>
421: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
for(i = 0; fmt[i]; i++){
c = fmt[i] & 0xff;
if(state == 0){
if(c == '%'){
428: 83 f9 25 cmp $0x25,%ecx
42b: 74 7b je 4a8 <printf+0xa8>
state = '%';
} else {
putc(fd, c);
42d: 8b 45 08 mov 0x8(%ebp),%eax
430: 0f be d1 movsbl %cl,%edx
433: e8 18 ff ff ff call 350 <putc>
} else if(c == '%'){
putc(fd, c);
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
putc(fd, c);
438: 83 c3 01 add $0x1,%ebx
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
43b: 0f b6 0b movzbl (%ebx),%ecx
43e: 84 c9 test %cl,%cl
440: 74 5e je 4a0 <printf+0xa0>
c = fmt[i] & 0xff;
if(state == 0){
442: 85 f6 test %esi,%esi
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
c = fmt[i] & 0xff;
444: 0f b6 c9 movzbl %cl,%ecx
if(state == 0){
447: 74 df je 428 <printf+0x28>
if(c == '%'){
state = '%';
} else {
putc(fd, c);
}
} else if(state == '%'){
449: 83 fe 25 cmp $0x25,%esi
44c: 75 ea jne 438 <printf+0x38>
if(c == 'd'){
44e: 83 f9 64 cmp $0x64,%ecx
451: 0f 84 c9 00 00 00 je 520 <printf+0x120>
printint(fd, *ap, 10, 1);
ap++;
} else if(c == 'x' || c == 'p'){
457: 83 f9 70 cmp $0x70,%ecx
45a: 74 54 je 4b0 <printf+0xb0>
45c: 83 f9 78 cmp $0x78,%ecx
45f: 90 nop
460: 74 4e je 4b0 <printf+0xb0>
printint(fd, *ap, 16, 0);
ap++;
} else if(c == 's'){
462: 83 f9 73 cmp $0x73,%ecx
465: 74 71 je 4d8 <printf+0xd8>
s = "(null)";
while(*s != 0){
putc(fd, *s);
s++;
}
} else if(c == 'c'){
467: 83 f9 63 cmp $0x63,%ecx
46a: 0f 84 d2 00 00 00 je 542 <printf+0x142>
putc(fd, *ap);
ap++;
} else if(c == '%'){
470: 83 f9 25 cmp $0x25,%ecx
putc(fd, c);
473: ba 25 00 00 00 mov $0x25,%edx
478: 8b 45 08 mov 0x8(%ebp),%eax
s++;
}
} else if(c == 'c'){
putc(fd, *ap);
ap++;
} else if(c == '%'){
47b: 74 11 je 48e <printf+0x8e>
putc(fd, c);
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
47d: 89 4d e0 mov %ecx,-0x20(%ebp)
480: e8 cb fe ff ff call 350 <putc>
putc(fd, c);
485: 8b 4d e0 mov -0x20(%ebp),%ecx
488: 8b 45 08 mov 0x8(%ebp),%eax
48b: 0f be d1 movsbl %cl,%edx
48e: 83 c3 01 add $0x1,%ebx
}
state = 0;
491: 31 f6 xor %esi,%esi
} else if(c == '%'){
putc(fd, c);
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
putc(fd, c);
493: e8 b8 fe ff ff call 350 <putc>
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
498: 0f b6 0b movzbl (%ebx),%ecx
49b: 84 c9 test %cl,%cl
49d: 75 a3 jne 442 <printf+0x42>
49f: 90 nop
putc(fd, c);
}
state = 0;
}
}
}
4a0: 83 c4 2c add $0x2c,%esp
4a3: 5b pop %ebx
4a4: 5e pop %esi
4a5: 5f pop %edi
4a6: 5d pop %ebp
4a7: c3 ret
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
c = fmt[i] & 0xff;
if(state == 0){
if(c == '%'){
state = '%';
4a8: be 25 00 00 00 mov $0x25,%esi
4ad: eb 89 jmp 438 <printf+0x38>
4af: 90 nop
} else if(state == '%'){
if(c == 'd'){
printint(fd, *ap, 10, 1);
ap++;
} else if(c == 'x' || c == 'p'){
printint(fd, *ap, 16, 0);
4b0: 8b 45 e4 mov -0x1c(%ebp),%eax
4b3: b9 10 00 00 00 mov $0x10,%ecx
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
putc(fd, c);
}
state = 0;
4b8: 31 f6 xor %esi,%esi
} else if(state == '%'){
if(c == 'd'){
printint(fd, *ap, 10, 1);
ap++;
} else if(c == 'x' || c == 'p'){
printint(fd, *ap, 16, 0);
4ba: c7 04 24 00 00 00 00 movl $0x0,(%esp)
4c1: 8b 10 mov (%eax),%edx
4c3: 8b 45 08 mov 0x8(%ebp),%eax
4c6: e8 b5 fe ff ff call 380 <printint>
ap++;
4cb: 83 45 e4 04 addl $0x4,-0x1c(%ebp)
4cf: e9 64 ff ff ff jmp 438 <printf+0x38>
4d4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
} else if(c == 's'){
s = (char*)*ap;
4d8: 8b 45 e4 mov -0x1c(%ebp),%eax
4db: 8b 38 mov (%eax),%edi
ap++;
4dd: 83 c0 04 add $0x4,%eax
4e0: 89 45 e4 mov %eax,-0x1c(%ebp)
if(s == 0)
s = "(null)";
4e3: b8 05 07 00 00 mov $0x705,%eax
4e8: 85 ff test %edi,%edi
4ea: 0f 44 f8 cmove %eax,%edi
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
putc(fd, c);
}
state = 0;
4ed: 31 f6 xor %esi,%esi
} else if(c == 's'){
s = (char*)*ap;
ap++;
if(s == 0)
s = "(null)";
while(*s != 0){
4ef: 0f b6 17 movzbl (%edi),%edx
4f2: 84 d2 test %dl,%dl
4f4: 0f 84 3e ff ff ff je 438 <printf+0x38>
4fa: 89 de mov %ebx,%esi
4fc: 8b 5d 08 mov 0x8(%ebp),%ebx
4ff: 90 nop
putc(fd, *s);
500: 0f be d2 movsbl %dl,%edx
s++;
503: 83 c7 01 add $0x1,%edi
s = (char*)*ap;
ap++;
if(s == 0)
s = "(null)";
while(*s != 0){
putc(fd, *s);
506: 89 d8 mov %ebx,%eax
508: e8 43 fe ff ff call 350 <putc>
} else if(c == 's'){
s = (char*)*ap;
ap++;
if(s == 0)
s = "(null)";
while(*s != 0){
50d: 0f b6 17 movzbl (%edi),%edx
510: 84 d2 test %dl,%dl
512: 75 ec jne 500 <printf+0x100>
514: 89 f3 mov %esi,%ebx
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
putc(fd, c);
}
state = 0;
516: 31 f6 xor %esi,%esi
518: e9 1b ff ff ff jmp 438 <printf+0x38>
51d: 8d 76 00 lea 0x0(%esi),%esi
} else {
putc(fd, c);
}
} else if(state == '%'){
if(c == 'd'){
printint(fd, *ap, 10, 1);
520: 8b 45 e4 mov -0x1c(%ebp),%eax
523: b1 0a mov $0xa,%cl
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
putc(fd, c);
}
state = 0;
525: 66 31 f6 xor %si,%si
} else {
putc(fd, c);
}
} else if(state == '%'){
if(c == 'd'){
printint(fd, *ap, 10, 1);
528: c7 04 24 01 00 00 00 movl $0x1,(%esp)
52f: 8b 10 mov (%eax),%edx
531: 8b 45 08 mov 0x8(%ebp),%eax
534: e8 47 fe ff ff call 380 <printint>
ap++;
539: 83 45 e4 04 addl $0x4,-0x1c(%ebp)
53d: e9 f6 fe ff ff jmp 438 <printf+0x38>
while(*s != 0){
putc(fd, *s);
s++;
}
} else if(c == 'c'){
putc(fd, *ap);
542: 8b 45 e4 mov -0x1c(%ebp),%eax
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
putc(fd, c);
}
state = 0;
545: 31 f6 xor %esi,%esi
while(*s != 0){
putc(fd, *s);
s++;
}
} else if(c == 'c'){
putc(fd, *ap);
547: 0f be 10 movsbl (%eax),%edx
54a: 8b 45 08 mov 0x8(%ebp),%eax
54d: e8 fe fd ff ff call 350 <putc>
ap++;
552: 83 45 e4 04 addl $0x4,-0x1c(%ebp)
556: e9 dd fe ff ff jmp 438 <printf+0x38>
55b: 90 nop
55c: 90 nop
55d: 90 nop
55e: 90 nop
55f: 90 nop
00000560 <free>:
static Header base;
static Header *freep;
void
free(void *ap)
{
560: 55 push %ebp
Header *bp, *p;
bp = (Header*)ap - 1;
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
561: a1 b8 09 00 00 mov 0x9b8,%eax
static Header base;
static Header *freep;
void
free(void *ap)
{
566: 89 e5 mov %esp,%ebp
568: 57 push %edi
569: 56 push %esi
56a: 53 push %ebx
56b: 8b 5d 08 mov 0x8(%ebp),%ebx
Header *bp, *p;
bp = (Header*)ap - 1;
56e: 8d 4b f8 lea -0x8(%ebx),%ecx
571: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
578: 39 c8 cmp %ecx,%eax
57a: 8b 10 mov (%eax),%edx
57c: 73 04 jae 582 <free+0x22>
57e: 39 d1 cmp %edx,%ecx
580: 72 16 jb 598 <free+0x38>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
582: 39 d0 cmp %edx,%eax
584: 72 0c jb 592 <free+0x32>
586: 39 c8 cmp %ecx,%eax
588: 72 0e jb 598 <free+0x38>
58a: 39 d1 cmp %edx,%ecx
58c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
590: 72 06 jb 598 <free+0x38>
static Header base;
static Header *freep;
void
free(void *ap)
{
592: 89 d0 mov %edx,%eax
594: eb e2 jmp 578 <free+0x18>
596: 66 90 xchg %ax,%ax
bp = (Header*)ap - 1;
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
break;
if(bp + bp->s.size == p->s.ptr){
598: 8b 73 fc mov -0x4(%ebx),%esi
59b: 8d 3c f1 lea (%ecx,%esi,8),%edi
59e: 39 d7 cmp %edx,%edi
5a0: 74 19 je 5bb <free+0x5b>
bp->s.size += p->s.ptr->s.size;
bp->s.ptr = p->s.ptr->s.ptr;
} else
bp->s.ptr = p->s.ptr;
5a2: 89 53 f8 mov %edx,-0x8(%ebx)
if(p + p->s.size == bp){
5a5: 8b 50 04 mov 0x4(%eax),%edx
5a8: 8d 34 d0 lea (%eax,%edx,8),%esi
5ab: 39 f1 cmp %esi,%ecx
5ad: 74 23 je 5d2 <free+0x72>
p->s.size += bp->s.size;
p->s.ptr = bp->s.ptr;
} else
p->s.ptr = bp;
5af: 89 08 mov %ecx,(%eax)
freep = p;
5b1: a3 b8 09 00 00 mov %eax,0x9b8
}
5b6: 5b pop %ebx
5b7: 5e pop %esi
5b8: 5f pop %edi
5b9: 5d pop %ebp
5ba: c3 ret
bp = (Header*)ap - 1;
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
break;
if(bp + bp->s.size == p->s.ptr){
bp->s.size += p->s.ptr->s.size;
5bb: 03 72 04 add 0x4(%edx),%esi
5be: 89 73 fc mov %esi,-0x4(%ebx)
bp->s.ptr = p->s.ptr->s.ptr;
5c1: 8b 10 mov (%eax),%edx
5c3: 8b 12 mov (%edx),%edx
5c5: 89 53 f8 mov %edx,-0x8(%ebx)
} else
bp->s.ptr = p->s.ptr;
if(p + p->s.size == bp){
5c8: 8b 50 04 mov 0x4(%eax),%edx
5cb: 8d 34 d0 lea (%eax,%edx,8),%esi
5ce: 39 f1 cmp %esi,%ecx
5d0: 75 dd jne 5af <free+0x4f>
p->s.size += bp->s.size;
5d2: 03 53 fc add -0x4(%ebx),%edx
p->s.ptr = bp->s.ptr;
} else
p->s.ptr = bp;
freep = p;
5d5: a3 b8 09 00 00 mov %eax,0x9b8
bp->s.size += p->s.ptr->s.size;
bp->s.ptr = p->s.ptr->s.ptr;
} else
bp->s.ptr = p->s.ptr;
if(p + p->s.size == bp){
p->s.size += bp->s.size;
5da: 89 50 04 mov %edx,0x4(%eax)
p->s.ptr = bp->s.ptr;
5dd: 8b 53 f8 mov -0x8(%ebx),%edx
5e0: 89 10 mov %edx,(%eax)
} else
p->s.ptr = bp;
freep = p;
}
5e2: 5b pop %ebx
5e3: 5e pop %esi
5e4: 5f pop %edi
5e5: 5d pop %ebp
5e6: c3 ret
5e7: 89 f6 mov %esi,%esi
5e9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
000005f0 <malloc>:
return freep;
}
void*
malloc(uint nbytes)
{
5f0: 55 push %ebp
5f1: 89 e5 mov %esp,%ebp
5f3: 57 push %edi
5f4: 56 push %esi
5f5: 53 push %ebx
5f6: 83 ec 2c sub $0x2c,%esp
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
5f9: 8b 5d 08 mov 0x8(%ebp),%ebx
if((prevp = freep) == 0){
5fc: 8b 15 b8 09 00 00 mov 0x9b8,%edx
malloc(uint nbytes)
{
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
602: 83 c3 07 add $0x7,%ebx
605: c1 eb 03 shr $0x3,%ebx
608: 83 c3 01 add $0x1,%ebx
if((prevp = freep) == 0){
60b: 85 d2 test %edx,%edx
60d: 0f 84 a3 00 00 00 je 6b6 <malloc+0xc6>
613: 8b 02 mov (%edx),%eax
615: 8b 48 04 mov 0x4(%eax),%ecx
base.s.ptr = freep = prevp = &base;
base.s.size = 0;
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
if(p->s.size >= nunits){
618: 39 d9 cmp %ebx,%ecx
61a: 73 74 jae 690 <malloc+0xa0>
p->s.size -= nunits;
p += p->s.size;
p->s.size = nunits;
}
freep = prevp;
return (void*)(p + 1);
61c: 8d 14 dd 00 00 00 00 lea 0x0(,%ebx,8),%edx
morecore(uint nu)
{
char *p;
Header *hp;
if(nu < 4096)
623: bf 00 80 00 00 mov $0x8000,%edi
p->s.size -= nunits;
p += p->s.size;
p->s.size = nunits;
}
freep = prevp;
return (void*)(p + 1);
628: 89 55 e4 mov %edx,-0x1c(%ebp)
62b: eb 0c jmp 639 <malloc+0x49>
62d: 8d 76 00 lea 0x0(%esi),%esi
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
if((prevp = freep) == 0){
base.s.ptr = freep = prevp = &base;
base.s.size = 0;
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
630: 8b 02 mov (%edx),%eax
if(p->s.size >= nunits){
632: 8b 48 04 mov 0x4(%eax),%ecx
635: 39 cb cmp %ecx,%ebx
637: 76 57 jbe 690 <malloc+0xa0>
p->s.size = nunits;
}
freep = prevp;
return (void*)(p + 1);
}
if(p == freep)
639: 3b 05 b8 09 00 00 cmp 0x9b8,%eax
63f: 89 c2 mov %eax,%edx
641: 75 ed jne 630 <malloc+0x40>
morecore(uint nu)
{
char *p;
Header *hp;
if(nu < 4096)
643: 8b 45 e4 mov -0x1c(%ebp),%eax
646: 81 fb 00 10 00 00 cmp $0x1000,%ebx
64c: be 00 10 00 00 mov $0x1000,%esi
651: 0f 43 f3 cmovae %ebx,%esi
654: 0f 42 c7 cmovb %edi,%eax
nu = 4096;
p = sbrk(nu * sizeof(Header));
657: 89 04 24 mov %eax,(%esp)
65a: e8 cd fc ff ff call 32c <sbrk>
if(p == (char*)-1)
65f: 83 f8 ff cmp $0xffffffff,%eax
662: 74 1c je 680 <malloc+0x90>
return 0;
hp = (Header*)p;
hp->s.size = nu;
664: 89 70 04 mov %esi,0x4(%eax)
free((void*)(hp + 1));
667: 83 c0 08 add $0x8,%eax
66a: 89 04 24 mov %eax,(%esp)
66d: e8 ee fe ff ff call 560 <free>
return freep;
672: 8b 15 b8 09 00 00 mov 0x9b8,%edx
}
freep = prevp;
return (void*)(p + 1);
}
if(p == freep)
if((p = morecore(nunits)) == 0)
678: 85 d2 test %edx,%edx
67a: 75 b4 jne 630 <malloc+0x40>
67c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
return 0;
}
}
680: 83 c4 2c add $0x2c,%esp
freep = prevp;
return (void*)(p + 1);
}
if(p == freep)
if((p = morecore(nunits)) == 0)
return 0;
683: 31 c0 xor %eax,%eax
}
}
685: 5b pop %ebx
686: 5e pop %esi
687: 5f pop %edi
688: 5d pop %ebp
689: c3 ret
68a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
base.s.ptr = freep = prevp = &base;
base.s.size = 0;
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
if(p->s.size >= nunits){
if(p->s.size == nunits)
690: 39 cb cmp %ecx,%ebx
692: 74 1c je 6b0 <malloc+0xc0>
prevp->s.ptr = p->s.ptr;
else {
p->s.size -= nunits;
694: 29 d9 sub %ebx,%ecx
696: 89 48 04 mov %ecx,0x4(%eax)
p += p->s.size;
699: 8d 04 c8 lea (%eax,%ecx,8),%eax
p->s.size = nunits;
69c: 89 58 04 mov %ebx,0x4(%eax)
}
freep = prevp;
69f: 89 15 b8 09 00 00 mov %edx,0x9b8
}
if(p == freep)
if((p = morecore(nunits)) == 0)
return 0;
}
}
6a5: 83 c4 2c add $0x2c,%esp
p->s.size -= nunits;
p += p->s.size;
p->s.size = nunits;
}
freep = prevp;
return (void*)(p + 1);
6a8: 83 c0 08 add $0x8,%eax
}
if(p == freep)
if((p = morecore(nunits)) == 0)
return 0;
}
}
6ab: 5b pop %ebx
6ac: 5e pop %esi
6ad: 5f pop %edi
6ae: 5d pop %ebp
6af: c3 ret
base.s.size = 0;
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
if(p->s.size >= nunits){
if(p->s.size == nunits)
prevp->s.ptr = p->s.ptr;
6b0: 8b 08 mov (%eax),%ecx
6b2: 89 0a mov %ecx,(%edx)
6b4: eb e9 jmp 69f <malloc+0xaf>
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
if((prevp = freep) == 0){
base.s.ptr = freep = prevp = &base;
6b6: c7 05 b8 09 00 00 bc movl $0x9bc,0x9b8
6bd: 09 00 00
base.s.size = 0;
6c0: b8 bc 09 00 00 mov $0x9bc,%eax
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
if((prevp = freep) == 0){
base.s.ptr = freep = prevp = &base;
6c5: c7 05 bc 09 00 00 bc movl $0x9bc,0x9bc
6cc: 09 00 00
base.s.size = 0;
6cf: c7 05 c0 09 00 00 00 movl $0x0,0x9c0
6d6: 00 00 00
6d9: e9 3e ff ff ff jmp 61c <malloc+0x2c>
| 28.885531 | 60 | 0.412583 |
8f373c7358d1dab9385f7b9177aefdc79f804563 | 710 | asm | Assembly | oeis/011/A011761.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/011/A011761.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/011/A011761.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A011761: a(n) = a(n-1) + a(n-3), with a(0) = a(1) = 1, a(2) = 5.
; Submitted by Jamie Morken(w3)
; 1,1,5,6,7,12,18,25,37,55,80,117,172,252,369,541,793,1162,1703,2496,3658,5361,7857,11515,16876,24733,36248,53124,77857,114105,167229,245086,359191,526420,771506,1130697,1657117,2428623,3559320,5216437,7645060,11204380,16420817,24065877,35270257,51691074,75756951,111027208,162718282,238475233,349502441,512220723,750695956,1100198397,1612419120,2363115076,3463313473,5075732593,7438847669,10902161142,15977893735,23416741404,34318902546,50296796281,73713537685,108032440231,158329236512,232042774197
mov $3,3
lpb $0
sub $0,1
mov $4,1
add $4,$3
mov $3,$2
mov $2,$1
add $1,$4
lpe
mov $0,$2
add $0,1
| 44.375 | 500 | 0.752113 |
6f49e5bde239e77303612734464d379aae1d220d | 10,301 | asm | Assembly | samples/SVP_speed_test/main.asm | jdesiloniz/svpdev | 13438d71c9cd45c8f78f9768732c40ddec2548d9 | [
"MIT"
] | 42 | 2021-02-09T18:15:27.000Z | 2022-03-21T23:51:05.000Z | samples/SVP_speed_test/main.asm | jdesiloniz/ssp16asm | 13438d71c9cd45c8f78f9768732c40ddec2548d9 | [
"MIT"
] | 2 | 2021-02-16T21:07:07.000Z | 2021-02-16T21:08:31.000Z | samples/SVP_speed_test/main.asm | jdesiloniz/ssp16asm | 13438d71c9cd45c8f78f9768732c40ddec2548d9 | [
"MIT"
] | 3 | 2021-02-22T08:08:27.000Z | 2021-12-22T20:21:07.000Z | ;**************************************************************
; SVP Tests
;**************************************************************
; by Javi Taiyou
;**************************************************************
; This sample is a way to run basic code tests on the SVP
; in order to find out more about its behavior.
;
; This is WIP at this moment and just performs a basic comms check.
;
; You can assemble the M68000 part of this sample with `SNASM68K.EXE`:
;
; SNASM68K.EXE /p main.asm,output.map,output.lst,output.bin
;
; main.asm = this source file
; output.bin = Mega Drive/Genesis part of this ROM, to be later used by the SSP16xx (SVP) assembler.
; output.lst = listing file, shows assembled addresses alongside your source code (useful for debugging).
; output.map = symbol map file for linking (unused)
;
; The M68000 part of the binary needs to be later fed up to the SSP16xx assembler to build
; the SVP part of the code on top of it. You can download it from:
;
; https://github.com/jdesiloniz/svpdev/tools/ssp16asm
;
; To assemble the SVP part and generate the final ROM:
;
; ssp16asm -b output.bin tests.svp rom_svp.bin
;
; svp_gfx.svp = source containing the SVP part of this sample.
; output.bin = M68000 binary file.
; rom_svp.bin = final ROM containing both M68000 and SSP16xx code to be run on hardware
; or emulators that support SVP emulation!
;
;**************************************************************
; ACKNOWLEDGEMENT
;**************************************************************
;
; Many parts in the M68000 side of this sample are based on the work of other developers in
; the Mega Drive/Genesis scene, specially the following samples by Matt Phillips/BigEvilCorporation:
;
; https://github.com/BigEvilCorporation/megadrive_samples/
;
; The amazing technical documentation found in the Plutiedev site were a big help too: https://plutiedev.com/
;
; Finally the reverse engineering on the SVP originally made by Tasco Deluxe and Grazvydas Ignotas (notaz),
; which obviously helped a lot for the development of the SSP16xx assembler, and the understanding of its behavior.
;**************************************************************
; INCLUDES
;**************************************************************
; Constants + routines.
; Warning: this section shouldn't ever exceed 0x800 bytes
; SVP will try to access 0x800 as its own entry point, so ROM
; space between 0x800-0x1FFFF should be left out for SVP code.
;**************************************************************
include 'init.asm' ; ROM header and initialization routines
;**************************************************************
; SVP CODE PADDING
;**************************************************************
; SVP will start looking for code at address 0x800, let's leave
; space until address 0x20000 (as Virtua Racing did) so that
; we can later put SSP1601 code in the following blanks:
;***************************************************************
SVP_PaddingStart:
DCB.b 0x20000-SVP_PaddingStart,0x00
; Rest of includes
include 'constants.asm' ; Constants
include 'macros.asm' ; VDP macros
include 'text.asm' ; Text drawing routines
include 'pixelfont.asm' ; Font
include 'vdp_utils.asm' ; VDP utils
include 'svp.asm' ; SVP comms
include 'pads.asm' ; Control pads
;**************************************************************
; MEMORY MANAGEMENT
;**************************************************************
RSSET 0x00FF0000 ; Start a new offset table from beginning of RAM
ram_current_state rs.w 1 ; 1 table entry for current UI state
ram_svp_done_flag rs.w 1 ; flag to note if SVP has initialized tests
ram_test_frames rs.w 1 ; number of executed test frames
ram_test_acc rs.w 1 ; number of executed test frames once they've exceeded overflow value
pad_press rs.w 1 ; stores previous pad to check if buttons have changed
;**************************************************************
; CODE ENTRY POINT
;**************************************************************
; The "main()" function. Your code starts here. Once the CPU
; has finished initialising, it will jump to this entry point
; (specified in the vector table at the top of the file).
;
; This should usually be address 0x20000, right after the space
; reserved for SVP code inside the ROM.
;**************************************************************
CPU_EntryPoint:
;***************************
; Initialise the Mega Drive
;***************************
; Write the TMSS signature (if a model 1+ Mega Drive)
jsr VDP_WriteTMSS
; Load the initial VDP registers
jsr VDP_LoadRegisters
jsr PAD_InitPads
jsr VDP_ClearVRAM
jsr VDP_ClearCRAM
jsr LoadTextTiles
; Initial UI status
move.w #ui_init, (ram_current_state)
move.w #0x0000, (ram_svp_done_flag)
move.w #0x0000, (ram_test_frames)
move.w #0x0000, (ram_test_acc)
move.w #0x0000, (pad_press)
;**************
; Write titles
;**************
; Draw main title:
SetVRAMWrite vram_addr_plane_b+((((text_pos_y_title)*vdp_plane_width)+text_pos_x_title)*size_word)
lea StringTitle, a0 ; address for string
jsr DrawTextPlaneANew
; Ask SVP to initialize test data
move.w #0x0001, regXST
jsr VDP_InitStatusRegister
@Stop:
bra @stop
; Finished!
; ********************************************************************************************
; INTERRUPT ROUTINES
; ********************************************************************************************
; The interrupt routines, as specified in the vector table at the top of the file.
; Note that we use `rte` to return from an interrupt, not `rts` like a subroutine.
; ********************************************************************************************
; Vertical interrupt - run once per frame (50hz in PAL, 60hz in NTSC)
INT_VInterrupt:
; Draw UI text
SetVRAMWrite vram_addr_plane_b+((((text_pos_y_status)*vdp_plane_width)+text_pos_x_status)*size_word)
cmp.w #ui_init, (ram_current_state)
beq @IsUIStateInit
cmp.w #ui_test_rom, (ram_current_state)
beq @IsUIStateROMTest
cmp.w #ui_test_iram, (ram_current_state)
beq @IsUIStateIRAMTest
cmp.w #ui_test_irom, (ram_current_state)
beq @IsUIStateIROMTest
@IsUIStateInit
lea StringUIActions, a0
bra @DrawTitle
@IsUIStateROMTest
lea StringRunningTestROM, a0
bra @DrawTitle
@IsUIStateIRAMTest
lea StringRunningTestIRAM, a0
bra @DrawTitle
@IsUIStateIROMTest
lea StringRunningTestIROM, a0
bra @DrawTitle
@DrawTitle
jsr DrawTextPlaneANew
; Draw current state of XST and test frames
SetVRAMWrite vram_addr_plane_b+((((text_pos_y_test_res)*vdp_plane_width)+text_pos_x_test_res)*size_word)
move.w dramTestResult, d4
jsr DrawNumberTextPlaneA
SetVRAMWrite vram_addr_plane_b+((((text_pos_y_test_acc)*vdp_plane_width)+text_pos_x_test_acc)*size_word)
move.w dramTestResultAcc, d4
jsr DrawNumberTextPlaneA
SetVRAMWrite vram_addr_plane_b+((((text_pos_y_frames)*vdp_plane_width)+text_pos_x_frames)*size_word)
move.w (ram_test_frames), d4
jsr DrawNumberTextPlaneA
cmp.w #ui_init, (ram_current_state)
bne @HandleTestState ; if we're in the middle of a test, we don't allow pad presses
@UI_Handle_Pad
jsr IsSVPDone
cmp.w #0x1010, d4
bne @EndLoopVBlank ; make sure the tests are ready to go before testing anything
SetVRAMWrite vram_addr_plane_b+((((text_pos_y_pad)*vdp_plane_width)+text_pos_x_pad)*size_word)
move.w d0, d4
jsr DrawNumberTextPlaneA
; Read pad:
jsr PAD_ReadPadA
move.w (pad_press), d1
cmp.w d1, d0
bne @HandleButtonPressChange
rte
@HandleButtonPressChange
move.w d0, (pad_press)
btst #pad_button_a, d0
bne @RunTestROM
btst #pad_button_b, d0
bne @RunTestIRAM
btst #pad_button_c, d0
bne @RunTestIROM
rte
@RunTestROM
move.w #0x0000, (ram_test_acc)
move.w #ui_test_rom, (ram_current_state)
move.w #0x0100, regXST
bra @EndLoopVBlank
@RunTestIRAM
move.w #0x0000, (ram_test_acc)
move.w #ui_test_iram, (ram_current_state)
move.w #0x0200, regXST
bra @EndLoopVBlank
@RunTestIROM
move.w #0x0000, (ram_test_acc)
move.w #ui_test_irom, (ram_current_state)
move.w #0x0300, regXST
bra @EndLoopVBlank
rte
@HandleTestState
add.w #0x0001, (ram_test_frames)
cmp.w #0xF000, (dramTestResult) ; Using a simple offset beyond FF00, may require change
bgt @Update_Acc_TestFrames
bra @Check_TestFrames
@Update_Acc_TestFrames
add.w #0x0001, (ram_test_acc)
@Check_TestFrames
cmp.w #test_max_frames, (ram_test_frames)
bge @EndCurrentTest
rte
@EndCurrentTest
move.w #0xFFFF, regXST ; After running each test, the SVP will stop if MD side has written anything to XST
move.w #0x0000, (ram_test_frames)
move.w #ui_init, (ram_current_state)
rte
@EndLoopVBlank
rte
; Horizontal interrupt - run once per N scanlines (N = specified in VDP register 0xA)
INT_HInterrupt:
rte
; NULL interrupt - for interrupts we don't care about
INT_Null:
rte
; Exception interrupt - called if an error has occured
CPU_Exception:
; Print "EXC" and try to go back:
SetVRAMWrite vram_addr_plane_b+((((text_pos_y_exc)*vdp_plane_width)+text_pos_x_exc)*size_word)
lea StringException, a0 ; address for string
jsr DrawTextPlaneANew
rte
;******************************
; Strings and Text coordinates
;******************************
StringTitle:
dc.b "SVP SPEED TEST",0
StringUIActions:
dc.b "A:ROM B:IRAM C:IROM",0
StringRunningTestROM:
dc.b "RUNNING ROM TEST ",0
StringRunningTestIRAM:
dc.b "RUNNING IRAM TEST ",0
StringRunningTestIROM:
dc.b "RUNNING IROM TEST ",0
StringException:
dc.b "EXC", 0
; Text draw position (in tiles)
text_pos_y_title equ 0x01
text_pos_x_title equ 0x0A
text_pos_y_status equ 0x03
text_pos_x_status equ 0x02
text_pos_y_frames equ 0x18
text_pos_x_frames equ 0x02
text_pos_y_test_res equ 0x19
text_pos_x_test_res equ 0x02
text_pos_y_test_acc equ 0x19
text_pos_x_test_acc equ 0x07
text_pos_y_pad equ 0x1A
text_pos_x_pad equ 0x02
text_pos_y_exc equ 0x00
text_pos_x_exc equ 0x00
; UI status
ui_init equ 0x0000
ui_test_rom equ 0x0001
ui_test_iram equ 0x0002
ui_test_irom equ 0x0003
; Test constants
test_max_frames equ 0x00FA ; 5 seconds in PAL MD (250 frames)
; A label defining the end of ROM so we can compute the total size.
ROM_End:
| 30.566766 | 115 | 0.652461 |
72170b85986f253856dc5eea2fb46019269beb7c | 7,256 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2.log_21829_560.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2.log_21829_560.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2.log_21829_560.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r14
push %rbp
push %rbx
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_D_ht+0x6c0c, %rbp
xor $54739, %rcx
movb (%rbp), %bl
nop
xor $40129, %rdx
lea addresses_WT_ht+0x29dc, %rcx
nop
and %r10, %r10
movb (%rcx), %r14b
xor $43950, %rsi
lea addresses_UC_ht+0x897c, %rcx
nop
nop
sub %rbx, %rbx
mov (%rcx), %ebp
nop
dec %rbp
lea addresses_D_ht+0x1938c, %r14
nop
nop
nop
nop
sub %rbx, %rbx
movw $0x6162, (%r14)
nop
nop
nop
nop
cmp %rbx, %rbx
lea addresses_WT_ht+0x6f40, %rsi
nop
nop
nop
add $3257, %rbx
movups (%rsi), %xmm7
vpextrq $1, %xmm7, %r10
nop
nop
nop
sub $62967, %r14
lea addresses_UC_ht+0x897c, %rsi
nop
nop
xor $27972, %r14
movb $0x61, (%rsi)
sub %rbx, %rbx
lea addresses_WT_ht+0x241d, %rsi
lea addresses_WC_ht+0xb77c, %rdi
nop
nop
nop
nop
add $59951, %rdx
mov $71, %rcx
rep movsl
dec %rcx
lea addresses_WC_ht+0x18bbc, %rbx
cmp %rcx, %rcx
mov (%rbx), %edi
nop
nop
nop
add %r10, %r10
lea addresses_D_ht+0x87fc, %rsi
nop
nop
nop
nop
nop
dec %rcx
mov $0x6162636465666768, %r14
movq %r14, (%rsi)
nop
sub $49908, %rbx
lea addresses_WC_ht+0x977c, %rdx
nop
add %r10, %r10
movb $0x61, (%rdx)
cmp %rsi, %rsi
lea addresses_A_ht+0x10006, %rsi
lea addresses_A_ht+0x1697c, %rdi
nop
add %rbx, %rbx
mov $29, %rcx
rep movsl
nop
nop
inc %r10
lea addresses_normal_ht+0x2fc, %rsi
nop
nop
mfence
mov (%rsi), %r14w
cmp %rdi, %rdi
lea addresses_WT_ht+0x733c, %rsi
nop
nop
nop
add %rbx, %rbx
mov $0x6162636465666768, %rdi
movq %rdi, %xmm5
and $0xffffffffffffffc0, %rsi
vmovaps %ymm5, (%rsi)
nop
nop
nop
nop
nop
xor $64108, %rcx
lea addresses_UC_ht+0x111fc, %rcx
nop
nop
nop
cmp $12508, %rdx
and $0xffffffffffffffc0, %rcx
movntdqa (%rcx), %xmm7
vpextrq $0, %xmm7, %r14
nop
nop
nop
xor %r10, %r10
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %r14
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r15
push %r8
push %r9
push %rax
push %rcx
// Faulty Load
lea addresses_PSE+0xf17c, %rcx
nop
nop
and %r8, %r8
mov (%rcx), %r15w
lea oracles, %r10
and $0xff, %r15
shlq $12, %r15
mov (%r10,%r15,1), %r15
pop %rcx
pop %rax
pop %r9
pop %r8
pop %r15
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_PSE', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_PSE', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}}
<gen_prepare_buffer>
{'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 3, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 3, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'size': 2, 'AVXalign': True, 'NT': True, 'congruent': 4, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 11, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 9, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 4, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 7, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 9, 'same': True}}
{'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 8, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 5, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'size': 32, 'AVXalign': True, 'NT': False, 'congruent': 3, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'size': 16, 'AVXalign': False, 'NT': True, 'congruent': 7, 'same': False}}
{'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
*/
| 37.595855 | 2,999 | 0.654217 |
3f0dad128700c98b2bf200ab06e8a4dbf4bdfeb6 | 8,997 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_21829_625.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_21829_625.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_21829_625.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r13
push %r14
push %r8
push %rax
push %rcx
push %rdi
push %rsi
lea addresses_WC_ht+0x13031, %r8
inc %rcx
vmovups (%r8), %ymm7
vextracti128 $1, %ymm7, %xmm7
vpextrq $1, %xmm7, %r11
nop
xor $21583, %r13
lea addresses_WC_ht+0x18a91, %r14
nop
nop
sub %rsi, %rsi
movups (%r14), %xmm6
vpextrq $1, %xmm6, %rax
xor %r8, %r8
lea addresses_normal_ht+0xe891, %rsi
lea addresses_D_ht+0x55d1, %rdi
nop
and $35638, %r13
mov $24, %rcx
rep movsb
nop
nop
nop
xor %rax, %rax
lea addresses_UC_ht+0x1c3dc, %r11
add $14972, %rax
mov $0x6162636465666768, %rdi
movq %rdi, (%r11)
nop
nop
add $39817, %r14
lea addresses_UC_ht+0x6631, %r14
nop
nop
nop
and %r13, %r13
movl $0x61626364, (%r14)
nop
nop
nop
nop
sub $29393, %rcx
lea addresses_normal_ht+0x11c5, %rsi
lea addresses_normal_ht+0x4491, %rdi
nop
nop
nop
nop
and %r8, %r8
mov $42, %rcx
rep movsw
nop
nop
nop
nop
nop
add %r13, %r13
lea addresses_WT_ht+0x16d91, %rsi
lea addresses_normal_ht+0x15651, %rdi
nop
nop
nop
nop
add %r13, %r13
mov $12, %rcx
rep movsw
nop
nop
nop
add %r8, %r8
lea addresses_WC_ht+0xdc91, %r13
nop
nop
nop
nop
nop
xor %rcx, %rcx
mov $0x6162636465666768, %r11
movq %r11, %xmm7
vmovups %ymm7, (%r13)
add $41001, %r8
lea addresses_WC_ht+0x1b111, %rsi
lea addresses_WC_ht+0xda91, %rdi
and %r14, %r14
mov $102, %rcx
rep movsl
nop
nop
nop
nop
nop
and %r14, %r14
lea addresses_D_ht+0x106a9, %rsi
nop
nop
nop
add %r11, %r11
mov $0x6162636465666768, %r13
movq %r13, %xmm7
vmovups %ymm7, (%rsi)
nop
nop
cmp %r11, %r11
lea addresses_normal_ht+0xb2d1, %r13
nop
nop
nop
nop
nop
add %r8, %r8
vmovups (%r13), %ymm6
vextracti128 $1, %ymm6, %xmm6
vpextrq $0, %xmm6, %rdi
nop
inc %rsi
lea addresses_WC_ht+0xdf11, %rsi
nop
nop
nop
xor $60681, %rdi
mov (%rsi), %r11
nop
nop
nop
nop
and $41884, %rcx
lea addresses_A_ht+0x1bb39, %rcx
cmp %rdi, %rdi
mov (%rcx), %r13d
nop
nop
nop
nop
nop
inc %r14
lea addresses_UC_ht+0x12091, %rsi
lea addresses_WT_ht+0x9771, %rdi
inc %r13
mov $115, %rcx
rep movsq
nop
add %rdi, %rdi
lea addresses_normal_ht+0x1b391, %rax
nop
nop
nop
nop
nop
add %rsi, %rsi
vmovups (%rax), %ymm4
vextracti128 $0, %ymm4, %xmm4
vpextrq $1, %xmm4, %r13
nop
sub %rax, %rax
pop %rsi
pop %rdi
pop %rcx
pop %rax
pop %r8
pop %r14
pop %r13
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r13
push %r15
push %r8
push %r9
push %rbx
push %rcx
push %rdi
push %rsi
// Store
lea addresses_D+0x1e991, %r9
nop
nop
nop
cmp $9727, %r13
movl $0x51525354, (%r9)
nop
nop
nop
cmp $10641, %r8
// REPMOV
lea addresses_PSE+0x14891, %rsi
lea addresses_UC+0x7fd1, %rdi
nop
nop
sub %r8, %r8
mov $28, %rcx
rep movsw
nop
nop
nop
nop
nop
xor %rsi, %rsi
// Store
lea addresses_UC+0x138b1, %r15
nop
nop
nop
nop
cmp %r9, %r9
movl $0x51525354, (%r15)
xor $19426, %r9
// Store
lea addresses_WC+0x1cdf0, %r13
xor %r15, %r15
mov $0x5152535455565758, %r9
movq %r9, %xmm4
movups %xmm4, (%r13)
nop
nop
nop
nop
dec %rsi
// Faulty Load
lea addresses_D+0xe891, %rdi
clflush (%rdi)
nop
xor $20458, %rbx
movb (%rdi), %r9b
lea oracles, %rcx
and $0xff, %r9
shlq $12, %r9
mov (%rcx,%r9,1), %r9
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %r9
pop %r8
pop %r15
pop %r13
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_D', 'congruent': 0}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_D', 'congruent': 7}, 'OP': 'STOR'}
{'dst': {'same': False, 'congruent': 6, 'type': 'addresses_UC'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 10, 'type': 'addresses_PSE'}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_UC', 'congruent': 5}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_WC', 'congruent': 0}, 'OP': 'STOR'}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_D', 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_WC_ht', 'congruent': 4}}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_WC_ht', 'congruent': 7}}
{'dst': {'same': False, 'congruent': 2, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 8, 'type': 'addresses_normal_ht'}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_UC_ht', 'congruent': 0}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_UC_ht', 'congruent': 5}, 'OP': 'STOR'}
{'dst': {'same': False, 'congruent': 9, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 1, 'type': 'addresses_normal_ht'}}
{'dst': {'same': False, 'congruent': 6, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 8, 'type': 'addresses_WT_ht'}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_WC_ht', 'congruent': 10}, 'OP': 'STOR'}
{'dst': {'same': False, 'congruent': 9, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 7, 'type': 'addresses_WC_ht'}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_D_ht', 'congruent': 3}, 'OP': 'STOR'}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_normal_ht', 'congruent': 3}}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_WC_ht', 'congruent': 7}}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_A_ht', 'congruent': 3}}
{'dst': {'same': False, 'congruent': 5, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 5, 'type': 'addresses_UC_ht'}}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_normal_ht', 'congruent': 6}}
{'36': 21829}
36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36
*/
| 31.679577 | 2,999 | 0.656108 |
311340ebcab202f2b7f6f10962c98cdb400217c8 | 1,608 | asm | Assembly | mips1.asm | RustyRipper/AssemblerMips32 | 638009d58354da7c058edb2292b203ca9ad5c6fe | [
"MIT"
] | null | null | null | mips1.asm | RustyRipper/AssemblerMips32 | 638009d58354da7c058edb2292b203ca9ad5c6fe | [
"MIT"
] | null | null | null | mips1.asm | RustyRipper/AssemblerMips32 | 638009d58354da7c058edb2292b203ca9ad5c6fe | [
"MIT"
] | null | null | null | .data
idx_dodawanie: .word 0
idx_odejmowanie: .word 1
idx_mnozenie: .word 2
idx_dzielenie: .word 3
napis1: .asciiz "Podaj pierwsza liczbe\n"
napis2: .asciiz "Podaj operacje\n 0.Dodawanie \n 1.Odejmowanie \n 2.Mnozenie \n 3.Dzielenie\n"
napis3: .asciiz "Podaj druga liczbe\n"
napis4: .asciiz "Wynik to: \n"
napis5: .asciiz "\nJesli chcesz powtorzyc wprowadz 1, jesli nie to cos innego np 0\n"
napis6: .asciiz "\nZly kod operacji\n"
napis7: .asciiz "\nReszta: \n"
.text
main:
lw $t4, idx_dodawanie
lw $t5, idx_odejmowanie
lw $t6, idx_mnozenie
lw $t7, idx_dzielenie
algorytm:
li $v0,4
la $a0, napis1
syscall
li $v0, 5
syscall
move $t0, $v0
operacja:
li $v0,4
la $a0, napis2
syscall
li $v0, 5
syscall
move $t1, $v0
bgt $t1, $t7, komunikat
blt $t1, $t4, komunikat
drugaliczba:
li $v0,4
la $a0, napis3
syscall
li $v0, 5
syscall
move $t2, $v0
beq $t1, $t4, dodawanie
beq $t1, $t5, odejmowanie
beq $t1, $t6, mnozenie
beq $t1, $t7, dzielenie
komunikat:
li $v0,4
la $a0, napis6
syscall
j operacja
dodawanie:
add $t3, $t0, $t2
j skip
odejmowanie:
sub $t3, $t0, $t2
j skip
mnozenie:
mul $t3, $t0, $t2
j skip
dzielenie:
beq $t2, $zero, drugaliczba
div $t3, $t0, $t2
j skip
skip:
li $v0,4
la $a0, napis4
syscall
li $v0, 1
add $a0, $zero, $t3
syscall
bne $t1, $t7,wynik
li $v0,4
la $a0, napis7
syscall
li $v0, 1
mfhi $t3
add $a0, $zero, $t3
syscall
wynik:
li $v0,4
la $a0, napis5
syscall
li $v0, 5
syscall
move $t0, $v0
beq $t5, $t0, algorytm
li $v0, 10
syscall
| 13.4 | 95 | 0.627488 |
be122a93360fd57b3feef6edd88b1b64b910d57a | 688 | asm | Assembly | test2.asm | jbush001/MiteCPU | 6fd120717f02cee8c1d21aae352fb34780a0d85e | [
"Apache-2.0"
] | 12 | 2015-06-27T01:26:33.000Z | 2022-01-23T18:53:16.000Z | test2.asm | ludwigschreier/MiteCPU | 6fd120717f02cee8c1d21aae352fb34780a0d85e | [
"Apache-2.0"
] | null | null | null | test2.asm | ludwigschreier/MiteCPU | 6fd120717f02cee8c1d21aae352fb34780a0d85e | [
"Apache-2.0"
] | 7 | 2016-01-24T19:30:14.000Z | 2022-01-23T18:53:10.000Z | #
# Store values into a memory array
#
res result
res count
res buffer, 8
res ptr
start: ldi 8
st count
ldi buffer
st ptr
loop: ldi 0 # Clear accumulator
add count # Copy count into accumulator
index ptr # Load destination pointer
st 0 # Store count into destination pointer
ldi 1
add ptr
st ptr # Increment pointer
ldi -1
add count # Decrement count
st count # Update count
bl done # Finished? if so, branch out
ldi -1 # Branch unconditionally
bl loop # loop again
done: ldi -1
bl done # Infinite loop
| 20.235294 | 58 | 0.550872 |
78447392f66927686a9d7716e968b709b2c7e736 | 241 | asm | Assembly | modules/showResult.asm | antuniooh/assembly-calculator | 5e364c5cfdb0aa90958dc168e546c305cda1ee5a | [
"MIT"
] | 2 | 2021-05-08T20:51:42.000Z | 2021-05-08T20:52:06.000Z | modules/showResult.asm | antuniooh/assembly-calculator | 5e364c5cfdb0aa90958dc168e546c305cda1ee5a | [
"MIT"
] | null | null | null | modules/showResult.asm | antuniooh/assembly-calculator | 5e364c5cfdb0aa90958dc168e546c305cda1ee5a | [
"MIT"
] | 2 | 2020-12-14T00:09:01.000Z | 2021-03-25T14:07:08.000Z | SHOW_RESULT:
MOV A, 70h
ACALL posicionaCursor
mov A, #'='
ACALL sendCharacter
MOV A, R3
MOV B, #10
DIV AB
ADD A, #30h
ACALL sendCharacter
MOV A,B
ADD A, #30h
ACALL sendCharacter
ACALL delay
;exibe a resposta do R3 no lcd
RET
| 13.388889 | 31 | 0.697095 |
08e4d8a357020a8dcbe87c58d4bb61302f60efc9 | 884 | nasm | Assembly | assembler_nasm/interactive.nasm | matija94/show-me-the-code | 7e98b15da03712e28417f2c808c4324989ce9bd7 | [
"MIT"
] | 1 | 2017-07-10T21:05:46.000Z | 2017-07-10T21:05:46.000Z | assembler_nasm/interactive.nasm | matija94/show-me-the-code | 7e98b15da03712e28417f2c808c4324989ce9bd7 | [
"MIT"
] | null | null | null | assembler_nasm/interactive.nasm | matija94/show-me-the-code | 7e98b15da03712e28417f2c808c4324989ce9bd7 | [
"MIT"
] | null | null | null | section .data ;data segment
userMsg db 'Please enter a number: '
lenUserMsg equ $-userMsg
dispMsg db 'You have entered: '
lenDispMsg equ $-dispMsg
section .bss ; unitialized data segment
num resb 5
section .text ; code segment
global _start
_start:
; prompt user
mov eax,4 ;(sys_write)
mov ebx,1 ;(file descriptor - stdout)
mov ecx,userMsg ;( store usermsg )
mov edx,lenUserMsg ; (store len usermsg)
int 80h ;(kernel interrupt)
;read and store the user input
mov eax,3 ;(sys_read)
mov ebx,2 ; (file descriptor - stdin)
mov ecx,num
mov edx,5 ; 5 bytes(numeric, 1 for sign) of that information
int 80h
;output the message
mov eax,4 ;(sys_write)
mov ebx,1 ;(stdout)
mov ecx,dispMsg ;(store disp msg)
mov edx,lenDispMsg
int 80h
;ouput the number entered
mov eax,4
mov ebx,1
mov ecx,num
mov edx, 5
int 80h
;exit code
mov eax, 1
mov ebx, 0
int 80h
| 19.644444 | 61 | 0.705882 |
c0aedf6e08023a798c687a65a9e0652117346744 | 1,711 | asm | Assembly | asm/bitcount.asm | GabrielRavier/Generic-Assembly-Samples | fbf803960a14307b7fce0165058d0d4048abaf42 | [
"Unlicense"
] | null | null | null | asm/bitcount.asm | GabrielRavier/Generic-Assembly-Samples | fbf803960a14307b7fce0165058d0d4048abaf42 | [
"Unlicense"
] | null | null | null | asm/bitcount.asm | GabrielRavier/Generic-Assembly-Samples | fbf803960a14307b7fce0165058d0d4048abaf42 | [
"Unlicense"
] | null | null | null | global @ASM_bitcount@4
extern _getInstructionSet
segment .data align=16
actualASM_bitcountPtr dd actualASM_bitcountGetPtr
segment .text align=16
%define result eax
%define number ecx
%define temp edx
actualASM_bitcountNoPopcnt:
mov result, number
mov temp, result
shr result, 1 ; Shift depending on the current "fence width" (increases)
and result, 0x55555555 ; The magic numbers are bitmasks with an ever-widening "fence" of 1 and 0s
and temp, 0x55555555 ; We end up with odd bits in result and even bits in number
add result, temp
; Unrolled loop so it's quicker (and boring)
mov temp, result
shr result, 2
and result, 0x33333333
and temp, 0x33333333
add result, temp
mov temp, result
shr result, 4
add result, temp
and result, 0x0F0F0F0F
mov temp, result
shr result, 8
add result, temp
mov temp, result
shr result, 16 ; Last bitmask is 0x0000FFFF so that works too (and it's quicker)
add result, temp
and result, 0x03F ; We apply the second-to-last bitmask here (it's quicker)
ret
align 16
actualASM_bitcountPopcnt:
popcnt result, number
ret
align 16
%define popcntSupported 9
@ASM_bitcount@4:
jmp dword [actualASM_bitcountPtr]
align 16
actualASM_bitcountGetPtr:
sub esp, 28
mov dword [esp + 12], number
call _getInstructionSet
cmp eax, popcntSupported
mov eax, actualASM_bitcountNoPopcnt
mov edx, actualASM_bitcountPopcnt
cmovge eax, edx
mov dword [actualASM_bitcountPtr], eax
mov number, dword [esp + 12]
add esp, 28
jmp eax
| 21.658228 | 105 | 0.663355 |
5f7cd6f7240e31e448dbe4959b46036afd5bb5af | 952 | asm | Assembly | wof/lcs/123p/10.asm | zengfr/arcade_game_romhacking_sourcecode_top_secret_data | a4a0c86c200241494b3f1834cd0aef8dc02f7683 | [
"Apache-2.0"
] | 6 | 2020-10-14T15:29:10.000Z | 2022-02-12T18:58:54.000Z | wof/lcs/123p/10.asm | zengfr/arcade_game_romhacking_sourcecode_top_secret_data | a4a0c86c200241494b3f1834cd0aef8dc02f7683 | [
"Apache-2.0"
] | null | null | null | wof/lcs/123p/10.asm | zengfr/arcade_game_romhacking_sourcecode_top_secret_data | a4a0c86c200241494b3f1834cd0aef8dc02f7683 | [
"Apache-2.0"
] | 1 | 2020-12-17T08:59:10.000Z | 2020-12-17T08:59:10.000Z | copyright zengfr site:http://github.com/zengfr/romhack
0018EC add.w ($10,A1), D0 [123p+ C, enemy+ C]
0018F0 cmp.w D4, D0
007A10 add.w ($10,A0), D1
007A14 add.w (A3)+, D1
007A2C add.w ($10,A1), D1 [123p+ C, enemy+ C]
007A30 add.w (A3)+, D1
007A36 move.w D1, ($c,A0)
0084B2 add.w ($10,A0), D2 [123p+ C, enemy+ C]
0084B6 rts
008706 add.w ($10,A1), D0 [123p+ C, enemy+ C]
00870A movea.w D0, A4
008EB0 add.w ($10,A1), D0 [123p+ C]
008EB4 movea.w D0, A4
008EF8 cmp.w ($10,A1), D0
008EFC bne $8f0a
008F9A add.w ($10,A1), D6
008F9E sub.w D2, D6
00949C add.w ($10,A1), D0 [123p+ C]
0094A0 movea.w D0, A4
017B2A beq $17b3c
01A74C dbra D7, $1a74a
01A75E dbra D4, $1a75c
01AAE0 beq $1aaee
0214B6 bne $214f0
05E5FE add.w ($10,A0), D4 [123p+ C, enemy+ C]
05E602 sub.w (-$7cc4,A5), D4 [123p+ 10, enemy+10]
copyright zengfr site:http://github.com/zengfr/romhack
| 30.709677 | 54 | 0.592437 |
589d9850370e1585c899ad96e5a341ccbc24dbb2 | 312 | asm | Assembly | data/mapHeaders/safarizoneresthouse2.asm | adhi-thirumala/EvoYellow | 6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c | [
"Unlicense"
] | 16 | 2018-08-28T21:47:01.000Z | 2022-02-20T20:29:59.000Z | data/mapHeaders/safarizoneresthouse2.asm | adhi-thirumala/EvoYellow | 6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c | [
"Unlicense"
] | 5 | 2019-04-03T19:53:11.000Z | 2022-03-11T22:49:34.000Z | data/mapHeaders/safarizoneresthouse2.asm | adhi-thirumala/EvoYellow | 6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c | [
"Unlicense"
] | 2 | 2019-12-09T19:46:02.000Z | 2020-12-05T21:36:30.000Z | SafariZoneRestHouse2_h:
db GATE ; tileset
db SAFARI_ZONE_REST_HOUSE_2_HEIGHT, SAFARI_ZONE_REST_HOUSE_2_WIDTH ; dimensions (y, x)
dw SafariZoneRestHouse2Blocks, SafariZoneRestHouse2TextPointers, SafariZoneRestHouse2Script ; blocks, texts, scripts
db $00 ; connections
dw SafariZoneRestHouse2Object ; objects
| 44.571429 | 117 | 0.846154 |
96c1a2ede303b7a05276409764051ad2c30d43b3 | 487 | asm | Assembly | play68-pwm.asm | robin7g/swtpc-sound-card | 327e32f2154eb6d307f036fc5a13d03eaecd380c | [
"MIT"
] | 2 | 2020-12-31T01:21:40.000Z | 2021-07-07T00:26:56.000Z | play68-pwm.asm | robin7g/swtpc-sound-card | 327e32f2154eb6d307f036fc5a13d03eaecd380c | [
"MIT"
] | null | null | null | play68-pwm.asm | robin7g/swtpc-sound-card | 327e32f2154eb6d307f036fc5a13d03eaecd380c | [
"MIT"
] | null | null | null | ; PLAY68 PWM output
; by Robin Grosset
code
org $1EE0
ldab #$E8 ; amplitude
ldx #$0FFF ; duration
pwm ldaa #$AA ; frequency
pulse deca ; pulse delay
inca ; waste time pt1
deca ; waste time pt2
bne pulse
stab $8010 ; output to sound card
comb ; completement value in b (invert)
dex ; decrement duration counter
bra pwm
end | 30.4375 | 55 | 0.488706 |
c564174f9caa49f1f03d499fbd10ba8fea9d832c | 131,897 | asm | Assembly | assets/irhydra/code.asm | brycebaril/perf_goto_chicago | 5bd2ecbdf683814c0ad14f122fc6c42ac2985bd8 | [
"MIT"
] | 1 | 2022-03-27T00:13:25.000Z | 2022-03-27T00:13:25.000Z | assets/irhydra/code.asm | brycebaril/perf_goto_chicago | 5bd2ecbdf683814c0ad14f122fc6c42ac2985bd8 | [
"MIT"
] | null | null | null | assets/irhydra/code.asm | brycebaril/perf_goto_chicago | 5bd2ecbdf683814c0ad14f122fc6c42ac2985bd8 | [
"MIT"
] | null | null | null | --- FUNCTION SOURCE (SetFunctionName) id{0,0} ---
(g,h,i){
if((typeof(h)==='symbol')){
h="["+%SymbolDescription(h)+"]";
}
if((i===(void 0))){
%FunctionSetName(g,h);
}else{
%FunctionSetName(g,i+" "+h);
}
}
--- END ---
--- FUNCTION SOURCE (ToName) id{1,0} ---
(i){
return(typeof(i)==='symbol')?i:ToString(i);
}
--- END ---
--- FUNCTION SOURCE (join) id{2,0} ---
(C){
if((this==null)&&!(%_IsUndetectableObject(this)))throw MakeTypeError(14,"Array.prototype.join");
var o=((%_IsSpecObject(%IS_VAR(this)))?this:$toObject(this));
var v=(o.length>>>0);
return InnerArrayJoin(C,o,v);
}
--- END ---
--- FUNCTION SOURCE (DoRegExpExec) id{3,0} ---
(j,k,l){
var m=%_RegExpExec(j,k,l,e);
if(m!==null)$regexpLastMatchInfoOverride=null;
return m;
}
--- END ---
--- FUNCTION SOURCE (PropertyDescriptor_HasValue) id{4,0} ---
(){
return this.hasValue_;
}
--- END ---
--- FUNCTION SOURCE (posix._makeLong) id{5,0} ---
(path) {
return path;
}
--- END ---
--- FUNCTION SOURCE (PropertyDescriptor_HasGetter) id{6,0} ---
(){
return this.hasGetter_;
}
--- END ---
--- FUNCTION SOURCE (IsAccessorDescriptor) id{7,0} ---
(G){
if((G===(void 0)))return false;
return G.hasGetter()||G.hasSetter();
}
--- END ---
--- FUNCTION SOURCE (IsDataDescriptor) id{8,0} ---
(G){
if((G===(void 0)))return false;
return G.hasValue()||G.hasWritable();
}
--- END ---
--- FUNCTION SOURCE (PropertyDescriptor_HasEnumerable) id{9,0} ---
(){
return this.hasEnumerable_;
}
--- END ---
--- FUNCTION SOURCE (PropertyDescriptor_HasConfigurable) id{10,0} ---
(){
return this.hasConfigurable_;
}
--- END ---
--- FUNCTION SOURCE (PropertyDescriptor_HasSetter) id{11,0} ---
(){
return this.hasSetter_;
}
--- END ---
--- FUNCTION SOURCE (GifReaderLZWOutputIndexStream) id{12,0} ---
(code_stream, p, output, output_length) {
var min_code_size = code_stream[p++];
var clear_code = 1 << min_code_size;
var eoi_code = clear_code + 1;
var next_code = eoi_code + 1;
var cur_code_size = min_code_size + 1; // Number of bits per code.
// NOTE: This shares the same name as the encoder, but has a different
// meaning here. Here this masks each code coming from the code stream.
var code_mask = (1 << cur_code_size) - 1;
var cur_shift = 0;
var cur = 0;
var op = 0; // Output pointer.
var subblock_size = code_stream[p++];
// TODO(deanm): Would using a TypedArray be any faster? At least it would
// solve the fast mode / backing store uncertainty.
// var code_table = Array(4096);
var code_table = new Int32Array(4096); // Can be signed, we only use 20 bits.
var prev_code = null; // Track code-1.
while (true) {
// Read up to two bytes, making sure we always 12-bits for max sized code.
while (cur_shift < 16) {
if (subblock_size === 0) break; // No more data to be read.
cur |= code_stream[p++] << cur_shift;
cur_shift += 8;
if (subblock_size === 1) { // Never let it get to 0 to hold logic above.
subblock_size = code_stream[p++]; // Next subblock.
} else {
--subblock_size;
}
}
// TODO(deanm): We should never really get here, we should have received
// and EOI.
if (cur_shift < cur_code_size)
break;
var code = cur & code_mask;
cur >>= cur_code_size;
cur_shift -= cur_code_size;
// TODO(deanm): Maybe should check that the first code was a clear code,
// at least this is what you're supposed to do. But actually our encoder
// now doesn't emit a clear code first anyway.
if (code === clear_code) {
// We don't actually have to clear the table. This could be a good idea
// for greater error checking, but we don't really do any anyway. We
// will just track it with next_code and overwrite old entries.
next_code = eoi_code + 1;
cur_code_size = min_code_size + 1;
code_mask = (1 << cur_code_size) - 1;
// Don't update prev_code ?
prev_code = null;
continue;
} else if (code === eoi_code) {
break;
}
// We have a similar situation as the decoder, where we want to store
// variable length entries (code table entries), but we want to do in a
// faster manner than an array of arrays. The code below stores sort of a
// linked list within the code table, and then "chases" through it to
// construct the dictionary entries. When a new entry is created, just the
// last byte is stored, and the rest (prefix) of the entry is only
// referenced by its table entry. Then the code chases through the
// prefixes until it reaches a single byte code. We have to chase twice,
// first to compute the length, and then to actually copy the data to the
// output (backwards, since we know the length). The alternative would be
// storing something in an intermediate stack, but that doesn't make any
// more sense. I implemented an approach where it also stored the length
// in the code table, although it's a bit tricky because you run out of
// bits (12 + 12 + 8), but I didn't measure much improvements (the table
// entries are generally not the long). Even when I created benchmarks for
// very long table entries the complexity did not seem worth it.
// The code table stores the prefix entry in 12 bits and then the suffix
// byte in 8 bits, so each entry is 20 bits.
var chase_code = code < next_code ? code : prev_code;
// Chase what we will output, either {CODE} or {CODE-1}.
var chase_length = 0;
var chase = chase_code;
while (chase > clear_code) {
chase = code_table[chase] >> 8;
++chase_length;
}
var k = chase;
var op_end = op + chase_length + (chase_code !== code ? 1 : 0);
if (op_end > output_length) {
console.log("Warning, gif stream longer than expected.");
return;
}
// Already have the first byte from the chase, might as well write it fast.
output[op++] = k;
op += chase_length;
var b = op; // Track pointer, writing backwards.
if (chase_code !== code) // The case of emitting {CODE-1} + k.
output[op++] = k;
chase = chase_code;
while (chase_length--) {
chase = code_table[chase];
output[--b] = chase & 0xff; // Write backwards.
chase >>= 8; // Pull down to the prefix code.
}
if (prev_code !== null && next_code < 4096) {
code_table[next_code++] = prev_code << 8 | k;
// TODO(deanm): Figure out this clearing vs code growth logic better. I
// have an feeling that it should just happen somewhere else, for now it
// is awkward between when we grow past the max and then hit a clear code.
// For now just check if we hit the max 12-bits (then a clear code should
// follow, also of course encoded in 12-bits).
if (next_code >= code_mask+1 && cur_code_size < 12) {
++cur_code_size;
code_mask = code_mask << 1 | 1;
}
}
prev_code = code;
}
if (op !== output_length) {
console.log("Warning, gif stream shorter than expected.");
}
return output;
}
--- END ---
[deoptimizing (DEOPT soft): begin 0x7bbfe0a7e29 <JS Function GifReaderLZWOutputIndexStream (SharedFunctionInfo 0x2ac9639f3819)> (opt #12) @53, FP to SP delta: 512]
;;; deoptimize at 0_5213: Insufficient type feedback for combined type of binary operation
reading input frame GifReaderLZWOutputIndexStream => node=5, args=290, height=20; inputs:
0: 0x7bbfe0a7e29 ; (frame function) 0x7bbfe0a7e29 <JS Function GifReaderLZWOutputIndexStream (SharedFunctionInfo 0x2ac9639f3819)>
1: 0x36cdc0e04131 ; [fp - 288] 0x36cdc0e04131 <undefined>
2: 0x7bbfe006401 ; [fp - 280] 0x7bbfe006401 <an Uint8Array with map 0x3d4eb9d1d389>
3: 91597 ; (int) [fp - 440]
4: 0x7bbfe0bbaf1 ; [fp - 264] 0x7bbfe0bbaf1 <an Uint8Array with map 0x3d4eb9d1d331>
5: 0x57e4000000000 ; [fp - 256] 360000
6: 0x7bbfe0a7cb9 ; [fp - 248] 0x7bbfe0a7cb9 <FixedArray[6]>
7: 0x36cdc0e04131 ; (literal 1) 0x36cdc0e04131 <undefined>
8: 0x36cdc0e04131 ; (literal 1) 0x36cdc0e04131 <undefined>
9: 0x36cdc0e04131 ; (literal 1) 0x36cdc0e04131 <undefined>
10: 0x36cdc0e04131 ; (literal 1) 0x36cdc0e04131 <undefined>
11: 0x36cdc0e04131 ; (literal 1) 0x36cdc0e04131 <undefined>
12: 0x36cdc0e04131 ; (literal 1) 0x36cdc0e04131 <undefined>
13: 0x36cdc0e04131 ; (literal 1) 0x36cdc0e04131 <undefined>
14: 0x36cdc0e04131 ; (literal 1) 0x36cdc0e04131 <undefined>
15: 0x57e4000000000 ; [fp - 408] 360000
16: 0x36cdc0e04131 ; (literal 1) 0x36cdc0e04131 <undefined>
17: 0x36cdc0e04131 ; (literal 1) 0x36cdc0e04131 <undefined>
18: 0x36cdc0e04131 ; (literal 1) 0x36cdc0e04131 <undefined>
19: 0x36cdc0e04131 ; (literal 1) 0x36cdc0e04131 <undefined>
20: 0x36cdc0e04131 ; (literal 1) 0x36cdc0e04131 <undefined>
21: 0x36cdc0e04131 ; (literal 1) 0x36cdc0e04131 <undefined>
22: 0x36cdc0e04131 ; (literal 1) 0x36cdc0e04131 <undefined>
23: 0x36cdc0e04131 ; (literal 1) 0x36cdc0e04131 <undefined>
24: 0x36cdc0e04131 ; (literal 1) 0x36cdc0e04131 <undefined>
25: 0x36cdc0e04131 ; (literal 1) 0x36cdc0e04131 <undefined>
translating frame GifReaderLZWOutputIndexStream => node=290, height=152
0x7ffc654cd668: [top + 216] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #1)
0x7ffc654cd660: [top + 208] <- 0x7bbfe006401 ; 0x7bbfe006401 <an Uint8Array with map 0x3d4eb9d1d389> (input #2)
0x7ffc654cd658: [top + 200] <- 0x165cd00000000 ; 91597 (input #3)
0x7ffc654cd650: [top + 192] <- 0x7bbfe0bbaf1 ; 0x7bbfe0bbaf1 <an Uint8Array with map 0x3d4eb9d1d331> (input #4)
0x7ffc654cd648: [top + 184] <- 0x57e4000000000 ; 360000 (input #5)
0x7ffc654cd640: [top + 176] <- 0x376e6fee7ace ; caller's pc
0x7ffc654cd638: [top + 168] <- 0x7ffc654cd720 ; caller's fp
0x7ffc654cd630: [top + 160] <- 0x7bbfe0a7cb9 ; context 0x7bbfe0a7cb9 <FixedArray[6]> (input #6)
0x7ffc654cd628: [top + 152] <- 0x7bbfe0a7e29 ; function 0x7bbfe0a7e29 <JS Function GifReaderLZWOutputIndexStream (SharedFunctionInfo 0x2ac9639f3819)> (input #0)
0x7ffc654cd620: [top + 144] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #7)
0x7ffc654cd618: [top + 136] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #8)
0x7ffc654cd610: [top + 128] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #9)
0x7ffc654cd608: [top + 120] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #10)
0x7ffc654cd600: [top + 112] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #11)
0x7ffc654cd5f8: [top + 104] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #12)
0x7ffc654cd5f0: [top + 96] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #13)
0x7ffc654cd5e8: [top + 88] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #14)
0x7ffc654cd5e0: [top + 80] <- 0x57e4000000000 ; 360000 (input #15)
0x7ffc654cd5d8: [top + 72] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #16)
0x7ffc654cd5d0: [top + 64] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #17)
0x7ffc654cd5c8: [top + 56] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #18)
0x7ffc654cd5c0: [top + 48] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #19)
0x7ffc654cd5b8: [top + 40] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #20)
0x7ffc654cd5b0: [top + 32] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #21)
0x7ffc654cd5a8: [top + 24] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #22)
0x7ffc654cd5a0: [top + 16] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #23)
0x7ffc654cd598: [top + 8] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #24)
0x7ffc654cd590: [top + 0] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #25)
[deoptimizing (soft): end 0x7bbfe0a7e29 <JS Function GifReaderLZWOutputIndexStream (SharedFunctionInfo 0x2ac9639f3819)> @53 => node=290, pc=0x376e6fee94b2, state=NO_REGISTERS, alignment=no padding, took 0.072 ms]
--- FUNCTION SOURCE (GifReader.decodeAndBlitFrameRGBA) id{13,0} ---
(frame_num, pixels) {
var frame = this.frameInfo(frame_num);
var num_pixels = frame.width * frame.height;
var index_stream = new Uint8Array(num_pixels); // At most 8-bit indices.
GifReaderLZWOutputIndexStream(
buf, frame.data_offset, index_stream, num_pixels);
var palette_offset = frame.palette_offset;
// NOTE(deanm): It seems to be much faster to compare index to 256 than
// to === null. Not sure why, but CompareStub_EQ_STRICT shows up high in
// the profile, not sure if it's related to using a Uint8Array.
var trans = frame.transparent_index;
if (trans === null) trans = 256;
// We are possibly just blitting to a portion of the entire frame.
// That is a subrect within the framerect, so the additional pixels
// must be skipped over after we finished a scanline.
var framewidth = frame.width;
var framestride = width - framewidth;
var xleft = framewidth; // Number of subrect pixels left in scanline.
// Output indicies of the top left and bottom right corners of the subrect.
var opbeg = ((frame.y * width) + frame.x) * 4;
var opend = ((frame.y + frame.height) * width + frame.x) * 4;
var op = opbeg;
var scanstride = framestride * 4;
// Use scanstride to skip past the rows when interlacing. This is skipping
// 7 rows for the first two passes, then 3 then 1.
if (frame.interlaced === true) {
scanstride += width * 4 * 7; // Pass 1.
}
var interlaceskip = 8; // Tracking the row interval in the current pass.
for (var i = 0, il = index_stream.length; i < il; ++i) {
var index = index_stream[i];
if (xleft === 0) { // Beginning of new scan line
op += scanstride;
xleft = framewidth;
if (op >= opend) { // Catch the wrap to switch passes when interlacing.
scanstride = framestride * 4 + width * 4 * (interlaceskip-1);
// interlaceskip / 2 * 4 is interlaceskip << 1.
op = opbeg + (framewidth + framestride) * (interlaceskip << 1);
interlaceskip >>= 1;
}
}
if (index === trans) {
op += 4;
} else {
var r = buf[palette_offset + index * 3];
var g = buf[palette_offset + index * 3 + 1];
var b = buf[palette_offset + index * 3 + 2];
pixels[op++] = r;
pixels[op++] = g;
pixels[op++] = b;
pixels[op++] = 255;
}
--xleft;
}
}
--- END ---
--- FUNCTION SOURCE (GifReaderLZWOutputIndexStream) id{14,0} ---
(code_stream, p, output, output_length) {
var min_code_size = code_stream[p++];
var clear_code = 1 << min_code_size;
var eoi_code = clear_code + 1;
var next_code = eoi_code + 1;
var cur_code_size = min_code_size + 1; // Number of bits per code.
// NOTE: This shares the same name as the encoder, but has a different
// meaning here. Here this masks each code coming from the code stream.
var code_mask = (1 << cur_code_size) - 1;
var cur_shift = 0;
var cur = 0;
var op = 0; // Output pointer.
var subblock_size = code_stream[p++];
// TODO(deanm): Would using a TypedArray be any faster? At least it would
// solve the fast mode / backing store uncertainty.
// var code_table = Array(4096);
var code_table = new Int32Array(4096); // Can be signed, we only use 20 bits.
var prev_code = null; // Track code-1.
while (true) {
// Read up to two bytes, making sure we always 12-bits for max sized code.
while (cur_shift < 16) {
if (subblock_size === 0) break; // No more data to be read.
cur |= code_stream[p++] << cur_shift;
cur_shift += 8;
if (subblock_size === 1) { // Never let it get to 0 to hold logic above.
subblock_size = code_stream[p++]; // Next subblock.
} else {
--subblock_size;
}
}
// TODO(deanm): We should never really get here, we should have received
// and EOI.
if (cur_shift < cur_code_size)
break;
var code = cur & code_mask;
cur >>= cur_code_size;
cur_shift -= cur_code_size;
// TODO(deanm): Maybe should check that the first code was a clear code,
// at least this is what you're supposed to do. But actually our encoder
// now doesn't emit a clear code first anyway.
if (code === clear_code) {
// We don't actually have to clear the table. This could be a good idea
// for greater error checking, but we don't really do any anyway. We
// will just track it with next_code and overwrite old entries.
next_code = eoi_code + 1;
cur_code_size = min_code_size + 1;
code_mask = (1 << cur_code_size) - 1;
// Don't update prev_code ?
prev_code = null;
continue;
} else if (code === eoi_code) {
break;
}
// We have a similar situation as the decoder, where we want to store
// variable length entries (code table entries), but we want to do in a
// faster manner than an array of arrays. The code below stores sort of a
// linked list within the code table, and then "chases" through it to
// construct the dictionary entries. When a new entry is created, just the
// last byte is stored, and the rest (prefix) of the entry is only
// referenced by its table entry. Then the code chases through the
// prefixes until it reaches a single byte code. We have to chase twice,
// first to compute the length, and then to actually copy the data to the
// output (backwards, since we know the length). The alternative would be
// storing something in an intermediate stack, but that doesn't make any
// more sense. I implemented an approach where it also stored the length
// in the code table, although it's a bit tricky because you run out of
// bits (12 + 12 + 8), but I didn't measure much improvements (the table
// entries are generally not the long). Even when I created benchmarks for
// very long table entries the complexity did not seem worth it.
// The code table stores the prefix entry in 12 bits and then the suffix
// byte in 8 bits, so each entry is 20 bits.
var chase_code = code < next_code ? code : prev_code;
// Chase what we will output, either {CODE} or {CODE-1}.
var chase_length = 0;
var chase = chase_code;
while (chase > clear_code) {
chase = code_table[chase] >> 8;
++chase_length;
}
var k = chase;
var op_end = op + chase_length + (chase_code !== code ? 1 : 0);
if (op_end > output_length) {
console.log("Warning, gif stream longer than expected.");
return;
}
// Already have the first byte from the chase, might as well write it fast.
output[op++] = k;
op += chase_length;
var b = op; // Track pointer, writing backwards.
if (chase_code !== code) // The case of emitting {CODE-1} + k.
output[op++] = k;
chase = chase_code;
while (chase_length--) {
chase = code_table[chase];
output[--b] = chase & 0xff; // Write backwards.
chase >>= 8; // Pull down to the prefix code.
}
if (prev_code !== null && next_code < 4096) {
code_table[next_code++] = prev_code << 8 | k;
// TODO(deanm): Figure out this clearing vs code growth logic better. I
// have an feeling that it should just happen somewhere else, for now it
// is awkward between when we grow past the max and then hit a clear code.
// For now just check if we hit the max 12-bits (then a clear code should
// follow, also of course encoded in 12-bits).
if (next_code >= code_mask+1 && cur_code_size < 12) {
++cur_code_size;
code_mask = code_mask << 1 | 1;
}
}
prev_code = code;
}
if (op !== output_length) {
console.log("Warning, gif stream shorter than expected.");
}
return output;
}
--- END ---
--- FUNCTION SOURCE (ArrayBuffer) id{15,0} ---
(i){
if(%_IsConstructCall()){
var j=$toPositiveInteger(i,125);
%ArrayBufferInitialize(this,j,false);
}else{
throw MakeTypeError(20,"ArrayBuffer");
}
}
--- END ---
--- FUNCTION SOURCE (slice) id{16,0} ---
(start, end) {
const buffer = this.subarray(start, end);
Object.setPrototypeOf(buffer, Buffer.prototype);
return buffer;
}
--- END ---
--- FUNCTION SOURCE () id{17,0} ---
(a, b) {
return (a[0] + a[1] + a[2] + a[3]) - (b[0] + b[1] + b[2] + b[3])
}
--- END ---
--- FUNCTION SOURCE (subarray) id{18,0} ---
(R,S){
if(!(%_ClassOf(this)==='Uint8Array')){
throw MakeTypeError(33,"Uint8Array.subarray",this);
}
var T=(%_IsSmi(%IS_VAR(R))?R:%NumberToInteger($toNumber(R)));
if(!(S===(void 0))){
S=(%_IsSmi(%IS_VAR(S))?S:%NumberToInteger($toNumber(S)));
}
var U=%_TypedArrayGetLength(this);
if(T<0){
T=q(0,U+T);
}else{
T=r(U,T);
}
var V=(S===(void 0))?U:S;
if(V<0){
V=q(0,U+V);
}else{
V=r(V,U);
}
if(V<T){
V=T;
}
var C=V-T;
var W=
%_ArrayBufferViewGetByteOffset(this)+T*1;
return new h(%TypedArrayGetBuffer(this),
W,C);
}
--- END ---
--- FUNCTION SOURCE (Uint8ArrayConstructByArrayBuffer) id{19,0} ---
(v,w,x,y){
if(!(x===(void 0))){
x=
$toPositiveInteger(x,139);
}
if(!(y===(void 0))){
y=$toPositiveInteger(y,139);
}
var z=%_ArrayBufferGetByteLength(w);
var A;
if((x===(void 0))){
A=0;
}else{
A=x;
if(A % 1!==0){
throw MakeRangeError(138,
"start offset","Uint8Array",1);
}
if(A>z){
throw MakeRangeError(140);
}
}
var B;
var C;
if((y===(void 0))){
if(z % 1!==0){
throw MakeRangeError(138,
"byte length","Uint8Array",1);
}
B=z-A;
C=B/1;
}else{
var C=y;
B=C*1;
}
if((A+B>z)
||(C>%_MaxSmi())){
throw MakeRangeError(139);
}
%_TypedArrayInitialize(v,1,w,A,B,true);
}
--- END ---
--- FUNCTION SOURCE (Buffer) id{20,0} ---
(arg) {
// Common case.
if (typeof arg === 'number') {
// If less than zero, or NaN.
if (arg < 0 || arg !== arg)
arg = 0;
return allocate(arg);
}
// Slightly less common case.
if (typeof arg === 'string') {
return fromString(arg, arguments[1]);
}
// Unusual.
return fromObject(arg);
}
--- END ---
--- FUNCTION SOURCE (fromString) id{20,1} ---
(string, encoding) {
if (typeof encoding !== 'string' || encoding === '')
encoding = 'utf8';
var length = byteLength(string, encoding);
if (length >= (Buffer.poolSize >>> 1))
return binding.createFromString(string, encoding);
if (length > (poolSize - poolOffset))
createPool();
var actual = allocPool.write(string, poolOffset, encoding);
var b = allocPool.slice(poolOffset, poolOffset + actual);
poolOffset += actual;
alignPool();
return b;
}
--- END ---
INLINE (fromString) id{20,1} AS 1 AT <0:247>
--- FUNCTION SOURCE (slice) id{20,2} ---
(start, end) {
const buffer = this.subarray(start, end);
Object.setPrototypeOf(buffer, Buffer.prototype);
return buffer;
}
--- END ---
INLINE (slice) id{20,2} AS 2 AT <1:382>
--- FUNCTION SOURCE (alignPool) id{20,3} ---
() {
// Ensure aligned slices
if (poolOffset & 0x7) {
poolOffset |= 0x7;
poolOffset++;
}
}
--- END ---
INLINE (alignPool) id{20,3} AS 3 AT <1:448>
--- FUNCTION SOURCE (QuickSort) id{21,0} ---
(y,m,aF){
var aM=0;
while(true){
if(aF-m<=10){
aE(y,m,aF);
return;
}
if(aF-m>1000){
aM=aJ(y,m,aF);
}else{
aM=m+((aF-m)>>1);
}
var aO=y[m];
var aP=y[aF-1];
var aQ=y[aM];
var aR=%_CallFunction((void 0),aO,aP,aC);
if(aR>0){
var aH=aO;
aO=aP;
aP=aH;
}
var aS=%_CallFunction((void 0),aO,aQ,aC);
if(aS>=0){
var aH=aO;
aO=aQ;
aQ=aP;
aP=aH;
}else{
var aT=%_CallFunction((void 0),aP,aQ,aC);
if(aT>0){
var aH=aP;
aP=aQ;
aQ=aH;
}
}
y[m]=aO;
y[aF-1]=aQ;
var aU=aP;
var aV=m+1;
var aW=aF-1;
y[aM]=y[aV];
y[aV]=aU;
partition:for(var t=aV+1;t<aW;t++){
var aG=y[t];
var aI=%_CallFunction((void 0),aG,aU,aC);
if(aI<0){
y[t]=y[aV];
y[aV]=aG;
aV++;
}else if(aI>0){
do{
aW--;
if(aW==t)break partition;
var aX=y[aW];
aI=%_CallFunction((void 0),aX,aU,aC);
}while(aI>0);
y[t]=y[aW];
y[aW]=aG;
if(aI<0){
aG=y[t];
y[t]=y[aV];
y[aV]=aG;
aV++;
}
}
}
if(aF-aW<aV-m){
aN(y,aW,aF);
aF=aV;
}else{
aN(y,m,aV);
m=aW;
}
}
}
--- END ---
--- FUNCTION SOURCE (alignPool) id{22,0} ---
() {
// Ensure aligned slices
if (poolOffset & 0x7) {
poolOffset |= 0x7;
poolOffset++;
}
}
--- END ---
--- FUNCTION SOURCE (sortPixels) id{23,0} ---
(pixels) {
var split = []
for (var i = 0; i < pixels.length; i += 4) {
split.push(pixels.slice(i, i + 4))
}
var sorted = split.sort(function (a, b) {
return (a[0] + a[1] + a[2] + a[3]) - (b[0] + b[1] + b[2] + b[3])
})
var newbuff = new Buffer(pixels.length)
for (var j = 0; j < sorted.length; j++) {
newbuff[j * 4] = sorted[j][0]
newbuff[j * 4 + 1] = sorted[j][1]
newbuff[j * 4 + 2] = sorted[j][2]
newbuff[j * 4 + 3] = sorted[j][3]
}
return newbuff
}
--- END ---
--- FUNCTION SOURCE (slice) id{23,1} ---
(start, end) {
const buffer = this.subarray(start, end);
Object.setPrototypeOf(buffer, Buffer.prototype);
return buffer;
}
--- END ---
INLINE (slice) id{23,1} AS 1 AT <0:97>
--- FUNCTION SOURCE (Buffer) id{23,2} ---
(arg) {
// Common case.
if (typeof arg === 'number') {
// If less than zero, or NaN.
if (arg < 0 || arg !== arg)
arg = 0;
return allocate(arg);
}
// Slightly less common case.
if (typeof arg === 'string') {
return fromString(arg, arguments[1]);
}
// Unusual.
return fromObject(arg);
}
--- END ---
INLINE (Buffer) id{23,2} AS 2 AT <0:252>
--- FUNCTION SOURCE (fromString) id{23,3} ---
(string, encoding) {
if (typeof encoding !== 'string' || encoding === '')
encoding = 'utf8';
var length = byteLength(string, encoding);
if (length >= (Buffer.poolSize >>> 1))
return binding.createFromString(string, encoding);
if (length > (poolSize - poolOffset))
createPool();
var actual = allocPool.write(string, poolOffset, encoding);
var b = allocPool.slice(poolOffset, poolOffset + actual);
poolOffset += actual;
alignPool();
return b;
}
--- END ---
INLINE (fromString) id{23,3} AS 3 AT <2:247>
--- FUNCTION SOURCE (slice) id{23,4} ---
(start, end) {
const buffer = this.subarray(start, end);
Object.setPrototypeOf(buffer, Buffer.prototype);
return buffer;
}
--- END ---
INLINE (slice) id{23,4} AS 4 AT <3:382>
--- FUNCTION SOURCE (alignPool) id{23,5} ---
() {
// Ensure aligned slices
if (poolOffset & 0x7) {
poolOffset |= 0x7;
poolOffset++;
}
}
--- END ---
INLINE (alignPool) id{23,5} AS 5 AT <3:448>
--- FUNCTION SOURCE (min) id{24,0} ---
(h,i){
var j=%_ArgumentsLength();
if(j==2){
h=((typeof(%IS_VAR(h))==='number')?h:$nonNumberToNumber(h));
i=((typeof(%IS_VAR(i))==='number')?i:$nonNumberToNumber(i));
if(i>h)return h;
if(h>i)return i;
if(h==i){
return(h===0&&%_IsMinusZero(h))?h:i;
}
return $NaN;
}
var k=(1/0);
for(var l=0;l<j;l++){
var m=%_Arguments(l);
m=((typeof(%IS_VAR(m))==='number')?m:$nonNumberToNumber(m));
if((!%_IsSmi(%IS_VAR(m))&&!(m==m))||m<k||(k===0&&m===0&&%_IsMinusZero(m))){
k=m;
}
}
return k;
}
--- END ---
--- FUNCTION SOURCE (ToPositiveInteger) id{25,0} ---
(i,aa){
var M=(%_IsSmi(%IS_VAR(i))?i:%NumberToIntegerMapMinusZero($toNumber(i)));
if(M<0)throw MakeRangeError(aa);
return M;
}
--- END ---
--- FUNCTION SOURCE (medianPixel) id{26,0} ---
(pixels) {
var sorted = sortPixels(pixels)
var mid = (sorted.length / 2) - ((sorted.length / 2) % 4)
return sorted.slice(mid, mid + 4)
}
--- END ---
--- FUNCTION SOURCE (sortPixels) id{26,1} ---
(pixels) {
var split = []
for (var i = 0; i < pixels.length; i += 4) {
split.push(pixels.slice(i, i + 4))
}
var sorted = split.sort(function (a, b) {
return (a[0] + a[1] + a[2] + a[3]) - (b[0] + b[1] + b[2] + b[3])
})
var newbuff = new Buffer(pixels.length)
for (var j = 0; j < sorted.length; j++) {
newbuff[j * 4] = sorted[j][0]
newbuff[j * 4 + 1] = sorted[j][1]
newbuff[j * 4 + 2] = sorted[j][2]
newbuff[j * 4 + 3] = sorted[j][3]
}
return newbuff
}
--- END ---
INLINE (sortPixels) id{26,1} AS 1 AT <0:26>
--- FUNCTION SOURCE (slice) id{26,2} ---
(start, end) {
const buffer = this.subarray(start, end);
Object.setPrototypeOf(buffer, Buffer.prototype);
return buffer;
}
--- END ---
INLINE (slice) id{26,2} AS 2 AT <1:97>
--- FUNCTION SOURCE (Buffer) id{26,3} ---
(arg) {
// Common case.
if (typeof arg === 'number') {
// If less than zero, or NaN.
if (arg < 0 || arg !== arg)
arg = 0;
return allocate(arg);
}
// Slightly less common case.
if (typeof arg === 'string') {
return fromString(arg, arguments[1]);
}
// Unusual.
return fromObject(arg);
}
--- END ---
INLINE (Buffer) id{26,3} AS 3 AT <1:252>
--- FUNCTION SOURCE (fromString) id{26,4} ---
(string, encoding) {
if (typeof encoding !== 'string' || encoding === '')
encoding = 'utf8';
var length = byteLength(string, encoding);
if (length >= (Buffer.poolSize >>> 1))
return binding.createFromString(string, encoding);
if (length > (poolSize - poolOffset))
createPool();
var actual = allocPool.write(string, poolOffset, encoding);
var b = allocPool.slice(poolOffset, poolOffset + actual);
poolOffset += actual;
alignPool();
return b;
}
--- END ---
INLINE (fromString) id{26,4} AS 4 AT <3:247>
--- FUNCTION SOURCE (slice) id{26,5} ---
(start, end) {
const buffer = this.subarray(start, end);
Object.setPrototypeOf(buffer, Buffer.prototype);
return buffer;
}
--- END ---
INLINE (slice) id{26,5} AS 5 AT <4:382>
--- FUNCTION SOURCE (alignPool) id{26,6} ---
() {
// Ensure aligned slices
if (poolOffset & 0x7) {
poolOffset |= 0x7;
poolOffset++;
}
}
--- END ---
INLINE (alignPool) id{26,6} AS 6 AT <4:448>
--- FUNCTION SOURCE (slice) id{26,7} ---
(start, end) {
const buffer = this.subarray(start, end);
Object.setPrototypeOf(buffer, Buffer.prototype);
return buffer;
}
--- END ---
INLINE (slice) id{26,7} AS 7 AT <0:121>
--- FUNCTION SOURCE (sort) id{27,0} ---
(aC){
if((this==null)&&!(%_IsUndetectableObject(this)))throw MakeTypeError(14,"Array.prototype.sort");
var o=$toObject(this);
var v=(o.length>>>0);
return %_CallFunction(o,v,aC,InnerArraySort);
}
--- END ---
--- FUNCTION SOURCE (allocate) id{28,0} ---
(size) {
if (size === 0) {
const ui8 = new Uint8Array(size);
Object.setPrototypeOf(ui8, Buffer.prototype);
return ui8;
}
if (size < (Buffer.poolSize >>> 1)) {
if (size > (poolSize - poolOffset))
createPool();
var b = allocPool.slice(poolOffset, poolOffset + size);
poolOffset += size;
alignPool();
return b;
} else {
// Even though this is checked above, the conditional is a safety net and
// sanity check to prevent any subsequent typed array allocation from not
// being zero filled.
if (size > 0)
flags[kNoZeroFill] = 1;
const ui8 = new Uint8Array(size);
Object.setPrototypeOf(ui8, Buffer.prototype);
return ui8;
}
}
--- END ---
--- FUNCTION SOURCE (createPool) id{28,1} ---
() {
poolSize = Buffer.poolSize;
if (poolSize > 0)
flags[kNoZeroFill] = 1;
allocPool = new Uint8Array(poolSize);
Object.setPrototypeOf(allocPool, Buffer.prototype);
poolOffset = 0;
}
--- END ---
INLINE (createPool) id{28,1} AS 1 AT <0:223>
--- FUNCTION SOURCE (slice) id{28,2} ---
(start, end) {
const buffer = this.subarray(start, end);
Object.setPrototypeOf(buffer, Buffer.prototype);
return buffer;
}
--- END ---
INLINE (slice) id{28,2} AS 2 AT <0:259>
--- FUNCTION SOURCE (alignPool) id{28,3} ---
() {
// Ensure aligned slices
if (poolOffset & 0x7) {
poolOffset |= 0x7;
poolOffset++;
}
}
--- END ---
INLINE (alignPool) id{28,3} AS 3 AT <0:325>
--- FUNCTION SOURCE (Uint8ArrayConstructByLength) id{29,0} ---
(v,y){
var D=(y===(void 0))?
0:$toPositiveInteger(y,139);
if(D>%_MaxSmi()){
throw MakeRangeError(139);
}
var E=D*1;
if(E>%_TypedArrayMaxSizeInHeap()){
var w=new d(E);
%_TypedArrayInitialize(v,1,w,0,E,true);
}else{
%_TypedArrayInitialize(v,1,null,0,E,true);
}
}
--- END ---
--- FUNCTION SOURCE (Uint8Array) id{30,0} ---
(O,P,Q){
if(%_IsConstructCall()){
if((%_ClassOf(O)==='ArrayBuffer')||(%_ClassOf(O)==='SharedArrayBuffer')){
Uint8ArrayConstructByArrayBuffer(this,O,P,Q);
}else if((typeof(O)==='number')||(typeof(O)==='string')||
(typeof(O)==='boolean')||(O===(void 0))){
Uint8ArrayConstructByLength(this,O);
}else{
var J=O[symbolIterator];
if((J===(void 0))||J===$arrayValues){
Uint8ArrayConstructByArrayLike(this,O);
}else{
Uint8ArrayConstructByIterable(this,O,J);
}
}
}else{
throw MakeTypeError(20,"Uint8Array")
}
}
--- END ---
--- FUNCTION SOURCE (setPrototypeOf) id{31,0} ---
(J,am){
if((J==null)&&!(%_IsUndetectableObject(J)))throw MakeTypeError(14,"Object.setPrototypeOf");
if(am!==null&&!(%_IsSpecObject(am))){
throw MakeTypeError(79,am);
}
if((%_IsSpecObject(J))){
%SetPrototype(J,am);
}
return J;
}
--- END ---
--- FUNCTION SOURCE (InnerArraySort) id{32,0} ---
(v,aC){
if(!(%_ClassOf(aC)==='Function')){
aC=function(O,aD){
if(O===aD)return 0;
if(%_IsSmi(O)&&%_IsSmi(aD)){
return %SmiLexicographicCompare(O,aD);
}
O=$toString(O);
aD=$toString(aD);
if(O==aD)return 0;
else return O<aD?-1:1;
};
}
var aE=function InsertionSort(y,m,aF){
for(var t=m+1;t<aF;t++){
var aG=y[t];
for(var am=t-1;am>=m;am--){
var aH=y[am];
var aI=%_CallFunction((void 0),aH,aG,aC);
if(aI>0){
y[am+1]=aH;
}else{
break;
}
}
y[am+1]=aG;
}
};
var aJ=function(y,m,aF){
var aK=[];
var aL=200+((aF-m)&15);
for(var t=m+1,am=0;t<aF-1;t+=aL,am++){
aK[am]=[t,y[t]];
}
%_CallFunction(aK,function(y,z){
return %_CallFunction((void 0),y[1],z[1],aC);
},ArraySort);
var aM=aK[aK.length>>1][0];
return aM;
}
var aN=function QuickSort(y,m,aF){
var aM=0;
while(true){
if(aF-m<=10){
aE(y,m,aF);
return;
}
if(aF-m>1000){
aM=aJ(y,m,aF);
}else{
aM=m+((aF-m)>>1);
}
var aO=y[m];
var aP=y[aF-1];
var aQ=y[aM];
var aR=%_CallFunction((void 0),aO,aP,aC);
if(aR>0){
var aH=aO;
aO=aP;
aP=aH;
}
var aS=%_CallFunction((void 0),aO,aQ,aC);
if(aS>=0){
var aH=aO;
aO=aQ;
aQ=aP;
aP=aH;
}else{
var aT=%_CallFunction((void 0),aP,aQ,aC);
if(aT>0){
var aH=aP;
aP=aQ;
aQ=aH;
}
}
y[m]=aO;
y[aF-1]=aQ;
var aU=aP;
var aV=m+1;
var aW=aF-1;
y[aM]=y[aV];
y[aV]=aU;
partition:for(var t=aV+1;t<aW;t++){
var aG=y[t];
var aI=%_CallFunction((void 0),aG,aU,aC);
if(aI<0){
y[t]=y[aV];
y[aV]=aG;
aV++;
}else if(aI>0){
do{
aW--;
if(aW==t)break partition;
var aX=y[aW];
aI=%_CallFunction((void 0),aX,aU,aC);
}while(aI>0);
y[t]=y[aW];
y[aW]=aG;
if(aI<0){
aG=y[t];
y[t]=y[aV];
y[aV]=aG;
aV++;
}
}
}
if(aF-aW<aV-m){
aN(y,aW,aF);
aF=aV;
}else{
aN(y,m,aV);
m=aW;
}
}
};
var aY=function CopyFromPrototype(aZ,v){
var ba=0;
for(var bb=%_GetPrototype(aZ);bb;bb=%_GetPrototype(bb)){
var p=%GetArrayKeys(bb,v);
if((typeof(p)==='number')){
var bc=p;
for(var t=0;t<bc;t++){
if(!(%_CallFunction(aZ,t,i))&&(%_CallFunction(bb,t,i))){
aZ[t]=bb[t];
if(t>=ba){ba=t+1;}
}
}
}else{
for(var t=0;t<p.length;t++){
var Y=p[t];
if(!(Y===(void 0))&&!(%_CallFunction(aZ,Y,i))
&&(%_CallFunction(bb,Y,i))){
aZ[Y]=bb[Y];
if(Y>=ba){ba=Y+1;}
}
}
}
}
return ba;
};
var bd=function(aZ,m,aF){
for(var bb=%_GetPrototype(aZ);bb;bb=%_GetPrototype(bb)){
var p=%GetArrayKeys(bb,aF);
if((typeof(p)==='number')){
var bc=p;
for(var t=m;t<bc;t++){
if((%_CallFunction(bb,t,i))){
aZ[t]=(void 0);
}
}
}else{
for(var t=0;t<p.length;t++){
var Y=p[t];
if(!(Y===(void 0))&&m<=Y&&
(%_CallFunction(bb,Y,i))){
aZ[Y]=(void 0);
}
}
}
}
};
var be=function SafeRemoveArrayHoles(aZ){
var bf=0;
var bg=v-1;
var bh=0;
while(bf<bg){
while(bf<bg&&
!(aZ[bf]===(void 0))){
bf++;
}
if(!(%_CallFunction(aZ,bf,i))){
bh++;
}
while(bf<bg&&
(aZ[bg]===(void 0))){
if(!(%_CallFunction(aZ,bg,i))){
bh++;
}
bg--;
}
if(bf<bg){
aZ[bf]=aZ[bg];
aZ[bg]=(void 0);
}
}
if(!(aZ[bf]===(void 0)))bf++;
var t;
for(t=bf;t<v-bh;t++){
aZ[t]=(void 0);
}
for(t=v-bh;t<v;t++){
if(t in %_GetPrototype(aZ)){
aZ[t]=(void 0);
}else{
delete aZ[t];
}
}
return bf;
};
if(v<2)return this;
var J=(%_IsArray(this));
var bi;
if(!J){
bi=aY(this,v);
}
var bj=%RemoveArrayHoles(this,v);
if(bj==-1){
bj=be(this);
}
aN(this,0,bj);
if(!J&&(bj+1<bi)){
bd(this,bj,bi);
}
return this;
}
--- END ---
--- FUNCTION SOURCE (avg) id{33,0} ---
(frames, alg) {
// Some images strangely have different pixel counts per frame.
// Pick the largest and go with that I guess?
var len = frames.reduce(function min(p, c) {
var length = c.data.length
if (length <= p) {
return length
}
return p
}, Number.MAX_VALUE)
if (len === 1) {
return frames[0].data
}
var avgFrame = new Buffer(len)
for (var i = 0; i < len; i += 4) {
var pixels = new Buffer(4 * frames.length)
for (var j = 0; j < frames.length; j++) {
frames[j].data.copy(pixels, j * 4, i, i + 4)
//pixels[j*4] = frames[j].data[i]
//pixels[j*4+1] = frames[j].data[i+1]
//pixels[j*4+2] = frames[j].data[i+2]
//pixels[j*4+3] = frames[j].data[i+3]
}
var avgPixel = alg(pixels)
avgPixel.copy(avgFrame, i)
}
return avgFrame
}
--- END ---
--- FUNCTION SOURCE (Buffer) id{33,1} ---
(arg) {
// Common case.
if (typeof arg === 'number') {
// If less than zero, or NaN.
if (arg < 0 || arg !== arg)
arg = 0;
return allocate(arg);
}
// Slightly less common case.
if (typeof arg === 'string') {
return fromString(arg, arguments[1]);
}
// Unusual.
return fromObject(arg);
}
--- END ---
INLINE (Buffer) id{33,1} AS 1 AT <0:360>
--- FUNCTION SOURCE (fromString) id{33,2} ---
(string, encoding) {
if (typeof encoding !== 'string' || encoding === '')
encoding = 'utf8';
var length = byteLength(string, encoding);
if (length >= (Buffer.poolSize >>> 1))
return binding.createFromString(string, encoding);
if (length > (poolSize - poolOffset))
createPool();
var actual = allocPool.write(string, poolOffset, encoding);
var b = allocPool.slice(poolOffset, poolOffset + actual);
poolOffset += actual;
alignPool();
return b;
}
--- END ---
INLINE (fromString) id{33,2} AS 2 AT <1:247>
--- FUNCTION SOURCE (slice) id{33,3} ---
(start, end) {
const buffer = this.subarray(start, end);
Object.setPrototypeOf(buffer, Buffer.prototype);
return buffer;
}
--- END ---
INLINE (slice) id{33,3} AS 3 AT <2:382>
--- FUNCTION SOURCE (alignPool) id{33,4} ---
() {
// Ensure aligned slices
if (poolOffset & 0x7) {
poolOffset |= 0x7;
poolOffset++;
}
}
--- END ---
INLINE (alignPool) id{33,4} AS 4 AT <2:448>
--- FUNCTION SOURCE (Buffer) id{33,5} ---
(arg) {
// Common case.
if (typeof arg === 'number') {
// If less than zero, or NaN.
if (arg < 0 || arg !== arg)
arg = 0;
return allocate(arg);
}
// Slightly less common case.
if (typeof arg === 'string') {
return fromString(arg, arguments[1]);
}
// Unusual.
return fromObject(arg);
}
--- END ---
INLINE (Buffer) id{33,5} AS 5 AT <0:430>
--- FUNCTION SOURCE (fromString) id{33,6} ---
(string, encoding) {
if (typeof encoding !== 'string' || encoding === '')
encoding = 'utf8';
var length = byteLength(string, encoding);
if (length >= (Buffer.poolSize >>> 1))
return binding.createFromString(string, encoding);
if (length > (poolSize - poolOffset))
createPool();
var actual = allocPool.write(string, poolOffset, encoding);
var b = allocPool.slice(poolOffset, poolOffset + actual);
poolOffset += actual;
alignPool();
return b;
}
--- END ---
INLINE (fromString) id{33,6} AS 6 AT <5:247>
--- FUNCTION SOURCE (slice) id{33,7} ---
(start, end) {
const buffer = this.subarray(start, end);
Object.setPrototypeOf(buffer, Buffer.prototype);
return buffer;
}
--- END ---
INLINE (slice) id{33,7} AS 7 AT <6:382>
--- FUNCTION SOURCE (alignPool) id{33,8} ---
() {
// Ensure aligned slices
if (poolOffset & 0x7) {
poolOffset |= 0x7;
poolOffset++;
}
}
--- END ---
INLINE (alignPool) id{33,8} AS 8 AT <6:448>
--- FUNCTION SOURCE (medianPixel) id{33,9} ---
(pixels) {
var sorted = sortPixels(pixels)
var mid = (sorted.length / 2) - ((sorted.length / 2) % 4)
return sorted.slice(mid, mid + 4)
}
--- END ---
INLINE (medianPixel) id{33,9} AS 9 AT <0:754>
--- FUNCTION SOURCE (sortPixels) id{33,10} ---
(pixels) {
var split = []
for (var i = 0; i < pixels.length; i += 4) {
split.push(pixels.slice(i, i + 4))
}
var sorted = split.sort(function (a, b) {
return (a[0] + a[1] + a[2] + a[3]) - (b[0] + b[1] + b[2] + b[3])
})
var newbuff = new Buffer(pixels.length)
for (var j = 0; j < sorted.length; j++) {
newbuff[j * 4] = sorted[j][0]
newbuff[j * 4 + 1] = sorted[j][1]
newbuff[j * 4 + 2] = sorted[j][2]
newbuff[j * 4 + 3] = sorted[j][3]
}
return newbuff
}
--- END ---
INLINE (sortPixels) id{33,10} AS 10 AT <9:26>
--- FUNCTION SOURCE (slice) id{33,11} ---
(start, end) {
const buffer = this.subarray(start, end);
Object.setPrototypeOf(buffer, Buffer.prototype);
return buffer;
}
--- END ---
INLINE (slice) id{33,11} AS 11 AT <10:97>
--- FUNCTION SOURCE (Buffer) id{33,12} ---
(arg) {
// Common case.
if (typeof arg === 'number') {
// If less than zero, or NaN.
if (arg < 0 || arg !== arg)
arg = 0;
return allocate(arg);
}
// Slightly less common case.
if (typeof arg === 'string') {
return fromString(arg, arguments[1]);
}
// Unusual.
return fromObject(arg);
}
--- END ---
INLINE (Buffer) id{33,12} AS 12 AT <10:252>
--- FUNCTION SOURCE (fromString) id{33,13} ---
(string, encoding) {
if (typeof encoding !== 'string' || encoding === '')
encoding = 'utf8';
var length = byteLength(string, encoding);
if (length >= (Buffer.poolSize >>> 1))
return binding.createFromString(string, encoding);
if (length > (poolSize - poolOffset))
createPool();
var actual = allocPool.write(string, poolOffset, encoding);
var b = allocPool.slice(poolOffset, poolOffset + actual);
poolOffset += actual;
alignPool();
return b;
}
--- END ---
INLINE (fromString) id{33,13} AS 13 AT <12:247>
--- FUNCTION SOURCE (slice) id{33,14} ---
(start, end) {
const buffer = this.subarray(start, end);
Object.setPrototypeOf(buffer, Buffer.prototype);
return buffer;
}
--- END ---
INLINE (slice) id{33,14} AS 14 AT <13:382>
--- FUNCTION SOURCE (alignPool) id{33,15} ---
() {
// Ensure aligned slices
if (poolOffset & 0x7) {
poolOffset |= 0x7;
poolOffset++;
}
}
--- END ---
INLINE (alignPool) id{33,15} AS 15 AT <13:448>
[deoptimizing (DEOPT eager): begin 0x100fecf4dc39 <JS Function avg (SharedFunctionInfo 0x2ac96392ee49)> (opt #33) @45, FP to SP delta: 440]
;;; deoptimize at 5_272: out of bounds
reading input frame avg => node=3, args=106, height=7; inputs:
0: 0x100fecf4dc39 ; (frame function) 0x100fecf4dc39 <JS Function avg (SharedFunctionInfo 0x2ac96392ee49)>
1: 0x36cdc0e04131 ; r9 0x36cdc0e04131 <undefined>
2: 0x100fecfa5909 ; r8 0x100fecfa5909 <JS Array[51]>
3: 0x100fecf4dbf1 ; rsi 0x100fecf4dbf1 <JS Function medianPixel (SharedFunctionInfo 0x2ac96392eba9)>
4: 0x100fecf4dac9 ; rcx 0x100fecf4dac9 <FixedArray[26]>
5: 1440000 ; rdx
6: 0x100fecfa58b9 ; rbx 0x100fecfa58b9 <an Uint8Array with map 0x3d4eb9d1d389>
7: 1788 ; rax
8: 0x36cdc0e04131 ; (literal 7) 0x36cdc0e04131 <undefined>
9: 0x36cdc0e04131 ; (literal 7) 0x36cdc0e04131 <undefined>
10: 0x36cdc0e04131 ; (literal 7) 0x36cdc0e04131 <undefined>
translating frame avg => node=106, height=48
0x7ffc654cd5f0: [top + 96] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #1)
0x7ffc654cd5e8: [top + 88] <- 0x100fecfa5909 ; 0x100fecfa5909 <JS Array[51]> (input #2)
0x7ffc654cd5e0: [top + 80] <- 0x100fecf4dbf1 ; 0x100fecf4dbf1 <JS Function medianPixel (SharedFunctionInfo 0x2ac96392eba9)> (input #3)
0x7ffc654cd5d8: [top + 72] <- 0x376e6fef0f21 ; caller's pc
0x7ffc654cd5d0: [top + 64] <- 0x7ffc654cd610 ; caller's fp
0x7ffc654cd5c8: [top + 56] <- 0x100fecf4dac9 ; context 0x100fecf4dac9 <FixedArray[26]> (input #4)
0x7ffc654cd5c0: [top + 48] <- 0x100fecf4dc39 ; function 0x100fecf4dc39 <JS Function avg (SharedFunctionInfo 0x2ac96392ee49)> (input #0)
0x7ffc654cd5b8: [top + 40] <- 0x15f90000000000 ; 1440000 (input #5)
0x7ffc654cd5b0: [top + 32] <- 0x100fecfa58b9 ; 0x100fecfa58b9 <an Uint8Array with map 0x3d4eb9d1d389> (input #6)
0x7ffc654cd5a8: [top + 24] <- 0x6fc00000000 ; 1788 (input #7)
0x7ffc654cd5a0: [top + 16] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #8)
0x7ffc654cd598: [top + 8] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #9)
0x7ffc654cd590: [top + 0] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #10)
[deoptimizing (eager): end 0x100fecf4dc39 <JS Function avg (SharedFunctionInfo 0x2ac96392ee49)> @45 => node=106, pc=0x376e6fef14e0, state=NO_REGISTERS, alignment=no padding, took 0.052 ms]
--- FUNCTION SOURCE (InsertionSort) id{34,0} ---
(y,m,aF){
for(var t=m+1;t<aF;t++){
var aG=y[t];
for(var am=t-1;am>=m;am--){
var aH=y[am];
var aI=%_CallFunction((void 0),aH,aG,aC);
if(aI>0){
y[am+1]=aH;
}else{
break;
}
}
y[am+1]=aG;
}
}
--- END ---
--- FUNCTION SOURCE (avg) id{35,0} ---
(frames, alg) {
// Some images strangely have different pixel counts per frame.
// Pick the largest and go with that I guess?
var len = frames.reduce(function min(p, c) {
var length = c.data.length
if (length <= p) {
return length
}
return p
}, Number.MAX_VALUE)
if (len === 1) {
return frames[0].data
}
var avgFrame = new Buffer(len)
for (var i = 0; i < len; i += 4) {
var pixels = new Buffer(4 * frames.length)
for (var j = 0; j < frames.length; j++) {
frames[j].data.copy(pixels, j * 4, i, i + 4)
//pixels[j*4] = frames[j].data[i]
//pixels[j*4+1] = frames[j].data[i+1]
//pixels[j*4+2] = frames[j].data[i+2]
//pixels[j*4+3] = frames[j].data[i+3]
}
var avgPixel = alg(pixels)
avgPixel.copy(avgFrame, i)
}
return avgFrame
}
--- END ---
--- FUNCTION SOURCE (Buffer) id{35,1} ---
(arg) {
// Common case.
if (typeof arg === 'number') {
// If less than zero, or NaN.
if (arg < 0 || arg !== arg)
arg = 0;
return allocate(arg);
}
// Slightly less common case.
if (typeof arg === 'string') {
return fromString(arg, arguments[1]);
}
// Unusual.
return fromObject(arg);
}
--- END ---
INLINE (Buffer) id{35,1} AS 1 AT <0:360>
--- FUNCTION SOURCE (fromString) id{35,2} ---
(string, encoding) {
if (typeof encoding !== 'string' || encoding === '')
encoding = 'utf8';
var length = byteLength(string, encoding);
if (length >= (Buffer.poolSize >>> 1))
return binding.createFromString(string, encoding);
if (length > (poolSize - poolOffset))
createPool();
var actual = allocPool.write(string, poolOffset, encoding);
var b = allocPool.slice(poolOffset, poolOffset + actual);
poolOffset += actual;
alignPool();
return b;
}
--- END ---
INLINE (fromString) id{35,2} AS 2 AT <1:247>
--- FUNCTION SOURCE (slice) id{35,3} ---
(start, end) {
const buffer = this.subarray(start, end);
Object.setPrototypeOf(buffer, Buffer.prototype);
return buffer;
}
--- END ---
INLINE (slice) id{35,3} AS 3 AT <2:382>
--- FUNCTION SOURCE (alignPool) id{35,4} ---
() {
// Ensure aligned slices
if (poolOffset & 0x7) {
poolOffset |= 0x7;
poolOffset++;
}
}
--- END ---
INLINE (alignPool) id{35,4} AS 4 AT <2:448>
--- FUNCTION SOURCE (Buffer) id{35,5} ---
(arg) {
// Common case.
if (typeof arg === 'number') {
// If less than zero, or NaN.
if (arg < 0 || arg !== arg)
arg = 0;
return allocate(arg);
}
// Slightly less common case.
if (typeof arg === 'string') {
return fromString(arg, arguments[1]);
}
// Unusual.
return fromObject(arg);
}
--- END ---
INLINE (Buffer) id{35,5} AS 5 AT <0:430>
--- FUNCTION SOURCE (fromString) id{35,6} ---
(string, encoding) {
if (typeof encoding !== 'string' || encoding === '')
encoding = 'utf8';
var length = byteLength(string, encoding);
if (length >= (Buffer.poolSize >>> 1))
return binding.createFromString(string, encoding);
if (length > (poolSize - poolOffset))
createPool();
var actual = allocPool.write(string, poolOffset, encoding);
var b = allocPool.slice(poolOffset, poolOffset + actual);
poolOffset += actual;
alignPool();
return b;
}
--- END ---
INLINE (fromString) id{35,6} AS 6 AT <5:247>
--- FUNCTION SOURCE (slice) id{35,7} ---
(start, end) {
const buffer = this.subarray(start, end);
Object.setPrototypeOf(buffer, Buffer.prototype);
return buffer;
}
--- END ---
INLINE (slice) id{35,7} AS 7 AT <6:382>
--- FUNCTION SOURCE (alignPool) id{35,8} ---
() {
// Ensure aligned slices
if (poolOffset & 0x7) {
poolOffset |= 0x7;
poolOffset++;
}
}
--- END ---
INLINE (alignPool) id{35,8} AS 8 AT <6:448>
--- FUNCTION SOURCE (medianPixel) id{35,9} ---
(pixels) {
var sorted = sortPixels(pixels)
var mid = (sorted.length / 2) - ((sorted.length / 2) % 4)
return sorted.slice(mid, mid + 4)
}
--- END ---
INLINE (medianPixel) id{35,9} AS 9 AT <0:754>
--- FUNCTION SOURCE (sortPixels) id{35,10} ---
(pixels) {
var split = []
for (var i = 0; i < pixels.length; i += 4) {
split.push(pixels.slice(i, i + 4))
}
var sorted = split.sort(function (a, b) {
return (a[0] + a[1] + a[2] + a[3]) - (b[0] + b[1] + b[2] + b[3])
})
var newbuff = new Buffer(pixels.length)
for (var j = 0; j < sorted.length; j++) {
newbuff[j * 4] = sorted[j][0]
newbuff[j * 4 + 1] = sorted[j][1]
newbuff[j * 4 + 2] = sorted[j][2]
newbuff[j * 4 + 3] = sorted[j][3]
}
return newbuff
}
--- END ---
INLINE (sortPixels) id{35,10} AS 10 AT <9:26>
--- FUNCTION SOURCE (slice) id{35,11} ---
(start, end) {
const buffer = this.subarray(start, end);
Object.setPrototypeOf(buffer, Buffer.prototype);
return buffer;
}
--- END ---
INLINE (slice) id{35,11} AS 11 AT <10:97>
--- FUNCTION SOURCE (Buffer) id{35,12} ---
(arg) {
// Common case.
if (typeof arg === 'number') {
// If less than zero, or NaN.
if (arg < 0 || arg !== arg)
arg = 0;
return allocate(arg);
}
// Slightly less common case.
if (typeof arg === 'string') {
return fromString(arg, arguments[1]);
}
// Unusual.
return fromObject(arg);
}
--- END ---
INLINE (Buffer) id{35,12} AS 12 AT <10:252>
--- FUNCTION SOURCE (fromString) id{35,13} ---
(string, encoding) {
if (typeof encoding !== 'string' || encoding === '')
encoding = 'utf8';
var length = byteLength(string, encoding);
if (length >= (Buffer.poolSize >>> 1))
return binding.createFromString(string, encoding);
if (length > (poolSize - poolOffset))
createPool();
var actual = allocPool.write(string, poolOffset, encoding);
var b = allocPool.slice(poolOffset, poolOffset + actual);
poolOffset += actual;
alignPool();
return b;
}
--- END ---
INLINE (fromString) id{35,13} AS 13 AT <12:247>
--- FUNCTION SOURCE (slice) id{35,14} ---
(start, end) {
const buffer = this.subarray(start, end);
Object.setPrototypeOf(buffer, Buffer.prototype);
return buffer;
}
--- END ---
INLINE (slice) id{35,14} AS 14 AT <13:382>
--- FUNCTION SOURCE (alignPool) id{35,15} ---
() {
// Ensure aligned slices
if (poolOffset & 0x7) {
poolOffset |= 0x7;
poolOffset++;
}
}
--- END ---
INLINE (alignPool) id{35,15} AS 15 AT <13:448>
--- FUNCTION SOURCE () id{36,0} ---
(a, b) {
return (a[0] + a[1] + a[2] + a[3]) - (b[0] + b[1] + b[2] + b[3])
}
--- END ---
--- FUNCTION SOURCE (QuickSort) id{37,0} ---
(y,m,aF){
var aM=0;
while(true){
if(aF-m<=10){
aE(y,m,aF);
return;
}
if(aF-m>1000){
aM=aJ(y,m,aF);
}else{
aM=m+((aF-m)>>1);
}
var aO=y[m];
var aP=y[aF-1];
var aQ=y[aM];
var aR=%_CallFunction((void 0),aO,aP,aC);
if(aR>0){
var aH=aO;
aO=aP;
aP=aH;
}
var aS=%_CallFunction((void 0),aO,aQ,aC);
if(aS>=0){
var aH=aO;
aO=aQ;
aQ=aP;
aP=aH;
}else{
var aT=%_CallFunction((void 0),aP,aQ,aC);
if(aT>0){
var aH=aP;
aP=aQ;
aQ=aH;
}
}
y[m]=aO;
y[aF-1]=aQ;
var aU=aP;
var aV=m+1;
var aW=aF-1;
y[aM]=y[aV];
y[aV]=aU;
partition:for(var t=aV+1;t<aW;t++){
var aG=y[t];
var aI=%_CallFunction((void 0),aG,aU,aC);
if(aI<0){
y[t]=y[aV];
y[aV]=aG;
aV++;
}else if(aI>0){
do{
aW--;
if(aW==t)break partition;
var aX=y[aW];
aI=%_CallFunction((void 0),aX,aU,aC);
}while(aI>0);
y[t]=y[aW];
y[aW]=aG;
if(aI<0){
aG=y[t];
y[t]=y[aV];
y[aV]=aG;
aV++;
}
}
}
if(aF-aW<aV-m){
aN(y,aW,aF);
aF=aV;
}else{
aN(y,m,aV);
m=aW;
}
}
}
--- END ---
--- FUNCTION SOURCE (InsertionSort) id{38,0} ---
(y,m,aF){
for(var t=m+1;t<aF;t++){
var aG=y[t];
for(var am=t-1;am>=m;am--){
var aH=y[am];
var aI=%_CallFunction((void 0),aH,aG,aC);
if(aI>0){
y[am+1]=aH;
}else{
break;
}
}
y[am+1]=aG;
}
}
--- END ---
--- FUNCTION SOURCE (ToObject) id{39,0} ---
(i){
if((typeof(i)==='string'))return new e(i);
if((typeof(i)==='number'))return new g(i);
if((typeof(i)==='boolean'))return new d(i);
if((typeof(i)==='symbol'))return %NewSymbolWrapper(i);
if((i==null)&&!(%_IsUndetectableObject(i))){
throw MakeTypeError(113);
}
return i;
}
--- END ---
--- FUNCTION SOURCE (abs) id{40,0} ---
(e){
e=+e;
return(e>0)?e:0-e;
}
--- END ---
--- FUNCTION SOURCE (replaceBackground) id{41,0} ---
(frames, replacer, tolerance) {
tolerance = tolerance != null ? tolerance : 50
// var background = meanFrame(frames)
var background = medianFrame(frames)
for (var i = 0; i < frames.length; i++) {
var dupe = copy(frames[i].data)
replacer(dupe)
var rgba = frames[i].data
for (var j = 0; j < background.length; j += 4) {
var rDiff = Math.abs(rgba[j] - background[j])
var gDiff = Math.abs(rgba[j+1] - background[j+1])
var bDiff = Math.abs(rgba[j+2] - background[j+2])
if (!(rDiff > tolerance || gDiff > tolerance || bDiff > tolerance)) {
//if (rDiff + gDiff + bDiff < tolerance) {
var start = (j > dupe.length) ? 0 : j
rgba[j] = dupe[start + 0]
rgba[j+1] = dupe[start + 1]
rgba[j+2] = dupe[start + 2]
}
}
}
}
--- END ---
--- FUNCTION SOURCE (medianFrame) id{41,1} ---
(frames, alg) {
return avg(frames, medianPixel)
}
--- END ---
INLINE (medianFrame) id{41,1} AS 1 AT <0:140>
--- FUNCTION SOURCE (copy) id{41,2} ---
(rgba) {
var dupe = new Buffer(rgba.length)
rgba.copy(dupe)
return dupe
}
--- END ---
INLINE (copy) id{41,2} AS 2 AT <0:219>
--- FUNCTION SOURCE (Buffer) id{41,3} ---
(arg) {
// Common case.
if (typeof arg === 'number') {
// If less than zero, or NaN.
if (arg < 0 || arg !== arg)
arg = 0;
return allocate(arg);
}
// Slightly less common case.
if (typeof arg === 'string') {
return fromString(arg, arguments[1]);
}
// Unusual.
return fromObject(arg);
}
--- END ---
INLINE (Buffer) id{41,3} AS 3 AT <2:22>
--- FUNCTION SOURCE (fromString) id{41,4} ---
(string, encoding) {
if (typeof encoding !== 'string' || encoding === '')
encoding = 'utf8';
var length = byteLength(string, encoding);
if (length >= (Buffer.poolSize >>> 1))
return binding.createFromString(string, encoding);
if (length > (poolSize - poolOffset))
createPool();
var actual = allocPool.write(string, poolOffset, encoding);
var b = allocPool.slice(poolOffset, poolOffset + actual);
poolOffset += actual;
alignPool();
return b;
}
--- END ---
INLINE (fromString) id{41,4} AS 4 AT <3:247>
--- FUNCTION SOURCE (slice) id{41,5} ---
(start, end) {
const buffer = this.subarray(start, end);
Object.setPrototypeOf(buffer, Buffer.prototype);
return buffer;
}
--- END ---
INLINE (slice) id{41,5} AS 5 AT <4:382>
--- FUNCTION SOURCE (alignPool) id{41,6} ---
() {
// Ensure aligned slices
if (poolOffset & 0x7) {
poolOffset |= 0x7;
poolOffset++;
}
}
--- END ---
INLINE (alignPool) id{41,6} AS 6 AT <4:448>
--- FUNCTION SOURCE (replacer) id{41,7} ---
(frame) {
frame.fill(0)
}
--- END ---
INLINE (replacer) id{41,7} AS 7 AT <0:244>
--- FUNCTION SOURCE (DefineOwnProperty) id{42,0} ---
(J,V,G,Y){
if(%_IsJSProxy(J)){
if((typeof(V)==='symbol'))return false;
var w=FromGenericPropertyDescriptor(G);
return DefineProxyProperty(J,V,w,Y);
}else if((%_IsArray(J))){
return DefineArrayProperty(J,V,G,Y);
}else{
return DefineObjectProperty(J,V,G,Y);
}
}
--- END ---
--- FUNCTION SOURCE (GIFEncoder.removeAlphaChannel) id{43,0} ---
(data) {
var w = this.width;
var h = this.height;
var pixels = new Uint8Array(w * h * 3);
var count = 0;
for (var i = 0; i < h; i++) {
for (var j = 0; j < w; j++) {
var b = (i * w * 4) + j * 4;
pixels[count++] = data[b];
pixels[count++] = data[b+1];
pixels[count++] = data[b+2];
}
}
return pixels;
}
--- END ---
[deoptimizing (DEOPT eager): begin 0x3ed23a86f091 <JS Function abs (SharedFunctionInfo 0x36cdc0e69bd9)> (opt #40) @2, FP to SP delta: 24]
;;; deoptimize at 0_8: lost precision
reading input frame abs => node=2, args=3, height=1; inputs:
0: 0x3ed23a86f091 ; (frame function) 0x3ed23a86f091 <JS Function abs (SharedFunctionInfo 0x36cdc0e69bd9)>
1: 0x3ed23a854651 ; [fp + 24] 0x3ed23a854651 <a MathConstructor with map 0x3d4eb9d0ad49>
2: 0x7bbff3ebea1 ; [fp + 16] 0x7bbff3ebea1 <Number: 0.015625>
3: 0x3ed23a871969 ; [fp - 24] 0x3ed23a871969 <FixedArray[15]>
translating frame abs => node=3, height=0
0x7ffc654cd278: [top + 40] <- 0x3ed23a854651 ; 0x3ed23a854651 <a MathConstructor with map 0x3d4eb9d0ad49> (input #1)
0x7ffc654cd270: [top + 32] <- 0x7bbff3ebea1 ; 0x7bbff3ebea1 <Number: 0.015625> (input #2)
0x7ffc654cd268: [top + 24] <- 0x376e6ff4264e ; caller's pc
0x7ffc654cd260: [top + 16] <- 0x7ffc654cd2e0 ; caller's fp
0x7ffc654cd258: [top + 8] <- 0x3ed23a871969 ; context 0x3ed23a871969 <FixedArray[15]> (input #3)
0x7ffc654cd250: [top + 0] <- 0x3ed23a86f091 ; function 0x3ed23a86f091 <JS Function abs (SharedFunctionInfo 0x36cdc0e69bd9)> (input #0)
[deoptimizing (eager): end 0x3ed23a86f091 <JS Function abs (SharedFunctionInfo 0x36cdc0e69bd9)> @2 => node=3, pc=0x376e6ff0d186, state=NO_REGISTERS, alignment=no padding, took 0.037 ms]
--- FUNCTION SOURCE (abs) id{44,0} ---
(e){
e=+e;
return(e>0)?e:0-e;
}
--- END ---
--- FUNCTION SOURCE (contest) id{45,0} ---
(b, g, r) {
/*
finds closest neuron (min dist) and updates freq
finds best neuron (min dist-bias) and returns position
for frequently chosen neurons, freq[i] is high and bias[i] is negative
bias[i] = gamma * ((1 / netsize) - freq[i])
*/
var bestd = ~(1 << 31);
var bestbiasd = bestd;
var bestpos = -1;
var bestbiaspos = bestpos;
var i, n, dist, biasdist, betafreq;
for (i = 0; i < netsize; i++) {
n = network[i];
dist = Math.abs(n[0] - b) + Math.abs(n[1] - g) + Math.abs(n[2] - r);
if (dist < bestd) {
bestd = dist;
bestpos = i;
}
biasdist = dist - ((bias[i]) >> (intbiasshift - netbiasshift));
if (biasdist < bestbiasd) {
bestbiasd = biasdist;
bestbiaspos = i;
}
betafreq = (freq[i] >> betashift);
freq[i] -= betafreq;
bias[i] += (betafreq << gammashift);
}
freq[bestpos] += beta;
bias[bestpos] -= betagamma;
return bestbiaspos;
}
--- END ---
--- FUNCTION SOURCE (alterneigh) id{46,0} ---
(radius, i, b, g, r) {
var lo = Math.abs(i - radius);
var hi = Math.min(i + radius, netsize);
var j = i + 1;
var k = i - 1;
var m = 1;
var p, a;
while ((j < hi) || (k > lo)) {
a = radpower[m++];
if (j < hi) {
p = network[j++];
p[0] -= (a * (p[0] - b)) / alpharadbias;
p[1] -= (a * (p[1] - g)) / alpharadbias;
p[2] -= (a * (p[2] - r)) / alpharadbias;
}
if (k > lo) {
p = network[k--];
p[0] -= (a * (p[0] - b)) / alpharadbias;
p[1] -= (a * (p[1] - g)) / alpharadbias;
p[2] -= (a * (p[2] - r)) / alpharadbias;
}
}
}
--- END ---
--- FUNCTION SOURCE (altersingle) id{47,0} ---
(alpha, i, b, g, r) {
network[i][0] -= (alpha * (network[i][0] - b)) / initalpha;
network[i][1] -= (alpha * (network[i][1] - g)) / initalpha;
network[i][2] -= (alpha * (network[i][2] - r)) / initalpha;
}
--- END ---
[deoptimizing (DEOPT soft): begin 0x7bbfe01ac69 <JS Function alterneigh (SharedFunctionInfo 0x100fecfd14a1)> (opt #46) @26, FP to SP delta: 64]
;;; deoptimize at 0_473: Insufficient type feedback for keyed load
reading input frame alterneigh => node=6, args=499, height=8; inputs:
0: 0x7bbfe01ac69 ; (frame function) 0x7bbfe01ac69 <JS Function alterneigh (SharedFunctionInfo 0x100fecfd14a1)>
1: 0x36cdc0e04131 ; [fp + 56] 0x36cdc0e04131 <undefined>
2: 0x1300000000 ; [fp + 48] 19
3: 0x4600000000 ; [fp + 40] 70
4: 0xc2000000000 ; r12 3104
5: 0x46000000000 ; [fp + 24] 1120
6: 0x2000000000 ; r14 32
7: 0x7bbfe01aad1 ; [fp - 24] 0x7bbfe01aad1 <FixedArray[18]>
8: 5.100000e+01 ; xmm1 (bool)
9: 8.900000e+01 ; xmm2 (bool)
10: 72 ; rax
11: 69 ; rdx
12: 2 ; (int) [fp - 32]
13: 0x36cdc0e04131 ; (literal 1) 0x36cdc0e04131 <undefined>
14: 223541 ; rbx
translating frame alterneigh => node=499, height=56
0x7ffc654cd308: [top + 128] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #1)
0x7ffc654cd300: [top + 120] <- 0x1300000000 ; 19 (input #2)
0x7ffc654cd2f8: [top + 112] <- 0x4600000000 ; 70 (input #3)
0x7ffc654cd2f0: [top + 104] <- 0xc2000000000 ; 3104 (input #4)
0x7ffc654cd2e8: [top + 96] <- 0x46000000000 ; 1120 (input #5)
0x7ffc654cd2e0: [top + 88] <- 0x2000000000 ; 32 (input #6)
0x7ffc654cd2d8: [top + 80] <- 0x376e6ff41f51 ; caller's pc
0x7ffc654cd2d0: [top + 72] <- 0x7ffc654cd398 ; caller's fp
0x7ffc654cd2c8: [top + 64] <- 0x7bbfe01aad1 ; context 0x7bbfe01aad1 <FixedArray[18]> (input #7)
0x7ffc654cd2c0: [top + 56] <- 0x7bbfe01ac69 ; function 0x7bbfe01ac69 <JS Function alterneigh (SharedFunctionInfo 0x100fecfd14a1)> (input #0)
0x7ffc654cd2b8: [top + 48] <- 0x3300000000 ; 51 (input #8)
0x7ffc654cd2b0: [top + 40] <- 0x5900000000 ; 89 (input #9)
0x7ffc654cd2a8: [top + 32] <- 0x4800000000 ; 72 (input #10)
0x7ffc654cd2a0: [top + 24] <- 0x4500000000 ; 69 (input #11)
0x7ffc654cd298: [top + 16] <- 0x200000000 ; 2 (input #12)
0x7ffc654cd290: [top + 8] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #13)
0x7ffc654cd288: [top + 0] <- 0x3693500000000 ; 223541 (input #14)
[deoptimizing (soft): end 0x7bbfe01ac69 <JS Function alterneigh (SharedFunctionInfo 0x100fecfd14a1)> @26 => node=499, pc=0x376e6ff43793, state=NO_REGISTERS, alignment=no padding, took 0.054 ms]
--- FUNCTION SOURCE (alterneigh) id{48,0} ---
(radius, i, b, g, r) {
var lo = Math.abs(i - radius);
var hi = Math.min(i + radius, netsize);
var j = i + 1;
var k = i - 1;
var m = 1;
var p, a;
while ((j < hi) || (k > lo)) {
a = radpower[m++];
if (j < hi) {
p = network[j++];
p[0] -= (a * (p[0] - b)) / alpharadbias;
p[1] -= (a * (p[1] - g)) / alpharadbias;
p[2] -= (a * (p[2] - r)) / alpharadbias;
}
if (k > lo) {
p = network[k--];
p[0] -= (a * (p[0] - b)) / alpharadbias;
p[1] -= (a * (p[1] - g)) / alpharadbias;
p[2] -= (a * (p[2] - r)) / alpharadbias;
}
}
}
--- END ---
--- FUNCTION SOURCE (inxbuild) id{49,0} ---
() {
var i, j, p, q, smallpos, smallval, previouscol = 0, startpos = 0;
for (i = 0; i < netsize; i++) {
p = network[i];
smallpos = i;
smallval = p[1]; // index on g
// find smallest in i..netsize-1
for (j = i + 1; j < netsize; j++) {
q = network[j];
if (q[1] < smallval) { // index on g
smallpos = j;
smallval = q[1]; // index on g
}
}
q = network[smallpos];
// swap p (i) and q (smallpos) entries
if (i != smallpos) {
j = q[0]; q[0] = p[0]; p[0] = j;
j = q[1]; q[1] = p[1]; p[1] = j;
j = q[2]; q[2] = p[2]; p[2] = j;
j = q[3]; q[3] = p[3]; p[3] = j;
}
// smallval entry is now in position i
if (smallval != previouscol) {
netindex[previouscol] = (startpos + i) >> 1;
for (j = previouscol + 1; j < smallval; j++)
netindex[j] = i;
previouscol = smallval;
startpos = i;
}
}
netindex[previouscol] = (startpos + maxnetpos) >> 1;
for (j = previouscol + 1; j < 256; j++)
netindex[j] = maxnetpos; // really 256
}
--- END ---
[deoptimizing (DEOPT soft): begin 0x7bbfe01acf9 <JS Function inxbuild (SharedFunctionInfo 0x100fecfd15f1)> (opt #49) @39, FP to SP delta: 184]
;;; deoptimize at 0_1035: Insufficient type feedback for LHS of binary operation
reading input frame inxbuild => node=1, args=52, height=9; inputs:
0: 0x7bbfe01acf9 ; (frame function) 0x7bbfe01acf9 <JS Function inxbuild (SharedFunctionInfo 0x100fecfd15f1)>
1: 0x36cdc0e04131 ; [fp - 112] 0x36cdc0e04131 <undefined>
2: 0x7bbfe01aad1 ; [fp - 96] 0x7bbfe01aad1 <FixedArray[18]>
3: 0x36cdc0e04131 ; (literal 1) 0x36cdc0e04131 <undefined>
4: 0x36cdc0e04131 ; (literal 1) 0x36cdc0e04131 <undefined>
5: 0x36cdc0e04131 ; (literal 1) 0x36cdc0e04131 <undefined>
6: 0x36cdc0e04131 ; (literal 1) 0x36cdc0e04131 <undefined>
7: 0x36cdc0e04131 ; (literal 1) 0x36cdc0e04131 <undefined>
8: 0x36cdc0e04131 ; (literal 1) 0x36cdc0e04131 <undefined>
9: 0x7bbfe214819 ; rbx 0x7bbfe214819 <Number: 255>
10: 0xff00000000 ; [fp - 104] 255
translating frame inxbuild => node=52, height=64
0x7ffc654cd3a8: [top + 96] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #1)
0x7ffc654cd3a0: [top + 88] <- 0x376e6ff4046a ; caller's pc
0x7ffc654cd398: [top + 80] <- 0x7ffc654cd3c8 ; caller's fp
0x7ffc654cd390: [top + 72] <- 0x7bbfe01aad1 ; context 0x7bbfe01aad1 <FixedArray[18]> (input #2)
0x7ffc654cd388: [top + 64] <- 0x7bbfe01acf9 ; function 0x7bbfe01acf9 <JS Function inxbuild (SharedFunctionInfo 0x100fecfd15f1)> (input #0)
0x7ffc654cd380: [top + 56] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #3)
0x7ffc654cd378: [top + 48] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #4)
0x7ffc654cd370: [top + 40] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #5)
0x7ffc654cd368: [top + 32] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #6)
0x7ffc654cd360: [top + 24] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #7)
0x7ffc654cd358: [top + 16] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #8)
0x7ffc654cd350: [top + 8] <- 0x7bbfe214819 ; 0x7bbfe214819 <Number: 255> (input #9)
0x7ffc654cd348: [top + 0] <- 0xff00000000 ; 255 (input #10)
[deoptimizing (soft): end 0x7bbfe01acf9 <JS Function inxbuild (SharedFunctionInfo 0x100fecfd15f1)> @39 => node=52, pc=0x376e6ff44e8d, state=NO_REGISTERS, alignment=no padding, took 0.042 ms]
--- FUNCTION SOURCE (inxsearch) id{50,0} ---
(b, g, r) {
var a, p, dist;
var bestd = 1000; // biggest possible dist is 256*3
var best = -1;
var i = netindex[g]; // index on g
var j = i - 1; // start at netindex[g] and work outwards
while ((i < netsize) || (j >= 0)) {
if (i < netsize) {
p = network[i];
dist = p[1] - g; // inx key
if (dist >= bestd) i = netsize; // stop iter
else {
i++;
if (dist < 0) dist = -dist;
a = p[0] - b; if (a < 0) a = -a;
dist += a;
if (dist < bestd) {
a = p[2] - r; if (a < 0) a = -a;
dist += a;
if (dist < bestd) {
bestd = dist;
best = p[3];
}
}
}
}
if (j >= 0) {
p = network[j];
dist = g - p[1]; // inx key - reverse dif
if (dist >= bestd) j = -1; // stop iter
else {
j--;
if (dist < 0) dist = -dist;
a = p[0] - b; if (a < 0) a = -a;
dist += a;
if (dist < bestd) {
a = p[2] - r; if (a < 0) a = -a;
dist += a;
if (dist < bestd) {
bestd = dist;
best = p[3];
}
}
}
}
}
return best;
}
--- END ---
--- FUNCTION SOURCE (GIFEncoder.analyzePixels) id{51,0} ---
() {
var len = this.pixels.length;
var nPix = len / 3;
// TODO: Re-use indexedPixels
this.indexedPixels = new Uint8Array(nPix);
var imgq = new NeuQuant(this.pixels, this.sample);
imgq.buildColormap(); // create reduced palette
this.colorTab = imgq.getColormap();
// map image pixels to new palette
var k = 0;
for (var j = 0; j < nPix; j++) {
var index = imgq.lookupRGB(
this.pixels[k++] & 0xff,
this.pixels[k++] & 0xff,
this.pixels[k++] & 0xff
);
this.usedEntry[index] = true;
this.indexedPixels[j] = index;
}
this.pixels = null;
this.colorDepth = 8;
this.palSize = 7;
// get closest match to transparent color if specified
if (this.transparent !== null) {
this.transIndex = this.findClosest(this.transparent);
}
}
--- END ---
[deoptimizing (DEOPT soft): begin 0x3ed23a8fced1 <JS Function inxsearch (SharedFunctionInfo 0x100fecfd1699)> (opt #50) @27, FP to SP delta: 24]
;;; deoptimize at 0_940: Insufficient type feedback for combined type of binary operation
reading input frame inxsearch => node=4, args=495, height=8; inputs:
0: 0x3ed23a8fced1 ; (frame function) 0x3ed23a8fced1 <JS Function inxsearch (SharedFunctionInfo 0x100fecfd1699)>
1: 0x3ed23a8fcf19 ; [fp + 40] 0x3ed23a8fcf19 <a NeuQuant with map 0x3d4eb9d0eb81>
2: 0x8700000000 ; r9 135
3: 0x6c00000000 ; r8 108
4: 0x00000000 ; r11 0
5: 0x3ed23a8fce31 ; [fp - 24] 0x3ed23a8fce31 <FixedArray[18]>
6: 0x36cdc0e04131 ; (literal 1) 0x36cdc0e04131 <undefined>
7: 0xc518ec195b9 ; rdx 0xc518ec195b9 <a Float64Array with map 0x3d4eb9d157c9>
8: 0.000000e+00 ; xmm7 (bool)
9: 0x7bbff1f1dc1 ; r12 0x7bbff1f1dc1 <Number: 135>
10: 1.080000e+02 ; xmm6 (bool)
11: 74 ; rax
12: 72 ; rbx
translating frame inxsearch => node=495, height=56
0x7ffc654cd390: [top + 112] <- 0x3ed23a8fcf19 ; 0x3ed23a8fcf19 <a NeuQuant with map 0x3d4eb9d0eb81> (input #1)
0x7ffc654cd388: [top + 104] <- 0x8700000000 ; 135 (input #2)
0x7ffc654cd380: [top + 96] <- 0x6c00000000 ; 108 (input #3)
0x7ffc654cd378: [top + 88] <- 0x00000000 ; 0 (input #4)
0x7ffc654cd370: [top + 80] <- 0x376e6ff49dfc ; caller's pc
0x7ffc654cd368: [top + 72] <- 0x7ffc654cd428 ; caller's fp
0x7ffc654cd360: [top + 64] <- 0x3ed23a8fce31 ; context 0x3ed23a8fce31 <FixedArray[18]> (input #5)
0x7ffc654cd358: [top + 56] <- 0x3ed23a8fced1 ; function 0x3ed23a8fced1 <JS Function inxsearch (SharedFunctionInfo 0x100fecfd1699)> (input #0)
0x7ffc654cd350: [top + 48] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #6)
0x7ffc654cd348: [top + 40] <- 0xc518ec195b9 ; 0xc518ec195b9 <a Float64Array with map 0x3d4eb9d157c9> (input #7)
0x7ffc654cd340: [top + 32] <- 0x00000000 ; 0 (input #8)
0x7ffc654cd338: [top + 24] <- 0x7bbff1f1dc1 ; 0x7bbff1f1dc1 <Number: 135> (input #9)
0x7ffc654cd330: [top + 16] <- 0x6c00000000 ; 108 (input #10)
0x7ffc654cd328: [top + 8] <- 0x4a00000000 ; 74 (input #11)
0x7ffc654cd320: [top + 0] <- 0x4800000000 ; 72 (input #12)
[deoptimizing (soft): end 0x3ed23a8fced1 <JS Function inxsearch (SharedFunctionInfo 0x100fecfd1699)> @27 => node=495, pc=0x376e6ff473e7, state=NO_REGISTERS, alignment=no padding, took 0.089 ms]
[deoptimizing (DEOPT eager): begin 0x2ac96395d689 <JS Function GIFEncoder.analyzePixels (SharedFunctionInfo 0x2ac96394b679)> (opt #51) @31, FP to SP delta: 144]
;;; deoptimize at 0_522: out of bounds
reading input frame GIFEncoder.analyzePixels => node=1, args=226, height=8; inputs:
0: 0x2ac96395d689 ; (frame function) 0x2ac96395d689 <JS Function GIFEncoder.analyzePixels (SharedFunctionInfo 0x2ac96394b679)>
1: 0x3ed23a8fcf31 ; rbx 0x3ed23a8fcf31 <a GIFEncoder with map 0x3d4eb9d3f149>
2: 0x100fecf7fb11 ; [fp - 128] 0x100fecf7fb11 <FixedArray[8]>
3: 0x36cdc0e04131 ; (literal 1) 0x36cdc0e04131 <undefined>
4: 360000 ; (int) [fp - 120]
5: 0x3ed23a8fcf19 ; [fp - 112] 0x3ed23a8fcf19 <a NeuQuant with map 0x3d4eb9d0eb81>
6: 360873 ; (int) [fp - 144]
7: 120290 ; (int) [fp - 104]
8: 0x36cdc0e04131 ; (literal 1) 0x36cdc0e04131 <undefined>
9: 0x7bbff1f22f1 ; rax 0x7bbff1f22f1 <Number: 67>
translating frame GIFEncoder.analyzePixels => node=226, height=56
0x7ffc654cd438: [top + 88] <- 0x3ed23a8fcf31 ; 0x3ed23a8fcf31 <a GIFEncoder with map 0x3d4eb9d3f149> (input #1)
0x7ffc654cd430: [top + 80] <- 0x376e6ff3e4d3 ; caller's pc
0x7ffc654cd428: [top + 72] <- 0x7ffc654cd458 ; caller's fp
0x7ffc654cd420: [top + 64] <- 0x100fecf7fb11 ; context 0x100fecf7fb11 <FixedArray[8]> (input #2)
0x7ffc654cd418: [top + 56] <- 0x2ac96395d689 ; function 0x2ac96395d689 <JS Function GIFEncoder.analyzePixels (SharedFunctionInfo 0x2ac96394b679)> (input #0)
0x7ffc654cd410: [top + 48] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #3)
0x7ffc654cd408: [top + 40] <- 0x57e4000000000 ; 360000 (input #4)
0x7ffc654cd400: [top + 32] <- 0x3ed23a8fcf19 ; 0x3ed23a8fcf19 <a NeuQuant with map 0x3d4eb9d0eb81> (input #5)
0x7ffc654cd3f8: [top + 24] <- 0x581a900000000 ; 360873 (input #6)
0x7ffc654cd3f0: [top + 16] <- 0x1d5e200000000 ; 120290 (input #7)
0x7ffc654cd3e8: [top + 8] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #8)
0x7ffc654cd3e0: [top + 0] <- 0x7bbff1f22f1 ; 0x7bbff1f22f1 <Number: 67> (input #9)
[deoptimizing (eager): end 0x2ac96395d689 <JS Function GIFEncoder.analyzePixels (SharedFunctionInfo 0x2ac96394b679)> @31 => node=226, pc=0x376e6ff3fd7f, state=TOS_REG, alignment=no padding, took 0.059 ms]
--- FUNCTION SOURCE (inxsearch) id{52,0} ---
(b, g, r) {
var a, p, dist;
var bestd = 1000; // biggest possible dist is 256*3
var best = -1;
var i = netindex[g]; // index on g
var j = i - 1; // start at netindex[g] and work outwards
while ((i < netsize) || (j >= 0)) {
if (i < netsize) {
p = network[i];
dist = p[1] - g; // inx key
if (dist >= bestd) i = netsize; // stop iter
else {
i++;
if (dist < 0) dist = -dist;
a = p[0] - b; if (a < 0) a = -a;
dist += a;
if (dist < bestd) {
a = p[2] - r; if (a < 0) a = -a;
dist += a;
if (dist < bestd) {
bestd = dist;
best = p[3];
}
}
}
}
if (j >= 0) {
p = network[j];
dist = g - p[1]; // inx key - reverse dif
if (dist >= bestd) j = -1; // stop iter
else {
j--;
if (dist < 0) dist = -dist;
a = p[0] - b; if (a < 0) a = -a;
dist += a;
if (dist < bestd) {
a = p[2] - r; if (a < 0) a = -a;
dist += a;
if (dist < bestd) {
bestd = dist;
best = p[3];
}
}
}
}
}
return best;
}
--- END ---
--- FUNCTION SOURCE (GIFEncoder.analyzePixels) id{53,0} ---
() {
var len = this.pixels.length;
var nPix = len / 3;
// TODO: Re-use indexedPixels
this.indexedPixels = new Uint8Array(nPix);
var imgq = new NeuQuant(this.pixels, this.sample);
imgq.buildColormap(); // create reduced palette
this.colorTab = imgq.getColormap();
// map image pixels to new palette
var k = 0;
for (var j = 0; j < nPix; j++) {
var index = imgq.lookupRGB(
this.pixels[k++] & 0xff,
this.pixels[k++] & 0xff,
this.pixels[k++] & 0xff
);
this.usedEntry[index] = true;
this.indexedPixels[j] = index;
}
this.pixels = null;
this.colorDepth = 8;
this.palSize = 7;
// get closest match to transparent color if specified
if (this.transparent !== null) {
this.transIndex = this.findClosest(this.transparent);
}
}
--- END ---
[deoptimizing (DEOPT soft): begin 0x2ac96395d689 <JS Function GIFEncoder.analyzePixels (SharedFunctionInfo 0x2ac96394b679)> (opt #53) @35, FP to SP delta: 144]
;;; deoptimize at 0_584: Insufficient type feedback for generic named access
reading input frame GIFEncoder.analyzePixels => node=1, args=178, height=7; inputs:
0: 0x2ac96395d689 ; (frame function) 0x2ac96395d689 <JS Function GIFEncoder.analyzePixels (SharedFunctionInfo 0x2ac96394b679)>
1: 0x3ed23a8fcf31 ; rdx 0x3ed23a8fcf31 <a GIFEncoder with map 0x3d4eb9d3f149>
2: 0x100fecf7fb11 ; [fp - 128] 0x100fecf7fb11 <FixedArray[8]>
3: 0x36cdc0e04131 ; (literal 1) 0x36cdc0e04131 <undefined>
4: 0x36cdc0e04131 ; (literal 1) 0x36cdc0e04131 <undefined>
5: 0x36cdc0e04131 ; (literal 1) 0x36cdc0e04131 <undefined>
6: 0x36cdc0e04131 ; (literal 1) 0x36cdc0e04131 <undefined>
7: 0x36cdc0e04131 ; (literal 1) 0x36cdc0e04131 <undefined>
8: 0x36cdc0e04131 ; (literal 1) 0x36cdc0e04131 <undefined>
translating frame GIFEncoder.analyzePixels => node=178, height=48
0x7ffc654cd438: [top + 80] <- 0x3ed23a8fcf31 ; 0x3ed23a8fcf31 <a GIFEncoder with map 0x3d4eb9d3f149> (input #1)
0x7ffc654cd430: [top + 72] <- 0x376e6ff3e4d3 ; caller's pc
0x7ffc654cd428: [top + 64] <- 0x7ffc654cd458 ; caller's fp
0x7ffc654cd420: [top + 56] <- 0x100fecf7fb11 ; context 0x100fecf7fb11 <FixedArray[8]> (input #2)
0x7ffc654cd418: [top + 48] <- 0x2ac96395d689 ; function 0x2ac96395d689 <JS Function GIFEncoder.analyzePixels (SharedFunctionInfo 0x2ac96394b679)> (input #0)
0x7ffc654cd410: [top + 40] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #3)
0x7ffc654cd408: [top + 32] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #4)
0x7ffc654cd400: [top + 24] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #5)
0x7ffc654cd3f8: [top + 16] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #6)
0x7ffc654cd3f0: [top + 8] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #7)
0x7ffc654cd3e8: [top + 0] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #8)
[deoptimizing (soft): end 0x2ac96395d689 <JS Function GIFEncoder.analyzePixels (SharedFunctionInfo 0x2ac96394b679)> @35 => node=178, pc=0x376e6ff3fe8f, state=NO_REGISTERS, alignment=no padding, took 0.055 ms]
[marking dependent code 0x376e6ff4ac41 (opt #53) for deoptimization, reason: prototype-check]
[marking dependent code 0x376e6ff499a1 (opt #51) for deoptimization, reason: prototype-check]
[deoptimize marked code in all contexts]
--- FUNCTION SOURCE (ByteCapacitor.writeByte) id{54,0} ---
(val) {
this.data.push(val);
}
--- END ---
--- FUNCTION SOURCE (nextPixel) id{55,0} ---
() {
if (remaining === 0) return EOF;
--remaining;
var pix = pixels[curPixel++];
return pix & 0xff;
}
--- END ---
--- FUNCTION SOURCE (compress) id{56,0} ---
(init_bits, outs) {
var fcode, c, i, ent, disp, hsize_reg, hshift;
// Set up the globals: g_init_bits - initial number of bits
g_init_bits = init_bits;
// Set up the necessary values
clear_flg = false;
n_bits = g_init_bits;
maxcode = MAXCODE(n_bits);
ClearCode = 1 << (init_bits - 1);
EOFCode = ClearCode + 1;
free_ent = ClearCode + 2;
a_count = 0; // clear packet
ent = nextPixel();
hshift = 0;
for (fcode = HSIZE; fcode < 65536; fcode *= 2) ++hshift;
hshift = 8 - hshift; // set hash code range bound
hsize_reg = HSIZE;
cl_hash(hsize_reg); // clear hash table
output(ClearCode, outs);
outer_loop: while ((c = nextPixel()) != EOF) {
fcode = (c << BITS) + ent;
i = (c << hshift) ^ ent; // xor hashing
if (htab[i] === fcode) {
ent = codetab[i];
continue;
} else if (htab[i] >= 0) { // non-empty slot
disp = hsize_reg - i; // secondary hash (after G. Knott)
if (i === 0) disp = 1;
do {
if ((i -= disp) < 0) i += hsize_reg;
if (htab[i] === fcode) {
ent = codetab[i];
continue outer_loop;
}
} while (htab[i] >= 0);
}
output(ent, outs);
ent = c;
if (free_ent < 1 << BITS) {
codetab[i] = free_ent++; // code -> hashtable
htab[i] = fcode;
} else {
cl_block(outs);
}
}
// Put out the final code.
output(ent, outs);
output(EOFCode, outs);
}
--- END ---
--- FUNCTION SOURCE (MAXCODE) id{56,1} ---
(n_bits) {
return (1 << n_bits) - 1;
}
--- END ---
INLINE (MAXCODE) id{56,1} AS 1 AT <0:264>
--- FUNCTION SOURCE (nextPixel) id{56,2} ---
() {
if (remaining === 0) return EOF;
--remaining;
var pix = pixels[curPixel++];
return pix & 0xff;
}
--- END ---
INLINE (nextPixel) id{56,2} AS 2 AT <0:424>
--- FUNCTION SOURCE (cl_hash) id{56,3} ---
(hsize) {
for (var i = 0; i < hsize; ++i) htab[i] = -1;
}
--- END ---
INLINE (cl_hash) id{56,3} AS 3 AT <0:596>
--- FUNCTION SOURCE (nextPixel) id{56,4} ---
() {
if (remaining === 0) return EOF;
--remaining;
var pix = pixels[curPixel++];
return pix & 0xff;
}
--- END ---
INLINE (nextPixel) id{56,4} AS 4 AT <0:695>
--- FUNCTION SOURCE (char_out) id{57,0} ---
(c, outs) {
accum[a_count++] = c;
if (a_count >= 254) flush_char(outs);
}
--- END ---
[marking dependent code 0x376e6ff515e1 (opt #56) for deoptimization, reason: property-cell-changed]
[deoptimize marked code in all contexts]
[deoptimizer unlinked: compress / 7bbfe1c9b11]
[deoptimizing (DEOPT lazy): begin 0x7bbfe1c9b11 <JS Function compress (SharedFunctionInfo 0xc518ec2e0a1)> (opt #56) @40, FP to SP delta: 168]
reading input frame compress => node=3, args=560, height=8; inputs:
0: 0x7bbfe1c9b11 ; (frame function) 0x7bbfe1c9b11 <JS Function compress (SharedFunctionInfo 0xc518ec2e0a1)>
1: 0x36cdc0e04131 ; [fp - 144] 0x36cdc0e04131 <undefined>
2: 0x36cdc0e04131 ; (literal 4) 0x36cdc0e04131 <undefined>
3: 0x3ed23a8fcf31 ; [fp - 136] 0x3ed23a8fcf31 <a GIFEncoder with map 0x3d4eb9d454f9>
4: 0x7bbfe1c9949 ; [fp - 128] 0x7bbfe1c9949 <FixedArray[28]>
5: 49663 ; (int) [fp - 160]
6: 12 ; (int) [fp - 152]
7: 0x13f00000000 ; [fp - 168] 319
8: 0x36cdc0e04131 ; (literal 4) 0x36cdc0e04131 <undefined>
9: 0x36cdc0e04131 ; (literal 4) 0x36cdc0e04131 <undefined>
10: 0x138b00000000 ; [fp - 120] 5003
11: 4 ; (int) [fp - 112]
translating frame compress => node=560, height=56
0x7ffc654cd3d0: [top + 104] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #1)
0x7ffc654cd3c8: [top + 96] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #2)
0x7ffc654cd3c0: [top + 88] <- 0x3ed23a8fcf31 ; 0x3ed23a8fcf31 <a GIFEncoder with map 0x3d4eb9d454f9> (input #3)
0x7ffc654cd3b8: [top + 80] <- 0x376e6ff4e19e ; caller's pc
0x7ffc654cd3b0: [top + 72] <- 0x7ffc654cd3f0 ; caller's fp
0x7ffc654cd3a8: [top + 64] <- 0x7bbfe1c9949 ; context 0x7bbfe1c9949 <FixedArray[28]> (input #4)
0x7ffc654cd3a0: [top + 56] <- 0x7bbfe1c9b11 ; function 0x7bbfe1c9b11 <JS Function compress (SharedFunctionInfo 0xc518ec2e0a1)> (input #0)
0x7ffc654cd398: [top + 48] <- 0xc1ff00000000 ; 49663 (input #5)
0x7ffc654cd390: [top + 40] <- 0xc00000000 ; 12 (input #6)
0x7ffc654cd388: [top + 32] <- 0x13f00000000 ; 319 (input #7)
0x7ffc654cd380: [top + 24] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #8)
0x7ffc654cd378: [top + 16] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #9)
0x7ffc654cd370: [top + 8] <- 0x138b00000000 ; 5003 (input #10)
0x7ffc654cd368: [top + 0] <- 0x400000000 ; 4 (input #11)
[deoptimizing (lazy): end 0x7bbfe1c9b11 <JS Function compress (SharedFunctionInfo 0xc518ec2e0a1)> @40 => node=560, pc=0x376e6ff4eb9d, state=NO_REGISTERS, alignment=no padding, took 0.062 ms]
--- FUNCTION SOURCE (compress) id{58,0} ---
(init_bits, outs) {
var fcode, c, i, ent, disp, hsize_reg, hshift;
// Set up the globals: g_init_bits - initial number of bits
g_init_bits = init_bits;
// Set up the necessary values
clear_flg = false;
n_bits = g_init_bits;
maxcode = MAXCODE(n_bits);
ClearCode = 1 << (init_bits - 1);
EOFCode = ClearCode + 1;
free_ent = ClearCode + 2;
a_count = 0; // clear packet
ent = nextPixel();
hshift = 0;
for (fcode = HSIZE; fcode < 65536; fcode *= 2) ++hshift;
hshift = 8 - hshift; // set hash code range bound
hsize_reg = HSIZE;
cl_hash(hsize_reg); // clear hash table
output(ClearCode, outs);
outer_loop: while ((c = nextPixel()) != EOF) {
fcode = (c << BITS) + ent;
i = (c << hshift) ^ ent; // xor hashing
if (htab[i] === fcode) {
ent = codetab[i];
continue;
} else if (htab[i] >= 0) { // non-empty slot
disp = hsize_reg - i; // secondary hash (after G. Knott)
if (i === 0) disp = 1;
do {
if ((i -= disp) < 0) i += hsize_reg;
if (htab[i] === fcode) {
ent = codetab[i];
continue outer_loop;
}
} while (htab[i] >= 0);
}
output(ent, outs);
ent = c;
if (free_ent < 1 << BITS) {
codetab[i] = free_ent++; // code -> hashtable
htab[i] = fcode;
} else {
cl_block(outs);
}
}
// Put out the final code.
output(ent, outs);
output(EOFCode, outs);
}
--- END ---
--- FUNCTION SOURCE (MAXCODE) id{58,1} ---
(n_bits) {
return (1 << n_bits) - 1;
}
--- END ---
INLINE (MAXCODE) id{58,1} AS 1 AT <0:264>
--- FUNCTION SOURCE (nextPixel) id{58,2} ---
() {
if (remaining === 0) return EOF;
--remaining;
var pix = pixels[curPixel++];
return pix & 0xff;
}
--- END ---
INLINE (nextPixel) id{58,2} AS 2 AT <0:424>
--- FUNCTION SOURCE (cl_hash) id{58,3} ---
(hsize) {
for (var i = 0; i < hsize; ++i) htab[i] = -1;
}
--- END ---
INLINE (cl_hash) id{58,3} AS 3 AT <0:596>
--- FUNCTION SOURCE (nextPixel) id{58,4} ---
() {
if (remaining === 0) return EOF;
--remaining;
var pix = pixels[curPixel++];
return pix & 0xff;
}
--- END ---
INLINE (nextPixel) id{58,4} AS 4 AT <0:695>
[deoptimizing (DEOPT soft): begin 0x7bbfe1c9b11 <JS Function compress (SharedFunctionInfo 0xc518ec2e0a1)> (opt #58) @39, FP to SP delta: 168]
;;; deoptimize at 0_1002: Insufficient type feedback for combined type of binary operation
reading input frame compress => node=3, args=419, height=9; inputs:
0: 0x7bbfe1c9b11 ; (frame function) 0x7bbfe1c9b11 <JS Function compress (SharedFunctionInfo 0xc518ec2e0a1)>
1: 0x36cdc0e04131 ; r9 0x36cdc0e04131 <undefined>
2: 0x36cdc0e04131 ; (literal 4) 0x36cdc0e04131 <undefined>
3: 0x3ed23a8fcf31 ; r8 0x3ed23a8fcf31 <a GIFEncoder with map 0x3d4eb9d454f9>
4: 0x7bbfe1c9949 ; rsi 0x7bbfe1c9949 <FixedArray[28]>
5: 258796 ; r12
6: 63 ; r11
7: 284 ; rdi
8: 748 ; rdx
9: 0x36cdc0e04131 ; (literal 4) 0x36cdc0e04131 <undefined>
10: 0x138b00000000 ; rbx 5003
11: 4 ; rax
12: 4719 ; rcx
translating frame compress => node=419, height=64
0x7ffc654cd3d0: [top + 112] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #1)
0x7ffc654cd3c8: [top + 104] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #2)
0x7ffc654cd3c0: [top + 96] <- 0x3ed23a8fcf31 ; 0x3ed23a8fcf31 <a GIFEncoder with map 0x3d4eb9d454f9> (input #3)
0x7ffc654cd3b8: [top + 88] <- 0x376e6ff4e19e ; caller's pc
0x7ffc654cd3b0: [top + 80] <- 0x7ffc654cd3f0 ; caller's fp
0x7ffc654cd3a8: [top + 72] <- 0x7bbfe1c9949 ; context 0x7bbfe1c9949 <FixedArray[28]> (input #4)
0x7ffc654cd3a0: [top + 64] <- 0x7bbfe1c9b11 ; function 0x7bbfe1c9b11 <JS Function compress (SharedFunctionInfo 0xc518ec2e0a1)> (input #0)
0x7ffc654cd398: [top + 56] <- 0x3f2ec00000000 ; 258796 (input #5)
0x7ffc654cd390: [top + 48] <- 0x3f00000000 ; 63 (input #6)
0x7ffc654cd388: [top + 40] <- 0x11c00000000 ; 284 (input #7)
0x7ffc654cd380: [top + 32] <- 0x2ec00000000 ; 748 (input #8)
0x7ffc654cd378: [top + 24] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #9)
0x7ffc654cd370: [top + 16] <- 0x138b00000000 ; 5003 (input #10)
0x7ffc654cd368: [top + 8] <- 0x400000000 ; 4 (input #11)
0x7ffc654cd360: [top + 0] <- 0x126f00000000 ; 4719 (input #12)
[deoptimizing (soft): end 0x7bbfe1c9b11 <JS Function compress (SharedFunctionInfo 0xc518ec2e0a1)> @39 => node=419, pc=0x376e6ff4e954, state=TOS_REG, alignment=no padding, took 0.048 ms]
--- FUNCTION SOURCE (compress) id{59,0} ---
(init_bits, outs) {
var fcode, c, i, ent, disp, hsize_reg, hshift;
// Set up the globals: g_init_bits - initial number of bits
g_init_bits = init_bits;
// Set up the necessary values
clear_flg = false;
n_bits = g_init_bits;
maxcode = MAXCODE(n_bits);
ClearCode = 1 << (init_bits - 1);
EOFCode = ClearCode + 1;
free_ent = ClearCode + 2;
a_count = 0; // clear packet
ent = nextPixel();
hshift = 0;
for (fcode = HSIZE; fcode < 65536; fcode *= 2) ++hshift;
hshift = 8 - hshift; // set hash code range bound
hsize_reg = HSIZE;
cl_hash(hsize_reg); // clear hash table
output(ClearCode, outs);
outer_loop: while ((c = nextPixel()) != EOF) {
fcode = (c << BITS) + ent;
i = (c << hshift) ^ ent; // xor hashing
if (htab[i] === fcode) {
ent = codetab[i];
continue;
} else if (htab[i] >= 0) { // non-empty slot
disp = hsize_reg - i; // secondary hash (after G. Knott)
if (i === 0) disp = 1;
do {
if ((i -= disp) < 0) i += hsize_reg;
if (htab[i] === fcode) {
ent = codetab[i];
continue outer_loop;
}
} while (htab[i] >= 0);
}
output(ent, outs);
ent = c;
if (free_ent < 1 << BITS) {
codetab[i] = free_ent++; // code -> hashtable
htab[i] = fcode;
} else {
cl_block(outs);
}
}
// Put out the final code.
output(ent, outs);
output(EOFCode, outs);
}
--- END ---
--- FUNCTION SOURCE (MAXCODE) id{59,1} ---
(n_bits) {
return (1 << n_bits) - 1;
}
--- END ---
INLINE (MAXCODE) id{59,1} AS 1 AT <0:264>
--- FUNCTION SOURCE (nextPixel) id{59,2} ---
() {
if (remaining === 0) return EOF;
--remaining;
var pix = pixels[curPixel++];
return pix & 0xff;
}
--- END ---
INLINE (nextPixel) id{59,2} AS 2 AT <0:424>
--- FUNCTION SOURCE (cl_hash) id{59,3} ---
(hsize) {
for (var i = 0; i < hsize; ++i) htab[i] = -1;
}
--- END ---
INLINE (cl_hash) id{59,3} AS 3 AT <0:596>
--- FUNCTION SOURCE (nextPixel) id{59,4} ---
() {
if (remaining === 0) return EOF;
--remaining;
var pix = pixels[curPixel++];
return pix & 0xff;
}
--- END ---
INLINE (nextPixel) id{59,4} AS 4 AT <0:695>
--- FUNCTION SOURCE (output) id{60,0} ---
(code, outs) {
cur_accum &= masks[cur_bits];
if (cur_bits > 0) cur_accum |= (code << cur_bits);
else cur_accum = code;
cur_bits += n_bits;
while (cur_bits >= 8) {
char_out((cur_accum & 0xff), outs);
cur_accum >>= 8;
cur_bits -= 8;
}
// If the next entry is going to be too big for the code size,
// then increase it, if possible.
if (free_ent > maxcode || clear_flg) {
if (clear_flg) {
maxcode = MAXCODE(n_bits = g_init_bits);
clear_flg = false;
} else {
++n_bits;
if (n_bits == BITS) maxcode = 1 << BITS;
else maxcode = MAXCODE(n_bits);
}
}
if (code == EOFCode) {
// At EOF, write the rest of the buffer.
while (cur_bits > 0) {
char_out((cur_accum & 0xff), outs);
cur_accum >>= 8;
cur_bits -= 8;
}
flush_char(outs);
}
}
--- END ---
--- FUNCTION SOURCE (char_out) id{60,1} ---
(c, outs) {
accum[a_count++] = c;
if (a_count >= 254) flush_char(outs);
}
--- END ---
INLINE (char_out) id{60,1} AS 1 AT <0:192>
--- FUNCTION SOURCE (flush_char) id{60,2} ---
(outs) {
if (a_count > 0) {
outs.writeByte(a_count);
outs.writeBytes(accum, 0, a_count);
a_count = 0;
}
}
--- END ---
INLINE (flush_char) id{60,2} AS 2 AT <1:62>
--- FUNCTION SOURCE (ByteCapacitor.writeByte) id{60,3} ---
(val) {
this.data.push(val);
}
--- END ---
INLINE (ByteCapacitor.writeByte) id{60,3} AS 3 AT <2:43>
--- FUNCTION SOURCE (ByteCapacitor.writeBytes) id{60,4} ---
(array, offset, length) {
for (var l = length || array.length, i = offset || 0; i < l; i++) {
this.writeByte(array[i]);
}
}
--- END ---
INLINE (ByteCapacitor.writeBytes) id{60,4} AS 4 AT <2:74>
--- FUNCTION SOURCE (ByteCapacitor.writeByte) id{60,5} ---
(val) {
this.data.push(val);
}
--- END ---
INLINE (ByteCapacitor.writeByte) id{60,5} AS 5 AT <4:105>
--- FUNCTION SOURCE (MAXCODE) id{60,6} ---
(n_bits) {
return (1 << n_bits) - 1;
}
--- END ---
INLINE (MAXCODE) id{60,6} AS 6 AT <0:631>
[deoptimizing (DEOPT soft): begin 0x7bbfe1c9c79 <JS Function output (SharedFunctionInfo 0xc518ec2e3e9)> (opt #60) @36, FP to SP delta: 72]
;;; deoptimize at 0_599: Insufficient type feedback for RHS of binary operation
reading input frame output => node=3, args=268, height=1; inputs:
0: 0x7bbfe1c9c79 ; (frame function) 0x7bbfe1c9c79 <JS Function output (SharedFunctionInfo 0xc518ec2e3e9)>
1: 0x36cdc0ec8a59 ; [fp + 32] 0x36cdc0ec8a59 <JS Global Object>
2: 0x64500000000 ; [fp + 24] 1605
3: 0x3ed23a8fcf31 ; r8 0x3ed23a8fcf31 <a GIFEncoder with map 0x3d4eb9d454f9>
4: 0x7bbfe1c9949 ; rax 0x7bbfe1c9949 <FixedArray[28]>
translating frame output => node=268, height=0
0x7ffc654cd2f8: [top + 48] <- 0x36cdc0ec8a59 ; 0x36cdc0ec8a59 <JS Global Object> (input #1)
0x7ffc654cd2f0: [top + 40] <- 0x64500000000 ; 1605 (input #2)
0x7ffc654cd2e8: [top + 32] <- 0x3ed23a8fcf31 ; 0x3ed23a8fcf31 <a GIFEncoder with map 0x3d4eb9d454f9> (input #3)
0x7ffc654cd2e0: [top + 24] <- 0x376e6ff545c4 ; caller's pc
0x7ffc654cd2d8: [top + 16] <- 0x7ffc654cd3b0 ; caller's fp
0x7ffc654cd2d0: [top + 8] <- 0x7bbfe1c9949 ; context 0x7bbfe1c9949 <FixedArray[28]> (input #4)
0x7ffc654cd2c8: [top + 0] <- 0x7bbfe1c9c79 ; function 0x7bbfe1c9c79 <JS Function output (SharedFunctionInfo 0xc518ec2e3e9)> (input #0)
[deoptimizing (soft): end 0x7bbfe1c9c79 <JS Function output (SharedFunctionInfo 0xc518ec2e3e9)> @36 => node=268, pc=0x376e6ff4f8ca, state=NO_REGISTERS, alignment=no padding, took 0.034 ms]
--- FUNCTION SOURCE (output) id{61,0} ---
(code, outs) {
cur_accum &= masks[cur_bits];
if (cur_bits > 0) cur_accum |= (code << cur_bits);
else cur_accum = code;
cur_bits += n_bits;
while (cur_bits >= 8) {
char_out((cur_accum & 0xff), outs);
cur_accum >>= 8;
cur_bits -= 8;
}
// If the next entry is going to be too big for the code size,
// then increase it, if possible.
if (free_ent > maxcode || clear_flg) {
if (clear_flg) {
maxcode = MAXCODE(n_bits = g_init_bits);
clear_flg = false;
} else {
++n_bits;
if (n_bits == BITS) maxcode = 1 << BITS;
else maxcode = MAXCODE(n_bits);
}
}
if (code == EOFCode) {
// At EOF, write the rest of the buffer.
while (cur_bits > 0) {
char_out((cur_accum & 0xff), outs);
cur_accum >>= 8;
cur_bits -= 8;
}
flush_char(outs);
}
}
--- END ---
--- FUNCTION SOURCE (char_out) id{61,1} ---
(c, outs) {
accum[a_count++] = c;
if (a_count >= 254) flush_char(outs);
}
--- END ---
INLINE (char_out) id{61,1} AS 1 AT <0:192>
--- FUNCTION SOURCE (flush_char) id{61,2} ---
(outs) {
if (a_count > 0) {
outs.writeByte(a_count);
outs.writeBytes(accum, 0, a_count);
a_count = 0;
}
}
--- END ---
INLINE (flush_char) id{61,2} AS 2 AT <1:62>
--- FUNCTION SOURCE (ByteCapacitor.writeByte) id{61,3} ---
(val) {
this.data.push(val);
}
--- END ---
INLINE (ByteCapacitor.writeByte) id{61,3} AS 3 AT <2:43>
--- FUNCTION SOURCE (ByteCapacitor.writeBytes) id{61,4} ---
(array, offset, length) {
for (var l = length || array.length, i = offset || 0; i < l; i++) {
this.writeByte(array[i]);
}
}
--- END ---
INLINE (ByteCapacitor.writeBytes) id{61,4} AS 4 AT <2:74>
--- FUNCTION SOURCE (ByteCapacitor.writeByte) id{61,5} ---
(val) {
this.data.push(val);
}
--- END ---
INLINE (ByteCapacitor.writeByte) id{61,5} AS 5 AT <4:105>
--- FUNCTION SOURCE (MAXCODE) id{61,6} ---
(n_bits) {
return (1 << n_bits) - 1;
}
--- END ---
INLINE (MAXCODE) id{61,6} AS 6 AT <0:631>
[deoptimizing (DEOPT soft): begin 0x7bbfe1c9c79 <JS Function output (SharedFunctionInfo 0xc518ec2e3e9)> (opt #61) @40, FP to SP delta: 72]
;;; deoptimize at 0_759: Insufficient type feedback for combined type of binary operation
reading input frame output => node=3, args=329, height=1; inputs:
0: 0x7bbfe1c9c79 ; (frame function) 0x7bbfe1c9c79 <JS Function output (SharedFunctionInfo 0xc518ec2e3e9)>
1: 0x36cdc0e04131 ; [fp + 32] 0x36cdc0e04131 <undefined>
2: 0x10100000000 ; [fp + 24] 257
3: 0x3ed23a8fcf31 ; [fp + 16] 0x3ed23a8fcf31 <a GIFEncoder with map 0x3d4eb9d454f9>
4: 0x7bbfe1c9949 ; rbx 0x7bbfe1c9949 <FixedArray[28]>
translating frame output => node=329, height=0
0x7ffc654cd2f8: [top + 48] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #1)
0x7ffc654cd2f0: [top + 40] <- 0x10100000000 ; 257 (input #2)
0x7ffc654cd2e8: [top + 32] <- 0x3ed23a8fcf31 ; 0x3ed23a8fcf31 <a GIFEncoder with map 0x3d4eb9d454f9> (input #3)
0x7ffc654cd2e0: [top + 24] <- 0x376e6ff547eb ; caller's pc
0x7ffc654cd2d8: [top + 16] <- 0x7ffc654cd3b0 ; caller's fp
0x7ffc654cd2d0: [top + 8] <- 0x7bbfe1c9949 ; context 0x7bbfe1c9949 <FixedArray[28]> (input #4)
0x7ffc654cd2c8: [top + 0] <- 0x7bbfe1c9c79 ; function 0x7bbfe1c9c79 <JS Function output (SharedFunctionInfo 0xc518ec2e3e9)> (input #0)
[deoptimizing (soft): end 0x7bbfe1c9c79 <JS Function output (SharedFunctionInfo 0xc518ec2e3e9)> @40 => node=329, pc=0x376e6ff4fb90, state=NO_REGISTERS, alignment=no padding, took 0.034 ms]
--- FUNCTION SOURCE (Float64Array) id{62,0} ---
(O,P,Q){
if(%_IsConstructCall()){
if((%_ClassOf(O)==='ArrayBuffer')||(%_ClassOf(O)==='SharedArrayBuffer')){
Float64ArrayConstructByArrayBuffer(this,O,P,Q);
}else if((typeof(O)==='number')||(typeof(O)==='string')||
(typeof(O)==='boolean')||(O===(void 0))){
Float64ArrayConstructByLength(this,O);
}else{
var J=O[symbolIterator];
if((J===(void 0))||J===$arrayValues){
Float64ArrayConstructByArrayLike(this,O);
}else{
Float64ArrayConstructByIterable(this,O,J);
}
}
}else{
throw MakeTypeError(20,"Float64Array")
}
}
--- END ---
--- FUNCTION SOURCE (learn) id{63,0} ---
() {
var i;
var lengthcount = pixels.length;
var alphadec = 30 + ((samplefac - 1) / 3);
var samplepixels = lengthcount / (3 * samplefac);
var delta = ~~(samplepixels / ncycles);
var alpha = initalpha;
var radius = initradius;
var rad = radius >> radiusbiasshift;
if (rad <= 1) rad = 0;
for (i = 0; i < rad; i++)
radpower[i] = alpha * (((rad * rad - i * i) * radbias) / (rad * rad));
var step;
if (lengthcount < minpicturebytes) {
samplefac = 1;
step = 3;
} else if ((lengthcount % prime1) !== 0) {
step = 3 * prime1;
} else if ((lengthcount % prime2) !== 0) {
step = 3 * prime2;
} else if ((lengthcount % prime3) !== 0) {
step = 3 * prime3;
} else {
step = 3 * prime4;
}
var b, g, r, j;
var pix = 0; // current pixel
i = 0;
while (i < samplepixels) {
b = (pixels[pix] & 0xff) << netbiasshift;
g = (pixels[pix + 1] & 0xff) << netbiasshift;
r = (pixels[pix + 2] & 0xff) << netbiasshift;
j = contest(b, g, r);
altersingle(alpha, j, b, g, r);
if (rad !== 0) alterneigh(rad, j, b, g, r); // alter neighbours
pix += step;
if (pix >= lengthcount) pix -= lengthcount;
i++;
if (delta === 0) delta = 1;
if (i % delta === 0) {
alpha -= alpha / alphadec;
radius -= radius / radiusdec;
rad = radius >> radiusbiasshift;
if (rad <= 1) rad = 0;
for (j = 0; j < rad; j++)
radpower[j] = alpha * (((rad * rad - j * j) * radbias) / (rad * rad));
}
}
}
--- END ---
--- FUNCTION SOURCE (inxbuild) id{64,0} ---
() {
var i, j, p, q, smallpos, smallval, previouscol = 0, startpos = 0;
for (i = 0; i < netsize; i++) {
p = network[i];
smallpos = i;
smallval = p[1]; // index on g
// find smallest in i..netsize-1
for (j = i + 1; j < netsize; j++) {
q = network[j];
if (q[1] < smallval) { // index on g
smallpos = j;
smallval = q[1]; // index on g
}
}
q = network[smallpos];
// swap p (i) and q (smallpos) entries
if (i != smallpos) {
j = q[0]; q[0] = p[0]; p[0] = j;
j = q[1]; q[1] = p[1]; p[1] = j;
j = q[2]; q[2] = p[2]; p[2] = j;
j = q[3]; q[3] = p[3]; p[3] = j;
}
// smallval entry is now in position i
if (smallval != previouscol) {
netindex[previouscol] = (startpos + i) >> 1;
for (j = previouscol + 1; j < smallval; j++)
netindex[j] = i;
previouscol = smallval;
startpos = i;
}
}
netindex[previouscol] = (startpos + maxnetpos) >> 1;
for (j = previouscol + 1; j < 256; j++)
netindex[j] = maxnetpos; // really 256
}
--- END ---
--- FUNCTION SOURCE (GIFEncoder.analyzePixels) id{65,0} ---
() {
var len = this.pixels.length;
var nPix = len / 3;
// TODO: Re-use indexedPixels
this.indexedPixels = new Uint8Array(nPix);
var imgq = new NeuQuant(this.pixels, this.sample);
imgq.buildColormap(); // create reduced palette
this.colorTab = imgq.getColormap();
// map image pixels to new palette
var k = 0;
for (var j = 0; j < nPix; j++) {
var index = imgq.lookupRGB(
this.pixels[k++] & 0xff,
this.pixels[k++] & 0xff,
this.pixels[k++] & 0xff
);
this.usedEntry[index] = true;
this.indexedPixels[j] = index;
}
this.pixels = null;
this.colorDepth = 8;
this.palSize = 7;
// get closest match to transparent color if specified
if (this.transparent !== null) {
this.transIndex = this.findClosest(this.transparent);
}
}
--- END ---
--- FUNCTION SOURCE (getColormap) id{65,1} ---
() {
var map = [];
var index = [];
for (var i = 0; i < netsize; i++)
index[network[i][3]] = i;
var k = 0;
for (var l = 0; l < netsize; l++) {
var j = index[l];
map[k++] = (network[j][0]);
map[k++] = (network[j][1]);
map[k++] = (network[j][2]);
}
return map;
}
--- END ---
INLINE (getColormap) id{65,1} AS 1 AT <0:264>
[deoptimizing (DEOPT eager): begin 0x2ac96395d1e1 <JS Function ByteCapacitor.writeByte (SharedFunctionInfo 0x2ac96394aca1)> (opt #54) @3, FP to SP delta: 24]
;;; deoptimize at 0_20: wrong map
reading input frame ByteCapacitor.writeByte => node=2, args=3, height=1; inputs:
0: 0x2ac96395d1e1 ; (frame function) 0x2ac96395d1e1 <JS Function ByteCapacitor.writeByte (SharedFunctionInfo 0x2ac96394aca1)>
1: 0x3ed23a8fcf31 ; rbx 0x3ed23a8fcf31 <a GIFEncoder with map 0x3d4eb9d454f9>
2: 0x2100000000 ; [fp + 16] 33
3: 0x100fecf7fb11 ; [fp - 24] 0x100fecf7fb11 <FixedArray[8]>
translating frame ByteCapacitor.writeByte => node=3, height=0
0x7ffc654cd400: [top + 40] <- 0x3ed23a8fcf31 ; 0x3ed23a8fcf31 <a GIFEncoder with map 0x3d4eb9d454f9> (input #1)
0x7ffc654cd3f8: [top + 32] <- 0x2100000000 ; 33 (input #2)
0x7ffc654cd3f0: [top + 24] <- 0x376e6ff4cf7a ; caller's pc
0x7ffc654cd3e8: [top + 16] <- 0x7ffc654cd430 ; caller's fp
0x7ffc654cd3e0: [top + 8] <- 0x100fecf7fb11 ; context 0x100fecf7fb11 <FixedArray[8]> (input #3)
0x7ffc654cd3d8: [top + 0] <- 0x2ac96395d1e1 ; function 0x2ac96395d1e1 <JS Function ByteCapacitor.writeByte (SharedFunctionInfo 0x2ac96394aca1)> (input #0)
[deoptimizing (eager): end 0x2ac96395d1e1 <JS Function ByteCapacitor.writeByte (SharedFunctionInfo 0x2ac96394aca1)> @3 => node=3, pc=0x376e6ff38cde, state=NO_REGISTERS, alignment=no padding, took 0.043 ms]
--- FUNCTION SOURCE (ByteCapacitor.writeByte) id{66,0} ---
(val) {
this.data.push(val);
}
--- END ---
[deoptimizing (DEOPT eager): begin 0x7bbfe085861 <JS Function compress (SharedFunctionInfo 0xc518ec2e0a1)> (opt #59) @25, FP to SP delta: 176]
;;; deoptimize at 0_695: value mismatch
reading input frame compress => node=3, args=274, height=8; inputs:
0: 0x7bbfe085861 ; (frame function) 0x7bbfe085861 <JS Function compress (SharedFunctionInfo 0xc518ec2e0a1)>
1: 0x36cdc0e04131 ; r9 0x36cdc0e04131 <undefined>
2: 0x36cdc0e04131 ; (literal 4) 0x36cdc0e04131 <undefined>
3: 0x3ed23a8fcf31 ; r8 0x3ed23a8fcf31 <a GIFEncoder with map 0x3d4eb9d454f9>
4: 0x7bbfe085699 ; rsi 0x7bbfe085699 <FixedArray[28]>
5: 0x36cdc0e04131 ; (literal 4) 0x36cdc0e04131 <undefined>
6: 0x36cdc0e04131 ; (literal 4) 0x36cdc0e04131 <undefined>
7: 0x36cdc0e04131 ; (literal 4) 0x36cdc0e04131 <undefined>
8: 329 ; rdx
9: 0x36cdc0e04131 ; (literal 4) 0x36cdc0e04131 <undefined>
10: 5003 ; rbx
11: 4 ; (int) [fp - 120]
translating frame compress => node=274, height=56
0x7ffc654cd3d0: [top + 104] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #1)
0x7ffc654cd3c8: [top + 96] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #2)
0x7ffc654cd3c0: [top + 88] <- 0x3ed23a8fcf31 ; 0x3ed23a8fcf31 <a GIFEncoder with map 0x3d4eb9d454f9> (input #3)
0x7ffc654cd3b8: [top + 80] <- 0x376e6ff4e19e ; caller's pc
0x7ffc654cd3b0: [top + 72] <- 0x7ffc654cd3f0 ; caller's fp
0x7ffc654cd3a8: [top + 64] <- 0x7bbfe085699 ; context 0x7bbfe085699 <FixedArray[28]> (input #4)
0x7ffc654cd3a0: [top + 56] <- 0x7bbfe085861 ; function 0x7bbfe085861 <JS Function compress (SharedFunctionInfo 0xc518ec2e0a1)> (input #0)
0x7ffc654cd398: [top + 48] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #5)
0x7ffc654cd390: [top + 40] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #6)
0x7ffc654cd388: [top + 32] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #7)
0x7ffc654cd380: [top + 24] <- 0x14900000000 ; 329 (input #8)
0x7ffc654cd378: [top + 16] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #9)
0x7ffc654cd370: [top + 8] <- 0x138b00000000 ; 5003 (input #10)
0x7ffc654cd368: [top + 0] <- 0x400000000 ; 4 (input #11)
[deoptimizing (eager): end 0x7bbfe085861 <JS Function compress (SharedFunctionInfo 0xc518ec2e0a1)> @25 => node=274, pc=0x376e6ff4ed15, state=NO_REGISTERS, alignment=no padding, took 0.045 ms]
--- FUNCTION SOURCE (compress) id{67,0} ---
(init_bits, outs) {
var fcode, c, i, ent, disp, hsize_reg, hshift;
// Set up the globals: g_init_bits - initial number of bits
g_init_bits = init_bits;
// Set up the necessary values
clear_flg = false;
n_bits = g_init_bits;
maxcode = MAXCODE(n_bits);
ClearCode = 1 << (init_bits - 1);
EOFCode = ClearCode + 1;
free_ent = ClearCode + 2;
a_count = 0; // clear packet
ent = nextPixel();
hshift = 0;
for (fcode = HSIZE; fcode < 65536; fcode *= 2) ++hshift;
hshift = 8 - hshift; // set hash code range bound
hsize_reg = HSIZE;
cl_hash(hsize_reg); // clear hash table
output(ClearCode, outs);
outer_loop: while ((c = nextPixel()) != EOF) {
fcode = (c << BITS) + ent;
i = (c << hshift) ^ ent; // xor hashing
if (htab[i] === fcode) {
ent = codetab[i];
continue;
} else if (htab[i] >= 0) { // non-empty slot
disp = hsize_reg - i; // secondary hash (after G. Knott)
if (i === 0) disp = 1;
do {
if ((i -= disp) < 0) i += hsize_reg;
if (htab[i] === fcode) {
ent = codetab[i];
continue outer_loop;
}
} while (htab[i] >= 0);
}
output(ent, outs);
ent = c;
if (free_ent < 1 << BITS) {
codetab[i] = free_ent++; // code -> hashtable
htab[i] = fcode;
} else {
cl_block(outs);
}
}
// Put out the final code.
output(ent, outs);
output(EOFCode, outs);
}
--- END ---
--- FUNCTION SOURCE (cl_block) id{67,1} ---
(outs) {
cl_hash(HSIZE);
free_ent = ClearCode + 2;
clear_flg = true;
output(ClearCode, outs);
}
--- END ---
INLINE (cl_block) id{67,1} AS 1 AT <0:1405>
--- FUNCTION SOURCE (cl_hash) id{67,2} ---
(hsize) {
for (var i = 0; i < hsize; ++i) htab[i] = -1;
}
--- END ---
INLINE (cl_hash) id{67,2} AS 2 AT <1:13>
--- FUNCTION SOURCE (ByteCapacitor.writeBytes) id{68,0} ---
(array, offset, length) {
for (var l = length || array.length, i = offset || 0; i < l; i++) {
this.writeByte(array[i]);
}
}
--- END ---
--- FUNCTION SOURCE (ByteCapacitor.writeByte) id{68,1} ---
(val) {
this.data.push(val);
}
--- END ---
INLINE (ByteCapacitor.writeByte) id{68,1} AS 1 AT <0:105>
--- FUNCTION SOURCE (output) id{69,0} ---
(code, outs) {
cur_accum &= masks[cur_bits];
if (cur_bits > 0) cur_accum |= (code << cur_bits);
else cur_accum = code;
cur_bits += n_bits;
while (cur_bits >= 8) {
char_out((cur_accum & 0xff), outs);
cur_accum >>= 8;
cur_bits -= 8;
}
// If the next entry is going to be too big for the code size,
// then increase it, if possible.
if (free_ent > maxcode || clear_flg) {
if (clear_flg) {
maxcode = MAXCODE(n_bits = g_init_bits);
clear_flg = false;
} else {
++n_bits;
if (n_bits == BITS) maxcode = 1 << BITS;
else maxcode = MAXCODE(n_bits);
}
}
if (code == EOFCode) {
// At EOF, write the rest of the buffer.
while (cur_bits > 0) {
char_out((cur_accum & 0xff), outs);
cur_accum >>= 8;
cur_bits -= 8;
}
flush_char(outs);
}
}
--- END ---
--- FUNCTION SOURCE (MAXCODE) id{69,1} ---
(n_bits) {
return (1 << n_bits) - 1;
}
--- END ---
INLINE (MAXCODE) id{69,1} AS 1 AT <0:468>
--- FUNCTION SOURCE (char_out) id{69,2} ---
(c, outs) {
accum[a_count++] = c;
if (a_count >= 254) flush_char(outs);
}
--- END ---
INLINE (char_out) id{69,2} AS 2 AT <0:774>
--- FUNCTION SOURCE (flush_char) id{69,3} ---
(outs) {
if (a_count > 0) {
outs.writeByte(a_count);
outs.writeBytes(accum, 0, a_count);
a_count = 0;
}
}
--- END ---
INLINE (flush_char) id{69,3} AS 3 AT <0:872>
--- FUNCTION SOURCE (ByteCapacitor.writeByte) id{69,4} ---
(val) {
this.data.push(val);
}
--- END ---
INLINE (ByteCapacitor.writeByte) id{69,4} AS 4 AT <3:43>
--- FUNCTION SOURCE (ByteCapacitor.writeBytes) id{69,5} ---
(array, offset, length) {
for (var l = length || array.length, i = offset || 0; i < l; i++) {
this.writeByte(array[i]);
}
}
--- END ---
INLINE (ByteCapacitor.writeBytes) id{69,5} AS 5 AT <3:74>
--- FUNCTION SOURCE (ByteCapacitor.writeByte) id{69,6} ---
(val) {
this.data.push(val);
}
--- END ---
INLINE (ByteCapacitor.writeByte) id{69,6} AS 6 AT <5:105>
[deoptimizing (DEOPT eager): begin 0x7bbfe085861 <JS Function compress (SharedFunctionInfo 0xc518ec2e0a1)> (opt #67) @31, FP to SP delta: 192]
;;; deoptimize at 0_1405: value mismatch
reading input frame compress => node=3, args=586, height=8; inputs:
0: 0x7bbfe085861 ; (frame function) 0x7bbfe085861 <JS Function compress (SharedFunctionInfo 0xc518ec2e0a1)>
1: 0x36cdc0e04131 ; [fp - 152] 0x36cdc0e04131 <undefined>
2: 0x36cdc0e04131 ; (literal 3) 0x36cdc0e04131 <undefined>
3: 0x3ed23a8fcf31 ; [fp - 144] 0x3ed23a8fcf31 <a GIFEncoder with map 0x3d4eb9d454f9>
4: 0x7bbfe085699 ; rax 0x7bbfe085699 <FixedArray[28]>
5: 0x36cdc0e04131 ; (literal 3) 0x36cdc0e04131 <undefined>
6: 0x36cdc0e04131 ; (literal 3) 0x36cdc0e04131 <undefined>
7: 0x36cdc0e04131 ; (literal 3) 0x36cdc0e04131 <undefined>
8: 0x4e00000000 ; [fp - 168] 78
9: 0x36cdc0e04131 ; (literal 3) 0x36cdc0e04131 <undefined>
10: 5003 ; (int) [fp - 128]
11: 4 ; (int) [fp - 120]
translating frame compress => node=586, height=56
0x7ffc654cd3d0: [top + 104] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #1)
0x7ffc654cd3c8: [top + 96] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #2)
0x7ffc654cd3c0: [top + 88] <- 0x3ed23a8fcf31 ; 0x3ed23a8fcf31 <a GIFEncoder with map 0x3d4eb9d454f9> (input #3)
0x7ffc654cd3b8: [top + 80] <- 0x376e6ff4e19e ; caller's pc
0x7ffc654cd3b0: [top + 72] <- 0x7ffc654cd3f0 ; caller's fp
0x7ffc654cd3a8: [top + 64] <- 0x7bbfe085699 ; context 0x7bbfe085699 <FixedArray[28]> (input #4)
0x7ffc654cd3a0: [top + 56] <- 0x7bbfe085861 ; function 0x7bbfe085861 <JS Function compress (SharedFunctionInfo 0xc518ec2e0a1)> (input #0)
0x7ffc654cd398: [top + 48] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #5)
0x7ffc654cd390: [top + 40] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #6)
0x7ffc654cd388: [top + 32] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #7)
0x7ffc654cd380: [top + 24] <- 0x4e00000000 ; 78 (input #8)
0x7ffc654cd378: [top + 16] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #9)
0x7ffc654cd370: [top + 8] <- 0x138b00000000 ; 5003 (input #10)
0x7ffc654cd368: [top + 0] <- 0x400000000 ; 4 (input #11)
[deoptimizing (eager): end 0x7bbfe085861 <JS Function compress (SharedFunctionInfo 0xc518ec2e0a1)> @31 => node=586, pc=0x376e6ff4ecbc, state=NO_REGISTERS, alignment=no padding, took 0.046 ms]
[deoptimizing (DEOPT eager): begin 0x7bbfe0859c9 <JS Function output (SharedFunctionInfo 0xc518ec2e3e9)> (opt #69) @15, FP to SP delta: 96]
;;; deoptimize at 0_468: value mismatch
reading input frame output => node=3, args=237, height=4; inputs:
0: 0x7bbfe0859c9 ; (frame function) 0x7bbfe0859c9 <JS Function output (SharedFunctionInfo 0xc518ec2e3e9)>
1: 0x36cdc0e04131 ; [fp + 32] 0x36cdc0e04131 <undefined>
2: 0x10000000000 ; [fp + 24] 256
3: 0x3ed23a8fcf31 ; [fp + 16] 0x3ed23a8fcf31 <a GIFEncoder with map 0x3d4eb9d454f9>
4: 0x7bbfe085699 ; rbx 0x7bbfe085699 <FixedArray[28]>
5: 0x7bbfe085939 ; rsi 0x7bbfe085939 <JS Function MAXCODE (SharedFunctionInfo 0xc518ec2e299)>
6: 0x36cdc0e04131 ; (literal 6) 0x36cdc0e04131 <undefined>
7: 0x900000000 ; rdi 9
translating frame output => node=237, height=24
0x7ffc654cd320: [top + 72] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #1)
0x7ffc654cd318: [top + 64] <- 0x10000000000 ; 256 (input #2)
0x7ffc654cd310: [top + 56] <- 0x3ed23a8fcf31 ; 0x3ed23a8fcf31 <a GIFEncoder with map 0x3d4eb9d454f9> (input #3)
0x7ffc654cd308: [top + 48] <- 0x376e6ff57e0d ; caller's pc
0x7ffc654cd300: [top + 40] <- 0x7ffc654cd340 ; caller's fp
0x7ffc654cd2f8: [top + 32] <- 0x7bbfe085699 ; context 0x7bbfe085699 <FixedArray[28]> (input #4)
0x7ffc654cd2f0: [top + 24] <- 0x7bbfe0859c9 ; function 0x7bbfe0859c9 <JS Function output (SharedFunctionInfo 0xc518ec2e3e9)> (input #0)
0x7ffc654cd2e8: [top + 16] <- 0x7bbfe085939 ; 0x7bbfe085939 <JS Function MAXCODE (SharedFunctionInfo 0xc518ec2e299)> (input #5)
0x7ffc654cd2e0: [top + 8] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #6)
0x7ffc654cd2d8: [top + 0] <- 0x900000000 ; 9 (input #7)
[deoptimizing (eager): end 0x7bbfe0859c9 <JS Function output (SharedFunctionInfo 0xc518ec2e3e9)> @15 => node=237, pc=0x376e6ff4f791, state=TOS_REG, alignment=no padding, took 0.034 ms]
--- FUNCTION SOURCE (compress) id{70,0} ---
(init_bits, outs) {
var fcode, c, i, ent, disp, hsize_reg, hshift;
// Set up the globals: g_init_bits - initial number of bits
g_init_bits = init_bits;
// Set up the necessary values
clear_flg = false;
n_bits = g_init_bits;
maxcode = MAXCODE(n_bits);
ClearCode = 1 << (init_bits - 1);
EOFCode = ClearCode + 1;
free_ent = ClearCode + 2;
a_count = 0; // clear packet
ent = nextPixel();
hshift = 0;
for (fcode = HSIZE; fcode < 65536; fcode *= 2) ++hshift;
hshift = 8 - hshift; // set hash code range bound
hsize_reg = HSIZE;
cl_hash(hsize_reg); // clear hash table
output(ClearCode, outs);
outer_loop: while ((c = nextPixel()) != EOF) {
fcode = (c << BITS) + ent;
i = (c << hshift) ^ ent; // xor hashing
if (htab[i] === fcode) {
ent = codetab[i];
continue;
} else if (htab[i] >= 0) { // non-empty slot
disp = hsize_reg - i; // secondary hash (after G. Knott)
if (i === 0) disp = 1;
do {
if ((i -= disp) < 0) i += hsize_reg;
if (htab[i] === fcode) {
ent = codetab[i];
continue outer_loop;
}
} while (htab[i] >= 0);
}
output(ent, outs);
ent = c;
if (free_ent < 1 << BITS) {
codetab[i] = free_ent++; // code -> hashtable
htab[i] = fcode;
} else {
cl_block(outs);
}
}
// Put out the final code.
output(ent, outs);
output(EOFCode, outs);
}
--- END ---
[deoptimizing (DEOPT eager): begin 0x7bbfe085861 <JS Function compress (SharedFunctionInfo 0xc518ec2e0a1)> (opt #70) @44, FP to SP delta: 184]
;;; deoptimize at 0_1471: value mismatch
reading input frame compress => node=3, args=275, height=8; inputs:
0: 0x7bbfe085861 ; (frame function) 0x7bbfe085861 <JS Function compress (SharedFunctionInfo 0xc518ec2e0a1)>
1: 0x36cdc0e04131 ; [fp - 152] 0x36cdc0e04131 <undefined>
2: 0x36cdc0e04131 ; (literal 1) 0x36cdc0e04131 <undefined>
3: 0x3ed23a8fcf31 ; [fp - 144] 0x3ed23a8fcf31 <a GIFEncoder with map 0x3d4eb9d454f9>
4: 0x7bbfe085699 ; rax 0x7bbfe085699 <FixedArray[28]>
5: 0x36cdc0e04131 ; (literal 1) 0x36cdc0e04131 <undefined>
6: 0x36cdc0e04131 ; (literal 1) 0x36cdc0e04131 <undefined>
7: 0x36cdc0e04131 ; (literal 1) 0x36cdc0e04131 <undefined>
8: 1137 ; rsi
9: 0x36cdc0e04131 ; (literal 1) 0x36cdc0e04131 <undefined>
10: 0x36cdc0e04131 ; (literal 1) 0x36cdc0e04131 <undefined>
11: 0x36cdc0e04131 ; (literal 1) 0x36cdc0e04131 <undefined>
translating frame compress => node=275, height=56
0x7ffc654cd3d0: [top + 104] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #1)
0x7ffc654cd3c8: [top + 96] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #2)
0x7ffc654cd3c0: [top + 88] <- 0x3ed23a8fcf31 ; 0x3ed23a8fcf31 <a GIFEncoder with map 0x3d4eb9d454f9> (input #3)
0x7ffc654cd3b8: [top + 80] <- 0x376e6ff4e19e ; caller's pc
0x7ffc654cd3b0: [top + 72] <- 0x7ffc654cd3f0 ; caller's fp
0x7ffc654cd3a8: [top + 64] <- 0x7bbfe085699 ; context 0x7bbfe085699 <FixedArray[28]> (input #4)
0x7ffc654cd3a0: [top + 56] <- 0x7bbfe085861 ; function 0x7bbfe085861 <JS Function compress (SharedFunctionInfo 0xc518ec2e0a1)> (input #0)
0x7ffc654cd398: [top + 48] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #5)
0x7ffc654cd390: [top + 40] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #6)
0x7ffc654cd388: [top + 32] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #7)
0x7ffc654cd380: [top + 24] <- 0x47100000000 ; 1137 (input #8)
0x7ffc654cd378: [top + 16] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #9)
0x7ffc654cd370: [top + 8] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #10)
0x7ffc654cd368: [top + 0] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #11)
[deoptimizing (eager): end 0x7bbfe085861 <JS Function compress (SharedFunctionInfo 0xc518ec2e0a1)> @44 => node=275, pc=0x376e6ff4ed1a, state=NO_REGISTERS, alignment=no padding, took 0.047 ms]
[marking dependent code 0x376e6ff61d21 (opt #65) for deoptimization, reason: prototype-check]
[deoptimize marked code in all contexts]
[deoptimizer unlinked: GIFEncoder.analyzePixels / 2ac96395d689]
[deoptimizing (DEOPT lazy): begin 0x2ac96395d689 <JS Function GIFEncoder.analyzePixels (SharedFunctionInfo 0x2ac96394b679)> (opt #65) @9, FP to SP delta: 152]
reading input frame GIFEncoder.analyzePixels => node=1, args=99, height=8; inputs:
0: 0x2ac96395d689 ; (frame function) 0x2ac96395d689 <JS Function GIFEncoder.analyzePixels (SharedFunctionInfo 0x2ac96394b679)>
1: 0x3ed23a8fcf31 ; [fp + 16] 0x3ed23a8fcf31 <a GIFEncoder with map 0x3d4eb9d454f9>
2: 0x100fecf7fb11 ; [fp - 72] 0x100fecf7fb11 <FixedArray[8]>
3: 0x36cdc0e04131 ; (literal 2) 0x36cdc0e04131 <undefined>
4: 360000 ; (int) [fp - 80]
5: 0x36cdc0e04131 ; (literal 2) 0x36cdc0e04131 <undefined>
6: 0x36cdc0e04131 ; (literal 2) 0x36cdc0e04131 <undefined>
7: 0x36cdc0e04131 ; (literal 2) 0x36cdc0e04131 <undefined>
8: 0x36cdc0e04131 ; (literal 2) 0x36cdc0e04131 <undefined>
9: 0x7bbfe0db2a9 ; rax 0x7bbfe0db2a9 <a NeuQuant with map 0x3d4eb9d404e1>
translating frame GIFEncoder.analyzePixels => node=99, height=56
0x7ffc654cd438: [top + 88] <- 0x3ed23a8fcf31 ; 0x3ed23a8fcf31 <a GIFEncoder with map 0x3d4eb9d454f9> (input #1)
0x7ffc654cd430: [top + 80] <- 0x376e6ff3e4d3 ; caller's pc
0x7ffc654cd428: [top + 72] <- 0x7ffc654cd458 ; caller's fp
0x7ffc654cd420: [top + 64] <- 0x100fecf7fb11 ; context 0x100fecf7fb11 <FixedArray[8]> (input #2)
0x7ffc654cd418: [top + 56] <- 0x2ac96395d689 ; function 0x2ac96395d689 <JS Function GIFEncoder.analyzePixels (SharedFunctionInfo 0x2ac96394b679)> (input #0)
0x7ffc654cd410: [top + 48] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #3)
0x7ffc654cd408: [top + 40] <- 0x57e4000000000 ; 360000 (input #4)
0x7ffc654cd400: [top + 32] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #5)
0x7ffc654cd3f8: [top + 24] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #6)
0x7ffc654cd3f0: [top + 16] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #7)
0x7ffc654cd3e8: [top + 8] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #8)
0x7ffc654cd3e0: [top + 0] <- 0x7bbfe0db2a9 ; 0x7bbfe0db2a9 <a NeuQuant with map 0x3d4eb9d404e1> (input #9)
[deoptimizing (lazy): end 0x2ac96395d689 <JS Function GIFEncoder.analyzePixels (SharedFunctionInfo 0x2ac96394b679)> @9 => node=99, pc=0x376e6ff3fab0, state=TOS_REG, alignment=no padding, took 0.043 ms]
--- FUNCTION SOURCE (GIFEncoder.analyzePixels) id{71,0} ---
() {
var len = this.pixels.length;
var nPix = len / 3;
// TODO: Re-use indexedPixels
this.indexedPixels = new Uint8Array(nPix);
var imgq = new NeuQuant(this.pixels, this.sample);
imgq.buildColormap(); // create reduced palette
this.colorTab = imgq.getColormap();
// map image pixels to new palette
var k = 0;
for (var j = 0; j < nPix; j++) {
var index = imgq.lookupRGB(
this.pixels[k++] & 0xff,
this.pixels[k++] & 0xff,
this.pixels[k++] & 0xff
);
this.usedEntry[index] = true;
this.indexedPixels[j] = index;
}
this.pixels = null;
this.colorDepth = 8;
this.palSize = 7;
// get closest match to transparent color if specified
if (this.transparent !== null) {
this.transIndex = this.findClosest(this.transparent);
}
}
--- END ---
--- FUNCTION SOURCE (compress) id{72,0} ---
(init_bits, outs) {
var fcode, c, i, ent, disp, hsize_reg, hshift;
// Set up the globals: g_init_bits - initial number of bits
g_init_bits = init_bits;
// Set up the necessary values
clear_flg = false;
n_bits = g_init_bits;
maxcode = MAXCODE(n_bits);
ClearCode = 1 << (init_bits - 1);
EOFCode = ClearCode + 1;
free_ent = ClearCode + 2;
a_count = 0; // clear packet
ent = nextPixel();
hshift = 0;
for (fcode = HSIZE; fcode < 65536; fcode *= 2) ++hshift;
hshift = 8 - hshift; // set hash code range bound
hsize_reg = HSIZE;
cl_hash(hsize_reg); // clear hash table
output(ClearCode, outs);
outer_loop: while ((c = nextPixel()) != EOF) {
fcode = (c << BITS) + ent;
i = (c << hshift) ^ ent; // xor hashing
if (htab[i] === fcode) {
ent = codetab[i];
continue;
} else if (htab[i] >= 0) { // non-empty slot
disp = hsize_reg - i; // secondary hash (after G. Knott)
if (i === 0) disp = 1;
do {
if ((i -= disp) < 0) i += hsize_reg;
if (htab[i] === fcode) {
ent = codetab[i];
continue outer_loop;
}
} while (htab[i] >= 0);
}
output(ent, outs);
ent = c;
if (free_ent < 1 << BITS) {
codetab[i] = free_ent++; // code -> hashtable
htab[i] = fcode;
} else {
cl_block(outs);
}
}
// Put out the final code.
output(ent, outs);
output(EOFCode, outs);
}
--- END ---
--- FUNCTION SOURCE (output) id{73,0} ---
(code, outs) {
cur_accum &= masks[cur_bits];
if (cur_bits > 0) cur_accum |= (code << cur_bits);
else cur_accum = code;
cur_bits += n_bits;
while (cur_bits >= 8) {
char_out((cur_accum & 0xff), outs);
cur_accum >>= 8;
cur_bits -= 8;
}
// If the next entry is going to be too big for the code size,
// then increase it, if possible.
if (free_ent > maxcode || clear_flg) {
if (clear_flg) {
maxcode = MAXCODE(n_bits = g_init_bits);
clear_flg = false;
} else {
++n_bits;
if (n_bits == BITS) maxcode = 1 << BITS;
else maxcode = MAXCODE(n_bits);
}
}
if (code == EOFCode) {
// At EOF, write the rest of the buffer.
while (cur_bits > 0) {
char_out((cur_accum & 0xff), outs);
cur_accum >>= 8;
cur_bits -= 8;
}
flush_char(outs);
}
}
--- END ---
--- FUNCTION SOURCE (cl_hash) id{74,0} ---
(hsize) {
for (var i = 0; i < hsize; ++i) htab[i] = -1;
}
--- END ---
[marking dependent code 0x376e6ff676a1 (opt #71) for deoptimization, reason: prototype-check]
[deoptimize marked code in all contexts]
[deoptimizer unlinked: GIFEncoder.analyzePixels / 2ac96395d689]
[deoptimizing (DEOPT lazy): begin 0x2ac96395d689 <JS Function GIFEncoder.analyzePixels (SharedFunctionInfo 0x2ac96394b679)> (opt #71) @9, FP to SP delta: 136]
reading input frame GIFEncoder.analyzePixels => node=1, args=99, height=8; inputs:
0: 0x2ac96395d689 ; (frame function) 0x2ac96395d689 <JS Function GIFEncoder.analyzePixels (SharedFunctionInfo 0x2ac96394b679)>
1: 0x3ed23a8fcf31 ; [fp + 16] 0x3ed23a8fcf31 <a GIFEncoder with map 0x3d4eb9d454f9>
2: 0x100fecf7fb11 ; [fp - 72] 0x100fecf7fb11 <FixedArray[8]>
3: 0x36cdc0e04131 ; (literal 1) 0x36cdc0e04131 <undefined>
4: 360000 ; (int) [fp - 80]
5: 0x36cdc0e04131 ; (literal 1) 0x36cdc0e04131 <undefined>
6: 0x36cdc0e04131 ; (literal 1) 0x36cdc0e04131 <undefined>
7: 0x36cdc0e04131 ; (literal 1) 0x36cdc0e04131 <undefined>
8: 0x36cdc0e04131 ; (literal 1) 0x36cdc0e04131 <undefined>
9: 0x7bbff37b521 ; rax 0x7bbff37b521 <a NeuQuant with map 0x3d4eb9d40539>
translating frame GIFEncoder.analyzePixels => node=99, height=56
0x7ffc654cd438: [top + 88] <- 0x3ed23a8fcf31 ; 0x3ed23a8fcf31 <a GIFEncoder with map 0x3d4eb9d454f9> (input #1)
0x7ffc654cd430: [top + 80] <- 0x376e6ff3e4d3 ; caller's pc
0x7ffc654cd428: [top + 72] <- 0x7ffc654cd458 ; caller's fp
0x7ffc654cd420: [top + 64] <- 0x100fecf7fb11 ; context 0x100fecf7fb11 <FixedArray[8]> (input #2)
0x7ffc654cd418: [top + 56] <- 0x2ac96395d689 ; function 0x2ac96395d689 <JS Function GIFEncoder.analyzePixels (SharedFunctionInfo 0x2ac96394b679)> (input #0)
0x7ffc654cd410: [top + 48] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #3)
0x7ffc654cd408: [top + 40] <- 0x57e4000000000 ; 360000 (input #4)
0x7ffc654cd400: [top + 32] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #5)
0x7ffc654cd3f8: [top + 24] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #6)
0x7ffc654cd3f0: [top + 16] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #7)
0x7ffc654cd3e8: [top + 8] <- 0x36cdc0e04131 ; 0x36cdc0e04131 <undefined> (input #8)
0x7ffc654cd3e0: [top + 0] <- 0x7bbff37b521 ; 0x7bbff37b521 <a NeuQuant with map 0x3d4eb9d40539> (input #9)
[deoptimizing (lazy): end 0x2ac96395d689 <JS Function GIFEncoder.analyzePixels (SharedFunctionInfo 0x2ac96394b679)> @9 => node=99, pc=0x376e6ff3fab0, state=TOS_REG, alignment=no padding, took 0.051 ms]
--- FUNCTION SOURCE (GIFEncoder.analyzePixels) id{75,0} ---
() {
var len = this.pixels.length;
var nPix = len / 3;
// TODO: Re-use indexedPixels
this.indexedPixels = new Uint8Array(nPix);
var imgq = new NeuQuant(this.pixels, this.sample);
imgq.buildColormap(); // create reduced palette
this.colorTab = imgq.getColormap();
// map image pixels to new palette
var k = 0;
for (var j = 0; j < nPix; j++) {
var index = imgq.lookupRGB(
this.pixels[k++] & 0xff,
this.pixels[k++] & 0xff,
this.pixels[k++] & 0xff
);
this.usedEntry[index] = true;
this.indexedPixels[j] = index;
}
this.pixels = null;
this.colorDepth = 8;
this.palSize = 7;
// get closest match to transparent color if specified
if (this.transparent !== null) {
this.transIndex = this.findClosest(this.transparent);
}
}
--- END ---
--- FUNCTION SOURCE (flush_char) id{76,0} ---
(outs) {
if (a_count > 0) {
outs.writeByte(a_count);
outs.writeBytes(accum, 0, a_count);
a_count = 0;
}
}
--- END ---
--- FUNCTION SOURCE (ByteCapacitor.writeByte) id{76,1} ---
(val) {
this.data.push(val);
}
--- END ---
INLINE (ByteCapacitor.writeByte) id{76,1} AS 1 AT <0:43>
--- FUNCTION SOURCE (ByteCapacitor.writeBytes) id{76,2} ---
(array, offset, length) {
for (var l = length || array.length, i = offset || 0; i < l; i++) {
this.writeByte(array[i]);
}
}
--- END ---
INLINE (ByteCapacitor.writeBytes) id{76,2} AS 2 AT <0:74>
--- FUNCTION SOURCE (ByteCapacitor.writeByte) id{76,3} ---
(val) {
this.data.push(val);
}
--- END ---
INLINE (ByteCapacitor.writeByte) id{76,3} AS 3 AT <2:105>
--- FUNCTION SOURCE (Float64ArrayConstructByArrayLike) id{77,0} ---
(v,F){
var y=F.length;
var D=$toPositiveInteger(y,139);
if(D>%_MaxSmi()){
throw MakeRangeError(139);
}
var G=false;
var E=D*8;
if(E<=%_TypedArrayMaxSizeInHeap()){
%_TypedArrayInitialize(v,8,null,0,E,false);
}else{
G=
%TypedArrayInitializeFromArrayLike(v,8,F,D);
}
if(!G){
for(var H=0;H<D;H++){
v[H]=F[H];
}
}
}
--- END ---
--- FUNCTION SOURCE (Int32ArrayConstructByLength) id{78,0} ---
(v,y){
var D=(y===(void 0))?
0:$toPositiveInteger(y,139);
if(D>%_MaxSmi()){
throw MakeRangeError(139);
}
var E=D*4;
if(E>%_TypedArrayMaxSizeInHeap()){
var w=new d(E);
%_TypedArrayInitialize(v,6,w,0,E,true);
}else{
%_TypedArrayInitialize(v,6,null,0,E,true);
}
}
--- END ---
--- FUNCTION SOURCE (debugs.(anonymous function)) id{79,0} ---
() {}
--- END ---
--- FUNCTION SOURCE (GIFEncoder.writeShort) id{80,0} ---
(pValue) {
this.writeByte(pValue & 0xFF);
this.writeByte((pValue >> 8) & 0xFF);
}
--- END ---
--- FUNCTION SOURCE (ByteCapacitor.writeByte) id{80,1} ---
(val) {
this.data.push(val);
}
--- END ---
INLINE (ByteCapacitor.writeByte) id{80,1} AS 1 AT <0:18>
--- FUNCTION SOURCE (ByteCapacitor.writeByte) id{80,2} ---
(val) {
this.data.push(val);
}
--- END ---
INLINE (ByteCapacitor.writeByte) id{80,2} AS 2 AT <0:51>
--- FUNCTION SOURCE (isNull) id{81,0} ---
(arg) {
return arg === null;
}
--- END ---
--- FUNCTION SOURCE (MAXCODE) id{82,0} ---
(n_bits) {
return (1 << n_bits) - 1;
}
--- END ---
| 33.28211 | 212 | 0.616489 |
aa81a192c35b130e4cd0625af993a3621703217b | 387 | asm | Assembly | oeis/038/A038723.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/038/A038723.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/038/A038723.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A038723: a(n) = 6*a(n-1) - a(n-2), n >= 2, a(0)=1, a(1)=4.
; Submitted by Jamie Morken(s1.)
; 1,4,23,134,781,4552,26531,154634,901273,5253004,30616751,178447502,1040068261,6061962064,35331704123,205928262674,1200237871921,6995498968852,40772755941191,237641036678294,1385073464128573
mov $1,1
lpb $0
sub $0,1
add $2,$1
add $1,$2
add $1,$2
add $1,1
add $2,$1
lpe
mov $0,$1
| 25.8 | 191 | 0.682171 |
af83cb039744ef196299d5ce6ebd41eb3b63be72 | 570 | asm | Assembly | programs/oeis/114/A114697.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/114/A114697.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/114/A114697.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A114697: Expansion of (1+x+x^2)/((x-1)*(x+1)*(x^2+2*x-1)); a Pellian-related sequence.
; 1,3,9,22,55,133,323,780,1885,4551,10989,26530,64051,154633,373319,901272,2175865,5253003,12681873,30616750,73915375,178447501,430810379,1040068260,2510946901,6061962063,14634871029,35331704122,85298279275,205928262673,497154804623,1200237871920,2897630548465,6995498968851,16888628486169,40772755941190,98434140368551,237641036678293,573716213725139,1385073464128572,3343863141982285,8072799748093143
cal $0,48746 ; Partial sums of A048655.
add $1,$0
sub $1,1
div $1,2
add $1,1
| 63.333333 | 402 | 0.810526 |
b5d6569d8a5f26d1fdbd3f6a4cacaca4a64e4b14 | 727 | asm | Assembly | oeis/191/A191782.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/191/A191782.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/191/A191782.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A191782: Sum of the lengths of the first ascents in all n-length left factors of Dyck paths.
; Submitted by Christian Krause
; 1,3,6,13,24,49,90,181,335,671,1253,2507,4718,9437,17874,35749,68067,136135,260337,520675,999361,1998723,3848221,7696443,14857999,29715999,57500459,115000919,222981434,445962869,866262914,1732525829,3370764539,6741529079,13135064249,26270128499,51250632509,102501265019,200205672809,400411345619,782920544639,1565841089279,3064665881939,6129331763879,12007086477749,24014172955499,47081501377325,94163002754651,184753963255175,369507926510351,725510446350003,1451020892700007,2850875587556163
add $0,1
mov $1,$0
div $0,2
mov $2,$1
add $1,1
bin $1,$0
add $0,1
bin $2,$0
add $2,$1
mov $0,$2
sub $0,1
| 45.4375 | 493 | 0.815681 |
bb1c234154f30d591cdb673e775957275bc61eed | 730 | asm | Assembly | 8085 Microprocessor/Assignment 1/sol4.asm | neeladripal/bcse-lab | 915d2f535ae95a062438fc85980419646a3951ad | [
"MIT"
] | null | null | null | 8085 Microprocessor/Assignment 1/sol4.asm | neeladripal/bcse-lab | 915d2f535ae95a062438fc85980419646a3951ad | [
"MIT"
] | null | null | null | 8085 Microprocessor/Assignment 1/sol4.asm | neeladripal/bcse-lab | 915d2f535ae95a062438fc85980419646a3951ad | [
"MIT"
] | 1 | 2021-08-06T14:39:53.000Z | 2021-08-06T14:39:53.000Z | LDA 2500H ; store the byte in accumulator
MVI C,08H ; store 08H in register C acts to use as counter
MVI B,00H ; clear register B to keep count of 1s in the byte
LOOP: RLC ; rotate the byte right by 1 bit
JC SKIP ; if carry is 0, skip to next iteration
INR B ; carry is 1, so increment B
SKIP: DCR C ; one bit comparison complete, decrement counter
JNZ LOOP ; if counter is not zero, go for next comparison
MOV A,B ; store count of 1s in accumulator
STA 2610H ; store count of 1s in 2610H
MVI A,08 ; store 08H in accumulator
SUB B ; subtract count of 1s from 08H to get count of 0s
STA 2511H ; store count of 0s in 2511H
HLT ; stop | 45.625 | 66 | 0.643836 |
506078b5455a62d5479eccb501de1ff6d92052c3 | 5,778 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_715_194.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_715_194.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_715_194.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r11
push %r13
push %r15
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_WC_ht+0xd0db, %rbx
nop
nop
nop
nop
nop
and %r10, %r10
movw $0x6162, (%rbx)
nop
nop
nop
cmp %r10, %r10
lea addresses_WT_ht+0x1d7cb, %rsi
lea addresses_UC_ht+0x240b, %rdi
nop
xor $17105, %r15
mov $48, %rcx
rep movsb
nop
nop
nop
nop
sub $7124, %rdi
lea addresses_normal_ht+0x10cb6, %r15
clflush (%r15)
nop
nop
nop
nop
nop
and %r13, %r13
movl $0x61626364, (%r15)
cmp $29237, %r15
lea addresses_UC_ht+0xd9cb, %rsi
nop
nop
nop
nop
nop
inc %r15
movups (%rsi), %xmm3
vpextrq $0, %xmm3, %rdi
cmp %r15, %r15
lea addresses_UC_ht+0x19423, %rsi
lea addresses_A_ht+0x172ad, %rdi
nop
nop
nop
nop
xor %r11, %r11
mov $115, %rcx
rep movsl
sub $422, %r10
lea addresses_WC_ht+0x7cb, %r10
nop
mfence
vmovups (%r10), %ymm7
vextracti128 $1, %ymm7, %xmm7
vpextrq $1, %xmm7, %rdi
add %r13, %r13
lea addresses_normal_ht+0x986b, %rsi
lea addresses_D_ht+0xc6b, %rdi
clflush (%rsi)
nop
nop
add %rbx, %rbx
mov $57, %rcx
rep movsl
nop
add %rcx, %rcx
lea addresses_normal_ht+0x135cb, %rsi
lea addresses_UC_ht+0x1c96, %rdi
nop
nop
nop
xor $18140, %r13
mov $16, %rcx
rep movsb
nop
nop
nop
and $64855, %rsi
lea addresses_UC_ht+0x500b, %rcx
nop
nop
nop
nop
dec %r10
mov $0x6162636465666768, %r11
movq %r11, %xmm0
vmovups %ymm0, (%rcx)
nop
nop
dec %r11
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %r15
pop %r13
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r9
push %rax
push %rcx
push %rdx
push %rsi
// Store
mov $0x3b3, %rdx
nop
nop
nop
nop
xor $60897, %rcx
mov $0x5152535455565758, %r10
movq %r10, %xmm0
movaps %xmm0, (%rdx)
nop
nop
nop
nop
inc %r11
// Faulty Load
lea addresses_normal+0x111cb, %r9
nop
nop
nop
inc %rsi
movups (%r9), %xmm2
vpextrq $0, %xmm2, %rcx
lea oracles, %rsi
and $0xff, %rcx
shlq $12, %rcx
mov (%rsi,%rcx,1), %rcx
pop %rsi
pop %rdx
pop %rcx
pop %rax
pop %r9
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_normal', 'congruent': 0}}
{'dst': {'same': False, 'NT': True, 'AVXalign': True, 'size': 16, 'type': 'addresses_P', 'congruent': 2}, 'OP': 'STOR'}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_normal', 'congruent': 0}}
<gen_prepare_buffer>
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_WC_ht', 'congruent': 1}, 'OP': 'STOR'}
{'dst': {'same': False, 'congruent': 5, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 9, 'type': 'addresses_WT_ht'}}
{'dst': {'same': False, 'NT': True, 'AVXalign': False, 'size': 4, 'type': 'addresses_normal_ht', 'congruent': 0}, 'OP': 'STOR'}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_UC_ht', 'congruent': 11}}
{'dst': {'same': False, 'congruent': 1, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 2, 'type': 'addresses_UC_ht'}}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_WC_ht', 'congruent': 8}}
{'dst': {'same': False, 'congruent': 2, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'src': {'same': True, 'congruent': 5, 'type': 'addresses_normal_ht'}}
{'dst': {'same': False, 'congruent': 0, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 5, 'type': 'addresses_normal_ht'}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_UC_ht', 'congruent': 4}, 'OP': 'STOR'}
{'34': 715}
34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34
*/
| 31.747253 | 2,144 | 0.66009 |
583a94db09dd28fceadd0d7e59549f5b210d188b | 42 | asm | Assembly | tests/R/nor.asm | madhav-datt/mmcpu | e252133e3fd71076596c08775b79dd8bd35135b6 | [
"MIT"
] | null | null | null | tests/R/nor.asm | madhav-datt/mmcpu | e252133e3fd71076596c08775b79dd8bd35135b6 | [
"MIT"
] | null | null | null | tests/R/nor.asm | madhav-datt/mmcpu | e252133e3fd71076596c08775b79dd8bd35135b6 | [
"MIT"
] | null | null | null | main: nor $s0, $0, $0
nor $s1, $s0, $0
| 10.5 | 22 | 0.452381 |
55c752a9745e4e997b053b20050a5f25536d9b63 | 3,636 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_50_1841.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_50_1841.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_50_1841.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r13
push %r9
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_A_ht+0x5cf1, %rsi
lea addresses_D_ht+0x4ee1, %rdi
cmp $25406, %rdx
mov $81, %rcx
rep movsq
nop
nop
add %rdx, %rdx
lea addresses_UC_ht+0x1816f, %r9
nop
nop
nop
cmp %r11, %r11
mov (%r9), %dx
nop
nop
nop
nop
nop
add $2161, %rdi
lea addresses_WC_ht+0x1861, %r11
nop
nop
nop
nop
nop
cmp %r13, %r13
and $0xffffffffffffffc0, %r11
movaps (%r11), %xmm0
vpextrq $1, %xmm0, %rdx
nop
xor $13282, %r9
lea addresses_UC_ht+0x1e957, %r13
nop
nop
nop
cmp %rsi, %rsi
mov $0x6162636465666768, %r9
movq %r9, %xmm6
vmovups %ymm6, (%r13)
nop
nop
nop
nop
nop
add %rdi, %rdi
lea addresses_D_ht+0x1daf1, %rdi
nop
nop
cmp $3771, %r13
movl $0x61626364, (%rdi)
nop
nop
xor %r11, %r11
lea addresses_D_ht+0x14ee1, %r13
nop
nop
nop
nop
nop
and %r11, %r11
movb $0x61, (%r13)
nop
cmp $33484, %rdx
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %r9
pop %r13
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r14
push %r8
push %rax
push %rbp
push %rcx
push %rdi
// Load
mov $0x5b8c420000000061, %r11
nop
nop
add $15622, %rcx
vmovups (%r11), %ymm0
vextracti128 $0, %ymm0, %xmm0
vpextrq $0, %xmm0, %rdi
nop
nop
and %r11, %r11
// Store
lea addresses_US+0x190b3, %r8
nop
nop
nop
nop
add $18784, %rcx
movb $0x51, (%r8)
nop
nop
nop
and %r8, %r8
// Store
lea addresses_WC+0x14041, %r8
nop
nop
nop
nop
xor %r14, %r14
mov $0x5152535455565758, %r11
movq %r11, %xmm0
movups %xmm0, (%r8)
nop
inc %rcx
// Load
lea addresses_UC+0x17f61, %r8
nop
nop
nop
nop
nop
add %rcx, %rcx
vmovaps (%r8), %ymm0
vextracti128 $0, %ymm0, %xmm0
vpextrq $1, %xmm0, %r11
nop
nop
nop
nop
add $31028, %r11
// Faulty Load
lea addresses_RW+0x5861, %rcx
nop
and $61227, %r8
mov (%rcx), %r14
lea oracles, %rcx
and $0xff, %r14
shlq $12, %r14
mov (%rcx,%r14,1), %r14
pop %rdi
pop %rcx
pop %rbp
pop %rax
pop %r8
pop %r14
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_RW', 'same': False, 'size': 1, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_NC', 'same': False, 'size': 32, 'congruent': 11, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_US', 'same': False, 'size': 1, 'congruent': 1, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_WC', 'same': False, 'size': 16, 'congruent': 3, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_UC', 'same': False, 'size': 32, 'congruent': 6, 'NT': False, 'AVXalign': True}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'type': 'addresses_RW', 'same': True, 'size': 8, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_A_ht', 'congruent': 2, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 7, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_UC_ht', 'same': False, 'size': 2, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WC_ht', 'same': False, 'size': 16, 'congruent': 11, 'NT': False, 'AVXalign': True}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_UC_ht', 'same': False, 'size': 32, 'congruent': 1, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_D_ht', 'same': False, 'size': 4, 'congruent': 4, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_D_ht', 'same': False, 'size': 1, 'congruent': 7, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'32': 50}
32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
*/
| 19.548387 | 149 | 0.644114 |
fbca9a52238d74e234912a973f9744da308cf136 | 728 | asm | Assembly | Data/ships/Plate.asm | ped7g/EliteNext | 6e930f9b9924b295d7281ee6acb879600d7e597f | [
"Unlicense"
] | null | null | null | Data/ships/Plate.asm | ped7g/EliteNext | 6e930f9b9924b295d7281ee6acb879600d7e597f | [
"Unlicense"
] | null | null | null | Data/ships/Plate.asm | ped7g/EliteNext | 6e930f9b9924b295d7281ee6acb879600d7e597f | [
"Unlicense"
] | null | null | null | Plate: DB $80, $00, $64
DW PlateEdges
DB PlateEdgesSize
DB $00, $0A
DB PlateVertSize
DB PlateEdgesCnt
DB $00, $00
DB PlateNormalsSize
DB $05, $10, $10
DW PlateNormals
DB $03, $00
DW PlateVertices
DB 0,0 ; Type and Tactics
PlateVertices: DB $0F, $16, $09, $FF, $FF, $FF
DB $0F, $26, $09, $BF, $FF, $FF
DB $13, $20, $0B, $14, $FF, $FF
PlateVertSize: equ $ - PlateVertices
PlateEdges: DB $1F, $FF, $00, $04
DB $10, $FF, $04, $08
DB $14, $FF, $08, $0C
DB $10, $FF, $0C, $00
PlateEdgesSize: equ $ - PlateEdges
PlateEdgesCnt: equ PlateEdgesSize/4
PlateNormals: DB $00, $00, $00, $00
PlateNormalsSize: equ $ - PlateNormals
PlateLen: equ $ - Plate
| 18.2 | 70 | 0.581044 |
cc160d8ada73ea6ea82f1513a42c84a358bb1bf2 | 428 | asm | Assembly | programs/oeis/337/A337252.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/337/A337252.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | programs/oeis/337/A337252.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | ; A337252: Digits of 2^n can be rearranged with no leading zeros to form t^2, for t not a power of 2.
; 8,10,12,14,20,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,118,120,122,124,126,128,130,132,134,136,138,140,142,144,146,148,150
mov $1,$0
bin $0,4
lpb $0
add $1,2
add $2,$0
add $0,$2
div $0,8
lpe
mul $1,2
add $1,8
| 30.571429 | 230 | 0.658879 |
b910052dd4038e0b80a302035e13c9b24c11e5b6 | 837 | asm | Assembly | oeis/142/A142891.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/142/A142891.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/142/A142891.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A142891: Primes congruent to 4 mod 63.
; Submitted by Jon Maiga
; 67,193,571,823,1201,1327,1453,1579,1831,2083,2713,3217,3343,3469,3847,4099,4603,4729,5107,5233,5737,6367,6619,6871,6997,7753,7879,8761,8887,9013,9391,9643,9769,10273,10399,10651,10903,12037,12163,12289,12541,12919,13171,13297,14431,14557,14683,15061,15187,15313,15439,15817,16069,16447,16573,16699,17077,17203,17581,17707,17959,18211,19219,19471,19597,20101,20353,20479,20731,20857,20983,21487,21613,21739,21991,22369,22621,23251,23629,24007,24133,24763,24889,25771,27031,27283,27409,28669,28921
mov $1,12
mov $2,$0
add $2,2
pow $2,2
lpb $2
add $1,21
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,42
mov $4,$0
max $4,0
cmp $4,$0
mul $2,$4
lpe
mov $0,$1
mul $0,2
sub $0,83
| 33.48 | 497 | 0.725209 |
e15015c065bdfefc905180f076b38491b28250d5 | 391 | asm | Assembly | oeis/037/A037530.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/037/A037530.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/037/A037530.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A037530: Base-5 digits are, in order, the first n terms of the periodic sequence with initial period 1,1,2.
; Submitted by Christian Krause
; 1,6,32,161,806,4032,20161,100806,504032,2520161,12600806,63004032,315020161,1575100806,7875504032,39377520161,196887600806,984438004032,4922190020161,24610950100806,123054750504032,615273752520161
mov $1,5
pow $1,$0
mul $1,40
div $1,31
mov $0,$1
| 39.1 | 198 | 0.795396 |
f769ab7d1592aadd6d6925ef4abf1345a0b41997 | 297 | asm | Assembly | programs/oeis/248/A248423.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/248/A248423.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/248/A248423.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A248423: Multiples of 4 with digits backwards.
; 0,4,8,21,61,2,42,82,23,63,4,44,84,25,65,6,46,86,27,67,8,48,88,29,69,1,401,801,211,611,21,421,821,231,631,41,441,841,251,651,61,461,861,271,671,81,481,881,291,691,2
mul $0,4
seq $0,4086 ; Read n backwards (referred to as R(n) in many sequences).
| 49.5 | 165 | 0.69697 |
524df3c89ba51eb11613c1d742974ce8bc28fcb9 | 461 | asm | Assembly | oeis/332/A332147.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/332/A332147.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/332/A332147.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A332147: a(n) = 4*(10^(2*n+1)-1)/9 + 3*10^n.
; Submitted by Jamie Morken(s1)
; 7,474,44744,4447444,444474444,44444744444,4444447444444,444444474444444,44444444744444444,4444444447444444444,444444444474444444444,44444444444744444444444,4444444444447444444444444,444444444444474444444444444,44444444444444744444444444444,4444444444444447444444444444444
mov $1,10
pow $1,$0
mul $1,4
add $1,2
mul $1,10
sub $1,6
bin $1,2
div $1,45
mov $0,$1
mul $0,75
div $0,300
| 28.8125 | 273 | 0.785249 |
11967b65a6a19b30a0d288edf2bc6a324ea28db7 | 1,676 | asm | Assembly | programs/oeis/061/A061722.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/061/A061722.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/061/A061722.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A061722: a(n) = 10 * n^2 + 7.
; 7,17,47,97,167,257,367,497,647,817,1007,1217,1447,1697,1967,2257,2567,2897,3247,3617,4007,4417,4847,5297,5767,6257,6767,7297,7847,8417,9007,9617,10247,10897,11567,12257,12967,13697,14447,15217,16007,16817,17647,18497,19367,20257,21167,22097,23047,24017,25007,26017,27047,28097,29167,30257,31367,32497,33647,34817,36007,37217,38447,39697,40967,42257,43567,44897,46247,47617,49007,50417,51847,53297,54767,56257,57767,59297,60847,62417,64007,65617,67247,68897,70567,72257,73967,75697,77447,79217,81007,82817,84647,86497,88367,90257,92167,94097,96047,98017,100007,102017,104047,106097,108167,110257,112367,114497,116647,118817,121007,123217,125447,127697,129967,132257,134567,136897,139247,141617,144007,146417,148847,151297,153767,156257,158767,161297,163847,166417,169007,171617,174247,176897,179567,182257,184967,187697,190447,193217,196007,198817,201647,204497,207367,210257,213167,216097,219047,222017,225007,228017,231047,234097,237167,240257,243367,246497,249647,252817,256007,259217,262447,265697,268967,272257,275567,278897,282247,285617,289007,292417,295847,299297,302767,306257,309767,313297,316847,320417,324007,327617,331247,334897,338567,342257,345967,349697,353447,357217,361007,364817,368647,372497,376367,380257,384167,388097,392047,396017,400007,404017,408047,412097,416167,420257,424367,428497,432647,436817,441007,445217,449447,453697,457967,462257,466567,470897,475247,479617,484007,488417,492847,497297,501767,506257,510767,515297,519847,524417,529007,533617,538247,542897,547567,552257,556967,561697,566447,571217,576007,580817,585647,590497,595367,600257,605167,610097,615047,620017
mov $1,$0
pow $1,2
mul $1,10
add $1,7
| 209.5 | 1,604 | 0.828162 |
7510640ce0acab1725a6c5999a7d4c91218e8ada | 1,070 | asm | Assembly | lib/target/laser500/classic/rom.asm | ahjelm/z88dk | c4de367f39a76b41f6390ceeab77737e148178fa | [
"ClArtistic"
] | 640 | 2017-01-14T23:33:45.000Z | 2022-03-30T11:28:42.000Z | lib/target/laser500/classic/rom.asm | C-Chads/z88dk | a4141a8e51205c6414b4ae3263b633c4265778e6 | [
"ClArtistic"
] | 1,600 | 2017-01-15T16:12:02.000Z | 2022-03-31T12:11:12.000Z | lib/target/laser500/classic/rom.asm | C-Chads/z88dk | a4141a8e51205c6414b4ae3263b633c4265778e6 | [
"ClArtistic"
] | 215 | 2017-01-17T10:43:03.000Z | 2022-03-23T17:25:02.000Z | ;
; Startup for V-Tech VZ-350/500/700?
;
defc CRT_ORG_BSS = 0xc000
defc CRT_ORG_CODE = 0x0000
defc TAR__clib_exit_stack_size = 0
defc TAR__register_sp = 0xbfff
INCLUDE "crt/classic/crt_rules.inc"
org CRT_ORG_CODE
if (ASMPC<>$0000)
defs CODE_ALIGNMENT_ERROR
endif
defb 0xaa,0x55,0xe7,0x18 ;Signature
jp program
INCLUDE "crt/classic/crt_z80_rsts.asm"
program:
INCLUDE "crt/classic/crt_init_sp.asm"
INCLUDE "crt/classic/crt_init_atexit.asm"
call crt0_init_bss
ld (exitsp),sp
im 1
ei
; Optional definition for auto MALLOC init
; it assumes we have free space between the end of
; the compiled program and the stack pointer
IF DEFINED_USING_amalloc
INCLUDE "crt/classic/crt_init_amalloc.asm"
ENDIF
call _main
cleanup:
di
halt
jp cleanup
l_dcal: jp (hl) ;Used for function pointer calls
defc __crt_org_bss = CRT_ORG_BSS
IF DEFINED_CRT_MODEL
defc __crt_model = CRT_MODEL
ELSE
defc __crt_model = 1
ENDIF
| 19.454545 | 64 | 0.674766 |
8d487ca52f9adc180f891e1cf2400e4cc812e680 | 102 | asm | Assembly | libsrc/_DEVELOPMENT/math/float/math32/lm32/c/sdcc/cosh_fastcall.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 640 | 2017-01-14T23:33:45.000Z | 2022-03-30T11:28:42.000Z | libsrc/_DEVELOPMENT/math/float/math32/lm32/c/sdcc/cosh_fastcall.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 1,600 | 2017-01-15T16:12:02.000Z | 2022-03-31T12:11:12.000Z | libsrc/_DEVELOPMENT/math/float/math32/lm32/c/sdcc/cosh_fastcall.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 215 | 2017-01-17T10:43:03.000Z | 2022-03-23T17:25:02.000Z |
SECTION code_fp_math32
PUBLIC _cosh_fastcall
EXTERN _m32_coshf
defc _cosh_fastcall = _m32_coshf
| 14.571429 | 33 | 0.833333 |
c3c7ed7093c8754e1fa559b992ff0089c3d0de6c | 6,382 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_sm_/i9-9900K_12_0xa0_notsx.log_21829_275.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_xt_sm_/i9-9900K_12_0xa0_notsx.log_21829_275.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_xt_sm_/i9-9900K_12_0xa0_notsx.log_21829_275.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r15
push %r8
push %r9
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_A_ht+0x9101, %rsi
lea addresses_WT_ht+0x1d7e1, %rdi
clflush (%rdi)
and %r9, %r9
mov $40, %rcx
rep movsb
nop
nop
nop
nop
nop
xor %r8, %r8
lea addresses_WC_ht+0x6e61, %rsi
nop
nop
nop
nop
nop
inc %rcx
movb $0x61, (%rsi)
sub $41147, %r9
lea addresses_D_ht+0x1b261, %rsi
lea addresses_WT_ht+0x6271, %rdi
nop
nop
nop
nop
and $14754, %r15
mov $10, %rcx
rep movsb
nop
nop
nop
nop
nop
add $29133, %r8
lea addresses_A_ht+0x2979, %rcx
clflush (%rcx)
nop
add %r15, %r15
mov (%rcx), %esi
nop
nop
add %r8, %r8
lea addresses_A_ht+0x10fe1, %r9
add $40520, %rdx
mov (%r9), %ecx
nop
nop
nop
cmp $57802, %rsi
lea addresses_UC_ht+0xacf1, %rdx
nop
nop
nop
nop
nop
dec %rsi
mov (%rdx), %r15
and $52716, %rcx
lea addresses_D_ht+0xf7a1, %rdi
nop
xor %r9, %r9
vmovups (%rdi), %ymm1
vextracti128 $1, %ymm1, %xmm1
vpextrq $1, %xmm1, %r15
nop
nop
cmp %r9, %r9
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %r9
pop %r8
pop %r15
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r12
push %r15
push %r8
push %rbp
push %rdi
push %rsi
// Store
lea addresses_PSE+0x1ea61, %rbp
nop
nop
nop
nop
nop
and $6454, %r8
mov $0x5152535455565758, %r15
movq %r15, (%rbp)
nop
nop
nop
nop
and %rsi, %rsi
// Store
lea addresses_WC+0xa3b9, %r11
nop
nop
nop
nop
and $22105, %rdi
movw $0x5152, (%r11)
nop
nop
xor %r11, %r11
// Store
lea addresses_PSE+0xd661, %r8
nop
dec %r12
mov $0x5152535455565758, %rbp
movq %rbp, (%r8)
nop
nop
nop
nop
dec %r8
// Faulty Load
lea addresses_PSE+0xd661, %r11
clflush (%r11)
nop
and $49725, %rsi
mov (%r11), %bp
lea oracles, %r11
and $0xff, %rbp
shlq $12, %rbp
mov (%r11,%rbp,1), %rbp
pop %rsi
pop %rdi
pop %rbp
pop %r8
pop %r15
pop %r12
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_PSE', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_PSE', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 10}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 2}}
{'OP': 'STOR', 'dst': {'type': 'addresses_PSE', 'AVXalign': False, 'size': 8, 'NT': False, 'same': True, 'congruent': 0}}
[Faulty Load]
{'src': {'type': 'addresses_PSE', 'AVXalign': False, 'size': 2, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_A_ht', 'congruent': 5, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WT_ht', 'congruent': 7, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 1, 'NT': False, 'same': True, 'congruent': 11}}
{'src': {'type': 'addresses_D_ht', 'congruent': 8, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WT_ht', 'congruent': 3, 'same': True}}
{'src': {'type': 'addresses_A_ht', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 3}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_A_ht', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 3}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 4}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_D_ht', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 3}, 'OP': 'LOAD'}
{'58': 21829}
58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58
*/
| 36.056497 | 2,999 | 0.654027 |
2ae88a0cbf08bed41d415f4412b2c43fc9df596a | 1,636 | asm | Assembly | programs/oeis/126/A126264.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/126/A126264.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/126/A126264.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A126264: a(n) = 5*n^2 + 3*n.
; 8,26,54,92,140,198,266,344,432,530,638,756,884,1022,1170,1328,1496,1674,1862,2060,2268,2486,2714,2952,3200,3458,3726,4004,4292,4590,4898,5216,5544,5882,6230,6588,6956,7334,7722,8120,8528,8946,9374,9812,10260,10718,11186,11664,12152,12650,13158,13676,14204,14742,15290,15848,16416,16994,17582,18180,18788,19406,20034,20672,21320,21978,22646,23324,24012,24710,25418,26136,26864,27602,28350,29108,29876,30654,31442,32240,33048,33866,34694,35532,36380,37238,38106,38984,39872,40770,41678,42596,43524,44462,45410,46368,47336,48314,49302,50300,51308,52326,53354,54392,55440,56498,57566,58644,59732,60830,61938,63056,64184,65322,66470,67628,68796,69974,71162,72360,73568,74786,76014,77252,78500,79758,81026,82304,83592,84890,86198,87516,88844,90182,91530,92888,94256,95634,97022,98420,99828,101246,102674,104112,105560,107018,108486,109964,111452,112950,114458,115976,117504,119042,120590,122148,123716,125294,126882,128480,130088,131706,133334,134972,136620,138278,139946,141624,143312,145010,146718,148436,150164,151902,153650,155408,157176,158954,160742,162540,164348,166166,167994,169832,171680,173538,175406,177284,179172,181070,182978,184896,186824,188762,190710,192668,194636,196614,198602,200600,202608,204626,206654,208692,210740,212798,214866,216944,219032,221130,223238,225356,227484,229622,231770,233928,236096,238274,240462,242660,244868,247086,249314,251552,253800,256058,258326,260604,262892,265190,267498,269816,272144,274482,276830,279188,281556,283934,286322,288720,291128,293546,295974,298412,300860,303318,305786,308264,310752,313250
mul $0,5
add $0,7
bin $0,2
mov $1,$0
div $1,5
mul $1,2
| 163.6 | 1,548 | 0.819682 |
00a8fb349dfe2b5ab779abadf90fcd90a3fdf22a | 807 | asm | Assembly | kDriver.asm | satadriver/LiunuxOS | 693174ac2b3e503d72782fc7a14f18c8a4f2756c | [
"Apache-2.0"
] | null | null | null | kDriver.asm | satadriver/LiunuxOS | 693174ac2b3e503d72782fc7a14f18c8a4f2756c | [
"Apache-2.0"
] | null | null | null | kDriver.asm | satadriver/LiunuxOS | 693174ac2b3e503d72782fc7a14f18c8a4f2756c | [
"Apache-2.0"
] | null | null | null | .386p
Kernel Segment public para use32
assume cs:Kernel
__kDriverProc proc
pushad
;bit2 =1,reset controller
;bit1 =1,disable interrupt 0x0e;bit1 = 0,enable interrupt 0x0e
mov dx,3f6h
in al,dx
mov al,0
out dx,al
jmp _showDriverTips
_driverIntEnd:
mov al,20h
out 20h,al
out 0a0h,al
popad
iretd
_showDriverTips:
mov ebp,esp
add ebp,32
push dword ptr ICW2_SLAVE_INT_NO + 6
push dword ptr 0
push dword ptr [ebp]
push dword ptr [ebp + 4]
push dword ptr [ebp + 8]
test dword ptr [ebp + 4],3
jz _kDriverKernelModeInt
push dword ptr [ebp + 12]
push dword ptr [ebp + 16]
jmp _kDriverShowExpInfo
_kDriverKernelModeInt:
push dword ptr 0
push dword ptr 0
_kDriverShowExpInfo:
call __exceptionInfo
add esp,28
jmp _driverIntEnd
__kDriverProc endp
Kernel ends
| 15.519231 | 63 | 0.726146 |
9fa4d36833b64f37aca577ac2770bcf23209533a | 1,897 | asm | Assembly | programs/oeis/177/A177787.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/177/A177787.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/177/A177787.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A177787: Number of paths from (0,0) to (n+2,n) using only up and right steps and avoiding two or more consecutive moves up or three or more consecutive moves right.
; 2,5,10,18,30,47,70,100,138,185,242,310,390,483,590,712,850,1005,1178,1370,1582,1815,2070,2348,2650,2977,3330,3710,4118,4555,5022,5520,6050,6613,7210,7842,8510,9215,9958,10740,11562,12425,13330,14278,15270,16307,17390,18520,19698,20925,22202,23530,24910,26343,27830,29372,30970,32625,34338,36110,37942,39835,41790,43808,45890,48037,50250,52530,54878,57295,59782,62340,64970,67673,70450,73302,76230,79235,82318,85480,88722,92045,95450,98938,102510,106167,109910,113740,117658,121665,125762,129950,134230,138603,143070,147632,152290,157045,161898,166850,171902,177055,182310,187668,193130,198697,204370,210150,216038,222035,228142,234360,240690,247133,253690,260362,267150,274055,281078,288220,295482,302865,310370,317998,325750,333627,341630,349760,358018,366405,374922,383570,392350,401263,410310,419492,428810,438265,447858,457590,467462,477475,487630,497928,508370,518957,529690,540570,551598,562775,574102,585580,597210,608993,620930,633022,645270,657675,670238,682960,695842,708885,722090,735458,748990,762687,776550,790580,804778,819145,833682,848390,863270,878323,893550,908952,924530,940285,956218,972330,988622,1005095,1021750,1038588,1055610,1072817,1090210,1107790,1125558,1143515,1161662,1180000,1198530,1217253,1236170,1255282,1274590,1294095,1313798,1333700,1353802,1374105,1394610,1415318,1436230,1457347,1478670,1500200,1521938,1543885,1566042,1588410,1610990,1633783,1656790,1680012,1703450,1727105,1750978,1775070,1799382,1823915,1848670,1873648,1898850,1924277,1949930,1975810,2001918,2028255,2054822,2081620,2108650,2135913,2163410,2191142,2219110,2247315,2275758,2304440,2333362,2362525,2391930,2421578,2451470,2481607,2511990,2542620,2573498,2604625
add $0,2
mov $1,$0
bin $1,3
add $1,$0
add $1,$0
sub $1,2
| 189.7 | 1,671 | 0.831313 |
cf856ea65461f9be2f78fa501957ac93c7d83002 | 6,517 | asm | Assembly | Transynther/x86/_processed/NONE/_zr_/i9-9900K_12_0xa0.log_21829_853.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_zr_/i9-9900K_12_0xa0.log_21829_853.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_zr_/i9-9900K_12_0xa0.log_21829_853.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r13
push %r15
push %r9
push %rbx
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_normal_ht+0x10b6d, %rdx
nop
nop
nop
nop
dec %r9
movw $0x6162, (%rdx)
nop
nop
xor %rdx, %rdx
lea addresses_WT_ht+0x116d, %rdi
sub $16885, %r15
mov $0x6162636465666768, %rbx
movq %rbx, %xmm1
movups %xmm1, (%rdi)
inc %rbx
lea addresses_WT_ht+0x116ad, %rsi
lea addresses_normal_ht+0x17cad, %rdi
nop
nop
nop
nop
nop
dec %rdx
mov $21, %rcx
rep movsb
nop
nop
cmp $33431, %r13
lea addresses_normal_ht+0x27ad, %r9
nop
add %rdi, %rdi
mov $0x6162636465666768, %r15
movq %r15, %xmm2
and $0xffffffffffffffc0, %r9
movntdq %xmm2, (%r9)
dec %r9
lea addresses_normal_ht+0x7c65, %rbx
clflush (%rbx)
nop
xor %r9, %r9
mov $0x6162636465666768, %rdx
movq %rdx, %xmm7
and $0xffffffffffffffc0, %rbx
vmovaps %ymm7, (%rbx)
nop
nop
xor $58468, %rbx
lea addresses_A_ht+0xa935, %rsi
lea addresses_WT_ht+0x1dc81, %rdi
nop
nop
xor %r15, %r15
mov $41, %rcx
rep movsq
cmp %rbx, %rbx
lea addresses_UC_ht+0x5c35, %rbx
nop
nop
nop
nop
nop
dec %r13
movw $0x6162, (%rbx)
nop
nop
nop
nop
nop
cmp %rdi, %rdi
lea addresses_WC_ht+0x6aad, %rsi
lea addresses_normal_ht+0x1dc4d, %rdi
nop
nop
inc %r9
mov $54, %rcx
rep movsw
nop
nop
nop
sub %r13, %r13
lea addresses_A_ht+0x482d, %r13
nop
dec %r15
movups (%r13), %xmm7
vpextrq $1, %xmm7, %rsi
nop
nop
nop
nop
sub %rdx, %rdx
lea addresses_WT_ht+0xb66d, %rcx
cmp %rdi, %rdi
movb $0x61, (%rcx)
nop
add $48823, %rdi
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %r9
pop %r15
pop %r13
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r13
push %r15
push %rax
push %rcx
push %rdx
// Faulty Load
lea addresses_A+0x66ad, %r10
nop
nop
nop
nop
xor $38793, %rdx
mov (%r10), %r13
lea oracles, %r10
and $0xff, %r13
shlq $12, %r13
mov (%r10,%r13,1), %r13
pop %rdx
pop %rcx
pop %rax
pop %r15
pop %r13
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_A', 'AVXalign': False, 'size': 1}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'NT': False, 'same': True, 'congruent': 0, 'type': 'addresses_A', 'AVXalign': False, 'size': 8}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 6, 'type': 'addresses_normal_ht', 'AVXalign': True, 'size': 2}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 6, 'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 16}}
{'src': {'same': False, 'congruent': 9, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 8, 'type': 'addresses_normal_ht'}}
{'OP': 'STOR', 'dst': {'NT': True, 'same': False, 'congruent': 8, 'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 16}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 3, 'type': 'addresses_normal_ht', 'AVXalign': True, 'size': 32}}
{'src': {'same': False, 'congruent': 3, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 2, 'type': 'addresses_WT_ht'}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': True, 'congruent': 3, 'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 2}}
{'src': {'same': True, 'congruent': 10, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 3, 'type': 'addresses_normal_ht'}}
{'src': {'NT': False, 'same': False, 'congruent': 7, 'type': 'addresses_A_ht', 'AVXalign': False, 'size': 16}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 4, 'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 1}}
{'00': 21829}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
| 39.259036 | 2,999 | 0.661654 |
016bbbce0ba9a9371db65b31cfa7356cf0b13d53 | 1,684 | asm | Assembly | kernel/boot.asm | martinliptak/kernel-from-scratch | 085d691d6b7bc8b75d988a0f48ec4bb01af4a95c | [
"Unlicense"
] | 2 | 2020-11-28T22:23:04.000Z | 2021-02-27T19:50:04.000Z | kernel/boot.asm | martinliptak/kernel-from-scratch | 085d691d6b7bc8b75d988a0f48ec4bb01af4a95c | [
"Unlicense"
] | null | null | null | kernel/boot.asm | martinliptak/kernel-from-scratch | 085d691d6b7bc8b75d988a0f48ec4bb01af4a95c | [
"Unlicense"
] | null | null | null | %define STACK_SIZE 0x4000
%define MAGIC 0x1BADB002
%define FLAGS 3
%define VIRTUAL_BASE 0xc0000000
%define PAGE_NUMBER (VIRTUAL_BASE >> 22)
section .text
global pagedir
extern kmain
main:
mov ecx, pagedir - VIRTUAL_BASE ; We need physical address
and ecx, 0xfffff000 ; The last 3 bits are flags
mov cr3, ecx
mov ecx, cr4
or ecx, 0x00000010 ; PSE (4MB pages)
mov cr4, ecx
mov ecx, cr0
or ecx, 0x80000000 ; PG (paging)
mov cr0, ecx
lea ecx, [higher_main]
jmp ecx
higher_main:
; We don't need 1:1 mapping of the first 4MB, only 1MB,
; except the first page (to detect NULL pointers)
; xor ecx, ecx
; inc ecx
; .loop:
; mov edx, ecx
; shl edx, 12 ; edx *= 4096
; or edx, 0x3 ; flags present and read/write
; mov [firsttable + ecx * 4], edx
; inc ecx
; cmp ecx, 256
; jb .loop
; mov dword [pagedir], (firsttable - $$ + 0x100000) & 0xfffff000 | 0x00000003
mov dword [pagedir], 0
invlpg [0]
mov ecx, pagedir - VIRTUAL_BASE
or ecx, 0x3
mov [pagedir + 4 * 1022], ecx
invlpg [0xfffff000]
mov esp, stack + STACK_SIZE
push ebx
call kmain
jmp $
align 4
header:
dd MAGIC
dd FLAGS
dd -(MAGIC + FLAGS)
align 4096
pagedir:
; Without this entry the kernel would crash immediately after enabling
; paging, because the cpu wouldn't be able to fetch the next instruction.
dd 0x00000083
times (PAGE_NUMBER - 1) dd 0
; Map the first 16MB to the beginning of the kernel virtual base
dd 0x00000083
dd 0x00400083
dd 0x00800083
dd 0x00c00083
times (1024 - PAGE_NUMBER - 4) dd 0
align 4096
firsttable:
times 1024 dd 0
section .bss
align 32
stack:
resb STACK_SIZE
| 20.289157 | 79 | 0.671615 |
24720ca3ad9dda84167f26e7115dc7190991555b | 7,703 | asm | Assembly | Transynther/x86/_processed/AVXALIGN/_st_zr_4k_sm_/i7-8650U_0xd2_notsx.log_187_520.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/AVXALIGN/_st_zr_4k_sm_/i7-8650U_0xd2_notsx.log_187_520.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/AVXALIGN/_st_zr_4k_sm_/i7-8650U_0xd2_notsx.log_187_520.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r13
push %r8
push %rax
push %rbx
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_WT_ht+0xe99a, %rbx
nop
nop
nop
nop
nop
dec %rdi
mov $0x6162636465666768, %rdx
movq %rdx, (%rbx)
nop
nop
nop
nop
nop
xor %r13, %r13
lea addresses_WC_ht+0xf51a, %r8
nop
nop
nop
mfence
mov (%r8), %rax
nop
nop
add %rax, %rax
lea addresses_normal_ht+0x1319a, %rsi
lea addresses_WC_ht+0x111a, %rdi
nop
nop
nop
cmp %rdx, %rdx
mov $56, %rcx
rep movsw
nop
and %r8, %r8
lea addresses_UC_ht+0x3582, %rsi
lea addresses_D_ht+0xda5e, %rdi
nop
nop
nop
inc %r13
mov $105, %rcx
rep movsq
nop
nop
nop
nop
inc %rbx
lea addresses_UC_ht+0x119a, %r8
nop
nop
nop
nop
nop
cmp %rdx, %rdx
movb $0x61, (%r8)
nop
nop
nop
nop
xor $9106, %rbx
lea addresses_A_ht+0x869a, %rsi
lea addresses_WC_ht+0xfc5a, %rdi
nop
sub $1275, %rdx
mov $49, %rcx
rep movsq
cmp %r13, %r13
lea addresses_UC_ht+0xa23a, %rcx
clflush (%rcx)
cmp $762, %rax
mov (%rcx), %rdi
nop
add $57007, %rbx
lea addresses_WT_ht+0x1809a, %rdi
nop
and %rdx, %rdx
mov $0x6162636465666768, %rbx
movq %rbx, (%rdi)
nop
nop
nop
nop
cmp $38264, %r13
lea addresses_normal_ht+0x1471a, %r8
inc %r13
mov (%r8), %ecx
nop
nop
nop
dec %rax
lea addresses_WC_ht+0x2d9a, %rsi
lea addresses_normal_ht+0x1b8da, %rdi
nop
sub $10409, %r13
mov $25, %rcx
rep movsb
nop
nop
nop
xor %r8, %r8
lea addresses_WC_ht+0xd59a, %rsi
lea addresses_UC_ht+0x1843a, %rdi
nop
nop
xor %rax, %rax
mov $122, %rcx
rep movsw
sub %rdi, %rdi
lea addresses_UC_ht+0x13b3a, %r13
nop
nop
cmp %rbx, %rbx
mov $0x6162636465666768, %rsi
movq %rsi, (%r13)
nop
nop
nop
sub %rdx, %rdx
lea addresses_D_ht+0x5a1a, %rsi
lea addresses_normal_ht+0x7d9a, %rdi
nop
nop
nop
dec %rax
mov $53, %rcx
rep movsl
nop
nop
nop
and %rax, %rax
lea addresses_WC_ht+0x1c11a, %rbx
nop
nop
nop
nop
nop
xor %rdx, %rdx
movb $0x61, (%rbx)
and %r13, %r13
lea addresses_WT_ht+0x1575e, %rsi
lea addresses_WT_ht+0x1e9da, %rdi
nop
inc %rdx
mov $50, %rcx
rep movsw
nop
nop
nop
and %rcx, %rcx
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %rax
pop %r8
pop %r13
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r12
push %r8
push %r9
push %rbx
push %rdx
// Store
lea addresses_RW+0xd59a, %r8
clflush (%r8)
nop
nop
nop
nop
sub $10136, %r11
mov $0x5152535455565758, %r12
movq %r12, (%r8)
nop
nop
nop
cmp $12096, %r8
// Store
lea addresses_D+0x1783a, %r11
nop
nop
nop
nop
cmp $55056, %rbx
movb $0x51, (%r11)
nop
nop
nop
nop
cmp %r11, %r11
// Store
lea addresses_normal+0x1209a, %rbx
nop
nop
nop
xor $52162, %r10
movw $0x5152, (%rbx)
nop
nop
and %r9, %r9
// Store
lea addresses_D+0x10aaa, %rdx
xor %r12, %r12
mov $0x5152535455565758, %r9
movq %r9, %xmm0
movups %xmm0, (%rdx)
sub $29647, %r12
// Store
lea addresses_RW+0x1b19a, %r10
nop
nop
nop
dec %r8
movb $0x51, (%r10)
nop
nop
dec %r8
// Store
lea addresses_D+0xb19a, %r8
nop
nop
sub $20278, %r11
mov $0x5152535455565758, %rbx
movq %rbx, %xmm3
vmovntdq %ymm3, (%r8)
sub %r10, %r10
// Store
lea addresses_D+0x19a, %r8
nop
nop
nop
xor $56678, %r11
movw $0x5152, (%r8)
nop
and %rdx, %rdx
// Load
lea addresses_A+0xa6da, %rbx
nop
nop
nop
nop
and $36178, %rdx
vmovups (%rbx), %ymm5
vextracti128 $0, %ymm5, %xmm5
vpextrq $1, %xmm5, %r12
nop
nop
nop
nop
add $29898, %r9
// Store
lea addresses_normal+0x729a, %r11
clflush (%r11)
nop
nop
nop
nop
cmp $42256, %r8
movw $0x5152, (%r11)
nop
nop
nop
add %r11, %r11
// Faulty Load
lea addresses_D+0xb19a, %rdx
nop
nop
nop
nop
nop
add $24493, %r8
vmovaps (%rdx), %ymm5
vextracti128 $0, %ymm5, %xmm5
vpextrq $0, %xmm5, %r9
lea oracles, %r10
and $0xff, %r9
shlq $12, %r9
mov (%r10,%r9,1), %r9
pop %rdx
pop %rbx
pop %r9
pop %r8
pop %r12
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_D', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_RW', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 4, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 8, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 3, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_RW', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 11, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D', 'size': 32, 'AVXalign': False, 'NT': True, 'congruent': 0, 'same': True}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_A', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 5, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 8, 'same': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_D', 'size': 32, 'AVXalign': True, 'NT': False, 'congruent': 0, 'same': True}}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 11, 'same': True}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 7, 'same': True}}
{'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 10, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 6, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 1, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 11, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 6, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 5, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 8, 'same': True}}
{'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 7, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 10, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 6, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 4, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 5, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 6, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 9, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'size': 1, 'AVXalign': False, 'NT': True, 'congruent': 7, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 6, 'same': False}}
{'52': 78, '00': 109}
52 00 00 52 00 52 00 52 00 00 52 52 00 00 00 00 52 52 52 00 00 00 52 00 00 52 00 52 00 00 00 00 00 52 00 00 52 00 52 00 52 52 52 00 00 52 00 00 00 52 00 52 52 52 52 52 00 00 52 00 52 00 52 00 00 52 00 52 00 00 00 00 00 00 52 52 00 00 00 52 00 52 52 52 00 00 00 00 52 00 00 00 00 52 52 00 00 00 52 00 52 00 52 00 52 00 00 00 52 00 00 00 00 00 00 00 00 00 52 00 00 52 00 00 52 52 00 00 00 52 52 00 52 00 00 00 00 52 52 00 52 00 52 52 00 00 00 00 00 00 00 00 52 52 52 00 00 52 52 52 52 52 52 00 52 00 00 52 00 52 00 52 52 52 00 52 00 00 00 52 52 52 00 52 52 00 52
*/
| 22.198847 | 560 | 0.64754 |
122fa1d174cace22d03f2bb075e98398fd879afe | 992 | nasm | Assembly | IntelFsp2Pkg/FspSecCore/X64/FspHelper.nasm | mefff/edk2 | 0a4019ec9de64c6565ea545dc8d847afe2b30d6c | [
"Python-2.0",
"Zlib",
"BSD-2-Clause",
"MIT",
"BSD-2-Clause-Patent",
"BSD-3-Clause"
] | null | null | null | IntelFsp2Pkg/FspSecCore/X64/FspHelper.nasm | mefff/edk2 | 0a4019ec9de64c6565ea545dc8d847afe2b30d6c | [
"Python-2.0",
"Zlib",
"BSD-2-Clause",
"MIT",
"BSD-2-Clause-Patent",
"BSD-3-Clause"
] | null | null | null | IntelFsp2Pkg/FspSecCore/X64/FspHelper.nasm | mefff/edk2 | 0a4019ec9de64c6565ea545dc8d847afe2b30d6c | [
"Python-2.0",
"Zlib",
"BSD-2-Clause",
"MIT",
"BSD-2-Clause-Patent",
"BSD-3-Clause"
] | 1 | 2021-12-23T07:59:29.000Z | 2021-12-23T07:59:29.000Z | ;; @file
; Provide FSP helper function.
;
; Copyright (c) 2022, Intel Corporation. All rights reserved.<BR>
; SPDX-License-Identifier: BSD-2-Clause-Patent
;;
DEFAULT REL
SECTION .text
global ASM_PFX(AsmGetFspBaseAddress)
ASM_PFX(AsmGetFspBaseAddress):
call ASM_PFX(AsmGetFspInfoHeader)
add rax, 0x1C
mov eax, [rax]
ret
global ASM_PFX(AsmGetFspInfoHeader)
ASM_PFX(AsmGetFspInfoHeader):
lea rax, [ASM_PFX(AsmGetFspInfoHeader)]
DB 0x48, 0x2d ; sub rax, 0x????????
global ASM_PFX(FspInfoHeaderRelativeOff)
ASM_PFX(FspInfoHeaderRelativeOff):
DD 0x12345678 ; This value must be patched by the build script
and rax, 0xffffffff
ret
global ASM_PFX(AsmGetFspInfoHeaderNoStack)
ASM_PFX(AsmGetFspInfoHeaderNoStack):
lea rax, [ASM_PFX(AsmGetFspInfoHeader)]
lea rcx, [ASM_PFX(FspInfoHeaderRelativeOff)]
mov ecx, [rcx]
sub rax, rcx
and rax, 0xffffffff
jmp rdi
| 28.342857 | 83 | 0.678427 |
210ef6753cb8867fd7bff312ebb4c5cfe312d9d2 | 124 | asm | Assembly | r5asm/test/test001.asm | walter-artica/r5asm | acfc448cbfcb09ed8f34e6c805bfbffe9bd32abc | [
"MIT"
] | null | null | null | r5asm/test/test001.asm | walter-artica/r5asm | acfc448cbfcb09ed8f34e6c805bfbffe9bd32abc | [
"MIT"
] | null | null | null | r5asm/test/test001.asm | walter-artica/r5asm | acfc448cbfcb09ed8f34e6c805bfbffe9bd32abc | [
"MIT"
] | null | null | null | .code
set R1, 0
cmp R1, 0
bz label1
set R1, 1
bt label2
label1:
set R1, 2
label2:
bt label2
nop
nop
nop
| 8.857143 | 11 | 0.58871 |
ceb4260e1dab44882e822707adde67f9e7b7958e | 388 | asm | Assembly | programs/oeis/047/A047661.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/047/A047661.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/047/A047661.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A047661: Row 5 of square array defined in A047662.
; 5,30,115,340,841,1826,3591,6536,11181,18182,28347,42652,62257,88522,123023,167568,224213,295278,383363,491364,622489,780274,968599,1191704,1454205,1761110,2117835,2530220,3004545,3547546
add $0,1
lpb $0
mov $2,$0
sub $0,1
seq $2,8413 ; Coordination sequence for 5-dimensional cubic lattice.
add $1,$2
lpe
div $1,2
mov $0,$1
| 29.846154 | 188 | 0.744845 |
6798dd41306a8f80771bd40ecc4ae2a288acf42d | 4,389 | asm | Assembly | prog_2.asm | averov90/asm8086-io-arithmetic | 792120e9cc881c10da5780680e22ff3987e08d3d | [
"Unlicense"
] | null | null | null | prog_2.asm | averov90/asm8086-io-arithmetic | 792120e9cc881c10da5780680e22ff3987e08d3d | [
"Unlicense"
] | null | null | null | prog_2.asm | averov90/asm8086-io-arithmetic | 792120e9cc881c10da5780680e22ff3987e08d3d | [
"Unlicense"
] | null | null | null | .model small
.stack 12 ;bytes, 5 - word - stack depth for func_uint16OUT, 1 - for funclion call
.data
;Variables
threshold dw ?
;Constants
msg_enterN db 0Ah,'Enter numbers: $'
msg_enterT db 'Enter threshold number: $'
msg_enterC_err db 0Ah,'Count of numbers must be above 0! '
msg_enterC db 0Ah,'Enter count of numbers: $'
msg_result db 0Ah,'Result: $'
func_int16IN_errmsg db 0Ah,'Invalid input! Enter 16-bit signed number: $'
func_uint16IN_errmsg db 0Ah,'Invalid input! Enter 16-bit unsigned number: $'
;Multithread non-safe
func_int16IN_buffer db 7, 0, 7 dup(?)
func_uint16IN_buffer db 6, 0, 6 dup(?)
.code
start proc
mov ax, @data
mov ds, ax ;init data segment
lea dx, msg_enterT
mov ah,9
int 21h ;message print
call func_int16IN ;input number
mov [threshold],ax
lea dx, msg_enterC
C_reenter:
mov ah,9
int 21h ;message print
call func_uint16IN ;input number
test ax,ax
jz C_unc
mov cx,ax ;di = n
xor di,di
cloop:
lea dx, msg_enterN
mov ah,9
int 21h ;message print
mov bp,cx
call func_int16IN ;input number
cmp ax,[threshold]
jle cloop_else
inc di
cloop_else:
mov cx,bp
loop cloop
lea dx, msg_result
mov ah,9
int 21h ;message print
mov ax,di
call func_uint16OUT
mov ah, 4Ch
int 21h ;stop
C_unc:
lea dx, msg_enterC_err
jmp C_reenter
start endp
;require: ax, bx, cx, dx, si
func_int16IN proc
mov bx,10 ;prepare bx register
xor ch,ch
label_func_int16IN_reinput:
lea dx, func_int16IN_buffer ;set pointer to buffer
mov ah,0Ah ;init string input mode
int 21h ;input string
mov cl, [func_int16IN_buffer+1]
lea si, func_int16IN_buffer+2 ;set pointer to first symbol of string to si
xor ax,ax ;zero ax
cmp byte ptr [si],'-'
je label_func_int16IN_sign
label_func_int16IN_loop:
cmp byte ptr [si],'0' ;check symbol code
jb label_func_int16IN_err
cmp byte ptr [si],'9' ;check symbol code
ja label_func_int16IN_err
mul bx ;multiply to basis
test ax,ax
js label_func_int16IN_err
sub byte ptr [si],'0' ;get number from symbol
add al,[si] ;add number to result
adc ah,0
js label_func_int16IN_err
inc si
loop label_func_int16IN_loop ;string to uint16 cycle
ret
label_func_int16IN_sign:
inc si
cmp byte ptr [si],'0' ;check symbol code
jb label_func_int16IN_err
cmp byte ptr [si],'9' ;check symbol code
ja label_func_int16IN_err
sub byte ptr [si],'0' ;get number from symbol
sub al,[si] ;add number to result
mov ah,0FFh
sub cx,2
jz label_func_int16IN_finite
label_func_int16IN_nloop:
inc si
cmp byte ptr [si],'0' ;check symbol code
jb label_func_int16IN_err
cmp byte ptr [si],'9' ;check symbol code
ja label_func_int16IN_err
imul bx ;multiply to basis
test ax,ax
jns label_func_int16IN_err
sub byte ptr [si],'0' ;get number from symbol
sub al,[si] ;add number to result
sbb ah,0
jns label_func_int16IN_err
loop label_func_int16IN_nloop ;string to uint16 cycle
label_func_int16IN_finite:
ret
label_func_int16IN_err:
lea dx,func_int16IN_errmsg
mov ah,9
int 21h
jmp label_func_int16IN_reinput
func_int16IN endp
;require: ax, bx, cx, dx, si
func_uint16IN proc
mov bx,10 ;prepare bx register
xor ch,ch
label_func_uint16IN_reinput:
lea dx, func_uint16IN_buffer ;set pointer to buffer
mov ah,0Ah ;init string input mode
int 21h ;input string
mov cl, [func_uint16IN_buffer+1]
lea si, func_uint16IN_buffer+2 ;set pointer to first symbol of string to si
xor ax,ax ;zero ax
label_func_uint16IN_loop:
cmp byte ptr [si],'0' ;check symbol code
jb label_func_uint16IN_err
cmp byte ptr [si],'9' ;check symbol code
ja label_func_uint16IN_err
mul bx ;multiply to basis
jc label_func_uint16IN_err
sub byte ptr [si],'0' ;get number from symbol
add al,[si] ;add number to result
adc ah,0
jc label_func_uint16IN_err
inc si
loop label_func_uint16IN_loop ;string to uint16 cycle
ret
label_func_uint16IN_err:
lea dx,func_uint16IN_errmsg
mov ah,9
int 21h
jmp label_func_uint16IN_reinput
func_uint16IN endp
;require: ax, bx, cx, dx
func_uint16OUT proc
;ax - low word
xor cx,cx ;zero counter
mov bx,10
label_func_uint16OUT_decodeNext:
inc cx ;count digits
xor dx,dx
div bx
push dx ;save digit
test ax,ax ;check that digits not finish
jnz label_func_uint16OUT_decodeNext ;if not - repeat
mov ah,2 ;prepare DOS output
label_func_uint16OUT_printNext:
pop dx ;get digit
add dx,'0' ;set digit to output
int 21h
loop label_func_uint16OUT_printNext
ret
func_uint16OUT endp
end start | 24.79661 | 82 | 0.760538 |
6a545fc07230a66335083454da42549ffce060ef | 3,598 | asm | Assembly | src/text.asm | maziac/dezogif | e92f6a0e21ac6b465349e193417e3f19721f763d | [
"MIT"
] | 2 | 2020-05-25T09:25:46.000Z | 2020-12-30T10:43:58.000Z | src/text.asm | maziac/dezogif | e92f6a0e21ac6b465349e193417e3f19721f763d | [
"MIT"
] | null | null | null | src/text.asm | maziac/dezogif | e92f6a0e21ac6b465349e193417e3f19721f763d | [
"MIT"
] | null | null | null | ;========================================================
; text.asm
;========================================================
; Code to use in strings for positioning: AT x, y (in pixels)
AT: equ 0x16
; Routines that draw text on the ULA or layer2 screen.
; Can be used as substitute for the original ZX Spectrum
; text drawing routines.
MODULE text
; Note: The loader copies the original spectrum font to the ROM_FONT address.
; This subroutine initializes the used font to ROM_FONT address.
; This is also the default value.
; IN:
; -
; OUT:
; -
; Changed registers:
; HL, DE, BC
init:
; Store the used font address. The font starts normally at char index 0, so
; it's lower than the original address.
;ld hl,ROM_START+ROM_SIZE-ROM_FONT_SIZE-0x20*8
ld hl,MAIN_ADDR+0x2000-ROM_FONT_SIZE-0x20*8+MF_ORIGIN_ROM-MF.main_prg_copy
; Flow through
; Sets the font address.
; IN:
; HL = address of font to use. Contains 256 character, but the first 8 bytes are not used (0).
; OUT:
; -
; Changed registers:
; -
set_font:
; Store the used font address.
ld (font_address),hl
ret
; -----------------------------------------------------------------------
; ULA routines.
; Calculates the address in the screen from x and y position.
; Use this before you call any 'print' subroutine.
; In general this uses the PIXELDN instructions to calculate
; the screen address. But additionally it sets the B register
; with X mod 8, so that it can be used by the print sub routines.
; IN:
; E = x-position, [0..255]
; D = y-position, [0..191]
; OUT:
; HL = points to the corresponding address in the ULA screen.
; B = x mod 8
; Changed registers:
; HL, B
ula.calc_address:
; Get x mod 8
ld a,e
and 00000111b
ld b,a
; Calculate screen address
PIXELAD
ret
; Prints a single character at ULA screen address in HL.
; IN:
; HL = screen address to write to.
; B = x mod 8, i.e. the number to shift the character
; A = character to write.
; OUT:
; -
; Changed registers:
; DE, BC, IX
ula.print_char:
push hl
push hl
; Calculate offset of character in font
ld e,a
ld d,8 ; 8 byte per character
mul d,e
; Add to font start address
ld hl,(font_address)
add hl,de
ld ix,hl ; ix points to character in font
; Now copy the character to the screen
pop hl
ld c,8 ; 8 byte per character
.loop:
ldi d,(ix) ; Load from font
ld e,0
bsrl de,b ; shift
; XOR screen with character (1)
ld a,(hl)
xor d
ld (hl),a
; Next address on screen
inc l
; XOR screen with character (2)
ld a,(hl)
xor e
ld (hl),a
; Correct x-position
dec l
; Next line
PIXELDN
; Next
dec c
jr nz,.loop
; Restore screen address
pop hl ; Restore screen address
ret
; Prints a complete string (until 0) at ULA screen address in HL.
; IN:
; HL = screen address to write to.
; DE = pointer to 0-terminated string
; B = x mod 8, i.e. the number to shift the character
; OUT:
; -
; Changed registers:
; HL, DE, C
ula.print_string:
.loop:
ld a,(de)
or a
ret z ; Return on 0
; Check for AT
cp AT
jr z,.at
; print one character
push de
call ula.print_char
pop de
; Next
inc de
inc l ; Increase x-position
jr .loop
ret
.at:
; AT x, y (pixels)
inc de
ldi a,(de) ; x
ld l,a
ldi a,(de) ; y
push de
ld e,l
ld d,a
call ula.calc_address
pop de
jr .loop
ENDMODULE
| 21.54491 | 96 | 0.590328 |
7052504b94b64937c2980044810cf79430c50457 | 1,988 | asm | Assembly | _incObj/35 Burning Grass.asm | kodishmediacenter/msu-md-sonic | 3aa7c5e8add9660df2cd0eceaa214e7d59f2415c | [
"CC0-1.0"
] | 9 | 2021-01-15T13:47:53.000Z | 2022-01-17T15:33:55.000Z | _incObj/35 Burning Grass.asm | kodishmediacenter/msu-md-sonic | 3aa7c5e8add9660df2cd0eceaa214e7d59f2415c | [
"CC0-1.0"
] | 7 | 2021-01-14T02:18:48.000Z | 2021-03-24T15:44:30.000Z | _incObj/35 Burning Grass.asm | kodishmediacenter/msu-md-sonic | 3aa7c5e8add9660df2cd0eceaa214e7d59f2415c | [
"CC0-1.0"
] | 2 | 2021-01-14T13:14:26.000Z | 2021-01-29T17:46:04.000Z | ; ---------------------------------------------------------------------------
; Object 35 - fireball that sits on the floor (MZ)
; (appears when you walk on sinking platforms)
; ---------------------------------------------------------------------------
GrassFire:
moveq #0,d0
move.b obRoutine(a0),d0
move.w GFire_Index(pc,d0.w),d1
jmp GFire_Index(pc,d1.w)
; ===========================================================================
GFire_Index: dc.w GFire_Main-GFire_Index
dc.w loc_B238-GFire_Index
dc.w GFire_Move-GFire_Index
gfire_origX: equ $2A
; ===========================================================================
GFire_Main: ; Routine 0
addq.b #2,obRoutine(a0)
move.l #Map_Fire,obMap(a0)
move.w #$345,obGfx(a0)
move.w obX(a0),gfire_origX(a0)
move.b #4,obRender(a0)
move.b #1,obPriority(a0)
move.b #$8B,obColType(a0)
move.b #8,obActWid(a0)
sfx sfx_Burning,0,0,0 ; play burning sound
tst.b obSubtype(a0)
beq.s loc_B238
addq.b #2,obRoutine(a0)
bra.w GFire_Move
; ===========================================================================
loc_B238: ; Routine 2
movea.l $30(a0),a1
move.w obX(a0),d1
sub.w gfire_origX(a0),d1
addi.w #$C,d1
move.w d1,d0
lsr.w #1,d0
move.b (a1,d0.w),d0
neg.w d0
add.w $2C(a0),d0
move.w d0,d2
add.w $3C(a0),d0
move.w d0,obY(a0)
cmpi.w #$84,d1
bcc.s loc_B2B0
addi.l #$10000,obX(a0)
cmpi.w #$80,d1
bcc.s loc_B2B0
move.l obX(a0),d0
addi.l #$80000,d0
andi.l #$FFFFF,d0
bne.s loc_B2B0
bsr.w FindNextFreeObj
bne.s loc_B2B0
move.b #id_GrassFire,0(a1)
move.w obX(a0),obX(a1)
move.w d2,$2C(a1)
move.w $3C(a0),$3C(a1)
move.b #1,obSubtype(a1)
movea.l $38(a0),a2
bsr.w sub_B09C
loc_B2B0:
bra.s GFire_Animate
; ===========================================================================
GFire_Move: ; Routine 4
move.w $2C(a0),d0
add.w $3C(a0),d0
move.w d0,obY(a0)
GFire_Animate:
lea (Ani_GFire).l,a1
bsr.w AnimateSprite
bra.w DisplaySprite
| 24.85 | 77 | 0.51006 |
63e3eea345ba783e4c7ef42fa2804577868e0d32 | 315 | asm | Assembly | oeis/259/A259368.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/259/A259368.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/259/A259368.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A259368: Number of digits in n^n when written in binary.
; 1,3,5,9,12,16,20,25,29,34,39,44,49,54,59,65,70,76,81,87,93,99,105,111,117,123,129,135,141,148,154,161,167,173,180,187,193,200,207,213,220,227,234,241,248,255,262,269,276,283,290,297,304,311,318,326,333
seq $0,326299 ; a(n) = floor(n*log_2(n)).
add $0,1
| 52.5 | 203 | 0.692063 |
4c63400b5e6dc256562ed45d94ad5a0fe4011a92 | 7,241 | asm | Assembly | Transynther/x86/_processed/US/_zr_/i7-7700_9_0x48.log_21829_2514.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/US/_zr_/i7-7700_9_0x48.log_21829_2514.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/US/_zr_/i7-7700_9_0x48.log_21829_2514.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r13
push %r14
push %rax
push %rbp
push %rbx
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_normal_ht+0x7b99, %r13
clflush (%r13)
nop
nop
add %rbp, %rbp
movb $0x61, (%r13)
nop
nop
nop
nop
sub $64300, %rdx
lea addresses_D_ht+0x16409, %rax
nop
nop
nop
nop
nop
xor $25309, %rcx
mov $0x6162636465666768, %r14
movq %r14, (%rax)
inc %rcx
lea addresses_A_ht+0x11bb9, %rbx
nop
nop
nop
nop
xor %rax, %rax
movb (%rbx), %r13b
nop
nop
nop
cmp %rbx, %rbx
lea addresses_WT_ht+0x1aea9, %rbp
nop
inc %rdx
movups (%rbp), %xmm5
vpextrq $1, %xmm5, %r14
nop
nop
inc %r13
lea addresses_WC_ht+0x174a9, %rbp
nop
nop
inc %rcx
movb $0x61, (%rbp)
nop
nop
nop
nop
sub %rax, %rax
lea addresses_WC_ht+0x16ba9, %rax
nop
nop
nop
nop
dec %rbx
movb (%rax), %cl
nop
and %r13, %r13
lea addresses_normal_ht+0xb7a9, %rsi
lea addresses_UC_ht+0x1b8d9, %rdi
nop
add %r14, %r14
mov $38, %rcx
rep movsq
nop
nop
nop
dec %rbp
lea addresses_WT_ht+0x1a741, %r14
sub $9515, %rcx
movups (%r14), %xmm1
vpextrq $0, %xmm1, %rbp
sub $57371, %r14
lea addresses_UC_ht+0xed69, %r14
nop
nop
nop
nop
nop
xor %rdi, %rdi
movb (%r14), %bl
nop
nop
nop
nop
inc %r14
lea addresses_UC_ht+0xda29, %r14
nop
nop
nop
nop
nop
and $33615, %rbx
mov (%r14), %bp
and %rsi, %rsi
lea addresses_normal_ht+0x37a9, %rsi
lea addresses_UC_ht+0x15a9, %rdi
nop
and $1437, %rax
mov $74, %rcx
rep movsq
nop
nop
nop
nop
xor $46538, %rdi
lea addresses_A_ht+0xed43, %rbx
nop
nop
and $1308, %rax
mov (%rbx), %r13w
nop
nop
xor %rsi, %rsi
lea addresses_UC_ht+0x1de89, %r13
nop
nop
nop
nop
nop
cmp %r14, %r14
movb (%r13), %al
nop
nop
nop
nop
sub $60999, %rbx
lea addresses_UC_ht+0x1aba9, %r13
nop
sub %rdi, %rdi
mov (%r13), %rbp
and %rsi, %rsi
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %rax
pop %r14
pop %r13
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r12
push %r8
push %r9
push %rdi
// Faulty Load
lea addresses_US+0x19fa9, %r12
cmp %rdi, %rdi
movups (%r12), %xmm6
vpextrq $1, %xmm6, %r8
lea oracles, %rdi
and $0xff, %r8
shlq $12, %r8
mov (%rdi,%r8,1), %r8
pop %rdi
pop %r9
pop %r8
pop %r12
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_US', 'AVXalign': False, 'congruent': 0, 'size': 4, 'same': False, 'NT': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_US', 'AVXalign': False, 'congruent': 0, 'size': 16, 'same': True, 'NT': False}}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 4, 'size': 1, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 5, 'size': 8, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 3, 'size': 1, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 8, 'size': 16, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 8, 'size': 1, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 10, 'size': 1, 'same': False, 'NT': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 4, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 2, 'size': 16, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 5, 'size': 1, 'same': True, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 6, 'size': 2, 'same': False, 'NT': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 11, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 8, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 1, 'size': 2, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 2, 'size': 1, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 9, 'size': 8, 'same': False, 'NT': False}}
{'00': 21829}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
| 35.495098 | 2,999 | 0.653639 |
8bf6878602e2db8911d2b63958d6a0530e8971f1 | 374 | asm | Assembly | u7si/printDestinationsOnDarkPathMap.asm | JohnGlassmyer/UltimaHacks | f9a114e00c4a1edf1ac7792b465feff2c9b88ced | [
"MIT"
] | 68 | 2018-03-04T22:34:22.000Z | 2022-03-10T15:18:32.000Z | u7si/printDestinationsOnDarkPathMap.asm | ptrie/UltimaHacks | 2c3557a86d94ad8b54b26bc395b9aed1604f8be1 | [
"MIT"
] | 19 | 2018-11-20T04:06:49.000Z | 2021-11-08T16:37:10.000Z | u7si/printDestinationsOnDarkPathMap.asm | ptrie/UltimaHacks | 2c3557a86d94ad8b54b26bc395b9aed1604f8be1 | [
"MIT"
] | 4 | 2020-09-01T17:57:36.000Z | 2022-01-04T20:51:11.000Z | %include "include/u7si-all-includes.asm"
defineAddress 245, 0x0119, afterDrawingDarkPathMap
defineAddress 245, 0x014E, afterDrawingDarkPathMap_end
startPatch EXE_LENGTH, printDestinationsOnDarkPathMap
startBlockAt addr_afterDrawingDarkPathMap
callVarArgsEopFromOverlay printDarkPathDestinations, 0
times 44 nop
endBlockAt off_afterDrawingDarkPathMap_end
endPatch
| 28.769231 | 56 | 0.871658 |
6c978237b3b7ffba7361e21bdaa6df77c2eb0649 | 7,424 | asm | Assembly | Transynther/x86/_processed/NC/_zr_/i9-9900K_12_0xca.log_21829_702.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NC/_zr_/i9-9900K_12_0xca.log_21829_702.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NC/_zr_/i9-9900K_12_0xca.log_21829_702.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r12
push %r8
push %rax
push %rbp
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_D_ht+0x1e6a8, %r8
sub $6025, %rcx
mov (%r8), %si
nop
nop
nop
nop
add %rdx, %rdx
lea addresses_normal_ht+0x19710, %rsi
lea addresses_UC_ht+0xda44, %rdi
and $24463, %r12
mov $109, %rcx
rep movsw
nop
nop
nop
nop
nop
sub %r8, %r8
lea addresses_UC_ht+0x60d0, %rdi
nop
nop
nop
sub %rsi, %rsi
mov (%rdi), %r12w
nop
nop
nop
nop
nop
sub $56108, %rdx
lea addresses_WT_ht+0xcf10, %rcx
nop
nop
sub $16865, %rbp
movups (%rcx), %xmm4
vpextrq $1, %xmm4, %r12
sub $17179, %rdx
lea addresses_normal_ht+0x8b10, %rsi
lea addresses_WC_ht+0x18710, %rdi
clflush (%rsi)
nop
nop
inc %rax
mov $75, %rcx
rep movsl
nop
nop
nop
cmp $43518, %rdi
lea addresses_WT_ht+0x1db88, %rdi
sub $48656, %rax
movb $0x61, (%rdi)
nop
nop
nop
inc %rax
lea addresses_WT_ht+0xbee4, %r12
nop
dec %rax
mov $0x6162636465666768, %rsi
movq %rsi, (%r12)
nop
xor %rdx, %rdx
lea addresses_WT_ht+0x5344, %rcx
nop
nop
nop
nop
xor $58522, %rdx
vmovups (%rcx), %ymm3
vextracti128 $1, %ymm3, %xmm3
vpextrq $1, %xmm3, %rax
cmp %r12, %r12
lea addresses_WC_ht+0xe340, %rsi
lea addresses_UC_ht+0xf090, %rdi
nop
nop
nop
sub $59776, %r8
mov $114, %rcx
rep movsw
nop
nop
nop
lfence
lea addresses_UC_ht+0x17f10, %rcx
add $6466, %rdx
mov (%rcx), %r8
and $20235, %rcx
lea addresses_WC_ht+0x17f10, %rbp
and $13864, %rax
movl $0x61626364, (%rbp)
nop
nop
nop
xor %rbp, %rbp
lea addresses_normal_ht+0x1b710, %rbp
nop
add $21110, %r12
mov (%rbp), %edi
nop
nop
nop
xor $22566, %rax
lea addresses_D_ht+0xd6a4, %rax
nop
inc %r12
movups (%rax), %xmm6
vpextrq $1, %xmm6, %rsi
nop
nop
nop
nop
cmp $31829, %rsi
lea addresses_WT_ht+0xf310, %rsi
lea addresses_WT_ht+0xabf7, %rdi
clflush (%rsi)
nop
nop
nop
nop
dec %rax
mov $29, %rcx
rep movsw
nop
nop
sub $35612, %rdi
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbp
pop %rax
pop %r8
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r13
push %r14
push %r8
push %rax
push %rdi
push %rdx
// Faulty Load
mov $0xce3c10000000f10, %rdi
nop
xor $37425, %r8
movups (%rdi), %xmm0
vpextrq $0, %xmm0, %r13
lea oracles, %rax
and $0xff, %r13
shlq $12, %r13
mov (%rax,%r13,1), %r13
pop %rdx
pop %rdi
pop %rax
pop %r8
pop %r14
pop %r13
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'size': 1, 'NT': False, 'type': 'addresses_NC', 'same': False, 'AVXalign': False, 'congruent': 0}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'size': 16, 'NT': False, 'type': 'addresses_NC', 'same': True, 'AVXalign': False, 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'LOAD', 'src': {'size': 2, 'NT': False, 'type': 'addresses_D_ht', 'same': False, 'AVXalign': False, 'congruent': 1}}
{'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_normal_ht', 'congruent': 9}, 'dst': {'same': False, 'type': 'addresses_UC_ht', 'congruent': 0}}
{'OP': 'LOAD', 'src': {'size': 2, 'NT': False, 'type': 'addresses_UC_ht', 'same': False, 'AVXalign': False, 'congruent': 4}}
{'OP': 'LOAD', 'src': {'size': 16, 'NT': False, 'type': 'addresses_WT_ht', 'same': False, 'AVXalign': False, 'congruent': 11}}
{'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_normal_ht', 'congruent': 4}, 'dst': {'same': False, 'type': 'addresses_WC_ht', 'congruent': 11}}
{'OP': 'STOR', 'dst': {'size': 1, 'NT': False, 'type': 'addresses_WT_ht', 'same': False, 'AVXalign': False, 'congruent': 2}}
{'OP': 'STOR', 'dst': {'size': 8, 'NT': False, 'type': 'addresses_WT_ht', 'same': False, 'AVXalign': False, 'congruent': 2}}
{'OP': 'LOAD', 'src': {'size': 32, 'NT': False, 'type': 'addresses_WT_ht', 'same': False, 'AVXalign': False, 'congruent': 0}}
{'OP': 'REPM', 'src': {'same': True, 'type': 'addresses_WC_ht', 'congruent': 3}, 'dst': {'same': True, 'type': 'addresses_UC_ht', 'congruent': 7}}
{'OP': 'LOAD', 'src': {'size': 8, 'NT': False, 'type': 'addresses_UC_ht', 'same': False, 'AVXalign': False, 'congruent': 10}}
{'OP': 'STOR', 'dst': {'size': 4, 'NT': False, 'type': 'addresses_WC_ht', 'same': False, 'AVXalign': False, 'congruent': 8}}
{'OP': 'LOAD', 'src': {'size': 4, 'NT': False, 'type': 'addresses_normal_ht', 'same': False, 'AVXalign': False, 'congruent': 11}}
{'OP': 'LOAD', 'src': {'size': 16, 'NT': False, 'type': 'addresses_D_ht', 'same': False, 'AVXalign': False, 'congruent': 2}}
{'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_WT_ht', 'congruent': 8}, 'dst': {'same': False, 'type': 'addresses_WT_ht', 'congruent': 0}}
{'00': 21829}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
| 37.12 | 2,999 | 0.656654 |
a13a8e1926a299b7f92c1bbcac1ec9e36950bfa6 | 489 | asm | Assembly | src/record_rng_func.asm | mvdhout1992/ts-patches | a426970abeb6993eea6703d1a756fd74489ffed2 | [
"MIT"
] | 33 | 2016-07-30T14:17:28.000Z | 2021-12-19T15:45:19.000Z | src/record_rng_func.asm | A-Productions/ts-patches | 326db731f7226d9e803feab475777c730688634e | [
"MIT"
] | 73 | 2018-08-17T00:25:19.000Z | 2021-05-10T08:31:15.000Z | src/record_rng_func.asm | A-Productions/ts-patches | 326db731f7226d9e803feab475777c730688634e | [
"MIT"
] | 18 | 2017-05-16T11:28:06.000Z | 2022-03-20T20:41:03.000Z | %include "TiberianSun.inc"
%include "macros/patch.inc"
%include "macros/datatypes.inc"
cextern record_rng_ii ; Defined in log_more_oos.c
cextern record_rng_void
hack 0x005BE080, 0x005BE086
push ecx
call record_rng_ii
pop ecx
.Reg:
mov eax, [esp+4]
mov edx, ecx
jmp hackend
hack 0x005BE030
push ecx
call record_rng_void
pop ecx
.Reg:
mov eax, [ecx+0]
mov edx, [ecx+4]
jmp hackend
| 19.56 | 59 | 0.605317 |
d219adb25aeb730eba441e04f563808c2380598a | 4,109 | asm | Assembly | C/BiosLib/disabkbd.asm | p-k-p/SysToolsLib | 827be2799e541410cb5c11358cd4ce6859e171ad | [
"Apache-2.0"
] | 232 | 2016-04-27T21:56:11.000Z | 2022-03-29T09:02:15.000Z | C/BiosLib/disabkbd.asm | p-k-p/SysToolsLib | 827be2799e541410cb5c11358cd4ce6859e171ad | [
"Apache-2.0"
] | 31 | 2016-05-09T09:05:36.000Z | 2022-03-29T19:17:45.000Z | C/BiosLib/disabkbd.asm | p-k-p/SysToolsLib | 827be2799e541410cb5c11358cd4ce6859e171ad | [
"Apache-2.0"
] | 94 | 2016-06-01T18:10:39.000Z | 2022-03-26T10:44:57.000Z | PAGE ,132
TITLE System utilities, not relying on MS-DOS.
;*****************************************************************************;
; ;
; FILE NAME: DISABKBD.ASM ;
; ;
; DESCRIPTION: Keyboard enable/disable routines, for test purpose. ;
; ;
; NOTES: Uses only BIOS calls to work before DOS is available. ;
; ;
; HISTORY: ;
; 1993/10/07 JFL Separated from alibc.c. ;
; 1994/05/11 JFL Include IO8042.INC. ;
; ;
; (c) Copyright 1991-2017 Hewlett Packard Enterprise Development LP ;
; Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 ;
;*****************************************************************************;
.286
;-----------------------------------------------------------------------------;
; ;
; Globally defined constants ;
; ;
;-----------------------------------------------------------------------------;
include adefine.inc ; All assembly language definitions
include io8042.inc ; All 8042-specific definitions
;-----------------------------------------------------------------------------;
; ;
; Public routines ;
; ;
;-----------------------------------------------------------------------------;
.code
EXTERNCFASTPROC read_8042
EXTERNCFASTPROC write_8042
;=============================================================================;
;
; ENTRY POINT NAME: disable_kbd_n_mouse
;
; DESCRIPTION: Disable the keyboard and mouse
;
; INPUT PARAMETERS
; None
;
; OUTPUT PARAMETERS
; Carry flag set, and AX = -1 Error. Keyboard & mouse not disabled.
; Carry flag clear, and AX >= 0 OK. AX = Old 8042 command byte.
;
; REGISTERS DESTROYED:
; AX
;
; REGISTERS PRESERVED:
; All others
;
; DEPENDENCIES
;
; ALGORITHM USED
;
; NOTES
;
; MODIFICATION HISTORY NOTES
; JFL 11/29/91 Initial implementation.
;
;=============================================================================;
CFASTPROC disable_kbd_n_mouse
push dx
; Read the current 8042 command byte and save it on the stack
pushf
cli ; Prevent IRQ1 before read_8042
mov al, READ_CMD_BYTE ; Tell 8042 to get current 8042
mov dx, IO_8042_CMD
call write_8042
jc dknm_error
call read_8042 ; Get 8042 command byte
jc dknm_error ; if failure: exit.
popf ; Restore interrupts
push ax ; Save the command byte
; Disable the keyboard and the mouse
mov al, AUX_DISABLE_DEVICE ; Disable auxillary device
call write_8042
; Assume no error
mov al, I8042_DISABLE_KBD_INTRF ; Disable keyboard
call write_8042
; Assume no error
pop ax ; Restore the command byte in AL
xor ah, ah ; Clear AH and carry
jmp short dknm_exit
dknm_error:
popf
stc
sbb ax, ax ; AX=-1 and set carry
dknm_exit:
pop dx
ret
ENDCFASTPROC disable_kbd_n_mouse
;=============================================================================;
;
; ENTRY POINT NAME: restore_kbd_n_mouse
;
; DESCRIPTION: Restore the 8042 command byte
;
; INPUT PARAMETERS
; AX = 8042 command byte
;
; OUTPUT PARAMETERS
; Carry flag set, and AX = -1 Error.
; Carry flag clear, and AX == 0 Done.
;
; REGISTERS DESTROYED:
; AX
;
; REGISTERS PRESERVED:
; All others
;
; DEPENDENCIES
;
; ALGORITHM USED
;
; NOTES
;
; MODIFICATION HISTORY NOTES
; JFL 11/29/91 Initial implementation.
;
;=============================================================================;
CFASTPROC restore_kbd_n_mouse
push dx
; Restore the 8042 initial command byte
push ax ; Save the 8042 command byte
mov al, I8042_WRITE_CMD ; Tell 8042 to expect command byte data
mov dx, IO_8042_CMD
call write_8042
pop ax ; Restore the 8042 command byte
jc rknm_error
mov dx, IO_8042_DATA ; and send it to the 8042.
call write_8042
jc rknm_error
xor ax, ax ; Report success, clear carry
jmp short rknm_exit
rknm_error:
sbb ax, ax ; AX=-1 and set carry
rknm_exit:
pop dx
ret
ENDCFASTPROC restore_kbd_n_mouse
END
| 23.214689 | 79 | 0.530786 |
d81f4e75726410862ef2141d13298d0703400b00 | 2,501 | asm | Assembly | symbolinen_konekieli/Ratol_msdos/teht23.asm | tkukka/VariousContent | f7e7ae98ff8521c6c709dabe30855104afe3fe04 | [
"MIT"
] | null | null | null | symbolinen_konekieli/Ratol_msdos/teht23.asm | tkukka/VariousContent | f7e7ae98ff8521c6c709dabe30855104afe3fe04 | [
"MIT"
] | null | null | null | symbolinen_konekieli/Ratol_msdos/teht23.asm | tkukka/VariousContent | f7e7ae98ff8521c6c709dabe30855104afe3fe04 | [
"MIT"
] | null | null | null | ;RaTol Symbolinen konekieli: Harjoitus 2, tehtävä 3
;Tero Kukka IY96A
;Tiedosto: teht23.asm
;Luotu 25.2.1998
;a-kohta
;Ohjelma kutsuu aliohjelmaa _Summaa1, joka
;palauttaa kahden luvun summan muistipaikkaan DS:summa.
;Yhteenlaskettavat luvut ovat rekistereissä BL ja DH.
;b-kohta
;Ohjelma kutsuu toista aliohjelmaa _Summaa2, joka saa
;yhteenlaskettavat luvut osoitteista luku1 ja luku2.
;luku1 ja luku2 ovat 16-bittisiä. Ylivuoto huomioidaan.
;Lukujen summa tallennetaan DS:summa:aan.
;c-kohta
;Summattavat luvut ovat rekistereissä BX ja DX, jotka tallen-
;netaan pinoon ennen aliohjelman _Summaa3 kutsua.
;Summa (ilman ylivuototestausta) DS:summa:aan.
;Globaalit muuttujat:
public luku1, luku2
;Aliohjelmien esittely:
extrn _Summaa1: proc
extrn _Summaa2: proc
extrn _Summaa3: proc
;Makrot
exit MACRO ;lopetusmakro 'exit'
mov ax, 4c00h
int 21h
ENDM
.model small ;muistimalli
.stack 100h ;pinon koko
.data ;muuttujalohko
summa dw 0 ;unsigned int summa;
luku1 dw ? ;unsigned int luku1; globaali
luku2 dw ? ;unsigned int luku2; globaali
.code ;ohjelmakoodi alkaa
_main proc ;pääohjelma alkaa
mov ax, @data
mov ds, ax ;ds-rekisterin alustus
;********** a-kohta ************************************
mov bl, 5 ;pienet luvut, joiden summa <= 255
mov dh, 2
call _Summaa1 ;AX = _Summaa1();
mov summa, ax
;*********** b-kohta ************************************
mov luku1, 0ffffh
mov luku2, 0001h ;ylivuoto odotettavissa
xor dx, dx ;DX = 0, DX != 0 ilmaisee ylivuodon
call _Summaa2 ;AX = _Summaa2();
cmp dx, 0000h ;Ylivuodon tutkiminen
jz TULOS_OK ;Hyppy, jos zero-flag = 0
nop ;Ylivuodon käsittely alkaa..
jmp KOHTA_C
TULOS_OK:
mov summa, ax
;*********** c-kohta *************************************
KOHTA_C:
mov bx, 3
mov dx, 6
push bx ;parametrit pinoon
push dx
call _Summaa3 ;AX = _Summaa3();
mov summa, ax ;ylivuotoa ei tutkita
exit ;lopetusrutiini
_main endp
end _main ;ohjelman loppu
| 26.892473 | 69 | 0.539384 |
b44d1824f83c0c0980b33544ade9a3a015624174 | 102,991 | asm | Assembly | Palmtree.Math.Core.Implements/vs_build/x64_Debug/pmc_tostring.asm | rougemeilland/Palmtree.Math.Core.Implements | 52f4f6c765d16c9b0baf1fd212c61a33daae138c | [
"MIT"
] | null | null | null | Palmtree.Math.Core.Implements/vs_build/x64_Debug/pmc_tostring.asm | rougemeilland/Palmtree.Math.Core.Implements | 52f4f6c765d16c9b0baf1fd212c61a33daae138c | [
"MIT"
] | null | null | null | Palmtree.Math.Core.Implements/vs_build/x64_Debug/pmc_tostring.asm | rougemeilland/Palmtree.Math.Core.Implements | 52f4f6c765d16c9b0baf1fd212c61a33daae138c | [
"MIT"
] | null | null | null | ; Listing generated by Microsoft (R) Optimizing Compiler Version 19.16.27026.1
include listing.inc
INCLUDELIB MSVCRTD
INCLUDELIB OLDNAMES
msvcjmc SEGMENT
__7B7A869E_ctype@h DB 01H
__457DD326_basetsd@h DB 01H
__4384A2D9_corecrt_memcpy_s@h DB 01H
__4E51A221_corecrt_wstring@h DB 01H
__2140C079_string@h DB 01H
__1887E595_winnt@h DB 01H
__9FC7C64B_processthreadsapi@h DB 01H
__FA470AEC_memoryapi@h DB 01H
__F37DAFF1_winerror@h DB 01H
__7A450CCC_winbase@h DB 01H
__B4B40122_winioctl@h DB 01H
__86261D59_stralign@h DB 01H
__7B8DBFC3_pmc_uint_internal@h DB 01H
__6B0481B0_pmc_inline_func@h DB 01H
__3AA1CF5E_pmc_tostring@c DB 01H
msvcjmc ENDS
PUBLIC Initialize_ToString
PUBLIC PMC_ToString
PUBLIC __JustMyCode_Default
PUBLIC ??_C@_13DEFPDAGF@?$AA?0@ ; `string'
PUBLIC ??_C@_13JOFGPIOO@?$AA?4@ ; `string'
PUBLIC ??_C@_01EKENIIDA@3@ ; `string'
PUBLIC ??_C@_13KJIIAINM@?$AA?$CL@ ; `string'
PUBLIC ??_C@_13IMODFHAA@?$AA?9@ ; `string'
EXTRN __imp_lstrcpyA:PROC
EXTRN __imp_lstrcpyW:PROC
EXTRN __imp_lstrlenW:PROC
EXTRN AllocateBlock:PROC
EXTRN DeallocateBlock:PROC
EXTRN CheckBlockLight:PROC
EXTRN CheckNumber:PROC
EXTRN DivRem_X_1W:PROC
EXTRN _RTC_CheckStackVars:PROC
EXTRN _RTC_InitBase:PROC
EXTRN _RTC_Shutdown:PROC
EXTRN __CheckForDebuggerJustMyCode:PROC
EXTRN __GSHandlerCheck:PROC
EXTRN __security_check_cookie:PROC
EXTRN statistics_info:BYTE
EXTRN __ImageBase:BYTE
EXTRN __security_cookie:QWORD
_BSS SEGMENT
default_number_format_option DB 028H DUP (?)
_BSS ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$Initialize_ToString DD imagerel $LN3
DD imagerel $LN3+176
DD imagerel $unwind$Initialize_ToString
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$PMC_ToString DD imagerel $LN24
DD imagerel $LN24+681
DD imagerel $unwind$PMC_ToString
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$IncrementDIV32Counter DD imagerel IncrementDIV32Counter
DD imagerel IncrementDIV32Counter+62
DD imagerel $unwind$IncrementDIV32Counter
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$IncrementDIV64Counter DD imagerel IncrementDIV64Counter
DD imagerel IncrementDIV64Counter+62
DD imagerel $unwind$IncrementDIV64Counter
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$AddToDIV32Counter DD imagerel AddToDIV32Counter
DD imagerel AddToDIV32Counter+78
DD imagerel $unwind$AddToDIV32Counter
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$AddToDIV64Counter DD imagerel AddToDIV64Counter
DD imagerel AddToDIV64Counter+78
DD imagerel $unwind$AddToDIV64Counter
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$_COPY_MEMORY_UNIT_DIV DD imagerel _COPY_MEMORY_UNIT_DIV
DD imagerel _COPY_MEMORY_UNIT_DIV+100
DD imagerel $unwind$_COPY_MEMORY_UNIT_DIV
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$_ZERO_MEMORY_UNIT_DIV DD imagerel _ZERO_MEMORY_UNIT_DIV
DD imagerel _ZERO_MEMORY_UNIT_DIV+100
DD imagerel $unwind$_ZERO_MEMORY_UNIT_DIV
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$_FILL_MEMORY_16 DD imagerel _FILL_MEMORY_16
DD imagerel _FILL_MEMORY_16+98
DD imagerel $unwind$_FILL_MEMORY_16
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$_FROMWORDTODWORD DD imagerel _FROMWORDTODWORD
DD imagerel _FROMWORDTODWORD+85
DD imagerel $unwind$_FROMWORDTODWORD
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$_DIVIDE_CEILING_UNIT DD imagerel _DIVIDE_CEILING_UNIT
DD imagerel _DIVIDE_CEILING_UNIT+97
DD imagerel $unwind$_DIVIDE_CEILING_UNIT
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$_DIVREM_UNIT DD imagerel _DIVREM_UNIT
DD imagerel _DIVREM_UNIT+218
DD imagerel $unwind$_DIVREM_UNIT
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$_ROTATE_L_UNIT DD imagerel _ROTATE_L_UNIT
DD imagerel _ROTATE_L_UNIT+87
DD imagerel $unwind$_ROTATE_L_UNIT
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$ConvertCardinalNumber DD imagerel ConvertCardinalNumber
DD imagerel ConvertCardinalNumber+643
DD imagerel $unwind$ConvertCardinalNumber
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$InitializeOutputState DD imagerel InitializeOutputState
DD imagerel InitializeOutputState+474
DD imagerel $unwind$InitializeOutputState
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$OutputDecimalSeparator DD imagerel OutputDecimalSeparator
DD imagerel OutputDecimalSeparator+132
DD imagerel $unwind$OutputDecimalSeparator
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$OutputUngroupedOneChar DD imagerel OutputUngroupedOneChar
DD imagerel OutputUngroupedOneChar+125
DD imagerel $unwind$OutputUngroupedOneChar
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$OutputOneChar DD imagerel OutputOneChar
DD imagerel OutputOneChar+489
DD imagerel $unwind$OutputOneChar
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$ToStringDN_LEADING_1WORD DD imagerel ToStringDN_LEADING_1WORD
DD imagerel ToStringDN_LEADING_1WORD+155
DD imagerel $unwind$ToStringDN_LEADING_1WORD
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$ToStringDN_1WORD DD imagerel ToStringDN_1WORD
DD imagerel ToStringDN_1WORD+1031
DD imagerel $unwind$ToStringDN_1WORD
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$PrintDecimal DD imagerel PrintDecimal
DD imagerel PrintDecimal+498
DD imagerel $unwind$PrintDecimal
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$ToStringDN_Finalize DD imagerel ToStringDN_Finalize
DD imagerel ToStringDN_Finalize+191
DD imagerel $unwind$ToStringDN_Finalize
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$ToStringDN DD imagerel ToStringDN
DD imagerel ToStringDN+1094
DD imagerel $unwind$ToStringDN
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$ToStringX_1WORD DD imagerel ToStringX_1WORD
DD imagerel ToStringX_1WORD+2393
DD imagerel $unwind$ToStringX_1WORD
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$ToStringX DD imagerel ToStringX
DD imagerel ToStringX+650
DD imagerel $unwind$ToStringX
pdata ENDS
; COMDAT rtc$TMZ
rtc$TMZ SEGMENT
_RTC_Shutdown.rtc$TMZ DQ FLAT:_RTC_Shutdown
rtc$TMZ ENDS
; COMDAT rtc$IMZ
rtc$IMZ SEGMENT
_RTC_InitBase.rtc$IMZ DQ FLAT:_RTC_InitBase
rtc$IMZ ENDS
; COMDAT ??_C@_13IMODFHAA@?$AA?9@
CONST SEGMENT
??_C@_13IMODFHAA@?$AA?9@ DB '-', 00H, 00H, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_13KJIIAINM@?$AA?$CL@
CONST SEGMENT
??_C@_13KJIIAINM@?$AA?$CL@ DB '+', 00H, 00H, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_01EKENIIDA@3@
CONST SEGMENT
??_C@_01EKENIIDA@3@ DB '3', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_13JOFGPIOO@?$AA?4@
CONST SEGMENT
??_C@_13JOFGPIOO@?$AA?4@ DB '.', 00H, 00H, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_13DEFPDAGF@?$AA?0@
CONST SEGMENT
??_C@_13DEFPDAGF@?$AA?0@ DB ',', 00H, 00H, 00H ; `string'
CONST ENDS
_DATA SEGMENT
decimal_digits DB '0', 00H, '1', 00H, '2', 00H, '3', 00H, '4', 00H, '5', 00H
DB '6', 00H, '7', 00H, '8', 00H, '9', 00H, 00H, 00H
ORG $+2
hexadecimal_lower_digits DB '0', 00H, '1', 00H, '2', 00H, '3', 00H, '4', 00H
DB '5', 00H, '6', 00H, '7', 00H, '8', 00H, '9', 00H, 'a', 00H, 'b'
DB 00H, 'c', 00H, 'd', 00H, 'e', 00H, 'f', 00H, 00H, 00H
ORG $+6
hexadecimal_upper_digits DB '0', 00H, '1', 00H, '2', 00H, '3', 00H, '4', 00H
DB '5', 00H, '6', 00H, '7', 00H, '8', 00H, '9', 00H, 'A', 00H, 'B'
DB 00H, 'C', 00H, 'D', 00H, 'E', 00H, 'F', 00H, 00H, 00H
_DATA ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$ToStringX DD 025053901H
DD 011d2322H
DD 07016003dH
DD 05015H
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$ToStringX_1WORD DD 025053801H
DD 011c2321H
DD 070150021H
DD 05014H
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$ToStringDN DD 045053901H
DD 011d4322H
DD 070160051H
DD 05015H
xdata ENDS
; COMDAT CONST
CONST SEGMENT
ToStringDN$rtcName$0 DB 072H
DB 05fH
DB 062H
DB 075H
DB 066H
DB 05fH
DB 063H
DB 06fH
DB 064H
DB 065H
DB 00H
ORG $+5
ToStringDN$rtcName$1 DB 072H
DB 05fH
DB 062H
DB 075H
DB 066H
DB 05fH
DB 077H
DB 06fH
DB 072H
DB 064H
DB 073H
DB 00H
ORG $+4
ToStringDN$rtcName$2 DB 072H
DB 05fH
DB 062H
DB 075H
DB 066H
DB 05fH
DB 063H
DB 06fH
DB 075H
DB 06eH
DB 074H
DB 00H
ORG $+4
ToStringDN$rtcName$3 DB 072H
DB 065H
DB 076H
DB 05fH
DB 073H
DB 074H
DB 072H
DB 05fH
DB 062H
DB 075H
DB 066H
DB 05fH
DB 063H
DB 06fH
DB 064H
DB 065H
DB 00H
ORG $+7
ToStringDN$rtcName$4 DB 072H
DB 065H
DB 076H
DB 05fH
DB 073H
DB 074H
DB 072H
DB 05fH
DB 062H
DB 075H
DB 066H
DB 05fH
DB 077H
DB 06fH
DB 072H
DB 064H
DB 073H
DB 00H
ORG $+6
ToStringDN$rtcName$5 DB 072H
DB 065H
DB 076H
DB 05fH
DB 073H
DB 074H
DB 072H
DB 05fH
DB 062H
DB 075H
DB 066H
DB 05fH
DB 063H
DB 06fH
DB 075H
DB 06eH
DB 074H
DB 00H
ORG $+6
ToStringDN$rtcFrameData DD 06H
DD 00H
DQ FLAT:ToStringDN$rtcVarDesc
ORG $+8
ToStringDN$rtcVarDesc DD 01a8H
DD 08H
DQ FLAT:ToStringDN$rtcName$5
DD 0168H
DD 08H
DQ FLAT:ToStringDN$rtcName$4
DD 0148H
DD 08H
DQ FLAT:ToStringDN$rtcName$3
DD 0128H
DD 08H
DQ FLAT:ToStringDN$rtcName$2
DD 0e8H
DD 08H
DQ FLAT:ToStringDN$rtcName$1
DD 0c8H
DD 08H
DQ FLAT:ToStringDN$rtcName$0
CONST ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$ToStringDN_Finalize DD 025053901H
DD 011d2322H
DD 070160029H
DD 05015H
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$PrintDecimal DD 025054a19H
DD 011d2322H
DD 070160037H
DD 05015H
DD imagerel __GSHandlerCheck
DD 01a8H
xdata ENDS
; COMDAT CONST
CONST SEGMENT
PrintDecimal$rtcName$0 DB 073H
DB 074H
DB 061H
DB 074H
DB 065H
DB 00H
ORG $+10
PrintDecimal$rtcVarDesc DD 028H
DD 038H
DQ FLAT:PrintDecimal$rtcName$0
ORG $+48
PrintDecimal$rtcFrameData DD 01H
DD 00H
DQ FLAT:PrintDecimal$rtcVarDesc
CONST ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$ToStringDN_1WORD DD 025052e01H
DD 01122317H
DD 0700b0021H
DD 0500aH
xdata ENDS
; COMDAT CONST
CONST SEGMENT
ToStringDN_1WORD$rtcName$0 DB 072H
DB 00H
ORG $+14
ToStringDN_1WORD$rtcVarDesc DD 024H
DD 04H
DQ FLAT:ToStringDN_1WORD$rtcName$0
ORG $+48
ToStringDN_1WORD$rtcFrameData DD 01H
DD 00H
DQ FLAT:ToStringDN_1WORD$rtcVarDesc
CONST ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$ToStringDN_LEADING_1WORD DD 025052e01H
DD 01122317H
DD 0700b0021H
DD 0500aH
xdata ENDS
; COMDAT CONST
CONST SEGMENT
ToStringDN_LEADING_1WORD$rtcName$0 DB 072H
DB 00H
ORG $+14
ToStringDN_LEADING_1WORD$rtcVarDesc DD 024H
DD 04H
DQ FLAT:ToStringDN_LEADING_1WORD$rtcName$0
ORG $+48
ToStringDN_LEADING_1WORD$rtcFrameData DD 01H
DD 00H
DQ FLAT:ToStringDN_LEADING_1WORD$rtcVarDesc
CONST ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$OutputOneChar DD 025052e01H
DD 01122317H
DD 0700b001dH
DD 0500aH
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$OutputUngroupedOneChar DD 025052e01H
DD 01122317H
DD 0700b001dH
DD 0500aH
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$OutputDecimalSeparator DD 025052a01H
DD 010e2313H
DD 07007001dH
DD 05006H
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$InitializeOutputState DD 025053901H
DD 011d2322H
DD 070160025H
DD 05015H
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$ConvertCardinalNumber DD 035053901H
DD 011d3322H
DD 070160053H
DD 05015H
xdata ENDS
; COMDAT CONST
CONST SEGMENT
ConvertCardinalNumber$rtcName$0 DB 077H
DB 06fH
DB 072H
DB 06bH
DB 05fH
DB 062H
DB 075H
DB 066H
DB 05fH
DB 031H
DB 05fH
DB 063H
DB 06fH
DB 064H
DB 065H
DB 00H
ConvertCardinalNumber$rtcName$1 DB 077H
DB 06fH
DB 072H
DB 06bH
DB 05fH
DB 062H
DB 075H
DB 066H
DB 05fH
DB 031H
DB 05fH
DB 077H
DB 06fH
DB 072H
DB 064H
DB 073H
DB 00H
ORG $+7
ConvertCardinalNumber$rtcName$2 DB 077H
DB 06fH
DB 072H
DB 06bH
DB 05fH
DB 062H
DB 075H
DB 066H
DB 05fH
DB 032H
DB 05fH
DB 063H
DB 06fH
DB 064H
DB 065H
DB 00H
ConvertCardinalNumber$rtcName$3 DB 077H
DB 06fH
DB 072H
DB 06bH
DB 05fH
DB 062H
DB 075H
DB 066H
DB 05fH
DB 032H
DB 05fH
DB 077H
DB 06fH
DB 072H
DB 064H
DB 073H
DB 00H
ORG $+7
ConvertCardinalNumber$rtcName$4 DB 072H
DB 05fH
DB 076H
DB 061H
DB 06cH
DB 075H
DB 065H
DB 00H
ORG $+8
ConvertCardinalNumber$rtcVarDesc DD 0194H
DD 04H
DQ FLAT:ConvertCardinalNumber$rtcName$4
DD 0d8H
DD 08H
DQ FLAT:ConvertCardinalNumber$rtcName$3
DD 0b8H
DD 08H
DQ FLAT:ConvertCardinalNumber$rtcName$2
DD 078H
DD 08H
DQ FLAT:ConvertCardinalNumber$rtcName$1
DD 058H
DD 08H
DQ FLAT:ConvertCardinalNumber$rtcName$0
ORG $+240
ConvertCardinalNumber$rtcFrameData DD 05H
DD 00H
DQ FLAT:ConvertCardinalNumber$rtcVarDesc
CONST ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$_ROTATE_L_UNIT DD 025052e01H
DD 01122317H
DD 0700b001dH
DD 0500aH
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$_DIVREM_UNIT DD 025053601H
DD 011b2320H
DD 070140021H
DD 05013H
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$_DIVIDE_CEILING_UNIT DD 025052f01H
DD 01132318H
DD 0700c001dH
DD 0500bH
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$_FROMWORDTODWORD DD 025052c01H
DD 01112316H
DD 0700a001dH
DD 05009H
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$_FILL_MEMORY_16 DD 025053401H
DD 0118231dH
DD 07011001dH
DD 05010H
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$_ZERO_MEMORY_UNIT_DIV DD 025052f01H
DD 01132318H
DD 0700c001fH
DD 0500bH
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$_COPY_MEMORY_UNIT_DIV DD 025063501H
DD 0119231eH
DD 07012001cH
DD 050106011H
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$AddToDIV64Counter DD 025052801H
DD 010d2312H
DD 07006001dH
DD 05005H
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$AddToDIV32Counter DD 025052801H
DD 010d2312H
DD 07006001dH
DD 05005H
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$IncrementDIV64Counter DD 025051e01H
DD 010a230fH
DD 07003001dH
DD 05002H
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$IncrementDIV32Counter DD 025051e01H
DD 010a230fH
DD 07003001dH
DD 05002H
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$PMC_ToString DD 035053901H
DD 011d3322H
DD 070160027H
DD 05015H
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$Initialize_ToString DD 025052a01H
DD 010e2313H
DD 07007001dH
DD 05006H
xdata ENDS
; Function compile flags: /Odt
; COMDAT __JustMyCode_Default
_TEXT SEGMENT
__JustMyCode_Default PROC ; COMDAT
ret 0
__JustMyCode_Default ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_tostring.c
; COMDAT ToStringX
_TEXT SEGMENT
output_len$1 = 8
filling_digit_len$2 = 40
total_length$3 = 72
filling_digit_count$4 = 104
s_ptr$5 = 136
d_ptr$6 = 168
digit_table$7 = 200
w_count$8 = 232
tv134 = 440
x$ = 480
buffer$ = 488
buffer_size$ = 496
width$ = 504
format_option$ = 512
using_upper_letter$ = 520
ToStringX PROC ; COMDAT
; 480 : {
mov DWORD PTR [rsp+32], r9d
mov QWORD PTR [rsp+24], r8
mov QWORD PTR [rsp+16], rdx
mov QWORD PTR [rsp+8], rcx
push rbp
push rdi
sub rsp, 488 ; 000001e8H
lea rbp, QWORD PTR [rsp+32]
mov rdi, rsp
mov ecx, 122 ; 0000007aH
mov eax, -858993460 ; ccccccccH
rep stosd
mov rcx, QWORD PTR [rsp+520]
lea rcx, OFFSET FLAT:__3AA1CF5E_pmc_tostring@c
call __CheckForDebuggerJustMyCode
; 481 : if (x->IS_ZERO)
mov rax, QWORD PTR x$[rbp]
mov eax, DWORD PTR [rax+40]
shr eax, 1
and eax, 1
test eax, eax
je SHORT $LN4@ToStringX
; 482 : {
; 483 : // x が 0 である場合
; 484 : // 最低で 1 桁、最高で format_option->MinimumWidth 桁だけ '0' を出力する。
; 485 :
; 486 : if (width < 1)
cmp DWORD PTR width$[rbp], 1
jae SHORT $LN6@ToStringX
; 487 : width = 1;
mov DWORD PTR width$[rbp], 1
$LN6@ToStringX:
; 488 : if (buffer_size < width + 1)
mov eax, DWORD PTR width$[rbp]
inc eax
mov eax, eax
cmp QWORD PTR buffer_size$[rbp], rax
jae SHORT $LN7@ToStringX
; 489 : return (PMC_STATUS_INSUFFICIENT_BUFFER);
mov eax, -4
jmp $LN1@ToStringX
$LN7@ToStringX:
; 490 : _FILL_MEMORY_16(buffer, L'0', width);
mov eax, DWORD PTR width$[rbp]
mov r8d, eax
mov dx, 48 ; 00000030H
mov rcx, QWORD PTR buffer$[rbp]
call _FILL_MEMORY_16
; 491 : buffer[width] = L'\0';
mov eax, DWORD PTR width$[rbp]
xor ecx, ecx
mov rdx, QWORD PTR buffer$[rbp]
mov WORD PTR [rdx+rax*2], cx
; 492 : }
jmp $LN5@ToStringX
$LN4@ToStringX:
; 493 : else
; 494 : {
; 495 : // x が 0 ではない場合
; 496 : __UNIT_TYPE output_len = _DIVIDE_CEILING_UNIT(x->UNIT_BIT_COUNT, 4);
mov edx, 4
mov rax, QWORD PTR x$[rbp]
mov rcx, QWORD PTR [rax+16]
call _DIVIDE_CEILING_UNIT
mov QWORD PTR output_len$1[rbp], rax
; 497 : __UNIT_TYPE filling_digit_len;;
; 498 : __UNIT_TYPE total_length;
; 499 : if (output_len < width)
mov eax, DWORD PTR width$[rbp]
cmp QWORD PTR output_len$1[rbp], rax
jae SHORT $LN8@ToStringX
; 500 : {
; 501 : filling_digit_len = width - output_len;
mov eax, DWORD PTR width$[rbp]
sub rax, QWORD PTR output_len$1[rbp]
mov QWORD PTR filling_digit_len$2[rbp], rax
; 502 : total_length = width;
mov eax, DWORD PTR width$[rbp]
mov QWORD PTR total_length$3[rbp], rax
; 503 : }
jmp SHORT $LN9@ToStringX
$LN8@ToStringX:
; 504 : else
; 505 : {
; 506 : filling_digit_len = 0;
mov QWORD PTR filling_digit_len$2[rbp], 0
; 507 : total_length = output_len;
mov rax, QWORD PTR output_len$1[rbp]
mov QWORD PTR total_length$3[rbp], rax
$LN9@ToStringX:
; 508 : }
; 509 : if (buffer_size < total_length + 1)
mov rax, QWORD PTR total_length$3[rbp]
inc rax
cmp QWORD PTR buffer_size$[rbp], rax
jae SHORT $LN10@ToStringX
; 510 : return (PMC_STATUS_INSUFFICIENT_BUFFER);
mov eax, -4
jmp $LN1@ToStringX
$LN10@ToStringX:
; 511 : __UNIT_TYPE filling_digit_count = filling_digit_len;
mov rax, QWORD PTR filling_digit_len$2[rbp]
mov QWORD PTR filling_digit_count$4[rbp], rax
; 512 : if (filling_digit_len > 0)
cmp QWORD PTR filling_digit_len$2[rbp], 0
jbe SHORT $LN11@ToStringX
; 513 : _FILL_MEMORY_16(buffer, L'0', filling_digit_len);
mov r8, QWORD PTR filling_digit_len$2[rbp]
mov dx, 48 ; 00000030H
mov rcx, QWORD PTR buffer$[rbp]
call _FILL_MEMORY_16
$LN11@ToStringX:
; 514 : __UNIT_TYPE* s_ptr = x->BLOCK + x->UNIT_WORD_COUNT - 1;
mov rax, QWORD PTR x$[rbp]
mov rax, QWORD PTR [rax+8]
mov rcx, QWORD PTR x$[rbp]
mov rcx, QWORD PTR [rcx+56]
lea rax, QWORD PTR [rcx+rax*8-8]
mov QWORD PTR s_ptr$5[rbp], rax
; 515 : wchar_t* d_ptr = buffer + filling_digit_len;
mov rax, QWORD PTR buffer$[rbp]
mov rcx, QWORD PTR filling_digit_len$2[rbp]
lea rax, QWORD PTR [rax+rcx*2]
mov QWORD PTR d_ptr$6[rbp], rax
; 516 : wchar_t* digit_table = using_upper_letter ? hexadecimal_upper_digits : hexadecimal_lower_digits;
cmp DWORD PTR using_upper_letter$[rbp], 0
je SHORT $LN13@ToStringX
lea rax, OFFSET FLAT:hexadecimal_upper_digits
mov QWORD PTR tv134[rbp], rax
jmp SHORT $LN14@ToStringX
$LN13@ToStringX:
lea rax, OFFSET FLAT:hexadecimal_lower_digits
mov QWORD PTR tv134[rbp], rax
$LN14@ToStringX:
mov rax, QWORD PTR tv134[rbp]
mov QWORD PTR digit_table$7[rbp], rax
; 517 : __UNIT_TYPE w_count = x->UNIT_WORD_COUNT;
mov rax, QWORD PTR x$[rbp]
mov rax, QWORD PTR [rax+8]
mov QWORD PTR w_count$8[rbp], rax
; 518 : d_ptr = ToStringX_1WORD(*s_ptr, (int)(x->UNIT_WORD_COUNT * (__UNIT_TYPE_BIT_COUNT / 4) - output_len), digit_table, d_ptr);
mov rax, QWORD PTR x$[rbp]
imul rax, QWORD PTR [rax+8], 16
sub rax, QWORD PTR output_len$1[rbp]
mov r9, QWORD PTR d_ptr$6[rbp]
mov r8, QWORD PTR digit_table$7[rbp]
mov edx, eax
mov rax, QWORD PTR s_ptr$5[rbp]
mov rcx, QWORD PTR [rax]
call ToStringX_1WORD
mov QWORD PTR d_ptr$6[rbp], rax
; 519 : --s_ptr;
mov rax, QWORD PTR s_ptr$5[rbp]
sub rax, 8
mov QWORD PTR s_ptr$5[rbp], rax
; 520 : --w_count;
mov rax, QWORD PTR w_count$8[rbp]
dec rax
mov QWORD PTR w_count$8[rbp], rax
$LN2@ToStringX:
; 521 : while (w_count > 0)
cmp QWORD PTR w_count$8[rbp], 0
jbe SHORT $LN3@ToStringX
; 522 : {
; 523 : d_ptr = ToStringX_1WORD(*s_ptr, 0, digit_table, d_ptr);
mov r9, QWORD PTR d_ptr$6[rbp]
mov r8, QWORD PTR digit_table$7[rbp]
xor edx, edx
mov rax, QWORD PTR s_ptr$5[rbp]
mov rcx, QWORD PTR [rax]
call ToStringX_1WORD
mov QWORD PTR d_ptr$6[rbp], rax
; 524 : --s_ptr;
mov rax, QWORD PTR s_ptr$5[rbp]
sub rax, 8
mov QWORD PTR s_ptr$5[rbp], rax
; 525 : --w_count;
mov rax, QWORD PTR w_count$8[rbp]
dec rax
mov QWORD PTR w_count$8[rbp], rax
; 526 : }
jmp SHORT $LN2@ToStringX
$LN3@ToStringX:
; 527 : *d_ptr = '\0';
xor eax, eax
mov rcx, QWORD PTR d_ptr$6[rbp]
mov WORD PTR [rcx], ax
$LN5@ToStringX:
; 528 : }
; 529 : return (PMC_STATUS_OK);
xor eax, eax
$LN1@ToStringX:
; 530 : }
lea rsp, QWORD PTR [rbp+456]
pop rdi
pop rbp
ret 0
ToStringX ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_tostring.c
; COMDAT ToStringX_1WORD
_TEXT SEGMENT
count$ = 4
x$ = 256
skip_digit_len$ = 264
digit_table$ = 272
ptr$ = 280
ToStringX_1WORD PROC ; COMDAT
; 412 : {
mov QWORD PTR [rsp+32], r9
mov QWORD PTR [rsp+24], r8
mov DWORD PTR [rsp+16], edx
mov QWORD PTR [rsp+8], rcx
push rbp
push rdi
sub rsp, 264 ; 00000108H
lea rbp, QWORD PTR [rsp+32]
mov rdi, rsp
mov ecx, 66 ; 00000042H
mov eax, -858993460 ; ccccccccH
rep stosd
mov rcx, QWORD PTR [rsp+296]
lea rcx, OFFSET FLAT:__3AA1CF5E_pmc_tostring@c
call __CheckForDebuggerJustMyCode
; 413 : if (sizeof(__UNIT_TYPE) > sizeof(_UINT64_T))
xor eax, eax
test eax, eax
je SHORT $LN2@ToStringX_
; 414 : {
; 415 : // 64bit を超える __UNIT_TYPE には未対応
; 416 : // 対応するには以降のコーディングを見直す必要がある
; 417 : return (NULL);
xor eax, eax
jmp $LN1@ToStringX_
$LN2@ToStringX_:
; 418 : }
; 419 : int count = __UNIT_TYPE_BIT_COUNT / 4;
mov DWORD PTR count$[rbp], 16
; 420 : if (skip_digit_len > 0)
cmp DWORD PTR skip_digit_len$[rbp], 0
jle SHORT $LN3@ToStringX_
; 421 : {
; 422 : x = _ROTATE_L_UNIT(x, 4 * skip_digit_len);
mov eax, DWORD PTR skip_digit_len$[rbp]
shl eax, 2
mov edx, eax
mov rcx, QWORD PTR x$[rbp]
call _ROTATE_L_UNIT
mov QWORD PTR x$[rbp], rax
; 423 : count -= skip_digit_len;
mov eax, DWORD PTR skip_digit_len$[rbp]
mov ecx, DWORD PTR count$[rbp]
sub ecx, eax
mov eax, ecx
mov DWORD PTR count$[rbp], eax
$LN3@ToStringX_:
; 424 : }
; 425 : if (count & 0x10)
mov eax, DWORD PTR count$[rbp]
and eax, 16
test eax, eax
je $LN4@ToStringX_
; 426 : {
; 427 : x = _ROTATE_L_UNIT(x, 4); ptr[0] = digit_table[x & 0x0f];
mov edx, 4
mov rcx, QWORD PTR x$[rbp]
call _ROTATE_L_UNIT
mov QWORD PTR x$[rbp], rax
mov rax, QWORD PTR x$[rbp]
and rax, 15
mov ecx, 2
imul rcx, rcx, 0
mov rdx, QWORD PTR ptr$[rbp]
mov r8, QWORD PTR digit_table$[rbp]
movzx eax, WORD PTR [r8+rax*2]
mov WORD PTR [rdx+rcx], ax
; 428 : x = _ROTATE_L_UNIT(x, 4); ptr[1] = digit_table[x & 0x0f];
mov edx, 4
mov rcx, QWORD PTR x$[rbp]
call _ROTATE_L_UNIT
mov QWORD PTR x$[rbp], rax
mov rax, QWORD PTR x$[rbp]
and rax, 15
mov ecx, 2
imul rcx, rcx, 1
mov rdx, QWORD PTR ptr$[rbp]
mov r8, QWORD PTR digit_table$[rbp]
movzx eax, WORD PTR [r8+rax*2]
mov WORD PTR [rdx+rcx], ax
; 429 : x = _ROTATE_L_UNIT(x, 4); ptr[2] = digit_table[x & 0x0f];
mov edx, 4
mov rcx, QWORD PTR x$[rbp]
call _ROTATE_L_UNIT
mov QWORD PTR x$[rbp], rax
mov rax, QWORD PTR x$[rbp]
and rax, 15
mov ecx, 2
imul rcx, rcx, 2
mov rdx, QWORD PTR ptr$[rbp]
mov r8, QWORD PTR digit_table$[rbp]
movzx eax, WORD PTR [r8+rax*2]
mov WORD PTR [rdx+rcx], ax
; 430 : x = _ROTATE_L_UNIT(x, 4); ptr[3] = digit_table[x & 0x0f];
mov edx, 4
mov rcx, QWORD PTR x$[rbp]
call _ROTATE_L_UNIT
mov QWORD PTR x$[rbp], rax
mov rax, QWORD PTR x$[rbp]
and rax, 15
mov ecx, 2
imul rcx, rcx, 3
mov rdx, QWORD PTR ptr$[rbp]
mov r8, QWORD PTR digit_table$[rbp]
movzx eax, WORD PTR [r8+rax*2]
mov WORD PTR [rdx+rcx], ax
; 431 : x = _ROTATE_L_UNIT(x, 4); ptr[4] = digit_table[x & 0x0f];
mov edx, 4
mov rcx, QWORD PTR x$[rbp]
call _ROTATE_L_UNIT
mov QWORD PTR x$[rbp], rax
mov rax, QWORD PTR x$[rbp]
and rax, 15
mov ecx, 2
imul rcx, rcx, 4
mov rdx, QWORD PTR ptr$[rbp]
mov r8, QWORD PTR digit_table$[rbp]
movzx eax, WORD PTR [r8+rax*2]
mov WORD PTR [rdx+rcx], ax
; 432 : x = _ROTATE_L_UNIT(x, 4); ptr[5] = digit_table[x & 0x0f];
mov edx, 4
mov rcx, QWORD PTR x$[rbp]
call _ROTATE_L_UNIT
mov QWORD PTR x$[rbp], rax
mov rax, QWORD PTR x$[rbp]
and rax, 15
mov ecx, 2
imul rcx, rcx, 5
mov rdx, QWORD PTR ptr$[rbp]
mov r8, QWORD PTR digit_table$[rbp]
movzx eax, WORD PTR [r8+rax*2]
mov WORD PTR [rdx+rcx], ax
; 433 : x = _ROTATE_L_UNIT(x, 4); ptr[6] = digit_table[x & 0x0f];
mov edx, 4
mov rcx, QWORD PTR x$[rbp]
call _ROTATE_L_UNIT
mov QWORD PTR x$[rbp], rax
mov rax, QWORD PTR x$[rbp]
and rax, 15
mov ecx, 2
imul rcx, rcx, 6
mov rdx, QWORD PTR ptr$[rbp]
mov r8, QWORD PTR digit_table$[rbp]
movzx eax, WORD PTR [r8+rax*2]
mov WORD PTR [rdx+rcx], ax
; 434 : x = _ROTATE_L_UNIT(x, 4); ptr[7] = digit_table[x & 0x0f];
mov edx, 4
mov rcx, QWORD PTR x$[rbp]
call _ROTATE_L_UNIT
mov QWORD PTR x$[rbp], rax
mov rax, QWORD PTR x$[rbp]
and rax, 15
mov ecx, 2
imul rcx, rcx, 7
mov rdx, QWORD PTR ptr$[rbp]
mov r8, QWORD PTR digit_table$[rbp]
movzx eax, WORD PTR [r8+rax*2]
mov WORD PTR [rdx+rcx], ax
; 435 : x = _ROTATE_L_UNIT(x, 4); ptr[8] = digit_table[x & 0x0f];
mov edx, 4
mov rcx, QWORD PTR x$[rbp]
call _ROTATE_L_UNIT
mov QWORD PTR x$[rbp], rax
mov rax, QWORD PTR x$[rbp]
and rax, 15
mov ecx, 2
imul rcx, rcx, 8
mov rdx, QWORD PTR ptr$[rbp]
mov r8, QWORD PTR digit_table$[rbp]
movzx eax, WORD PTR [r8+rax*2]
mov WORD PTR [rdx+rcx], ax
; 436 : x = _ROTATE_L_UNIT(x, 4); ptr[9] = digit_table[x & 0x0f];
mov edx, 4
mov rcx, QWORD PTR x$[rbp]
call _ROTATE_L_UNIT
mov QWORD PTR x$[rbp], rax
mov rax, QWORD PTR x$[rbp]
and rax, 15
mov ecx, 2
imul rcx, rcx, 9
mov rdx, QWORD PTR ptr$[rbp]
mov r8, QWORD PTR digit_table$[rbp]
movzx eax, WORD PTR [r8+rax*2]
mov WORD PTR [rdx+rcx], ax
; 437 : x = _ROTATE_L_UNIT(x, 4); ptr[10] = digit_table[x & 0x0f];
mov edx, 4
mov rcx, QWORD PTR x$[rbp]
call _ROTATE_L_UNIT
mov QWORD PTR x$[rbp], rax
mov rax, QWORD PTR x$[rbp]
and rax, 15
mov ecx, 2
imul rcx, rcx, 10
mov rdx, QWORD PTR ptr$[rbp]
mov r8, QWORD PTR digit_table$[rbp]
movzx eax, WORD PTR [r8+rax*2]
mov WORD PTR [rdx+rcx], ax
; 438 : x = _ROTATE_L_UNIT(x, 4); ptr[11] = digit_table[x & 0x0f];
mov edx, 4
mov rcx, QWORD PTR x$[rbp]
call _ROTATE_L_UNIT
mov QWORD PTR x$[rbp], rax
mov rax, QWORD PTR x$[rbp]
and rax, 15
mov ecx, 2
imul rcx, rcx, 11
mov rdx, QWORD PTR ptr$[rbp]
mov r8, QWORD PTR digit_table$[rbp]
movzx eax, WORD PTR [r8+rax*2]
mov WORD PTR [rdx+rcx], ax
; 439 : x = _ROTATE_L_UNIT(x, 4); ptr[12] = digit_table[x & 0x0f];
mov edx, 4
mov rcx, QWORD PTR x$[rbp]
call _ROTATE_L_UNIT
mov QWORD PTR x$[rbp], rax
mov rax, QWORD PTR x$[rbp]
and rax, 15
mov ecx, 2
imul rcx, rcx, 12
mov rdx, QWORD PTR ptr$[rbp]
mov r8, QWORD PTR digit_table$[rbp]
movzx eax, WORD PTR [r8+rax*2]
mov WORD PTR [rdx+rcx], ax
; 440 : x = _ROTATE_L_UNIT(x, 4); ptr[13] = digit_table[x & 0x0f];
mov edx, 4
mov rcx, QWORD PTR x$[rbp]
call _ROTATE_L_UNIT
mov QWORD PTR x$[rbp], rax
mov rax, QWORD PTR x$[rbp]
and rax, 15
mov ecx, 2
imul rcx, rcx, 13
mov rdx, QWORD PTR ptr$[rbp]
mov r8, QWORD PTR digit_table$[rbp]
movzx eax, WORD PTR [r8+rax*2]
mov WORD PTR [rdx+rcx], ax
; 441 : x = _ROTATE_L_UNIT(x, 4); ptr[14] = digit_table[x & 0x0f];
mov edx, 4
mov rcx, QWORD PTR x$[rbp]
call _ROTATE_L_UNIT
mov QWORD PTR x$[rbp], rax
mov rax, QWORD PTR x$[rbp]
and rax, 15
mov ecx, 2
imul rcx, rcx, 14
mov rdx, QWORD PTR ptr$[rbp]
mov r8, QWORD PTR digit_table$[rbp]
movzx eax, WORD PTR [r8+rax*2]
mov WORD PTR [rdx+rcx], ax
; 442 : x = _ROTATE_L_UNIT(x, 4); ptr[15] = digit_table[x & 0x0f];
mov edx, 4
mov rcx, QWORD PTR x$[rbp]
call _ROTATE_L_UNIT
mov QWORD PTR x$[rbp], rax
mov rax, QWORD PTR x$[rbp]
and rax, 15
mov ecx, 2
imul rcx, rcx, 15
mov rdx, QWORD PTR ptr$[rbp]
mov r8, QWORD PTR digit_table$[rbp]
movzx eax, WORD PTR [r8+rax*2]
mov WORD PTR [rdx+rcx], ax
; 443 : ptr += 16;
mov rax, QWORD PTR ptr$[rbp]
add rax, 32 ; 00000020H
mov QWORD PTR ptr$[rbp], rax
$LN4@ToStringX_:
; 444 : }
; 445 : if (count & 0x8)
mov eax, DWORD PTR count$[rbp]
and eax, 8
test eax, eax
je $LN5@ToStringX_
; 446 : {
; 447 : x = _ROTATE_L_UNIT(x, 4); ptr[0] = digit_table[x & 0x0f];
mov edx, 4
mov rcx, QWORD PTR x$[rbp]
call _ROTATE_L_UNIT
mov QWORD PTR x$[rbp], rax
mov rax, QWORD PTR x$[rbp]
and rax, 15
mov ecx, 2
imul rcx, rcx, 0
mov rdx, QWORD PTR ptr$[rbp]
mov r8, QWORD PTR digit_table$[rbp]
movzx eax, WORD PTR [r8+rax*2]
mov WORD PTR [rdx+rcx], ax
; 448 : x = _ROTATE_L_UNIT(x, 4); ptr[1] = digit_table[x & 0x0f];
mov edx, 4
mov rcx, QWORD PTR x$[rbp]
call _ROTATE_L_UNIT
mov QWORD PTR x$[rbp], rax
mov rax, QWORD PTR x$[rbp]
and rax, 15
mov ecx, 2
imul rcx, rcx, 1
mov rdx, QWORD PTR ptr$[rbp]
mov r8, QWORD PTR digit_table$[rbp]
movzx eax, WORD PTR [r8+rax*2]
mov WORD PTR [rdx+rcx], ax
; 449 : x = _ROTATE_L_UNIT(x, 4); ptr[2] = digit_table[x & 0x0f];
mov edx, 4
mov rcx, QWORD PTR x$[rbp]
call _ROTATE_L_UNIT
mov QWORD PTR x$[rbp], rax
mov rax, QWORD PTR x$[rbp]
and rax, 15
mov ecx, 2
imul rcx, rcx, 2
mov rdx, QWORD PTR ptr$[rbp]
mov r8, QWORD PTR digit_table$[rbp]
movzx eax, WORD PTR [r8+rax*2]
mov WORD PTR [rdx+rcx], ax
; 450 : x = _ROTATE_L_UNIT(x, 4); ptr[3] = digit_table[x & 0x0f];
mov edx, 4
mov rcx, QWORD PTR x$[rbp]
call _ROTATE_L_UNIT
mov QWORD PTR x$[rbp], rax
mov rax, QWORD PTR x$[rbp]
and rax, 15
mov ecx, 2
imul rcx, rcx, 3
mov rdx, QWORD PTR ptr$[rbp]
mov r8, QWORD PTR digit_table$[rbp]
movzx eax, WORD PTR [r8+rax*2]
mov WORD PTR [rdx+rcx], ax
; 451 : x = _ROTATE_L_UNIT(x, 4); ptr[4] = digit_table[x & 0x0f];
mov edx, 4
mov rcx, QWORD PTR x$[rbp]
call _ROTATE_L_UNIT
mov QWORD PTR x$[rbp], rax
mov rax, QWORD PTR x$[rbp]
and rax, 15
mov ecx, 2
imul rcx, rcx, 4
mov rdx, QWORD PTR ptr$[rbp]
mov r8, QWORD PTR digit_table$[rbp]
movzx eax, WORD PTR [r8+rax*2]
mov WORD PTR [rdx+rcx], ax
; 452 : x = _ROTATE_L_UNIT(x, 4); ptr[5] = digit_table[x & 0x0f];
mov edx, 4
mov rcx, QWORD PTR x$[rbp]
call _ROTATE_L_UNIT
mov QWORD PTR x$[rbp], rax
mov rax, QWORD PTR x$[rbp]
and rax, 15
mov ecx, 2
imul rcx, rcx, 5
mov rdx, QWORD PTR ptr$[rbp]
mov r8, QWORD PTR digit_table$[rbp]
movzx eax, WORD PTR [r8+rax*2]
mov WORD PTR [rdx+rcx], ax
; 453 : x = _ROTATE_L_UNIT(x, 4); ptr[6] = digit_table[x & 0x0f];
mov edx, 4
mov rcx, QWORD PTR x$[rbp]
call _ROTATE_L_UNIT
mov QWORD PTR x$[rbp], rax
mov rax, QWORD PTR x$[rbp]
and rax, 15
mov ecx, 2
imul rcx, rcx, 6
mov rdx, QWORD PTR ptr$[rbp]
mov r8, QWORD PTR digit_table$[rbp]
movzx eax, WORD PTR [r8+rax*2]
mov WORD PTR [rdx+rcx], ax
; 454 : x = _ROTATE_L_UNIT(x, 4); ptr[7] = digit_table[x & 0x0f];
mov edx, 4
mov rcx, QWORD PTR x$[rbp]
call _ROTATE_L_UNIT
mov QWORD PTR x$[rbp], rax
mov rax, QWORD PTR x$[rbp]
and rax, 15
mov ecx, 2
imul rcx, rcx, 7
mov rdx, QWORD PTR ptr$[rbp]
mov r8, QWORD PTR digit_table$[rbp]
movzx eax, WORD PTR [r8+rax*2]
mov WORD PTR [rdx+rcx], ax
; 455 : ptr+=8;
mov rax, QWORD PTR ptr$[rbp]
add rax, 16
mov QWORD PTR ptr$[rbp], rax
$LN5@ToStringX_:
; 456 : }
; 457 : if (count & 0x4)
mov eax, DWORD PTR count$[rbp]
and eax, 4
test eax, eax
je $LN6@ToStringX_
; 458 : {
; 459 : x = _ROTATE_L_UNIT(x, 4); ptr[0] = digit_table[x & 0x0f];
mov edx, 4
mov rcx, QWORD PTR x$[rbp]
call _ROTATE_L_UNIT
mov QWORD PTR x$[rbp], rax
mov rax, QWORD PTR x$[rbp]
and rax, 15
mov ecx, 2
imul rcx, rcx, 0
mov rdx, QWORD PTR ptr$[rbp]
mov r8, QWORD PTR digit_table$[rbp]
movzx eax, WORD PTR [r8+rax*2]
mov WORD PTR [rdx+rcx], ax
; 460 : x = _ROTATE_L_UNIT(x, 4); ptr[1] = digit_table[x & 0x0f];
mov edx, 4
mov rcx, QWORD PTR x$[rbp]
call _ROTATE_L_UNIT
mov QWORD PTR x$[rbp], rax
mov rax, QWORD PTR x$[rbp]
and rax, 15
mov ecx, 2
imul rcx, rcx, 1
mov rdx, QWORD PTR ptr$[rbp]
mov r8, QWORD PTR digit_table$[rbp]
movzx eax, WORD PTR [r8+rax*2]
mov WORD PTR [rdx+rcx], ax
; 461 : x = _ROTATE_L_UNIT(x, 4); ptr[2] = digit_table[x & 0x0f];
mov edx, 4
mov rcx, QWORD PTR x$[rbp]
call _ROTATE_L_UNIT
mov QWORD PTR x$[rbp], rax
mov rax, QWORD PTR x$[rbp]
and rax, 15
mov ecx, 2
imul rcx, rcx, 2
mov rdx, QWORD PTR ptr$[rbp]
mov r8, QWORD PTR digit_table$[rbp]
movzx eax, WORD PTR [r8+rax*2]
mov WORD PTR [rdx+rcx], ax
; 462 : x = _ROTATE_L_UNIT(x, 4); ptr[3] = digit_table[x & 0x0f];
mov edx, 4
mov rcx, QWORD PTR x$[rbp]
call _ROTATE_L_UNIT
mov QWORD PTR x$[rbp], rax
mov rax, QWORD PTR x$[rbp]
and rax, 15
mov ecx, 2
imul rcx, rcx, 3
mov rdx, QWORD PTR ptr$[rbp]
mov r8, QWORD PTR digit_table$[rbp]
movzx eax, WORD PTR [r8+rax*2]
mov WORD PTR [rdx+rcx], ax
; 463 : ptr += 4;
mov rax, QWORD PTR ptr$[rbp]
add rax, 8
mov QWORD PTR ptr$[rbp], rax
$LN6@ToStringX_:
; 464 : }
; 465 : if (count & 0x2)
mov eax, DWORD PTR count$[rbp]
and eax, 2
test eax, eax
je $LN7@ToStringX_
; 466 : {
; 467 : x = _ROTATE_L_UNIT(x, 4); ptr[0] = digit_table[x & 0x0f];
mov edx, 4
mov rcx, QWORD PTR x$[rbp]
call _ROTATE_L_UNIT
mov QWORD PTR x$[rbp], rax
mov rax, QWORD PTR x$[rbp]
and rax, 15
mov ecx, 2
imul rcx, rcx, 0
mov rdx, QWORD PTR ptr$[rbp]
mov r8, QWORD PTR digit_table$[rbp]
movzx eax, WORD PTR [r8+rax*2]
mov WORD PTR [rdx+rcx], ax
; 468 : x = _ROTATE_L_UNIT(x, 4); ptr[1] = digit_table[x & 0x0f];
mov edx, 4
mov rcx, QWORD PTR x$[rbp]
call _ROTATE_L_UNIT
mov QWORD PTR x$[rbp], rax
mov rax, QWORD PTR x$[rbp]
and rax, 15
mov ecx, 2
imul rcx, rcx, 1
mov rdx, QWORD PTR ptr$[rbp]
mov r8, QWORD PTR digit_table$[rbp]
movzx eax, WORD PTR [r8+rax*2]
mov WORD PTR [rdx+rcx], ax
; 469 : ptr += 2;
mov rax, QWORD PTR ptr$[rbp]
add rax, 4
mov QWORD PTR ptr$[rbp], rax
$LN7@ToStringX_:
; 470 : }
; 471 : if (count & 0x1)
mov eax, DWORD PTR count$[rbp]
and eax, 1
test eax, eax
je SHORT $LN8@ToStringX_
; 472 : {
; 473 : x = _ROTATE_L_UNIT(x, 4); ptr[0] = digit_table[x & 0x0f];
mov edx, 4
mov rcx, QWORD PTR x$[rbp]
call _ROTATE_L_UNIT
mov QWORD PTR x$[rbp], rax
mov rax, QWORD PTR x$[rbp]
and rax, 15
mov ecx, 2
imul rcx, rcx, 0
mov rdx, QWORD PTR ptr$[rbp]
mov r8, QWORD PTR digit_table$[rbp]
movzx eax, WORD PTR [r8+rax*2]
mov WORD PTR [rdx+rcx], ax
; 474 : ptr += 1;
mov rax, QWORD PTR ptr$[rbp]
add rax, 2
mov QWORD PTR ptr$[rbp], rax
$LN8@ToStringX_:
; 475 : }
; 476 : return (ptr);
mov rax, QWORD PTR ptr$[rbp]
$LN1@ToStringX_:
; 477 : }
lea rsp, QWORD PTR [rbp+232]
pop rdi
pop rbp
ret 0
ToStringX_1WORD ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_tostring.c
; COMDAT ToStringDN
_TEXT SEGMENT
base_value$ = 4
word_digit_count$ = 36
decimal_separator_len$9 = 68
result$10 = 100
r_buf_code$11 = 136
r_buf_words$12 = 168
r_buf$13 = 200
r_buf_count$14 = 232
rev_str_buf_code$15 = 264
rev_str_buf_words$16 = 296
rev_str_buf$17 = 328
rev_str_buf_count$18 = 360
tv180 = 568
x$ = 608
buffer$ = 616
buffer_size$ = 624
format$ = 632
width$ = 640
format_option$ = 648
ToStringDN PROC ; COMDAT
; 319 : {
mov BYTE PTR [rsp+32], r9b
mov QWORD PTR [rsp+24], r8
mov QWORD PTR [rsp+16], rdx
mov QWORD PTR [rsp+8], rcx
push rbp
push rdi
sub rsp, 648 ; 00000288H
lea rbp, QWORD PTR [rsp+64]
mov rdi, rsp
mov ecx, 162 ; 000000a2H
mov eax, -858993460 ; ccccccccH
rep stosd
mov rcx, QWORD PTR [rsp+680]
lea rcx, OFFSET FLAT:__3AA1CF5E_pmc_tostring@c
call __CheckForDebuggerJustMyCode
; 320 : __UNIT_TYPE_DIV base_value;
; 321 : int word_digit_count;
; 322 : if (sizeof(__UNIT_TYPE_DIV) == sizeof(_UINT32_T))
xor eax, eax
cmp eax, 1
je SHORT $LN2@ToStringDN
; 323 : {
; 324 : base_value = 1000000000U; // 10^9
mov DWORD PTR base_value$[rbp], 1000000000 ; 3b9aca00H
; 325 : word_digit_count = 9;
mov DWORD PTR word_digit_count$[rbp], 9
; 326 : }
jmp SHORT $LN3@ToStringDN
$LN2@ToStringDN:
; 327 : else if (sizeof(__UNIT_TYPE_DIV) == sizeof(_UINT64_T))
xor eax, eax
test eax, eax
je SHORT $LN4@ToStringDN
; 328 : {
; 329 : base_value = (__UNIT_TYPE_DIV)10000000000000000000UL; // 10^19
mov DWORD PTR base_value$[rbp], -1981284352 ; 89e80000H
; 330 : word_digit_count = 19;
mov DWORD PTR word_digit_count$[rbp], 19
; 331 : }
jmp SHORT $LN5@ToStringDN
$LN4@ToStringDN:
; 332 : else
; 333 : return (PMC_STATUS_NOT_SUPPORTED);
mov eax, -6
jmp $LN1@ToStringDN
$LN5@ToStringDN:
$LN3@ToStringDN:
; 334 :
; 335 : if (x->IS_ZERO)
mov rax, QWORD PTR x$[rbp]
mov eax, DWORD PTR [rax+40]
shr eax, 1
and eax, 1
test eax, eax
je $LN6@ToStringDN
; 336 : {
; 337 : // x が 0 である場合
; 338 : if (format == 'N')
movsx eax, BYTE PTR format$[rbp]
cmp eax, 78 ; 0000004eH
jne $LN8@ToStringDN
; 339 : {
; 340 : // format が 'N' である場合
; 341 :
; 342 : // 整数部が 1 桁の 0、小数部が width 桁の 0 である文字列を出力する。
; 343 : buffer[0] = '0';
mov eax, 2
imul rax, rax, 0
mov ecx, 48 ; 00000030H
mov rdx, QWORD PTR buffer$[rbp]
mov WORD PTR [rdx+rax], cx
; 344 : if (width == 0)
cmp DWORD PTR width$[rbp], 0
jne SHORT $LN10@ToStringDN
; 345 : buffer[1] = L'\0';
mov eax, 2
imul rax, rax, 1
xor ecx, ecx
mov rdx, QWORD PTR buffer$[rbp]
mov WORD PTR [rdx+rax], cx
jmp SHORT $LN11@ToStringDN
$LN10@ToStringDN:
; 346 : else
; 347 : {
; 348 : lstrcpyW(&buffer[1], format_option->DecimalSeparator);
mov rax, QWORD PTR format_option$[rbp]
add rax, 10
mov ecx, 2
imul rcx, rcx, 1
mov rdx, QWORD PTR buffer$[rbp]
add rdx, rcx
mov rcx, rdx
mov rdx, rax
call QWORD PTR __imp_lstrcpyW
; 349 : int decimal_separator_len = lstrlenW(format_option->DecimalSeparator);
mov rax, QWORD PTR format_option$[rbp]
add rax, 10
mov rcx, rax
call QWORD PTR __imp_lstrlenW
mov DWORD PTR decimal_separator_len$9[rbp], eax
; 350 : _FILL_MEMORY_16(buffer + 1 + decimal_separator_len, L'0', width);
mov eax, DWORD PTR width$[rbp]
movsxd rcx, DWORD PTR decimal_separator_len$9[rbp]
mov rdx, QWORD PTR buffer$[rbp]
lea rcx, QWORD PTR [rdx+rcx*2+2]
mov r8d, eax
mov dx, 48 ; 00000030H
call _FILL_MEMORY_16
; 351 : buffer[1 + decimal_separator_len + width] = L'\0';
mov eax, DWORD PTR decimal_separator_len$9[rbp]
mov ecx, DWORD PTR width$[rbp]
lea eax, DWORD PTR [rax+rcx+1]
mov eax, eax
xor ecx, ecx
mov rdx, QWORD PTR buffer$[rbp]
mov WORD PTR [rdx+rax*2], cx
$LN11@ToStringDN:
; 352 : }
; 353 : }
jmp SHORT $LN9@ToStringDN
$LN8@ToStringDN:
; 354 : else
; 355 : {
; 356 : // format が 'D' である場合
; 357 :
; 358 : // 最低で 1 桁、最高で width 桁だけ '0' を出力する。
; 359 : if (width < 1)
cmp DWORD PTR width$[rbp], 1
jae SHORT $LN12@ToStringDN
; 360 : width = 1;
mov DWORD PTR width$[rbp], 1
$LN12@ToStringDN:
; 361 : if (buffer_size < width + 1)
mov eax, DWORD PTR width$[rbp]
inc eax
mov eax, eax
cmp QWORD PTR buffer_size$[rbp], rax
jae SHORT $LN13@ToStringDN
; 362 : return (PMC_STATUS_INSUFFICIENT_BUFFER);
mov eax, -4
jmp $LN1@ToStringDN
$LN13@ToStringDN:
; 363 : _FILL_MEMORY_16(buffer, L'0', width);
mov eax, DWORD PTR width$[rbp]
mov r8d, eax
mov dx, 48 ; 00000030H
mov rcx, QWORD PTR buffer$[rbp]
call _FILL_MEMORY_16
; 364 : buffer[width] = L'\0';
mov eax, DWORD PTR width$[rbp]
xor ecx, ecx
mov rdx, QWORD PTR buffer$[rbp]
mov WORD PTR [rdx+rax*2], cx
$LN9@ToStringDN:
; 365 : }
; 366 : }
jmp $LN7@ToStringDN
$LN6@ToStringDN:
; 367 : else
; 368 : {
; 369 : // x が 0 ではない場合
; 370 : PMC_STATUS_CODE result;
; 371 : __UNIT_TYPE r_buf_code;
; 372 : __UNIT_TYPE r_buf_words;
; 373 : // xを base_value 基数として変換した数値が r に格納される。約 7% ほど余分に領域が必要な計算になるが、余裕を見て 12.5% 程度の領域を獲得している。
; 374 : __UNIT_TYPE_DIV* r_buf = (__UNIT_TYPE_DIV*)AllocateBlock(x->UNIT_BIT_COUNT + (x->UNIT_BIT_COUNT >> 3) + __UNIT_TYPE_BIT_COUNT, &r_buf_words, &r_buf_code);
mov rax, QWORD PTR x$[rbp]
mov rax, QWORD PTR [rax+16]
shr rax, 3
mov rcx, QWORD PTR x$[rbp]
mov rcx, QWORD PTR [rcx+16]
lea rax, QWORD PTR [rcx+rax+64]
lea r8, QWORD PTR r_buf_code$11[rbp]
lea rdx, QWORD PTR r_buf_words$12[rbp]
mov rcx, rax
call AllocateBlock
mov QWORD PTR r_buf$13[rbp], rax
; 375 : if (r_buf == NULL)
cmp QWORD PTR r_buf$13[rbp], 0
jne SHORT $LN14@ToStringDN
; 376 : return (PMC_STATUS_NOT_ENOUGH_MEMORY);
mov eax, -5
jmp $LN1@ToStringDN
$LN14@ToStringDN:
; 377 : __UNIT_TYPE r_buf_count;
; 378 : if ((result = ConvertCardinalNumber((__UNIT_TYPE_DIV*)x->BLOCK, x->UNIT_WORD_COUNT * sizeof(__UNIT_TYPE) / sizeof(__UNIT_TYPE_DIV), x->UNIT_BIT_COUNT, base_value, r_buf, &r_buf_count)) != PMC_STATUS_OK)
mov rax, QWORD PTR x$[rbp]
mov rax, QWORD PTR [rax+8]
shl rax, 3
xor edx, edx
mov ecx, 4
div rcx
lea rcx, QWORD PTR r_buf_count$14[rbp]
mov QWORD PTR [rsp+40], rcx
mov rcx, QWORD PTR r_buf$13[rbp]
mov QWORD PTR [rsp+32], rcx
mov r9d, DWORD PTR base_value$[rbp]
mov rcx, QWORD PTR x$[rbp]
mov r8, QWORD PTR [rcx+16]
mov rdx, rax
mov rax, QWORD PTR x$[rbp]
mov rcx, QWORD PTR [rax+56]
call ConvertCardinalNumber
mov DWORD PTR result$10[rbp], eax
cmp DWORD PTR result$10[rbp], 0
je SHORT $LN15@ToStringDN
; 379 : {
; 380 : DeallocateBlock((__UNIT_TYPE*)r_buf, r_buf_words);
mov rdx, QWORD PTR r_buf_words$12[rbp]
mov rcx, QWORD PTR r_buf$13[rbp]
call DeallocateBlock
; 381 : return (result);
mov eax, DWORD PTR result$10[rbp]
jmp $LN1@ToStringDN
$LN15@ToStringDN:
; 382 : }
; 383 : if ((result = CheckBlockLight((__UNIT_TYPE*)r_buf, r_buf_code)) != PMC_STATUS_OK)
mov rdx, QWORD PTR r_buf_code$11[rbp]
mov rcx, QWORD PTR r_buf$13[rbp]
call CheckBlockLight
mov DWORD PTR result$10[rbp], eax
cmp DWORD PTR result$10[rbp], 0
je SHORT $LN16@ToStringDN
; 384 : return (result);
mov eax, DWORD PTR result$10[rbp]
jmp $LN1@ToStringDN
$LN16@ToStringDN:
; 385 :
; 386 : __UNIT_TYPE rev_str_buf_code;
; 387 : __UNIT_TYPE rev_str_buf_words;
; 388 : // 獲得領域長の * 2 は、桁区切りのワーストケースにより文字列が膨らんだ場合を考慮したもの。
; 389 : wchar_t* rev_str_buf = (wchar_t*)AllocateBlock((max(r_buf_count * word_digit_count, width) * 2 + width + 2) * sizeof(wchar_t) * 8, &rev_str_buf_words, &rev_str_buf_code);
movsxd rax, DWORD PTR word_digit_count$[rbp]
mov rcx, QWORD PTR r_buf_count$14[rbp]
imul rcx, rax
mov rax, rcx
mov ecx, DWORD PTR width$[rbp]
cmp rax, rcx
jbe SHORT $LN21@ToStringDN
movsxd rax, DWORD PTR word_digit_count$[rbp]
mov rcx, QWORD PTR r_buf_count$14[rbp]
imul rcx, rax
mov rax, rcx
mov QWORD PTR tv180[rbp], rax
jmp SHORT $LN22@ToStringDN
$LN21@ToStringDN:
mov eax, DWORD PTR width$[rbp]
mov QWORD PTR tv180[rbp], rax
$LN22@ToStringDN:
mov eax, DWORD PTR width$[rbp]
mov rcx, QWORD PTR tv180[rbp]
lea rax, QWORD PTR [rax+rcx*2]
lea rax, QWORD PTR [rax+rax+4]
shl rax, 3
lea r8, QWORD PTR rev_str_buf_code$15[rbp]
lea rdx, QWORD PTR rev_str_buf_words$16[rbp]
mov rcx, rax
call AllocateBlock
mov QWORD PTR rev_str_buf$17[rbp], rax
; 390 : if (r_buf == NULL)
cmp QWORD PTR r_buf$13[rbp], 0
jne SHORT $LN17@ToStringDN
; 391 : {
; 392 : DeallocateBlock((__UNIT_TYPE*)r_buf, r_buf_words);
mov rdx, QWORD PTR r_buf_words$12[rbp]
mov rcx, QWORD PTR r_buf$13[rbp]
call DeallocateBlock
; 393 : return (PMC_STATUS_NOT_ENOUGH_MEMORY);
mov eax, -5
jmp $LN1@ToStringDN
$LN17@ToStringDN:
; 394 : }
; 395 : __UNIT_TYPE rev_str_buf_count;
; 396 : PrintDecimal(r_buf, r_buf_count, rev_str_buf, &rev_str_buf_count, format, width, format_option);
mov rax, QWORD PTR format_option$[rbp]
mov QWORD PTR [rsp+48], rax
mov eax, DWORD PTR width$[rbp]
mov DWORD PTR [rsp+40], eax
movzx eax, BYTE PTR format$[rbp]
mov BYTE PTR [rsp+32], al
lea r9, QWORD PTR rev_str_buf_count$18[rbp]
mov r8, QWORD PTR rev_str_buf$17[rbp]
mov rdx, QWORD PTR r_buf_count$14[rbp]
mov rcx, QWORD PTR r_buf$13[rbp]
call PrintDecimal
; 397 : if ((result = CheckBlockLight((__UNIT_TYPE*)rev_str_buf, rev_str_buf_code)) != PMC_STATUS_OK)
mov rdx, QWORD PTR rev_str_buf_code$15[rbp]
mov rcx, QWORD PTR rev_str_buf$17[rbp]
call CheckBlockLight
mov DWORD PTR result$10[rbp], eax
cmp DWORD PTR result$10[rbp], 0
je SHORT $LN18@ToStringDN
; 398 : return (result);
mov eax, DWORD PTR result$10[rbp]
jmp SHORT $LN1@ToStringDN
$LN18@ToStringDN:
; 399 : DeallocateBlock((__UNIT_TYPE*)r_buf, r_buf_words);
mov rdx, QWORD PTR r_buf_words$12[rbp]
mov rcx, QWORD PTR r_buf$13[rbp]
call DeallocateBlock
; 400 : if (rev_str_buf_count + 1 > buffer_size)
mov rax, QWORD PTR rev_str_buf_count$18[rbp]
inc rax
cmp rax, QWORD PTR buffer_size$[rbp]
jbe SHORT $LN19@ToStringDN
; 401 : {
; 402 : DeallocateBlock((__UNIT_TYPE*)rev_str_buf, rev_str_buf_words);
mov rdx, QWORD PTR rev_str_buf_words$16[rbp]
mov rcx, QWORD PTR rev_str_buf$17[rbp]
call DeallocateBlock
; 403 : return (PMC_STATUS_INSUFFICIENT_BUFFER);
mov eax, -4
jmp SHORT $LN1@ToStringDN
$LN19@ToStringDN:
; 404 : }
; 405 : ToStringDN_Finalize(rev_str_buf, rev_str_buf_count, buffer, buffer_size);
mov r9, QWORD PTR buffer_size$[rbp]
mov r8, QWORD PTR buffer$[rbp]
mov rdx, QWORD PTR rev_str_buf_count$18[rbp]
mov rcx, QWORD PTR rev_str_buf$17[rbp]
call ToStringDN_Finalize
; 406 : DeallocateBlock((__UNIT_TYPE*)rev_str_buf, rev_str_buf_words);
mov rdx, QWORD PTR rev_str_buf_words$16[rbp]
mov rcx, QWORD PTR rev_str_buf$17[rbp]
call DeallocateBlock
$LN7@ToStringDN:
; 407 : }
; 408 : return (PMC_STATUS_OK);
xor eax, eax
$LN1@ToStringDN:
; 409 : }
mov rdi, rax
lea rcx, QWORD PTR [rbp-64]
lea rdx, OFFSET FLAT:ToStringDN$rtcFrameData
call _RTC_CheckStackVars
mov rax, rdi
lea rsp, QWORD PTR [rbp+584]
pop rdi
pop rbp
ret 0
ToStringDN ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_tostring.c
; COMDAT ToStringDN_Finalize
_TEXT SEGMENT
in_ptr$ = 8
out_ptr$ = 40
count$ = 72
in_buf$ = 320
in_buf_count$ = 328
out_buf$ = 336
out_buf_count$ = 344
ToStringDN_Finalize PROC ; COMDAT
; 306 : {
mov QWORD PTR [rsp+32], r9
mov QWORD PTR [rsp+24], r8
mov QWORD PTR [rsp+16], rdx
mov QWORD PTR [rsp+8], rcx
push rbp
push rdi
sub rsp, 328 ; 00000148H
lea rbp, QWORD PTR [rsp+32]
mov rdi, rsp
mov ecx, 82 ; 00000052H
mov eax, -858993460 ; ccccccccH
rep stosd
mov rcx, QWORD PTR [rsp+360]
lea rcx, OFFSET FLAT:__3AA1CF5E_pmc_tostring@c
call __CheckForDebuggerJustMyCode
; 307 : wchar_t* in_ptr = in_buf + in_buf_count - 1;
mov rax, QWORD PTR in_buf$[rbp]
mov rcx, QWORD PTR in_buf_count$[rbp]
lea rax, QWORD PTR [rax+rcx*2-2]
mov QWORD PTR in_ptr$[rbp], rax
; 308 : wchar_t* out_ptr = out_buf;
mov rax, QWORD PTR out_buf$[rbp]
mov QWORD PTR out_ptr$[rbp], rax
; 309 : __UNIT_TYPE count = in_buf_count;
mov rax, QWORD PTR in_buf_count$[rbp]
mov QWORD PTR count$[rbp], rax
$LN2@ToStringDN:
; 310 : while (count > 0)
cmp QWORD PTR count$[rbp], 0
jbe SHORT $LN3@ToStringDN
; 311 : {
; 312 : *out_ptr++ = *in_ptr--;
mov rax, QWORD PTR out_ptr$[rbp]
mov rcx, QWORD PTR in_ptr$[rbp]
movzx ecx, WORD PTR [rcx]
mov WORD PTR [rax], cx
mov rax, QWORD PTR out_ptr$[rbp]
add rax, 2
mov QWORD PTR out_ptr$[rbp], rax
mov rax, QWORD PTR in_ptr$[rbp]
sub rax, 2
mov QWORD PTR in_ptr$[rbp], rax
; 313 : --count;
mov rax, QWORD PTR count$[rbp]
dec rax
mov QWORD PTR count$[rbp], rax
; 314 : }
jmp SHORT $LN2@ToStringDN
$LN3@ToStringDN:
; 315 : *out_ptr = L'\0';
xor eax, eax
mov rcx, QWORD PTR out_ptr$[rbp]
mov WORD PTR [rcx], ax
; 316 : }
lea rsp, QWORD PTR [rbp+296]
pop rdi
pop rbp
ret 0
ToStringDN_Finalize ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_tostring.c
; COMDAT PrintDecimal
_TEXT SEGMENT
state$ = 8
count$4 = 84
in_ptr$ = 120
in_count$ = 152
count$5 = 180
__$ArrayPad$ = 392
in_buf$ = 432
in_buf_count$ = 440
out_buf$ = 448
out_buf_count$ = 456
format$ = 464
width$ = 472
format_option$ = 480
PrintDecimal PROC ; COMDAT
; 264 : {
mov QWORD PTR [rsp+32], r9
mov QWORD PTR [rsp+24], r8
mov QWORD PTR [rsp+16], rdx
mov QWORD PTR [rsp+8], rcx
push rbp
push rdi
sub rsp, 440 ; 000001b8H
lea rbp, QWORD PTR [rsp+32]
mov rdi, rsp
mov ecx, 110 ; 0000006eH
mov eax, -858993460 ; ccccccccH
rep stosd
mov rcx, QWORD PTR [rsp+472]
mov rax, QWORD PTR __security_cookie
xor rax, rbp
mov QWORD PTR __$ArrayPad$[rbp], rax
lea rcx, OFFSET FLAT:__3AA1CF5E_pmc_tostring@c
call __CheckForDebuggerJustMyCode
; 265 : struct TOSTRINGN_OUTPUT_STATE state;
; 266 : InitializeOutputState(&state, out_buf, format, format_option);
mov r9, QWORD PTR format_option$[rbp]
movzx r8d, BYTE PTR format$[rbp]
mov rdx, QWORD PTR out_buf$[rbp]
lea rcx, QWORD PTR state$[rbp]
call InitializeOutputState
; 267 : if (format == 'N' && width > 0)
movsx eax, BYTE PTR format$[rbp]
cmp eax, 78 ; 0000004eH
jne SHORT $LN8@PrintDecim
cmp DWORD PTR width$[rbp], 0
jbe SHORT $LN8@PrintDecim
; 268 : {
; 269 : _UINT32_T count = width;
mov eax, DWORD PTR width$[rbp]
mov DWORD PTR count$4[rbp], eax
$LN2@PrintDecim:
; 270 : while (count > 0)
cmp DWORD PTR count$4[rbp], 0
jbe SHORT $LN3@PrintDecim
; 271 : {
; 272 : OutputUngroupedOneChar(&state, 0);
xor edx, edx
lea rcx, QWORD PTR state$[rbp]
call OutputUngroupedOneChar
; 273 : --count;
mov eax, DWORD PTR count$4[rbp]
dec eax
mov DWORD PTR count$4[rbp], eax
; 274 : }
jmp SHORT $LN2@PrintDecim
$LN3@PrintDecim:
; 275 : OutputDecimalSeparator(&state);
lea rcx, QWORD PTR state$[rbp]
call OutputDecimalSeparator
$LN8@PrintDecim:
; 276 : }
; 277 : __UNIT_TYPE_DIV* in_ptr = in_buf;
mov rax, QWORD PTR in_buf$[rbp]
mov QWORD PTR in_ptr$[rbp], rax
; 278 : __UNIT_TYPE in_count = in_buf_count - 1;
mov rax, QWORD PTR in_buf_count$[rbp]
dec rax
mov QWORD PTR in_count$[rbp], rax
$LN4@PrintDecim:
; 279 : while (in_count != 0)
cmp QWORD PTR in_count$[rbp], 0
je SHORT $LN5@PrintDecim
; 280 : {
; 281 : ToStringDN_1WORD(&state, *in_ptr);
mov rax, QWORD PTR in_ptr$[rbp]
mov edx, DWORD PTR [rax]
lea rcx, QWORD PTR state$[rbp]
call ToStringDN_1WORD
; 282 : ++in_ptr;
mov rax, QWORD PTR in_ptr$[rbp]
add rax, 4
mov QWORD PTR in_ptr$[rbp], rax
; 283 : --in_count;
mov rax, QWORD PTR in_count$[rbp]
dec rax
mov QWORD PTR in_count$[rbp], rax
; 284 : }
jmp SHORT $LN4@PrintDecim
$LN5@PrintDecim:
; 285 : ToStringDN_LEADING_1WORD(&state, *in_ptr);
mov rax, QWORD PTR in_ptr$[rbp]
mov edx, DWORD PTR [rax]
lea rcx, QWORD PTR state$[rbp]
call ToStringDN_LEADING_1WORD
; 286 : ++in_ptr;
mov rax, QWORD PTR in_ptr$[rbp]
add rax, 4
mov QWORD PTR in_ptr$[rbp], rax
; 287 : --in_count;
mov rax, QWORD PTR in_count$[rbp]
dec rax
mov QWORD PTR in_count$[rbp], rax
; 288 : if (format == 'D')
movsx eax, BYTE PTR format$[rbp]
cmp eax, 68 ; 00000044H
jne SHORT $LN9@PrintDecim
; 289 : {
; 290 : if (state.OUT_PTR < out_buf + width)
mov eax, DWORD PTR width$[rbp]
mov rcx, QWORD PTR out_buf$[rbp]
lea rax, QWORD PTR [rcx+rax*2]
cmp QWORD PTR state$[rbp+48], rax
jae SHORT $LN10@PrintDecim
; 291 : {
; 292 : int count = width - (int)(state.OUT_PTR - out_buf);
mov rax, QWORD PTR out_buf$[rbp]
mov rcx, QWORD PTR state$[rbp+48]
sub rcx, rax
mov rax, rcx
sar rax, 1
mov ecx, DWORD PTR width$[rbp]
sub ecx, eax
mov eax, ecx
mov DWORD PTR count$5[rbp], eax
$LN6@PrintDecim:
; 293 : while (count > 0)
cmp DWORD PTR count$5[rbp], 0
jle SHORT $LN7@PrintDecim
; 294 : {
; 295 : OutputOneChar(&state, 0);
xor edx, edx
lea rcx, QWORD PTR state$[rbp]
call OutputOneChar
; 296 : --count;
mov eax, DWORD PTR count$5[rbp]
dec eax
mov DWORD PTR count$5[rbp], eax
; 297 : }
jmp SHORT $LN6@PrintDecim
$LN7@PrintDecim:
$LN10@PrintDecim:
$LN9@PrintDecim:
; 298 : }
; 299 : }
; 300 : *out_buf_count = state.OUT_PTR - out_buf;
mov rax, QWORD PTR out_buf$[rbp]
mov rcx, QWORD PTR state$[rbp+48]
sub rcx, rax
mov rax, rcx
sar rax, 1
mov rcx, QWORD PTR out_buf_count$[rbp]
mov QWORD PTR [rcx], rax
; 301 : *state.OUT_PTR = '\0';
xor eax, eax
mov rcx, QWORD PTR state$[rbp+48]
mov WORD PTR [rcx], ax
; 302 : }
lea rcx, QWORD PTR [rbp-32]
lea rdx, OFFSET FLAT:PrintDecimal$rtcFrameData
call _RTC_CheckStackVars
mov rcx, QWORD PTR __$ArrayPad$[rbp]
xor rcx, rbp
call __security_check_cookie
lea rsp, QWORD PTR [rbp+408]
pop rdi
pop rbp
ret 0
PrintDecimal ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_tostring.c
; COMDAT ToStringDN_1WORD
_TEXT SEGMENT
r$ = 4
state$ = 256
x$ = 264
ToStringDN_1WORD PROC ; COMDAT
; 204 : {
mov DWORD PTR [rsp+16], edx
mov QWORD PTR [rsp+8], rcx
push rbp
push rdi
sub rsp, 264 ; 00000108H
lea rbp, QWORD PTR [rsp+32]
mov rdi, rsp
mov ecx, 66 ; 00000042H
mov eax, -858993460 ; ccccccccH
rep stosd
mov rcx, QWORD PTR [rsp+296]
lea rcx, OFFSET FLAT:__3AA1CF5E_pmc_tostring@c
call __CheckForDebuggerJustMyCode
; 205 : __UNIT_TYPE_DIV r;
; 206 : if (sizeof(__UNIT_TYPE_DIV) >= sizeof(_UINT64_T))
xor eax, eax
test eax, eax
je $LN2@ToStringDN
; 207 : {
; 208 : x = _DIVREM_UNIT(0, x, 10, &r); OutputOneChar(state, r);
lea r9, QWORD PTR r$[rbp]
mov r8d, 10
mov edx, DWORD PTR x$[rbp]
xor ecx, ecx
call _DIVREM_UNIT
mov DWORD PTR x$[rbp], eax
mov edx, DWORD PTR r$[rbp]
mov rcx, QWORD PTR state$[rbp]
call OutputOneChar
; 209 : x = _DIVREM_UNIT(0, x, 10, &r); OutputOneChar(state, r);
lea r9, QWORD PTR r$[rbp]
mov r8d, 10
mov edx, DWORD PTR x$[rbp]
xor ecx, ecx
call _DIVREM_UNIT
mov DWORD PTR x$[rbp], eax
mov edx, DWORD PTR r$[rbp]
mov rcx, QWORD PTR state$[rbp]
call OutputOneChar
; 210 : x = _DIVREM_UNIT(0, x, 10, &r); OutputOneChar(state, r);
lea r9, QWORD PTR r$[rbp]
mov r8d, 10
mov edx, DWORD PTR x$[rbp]
xor ecx, ecx
call _DIVREM_UNIT
mov DWORD PTR x$[rbp], eax
mov edx, DWORD PTR r$[rbp]
mov rcx, QWORD PTR state$[rbp]
call OutputOneChar
; 211 : x = _DIVREM_UNIT(0, x, 10, &r); OutputOneChar(state, r);
lea r9, QWORD PTR r$[rbp]
mov r8d, 10
mov edx, DWORD PTR x$[rbp]
xor ecx, ecx
call _DIVREM_UNIT
mov DWORD PTR x$[rbp], eax
mov edx, DWORD PTR r$[rbp]
mov rcx, QWORD PTR state$[rbp]
call OutputOneChar
; 212 : x = _DIVREM_UNIT(0, x, 10, &r); OutputOneChar(state, r);
lea r9, QWORD PTR r$[rbp]
mov r8d, 10
mov edx, DWORD PTR x$[rbp]
xor ecx, ecx
call _DIVREM_UNIT
mov DWORD PTR x$[rbp], eax
mov edx, DWORD PTR r$[rbp]
mov rcx, QWORD PTR state$[rbp]
call OutputOneChar
; 213 : x = _DIVREM_UNIT(0, x, 10, &r); OutputOneChar(state, r);
lea r9, QWORD PTR r$[rbp]
mov r8d, 10
mov edx, DWORD PTR x$[rbp]
xor ecx, ecx
call _DIVREM_UNIT
mov DWORD PTR x$[rbp], eax
mov edx, DWORD PTR r$[rbp]
mov rcx, QWORD PTR state$[rbp]
call OutputOneChar
; 214 : x = _DIVREM_UNIT(0, x, 10, &r); OutputOneChar(state, r);
lea r9, QWORD PTR r$[rbp]
mov r8d, 10
mov edx, DWORD PTR x$[rbp]
xor ecx, ecx
call _DIVREM_UNIT
mov DWORD PTR x$[rbp], eax
mov edx, DWORD PTR r$[rbp]
mov rcx, QWORD PTR state$[rbp]
call OutputOneChar
; 215 : x = _DIVREM_UNIT(0, x, 10, &r); OutputOneChar(state, r);
lea r9, QWORD PTR r$[rbp]
mov r8d, 10
mov edx, DWORD PTR x$[rbp]
xor ecx, ecx
call _DIVREM_UNIT
mov DWORD PTR x$[rbp], eax
mov edx, DWORD PTR r$[rbp]
mov rcx, QWORD PTR state$[rbp]
call OutputOneChar
; 216 : x = _DIVREM_UNIT(0, x, 10, &r); OutputOneChar(state, r);
lea r9, QWORD PTR r$[rbp]
mov r8d, 10
mov edx, DWORD PTR x$[rbp]
xor ecx, ecx
call _DIVREM_UNIT
mov DWORD PTR x$[rbp], eax
mov edx, DWORD PTR r$[rbp]
mov rcx, QWORD PTR state$[rbp]
call OutputOneChar
; 217 : x = _DIVREM_UNIT(0, x, 10, &r); OutputOneChar(state, r);
lea r9, QWORD PTR r$[rbp]
mov r8d, 10
mov edx, DWORD PTR x$[rbp]
xor ecx, ecx
call _DIVREM_UNIT
mov DWORD PTR x$[rbp], eax
mov edx, DWORD PTR r$[rbp]
mov rcx, QWORD PTR state$[rbp]
call OutputOneChar
; 218 : #ifdef ENABLED_PERFORMANCE_COUNTER
; 219 : if (sizeof(r) == sizeof(_UINT64_T))
xor eax, eax
test eax, eax
je SHORT $LN3@ToStringDN
; 220 : AddToDIV64Counter(10);
mov ecx, 10
call AddToDIV64Counter
jmp SHORT $LN4@ToStringDN
$LN3@ToStringDN:
; 221 : else
; 222 : AddToDIV32Counter(10);
mov ecx, 10
call AddToDIV32Counter
$LN4@ToStringDN:
$LN2@ToStringDN:
; 223 : #endif
; 224 : }
; 225 : if (sizeof(__UNIT_TYPE_DIV) >= sizeof(_UINT32_T))
xor eax, eax
cmp eax, 1
je $LN5@ToStringDN
; 226 : {
; 227 : x = _DIVREM_UNIT(0, x, 10, &r); OutputOneChar(state, r);
lea r9, QWORD PTR r$[rbp]
mov r8d, 10
mov edx, DWORD PTR x$[rbp]
xor ecx, ecx
call _DIVREM_UNIT
mov DWORD PTR x$[rbp], eax
mov edx, DWORD PTR r$[rbp]
mov rcx, QWORD PTR state$[rbp]
call OutputOneChar
; 228 : x = _DIVREM_UNIT(0, x, 10, &r); OutputOneChar(state, r);
lea r9, QWORD PTR r$[rbp]
mov r8d, 10
mov edx, DWORD PTR x$[rbp]
xor ecx, ecx
call _DIVREM_UNIT
mov DWORD PTR x$[rbp], eax
mov edx, DWORD PTR r$[rbp]
mov rcx, QWORD PTR state$[rbp]
call OutputOneChar
; 229 : x = _DIVREM_UNIT(0, x, 10, &r); OutputOneChar(state, r);
lea r9, QWORD PTR r$[rbp]
mov r8d, 10
mov edx, DWORD PTR x$[rbp]
xor ecx, ecx
call _DIVREM_UNIT
mov DWORD PTR x$[rbp], eax
mov edx, DWORD PTR r$[rbp]
mov rcx, QWORD PTR state$[rbp]
call OutputOneChar
; 230 : x = _DIVREM_UNIT(0, x, 10, &r); OutputOneChar(state, r);
lea r9, QWORD PTR r$[rbp]
mov r8d, 10
mov edx, DWORD PTR x$[rbp]
xor ecx, ecx
call _DIVREM_UNIT
mov DWORD PTR x$[rbp], eax
mov edx, DWORD PTR r$[rbp]
mov rcx, QWORD PTR state$[rbp]
call OutputOneChar
; 231 : x = _DIVREM_UNIT(0, x, 10, &r); OutputOneChar(state, r);
lea r9, QWORD PTR r$[rbp]
mov r8d, 10
mov edx, DWORD PTR x$[rbp]
xor ecx, ecx
call _DIVREM_UNIT
mov DWORD PTR x$[rbp], eax
mov edx, DWORD PTR r$[rbp]
mov rcx, QWORD PTR state$[rbp]
call OutputOneChar
; 232 : #ifdef ENABLED_PERFORMANCE_COUNTER
; 233 : if (sizeof(r) == sizeof(_UINT64_T))
xor eax, eax
test eax, eax
je SHORT $LN6@ToStringDN
; 234 : AddToDIV64Counter(5);
mov ecx, 5
call AddToDIV64Counter
jmp SHORT $LN7@ToStringDN
$LN6@ToStringDN:
; 235 : else
; 236 : AddToDIV32Counter(5);
mov ecx, 5
call AddToDIV32Counter
$LN7@ToStringDN:
$LN5@ToStringDN:
; 237 : #endif
; 238 : }
; 239 : if (sizeof(__UNIT_TYPE_DIV) >= sizeof(_UINT16_T))
xor eax, eax
cmp eax, 1
je SHORT $LN8@ToStringDN
; 240 : {
; 241 : x = _DIVREM_UNIT(0, x, 10, &r); OutputOneChar(state, r);
lea r9, QWORD PTR r$[rbp]
mov r8d, 10
mov edx, DWORD PTR x$[rbp]
xor ecx, ecx
call _DIVREM_UNIT
mov DWORD PTR x$[rbp], eax
mov edx, DWORD PTR r$[rbp]
mov rcx, QWORD PTR state$[rbp]
call OutputOneChar
; 242 : x = _DIVREM_UNIT(0, x, 10, &r); OutputOneChar(state, r);
lea r9, QWORD PTR r$[rbp]
mov r8d, 10
mov edx, DWORD PTR x$[rbp]
xor ecx, ecx
call _DIVREM_UNIT
mov DWORD PTR x$[rbp], eax
mov edx, DWORD PTR r$[rbp]
mov rcx, QWORD PTR state$[rbp]
call OutputOneChar
; 243 : #ifdef ENABLED_PERFORMANCE_COUNTER
; 244 : if (sizeof(r) == sizeof(_UINT64_T))
xor eax, eax
test eax, eax
je SHORT $LN9@ToStringDN
; 245 : AddToDIV64Counter(2);
mov ecx, 2
call AddToDIV64Counter
jmp SHORT $LN10@ToStringDN
$LN9@ToStringDN:
; 246 : else
; 247 : AddToDIV32Counter(2);
mov ecx, 2
call AddToDIV32Counter
$LN10@ToStringDN:
$LN8@ToStringDN:
; 248 : #endif
; 249 : }
; 250 : if (sizeof(__UNIT_TYPE_DIV) >= sizeof(_BYTE_T))
xor eax, eax
cmp eax, 1
je SHORT $LN11@ToStringDN
; 251 : {
; 252 : x = _DIVREM_UNIT(0, x, 10, &r); OutputOneChar(state, r);
lea r9, QWORD PTR r$[rbp]
mov r8d, 10
mov edx, DWORD PTR x$[rbp]
xor ecx, ecx
call _DIVREM_UNIT
mov DWORD PTR x$[rbp], eax
mov edx, DWORD PTR r$[rbp]
mov rcx, QWORD PTR state$[rbp]
call OutputOneChar
; 253 : OutputOneChar(state, x);
mov edx, DWORD PTR x$[rbp]
mov rcx, QWORD PTR state$[rbp]
call OutputOneChar
; 254 : #ifdef ENABLED_PERFORMANCE_COUNTER
; 255 : if (sizeof(r) == sizeof(_UINT64_T))
xor eax, eax
test eax, eax
je SHORT $LN12@ToStringDN
; 256 : IncrementDIV64Counter();
call IncrementDIV64Counter
jmp SHORT $LN13@ToStringDN
$LN12@ToStringDN:
; 257 : else
; 258 : IncrementDIV32Counter();
call IncrementDIV32Counter
$LN13@ToStringDN:
$LN11@ToStringDN:
; 259 : #endif
; 260 : }
; 261 : }
lea rcx, QWORD PTR [rbp-32]
lea rdx, OFFSET FLAT:ToStringDN_1WORD$rtcFrameData
call _RTC_CheckStackVars
lea rsp, QWORD PTR [rbp+232]
pop rdi
pop rbp
ret 0
ToStringDN_1WORD ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_tostring.c
; COMDAT ToStringDN_LEADING_1WORD
_TEXT SEGMENT
r$ = 4
state$ = 256
x$ = 264
ToStringDN_LEADING_1WORD PROC ; COMDAT
; 187 : {
mov DWORD PTR [rsp+16], edx
mov QWORD PTR [rsp+8], rcx
push rbp
push rdi
sub rsp, 264 ; 00000108H
lea rbp, QWORD PTR [rsp+32]
mov rdi, rsp
mov ecx, 66 ; 00000042H
mov eax, -858993460 ; ccccccccH
rep stosd
mov rcx, QWORD PTR [rsp+296]
lea rcx, OFFSET FLAT:__3AA1CF5E_pmc_tostring@c
call __CheckForDebuggerJustMyCode
$LN4@ToStringDN:
; 188 : __UNIT_TYPE_DIV r;
; 189 : do
; 190 : {
; 191 : x = _DIVREM_UNIT(0, x, 10, &r);
lea r9, QWORD PTR r$[rbp]
mov r8d, 10
mov edx, DWORD PTR x$[rbp]
xor ecx, ecx
call _DIVREM_UNIT
mov DWORD PTR x$[rbp], eax
; 192 : OutputOneChar(state, r);
mov edx, DWORD PTR r$[rbp]
mov rcx, QWORD PTR state$[rbp]
call OutputOneChar
; 193 : #ifdef ENABLED_PERFORMANCE_COUNTER
; 194 : if (sizeof(r) == sizeof(_UINT64_T))
xor eax, eax
test eax, eax
je SHORT $LN5@ToStringDN
; 195 : IncrementDIV64Counter();
call IncrementDIV64Counter
jmp SHORT $LN6@ToStringDN
$LN5@ToStringDN:
; 196 : else
; 197 : IncrementDIV32Counter();
call IncrementDIV32Counter
$LN6@ToStringDN:
; 198 : #endif
; 199 : } while (x != 0);
cmp DWORD PTR x$[rbp], 0
jne SHORT $LN4@ToStringDN
; 200 : }
lea rcx, QWORD PTR [rbp-32]
lea rdx, OFFSET FLAT:ToStringDN_LEADING_1WORD$rtcFrameData
call _RTC_CheckStackVars
lea rsp, QWORD PTR [rbp+232]
pop rdi
pop rbp
ret 0
ToStringDN_LEADING_1WORD ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_tostring.c
; COMDAT OutputOneChar
_TEXT SEGMENT
state$ = 224
x$ = 232
OutputOneChar PROC ; COMDAT
; 146 : {
mov DWORD PTR [rsp+16], edx
mov QWORD PTR [rsp+8], rcx
push rbp
push rdi
sub rsp, 232 ; 000000e8H
lea rbp, QWORD PTR [rsp+32]
mov rdi, rsp
mov ecx, 58 ; 0000003aH
mov eax, -858993460 ; ccccccccH
rep stosd
mov rcx, QWORD PTR [rsp+264]
lea rcx, OFFSET FLAT:__3AA1CF5E_pmc_tostring@c
call __CheckForDebuggerJustMyCode
; 147 : if (state->FORMAT == 'N')
mov rax, QWORD PTR state$[rbp]
movsx eax, BYTE PTR [rax]
cmp eax, 78 ; 0000004eH
jne $LN2@OutputOneC
; 148 : {
; 149 : // 書式が N である場合
; 150 : if (state->CURRENT_GROUP_SIZE > 0 && state->CURRENT_GROUP_INDEX >= state->CURRENT_GROUP_SIZE)
mov rax, QWORD PTR state$[rbp]
cmp DWORD PTR [rax+40], 0
jle $LN4@OutputOneC
mov rax, QWORD PTR state$[rbp]
mov rcx, QWORD PTR state$[rbp]
mov ecx, DWORD PTR [rcx+40]
cmp DWORD PTR [rax+44], ecx
jl $LN4@OutputOneC
; 151 : {
; 152 : // 現在のグループ幅が 0 ではなく、かつ既に出力した文字数がグループ幅に達した場合
; 153 :
; 154 : // グループ区切り文字を出力してから与えられた文字を出力する
; 155 : lstrcpyW(state->OUT_PTR, state->GROUP_SEPARATOR);
mov rax, QWORD PTR state$[rbp]
add rax, 2
mov rdx, rax
mov rax, QWORD PTR state$[rbp]
mov rcx, QWORD PTR [rax+48]
call QWORD PTR __imp_lstrcpyW
; 156 : state->OUT_PTR += state->GROUP_SEPARATOR_LENGTH;
mov rax, QWORD PTR state$[rbp]
movsxd rax, DWORD PTR [rax+24]
mov rcx, QWORD PTR state$[rbp]
mov rcx, QWORD PTR [rcx+48]
lea rax, QWORD PTR [rcx+rax*2]
mov rcx, QWORD PTR state$[rbp]
mov QWORD PTR [rcx+48], rax
; 157 : *state->OUT_PTR = decimal_digits[x];
mov eax, DWORD PTR x$[rbp]
lea rcx, OFFSET FLAT:decimal_digits
mov rdx, QWORD PTR state$[rbp]
mov rdx, QWORD PTR [rdx+48]
movzx eax, WORD PTR [rcx+rax*2]
mov WORD PTR [rdx], ax
; 158 : state->OUT_PTR += 1;
mov rax, QWORD PTR state$[rbp]
mov rax, QWORD PTR [rax+48]
add rax, 2
mov rcx, QWORD PTR state$[rbp]
mov QWORD PTR [rcx+48], rax
; 159 : state->CURRENT_GROUP_INDEX = 1;
mov rax, QWORD PTR state$[rbp]
mov DWORD PTR [rax+44], 1
; 160 :
; 161 : // 次のグループが存在すればそのグループに移行する
; 162 : if (state->CURRENT_GROUP[1] != '\0')
mov eax, 1
imul rax, rax, 1
mov rcx, QWORD PTR state$[rbp]
mov rcx, QWORD PTR [rcx+32]
movsx eax, BYTE PTR [rcx+rax]
test eax, eax
je SHORT $LN6@OutputOneC
; 163 : {
; 164 : state->CURRENT_GROUP += 1;
mov rax, QWORD PTR state$[rbp]
mov rax, QWORD PTR [rax+32]
inc rax
mov rcx, QWORD PTR state$[rbp]
mov QWORD PTR [rcx+32], rax
; 165 : state->CURRENT_GROUP_SIZE = *state->CURRENT_GROUP - '0';
mov rax, QWORD PTR state$[rbp]
mov rax, QWORD PTR [rax+32]
movsx eax, BYTE PTR [rax]
sub eax, 48 ; 00000030H
mov rcx, QWORD PTR state$[rbp]
mov DWORD PTR [rcx+40], eax
$LN6@OutputOneC:
; 166 : }
; 167 : }
jmp SHORT $LN5@OutputOneC
$LN4@OutputOneC:
; 168 : else
; 169 : {
; 170 : // 現在のグループの幅が 0 であるかあるいは出力した文字数がグループ幅に達していない場合
; 171 : *state->OUT_PTR = decimal_digits[x];
mov eax, DWORD PTR x$[rbp]
lea rcx, OFFSET FLAT:decimal_digits
mov rdx, QWORD PTR state$[rbp]
mov rdx, QWORD PTR [rdx+48]
movzx eax, WORD PTR [rcx+rax*2]
mov WORD PTR [rdx], ax
; 172 : state->OUT_PTR += 1;
mov rax, QWORD PTR state$[rbp]
mov rax, QWORD PTR [rax+48]
add rax, 2
mov rcx, QWORD PTR state$[rbp]
mov QWORD PTR [rcx+48], rax
; 173 : state->CURRENT_GROUP_INDEX += 1;
mov rax, QWORD PTR state$[rbp]
mov eax, DWORD PTR [rax+44]
inc eax
mov rcx, QWORD PTR state$[rbp]
mov DWORD PTR [rcx+44], eax
$LN5@OutputOneC:
; 174 : }
; 175 : }
jmp SHORT $LN3@OutputOneC
$LN2@OutputOneC:
; 176 : else
; 177 : {
; 178 : // 書式が N ではない (つまり D である) 場合
; 179 :
; 180 : *state->OUT_PTR = decimal_digits[x];
mov eax, DWORD PTR x$[rbp]
lea rcx, OFFSET FLAT:decimal_digits
mov rdx, QWORD PTR state$[rbp]
mov rdx, QWORD PTR [rdx+48]
movzx eax, WORD PTR [rcx+rax*2]
mov WORD PTR [rdx], ax
; 181 : state->OUT_PTR += 1;
mov rax, QWORD PTR state$[rbp]
mov rax, QWORD PTR [rax+48]
add rax, 2
mov rcx, QWORD PTR state$[rbp]
mov QWORD PTR [rcx+48], rax
$LN3@OutputOneC:
; 182 : }
; 183 : }
lea rsp, QWORD PTR [rbp+200]
pop rdi
pop rbp
ret 0
OutputOneChar ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_tostring.c
; COMDAT OutputUngroupedOneChar
_TEXT SEGMENT
state$ = 224
x$ = 232
OutputUngroupedOneChar PROC ; COMDAT
; 140 : {
mov DWORD PTR [rsp+16], edx
mov QWORD PTR [rsp+8], rcx
push rbp
push rdi
sub rsp, 232 ; 000000e8H
lea rbp, QWORD PTR [rsp+32]
mov rdi, rsp
mov ecx, 58 ; 0000003aH
mov eax, -858993460 ; ccccccccH
rep stosd
mov rcx, QWORD PTR [rsp+264]
lea rcx, OFFSET FLAT:__3AA1CF5E_pmc_tostring@c
call __CheckForDebuggerJustMyCode
; 141 : *state->OUT_PTR = decimal_digits[x];
mov eax, DWORD PTR x$[rbp]
lea rcx, OFFSET FLAT:decimal_digits
mov rdx, QWORD PTR state$[rbp]
mov rdx, QWORD PTR [rdx+48]
movzx eax, WORD PTR [rcx+rax*2]
mov WORD PTR [rdx], ax
; 142 : state->OUT_PTR += 1;
mov rax, QWORD PTR state$[rbp]
mov rax, QWORD PTR [rax+48]
add rax, 2
mov rcx, QWORD PTR state$[rbp]
mov QWORD PTR [rcx+48], rax
; 143 : }
lea rsp, QWORD PTR [rbp+200]
pop rdi
pop rbp
ret 0
OutputUngroupedOneChar ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_tostring.c
; COMDAT OutputDecimalSeparator
_TEXT SEGMENT
state$ = 224
OutputDecimalSeparator PROC ; COMDAT
; 134 : {
mov QWORD PTR [rsp+8], rcx
push rbp
push rdi
sub rsp, 232 ; 000000e8H
lea rbp, QWORD PTR [rsp+32]
mov rdi, rsp
mov ecx, 58 ; 0000003aH
mov eax, -858993460 ; ccccccccH
rep stosd
mov rcx, QWORD PTR [rsp+264]
lea rcx, OFFSET FLAT:__3AA1CF5E_pmc_tostring@c
call __CheckForDebuggerJustMyCode
; 135 : lstrcpyW(state->OUT_PTR, state->DECIMAL_SEPARATOR);
mov rax, QWORD PTR state$[rbp]
add rax, 12
mov rdx, rax
mov rax, QWORD PTR state$[rbp]
mov rcx, QWORD PTR [rax+48]
call QWORD PTR __imp_lstrcpyW
; 136 : state->OUT_PTR += state->DECIMAL_SEPARATOR_LENGTH;
mov rax, QWORD PTR state$[rbp]
movsxd rax, DWORD PTR [rax+28]
mov rcx, QWORD PTR state$[rbp]
mov rcx, QWORD PTR [rcx+48]
lea rax, QWORD PTR [rcx+rax*2]
mov rcx, QWORD PTR state$[rbp]
mov QWORD PTR [rcx+48], rax
; 137 : }
lea rsp, QWORD PTR [rbp+200]
pop rdi
pop rbp
ret 0
OutputDecimalSeparator ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_tostring.c
; COMDAT InitializeOutputState
_TEXT SEGMENT
in_ptr$ = 8
out_ptr$ = 40
state$ = 288
out_buf$ = 296
format$ = 304
format_option$ = 312
InitializeOutputState PROC ; COMDAT
; 102 : {
mov QWORD PTR [rsp+32], r9
mov BYTE PTR [rsp+24], r8b
mov QWORD PTR [rsp+16], rdx
mov QWORD PTR [rsp+8], rcx
push rbp
push rdi
sub rsp, 296 ; 00000128H
lea rbp, QWORD PTR [rsp+32]
mov rdi, rsp
mov ecx, 74 ; 0000004aH
mov eax, -858993460 ; ccccccccH
rep stosd
mov rcx, QWORD PTR [rsp+328]
lea rcx, OFFSET FLAT:__3AA1CF5E_pmc_tostring@c
call __CheckForDebuggerJustMyCode
; 103 : state->FORMAT = format;
mov rax, QWORD PTR state$[rbp]
movzx ecx, BYTE PTR format$[rbp]
mov BYTE PTR [rax], cl
; 104 :
; 105 : state->GROUP_SEPARATOR_LENGTH = lstrlenW(format_option->GroupSeparator);
mov rax, QWORD PTR format_option$[rbp]
add rax, 4
mov rcx, rax
call QWORD PTR __imp_lstrlenW
mov rcx, QWORD PTR state$[rbp]
mov DWORD PTR [rcx+24], eax
; 106 : wchar_t* in_ptr = format_option->GroupSeparator;
mov rax, QWORD PTR format_option$[rbp]
add rax, 4
mov QWORD PTR in_ptr$[rbp], rax
; 107 : wchar_t* out_ptr = state->GROUP_SEPARATOR + state->GROUP_SEPARATOR_LENGTH;
mov rax, QWORD PTR state$[rbp]
movsxd rax, DWORD PTR [rax+24]
mov rcx, QWORD PTR state$[rbp]
lea rax, QWORD PTR [rcx+rax*2+2]
mov QWORD PTR out_ptr$[rbp], rax
; 108 : *out_ptr-- = '\0';
xor eax, eax
mov rcx, QWORD PTR out_ptr$[rbp]
mov WORD PTR [rcx], ax
mov rax, QWORD PTR out_ptr$[rbp]
sub rax, 2
mov QWORD PTR out_ptr$[rbp], rax
$LN2@Initialize:
; 109 : while (*in_ptr != L'\0')
mov rax, QWORD PTR in_ptr$[rbp]
movzx eax, WORD PTR [rax]
test eax, eax
je SHORT $LN3@Initialize
; 110 : {
; 111 : *out_ptr = *in_ptr;
mov rax, QWORD PTR out_ptr$[rbp]
mov rcx, QWORD PTR in_ptr$[rbp]
movzx ecx, WORD PTR [rcx]
mov WORD PTR [rax], cx
; 112 : --out_ptr;
mov rax, QWORD PTR out_ptr$[rbp]
sub rax, 2
mov QWORD PTR out_ptr$[rbp], rax
; 113 : ++in_ptr;
mov rax, QWORD PTR in_ptr$[rbp]
add rax, 2
mov QWORD PTR in_ptr$[rbp], rax
; 114 : }
jmp SHORT $LN2@Initialize
$LN3@Initialize:
; 115 :
; 116 : state->DECIMAL_SEPARATOR_LENGTH = lstrlenW(format_option->DecimalSeparator);
mov rax, QWORD PTR format_option$[rbp]
add rax, 10
mov rcx, rax
call QWORD PTR __imp_lstrlenW
mov rcx, QWORD PTR state$[rbp]
mov DWORD PTR [rcx+28], eax
; 117 : in_ptr = format_option->DecimalSeparator;
mov rax, QWORD PTR format_option$[rbp]
add rax, 10
mov QWORD PTR in_ptr$[rbp], rax
; 118 : out_ptr = state->DECIMAL_SEPARATOR + state->DECIMAL_SEPARATOR_LENGTH;
mov rax, QWORD PTR state$[rbp]
movsxd rax, DWORD PTR [rax+28]
mov rcx, QWORD PTR state$[rbp]
lea rax, QWORD PTR [rcx+rax*2+12]
mov QWORD PTR out_ptr$[rbp], rax
; 119 : *out_ptr-- = '\0';
xor eax, eax
mov rcx, QWORD PTR out_ptr$[rbp]
mov WORD PTR [rcx], ax
mov rax, QWORD PTR out_ptr$[rbp]
sub rax, 2
mov QWORD PTR out_ptr$[rbp], rax
$LN4@Initialize:
; 120 : while (*in_ptr != L'\0')
mov rax, QWORD PTR in_ptr$[rbp]
movzx eax, WORD PTR [rax]
test eax, eax
je SHORT $LN5@Initialize
; 121 : {
; 122 : *out_ptr = *in_ptr;
mov rax, QWORD PTR out_ptr$[rbp]
mov rcx, QWORD PTR in_ptr$[rbp]
movzx ecx, WORD PTR [rcx]
mov WORD PTR [rax], cx
; 123 : --out_ptr;
mov rax, QWORD PTR out_ptr$[rbp]
sub rax, 2
mov QWORD PTR out_ptr$[rbp], rax
; 124 : ++in_ptr;
mov rax, QWORD PTR in_ptr$[rbp]
add rax, 2
mov QWORD PTR in_ptr$[rbp], rax
; 125 : }
jmp SHORT $LN4@Initialize
$LN5@Initialize:
; 126 :
; 127 : state->CURRENT_GROUP = &format_option->GroupSizes[0];
mov eax, 1
imul rax, rax, 0
mov rcx, QWORD PTR format_option$[rbp]
lea rax, QWORD PTR [rcx+rax+28]
mov rcx, QWORD PTR state$[rbp]
mov QWORD PTR [rcx+32], rax
; 128 : state->CURRENT_GROUP_SIZE = *state->CURRENT_GROUP - '0';
mov rax, QWORD PTR state$[rbp]
mov rax, QWORD PTR [rax+32]
movsx eax, BYTE PTR [rax]
sub eax, 48 ; 00000030H
mov rcx, QWORD PTR state$[rbp]
mov DWORD PTR [rcx+40], eax
; 129 : state->CURRENT_GROUP_INDEX = 0;
mov rax, QWORD PTR state$[rbp]
mov DWORD PTR [rax+44], 0
; 130 : state->OUT_PTR = out_buf;
mov rax, QWORD PTR state$[rbp]
mov rcx, QWORD PTR out_buf$[rbp]
mov QWORD PTR [rax+48], rcx
; 131 : }
lea rsp, QWORD PTR [rbp+264]
pop rdi
pop rbp
ret 0
InitializeOutputState ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_tostring.c
; COMDAT ConvertCardinalNumber
_TEXT SEGMENT
result$ = 4
work_buf_1_code$ = 40
work_buf_1_words$ = 72
work_buf_1$ = 104
work_buf_2_code$ = 136
work_buf_2_words$ = 168
work_buf_2$ = 200
u_ptr$ = 232
q_ptr$ = 264
r_ptr$ = 296
work_u_count$ = 328
r_value$8 = 356
temp$9 = 392
x_buf$ = 640
x_buf_size$ = 648
x_bit_count$ = 656
base_value$ = 664
r_buf$ = 672
r_buf_count$ = 680
ConvertCardinalNumber PROC ; COMDAT
; 59 : {
mov DWORD PTR [rsp+32], r9d
mov QWORD PTR [rsp+24], r8
mov QWORD PTR [rsp+16], rdx
mov QWORD PTR [rsp+8], rcx
push rbp
push rdi
sub rsp, 664 ; 00000298H
lea rbp, QWORD PTR [rsp+48]
mov rdi, rsp
mov ecx, 166 ; 000000a6H
mov eax, -858993460 ; ccccccccH
rep stosd
mov rcx, QWORD PTR [rsp+696]
lea rcx, OFFSET FLAT:__3AA1CF5E_pmc_tostring@c
call __CheckForDebuggerJustMyCode
; 60 : PMC_STATUS_CODE result;
; 61 : __UNIT_TYPE work_buf_1_code;
; 62 : __UNIT_TYPE work_buf_1_words;
; 63 : __UNIT_TYPE_DIV* work_buf_1 = (__UNIT_TYPE_DIV*)AllocateBlock(x_bit_count + __UNIT_TYPE_BIT_COUNT, &work_buf_1_words, &work_buf_1_code);
mov rax, QWORD PTR x_bit_count$[rbp]
add rax, 64 ; 00000040H
lea r8, QWORD PTR work_buf_1_code$[rbp]
lea rdx, QWORD PTR work_buf_1_words$[rbp]
mov rcx, rax
call AllocateBlock
mov QWORD PTR work_buf_1$[rbp], rax
; 64 : if (work_buf_1 == NULL)
cmp QWORD PTR work_buf_1$[rbp], 0
jne SHORT $LN6@ConvertCar
; 65 : return (PMC_STATUS_NOT_ENOUGH_MEMORY);
mov eax, -5
jmp $LN1@ConvertCar
$LN6@ConvertCar:
; 66 : __UNIT_TYPE work_buf_2_code;
; 67 : __UNIT_TYPE work_buf_2_words;
; 68 : __UNIT_TYPE_DIV* work_buf_2 = (__UNIT_TYPE_DIV*)AllocateBlock(x_bit_count + __UNIT_TYPE_BIT_COUNT, &work_buf_2_words, &work_buf_2_code);
mov rax, QWORD PTR x_bit_count$[rbp]
add rax, 64 ; 00000040H
lea r8, QWORD PTR work_buf_2_code$[rbp]
lea rdx, QWORD PTR work_buf_2_words$[rbp]
mov rcx, rax
call AllocateBlock
mov QWORD PTR work_buf_2$[rbp], rax
; 69 : if (work_buf_2 == NULL)
cmp QWORD PTR work_buf_2$[rbp], 0
jne SHORT $LN7@ConvertCar
; 70 : {
; 71 : DeallocateBlock((__UNIT_TYPE*)work_buf_1, work_buf_1_words);
mov rdx, QWORD PTR work_buf_1_words$[rbp]
mov rcx, QWORD PTR work_buf_1$[rbp]
call DeallocateBlock
; 72 : return (PMC_STATUS_NOT_ENOUGH_MEMORY);
mov eax, -5
jmp $LN1@ConvertCar
$LN7@ConvertCar:
; 73 : }
; 74 : __UNIT_TYPE_DIV* u_ptr = work_buf_1;
mov rax, QWORD PTR work_buf_1$[rbp]
mov QWORD PTR u_ptr$[rbp], rax
; 75 : __UNIT_TYPE_DIV* q_ptr = work_buf_2;
mov rax, QWORD PTR work_buf_2$[rbp]
mov QWORD PTR q_ptr$[rbp], rax
; 76 : _COPY_MEMORY_UNIT_DIV(u_ptr, x_buf, x_buf_size);
mov r8, QWORD PTR x_buf_size$[rbp]
mov rdx, QWORD PTR x_buf$[rbp]
mov rcx, QWORD PTR u_ptr$[rbp]
call _COPY_MEMORY_UNIT_DIV
; 77 : __UNIT_TYPE_DIV* r_ptr = r_buf;
mov rax, QWORD PTR r_buf$[rbp]
mov QWORD PTR r_ptr$[rbp], rax
; 78 : __UNIT_TYPE work_u_count = work_buf_1_words * (sizeof(__UNIT_TYPE) / sizeof(__UNIT_TYPE_DIV));
mov rax, QWORD PTR work_buf_1_words$[rbp]
shl rax, 1
mov QWORD PTR work_u_count$[rbp], rax
$LN2@ConvertCar:
; 79 : while (work_u_count > 0)
cmp QWORD PTR work_u_count$[rbp], 0
jbe $LN3@ConvertCar
; 80 : {
; 81 : _ZERO_MEMORY_UNIT_DIV(q_ptr, work_u_count);
mov rdx, QWORD PTR work_u_count$[rbp]
mov rcx, QWORD PTR q_ptr$[rbp]
call _ZERO_MEMORY_UNIT_DIV
; 82 : __UNIT_TYPE_DIV r_value;
; 83 : DivRem_X_1W(u_ptr, work_u_count, base_value, q_ptr, &r_value);
lea rax, QWORD PTR r_value$8[rbp]
mov QWORD PTR [rsp+32], rax
mov r9, QWORD PTR q_ptr$[rbp]
mov r8d, DWORD PTR base_value$[rbp]
mov rdx, QWORD PTR work_u_count$[rbp]
mov rcx, QWORD PTR u_ptr$[rbp]
call DivRem_X_1W
; 84 : if ((result = CheckBlockLight((__UNIT_TYPE*)work_buf_2, work_buf_2_code)) != PMC_STATUS_OK)
mov rdx, QWORD PTR work_buf_2_code$[rbp]
mov rcx, QWORD PTR work_buf_2$[rbp]
call CheckBlockLight
mov DWORD PTR result$[rbp], eax
cmp DWORD PTR result$[rbp], 0
je SHORT $LN8@ConvertCar
; 85 : return (result);
mov eax, DWORD PTR result$[rbp]
jmp $LN1@ConvertCar
$LN8@ConvertCar:
; 86 : if ((result = CheckBlockLight((__UNIT_TYPE*)work_buf_1, work_buf_1_code)) != PMC_STATUS_OK)
mov rdx, QWORD PTR work_buf_1_code$[rbp]
mov rcx, QWORD PTR work_buf_1$[rbp]
call CheckBlockLight
mov DWORD PTR result$[rbp], eax
cmp DWORD PTR result$[rbp], 0
je SHORT $LN9@ConvertCar
; 87 : return (result);
mov eax, DWORD PTR result$[rbp]
jmp $LN1@ConvertCar
$LN9@ConvertCar:
; 88 : *r_ptr++ = r_value;
mov rax, QWORD PTR r_ptr$[rbp]
mov ecx, DWORD PTR r_value$8[rbp]
mov DWORD PTR [rax], ecx
mov rax, QWORD PTR r_ptr$[rbp]
add rax, 4
mov QWORD PTR r_ptr$[rbp], rax
; 89 : __UNIT_TYPE_DIV* temp = u_ptr;
mov rax, QWORD PTR u_ptr$[rbp]
mov QWORD PTR temp$9[rbp], rax
; 90 : u_ptr = q_ptr;
mov rax, QWORD PTR q_ptr$[rbp]
mov QWORD PTR u_ptr$[rbp], rax
; 91 : q_ptr = temp;
mov rax, QWORD PTR temp$9[rbp]
mov QWORD PTR q_ptr$[rbp], rax
$LN4@ConvertCar:
; 92 : while (work_u_count > 0 && u_ptr[work_u_count - 1] == 0)
cmp QWORD PTR work_u_count$[rbp], 0
jbe SHORT $LN5@ConvertCar
mov rax, QWORD PTR u_ptr$[rbp]
mov rcx, QWORD PTR work_u_count$[rbp]
cmp DWORD PTR [rax+rcx*4-4], 0
jne SHORT $LN5@ConvertCar
; 93 : --work_u_count;
mov rax, QWORD PTR work_u_count$[rbp]
dec rax
mov QWORD PTR work_u_count$[rbp], rax
jmp SHORT $LN4@ConvertCar
$LN5@ConvertCar:
; 94 : }
jmp $LN2@ConvertCar
$LN3@ConvertCar:
; 95 : *r_buf_count = r_ptr - r_buf;
mov rax, QWORD PTR r_buf$[rbp]
mov rcx, QWORD PTR r_ptr$[rbp]
sub rcx, rax
mov rax, rcx
sar rax, 2
mov rcx, QWORD PTR r_buf_count$[rbp]
mov QWORD PTR [rcx], rax
; 96 : DeallocateBlock((__UNIT_TYPE*)work_buf_2, work_buf_2_words);
mov rdx, QWORD PTR work_buf_2_words$[rbp]
mov rcx, QWORD PTR work_buf_2$[rbp]
call DeallocateBlock
; 97 : DeallocateBlock((__UNIT_TYPE*)work_buf_1, work_buf_1_words);
mov rdx, QWORD PTR work_buf_1_words$[rbp]
mov rcx, QWORD PTR work_buf_1$[rbp]
call DeallocateBlock
; 98 : return (PMC_STATUS_OK);
xor eax, eax
$LN1@ConvertCar:
; 99 : }
mov rdi, rax
lea rcx, QWORD PTR [rbp-48]
lea rdx, OFFSET FLAT:ConvertCardinalNumber$rtcFrameData
call _RTC_CheckStackVars
mov rax, rdi
lea rsp, QWORD PTR [rbp+616]
pop rdi
pop rbp
ret 0
ConvertCardinalNumber ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; COMDAT _ROTATE_L_UNIT
_TEXT SEGMENT
x$ = 224
count$ = 232
_ROTATE_L_UNIT PROC ; COMDAT
; 481 : {
mov DWORD PTR [rsp+16], edx
mov QWORD PTR [rsp+8], rcx
push rbp
push rdi
sub rsp, 232 ; 000000e8H
lea rbp, QWORD PTR [rsp+32]
mov rdi, rsp
mov ecx, 58 ; 0000003aH
mov eax, -858993460 ; ccccccccH
rep stosd
mov rcx, QWORD PTR [rsp+264]
lea rcx, OFFSET FLAT:__6B0481B0_pmc_inline_func@h
call __CheckForDebuggerJustMyCode
; 482 : #ifdef _M_IX86
; 483 : return (_rotl(x, count));
; 484 : #elif defined(_M_X64)
; 485 : return (_rotl64(x, count));
mov eax, DWORD PTR count$[rbp]
movzx ecx, al
mov rax, QWORD PTR x$[rbp]
rol rax, cl
; 486 : #else
; 487 : #error unknown platform
; 488 : #endif
; 489 : }
lea rsp, QWORD PTR [rbp+200]
pop rdi
pop rbp
ret 0
_ROTATE_L_UNIT ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; COMDAT _DIVREM_UNIT
_TEXT SEGMENT
t$1 = 8
tv71 = 216
tv68 = 216
u_high$ = 256
u_low$ = 264
v$ = 272
r$ = 280
_DIVREM_UNIT PROC ; COMDAT
; 384 : {
mov QWORD PTR [rsp+32], r9
mov DWORD PTR [rsp+24], r8d
mov DWORD PTR [rsp+16], edx
mov DWORD PTR [rsp+8], ecx
push rbp
push rdi
sub rsp, 264 ; 00000108H
lea rbp, QWORD PTR [rsp+32]
mov rdi, rsp
mov ecx, 66 ; 00000042H
mov eax, -858993460 ; ccccccccH
rep stosd
mov ecx, DWORD PTR [rsp+296]
lea rcx, OFFSET FLAT:__6B0481B0_pmc_inline_func@h
call __CheckForDebuggerJustMyCode
; 385 : #ifdef _MSC_VER
; 386 : if (sizeof(__UNIT_TYPE_DIV) == sizeof(_UINT32_T))
xor eax, eax
cmp eax, 1
je SHORT $LN2@DIVREM_UNI
; 387 : {
; 388 : // 64bit/32bitの除算を行う組み込み関数は実装されていない。
; 389 : _UINT64_T t = _FROMWORDTODWORD(u_high, u_low);
mov edx, DWORD PTR u_low$[rbp]
mov ecx, DWORD PTR u_high$[rbp]
call _FROMWORDTODWORD
mov QWORD PTR t$1[rbp], rax
; 390 : *r = (_UINT32_T)(t % v);
mov eax, DWORD PTR v$[rbp]
mov QWORD PTR tv68[rbp], rax
xor edx, edx
mov rax, QWORD PTR t$1[rbp]
mov rcx, QWORD PTR tv68[rbp]
div rcx
mov rax, rdx
mov rcx, QWORD PTR r$[rbp]
mov DWORD PTR [rcx], eax
; 391 : return ((_UINT32_T)(t / v));
mov eax, DWORD PTR v$[rbp]
mov QWORD PTR tv71[rbp], rax
xor edx, edx
mov rax, QWORD PTR t$1[rbp]
mov rcx, QWORD PTR tv71[rbp]
div rcx
jmp SHORT $LN1@DIVREM_UNI
; 392 : }
jmp SHORT $LN3@DIVREM_UNI
$LN2@DIVREM_UNI:
; 393 : else if (sizeof(__UNIT_TYPE_DIV) == sizeof(_UINT64_T))
xor eax, eax
test eax, eax
je SHORT $LN4@DIVREM_UNI
; 394 : {
; 395 : // 以下の理由のため、MSVCでは 128bit/64bit の除算を実装できない。運用で回避すること。
; 396 : // ・(x64 に限らず) 除算の組み込み関数が用意されていない。
; 397 : // ・128bit 整数のデータ型が用意されていない。
; 398 : // ・x64 ではインラインアセンブラがサポートされていない。
; 399 : *r = 0;
mov rax, QWORD PTR r$[rbp]
mov DWORD PTR [rax], 0
; 400 : return (0);
xor eax, eax
jmp SHORT $LN1@DIVREM_UNI
; 401 : }
jmp SHORT $LN5@DIVREM_UNI
$LN4@DIVREM_UNI:
; 402 : else
; 403 : {
; 404 : // 未知のプラットフォームの場合はとりあえず適当なものを返す。
; 405 : *r = 0;
mov rax, QWORD PTR r$[rbp]
mov DWORD PTR [rax], 0
; 406 : return (0);
xor eax, eax
$LN5@DIVREM_UNI:
$LN3@DIVREM_UNI:
$LN1@DIVREM_UNI:
; 407 : }
; 408 : #elif defined(__GNUC__)
; 409 : __UNIT_TYPE q;
; 410 : if (sizeof(__UNIT_TYPE_DIV) == sizeof(_UINT32_T))
; 411 : __asm__("divl %4": "=a"(q), "=d"(*r) : "0"(u_low), "1"(u_high), "rm"(v));
; 412 : else if (sizeof(__UNIT_TYPE_DIV) == sizeof(_UINT64_T))
; 413 : __asm__("divq %4": "=a"(q), "=d"(*r) : "0"(u_low), "1"(u_high), "rm"(v));
; 414 : else
; 415 : {
; 416 : // 未知のプラットフォームの場合はとりあえず適当なものを返す。
; 417 : *r = 0;
; 418 : q = 0;
; 419 : }
; 420 : return (q);
; 421 : #else
; 422 : #error unknown compiler
; 423 : #endif
; 424 : }
lea rsp, QWORD PTR [rbp+232]
pop rdi
pop rbp
ret 0
_DIVREM_UNIT ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; COMDAT _DIVIDE_CEILING_UNIT
_TEXT SEGMENT
u$ = 224
v$ = 232
_DIVIDE_CEILING_UNIT PROC ; COMDAT
; 193 : {
mov QWORD PTR [rsp+16], rdx
mov QWORD PTR [rsp+8], rcx
push rbp
push rdi
sub rsp, 232 ; 000000e8H
lea rbp, QWORD PTR [rsp+32]
mov rdi, rsp
mov ecx, 58 ; 0000003aH
mov eax, -858993460 ; ccccccccH
rep stosd
mov rcx, QWORD PTR [rsp+264]
lea rcx, OFFSET FLAT:__6B0481B0_pmc_inline_func@h
call __CheckForDebuggerJustMyCode
; 194 : return ((u + v - 1) / v);
mov rax, QWORD PTR u$[rbp]
mov rcx, QWORD PTR v$[rbp]
lea rax, QWORD PTR [rax+rcx-1]
xor edx, edx
div QWORD PTR v$[rbp]
; 195 : }
lea rsp, QWORD PTR [rbp+200]
pop rdi
pop rbp
ret 0
_DIVIDE_CEILING_UNIT ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; COMDAT _FROMWORDTODWORD
_TEXT SEGMENT
value_high$ = 224
value_low$ = 232
_FROMWORDTODWORD PROC ; COMDAT
; 177 : {
mov DWORD PTR [rsp+16], edx
mov DWORD PTR [rsp+8], ecx
push rbp
push rdi
sub rsp, 232 ; 000000e8H
lea rbp, QWORD PTR [rsp+32]
mov rdi, rsp
mov ecx, 58 ; 0000003aH
mov eax, -858993460 ; ccccccccH
rep stosd
mov ecx, DWORD PTR [rsp+264]
lea rcx, OFFSET FLAT:__6B0481B0_pmc_inline_func@h
call __CheckForDebuggerJustMyCode
; 178 : return (((_UINT64_T)value_high << 32) | value_low);
mov eax, DWORD PTR value_high$[rbp]
shl rax, 32 ; 00000020H
mov ecx, DWORD PTR value_low$[rbp]
or rax, rcx
; 179 : }
lea rsp, QWORD PTR [rbp+200]
pop rdi
pop rbp
ret 0
_FROMWORDTODWORD ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; COMDAT _FILL_MEMORY_16
_TEXT SEGMENT
d$ = 224
x$ = 232
count$ = 240
_FILL_MEMORY_16 PROC ; COMDAT
; 149 : {
mov QWORD PTR [rsp+24], r8
mov WORD PTR [rsp+16], dx
mov QWORD PTR [rsp+8], rcx
push rbp
push rdi
sub rsp, 232 ; 000000e8H
lea rbp, QWORD PTR [rsp+32]
mov rdi, rsp
mov ecx, 58 ; 0000003aH
mov eax, -858993460 ; ccccccccH
rep stosd
mov rcx, QWORD PTR [rsp+264]
lea rcx, OFFSET FLAT:__6B0481B0_pmc_inline_func@h
call __CheckForDebuggerJustMyCode
; 150 : __stosw(d, x, count);
mov rdi, QWORD PTR d$[rbp]
movzx eax, WORD PTR x$[rbp]
mov rcx, QWORD PTR count$[rbp]
rep stosw
; 151 : }
lea rsp, QWORD PTR [rbp+200]
pop rdi
pop rbp
ret 0
_FILL_MEMORY_16 ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; COMDAT _ZERO_MEMORY_UNIT_DIV
_TEXT SEGMENT
tv64 = 192
d$ = 240
count$ = 248
_ZERO_MEMORY_UNIT_DIV PROC ; COMDAT
; 127 : {
mov QWORD PTR [rsp+16], rdx
mov QWORD PTR [rsp+8], rcx
push rbp
push rdi
sub rsp, 248 ; 000000f8H
lea rbp, QWORD PTR [rsp+32]
mov rdi, rsp
mov ecx, 62 ; 0000003eH
mov eax, -858993460 ; ccccccccH
rep stosd
mov rcx, QWORD PTR [rsp+280]
lea rcx, OFFSET FLAT:__6B0481B0_pmc_inline_func@h
call __CheckForDebuggerJustMyCode
; 128 : #ifdef _M_IX86
; 129 : __stosd((unsigned long*)d, 0, (unsigned long)count);
; 130 : #elif defined(_M_X64)
; 131 : #ifdef _MSC_VER
; 132 : __stosd((unsigned long*)d, 0, (unsigned long)count);
mov eax, DWORD PTR count$[rbp]
mov QWORD PTR tv64[rbp], rax
mov rdi, QWORD PTR d$[rbp]
xor eax, eax
mov rcx, QWORD PTR tv64[rbp]
rep stosd
; 133 : #elif defined(__GNUC__)
; 134 : __stosq(d, 0, count);
; 135 : #else
; 136 : #error unknown compiler
; 137 : #endif
; 138 : #else
; 139 : #error unknown platform
; 140 : #endif
; 141 : }
lea rsp, QWORD PTR [rbp+216]
pop rdi
pop rbp
ret 0
_ZERO_MEMORY_UNIT_DIV ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; COMDAT _COPY_MEMORY_UNIT_DIV
_TEXT SEGMENT
d$ = 224
s$ = 232
count$ = 240
_COPY_MEMORY_UNIT_DIV PROC ; COMDAT
; 77 : {
mov QWORD PTR [rsp+24], r8
mov QWORD PTR [rsp+16], rdx
mov QWORD PTR [rsp+8], rcx
push rbp
push rsi
push rdi
sub rsp, 224 ; 000000e0H
lea rbp, QWORD PTR [rsp+32]
mov rdi, rsp
mov ecx, 56 ; 00000038H
mov eax, -858993460 ; ccccccccH
rep stosd
mov rcx, QWORD PTR [rsp+264]
lea rcx, OFFSET FLAT:__6B0481B0_pmc_inline_func@h
call __CheckForDebuggerJustMyCode
; 78 : #ifdef _M_IX86
; 79 : __movsd((unsigned long *)d, (unsigned long *)s, (unsigned long)count);
; 80 : #elif defined(_M_X64)
; 81 : #ifdef _MSC_VER
; 82 : __movsd((unsigned long *)d, (unsigned long *)s, (unsigned long)count);
mov eax, DWORD PTR count$[rbp]
mov rdi, QWORD PTR d$[rbp]
mov rsi, QWORD PTR s$[rbp]
mov ecx, eax
rep movsd
; 83 : #elif defined(__GNUC__)
; 84 : __movsq(d, s, count);
; 85 : #else
; 86 : #error unknown compiler
; 87 : #endif
; 88 : #else
; 89 : #error unknown platform
; 90 : #endif
; 91 : }
lea rsp, QWORD PTR [rbp+192]
pop rdi
pop rsi
pop rbp
ret 0
_COPY_MEMORY_UNIT_DIV ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_uint_internal.h
; COMDAT AddToDIV64Counter
_TEXT SEGMENT
value$ = 224
AddToDIV64Counter PROC ; COMDAT
; 345 : {
mov DWORD PTR [rsp+8], ecx
push rbp
push rdi
sub rsp, 232 ; 000000e8H
lea rbp, QWORD PTR [rsp+32]
mov rdi, rsp
mov ecx, 58 ; 0000003aH
mov eax, -858993460 ; ccccccccH
rep stosd
mov ecx, DWORD PTR [rsp+264]
lea rcx, OFFSET FLAT:__7B8DBFC3_pmc_uint_internal@h
call __CheckForDebuggerJustMyCode
; 346 : _InterlockedExchangeAdd(&statistics_info.COUNT_DIV64, value);
lea rax, OFFSET FLAT:statistics_info+8
mov ecx, DWORD PTR value$[rbp]
lock add DWORD PTR [rax], ecx
; 347 : }
lea rsp, QWORD PTR [rbp+200]
pop rdi
pop rbp
ret 0
AddToDIV64Counter ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_uint_internal.h
; COMDAT AddToDIV32Counter
_TEXT SEGMENT
value$ = 224
AddToDIV32Counter PROC ; COMDAT
; 339 : {
mov DWORD PTR [rsp+8], ecx
push rbp
push rdi
sub rsp, 232 ; 000000e8H
lea rbp, QWORD PTR [rsp+32]
mov rdi, rsp
mov ecx, 58 ; 0000003aH
mov eax, -858993460 ; ccccccccH
rep stosd
mov ecx, DWORD PTR [rsp+264]
lea rcx, OFFSET FLAT:__7B8DBFC3_pmc_uint_internal@h
call __CheckForDebuggerJustMyCode
; 340 : _InterlockedExchangeAdd(&statistics_info.COUNT_DIV32, value);
lea rax, OFFSET FLAT:statistics_info+12
mov ecx, DWORD PTR value$[rbp]
lock add DWORD PTR [rax], ecx
; 341 : }
lea rsp, QWORD PTR [rbp+200]
pop rdi
pop rbp
ret 0
AddToDIV32Counter ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_uint_internal.h
; COMDAT IncrementDIV64Counter
_TEXT SEGMENT
IncrementDIV64Counter PROC ; COMDAT
; 322 : {
push rbp
push rdi
sub rsp, 232 ; 000000e8H
lea rbp, QWORD PTR [rsp+32]
mov rdi, rsp
mov ecx, 58 ; 0000003aH
mov eax, -858993460 ; ccccccccH
rep stosd
lea rcx, OFFSET FLAT:__7B8DBFC3_pmc_uint_internal@h
call __CheckForDebuggerJustMyCode
; 323 : _InterlockedIncrement(&statistics_info.COUNT_DIV64);
lea rax, OFFSET FLAT:statistics_info+8
lock inc DWORD PTR [rax]
; 324 : }
lea rsp, QWORD PTR [rbp+200]
pop rdi
pop rbp
ret 0
IncrementDIV64Counter ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_uint_internal.h
; COMDAT IncrementDIV32Counter
_TEXT SEGMENT
IncrementDIV32Counter PROC ; COMDAT
; 316 : {
push rbp
push rdi
sub rsp, 232 ; 000000e8H
lea rbp, QWORD PTR [rsp+32]
mov rdi, rsp
mov ecx, 58 ; 0000003aH
mov eax, -858993460 ; ccccccccH
rep stosd
lea rcx, OFFSET FLAT:__7B8DBFC3_pmc_uint_internal@h
call __CheckForDebuggerJustMyCode
; 317 : _InterlockedIncrement(&statistics_info.COUNT_DIV32);
lea rax, OFFSET FLAT:statistics_info+12
lock inc DWORD PTR [rax]
; 318 : }
lea rsp, QWORD PTR [rbp+200]
pop rdi
pop rbp
ret 0
IncrementDIV32Counter ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_tostring.c
; COMDAT PMC_ToString
_TEXT SEGMENT
nx$ = 8
result$ = 36
tv135 = 244
tv95 = 244
tv86 = 244
tv76 = 244
tv71 = 244
x$ = 288
buffer$ = 296
buffer_size$ = 304
format$ = 312
width$ = 320
format_option$ = 328
PMC_ToString PROC ; COMDAT
; 533 : {
$LN24:
mov BYTE PTR [rsp+32], r9b
mov QWORD PTR [rsp+24], r8
mov QWORD PTR [rsp+16], rdx
mov QWORD PTR [rsp+8], rcx
push rbp
push rdi
sub rsp, 312 ; 00000138H
lea rbp, QWORD PTR [rsp+48]
mov rdi, rsp
mov ecx, 78 ; 0000004eH
mov eax, -858993460 ; ccccccccH
rep stosd
mov rcx, QWORD PTR [rsp+344]
lea rcx, OFFSET FLAT:__3AA1CF5E_pmc_tostring@c
call __CheckForDebuggerJustMyCode
; 534 : if (x == NULL)
cmp QWORD PTR x$[rbp], 0
jne SHORT $LN4@PMC_ToStri
; 535 : return (PMC_STATUS_ARGUMENT_ERROR);
mov eax, -1
jmp $LN1@PMC_ToStri
$LN4@PMC_ToStri:
; 536 : if (buffer == NULL)
cmp QWORD PTR buffer$[rbp], 0
jne SHORT $LN5@PMC_ToStri
; 537 : return (PMC_STATUS_ARGUMENT_ERROR);
mov eax, -1
jmp $LN1@PMC_ToStri
$LN5@PMC_ToStri:
; 538 : if (format_option == NULL)
cmp QWORD PTR format_option$[rbp], 0
jne SHORT $LN6@PMC_ToStri
; 539 : format_option = &default_number_format_option;
lea rax, OFFSET FLAT:default_number_format_option
mov QWORD PTR format_option$[rbp], rax
$LN6@PMC_ToStri:
; 540 : NUMBER_HEADER* nx = (NUMBER_HEADER*)x;
mov rax, QWORD PTR x$[rbp]
mov QWORD PTR nx$[rbp], rax
; 541 : PMC_STATUS_CODE result;
; 542 : if ((result = CheckNumber(nx)) != PMC_STATUS_OK)
mov rcx, QWORD PTR nx$[rbp]
call CheckNumber
mov DWORD PTR result$[rbp], eax
cmp DWORD PTR result$[rbp], 0
je SHORT $LN7@PMC_ToStri
; 543 : return (result);
mov eax, DWORD PTR result$[rbp]
jmp $LN1@PMC_ToStri
$LN7@PMC_ToStri:
; 544 : switch (format)
movsx eax, BYTE PTR format$[rbp]
mov DWORD PTR tv71[rbp], eax
mov eax, DWORD PTR tv71[rbp]
sub eax, 68 ; 00000044H
mov DWORD PTR tv71[rbp], eax
cmp DWORD PTR tv71[rbp], 52 ; 00000034H
ja $LN12@PMC_ToStri
movsxd rax, DWORD PTR tv71[rbp]
lea rcx, OFFSET FLAT:__ImageBase
movzx eax, BYTE PTR $LN22@PMC_ToStri[rcx+rax]
mov eax, DWORD PTR $LN23@PMC_ToStri[rcx+rax*4]
add rax, rcx
jmp rax
$LN8@PMC_ToStri:
; 545 : {
; 546 : case 'n':
; 547 : case 'N':
; 548 : return (ToStringDN(nx, buffer, buffer_size, 'N', width >= 0 ? width : format_option->DecimalDigits, format_option));
cmp DWORD PTR width$[rbp], 0
jl SHORT $LN14@PMC_ToStri
mov eax, DWORD PTR width$[rbp]
mov DWORD PTR tv76[rbp], eax
jmp SHORT $LN15@PMC_ToStri
$LN14@PMC_ToStri:
mov rax, QWORD PTR format_option$[rbp]
mov eax, DWORD PTR [rax]
mov DWORD PTR tv76[rbp], eax
$LN15@PMC_ToStri:
mov rax, QWORD PTR format_option$[rbp]
mov QWORD PTR [rsp+40], rax
mov eax, DWORD PTR tv76[rbp]
mov DWORD PTR [rsp+32], eax
mov r9b, 78 ; 0000004eH
mov r8, QWORD PTR buffer_size$[rbp]
mov rdx, QWORD PTR buffer$[rbp]
mov rcx, QWORD PTR nx$[rbp]
call ToStringDN
jmp $LN1@PMC_ToStri
$LN9@PMC_ToStri:
; 549 : case 'x':
; 550 : return (ToStringX(nx, buffer, buffer_size, width >= 0 ? width : 0, format_option, 0));
cmp DWORD PTR width$[rbp], 0
jl SHORT $LN16@PMC_ToStri
mov eax, DWORD PTR width$[rbp]
mov DWORD PTR tv86[rbp], eax
jmp SHORT $LN17@PMC_ToStri
$LN16@PMC_ToStri:
mov DWORD PTR tv86[rbp], 0
$LN17@PMC_ToStri:
mov DWORD PTR [rsp+40], 0
mov rax, QWORD PTR format_option$[rbp]
mov QWORD PTR [rsp+32], rax
mov r9d, DWORD PTR tv86[rbp]
mov r8, QWORD PTR buffer_size$[rbp]
mov rdx, QWORD PTR buffer$[rbp]
mov rcx, QWORD PTR nx$[rbp]
call ToStringX
jmp $LN1@PMC_ToStri
$LN10@PMC_ToStri:
; 551 : case 'X':
; 552 : return (ToStringX(nx, buffer, buffer_size, width >= 0 ? width : 0, format_option, 1));
cmp DWORD PTR width$[rbp], 0
jl SHORT $LN18@PMC_ToStri
mov eax, DWORD PTR width$[rbp]
mov DWORD PTR tv95[rbp], eax
jmp SHORT $LN19@PMC_ToStri
$LN18@PMC_ToStri:
mov DWORD PTR tv95[rbp], 0
$LN19@PMC_ToStri:
mov DWORD PTR [rsp+40], 1
mov rax, QWORD PTR format_option$[rbp]
mov QWORD PTR [rsp+32], rax
mov r9d, DWORD PTR tv95[rbp]
mov r8, QWORD PTR buffer_size$[rbp]
mov rdx, QWORD PTR buffer$[rbp]
mov rcx, QWORD PTR nx$[rbp]
call ToStringX
jmp SHORT $LN1@PMC_ToStri
$LN11@PMC_ToStri:
; 553 : case 'd':
; 554 : case 'D':
; 555 : return (ToStringDN(nx, buffer, buffer_size, 'D', width >= 0 ? width : 0, format_option));
cmp DWORD PTR width$[rbp], 0
jl SHORT $LN20@PMC_ToStri
mov eax, DWORD PTR width$[rbp]
mov DWORD PTR tv135[rbp], eax
jmp SHORT $LN21@PMC_ToStri
$LN20@PMC_ToStri:
mov DWORD PTR tv135[rbp], 0
$LN21@PMC_ToStri:
mov rax, QWORD PTR format_option$[rbp]
mov QWORD PTR [rsp+40], rax
mov eax, DWORD PTR tv135[rbp]
mov DWORD PTR [rsp+32], eax
mov r9b, 68 ; 00000044H
mov r8, QWORD PTR buffer_size$[rbp]
mov rdx, QWORD PTR buffer$[rbp]
mov rcx, QWORD PTR nx$[rbp]
call ToStringDN
jmp SHORT $LN1@PMC_ToStri
$LN12@PMC_ToStri:
; 556 : default:
; 557 : return (PMC_STATUS_ARGUMENT_ERROR);
mov eax, -1
$LN1@PMC_ToStri:
; 558 : }
; 559 : }
lea rsp, QWORD PTR [rbp+264]
pop rdi
pop rbp
ret 0
npad 1
$LN23@PMC_ToStri:
DD $LN11@PMC_ToStri
DD $LN8@PMC_ToStri
DD $LN10@PMC_ToStri
DD $LN9@PMC_ToStri
DD $LN12@PMC_ToStri
$LN22@PMC_ToStri:
DB 0
DB 4
DB 4
DB 4
DB 4
DB 4
DB 4
DB 4
DB 4
DB 4
DB 1
DB 4
DB 4
DB 4
DB 4
DB 4
DB 4
DB 4
DB 4
DB 4
DB 2
DB 4
DB 4
DB 4
DB 4
DB 4
DB 4
DB 4
DB 4
DB 4
DB 4
DB 4
DB 0
DB 4
DB 4
DB 4
DB 4
DB 4
DB 4
DB 4
DB 4
DB 4
DB 1
DB 4
DB 4
DB 4
DB 4
DB 4
DB 4
DB 4
DB 4
DB 4
DB 3
PMC_ToString ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_tostring.c
; COMDAT Initialize_ToString
_TEXT SEGMENT
feature$ = 224
Initialize_ToString PROC ; COMDAT
; 562 : {
$LN3:
mov QWORD PTR [rsp+8], rcx
push rbp
push rdi
sub rsp, 232 ; 000000e8H
lea rbp, QWORD PTR [rsp+32]
mov rdi, rsp
mov ecx, 58 ; 0000003aH
mov eax, -858993460 ; ccccccccH
rep stosd
mov rcx, QWORD PTR [rsp+264]
lea rcx, OFFSET FLAT:__3AA1CF5E_pmc_tostring@c
call __CheckForDebuggerJustMyCode
; 563 : default_number_format_option.DecimalDigits = 2;
mov DWORD PTR default_number_format_option, 2
; 564 : lstrcpyW(default_number_format_option.GroupSeparator, L",");
lea rdx, OFFSET FLAT:??_C@_13DEFPDAGF@?$AA?0@
lea rcx, OFFSET FLAT:default_number_format_option+4
call QWORD PTR __imp_lstrcpyW
; 565 : lstrcpyW(default_number_format_option.DecimalSeparator, L".");
lea rdx, OFFSET FLAT:??_C@_13JOFGPIOO@?$AA?4@
lea rcx, OFFSET FLAT:default_number_format_option+10
call QWORD PTR __imp_lstrcpyW
; 566 : lstrcpy(default_number_format_option.GroupSizes, "3");
lea rdx, OFFSET FLAT:??_C@_01EKENIIDA@3@
lea rcx, OFFSET FLAT:default_number_format_option+28
call QWORD PTR __imp_lstrcpyA
; 567 : lstrcpyW(default_number_format_option.PositiveSign, L"+");
lea rdx, OFFSET FLAT:??_C@_13KJIIAINM@?$AA?$CL@
lea rcx, OFFSET FLAT:default_number_format_option+16
call QWORD PTR __imp_lstrcpyW
; 568 : lstrcpyW(default_number_format_option.NegativeSign, L"-");
lea rdx, OFFSET FLAT:??_C@_13IMODFHAA@?$AA?9@
lea rcx, OFFSET FLAT:default_number_format_option+22
call QWORD PTR __imp_lstrcpyW
; 569 :
; 570 : return (PMC_STATUS_OK);
xor eax, eax
; 571 : }
lea rsp, QWORD PTR [rbp+200]
pop rdi
pop rbp
ret 0
Initialize_ToString ENDP
_TEXT ENDS
END
| 22.69524 | 219 | 0.673243 |
812f77902cfea734aab87dced552f179c290da67 | 1,116 | asm | Assembly | projects/08/ProgramFlow/FibonacciSeries/FibonacciSeries.asm | nadavWeisler/Nand2Tetris | 59c2e616c45044c15b99aeb8459d39b59e5e07ba | [
"MIT"
] | null | null | null | projects/08/ProgramFlow/FibonacciSeries/FibonacciSeries.asm | nadavWeisler/Nand2Tetris | 59c2e616c45044c15b99aeb8459d39b59e5e07ba | [
"MIT"
] | null | null | null | projects/08/ProgramFlow/FibonacciSeries/FibonacciSeries.asm | nadavWeisler/Nand2Tetris | 59c2e616c45044c15b99aeb8459d39b59e5e07ba | [
"MIT"
] | null | null | null | @1
D=A
@ARG
A=M+D
D=M
@SP
A=M
M=D
@SP
M=M+1
@1
D=A
@THIS
D=D+A
@13
M=D
@SP
M=M-1
A=M
D=M
@13
A=M
M=D
@0
D=A
@SP
A=M
M=D
@SP
M=M+1
@0
D=A
@THAT
D=D+M
@13
M=D
@SP
M=M-1
A=M
D=M
@13
A=M
M=D
@1
D=A
@SP
A=M
M=D
@SP
M=M+1
@1
D=A
@THAT
D=D+M
@13
M=D
@SP
M=M-1
A=M
D=M
@13
A=M
M=D
@0
D=A
@ARG
A=M+D
D=M
@SP
A=M
M=D
@SP
M=M+1
@2
D=A
@SP
A=M
M=D
@SP
M=M+1
@SP
M=M-1
A=M
D=M
A=A-1
M=M-D
@0
D=A
@ARG
D=D+M
@13
M=D
@SP
M=M-1
A=M
D=M
@13
A=M
M=D
(MAIN_LOOP_START)
@0
D=A
@ARG
A=M+D
D=M
@SP
A=M
M=D
@SP
M=M+1
@SP
M=M-1
A=M
D=M
A=A-1
@COMPUTE_ELEMENT
D;JNE
@END_PROGRAM
0;JMP
(COMPUTE_ELEMENT)
@0
D=A
@THAT
A=M+D
D=M
@SP
A=M
M=D
@SP
M=M+1
@1
D=A
@THAT
A=M+D
D=M
@SP
A=M
M=D
@SP
M=M+1
@SP
M=M-1
A=M
D=M
A=A-1
M=M+D
@2
D=A
@THAT
D=D+M
@13
M=D
@SP
M=M-1
A=M
D=M
@13
A=M
M=D
@1
D=A
@THIS
A=A+D
D=M
@SP
A=M
M=D
@SP
M=M+1
@1
D=A
@SP
A=M
M=D
@SP
M=M+1
@SP
M=M-1
A=M
D=M
A=A-1
M=M+D
@1
D=A
@THIS
D=D+A
@13
M=D
@SP
M=M-1
A=M
D=M
@13
A=M
M=D
@0
D=A
@ARG
A=M+D
D=M
@SP
A=M
M=D
@SP
M=M+1
@1
D=A
@SP
A=M
M=D
@SP
M=M+1
@SP
M=M-1
A=M
D=M
A=A-1
M=M-D
@0
D=A
@ARG
D=D+M
@13
M=D
@SP
M=M-1
A=M
D=M
@13
A=M
M=D
@MAIN_LOOP_START
0;JMP
(END_PROGRAM)
| 4.669456 | 17 | 0.532258 |
4e712a196ca001bc3b1fa0816e084da81b228810 | 7,396 | asm | Assembly | smsq/q68/driver/snd_ssss.asm | olifink/smsqe | c546d882b26566a46d71820d1539bed9ea8af108 | [
"BSD-2-Clause"
] | null | null | null | smsq/q68/driver/snd_ssss.asm | olifink/smsqe | c546d882b26566a46d71820d1539bed9ea8af108 | [
"BSD-2-Clause"
] | null | null | null | smsq/q68/driver/snd_ssss.asm | olifink/smsqe | c546d882b26566a46d71820d1539bed9ea8af108 | [
"BSD-2-Clause"
] | null | null | null | ; Q68 SMSQ Sampled Sound System V1.02 2017-2018 W. Lenerz
; 1.02 improved queue handing
; partially based on
; Q40 SMSQ Sampled Sound System V2.00 1999 Tony Tebby
section sound
xdef ssss_init
xref cpy_mmod
xref gu_achpp
xref snd_nam
include 'dev8_keys_java'
include 'dev8_keys_q68'
include 'dev8_keys_iod'
include 'dev8_keys_q40'
include 'dev8_keys_qdos_sms'
include 'dev8_keys_68000'
include 'dev8_smsq_smsq_base_keys'
include 'dev8_mac_proc'
; a0 <- a3 at start of poll routine
; 8 (a0) iod_pllk
; 12(a0) iod_plad
; 16(a0) 'SSSS' <- A3 when called from user vectors
; 20(a0) Ptr to vectors
; 24(a0) RTE
; ...
; 30 (a0) qstart
ssss_spec equ 16
ssss_sema equ 30 -ssss_spec ; relative to A3 in user vectors
ssss_qstart equ ssss_sema+4
ssss_qin equ ssss_qstart+4
ssss_qout equ ssss_qin+4
ssss_qend equ ssss_qout+4
ssss_qbase equ ssss_qend+4
ssss.len equ 2*100*1024
ssss_end equ ssss_qbase+ssss.len+ssss_spec
;+++
; SSSS initialisation.
; Setup the queues, vectors and link in the polling routine.
; This is not quite standard. The polling routine link is offset by ssss_spec,
; the special space needed for the SSSS mrker and the vector.
;
; a0-a3 scratch
; status return standard
;---
ssss_init
move.l #ssss_end,d0 ; allocate a block for the queue
move.l d0,d1 ; keep mem needed
jsr gu_achpp
bne out
move.l a0,a3
move.l #'wolf',(a0)
add.l #ssss_spec,a3 ; link header - leave room for special space
move.l a0,d0
add.l d1,d0 ; point to end of space
subq.l #8,d0 ; a little margin
move.l d0,ssss_qend(a3) ; this is the end of the queue
lea ssss_qbase(a3),a2 ; base
move.l a2,ssss_qstart(a3) ; is also start of space for queue
move.l a2,ssss_qin(a3) ; and incoming
move.l a2,ssss_qout(a3) ; and outgoing
lea ssss_vector,a2
move.l (a2),(a3)+ ; 0 ssss flag
move.l a2,(a3)+ ; 4 facility vector
move.w #$4e73,(a3) ; 8 RTE just in case this actually does get called 14
lea exv_i4,a1
move.l a3,(a1) ; store interrupt vector
move.l a0,-(a7)
lea poll_hdr,a0
jsr cpy_mmod ; use polling routine as minimodule
move.l 4(a0),a1
move.l (a7)+,a0
lea iod_plad(a0),a3 ; frame interrupt polling
move.l a1,(a3)
lea iod_pllk(a0),a0 ; link it in
moveq #sms.lpol,d0
trap #do.sms2
;;;;; debug code ;;;;; ----------------------------
genif debug = 1
cmp.l #'gold',q68_jflg ; SMSQ68mulator?
bne.s ssss_jmp
move.w #0,$d000
moveq #jt5.sssi,d0
dc.w jva.trp5
endgen
;!!!!!!!!!!!!! ------------------------------------
ssss_jmp
jmp snd_nam
;+++++++++++++++++++++++
; Interrupt server : this is called on every frame interrupt. It must take
; 2 bytes out of the queue and send them to the DAC, one for left and one for
; the right channel.
; Q68 needs sound to be output to the DAC in words, where the high byte
; is the actuel sound byte, the low byte is 0.
; To reach a 20 Khz rate, I need to move (2 * )400 words on every frame inter-
; rupt.
; The first word needs to be sent to the right channel, the second to the
; left channel (inverse of Q40).
;
; d0 s
; d7 s
;
;-------------------------
poll_hdr
dc.w ssss_poll-*
dc.w poll_end-*
ssss_poll
add.l #ssss_spec,a3 ; point to start of my data ('SSSS')
tst.b ssss_sema(a3) ; is sound being killed?
beq.s do_snd ; ... no
subq.b #1,ssss_sema(a3) ; avoid sound being killed forever
rts
do_snd move.l ssss_qout(a3),a2 ; next out
move.l #1023,d2 ; go around 1024 times max
move.l ssss_qin(a3),a1 ; where next byte inserted goes
move.l ssss_qend(a3),a4
sndlp
cmp.l a2,a1 ; any bytes left to copy?
beq.s ssss_done ; ... no, done
tst.b sound_full ; can DAC handle more sound?
bne.s ssss_done ; ... no, done
cmp.l a2,a4 ; are we at end of buffer ?
beq.s set_bse ; ... yes; wrap to start of buffer
move.w (a2)+,d0 ; ... no : left/right sound 00LR
no_z move.b d0,sound_right
rol.w #8,d0
move.b d0,sound_left
cont dbf d2,sndlp ; 1024 times max
ssss_done
;------------------------------------------
;;;; debug code ;;;;;
genif debug = 1
cmp.l #'gold',q68_jflg ; SMSQ68mulator?
bne.s setx ; no
move.l ssss_qout(a3),d0
cmp.l d0,a2 ; was anything changed?
beq.s setx ; no, so no need to call add routine
sds moveq #10,d0
dc.w $a005
endgen
;
;-------------------------------------------
setx move.l a2,ssss_qout(a3) ; new queue out ptr
out rts
; restart at base
set_bse
lea ssss_qbase(a3),a2 ; end of queue space reached, so...
bra.s sndlp ; start at top
poll_end
; utility vector
ssss_vector
dc.l 'SSSS'
bra.s sss_add1
nop
bra.s sss_setm
nop
bra.s sss_addm
nop
bra.l sss_kill
; nop
bra.l sss_sample
; add a sample
sss_add1
move.l ssss_qin(a3),a1
cmp.l ssss_qend(a3),a1 ; qin at end?
beq.s sssa_chk ; ... yes, check add possible
ssss_add
move.b d1,(a1)+ ; put samples in
move.b d2,(a1)+
sssa_updt
move.l a1,ssss_qin(a3) ; update in pointer
sssa_rs rts
sssa_chk ; qin is at end
cmp.l ssss_qout(a3),a1 ; is qout there, too?
bne.s sssa_rs ; ... no, so I can't add!
move.l ssss_qstart(a3),a1 ; .... yes, start at top
bra.s ssss_add
; set up to add multiple samples
; on return a1 pointo to where bytes may be inserted, up to a2
sss_setm
move.l ssss_qin(a3),a1 ; next in
move.l ssss_qout(a3),a2 ; next out
cmp.l a1,a2 ; queue empty?
bne.s ck_wrap ; no, check wrap ->
; here in and out were the same : queue is empty
move.l ssss_qend(a3),a2 ; always copy to end of buffer
cmp.l a2,a1 ; were in/out at end aleady?
beq.s ssss1 ; yes, need to wrap, the whole buffer is available again
ssssx rts
; here both in and out were at end of buffer; reset in to start of buffer
ssss1 move.l ssss_qstart(a3),a1 ; the whole buffer is available again
rts
; check whether we're wrapped or not
ck_wrap bgt.s ssss2 ; we were wrapped ->
; here we weren't wrapped, in > out
cmp.l ssss_qend(a3),a1 ; is in at end of buffer?
bne.s ssss3 ; no, so we can fill to there
; here in is at the end of the buffer already, can we wrap?
cmp.l ssss_qstart(a3),a2 ; is out at start of buffer?
beq.s occupied ; ..yes, the entire buffer is...
; ... taken, nothing is free ->
move.l ssss_qstart(a3),a1 ; ..no, we're actually wrappping now
; here we are wrapped around, the free space is from in to out-2
ssss2 subq.l #2,a2 ;
rts
ssss3 move.l ssss_qend(a3),a2 ; always copy to end of buffer
rts
occupied
move.l ssss_qin(a3),a1 ; next in
move.l a1,a2 ; are the same, don't copy!!!!!
rts
; add multiple samples (new qin ptr)
sss_addm
cmp.l ssss_qend(a3),a1 ; end of queue
blt.s sss_aset ; ... no
move.l ssss_qend(a3),ssss_qin(a3) ; ... back to beginning
rts
sss_aset
move.l a1,ssss_qin(a3)
rts
; kill the sound
sss_kill
st ssss_sema(a3) ; show the sound is being killed
move.l ssss_qstart(a3),ssss_qin(a3)
move.l ssss_qstart(a3),ssss_qout(a3)
sf ssss_sema(a3)
rts
; movem.l d1/d2/a1/a2,-(sp)
; move.l ssss_qin(a3),a2 ; the bytes will go here
;
; moveq #$ffffff80,d1
; moveq #$ffffff80,d2
;sss_kloop
; bsr sss_add1 ; add zero
; beq.s sss_kloop ; keep on until queue is not full
;
; move.l a2,ssss_qout(a3) ; one sample only in queue
; movem.l (sp)+,d1/d2/a1/a2
; rts
; return length of samples in queue
sss_sample
move.l ssss_qin(a3),d0
sub.l ssss_qout(a3),d0
bpl.s sss_sset
add.l ssss_qend(a3),d0
sub.l ssss_qstart(a3),d0
sss_sset
lsr.l #1,d0
rts
end
| 24.735786 | 78 | 0.664954 |
99123e3a7091eb238a8ac458b7ddb1291997cc19 | 3,856 | asm | Assembly | hm4_Xiaojie_Zhu.asm | XiaojieZhuForThree/Mips_Codes | 855ac583a5df2cea680500cf97a9686c69964409 | [
"Unlicense"
] | null | null | null | hm4_Xiaojie_Zhu.asm | XiaojieZhuForThree/Mips_Codes | 855ac583a5df2cea680500cf97a9686c69964409 | [
"Unlicense"
] | null | null | null | hm4_Xiaojie_Zhu.asm | XiaojieZhuForThree/Mips_Codes | 855ac583a5df2cea680500cf97a9686c69964409 | [
"Unlicense"
] | null | null | null | .data
fileName: .asciiz "homework4.txt"
textmessage: .asciiz "The quick brown fox jumped over the lazy river."
inputBuffer: .space 100
parityBuffer: .space 100
outputOK: .asciiz "The data is intact."
outputCorrupt: .asciiz "The data has been corrupted!"
.text
open_file: li $v0, 13 # created a new file named "homework4.txt"
la $a0, fileName
li $a1, 1
li $a2, 0
syscall
move $s6, $v0
write_file: li $v0, 15 # write the sentence "The quick brown fox jumped over the lazy river."
move $a0, $s6 # to the newly created txt file.
la $a1, textmessage
li $a2, 47
syscall
exit_file: li $v0, 16 # exit the file
move $a0, $s6
syscall
open_created: li $v0, 13 # open the created file
la $a0, fileName
li $a1, 0
li $a2, 0
syscall
move $s6, $v0
read_file: li $v0, 14 # and read the contents of the txt to the inputBuffer
move $a0, $s6
la $a1, inputBuffer
li $a2, 100
syscall
exit_it: li $v0, 16 # after reading the contents, close the file safely
move $a0, $s6
syscall
getReady: # load both the inputBuffer and the parityBuffer
la $t0, inputBuffer
la $t1, parityBuffer
li $s7, 2 # set 2 as a dividend for checking the odd/even
addi $s2, $zero, 7 # used to count the number of loops executed
circle: lbu $t2, 0($t0) # determine each byte in the inputBuffer for parity,
beq $t2, $zero, checkReady # when reaching the end, start checking the parity
setParity:
add $s1, $zero, $zero # used to record the number of 1s
add $s0, $t2, $zero # copy the byte to $s0
add $s3, $zero, $zero # set up a counter
count:
beq $s3, $s2, checkOdds # traverse each bit of the byte to determine if it's 1 or 0, and
andi $s4, $s0, 1 # record the number of 1s.
add $s1, $s1, $s4
addi $s3, $s3, 1
srl $s0, $s0, 1
j count # keep the loop until after 7 times.
checkOdds:
divu $s1, $s7 # divide the number of 1s by 2
mfhi $s6
bne $s6, $zero, addnumber # and ch if the remainder is 1 or 0
addi $s0, $t2, 0
j writeBuffer
addnumber:
addi $s0, $t2, 128 # if 1, add 1 to the 7th bit, else don't change
writeBuffer:
sb $s0, 0($t1) # store the 8-bit data to the new buffer after adding parity
addOne:
addi $t0, $t0, 1
addi $t1, $t1, 1
j circle
checkReady: # after set all the parity and store it to the new data, check if
la $t1, parityBuffer # the parity is correct
addi $s2, $zero, 8 # used to count the number of loops executed for each byte
checkParity:
lbu $t2, ($t1) # check the parity byte by byte
beq $t2, $zero, okay # when reaching the finally loop, means the data is good
checkBegins:
add $s1, $zero, $zero # used to record the number of 1s
add $s0, $t2, $zero # copy the byte to $s0
add $s3, $zero, $zero # set up a counter
countOne:
beq $s3, $s2, checkValid # when reach 8 loops, determine the odd/even of the 1s
andi $s4, $s0, 1
add $s1, $s1, $s4
addi $s3, $s3, 1
srl $s0, $s0, 1
j countOne
checkValid: # if the 1s are odd, means the data has been compromised, otherwise
divu $s1, $s7 # the data is good
mfhi $s6
bne $s6, $zero, corrupted
addi $t1, $t1, 1
j checkParity
okay: li $v0, 4 # used to output the results
la $a0, outputOK
syscall
j Exit
corrupted: li $v0, 4
la $a0, outputCorrupt
syscall
Exit: # used to exit the file
li $v0, 10
syscall
# TestRuns:
# 1. First, do not manually set the breakpoint and run the program:
# The data is intact.
# -- program is finished running --
# 2. Second, we set a breakpoint at checkReady(line 88). Then change the data manually, in my case,
# I changed the data 0x65f66fa0 to 0x75f66fa0, which will change the number of 1s, and thus the program will print:
# The data has been corrupted!
# -- program is finished running --
| 27.942029 | 115 | 0.650156 |
24da4fb88f68ab67202fe828e23f58496ff1f24c | 443 | asm | Assembly | oeis/204/A204696.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/204/A204696.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/204/A204696.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A204696: G.f.: (32*x^7/(1-2*x) + 16*x^5 + 24*x^6)/(1-2*x^2).
; 0,0,0,0,0,16,24,64,112,256,480,1024,1984,4096,8064,16384,32512,65536,130560,262144,523264,1048576,2095104,4194304,8384512,16777216,33546240,67108864,134201344,268435456,536838144,1073741824,2147418112,4294967296,8589803520,17179869184,34359476224,68719476736,137438429184,274877906944
trn $0,2
seq $0,14236 ; Expansion of g.f.: 2*x*(1-x)/((1-2*x)*(1-2*x^2)).
div $0,4
mul $0,8
| 55.375 | 286 | 0.724605 |
ad5b7e9759a8b44181217bb682ec6e8648c7255d | 580 | asm | Assembly | oeis/163/A163672.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/163/A163672.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/163/A163672.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A163672: Triangle T(n,m) = 2mn + m + n + 7 read by rows.
; Submitted by Christian Krause
; 11,14,19,17,24,31,20,29,38,47,23,34,45,56,67,26,39,52,65,78,91,29,44,59,74,89,104,119,32,49,66,83,100,117,134,151,35,54,73,92,111,130,149,168,187,38,59,80,101,122,143,164,185,206,227,41,64,87,110,133,156,179,202,225,248,271,44,69,94,119,144,169,194,219,244,269,294,319,47,74,101,128,155,182,209,236,263,290,317,344,371,50,79,108,137,166,195,224,253,282
mul $0,2
add $0,1
lpb $0
mov $2,$0
sub $0,2
trn $0,$1
add $1,2
add $2,2
lpe
add $1,1
mul $1,$2
mov $0,$1
div $0,2
add $0,7
| 30.526316 | 354 | 0.655172 |
fae156f713c3343afe5d0eee31977701911d9c5c | 5,656 | asm | Assembly | Src/extras.asm | slowcorners/Minimal-FORTH | afb1bcac3018f5a72c5dcafa37c5dee497382d15 | [
"MIT"
] | 1 | 2021-06-13T18:31:19.000Z | 2021-06-13T18:31:19.000Z | Src/extras.asm | slowcorners/Minimal-FORTH | afb1bcac3018f5a72c5dcafa37c5dee497382d15 | [
"MIT"
] | null | null | null | Src/extras.asm | slowcorners/Minimal-FORTH | afb1bcac3018f5a72c5dcafa37c5dee497382d15 | [
"MIT"
] | null | null | null | ; ----------------------------------------------------------------------
; EXTRAS (added by SlowCorners)
HNOOP: DB ^4 "NOO" ^'P' ; ***** NOOP
DW HARROW
NOOP: DW DOCOL
NOO10: DW SEMIS
HASCII: DB ^^5 "ASCI" ^'I' ; ***** ASCII
DW HNOOP
ASCII: DW DOCOL BL WORD HERE ONEP
DW CAT STATE AT ZBRAN +ASCI10
DW LITER
ASCI10: DW SEMIS
HBSLAS: DB ^^1 ^'\' ; ***** \
DW HASCII
BSLAS: DW DOCOL BLK AT ZBRAN +BSLA10
DW IN AT DUP CL MOD CL SWAP
DW SUB PLUS IN STORE BRAN +BSLA20
BSLA10: DW ONE WORD
BSLA20: DW SEMIS
HTASK: DB ^4 "TAS" ^'K' ; ***** TASK
DW HBSLAS
TASK: DW DOCOL BUILD ZERO COMMA
DW LIT NOOP COMMA ZERO COMMA DOES
DOTAS: DW SEMIS
HRUNS: DB ^4 "RUN" ^'S' ; ***** RUNS
DW HTASK
RUNS: DW DOCOL TICK CFA SWAP TWOP STORE SEMIS
; To be added as primaries: STOP AFTER NOW
HRQUIR: DB ^7 "REQUIR" ^'E' ; ***** REQUIRE
DW HRUNS
RQUIR: DW DOCOL DFIND BRAN +RQUI10
DW TDROP BRAN +RQUI20
RQUI10: DW LIT 34 ERROR
RQUI20: DW SEMIS
HBOUND: DB ^2 ">" ^'<' ; ***** ><
DW HRQUIR
BOUND: DW DOCOL TOR MAX FROMR MIN SEMIS
HDOER: DB ^4 "DOE" ^'R' ; ***** DOER
DW HBOUND
DOER: DW DOCOL BUILD LIT NOO10 COMMA DOES
DODOR: DW AT TOR SEMIS
HMAKE: DB ^4 "MAK" ^'E' ; ***** MAKE
DW HDOER
MAKE: DW DOCOL DFIND ZEQU ZERO QERR DROP TWOP DFIND
DW ZEQU ZERO QERR DROP STATE AT ZBRAN +MAKE10
DW LITER LITER COMP STORE BRAN +MAKE20
MAKE10: DW SWAP STORE
MAKE20: DW SEMIS
HPTRUE: DB ^6 "(TRUE" ^')' ; ***** (TRUE)
DW HMAKE
PTRUE: DW DOCOL
PTR10: DW MONE SEMIS
HTRUE: DB ^4 "TRU" ^'E' ; ***** TRUE
DW HPTRUE
TRUE: DW DODOE DODOR PTR10
HFALSE: DB ^5 "FALS" ^'E' ; ***** FALSE
DW HTRUE
FALSE: DW DOCON 0
HPEMIT: DB ^6 "(EMIT" ^')' ; ***** (EMIT)
DW HFALSE
PEMIT: DW DOCOL
PEM10: DW XEMIT ONE OUT PSTOR SEMIS
;
XEMIT: DW XEMIT0
XEMIT0: JPS _POP1 ; Get character
LDA R1.0 ; Send char to terminal
OUT ; :
JPA NEXT ; Done
HEMIT: DB ^4 "EMI" ^'T' ; ***** EMIT
DW HPEMIT
EMIT: DW DODOE DODOR PEM10
HPKEY: DB ^5 "(KEY" ^')' ; ***** (KEY)
DW HEMIT
PKEY: DW DOCOL
PKE10: DW PQTER ZBRAN +PKE10
DW XKEY SEMIS
;
XKEY: DW XKEY0
XKEY0: CLB R1.1 ; Clear MSB of result
LDA CHIN ; Any character buffered?
CPI 0xFF ; :
BNE XKEY10 ; YES: We use the buffered character
INP ; NO: Read whatever is on the input port
XKEY10: STA R1.0 ; YES: This is in any case the result
LDI 0xFF ; Mark input buffer as empty
STA CHIN ; :
JPA PUSH ; Done
HKEY: DB ^3 "KE" ^'Y' ; ***** KEY
DW HPKEY
KEY: DW DODOE DODOR PKE10
HPQTER: DB ^11 "(?TERMINAL" ^')' ; ***** (?TERMINAL)
DW HKEY
PQTER: DW DOCOL
PQT10: DW XQTER SEMIS
;
XQTER: DW XQTER0
XQTER0: CLW R1 ; Default FALSE to return
INP ; Get char from terminal
CPI 0xFF ; Did we get a character?
BEQ QTER10 ; NO: Return FALSE
STA CHIN ; YES: Put into buffer
DEW R1 ; Make default FALSE into TRUE
QTER10: JPA PUSH ; Push R1; NEXT
HQTERM: DB ^9 "?TERMINA" ^'L' ; ***** ?TERMINAL
DW HPQTER
QTERM: DW DODOE DODOR PQT10
HCR: DB ^2 "C" ^'R' ; ***** CR
DW HQTERM
CR: DW DOCOL EOL ONEP CAT DDUP ZBRAN +CR10
DW EMIT
CR10: DW EOL CAT DDUP ZBRAN +CR20
DW EMIT
CR20: DW SEMIS
HWIN: DB ^7 "WINDOW" ^'S' ; ***** WINDOWS
DW HCR
WIN: DW DOCOL LIT 0x0D0A EOL STORE
DW LIT 0x0D ENTER STORE
DW LIT 0x7F DEL STORE SEMIS
HUNIX: DB ^4 "UNI" ^'X' ; ***** UNIX
DW HWIN
UNIX: DW DOCOL LIT 0x000A EOL STORE
DW LIT 0x0A ENTER STORE
DW LIT 0x08 DEL STORE SEMIS
HEXPEC: DB ^6 "EXPEC" ^'T' ; ***** EXPECT
DW HUNIX
EXPEC: DW DODOE DODOR PEXP05
HPQUOT: DB ^3 '(' '"' ^')' ; ***** (")
DW HEXPEC
PQUOT: DW DOCOL R DUP CAT ONEP
DW FROMR PLUS TOR SEMIS
HQUOTE: DB ^^1 ^'"' ; ***** "
DW HPQUOT
QUOTE: DW DOCOL LIT CH_DQUOTE STATE AT ZBRAN +QUOT10
DW COMP PQUOT WORD HERE
DW CAT ONEP ALLOT BRAN +QUOT20
QUOT10: DW WORD HERE PAD OVER CAT ONEP CMOVE PAD
QUOT20: DW SEMIS
| 34.487805 | 76 | 0.416902 |
118cc72eff7ebe720aa87d804661602695cfb7ce | 3,328 | asm | Assembly | maps/MountMoon.asm | Ebernacher90/pokecrystal-allworld | 5d623c760e936842cf92563912c5bd64dd69baef | [
"blessing"
] | null | null | null | maps/MountMoon.asm | Ebernacher90/pokecrystal-allworld | 5d623c760e936842cf92563912c5bd64dd69baef | [
"blessing"
] | null | null | null | maps/MountMoon.asm | Ebernacher90/pokecrystal-allworld | 5d623c760e936842cf92563912c5bd64dd69baef | [
"blessing"
] | null | null | null | object_const_def ; object_event constants
const MOUNTMOON_SILVER
MountMoon_MapScripts:
db 2 ; scene scripts
scene_script .RivalEncounter ; SCENE_DEFAULT
scene_script .DummyScene ; SCENE_FINISHED
db 0 ; callbacks
.RivalEncounter:
prioritysjump .RivalBattle
end
.DummyScene:
end
.RivalBattle:
turnobject PLAYER, RIGHT
showemote EMOTE_SHOCK, PLAYER, 15
special FadeOutMusic
pause 15
applymovement MOUNTMOON_SILVER, MountMoonSilverMovementBefore
playmusic MUSIC_RIVAL_ENCOUNTER
opentext
writetext MountMoonSilverTextBefore
waitbutton
closetext
checkevent EVENT_GOT_TOTODILE_FROM_ELM
iftrue .Totodile
checkevent EVENT_GOT_CHIKORITA_FROM_ELM
iftrue .Chikorita
winlosstext MountMoonSilverTextWin, MountMoonSilverTextLoss
setlasttalked MOUNTMOON_SILVER
loadtrainer RIVAL2, RIVAL2_1_TOTODILE
startbattle
dontrestartmapmusic
reloadmapafterbattle
sjump .FinishBattle
.Totodile:
winlosstext MountMoonSilverTextWin, MountMoonSilverTextLoss
setlasttalked MOUNTMOON_SILVER
loadtrainer RIVAL2, RIVAL2_1_CHIKORITA
startbattle
dontrestartmapmusic
reloadmapafterbattle
sjump .FinishBattle
.Chikorita:
winlosstext MountMoonSilverTextWin, MountMoonSilverTextLoss
setlasttalked MOUNTMOON_SILVER
loadtrainer RIVAL2, RIVAL2_1_CYNDAQUIL
startbattle
dontrestartmapmusic
reloadmapafterbattle
sjump .FinishBattle
.FinishBattle:
playmusic MUSIC_RIVAL_AFTER
opentext
writetext MountMoonSilverTextAfter
waitbutton
closetext
applymovement MOUNTMOON_SILVER, MountMoonSilverMovementAfter
disappear MOUNTMOON_SILVER
setscene SCENE_FINISHED
setevent EVENT_BEAT_RIVAL_IN_MT_MOON
playmapmusic
end
MountMoonSilverMovementBefore:
step LEFT
step LEFT
step LEFT
step_end
MountMoonSilverMovementAfter:
step RIGHT
step RIGHT
step DOWN
step DOWN
step DOWN
step DOWN
step DOWN
step_end
MountMoonSilverTextBefore:
text "<……> <……> <……>"
para "What do you mean"
line "if I beat you and"
cont "steal all of your"
cont "#MON, HAHAHAHA!"
para "You little wimp of"
line "your fuc...g"
cont "mother b...h!"
para "I will be the"
line "greatest Thief."
para "No one will stop"
line "me."
para "Let's see how"
line "strong you are!"
done
MountMoonSilverTextWin:
text "<……> <……> <……>"
para "I thought I will"
line "kill you and steal"
cont "your #MON"
para "could it be..."
para "...No!!!! "
done
MountMoonSilverTextAfter:
text "<……> <……> <……>"
para "Next time I will"
line "beat you and steal"
cont "your #MON!"
para "I've said it to"
line "you. My BOYFRIEND"
cont "will do all for"
cont "me. Now I'm a"
cont "THIEF"
done
MountMoonSilverTextLoss:
text "<……> <……> <……>"
para "HAHAHAHA, I have"
line "kill you."
para "Your #MON,"
line "are mine."
para "I will be the"
line "greates Thief"
cont "ever!"
done
MountMoon_MapEvents:
db 0, 0 ; filler
db 8 ; warp events
warp_event 3, 3, ROUTE_3, 1
warp_event 15, 15, ROUTE_4, 1
warp_event 13, 3, MOUNT_MOON, 7
warp_event 15, 11, MOUNT_MOON, 8
warp_event 25, 5, MOUNT_MOON_SQUARE, 1
warp_event 25, 15, MOUNT_MOON_SQUARE, 2
warp_event 25, 3, MOUNT_MOON, 3
warp_event 25, 13, MOUNT_MOON, 4
db 0 ; coord events
db 0 ; bg events
db 1 ; object events
object_event 7, 3, SPRITE_NADINE, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_MT_MOON_RIVAL
| 19.692308 | 138 | 0.763522 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.