hexsha
stringlengths 40
40
| size
int64 6
1.05M
| ext
stringclasses 3
values | lang
stringclasses 1
value | max_stars_repo_path
stringlengths 4
232
| max_stars_repo_name
stringlengths 7
106
| max_stars_repo_head_hexsha
stringlengths 40
40
| max_stars_repo_licenses
listlengths 1
7
| max_stars_count
int64 1
33.5k
⌀ | max_stars_repo_stars_event_min_datetime
stringlengths 24
24
⌀ | max_stars_repo_stars_event_max_datetime
stringlengths 24
24
⌀ | max_issues_repo_path
stringlengths 4
232
| max_issues_repo_name
stringlengths 7
106
| max_issues_repo_head_hexsha
stringlengths 40
40
| max_issues_repo_licenses
listlengths 1
7
| max_issues_count
int64 1
37.5k
⌀ | max_issues_repo_issues_event_min_datetime
stringlengths 24
24
⌀ | max_issues_repo_issues_event_max_datetime
stringlengths 24
24
⌀ | max_forks_repo_path
stringlengths 4
232
| max_forks_repo_name
stringlengths 7
106
| max_forks_repo_head_hexsha
stringlengths 40
40
| max_forks_repo_licenses
listlengths 1
7
| max_forks_count
int64 1
12.6k
⌀ | max_forks_repo_forks_event_min_datetime
stringlengths 24
24
⌀ | max_forks_repo_forks_event_max_datetime
stringlengths 24
24
⌀ | content
stringlengths 6
1.05M
| avg_line_length
float64 1.16
19.7k
| max_line_length
int64 2
938k
| alphanum_fraction
float64 0
1
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f4592493c3d0d5b92441a412253872e3038e2622
| 15,351
|
asm
|
Assembly
|
main.asm
|
JetSetIlly/tiatune
|
46dca842be30adfc3a21bef23fe427eed3ed9efd
|
[
"MIT"
] | 16
|
2018-01-21T22:26:25.000Z
|
2022-01-31T01:35:59.000Z
|
main.asm
|
JetSetIlly/tiatune
|
46dca842be30adfc3a21bef23fe427eed3ed9efd
|
[
"MIT"
] | 3
|
2018-01-12T13:47:23.000Z
|
2022-01-09T18:49:32.000Z
|
main.asm
|
JetSetIlly/tiatune
|
46dca842be30adfc3a21bef23fe427eed3ed9efd
|
[
"MIT"
] | 3
|
2018-01-12T10:07:13.000Z
|
2022-01-05T16:15:48.000Z
|
;TIAtune
;Atari 2600 music player
;by utz 10'2017 * irrlichtproject.de
;improved by Thomas Jentzsch & utz 01'2021
; Ideas:
; + get rid of initial CLC
; + keep variables in X/Y
; + inline waveform code into RAM
; o precalulate waveforms
; + poly4_5
; - R1813 -> poly4
; + rowLen via TIMxxT
; x variable tempo (using fractional math here too)
; + use wait cycles
; TODOs:
; + adapt FreqDiv tables to faster loop
; + adapt tone lengths to faster loop (see TEMPO)
; + sounds rough, maybe preserve X/Y between notes
; + test T1024T (too short for single loop, use two, nested loops)
; + test divs and resulting frequencies
; Legend: + done, o partially done, - todo, x canceled
;wave AUDCx range type
;0 4,5 c-0..gis-8 square div2
;1 8 c-0..gis-8 poly9 div2
;2 1 c-0..a-5 poly4 r1813
;3 6,A c-0..gis-4 r1813 div31
;4 7,9 c-0..gis-4 poly5 div31
;5 3 poly5_4 div31
;6 2 poly4 r1813
;Assembler switches
NTSC = 0 ; else use PAL frequencies
VISUALS = 0 ; add some visuals (both channels) (+38 bytes)
DEBUG = 1 ; enable debug output
MUSIC = 0 ; chose track (0..2)
; calculate TEMPO (do not change!)
!if NTSC {
HZ = 1193182
} else {
HZ = 1182298
}
;Calculation based on tick duration [ms] = 2500/BPM
TDIV = BPM * 1024 * 10
TEMPO = (HZ * 25 + TDIV / 2) / TDIV ; * 1024 = shortest note length
!to "tiatune.bin", plain
!sl "tiatune.sym"
!cpu 6510
!source "vcs.h"
!source "def.h"
;POLY5_4 = 5
;R1813_POLY4 = 6
* = $f000, invisible
!pseudopc $80 {
seqOffs !byte 0 ;sequence offset in bytes
ptnOffs !byte 0 ;offset in bytes
ptrOffsEnd !byte 0 ;end of pattern offset
ptnPtrL !byte 0 ;temporary
ptnPtrH !byte 0 ;temporary
rowLenH !byte 0 ;low value in timer
saveX = ptnOffs ;temporary
saveY !byte 0 ;temporary
VAR_END
}
!macro NextPoly ~.val, .bits, .tap1, .tap2 {
!if (.val & .tap1) != 0 XOR (.val & .tap2) != 0 {
!set .or = 1 << (.bits - 1)
} else {
!set .or = 0
}
!set .val = (.val >> 1) | .or
}
;!macro CreatePoly1 .val, .bits, .tap1, .tap2 {
; !set .addr = * + (1 << (.bits - 3))
; !set .pat = 0
; !for .i, 2, 1 << .bits {
; !set .pat = (.pat >> 1) | ((.val & 1) * $80)
; !if (.i & 7) = 0 {
; * = .addr - (.i >> 3), invisible ; store in reverse order
; !byte <.pat
; !set .pat = 0
; }
; +NextPoly ~.val, .bits, .tap1, .tap2
; }
; * = .addr
;}
!macro CreatePoly5_4 .val5, .val4 {
!set .length = ((1 << 5) - 1) * ((1 << 4) - 1)
!set .addr = * + ((.length + 7) >> 3)
!set .pat = 0
!for .i, 1+6, .length+6 {
; !warn .val4 & 1, .i
!set .pat = (.pat >> 1) | ((.val4 & 1) * $80)
!if (.i & 7) = 0 {
* = .addr - (.i >> 3), invisible ; store in reverse order
; !warn .i, *, <.pat
!byte <.pat
!set .pat = 0
}
+NextPoly ~.val5, 5, 1, 4
!if (.val5 & 1) = 1 {
+NextPoly ~.val4, 4, 1, 2
}
}
* = .addr - ((.i + 7) >> 3), invisible ; store in reverse order
; !warn .i, *, <.pat
!byte <.pat
* = .addr
}
!macro CreateR1813_Poly4 .val4 {
!set .length = ((1 << 4) - 1) * 31
!set .addr = * + ((.length + 7) >> 3)
; !warn *, ", addr ", .addr, ", length ", .length
!set .pat = 0
!set .c = 7
!for .i, 1, 15 {
!for .j, 1, 13 {
; !warn .val4 & 1, .i
!set .pat = (.pat >> 1) | ((.val4 & 1) * $80)
!set .c = .c + 1
!if (.c & 7) = 0 {
* = .addr - (.c >> 3), invisible ; store in reverse order
; !warn .c, *, <.pat
!byte <.pat
!set .pat = 0
}
}
+NextPoly ~.val4, 4, 1, 2
!for .j, 1, 18 {
; !warn .val4 & 1, .i
!set .pat = (.pat >> 1) | ((.val4 & 1) * $80)
!set .c = .c + 1
!if (.c & 7) = 0 {
* = .addr - (.c >> 3), invisible ; store in reverse order
; !warn .c, *, <.pat
!byte <.pat
!set .pat = 0
}
}
+NextPoly ~.val4, 4, 1, 2
}
; !set .pat = (.pat >> 1) | ((.val4 & 1) * $80)
* = .addr - ((.c + 7) >> 3), invisible ; store in reverse order
; !warn .c, *, <.pat
; !byte <.pat
* = .addr
}
!macro PrevPoly ~.val, .tap1, .tap2 {
!if (.val & .tap1) != 0 XOR (.val & .tap2) != 0 {
!set .or = 1
} else {
!set .or = 0
}
!set .val = (.val << 1) | .or
}
!macro CreatePoly .init, .count, .tap1, .tap2 {
!set .val = .init
!set .idx = 0
!for .x, 0, .count {
+PrevPoly ~.val, .tap1, .tap2
!set .pat = .pat << 1
!if (.val & 1) = 1 {
!set .pat = .pat | 1
}
!set .idx = .idx + 1
!if .idx = 8 {
!set .idx = 0
!byte <.pat
!set .pat = 0
}
}
!set .pat = .pat << 1
!byte <.pat
}
* = $f000
!zone main
PatternTbl
;Note: 1st bit of a pattern MUST always be set!
!ifdef SQUARE {
SquarePtn
!byte %01010101 }
!ifdef POLY9 {
Poly9Ptn
+CreatePoly 1, 510, 8, 256 }
!ifdef POLY4 {
Poly4Ptn
+CreatePoly 1, 14, 1, 8 }
!ifdef R1813 {
R1813Ptn
!byte %00000000, %00000111, %11111111, %11111110 }
!ifdef POLY5 {
Poly5Ptn
+CreatePoly 1, 30, 2, 16 }
!ifdef POLY5_4 {
Poly5_4Ptn
+CreatePoly5_4 %00001, %0001 }
!ifdef R1813_POLY4 {
R1813_Poly4Ptn
+CreateR1813_Poly4 %0001 }
PatternPtr
!ifdef SQUARE { !byte <SquarePtn }
!ifdef POLY9 { !byte <Poly9Ptn }
!ifdef POLY4 { !byte <Poly4Ptn }
!ifdef R1813 { !byte <R1813Ptn }
!ifdef POLY5 { !byte <Poly5Ptn }
!ifdef POLY5_4 { !byte <Poly5_4Ptn }
!ifdef R1813_POLY4 { !byte <R1813_Poly4Ptn }
InitVal
!ifdef SQUARE { !byte $01 }
!ifdef POLY9 { !byte $02 }
!ifdef POLY4 { !byte $02 }
!ifdef R1813 { !byte $02 }
!ifdef POLY5 { !byte $02 }
!ifdef POLY5_4 { !byte $40 }
!ifdef R1813_POLY4 { !byte $40 }
ResetVal
!ifdef SQUARE { !byte 1-1 }
!ifdef POLY9 { !byte 64-1 }
!ifdef POLY4 { !byte 2-1 }
!ifdef R1813 { !byte 4-1 }
!ifdef POLY5 { !byte 4-1 }
!ifdef POLY5_4 { !byte 59-1 }
!ifdef R1813_POLY4 { !byte 59-1 }
CodeStart
Reset
;reset code adapted from Hard2632
- ;clear TIA regs, most RAM, set SP to $00ff
lsr
tsx
pha
bne -
cld
!if VISUALS {
;position and size players
nop
nop
dex
stx CTRLPF
sta RESP0
stx NUSIZ0
stx NUSIZ1
stx REFP0 ;use P1 to reverse direction
sta RESP1
}
;relocate player to zeropage
ldx #PlayerLength - 1
-
lda PlayerCode,x
sta VAR_END,x
dex
bpl -
ReadPtn
sty saveY
ldy ptnOffs ;saveX and ptnOffs share the same RAM byte!
stx saveX
cpy ptrOffsEnd ;if offset at next pattern, play next in sequence
bne .skipReadSeq
;read next entry in sequence
ldy seqOffs
ldx sequence,y
beq Reset ;if 0, loop
lda pattern_lookup_lo-1,x
sta ptnPtrL
eor #$ff ;CF==1!
adc pattern_lookup_lo,x
sta ptrOffsEnd ;begin of next pattern - begin of current pattern
txa
lsr
tax
lda pattern_lookup_hi,x
bcc .even
lsr
lsr
lsr
lsr
.even
ora #$10 ;bit4 must be set!
sta ptnPtrH
inc seqOffs
ldy #0
.skipReadSeq
lda (ptnPtrL),y ;ctrl byte
lsr
sta rowLenH
bcs .noCh0Reload
iny
lax (ptnPtrL),y ;wave0/vol0
lsr
lsr
lsr
sta+1 Vol0
txa
and #$7
tax
lda PatternPtr,x
sta+1 Pattern0
lda InitVal,x
sta+1 Init0
lda ResetVal,x
sta+1 Reset0
cmp saveX
bcs .xOK
sta saveX
.xOK
iny
lax (ptnPtrL),y ;note0
lda note_table_lo,x
sta+1 Freq0L
lda note_table_hi,x
sta+1 Freq0H
.noCh0Reload
lsr rowLenH
bcs .noCh1Reload
iny
lax (ptnPtrL),y ;wave1/vol1
lsr
lsr
lsr
sta+1 Vol1
txa
and #$7
tax
lda PatternPtr,x
sta+1 Pattern1
lda InitVal,x
sta+1 Init1
lda ResetVal,x
sta+1 Reset1
cmp saveY
bcs .yOK
sta saveY
.yOK
iny
lax (ptnPtrL),y ;note1
lda note_table_lo,x
sta+1 Freq1L
lda note_table_hi,x
sta+1 Freq1H
.noCh1Reload
ldx saveX ;saveX and ptnOffs share the same RAM byte!
iny
sty ptnOffs
ldy saveY
; clc
jmp PlayNote
PlayerCode = *
!pseudopc VAR_END { ;actual player runs on zeropage
.loopH ;7
lda #TEMPO ;2 define tick length, which is
sta T1024T ;4 constant, even if loop is exited
dec rowLenH ;5
bpl PlayNote ;3/2= 14/13
jmp ReadPtn ;3 (RTS would work here too)
;---------------------------------------
.resetIdx1 ;11 assumes 1st bit set
Reset1 = *+1
ldy #3 ;2 = 13 0,1,3,63(,58)
Init1 = *+1
lda #$02 ;2 or $01/$40 (square/poly4->5)
sta+1 Mask1 ;3
nop ;2
.loadV1
Vol1 = *+1
lda #0 ;2
.zeroV1
sta AUDV1 ;3 = 12
ContinueCh1
lda TIMINT ;4
bmi .loopH ;2/3= 6/7
; avg 88 cycles (was 114)
;---------------------------------------
PlayNote
.sum0L = *+1
lda #0 ;2
Freq0L = *+1
adc #0 ;2 CF==0!
sta .sum0L ;3
.sum0H = *+1
lda #0 ;2
Freq0H = *+1
adc #0 ;2
sta+1 .sum0H ;3 = 14
bcs .waitCh0 ;2/3= 2/3
;create waveform from table
;assumes 1st bit of waveform always set
Mask0 = *+1
lda #1 ;2
bpl .contMask0 ;2/3
lda #$01 ;2
dex ;2
bmi .resetIdx0 ;2/3
.cont0
sta+1 Mask0 ;3 = 13
Pattern0 = *+1
and PatternTbl,x ;4
bne .loadV0 ;2/3
beq .zeroV0 ;3
.contMask0 ;5
asl ;2
bcc .cont0 ;3
.resetIdx0 ;11 assumes 1st bit set
Reset0 = *+1
ldx #3 ;2 = 13 0,1,3,63(,58)
Init0 = *+1
lda #$02 ;2 or $01/$40 (square/poly4->5)
sta+1 Mask0 ;3
nop ;2
.loadV0
Vol0 = *+1
lda #0 ;2
.zeroV0
sta AUDV0 ;3 = 12
; 31 bytes
ContinueCh0
;---------------------------------------
.sum1L = *+1
lda #0 ;2
Freq1L = *+1
adc #0 ;2 CF==0!
sta .sum1L ;3
.sum1H = *+1
lda #0 ;2
Freq1H = *+1
adc #0 ;2
sta+1 .sum1H ;3 = 14
bcs .waitCh1 ;2/3= 2/3
Mask1 = *+1
lda #1 ;2
bpl .contMask1 ;2/3
lda #$01 ;2
dey ;2
bmi .resetIdx1 ;2/3
.cont1
sta+1 Mask1 ;3 = 13
Pattern1 = *+1
and PatternTbl,y ;4
bne .loadV1 ;2/3
beq .zeroV1 ;3
.contMask1 ;5
asl ;2
bcc .cont1 ;3
;---------------------------------------
!if VISUALS {
.waitCh0 ;3
jmp WaitCh0 ;24 = 27
.waitCh1 ;3
jmp WaitCh1 ;24 = 27
} else { ;{
.waitCh0 ;3
brk ;21
nop ; 2 bytes skipped
.waitCh1 ;3
brk ;21
bcc ContinueCh0 ;3 = 27
bcc ContinueCh1 ;3 = 27
} ;}
; 7 bytes RAM free (2 used by stack if VISUALS disabled)
}
PlayerLength = * - PlayerCode
!if VISUALS {
WaitCh0 ;3
lda+1 Mask0 ;3
sta GRP0 ;3
lda+1 Freq0H ;3
asl ;2 spread colors better
asl ;2
sta COLUP0 ;3
clc ;2
jmp ContinueCh0 ;3 = 24
WaitCh1 ;3
lda+1 Mask1 ;3
sta GRP1 ;3
lda+1 Freq1H ;3
asl ;2 spread colors better
asl ;2
sta COLUP1 ;3
clc ;2
jmp ContinueCh1 ;3 = 24
} else { ;{
Wait ;7
pla ;4
nop ;2
clc ;2
rts ;6 = 21
} ;}
FrequencyStart
!if NTSC {
;$10000 - Frequency * 256 * 256 / (1193181.67 / (88 + 14/256)) * div (div = 2, 15, 31)
!if MUSIC = 0 { !source "note_table_ntsc.h" }
!if MUSIC = 1 { !source "note_table_ntsc_2.h" }
!if MUSIC = 2 { !source "note_table_ntsc_std.h" }
} else {
;$10000 - Frequency * 256 * 256 / (1182298 / (88 + 14/256)) * div (div = 2, 15, 31)
!if MUSIC = 0 { !source "note_table_pal.h" }
!if MUSIC = 1 { !source "note_table_pal_2.h" }
!if MUSIC = 2 { !source "note_table_pal_std.h" }
}
FrequencyEnd
!zone musicdata
musicData
!if 0 { ;{
sequence
!byte 1
!byte 0
pattern_lookup_lo
!byte <ptn0
!byte <ptnEnd
pattern_lookup_hi
!byte >ptn0
ptn0
!byte $1d, (%1111<<3)|POLY5_4, 3
!byte $1d, (%1111<<3)|POLY5_4, 2
!byte $1d, (%1111<<3)|POLY5_4, 1
ptnEnd
} else { ;}
!if MUSIC = 0 { !source "music.asm" }
!if MUSIC = 1 { !source "music_2.asm" }
!if MUSIC = 2 { !source "music_std.asm" }
}
!if DEBUG {
!ifndef PASS1 {
PASS1
} else {
!ifndef PASS2 {
PASS2
} else {
!ifndef PASS3 {
PASS3
}}}
!zone debug
!ifdef PASS3 {
!warn TEMPO, " = TEMPO"
!warn CodeStart - PatternTbl, " wave form bytes"
!warn FrequencyStart - CodeStart, " + code bytes"
!warn FrequencyEnd - FrequencyStart, " + frequency bytes"
!warn FrequencyEnd - $f000, " = player bytes"
!warn * - musicData, " music bytes"
!warn $fffc - *, " bytes free"
}
}
* = $fffc
!word Reset ; RESET
!if VISUALS {
!word $0000 ; IRQ
} else {
!word Wait
}
| 25.930743
| 86
| 0.43691
|
e0ce95fd9c2ab7746ff4b05059397a6f6664c598
| 616
|
asm
|
Assembly
|
libsrc/strings/memswap_callee.asm
|
grancier/z180
|
e83f35e36c9b4d1457e40585019430e901c86ed9
|
[
"ClArtistic"
] | 8
|
2017-01-18T12:02:17.000Z
|
2021-06-12T09:40:28.000Z
|
libsrc/strings/memswap_callee.asm
|
grancier/z180
|
e83f35e36c9b4d1457e40585019430e901c86ed9
|
[
"ClArtistic"
] | 1
|
2017-03-06T07:41:56.000Z
|
2017-03-06T07:41:56.000Z
|
libsrc/strings/memswap_callee.asm
|
RC2014Z80/z88dk
|
e5b9447b970e5fae26544b6d8aa5957c98ba0e6a
|
[
"ClArtistic"
] | 3
|
2017-03-07T03:19:40.000Z
|
2021-09-15T17:59:19.000Z
|
; void __CALLEE__ *memswap_callee(void *s1, void *s2, uint n)
; swap N bytes in the two memory regions
; 01.2007 aralbrec
SECTION code_clib
PUBLIC memswap_callee
PUBLIC _memswap_callee
PUBLIC ASMDISP_MEMSWAP_CALLEE
.memswap_callee
._memswap_callee
pop hl
pop bc
pop de
ex (sp),hl
; enter : bc = uint n
; de = void *s2
; hl = void *s1
; uses : af, bc, de, hl
.asmentry
ld a,b
or c
ret z
push hl
.loop
ld a,(de)
ldi
dec hl
ld (hl),a
inc hl
jp pe, loop
pop hl
ret
DEFC ASMDISP_MEMSWAP_CALLEE = # asmentry - memswap_callee
| 14
| 61
| 0.618506
|
8d4e323a68b8011939e586441c5dea2aa3fc630e
| 99
|
asm
|
Assembly
|
gfx/pokemon/nidorina/anim.asm
|
Dev727/ancientplatinum
|
8b212a1728cc32a95743e1538b9eaa0827d013a7
|
[
"blessing"
] | 28
|
2019-11-08T07:19:00.000Z
|
2021-12-20T10:17:54.000Z
|
gfx/pokemon/nidorina/anim.asm
|
Dev727/ancientplatinum
|
8b212a1728cc32a95743e1538b9eaa0827d013a7
|
[
"blessing"
] | 13
|
2020-01-11T17:00:40.000Z
|
2021-09-14T01:27:38.000Z
|
gfx/pokemon/nidorina/anim.asm
|
Dev727/ancientplatinum
|
8b212a1728cc32a95743e1538b9eaa0827d013a7
|
[
"blessing"
] | 22
|
2020-05-28T17:31:38.000Z
|
2022-03-07T20:49:35.000Z
|
frame 3, 20
setrepeat 2
frame 0, 06
frame 1, 12
frame 0, 03
frame 2, 06
dorepeat 2
endanim
| 11
| 12
| 0.666667
|
04613485480e9eb74494c13adfe910523cf4f5f5
| 850
|
asm
|
Assembly
|
libsrc/_DEVELOPMENT/arch/zx/bifrost_h/z80/asm_BIFROSTH_findAttrH.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 640
|
2017-01-14T23:33:45.000Z
|
2022-03-30T11:28:42.000Z
|
libsrc/_DEVELOPMENT/arch/zx/bifrost_h/z80/asm_BIFROSTH_findAttrH.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 1,600
|
2017-01-15T16:12:02.000Z
|
2022-03-31T12:11:12.000Z
|
libsrc/_DEVELOPMENT/arch/zx/bifrost_h/z80/asm_BIFROSTH_findAttrH.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 215
|
2017-01-17T10:43:03.000Z
|
2022-03-23T17:25:02.000Z
|
; ----------------------------------------------------------------
; Z88DK INTERFACE LIBRARY FOR THE BIFROST* ENGINE - RELEASE 1.2/L
;
; See "bifrost_h.h" for further details
; ----------------------------------------------------------------
; INCLUDED IN C INTERFACE DO NOT ADD TO LIST FILE
SECTION code_clib
SECTION code_bifrost_h
PUBLIC asm_BIFROSTH_findAttrH
asm_BIFROSTH_findAttrH:
; L=lin
; C=col
ld h,0
add hl,hl ; HL=lin*2
ld de,57696 ; reference 'attribs' inside BIFROST*
add hl,de
ld e,(hl)
inc l
ld d,(hl) ; DE=59075 + (lin-16)*41
ld l,c ; L=col
ld h,$e4 ; reference 'deltas' inside BIFROST*
ld l,(hl) ; L=delta
ld h,0 ; HL=delta
add hl,de ; HL=59075 + (lin-16)*41 + delta
ret
| 27.419355
| 66
| 0.464706
|
ad845215dc5a7fdb06a7293b4f858420a7c01784
| 691
|
asm
|
Assembly
|
libsrc/_DEVELOPMENT/arch/ts2068/misc/z80/asm_tshc_scroll_up_pix.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 640
|
2017-01-14T23:33:45.000Z
|
2022-03-30T11:28:42.000Z
|
libsrc/_DEVELOPMENT/arch/ts2068/misc/z80/asm_tshc_scroll_up_pix.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 1,600
|
2017-01-15T16:12:02.000Z
|
2022-03-31T12:11:12.000Z
|
libsrc/_DEVELOPMENT/arch/ts2068/misc/z80/asm_tshc_scroll_up_pix.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 215
|
2017-01-17T10:43:03.000Z
|
2022-03-23T17:25:02.000Z
|
; ===============================================================
; 2017
; ===============================================================
;
; void tshc_scroll_up_pix(uchar prows, uchar pix)
;
; Scroll screen upward by number of pixels.
;
; ===============================================================
SECTION code_clib
SECTION code_arch
PUBLIC asm_tshc_scroll_up_pix
PUBLIC asm0_tshc_scroll_up_pix
EXTERN asm_zx_scroll_up_pix
EXTERN asm0_zx_scroll_up_pix
defc asm_tshc_scroll_up_pix = asm_zx_scroll_up_pix
defc asm0_tshc_scroll_up_pix = asm0_zx_scroll_up_pix
; enter : de = number of pixel rows to scroll upward by
; l = screen byte
;
; uses : af, bc, de, hl
| 25.592593
| 65
| 0.545586
|
53ee6aa20e90991ea40aff57e38f8801d855629e
| 415
|
asm
|
Assembly
|
programs/oeis/204/A204008.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | 1
|
2021-03-15T11:38:20.000Z
|
2021-03-15T11:38:20.000Z
|
programs/oeis/204/A204008.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/204/A204008.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | null | null | null |
; A204008: Symmetric matrix based on f(i,j) = max{3i+j-3,i+3j-3}, by antidiagonals.
; 1,4,4,7,5,7,10,8,8,10,13,11,9,11,13,16,14,12,12,14,16,19,17,15,13,15,17,19,22,20,18,16,16,18,20,22,25,23,21,19,17,19,21,23,25,28,26,24,22,20,20,22,24,26,28,31,29,27,25,23,21,23,25,27,29,31,34,32,30
mul $0,2
mov $1,4
lpb $0
add $0,3
add $2,$1
add $2,2
mov $1,$2
trn $2,$0
trn $0,$1
add $0,$2
lpe
add $1,$0
sub $1,3
| 24.411765
| 199
| 0.6
|
951cf0c0798f185336d9769edaa231b1196867da
| 710
|
asm
|
Assembly
|
libsrc/graphics/w_xorplot.asm
|
Toysoft/z88dk
|
f930bef9ac4feeec91a07303b79ddd9071131a24
|
[
"ClArtistic"
] | 8
|
2017-01-18T12:02:17.000Z
|
2021-06-12T09:40:28.000Z
|
libsrc/graphics/w_xorplot.asm
|
Toysoft/z88dk
|
f930bef9ac4feeec91a07303b79ddd9071131a24
|
[
"ClArtistic"
] | 1
|
2017-03-06T07:41:56.000Z
|
2017-03-06T07:41:56.000Z
|
libsrc/graphics/w_xorplot.asm
|
Toysoft/z88dk
|
f930bef9ac4feeec91a07303b79ddd9071131a24
|
[
"ClArtistic"
] | 3
|
2017-03-07T03:19:40.000Z
|
2021-09-15T17:59:19.000Z
|
;
; Z88 Graphics Functions - Small C+ stubs
;
; Written around the Interlogic Standard Library
;
; Stubs Written by D Morris - 30/9/98
;
; Wide resolution (WORD based parameters) version by Stefano Bodrato
;
; $Id: w_xorplot.asm,v 1.4 2016-06-22 22:40:19 dom Exp $
;
;Usage: xorplot(int x, int y)
SECTION code_clib
PUBLIC xorplot
PUBLIC _xorplot
EXTERN swapgfxbk
EXTERN swapgfxbk1
EXTERN w_xorpixel
.xorplot
._xorplot
pop bc
pop de
pop hl
push hl
push de
push bc
call swapgfxbk
call w_xorpixel
jp swapgfxbk1
| 19.722222
| 74
| 0.546479
|
c8084ea1b66933baccf29a7708174412f0fe346d
| 747
|
asm
|
Assembly
|
klc3-manual/examples/get_sign/klc3-out-0/get_sign.asm
|
liuzikai/klc3
|
0c7c1504158f1cce3e6bff32f69b4cb3067cffff
|
[
"NCSA"
] | null | null | null |
klc3-manual/examples/get_sign/klc3-out-0/get_sign.asm
|
liuzikai/klc3
|
0c7c1504158f1cce3e6bff32f69b4cb3067cffff
|
[
"NCSA"
] | null | null | null |
klc3-manual/examples/get_sign/klc3-out-0/get_sign.asm
|
liuzikai/klc3
|
0c7c1504158f1cce3e6bff32f69b4cb3067cffff
|
[
"NCSA"
] | null | null | null |
; A BUGGY program that sets R0 to -1, 0 or 1 based on the sign of the input number stored at memory x4000.
; liuzikai 2020.04.30
.ORIG x3000 ; program starts at x3000
LDI R1, DATA_ADDR ; load the input number into R1
BRn NEGATIVE_CASE
BRz ZERO_CASE
POSITIVE_CASE
ADD R0, R0, #1 ; BUG: use uninitialized register R0
HALT
ZERO_CASE
AND R0, R0, #0 ; set R0 to 0
; although R0 is used as the operand, this is not a bug
; as the result is always 0 regardless of R0
HALT
NEGATIVE_CASE
AND R0, R0, #0
ADD R0, R0, #-1
RET ; BUG: RET in main code (should use HALT)
DATA_ADDR .FILL x4000 ; address where the input number stores
.END
| 31.125
| 106
| 0.618474
|
68ec117beb5c971755f0d28b0e2c5e044c295293
| 3,971
|
asm
|
Assembly
|
bahamut/source/base56.asm
|
higan-emu/bahamut-lagoon-translation-kit
|
6f08de5b92b597c0b9ecebd485cc975b99acfc13
|
[
"0BSD"
] | 2
|
2021-08-15T04:10:10.000Z
|
2021-08-15T20:14:13.000Z
|
bahamut/source/base56.asm
|
higan-emu/bahamut-lagoon-translation-kit
|
6f08de5b92b597c0b9ecebd485cc975b99acfc13
|
[
"0BSD"
] | 1
|
2022-02-16T02:46:39.000Z
|
2022-02-16T04:30:29.000Z
|
bahamut/source/base56.asm
|
higan-emu/bahamut-lagoon-translation-kit
|
6f08de5b92b597c0b9ecebd485cc975b99acfc13
|
[
"0BSD"
] | 1
|
2021-12-25T11:34:57.000Z
|
2021-12-25T11:34:57.000Z
|
//base56 encoding and decoding routines:
//names are stored at $7e:2b00+, and each name is eight bytes long.
//this is not long enough for "Salamander", "Ice Dragon", "Thunderhawk", and "Fahrenheit"
//rather than attempting to migrate the names in both WRAM and SRAM, base56 is used.
//this allows for the storage of 11 characters in 8 bytes of space, with the downside
//that it limits the range of available characters to [A-Z][a-z][.- ] and a terminal marker.
//it is very difficult to perform 64-bit multiplication and division, and so pre-generated
//lookup tables are used to accelerate the process. the general idea is that multiplication
//and division by 8 is trivial, and then multiplication and division by 7 can be done: 8*7=56
namespace base56 {
seek(codeCursor)
//encoded <= base56.encode(encoding)
function encode {
variable(16, input) //88-bit decoded string
variable(16, output) //64-bit encoded string
enter; ldb #$31 //allow 16-bit access to variables
stz.w output+0; stz.w output+2; stz.w output+4; stz.w output+6 //initialize output
ldx.w #10; ldy.w #0
loop: {
phx; tya; xba; lsr #2; pha //S <= Y * 64
tya; xba; asl //A <= Y * 512
sub $01,s; sta $01,s //S <= A - S
lda.w input,x; and #$00ff //A <= character[X]
jsl encodeCharacter //A <= toBase56[X]
asl #3; add $01,s; tax; pla //X <= S + A * 8
//output <= output * 56 + A
lda.w output+0; add products+0,x; sta.w output+0
lda.w output+2; adc products+2,x; sta.w output+2
lda.w output+4; adc products+4,x; sta.w output+4
lda.w output+6; adc products+6,x; sta.w output+6
plx; iny; dex; bpl loop
}
//store string terminator
lda #$ffff; sta.w output+8
leave; rtl
function encodeCharacter {
cmp.w #'-'; bne +; lda #$0035; rtl; + //encode '-'
cmp.w #'.'; bne +; lda #$0036; rtl; + //encode '.'
cmp.w #'$'; bne +; lda #$0037; rtl; + //encode terminal
character.decode(); rtl //encode 'A-Z' and 'a-z'
}
}
//decoded <= base56.decode(decoding)
function decode {
variable(16, input) //64-bit encoded string
variable(16, output) //88-bit decoded string
variable( 4, multiplier) //31-bit base7
enter; ldb #$31 //allow 16-bit access to variables
//multiplier <= decoding >> 32
lda.w input+4; sta.w multiplier+0
lda.w input+6; sta.w multiplier+2
//copy low 3-bits of each character to output buffer
lda.w input+0; asl #2; and #$0700; sta.w output+8-1
lda.w input+1; asl #1; and #$0700; sta.w output+5-1
lda.w input+3; asl #2; and #$0700; sta.w output+0-1 //output[-1] is input[15] (unused padding)
sep #$20
lda.w input+0; pha; and #$07; sta.w output+10; pla; lsr #3; and #$07; sta.w output+9
lda.w input+1; lsr #1; pha; and #$07; sta.w output+ 7; pla; lsr #3; and #$07; sta.w output+6
lda.w input+2; lsr #2; pha; and #$07; sta.w output+ 4; pla; lsr #3; and #$07; sta.w output+3
lda.w input+3; pha; and #$07; sta.w output+ 2; pla; lsr #3; and #$07; sta.w output+1
//multiplier >>= 1
clc; ror.w multiplier+3; ror.w multiplier+2; ror.w multiplier+1; ror.w multiplier+0
//restore base7 upper 3-bits of each character for output buffer
ldy.w #10
loop: {
lda #$00
xba; lda.w multiplier+3; tax; lda quotients,x; sta.w multiplier+3; lda remainders,x
xba; lda.w multiplier+2; tax; lda quotients,x; sta.w multiplier+2; lda remainders,x
xba; lda.w multiplier+1; tax; lda quotients,x; sta.w multiplier+1; lda remainders,x
xba; lda.w multiplier+0; tax; lda quotients,x; sta.w multiplier+0; lda remainders,x
asl #3; ora.w output,y
jsl decodeCharacter; sta.w output,y
dey; bpl loop
}
//store string terminator
lda #$ff; sta.w output+11
leave; rtl
function decodeCharacter {
cmp #$35; bne +; lda.b #'-'; rtl; +
cmp #$36; bne +; lda.b #'.'; rtl; +
cmp #$37; bne +; lda.b #'$'; rtl; +
character.encode(); rtl
}
}
codeCursor = pc()
}
| 37.462264
| 97
| 0.632838
|
8e9da1112f7b4f3d4ecb1bf60e71877757e5cb9c
| 541
|
asm
|
Assembly
|
data/baseStats/tauros.asm
|
adhi-thirumala/EvoYellow
|
6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c
|
[
"Unlicense"
] | 16
|
2018-08-28T21:47:01.000Z
|
2022-02-20T20:29:59.000Z
|
data/baseStats/tauros.asm
|
adhi-thirumala/EvoYellow
|
6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c
|
[
"Unlicense"
] | 5
|
2019-04-03T19:53:11.000Z
|
2022-03-11T22:49:34.000Z
|
data/baseStats/tauros.asm
|
adhi-thirumala/EvoYellow
|
6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c
|
[
"Unlicense"
] | 2
|
2019-12-09T19:46:02.000Z
|
2020-12-05T21:36:30.000Z
|
db DEX_TAUROS ; pokedex id
db 75 ; base hp
db 100 ; base attack
db 95 ; base defense
db 110 ; base speed
db 70 ; base special
db NORMAL ; species type 1
db NORMAL ; species type 2
db 52 ; catch rate
db 211 ; base exp yield
INCBIN "pic/ymon/tauros.pic",0,1 ; 77, sprite dimensions
dw TaurosPicFront
dw TaurosPicBack
; attacks known at lvl 0
db TACKLE
db 0
db 0
db 0
db 5 ; growth rate
; learnset
tmlearn 6,7,8
tmlearn 9,10,13,14,15
tmlearn 20,24
tmlearn 25,26,27,31,32
tmlearn 34,38,40
tmlearn 44
tmlearn 50,54
db BANK(TaurosPicFront)
| 18.655172
| 56
| 0.731978
|
e10832c1f37b4861eccf92a510b7cda8bfb00500
| 279
|
asm
|
Assembly
|
programs/oeis/303/A303296.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/303/A303296.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/303/A303296.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A303296: Digital roots of fourth powers A000583.
; 1,7,9,4,4,9,7,1,9,1,7,9,4,4,9,7,1,9,1,7,9,4,4,9,7,1,9,1,7,9,4,4,9,7,1,9,1,7,9,4,4,9,7,1,9,1,7,9,4,4,9,7,1,9,1,7,9,4,4,9,7,1,9,1,7,9,4,4,9,7,1,9,1,7,9,4,4,9,7,1,9,1,7,9,4,4,9,7,1,9
add $0,1
pow $0,4
sub $0,1
mod $0,9
add $0,1
| 31
| 181
| 0.555556
|
06dc66a05bc478df759b0baf1bc4ada995232891
| 259
|
asm
|
Assembly
|
libsrc/math/z88math/dge.asm
|
Toysoft/z88dk
|
f930bef9ac4feeec91a07303b79ddd9071131a24
|
[
"ClArtistic"
] | 8
|
2017-01-18T12:02:17.000Z
|
2021-06-12T09:40:28.000Z
|
libsrc/math/z88math/dge.asm
|
Toysoft/z88dk
|
f930bef9ac4feeec91a07303b79ddd9071131a24
|
[
"ClArtistic"
] | 1
|
2017-03-06T07:41:56.000Z
|
2017-03-06T07:41:56.000Z
|
libsrc/math/z88math/dge.asm
|
Toysoft/z88dk
|
f930bef9ac4feeec91a07303b79ddd9071131a24
|
[
"ClArtistic"
] | 3
|
2017-03-07T03:19:40.000Z
|
2021-09-15T17:59:19.000Z
|
;
; Z88dk Z88 Maths Library
;
;
; $Id: dge.asm,v 1.4 2016-06-22 19:55:06 dom Exp $
SECTION code_fp
PUBLIC dge
EXTERN fsetup
EXTERN stkequcmp
INCLUDE "fpp.def"
; TOS >= FA?
.dge
call fsetup
fpp(FP_GEQ)
jp stkequcmp
| 12.333333
| 56
| 0.586873
|
002fa517307dca438696d265121e4f9fbcd14e76
| 731
|
asm
|
Assembly
|
programs/oeis/138/A138626.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/138/A138626.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/138/A138626.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A138626: Nonnegative integers n such that 17*n-5 is prime.
; 2,6,8,12,14,36,38,42,44,48,56,62,66,68,78,84,92,96,108,114,122,126,132,134,138,146,152,156,162,168,174,182,188,192,198,204,218,222,224,236,246,248,264,266,278,282,294,306,308,314,324,332,338,344,356,366,374,378,392,398,402,404,426,446,464,468,474,476,488,498,504,506,512,528,542,546,548,554,572,576,584,594,608,612,614,618,632,642,654,666,668,686,696,722,734,738,764,776,806,812
mov $2,$0
add $2,2
pow $2,2
lpb $2
add $1,11
sub $2,1
mov $3,$1
seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0.
sub $0,$3
add $1,6
mov $4,$0
max $4,0
cmp $4,$0
mul $2,$4
lpe
div $1,2
sub $1,22
mul $1,2
add $1,10
div $1,17
add $1,2
mov $0,$1
| 28.115385
| 380
| 0.664843
|
6ec1d6151c08001e3d7e9cc750df4a2ab6dddf74
| 1,260
|
asm
|
Assembly
|
samples/boing/clear_tiles.asm
|
rwiker/c256emu
|
4f4172e4bc87c63019f62b3ff0bf21489fcbd032
|
[
"MIT"
] | 18
|
2019-06-04T00:47:10.000Z
|
2021-06-23T04:59:33.000Z
|
samples/boing/clear_tiles.asm
|
rwiker/c256emu
|
4f4172e4bc87c63019f62b3ff0bf21489fcbd032
|
[
"MIT"
] | null | null | null |
samples/boing/clear_tiles.asm
|
rwiker/c256emu
|
4f4172e4bc87c63019f62b3ff0bf21489fcbd032
|
[
"MIT"
] | 2
|
2019-06-10T14:42:43.000Z
|
2020-04-21T18:58:03.000Z
|
; Y ptr to top left corner byte of square to clear
.macro ClearRow RowNum
.a16
.i16
lda #15 ; copy 16 zeroes
ldx #.loword(ROW_CLEAR_BLOCK) ; src address of zeroes
mvn #.bankbyte(ROW_CLEAR_BLOCK), #$af ; from src page into $af
tya
clc
adc #48 ; advance to next row
tay ; put back into dest arg
.endmacro
; Param1Addr points to destination tile map start addr
; Param1Word = 16 bit X location
; Param2Word = 16 bit Y location
.proc clear_tile_map
acc16i16
; translate X,Y params to a tile map start index
; Y / 16
lda Param2Word
lsr
lsr
lsr
lsr
tay
; X / 16
lda Param1Word
lsr
lsr
lsr
lsr
tax
; Param1Word used as tmp space from here on
; set Y = TileStartAddr + X + Y * 64 using math co-proc
tya
sta f:$000100 ; op A
lda #64 ;
sta f:$000102 ; op B
stx Param1Word ; save x
lda f:$000104 ; = y * 64
clc
adc Param1Word ; add X
adc Param1Addr ; add start addr
tay ; dest for our zeroes
; clear 16 rows each 16 tiles
ClearRow
ClearRow
ClearRow
ClearRow
ClearRow
ClearRow
ClearRow
ClearRow
ClearRow
ClearRow
ClearRow
ClearRow
ClearRow
ClearRow
ClearRow
ClearRow
rts
.endproc
| 17.746479
| 70
| 0.634921
|
cc495231704f79ca7e12e589d050abb0b187adc5
| 414
|
asm
|
Assembly
|
programs/oeis/183/A183873.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | 1
|
2021-03-15T11:38:20.000Z
|
2021-03-15T11:38:20.000Z
|
programs/oeis/183/A183873.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/183/A183873.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
; A183873: n-1+ceiling((1/5)n^2); complement of A183872.
; 1,2,4,7,9,13,16,20,25,29,35,40,46,53,59,67,74,82,91,99,109,118,128,139,149,161,172,184,197,209,223,236,250,265,279,295,310,326,343,359,377,394,412,431,449,469,488,508,529,549,571,592,614,637,659,683,706,730,755,779,805,830,856,883,909,937,964,992,1021,1049,1079,1108,1138,1169,1199,1231,1262,1294,1327,1359
mov $1,$0
add $0,7
mul $1,$0
add $1,5
div $1,5
| 46
| 308
| 0.702899
|
03fa170e00672597180cf2995d574678da0d7003
| 418
|
asm
|
Assembly
|
oeis/209/A209634.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/209/A209634.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/209/A209634.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A209634: Triangle with (1,4,7,10,13,16...,(3*n-2),...) in every column, shifted down twice.
; Submitted by Jon Maiga
; 1,4,7,1,10,4,13,7,1,16,10,4,19,13,7,1,22,16,10,4,25,19,13,7,1,28,22,16,10,4,31,25,19,13,7,1,34,28,22,16,10,4,37,31,25,19,13,7,1,40,34,28,22,16,10,4,43,37,31,25,19,13,7,1,46,40,34,28,22,16,10
mov $3,1
lpb $0
mov $2,$3
mul $2,$0
add $3,2
trn $0,$3
lpe
mod $2,$3
mov $0,$2
mul $0,3
add $0,1
| 26.125
| 192
| 0.600478
|
081411ebcb38483ceca81e9db649644295d503fc
| 12,077
|
asm
|
Assembly
|
dcl.asm
|
mkcin/DCL
|
16ebfb910735f5e39aad66d3305c16ee41a29098
|
[
"MIT"
] | null | null | null |
dcl.asm
|
mkcin/DCL
|
16ebfb910735f5e39aad66d3305c16ee41a29098
|
[
"MIT"
] | null | null | null |
dcl.asm
|
mkcin/DCL
|
16ebfb910735f5e39aad66d3305c16ee41a29098
|
[
"MIT"
] | null | null | null |
SYS_READ equ 0
SYS_WRITE equ 1
SYS_EXIT equ 60
STDIN equ 0
STDOUT equ 1
BUFFER_SIZE equ 4096
ONE equ 49
; Wykonanie programu zaczyna się od etykiety _start.
global _start
section .bss
; miejsce zarezerwowane na wczytany tekst
buffer resb BUFFER_SIZE
; tablica zliczająca powtórzenia znaków w argumentach
letter_ocurencies times 42 resb 0
; inwersja permutacji R
R_inversed times 42 resb 1
; inwersja permutacji L
L_inversed times 42 resb 1
section .text
; Wypisywanie bufora
; print_buffer b, c wypisuje c znaków tekstu o początku w b
; Modyfikuje rejestry rax, rdi, rsi, rdx i r11 przez funkcję systemową
%macro print_buffer 2
mov rdx, %2
mov rsi, %1
mov rax, SYS_WRITE
mov rdi, STDOUT
syscall
%endmacro
; Wczytywanie do bufora
; Po wykonaniu read, buffer to początek wczytanego
; bloku tekstu o maksymalnej wielkości BUFFER_SIZE
; Modyfikuje rejestry rax, rdi, rsi, rdx i r11 przez funkcję systemową
%macro read 0
mov rax, SYS_READ
mov rdi, STDIN
mov rsi, buffer
mov rdx, BUFFER_SIZE
syscall
%endmacro
; Permutacja Q
; Q_permutation x, y wykonuje Q o indeksie %2 na literze %1
%macro Q_permutation 2
add %1, %2
mov edx, %1
sub edx, 42
cmp %1, 42
cmovge %1, edx
%endmacro
; Odwrotność permutacji Q
; r_Q_permutation x, y wykonuje odwrotność
; Q o indekie %2 na literze %1
; Modyfikuje rejestr rdx
%macro r_Q_permutation 2
sub %1, %2
mov edx, %1
add edx, 42
test %1, %1
cmovs %1, edx
%endmacro
; Permutacja R, Odwrotności R, L, odwrotności L,
; lub T (która jest taka sama jak swoja odwrotność)
; L_R_T_permutation x P x_r wykonuje na x (czyli %1 i %3
; tylko %1 to ostatnie 8 bitów, a %3 to 64 bity) permutację
; R jeśli %2 to adres permutacji R
; L jeśli %2 to adres permutacji L
; T jeśli %2 to adres permutacji T
; lub odwrotność
; R jeśli %2 to adres odwrotności permutacji R
; L jeśli %2 to adres odwrotności permutacji L
%macro L_R_T_permutation 3
mov %1, [%2 + %3]
%endmacro
_start:
call arguments_validation
mov r9, [rsp + 5 * 8]
xor r14, r14
xor r13, r13
mov r14b, [r9 + 1] ; pozycja początkowa bębenka R
mov r13b, [r9] ; pozycja początkowa bębenka L
sub r13b, ONE
sub r14b, ONE
mov r9, [rsp + 2 * 8] ; permutacja L
mov r10, [rsp + 3 * 8] ; permutacja R
mov r12, [rsp + 4 * 8] ; permutacja T
call inverse_and_decrement_permutations
xor r15, r15
read_and_print_loop:
read
cmp rax, 0
je read_and_print_loop_end
mov rdi, buffer ; Zapisuję wskaźnik na początek bufora
xor rsi, rsi ; Liczba przepermutowanych znaków bufora
apply_permutations_loop_increment:
xor r15, r15
mov r15b, r13b
inc r15b
inc r14b ; Obracam bębenek R
cmp r14b, 27 ; Sprawdzam czy r nie jest w którejś z pozycji obrotowych
cmove r13, r15
cmp r14b, 33
cmove r13, r15
cmp r14b, 35
cmove r13, r15
xor r15, r15
cmp r14b, 42 ; Kontroluję cykliczny obrót bębenka R
cmove r14, r15 ; i jeśli się przekręca, zamieniam wartość z powrotem na 0
cmp r13b, 42 ; Kontroluję cykliczny obrót bębenka L
cmove r13, r15 ; i jeśli się przekręca, zamieniam wartość z powrotem na 0
mov r15b, [rdi]
sub r15b, ONE
cmp r15b, 0 ; Sprawdzam czy wczytany znak jest z dobrego zakresu
jl exit_1
cmp r15b, 41
jg exit_1
; Wykonuję permutacje na kolejnej literze
Q_permutation r15d, r14d ; Qr
L_R_T_permutation r15b, r10, r15 ; R
r_Q_permutation r15d, r14d ; odwrotność Qr
Q_permutation r15d, r13d ; Ql
L_R_T_permutation r15b, r9, r15 ; L
r_Q_permutation r15d, r13d ; odwrotność Ql
L_R_T_permutation r15b, r12, r15 ; T
Q_permutation r15d, r13d ; Ql
L_R_T_permutation r15b, L_inversed, r15 ; odwrotność L
r_Q_permutation r15d, r13d ; odwrotność Ql
Q_permutation r15d, r14d ; Qr
L_R_T_permutation r15b, R_inversed, r15 ; odwrotność R
r_Q_permutation r15d, r14d ; odwrotność Qr
add r15b, ONE
mov byte [rdi], r15b
inc rdi
inc rsi
cmp rax, rsi ; Sprawdzam, czy rozpatrzony znak był
; ostatnim wczytanym do bufora znakiem
jne apply_permutations_loop_increment ; Jeśli nie był, rozpatruję kolejny znak
print_buffer buffer, rax ; Wypisuję zaszyfrowany bufor
cmp rax, BUFFER_SIZE ; Sprawdzam
je read_and_print_loop
read_and_print_loop_end:
mov eax, SYS_EXIT
mov rdi, 0 ; kod powrotu 0
syscall
; SEKCJE POMOCNICZE
; Wypełnia R_inversed oraz L_inversed odpowiednio inwersjami
; Permutacji R oraz L i zmniejsza wartości znaków tych
; permutacji oraz oraz permutacji T o 49
; r9 - początek permutacji L (modyfikowane przez funkcję)
; r10 - początek permutacji R (modyfikowane przez funkcję)
; r12 - początek permutacji T (modyfikowane przez funkcję)
; Modyfikuje rejestry rdi, rsi, rdx
inverse_and_decrement_permutations:
push r9
push r10
push r12
xor rdi, rdi ; Rejestr na kolejne elementy permutacji
xor rsi, rsi ; Indeks aktualnie rozpatrywanego elementu
xor rdx, rdx ; Rejestr służący do przesunięcia elementów
; Permutacji T o 49
inverse_L_permutation_loop:
mov dil, [r9]
cmp dil, 0 ; Koniec permutacji L
je inverse_L_permutation_end
mov dl, [r12] ; Zmniejszenie kolejnego znaku w permutacji T o 49
sub dl, ONE
mov byte [r12], dl
sub dil, ONE
mov byte [r9], dil ; Przesunięcie elementu L o 49 do tyłu w ASCII
mov byte [L_inversed + rdi], sil ; Wypełnienie inwersjii L
inc r9
inc r12
inc rsi
jmp inverse_L_permutation_loop
inverse_L_permutation_end:
xor rdi, rdi ; rejestr na kolejne elementy permutacji
xor rsi, rsi ; indeks aktualnie rozpatrywanego elementu
inverse_R_permutation_loop:
mov dil, [r10]
cmp dil, 0 ; Koniec permutacji R
je inverse_R_permutation_end
sub dil, ONE
mov byte [r10], dil ; Przesunięcie elementu R o 49 do tyłu w ASCII
mov byte [R_inversed + rdi], sil ; Wypełnienie inwersjii R
inc r10
inc rsi
jmp inverse_R_permutation_loop
inverse_R_permutation_end:
pop r12
pop r10
pop r9
ret
; Sprawdzam, czy liczba argumentów jet poprawna oraz czy poszczególne argumenty są poprawne
; Modyfikuje rejestry rax, rcx, rsi, rdx
arguments_validation:
mov rax, 5 ; program ma przyjąć 4 argumenty (args[0] to nazwa programu)
cmp rax, [rsp + 8]
jne exit_1
mov rcx, 42
mov rsi, 1
mov rdx, [rsp + 3 * 8]
call check_valid_argument ; Poprawność permutacji L
mov rdx, [rsp + 4 * 8]
call check_valid_argument ; Poprawność permutacji R
mov rdx, [rsp + 5 * 8]
call check_valid_argument
mov rdx, [rsp + 5 * 8] ; Poprawność permutacji T
call check_valid_T_permutation
mov rcx, 2
xor rsi, rsi
mov rdx, [rsp + 6 * 8]
call check_valid_argument ; Poprawność klucza szyfrowania
ret
; Sprawdzam poprawność wczytanych argumentów pod kątem długości, poprawności znaków
; dodatkowo opcjonalnie sprawdzam, czy wszystkie znaki argumentu się różnią
; rcx - oczekiwaną długość argumentu
; rdx - adres argumentu do sprawdzenia
; rsi - 0 jeśli nie chcę, żeby została sprawdzona znaków w argumencie
; 1 w przeciwnym wypadku
; Modyfikuje rejestry rbx, rbp, rax, r8, rdx
check_valid_argument:
xor rbx, rbx ; długość argumentu
mov rbp, rdx ; zapisuję wskaźnik na początek argumentu
check_valid_argument_characters_loop:
mov al, [rdx]
cmp al, 0 ; sprawdzam, czy napotkałem koniec argumentu
je check_valid_argument_length
cmp al, ONE ; sprawdzam, czy znak jest w dozwolonym przedziale
jl exit_1
cmp al, 90
jg exit_1
inc rbx ; zwiększam licznik długości
inc rdx
jmp check_valid_argument_characters_loop
check_valid_argument_length:
cmp rbx, rcx ; sprawdzam, czy argument jest oczekiwanej długości
jne exit_1
cmp rsi, 0 ; jeśli nie chcę sprawdzać czy litery są różne, pomijam ten etap
je check_valid_argument_end
check_valid_argument_distinct:
mov r8, 0
check_valid_argument_distinct_clear_array:
mov byte [letter_ocurencies + r8], 0 ; zeruję tablicę zliczającą powtórzenia liter
inc r8
cmp r8, 42
jne check_valid_argument_distinct_clear_array
xor rax, rax ; w rejestrze al będę zapisywał kolejne litery
check_valid_argument_distinct_loop:
mov al, [rbp]
sub al, ONE ; al należy do [0, 49]
mov rdx, letter_ocurencies
add rdx, rax
cmp byte [rdx], 0 ; sprawdzam, czy litera nie wystąpiła do tej pory
jne exit_1
mov byte [rdx], 1 ; zaznaczam wystąpienie litery
inc rbp ; przesuwam wskaźnik po argumencie
mov al, [rbp]
cmp al, 0 ; sprawdzam, czy nie napotkałem końca argumentu
jne check_valid_argument_distinct_loop
check_valid_argument_end:
ret
; Sprawdzam, czy permutacja T składa się z 21 rozłącznych cykli 2-elementowych
; rdx - adres argumentu T
; modyfukuje rejestry rax, rdi, rcx, r8
check_valid_T_permutation:
xor rax, rax ; zeruję rejestry, na których części będę trzymał znaki z permutacji
xor rcx, rcx
xor r8, r8
mov rdi, rdx ; zapisuję początek argumentu
check_valid_T_permutation_loop:
mov al, [rdx]
cmp al, 0 ; sprawdzam, czy nie napotkałem końca argumentu
je check_valid_T_permutation_end
sub al, ONE
add rdi, rax
mov cl, [rdi] ; zapisuję, na jaką literę w permutacji przechodzi litera argumentu
sub rdi, rax
sub cl, ONE
cmp al, cl
je exit_1 ; wykryto cykl jednoelementowy
add rdi, rcx
mov r8b, [rdi] ; zapisuję na jaką literę w permutacji przechodzi litera,
; na którą przechodzi litera argumentu
sub rdi, rcx
sub r8b, ONE
cmp al, r8b
jne exit_1 ; cykl nie jest dwuelementowy
inc rdx
jmp check_valid_T_permutation_loop
check_valid_T_permutation_end:
ret
exit_1:
mov eax, SYS_EXIT
mov rdi, 1 ; kod powrotu 1
syscall
| 37.390093
| 100
| 0.578538
|
e89fcfa1df298e5885cedcf6ee707c51512f233a
| 512
|
asm
|
Assembly
|
oeis/161/A161150.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/161/A161150.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/161/A161150.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A161150: a(n) = (largest odd divisor of n)*(largest power of 2 dividing (n+1)).
; Submitted by Simon Strandgaard
; 2,1,12,1,10,3,56,1,18,5,44,3,26,7,240,1,34,9,76,5,42,11,184,3,50,13,108,7,58,15,992,1,66,17,140,9,74,19,312,5,82,21,172,11,90,23,752,3,98,25,204,13,106,27,440,7,114,29,236,15,122,31,4032,1,130,33,268,17,138
mov $1,1
add $1,$0
add $0,1
seq $0,65176 ; Site swap sequence associated with the permutation A065174 of Z.
mov $2,$0
mul $0,91
gcd $2,$1
mul $1,$0
pow $2,2
div $1,$2
mov $0,$1
div $0,91
| 30.117647
| 208
| 0.662109
|
2fd0e2cc427c844cd8bc579b7afea1e3de60d46f
| 2,009
|
asm
|
Assembly
|
CISP 310/M6 - Procedures and Macros/A7_Calculator.asm
|
gb-camera/college-hw
|
e36d275ed7fad0a0fdb711a2a4abc82860bc3fcd
|
[
"Unlicense"
] | null | null | null |
CISP 310/M6 - Procedures and Macros/A7_Calculator.asm
|
gb-camera/college-hw
|
e36d275ed7fad0a0fdb711a2a4abc82860bc3fcd
|
[
"Unlicense"
] | null | null | null |
CISP 310/M6 - Procedures and Macros/A7_Calculator.asm
|
gb-camera/college-hw
|
e36d275ed7fad0a0fdb711a2a4abc82860bc3fcd
|
[
"Unlicense"
] | null | null | null |
; CISP 310 - Michael Dinh
; Assignment 7 - Calculator
; 11/08/2020
INCLUDE io.h
.DATA
; data
operator BYTE 11 DUP (?)
; program variables
prompt1 BYTE "Enter first number.", 0
prompt2 BYTE "Enter operator.", 0
prompt3 BYTE "Enter second number."
string BYTE 40 DUP (?)
resultLb BYTE "Operation result is", 0
result BYTE 11 DUP (?)
.CODE
addition PROC
mov eax, ebx
add eax, ecx
ret
addition ENDP
multiplication PROC
mov eax, ebx
mul ecx
ret
multiplication ENDP
subtraction PROC
mov eax, ebx
sub eax, ecx
ret
subtraction ENDP
division PROC
mov eax, ebx
div ecx
ret
division ENDP
MainProc PROC
; reserve stack space
sub rsp, 120
whileN: ; get first number
input prompt1, string, 40
; if user inputs e here, exit program
cmp string, "e";
je endWhileN
; otherwise keep going
atod string
mov ebx, eax
; get the operator
input prompt2, operator, 40
; if user inputs e here, exit program
cmp operator, "e";
je endWhileN
; otherwise keep going
; clear string for prompt
mov string, 0
; get second number
input prompt3, string, 40
; if user inputs e here, exit program
cmp string, "e";
je endWhileN
; otherwise keep going
atod string
mov ecx, eax
; compare our user input operators and jump appropriately
cmp operator, "+";
je addit
cmp operator, "-";
je subtr
cmp operator, "*";
je multi
cmp operator, "/";
je divis
addit: call addition ; add and go to result phase
jmp display
subtr: call subtraction ; sub and go to result phase
jmp display
multi: call multiplication ; multiply and go to result phase
jmp display
divis: call division ; divive, result phase follows
display: ; now we need to output
dtoa result, eax
output resultLb, result
jmp whileN ; loop again
endWhileN:
; program end
add rsp, 120 ; restore stack
mov rax, 0 ; value to return (0)
ret
MainProc ENDP
END
| 19.133333
| 65
| 0.661025
|
6c2f81efa04691271aa140dadf51aa9cf36f75c8
| 664
|
asm
|
Assembly
|
lib/base/corelib/syscall_x86.asm
|
patrickf2000/orka
|
a824ef4ac0446c38501e669a5e46c8f1697134ba
|
[
"BSD-3-Clause"
] | 1
|
2021-10-04T07:15:19.000Z
|
2021-10-04T07:15:19.000Z
|
lib/base/corelib/syscall_x86.asm
|
patrickf2000/orka
|
a824ef4ac0446c38501e669a5e46c8f1697134ba
|
[
"BSD-3-Clause"
] | null | null | null |
lib/base/corelib/syscall_x86.asm
|
patrickf2000/orka
|
a824ef4ac0446c38501e669a5e46c8f1697134ba
|
[
"BSD-3-Clause"
] | null | null | null |
.intel_syntax noprefix
.text
.global syscall2
.global syscall3
.global syscall4
.global syscall_str4
.global syscall6
/* rdi, rsi */
syscall2:
mov rax, rdi
mov rdi, rsi
syscall
ret
/* rdi, rsi, rdx */
syscall3:
mov rax, rdi
mov rdi, rsi
mov rsi, rdx
syscall
ret
/* rdi, rsi, rdx, rcx */
syscall4:
mov rax, rdi
mov rdi, rsi
mov rsi, rdx
mov rdx, rcx
syscall
ret
syscall_str4:
call syscall4
ret
/* rdi, rsi, rdx, rcx, r8, r9 */
syscall6:
mov rax, rdi
mov rdi, rsi
mov rsi, rdx
mov rdx, rcx
mov r10, r8
mov r8, r9
xor r9, r9
syscall
ret
| 13.019608
| 32
| 0.570783
|
7140bb500165818f10b3bda59498bcb2de2e270c
| 513
|
asm
|
Assembly
|
oeis/160/A160056.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/160/A160056.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/160/A160056.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A160056: Decimal expansion of (107+42*sqrt(2))/89.
; Submitted by Christian Krause
; 1,8,6,9,6,2,8,8,7,2,1,3,1,1,2,3,5,0,6,1,7,6,0,7,7,8,2,4,9,0,7,9,4,7,4,0,7,8,6,4,3,3,9,5,3,6,6,9,4,7,3,9,5,4,0,1,5,0,7,9,2,6,8,5,3,4,3,9,4,1,1,6,9,6,1,1,3,3,1,4,1,1,5,9,2,3,1,7,7,1,2,8,2,8,7,7,4,6,7,4
bin $1,$0
mov $2,2
mov $3,$0
mul $3,4
add $3,2
lpb $3
add $5,$2
add $1,$5
add $2,$1
mov $1,$2
sub $3,1
lpe
mul $1,2
add $2,$5
div $2,9
mul $2,12
add $2,$5
mov $4,10
pow $4,$0
div $2,$4
div $1,$2
mov $0,$1
mod $0,10
| 18.321429
| 201
| 0.54191
|
4789df43ec089c0a67fd564ec523651f794639af
| 488
|
asm
|
Assembly
|
libsrc/_DEVELOPMENT/math/float/math48/c/sdcc_ix/cm48_sdccixp_dsadd_callee.asm
|
meesokim/z88dk
|
5763c7778f19a71d936b3200374059d267066bb2
|
[
"ClArtistic"
] | null | null | null |
libsrc/_DEVELOPMENT/math/float/math48/c/sdcc_ix/cm48_sdccixp_dsadd_callee.asm
|
meesokim/z88dk
|
5763c7778f19a71d936b3200374059d267066bb2
|
[
"ClArtistic"
] | null | null | null |
libsrc/_DEVELOPMENT/math/float/math48/c/sdcc_ix/cm48_sdccixp_dsadd_callee.asm
|
meesokim/z88dk
|
5763c7778f19a71d936b3200374059d267066bb2
|
[
"ClArtistic"
] | null | null | null |
; float __fsadd_callee(float a1, float a2)
SECTION code_fp_math48
PUBLIC cm48_sdccixp_dsadd_callee
EXTERN cm48_sdccixp_dcallee2, am48_dadd, cm48_sdccixp_m482d
cm48_sdccixp_dsadd_callee:
; add two sdcc floats
;
; enter : stack = sdcc_float a2, sdcc_float a1, ret
;
; exit : dehl = sdcc_float(a1+a2)
;
; uses : af, bc, de, hl, af', bc', de', hl'
call cm48_sdccixp_dcallee2
; AC = a1
; AC'= a2
call am48_dadd
jp cm48_sdccixp_m482d
| 17.428571
| 59
| 0.665984
|
f80a7a1840f593de16897fffc69f212d14faff58
| 3,758
|
asm
|
Assembly
|
src/asm/fizzbuzz8086.asm
|
Sausty/UltimateFizzbuzzDatabase
|
4f8d451d36ab2a461cc059535ccc96080642d4fb
|
[
"MIT"
] | 1
|
2020-12-24T15:56:12.000Z
|
2020-12-24T15:56:12.000Z
|
src/asm/fizzbuzz8086.asm
|
Sausty/UltimateFizzbuzzDatabase
|
4f8d451d36ab2a461cc059535ccc96080642d4fb
|
[
"MIT"
] | null | null | null |
src/asm/fizzbuzz8086.asm
|
Sausty/UltimateFizzbuzzDatabase
|
4f8d451d36ab2a461cc059535ccc96080642d4fb
|
[
"MIT"
] | null | null | null |
; Init the registers
mov dx,03030h ; For easier printing, the number is
;kept in Binary Coded Decimal, in
----
;the DX register.
mov ah,0Eh ; 0Eh is the IBM PC interrupt 10h
;function that does write text on
;the screen in teletype mode.
mov bl,100d ; BL is the counter (100 numbers).
xor cx,cx ; CX is a counter that will be used
;for screen printing.
xor bh,bh ; BH is the counter for counting
;multiples of three.
writeloop: ; Increment the BCD number in DX.
inc dl ; Increment the low digit
cmp dl,3Ah ; If it does not overflow nine,
jnz writeloop1 ;continue with the program,
mov dl,30h ;otherwise reset it to zero and
inc dh ;increment the high digit
writeloop1:
inc bh ; Increment the BH counter.
cmp bh,03h ; If it reached three, we did
;increment the number three times
;from the last time the number was
;a multiple of three, so the number
;is now a multiple of three now,
jz writefizz ;then we need to write "fizz" on the
;screen.
cmp dl,30h ; The number isn't a multiple of
jz writebuzz ;three, so we check if it's a
cmp dl,35h ;multiple of five. If it is, we
jz writebuzz ;need to write "buzz". The program
;checks if the last digit is zero or
;five.
mov al,dh ; If we're here, there's no need to
int 10h ;write neither "fizz" nor "buzz", so
mov al,dl ;the program writes the BCD number
int 10h ;in DX
writespace:
mov al,020h ;and a white space.
int 10h
dec bl ; Loop if we didn't process 100
jnz writeloop ;numbers.
programend: ; When we did reach 100 numbers,
cli ;the program flow falls here, where
hlt ;interrupts are cleared and the
jmp programend ;program is stopped.
writefizz: ; There's need to write "fizz":
mov si,offset fizz ; SI points to the "fizz" string,
call write ;that is written on the screen.
xor bh,bh ; BH, the counter for computing the
;multiples of three, is cleared.
cmp dl,30h ; We did write "fizz", but, if the
jz writebuzz ;number is a multiple of five, we
cmp dl,35h ;could need to write "buzz" also:
jnz writespace ;check if the number is multiple of
;five. If not, write a space and
;return to the main loop.
writebuzz: ; (The above code falls here if
;the last digit is five, otherwise
;it jumps)
mov si,offset buzz ;SI points to the "buzz" string,
call write ;that is written on the screen.
jmp writespace ; Write a space to return to the main
;loop.
write: ; Write subroutine:
mov cl,04h ; Set CX to the lenght of the string:
;both strings are 4 bytes long.
write1:
mov al,[si] ; Load the character to write in AL.
inc si ; Increment the counter SI.
int 10h ; Call interrupt 10h, function 0Eh to
;write the character and advance the
;text cursor (teletype mode)
loop write1 ; Decrement CX: if CX is not zero, do
ret ;loop, otherwise return from
;subroutine.
fizz: ;The "fizz" string.
db "fizz"
buzz: ;The "buzz" string.
db "buzz"
| 42.704545
| 63
| 0.5471
|
cbe6671a03666d3c89abe9a75e765a5147800428
| 4,225
|
asm
|
Assembly
|
Transynther/x86/_processed/NONE/_zr_/i7-8650U_0xd2.log_16206_1701.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 9
|
2020-08-13T19:41:58.000Z
|
2022-03-30T12:22:51.000Z
|
Transynther/x86/_processed/NONE/_zr_/i7-8650U_0xd2.log_16206_1701.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 1
|
2021-04-29T06:29:35.000Z
|
2021-05-13T21:02:30.000Z
|
Transynther/x86/_processed/NONE/_zr_/i7-8650U_0xd2.log_16206_1701.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 3
|
2020-07-14T17:07:07.000Z
|
2022-03-21T01:12:22.000Z
|
.global s_prepare_buffers
s_prepare_buffers:
push %r12
push %r14
push %r15
push %r9
push %rbp
push %rdi
lea addresses_WC_ht+0xa9e5, %r15
nop
nop
nop
nop
dec %r14
mov (%r15), %di
inc %rbp
lea addresses_normal_ht+0x1265, %r9
nop
nop
nop
nop
cmp $52764, %r12
movb $0x61, (%r9)
nop
dec %r9
pop %rdi
pop %rbp
pop %r9
pop %r15
pop %r14
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r13
push %r8
push %r9
push %rcx
push %rdi
// Faulty Load
lea addresses_A+0x199e5, %rdi
add %r8, %r8
mov (%rdi), %r10d
lea oracles, %rcx
and $0xff, %r10
shlq $12, %r10
mov (%rcx,%r10,1), %r10
pop %rdi
pop %rcx
pop %r9
pop %r8
pop %r13
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_A', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_A', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}}
<gen_prepare_buffer>
{'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 7, 'same': False}}
{'00': 16206}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
| 59.507042
| 2,999
| 0.660592
|
7ced3ff941e28d9e800733d4ba1fdb53236694d3
| 336
|
asm
|
Assembly
|
src/test/resources/data/potests/test59.asm
|
cpcitor/mdlz80optimizer
|
75070d984e1f08474e6d397c7e0eb66d8be0c432
|
[
"Apache-2.0"
] | 36
|
2020-06-29T06:52:26.000Z
|
2022-02-10T19:41:58.000Z
|
src/test/resources/data/potests/test59.asm
|
cpcitor/mdlz80optimizer
|
75070d984e1f08474e6d397c7e0eb66d8be0c432
|
[
"Apache-2.0"
] | 39
|
2020-07-02T18:19:34.000Z
|
2022-03-27T18:08:54.000Z
|
src/test/resources/data/potests/test59.asm
|
cpcitor/mdlz80optimizer
|
75070d984e1f08474e6d397c7e0eb66d8be0c432
|
[
"Apache-2.0"
] | 7
|
2020-07-02T06:00:05.000Z
|
2021-11-28T17:31:13.000Z
|
; Test: corner case found by Bengalack
ld hl,variable ; this block should be optimized
ld c,(hl)
inc hl
ld b,(hl)
ld a,(bc)
ld (variable3),a
ld hl,(variable) ; this block should not be optimized
ld c,(hl)
inc hl
ld b,(hl)
ld a,(bc)
ld (variable3),a
loop:
jr loop
variable: db #00
variable2: dw #0000
variable3: db #00
| 15.272727
| 55
| 0.66369
|
04fc37080c2b1c661d237a38257489207c312121
| 2,943
|
asm
|
Assembly
|
src/shaders/h264/mc/writeRecon_Y_16x8.asm
|
me176c-dev/android_hardware_intel-vaapi-driver
|
0f2dca8d604220405e4678c0b6c4faa578d994ec
|
[
"MIT"
] | 192
|
2018-01-26T11:51:55.000Z
|
2022-03-25T20:04:19.000Z
|
src/shaders/h264/mc/writeRecon_Y_16x8.asm
|
me176c-dev/android_hardware_intel-vaapi-driver
|
0f2dca8d604220405e4678c0b6c4faa578d994ec
|
[
"MIT"
] | 256
|
2017-01-23T02:10:27.000Z
|
2018-01-23T10:00:05.000Z
|
src/shaders/h264/mc/writeRecon_Y_16x8.asm
|
me176c-dev/android_hardware_intel-vaapi-driver
|
0f2dca8d604220405e4678c0b6c4faa578d994ec
|
[
"MIT"
] | 64
|
2018-01-30T19:51:53.000Z
|
2021-11-24T01:26:14.000Z
|
/*
* Copyright © <2010>, Intel Corporation.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
* IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* This file was originally licensed under the following license
*
* 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.
*
*/
// Kernel name: WriteRecon_Y_16x8.asm
//
// $Revision: 10 $
// $Date: 10/03/06 5:28p $
//
//#if !defined(__WRITERECON_Y_16x8__) // Make sure this is only included once
//#define __WRITERECON_Y_16x8__
add (1) p0:w pERRORY:w -256:w
add (1) p1:w pERRORY:w -128:w
$for(0; <4; 1) {
mov (16) mbMSGPAYLOADY(%1,0)<1> r[p0,%1*32+0]<8,2>:ub {NoDDClr}
mov (16) mbMSGPAYLOADY(%1,16)<1> r[p0,%1*32+16]<8,2>:ub {NoDDChk}
}
#if defined(MBAFF)
add (1) pMSGDSC:ud gFIELDFLAGS:uw MSG_LEN(4)+nDWBWMSGDSC+nBDIX_DESTY+ENWRCOM:ud
#elif defined(FIELD)
add (1) pMSGDSC:ud gFIELDFLAGS:uw MSG_LEN(4)+nDWBWMSGDSC_TF+nBDIX_DESTY+ENWRCOM:ud
#endif
mov (2) gMSGSRC.0<1>:d gX<2;2,1>:w {NoDDClr}
mov (1) gMSGSRC.2:ud 0x0007000f:ud {NoDDChk}
#if defined(FRAME)
send (8) gREG_WRITE_COMMIT_Y<1>:ud mMSGHDRYW gMSGSRC<8;8,1>:ud DAPWRITE MSG_LEN(4)+nDWBWMSGDSC+nBDIX_DESTY+ENWRCOM
#else
send (8) gREG_WRITE_COMMIT_Y<1>:ud mMSGHDRYW gMSGSRC<8;8,1>:ud DAPWRITE pMSGDSC:ud
#endif
//#endif // !defined(__WRITERECON_Y_16x8__)
| 39.77027
| 124
| 0.700306
|
cb286c79b158923e8e3648ee6bdf55854569cfe3
| 613
|
asm
|
Assembly
|
programs/oeis/171/A171503.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/171/A171503.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/171/A171503.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A171503: Number of 2 X 2 integer matrices with entries from {0,1,...,n} having determinant 1.
; 0,3,7,15,23,39,47,71,87,111,127,167,183,231,255,287,319,383,407,479,511,559,599,687,719,799,847,919,967,1079,1111,1231,1295,1375,1439,1535,1583,1727,1799,1895,1959,2119,2167,2335,2415,2511,2599,2783,2847,3015,3095,3223,3319,3527,3599,3759,3855,3999,4111,4343,4407,4647,4767,4911,5039,5231,5311,5575,5703,5879,5975,6255,6351,6639,6783,6943,7087,7327,7423,7735,7863,8079,8239,8567,8663,8919,9087,9311,9471,9823,9919,10207,10383,10623,10807,11095,11223,11607,11775,12015
seq $0,140466 ; a(n) = 4*A002088(n).
trn $0,1
| 102.166667
| 469
| 0.755302
|
771b6bb184f3a979e2bff296b87bf63ab4bc44b3
| 1,849
|
asm
|
Assembly
|
programs/oeis/046/A046127.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | 1
|
2021-03-15T11:38:20.000Z
|
2021-03-15T11:38:20.000Z
|
programs/oeis/046/A046127.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/046/A046127.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
; A046127: Maximal number of regions into which space can be divided by n spheres.
; 0,2,4,8,16,30,52,84,128,186,260,352,464,598,756,940,1152,1394,1668,1976,2320,2702,3124,3588,4096,4650,5252,5904,6608,7366,8180,9052,9984,10978,12036,13160,14352,15614,16948,18356,19840,21402,23044,24768,26576,28470,30452,32524,34688,36946,39300,41752,44304,46958,49716,52580,55552,58634,61828,65136,68560,72102,75764,79548,83456,87490,91652,95944,100368,104926,109620,114452,119424,124538,129796,135200,140752,146454,152308,158316,164480,170802,177284,183928,190736,197710,204852,212164,219648,227306,235140,243152,251344,259718,268276,277020,285952,295074,304388,313896,323600,333502,343604,353908,364416,375130,386052,397184,408528,420086,431860,443852,456064,468498,481156,494040,507152,520494,534068,547876,561920,576202,590724,605488,620496,635750,651252,667004,683008,699266,715780,732552,749584,766878,784436,802260,820352,838714,857348,876256,895440,914902,934644,954668,974976,995570,1016452,1037624,1059088,1080846,1102900,1125252,1147904,1170858,1194116,1217680,1241552,1265734,1290228,1315036,1340160,1365602,1391364,1417448,1443856,1470590,1497652,1525044,1552768,1580826,1609220,1637952,1667024,1696438,1726196,1756300,1786752,1817554,1848708,1880216,1912080,1944302,1976884,2009828,2043136,2076810,2110852,2145264,2180048,2215206,2250740,2286652,2322944,2359618,2396676,2434120,2471952,2510174,2548788,2587796,2627200,2667002,2707204,2747808,2788816,2830230,2872052,2914284,2956928,2999986,3043460,3087352,3131664,3176398,3221556,3267140,3313152,3359594,3406468,3453776,3501520,3549702,3598324,3647388,3696896,3746850,3797252,3848104,3899408,3951166,4003380,4056052,4109184,4162778,4216836,4271360,4326352,4381814,4437748,4494156,4551040,4608402,4666244,4724568,4783376,4842670,4902452,4962724,5023488,5084746
mov $1,$0
bin $1,3
add $1,$0
mul $1,2
| 231.125
| 1,726
| 0.843699
|
2c189836ac6ae67a3ba1383f3c9d1d11b2a982fe
| 2,058
|
asm
|
Assembly
|
game/logic/game_states/transitions/transitions.asm
|
benoitryder/super-tilt-bro
|
8d5035f54e906a401d0808c2e104d32fa1fadd7f
|
[
"WTFPL"
] | null | null | null |
game/logic/game_states/transitions/transitions.asm
|
benoitryder/super-tilt-bro
|
8d5035f54e906a401d0808c2e104d32fa1fadd7f
|
[
"WTFPL"
] | null | null | null |
game/logic/game_states/transitions/transitions.asm
|
benoitryder/super-tilt-bro
|
8d5035f54e906a401d0808c2e104d32fa1fadd7f
|
[
"WTFPL"
] | null | null | null |
state_transition_id:
.byt STATE_TRANSITION(GAME_STATE_TITLE, GAME_STATE_MODE_SELECTION)
.byt STATE_TRANSITION(GAME_STATE_MODE_SELECTION, GAME_STATE_TITLE)
.byt STATE_TRANSITION(GAME_STATE_MODE_SELECTION, GAME_STATE_CONFIG)
.byt STATE_TRANSITION(GAME_STATE_CONFIG, GAME_STATE_MODE_SELECTION)
.byt STATE_TRANSITION(GAME_STATE_TITLE, GAME_STATE_CREDITS)
.byt STATE_TRANSITION(GAME_STATE_CREDITS, GAME_STATE_TITLE)
.byt STATE_TRANSITION(GAME_STATE_CONFIG, GAME_STATE_CHARACTER_SELECTION)
.byt STATE_TRANSITION(GAME_STATE_CHARACTER_SELECTION, GAME_STATE_CONFIG)
.byt $00
state_transition_pretransition_lsb:
.byt <state_transition_pre_scroll_down
.byt <state_transition_pre_scroll_up
.byt <state_transition_pre_scroll_down
.byt <state_transition_pre_scroll_up
.byt <state_transition_pre_scroll_down
.byt <state_transition_pre_scroll_up
.byt <state_transition_pre_scroll_down
.byt <state_transition_pre_scroll_up
state_transition_pretransition_msb:
.byt >state_transition_pre_scroll_down
.byt >state_transition_pre_scroll_up
.byt >state_transition_pre_scroll_down
.byt >state_transition_pre_scroll_up
.byt >state_transition_pre_scroll_down
.byt >state_transition_pre_scroll_up
.byt >state_transition_pre_scroll_down
.byt >state_transition_pre_scroll_up
state_transition_posttransition_lsb:
.byt <state_transition_post_scroll_down
.byt <state_transition_post_scroll_up
.byt <state_transition_post_scroll_down
.byt <state_transition_post_scroll_up
.byt <state_transition_post_scroll_down
.byt <state_transition_post_scroll_up
.byt <state_transition_post_scroll_down
.byt <state_transition_post_scroll_up
state_transition_posttransition_msb:
.byt >state_transition_post_scroll_down
.byt >state_transition_post_scroll_up
.byt >state_transition_post_scroll_down
.byt >state_transition_post_scroll_up
.byt >state_transition_post_scroll_down
.byt >state_transition_post_scroll_up
.byt >state_transition_post_scroll_down
.byt >state_transition_post_scroll_up
#include "game/logic/game_states/transitions/scroll_transition.asm"
| 38.830189
| 73
| 0.876579
|
83e6eba0ab499f587421f6de47e63561ee0f7f90
| 4,815
|
asm
|
Assembly
|
Transynther/x86/_processed/AVXALIGN/_st_/i3-7100_9_0x84_notsx.log_68_1622.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 9
|
2020-08-13T19:41:58.000Z
|
2022-03-30T12:22:51.000Z
|
Transynther/x86/_processed/AVXALIGN/_st_/i3-7100_9_0x84_notsx.log_68_1622.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 1
|
2021-04-29T06:29:35.000Z
|
2021-05-13T21:02:30.000Z
|
Transynther/x86/_processed/AVXALIGN/_st_/i3-7100_9_0x84_notsx.log_68_1622.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 3
|
2020-07-14T17:07:07.000Z
|
2022-03-21T01:12:22.000Z
|
.global s_prepare_buffers
s_prepare_buffers:
push %r13
push %r15
push %rax
push %rbp
push %rcx
push %rdi
push %rsi
lea addresses_UC_ht+0x3264, %r13
nop
nop
sub $52808, %rax
mov (%r13), %bp
cmp $19917, %r15
lea addresses_WC_ht+0x172f4, %rsi
lea addresses_D_ht+0x7fa4, %rdi
nop
nop
nop
sub %r15, %r15
mov $56, %rcx
rep movsb
nop
nop
nop
nop
nop
cmp %rsi, %rsi
lea addresses_UC_ht+0x7604, %rsi
lea addresses_WC_ht+0x7384, %rdi
nop
nop
nop
nop
sub %r15, %r15
mov $4, %rcx
rep movsq
nop
nop
nop
and %rcx, %rcx
lea addresses_D_ht+0x9e4, %rbp
nop
inc %rsi
movb $0x61, (%rbp)
cmp $35333, %rcx
lea addresses_WT_ht+0x4ecc, %rsi
lea addresses_normal_ht+0xe446, %rdi
clflush (%rsi)
nop
nop
nop
nop
nop
cmp $59689, %r15
mov $61, %rcx
rep movsw
cmp %rcx, %rcx
lea addresses_D_ht+0xaea4, %rax
nop
nop
nop
nop
and $33224, %rdi
movw $0x6162, (%rax)
nop
nop
nop
nop
nop
sub %r13, %r13
lea addresses_WT_ht+0xc1e4, %r15
dec %rax
vmovups (%r15), %ymm4
vextracti128 $0, %ymm4, %xmm4
vpextrq $1, %xmm4, %rcx
add %rax, %rax
lea addresses_WC_ht+0x17974, %rbp
nop
nop
nop
nop
nop
and %rsi, %rsi
mov $0x6162636465666768, %r15
movq %r15, %xmm2
vmovups %ymm2, (%rbp)
nop
add $2968, %rax
lea addresses_A_ht+0x1ba24, %rdi
nop
nop
nop
sub %rsi, %rsi
movb (%rdi), %al
nop
nop
nop
nop
inc %rdi
lea addresses_normal_ht+0x9337, %r15
nop
nop
nop
nop
cmp %rbp, %rbp
mov $0x6162636465666768, %rsi
movq %rsi, %xmm0
vmovups %ymm0, (%r15)
nop
nop
sub $56860, %r15
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %rax
pop %r15
pop %r13
ret
.global s_faulty_load
s_faulty_load:
push %r15
push %r8
push %r9
push %rax
push %rbx
push %rcx
push %rdi
push %rsi
// Store
lea addresses_PSE+0x192a4, %rbx
clflush (%rbx)
sub %rax, %rax
movb $0x51, (%rbx)
nop
nop
nop
nop
and %rax, %rax
// REPMOV
lea addresses_D+0x18de4, %rsi
lea addresses_WC+0x9e4, %rdi
nop
and %r8, %r8
mov $37, %rcx
rep movsq
nop
dec %rsi
// Store
lea addresses_D+0x1c114, %rdi
nop
nop
nop
xor $59543, %rcx
movl $0x51525354, (%rdi)
nop
nop
nop
xor $62303, %r9
// REPMOV
lea addresses_PSE+0xa7e4, %rsi
lea addresses_WT+0xbd18, %rdi
nop
nop
nop
nop
xor %rbx, %rbx
mov $54, %rcx
rep movsw
nop
nop
nop
nop
sub $30928, %r15
// Faulty Load
lea addresses_D+0xa9e4, %rcx
nop
nop
add $23714, %rdi
vmovaps (%rcx), %ymm5
vextracti128 $1, %ymm5, %xmm5
vpextrq $0, %xmm5, %rbx
lea oracles, %r9
and $0xff, %rbx
shlq $12, %rbx
mov (%r9,%rbx,1), %rbx
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rax
pop %r9
pop %r8
pop %r15
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_D', 'same': True, 'size': 32, 'congruent': 0, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_PSE', 'same': False, 'size': 1, 'congruent': 5, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_D', 'congruent': 10, 'same': True}, 'dst': {'type': 'addresses_WC', 'congruent': 8, 'same': False}, 'OP': 'REPM'}
{'dst': {'type': 'addresses_D', 'same': False, 'size': 4, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_PSE', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_WT', 'congruent': 2, 'same': False}, 'OP': 'REPM'}
[Faulty Load]
{'src': {'type': 'addresses_D', 'same': True, 'size': 32, 'congruent': 0, 'NT': True, 'AVXalign': True}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_UC_ht', 'same': False, 'size': 2, 'congruent': 7, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WC_ht', 'congruent': 4, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 5, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_UC_ht', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 5, 'same': False}, 'OP': 'REPM'}
{'dst': {'type': 'addresses_D_ht', 'same': False, 'size': 1, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_WT_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 1, 'same': False}, 'OP': 'REPM'}
{'dst': {'type': 'addresses_D_ht', 'same': False, 'size': 2, 'congruent': 4, 'NT': True, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_WT_ht', 'same': False, 'size': 32, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_WC_ht', 'same': False, 'size': 32, 'congruent': 2, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_A_ht', 'same': False, 'size': 1, 'congruent': 6, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_normal_ht', 'same': False, 'size': 32, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'33': 8, '36': 60}
36 36 36 36 36 36 36 36 36 36 36 36 36 36 33 36 36 36 36 36 33 36 36 36 36 36 36 36 36 36 36 36 36 33 36 36 36 36 36 36 36 33 36 33 36 33 33 36 36 36 36 36 36 36 36 36 36 36 36 36 36 33 36 36 36 36 36 36
*/
| 21.026201
| 203
| 0.647975
|
86498fb8743f92d3875e90e02b412d45f193e079
| 49,032
|
asm
|
Assembly
|
Source/Apps/Assign.asm
|
davidknoll/RomWBW
|
8a7bc97fea27bf10a23c61ee508522a60e2909c6
|
[
"DOC",
"MIT"
] | 194
|
2015-08-20T03:18:01.000Z
|
2022-03-27T02:25:00.000Z
|
Source/Apps/Assign.asm
|
davidknoll/RomWBW
|
8a7bc97fea27bf10a23c61ee508522a60e2909c6
|
[
"DOC",
"MIT"
] | 234
|
2017-03-30T10:59:54.000Z
|
2022-03-26T20:05:52.000Z
|
Source/Apps/Assign.asm
|
davidknoll/RomWBW
|
8a7bc97fea27bf10a23c61ee508522a60e2909c6
|
[
"DOC",
"MIT"
] | 68
|
2016-12-18T18:20:12.000Z
|
2022-03-20T16:02:40.000Z
|
;===============================================================================
; ASSIGN - Display and/or modify drive letter assignments
;
;===============================================================================
;
; Author: Wayne Warthen (wwarthen@gmail.com)
;_______________________________________________________________________________
;
; Usage:
; ASSIGN D:[=[{D:|<device>[<unitnum>]:[<slicenum>]}]][,...]
; ex: ASSIGN (display all active drive assignments)
; ASSIGN /? (display version and usage)
; ASSIGN /L (display all possible devices)
; ASSIGN C:=D: (swaps C: and D:)
; ASSIGN C:=FD0: (assign C: to floppy unit 0)
; ASSIGN C:=IDE0:1 (assign C: to IDE unit0, slice 1)
; ASSIGN C:= (unassign C:)
;_______________________________________________________________________________
;
; Change Log:
; 2016-03-21 [WBW] Updated for HBIOS 2.8
; 2016-04-08 [WBW] Determine key memory addresses dynamically
; 2019-08-07 [WBW] Fixed DPB selection error
; 2019-11-17 [WBW] Added preliminary CP/M 3 support
; 2019-12-24 [WBW] Fixed location of BIOS save area
;_______________________________________________________________________________
;
; ToDo:
; 1) Do something to prevent assigning slices when device does not support them
; 2) ASSIGN C: causes drive map to be reinstalled unnecessarily
;_______________________________________________________________________________
;
;===============================================================================
; Definitions
;===============================================================================
;
stksiz .equ $40 ; Working stack size
;
restart .equ $0000 ; CP/M restart vector
bdos .equ $0005 ; BDOS invocation vector
;
stamp .equ $40 ; loc of RomWBW CBIOS zero page stamp
;
rmj .equ 3 ; CBIOS version - major
rmn .equ 0 ; CBIOS version - minor
;
;===============================================================================
; Code Section
;===============================================================================
;
.org $100
;
; relocate to high memory
ld hl,image
ld de,$8000
ld bc,modsize
ldir
jp start
;
image .equ $
;
.org $8000
;
start:
;
; setup stack (save old value)
ld (stksav),sp ; save stack
ld sp,stack ; set new stack
;
; initialization
call init ; initialize
jr nz,exit ; abort if init fails
;
; do the real work
call process ; parse and process command line
jr nz,exit ; done if error or no action
;
; perform table integrity check
call valid
jr nz,exit
;
; install the new drive map if changes were made
ld a,(modcnt) ; get the mod count
or a ; set flags
call nz,install ; install new drive map
;
exit: ; clean up and return to command processor
call crlf ; formatting
ld sp,(stksav) ; restore stack
jp restart ; return to CP/M via restart
ret ; return to CP/M w/o restart
;
; Initialization
;
init:
;
; locate start of cbios (function jump table)
ld hl,(restart+1) ; load address of CP/M restart vector
ld de,-3 ; adjustment for start of table
add hl,de ; HL now has start of table
ld (bioloc),hl ; save it
;
; get CP/M version and save it
ld c,$0C ; function number
call bdos ; do it, HL := version
ld (cpmver),hl ; save it
ld a,l ; low byte
cp $30 ; CP/M 3.0?
;
; get location of config data and verify integrity
ld hl,stamp ; HL := adr or RomWBW zero page stamp
ld a,(hl) ; get first byte of RomWBW marker
cp 'W' ; match?
jp nz,errinv ; abort with invalid config block
inc hl ; next byte (marker byte 2)
ld a,(hl) ; load it
cp ~'W' ; match?
jp nz,errinv ; abort with invalid config block
inc hl ; next byte (major/minor version)
ld a,(hl) ; load it
cp rmj << 4 | rmn ; match?
jp nz,errver ; abort with invalid os version
inc hl ; bump past
inc hl ; ... version info
;
; dereference HL to point to CBIOS extension data
ld a,(hl) ; dereference HL
inc hl ; ... to point to
ld h,(hl) ; ... ROMWBW config data block
ld l,a ; ... in CBIOS
;
; skip device map address
inc hl ; bump two bytes
inc hl ; ... past device map address entry
;
; get location of drive map
ld e,(hl) ; dereference HL
inc hl ; ... into DE to get
ld d,(hl) ; ... drive map pointer
inc hl ; skip past drive map pointer
ld (maploc),de ; and save it
;
; get location of dpbmap
ld e,(hl) ; dereference HL
inc hl ; ... into DE to get
ld d,(hl) ; ... DPB map pointer
ld (dpbloc),de ; and save it
;
; test for CP/M 3 and branch if so
ld a,(cpmver) ; low byte of cpm version
cp $30 ; CP/M 3.0?
jp nc,initcpm3 ; handle CP/M 3.0 or greater
;
; make a local working copy of the drive map
ld hl,(maploc) ; copy from CBIOS drive map
ld de,mapwrk ; copy to working drive map
dec hl ; point to entry count
ld a,(hl) ; get entry count
inc hl ; restore hl pointer to drive map start
add a,a ; multiple a by
add a,a ; ... size of entries (4 bytes each)
ld c,a ; set BC := 0A
ld b,0 ; ... so BC is length to copy
ldir ; do the copy
;
; determine end of CBIOS (assume HBIOS for now)
ld hl,($FFFE) ; get proxy start address
ld (bioend),hl ; save as CBIOS end address
;
; check for UNA (UBIOS)
ld a,($FFFD) ; fixed location of UNA API vector
cp $C3 ; jp instruction?
jr nz,initx ; if not, not UNA
ld hl,($FFFE) ; get jp address
ld a,(hl) ; get byte at target address
cp $FD ; first byte of UNA push ix instruction
jr nz,initx ; if not, not UNA
inc hl ; point to next byte
ld a,(hl) ; get next byte
cp $E5 ; second byte of UNA push ix instruction
jr nz,initx ; if not, not UNA
ld hl,unamod ; point to UNA mode flag
ld (hl),$FF ; set UNA mode flag
ld c,$F1 ; UNA func: Get HMA
rst 08 ; call UNA, HL := UNA proxy start address
ld (bioend),hl ; save as CBIOS end address
;
initx:
; compute size of CBIOS
ld hl,(bioend) ; HL := end address
ld de,(bioloc) ; DE := starting address
xor a ; clear carry
sbc hl,de ; subtract to get size in HL
ld (biosiz),hl ; and save it
;
; establish heap limit
ld hl,(bioend) ; HL := end of CBIOS address
ld de,-$40 ; allow 40 bytes for CBIOS stack
add hl,de ; adjust
ld (heaplim),hl ; save it
;
#if 0
ld a,' '
call crlf
ld bc,(bioloc)
call prthexword
call prtchr
ld bc,(bioend)
call prthexword
call prtchr
ld bc,(maploc)
call prthexword
call prtchr
ld bc,(heaplim)
call prthexword
#endif
;
; return success
xor a ; signal success
ret ; return
;
; CP/M 3 initialization
;
initcpm3:
ld hl,(bioloc)
ld de,22*3 ; offset of DRVTBL func
add hl,de ; HL := DRVTBL func
call jphl ; do it, HL := DRVTBL adr
ld (drvtbl),hl ; save it
;
; switch to sysbnk
ld hl,(bioloc)
ld de,27*3 ; offset of SELMEM func
add hl,de ; HL := SELMEM func
ld a,0 ; bank 0 is system bank
call jphl
;
; copy CP/M 3 drvtbl to drvmap working copy
ld hl,(drvtbl) ; get drive table in HL
ld de,mapwrk ; DE := working drive map
ld b,16
initc2:
push hl ; save drvtbl entry adr
ld a,(hl) ; deref HL to get DPH adr
inc hl ; ...
ld h,(hl) ; ...
ld l,a ; ...
ld a,l ; check for
or h ; ... zero
jr nz,initc3 ; if not zero, copy entry
inc de ; ... else bump past unit field
jr initc4 ; ... and continue without copying
initc3:
dec hl ; back up to
dec hl ; ... unit
ld a,(hl) ; get unit from drvtbl
ld (de),a ; save unit to drvmap
inc hl ; bump to slice
inc de ; bump to slice
ld a,(hl) ; get slice from drvtbl
ld (de),a ; save slice to drvmap
initc4:
inc de ; bump past slice
inc de ; skip
inc de ; ... dph
pop hl ; back to drvtbl entry
inc hl ; bump to
inc hl ; ... next drvtbl entry
djnz initc2
;
; switch back to tpabnk
ld hl,(bioloc)
ld de,27*3 ; offset of SELMEM func
add hl,de ; HL := SELMEM func
ld a,1 ; bank 1 is tpa bank
call jphl
;
; return success
xor a ; signal success
ret ; return
;
; Process command line
;
process:
;
; look for start of parms
ld hl,$81 ; point to start of parm area (past len byte)
call nonblank ; skip to next non-blank char
jp z,showall ; no parms, show all active assignments
;
; check for special option, introduced by a "/"
cp '/' ; start of usage request?
jp z,option ; yes, handle option
;
process0:
;
sub 'A' ; make it binary
ld (dstdrv),a ; save it as destination drive
inc hl ; next char
ld a,(hl) ; get it
cp ':' ; is it ':' as expected?
jp nz,errprm ; error if not
inc hl ; skip ':'
call nonblank ; skip possible blanks
cp '=' ; proper delimiter?
jr z,process1 ; yes, continue
ld de,drvshow ; show the drive
ld a,(dstdrv) ; load the drive
jr process4 ; do it
;
process1: ; handle other side of '='
;
inc hl ; skip '='
call nonblank ; skip blanks as needed
ld de,drvdel ; assume a drive delete
jp z,process4 ; continue to processing
cp ',' ; comma?
jp z,process4 ; continue to processing
call getalpha ; gobble all alpha characters
dec b ; decrement num chars parsed
jr nz,process2 ; more than 1 char, handle as device name
;
; handle as drive swap
cp ':' ; check for mandatory trailing colon
jp nz,errprm ; handle unexpected character
inc hl ; skip ':'
ld a,(tmpstr) ; get the drive letter
sub 'A' ; make it binary
ld (srcdrv),a ; assume it is a src drv and save it
ld de,drvswap ; put routine to call in DE
jr process4 ; and continue
;
process2: ; handle a device/slice assignment
;
call getnum ; get number from buffer
jp c,errnum ; abort on overflow
cp 16 ; compare to max
jp nc,errnum ; abort if too high
ld (unit),a ; save it as unit num
ld a,(hl) ; get terminating char
cp ':' ; check for mandatory colon
jp nz,errprm ; handle unexpected character
inc hl ; skip past colon
call getnum ; get number from buffer
jp c,errnum ; abort on overflow
ld (slice),a ; save it as slice num
ld de,drvmap ; put routine to call in DE
jr process4 ; and continue
;
process4: ; check for terminating null or comma
;
call nonblank ; skip possible blanks
jr z,process5 ; null terminator OK
cp ',' ; check for comma
jr z,process5 ; also OK
jp errprm ; otherwise parm error
;
process5: ; do the processing
;
ex de,hl ; move routine to call to HL
push de ; save command string pointer
call jphl ; do the work
pop hl ; recover command string pointer
ret nz ; abort on error
ld a,(hl) ; get the current cmd string char
or a ; set flags
ret z ; if null, we are done
inc hl ; otherwise, skip comma
call nonblank ; and possible blanks after comma
ret z ; get out if nothing more
jp process0 ; we have more work, loop
;
; Handle special options
;
option:
;
inc hl ; next char
ld a,(hl) ; get it
cp '?' ; is it a '?' as expected?
jp z,usage ; yes, display usage
cp 'L' ; is it a 'L', display device list?
jp z,devlist ; yes, display device list
jp errprm ; anything else is an error
;
usage:
;
call crlf ; formatting
ld de,msgban1 ; point to version message part 1
call prtstr ; print it
ld a,(unamod) ; get UNA flag
or a ; set flags
ld de,msghb ; point to HBIOS mode message
call z,prtstr ; if not UNA, say so
ld de,msgub ; point to UBIOS mode message
call nz,prtstr ; if UNA, say so
call crlf ; formatting
ld de,msgban2 ; point to version message part 2
call prtstr ; print it
call crlf2 ; blank line
ld de,msguse ; point to usage message
call prtstr ; print it
or $FF ; signal no action performed
ret ; and return
;
devlist:
;
ld a,(unamod) ; get UNA mode flag
or a ; set flags
jr nz,devlstu ; do UNA mode dev list
;
ld b,$F8 ; hbios func: sysget
ld c,$10 ; sysget subfunc: diocnt
rst 08 ; call hbios, E := device count
ld b,e ; use device count for loop count
ld c,0 ; use C for device index
devlist1:
call crlf ; formatting
ld de,indent ; indent
call prtstr ; ... to look nice
push bc ; preserve loop control
ld a,c ; device to A
call prtdev ; print device mnemonic
ld a,':' ; colon for device/unit format
call prtchr ; print it
pop bc ; restore loop control
inc c ; next device index
djnz devlist1 ; loop as needed
or $FF ; signal no action taken
ret ; done
;
devlstu:
; UNA mode device list
ld b,0 ; use unit 0 to get count
ld c,$48 ; una func: get disk type
ld l,0 ; preset unit count to zero
rst 08 ; call una, b is assumed to be untouched!!!
ld a,l ; unit count to a
or a ; set flags
ret z ; no units, return
ld b,l ; unit count to b
ld c,0 ; init unit index
devlstu1:
call crlf ; formatting
ld de,indent ; indent
call prtstr ; ... to look nice
push bc ; save loop control vars
ld a,c ; put unit num in A
push af ; save it
call prtdevu ; print the device name
pop af ; restore unit num
call prtdecb ; print unit num
ld a,':' ; colon delimiter
call prtchr ; print it
pop bc ; restore loop control
inc c ; next drive
djnz devlstu1 ; loop as needed
ret ; return
;
; Install the new drive map into CBIOS
;
install:
ld a,(cpmver) ; low byte of CP/M version
cp $30 ; CP/M 3.0?
jp nc,instcpm3 ; handle CP/M 3.0 or greater
;
; capture CBIOS snapshot and stack frame for error recovery
ld hl,(bioloc) ; start of CBIOS
ld de,$1000 ; save it here
ld bc,(biosiz) ; size of CBIOS
ldir ; save it
ld (xstksav),sp ; save stack frame
; clear CBIOS buffer area
ld hl,(maploc) ; start fill at drive map
ld a,(bioend + 1) ; msb of CBIOS end address to A
install1:
ld e,0 ; fill with null
ld (hl),e ; fill next byte
inc hl ; point to next byte
cp h ; is H == msb of CBIOS end address?
jr nz,install1 ; if not, loop
;
; determine the drive map entry count
ld hl,mapwrk
ld c,0
ld b,16
install2:
ld a,$FF
cp (hl)
jr z,install3
ld e,c ; remember high water mark
install3:
inc hl
inc hl
inc hl
inc hl
inc c
djnz install2
inc e ; convert from max value to count
;
; record entry count in CBIOS
ld hl,(maploc) ; start of map
dec hl ; backup to entry count
ld (hl),e ; record count
;
; copy map
ld a,e ; A := entry count
add a,a ; multiply by size
add a,a ; ... of entry (4 bytes)
ld c,a ; put in C for count
ld b,0 ; msb of count is always zero
ld hl,mapwrk ; source of copy is work map
ld de,(maploc) ; target is CBIOS map loc
ldir ; do it
;
; set start of memory allocation heap
ld (heaptop),de ; DE has next byte available
;
; allocate directory buffer
ld hl,128 ; size of directory buffer
call alloc ; allocate the space
jp c,instovf ; handle overflow error
ld (dirbuf),hl ; ... and save in dirbuf
;
dph_init:
;
; iterate through drive map to build dph entries dynamically
;
; setup for dph build loop
ld hl,(maploc) ; point to drive map
dec hl ; backup to entry count
ld b,(hl) ; loop drvcnt times
ld c,0 ; drive index
inc hl ; bump to start of drive map
;
dph_init1:
; no DPH if drive not assigned
ld a,(hl)
cp $FF
jr nz,dph_init2
ld de,0 ; not assigned, use DPH pointer of zero
jr dph_init3
;
dph_init2:
ld a,(hl) ; unit to A
push bc ; save loop control
push hl ; save drive map pointer
ld hl,16 ; size of a DPH structure
call alloc ; allocate space for dph
jp c,instovf ; handle overflow error
push hl ; save DPH location
push hl ; move DPH location
pop de ; ... to DE
call makdph ; make the DPH, unit in A from above
pop de ; restore DPH pointer to DE
pop hl ; restore drive map pointer to HL
pop bc ; restore loop control
;
dph_init3:
inc hl ; bump to slice loc
inc hl ; bump to DPH pointer lsb
ld (hl),e ; save lsb
inc hl ; bump to DPH pointer msb
ld (hl),d ; save msb
inc hl ; bump to start of next drive map entry
inc c ; next drive index
djnz dph_init1 ; loop as needed
;
; display free memory
call crlf2
ld de,indent
call prtstr
ld hl,(heaplim) ; subtract high water
ld de,(heaptop) ; ... from top of cbios
or a ; ... with cf clear
sbc hl,de ; ... so hl gets bytes free
call prtdecw ; print it
ld de,msgmem ; add description
call prtstr ; and print it
;
call drvrst ; perform BDOS drive reset
;
xor a ; signal success
ret ; done
;
makdph:
;
; make a dph at address in de for dev/unit in a
;
push de ; save incoming dph address
;
ld c,a ; save incoming dev/unit
ld a,(unamod) ; get UNA mode flag
or a ; set flags
ld a,c ; restore incoming dev/unit
jr nz,makdphuna ; do UNA mode
jr makdphwbw ; do WBW mode
;
makdphuna: ; determine appropriate dpb (WBW mode)
ld b,a ; unit num to b
ld c,$48 ; una func: get disk type
rst 08 ; call una
ld a,d ; move disk type to a
;
; derive dpb address based on disk type
cp $40 ; ram/rom drive?
jr z,makdphuna1 ; handle ram/rom drive if so
; cp $?? ; floppy drive?
; jr z,xxxxx ; handle floppy
ld e,4 ; assume hard disk
jr makdph0 ; continue
;
makdphuna1: ; handle ram/rom
ld c,$45 ; una func: get disk info
ld de,$9000 ; 512 byte buffer *** fix!!! ***
rst 08 ; call una
bit 7,b ; test ram drive bit
ld e,1 ; assume rom
jr z,makdph0 ; not set, rom drive, continue
ld e,2 ; otherwise, must be ram drive
jr makdph0 ; continue
;
makdphwbw: ; determine appropriate dpb (WBW mode, unit number in A)
;
ld c,a ; unit number to C
ld b,$17 ; HBIOS: Report Device Info
rst 08 ; call HBIOS, return w/ device type in D, physical unit in E
ld a,d ; device type to A
cp $00 ; ram/rom?
jr nz,makdph00 ; if not, skip ahead to other types
ld a,e ; physical unit number to A
ld e,1 ; assume rom
cp $00 ; rom?
jr z,makdph0 ; yes, jump ahead
ld e,2 ; otherwise ram
jr makdph0 ; jump ahead
makdph00:
ld e,6 ; assume floppy
cp $10 ; floppy?
jr z,makdph0 ; yes, jump ahead
ld e,3 ; assume ram floppy
cp $20 ; ram floppy?
jr z,makdph0 ; yes, jump ahead
ld e,4 ; everything else is assumed to be hard disk
jr makdph0 ; yes, jump ahead
;
makdph0:
ld hl,(dpbloc) ; point to start of dpb table in CBIOS
ld a,e ; get index of target DPB to A
add a,a ; each entry is two bytes
call addhl ; add offset for desired DPB address
ld e,(hl) ; dereference HL
inc hl ; into DE, so DE
ld d,(hl) ; has address of target DPB
;
makdph1:
;
; build the dph
pop hl ; hl := start of dph
ld a,8 ; size of dph reserved area
call addhl ; leave it alone (zero filled)
;
ld bc,(dirbuf) ; address of dirbuf
ld (hl),c ; plug dirbuf
inc hl ; ... into dph
ld (hl),b ; ... and bump
inc hl ; ... to next dph entry
;
ld (hl),e ; plug dpb address
inc hl ; ... into dph
ld (hl),d ; ... and bump
inc hl ; ... to next entry
dec de ; point
dec de ; ... to start
dec de ; ... of
dec de ; ... dpb
dec de ; ... prefix data (cks & als buf sizes)
call makdph2 ; handle cks buf, then fall thru for als buf
ret nz ; bail out on error
;
makdph2:
; DE = address of CKS or ALS buf to allocate
; HL = address of field in DPH to get allocated address
push hl ; save DPH field ptr
pop bc ; into BC
;
; HL := alloc size, DE bumped
ex de,hl
ld e,(hl) ; get size to allocate
inc hl ; ...
ld d,(hl) ; ... into HL
inc hl ; and bump DE
ex de,hl
;
; check for size of zero, special case
ld a,h ; check to see
or l ; ... if hl is zero
jr z,makdph3 ; if so, jump ahead using hl as address
;
; allocate memory
call alloc ; do the allocation
jp c,instovf ; bail out on overflow
makdph3:
; swap hl and bc
push bc ; bc -> (sp)
ex (sp),hl ; (sp) -> hl, hl -> (sp)
pop bc ; (sp) -> bc
;
; save allocated address
ld (hl),c ; save cks/als buf
inc hl ; ... address in
ld (hl),b ; ... dph and bump
inc hl ; ... to next dph entry
xor a ; signal success
ret
;
;
;
instcpm3:
;
; switch to sysbnk
ld hl,(bioloc)
ld de,27*3 ; offset of SELMEM func
add hl,de ; HL := SELMEM func
ld a,0 ; bank 0 is system bank
call jphl
;
; copy drvmap working copy to CP/M 3 drvtbl
ld hl,(drvtbl) ; get drvtbl address
ld a,(hl) ; deref HL to get DPH0 adr
inc hl ; ...
ld h,(hl) ; ...
ld l,a ; ...
ld (dphadr),hl ; save starting dphadr
ld hl,(drvtbl) ; get drive table in HL
ld de,mapwrk ; DE := working drive map
ld b,16
instc1:
ld a,(de) ; get unit field of mapwrk
inc a ; test for $FF
jr nz,instc2 ; if used, do copy
xor a ; zero accum
ld (hl),a ; zero lsb of drvtbl entry adr
inc hl ; move to msb
ld (hl),a ; zero msb of drvtbl entry adr
inc hl ; bump to start of next drvtbl entry
inc de ; bump to next mapwrk entry
inc de ; ...
inc de ; ...
inc de ; ...
jr instc3 ; resume loop without copy
;
instc2:
push hl ; save drvtbl entry adr
push de ; save mapwrk entry adr
ld de,(dphadr) ; get cur dph adr
ld (hl),e ; save dph adr to drvtbl
inc hl ; ...
ld (hl),d ; ...
ex de,hl ; dph adr to HL
pop de ; restore mapwrk entry adr
dec hl ; backup to unit
dec hl ; ...
ld a,(de) ; get unit from mapwrk
ld (hl),a ; put unit into DPH field
inc de ; bump to slice field of mapwrk
inc hl ; bump to slice field of DPH field
ld a,(de) ; get slice from mapwrk
ld (hl),a ; put slice into DPH field
inc de ; bump to next mapwrk entry
inc de ; ...
inc de ; ...
pop hl ; back to drvtbl entry
inc hl ; bump to
inc hl ; ... next drvtbl entry
instc3:
push hl ; save drvtbl entry adr
push de ; save mapwrk entry adr
ld hl,(dphadr) ; get cur dph address
ld de,$23 ; size of xdph
add hl,de ; bump to next dph
ld (dphadr),hl ; save it
pop de ; recover mapwrk entry adr
pop hl ; recover drvtbl entry adr
djnz instc1
;
; switch back to tpabnk
ld hl,(bioloc)
ld de,27*3 ; offset of SELMEM func
add hl,de ; HL := SELMEM func
ld a,1 ; bank 1 is tpa bank
call jphl
;
call drvrst ; perform BDOS drive reset
;
xor a ; signal success
ret
;
; Handle overflow error in installation
;
instovf:
; restore stack frame and CBIOS image
ld sp,(xstksav) ; restore stack frame
ld hl,$1000 ; start of CBIOS image buffer
ld de,(bioloc) ; start of CBIOS
ld bc,(biosiz) ; size of CBIOS
ldir ; restore it
jp errovf
;
; Allocate HL bytes from heap
; Return pointer to allocated memory in HL
; On overflow error, C set
;
alloc:
push de ; save de so we can use it for work reg
ld de,(heaptop) ; get current heap top
push de ; and save for return value
add hl,de ; add requested space, hl := new heap top
jr c,allocx ; test for cpu memory space overflow
ld de,(heaplim) ; load de with heap limit
ex de,hl ; de=new heaptop, hl=heaplim
sbc hl,de ; heaplim - heaptop
jr c,allocx ; c set on overflow error
; allocation succeeded, commit new heaptop
ld (heaptop),de ; save new heaptop
allocx:
pop hl ; return value to hl
pop de ; recover de
ret
;
; Scan drive map table for integrity
; Currently just checks for multiple drive
; letters referencing a single file system
;
valid:
ld hl,mapwrk ; point to working drive map table
ld b,16 - 1 ; loop one less times than num entries
;
; check that drive A: is assigned
ld a,$FF ; value that indicates unassigned
cp (hl) ; compare to A: value
jp z,errnoa ; handle failure
;
valid1: ; outer loop
; call crlf
push hl ; save pointer
push bc ; save loop control
call valid2 ; do the inner loop
pop bc ; restore loop control
pop hl ; restore pointer
jp z,errint ; validation error
ld a,4 ; 4 bytes per entry
call addhl ; bump to next entry
djnz valid1 ; loop until done
xor a ; signal OK
ret ; done
;
valid2: ; setup for inner loop
push hl ; save HL
ld a,4 ; 4 bytes per entry
call addhl ; point to entry following
pop de ; de points to comparison entry
;
valid3: ; inner loop
; bypass unassigned drives (only need to test 1)
ld a,(hl) ; get first drive unit in A
cp $FF ; unassigned?
jr z,valid4 ; yes, skip
;
; compare unit/slice values
ld a,(de) ; first byte to A
cp (hl) ; compare
jr nz,valid4 ; if not equal, continue loop
inc de ; bump DE to next byte
inc hl ; bump HL to next byte
ld a,(de) ; first byte to A
cp (hl) ; compare
ret z ; both bytes equal, return signalling problem
dec de ; point DE back to first byte of comparison entry
dec hl ; point HL back
;
valid4: ; no match, loop
inc hl
inc hl ; bump HL
inc hl ; ... to
inc hl ; ... next entry
or $FF ; no match
djnz valid3 ; loop as appropriate
ret
;
; Show a specific drive assignment
;
drvshow:
ld a,(dstdrv) ; get the drive num
call chkdrv ; valid drive letter?
ret nz ; abort if not
call showone ; show it
xor a ; signal success
ret ; done
;
; Delete (unassign) drive
;
drvdel:
ld a,(dstdrv) ; get the dest drive (to be unassigned)
call chkdrv ; valid drive letter?
ret nz ; abort if not
; point to correct entry in drive map
ld hl,mapwrk ; point to working drive map
ld a,(dstdrv) ; get drive letter to remove
rlca ; calc table offset
rlca ; ... as drive num * 4
call addhl ; get final table offset
; wipe out the drive letter
ld a,$FF ; dev/unit := $FF (unassigned)
ld (hl),a ; do it
xor a ; zero accum
inc hl ; slice := 0
ld (hl),a ; do it
inc hl ; DPH pointer lsb := 0
ld (hl),a ; do it
inc hl ; DPH pointer msb := 0
ld (hl),a ; do it
; done
ld a,(dstdrv) ; get the destination
call showone ; show it
ld hl,modcnt ; point to mod count
inc (hl) ; increment it
xor a ; signal success
ret
;
; Swap the source and destination drive letters
;
drvswap:
ld a,(dstdrv) ; get the destination drive
call chkdrv ; valid drive?
ret nz ; abort if not
ld a,(srcdrv) ; get the source drive
call chkdrv ; valid drive?
ret nz ; abort if not
ld hl,(drives) ; load source/dest in DE
ld a,h ; put source drive num in a
cp l ; compare to the dest drive num
jp z,errswp ; Invalid swap request, src == dest
;
; Get pointer to source drive table entry
ld hl,mapwrk
ld a,(srcdrv)
rlca
rlca
call addhl
ld (srcptr),hl
;
; Get pointer to destination drive table entry
ld hl,mapwrk
ld a,(dstdrv)
rlca
rlca
call addhl
ld (dstptr),hl
;
; 1) dest -> temp
ld hl,(dstptr)
ld de,tmpent
ld bc,4
ldir
;
; 2) source -> dest
ld hl,(srcptr)
ld de,(dstptr)
ld bc,4
ldir
;
; 3) temp -> source
ld hl,tmpent
ld de,(srcptr)
ld bc,4
ldir
;
; print the results
ld a,(dstdrv) ; get the destination
call showone ; show it
ld a,(srcdrv) ; get the source drive
call showone ; show it
;
ld hl,modcnt ; point to mod count
inc (hl) ; increment it
xor a ; signal success
ret ; exit
;
; Assign drive to specified unit/slice
;
drvmap:
; check for UNA mode
ld a,(unamod) ; get UNA mode flag
or a ; set flags
jr nz,drvmapu ; do UNA mode drvmap
;
; determine device code by scanning for string
ld b,16 ; device table always has 16 entries
ld c,0 ; c is used to track table entry num
ld de,tmpstr ; de points to specified device name
ld hl,devtbl ; hl points to first entry of devtbl
;
drvmap1: ; loop through device table looking for a match
push hl ; save device table entry pointer
ld a,(hl) ; dereference HL
inc hl ; ... to point to
ld h,(hl) ; ... string
ld l,a ; ... in device table
push de ; save string pointer
push bc ; save loop control stuff
call strcmp ; compare strings
pop bc ; restore loop control stuff
pop de ; restore de
pop hl ; restore table entry pointer
jr z,drvmap2 ; match, continue
inc hl ; bump to next
inc hl ; device table pointer
inc c ; keep track of table entry num
djnz drvmap1 ; and loop
jp errdev
;
drvmap2:
; convert index to device type id
ld a,c ; index to accum
rlca ; move it to upper nibble
rlca ; ...
rlca ; ...
rlca ; ...
ld (device),a ; save as device id
;
; loop thru hbios units looking for device type/unit match
ld b,$F8 ; hbios func: sysget
ld c,$10 ; sysget subfunc: diocnt
rst 08 ; call hbios, E := device count
ld b,e ; use device count for loop count
ld c,0 ; use C for device index
drvmap3:
push bc ; preserve loop control
ld b,$17 ; hbios func: diodevice
rst 08 ; call hbios, D := device, E := unit
pop bc ; restore loop control
ld a,(device)
cp d
jr nz,drvmap4
ld a,(unit)
cp e
jr z,drvmap5 ; match, continue, C = BIOS unit
drvmap4:
; continue looping
inc c
djnz drvmap3
jp errdev ; invalid device specified
;
drvmap5:
; check for valid unit (supported by BIOS)
push bc ; save unit
ld a,c ; unit to A
call chkdev ; check validity
pop bc ; restore unit
ret nz ; bail out on error
; resolve the CBIOS DPH table entry
ld a,(dstdrv) ; dest drv num to A
call chkdrv ; valid drive?
ret nz ; abort if invalid
ld hl,mapwrk ; point to start of drive map
rlca ; multiply by
rlca ; ... entry size of 4
call addhl ; adjust HL to point to entry
ld (dstptr),hl ; save it
;
; shove updated unit/slice into the entry
ld (hl),c ; save unit byte
inc hl ; bump to next byte
ld a,(slice)
ld (hl),a ; save slice
;
; finish up
ld a,(dstdrv) ; get the destination drive
call showone ; show it's new value
ld hl,modcnt ; point to mod count
inc (hl) ; increment it
xor a ; signal success
ret ; exit
;
; UNA mode drive mapping
;
drvmapu:
;
; verify the device nmeumonic
ld a,(unit) ; get unit specified
ld b,a ; put in b
ld d,0 ; preset type to 0
ld c,$48 ; una func: get disk type
rst 08 ; call una, b is assumed to be untouched!!!
ld a,d ; resultant device type to a
cp $40 ; RAM/ROM
jr z,drvmapu0 ; special case for RAM/ROM
ld de,udevide ; assume IDE
cp $41 ; IDE?
jr z,drvmapu1 ; do compare
ld de,udevppide ; assume PPIDE
cp $42 ; PPIDE?
jr z,drvmapu1 ; do compare
ld de,udevsd ; assume SD
cp $43 ; SD?
jr z,drvmapu1 ; do compare
ld de,udevdsd ; assume DSD
cp $44 ; DSD?
jr z,drvmapu1 ; do compare
jp errdev ; error, invalid device name
;
drvmapu0:
; handle RAM/ROM
ld a,(unit) ; get unit specified
ld b,a ; unit num to B
ld c,$45 ; UNA func: get disk info
ld de,$9000 ; 512 byte buffer *** FIX!!! ***
rst 08 ; call UNA
bit 7,b ; test RAM drive bit
ld de,udevrom ; assume ROM
jr z,drvmapu1 ; do compare
ld de,udevram ; assume RAM
jr drvmapu1 ; do compare
jp errdev ; error, invalid device name
;
drvmapu1:
ld hl,tmpstr ; point HL to specified device name
call strcmp ; compare
jp nz,errdev ; no match, invalid device name
;
; check for valid unit (supported by BIOS)
ld a,(unit) ; get specified unit
call chkdevu ; check validity
jp nz,errdev ; invalid device specified
;
; resolve the CBIOS DPH table entry
ld a,(dstdrv) ; dest drv num to A
call chkdrv ; valid drive?
ret nz ; abort if invalid
ld hl,mapwrk ; point to start of drive map
rlca ; multiply by
rlca ; ... entry size of 4
call addhl ; adjust HL to point to entry
ld (dstptr),hl ; save it
;
; shove updated unit/slice into the entry
ld a,(unit) ; get specified unit
ld (hl),a ; save it
inc hl ; next byte is slice
ld a,(slice) ; get specified slice
ld (hl),a ; save it
;
; finish up
ld a,(dstdrv) ; get the destination drive
call showone ; show it's new value
ld hl,modcnt ; point to mod count
inc (hl) ; increment it
xor a ; signal success
ret
;
; Display all active drive letter assignments
;
showall:
ld b,16 ; 16 drives possible
ld c,0 ; map index (drive letter)
;
ld a,b ; load count
or $FF ; signal no action
ret z ; bail out if zero
;
showall1: ; loop
ld a,c ;
push bc ; save loop control
call showass
pop bc ; restore loop control
inc c
djnz showall1
or $FF
ret
;
; Display drive letter assignment IF it is assigned
; Drive num in A
;
showass:
;
; setup HL to point to desired entry in table
ld c,a ; save incoming drive in C
ld hl,mapwrk ; HL = address of drive map
rlca
rlca
call addhl ; HL = address of drive map table entry
ld a,(hl) ; get unit value
cp $FF ; compare to unassigned value
ld a,c ; recover original drive num
ret z ; bail out if unassigned drive
; fall thru to display drive
;
; Display drive letter assignment for the drive num in A
;
showone:
;
push af ; save the incoming drive num
;
call crlf ; formatting
;
ld de,indent ; indent
call prtstr ; ... to look nice
;
; setup HL to point to desired entry in table
pop af
push af
ld hl,mapwrk ; HL = address of drive map
rlca
rlca
call addhl ; HL = address of drive map table entry
pop af
;
; render the drive letter based on table index
add a,'A' ; convert to alpha
call prtchr ; print it
ld a,':' ; conventional color after drive letter
call prtchr ; print it
ld a,'=' ; use '=' to represent assignment
call prtchr ; print it
;
; render the map entry
ld a,(hl) ; load unit
cp $FF ; empty?
ret z ; yes, bypass
push hl ; preserve HL
call prtdev ; print device mnemonic
ld a,':' ; colon for device/unit format
call prtchr ; print it
pop hl ; recover HL
inc hl ; point to slice num
ld a,(hl) ; load slice num
call prtdecb ; print it
;
ret
;
; Force BDOS to reset (logout) all drives
;
drvrst:
ld c,$0D ; BDOS Reset Disk function
call bdos ; do it
;
ld c,$25 ; BDOS Reset Multiple Drives
ld de,$FFFF ; all drives
call bdos ; do it
;
xor a ; signal success
ret
;
; Print device mnemonic based on device number in A
;
prtdev:
ld e,a ; stash incoming device num in E
ld a,(unamod) ; get UNA mode flag
or a ; set flags
ld a,e ; put device num back
jr nz,prtdevu ; print device in UNA mode
ld b,$17 ; hbios func: diodevice
ld c,a ; unit to C
rst 08 ; call hbios, D := device, E := unit
push de ; save results
ld a,d ; device to A
rrca ; isolate high nibble (device)
rrca ; ...
rrca ; ...
rrca ; ... into low nibble
and $0F ; mask out undesired bits
push hl ; save HL
add a,a ; multiple A by two for word table
ld hl,devtbl ; point to start of device name table
call addhl ; add A to hl to point to table entry
ld a,(hl) ; dereference hl to loc of device name string
inc hl ; ...
ld d,(hl) ; ...
ld e,a ; ...
call prtstr ; print the device nmemonic
pop hl ; restore HL
pop de ; get device/unit data back
ld a,e ; device id to a
call prtdecb ; print it
ret ; done
;
prtdevu:
push bc
push de
push hl
;
; UNA mode version of print device
ld b,a ; B := unit num
push bc ; save for later
ld c,$48 ; UNA func: get disk type
rst 08 ; call UNA
ld a,d ; disk type to A
pop bc ; get unit num back in C
;
; pick string based on disk type
cp $40 ; RAM/ROM?
jr z,prtdevu1 ; if so, handle it
cp $41 ; IDE?
ld de,udevide ; load string
jr z,prtdevu2 ; if IDE, print and return
cp $42 ; PPIDE?
ld de,udevppide ; load string
jr z,prtdevu2 ; if PPIDE, print and return
cp $43 ; SD?
ld de,udevsd ; load string
jr z,prtdevu2 ; if SD, print and return
cp $44 ; DSD?
ld de,udevdsd ; load string
jr z,prtdevu2 ; if DSD, print and return
ld de,udevunk ; load string for unknown
jr prtdevu2 ; and print it
;
prtdevu1:
; handle RAM/ROM
push bc ; save unit num
ld c,$45 ; UNA func: get disk info
ld de,$9000 ; 512 byte buffer *** FIX!!! ***
rst 08 ; call UNA
bit 7,b ; test RAM drive bit
pop bc ; restore unit num
ld de,udevrom ; load string
jr z,prtdevu2 ; print and return
ld de,udevram ; load string
jr prtdevu2 ; print and return
;
prtdevu2:
call prtstr ; print the device nmemonic
ld a,b ; get the unit num back
call prtdecb ; append it
pop hl
pop de
pop bc
ret
;
; Check that specified drive num is valid
;
chkdrv:
cp 16 ; max of 16 drive letters
jp nc,errdrv ; handle bad drive
cp a ; set Z to signal good
ret ; and return
;
; Check that the unit value in A is valid
; according to active BIOS support.
;
;
chkdev: ; HBIOS variant
push af ; save incoming unit
ld b,$F8 ; hbios func: sysget
ld c,$10 ; sysget subfunc: diocnt
rst 08 ; call hbios, E := device count
pop af ; restore incoming unit
cp e ; compare to unit count
jp nc,errdev ; if too high, error
;
; get device/unit info
ld b,$17 ; hbios func: diodevice
ld c,a ; unit to C
rst 08 ; call hbios, D := device, E := unit
ld a,d ; device to A
;
; check slice support
cp $30 ; A has device/unit, in hard disk range?
jr c,chkdev1 ; if not hard disk, check slice val
xor a ; otherwise, signal OK
ret
;
chkdev1: ; not a hard disk, make sure slice == 0
ld a,(slice) ; get specified slice
or a ; set flags
jp nz,errslc ; invalid slice error
xor a ; signal OK
ret
;
chkdevu: ; UNA variant
ld b,a ; put in b
ld d,0 ; preset type to 0
ld c,$48 ; una func: get disk type
rst 08 ; call una
ld a,d ; resultant device type to a
or a ; set flags
jp z,errdev ; invalid if 0
;
; check for slice support, if required
cp $40 ; ram/rom?
jr z,chkdevu1 ; yes, check for slice
; cp $?? ; floppy?
; jr z,chkdevu1 ; yes, check for slice
xor a ; otherwise signal success
ret ; and return
;
chkdevu1:
ld a,(slice) ; get specified slice
or a ; set flags
jp nz,errslc ; invalid slice error
xor a ; otherwise, signal OK
ret ; and return
;
; Print character in A without destroying any registers
;
prtchr:
push bc ; save registers
push de
push hl
ld e,a ; character to print in E
ld c,$02 ; BDOS function to output a character
call bdos ; do it
pop hl ; restore registers
pop de
pop bc
ret
;
prtdot:
;
; shortcut to print a dot preserving all regs
push af ; save af
ld a,'.' ; load dot char
call prtchr ; print it
pop af ; restore af
ret ; done
;
; Print a zero terminated string at (HL) without destroying any registers
;
prtstr:
push de
;
prtstr1:
ld a,(de) ; get next char
or a
jr z,prtstr2
call prtchr
inc de
jr prtstr1
;
prtstr2:
pop de ; restore registers
ret
;
; Print the value in A in hex without destroying any registers
;
prthex:
push af ; save AF
push de ; save DE
call hexascii ; convert value in A to hex chars in DE
ld a,d ; get the high order hex char
call prtchr ; print it
ld a,e ; get the low order hex char
call prtchr ; print it
pop de ; restore DE
pop af ; restore AF
ret ; done
;
; print the hex word value in bc
;
prthexword:
push af
ld a,b
call prthex
ld a,c
call prthex
pop af
ret
;
; Convert binary value in A to ascii hex characters in DE
;
hexascii:
ld d,a ; save A in D
call hexconv ; convert low nibble of A to hex
ld e,a ; save it in E
ld a,d ; get original value back
rlca ; rotate high order nibble to low bits
rlca
rlca
rlca
call hexconv ; convert nibble
ld d,a ; save it in D
ret ; done
;
; Convert low nibble of A to ascii hex
;
hexconv:
and $0F ; low nibble only
add a,$90
daa
adc a,$40
daa
ret
;
; Print value of A or HL in decimal with leading zero suppression
; Use prtdecb for A or prtdecw for HL
;
prtdecb:
push hl
ld h,0
ld l,a
call prtdecw ; print it
pop hl
ret
;
prtdecw:
push af
push bc
push de
push hl
call prtdec0
pop hl
pop de
pop bc
pop af
ret
;
prtdec0:
ld e,'0'
ld bc,-10000
call prtdec1
ld bc,-1000
call prtdec1
ld bc,-100
call prtdec1
ld c,-10
call prtdec1
ld e,0
ld c,-1
prtdec1:
ld a,'0' - 1
prtdec2:
inc a
add hl,bc
jr c,prtdec2
sbc hl,bc
cp e
ret z
ld e,0
call prtchr
ret
;
; Start a new line
;
crlf2:
call crlf ; two of them
crlf:
push af ; preserve AF
ld a,13 ; <CR>
call prtchr ; print it
ld a,10 ; <LF>
call prtchr ; print it
pop af ; restore AF
ret
;
; Get the next non-blank character from (HL).
;
nonblank:
ld a,(hl) ; load next character
or a ; string ends with a null
ret z ; if null, return pointing to null
cp ' ' ; check for blank
ret nz ; return if not blank
inc hl ; if blank, increment character pointer
jr nonblank ; and loop
;
; Check character at (DE) for delimiter.
;
delim: or a
ret z
cp ' ' ; blank
ret z
jr c,delim1 ; handle control characters
cp '=' ; equal
ret z
cp '_' ; underscore
ret z
cp '.' ; period
ret z
cp ':' ; colon
ret z
cp $3B ; semicolon
ret z
cp '<' ; less than
ret z
cp '>' ; greater than
ret
delim1:
; treat control chars as delimiters
xor a ; set Z
ret ; return
;
; Get alpha chars and save in tmpstr
; return with terminating char in A and flags set
; return with num chars in B
;
getalpha:
;
ld de,tmpstr ; location to save chars
ld b,0 ; length counter
;
getalpha1:
ld a,(hl) ; get active char
cp 'A' ; check for start of alpha range
jr c,getalpha2 ; not alpha, get out
cp 'Z' + 1 ; check for end of alpha range
jr nc,getalpha2 ; not alpha, get out
; handle alpha char
inc hl ; increment buffer ptr
ld (de),a ; save it
inc de ; inc string pointer
inc b ; inc string length
ld a,b ; put length in A
cp 8 ; max length?
jr z,getalpha2 ; if max, get out
jr getalpha1 ; and loop
;
getalpha2: ; non-alpha, clean up and return
xor a ; clear accum
ld (de),a ; terminate string
ld a,(hl) ; recover terminating char
or a ; set flags
ret ; and done
;
; Get numeric chars and convert to number returned in A
; Carry flag set on overflow
;
getnum:
ld c,0 ; C is working register
getnum1:
ld a,(hl) ; get the active char
cp '0' ; compare to ascii '0'
jr c,getnum2 ; abort if below
cp '9' + 1 ; compare to ascii '9'
jr nc,getnum2 ; abort if above\
;
; valid digit, add new digit to C
ld a,c ; get working value to A
rlca ; multiply by 10
ret c ; overflow, return with carry set
rlca ; ...
ret c ; overflow, return with carry set
add a,c ; ...
ret c ; overflow, return with carry set
rlca ; ...
ret c ; overflow, return with carry set
ld c,a ; back to C
ld a,(hl) ; get new digit
sub '0' ; make binary
add a,c ; add in working value
ret c ; overflow, return with carry set
ld c,a ; back to C
;
inc hl ; bump to next char
jr getnum1 ; loop
;
getnum2: ; return result
ld a,c ; return result in A
or a ; with flags set, CF is cleared
ret
;
; Compare null terminated strings at HL & DE
; If equal return with Z set, else NZ
;
strcmp:
;
ld a,(de) ; get current source char
cp (hl) ; compare to current dest char
ret nz ; compare failed, return with NZ
or a ; set flags
ret z ; end of string, match, return with Z set
inc de ; point to next char in source
inc hl ; point to next char in dest
jr strcmp ; loop till done
;
; Invoke CBIOS function
; The CBIOS function offset must be stored in the byte
; following the call instruction. ex:
; call cbios
; .db $0C ; offset of CONOUT CBIOS function
;
cbios:
ex (sp),hl
ld a,(hl) ; get the function offset
inc hl ; point past value following call instruction
ex (sp),hl ; put address back at top of stack and recover HL
ld hl,(bioloc) ; address of CBIOS function table to HL
call addhl ; determine specific function address
jp (hl) ; invoke CBIOS
;
; Add the value in A to HL (HL := HL + A)
;
addhl:
add a,l ; A := A + L
ld l,a ; Put result back in L
ret nc ; if no carry, we are done
inc h ; if carry, increment H
ret ; and return
;
; Jump indirect to address in HL
;
jphl:
jp (hl)
;
; Errors
;
erruse: ; command usage error (syntax)
ld de,msguse
jr err
;
errprm: ; command parameter error (syntax)
ld de,msgprm
jr err
;
errinv: ; invalid CBIOS, zp signature not found
ld de,msginv
jr err
;
errver: ; CBIOS version is not as expected
ld de,msgver
jr err
;
errdrv: ; Invalid drive letter specified
push af
call crlf
ld de,msgdrv1
call prtstr
pop af
add a,'A'
call prtchr
ld de,msgdrv2
jr err1
;
errswp: ; invalid drive swap request
ld de,msgswp
jr err
;
errdev: ; invalid device name
ld de,msgdev
jr err
;
errslc: ; invalid slice
ld de,msgslc
jr err
;
errtyp: ; invalid device assignment request (not a hard disk device type)
ld de,msgtyp
jr err
;
errnum: ; invalid number parsed, overflow
ld de,msgnum
jr err
;
errint: ; DPH table integrity error (multiple drives ref one filesystem)
ld de,msgint
jr err
;
errnoa: ; No A: drive assignment
ld de,msgnoa
jr err
;
errovf: ; CBIOS disk buffer overflow
ld de,msgovf
jr err
;
errdos: ; handle BDOS errors
push af ; save return code
call crlf ; newline
ld de,msgdos ; load
call prtstr ; and print error string
pop af ; recover return code
call prthex ; print error code
jr err2
;
err: ; print error string and return error signal
call crlf2 ; print double newline
;
err1: ; without the leading crlf
call prtstr ; print error string
;
err2: ; without the string
; call crlf ; print newline
or $FF ; signal error
ret ; done
;
;===============================================================================
; Storage Section
;===============================================================================
;
;
bioloc .dw 0 ; CBIOS starting address
bioend .dw 0 ; CBIOS ending address
biosiz .dw 0 ; CBIOS size (in bytes)
maploc .dw 0 ; location of CBIOS drive map table
dpbloc .dw 0 ; location of CBIOS DPB map table
cpmver .dw 0 ; CP/M version
drvtbl .dw 0 ; CP/M 3 drive table address
dphadr .dw 0 ; CP/M 3 working value for DPH
;
drives:
dstdrv .db 0 ; destination drive
srcdrv .db 0 ; source drive
device .db 0 ; source device
unit .db 0 ; source unit
slice .db 0 ; source slice
;
unamod .db 0 ; $FF indicates UNA UBIOS active
modcnt .db 0 ; count of drive map modifications
;
srcptr .dw 0 ; source pointer for copy
dstptr .dw 0 ; destination pointer for copy
tmpent .fill 4,0 ; space to save a table entry
tmpstr .fill 9,0 ; temporary string of up to 8 chars, zero term
;
heaptop .dw 0 ; current address of top of heap memory
heaplim .dw 0 ; heap limit address
;
dirbuf .dw 0 ; directory buffer location
;
mapwrk .fill (4 * 16),$FF ; working copy of drive map
;
devtbl: ; device table
.dw dev00, dev01, dev02, dev03
.dw dev04, dev05, dev06, dev07
.dw dev08, dev09, dev10, dev11
.dw dev12, dev13, dev14, dev15
;
devunk .db "?",0
dev00 .db "MD",0
dev01 .db "FD",0
dev02 .db "RAMF",0
dev03 .db "IDE",0
dev04 .db "ATAPI",0
dev05 .db "PPIDE",0
dev06 .db "SD",0
dev07 .db "PRPSD",0
dev08 .db "PPPSD",0
dev09 .db "HDSK",0
dev10 .equ devunk
dev11 .equ devunk
dev12 .equ devunk
dev13 .equ devunk
dev14 .equ devunk
dev15 .equ devunk
;
devcnt .equ 10 ; 10 devices defined
;
udevram .db "RAM",0
udevrom .db "ROM",0
udevide .db "IDE",0
udevppide .db "PPIDE",0
udevsd .db "SD",0
udevdsd .db "DSD",0
udevunk .db "UNK",0
;
stksav .dw 0 ; stack pointer saved at start
xstksav .dw 0 ; temp stack save for error recovery
.fill stksiz,0 ; stack
stack .equ $ ; stack top
;
; Messages
;
indent .db " ",0
msgban1 .db "ASSIGN v1.1a for RomWBW CP/M, 24-Dec-2019",0
msghb .db " (HBIOS Mode)",0
msgub .db " (UBIOS Mode)",0
msgban2 .db "Copyright 2019, Wayne Warthen, GNU GPL v3",0
msguse .db "Usage: ASSIGN D:[=[{D:|<device>[<unitnum>]:[<slicenum>]}]][,...]",13,10
.db " ex. ASSIGN (display all active assignments)",13,10
.db " ASSIGN /? (display version and usage)",13,10
.db " ASSIGN /L (display all possible devices)",13,10
.db " ASSIGN C:=D: (swaps C: and D:)",13,10
.db " ASSIGN C:=FD0: (assign C: to floppy unit 0)",13,10
.db " ASSIGN C:=IDE0:1 (assign C: to IDE unit0, slice 1)",13,10
.db " ASSIGN C:= (unassign C:)",0
msgprm .db "Parameter error (ASSIGN /? for usage)",0
msginv .db "Unexpected CBIOS (signature missing)",0
msgver .db "Unexpected CBIOS version",0
msgdrv1 .db "Invalid drive letter (",0
msgdrv2 .db ":)",0
msgswp .db "Invalid drive swap request",0
msgdev .db "Invalid device name (ASSIGN /L for device list)",0
msgslc .db "Specified device does not support slices",0
msgnum .db "Unit or slice number invalid",0
msgovf .db "Disk buffer exceeded in CBIOS, aborted",0
msgtyp .db "Only hard drive devices can be reassigned",0
msgint .db "Multiple drive letters reference one filesystem, aborting!",0
msgnoa .db "Drive A: is unassigned, aborting!",0
msgdos .db "DOS error, return code=0x",0
msgmem .db " Disk Buffer Bytes Free",0
;
modsize .equ $ - start
;
.end
| 25.806316
| 84
| 0.631343
|
e37852ed5102de2cb168f0397a4613d3669cbf2d
| 1,385
|
asm
|
Assembly
|
chap15/ex7/median_avx_overlap.asm
|
JamesType/optimization-manual
|
61cdcebb16e0768a6ab7e85ed535e64e9d8cc31a
|
[
"0BSD"
] | 374
|
2021-06-08T10:42:01.000Z
|
2022-03-29T14:21:45.000Z
|
chap15/ex7/median_avx_overlap.asm
|
JamesType/optimization-manual
|
61cdcebb16e0768a6ab7e85ed535e64e9d8cc31a
|
[
"0BSD"
] | 1
|
2021-06-11T20:24:02.000Z
|
2021-06-11T20:24:02.000Z
|
chap15/ex7/median_avx_overlap.asm
|
JamesType/optimization-manual
|
61cdcebb16e0768a6ab7e85ed535e64e9d8cc31a
|
[
"0BSD"
] | 39
|
2021-06-08T11:25:29.000Z
|
2022-03-05T05:14:17.000Z
|
;
; Copyright (C) 2021 by Intel Corporation
;
; Permission to use, copy, modify, and/or distribute this software for any
; purpose with or without fee is hereby granted.
;
; THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
; REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
; AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
; INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
; LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
; OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
; PERFORMANCE OF THIS SOFTWARE.
;
; .globl median_avx_overlap
; void median_avx_overlap(float *x, float *y, uint64_t len);
; On entry:
; rcx = x
; rdx = y
; r8 = len
.code
median_avx_overlap PROC public
push rbx
xor ebx, ebx
;mov rcx, rdx ; mov rcx, len
; rcx and rdx already point to x and y the inputs and outputs
; mov rcx, inPtr
; mov rdx, outPtr
vmovaps ymm0, [rcx]
loop_start:
vshufps ymm2, ymm0, [rcx+16], 4Eh
vshufps ymm1, ymm0, ymm2, 99h
add rbx, 8
add rcx, 32
vminps ymm4, ymm0, ymm1
vmaxps ymm0, ymm0, ymm1
vminps ymm3, ymm0, ymm2
vmaxps ymm5, ymm3, ymm4
vmovaps [rdx], ymm5
add rdx, 32
vmovaps ymm0, [rcx]
cmp rbx, r8
jl loop_start
vzeroupper
pop rbx
ret
median_avx_overlap ENDP
end
| 24.298246
| 79
| 0.725632
|
3c3a465a1259a9151e0bb3f6a20f0dfd1282f188
| 441
|
asm
|
Assembly
|
programs/oeis/005/A005097.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/005/A005097.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/005/A005097.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A005097: (Odd primes - 1)/2.
; 1,2,3,5,6,8,9,11,14,15,18,20,21,23,26,29,30,33,35,36,39,41,44,48,50,51,53,54,56,63,65,68,69,74,75,78,81,83,86,89,90,95,96,98,99,105,111,113,114,116,119,120,125,128,131,134,135,138,140,141,146,153,155,156,158,165,168,173,174,176,179,183,186,189,191,194,198,200,204,209,210,215,216,219,221,224,228,230,231,233,239,243,245,249,251,254,260,261,270,273
seq $0,98090 ; Numbers k such that 2k-3 is prime.
sub $0,2
| 73.5
| 349
| 0.693878
|
92e630e94df62d3ad01ff05ae1b08ddd363c056a
| 310
|
asm
|
Assembly
|
programs/oeis/021/A021511.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/021/A021511.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/021/A021511.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A021511: Decimal expansion of 1/507.
; 0,0,1,9,7,2,3,8,6,5,8,7,7,7,1,2,0,3,1,5,5,8,1,8,5,4,0,4,3,3,9,2,5,0,4,9,3,0,9,6,6,4,6,9,4,2,8,0,0,7,8,8,9,5,4,6,3,5,1,0,8,4,8,1,2,6,2,3,2,7,4,1,6,1,7,3,5,7,0,0,1,9,7,2,3,8,6,5,8,7,7,7,1,2,0,3,1,5,5
add $0,1
mov $1,10
pow $1,$0
mul $1,6
div $1,3042
mod $1,10
mov $0,$1
| 28.181818
| 199
| 0.541935
|
17c56303693721a9f37e35080f4eaccc96f43812
| 683
|
asm
|
Assembly
|
programs/oeis/324/A324053.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | 1
|
2021-03-15T11:38:20.000Z
|
2021-03-15T11:38:20.000Z
|
programs/oeis/324/A324053.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/324/A324053.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
; A324053: a(n) = 1 if n > 3 and A002322(n) divides n-3, 0 otherwise; Characteristic function of 3-Knödel numbers.
; 0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,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,1,0,0,0,0,0,1,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,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,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,1,0
cal $0,62173 ; a(n) = 2^(n-1) mod n.
sub $0,4
mov $1,$0
cmp $1,0
| 85.375
| 501
| 0.534407
|
2f97113294f2f8bf28a61b3c8cf8c02406694ac0
| 100
|
asm
|
Assembly
|
src/util/sprite/f1.asm
|
olifink/qspread
|
d6403d210bdad9966af5d2a0358d4eed3f1e1c02
|
[
"MIT"
] | null | null | null |
src/util/sprite/f1.asm
|
olifink/qspread
|
d6403d210bdad9966af5d2a0358d4eed3f1e1c02
|
[
"MIT"
] | null | null | null |
src/util/sprite/f1.asm
|
olifink/qspread
|
d6403d210bdad9966af5d2a0358d4eed3f1e1c02
|
[
"MIT"
] | null | null | null |
* Sprite f1
section sprite
xdef mes_f1
include 'dev8_keys_sysspr'
mes_f1
dc.b 0,sp.f1
*
end
| 8.333333
| 27
| 0.71
|
8a820172dfcaf2b88698192e7a1fae5c807298c6
| 650
|
asm
|
Assembly
|
oeis/107/A107959.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/107/A107959.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/107/A107959.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A107959: a(n) = (n+1)(n+2)^2*(n+3)^2*(n+4)(n^2 + 5n + 5)/720.
; Submitted by Jon Maiga
; 1,22,190,1015,4018,12936,35784,88110,197835,412126,806806,1498861,2662660,4550560,7518624,12058236,18834453,28731990,42909790,62865187,90508726,128250760,179101000,246782250,335859615,451886526,601568982,792949465,1035612040,1340910208,1722219136,2195213944,2778175785,3492327510,4362200766,5416036431,6686220346,8209756360,10028778760,12191106214,14750839411,17769004638,21314245590,25463565765,30303123852,35929084576,42448527520,49980416500,58656632125,68623070230,80040808926,93087347067
add $0,3
bin $0,2
mov $1,$0
mul $0,2
bin $0,3
mul $0,$1
div $0,60
| 54.166667
| 493
| 0.803077
|
b26fd6d6b65afb60175d07bb539fcd386cdb343e
| 316
|
asm
|
Assembly
|
pwnlib/shellcraft/templates/i386/linux/findpeerstager.asm
|
IMULMUL/python3-pwntools
|
61210a68cd88e9084c72292d3119c38c44f07966
|
[
"MIT"
] | 325
|
2016-01-25T08:38:06.000Z
|
2022-03-30T14:31:50.000Z
|
pwnlib/shellcraft/templates/i386/linux/findpeerstager.asm
|
IMULMUL/python3-pwntools
|
61210a68cd88e9084c72292d3119c38c44f07966
|
[
"MIT"
] | 8
|
2016-08-23T10:15:27.000Z
|
2019-01-16T02:49:34.000Z
|
pwnlib/shellcraft/templates/i386/linux/findpeerstager.asm
|
IMULMUL/python3-pwntools
|
61210a68cd88e9084c72292d3119c38c44f07966
|
[
"MIT"
] | 71
|
2016-07-13T10:03:52.000Z
|
2022-01-10T11:57:34.000Z
|
<% from pwnlib.shellcraft import common %>
<% from pwnlib.shellcraft.i386 import linux %>
<%docstring>
Findpeer recvsize stager
Args:
port, the port given to findpeer (defaults to any)
</%docstring>
<%page args="port=None"/>
${linux.findpeer(port)}
${linux.recvsize('esi', 'ecx')}
${linux.stager('ebx', 'ecx')}
| 24.307692
| 54
| 0.693038
|
cdf7698400a99f1ed40e4599b06a00bbf0634f7f
| 301
|
asm
|
Assembly
|
a/assembler_fasm_dos.asm
|
ozcanyarimdunya/FuckYouGithub
|
8c37d0f6be3dbe37d8ff5d9bf22ad997527331dc
|
[
"Apache-2.0"
] | null | null | null |
a/assembler_fasm_dos.asm
|
ozcanyarimdunya/FuckYouGithub
|
8c37d0f6be3dbe37d8ff5d9bf22ad997527331dc
|
[
"Apache-2.0"
] | null | null | null |
a/assembler_fasm_dos.asm
|
ozcanyarimdunya/FuckYouGithub
|
8c37d0f6be3dbe37d8ff5d9bf22ad997527331dc
|
[
"Apache-2.0"
] | null | null | null |
format MZ
entry .code: start
segment .code
start:
mov ax, .data ; put data segment into ax
mov ds, ax ; there, I setup the DS for you
mov dx, msg ; now I give you the offset in DX. DS:DX now completed.
mov ah, 9h
int 21h
mov ah, 4ch
int 21h
segment .data
msg db 'Fuck You Github', '$'
| 17.705882
| 70
| 0.664452
|
b0b452a8138802e733cd7aef67db28d4850f174d
| 4,028
|
asm
|
Assembly
|
data/wild/kanto_grass.asm
|
zavytar/pokecolorless
|
5fa4930f9f90acaff7ae62367e3d9feae0404464
|
[
"blessing"
] | null | null | null |
data/wild/kanto_grass.asm
|
zavytar/pokecolorless
|
5fa4930f9f90acaff7ae62367e3d9feae0404464
|
[
"blessing"
] | null | null | null |
data/wild/kanto_grass.asm
|
zavytar/pokecolorless
|
5fa4930f9f90acaff7ae62367e3d9feae0404464
|
[
"blessing"
] | null | null | null |
; Kanto Pokémon in grass
KantoGrassWildMons:
map_id ROUTE_1
db 10 percent, 10 percent, 10 percent ; encounter rates: morn/day/nite
; morn
db 2, PIDGEY
db 2, RATTATA
db 3, RATTATA
db 3, PIDGEY
db 6, RATTATA
db 4, PIDGEY
db 4, PIDGEY
; day
db 2, PIDGEY
db 2, RATTATA
db 3, RATTATA
db 3, PIDGEY
db 6, RATTATA
db 4, PIDGEY
db 4, PIDGEY
; nite
db 2, HOOTHOOT
db 2, RATTATA
db 3, RATTATA
db 3, HOOTHOOT
db 6, RATTATA
db 4, HOOTHOOT
db 4, HOOTHOOT
map_id ROUTE_2
db 10 percent, 10 percent, 10 percent ; encounter rates: morn/day/nite
; morn
db 3, CATERPIE
db 3, LEDYBA
db 5, PIDGEY
db 7, CATERPIE
db 7, LEDIAN
db 4, PIKACHU
db 4, PIKACHU
; day
db 3, CATERPIE
db 3, PIDGEY
db 5, PIDGEY
db 7, CATERPIE
db 7, PIDGEOTTO
db 4, PIKACHU
db 4, PIKACHU
; nite
db 3, HOOTHOOT
db 3, SPINARAK
db 5, HOOTHOOT
db 7, NOCTOWL
db 7, CATERPIE
db 4, NOCTOWL
db 4, NOCTOWL
map_id ROUTE_22
db 10 percent, 10 percent, 10 percent ; encounter rates: morn/day/nite
; morn
db 3, RATTATA
db 3, SPEAROW
db 5, SPEAROW
db 4, DODUO
db 6, PONYTA
db 7, FEAROW
db 7, FEAROW
; day
db 3, RATTATA
db 3, SPEAROW
db 5, SPEAROW
db 4, DODUO
db 6, PONYTA
db 7, FEAROW
db 7, FEAROW
; nite
db 3, RATTATA
db 3, POLIWAG
db 5, RATTATA
db 4, POLIWAG
db 6, RATTATA
db 7, RATTATA
db 7, RATTATA
map_id VIRIDIAN_FOREST
db 4 percent, 4 percent, 4 percent ; encounter rates: morn/day/nite
; morn
db 5, CATERPIE
db 5, WEEDLE
db 7, METAPOD
db 7, KAKUNA
db 5, PIDGEY
db 5, PIKACHU
db 9, PIDGEOTTO
; day
db 5, CATERPIE
db 5, WEEDLE
db 7, METAPOD
db 7, KAKUNA
db 5, PIDGEY
db 5, PIKACHU
db 5, BULBASAUR
; nite
db 5, CATERPIE
db 5, WEEDLE
db 7, METAPOD
db 7, KAKUNA
db 5, ODDISH
db 6, ODDISH
db 5, PIKACHU
db -1 ; end
map_id ROUTE_3
db 10 percent, 10 percent, 10 percent ; encounter rates: morn/day/nite
; morn
db 3, SPEAROW
db 3, NIDORAN_M
db 5, NIDORAN_F
db 7, MANKEY
db 7, LEDIAN
db 4, JIGGLYPUFF
db 4, PIKACHU
; day
db 3, SPEAROW
db 3, NIDORAN_M
db 5, NIDORAN_F
db 7, MANKEY
db 7, PIDGEOTTO
db 4, JIGGLYPUFF
db 4, PIKACHU
; nite
db 3, SPEAROW
db 3, NIDORAN_M
db 5, NIDORAN_F
db 7, JIGGLYPUFF
db 7, CATERPIE
db 4, NOCTOWL
db 4, NOCTOWL
map_id MOUNT_MOON_1F
db 10 percent, 10 percent, 10 percent ; encounter rates: morn/day/nite
; morn
db 3, SPEAROW
db 3, NIDORAN_M
db 5, NIDORAN_F
db 7, MANKEY
db 7, LEDIAN
db 4, JIGGLYPUFF
db 4, PIKACHU
; day
db 3, SPEAROW
db 3, NIDORAN_M
db 5, NIDORAN_F
db 7, MANKEY
db 7, PIDGEOTTO
db 4, JIGGLYPUFF
db 4, PIKACHU
; nite
db 3, SPEAROW
db 3, NIDORAN_M
db 5, NIDORAN_F
db 7, JIGGLYPUFF
db 7, CATERPIE
db 4, NOCTOWL
db 4, NOCTOWL
map_id MOUNT_MOON_B1F
db 10 percent, 10 percent, 10 percent ; encounter rates: morn/day/nite
; morn
db 3, SPEAROW
db 3, NIDORAN_M
db 5, NIDORAN_F
db 7, MANKEY
db 7, LEDIAN
db 4, JIGGLYPUFF
db 4, PIKACHU
; day
db 3, SPEAROW
db 3, NIDORAN_M
db 5, NIDORAN_F
db 7, MANKEY
db 7, PIDGEOTTO
db 4, JIGGLYPUFF
db 4, PIKACHU
; nite
db 3, SPEAROW
db 3, NIDORAN_M
db 5, NIDORAN_F
db 7, JIGGLYPUFF
db 7, CATERPIE
db 4, NOCTOWL
db 4, NOCTOWL
map_id MOUNT_MOON_B2F
db 10 percent, 10 percent, 10 percent ; encounter rates: morn/day/nite
; morn
db 3, SPEAROW
db 3, NIDORAN_M
db 5, NIDORAN_F
db 7, MANKEY
db 7, LEDIAN
db 4, JIGGLYPUFF
db 4, PIKACHU
; day
db 3, SPEAROW
db 3, NIDORAN_M
db 5, NIDORAN_F
db 7, MANKEY
db 7, PIDGEOTTO
db 4, JIGGLYPUFF
db 4, PIKACHU
; nite
db 3, SPEAROW
db 3, NIDORAN_M
db 5, NIDORAN_F
db 7, JIGGLYPUFF
db 7, CATERPIE
db 4, NOCTOWL
db 4, NOCTOWL
map_id ROUTE_4
db 10 percent, 10 percent, 10 percent ; encounter rates: morn/day/nite
; morn
db 3, SPEAROW
db 3, NIDORAN_M
db 5, NIDORAN_F
db 7, MANKEY
db 7, LEDIAN
db 4, JIGGLYPUFF
db 4, PIKACHU
; day
db 3, SPEAROW
db 3, NIDORAN_M
db 5, NIDORAN_F
db 7, MANKEY
db 7, PIDGEOTTO
db 4, JIGGLYPUFF
db 4, PIKACHU
; nite
db 3, SPEAROW
db 3, NIDORAN_M
db 5, NIDORAN_F
db 7, JIGGLYPUFF
db 7, CATERPIE
db 4, NOCTOWL
db 4, NOCTOWL
| 16.112
| 71
| 0.683714
|
5c6283b66ceef7469c067bbdf99d297fd7c31fc3
| 38
|
asm
|
Assembly
|
projects/project08/src/translations/and.asm
|
lemmingapex/ElementsOfComputingSystems
|
649c19676141a92ffec4f52b28388ad59048ee04
|
[
"MIT"
] | 15
|
2015-05-03T10:35:44.000Z
|
2021-07-21T08:59:03.000Z
|
projects/project08/src/translations/and.asm
|
jigth/ElementsOfComputingSystems
|
649c19676141a92ffec4f52b28388ad59048ee04
|
[
"MIT"
] | null | null | null |
projects/project08/src/translations/and.asm
|
jigth/ElementsOfComputingSystems
|
649c19676141a92ffec4f52b28388ad59048ee04
|
[
"MIT"
] | 9
|
2017-02-18T02:29:20.000Z
|
2021-11-29T22:49:58.000Z
|
// and
@SP
AM=M-1
D=M
@SP
A=M-1
M=D&M
| 4.75
| 6
| 0.5
|
4041b4acfcf1571e5d9f4ad1b6c9df76ac63f9b0
| 3,737
|
asm
|
Assembly
|
bcm-secimage/gmp-6.0.0/mpn/gcd_1.asm
|
hixio-mh/citadel_sdk_2.1.1
|
bd15f6ae6c4b39c069d5beefa30c820e351d3b52
|
[
"Apache-2.0"
] | null | null | null |
bcm-secimage/gmp-6.0.0/mpn/gcd_1.asm
|
hixio-mh/citadel_sdk_2.1.1
|
bd15f6ae6c4b39c069d5beefa30c820e351d3b52
|
[
"Apache-2.0"
] | null | null | null |
bcm-secimage/gmp-6.0.0/mpn/gcd_1.asm
|
hixio-mh/citadel_sdk_2.1.1
|
bd15f6ae6c4b39c069d5beefa30c820e351d3b52
|
[
"Apache-2.0"
] | null | null | null |
dnl x86 mpn_gcd_1 optimised for processors with fast BSF.
dnl Based on the K7 gcd_1.asm, by Kevin Ryde. Rehacked by Torbjorn Granlund.
dnl Copyright 2000-2002, 2005, 2009, 2011, 2012 Free Software Foundation, Inc.
dnl This file is part of the GNU MP Library.
dnl
dnl The GNU MP Library is free software; you can redistribute it and/or modify
dnl it under the terms of either:
dnl
dnl * the GNU Lesser General Public License as published by the Free
dnl Software Foundation; either version 3 of the License, or (at your
dnl option) any later version.
dnl
dnl or
dnl
dnl * the GNU General Public License as published by the Free Software
dnl Foundation; either version 2 of the License, or (at your option) any
dnl later version.
dnl
dnl or both in parallel, as here.
dnl
dnl The GNU MP Library is distributed in the hope that it will be useful, but
dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
dnl for more details.
dnl
dnl You should have received copies of the GNU General Public License and the
dnl GNU Lesser General Public License along with the GNU MP Library. If not,
dnl see https://www.gnu.org/licenses/.
include(`../config.m4')
C cycles/bit (approx)
C AMD K7 7.80
C AMD K8,K9 7.79
C AMD K10 4.08
C AMD bd1 ?
C AMD bobcat 7.82
C Intel P4-2 14.9
C Intel P4-3/4 14.0
C Intel P6/13 5.09
C Intel core2 4.22
C Intel NHM 5.00
C Intel SBR 5.00
C Intel atom 17.1
C VIA nano ?
C Numbers measured with: speed -CD -s16-32 -t16 mpn_gcd_1
C Threshold of when to call bmod when U is one limb. Should be about
C (time_in_cycles(bmod_1,1) + call_overhead) / (cycles/bit).
define(`BMOD_THRES_LOG2', 6)
define(`up', `%edi')
define(`n', `%esi')
define(`v0', `%edx')
ASM_START()
TEXT
ALIGN(16)
PROLOGUE(mpn_gcd_1)
push %edi
push %esi
mov 12(%esp), up
mov 16(%esp), n
mov 20(%esp), v0
mov (up), %eax C U low limb
or v0, %eax
bsf %eax, %eax C min(ctz(u0),ctz(v0))
bsf v0, %ecx
shr %cl, v0
push %eax C preserve common twos over call
push v0 C preserve v0 argument over call
cmp $1, n
jnz L(reduce_nby1)
C Both U and V are single limbs, reduce with bmod if u0 >> v0.
mov (up), %ecx
mov %ecx, %eax
shr $BMOD_THRES_LOG2, %ecx
cmp %ecx, v0
ja L(reduced)
jmp L(bmod)
L(reduce_nby1):
cmp $BMOD_1_TO_MOD_1_THRESHOLD, n
jl L(bmod)
ifdef(`PIC_WITH_EBX',`
push %ebx
call L(movl_eip_to_ebx)
add $_GLOBAL_OFFSET_TABLE_, %ebx
')
push v0 C param 3
push n C param 2
push up C param 1
CALL( mpn_mod_1)
jmp L(called)
L(bmod):
ifdef(`PIC_WITH_EBX',`dnl
push %ebx
call L(movl_eip_to_ebx)
add $_GLOBAL_OFFSET_TABLE_, %ebx
')
push v0 C param 3
push n C param 2
push up C param 1
CALL( mpn_modexact_1_odd)
L(called):
add $12, %esp C deallocate params
ifdef(`PIC_WITH_EBX',`dnl
pop %ebx
')
L(reduced):
pop %edx
bsf %eax, %ecx
C test %eax, %eax C FIXME: does this lower latency?
jnz L(mid)
jmp L(end)
ALIGN(16) C K10 BD C2 NHM SBR
L(top): cmovc( %esi, %eax) C if x-y < 0 0,3 0,3 0,6 0,5 0,5
cmovc( %edi, %edx) C use x,y-x 0,3 0,3 2,8 1,7 1,7
L(mid): shr %cl, %eax C 1,7 1,6 2,8 2,8 2,8
mov %edx, %esi C 1 1 4 3 3
sub %eax, %esi C 2 2 5 4 4
bsf %esi, %ecx C 3 3 6 5 5
mov %eax, %edi C 2 2 3 3 4
sub %edx, %eax C 2 2 4 3 4
jnz L(top) C
L(end): pop %ecx
mov %edx, %eax
shl %cl, %eax
pop %esi
pop %edi
ret
ifdef(`PIC_WITH_EBX',`dnl
L(movl_eip_to_ebx):
mov (%esp), %ebx
ret
')
EPILOGUE()
| 23.802548
| 79
| 0.644902
|
9e3cf1aa688f41b19121877d4ec29d8a1afb40f2
| 9,163
|
asm
|
Assembly
|
Transynther/x86/_processed/NC/_zr_/i7-7700_9_0xca_notsx.log_21829_1970.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 9
|
2020-08-13T19:41:58.000Z
|
2022-03-30T12:22:51.000Z
|
Transynther/x86/_processed/NC/_zr_/i7-7700_9_0xca_notsx.log_21829_1970.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 1
|
2021-04-29T06:29:35.000Z
|
2021-05-13T21:02:30.000Z
|
Transynther/x86/_processed/NC/_zr_/i7-7700_9_0xca_notsx.log_21829_1970.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 3
|
2020-07-14T17:07:07.000Z
|
2022-03-21T01:12:22.000Z
|
.global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r12
push %r15
push %r8
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_WC_ht+0x944d, %rsi
lea addresses_A_ht+0x55cd, %rdi
clflush (%rsi)
nop
nop
nop
nop
and $46639, %rdx
mov $82, %rcx
rep movsb
nop
nop
nop
nop
xor %r8, %r8
lea addresses_WT_ht+0x1eacd, %r11
nop
nop
nop
nop
and $49092, %rsi
movb $0x61, (%r11)
nop
nop
nop
nop
and %rcx, %rcx
lea addresses_WT_ht+0xec4d, %rsi
lea addresses_WT_ht+0xc4de, %rdi
and $11596, %r12
mov $87, %rcx
rep movsq
nop
nop
nop
xor $7252, %rsi
lea addresses_normal_ht+0xe85d, %r12
clflush (%r12)
inc %r8
mov $0x6162636465666768, %rdi
movq %rdi, %xmm2
and $0xffffffffffffffc0, %r12
vmovntdq %ymm2, (%r12)
nop
nop
nop
nop
nop
and $45589, %rcx
lea addresses_WT_ht+0x9a0d, %r12
nop
nop
nop
nop
nop
add $51580, %r11
mov (%r12), %edi
nop
nop
nop
nop
and %rdi, %rdi
lea addresses_D_ht+0x14e81, %rsi
lea addresses_WT_ht+0xe24d, %rdi
clflush (%rsi)
nop
and $60827, %r15
mov $34, %rcx
rep movsl
nop
nop
cmp $44311, %rsi
lea addresses_D_ht+0x1a4dd, %rdx
add %r15, %r15
mov $0x6162636465666768, %rsi
movq %rsi, %xmm7
vmovups %ymm7, (%rdx)
nop
nop
sub $40882, %rdi
lea addresses_UC_ht+0xbffd, %rsi
lea addresses_UC_ht+0xe48d, %rdi
nop
nop
cmp $28440, %rdx
mov $75, %rcx
rep movsb
nop
xor %rdx, %rdx
lea addresses_normal_ht+0xc565, %rsi
nop
nop
nop
nop
inc %r11
movups (%rsi), %xmm1
vpextrq $1, %xmm1, %r15
xor %rcx, %rcx
lea addresses_A_ht+0xff50, %r15
nop
nop
xor %rdx, %rdx
movw $0x6162, (%r15)
nop
nop
nop
nop
cmp $46821, %r11
lea addresses_normal_ht+0x7a4d, %rsi
lea addresses_A_ht+0x1e58d, %rdi
nop
nop
nop
xor $1952, %r8
mov $53, %rcx
rep movsq
nop
and $13934, %r8
lea addresses_UC_ht+0x15271, %rsi
lea addresses_A_ht+0x19c4d, %rdi
nop
nop
cmp $3052, %rdx
mov $21, %rcx
rep movsq
and %r12, %r12
lea addresses_A_ht+0x1cbad, %rsi
lea addresses_normal_ht+0xf31d, %rdi
nop
nop
nop
nop
mfence
mov $36, %rcx
rep movsl
nop
nop
cmp %r12, %r12
lea addresses_normal_ht+0x144d, %rsi
lea addresses_WC_ht+0xf44d, %rdi
xor $59763, %r12
mov $106, %rcx
rep movsw
nop
nop
and $19609, %rdi
lea addresses_UC_ht+0x1ac4d, %rcx
nop
nop
dec %rdi
movb $0x61, (%rcx)
nop
cmp $14340, %r11
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %r8
pop %r15
pop %r12
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r12
push %r13
push %r8
push %rdi
push %rdx
push %rsi
// Store
lea addresses_A+0x1444d, %r12
nop
nop
nop
and $9553, %r8
movw $0x5152, (%r12)
nop
nop
nop
add $44667, %r10
// Store
lea addresses_A+0x9f8d, %rdx
nop
add %rdi, %rdi
mov $0x5152535455565758, %r12
movq %r12, (%rdx)
nop
nop
nop
nop
cmp %r8, %r8
// Store
mov $0x84d, %r10
clflush (%r10)
nop
nop
nop
add %r12, %r12
movl $0x51525354, (%r10)
nop
cmp $64856, %rdi
// Store
lea addresses_RW+0x880d, %rdx
nop
and $15882, %r12
movb $0x51, (%rdx)
nop
nop
nop
nop
cmp %rdx, %rdx
// Store
lea addresses_normal+0x144d, %rsi
nop
nop
add $41032, %r8
movw $0x5152, (%rsi)
add $54352, %rdi
// Faulty Load
mov $0x2a9f20000000c4d, %r8
nop
nop
sub %r10, %r10
mov (%r8), %r13
lea oracles, %rdx
and $0xff, %r13
shlq $12, %r13
mov (%rdx,%r13,1), %r13
pop %rsi
pop %rdx
pop %rdi
pop %r8
pop %r13
pop %r12
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 0, 'same': False, 'type': 'addresses_NC'}, 'OP': 'LOAD'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 9, 'same': False, 'type': 'addresses_A'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': True, 'size': 8, 'congruent': 4, 'same': False, 'type': 'addresses_A'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 10, 'same': False, 'type': 'addresses_P'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': True, 'size': 1, 'congruent': 6, 'same': False, 'type': 'addresses_RW'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 10, 'same': False, 'type': 'addresses_normal'}, 'OP': 'STOR'}
[Faulty Load]
{'src': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 0, 'same': True, 'type': 'addresses_NC'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'congruent': 9, 'same': False, 'type': 'addresses_WC_ht'}, 'dst': {'congruent': 7, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'REPM'}
{'dst': {'NT': False, 'AVXalign': True, 'size': 1, 'congruent': 7, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'STOR'}
{'src': {'congruent': 11, 'same': False, 'type': 'addresses_WT_ht'}, 'dst': {'congruent': 0, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'REPM'}
{'dst': {'NT': True, 'AVXalign': False, 'size': 32, 'congruent': 1, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'STOR'}
{'src': {'NT': False, 'AVXalign': True, 'size': 4, 'congruent': 6, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 2, 'same': False, 'type': 'addresses_D_ht'}, 'dst': {'congruent': 8, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'REPM'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 4, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'STOR'}
{'src': {'congruent': 4, 'same': False, 'type': 'addresses_UC_ht'}, 'dst': {'congruent': 5, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'REPM'}
{'src': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 2, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'LOAD'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 0, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'STOR'}
{'src': {'congruent': 9, 'same': False, 'type': 'addresses_normal_ht'}, 'dst': {'congruent': 2, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'REPM'}
{'src': {'congruent': 2, 'same': False, 'type': 'addresses_UC_ht'}, 'dst': {'congruent': 11, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'REPM'}
{'src': {'congruent': 0, 'same': False, 'type': 'addresses_A_ht'}, 'dst': {'congruent': 0, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'REPM'}
{'src': {'congruent': 11, 'same': True, 'type': 'addresses_normal_ht'}, 'dst': {'congruent': 11, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'REPM'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 10, 'same': True, 'type': 'addresses_UC_ht'}, 'OP': 'STOR'}
{'00': 21829}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
| 31.926829
| 2,999
| 0.65579
|
324f865d3ccaa74fb7f5b63223c7e46b334b9192
| 401
|
asm
|
Assembly
|
programs/oeis/051/A051340.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/051/A051340.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/051/A051340.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
; A051340: A simple 2-dimensional array, read by antidiagonals: T[i,j] = 1 for j>0, T[i,0] = i+1; i,j = 0,1,2,3,...
; 1,1,2,1,1,3,1,1,1,4,1,1,1,1,5,1,1,1,1,1,6,1,1,1,1,1,1,7,1,1,1,1,1,1,1,8,1,1,1,1,1,1,1,1,9,1,1,1,1,1,1,1,1,1,10,1,1,1,1,1,1,1,1,1,1,11,1,1,1,1,1,1,1,1,1,1,1,12,1,1,1,1,1,1,1,1,1,1,1,1,13,1,1,1,1,1,1
add $0,2
lpb $0,1
trn $0,$1
sub $0,1
add $1,1
lpe
mul $1,$0
trn $1,1
add $1,1
| 30.846154
| 199
| 0.533666
|
f004a8e4affd0a1525696bcde9ad8ae4217b67a6
| 164
|
asm
|
Assembly
|
src/Lib/Sassy/tests/rm.asm
|
pnkfelix/larceny
|
4671a1f8acbd3f8d4d95e96672eae8b2a33502d3
|
[
"MIT"
] | 212
|
2015-01-06T06:39:01.000Z
|
2022-03-15T00:34:09.000Z
|
src/Lib/Sassy/tests/rm.asm
|
larcenists/larceny-oldimport
|
4bfd2d2571d3f11f9a51e2d5fa5982211fb276cb
|
[
"MIT"
] | 209
|
2015-01-17T00:18:33.000Z
|
2021-11-15T21:52:15.000Z
|
src/Lib/Sassy/tests/rm.asm
|
larcenists/larceny-oldimport
|
4bfd2d2571d3f11f9a51e2d5fa5982211fb276cb
|
[
"MIT"
] | 39
|
2015-02-12T05:49:09.000Z
|
2021-08-31T03:35:18.000Z
|
BITS 32
section .text
foo:
invlpg [dword 300+8*esi+esp]
lgdt [dword 300+8*esi+esp]
sgdt [dword 300+8*esi+esp]
lidt [dword 300+8*esi+esp]
sidt [dword 300+8*esi+esp]
| 18.222222
| 28
| 0.713415
|
99941f6729fdc202ef3ef26440261aadc9cfd0a7
| 387
|
asm
|
Assembly
|
programs/oeis/168/A168321.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/168/A168321.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/168/A168321.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A168321: a(n) = n +6 - a(n-1), with a(1) = 0.
; 0,8,1,9,2,10,3,11,4,12,5,13,6,14,7,15,8,16,9,17,10,18,11,19,12,20,13,21,14,22,15,23,16,24,17,25,18,26,19,27,20,28,21,29,22,30,23,31,24,32,25,33,26,34,27,35,28,36,29,37,30,38,31,39,32,40,33,41,34,42,35,43,36,44,37,45,38,46,39,47,40,48,41,49,42,50,43,51,44,52,45,53,46,54,47,55,48,56,49,57
mov $1,$0
mod $1,2
mul $1,16
add $0,$1
div $0,2
| 43
| 289
| 0.607235
|
6aa93235490d445ddd2712053d9d8df532cbf229
| 1,390
|
asm
|
Assembly
|
ASS4/sqrt (q3).asm
|
rahulkumawat1/NASM
|
09b69e1338e59e43b6ff7403337d13810070d59f
|
[
"MIT"
] | null | null | null |
ASS4/sqrt (q3).asm
|
rahulkumawat1/NASM
|
09b69e1338e59e43b6ff7403337d13810070d59f
|
[
"MIT"
] | null | null | null |
ASS4/sqrt (q3).asm
|
rahulkumawat1/NASM
|
09b69e1338e59e43b6ff7403337d13810070d59f
|
[
"MIT"
] | null | null | null |
section .text
global main
extern scanf
extern printf
print:
push ebp
mov ebp, esp
sub esp, 8
fst qword[ebp-8]
push format2
call printf
mov esp, ebp
pop ebp
ret
read:
push ebp
mov ebp, esp
sub esp, 8
lea eax, [esp]
push eax
push format1
call scanf
fld qword[ebp-8]
mov esp, ebp
pop ebp
ret
readnat:
push ebp
mov ebp, esp
sub esp , 2
lea eax , [ebp-2]
push eax
push format3
call scanf
mov ax, word[ebp-2]
mov word[num], ax
mov esp, ebp
pop ebp
ret
read_float:
push ebp
mov ebp, esp
sub esp, 8
lea eax, [esp]
push eax
push format1
call scanf
fld qword[ebp - 8]
mov esp, ebp
pop ebp
ret
print_float:
push ebp
mov ebp, esp
sub esp, 8
fst qword[ebp - 8]
push format2
call printf
mov esp, ebp
pop ebp
ret
main:
mov eax,4
mov ebx,1
mov ecx,msg1
mov edx,len1
int 80h
call read_float
fstp qword[float1]
fld qword[i]
for:
fst qword[temp]
fmul qword[temp]
fcom qword[float1]
fstsw ax
sahf
ja end
fstp qword[float2]
fld qword[temp]
fadd qword[x]
jmp for
end:
fstp qword[float2]
fld qword[temp]
fsub qword[x]
call print_float
ffree st0
ffree st1
fld qword[float1]
fsqrt
call print_float
exit:
mov eax, 1
mov ebx, 0
int 80h
section .data
format1: db "%lf",0
format2: db "The square root is %lf",10
format3: db "%d", 0
msg1: db "Enter the no : "
len1: equ $-msg1
x: dq 0.001
i: dq 0.001
section .bss
float1: resq 1
float2: resq 1
m: resq 1
num: resw 1
num2: resw 1
temp: resq 1
| 10.072464
| 40
| 0.71223
|
006258e4e0ec2987b0c9d299b7d0cc4a2b73ee60
| 430
|
asm
|
Assembly
|
programs/oeis/243/A243256.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/243/A243256.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/243/A243256.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A243256: Smallest distance of the n-th Fibonacci number to the set of all square integers.
; 0,0,0,1,1,1,1,3,4,2,6,8,0,8,16,15,26,3,17,44,41,79,22,96,143,51,289,169,285,140,296,669,267,1449,343,1979,144,592,665,4223,699,5283,2872,19604,6477,21826,17999,16008,46080,31240,102696,8638,45526,95764
seq $0,45 ; Fibonacci numbers: F(n) = F(n-1) + F(n-2) with F(0) = 0 and F(1) = 1.
seq $0,53188 ; Distance from n to nearest square.
| 71.666667
| 203
| 0.7
|
4c9192ae12af4dfa3ec87de5b55c48a75dccf7a7
| 7,549
|
asm
|
Assembly
|
Transynther/x86/_processed/US/_zr_/i9-9900K_12_0xca_notsx.log_21829_158.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 9
|
2020-08-13T19:41:58.000Z
|
2022-03-30T12:22:51.000Z
|
Transynther/x86/_processed/US/_zr_/i9-9900K_12_0xca_notsx.log_21829_158.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 1
|
2021-04-29T06:29:35.000Z
|
2021-05-13T21:02:30.000Z
|
Transynther/x86/_processed/US/_zr_/i9-9900K_12_0xca_notsx.log_21829_158.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 3
|
2020-07-14T17:07:07.000Z
|
2022-03-21T01:12:22.000Z
|
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r12
push %r14
push %r8
push %r9
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_normal_ht+0x1eb51, %rsi
nop
nop
nop
and $40257, %r10
vmovups (%rsi), %ymm1
vextracti128 $1, %ymm1, %xmm1
vpextrq $1, %xmm1, %rdx
nop
nop
nop
nop
nop
and %r9, %r9
lea addresses_WT_ht+0x1c7e1, %r14
nop
nop
nop
sub %rsi, %rsi
vmovups (%r14), %ymm2
vextracti128 $1, %ymm2, %xmm2
vpextrq $0, %xmm2, %r8
nop
and $11797, %r9
lea addresses_normal_ht+0xdb29, %rsi
nop
nop
add %r12, %r12
mov $0x6162636465666768, %rdx
movq %rdx, (%rsi)
nop
sub $36787, %r14
lea addresses_WC_ht+0x11af1, %rsi
lea addresses_WT_ht+0x4a81, %rdi
nop
nop
nop
nop
sub $61230, %r14
mov $102, %rcx
rep movsb
nop
nop
nop
nop
add $28703, %r14
lea addresses_WT_ht+0x15551, %rsi
lea addresses_D_ht+0x114d1, %rdi
clflush (%rdi)
nop
nop
nop
add $51238, %rdx
mov $119, %rcx
rep movsw
nop
nop
nop
inc %rcx
lea addresses_UC_ht+0x7851, %r10
nop
dec %rdi
mov $0x6162636465666768, %r9
movq %r9, %xmm7
movups %xmm7, (%r10)
nop
nop
nop
nop
cmp $13588, %rcx
lea addresses_D_ht+0x10c91, %r10
nop
nop
nop
nop
sub $25310, %rdx
movl $0x61626364, (%r10)
nop
nop
nop
nop
nop
add %rdi, %rdi
lea addresses_UC_ht+0x15ae6, %r10
clflush (%r10)
nop
nop
xor %r12, %r12
mov $0x6162636465666768, %rdi
movq %rdi, %xmm1
movups %xmm1, (%r10)
nop
nop
cmp %r8, %r8
lea addresses_D_ht+0x1b551, %rsi
lea addresses_WT_ht+0x12151, %rdi
nop
nop
nop
add $32721, %r14
mov $21, %rcx
rep movsb
nop
sub %r12, %r12
lea addresses_WT_ht+0xcd51, %r10
nop
nop
nop
cmp %rsi, %rsi
mov $0x6162636465666768, %r14
movq %r14, %xmm7
and $0xffffffffffffffc0, %r10
vmovntdq %ymm7, (%r10)
nop
nop
nop
nop
dec %rsi
lea addresses_A_ht+0x165e5, %rsi
lea addresses_normal_ht+0xddc2, %rdi
nop
nop
nop
sub $13657, %r8
mov $44, %rcx
rep movsq
nop
nop
nop
nop
nop
add $55764, %r10
lea addresses_A_ht+0xd4d1, %rcx
nop
nop
nop
nop
nop
add $2736, %rdx
mov $0x6162636465666768, %rdi
movq %rdi, (%rcx)
nop
cmp $22045, %r12
lea addresses_A_ht+0x1509c, %rdi
nop
nop
nop
nop
nop
and %rcx, %rcx
movl $0x61626364, (%rdi)
nop
nop
nop
nop
nop
cmp $63688, %r9
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %r9
pop %r8
pop %r14
pop %r12
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r13
push %r14
push %r9
push %rbp
push %rbx
push %rdi
// Faulty Load
lea addresses_US+0xfd51, %r9
clflush (%r9)
add %r13, %r13
mov (%r9), %r14
lea oracles, %r9
and $0xff, %r14
shlq $12, %r14
mov (%r9,%r14,1), %r14
pop %rdi
pop %rbx
pop %rbp
pop %r9
pop %r14
pop %r13
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_US', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_US', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_normal_ht', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 9}}
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WT_ht', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 1}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_normal_ht', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 3}}
{'OP': 'REPM', 'src': {'same': False, 'congruent': 1, 'type': 'addresses_WC_ht'}, 'dst': {'same': False, 'congruent': 4, 'type': 'addresses_WT_ht'}}
{'OP': 'REPM', 'src': {'same': False, 'congruent': 11, 'type': 'addresses_WT_ht'}, 'dst': {'same': False, 'congruent': 7, 'type': 'addresses_D_ht'}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_UC_ht', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 7}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_D_ht', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 5}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_UC_ht', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 0}}
{'OP': 'REPM', 'src': {'same': False, 'congruent': 11, 'type': 'addresses_D_ht'}, 'dst': {'same': False, 'congruent': 8, 'type': 'addresses_WT_ht'}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WT_ht', 'NT': True, 'AVXalign': False, 'size': 32, 'congruent': 11}}
{'OP': 'REPM', 'src': {'same': False, 'congruent': 2, 'type': 'addresses_A_ht'}, 'dst': {'same': False, 'congruent': 0, 'type': 'addresses_normal_ht'}}
{'OP': 'STOR', 'dst': {'same': True, 'type': 'addresses_A_ht', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 6}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_A_ht', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 0}}
{'00': 21829}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
| 32.965066
| 2,999
| 0.661545
|
458c3cfdb6afd5285954597cd90a1aeae4b7a26e
| 1,843
|
asm
|
Assembly
|
programs/oeis/129/A129953.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/129/A129953.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/129/A129953.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A129953: First differences of A129952.
; 0,1,4,10,24,56,128,288,640,1408,3072,6656,14336,30720,65536,139264,294912,622592,1310720,2752512,5767168,12058624,25165824,52428800,109051904,226492416,469762048,973078528,2013265920,4160749568,8589934592,17716740096,36507222016,75161927680,154618822656,317827579904,652835028992,1340029796352,2748779069440,5634997092352,11544872091648,23639499997184,48378511622144,98956046499840,202310139510784,413416372043776,844424930131968,1724034232352768,3518437208883200,7177611906121728,14636698788954112,29836347531329536,60798594969501696,123848989752688640,252201579132747776,513410357520236544,1044835113549955072,2125699024118874112,4323455642275676160,8791026472627208192,17870283321406128128,36317027395115679744,73786976294838206464,149879795598890106880,304371277216207601664,617965926469269979136,1254378597012249509888,2545650682171918123008,5165088340638674452480,10477750633867025317888,21250649172913403461632,43091594156185512574976,87363779933088436453376,177088743107611695513600,358899852698093036240896,727244438361925362909184,1473378342655329306673152,2984535617173615775055872,6044629098073145873530880,12240373923598120393900032,24782979302099898081476608,50170421514007110750306304,101549768847628850675318784,205517389334486959700049920,415870481947432436098924544,841412370451781905595498496,1702167554017397877986295808,3443020734262463889563189248,6963412720980264046307573760,14081567946871200626977538048,28472620903563746322679857152,57564211826770182782809276416,116366363692825745840517677056,235208607464222252230833602560,475368975085586025561263702016,960641470485455093321720397824,1941089981599476271041826783232,3921794044456084710880425541632,7922816251426433759354395033600,16004088827881396193895877967872
mov $1,2
pow $1,$0
add $0,2
mul $1,$0
div $1,4
mov $0,$1
| 184.3
| 1,743
| 0.924579
|
70364c6dad46ccfa43d1732bdd2d5b6dfd048e0a
| 376
|
asm
|
Assembly
|
libsrc/_DEVELOPMENT/stdio/c/sdcc_ix/freopen_unlocked_callee.asm
|
meesokim/z88dk
|
5763c7778f19a71d936b3200374059d267066bb2
|
[
"ClArtistic"
] | null | null | null |
libsrc/_DEVELOPMENT/stdio/c/sdcc_ix/freopen_unlocked_callee.asm
|
meesokim/z88dk
|
5763c7778f19a71d936b3200374059d267066bb2
|
[
"ClArtistic"
] | null | null | null |
libsrc/_DEVELOPMENT/stdio/c/sdcc_ix/freopen_unlocked_callee.asm
|
meesokim/z88dk
|
5763c7778f19a71d936b3200374059d267066bb2
|
[
"ClArtistic"
] | null | null | null |
; FILE *freopen_unlocked_callee(char *filename, char *mode, FILE *stream)
SECTION code_stdio
PUBLIC _freopen_unlocked_callee, l0_freopen_unlocked_callee
EXTERN asm_freopen_unlocked
_freopen_unlocked_callee:
pop af
pop hl
pop de
pop bc
push af
l0_freopen_unlocked_callee:
push bc
ex (sp),ix
call asm_freopen_unlocked
pop ix
ret
| 13.925926
| 73
| 0.734043
|
a379c66522e3e96f4ef700237edc8067bb0fe682
| 74
|
asm
|
Assembly
|
test/link/linkerscript-escapes.asm
|
michealccc/rgbds
|
b51e1c7c2c4ce2769f01e016967d0115893a7a88
|
[
"MIT"
] | 522
|
2017-02-25T21:10:13.000Z
|
2020-09-13T14:26:18.000Z
|
test/link/linkerscript-escapes.asm
|
michealccc/rgbds
|
b51e1c7c2c4ce2769f01e016967d0115893a7a88
|
[
"MIT"
] | 405
|
2017-02-25T21:32:37.000Z
|
2020-09-13T16:43:29.000Z
|
test/link/linkerscript-escapes.asm
|
michealccc/rgbds
|
b51e1c7c2c4ce2769f01e016967d0115893a7a88
|
[
"MIT"
] | 84
|
2017-02-25T21:10:26.000Z
|
2020-09-13T14:28:25.000Z
|
SECTION "A\"B\tC\rD\nE", ROM0
DS $1000
SECTION "in\{valid", ROM0
DS $1000
| 14.8
| 29
| 0.662162
|
a932d71fefd00e59ebf1ef663434ac8326fc045c
| 1,434
|
nasm
|
Assembly
|
source/asm/search.nasm
|
BradleyChatha/bcstd
|
217680b0782f43e3d3cf7a8edc69e57cc1632c91
|
[
"MIT"
] | 6
|
2021-06-17T07:32:13.000Z
|
2021-09-15T22:38:07.000Z
|
source/asm/search.nasm
|
BradleyChatha/bcstd
|
217680b0782f43e3d3cf7a8edc69e57cc1632c91
|
[
"MIT"
] | null | null | null |
source/asm/search.nasm
|
BradleyChatha/bcstd
|
217680b0782f43e3d3cf7a8edc69e57cc1632c91
|
[
"MIT"
] | null | null | null |
SECTION .text
global indexOfByteAvx2
; ulong indexOfByteAvx2(const(char)* haystack, ulong haystackSize, char* needle, ulong* remainingChars)
indexOfByteAvx2:
; Vars
; ymm0 = needle as mask
; ymm1 = Result of next 32 chars & ymm0
; rax = return value + temp calcs
; VOLATILE_NONPARAM_REG_0 = amount of blocks of 32 we can read, used as the loop counter
; PARAM_REG_3 = No longer needed after a certain point, so stores the starting pointer of haystack.
vpbroadcastb ymm1, byte [PARAM_REG_2]
vmovdqu ymm0, ymm1
mov VOLATILE_NONPARAM_REG_0, PARAM_REG_1
shr VOLATILE_NONPARAM_REG_0, 5 ; / 32
test VOLATILE_NONPARAM_REG_0, VOLATILE_NONPARAM_REG_0
jz .end
mov rax, [PARAM_REG_3]
and rax, 31 ; % 32
mov [PARAM_REG_3], rax
mov PARAM_REG_3, PARAM_REG_0
.loop:
vpcmpeqb ymm1, ymm0, [PARAM_REG_0]
vpmovmskb rax, ymm1
test rax, rax
jz .continue
; Loop counter is no longer needed, so we can also use that for some calcs
sub PARAM_REG_0, PARAM_REG_3 ; currentPtr -= startPtr
tzcnt VOLATILE_NONPARAM_REG_0, rax
add PARAM_REG_0, VOLATILE_NONPARAM_REG_0
mov rax, PARAM_REG_0
ret
.continue:
add PARAM_REG_0, 32
dec VOLATILE_NONPARAM_REG_0
jnz .loop
.end:
mov rax, -1
ret
| 30.510638
| 117
| 0.634589
|
3d25db39e4db9c875c24adedc04fdc4722e04bc6
| 482
|
asm
|
Assembly
|
oeis/312/A312484.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/312/A312484.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/312/A312484.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A312484: Coordination sequence Gal.5.81.5 where G.u.t.v denotes the coordination sequence for a vertex of type v in tiling number t in the Galebach list of u-uniform tilings.
; Submitted by Jon Maiga
; 1,4,8,14,18,22,26,32,36,40,44,48,54,58,62,66,72,76,80,84,88,94,98,102,106,112,116,120,124,128,134,138,142,146,152,156,160,164,168,174,178,182,186,192,196,200,204,208,214,218
mov $1,1
mov $2,$0
mul $2,4
lpb $0
mov $0,$2
div $0,9
mov $1,$0
lpe
mod $0,2
add $1,$2
add $0,$1
| 30.125
| 176
| 0.692946
|
2ea4925b12b3c6e20e40b8c0f8d0babb0dfc05f5
| 38
|
asm
|
Assembly
|
tests/inchexstr/5.asm
|
NullMember/customasm
|
6e34d6432583a41278e6b3596f1817ae82149531
|
[
"Apache-2.0"
] | 414
|
2016-10-14T22:39:20.000Z
|
2022-03-30T07:52:44.000Z
|
tests/inchexstr/5.asm
|
NullMember/customasm
|
6e34d6432583a41278e6b3596f1817ae82149531
|
[
"Apache-2.0"
] | 100
|
2018-03-22T16:12:24.000Z
|
2022-03-26T09:19:23.000Z
|
tests/inchexstr/5.asm
|
NullMember/customasm
|
6e34d6432583a41278e6b3596f1817ae82149531
|
[
"Apache-2.0"
] | 47
|
2017-06-29T15:12:13.000Z
|
2022-03-10T04:50:51.000Z
|
#d inchexstr("unk") ; error: not found
| 38
| 38
| 0.684211
|
6e80cb5f74320f9565505513120e447ee39c4b6c
| 263
|
asm
|
Assembly
|
programs/oeis/004/A004369.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/004/A004369.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/004/A004369.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A004369: Binomial coefficient C(7n,n-1).
; 1,14,210,3276,52360,850668,13983816,231917400,3872894697,65033528560,1096993404430,18574174153080,315502265971620,5373846361969456,91748617512913200,1569699972909739440
mov $1,7
mul $1,$0
add $1,7
bin $1,$0
mov $0,$1
| 29.222222
| 170
| 0.794677
|
eb081f2ce38fab7ef25c9bd22fb200e6ac57c051
| 972
|
asm
|
Assembly
|
dv3/dv3/fdef.asm
|
olifink/smsqe
|
c546d882b26566a46d71820d1539bed9ea8af108
|
[
"BSD-2-Clause"
] | null | null | null |
dv3/dv3/fdef.asm
|
olifink/smsqe
|
c546d882b26566a46d71820d1539bed9ea8af108
|
[
"BSD-2-Clause"
] | null | null | null |
dv3/dv3/fdef.asm
|
olifink/smsqe
|
c546d882b26566a46d71820d1539bed9ea8af108
|
[
"BSD-2-Clause"
] | null | null | null |
; DV3 Find Definition Block V3.00 1992 Tony Tebby
section dv3
xdef dv3_fdef
include 'dev8_keys_err'
include 'dev8_dv3_keys'
include 'dev8_keys_sys'
;+++
; This is the routine that is used by interrupt servers to find the definition
; block for a drive.
;
; d7 c u drive number (byte) / drive ID/number
; a3 c p pointer to driver linkage (master or slave)
; a4 r pointer to definition block
; a6 c p pointer to system variables
;
; Status return standard (0 or err.fdnf)
;---
dv3_fdef
dfd.reg reg a2
move.l a2,-(sp)
lea sys_fsdd(a6),a2
moveq #0,d0 ; id
dfd_fdrv
move.l (a2)+,a4
cmp.l ddf_ptddl(a4),a3 ; our driver?
bne.s dfd_next ; ... no
cmp.b ddf_dnum(a4),d7 ; our drive?
beq.s dfd_done ; ... yes
dfd_next
addq.b #1,d0
cmp.b #16,d0
blt.s dfd_fdrv ; next
moveq #err.fdnf,d0 ; no dd linkage
bra.s dfd_exit
dfd_done
ext.w d7
swap d7
move.w d0,d7 ; number / ID
swap d7
moveq #0,d0
dfd_exit
move.l (sp)+,a2
rts
end
| 18.692308
| 78
| 0.67284
|
aebe68c4540d5cbd4500e60227798ef9eb5ada20
| 456
|
asm
|
Assembly
|
homework/Mult.asm
|
hanhha/Nand2Tetris
|
cac9a4286bd08110429afd552612b73c9788ed36
|
[
"Unlicense"
] | null | null | null |
homework/Mult.asm
|
hanhha/Nand2Tetris
|
cac9a4286bd08110429afd552612b73c9788ed36
|
[
"Unlicense"
] | null | null | null |
homework/Mult.asm
|
hanhha/Nand2Tetris
|
cac9a4286bd08110429afd552612b73c9788ed36
|
[
"Unlicense"
] | null | null | null |
// Nand2Tetris course
// Multiples R0 and R1, store result in R2
// Multipling by adding R0 to itself R2 times
@ R2
M = 0 // R2 = 0
@ R1
D = M
@ END
D; JEQ // Finish if R1 = 0 ( multiples R0 to 0 )
(CONT)
@ R0
D = M // D = R0
@ R2
M = D + M // R2 = R2 + D (<=> R2 = R2 + R0)
@ R1
MD = M - 1 // D = R1 = R1 - 1
@ CONT
D; JGT // continue loop if R1 > 0
(END)
@END
0; JMP // infinite loop ends a hack program
| 18.24
| 54
| 0.5
|
0dbebb8064f281379375e53cf8f84eaffadf4725
| 85,055
|
asm
|
Assembly
|
ROMS/tinybasic/tinybasic_6800.asm
|
betajaen/dx8
|
0ecfb37836e9460f159160c2a8ab2acd37cf9915
|
[
"MIT"
] | 9
|
2017-12-19T16:36:35.000Z
|
2021-10-18T16:18:58.000Z
|
ROMS/tinybasic/tinybasic_6800.asm
|
betajaen/dx8
|
0ecfb37836e9460f159160c2a8ab2acd37cf9915
|
[
"MIT"
] | null | null | null |
ROMS/tinybasic/tinybasic_6800.asm
|
betajaen/dx8
|
0ecfb37836e9460f159160c2a8ab2acd37cf9915
|
[
"MIT"
] | null | null | null |
; Tom Pittman's 6800 tiny BASIC
; reverse analyzed from (buggy) hexdump (TB68R1.tiff and TB68R2.tiff) at
; http://www.ittybittycomputers.com/IttyBitty/TinyBasic/index.htm
; by Holger Veit
;
; Note this might look like valid assembler, but possibly isn't
; for reference only
org 0
rmb 32
start_prgm: rmb 2 ; start of BASIC text (0x900)
end_ram: rmb 2 ; end of available RAM
end_prgm: rmb 2 ; end of BASIC text
top_of_stack: rmb 2 ; top of return stack pointer location
basic_lineno: rmb 2 ; save for current line number to be executed
il_pc: rmb 2 ; program counter for IL code
basic_ptr: rmb 2 ; pointer to currently executed BASIC byte
basicptr_save: rmb 2 ; temporary save for basic_ptr
expr_stack: rmb 80 ; lowest byte of expr_stack (0x30)
rnd_seed: rmb 2 ; used as seed value for RND function
; note this is actually top of predecrementing expr_stack
var_tbl: rmb 52 ; variables (A-Z), 26 words
LS_end: rmb 2 ; used to store addr of end of LS listing,
; start of list is in basic_ptr
BP_save: rmb 2 ; another temporary save for basic_ptr
X_save: rmb 2 ; temporary save for X
IL_temp: rmb 2 ; temporary for various IL operations
; used for branch to IL handler routine for opcode
lead_zero: rmb 1 ; flag for number output and negative sign in DV
column_cnt: rmb 1 ; counter for output columns (required for TAB in PRINT)
; if bit 7 is set, suppress output (XOFF)
run_mode: rmb 1 ; run mode
; = 0 direct mode
; <> 0 running program
expr_stack_low: rmb 1 ; low addr byte of expr_stack (should be 0x30)
expr_stack_x: rmb 1 ; high byte of expr_stack_top (==0x00, used with X register)
expr_stack_top: rmb 1 ; low byte of expr_stack_top (used in 8 bit comparisons)
il_pc_save: rmb 2 ; save of IL program counter
rmb 58 ; unused area in zero page (starting with 0xc6)
; cold start vector
org $100
CV: jsr COLD_S ; Do cold start initialization
; warm start vector
WV: jmp WARM_S ; do warm start
; vector: get a character from input device into A
; unimplemented - jump to system specific input routine
IN_V: jmp IN_V
; print a character in A to output device
; unimplemented - jump to system specific output routine
OUT_V: jmp OUT_V
; test for break from input device, set C=1 if break
; unimplemented - jump to break routine
; note: at the end of the program, there are two
; sample implementations for MIKBUG and MINIBUG
BV: nop
clc
rts
; some standard constants
BSC: fcb $5F ; backspace code (should be 0x7f, but actually is '_')
LSC: fcb $18 ; line cancel code (CTRL-X)
PCC: fcb $83 ; CRLF padding characters
; low 7 bits are number of NUL/0xFF
; bit7=1: send 0xFF, =0, send NUL
TMC: fcb $80 ;
SSS: fcb $20 ; reserved bytes at end_prgm (to prevent return stack
; underflow (spare area)
;******************************************************************************
; utility routines for BASIC (not called in interpreter code)
;******************************************************************************
;------------------------------------------------------------------------------
; get the byte pointed to by X into B:A
;------------------------------------------------------------------------------
peek: ldaa 0,x
clrb
rts
;------------------------------------------------------------------------------
; put the byte in A into cell pointed to by X
;------------------------------------------------------------------------------
poke: staa 0,x
rts
;******************************************************************************
; Interpreter jump table
;******************************************************************************
il_jumptable:
fdb IL_BBR ; 0x40-0x5f: backward branch
fdb IL_FBR ; 0x60-0x7f: forward_branch
fdb IL_BC ; 0x80-0x9f: string match branch
fdb IL_BV ; 0xa0-0xbf: branch if not variable
fdb IL_BN ; 0xc0-0xdf: branch if not number
fdb IL_BE ; 0xe0-0xff: branch if not eoln
fdb IL_NO ; 0x08: no operation
fdb IL_LB ; 0x09: push literal byte to TOS
fdb IL_LN ; 0x0a: push literal word to TOS
fdb IL_DS ; 0x0b: duplicate stack top
fdb IL_SP ; 0x0c: pop TOS into A:B
fdb expr_pop_byte ; 0x0d: undocumented: pop byte into
fdb sub_177 ; 0x0e: undocumented: push TOS on return stack
fdb sub_180 ; 0x0f: undocumented: pop return stack into TOS
fdb IL_SB ; 0x10: save BASIC pointer
fdb IL_RB ; 0x11: restore BASIC pointer
fdb IL_FV ; 0x12: fetch variable
fdb IL_SV ; 0x13: store variable
fdb IL_GS ; 0x14: save GOSUB line
fdb IL_RS ; 0x15: restore saved line
fdb IL_GO ; 0x16: goto
fdb IL_NE ; 0x17: negate
fdb IL_AD ; 0x18: add
fdb IL_SU ; 0x19: subtract
fdb IL_MP ; 0x1a: multiply
fdb IL_DV ; 0x1b: divide
fdb IL_CP ; 0x1c: compare
fdb IL_NX ; 0x1d: next BASIC statement
fdb IL_NO ; 0x1e: reserved
fdb IL_LS ; 0x1f: list program
fdb IL_PN ; 0x20: print number
fdb IL_PQ ; 0x21: print BASIC string
fdb IL_PT ; 0x22: print tab
fdb IL_NL ; 0x23: new line
fdb IL_PC ; 0x24: print literal string
fdb pt_print_spc ; 0x25: undocumented op for SPC(x) function
fdb IL_NO ; 0x26: reserved
fdb IL_GL ; 0x27: get input line
fdb IL_NO ; 0x28: reserved
fdb IL_NO ; 0x29: reserved
fdb IL_IL ; 0x2A: Insert BASIC line
fdb IL_MT ; 0x2B: mark BASIC program space empty
fdb IL_XQ ; 0x2C: execute
fdb WARM_S ; 0x2D: warm start
fdb IL_US ; 0x2E: machine language subroutine call
fdb IL_RT ; 0x2F: IL subroutine return
;------------------------------------------------------------------------------
; undocumented IL instruction (unused)
; will take a value from expression stack
; and put onto processor stack
;------------------------------------------------------------------------------
sub_177: bsr IL_SP ; pop word into A:B
staa IL_temp ; save into IL_temp
stab IL_temp+1
jmp push_payload ; push value on return stack
;------------------------------------------------------------------------------
; undocumented IL instruction
; will extract stored value on processor stack
; and push back on expr_stack
;------------------------------------------------------------------------------
sub_180: jsr get_payload ; extract stored value on return stack
ldaa IL_temp ; get this value
ldab IL_temp+1
bra expr_push_word ; push on expr_stack
;------------------------------------------------------------------------------
; IL instruction: duplicate top of expr_stack
;------------------------------------------------------------------------------
IL_DS: bsr IL_SP ; pop top of expr_stack into A:B
bsr *+2 ; push A:B twice on expr_stack
; (fall through to expr_push_word routine)
;------------------------------------------------------------------------------
; push A:B on expr_stack
;------------------------------------------------------------------------------
expr_push_word: ldx expr_stack_x ; get expr_stack top
dex ; make space for another byte
stab 0,x ; store byte (low)
bra expr_push_a ; push A byte
;------------------------------------------------------------------------------
; push A on expr_stack
;------------------------------------------------------------------------------
expr_push_byte: ldx expr_stack_x ; get expr_stack top
expr_push_a: dex ; make space for another byte
staa 0,x ; save A as new TOS (top of stack value)
stx expr_stack_x ; set new stack top
psha ; save A
ldaa expr_stack_low ; get stack bottom
cmpa expr_stack_top ; stack overflow?
pula ; restore A
bcs IL_NO ; no, exit
j_error: jmp error ; error: stack overflow
;------------------------------------------------------------------------------
; pop the TOS word off stack, result in A:B
;------------------------------------------------------------------------------
IL_SP: bsr expr_pop_byte ; pop a byte into B
tba ; put into A (high byte)
; fall thru to expr_pop_byte to get more
;------------------------------------------------------------------------------
; pop the TOS byte off stack into B
;------------------------------------------------------------------------------
expr_pop_byte: ldab #1 ; verify stack is not empty: has 1 byte
pop_byte: addb expr_stack_top ; next position on stack
cmpb #$80 ; is it > 0x80?
bhi j_error ; yes, stack underflow error
ldx expr_stack_x ; get address of stack top
inc expr_stack_top ; pop stack
ldab 0,x ; get TOS byte in B
rts
;------------------------------------------------------------------------------
; IL instruction US: machine language subroutine call
;------------------------------------------------------------------------------
IL_US: bsr us_do ; call machine language routine
bsr expr_push_byte ; return here when ML routine does RTS
; push A:B on stack
tba
bra expr_push_byte
us_do: ldaa #6 ; verify that stack has at least 6 bytes
tab
adda expr_stack_top
cmpa #rnd_seed ; at end of expr_stack?
bhi j_error ; yes, error
ldx expr_stack_x ; load argument list
staa expr_stack_top ; drop 6 bytes from stack
us_copyargs: ldaa 5,x ; push 5 bytes to return stack
psha
dex
decb
bne us_copyargs ; loop until done
tpa ; push status
psha
; Stack frame is
; return address IL_US+2 (caller of bsr us_do)
; B
; A
; X
; X
; address
; address
; PSW
rti ; use RTI to branch to routine
;------------------------------------------------------------------------------
; IL instruction push byte
;------------------------------------------------------------------------------
IL_LB: bsr fetch_il_op ; get next byte from sequence
bra expr_push_byte ; push single byte
;------------------------------------------------------------------------------
; IL instruction push word
;------------------------------------------------------------------------------
IL_LN: bsr fetch_il_op ; get next two bytes into A:B
psha
bsr fetch_il_op
tab
pula
bra expr_push_word ; push on stack
;------------------------------------------------------------------------------
; part of IL linterpreter loop, handle SX instruction
;------------------------------------------------------------------------------
handle_il_SX: adda expr_stack_top ; opcode is 0..7, add to current stack ptr
staa IL_temp+1 ; make word pointer 0x00SP+opcode
clr IL_temp
bsr expr_pop_byte ; drop to byte into B
ldx IL_temp ; get index
ldaa 0,x ; get old byte
stab 0,x ; store byte from TOS there
bra expr_push_byte ; store old byte on TOS
;------------------------------------------------------------------------------
; get the next IL opcode and increment the IL PC
;------------------------------------------------------------------------------
fetch_il_op: ldx il_pc ; get IL PC
ldaa 0,x ; read next opcode
inx ; advance to next byte
stx il_pc ; save IL PC
IL_NO: tsta ; set flags
rts
;------------------------------------------------------------------------------
IL_baseaddr: fdb start_of_il ; only used address where IL code starts
;------------------------------------------------------------------------------
; Cold start entry point
;------------------------------------------------------------------------------
COLD_S: ldx #ram_basic ; initialize start of BASIC
stx start_prgm
find_end_ram: inx ; point to next address
com 1,x ; complement following byte
ldaa 1,x ; load byte
com 1,x ; complement byte
cmpa 1,x ; compare with value, should be different, if it is RAM
bne find_end_ram ; if different, advance, until no more RAM cells found
stx end_ram ; use topmost RAM cell
;------------------------------------------------------------------------------
; IL instruction MT: clear program
;------------------------------------------------------------------------------
IL_MT: ldaa start_prgm ; load start area
ldab start_prgm+1
addb SSS ; add spare area after end of program
adca #0
staa end_prgm ; save as end of program
stab end_prgm+1
ldx start_prgm ; get addr of start of program
clr 0,x ; clear line number (means end)
clr 1,x
;------------------------------------------------------------------------------
; warm start entry point
;------------------------------------------------------------------------------
WARM_S: lds end_ram ; set return stack to end of RAM
; enters here to start IL loop;
; return here after error stop
restart_il: jsr crlf ; emit a CRLF
restart_il_nocr: ldx IL_baseaddr ; load pointer to IL
stx il_pc ; store as current IL PC
ldx #rnd_seed ; set expr_stack top to 0x0080
stx expr_stack_x
ldx #$30 ; set run_mode = 0 (no program)
; set expr_stack_low = 0x30
stx run_mode
il_rs_return: sts top_of_stack ; save current stack position
il_mainloop: bsr fetch_il_op ; fetch next IL opcode
bsr exec_il_opcode ; execute current IL instruction
bra il_mainloop ; next instruction
; trick programming here:
; this location is entered in IL_RS
; by incrementing the return address of exec_il_opcode
; so that it skips over the 'BRA il_mainloop' above
il_rs_target: cpx #$2004 ; this might mask a BRA *+4, which however would
; then point into exec_il_opcode+2, which is a TBA
; which could then be used for a synthetic
; exec_il_opcode...
; frankly: this is possibly either a remainder
; from old code or a hidden serial number
; the 6502 code has a similar anachronism in this
; place, so it might be a serial number.
bra il_rs_return ; enforce storing the stack pointer and do il_mainloop
;------------------------------------------------------------------------------
; with IL opcode in A, decode opcode and
; branch to appropriate routine
;------------------------------------------------------------------------------
exec_il_opcode: ldx #il_jumptable-4 ; preload address of opcode table - 4
stx IL_temp
cmpa #$30 ; is opcode below 0x30?
bcc handle_30_ff ; no, skip to handler for higher opcodes
cmpa #8 ; is it below 8?
bcs handle_il_SX ; yes, skip to handler for SX instructions
asla ; make word index
staa IL_temp+1 ; store as offset
ldx IL_temp
ldx $17,x ; load handler address via offset
jmp 0,x ; jump to handler
;------------------------------------------------------------------------------
; common error routine
;------------------------------------------------------------------------------
error: jsr crlf ; emit CRLF
ldaa #'!'
staa expr_stack_low ; lower stack bottom a bit to avoid another stack fault
; SNAFU already; may overwrite some variables
jsr OUT_V ; emit exclamation mark
ldaa #rnd_seed ; reinitialize stack top
staa expr_stack_top
ldab il_pc+1 ; load IL PC into A:B
ldaa il_pc
subb IL_baseaddr+1 ; subtract origin of interpreter
sbca IL_baseaddr
jsr emit_number ; print instruction of IL
ldaa run_mode ; is not in program?
beq error_no_lineno ; no, suppress output of line number
ldx #err_at ; load error string
stx il_pc
jsr IL_PC ; print string at il_prgm_cnt, i.e. "AT "
ldaa basic_lineno ; get line number
ldab basic_lineno+1
jsr emit_number ; print it
error_no_lineno: ldaa #7 ; emit BEL (0x07) character
jsr OUT_V
lds top_of_stack ; restore return stack
bra restart_il ; restart interpreter after error
err_at: fcb ' ','A','T',' ',$80 ; string " AT " + terminator
;------------------------------------------------------------------------------
; long branch instruction
;------------------------------------------------------------------------------
IL_BBR: dec IL_temp ; adjust position for negative jump (effectively 2's complement)
IL_FBR: tst IL_temp ; test new position high byte
beq error ; was displacement 0?
; yes, this is an error condition
il_goto: ldx IL_temp ; get new IL target address
stx il_pc ; do the jump
rts
;------------------------------------------------------------------------------
; part of interpreter loop: handle opcode 0x30-3f
;------------------------------------------------------------------------------
handle_30_ff: cmpa #$40 ; above or equal 0x40?
bcc handle_40_ff ; yes, handle elsewhere
; handle the J/JS instructions
psha ; save opcode
jsr fetch_il_op ; get next byte of instruction (low address)
adda IL_baseaddr+1 ; add to IL interpreter base
staa IL_temp+1
pula ; restore opcode
tab ; save into B for later
anda #7 ; mask out addressbits
adca IL_baseaddr ; add to base address
staa IL_temp ; save in temporary
andb #8 ; mask J/JS bit
bne il_goto ; if set, is GOTO
ldx il_pc ; get current IL PC
staa il_pc ; save new IL PC
ldab IL_temp+1
stab il_pc+1
stx IL_temp ; save old in temporary
jmp push_payload ; put on return stack
;------------------------------------------------------------------------------
; handle the opcodes >=0x40
;------------------------------------------------------------------------------
handle_40_ff: tab ; save opcode for later
lsra ; get opcode high nibble
lsra
lsra
lsra
anda #$E ; make 0x04,0x06,...0x0e
staa IL_temp+1 ; make index into opcode jump table
ldx IL_temp
ldx $17,x ; X points to handler routine
clra ; preload A=0 for null displacement (error indicator)
cmpb #$60 ; is it BBR?
andb #$1F ; mask out displacement bits
bcc not_bbr ; was not backward branch
orab #$E0 ; make displacement negative
not_bbr: beq displ_error ; displacement is zero? yes, skip
addb il_pc+1 ; add displayement to current IL_PC
stab IL_temp+1
adca il_pc
displ_error: staa IL_temp ; store high byte of new address
; if displayement=0, store high byte=0
; -> invalid IL address, will lead to error
jmp 0,x ; jump to handler routine
;------------------------------------------------------------------------------
; IL instruction string match branch
; jump forward if string was not matched
;------------------------------------------------------------------------------
IL_BC: ldx basic_ptr ; save pointer to current BASIC character
stx BP_save
bc_loop: bsr get_nchar ; skip spaces
bsr fetch_basicchar ; consume char
tab ; save into B
jsr fetch_il_op ; get next char from IL stream
bpl bc_lastchar ; if positive (not end of string), match further
orab #$80 ; no, make basic char also bit7 set
bc_lastchar: cba ; compare bytes
bne bc_nomatch ; do not match, skip
tsta ; more chars to match?
bpl bc_loop ; yes, loop
rts ; that string matched! continue
bc_nomatch: ldx BP_save ; restore BASIC pointer
stx basic_ptr
j_FBR: bra IL_FBR ; and branch forward
;------------------------------------------------------------------------------
; IL instruction: jump if not end of line
;------------------------------------------------------------------------------
IL_BE: bsr get_nchar ; get current BASIC char
cmpa #$D ; is it a CR?
bne j_FBR ; no, jump forward
rts ; continue
;------------------------------------------------------------------------------
; IL instruction: branch if not variable
; if variable, push 2*ASCII to expr_stack
; (0x41..0x5A => 0x82...0xB4
; == offset to var table into zero page)
;------------------------------------------------------------------------------
IL_BV: bsr get_nchar ; get current BASIC char
cmpa #'Z' ; is it an alphanumeric?
bgt j_FBR ; no, jump forward
cmpa #'A'
blt j_FBR
asla ; yes, double the ASCII code
; (make it a word index into var table
jsr expr_push_byte ; push it on the stack
; ...and consume this character
; (fall thru to fetch_basicchar)
;------------------------------------------------------------------------------
; get next BASIC char from program or line
; return in A, Z=1 if CR
;------------------------------------------------------------------------------
fetch_basicchar:
ldx basic_ptr ; get address of current BASIC byte
ldaa 0,x ; get byte
inx ; advance to next character
stx basic_ptr ; save it
cmpa #$D ; check if 0x0d (end of line)
rts
;------------------------------------------------------------------------------
; get next BASIC char (without advance)
; C=1 if digit
;------------------------------------------------------------------------------
get_nchar: bsr fetch_basicchar ; get next char
cmpa #' ' ; is it a space?
beq get_nchar ; yes, skip that
dex ; is no space, point back to this char
stx basic_ptr
cmpa #'0' ; is it a digit?
clc
blt locret_33A ; no, return C=0
cmpa #':' ; return C=1 if number
locret_33A: rts
;------------------------------------------------------------------------------
; IL instruction: branch if not number
; if digit, convert this and following digits to number
; and push on expr_stack
;------------------------------------------------------------------------------
IL_BN: bsr get_nchar ; get BASIC char
bcc j_FBR ; if not digit, do forward branch
ldx #0 ; clear temporary for number
stx IL_temp
loop_bn: bsr fetch_basicchar ; get and consume this char
psha ; save it
ldaa IL_temp ; multiply TEMP by 10
ldab IL_temp+1
aslb ; temp*2
rola
aslb ; (temp*2)*2 = temp*4
rola
addb IL_temp+1 ; (temp*4)+temp = temp*5
adca IL_temp
aslb ; (temp*5)*2 = temp*10
rola
stab IL_temp+1
pulb ; restore digit
andb #$F ; mask out low nibble (0...9)
addb IL_temp+1 ; add into temp
adca #0
staa IL_temp
stab IL_temp+1
bsr get_nchar ; get next char
bcs loop_bn ; loop as long as digit found
ldaa IL_temp ; push A:B on expr_stack (B is still low byte)
jmp expr_push_word
;------------------------------------------------------------------------------
; IL instruction: divide
;------------------------------------------------------------------------------
IL_DV: bsr expr_check_4bytes ; validate 2 args on stack; discard 1 byte
ldaa 2,x ; high byte dividend
asra ; put sign into carry
rola
sbca 2,x ; A=0xFF if sign=1, 0x00 if sign=0
staa IL_temp ; sign extend dividend into 32bit (IL_temp=high word)
staa IL_temp+1
tab ; if negative, subtract 1 from dividend
addb 3,x ; 0x0000...0x7fff stays positive
; 0x8000 becomes positive
; 0x8001...0xffff stays negative
stab 3,x
tab
adcb 2,x
stab 2,x
eora 0,x ; compare with sign of divisor
staa lead_zero ; store result sign (negative if different, positive if same)
bpl loc_389 ; if different sign, complement divisor
; i.e. NEG/NEG -> do nothing
; NEG/POS -> NEG/NEG + lead_zero <0
; POS/NEG -> POS/POS + lead_zero <0
; POS/POS -> do nothing
bsr negate ; negate operand
loc_389: ldab #$11 ; loop counter (16+1 iterations)
ldaa 0,x ; is divisor = 0?
oraa 1,x
bne dv_loop ; no, do division
jmp error
dv_loop: ldaa IL_temp+1 ; subtract divisor from 32bit dividend
suba 1,x
psha ; remember result
ldaa IL_temp
sbca 0,x
psha
eora IL_temp
bmi dv_smaller ; subtract result was <0 ?
pula ; no, can subtract, remember a 1 bit (sec)
staa IL_temp ; and store new result
pula
staa IL_temp+1
sec
bra dv_shift
dv_smaller: pula ; discard subtraction
pula
clc ; remember 0 bit
dv_shift: rol 3,x ; shift 32bit dividend left
rol 2,x ; shift in result bit into lowest bit of dividend
rol IL_temp+1
rol IL_temp
decb ; decrement loop
bne dv_loop ; subtract divisor from 32bit dividend
bsr j_expr_pop_byte ; drop a byte (other one was already removed above)
; X points to result in (former) dividend at 2,X
tst lead_zero ; operand signs were different?
bpl locret_3CC ; no, we are done
; else fall thru to negation (of result)
;------------------------------------------------------------------------------
; IL instruction: negate top of stack
;------------------------------------------------------------------------------
IL_NE: ldx expr_stack_x ; point to TOS
negate: neg 1,x ; negate low byte
bne ne_nocarry ; not zero: no carry
dec 0,x ; propagate carry into high byte
ne_nocarry: com 0,x ; complement high byte
locret_3CC: rts
;------------------------------------------------------------------------------
; IL instruction: subtract TOS from NOS -> NOS
;------------------------------------------------------------------------------
IL_SU: bsr IL_NE ; negate TOS. A-B is A+(-B)
;------------------------------------------------------------------------------
; IL instruction: add TOS and NOS -> NOS
;------------------------------------------------------------------------------
IL_AD: bsr expr_check_4bytes ; verify 4 bytes on stack
ldab 3,x ; add TOS and NOS into AB
addb 1,x
ldaa 2,x
adca 0,x
expr_save_pop: staa 2,x ; store A:B in NOS and pop further byte
stab 3,x
j_expr_pop_byte: jmp expr_pop_byte
;------------------------------------------------------------------------------
; validate stack contains at least 4 bytes, pop 1 byte
;------------------------------------------------------------------------------
expr_check_4bytes: ldab #4
expr_check_nbytes: jmp pop_byte ; pop a byte
;------------------------------------------------------------------------------
; multiply TOS with NOS -> NOS
; I think this this routine is broken for negative numbers
;------------------------------------------------------------------------------
IL_MP: bsr expr_check_4bytes ; validate 2 args
ldaa #$10 ; bit count (16 bits)
staa IL_temp
clra ; clear bottom 16 bits of result
clrb
mp_loop: aslb ; shift 1 bit left
rola
asl 1,x ; shift 1st operand
rol 0,x
bcc mp_notadd ; is top bit = 1?
addb 3,x ; yes, add 2nd operand into A:B
adca 2,x
mp_notadd: dec IL_temp ; decrement counter
bne mp_loop ; loop 16 times
bra expr_save_pop ; save result
;------------------------------------------------------------------------------
; IL instruction: fetch variable
;------------------------------------------------------------------------------
IL_FV: bsr j_expr_pop_byte ; get byte (variable address into zero page)
stab IL_temp+1 ; make pointer into var table
clr IL_temp
ldx IL_temp
ldaa 0,x ; get word indexed by X into A:B
ldab 1,x
jmp expr_push_word ; push it onto expr_stack
;------------------------------------------------------------------------------
; IL instruction: save variable
;------------------------------------------------------------------------------
IL_SV: ldab #3
bsr expr_check_nbytes ; validate stack contains var index byte
; and data word. drop single byte
ldab 1,x ; get low byte of data in B
clr 1,x ; clear this to build word index to var
ldaa 0,x ; get high byte of data in A
ldx 1,x ; load index into variable table
staa 0,x ; save A:B into variable
stab 1,x
j_IL_SP: jmp IL_SP ; pop word off stack
;------------------------------------------------------------------------------
; IL instruction compare
; stack: TOS, MASK, NOS
; compare TOS with NOS
; MASK is bit0 = less
; bit1 = equal
; bit2 = greater
; if compare reslut AND mask return <>0, next IL op is skipped
;------------------------------------------------------------------------------
IL_CP: bsr j_IL_SP ; pop TOS into A:B
pshb ; save low byte
ldab #3
bsr expr_check_nbytes ; verify still 3 bytes on stack,
; drop one byte
inc expr_stack_top ; drop more bytes
inc expr_stack_top
pulb ; restore low byte of TOS
subb 2,x ; compare with 1st arg
; note this subtraction is inverted
; thus BGT means BLT, and vice versa
sbca 1,x
bgt cp_is_lt ; if less, skip
blt cp_is_gt ; if greater, skip
tstb ; is result 0?
beq cp_is_eq
bra cp_is_lt
cp_is_gt: asr 0,x ; shift bit 2 into carry
cp_is_eq: asr 0,x ; shift bit 1 into carry
cp_is_lt: asr 0,x ; shift bit 0 into carray
bcc locret_461 ; not matched: exit, continue new IL op
jmp fetch_il_op ; skip one IL op before continuing
;------------------------------------------------------------------------------
; IL instruction: advance to next BASIC line
;------------------------------------------------------------------------------
IL_NX: ldaa run_mode ; run mode = 0?
beq loc_46A ; yes, continue program
nx_loop: ; ...
jsr fetch_basicchar ; get char from program
bne nx_loop ; is not CR, loop
bsr save_lineno ; store line number
beq j1_error ; is 0000 (end of program) -> error
;------------------------------------------------------------------------------
; enters here from a GOTO,
; basic pointer points to new line
;------------------------------------------------------------------------------
go_found_line: bsr do_runmode ; set run mode = running
jsr BV ; test for BREAK
bcs do_break ; if C=1, do break
ldx il_pc_save ; restore IL_PC which was saved in XQ or GO
stx il_pc
locret_461: rts
do_break: ldx IL_baseaddr ; restart interpreter
stx il_pc
j1_error: jmp error ; and emit break error
;------------------------------------------------------------------------------
; fragment of code for IL_NX
;------------------------------------------------------------------------------
loc_46A: lds top_of_stack ; reload stack
staa column_cnt ; clear column count (A was 0)
jmp restart_il_nocr ; restart interpreter
;------------------------------------------------------------------------------
; save current linenumber
;------------------------------------------------------------------------------
save_lineno: jsr fetch_basicchar ; get char from program code
staa basic_lineno ; save as high lineno
jsr fetch_basicchar ; get char from program code
staa basic_lineno+1 ; save as low lineno
ldx basic_lineno ; load line number for later
rts
;------------------------------------------------------------------------------
; IL instruction: execute program
;------------------------------------------------------------------------------
IL_XQ: ldx start_prgm ; set current start of program
stx basic_ptr
bsr save_lineno ; save current line number
beq j1_error ; if zero, error
ldx il_pc ; save current IL_PC
stx il_pc_save
do_runmode: tpa ; will load non zero value (0xc0) into A - tricky!
staa run_mode ; set run_mode = "running"
rts
;------------------------------------------------------------------------------
; IL instruction GO
;------------------------------------------------------------------------------
IL_GO: jsr find_line ; find line which lineno is on stack
beq go_found_line ; found? yes, skip
go_error: ldx IL_temp ; set requested lineno as current
stx basic_lineno
bra j1_error ; error - line not found
;------------------------------------------------------------------------------
; IL instruction: restore saved line
;------------------------------------------------------------------------------
IL_RS: bsr get_payload ; get saved line 2 levels off stack
tsx ; point to caller of exec_il_opcode
inc 1,x ; hack: adjust return from exec_il_mainloop
; that it points to il_rs_target just below
; il_mainloop
inc 1,x
jsr find_line1 ; find the basic line
bne go_error ; line not found? -> error
rts
;------------------------------------------------------------------------------
; IL instruction return from IL call
;------------------------------------------------------------------------------
IL_RT: bsr get_payload ; get saved IL PC address
stx il_pc ; restore it to IL_PC
rts
;------------------------------------------------------------------------------
; IL instruction save BASIC pointer
;------------------------------------------------------------------------------
IL_SB: ldx #basic_ptr ; get address of basic pointer
bra loc_4B3 ; continue in IL_RB common code
;------------------------------------------------------------------------------
; IL instruction: restore BASIC pointer
;------------------------------------------------------------------------------
IL_RB: ldx #basicptr_save
loc_4B3: ldaa 1,x ; is it into the input line area?
cmpa #$80
bcc swap_bp
ldaa 0,x
bne swap_bp ; no, do swap with save location
ldx basic_ptr
bra loc_4CB
swap_bp: ldx basic_ptr ; get basic pointer
ldaa basicptr_save ; move saved pointer to basic ptr
staa basic_ptr
ldaa basicptr_save+1
staa basic_ptr+1
loc_4CB: stx basicptr_save ; store old basic pointer into save
rts
;------------------------------------------------------------------------------
; IL instruction gosub
;------------------------------------------------------------------------------
IL_GS: tsx
inc 1,x ; adjust return address to il_rs_target
inc 1,x
ldx basic_lineno ; get line number of GOSUB
stx IL_temp ; store it in temp
; an fall thru to payload saver which
; injects temp into return stack
;------------------------------------------------------------------------------
; insert IL_temp into return stack
;
; stack holds (low to high addresses)
; SP->
; return address of exec_il_opcode
; other data
;
; afterwards
; SP ->
; return address of exec_il_opcode
; payload
; other data
;------------------------------------------------------------------------------
push_payload: des ; reserve 2 bytes on processor stack
des
tsx ; get address in X
ldaa 2,x ; duplicate return address
staa 0,x
ldaa 3,x
staa 1,x
ldaa IL_temp ; insert return address for JS instruction in stack
staa 2,x
ldaa IL_temp+1
staa 3,x
ldx #end_prgm ; address of end of program
sts IL_temp ; save current stack in temporary
ldaa 1,x ; check that stack does not run into program code
suba IL_temp+1
ldaa 0,x
sbca IL_temp
bcs locret_519 ; is still space available?
; yes, exit
j2_error: jmp error ; no error
;------------------------------------------------------------------------------
; return payload in X
;
; stack:
; X
; 0 returnaddr caller of get_payload
; 1 returnaddr caller of get_payload
; 2 returnaddr caller of exec_il_opcode
; 3 returnaddr caller of exec_il_opcode
; 4 payload
; 5 payload
;------------------------------------------------------------------------------
get_payload: tsx ; copy return stack addr to X
inx ; pointing to return address
inx ; skip over return address and 2 more bytes
; point to index 3
inx
cpx end_ram ; stack underflow?
beq j2_error ; yes, error
ldx 1,x ; get payload into X
stx IL_temp ; save it
tsx ; point to return address
pshb ; save B
ldab #4 ; move 4 bytes above
gp_loop: ldaa 3,x
staa 5,x
dex
decb
bne gp_loop ; loop until done
pulb ; restore B
ins ; drop 1 word (duplicate return address)
ins
ldx IL_temp ; get payload
locret_519: rts ; done
;------------------------------------------------------------------------------
; find BASIC line whose lineno is on stack
; discard from stack
; return found line in basic_ptr
; Z=1 if line is matched exactly
;------------------------------------------------------------------------------
find_line: jsr IL_SP ; pop word into A:B
stab IL_temp+1 ; save in temporary
staa IL_temp
oraa IL_temp+1 ; check if zero (invalid)
beq j2_error ; if so, error
; find BASIC line whose lineno is in IL_temp
find_line1: ldx start_prgm ; set BASIC pointer to start
stx basic_ptr
test_line: jsr save_lineno ; save current lineno
; note: X = lineno
beq find_exit ; if zero, skip to end
ldab basic_lineno+1 ; compare line number with current line
ldaa basic_lineno
subb IL_temp+1
sbca IL_temp
bcc find_exit ; if above, exit
find_eoln: jsr fetch_basicchar ; get next char
bne find_eoln ; not CR? loop
bra test_line ; check next line
find_exit: cpx IL_temp ; compare current linenumber with searched one
rts
;------------------------------------------------------------------------------
; emit number in A:B
;------------------------------------------------------------------------------
emit_number: jsr expr_push_word ; push number on stack
IL_PN: ldx expr_stack_x ; get address of stack top
tst 0,x ; is number negative?
bpl loc_552 ; no, skip
jsr IL_NE ; negate top of stack
ldaa #'-' ; emit negative sign
bsr emit_char
loc_552: clra ; push 0 (end of digits)
psha
ldab #$F
ldaa #$1A
psha ; counter for 10's (0x1A)
pshb ; counter for 100's (0x0F)
psha ; counter for 1000's, (0x1A)
pshb ; counter for 10000's (0x0f)
jsr IL_SP ; pop TOS into A:B
tsx ; point to the constants 0xF, 0x1A....
loop_10000s: inc 0,x ; increment counter for 10000's
subb #$10 ; subtract 10000 (0x2710) until negative
sbca #$27
bcc loop_10000s ; counter for 10000's will become 0x10...0x14
loop_1000s: dec 1,x ; is now negative value, subtract until positive again
addb #$E8 ; add 1000 (0x3e8) until positive again
adca #3 ; decrement counter for 1000's
bcc loop_1000s ; counter for 1000's will become 0x19...0x10
loop_100s: inc 2,x ; is positive value now
subb #$64 ; subtract 100 (0x54) until negative
sbca #0
bcc loop_100s ; counter for 100's becomes 0x10...0x19
loop_10s: dec 3,x ; is now negative
addb #$A ; add 10 until positive again
bcc loop_10s ; counter for 10's become 0x10..0x19
; B contains remianing 1's digits
clr lead_zero ; clear flag to suppress leading zeroes
emit_digits: pula ; restore counter 10000
tsta ; was zero?
beq last_digit ; yes, last digit to emit, this one is in B
bsr emit_digit ; emit digit in A, suppress leading zeroes
bra emit_digits ; guarantee last digit is printed.
last_digit: tba ; last digit is in B
emit_digit: cmpa #$10 ; check if '0' (note range is 0x10..19 if not last digit)
bne emit_digit1 ; no, must emit
; note for last digit, any value will be emitted,
; because it can't be 0x10 (is 0...9)
tst lead_zero ; already emitted a digit?
beq locret_5AA ; no, exit (leading zero)
emit_digit1: inc lead_zero ; notify digit print
oraa #'0' ; make it a real ASCII '0'...'9'
; and print it, by fallthru to emit_char
;------------------------------------------------------------------------------
; emit a character in A
;------------------------------------------------------------------------------
emit_char: inc column_cnt ; advance to column 1
bmi loc_5A7 ; if at column 128, stop emit
stx X_save ; save X
pshb ; save B
jsr OUT_V ; emit character
pulb ; restore B
ldx X_save ; restore X
rts ; done
loc_5A7: dec column_cnt ; if column = 0x80, don't advance further
locret_5AA: rts
;------------------------------------------------------------------------------
; IL instruction print string
;------------------------------------------------------------------------------
pc_loop: bsr emit_char ; emit a character and continue
; with PC instruction
IL_PC: jsr fetch_il_op ; get next byte of instruction
bpl pc_loop ; if positive, skip
bra emit_char ; was last char, emit it and terminate
;------------------------------------------------------------------------------
; IL instruction PQ
;------------------------------------------------------------------------------
loop_pq: cmpa #'"' ; is character string terminator?
beq locret_5AA ; yes, exit
bsr emit_char ; otherwise emit char
; and redo PQ instruction
IL_PQ: jsr fetch_basicchar ; get next char from BASIC text
bne loop_pq ; if not CR, loop
jmp error ; error - unterminated string
;------------------------------------------------------------------------------
; IL instruction print tab
;------------------------------------------------------------------------------
IL_PT: ldab column_cnt ; column counter
bmi locret_5AA ; if overflow, exit
orab #$F8 ; make 7...0
negb
bra pt_loop ; jump to space printer
pt_print_spc: jsr IL_SP ; drop A:B off stack
pt_loop: decb ; decrement low byte
blt locret_5AA ; < 0, exit
ldaa #' ' ; emit a space
bsr emit_char
bra pt_loop ; loop
;------------------------------------------------------------------------------
; IL Instruction List BASIC source
;------------------------------------------------------------------------------
IL_LS: ldx basic_ptr ; save current BASIC pointer
stx BP_save
ldx start_prgm ; default start: begin of program
stx basic_ptr
ldx end_prgm ; default end: load X with end of program
bsr ls_getlineno ; if argument to list given, make this new end
; note "LIST start,end", so the first result
; popped off stack is the end
beq ls_nostart ; no more argument on stack
bsr ls_getlineno ; save first position in LS_begin
; get another argument into basic_ptr, if any
ls_nostart: ldaa basic_ptr ; compare start and end of listing
ldab basic_ptr+1
subb LS_end+1
sbca LS_end
bcc ls_exit ; start > end? yes, exit: nothing (more) to list
jsr save_lineno ; save lineno of current line
beq ls_exit ; is end of program (line 0)? yes, exit
ldaa basic_lineno ; get current line number
ldab basic_lineno+1
jsr emit_number ; print line number
ldaa #' ' ; print a space
ls_loop: bsr j_emitchar
jsr BV ; check for break
bcs ls_exit ; if break, exit
jsr fetch_basicchar ; get next char from line
bne ls_loop ; if not CR, loop output
bsr IL_NL ; emit a CRLF
bra ls_nostart ; loop with next line
;------------------------------------------------------------------------------
; called with an address into BASIC code
; return Z=1 if no argument
;------------------------------------------------------------------------------
ls_getlineno: inx ; increment X
stx LS_end ; store as default end of listing
ldx expr_stack_x ; get expr_stack ptr
cpx #$80 ; is stack empty?
beq locret_622 ; yes, no arg given...done
jsr find_line ; find the line (after the lineno) that was given on
; stack (start line number)
; result in X=basic_ptr
ls_to_linestart: ldx basic_ptr ; point back to lineno that was found
dex
dex
stx basic_ptr
locret_622: rts
ls_exit: ldx BP_save ; restore old BASIC pointer
stx basic_ptr
rts
;------------------------------------------------------------------------------
; IL instruction: emit new line
;------------------------------------------------------------------------------
IL_NL: ldaa column_cnt ; if column > 127, suppress output
bmi locret_622
;------------------------------------------------------------------------------
; do a CRLF
;------------------------------------------------------------------------------
crlf: ldaa #$D ; emit carriage return character
bsr emit_char_at_0
ldab PCC ; get padding mode
aslb ; shift out bit 7
beq loc_63E ; if no padding bytes, skip
loc_636: pshb ; save padding count
bsr emit_nul_padding ; emit padding
pulb ; restore count
decb ; decrement twice (because above
aslb ; multiplied *2)
decb
bne loc_636 ; loop until done
loc_63E: ldaa #$A ; emit line feed character
bsr j_emitchar ; emit character (with increment column count)
; depending on PCC bit 7 emit
; either NUL or DEL (0xff) byte
emit_nul_padding: clra ; padding byte
tst PCC ; check if bit 7 of PCC:
; =0, emit NUL bytes
; =1, emit 0xFF bytes
bpl emit_char_at_0 ; emit a NUL byte
coma
; emit a char in A and clear column count/XOFF mode
emit_char_at_0: clr column_cnt ; reset column to 0
j_emitchar: jmp emit_char
do_xon: ldaa TMC ; get XOFF flag
bra loc_655
do_xoff: clra
loc_655: staa column_cnt ; save column count
bra gl_loop
;------------------------------------------------------------------------------
; IL instruction: get input line
; uses expr_stack as buffer
;------------------------------------------------------------------------------
IL_GL: ldx #expr_stack ; store floor of expr_stack as BASIC pointer
stx basic_ptr
stx IL_temp ; save pointer to char input into buffer
jsr expr_push_word ; save A:B for later (may be variable address, or alike)
gl_loop: eora rnd_seed ; use random A to create some entropy
staa rnd_seed
jsr IN_V ; get a char from input device
anda #$7F ; make 7bit ASCII
beq gl_loop ; if NUL, ignore
cmpa #$7F ; if 0xFF/0x7F, ignore
beq gl_loop
cmpa #$A ; if LF, done
beq do_xon
cmpa #$13 ; if DC3 (XOFF) handle XOFF
beq do_xoff
ldx IL_temp ; get buffer pointer
cmpa LSC ; line cancel?
beq gl_ctrlx
cmpa BSC ; is it "_" ? (back character)
bne gl_chkend ; no, skip
cpx #expr_stack ; at start of buffer?
bne gl_dobackspace ; no, do a backspace
gl_ctrlx: ldx basic_ptr ; reset pointer to input char
ldaa #$D ; load CR
clr column_cnt ; do XON
gl_chkend: cpx expr_stack_x ; is end of buffer reached?
bne gl_savechar ; no, skip
ldaa #7 ; emit BEL character (line overflow)
bsr j_emitchar
bra gl_loop ; loop
gl_savechar: staa 0,x ; save char in buffer
inx ; advance
inx
gl_dobackspace: dex
stx IL_temp ; !!! error in dump, was 0F
; save new ptr to input
cmpa #$D ; was char CR?
bne gl_loop ; no, get another char
jsr IL_NL ; end of input reached
ldaa IL_temp+1 ; get buffer line
staa expr_stack_low ; save as new expr_stack bottom
; (should not overwrite buffer)
jmp IL_SP ; pop old value off stack
;------------------------------------------------------------------------------
; IL instruction: insert BASIC line
;------------------------------------------------------------------------------
IL_IL: jsr swap_bp ; basicptr_save = 0x80 (input buffer)
; basic_ptr = invalid
jsr find_line ; search for line with lineno from stack
; if found: address of BASIC text in basic_ptr
; if not: address of next line or end of program
tpa ; save status, whether line was found
jsr ls_to_linestart ; adjust line back to lineno
stx BP_save ; save this in BP_save as well.
; basic_ptr==BP_save is position where to enter
; new line (if same lineno, overwrite)
ldx IL_temp ; save lineno to be handled in LS_end
stx LS_end
clrb ; preload length of stored line with 0
; for line not found (must grow)
tap ; restore status of find_line
bne il_linenotfound ; skip if lineno not matched
; hey, this line already exists!
jsr save_lineno ; save lineno where we are currently in basic_lineno
ldab #$FE ; advance to end of line,
; B is negative length of line
il_findeoln: decb
jsr fetch_basicchar
bne il_findeoln ; loop until end of line
; B now contains negative sizeof(stored line)
il_linenotfound: ldx #0 ; B is 0, if line does not yet exist
stx basic_lineno ; clear lineno
jsr swap_bp ; basic_ptr = 0x80 (input buffer)
; basicptr_save = at end of position to insert
; (i.e. either before following line, or at end of
; line to be grown/shrunk)
ldaa #$D ; calculate sizeof(input buffer)
; load EOLN char
ldx basic_ptr ; start at input buffer (after line number)
cmpa 0,x ; is it eoln?
beq loc_6EC ; yes, skip - this is an empty line: must delete
addb #3 ; no, reserve 3 bytes for lineno and CR
loc_6E2: incb ; increment B for every byte in current line <> eoln
inx
cmpa 0,x ; advance and check for EOLN
bne loc_6E2 ; loop until eoln found
;
; all in all, B contains the difference of line lengths:
; -sizeof(stored line)+sizeof(input buffer)
; if negative: stored is longer than new -> shrink program
; if zero: stored is same size
; if positive: stored is shorter than new -> grow program
ldx LS_end ; restore current lineno
; is non-null: there is a line to add
stx basic_lineno
loc_6EC: ldx BP_save ; IL_temp = start of area to insert line
stx IL_temp
tstb ; check number of bytes
; negative: shrink program
; zero: nothing to move
; positive: grow program
beq il_samesize ; same size, just copy
bpl il_growline ; stored line is longer -> shrink
ldaa basicptr_save+1 ; BP_save = end_of_insert - bytes to shrink
aba
staa BP_save+1
ldaa basicptr_save
adca #$FF
staa BP_save ; BP_save < basicptr_save < end_pgrm < top_of_stack (hopefully)
il_shrink: ldx basicptr_save ; copy from end of insert addr to BP_save addr
ldab 0,x
cpx end_prgm ; until end of program
beq loc_744
cpx top_of_stack ; or until top_of_stack
beq loc_744 ; leave, when done
inx ; advance
stx basicptr_save
ldx BP_save
stab 0,x ; save the byte
inx
stx BP_save
bra il_shrink ; loop until done
il_growline: addb end_prgm+1 ; make space after end of program for B bytes
stab basicptr_save+1
ldaa #0
adca end_prgm
staa basicptr_save ; basicptr_save = new end of program
subb top_of_stack+1
sbca top_of_stack ; verify it's below top_of_RAM
bcs il_dogrow ; ok, continue
dec il_pc+1 ; point back to IL instruction
jmp error ; overflow error
il_dogrow: ldx basicptr_save ; BP_save is new end of program
stx BP_save
il_grow: ldx end_prgm ; get byte from old end of program
ldaa 0,x
dex ; advance back
stx end_prgm
ldx basicptr_save ; store byte at new end of program
staa 0,x
dex
stx basicptr_save
cpx IL_temp
bne il_grow ; loop until done
loc_744: ldx BP_save ; adjust new end of program
stx end_prgm
il_samesize: ldx basic_lineno ; now there is space at position for the new line
; check lineno: is 0 if delete
beq il_done ; nothing to copy (gap is already closed)
ldx IL_temp ; start of area to insert into (the gap)
ldaa basic_lineno ; store the line number into this area
ldab basic_lineno+1
staa 0,x
inx
stab 0,x
il_moveline: inx
stx IL_temp ; position of gap
jsr fetch_basicchar ; get char from input buffer
ldx IL_temp ; put it into gap
staa 0,x
cmpa #$D ; until EOLN
bne il_moveline
il_done: lds top_of_stack ; finished with IL
; reload stack pointer
jmp restart_il_nocr ; and re-enter BASIC loop
;------------------------------------------------------------------------------
; Break routine for Motorola MINIBUG
;------------------------------------------------------------------------------
minibug_break: ldaa $FCF4 ; ACIA control status
asra ; check bit0: receive buffer full
bcc locret_776 ; no, exit, carry clear
ldaa $FCF5 ; load ACIA data
bne locret_776 ; if not NUL, return carry set
clc ; was NUL, ignore, retun carry clear
locret_776: rts
;------------------------------------------------------------------------------
; Input/Echo routine for Motorola MINIBUG
;------------------------------------------------------------------------------
minibug_inoutput: ldaa $FCF4 ; get ACIA status
asra ; check bit: receiver buffer empty?
bcc minibug_inoutput ; yes, wait for char
ldaa $FCF5 ; get ACIA data
psha ; save it for later
wait_tdre: ldaa $FCF4 ; get ACIA status
anda #2 ; check bit1: transmit buf empty?
beq wait_tdre ; no, wait until transmitted
pula ; restore char
staa $FCF5 ; echo data just entered
rts
;------------------------------------------------------------------------------
; test break routine for MIKBUG
;------------------------------------------------------------------------------
mikbug_chkbreak: ldaa $8004 ; check bitbang input of PIA
clc
bmi locret_7A0 ; if 1, exit: no input
loc_793: ldaa $8004 ; is zero, wait until 1
bpl loc_793
bsr *+2 ; emit byte 0xFF twice
ldaa #$FF ; emit 0xFF
jsr OUT_V
sec
locret_7A0: rts
;******************************************************************************
; The IL interpreter commented
;******************************************************************************
start_of_il: fcb $24,':',$11+$80 ; PL : print literal ":",XON
fcb $27 ; GL : get input line
fcb $10 ; SB : save BASIC pointer
fcb $E1 ; BE 01: if not eoln, branch to il_test_insert
fcb $59 ; BR 19: branch to start_of_il
il_test_insert: fcb $C5 ; BN 05: if not number, branch to il_test_let
fcb $2A ; IL : insert BASIC line
fcb $56 ; BR 16: branch to start_of_il
il_run: fcb $10 ; SB : save BASIC pointer
fcb $11 ; RB : restore BASIC pointer
fcb $2C ; XC : execute
il_test_let: fcb $8B,'L','E',$D4 ; BC 0B: if not "LET", branch to il_test_go
fcb $A0 ; BV 00: if not variable, error
fcb $80,'='+$80 ; BC 00: if not "=", error
il_let: fcb $30,$BC ; JS 0BC: call il_expr
fcb $E0 ; BE 00: if not eoln, error
fcb $13 ; SV : store variable
fcb $1D ; NX : next BASIC statement
il_test_go: fcb $94,'G','O'+$80 ; BC 14: if not "GO", branch to il_test_10
fcb $88,'T','O'+$80 ; BC 08: if not "TO", branch to il_test_sub
fcb $30,$BC ; JS 0BC: call il_expr
fcb $E0 ; BE 00: if not eoln, error
fcb $10 ; SB : save BASIC pointer
fcb $11 ; RB : restore BASIC pointer
fcb $16 ; GO : GOTO
il_test_sub: fcb $80,'S','U','B'+$80
; BC 00: if not "SUB", error
fcb $30,$BC ; JS 0BC: call il_expr
fcb $E0 ; BE 00: if not eoln, error
fcb $14 ; GS : GOSUB save
fcb $16 ; GO : GOTO
il_test_pr: fcb $90,'P','R'+$80 ; BC 10: if not "PR", branch to il_jump1
fcb $83,'I','N','T'+$80
; BC 03: if not "INT", branch to il_print
il_print: fcb $E5 ; BE 05: if not eoln, branch to il_pr_test_dq
fcb $71 ; BR 31: branch to il_pr_must_eoln
il_pr_test_semi: fcb $88,';'+$80 ; BC 08: if not ";", branch to il_pr_test_com
il_pr_eoln: fcb $E1 ; BE 01: if not eoln, branch to il_pr_test_dq
fcb $1D ; NX : next BASIC statement
il_pr_test_dq: fcb $8F,'"'+$80 ; BC 0F: if not dblquote, branch to il_pr_expr
fcb $21 ; PQ : print BASIC string
fcb $58 ; BR 18: branch to il_test_semi
il_jump1: fcb $6F ; BR 2F: branch to il_test_if
il_pr_test_com: fcb $83,','+$80 ; BC 03: if not ",", branch to il_test_colon
fcb $22 ; PT : print TAB
fcb $55 ; BR 15: branch to il_pr_eoln
il_test_colon: fcb $83,':'+$80 ; BC 03: if not ":", branch to il_pr_must_eoln
fcb $24,$13+$80 ; PR : print literal XOFF
il_pr_must_eoln: fcb $E0 ; BE 00: if not eoln, error
fcb $23 ; NL : new line
fcb $1D ; NX : next statement
il_pr_expr: fcb $30,$BC ; JS 0BC: call il_expr
fcb $20 ; PN : print number
fcb $48 ; BR 08: branch to il_pr_test_semi
fcb $91,'I','F'+$80 ; BC 11: if not "IF", branch to il_test_input
il_test_if: fcb $30,$BC ; JS 0BC: call il_expr
fcb $31,$34 ; JS 134: call il_cmpop
fcb $30,$BC ; JS 0BC: call il_expr
fcb $84,'T','H','E','N'+$80
; BC 04: if not "THEN", branch to il_test_input
fcb $1C ; CP : compare
fcb $1D ; NX : next BASIC statement
fcb $38,$D ; J 00D: jump il_test_let
il_test_input: fcb $9A,'I','N','P','U','T'+$80
; BC 1A: if not "INPUT", branch to il_test_return
il_in_more: fcb $A0 ; BV 00: if not variable, error
fcb $10 ; SB : save BASIC pointer
fcb $E7 ; BE 07: if not eoln, branch to il_in_test_com
il_in_query: fcb $24,'?',' ',$11+$80
; PR : print literal "? ",XON
fcb $27 ; GL : get input line
fcb $E1 ; BE 01: if not eoln, branch to il_in_test_com
fcb $59 ; BR 19: branch to il_in_query
il_in_test_com: fcb $81,','+$80 ; BC 01: if not ",", branch to il_in_get
fcb $30,$BC ; JS 0BC: call il_expr
fcb $13 ; SV : store variable
fcb $11 ; RB : restore BASIC pointer
fcb $82,','+$80 ; BC 02: if not ",", branch il_in_done
fcb $4D ; BR 0D: branch to il_in_more
fcb $E0 ; BE 00: if not eoln, error
fcb $1D ; NX : next BASIC statement
il_test_return: fcb $89,'R','E','T','U','R','N'+$80
; BC 09: if not "RETURN", branch to il_test_end
fcb $E0 ; BE 00: if not eoln, error
fcb $15 ; RS : restore saved line
fcb $1D ; NX : next BASIC statement
il_test_end: fcb $85,'E',N','D'+$80
; BC 05: if not "END", branch to il_test_list
fcb $E0 ; BE 00: if not eoln, error
fcb $2D ; WS : stop
il_test_list: fcb $98,'L','I','S','T'+$80
; BC 18: if not "LIST", branch to il_test_run
fcb $EC ; BE 0C: if not eoln, branch to il_li_line
il_li_newline: fcb $24,0,0,0,0,$0A,0+$80
; PR : print literal NUL,NUL,NUL,NUL,LF,NUL
fcb $1F ; LS : list the program
fcb $24,$13+$80 ; PR : print literal XOFF
fcb $23 ; NL : newline
fcb $1D ; NX : next BASIC statement
il_li_line: fcb $30,$BC ; JS 0BC: call il_expr
fcb $E1 ; if not eoln, branch to il_li2
fcb $50 ; BR 10: branch to il_li_newline
fcb $80,','+$80 ; BC 00: if not ",", error
fcb $59 ; BR 19: branch to il_li_line
il_test_run: fcb $85,'R','U','N'+$80
; BC 05: if not "RUN", branch to il_test_clear
fcb $38,$0A ; J 00A: branch to il_run
il_test_clear: fcb $86,'C','L','E','A','R'+$80
; BC 06: if not "CLEAR", branch to il_test_rem
fcb $2B ; MT : mark basic program space empty
il_test_rem: fcb $84,'R','E','M'+$80
; BC 04: if not "REM, branch to il_assign
fcb $1D ; NX : next BASIC statement
fcb $A0 ; BV 00: if not variable, error
il_assign: fcb $80,'='+$80 ; BC 00: if not "=", error
fcb $38,$14 ; J 014: branch to il_let
il_expr: fcb $85,'-'+$80 ; if not "-", branch to il_expr_plus
fcb $30,$D3 ; JS 0D3: call il_term
fcb $17 ; NE : negate
fcb $64 ; BR 24: branch to il_expr1
il_expr_plus: fcb $81,'+'+$80 ; BC 01: if not "+", branch to il_expr0
il_expr0: fcb $30,$D3 ; JS 0D3: call il_term
il_expr1: fcb $85,'+'+$80 ; BC 05: if not "+", branch to il_expr2
fcb $30,$D3 ; JS 0D3: call il_term
fcb $18 ; AD : add
fcb $5A ; BR 1A: branch to il_expr1
il_expr2: fcb $85,'-'+$80 ; BC 05: if not "-", branch to il_term
fcb $30,$D3 ; JS 0D3: call il_term
fcb $19 ; SU : subtract
fcb $54 ; BR 14: branch to il_expr1
il_expr3: fcb $2F ; RT : return
il_term: fcb $30,$E2 ; JS 0E2: call il_fact
il_term0: fcb $85,'*'+$80 ; BC 05: if not "*", branch to il_term1
fcb $30,$E2 ; JS 0E2: call il_factor
fcb $1A ; MP : multiply
fcb $5A ; BR 1A: branch to il_term0
il_term1: fcb $85,'/'+$80 ; if not "/", branch to il_term2
fcb $30,$E2 ; JS 0E2: call il_factor
fcb $1B ; DV : divide
fcb $54 ; BR 14: branch to il_term0
il_term2: fcb $2F ; RT : return
il_factor: fcb $98,'R','N','D'+$80
; BC 18: if not RND, branch to il_factor1
fcb $A,$80,$80 ; LN : push literal 0x8080
fcb $12 ; FV : fetch variable rnd_seed
fcb $A,$09,$29 ; LN : push literal 0x0929
fcb $1A ; MP : multiply
fcb $A,$1A,$85 ; LN : push literal 0x1A85
fcb $18 ; AD : add
fcb $13 ; SV : store variable rnd_seed
fcb 9,$80 ; LB : push literal byte 0x80
fcb $12 ; FV : fetch variable rnd_seed
fcb 1 ; SX 01: stack exchange
fcb $B ; DS : duplicate stack top
fcb $31,$30 ; JS 130: call il_rn_paren
fcb $61 ; BR 21: branch to il_factor2
il_factor1: fcb $72 ; BR 32: branch to il_usr
il_factor2: fcb $B ; DS : duplicate stack top
fcb 4 ; SX 04: stack exchange
fcb 2 ; SX 02: stack exchange
fcb 3 ; SX 03: stack exchange
fcb 5 ; SX 05: stack exchange
fcb 3 ; SX 03: stack exchange
fcb $1B ; DV : divide
fcb $1A ; MP : multiply
fcb $19 ; SU : subtract
fcb $B ; DS : duplicate stack top
fcb 9,$06 ; LB : push literal byte 0x06
fcb $A,$00,$00 ; LN : push literal number 0x0000
fcb $1C ; CP : compare
fcb $17 ; NE : negate
fcb $2F ; RT : return
il_usr: fcb $8F,'U','S','R'+$80
; BC 0F: if not "USR", branch to il_factor3
fcb $80 ; BC 00: if not "(", error
fcb $A8 ; if not variable, branch to il_usr1
fcb $30,$BC ; JS 0BC: call il_expr
fcb $31,$2A ; JS 12A: call il_us_test_com
fcb $31,$2A ; JS 12A: call il_us_test_com
fcb $80,')'+$80 ; BC 00: if not ")", error
il_usr1: fcb $2E ; US : machine language call
fcb $2F ; RT : return
il_factor3: fcb $A2 ; BV 02: if not variable, branch to il_factor4
fcb $12 ; FV : fetch variable
fcb $2F ; RT : return
il_factor4: fcb $C1 ; BN 01: if not number, branch to il_lparen
fcb $2F ; RT : return
fcb $80,'('+$80 ; BC 00: if not "(", error
il_factor5: fcb $30,$BC ; JS 0BC: call il_expr
fcb $80,')'+$80 ; BC 00: if not ")", error
fcb $2F ; RT : return
il_us_test_com: fcb $83,','+$80 ; BC 03: if not ",", branch to il_us_dup
fcb $38,$BC ; J 0BC: branch to il_expr
il_us_dup: fcb $B ; DS : duplicate stack top
fcb $2F ; RT : return
il_rn_paren: fcb $80,'('+$80 ; BC 00: if not "(", error
fcb $52 ; BR 12: branch to il_factor5
fcb $2F ; RT : return
il_cmpop: fcb $84,'='+$80 ; if not "=", branch to il_cmpop1
fcb 9,$02 ; LB : push literal byte 0x02
fcb $2F ; RT ; return
il_cmpop1: fcb $8E,'<'+$80 ; BR 0E: if not "<", branch to il_cmpop4
fcb $84,'='+$80 ; BR 04: if not "=", branch to il_cmpop2
fcb 9,$93 ; LB : push literal byte 0x93
fcb $2F ; RT : return
il_cmpop2: fcb $84,'>'+$80 ; BR 04: if not ">", branch to il_cmpop3
fcb 9,$05 ; LB : push literal byte 0x05
fcb $2F ; RT : return
il_cmpop3: fcb 9,$91 ; LB : push literal byte 0x91
fcb $2F ; RT : return
il_cmpop4: fcb $80,'>'+$80 ; BR 00: if not ">", error
fcb $84,'='+$80 ; BR 04: if not "=", branch to il_cmpop5
fcb 9,$06 ; LB : push literal byte 0x06
fcb $2F ; RT : return
il_cmpop5: fcb $84,'<'+$80 ; BR 04: if not "<", branch to il_cmpop6
fcb 9,$95 ; LB : push literal byte 0x95
fcb $2F ; RT : return
il_cmpop6: fcb 9,$04 ; LB : push literal byte 0x04
fcb $2F ; RT :return
fcb 0
fcb 0
;------------------------------------------------------------------------------
; not called: reference code for break check for MIKBUG/MINIBUG monitors
;------------------------------------------------------------------------------
jmp minibug_chkbreak
jmp mikbug_chkbreak
end
| 50.388033
| 100
| 0.404844
|
4f58b8c96f3a4748f0a3966a2ed816d86cd716d5
| 6,037
|
asm
|
Assembly
|
31.asm
|
AsadKhalil/Assembly_x86
|
48aa2a0ab93fd359f5f20369bb9064052c2f2884
|
[
"MIT"
] | null | null | null |
31.asm
|
AsadKhalil/Assembly_x86
|
48aa2a0ab93fd359f5f20369bb9064052c2f2884
|
[
"MIT"
] | null | null | null |
31.asm
|
AsadKhalil/Assembly_x86
|
48aa2a0ab93fd359f5f20369bb9064052c2f2884
|
[
"MIT"
] | null | null | null |
; multitasking and dynamic thread registration
[org 0x0100]
jmp start
; PCB layout:
; ax,bx,cx,dx,si,di,bp,sp,ip,cs,ds,ss,es,flags,next,dummy
; 0, 2, 4, 6, 8,10,12,14,16,18,20,22,24, 26 , 28 , 30
pcb: times 32*16 dw 0 ; space for 32 PCBs
stack: times 32*256 dw 0 ; space for 32 512 byte stacks
nextpcb: dw 1 ; index of next free pcb
current: dw 0 ; index of current pcb
lineno: dw 0 ; line number for next thread
counter: dw 0xffff ;max number of times a thread should be executed
; subroutine to print a number on screen
; takes the row no, column no, and number to be printed as parameters
printnum: push bp
mov bp, sp
push es
push ax
push bx
push cx
push dx
push di
mov di, 80 ; load di with columns per row
mov ax, [bp+8] ; load ax with row number
mul di ; multiply with columns per row
mov di, ax ; save result in di
add di, [bp+6] ; add column number
shl di, 1 ; turn into byte count
add di, 8 ; to end of number location
mov ax, 0xb800
mov es, ax ; point es to video base
mov ax, [bp+4] ; load number in ax
mov bx, 16 ; use base 16 for division
mov cx, 4 ; initialize count of digits
nextdigit: mov dx, 0 ; zero upper half of dividend
div bx ; divide by 10
add dl, 0x30 ; convert digit into ascii value
cmp dl, 0x39 ; is the digit an alphabet
jbe skipalpha ; no, skip addition
add dl, 7 ; yes, make in alphabet code
skipalpha: mov dh, 0x07 ; attach normal attribute
mov [es:di], dx ; print char on screen
sub di, 2 ; to previous screen location
loop nextdigit ; if no divide it again
pop di
pop dx
pop cx
pop bx
pop ax
pop es
pop bp
ret 6
; mytask subroutine to be run as a thread
; takes line number as parameter
mytask: push bp
mov bp, sp
sub sp, 2 ; thread local variable
push ax
push bx
mov ax, [bp+4] ; load line number parameter
mov bx, 70 ; use column number 70
mov word [bp-2], 0 ; initialize local variable
printagain: push ax ; line number
push bx ; column number
push word [bp-2] ; number to be printed
call printnum ; print the number
inc word [bp-2] ; increment the local variable
jmp printagain ; infinitely print
pop bx
pop ax
mov sp, bp
pop bp
ret
; subroutine to register a new thread
; takes the segment, offset, of the thread routine and a parameter
; for the target thread subroutine
initpcb: push bp
mov bp, sp
push ax
push bx
push cx
push si
mov bx, [nextpcb] ; read next available pcb index
cmp bx, 32 ; are all PCBs used
je exit ; yes, exit
mov cl, 5
shl bx, cl ; multiply by 32 for pcb start
mov ax, [bp+8] ; read segment parameter
mov [pcb+bx+18], ax ; save in pcb space for cs
mov ax, [bp+6] ; read offset parameter
mov [pcb+bx+16], ax ; save in pcb space for ip
mov [pcb+bx+22], ds ; set stack to our segment
mov si, [nextpcb] ; read this pcb index
mov cl, 9
shl si, cl ; multiply by 512
add si, 256*2+stack ; end of stack for this thread
mov ax, [bp+4] ; read parameter for subroutine
sub si, 2 ; decrement thread stack pointer
mov [si], ax ; pushing param on thread stack
sub si, 2 ; space for return address
mov [pcb+bx+14], si ; save si in pcb space for sp
mov word [pcb+bx+26], 0x0200 ; initialize thread flags
mov ax, [pcb+28] ; read next of 0th thread in ax
mov [pcb+bx+28], ax ; set as next of new thread
mov ax, [nextpcb] ; read new thread index
mov [pcb+28], ax ; set as next of 0th thread
inc word [nextpcb] ; this pcb is now used
exit: pop si
pop cx
pop bx
pop ax
pop bp
ret 6
; timer interrupt service routine
timer: push ds
push bx
push cs
pop ds ; initialize ds to data segment
mov bx, [current] ; read index of current in bx
shl bx, 1
shl bx, 1
shl bx, 1
shl bx, 1
shl bx, 1 ; multiply by 32 for pcb start
mov [pcb+bx+0], ax ; save ax in current pcb
mov [pcb+bx+4], cx ; save cx in current pcb
mov [pcb+bx+6], dx ; save dx in current pcb
mov [pcb+bx+8], si ; save si in current pcb
mov [pcb+bx+10], di ; save di in current pcb
mov [pcb+bx+12], bp ; save bp in current pcb
mov [pcb+bx+24], es ; save es in current pcb
pop ax ; read original bx from stack
mov [pcb+bx+2], ax ; save bx in current pcb
pop ax ; read original ds from stack
mov [pcb+bx+20], ax ; save ds in current pcb
pop ax ; read original ip from stack
mov [pcb+bx+16], ax ; save ip in current pcb
pop ax ; read original cs from stack
mov [pcb+bx+18], ax ; save cs in current pcb
pop ax ; read original flags from stack
mov [pcb+bx+26], ax ; save cs in current pcb
mov [pcb+bx+22], ss ; save ss in current pcb
mov [pcb+bx+14], sp ; save sp in current pcb
mov bx, [pcb+bx+28] ; read next pcb of this pcb
mov [current], bx ; update current to new pcb
mov cl, 5
shl bx, cl ; multiply by 32 for pcb start
mov cx, [pcb+bx+4] ; read cx of new process
mov dx, [pcb+bx+6] ; read dx of new process
mov si, [pcb+bx+8] ; read si of new process
mov di, [pcb+bx+10] ; read diof new process
mov bp, [pcb+bx+12] ; read bp of new process
mov es, [pcb+bx+24] ; read es of new process
mov ss, [pcb+bx+22] ; read ss of new process
mov sp, [pcb+bx+14] ; read sp of new process
push word [pcb+bx+26] ; push flags of new process
push word [pcb+bx+18] ; push cs of new process
push word [pcb+bx+16] ; push ip of new process
push word [pcb+bx+20] ; push ds of new process
mov al, 0x20
out 0x20, al ; send EOI to PIC
mov ax, [pcb+bx+0] ; read ax of new process
mov bx, [pcb+bx+2] ; read bx of new process
pop ds ; read ds of new process
iret ; return to new process
start: xor ax, ax
mov es, ax ; point es to IVT base
cli
mov word [es:8*4], timer
mov [es:8*4+2], cs ; hook timer interrupt
sti
nextkey: xor ah, ah ; service 0 – get keystroke
int 0x16 ; bios keyboard services
push cs ; use current code segment
mov ax, mytask
push ax ; use mytask as offset
push word [lineno] ; thread parameter
call initpcb ; register the thread
inc word [lineno] ; update line number
jmp nextkey ; wait for next keypress
| 32.632432
| 70
| 0.670366
|
5faa5affdff35d3d9b43346645b3274a590fe29a
| 495
|
asm
|
Assembly
|
programs/oeis/109/A109900.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/109/A109900.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/109/A109900.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A109900: The (n,r)-th term of the following triangle is T(n)-T(r) for r = 0 to n. The n-th row contains n+1 terms. T(n) = the n-th triangular number = n(n+1)/2. Sequence contains the sum of terms at a 45-degree angle.
; 0,1,3,8,15,27,42,64,90,125,165,216,273,343,420,512,612,729,855,1000,1155,1331,1518,1728,1950,2197,2457,2744,3045,3375,3720,4096,4488,4913,5355,5832,6327,6859,7410,8000,8610,9261,9933,10648,11385,12167,12972
add $0,1
mov $1,$0
pow $1,2
div $1,2
mul $0,$1
mul $0,2
div $0,8
| 45
| 219
| 0.69899
|
d8d5153348d8bfdbf469e3591de29fd3d6896f1b
| 443
|
asm
|
Assembly
|
programs/oeis/202/A202194.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/202/A202194.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/202/A202194.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
; A202194: Number of (n+2)X(n+2) binary arrays avoiding patterns 001 and 101 in rows and columns
; 108,640,3500,18144,90552,439296,2084940,9724000,44710952,203164416,914004728,4077035200,18052470000,79420170240,347424465420,1512176830560,6552247686600,28276211040000,121580638419240,521033622457920,2226136703615760
mov $2,$0
mov $0,3
add $0,$2
cal $0,37966 ; a(n) = n^2*binomial(2*n-2, n-1).
mov $1,$0
sub $1,54
div $1,2
mul $1,4
add $1,108
| 34.076923
| 218
| 0.76298
|
9e2bd8651d764e6b6fa4f308264b885ecc9d1bbc
| 447
|
asm
|
Assembly
|
oeis/073/A073219.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/073/A073219.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/073/A073219.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A073219: The terms of A073211 (sums of two powers of 11) divided by 2.
; 1,6,11,61,66,121,666,671,726,1331,7321,7326,7381,7986,14641,80526,80531,80586,81191,87846,161051,885781,885786,885841,886446,893101,966306,1771561,9743586,9743591,9743646,9744251,9750906,9824111,10629366,19487171
seq $0,131437 ; (A000012 * A131436) + (A131436 * A000012) - A000012.
seq $0,32931 ; Numbers whose set of base-11 digits is {1,2}.
mul $0,5
div $0,11
add $0,1
| 49.666667
| 214
| 0.744966
|
0f0810e2c396908857c4e8009957b4d3c28bdc83
| 825
|
asm
|
Assembly
|
code/display/border.asm
|
abekermsx/skooted
|
ea0eb5c0c2703c45807477bfdcda0ad1ad9119d8
|
[
"MIT"
] | 3
|
2021-10-06T20:52:11.000Z
|
2021-11-29T11:31:55.000Z
|
code/display/border.asm
|
abekermsx/skooted
|
ea0eb5c0c2703c45807477bfdcda0ad1ad9119d8
|
[
"MIT"
] | null | null | null |
code/display/border.asm
|
abekermsx/skooted
|
ea0eb5c0c2703c45807477bfdcda0ad1ad9119d8
|
[
"MIT"
] | null | null | null |
initialize_border:
ld a,138
ld hl,6144
call WRTVRM ; draw top left
inc l
ld bc,11 * 2
ld a,140
call FILVRM ; draw top
ld hl,6144 + 1 + 11 * 2
ld a,139
call WRTVRM ; draw top right
ld b,11 * 2
ld hl,6144 + 32
initialize_border_loop:
ld a,172
call WRTVRM ; draw left
ld de,11 * 2 + 1
add hl,de
ld a,172
call WRTVRM ; draw right
ld de,32 - 11 * 2 - 1
add hl,de
djnz initialize_border_loop
ld a,170
call WRTVRM ; draw bottom left
inc l
ld bc,11 * 2
ld a,140
call FILVRM ; draw bottom
ld hl,6144 + 32 + 32 * 11 * 2 + 1 + 11 * 2
ld a,171
call WRTVRM ; draw bottom right
ret
| 19.186047
| 50
| 0.473939
|
ca187dabea26d8edf3d40f9f145bcbbd7d6a733b
| 356
|
nasm
|
Assembly
|
Projetos/F-Assembly/src/nasm/div.nasm
|
LiuSeeker/Z01-Coldzera
|
097f0af689c0511598163bcf4c89afe987292f24
|
[
"Unlicense"
] | 1
|
2018-04-20T10:41:30.000Z
|
2018-04-20T10:41:30.000Z
|
Projetos/F-Assembly/src/nasm/div.nasm
|
LiuSeeker/Z01-Coldzera
|
097f0af689c0511598163bcf4c89afe987292f24
|
[
"Unlicense"
] | 76
|
2018-03-09T12:22:41.000Z
|
2018-05-18T11:47:17.000Z
|
Projetos/F-Assembly/src/nasm/div.nasm
|
LiuSeeker/Z01-Coldzera
|
097f0af689c0511598163bcf4c89afe987292f24
|
[
"Unlicense"
] | null | null | null |
leaw $0, %A
;Mover o que ta em A[0] para D
movw (%A), %D
leaw $1, %A
WHILE:
leaw $1, %A
;Subtrai D - A[1] e salva em D
subw %D, (%A), %D
;Incrementa 1 em %S
incw %S
leaw $WHILE, %A
;Volta se D for maior que zero
jg %D
nop
leaw $2, %A
;Move A[2] -> S
movw %S, (%A)
| 3.296296
| 30
| 0.426966
|
b40e3b80ade2a0839a4760d0e3b67cca7eba2e61
| 1,038
|
asm
|
Assembly
|
programs/oeis/228/A228693.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/228/A228693.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/228/A228693.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A228693: Largest number of maximal independent sets of nodes in any tree on n nodes.
; 1,1,2,2,3,4,5,8,9,16,17,32,33,64,65,128,129,256,257,512,513,1024,1025,2048,2049,4096,4097,8192,8193,16384,16385,32768,32769,65536,65537,131072,131073,262144,262145,524288,524289,1048576,1048577,2097152,2097153,4194304,4194305,8388608,8388609,16777216,16777217,33554432,33554433,67108864,67108865,134217728,134217729,268435456,268435457,536870912,536870913,1073741824,1073741825,2147483648,2147483649,4294967296,4294967297,8589934592,8589934593,17179869184,17179869185,34359738368,34359738369,68719476736,68719476737,137438953472,137438953473,274877906944,274877906945,549755813888,549755813889,1099511627776,1099511627777,2199023255552,2199023255553,4398046511104,4398046511105,8796093022208,8796093022209,17592186044416,17592186044417,35184372088832,35184372088833,70368744177664,70368744177665,140737488355328,140737488355329,281474976710656,281474976710657,562949953421312
sub $0,1
lpb $0
sub $0,2
mul $1,2
sub $1,1
lpe
trn $0,$1
add $0,1
| 86.5
| 877
| 0.848748
|
864a9083c264679b85853250dddcf82b373d6ac4
| 7,301
|
asm
|
Assembly
|
yo.asm
|
charlesap/nasm-uefi
|
9b683c289251dc687d0e410f25a61a53eeb8bf3a
|
[
"MIT"
] | 3
|
2019-12-21T15:40:20.000Z
|
2022-01-06T17:12:48.000Z
|
yo.asm
|
charlesap/nasm-uefi
|
9b683c289251dc687d0e410f25a61a53eeb8bf3a
|
[
"MIT"
] | null | null | null |
yo.asm
|
charlesap/nasm-uefi
|
9b683c289251dc687d0e410f25a61a53eeb8bf3a
|
[
"MIT"
] | 1
|
2021-11-27T19:10:52.000Z
|
2021-11-27T19:10:52.000Z
|
bits 64
org 0x200000
section .header
DOS:
dd 0x00005a4d
times 14 dd 0
dd 0x00000080
times 16 dd 0
PECOFF:
dd `PE\0\0` ; sig
dw 0x8664 ; type
dw 3 ; sections
dd 0x5cba52f6 ; timestamp
dq 0 ; * symbol table + # symbols
dw osize ; oheader size
dw 0x202e ; characteristics
OHEADER:
dd 0x0000020b ; oheader + 0000 linker sig
dd 4096 ;codesize ; code size
dd 8192 ;datasize ; data size
dd 0 ; uninitialized data size
dd 4096 ; * entry
dd 4096 ; * code base
dq 0x200000 ; * image base
dd 4096 ; section alignment
dd 4096 ; file alignment
dq 0 ; os maj, min, image maj, min
dq 0 ; subsys maj, min, reserved
dd 0x4000 ; image size
dd 4096 ; headers size
dd 0 ; checksum
dd 0x0040000A ; dll characteristics & subsystem
dq 0x10000 ; stack reserve size
dq 0x10000 ; stack commit size
dq 0x10000 ; heap reserve size
dq 0 ; heap reserve commit
dd 0 ; loader flags
dd 0x10 ; rva count
DIRS:
times 5 dq 0 ; unused
dd 0x004000 ; virtual address .reloc
dd 0 ; size .reloc
times 10 dq 0 ; unused
OEND:
osize equ OEND - OHEADER
SECTS:
.1:
dq `.text` ; name
dd 4096 ;codesize ; virtual size
dd 4096 ; virtual address
dd 4096 ; raw data size
dd 4096 ; * raw data
dq 0 ; * relocations, * line numbers
dd 0 ; # relocations, # line numbers
dd 0x60000020 ; characteristics
.2:
dq `.data`
dd 8192 ;datasize
dd 8192
dd 8192
dd 8192
dq 0
dd 0
dd 0xC0000040
.3:
dq `.reloc`
dd 0
dd 0 ;20480
dd 0
dd 0 ;20480
dq 0
dd 0
dd 0x02000040
times 4096 - ($-$$) db 0 ;align the text section on a 4096 byte boundary
section .text follows=.header
EFI_SUCCESS equ 0
EFI_SYSTEM_TABLE_SIGNATURE equ 0x5453595320494249
EFI_SYSTEM_TABLE_CONOUT equ 64
EFI_SYSTEM_TABLE_RUNTIMESERVICES equ 88
EFI_SYSTEM_TABLE_BOOTSERVICES equ 96
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL_RESET equ 0
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL_OUTPUTSTRING equ 8
EFI_BOOT_SERVICES_GETMEMORYMAP equ 56
EFI_BOOT_SERVICES_LOCATEHANDLE equ 176
EFI_BOOT_SERVICES_LOADIMAGE equ 200
EFI_BOOT_SERVICES_EXIT equ 216
EFI_BOOT_SERVICES_EXITBOOTSERVICES equ 232
EFI_BOOT_SERVICES_LOCATEPROTOCOL equ 320
EFI_RUNTIME_SERVICES_RESETSYSTEM equ 104
sub rsp, 6*8
mov [Handle], rcx
mov [SystemTable], rdx
mov rax, [SystemTable]
mov rax, [rax + EFI_SYSTEM_TABLE_BOOTSERVICES]
mov [BS], rax
mov rax, [SystemTable]
mov rax, [rax + EFI_SYSTEM_TABLE_RUNTIMESERVICES]
mov [RTS], rax
lea rdx, [herewego]
mov rcx, [SystemTable]
mov rcx, [rcx + EFI_SYSTEM_TABLE_CONOUT]
call [rcx + EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL_OUTPUTSTRING]
; get the memory map
mov qword [memmapsize], 4096
lea rcx, [memmapsize]
lea rdx, [memmap]
lea r8, [memmapkey]
lea r9, [memmapdescsize]
lea r10, [memmapdescver]
mov [STK],rsp
push r10
sub rsp, 4*8
mov rbx, [BS]
call [rbx + EFI_BOOT_SERVICES_GETMEMORYMAP]
add rsp, 4*8
pop r10
mov rsp, [STK]
cmp rax, EFI_SUCCESS
jne oops
; find the interface to GOP
mov rbx, [SystemTable]
mov rbx, [rbx + EFI_SYSTEM_TABLE_BOOTSERVICES]
mov rcx, _EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID
mov rdx, 0
lea r8, [Interface]
call [rbx + EFI_BOOT_SERVICES_LOCATEPROTOCOL]
cmp rax, EFI_SUCCESS
jne oops
mov rcx, [Interface]
mov rcx, [rcx + 0x18 ] ;EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE
mov rbx, [rcx + 0x18 ] ;EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE_FRAMEBUFFERBASE
mov [FB], rbx
mov rcx, [rcx + 0x20 ] ;EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE_FRAMEBUFFERSIZE
mov [FBS], rcx
cmp rax, EFI_SUCCESS
jne oops
mov rbx, [FB]
push rax
push rcx
push rdx
call printhex
pop rdx
pop rcx
pop rax
mov rbx, [FBS]
push rax
push rcx
push rdx
call printhex
pop rdx
pop rcx
pop rax
; exit boot services
mov rcx, [Handle]
mov rdx, [memmapkey]
mov rbx, [SystemTable]
mov rbx, [rbx + EFI_SYSTEM_TABLE_BOOTSERVICES]
call [rbx + EFI_BOOT_SERVICES_EXITBOOTSERVICES]
cmp rax, EFI_SUCCESS
je g5
mov rbx, [memmapkey]
push rax
push rcx
push rdx
call printhex
pop rdx
pop rcx
pop rax
; repeat the call to get the memory map
mov qword [memmapsize], 4096
lea rcx, [memmapsize]
lea rdx, [memmap]
lea r8, [memmapkey]
lea r9, [memmapdescsize]
lea r10, [memmapdescver]
mov [STK],rsp
push r10
sub rsp, 4*8
mov rbx, [BS]
call [rbx + EFI_BOOT_SERVICES_GETMEMORYMAP]
add rsp, 4*8
pop r10
mov rsp, [STK]
cmp rax, EFI_SUCCESS
jne oops
mov rbx, [memmapkey]
push rax
push rcx
push rdx
call printhex
pop rdx
pop rcx
pop rax
; exit boot services again
mov rcx, [Handle]
mov rdx, [memmapkey]
xor r8, r8
mov rbx, [SystemTable]
mov rbx, [rbx + EFI_SYSTEM_TABLE_BOOTSERVICES]
call [rbx + EFI_BOOT_SERVICES_EXITBOOTSERVICES]
;cmp rax, EFI_SUCCESS
;je g5
;jmp oops
Z:
jmp Z
mov rcx, [FB]
mov rax, [FBS]
Q:
dec rax
mov byte[rcx+rax],255
jnz Q
W:
jmp W
g5:
mov rcx, 2 ;EfiResetShutdown
mov rdx, EFI_SUCCESS
mov rax, [SystemTable]
mov rax, [rax + EFI_SYSTEM_TABLE_RUNTIMESERVICES]
call [rax + EFI_RUNTIME_SERVICES_RESETSYSTEM]
oops:
lea rdx, [fail]
mov rcx, [SystemTable]
mov rcx, [rcx + EFI_SYSTEM_TABLE_CONOUT]
call [rcx + EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL_OUTPUTSTRING]
jmp $-1
printhex:
mov rbp, 16
.loop:
rol rbx, 4
mov rax, rbx
and rax, 0Fh
lea rcx, [_Hex]
mov rax, [rax + rcx]
mov byte [_Num], al
lea rdx, [_Num]
mov rcx, [SystemTable]
mov rcx, [rcx + EFI_SYSTEM_TABLE_CONOUT]
call [rcx + EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL_OUTPUTSTRING]
dec rbp
jnz .loop
lea rdx, [_Nl]
mov rcx, [SystemTable]
mov rcx, [rcx + EFI_SYSTEM_TABLE_CONOUT]
call [rcx + EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL_OUTPUTSTRING]
ret
times 8192-($-$$) db 0
codesize equ $ - $$
section .data follows=.text
Handle dq 0
SystemTable dq 0
Interface dq 0
BS dq 0
RTS dq 0
STK dq 0
FB dq 0
FBS dq 0
memmapsize dq 4096
memmapkey dq 0
memmapdescsize dq 48
memmapdescver dq 0
_EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID db 0xde, 0xa9, 0x42, 0x90, 0xdc, 0x23, 0x38, 0x4a
db 0x96, 0xfb, 0x7a, 0xde, 0xd0, 0x80, 0x51, 0x6a
fail db __utf16__ `fail.\r\n\0`
nok db __utf16__ `Not OK.\r\n\0`
yok db __utf16__ `OK.\r\n\0`
herewego db __utf16__ `here we go\r\n\0`
_Hex db '0123456789ABCDEF'
_Num dw 0,0
_Nl dw 13,10,0
times 4096-($-$$) db 0
memmap:
times 4096 db 0
datasize equ $ - $$
section .reloc follows=.data
| 22.603715
| 84
| 0.610464
|
a1602cc692f7aed03b52812fbeb5b31a1ae6bb23
| 47,336
|
asm
|
Assembly
|
examples/pxScene2d/external/libnode-v0.12.7/deps/openssl/asm/x86-win32-masm/aes/aesni-x86.asm
|
madanagopaltcomcast/pxCore
|
c4a3a40a190521c8b6383d126c87612eca5b3c42
|
[
"Apache-2.0"
] | 2,494
|
2015-02-11T04:34:13.000Z
|
2022-03-31T14:21:47.000Z
|
examples/pxScene2d/external/libnode-v0.12.7/deps/openssl/asm/x86-win32-masm/aes/aesni-x86.asm
|
madanagopaltcomcast/pxCore
|
c4a3a40a190521c8b6383d126c87612eca5b3c42
|
[
"Apache-2.0"
] | 1,432
|
2017-06-21T04:08:48.000Z
|
2020-08-25T16:21:15.000Z
|
examples/pxScene2d/external/libnode-v0.12.7/deps/openssl/asm/x86-win32-masm/aes/aesni-x86.asm
|
madanagopaltcomcast/pxCore
|
c4a3a40a190521c8b6383d126c87612eca5b3c42
|
[
"Apache-2.0"
] | 442
|
2015-02-12T13:45:46.000Z
|
2022-03-21T05:28:05.000Z
|
TITLE ../openssl/crypto/aes/asm/aesni-x86.asm
IF @Version LT 800
ECHO MASM version 8.00 or later is strongly recommended.
ENDIF
.686
.XMM
IF @Version LT 800
XMMWORD STRUCT 16
DQ 2 dup (?)
XMMWORD ENDS
ENDIF
.MODEL FLAT
OPTION DOTNAME
IF @Version LT 800
.text$ SEGMENT PAGE 'CODE'
ELSE
.text$ SEGMENT ALIGN(64) 'CODE'
ENDIF
ALIGN 16
_aesni_encrypt PROC PUBLIC
$L_aesni_encrypt_begin::
mov eax,DWORD PTR 4[esp]
mov edx,DWORD PTR 12[esp]
movups xmm2,XMMWORD PTR [eax]
mov ecx,DWORD PTR 240[edx]
mov eax,DWORD PTR 8[esp]
movups xmm0,XMMWORD PTR [edx]
movups xmm1,XMMWORD PTR 16[edx]
lea edx,DWORD PTR 32[edx]
xorps xmm2,xmm0
$L000enc1_loop_1:
DB 102,15,56,220,209
dec ecx
movups xmm1,XMMWORD PTR [edx]
lea edx,DWORD PTR 16[edx]
jnz $L000enc1_loop_1
DB 102,15,56,221,209
movups XMMWORD PTR [eax],xmm2
ret
_aesni_encrypt ENDP
ALIGN 16
_aesni_decrypt PROC PUBLIC
$L_aesni_decrypt_begin::
mov eax,DWORD PTR 4[esp]
mov edx,DWORD PTR 12[esp]
movups xmm2,XMMWORD PTR [eax]
mov ecx,DWORD PTR 240[edx]
mov eax,DWORD PTR 8[esp]
movups xmm0,XMMWORD PTR [edx]
movups xmm1,XMMWORD PTR 16[edx]
lea edx,DWORD PTR 32[edx]
xorps xmm2,xmm0
$L001dec1_loop_2:
DB 102,15,56,222,209
dec ecx
movups xmm1,XMMWORD PTR [edx]
lea edx,DWORD PTR 16[edx]
jnz $L001dec1_loop_2
DB 102,15,56,223,209
movups XMMWORD PTR [eax],xmm2
ret
_aesni_decrypt ENDP
ALIGN 16
__aesni_encrypt3 PROC PRIVATE
movups xmm0,XMMWORD PTR [edx]
shr ecx,1
movups xmm1,XMMWORD PTR 16[edx]
lea edx,DWORD PTR 32[edx]
xorps xmm2,xmm0
pxor xmm3,xmm0
pxor xmm4,xmm0
movups xmm0,XMMWORD PTR [edx]
$L002enc3_loop:
DB 102,15,56,220,209
DB 102,15,56,220,217
dec ecx
DB 102,15,56,220,225
movups xmm1,XMMWORD PTR 16[edx]
DB 102,15,56,220,208
DB 102,15,56,220,216
lea edx,DWORD PTR 32[edx]
DB 102,15,56,220,224
movups xmm0,XMMWORD PTR [edx]
jnz $L002enc3_loop
DB 102,15,56,220,209
DB 102,15,56,220,217
DB 102,15,56,220,225
DB 102,15,56,221,208
DB 102,15,56,221,216
DB 102,15,56,221,224
ret
__aesni_encrypt3 ENDP
ALIGN 16
__aesni_decrypt3 PROC PRIVATE
movups xmm0,XMMWORD PTR [edx]
shr ecx,1
movups xmm1,XMMWORD PTR 16[edx]
lea edx,DWORD PTR 32[edx]
xorps xmm2,xmm0
pxor xmm3,xmm0
pxor xmm4,xmm0
movups xmm0,XMMWORD PTR [edx]
$L003dec3_loop:
DB 102,15,56,222,209
DB 102,15,56,222,217
dec ecx
DB 102,15,56,222,225
movups xmm1,XMMWORD PTR 16[edx]
DB 102,15,56,222,208
DB 102,15,56,222,216
lea edx,DWORD PTR 32[edx]
DB 102,15,56,222,224
movups xmm0,XMMWORD PTR [edx]
jnz $L003dec3_loop
DB 102,15,56,222,209
DB 102,15,56,222,217
DB 102,15,56,222,225
DB 102,15,56,223,208
DB 102,15,56,223,216
DB 102,15,56,223,224
ret
__aesni_decrypt3 ENDP
ALIGN 16
__aesni_encrypt4 PROC PRIVATE
movups xmm0,XMMWORD PTR [edx]
movups xmm1,XMMWORD PTR 16[edx]
shr ecx,1
lea edx,DWORD PTR 32[edx]
xorps xmm2,xmm0
pxor xmm3,xmm0
pxor xmm4,xmm0
pxor xmm5,xmm0
movups xmm0,XMMWORD PTR [edx]
$L004enc4_loop:
DB 102,15,56,220,209
DB 102,15,56,220,217
dec ecx
DB 102,15,56,220,225
DB 102,15,56,220,233
movups xmm1,XMMWORD PTR 16[edx]
DB 102,15,56,220,208
DB 102,15,56,220,216
lea edx,DWORD PTR 32[edx]
DB 102,15,56,220,224
DB 102,15,56,220,232
movups xmm0,XMMWORD PTR [edx]
jnz $L004enc4_loop
DB 102,15,56,220,209
DB 102,15,56,220,217
DB 102,15,56,220,225
DB 102,15,56,220,233
DB 102,15,56,221,208
DB 102,15,56,221,216
DB 102,15,56,221,224
DB 102,15,56,221,232
ret
__aesni_encrypt4 ENDP
ALIGN 16
__aesni_decrypt4 PROC PRIVATE
movups xmm0,XMMWORD PTR [edx]
movups xmm1,XMMWORD PTR 16[edx]
shr ecx,1
lea edx,DWORD PTR 32[edx]
xorps xmm2,xmm0
pxor xmm3,xmm0
pxor xmm4,xmm0
pxor xmm5,xmm0
movups xmm0,XMMWORD PTR [edx]
$L005dec4_loop:
DB 102,15,56,222,209
DB 102,15,56,222,217
dec ecx
DB 102,15,56,222,225
DB 102,15,56,222,233
movups xmm1,XMMWORD PTR 16[edx]
DB 102,15,56,222,208
DB 102,15,56,222,216
lea edx,DWORD PTR 32[edx]
DB 102,15,56,222,224
DB 102,15,56,222,232
movups xmm0,XMMWORD PTR [edx]
jnz $L005dec4_loop
DB 102,15,56,222,209
DB 102,15,56,222,217
DB 102,15,56,222,225
DB 102,15,56,222,233
DB 102,15,56,223,208
DB 102,15,56,223,216
DB 102,15,56,223,224
DB 102,15,56,223,232
ret
__aesni_decrypt4 ENDP
ALIGN 16
__aesni_encrypt6 PROC PRIVATE
movups xmm0,XMMWORD PTR [edx]
shr ecx,1
movups xmm1,XMMWORD PTR 16[edx]
lea edx,DWORD PTR 32[edx]
xorps xmm2,xmm0
pxor xmm3,xmm0
DB 102,15,56,220,209
pxor xmm4,xmm0
DB 102,15,56,220,217
pxor xmm5,xmm0
dec ecx
DB 102,15,56,220,225
pxor xmm6,xmm0
DB 102,15,56,220,233
pxor xmm7,xmm0
DB 102,15,56,220,241
movups xmm0,XMMWORD PTR [edx]
DB 102,15,56,220,249
jmp $L_aesni_encrypt6_enter
ALIGN 16
$L006enc6_loop:
DB 102,15,56,220,209
DB 102,15,56,220,217
dec ecx
DB 102,15,56,220,225
DB 102,15,56,220,233
DB 102,15,56,220,241
DB 102,15,56,220,249
ALIGN 16
$L_aesni_encrypt6_enter::
movups xmm1,XMMWORD PTR 16[edx]
DB 102,15,56,220,208
DB 102,15,56,220,216
lea edx,DWORD PTR 32[edx]
DB 102,15,56,220,224
DB 102,15,56,220,232
DB 102,15,56,220,240
DB 102,15,56,220,248
movups xmm0,XMMWORD PTR [edx]
jnz $L006enc6_loop
DB 102,15,56,220,209
DB 102,15,56,220,217
DB 102,15,56,220,225
DB 102,15,56,220,233
DB 102,15,56,220,241
DB 102,15,56,220,249
DB 102,15,56,221,208
DB 102,15,56,221,216
DB 102,15,56,221,224
DB 102,15,56,221,232
DB 102,15,56,221,240
DB 102,15,56,221,248
ret
__aesni_encrypt6 ENDP
ALIGN 16
__aesni_decrypt6 PROC PRIVATE
movups xmm0,XMMWORD PTR [edx]
shr ecx,1
movups xmm1,XMMWORD PTR 16[edx]
lea edx,DWORD PTR 32[edx]
xorps xmm2,xmm0
pxor xmm3,xmm0
DB 102,15,56,222,209
pxor xmm4,xmm0
DB 102,15,56,222,217
pxor xmm5,xmm0
dec ecx
DB 102,15,56,222,225
pxor xmm6,xmm0
DB 102,15,56,222,233
pxor xmm7,xmm0
DB 102,15,56,222,241
movups xmm0,XMMWORD PTR [edx]
DB 102,15,56,222,249
jmp $L_aesni_decrypt6_enter
ALIGN 16
$L007dec6_loop:
DB 102,15,56,222,209
DB 102,15,56,222,217
dec ecx
DB 102,15,56,222,225
DB 102,15,56,222,233
DB 102,15,56,222,241
DB 102,15,56,222,249
ALIGN 16
$L_aesni_decrypt6_enter::
movups xmm1,XMMWORD PTR 16[edx]
DB 102,15,56,222,208
DB 102,15,56,222,216
lea edx,DWORD PTR 32[edx]
DB 102,15,56,222,224
DB 102,15,56,222,232
DB 102,15,56,222,240
DB 102,15,56,222,248
movups xmm0,XMMWORD PTR [edx]
jnz $L007dec6_loop
DB 102,15,56,222,209
DB 102,15,56,222,217
DB 102,15,56,222,225
DB 102,15,56,222,233
DB 102,15,56,222,241
DB 102,15,56,222,249
DB 102,15,56,223,208
DB 102,15,56,223,216
DB 102,15,56,223,224
DB 102,15,56,223,232
DB 102,15,56,223,240
DB 102,15,56,223,248
ret
__aesni_decrypt6 ENDP
ALIGN 16
_aesni_ecb_encrypt PROC PUBLIC
$L_aesni_ecb_encrypt_begin::
push ebp
push ebx
push esi
push edi
mov esi,DWORD PTR 20[esp]
mov edi,DWORD PTR 24[esp]
mov eax,DWORD PTR 28[esp]
mov edx,DWORD PTR 32[esp]
mov ebx,DWORD PTR 36[esp]
and eax,-16
jz $L008ecb_ret
mov ecx,DWORD PTR 240[edx]
test ebx,ebx
jz $L009ecb_decrypt
mov ebp,edx
mov ebx,ecx
cmp eax,96
jb $L010ecb_enc_tail
movdqu xmm2,XMMWORD PTR [esi]
movdqu xmm3,XMMWORD PTR 16[esi]
movdqu xmm4,XMMWORD PTR 32[esi]
movdqu xmm5,XMMWORD PTR 48[esi]
movdqu xmm6,XMMWORD PTR 64[esi]
movdqu xmm7,XMMWORD PTR 80[esi]
lea esi,DWORD PTR 96[esi]
sub eax,96
jmp $L011ecb_enc_loop6_enter
ALIGN 16
$L012ecb_enc_loop6:
movups XMMWORD PTR [edi],xmm2
movdqu xmm2,XMMWORD PTR [esi]
movups XMMWORD PTR 16[edi],xmm3
movdqu xmm3,XMMWORD PTR 16[esi]
movups XMMWORD PTR 32[edi],xmm4
movdqu xmm4,XMMWORD PTR 32[esi]
movups XMMWORD PTR 48[edi],xmm5
movdqu xmm5,XMMWORD PTR 48[esi]
movups XMMWORD PTR 64[edi],xmm6
movdqu xmm6,XMMWORD PTR 64[esi]
movups XMMWORD PTR 80[edi],xmm7
lea edi,DWORD PTR 96[edi]
movdqu xmm7,XMMWORD PTR 80[esi]
lea esi,DWORD PTR 96[esi]
$L011ecb_enc_loop6_enter:
call __aesni_encrypt6
mov edx,ebp
mov ecx,ebx
sub eax,96
jnc $L012ecb_enc_loop6
movups XMMWORD PTR [edi],xmm2
movups XMMWORD PTR 16[edi],xmm3
movups XMMWORD PTR 32[edi],xmm4
movups XMMWORD PTR 48[edi],xmm5
movups XMMWORD PTR 64[edi],xmm6
movups XMMWORD PTR 80[edi],xmm7
lea edi,DWORD PTR 96[edi]
add eax,96
jz $L008ecb_ret
$L010ecb_enc_tail:
movups xmm2,XMMWORD PTR [esi]
cmp eax,32
jb $L013ecb_enc_one
movups xmm3,XMMWORD PTR 16[esi]
je $L014ecb_enc_two
movups xmm4,XMMWORD PTR 32[esi]
cmp eax,64
jb $L015ecb_enc_three
movups xmm5,XMMWORD PTR 48[esi]
je $L016ecb_enc_four
movups xmm6,XMMWORD PTR 64[esi]
xorps xmm7,xmm7
call __aesni_encrypt6
movups XMMWORD PTR [edi],xmm2
movups XMMWORD PTR 16[edi],xmm3
movups XMMWORD PTR 32[edi],xmm4
movups XMMWORD PTR 48[edi],xmm5
movups XMMWORD PTR 64[edi],xmm6
jmp $L008ecb_ret
ALIGN 16
$L013ecb_enc_one:
movups xmm0,XMMWORD PTR [edx]
movups xmm1,XMMWORD PTR 16[edx]
lea edx,DWORD PTR 32[edx]
xorps xmm2,xmm0
$L017enc1_loop_3:
DB 102,15,56,220,209
dec ecx
movups xmm1,XMMWORD PTR [edx]
lea edx,DWORD PTR 16[edx]
jnz $L017enc1_loop_3
DB 102,15,56,221,209
movups XMMWORD PTR [edi],xmm2
jmp $L008ecb_ret
ALIGN 16
$L014ecb_enc_two:
xorps xmm4,xmm4
call __aesni_encrypt3
movups XMMWORD PTR [edi],xmm2
movups XMMWORD PTR 16[edi],xmm3
jmp $L008ecb_ret
ALIGN 16
$L015ecb_enc_three:
call __aesni_encrypt3
movups XMMWORD PTR [edi],xmm2
movups XMMWORD PTR 16[edi],xmm3
movups XMMWORD PTR 32[edi],xmm4
jmp $L008ecb_ret
ALIGN 16
$L016ecb_enc_four:
call __aesni_encrypt4
movups XMMWORD PTR [edi],xmm2
movups XMMWORD PTR 16[edi],xmm3
movups XMMWORD PTR 32[edi],xmm4
movups XMMWORD PTR 48[edi],xmm5
jmp $L008ecb_ret
ALIGN 16
$L009ecb_decrypt:
mov ebp,edx
mov ebx,ecx
cmp eax,96
jb $L018ecb_dec_tail
movdqu xmm2,XMMWORD PTR [esi]
movdqu xmm3,XMMWORD PTR 16[esi]
movdqu xmm4,XMMWORD PTR 32[esi]
movdqu xmm5,XMMWORD PTR 48[esi]
movdqu xmm6,XMMWORD PTR 64[esi]
movdqu xmm7,XMMWORD PTR 80[esi]
lea esi,DWORD PTR 96[esi]
sub eax,96
jmp $L019ecb_dec_loop6_enter
ALIGN 16
$L020ecb_dec_loop6:
movups XMMWORD PTR [edi],xmm2
movdqu xmm2,XMMWORD PTR [esi]
movups XMMWORD PTR 16[edi],xmm3
movdqu xmm3,XMMWORD PTR 16[esi]
movups XMMWORD PTR 32[edi],xmm4
movdqu xmm4,XMMWORD PTR 32[esi]
movups XMMWORD PTR 48[edi],xmm5
movdqu xmm5,XMMWORD PTR 48[esi]
movups XMMWORD PTR 64[edi],xmm6
movdqu xmm6,XMMWORD PTR 64[esi]
movups XMMWORD PTR 80[edi],xmm7
lea edi,DWORD PTR 96[edi]
movdqu xmm7,XMMWORD PTR 80[esi]
lea esi,DWORD PTR 96[esi]
$L019ecb_dec_loop6_enter:
call __aesni_decrypt6
mov edx,ebp
mov ecx,ebx
sub eax,96
jnc $L020ecb_dec_loop6
movups XMMWORD PTR [edi],xmm2
movups XMMWORD PTR 16[edi],xmm3
movups XMMWORD PTR 32[edi],xmm4
movups XMMWORD PTR 48[edi],xmm5
movups XMMWORD PTR 64[edi],xmm6
movups XMMWORD PTR 80[edi],xmm7
lea edi,DWORD PTR 96[edi]
add eax,96
jz $L008ecb_ret
$L018ecb_dec_tail:
movups xmm2,XMMWORD PTR [esi]
cmp eax,32
jb $L021ecb_dec_one
movups xmm3,XMMWORD PTR 16[esi]
je $L022ecb_dec_two
movups xmm4,XMMWORD PTR 32[esi]
cmp eax,64
jb $L023ecb_dec_three
movups xmm5,XMMWORD PTR 48[esi]
je $L024ecb_dec_four
movups xmm6,XMMWORD PTR 64[esi]
xorps xmm7,xmm7
call __aesni_decrypt6
movups XMMWORD PTR [edi],xmm2
movups XMMWORD PTR 16[edi],xmm3
movups XMMWORD PTR 32[edi],xmm4
movups XMMWORD PTR 48[edi],xmm5
movups XMMWORD PTR 64[edi],xmm6
jmp $L008ecb_ret
ALIGN 16
$L021ecb_dec_one:
movups xmm0,XMMWORD PTR [edx]
movups xmm1,XMMWORD PTR 16[edx]
lea edx,DWORD PTR 32[edx]
xorps xmm2,xmm0
$L025dec1_loop_4:
DB 102,15,56,222,209
dec ecx
movups xmm1,XMMWORD PTR [edx]
lea edx,DWORD PTR 16[edx]
jnz $L025dec1_loop_4
DB 102,15,56,223,209
movups XMMWORD PTR [edi],xmm2
jmp $L008ecb_ret
ALIGN 16
$L022ecb_dec_two:
xorps xmm4,xmm4
call __aesni_decrypt3
movups XMMWORD PTR [edi],xmm2
movups XMMWORD PTR 16[edi],xmm3
jmp $L008ecb_ret
ALIGN 16
$L023ecb_dec_three:
call __aesni_decrypt3
movups XMMWORD PTR [edi],xmm2
movups XMMWORD PTR 16[edi],xmm3
movups XMMWORD PTR 32[edi],xmm4
jmp $L008ecb_ret
ALIGN 16
$L024ecb_dec_four:
call __aesni_decrypt4
movups XMMWORD PTR [edi],xmm2
movups XMMWORD PTR 16[edi],xmm3
movups XMMWORD PTR 32[edi],xmm4
movups XMMWORD PTR 48[edi],xmm5
$L008ecb_ret:
pop edi
pop esi
pop ebx
pop ebp
ret
_aesni_ecb_encrypt ENDP
ALIGN 16
_aesni_ccm64_encrypt_blocks PROC PUBLIC
$L_aesni_ccm64_encrypt_blocks_begin::
push ebp
push ebx
push esi
push edi
mov esi,DWORD PTR 20[esp]
mov edi,DWORD PTR 24[esp]
mov eax,DWORD PTR 28[esp]
mov edx,DWORD PTR 32[esp]
mov ebx,DWORD PTR 36[esp]
mov ecx,DWORD PTR 40[esp]
mov ebp,esp
sub esp,60
and esp,-16
mov DWORD PTR 48[esp],ebp
movdqu xmm7,XMMWORD PTR [ebx]
movdqu xmm3,XMMWORD PTR [ecx]
mov ecx,DWORD PTR 240[edx]
mov DWORD PTR [esp],202182159
mov DWORD PTR 4[esp],134810123
mov DWORD PTR 8[esp],67438087
mov DWORD PTR 12[esp],66051
mov ebx,1
xor ebp,ebp
mov DWORD PTR 16[esp],ebx
mov DWORD PTR 20[esp],ebp
mov DWORD PTR 24[esp],ebp
mov DWORD PTR 28[esp],ebp
shr ecx,1
lea ebp,DWORD PTR [edx]
movdqa xmm5,XMMWORD PTR [esp]
movdqa xmm2,xmm7
mov ebx,ecx
DB 102,15,56,0,253
$L026ccm64_enc_outer:
movups xmm0,XMMWORD PTR [ebp]
mov ecx,ebx
movups xmm6,XMMWORD PTR [esi]
xorps xmm2,xmm0
movups xmm1,XMMWORD PTR 16[ebp]
xorps xmm0,xmm6
lea edx,DWORD PTR 32[ebp]
xorps xmm3,xmm0
movups xmm0,XMMWORD PTR [edx]
$L027ccm64_enc2_loop:
DB 102,15,56,220,209
dec ecx
DB 102,15,56,220,217
movups xmm1,XMMWORD PTR 16[edx]
DB 102,15,56,220,208
lea edx,DWORD PTR 32[edx]
DB 102,15,56,220,216
movups xmm0,XMMWORD PTR [edx]
jnz $L027ccm64_enc2_loop
DB 102,15,56,220,209
DB 102,15,56,220,217
paddq xmm7,XMMWORD PTR 16[esp]
DB 102,15,56,221,208
DB 102,15,56,221,216
dec eax
lea esi,DWORD PTR 16[esi]
xorps xmm6,xmm2
movdqa xmm2,xmm7
movups XMMWORD PTR [edi],xmm6
lea edi,DWORD PTR 16[edi]
DB 102,15,56,0,213
jnz $L026ccm64_enc_outer
mov esp,DWORD PTR 48[esp]
mov edi,DWORD PTR 40[esp]
movups XMMWORD PTR [edi],xmm3
pop edi
pop esi
pop ebx
pop ebp
ret
_aesni_ccm64_encrypt_blocks ENDP
ALIGN 16
_aesni_ccm64_decrypt_blocks PROC PUBLIC
$L_aesni_ccm64_decrypt_blocks_begin::
push ebp
push ebx
push esi
push edi
mov esi,DWORD PTR 20[esp]
mov edi,DWORD PTR 24[esp]
mov eax,DWORD PTR 28[esp]
mov edx,DWORD PTR 32[esp]
mov ebx,DWORD PTR 36[esp]
mov ecx,DWORD PTR 40[esp]
mov ebp,esp
sub esp,60
and esp,-16
mov DWORD PTR 48[esp],ebp
movdqu xmm7,XMMWORD PTR [ebx]
movdqu xmm3,XMMWORD PTR [ecx]
mov ecx,DWORD PTR 240[edx]
mov DWORD PTR [esp],202182159
mov DWORD PTR 4[esp],134810123
mov DWORD PTR 8[esp],67438087
mov DWORD PTR 12[esp],66051
mov ebx,1
xor ebp,ebp
mov DWORD PTR 16[esp],ebx
mov DWORD PTR 20[esp],ebp
mov DWORD PTR 24[esp],ebp
mov DWORD PTR 28[esp],ebp
movdqa xmm5,XMMWORD PTR [esp]
movdqa xmm2,xmm7
mov ebp,edx
mov ebx,ecx
DB 102,15,56,0,253
movups xmm0,XMMWORD PTR [edx]
movups xmm1,XMMWORD PTR 16[edx]
lea edx,DWORD PTR 32[edx]
xorps xmm2,xmm0
$L028enc1_loop_5:
DB 102,15,56,220,209
dec ecx
movups xmm1,XMMWORD PTR [edx]
lea edx,DWORD PTR 16[edx]
jnz $L028enc1_loop_5
DB 102,15,56,221,209
movups xmm6,XMMWORD PTR [esi]
paddq xmm7,XMMWORD PTR 16[esp]
lea esi,QWORD PTR 16[esi]
jmp $L029ccm64_dec_outer
ALIGN 16
$L029ccm64_dec_outer:
xorps xmm6,xmm2
movdqa xmm2,xmm7
mov ecx,ebx
movups XMMWORD PTR [edi],xmm6
lea edi,DWORD PTR 16[edi]
DB 102,15,56,0,213
sub eax,1
jz $L030ccm64_dec_break
movups xmm0,XMMWORD PTR [ebp]
shr ecx,1
movups xmm1,XMMWORD PTR 16[ebp]
xorps xmm6,xmm0
lea edx,DWORD PTR 32[ebp]
xorps xmm2,xmm0
xorps xmm3,xmm6
movups xmm0,XMMWORD PTR [edx]
$L031ccm64_dec2_loop:
DB 102,15,56,220,209
dec ecx
DB 102,15,56,220,217
movups xmm1,XMMWORD PTR 16[edx]
DB 102,15,56,220,208
lea edx,DWORD PTR 32[edx]
DB 102,15,56,220,216
movups xmm0,XMMWORD PTR [edx]
jnz $L031ccm64_dec2_loop
movups xmm6,XMMWORD PTR [esi]
paddq xmm7,XMMWORD PTR 16[esp]
DB 102,15,56,220,209
DB 102,15,56,220,217
lea esi,QWORD PTR 16[esi]
DB 102,15,56,221,208
DB 102,15,56,221,216
jmp $L029ccm64_dec_outer
ALIGN 16
$L030ccm64_dec_break:
mov edx,ebp
movups xmm0,XMMWORD PTR [edx]
movups xmm1,XMMWORD PTR 16[edx]
xorps xmm6,xmm0
lea edx,DWORD PTR 32[edx]
xorps xmm3,xmm6
$L032enc1_loop_6:
DB 102,15,56,220,217
dec ecx
movups xmm1,XMMWORD PTR [edx]
lea edx,DWORD PTR 16[edx]
jnz $L032enc1_loop_6
DB 102,15,56,221,217
mov esp,DWORD PTR 48[esp]
mov edi,DWORD PTR 40[esp]
movups XMMWORD PTR [edi],xmm3
pop edi
pop esi
pop ebx
pop ebp
ret
_aesni_ccm64_decrypt_blocks ENDP
ALIGN 16
_aesni_ctr32_encrypt_blocks PROC PUBLIC
$L_aesni_ctr32_encrypt_blocks_begin::
push ebp
push ebx
push esi
push edi
mov esi,DWORD PTR 20[esp]
mov edi,DWORD PTR 24[esp]
mov eax,DWORD PTR 28[esp]
mov edx,DWORD PTR 32[esp]
mov ebx,DWORD PTR 36[esp]
mov ebp,esp
sub esp,88
and esp,-16
mov DWORD PTR 80[esp],ebp
cmp eax,1
je $L033ctr32_one_shortcut
movdqu xmm7,XMMWORD PTR [ebx]
mov DWORD PTR [esp],202182159
mov DWORD PTR 4[esp],134810123
mov DWORD PTR 8[esp],67438087
mov DWORD PTR 12[esp],66051
mov ecx,6
xor ebp,ebp
mov DWORD PTR 16[esp],ecx
mov DWORD PTR 20[esp],ecx
mov DWORD PTR 24[esp],ecx
mov DWORD PTR 28[esp],ebp
DB 102,15,58,22,251,3
DB 102,15,58,34,253,3
mov ecx,DWORD PTR 240[edx]
bswap ebx
pxor xmm1,xmm1
pxor xmm0,xmm0
movdqa xmm2,XMMWORD PTR [esp]
DB 102,15,58,34,203,0
lea ebp,DWORD PTR 3[ebx]
DB 102,15,58,34,197,0
inc ebx
DB 102,15,58,34,203,1
inc ebp
DB 102,15,58,34,197,1
inc ebx
DB 102,15,58,34,203,2
inc ebp
DB 102,15,58,34,197,2
movdqa XMMWORD PTR 48[esp],xmm1
DB 102,15,56,0,202
movdqa XMMWORD PTR 64[esp],xmm0
DB 102,15,56,0,194
pshufd xmm2,xmm1,192
pshufd xmm3,xmm1,128
cmp eax,6
jb $L034ctr32_tail
movdqa XMMWORD PTR 32[esp],xmm7
shr ecx,1
mov ebp,edx
mov ebx,ecx
sub eax,6
jmp $L035ctr32_loop6
ALIGN 16
$L035ctr32_loop6:
pshufd xmm4,xmm1,64
movdqa xmm1,XMMWORD PTR 32[esp]
pshufd xmm5,xmm0,192
por xmm2,xmm1
pshufd xmm6,xmm0,128
por xmm3,xmm1
pshufd xmm7,xmm0,64
por xmm4,xmm1
por xmm5,xmm1
por xmm6,xmm1
por xmm7,xmm1
movups xmm0,XMMWORD PTR [ebp]
movups xmm1,XMMWORD PTR 16[ebp]
lea edx,DWORD PTR 32[ebp]
dec ecx
pxor xmm2,xmm0
pxor xmm3,xmm0
DB 102,15,56,220,209
pxor xmm4,xmm0
DB 102,15,56,220,217
pxor xmm5,xmm0
DB 102,15,56,220,225
pxor xmm6,xmm0
DB 102,15,56,220,233
pxor xmm7,xmm0
DB 102,15,56,220,241
movups xmm0,XMMWORD PTR [edx]
DB 102,15,56,220,249
call $L_aesni_encrypt6_enter
movups xmm1,XMMWORD PTR [esi]
movups xmm0,XMMWORD PTR 16[esi]
xorps xmm2,xmm1
movups xmm1,XMMWORD PTR 32[esi]
xorps xmm3,xmm0
movups XMMWORD PTR [edi],xmm2
movdqa xmm0,XMMWORD PTR 16[esp]
xorps xmm4,xmm1
movdqa xmm1,XMMWORD PTR 48[esp]
movups XMMWORD PTR 16[edi],xmm3
movups XMMWORD PTR 32[edi],xmm4
paddd xmm1,xmm0
paddd xmm0,XMMWORD PTR 64[esp]
movdqa xmm2,XMMWORD PTR [esp]
movups xmm3,XMMWORD PTR 48[esi]
movups xmm4,XMMWORD PTR 64[esi]
xorps xmm5,xmm3
movups xmm3,XMMWORD PTR 80[esi]
lea esi,DWORD PTR 96[esi]
movdqa XMMWORD PTR 48[esp],xmm1
DB 102,15,56,0,202
xorps xmm6,xmm4
movups XMMWORD PTR 48[edi],xmm5
xorps xmm7,xmm3
movdqa XMMWORD PTR 64[esp],xmm0
DB 102,15,56,0,194
movups XMMWORD PTR 64[edi],xmm6
pshufd xmm2,xmm1,192
movups XMMWORD PTR 80[edi],xmm7
lea edi,DWORD PTR 96[edi]
mov ecx,ebx
pshufd xmm3,xmm1,128
sub eax,6
jnc $L035ctr32_loop6
add eax,6
jz $L036ctr32_ret
mov edx,ebp
lea ecx,DWORD PTR 1[ecx*2]
movdqa xmm7,XMMWORD PTR 32[esp]
$L034ctr32_tail:
por xmm2,xmm7
cmp eax,2
jb $L037ctr32_one
pshufd xmm4,xmm1,64
por xmm3,xmm7
je $L038ctr32_two
pshufd xmm5,xmm0,192
por xmm4,xmm7
cmp eax,4
jb $L039ctr32_three
pshufd xmm6,xmm0,128
por xmm5,xmm7
je $L040ctr32_four
por xmm6,xmm7
call __aesni_encrypt6
movups xmm1,XMMWORD PTR [esi]
movups xmm0,XMMWORD PTR 16[esi]
xorps xmm2,xmm1
movups xmm1,XMMWORD PTR 32[esi]
xorps xmm3,xmm0
movups xmm0,XMMWORD PTR 48[esi]
xorps xmm4,xmm1
movups xmm1,XMMWORD PTR 64[esi]
xorps xmm5,xmm0
movups XMMWORD PTR [edi],xmm2
xorps xmm6,xmm1
movups XMMWORD PTR 16[edi],xmm3
movups XMMWORD PTR 32[edi],xmm4
movups XMMWORD PTR 48[edi],xmm5
movups XMMWORD PTR 64[edi],xmm6
jmp $L036ctr32_ret
ALIGN 16
$L033ctr32_one_shortcut:
movups xmm2,XMMWORD PTR [ebx]
mov ecx,DWORD PTR 240[edx]
$L037ctr32_one:
movups xmm0,XMMWORD PTR [edx]
movups xmm1,XMMWORD PTR 16[edx]
lea edx,DWORD PTR 32[edx]
xorps xmm2,xmm0
$L041enc1_loop_7:
DB 102,15,56,220,209
dec ecx
movups xmm1,XMMWORD PTR [edx]
lea edx,DWORD PTR 16[edx]
jnz $L041enc1_loop_7
DB 102,15,56,221,209
movups xmm6,XMMWORD PTR [esi]
xorps xmm6,xmm2
movups XMMWORD PTR [edi],xmm6
jmp $L036ctr32_ret
ALIGN 16
$L038ctr32_two:
call __aesni_encrypt3
movups xmm5,XMMWORD PTR [esi]
movups xmm6,XMMWORD PTR 16[esi]
xorps xmm2,xmm5
xorps xmm3,xmm6
movups XMMWORD PTR [edi],xmm2
movups XMMWORD PTR 16[edi],xmm3
jmp $L036ctr32_ret
ALIGN 16
$L039ctr32_three:
call __aesni_encrypt3
movups xmm5,XMMWORD PTR [esi]
movups xmm6,XMMWORD PTR 16[esi]
xorps xmm2,xmm5
movups xmm7,XMMWORD PTR 32[esi]
xorps xmm3,xmm6
movups XMMWORD PTR [edi],xmm2
xorps xmm4,xmm7
movups XMMWORD PTR 16[edi],xmm3
movups XMMWORD PTR 32[edi],xmm4
jmp $L036ctr32_ret
ALIGN 16
$L040ctr32_four:
call __aesni_encrypt4
movups xmm6,XMMWORD PTR [esi]
movups xmm7,XMMWORD PTR 16[esi]
movups xmm1,XMMWORD PTR 32[esi]
xorps xmm2,xmm6
movups xmm0,XMMWORD PTR 48[esi]
xorps xmm3,xmm7
movups XMMWORD PTR [edi],xmm2
xorps xmm4,xmm1
movups XMMWORD PTR 16[edi],xmm3
xorps xmm5,xmm0
movups XMMWORD PTR 32[edi],xmm4
movups XMMWORD PTR 48[edi],xmm5
$L036ctr32_ret:
mov esp,DWORD PTR 80[esp]
pop edi
pop esi
pop ebx
pop ebp
ret
_aesni_ctr32_encrypt_blocks ENDP
ALIGN 16
_aesni_xts_encrypt PROC PUBLIC
$L_aesni_xts_encrypt_begin::
push ebp
push ebx
push esi
push edi
mov edx,DWORD PTR 36[esp]
mov esi,DWORD PTR 40[esp]
mov ecx,DWORD PTR 240[edx]
movups xmm2,XMMWORD PTR [esi]
movups xmm0,XMMWORD PTR [edx]
movups xmm1,XMMWORD PTR 16[edx]
lea edx,DWORD PTR 32[edx]
xorps xmm2,xmm0
$L042enc1_loop_8:
DB 102,15,56,220,209
dec ecx
movups xmm1,XMMWORD PTR [edx]
lea edx,DWORD PTR 16[edx]
jnz $L042enc1_loop_8
DB 102,15,56,221,209
mov esi,DWORD PTR 20[esp]
mov edi,DWORD PTR 24[esp]
mov eax,DWORD PTR 28[esp]
mov edx,DWORD PTR 32[esp]
mov ebp,esp
sub esp,120
mov ecx,DWORD PTR 240[edx]
and esp,-16
mov DWORD PTR 96[esp],135
mov DWORD PTR 100[esp],0
mov DWORD PTR 104[esp],1
mov DWORD PTR 108[esp],0
mov DWORD PTR 112[esp],eax
mov DWORD PTR 116[esp],ebp
movdqa xmm1,xmm2
pxor xmm0,xmm0
movdqa xmm3,XMMWORD PTR 96[esp]
pcmpgtd xmm0,xmm1
and eax,-16
mov ebp,edx
mov ebx,ecx
sub eax,96
jc $L043xts_enc_short
shr ecx,1
mov ebx,ecx
jmp $L044xts_enc_loop6
ALIGN 16
$L044xts_enc_loop6:
pshufd xmm2,xmm0,19
pxor xmm0,xmm0
movdqa XMMWORD PTR [esp],xmm1
paddq xmm1,xmm1
pand xmm2,xmm3
pcmpgtd xmm0,xmm1
pxor xmm1,xmm2
pshufd xmm2,xmm0,19
pxor xmm0,xmm0
movdqa XMMWORD PTR 16[esp],xmm1
paddq xmm1,xmm1
pand xmm2,xmm3
pcmpgtd xmm0,xmm1
pxor xmm1,xmm2
pshufd xmm2,xmm0,19
pxor xmm0,xmm0
movdqa XMMWORD PTR 32[esp],xmm1
paddq xmm1,xmm1
pand xmm2,xmm3
pcmpgtd xmm0,xmm1
pxor xmm1,xmm2
pshufd xmm2,xmm0,19
pxor xmm0,xmm0
movdqa XMMWORD PTR 48[esp],xmm1
paddq xmm1,xmm1
pand xmm2,xmm3
pcmpgtd xmm0,xmm1
pxor xmm1,xmm2
pshufd xmm7,xmm0,19
movdqa XMMWORD PTR 64[esp],xmm1
paddq xmm1,xmm1
movups xmm0,XMMWORD PTR [ebp]
pand xmm7,xmm3
movups xmm2,XMMWORD PTR [esi]
pxor xmm7,xmm1
movdqu xmm3,XMMWORD PTR 16[esi]
xorps xmm2,xmm0
movdqu xmm4,XMMWORD PTR 32[esi]
pxor xmm3,xmm0
movdqu xmm5,XMMWORD PTR 48[esi]
pxor xmm4,xmm0
movdqu xmm6,XMMWORD PTR 64[esi]
pxor xmm5,xmm0
movdqu xmm1,XMMWORD PTR 80[esi]
pxor xmm6,xmm0
lea esi,DWORD PTR 96[esi]
pxor xmm2,XMMWORD PTR [esp]
movdqa XMMWORD PTR 80[esp],xmm7
pxor xmm7,xmm1
movups xmm1,XMMWORD PTR 16[ebp]
lea edx,DWORD PTR 32[ebp]
pxor xmm3,XMMWORD PTR 16[esp]
DB 102,15,56,220,209
pxor xmm4,XMMWORD PTR 32[esp]
DB 102,15,56,220,217
pxor xmm5,XMMWORD PTR 48[esp]
dec ecx
DB 102,15,56,220,225
pxor xmm6,XMMWORD PTR 64[esp]
DB 102,15,56,220,233
pxor xmm7,xmm0
DB 102,15,56,220,241
movups xmm0,XMMWORD PTR [edx]
DB 102,15,56,220,249
call $L_aesni_encrypt6_enter
movdqa xmm1,XMMWORD PTR 80[esp]
pxor xmm0,xmm0
xorps xmm2,XMMWORD PTR [esp]
pcmpgtd xmm0,xmm1
xorps xmm3,XMMWORD PTR 16[esp]
movups XMMWORD PTR [edi],xmm2
xorps xmm4,XMMWORD PTR 32[esp]
movups XMMWORD PTR 16[edi],xmm3
xorps xmm5,XMMWORD PTR 48[esp]
movups XMMWORD PTR 32[edi],xmm4
xorps xmm6,XMMWORD PTR 64[esp]
movups XMMWORD PTR 48[edi],xmm5
xorps xmm7,xmm1
movups XMMWORD PTR 64[edi],xmm6
pshufd xmm2,xmm0,19
movups XMMWORD PTR 80[edi],xmm7
lea edi,DWORD PTR 96[edi]
movdqa xmm3,XMMWORD PTR 96[esp]
pxor xmm0,xmm0
paddq xmm1,xmm1
pand xmm2,xmm3
pcmpgtd xmm0,xmm1
mov ecx,ebx
pxor xmm1,xmm2
sub eax,96
jnc $L044xts_enc_loop6
lea ecx,DWORD PTR 1[ecx*2]
mov edx,ebp
mov ebx,ecx
$L043xts_enc_short:
add eax,96
jz $L045xts_enc_done6x
movdqa xmm5,xmm1
cmp eax,32
jb $L046xts_enc_one
pshufd xmm2,xmm0,19
pxor xmm0,xmm0
paddq xmm1,xmm1
pand xmm2,xmm3
pcmpgtd xmm0,xmm1
pxor xmm1,xmm2
je $L047xts_enc_two
pshufd xmm2,xmm0,19
pxor xmm0,xmm0
movdqa xmm6,xmm1
paddq xmm1,xmm1
pand xmm2,xmm3
pcmpgtd xmm0,xmm1
pxor xmm1,xmm2
cmp eax,64
jb $L048xts_enc_three
pshufd xmm2,xmm0,19
pxor xmm0,xmm0
movdqa xmm7,xmm1
paddq xmm1,xmm1
pand xmm2,xmm3
pcmpgtd xmm0,xmm1
pxor xmm1,xmm2
movdqa XMMWORD PTR [esp],xmm5
movdqa XMMWORD PTR 16[esp],xmm6
je $L049xts_enc_four
movdqa XMMWORD PTR 32[esp],xmm7
pshufd xmm7,xmm0,19
movdqa XMMWORD PTR 48[esp],xmm1
paddq xmm1,xmm1
pand xmm7,xmm3
pxor xmm7,xmm1
movdqu xmm2,XMMWORD PTR [esi]
movdqu xmm3,XMMWORD PTR 16[esi]
movdqu xmm4,XMMWORD PTR 32[esi]
pxor xmm2,XMMWORD PTR [esp]
movdqu xmm5,XMMWORD PTR 48[esi]
pxor xmm3,XMMWORD PTR 16[esp]
movdqu xmm6,XMMWORD PTR 64[esi]
pxor xmm4,XMMWORD PTR 32[esp]
lea esi,DWORD PTR 80[esi]
pxor xmm5,XMMWORD PTR 48[esp]
movdqa XMMWORD PTR 64[esp],xmm7
pxor xmm6,xmm7
call __aesni_encrypt6
movaps xmm1,XMMWORD PTR 64[esp]
xorps xmm2,XMMWORD PTR [esp]
xorps xmm3,XMMWORD PTR 16[esp]
xorps xmm4,XMMWORD PTR 32[esp]
movups XMMWORD PTR [edi],xmm2
xorps xmm5,XMMWORD PTR 48[esp]
movups XMMWORD PTR 16[edi],xmm3
xorps xmm6,xmm1
movups XMMWORD PTR 32[edi],xmm4
movups XMMWORD PTR 48[edi],xmm5
movups XMMWORD PTR 64[edi],xmm6
lea edi,DWORD PTR 80[edi]
jmp $L050xts_enc_done
ALIGN 16
$L046xts_enc_one:
movups xmm2,XMMWORD PTR [esi]
lea esi,DWORD PTR 16[esi]
xorps xmm2,xmm5
movups xmm0,XMMWORD PTR [edx]
movups xmm1,XMMWORD PTR 16[edx]
lea edx,DWORD PTR 32[edx]
xorps xmm2,xmm0
$L051enc1_loop_9:
DB 102,15,56,220,209
dec ecx
movups xmm1,XMMWORD PTR [edx]
lea edx,DWORD PTR 16[edx]
jnz $L051enc1_loop_9
DB 102,15,56,221,209
xorps xmm2,xmm5
movups XMMWORD PTR [edi],xmm2
lea edi,DWORD PTR 16[edi]
movdqa xmm1,xmm5
jmp $L050xts_enc_done
ALIGN 16
$L047xts_enc_two:
movaps xmm6,xmm1
movups xmm2,XMMWORD PTR [esi]
movups xmm3,XMMWORD PTR 16[esi]
lea esi,DWORD PTR 32[esi]
xorps xmm2,xmm5
xorps xmm3,xmm6
xorps xmm4,xmm4
call __aesni_encrypt3
xorps xmm2,xmm5
xorps xmm3,xmm6
movups XMMWORD PTR [edi],xmm2
movups XMMWORD PTR 16[edi],xmm3
lea edi,DWORD PTR 32[edi]
movdqa xmm1,xmm6
jmp $L050xts_enc_done
ALIGN 16
$L048xts_enc_three:
movaps xmm7,xmm1
movups xmm2,XMMWORD PTR [esi]
movups xmm3,XMMWORD PTR 16[esi]
movups xmm4,XMMWORD PTR 32[esi]
lea esi,DWORD PTR 48[esi]
xorps xmm2,xmm5
xorps xmm3,xmm6
xorps xmm4,xmm7
call __aesni_encrypt3
xorps xmm2,xmm5
xorps xmm3,xmm6
xorps xmm4,xmm7
movups XMMWORD PTR [edi],xmm2
movups XMMWORD PTR 16[edi],xmm3
movups XMMWORD PTR 32[edi],xmm4
lea edi,DWORD PTR 48[edi]
movdqa xmm1,xmm7
jmp $L050xts_enc_done
ALIGN 16
$L049xts_enc_four:
movaps xmm6,xmm1
movups xmm2,XMMWORD PTR [esi]
movups xmm3,XMMWORD PTR 16[esi]
movups xmm4,XMMWORD PTR 32[esi]
xorps xmm2,XMMWORD PTR [esp]
movups xmm5,XMMWORD PTR 48[esi]
lea esi,DWORD PTR 64[esi]
xorps xmm3,XMMWORD PTR 16[esp]
xorps xmm4,xmm7
xorps xmm5,xmm6
call __aesni_encrypt4
xorps xmm2,XMMWORD PTR [esp]
xorps xmm3,XMMWORD PTR 16[esp]
xorps xmm4,xmm7
movups XMMWORD PTR [edi],xmm2
xorps xmm5,xmm6
movups XMMWORD PTR 16[edi],xmm3
movups XMMWORD PTR 32[edi],xmm4
movups XMMWORD PTR 48[edi],xmm5
lea edi,DWORD PTR 64[edi]
movdqa xmm1,xmm6
jmp $L050xts_enc_done
ALIGN 16
$L045xts_enc_done6x:
mov eax,DWORD PTR 112[esp]
and eax,15
jz $L052xts_enc_ret
movdqa xmm5,xmm1
mov DWORD PTR 112[esp],eax
jmp $L053xts_enc_steal
ALIGN 16
$L050xts_enc_done:
mov eax,DWORD PTR 112[esp]
pxor xmm0,xmm0
and eax,15
jz $L052xts_enc_ret
pcmpgtd xmm0,xmm1
mov DWORD PTR 112[esp],eax
pshufd xmm5,xmm0,19
paddq xmm1,xmm1
pand xmm5,XMMWORD PTR 96[esp]
pxor xmm5,xmm1
$L053xts_enc_steal:
movzx ecx,BYTE PTR [esi]
movzx edx,BYTE PTR [edi-16]
lea esi,DWORD PTR 1[esi]
mov BYTE PTR [edi-16],cl
mov BYTE PTR [edi],dl
lea edi,DWORD PTR 1[edi]
sub eax,1
jnz $L053xts_enc_steal
sub edi,DWORD PTR 112[esp]
mov edx,ebp
mov ecx,ebx
movups xmm2,XMMWORD PTR [edi-16]
xorps xmm2,xmm5
movups xmm0,XMMWORD PTR [edx]
movups xmm1,XMMWORD PTR 16[edx]
lea edx,DWORD PTR 32[edx]
xorps xmm2,xmm0
$L054enc1_loop_10:
DB 102,15,56,220,209
dec ecx
movups xmm1,XMMWORD PTR [edx]
lea edx,DWORD PTR 16[edx]
jnz $L054enc1_loop_10
DB 102,15,56,221,209
xorps xmm2,xmm5
movups XMMWORD PTR [edi-16],xmm2
$L052xts_enc_ret:
mov esp,DWORD PTR 116[esp]
pop edi
pop esi
pop ebx
pop ebp
ret
_aesni_xts_encrypt ENDP
ALIGN 16
_aesni_xts_decrypt PROC PUBLIC
$L_aesni_xts_decrypt_begin::
push ebp
push ebx
push esi
push edi
mov edx,DWORD PTR 36[esp]
mov esi,DWORD PTR 40[esp]
mov ecx,DWORD PTR 240[edx]
movups xmm2,XMMWORD PTR [esi]
movups xmm0,XMMWORD PTR [edx]
movups xmm1,XMMWORD PTR 16[edx]
lea edx,DWORD PTR 32[edx]
xorps xmm2,xmm0
$L055enc1_loop_11:
DB 102,15,56,220,209
dec ecx
movups xmm1,XMMWORD PTR [edx]
lea edx,DWORD PTR 16[edx]
jnz $L055enc1_loop_11
DB 102,15,56,221,209
mov esi,DWORD PTR 20[esp]
mov edi,DWORD PTR 24[esp]
mov eax,DWORD PTR 28[esp]
mov edx,DWORD PTR 32[esp]
mov ebp,esp
sub esp,120
and esp,-16
xor ebx,ebx
test eax,15
setnz bl
shl ebx,4
sub eax,ebx
mov DWORD PTR 96[esp],135
mov DWORD PTR 100[esp],0
mov DWORD PTR 104[esp],1
mov DWORD PTR 108[esp],0
mov DWORD PTR 112[esp],eax
mov DWORD PTR 116[esp],ebp
mov ecx,DWORD PTR 240[edx]
mov ebp,edx
mov ebx,ecx
movdqa xmm1,xmm2
pxor xmm0,xmm0
movdqa xmm3,XMMWORD PTR 96[esp]
pcmpgtd xmm0,xmm1
and eax,-16
sub eax,96
jc $L056xts_dec_short
shr ecx,1
mov ebx,ecx
jmp $L057xts_dec_loop6
ALIGN 16
$L057xts_dec_loop6:
pshufd xmm2,xmm0,19
pxor xmm0,xmm0
movdqa XMMWORD PTR [esp],xmm1
paddq xmm1,xmm1
pand xmm2,xmm3
pcmpgtd xmm0,xmm1
pxor xmm1,xmm2
pshufd xmm2,xmm0,19
pxor xmm0,xmm0
movdqa XMMWORD PTR 16[esp],xmm1
paddq xmm1,xmm1
pand xmm2,xmm3
pcmpgtd xmm0,xmm1
pxor xmm1,xmm2
pshufd xmm2,xmm0,19
pxor xmm0,xmm0
movdqa XMMWORD PTR 32[esp],xmm1
paddq xmm1,xmm1
pand xmm2,xmm3
pcmpgtd xmm0,xmm1
pxor xmm1,xmm2
pshufd xmm2,xmm0,19
pxor xmm0,xmm0
movdqa XMMWORD PTR 48[esp],xmm1
paddq xmm1,xmm1
pand xmm2,xmm3
pcmpgtd xmm0,xmm1
pxor xmm1,xmm2
pshufd xmm7,xmm0,19
movdqa XMMWORD PTR 64[esp],xmm1
paddq xmm1,xmm1
movups xmm0,XMMWORD PTR [ebp]
pand xmm7,xmm3
movups xmm2,XMMWORD PTR [esi]
pxor xmm7,xmm1
movdqu xmm3,XMMWORD PTR 16[esi]
xorps xmm2,xmm0
movdqu xmm4,XMMWORD PTR 32[esi]
pxor xmm3,xmm0
movdqu xmm5,XMMWORD PTR 48[esi]
pxor xmm4,xmm0
movdqu xmm6,XMMWORD PTR 64[esi]
pxor xmm5,xmm0
movdqu xmm1,XMMWORD PTR 80[esi]
pxor xmm6,xmm0
lea esi,DWORD PTR 96[esi]
pxor xmm2,XMMWORD PTR [esp]
movdqa XMMWORD PTR 80[esp],xmm7
pxor xmm7,xmm1
movups xmm1,XMMWORD PTR 16[ebp]
lea edx,DWORD PTR 32[ebp]
pxor xmm3,XMMWORD PTR 16[esp]
DB 102,15,56,222,209
pxor xmm4,XMMWORD PTR 32[esp]
DB 102,15,56,222,217
pxor xmm5,XMMWORD PTR 48[esp]
dec ecx
DB 102,15,56,222,225
pxor xmm6,XMMWORD PTR 64[esp]
DB 102,15,56,222,233
pxor xmm7,xmm0
DB 102,15,56,222,241
movups xmm0,XMMWORD PTR [edx]
DB 102,15,56,222,249
call $L_aesni_decrypt6_enter
movdqa xmm1,XMMWORD PTR 80[esp]
pxor xmm0,xmm0
xorps xmm2,XMMWORD PTR [esp]
pcmpgtd xmm0,xmm1
xorps xmm3,XMMWORD PTR 16[esp]
movups XMMWORD PTR [edi],xmm2
xorps xmm4,XMMWORD PTR 32[esp]
movups XMMWORD PTR 16[edi],xmm3
xorps xmm5,XMMWORD PTR 48[esp]
movups XMMWORD PTR 32[edi],xmm4
xorps xmm6,XMMWORD PTR 64[esp]
movups XMMWORD PTR 48[edi],xmm5
xorps xmm7,xmm1
movups XMMWORD PTR 64[edi],xmm6
pshufd xmm2,xmm0,19
movups XMMWORD PTR 80[edi],xmm7
lea edi,DWORD PTR 96[edi]
movdqa xmm3,XMMWORD PTR 96[esp]
pxor xmm0,xmm0
paddq xmm1,xmm1
pand xmm2,xmm3
pcmpgtd xmm0,xmm1
mov ecx,ebx
pxor xmm1,xmm2
sub eax,96
jnc $L057xts_dec_loop6
lea ecx,DWORD PTR 1[ecx*2]
mov edx,ebp
mov ebx,ecx
$L056xts_dec_short:
add eax,96
jz $L058xts_dec_done6x
movdqa xmm5,xmm1
cmp eax,32
jb $L059xts_dec_one
pshufd xmm2,xmm0,19
pxor xmm0,xmm0
paddq xmm1,xmm1
pand xmm2,xmm3
pcmpgtd xmm0,xmm1
pxor xmm1,xmm2
je $L060xts_dec_two
pshufd xmm2,xmm0,19
pxor xmm0,xmm0
movdqa xmm6,xmm1
paddq xmm1,xmm1
pand xmm2,xmm3
pcmpgtd xmm0,xmm1
pxor xmm1,xmm2
cmp eax,64
jb $L061xts_dec_three
pshufd xmm2,xmm0,19
pxor xmm0,xmm0
movdqa xmm7,xmm1
paddq xmm1,xmm1
pand xmm2,xmm3
pcmpgtd xmm0,xmm1
pxor xmm1,xmm2
movdqa XMMWORD PTR [esp],xmm5
movdqa XMMWORD PTR 16[esp],xmm6
je $L062xts_dec_four
movdqa XMMWORD PTR 32[esp],xmm7
pshufd xmm7,xmm0,19
movdqa XMMWORD PTR 48[esp],xmm1
paddq xmm1,xmm1
pand xmm7,xmm3
pxor xmm7,xmm1
movdqu xmm2,XMMWORD PTR [esi]
movdqu xmm3,XMMWORD PTR 16[esi]
movdqu xmm4,XMMWORD PTR 32[esi]
pxor xmm2,XMMWORD PTR [esp]
movdqu xmm5,XMMWORD PTR 48[esi]
pxor xmm3,XMMWORD PTR 16[esp]
movdqu xmm6,XMMWORD PTR 64[esi]
pxor xmm4,XMMWORD PTR 32[esp]
lea esi,DWORD PTR 80[esi]
pxor xmm5,XMMWORD PTR 48[esp]
movdqa XMMWORD PTR 64[esp],xmm7
pxor xmm6,xmm7
call __aesni_decrypt6
movaps xmm1,XMMWORD PTR 64[esp]
xorps xmm2,XMMWORD PTR [esp]
xorps xmm3,XMMWORD PTR 16[esp]
xorps xmm4,XMMWORD PTR 32[esp]
movups XMMWORD PTR [edi],xmm2
xorps xmm5,XMMWORD PTR 48[esp]
movups XMMWORD PTR 16[edi],xmm3
xorps xmm6,xmm1
movups XMMWORD PTR 32[edi],xmm4
movups XMMWORD PTR 48[edi],xmm5
movups XMMWORD PTR 64[edi],xmm6
lea edi,DWORD PTR 80[edi]
jmp $L063xts_dec_done
ALIGN 16
$L059xts_dec_one:
movups xmm2,XMMWORD PTR [esi]
lea esi,DWORD PTR 16[esi]
xorps xmm2,xmm5
movups xmm0,XMMWORD PTR [edx]
movups xmm1,XMMWORD PTR 16[edx]
lea edx,DWORD PTR 32[edx]
xorps xmm2,xmm0
$L064dec1_loop_12:
DB 102,15,56,222,209
dec ecx
movups xmm1,XMMWORD PTR [edx]
lea edx,DWORD PTR 16[edx]
jnz $L064dec1_loop_12
DB 102,15,56,223,209
xorps xmm2,xmm5
movups XMMWORD PTR [edi],xmm2
lea edi,DWORD PTR 16[edi]
movdqa xmm1,xmm5
jmp $L063xts_dec_done
ALIGN 16
$L060xts_dec_two:
movaps xmm6,xmm1
movups xmm2,XMMWORD PTR [esi]
movups xmm3,XMMWORD PTR 16[esi]
lea esi,DWORD PTR 32[esi]
xorps xmm2,xmm5
xorps xmm3,xmm6
call __aesni_decrypt3
xorps xmm2,xmm5
xorps xmm3,xmm6
movups XMMWORD PTR [edi],xmm2
movups XMMWORD PTR 16[edi],xmm3
lea edi,DWORD PTR 32[edi]
movdqa xmm1,xmm6
jmp $L063xts_dec_done
ALIGN 16
$L061xts_dec_three:
movaps xmm7,xmm1
movups xmm2,XMMWORD PTR [esi]
movups xmm3,XMMWORD PTR 16[esi]
movups xmm4,XMMWORD PTR 32[esi]
lea esi,DWORD PTR 48[esi]
xorps xmm2,xmm5
xorps xmm3,xmm6
xorps xmm4,xmm7
call __aesni_decrypt3
xorps xmm2,xmm5
xorps xmm3,xmm6
xorps xmm4,xmm7
movups XMMWORD PTR [edi],xmm2
movups XMMWORD PTR 16[edi],xmm3
movups XMMWORD PTR 32[edi],xmm4
lea edi,DWORD PTR 48[edi]
movdqa xmm1,xmm7
jmp $L063xts_dec_done
ALIGN 16
$L062xts_dec_four:
movaps xmm6,xmm1
movups xmm2,XMMWORD PTR [esi]
movups xmm3,XMMWORD PTR 16[esi]
movups xmm4,XMMWORD PTR 32[esi]
xorps xmm2,XMMWORD PTR [esp]
movups xmm5,XMMWORD PTR 48[esi]
lea esi,DWORD PTR 64[esi]
xorps xmm3,XMMWORD PTR 16[esp]
xorps xmm4,xmm7
xorps xmm5,xmm6
call __aesni_decrypt4
xorps xmm2,XMMWORD PTR [esp]
xorps xmm3,XMMWORD PTR 16[esp]
xorps xmm4,xmm7
movups XMMWORD PTR [edi],xmm2
xorps xmm5,xmm6
movups XMMWORD PTR 16[edi],xmm3
movups XMMWORD PTR 32[edi],xmm4
movups XMMWORD PTR 48[edi],xmm5
lea edi,DWORD PTR 64[edi]
movdqa xmm1,xmm6
jmp $L063xts_dec_done
ALIGN 16
$L058xts_dec_done6x:
mov eax,DWORD PTR 112[esp]
and eax,15
jz $L065xts_dec_ret
mov DWORD PTR 112[esp],eax
jmp $L066xts_dec_only_one_more
ALIGN 16
$L063xts_dec_done:
mov eax,DWORD PTR 112[esp]
pxor xmm0,xmm0
and eax,15
jz $L065xts_dec_ret
pcmpgtd xmm0,xmm1
mov DWORD PTR 112[esp],eax
pshufd xmm2,xmm0,19
pxor xmm0,xmm0
movdqa xmm3,XMMWORD PTR 96[esp]
paddq xmm1,xmm1
pand xmm2,xmm3
pcmpgtd xmm0,xmm1
pxor xmm1,xmm2
$L066xts_dec_only_one_more:
pshufd xmm5,xmm0,19
movdqa xmm6,xmm1
paddq xmm1,xmm1
pand xmm5,xmm3
pxor xmm5,xmm1
mov edx,ebp
mov ecx,ebx
movups xmm2,XMMWORD PTR [esi]
xorps xmm2,xmm5
movups xmm0,XMMWORD PTR [edx]
movups xmm1,XMMWORD PTR 16[edx]
lea edx,DWORD PTR 32[edx]
xorps xmm2,xmm0
$L067dec1_loop_13:
DB 102,15,56,222,209
dec ecx
movups xmm1,XMMWORD PTR [edx]
lea edx,DWORD PTR 16[edx]
jnz $L067dec1_loop_13
DB 102,15,56,223,209
xorps xmm2,xmm5
movups XMMWORD PTR [edi],xmm2
$L068xts_dec_steal:
movzx ecx,BYTE PTR 16[esi]
movzx edx,BYTE PTR [edi]
lea esi,DWORD PTR 1[esi]
mov BYTE PTR [edi],cl
mov BYTE PTR 16[edi],dl
lea edi,DWORD PTR 1[edi]
sub eax,1
jnz $L068xts_dec_steal
sub edi,DWORD PTR 112[esp]
mov edx,ebp
mov ecx,ebx
movups xmm2,XMMWORD PTR [edi]
xorps xmm2,xmm6
movups xmm0,XMMWORD PTR [edx]
movups xmm1,XMMWORD PTR 16[edx]
lea edx,DWORD PTR 32[edx]
xorps xmm2,xmm0
$L069dec1_loop_14:
DB 102,15,56,222,209
dec ecx
movups xmm1,XMMWORD PTR [edx]
lea edx,DWORD PTR 16[edx]
jnz $L069dec1_loop_14
DB 102,15,56,223,209
xorps xmm2,xmm6
movups XMMWORD PTR [edi],xmm2
$L065xts_dec_ret:
mov esp,DWORD PTR 116[esp]
pop edi
pop esi
pop ebx
pop ebp
ret
_aesni_xts_decrypt ENDP
ALIGN 16
_aesni_cbc_encrypt PROC PUBLIC
$L_aesni_cbc_encrypt_begin::
push ebp
push ebx
push esi
push edi
mov esi,DWORD PTR 20[esp]
mov ebx,esp
mov edi,DWORD PTR 24[esp]
sub ebx,24
mov eax,DWORD PTR 28[esp]
and ebx,-16
mov edx,DWORD PTR 32[esp]
mov ebp,DWORD PTR 36[esp]
test eax,eax
jz $L070cbc_abort
cmp DWORD PTR 40[esp],0
xchg ebx,esp
movups xmm7,XMMWORD PTR [ebp]
mov ecx,DWORD PTR 240[edx]
mov ebp,edx
mov DWORD PTR 16[esp],ebx
mov ebx,ecx
je $L071cbc_decrypt
movaps xmm2,xmm7
cmp eax,16
jb $L072cbc_enc_tail
sub eax,16
jmp $L073cbc_enc_loop
ALIGN 16
$L073cbc_enc_loop:
movups xmm7,XMMWORD PTR [esi]
lea esi,DWORD PTR 16[esi]
movups xmm0,XMMWORD PTR [edx]
movups xmm1,XMMWORD PTR 16[edx]
xorps xmm7,xmm0
lea edx,DWORD PTR 32[edx]
xorps xmm2,xmm7
$L074enc1_loop_15:
DB 102,15,56,220,209
dec ecx
movups xmm1,XMMWORD PTR [edx]
lea edx,DWORD PTR 16[edx]
jnz $L074enc1_loop_15
DB 102,15,56,221,209
mov ecx,ebx
mov edx,ebp
movups XMMWORD PTR [edi],xmm2
lea edi,DWORD PTR 16[edi]
sub eax,16
jnc $L073cbc_enc_loop
add eax,16
jnz $L072cbc_enc_tail
movaps xmm7,xmm2
jmp $L075cbc_ret
$L072cbc_enc_tail:
mov ecx,eax
DD 2767451785
mov ecx,16
sub ecx,eax
xor eax,eax
DD 2868115081
lea edi,DWORD PTR [edi-16]
mov ecx,ebx
mov esi,edi
mov edx,ebp
jmp $L073cbc_enc_loop
ALIGN 16
$L071cbc_decrypt:
cmp eax,80
jbe $L076cbc_dec_tail
movaps XMMWORD PTR [esp],xmm7
sub eax,80
jmp $L077cbc_dec_loop6_enter
ALIGN 16
$L078cbc_dec_loop6:
movaps XMMWORD PTR [esp],xmm0
movups XMMWORD PTR [edi],xmm7
lea edi,DWORD PTR 16[edi]
$L077cbc_dec_loop6_enter:
movdqu xmm2,XMMWORD PTR [esi]
movdqu xmm3,XMMWORD PTR 16[esi]
movdqu xmm4,XMMWORD PTR 32[esi]
movdqu xmm5,XMMWORD PTR 48[esi]
movdqu xmm6,XMMWORD PTR 64[esi]
movdqu xmm7,XMMWORD PTR 80[esi]
call __aesni_decrypt6
movups xmm1,XMMWORD PTR [esi]
movups xmm0,XMMWORD PTR 16[esi]
xorps xmm2,XMMWORD PTR [esp]
xorps xmm3,xmm1
movups xmm1,XMMWORD PTR 32[esi]
xorps xmm4,xmm0
movups xmm0,XMMWORD PTR 48[esi]
xorps xmm5,xmm1
movups xmm1,XMMWORD PTR 64[esi]
xorps xmm6,xmm0
movups xmm0,XMMWORD PTR 80[esi]
xorps xmm7,xmm1
movups XMMWORD PTR [edi],xmm2
movups XMMWORD PTR 16[edi],xmm3
lea esi,DWORD PTR 96[esi]
movups XMMWORD PTR 32[edi],xmm4
mov ecx,ebx
movups XMMWORD PTR 48[edi],xmm5
mov edx,ebp
movups XMMWORD PTR 64[edi],xmm6
lea edi,DWORD PTR 80[edi]
sub eax,96
ja $L078cbc_dec_loop6
movaps xmm2,xmm7
movaps xmm7,xmm0
add eax,80
jle $L079cbc_dec_tail_collected
movups XMMWORD PTR [edi],xmm2
lea edi,DWORD PTR 16[edi]
$L076cbc_dec_tail:
movups xmm2,XMMWORD PTR [esi]
movaps xmm6,xmm2
cmp eax,16
jbe $L080cbc_dec_one
movups xmm3,XMMWORD PTR 16[esi]
movaps xmm5,xmm3
cmp eax,32
jbe $L081cbc_dec_two
movups xmm4,XMMWORD PTR 32[esi]
cmp eax,48
jbe $L082cbc_dec_three
movups xmm5,XMMWORD PTR 48[esi]
cmp eax,64
jbe $L083cbc_dec_four
movups xmm6,XMMWORD PTR 64[esi]
movaps XMMWORD PTR [esp],xmm7
movups xmm2,XMMWORD PTR [esi]
xorps xmm7,xmm7
call __aesni_decrypt6
movups xmm1,XMMWORD PTR [esi]
movups xmm0,XMMWORD PTR 16[esi]
xorps xmm2,XMMWORD PTR [esp]
xorps xmm3,xmm1
movups xmm1,XMMWORD PTR 32[esi]
xorps xmm4,xmm0
movups xmm0,XMMWORD PTR 48[esi]
xorps xmm5,xmm1
movups xmm7,XMMWORD PTR 64[esi]
xorps xmm6,xmm0
movups XMMWORD PTR [edi],xmm2
movups XMMWORD PTR 16[edi],xmm3
movups XMMWORD PTR 32[edi],xmm4
movups XMMWORD PTR 48[edi],xmm5
lea edi,DWORD PTR 64[edi]
movaps xmm2,xmm6
sub eax,80
jmp $L079cbc_dec_tail_collected
ALIGN 16
$L080cbc_dec_one:
movups xmm0,XMMWORD PTR [edx]
movups xmm1,XMMWORD PTR 16[edx]
lea edx,DWORD PTR 32[edx]
xorps xmm2,xmm0
$L084dec1_loop_16:
DB 102,15,56,222,209
dec ecx
movups xmm1,XMMWORD PTR [edx]
lea edx,DWORD PTR 16[edx]
jnz $L084dec1_loop_16
DB 102,15,56,223,209
xorps xmm2,xmm7
movaps xmm7,xmm6
sub eax,16
jmp $L079cbc_dec_tail_collected
ALIGN 16
$L081cbc_dec_two:
xorps xmm4,xmm4
call __aesni_decrypt3
xorps xmm2,xmm7
xorps xmm3,xmm6
movups XMMWORD PTR [edi],xmm2
movaps xmm2,xmm3
lea edi,DWORD PTR 16[edi]
movaps xmm7,xmm5
sub eax,32
jmp $L079cbc_dec_tail_collected
ALIGN 16
$L082cbc_dec_three:
call __aesni_decrypt3
xorps xmm2,xmm7
xorps xmm3,xmm6
xorps xmm4,xmm5
movups XMMWORD PTR [edi],xmm2
movaps xmm2,xmm4
movups XMMWORD PTR 16[edi],xmm3
lea edi,DWORD PTR 32[edi]
movups xmm7,XMMWORD PTR 32[esi]
sub eax,48
jmp $L079cbc_dec_tail_collected
ALIGN 16
$L083cbc_dec_four:
call __aesni_decrypt4
movups xmm1,XMMWORD PTR 16[esi]
movups xmm0,XMMWORD PTR 32[esi]
xorps xmm2,xmm7
movups xmm7,XMMWORD PTR 48[esi]
xorps xmm3,xmm6
movups XMMWORD PTR [edi],xmm2
xorps xmm4,xmm1
movups XMMWORD PTR 16[edi],xmm3
xorps xmm5,xmm0
movups XMMWORD PTR 32[edi],xmm4
lea edi,DWORD PTR 48[edi]
movaps xmm2,xmm5
sub eax,64
$L079cbc_dec_tail_collected:
and eax,15
jnz $L085cbc_dec_tail_partial
movups XMMWORD PTR [edi],xmm2
jmp $L075cbc_ret
ALIGN 16
$L085cbc_dec_tail_partial:
movaps XMMWORD PTR [esp],xmm2
mov ecx,16
mov esi,esp
sub ecx,eax
DD 2767451785
$L075cbc_ret:
mov esp,DWORD PTR 16[esp]
mov ebp,DWORD PTR 36[esp]
movups XMMWORD PTR [ebp],xmm7
$L070cbc_abort:
pop edi
pop esi
pop ebx
pop ebp
ret
_aesni_cbc_encrypt ENDP
ALIGN 16
__aesni_set_encrypt_key PROC PRIVATE
test eax,eax
jz $L086bad_pointer
test edx,edx
jz $L086bad_pointer
movups xmm0,XMMWORD PTR [eax]
xorps xmm4,xmm4
lea edx,DWORD PTR 16[edx]
cmp ecx,256
je $L08714rounds
cmp ecx,192
je $L08812rounds
cmp ecx,128
jne $L089bad_keybits
ALIGN 16
$L09010rounds:
mov ecx,9
movups XMMWORD PTR [edx-16],xmm0
DB 102,15,58,223,200,1
call $L091key_128_cold
DB 102,15,58,223,200,2
call $L092key_128
DB 102,15,58,223,200,4
call $L092key_128
DB 102,15,58,223,200,8
call $L092key_128
DB 102,15,58,223,200,16
call $L092key_128
DB 102,15,58,223,200,32
call $L092key_128
DB 102,15,58,223,200,64
call $L092key_128
DB 102,15,58,223,200,128
call $L092key_128
DB 102,15,58,223,200,27
call $L092key_128
DB 102,15,58,223,200,54
call $L092key_128
movups XMMWORD PTR [edx],xmm0
mov DWORD PTR 80[edx],ecx
xor eax,eax
ret
ALIGN 16
$L092key_128:
movups XMMWORD PTR [edx],xmm0
lea edx,DWORD PTR 16[edx]
$L091key_128_cold:
shufps xmm4,xmm0,16
xorps xmm0,xmm4
shufps xmm4,xmm0,140
xorps xmm0,xmm4
shufps xmm1,xmm1,255
xorps xmm0,xmm1
ret
ALIGN 16
$L08812rounds:
movq xmm2,QWORD PTR 16[eax]
mov ecx,11
movups XMMWORD PTR [edx-16],xmm0
DB 102,15,58,223,202,1
call $L093key_192a_cold
DB 102,15,58,223,202,2
call $L094key_192b
DB 102,15,58,223,202,4
call $L095key_192a
DB 102,15,58,223,202,8
call $L094key_192b
DB 102,15,58,223,202,16
call $L095key_192a
DB 102,15,58,223,202,32
call $L094key_192b
DB 102,15,58,223,202,64
call $L095key_192a
DB 102,15,58,223,202,128
call $L094key_192b
movups XMMWORD PTR [edx],xmm0
mov DWORD PTR 48[edx],ecx
xor eax,eax
ret
ALIGN 16
$L095key_192a:
movups XMMWORD PTR [edx],xmm0
lea edx,DWORD PTR 16[edx]
ALIGN 16
$L093key_192a_cold:
movaps xmm5,xmm2
$L096key_192b_warm:
shufps xmm4,xmm0,16
movdqa xmm3,xmm2
xorps xmm0,xmm4
shufps xmm4,xmm0,140
pslldq xmm3,4
xorps xmm0,xmm4
pshufd xmm1,xmm1,85
pxor xmm2,xmm3
pxor xmm0,xmm1
pshufd xmm3,xmm0,255
pxor xmm2,xmm3
ret
ALIGN 16
$L094key_192b:
movaps xmm3,xmm0
shufps xmm5,xmm0,68
movups XMMWORD PTR [edx],xmm5
shufps xmm3,xmm2,78
movups XMMWORD PTR 16[edx],xmm3
lea edx,DWORD PTR 32[edx]
jmp $L096key_192b_warm
ALIGN 16
$L08714rounds:
movups xmm2,XMMWORD PTR 16[eax]
mov ecx,13
lea edx,DWORD PTR 16[edx]
movups XMMWORD PTR [edx-32],xmm0
movups XMMWORD PTR [edx-16],xmm2
DB 102,15,58,223,202,1
call $L097key_256a_cold
DB 102,15,58,223,200,1
call $L098key_256b
DB 102,15,58,223,202,2
call $L099key_256a
DB 102,15,58,223,200,2
call $L098key_256b
DB 102,15,58,223,202,4
call $L099key_256a
DB 102,15,58,223,200,4
call $L098key_256b
DB 102,15,58,223,202,8
call $L099key_256a
DB 102,15,58,223,200,8
call $L098key_256b
DB 102,15,58,223,202,16
call $L099key_256a
DB 102,15,58,223,200,16
call $L098key_256b
DB 102,15,58,223,202,32
call $L099key_256a
DB 102,15,58,223,200,32
call $L098key_256b
DB 102,15,58,223,202,64
call $L099key_256a
movups XMMWORD PTR [edx],xmm0
mov DWORD PTR 16[edx],ecx
xor eax,eax
ret
ALIGN 16
$L099key_256a:
movups XMMWORD PTR [edx],xmm2
lea edx,DWORD PTR 16[edx]
$L097key_256a_cold:
shufps xmm4,xmm0,16
xorps xmm0,xmm4
shufps xmm4,xmm0,140
xorps xmm0,xmm4
shufps xmm1,xmm1,255
xorps xmm0,xmm1
ret
ALIGN 16
$L098key_256b:
movups XMMWORD PTR [edx],xmm0
lea edx,DWORD PTR 16[edx]
shufps xmm4,xmm2,16
xorps xmm2,xmm4
shufps xmm4,xmm2,140
xorps xmm2,xmm4
shufps xmm1,xmm1,170
xorps xmm2,xmm1
ret
ALIGN 4
$L086bad_pointer:
mov eax,-1
ret
ALIGN 4
$L089bad_keybits:
mov eax,-2
ret
__aesni_set_encrypt_key ENDP
ALIGN 16
_aesni_set_encrypt_key PROC PUBLIC
$L_aesni_set_encrypt_key_begin::
mov eax,DWORD PTR 4[esp]
mov ecx,DWORD PTR 8[esp]
mov edx,DWORD PTR 12[esp]
call __aesni_set_encrypt_key
ret
_aesni_set_encrypt_key ENDP
ALIGN 16
_aesni_set_decrypt_key PROC PUBLIC
$L_aesni_set_decrypt_key_begin::
mov eax,DWORD PTR 4[esp]
mov ecx,DWORD PTR 8[esp]
mov edx,DWORD PTR 12[esp]
call __aesni_set_encrypt_key
mov edx,DWORD PTR 12[esp]
shl ecx,4
test eax,eax
jnz $L100dec_key_ret
lea eax,DWORD PTR 16[ecx*1+edx]
movups xmm0,XMMWORD PTR [edx]
movups xmm1,XMMWORD PTR [eax]
movups XMMWORD PTR [eax],xmm0
movups XMMWORD PTR [edx],xmm1
lea edx,DWORD PTR 16[edx]
lea eax,DWORD PTR [eax-16]
$L101dec_key_inverse:
movups xmm0,XMMWORD PTR [edx]
movups xmm1,XMMWORD PTR [eax]
DB 102,15,56,219,192
DB 102,15,56,219,201
lea edx,DWORD PTR 16[edx]
lea eax,DWORD PTR [eax-16]
movups XMMWORD PTR 16[eax],xmm0
movups XMMWORD PTR [edx-16],xmm1
cmp eax,edx
ja $L101dec_key_inverse
movups xmm0,XMMWORD PTR [edx]
DB 102,15,56,219,192
movups XMMWORD PTR [edx],xmm0
xor eax,eax
$L100dec_key_ret:
ret
_aesni_set_decrypt_key ENDP
DB 65,69,83,32,102,111,114,32,73,110,116,101,108,32,65,69
DB 83,45,78,73,44,32,67,82,89,80,84,79,71,65,77,83
DB 32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115
DB 115,108,46,111,114,103,62,0
.text$ ENDS
END
| 22.181818
| 60
| 0.75188
|
fa547cacf2f40236ce27f2b54709dd635d742fd2
| 400
|
asm
|
Assembly
|
libsrc/math/cpcmath/floor.asm
|
andydansby/z88dk-mk2
|
51c15f1387293809c496f5eaf7b196f8a0e9b66b
|
[
"ClArtistic"
] | 1
|
2020-09-15T08:35:49.000Z
|
2020-09-15T08:35:49.000Z
|
libsrc/math/cpcmath/floor.asm
|
andydansby/z88dk-MK2
|
51c15f1387293809c496f5eaf7b196f8a0e9b66b
|
[
"ClArtistic"
] | null | null | null |
libsrc/math/cpcmath/floor.asm
|
andydansby/z88dk-MK2
|
51c15f1387293809c496f5eaf7b196f8a0e9b66b
|
[
"ClArtistic"
] | null | null | null |
;
; CPC Maths Routines
;
; August 2003 **_|warp6|_** <kbaccam /at/ free.fr>
;
; $Id: floor.asm,v 1.2 2009/06/22 21:44:17 dom Exp $
;
INCLUDE "cpcfirm.def"
INCLUDE "cpcfp.def"
XLIB floor
XDEF floorc
XDEF floorc2
LIB get_para
.floor call get_para
call firmware
.floorc defw CPCFP_FLO_BINFIX
ld a,b
call firmware
.floorc2
defw CPCFP_BIN_2_FLO
ret
| 15.384615
| 52
| 0.635
|
371f33ef4e3fed0f6832b5bf191882c58b29d1ee
| 5,097
|
asm
|
Assembly
|
Transynther/x86/_processed/AVXALIGN/_zr_/i7-7700_9_0x48.log_21829_919.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 9
|
2020-08-13T19:41:58.000Z
|
2022-03-30T12:22:51.000Z
|
Transynther/x86/_processed/AVXALIGN/_zr_/i7-7700_9_0x48.log_21829_919.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 1
|
2021-04-29T06:29:35.000Z
|
2021-05-13T21:02:30.000Z
|
Transynther/x86/_processed/AVXALIGN/_zr_/i7-7700_9_0x48.log_21829_919.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 3
|
2020-07-14T17:07:07.000Z
|
2022-03-21T01:12:22.000Z
|
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r12
push %r8
push %rax
push %rbx
push %rdx
push %rsi
lea addresses_normal_ht+0x5d28, %r12
nop
nop
dec %r10
movb $0x61, (%r12)
add $54339, %rsi
lea addresses_A_ht+0x3eec, %rdx
nop
nop
inc %r8
mov (%rdx), %eax
nop
nop
nop
and $65123, %r12
lea addresses_WT_ht+0x1efec, %rdx
nop
nop
nop
dec %rbx
movb (%rdx), %r10b
nop
nop
add %r8, %r8
lea addresses_normal_ht+0x1bfc0, %r10
clflush (%r10)
nop
nop
sub $57828, %r8
mov $0x6162636465666768, %rsi
movq %rsi, %xmm1
and $0xffffffffffffffc0, %r10
movaps %xmm1, (%r10)
nop
nop
nop
nop
nop
sub %rbx, %rbx
pop %rsi
pop %rdx
pop %rbx
pop %rax
pop %r8
pop %r12
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r12
push %r13
push %r14
push %r8
push %rdi
push %rdx
// Load
lea addresses_RW+0x1296c, %rdx
nop
nop
nop
nop
add $18032, %r13
mov (%rdx), %r8
sub %r13, %r13
// Faulty Load
lea addresses_A+0x156ec, %r10
nop
nop
nop
nop
and $32469, %r12
movaps (%r10), %xmm3
vpextrq $0, %xmm3, %r13
lea oracles, %r12
and $0xff, %r13
shlq $12, %r13
mov (%r12,%r13,1), %r13
pop %rdx
pop %rdi
pop %r8
pop %r14
pop %r13
pop %r12
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_A', 'AVXalign': False, 'congruent': 0, 'size': 4, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_RW', 'AVXalign': False, 'congruent': 6, 'size': 8, 'same': False, 'NT': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_A', 'AVXalign': True, 'congruent': 0, 'size': 16, 'same': True, 'NT': False}}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 2, 'size': 1, 'same': True, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 11, 'size': 4, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 8, 'size': 1, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': True, 'congruent': 0, 'size': 16, 'same': False, 'NT': False}}
{'00': 21829}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
| 44.321739
| 2,999
| 0.659015
|
6d6d297f128e2e37b7be3c535f1838ebc6a0681a
| 550
|
asm
|
Assembly
|
oeis/001/A001056.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/001/A001056.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/001/A001056.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A001056: a(n) = a(n-1)*a(n-2) + 1, a(0) = 1, a(1) = 3.
; Submitted by Jon Maiga
; 1,3,4,13,53,690,36571,25233991,922832284862,23286741570717144243,21489756930695820973683319349467,500426416062641238759467086706254193219790764168482,10754042042885415070816603338436200915110904821126871858491675028294447933424899095,5381606717708113077798871474753833275262765660168321552771296972742624833153456048326444818420239983696159726808440220432252429323791
mov $2,1
mov $3,2
lpb $0
sub $0,1
mov $4,$3
mov $3,$2
mul $2,$4
add $2,1
lpe
mov $0,$2
| 36.666667
| 369
| 0.803636
|
076a55889afd67f45996ed176e453da2e0b6bfda
| 425
|
asm
|
Assembly
|
oeis/053/A053425.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/053/A053425.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/053/A053425.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A053425: Even numbers n such that the 120 points of the 600-cell exactly integrate homogeneous polynomials of degree n.
; Submitted by Jamie Morken(s1)
; 14,16,18,22,26,28,34,38,46,58
mov $1,1
mov $2,1
lpb $0
mov $3,$2
lpb $3
add $2,1
mov $4,$1
gcd $4,$2
cmp $4,1
cmp $4,0
sub $3,$4
add $5,$1
div $5,2
lpe
sub $0,1
add $1,$5
add $2,1
mul $1,$2
lpe
mov $0,$2
add $0,6
mul $0,2
| 15.740741
| 121
| 0.578824
|
07d23ebb27827cbc79695e9aa29c33658415a632
| 730
|
asm
|
Assembly
|
oeis/015/A015204.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/015/A015204.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/015/A015204.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A015204: Sum of Gaussian binomial coefficients for q=16.
; Submitted by Christian Krause
; 1,2,19,548,78901,36070982,82805758039,605336231791208,22229212008282455161,2599943776445794193452682,1527585017328101696333407084699,2858671468933430533899194300073611948,26873565540839814480301520088779437828129981,804644538888582359561458938703728824174301603165902,121027781365131841202453290908157272180785858705853310642399,57980749770124747400176432633284402847087765616958738246766746557168,139535531906677818070062739753824215544188041262420975221555834098704633007361
mov $1,$0
mov $0,0
add $1,1
mov $2,1
mov $3,4
lpb $1
sub $1,1
mov $4,$2
mul $2,16
mul $4,$3
add $0,$4
sub $3,$4
add $3,$0
lpe
mov $0,$3
div $0,4
| 34.761905
| 478
| 0.835616
|
ada712998f2e9b5fcedea26b370f290294de19fb
| 589
|
asm
|
Assembly
|
oeis/116/A116156.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/116/A116156.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/116/A116156.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A116156: a(n) = 5^n * n*(n + 1).
; 0,10,150,1500,12500,93750,656250,4375000,28125000,175781250,1074218750,6445312500,38085937500,222167968750,1281738281250,7324218750000,41503906250000,233459472656250,1304626464843750,7247924804687500,40054321289062500,220298767089843750,1206398010253906250,6580352783203125000,35762786865234375000,193715095520019531250,1046061515808105468750,5632638931274414062500,30249357223510742187500,162050127983093261718750,866129994392395019531250,4619359970092773437500000,24586915969848632812500000
mov $2,5
pow $2,$0
mul $2,$0
add $0,2
mul $0,$2
sub $0,$2
| 58.9
| 494
| 0.855688
|
f6aeab13a1c1af00ed8fbe45542a192ac8c2afdd
| 4,199
|
asm
|
Assembly
|
Driver/Printer/DotMatrix/Tosh24/toshiba24DriverInfo.asm
|
steakknife/pcgeos
|
95edd7fad36df400aba9bab1d56e154fc126044a
|
[
"Apache-2.0"
] | 504
|
2018-11-18T03:35:53.000Z
|
2022-03-29T01:02:51.000Z
|
Driver/Printer/DotMatrix/Tosh24/toshiba24DriverInfo.asm
|
steakknife/pcgeos
|
95edd7fad36df400aba9bab1d56e154fc126044a
|
[
"Apache-2.0"
] | 96
|
2018-11-19T21:06:50.000Z
|
2022-03-06T10:26:48.000Z
|
Driver/Printer/DotMatrix/Tosh24/toshiba24DriverInfo.asm
|
steakknife/pcgeos
|
95edd7fad36df400aba9bab1d56e154fc126044a
|
[
"Apache-2.0"
] | 73
|
2018-11-19T20:46:53.000Z
|
2022-03-29T00:59:26.000Z
|
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) Berkeley Softworks 1990 -- All Rights Reserved
PROJECT: PC GEOS
MODULE: toshiba 24-pin printer driver
FILE: toshiba24DriverInfo.asm
AUTHOR: Dave Durran, 26 Mar 1990
REVISION HISTORY:
Name Date Description
---- ---- -----------
Dave 3/27/90 Initial revision
Dave 5/92 Initial 2.0 version
DESCRIPTION:
Driver info for the toshiba 24-pin printer driver
The file "printerDriver.def" should be included before this one
$Id: toshiba24DriverInfo.asm,v 1.1 97/04/18 11:53:34 newdeal Exp $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Driver Info Resource
This part of the file contains the information that pertains to
all device supported by the driver. It includes device names and
a table of the resource handles for the specific device info. A
pointer to this info is provided by the DriverInfo function.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
DriverInfo segment lmem LMEM_TYPE_GENERAL
;----------------------------------------------------------------------------
; Device Enumerations
;----------------------------------------------------------------------------
DefPrinter PD_CITIZEN_T124, "Citizen Tribute 124", p321Info
DefPrinter PD_CITIZEN_T224, "Citizen Tribute 224", p351Info
DefPrinter PD_TOSHIBA_P321, "Toshiba P321", p321Info
DefPrinter PD_TOSHIBA_P341SL_T, "Toshiba P341SL", p351Info
DefPrinter PD_TOSHIBA_P351, "Toshiba P351", p351Info
DefPrinter PD_TOSHIBA_P351SX_T, "Toshiba P351SX (Tosh/Qume Mode)", p351Info
;----------------------------------------------------------------------------
; Driver Info Header
;----------------------------------------------------------------------------
DriverExtendedInfoTable < {}, ; lmem hdr
PrintDevice/2, ; # devices
offset deviceStrings, ; devices
offset deviceInfoTab ; info blocks
>
PrintDriverInfo < 45, ; timeout (sec)
PR_RESEND, ; resend after
isoSubstitutions, ;ISO sub tab.
asciiTransTable,
PDT_PRINTER,
TRUE
>
;----------------------------------------------------------------------------
; Device String Table and Strings
;----------------------------------------------------------------------------
;ISO Substitutions for this printer.
;France,Germany,UK,Denmark1,Sweden,Italy,Spain1,Japan,Norway
isoSubstitutions chunk.word \
2323h,2424h,4088h,5ba1h,5c8dh,5da4h,5e5eh,6060h,\
7b8eh,7c9dh,7d8fh,7each,0000h,0000h,0000h,0000h,\
2323h,2424h,40a4h,5b80h,5c85h,5d86h,5e5eh,6060h,\
7b8ah,7c9ah,7d9fh,7ea7h,0000h,0000h,0000h,0000h,\
23a3h,0000h,0000h,0000h,0000h,0000h,0000h,0000h,\
0000h,0000h,0000h,0000h,0000h,0000h,0000h,0000h,\
0000h,0000h,0000h,0000h,0000h,0000h,0000h,0000h,\
0000h,0000h,0000h,0000h,0000h,0000h,0000h,0000h,\
2323h,24dbh,4083h,5b80h,5c85h,5d81h,5e86h,608eh,\
7b8ah,7c9ah,7d8ch,7e9fh,0000h,0000h,0000h,0000h,\
0000h,0000h,0000h,0000h,0000h,0000h,0000h,0000h,\
0000h,0000h,0000h,0000h,0000h,0000h,0000h,0000h,\
2320h,2424h,4040h,5bc1h,5c84h,5dc2h,5e5eh,6060h,\
7bach,7c96h,0000h,0000h,0000h,0000h,0000h,0000h,\
0000h,0000h,0000h,0000h,0000h,0000h,0000h,0000h,\
0000h,0000h,0000h,0000h,0000h,0000h,0000h,0000h,\
2323h,24dbh,4083h,5baeh,5cafh,5d81h,5e86h,608eh,\
7bbeh,7cbfh,7d8ch,7e9fh,0000h,0000h,0000h,0000h
; ASCII Translation List for Foreign Language Versions
asciiTransTable chunk.char ";;",0
;Create the actual tables here.....
PrinterTables
DriverInfo ends
| 39.613208
| 79
| 0.51679
|
cf24cf3a95396479c5289e77e131a1c0d988dd7c
| 300
|
asm
|
Assembly
|
oeis/021/A021156.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/021/A021156.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/021/A021156.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A021156: Decimal expansion of 1/152.
; 0,0,6,5,7,8,9,4,7,3,6,8,4,2,1,0,5,2,6,3,1,5,7,8,9,4,7,3,6,8,4,2,1,0,5,2,6,3,1,5,7,8,9,4,7,3,6,8,4,2,1,0,5,2,6,3,1,5,7,8,9,4,7,3,6,8,4,2,1,0,5,2,6,3,1,5,7,8,9,4,7,3,6,8,4,2,1,0,5,2,6,3,1,5,7,8,9,4,7
add $0,1
mov $2,10
pow $2,$0
div $2,152
mov $0,$2
mod $0,10
| 30
| 199
| 0.54
|
ee90a07db8ec115a6899d70340daefc29a872d2b
| 1,908
|
asm
|
Assembly
|
lib/core/stack/_long.asm
|
locodarwin/xc-basic3
|
74d73fb4049980fc0c7b648b4893ce3a53056af3
|
[
"MIT"
] | 11
|
2021-08-05T18:13:21.000Z
|
2022-03-26T21:44:50.000Z
|
lib/core/stack/_long.asm
|
locodarwin/xc-basic3
|
74d73fb4049980fc0c7b648b4893ce3a53056af3
|
[
"MIT"
] | 119
|
2021-08-09T06:28:44.000Z
|
2022-03-31T07:12:11.000Z
|
lib/core/stack/_long.asm
|
locodarwin/xc-basic3
|
74d73fb4049980fc0c7b648b4893ce3a53056af3
|
[
"MIT"
] | 3
|
2022-01-22T05:25:09.000Z
|
2022-03-26T17:11:55.000Z
|
; Push a long int onto the stack
MAC plong ; @push
IF !FPUSH
lda #<{1}
pha
lda #>{1}
pha
lda #[{1} >> 16]
pha
ELSE
lda #<{1}
ldy #>{1}
ldx #[{1} >> 16]
ENDIF
ENDM
; Push a long int variable on the stack
MAC plongvar ; @push
IF !FPUSH
lda {1}
pha
lda {1} + 1
pha
lda {1} + 2
pha
ELSE
lda {1}
ldy {1} + 1
ldx {1} + 2
ENDIF
ENDM
; Push one dynamic long variable onto stack
MAC pdynlongvar
ldy #[{1} + 2]
lda (RC),y
pha
dey
lda (RC),y
pha
dey
lda (RC),y
pha
ENDM
; Pull dynamic long on stack to variable
MAC pldynlongvar
ldy #{1}
pla
sta (RC),y
pla
iny
sta (RC),y
pla
iny
sta (RC),y
ENDM
; Pull long int to variable
MAC pllongvar ; @pull
IF !FPULL
pla
sta {1}+2
pla
sta {1}+1
pla
sta {1}
ELSE
sta {1}
sty {1}+1
stx {1}+2
ENDIF
ENDM
; Push longint of an array onto stack
; (indexed by a word)
MAC plongarray ; @pull
getaddr {1}
; Load and push
ldy #0
lda (R0),y
pha
iny
lda (R0),y
pha
iny
lda (R0),y
pha
ENDM
; Push long int of an array onto stack
; (indexed by a byte)
MAC plongarrayfast ; @pull
IF !FPULL
pla
ENDIF
tax
lda {1},x
pha
lda [{1} + 1],x
pha
lda [{1} + 2],x
pha
ENDM
; Pull long int off of stack and store in array
; (indexed by a word)
MAC pllongarray ; @pull
getaddr {1}
ldy #2
pla
sta (R0),y
dey
pla
sta (R0),y
dey
pla
sta (R0),y
ENDM
; Pull long int off of stack and store in array
; (indexed by a byte)
MAC pllongarrayfast ; @pull
IF !FPULL
pla
ENDIF
tax
pla
sta [{1} + 2],x
pla
sta [{1} + 1],x
pla
sta {1},x
ENDM
; Push relative long variable (e.g this.something)
MAC prelativelongvar
ldy #{1}
lda (TH),y
pha
iny
lda (TH),y
pha
iny
lda (TH),y
pha
ENDM
; Pull long value and store in relative long variable
; (e.g this.something)
MAC plrelativelongvar
pla
ldy #[{1} + 2]
sta (TH),y
pla
dey
sta (TH),y
pla
dey
sta (TH),y
ENDM
| 11.850932
| 54
| 0.60587
|
24faca159cd06b4dfaf459fd7281edc725ceff16
| 726
|
asm
|
Assembly
|
Working Disassembly/Levels/Slots/Misc Object Data/Map - Ring.asm
|
TeamASM-Blur/Sonic-3-Blue-Balls-Edition
|
7e8a2c5df02271615ff4cae529521e6b1560d6b1
|
[
"Apache-2.0"
] | 5
|
2021-07-09T08:17:56.000Z
|
2022-02-27T19:57:47.000Z
|
Working Disassembly/Levels/Slots/Misc Object Data/Map - Ring.asm
|
TeamASM-Blur/Sonic-3-Blue-Balls-Edition
|
7e8a2c5df02271615ff4cae529521e6b1560d6b1
|
[
"Apache-2.0"
] | null | null | null |
Working Disassembly/Levels/Slots/Misc Object Data/Map - Ring.asm
|
TeamASM-Blur/Sonic-3-Blue-Balls-Edition
|
7e8a2c5df02271615ff4cae529521e6b1560d6b1
|
[
"Apache-2.0"
] | null | null | null |
Map_SB_Ring_: dc.w byte_4B8A6-Map_SB_Ring_
dc.w byte_4B8AC-Map_SB_Ring_
dc.w byte_4B8B2-Map_SB_Ring_
dc.w byte_4B8B8-Map_SB_Ring_
dc.w byte_4B8BE-Map_SB_Ring_
dc.w byte_4B8C4-Map_SB_Ring_
dc.w byte_4B8CA-Map_SB_Ring_
dc.w byte_4B8D0-Map_SB_Ring_
dc.w byte_4B8D6-Map_SB_Ring_
byte_4B8A6: dc.b 1
dc.b $F8, 5, 0, 0, $F8
byte_4B8AC: dc.b 1
dc.b $F8, 5, 0, 4, $F8
byte_4B8B2: dc.b 1
dc.b $F8, 1, 0, 8, $FC
byte_4B8B8: dc.b 1
dc.b $F8, 5, 8, 4, $F8
byte_4B8BE: dc.b 1
dc.b $F8, 5, 0, $A, $F8
byte_4B8C4: dc.b 1
dc.b $F8, 5, $18, $A, $F8
byte_4B8CA: dc.b 1
dc.b $F8, 5, 8, $A, $F8
byte_4B8D0: dc.b 1
dc.b $F8, 5, $10, $A, $F8
byte_4B8D6: dc.b 0
dc.b 0
| 26.888889
| 42
| 0.618457
|
f3fda6dd52b48ccfe66aa24951ccac762b489b2b
| 8,805
|
asm
|
Assembly
|
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_21829_588.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 9
|
2020-08-13T19:41:58.000Z
|
2022-03-30T12:22:51.000Z
|
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_21829_588.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 1
|
2021-04-29T06:29:35.000Z
|
2021-05-13T21:02:30.000Z
|
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_21829_588.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 3
|
2020-07-14T17:07:07.000Z
|
2022-03-21T01:12:22.000Z
|
.global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r13
push %r14
push %r8
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_WC_ht+0x173a0, %rbx
nop
nop
nop
nop
inc %r8
movb $0x61, (%rbx)
nop
sub $29716, %r14
lea addresses_A_ht+0x6220, %rsi
lea addresses_D_ht+0xf720, %rdi
nop
nop
nop
and $64014, %r13
mov $79, %rcx
rep movsq
and $31810, %r8
lea addresses_D_ht+0x132e7, %rsi
lea addresses_D_ht+0x175a0, %rdi
clflush (%rsi)
nop
nop
nop
nop
nop
and %r11, %r11
mov $82, %rcx
rep movsw
nop
cmp %rdi, %rdi
lea addresses_WT_ht+0xcda0, %rsi
inc %r13
movb $0x61, (%rsi)
nop
nop
nop
nop
sub $1809, %rbx
lea addresses_UC_ht+0x1bf20, %rcx
nop
nop
nop
nop
sub $19882, %r14
mov $0x6162636465666768, %rsi
movq %rsi, %xmm7
movups %xmm7, (%rcx)
nop
nop
nop
nop
nop
and $23039, %rdi
lea addresses_normal_ht+0x9fa0, %rdi
nop
nop
cmp $12529, %r8
movl $0x61626364, (%rdi)
nop
nop
nop
nop
and %r13, %r13
lea addresses_WT_ht+0x1370, %rsi
nop
nop
nop
nop
and %rcx, %rcx
movups (%rsi), %xmm5
vpextrq $1, %xmm5, %rdi
nop
nop
nop
nop
sub $6992, %rsi
lea addresses_D_ht+0x1deb8, %r13
nop
sub %r11, %r11
movb (%r13), %r8b
nop
nop
nop
sub $38887, %r11
lea addresses_UC_ht+0x8ba0, %rcx
nop
nop
nop
nop
nop
sub %r8, %r8
movl $0x61626364, (%rcx)
nop
nop
nop
nop
cmp %rdi, %rdi
lea addresses_A_ht+0x9fa0, %rbx
nop
nop
nop
nop
cmp %r11, %r11
mov (%rbx), %r8d
dec %rcx
lea addresses_UC_ht+0x116a0, %rdi
nop
cmp $58022, %rsi
movups (%rdi), %xmm7
vpextrq $1, %xmm7, %r11
sub %r11, %r11
lea addresses_WT_ht+0xad20, %rsi
lea addresses_D_ht+0x1e940, %rdi
nop
nop
nop
dec %rbx
mov $70, %rcx
rep movsl
nop
nop
nop
sub %rsi, %rsi
lea addresses_WT_ht+0x9a22, %rsi
lea addresses_D_ht+0x1a180, %rdi
nop
nop
inc %r11
mov $59, %rcx
rep movsw
and $17446, %rsi
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %r8
pop %r14
pop %r13
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r14
push %r8
push %r9
push %rax
push %rbp
push %rsi
// Load
lea addresses_normal+0x12fa0, %r9
add $42867, %r14
vmovups (%r9), %ymm4
vextracti128 $1, %ymm4, %xmm4
vpextrq $0, %xmm4, %rsi
nop
and %r14, %r14
// Store
lea addresses_US+0x37f8, %r11
clflush (%r11)
nop
nop
nop
nop
xor $37829, %rax
movl $0x51525354, (%r11)
sub %rax, %rax
// Store
lea addresses_normal+0x15ca0, %r8
nop
nop
nop
nop
nop
xor $11130, %rax
mov $0x5152535455565758, %r11
movq %r11, %xmm3
movups %xmm3, (%r8)
nop
nop
inc %rbp
// Store
lea addresses_D+0x8ec6, %rax
dec %r9
mov $0x5152535455565758, %rbp
movq %rbp, %xmm1
movups %xmm1, (%rax)
nop
nop
nop
nop
cmp $35745, %r11
// Load
mov $0x1a0, %r8
nop
nop
nop
nop
and %r11, %r11
movb (%r8), %al
nop
nop
nop
nop
xor $30936, %r9
// Store
lea addresses_normal+0x10921, %rbp
nop
nop
inc %r8
mov $0x5152535455565758, %rax
movq %rax, %xmm4
vmovups %ymm4, (%rbp)
add $16682, %rax
// Faulty Load
lea addresses_PSE+0x137a0, %r9
nop
nop
add $60256, %rax
movups (%r9), %xmm1
vpextrq $0, %xmm1, %r14
lea oracles, %rax
and $0xff, %r14
shlq $12, %r14
mov (%rax,%r14,1), %r14
pop %rsi
pop %rbp
pop %rax
pop %r9
pop %r8
pop %r14
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_PSE', 'same': False, 'size': 1, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_normal', 'same': False, 'size': 32, 'congruent': 11, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_US', 'same': False, 'size': 4, 'congruent': 2, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_normal', 'same': False, 'size': 16, 'congruent': 8, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_D', 'same': False, 'size': 16, 'congruent': 1, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_P', 'same': False, 'size': 1, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_normal', 'same': False, 'size': 32, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
[Faulty Load]
{'src': {'type': 'addresses_PSE', 'same': True, 'size': 16, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'dst': {'type': 'addresses_WC_ht', 'same': False, 'size': 1, 'congruent': 10, 'NT': True, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_A_ht', 'congruent': 7, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 7, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_D_ht', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 9, 'same': False}, 'OP': 'REPM'}
{'dst': {'type': 'addresses_WT_ht', 'same': False, 'size': 1, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_UC_ht', 'same': False, 'size': 16, 'congruent': 7, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_normal_ht', 'same': False, 'size': 4, 'congruent': 11, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_WT_ht', 'same': False, 'size': 16, 'congruent': 4, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_D_ht', 'same': False, 'size': 1, 'congruent': 3, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_UC_ht', 'same': False, 'size': 4, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_A_ht', 'same': False, 'size': 4, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_UC_ht', 'same': False, 'size': 16, 'congruent': 8, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WT_ht', 'congruent': 7, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 5, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_WT_ht', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 5, 'same': False}, 'OP': 'REPM'}
{'33': 21829}
33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33
*/
| 31.113074
| 2,999
| 0.653038
|
7dc3c587031b7df9d372672c56bc11eaa907b69c
| 1,885
|
asm
|
Assembly
|
programs/oeis/064/A064999.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | 1
|
2021-03-15T11:38:20.000Z
|
2021-03-15T11:38:20.000Z
|
programs/oeis/064/A064999.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/064/A064999.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
; A064999: Partial sums of sequence (essentially A002378): 1, 2, 6, 12, 20, 30, 42, 56, 72, 90, ...
; 1,3,9,21,41,71,113,169,241,331,441,573,729,911,1121,1361,1633,1939,2281,2661,3081,3543,4049,4601,5201,5851,6553,7309,8121,8991,9921,10913,11969,13091,14281,15541,16873,18279,19761,21321,22961,24683,26489,28381,30361,32431,34593,36849,39201,41651,44201,46853,49609,52471,55441,58521,61713,65019,68441,71981,75641,79423,83329,87361,91521,95811,100233,104789,109481,114311,119281,124393,129649,135051,140601,146301,152153,158159,164321,170641,177121,183763,190569,197541,204681,211991,219473,227129,234961,242971,251161,259533,268089,276831,285761,294881,304193,313699,323401,333301,343401,353703,364209,374921,385841,396971,408313,419869,431641,443631,455841,468273,480929,493811,506921,520261,533833,547639,561681,575961,590481,605243,620249,635501,651001,666751,682753,699009,715521,732291,749321,766613,784169,801991,820081,838441,857073,875979,895161,914621,934361,954383,974689,995281,1016161,1037331,1058793,1080549,1102601,1124951,1147601,1170553,1193809,1217371,1241241,1265421,1289913,1314719,1339841,1365281,1391041,1417123,1443529,1470261,1497321,1524711,1552433,1580489,1608881,1637611,1666681,1696093,1725849,1755951,1786401,1817201,1848353,1879859,1911721,1943941,1976521,2009463,2042769,2076441,2110481,2144891,2179673,2214829,2250361,2286271,2322561,2359233,2396289,2433731,2471561,2509781,2548393,2587399,2626801,2666601,2706801,2747403,2788409,2829821,2871641,2913871,2956513,2999569,3043041,3086931,3131241,3175973,3221129,3266711,3312721,3359161,3406033,3453339,3501081,3549261,3597881,3646943,3696449,3746401,3796801,3847651,3898953,3950709,4002921,4055591,4108721,4162313,4216369,4270891,4325881,4381341,4437273,4493679,4550561,4607921,4665761,4724083,4782889,4842181,4901961,4962231,5022993,5084249,5146001,5208251
add $0,2
bin $0,3
mov $1,$0
mul $1,2
add $1,1
| 209.444444
| 1,737
| 0.835013
|
f6e4113a8ef80cd75109c5d703164cd9d70dacbd
| 1,127
|
asm
|
Assembly
|
src/bootloader/stage1/disk.asm
|
StrBrkrs-NullException/NoolOS
|
57c96c058225ee13f14e36c268c3af563f5d5755
|
[
"MIT"
] | 5
|
2021-01-04T20:06:19.000Z
|
2022-01-06T17:35:52.000Z
|
src/bootloader/stage1/disk.asm
|
NullExceptionTSB/NoolOS
|
57c96c058225ee13f14e36c268c3af563f5d5755
|
[
"MIT"
] | 2
|
2019-02-01T19:16:00.000Z
|
2019-02-02T13:33:16.000Z
|
src/bootloader/stage1/disk.asm
|
NullExceptionTSB/NoolOS
|
57c96c058225ee13f14e36c268c3af563f5d5755
|
[
"MIT"
] | 2
|
2021-07-05T03:17:20.000Z
|
2022-01-31T04:01:10.000Z
|
%ifndef _SOARE_DISK_ASM
%define _SOARE_DISK_ASM
CHS_cylinders db 0
CHS_heads db 0
CHS_sectors db 0
;IN:
;AX = LBA
;OUT:
;CHS variables = CHS
;cylinders = LBA / (sectors per track * head count)
;heads = (LBA / sectors per track) % head count
;sectors = (LBA % sectors per track) + 1
LBA2CHS:
push dx
xor dx, dx
div WORD [SectorsPerTrack]
inc dl
mov [CHS_sectors], dl
xor dx, dx
div WORD [HeadCount]
mov [CHS_heads], dl
mov [CHS_cylinders], al
pop dx
ret
;IN:
;AX = LBA
;DL = drive
;ES:BX = buffer segment:offset
;OUT:
;CF = 1 if error
LoadSector:
pusha
call LBA2CHS
mov ah, 2
mov al, 1
mov ch, [CHS_cylinders]
mov cl, [CHS_sectors]
mov dh, [CHS_heads]
clc
int 13h
popa
ret
;IN:
;AX = LBA
;CX = sector count
;DL = drive
;ES:BX = buffer segment:offset
;OUT:
;CF = 1 if error
LoadSectors:
pusha
.readLoop:
clc
call LoadSector
inc ax
add bx, 512
jc .done
loop .readLoop
jmp .done
.done:
popa
ret
;AX = cluster
;ES:BX = buffer
LoadCluster:
pusha
sub ax, 2
add ax, [DiskDataStartLBA]
mov dl, [BootDriveNum]
movzx cx, BYTE [SectorsPerCluster]
call LoadSectors
popa
ret
%endif
| 14.265823
| 52
| 0.681455
|
805ea26851abc52c7fde04155c4466e61e840816
| 18
|
asm
|
Assembly
|
test/data/input/load-immediate-0.asm
|
CDPcode/optimips-prime
|
4ce7a5edf170a6811eebbe21e8d632fca7e4ed7b
|
[
"MIT"
] | null | null | null |
test/data/input/load-immediate-0.asm
|
CDPcode/optimips-prime
|
4ce7a5edf170a6811eebbe21e8d632fca7e4ed7b
|
[
"MIT"
] | null | null | null |
test/data/input/load-immediate-0.asm
|
CDPcode/optimips-prime
|
4ce7a5edf170a6811eebbe21e8d632fca7e4ed7b
|
[
"MIT"
] | null | null | null |
la $s1, 0x0000002A
| 18
| 18
| 0.777778
|
969c1322f4ba05c287563bbe17c1f6824b7cb75d
| 6,390
|
asm
|
Assembly
|
Transynther/x86/_processed/P/_zr_/i9-9900K_12_0xca_notsx.log_1533_1583.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 9
|
2020-08-13T19:41:58.000Z
|
2022-03-30T12:22:51.000Z
|
Transynther/x86/_processed/P/_zr_/i9-9900K_12_0xca_notsx.log_1533_1583.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 1
|
2021-04-29T06:29:35.000Z
|
2021-05-13T21:02:30.000Z
|
Transynther/x86/_processed/P/_zr_/i9-9900K_12_0xca_notsx.log_1533_1583.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 3
|
2020-07-14T17:07:07.000Z
|
2022-03-21T01:12:22.000Z
|
.global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r12
push %r15
push %r8
push %rbp
push %rcx
push %rdi
push %rsi
lea addresses_WC_ht+0x8276, %rsi
lea addresses_WC_ht+0x12e66, %rdi
dec %r12
mov $29, %rcx
rep movsq
nop
nop
nop
nop
sub %r8, %r8
lea addresses_normal_ht+0x7c4e, %r12
nop
nop
nop
dec %r8
mov (%r12), %di
nop
nop
cmp %rsi, %rsi
lea addresses_D_ht+0x10966, %rsi
nop
nop
cmp $16010, %r11
movups (%rsi), %xmm7
vpextrq $0, %xmm7, %rdi
nop
nop
nop
nop
nop
cmp %rsi, %rsi
lea addresses_D_ht+0xf275, %r11
nop
add $622, %r15
mov $0x6162636465666768, %rdi
movq %rdi, (%r11)
nop
nop
nop
dec %r8
lea addresses_WC_ht+0xaa64, %r11
nop
nop
nop
nop
sub %r15, %r15
movb $0x61, (%r11)
nop
and $52988, %rdi
lea addresses_WC_ht+0x15f66, %r8
nop
add $15161, %r15
movups (%r8), %xmm6
vpextrq $0, %xmm6, %rdi
nop
nop
nop
nop
and $385, %r11
lea addresses_A_ht+0xb3f6, %rsi
lea addresses_UC_ht+0xab74, %rdi
nop
nop
nop
nop
cmp %rbp, %rbp
mov $78, %rcx
rep movsb
nop
nop
nop
nop
and $51711, %rsi
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %r8
pop %r15
pop %r12
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r12
push %r13
push %r14
push %rbx
push %rdx
push %rsi
// Load
lea addresses_normal+0xec66, %rsi
nop
nop
nop
nop
sub $46185, %rbx
mov (%rsi), %edx
sub $45522, %r12
// Store
lea addresses_UC+0xada6, %rbx
nop
nop
nop
xor $41945, %r12
movw $0x5152, (%rbx)
dec %r12
// Store
lea addresses_D+0xb666, %r14
nop
dec %r11
mov $0x5152535455565758, %r12
movq %r12, %xmm5
and $0xffffffffffffffc0, %r14
movaps %xmm5, (%r14)
sub %r12, %r12
// Faulty Load
mov $0x266, %rdx
nop
nop
nop
nop
sub $11213, %r13
mov (%rdx), %ebx
lea oracles, %r11
and $0xff, %rbx
shlq $12, %rbx
mov (%r11,%rbx,1), %rbx
pop %rsi
pop %rdx
pop %rbx
pop %r14
pop %r13
pop %r12
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_P', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 0}}
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_normal', 'NT': False, 'AVXalign': True, 'size': 4, 'congruent': 9}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_UC', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 5}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_D', 'NT': False, 'AVXalign': True, 'size': 16, 'congruent': 10}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_P', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'REPM', 'src': {'same': False, 'congruent': 3, 'type': 'addresses_WC_ht'}, 'dst': {'same': False, 'congruent': 10, 'type': 'addresses_WC_ht'}}
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_normal_ht', 'NT': False, 'AVXalign': True, 'size': 2, 'congruent': 0}}
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_D_ht', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 8}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_D_ht', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WC_ht', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 1}}
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WC_ht', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 8}}
{'OP': 'REPM', 'src': {'same': True, 'congruent': 3, 'type': 'addresses_A_ht'}, 'dst': {'same': False, 'congruent': 1, 'type': 'addresses_UC_ht'}}
{'00': 1533}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
| 36.724138
| 2,999
| 0.655086
|
5574f0a86f87c3fe465638e53b50bb57982dde48
| 270
|
asm
|
Assembly
|
oeis/040/A040156.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/040/A040156.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/040/A040156.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A040156: Continued fraction for sqrt(170).
; Submitted by Christian Krause
; 13,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26
min $0,1
add $0,1
mul $0,13
| 33.75
| 163
| 0.681481
|
136e0d302fd446f150b288f47821e7066b6060af
| 613
|
asm
|
Assembly
|
_anim/Eggman - Scrap Brain 2 & Final.asm
|
kodishmediacenter/msu-md-sonic
|
3aa7c5e8add9660df2cd0eceaa214e7d59f2415c
|
[
"CC0-1.0"
] | 9
|
2021-01-15T13:47:53.000Z
|
2022-01-17T15:33:55.000Z
|
_anim/Eggman - Scrap Brain 2 & Final.asm
|
kodishmediacenter/msu-md-sonic
|
3aa7c5e8add9660df2cd0eceaa214e7d59f2415c
|
[
"CC0-1.0"
] | 7
|
2021-01-14T02:18:48.000Z
|
2021-03-24T15:44:30.000Z
|
_anim/Eggman - Scrap Brain 2 & Final.asm
|
kodishmediacenter/msu-md-sonic
|
3aa7c5e8add9660df2cd0eceaa214e7d59f2415c
|
[
"CC0-1.0"
] | 2
|
2021-01-14T13:14:26.000Z
|
2021-01-29T17:46:04.000Z
|
; ---------------------------------------------------------------------------
; Animation script - Eggman (SBZ2)
; ---------------------------------------------------------------------------
Ani_SEgg: dc.w @stand-Ani_SEgg
dc.w @laugh-Ani_SEgg
dc.w @jump1-Ani_SEgg
dc.w @intube-Ani_SEgg
dc.w @running-Ani_SEgg
dc.w @jump2-Ani_SEgg
dc.w @starjump-Ani_SEgg
@stand: dc.b $7E, 0, afEnd
even
@laugh: dc.b 6, 1, 2, afEnd
@jump1: dc.b $E, 3, 4, 4, 0, 0, 0, afEnd
@intube: dc.b 0, 5, 9, afEnd
@running: dc.b 6, 7, 4, 8, 4, afEnd
@jump2: dc.b $F, 4, 3, 3, afEnd
even
@starjump: dc.b $7E, 6, afEnd
even
| 30.65
| 77
| 0.469821
|
12df082ae02bf82becc623119fd4b1027c25ef7c
| 517
|
asm
|
Assembly
|
oeis/037/A037122.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/037/A037122.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/037/A037122.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A037122: Trajectory of 3 under map n->49n+1 if n odd, n->n/2 if n even
; Submitted by Jon Maiga
; 3,148,74,37,1814,907,44444,22222,11111,544440,272220,136110,68055,3334696,1667348,833674,416837,20425014,10212507,500412844,250206422,125103211,6130057340,3065028670,1532514335
add $0,1
mov $1,$0
mov $0,3
lpb $1
mov $2,$0
mod $2,2
add $3,1
sub $3,$2
mov $4,$0
lpb $2
mul $0,7
add $0,1
mul $0,7
sub $0,6
sub $2,1
lpe
lpb $3
div $0,2
sub $3,1
lpe
sub $1,1
lpe
mov $0,$4
| 18.464286
| 178
| 0.630561
|
b03550a23ccc5bce8670da9110852637379dfda4
| 3,070
|
asm
|
Assembly
|
KEK/Source/Macosx-amd64/Window.asm
|
MarcasRealAccount/VulkanInAssemblyWHYYYYY
|
6033f60c3803f63dc1b02e82205c374148be89dd
|
[
"MIT"
] | 3
|
2022-01-17T22:59:47.000Z
|
2022-01-29T15:56:13.000Z
|
KEK/Source/Macosx-amd64/Window.asm
|
MarcasRealAccount/VulkanInAssemblyWHYYYYY
|
6033f60c3803f63dc1b02e82205c374148be89dd
|
[
"MIT"
] | null | null | null |
KEK/Source/Macosx-amd64/Window.asm
|
MarcasRealAccount/VulkanInAssemblyWHYYYYY
|
6033f60c3803f63dc1b02e82205c374148be89dd
|
[
"MIT"
] | null | null | null |
%include "Common.asminc"
%if BUILD_IS_SYSTEM_MACOSX && BUILD_IS_PLATFORM_AMD64
%include "Macosx-amd64/LibC.asminc"
%include "Macosx-amd64/GLFW.asminc"
%include "Macosx-amd64/Logger.asminc"
%include "Macosx-amd64/Window.asminc"
extern _AppLogger
section .rodata
GLFWErrorFormat: db "GLFW (%d) => %s", 0
section .data
GlobalLabel _WindowCount, { dq 0 }
section .text
StaticLabel GLFWErrorCallback ; edi => errorCode, rsi => message
mov rdx, rdi
mov rcx, rsi
lea rdi, [GLFWErrorFormat]
lea rsi, [_AppLogger]
jmp _LoggerLogError
GlobalLabel _WindowAlloc
mov rdi, Window_size
jmp _malloc
GlobalLabel _WindowFree ; rdi => window
jmp _free
GlobalLabel _WindowCtor ; rdi => window, esi => width, edx => height, rcx => title
mov dword[rdi + Window.width], esi
mov dword[rdi + Window.height], edx
mov qword[rdi + Window.title], rcx
mov qword[rdi + Window.windowPtr], 0
ret
GlobalLabel _WindowDtor ; rdi => window
cmp qword[rdi + Window.windowPtr], 0
je .exit
jmp _WindowDestroy
.exit:
ret
GlobalLabel _WindowCreate ; rdi => window
cmp qword[rdi + Window.windowPtr], 0
je .continue
ret
.continue:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rsp], rdi
cmp qword[_WindowCount], 0
jne .skipInit
lea rdi, [GLFWErrorCallback]
call _glfwSetErrorCallback
call _glfwInit
cmp rax, 0
je .exit
.skipInit:
call _glfwDefaultWindowHints
mov edi, 22001h
mov esi, 0
call _glfwWindowHint
mov edi, 20003h
mov esi, 1
call _glfwWindowHint
mov rax, [rsp]
mov edi, [rax + Window.width]
mov esi, [rax + Window.height]
mov rdx, [rax + Window.title]
mov rcx, 0
mov r8, 0
call _glfwCreateWindow
cmp eax, 0
je .exit
mov rcx, [rsp]
mov [rcx + Window.windowPtr], rax
add qword[_WindowCount], 1
.exit:
mov rsp, rbp
pop rbp
ret
GlobalLabel _WindowDestroy ; rdi => window
cmp qword[rdi + Window.windowPtr], 0
jne .continue
ret
.continue:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rsp], rdi
mov rdi, [rdi + Window.windowPtr]
call _glfwDestroyWindow
mov rcx, [rsp]
mov qword[rcx + Window.windowPtr], 0
sub qword[_WindowCount], 1
cmp qword[_WindowCount], 0
jne .exit
call _glfwTerminate
.exit:
mov rsp, rbp
pop rbp
ret
GlobalLabel _WindowGetNative ; rdi => window
mov rax, [rdi + Window.windowPtr]
ret
GlobalLabel _WindowShouldClose ; rdi => window
mov rdi, [rdi + Window.windowPtr]
jmp _glfwWindowShouldClose
GlobalLabel _WindowsUpdate
jmp _glfwPollEvents
%endif
| 23.257576
| 86
| 0.571987
|
5c9177ed0390595d5cf18bc786161953f737f7d6
| 30,367
|
asm
|
Assembly
|
Palmtree.Math.Core.Implements/vs_build/x64_Debug/cpp_standard_headers_indexer.asm
|
rougemeilland/Palmtree.Math.Core.Implements
|
52f4f6c765d16c9b0baf1fd212c61a33daae138c
|
[
"MIT"
] | null | null | null |
Palmtree.Math.Core.Implements/vs_build/x64_Debug/cpp_standard_headers_indexer.asm
|
rougemeilland/Palmtree.Math.Core.Implements
|
52f4f6c765d16c9b0baf1fd212c61a33daae138c
|
[
"MIT"
] | null | null | null |
Palmtree.Math.Core.Implements/vs_build/x64_Debug/cpp_standard_headers_indexer.asm
|
rougemeilland/Palmtree.Math.Core.Implements
|
52f4f6c765d16c9b0baf1fd212c61a33daae138c
|
[
"MIT"
] | null | null | null |
; Listing generated by Microsoft (R) Optimizing Compiler Version 19.16.27026.1
include listing.inc
INCLUDELIB MSVCRTD
INCLUDELIB OLDNAMES
msvcjmc SEGMENT
__A73354DD_stdlib@h DB 01H
__188180DA_corecrt_math@h DB 01H
__D23EE329_cstdlib DB 01H
__6BC0FD35_vcruntime_new@h DB 01H
__5ECFF36E_type_traits DB 01H
__331E732B_malloc@h DB 01H
__9BB4E194_vcruntime_exception@h DB 01H
__7949CB39_exception DB 01H
__C42C8B73_vcruntime_typeinfo@h DB 01H
__3736D25A_xtgmath@h DB 01H
__824D367B_cmath DB 01H
__2CC6E67D_corecrt_stdio_config@h DB 01H
__05476D76_corecrt_wstdio@h DB 01H
__A452D4A0_stdio@h DB 01H
__4384A2D9_corecrt_memcpy_s@h DB 01H
__2088847F_corecrt_memory@h DB 01H
__4E51A221_corecrt_wstring@h DB 01H
__2140C079_string@h DB 01H
__41381B41_corecrt_wconio@h DB 01H
__F0CC4AC4_corecrt_wio@h DB 01H
__C0802A2B_corecrt_wtime@h DB 01H
__A40A425D_stat@h DB 01H
__5A74375D_wchar@h DB 01H
__B2D003D7_limits DB 01H
__7E39D651_iosfwd DB 01H
__CDB00636_xutility DB 01H
__C334353D_xatomic0@h DB 01H
__1CE3C767_xmemory0 DB 01H
__F007F164_stdexcept DB 01H
__7B7A869E_ctype@h DB 01H
__A2E616E7_xlocinfo DB 01H
__0E7E0F59_memory DB 01H
__223B5856_xfacet DB 01H
__244BF7CC_xlocale DB 01H
__420D52D3_xcall_once@h DB 01H
__FD5040F3_system_error DB 01H
__9B0361F4_xiosbase DB 01H
__BACC91DB_xlocnum DB 01H
__D1FEDD45_ios DB 01H
__7AAD89C5_string DB 01H
__246E2F3A_tuple DB 01H
__5905A80E_functional DB 01H
__04AA828A_time@h DB 01H
__938589ED_algorithm DB 01H
__4576A284_complex DB 01H
__035EEDC7_valarray DB 01H
__A2C368DB_fstream DB 01H
__3B61EF3D_strstream DB 01H
__91AE84E3_xlocmon DB 01H
__06FBBFF5_xloctime DB 01H
__084700B0_xlocmes DB 01H
__D0767A1C_cpp_standard_headers_indexer@cpp DB 01H
__A593FDF4_locale DB 01H
__FB7583FD_xstring DB 01H
__548B1832_istream DB 01H
__375B2D08_ostream DB 01H
__F2A749D8_streambuf DB 01H
__E53366A2_utility DB 01H
__122CF1B0_xstddef DB 01H
msvcjmc ENDS
PUBLIC ?__empty_global_delete@@YAXPEAX@Z ; __empty_global_delete
PUBLIC ?__empty_global_delete@@YAXPEAX_K@Z ; __empty_global_delete
PUBLIC wmemcpy
PUBLIC ??$_Maklocstr@_W@std@@YAPEA_WPEBDPEA_WAEBU_Cvtvec@@@Z ; std::_Maklocstr<wchar_t>
PUBLIC ?_Maklocwcs@std@@YAPEA_WPEB_W@Z ; std::_Maklocwcs
PUBLIC ??$_Getvals@_W@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IEAAX_WAEBV_Locinfo@1@@Z ; std::time_get<char,std::istreambuf_iterator<char,std::char_traits<char> > >::_Getvals<wchar_t>
PUBLIC ??$_Getvals@_W@?$time_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IEAAX_WAEBV_Locinfo@1@@Z ; std::time_get<wchar_t,std::istreambuf_iterator<wchar_t,std::char_traits<wchar_t> > >::_Getvals<wchar_t>
PUBLIC ??$_Maklocstr@D@std@@YAPEADPEBDPEADAEBU_Cvtvec@@@Z ; std::_Maklocstr<char>
PUBLIC __JustMyCode_Default
PUBLIC ??_C@_0GI@LKBGDILM@c?3?2program?5files?5?$CIx86?$CJ?2microsof@ ; `string'
PUBLIC ?__LINE__Var@?0??_Maklocwcs@std@@YAPEA_WPEB_W@Z@4JA ; `std::_Maklocwcs'::`1'::__LINE__Var
PUBLIC ??_C@_0GI@DJFLDKBN@c?3?2program?5files?5?$CIx86?$CJ?2microsof@ ; `string'
PUBLIC ??_C@_0N@LPFKKEBD@?3AM?3am?3PM?3pm@ ; `string'
PUBLIC ??_C@_1BK@MHIKGOKE@?$AA?3?$AAA?$AAM?$AA?3?$AAa?$AAm?$AA?3?$AAP?$AAM?$AA?3?$AAp?$AAm@ ; `string'
EXTRN __imp__calloc_dbg:PROC
EXTRN memcpy:PROC
EXTRN __imp_wcslen:PROC
EXTRN strlen:PROC
EXTRN ?_Xbad_alloc@std@@YAXXZ:PROC ; std::_Xbad_alloc
EXTRN _Mbrtowc:PROC
EXTRN __imp_?_Getcvt@_Locinfo@std@@QEBA?AU_Cvtvec@@XZ:PROC
EXTRN __imp_?_Getdays@_Locinfo@std@@QEBAPEBDXZ:PROC
EXTRN __imp_?_Getmonths@_Locinfo@std@@QEBAPEBDXZ:PROC
EXTRN __imp_?_W_Getdays@_Locinfo@std@@QEBAPEBGXZ:PROC
EXTRN __imp_?_W_Getmonths@_Locinfo@std@@QEBAPEBGXZ:PROC
EXTRN _RTC_CheckStackVars:PROC
EXTRN _RTC_InitBase:PROC
EXTRN _RTC_Shutdown:PROC
EXTRN __CheckForDebuggerJustMyCode:PROC
EXTRN __GSHandlerCheck:PROC
EXTRN __security_check_cookie:PROC
EXTRN __security_cookie:QWORD
; COMDAT pdata
pdata SEGMENT
$pdata$?__empty_global_delete@@YAXPEAX@Z DD imagerel $LN3
DD imagerel $LN3+64
DD imagerel $unwind$?__empty_global_delete@@YAXPEAX@Z
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$?__empty_global_delete@@YAXPEAX_K@Z DD imagerel $LN3
DD imagerel $LN3+69
DD imagerel $unwind$?__empty_global_delete@@YAXPEAX_K@Z
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$wmemcpy DD imagerel $LN3
DD imagerel $LN3+106
DD imagerel $unwind$wmemcpy
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$??$_Maklocstr@_W@std@@YAPEA_WPEBDPEA_WAEBU_Cvtvec@@@Z DD imagerel $LN12
DD imagerel $LN12+552
DD imagerel $unwind$??$_Maklocstr@_W@std@@YAPEA_WPEBDPEA_WAEBU_Cvtvec@@@Z
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$?_Maklocwcs@std@@YAPEA_WPEB_W@Z DD imagerel $LN4
DD imagerel $LN4+165
DD imagerel $unwind$?_Maklocwcs@std@@YAPEA_WPEB_W@Z
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$??$_Getvals@_W@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IEAAX_WAEBV_Locinfo@1@@Z DD imagerel $LN5
DD imagerel $LN5+411
DD imagerel $unwind$??$_Getvals@_W@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IEAAX_WAEBV_Locinfo@1@@Z
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$??$_Getvals@_W@?$time_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IEAAX_WAEBV_Locinfo@1@@Z DD imagerel $LN5
DD imagerel $LN5+411
DD imagerel $unwind$??$_Getvals@_W@?$time_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IEAAX_WAEBV_Locinfo@1@@Z
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$??$_Maklocstr@D@std@@YAPEADPEBDPEADAEBU_Cvtvec@@@Z DD imagerel $LN7
DD imagerel $LN7+223
DD imagerel $unwind$??$_Maklocstr@D@std@@YAPEADPEBDPEADAEBU_Cvtvec@@@Z
pdata ENDS
; COMDAT rtc$TMZ
rtc$TMZ SEGMENT
_RTC_Shutdown.rtc$TMZ DQ FLAT:_RTC_Shutdown
rtc$TMZ ENDS
; COMDAT rtc$IMZ
rtc$IMZ SEGMENT
_RTC_InitBase.rtc$IMZ DQ FLAT:_RTC_InitBase
rtc$IMZ ENDS
; COMDAT ??_C@_1BK@MHIKGOKE@?$AA?3?$AAA?$AAM?$AA?3?$AAa?$AAm?$AA?3?$AAP?$AAM?$AA?3?$AAp?$AAm@
CONST SEGMENT
??_C@_1BK@MHIKGOKE@?$AA?3?$AAA?$AAM?$AA?3?$AAa?$AAm?$AA?3?$AAP?$AAM?$AA?3?$AAp?$AAm@ DB ':'
DB 00H, 'A', 00H, 'M', 00H, ':', 00H, 'a', 00H, 'm', 00H, ':', 00H
DB 'P', 00H, 'M', 00H, ':', 00H, 'p', 00H, 'm', 00H, 00H, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0N@LPFKKEBD@?3AM?3am?3PM?3pm@
CONST SEGMENT
??_C@_0N@LPFKKEBD@?3AM?3am?3PM?3pm@ DB ':AM:am:PM:pm', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0GI@DJFLDKBN@c?3?2program?5files?5?$CIx86?$CJ?2microsof@
CONST SEGMENT
??_C@_0GI@DJFLDKBN@c?3?2program?5files?5?$CIx86?$CJ?2microsof@ DB 'c:\pro'
DB 'gram files (x86)\microsoft visual studio\2017\community\vc\to'
DB 'ols\msvc\14.16.27023\include\xlocnum', 00H ; `string'
CONST ENDS
; COMDAT ?__LINE__Var@?0??_Maklocwcs@std@@YAPEA_WPEB_W@Z@4JA
_DATA SEGMENT
?__LINE__Var@?0??_Maklocwcs@std@@YAPEA_WPEB_W@Z@4JA DD 061H ; `std::_Maklocwcs'::`1'::__LINE__Var
_DATA ENDS
; COMDAT ??_C@_0GI@LKBGDILM@c?3?2program?5files?5?$CIx86?$CJ?2microsof@
CONST SEGMENT
??_C@_0GI@LKBGDILM@c?3?2program?5files?5?$CIx86?$CJ?2microsof@ DB 'c:\pro'
DB 'gram files (x86)\microsoft visual studio\2017\community\vc\to'
DB 'ols\msvc\14.16.27023\include\xlocale', 00H ; `string'
CONST ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$??$_Maklocstr@D@std@@YAPEADPEBDPEADAEBU_Cvtvec@@@Z DD 035053401H
DD 0118331dH
DD 07011002bH
DD 05010H
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$??$_Getvals@_W@?$time_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IEAAX_WAEBV_Locinfo@1@@Z DD 025064619H
DD 0119231eH
DD 070120028H
DD 050106011H
DD imagerel __GSHandlerCheck
DD 0130H
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$??$_Getvals@_W@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IEAAX_WAEBV_Locinfo@1@@Z DD 025064619H
DD 0119231eH
DD 070120028H
DD 050106011H
DD imagerel __GSHandlerCheck
DD 0130H
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$?_Maklocwcs@std@@YAPEA_WPEB_W@Z DD 035052a01H
DD 010e3313H
DD 070070027H
DD 05006H
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$??$_Maklocstr@_W@std@@YAPEA_WPEBDPEA_WAEBU_Cvtvec@@@Z DD 035053401H
DD 0118331dH
DD 070110047H
DD 05010H
xdata ENDS
; COMDAT CONST
CONST SEGMENT
??$_Maklocstr@_W@std@@YAPEA_WPEBDPEA_WAEBU_Cvtvec@@@Z$rtcName$0 DB 05fH ; std::_Maklocstr<wchar_t>
DB 057H
DB 063H
DB 00H
??$_Maklocstr@_W@std@@YAPEA_WPEBDPEA_WAEBU_Cvtvec@@@Z$rtcName$1 DB 05fH ; std::_Maklocstr<wchar_t>
DB 04dH
DB 062H
DB 073H
DB 074H
DB 031H
DB 00H
ORG $+1
??$_Maklocstr@_W@std@@YAPEA_WPEBDPEA_WAEBU_Cvtvec@@@Z$rtcName$2 DB 05fH ; std::_Maklocstr<wchar_t>
DB 04dH
DB 062H
DB 073H
DB 074H
DB 032H
DB 00H
ORG $+13
??$_Maklocstr@_W@std@@YAPEA_WPEBDPEA_WAEBU_Cvtvec@@@Z$rtcVarDesc DD 0158H ; std::_Maklocstr<wchar_t>
DD 08H
DQ FLAT:??$_Maklocstr@_W@std@@YAPEA_WPEBDPEA_WAEBU_Cvtvec@@@Z$rtcName$2
DD 0f8H
DD 08H
DQ FLAT:??$_Maklocstr@_W@std@@YAPEA_WPEBDPEA_WAEBU_Cvtvec@@@Z$rtcName$1
DD 0d4H
DD 02H
DQ FLAT:??$_Maklocstr@_W@std@@YAPEA_WPEBDPEA_WAEBU_Cvtvec@@@Z$rtcName$0
ORG $+144
??$_Maklocstr@_W@std@@YAPEA_WPEBDPEA_WAEBU_Cvtvec@@@Z$rtcFrameData DD 03H ; std::_Maklocstr<wchar_t>
DD 00H
DQ FLAT:??$_Maklocstr@_W@std@@YAPEA_WPEBDPEA_WAEBU_Cvtvec@@@Z$rtcVarDesc
CONST ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$wmemcpy DD 025053401H
DD 0118231dH
DD 07011001dH
DD 05010H
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$?__empty_global_delete@@YAXPEAX_K@Z DD 025052f01H
DD 01132318H
DD 0700c001dH
DD 0500bH
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$?__empty_global_delete@@YAXPEAX@Z DD 025052a01H
DD 010e2313H
DD 07007001dH
DD 05006H
xdata ENDS
; Function compile flags: /Odt
; COMDAT __JustMyCode_Default
_TEXT SEGMENT
__JustMyCode_Default PROC ; COMDAT
ret 0
__JustMyCode_Default ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\include\xlocale
; COMDAT ??$_Maklocstr@D@std@@YAPEADPEBDPEADAEBU_Cvtvec@@@Z
_TEXT SEGMENT
_Count$ = 8
_Ptrdest$ = 40
_Ptrnext$1 = 72
_Ptr$ = 320
__formal$ = 328
__formal$ = 336
??$_Maklocstr@D@std@@YAPEADPEBDPEADAEBU_Cvtvec@@@Z PROC ; std::_Maklocstr<char>, COMDAT
; 664 : { // convert C string to _Elem sequence using _Cvtvec
$LN7:
mov QWORD PTR [rsp+24], r8
mov QWORD PTR [rsp+16], rdx
mov QWORD PTR [rsp+8], rcx
push rbp
push rdi
sub rsp, 344 ; 00000158H
lea rbp, QWORD PTR [rsp+48]
mov rdi, rsp
mov ecx, 86 ; 00000056H
mov eax, -858993460 ; ccccccccH
rep stosd
mov rcx, QWORD PTR [rsp+376]
lea rcx, OFFSET FLAT:__244BF7CC_xlocale
call __CheckForDebuggerJustMyCode
; 665 : size_t _Count = _CSTD strlen(_Ptr) + 1;
mov rcx, QWORD PTR _Ptr$[rbp]
call strlen
inc rax
mov QWORD PTR _Count$[rbp], rax
; 666 :
; 667 : _Elem *_Ptrdest = (_Elem *)_calloc_dbg(_Count, sizeof (_Elem),
mov DWORD PTR [rsp+32], 668 ; 0000029cH
lea r9, OFFSET FLAT:??_C@_0GI@LKBGDILM@c?3?2program?5files?5?$CIx86?$CJ?2microsof@
mov r8d, 2
mov edx, 1
mov rcx, QWORD PTR _Count$[rbp]
call QWORD PTR __imp__calloc_dbg
mov QWORD PTR _Ptrdest$[rbp], rax
; 668 : _CRT_BLOCK, __FILE__, __LINE__);
; 669 :
; 670 : if (!_Ptrdest)
cmp QWORD PTR _Ptrdest$[rbp], 0
jne SHORT $LN5@Maklocstr
; 671 : _Xbad_alloc();
call ?_Xbad_alloc@std@@YAXXZ ; std::_Xbad_alloc
$LN5@Maklocstr:
; 672 :
; 673 : for (_Elem *_Ptrnext = _Ptrdest; 0 < _Count; --_Count, ++_Ptrnext, ++_Ptr)
mov rax, QWORD PTR _Ptrdest$[rbp]
mov QWORD PTR _Ptrnext$1[rbp], rax
jmp SHORT $LN4@Maklocstr
$LN2@Maklocstr:
mov rax, QWORD PTR _Count$[rbp]
dec rax
mov QWORD PTR _Count$[rbp], rax
mov rax, QWORD PTR _Ptrnext$1[rbp]
inc rax
mov QWORD PTR _Ptrnext$1[rbp], rax
mov rax, QWORD PTR _Ptr$[rbp]
inc rax
mov QWORD PTR _Ptr$[rbp], rax
$LN4@Maklocstr:
cmp QWORD PTR _Count$[rbp], 0
jbe SHORT $LN3@Maklocstr
; 674 : *_Ptrnext = (_Elem)(unsigned char)*_Ptr;
mov rax, QWORD PTR _Ptrnext$1[rbp]
mov rcx, QWORD PTR _Ptr$[rbp]
movzx ecx, BYTE PTR [rcx]
mov BYTE PTR [rax], cl
jmp SHORT $LN2@Maklocstr
$LN3@Maklocstr:
; 675 :
; 676 : return (_Ptrdest);
mov rax, QWORD PTR _Ptrdest$[rbp]
$LN6@Maklocstr:
; 677 : }
lea rsp, QWORD PTR [rbp+296]
pop rdi
pop rbp
ret 0
??$_Maklocstr@D@std@@YAPEADPEBDPEADAEBU_Cvtvec@@@Z ENDP ; std::_Maklocstr<char>
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\include\xloctime
; COMDAT ??$_Getvals@_W@?$time_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IEAAX_WAEBV_Locinfo@1@@Z
_TEXT SEGMENT
$T1 = 200
tv93 = 264
tv85 = 264
__$ArrayPad$ = 272
this$ = 320
__formal$ = 328
_Lobj$ = 336
??$_Getvals@_W@?$time_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IEAAX_WAEBV_Locinfo@1@@Z PROC ; std::time_get<wchar_t,std::istreambuf_iterator<wchar_t,std::char_traits<wchar_t> > >::_Getvals<wchar_t>, COMDAT
; 216 : { // get values
$LN5:
mov QWORD PTR [rsp+24], r8
mov WORD PTR [rsp+16], dx
mov QWORD PTR [rsp+8], rcx
push rbp
push rsi
push rdi
sub rsp, 320 ; 00000140H
lea rbp, QWORD PTR [rsp+32]
mov rdi, rsp
mov ecx, 80 ; 00000050H
mov eax, -858993460 ; ccccccccH
rep stosd
mov rcx, QWORD PTR [rsp+360]
mov rax, QWORD PTR __security_cookie
xor rax, rbp
mov QWORD PTR __$ArrayPad$[rbp], rax
lea rcx, OFFSET FLAT:__06FBBFF5_xloctime
call __CheckForDebuggerJustMyCode
; 217 : _Cvt = _Lobj._Getcvt();
lea rdx, QWORD PTR $T1[rbp]
mov rcx, QWORD PTR _Lobj$[rbp]
call QWORD PTR __imp_?_Getcvt@_Locinfo@std@@QEBA?AU_Cvtvec@@XZ
mov rcx, QWORD PTR this$[rbp]
lea rdi, QWORD PTR [rcx+44]
mov rsi, rax
mov ecx, 44 ; 0000002cH
rep movsb
; 218 :
; 219 : if (is_same_v<_Elem2, wchar_t>)
xor eax, eax
cmp eax, 1
je SHORT $LN2@Getvals
; 220 : {
; 221 : _Days = (const _Elem *)_Maklocwcs((const wchar_t *)_Lobj._W_Getdays());
mov rcx, QWORD PTR _Lobj$[rbp]
call QWORD PTR __imp_?_W_Getdays@_Locinfo@std@@QEBAPEBGXZ
mov rcx, rax
call ?_Maklocwcs@std@@YAPEA_WPEB_W@Z ; std::_Maklocwcs
mov rcx, QWORD PTR this$[rbp]
mov QWORD PTR [rcx+16], rax
; 222 : _Months = (const _Elem *)_Maklocwcs((const wchar_t *)_Lobj._W_Getmonths());
mov rcx, QWORD PTR _Lobj$[rbp]
call QWORD PTR __imp_?_W_Getmonths@_Locinfo@std@@QEBAPEBGXZ
mov rcx, rax
call ?_Maklocwcs@std@@YAPEA_WPEB_W@Z ; std::_Maklocwcs
mov rcx, QWORD PTR this$[rbp]
mov QWORD PTR [rcx+24], rax
; 223 : _Ampm = (const _Elem *)_Maklocwcs(L":AM:am:PM:pm");
lea rcx, OFFSET FLAT:??_C@_1BK@MHIKGOKE@?$AA?3?$AAA?$AAM?$AA?3?$AAa?$AAm?$AA?3?$AAP?$AAM?$AA?3?$AAp?$AAm@
call ?_Maklocwcs@std@@YAPEA_WPEB_W@Z ; std::_Maklocwcs
mov rcx, QWORD PTR this$[rbp]
mov QWORD PTR [rcx+32], rax
; 224 : }
; 225 : else
jmp $LN3@Getvals
$LN2@Getvals:
; 226 : {
; 227 : _Days = _Maklocstr(_Lobj._Getdays(), static_cast<_Elem *>(nullptr), _Cvt);
mov rax, QWORD PTR this$[rbp]
add rax, 44 ; 0000002cH
mov QWORD PTR tv85[rbp], rax
mov rcx, QWORD PTR _Lobj$[rbp]
call QWORD PTR __imp_?_Getdays@_Locinfo@std@@QEBAPEBDXZ
mov rcx, QWORD PTR tv85[rbp]
mov r8, rcx
xor edx, edx
mov rcx, rax
call ??$_Maklocstr@_W@std@@YAPEA_WPEBDPEA_WAEBU_Cvtvec@@@Z ; std::_Maklocstr<wchar_t>
mov rcx, QWORD PTR this$[rbp]
mov QWORD PTR [rcx+16], rax
; 228 : _Months = _Maklocstr(_Lobj._Getmonths(), static_cast<_Elem *>(nullptr), _Cvt);
mov rax, QWORD PTR this$[rbp]
add rax, 44 ; 0000002cH
mov QWORD PTR tv93[rbp], rax
mov rcx, QWORD PTR _Lobj$[rbp]
call QWORD PTR __imp_?_Getmonths@_Locinfo@std@@QEBAPEBDXZ
mov rcx, QWORD PTR tv93[rbp]
mov r8, rcx
xor edx, edx
mov rcx, rax
call ??$_Maklocstr@_W@std@@YAPEA_WPEBDPEA_WAEBU_Cvtvec@@@Z ; std::_Maklocstr<wchar_t>
mov rcx, QWORD PTR this$[rbp]
mov QWORD PTR [rcx+24], rax
; 229 : _Ampm = _Maklocstr(":AM:am:PM:pm", static_cast<_Elem *>(nullptr), _Cvt);
mov rax, QWORD PTR this$[rbp]
add rax, 44 ; 0000002cH
mov r8, rax
xor edx, edx
lea rcx, OFFSET FLAT:??_C@_0N@LPFKKEBD@?3AM?3am?3PM?3pm@
call ??$_Maklocstr@_W@std@@YAPEA_WPEBDPEA_WAEBU_Cvtvec@@@Z ; std::_Maklocstr<wchar_t>
mov rcx, QWORD PTR this$[rbp]
mov QWORD PTR [rcx+32], rax
$LN3@Getvals:
; 230 : }
; 231 : }
mov rcx, QWORD PTR __$ArrayPad$[rbp]
xor rcx, rbp
call __security_check_cookie
lea rsp, QWORD PTR [rbp+288]
pop rdi
pop rsi
pop rbp
ret 0
??$_Getvals@_W@?$time_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IEAAX_WAEBV_Locinfo@1@@Z ENDP ; std::time_get<wchar_t,std::istreambuf_iterator<wchar_t,std::char_traits<wchar_t> > >::_Getvals<wchar_t>
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\include\xloctime
; COMDAT ??$_Getvals@_W@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IEAAX_WAEBV_Locinfo@1@@Z
_TEXT SEGMENT
$T1 = 200
tv93 = 264
tv85 = 264
__$ArrayPad$ = 272
this$ = 320
__formal$ = 328
_Lobj$ = 336
??$_Getvals@_W@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IEAAX_WAEBV_Locinfo@1@@Z PROC ; std::time_get<char,std::istreambuf_iterator<char,std::char_traits<char> > >::_Getvals<wchar_t>, COMDAT
; 216 : { // get values
$LN5:
mov QWORD PTR [rsp+24], r8
mov WORD PTR [rsp+16], dx
mov QWORD PTR [rsp+8], rcx
push rbp
push rsi
push rdi
sub rsp, 320 ; 00000140H
lea rbp, QWORD PTR [rsp+32]
mov rdi, rsp
mov ecx, 80 ; 00000050H
mov eax, -858993460 ; ccccccccH
rep stosd
mov rcx, QWORD PTR [rsp+360]
mov rax, QWORD PTR __security_cookie
xor rax, rbp
mov QWORD PTR __$ArrayPad$[rbp], rax
lea rcx, OFFSET FLAT:__06FBBFF5_xloctime
call __CheckForDebuggerJustMyCode
; 217 : _Cvt = _Lobj._Getcvt();
lea rdx, QWORD PTR $T1[rbp]
mov rcx, QWORD PTR _Lobj$[rbp]
call QWORD PTR __imp_?_Getcvt@_Locinfo@std@@QEBA?AU_Cvtvec@@XZ
mov rcx, QWORD PTR this$[rbp]
lea rdi, QWORD PTR [rcx+44]
mov rsi, rax
mov ecx, 44 ; 0000002cH
rep movsb
; 218 :
; 219 : if (is_same_v<_Elem2, wchar_t>)
xor eax, eax
cmp eax, 1
je SHORT $LN2@Getvals
; 220 : {
; 221 : _Days = (const _Elem *)_Maklocwcs((const wchar_t *)_Lobj._W_Getdays());
mov rcx, QWORD PTR _Lobj$[rbp]
call QWORD PTR __imp_?_W_Getdays@_Locinfo@std@@QEBAPEBGXZ
mov rcx, rax
call ?_Maklocwcs@std@@YAPEA_WPEB_W@Z ; std::_Maklocwcs
mov rcx, QWORD PTR this$[rbp]
mov QWORD PTR [rcx+16], rax
; 222 : _Months = (const _Elem *)_Maklocwcs((const wchar_t *)_Lobj._W_Getmonths());
mov rcx, QWORD PTR _Lobj$[rbp]
call QWORD PTR __imp_?_W_Getmonths@_Locinfo@std@@QEBAPEBGXZ
mov rcx, rax
call ?_Maklocwcs@std@@YAPEA_WPEB_W@Z ; std::_Maklocwcs
mov rcx, QWORD PTR this$[rbp]
mov QWORD PTR [rcx+24], rax
; 223 : _Ampm = (const _Elem *)_Maklocwcs(L":AM:am:PM:pm");
lea rcx, OFFSET FLAT:??_C@_1BK@MHIKGOKE@?$AA?3?$AAA?$AAM?$AA?3?$AAa?$AAm?$AA?3?$AAP?$AAM?$AA?3?$AAp?$AAm@
call ?_Maklocwcs@std@@YAPEA_WPEB_W@Z ; std::_Maklocwcs
mov rcx, QWORD PTR this$[rbp]
mov QWORD PTR [rcx+32], rax
; 224 : }
; 225 : else
jmp $LN3@Getvals
$LN2@Getvals:
; 226 : {
; 227 : _Days = _Maklocstr(_Lobj._Getdays(), static_cast<_Elem *>(nullptr), _Cvt);
mov rax, QWORD PTR this$[rbp]
add rax, 44 ; 0000002cH
mov QWORD PTR tv85[rbp], rax
mov rcx, QWORD PTR _Lobj$[rbp]
call QWORD PTR __imp_?_Getdays@_Locinfo@std@@QEBAPEBDXZ
mov rcx, QWORD PTR tv85[rbp]
mov r8, rcx
xor edx, edx
mov rcx, rax
call ??$_Maklocstr@D@std@@YAPEADPEBDPEADAEBU_Cvtvec@@@Z ; std::_Maklocstr<char>
mov rcx, QWORD PTR this$[rbp]
mov QWORD PTR [rcx+16], rax
; 228 : _Months = _Maklocstr(_Lobj._Getmonths(), static_cast<_Elem *>(nullptr), _Cvt);
mov rax, QWORD PTR this$[rbp]
add rax, 44 ; 0000002cH
mov QWORD PTR tv93[rbp], rax
mov rcx, QWORD PTR _Lobj$[rbp]
call QWORD PTR __imp_?_Getmonths@_Locinfo@std@@QEBAPEBDXZ
mov rcx, QWORD PTR tv93[rbp]
mov r8, rcx
xor edx, edx
mov rcx, rax
call ??$_Maklocstr@D@std@@YAPEADPEBDPEADAEBU_Cvtvec@@@Z ; std::_Maklocstr<char>
mov rcx, QWORD PTR this$[rbp]
mov QWORD PTR [rcx+24], rax
; 229 : _Ampm = _Maklocstr(":AM:am:PM:pm", static_cast<_Elem *>(nullptr), _Cvt);
mov rax, QWORD PTR this$[rbp]
add rax, 44 ; 0000002cH
mov r8, rax
xor edx, edx
lea rcx, OFFSET FLAT:??_C@_0N@LPFKKEBD@?3AM?3am?3PM?3pm@
call ??$_Maklocstr@D@std@@YAPEADPEBDPEADAEBU_Cvtvec@@@Z ; std::_Maklocstr<char>
mov rcx, QWORD PTR this$[rbp]
mov QWORD PTR [rcx+32], rax
$LN3@Getvals:
; 230 : }
; 231 : }
mov rcx, QWORD PTR __$ArrayPad$[rbp]
xor rcx, rbp
call __security_check_cookie
lea rsp, QWORD PTR [rbp+288]
pop rdi
pop rsi
pop rbp
ret 0
??$_Getvals@_W@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IEAAX_WAEBV_Locinfo@1@@Z ENDP ; std::time_get<char,std::istreambuf_iterator<char,std::char_traits<char> > >::_Getvals<wchar_t>
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\include\xlocnum
; COMDAT ?_Maklocwcs@std@@YAPEA_WPEB_W@Z
_TEXT SEGMENT
_Count$ = 8
_Ptrdest$ = 40
_Ptr$ = 288
?_Maklocwcs@std@@YAPEA_WPEB_W@Z PROC ; std::_Maklocwcs, COMDAT
; 97 : { // copy NTWCS to allocated storage
$LN4:
mov QWORD PTR [rsp+8], rcx
push rbp
push rdi
sub rsp, 312 ; 00000138H
lea rbp, QWORD PTR [rsp+48]
mov rdi, rsp
mov ecx, 78 ; 0000004eH
mov eax, -858993460 ; ccccccccH
rep stosd
mov rcx, QWORD PTR [rsp+344]
lea rcx, OFFSET FLAT:__BACC91DB_xlocnum
call __CheckForDebuggerJustMyCode
; 98 : const size_t _Count = _CSTD wcslen(_Ptr) + 1;
mov rcx, QWORD PTR _Ptr$[rbp]
call QWORD PTR __imp_wcslen
inc rax
mov QWORD PTR _Count$[rbp], rax
; 99 :
; 100 : wchar_t *_Ptrdest = (wchar_t *)_calloc_dbg(_Count, sizeof (wchar_t),
mov eax, DWORD PTR ?__LINE__Var@?0??_Maklocwcs@std@@YAPEA_WPEB_W@Z@4JA
add eax, 4
mov DWORD PTR [rsp+32], eax
lea r9, OFFSET FLAT:??_C@_0GI@DJFLDKBN@c?3?2program?5files?5?$CIx86?$CJ?2microsof@
mov r8d, 2
mov edx, 2
mov rcx, QWORD PTR _Count$[rbp]
call QWORD PTR __imp__calloc_dbg
mov QWORD PTR _Ptrdest$[rbp], rax
; 101 : _CRT_BLOCK, __FILE__, __LINE__);
; 102 :
; 103 : if (!_Ptrdest)
cmp QWORD PTR _Ptrdest$[rbp], 0
jne SHORT $LN2@Maklocwcs
; 104 : _Xbad_alloc();
call ?_Xbad_alloc@std@@YAXXZ ; std::_Xbad_alloc
$LN2@Maklocwcs:
; 105 : _CSTD wmemcpy(_Ptrdest, _Ptr, _Count);
mov r8, QWORD PTR _Count$[rbp]
mov rdx, QWORD PTR _Ptr$[rbp]
mov rcx, QWORD PTR _Ptrdest$[rbp]
call wmemcpy
; 106 : return (_Ptrdest);
mov rax, QWORD PTR _Ptrdest$[rbp]
$LN3@Maklocwcs:
; 107 : }
lea rsp, QWORD PTR [rbp+264]
pop rdi
pop rbp
ret 0
?_Maklocwcs@std@@YAPEA_WPEB_W@Z ENDP ; std::_Maklocwcs
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\include\xlocale
; COMDAT ??$_Maklocstr@_W@std@@YAPEA_WPEBDPEA_WAEBU_Cvtvec@@@Z
_TEXT SEGMENT
_Count$ = 8
_Count1$ = 40
_Wchars$ = 72
_Ptr1$ = 104
_Bytes$ = 132
_Wc$ = 164
_Mbst1$ = 200
_Ptrdest$ = 232
_Ptrnext$ = 264
_Mbst2$ = 296
_Ptr$ = 544
__formal$ = 552
_Cvt$ = 560
??$_Maklocstr@_W@std@@YAPEA_WPEBDPEA_WAEBU_Cvtvec@@@Z PROC ; std::_Maklocstr<wchar_t>, COMDAT
; 682 : { // convert C string to wchar_t sequence using _Cvtvec
$LN12:
mov QWORD PTR [rsp+24], r8
mov QWORD PTR [rsp+16], rdx
mov QWORD PTR [rsp+8], rcx
push rbp
push rdi
sub rsp, 568 ; 00000238H
lea rbp, QWORD PTR [rsp+48]
mov rdi, rsp
mov ecx, 142 ; 0000008eH
mov eax, -858993460 ; ccccccccH
rep stosd
mov rcx, QWORD PTR [rsp+600]
lea rcx, OFFSET FLAT:__244BF7CC_xlocale
call __CheckForDebuggerJustMyCode
; 683 : size_t _Count, _Count1;
; 684 : size_t _Wchars;
; 685 : const char *_Ptr1;
; 686 : int _Bytes;
; 687 : wchar_t _Wc;
; 688 : mbstate_t _Mbst1 = {};
lea rax, QWORD PTR _Mbst1$[rbp]
mov rdi, rax
xor eax, eax
mov ecx, 8
rep stosb
; 689 :
; 690 : _Count1 = _CSTD strlen(_Ptr) + 1;
mov rcx, QWORD PTR _Ptr$[rbp]
call strlen
inc rax
mov QWORD PTR _Count1$[rbp], rax
; 691 : for (_Count = _Count1, _Wchars = 0, _Ptr1 = _Ptr; 0 < _Count;
mov rax, QWORD PTR _Count1$[rbp]
mov QWORD PTR _Count$[rbp], rax
mov QWORD PTR _Wchars$[rbp], 0
mov rax, QWORD PTR _Ptr$[rbp]
mov QWORD PTR _Ptr1$[rbp], rax
jmp SHORT $LN4@Maklocstr
$LN2@Maklocstr:
; 692 : _Count -= _Bytes, _Ptr1 += _Bytes, ++_Wchars)
movsxd rax, DWORD PTR _Bytes$[rbp]
mov rcx, QWORD PTR _Count$[rbp]
sub rcx, rax
mov rax, rcx
mov QWORD PTR _Count$[rbp], rax
movsxd rax, DWORD PTR _Bytes$[rbp]
mov rcx, QWORD PTR _Ptr1$[rbp]
add rcx, rax
mov rax, rcx
mov QWORD PTR _Ptr1$[rbp], rax
mov rax, QWORD PTR _Wchars$[rbp]
inc rax
mov QWORD PTR _Wchars$[rbp], rax
$LN4@Maklocstr:
; 691 : for (_Count = _Count1, _Wchars = 0, _Ptr1 = _Ptr; 0 < _Count;
cmp QWORD PTR _Count$[rbp], 0
jbe SHORT $LN3@Maklocstr
; 693 : if ((_Bytes = _Mbrtowc(&_Wc, _Ptr1, _Count, &_Mbst1, &_Cvt)) <= 0)
mov rax, QWORD PTR _Cvt$[rbp]
mov QWORD PTR [rsp+32], rax
lea r9, QWORD PTR _Mbst1$[rbp]
mov r8, QWORD PTR _Count$[rbp]
mov rdx, QWORD PTR _Ptr1$[rbp]
lea rcx, QWORD PTR _Wc$[rbp]
call _Mbrtowc
mov DWORD PTR _Bytes$[rbp], eax
cmp DWORD PTR _Bytes$[rbp], 0
jg SHORT $LN8@Maklocstr
; 694 : break;
jmp SHORT $LN3@Maklocstr
$LN8@Maklocstr:
; 695 : ++_Wchars; // count terminating nul
jmp SHORT $LN2@Maklocstr
$LN3@Maklocstr:
mov rax, QWORD PTR _Wchars$[rbp]
inc rax
mov QWORD PTR _Wchars$[rbp], rax
; 696 :
; 697 : wchar_t *_Ptrdest = (wchar_t *)_calloc_dbg(_Wchars, sizeof (wchar_t),
mov DWORD PTR [rsp+32], 698 ; 000002baH
lea r9, OFFSET FLAT:??_C@_0GI@LKBGDILM@c?3?2program?5files?5?$CIx86?$CJ?2microsof@
mov r8d, 2
mov edx, 2
mov rcx, QWORD PTR _Wchars$[rbp]
call QWORD PTR __imp__calloc_dbg
mov QWORD PTR _Ptrdest$[rbp], rax
; 698 : _CRT_BLOCK, __FILE__, __LINE__);
; 699 :
; 700 : if (!_Ptrdest)
cmp QWORD PTR _Ptrdest$[rbp], 0
jne SHORT $LN9@Maklocstr
; 701 : _Xbad_alloc();
call ?_Xbad_alloc@std@@YAXXZ ; std::_Xbad_alloc
$LN9@Maklocstr:
; 702 : wchar_t *_Ptrnext = _Ptrdest;
mov rax, QWORD PTR _Ptrdest$[rbp]
mov QWORD PTR _Ptrnext$[rbp], rax
; 703 : mbstate_t _Mbst2 = {};
lea rax, QWORD PTR _Mbst2$[rbp]
mov rdi, rax
xor eax, eax
mov ecx, 8
rep stosb
; 704 :
; 705 : for (; 0 < _Wchars;
jmp SHORT $LN7@Maklocstr
$LN5@Maklocstr:
; 706 : _Count -= _Bytes, _Ptr += _Bytes, --_Wchars, ++_Ptrnext)
movsxd rax, DWORD PTR _Bytes$[rbp]
mov rcx, QWORD PTR _Count$[rbp]
sub rcx, rax
mov rax, rcx
mov QWORD PTR _Count$[rbp], rax
movsxd rax, DWORD PTR _Bytes$[rbp]
mov rcx, QWORD PTR _Ptr$[rbp]
add rcx, rax
mov rax, rcx
mov QWORD PTR _Ptr$[rbp], rax
mov rax, QWORD PTR _Wchars$[rbp]
dec rax
mov QWORD PTR _Wchars$[rbp], rax
mov rax, QWORD PTR _Ptrnext$[rbp]
add rax, 2
mov QWORD PTR _Ptrnext$[rbp], rax
$LN7@Maklocstr:
; 704 :
; 705 : for (; 0 < _Wchars;
cmp QWORD PTR _Wchars$[rbp], 0
jbe SHORT $LN6@Maklocstr
; 707 : if ((_Bytes = _Mbrtowc(_Ptrnext, _Ptr, _Count1, &_Mbst2, &_Cvt)) <= 0)
mov rax, QWORD PTR _Cvt$[rbp]
mov QWORD PTR [rsp+32], rax
lea r9, QWORD PTR _Mbst2$[rbp]
mov r8, QWORD PTR _Count1$[rbp]
mov rdx, QWORD PTR _Ptr$[rbp]
mov rcx, QWORD PTR _Ptrnext$[rbp]
call _Mbrtowc
mov DWORD PTR _Bytes$[rbp], eax
cmp DWORD PTR _Bytes$[rbp], 0
jg SHORT $LN10@Maklocstr
; 708 : break;
jmp SHORT $LN6@Maklocstr
$LN10@Maklocstr:
; 709 : *_Ptrnext = L'\0';
jmp $LN5@Maklocstr
$LN6@Maklocstr:
xor eax, eax
mov rcx, QWORD PTR _Ptrnext$[rbp]
mov WORD PTR [rcx], ax
; 710 :
; 711 : return (_Ptrdest);
mov rax, QWORD PTR _Ptrdest$[rbp]
$LN11@Maklocstr:
; 712 : }
mov rdi, rax
lea rcx, QWORD PTR [rbp-48]
lea rdx, OFFSET FLAT:??$_Maklocstr@_W@std@@YAPEA_WPEBDPEA_WAEBU_Cvtvec@@@Z$rtcFrameData
call _RTC_CheckStackVars
mov rax, rdi
lea rsp, QWORD PTR [rbp+520]
pop rdi
pop rbp
ret 0
??$_Maklocstr@_W@std@@YAPEA_WPEBDPEA_WAEBU_Cvtvec@@@Z ENDP ; std::_Maklocstr<wchar_t>
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File c:\program files (x86)\windows kits\10\include\10.0.17763.0\ucrt\wchar.h
; COMDAT wmemcpy
_TEXT SEGMENT
_S1$ = 224
_S2$ = 232
_N$ = 240
wmemcpy PROC ; COMDAT
; 230 : {
$LN3:
mov QWORD PTR [rsp+24], r8
mov QWORD PTR [rsp+16], rdx
mov QWORD PTR [rsp+8], rcx
push rbp
push rdi
sub rsp, 232 ; 000000e8H
lea rbp, QWORD PTR [rsp+32]
mov rdi, rsp
mov ecx, 58 ; 0000003aH
mov eax, -858993460 ; ccccccccH
rep stosd
mov rcx, QWORD PTR [rsp+264]
lea rcx, OFFSET FLAT:__5A74375D_wchar@h
call __CheckForDebuggerJustMyCode
; 231 : #pragma warning(push)
; 232 : #pragma warning(disable : 4995 4996 6386)
; 233 : return (wchar_t*)memcpy(_S1, _S2, _N*sizeof(wchar_t));
mov rax, QWORD PTR _N$[rbp]
shl rax, 1
mov r8, rax
mov rdx, QWORD PTR _S2$[rbp]
mov rcx, QWORD PTR _S1$[rbp]
call memcpy
; 234 : #pragma warning(pop)
; 235 : }
lea rsp, QWORD PTR [rbp+200]
pop rdi
pop rbp
ret 0
wmemcpy ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\nbproject\private\cpp_standard_headers_indexer.cpp
; COMDAT ?__empty_global_delete@@YAXPEAX_K@Z
_TEXT SEGMENT
__formal$ = 224
__formal$ = 232
?__empty_global_delete@@YAXPEAX_K@Z PROC ; __empty_global_delete, COMDAT
$LN3:
mov QWORD PTR [rsp+16], rdx
mov QWORD PTR [rsp+8], rcx
push rbp
push rdi
sub rsp, 232 ; 000000e8H
lea rbp, QWORD PTR [rsp+32]
mov rdi, rsp
mov ecx, 58 ; 0000003aH
mov eax, -858993460 ; ccccccccH
rep stosd
mov rcx, QWORD PTR [rsp+264]
lea rcx, OFFSET FLAT:__D0767A1C_cpp_standard_headers_indexer@cpp
call __CheckForDebuggerJustMyCode
lea rsp, QWORD PTR [rbp+200]
pop rdi
pop rbp
ret 0
?__empty_global_delete@@YAXPEAX_K@Z ENDP ; __empty_global_delete
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\nbproject\private\cpp_standard_headers_indexer.cpp
; COMDAT ?__empty_global_delete@@YAXPEAX@Z
_TEXT SEGMENT
__formal$ = 224
?__empty_global_delete@@YAXPEAX@Z PROC ; __empty_global_delete, COMDAT
$LN3:
mov QWORD PTR [rsp+8], rcx
push rbp
push rdi
sub rsp, 232 ; 000000e8H
lea rbp, QWORD PTR [rsp+32]
mov rdi, rsp
mov ecx, 58 ; 0000003aH
mov eax, -858993460 ; ccccccccH
rep stosd
mov rcx, QWORD PTR [rsp+264]
lea rcx, OFFSET FLAT:__D0767A1C_cpp_standard_headers_indexer@cpp
call __CheckForDebuggerJustMyCode
lea rsp, QWORD PTR [rbp+200]
pop rdi
pop rbp
ret 0
?__empty_global_delete@@YAXPEAX@Z ENDP ; __empty_global_delete
_TEXT ENDS
END
| 28.143652
| 231
| 0.720453
|
df6ac07dd7b21af23c20b7d423a7c5ad022bd5a3
| 232
|
asm
|
Assembly
|
libsrc/math/mbf32/c/sccz80/l_f32_div.asm
|
rjcorrig/z88dk
|
c49c26bb232c17ea5a45d21bb81b6343572b7f4c
|
[
"ClArtistic"
] | null | null | null |
libsrc/math/mbf32/c/sccz80/l_f32_div.asm
|
rjcorrig/z88dk
|
c49c26bb232c17ea5a45d21bb81b6343572b7f4c
|
[
"ClArtistic"
] | null | null | null |
libsrc/math/mbf32/c/sccz80/l_f32_div.asm
|
rjcorrig/z88dk
|
c49c26bb232c17ea5a45d21bb81b6343572b7f4c
|
[
"ClArtistic"
] | null | null | null |
SECTION code_fp_mbf32
PUBLIC l_f32_div
EXTERN ___mbf32_setup_arith
EXTERN ___mbf32_DVBCDE
EXTERN ___mbf32_return
EXTERN msbios
l_f32_div:
call ___mbf32_setup_arith
ld ix,___mbf32_DVBCDE
call msbios
jp ___mbf32_return
| 13.647059
| 28
| 0.836207
|
4fd3124bf3e73073e4bf8e522e3e0058e156c4dd
| 515
|
asm
|
Assembly
|
Laburi/Lab3/3-grumpy-jumps/grumpy_jumps.asm
|
DanBrezeanu/IOCLA
|
1a22cc2949afc72818289f47288e32004f633fd1
|
[
"MIT"
] | 2
|
2019-11-18T15:56:21.000Z
|
2020-01-18T01:22:37.000Z
|
Laburi/Lab3/3-grumpy-jumps/grumpy_jumps.asm
|
zatbogdan99/IOCLA
|
3d499ad18624f571e6c49ff891649a05ac9908e4
|
[
"MIT"
] | null | null | null |
Laburi/Lab3/3-grumpy-jumps/grumpy_jumps.asm
|
zatbogdan99/IOCLA
|
3d499ad18624f571e6c49ff891649a05ac9908e4
|
[
"MIT"
] | null | null | null |
%include "io.inc"
section .data
wrong: db 'Not today, son.', 0
right: db 'Well done!',0
section .text
global CMAIN
CMAIN:
mov ebp, esp; for correct debugging
mov eax, 2 ; TODO3.1: modify eax register
mov ebx, 3 ; TODO3.1: modify ebx register
mov ecx, 0x5 ; hardcoded; DO NOT change
cmp eax, ebx
jns bad
cmp ecx, ebx
jb bad
add eax, ebx
xor eax, ecx
jnz bad
good:
PRINT_STRING right
NEWLINE
ret
bad:
PRINT_STRING wrong
NEWLINE
ret
| 17.758621
| 50
| 0.613592
|
2a07976bc961b9605f1c380e11a5c70cef1b52a9
| 13,110
|
asm
|
Assembly
|
05_arraylistvsarray/SeqArrayAccess.asm
|
arnaudroger/blog_samples
|
b4c6b5acc5e10f8007595d4b001b9c9face4812c
|
[
"MIT"
] | null | null | null |
05_arraylistvsarray/SeqArrayAccess.asm
|
arnaudroger/blog_samples
|
b4c6b5acc5e10f8007595d4b001b9c9face4812c
|
[
"MIT"
] | null | null | null |
05_arraylistvsarray/SeqArrayAccess.asm
|
arnaudroger/blog_samples
|
b4c6b5acc5e10f8007595d4b001b9c9face4812c
|
[
"MIT"
] | 1
|
2018-08-30T22:54:24.000Z
|
2018-08-30T22:54:24.000Z
|
# JMH version: 1.19
# VM version: JDK 1.8.0_131, VM 25.131-b11
# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java
# VM options: <none>
# Warmup: 20 iterations, 1 s each
# Measurement: 20 iterations, 1 s each
# Timeout: 10 min per iteration
# Threads: 1 thread, will synchronize iterations
# Benchmark mode: Throughput, ops/time
# Benchmark: com.github.arnaudroger.SeqArrayAccess.testGet
# Parameters: (size = 1000000)
# Run progress: 0.00% complete, ETA 00:00:40
# Fork: 1 of 1
# Preparing profilers: LinuxPerfAsmProfiler
# Profilers consume stdout and stderr from target VM, use -v EXTRA to copy to console
# Warmup Iteration 1: 355.738 ops/s
# Warmup Iteration 2: 371.053 ops/s
# Warmup Iteration 3: 375.265 ops/s
# Warmup Iteration 4: 377.908 ops/s
# Warmup Iteration 5: 377.769 ops/s
# Warmup Iteration 6: 377.214 ops/s
# Warmup Iteration 7: 376.585 ops/s
# Warmup Iteration 8: 377.638 ops/s
# Warmup Iteration 9: 377.788 ops/s
# Warmup Iteration 10: 378.051 ops/s
# Warmup Iteration 11: 376.321 ops/s
# Warmup Iteration 12: 377.825 ops/s
# Warmup Iteration 13: 377.669 ops/s
# Warmup Iteration 14: 377.592 ops/s
# Warmup Iteration 15: 378.162 ops/s
# Warmup Iteration 16: 376.742 ops/s
# Warmup Iteration 17: 376.236 ops/s
# Warmup Iteration 18: 377.479 ops/s
# Warmup Iteration 19: 376.243 ops/s
# Warmup Iteration 20: 375.803 ops/s
Iteration 1: 373.609 ops/s
Iteration 2: 375.276 ops/s
Iteration 3: 378.223 ops/s
Iteration 4: 376.072 ops/s
Iteration 5: 378.198 ops/s
Iteration 6: 378.237 ops/s
Iteration 7: 377.580 ops/s
Iteration 8: 378.033 ops/s
Iteration 9: 377.628 ops/s
Iteration 10: 378.721 ops/s
Iteration 11: 378.773 ops/s
Iteration 12: 377.823 ops/s
Iteration 13: 378.595 ops/s
Iteration 14: 378.875 ops/s
Iteration 15: 375.861 ops/s
Iteration 16: 377.341 ops/s
Iteration 17: 370.815 ops/s
Iteration 18: 377.846 ops/s
Iteration 19: 378.094 ops/s
Iteration 20: 378.519 ops/s
# Processing profiler results: LinuxPerfAsmProfiler
Result "com.github.arnaudroger.SeqArrayAccess.testGet":
377.206 ±(99.9%) 1.754 ops/s [Average]
(min, avg, max) = (370.815, 377.206, 378.875), stdev = 2.019
CI (99.9%): [375.452, 378.959] (assumes normal distribution)
Secondary result "com.github.arnaudroger.SeqArrayAccess.testGet:·asm":
PrintAssembly processed: 177922 total address lines.
Perf output processed (skipped 23.504 seconds):
Column 1: cycles (20378 events)
Column 2: instructions (20440 events)
Hottest code regions (>10.00% "cycles" events):
....[Hottest Region 1]..............................................................................
C2, level 4, org.openjdk.jmh.infra.Blackhole::consume, version 517 (71 bytes)
# parm0: rdx:rdx = 'java/lang/Object'
# [sp+0x40] (sp of caller)
0x00007f269d227e60: mov 0x8(%rsi),%r10d
0x00007f269d227e64: shl $0x3,%r10
0x00007f269d227e68: cmp %r10,%rax
0x00007f269d227e6b: jne 0x00007f269d045e20 ; {runtime_call}
0x00007f269d227e71: data16 xchg %ax,%ax
0x00007f269d227e74: nopl 0x0(%rax,%rax,1)
0x00007f269d227e7c: data16 data16 xchg %ax,%ax
[Verified Entry Point]
9.71% 7.17% 0x00007f269d227e80: mov %eax,-0x14000(%rsp)
0.06% 0.05% 0x00007f269d227e87: push %rbp
9.41% 5.42% 0x00007f269d227e88: sub $0x30,%rsp ;*synchronization entry
; - org.openjdk.jmh.infra.Blackhole::consume@-1 (line 307)
0.13% 0.16% 0x00007f269d227e8c: mov %rdx,(%rsp)
0.06% 0.10% 0x00007f269d227e90: mov %rsi,0x8(%rsp)
9.46% 5.62% 0x00007f269d227e95: mov 0xc4(%rsi),%ebp ;*getfield tlrMask
; - org.openjdk.jmh.infra.Blackhole::consume@1 (line 307)
0.08% 0.15% 0x00007f269d227e9b: imul $0x19660d,0xc0(%rsi),%r11d
8.75% 8.01% 0x00007f269d227ea6: add $0x3c6ef35f,%r11d ;*iadd
; - org.openjdk.jmh.infra.Blackhole::consume@15 (line 308)
9.30% 11.52% 0x00007f269d227ead: mov %r11d,0xc0(%rsi) ;*putfield tlr
; - org.openjdk.jmh.infra.Blackhole::consume@17 (line 308)
9.87% 11.92% 0x00007f269d227eb4: and %ebp,%r11d
0.39% 0.47% 0x00007f269d227eb7: test %r11d,%r11d
╭ 0x00007f269d227eba: je 0x00007f269d227ec8
9.36% 13.90% │ 0x00007f269d227ebc: add $0x30,%rsp
0.05% 0.02% │ 0x00007f269d227ec0: pop %rbp
0.08% 0.05% │ 0x00007f269d227ec1: test %eax,0x1786a139(%rip) # 0x00007f26b4a92000
│ ; {poll_return}
0.10% 0.09% │ 0x00007f269d227ec7: retq
↘ 0x00007f269d227ec8: mov 0x60(%r15),%rax
0x00007f269d227ecc: mov %rax,%r10
0x00007f269d227ecf: add $0x20,%r10
0x00007f269d227ed3: cmp 0x70(%r15),%r10
0x00007f269d227ed7: jae 0x00007f269d227f82
0x00007f269d227edd: mov %r10,0x60(%r15)
0x00007f269d227ee1: prefetchnta 0xc0(%r10)
0x00007f269d227ee9: mov $0xf8000ba5,%r10d ; {metadata('java/lang/ref/WeakReference')}
0x00007f269d227eef: shl $0x3,%r10
....................................................................................................
66.81% 64.66% <total for region 1>
....[Hottest Region 2]..............................................................................
C2, level 4, com.github.arnaudroger.SeqArrayAccess::testGet, version 521 (33 bytes)
0x00007f269d22f4a8: jae 0x00007f269d22f4f4
0x00007f269d22f4aa: test %rdx,%rdx
╭ 0x00007f269d22f4ad: je 0x00007f269d22f4f4 ;*aload_2
│ ; - com.github.arnaudroger.SeqArrayAccess::testGet@17 (line 61)
│ 0x00007f269d22f4af: shl $0x3,%r10 ;*getfield data
│ ; - com.github.arnaudroger.SeqArrayAccess::testGet@1 (line 61)
│ 0x00007f269d22f4b3: xor %ebp,%ebp
│ 0x00007f269d22f4b5: mov %rdx,0x8(%rsp)
│ 0x00007f269d22f4ba: mov %r8d,0x10(%rsp)
│╭ 0x00007f269d22f4bf: jmp 0x00007f269d22f4c5
9.90% 10.66% ││↗ 0x00007f269d22f4c1: mov (%rsp),%r10 ;*aload_2
│││ ; - com.github.arnaudroger.SeqArrayAccess::testGet@17 (line 61)
│↘│ 0x00007f269d22f4c5: mov 0x10(%r10,%rbp,4),%r11d
0.70% 0.54% │ │ 0x00007f269d22f4ca: mov %r10,(%rsp)
0.04% 0.03% │ │ 0x00007f269d22f4ce: mov %r11,%rdx
9.47% 8.56% │ │ 0x00007f269d22f4d1: shl $0x3,%rdx ;*aaload
│ │ ; - com.github.arnaudroger.SeqArrayAccess::testGet@20 (line 61)
0.18% 0.06% │ │ 0x00007f269d22f4d5: mov 0x8(%rsp),%rsi
0.01% 0.04% │ │ 0x00007f269d22f4da: nop
0.05% 0.03% │ │ 0x00007f269d22f4db: callq 0x00007f269d046020 ; OopMap{[0]=Oop [8]=Oop off=128}
│ │ ;*invokevirtual consume
│ │ ; - com.github.arnaudroger.SeqArrayAccess::testGet@26 (line 62)
│ │ ; {optimized virtual_call}
10.35% 13.07% │ │ 0x00007f269d22f4e0: inc %ebp ;*iinc
│ │ ; - com.github.arnaudroger.SeqArrayAccess::testGet@29 (line 61)
0.03% 0.03% │ │ 0x00007f269d22f4e2: cmp 0x10(%rsp),%ebp
│ ╰ 0x00007f269d22f4e6: jl 0x00007f269d22f4c1 ;*if_icmpge
│ ; - com.github.arnaudroger.SeqArrayAccess::testGet@14 (line 61)
│ 0x00007f269d22f4e8: add $0x30,%rsp
│ 0x00007f269d22f4ec: pop %rbp
│ 0x00007f269d22f4ed: test %eax,0x17862b0d(%rip) # 0x00007f26b4a92000
│ ; {poll_return}
│ 0x00007f269d22f4f3: retq
↘ 0x00007f269d22f4f4: mov $0xffffff86,%esi
0x00007f269d22f4f9: mov %rdx,%rbp
....................................................................................................
30.73% 33.02% <total for region 2>
....[Hottest Regions]...............................................................................
66.81% 64.66% C2, level 4 org.openjdk.jmh.infra.Blackhole::consume, version 517 (71 bytes)
30.73% 33.02% C2, level 4 com.github.arnaudroger.SeqArrayAccess::testGet, version 521 (33 bytes)
0.33% 0.33% [kernel.kallsyms] [unknown] (6 bytes)
0.14% 0.00% [kernel.kallsyms] [unknown] (45 bytes)
0.08% 0.00% [kernel.kallsyms] [unknown] (1 bytes)
0.07% 0.00% [kernel.kallsyms] [unknown] (0 bytes)
0.06% [kernel.kallsyms] [unknown] (5 bytes)
0.05% 0.11% libjvm.so _ZN10fileStream5writeEPKcm (82 bytes)
0.04% 0.07% libjvm.so _ZN13RelocIterator10initializeEP7nmethodPhS2_ (80 bytes)
0.04% libpthread-2.26.so __libc_write (16 bytes)
0.03% 0.01% [kernel.kallsyms] [unknown] (0 bytes)
0.03% 0.02% [kernel.kallsyms] [unknown] (26 bytes)
0.02% 0.03% [kernel.kallsyms] [unknown] (33 bytes)
0.02% 0.02% [kernel.kallsyms] [unknown] (11 bytes)
0.02% 0.05% [kernel.kallsyms] [unknown] (39 bytes)
0.02% [kernel.kallsyms] [unknown] (22 bytes)
0.01% 0.04% [kernel.kallsyms] [unknown] (9 bytes)
0.01% [kernel.kallsyms] [unknown] (23 bytes)
0.01% 0.01% [kernel.kallsyms] [unknown] (0 bytes)
0.01% 0.00% [kernel.kallsyms] [unknown] (24 bytes)
1.44% 1.60% <...other 400 warm regions...>
....................................................................................................
100.00% 100.00% <totals>
....[Hottest Methods (after inlining)]..............................................................
66.81% 64.66% C2, level 4 org.openjdk.jmh.infra.Blackhole::consume, version 517
30.73% 33.02% C2, level 4 com.github.arnaudroger.SeqArrayAccess::testGet, version 521
1.58% 1.29% [kernel.kallsyms] [unknown]
0.09% 0.07% hsdis-amd64.so [unknown]
0.05% 0.11% libjvm.so _ZN10fileStream5writeEPKcm
0.05% 0.07% libc-2.26.so vfprintf
0.04% 0.07% libjvm.so _ZN13RelocIterator10initializeEP7nmethodPhS2_
0.04% 0.00% libpthread-2.26.so __libc_write
0.03% 0.08% libc-2.26.so _IO_fwrite
0.02% 0.00% libc-2.26.so _IO_fflush
0.02% 0.03% libjvm.so _ZN13xmlTextStream5writeEPKcm
0.01% 0.00% libjvm.so _ZN10decode_env12handle_eventEPKcPh
0.01% 0.01% libpthread-2.26.so __pthread_getspecific
0.01% 0.01% libc-2.26.so __strchrnul_avx2
0.01% 0.00% libjvm.so _ZL13printf_to_envPvPKcz
0.01% 0.03% libc-2.26.so __strlen_avx2
0.01% 0.00% libc-2.26.so _IO_old_init
0.01% hsdis-amd64.so decode_instructions
0.01% libc-2.26.so __vsprintf_chk
0.01% libjvm.so _ZN24DebugInformationRecorder27find_sharable_decode_offsetEi
0.42% 0.24% <...other 77 warm methods...>
....................................................................................................
100.00% 99.73% <totals>
....[Distribution by Source]........................................................................
97.55% 97.68% C2, level 4
1.58% 1.29% [kernel.kallsyms]
0.43% 0.50% libjvm.so
0.21% 0.36% libc-2.26.so
0.10% 0.07% hsdis-amd64.so
0.08% 0.06% libpthread-2.26.so
0.03% 0.01% interpreter
0.01% 0.00% [vdso]
0.01% 0.01% C1, level 3
0.00% 0.00% ld-2.26.so
....................................................................................................
100.00% 100.00% <totals>
# Run complete. Total time: 00:00:45
Benchmark (size) Mode Cnt Score Error Units
SeqArrayAccess.testGet 1000000 thrpt 20 377.206 ± 1.754 ops/s
SeqArrayAccess.testGet:·asm 1000000 thrpt NaN ---
| 56.753247
| 132
| 0.518688
|
378fb94df587b3526a8df6a1435aa09f16c8cc53
| 599
|
asm
|
Assembly
|
oeis/102/A102652.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/102/A102652.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/102/A102652.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A102652: a(n) = 4 * floor(24*2^n/15) = 4*A077854(n).
; 4,12,24,48,100,204,408,816,1636,3276,6552,13104,26212,52428,104856,209712,419428,838860,1677720,3355440,6710884,13421772,26843544,53687088,107374180,214748364,429496728,858993456,1717986916,3435973836,6871947672,13743895344,27487790692,54975581388,109951162776,219902325552,439804651108,879609302220,1759218604440,3518437208880,7036874417764,14073748835532,28147497671064,56294995342128,112589990684260,225179981368524,450359962737048,900719925474096,1801439850948196,3602879701896396
mov $1,2
pow $1,$0
mul $1,8
div $1,5
mul $1,4
mov $0,$1
| 59.9
| 486
| 0.826377
|
137483fc3ca9337afc88efb51fdaafdc26ef9719
| 4,232
|
asm
|
Assembly
|
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_21829_474.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 9
|
2020-08-13T19:41:58.000Z
|
2022-03-30T12:22:51.000Z
|
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_21829_474.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 1
|
2021-04-29T06:29:35.000Z
|
2021-05-13T21:02:30.000Z
|
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_21829_474.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 3
|
2020-07-14T17:07:07.000Z
|
2022-03-21T01:12:22.000Z
|
.global s_prepare_buffers
s_prepare_buffers:
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r14
push %r8
push %rcx
push %rdi
push %rsi
// REPMOV
lea addresses_D+0x11dd6, %rsi
lea addresses_PSE+0xa4ba, %rdi
nop
nop
dec %r8
mov $12, %rcx
rep movsq
add %r8, %r8
// Store
lea addresses_D+0xc39c, %rcx
nop
nop
nop
nop
nop
and %r11, %r11
movl $0x51525354, (%rcx)
nop
nop
nop
nop
xor %rcx, %rcx
// Faulty Load
lea addresses_D+0x1d656, %rdi
nop
nop
nop
nop
xor $8768, %r11
movb (%rdi), %r8b
lea oracles, %rsi
and $0xff, %r8
shlq $12, %r8
mov (%rsi,%r8,1), %r8
pop %rsi
pop %rdi
pop %rcx
pop %r8
pop %r14
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_D', 'same': False, 'size': 16, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_D', 'congruent': 6, 'same': False}, 'dst': {'type': 'addresses_PSE', 'congruent': 2, 'same': False}, 'OP': 'REPM'}
{'dst': {'type': 'addresses_D', 'same': False, 'size': 4, 'congruent': 1, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
[Faulty Load]
{'src': {'type': 'addresses_D', 'same': True, 'size': 1, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'36': 21829}
36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36
*/
| 57.972603
| 2,999
| 0.659735
|
cde9ce700cd117230726ac9e002d5deb26cb9be6
| 562
|
asm
|
Assembly
|
oeis/156/A156635.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/156/A156635.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/156/A156635.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A156635: 144*n^2 - n.
; 143,574,1293,2300,3595,5178,7049,9208,11655,14390,17413,20724,24323,28210,32385,36848,41599,46638,51965,57580,63483,69674,76153,82920,89975,97318,104949,112868,121075,129570,138353,147424,156783,166430,176365,186588,197099,207898,218985,230360,242023,253974,266213,278740,291555,304658,318049,331728,345695,359950,374493,389324,404443,419850,435545,451528,467799,484358,501205,518340,535763,553474,571473,589760,608335,627198,646349,665788,685515,705530,725833,746424,767303,788470,809925,831668
add $0,1
mul $0,144
bin $0,2
div $0,72
| 70.25
| 497
| 0.811388
|
61ed958f38baa9ffefe2f65cc80877ae2f1fa630
| 4,349
|
asm
|
Assembly
|
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca.log_21829_1271.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 9
|
2020-08-13T19:41:58.000Z
|
2022-03-30T12:22:51.000Z
|
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca.log_21829_1271.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 1
|
2021-04-29T06:29:35.000Z
|
2021-05-13T21:02:30.000Z
|
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca.log_21829_1271.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 3
|
2020-07-14T17:07:07.000Z
|
2022-03-21T01:12:22.000Z
|
.global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r14
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_WT_ht+0x1dd40, %r14
nop
nop
nop
sub %rcx, %rcx
mov $0x6162636465666768, %rbx
movq %rbx, (%r14)
nop
nop
nop
nop
nop
add %r11, %r11
lea addresses_WT_ht+0x8cd2, %rsi
lea addresses_WT_ht+0xd340, %rdi
nop
nop
nop
nop
nop
inc %rbx
mov $3, %rcx
rep movsw
nop
inc %rdi
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %r14
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r12
push %r13
push %r14
push %rbx
push %rdi
// Faulty Load
lea addresses_D+0x1ef40, %rdi
nop
and $161, %r14
mov (%rdi), %r13w
lea oracles, %rdi
and $0xff, %r13
shlq $12, %r13
mov (%rdi,%r13,1), %r13
pop %rdi
pop %rbx
pop %r14
pop %r13
pop %r12
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_D'}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 2, 'NT': False, 'type': 'addresses_D'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'congruent': 8, 'AVXalign': False, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_WT_ht'}}
{'src': {'congruent': 1, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'dst': {'congruent': 8, 'same': False, 'type': 'addresses_WT_ht'}}
{'36': 21829}
36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36
*/
| 54.3625
| 2,999
| 0.663601
|
3c0079965d13309ba60b23186cc826280890a919
| 317
|
asm
|
Assembly
|
programs/oeis/023/A023535.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/023/A023535.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/023/A023535.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A023535: Convolution of natural numbers with A023531.
; 0,1,2,3,5,7,9,11,14,17,20,23,26,30,34,38,42,46,50,55,60,65,70,75,80,85,91,97,103,109,115,121,127,133,140,147,154,161,168,175,182,189,196,204,212,220,228,236,244,252,260,268,276,285,294,303,312
mov $2,2
lpb $0
add $1,$0
add $2,1
trn $0,$2
lpe
mov $0,$1
| 28.818182
| 194
| 0.671924
|
a750743d3143337129862d1f69afe50d0a4a4767
| 252
|
asm
|
Assembly
|
week_7/dataset/Assembly/056609.asm
|
Dumebi35/DumebiCSC102
|
56985f4852bc01c94dce2ee368c9612ad368f619
|
[
"MIT"
] | null | null | null |
week_7/dataset/Assembly/056609.asm
|
Dumebi35/DumebiCSC102
|
56985f4852bc01c94dce2ee368c9612ad368f619
|
[
"MIT"
] | null | null | null |
week_7/dataset/Assembly/056609.asm
|
Dumebi35/DumebiCSC102
|
56985f4852bc01c94dce2ee368c9612ad368f619
|
[
"MIT"
] | null | null | null |
;set CAPS LOCK on
.model small
.stack 100h
.code
mov ax,@data
mov ds,ax
main proc
push ds
mov ax,40h
mov ds,ax ;set seg to 40
mov bx,17h ;set offset
or byte ptr [bx],01000000b ;set bit 6
pop ds
mov ax,4c00h
int 21h
main endp
end main
| 14
| 38
| 0.678571
|
077b5457b1210ffb0010d418fc92228992bc57ea
| 751
|
asm
|
Assembly
|
oeis/135/A135431.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/135/A135431.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/135/A135431.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A135431: a(n) = a(n-1) + a(n-2) + a(n-3) - a(n-4) with a(0)=0, a(1)=1, a(2)=2 and a(3)=3.
; Submitted by Christian Krause
; 0,1,2,3,6,10,17,30,51,88,152,261,450,775,1334,2298,3957,6814,11735,20208,34800,59929,103202,177723,306054,527050,907625,1563006,2691627,4635208,7982216,13746045,23671842,40764895,70200566,120891258,208184877,358511806,617387375,1063192800,1830907104,3152975473,5429688002,9350377779,16102134150,27729224458,47752048385,82233029214,141612167907,243868021048,419961169784,723208329525,1245425352450,2144726830711,3693399342902,6360343196538,10953044017701,18862059726430,32482047597767,55936808145360
mov $1,1
lpb $0
sub $0,1
add $2,$1
add $3,$4
add $1,$3
add $4,$2
add $3,$4
sub $4,$3
add $3,$4
lpe
mov $0,$3
| 44.176471
| 500
| 0.748336
|
dca7ce2e0aff293a670e7cecfb5079b0af086b26
| 8,300
|
asm
|
Assembly
|
fbs_raw.asm
|
clarkejr/deep-blue
|
cc672fcc510184411eedfafc19f49a38f64102e8
|
[
"MIT"
] | null | null | null |
fbs_raw.asm
|
clarkejr/deep-blue
|
cc672fcc510184411eedfafc19f49a38f64102e8
|
[
"MIT"
] | 1
|
2019-01-10T19:15:35.000Z
|
2019-01-10T19:24:25.000Z
|
fbs_raw.asm
|
clarkejr/deep-blue
|
cc672fcc510184411eedfafc19f49a38f64102e8
|
[
"MIT"
] | null | null | null |
;
; Copyright (C) 2018 Don Clarke -- see LICENSE.TXT
;
stage1 equ 0x7C00
stage2 equ stage1 + 0x0200
e820map equ 0x1000
USE16 ; The assembler is to create 16 bit real mode code.
org stage1 ; The assembler is to assume that the binary will be loaded to this memmory address.
Start:
cli ; Disable interrupts.
cld ; Clear direction flag.
xor ax, ax ; Zero the Accumulator Register.
mov ss, ax ; Zero the SS Stack Segment.
mov ds, ax ; Zero the DS Data Segment.
mov es, ax ; Zero the ES Extra Segment.
mov sp, stage1 ; Set the Stack Pointer to the base of this boot code.
sti ; Enable interrupts.
mov [DriveNumber], dl ; BIOS passes drive number in DL
PrintOSGreeting:
mov si, msg_DeepBlue
call print_string
call print_CR_LF
TestLowMemory:
; Detect available conventional memory
clc ; Clear carry flag
int 0x12 ; call BIOS (request low memory size)
; The carry flag is set if it failed
jc Halt
; AX = amount of continuous memory in KB starting from 0.
mov [LowMemory], ax ; store the size of conventional memory
; TODO: test to see if there is sufficient memory!
mov bx, 0x200 ; 512 kb in decimal
cmp ax, bx ; compare (ax - bx)
jbe Halt ; jump if unsigned number is below or equal
; Only print memory if there is sufficient memory.
mov si, msg_LowMemory
call print_string
mov bx, [LowMemory]
call print_hex_dw
call print_CR_LF
; Load stage 2 boot sectors from the drive.
ResetFloppy:
clc ; clear carry flag
mov ah, 0x00 ; reset floppy disk function
mov dl, [DriveNumber] ; drive 0 is floppy drive
int 0x13 ; call BIOS
jc ResetFloppy ; if Carry Flag (CF) is set, there was an error. Try resetting again
; Print loading stage 2 message.
mov si, msg_LoadStage2
call print_string
; MBR is the first sector on a disk -- cylinder 0, head 0, sector 1
LoadStage2:
; Setup ES:BX with the address of the memory buffer
xor bx, bx ; BX = zero
mov es, bx ; ES = zero
mov bx, stage2 ; we are going to read sector two into address 0x0:stage2
mov dl, [DriveNumber] ; Load drive number into DL
mov dh, 0x00 ; Load head number into DH
mov ch, 0x00 ; Load cylinder number into CH
mov cl, 0x02 ; Load sector number into CL
mov al, 0x02 ; Load number of sectors to be read into AL
mov ah, 0x02 ; function 2
int 0x13 ; call BIOS - Read the sector
jc LoadStage2 ; Error, so try again
; Print running stage 2 message.
mov si, msg_RunStage2
call print_string
; jump to execute the sector!
jmp ContinueStage2
; Halt if the code reaches this point as there is a problem.
Halt:
mov si, msg_Error
call print_string
.repeat:
hlt
jmp short .repeat
;------------------------------------------------------------------------------
; 16-bit function to print a character in #al to the screen
print_char:
pusha ; save all registers onto the stack
mov bx, 0x07 ; text console page number
mov ah, 0x0e ; teletype function
int 0x10 ; call interupt 0x10
popa ; restore all registers onto the stack
ret
; 16-bit function to print CR and LF to the screen
print_CR_LF:
pusha ; save all registers onto the stack
mov al, 0x0d ; carriage return = sends the cursor back to the start of the line
call print_char
mov al, 0x0a ; line feed = sends the cursor to the next line
call print_char
popa ; restore all registers onto the stack
ret
; 16-bit function to print a string to the screen
; IN: SI - Address of start of string
print_string: ; Output string in SI to screen
pusha ; save all registers onto the stack
.repeat:
lodsb ; Get char from string
cmp al, 0
je .done ; If char is zero, end of string
call print_char
jmp short .repeat
.done:
popa ; restore all registers onto the stack
ret
; 16-bit function to print a hex byte to the screen
; IN: BH = unsigned byte to print
print_hex_db:
pusha
mov cx, 2 ; this will need to loop twice to handle the high and low nibbles
.lp:
mov al, bh ; copy input byte to al for processing
shr al, 4 ; shift high nibble to low nibble for processing
cmp al, 0xA
jb .below_0xA ; handle hex numbers greater than 0-9 differently
add al, 'A' - 0xA - '0' ; the nibble is greater than 9
.below_0xA:
add al, '0' ; convert nibble to an ASCII character
call print_char
shl bh, 4 ; get next nibble to the right (by shifting left)
loop .lp
popa
ret
; 16-bit function to print a hex word to the screen
; IN: BX = integer word to print
print_hex_dw:
pusha ; save all registers onto the stack
mov cx, 2 ; prepare to loop for 2 bytes (8) in a word (16)
.lp:
mov ax, bx ; work with a copy of bx
shr ax, 8 ; get the low byte
call print_hex_db
shl bx, 8 ; get the high byte
loop .lp
popa ; restore all registers onto the stack
ret
; 16-bit function to print a hex double word to the screen
; IN: EBX = integer word to print
print_hex_dd:
pusha ; save all registers onto the stack
call print_hex_dw
shr ebx, 16 ; get the high word
call print_hex_dw
popa ; restore all registers onto the stack
ret
;------------------------------------------------------------------------------
DriveNumber db 0x0
LowMemory dw 0x0000
SMAP_Count db 0x0
msg_DeepBlue db "Deep Blue OS", 0x00
msg_LowMemory db "Mem: ", 0x00
msg_LoadStage2 db "Loading stage 2...", 0x0d, 0x0a, 0x00
msg_RunStage2 db "Running stage 2...", 0x0d, 0x0a, 0x00
msg_Error db "Error!", 0x0d, 0x0a, 0x00
; To zerofill up to the MBR signature at the end of the boot code.
times 510 - ($ - $$) db 0
sign dw 0xAA55
;------------------------------------------------------------------------------
; Start of stage 2
;------------------------------------------------------------------------------
ContinueStage2:
GetMemoryMap:
; TODO: build E820 memory map
mov di, e820map ; ES:DI should point to 0x0:0x1000
call do_e820
jmp Halt
; 16-bit function to Query System Address Map
do_e820:
xor ebx, ebx ; ebx must be 0 to start
xor bp, bp ; keep an entry count in bp
mov edx, 0x0534D4150 ; Place "SMAP" into edx
mov eax, 0xe820
mov [es:di + 20], dword 1 ; force a valid ACPI 3.X entry
mov ecx, 24 ; ask for 24 bytes
int 0x15
jc short .failed ; carry set on first call means "unsupported function"
mov edx, 0x0534D4150 ; Some BIOSes apparently trash this register?
cmp eax, edx ; on success, eax must have been reset to "SMAP"
jne short .failed
test ebx, ebx ; ebx = 0 implies list is only 1 entry long (worthless)
je short .failed
jmp short .jmpin
.e820lp:
mov eax, 0xe820 ; eax, ecx get trashed on every int 0x15 call
mov [es:di + 20], dword 1 ; force a valid ACPI 3.X entry
mov ecx, 24 ; ask for 24 bytes again
int 0x15
jc short .e820f ; carry set means "end of list already reached"
mov edx, 0x0534D4150 ; repair potentially trashed register
.jmpin:
jcxz .skipent ; skip any 0 length entries
cmp cl, 20 ; got a 24 byte ACPI 3.X response?
jbe short .notext
test byte [es:di + 20], 1 ; if so: is the "ignore this data" bit clear?
je short .skipent
.notext:
mov ecx, [es:di + 8] ; get lower uint32_t of memory region length
or ecx, [es:di + 12] ; "or" it with upper uint32_t to test for zero
jz .skipent ; if length uint64_t is 0, skip entry
call print_SMAP_entry
inc bp ; got a good entry: ++count, move to next storage spot
add di, 24
.skipent:
test ebx, ebx ; if ebx resets to 0, list is complete
jne short .e820lp
.e820f:
mov [SMAP_Count], bp ; store the entry count
clc ; there is "jc" on end of list to this point, so the carry must be cleared
ret
.failed:
stc ; "function unsupported" error exit
ret
; 16-bit function to print the current SMAP entry pointed to by [es:di]
print_SMAP_entry:
pusha
mov ebx, [es:di]
call print_hex_dd
mov ebx, [es:di + 4]
call print_hex_dd
mov al, ':'
call print_char
mov ebx, [es:di + 8]
call print_hex_dd
mov ebx, [es:di + 12]
call print_hex_dd
mov al, '|'
call print_char
mov ebx, [es:di + 16]
call print_hex_dd
mov al, '|'
call print_char
mov ebx, [es:di + 20]
call print_hex_dd
call print_CR_LF
popa
ret
; To zerofill up to the size of a 3.5" HD floppy disk
; 512 bytes per sector, 18 sectors per track, 80 tracks per side and two sides.
; 512 * 18 * 80 * 2 = 1,474,560 bytes
times 1474560 - ($ - $$) db 0
| 30.072464
| 97
| 0.67253
|
42ba7eadba3eb64ec04ab74bb040caea476ca2e9
| 11,552
|
asm
|
Assembly
|
fpga-fighter.asm
|
Markuus13/street-fighter-II
|
9b6698da9e37357ab040bc8b8a00a33e3f3cd66d
|
[
"MIT"
] | null | null | null |
fpga-fighter.asm
|
Markuus13/street-fighter-II
|
9b6698da9e37357ab040bc8b8a00a33e3f3cd66d
|
[
"MIT"
] | null | null | null |
fpga-fighter.asm
|
Markuus13/street-fighter-II
|
9b6698da9e37357ab040bc8b8a00a33e3f3cd66d
|
[
"MIT"
] | null | null | null |
## SRAM Mapping ##
.eqv SRAM_INI_ADDR 0x10012000
.eqv INIT_SCREEN_SRAM 0x10012000
.eqv INSERT_COIN_SRAM 0x10025000
.eqv CURRENT_BKG_SRAM 0x10012000
.eqv FGHT1_ADDR_SRAM 0x1003FFF4
.eqv FGHT1_POSX_SRAM 0x1003FFF8
.eqv FGHT1_POSY_SRAM 0x1003FFFC
.eqv FGHT1_SPR_SRAM 0x10040000
.eqv FGHT2_ADDR_SRAM 0x1007FFF4
.eqv FGHT2_POS_X_SRAM 0x1007FFF8
.eqv FGHT2_POS_Y_SRAM 0x1007FFFC
.eqv FGHT2_SPR_SRAM 0x10080000
## SD ##
# Backgrounds # # (512 * 137) = 0x00011200
.eqv INIT_SCREEN_SD 0x00813200
.eqv INSERT_COIN_SD 0x00826200
.eqv BKG_RYU_SD 0x000A0200
.eqv
.eqv KEN_1_SD 0x000B8200
.eqv RYU_1_SD 0x000D8200
## VGA ##
.eqv VGA_INI_ADDR 0xFF000000 # VGA initial address
.eqv VGA_QTD_BYTE 76800 # Size of Background
.eqv VGA_WIDTH 320 # Width of VGA Matrix in pixels
## Data ##
.eqv INS_COIN_BYTE_QTD 1700 # Bytes
################
### Keyboard ###
################
## Player 1 ##
.eqv ESQ_1 0x1C000000 #A -> Andar Esquerda
.eqv DIR_1 0x23000000 #D -> Andar Direita
.eqv CIMA_1 0x1D000000 #W -> Pular
.eqv BAIXO_1 0x1B000000 #S -> Abaixar
.eqv SOCO_1 0x31000000 #N -> Soco
.eqv CHUTE_1 0x32000000 #B -> Chute
.eqv HADUKEN 0xF023F02A #HADUKEN
.eqv A2 0x10000000 #A2 -> Andar Esquerda mapeado memoria
.eqv S2 0x08000000 #S2 -> Abaixar mapeado memoria
.eqv D2 0x00000008 #D2 -> Andar Direita mapeado memoria
.eqv W2 0x20000000 #W -> Pular mapeado memoria
.eqv N2 0x00020000 #N2 -> Soco mapeado memoria
.eqv B2 0x00040000 #B2-> Chute mapeado memoria
.data
.text
main:
# Keyboard Mapping
la $s0,0xFF100100 # BUFFER1
la $s1,0xFF100104 # BUFFER2
la $s2,0xFF100520 # KEY0
la $s3,0xFF100524 # KEY1
la $s4,0xFF100528 # KEY2
la $s5,0xFF10052C # KEY3
# Print inital screen
#nop
#jal initialScreen
# Print select screen
#nop
#jal selectScreen
# Set initial position of Fighter 1
li $a0, FGHT1_ADDR_SRAM
li $a1, 135
li $a2, 20
jal setFighterPositions
nop
# Set initial position of Fighter 2
li $a0, FGHT2_ADDR_SRAM
li $a1, 135
li $a2, 120
jal setFighterPositions
nop
jal startFight
nop
loopGame:
lw $t0,0($s0)
lw $t1,0($s1)
sll $t2,$t0,24 #descolando buffer em 24 bits para esquerda
sll $t3,$t0,16
lw $s6,0($s2)
lw $s7,0($s3)
lw $t6,0($s4)
lw $t8,0($s5)
beq $t2, DIR_1, DIR_1_PRESS
beq $t2, ESQ_1, ESQ_1_PRESS
nop
j loopGame
DIR_1_PRESS:
andi $s7, $s7, D2
beq $s7, D2, ANDAR_DIR_1
nop
j loopGame
ANDAR_DIR_1:
# get pos atual
li $a0, FGHT1_ADDR_SRAM
nop
jal getFighterPositions
# update bkg
nop
nop
li $a0, FGHT1_SPR_SRAM
jal updateBkg
nop
nop
# set new pos
nop
li $a0, FGHT1_ADDR_SRAM
move $a1, $v0
addi $a2, $v1, 5
nop
jal setFighterPositions
nop
# print sprite
li $a0, FGHT1_SPR_SRAM
li $a3, 0
jal printSprite
nop
nop
j loopGame
ESQ_1_PRESS:
andi $s6,$s6,A2
beq $s6,A2,ANDAR_ESQ_1
nop
j loopGame
ANDAR_ESQ_1:
# get pos atual
li $a0, FGHT1_ADDR_SRAM
nop
jal getFighterPositions
# update bkg
nop
li $a0, FGHT1_SPR_SRAM
jal updateBkg
nop
# update bkg
li $a0, FGHT1_ADDR_SRAM
move $a1, $v0
addi $a2, $v1, -5
nop
jal setFighterPositions
# print sprite
nop
li $a0, FGHT1_SPR_SRAM
li $a3, 0
jal printSprite
nop
nop
j loopGame
nop
END: j END
###############################
### Fighters ####
###############################
setFighterPositions: #($a0 = FIGHTER_ADDR, $a1 = x, $a2 = y)
# Set pos X
addi $a0, $a0, 4
sw $a1, 0($a0)
# Set pos Y
addi $a0, $a0, 4
sw $a2, 0($a0)
nop
jr $ra
getFighterPositions: #($a0 = FIGHTER_ADDR) -> $v0 = x, $v1 = y
# Get pos X
addi $a0, $a0, 4
lw $v0, 0($a0)
# Get pos Y
addi $a0, $a0, 4
lw $v1, 0($a0)
nop
jr $ra
################################
###### Fight #######
################################
startFight:
addi $sp $sp, -4
sw $ra, 0($sp)
# Load Background to SRAM
li $a0, BKG_RYU_SD
li $a1, CURRENT_BKG_SRAM
li $a2, VGA_QTD_BYTE
li $v0, 49
syscall
nop
# Print background
li $a0, CURRENT_BKG_SRAM
nop
jal printBKG
nop
# Move Fighter 1 from SD to SRAM
li $a0, KEN_1_SD
li $a1, FGHT1_SPR_SRAM
li $a2, 5200
li $v0, 49
syscall
nop
# Move Fighter 2 from SD to SRAM
li $a0, RYU_1_SD
li $a1, FGHT2_SPR_SRAM
li $a2, 5200
li $v0, 49
syscall
nop
# Print Fighter 1
li $a0, FGHT1_SPR_SRAM
li $a1, 135
li $a2, 20
li $a3, 0
nop
jal printSprite
nop
# Print Fighter 2
li $a0, FGHT2_SPR_SRAM
li $a1, 135
li $a2, 120
li $a3, 0
nop
jal printSprite
nop
lw $ra, 0($sp)
addi $sp, $sp, 4
nop
jr $ra
####################################
## Initial Screen code ##
####################################
initialScreen:
addi $sp, $sp, -4
sw $ra, 0($sp)
# Reads Initial Screen from SD to VGA directly
li $a0, INIT_SCREEN_SD
li $a1, VGA_INI_ADDR
li $a2, VGA_QTD_BYTE
li $v0, 49
syscall
nop
# Load Insert coin from SD
li $a0, INSERT_COIN_SD
li $a1, INSERT_COIN_SRAM
li $a2, INS_COIN_BYTE_QTD
li $v0, 49
syscall
nop
# Reads Select Screen from SD to SRAM
#li $a0, SLCT_SCREEN_SD
#li $a1, SLCT_SCREEN_SRAM
#li $a2, VGA_QTD_BYTE
#li $v0, 49
#syscall
nop
# Clean keyboard buffer
move $s6, $zero
move $s7, $zero
insert_coin:
# Prints the 'insert coin' on the screen
li $a0, INSERT_COIN_SRAM
li $a1, 175
li $a2, 110
li $a3, 0
nop
jal printSprite
# Prints a black box where 'insert coin' was
move $a0, $zero
li $a1, 175
li $a2, 110
nop
jal printColor
# Keyboard reading
lw $s6, 0($s0)
lw $s7, 0($s1)
bne $s6, $zero, initialScreenEnd
nop
j insert_coin
initialScreenEnd:
addi $sp, $sp, 4
lw $ra, 0($sp)
nop
jr $ra
###############################
#### SELECT MENU #####
###############################
selectScreen:
#li $a0, SLCT_SCREEN_SD
li $a1, VGA_INI_ADDR
li $a2, VGA_QTD_BYTE
li $v0, 49
syscall
nop
nop
jr $ra
# Reads background from SD to SRAM
printBKG: #($a0 = SRAM_Address)
# Load VGA and SRAM Addresses and BKG_SIZE
li $t0, VGA_INI_ADDR # $t0 = VGA_INI_ADDR
move $t1, $a0 # $t1 = SRAM_ADDR
li $t3, VGA_QTD_BYTE # $t3 = VGA_QTD_BYTE
writeVGA: # Read from SRAM and write to VGA - $a1 = SRAM_ADDR, $t0 = VGA_INI_ADDR
lw $t2, 0($t1) # $t2 = SRAM[0]
sw $t2, 0($t0) # VGA[0] = $t2 = SRAM[0]
addi $t0, $t0, 4 # VGA++
addi $t1, $t1, 4 # SRAM++
addi $t3, $t3, -4 # QTD_BYTES--
slti $t4, $t3, 1 # QTD_BYTES == 1 ? $t1 = 1 : $t1 = 0
beq $t4, $zero, writeVGA # if $t1 == 0 then writeVGA
# When finished:
nop
jr $ra
printSprite: #($a0 = Sprite Address, $a3 = Invert?[1 or 0])
li $t0, 93 # $t0 = fixed height
li $t1, 55 # $t1 = fixed width
# resolve bug das sprites (?)
addi $t0, $t0, 1
addi $t1, $t1, 1
# Get positions x and y from sprite
addi $t2, $a0, -8 # Address of sprite's position x
lw $a1, 0($t2) # Loads pos x to $a1
lw $a2, 4($t2) # Loads pos y to $a2
move $t2, $a0 # $t2 = SPRITE ADDRESS
move $t3, $zero # $t3 = 0 (External loop index)
move $t4, $zero # $t4 = 0 (Internal loop index)
li $t6, VGA_WIDTH # $t6 = 320 (width in pixels)
mult $a1, $t6 # $t5 = 320 * x (position x in display)
mflo $t5
add $t5, $t5, $a2 # $t5 = $t5 + $a3 (offset de memoria do inicio de onde é pra ser desenhada a sprite)
la $t7, VGA_INI_ADDR # $t7 = VGA_INI_ADDR
add $t7, $t7, $t5 # $t7 = Initial VGA address to print sprite
move $t9, $t7 # $t9 = $t7 ($t7 é usado como auxiliar do início da linha)
outer_loop: beq $t3, $t0, end_outer_loop # $t3 == $t0 ? end_outer_loop : proxima Instrução;
inner_loop: beq $t4, $t1, end_inner_loop # $t4 == $t1 ? end_inner_loop : proxima Instrução;
lb $t8, 0($t2) # $t8 = SPRITE_ADDRESS[0]
sb $t8, 0($t7) # VGA[0] = $t8 = SPRITE_ADDRESS[0]
addi $t2, $t2, 1 # $t2++ (SPRITE_ADDRESS++)
addi $t7, $t7, 1 # $t7++ (VGA++)
addi $t4, $t4, 1 # $t4++ (Internal loop index ++)
j inner_loop
end_inner_loop: addi $t7, $t9, VGA_WIDTH # Move a posição inicial $t7 do display pra próxima linha
move $t9, $t7 # $t9 = $t7 ($t7 -> aux)
addi $t3, $t3, 1 # $t3++ (INDICE DO OUTER_LOOP++)
move $t4, $zero # $t4 = 0 (zera o índice do inner loop)
j outer_loop
end_outer_loop: nop
jr $ra # Fim do procedimento
printColor: #($a0 = Hex Color, $a1 = posX, $a2 = posY)
li $t0, 55 # $t0 = fixed height
li $t1, 93 # $t1 = fixed width
# resolve bug das sprites (?)
addi $t0, $t0, 1
addi $t1, $t1, 1
move $t2, $a0 # $t2 = SPRITE ADDRESS
move $t3, $zero # $t3 = 0 (External loop index)
move $t4, $zero # $t4 = 0 (Internal loop index)
li $t6, VGA_WIDTH # $t6 = 320 (width in pixels)
mult $a1, $t6 # $t5 = 320 * x (position x in display)
mflo $t5
add $t5, $t5, $a2 # $t5 = $t5 + $a3 (offset de memoria do inicio de onde é pra ser desenhada a sprite)
la $t7, VGA_INI_ADDR # $t7 = VGA_INI_ADDR
add $t7, $t7, $t5 # $t7 = Initial VGA address to print sprite
move $t9, $t7 # $t9 = $t7 ($t7 é usado como auxiliar do início da linha)
outer_loop2: beq $t3, $t0, end_outer_loop2 # $t3 == $t0 ? end_outer_loop : proxima Instrução;
inner_loop2: beq $t4, $t1, end_inner_loop2 # $t4 == $t1 ? end_inner_loop : proxima Instrução;
sb $t2, 0($t7) # VGA[0] = $t8 = SPRITE_ADDRESS[0]
addi $t7, $t7, 1 # $t7++ (VGA++)
addi $t4, $t4, 1 # $t4++ (Internal loop index ++)
j inner_loop2
end_inner_loop2:addi $t7, $t9, VGA_WIDTH # Move a posição inicial $t7 do display pra próxima linha
move $t9, $t7 # $t9 = $t7 ($t7 -> aux)
addi $t3, $t3, 1 # $t3++ (INDICE DO OUTER_LOOP++)
move $t4, $zero # $t4 = 0 (zera o índice do inner loop)
j outer_loop2
end_outer_loop2:nop
jr $ra # Fim do procedimento
updateBkg: #($a0 = Sprite Address, $a3 = Invert?[1 or 0])
li $t0, 93 # $t0 = fixed height
li $t1, 55 # $t1 = fixed width
# resolve bug das sprites (?)
addi $t0, $t0, 1
addi $t1, $t1, 1
# Get positions x and y from sprite
addi $t2, $a0, -8 # Address of sprite's position x
lw $a1, 0($t2) # Loads pos x to $a1
lw $a2, 4($t2) # Loads pos y to $a2
li $t2, CURRENT_BKG_SRAM # $t2 = SPRITE ADDRESS
move $t3, $zero # $t3 = 0 (External loop index)
move $t4, $zero # $t4 = 0 (Internal loop index)
li $t6, VGA_WIDTH # $t6 = 320 (width in pixels)
mult $a1, $t6 # $t5 = 320 * x (position x in display)
mflo $t5
add $t5, $t5, $a2 # $t5 = $t5 + $a3 (offset de memoria do inicio de onde é pra ser desenhada a sprite)
la $t7, VGA_INI_ADDR # $t7 = VGA_INI_ADDR
add $t7, $t7, $t5 # $t7 = Initial VGA address to print sprite
move $t9, $t7 # $t9 = $t7 ($t7 é usado como auxiliar do início da linha)
add $t2, $t2, $t5
move $t6, $t2
uBouter_loop: beq $t3, $t0, uBend_outer_loop # $t3 == $t0 ? end_outer_loop : proxima Instrução;
uBinner_loop: beq $t4, $t1, uBend_inner_loop # $t4 == $t1 ? end_inner_loop : proxima Instrução;
lb $t8, 0($t2) # $t8 = SPRITE_ADDRESS[0]
sb $t8, 0($t7) # VGA[0] = $t8 = SPRITE_ADDRESS[0]
addi $t2, $t2, 1 # $t2++ (SPRITE_ADDRESS++)
addi $t7, $t7, 1 # $t7++ (VGA++)
addi $t4, $t4, 1 # $t4++ (Internal loop index ++)
j uBinner_loop
uBend_inner_loop: addi $t7, $t9, VGA_WIDTH # Move a posição inicial $t7 do display pra próxima linha
move $t9, $t7 # $t9 = $t7 ($t7 -> aux)
addi $t3, $t3, 1 # $t3++ (INDICE DO OUTER_LOOP++)
addi $t2, $t6, VGA_WIDTH
move $t6, $t2
move $t4, $zero # $t4 = 0 (zera o índice do inner loop)
j uBouter_loop
uBend_outer_loop: nop
jr $ra # Fim do procedimento
| 23.150301
| 104
| 0.609505
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.