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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
455a72c10069bf763f1333010ff6e6e1674ba5d8
| 3,127
|
asm
|
Assembly
|
Program 5/AddTwo.asm
|
smitc29/Assembly_Projects
|
e28fcac0f9343368d9be8b95e79c2881beedd158
|
[
"MIT"
] | null | null | null |
Program 5/AddTwo.asm
|
smitc29/Assembly_Projects
|
e28fcac0f9343368d9be8b95e79c2881beedd158
|
[
"MIT"
] | null | null | null |
Program 5/AddTwo.asm
|
smitc29/Assembly_Projects
|
e28fcac0f9343368d9be8b95e79c2881beedd158
|
[
"MIT"
] | null | null | null |
; Christopher Smith Project 5
; CSCI 231 Professor J Ryder
; Nov 1, 2016
; Determining Factors/Remainders from dividing values
TITLE MASM Template
INCLUDE Irvine32.inc
.data
source BYTE "This is the source string",0
prompt1 BYTE " Please enter a 4 digit hex value (No spaces): ", 0
prompt2 BYTE " Would you like to continue? ('Y' or 'y' to continue) ", 0
prompt3 BYTE " You entered the following value: ", 0
prompt4 BYTE " Hex Number is: ", 0
prompt5 BYTE " - ", 0
string3 BYTE 5 DUP (0), 0
var1 WORD 0
var2 WORD 0
var3 WORD 0
var4 WORD 0
counter dword ? ; Used as its namesake
.code
main PROC
Consent:
mov ecx,SIZEOF string3 ; For some reason, without this line the program doesn't work
call Clrscr
call CrLf
mov edx, OFFSET prompt1
call WriteString
mov edx, OFFSET string3
call ReadString
mov eax, 0 ; Ensures output from last run is gone if repeating
mov ebx, 0 ;
mov bl, string3[0] ; Put first hex value of string into var1
call Filter
mov var1, bx
mov ax, var1 ; Places var1 into ax register and shifts it over 4 bits
SHL ax, 4
mov bl, string3[1] ; Put second hex value of string into var2
call Filter
mov var2, bx
add ax, var2 ; Places var2 into ax register and shifts it over 4 bits
SHL ax, 4
mov bl, string3[2] ; Put third hex value of string into var3
call Filter
mov var3, bx
add ax, var3 ; Places var3 into ax register and shifts it over 4 bits
SHL ax, 4
mov bl, string3[3] ; Put fourth hex value of string into var4
call Filter
mov var4, bx
add ax, var4 ; Places var4 into ax register
call Outputter
call CrLf
call CrLf
mov edx, OFFSET prompt2
call WriteString
call ReadChar
cmp al, 'y'
JE Consent
cmp al, 'Y'
JE Consent
call DumpRegs
exit
main ENDP
Filter PROC ; strips String down to capital letters, puts into string4
cmp bl, '0' ; Compares '0' to bl character
JB Under_0 ; If cl < '0', skip to end of loop
cmp bl, '9' ; Compares '9' to bl character
JA Over_9 ; If al > '9', skip to letter check
sub bl, 30h ; Turns char value into hex value
jmp Number ; Jumps to end of loop if it is number
Over_9:
cmp bl, 'A' ; Compares 'A' to bl character
JB Under_A ; If al < 'A', skip to end of loop
cmp bl, 'F' ; Compares 'F' to bl character
JA Over_F ; If al > 'F', skip to end of loop
sub bl, 37h ; Makes letter into corresponding hex value
Under_0:
Under_A:
Over_F:
Number:
ret
Filter ENDP
Outputter PROC
mov ebx, eax
call CrLf
call CrLf
mov edx, OFFSET prompt3
call WriteString
mov edx, 0
mov al, string3[0]
call WriteChar
mov edx, OFFSET prompt5
call WriteString
mov edx, 0
mov al, string3[1]
call WriteChar
mov edx, OFFSET prompt5
call WriteString
mov edx, 0
mov al, string3[2]
call WriteChar
mov edx, OFFSET prompt5
call WriteString
mov edx, 0
mov al, string3[3]
call WriteChar
call CrLf
mov edx, OFFSET prompt4
call WriteString
mov eax, ebx
mov ebx,TYPE WORD
call WriteHexB
ret
Outputter ENDP
END main
| 20.708609
| 90
| 0.670291
|
d89449ed7b205327b4616cc780e9f1cdaf243bd3
| 726
|
asm
|
Assembly
|
programs/oeis/007/A007611.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/007/A007611.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/007/A007611.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A007611: a(n) = n! + 2^n.
; 2,3,6,14,40,152,784,5168,40576,363392,3629824,39918848,479005696,6227028992,87178307584,1307674400768,20922789953536,355687428227072,6402373705990144,121645100409356288,2432902008177688576,51090942171711537152,1124000727777611874304,25852016738884985028608,620448401733239456137216,15511210043330986017554432,403291461126605635651108864,10888869450418352160902217728,304888344611713860501772435456,8841761993739701954544152870912,265252859812191058636309553741824,8222838654177922817725565027483648,263130836933693530167218016454967296
mov $1,$0
seq $0,142 ; Factorial numbers: n! = 1*2*3*4*...*n (order of symmetric group S_n, number of permutations of n letters).
mov $2,2
pow $2,$1
add $0,$2
| 80.666667
| 537
| 0.85124
|
ad8e33d29f1dae538f1a5967c142e400d93988c5
| 31
|
asm
|
Assembly
|
levels/position_overrides/lvl4_4_4.asm
|
cppchriscpp/ld38
|
fe2e11a2f1a1098c716289b444c867a8113c39ea
|
[
"MIT"
] | 4
|
2018-08-18T15:31:04.000Z
|
2021-03-28T22:21:15.000Z
|
levels/position_overrides/lvl4_4_4.asm
|
cppchriscpp/missing-lands
|
fe2e11a2f1a1098c716289b444c867a8113c39ea
|
[
"MIT"
] | null | null | null |
levels/position_overrides/lvl4_4_4.asm
|
cppchriscpp/missing-lands
|
fe2e11a2f1a1098c716289b444c867a8113c39ea
|
[
"MIT"
] | null | null | null |
.repeat 16
.byte 26
.endrepeat
| 10.333333
| 10
| 0.741935
|
002ca51f29f529386ea1535efd1b189a54965f05
| 710
|
asm
|
Assembly
|
oeis/078/A078052.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/078/A078052.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/078/A078052.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A078052: Expansion of (1-x)/(1+x+2*x^2+2*x^3).
; Submitted by Jon Maiga
; 1,-2,0,2,2,-6,-2,10,6,-22,-10,42,22,-86,-42,170,86,-342,-170,682,342,-1366,-682,2730,1366,-5462,-2730,10922,5462,-21846,-10922,43690,21846,-87382,-43690,174762,87382,-349526,-174762,699050,349526,-1398102,-699050,2796202,1398102,-5592406,-2796202,11184810,5592406,-22369622,-11184810,44739242,22369622,-89478486,-44739242,178956970,89478486,-357913942,-178956970,715827882,357913942,-1431655766,-715827882,2863311530,1431655766,-5726623062,-2863311530,11453246122,5726623062,-22906492246
mov $1,1
mov $2,1
lpb $0
sub $0,1
add $2,$1
mul $3,2
sub $3,$1
add $1,$3
dif $2,-1
add $1,$2
sub $2,$1
add $3,$2
lpe
mov $0,$1
| 37.368421
| 489
| 0.701408
|
bc57a2e377ed2a9d4bf5addf2b03e2aaaa301e63
| 5,496
|
asm
|
Assembly
|
src/eeprom_program_by_user.asm
|
no111u3/m48_robo_asm
|
a2341f46eb411ec3d015f7ed1f150a1d3856721d
|
[
"Apache-2.0"
] | null | null | null |
src/eeprom_program_by_user.asm
|
no111u3/m48_robo_asm
|
a2341f46eb411ec3d015f7ed1f150a1d3856721d
|
[
"Apache-2.0"
] | null | null | null |
src/eeprom_program_by_user.asm
|
no111u3/m48_robo_asm
|
a2341f46eb411ec3d015f7ed1f150a1d3856721d
|
[
"Apache-2.0"
] | null | null | null |
;****************************************************************
.include "m48def.inc"
.include "service.inc"
.include "display.inc"
;****************************************************************
; Data
;****************************************************************
.dseg
.org SRAM_START ; because avra ignores device specific segment placement address
;****************************************************************
; Code
;****************************************************************
.cseg
; Interrupt vector table ========================================
.org 0x000
rjmp reset ; Reset Handler
reti ; rjmp EXT_INT0 ; IRQ0 Handler
reti ; rjmp EXT_INT1 ; IRQ1 Handler
reti ; rjmp PCINT0 ; PCINT0 Handler
reti ; rjmp PCINT1 ; PCINT1 Handler
reti ; rjmp PCINT2 ; PCINT2 Handler
reti ; rjmp WDT ; Watchdog Timer Handler
reti ; rjmp TIM2_COMPA ; Timer2 Compare A Handler
reti ; rjmp TIM2_COMPB ; Timer2 Compare B Handler
reti ; rjmp TIM2_OVF ; Timer2 Overflow Handler
reti ; rjmp TIM1_CAPT ; Timer1 Capture Handler
reti ; rjmp TIM1_COMPA ; Timer1 Compare A Handler
reti ; rjmp TIM1_COMPB ; Timer1 Compare B Handler
reti ; rjmp TIM1_OVF ; Timer1 Overflow Handler
reti ; rjmp TIM0_COMPA ; Timer0 Compare A Handler
reti ; rjmp TIM0_COMPB ; Timer0 Compare B Handler
reti ; rjmp TIM0_OVF ; Timer0 Overflow Handler
reti ; rjmp SPI_STC ; SPI Transfer Complete Handler
reti ; rjmp USART_RXC ; USART, RX Complete Handler
reti ; rjmp USART_UDRE ; USART, UDR Empty Handler
reti ; rjmp USART_TXC ; USART, TX Complete Handler
reti ; rjmp ADC ; ADC Conversion Complete Handler
reti ; rjmp EE_RDY ; EEPROM Ready Handler
reti ; rjmp ANA_COMP ; Analog Comparator Handler
reti ; rjmp TWI ; 2-wire Serial Interface Handler
reti ; rjmp SPM_RDY ; Store Program Memory Ready Handler
; Reset Handler =================================================
reset:
sset RAMEND ; Setup stack to the end of ram
regram_clear SRAM_START, RAMEND+1 ; Clear ram and registers
; Internal hardware init ========================================
.equ XTAL = 8000000
.equ baudrate = 19200
.equ bauddivider = XTAL / 16 / baudrate-1
uart_init:
outi UBRR0H, r16, high(bauddivider)
outi UBRR0L, r16, low(bauddivider)
outi UCSR0A, r16, 0
; Interrupts enabled, receive-transmit enabled
outi UCSR0B, r16, 1 << RXEN0 | 1 << TXEN0 | 1 << RXCIE0 | 1 << TXCIE0 | 0 << UDRIE0
; Frame format - 8 bit
outi UCSR0C, r16, 1 << UCSZ00 | 1 << UCSZ01
; Internal hardware init ========================================
;================================================================
; Eternal hardware init =========================================
;================================================================
; Run ===========================================================
start:
uart_snd_sbh_m Z, new_line, uart_snds
uart_snd_sbh_m Z, start_msg, uart_snds
uart_snd_sbh_m Z, new_line, uart_snds
; Display string from eeprom
uart_snd_sbh_m Z, string_display, uart_snds
rcall send_string_from_eeprom
uart_snd_sbh_m Z, new_line, uart_snds
; Display counter, increment and store
uart_snd_sbh_m Z, counter_display, uart_snds
rcall send_counter_from_eeprom_increment
uart_snd_sbh_m Z, new_line, uart_snds
; Infinity end loop =============================================
rjmp pc
;================================================================
; uart send function
uart_snd_b_m r16, r21
; uart send string function
uart_snds:
uart_snd_sb_m Z, r16, uart_snd_b
bin_2_dec8: ; display 8-bit dec
clr r17
bin_2_dec16: ; display 16-bit dec
bin_to_dec_m r16, r17, r18, r19, r20, r22, uart_snd_b
start_msg:
.db "Display external eeprom writes by user ISP", 0xd, 0xa, 0
string_display:
.db "String from eeprom: ", 0
counter_display:
.db "Counter: ", 0
new_line:
.db 0xd, 0xa, 0
; Display string from eeprom
send_string_from_eeprom:
ldi r16, low(string)
ldi r17, high(string)
send_loop:
rcall EE_Read
push r16
push r17
mov r16, r21
mov r18, r21
rcall uart_snd_b
pop r17
pop r16
subi r16, (-1)
sbci r17, (-1)
cpi r18, 0
brne send_loop
ret
; Display counter from eeprom, increment and store
send_counter_from_eeprom_increment:
ldi r16, low(counter)
ldi r17, high(counter)
rcall EE_Read
mov r24, r21
inc r16
rcall EE_Read
mov r25, r21
mov r16, r24
mov r17, r25
rcall bin_2_dec16
adiw r24, 1
ldi r16, low(counter)
ldi r17, high(counter)
mov r21, r24
rcall EE_Write
inc r16
mov r21, r25
rcall EE_Write
ret
; Write byte to eeprom
EE_Write:
sbic EECR, EEWE ; Wait to write ready eeprom
rjmp EE_Write
cli ; disable interrupts
out EEARL, r16 ; write address of eeprom low and high
out EEARH, r17 ; byte address
out EEDR, r21 ; write data
sbi EECR, EEMWE ; disable write protection
sbi EECR, EEWE ; write data to eeprom
sei ; enable interrupts
ret
; Read byte from eeprom
EE_Read:
sbic EECR, EEWE ; Wait to write read eeprom
rjmp EE_Read
out EEARL, r16 ; write address of eeprom low and high
out EEARH, r17 ; byte address
sbi EECR, EERE ; read data from eeprom
in r21, EEDR ; read data to register
ret
;****************************************************************
; Eeprom Data
;****************************************************************
.eseg
counter:
.byte 2
string:
.db "Hello, World!", 0xd, 0xa, "From eeprom", 0xd, 0xa, 0
| 28.774869
| 85
| 0.582787
|
d1e3bc02616609fb6858b4dcd082a612289b2be8
| 1,781
|
asm
|
Assembly
|
uw1/eop-moreBindings.asm
|
JohnGlassmyer/UltimaHacks
|
f9a114e00c4a1edf1ac7792b465feff2c9b88ced
|
[
"MIT"
] | 68
|
2018-03-04T22:34:22.000Z
|
2022-03-10T15:18:32.000Z
|
uw1/eop-moreBindings.asm
|
ptrie/UltimaHacks
|
2c3557a86d94ad8b54b26bc395b9aed1604f8be1
|
[
"MIT"
] | 19
|
2018-11-20T04:06:49.000Z
|
2021-11-08T16:37:10.000Z
|
uw1/eop-moreBindings.asm
|
ptrie/UltimaHacks
|
2c3557a86d94ad8b54b26bc395b9aed1604f8be1
|
[
"MIT"
] | 4
|
2020-09-01T17:57:36.000Z
|
2022-01-04T20:51:11.000Z
|
%include "../UltimaPatcher.asm"
%include "include/uw1.asm"
%include "include/uw1-eop.asm"
%include "include/bindKeyOrMouse.asm"
[bits 16]
; UW1-specific bindings
startPatch EXE_LENGTH, \
expanded overlay procedure: moreBindings
startBlockAt addr_eop_moreBindings
push bp
mov bp, sp
; bp-based stack frame:
%assign ____callerIp 0x02
%assign ____callerBp 0x00
push si
push di
; TODO: add mouse-handedness switching to UW1
mov di, offsetInCodeSegment(keyBindings)
forKeyBinding:
cmp di, offsetInCodeSegment(keyBindings_end)
jae keyBindings_end
push cs
pop es
bindDKeyAt es:di
add di, dKey_SIZE
jmp forKeyBinding
keyBindings:
dKey 1, 0x85, activateMode, 0 ; F6
dKey 1, 0x84, activateMode, 1 ; F5
dKey 1, 0x83, activateMode, 2 ; F4
dKey 1, 0x82, activateMode, 3 ; F3
dKey 1, 0x81, activateMode, 4 ; F2
dKey 1, 0x80, activateMode, 5 ; F1
keyBindings_end:
mov di, offsetInCodeSegment(mouseBindings)
forMouseBinding:
cmp di, offsetInCodeSegment(mouseBindings_end)
jae mouseBindings_end
push cs
pop es
bindDMouseAt es:di
add di, dMouse_SIZE
jmp forMouseBinding
mouseBindings:
; click arrows below the compass to move
dMouse 1, 107, 33, 123, 47, easyMove, -1, ; Easy-left
dMouse 1, 130, 31, 146, 44, easyMove, 0, ; Easy-walk
dMouse 1, 155, 33, 170, 47, easyMove, 1, ; Easy-right
; in conversation
dMouse 4, 82, 152, 136, 190, clickOtherTrade, 4
dMouse 4, 139, 152, 193, 190, clickAvatarTrade, 4
dMouse 4, 15, 1, 305, 30, selectConversationOption, 0
mouseBindings_end:
pop di
pop si
mov sp, bp
pop bp
retn
endBlockAt off_eop_moreBindings_end
endPatch
| 22.544304
| 60
| 0.67041
|
f5710d0a58ec62b67217be348b358dbc467941c8
| 1,255
|
asm
|
Assembly
|
programs/oeis/017/A017440.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/017/A017440.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/017/A017440.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A017440: a(n) = (11*n + 4)^4.
; 256,50625,456976,1874161,5308416,12117361,24010000,43046721,71639296,112550881,168896016,244140625,342102016,466948881,623201296,815730721,1049760000,1330863361,1664966416,2058346161,2517630976,3049800625,3662186256,4362470401,5158686976,6059221281,7072810000,8208541201,9475854336,10884540241,12444741136,14166950625,16062013696,18141126721,20415837456,22898045041,25600000000,28534304241,31713911056,35152125121,38862602496,42859350625,47156728336,51769445841,56712564736,62001498001,67652010000,73680216481,80102584576,86935932801,94197431056,101904600625,110075314176,118727795761,127880620816,137552716161,147763360000,158532181921,169879162896,181824635281,194389282816,207594140625,221460595216,236010384481,251265597696,267248675521,283982410000,301489944561,319794774016,338920744561,358892053776,379733250625,401469235456,424125260001,447726927376,472300192081,497871360000,524467088401,552114385936,580840612641,610673479936,641641050625,673771738896,707094310321,741637881856,777431921841,814506250000,852891037441,892616806656,933714431521,976215137296,1020150500625,1065552449536,1112453263441,1160885573136,1210882360801,1262476960000,1315703055681,1370594684176,1427186233201
mul $0,11
add $0,4
pow $0,4
| 179.285714
| 1,193
| 0.894024
|
4332b2b98da0881cc8629f88c3dbcdba35c10c82
| 785
|
asm
|
Assembly
|
kernel.asm
|
j4cobgarby/mustard
|
46df0853fce0e963c83301a83e3443eaf0e31555
|
[
"MIT"
] | 8
|
2017-09-16T12:40:40.000Z
|
2021-02-27T14:38:11.000Z
|
kernel.asm
|
j4cobgarby/mustard
|
46df0853fce0e963c83301a83e3443eaf0e31555
|
[
"MIT"
] | 1
|
2017-10-14T09:49:14.000Z
|
2019-10-04T09:42:16.000Z
|
kernel.asm
|
j4cobgarby/mustard
|
46df0853fce0e963c83301a83e3443eaf0e31555
|
[
"MIT"
] | 5
|
2017-11-10T23:28:56.000Z
|
2021-06-25T17:20:59.000Z
|
bits 32
section .data
; multiboot header for grub
align 4
dd 0x1BADB002 ; magic num
dd 0x00 ; flags
dd -(0x1BADB002 + 0x00) ; checksum, should = 0
section .text
global start
global keyboard_handler
global read_port
global write_port
global load_idt
; functions written in c
extern boot
extern keyboard_handler_main
read_port:
mov edx, [esp + 4]
in al, dx
ret
write_port:
mov edx, [esp + 4]
mov al, [esp + 4 + 4]
out dx, al
ret
load_idt:
mov edx, [esp + 4]
lidt [edx]
sti ; turn on interrupts
ret
keyboard_handler:
call keyboard_handler_main
iretd
start:
cli ; block cpu interrupts
mov esp, stack_space
call boot
hlt ; halt cpu
section .bss
stack_space: resb 8192 ; 8KB stack
| 15.7
| 48
| 0.650955
|
2e0a896e81de4ef79cab5389f4c44a7c52715097
| 2,848
|
asm
|
Assembly
|
Transynther/x86/_processed/NC/_ht_st_un_/i7-7700_9_0x48.log_165_1276.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 9
|
2020-08-13T19:41:58.000Z
|
2022-03-30T12:22:51.000Z
|
Transynther/x86/_processed/NC/_ht_st_un_/i7-7700_9_0x48.log_165_1276.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 1
|
2021-04-29T06:29:35.000Z
|
2021-05-13T21:02:30.000Z
|
Transynther/x86/_processed/NC/_ht_st_un_/i7-7700_9_0x48.log_165_1276.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 %r8
push %rbp
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_UC_ht+0x39d1, %rsi
lea addresses_UC_ht+0x16f0b, %rdi
nop
nop
nop
nop
sub $39275, %rbx
mov $59, %rcx
rep movsb
nop
nop
nop
nop
add $35251, %rbp
lea addresses_A_ht+0x1948b, %rsi
lea addresses_A_ht+0xfb8b, %rdi
clflush (%rdi)
nop
nop
nop
nop
nop
inc %r8
mov $87, %rcx
rep movsb
nop
nop
nop
nop
xor %rbp, %rbp
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %r8
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %rax
push %rbp
push %rbx
push %rdi
push %rdx
push %rsi
// Store
lea addresses_normal+0x1fcc7, %rbx
cmp $61700, %rdi
movl $0x51525354, (%rbx)
nop
cmp $37964, %rdi
// Store
lea addresses_US+0x1096b, %rbp
nop
nop
nop
dec %rax
mov $0x5152535455565758, %r11
movq %r11, (%rbp)
nop
nop
nop
nop
sub $53741, %rdi
// Store
lea addresses_WC+0x7cf, %rdi
inc %r11
mov $0x5152535455565758, %rsi
movq %rsi, %xmm6
vmovups %ymm6, (%rdi)
inc %rdx
// Faulty Load
mov $0x741243000000038b, %rsi
nop
nop
nop
nop
cmp %rdx, %rdx
vmovups (%rsi), %ymm7
vextracti128 $1, %ymm7, %xmm7
vpextrq $0, %xmm7, %rbp
lea oracles, %r11
and $0xff, %rbp
shlq $12, %rbp
mov (%r11,%rbp,1), %rbp
pop %rsi
pop %rdx
pop %rdi
pop %rbx
pop %rbp
pop %rax
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_NC', 'AVXalign': False, 'congruent': 0, 'size': 16, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal', 'AVXalign': False, 'congruent': 1, 'size': 4, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_US', 'AVXalign': False, 'congruent': 5, 'size': 8, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC', 'AVXalign': False, 'congruent': 1, 'size': 32, 'same': False, 'NT': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_NC', 'AVXalign': False, 'congruent': 0, 'size': 32, 'same': True, 'NT': False}}
<gen_prepare_buffer>
{'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 6, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 8, 'same': True}, 'dst': {'type': 'addresses_A_ht', 'congruent': 10, 'same': False}}
{'53': 1, '4d': 8, '4e': 30, '0f': 1, '03': 2, '0d': 2, 'a0': 2, '44': 1, '35': 2, '1e': 9, '15': 4, 'fa': 103}
44 4d 4d 4d 4d 0f 4d 15 15 15 15 4d 4d 53 4e 4e 4e a0 4e a0 4e 4e 35 4e 4e 4e 4e 4e 4e 35 4e 4e 4e 03 03 4e 0d 0d 4d 1e 4e 1e 1e 4e 4e 1e 4e 4e 4e 4e 4e 4e 4e 1e 4e 1e 4e 1e 4e 1e 1e fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 4e fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
*/
| 22.967742
| 494
| 0.645716
|
9be5aff73d6eb58e603f73949ba0b395ee1dc4e8
| 7,664
|
asm
|
Assembly
|
Transynther/x86/_processed/AVXALIGN/_un_/i9-9900K_12_0xa0_notsx.log_1_483.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 9
|
2020-08-13T19:41:58.000Z
|
2022-03-30T12:22:51.000Z
|
Transynther/x86/_processed/AVXALIGN/_un_/i9-9900K_12_0xa0_notsx.log_1_483.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 1
|
2021-04-29T06:29:35.000Z
|
2021-05-13T21:02:30.000Z
|
Transynther/x86/_processed/AVXALIGN/_un_/i9-9900K_12_0xa0_notsx.log_1_483.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 3
|
2020-07-14T17:07:07.000Z
|
2022-03-21T01:12:22.000Z
|
.global s_prepare_buffers
s_prepare_buffers:
push %r12
push %r8
push %r9
push %rbp
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_UC_ht+0x2b8c, %rcx
clflush (%rcx)
nop
sub $21601, %rbp
mov $0x6162636465666768, %rdx
movq %rdx, %xmm5
vmovups %ymm5, (%rcx)
nop
nop
and %rdx, %rdx
lea addresses_UC_ht+0x678c, %rsi
lea addresses_UC_ht+0x1358c, %rdi
dec %r12
mov $115, %rcx
rep movsl
nop
nop
and %rdx, %rdx
lea addresses_UC_ht+0x378c, %rsi
lea addresses_A_ht+0x735d, %rdi
nop
nop
and %r9, %r9
mov $78, %rcx
rep movsw
nop
nop
nop
nop
and $50791, %r9
lea addresses_UC_ht+0xfd0c, %rsi
lea addresses_normal_ht+0xdd0c, %rdi
nop
dec %r12
mov $81, %rcx
rep movsq
nop
nop
nop
nop
and $13692, %rdx
lea addresses_normal_ht+0xd6cc, %r9
nop
nop
and %rdx, %rdx
movb $0x61, (%r9)
xor %r12, %r12
lea addresses_WC_ht+0x103cc, %rdi
nop
nop
nop
nop
nop
cmp %rcx, %rcx
movw $0x6162, (%rdi)
nop
nop
nop
nop
inc %r12
lea addresses_D_ht+0x1ef4c, %rsi
nop
nop
xor %rdx, %rdx
mov (%rsi), %r12d
nop
nop
nop
nop
xor $28835, %rdi
lea addresses_D_ht+0x1ad8c, %rdi
nop
nop
nop
nop
xor %rcx, %rcx
vmovups (%rdi), %ymm0
vextracti128 $1, %ymm0, %xmm0
vpextrq $0, %xmm0, %rsi
nop
nop
nop
nop
sub $17854, %rcx
lea addresses_D_ht+0x15b4c, %rsi
lea addresses_WT_ht+0x5bcc, %rdi
clflush (%rsi)
add %r8, %r8
mov $88, %rcx
rep movsw
nop
and %rcx, %rcx
lea addresses_WT_ht+0x1bdec, %r12
nop
nop
nop
dec %r9
movups (%r12), %xmm2
vpextrq $1, %xmm2, %rcx
sub $14056, %rsi
lea addresses_A_ht+0x2047, %rsi
lea addresses_normal_ht+0x24c, %rdi
clflush (%rsi)
clflush (%rdi)
nop
nop
sub %rdx, %rdx
mov $108, %rcx
rep movsb
nop
nop
inc %rdx
lea addresses_normal_ht+0x145be, %rsi
lea addresses_WC_ht+0xf98c, %rdi
nop
cmp %r8, %r8
mov $6, %rcx
rep movsl
nop
nop
nop
nop
and $11743, %rsi
lea addresses_D_ht+0x10890, %r8
nop
nop
nop
nop
nop
and %rdi, %rdi
mov (%r8), %rcx
nop
nop
cmp $308, %rcx
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbp
pop %r9
pop %r8
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r12
push %r14
push %r8
push %rax
push %rcx
push %rdi
push %rdx
push %rsi
// Store
lea addresses_D+0x3208, %rsi
clflush (%rsi)
add $18541, %r8
movb $0x51, (%rsi)
nop
cmp $30015, %rsi
// Store
lea addresses_RW+0x1a67c, %rdx
nop
cmp %rsi, %rsi
movl $0x51525354, (%rdx)
nop
nop
nop
nop
nop
inc %r11
// Store
lea addresses_D+0x1b8c, %rdx
nop
nop
nop
nop
nop
inc %r12
movb $0x51, (%rdx)
nop
nop
dec %r12
// Load
lea addresses_WT+0x1bb86, %r14
clflush (%r14)
nop
xor $5021, %rdx
mov (%r14), %si
xor $42633, %r8
// Store
lea addresses_RW+0xe30c, %rax
dec %r11
movw $0x5152, (%rax)
nop
nop
nop
add %r8, %r8
// REPMOV
lea addresses_RW+0x12f1c, %rsi
lea addresses_A+0x2830, %rdi
clflush (%rdi)
nop
nop
nop
nop
and $52931, %r12
mov $125, %rcx
rep movsb
nop
cmp %r14, %r14
// Store
mov $0x4d4, %rax
nop
nop
cmp $16070, %rdi
movw $0x5152, (%rax)
nop
nop
nop
nop
and %rax, %rax
// REPMOV
lea addresses_PSE+0x1cf8c, %rsi
lea addresses_normal+0x17f8c, %rdi
nop
nop
nop
dec %r14
mov $4, %rcx
rep movsw
nop
nop
nop
nop
nop
dec %rax
// REPMOV
lea addresses_normal+0x221b, %rsi
lea addresses_US+0xec2c, %rdi
clflush (%rdi)
nop
nop
nop
nop
nop
inc %r12
mov $87, %rcx
rep movsl
nop
nop
nop
inc %r11
// Store
lea addresses_A+0x1abaa, %r11
add %r14, %r14
mov $0x5152535455565758, %rsi
movq %rsi, (%r11)
nop
dec %r11
// Store
lea addresses_A+0x1498c, %r12
nop
xor %rdx, %rdx
movl $0x51525354, (%r12)
nop
xor $59020, %rsi
// Store
mov $0x4ca5800000000b8c, %r11
nop
nop
nop
nop
and $31984, %rdi
movb $0x51, (%r11)
nop
nop
nop
nop
nop
xor $20828, %rdi
// Store
mov $0x4c09ec0000000c49, %r12
xor %r11, %r11
mov $0x5152535455565758, %r14
movq %r14, %xmm0
movntdq %xmm0, (%r12)
add %rax, %rax
// Faulty Load
lea addresses_normal+0x17f8c, %rsi
nop
nop
nop
sub $44249, %r12
movb (%rsi), %cl
lea oracles, %r14
and $0xff, %rcx
shlq $12, %rcx
mov (%r14,%rcx,1), %rcx
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rax
pop %r8
pop %r14
pop %r12
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_normal', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_D', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 2}}
{'OP': 'STOR', 'dst': {'type': 'addresses_RW', 'AVXalign': False, 'size': 4, 'NT': True, 'same': False, 'congruent': 3}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 10}}
{'src': {'type': 'addresses_WT', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 1}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_RW', 'AVXalign': False, 'size': 2, 'NT': True, 'same': False, 'congruent': 3}}
{'src': {'type': 'addresses_RW', 'congruent': 3, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_A', 'congruent': 1, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_P', 'AVXalign': False, 'size': 2, 'NT': True, 'same': False, 'congruent': 2}}
{'src': {'type': 'addresses_PSE', 'congruent': 11, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal', 'congruent': 0, 'same': True}}
{'src': {'type': 'addresses_normal', 'congruent': 0, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_US', 'congruent': 5, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 1}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 6}}
{'OP': 'STOR', 'dst': {'type': 'addresses_NC', 'AVXalign': True, 'size': 1, 'NT': False, 'same': False, 'congruent': 10}}
{'OP': 'STOR', 'dst': {'type': 'addresses_NC', 'AVXalign': False, 'size': 16, 'NT': True, 'same': False, 'congruent': 0}}
[Faulty Load]
{'src': {'type': 'addresses_normal', 'AVXalign': False, 'size': 1, 'NT': True, 'same': True, 'congruent': 0}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 9}}
{'src': {'type': 'addresses_UC_ht', 'congruent': 11, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_UC_ht', 'congruent': 9, 'same': False}}
{'src': {'type': 'addresses_UC_ht', 'congruent': 10, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_A_ht', 'congruent': 0, 'same': False}}
{'src': {'type': 'addresses_UC_ht', 'congruent': 4, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal_ht', 'congruent': 5, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': True, 'size': 1, 'NT': False, 'same': False, 'congruent': 6}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 4}}
{'src': {'type': 'addresses_D_ht', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 6}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_D_ht', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 9}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_D_ht', 'congruent': 6, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WT_ht', 'congruent': 4, 'same': False}}
{'src': {'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 4}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_A_ht', 'congruent': 0, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal_ht', 'congruent': 6, 'same': True}}
{'src': {'type': 'addresses_normal_ht', 'congruent': 1, 'same': True}, 'OP': 'REPM', 'dst': {'type': 'addresses_WC_ht', 'congruent': 9, 'same': False}}
{'src': {'type': 'addresses_D_ht', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 2}, 'OP': 'LOAD'}
{'e5': 1}
e5
*/
| 20.546917
| 152
| 0.64405
|
ae83d8d6d82c9882011451075e44d6c8f9179636
| 342
|
asm
|
Assembly
|
programs/oeis/022/A022138.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | 1
|
2021-03-15T11:38:20.000Z
|
2021-03-15T11:38:20.000Z
|
programs/oeis/022/A022138.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/022/A022138.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | null | null | null |
; A022138: Fibonacci sequence beginning 5, 13.
; 5,13,18,31,49,80,129,209,338,547,885,1432,2317,3749,6066,9815,15881,25696,41577,67273,108850,176123,284973,461096,746069,1207165,1953234,3160399,5113633,8274032,13387665,21661697,35049362,56711059,91760421,148471480
mov $1,5
mov $3,8
lpb $0
sub $0,1
mov $2,$3
mov $3,$1
add $1,$2
lpe
| 28.5
| 217
| 0.739766
|
4e671e2ab3a8b0409d6489fb1f2e309d6f82f110
| 310
|
asm
|
Assembly
|
programs/oeis/021/A021778.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/021/A021778.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/021/A021778.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A021778: Decimal expansion of 1/774.
; 0,0,1,2,9,1,9,8,9,6,6,4,0,8,2,6,8,7,3,3,8,5,0,1,2,9,1,9,8,9,6,6,4,0,8,2,6,8,7,3,3,8,5,0,1,2,9,1,9,8,9,6,6,4,0,8,2,6,8,7,3,3,8,5,0,1,2,9,1,9,8,9,6,6,4,0,8,2,6,8,7,3,3,8,5,0,1,2,9,1,9,8,9,6,6,4,0,8,2
add $0,1
mov $1,10
pow $1,$0
mul $1,7
div $1,5418
mod $1,10
mov $0,$1
| 28.181818
| 199
| 0.541935
|
8cea353d35d99356abbe2906389008524767dfb2
| 739
|
asm
|
Assembly
|
oeis/073/A073225.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/073/A073225.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/073/A073225.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A073225: a(n) = ceiling(n^n/n!).
; 1,1,2,5,11,27,65,164,417,1068,2756,7148,18614,48639,127464,334865,881658,2325751,6145597,16263867,43099805,114356612,303761261,807692035,2149632062,5726042116,15264691108,40722913455,108713644517,290404350963,776207020880,2075825009902,5554277310718,14868745536620,39821588060721,106696188125886,285992654335446,766879127067901,2057103777254335,5519943051629867,14816805671322668,39784069108519959,106854294545998850,287076021647661435,771468890917894741,2073725455492907880,5575586585767318715
mov $2,1
mov $3,$0
mul $3,5
lpb $3
mul $1,$0
mul $2,$3
trn $1,$2
add $1,$2
mov $4,$0
max $4,1
div $1,$4
div $2,$4
add $2,3
sub $3,1
max $3,1
lpe
mul $1,$0
div $1,$2
add $1,1
mov $0,$1
| 30.791667
| 496
| 0.763194
|
2babc0ff50d7da2b2286e6020cea889df0174eda
| 367
|
asm
|
Assembly
|
libsrc/_DEVELOPMENT/stdlib/c/sdcc_ix/dtoh_callee.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 640
|
2017-01-14T23:33:45.000Z
|
2022-03-30T11:28:42.000Z
|
libsrc/_DEVELOPMENT/stdlib/c/sdcc_ix/dtoh_callee.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 1,600
|
2017-01-15T16:12:02.000Z
|
2022-03-31T12:11:12.000Z
|
libsrc/_DEVELOPMENT/stdlib/c/sdcc_ix/dtoh_callee.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 215
|
2017-01-17T10:43:03.000Z
|
2022-03-23T17:25:02.000Z
|
; size_t dtoh(double x, char *buf, uint16_t prec, uint16_t flag) __z88dk_callee
SECTION code_clib
SECTION code_stdlib
PUBLIC _dtoh_callee, l0_dtoh_callee
EXTERN dcallee1, asm_dtoh
_dtoh_callee:
call dcallee1 ; AC' = x
pop af
pop hl
pop de
pop bc
push af
l0_dtoh_callee:
push ix
call asm_dtoh
pop ix
ret
| 12.655172
| 79
| 0.662125
|
11e49e851c97d0e7b3bd1de42c74e60098a564d8
| 3,832
|
asm
|
Assembly
|
cmd/replace/_parse.asm
|
minblock/msdos
|
479ffd237d9bb7cc83cb06361db2c4ef42dfbac0
|
[
"Apache-2.0"
] | null | null | null |
cmd/replace/_parse.asm
|
minblock/msdos
|
479ffd237d9bb7cc83cb06361db2c4ef42dfbac0
|
[
"Apache-2.0"
] | null | null | null |
cmd/replace/_parse.asm
|
minblock/msdos
|
479ffd237d9bb7cc83cb06361db2c4ef42dfbac0
|
[
"Apache-2.0"
] | null | null | null |
page 60,132 ;
name _parse
title C to PARSER interface
;/*
; * Microsoft Confidential
; * Copyright (C) Microsoft Corporation 1991
; * All Rights Reserved.
; */
;-------------------------------------------------------------------
;
; MODULE: _parse
;
; PURPOSE: Supplies an interface between C programs and
; the DOS 3.3 parser
;
; CALLING FORMAT:
; parse(&inregs,&outregs);
;
; DATE: 5-21-87
;
;-------------------------------------------------------------------
; extrn sysparse:far
public _parse ;AN000;
;-------------------------------------------------------------------
; SET FOR REPLACE
; -------------
FarSW equ 0 ; make sysparse be a NEAR proc ;AN000;
TimeSW equ 0 ; Check time format ;AN000;
FileSW equ 1 ; Check file specification ;AN000;
CAPSW equ 1 ; Perform CAPS if specified ;AN000;
CmpxSW equ 0 ; Check complex list ;AN000;
NumSW equ 0 ; Check numeric value ;AN000;
KeySW equ 0 ; Support keywords ;AN000;
SwSW equ 1 ; Support switches ;AN000;
Val1SW equ 0 ; Support value definition 1 ;AN000;
Val2SW equ 0 ; Support value definition 2 ;AN000;
Val3SW equ 0 ; Support value definition 3 ;AN000;
DrvSW equ 1 ; Support drive only format ;AN000;
QusSW equ 0 ; Support quoted string format ;AN000;
;-------------------------------------------------------------------
DGROUP GROUP _DATA
PGROUP GROUP _TEXT
_DATA segment byte public 'DATA' ;AN000;
BASESW = 1 ;SPECIFY, PSDATA POINTED TO BY "DS"
INCSW = 0 ;PSDATA.INC IS ALREADY INCLUDED
include version.inc
INCLUDE PSDATA.INC ;PARSER'S WORK SPACE
_DATA ends ;AN000;
_TEXT segment byte public 'CODE' ;AN000;
ASSUME CS: PGROUP ;AN000;
ASSUME DS: DGROUP ;AN000;
;-------------------------------------------------------------------
include parse.asm ; include the parser ;AN000;
;-------------------------------------------------------------------
_parse proc near ;AN000;
push bp ; save user's base pointer ;AN000;
mov bp,sp ; set bp to current sp ;AN000;
push di ; save some registers ;AN000;
push si ;AN000;
; copy C inregs into proper registers
mov di,[bp+4] ; fix di (arg 0) ;AN000;
;-------------------------------------------------------------------
mov ax,[di+0ah] ; load di ;AN000;
push ax ; the di value from inregs is now on stack;AN000;
mov ax,[di+00] ; get inregs.x.ax ;AN000;
mov bx,[di+02] ; get inregs.x.bx ;AN000;
mov cx,[di+04] ; get inregs.x.cx ;AN000;
mov dx,[di+06] ; get inregs.x.dx ;AN000;
mov si,[di+08] ; get inregs.x.si ;AN000;
pop di ; get inregs.x.di from stack ;AN000;
push bp ; save base pointer ;AN000;
;-------------------------------------------------------------------
call sysparse ; call the parser ;AN000;
;-------------------------------------------------------------------
pop bp ; restore base pointer ;AN000;
push di ; the di value from call is now on stack;AN000;
mov di,[bp+6] ; fix di (arg 1) ;AN000;
mov [di+00],ax ; load outregs.x.ax ;AN000;
mov [di+02],bx ; load outregs.x.bx ;AN000;
mov [di+04],cx ; load outregs.x.cx ;AN000;
mov [di+06],dx ; load outregs.x.dx ;AN000;
mov [di+08],si ; load outregs.x.si ;AN000;
lahf ; get flags into ax ;AN000;
mov al,ah ; move into low byte ;AN000;
mov [di+0ch],ax ; load outregs.x.cflag ;AN000;
pop ax ; get di from stack ;AN000;
mov [di+0ah],ax ; load outregs.x.di ;AN000;
;-------------------------------------------------------------------
pop si ; restore registers ;AN000;
pop di ;AN000;
mov sp,bp ; restore sp ;AN000;
pop bp ; restore user's bp ;AN000;
ret ;AN000;
_parse endp ;AN000;
_TEXT ends ; end code segment ;AN000;
end ;AN000;
| 30.173228
| 68
| 0.514353
|
9baed8d6de175bbf1f8c29dfb7eee2cbc67e42c6
| 31,905
|
asm
|
Assembly
|
PIC16F4A-memorygame.asm
|
hsandid/PIC16F4A_MemoryGame
|
3282eb8b551931fc4d3d831f9ca2ae67175ee804
|
[
"MIT"
] | 2
|
2020-07-13T20:45:53.000Z
|
2020-07-13T20:46:04.000Z
|
PIC16F4A-memorygame.asm
|
hsandid/PIC16F4A_MemoryGame
|
3282eb8b551931fc4d3d831f9ca2ae67175ee804
|
[
"MIT"
] | 2
|
2020-08-01T08:08:27.000Z
|
2020-08-13T02:16:41.000Z
|
PIC16F4A-memorygame.asm
|
hsandid/PIC16F4A_MemoryGame
|
3282eb8b551931fc4d3d831f9ca2ae67175ee804
|
[
"MIT"
] | null | null | null |
title "t1"
list p=16f84A
radix hex
include "p16f84A.inc"
;INITIALIZING THE GENERAL PURPOSE REGISTERS INSIDE OF THE PIC
;HERE IS THE PURPOSE OF THESE REGISTERS
; C1-A1 .... A2-E2 : THESE ARE THE REGISTERS HOLDING INFO ABOUT THE CARDS => THE FIRST THREE BITS HOLD THE LETTER IDENTIFIER (000 IS A , 001 IS B , 010 IS C ... ) , THE 4TH BIT HOLDS THE 'OPENED/CLOSED' CONDITION , THE 5TH BIT HOLDS THE 'ALREADY OPENED / NEVER OPENED' CONDITION ( FOR MODE 3 ).
; COUNT 1 - 2- 3 -4 -5 : THESE ARE USED IN THE DELAY FUNCTIONS
; POS : THIS HAS TWO DIFFERENT PURPOSES DEPENDING ON WHETHER WE ARE IN A MODE OF MENU => IN MENU : THIS KEEPS TRACK OF WHETHER WE ARE IN POS1 , POS2 , OR POS3 ( '1' , '2' , '3' ). IN THE MODES IT KEEPS TRACK OF THE SECOND HEXADECIMAL NUMBER ASSOCIATED WITH THE DDRAM ADDRESS OF THE CURSOR
; PUD : THIS IS USED IN THE MODES TO KEEP TRACK OF THE FIRST HEXADECIMAL NUMBER FOR THE DDRAM ADDRESS OF THE CURSOR
; STATE : THIS REGISTER IS USED TO KEEP TRACK OF WHICH MENU / MODE WE ARE IN , THIS IS ESPECIALLY HELPFUL WHEN WORKING WITH INTERRUPTS . THE FIRST TWO BITS REPRENSENT THE ACTUAL MENU/MODE ( 00 IS MENU , 01 IS MODE-1 , 10 IS MODE-2 , 11 IS MODE-3 ) . THE FIFTH BIT IS USED IN MODE-3 TO SPECIFIY IF THE PLAYER HAS A NEGATIVE SCORE OF '13' , WHICH LEDS TO SPECIFIC ENDGAME CONDITIONS.
; STATE (cont'd) : THE SEVENTH BIT IS USED IN ALL MODES TO DETERMINE IF WE HAVE ALREADY OPENED ONE CARD AND ARE WAITING FOR THE SECOND CARD , OR IF WE HAVE NOT OPENED A CARD YET.
; TEMP : THIS IS A REGISTER USED TO HOLD TEMPORARY VALUES IN CASE WE WANT TO DO CALCULATIONS , OR WE NEED TO PASS A PARAMETER TO A CERTAIN FUNCTION ( example : Function 'prtScore' )
; TEid1-2: WE USE THIS REGISTER TO HOLD THE 'ADDRESS NUMBER' REPRESENTING A REGISTER HOLDING A CARD . ITS USED MAINLY IN INDIRECT ADDRESSING WHEN WE HAVE TWO CARDS . WE ALREADY HAVE 'PUD/POS' TO HOLD THE POSITION OF THE CURSOR , BUT WE NEED THIS REGISTER TO SOMEHOW IDENTIFY THE LAST CARD SELECTED.
; TEdat1-2: WE USE THIS REGISTER WITH THE PREVIOUS REGISTER 'TEidx' AND INDIRECT ADDRESSING TO OBTAIN THE DATA CONTAINED IN THE SELECTED CARDS AND CHECK FOR A FAIL/MATCH.
; TEMPX-TEMPY : THESE REGISTERS ARE USED TO STORE THE VALUES OF PUD/POS , WHEN WE NEED TO MOVE THE CURSOR TO CHECK OTHER REGISTERS FOR MATCH/FAIL CONDITION.
; PENAL : USED IN MODE-1 TO KEEP TRACK OF THE NUMBER OF MISTAKES THE PLAYER MAKES . THIS REGISTER IS INITIALIZED AT ZERO AND IS INCREMENTED EVERY TIME THE PLAYER MAKES A MISTAKE.
; MATCH : USED IN ALL MODES TO KEEP TRACK OF THE NUMBER OF MATCHES , IT IS INITIALIZED AT ZERO AND TRIGGERS AN ENDGAME CONDITION ONCE IT REACHES SIX.
; GUARD : USED IN ASSOCIATION WITH 'TEMP' IN CERTAIN LOOP CONDITIONS TO CHECK IF A NUMBER IS IN A CERTAIN RANGE.
; TMGUA : USED IN MODE-2 TO KEEP TRACK OF HOW MUCH TIME IS LEFT / HOW MUCH TIME BONUS SHOULD BE ADDED TO THE FINAL SCORE . IT IS INITIALIZED AT NINE AND TRIGGERS AN ENDGAME CONDITION WHEN IT REACHES ZERO.
; SCORE : USED TO KEEP TRACK OF THE FINAL SCORE IN MODE 3.
; NEGT : USED TO KEEP TRACK OF THE NEGATIVE SCORE IN MODE 3.
C1 EQU d'12'
A1 EQU d'13'
E1 EQU d'14'
F1 EQU d'15'
B1 EQU d'16'
D1 EQU d'17'
B2 EQU d'18'
D2 EQU d'19'
F2 EQU d'20'
C2 EQU d'21'
A2 EQU d'22'
E2 EQU d'23'
COUNT1 EQU d'24'
COUNT2 EQU d'25'
COUNT3 EQU d'26'
COUNT4 EQU d'27'
COUNT5 EQU d'28'
POS EQU d'29'
STATE EQU d'30'
PUD EQU d'31'
TEMP EQU d'32'
TEid1 EQU d'33'
TEid2 EQU d'34'
TEdat1 EQU d'35'
TEdat2 EQU d'36'
TEMPX EQU d'37'
TEMPY EQU d'38'
PENAL EQU d'39'
MATCH EQU d'40'
GUARD EQU d'41'
TIMER EQU d'42'
TMGUA EQU d'43'
SCORE EQU d'44'
NEGT EQU d'45'
;WE IDENTIFY THE ADDRESS FOR THE MAIN CODE ( 0X00 ) AND THE ADDRESS FOR THE INTERRUPT CODE (0X04)
;ADDRESS 0X00 : WE GO TO THE 'START' LABEL WHICH BEGINS OUR MAIN CODE WITH THE INITIALIZATION AND THE INFINITE LOOPS
;ADDRESS 0X04 : WE COME HERE AFTER AN INTERRUPT , WITH TWO POSSIBLE PATH DEPENDING ON THE ORIGIN OF THE INTERRUPT
;IF THE ORIGIN OF THE INTERRUPT IS RB0-RB4 ( MENU + ALL MODES ) , WE GO TO THE 'mainInt' FUNCTION .
;IF THE ORIGIN OF THE INTERRUPT IS TMR0 ( MODE 2 ONLY ) , WE GO TO THE 'TMR' FUNCTION .
ORG 0x0
GOTO START
ORG 0x4
BTFSC INTCON,RBIF
GOTO mainInt
BTFSC INTCON,T0IF
GOTO TMR
; START [] INTERRUPT FUNCTIONS !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
;['mainInt'] : In this function we check the state ( which menu/mode we are in )
;and we go to the appropriate function.
;The state is initialized in the 'MAIN' code before each function
mainInt:
BTFSC STATE,1
GOTO mdstate
BTFSC STATE,0
GOTO mdstate
GOTO mnState
; HERE ARE ALL THE FUNCTIONS RE-USED BY THE MENU AND MODES
; START [] RE-USED CODE
;['bckmenu'] : Used to go back to 'MENU' without enabling back interrupts.
bckmn:
BCF INTCON,RBIF
GOTO menu
;['clRBF'] clears the rbf flag associated to rb0-rb4 interrupts + resets the GIE flag to 1 ( which says we are exiting the
;interrupt function and can use other interrupts again ).
clRBF:
BCF INTCON,RBIF
RETFIE
;['buz'] is the function associated with the buzzer. It's used in almost every mode
buz:
BSF PORTB,0
call delay5sec
BCF PORTB,0
RETURN
;['buzc001'] is the function associated with the buzzer + return to the infinite loop. It's used in almost every mode when we have an error ( i.e. user presses right/left when on the edge of the cards table )
buzc001:
CALL buz
BCF INTCON,RBIF
RETFIE
;['redled'] is the function associated with the Red LED. It's used in almost every mode
redled:
BSF PORTB,2
CALL delay5sec
BCF PORTB,2
RETURN
;['greenled'] is the function associated with the Green LED. It's used in almost every mode
greenled:
BSF PORTB,3
CALL delay5sec
BCF PORTB,3
RETURN
;['mdState'] : This function is associated to all modes . We check which button was pressed and go to the appropriate function.
mdstate:
BTFSS PORTB,7
GOTO enMd
BTFSS PORTB,6
GOTO udMd
BTFSS PORTB,5
GOTO riMd
BTFSS PORTB,4
GOTO leMd
CALL addCur
GOTO clRBF
;['riMd'] : This function is entered if we press the right button in any mode. The PUD/POS counters are increment correctly , and we check if we are on the right edge while moving , if so we do not move and only
;activate the buzzer.
riMd:
MOVF POS,0
MOVWF POS
MOVWF TEMP
MOVLW b'00101'
SUBWF TEMP
BTFSC STATUS,Z
GOTO buzc001
MOVF PUD,0
CALL simPorta
INCF POS
MOVF POS,0
CALL simPorta
GOTO clRBF
;['leMd'] : This function is entered if we press the left button in any mode. The PUD/POS counters are increment correctly , and we check if we are on the left edge while moving , if so we do not move and only
;activate the buzzer.
leMd:
MOVF POS,0
MOVWF POS
MOVWF TEMP
MOVLW b'00000'
SUBWF TEMP
BTFSC STATUS,Z
GOTO buzc001
MOVF PUD,0
CALL simPorta
DECF POS
MOVF POS,0
CALL simPorta
GOTO clRBF
;[udMd,ign ,ign2]: Functions associated to the up/down button in all modes
;POS and PUD are incremented properly to switch lines
udMd:
MOVLW b'01100'
SUBWF PUD
BTFSC STATUS,Z
GOTO ign
MOVWF PUD
GOTO ign2
ign: MOVLW b'01000'
MOVWF PUD
ign2:
MOVF PUD,0
CALL simPorta
MOVF POS,0
CALL simPorta
GOTO clRBF
;[enMd,ixa ,ixa2]: Functions associated to the confirm button in all modes
;We use it to display the letters selected , and then lead into function which will check whether or not the cards match
enMd:
MOVF PUD,0
SUBLW b'01100'
BTFSC STATUS,Z
GOTO ixa
MOVLW d'12'
GOTO ixa1
ixa: MOVLW d'18'
ixa1: MOVWF TEMP
MOVF POS,0
ADDWF TEMP
MOVF TEMP,0
MOVWF FSR
BTFSS INDF,3
GOTO displ
CALL buz
CALL addCur
GOTO clRBF
;['notEmpty'] : If we have two cards selected , we checked if they match or not. If they match we enter the 'matcc' function , if they do not match we enter the 'arl' function.
notEmpty:
MOVF FSR,0
MOVWF TEid1
MOVF INDF,0
MOVWF TEdat1
MOVF TEid2,0
MOVWF FSR
MOVF INDF,0
MOVWF TEdat2
MOVF TEdat1,0
XORWF TEdat2,0
MOVWF TEMP
BTFSC TEMP,2
GOTO arl
BTFSC TEMP,1
GOTO arl
BTFSC TEMP,0
GOTO arl
GOTO matcc
;['displ','chkbit1','chkbit2','aDisp','bDisp','cDisp','dDisp','eDisp','fDisp'] : This function is used when we click on a card to display the letter associated with that card.
;We used indirect addressing to proceed.
displ:
BSF INDF,3
BTFSC INDF,2
GOTO chkbit2
BTFSC INDF,1
GOTO chkbit1
BTFSC INDF,0
GOTO bDisp
GOTO aDisp
chkbit1:
BTFSC INDF,0
GOTO dDisp
GOTO cDisp
chkbit2:
BTFSC INDF,0
GOTO fDisp
GOTO eDisp
aDisp:
CALL A
GOTO chkMat
bDisp:
CALL Bl
GOTO chkMat
cDisp:
CALL Cl
GOTO chkMat
dDisp:
CALL D
GOTO chkMat
eDisp:
CALL E
GOTO chkMat
fDisp:
CALL Fl
GOTO chkMat
;['prtScore' , 'chk0' till 'chk18'] : Used in Mode-2 and Mode-3 to print the updated scores
prtScore:
MOVLW d'0'
SUBWF TEMP,0
BTFSS STATUS,Z
GOTO chk0
CALL numInit
CALL ZERO
CALL doSpace
RETURN
chk0: DECFSZ TEMP,f
GOTO chk1
CALL numInit
CALL ONE
CALL doSpace
RETURN
chk1: DECFSZ TEMP,f
GOTO chk2
CALL numInit
CALL TWO
CALL doSpace
RETURN
chk2: DECFSZ TEMP,f
GOTO chk3
CALL numInit
CALL THREE
CALL doSpace
RETURN
chk3: DECFSZ TEMP,f
GOTO chk4
CALL numInit
CALL FOUR
CALL doSpace
RETURN
chk4: DECFSZ TEMP,f
GOTO chk5
CALL numInit
CALL FIVE
CALL doSpace
RETURN
chk5: DECFSZ TEMP,f
GOTO chk6
CALL numInit
CALL SIX
CALL doSpace
RETURN
chk6: DECFSZ TEMP,f
GOTO chk7
CALL numInit
CALL SEVEN
CALL doSpace
RETURN
chk7: DECFSZ TEMP,f
GOTO chk8
CALL numInit
CALL EIGHT
CALL doSpace
RETURN
chk8: DECFSZ TEMP,f
GOTO chk9
CALL numInit
CALL NINE
CALL doSpace
RETURN
chk9: DECFSZ TEMP,f
GOTO chk10
CALL numInit
CALL ONE
CALL numInit
CALL ZERO
RETURN
chk10: DECFSZ TEMP,f
GOTO chk11
CALL numInit
CALL ONE
CALL numInit
CALL ONE
RETURN
chk11: DECFSZ TEMP,f
GOTO chk12
CALL numInit
CALL ONE
CALL numInit
CALL TWO
RETURN
chk12: DECFSZ TEMP,f
GOTO chk13
CALL numInit
CALL ONE
CALL numInit
CALL THREE
RETURN
chk13: DECFSZ TEMP,f
GOTO chk14
CALL numInit
CALL ONE
CALL numInit
CALL FOUR
RETURN
chk14: DECFSZ TEMP,f
GOTO chk15
CALL numInit
CALL ONE
CALL numInit
CALL FIVE
RETURN
chk15: DECFSZ TEMP,f
GOTO chk16
CALL numInit
CALL ONE
CALL numInit
CALL SIX
RETURN
chk16: DECFSZ TEMP,f
GOTO chk17
CALL numInit
CALL ONE
CALL numInit
CALL SEVEN
RETURN
chk17: DECFSZ TEMP,f
GOTO chk18
CALL numInit
CALL ONE
CALL numInit
CALL EIGHT
RETURN
chk18:
CALL numInit
CALL ONE
CALL numInit
CALL NINE
RETURN
;['failBack'] : ; Come back from fail condition on any mode
failBack:
CALL redled
CALL addCur
CALL cle
BCF STATE,7
GOTO clRBF
; END [] RE-USED CODE
; HERE ARE ALL THE FUNCTIONS USED EXCLUSIVELY BY THE MENU
; START [] MENU CODE
;['mnState'] : If the actual state is 'MENU' , we enter this function
;We check which interrupt is at the origin of the interrupt function call
;If it's the right button (rb5) we enter 'riMenu' , if it's the confirm button (rb7) we enter the 'enMenu'
mnState:
BTFSS PORTB,5
GOTO riMenu
BTFSS PORTB,7
GOTO enMenu
BCF INTCON,RBIF
RETFIE
;['enMenu'] : This function is entered if the confirm button was pressed in the 'MENU'
;Bit 7 of the State Register is set to '1' , this is going to trigger an entry into a mode ( depending on the value of the 'POS' register )
;Notice how we do not enable all interrupts ( No 'RETFIE' instructions ) , this is to avoid any interrupt call during the initialization of the selected mode
enMenu:
BSF STATE,7
BCF INTCON,RBIF
GOTO movlop
;['riMenu'] : This function is used when the right button is pressed in the menu
;We check the current position and go to the appropriate function to move
;from a pos to another
;!!!!!!!!!!!Watch out ! Pos1 does not mean position next to number '1' , same goes for pos2 and pos3 .
;I named them depending on how easy it was to check the bits in the POS register which indicates the actual position
;POS is initialized at zero when we enter the MENU state.
riMenu:
BTFSC POS,1
GOTO riPos3to1
BTFSC POS,0
GOTO riPos2to3
GOTO riPos1to2
;['riPos3to1'] : This function handles going from pos 1 to pos 2 in the MENU
riPos3to1:
MOVLW b'01000'
CALL simPorta
MOVLW b'01011'
CALL simPorta
CALL doSpace
MOVLW b'01000'
CALL simPorta
MOVLW b'00101'
CALL simPorta
CALL STAR
MOVLW b'00000000'
MOVWF POS
GOTO clRBF
;['riPos2to3'] :This function handles going from pos 2 to pos 3 in the MENU
riPos2to3:
MOVLW b'01000'
CALL simPorta
MOVLW b'01000'
CALL simPorta
CALL doSpace
MOVLW b'01000'
CALL simPorta
MOVLW b'01011'
CALL simPorta
CALL STAR
MOVLW b'00000011'
MOVWF POS
GOTO clRBF
;['riPos1to2'] :This function handles going from pos 3 to pos 1 in the MENU
riPos1to2:
MOVLW b'01000'
CALL simPorta
MOVLW b'00101'
CALL simPorta
CALL doSpace
MOVLW b'01000'
CALL simPorta
MOVLW b'01000'
CALL simPorta
CALL STAR
MOVLW b'00000001'
MOVWF POS
GOTO clRBF
; END [] MENU CODE
; HERE ARE ALL THE FUNCTIONS USED EXCLUSIVELY BY MODE-1
; START [] MODE-1 CODE
;['md1fail'] : Increments the number of fail and displays a symbol for the error if a certain threshold has been reached
;[hnar,nms,endlh,pmos,xkcd] are random labels used for looping purposes
md1fail:
CALL remCur
MOVF PENAL,0
MOVWF TEMP
MOVLW d'11'
MOVWF GUARD
MOVLW b'01000'
MOVWF PUD
CALL simPorta
MOVLW b'01001'
MOVWF POS
CALL simPorta
CALL blkbox
hnar: DECFSZ GUARD,F
GOTO nmos
GOTO failBack
nmos: DECFSZ TEMP,F
GOTO endlh
GOTO failBack
endlh: DECFSZ GUARD,F
GOTO pmos
GOTO failBack
pmos DECFSZ TEMP,F
GOTO xkcd
GOTO failBack
xkcd: CALL blkbox
GOTO hnar
;['SUPER','flash3'] :Write SUPER & light associated leds. Go back to endgame condition when done.
;We have the 'flash3' label here , which is used to light up the LEDS in case of a win in MODE-3.
SUPER:
CALL Sl
CALL U
CALL P
CALL E
CALL Rl
flash3:
CALL delay5sec
CALL greenled
CALL redled
CALL greenled
CALL redled
CALL greenled
GOTO bckmn
;['AVG']:Write AVG & light associated leds. Go back to endgame condition when done.
AVG:
CALL A
CALL V
CALL G
CALL delay5sec
CALL greenled
GOTO bckmn
;['WEAK'] : Write WEAK & light associated leds. Go back to endgame condition when done.
WEAK:
CALL Wl
CALL E
CALL A
CALL K
CALL delay5sec
CALL redled
GOTO bckmn
; END [] MODE-1 CODE
; HERE ARE ALL THE FUNCTIONS USED EXCLUSIVELY BY MODE-2
; START [] MODE-2 CODE
;['TMR','RETX','tmInc' ,'timEnd'] : Every time the TMR0 interrupt is activated we enter TMR , which will decrease the 'TIMER' register
;till it reaches zero ( this takes 10 seconds at clock frequency 4MHZ , with 'TIMER' initialized at a value of 76 and appropriate configuration of
; the 'OPTION' register ). When we reach a countdown of 10 seconds , we decrement the value
; of 'TMGUA' ( or timer guard ) , which starts at a value of 9 ( to represent the 90 seconds of the mode) .The displayed value on the pic
;is modified according to 'TMGUA'. Once 'TMGUA' reaches zero , the time is over and move on to the endgame with a value of 'TMGUA' equal to zero.
;'RETX','tmInc' ,'timEnd' labels are used for looping conditions.
TMR:
DECFSZ TIMER,f
GOTO RETX
MOVLW d'76'
MOVWF TIMER
GOTO tmInc
RETX: CALL addCur
BCF INTCON,2
RETFIE
tmInc:
MOVLW b'01000'
CALL simPorta
MOVLW b'01101'
CALL simPorta
DECF TMGUA
CALL numInit
MOVLW d'8'
SUBWF TMGUA,0
BTFSC STATUS,Z
CALL EIGHT
MOVLW d'7'
SUBWF TMGUA,0
BTFSC STATUS,Z
CALL SEVEN
MOVLW d'6'
SUBWF TMGUA,0
BTFSC STATUS,Z
CALL SIX
MOVLW d'5'
SUBWF TMGUA,0
BTFSC STATUS,Z
CALL FIVE
MOVLW d'4'
SUBWF TMGUA,0
BTFSC STATUS,Z
CALL FOUR
MOVLW d'3'
SUBWF TMGUA,0
BTFSC STATUS,Z
CALL THREE
MOVLW d'2'
SUBWF TMGUA,0
BTFSC STATUS,Z
CALL TWO
MOVLW d'1'
SUBWF TMGUA,0
BTFSC STATUS,Z
CALL ONE
MOVLW d'0'
SUBWF TMGUA,0
BTFSC STATUS,Z
GOTO timEnd
MOVF PUD,0
CALL simPorta
MOVF POS,0
CALL simPorta
GOTO RETX
timEnd:
CALL ZERO
GOTO endgame
;['md2endgamechk']: Endgame check for 'MODE-2'
;It is triggered if TMGUA reaches zero , or the value of the 'MATCH' register is equal to six.
;The final score is displayed on the screen , and we return to the 'MENU' after a small delay.
md2endgamechk:
MOVLW b'01000'
CALL simPorta
CALL Sl
CALL Cl
CALL Ol
CALL Rl
CALL E
CALL doSpace
MOVF TMGUA,0
ADDWF MATCH,0
MOVWF TEMP
MOVF TMGUA,0
ADDWF MATCH,F
MOVF MATCH,0
MOVWF TEMP
CALL prtScore
CALL delay5sec
BCF INTCON,RBIF
BCF INTCON,2
BCF INTCON,5
GOTO menu
;['md2fail']: Mode 2 has no fail condition related to errors by the players
;This function is just used to redirect the interrupt function to the main loop
md2fail:
GOTO failBack
; END [] MODE-2 CODE
; HERE ARE ALL THE FUNCTIONS USED EXCLUSIVELY BY MODE-2
; START [] MODE-3 CODE
;['md3UpPos'] : We enter this function when we have a match in MODE-3 . We increment the MATCH register , update the positive score and the main score on the PIC LED , then go back to the common MATCH check to see if MATCH is equal to SIX ( or if we should proceed to endgame )
md3UpPos:
MOVLW b'01000'
CALL simPorta
MOVLW b'01101'
CALL simPorta
MOVF MATCH,0
MOVWF TEMP
CALL prtScore
INCF SCORE,F
MOVLW b'01100'
CALL simPorta
MOVLW b'01110'
CALL simPorta
MOVF SCORE,0
MOVWF TEMP
CALL prtScore
GOTO matccReg
;['md3endgamechk'] : Endgame function for mode-3 . Check if we the player has lost ( go to buzzer ) or won ( go to flash3 to light the leds up )
md3endgamechk:
MOVLW b'01000'
CALL simPorta
BTFSS STATE,5
GOTO flash3
CALL delay5sec
BCF INTCON,RBIF
GOTO menu
;['md3fail','decScore','skipfz'] : Used to apply failure conditions in mode3
;We check if the card has already been opened ( bit 4 of the card register , here taken as INDF ) to decide if we should remove a point or not for the card
md3fail:
MOVF TEid1,0
MOVWF FSR
CALL decScore
MOVLW d'13'
SUBWF NEGT,0
BTFSC STATUS,Z
GOTO firstCheck
MOVF TEid2,0
MOVWF FSR
CALL decScore
;['firstCheck'] : Print out the new Negative score and the new Total score
firstCheck:
MOVLW b'01000'
CALL simPorta
MOVLW b'01001'
CALL simPorta
MOVF NEGT,0
MOVWF TEMP
CALL prtScore
MOVLW b'01100'
CALL simPorta
MOVLW b'01110'
CALL simPorta
MOVF SCORE,0
MOVWF TEMP
CALL prtScore
MOVLW d'13'
SUBWF NEGT,0
BTFSS STATUS,Z
GOTO failBack
CALL buz
BSF STATE,5
GOTO endgame
decScore:
BTFSS INDF,4
GOTO skipfz
DECF SCORE,f
INCF NEGT,f
skipfz:
BSF INDF,4
RETURN
; END [] MODE-3 CODE
; THE FOLLWING CODE CAN NOT BE PUT IN A SPECIFIC CATEGORY , IT IS A MIX OF SPECIFIC AND RE-USED CODE
; START [] SPECIAL CODE
;['endgame']: Entered when an endgame condition is triggered in each respective mode
;[loz1,AZL,NOM1,NOM2,AZI] are random labels used for looping purposes
endgame: ;
CALL delay5sec
CALL cardinit
CALL remCur
MOVLW b'01100' ; SEPARATE INIT FOR THE CURSOR ON SECOND LINE !
CALL simPorta
BTFSS STATE,0
GOTO md2endgamechk ; No fail condition on mode2
BTFSC STATE,1
GOTO md3endgamechk
;If passed condition , assume endgame for mode1 reached
MOVLW b'01001'
CALL simPorta
MOVLW d'5'
MOVWF TEMP
MOVF PENAL,0
ADDWF PENAL,0
BTFSC STATUS,Z
GOTO SUPER
loz1:
DECFSZ TEMP,F
GOTO AZL
GOTO nom1
AZL: DECFSZ PENAL,F
GOTO loz1
GOTO SUPER
nom1:
MOVLW d'5'
MOVWF TEMP
nom2:
DECFSZ TEMP,F
GOTO AZI
GOTO WEAK
AZI: DECFSZ PENAL,F
GOTO nom2
GOTO AVG
;['chkMat'] : check if we have already selected one card . If no card has been previously selected we save the address of the selected card for later access using indirect addressing.]
;Else , we go into function 'notEmpty'
chkMat:
BTFSC STATE,7
GOTO notEmpty
BSF STATE,7
MOVF FSR,0
MOVWF TEid2
MOVF PUD,0
MOVWF TEMPY
MOVF POS,0
MOVWF TEMPX
CALL cle
CALL addCur
GOTO clRBF
;['arl'] : ; cards selected do not match , close them and reset them as 'unopened' + add to the fail score
arl:
MOVF PUD,0
CALL simPorta
MOVF POS,0
CALL simPorta
CALL card
MOVF TEid1,0
MOVWF FSR
BCF INDF,3
MOVF TEid2,0
MOVWF FSR
BCF INDF,3
MOVF TEMPY,0
MOVWF PORTA
CALL ET
MOVF TEMPX,0
MOVWF PORTA
CALL ET
CALL card
INCF PENAL
BTFSS STATE,0
GOTO md2fail ; No fail condition on mode2
BTFSS STATE,1
GOTO md1fail
GOTO md3fail
;['matcc','matccReg','bckb']: This function is entered in case the player selects a matching pair , it increases the MATCH counter and redirects to other functions depending on the actual MODE
matcc:
CALL buz
INCF MATCH
BTFSS STATE,0
GOTO matccReg
BTFSC STATE,1
GOTO md3UpPos
matccReg:
MOVLW d'6'
SUBWF MATCH,0
BTFSS STATUS,Z
GOTO bckb
GOTO endgame
bckb:
BCF STATE,7
CALL cle
CALL addCur
GOTO clRBF
; END [] SPECIAL CODE
;END OF CONFIRM BUTTON ACTIONS FOR MODE 1
; END [] INTERRUPT FUNCTIONS !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
; START [] PROGRAM CODE
START:
;SETTING INPUTS AND OUTPUTS
BSF STATUS,RP0
MOVLW b'10000111'
MOVWF OPTION_REG
CLRF TRISA
CLRF TRISB
BSF TRISB,4
BSF TRISB,5
BSF TRISB,6
BSF TRISB,7
BCF STATUS,RP0
CLRF INTCON
BSF INTCON,3
CLRF PORTB
CLRF PORTA
;INITIALIAZING CARD SET
CALL cardinit
init:
;INITIALIZING THE LED SCREEN
MOVLW b'00010'
CALL simPorta
MOVLW b'00010'
CALL simPorta
MOVLW b'01000'
CALL simPorta
CALL remCur
MOVLW b'00000'
CALL simPorta
MOVLW b'00001'
CALL simPorta
MOVLW b'00000'
CALL simPorta
MOVLW b'00110'
CALL simPorta
MOVLW b'01000'
CALL simPorta
MOVLW b'00000'
CALL simPorta
;END OF LED SCREEN INIT
wlc:
;START 'WELCOME SCREEN'
CALL do2Space
CALL M
CALL E
CALL M
CALL Ol
CALL Rl
CALL Y
CALL do2Space
CALL G
CALL A
CALL M
CALL E
CALL delay5sec
;END 'WELCOME SCREEN'
menu:
;START 'INITIALIZE MENU DISPLAY'
CALL clrsc
MOVLW b'00000000'
MOVWF STATE
CALL cle
CALL M
CALL Ol
CALL D
CALL E
CALL do2Space
CALL numInit
CALL ONE
CALL do2Space
CALL numInit
CALL TWO
CALL do2Space
CALL numInit
CALL THREE
;GO TO INDEX NEXT TO '1'
MOVLW b'01000'
CALL simPorta
MOVLW b'00101'
CALL simPorta
CALL STAR
;END 'INITIALIZE MENU DISPLAY'
;INTERRUPT ARE MADE ACTIVE AGAIN
BSF INTCON,GIE
;INFINITE LOOP FOR MENU
movlop:
BTFSS STATE,7
GOTO movlop
BTFSC POS,1
GOTO mode3
BTFSC POS,0
GOTO mode2
GOTO mode1
GOTO movlop
;FOR PHASE 1 , WE ONLY COMPLETED THE CODE FOR MODE1
mode1:
;START 'INITIALIZE MODE 1 DISPLAY AND REGISTERS'
CALL clrsc
MOVLW d'0'
MOVWF MATCH
MOVWF PENAL
MOVLW b'00000001'
MOVWF STATE
CALL cle
CALL clrsc
CALL sixCard
CALL do2Space
CALL Sl
CALL symbol
CALL symbol
CALL symbol
CALL symbol
CALL symbol
CALL symbol
CALL Wl
CALL JUMPLINE
CALL sixCard
CALL cle
CALL addCur
;END 'INITIALIZE MODE 1 DISPLAY AND REGISTERS'
;INTERRUPT ARE MADE ACTIVE AGAIN
BSF INTCON,GIE
;INFINITE LOOP FOR MODE 1
movlop1:
GOTO movlop1
;FOR PHASE 1 , WE DID NOT COMPLETE THE MODE2 CODE BELOW
mode2:
;START 'INITIALIZE MODE 2 DISPLAY AND REGISTERS'
CALL clrsc
MOVLW b'00000010'
MOVWF STATE
MOVLW d'76'
MOVWF TIMER
MOVLW d'9'
MOVWF TMGUA
MOVLW d'0'
MOVWF MATCH
CALL sixCard
CALL do2Space
CALL Rl
CALL E
CALL M
CALL doSpace
CALL T
CALL numInit
CALL NINE
CALL numInit
CALL ZERO
CALL JUMPLINE
CALL sixCard
CALL cle
CALL addCur
;END 'INITIALIZE MODE 2 DISPLAY AND REGISTERS'
;INTERRUPT ARE MADE ACTIVE AGAIN
BSF INTCON,GIE
BSF INTCON,T0IE
;INFINITE LOOP IN MODE 2
movlop2:
GOTO movlop2
;FOR PHASE 1 , WE DID NOT COMPLETE THE MODE3 CODE BELOW
mode3:
;START 'INITIALIZE MODE 3 DISPLAY AND REGISTERS'
CALL clrsc
MOVLW b'00000011'
MOVWF STATE
MOVLW d'13'
MOVWF SCORE
MOVLW d'0'
MOVWF NEGT
MOVWF MATCH
CALL clrsc
CALL sixCard
CALL do2Space
CALL MINUS
CALL numInit
CALL ZERO
CALL do2Space
CALL PLUS
CALL numInit
CALL ZERO
CALL JUMPLINE
CALL sixCard
CALL do2Space
CALL Sl
CALL Cl
CALL Ol
CALL Rl
CALL E
CALL doSpace
CALL numInit
CALL ONE
CALL numInit
CALL THREE
CALL cle
CALL addCur
;END 'INITIALIZE MODE 3 DISPLAY AND REGISTERS'
;INTERRUPT ARE MADE ACTIVE AGAIN
BSF INTCON,GIE
;INFINITE LOOP IN MODE 3
movlop3:
GOTO movlop3
card:
;Display at cursor position the special card symbol used to represent a face-down card
MOVLW b'11101'
MOVWF PORTA
CALL ET
MOVLW b'11011'
MOVWF PORTA
CALL ET
RETURN
sixCard:
CALL card
CALL card
CALL card
CALL card
CALL card
CALL card
RETURN
blkbox:
;Display at cursor position the special symbol used in Mode 1 : error
MOVLW b'11111'
MOVWF PORTA
CALL ET
MOVLW b'11111'
MOVWF PORTA
CALL ET
RETURN
symbol:
;Display at cursor position a particular symbol present in each mode
MOVLW b'11010'
MOVWF PORTA
CALL ET
MOVLW b'10011'
MOVWF PORTA
CALL ET
RETURN
clrsc:
;clear display func
MOVLW b'00000'
MOVWF PORTA
CALL ET
MOVLW b'00001'
MOVWF PORTA
CALL ET
RETURN
ET:
;ET function is used everytime we send data to the LCD
BSF PORTB,1
NOP
BCF PORTB,1
CALL delay40ms
RETURN
doSpace:
;display a Space at cursor position
MOVLW b'10010'
MOVWF PORTA
CALL ET
MOVLW b'10000'
MOVWF PORTA
CALL ET
RETURN
do2Space:
;display a Space at cursor position
CALL doSpace
CALL doSpace
RETURN
JUMPLINE:
;Go to address 0x40 on the LCD display
MOVLW b'01100'
CALL simPorta
MOVLW b'00000'
CALL simPorta
RETURN
A:
;display Letter A at cursor position
MOVLW b'10100'
CALL simPorta
MOVLW b'10001'
CALL simPorta
RETURN
Bl:
;display Letter B at cursor position
MOVLW b'10100'
CALL simPorta
MOVLW b'10010'
CALL simPorta
RETURN
Cl:
;display Letter C at cursor position
MOVLW b'10100'
CALL simPorta
MOVLW b'10011'
CALL simPorta
RETURN
D:
;display Letter D at cursor position
MOVLW b'10100'
CALL simPorta
MOVLW b'10100'
CALL simPorta
RETURN
E:
;display Letter E at cursor position
MOVLW b'10100'
CALL simPorta
MOVLW b'10101'
CALL simPorta
RETURN
Fl:
;display Letter F at cursor position
MOVLW b'10100'
MOVWF PORTA
CALL ET
MOVLW b'10110'
CALL simPorta
RETURN
G:
;display Letter G at cursor position
MOVLW b'10100'
CALL simPorta
MOVLW b'10111'
CALL simPorta
RETURN
K:
;display Letter K at cursor position
MOVLW b'10100'
CALL simPorta
MOVLW b'11011'
CALL simPorta
RETURN
M:
;display Letter m at cursor position
MOVLW b'10100'
CALL simPorta
MOVLW b'11101'
CALL simPorta
RETURN
Ol:
;display Letter O at cursor position
MOVLW b'10100'
CALL simPorta
MOVLW b'11111'
CALL simPorta
RETURN
P:
;display Letter P at cursor position
MOVLW b'10101'
CALL simPorta
MOVLW b'10000'
CALL simPorta
RETURN
Rl:
;display Letter R at cursor position
MOVLW b'10101'
CALL simPorta
MOVLW b'10010'
CALL simPorta
RETURN
Sl:
;display Letter S at cursor position
MOVLW b'10101'
CALL simPorta
MOVLW b'10011'
CALL simPorta
RETURN
T:
;display Letter T at cursor position
MOVLW b'10101'
CALL simPorta
MOVLW b'10100'
CALL simPorta
RETURN
U:
;display Letter U at cursor position
MOVLW b'10101'
CALL simPorta
MOVLW b'10101'
CALL simPorta
RETURN
V:
;display Letter V at cursor position
MOVLW b'10101'
CALL simPorta
MOVLW b'10110'
CALL simPorta
RETURN
Wl:
;display Letter W at cursor position
MOVLW b'10101'
CALL simPorta
MOVLW b'10111'
CALL simPorta
RETURN
Y:
;display Letter Y at cursor position
MOVLW b'10101'
CALL simPorta
MOVLW b'11001'
CALL simPorta
RETURN
numInit:
MOVLW b'10011'
CALL simPorta
RETURN
ZERO:
;display Number 0 at cursor position
MOVLW b'10000'
CALL simPorta
RETURN
ONE:
;display Number 1 at cursor position
MOVLW b'10001'
CALL simPorta
RETURN
TWO:
;display Number 2 at cursor position
MOVLW b'10010'
CALL simPorta
RETURN
THREE:
;display Number 3 at cursor position
MOVLW b'10011'
CALL simPorta
RETURN
FOUR:
;display Number 4 at cursor position
MOVLW b'10100'
CALL simPorta
RETURN
FIVE:
;display Number 5 at cursor position
MOVLW b'10101'
CALL simPorta
RETURN
SIX:
;display Number 6 at cursor position
MOVLW b'10110'
CALL simPorta
RETURN
SEVEN:
;display Number 7 at cursor position
MOVLW b'10111'
CALL simPorta
RETURN
EIGHT:
;display Number 8 at cursor position
MOVLW b'11000'
CALL simPorta
RETURN
NINE:
;display Number 9 at cursor position
MOVLW b'11001'
CALL simPorta
RETURN
PLUS:
;display Symbol + at cursor position
MOVLW b'10010'
CALL simPorta
MOVLW b'11011'
CALL simPorta
RETURN
MINUS:
;display Symbol - at cursor position
MOVLW b'10010'
CALL simPorta
MOVLW b'11101'
CALL simPorta
RETURN
STAR:
;display Symbol * at cursor position
MOVLW b'10010'
CALL simPorta
MOVLW b'11010'
CALL simPorta
RETURN
cle:
; Here we reset the cursor position to home
; Also we reset the registers tracking the position of the cursor
; (POS and PUD) to the home address
MOVLW b'00000'
CALL simPorta
MOVLW b'00010'
CALL simPorta
MOVLW b'01000'
MOVWF PUD
MOVLW b'00000'
MOVWF POS
RETURN
cardinit:
; Here we initialize the card values inside each register + init match register
;c1 & c2
MOVLW b'00010'
MOVWF d'12'
MOVWF d'21'
;a1 & a2
MOVLW b'00000'
MOVWF d'13'
MOVWF d'22'
;e1 & e2
MOVLW b'00100'
MOVWF d'14'
MOVWF d'23'
;f1& f2
MOVLW b'00101'
MOVWF d'15'
MOVWF d'20'
;b1& b2
MOVLW b'00001'
MOVWF d'16'
MOVWF d'18'
;d1 & d2
MOVLW b'00011'
MOVWF d'17'
MOVWF d'19'
RETURN
remCur:
; Here we set the cursor display option to '0'
MOVLW b'00000'
CALL simPorta
MOVLW b'01100'
CALL simPorta
RETURN
addCur:
; Here we set the cursor display option to '1'
MOVLW b'00000'
CALL simPorta
MOVLW b'01110'
CALL simPorta
RETURN
;START "DELAY FUNC : 40MS"
delay40ms: MOVLW H'00'
MOVWF COUNT2
MOVLW D'52'
MOVWF COUNT1
loop40: INCFSZ COUNT2,F
GOTO loop40
DECFSZ COUNT1,F
GOTO loop40
RETURN
;END "DELAY FUNC : 40MS"
;START "DELAY FUNC : 5SEC"
delay5sec:
MOVLW d'0'
MOVWF COUNT3
MOVWF COUNT4
MOVLW d'4'
MOVWF COUNT5
loop5sec: INCFSZ COUNT3,F
goto loop5sec
INCFSZ COUNT4,F
goto loop5sec
DECFSZ COUNT5,F
goto loop5sec
RETURN
simPorta:
MOVWF PORTA
CALL ET
RETURN
;END "DELAY FUNC : 5SEC"
END
| 17.199461
| 381
| 0.678984
|
92a94636bfce806a5c4cb2b73e686e6b21cce569
| 544
|
asm
|
Assembly
|
libsrc/_DEVELOPMENT/math/float/math48/z80/am48_ddiv_s.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 640
|
2017-01-14T23:33:45.000Z
|
2022-03-30T11:28:42.000Z
|
libsrc/_DEVELOPMENT/math/float/math48/z80/am48_ddiv_s.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 1,600
|
2017-01-15T16:12:02.000Z
|
2022-03-31T12:11:12.000Z
|
libsrc/_DEVELOPMENT/math/float/math48/z80/am48_ddiv_s.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 215
|
2017-01-17T10:43:03.000Z
|
2022-03-23T17:25:02.000Z
|
SECTION code_clib
SECTION code_fp_math48
PUBLIC am48_ddiv_s
EXTERN am48_ddiv
am48_ddiv_s:
; compute AC'/double
;
; enter : AC'= double y
; stack = double x, ret
;
; exit : AC = double x
;
; success
;
; AC'= y/x
; carry reset
;
; fail if divide by zero
;
; AC'= +-inf
; carry set, errno set
;
; uses : af, bc, de, hl, af', bc', de', hl'
pop af
pop hl
pop de
pop bc
push af
jp am48_ddiv
| 13.948718
| 47
| 0.466912
|
bc073f139ecbfd84d4dd69ea2628905736baa54e
| 6,056
|
asm
|
Assembly
|
R2_Comm_Link/asm/src/slave_manager.asm
|
CmdrZin/chips_avr_examples
|
d4b57a8efd6aff2a678adef4fd405e6359e891e6
|
[
"MIT"
] | 5
|
2017-04-17T15:11:40.000Z
|
2021-12-13T23:52:09.000Z
|
R2_Comm_Link/asm/src/slave_manager.asm
|
CmdrZin/chips_avr_examples
|
d4b57a8efd6aff2a678adef4fd405e6359e891e6
|
[
"MIT"
] | null | null | null |
R2_Comm_Link/asm/src/slave_manager.asm
|
CmdrZin/chips_avr_examples
|
d4b57a8efd6aff2a678adef4fd405e6359e891e6
|
[
"MIT"
] | null | null | null |
/*
* Slave Manager Module
*
* org: 9/11/2014
* auth: Nels "Chip" Pearson
*
* Target: R2Link Demo Board w/ LED bank, 20MHz
*
* Usage:
* .include slave_manager.asm
*
*/
// Message Type values
.equ MSG_TYPE_0 = 0x00 ; Normal Data Parcket. N=1-15 bytes.
/* SLAVE_ECHO:
* Copy valid Type 0 I2C messages to I2C OUT. Ignores Tone messages.
* Any Mode other than SLAVE_ECHO:
* Copy the message bytes into its Tone OUT buffer and output.
*/
.equ MSG_TYPE_F = 0xF0 ; Set Parameters. Data pairs. N*2 bytes.
/* Any Mode:
* Slave will parse data pairs and set parameters.
*/
.equ PARAM_LOOP = 0x00 ; Set Output Loops 0:No Loop, 1->FE, FF:Continuous
.equ PARAM_AUTOA = 0x01 ; Set ACK/NACK response..0:No, 1:Yes
.equ PARAM_SYMTDLY = 0x02 ; Timeout Delay. N=Symbol delays to wait for next Symbol.
.equ PARAM_SYMRATE = 0x03 ; Symbol Rate. Rate to send Symbols. N=n * 10ms.
.equ PARAM_SYMDUR` = 0x04 ; Symbol Duration. Time to hold Tone output. N=n * 10 ms.
.equ PARAM_MODE = 0x06 ; Set Mode (1-4)
// Slave Modes
.equ S_MODE_INVALID = 0x00
.equ S_MODE_NORMAL = 0x01
.equ S_MODE_ECHO = 0x02
.equ S_MODE_RAW = 0x03
.equ S_MODE_CAL = 0x04
// slave_state values
.equ SS_ECHO = 2 ; Do not load OUT buffer from Tones.
// Slave Control Flags
.equ SCF_NO_TONE_OUT = 0x01 ; If set=1, inhibit Tone generation
.equ SCF_NO_TONE_IN = 0x02 ; If set=1, do not process ADC sample with Goeritz
.DSEG
slave_mode: .BYTE 1 ; current Slave Mode
slave_flags: .BYTE 1 ; subsystem control flags
slave_state: .BYTE 1 ; current Slave Mode state
slave_delay: .BYTE 1 ; extend delay
.CSEG
/*
* This function will generate a service based on the Mode and slave_state.
* Call when an I2C message is received from Master.
*
* 1. Perform CKSUM test on I2C IN buffer.
* 2. Parse based on Mode.
*
* input reg: none
* output reg: none
*
*/
parse_i2c_msg:
rjmp tst_00
// Check CKSUM of I2C IN Buffer.
ldi XL, LOW(i2c_buffer_in)
ldi XH, HIGH(i2c_buffer_in)
lds R18, i2c_buffer_in_cnt
call util_cksum ; X->CKSUM in buffer.
ld R18, X ; get buffer CKSUM
cp R17, R18
breq pim_skip00
; CKSUM invalid
rjmp pim_reset_in ; reset I2C IN Buffer to receive.
;
pim_skip00:
// CKSUM valid. Check for Type F.
lds R16, i2c_buffer_in ; get Header
andi R16, 0xF0 ; mask
cpi R16, MSG_TYPE_F
brne pim_skip10
; Type F
ldi R16, S_MODE_NORMAL
sts slave_mode, R16 ; Default Mode = NORMAL
// For now, ANY Type F msg wil set the Mode to NORMAL.
// TODO: Parse Data Pairs of Parameters from msg.
;
rjmp pim_reset_in ; reset I2C IN Buffer to receive.
;
pim_skip10:
// Check for Type 0.
cpi R16, MSG_TYPE_0
brne pim_reset_in ; EXIT..Others Types not supported.
;
lds R16, slave_mode
cpi R16, S_MODE_NORMAL
brne pim_skip20
; In NORMAL mode, Type 0 msgs are sent to the Tone OUT buffer.
lds R16, i2c_buffer_in ; get Header
andi R16, 0xF0 ; mask
cpi R16, MSG_TYPE_0
brne pim_skip10
;
tst_00:
; Type 0: Data .. Copy to Tone Msg Out
lds R16, i2c_buffer_in ; get Header
andi R16, 0x0F ; get num of bytes
ldi XL, LOW(i2c_buffer_in) ; X=src
ldi XH, HIGH(i2c_buffer_in)
ldi YL, LOW(tgu_msg_buff) ; Y=dst
ldi YH, HIGH(tgu_msg_buff)
;
pim_loop00:
ld R17, X+
st Y+, R17
dec R16
brne pim_loop00
;
ld R17, X ; get CKSUM
st Y, R17
; Trigger TONE Out
lds R16, i2c_buffer_in ; get Header
andi R16, 0x0F ; get num of bytes
sts tgu_msg_status, R16 ; Set byte count.
;
rjmp pim_reset_in ; reset I2C IN Buffer to receive.
;
pim_skip20:
cpi R16, S_MODE_ECHO
brne pim_skip100
; In ECHO Mode, Type 0 messages go back into I2C OUT buffer.
lds R16, i2c_buffer_in ; get Header
andi R16, 0x0F ; get num of bytes
sts i2c_buffer_out_cnt, R16 ; store byte count.
ldi XL, LOW(i2c_buffer_in) ; X=src
ldi XH, HIGH(i2c_buffer_in)
ldi YL, LOW(i2c_buffer_out) ; Y=dst
ldi YH, HIGH(i2c_buffer_out)
;
pim_loop10:
ld R17, X+
st Y+, R17
dec R16
brne pim_loop10
;
ld R17, X ; get CKSUM
st Y, R17
rjmp pim_reset_in ; reset I2C IN Buffer to receive.
;
pim_skip100:
; Test for other Modes when supported.
;
pim_reset_in:
lds R16, i2c_flags
cbr R16, I2CF_IN_MSG
sts i2c_flags, R16
call i2c_slave_init ; reset I2C interface.
;
ret
/*
* This function will generate a service based on the Mode and slave_state.
* Call from main() loop to service periodic operations.
*
* Check slave_mode
* S_MODE_NORMAL: Copy Type 0 I2C IN msg to Tone OUT buffer
* Ignore other types except Type F.
* S_MODE_ECHO: Copy Type 1 I2C IN msg to I2C OUT buffer
* Ignore other types except Type F.
* S_MODE_RAW: Ignore I2C IN msg types except Type F.
* Copy new ADC output to I2C OUT buffer
* S_MODE_CAL: Ignore I2C IN msg types except Type F.
*
* input reg: none (slave_state)
* output reg: none
*
*/
slave_service:
// Check for ADC sample. Always Service ADC.
call adc_get_data ; read ADC buffer..ADC intr driven
tst R18 ; check for new data.
brne ss_skip00
; Process?
lds R16, slave_flags
andi R16, SCF_NO_TONE_IN
brne ss_skip00
;
call goertzel_1_tone ; process data.
lds R16, gortz_det
sts led_bank, R16
;
ss_skip00:
// Check for I2C In Message. Always process Type F to set parameters.
lds R16, i2c_flags
andi R16, I2CF_IN_MSG ; ckeck flag
breq ss_skip10 ; not set
; New. Parse I2C message.
call parse_i2c_msg ; Parse is based on Mode.
;
lds R16, i2c_flags
cbr R16, I2CF_IN_MSG ; clear flag
sts i2c_flags, R16
;
ss_skip10:
// Process MODE specific tasks
lds R16, slave_mode
cpi R16, S_MODE_NORMAL
brne ss_skip20
; NORMAL Mode
// Check for Tone In Message if NOT in ECHO mode
lds R16, tone_flags
andi R16, TF_IN_MSG
breq ss_skip20
;
call parse_tone_msg
;
ss_skip20:
cpi R16, S_MODE_ECHO
brne ss_skip30
; ECHO Mode
;
ss_skip30:
cpi R16, S_MODE_RAW
brne ss_skip40
; RAW Mode
;
ss_skip40:
cpi R16, S_MODE_CAL
brne ss_skip50
; CAL Mode
;
ss_skip50:
// Service any 1ms TIC operations
sbis GPIOR0, MS_1MS_TIC
ret
;
cbi GPIOR0, MS_1MS_TIC
ret ; EXIT
| 24.419355
| 84
| 0.698646
|
129260043679681a692b343f385866b40edf244c
| 1,907
|
asm
|
Assembly
|
src/test/ref/examples/c64/rasterbars/raster-bars.asm
|
jbrandwood/kickc
|
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
|
[
"MIT"
] | 2
|
2022-03-01T02:21:14.000Z
|
2022-03-01T04:33:35.000Z
|
src/test/ref/examples/c64/rasterbars/raster-bars.asm
|
jbrandwood/kickc
|
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
|
[
"MIT"
] | null | null | null |
src/test/ref/examples/c64/rasterbars/raster-bars.asm
|
jbrandwood/kickc
|
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
|
[
"MIT"
] | null | null | null |
/// @file
/// Commodore 64 Registers and Constants
/// @file
/// The MOS 6526 Complex Interface Adapter (CIA)
///
/// http://archive.6502.org/datasheets/mos_6526_cia_recreated.pdf
// Commodore 64 PRG executable file
.file [name="raster-bars.prg", type="prg", segments="Program"]
.segmentdef Program [segments="Basic, Code, Data"]
.segmentdef Basic [start=$0801]
.segmentdef Code [start=$80d]
.segmentdef Data [startAfter="Code"]
.segment Basic
:BasicUpstart(main)
.const OFFSET_STRUCT_MOS6569_VICII_RASTER = $12
.const OFFSET_STRUCT_MOS6569_VICII_BG_COLOR = $21
.const OFFSET_STRUCT_MOS6569_VICII_BORDER_COLOR = $20
/// The VIC-II MOS 6567/6569
.label VICII = $d000
.segment Code
main: {
// asm
sei
__b1:
// while (VICII->RASTER!=$a)
lda #$a
cmp VICII+OFFSET_STRUCT_MOS6569_VICII_RASTER
bne __b1
__b2:
// while (VICII->RASTER!=$b)
lda #$b
cmp VICII+OFFSET_STRUCT_MOS6569_VICII_RASTER
bne __b2
// raster()
jsr raster
jmp __b1
}
raster: {
// asm
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
// char col = rastercols[i]
lda rastercols
ldx #0
__b1:
// VICII->BG_COLOR = col
sta VICII+OFFSET_STRUCT_MOS6569_VICII_BG_COLOR
// VICII->BORDER_COLOR = col
sta VICII+OFFSET_STRUCT_MOS6569_VICII_BORDER_COLOR
// col = rastercols[++i];
inx
// col = rastercols[++i]
lda rastercols,x
// asm
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
// while (col!=$ff)
cmp #$ff
bne __b1
// }
rts
}
.segment Data
rastercols: .byte $b, 0, $b, $b, $c, $b, $c, $c, $f, $c, $f, $f, 1, $f, 1, 1, $f, 1, $f, $f, $c, $f, $c, $c, $b, $c, $b, $b, 0, $b, 0, $ff
| 18.696078
| 140
| 0.589932
|
8b45152dff7101dad9368f2e2e64d809fcb557f1
| 802
|
asm
|
Assembly
|
oeis/120/A120928.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/120/A120928.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/120/A120928.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A120928: Number of "ups" and "downs" in the permutations of [n] if either a previous counted "up" ("down") or a "void" precedes an "up" ("down") which then will be counted also.
; Submitted by Jamie Morken(s1)
; 2,8,44,280,2040,16800,154560,1572480,17539200,212889600,2794176000,39437798400,595718323200,9589612032000,163895187456000,2964061900800000,56554301067264000,1135354270482432000,23923536413736960000,527939735774330880000,12176674550924083200000,292989523040696401920000,7341972753843333365760000,191304923867748827136000000,5175573751124772323328000000,145184926005578028810240000000,4217622100462041736937472000000,126731921910269061348458496000000,3934584087214167369771909120000000
mov $1,$0
add $1,2
add $0,$1
lpb $1
add $0,$1
mul $0,$1
sub $1,1
lpe
div $0,12
mul $0,2
add $0,2
| 50.125
| 485
| 0.819202
|
e7ac4b70f94eb11faf502c854e965d1a55353d65
| 361
|
asm
|
Assembly
|
programs/oeis/068/A068548.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/068/A068548.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/068/A068548.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A068548: Coefficients of (-x^(2n-6)) in Chebyshev polynomial of degree 2n.
; 1,32,400,3584,26880,180224,1118208,6553600,36765696,199229440,1049624576,5402263552,27262976000,135291469824,661693399040,3195455668224,15260018802688,72155450572800,338168545017856
mul $0,2
seq $0,1794 ; Negated coefficients of Chebyshev T polynomials: [x^n](-T(n+6, x)), n >= 0.
| 60.166667
| 183
| 0.781163
|
b82c1686168b77d3cb9d8f8a7535f30f021acc19
| 178
|
asm
|
Assembly
|
tests/t15.asm
|
mras0/sasm
|
342f57570e79b2aa1c42a9064aaea4d198577be2
|
[
"MIT"
] | 26
|
2019-08-13T19:54:42.000Z
|
2022-03-11T16:58:31.000Z
|
tests/t15.asm
|
mras0/sasm
|
342f57570e79b2aa1c42a9064aaea4d198577be2
|
[
"MIT"
] | null | null | null |
tests/t15.asm
|
mras0/sasm
|
342f57570e79b2aa1c42a9064aaea4d198577be2
|
[
"MIT"
] | 2
|
2019-08-20T10:23:56.000Z
|
2020-09-24T20:08:00.000Z
|
org 256
xchg bx, [dat]
xchg [dat], dx
mov cx, 0
rep movsb
rep movsw
ret
dat:
dw 0
dw 'AB', 'XY'
| 16.181818
| 23
| 0.342697
|
a62c97492664948b0664c2100488e92d1d66a692
| 150
|
asm
|
Assembly
|
gfx/pokemon/parasect/anim.asm
|
Dev727/ancientplatinum
|
8b212a1728cc32a95743e1538b9eaa0827d013a7
|
[
"blessing"
] | 28
|
2019-11-08T07:19:00.000Z
|
2021-12-20T10:17:54.000Z
|
gfx/pokemon/parasect/anim.asm
|
Dev727/ancientplatinum
|
8b212a1728cc32a95743e1538b9eaa0827d013a7
|
[
"blessing"
] | 13
|
2020-01-11T17:00:40.000Z
|
2021-09-14T01:27:38.000Z
|
gfx/pokemon/parasect/anim.asm
|
Dev727/ancientplatinum
|
8b212a1728cc32a95743e1538b9eaa0827d013a7
|
[
"blessing"
] | 22
|
2020-05-28T17:31:38.000Z
|
2022-03-07T20:49:35.000Z
|
setrepeat 2
frame 1, 08
frame 2, 10
frame 1, 08
frame 0, 10
dorepeat 1
frame 4, 20
setrepeat 3
frame 0, 04
frame 4, 04
dorepeat 8
endanim
| 11.538462
| 12
| 0.673333
|
c69c5f6d21f40f48644813173f30cbe913f11316
| 1,485
|
asm
|
Assembly
|
Source/HDIAG/acia.asm
|
b1ackmai1er/RomWBW
|
711bf1c877d1d4e02add0e9a884aab4316eaf2e9
|
[
"DOC",
"MIT"
] | 1
|
2021-11-10T12:31:51.000Z
|
2021-11-10T12:31:51.000Z
|
Source/HDIAG/acia.asm
|
b1ackmai1er/RomWBW
|
711bf1c877d1d4e02add0e9a884aab4316eaf2e9
|
[
"DOC",
"MIT"
] | 1
|
2018-08-03T10:46:18.000Z
|
2018-08-03T10:46:18.000Z
|
Source/HDIAG/acia.asm
|
b1ackmai1er/RomWBW
|
711bf1c877d1d4e02add0e9a884aab4316eaf2e9
|
[
"DOC",
"MIT"
] | null | null | null |
;
;=======================================================================
; HDIAG ACIA Driver
;=======================================================================
;
acia_cmd .equ $80
acia_dat .equ $81
;
;
;
acia_jptbl:
jp acia_cinit ; Initialize serial port
jp acia_cin ; Read byte
jp acia_cout ; Write byte
jp acia_cist ; Input status
jp acia_cost ; Output Status
;
;
;
acia_cinit:
; Detect ACIA
ld a,$03 ; master reset
out (acia_cmd),a ; apply it
in a,(acia_cmd) ; get status
or a ; check for zero (expected)
ret nz ; abort if not
ld a,$02 ; clear master reset
out (acia_cmd),a ; apply it
in a,(acia_cmd) ; get status again
and %00001110 ; isolate reliable bits
cp %00000010 ; check for expected value
ret nz ; abort if not
; Initialize ACIA
ld a,%00010110 ; default config
out (acia_cmd),a ; apply it
xor a ; signal success
ret
;
;
;
acia_cin:
call acia_cist ; check for char ready
jr z,acia_cin ; if not, loop
in a,(acia_dat) ; read byte
ret ; done
;
;
;
acia_cout:
push af ; save incoming
acia_cout1:
call acia_cost ; ready for char?
jr z,acia_cout1 ; loop if not
pop af ; restore incoming
out (acia_dat),a ; write byte
ret ; and done
;
;
;
acia_cist:
in a,(acia_cmd) ; get status
and $01 ; isolate rx ready
ret ; done
;
;
;
acia_cost:
in a,(acia_cmd) ; get status
and $02 ; isolate tx empty
ret ; done
| 20.915493
| 73
| 0.556229
|
71d4313a9f0265252c2e40b9fd13ebf1026cb9b1
| 412
|
asm
|
Assembly
|
oeis/062/A062833.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/062/A062833.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/062/A062833.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A062833: 2n! / number of divisors of n.
; Submitted by Jon Maiga
; 2,2,6,16,120,360,5040,20160,241920,1814400,39916800,159667200,6227020800,43589145600,653837184000,8369115955200,355687428096000,2134124568576000,121645100408832000,810967336058880000
add $0,1
mov $1,1
mov $2,$0
lpb $0
mul $1,$0
mov $3,$2
dif $3,$0
sub $0,1
cmp $3,$2
cmp $3,0
add $4,$3
lpe
add $4,1
div $1,$4
mov $0,$1
mul $0,2
| 19.619048
| 184
| 0.696602
|
c51ee647d3137268574683b740688fa69504fea3
| 419
|
asm
|
Assembly
|
delay.asm
|
laffey98/c64-snake
|
1fbd458930090a89b11aa837ee78b52a22bcff56
|
[
"MIT"
] | 5
|
2021-03-31T12:41:46.000Z
|
2021-10-12T05:52:56.000Z
|
delay.asm
|
dreamingPainter/c64-snake
|
dd1ab483f78d65b05405ea3ced5bdd9624e7478a
|
[
"MIT"
] | 1
|
2021-04-12T12:12:54.000Z
|
2021-04-12T12:13:23.000Z
|
delay.asm
|
dreamingPainter/c64-snake
|
dd1ab483f78d65b05405ea3ced5bdd9624e7478a
|
[
"MIT"
] | 5
|
2021-03-31T12:41:51.000Z
|
2022-02-04T07:14:17.000Z
|
; DELAY routine. Takes values from the Accumulator and pauses
; for that many jiffies (1/60th of a second).
.scope
.data zp
.space _tmp 1
.space _target 1
.text
delay: sta _tmp ; save argument (rdtim destroys it)
jsr rdtim
clc
adc _tmp ; add current time to get target
sta _target
* jsr rdtim
cmp _target
php
jsr getin
beq +
sta d
* plp
bmi -- ; Buzz until target reached
rts
.scend
| 17.458333
| 62
| 0.677804
|
a59ee5e88ae771d2a497fa9eb53f5eeab3763c36
| 3,047
|
asm
|
Assembly
|
src/SlimShader.Tests/Shaders/HlslCrossCompiler/ps5/interfaces.asm
|
tgjones/slimshader
|
4fc64414b82fec8a41f8455037b3717e71907b89
|
[
"MIT"
] | 125
|
2015-01-04T09:33:05.000Z
|
2022-03-13T05:08:50.000Z
|
src/SlimShader.Tests/Shaders/HlslCrossCompiler/ps5/interfaces.asm
|
tgjones/slimshader
|
4fc64414b82fec8a41f8455037b3717e71907b89
|
[
"MIT"
] | 1
|
2015-04-01T22:26:14.000Z
|
2015-04-02T12:57:18.000Z
|
src/SlimShader.Tests/Shaders/HlslCrossCompiler/ps5/interfaces.asm
|
tgjones/slimshader
|
4fc64414b82fec8a41f8455037b3717e71907b89
|
[
"MIT"
] | 36
|
2015-01-26T22:01:38.000Z
|
2022-01-26T04:35:56.000Z
|
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.20714
//
//
///
// Buffer Definitions:
//
// interfaces $ThisPointer
// {
//
// interface iChangeColour gAbstractColourChanger;// Offset: 0 Size: 1
// interface iChangeColour gAbstractColourChangerB;// Offset: 1 Size: 1
// interface iAlpha gAlphaChooser; // Offset: 2 Size: 1
//
// }
//
//
//
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// COLOR 0 xyz 0 NONE float xyz
//
//
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_TARGET 0 xyzw 0 TARGET float xyzw
//
//
// Available Class Types:
//
// Name ID CB Stride Texture Sampler
// ------------------------------ ---- --------- ------- -------
// cUnchangedColour 0 0 0 0
// cHalfColour 1 0 0 0
// cDoubleColour 2 0 0 0
// TwoThirdsAlpha 3 0 0 0
// OneAlpha 4 0 0 0
//
// Interface slots, 3 total:
//
// Slots
// +----------+---------+---------------------------------------
// | Type ID | 0 |0 1 2
// | Table ID | |0 1 2
// +----------+---------+---------------------------------------
// | Type ID | 1 |0 1 2
// | Table ID | |3 4 5
// +----------+---------+---------------------------------------
// | Type ID | 2 |3 4
// | Table ID | |6 7
// +----------+---------+---------------------------------------
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_function_body fb0
dcl_function_body fb1
dcl_function_body fb2
dcl_function_body fb3
dcl_function_body fb4
dcl_function_body fb5
dcl_function_body fb6
dcl_function_body fb7
dcl_function_table ft0 = {fb0}
dcl_function_table ft1 = {fb1}
dcl_function_table ft2 = {fb2}
dcl_function_table ft3 = {fb3}
dcl_function_table ft4 = {fb4}
dcl_function_table ft5 = {fb5}
dcl_function_table ft6 = {fb6}
dcl_function_table ft7 = {fb7}
dcl_interface fp0[1][1] = {ft0, ft1, ft2}
dcl_interface fp1[1][1] = {ft3, ft4, ft5}
dcl_interface fp2[1][1] = {ft6, ft7}
dcl_input_ps linear v0.xyz
dcl_output o0.xyzw
dcl_temps 1
fcall fp0[0][0]
fcall fp1[0][0]
mov o0.xyz, r0.xyzx
fcall fp2[0][0]
mov o0.w, r0.x
ret
label fb0
mov r0.xyz, v0.xyzx
ret
label fb1
mul r0.xyz, v0.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000)
ret
label fb2
add r0.xyz, v0.xyzx, v0.xyzx
ret
label fb3
ret
label fb4
mul r0.xyz, r0.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000)
ret
label fb5
add r0.xyz, r0.xyzx, r0.xyzx
ret
label fb6
mov r0.x, l(0.660000)
ret
label fb7
mov r0.x, l(1.000000)
ret
// Approximately 21 instruction slots used
| 27.7
| 80
| 0.485067
|
bb2066ec2472183e954a83ce9f12104bcc14e1ac
| 1,654
|
asm
|
Assembly
|
programs/oeis/014/A014634.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | 1
|
2021-03-15T11:38:20.000Z
|
2021-03-15T11:38:20.000Z
|
programs/oeis/014/A014634.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/014/A014634.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
; A014634: a(n) = (2*n+1)*(4*n+1).
; 1,15,45,91,153,231,325,435,561,703,861,1035,1225,1431,1653,1891,2145,2415,2701,3003,3321,3655,4005,4371,4753,5151,5565,5995,6441,6903,7381,7875,8385,8911,9453,10011,10585,11175,11781,12403,13041,13695,14365,15051,15753,16471,17205,17955,18721,19503,20301,21115,21945,22791,23653,24531,25425,26335,27261,28203,29161,30135,31125,32131,33153,34191,35245,36315,37401,38503,39621,40755,41905,43071,44253,45451,46665,47895,49141,50403,51681,52975,54285,55611,56953,58311,59685,61075,62481,63903,65341,66795,68265,69751,71253,72771,74305,75855,77421,79003,80601,82215,83845,85491,87153,88831,90525,92235,93961,95703,97461,99235,101025,102831,104653,106491,108345,110215,112101,114003,115921,117855,119805,121771,123753,125751,127765,129795,131841,133903,135981,138075,140185,142311,144453,146611,148785,150975,153181,155403,157641,159895,162165,164451,166753,169071,171405,173755,176121,178503,180901,183315,185745,188191,190653,193131,195625,198135,200661,203203,205761,208335,210925,213531,216153,218791,221445,224115,226801,229503,232221,234955,237705,240471,243253,246051,248865,251695,254541,257403,260281,263175,266085,269011,271953,274911,277885,280875,283881,286903,289941,292995,296065,299151,302253,305371,308505,311655,314821,318003,321201,324415,327645,330891,334153,337431,340725,344035,347361,350703,354061,357435,360825,364231,367653,371091,374545,378015,381501,385003,388521,392055,395605,399171,402753,406351,409965,413595,417241,420903,424581,428275,431985,435711,439453,443211,446985,450775,454581,458403,462241,466095,469965,473851,477753,481671,485605,489555,493521,497503
mul $0,4
mov $1,-3
bin $1,$0
| 236.285714
| 1,588
| 0.826481
|
a6d03ae60c14037b49f4a55067543414ab9c45ec
| 257
|
asm
|
Assembly
|
MyTemplate.asm
|
William0Friend/my_masm
|
e8073266c03c01424ad84b9ed9cf13e9da1eabb1
|
[
"Apache-2.0"
] | null | null | null |
MyTemplate.asm
|
William0Friend/my_masm
|
e8073266c03c01424ad84b9ed9cf13e9da1eabb1
|
[
"Apache-2.0"
] | null | null | null |
MyTemplate.asm
|
William0Friend/my_masm
|
e8073266c03c01424ad84b9ed9cf13e9da1eabb1
|
[
"Apache-2.0"
] | null | null | null |
; Program Template
; William Friend
.386
.model flat,stdcall
.stack 4096
ExitProcess PROTO, dwExitCode:DWORD
.data
;declare variables here
.code
main PROC
;write your code here
INVOKE ExitProcess,0
main ENDP
END main
| 12.85
| 36
| 0.673152
|
214a845fcb177aa5d5d1199d0ca6cd541d0bb281
| 4,491
|
asm
|
Assembly
|
maps/Route13.asm
|
Dev727/ancientplatinum
|
8b212a1728cc32a95743e1538b9eaa0827d013a7
|
[
"blessing"
] | 28
|
2019-11-08T07:19:00.000Z
|
2021-12-20T10:17:54.000Z
|
maps/Route13.asm
|
Dev727/ancientplatinum
|
8b212a1728cc32a95743e1538b9eaa0827d013a7
|
[
"blessing"
] | 13
|
2020-01-11T17:00:40.000Z
|
2021-09-14T01:27:38.000Z
|
maps/Route13.asm
|
Dev727/ancientplatinum
|
8b212a1728cc32a95743e1538b9eaa0827d013a7
|
[
"blessing"
] | 22
|
2020-05-28T17:31:38.000Z
|
2022-03-07T20:49:35.000Z
|
object_const_def ; object_event constants
const ROUTE13_YOUNGSTER1
const ROUTE13_YOUNGSTER2
const ROUTE13_POKEFAN_M1
const ROUTE13_POKEFAN_M2
const ROUTE13_POKEFAN_M3
Route13_MapScripts:
db 0 ; scene scripts
db 0 ; callbacks
TrainerPokefanmAlex:
trainer POKEFANM, ALEX, EVENT_BEAT_POKEFANM_ALEX, PokefanmAlexSeenText, PokefanmAlexBeatenText, 0, .Script
.Script:
endifjustbattled
opentext
writetext PokefanmAlexAfterBattleText
waitbutton
closetext
end
TrainerPokefanmJoshua:
trainer POKEFANM, JOSHUA, EVENT_BEAT_POKEFANM_JOSHUA, PokefanmJoshuaSeenText, PokefanmJoshuaBeatenText, 0, .Script
.Script:
endifjustbattled
opentext
writetext PokefanmJoshuaAfterBattleText
waitbutton
closetext
end
TrainerBirdKeeperPerry:
trainer BIRD_KEEPER, PERRY, EVENT_BEAT_BIRD_KEEPER_PERRY, BirdKeeperPerrySeenText, BirdKeeperPerryBeatenText, 0, .Script
.Script:
endifjustbattled
opentext
writetext BirdKeeperPerryAfterBattleText
waitbutton
closetext
end
TrainerBirdKeeperBret:
trainer BIRD_KEEPER, BRET, EVENT_BEAT_BIRD_KEEPER_BRET, BirdKeeperBretSeenText, BirdKeeperBretBeatenText, 0, .Script
.Script:
endifjustbattled
opentext
writetext BirdKeeperBretAfterBattleText
waitbutton
closetext
end
TrainerHikerKenny:
trainer HIKER, KENNY, EVENT_BEAT_HIKER_KENNY, HikerKennySeenText, HikerKennyBeatenText, 0, .Script
.Script:
endifjustbattled
opentext
writetext HikerKennyAfterBattleText
waitbutton
closetext
end
Route13TrainerTips:
jumptext Route13TrainerTipsText
Route13Sign:
jumptext Route13SignText
Route13DirectionsSign:
jumptext Route13DirectionsSignText
Route13HiddenCalcium:
hiddenitem CALCIUM, EVENT_ROUTE_13_HIDDEN_CALCIUM
PokefanmAlexSeenText:
text "Bow down before my"
line "regal #MON!"
done
PokefanmAlexBeatenText:
text "How… How dare you"
line "mock royalty!"
done
PokefanmAlexAfterBattleText:
text "Doesn't everyone"
line "wish to someday be"
cont "a king?"
done
PokefanmJoshuaSeenText:
text "Nihihi! Would you"
line "like to battle my"
cont "PIKACHU gang?"
done
PokefanmJoshuaBeatenText:
text "PI-PIKACHU!"
done
PokefanmJoshuaAfterBattleText:
text "You look like you"
line "have many #MON,"
para "but PIKACHU is"
line "still the best."
done
BirdKeeperPerrySeenText:
text "Agility is the key"
line "attribute of bird"
cont "#MON."
done
BirdKeeperPerryBeatenText:
text "You beat me with"
line "your speed…"
done
BirdKeeperPerryAfterBattleText:
text "Your #MON are"
line "remarkably well-"
cont "trained."
done
BirdKeeperBretSeenText:
text "Check out my #-"
line "MON. Just look at"
para "their coloring and"
line "their plumage."
done
BirdKeeperBretBeatenText:
text "Shoot!"
line "Not good enough!"
done
BirdKeeperBretAfterBattleText:
text "If you groom them,"
line "#MON get happy."
done
HikerKennySeenText:
text "I should go to"
line "ROCK TUNNEL to get"
cont "myself an ONIX."
done
HikerKennyBeatenText:
text "I lost…"
done
HikerKennyAfterBattleText:
text "Geological fea-"
line "tures don't appear"
cont "to change."
para "But they actually"
line "change, little by"
cont "little."
done
Route13TrainerTipsText:
text "TRAINER TIPS"
para "Look! Right there,"
line "at the left side"
cont "of the post."
done
Route13SignText:
text "ROUTE 13"
para "NORTH TO SILENCE"
line "BRIDGE"
done
Route13DirectionsSignText:
text "NORTH TO LAVENDER"
line "TOWN"
para "WEST TO FUCHSIA"
line "CITY"
done
Route13_MapEvents:
db 0, 0 ; filler
db 0 ; warp events
db 0 ; coord events
db 4 ; bg events
bg_event 29, 13, BGEVENT_READ, Route13TrainerTips
bg_event 41, 11, BGEVENT_READ, Route13Sign
bg_event 17, 13, BGEVENT_READ, Route13DirectionsSign
bg_event 30, 13, BGEVENT_ITEM, Route13HiddenCalcium
db 5 ; object events
object_event 42, 6, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 2, TrainerBirdKeeperPerry, -1
object_event 43, 6, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 2, TrainerBirdKeeperBret, -1
object_event 32, 8, SPRITE_POKEFAN_M, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 3, TrainerPokefanmJoshua, -1
object_event 14, 10, SPRITE_POKEFAN_M, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 4, TrainerHikerKenny, -1
object_event 25, 6, SPRITE_POKEFAN_M, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 4, TrainerPokefanmAlex, -1
| 21.28436
| 147
| 0.786462
|
30bfed09b87eea0a5a9585745dac1df8e5482909
| 23,060
|
asm
|
Assembly
|
src/sound/septette_for_the_dead_princess/channel2.asm
|
Gegel85/RemiFlap
|
00f5970ef388e1748d8f807fced9b0f60c9313c4
|
[
"MIT"
] | null | null | null |
src/sound/septette_for_the_dead_princess/channel2.asm
|
Gegel85/RemiFlap
|
00f5970ef388e1748d8f807fced9b0f60c9313c4
|
[
"MIT"
] | null | null | null |
src/sound/septette_for_the_dead_princess/channel2.asm
|
Gegel85/RemiFlap
|
00f5970ef388e1748d8f807fced9b0f60c9313c4
|
[
"MIT"
] | null | null | null |
musicChan2RemiliaTheme::
setRegisters $A5, $F4, $00, $00
repeat 3
setFrequency NOTE_G / 2, $80
wait CROTCHET
setFrequency NOTE_G, $80
wait QUAVER
setFrequency NOTE_G / 2, $80
wait QUAVER
setFrequency NOTE_Eb * 2, $80
wait CROTCHET
setFrequency NOTE_D * 2, $80
wait QUAVER
setFrequency NOTE_F, $80
wait QUAVER
continue
setFrequency NOTE_G / 2, $80
wait CROTCHET
setFrequency NOTE_G, $80
wait QUAVER
setFrequency NOTE_G / 2, $80
wait CROTCHET
setFrequency NOTE_Eb * 2, $80
wait QUAVER
setFrequency NOTE_D / 2, $80
wait CROTCHET
; 5
setFrequency NOTE_Ab / 4, $80
wait CROTCHET
setFrequency NOTE_G, $80
wait QUAVER
setFrequency NOTE_Ab / 4, $80
wait QUAVER
setFrequency NOTE_Eb * 2, $80
wait CROTCHET
setFrequency NOTE_D * 2, $80
wait QUAVER
setFrequency NOTE_F, $80
wait QUAVER
setFrequency NOTE_D / 2, $80
wait CROTCHET
setFrequency NOTE_G, $80
wait QUAVER
setFrequency NOTE_D / 2, $80
wait QUAVER
setFrequency NOTE_Eb * 2, $80
wait CROTCHET
setFrequency NOTE_D * 2, $80
wait QUAVER
setFrequency NOTE_F, $80
wait QUAVER
setFrequency NOTE_G / 2, $80
wait CROTCHET
setFrequency NOTE_G, $80
wait QUAVER
setFrequency NOTE_G / 2, $80
wait QUAVER
setFrequency NOTE_Eb * 2, $80
wait CROTCHET
setFrequency NOTE_D * 2, $80
wait QUAVER
setFrequency NOTE_F, $80
wait QUAVER
setFrequency NOTE_G, $80
wait MINIM
wait QUAVER
setFrequency NOTE_G, $80
wait QUAVER
setFrequency NOTE_C * 2, $80
wait QUAVER
setFrequency NOTE_D * 2, $80
wait QUAVER
setFrequency NOTE_Eb * 2, $80
wait DOTTED_CROTCHET
setFrequency NOTE_F * 2, $80
wait QUAVER
setFrequency NOTE_D * 2, $80
wait DOTTED_CROTCHET
setFrequency NOTE_Eb * 2, $80
wait QUAVER
; 10
setFrequency NOTE_C * 2, $80
wait MINIM
wait QUAVER
setFrequency NOTE_G, $80
wait QUAVER
setFrequency NOTE_C * 2, $80
wait QUAVER
setFrequency NOTE_D * 2, $80
wait QUAVER
setFrequency NOTE_Eb * 2, $80
wait DOTTED_CROTCHET
setFrequency NOTE_F * 2, $80
wait QUAVER
setFrequency NOTE_D * 2, $80
wait DOTTED_CROTCHET
setFrequency NOTE_Bb * 2, $80
wait QUAVER
setFrequency NOTE_G * 2, $80
wait MINIM
wait QUAVER
setFrequency NOTE_G * 2, $80
wait QUAVER
setFrequency NOTE_Bb * 2, $80
wait QUAVER
setFrequency NOTE_C * 4, $80
wait QUAVER
setFrequency NOTE_F * 2, $80
wait CROTCHET
setFrequency NOTE_F * 2, $80
wait CROTCHET
wait QUAVER
setFrequency NOTE_F * 2, $80
wait QUAVER
setFrequency NOTE_G * 2, $80
wait QUAVER
setFrequency NOTE_Bb * 2, $80
wait QUAVER
setFrequency NOTE_Eb * 2, $80
wait CROTCHET
setFrequency NOTE_Eb * 2, $80
wait CROTCHET
wait QUAVER
setFrequency NOTE_C * 2, $80
wait QUAVER
setFrequency NOTE_C * 2, $80
wait QUAVER
setFrequency NOTE_D * 2, $80
wait QUAVER
; 15
setFrequency NOTE_Eb * 2, $80
wait DOTTED_CROTCHET
setFrequency NOTE_F * 2, $80
wait QUAVER
setFrequency NOTE_D * 2, $80
wait DOTTED_CROTCHET
setFrequency NOTE_B, $80
wait QUAVER
setFrequency NOTE_C * 2, $80
wait MINIM
setFrequency NOTE_D * 2, $80
wait MINIM
.loop:
setFrequency NOTE_Eb * 2, $80
wait MINIM + QUAVER
setFrequency NOTE_D * 2, $80
wait SEMIQUAVER
setFrequency NOTE_Eb * 2, $80
wait SEMIQUAVER
setFrequency NOTE_D * 2, $80
wait SEMIQUAVER
setFrequency NOTE_Bb, $80
wait SEMIQUAVER
setFrequency NOTE_G, $80
wait SEMIQUAVER
setFrequency NOTE_Ab, $80
wait SEMIQUAVER
setFrequency NOTE_A, $80
wait SEMIBREVE
wait CROTCHET
setFrequency NOTE_C, $80
wait SEMIQUAVER
setFrequency NOTE_D, $80
wait SEMIQUAVER
setFrequency NOTE_Eb, $80
wait SEMIQUAVER
setFrequency NOTE_G, $80
wait SEMIQUAVER
wait CROTCHET
setFrequency NOTE_C, $80
wait SEMIQUAVER
setFrequency NOTE_D, $80
wait SEMIQUAVER
setFrequency NOTE_Eb, $80
wait SEMIQUAVER
setFrequency NOTE_Ab, $80
wait SEMIQUAVER
; 20
wait CROTCHET
setFrequency NOTE_C, $80
wait SEMIQUAVER
setFrequency NOTE_D, $80
wait SEMIQUAVER
setFrequency NOTE_Eb, $80
wait SEMIQUAVER
setFrequency NOTE_A, $80
wait SEMIQUAVER
wait CROTCHET
setFrequency NOTE_C, $80
wait SEMIQUAVER
setFrequency NOTE_D, $80
wait SEMIQUAVER
setFrequency NOTE_Eb, $80
wait SEMIQUAVER
setFrequency NOTE_Ab, $80
wait SEMIQUAVER
wait CROTCHET
setFrequency NOTE_C, $80
wait SEMIQUAVER
setFrequency NOTE_D, $80
wait SEMIQUAVER
setFrequency NOTE_Eb, $80
wait SEMIQUAVER
setFrequency NOTE_G, $80
wait SEMIQUAVER
wait CROTCHET
setFrequency NOTE_C, $80
wait SEMIQUAVER
setFrequency NOTE_D, $80
wait SEMIQUAVER
setFrequency NOTE_Eb, $80
wait SEMIQUAVER
setFrequency NOTE_Ab, $80
wait SEMIQUAVER
wait CROTCHET
setFrequency NOTE_C, $80
wait SEMIQUAVER
setFrequency NOTE_D, $80
wait SEMIQUAVER
setFrequency NOTE_Eb, $80
wait SEMIQUAVER
setFrequency NOTE_A, $80
wait SEMIQUAVER
wait CROTCHET
setFrequency NOTE_C, $80
wait SEMIQUAVER
setFrequency NOTE_D, $80
wait SEMIQUAVER
setFrequency NOTE_Eb, $80
wait QUAVER
setFrequency NOTE_Eb * 4, $80
wait MINIM + QUAVER
setFrequency NOTE_D * 4, $80
wait SEMIQUAVER
setFrequency NOTE_C * 4, $80
wait SEMIQUAVER
setFrequency NOTE_Bb * 2, $80
wait SEMIQUAVER
setFrequency NOTE_Ab * 2, $80
wait SEMIQUAVER
setFrequency NOTE_G * 2, $80
wait SEMIQUAVER
setFrequency NOTE_F * 2, $80
wait SEMIQUAVER
setFrequency NOTE_A * 2, $80
wait MINIM
wait QUAVER
setFrequency NOTE_G, $80
wait QUAVER
setFrequency NOTE_C * 2, $80
wait QUAVER
setFrequency NOTE_D * 2, $80
wait QUAVER
; 25
setFrequency NOTE_Eb * 2, $80
wait DOTTED_CROTCHET
setFrequency NOTE_F * 2, $80
wait QUAVER
setFrequency NOTE_D * 2, $80
wait DOTTED_CROTCHET
setFrequency NOTE_Eb * 2, $80
wait QUAVER
setFrequency NOTE_C * 2, $80
wait MINIM
wait QUAVER
setFrequency NOTE_G, $80
wait QUAVER
setFrequency NOTE_C * 2, $80
wait QUAVER
setFrequency NOTE_D * 2, $80
wait QUAVER
setFrequency NOTE_Eb * 2, $80
wait DOTTED_CROTCHET
setFrequency NOTE_F * 2, $80
wait QUAVER
setFrequency NOTE_D * 2, $80
wait DOTTED_CROTCHET
setFrequency NOTE_Bb * 2, $80
wait QUAVER
setFrequency NOTE_G * 2, $80
wait MINIM
wait QUAVER
setFrequency NOTE_G * 2, $80
wait QUAVER
setFrequency NOTE_Bb * 2, $80
wait QUAVER
setFrequency NOTE_C * 4, $80
wait QUAVER
setFrequency NOTE_F * 2, $80
wait CROTCHET
setFrequency NOTE_F * 2, $80
wait CROTCHET
wait QUAVER
setFrequency NOTE_F * 2, $80
wait QUAVER
setFrequency NOTE_G * 2, $80
wait QUAVER
setFrequency NOTE_Bb * 2, $80
wait QUAVER
; 30
setFrequency NOTE_Eb * 2, $80
wait CROTCHET
setFrequency NOTE_Eb * 2, $80
wait CROTCHET
wait QUAVER
setFrequency NOTE_C * 2, $80
wait QUAVER
setFrequency NOTE_C * 2, $80
wait QUAVER
setFrequency NOTE_D * 2, $80
wait QUAVER
setFrequency NOTE_Eb * 2, $80
wait DOTTED_CROTCHET
setFrequency NOTE_F * 2, $80
wait QUAVER
setFrequency NOTE_D * 2, $80
wait DOTTED_CROTCHET
setFrequency NOTE_B, $80
wait QUAVER
setFrequency NOTE_C * 2, $80
wait MINIM
setFrequency NOTE_D * 2, $80
wait QUAVER
setFrequency NOTE_Eb * 2, $80
wait QUAVER
setFrequency NOTE_Eb * 2, $80
wait QUAVER
setFrequency NOTE_F * 2, $80
wait QUAVER
setFrequency NOTE_G * 2, $80
wait DOTTED_CROTCHET
setFrequency NOTE_Bb * 2, $80
wait QUAVER
setFrequency NOTE_F * 2, $80
wait DOTTED_CROTCHET
setFrequency NOTE_G * 2, $80
wait QUAVER
setFrequency NOTE_Eb * 2, $80
wait MINIM
wait QUAVER
setFrequency NOTE_Eb * 2, $80
wait QUAVER
setFrequency NOTE_Eb * 2, $80
wait QUAVER
setFrequency NOTE_F * 2, $80
wait QUAVER
; 35
setFrequency NOTE_G * 2, $80
wait DOTTED_CROTCHET
setFrequency NOTE_Bb * 2, $80
wait CROTCHET
setFrequency NOTE_C * 4, $80
wait QUAVER
setFrequency NOTE_Bb * 2, $80
wait QUAVER
setFrequency NOTE_Bb * 2, $80
wait QUAVER
setFrequency NOTE_A * 2, $80
wait MINIM
wait QUAVER
setFrequency NOTE_C * 4, $80
wait QUAVER
setFrequency NOTE_D * 4, $80
wait QUAVER
setFrequency NOTE_Eb * 4, $80
wait QUAVER
setFrequency NOTE_Ab * 2, $80
wait CROTCHET
setFrequency NOTE_Ab * 2, $80
wait CROTCHET
wait QUAVER
setFrequency NOTE_Ab * 2, $80
wait QUAVER
setFrequency NOTE_Bb * 2, $80
wait QUAVER
setFrequency NOTE_D * 4, $80
wait QUAVER
setFrequency NOTE_G * 2, $80
wait CROTCHET
setFrequency NOTE_G * 2, $80
wait CROTCHET
wait QUAVER
setFrequency NOTE_Eb * 2, $80
wait QUAVER
setFrequency NOTE_Eb * 2, $80
wait QUAVER
setFrequency NOTE_F * 2, $80
wait QUAVER
setFrequency NOTE_G * 2, $80
wait DOTTED_CROTCHET
setFrequency NOTE_Bb * 2, $80
wait QUAVER
setFrequency NOTE_F * 2, $80
wait DOTTED_CROTCHET
setFrequency NOTE_D * 2, $80
wait QUAVER
; 40
setFrequency NOTE_Eb * 2, $80
wait MINIM
setFrequency NOTE_F * 2, $80
wait CROTCHET
setFrequency NOTE_Bb, $80
wait QUAVER
setFrequency NOTE_Db * 2, $80
wait QUAVER
repeat 2
setFrequency NOTE_Eb * 2, $80
wait QUAVER
setFrequency NOTE_Db * 2, $80
wait QUAVER
continue
setFrequency NOTE_Eb * 2, $80
wait DOTTED_QUAVER
setFrequency NOTE_Gb * 2, $80
wait DOTTED_QUAVER
setFrequency NOTE_F * 2, $80
wait QUAVER
repeat 2
setFrequency NOTE_Eb * 2, $80
wait QUAVER
setFrequency NOTE_Db * 2, $80
wait QUAVER
continue
setFrequency NOTE_Eb * 2, $80
wait DOTTED_QUAVER
setFrequency NOTE_Bb * 2, $80
wait DOTTED_QUAVER
setFrequency NOTE_Ab * 2, $80
wait QUAVER
setFrequency NOTE_Gb * 2, $80
wait DOTTED_QUAVER
setFrequency NOTE_F * 2, $80
wait DOTTED_QUAVER
setFrequency NOTE_Eb * 2, $80
wait QUAVER
setFrequency NOTE_D * 2, $80
wait DOTTED_QUAVER
setFrequency NOTE_Bb, $80
wait DOTTED_QUAVER
setFrequency NOTE_Ab, $80
wait QUAVER
setFrequency NOTE_Bb, $80
wait DOTTED_MINIM
setFrequency NOTE_Bb, $80
wait QUAVER
setFrequency NOTE_Db * 2, $80
wait QUAVER
; 45
repeat 2
setFrequency NOTE_Eb * 2, $80
wait QUAVER
setFrequency NOTE_Db * 2, $80
wait QUAVER
continue
setFrequency NOTE_Eb * 2, $80
wait DOTTED_QUAVER
setFrequency NOTE_Gb * 2, $80
wait DOTTED_QUAVER
setFrequency NOTE_F * 2, $80
wait QUAVER
repeat 2
setFrequency NOTE_Eb * 2, $80
wait QUAVER
setFrequency NOTE_Db * 2, $80
wait QUAVER
continue
setFrequency NOTE_Eb * 2, $80
wait DOTTED_QUAVER
setFrequency NOTE_Bb * 2, $80
wait DOTTED_QUAVER
setFrequency NOTE_Ab * 2, $80
wait QUAVER
setFrequency NOTE_Gb * 2, $80
wait DOTTED_QUAVER
setFrequency NOTE_F * 2, $80
wait DOTTED_QUAVER
setFrequency NOTE_Eb * 2, $80
wait QUAVER
setFrequency NOTE_F * 2, $80
wait DOTTED_QUAVER
setFrequency NOTE_Gb * 2, $80
wait DOTTED_QUAVER
setFrequency NOTE_Ab * 2, $80
wait QUAVER
setFrequency NOTE_D * 2, $80
wait DOTTED_CROTCHET
setFrequency NOTE_F * 2, $80
wait DOTTED_CROTCHET
setFrequency NOTE_Bb * 2, $80
wait QUAVER
setFrequency NOTE_Bb * 2, $80
wait QUAVER
wait CROTCHET
setFrequency NOTE_G, $80
wait QUAVER
setFrequency NOTE_D * 2, $80
wait QUAVER
; 50
setFrequency NOTE_C * 2, $80
wait DOTTED_CROTCHET
setFrequency NOTE_Bb, $80
wait QUAVER
setFrequency NOTE_A, $80
wait DOTTED_QUAVER
setFrequency NOTE_F, $80
wait DOTTED_QUAVER
setFrequency NOTE_G, $80
wait QUAVER
wait DOTTED_MINIM
setFrequency NOTE_G, $80
wait QUAVER
setFrequency NOTE_D * 2, $80
wait QUAVER
setFrequency NOTE_C * 2, $80
wait DOTTED_CROTCHET
setFrequency NOTE_Bb, $80
wait QUAVER
setFrequency NOTE_A, $80
wait DOTTED_QUAVER
setFrequency NOTE_F * 2, $80
wait DOTTED_QUAVER
setFrequency NOTE_D * 2, $80
wait QUAVER
wait DOTTED_MINIM
setFrequency NOTE_G, $80
wait QUAVER
setFrequency NOTE_D * 2, $80
wait QUAVER
setFrequency NOTE_C * 2, $80
wait DOTTED_CROTCHET
setFrequency NOTE_Bb, $80
wait QUAVER
setFrequency NOTE_A, $80
wait DOTTED_QUAVER
setFrequency NOTE_F, $80
wait DOTTED_QUAVER
setFrequency NOTE_G, $80
wait QUAVER
; 55
wait DOTTED_MINIM
setFrequency NOTE_G, $80
wait QUAVER
setFrequency NOTE_A, $80
wait QUAVER
setFrequency NOTE_Bb, $80
wait QUAVER
setFrequency NOTE_A, $80
wait QUAVER
setFrequency NOTE_F, $80
wait QUAVER
setFrequency NOTE_G, $80
wait QUAVER + MINIM
setFrequency NOTE_D * 2, $80
wait DOTTED_MINIM
setFrequency NOTE_G, $80
wait QUAVER
setFrequency NOTE_D * 2, $80
wait QUAVER
; 50
setFrequency NOTE_C * 2, $80
wait DOTTED_CROTCHET
setFrequency NOTE_Bb, $80
wait QUAVER
setFrequency NOTE_A, $80
wait DOTTED_QUAVER
setFrequency NOTE_F, $80
wait DOTTED_QUAVER
setFrequency NOTE_G, $80
wait QUAVER
wait DOTTED_MINIM
setFrequency NOTE_G, $80
wait QUAVER
setFrequency NOTE_D * 2, $80
wait QUAVER
setFrequency NOTE_C * 2, $80
wait DOTTED_CROTCHET
setFrequency NOTE_Bb, $80
wait QUAVER
setFrequency NOTE_A, $80
wait DOTTED_QUAVER
setFrequency NOTE_F * 2, $80
wait DOTTED_QUAVER
setFrequency NOTE_D * 2, $80
wait QUAVER
wait DOTTED_MINIM
setFrequency NOTE_G, $80
wait QUAVER
setFrequency NOTE_D * 2, $80
wait QUAVER
setFrequency NOTE_C * 2, $80
wait DOTTED_CROTCHET
setFrequency NOTE_Bb, $80
wait QUAVER
setFrequency NOTE_A, $80
wait DOTTED_QUAVER
setFrequency NOTE_F, $80
wait DOTTED_QUAVER
setFrequency NOTE_G, $80
wait QUAVER
; 55
wait DOTTED_MINIM
setFrequency NOTE_G, $80
wait QUAVER
setFrequency NOTE_A, $80
wait QUAVER
setFrequency NOTE_Bb, $80
wait QUAVER
setFrequency NOTE_A, $80
wait QUAVER
setFrequency NOTE_F, $80
wait QUAVER
setFrequency NOTE_G, $80
wait QUAVER + MINIM
setFrequency NOTE_D * 2, $80
wait MINIM
setFrequency NOTE_G, $80
wait SEMIQUAVER
setFrequency NOTE_Bb, $80
wait SEMIQUAVER
setFrequency NOTE_C * 2, $80
wait SEMIQUAVER
setFrequency NOTE_D * 2, $80
wait SEMIQUAVER
setFrequency NOTE_A, $80
wait QUAVER
setFrequency NOTE_F, $80
wait SEMIQUAVER
setFrequency NOTE_G, $80
wait SEMIQUAVER
wait QUAVER
setFrequency NOTE_F, $80
wait QUAVER
setFrequency NOTE_G, $80
wait QUAVER
setFrequency NOTE_A, $80
wait QUAVER
setFrequency NOTE_G, $80
wait SEMIQUAVER
setFrequency NOTE_C * 2, $80
wait SEMIQUAVER
setFrequency NOTE_Bb, $80
wait SEMIQUAVER
setFrequency NOTE_C * 2, $80
wait SEMIQUAVER
setFrequency NOTE_A, $80
wait SEMIQUAVER
setFrequency NOTE_C * 2, $80
wait SEMIQUAVER
setFrequency NOTE_G, $80
wait SEMIQUAVER
setFrequency NOTE_Bb, $80
wait SEMIQUAVER
; 60
repeat 2
setFrequency NOTE_G, $80
wait QUAVER3
setFrequency NOTE_D * 2, $80
wait QUAVER3
setFrequency NOTE_C * 2, $80
wait QUAVER3
continue
setFrequency NOTE_A, $80
wait SEMIQUAVER
setFrequency NOTE_Bb, $80
wait SEMIQUAVER
setFrequency NOTE_G, $80
wait SEMIQUAVER
setFrequency NOTE_A, $80
wait SEMIQUAVER
setFrequency NOTE_Bb, $80
wait SEMIQUAVER
setFrequency NOTE_F, $80
wait SEMIQUAVER
setFrequency NOTE_G, $80
wait SEMIQUAVER
setFrequency NOTE_D, $80
wait SEMIQUAVER
setFrequency NOTE_G, $80
wait SEMIQUAVER
setFrequency NOTE_F, $80
wait SEMIQUAVER
setFrequency NOTE_D, $80
wait SEMIQUAVER
setFrequency NOTE_F, $80
wait SEMIQUAVER
setFrequency NOTE_G, $80
wait SEMIQUAVER
setFrequency NOTE_C, $80
wait SEMIQUAVER
setFrequency NOTE_D, $80
wait SEMIQUAVER
setFrequency NOTE_Bb / 2, $80
wait SEMIQUAVER
setFrequency NOTE_C, $80
wait QUAVER3
setFrequency NOTE_A / 2, $80
wait QUAVER3
setFrequency NOTE_Bb / 2, $80
wait QUAVER3
setFrequency NOTE_G / 2, $80
wait QUAVER3
setFrequency NOTE_A / 2, $80
wait QUAVER3
setFrequency NOTE_F / 2, $80
wait QUAVER3
setFrequency NOTE_G / 2, $80
wait SEMIQUAVER
setFrequency NOTE_F / 2, $80
wait SEMIQUAVER
setFrequency NOTE_D / 2, $80
wait SEMIQUAVER
setFrequency NOTE_F / 2, $80
wait SEMIQUAVER
setFrequency NOTE_G / 2, $80
wait QUAVER
setFrequency NOTE_D, $80
wait QUAVER
setFrequency NOTE_C, $80
wait SEMIQUAVER
setFrequency NOTE_Bb / 2, $80
wait SEMIQUAVER
setFrequency NOTE_A / 2, $80
wait SEMIQUAVER
setFrequency NOTE_F / 2, $80
wait SEMIQUAVER
setFrequency NOTE_G / 2, $80
wait QUAVER
setFrequency NOTE_G / 2, $80
wait SEMIQUAVER
setFrequency NOTE_A / 2, $80
wait SEMIQUAVER
setFrequency NOTE_G / 2, $80
wait SEMIQUAVER
setFrequency NOTE_A / 2, $80
wait SEMIQUAVER
setFrequency NOTE_Bb / 2, $80
wait SEMIQUAVER
setFrequency NOTE_C, $80
wait SEMIQUAVER
setFrequency NOTE_D, $80
wait SEMIQUAVER
setFrequency NOTE_F, $80
wait SEMIQUAVER
setFrequency NOTE_G, $80
wait QUAVER
setFrequency NOTE_A, $80
wait QUAVER
setFrequency NOTE_Bb, $80
wait SEMIQUAVER
setFrequency NOTE_C * 2, $80
wait SEMIQUAVER
setFrequency NOTE_Bb, $80
wait SEMIQUAVER
setFrequency NOTE_A, $80
wait SEMIQUAVER
setFrequency NOTE_F, $80
wait SEMIQUAVER
setFrequency NOTE_E, $80
wait SEMIQUAVER
setFrequency NOTE_C, $80
wait SEMIQUAVER
setFrequency NOTE_Bb / 2, $80
wait SEMIQUAVER
setFrequency NOTE_G / 2, $80
wait SEMIQUAVER
setFrequency NOTE_Bb / 2, $80
wait SEMIQUAVER
setFrequency NOTE_C, $80
wait QUAVER
setFrequency NOTE_E, $80
wait QUAVER
setFrequency NOTE_G, $80
wait SEMIQUAVER
setFrequency NOTE_A, $80
wait SEMIQUAVER
setFrequency NOTE_Bb, $80
wait SEMIQUAVER
setFrequency NOTE_C * 2, $80
wait SEMIQUAVER
setFrequency NOTE_Bb, $80
wait SEMIQUAVER
setFrequency NOTE_A, $80
wait SEMIQUAVER
setFrequency NOTE_G, $80
wait SEMIQUAVER
setFrequency NOTE_F, $80
wait SEMIQUAVER
; 65
setFrequency NOTE_G, $80
wait SEMIQUAVER
setFrequency NOTE_F, $80
wait SEMIQUAVER
setFrequency NOTE_D, $80
wait SEMIQUAVER
setFrequency NOTE_G, $80
wait SEMIQUAVER
setFrequency NOTE_F, $80
wait SEMIQUAVER
setFrequency NOTE_D, $80
wait SEMIQUAVER
setFrequency NOTE_G, $80
wait QUAVER
setFrequency NOTE_D * 2, $80
wait SEMIQUAVER
setFrequency NOTE_C * 2, $80
wait SEMIQUAVER
setFrequency NOTE_Bb, $80
wait SEMIQUAVER
setFrequency NOTE_D * 2, $80
wait SEMIQUAVER
setFrequency NOTE_C * 2, $80
wait QUAVER
setFrequency NOTE_A, $80
wait QUAVER
setFrequency NOTE_D * 2, $80
wait SEMIQUAVER
setFrequency NOTE_Bb, $80
wait SEMIQUAVER
setFrequency NOTE_A, $80
wait SEMIQUAVER
setFrequency NOTE_G, $80
wait SEMIQUAVER
setFrequency NOTE_D, $80
wait SEMIQUAVER
setFrequency NOTE_Bb / 2, $80
wait SEMIQUAVER
setFrequency NOTE_A / 2, $80
wait SEMIQUAVER
setFrequency NOTE_G / 2, $80
wait SEMIQUAVER
setFrequency NOTE_D / 2, $80
wait SEMIQUAVER
setFrequency NOTE_G / 2, $80
wait SEMIQUAVER
setFrequency NOTE_A / 2, $80
wait SEMIQUAVER
setFrequency NOTE_Bb / 2, $80
wait SEMIQUAVER
setFrequency NOTE_D, $80
wait SEMIQUAVER
setFrequency NOTE_G, $80
wait SEMIQUAVER
setFrequency NOTE_A, $80
wait SEMIQUAVER
setFrequency NOTE_Bb, $80
wait SEMIQUAVER
wait QUAVER
setFrequency NOTE_F * 2, $80
wait QUAVER
setFrequency NOTE_G * 2, $80
wait QUAVER
setFrequency NOTE_A * 2, $80
wait QUAVER
setFrequency NOTE_G * 2, $80
wait SEMIQUAVER
setFrequency NOTE_C * 4, $80
wait SEMIQUAVER
setFrequency NOTE_Bb * 2, $80
wait SEMIQUAVER
setFrequency NOTE_C * 4, $80
wait SEMIQUAVER
setFrequency NOTE_A * 2, $80
wait SEMIQUAVER
setFrequency NOTE_C * 4, $80
wait SEMIQUAVER
setFrequency NOTE_G * 2, $80
wait SEMIQUAVER
setFrequency NOTE_Bb * 2, $80
wait SEMIQUAVER
repeat 2
setFrequency NOTE_G * 2, $80
wait QUAVER3
setFrequency NOTE_D * 4, $80
wait QUAVER3
setFrequency NOTE_C * 4, $80
wait QUAVER3
continue
setFrequency NOTE_A * 2, $80
wait SEMIQUAVER
setFrequency NOTE_Bb * 2, $80
wait SEMIQUAVER
setFrequency NOTE_G * 2, $80
wait SEMIQUAVER
setFrequency NOTE_A * 2, $80
wait SEMIQUAVER
setFrequency NOTE_Bb * 2, $80
wait SEMIQUAVER
setFrequency NOTE_F * 2, $80
wait SEMIQUAVER
setFrequency NOTE_G * 2, $80
wait SEMIQUAVER
setFrequency NOTE_D * 2, $80
wait SEMIQUAVER
setFrequency NOTE_G * 2, $80
wait SEMIQUAVER
setFrequency NOTE_F * 2, $80
wait SEMIQUAVER
setFrequency NOTE_D * 2, $80
wait SEMIQUAVER
setFrequency NOTE_F * 2, $80
wait SEMIQUAVER
setFrequency NOTE_G * 2, $80
wait SEMIQUAVER
setFrequency NOTE_C * 2, $80
wait SEMIQUAVER
setFrequency NOTE_D * 2, $80
wait SEMIQUAVER
setFrequency NOTE_Bb, $80
wait SEMIQUAVER
setFrequency NOTE_C * 2, $80
wait QUAVER3
setFrequency NOTE_A, $80
wait QUAVER3
setFrequency NOTE_Bb, $80
wait QUAVER3
setFrequency NOTE_G, $80
wait QUAVER3
setFrequency NOTE_A, $80
wait QUAVER3
setFrequency NOTE_F, $80
wait QUAVER3
; 70
setFrequency NOTE_G, $80
wait SEMIQUAVER
setFrequency NOTE_F, $80
wait SEMIQUAVER
setFrequency NOTE_D, $80
wait SEMIQUAVER
setFrequency NOTE_F, $80
wait SEMIQUAVER
setFrequency NOTE_G, $80
wait QUAVER
setFrequency NOTE_D * 2, $80
wait QUAVER
setFrequency NOTE_C * 2, $80
wait SEMIQUAVER
setFrequency NOTE_Bb, $80
wait SEMIQUAVER
setFrequency NOTE_A, $80
wait SEMIQUAVER
setFrequency NOTE_F, $80
wait SEMIQUAVER
setFrequency NOTE_G, $80
wait QUAVER
setFrequency NOTE_G, $80
wait SEMIQUAVER
setFrequency NOTE_A, $80
wait SEMIQUAVER
setFrequency NOTE_G, $80
wait SEMIQUAVER
setFrequency NOTE_A, $80
wait SEMIQUAVER
setFrequency NOTE_Bb, $80
wait SEMIQUAVER
setFrequency NOTE_C * 2, $80
wait SEMIQUAVER
setFrequency NOTE_D * 2, $80
wait SEMIQUAVER
setFrequency NOTE_F * 2, $80
wait SEMIQUAVER
setFrequency NOTE_G * 2, $80
wait QUAVER
setFrequency NOTE_A * 2, $80
wait QUAVER
setFrequency NOTE_Bb * 2, $80
wait SEMIQUAVER
setFrequency NOTE_D * 4, $80
wait SEMIQUAVER
setFrequency NOTE_Bb * 2, $80
wait SEMIQUAVER
setFrequency NOTE_A * 2, $80
wait SEMIQUAVER
setFrequency NOTE_F * 2, $80
wait SEMIQUAVER
setFrequency NOTE_E * 2, $80
wait SEMIQUAVER
setFrequency NOTE_C * 2, $80
wait SEMIQUAVER
setFrequency NOTE_Bb, $80
wait SEMIQUAVER
setFrequency NOTE_G, $80
wait SEMIQUAVER
setFrequency NOTE_Bb, $80
wait SEMIQUAVER
setFrequency NOTE_C * 2, $80
wait QUAVER
setFrequency NOTE_E * 2, $80
wait QUAVER
setFrequency NOTE_G * 2, $80
wait SEMIQUAVER
setFrequency NOTE_A * 2, $80
wait SEMIQUAVER
setFrequency NOTE_Bb * 2, $80
wait SEMIQUAVER
setFrequency NOTE_C * 4, $80
wait SEMIQUAVER
setFrequency NOTE_Bb * 2, $80
wait SEMIQUAVER
setFrequency NOTE_A * 2, $80
wait SEMIQUAVER
setFrequency NOTE_G * 2, $80
wait SEMIQUAVER
setFrequency NOTE_F * 2, $80
wait SEMIQUAVER
setFrequency NOTE_G * 2, $80
wait SEMIQUAVER
setFrequency NOTE_F * 2, $80
wait SEMIQUAVER
setFrequency NOTE_D * 2, $80
wait SEMIQUAVER
setFrequency NOTE_G * 2, $80
wait SEMIQUAVER
setFrequency NOTE_F * 2, $80
wait SEMIQUAVER
setFrequency NOTE_D * 2, $80
wait SEMIQUAVER
setFrequency NOTE_G * 2, $80
wait QUAVER
setFrequency NOTE_D * 4, $80
wait SEMIQUAVER
setFrequency NOTE_C * 4, $80
wait SEMIQUAVER
setFrequency NOTE_Bb * 2, $80
wait SEMIQUAVER
setFrequency NOTE_D * 4, $80
wait SEMIQUAVER
setFrequency NOTE_C * 4, $80
wait QUAVER
setFrequency NOTE_A * 2, $80
wait QUAVER
setFrequency NOTE_G / 2, $80
wait SEMIQUAVER
setFrequency NOTE_A / 2, $80
wait SEMIQUAVER
setFrequency NOTE_Bb / 2, $80
wait SEMIQUAVER
setFrequency NOTE_C, $80
wait SEMIQUAVER
setFrequency NOTE_D, $80
wait SEMIQUAVER
setFrequency NOTE_A / 2, $80
wait SEMIQUAVER
setFrequency NOTE_C, $80
wait SEMIQUAVER
setFrequency NOTE_F, $80
wait SEMIQUAVER
setFrequency NOTE_G, $80
wait SEMIQUAVER
setFrequency NOTE_D, $80
wait SEMIQUAVER
setFrequency NOTE_G, $80
wait SEMIQUAVER
setFrequency NOTE_A, $80
wait SEMIQUAVER
setFrequency NOTE_Bb, $80
wait SEMIQUAVER
setFrequency NOTE_G, $80
wait SEMIQUAVER
setFrequency NOTE_C * 2, $80
wait SEMIQUAVER
setFrequency NOTE_D * 2, $80
wait SEMIQUAVER
stopMusic
jump .loop
| 20.157343
| 32
| 0.752385
|
5e2091bf2d967abcf23ac182a9aa3a1392b5efa4
| 364
|
asm
|
Assembly
|
oeis/091/A091927.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/091/A091927.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/091/A091927.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A091927: Expansion of (1-6x)/(1-6x-5x^2).
; Submitted by Jamie Morken(s4)
; 1,0,5,30,205,1380,9305,62730,422905,2851080,19221005,129581430,873593605,5889468780,39704780705,267676028130,1804580072305,12165860574480,82018063808405,552937685722830,3727716433379005
mov $1,1
lpb $0
sub $0,1
mov $2,$3
mul $2,5
mul $3,6
add $3,$1
mov $1,$2
lpe
mov $0,$1
| 24.266667
| 187
| 0.722527
|
c9d0d391ad2ec4144c24ebb0d6887ee17c9efb22
| 97
|
asm
|
Assembly
|
tests/testdata/codegen-in-9-bad.asm
|
roycrippen/sicxe
|
fdca37f56c95f2a76a78455f86a90e4b89329a54
|
[
"MIT"
] | null | null | null |
tests/testdata/codegen-in-9-bad.asm
|
roycrippen/sicxe
|
fdca37f56c95f2a76a78455f86a90e4b89329a54
|
[
"MIT"
] | null | null | null |
tests/testdata/codegen-in-9-bad.asm
|
roycrippen/sicxe
|
fdca37f56c95f2a76a78455f86a90e4b89329a54
|
[
"MIT"
] | null | null | null |
test START 0
BYTE -150 . error: value too small
END test
| 24.25
| 53
| 0.43299
|
b3b0468b59a5c4ff59caea3351820da730a3a152
| 335
|
asm
|
Assembly
|
programs/oeis/098/A098295.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/098/A098295.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/098/A098295.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A098295: ((3/2)^n)/2^a(n) lies in the half-open interval [1,2).
; 0,1,1,2,2,3,4,4,5,5,6,7,7,8,8,9,9,10,11,11,12,12,13,14,14,15,15,16,16,17,18,18,19,19,20,21,21,22,22,23,23,24,25,25,26,26,27,28,28,29,29,30,31,31,32,32,33,33,34,35,35,36,36,37,38,38,39,39,40,40,41,42,42,43,43
mov $1,1
add $1,$0
mul $1,24
sub $1,1
div $1,41
mov $0,$1
| 33.5
| 209
| 0.61194
|
7bc85ee64f187888d75c9f2015db865eff9ac417
| 2,389
|
asm
|
Assembly
|
14.asm
|
AsadKhalil/Assembly_x86
|
48aa2a0ab93fd359f5f20369bb9064052c2f2884
|
[
"MIT"
] | null | null | null |
14.asm
|
AsadKhalil/Assembly_x86
|
48aa2a0ab93fd359f5f20369bb9064052c2f2884
|
[
"MIT"
] | null | null | null |
14.asm
|
AsadKhalil/Assembly_x86
|
48aa2a0ab93fd359f5f20369bb9064052c2f2884
|
[
"MIT"
] | null | null | null |
; [org 0x0100]
; jmp start
; ; subroutine to print a number at top left of screen
; ; order of parameters: location, number
; printnum:
; push bp
; mov bp, sp
; push es
; push ax
; push bx
; push cx
; push dx
; push di
; mov ax, 0xb800
; mov es, ax ; point es to video base
; mov ax, [bp+4] ; load number in ax
; mov di, [bp + 6] ; pointing di to the specified location
; mov bx, 10 ; use base 10 for division
; nextdigit:
; mov dx, 0 ; zero upper half of dividend
; div bx ; divide by 10
; add dl, 0x30 ; convert digit into ascii value
; mov dh, 0x07
; mov [es:di], dx
; sub di, 2
; cmp ax, 0 ; is the quotient zero
; jnz nextdigit ; if no divide it again
; pop di
; pop dx
; pop cx
; pop bx
; pop ax
; pop es
; pop bp
; ret 4
; start:
; mov ax, 158
; push ax
; mov ax, 0xA
; push ax
; call printnum
; mov ax, 0x4c00
; int 21h
;number printing algorithm
[org 0x0100]
jmp start ;;;;; COPY LINES 008-025 FROM EXAMPLE 6.2 (clrscr) ;;;;; ; subroutine to print a number at top left of screen ; takes the number to be printed as its parameter
printnum:
push bp
mov bp, sp
push es
push ax
push bx
push cx
push dx
push di
mov ax, 0xb800
mov es, ax ; point es to video base
mov ax, [bp+4] ; load number in ax
mov bx,16 ; use base 10 for division
mov cx, 0 ; 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, 0x3A
jb skip
add dl, 7
skip:
push dx ; save ascii value on stack
inc cx ; increment count of values
cmp ax, 0 ; is the quotient zero
jnz nextdigit ; if no divide it again
mov di, 0 ; point di to top left column
nextpos:
pop dx ; remove a digit from the stack
mov dh, 0x07 ; use normal attribute
mov [es:di], dx ; print char on screen
add di, 2 ; move to next screen location
loop nextpos ; repeat for all digits on stack
pop di
pop dx
pop cx
pop bx
pop ax
pop es
pop bp
ret 2
start:
; call clrscr ; call the clrscr subroutine
mov ax, 4545
push ax ; place number on stack
call printnum ; call the printnum subroutine
mov ax, 0x4c00 ; terminate program
int 0x21
| 21.917431
| 174
| 0.604437
|
fb61868f869f18910ac7648e7989b6797b205340
| 53,264
|
asm
|
Assembly
|
Palmtree.Math.Core.Sint/vs_build/x86_Debug/pmc_compare.asm
|
rougemeilland/Palmtree.Math.Core.Sint
|
0895fd4988b146f01ec705e091ef3fd79a721b40
|
[
"MIT"
] | null | null | null |
Palmtree.Math.Core.Sint/vs_build/x86_Debug/pmc_compare.asm
|
rougemeilland/Palmtree.Math.Core.Sint
|
0895fd4988b146f01ec705e091ef3fd79a721b40
|
[
"MIT"
] | null | null | null |
Palmtree.Math.Core.Sint/vs_build/x86_Debug/pmc_compare.asm
|
rougemeilland/Palmtree.Math.Core.Sint
|
0895fd4988b146f01ec705e091ef3fd79a721b40
|
[
"MIT"
] | null | null | null |
; Listing generated by Microsoft (R) Optimizing Compiler Version 19.16.27026.1
TITLE Z:\Sources\Lunor\Repos\rougemeilland\Palmtree.Math.Core.Sint\Palmtree.Math.Core.Sint\pmc_compare.c
.686P
.XMM
include listing.inc
.model flat
INCLUDELIB MSVCRTD
INCLUDELIB OLDNAMES
_DATA SEGMENT
COMM _uint_number_zero:DWORD
COMM _uint_number_one:DWORD
_DATA ENDS
msvcjmc SEGMENT
__7B7A869E_ctype@h DB 01H
__457DD326_basetsd@h DB 01H
__4384A2D9_corecrt_memcpy_s@h DB 01H
__4E51A221_corecrt_wstring@h DB 01H
__2140C079_string@h DB 01H
__1887E595_winnt@h DB 01H
__9FC7C64B_processthreadsapi@h DB 01H
__FA470AEC_memoryapi@h DB 01H
__F37DAFF1_winerror@h DB 01H
__7A450CCC_winbase@h DB 01H
__B4B40122_winioctl@h DB 01H
__86261D59_stralign@h DB 01H
__8CA3E54E_pmc_inline_func@h DB 01H
__C8C7A597_pmc_compare@c DB 01H
msvcjmc ENDS
PUBLIC _PMC_Compare_I_X@12
PUBLIC _PMC_Compare_L_X@16
PUBLIC _PMC_Compare_UX_X@12
PUBLIC _PMC_Compare_X_I@12
PUBLIC _PMC_Compare_X_L@16
PUBLIC _PMC_Compare_X_UX@12
PUBLIC _PMC_Compare_X_X@12
PUBLIC __JustMyCode_Default
EXTRN _CheckNumber:PROC
EXTRN @_RTC_CheckStackVars@8:PROC
EXTRN @__CheckForDebuggerJustMyCode@4:PROC
EXTRN @__security_check_cookie@4:PROC
EXTRN __RTC_CheckEsp:PROC
EXTRN __RTC_InitBase:PROC
EXTRN __RTC_Shutdown:PROC
EXTRN _ep_uint:BYTE
EXTRN ___security_cookie:DWORD
; COMDAT rtc$TMZ
rtc$TMZ SEGMENT
__RTC_Shutdown.rtc$TMZ DD FLAT:__RTC_Shutdown
rtc$TMZ ENDS
; COMDAT rtc$IMZ
rtc$IMZ SEGMENT
__RTC_InitBase.rtc$IMZ DD FLAT:__RTC_InitBase
rtc$IMZ ENDS
; Function compile flags: /Odt
; COMDAT __JustMyCode_Default
_TEXT SEGMENT
__JustMyCode_Default PROC ; COMDAT
push ebp
mov ebp, esp
pop ebp
ret 0
__JustMyCode_Default ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.sint\palmtree.math.core.sint\pmc_compare.c
; COMDAT _CompareU_X_X_Imp
_TEXT SEGMENT
_temp_w$ = -24 ; size = 4
_result$ = -12 ; size = 4
__$ArrayPad$ = -4 ; size = 4
_sign$ = 8 ; size = 1
_u$ = 12 ; size = 4
_v$ = 16 ; size = 4
_w$ = 20 ; size = 4
_CompareU_X_X_Imp PROC ; COMDAT
; 66 : {
push ebp
mov ebp, esp
sub esp, 220 ; 000000dcH
push ebx
push esi
push edi
lea edi, DWORD PTR [ebp-220]
mov ecx, 55 ; 00000037H
mov eax, -858993460 ; ccccccccH
rep stosd
mov eax, DWORD PTR ___security_cookie
xor eax, ebp
mov DWORD PTR __$ArrayPad$[ebp], eax
mov ecx, OFFSET __C8C7A597_pmc_compare@c
call @__CheckForDebuggerJustMyCode@4
; 67 : PMC_STATUS_CODE result;
; 68 : _INT32_T temp_w;
; 69 : if ((result = ep_uint.Compare_X_X(u, v, &temp_w)) != PMC_STATUS_OK)
mov esi, esp
lea eax, DWORD PTR _temp_w$[ebp]
push eax
mov ecx, DWORD PTR _v$[ebp]
push ecx
mov edx, DWORD PTR _u$[ebp]
push edx
call DWORD PTR _ep_uint+220
cmp esi, esp
call __RTC_CheckEsp
mov DWORD PTR _result$[ebp], eax
cmp DWORD PTR _result$[ebp], 0
je SHORT $LN2@CompareU_X
; 70 : return (result);
mov eax, DWORD PTR _result$[ebp]
jmp SHORT $LN1@CompareU_X
$LN2@CompareU_X:
; 71 : if (sign > 0)
movsx eax, BYTE PTR _sign$[ebp]
test eax, eax
jle SHORT $LN3@CompareU_X
; 72 : *w = temp_w;
mov eax, DWORD PTR _w$[ebp]
mov ecx, DWORD PTR _temp_w$[ebp]
mov DWORD PTR [eax], ecx
jmp SHORT $LN4@CompareU_X
$LN3@CompareU_X:
; 73 : #ifdef _DEBUG
; 74 : else if (sign == 0)
movsx eax, BYTE PTR _sign$[ebp]
test eax, eax
jne SHORT $LN5@CompareU_X
; 75 : return (PMC_STATUS_INTERNAL_ERROR);
mov eax, -256 ; ffffff00H
jmp SHORT $LN1@CompareU_X
jmp SHORT $LN4@CompareU_X
$LN5@CompareU_X:
; 76 : #endif
; 77 : else
; 78 : *w = -temp_w;
mov eax, DWORD PTR _temp_w$[ebp]
neg eax
mov ecx, DWORD PTR _w$[ebp]
mov DWORD PTR [ecx], eax
$LN4@CompareU_X:
; 79 : return (PMC_STATUS_OK);
xor eax, eax
$LN1@CompareU_X:
; 80 : }
push edx
mov ecx, ebp
push eax
lea edx, DWORD PTR $LN10@CompareU_X
call @_RTC_CheckStackVars@8
pop eax
pop edx
pop edi
pop esi
pop ebx
mov ecx, DWORD PTR __$ArrayPad$[ebp]
xor ecx, ebp
call @__security_check_cookie@4
add esp, 220 ; 000000dcH
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
npad 3
$LN10@CompareU_X:
DD 1
DD $LN9@CompareU_X
$LN9@CompareU_X:
DD -24 ; ffffffe8H
DD 4
DD $LN8@CompareU_X
$LN8@CompareU_X:
DB 116 ; 00000074H
DB 101 ; 00000065H
DB 109 ; 0000006dH
DB 112 ; 00000070H
DB 95 ; 0000005fH
DB 119 ; 00000077H
DB 0
_CompareU_X_X_Imp ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.sint\palmtree.math.core.sint\pmc_compare.c
; COMDAT _CompareU_X_L_Imp
_TEXT SEGMENT
_temp_w$ = -24 ; size = 4
_result$ = -12 ; size = 4
__$ArrayPad$ = -4 ; size = 4
_sign$ = 8 ; size = 1
_u$ = 12 ; size = 4
_v$ = 16 ; size = 8
_w$ = 24 ; size = 4
_CompareU_X_L_Imp PROC ; COMDAT
; 49 : {
push ebp
mov ebp, esp
sub esp, 220 ; 000000dcH
push ebx
push esi
push edi
lea edi, DWORD PTR [ebp-220]
mov ecx, 55 ; 00000037H
mov eax, -858993460 ; ccccccccH
rep stosd
mov eax, DWORD PTR ___security_cookie
xor eax, ebp
mov DWORD PTR __$ArrayPad$[ebp], eax
mov ecx, OFFSET __C8C7A597_pmc_compare@c
call @__CheckForDebuggerJustMyCode@4
; 50 : PMC_STATUS_CODE result;
; 51 : _INT32_T temp_w;
; 52 : if ((result = ep_uint.Compare_X_L(u, v, &temp_w)) != PMC_STATUS_OK)
mov esi, esp
lea eax, DWORD PTR _temp_w$[ebp]
push eax
mov ecx, DWORD PTR _v$[ebp+4]
push ecx
mov edx, DWORD PTR _v$[ebp]
push edx
mov eax, DWORD PTR _u$[ebp]
push eax
call DWORD PTR _ep_uint+216
cmp esi, esp
call __RTC_CheckEsp
mov DWORD PTR _result$[ebp], eax
cmp DWORD PTR _result$[ebp], 0
je SHORT $LN2@CompareU_X
; 53 : return (result);
mov eax, DWORD PTR _result$[ebp]
jmp SHORT $LN1@CompareU_X
$LN2@CompareU_X:
; 54 : if (sign > 0)
movsx eax, BYTE PTR _sign$[ebp]
test eax, eax
jle SHORT $LN3@CompareU_X
; 55 : *w = temp_w;
mov eax, DWORD PTR _w$[ebp]
mov ecx, DWORD PTR _temp_w$[ebp]
mov DWORD PTR [eax], ecx
jmp SHORT $LN4@CompareU_X
$LN3@CompareU_X:
; 56 : #ifdef _DEBUG
; 57 : else if (sign == 0)
movsx eax, BYTE PTR _sign$[ebp]
test eax, eax
jne SHORT $LN5@CompareU_X
; 58 : return (PMC_STATUS_INTERNAL_ERROR);
mov eax, -256 ; ffffff00H
jmp SHORT $LN1@CompareU_X
jmp SHORT $LN4@CompareU_X
$LN5@CompareU_X:
; 59 : #endif
; 60 : else
; 61 : *w = -temp_w;
mov eax, DWORD PTR _temp_w$[ebp]
neg eax
mov ecx, DWORD PTR _w$[ebp]
mov DWORD PTR [ecx], eax
$LN4@CompareU_X:
; 62 : return (PMC_STATUS_OK);
xor eax, eax
$LN1@CompareU_X:
; 63 : }
push edx
mov ecx, ebp
push eax
lea edx, DWORD PTR $LN10@CompareU_X
call @_RTC_CheckStackVars@8
pop eax
pop edx
pop edi
pop esi
pop ebx
mov ecx, DWORD PTR __$ArrayPad$[ebp]
xor ecx, ebp
call @__security_check_cookie@4
add esp, 220 ; 000000dcH
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
npad 3
$LN10@CompareU_X:
DD 1
DD $LN9@CompareU_X
$LN9@CompareU_X:
DD -24 ; ffffffe8H
DD 4
DD $LN8@CompareU_X
$LN8@CompareU_X:
DB 116 ; 00000074H
DB 101 ; 00000065H
DB 109 ; 0000006dH
DB 112 ; 00000070H
DB 95 ; 0000005fH
DB 119 ; 00000077H
DB 0
_CompareU_X_L_Imp ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.sint\palmtree.math.core.sint\pmc_compare.c
; COMDAT _CompareU_X_I_Imp
_TEXT SEGMENT
_temp_w$ = -24 ; size = 4
_result$ = -12 ; size = 4
__$ArrayPad$ = -4 ; size = 4
_sign$ = 8 ; size = 1
_u$ = 12 ; size = 4
_v$ = 16 ; size = 4
_w$ = 20 ; size = 4
_CompareU_X_I_Imp PROC ; COMDAT
; 32 : {
push ebp
mov ebp, esp
sub esp, 220 ; 000000dcH
push ebx
push esi
push edi
lea edi, DWORD PTR [ebp-220]
mov ecx, 55 ; 00000037H
mov eax, -858993460 ; ccccccccH
rep stosd
mov eax, DWORD PTR ___security_cookie
xor eax, ebp
mov DWORD PTR __$ArrayPad$[ebp], eax
mov ecx, OFFSET __C8C7A597_pmc_compare@c
call @__CheckForDebuggerJustMyCode@4
; 33 : PMC_STATUS_CODE result;
; 34 : _INT32_T temp_w;
; 35 : if ((result = ep_uint.Compare_X_I(u, v, &temp_w)) != PMC_STATUS_OK)
mov esi, esp
lea eax, DWORD PTR _temp_w$[ebp]
push eax
mov ecx, DWORD PTR _v$[ebp]
push ecx
mov edx, DWORD PTR _u$[ebp]
push edx
call DWORD PTR _ep_uint+212
cmp esi, esp
call __RTC_CheckEsp
mov DWORD PTR _result$[ebp], eax
cmp DWORD PTR _result$[ebp], 0
je SHORT $LN2@CompareU_X
; 36 : return (result);
mov eax, DWORD PTR _result$[ebp]
jmp SHORT $LN1@CompareU_X
$LN2@CompareU_X:
; 37 : if (sign > 0)
movsx eax, BYTE PTR _sign$[ebp]
test eax, eax
jle SHORT $LN3@CompareU_X
; 38 : *w = temp_w;
mov eax, DWORD PTR _w$[ebp]
mov ecx, DWORD PTR _temp_w$[ebp]
mov DWORD PTR [eax], ecx
jmp SHORT $LN4@CompareU_X
$LN3@CompareU_X:
; 39 : #ifdef _DEBUG
; 40 : else if (sign == 0)
movsx eax, BYTE PTR _sign$[ebp]
test eax, eax
jne SHORT $LN5@CompareU_X
; 41 : return (PMC_STATUS_INTERNAL_ERROR);
mov eax, -256 ; ffffff00H
jmp SHORT $LN1@CompareU_X
jmp SHORT $LN4@CompareU_X
$LN5@CompareU_X:
; 42 : #endif
; 43 : else
; 44 : *w = -temp_w;
mov eax, DWORD PTR _temp_w$[ebp]
neg eax
mov ecx, DWORD PTR _w$[ebp]
mov DWORD PTR [ecx], eax
$LN4@CompareU_X:
; 45 : return (PMC_STATUS_OK);
xor eax, eax
$LN1@CompareU_X:
; 46 : }
push edx
mov ecx, ebp
push eax
lea edx, DWORD PTR $LN10@CompareU_X
call @_RTC_CheckStackVars@8
pop eax
pop edx
pop edi
pop esi
pop ebx
mov ecx, DWORD PTR __$ArrayPad$[ebp]
xor ecx, ebp
call @__security_check_cookie@4
add esp, 220 ; 000000dcH
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
npad 3
$LN10@CompareU_X:
DD 1
DD $LN9@CompareU_X
$LN9@CompareU_X:
DD -24 ; ffffffe8H
DD 4
DD $LN8@CompareU_X
$LN8@CompareU_X:
DB 116 ; 00000074H
DB 101 ; 00000065H
DB 109 ; 0000006dH
DB 112 ; 00000070H
DB 95 ; 0000005fH
DB 119 ; 00000077H
DB 0
_CompareU_X_I_Imp ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.uint\palmtree.math.core.uint\pmc_inline_func.h
; COMDAT _GET_ABS_64
_TEXT SEGMENT
tv68 = -200 ; size = 8
_u$ = 8 ; size = 8
_sign$ = 16 ; size = 4
_GET_ABS_64 PROC ; COMDAT
; 800 : {
push ebp
mov ebp, esp
sub esp, 200 ; 000000c8H
push ebx
push esi
push edi
lea edi, DWORD PTR [ebp-200]
mov ecx, 50 ; 00000032H
mov eax, -858993460 ; ccccccccH
rep stosd
mov ecx, OFFSET __8CA3E54E_pmc_inline_func@h
call @__CheckForDebuggerJustMyCode@4
; 801 : if (u > 0)
cmp DWORD PTR _u$[ebp+4], 0
jl SHORT $LN2@GET_ABS_64
jg SHORT $LN9@GET_ABS_64
cmp DWORD PTR _u$[ebp], 0
jbe SHORT $LN2@GET_ABS_64
$LN9@GET_ABS_64:
; 802 : {
; 803 : *sign = 1;
mov eax, DWORD PTR _sign$[ebp]
mov BYTE PTR [eax], 1
; 804 : return ((_UINT64_T)u);
mov eax, DWORD PTR _u$[ebp]
mov edx, DWORD PTR _u$[ebp+4]
jmp SHORT $LN1@GET_ABS_64
; 805 : }
jmp SHORT $LN1@GET_ABS_64
$LN2@GET_ABS_64:
; 806 : else if (u == 0)
mov eax, DWORD PTR _u$[ebp]
or eax, DWORD PTR _u$[ebp+4]
jne SHORT $LN4@GET_ABS_64
; 807 : {
; 808 : *sign = 0;
mov eax, DWORD PTR _sign$[ebp]
mov BYTE PTR [eax], 0
; 809 : return (0);
xor eax, eax
xor edx, edx
jmp SHORT $LN1@GET_ABS_64
; 810 : }
jmp SHORT $LN1@GET_ABS_64
$LN4@GET_ABS_64:
; 811 : else
; 812 : {
; 813 : *sign = -1;
mov eax, DWORD PTR _sign$[ebp]
mov BYTE PTR [eax], -1
; 814 : return ((_UINT64_T)u == 0x8000000000000000UL ? 0x8000000000000000UL : (_UINT64_T)-u);
cmp DWORD PTR _u$[ebp], 0
jne SHORT $LN7@GET_ABS_64
cmp DWORD PTR _u$[ebp+4], -2147483648 ; 80000000H
jne SHORT $LN7@GET_ABS_64
mov DWORD PTR tv68[ebp], 0
mov DWORD PTR tv68[ebp+4], -2147483648 ; 80000000H
jmp SHORT $LN8@GET_ABS_64
$LN7@GET_ABS_64:
mov eax, DWORD PTR _u$[ebp]
neg eax
mov ecx, DWORD PTR _u$[ebp+4]
adc ecx, 0
neg ecx
mov DWORD PTR tv68[ebp], eax
mov DWORD PTR tv68[ebp+4], ecx
$LN8@GET_ABS_64:
mov eax, DWORD PTR tv68[ebp]
mov edx, DWORD PTR tv68[ebp+4]
$LN1@GET_ABS_64:
; 815 : }
; 816 : }
pop edi
pop esi
pop ebx
add esp, 200 ; 000000c8H
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
_GET_ABS_64 ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.uint\palmtree.math.core.uint\pmc_inline_func.h
; COMDAT _GET_ABS_32
_TEXT SEGMENT
tv68 = -196 ; size = 4
_u$ = 8 ; size = 4
_sign$ = 12 ; size = 4
_GET_ABS_32 PROC ; COMDAT
; 780 : {
push ebp
mov ebp, esp
sub esp, 196 ; 000000c4H
push ebx
push esi
push edi
lea edi, DWORD PTR [ebp-196]
mov ecx, 49 ; 00000031H
mov eax, -858993460 ; ccccccccH
rep stosd
mov ecx, OFFSET __8CA3E54E_pmc_inline_func@h
call @__CheckForDebuggerJustMyCode@4
; 781 : if (u > 0)
cmp DWORD PTR _u$[ebp], 0
jle SHORT $LN2@GET_ABS_32
; 782 : {
; 783 : *sign = 1;
mov eax, DWORD PTR _sign$[ebp]
mov BYTE PTR [eax], 1
; 784 : return ((_UINT32_T)u);
mov eax, DWORD PTR _u$[ebp]
jmp SHORT $LN1@GET_ABS_32
; 785 : }
jmp SHORT $LN1@GET_ABS_32
$LN2@GET_ABS_32:
; 786 : else if (u == 0)
cmp DWORD PTR _u$[ebp], 0
jne SHORT $LN4@GET_ABS_32
; 787 : {
; 788 : *sign = 0;
mov eax, DWORD PTR _sign$[ebp]
mov BYTE PTR [eax], 0
; 789 : return (0);
xor eax, eax
jmp SHORT $LN1@GET_ABS_32
; 790 : }
jmp SHORT $LN1@GET_ABS_32
$LN4@GET_ABS_32:
; 791 : else
; 792 : {
; 793 : *sign = -1;
mov eax, DWORD PTR _sign$[ebp]
mov BYTE PTR [eax], -1
; 794 : return ((_UINT32_T)u == 0x80000000U ? 0x80000000U : (_UINT32_T)-u);
cmp DWORD PTR _u$[ebp], -2147483648 ; 80000000H
jne SHORT $LN7@GET_ABS_32
mov DWORD PTR tv68[ebp], -2147483648 ; 80000000H
jmp SHORT $LN8@GET_ABS_32
$LN7@GET_ABS_32:
mov eax, DWORD PTR _u$[ebp]
neg eax
mov DWORD PTR tv68[ebp], eax
$LN8@GET_ABS_32:
mov eax, DWORD PTR tv68[ebp]
$LN1@GET_ABS_32:
; 795 : }
; 796 : }
pop edi
pop esi
pop ebx
add esp, 196 ; 000000c4H
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
_GET_ABS_32 ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.sint\palmtree.math.core.sint\pmc_compare.c
; COMDAT _PMC_Compare_X_X@12
_TEXT SEGMENT
_nv$ = -32 ; size = 4
_nu$ = -20 ; size = 4
_result$ = -8 ; size = 4
_u$ = 8 ; size = 4
_v$ = 12 ; size = 4
_w$ = 16 ; size = 4
_PMC_Compare_X_X@12 PROC ; COMDAT
; 456 : {
push ebp
mov ebp, esp
sub esp, 228 ; 000000e4H
push ebx
push esi
push edi
lea edi, DWORD PTR [ebp-228]
mov ecx, 57 ; 00000039H
mov eax, -858993460 ; ccccccccH
rep stosd
mov ecx, OFFSET __C8C7A597_pmc_compare@c
call @__CheckForDebuggerJustMyCode@4
; 457 : if (u == NULL)
cmp DWORD PTR _u$[ebp], 0
jne SHORT $LN2@PMC_Compar
; 458 : return (PMC_STATUS_ARGUMENT_ERROR);
or eax, -1
jmp $LN1@PMC_Compar
$LN2@PMC_Compar:
; 459 : if (v == NULL)
cmp DWORD PTR _v$[ebp], 0
jne SHORT $LN3@PMC_Compar
; 460 : return (PMC_STATUS_ARGUMENT_ERROR);
or eax, -1
jmp $LN1@PMC_Compar
$LN3@PMC_Compar:
; 461 : if (w == NULL)
cmp DWORD PTR _w$[ebp], 0
jne SHORT $LN4@PMC_Compar
; 462 : return (PMC_STATUS_ARGUMENT_ERROR);
or eax, -1
jmp $LN1@PMC_Compar
$LN4@PMC_Compar:
; 463 : PMC_STATUS_CODE result;
; 464 : NUMBER_HEADER* nu = (NUMBER_HEADER*)u;
mov eax, DWORD PTR _u$[ebp]
mov DWORD PTR _nu$[ebp], eax
; 465 : NUMBER_HEADER* nv = (NUMBER_HEADER*)v;
mov eax, DWORD PTR _v$[ebp]
mov DWORD PTR _nv$[ebp], eax
; 466 : if ((result = CheckNumber(nu)) != PMC_STATUS_OK)
mov eax, DWORD PTR _nu$[ebp]
push eax
call _CheckNumber
add esp, 4
mov DWORD PTR _result$[ebp], eax
cmp DWORD PTR _result$[ebp], 0
je SHORT $LN5@PMC_Compar
; 467 : return (result);
mov eax, DWORD PTR _result$[ebp]
jmp $LN1@PMC_Compar
$LN5@PMC_Compar:
; 468 : if ((result = CheckNumber(nv)) != PMC_STATUS_OK)
mov eax, DWORD PTR _nv$[ebp]
push eax
call _CheckNumber
add esp, 4
mov DWORD PTR _result$[ebp], eax
cmp DWORD PTR _result$[ebp], 0
je SHORT $LN6@PMC_Compar
; 469 : return (result);
mov eax, DWORD PTR _result$[ebp]
jmp $LN1@PMC_Compar
$LN6@PMC_Compar:
; 470 : if (nu->SIGN == 0)
mov eax, DWORD PTR _nu$[ebp]
movsx ecx, BYTE PTR [eax+16]
test ecx, ecx
jne SHORT $LN7@PMC_Compar
; 471 : {
; 472 : // u == 0 の場合
; 473 :
; 474 : // v の符号の反対を返す
; 475 : *w = -nv->SIGN;
mov eax, DWORD PTR _nv$[ebp]
movsx ecx, BYTE PTR [eax+16]
neg ecx
mov edx, DWORD PTR _w$[ebp]
mov DWORD PTR [edx], ecx
; 476 : }
jmp $LN8@PMC_Compar
$LN7@PMC_Compar:
; 477 : else if (nu->SIGN > 0)
mov eax, DWORD PTR _nu$[ebp]
movsx ecx, BYTE PTR [eax+16]
test ecx, ecx
jle SHORT $LN9@PMC_Compar
; 478 : {
; 479 : // u > 0 の場合
; 480 :
; 481 : if (nv->SIGN <= 0)
mov eax, DWORD PTR _nv$[ebp]
movsx ecx, BYTE PTR [eax+16]
test ecx, ecx
jg SHORT $LN11@PMC_Compar
; 482 : {
; 483 : // v == 0 の場合
; 484 :
; 485 : // 1 を返す
; 486 : *w = 1;
mov eax, DWORD PTR _w$[ebp]
mov DWORD PTR [eax], 1
; 487 : }
jmp SHORT $LN12@PMC_Compar
$LN11@PMC_Compar:
; 488 : else
; 489 : {
; 490 : // v > 0 の場合
; 491 :
; 492 : // abs(u) と abs(v) の比較結果を返す
; 493 : if ((result = CompareU_X_X_Imp(1, nu->ABS, nv->ABS, w)) != PMC_STATUS_OK)
mov eax, DWORD PTR _w$[ebp]
push eax
mov ecx, DWORD PTR _nv$[ebp]
mov edx, DWORD PTR [ecx+12]
push edx
mov eax, DWORD PTR _nu$[ebp]
mov ecx, DWORD PTR [eax+12]
push ecx
push 1
call _CompareU_X_X_Imp
add esp, 16 ; 00000010H
mov DWORD PTR _result$[ebp], eax
cmp DWORD PTR _result$[ebp], 0
je SHORT $LN12@PMC_Compar
; 494 : return (result);
mov eax, DWORD PTR _result$[ebp]
jmp SHORT $LN1@PMC_Compar
$LN12@PMC_Compar:
; 495 : }
; 496 : }
jmp SHORT $LN8@PMC_Compar
$LN9@PMC_Compar:
; 497 : else
; 498 : {
; 499 : // u < 0 の場合
; 500 :
; 501 : if (nv->SIGN >= 0)
mov eax, DWORD PTR _nv$[ebp]
movsx ecx, BYTE PTR [eax+16]
test ecx, ecx
jl SHORT $LN14@PMC_Compar
; 502 : {
; 503 : // v == 0 の場合
; 504 :
; 505 : // -1 を返す
; 506 : *w = -1;
mov eax, DWORD PTR _w$[ebp]
mov DWORD PTR [eax], -1
; 507 : }
jmp SHORT $LN8@PMC_Compar
$LN14@PMC_Compar:
; 508 : else
; 509 : {
; 510 : // v < 0 の場合
; 511 :
; 512 : // -abs(u) と -abs(v) の比較結果を返す
; 513 : if ((result = CompareU_X_X_Imp(-1, nu->ABS, nv->ABS, w)) != PMC_STATUS_OK)
mov eax, DWORD PTR _w$[ebp]
push eax
mov ecx, DWORD PTR _nv$[ebp]
mov edx, DWORD PTR [ecx+12]
push edx
mov eax, DWORD PTR _nu$[ebp]
mov ecx, DWORD PTR [eax+12]
push ecx
push -1
call _CompareU_X_X_Imp
add esp, 16 ; 00000010H
mov DWORD PTR _result$[ebp], eax
cmp DWORD PTR _result$[ebp], 0
je SHORT $LN8@PMC_Compar
; 514 : return (result);
mov eax, DWORD PTR _result$[ebp]
jmp SHORT $LN1@PMC_Compar
$LN8@PMC_Compar:
; 515 : }
; 516 : }
; 517 : #ifdef _DEBUG
; 518 : if (*w != 0 && *w != 1 && *w != -1)
mov eax, DWORD PTR _w$[ebp]
cmp DWORD PTR [eax], 0
je SHORT $LN17@PMC_Compar
mov eax, DWORD PTR _w$[ebp]
cmp DWORD PTR [eax], 1
je SHORT $LN17@PMC_Compar
mov eax, DWORD PTR _w$[ebp]
cmp DWORD PTR [eax], -1
je SHORT $LN17@PMC_Compar
; 519 : return (PMC_STATUS_INTERNAL_ERROR);
mov eax, -256 ; ffffff00H
jmp SHORT $LN1@PMC_Compar
$LN17@PMC_Compar:
; 520 : #endif
; 521 : return (PMC_STATUS_OK);
xor eax, eax
$LN1@PMC_Compar:
; 522 : }
pop edi
pop esi
pop ebx
add esp, 228 ; 000000e4H
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 12 ; 0000000cH
_PMC_Compare_X_X@12 ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.sint\palmtree.math.core.sint\pmc_compare.c
; COMDAT _PMC_Compare_X_UX@12
_TEXT SEGMENT
_nu$ = -20 ; size = 4
_result$ = -8 ; size = 4
_u$ = 8 ; size = 4
_v$ = 12 ; size = 4
_w$ = 16 ; size = 4
_PMC_Compare_X_UX@12 PROC ; COMDAT
; 391 : {
push ebp
mov ebp, esp
sub esp, 216 ; 000000d8H
push ebx
push esi
push edi
lea edi, DWORD PTR [ebp-216]
mov ecx, 54 ; 00000036H
mov eax, -858993460 ; ccccccccH
rep stosd
mov ecx, OFFSET __C8C7A597_pmc_compare@c
call @__CheckForDebuggerJustMyCode@4
; 392 : if (u == NULL)
cmp DWORD PTR _u$[ebp], 0
jne SHORT $LN2@PMC_Compar
; 393 : return (PMC_STATUS_ARGUMENT_ERROR);
or eax, -1
jmp $LN1@PMC_Compar
$LN2@PMC_Compar:
; 394 : if (v == NULL)
cmp DWORD PTR _v$[ebp], 0
jne SHORT $LN3@PMC_Compar
; 395 : return (PMC_STATUS_ARGUMENT_ERROR);
or eax, -1
jmp $LN1@PMC_Compar
$LN3@PMC_Compar:
; 396 : if (w == NULL)
cmp DWORD PTR _w$[ebp], 0
jne SHORT $LN4@PMC_Compar
; 397 : return (PMC_STATUS_ARGUMENT_ERROR);
or eax, -1
jmp $LN1@PMC_Compar
$LN4@PMC_Compar:
; 398 : PMC_STATUS_CODE result;
; 399 : NUMBER_HEADER* nu = (NUMBER_HEADER*)u;
mov eax, DWORD PTR _u$[ebp]
mov DWORD PTR _nu$[ebp], eax
; 400 : if ((result = CheckNumber(nu)) != PMC_STATUS_OK)
mov eax, DWORD PTR _nu$[ebp]
push eax
call _CheckNumber
add esp, 4
mov DWORD PTR _result$[ebp], eax
cmp DWORD PTR _result$[ebp], 0
je SHORT $LN5@PMC_Compar
; 401 : return (result);
mov eax, DWORD PTR _result$[ebp]
jmp $LN1@PMC_Compar
$LN5@PMC_Compar:
; 402 : if (nu->SIGN == 0)
mov eax, DWORD PTR _nu$[ebp]
movsx ecx, BYTE PTR [eax+16]
test ecx, ecx
jne SHORT $LN6@PMC_Compar
; 403 : {
; 404 : // u == 0 の場合
; 405 :
; 406 : if (v->FLAGS.IS_ZERO)
mov eax, DWORD PTR _v$[ebp]
mov ecx, DWORD PTR [eax]
and ecx, 1
je SHORT $LN8@PMC_Compar
; 407 : {
; 408 : // v == 0 の場合
; 409 :
; 410 : // 0 を返す
; 411 : *w = 0;
mov eax, DWORD PTR _w$[ebp]
mov DWORD PTR [eax], 0
; 412 : }
jmp SHORT $LN9@PMC_Compar
$LN8@PMC_Compar:
; 413 : else
; 414 : {
; 415 : // v > 0 の場合
; 416 :
; 417 : // -1 を返す
; 418 : *w = -1;
mov eax, DWORD PTR _w$[ebp]
mov DWORD PTR [eax], -1
$LN9@PMC_Compar:
; 419 : }
; 420 : }
jmp SHORT $LN7@PMC_Compar
$LN6@PMC_Compar:
; 421 : else if (nu->SIGN > 0)
mov eax, DWORD PTR _nu$[ebp]
movsx ecx, BYTE PTR [eax+16]
test ecx, ecx
jle SHORT $LN10@PMC_Compar
; 422 : {
; 423 : // u > 0 の場合
; 424 :
; 425 : if (v->FLAGS.IS_ZERO)
mov eax, DWORD PTR _v$[ebp]
mov ecx, DWORD PTR [eax]
and ecx, 1
je SHORT $LN12@PMC_Compar
; 426 : {
; 427 : // v == 0 の場合
; 428 :
; 429 : // 1 を返す
; 430 : *w = 1;
mov eax, DWORD PTR _w$[ebp]
mov DWORD PTR [eax], 1
; 431 : }
jmp SHORT $LN13@PMC_Compar
$LN12@PMC_Compar:
; 432 : else
; 433 : {
; 434 : // v > 0 の場合
; 435 :
; 436 : // abs(u) と abs(v) の比較結果を返す
; 437 : if ((result = CompareU_X_X_Imp(1, nu->ABS, v, w)) != PMC_STATUS_OK)
mov eax, DWORD PTR _w$[ebp]
push eax
mov ecx, DWORD PTR _v$[ebp]
push ecx
mov edx, DWORD PTR _nu$[ebp]
mov eax, DWORD PTR [edx+12]
push eax
push 1
call _CompareU_X_X_Imp
add esp, 16 ; 00000010H
mov DWORD PTR _result$[ebp], eax
cmp DWORD PTR _result$[ebp], 0
je SHORT $LN13@PMC_Compar
; 438 : return (result);
mov eax, DWORD PTR _result$[ebp]
jmp SHORT $LN1@PMC_Compar
$LN13@PMC_Compar:
; 439 : }
; 440 : }
jmp SHORT $LN7@PMC_Compar
$LN10@PMC_Compar:
; 441 : else
; 442 : {
; 443 : // u < 0 の場合
; 444 :
; 445 : // -1 を返す
; 446 : *w = -1;
mov eax, DWORD PTR _w$[ebp]
mov DWORD PTR [eax], -1
$LN7@PMC_Compar:
; 447 : }
; 448 : #ifdef _DEBUG
; 449 : if (*w != 0 && *w != 1 && *w != -1)
mov eax, DWORD PTR _w$[ebp]
cmp DWORD PTR [eax], 0
je SHORT $LN15@PMC_Compar
mov eax, DWORD PTR _w$[ebp]
cmp DWORD PTR [eax], 1
je SHORT $LN15@PMC_Compar
mov eax, DWORD PTR _w$[ebp]
cmp DWORD PTR [eax], -1
je SHORT $LN15@PMC_Compar
; 450 : return (PMC_STATUS_INTERNAL_ERROR);
mov eax, -256 ; ffffff00H
jmp SHORT $LN1@PMC_Compar
$LN15@PMC_Compar:
; 451 : #endif
; 452 : return (PMC_STATUS_OK);
xor eax, eax
$LN1@PMC_Compar:
; 453 : }
pop edi
pop esi
pop ebx
add esp, 216 ; 000000d8H
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 12 ; 0000000cH
_PMC_Compare_X_UX@12 ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.sint\palmtree.math.core.sint\pmc_compare.c
; COMDAT _PMC_Compare_X_L@16
_TEXT SEGMENT
_v_abs$ = -52 ; size = 8
_v_sign$ = -33 ; size = 1
_nu$ = -24 ; size = 4
_result$ = -12 ; size = 4
__$ArrayPad$ = -4 ; size = 4
_u$ = 8 ; size = 4
_v$ = 12 ; size = 8
_w$ = 20 ; size = 4
_PMC_Compare_X_L@16 PROC ; COMDAT
; 325 : {
push ebp
mov ebp, esp
sub esp, 248 ; 000000f8H
push ebx
push esi
push edi
lea edi, DWORD PTR [ebp-248]
mov ecx, 62 ; 0000003eH
mov eax, -858993460 ; ccccccccH
rep stosd
mov eax, DWORD PTR ___security_cookie
xor eax, ebp
mov DWORD PTR __$ArrayPad$[ebp], eax
mov ecx, OFFSET __C8C7A597_pmc_compare@c
call @__CheckForDebuggerJustMyCode@4
; 326 : if (u == NULL)
cmp DWORD PTR _u$[ebp], 0
jne SHORT $LN2@PMC_Compar
; 327 : return (PMC_STATUS_ARGUMENT_ERROR);
or eax, -1
jmp $LN1@PMC_Compar
$LN2@PMC_Compar:
; 328 : if (w == NULL)
cmp DWORD PTR _w$[ebp], 0
jne SHORT $LN3@PMC_Compar
; 329 : return (PMC_STATUS_ARGUMENT_ERROR);
or eax, -1
jmp $LN1@PMC_Compar
$LN3@PMC_Compar:
; 330 : PMC_STATUS_CODE result;
; 331 : NUMBER_HEADER* nu = (NUMBER_HEADER*)u;
mov eax, DWORD PTR _u$[ebp]
mov DWORD PTR _nu$[ebp], eax
; 332 : if ((result = CheckNumber(nu)) != PMC_STATUS_OK)
mov eax, DWORD PTR _nu$[ebp]
push eax
call _CheckNumber
add esp, 4
mov DWORD PTR _result$[ebp], eax
cmp DWORD PTR _result$[ebp], 0
je SHORT $LN4@PMC_Compar
; 333 : return (result);
mov eax, DWORD PTR _result$[ebp]
jmp $LN1@PMC_Compar
$LN4@PMC_Compar:
; 334 : char v_sign;
; 335 : _UINT64_T v_abs = GET_ABS_64(v, &v_sign);
lea eax, DWORD PTR _v_sign$[ebp]
push eax
mov ecx, DWORD PTR _v$[ebp+4]
push ecx
mov edx, DWORD PTR _v$[ebp]
push edx
call _GET_ABS_64
add esp, 12 ; 0000000cH
mov DWORD PTR _v_abs$[ebp], eax
mov DWORD PTR _v_abs$[ebp+4], edx
; 336 : if (nu->SIGN == 0)
mov eax, DWORD PTR _nu$[ebp]
movsx ecx, BYTE PTR [eax+16]
test ecx, ecx
jne SHORT $LN5@PMC_Compar
; 337 : {
; 338 : // u == 0 の場合
; 339 :
; 340 : // v の符号の反対を返す
; 341 : *w = -v_sign;
movsx eax, BYTE PTR _v_sign$[ebp]
neg eax
mov ecx, DWORD PTR _w$[ebp]
mov DWORD PTR [ecx], eax
; 342 : }
jmp $LN6@PMC_Compar
$LN5@PMC_Compar:
; 343 : else if (nu->SIGN > 0)
mov eax, DWORD PTR _nu$[ebp]
movsx ecx, BYTE PTR [eax+16]
test ecx, ecx
jle SHORT $LN7@PMC_Compar
; 344 : {
; 345 : // u > 0 の場合
; 346 :
; 347 : if (v_sign <= 0)
movsx eax, BYTE PTR _v_sign$[ebp]
test eax, eax
jg SHORT $LN9@PMC_Compar
; 348 : {
; 349 : // v == 0 の場合
; 350 :
; 351 : // 1 を返す
; 352 : *w = 1;
mov eax, DWORD PTR _w$[ebp]
mov DWORD PTR [eax], 1
; 353 : }
jmp SHORT $LN10@PMC_Compar
$LN9@PMC_Compar:
; 354 : else
; 355 : {
; 356 : // v > 0 の場合
; 357 :
; 358 : // abs(u) と abs(v) の比較結果を返す
; 359 : if ((result = CompareU_X_L_Imp(1, nu->ABS, v_abs, w)) != PMC_STATUS_OK)
mov eax, DWORD PTR _w$[ebp]
push eax
mov ecx, DWORD PTR _v_abs$[ebp+4]
push ecx
mov edx, DWORD PTR _v_abs$[ebp]
push edx
mov eax, DWORD PTR _nu$[ebp]
mov ecx, DWORD PTR [eax+12]
push ecx
push 1
call _CompareU_X_L_Imp
add esp, 20 ; 00000014H
mov DWORD PTR _result$[ebp], eax
cmp DWORD PTR _result$[ebp], 0
je SHORT $LN10@PMC_Compar
; 360 : return (result);
mov eax, DWORD PTR _result$[ebp]
jmp SHORT $LN1@PMC_Compar
$LN10@PMC_Compar:
; 361 : }
; 362 : }
jmp SHORT $LN6@PMC_Compar
$LN7@PMC_Compar:
; 363 : else
; 364 : {
; 365 : // u < 0 の場合
; 366 :
; 367 : if (v_sign >= 0)
movsx eax, BYTE PTR _v_sign$[ebp]
test eax, eax
jl SHORT $LN12@PMC_Compar
; 368 : {
; 369 : // v == 0 の場合
; 370 :
; 371 : // -1 を返す
; 372 : *w = -1;
mov eax, DWORD PTR _w$[ebp]
mov DWORD PTR [eax], -1
; 373 : }
jmp SHORT $LN6@PMC_Compar
$LN12@PMC_Compar:
; 374 : else
; 375 : {
; 376 : // v < 0 の場合
; 377 :
; 378 : // -abs(u) と -abs(v) の比較結果を返す
; 379 : if ((result = CompareU_X_L_Imp(-1, nu->ABS, v_abs, w)) != PMC_STATUS_OK)
mov eax, DWORD PTR _w$[ebp]
push eax
mov ecx, DWORD PTR _v_abs$[ebp+4]
push ecx
mov edx, DWORD PTR _v_abs$[ebp]
push edx
mov eax, DWORD PTR _nu$[ebp]
mov ecx, DWORD PTR [eax+12]
push ecx
push -1
call _CompareU_X_L_Imp
add esp, 20 ; 00000014H
mov DWORD PTR _result$[ebp], eax
cmp DWORD PTR _result$[ebp], 0
je SHORT $LN6@PMC_Compar
; 380 : return (result);
mov eax, DWORD PTR _result$[ebp]
jmp SHORT $LN1@PMC_Compar
$LN6@PMC_Compar:
; 381 : }
; 382 : }
; 383 : #ifdef _DEBUG
; 384 : if (*w != 0 && *w != 1 && *w != -1)
mov eax, DWORD PTR _w$[ebp]
cmp DWORD PTR [eax], 0
je SHORT $LN15@PMC_Compar
mov eax, DWORD PTR _w$[ebp]
cmp DWORD PTR [eax], 1
je SHORT $LN15@PMC_Compar
mov eax, DWORD PTR _w$[ebp]
cmp DWORD PTR [eax], -1
je SHORT $LN15@PMC_Compar
; 385 : return (PMC_STATUS_INTERNAL_ERROR);
mov eax, -256 ; ffffff00H
jmp SHORT $LN1@PMC_Compar
$LN15@PMC_Compar:
; 386 : #endif
; 387 : return (PMC_STATUS_OK);
xor eax, eax
$LN1@PMC_Compar:
; 388 : }
push edx
mov ecx, ebp
push eax
lea edx, DWORD PTR $LN19@PMC_Compar
call @_RTC_CheckStackVars@8
pop eax
pop edx
pop edi
pop esi
pop ebx
mov ecx, DWORD PTR __$ArrayPad$[ebp]
xor ecx, ebp
call @__security_check_cookie@4
add esp, 248 ; 000000f8H
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 16 ; 00000010H
npad 3
$LN19@PMC_Compar:
DD 1
DD $LN18@PMC_Compar
$LN18@PMC_Compar:
DD -33 ; ffffffdfH
DD 1
DD $LN17@PMC_Compar
$LN17@PMC_Compar:
DB 118 ; 00000076H
DB 95 ; 0000005fH
DB 115 ; 00000073H
DB 105 ; 00000069H
DB 103 ; 00000067H
DB 110 ; 0000006eH
DB 0
_PMC_Compare_X_L@16 ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.sint\palmtree.math.core.sint\pmc_compare.c
; COMDAT _PMC_Compare_X_I@12
_TEXT SEGMENT
_v_abs$ = -48 ; size = 4
_v_sign$ = -33 ; size = 1
_nu$ = -24 ; size = 4
_result$ = -12 ; size = 4
__$ArrayPad$ = -4 ; size = 4
_u$ = 8 ; size = 4
_v$ = 12 ; size = 4
_w$ = 16 ; size = 4
_PMC_Compare_X_I@12 PROC ; COMDAT
; 259 : {
push ebp
mov ebp, esp
sub esp, 244 ; 000000f4H
push ebx
push esi
push edi
lea edi, DWORD PTR [ebp-244]
mov ecx, 61 ; 0000003dH
mov eax, -858993460 ; ccccccccH
rep stosd
mov eax, DWORD PTR ___security_cookie
xor eax, ebp
mov DWORD PTR __$ArrayPad$[ebp], eax
mov ecx, OFFSET __C8C7A597_pmc_compare@c
call @__CheckForDebuggerJustMyCode@4
; 260 : if (u == NULL)
cmp DWORD PTR _u$[ebp], 0
jne SHORT $LN2@PMC_Compar
; 261 : return (PMC_STATUS_ARGUMENT_ERROR);
or eax, -1
jmp $LN1@PMC_Compar
$LN2@PMC_Compar:
; 262 : if (w == NULL)
cmp DWORD PTR _w$[ebp], 0
jne SHORT $LN3@PMC_Compar
; 263 : return (PMC_STATUS_ARGUMENT_ERROR);
or eax, -1
jmp $LN1@PMC_Compar
$LN3@PMC_Compar:
; 264 : PMC_STATUS_CODE result;
; 265 : NUMBER_HEADER* nu = (NUMBER_HEADER*)u;
mov eax, DWORD PTR _u$[ebp]
mov DWORD PTR _nu$[ebp], eax
; 266 : if ((result = CheckNumber(nu)) != PMC_STATUS_OK)
mov eax, DWORD PTR _nu$[ebp]
push eax
call _CheckNumber
add esp, 4
mov DWORD PTR _result$[ebp], eax
cmp DWORD PTR _result$[ebp], 0
je SHORT $LN4@PMC_Compar
; 267 : return (result);
mov eax, DWORD PTR _result$[ebp]
jmp $LN1@PMC_Compar
$LN4@PMC_Compar:
; 268 : char v_sign;
; 269 : _UINT32_T v_abs = GET_ABS_32(v, &v_sign);
lea eax, DWORD PTR _v_sign$[ebp]
push eax
mov ecx, DWORD PTR _v$[ebp]
push ecx
call _GET_ABS_32
add esp, 8
mov DWORD PTR _v_abs$[ebp], eax
; 270 : if (nu->SIGN == 0)
mov eax, DWORD PTR _nu$[ebp]
movsx ecx, BYTE PTR [eax+16]
test ecx, ecx
jne SHORT $LN5@PMC_Compar
; 271 : {
; 272 : // u == 0 の場合
; 273 :
; 274 : // v の符号の反対を返す
; 275 : *w = -v_sign;
movsx eax, BYTE PTR _v_sign$[ebp]
neg eax
mov ecx, DWORD PTR _w$[ebp]
mov DWORD PTR [ecx], eax
; 276 : }
jmp $LN6@PMC_Compar
$LN5@PMC_Compar:
; 277 : else if (nu->SIGN > 0)
mov eax, DWORD PTR _nu$[ebp]
movsx ecx, BYTE PTR [eax+16]
test ecx, ecx
jle SHORT $LN7@PMC_Compar
; 278 : {
; 279 : // u > 0 の場合
; 280 :
; 281 : if (v_sign <= 0)
movsx eax, BYTE PTR _v_sign$[ebp]
test eax, eax
jg SHORT $LN9@PMC_Compar
; 282 : {
; 283 : // v == 0 の場合
; 284 :
; 285 : // 1 を返す
; 286 : *w = 1;
mov eax, DWORD PTR _w$[ebp]
mov DWORD PTR [eax], 1
; 287 : }
jmp SHORT $LN10@PMC_Compar
$LN9@PMC_Compar:
; 288 : else
; 289 : {
; 290 : // v > 0 の場合
; 291 :
; 292 : // abs(u) と abs(v) の比較結果を返す
; 293 : if ((result = CompareU_X_I_Imp(1, nu->ABS, v_abs, w)) != PMC_STATUS_OK)
mov eax, DWORD PTR _w$[ebp]
push eax
mov ecx, DWORD PTR _v_abs$[ebp]
push ecx
mov edx, DWORD PTR _nu$[ebp]
mov eax, DWORD PTR [edx+12]
push eax
push 1
call _CompareU_X_I_Imp
add esp, 16 ; 00000010H
mov DWORD PTR _result$[ebp], eax
cmp DWORD PTR _result$[ebp], 0
je SHORT $LN10@PMC_Compar
; 294 : return (result);
mov eax, DWORD PTR _result$[ebp]
jmp SHORT $LN1@PMC_Compar
$LN10@PMC_Compar:
; 295 : }
; 296 : }
jmp SHORT $LN6@PMC_Compar
$LN7@PMC_Compar:
; 297 : else
; 298 : {
; 299 : // u < 0 の場合
; 300 :
; 301 : if (v_sign >= 0)
movsx eax, BYTE PTR _v_sign$[ebp]
test eax, eax
jl SHORT $LN12@PMC_Compar
; 302 : {
; 303 : // v == 0 の場合
; 304 :
; 305 : // -1 を返す
; 306 : *w = -1;
mov eax, DWORD PTR _w$[ebp]
mov DWORD PTR [eax], -1
; 307 : }
jmp SHORT $LN6@PMC_Compar
$LN12@PMC_Compar:
; 308 : else
; 309 : {
; 310 : // v < 0 の場合
; 311 :
; 312 : // -abs(u) と -abs(v) の比較結果を返す
; 313 : if ((result = CompareU_X_I_Imp(-1, nu->ABS, v_abs, w)) != PMC_STATUS_OK)
mov eax, DWORD PTR _w$[ebp]
push eax
mov ecx, DWORD PTR _v_abs$[ebp]
push ecx
mov edx, DWORD PTR _nu$[ebp]
mov eax, DWORD PTR [edx+12]
push eax
push -1
call _CompareU_X_I_Imp
add esp, 16 ; 00000010H
mov DWORD PTR _result$[ebp], eax
cmp DWORD PTR _result$[ebp], 0
je SHORT $LN6@PMC_Compar
; 314 : return (result);
mov eax, DWORD PTR _result$[ebp]
jmp SHORT $LN1@PMC_Compar
$LN6@PMC_Compar:
; 315 : }
; 316 : }
; 317 : #ifdef _DEBUG
; 318 : if (*w != 0 && *w != 1 && *w != -1)
mov eax, DWORD PTR _w$[ebp]
cmp DWORD PTR [eax], 0
je SHORT $LN15@PMC_Compar
mov eax, DWORD PTR _w$[ebp]
cmp DWORD PTR [eax], 1
je SHORT $LN15@PMC_Compar
mov eax, DWORD PTR _w$[ebp]
cmp DWORD PTR [eax], -1
je SHORT $LN15@PMC_Compar
; 319 : return (PMC_STATUS_INTERNAL_ERROR);
mov eax, -256 ; ffffff00H
jmp SHORT $LN1@PMC_Compar
$LN15@PMC_Compar:
; 320 : #endif
; 321 : return (PMC_STATUS_OK);
xor eax, eax
$LN1@PMC_Compar:
; 322 : }
push edx
mov ecx, ebp
push eax
lea edx, DWORD PTR $LN19@PMC_Compar
call @_RTC_CheckStackVars@8
pop eax
pop edx
pop edi
pop esi
pop ebx
mov ecx, DWORD PTR __$ArrayPad$[ebp]
xor ecx, ebp
call @__security_check_cookie@4
add esp, 244 ; 000000f4H
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 12 ; 0000000cH
npad 2
$LN19@PMC_Compar:
DD 1
DD $LN18@PMC_Compar
$LN18@PMC_Compar:
DD -33 ; ffffffdfH
DD 1
DD $LN17@PMC_Compar
$LN17@PMC_Compar:
DB 118 ; 00000076H
DB 95 ; 0000005fH
DB 115 ; 00000073H
DB 105 ; 00000069H
DB 103 ; 00000067H
DB 110 ; 0000006eH
DB 0
_PMC_Compare_X_I@12 ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.sint\palmtree.math.core.sint\pmc_compare.c
; COMDAT _PMC_Compare_UX_X@12
_TEXT SEGMENT
_nv$ = -20 ; size = 4
_result$ = -8 ; size = 4
_u$ = 8 ; size = 4
_v$ = 12 ; size = 4
_w$ = 16 ; size = 4
_PMC_Compare_UX_X@12 PROC ; COMDAT
; 215 : {
push ebp
mov ebp, esp
sub esp, 216 ; 000000d8H
push ebx
push esi
push edi
lea edi, DWORD PTR [ebp-216]
mov ecx, 54 ; 00000036H
mov eax, -858993460 ; ccccccccH
rep stosd
mov ecx, OFFSET __C8C7A597_pmc_compare@c
call @__CheckForDebuggerJustMyCode@4
; 216 : if (v == NULL)
cmp DWORD PTR _v$[ebp], 0
jne SHORT $LN2@PMC_Compar
; 217 : return (PMC_STATUS_ARGUMENT_ERROR);
or eax, -1
jmp $LN1@PMC_Compar
$LN2@PMC_Compar:
; 218 : if (w == NULL)
cmp DWORD PTR _w$[ebp], 0
jne SHORT $LN3@PMC_Compar
; 219 : return (PMC_STATUS_ARGUMENT_ERROR);
or eax, -1
jmp $LN1@PMC_Compar
$LN3@PMC_Compar:
; 220 : PMC_STATUS_CODE result;
; 221 : NUMBER_HEADER* nv = (NUMBER_HEADER*)v;
mov eax, DWORD PTR _v$[ebp]
mov DWORD PTR _nv$[ebp], eax
; 222 : if ((result = CheckNumber(nv)) != PMC_STATUS_OK)
mov eax, DWORD PTR _nv$[ebp]
push eax
call _CheckNumber
add esp, 4
mov DWORD PTR _result$[ebp], eax
cmp DWORD PTR _result$[ebp], 0
je SHORT $LN4@PMC_Compar
; 223 : return (result);
mov eax, DWORD PTR _result$[ebp]
jmp SHORT $LN1@PMC_Compar
$LN4@PMC_Compar:
; 224 : if (u->FLAGS.IS_ZERO)
mov eax, DWORD PTR _u$[ebp]
mov ecx, DWORD PTR [eax]
and ecx, 1
je SHORT $LN5@PMC_Compar
; 225 : {
; 226 : // u == 0 の場合
; 227 :
; 228 : // v の符号の反対を返す
; 229 : *w = -nv->SIGN;
mov eax, DWORD PTR _nv$[ebp]
movsx ecx, BYTE PTR [eax+16]
neg ecx
mov edx, DWORD PTR _w$[ebp]
mov DWORD PTR [edx], ecx
; 230 : }
jmp SHORT $LN6@PMC_Compar
$LN5@PMC_Compar:
; 231 : else
; 232 : {
; 233 : // u > 0 の場合
; 234 :
; 235 : if (nv->SIGN <= 0)
mov eax, DWORD PTR _nv$[ebp]
movsx ecx, BYTE PTR [eax+16]
test ecx, ecx
jg SHORT $LN7@PMC_Compar
; 236 : {
; 237 : // v == 0 の場合
; 238 :
; 239 : // 1 を返す
; 240 : *w = 1;
mov eax, DWORD PTR _w$[ebp]
mov DWORD PTR [eax], 1
; 241 : }
jmp SHORT $LN6@PMC_Compar
$LN7@PMC_Compar:
; 242 : else
; 243 : {
; 244 : // v > 0 の場合
; 245 :
; 246 : // abs(u) と abs(v) の比較結果を返す
; 247 : if ((result = CompareU_X_X_Imp(1, u, nv->ABS, w)) != PMC_STATUS_OK)
mov eax, DWORD PTR _w$[ebp]
push eax
mov ecx, DWORD PTR _nv$[ebp]
mov edx, DWORD PTR [ecx+12]
push edx
mov eax, DWORD PTR _u$[ebp]
push eax
push 1
call _CompareU_X_X_Imp
add esp, 16 ; 00000010H
mov DWORD PTR _result$[ebp], eax
cmp DWORD PTR _result$[ebp], 0
je SHORT $LN6@PMC_Compar
; 248 : return (result);
mov eax, DWORD PTR _result$[ebp]
jmp SHORT $LN1@PMC_Compar
$LN6@PMC_Compar:
; 249 : }
; 250 : }
; 251 : #ifdef _DEBUG
; 252 : if (*w != 0 && *w != 1 && *w != -1)
mov eax, DWORD PTR _w$[ebp]
cmp DWORD PTR [eax], 0
je SHORT $LN10@PMC_Compar
mov eax, DWORD PTR _w$[ebp]
cmp DWORD PTR [eax], 1
je SHORT $LN10@PMC_Compar
mov eax, DWORD PTR _w$[ebp]
cmp DWORD PTR [eax], -1
je SHORT $LN10@PMC_Compar
; 253 : return (PMC_STATUS_INTERNAL_ERROR);
mov eax, -256 ; ffffff00H
jmp SHORT $LN1@PMC_Compar
$LN10@PMC_Compar:
; 254 : #endif
; 255 : return (PMC_STATUS_OK);
xor eax, eax
$LN1@PMC_Compar:
; 256 : }
pop edi
pop esi
pop ebx
add esp, 216 ; 000000d8H
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 12 ; 0000000cH
_PMC_Compare_UX_X@12 ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.sint\palmtree.math.core.sint\pmc_compare.c
; COMDAT _PMC_Compare_L_X@16
_TEXT SEGMENT
_u_abs$ = -52 ; size = 8
_u_sign$ = -33 ; size = 1
_nv$ = -24 ; size = 4
_result$ = -12 ; size = 4
__$ArrayPad$ = -4 ; size = 4
_u$ = 8 ; size = 8
_v$ = 16 ; size = 4
_w$ = 20 ; size = 4
_PMC_Compare_L_X@16 PROC ; COMDAT
; 149 : {
push ebp
mov ebp, esp
sub esp, 248 ; 000000f8H
push ebx
push esi
push edi
lea edi, DWORD PTR [ebp-248]
mov ecx, 62 ; 0000003eH
mov eax, -858993460 ; ccccccccH
rep stosd
mov eax, DWORD PTR ___security_cookie
xor eax, ebp
mov DWORD PTR __$ArrayPad$[ebp], eax
mov ecx, OFFSET __C8C7A597_pmc_compare@c
call @__CheckForDebuggerJustMyCode@4
; 150 : if (v == NULL)
cmp DWORD PTR _v$[ebp], 0
jne SHORT $LN2@PMC_Compar
; 151 : return (PMC_STATUS_ARGUMENT_ERROR);
or eax, -1
jmp $LN1@PMC_Compar
$LN2@PMC_Compar:
; 152 : if (w == NULL)
cmp DWORD PTR _w$[ebp], 0
jne SHORT $LN3@PMC_Compar
; 153 : return (PMC_STATUS_ARGUMENT_ERROR);
or eax, -1
jmp $LN1@PMC_Compar
$LN3@PMC_Compar:
; 154 : PMC_STATUS_CODE result;
; 155 : NUMBER_HEADER* nv = (NUMBER_HEADER*)v;
mov eax, DWORD PTR _v$[ebp]
mov DWORD PTR _nv$[ebp], eax
; 156 : if ((result = CheckNumber(nv)) != PMC_STATUS_OK)
mov eax, DWORD PTR _nv$[ebp]
push eax
call _CheckNumber
add esp, 4
mov DWORD PTR _result$[ebp], eax
cmp DWORD PTR _result$[ebp], 0
je SHORT $LN4@PMC_Compar
; 157 : return (result);
mov eax, DWORD PTR _result$[ebp]
jmp $LN1@PMC_Compar
$LN4@PMC_Compar:
; 158 : char u_sign;
; 159 : _UINT64_T u_abs = GET_ABS_64(u, &u_sign);
lea eax, DWORD PTR _u_sign$[ebp]
push eax
mov ecx, DWORD PTR _u$[ebp+4]
push ecx
mov edx, DWORD PTR _u$[ebp]
push edx
call _GET_ABS_64
add esp, 12 ; 0000000cH
mov DWORD PTR _u_abs$[ebp], eax
mov DWORD PTR _u_abs$[ebp+4], edx
; 160 : if (u_sign == 0)
movsx eax, BYTE PTR _u_sign$[ebp]
test eax, eax
jne SHORT $LN5@PMC_Compar
; 161 : {
; 162 : // u == 0 の場合
; 163 :
; 164 : // v の符号の反対を返す
; 165 : *w = - nv->SIGN;
mov eax, DWORD PTR _nv$[ebp]
movsx ecx, BYTE PTR [eax+16]
neg ecx
mov edx, DWORD PTR _w$[ebp]
mov DWORD PTR [edx], ecx
; 166 : }
jmp $LN6@PMC_Compar
$LN5@PMC_Compar:
; 167 : else if (u_sign > 0)
movsx eax, BYTE PTR _u_sign$[ebp]
test eax, eax
jle SHORT $LN7@PMC_Compar
; 168 : {
; 169 : // u > 0 の場合
; 170 :
; 171 : if (nv->SIGN <= 0)
mov eax, DWORD PTR _nv$[ebp]
movsx ecx, BYTE PTR [eax+16]
test ecx, ecx
jg SHORT $LN9@PMC_Compar
; 172 : {
; 173 : // v <= 0 の場合
; 174 :
; 175 : // 1 を返す
; 176 : *w = 1;
mov eax, DWORD PTR _w$[ebp]
mov DWORD PTR [eax], 1
; 177 : }
jmp SHORT $LN10@PMC_Compar
$LN9@PMC_Compar:
; 178 : else
; 179 : {
; 180 : // v > 0 の場合
; 181 :
; 182 : // abs(u) と abs(v) の比較結果を返す
; 183 : if ((result = CompareU_X_L_Imp(-1, nv->ABS, u_abs, w)) != PMC_STATUS_OK)
mov eax, DWORD PTR _w$[ebp]
push eax
mov ecx, DWORD PTR _u_abs$[ebp+4]
push ecx
mov edx, DWORD PTR _u_abs$[ebp]
push edx
mov eax, DWORD PTR _nv$[ebp]
mov ecx, DWORD PTR [eax+12]
push ecx
push -1
call _CompareU_X_L_Imp
add esp, 20 ; 00000014H
mov DWORD PTR _result$[ebp], eax
cmp DWORD PTR _result$[ebp], 0
je SHORT $LN10@PMC_Compar
; 184 : return (result);
mov eax, DWORD PTR _result$[ebp]
jmp SHORT $LN1@PMC_Compar
$LN10@PMC_Compar:
; 185 : }
; 186 : }
jmp SHORT $LN6@PMC_Compar
$LN7@PMC_Compar:
; 187 : else
; 188 : {
; 189 : // u < 0 の場合
; 190 :
; 191 : if (nv->SIGN >= 0)
mov eax, DWORD PTR _nv$[ebp]
movsx ecx, BYTE PTR [eax+16]
test ecx, ecx
jl SHORT $LN12@PMC_Compar
; 192 : {
; 193 : // v == 0 の場合
; 194 :
; 195 : // -1 を返す
; 196 : *w = -1;
mov eax, DWORD PTR _w$[ebp]
mov DWORD PTR [eax], -1
; 197 : }
jmp SHORT $LN6@PMC_Compar
$LN12@PMC_Compar:
; 198 : else
; 199 : {
; 200 : // v < 0 の場合
; 201 :
; 202 : // -abs(u) と -abs(v) の比較結果を返す
; 203 : if ((result = CompareU_X_L_Imp(1, nv->ABS, u_abs, w)) != PMC_STATUS_OK)
mov eax, DWORD PTR _w$[ebp]
push eax
mov ecx, DWORD PTR _u_abs$[ebp+4]
push ecx
mov edx, DWORD PTR _u_abs$[ebp]
push edx
mov eax, DWORD PTR _nv$[ebp]
mov ecx, DWORD PTR [eax+12]
push ecx
push 1
call _CompareU_X_L_Imp
add esp, 20 ; 00000014H
mov DWORD PTR _result$[ebp], eax
cmp DWORD PTR _result$[ebp], 0
je SHORT $LN6@PMC_Compar
; 204 : return (result);
mov eax, DWORD PTR _result$[ebp]
jmp SHORT $LN1@PMC_Compar
$LN6@PMC_Compar:
; 205 : }
; 206 : }
; 207 : #ifdef _DEBUG
; 208 : if (*w != 0 && *w != 1 && *w != -1)
mov eax, DWORD PTR _w$[ebp]
cmp DWORD PTR [eax], 0
je SHORT $LN15@PMC_Compar
mov eax, DWORD PTR _w$[ebp]
cmp DWORD PTR [eax], 1
je SHORT $LN15@PMC_Compar
mov eax, DWORD PTR _w$[ebp]
cmp DWORD PTR [eax], -1
je SHORT $LN15@PMC_Compar
; 209 : return (PMC_STATUS_INTERNAL_ERROR);
mov eax, -256 ; ffffff00H
jmp SHORT $LN1@PMC_Compar
$LN15@PMC_Compar:
; 210 : #endif
; 211 : return (PMC_STATUS_OK);
xor eax, eax
$LN1@PMC_Compar:
; 212 : }
push edx
mov ecx, ebp
push eax
lea edx, DWORD PTR $LN19@PMC_Compar
call @_RTC_CheckStackVars@8
pop eax
pop edx
pop edi
pop esi
pop ebx
mov ecx, DWORD PTR __$ArrayPad$[ebp]
xor ecx, ebp
call @__security_check_cookie@4
add esp, 248 ; 000000f8H
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 16 ; 00000010H
$LN19@PMC_Compar:
DD 1
DD $LN18@PMC_Compar
$LN18@PMC_Compar:
DD -33 ; ffffffdfH
DD 1
DD $LN17@PMC_Compar
$LN17@PMC_Compar:
DB 117 ; 00000075H
DB 95 ; 0000005fH
DB 115 ; 00000073H
DB 105 ; 00000069H
DB 103 ; 00000067H
DB 110 ; 0000006eH
DB 0
_PMC_Compare_L_X@16 ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.sint\palmtree.math.core.sint\pmc_compare.c
; COMDAT _PMC_Compare_I_X@12
_TEXT SEGMENT
_u_abs$ = -48 ; size = 4
_u_sign$ = -33 ; size = 1
_nv$ = -24 ; size = 4
_result$ = -12 ; size = 4
__$ArrayPad$ = -4 ; size = 4
_u$ = 8 ; size = 4
_v$ = 12 ; size = 4
_w$ = 16 ; size = 4
_PMC_Compare_I_X@12 PROC ; COMDAT
; 83 : {
push ebp
mov ebp, esp
sub esp, 244 ; 000000f4H
push ebx
push esi
push edi
lea edi, DWORD PTR [ebp-244]
mov ecx, 61 ; 0000003dH
mov eax, -858993460 ; ccccccccH
rep stosd
mov eax, DWORD PTR ___security_cookie
xor eax, ebp
mov DWORD PTR __$ArrayPad$[ebp], eax
mov ecx, OFFSET __C8C7A597_pmc_compare@c
call @__CheckForDebuggerJustMyCode@4
; 84 : if (v == NULL)
cmp DWORD PTR _v$[ebp], 0
jne SHORT $LN2@PMC_Compar
; 85 : return (PMC_STATUS_ARGUMENT_ERROR);
or eax, -1
jmp $LN1@PMC_Compar
$LN2@PMC_Compar:
; 86 : if (w == NULL)
cmp DWORD PTR _w$[ebp], 0
jne SHORT $LN3@PMC_Compar
; 87 : return (PMC_STATUS_ARGUMENT_ERROR);
or eax, -1
jmp $LN1@PMC_Compar
$LN3@PMC_Compar:
; 88 : PMC_STATUS_CODE result;
; 89 : NUMBER_HEADER* nv = (NUMBER_HEADER*)v;
mov eax, DWORD PTR _v$[ebp]
mov DWORD PTR _nv$[ebp], eax
; 90 : if ((result = CheckNumber(nv)) != PMC_STATUS_OK)
mov eax, DWORD PTR _nv$[ebp]
push eax
call _CheckNumber
add esp, 4
mov DWORD PTR _result$[ebp], eax
cmp DWORD PTR _result$[ebp], 0
je SHORT $LN4@PMC_Compar
; 91 : return (result);
mov eax, DWORD PTR _result$[ebp]
jmp $LN1@PMC_Compar
$LN4@PMC_Compar:
; 92 : char u_sign;
; 93 : _UINT32_T u_abs = GET_ABS_32(u, &u_sign);
lea eax, DWORD PTR _u_sign$[ebp]
push eax
mov ecx, DWORD PTR _u$[ebp]
push ecx
call _GET_ABS_32
add esp, 8
mov DWORD PTR _u_abs$[ebp], eax
; 94 : if (u_sign == 0)
movsx eax, BYTE PTR _u_sign$[ebp]
test eax, eax
jne SHORT $LN5@PMC_Compar
; 95 : {
; 96 : // u == 0 の場合
; 97 :
; 98 : // v の符号の反対を返す
; 99 : *w = - nv->SIGN;
mov eax, DWORD PTR _nv$[ebp]
movsx ecx, BYTE PTR [eax+16]
neg ecx
mov edx, DWORD PTR _w$[ebp]
mov DWORD PTR [edx], ecx
; 100 : }
jmp $LN6@PMC_Compar
$LN5@PMC_Compar:
; 101 : else if (u_sign > 0)
movsx eax, BYTE PTR _u_sign$[ebp]
test eax, eax
jle SHORT $LN7@PMC_Compar
; 102 : {
; 103 : // u > 0 の場合
; 104 :
; 105 : if (nv->SIGN <= 0)
mov eax, DWORD PTR _nv$[ebp]
movsx ecx, BYTE PTR [eax+16]
test ecx, ecx
jg SHORT $LN9@PMC_Compar
; 106 : {
; 107 : // v <= 0 の場合
; 108 :
; 109 : // 1 を返す
; 110 : *w = 1;
mov eax, DWORD PTR _w$[ebp]
mov DWORD PTR [eax], 1
; 111 : }
jmp SHORT $LN10@PMC_Compar
$LN9@PMC_Compar:
; 112 : else
; 113 : {
; 114 : // v > 0 の場合
; 115 :
; 116 : // abs(u) と abs(v) の比較結果を返す
; 117 : if ((result = CompareU_X_I_Imp(-1, nv->ABS, u_abs, w)) != PMC_STATUS_OK)
mov eax, DWORD PTR _w$[ebp]
push eax
mov ecx, DWORD PTR _u_abs$[ebp]
push ecx
mov edx, DWORD PTR _nv$[ebp]
mov eax, DWORD PTR [edx+12]
push eax
push -1
call _CompareU_X_I_Imp
add esp, 16 ; 00000010H
mov DWORD PTR _result$[ebp], eax
cmp DWORD PTR _result$[ebp], 0
je SHORT $LN10@PMC_Compar
; 118 : return (result);
mov eax, DWORD PTR _result$[ebp]
jmp SHORT $LN1@PMC_Compar
$LN10@PMC_Compar:
; 119 : }
; 120 : }
jmp SHORT $LN6@PMC_Compar
$LN7@PMC_Compar:
; 121 : else
; 122 : {
; 123 : // u < 0 の場合
; 124 :
; 125 : if (nv->SIGN >= 0)
mov eax, DWORD PTR _nv$[ebp]
movsx ecx, BYTE PTR [eax+16]
test ecx, ecx
jl SHORT $LN12@PMC_Compar
; 126 : {
; 127 : // v >= 0 の場合
; 128 :
; 129 : // -1 を返す
; 130 : *w = -1;
mov eax, DWORD PTR _w$[ebp]
mov DWORD PTR [eax], -1
; 131 : }
jmp SHORT $LN6@PMC_Compar
$LN12@PMC_Compar:
; 132 : else
; 133 : {
; 134 : // v < 0 の場合
; 135 :
; 136 : // -abs(u) と -abs(v) の比較結果を返す
; 137 : if ((result = CompareU_X_I_Imp(1, nv->ABS, u_abs, w)) != PMC_STATUS_OK)
mov eax, DWORD PTR _w$[ebp]
push eax
mov ecx, DWORD PTR _u_abs$[ebp]
push ecx
mov edx, DWORD PTR _nv$[ebp]
mov eax, DWORD PTR [edx+12]
push eax
push 1
call _CompareU_X_I_Imp
add esp, 16 ; 00000010H
mov DWORD PTR _result$[ebp], eax
cmp DWORD PTR _result$[ebp], 0
je SHORT $LN6@PMC_Compar
; 138 : return (result);
mov eax, DWORD PTR _result$[ebp]
jmp SHORT $LN1@PMC_Compar
$LN6@PMC_Compar:
; 139 : }
; 140 : }
; 141 : #ifdef _DEBUG
; 142 : if (*w != 0 && *w != 1 && *w != -1)
mov eax, DWORD PTR _w$[ebp]
cmp DWORD PTR [eax], 0
je SHORT $LN15@PMC_Compar
mov eax, DWORD PTR _w$[ebp]
cmp DWORD PTR [eax], 1
je SHORT $LN15@PMC_Compar
mov eax, DWORD PTR _w$[ebp]
cmp DWORD PTR [eax], -1
je SHORT $LN15@PMC_Compar
; 143 : return (PMC_STATUS_INTERNAL_ERROR);
mov eax, -256 ; ffffff00H
jmp SHORT $LN1@PMC_Compar
$LN15@PMC_Compar:
; 144 : #endif
; 145 : return (PMC_STATUS_OK);
xor eax, eax
$LN1@PMC_Compar:
; 146 : }
push edx
mov ecx, ebp
push eax
lea edx, DWORD PTR $LN19@PMC_Compar
call @_RTC_CheckStackVars@8
pop eax
pop edx
pop edi
pop esi
pop ebx
mov ecx, DWORD PTR __$ArrayPad$[ebp]
xor ecx, ebp
call @__security_check_cookie@4
add esp, 244 ; 000000f4H
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 12 ; 0000000cH
npad 3
$LN19@PMC_Compar:
DD 1
DD $LN18@PMC_Compar
$LN18@PMC_Compar:
DD -33 ; ffffffdfH
DD 1
DD $LN17@PMC_Compar
$LN17@PMC_Compar:
DB 117 ; 00000075H
DB 95 ; 0000005fH
DB 115 ; 00000073H
DB 105 ; 00000069H
DB 103 ; 00000067H
DB 110 ; 0000006eH
DB 0
_PMC_Compare_I_X@12 ENDP
_TEXT ENDS
END
| 20.589099
| 109
| 0.605737
|
03c31802a309bb209fc98494e1be8e2ba091f249
| 1,445
|
asm
|
Assembly
|
programs/oeis/078/A078471.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | 1
|
2021-03-15T11:38:20.000Z
|
2021-03-15T11:38:20.000Z
|
programs/oeis/078/A078471.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/078/A078471.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | null | null | null |
; A078471: Sum of all odd divisors of all positive integers <= n.
; 1,2,6,7,13,17,25,26,39,45,57,61,75,83,107,108,126,139,159,165,197,209,233,237,268,282,322,330,360,384,416,417,465,483,531,544,582,602,658,664,706,738,782,794,872,896,944,948,1005,1036,1108,1122,1176,1216,1288,1296,1376,1406,1466,1490,1552,1584,1688,1689,1773,1821,1889,1907,2003,2051,2123,2136,2210,2248,2372,2392,2488,2544,2624,2630,2751,2793,2877,2909,3017,3061,3181,3193,3283,3361,3473,3497,3625,3673,3793,3797,3895,3952,4108,4139,4241,4313,4417,4431,4623,4677,4785,4825,4935,5007,5159,5167,5281,5361,5505,5535,5717,5777,5921,5945,6078,6140,6308,6340,6496,6600,6728,6729,6905,6989,7121,7169,7329,7397,7637,7655,7793,7889,8029,8077,8269,8341,8509,8522,8702,8776,9004,9042,9192,9316,9468,9488,9722,9818,10010,10066,10224,10304,10520,10526,10718,10839,11003,11045,11333,11417,11585,11617,11800,11908,12168,12212,12386,12506,12754,12766,13006,13096,13276,13354,13536,13648,13896,13920,14148,14276,14492,14540,14860,14980,15172,15176,15370,15468,15804,15861,16059,16215,16415,16446,16718,16820,17060,17132,17384,17488,17800,17814,18054,18246,18458,18512,18800,18908,19172,19212,19468,19578,19874,19946,20198,20350,20574,20582,20985,21099,21327,21407,21637,21781,22165,22195,22429,22611,22899,22959,23279,23423,23663,23687,23929,24062,24426,24488,24830,24998,25278,25310,25646,25802
lpb $0
mov $2,$0
cal $2,593 ; Sum of odd divisors of n.
sub $0,1
add $1,$2
lpe
add $1,1
| 131.363636
| 1,281
| 0.782699
|
b55843e948ea1684b2b8847f4867351b3c2a19be
| 537
|
asm
|
Assembly
|
programs/oeis/046/A046065.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/046/A046065.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/046/A046065.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A046065: a(n) = n^(n+2) - (n+2)^n.
; -1,-2,0,118,2800,61318,1417472,35570638,973741824,29023111918,938082635776,32730551749894,1227224552173568,49239697945731382,2105895743771443200,95663702284183543582,4600926951773050961920,233592048827366522661214,12486092216396078174437376,700960999053042179548175638,41237610501313595955792052224,2537109290987522806041826280038,162935579142806078063919581102080,10903659024767525428999587556174318,759125121696226440725871114321920000
mov $1,$0
add $1,2
mov $2,$0
pow $0,$1
pow $1,$2
sub $0,$1
| 53.7
| 439
| 0.849162
|
e9167b8a22e2f8c009260ab8512b545d0ef9256e
| 556
|
asm
|
Assembly
|
EEL7030/Rep CAEE/Mic 8051/Lab03/exercicio7/exercicio7.asm
|
GSimas/MicroC
|
ac9ef54bbeed027db532885407cc3e783fcb28eb
|
[
"MIT"
] | null | null | null |
EEL7030/Rep CAEE/Mic 8051/Lab03/exercicio7/exercicio7.asm
|
GSimas/MicroC
|
ac9ef54bbeed027db532885407cc3e783fcb28eb
|
[
"MIT"
] | null | null | null |
EEL7030/Rep CAEE/Mic 8051/Lab03/exercicio7/exercicio7.asm
|
GSimas/MicroC
|
ac9ef54bbeed027db532885407cc3e783fcb28eb
|
[
"MIT"
] | null | null | null |
;MATHEUS FIGUEIREDO
ORG 0h
MOV P1,#00000010B
ABERTA:
JNB P2.7,FECHADA ;0
JB P2.7,ABERTA ;1
FECHADA:
MOV R7,P2
MOV A,R7
CPL A
MOV R7,A
ANL 07H,#00001111B ;passei para r7 o valor das chaves de p2, fiz um AND para limpar o byte MSD e deixar apenas o LSD em R7 de p2
JNB P2.6,DIREITA
JB P2.6,ESQUERDA
DIREITA: MOV A,P1
RR A
MOV P1,A
DEC R7
CJNE R7,#0,DIREITA
JMP FIM
ESQUERDA: MOV A,P1
RL A
MOV P1,A
DEC R7
CJNE R7,#0,ESQUERDA
JMP FIM
FIM:
END
| 14.631579
| 135
| 0.580935
|
4bd2c454e7012a7b2809fe447772d8b7c5273c56
| 44,905
|
asm
|
Assembly
|
xv6/echo.asm
|
ZhangHnu/xv6FileSystem
|
a1bb5b607c45f8fa833f8f7b62aa2563d2b9007c
|
[
"MIT"
] | null | null | null |
xv6/echo.asm
|
ZhangHnu/xv6FileSystem
|
a1bb5b607c45f8fa833f8f7b62aa2563d2b9007c
|
[
"MIT"
] | null | null | null |
xv6/echo.asm
|
ZhangHnu/xv6FileSystem
|
a1bb5b607c45f8fa833f8f7b62aa2563d2b9007c
|
[
"MIT"
] | null | null | null |
_echo: file format elf32-i386
Disassembly of section .text:
00000000 <main>:
#include "stat.h"
#include "user.h"
int
main(int argc, char *argv[])
{
0: 55 push %ebp
1: 89 e5 mov %esp,%ebp
3: 57 push %edi
4: 56 push %esi
5: 53 push %ebx
6: 83 e4 f0 and $0xfffffff0,%esp
9: 83 ec 10 sub $0x10,%esp
c: 8b 75 08 mov 0x8(%ebp),%esi
f: 8b 7d 0c mov 0xc(%ebp),%edi
int i;
for(i = 1; i < argc; i++)
12: 83 fe 01 cmp $0x1,%esi
15: 7e 60 jle 77 <main+0x77>
17: bb 01 00 00 00 mov $0x1,%ebx
printf(1, "%s%s", argv[i], i+1 < argc ? " " : "\n");
1c: 83 c3 01 add $0x1,%ebx
1f: 39 f3 cmp %esi,%ebx
21: 74 30 je 53 <main+0x53>
23: 90 nop
24: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
28: c7 44 24 0c ee 06 00 movl $0x6ee,0xc(%esp)
2f: 00
30: 8b 44 9f fc mov -0x4(%edi,%ebx,4),%eax
34: 83 c3 01 add $0x1,%ebx
37: c7 44 24 04 f0 06 00 movl $0x6f0,0x4(%esp)
3e: 00
3f: c7 04 24 01 00 00 00 movl $0x1,(%esp)
46: 89 44 24 08 mov %eax,0x8(%esp)
4a: e8 c1 03 00 00 call 410 <printf>
4f: 39 f3 cmp %esi,%ebx
51: 75 d5 jne 28 <main+0x28>
53: c7 44 24 0c f5 06 00 movl $0x6f5,0xc(%esp)
5a: 00
5b: 8b 44 9f fc mov -0x4(%edi,%ebx,4),%eax
5f: c7 44 24 04 f0 06 00 movl $0x6f0,0x4(%esp)
66: 00
67: c7 04 24 01 00 00 00 movl $0x1,(%esp)
6e: 89 44 24 08 mov %eax,0x8(%esp)
72: e8 99 03 00 00 call 410 <printf>
exit();
77: e8 38 02 00 00 call 2b4 <exit>
7c: 90 nop
7d: 90 nop
7e: 90 nop
7f: 90 nop
00000080 <strcpy>:
#include "user.h"
#include "x86.h"
char*
strcpy(char *s, const char *t)
{
80: 55 push %ebp
char *os;
os = s;
while((*s++ = *t++) != 0)
81: 31 d2 xor %edx,%edx
#include "user.h"
#include "x86.h"
char*
strcpy(char *s, const char *t)
{
83: 89 e5 mov %esp,%ebp
85: 8b 45 08 mov 0x8(%ebp),%eax
88: 53 push %ebx
89: 8b 5d 0c mov 0xc(%ebp),%ebx
8c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
char *os;
os = s;
while((*s++ = *t++) != 0)
90: 0f b6 0c 13 movzbl (%ebx,%edx,1),%ecx
94: 88 0c 10 mov %cl,(%eax,%edx,1)
97: 83 c2 01 add $0x1,%edx
9a: 84 c9 test %cl,%cl
9c: 75 f2 jne 90 <strcpy+0x10>
;
return os;
}
9e: 5b pop %ebx
9f: 5d pop %ebp
a0: c3 ret
a1: eb 0d jmp b0 <strcmp>
a3: 90 nop
a4: 90 nop
a5: 90 nop
a6: 90 nop
a7: 90 nop
a8: 90 nop
a9: 90 nop
aa: 90 nop
ab: 90 nop
ac: 90 nop
ad: 90 nop
ae: 90 nop
af: 90 nop
000000b0 <strcmp>:
int
strcmp(const char *p, const char *q)
{
b0: 55 push %ebp
b1: 89 e5 mov %esp,%ebp
b3: 8b 4d 08 mov 0x8(%ebp),%ecx
b6: 56 push %esi
b7: 8b 55 0c mov 0xc(%ebp),%edx
ba: 53 push %ebx
while(*p && *p == *q)
bb: 0f b6 01 movzbl (%ecx),%eax
be: 0f b6 1a movzbl (%edx),%ebx
c1: 84 c0 test %al,%al
c3: 74 23 je e8 <strcmp+0x38>
c5: 38 d8 cmp %bl,%al
c7: 74 10 je d9 <strcmp+0x29>
c9: eb 2d jmp f8 <strcmp+0x48>
cb: 90 nop
cc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
d0: 83 c1 01 add $0x1,%ecx
d3: 38 d8 cmp %bl,%al
d5: 75 21 jne f8 <strcmp+0x48>
p++, q++;
d7: 89 f2 mov %esi,%edx
}
int
strcmp(const char *p, const char *q)
{
while(*p && *p == *q)
d9: 0f b6 41 01 movzbl 0x1(%ecx),%eax
p++, q++;
dd: 8d 72 01 lea 0x1(%edx),%esi
}
int
strcmp(const char *p, const char *q)
{
while(*p && *p == *q)
e0: 0f b6 5a 01 movzbl 0x1(%edx),%ebx
e4: 84 c0 test %al,%al
e6: 75 e8 jne d0 <strcmp+0x20>
p++, q++;
return (uchar)*p - (uchar)*q;
e8: 0f b6 db movzbl %bl,%ebx
}
int
strcmp(const char *p, const char *q)
{
while(*p && *p == *q)
eb: 31 c0 xor %eax,%eax
p++, q++;
return (uchar)*p - (uchar)*q;
ed: 29 d8 sub %ebx,%eax
}
ef: 5b pop %ebx
f0: 5e pop %esi
f1: 5d pop %ebp
f2: c3 ret
f3: 90 nop
f4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
int
strcmp(const char *p, const char *q)
{
while(*p && *p == *q)
p++, q++;
return (uchar)*p - (uchar)*q;
f8: 0f b6 db movzbl %bl,%ebx
}
int
strcmp(const char *p, const char *q)
{
while(*p && *p == *q)
fb: 0f b6 c0 movzbl %al,%eax
p++, q++;
return (uchar)*p - (uchar)*q;
fe: 29 d8 sub %ebx,%eax
}
100: 5b pop %ebx
101: 5e pop %esi
102: 5d pop %ebp
103: c3 ret
104: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
10a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
00000110 <strlen>:
uint
strlen(const char *s)
{
110: 55 push %ebp
int n;
for(n = 0; s[n]; n++)
111: 31 c0 xor %eax,%eax
return (uchar)*p - (uchar)*q;
}
uint
strlen(const char *s)
{
113: 89 e5 mov %esp,%ebp
115: 8b 4d 08 mov 0x8(%ebp),%ecx
int n;
for(n = 0; s[n]; n++)
118: 80 39 00 cmpb $0x0,(%ecx)
11b: 74 0e je 12b <strlen+0x1b>
11d: 31 d2 xor %edx,%edx
11f: 90 nop
120: 83 c2 01 add $0x1,%edx
123: 80 3c 11 00 cmpb $0x0,(%ecx,%edx,1)
127: 89 d0 mov %edx,%eax
129: 75 f5 jne 120 <strlen+0x10>
;
return n;
}
12b: 5d pop %ebp
12c: c3 ret
12d: 8d 76 00 lea 0x0(%esi),%esi
00000130 <memset>:
void*
memset(void *dst, int c, uint n)
{
130: 55 push %ebp
131: 89 e5 mov %esp,%ebp
133: 8b 55 08 mov 0x8(%ebp),%edx
136: 57 push %edi
}
static inline void
stosb(void *addr, int data, int cnt)
{
asm volatile("cld; rep stosb" :
137: 8b 4d 10 mov 0x10(%ebp),%ecx
13a: 8b 45 0c mov 0xc(%ebp),%eax
13d: 89 d7 mov %edx,%edi
13f: fc cld
140: f3 aa rep stos %al,%es:(%edi)
stosb(dst, c, n);
return dst;
}
142: 89 d0 mov %edx,%eax
144: 5f pop %edi
145: 5d pop %ebp
146: c3 ret
147: 89 f6 mov %esi,%esi
149: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00000150 <strchr>:
char*
strchr(const char *s, char c)
{
150: 55 push %ebp
151: 89 e5 mov %esp,%ebp
153: 8b 45 08 mov 0x8(%ebp),%eax
156: 0f b6 4d 0c movzbl 0xc(%ebp),%ecx
for(; *s; s++)
15a: 0f b6 10 movzbl (%eax),%edx
15d: 84 d2 test %dl,%dl
15f: 75 12 jne 173 <strchr+0x23>
161: eb 1d jmp 180 <strchr+0x30>
163: 90 nop
164: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
168: 0f b6 50 01 movzbl 0x1(%eax),%edx
16c: 84 d2 test %dl,%dl
16e: 74 10 je 180 <strchr+0x30>
170: 83 c0 01 add $0x1,%eax
if(*s == c)
173: 38 ca cmp %cl,%dl
175: 75 f1 jne 168 <strchr+0x18>
return (char*)s;
return 0;
}
177: 5d pop %ebp
178: c3 ret
179: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
strchr(const char *s, char c)
{
for(; *s; s++)
if(*s == c)
return (char*)s;
return 0;
180: 31 c0 xor %eax,%eax
}
182: 5d pop %ebp
183: c3 ret
184: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
18a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
00000190 <gets>:
char*
gets(char *buf, int max)
{
190: 55 push %ebp
191: 89 e5 mov %esp,%ebp
193: 57 push %edi
194: 56 push %esi
int i, cc;
char c;
for(i=0; i+1 < max; ){
195: 31 f6 xor %esi,%esi
return 0;
}
char*
gets(char *buf, int max)
{
197: 53 push %ebx
198: 83 ec 2c sub $0x2c,%esp
19b: 8b 7d 08 mov 0x8(%ebp),%edi
int i, cc;
char c;
for(i=0; i+1 < max; ){
19e: eb 31 jmp 1d1 <gets+0x41>
cc = read(0, &c, 1);
1a0: 8d 45 e7 lea -0x19(%ebp),%eax
1a3: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
1aa: 00
1ab: 89 44 24 04 mov %eax,0x4(%esp)
1af: c7 04 24 00 00 00 00 movl $0x0,(%esp)
1b6: e8 11 01 00 00 call 2cc <read>
if(cc < 1)
1bb: 85 c0 test %eax,%eax
1bd: 7e 1a jle 1d9 <gets+0x49>
break;
buf[i++] = c;
1bf: 0f b6 45 e7 movzbl -0x19(%ebp),%eax
gets(char *buf, int max)
{
int i, cc;
char c;
for(i=0; i+1 < max; ){
1c3: 89 de mov %ebx,%esi
cc = read(0, &c, 1);
if(cc < 1)
break;
buf[i++] = c;
if(c == '\n' || c == '\r')
1c5: 3c 0d cmp $0xd,%al
for(i=0; i+1 < max; ){
cc = read(0, &c, 1);
if(cc < 1)
break;
buf[i++] = c;
1c7: 88 44 1f ff mov %al,-0x1(%edi,%ebx,1)
if(c == '\n' || c == '\r')
1cb: 74 0c je 1d9 <gets+0x49>
1cd: 3c 0a cmp $0xa,%al
1cf: 74 08 je 1d9 <gets+0x49>
gets(char *buf, int max)
{
int i, cc;
char c;
for(i=0; i+1 < max; ){
1d1: 8d 5e 01 lea 0x1(%esi),%ebx
1d4: 3b 5d 0c cmp 0xc(%ebp),%ebx
1d7: 7c c7 jl 1a0 <gets+0x10>
break;
buf[i++] = c;
if(c == '\n' || c == '\r')
break;
}
buf[i] = '\0';
1d9: c6 04 37 00 movb $0x0,(%edi,%esi,1)
return buf;
}
1dd: 83 c4 2c add $0x2c,%esp
1e0: 89 f8 mov %edi,%eax
1e2: 5b pop %ebx
1e3: 5e pop %esi
1e4: 5f pop %edi
1e5: 5d pop %ebp
1e6: c3 ret
1e7: 89 f6 mov %esi,%esi
1e9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
000001f0 <stat>:
int
stat(const char *n, struct stat *st)
{
1f0: 55 push %ebp
1f1: 89 e5 mov %esp,%ebp
1f3: 83 ec 18 sub $0x18,%esp
int fd;
int r;
fd = open(n, O_RDONLY);
1f6: 8b 45 08 mov 0x8(%ebp),%eax
return buf;
}
int
stat(const char *n, struct stat *st)
{
1f9: 89 5d f8 mov %ebx,-0x8(%ebp)
1fc: 89 75 fc mov %esi,-0x4(%ebp)
int fd;
int r;
fd = open(n, O_RDONLY);
if(fd < 0)
return -1;
1ff: be ff ff ff ff mov $0xffffffff,%esi
stat(const char *n, struct stat *st)
{
int fd;
int r;
fd = open(n, O_RDONLY);
204: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
20b: 00
20c: 89 04 24 mov %eax,(%esp)
20f: e8 e0 00 00 00 call 2f4 <open>
if(fd < 0)
214: 85 c0 test %eax,%eax
stat(const char *n, struct stat *st)
{
int fd;
int r;
fd = open(n, O_RDONLY);
216: 89 c3 mov %eax,%ebx
if(fd < 0)
218: 78 19 js 233 <stat+0x43>
return -1;
r = fstat(fd, st);
21a: 8b 45 0c mov 0xc(%ebp),%eax
21d: 89 1c 24 mov %ebx,(%esp)
220: 89 44 24 04 mov %eax,0x4(%esp)
224: e8 e3 00 00 00 call 30c <fstat>
close(fd);
229: 89 1c 24 mov %ebx,(%esp)
int r;
fd = open(n, O_RDONLY);
if(fd < 0)
return -1;
r = fstat(fd, st);
22c: 89 c6 mov %eax,%esi
close(fd);
22e: e8 a9 00 00 00 call 2dc <close>
return r;
}
233: 89 f0 mov %esi,%eax
235: 8b 5d f8 mov -0x8(%ebp),%ebx
238: 8b 75 fc mov -0x4(%ebp),%esi
23b: 89 ec mov %ebp,%esp
23d: 5d pop %ebp
23e: c3 ret
23f: 90 nop
00000240 <atoi>:
int
atoi(const char *s)
{
240: 55 push %ebp
int n;
n = 0;
241: 31 c0 xor %eax,%eax
return r;
}
int
atoi(const char *s)
{
243: 89 e5 mov %esp,%ebp
245: 8b 4d 08 mov 0x8(%ebp),%ecx
248: 53 push %ebx
int n;
n = 0;
while('0' <= *s && *s <= '9')
249: 0f b6 11 movzbl (%ecx),%edx
24c: 8d 5a d0 lea -0x30(%edx),%ebx
24f: 80 fb 09 cmp $0x9,%bl
252: 77 1c ja 270 <atoi+0x30>
254: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
n = n*10 + *s++ - '0';
258: 0f be d2 movsbl %dl,%edx
25b: 83 c1 01 add $0x1,%ecx
25e: 8d 04 80 lea (%eax,%eax,4),%eax
261: 8d 44 42 d0 lea -0x30(%edx,%eax,2),%eax
atoi(const char *s)
{
int n;
n = 0;
while('0' <= *s && *s <= '9')
265: 0f b6 11 movzbl (%ecx),%edx
268: 8d 5a d0 lea -0x30(%edx),%ebx
26b: 80 fb 09 cmp $0x9,%bl
26e: 76 e8 jbe 258 <atoi+0x18>
n = n*10 + *s++ - '0';
return n;
}
270: 5b pop %ebx
271: 5d pop %ebp
272: c3 ret
273: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
279: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00000280 <memmove>:
void*
memmove(void *vdst, const void *vsrc, int n)
{
280: 55 push %ebp
281: 89 e5 mov %esp,%ebp
283: 56 push %esi
284: 8b 45 08 mov 0x8(%ebp),%eax
287: 53 push %ebx
288: 8b 5d 10 mov 0x10(%ebp),%ebx
28b: 8b 75 0c mov 0xc(%ebp),%esi
char *dst;
const char *src;
dst = vdst;
src = vsrc;
while(n-- > 0)
28e: 85 db test %ebx,%ebx
290: 7e 14 jle 2a6 <memmove+0x26>
n = n*10 + *s++ - '0';
return n;
}
void*
memmove(void *vdst, const void *vsrc, int n)
292: 31 d2 xor %edx,%edx
294: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
const char *src;
dst = vdst;
src = vsrc;
while(n-- > 0)
*dst++ = *src++;
298: 0f b6 0c 16 movzbl (%esi,%edx,1),%ecx
29c: 88 0c 10 mov %cl,(%eax,%edx,1)
29f: 83 c2 01 add $0x1,%edx
char *dst;
const char *src;
dst = vdst;
src = vsrc;
while(n-- > 0)
2a2: 39 da cmp %ebx,%edx
2a4: 75 f2 jne 298 <memmove+0x18>
*dst++ = *src++;
return vdst;
}
2a6: 5b pop %ebx
2a7: 5e pop %esi
2a8: 5d pop %ebp
2a9: c3 ret
2aa: 90 nop
2ab: 90 nop
000002ac <fork>:
name: \
movl $SYS_ ## name, %eax; \
int $T_SYSCALL; \
ret
SYSCALL(fork)
2ac: b8 01 00 00 00 mov $0x1,%eax
2b1: cd 40 int $0x40
2b3: c3 ret
000002b4 <exit>:
SYSCALL(exit)
2b4: b8 02 00 00 00 mov $0x2,%eax
2b9: cd 40 int $0x40
2bb: c3 ret
000002bc <wait>:
SYSCALL(wait)
2bc: b8 03 00 00 00 mov $0x3,%eax
2c1: cd 40 int $0x40
2c3: c3 ret
000002c4 <pipe>:
SYSCALL(pipe)
2c4: b8 04 00 00 00 mov $0x4,%eax
2c9: cd 40 int $0x40
2cb: c3 ret
000002cc <read>:
SYSCALL(read)
2cc: b8 05 00 00 00 mov $0x5,%eax
2d1: cd 40 int $0x40
2d3: c3 ret
000002d4 <write>:
SYSCALL(write)
2d4: b8 10 00 00 00 mov $0x10,%eax
2d9: cd 40 int $0x40
2db: c3 ret
000002dc <close>:
SYSCALL(close)
2dc: b8 15 00 00 00 mov $0x15,%eax
2e1: cd 40 int $0x40
2e3: c3 ret
000002e4 <kill>:
SYSCALL(kill)
2e4: b8 06 00 00 00 mov $0x6,%eax
2e9: cd 40 int $0x40
2eb: c3 ret
000002ec <exec>:
SYSCALL(exec)
2ec: b8 07 00 00 00 mov $0x7,%eax
2f1: cd 40 int $0x40
2f3: c3 ret
000002f4 <open>:
SYSCALL(open)
2f4: b8 0f 00 00 00 mov $0xf,%eax
2f9: cd 40 int $0x40
2fb: c3 ret
000002fc <mknod>:
SYSCALL(mknod)
2fc: b8 11 00 00 00 mov $0x11,%eax
301: cd 40 int $0x40
303: c3 ret
00000304 <unlink>:
SYSCALL(unlink)
304: b8 12 00 00 00 mov $0x12,%eax
309: cd 40 int $0x40
30b: c3 ret
0000030c <fstat>:
SYSCALL(fstat)
30c: b8 08 00 00 00 mov $0x8,%eax
311: cd 40 int $0x40
313: c3 ret
00000314 <link>:
SYSCALL(link)
314: b8 13 00 00 00 mov $0x13,%eax
319: cd 40 int $0x40
31b: c3 ret
0000031c <mkdir>:
SYSCALL(mkdir)
31c: b8 14 00 00 00 mov $0x14,%eax
321: cd 40 int $0x40
323: c3 ret
00000324 <chdir>:
SYSCALL(chdir)
324: b8 09 00 00 00 mov $0x9,%eax
329: cd 40 int $0x40
32b: c3 ret
0000032c <dup>:
SYSCALL(dup)
32c: b8 0a 00 00 00 mov $0xa,%eax
331: cd 40 int $0x40
333: c3 ret
00000334 <getpid>:
SYSCALL(getpid)
334: b8 0b 00 00 00 mov $0xb,%eax
339: cd 40 int $0x40
33b: c3 ret
0000033c <sbrk>:
SYSCALL(sbrk)
33c: b8 0c 00 00 00 mov $0xc,%eax
341: cd 40 int $0x40
343: c3 ret
00000344 <sleep>:
SYSCALL(sleep)
344: b8 0d 00 00 00 mov $0xd,%eax
349: cd 40 int $0x40
34b: c3 ret
0000034c <uptime>:
SYSCALL(uptime)
34c: b8 0e 00 00 00 mov $0xe,%eax
351: cd 40 int $0x40
353: c3 ret
354: 90 nop
355: 90 nop
356: 90 nop
357: 90 nop
358: 90 nop
359: 90 nop
35a: 90 nop
35b: 90 nop
35c: 90 nop
35d: 90 nop
35e: 90 nop
35f: 90 nop
00000360 <putc>:
#include "stat.h"
#include "user.h"
static void
putc(int fd, char c)
{
360: 55 push %ebp
361: 89 e5 mov %esp,%ebp
363: 83 ec 28 sub $0x28,%esp
366: 88 55 f4 mov %dl,-0xc(%ebp)
write(fd, &c, 1);
369: 8d 55 f4 lea -0xc(%ebp),%edx
36c: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
373: 00
374: 89 54 24 04 mov %edx,0x4(%esp)
378: 89 04 24 mov %eax,(%esp)
37b: e8 54 ff ff ff call 2d4 <write>
}
380: c9 leave
381: c3 ret
382: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
389: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00000390 <printint>:
static void
printint(int fd, int xx, int base, int sgn)
{
390: 55 push %ebp
391: 89 e5 mov %esp,%ebp
393: 57 push %edi
394: 56 push %esi
395: 89 c6 mov %eax,%esi
397: 53 push %ebx
398: 83 ec 1c sub $0x1c,%esp
char buf[16];
int i, neg;
uint x;
neg = 0;
if(sgn && xx < 0){
39b: 8b 45 08 mov 0x8(%ebp),%eax
39e: 85 c0 test %eax,%eax
3a0: 74 5e je 400 <printint+0x70>
3a2: 89 d0 mov %edx,%eax
3a4: c1 e8 1f shr $0x1f,%eax
3a7: 84 c0 test %al,%al
3a9: 74 55 je 400 <printint+0x70>
neg = 1;
x = -xx;
3ab: 89 d0 mov %edx,%eax
int i, neg;
uint x;
neg = 0;
if(sgn && xx < 0){
neg = 1;
3ad: bf 01 00 00 00 mov $0x1,%edi
x = -xx;
3b2: f7 d8 neg %eax
} else {
x = xx;
}
i = 0;
3b4: 31 db xor %ebx,%ebx
3b6: eb 02 jmp 3ba <printint+0x2a>
do{
buf[i++] = digits[x % base];
3b8: 89 d3 mov %edx,%ebx
3ba: 31 d2 xor %edx,%edx
3bc: f7 f1 div %ecx
3be: 0f b6 92 fe 06 00 00 movzbl 0x6fe(%edx),%edx
}while((x /= base) != 0);
3c5: 85 c0 test %eax,%eax
x = xx;
}
i = 0;
do{
buf[i++] = digits[x % base];
3c7: 88 54 1d d8 mov %dl,-0x28(%ebp,%ebx,1)
3cb: 8d 53 01 lea 0x1(%ebx),%edx
}while((x /= base) != 0);
3ce: 75 e8 jne 3b8 <printint+0x28>
if(neg)
3d0: 85 ff test %edi,%edi
3d2: 74 08 je 3dc <printint+0x4c>
buf[i++] = '-';
3d4: c6 44 15 d8 2d movb $0x2d,-0x28(%ebp,%edx,1)
3d9: 8d 53 02 lea 0x2(%ebx),%edx
while(--i >= 0)
3dc: 8d 5a ff lea -0x1(%edx),%ebx
3df: 90 nop
putc(fd, buf[i]);
3e0: 0f be 54 1d d8 movsbl -0x28(%ebp,%ebx,1),%edx
3e5: 89 f0 mov %esi,%eax
buf[i++] = digits[x % base];
}while((x /= base) != 0);
if(neg)
buf[i++] = '-';
while(--i >= 0)
3e7: 83 eb 01 sub $0x1,%ebx
putc(fd, buf[i]);
3ea: e8 71 ff ff ff call 360 <putc>
buf[i++] = digits[x % base];
}while((x /= base) != 0);
if(neg)
buf[i++] = '-';
while(--i >= 0)
3ef: 83 fb ff cmp $0xffffffff,%ebx
3f2: 75 ec jne 3e0 <printint+0x50>
putc(fd, buf[i]);
}
3f4: 83 c4 1c add $0x1c,%esp
3f7: 5b pop %ebx
3f8: 5e pop %esi
3f9: 5f pop %edi
3fa: 5d pop %ebp
3fb: c3 ret
3fc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
neg = 0;
if(sgn && xx < 0){
neg = 1;
x = -xx;
} else {
x = xx;
400: 89 d0 mov %edx,%eax
static char digits[] = "0123456789ABCDEF";
char buf[16];
int i, neg;
uint x;
neg = 0;
402: 31 ff xor %edi,%edi
404: eb ae jmp 3b4 <printint+0x24>
406: 8d 76 00 lea 0x0(%esi),%esi
409: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00000410 <printf>:
}
// Print to the given fd. Only understands %d, %x, %p, %s.
void
printf(int fd, const char *fmt, ...)
{
410: 55 push %ebp
411: 89 e5 mov %esp,%ebp
413: 57 push %edi
414: 56 push %esi
415: 53 push %ebx
416: 83 ec 2c sub $0x2c,%esp
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
419: 8b 5d 0c mov 0xc(%ebp),%ebx
41c: 0f b6 0b movzbl (%ebx),%ecx
41f: 84 c9 test %cl,%cl
421: 0f 84 89 00 00 00 je 4b0 <printf+0xa0>
char *s;
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
427: 8d 45 10 lea 0x10(%ebp),%eax
{
char *s;
int c, i, state;
uint *ap;
state = 0;
42a: 31 f6 xor %esi,%esi
ap = (uint*)(void*)&fmt + 1;
42c: 89 45 e4 mov %eax,-0x1c(%ebp)
42f: eb 21 jmp 452 <printf+0x42>
431: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
for(i = 0; fmt[i]; i++){
c = fmt[i] & 0xff;
if(state == 0){
if(c == '%'){
438: 83 f9 25 cmp $0x25,%ecx
43b: 74 7b je 4b8 <printf+0xa8>
state = '%';
} else {
putc(fd, c);
43d: 8b 45 08 mov 0x8(%ebp),%eax
440: 0f be d1 movsbl %cl,%edx
443: e8 18 ff ff ff call 360 <putc>
} else if(c == '%'){
putc(fd, c);
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
putc(fd, c);
448: 83 c3 01 add $0x1,%ebx
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
44b: 0f b6 0b movzbl (%ebx),%ecx
44e: 84 c9 test %cl,%cl
450: 74 5e je 4b0 <printf+0xa0>
c = fmt[i] & 0xff;
if(state == 0){
452: 85 f6 test %esi,%esi
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
c = fmt[i] & 0xff;
454: 0f b6 c9 movzbl %cl,%ecx
if(state == 0){
457: 74 df je 438 <printf+0x28>
if(c == '%'){
state = '%';
} else {
putc(fd, c);
}
} else if(state == '%'){
459: 83 fe 25 cmp $0x25,%esi
45c: 75 ea jne 448 <printf+0x38>
if(c == 'd'){
45e: 83 f9 64 cmp $0x64,%ecx
461: 0f 84 c9 00 00 00 je 530 <printf+0x120>
printint(fd, *ap, 10, 1);
ap++;
} else if(c == 'x' || c == 'p'){
467: 83 f9 70 cmp $0x70,%ecx
46a: 74 54 je 4c0 <printf+0xb0>
46c: 83 f9 78 cmp $0x78,%ecx
46f: 90 nop
470: 74 4e je 4c0 <printf+0xb0>
printint(fd, *ap, 16, 0);
ap++;
} else if(c == 's'){
472: 83 f9 73 cmp $0x73,%ecx
475: 74 71 je 4e8 <printf+0xd8>
s = "(null)";
while(*s != 0){
putc(fd, *s);
s++;
}
} else if(c == 'c'){
477: 83 f9 63 cmp $0x63,%ecx
47a: 0f 84 d2 00 00 00 je 552 <printf+0x142>
putc(fd, *ap);
ap++;
} else if(c == '%'){
480: 83 f9 25 cmp $0x25,%ecx
putc(fd, c);
483: ba 25 00 00 00 mov $0x25,%edx
488: 8b 45 08 mov 0x8(%ebp),%eax
s++;
}
} else if(c == 'c'){
putc(fd, *ap);
ap++;
} else if(c == '%'){
48b: 74 11 je 49e <printf+0x8e>
putc(fd, c);
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
48d: 89 4d e0 mov %ecx,-0x20(%ebp)
490: e8 cb fe ff ff call 360 <putc>
putc(fd, c);
495: 8b 4d e0 mov -0x20(%ebp),%ecx
498: 8b 45 08 mov 0x8(%ebp),%eax
49b: 0f be d1 movsbl %cl,%edx
49e: 83 c3 01 add $0x1,%ebx
}
state = 0;
4a1: 31 f6 xor %esi,%esi
} else if(c == '%'){
putc(fd, c);
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
putc(fd, c);
4a3: e8 b8 fe ff ff call 360 <putc>
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
4a8: 0f b6 0b movzbl (%ebx),%ecx
4ab: 84 c9 test %cl,%cl
4ad: 75 a3 jne 452 <printf+0x42>
4af: 90 nop
putc(fd, c);
}
state = 0;
}
}
}
4b0: 83 c4 2c add $0x2c,%esp
4b3: 5b pop %ebx
4b4: 5e pop %esi
4b5: 5f pop %edi
4b6: 5d pop %ebp
4b7: c3 ret
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
c = fmt[i] & 0xff;
if(state == 0){
if(c == '%'){
state = '%';
4b8: be 25 00 00 00 mov $0x25,%esi
4bd: eb 89 jmp 448 <printf+0x38>
4bf: 90 nop
} else if(state == '%'){
if(c == 'd'){
printint(fd, *ap, 10, 1);
ap++;
} else if(c == 'x' || c == 'p'){
printint(fd, *ap, 16, 0);
4c0: 8b 45 e4 mov -0x1c(%ebp),%eax
4c3: b9 10 00 00 00 mov $0x10,%ecx
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
putc(fd, c);
}
state = 0;
4c8: 31 f6 xor %esi,%esi
} else if(state == '%'){
if(c == 'd'){
printint(fd, *ap, 10, 1);
ap++;
} else if(c == 'x' || c == 'p'){
printint(fd, *ap, 16, 0);
4ca: c7 04 24 00 00 00 00 movl $0x0,(%esp)
4d1: 8b 10 mov (%eax),%edx
4d3: 8b 45 08 mov 0x8(%ebp),%eax
4d6: e8 b5 fe ff ff call 390 <printint>
ap++;
4db: 83 45 e4 04 addl $0x4,-0x1c(%ebp)
4df: e9 64 ff ff ff jmp 448 <printf+0x38>
4e4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
} else if(c == 's'){
s = (char*)*ap;
4e8: 8b 45 e4 mov -0x1c(%ebp),%eax
4eb: 8b 38 mov (%eax),%edi
ap++;
4ed: 83 c0 04 add $0x4,%eax
4f0: 89 45 e4 mov %eax,-0x1c(%ebp)
if(s == 0)
s = "(null)";
4f3: b8 f7 06 00 00 mov $0x6f7,%eax
4f8: 85 ff test %edi,%edi
4fa: 0f 44 f8 cmove %eax,%edi
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
putc(fd, c);
}
state = 0;
4fd: 31 f6 xor %esi,%esi
} else if(c == 's'){
s = (char*)*ap;
ap++;
if(s == 0)
s = "(null)";
while(*s != 0){
4ff: 0f b6 17 movzbl (%edi),%edx
502: 84 d2 test %dl,%dl
504: 0f 84 3e ff ff ff je 448 <printf+0x38>
50a: 89 de mov %ebx,%esi
50c: 8b 5d 08 mov 0x8(%ebp),%ebx
50f: 90 nop
putc(fd, *s);
510: 0f be d2 movsbl %dl,%edx
s++;
513: 83 c7 01 add $0x1,%edi
s = (char*)*ap;
ap++;
if(s == 0)
s = "(null)";
while(*s != 0){
putc(fd, *s);
516: 89 d8 mov %ebx,%eax
518: e8 43 fe ff ff call 360 <putc>
} else if(c == 's'){
s = (char*)*ap;
ap++;
if(s == 0)
s = "(null)";
while(*s != 0){
51d: 0f b6 17 movzbl (%edi),%edx
520: 84 d2 test %dl,%dl
522: 75 ec jne 510 <printf+0x100>
524: 89 f3 mov %esi,%ebx
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
putc(fd, c);
}
state = 0;
526: 31 f6 xor %esi,%esi
528: e9 1b ff ff ff jmp 448 <printf+0x38>
52d: 8d 76 00 lea 0x0(%esi),%esi
} else {
putc(fd, c);
}
} else if(state == '%'){
if(c == 'd'){
printint(fd, *ap, 10, 1);
530: 8b 45 e4 mov -0x1c(%ebp),%eax
533: b1 0a mov $0xa,%cl
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
putc(fd, c);
}
state = 0;
535: 66 31 f6 xor %si,%si
} else {
putc(fd, c);
}
} else if(state == '%'){
if(c == 'd'){
printint(fd, *ap, 10, 1);
538: c7 04 24 01 00 00 00 movl $0x1,(%esp)
53f: 8b 10 mov (%eax),%edx
541: 8b 45 08 mov 0x8(%ebp),%eax
544: e8 47 fe ff ff call 390 <printint>
ap++;
549: 83 45 e4 04 addl $0x4,-0x1c(%ebp)
54d: e9 f6 fe ff ff jmp 448 <printf+0x38>
while(*s != 0){
putc(fd, *s);
s++;
}
} else if(c == 'c'){
putc(fd, *ap);
552: 8b 45 e4 mov -0x1c(%ebp),%eax
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
putc(fd, c);
}
state = 0;
555: 31 f6 xor %esi,%esi
while(*s != 0){
putc(fd, *s);
s++;
}
} else if(c == 'c'){
putc(fd, *ap);
557: 0f be 10 movsbl (%eax),%edx
55a: 8b 45 08 mov 0x8(%ebp),%eax
55d: e8 fe fd ff ff call 360 <putc>
ap++;
562: 83 45 e4 04 addl $0x4,-0x1c(%ebp)
566: e9 dd fe ff ff jmp 448 <printf+0x38>
56b: 90 nop
56c: 90 nop
56d: 90 nop
56e: 90 nop
56f: 90 nop
00000570 <free>:
static Header base;
static Header *freep;
void
free(void *ap)
{
570: 55 push %ebp
Header *bp, *p;
bp = (Header*)ap - 1;
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
571: a1 ac 09 00 00 mov 0x9ac,%eax
static Header base;
static Header *freep;
void
free(void *ap)
{
576: 89 e5 mov %esp,%ebp
578: 57 push %edi
579: 56 push %esi
57a: 53 push %ebx
57b: 8b 5d 08 mov 0x8(%ebp),%ebx
Header *bp, *p;
bp = (Header*)ap - 1;
57e: 8d 4b f8 lea -0x8(%ebx),%ecx
581: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
588: 39 c8 cmp %ecx,%eax
58a: 8b 10 mov (%eax),%edx
58c: 73 04 jae 592 <free+0x22>
58e: 39 d1 cmp %edx,%ecx
590: 72 16 jb 5a8 <free+0x38>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
592: 39 d0 cmp %edx,%eax
594: 72 0c jb 5a2 <free+0x32>
596: 39 c8 cmp %ecx,%eax
598: 72 0e jb 5a8 <free+0x38>
59a: 39 d1 cmp %edx,%ecx
59c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
5a0: 72 06 jb 5a8 <free+0x38>
static Header base;
static Header *freep;
void
free(void *ap)
{
5a2: 89 d0 mov %edx,%eax
5a4: eb e2 jmp 588 <free+0x18>
5a6: 66 90 xchg %ax,%ax
bp = (Header*)ap - 1;
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
break;
if(bp + bp->s.size == p->s.ptr){
5a8: 8b 73 fc mov -0x4(%ebx),%esi
5ab: 8d 3c f1 lea (%ecx,%esi,8),%edi
5ae: 39 d7 cmp %edx,%edi
5b0: 74 19 je 5cb <free+0x5b>
bp->s.size += p->s.ptr->s.size;
bp->s.ptr = p->s.ptr->s.ptr;
} else
bp->s.ptr = p->s.ptr;
5b2: 89 53 f8 mov %edx,-0x8(%ebx)
if(p + p->s.size == bp){
5b5: 8b 50 04 mov 0x4(%eax),%edx
5b8: 8d 34 d0 lea (%eax,%edx,8),%esi
5bb: 39 f1 cmp %esi,%ecx
5bd: 74 23 je 5e2 <free+0x72>
p->s.size += bp->s.size;
p->s.ptr = bp->s.ptr;
} else
p->s.ptr = bp;
5bf: 89 08 mov %ecx,(%eax)
freep = p;
5c1: a3 ac 09 00 00 mov %eax,0x9ac
}
5c6: 5b pop %ebx
5c7: 5e pop %esi
5c8: 5f pop %edi
5c9: 5d pop %ebp
5ca: c3 ret
bp = (Header*)ap - 1;
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
break;
if(bp + bp->s.size == p->s.ptr){
bp->s.size += p->s.ptr->s.size;
5cb: 03 72 04 add 0x4(%edx),%esi
5ce: 89 73 fc mov %esi,-0x4(%ebx)
bp->s.ptr = p->s.ptr->s.ptr;
5d1: 8b 10 mov (%eax),%edx
5d3: 8b 12 mov (%edx),%edx
5d5: 89 53 f8 mov %edx,-0x8(%ebx)
} else
bp->s.ptr = p->s.ptr;
if(p + p->s.size == bp){
5d8: 8b 50 04 mov 0x4(%eax),%edx
5db: 8d 34 d0 lea (%eax,%edx,8),%esi
5de: 39 f1 cmp %esi,%ecx
5e0: 75 dd jne 5bf <free+0x4f>
p->s.size += bp->s.size;
5e2: 03 53 fc add -0x4(%ebx),%edx
p->s.ptr = bp->s.ptr;
} else
p->s.ptr = bp;
freep = p;
5e5: a3 ac 09 00 00 mov %eax,0x9ac
bp->s.size += p->s.ptr->s.size;
bp->s.ptr = p->s.ptr->s.ptr;
} else
bp->s.ptr = p->s.ptr;
if(p + p->s.size == bp){
p->s.size += bp->s.size;
5ea: 89 50 04 mov %edx,0x4(%eax)
p->s.ptr = bp->s.ptr;
5ed: 8b 53 f8 mov -0x8(%ebx),%edx
5f0: 89 10 mov %edx,(%eax)
} else
p->s.ptr = bp;
freep = p;
}
5f2: 5b pop %ebx
5f3: 5e pop %esi
5f4: 5f pop %edi
5f5: 5d pop %ebp
5f6: c3 ret
5f7: 89 f6 mov %esi,%esi
5f9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00000600 <malloc>:
return freep;
}
void*
malloc(uint nbytes)
{
600: 55 push %ebp
601: 89 e5 mov %esp,%ebp
603: 57 push %edi
604: 56 push %esi
605: 53 push %ebx
606: 83 ec 2c sub $0x2c,%esp
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
609: 8b 5d 08 mov 0x8(%ebp),%ebx
if((prevp = freep) == 0){
60c: 8b 15 ac 09 00 00 mov 0x9ac,%edx
malloc(uint nbytes)
{
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
612: 83 c3 07 add $0x7,%ebx
615: c1 eb 03 shr $0x3,%ebx
618: 83 c3 01 add $0x1,%ebx
if((prevp = freep) == 0){
61b: 85 d2 test %edx,%edx
61d: 0f 84 a3 00 00 00 je 6c6 <malloc+0xc6>
623: 8b 02 mov (%edx),%eax
625: 8b 48 04 mov 0x4(%eax),%ecx
base.s.ptr = freep = prevp = &base;
base.s.size = 0;
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
if(p->s.size >= nunits){
628: 39 d9 cmp %ebx,%ecx
62a: 73 74 jae 6a0 <malloc+0xa0>
p->s.size -= nunits;
p += p->s.size;
p->s.size = nunits;
}
freep = prevp;
return (void*)(p + 1);
62c: 8d 14 dd 00 00 00 00 lea 0x0(,%ebx,8),%edx
morecore(uint nu)
{
char *p;
Header *hp;
if(nu < 4096)
633: bf 00 80 00 00 mov $0x8000,%edi
p->s.size -= nunits;
p += p->s.size;
p->s.size = nunits;
}
freep = prevp;
return (void*)(p + 1);
638: 89 55 e4 mov %edx,-0x1c(%ebp)
63b: eb 0c jmp 649 <malloc+0x49>
63d: 8d 76 00 lea 0x0(%esi),%esi
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
if((prevp = freep) == 0){
base.s.ptr = freep = prevp = &base;
base.s.size = 0;
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
640: 8b 02 mov (%edx),%eax
if(p->s.size >= nunits){
642: 8b 48 04 mov 0x4(%eax),%ecx
645: 39 cb cmp %ecx,%ebx
647: 76 57 jbe 6a0 <malloc+0xa0>
p->s.size = nunits;
}
freep = prevp;
return (void*)(p + 1);
}
if(p == freep)
649: 3b 05 ac 09 00 00 cmp 0x9ac,%eax
64f: 89 c2 mov %eax,%edx
651: 75 ed jne 640 <malloc+0x40>
morecore(uint nu)
{
char *p;
Header *hp;
if(nu < 4096)
653: 8b 45 e4 mov -0x1c(%ebp),%eax
656: 81 fb 00 10 00 00 cmp $0x1000,%ebx
65c: be 00 10 00 00 mov $0x1000,%esi
661: 0f 43 f3 cmovae %ebx,%esi
664: 0f 42 c7 cmovb %edi,%eax
nu = 4096;
p = sbrk(nu * sizeof(Header));
667: 89 04 24 mov %eax,(%esp)
66a: e8 cd fc ff ff call 33c <sbrk>
if(p == (char*)-1)
66f: 83 f8 ff cmp $0xffffffff,%eax
672: 74 1c je 690 <malloc+0x90>
return 0;
hp = (Header*)p;
hp->s.size = nu;
674: 89 70 04 mov %esi,0x4(%eax)
free((void*)(hp + 1));
677: 83 c0 08 add $0x8,%eax
67a: 89 04 24 mov %eax,(%esp)
67d: e8 ee fe ff ff call 570 <free>
return freep;
682: 8b 15 ac 09 00 00 mov 0x9ac,%edx
}
freep = prevp;
return (void*)(p + 1);
}
if(p == freep)
if((p = morecore(nunits)) == 0)
688: 85 d2 test %edx,%edx
68a: 75 b4 jne 640 <malloc+0x40>
68c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
return 0;
}
}
690: 83 c4 2c add $0x2c,%esp
freep = prevp;
return (void*)(p + 1);
}
if(p == freep)
if((p = morecore(nunits)) == 0)
return 0;
693: 31 c0 xor %eax,%eax
}
}
695: 5b pop %ebx
696: 5e pop %esi
697: 5f pop %edi
698: 5d pop %ebp
699: c3 ret
69a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
base.s.ptr = freep = prevp = &base;
base.s.size = 0;
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
if(p->s.size >= nunits){
if(p->s.size == nunits)
6a0: 39 cb cmp %ecx,%ebx
6a2: 74 1c je 6c0 <malloc+0xc0>
prevp->s.ptr = p->s.ptr;
else {
p->s.size -= nunits;
6a4: 29 d9 sub %ebx,%ecx
6a6: 89 48 04 mov %ecx,0x4(%eax)
p += p->s.size;
6a9: 8d 04 c8 lea (%eax,%ecx,8),%eax
p->s.size = nunits;
6ac: 89 58 04 mov %ebx,0x4(%eax)
}
freep = prevp;
6af: 89 15 ac 09 00 00 mov %edx,0x9ac
}
if(p == freep)
if((p = morecore(nunits)) == 0)
return 0;
}
}
6b5: 83 c4 2c add $0x2c,%esp
p->s.size -= nunits;
p += p->s.size;
p->s.size = nunits;
}
freep = prevp;
return (void*)(p + 1);
6b8: 83 c0 08 add $0x8,%eax
}
if(p == freep)
if((p = morecore(nunits)) == 0)
return 0;
}
}
6bb: 5b pop %ebx
6bc: 5e pop %esi
6bd: 5f pop %edi
6be: 5d pop %ebp
6bf: c3 ret
base.s.size = 0;
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
if(p->s.size >= nunits){
if(p->s.size == nunits)
prevp->s.ptr = p->s.ptr;
6c0: 8b 08 mov (%eax),%ecx
6c2: 89 0a mov %ecx,(%edx)
6c4: eb e9 jmp 6af <malloc+0xaf>
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
if((prevp = freep) == 0){
base.s.ptr = freep = prevp = &base;
6c6: c7 05 ac 09 00 00 b0 movl $0x9b0,0x9ac
6cd: 09 00 00
base.s.size = 0;
6d0: b8 b0 09 00 00 mov $0x9b0,%eax
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
if((prevp = freep) == 0){
base.s.ptr = freep = prevp = &base;
6d5: c7 05 b0 09 00 00 b0 movl $0x9b0,0x9b0
6dc: 09 00 00
base.s.size = 0;
6df: c7 05 b4 09 00 00 00 movl $0x0,0x9b4
6e6: 00 00 00
6e9: e9 3e ff ff ff jmp 62c <malloc+0x2c>
| 28.915003
| 60
| 0.412092
|
4945d7db22ccc1308382a694253db5d45b609422
| 278
|
asm
|
Assembly
|
Osmium/tools/.sources/bootmark.asm
|
M3TIOR/ideads
|
306daef1940bb9a6d45808aa04f5221df04c44eb
|
[
"Unlicense"
] | null | null | null |
Osmium/tools/.sources/bootmark.asm
|
M3TIOR/ideads
|
306daef1940bb9a6d45808aa04f5221df04c44eb
|
[
"Unlicense"
] | null | null | null |
Osmium/tools/.sources/bootmark.asm
|
M3TIOR/ideads
|
306daef1940bb9a6d45808aa04f5221df04c44eb
|
[
"Unlicense"
] | null | null | null |
[BITS 16]
;To make sure we can boot from the disk we are compiling the project to.
;These two bytes are shoved in the last two bytes of the mbr.
db 0x55
db 0xaa
;this means we are going to have 510 bytes of space for extra boot info.
;instead of 512... just as a reminder...
| 25.272727
| 72
| 0.733813
|
6fbea43db18b2606797dac2aa9def248c2cb8537
| 758
|
asm
|
Assembly
|
oeis/025/A025754.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/025/A025754.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/025/A025754.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A025754: 9th-order Patalan numbers (generalization of Catalan numbers).
; Submitted by Jon Maiga
; 1,1,36,1836,107406,6766578,446594148,30432201228,2122646035653,150707868531363,10850966534258136,790147653994615176,58075852568604215436,4302080463351219958836,320812285981333831216056,24060921448600037341204200,1813591954188227814593266575,137299579120014658669502004825,10434768013121114058882152366700,795788360579604961648433619965700,60877809584339779566105171927376050,4670197678112923089571211046428705550,359180657789412084888840413207153172300,27688143750462070717735393592012285847300
mul $0,2
mov $1,1
mov $2,1
mov $3,$0
mov $4,-1
lpb $3
mul $1,$2
mul $1,$4
sub $3,2
mov $4,$2
sub $5,1
div $1,$5
sub $2,9
sub $4,$2
lpe
mov $0,$1
| 36.095238
| 496
| 0.825858
|
252d4174ebfdd9a05d387207d374bf97bf2ca28c
| 3,964
|
asm
|
Assembly
|
release/src/router/gmp/mpn/x86_64/gcd_1.asm
|
ghsecuritylab/tomato-dnssec
|
41eef747cea76cbda27b9e3b6e1c8daa7f0009a7
|
[
"FSFAP"
] | 5
|
2015-01-12T13:53:14.000Z
|
2020-01-16T02:48:36.000Z
|
release/src/router/gmp/mpn/x86_64/gcd_1.asm
|
ghsecuritylab/tomato-dnssec
|
41eef747cea76cbda27b9e3b6e1c8daa7f0009a7
|
[
"FSFAP"
] | 1
|
2020-07-28T08:22:45.000Z
|
2020-07-28T08:22:45.000Z
|
release/src/router/gmp/mpn/x86_64/gcd_1.asm
|
ghsecuritylab/tomato-dnssec
|
41eef747cea76cbda27b9e3b6e1c8daa7f0009a7
|
[
"FSFAP"
] | 2
|
2017-03-24T18:55:32.000Z
|
2020-03-08T02:32:43.000Z
|
dnl AMD64 mpn_gcd_1 -- mpn by 1 gcd.
dnl Based on the K7 gcd_1.asm, by Kevin Ryde. Rehacked for AMD64 by Torbjorn
dnl 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 K8,K9 5.21 (4.95)
C AMD K10 5.15 (5.00)
C AMD bd1 5.42 (5.14)
C AMD bobcat 6.71 (6.56)
C Intel P4 13.5 (12.75)
C Intel core2 6.20 (6.16)
C Intel NHM 6.49 (6.25)
C Intel SBR 7.75 (7.57)
C Intel atom 8.77 (8.54)
C VIA nano 6.60 (6.20)
C Numbers measured with: speed -CD -s16-64 -t48 mpn_gcd_1
C ctz_table[n] is the number of trailing zeros on n, or MAXSHIFT if n==0.
deflit(MAXSHIFT, 7)
deflit(MASK, eval((m4_lshift(1,MAXSHIFT))-1))
DEF_OBJECT(ctz_table,64)
.byte MAXSHIFT
forloop(i,1,MASK,
` .byte m4_count_trailing_zeros(i)
')
END_OBJECT(ctz_table)
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', 8)
C INPUT PARAMETERS
define(`up', `%rdi')
define(`n', `%rsi')
define(`v0', `%rdx')
ABI_SUPPORT(DOS64)
ABI_SUPPORT(STD64)
IFDOS(`define(`STACK_ALLOC', 40)')
IFSTD(`define(`STACK_ALLOC', 8)')
ASM_START()
TEXT
ALIGN(16)
PROLOGUE(mpn_gcd_1)
FUNC_ENTRY(3)
mov (up), %rax C U low limb
mov $-1, R32(%rcx)
or v0, %rax C x | y
L(twos):
inc R32(%rcx)
shr %rax
jnc L(twos)
shr R8(%rcx), v0
push %rcx C common twos
L(divide_strip_y):
shr v0
jnc L(divide_strip_y)
adc v0, v0
cmp $1, n
jnz L(reduce_nby1)
C Both U and V are single limbs, reduce with bmod if u0 >> v0.
mov (up), %r8
mov %r8, %rax
shr $BMOD_THRES_LOG2, %r8
cmp %r8, v0
ja L(noreduce)
push v0
sub $STACK_ALLOC, %rsp C maintain ABI required rsp alignment
L(bmod):
IFDOS(` mov %rdx, %r8 ')
IFDOS(` mov %rsi, %rdx ')
IFDOS(` mov %rdi, %rcx ')
CALL( mpn_modexact_1_odd)
L(reduced):
add $STACK_ALLOC, %rsp
pop %rdx
L(noreduce):
LEA( ctz_table, %rsi)
test %rax, %rax
mov %rax, %rcx
jnz L(mid)
jmp L(end)
L(reduce_nby1):
push v0
sub $STACK_ALLOC, %rsp C maintain ABI required rsp alignment
cmp $BMOD_1_TO_MOD_1_THRESHOLD, n
jl L(bmod)
IFDOS(` mov %rdx, %r8 ')
IFDOS(` mov %rsi, %rdx ')
IFDOS(` mov %rdi, %rcx ')
CALL( mpn_mod_1)
jmp L(reduced)
ALIGN(16) C K8 BC P4 NHM SBR
L(top): cmovc %rcx, %rax C if x-y < 0 0
cmovc %rdi, %rdx C use x,y-x 0
L(mid): and $MASK, R32(%rcx) C 0
movzbl (%rsi,%rcx), R32(%rcx) C 1
jz L(shift_alot) C 1
shr R8(%rcx), %rax C 3
mov %rax, %rdi C 4
mov %rdx, %rcx C 3
sub %rax, %rcx C 4
sub %rdx, %rax C 4
jnz L(top) C 5
L(end): pop %rcx
mov %rdx, %rax
shl R8(%rcx), %rax
FUNC_EXIT()
ret
L(shift_alot):
shr $MAXSHIFT, %rax
mov %rax, %rcx
jmp L(mid)
EPILOGUE()
| 24.170732
| 79
| 0.64884
|
21437edfc02bdce6c928173bbfbb17f146e1f7d6
| 2,007
|
asm
|
Assembly
|
uti/cv_hexda.asm
|
olifink/smsqe
|
c546d882b26566a46d71820d1539bed9ea8af108
|
[
"BSD-2-Clause"
] | null | null | null |
uti/cv_hexda.asm
|
olifink/smsqe
|
c546d882b26566a46d71820d1539bed9ea8af108
|
[
"BSD-2-Clause"
] | null | null | null |
uti/cv_hexda.asm
|
olifink/smsqe
|
c546d882b26566a46d71820d1539bed9ea8af108
|
[
"BSD-2-Clause"
] | null | null | null |
; dev8_uti_cv_hexda_asm
include dev8_keys_err
section utility
xdef cv_hexda
;+++
; convert hex-long to decimal-ascii
;
; ENTRY EXIT
; D0 error
; D1.l hex preserved
; D2.w how many bytes smashed
; A1 buffer preserved
;
; Error return: err.imem if d2 too high
; Condition code set
;---
cvreg reg d1-d3/a2-a3/a6
stfr equ $20
cv_hexda
movem.l cvreg,-(sp)
sub.l #stfr,sp
move.l sp,a6 ; prepare workspace
moveq #err.imem,d0 ;
move.l d2,d3 ; copy how many byrtes
sub.l #stfr-8,d3
bhi.s convert_rts ; return with error
move.l a1,a2 ; copy addr. of buffer
move.l d2,d3 ; how many bytes
bra.s blank_loop_end
blank_loop
move.b #' ',(a1)+
blank_loop_end
dbra d3,blank_loop ; buffer now only blanks
lea $2(a6),a1 ; our workspace
move.l d2,d3 ; how many bytes
bra.s zero_loop_end
zero_loop
move.b #'0',(a1)+
zero_loop_end
dbra d3,zero_loop ; workspace now only zeros
move.l a2,a1 ; restore buffer
add.l #2,a1 ; .w number of chars
lea $2(a6),a3
move.w d2,-(sp)
move.w d2,d3 ; copy how many bytes
bsr.s help_div
bra.s convert_loop_end
convert_loop
move.b -(a1),$0(a3,d3.w)
convert_loop_end
subq.w #1,d3 ; sub how many bytes
cmpa.l a1,a2
bne.s convert_loop
move.w (sp)+,d2 ; restore how many bytes
move.w d2,(a1) ; number of chars
moveq #0,d0 ; no error
convert_rts
add.l #stfr,sp ; adjust stack
movem.l (sp)+,cvreg
tst.l d0
rts
help_div
divu #1000,d1
clr.l d2
move.w d1,d2
bsr.s help_d1
swap d1
move.w d1,d2
help_d1
movem.l d2,-(a7)
divu #100,d2
ori.b #'0',d2
move.b d2,(a1)+
swap d2
andi.l #$ffff,d2
divu #10,d2
ori.b #'0',d2
move.b d2,(a1)+
swap d2
andi.l #$ffff,d2
ori.b #'0',d2
move.b d2,(a1)+
movem.l (a7)+,d2
rts
end
| 19.871287
| 54
| 0.570005
|
4da0959bad0d855b7f4e32f0e43e51f030b3021b
| 6,113
|
asm
|
Assembly
|
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0_notsx.log_21829_1251.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 9
|
2020-08-13T19:41:58.000Z
|
2022-03-30T12:22:51.000Z
|
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0_notsx.log_21829_1251.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 1
|
2021-04-29T06:29:35.000Z
|
2021-05-13T21:02:30.000Z
|
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0_notsx.log_21829_1251.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 %rax
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_D_ht+0x19a7b, %rsi
lea addresses_normal_ht+0xa2db, %rdi
nop
nop
nop
and %r11, %r11
mov $54, %rcx
rep movsq
xor %rax, %rax
lea addresses_D_ht+0x12e5b, %rdx
nop
sub %r13, %r13
vmovups (%rdx), %ymm0
vextracti128 $1, %ymm0, %xmm0
vpextrq $0, %xmm0, %r11
nop
nop
nop
xor $26732, %rsi
lea addresses_UC_ht+0xc6f, %rdx
nop
nop
nop
and $46788, %r13
mov $0x6162636465666768, %rax
movq %rax, %xmm6
movups %xmm6, (%rdx)
nop
nop
and %rcx, %rcx
lea addresses_normal_ht+0x82db, %rsi
lea addresses_A_ht+0xeedb, %rdi
nop
nop
nop
and %r14, %r14
mov $124, %rcx
rep movsw
nop
nop
nop
nop
and %r14, %r14
lea addresses_UC_ht+0xe2db, %rsi
lea addresses_UC_ht+0x1df2b, %rdi
nop
and $60867, %r14
mov $72, %rcx
rep movsw
nop
nop
nop
nop
nop
cmp %rsi, %rsi
lea addresses_WC_ht+0x10b43, %rdi
nop
nop
nop
nop
add %r14, %r14
mov $0x6162636465666768, %rsi
movq %rsi, %xmm2
movups %xmm2, (%rdi)
nop
nop
nop
inc %r11
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rax
pop %r14
pop %r13
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r13
push %rax
push %rbp
push %rbx
push %rdi
push %rsi
// Store
lea addresses_WC+0x4adb, %rbp
nop
nop
and %r13, %r13
movb $0x51, (%rbp)
nop
nop
nop
nop
cmp $33235, %rbp
// Store
lea addresses_D+0x143e5, %r13
clflush (%r13)
nop
nop
nop
nop
inc %rbx
movb $0x51, (%r13)
nop
nop
nop
nop
add $48889, %rbx
// Faulty Load
lea addresses_WC+0x4adb, %rax
nop
nop
nop
add $45942, %rbp
movups (%rax), %xmm6
vpextrq $1, %xmm6, %rdi
lea oracles, %rbx
and $0xff, %rdi
shlq $12, %rdi
mov (%rbx,%rdi,1), %rdi
pop %rsi
pop %rdi
pop %rbx
pop %rbp
pop %rax
pop %r13
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_WC', 'AVXalign': False, 'size': 8, 'NT': True, 'same': False, 'congruent': 0}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC', 'AVXalign': False, 'size': 1, 'NT': False, 'same': True, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D', 'AVXalign': False, 'size': 1, 'NT': True, 'same': False, 'congruent': 1}}
[Faulty Load]
{'src': {'type': 'addresses_WC', 'AVXalign': False, 'size': 16, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_D_ht', 'congruent': 5, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal_ht', 'congruent': 8, 'same': False}}
{'src': {'type': 'addresses_D_ht', 'AVXalign': False, 'size': 32, 'NT': False, 'same': True, 'congruent': 7}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 1}}
{'src': {'type': 'addresses_normal_ht', 'congruent': 11, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_A_ht', 'congruent': 10, 'same': False}}
{'src': {'type': 'addresses_UC_ht', 'congruent': 11, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_UC_ht', 'congruent': 4, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 16, 'NT': False, 'same': True, 'congruent': 1}}
{'38': 21829}
38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38
*/
| 37.048485
| 2,999
| 0.660232
|
05de58864601257f3b07769cd6a830eeef245d25
| 535
|
asm
|
Assembly
|
programs/oeis/248/A248333.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/248/A248333.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/248/A248333.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
; A248333: Number of unit squares enclosed by n lattice points in and along the first quadrant of the coordinate plane starting from (0,0) and moving along each square gnomon starting on the y-axis and ending on the x-axis.
; 0,0,0,0,1,1,2,2,3,4,4,5,6,6,7,8,9,9,10,11,12,12,13,14,15,16,16,17,18,19,20,20,21,22,23,24,25,25,26,27,28,29,30,30,31,32,33,34,35,36,36,37,38,39,40,41,42,42,43,44,45,46,47,48,49,49,50,51,52,53,54,55,56,56,57,58,59
mov $1,$0
mul $0,2
sub $0,1
mul $0,2
lpb $0,1
sub $0,1
trn $1,1
add $2,2
trn $0,$2
lpe
| 38.214286
| 223
| 0.674766
|
bf2a5229a19a85e6b768d18035deba6ff4f90c77
| 809
|
asm
|
Assembly
|
oeis/142/A142940.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/142/A142940.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/142/A142940.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A142940: Primes congruent to 35 mod 64.
; Submitted by Jon Maiga
; 163,227,419,547,739,1123,1187,1571,1699,2083,2339,2467,2531,2659,2851,3299,3491,4003,4259,4451,4643,5347,5923,5987,6563,6691,6883,6947,7331,7459,7523,7907,8291,8419,8803,8867,9059,9187,10211,10531,10723,10979,11171,11299,11491,11939,12323,12451,12899,13219,13411,13859,14051,14243,14563,14627,14947,15139,15331,15907,15971,16547,16931,17123,17443,17827,17891,18211,18787,18979,19427,20323,20707,20771,20899,20963,21283,21347,21859,22051,22307,22691,23011,23203,23459,23971,24419,24547,24611,25763
mov $2,$0
add $2,2
pow $2,2
lpb $2
add $1,34
mov $3,$1
seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0.
sub $0,$3
add $1,30
mov $4,$0
max $4,0
cmp $4,$0
mul $2,$4
sub $2,1
lpe
mov $0,$1
add $0,35
| 36.772727
| 498
| 0.731768
|
d64dc5b7d950eda85092f1db42a476fbb3ed3454
| 4,099
|
asm
|
Assembly
|
Transynther/x86/_processed/NONE/_zr_/i3-7100_9_0x84_notsx.log_319_2768.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 9
|
2020-08-13T19:41:58.000Z
|
2022-03-30T12:22:51.000Z
|
Transynther/x86/_processed/NONE/_zr_/i3-7100_9_0x84_notsx.log_319_2768.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 1
|
2021-04-29T06:29:35.000Z
|
2021-05-13T21:02:30.000Z
|
Transynther/x86/_processed/NONE/_zr_/i3-7100_9_0x84_notsx.log_319_2768.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 3
|
2020-07-14T17:07:07.000Z
|
2022-03-21T01:12:22.000Z
|
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r12
push %r13
push %r8
push %r9
push %rbx
push %rcx
lea addresses_D_ht+0x4dc1, %r9
nop
nop
nop
nop
add %rcx, %rcx
vmovups (%r9), %ymm0
vextracti128 $1, %ymm0, %xmm0
vpextrq $1, %xmm0, %r8
nop
and $23660, %r12
lea addresses_normal_ht+0xa675, %r8
nop
nop
nop
nop
nop
and %rbx, %rbx
vmovups (%r8), %ymm0
vextracti128 $1, %ymm0, %xmm0
vpextrq $1, %xmm0, %r13
nop
nop
nop
nop
cmp %r9, %r9
lea addresses_A_ht+0x185f1, %r9
nop
nop
sub $35139, %r13
movb $0x61, (%r9)
nop
nop
nop
inc %rbx
lea addresses_WT_ht+0x19a89, %r13
nop
xor $3470, %rcx
movb $0x61, (%r13)
nop
nop
add %rbx, %rbx
lea addresses_UC_ht+0x16e49, %r9
nop
nop
nop
nop
nop
sub %r10, %r10
mov (%r9), %r12d
nop
nop
nop
nop
nop
sub %r9, %r9
lea addresses_WT_ht+0xc10d, %r8
nop
nop
nop
nop
nop
dec %rbx
vmovups (%r8), %ymm7
vextracti128 $1, %ymm7, %xmm7
vpextrq $0, %xmm7, %r10
nop
nop
nop
nop
cmp %r10, %r10
lea addresses_A_ht+0x1b049, %r10
nop
nop
nop
nop
nop
xor %r9, %r9
mov $0x6162636465666768, %r8
movq %r8, %xmm0
vmovups %ymm0, (%r10)
and %r9, %r9
pop %rcx
pop %rbx
pop %r9
pop %r8
pop %r13
pop %r12
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r8
push %r9
push %rax
push %rbp
push %rdx
push %rsi
// Load
lea addresses_normal+0x14989, %r8
nop
nop
nop
nop
xor $22937, %r9
mov (%r8), %edx
nop
nop
inc %r8
// Store
mov $0x2fa7710000000f69, %rdx
nop
nop
and $17694, %rax
movl $0x51525354, (%rdx)
nop
nop
sub $8986, %rax
// Faulty Load
lea addresses_A+0x1ca89, %rbp
nop
nop
nop
nop
nop
sub %r10, %r10
movb (%rbp), %r8b
lea oracles, %rax
and $0xff, %r8
shlq $12, %r8
mov (%rax,%r8,1), %r8
pop %rsi
pop %rdx
pop %rbp
pop %rax
pop %r9
pop %r8
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_A', 'same': True, 'size': 32, 'congruent': 0, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_normal', 'same': False, 'size': 4, 'congruent': 8, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_NC', 'same': False, 'size': 4, 'congruent': 5, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
[Faulty Load]
{'src': {'type': 'addresses_A', 'same': True, 'size': 1, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_D_ht', 'same': False, 'size': 32, 'congruent': 3, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_normal_ht', 'same': False, 'size': 32, 'congruent': 2, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_A_ht', 'same': False, 'size': 1, 'congruent': 3, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_WT_ht', 'same': False, 'size': 1, 'congruent': 10, 'NT': False, 'AVXalign': True}, 'OP': 'STOR'}
{'src': {'type': 'addresses_UC_ht', 'same': False, 'size': 4, 'congruent': 5, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WT_ht', 'same': False, 'size': 32, 'congruent': 1, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_A_ht', 'same': False, 'size': 32, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'00': 319}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
| 23.557471
| 956
| 0.647231
|
db8aedd6492c78f72e9a86130e5b0624a3b22cbf
| 4,515
|
asm
|
Assembly
|
Transynther/x86/_processed/NC/_zr_/i7-7700_9_0xca.log_21829_1190.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.log_21829_1190.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.log_21829_1190.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 %rdi
push %rdx
push %rsi
lea addresses_A_ht+0x979c, %rdx
clflush (%rdx)
nop
nop
cmp %rdi, %rdi
movw $0x6162, (%rdx)
nop
nop
nop
nop
nop
dec %rdi
pop %rsi
pop %rdx
pop %rdi
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r15
push %r8
push %r9
push %rax
push %rbp
push %rcx
// Store
lea addresses_D+0x168e3, %rbp
clflush (%rbp)
nop
nop
nop
nop
nop
xor $8781, %r8
movb $0x51, (%rbp)
nop
nop
nop
nop
and $22213, %r15
// Store
lea addresses_WT+0x110ec, %rbp
sub $7403, %rcx
movl $0x51525354, (%rbp)
cmp %r15, %r15
// Faulty Load
mov $0x1b62f20000000aec, %r9
nop
nop
xor $32372, %rbp
movups (%r9), %xmm0
vpextrq $0, %xmm0, %rax
lea oracles, %r9
and $0xff, %rax
shlq $12, %rax
mov (%r9,%rax,1), %rax
pop %rcx
pop %rbp
pop %rax
pop %r9
pop %r8
pop %r15
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 4, 'NT': False, 'type': 'addresses_NC'}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_D'}}
{'OP': 'STOR', 'dst': {'congruent': 6, 'AVXalign': False, 'same': False, 'size': 4, 'NT': True, 'type': 'addresses_WT'}}
[Faulty Load]
{'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 16, 'NT': False, 'type': 'addresses_NC'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'congruent': 2, 'AVXalign': False, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_A_ht'}}
{'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
*/
| 51.306818
| 2,999
| 0.657807
|
0e3a4b436a632ea757b320b675a2830973f0a0fc
| 3,199
|
asm
|
Assembly
|
Drivers/HDD/rmATA.asm
|
jaredwhitney/os3
|
05e0cda4670da093cc720d0dccbfeb29e788fa0f
|
[
"MIT"
] | 5
|
2015-02-25T01:28:09.000Z
|
2021-05-22T09:03:04.000Z
|
Drivers/HDD/rmATA.asm
|
jaredwhitney/os3
|
05e0cda4670da093cc720d0dccbfeb29e788fa0f
|
[
"MIT"
] | 38
|
2015-02-10T18:37:11.000Z
|
2017-10-03T03:08:50.000Z
|
Drivers/HDD/rmATA.asm
|
jaredwhitney/os3
|
05e0cda4670da093cc720d0dccbfeb29e788fa0f
|
[
"MIT"
] | 2
|
2016-05-06T22:48:46.000Z
|
2017-01-12T19:28:49.000Z
|
rmATA.DMAread : ; HBA low = eax, HBA high = bx, length = edx, returns ecx = data buffer
push eax
push ebx
push edx
call rmATA.DMAread.storeVals
call rmATA.DMAread.getSectorCount
call rmATA.DMAread.allocateBuffer
call rmATA.DMAread.readData
mov ecx, [rmATA.DMAread.dataBuffer]
pop edx
pop ebx
pop eax
ret
rmATA.DMAread.HBA_low :
dd 0x0
rmATA.DMAread.HBA_high :
dd 0x0
rmATA.DMAread.byteCount :
dd 0x0
rmATA.DMAread.sectorCount :
dd 0x0
rmATA.DMAread.dataBuffer :
dd 0x0
rmATA.DMAreadToBuffer : ; HBA low = eax, HBA high = bx, length = edx
push eax
push ebx
push edx
call rmATA.DMAread.storeVals
call rmATA.DMAread.getSectorCount
call rmATA.DMAread.readData
mov ecx, [rmATA.DMAread.dataBuffer]
pop edx
pop ebx
pop eax
rmATA.DMAread.storeVals :
pusha
mov [rmATA.DMAread.HBA_low], eax
and ebx, 0xFFFF
mov [rmATA.DMAread.HBA_high], ebx
mov [rmATA.DMAread.byteCount], edx
popa
ret
rmATA.DMAread.getSectorCount :
pusha
mov eax, [rmATA.DMAread.byteCount]
mov ecx, 0x200
xor edx, edx
idiv ecx
add eax, 1
mov [rmATA.DMAread.sectorCount], eax
popa
ret
rmATA.DMAread.allocateBuffer :
pusha
mov eax, 0x8 ; really need to keep track of these somehow...
mov ebx, [rmATA.DMAread.sectorCount]
call Guppy.malloc
mov [rmATA.DMAread.dataBuffer], ebx
popa
ret
rmATA.DMAread.readData :
pusha
mov dword [os_RealMode_functionPointer], rmATA.DMAread.loadFunc
mov edx, [rmATA.DMAread.sectorCount]
mov ebx, [rmATA.DMAread.dataBuffer]
rmATA.DMAread.loop :
call os.hopToRealMode
mov eax, 0x7c00
mov ecx, 0x200
push edx
pusha
sadfasf :
mov edx, [eax]
mov [ebx], edx
sub ecx, 4
add eax, 4
add ebx, 4
cmp ecx, 0x0
jg sadfasf
popa
pop edx
add ebx, 0x200
mov ecx, [rmATA.DMAread.HBA_low]
add ecx, 1
cmp ecx, 0x0
jne rmATA.DMAread.noRollover
mov ecx, [rmATA.DMAread.HBA_high]
add ecx, 1
mov [rmATA.DMAread.HBA_high], ecx
mov ecx, 0x0
rmATA.DMAread.noRollover :
mov [rmATA.DMAread.HBA_low], ecx
sub edx, 1
cmp edx, 0
jg rmATA.DMAread.loop
popa
ret
rmATA.DMAwrite : ; HBA low = eax, HBA high = bx, length = edx, buffer = ecx
pusha
call rmATA.DMAread.storeVals
call rmATA.DMAread.getSectorCount
call rmATA.DMAwrite.writeData
popa
ret
rmATA.DMAwrite.writeData : ; UNTESTED
pusha
mov dword [os_RealMode_functionPointer], rmATA.DMAwrite.writeFunc
mov edx, [rmATA.DMAread.sectorCount]
mov eax, [rmATA.DMAread.dataBuffer]
rmATA.DMAwrite.loop :
mov ebx, 0x7c00
mov ecx, 0x200
push edx
mov edx, 1
call Image.copyLinear
pop edx
call os.hopToRealMode
add eax, 0x200
mov ecx, [rmATA.DMAread.HBA_low]
add ecx, 1
cmp ecx, 0x0
jne rmATA.DMAwrite.noRollover
mov ecx, [rmATA.DMAread.HBA_high]
add ecx, 1
mov [rmATA.DMAread.HBA_high], ecx
mov ecx, 0x0
rmATA.DMAwrite.noRollover :
mov [rmATA.DMAread.HBA_low], ecx
sub edx, 1
cmp edx, 0
jg rmATA.DMAwrite.loop
popa
ret
[bits 16]
rmATA.DMAread.loadFunc :
mov eax, [rmATA.DMAread.HBA_low]
mov bx, [rmATA.DMAread.HBA_high]
call realMode.ATAload
ret
rmATA.DMAwrite.writeFunc :
mov eax, [rmATA.DMAread.HBA_low]
mov bx, [rmATA.DMAread.HBA_high]
call realMode.ATAwrite
ret
[bits 32]
| 21.469799
| 87
| 0.718975
|
e8946b80e9d8731dd0ced2234783e815a0ca5e83
| 350
|
asm
|
Assembly
|
oeis/040/A040378.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/040/A040378.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/040/A040378.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A040378: Continued fraction for sqrt(398).
; Submitted by Jamie Morken(s3)
; 19,1,18,1,38,1,18,1,38,1,18,1,38,1,18,1,38,1,18,1,38,1,18,1,38,1,18,1,38,1,18,1,38,1,18,1,38,1,18,1,38,1,18,1,38,1,18,1,38,1,18,1,38,1,18,1,38,1,18,1,38,1,18,1,38,1,18,1,38,1,18,1,38,1,18
gcd $0,262156
mul $0,42
mod $0,13
mov $1,$0
div $1,5
mul $1,14
add $0,$1
sub $0,2
| 26.923077
| 189
| 0.625714
|
d9833bc96ae06e8b1cdb250f690613c180567ffb
| 611
|
asm
|
Assembly
|
programs/oeis/231/A231669.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/231/A231669.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/231/A231669.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
; A231669: a(n) = Sum_{i=0..n} digsum_5(i)^2, where digsum_5(i) = A053824(i).
; 0,1,5,14,30,31,35,44,60,85,89,98,114,139,175,184,200,225,261,310,326,351,387,436,500,501,505,514,530,555,559,568,584,609,645,654,670,695,731,780,796,821,857,906,970,995,1031,1080,1144,1225,1229,1238,1254,1279,1315,1324,1340,1365,1401,1450,1466,1491,1527,1576,1640,1665,1701,1750,1814,1895,1931,1980
mov $9,$0
add $9,1
lpb $9,1
clr $0,7
sub $9,1
sub $0,$9
mul $0,2
lpb $0,1
mov $2,$0
div $0,10
mul $0,2
mod $2,10
add $3,$2
lpe
mov $5,$3
pow $5,2
mov $1,$5
div $1,4
add $8,$1
lpe
mov $1,$8
| 24.44
| 300
| 0.618658
|
975c71fb7f6d9bec06ad14e8585986fb636a9a04
| 2,526
|
asm
|
Assembly
|
libsrc/stdio/ansi/bee/f_ansi_attr.asm
|
grancier/z180
|
e83f35e36c9b4d1457e40585019430e901c86ed9
|
[
"ClArtistic"
] | null | null | null |
libsrc/stdio/ansi/bee/f_ansi_attr.asm
|
grancier/z180
|
e83f35e36c9b4d1457e40585019430e901c86ed9
|
[
"ClArtistic"
] | null | null | null |
libsrc/stdio/ansi/bee/f_ansi_attr.asm
|
grancier/z180
|
e83f35e36c9b4d1457e40585019430e901c86ed9
|
[
"ClArtistic"
] | 1
|
2019-12-03T23:57:48.000Z
|
2019-12-03T23:57:48.000Z
|
;
; ANSI Video handling for the MicroBEE
;
; Text Attributes
; m - Set Graphic Rendition
;
; The most difficult thing to port:
; Be careful here...
;
; Stefano Bodrato - 20161
;
;
; $Id: f_ansi_attr.asm,v 1.2 2016/11/17 09:39:03 stefano Exp $
;
SECTION code_clib
PUBLIC ansi_attr
PUBLIC bee_attr
PUBLIC INVRS
.ansi_attr
and a
jr nz,noreset
ld a,15
jr setbk
.noreset
cp 1
jr nz,nobold
ld a,(bee_attr)
or @01000000
jr setbk
.nobold
cp 2
jr z,dim
cp 8
jr nz,nodim
.dim
ld a,(bee_attr)
and @10111111
jr setbk
.nodim
cp 4
jr nz,nounderline
ld a,(bee_attr)
or @01001000
ret
.nounderline
cp 24
jr nz,noCunderline
ld a,(bee_attr)
and @10110111
ret
.noCunderline
cp 5
jr nz,noblink
ld a,(bee_attr)
or @11000000
jr setbk
.noblink
cp 25
jr nz,nocblink
ld a,(bee_attr)
and @00111111
jr setbk
.nocblink
cp 7
jr nz,noreverse
ld a,128
ld (INVRS),a
ret
.noreverse
cp 27
jr nz,noCreverse
xor a
ld (INVRS),a
ret
.noCreverse
cp 8
jr nz,noinvis
ld a,(bee_attr)
ld (oldattr),a
and @00001111
ld e,a
rla
rla
rla
rla
and @11110000
or e
.setbk
ld (bee_attr),a
ret
.noinvis
cp 28
jr nz,nocinvis
ld a,(oldattr)
jr setbk
.nocinvis
cp 30
jp m,nofore
cp 37+1
jp p,nofore
sub 30
and 15
.ZFR
;''''''''''''''''''''''
ld e,a
ld a,(bee_attr)
and @11110000
or e
jr setbk
.nofore
cp 40
jp m,noback
cp 47+1
jp p,noback
sub 40
and 15
.ZBK
;''''''''''''''''''''''
rla
rla
rla
rla
ld e,a
ld a,(bee_attr)
and @00001111
or e
jr setbk
.noback
ret
SECTION bss_clib
.bee_attr
defb 15
.oldattr
defb 0
.INVRS
defb 0
| 17.42069
| 62
| 0.412114
|
8734f6dd368caf22f3790781719ce2797e6bbe46
| 10,547
|
asm
|
Assembly
|
Driver/IFS/DOS/Common/dosConvertEUC.asm
|
steakknife/pcgeos
|
95edd7fad36df400aba9bab1d56e154fc126044a
|
[
"Apache-2.0"
] | 504
|
2018-11-18T03:35:53.000Z
|
2022-03-29T01:02:51.000Z
|
Driver/IFS/DOS/Common/dosConvertEUC.asm
|
steakknife/pcgeos
|
95edd7fad36df400aba9bab1d56e154fc126044a
|
[
"Apache-2.0"
] | 96
|
2018-11-19T21:06:50.000Z
|
2022-03-06T10:26:48.000Z
|
Driver/IFS/DOS/Common/dosConvertEUC.asm
|
steakknife/pcgeos
|
95edd7fad36df400aba9bab1d56e154fc126044a
|
[
"Apache-2.0"
] | 73
|
2018-11-19T20:46:53.000Z
|
2022-03-29T00:59:26.000Z
|
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) GeoWorks 1994 -- All Rights Reserved
PROJECT: PC GEOS
MODULE:
FILE: dosConvertEUC.asm
AUTHOR: Greg Grisco, May 10, 1994
ROUTINES:
Name Description
---- -----------
REVISION HISTORY:
Name Date Description
---- ---- -----------
grisco 05/10/94 Initial revision
DESCRIPTION:
Code for EUC support.
EUC Code Set 4 is not currently supported.
$Id: dosConvertEUC.asm,v 1.1 97/04/10 11:55:11 newdeal Exp $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
Resident segment resource
DosEUCToGeosChar proc near
call DosEUCToGeosCharFar
ret
DosEUCToGeosChar endp
GeosToDosEUCChar proc near
call GeosToDosEUCCharFar
ret
GeosToDosEUCChar endp
DosEUCToGeosCharString proc near
call DosEUCToGeosCharStringFar
ret
DosEUCToGeosCharString endp
GeosToDosEUCCharString proc near
call GeosToDosEUCCharStringFar
ret
GeosToDosEUCCharString endp
Resident ends
ConvertRare segment resource
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ConvEUCToJIS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Convert a EUC char to a JIS char
CALLED BY: DosEUCToGeosCharFar
PASS: ax - EUC character
RETURN: carry set on error
ah - 0
al - DTGSS_INVALID_CHARACTER
else
ax - JIS character
DESTROYED: nothing
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
simply subtract 0x80 from both bytes.
This means un-setting the high bits of both bytes.
REVISION HISTORY:
Name Date Description
---- ---- -----------
grisco 05/10/94 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
ConvEUCToJIS proc near
;
; test the high byte first
;
test ah, HIGH_BIT_MASK ;high bit must be set
jz notEUCChar
;
; convert the high byte
;
and ah, not HIGH_BIT_MASK ;clear high bit & carry
test al, HIGH_BIT_MASK ;high bit must be set
jz notEUCChar
;
; convert the low byte
;
and al, not HIGH_BIT_MASK ;clear high bit & carry
done:
ret
notEUCChar:
mov ax, DTGSS_INVALID_CHARACTER or (0 shl 8)
stc
jmp done
ConvEUCToJIS endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ConvJISToEUC
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Convert a JIS char to a EUC char
CALLED BY: GeosToDosEUCCharFar, GeosToDosEUCCharStringFar
PASS: ax - JIS character
RETURN: carry set on error
ah - 0
al - DTGSS_INVALID_CHARACTER
else
ax - EUC character
DESTROYED: nothing
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
simply add 0x80 to both bytes.
This means setting the high bits of both bytes.
REVISION HISTORY:
Name Date Description
---- ---- -----------
grisco 05/10/94 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
ConvJISToEUC proc near
;
;test high byte first
;
test ah, HIGH_BIT_MASK ;high bit must be clear
jnz notJISChar
;
; convert the high byte
;
or ah, HIGH_BIT_MASK ;set high bit & clear carry
test al, HIGH_BIT_MASK ;high bit must be clear
jnz notJISChar
;
; convert the low byte
;
or al, HIGH_BIT_MASK ;set high bit & clear carry
done:
ret
notJISChar:
mov ax, DTGSS_INVALID_CHARACTER or (0 shl 8)
stc ;error -- not a JIS char
jmp done
ConvJISToEUC endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DosEUCToGeosCharFar
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Convert a EUC character to a GEOS character
CALLED BY: DCSConvertToDOSChar()
PASS: bx - DosCodePage to use
ax - EUC character
RETURN: carry - set if error
ah - 0
al - DTGSS_SUBSTITUTIONS or
al - DTGSS_INVALID_CHARACTER
else:
ax - GEOS character
DESTROYED: none
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
grisco 05/10/94 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
DosEUCToGeosCharFar proc far
.enter
;
; If Half-width Katakana, then JIS is same as EUC value
;
tst ah ;is double byte?
jnz notHalfWidthKatakanaOrAscii
cmp al, EUC_CODE_SET_2_END
jbe halfWidthKatakanaOrAscii
notHalfWidthKatakanaOrAscii:
;
; Convert the EUC character to JIS
;
call ConvEUCToJIS
jc done
halfWidthKatakanaOrAscii:
;
; Convert the JIS character to SJIS
;
call ConvJISToSJIS
jc done
;
; Convert the SJIS character to GEOS
;
call DosSJISToGeosCharFar
done:
.leave
ret
DosEUCToGeosCharFar endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GeosToDosEUCCharFar
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Convert a GEOS character to an EUC character.
CALLED BY: DCSConvertToGEOSChar()
PASS: bx - DosCodePage to use
ax - GEOS character
RETURN: carry - set if error
ah - 0
al - DTGSS_SUBSTITUTIONS
else:
ax - EUC character
DESTROYED: none
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
grisco 05/10/94 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GeosToDosEUCCharFar proc far
.enter
;
; Convert the GEOS character to SJIS
;
call GeosToDosSJISCharFar
jc done
;
; Convert the SJIS character to JIS
;
call ConvSJISToJIS
jc done
;
; Convert the JIS character to EUC
;
tst ah ;is Ascii or HW-Katakana?
jz done
call ConvJISToEUC
done:
.leave
ret
GeosToDosEUCCharFar endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DosEUCToGeosCharStringFar
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Convert a EUC character in a string to a GEOS character
CALLED BY: DCSConvertToGEOSChar()
PASS: bx - DosCodePage to use
ds:si - ptr to EUC string
es:di - ptr to GEOS buffer
cx - max # of bytes to read
RETURN: carry - set if error
ah - 0
al - DTGSS_INVALID_CHARACTER
ah - # of bytes to back up
al - DTGSS_CHARACTER_INCOMPLETE
else:
ax - GEOS character
ds:si - ptr to next character
es:di - ptr to next character
cx - updated if >1 byte read
DESTROYED: none
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
grisco 05/10/94 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
DosEUCToGeosCharStringFar proc far
.enter
;
; Get a byte and see which code set it lies in
;
lodsb ;al <- byte of EUC string
cmp al, EUC_SS2_CHAR ;single shift char?
je doHalfWidthKatakana ;in CODE SET 2
cmp al, EUC_CODE_SET_0_START
jb illegalChar ;out of range
cmp al, EUC_CODE_SET_0_END
jbe doAsciiJISRoman ;in CODE SET 0
cmp al, EUC_CODE_SET_1_START
jb illegalChar ;out of range
cmp al, EUC_CODE_SET_1_END
ja illegalChar
; in CODE SET 1 -- JIS
; We have first of two bytes, read the second then convert.
doJISChar:
call readDBCSByte2
jz partialChar
; We have both bytes. Do the conversion and check for error.
call DosEUCToGeosCharFar
jc exit
storeChar:
stosw
exit:
.leave
ret
;
; Read first byte of a two byte character, but rest
; is not there to read.
;
partialChar:
mov ax, DTGSS_CHARACTER_INCOMPLETE or (1 shl 8)
stc ;carry <- error
jmp exit ;couldn't convert
; We have read the Single Shift char. Read next byte into al,
; clear high byte, then convert.
doHalfWidthKatakana:
clr al ;will be xchnged to ah
jmp doJISChar ;store it/no convert
doAsciiJISRoman:
clr ah
jmp storeChar
readDBCSByte2:
dec cx ;cx <- read one more byte
jz isPartialChar ;branch if no more bytes
xchg al, ah
lodsb ;ax <- JIS character
isPartialChar:
retn
illegalChar:
stc
mov ax, DTGSS_INVALID_CHARACTER or (0 shl 8)
jmp exit
DosEUCToGeosCharStringFar endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GeosToDosEUCCharStringFar
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Convert a GEOS character in a string to a EUC character
CALLED BY: DCSConvertToGEOSChar()
PASS: bx - DosCodePage to use
ds:si - ptr to GEOS string
es:di - ptr to EUC buffer
cx - max # of chars to read
RETURN: carry - set if error
ah - 0
al - DTGSS_SUBSTITUTIONS
else:
ax - EUC character
ds:si - ptr to next character
es:di - ptr to next character
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
grisco 05/10/94 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GeosToDosEUCCharStringFar proc far
uses bx
.enter
;
; Get a GEOS character and convert to JIS
;
lodsw ;ax <- GEOS character
call GeosToDosJISCharFar
jc exit ;branch if error
;
; Check for ASCII / SBCS
;
tst ah ;SBCS or DBCS?
jz isSBCS ;branch if SBCS
;
; DBCS char -- convert to EUC then store
;
call ConvJISToEUC
jc exit
xchg al, ah ;store high-low
stosw ;store DBCS character
done:
clc ;carry <- no error
exit:
.leave
ret
isSBCS:
;
; SB -- ASCII or Half-width Katakana char
;
cmp al, EUC_CODE_SET_0_START
jb illegalChar
cmp al, EUC_CODE_SET_0_END
jbe storeSBCSChar ;is Ascii/JIS Roman?
cmp al, EUC_CODE_SET_2_START
jb illegalChar
cmp al, EUC_CODE_SET_2_END
ja illegalChar
;
; Half-width Katakana character. Store Single Shift char + byte
;
mov bx, EUC_SS2_CHAR ;Single Shift 2
call writeSingleShift
storeSBCSChar:
stosb ;store SBCS character
jmp done
writeSingleShift:
push ax ;save current char
mov_tr al, bl ;al <- single shift char
stosb
pop ax ;ax <- current char
retn
illegalChar:
mov ax, DTGSS_SUBSTITUTIONS or (0 shl 8)
stc
jmp exit
GeosToDosEUCCharStringFar endp
ConvertRare ends
| 20.680392
| 79
| 0.581777
|
35322ac673a390dfdfaefdc20de4970bfbfa86c6
| 577
|
asm
|
Assembly
|
system/book_csapp/absdiff.asm
|
larryjiang/cs_study
|
cf11576efe90282bd38ff00a789ec950de8a66a4
|
[
"MIT"
] | null | null | null |
system/book_csapp/absdiff.asm
|
larryjiang/cs_study
|
cf11576efe90282bd38ff00a789ec950de8a66a4
|
[
"MIT"
] | null | null | null |
system/book_csapp/absdiff.asm
|
larryjiang/cs_study
|
cf11576efe90282bd38ff00a789ec950de8a66a4
|
[
"MIT"
] | null | null | null |
.file "absdiff.c"
.text
.globl absdiff
.type absdiff, @function
absdiff:
.LFB0:
.cfi_startproc
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
movq %rsp, %rbp
.cfi_def_cfa_register 6
movl %edi, -4(%rbp)
movl %esi, -8(%rbp)
movl -4(%rbp), %eax
cmpl -8(%rbp), %eax
jge .L2
movl -8(%rbp), %eax
subl -4(%rbp), %eax
jmp .L3
.L2:
movl -4(%rbp), %eax
subl -8(%rbp), %eax
.L3:
popq %rbp
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE0:
.size absdiff, .-absdiff
.ident "GCC: (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609"
.section .note.GNU-stack,"",@progbits
| 17.484848
| 61
| 0.639515
|
e616908c3af994117a1c5285a4324ee8b5b009fd
| 643
|
asm
|
Assembly
|
libsrc/_DEVELOPMENT/arch/sms/SMSlib/z80/asm_SMSlib_zeroSpritePalette.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 640
|
2017-01-14T23:33:45.000Z
|
2022-03-30T11:28:42.000Z
|
libsrc/_DEVELOPMENT/arch/sms/SMSlib/z80/asm_SMSlib_zeroSpritePalette.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 1,600
|
2017-01-15T16:12:02.000Z
|
2022-03-31T12:11:12.000Z
|
libsrc/_DEVELOPMENT/arch/sms/SMSlib/z80/asm_SMSlib_zeroSpritePalette.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 215
|
2017-01-17T10:43:03.000Z
|
2022-03-23T17:25:02.000Z
|
; **************************************************
; SMSlib - C programming library for the SMS/GG
; ( part of devkitSMS - github.com/sverx/devkitSMS )
; **************************************************
INCLUDE "SMSlib_private.inc"
SECTION code_clib
SECTION code_SMSlib
PUBLIC asm_SMSlib_zeroSpritePalette
asm_SMSlib_zeroSpritePalette:
; void SMS_zeroSpritePalette (void)
;
; uses : af, b
di
ld a,+(SMS_CRAMAddress+0x10)&0xff
out (VDPControlPort),a
ld a,+(SMS_CRAMAddress+0x10)/256
out (VDPControlPort),a
ei
xor a
ld b,16
loop:
out (VDPDataPort),a
nop
djnz loop
ret
| 16.487179
| 52
| 0.564541
|
e8ada2af6bd578f669cefe9cfc529f34b963df89
| 5,694
|
asm
|
Assembly
|
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_21829_472.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_472.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_472.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 %r8
push %r9
push %rax
push %rbp
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_A_ht+0x9da1, %rbp
nop
nop
nop
sub %rbx, %rbx
mov $0x6162636465666768, %r9
movq %r9, %xmm5
movups %xmm5, (%rbp)
nop
nop
sub %rax, %rax
lea addresses_WC_ht+0x11ea1, %r8
nop
nop
nop
nop
xor %rbp, %rbp
mov (%r8), %r14w
nop
nop
nop
dec %rbx
lea addresses_D_ht+0x1dc81, %rax
nop
nop
xor $5277, %r11
movl $0x61626364, (%rax)
nop
and %rbx, %rbx
lea addresses_WC_ht+0xdbe1, %rsi
lea addresses_UC_ht+0xd9a1, %rdi
dec %r9
mov $96, %rcx
rep movsb
nop
nop
nop
nop
nop
dec %rcx
lea addresses_WC_ht+0xd3b9, %rsi
nop
nop
nop
inc %r14
mov $0x6162636465666768, %r11
movq %r11, (%rsi)
nop
nop
add $42139, %r8
lea addresses_WC_ht+0x16aa1, %rsi
lea addresses_UC_ht+0x13da1, %rdi
nop
nop
inc %r14
mov $4, %rcx
rep movsb
nop
nop
inc %rsi
lea addresses_WC_ht+0x13304, %rsi
lea addresses_WC_ht+0x15fa1, %rdi
nop
nop
and $33813, %r9
mov $118, %rcx
rep movsb
nop
nop
nop
and $27206, %rcx
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %rax
pop %r9
pop %r8
pop %r14
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r12
push %rbx
push %rcx
push %rdx
// Faulty Load
lea addresses_PSE+0x9da1, %rdx
nop
nop
nop
nop
and $23816, %r12
movb (%rdx), %bl
lea oracles, %r10
and $0xff, %rbx
shlq $12, %rbx
mov (%r10,%rbx,1), %rbx
pop %rdx
pop %rcx
pop %rbx
pop %r12
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_PSE', 'same': False, 'size': 16, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'type': 'addresses_PSE', 'same': True, 'size': 1, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'dst': {'type': 'addresses_A_ht', 'same': False, 'size': 16, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_WC_ht', 'same': True, 'size': 2, 'congruent': 8, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_D_ht', 'same': False, 'size': 4, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_WC_ht', 'congruent': 6, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 10, 'same': False}, 'OP': 'REPM'}
{'dst': {'type': 'addresses_WC_ht', 'same': False, 'size': 8, 'congruent': 3, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_WC_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 11, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_WC_ht', 'congruent': 0, 'same': True}, 'dst': {'type': 'addresses_WC_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
*/
| 40.671429
| 2,999
| 0.661574
|
8dc7c6514dab39e6a6aec2896e01de69c539b74e
| 649
|
asm
|
Assembly
|
cards/bn6/ModCards/137-A006 MetFire.asm
|
RockmanEXEZone/MMBN-Mod-Card-Kit
|
d591ddca5566dbb323dc19c11e69410fa4073d1b
|
[
"Unlicense"
] | 10
|
2017-12-05T14:25:38.000Z
|
2022-02-21T04:28:00.000Z
|
cards/bn6/ModCards/137-A006 MetFire.asm
|
RockmanEXEZone/MMBN-Mod-Card-Kit
|
d591ddca5566dbb323dc19c11e69410fa4073d1b
|
[
"Unlicense"
] | null | null | null |
cards/bn6/ModCards/137-A006 MetFire.asm
|
RockmanEXEZone/MMBN-Mod-Card-Kit
|
d591ddca5566dbb323dc19c11e69410fa4073d1b
|
[
"Unlicense"
] | null | null | null |
.include "defaults_mod.asm"
table_file_jp equ "exe6-utf8.tbl"
table_file_en equ "bn6-utf8.tbl"
game_code_len equ 3
game_code equ 0x4252354A // BR5J
game_code_2 equ 0x42523545 // BR5E
game_code_3 equ 0x42523550 // BR5P
card_type equ 1
card_id equ 6
card_no equ "006"
card_sub equ "Mod Card 006"
card_sub_x equ 64
card_desc_len equ 2
card_desc_1 equ "MetFire"
card_desc_2 equ "20MB"
card_desc_3 equ ""
card_name_jp_full equ "メテファイア"
card_name_jp_game equ "メテファイア"
card_name_en_full equ "MetFire"
card_name_en_game equ "MetFire"
card_address equ ""
card_address_id equ 0
card_bug equ 0
card_wrote_en equ ""
card_wrote_jp equ ""
| 24.037037
| 35
| 0.771957
|
4a154d8a716dacfbf10f04bbccf539455da07094
| 1,545
|
asm
|
Assembly
|
latest/boot/boot_sect.asm
|
soumitradev/assembly-fun
|
3ab433e96ea1f6ea21121013800455a4fa999021
|
[
"MIT"
] | 2
|
2020-08-09T06:17:13.000Z
|
2021-03-06T11:18:38.000Z
|
latest/boot/boot_sect.asm
|
soumitradev/assembly-fun
|
3ab433e96ea1f6ea21121013800455a4fa999021
|
[
"MIT"
] | null | null | null |
latest/boot/boot_sect.asm
|
soumitradev/assembly-fun
|
3ab433e96ea1f6ea21121013800455a4fa999021
|
[
"MIT"
] | null | null | null |
; Let us now switch to 32 bit protected mode
[org 0x7c00]
; Place where we load kernel from
KERNEL_OFFSET equ 0x1000
mov [BOOT_DRIVE], dl
; Set stack
mov bp, 0x9000
mov sp, bp
; Print the 16 bit mode declaration
mov bx, MSG_REAL_MODE
call print_str
call print_nl
; Load kernel
call load_kernel
; Switch to 32 bit and never return 😢
call switch_to_pm
; Hang. If we don't switch to PM, better not run random code.
jmp $
; Include all our previous epic code
; We don't include "print_str.asm" because print_hex.asm already imports it for its implementation
%include "print_hex.asm"
%include "disk_load.asm"
%include "gdt.asm"
%include "print_str_32.asm"
%include "switch_to_pm.asm"
[bits 16]
; Load the kernel into memory
load_kernel:
; Print message saying you're loading kernel
mov bx, MSG_LOAD_KERNEL
call print_str
call print_nl
; Load 15 sectors (why not)
mov bx, KERNEL_OFFSET
mov dh, 15
mov dl, [BOOT_DRIVE]
call disk_load
ret
; Now we are in 32 bit mode, so tell assembler to use 32 bit instructions from now on
[bits 32]
; Now we are in 32 bit protected mode 😎
begin_pm:
; Print a message using our print thing
mov ebx, MSG_PROT_MODE
call print_str_32
; Run the kernel 😎
call KERNEL_OFFSET
; Hang if kernel ever returns
jmp $
; Define text to print
BOOT_DRIVE db 0
MSG_REAL_MODE db "Started in 16-bit Real Mode", 0
MSG_PROT_MODE db "Successfully moved to 32-bit Protected Mode", 0
MSG_LOAD_KERNEL db "Loading kernel...", 0
; Padding
times 510-($-$$) db 0
; Magic number
dw 0xaa55
| 20.064935
| 98
| 0.734628
|
719c7d5073e45934aa3870816442cc1bd300c0cd
| 8,329
|
asm
|
Assembly
|
source/redbook/fp.asm
|
zellyn/goapple2
|
998569cee15e83ec7a37668ff57ba00258dad542
|
[
"MIT"
] | 9
|
2016-07-13T22:04:29.000Z
|
2021-10-12T01:06:24.000Z
|
source/redbook/fp.asm
|
zellyn/goapple2
|
998569cee15e83ec7a37668ff57ba00258dad542
|
[
"MIT"
] | null | null | null |
source/redbook/fp.asm
|
zellyn/goapple2
|
998569cee15e83ec7a37668ff57ba00258dad542
|
[
"MIT"
] | 3
|
2018-01-01T20:30:27.000Z
|
2020-04-06T19:12:41.000Z
|
***********************
* *
* APPLE-II FLOATING *
* POINT ROUTINES *
* *
* COPYRIGHT 1977 BY *
* APPLE COMPUTER INC. *
* *
* ALL RIGHTS RESERVED *
* *
* S. WOZNIAK *
* *
***********************
TITLE "FLOATING POINT ROUTINES"
SIGN EPZ $F3
X2 EPZ $F4
M2 EPZ $F5
X1 EPZ $F8
M1 EPZ $F9
E EPZ $FC
OVLOC EQU $3F5
ORG $F425
F425: 18 ADD CLC CLEAR CARRY
F426: A2 02 LDX #$2 INDEX FOR 3-BYTE ADD.
F428: B5 F9 ADD1 LDA M1,X
F42A: 75 F5 ADC M2,X ADD A BYTE OF MANT2 TO MANT1
F42C: 95 F9 STA M1,X
F42E: CA DEX INDEX TO NEXT MORE SIGNIF. BYTE.
F42F: 10 F7 BPL ADD1 LOOP UNTIL DONE.
F431: 60 RTS RETURN
F432: 06 F3 MD1 ASL SIGN CLEAR LSB OF SIGN.
F434: 20 37 F4 JSR ABSWAP ABS VAL OF M1, THEN SWAP WITH M2
F437: 24 F9 ABSWAP BIT M1 MANT1 NEGATIVE?
F439: 10 05 BPL ABSWAP1 NO, SWAP WITH MANT2 AND RETURN.
F43B: 20 A4 F4 JSR FCOMPL YES, COMPLEMENT IT.
F43E: E6 F3 INC SIGN INCR SIGN, COMPLEMENTING LSB.
F440: 38 ABSWAP1 SEC SET CARRY FOR RETURN TO MUL/DIV.
F441: A2 04 SWAP LDX #$4 INDEX FOR 4 BYTE SWAP.
F443: 94 FB SWAP1 STY E-1,X
F445: B5 F7 LDA X1-1,X SWAP A BYTE OF EXP/MANT1 WITH
F447: B4 F3 LDY X2-1,X EXP/MANT2 AND LEAVE A COPY OF
F449: 94 F7 STY X1-1,X MANT1 IN E (3 BYTES). E+3 USED
F44B: 95 F3 STA X2-1,X
F44D: CA DEX ADVANCE INDEX TO NEXT BYTE
F44E: D0 F3 BNE SWAP1 LOOP UNTIL DONE.
F450: 60 RTS RETURN
F451: A9 8E FLOAT LDA #$8E INIT EXP1 TO 14,
F453: 85 F8 STA X1 THEN NORMALIZE TO FLOAT.
F455: A5 F9 NORM1 LDA M1 HIGH-ORDER MANT1 BYTE.
F457: C9 C0 CMP #$C0 UPPER TWO BITS UNEQUAL?
F459: 30 0C BMI RTS1 YES, RETURN WITH MANT1 NORMALIZED
F45B: C6 F8 DEC X1 DECREMENT EXP1.
F45D: 06 FB ASL M1+2
F45F: 26 FA ROL M1+1 SHIFT MANT1 (3 BYTES) LEFT.
F461: 26 F9 ROL M1
F463: A5 F8 NORM LDA X1 EXP1 ZERO?
F465: D0 EE BNE NORM1 NO, CONTINUE NORMALIZING.
F467: 60 RTS1 RTS RETURN.
F468: 20 A4 F4 FSUB JSR FCOMPL CMPL MANT1,CLEARS CARRY UNLESS 0
F46B: 20 7B F4 SWPALGN JSR ALGNSWP RIGHT SHIFT MANT1 OR SWAP WITH
F46E: A5 F4 FADD LDA X2
F470: C5 F8 CMP X1 COMPARE EXP1 WITH EXP2.
F472: D0 F7 BNE SWPALGN IF #,SWAP ADDENDS OR ALIGN MANTS.
F474: 20 25 F4 JSR ADD ADD ALIGNED MANTISSAS.
F477: 50 EA ADDEND BVC NORM NO OVERFLOW, NORMALIZE RESULT.
F479: 70 05 BVS RTLOG OV: SHIFT M1 RIGHT, CARRY INTO SIGN
F47B: 90 C4 ALGNSWP BCC SWAP SWAP IF CARRY CLEAR,
* ELSE SHIFT RIGHT ARITH.
F47D: A5 F9 RTAR LDA M1 SIGN OF MANT1 INTO CARRY FOR
F47F: 0A ASL RIGHT ARITH SHIFT.
F480: E6 F8 RTLOG INC X1 INCR X1 TO ADJUST FOR RIGHT SHIFT
F482: F0 75 BEQ OVFL EXP1 OUT OF RANGE.
F484: A2 FA RTLOG1 LDX #$FA INDEX FOR 6:BYTE RIGHT SHIFT.
F486: 76 FF ROR1 ROR E+3,X
F488: E8 INX NEXT BYTE OF SHIFT.
F489: D0 FB BNE ROR1 LOOP UNTIL DONE.
F48B: 60 RTS RETURN.
F48C: 20 32 F4 FMUL JSR MD1 ABS VAL OF MANT1, MANT2
F48F: 65 F8 ADC X1 ADD EXP1 TO EXP2 FOR PRODUCT EXP
F491: 20 E2 F4 JSR MD2 CHECK PROD. EXP AND PREP. FOR MUL
F494: 18 CLC CLEAR CARRY FOR FIRST BIT.
F495: 20 84 F4 MUL1 JSR RTLOG1 M1 AND E RIGHT (PROD AND MPLIER)
F498: 90 03 BCC MUL2 IF CARRY CLEAR, SKIP PARTIAL PROD
F49A: 20 25 F4 JSR ADD ADD MULTIPLICAND TO PRODUCT.
F49D: 88 MUL2 DEY NEXT MUL ITERATION.
F49E: 10 F5 BPL MUL1 LOOP UNTIL DONE.
F4A0: 46 F3 MDEND LSR SIGN TEST SIGN LSB.
F4A2: 90 BF NORMX BCC NORM IF EVEN,NORMALIZE PROD,ELSE COMP
F4A4: 38 FCOMPL SEC SET CARRY FOR SUBTRACT.
F4A5: A2 03 LDX #$3 INDEX FOR 3 BYTE SUBTRACT.
F4A7: A9 00 COMPL1 LDA #$0 CLEAR A.
F4A9: F5 F8 SBC X1,X SUBTRACT BYTE OF EXP1.
F4AB: 95 F8 STA X1,X RESTORE IT.
F4AD: CA DEX NEXT MORE SIGNIFICANT BYTE.
F4AE: D0 F7 BNE COMPL1 LOOP UNTIL DONE.
F4B0: F0 C5 BEQ ADDEND NORMALIZE (OR SHIFT RT IF OVFL).
F4B2: 20 32 F4 FDIV JSR MD1 TAKE ABS VAL OF MANT1, MANT2.
F4B5: E5 F8 SBC X1 SUBTRACT EXP1 FROM EXP2.
F4B7: 20 E2 F4 JSR MD2 SAVE AS QUOTIENT EXP.
F4BA: 38 DIV1 SEC SET CARRY FOR SUBTRACT.
F4BB: A2 02 LDX #$2 INDEX FOR 3-BYTE SUBTRACTION.
F4BD: B5 F5 DIV2 LDA M2,X
F4BF: F5 FC SBC E,X SUBTRACT A BYTE OF E FROM MANT2.
F4C1: 48 PHA SAVE ON STACK.
F4C2: CA DEX NEXT MORE SIGNIFICANT BYTE.
F4C3: 10 F8 BPL DIV2 LOOP UNTIL DONE.
F4C5: A2 FD LDX #$FD INDEX FOR 3-BYTE CONDITIONAL MOVE
F4C7: 68 DIV3 PLA PULL BYTE OF DIFFERENCE OFF STACK
F4C8: 90 02 BCC DIV4 IF M2<E THEN DON'T RESTORE M2.
F4CA: 95 F8 STA M2+3,X
F4CC: E8 DIV4 INX NEXT LESS SIGNIFICANT BYTE.
F4CD: D0 F8 BNE DIV3 LOOP UNTIL DONE.
F4CF: 26 FB ROL M1+2
F4D1: 26 FA ROL M1+1 ROLL QUOTIENT LEFT, CARRY INTO LSB
F4D3: 26 F9 ROL M1
F4D5: 06 F7 ASL M2+2
F4D7: 26 F6 ROL M2+1 SHIFT DIVIDEND LEFT
F4D9: 26 F5 ROL M2
F4DB: B0 1C BCS OVFL OVFL IS DUE TO UNNORMED DIVISOR
F4DD: 88 DEY NEXT DIVIDE ITERATION.
F4DE: D0 DA BNE DIV1 LOOP UNTIL DONE 23 ITERATIONS.
F4E0: F0 BE BEQ MDEND NORM. QUOTIENT AND CORRECT SIGN.
F4E2: 86 FB MD2 STX M1+2
F4E4: 86 FA STX M1+1 CLEAR MANT1 (3 BYTES) FOR MUL/DIV.
F4E6: 86 F9 STX M1
F4E8: B0 0D BCS OVCHK IF CALC. SET CARRY,CHECK FOR OVFL
F4EA: 30 04 BMI MD3 IF NEG THEN NO UNDERFLOW.
F4EC: 68 PLA POP ONE RETURN LEVEL.
F4ED: 68 PLA
F4EE: 90 B2 BCC NORMX CLEAR X1 AND RETURN.
F4F0: 49 80 MD3 EOR #$80 COMPLEMENT SIGN BIT OF EXPONENT.
F4F2: 85 F8 STA X1 STORE IT.
F4F4: A0 17 LDY #$17 COUNT 24 MUL/23 DIV ITERATIONS.
F4F6: 60 RTS RETURN.
F4F7: 10 F7 OVCHK BPL MD3 IF POSITIVE EXP THEN NO OVFL.
F4F9: 4C F5 03 OVFL JMP OVLOC
ORG $F63D
F63D: 20 7D F4 FIX1 JSR RTAR
F640: A5 F8 FIX LDA X1
F642: 10 13 BPL UNDFL
F644: C9 8E CMP #$8E
F646: D0 F5 BNE FIX1
F648: 24 F9 BIT M1
F64A: 10 0A BPL FIXRTS
F64C: A5 FB LDA M1+2
F64E: F0 06 BEQ FIXRTS
F650: E6 FA INC M1+1
F652: D0 02 BNE FIXRTS
F654: E6 F9 INC M1
F656: 60 FIXRTS RTS
F657: A9 00 UNDFL LDA #$0
F659: 85 F9 STA M1
F65B: 85 FA STA M1+1
F65D: 60 RTS
| 53.735484
| 75
| 0.476168
|
f985691ab6307e7931a282093e2b0868eda08dab
| 753
|
asm
|
Assembly
|
oeis/196/A196382.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/196/A196382.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/196/A196382.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A196382: Number of sequences of n coin flips, that win on the last flip, if the sequence of flips ends with (1,1,0) or (1,0,1).
; Submitted by Jamie Morken(w4)
; 0,0,2,3,4,7,11,16,24,36,53,78,115,169,248,364,534,783,1148,1683,2467,3616,5300,7768,11385,16686,24455,35841,52528,76984,112826,165355,242340,355167,520523,762864,1118032,1638556,2401421,3519454,5158011,7559433,11078888,16236900,23796334,34875223,51112124,74908459,109783683,160895808,235804268,345587952,506483761,742288030,1087875983,1594359745,2336647776,3424523760,5018883506,7355531283,10780055044,15798938551,23154469835,33934524880,49733463432,72887933268,106822458149,156555921582
mov $3,1
lpb $0
sub $0,1
mov $4,1
add $4,$3
mov $3,$2
mov $2,$1
add $1,$4
lpe
mov $0,$2
| 50.2
| 489
| 0.774236
|
59c42b2b583e964ee1079b0765a247adc9bc1bf0
| 714
|
asm
|
Assembly
|
programs/oeis/070/A070455.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | 1
|
2021-03-15T11:38:20.000Z
|
2021-03-15T11:38:20.000Z
|
programs/oeis/070/A070455.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/070/A070455.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
; A070455: a(n) = n^2 mod 33.
; 0,1,4,9,16,25,3,16,31,15,1,22,12,4,31,27,25,25,27,31,4,12,22,1,15,31,16,3,25,16,9,4,1,0,1,4,9,16,25,3,16,31,15,1,22,12,4,31,27,25,25,27,31,4,12,22,1,15,31,16,3,25,16,9,4,1,0,1,4,9,16,25,3,16,31,15,1,22,12,4,31,27,25,25,27,31,4,12,22,1,15,31,16,3,25,16,9,4,1,0,1,4,9,16,25,3,16,31,15,1,22,12,4,31,27,25,25,27,31,4,12,22,1,15,31,16,3,25,16,9,4,1,0,1,4,9,16,25,3,16,31,15,1,22,12,4,31,27,25,25,27,31,4,12,22,1,15,31,16,3,25,16,9,4,1,0,1,4,9,16,25,3,16,31,15,1,22,12,4,31,27,25,25,27,31,4,12,22,1,15,31,16,3,25,16,9,4,1,0,1,4,9,16,25,3,16,31,15,1,22,12,4,31,27,25,25,27,31,4,12,22,1,15,31,16,3,25,16,9,4,1,0,1,4,9,16,25,3,16,31,15,1,22,12,4,31,27,25,25,27
pow $0,2
mod $0,33
mov $1,$0
| 102
| 653
| 0.607843
|
f1aa59be8e89158a3ea8a4bb0b787f176574b79a
| 8,263
|
asm
|
Assembly
|
Transynther/x86/_processed/AVXALIGN/_zr_/i9-9900K_12_0xa0_notsx.log_21829_1612.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 9
|
2020-08-13T19:41:58.000Z
|
2022-03-30T12:22:51.000Z
|
Transynther/x86/_processed/AVXALIGN/_zr_/i9-9900K_12_0xa0_notsx.log_21829_1612.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 1
|
2021-04-29T06:29:35.000Z
|
2021-05-13T21:02:30.000Z
|
Transynther/x86/_processed/AVXALIGN/_zr_/i9-9900K_12_0xa0_notsx.log_21829_1612.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 3
|
2020-07-14T17:07:07.000Z
|
2022-03-21T01:12:22.000Z
|
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r14
push %r15
push %r9
push %rax
push %rcx
push %rdi
push %rsi
lea addresses_WC_ht+0x1681e, %r9
nop
xor %r14, %r14
mov $0x6162636465666768, %r10
movq %r10, %xmm5
vmovups %ymm5, (%r9)
nop
nop
add %rsi, %rsi
lea addresses_normal_ht+0x6d0c, %rsi
lea addresses_WC_ht+0x6eb8, %rdi
nop
nop
nop
cmp %r9, %r9
mov $58, %rcx
rep movsl
nop
xor %r9, %r9
lea addresses_A_ht+0xe4a6, %rdi
nop
and $17351, %rcx
mov $0x6162636465666768, %r9
movq %r9, %xmm6
movups %xmm6, (%rdi)
nop
nop
nop
nop
nop
inc %rsi
lea addresses_WC_ht+0x13958, %r9
nop
nop
cmp $23852, %rax
and $0xffffffffffffffc0, %r9
vmovaps (%r9), %ymm5
vextracti128 $0, %ymm5, %xmm5
vpextrq $0, %xmm5, %rcx
nop
nop
nop
nop
nop
add %r9, %r9
lea addresses_WT_ht+0x1e50c, %rsi
lea addresses_UC_ht+0x270c, %rdi
nop
dec %r15
mov $26, %rcx
rep movsw
nop
nop
nop
nop
sub %r9, %r9
lea addresses_WC_ht+0x78f0, %r15
nop
xor %r10, %r10
movl $0x61626364, (%r15)
nop
dec %rcx
lea addresses_normal_ht+0xb7a4, %rcx
clflush (%rcx)
nop
xor $18548, %rdi
mov (%rcx), %r14w
and $37694, %rcx
lea addresses_WT_ht+0x114, %rax
nop
nop
nop
sub %r14, %r14
movl $0x61626364, (%rax)
nop
add %r15, %r15
lea addresses_UC_ht+0x1205a, %rsi
lea addresses_UC_ht+0xb30c, %rdi
nop
nop
nop
sub %r10, %r10
mov $4, %rcx
rep movsw
nop
nop
nop
add $64240, %r15
lea addresses_normal_ht+0x1590c, %rdi
nop
nop
nop
nop
dec %rcx
movw $0x6162, (%rdi)
nop
nop
nop
nop
inc %r15
lea addresses_D_ht+0xa50c, %r15
nop
nop
nop
nop
sub $5169, %rsi
movb $0x61, (%r15)
nop
nop
nop
nop
xor $39892, %rcx
lea addresses_normal_ht+0x1de8c, %rdi
nop
nop
nop
nop
add $17810, %r14
mov $0x6162636465666768, %r10
movq %r10, %xmm0
movups %xmm0, (%rdi)
xor $56076, %r10
lea addresses_WC_ht+0x692e, %rsi
nop
sub %rdi, %rdi
movl $0x61626364, (%rsi)
nop
nop
cmp $45776, %r14
lea addresses_A_ht+0x930c, %r14
dec %r10
movl $0x61626364, (%r14)
nop
nop
nop
nop
xor $26969, %rax
pop %rsi
pop %rdi
pop %rcx
pop %rax
pop %r9
pop %r15
pop %r14
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r12
push %r14
push %rax
push %rbx
push %rdx
push %rsi
// Store
lea addresses_UC+0x32cc, %rbx
nop
nop
and %rsi, %rsi
movl $0x51525354, (%rbx)
nop
nop
nop
nop
inc %r12
// Load
mov $0x76887f0000000e0c, %rdx
clflush (%rdx)
nop
nop
nop
nop
xor $47132, %rax
vmovups (%rdx), %ymm6
vextracti128 $1, %ymm6, %xmm6
vpextrq $0, %xmm6, %rsi
nop
and $50912, %rbx
// Store
mov $0x6fba320000000fff, %rdx
nop
nop
xor %rsi, %rsi
movb $0x51, (%rdx)
nop
nop
nop
nop
dec %r11
// Faulty Load
mov $0x4a9faf000000070c, %rax
nop
nop
nop
nop
nop
cmp %rsi, %rsi
mov (%rax), %r11
lea oracles, %r14
and $0xff, %r11
shlq $12, %r11
mov (%r14,%r11,1), %r11
pop %rsi
pop %rdx
pop %rbx
pop %rax
pop %r14
pop %r12
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_NC', 'AVXalign': True, 'size': 8, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 6}}
{'src': {'type': 'addresses_NC', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 8}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_NC', 'AVXalign': False, 'size': 1, 'NT': True, 'same': False, 'congruent': 0}}
[Faulty Load]
{'src': {'type': 'addresses_NC', 'AVXalign': False, 'size': 8, 'NT': True, 'same': True, 'congruent': 0}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 1}}
{'src': {'type': 'addresses_normal_ht', 'congruent': 8, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WC_ht', 'congruent': 0, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 0}}
{'src': {'type': 'addresses_WC_ht', 'AVXalign': True, 'size': 32, 'NT': False, 'same': False, 'congruent': 2}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WT_ht', 'congruent': 9, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_UC_ht', 'congruent': 10, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 2}}
{'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 3}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 3}}
{'src': {'type': 'addresses_UC_ht', 'congruent': 0, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_UC_ht', 'congruent': 10, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 2, 'NT': False, 'same': True, 'congruent': 7}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 9}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 7}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': True, 'size': 4, 'NT': False, 'same': False, 'congruent': 1}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 10}}
{'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.403922
| 2,999
| 0.655694
|
71c4c3bf9a97078a9cfda0edc10deb917d279483
| 479
|
asm
|
Assembly
|
oeis/092/A092283.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/092/A092283.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/092/A092283.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A092283: Triangular array read by rows: T(n,k)=n+k^2, 1<=k<=n.
; Submitted by Jamie Morken(s4)
; 2,3,6,4,7,12,5,8,13,20,6,9,14,21,30,7,10,15,22,31,42,8,11,16,23,32,43,56,9,12,17,24,33,44,57,72,10,13,18,25,34,45,58,73,90,11,14,19,26,35,46,59,74,91,110,12,15,20,27,36,47,60,75,92,111,132,13,16,21,28,37,48,61,76,93,112,133,156,14,17,22,29,38,49,62,77,94,113,134,157,182,15,18,23,30,39,50,63,78,95
lpb $0
add $1,1
sub $0,$1
lpe
add $0,1
pow $0,2
add $1,$0
mov $0,$1
add $0,1
| 34.214286
| 299
| 0.636743
|
89e599d98d083f0c21d2503b3a127bc089982d07
| 372
|
asm
|
Assembly
|
programs/oeis/022/A022781.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/022/A022781.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/022/A022781.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A022781: Place where n-th 1 occurs in A023119.
; 1,4,10,18,29,43,59,78,100,124,151,181,213,248,286,326,369,414,462,513,566,622,681,742,806,873,942,1014,1089,1166,1246,1329,1414,1502,1592,1685,1781,1879,1980,2084,2190,2299,2411,2525,2642,2762,2884
mov $1,$0
lpb $1
sub $1,1
mov $2,$1
max $2,0
seq $2,22841 ; Beatty sequence for sqrt(7).
add $0,$2
lpe
add $0,1
| 28.615385
| 199
| 0.685484
|
bf1c7a3fbe7eda754a5299bae3f236963dea550e
| 7,339
|
asm
|
Assembly
|
Transynther/x86/_processed/AVXALIGN/_ht_zr_un_/i3-7100_9_0x84_notsx.log_21829_3063.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 9
|
2020-08-13T19:41:58.000Z
|
2022-03-30T12:22:51.000Z
|
Transynther/x86/_processed/AVXALIGN/_ht_zr_un_/i3-7100_9_0x84_notsx.log_21829_3063.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 1
|
2021-04-29T06:29:35.000Z
|
2021-05-13T21:02:30.000Z
|
Transynther/x86/_processed/AVXALIGN/_ht_zr_un_/i3-7100_9_0x84_notsx.log_21829_3063.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 %rax
push %rbp
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_UC_ht+0x4583, %rsi
lea addresses_WC_ht+0x8a19, %rdi
nop
nop
nop
and %rbx, %rbx
mov $110, %rcx
rep movsb
nop
nop
nop
nop
nop
add %rax, %rax
lea addresses_WC_ht+0x16a49, %rsi
and $18695, %rbp
movups (%rsi), %xmm7
vpextrq $1, %xmm7, %rcx
nop
nop
nop
nop
add %rdi, %rdi
lea addresses_WT_ht+0xc53, %rax
nop
nop
nop
nop
cmp $32637, %rcx
mov (%rax), %bx
nop
nop
nop
nop
nop
add $60604, %rcx
lea addresses_D_ht+0x194c3, %rsi
lea addresses_WC_ht+0x1df09, %rdi
nop
nop
nop
nop
and %rbp, %rbp
mov $84, %rcx
rep movsq
cmp $15013, %rbp
lea addresses_WT_ht+0x127e1, %rsi
lea addresses_normal_ht+0xd689, %rdi
nop
nop
nop
nop
xor $14959, %rbx
mov $112, %rcx
rep movsw
xor %rcx, %rcx
lea addresses_A_ht+0x16c89, %rsi
clflush (%rsi)
nop
nop
nop
xor %r11, %r11
mov $0x6162636465666768, %rbx
movq %rbx, %xmm7
vmovups %ymm7, (%rsi)
nop
cmp $56566, %rbp
lea addresses_WT_ht+0x83c9, %rsi
lea addresses_WT_ht+0x15571, %rdi
nop
nop
nop
nop
add %rax, %rax
mov $51, %rcx
rep movsq
nop
nop
nop
dec %rcx
lea addresses_D_ht+0x1b509, %rbp
nop
nop
nop
nop
nop
and $9272, %rax
movl $0x61626364, (%rbp)
nop
xor $16872, %rdi
lea addresses_normal_ht+0x10aa9, %rax
nop
nop
add %rbp, %rbp
mov (%rax), %rcx
nop
nop
nop
nop
nop
dec %rdi
lea addresses_A_ht+0xd849, %rsi
lea addresses_A_ht+0x8569, %rdi
nop
nop
nop
dec %r11
mov $25, %rcx
rep movsq
nop
nop
and %rbp, %rbp
lea addresses_UC_ht+0x148c, %rax
sub %rsi, %rsi
movl $0x61626364, (%rax)
sub %rcx, %rcx
lea addresses_UC_ht+0x10889, %rbp
nop
inc %rdi
movb (%rbp), %al
nop
sub $37829, %rbx
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %rax
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r13
push %r8
push %rbp
push %rbx
push %rdi
// Store
lea addresses_WC+0x9889, %r8
inc %rdi
movl $0x51525354, (%r8)
nop
dec %r8
// Faulty Load
lea addresses_WC+0x9889, %r10
nop
nop
xor $44647, %rbx
vmovntdqa (%r10), %ymm3
vextracti128 $1, %ymm3, %xmm3
vpextrq $0, %xmm3, %rbp
lea oracles, %rbx
and $0xff, %rbp
shlq $12, %rbp
mov (%rbx,%rbp,1), %rbp
pop %rdi
pop %rbx
pop %rbp
pop %r8
pop %r13
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_WC', 'same': False, 'size': 1, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_WC', 'same': True, 'size': 4, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
[Faulty Load]
{'src': {'type': 'addresses_WC', 'same': True, 'size': 32, 'congruent': 0, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_UC_ht', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 4, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_WC_ht', 'same': False, 'size': 16, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WT_ht', 'same': False, 'size': 2, 'congruent': 1, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_D_ht', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 6, 'same': True}, 'OP': 'REPM'}
{'src': {'type': 'addresses_WT_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 9, 'same': False}, 'OP': 'REPM'}
{'dst': {'type': 'addresses_A_ht', 'same': False, 'size': 32, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_WT_ht', 'congruent': 6, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 3, 'same': False}, 'OP': 'REPM'}
{'dst': {'type': 'addresses_D_ht', 'same': True, 'size': 4, 'congruent': 7, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_normal_ht', 'same': False, 'size': 8, 'congruent': 5, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_A_ht', 'congruent': 6, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 5, 'same': True}, 'OP': 'REPM'}
{'dst': {'type': 'addresses_UC_ht', 'same': True, 'size': 4, 'congruent': 0, 'NT': True, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_UC_ht', 'same': True, 'size': 1, 'congruent': 11, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'13': 1, '5f': 1, '45': 6100, 'c3': 1, '68': 1, 'f1': 1, 'd6': 1, '03': 1, '85': 1, '49': 36, '00': 15682, '61': 1, '91': 2}
00 00 45 00 45 00 45 00 45 00 00 00 00 45 00 00 45 00 45 00 45 00 00 45 00 45 00 00 45 45 45 45 00 00 00 00 00 45 00 00 45 45 00 00 45 45 00 00 45 45 00 00 00 00 00 00 00 45 45 00 00 00 00 45 00 00 00 00 00 00 45 45 45 00 00 00 00 00 45 00 00 00 00 45 45 00 00 45 00 00 00 00 45 45 45 00 00 45 45 00 00 45 00 00 00 00 00 45 00 00 00 45 00 45 45 45 00 45 45 00 00 00 00 00 00 00 45 00 45 00 45 00 45 00 00 00 00 45 00 45 45 00 00 45 00 00 45 45 45 00 00 45 45 00 00 00 45 00 00 00 00 00 00 00 45 45 00 45 00 00 45 00 00 45 00 00 00 00 00 00 00 45 45 00 00 45 00 45 00 00 00 45 00 00 00 00 45 00 00 00 00 45 45 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 45 45 00 00 00 45 00 00 45 45 00 00 45 45 00 00 45 45 45 00 00 45 00 45 45 00 00 00 45 00 45 45 00 45 45 45 00 45 00 00 00 00 00 00 00 00 00 45 00 00 00 00 00 00 00 00 00 45 00 45 00 45 00 00 00 45 00 00 00 00 45 00 45 00 00 45 45 00 45 45 00 45 00 00 00 00 00 00 00 00 00 45 00 00 45 00 00 00 00 00 00 00 00 00 00 00 00 45 00 45 45 00 00 45 00 45 00 00 00 00 00 00 00 00 45 00 00 00 00 00 00 00 00 00 00 00 00 00 00 45 00 00 00 00 00 00 00 45 00 00 00 00 00 45 00 45 00 00 00 00 00 00 45 45 00 45 00 45 00 45 00 00 00 00 00 45 00 45 00 45 00 00 00 45 00 45 45 00 00 45 00 00 00 00 00 45 00 45 00 00 45 45 00 45 00 00 45 00 00 00 45 00 45 00 00 00 45 00 45 45 00 45 00 45 00 00 00 00 45 00 00 00 00 00 00 45 00 00 00 00 00 00 45 45 00 00 00 45 00 00 00 00 00 00 45 45 45 00 45 00 00 00 00 00 45 00 45 00 00 45 00 45 00 00 00 00 00 00 00 00 45 00 00 00 00 00 45 00 45 00 45 00 00 00 00 00 45 00 00 45 00 45 45 45 00 45 00 00 00 00 00 00 45 00 00 45 00 45 00 45 00 00 00 00 00 00 00 00 45 00 45 00 00 00 00 00 00 00 00 00 45 00 45 00 00 45 00 00 00 00 45 45 45 45 45 45 00 45 00 45 45 00 00 00 00 00 45 00 00 45 45 00 45 00 00 45 00 00 00 45 45 00 00 00 00 00 00 45 00 00 00 00 45 00 00 45 00 00 00 00 00 00 00 00 00 00 45 00 00 00 45 00 00 45 00 00 00 00 00 00 00 45 45 00 45 00 00 45 00 00 00 00 45 00 45 00 45 00 00 00 00 00 00 45 00 00 45 00 00 00 00 00 00 45 00 00 00 00 45 00 00 00 00 00 00 45 00 45 00 00 45 00 00 00 45 00 00 45 00 00 45 00 00 00 00 00 45 00 00 00 00 45 00 00 45 45 00 00 00 00 00 45 00 00 45 45 00 00 00 00 00 45 00 00 00 00 00 00 00 00 00 45 00 00 00 00 00 45 45 00 00 45 00 45 00 00 45 00 45 00 45 00 00 00 00 00 45 00 00 00 45 00 00 45 00 00 00 00 00 00 00 00 45 00 00 45 45 00 00 00 45 45 00 00 45 00 45 45 45 00 45 45 45 45 00 45 45 45 45 00 00 00 00 00 45 45 00 00 45 00 00 00 00 45 00 45 00 00 45 00 00 00 00 45 00 45 45 00 00 00 00 00 00 45 00 00 00 00 45 00 00 45 00 00 00 00 00 00 00 00 45 00 45 00 00 00 00 00 00 00 00 00 45 00 00 45 00 00 00 45 00 00 00 00 00 00 00 00 45 00 45 45 00 00 00 45 00 00 00 00 00 00 00 00 00 45 00 45 00 00 00 00 45 00 00 00 00 00 00 45 00 00 45 00 00 00 00 45 00 00 00 45 00 00 00 45 00 68 00 00 00 00 45 00 00 00 45 00 00 00 00 45 45 00 00 00 45 45 45 00 45 00 00 00 45 00 00 00 00 00 00 00 00 00 00 45 45 45 00 00 00 00 00 00 00 45 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
| 36.695
| 2,999
| 0.653223
|
b6f81dfe3aad31086b39f05be777359ea6ae385e
| 91,723
|
asm
|
Assembly
|
base/mvdm/wow16/kernel31/ld.asm
|
npocmaka/Windows-Server-2003
|
5c6fe3db626b63a384230a1aa6b92ac416b0765f
|
[
"Unlicense"
] | 17
|
2020-11-13T13:42:52.000Z
|
2021-09-16T09:13:13.000Z
|
base/mvdm/wow16/kernel31/ld.asm
|
sancho1952007/Windows-Server-2003
|
5c6fe3db626b63a384230a1aa6b92ac416b0765f
|
[
"Unlicense"
] | 2
|
2020-10-19T08:02:06.000Z
|
2020-10-19T08:23:18.000Z
|
base/mvdm/wow16/kernel31/ld.asm
|
sancho1952007/Windows-Server-2003
|
5c6fe3db626b63a384230a1aa6b92ac416b0765f
|
[
"Unlicense"
] | 14
|
2020-11-14T09:43:20.000Z
|
2021-08-28T08:59:57.000Z
|
.xlist
include kernel.inc
include newexe.inc
include tdb.inc
include pdb.inc
include protect.inc
.list
NEWEPME = NEPRIVLIB ; flag saying Call WEP on exit
externW pLocalHeap
externW pStackTop
DataBegin
externB num_tasks
externB graphics
externB fBooting
externB Kernel_flags
externD Dos_Flag_Addr
externB WOAName
externW fLMdepth
externW headPDB
externW curTDB
externW loadTDB
externW Win_PDB
externW topPDB
externW hExeHead
;externW EMS_calc_swap_line
externW WinFlags
externW hGDI
externW hUser
ifdef WOW
externW OFContinueSearch
endif
externD pMBoxProc
externD pGetFreeSystemResources
externD dressed_for_success
externD lpGPChain
;** Diagnostic mode stuff
externW fDiagMode
externB szLoadStart
externB szCRLF
externB szLoadSuccess
externB szLoadFail
externB szFailCode
externB szCodeString
; Look for module in Module Compatibilty section of win.ini
szModuleCompatibility DB 'ModuleCompatibility',0
DataEnd
externFP Yield
externFP CreateTask
externFP GlobalAlloc
externFP GlobalSize
externFP GlobalLock
externFP GlobalUnlock
externFP GlobalFree
externFP LocalAlloc
externFP LocalFree
externFP LocalCountFree
externFP LoadModule
externFP lstrlen
externFP _lclose
externFP FreeModule
externFP GetModuleHandle
externFP LoadExeHeader
externFP GetExePtr
externFP GetProcAddress
externFP MyOpenFile
externFP FarGetCachedFileHandle
externFP FarEntProcAddress
externFP FlushCachedFileHandle
externFP FarMyLock
externFP FarMyFree
externFP FarMyUpper
externFP FarLoadSegment
externFP FarDeleteTask
externFP FarUnlinkObject
externFP Far_genter
externFP AllocSelector
externFP FreeSelector
externFP LongPtrAdd
externFP GetProfileInt
ifdef WOW
externFP StartWOWTask
externFP WowIsKnownDLL
externFP LongPtrAddWOW
externFP AllocSelectorWOW
externFP WOWLoadModule
externFP WowShutdownTimer
externB fShutdownTimerStarted
externB fExitOnLastApp
externFP WowSyncTask
endif
ifdef FE_SB
externFP FarMyIsDBCSLeadByte
endif
externFP FreeTDB
;** Diagnostic mode
externFP DiagOutput
sBegin CODE
assumes CS,CODE
assumes DS,NOTHING
assumes ES,NOTHING
sEnd CODE
sBegin NRESCODE
assumes CS,NRESCODE
assumes DS,NOTHING
assumes ES,NOTHING
externB szProtectCap
externB msgRealModeApp1
externB msgRealModeApp2
externNP MapDStoDATA
externNP FindExeFile
externNP FindExeInfo
externNP AddModule
externNP DelModule
externNP GetInstance
externNP IncExeUsage
externNP DecExeUsage
externNP AllocAllSegs
externNP PreloadResources
externNP StartProcAddress
externNP StartLibrary
externNP GetStackPtr
externNP StartTask
IFNDEF NO_APPLOADER
externNP BootAppl
ENDIF ;!NO_APPLOADER
DOS_FLAG_EXEC_OPEN equ 1
SET_DOS_FLAG_EXEC_OPEN macro
push es
push bx
mov es, Dos_Flag_Addr.sel
mov bx, Dos_Flag_Addr.off
or BYTE PTR es:[bx], DOS_FLAG_EXEC_OPEN
pop bx
pop es
endm
RESET_DOS_FLAG_EXEC_OPEN macro
push es
push bx
mov es, Dos_Flag_Addr.sel
mov bx, Dos_Flag_Addr.off
and BYTE PTR es:[bx], NOT DOS_FLAG_EXEC_OPEN
pop bx
pop es
endm
;-----------------------------------------------------------------------;
; OpenApplEnv ;
; Calls CreateTask ;
; Allocates temporary stack ;
; Arguments: ;
; ;
; Returns: ;
; ax = selector of load-time stack ;
; Error Returns: ;
; ax = 0 ;
; Registers Preserved: ;
; ;
; Registers Destroyed: ;
; ;
; Calls: ;
; ;
; History: ;
; ;
; Tue 16-Jan-1990 21:13:51 -by- David N. Weise [davidw] ;
; Ya know, it seems to me that most of the below ain't necessary ;
; for small frame EMS. But it's too late to change it now. ;
; ;
; Fri 07-Apr-1989 23:15:42 -by- David N. Weise [davidw] ;
; Added support for task ExeHeaders above The Line in Large ;
; Frame EMS. ;
; ;
; Tue Oct 20, 1987 07:48:51p -by- David N. Weise [davidw] ;
; Added this nifty comment block. ;
;-----------------------------------------------------------------------;
LOADSTACKSIZE = 2048
assumes ds,nothing
assumes es,nothing
cProc OpenApplEnv,<PUBLIC,NEAR>,<ds,si,di>
parmD lpPBlock
parmW pExe
parmW fWOA
; localW myCodeDS
; localW myCurTDB
; localW myLoadTDB
cBegin
ReSetKernelDS ; Assume DS:KRNLDS
cCall CreateTask,<lpPBlock,pExe,fWOA>
or ax,ax
jz oae_done
test kernel_flags,KF_pUID ; All done booting?
jz oae_done
xor ax,ax
mov bx,LOADSTACKSIZE
mov cx,(GA_ALLOC_LOW or GA_SHAREABLE) shl 8 or GA_ZEROINIT or GA_MOVEABLE
cCall GlobalAlloc,<cx,ax,bx>
or ax,ax
jz oae_done
cCall GlobalLock,<ax>
mov ax,dx
push es ; added 13 feb 1990
mov es,loadTDB
mov es:[TDB_LibInitSeg],ax
mov es:[TDB_LibInitOff],10h
mov es,dx
mov es:[pStackTop],12h
pop es
oae_done:
cEnd
;-----------------------------------------------------------------------;
; CloseApplEnv ;
; ;
; ;
; Arguments: ;
; ;
; Returns: ;
; AX = hExe ;
; BX = ? ;
; DX = TDB ;
; ;
; Error Returns: ;
; ;
; Registers Preserved: ;
; ;
; Registers Destroyed: ;
; ..., ES, ... ;
; ;
; Calls: ;
; ;
; History: ;
; ;
; Fri 07-Apr-1989 23:15:42 -by- David N. Weise [davidw] ;
; Added support for task ExeHeaders above The Line in Large ;
; Frame EMS. ;
; ;
; Tue Oct 20, 1987 07:48:51p -by- David N. Weise [davidw] ;
; Added this nifty comment block. ;
;-----------------------------------------------------------------------;
assumes ds,nothing
assumes es,nothing
cProc CloseApplEnv,<PUBLIC,NEAR>,<ds,si,di>
parmW hResult
parmW hExe
localW myCurTDB
localW cae_temp
localW myLoadTDB
cBegin
ReSetKernelDS
; Copy DS variables to stack, since we may need DS
mov cx,curTDB
mov myCurTDB,cx
mov cx,loadTDB
mov myLoadTDB,cx
mov cae_temp, si
mov ax, myLoadTDB
or ax, ax ; Not set if LMCheckHeap failed
jz cae_done
mov ds, ax
mov ax, ds:[TDB_LibInitSeg]
or ax, ax
jz cae_free_stack1
mov ds, ax
cmp ds:[pStackTop], 12h
jne cae_free_stack1
mov ds,myLoadTDB
push ax
cCall GlobalUnlock,<ax>
call GlobalFree ; parameter pushed above
cae_free_stack1:
mov ds,myLoadTDB
mov ds:[TDB_LibInitSeg],ax
mov ds:[TDB_LibInitOff],10h
; Copy correct return address
cae_done:
SetKernelDSNRES
xor dx,dx
xchg loadTDB,dx ; Done loading this guy
mov ax,hResult ; if hResult < 32, it's not a real
cmp ax,LME_MAXERR ; handle, and in fact is the invalid
jb cae_cleanup ; format return code. (11).
mov es,dx
; Start this guy up! TDB_nEvents must be set here, and not before
; because message boxes may be put up if we can't find libraries,
; which would have caused this app to prematurely start.
push es
ifdef WOW
cmp num_tasks, 1 ; First task? (except wowexec)
jne @F ; branch if not first task
cmp fExitOnLastApp, 0 ; Shared WOW?
jne @F ; branch if not shared WOW
cmp fShutdownTimerStarted, 1; Is the timer running?
jne @F ; branch if not running
cCall WowShutdownTimer, <0> ; stop shutdown timer
mov fShutdownTimerStarted, 0
@@:
endif
mov es:[TDB_nEvents],1
inc num_tasks ; Do this here or get it wrong.
test es:[TDB_flags],TDBF_OS2APP
jz @F
cmp dressed_for_success.sel,0
jz @F
call dressed_for_success
ifdef WOW
; Start Up the New Task
@@: cCall StartWOWTask,<es,es:[TDB_taskSS],es:[TDB_taskSP]>
or ax,ax ; Success ?
jnz @f ; Yes
mov hResult,ax ; No - Fake Out of Memory Error 0
; No error matches failed to create thread
pop dx ; restore TDB
dec num_tasks ;
jmps cae_cleanup ;
endif; WOW
@@: test kernel_flags,KF_pUID ; All done booting?
jz @F ; If booting then don't yield.
cCall WowSyncTask
@@:
assumes ds,nothing
pop dx ; return TDB
jmps cae_exit
; Failure case - undo the damage
cae_cleanup:
or dx,dx ; Did we even get a TDB?
jz cae_exit ; No.
mov ds,dx
assumes ds,nothing
mov ds:[TDB_sig],ax ; mark TDB as invalid
cCall FarDeleteTask,<ds>
mov es,ds:[TDB_PDB]
mov dx,PDB_Chain
mov bx,dataOffset HeadPDB ; Kernel PDB
cCall FarUnlinkObject
cCall FreeTDB
cae_exit:
xor ax,ax
mov es,ax ; to avoid GP faults in pmode
.386
mov fs, ax
mov gs, ax
.286
mov ax,hResult
mov bx, cae_temp
cEnd
;-----------------------------------------------------------------------;
; StartModule ;
; ;
; ;
; Arguments: ;
; ;
; Returns: ;
; AX = hExe or StartLibrary ;
; ;
; Error Returns: ;
; AX = 0 ;
; ;
; Registers Preserved: ;
; BX,DI,SI,DS ;
; ;
; Registers Destroyed: ;
; ;
; Calls: ;
; FarLoadSegment ;
; StartProcAddress ;
; StartLibrary ;
; ;
; History: ;
; ;
; Tue Jan 01, 1980 03:04:49p -by- David N. Weise [davidw] ;
; ReWrote it from C into assembly and added this nifty comment block. ;
;-----------------------------------------------------------------------;
assumes ds,nothing
assumes es,nothing
cProc StartModule,<PUBLIC,NEAR>,<di,si>
parmW hPrev
parmD lpPBlock
parmW hExe
parmW fh
localD pf
cBegin
mov ax,hExe
mov es,ax
assumes es,nothing
cmp es:[ne_csip].sel,0
jz start_it_up
; Make sure DGROUP loaded before we need to load the start segment.
mov cx,es:[ne_autodata]
jcxz start_it_up ; no automatic data segment
cCall FarLoadSegment,<es,cx,fh,fh>
or ax,ax
jnz start_it_up ; auto DS loaded OK
mov ax,fh
inc ax
jz sm_ret1 ; return NULL
dec ax
cCall _lclose,<ax>
xor ax,ax
sm_ret1:
jmps sm_ret ; return NULL
start_it_up:
cCall StartProcAddress,<hExe,fh> ; just because it's preloaded
mov pf.sel,dx ; doesn't mean it's still around!
mov pf.off,ax
or dx,ax
push dx
mov ax,fh
cmp ax,-1
jz sm_nothing_to_close
cCall _lclose,<ax>
sm_nothing_to_close:
pop dx
mov es,hExe
assumes es,nothing
test es:[ne_flags],NENOTP
jnz start_library
or dx,dx
jz nothing_to_start
cCall GetStackPtr,<es>
cCall StartTask,<hPrev,hExe,dx,ax,pf>
jmps sm_ret
start_library:
mov es, hExe
or es:[ne_flags], NEWEPME ; Need to call my WEP on exit
cCall StartLibrary,<hExe,lpPBlock,pf>
jmps sm_ret
nothing_to_start:
mov ax,hExe
test es:[ne_flags],NENOTP
jnz sm_ret
xor ax,ax
sm_ret:
cEnd
if 0 ; too late to include in 3.1, add for next Windows release (donc)
cProc GetProcAddressRes, <PUBLIC, FAR>, <ds, si, di>
parmW hExe
parmD pname ; pass in Pascal string
cBegin
les di, [pname] ; ES:DI = name to find
mov cx, 255 ; CH = 0
xor ax, ax
push di
repne scasb
pop di
jnz GPAR_fail
not cl
dec cl
mov al, cl ; AX = length of name
mov ds, [hExe] ; DS:SI = res name table
mov bx, ds:[ne_restab] ; (actually DS:BX first time through)
GPAR_nextsym:
mov si, bx ; next entry to check
mov cl, [si] ; string length
jcxz GPAR_fail
lea bx, [si+3]
add bx, cx ; BX points to next (last + len + 3)
cmp cx, ax
jnz GPAR_nextsym ; length diff - no match
inc si ; skip length byte
push di
rep cmpsb
pop di
jnz GPAR_nextsym
lodsw ; get ordinal number
;if KDEBUG
; cCall FarEntProcAddress,<ds,ax,1>
;else
cCall FarEntProcAddress,<ds,ax> ; I hate conditional assembly....
;endif
mov cx, ax
or cx, dx
jmps GPAR_exit
GPAR_fail:
xor ax, ax
cwd
GPAR_exit:
cEnd
endif
;-----------------------------------------------------------------------;
; CallWEP ;
; ;
; Call WEP of DLL if appropriate ;
; ;
; Arguments: ;
; HANDLE hExe = HEXE of module about to close ;
; WORD WEPVal = 0, 1 pass to WEP, 2 check for WEP ;
; ;
; Returns: ;
; AX = status ;
; ;
; Error Returns: ;
; AX = Not a DLL ;
; AX = No WEP ;
; AX = Module not started ;
;-----------------------------------------------------------------------;
cProc CallWEP, <PUBLIC,FAR>, <ds>
parmW hExe
parmW WEPVal
localV szExitProc,4
localD pExitProc
localW bogusIBMAppSp
cBegin
mov ds, hExe ; Robustify this!
CWErr = 1
mov ax, 1 ; exit code
cmp ds:[ne_expver], 300h ; 3.0 libraries only
jb CW_noWEP
CWErr = CWErr+1
inc ax
test ds:[ne_flags], NENOTP ; is it a DLL?
jz CW_noWEP
CWErr = CWErr+1
inc ax ; Font, etc
cmp ds:[ne_cseg],0
jz CW_noWEP
CWErr = CWErr+1
inc ax
mov bx, ds:[ne_pautodata] ; Make sure auto data loaded
or bx, bx
jz @F
test ds:[bx].ns_flags, NSLOADED
jz CW_noWEP
@@:
CWErr = CWErr+1
inc ax
NoWepErr = CWErr
mov [szExitProc].lo, 'EW' ; If the module has a procedure
mov [szExitProc].hi, 'P' ; named 'WEP', call it.
lea bx, szExitProc
push ax
cCall GetProcAddress, <ds, ss, bx>
mov [pExitProc].off, ax
mov [pExitProc].sel, dx
or ax, dx
pop ax
jnz CW_WEP
CW_noWEP:
jmps CW_noWEP1
CW_WEP:
cmp WEPVAL,2 ; If I'm just looking for WEP
jz CW_OK ; return 0
inc ax
test ds:[ne_flags], NEWEPME ; don't call wep if libmain
jz CW_noWEP ; wasn't called
and ds:[ne_flags], NOT NEWEPME ; only call WEP once
SetKernelDSNRES ; Save old GP chaine
pusha
push lpGPChain.sel
push lpGPChain.off
push cs
push offset cw_BlowChunks
mov lpGPChain.sel, ss ; and insert self in the chain
mov lpGPChain.off, sp
UnSetKernelDS
mov ax, ss
mov ds, ax
mov es, ax
mov bogusIBMAppSP,sp ; Save sp cause some apps (Hollywood)
; don't retf 2 correctly when we
; call their wep
cCall pExitProc, <WEPVal> ; fSystemExit
mov sp,bogusIBMAppSp
add sp, 4 ; remove the CS:IP for error handler
cw_BlowChunks:
SetKernelDSNRES
pop lpGPChain.off ; restore GPChain
pop lpGPChain.sel
popa
UnSetKernelDS
CW_OK:
xor ax, ax
CW_noWEP1:
cmp WEPVAL, 2 ; if we checked for whining
jnz CW_done
or ax, ax ; if we found, then OK
jz CW_done
cmp ax, NoWepErr ; anything other than NoWep is OK
jz CW_done
xor ax, ax
CW_done:
cEnd
;-----------------------------------------------------------------------;
; LoadModule ;
; ;
; Loads a module or creates a new instance of an existing module. ;
; ;
; Arguments: ;
; FARP p = name of module or handle of existing module ;
; FARP lpPBlock = Parameter Block to pass to CreateTask ;
; ;
; Returns: ;
; AX = instance handle or module handle ;
; ;
; Error Returns: ;
;LME_MEM = 0 ; Out of memory ;
;LME_FNF = 2 ; File not found
;LME_LINKTASK = 5 ; can't link to task ;
;LME_LIBMDS = 6 ; lib can't have multiple data segments ;
;LME_VERS = 10 ; Wrong windows version ;
;LME_INVEXE = 11 ; Invalid exe ;
;LME_OS2 = 12 ; OS/2 app ;
;LME_DOS4 = 13 ; DOS 4 app ;
;LME_EXETYPE = 14 ; unknown exe type ;
;LME_RMODE = 15 ; not a pmode windows app ;
;LME_APPMDS = 16 ; multiple data segments in app ;
;LME_EMS = 17 ; scum app in l-frame EMS ;
;LME_PMODE = 18 ; not an rmode windows app ;
;LME_INVCOMP = 20 ; invalid DLL caused fail of EXE load ;
;LME_PE32 = 21 ; Windows Portable EXE app - let them load it ;
;LME_MAXERR = 32 ; for comparisons ;
; ;
; Registers Preserved: ;
; DI, SI, DS ;
; Registers Destroyed: ;
; BX, CX, DX, ES ;
; ;
; Calls: ;
; AllocAllSegs ;
; CreateInsider ;
; DecExeUsage ;
; DelModule ;
; FindExeFile ;
; FindExeInfo ;
; FreeModule ;
; GetExePtr ;
; GetInstance ;
; GetStringPtr ;
; IncExeUsage ;
; LoadExeHeader ;
; LoadModule ;
; FarLoadSegment ;
; lstrlen ;
; FarMyFree ;
; MyOpenFile ;
; PreloadResources ;
; StartModule ;
; _lclose ;
; ;
; History: ;
; Sun 12-Nov-1989 14:19:04 -by- David N. Weise [davidw] ;
; Added the check for win87em. ;
; ;
; Fri 07-Apr-1989 23:15:42 -by- David N. Weise [davidw] ;
; Added support for task ExeHeaders above The Line in Large ;
; Frame EMS. ;
; ;
; Tue Oct 13, 1987 05:00:00p -by- David J. Habib [davidhab] ;
; Added check for FAPI applications. ;
; ;
; Sat Jul 18, 1987 12:04:15p -by- David N. Weise [davidw] ;
; Added support for multiple instances in different EMS banks. ;
; ;
; Tue Jan 01, 1980 06:57:01p -by- David N. Weise [davidw] ;
; ReWrote it from C into assembly. ;
; ;
; Wed Sep 17, 1986 03:31:06p -by- Charles Whitmer [chuckwh] ;
; Modified the original LoadModule code to only allow INSIDERs to ;
; allocate segments for a new process. An INSIDER is a new process ;
; stub which bootstraps up a new instance of an application. ;
;-----------------------------------------------------------------------;
assumes ds,nothing
assumes es,nothing
cProc ILoadLibrary,<PUBLIC,FAR>
parmD pLibName
localV szExitProc,4
cBegin
mov ax,-1
cCall <far ptr LoadModule>,<pLibName,ax,ax>
cmp ax, LME_INVEXE ; Invalid format?
jnz @F
mov ax, LME_INVCOMP ; Invalid component
@@:
if KDEBUG
SetKernelDSNRes
cmp fBooting, 0
jne ll_fail ; No check while booting
cmp ax, LME_MAXERR
jb ll_fail ; No library, so no WEP()
push ax ; Now check for WEP
cCall GetExePtr,<ax>
mov es, ax
test es:[ne_flags],NEPROT ; ignore for OS/2 apps
jnz ll_noWhine
cmp es:[ne_usage], 0
jne ll_noWhine ; Only check on first load!
push dx
push ax
cCall CallWEP,<ax,2> ; Just check for WEP, don't call it
or ax, ax
pop ax
pop dx
jz ll_noWhine
trace_out "No WEP in library - > %AX0 %AX1"
; fkerror 0,<No WEP in library - >,ax,dx
ll_noWhine:
pop ax ; return value of LoadModule
ll_fail:
endif ; KDEBUG
cEnd
os2calls DB 'DOSCALLS' ; Used for FAPI detection
mgxlib DB 'MGXLIB' ; Used for lib large entry table detection
win87em DB 'WIN87EM.DLL',0 ; Used for win87em.exe detection
assumes ds,nothing
assumes es,nothing
?SAV5 = ?DOS5 ; Adobe Type Manager check the LoadModule
?DOS5 = 0 ; prolog and expects to see INC BP there...
public LMAlreadyLoaded, LMLoadExeFile, LMCheckHeader, LMRamNMods
public LMImports, LMSegs, LMLetsGo, LMPrevInstance, LMCleanUp
cProc ILoadModule,<PUBLIC,FAR>,<di,si>
parmD lpModuleName
parmD lpPBlock
localW fh ; close if failed
localW pExe ; point to NE header in RAM
; localW hExe ; prev module if already loaded
localW hResult ; temp return value
localW hDepFail ; return of implicit link loads
localW abortresult ; temp return value
localW ffont ; flag if loading a *.fon
localW fexe ; flag if loading a *.exe
ifdef notyet
localW dll ; flag if loading a *.dll
endif
localW hBlock ; fastload block from LoadExeHeader
localW AllocAllSegsRet
localW exe_type ; from LoadExeHeader
localW hTDB ; dx from CloseApplEnv
localW SavePDB ; save caller's pdb, switch to krnl's
localW fWOA ; save flag if we're loading WOA
ifdef WOW
LocalD pszKnownDLLPath
LocalW fKnownDLLOverride
localW RefSelector
localW LMHadPEDLL
localW hPrevInstance ; previous 16-bit module handel with the same name
endif
localD FileOffset ; offset to start of ExeHdr
localW OnHardDisk ; don't cache FH if on floppy
localV namebuf,136 ; SIZE OPENSTRUC + 127
localW fModCompatFlags ; used by LMRamNMods
cBegin
SetKernelDSNRES
mov al,Kernel_Flags[1] ; solve re-entrancy #10759
and ax,KF1_WINOLDAP
mov fWOA,ax
and Kernel_Flags[1],NOT KF1_WINOLDAP
inc fLMdepth ; # current invocations
;** Log this entry only if in diagnostic mode
mov ax, fDiagMode ; Only log if booting and diag mode
and al, fBooting
jz @F
;** Write out the string
mov ax,dataOFFSET szLoadStart ; Write the string
cCall DiagOutput, <ds,ax>
push WORD PTR lpModuleName[2]
push WORD PTR lpModuleName[0]
cCall DiagOutput
mov ax,dataOFFSET szCRLF
cCall DiagOutput, <ds,ax>
; Zero out flags and handles
@@:
ifdef WOW
mov LMHadPEDLL,0
mov hPrevInstance,0
lm_restart:
endif
xor ax,ax
; mov hExe,ax
mov pExe,ax
mov abortresult,ax ; default 0 == out of memory
mov ffont,ax
mov fexe,ax
ifdef notyet
mov dll,ax
endif
mov hBlock,ax
mov hTDB,ax
; Set DOS_FLAG to EXEC_OPEN
SET_DOS_FLAG_EXEC_OPEN
; Some flags are default -1
dec ax
mov fh, ax
mov SavePDB, ax
; First, see if we were passed in a handle in the filename
les si,lpModuleName ; point to the file name
mov ax,es
or ax,ax ; Was a handle passed in low word?
jnz @F
cCall GetExePtr,<si> ; Valid handle?
or ax, ax
jnz prev_instance
mov al, LME_FNF ; call this file not found??
jmp ilm_ret
; No handle, see if filename is already loaded
@@: call LMAlreadyLoaded ; es:si -> modname on stack
cmp ax, LME_MAXERR
jb @F ; Not found, try to load it
; a 16-bit module with the same name is loaded
; if module is being loaded is a dll, use the loaded instance
; else if module is being loaded is a task
; if it is a 32-bit task then load it from disk
; else use the loaded instance
ifdef WOW
mov hPrevInstance, ax ; store previous instance handle
mov ax,lpPBlock.off ; check if this is a dll or a task
and ax,lpPBlock.sel
inc ax
jnz @F ; non-zero means it is a task
; so check first if it is a 16-bit task
prev_instance_16task:
mov ax, hPrevInstance
endif
prev_instance:
call LMPrevInstance
jmp ilm_ret
; Wasn't loaded, see if we can load it
@@: call LMLoadExeFile ; fh in DI, AX = 0 or error code
or ax, ax
jz @F
jmp ilm_ret ; can't find it - return error
@@:
; Here to deal with a new library or task module.
; We found the file, now load and scan the header
@@: lea si,namebuf
cCall LoadExeHeader,<di,di,ss,si>
ifdef WOW
cmp ax,LME_PE
jne @F
; If we find the module is a Win32 binary (PE), check to see
; if we're trying to load a task or DLL. If it's a DLL
; we will continue searching for a Win16 copy of this DLL
; on the path. If we're unsuccessful we'll eventually
; munge the file not found error code back to LME_PE.
mov ax,lpPBlock.off
and ax,lpPBlock.sel
inc ax
mov ax,LME_PE
jnz @F ; have a PBlock, must be doing LoadModule
cmp LMHadPEDLL,0
je lm_retry_pe
mov LMHadPEDLL,0
mov OFContinueSearch,0
KernelLogError <DBF_WARNING>,ERR_LOADMODULE,"Found Win32 DLL again after continuing search."
jmps ilm_ret
@@: jmps @F
lm_retry_pe:
; Tell OpenFile to restart last search at next search location.
mov OFContinueSearch,1
mov LMHadPEDLL,1
KernelLogError <DBF_WARNING>,ERR_LOADMODULE,"Found Win32 DLL, continuing search for Win16 copy."
; Close open Win32 DLL file handle
cCall My_lclose,<fh>
; Switch back to caller's PDB
mov si, -1
xchg si, SavePDB
mov Win_PDB, si
or fh, -1
jmp lm_restart
@@:
endif
cmp ax,LME_MAXERR
jb ilm_ret
ifdef WOW
cmp hPrevInstance, 0 ; if there is a previous 16-bit task
je @F ;
cCall My_lclose,<fh> ; close opened file before invoking previous instance
jmp prev_instance_16task
endif
; Header is loaded, now see if valid for Windows
@@: call LMCheckHeader
cmp ax, LME_MAXERR
jb ilm_ret
; Now allocate segs, check for special modules, etc
@@: call LMRamNMods
cmp ax, LME_MAXERR
jb ilm_ret
; Load import libraries (scary code here)
@@: call LMImports
cmp ax, LME_MAXERR
jb ilm_ret
; Load and relocate segments
@@: call LMSegs
cmp ax, LME_MAXERR
jb ilm_ret
; Load resources, schedule execution
@@: call LMLetsGo
; Everyone comes through ILM_RET - we free the fastload block, etc
ilm_ret:
call LMCleanUp
jmp LoadModuleEnd
abort_load0:
pop fLMdepth
abort_load:
cmp fLMdepth, 1 ; If a recursive call, nothing
jne abort_load_A ; has been incremented!
cCall DecExeUsage,<pExe>
abort_load_A:
cCall My_lclose,<fh>
mov es,pExe
push es:[ne_flags]
cCall DelModule,<es>
mov pExe, 0
pop bx
abort_load_B: ; If app, close environment
test bx,NENOTP
jnz lm_ab
mov si, -1
xchg si, SavePDB ; Saved PDB?
inc si
jz @F ; nope.
dec si
mov Win_PDB, si ; yes, restore it
@@:
mov si, fLMdepth
mov fLMdepth, 0
cCall CloseApplEnv,<abortresult,es>
mov fLMdepth, bx
lm_ab: mov ax, abortresult
retn
; add sp, 2
; jmps ilm_ret ; ax = abortresult. (0 normal, 11 fapi)
ifdef WOW
winspool db "WINSPOOL.EXE" ; Trying to Load Winspool ?
size_winspool equ $-winspool
db 0h ; NULL Terminate
endif ;WOW
;----------------------------------------------------------------------
;
; LMAlreadyLoaded - internal routine for LoadModule
; See if a module is already loaded by looking for the file name
; or the module name.
; Entry:
; ES:SI points to filename
; Exit:
; AX = handle of previous instance
; SS:SI -> uppercase filename
; Error:
; AX = error value < LME_MAXERR
;
;-----------------------------------------------------------------------
LMAlreadyLoaded:
; We check if this Module is already loaded. To do so we get the
; name off of the end of the string, omitting the extension.
krDebugOut <DEB_TRACE OR DEB_KrLoadMod>, "Loading @ES:SI"
cCall lstrlen,<es,si> ; Get the length of the string.
or ax,ax ; NULL string?
jnz @F
mov al,LME_FNF ; return file not found error
retn
ifdef FE_SB
;
; Backword search '\' or ':' is prohibited for DBCS version of
; Windows. Some DBCS 2nd byte may have '\' or ':'. So we search
; these characters from beginning of string.
;
@@:
cld
mov bx,si
delinator_loop_DBC:
lods byte ptr es:[si] ; fetch a character
test al,al
jz found_end_DBC
cmp al,"\"
jz found_delinator_DBC
cmp al,'/'
jz found_delinator_DBC
cmp al,":"
jz found_delinator_DBC
call FarMyIsDBCSLeadByte ; see if char is DBC...
jc delinator_loop_DBC
inc si ; skip 2nd byte of DBC
jmp delinator_loop_DBC
found_delinator_DBC:
mov bx,si ; update delinator pointer
jmp delinator_loop_DBC
found_end_DBC:
mov si, bx ; ES:SI -> beginning of name..
else
@@: mov cx,ax
add si,ax
dec si ; ES:SI -> end of string
std
delineator_loop: ; look for beginning of name
lods byte ptr es:[si]
cmp al,"\"
jz found_delineator
cmp al,'/'
jz found_delineator
cmp al,":"
jz found_delineator
loop delineator_loop
dec si
found_delineator: ; ES:SI -> before name
cld
inc si
inc si ; ES:SI -> beginning of name
endif
xor di,di
xor bx,bx
copy_name_loop:
lods byte ptr es:[si] ; Copy and capitalize to temp buffer.
or al,al
jz got_EXE_name
cmp al,"."
jne @F
lea bx,namebuf[di]
ifdef notyet
cmp dll, 0 ; Was it .DLL and failed to open it?
jz @F ; no, no hacking
mov byte ptr es:[si], 'E' ; yes, change it to .EXE
mov word ptr es:[si+1],'EX'
mov dll, 0
endif
@@:
ifdef FE_SB
;
; Do not capitalize if a character is DBC.
;
call FarMyIsDBCSLeadByte
jnc @F
call FarMyUpper ; capitalize if SBC..
jmps is_a_SBC
@@:
mov namebuf[di],al
inc di
lods byte ptr es:[si] ; copy 2nd byte also
is_a_SBC:
mov namebuf[di],al
else
call FarMyUpper
mov namebuf[di],al
endif
inc di
jmps copy_name_loop
; Finally call FindExeInfo to see if it's already loaded!
got_EXE_name:
cmp namebuf[di][-2],'NO' ; .fons are allowed to be
jnz @F ; non protect mode
cmp namebuf[di][-4],'F.'
jnz @F
mov ffont,bp ; make non-zero
@@:
cmp namebuf[di][-2],'EX' ; .exes will not get
jnz @F ; prompted
cmp namebuf[di][-4],'E.'
jnz @F
mov fexe,bp ; make non-zero
@@:
ifdef NOTYET
cmp namebuf[di][-2],'LL'
jne @F
cmp namebuf[di][-4],'D.'
jne @F
mov dll, di
@@:
endif
ifdef WOW
; apps will expect to find WINSPOOL.DRV, which is a 32-bit driver.
; we need to intercept this and change it WINSPOOL.EXE, which is our 16-bit
; stub that contains a few entrypoints.
if 0
; Bitstreams's MakeUp extracts the printer driver from the [devices]
; section of win.ini the line looks like this:
; HP Laserjet Series II=winspool,FILE:
; and then it calls LoadLibrary(drivername) ie LoadLibrary("winspool")
; so we need to allow no extension when checking for "winspool"
endif
cmp namebuf[di][-2],'VR'
jne checkfornoext
cmp namebuf[di][-4],'D.'
jne @f
jmp short gotadrv
checkfornoext:
; int 3
cmp di,8
jc @f
cmp namebuf[di][-2],'LO'
jne @f
cmp namebuf[di][-4],'OP'
jne @f
cmp namebuf[di][-6],'SN'
jne @f
cmp namebuf[di][-8],'IW'
jne @f
; the last 8 characters are 'WINSPOOL'. tack on '.EXE' and proceed.
add di,4
mov namebuf[di][-2],'EX' ; Changed Uppercased String
mov namebuf[di][-4],'E.'
push cx
mov lpModuleName.hi,cs
lea cx,winspool ;
mov lpModuleName.lo,cx
pop cx
jmp short @f
gotadrv:
push es
push ds
push si
push cx
push di
smov es,ss
lea di,namebuf[di][-(size_winspool)]
smov ds,cs
lea si,winspool
mov cx,size_winspool-4 ; match WINSPOOL?
rep cmpsb
pop di
jnz not_winspool
mov namebuf[di][-2],'EX' ; Changed Uppercased String
mov namebuf[di][-4],'E.'
mov lpModuleName.hi,cs ; Used by Myopenfile below
lea cx,winspool ;
mov lpModuleName.lo,cx
not_winspool:
pop cx
pop si
pop ds
pop es
@@:
endif; WOW
mov namebuf[di],al ; Null terminate file name
lea si,namebuf
push bx
cCall FindExeFile,<ss,si>
pop bx
or ax,ax
jnz al_end
or bx,bx ; extension specified?
jz @F ; No, DI correct then
sub bx,si ; DI = length of name portion
mov di,bx
@@:
cCall FindExeInfo,<ss,si,di>
al_end:
retn
;----------------------------------------------------------------------
;
; LMLoadExeFile - internal routine for LoadModule
; Try to open an EXE file
; Enter:
; SS:SI -> uppercase filename
; Exit:
; AX=0
; DI = fh = handle of open EXE file
; Error:
; AX = error code
; Effects:
; Set Win_PDB to kernel PDB to open the file
;
;-----------------------------------------------------------------------
; if here then not yet loaded, see if we can open the file
LMLoadExeFile:
mov ax, topPDB
xchg Win_PDB, ax ; Switch to Kernel's PDB,
mov SavePDB, ax ; saving current PDB
xor ax,ax
ifdef notyet
cmp dll, ax ; Don't prompt for .DLL, if it fails we
jnz @F ; try for .EXE which we will prompt for
endif
cmp fexe,ax ; Don't prompt for EXE file
jnz @F
mov ax,OF_CANCEL ; If DLL, let them cancel
mov es,curTDB
test es:[TDB_ErrMode],08000h ; did app say not to prompt??
jnz @F
mov ax,OF_CANCEL or OF_PROMPT
@@:
if SHARE_AWARE
or ax, OF_NO_INHERIT or OF_SHARE_DENY_WRITE
else
or ax, OF_NO_INHERIT
endif
ifdef WOW
; Ask WOW32 to check the filename to see if it is
; a Known DLL,
;
; If it is, WowIsKnownDLL will point pszKnownDLLPath
; at a just-allocated buffer with the full path to
; the DLL in the system32 directory and return with
; AX nonzero. This buffer must be freed with a
; call to WowIsKnownDLL with the filename pointer
; zero, and pszKnownDLLPath as it was left by the
; first call to WowIsKnownDLL.
;
; If it's not a known DLL, pszKnownDLLPath will be
; NULL and AX will be zero.
push ax
cmp fBooting,0 ; Known DLLs take effect
je lef_look_for_known_dll ; after booting is complete.
mov fKnownDLLOverride,0 ; We're booting, make sure
jmps lef_dll_not_known ; we know not to call
; WowIsKnownDLL the second time.
lef_look_for_known_dll:
push si
smov es,ss
lea bx,pszKnownDLLPath
cCall WowIsKnownDLL,<lpModuleName,esbx>
mov fKnownDLLOverride,ax
cmp ax,0
pop si
je lef_dll_not_known
pop ax
cCall MyOpenFile,<pszKnownDLLPath,ss,si,ax>
jmps @f
lef_dll_not_known:
pop ax
cCall MyOpenFile,<lpModuleName,ss,si,ax>
@@:
else
cCall MyOpenFile,<lpModuleName,ss,si,ax>
endif
ifdef notyet
mov di, dll
or di, di
jz no_second_chance
cmp ax, -1
jne no_second_chance ; open succeeded
xchg ax, SavePDB ; Restore original PDB (AX == -1)
mov Win_PDB, ax
les si, lpModuleName
pop ax
jmp pointer_to_name ; Start again!
no_second_chance:
endif
xor dh, dh
mov dl, ss:[si].opDisk
mov OnHardDisk, dx
mov fh,ax
mov di,ax ; DI gets preserved, AX doesn't!
inc ax ; -1 means error or invalid parsed file
mov ax, 0
jnz @F ; OK, return 0
; MyOpenFile failed
mov ax,ss:[si].[opXtra] ; SI = &namebuf
or ax,ax ; What is the error value?
jnz @F
mov ax,LME_FNF ; unknown, call it file not found
@@:
ifdef WOW
push ax
mov ax,fKnownDLLOverride
cmp ax,0
je lef_no_need_to_free
push bx
push dx
push di
smov es,ss
lea bx,pszKnownDLLPath
cCall WowIsKnownDLL, <0,0,esbx>
pop di
pop dx
pop bx
lef_no_need_to_free:
pop ax
endif
retn
;----------------------------------------------------------------------
;
; LMCheckHeader - internal routine for LoadModule
; Loading new module - see if header values are OK
; Enter:
; ax = exeheader in RAM
; bx = 0 or FastLoad ram block selector
; cx = file offset of header
; dx = exe_type
; Exit:
;
;
;-----------------------------------------------------------------------
LMCheckHeader:
mov exe_type,dx
mov hBlock,bx ; fast-load block
mov pExe,ax ; exeheader in RAM
mov es,ax
mov ax, cx ; file offset of header
mov cx, es:[ne_align]
mov bx, ax ; BX:AX <= AX shl CL
shl ax, cl
neg cl
add cl, 16
shr bx, cl
mov FileOffset.sel, bx
mov FileOffset.off, ax
; Is this module PMode-compatible?
cmp es:[ne_expver],300h ; by definition
jae @F
test dh,NEINPROT ; by flag
jnz @F
cmp ffont,0 ; are we loading a font?
jnz @F
mov cx,ss
lea bx,namebuf
call WarnRealMode
cmp ax,IDCANCEL
jnz @F ; yes, user says so
mov ax, LME_RMODE ; no, die you pig
retn
ifdef WOW
@@:
;
; if WOA invoked by app (not fWOA) fail it
;
cmp fWOA,0 ; fWOA
jnz @F
cld
push si
push di
mov di, es:[ne_restab]
inc di
mov si, dataOffset WOAName
mov cx, 4
repe cmpsw
pop di
pop si
jnz @F
mov ax, LME_WOAWOW32
retn
endif
; Are we dynalinking to a task?
@@:
test es:[ne_flags],NENOTP
jnz ch_not_a_process
or es:[ne_flags],NEINST ; for safety sake
mov ax,lpPBlock.off
and ax,lpPBlock.sel
inc ax
jnz ch_new_application ; not linking
mov ax, LME_LINKTASK
retn
; Error if multiple instance EXE is a library module.
ch_not_a_process:
mov ax, 33 ; Any value > 32
test es:[ne_flags],NEPROT ; is it an OS/2 exe?
jnz ch_ok ; windows doesn't do this right
test es:[ne_flags],NEINST
jz ch_ok
mov ax, LME_LIBMDS ; I think this error code is wrong
ch_ok:
retn
; Create environment for new application task.
ch_new_application:
call LMCheckHeap
or ax,ax
jz @F
cCall OpenApplEnv,<lpPBlock,pExe,fWOA>
mov es,pExe
or ax,ax ; AX is a selector, therefor > 32
jnz ch_ok
@@:
jmp abort_load_A
;----------------------------------------------------------------------
;
; LMRamNMods - internal routine for LoadModule
; Load segments, check for special modules
; Enter:
; EX = pexe
; Exit:
; CX = number of import modules
; AX = status
;
;
;-----------------------------------------------------------------------
LMRamNMods:
push es
cCall AddModule,<pExe>
pop es
or ax,ax
jnz @F
push es:[ne_flags] ; AddModule failed - out of memory
mov dx,ne_pnextexe
mov bx,dataOffset hExeHead
call FarUnlinkObject
pop bx
jmp abort_load_B ; clean this up
@@:
cmp es:[ne_expver],400h
jae rm_skip_modulecompat
; Look for Module in ModuleCompatibilty section
; and get its compat flags
push es ; save es
push ds
push dataoffset szModuleCompatibility
push es
mov bx,es:[ne_restab] ; module name is 1st rsrc
inc bx ; Skip length byte
push bx
xor ax, ax
push ax ; default = 0
call GetProfileInt
@@:
pop es ; restore es
; Set the module's patch bit if the INI file says to.
if KDEBUG
test es:[ne_flagsothers], NEHASPATCH
jz @F
push ax
mov ax, es:[ne_restab]
inc ax
krDebugOut DEB_TRACE,"ILoadModule: module patch bit for @es:ax already set, clearing it"
pop ax
@@:
endif
and es:[ne_flagsothers], not NEHASPATCH ; clear module patch bit
ifdef WOW_x86
test ax, MCF_MODPATCH + MCF_MODPATCH_X86
else
test ax, MCF_MODPATCH + MCF_MODPATCH_RISC
endif
jz rm_after_modpatch
if KDEBUG
push ax
mov ax, es:[ne_restab]
inc ax
krDebugOut DEB_WARN,"ILoadModule: setting module patch bit for @es:ax"
pop ax
endif
or es:[ne_flagsothers], NEHASPATCH
rm_after_modpatch:
; See if we need to make the module's segments not discardable
test ax, MCF_NODISCARD
jz rm_after_nodiscard
mov cx, es:[ne_cseg] ; cx = number of segs
jcxz rm_after_nodiscard
mov bx, es:[ne_segtab] ; es:bx = seg table start
rm_loop:
and es:[bx].ns_flags, not NSDISCARD ; clear the discard flag
add bx, SIZE NEW_SEG1 ; es:bx = seg table next entry
loop rm_loop
rm_after_nodiscard:
rm_skip_modulecompat:
mov bx, -1
cCall FarGetCachedFileHandle,<es,bx,fh> ; Set file handle cache up
mov fh, bx ; Use cached file handle from now
xchg SavePDB, bx ; Back to original PDB (BX == -1)
mov Win_PDB, bx
@@: xor bx,bx
mov hDepFail,-1 ; Assume success
mov cx,es:[bx].ne_cmod
jcxz @F
test kernel_flags,KF_pUID ; All done booting?
jnz @F ; Yes
or es:[bx].ne_flags,NEALLOCHIGH ; No, GDI and USER are party
; dynlinks that can alloc high
@@: xor ax,ax
IFNDEF NO_APPLOADER
test es:[ne_flags],NEAPPLOADER
jnz rm_no_segs_to_alloc
ENDIF
cmp ax,es:[ne_cseg]
jz rm_no_segs_to_alloc
push es
mov es:[ne_usage],1
cCall AllocAllSegs,<es> ; AX is count of segs
pop es
mov es:[ne_usage],8000h
inc ax
jnz @F
jmp abort_load
@@:
dec ax
rm_no_segs_to_alloc:
mov AllocAllSegsRet, ax
xor bx, bx
mov di,es:[bx].ne_modtab ; ES:DI = pModIdx
mov cx,es:[bx].ne_cmod
or cx,cx
jz lm_ret_ok
; this small chunk of code goes thru the imported names table
; and looks for DOSCALLS. if DOSCALLS is found, then the app
; is an FAPI "bound" application and not a windows app, and
; loadmodule should return an error for "invalid format".
; This will force it to run in a DOS box
; coming in:
; cx = cmod
; di = modtab
test es:[bx].ne_flags,NENOTP ; only test apps, not libraries.
jnz lm_ret_ok
mov ax,exe_type ; UNKNOWN may be OS/2 in disguise.
cmp al,NE_UNKNOWN
jnz @F
push ds
smov ds,cs
mov ax,8
mov si,NRESCODEoffset os2calls ; DS:SI = "DOSCALLS"
call search_mod_dep_list
pop ds
jnc @F
mov abortresult,LME_INVEXE ; store invalid format code for return
jmp abort_load
; In order to make it easier on our ISV to migrate to pmode
; we must deal with win87em specially because the win 2.x
; version gp faults. Since we have never shipped them a clean
; one to ship with their apps we must compensate here.
; If we are loading a win 2.x app in pmode we force the load
; of win87em.dll. For compatibility in real mode we just load
; the one they would have gotten anyway.
@@: cmp es:[bx].ne_expver,300h ; no special casing win3.0 apps
jae rm_no_win87em_here
push ds
smov ds,cs
mov ax,7
mov si,NRESCODEoffset win87em ; DS:SI = "WIN87EM"
call search_mod_dep_list
pop ds
jnc rm_no_win87em_here
push bx ; Load Win87em.dll
push es
cCall ILoadLibrary,<cs,si>
cmp ax,LME_MAXERR
jae @F
mov hDepFail,ax
@@: pop es
pop bx
rm_no_win87em_here:
lm_ret_ok:
mov di,es:[bx].ne_modtab ; ES:DI = pModIdx
mov cx,es:[bx].ne_cmod ; What is AX?
mov ax, es
retn
;----------------------------------------------------------------------
;
; LMImports - internal routine for LoadModule
;
;-----------------------------------------------------------------------
LMImports:
or cx, cx
jnz im_inc_dependencies_loop
jmp im_end_dependency_loop
im_inc_dependencies_loop:
push cx
mov si,es:[di]
push es
or si,si
jz im_next_dependencyj
add si,es:[ne_imptab] ; ES:SI = pname
xor ax,ax
mov al,es:[si] ; get length of name
inc si
mov cx, ax
mov bx, es ; pExe
;;;; Load the imported library.
push ds ; Copy the name and .EXE to namebuf
push di
smov es,ss
mov ds,bx
UnSetKernelDS
lea di,namebuf
mov bx,di
cld
rep movsb
mov byte ptr es:[di], 0 ; Null terminate
push bx
push es
cCall GetModuleHandle,<es,bx>
pop es
pop bx
or ax, ax
jz @F
pop di
pop ds
jmps im_imported_exe_already_loaded
@@: cmp ds:[ne_expver], 300h ; USE .DLL for 3.0, .EXE for lower
jae im_use_dll
mov es:[di][0],"E."
mov es:[di][2],"EX"
jmps im_done_extension
im_use_dll:
mov word ptr ss:[di][0],"D."
mov word ptr ss:[di][2],"LL"
im_done_extension:
mov byte ptr es:[di][4],0
pop di
pop ds
ResetKernelDS
cCall ILoadLibrary,<ss,bx>
cmp ax,LME_MAXERR
jae im_imported_exe_loaded
mov hDepFail,ax
xor ax,ax
im_next_dependencyj:
jmps im_next_dependency
im_imported_exe_already_loaded:
;;; push ax
;;; cCall IncExeUsage,<ax>
;;; pop ax
im_imported_exe_loaded:
cCall GetExePtr,<ax>
mov es,ax
assumes es,nothing ; assume that dep libraries
or es:[ne_flags],NEALLOCHIGH ; are smart
im_next_dependency:
pop es
assumes es,nothing
mov es:[di],ax
inc di
inc di
pop cx
dec cx
jz im_end_dependency_loop
jmp im_inc_dependencies_loop
im_end_dependency_loop:
mov es:[ne_usage], 0
cmp fLMdepth, 1
jne @F
push es ; Now set usage count of this
cCall IncExeUsage,<es> ; module and dependants
pop es
@@:
mov cx,hDepFail
inc cx
jz im_libs_ok
dec cx
mov abortresult,cx
im_abort_loadj:
jmp abort_load
im_libs_ok:
retn
;----------------------------------------------------------------------
;
; LMSegs - internal routine for LoadModule
;
;-----------------------------------------------------------------------
LMSegs:
; Do something about all those segments in the module.
IFNDEF NO_APPLOADER
test es:[ne_flags],NEAPPLOADER
jz @F
;* * special boot for AppLoader
push Win_PDB
push fLMdepth
mov fLMdepth, 0
mov ax, -1
cCall FarGetCachedFileHandle,<es,ax,ax>
Save <es>
cCall BootAppl,<es, ax> ;* returns BOOL
cCall FlushCachedFileHandle,<es>
pop fLMdepth
pop Win_PDB
or ax,ax
jnz lms_done
jmp abort_load
; retn
@@:
ENDIF ;!NO_APPLOADER
mov cx, AllocAllSegsRet
jcxz lms_done
lms_preload_segments:
mov si,es:[ne_segtab] ; ES:SI = pSeg
mov cx,es:[ne_cseg]
xor di,di
lms_ps_loop:
inc di
test es:[si].ns_flags,NSPRELOAD
jz lms_next_segment
cmp es:[ne_align], 4 ; Must be at least paragraph aligned
jb lms_ReadFromFile
cmp hBlock, 0
jne lms_ReadFromMemory
jmps lms_ReadFromFile
lms_next_segment:
add si,SIZE new_seg1
loop lms_ps_loop
lms_done:
retn
lms_ReadFromFile:
push cx
push es
cCall FarLoadSegment,<es,di,fh,fh>
jmps lms_DoneLoad
lms_ReadFromMemory:
push cx
push es
cCall GlobalLock,<hBlock>
or dx, dx
jnz lms_still_here
cCall GlobalFree,<hBlock>
mov hBlock, 0
pop es
pop cx
jmps lms_ReadFromFile
lms_still_here:
ifdef WOW
cCall AllocSelectorWOW,<dx> ; same as allocselector. but the
mov RefSelector, dx ; new descriptor is not set.
else
cCall AllocSelector,<dx>
endif
pop es
mov bx, es:[si].ns_sector
xor dx, dx
mov cx, es:[ne_align]
push es
@@:
shl bx, 1
rcl dx, 1
loop @B
sub bx, off_FileOffset
sbb dx, seg_FileOffset
push ax
push es
ifdef WOW
; same as longptradd. but the descriptor 'RefSelector' is used
; to set the descriptor of 'ax'
cCall LongPtrAddWOW,<ax,cx,dx,bx, RefSelector, 1> ; (cx is 0)
else
cCall LongPtrAdd,<ax,cx,dx,bx> ; (cx is 0)
endif
pop es
dec cx
cCall FarLoadSegment,<es,di,dx,cx>
pop cx
push ax
cCall FreeSelector,<cx>
cCall GlobalUnlock,<hBlock>
pop ax
lms_DoneLoad:
pop es
pop cx
or ax,ax
jz lms_abort_load1
jmp lms_next_segment
lms_abort_load1:
jmp abort_load
;-----------------------------------------------------------------------
;
; LMLetsGo -
;
;-----------------------------------------------------------------------
LMLetsGo:
push es
push Win_PDB ; Save current PDB
push topPDB ; Set it to Kernel's
pop Win_PDB
mov ax, -1
cCall FarGetCachedFileHandle,<es,ax,ax>
cmp hBlock,0
je lg_resFromFile
cCall PreloadResources,<es,ax,hBlock,FileOffset>
jmps lg_gotRes
lg_resFromFile:
xor dx, dx
cCall PreloadResources,<es,ax,dx,dx,dx>
lg_gotRes:
pop Win_PDB ; Restore PDB
pop es
mov ax,lpPBlock.off
mov dx,lpPBlock.sel
and ax,dx
inc ax
jnz lg_huh
mov lpPBlock.off,ax
mov lpPBlock.sel,ax
lg_huh: xor ax,ax ; free 0
push fLMdepth
mov fLMdepth, 0
push es
cCall StartModule,<ax,lpPBlock,es,fh>
pop es
mov hResult,ax
or ax,ax
jnz @F
jmp abort_load0
@@: test es:[ne_flags],NENOTP
jnz lg_not_a_process2
pop si
cCall CloseApplEnv,<hResult,pExe>
push bx
mov hResult,ax
mov hTDB,dx
lg_not_a_process2:
pop fLMdepth
retn
;----------------------------------------------------------------------
;
; LMPrevInstance - internal routine for LoadModule
; Load an app/dll if a previous instance in memory
; Entry:
; ax = handle of previous instance
; Exit:
; ax = status to return
; dx = hTDB = TDB
; Error:
; ax < LME_MAXERR
;
;-----------------------------------------------------------------------
LMPrevInstance:
mov es,ax
mov dx,es:[ne_flags]
mov si,ax
mov pExe,ax ; why store in pExe and hExe?
mov hResult,0
; Error if dynamically linking to non-library module.
mov ax,lpPBlock.off
and ax,lpPBlock.sel
inc ax
jnz pi_app
test dx,NENOTP
jnz @F
mov ax, LME_LINKTASK ; can't dynalink to a task
retn
@@: mov lpPBlock.off,ax ; AX == 0
mov lpPBlock.sel,ax
pi_app:
test dx,NEINST
jnz @F
jmp pi_not_inst
@@: call LMCheckHeap
or ax, ax
jnz @F
mov ax, LME_MEM ; Out of (gdi/user) memory
retn
@@:
ifdef WOW
;
; if WOA invoked by app (not fWOA) fail it
;
cmp fWOA,0 ; fWOA
jnz pi_not_multiple_data
cld
push si
push di
mov di, es:[ne_restab]
inc di
mov si, dataOffset WOAName
mov cx, 4
repe cmpsw
pop di
pop si
jnz @F
mov ax, LME_WOAWOW32
retn
@@:
endif
; We refuse to load multiple instances of apps that have
; multiple data segments. This is because we cannot do
; fixups to these other data segments. What happens is
; that the second copy of the app gets fixed up to the
; data segments of the first application. For the case
; of read-only data segments we make an exception since
; what does it matter who the segments belong to?
mov ax, 2 ; if we have >= 2 dsegs we die
mov es,si
mov cx,es:[ne_cseg]
mov bx,es:[ne_segtab]
pi_next_seg:
test es:[bx].ns_flags,NSDATA ; scum! this barely works!
jz @F
test es:[bx].ns_flags,NSERONLY
jnz @F
dec ax
jnz @F ; two data segments is one too many!
pi_mds: mov ax, LME_APPMDS
retn
@@: add bx,SIZE NEW_SEG1
loop pi_next_seg
pi_not_multiple_data: ; Prepare the application
cCall OpenApplEnv,<lpPBlock,si,fWOA>
cCall GetInstance,<si> ; Why do we call this?
mov di,ax
cCall IncExeUsage,<si>
cCall AllocAllSegs,<si> ; Can we get memory?
inc ax
jnz @F
cCall DecExeUsage,<si> ; AllocAllSegs failed, Dec Usage
jmps pi_mem ; Must have failed from no memory
@@: mov ax,-1
cCall StartModule,<di,lpPBlock,si,ax>
; mov hResult,ax
or ax,ax
jnz @F
mov es,si ; StartModule failed, FreeModule
mov si,es:[ne_pautodata]
cCall FreeModule,<es:[si].ns_handle>
pi_mem: mov ax, LME_MEM
retn
@@: mov si, fLMdepth
mov fLMdepth, 0
cCall CloseApplEnv,<ax,pExe>
mov fLMdepth, bx
mov hTDB,dx
retn
pi_not_inst:
mov ax,es:[ne_autodata] ; Make sure data segment is loaded.
or ax,ax
jz @F
or bx,-1
push es
cCall FarLoadSegment,<es,ax,bx,bx>
pop es
or ax,ax
jz pi_end ; yes, AX is already 0, but ...
@@:
push es ; for GetInstance
cCall IncExeUsage,<es>
cCall GetInstance ; ,<pExe>
pi_end:
retn
;----------------------------------------------------------------------
;
; LMCleanUp - internal routine for LoadModule
;
;-----------------------------------------------------------------------
LMCleanUp:
ifdef WOW
cmp LMHadPEDLL,0
je @F
cmp ax, LME_MAXERR
jae @F
mov ax,LME_PE ; Reflect real error we tried to mask
KernelLogError <DBF_WARNING>,ERR_LOADMODULE,"Could not find Win16 copy of Win32 DLL, returning LME_PE."
@@:
endif
push ax ; save status for future
cmp ax, LME_MAXERR
jae @F
cCall my_lclose,<fh>
or fh, -1
; Restore PDB if needed
@@: mov ax, -1
xchg SavePDB, ax
inc ax
jz @F
dec ax
mov Win_PDB, ax
; Free FastLoad block if allocated
@@: cmp hBlock,0
je @F
cCall GlobalFree,<hBlock>
mov hBlock,0
; Free app environment if failure and this was an app
@@:
pop ax
cmp ax,LME_MAXERR
jae @F
if KDEBUG
cmp ax, LME_INVEXE ; invalid format (WinOldAp)
jz cu_fred
cmp ax, LME_PE ; Win32 Portable Exe - try to load it
jz cu_fred
push ax
push bx
push es
les bx, lpModuleName
KernelLogError <DBF_WARNING>,ERR_LOADMODULE,"Error 0x#ax loading @ES:BX"
pop es
pop bx
pop ax
endif
cu_fred:
cmp loadTDB,0
je @F
mov bx,pExe
cmp bx,LME_MAXERR ; Did we load an ExeHeader?
jbe @F
mov es,bx
test es:[ne_flags],NENOTP
jnz @F
mov si, fLMdepth
mov fLMdepth, 0
cCall CloseApplEnv,<ax,es>
mov fLMdepth, bx
; shouldn't cache file handles on removable devices cause it
; makes share barf when the user swaps disks. this kills some
; install apps. CraigC 8/8/91
@@:
push ax
cmp ax, LME_MAXERR ; real?
jbe @F
cmp OnHardDisk, 0 ; is it on a removable device?
jne @F
cCall GetExePtr, <ax> ; get module handle
cCall FlushCachedFileHandle, <ax> ; blow it off
;** Log this entry only if in diagnostic mode
@@:
cmp fDiagMode,0 ; Only log if in diag mode
je LM_NoDiagExit
cmp fBooting,0 ; Only log if booting
je LM_NoDiagExit
pop ax ; Get the return code early
push ax
pusha ; Save all the registers
push ds
push es
;** Write out the appropriate string
mov si,ax ; Save the return value
cmp ax,LME_MAXERR
jae LM_DiagSuccess
mov ax,dataOFFSET szLoadFail ; Write the string
jmp SHORT LM_DiagOutput
LM_DiagSuccess:
mov ax,dataOFFSET szLoadSuccess ; Write the string
LM_DiagOutput:
cCall DiagOutput, <ds,ax>
cCall DiagOutput, <lpModuleName>
cmp si,LME_MAXERR ; Don't do this on success
jae SHORT LM_DiagSuccessSkip
;** Log a message complete with the failure code
mov ax,si ; Get the failure code
shr al, 4
mov bx,dataOFFSET szCodeString ; Point to the second digit
push NREScodeOffset afterHex
call toHex
mov ax, si
inc bx
toHex:
and al,0fh ; Get low hex digit
add al,'0' ; Convert to ASCII
cmp al,'9' ; Letter?
jbe @F ; Yes
add al,'A' - '0' ; Make it a letter
@@: mov [bx],al ; Save the digit
retn
afterHex:
mov ax,dataOFFSET szFailCode ; Get the string 'Failure code is '
cCall DiagOutput, <ds,ax>
LM_DiagSuccessSkip:
mov ax,dataOFFSET szCRLF
cCall DiagOutput, <ds,ax>
pop es
pop ds
popa
LM_NoDiagExit:
pop ax
dec fLMdepth
mov dx,hTDB
retn
;@@end
;shl_ax16: ; shift AX into DX:AX by cl bits
; mov dx, ax
; shl ax, cl
; neg cl
; add cl, 16 ; cl = 16 - cl
; shr dx, cl
; retn
LoadModuleEnd: ; jmp here to clean up stack and RET
ifdef WOW
cmp ax, LME_MAXERR
jb @F
lmntex:
jmp LoadModuleExit
@@:
;
; Exec For Non 16 Bit Windows Apps
;
;
; WIN 32S App ? yes -> let NT load it
;
cmp ax,LME_PE
je LM_NTLoadModule
;
; if an app is spawning WOA (NOT our internal load-fWOA),
; Patch lpModuleName to -1 let NT load it
;
cmp ax,LME_WOAWOW32
jne @F
mov word ptr lpModuleName[2], -1 ; patch lpModuleName
mov word ptr lpModuleName[0], -1
jmp short LM_NTLoadModule
@@:
; Errors 11-15 -> let NT load it
cmp ax,LME_RMODE
jae lmntex
cmp ax,LME_VERS
jbe lmntex
public LM_NTLoadModule
LM_NTLoadModule:
;
; WOW Execs non-windows apps using WINOLDAP.
;
; First check for loading of a 32bit DLL. lpPBlock will be -1
; in such a case.
push ax
mov ax,lpPBlock.off
and ax,lpPBlock.sel
inc ax
pop ax
jz LoadModuleExit
;
; This is an EXE, but the LME_PE failure code might have come from
; an implicitly linked DLL. If so, we don't want to try having
; Win32 lauch the win16 EXE, as it will just come back to us.
;
cmp ax,LME_PE
jne @F
cmp ax,hDepFail
je short LoadModuleExit
@@:
sub sp, 80 ; alloc space for cmdline
mov di, sp
smov es, ss
mov word ptr es:[di], 0 ; set WindOldApp CmdLine to NULL
regptr esdi,es,di
cCall WowLoadModule,<lpModuleName, lpPBlock, esdi>
;
; if ax < 33 an error occurred
;
cmp ax, 33
jb ex8
or Kernel_flags[1],KF1_WINOLDAP
mov ax, ss
les si,lpPBlock
mov es:[si].lpcmdline.off,di
mov es:[si].lpcmdline.sel,ax
mov si,dataOffset WOAName
regptr dssi,ds,si
cCall LoadModule,<dssi, lpPBlock>
cmp ax,32 ; check for error...
jae ex8
;
; LoadModule of WinOldApp failed
; Call WowLoadModule to clean up process handle
;
push ax
mov ax, ss
regptr axdi,ax,di
cCall WowLoadModule,<0, lpPBlock, axdi>
pop ax
cmp ax,2 ; file not found?
jnz ex7 ; no, return error
mov al, LME_WOAWOW32 ; flag WINOLDAP error
ex7:
or ax,ax ; out of memory?
jnz ex8
mov ax,8h ; yes, return proper error code
ex8:
add sp,80 ; free space for cmdline
endif; WOW
LoadModuleExit:
RESET_DOS_FLAG_EXEC_OPEN
cEnd
?DOS5 = ?SAV5
;-----------------------------------------------------------------------;
; My_lclose
;
; Close file handle if it isn't -1.
;
; Entry:
;
; Returns:
;
; Registers Destroyed:
;
; History:
;
;-----------------------------------------------------------------------;
assumes ds,nothing
assumes es,nothing
cProc My_lclose,<PUBLIC,NEAR>
parmW fh
cBegin
mov ax,fh
inc ax
jz mlc_exit
cCall _lclose,<fh>
mlc_exit:
cEnd
;-----------------------------------------------------------------------;
; WarnRealMode
;
; Trayf for files in the form "Insert WIN.EXE disk in drive A:"
;
; Entry:
;
; Returns:
;
; Registers Destroyed:
;
; History:
; Sat 07-Oct-1989 17:12:43 -by- David N. Weise [davidw]
; Wrote it! A month or so ago.
;-----------------------------------------------------------------------;
assumes ds,nothing
assumes es,nothing
cProc WarnRealMode,<PUBLIC,NEAR>
cBegin nogen
ReSetKernelDS
push Win_PDB
push fLMDepth
cld
mov ax,IDCANCEL ; assume booting
test fBooting,1
jnz promptly_done
cmp pMBoxProc.sel,0 ; is there a USER around yet?
jz promptly_done
push di
push si
push es
mov es,cx
ifdef FE_SB
;Japan and Korea declare that they need more space for DBCS msg.
;It sounds like this is one of common requirement for DBCS enabling
;although Taiwan doesn't claim she has the same requirement.
;I enclosed this code fragment under DBCS and it can be removed
;if somebody thinks it is not necessary.
sub sp, 530
else
sub sp,512
endif
mov di,sp
mov si,offset msgRealModeApp1
push ds
smov ds,cs
UnSetKernelDS
call StartString
smov ds,cs
mov si,offset msgRealModeApp2
call Append
pop ds
ReSetKernelDS
mov bx,sp
xor ax,ax
push ax ; Null hwnd
push ss
push bx ; (lpstr)text
push cs
mov ax,offset szProtectCap
push ax ; (lpstr)caption
mov ax,MB_OKCANCEL or MB_ICONEXCLAMATION or MB_DEFBUTTON2 or MB_SYSTEMMODAL
push ax ; wType
call [pMBoxProc] ; Call USER.MessageBox
ifdef FE_SB
add sp, 530
else
add sp,512
endif
pop es
pop si
pop di
promptly_done:
pop fLMDepth
pop Win_PDB
ret
cEnd nogen
assumes ds,nothing
assumes es,nothing
StartString:
call Append ; append first string
; Now append the file name
push di
lea di,[bx].opFile ; skip past length, date, time
call NResGetPureName ; strip off drive and directory
smov ds,es
mov si,di
pop di
; Append ASCIIZ string to output buffer, DS:DX points to string
assumes ds,nothing
assumes es,nothing
Append: lodsb
stosb
or al,al
jnz Append
dec di
ret
assumes ds,nothing
assumes es,nothing
;-----------------------------------------------------------------------;
; NResGetPureName
;
; Returns a pointer the the filename off the end of a path
;
; Entry:
; ES:DI => path\filename
; Returns:
; ES:DI => filename
; Registers Destroyed:
;
; History:
; Wed 18-Oct-1989 20:01:25 -by- David N. Weise [davidw]
;
;-----------------------------------------------------------------------;
assumes ds,nothing
assumes es,nothing
cProc NResGetPureName,<PUBLIC,NEAR>
cBegin nogen
ifdef FE_SB
;
; It is not possible to search filename delimiter by backword search
; in case of DBCS version. so we use forword search instead.
;
mov bx,di
iup0:
mov al,es:[di]
test al,al ; end of string?
jz iup2 ; jump if so
inc di
cmp al,'\'
jz iup1
cmp al,'/'
jz iup1
cmp al,':'
jz iup1
call FarMyIsDBCSLeadByte ; see if char is DBC
jc iup0 ; jump if not a DBC
inc di ; skip to detemine 2nd byte of DBC
jmp iup0
iup1:
mov bx,di ; update purename candidate
jmp iup0
iup2:
mov di,bx ; di points purename pointer
ret
else
cld
xor al,al
mov cx,-1
mov bx,di
repne scasb
inc cx
inc cx
neg cx
iup0: cmp bx,di ; back to beginning of string?
jz iup1 ; yes, di points to name
mov al,es:[di-1] ; get next char
cmp al,'\' ; next char a '\'?
jz iup1 ; yes, di points to name
cmp al,'/' ; next char a '/'
jz iup1
cmp al,':' ; next char a ':'
jz iup1 ; yes, di points to name
dec di ; back up one
jmp iup0
iup1: ret
endif
cEnd nogen
;-----------------------------------------------------------------------;
; search_mod_dep_list
;
; Searches the dependent module list for the passed in name.
;
; Entry:
; AX = length of name to search for
; CX = count of modules
; DS:SI => module name to search for
; ES:DI => module table
; Returns:
;
; Registers Preserved:
; AX,BX,CX,DI,SI,ES
;
; Registers Destroyed:
;
; History:
; Sat 07-Oct-1989 17:12:43 -by- David N. Weise [davidw]
;
;-----------------------------------------------------------------------;
assumes ds,nothing
assumes es,nothing
cProc search_mod_dep_list,<PUBLIC,NEAR>
cBegin nogen
push bx
push cx
push di
mov bx,di
search_mod_loop:
mov di,es:[bx] ; es:di = offset into imptable
add di,es:[ne_imptab]
cmp es:[di],al ; does len of entry = sizeof(doscalls)
jnz get_next_entry
push cx ; cx holds count of module entries.
push si
inc di ; es:di = import module name
mov cx,ax
rep cmpsb
pop si
pop cx
stc
jz got_it
get_next_entry:
inc bx
inc bx
loop search_mod_loop
clc
got_it: pop di
pop cx
pop bx
ret
cEnd nogen
;-----------------------------------------------------------------------;
; LMCheckHeap
;
; This checks for 4K free space in both USER's and GDI's data
; segments. If this space does not exist then we will not load
; the app. This is better than the hose-bag way we did things
; under win 1 and 2.
;
; Entry:
; nothing
;
; Returns:
; AX != 0 lots o'space
;
; Registers Destroyed:
; BX,CX
;
; History:
; Sat 28-Oct-1989 17:49:09 -by- David N. Weise [davidw]
; Wrote it!
;-----------------------------------------------------------------------;
assumes ds,nothing
assumes es,nothing
MIN_RSC = 10
cProc LMCheckHeap,<PUBLIC,NEAR>,<ds>
cBegin
SetKernelDSNRES
ifdef WOW
; USER32 and GDI32 can deal with memory alloc no need check heaps on WOW
mov ax,-1 ; WOW doesn't have GDI or User heaps
else ; so don't check them.
mov ax, MIN_RSC
cmp word ptr pGetFreeSystemResources[2],0
jz @F
cCall pGetFreeSystemResources,<0>
cmp ax, MIN_RSC
jae @F
if kdebug ; test low memory code if DEBUG
krDebugOut DEB_WARN, "Resources #ax% - this tests your error handling code"
or al, 1
else
xor ax, ax ; you failed - g'bye
endif
@@:
endif ; WOW
ReSetKernelDS
cEnd
if 0
cProc check_gdi_user_heap_space,<PUBLIC,NEAR>
cBegin nogen
ReSetKernelDS
ifdef WOW
; USER32 and GDI32 can deal with memory alloc no need check heaps on WOW
mov ax,-1 ; WOW doesn't have GDI or User heaps
else ; so don't check them.
cmp graphics,0
jz c_ret
push dx
push es
push ds
mov ds,hGDI
UnSetKernelDS
call checkit_bvakasha
or ax,ax
jz c_exit
pop ds
ReSetKernelDS
push ds
mov ds,hUser
UnSetKernelDS
call checkit_bvakasha
c_exit: pop ds
pop es
pop dx
c_ret: ret
public checkit_bvakasha
checkit_bvakasha:
mov bx,ds:[ne_pautodata]
cCall FarMyLock,<ds:[bx].ns_handle>
mov ds,ax
call LocalCountFree
sub ax,4095
ja cguhs_exit
neg ax
mov bx,LA_MOVEABLE
cCall LocalAlloc,<bx,ax>
or ax,ax
jz cguhs_exit
free_User_piece:
cCall LocalFree,<ax>
mov ax,sp ; return non-zero
cguhs_exit:
endif ;WOW
ret
cEnd nogen
endif
;-----------------------------------------------------------------------;
; GetHeapSpaces
;
;
; Entry:
; nothing
;
; Returns:
; AX = free space (bytes) of User heap assuming heap can grow to 64K
; DX = free space (bytes) of GDI heap assuming heap can grow to 64K
; Registers Destroyed:
;
; History:
; Wed 10-Jan-1990 22:27:38 -by- David N. Weise [davidw]
; Wrote it!
;-----------------------------------------------------------------------;
assumes ds,nothing
assumes es,nothing
cProc GetHeapSpaces,<PUBLIC,FAR>,<di,si>
parmW hInstance
cBegin
call MapDStoDATA
ReSetKernelDS
cCall FarMyLock,<hInstance>
or ax,ax
jz ghs_exit
mov ds,ax
cmp ds:[ne_magic],NEMAGIC
jnz ghs_must_be_data
mov bx,ds:[ne_pautodata]
cCall FarMyLock,<ds:[bx].ns_handle>
mov ds,ax
ghs_must_be_data:
call LocalCountFree
mov si,ax
cCall GlobalSize,<ds>
neg ax
add ax,si ; AX = size of free assuming 64K
mov cx,si ; CX = size of free
mov dx,-1
sub dx,ds:[pLocalHeap] ; DX = size of heap
ghs_exit:
cEnd
;-----------------------------------------------------------------------;
; IsROMModule
;
; Determines if an app with a given name is a ROM application
;
; Entry:
; Returns:
; Registers Destroyed:
;
; History:
; Wed 01-May-1991 13:11:38 -by- Craig A. Critchley [craigc]
; Wrote it!
;-----------------------------------------------------------------------;
cProc IsROMModule, <FAR, PUBLIC>
cBegin <nogen>
xor ax, ax
retf 6
cEnd <nogen>
;-----------------------------------------------------------------------;
; IsROMFile
;
; Determines if a file is in ROM
;
; Entry:
; Returns:
; Registers Destroyed:
;
; History:
; 8/8/91 -- vatsanp -- adapted this for true-type files in ROM
; from IsROMModule [ craigc]
; Wed 01-May-1991 13:11:38 -by- Craig A. Critchley [craigc]
; Wrote it!
;-----------------------------------------------------------------------;
cProc IsROMFile, <FAR, PUBLIC>
cBegin <nogen>
xor ax, ax
retf 6
cEnd <nogen>
sEnd NRESCODE
end
| 32.115896
| 113
| 0.439966
|
1f2cd39c17695ff15faa2c1eca2a189417cb15fe
| 357
|
asm
|
Assembly
|
libsrc/stdio/m5/fputc_cons_rom.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 640
|
2017-01-14T23:33:45.000Z
|
2022-03-30T11:28:42.000Z
|
libsrc/stdio/m5/fputc_cons_rom.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 1,600
|
2017-01-15T16:12:02.000Z
|
2022-03-31T12:11:12.000Z
|
libsrc/stdio/m5/fputc_cons_rom.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 215
|
2017-01-17T10:43:03.000Z
|
2022-03-23T17:25:02.000Z
|
;
; Basic video handling for the SORD M5
;
; (HL)=char to display
;
; $Id: fputc_cons.asm,v 1.6+ (GIT imported) $
;
SECTION code_clib
PUBLIC fputc_cons_native
EXTERN msxbios
INCLUDE "target/m5/def/m5bios.def"
.fputc_cons_native
ld hl,2
add hl,sp
ld a,(hl)
IF STANDARDESCAPECHARS
cp 10
jr nz,nocr
ld a,13
.nocr
ENDIF
ld ix,DSPCH
jp msxbios
| 12.75
| 45
| 0.705882
|
67da0f6015e644c6c7b90e92a5bd018171324e57
| 1,924
|
asm
|
Assembly
|
programs/oeis/128/A128543.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/128/A128543.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/128/A128543.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A128543: a(n) = floor(2^(n-2)*3*n).
; 1,6,18,48,120,288,672,1536,3456,7680,16896,36864,79872,172032,368640,786432,1671168,3538944,7471104,15728640,33030144,69206016,144703488,301989888,629145600,1308622848,2717908992,5637144576,11676942336,24159191040,49928994816,103079215104,212600881152,438086664192,901943132160,1855425871872,3813930958848,7834020347904,16080357556224,32985348833280,67619965108224,138538465099776,283673999966208,580542139465728,1187472557998080,2427721674129408,4960996464525312,10133099161583616,20688410788233216,42221246506598400,86131342873460736,175640385467449344,358036170375954432,729583139634020352,1486187877032263680,3026418949592973312,6160924290242838528,12538021362599460864,25508388289426489344,51881467707308113920,105492317671526498304,214443399856873537536,435804328741388156928,885443715538058477568,1798557547186681282560,3652455326594491219968,7415591117631239749632,15052543164146994118656,30547808186063017476096,61981060087664093429760,125733007606404303814656,255007790074960841539584,517099129874226150899712,1048365359197061237440512,2125064917291340346163200,4306798232377116434890752,8726933260343104354910208,17680540111863951680077824,35814427406083389300670464,72535549176877750482370560,146884487083177444726800384,297395751625198776977719296,602045058168085329003675648,1218597226171546208103825408,2466208672013843516400599040,4990445783369189233187094528,10096948445421382867145981952,20426010648208774535835549696,41316248811149566674758270976,83560952651763168555690885120,168978815362454407523730456576,341671450842764955872158285824,690770541921242193393711316992,1396396364313908950086212124672,2822503289570667026770003230720,5704427701027032306735164424192,11527697645825461119860644773888,23293079779193715252501921398784,47061528533473016530565106499584,95073795017117205112252740403200
mov $1,$0
mul $0,3
add $0,3
mov $2,2
pow $2,$1
mul $0,$2
div $0,2
| 174.909091
| 1,818
| 0.920478
|
28c71c314067ec2bd5ce51680cb1d9b1be017e43
| 8,759
|
asm
|
Assembly
|
snapgear_linux/lib/libgmp/mpn/x86/pentium/sqr_basecase.asm
|
impedimentToProgress/UCI-BlueChip
|
53e5d48b79079eaf60d42f7cb65bb795743d19fc
|
[
"MIT"
] | null | null | null |
snapgear_linux/lib/libgmp/mpn/x86/pentium/sqr_basecase.asm
|
impedimentToProgress/UCI-BlueChip
|
53e5d48b79079eaf60d42f7cb65bb795743d19fc
|
[
"MIT"
] | null | null | null |
snapgear_linux/lib/libgmp/mpn/x86/pentium/sqr_basecase.asm
|
impedimentToProgress/UCI-BlueChip
|
53e5d48b79079eaf60d42f7cb65bb795743d19fc
|
[
"MIT"
] | 3
|
2016-06-13T13:20:56.000Z
|
2019-12-05T02:31:23.000Z
|
# Intel P5 mpn_sqr_basecase -- square an mpn number.
#
# P5: approx 8 cycles per crossproduct, or 15.5 cycles per triangular
# product at around 20x20 limbs.
# Copyright (C) 1999, 2000 Free Software Foundation, Inc.
#
# This file is part of the GNU MP Library.
#
# The GNU MP Library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Library General Public License as published by
# the Free Software Foundation; either version 2 of the License, or (at your
# option) any later version.
#
# The GNU MP Library is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
# License for more details.
#
# You should have received a copy of the GNU Library General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA.
include(`../config.m4')
# void mpn_sqr_basecase (mp_ptr dst, mp_srcptr src, mp_size_t size);
#
# Calculate src,size squared, storing the result in dst,2*size.
#
# The algorithm is basically the same as mpn/generic/sqr_basecase.c, but a
# lot of function call overheads are avoided, especially when the size is
# small.
defframe(PARAM_SIZE,12)
defframe(PARAM_SRC, 8)
defframe(PARAM_DST, 4)
.text
ALIGN(8)
PROLOGUE(mpn_sqr_basecase)
deflit(`FRAME',0)
movl PARAM_SIZE, %edx
movl PARAM_SRC, %eax
cmpl $2, %edx
movl PARAM_DST, %ecx
je L(two_limbs)
movl (%eax), %eax
ja L(three_or_more)
#------------------------------------------------------------------------------
# one limb only
# eax src
# ebx
# ecx dst
# edx
mull %eax
movl %eax, (%ecx)
movl %edx, 4(%ecx)
ret
#------------------------------------------------------------------------------
ALIGN(8)
L(two_limbs):
# eax src
# ebx
# ecx dst
# edx size
pushl %ebp
pushl %edi
pushl %esi
pushl %ebx
movl %eax, %ebx
movl (%eax), %eax
mull %eax # src[0]^2
movl %eax, (%ecx) # dst[0]
movl %edx, %esi # dst[1]
movl 4(%ebx), %eax
mull %eax # src[1]^2
movl %eax, %edi # dst[2]
movl %edx, %ebp # dst[3]
movl (%ebx), %eax
mull 4(%ebx) # src[0]*src[1]
addl %eax, %esi
popl %ebx
adcl %edx, %edi
adcl $0, %ebp
addl %esi, %eax
adcl %edi, %edx
movl %eax, 4(%ecx)
adcl $0, %ebp
popl %esi
movl %edx, 8(%ecx)
movl %ebp, 12(%ecx)
popl %edi
popl %ebp
ret
#------------------------------------------------------------------------------
ALIGN(8)
L(three_or_more):
# eax src low limb
# ebx
# ecx dst
# edx size
cmpl $4, %edx
pushl %ebx
deflit(`FRAME',4)
movl PARAM_SRC, %ebx
jae L(four_or_more)
#------------------------------------------------------------------------------
# three limbs
# eax src low limb
# ebx src
# ecx dst
# edx size
pushl %ebp
pushl %edi
mull %eax # src[0] ^ 2
movl %eax, (%ecx)
movl %edx, 4(%ecx)
movl 4(%ebx), %eax
xorl %ebp, %ebp
mull %eax # src[1] ^ 2
movl %eax, 8(%ecx)
movl %edx, 12(%ecx)
movl 8(%ebx), %eax
pushl %esi # risk of cache bank clash
mull %eax # src[2] ^ 2
movl %eax, 16(%ecx)
movl %edx, 20(%ecx)
movl (%ebx), %eax
mull 4(%ebx) # src[0] * src[1]
movl %eax, %esi
movl %edx, %edi
movl (%ebx), %eax
mull 8(%ebx) # src[0] * src[2]
addl %eax, %edi
movl %edx, %ebp
adcl $0, %ebp
movl 4(%ebx), %eax
mull 8(%ebx) # src[1] * src[2]
xorl %ebx, %ebx
addl %eax, %ebp
# eax
# ebx zero, will be dst[5]
# ecx dst
# edx dst[4]
# esi dst[1]
# edi dst[2]
# ebp dst[3]
adcl $0, %edx
addl %esi, %esi
adcl %edi, %edi
adcl %ebp, %ebp
adcl %edx, %edx
movl 4(%ecx), %eax
adcl $0, %ebx
addl %esi, %eax
movl %eax, 4(%ecx)
movl 8(%ecx), %eax
adcl %edi, %eax
movl 12(%ecx), %esi
adcl %ebp, %esi
movl 16(%ecx), %edi
movl %eax, 8(%ecx)
movl %esi, 12(%ecx)
adcl %edx, %edi
popl %esi
movl 20(%ecx), %eax
movl %edi, 16(%ecx)
popl %edi
popl %ebp
adcl %ebx, %eax # no carry out of this
popl %ebx
movl %eax, 20(%ecx)
ret
#------------------------------------------------------------------------------
ALIGN(8)
L(four_or_more):
# eax src low limb
# ebx src
# ecx dst
# edx size
# esi
# edi
# ebp
#
# First multiply src[0]*src[1..size-1] and store at dst[1..size].
deflit(`FRAME',4)
pushl %edi
FRAME_pushl()
pushl %esi
FRAME_pushl()
pushl %ebp
FRAME_pushl()
leal (%ecx,%edx,4), %edi # dst end of this mul1
leal (%ebx,%edx,4), %esi # src end
movl %ebx, %ebp # src
negl %edx # -size
xorl %ebx, %ebx # clear carry limb and carry flag
leal 1(%edx), %ecx # -(size-1)
L(mul1):
# eax scratch
# ebx carry
# ecx counter, negative
# edx scratch
# esi &src[size]
# edi &dst[size]
# ebp src
adcl $0, %ebx
movl (%esi,%ecx,4), %eax
mull (%ebp)
addl %eax, %ebx
movl %ebx, (%edi,%ecx,4)
incl %ecx
movl %edx, %ebx
jnz L(mul1)
# Add products src[n]*src[n+1..size-1] at dst[2*n-1...], for
# n=1..size-2.
#
# The last two products, which are the end corner of the product
# triangle, are handled separately to save looping overhead. These
# are src[size-3]*src[size-2,size-1] and src[size-2]*src[size-1].
# If size is 4 then it's only these that need to be done.
#
# In the outer loop %esi is a constant, and %edi just advances by 1
# limb each time. The size of the operation decreases by 1 limb
# each time.
# eax
# ebx carry (needing carry flag added)
# ecx
# edx
# esi &src[size]
# edi &dst[size]
# ebp
adcl $0, %ebx
movl PARAM_SIZE, %edx
movl %ebx, (%edi)
subl $4, %edx
negl %edx
jz L(corner)
L(outer):
# ebx previous carry limb to store
# edx outer loop counter (negative)
# esi &src[size]
# edi dst, pointing at stored carry limb of previous loop
pushl %edx # new outer loop counter
leal -2(%edx), %ecx
movl %ebx, (%edi)
addl $4, %edi
addl $4, %ebp
xorl %ebx, %ebx # initial carry limb, clear carry flag
L(inner):
# eax scratch
# ebx carry (needing carry flag added)
# ecx counter, negative
# edx scratch
# esi &src[size]
# edi dst end of this addmul
# ebp &src[j]
adcl $0, %ebx
movl (%esi,%ecx,4), %eax
mull (%ebp)
addl %ebx, %eax
movl (%edi,%ecx,4), %ebx
adcl $0, %edx
addl %eax, %ebx
movl %ebx, (%edi,%ecx,4)
incl %ecx
movl %edx, %ebx
jnz L(inner)
adcl $0, %ebx
popl %edx # outer loop counter
incl %edx
jnz L(outer)
movl %ebx, (%edi)
L(corner):
# esi &src[size]
# edi &dst[2*size-4]
movl -8(%esi), %eax
movl -4(%edi), %ebx # risk of data cache bank clash here
mull -12(%esi) # src[size-2]*src[size-3]
addl %eax, %ebx
movl %edx, %ecx
adcl $0, %ecx
movl -4(%esi), %eax
mull -12(%esi) # src[size-1]*src[size-3]
addl %ecx, %eax
movl (%edi), %ecx
adcl $0, %edx
movl %ebx, -4(%edi)
addl %eax, %ecx
movl %edx, %ebx
adcl $0, %ebx
movl -4(%esi), %eax
mull -8(%esi) # src[size-1]*src[size-2]
movl %ecx, 0(%edi)
addl %eax, %ebx
adcl $0, %edx
movl PARAM_SIZE, %eax
negl %eax
movl %ebx, 4(%edi)
addl $1, %eax # -(size-1) and clear carry
movl %edx, 8(%edi)
#------------------------------------------------------------------------------
# Left shift of dst[1..2*size-2], high bit shifted out becomes dst[2*size-1].
L(lshift):
# eax counter, negative
# ebx next limb
# ecx
# edx
# esi
# edi &dst[2*size-4]
# ebp
movl 12(%edi,%eax,8), %ebx
rcll %ebx
movl 16(%edi,%eax,8), %ecx
rcll %ecx
movl %ebx, 12(%edi,%eax,8)
movl %ecx, 16(%edi,%eax,8)
incl %eax
jnz L(lshift)
adcl %eax, %eax # high bit out
movl PARAM_SRC, %esi
movl PARAM_SIZE, %ecx # risk of cache bank clash
movl %eax, 12(%edi) # dst most significant limb
#------------------------------------------------------------------------------
# Now add in the squares on the diagonal, namely src[0]^2, src[1]^2, ...,
# src[size-1]^2. dst[0] hasn't yet been set at all yet, and just gets the
# low limb of src[0]^2.
movl (%esi), %eax # src[0]
leal (%esi,%ecx,4), %esi # src end
negl %ecx
mull %eax
movl %eax, 16(%edi,%ecx,8) # dst[0]
movl %edx, %ebx
addl $1, %ecx # size-1 and clear carry
L(diag):
# eax scratch (low product)
# ebx carry limb
# ecx counter, negative
# edx scratch (high product)
# esi &src[size]
# edi &dst[2*size-4]
# ebp scratch (fetched dst limbs)
movl (%esi,%ecx,4), %eax
adcl $0, %ebx
mull %eax
movl 16-4(%edi,%ecx,8), %ebp
addl %ebp, %ebx
movl 16(%edi,%ecx,8), %ebp
adcl %eax, %ebp
movl %ebx, 16-4(%edi,%ecx,8)
movl %ebp, 16(%edi,%ecx,8)
incl %ecx
movl %edx, %ebx
jnz L(diag)
adcl $0, %edx
movl 16-4(%edi), %eax # dst most significant limb
addl %eax, %edx
popl %ebp
movl %edx, 16-4(%edi)
popl %esi # risk of cache bank clash
popl %edi
popl %ebx
ret
EPILOGUE()
| 16.8119
| 79
| 0.5834
|
f78f78d2ece9a685d05fd35da033ba5b75837906
| 764
|
asm
|
Assembly
|
oeis/129/A129137.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/129/A129137.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/129/A129137.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A129137: Number of trees on [n], rooted at 1, in which 2 is a descendant of 3.
; Submitted by Jamie Morken(s4)
; 0,0,1,5,37,366,4553,68408,1206405,24447440,560041201,14315792256,404057805989,12482986261760,419042630871225,15189786100468736,591374264243364037,24612549706061862912,1090556290466098198625,51257347234656137216000,2547253087767219779581221,133454430754267445215821824,7351908596198957360270324521,424855817495750172316371517440,25699115017974874693706264133125,1623945238567277379738783075270656,107007319588208443534370510197742673,7340390889996497336369710256271392768
mov $3,$0
add $0,1
sub $3,1
lpb $3
mul $1,$3
add $1,1
mul $2,$0
cmp $4,0
add $5,$4
div $1,$5
add $2,$1
mul $1,$0
sub $3,1
sub $4,4
mov $5,$0
lpe
mov $0,$2
| 34.727273
| 472
| 0.791885
|
9f9b2ff581d25c29f189d3504bbc465c61aa86ea
| 501
|
asm
|
Assembly
|
oeis/074/A074084.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/074/A074084.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/074/A074084.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A074084: Coefficient of q^1 in nu(n), where nu(0)=1, nu(1)=b and, for n>=2, nu(n)=b*nu(n-1)+lambda*(1+q+q^2+...+q^(n-2))*nu(n-2) with (b,lambda)=(2,1).
; Submitted by Jamie Morken(s1)
; 0,0,0,2,9,32,102,306,883,2480,6828,18514,49597,131568,346194,904738,2350695,6076960,15641304,40103778,102473969,261046144,663180222,1680628946,4249496795,10722962256,27007159428,67904097074
mov $1,-2
lpb $0
sub $0,1
add $1,1
add $1,$3
add $1,$0
mov $2,$3
add $3,$1
mov $1,$2
lpe
mov $0,$2
div $0,2
| 29.470588
| 191
| 0.656687
|
21129cb93fe6f65e5f5360f63c939eb9ca09f97d
| 3,855
|
asm
|
Assembly
|
helloos/Kernel/kernel.vesa.graphice.asm
|
kbu1564/HelloOS
|
a30ed7822ec4ac250717fad6e2d4529a4970ccd9
|
[
"MIT"
] | 15
|
2015-01-19T04:20:29.000Z
|
2022-01-25T14:03:07.000Z
|
helloos/Kernel/kernel.vesa.graphice.asm
|
kbu1564/HelloOS
|
a30ed7822ec4ac250717fad6e2d4529a4970ccd9
|
[
"MIT"
] | 10
|
2015-01-25T08:09:08.000Z
|
2016-11-09T03:15:29.000Z
|
helloos/Kernel/kernel.vesa.graphice.asm
|
kbu1564/HelloOS
|
a30ed7822ec4ac250717fad6e2d4529a4970ccd9
|
[
"MIT"
] | 9
|
2015-03-20T06:58:14.000Z
|
2021-11-29T07:00:14.000Z
|
; 그래픽 전용 라이브러리 함수
; 2015-03-23
; 비디오 화면 지우기
; ebx : ColorCode ARGB
_vga_clear_screen:
push esi
push eax
push ecx
mov ax, VGADescriptor
mov es, ax
xor esi, esi
; mov esi, dword [PhysicalBasePointer]
xor eax, eax
xor ecx, ecx
mov ax, word [xResolution]
mov cx, word [yResolution]
mul ecx
; x * y
mov ecx, eax
.clear_loop:
mov dword [es:esi], ebx
add esi, 4
loop .clear_loop
pop ecx
pop eax
pop esi
ret
; push Y좌표
; push X좌표
; push 색상
; push 출력할 글자정보
; call _draw_font
; 한글자를 화면에 찍어주는 함수
_draw_font:
push ebp
mov ebp, esp
pusha
mov ax, VGADescriptor
mov es, ax
xor esi, esi
mov eax, 4
mul dword [ebp + 16]
add esi, eax
; x position
mov eax, 1024 * 4
mul dword [ebp + 20]
add esi, eax
; y position
mov edi, dword [ebp + 8]
mov eax, 16
.loop_draw:
mov ecx, 8
.loop_px:
mov edx, 1
shl edx, cl
shr edx, 1
test byte [edi], dl
jz .end_px
mov ebx, dword [ebp + 12]
mov dword [es:esi], ebx
.end_px:
add esi, 4
loop .loop_px
add esi, 4 * (1024 - 8)
dec eax
inc edi
cmp eax, 0
jne .loop_draw
popa
mov esp, ebp
pop ebp
ret 16
; 폰트 그리기 테스트
_draw_font_test:
mov ecx, 0
.font_test:
mov esi, font
mov eax, 16
mul ecx
add esi, eax
; 다음 그릴 폰트
mov eax, 8
mul ecx
; x 좌표 위치
push 0
push eax
push 0xFFFFFFFF
push esi
call _draw_font
inc ecx
cmp ecx, 62
jne .font_test
ret
; push Y좌표
; push X좌표
; push 색상
; push 그릴 커서 종류
; call _draw_font
; 화면에 마우스 커서를 찍어주는 함수
_draw_cursor:
push ebp
mov ebp, esp
pusha
mov ax, VGADescriptor
mov es, ax
xor esi, esi
mov eax, 4
mul dword [ebp + 16]
add esi, eax
; x position
mov eax, 1024 * 4
mul dword [ebp + 20]
add esi, eax
; y position
mov edi, dword [ebp + 8]
mov eax, 16
.loop_draw:
mov ecx, 16
.loop_px:
mov edx, 1
shl edx, cl
shr edx, 1
test word [edi], dx
jz .end_px
mov ebx, dword [ebp + 12]
; Masking
mov edx, 16
sub edx, ecx
add edx, dword [ebp + 16]
cmp word [xResolution], dx
jbe .end_px
mov dword [es:esi], ebx
.end_px:
add esi, 4
loop .loop_px
add esi, 4 * (1024 - 16)
dec eax
add edi, 2
cmp eax, 0
jne .loop_draw
popa
mov esp, ebp
pop ebp
ret 16
; Call Vector Table 에 등록될 GUI 모드에서의 print 함수
; _print32_gui 함수와 호환성을 마추기 위한 디버깅용
_call_print32_gui:
push ebp
mov ebp, esp
pusha
mov eax, dword [ebp+20]
shl eax, 4
push eax
mov eax, dword [ebp+16]
shl eax, 3
push eax
push dword [ebp+12]
push dword [ebp+8]
call _print32_gui
popa
mov esp, ebp
pop ebp
ret 16
; NULL 문자를 만날때 까지 출력합니다.
; ENTER 즉 개행 문자를 \n 으로 정의 합니다.
; void print32_gui(const char* str, int colorCode, int x, int y);
_print32_gui:
push ebp
mov ebp, esp
pusha
mov edi, dword [ebp+8]
; 출력할 메시지
mov esi, dword [ebp+16]
; 출력 x 좌표
mov ecx, 16
; 폰트 크기
.loop:
xor eax, eax
mov al, byte [edi]
test al, al
jz .end
; NULL 체크후 종료
cmp al, '&'
jae .chk
.chk:
cmp al, 'z'
ja .endloop
sub al, '&'
mul ecx
add eax, font.26h
push dword [ebp+20]
push esi
push dword [ebp+12]
push eax
call _draw_font
.endloop:
add esi, 8
inc edi
; 글씨 크기만큼 다음 위치로 이동
jmp .loop
.end:
popa
mov esp, ebp
pop ebp
ret 16
| 15.734694
| 65
| 0.515175
|
01f3d0bedf3972f539b3f69fda97ca7ca911d474
| 372
|
asm
|
Assembly
|
programs/oeis/079/A079904.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | 1
|
2021-03-15T11:38:20.000Z
|
2021-03-15T11:38:20.000Z
|
programs/oeis/079/A079904.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/079/A079904.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | null | null | null |
; A079904: Triangle read by rows: T(n, k) = n*k, 0<=k<=n.
; 0,0,1,0,2,4,0,3,6,9,0,4,8,12,16,0,5,10,15,20,25,0,6,12,18,24,30,36,0,7,14,21,28,35,42,49,0,8,16,24,32,40,48,56,64,0,9,18,27,36,45,54,63,72,81,0,10,20,30,40,50,60,70,80,90,100,0,11,22,33,44,55,66,77,88,99,110,121
mov $2,$0
lpb $2
mov $0,$3
add $1,1
sub $2,1
add $0,$2
trn $2,$1
lpe
mul $0,$1
mov $1,$0
| 26.571429
| 213
| 0.575269
|
65f79c822f454cd80c4462d82375a57efd233650
| 23,394
|
asm
|
Assembly
|
test2/test_ptn_asm/instructions_c.asm
|
csrdxbb/xbyak_aarch64
|
24ac94f8b0276046934fa7f04432d6b830a44aa6
|
[
"Apache-2.0"
] | 1
|
2022-02-18T06:34:50.000Z
|
2022-02-18T06:34:50.000Z
|
test2/test_ptn_asm/instructions_c.asm
|
csrdxbb/xbyak_aarch64
|
24ac94f8b0276046934fa7f04432d6b830a44aa6
|
[
"Apache-2.0"
] | null | null | null |
test2/test_ptn_asm/instructions_c.asm
|
csrdxbb/xbyak_aarch64
|
24ac94f8b0276046934fa7f04432d6b830a44aa6
|
[
"Apache-2.0"
] | null | null | null |
cadd z8.b,z8.b/*asm*/,z8.b,90
cadd z1.b,z1.b/*asm*/,z8.b,90
cadd z2.b,z2.b/*asm*/,z8.b,90
cadd z4.b,z4.b/*asm*/,z8.b,90
cadd z0.b,z0.b/*asm*/,z8.b,90
cadd z16.b,z16.b/*asm*/,z8.b,90
cadd z30.b,z30.b/*asm*/,z8.b,90
cadd z31.b,z31.b/*asm*/,z8.b,90
cadd z8.b,z8.b/*asm*/,z8.b,90
cadd z8.b,z8.b/*asm*/,z1.b,90
cadd z8.b,z8.b/*asm*/,z2.b,90
cadd z8.b,z8.b/*asm*/,z4.b,90
cadd z8.b,z8.b/*asm*/,z0.b,90
cadd z8.b,z8.b/*asm*/,z16.b,90
cadd z8.b,z8.b/*asm*/,z30.b,90
cadd z8.b,z8.b/*asm*/,z31.b,90
cadd z8.b,z8.b/*asm*/,z8.b,90
cadd z8.b,z8.b/*asm*/,z8.b,270
cadd z8.h,z8.h/*asm*/,z8.h,90
cadd z1.h,z1.h/*asm*/,z8.h,90
cadd z2.h,z2.h/*asm*/,z8.h,90
cadd z4.h,z4.h/*asm*/,z8.h,90
cadd z0.h,z0.h/*asm*/,z8.h,90
cadd z16.h,z16.h/*asm*/,z8.h,90
cadd z30.h,z30.h/*asm*/,z8.h,90
cadd z31.h,z31.h/*asm*/,z8.h,90
cadd z8.h,z8.h/*asm*/,z8.h,90
cadd z8.h,z8.h/*asm*/,z1.h,90
cadd z8.h,z8.h/*asm*/,z2.h,90
cadd z8.h,z8.h/*asm*/,z4.h,90
cadd z8.h,z8.h/*asm*/,z0.h,90
cadd z8.h,z8.h/*asm*/,z16.h,90
cadd z8.h,z8.h/*asm*/,z30.h,90
cadd z8.h,z8.h/*asm*/,z31.h,90
cadd z8.h,z8.h/*asm*/,z8.h,90
cadd z8.h,z8.h/*asm*/,z8.h,270
cadd z8.s,z8.s/*asm*/,z8.s,90
cadd z1.s,z1.s/*asm*/,z8.s,90
cadd z2.s,z2.s/*asm*/,z8.s,90
cadd z4.s,z4.s/*asm*/,z8.s,90
cadd z0.s,z0.s/*asm*/,z8.s,90
cadd z16.s,z16.s/*asm*/,z8.s,90
cadd z30.s,z30.s/*asm*/,z8.s,90
cadd z31.s,z31.s/*asm*/,z8.s,90
cadd z8.s,z8.s/*asm*/,z8.s,90
cadd z8.s,z8.s/*asm*/,z1.s,90
cadd z8.s,z8.s/*asm*/,z2.s,90
cadd z8.s,z8.s/*asm*/,z4.s,90
cadd z8.s,z8.s/*asm*/,z0.s,90
cadd z8.s,z8.s/*asm*/,z16.s,90
cadd z8.s,z8.s/*asm*/,z30.s,90
cadd z8.s,z8.s/*asm*/,z31.s,90
cadd z8.s,z8.s/*asm*/,z8.s,90
cadd z8.s,z8.s/*asm*/,z8.s,270
cadd z8.d,z8.d/*asm*/,z8.d,90
cadd z1.d,z1.d/*asm*/,z8.d,90
cadd z2.d,z2.d/*asm*/,z8.d,90
cadd z4.d,z4.d/*asm*/,z8.d,90
cadd z0.d,z0.d/*asm*/,z8.d,90
cadd z16.d,z16.d/*asm*/,z8.d,90
cadd z30.d,z30.d/*asm*/,z8.d,90
cadd z31.d,z31.d/*asm*/,z8.d,90
cadd z8.d,z8.d/*asm*/,z8.d,90
cadd z8.d,z8.d/*asm*/,z1.d,90
cadd z8.d,z8.d/*asm*/,z2.d,90
cadd z8.d,z8.d/*asm*/,z4.d,90
cadd z8.d,z8.d/*asm*/,z0.d,90
cadd z8.d,z8.d/*asm*/,z16.d,90
cadd z8.d,z8.d/*asm*/,z30.d,90
cadd z8.d,z8.d/*asm*/,z31.d,90
cadd z8.d,z8.d/*asm*/,z8.d,90
cadd z8.d,z8.d/*asm*/,z8.d,270
cmla z8.b,z8.b,z8.b,90
cmla z1.b,z8.b,z8.b,90
cmla z2.b,z8.b,z8.b,90
cmla z4.b,z8.b,z8.b,90
cmla z0.b,z8.b,z8.b,90
cmla z16.b,z8.b,z8.b,90
cmla z30.b,z8.b,z8.b,90
cmla z31.b,z8.b,z8.b,90
cmla z8.b,z8.b,z8.b,90
cmla z8.b,z1.b,z8.b,90
cmla z8.b,z2.b,z8.b,90
cmla z8.b,z4.b,z8.b,90
cmla z8.b,z0.b,z8.b,90
cmla z8.b,z16.b,z8.b,90
cmla z8.b,z30.b,z8.b,90
cmla z8.b,z31.b,z8.b,90
cmla z8.b,z8.b,z8.b,90
cmla z8.b,z8.b,z1.b,90
cmla z8.b,z8.b,z2.b,90
cmla z8.b,z8.b,z4.b,90
cmla z8.b,z8.b,z0.b,90
cmla z8.b,z8.b,z16.b,90
cmla z8.b,z8.b,z30.b,90
cmla z8.b,z8.b,z31.b,90
cmla z8.b,z8.b,z8.b,90
cmla z8.b,z8.b,z8.b,0
cmla z8.b,z8.b,z8.b,180
cmla z8.b,z8.b,z8.b,270
cmla z8.h,z8.h,z8.h,90
cmla z1.h,z8.h,z8.h,90
cmla z2.h,z8.h,z8.h,90
cmla z4.h,z8.h,z8.h,90
cmla z0.h,z8.h,z8.h,90
cmla z16.h,z8.h,z8.h,90
cmla z30.h,z8.h,z8.h,90
cmla z31.h,z8.h,z8.h,90
cmla z8.h,z8.h,z8.h,90
cmla z8.h,z1.h,z8.h,90
cmla z8.h,z2.h,z8.h,90
cmla z8.h,z4.h,z8.h,90
cmla z8.h,z0.h,z8.h,90
cmla z8.h,z16.h,z8.h,90
cmla z8.h,z30.h,z8.h,90
cmla z8.h,z31.h,z8.h,90
cmla z8.h,z8.h,z8.h,90
cmla z8.h,z8.h,z1.h,90
cmla z8.h,z8.h,z2.h,90
cmla z8.h,z8.h,z4.h,90
cmla z8.h,z8.h,z0.h,90
cmla z8.h,z8.h,z16.h,90
cmla z8.h,z8.h,z30.h,90
cmla z8.h,z8.h,z31.h,90
cmla z8.h,z8.h,z8.h,90
cmla z8.h,z8.h,z8.h,0
cmla z8.h,z8.h,z8.h,180
cmla z8.h,z8.h,z8.h,270
cmla z8.s,z8.s,z8.s,90
cmla z1.s,z8.s,z8.s,90
cmla z2.s,z8.s,z8.s,90
cmla z4.s,z8.s,z8.s,90
cmla z0.s,z8.s,z8.s,90
cmla z16.s,z8.s,z8.s,90
cmla z30.s,z8.s,z8.s,90
cmla z31.s,z8.s,z8.s,90
cmla z8.s,z8.s,z8.s,90
cmla z8.s,z1.s,z8.s,90
cmla z8.s,z2.s,z8.s,90
cmla z8.s,z4.s,z8.s,90
cmla z8.s,z0.s,z8.s,90
cmla z8.s,z16.s,z8.s,90
cmla z8.s,z30.s,z8.s,90
cmla z8.s,z31.s,z8.s,90
cmla z8.s,z8.s,z8.s,90
cmla z8.s,z8.s,z1.s,90
cmla z8.s,z8.s,z2.s,90
cmla z8.s,z8.s,z4.s,90
cmla z8.s,z8.s,z0.s,90
cmla z8.s,z8.s,z16.s,90
cmla z8.s,z8.s,z30.s,90
cmla z8.s,z8.s,z31.s,90
cmla z8.s,z8.s,z8.s,90
cmla z8.s,z8.s,z8.s,0
cmla z8.s,z8.s,z8.s,180
cmla z8.s,z8.s,z8.s,270
cmla z8.d,z8.d,z8.d,90
cmla z1.d,z8.d,z8.d,90
cmla z2.d,z8.d,z8.d,90
cmla z4.d,z8.d,z8.d,90
cmla z0.d,z8.d,z8.d,90
cmla z16.d,z8.d,z8.d,90
cmla z30.d,z8.d,z8.d,90
cmla z31.d,z8.d,z8.d,90
cmla z8.d,z8.d,z8.d,90
cmla z8.d,z1.d,z8.d,90
cmla z8.d,z2.d,z8.d,90
cmla z8.d,z4.d,z8.d,90
cmla z8.d,z0.d,z8.d,90
cmla z8.d,z16.d,z8.d,90
cmla z8.d,z30.d,z8.d,90
cmla z8.d,z31.d,z8.d,90
cmla z8.d,z8.d,z8.d,90
cmla z8.d,z8.d,z1.d,90
cmla z8.d,z8.d,z2.d,90
cmla z8.d,z8.d,z4.d,90
cmla z8.d,z8.d,z0.d,90
cmla z8.d,z8.d,z16.d,90
cmla z8.d,z8.d,z30.d,90
cmla z8.d,z8.d,z31.d,90
cmla z8.d,z8.d,z8.d,90
cmla z8.d,z8.d,z8.d,0
cmla z8.d,z8.d,z8.d,180
cmla z8.d,z8.d,z8.d,270
casab w8,w8,[x8,#0]/*asm*/
casab w1,w8,[x8,#0]/*asm*/
casab w2,w8,[x8,#0]/*asm*/
casab w4,w8,[x8,#0]/*asm*/
casab w0,w8,[x8,#0]/*asm*/
casab w16,w8,[x8,#0]/*asm*/
casab w30,w8,[x8,#0]/*asm*/
casab wzr,w8,[x8,#0]/*asm*/
casab w8,w8,[x8,#0]/*asm*/
casab w8,w1,[x8,#0]/*asm*/
casab w8,w2,[x8,#0]/*asm*/
casab w8,w4,[x8,#0]/*asm*/
casab w8,w0,[x8,#0]/*asm*/
casab w8,w16,[x8,#0]/*asm*/
casab w8,w30,[x8,#0]/*asm*/
casab w8,wzr,[x8,#0]/*asm*/
casab w8,w8,[x8,#0]/*asm*/
casab w8,w8,[x0, #0]/*asm*/
casab w8,w8,[x16,#0]/*asm*/
casab w8,w8,[sp,#0]/*asm*/
casalb w8,w8,[x8,#0]/*asm*/
casalb w1,w8,[x8,#0]/*asm*/
casalb w2,w8,[x8,#0]/*asm*/
casalb w4,w8,[x8,#0]/*asm*/
casalb w0,w8,[x8,#0]/*asm*/
casalb w16,w8,[x8,#0]/*asm*/
casalb w30,w8,[x8,#0]/*asm*/
casalb wzr,w8,[x8,#0]/*asm*/
casalb w8,w8,[x8,#0]/*asm*/
casalb w8,w1,[x8,#0]/*asm*/
casalb w8,w2,[x8,#0]/*asm*/
casalb w8,w4,[x8,#0]/*asm*/
casalb w8,w0,[x8,#0]/*asm*/
casalb w8,w16,[x8,#0]/*asm*/
casalb w8,w30,[x8,#0]/*asm*/
casalb w8,wzr,[x8,#0]/*asm*/
casalb w8,w8,[x8,#0]/*asm*/
casalb w8,w8,[x0, #0]/*asm*/
casalb w8,w8,[x16,#0]/*asm*/
casalb w8,w8,[sp,#0]/*asm*/
casb w8,w8,[x8,#0]/*asm*/
casb w1,w8,[x8,#0]/*asm*/
casb w2,w8,[x8,#0]/*asm*/
casb w4,w8,[x8,#0]/*asm*/
casb w0,w8,[x8,#0]/*asm*/
casb w16,w8,[x8,#0]/*asm*/
casb w30,w8,[x8,#0]/*asm*/
casb wzr,w8,[x8,#0]/*asm*/
casb w8,w8,[x8,#0]/*asm*/
casb w8,w1,[x8,#0]/*asm*/
casb w8,w2,[x8,#0]/*asm*/
casb w8,w4,[x8,#0]/*asm*/
casb w8,w0,[x8,#0]/*asm*/
casb w8,w16,[x8,#0]/*asm*/
casb w8,w30,[x8,#0]/*asm*/
casb w8,wzr,[x8,#0]/*asm*/
casb w8,w8,[x8,#0]/*asm*/
casb w8,w8,[x0, #0]/*asm*/
casb w8,w8,[x16,#0]/*asm*/
casb w8,w8,[sp,#0]/*asm*/
caslb w8,w8,[x8,#0]/*asm*/
caslb w1,w8,[x8,#0]/*asm*/
caslb w2,w8,[x8,#0]/*asm*/
caslb w4,w8,[x8,#0]/*asm*/
caslb w0,w8,[x8,#0]/*asm*/
caslb w16,w8,[x8,#0]/*asm*/
caslb w30,w8,[x8,#0]/*asm*/
caslb wzr,w8,[x8,#0]/*asm*/
caslb w8,w8,[x8,#0]/*asm*/
caslb w8,w1,[x8,#0]/*asm*/
caslb w8,w2,[x8,#0]/*asm*/
caslb w8,w4,[x8,#0]/*asm*/
caslb w8,w0,[x8,#0]/*asm*/
caslb w8,w16,[x8,#0]/*asm*/
caslb w8,w30,[x8,#0]/*asm*/
caslb w8,wzr,[x8,#0]/*asm*/
caslb w8,w8,[x8,#0]/*asm*/
caslb w8,w8,[x0, #0]/*asm*/
caslb w8,w8,[x16,#0]/*asm*/
caslb w8,w8,[sp,#0]/*asm*/
cdot z8.s,z8.b,z8.b,90
cdot z1.s,z8.b,z8.b,90
cdot z2.s,z8.b,z8.b,90
cdot z4.s,z8.b,z8.b,90
cdot z0.s,z8.b,z8.b,90
cdot z16.s,z8.b,z8.b,90
cdot z30.s,z8.b,z8.b,90
cdot z31.s,z8.b,z8.b,90
cdot z8.s,z8.b,z8.b,90
cdot z8.s,z1.b,z8.b,90
cdot z8.s,z2.b,z8.b,90
cdot z8.s,z4.b,z8.b,90
cdot z8.s,z0.b,z8.b,90
cdot z8.s,z16.b,z8.b,90
cdot z8.s,z30.b,z8.b,90
cdot z8.s,z31.b,z8.b,90
cdot z8.s,z8.b,z8.b,90
cdot z8.s,z8.b,z1.b,90
cdot z8.s,z8.b,z2.b,90
cdot z8.s,z8.b,z4.b,90
cdot z8.s,z8.b,z0.b,90
cdot z8.s,z8.b,z16.b,90
cdot z8.s,z8.b,z30.b,90
cdot z8.s,z8.b,z31.b,90
cdot z8.s,z8.b,z8.b,90
cdot z8.s,z8.b,z8.b,0
cdot z8.s,z8.b,z8.b,180
cdot z8.s,z8.b,z8.b,270
cdot z8.d,z8.h,z8.h,90
cdot z1.d,z8.h,z8.h,90
cdot z2.d,z8.h,z8.h,90
cdot z4.d,z8.h,z8.h,90
cdot z0.d,z8.h,z8.h,90
cdot z16.d,z8.h,z8.h,90
cdot z30.d,z8.h,z8.h,90
cdot z31.d,z8.h,z8.h,90
cdot z8.d,z8.h,z8.h,90
cdot z8.d,z1.h,z8.h,90
cdot z8.d,z2.h,z8.h,90
cdot z8.d,z4.h,z8.h,90
cdot z8.d,z0.h,z8.h,90
cdot z8.d,z16.h,z8.h,90
cdot z8.d,z30.h,z8.h,90
cdot z8.d,z31.h,z8.h,90
cdot z8.d,z8.h,z8.h,90
cdot z8.d,z8.h,z1.h,90
cdot z8.d,z8.h,z2.h,90
cdot z8.d,z8.h,z4.h,90
cdot z8.d,z8.h,z0.h,90
cdot z8.d,z8.h,z16.h,90
cdot z8.d,z8.h,z30.h,90
cdot z8.d,z8.h,z31.h,90
cdot z8.d,z8.h,z8.h,90
cdot z8.d,z8.h,z8.h,0
cdot z8.d,z8.h,z8.h,180
cdot z8.d,z8.h,z8.h,270
cdot z8.s,z8.b,z7.b[3],90
cdot z1.s,z8.b,z7.b[3],90
cdot z2.s,z8.b,z7.b[3],90
cdot z4.s,z8.b,z7.b[3],90
cdot z0.s,z8.b,z7.b[3],90
cdot z16.s,z8.b,z7.b[3],90
cdot z30.s,z8.b,z7.b[3],90
cdot z31.s,z8.b,z7.b[3],90
cdot z8.s,z8.b,z7.b[3],90
cdot z8.s,z1.b,z7.b[3],90
cdot z8.s,z2.b,z7.b[3],90
cdot z8.s,z4.b,z7.b[3],90
cdot z8.s,z0.b,z7.b[3],90
cdot z8.s,z16.b,z7.b[3],90
cdot z8.s,z30.b,z7.b[3],90
cdot z8.s,z31.b,z7.b[3],90
cdot z8.s,z8.b,z7.b[3],90
cdot z8.s,z8.b,z1.b[1],90
cdot z8.s,z8.b,z2.b[0],90
cdot z8.s,z8.b,z4.b[2],90
cdot z8.s,z8.b,z7.b[3],90
cdot z8.s,z8.b,z7.b[3],0
cdot z8.s,z8.b,z7.b[3],180
cdot z8.s,z8.b,z7.b[3],270
cdot z8.d,z8.h,z15.h[1],90
cdot z1.d,z8.h,z15.h[1],90
cdot z2.d,z8.h,z15.h[1],90
cdot z4.d,z8.h,z15.h[1],90
cdot z0.d,z8.h,z15.h[1],90
cdot z16.d,z8.h,z15.h[1],90
cdot z30.d,z8.h,z15.h[1],90
cdot z31.d,z8.h,z15.h[1],90
cdot z8.d,z8.h,z15.h[1],90
cdot z8.d,z1.h,z15.h[1],90
cdot z8.d,z2.h,z15.h[1],90
cdot z8.d,z4.h,z15.h[1],90
cdot z8.d,z0.h,z15.h[1],90
cdot z8.d,z16.h,z15.h[1],90
cdot z8.d,z30.h,z15.h[1],90
cdot z8.d,z31.h,z15.h[1],90
cdot z8.d,z8.h,z15.h[1],90
cdot z8.d,z8.h,z1.h[0],90
cdot z8.d,z8.h,z0.h[1],90
cdot z8.d,z8.h,z8.h[1],90
cdot z8.d,z8.h,z15.h[1],90
cdot z8.d,z8.h,z15.h[1],0
cdot z8.d,z8.h,z15.h[1],180
cdot z8.d,z8.h,z15.h[1],270
casp w8,w9/*asm*/,w8,w9/*asm*/,[x8,#0]/*asm*/
casp w2,w3/*asm*/,w8,w9/*asm*/,[x8,#0]/*asm*/
casp w4,w5/*asm*/,w8,w9/*asm*/,[x8,#0]/*asm*/
casp w0,w1/*asm*/,w8,w9/*asm*/,[x8,#0]/*asm*/
casp w16,w17/*asm*/,w8,w9/*asm*/,[x8,#0]/*asm*/
casp w30,wzr/*asm*/,w8,w9/*asm*/,[x8,#0]/*asm*/
casp w8,w9/*asm*/,w8,w9/*asm*/,[x8,#0]/*asm*/
casp w8,w9/*asm*/,w2,w3/*asm*/,[x8,#0]/*asm*/
casp w8,w9/*asm*/,w4,w5/*asm*/,[x8,#0]/*asm*/
casp w8,w9/*asm*/,w0,w1/*asm*/,[x8,#0]/*asm*/
casp w8,w9/*asm*/,w16,w17/*asm*/,[x8,#0]/*asm*/
casp w8,w9/*asm*/,w30,wzr/*asm*/,[x8,#0]/*asm*/
casp w8,w9/*asm*/,w8,w9/*asm*/,[x8,#0]/*asm*/
casp w8,w9/*asm*/,w8,w9/*asm*/,[x0, #0]/*asm*/
casp w8,w9/*asm*/,w8,w9/*asm*/,[x16,#0]/*asm*/
casp w8,w9/*asm*/,w8,w9/*asm*/,[sp,#0]/*asm*/
caspa w8,w9/*asm*/,w8,w9/*asm*/,[x8,#0]/*asm*/
caspa w2,w3/*asm*/,w8,w9/*asm*/,[x8,#0]/*asm*/
caspa w4,w5/*asm*/,w8,w9/*asm*/,[x8,#0]/*asm*/
caspa w0,w1/*asm*/,w8,w9/*asm*/,[x8,#0]/*asm*/
caspa w16,w17/*asm*/,w8,w9/*asm*/,[x8,#0]/*asm*/
caspa w30,wzr/*asm*/,w8,w9/*asm*/,[x8,#0]/*asm*/
caspa w8,w9/*asm*/,w8,w9/*asm*/,[x8,#0]/*asm*/
caspa w8,w9/*asm*/,w2,w3/*asm*/,[x8,#0]/*asm*/
caspa w8,w9/*asm*/,w4,w5/*asm*/,[x8,#0]/*asm*/
caspa w8,w9/*asm*/,w0,w1/*asm*/,[x8,#0]/*asm*/
caspa w8,w9/*asm*/,w16,w17/*asm*/,[x8,#0]/*asm*/
caspa w8,w9/*asm*/,w30,wzr/*asm*/,[x8,#0]/*asm*/
caspa w8,w9/*asm*/,w8,w9/*asm*/,[x8,#0]/*asm*/
caspa w8,w9/*asm*/,w8,w9/*asm*/,[x0, #0]/*asm*/
caspa w8,w9/*asm*/,w8,w9/*asm*/,[x16,#0]/*asm*/
caspa w8,w9/*asm*/,w8,w9/*asm*/,[sp,#0]/*asm*/
caspal w8,w9/*asm*/,w8,w9/*asm*/,[x8,#0]/*asm*/
caspal w2,w3/*asm*/,w8,w9/*asm*/,[x8,#0]/*asm*/
caspal w4,w5/*asm*/,w8,w9/*asm*/,[x8,#0]/*asm*/
caspal w0,w1/*asm*/,w8,w9/*asm*/,[x8,#0]/*asm*/
caspal w16,w17/*asm*/,w8,w9/*asm*/,[x8,#0]/*asm*/
caspal w30,wzr/*asm*/,w8,w9/*asm*/,[x8,#0]/*asm*/
caspal w8,w9/*asm*/,w8,w9/*asm*/,[x8,#0]/*asm*/
caspal w8,w9/*asm*/,w2,w3/*asm*/,[x8,#0]/*asm*/
caspal w8,w9/*asm*/,w4,w5/*asm*/,[x8,#0]/*asm*/
caspal w8,w9/*asm*/,w0,w1/*asm*/,[x8,#0]/*asm*/
caspal w8,w9/*asm*/,w16,w17/*asm*/,[x8,#0]/*asm*/
caspal w8,w9/*asm*/,w30,wzr/*asm*/,[x8,#0]/*asm*/
caspal w8,w9/*asm*/,w8,w9/*asm*/,[x8,#0]/*asm*/
caspal w8,w9/*asm*/,w8,w9/*asm*/,[x0, #0]/*asm*/
caspal w8,w9/*asm*/,w8,w9/*asm*/,[x16,#0]/*asm*/
caspal w8,w9/*asm*/,w8,w9/*asm*/,[sp,#0]/*asm*/
caspl w8,w9/*asm*/,w8,w9/*asm*/,[x8,#0]/*asm*/
caspl w2,w3/*asm*/,w8,w9/*asm*/,[x8,#0]/*asm*/
caspl w4,w5/*asm*/,w8,w9/*asm*/,[x8,#0]/*asm*/
caspl w0,w1/*asm*/,w8,w9/*asm*/,[x8,#0]/*asm*/
caspl w16,w17/*asm*/,w8,w9/*asm*/,[x8,#0]/*asm*/
caspl w30,wzr/*asm*/,w8,w9/*asm*/,[x8,#0]/*asm*/
caspl w8,w9/*asm*/,w8,w9/*asm*/,[x8,#0]/*asm*/
caspl w8,w9/*asm*/,w2,w3/*asm*/,[x8,#0]/*asm*/
caspl w8,w9/*asm*/,w4,w5/*asm*/,[x8,#0]/*asm*/
caspl w8,w9/*asm*/,w0,w1/*asm*/,[x8,#0]/*asm*/
caspl w8,w9/*asm*/,w16,w17/*asm*/,[x8,#0]/*asm*/
caspl w8,w9/*asm*/,w30,wzr/*asm*/,[x8,#0]/*asm*/
caspl w8,w9/*asm*/,w8,w9/*asm*/,[x8,#0]/*asm*/
caspl w8,w9/*asm*/,w8,w9/*asm*/,[x0, #0]/*asm*/
caspl w8,w9/*asm*/,w8,w9/*asm*/,[x16,#0]/*asm*/
caspl w8,w9/*asm*/,w8,w9/*asm*/,[sp,#0]/*asm*/
casp x8,x9/*asm*/,x8,x9/*asm*/,[x8,#0]/*asm*/
casp x2,x3/*asm*/,x8,x9/*asm*/,[x8,#0]/*asm*/
casp x4,x5/*asm*/,x8,x9/*asm*/,[x8,#0]/*asm*/
casp x0,x1/*asm*/,x8,x9/*asm*/,[x8,#0]/*asm*/
casp x16,x17/*asm*/,x8,x9/*asm*/,[x8,#0]/*asm*/
casp x30,xzr/*asm*/,x8,x9/*asm*/,[x8,#0]/*asm*/
casp x8,x9/*asm*/,x8,x9/*asm*/,[x8,#0]/*asm*/
casp x8,x9/*asm*/,x2,x3/*asm*/,[x8,#0]/*asm*/
casp x8,x9/*asm*/,x4,x5/*asm*/,[x8,#0]/*asm*/
casp x8,x9/*asm*/,x0,x1/*asm*/,[x8,#0]/*asm*/
casp x8,x9/*asm*/,x16,x17/*asm*/,[x8,#0]/*asm*/
casp x8,x9/*asm*/,x30,xzr/*asm*/,[x8,#0]/*asm*/
casp x8,x9/*asm*/,x8,x9/*asm*/,[x8,#0]/*asm*/
casp x8,x9/*asm*/,x8,x9/*asm*/,[x0, #0]/*asm*/
casp x8,x9/*asm*/,x8,x9/*asm*/,[x16,#0]/*asm*/
casp x8,x9/*asm*/,x8,x9/*asm*/,[sp,#0]/*asm*/
caspa x8,x9/*asm*/,x8,x9/*asm*/,[x8,#0]/*asm*/
caspa x2,x3/*asm*/,x8,x9/*asm*/,[x8,#0]/*asm*/
caspa x4,x5/*asm*/,x8,x9/*asm*/,[x8,#0]/*asm*/
caspa x0,x1/*asm*/,x8,x9/*asm*/,[x8,#0]/*asm*/
caspa x16,x17/*asm*/,x8,x9/*asm*/,[x8,#0]/*asm*/
caspa x30,xzr/*asm*/,x8,x9/*asm*/,[x8,#0]/*asm*/
caspa x8,x9/*asm*/,x8,x9/*asm*/,[x8,#0]/*asm*/
caspa x8,x9/*asm*/,x2,x3/*asm*/,[x8,#0]/*asm*/
caspa x8,x9/*asm*/,x4,x5/*asm*/,[x8,#0]/*asm*/
caspa x8,x9/*asm*/,x0,x1/*asm*/,[x8,#0]/*asm*/
caspa x8,x9/*asm*/,x16,x17/*asm*/,[x8,#0]/*asm*/
caspa x8,x9/*asm*/,x30,xzr/*asm*/,[x8,#0]/*asm*/
caspa x8,x9/*asm*/,x8,x9/*asm*/,[x8,#0]/*asm*/
caspa x8,x9/*asm*/,x8,x9/*asm*/,[x0, #0]/*asm*/
caspa x8,x9/*asm*/,x8,x9/*asm*/,[x16,#0]/*asm*/
caspa x8,x9/*asm*/,x8,x9/*asm*/,[sp,#0]/*asm*/
caspal x8,x9/*asm*/,x8,x9/*asm*/,[x8,#0]/*asm*/
caspal x2,x3/*asm*/,x8,x9/*asm*/,[x8,#0]/*asm*/
caspal x4,x5/*asm*/,x8,x9/*asm*/,[x8,#0]/*asm*/
caspal x0,x1/*asm*/,x8,x9/*asm*/,[x8,#0]/*asm*/
caspal x16,x17/*asm*/,x8,x9/*asm*/,[x8,#0]/*asm*/
caspal x30,xzr/*asm*/,x8,x9/*asm*/,[x8,#0]/*asm*/
caspal x8,x9/*asm*/,x8,x9/*asm*/,[x8,#0]/*asm*/
caspal x8,x9/*asm*/,x2,x3/*asm*/,[x8,#0]/*asm*/
caspal x8,x9/*asm*/,x4,x5/*asm*/,[x8,#0]/*asm*/
caspal x8,x9/*asm*/,x0,x1/*asm*/,[x8,#0]/*asm*/
caspal x8,x9/*asm*/,x16,x17/*asm*/,[x8,#0]/*asm*/
caspal x8,x9/*asm*/,x30,xzr/*asm*/,[x8,#0]/*asm*/
caspal x8,x9/*asm*/,x8,x9/*asm*/,[x8,#0]/*asm*/
caspal x8,x9/*asm*/,x8,x9/*asm*/,[x0, #0]/*asm*/
caspal x8,x9/*asm*/,x8,x9/*asm*/,[x16,#0]/*asm*/
caspal x8,x9/*asm*/,x8,x9/*asm*/,[sp,#0]/*asm*/
caspl x8,x9/*asm*/,x8,x9/*asm*/,[x8,#0]/*asm*/
caspl x2,x3/*asm*/,x8,x9/*asm*/,[x8,#0]/*asm*/
caspl x4,x5/*asm*/,x8,x9/*asm*/,[x8,#0]/*asm*/
caspl x0,x1/*asm*/,x8,x9/*asm*/,[x8,#0]/*asm*/
caspl x16,x17/*asm*/,x8,x9/*asm*/,[x8,#0]/*asm*/
caspl x30,xzr/*asm*/,x8,x9/*asm*/,[x8,#0]/*asm*/
caspl x8,x9/*asm*/,x8,x9/*asm*/,[x8,#0]/*asm*/
caspl x8,x9/*asm*/,x2,x3/*asm*/,[x8,#0]/*asm*/
caspl x8,x9/*asm*/,x4,x5/*asm*/,[x8,#0]/*asm*/
caspl x8,x9/*asm*/,x0,x1/*asm*/,[x8,#0]/*asm*/
caspl x8,x9/*asm*/,x16,x17/*asm*/,[x8,#0]/*asm*/
caspl x8,x9/*asm*/,x30,xzr/*asm*/,[x8,#0]/*asm*/
caspl x8,x9/*asm*/,x8,x9/*asm*/,[x8,#0]/*asm*/
caspl x8,x9/*asm*/,x8,x9/*asm*/,[x0, #0]/*asm*/
caspl x8,x9/*asm*/,x8,x9/*asm*/,[x16,#0]/*asm*/
caspl x8,x9/*asm*/,x8,x9/*asm*/,[sp,#0]/*asm*/
cas w8,w8,[x8,#0]/*asm*/
cas w1,w8,[x8,#0]/*asm*/
cas w2,w8,[x8,#0]/*asm*/
cas w4,w8,[x8,#0]/*asm*/
cas w0,w8,[x8,#0]/*asm*/
cas w16,w8,[x8,#0]/*asm*/
cas w30,w8,[x8,#0]/*asm*/
cas wzr,w8,[x8,#0]/*asm*/
cas w8,w8,[x8,#0]/*asm*/
cas w8,w1,[x8,#0]/*asm*/
cas w8,w2,[x8,#0]/*asm*/
cas w8,w4,[x8,#0]/*asm*/
cas w8,w0,[x8,#0]/*asm*/
cas w8,w16,[x8,#0]/*asm*/
cas w8,w30,[x8,#0]/*asm*/
cas w8,wzr,[x8,#0]/*asm*/
cas w8,w8,[x8,#0]/*asm*/
cas w8,w8,[x0, #0]/*asm*/
cas w8,w8,[x16,#0]/*asm*/
cas w8,w8,[sp,#0]/*asm*/
casa w8,w8,[x8,#0]/*asm*/
casa w1,w8,[x8,#0]/*asm*/
casa w2,w8,[x8,#0]/*asm*/
casa w4,w8,[x8,#0]/*asm*/
casa w0,w8,[x8,#0]/*asm*/
casa w16,w8,[x8,#0]/*asm*/
casa w30,w8,[x8,#0]/*asm*/
casa wzr,w8,[x8,#0]/*asm*/
casa w8,w8,[x8,#0]/*asm*/
casa w8,w1,[x8,#0]/*asm*/
casa w8,w2,[x8,#0]/*asm*/
casa w8,w4,[x8,#0]/*asm*/
casa w8,w0,[x8,#0]/*asm*/
casa w8,w16,[x8,#0]/*asm*/
casa w8,w30,[x8,#0]/*asm*/
casa w8,wzr,[x8,#0]/*asm*/
casa w8,w8,[x8,#0]/*asm*/
casa w8,w8,[x0, #0]/*asm*/
casa w8,w8,[x16,#0]/*asm*/
casa w8,w8,[sp,#0]/*asm*/
casal w8,w8,[x8,#0]/*asm*/
casal w1,w8,[x8,#0]/*asm*/
casal w2,w8,[x8,#0]/*asm*/
casal w4,w8,[x8,#0]/*asm*/
casal w0,w8,[x8,#0]/*asm*/
casal w16,w8,[x8,#0]/*asm*/
casal w30,w8,[x8,#0]/*asm*/
casal wzr,w8,[x8,#0]/*asm*/
casal w8,w8,[x8,#0]/*asm*/
casal w8,w1,[x8,#0]/*asm*/
casal w8,w2,[x8,#0]/*asm*/
casal w8,w4,[x8,#0]/*asm*/
casal w8,w0,[x8,#0]/*asm*/
casal w8,w16,[x8,#0]/*asm*/
casal w8,w30,[x8,#0]/*asm*/
casal w8,wzr,[x8,#0]/*asm*/
casal w8,w8,[x8,#0]/*asm*/
casal w8,w8,[x0, #0]/*asm*/
casal w8,w8,[x16,#0]/*asm*/
casal w8,w8,[sp,#0]/*asm*/
casl w8,w8,[x8,#0]/*asm*/
casl w1,w8,[x8,#0]/*asm*/
casl w2,w8,[x8,#0]/*asm*/
casl w4,w8,[x8,#0]/*asm*/
casl w0,w8,[x8,#0]/*asm*/
casl w16,w8,[x8,#0]/*asm*/
casl w30,w8,[x8,#0]/*asm*/
casl wzr,w8,[x8,#0]/*asm*/
casl w8,w8,[x8,#0]/*asm*/
casl w8,w1,[x8,#0]/*asm*/
casl w8,w2,[x8,#0]/*asm*/
casl w8,w4,[x8,#0]/*asm*/
casl w8,w0,[x8,#0]/*asm*/
casl w8,w16,[x8,#0]/*asm*/
casl w8,w30,[x8,#0]/*asm*/
casl w8,wzr,[x8,#0]/*asm*/
casl w8,w8,[x8,#0]/*asm*/
casl w8,w8,[x0, #0]/*asm*/
casl w8,w8,[x16,#0]/*asm*/
casl w8,w8,[sp,#0]/*asm*/
cas x8,x8,[x8,#0]/*asm*/
cas x1,x8,[x8,#0]/*asm*/
cas x2,x8,[x8,#0]/*asm*/
cas x4,x8,[x8,#0]/*asm*/
cas x0,x8,[x8,#0]/*asm*/
cas x16,x8,[x8,#0]/*asm*/
cas x30,x8,[x8,#0]/*asm*/
cas xzr,x8,[x8,#0]/*asm*/
cas x8,x8,[x8,#0]/*asm*/
cas x8,x1,[x8,#0]/*asm*/
cas x8,x2,[x8,#0]/*asm*/
cas x8,x4,[x8,#0]/*asm*/
cas x8,x0,[x8,#0]/*asm*/
cas x8,x16,[x8,#0]/*asm*/
cas x8,x30,[x8,#0]/*asm*/
cas x8,xzr,[x8,#0]/*asm*/
cas x8,x8,[x8,#0]/*asm*/
cas x8,x8,[x0, #0]/*asm*/
cas x8,x8,[x16,#0]/*asm*/
cas x8,x8,[sp,#0]/*asm*/
casa x8,x8,[x8,#0]/*asm*/
casa x1,x8,[x8,#0]/*asm*/
casa x2,x8,[x8,#0]/*asm*/
casa x4,x8,[x8,#0]/*asm*/
casa x0,x8,[x8,#0]/*asm*/
casa x16,x8,[x8,#0]/*asm*/
casa x30,x8,[x8,#0]/*asm*/
casa xzr,x8,[x8,#0]/*asm*/
casa x8,x8,[x8,#0]/*asm*/
casa x8,x1,[x8,#0]/*asm*/
casa x8,x2,[x8,#0]/*asm*/
casa x8,x4,[x8,#0]/*asm*/
casa x8,x0,[x8,#0]/*asm*/
casa x8,x16,[x8,#0]/*asm*/
casa x8,x30,[x8,#0]/*asm*/
casa x8,xzr,[x8,#0]/*asm*/
casa x8,x8,[x8,#0]/*asm*/
casa x8,x8,[x0, #0]/*asm*/
casa x8,x8,[x16,#0]/*asm*/
casa x8,x8,[sp,#0]/*asm*/
casal x8,x8,[x8,#0]/*asm*/
casal x1,x8,[x8,#0]/*asm*/
casal x2,x8,[x8,#0]/*asm*/
casal x4,x8,[x8,#0]/*asm*/
casal x0,x8,[x8,#0]/*asm*/
casal x16,x8,[x8,#0]/*asm*/
casal x30,x8,[x8,#0]/*asm*/
casal xzr,x8,[x8,#0]/*asm*/
casal x8,x8,[x8,#0]/*asm*/
casal x8,x1,[x8,#0]/*asm*/
casal x8,x2,[x8,#0]/*asm*/
casal x8,x4,[x8,#0]/*asm*/
casal x8,x0,[x8,#0]/*asm*/
casal x8,x16,[x8,#0]/*asm*/
casal x8,x30,[x8,#0]/*asm*/
casal x8,xzr,[x8,#0]/*asm*/
casal x8,x8,[x8,#0]/*asm*/
casal x8,x8,[x0, #0]/*asm*/
casal x8,x8,[x16,#0]/*asm*/
casal x8,x8,[sp,#0]/*asm*/
casl x8,x8,[x8,#0]/*asm*/
casl x1,x8,[x8,#0]/*asm*/
casl x2,x8,[x8,#0]/*asm*/
casl x4,x8,[x8,#0]/*asm*/
casl x0,x8,[x8,#0]/*asm*/
casl x16,x8,[x8,#0]/*asm*/
casl x30,x8,[x8,#0]/*asm*/
casl xzr,x8,[x8,#0]/*asm*/
casl x8,x8,[x8,#0]/*asm*/
casl x8,x1,[x8,#0]/*asm*/
casl x8,x2,[x8,#0]/*asm*/
casl x8,x4,[x8,#0]/*asm*/
casl x8,x0,[x8,#0]/*asm*/
casl x8,x16,[x8,#0]/*asm*/
casl x8,x30,[x8,#0]/*asm*/
casl x8,xzr,[x8,#0]/*asm*/
casl x8,x8,[x8,#0]/*asm*/
casl x8,x8,[x0, #0]/*asm*/
casl x8,x8,[x16,#0]/*asm*/
casl x8,x8,[sp,#0]/*asm*/
cmla z8.h,z8.h,z7.h[3],90
cmla z1.h,z8.h,z7.h[3],90
cmla z2.h,z8.h,z7.h[3],90
cmla z4.h,z8.h,z7.h[3],90
cmla z0.h,z8.h,z7.h[3],90
cmla z16.h,z8.h,z7.h[3],90
cmla z30.h,z8.h,z7.h[3],90
cmla z31.h,z8.h,z7.h[3],90
cmla z8.h,z8.h,z7.h[3],90
cmla z8.h,z1.h,z7.h[3],90
cmla z8.h,z2.h,z7.h[3],90
cmla z8.h,z4.h,z7.h[3],90
cmla z8.h,z0.h,z7.h[3],90
cmla z8.h,z16.h,z7.h[3],90
cmla z8.h,z30.h,z7.h[3],90
cmla z8.h,z31.h,z7.h[3],90
cmla z8.h,z8.h,z7.h[3],90
cmla z8.h,z8.h,z1.h[1],90
cmla z8.h,z8.h,z0.h[0],90
cmla z8.h,z8.h,z4.h[2],90
cmla z8.h,z8.h,z7.h[3],90
cmla z8.h,z8.h,z7.h[3],0
cmla z8.h,z8.h,z7.h[3],180
cmla z8.h,z8.h,z7.h[3],270
cmla z8.s,z8.s,z15.s[1],90
cmla z1.s,z8.s,z15.s[1],90
cmla z2.s,z8.s,z15.s[1],90
cmla z4.s,z8.s,z15.s[1],90
cmla z0.s,z8.s,z15.s[1],90
cmla z16.s,z8.s,z15.s[1],90
cmla z30.s,z8.s,z15.s[1],90
cmla z31.s,z8.s,z15.s[1],90
cmla z8.s,z8.s,z15.s[1],90
cmla z8.s,z1.s,z15.s[1],90
cmla z8.s,z2.s,z15.s[1],90
cmla z8.s,z4.s,z15.s[1],90
cmla z8.s,z0.s,z15.s[1],90
cmla z8.s,z16.s,z15.s[1],90
cmla z8.s,z30.s,z15.s[1],90
cmla z8.s,z31.s,z15.s[1],90
cmla z8.s,z8.s,z15.s[1],90
cmla z8.s,z8.s,z1.s[0],90
cmla z8.s,z8.s,z0.s[1],90
cmla z8.s,z8.s,z8.s[0],90
cmla z8.s,z8.s,z15.s[1],90
cmla z8.s,z8.s,z15.s[1],0
cmla z8.s,z8.s,z15.s[1],180
cmla z8.s,z8.s,z15.s[1],270
casah w8,w8,[x8,#0]/*asm*/
casah w1,w8,[x8,#0]/*asm*/
casah w2,w8,[x8,#0]/*asm*/
casah w4,w8,[x8,#0]/*asm*/
casah w0,w8,[x8,#0]/*asm*/
casah w16,w8,[x8,#0]/*asm*/
casah w30,w8,[x8,#0]/*asm*/
casah wzr,w8,[x8,#0]/*asm*/
casah w8,w8,[x8,#0]/*asm*/
casah w8,w1,[x8,#0]/*asm*/
casah w8,w2,[x8,#0]/*asm*/
casah w8,w4,[x8,#0]/*asm*/
casah w8,w0,[x8,#0]/*asm*/
casah w8,w16,[x8,#0]/*asm*/
casah w8,w30,[x8,#0]/*asm*/
casah w8,wzr,[x8,#0]/*asm*/
casah w8,w8,[x8,#0]/*asm*/
casah w8,w8,[x0, #0]/*asm*/
casah w8,w8,[x16,#0]/*asm*/
casah w8,w8,[sp,#0]/*asm*/
casalh w8,w8,[x8,#0]/*asm*/
casalh w1,w8,[x8,#0]/*asm*/
casalh w2,w8,[x8,#0]/*asm*/
casalh w4,w8,[x8,#0]/*asm*/
casalh w0,w8,[x8,#0]/*asm*/
casalh w16,w8,[x8,#0]/*asm*/
casalh w30,w8,[x8,#0]/*asm*/
casalh wzr,w8,[x8,#0]/*asm*/
casalh w8,w8,[x8,#0]/*asm*/
casalh w8,w1,[x8,#0]/*asm*/
casalh w8,w2,[x8,#0]/*asm*/
casalh w8,w4,[x8,#0]/*asm*/
casalh w8,w0,[x8,#0]/*asm*/
casalh w8,w16,[x8,#0]/*asm*/
casalh w8,w30,[x8,#0]/*asm*/
casalh w8,wzr,[x8,#0]/*asm*/
casalh w8,w8,[x8,#0]/*asm*/
casalh w8,w8,[x0, #0]/*asm*/
casalh w8,w8,[x16,#0]/*asm*/
casalh w8,w8,[sp,#0]/*asm*/
cash w8,w8,[x8,#0]/*asm*/
cash w1,w8,[x8,#0]/*asm*/
cash w2,w8,[x8,#0]/*asm*/
cash w4,w8,[x8,#0]/*asm*/
cash w0,w8,[x8,#0]/*asm*/
cash w16,w8,[x8,#0]/*asm*/
cash w30,w8,[x8,#0]/*asm*/
cash wzr,w8,[x8,#0]/*asm*/
cash w8,w8,[x8,#0]/*asm*/
cash w8,w1,[x8,#0]/*asm*/
cash w8,w2,[x8,#0]/*asm*/
cash w8,w4,[x8,#0]/*asm*/
cash w8,w0,[x8,#0]/*asm*/
cash w8,w16,[x8,#0]/*asm*/
cash w8,w30,[x8,#0]/*asm*/
cash w8,wzr,[x8,#0]/*asm*/
cash w8,w8,[x8,#0]/*asm*/
cash w8,w8,[x0, #0]/*asm*/
cash w8,w8,[x16,#0]/*asm*/
cash w8,w8,[sp,#0]/*asm*/
caslh w8,w8,[x8,#0]/*asm*/
caslh w1,w8,[x8,#0]/*asm*/
caslh w2,w8,[x8,#0]/*asm*/
caslh w4,w8,[x8,#0]/*asm*/
caslh w0,w8,[x8,#0]/*asm*/
caslh w16,w8,[x8,#0]/*asm*/
caslh w30,w8,[x8,#0]/*asm*/
caslh wzr,w8,[x8,#0]/*asm*/
caslh w8,w8,[x8,#0]/*asm*/
caslh w8,w1,[x8,#0]/*asm*/
caslh w8,w2,[x8,#0]/*asm*/
caslh w8,w4,[x8,#0]/*asm*/
caslh w8,w0,[x8,#0]/*asm*/
caslh w8,w16,[x8,#0]/*asm*/
caslh w8,w30,[x8,#0]/*asm*/
caslh w8,wzr,[x8,#0]/*asm*/
caslh w8,w8,[x8,#0]/*asm*/
caslh w8,w8,[x0, #0]/*asm*/
caslh w8,w8,[x16,#0]/*asm*/
caslh w8,w8,[sp,#0]/*asm*/
| 29.801274
| 49
| 0.579037
|
f972832a7b6fb2ef3941586cefdc9b7091e6d51b
| 283
|
asm
|
Assembly
|
libsrc/_DEVELOPMENT/arch/zxn/esxdos/c/sdcc_iy/esx_ide_get_lfn.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 640
|
2017-01-14T23:33:45.000Z
|
2022-03-30T11:28:42.000Z
|
libsrc/_DEVELOPMENT/arch/zxn/esxdos/c/sdcc_iy/esx_ide_get_lfn.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 1,600
|
2017-01-15T16:12:02.000Z
|
2022-03-31T12:11:12.000Z
|
libsrc/_DEVELOPMENT/arch/zxn/esxdos/c/sdcc_iy/esx_ide_get_lfn.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 215
|
2017-01-17T10:43:03.000Z
|
2022-03-23T17:25:02.000Z
|
; unsigned char esx_ide_get_lfn(struct esx_lfn *dir, struct esx_cat_entry *query)
SECTION code_esxdos
PUBLIC _esx_ide_get_lfn
EXTERN l_esx_ide_get_lfn_callee
_esx_ide_get_lfn:
pop af
pop hl
pop de
push de
push hl
push af
jp l_esx_ide_get_lfn_callee
| 14.15
| 81
| 0.749117
|
694f3f334fa6477f5892f30e3b2179eb1d95ff20
| 454
|
asm
|
Assembly
|
test/asm/rs.asm
|
michealccc/rgbds
|
b51e1c7c2c4ce2769f01e016967d0115893a7a88
|
[
"MIT"
] | 522
|
2017-02-25T21:10:13.000Z
|
2020-09-13T14:26:18.000Z
|
test/asm/rs.asm
|
michealccc/rgbds
|
b51e1c7c2c4ce2769f01e016967d0115893a7a88
|
[
"MIT"
] | 405
|
2017-02-25T21:32:37.000Z
|
2020-09-13T16:43:29.000Z
|
test/asm/rs.asm
|
michealccc/rgbds
|
b51e1c7c2c4ce2769f01e016967d0115893a7a88
|
[
"MIT"
] | 84
|
2017-02-25T21:10:26.000Z
|
2020-09-13T14:28:25.000Z
|
a1 rb 1
a2 rw 1
a3 rl 1
PRINTLN "a1 = ", a1
PRINTLN "a2 = ", a2
PRINTLN "a3 = ", a3
PRINTLN "_RS = ", _RS
b1 rb 1
b2 rw 1
b3 rl 1
PRINTLN "b1 = ", b1
PRINTLN "b2 = ", b2
PRINTLN "b3 = ", b3
PRINTLN "_RS = ", _RS
rsset 42
c1 rb 1
c2 rw 1
c3 rl 1
PRINTLN "c1 = ", c1
PRINTLN "c2 = ", c2
PRINTLN "c3 = ", c3
PRINTLN "_RS = ", _RS
rsreset
d1 rb 1
d2 rw 1
d3 rl 1
PRINTLN "d1 = ", d1
PRINTLN "d2 = ", d2
PRINTLN "d3 = ", d3
PRINTLN "_RS = ", _RS
| 10.318182
| 21
| 0.568282
|
8a08d64d8289dd3efff16bfbbec6868ba3878c80
| 404
|
asm
|
Assembly
|
home/reload_sprites.asm
|
opiter09/ASM-Machina
|
75d8e457b3e82cc7a99b8e70ada643ab02863ada
|
[
"CC0-1.0"
] | 1
|
2022-02-15T00:19:44.000Z
|
2022-02-15T00:19:44.000Z
|
home/reload_sprites.asm
|
opiter09/ASM-Machina
|
75d8e457b3e82cc7a99b8e70ada643ab02863ada
|
[
"CC0-1.0"
] | null | null | null |
home/reload_sprites.asm
|
opiter09/ASM-Machina
|
75d8e457b3e82cc7a99b8e70ada643ab02863ada
|
[
"CC0-1.0"
] | null | null | null |
; Copy the current map's sprites' tile patterns to VRAM again after they have
; been overwritten by other tile patterns.
ReloadMapSpriteTilePatterns::
ld hl, wFontLoaded
ld a, [hl]
push af
res 0, [hl]
push hl
xor a
ld [wSpriteSetID], a
call DisableLCD
farcall InitMapSprites
call EnableLCD
pop hl
pop af
ld [hl], a
call LoadPlayerSpriteGraphics
call LoadFontTilePatterns
jp UpdateSprites
| 20.2
| 77
| 0.764851
|
b53c65ef1668bd32965881ba33e7d25593067bb4
| 89
|
asm
|
Assembly
|
patches/koala/code/disasm/koala_fix_nondos.asm
|
fcatrin/a8tools
|
2792cfbabc9e3fd369550b810f631d62e03c8b90
|
[
"MIT"
] | 3
|
2020-07-02T15:11:23.000Z
|
2020-07-03T19:59:08.000Z
|
patches/koala/code/disasm/koala_fix_nondos.asm
|
fcatrin/a8tools
|
2792cfbabc9e3fd369550b810f631d62e03c8b90
|
[
"MIT"
] | null | null | null |
patches/koala/code/disasm/koala_fix_nondos.asm
|
fcatrin/a8tools
|
2792cfbabc9e3fd369550b810f631d62e03c8b90
|
[
"MIT"
] | null | null | null |
; fix invalid DOS call when used wihout DOS
org $33A7
nop
nop
nop
| 11.125
| 46
| 0.561798
|
e22f6f205f9d4552cf80db42e36923aa38910244
| 943
|
asm
|
Assembly
|
MSVC/14.24.28314/crt/src/i386/ehprolog.asm
|
825126369/UCRT
|
8853304fdc2a5c216658d08b6dbbe716aa2a7b1f
|
[
"MIT"
] | 2
|
2021-01-27T10:19:30.000Z
|
2021-02-09T06:24:30.000Z
|
MSVC/14.24.28314/crt/src/i386/ehprolog.asm
|
825126369/UCRT
|
8853304fdc2a5c216658d08b6dbbe716aa2a7b1f
|
[
"MIT"
] | null | null | null |
MSVC/14.24.28314/crt/src/i386/ehprolog.asm
|
825126369/UCRT
|
8853304fdc2a5c216658d08b6dbbe716aa2a7b1f
|
[
"MIT"
] | 1
|
2021-01-27T10:19:36.000Z
|
2021-01-27T10:19:36.000Z
|
;***
;ehprolog.asm - defines __EH_prolog
;
; Copyright (c) Microsoft Corporation. All rights reserved.
;
;Purpose:
; EH prolog helper function. Sets up the frame for a C++ EH function
; with unwinds, by creating a link in the __except_list, and by setting
; up EBP as frame base pointer.
;
;*******************************************************************************
title ehprolog.asm
.386
.model FLAT
ASSUME FS : NOTHING
PUBLIC __EH_prolog
.code
__EH_prolog PROC NEAR
push -1 ; State index
push eax ; Push address of handler thunk
mov eax, DWORD PTR fs:[0]
push eax ; List link
mov eax, DWORD PTR [esp+12] ; Load return address
mov DWORD PTR fs:[0], esp
mov DWORD PTR [esp+12], ebp ; Save old ebp on the stack
lea ebp, DWORD PTR [esp+12] ; Set ebp to the base of the frame
push eax ; Push return addr on top of the stack
bnd ret 0 ; JMP [eax] would be bad on P6
__EH_prolog ENDP
END
| 25.486486
| 80
| 0.627784
|
2094a2fa237a13ce615876e94525c2c2416c59ab
| 162
|
asm
|
Assembly
|
libsrc/_DEVELOPMENT/math/float/math48/lm/c/sdcc_iy/___fs2ulong_callee.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 640
|
2017-01-14T23:33:45.000Z
|
2022-03-30T11:28:42.000Z
|
libsrc/_DEVELOPMENT/math/float/math48/lm/c/sdcc_iy/___fs2ulong_callee.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 1,600
|
2017-01-15T16:12:02.000Z
|
2022-03-31T12:11:12.000Z
|
libsrc/_DEVELOPMENT/math/float/math48/lm/c/sdcc_iy/___fs2ulong_callee.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 215
|
2017-01-17T10:43:03.000Z
|
2022-03-23T17:25:02.000Z
|
SECTION code_clib
SECTION code_fp_math48
PUBLIC ___fs2ulong_callee
EXTERN cm48_sdcciyp_ds2ulong_callee
defc ___fs2ulong_callee = cm48_sdcciyp_ds2ulong_callee
| 16.2
| 54
| 0.895062
|
35daf7430f957ad1dc5b77b79d10f5f07dc33337
| 457
|
asm
|
Assembly
|
programs/oeis/028/A028291.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/028/A028291.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/028/A028291.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A028291: Expansion of 1/((1-x)^2(1-x^2)(1-x^3)(1-x^5)) in powers of x.
; 1,2,4,7,11,17,25,35,48,64,84,108,137,171,211,258,312,374,445,525,616,718,832,959,1100,1256,1428,1617,1824,2050,2297,2565,2856,3171,3511,3878,4273,4697,5152,5639,6160,6716,7309,7940,8611,9324,10080,10881,11729
lpb $0
mov $2,$0
sub $0,1
seq $2,8669 ; Molien series for 4-dimensional complex reflection group of order 7680 (in powers of x^4).
add $1,$2
lpe
add $1,1
mov $0,$1
| 38.083333
| 210
| 0.68709
|
f423fd25bf7d96d9df93bc5cb6cf6f2080205164
| 593
|
asm
|
Assembly
|
programs/oeis/250/A250749.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | 1
|
2021-03-15T11:38:20.000Z
|
2021-03-15T11:38:20.000Z
|
programs/oeis/250/A250749.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/250/A250749.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | null | null | null |
; A250749: Number of (n+1) X (2+1) 0..2 arrays with nondecreasing x(i,j)-x(i,j-1) in the i direction and nondecreasing x(i,j)+x(i-1,j) in the j direction.
; 72,237,756,2361,7272,22197,67356,203601,613872,1847757,5555556,16691241,50122872,150466917,451597356,1355185281,4066342272,12200599677,36604944756,109821125721,329475960072,988453046037,2965409469756,8896329072561,26689188544272,80067968285997,240204710164356,720615741105801,2161850444542872,6485557776079557
add $0,1
mov $1,6
lpb $0
sub $0,1
add $1,1
mul $1,3
add $2,1
mul $2,2
add $1,$2
lpe
sub $1,23
mul $1,3
add $1,72
| 34.882353
| 311
| 0.757167
|
52d320b940f4b0bd9fae8c969e25f69d95deaa2f
| 5,419
|
asm
|
Assembly
|
Transynther/x86/_processed/AVXALIGN/_st_4k_sm_/i7-8650U_0xd2_notsx.log_1_1197.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 9
|
2020-08-13T19:41:58.000Z
|
2022-03-30T12:22:51.000Z
|
Transynther/x86/_processed/AVXALIGN/_st_4k_sm_/i7-8650U_0xd2_notsx.log_1_1197.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 1
|
2021-04-29T06:29:35.000Z
|
2021-05-13T21:02:30.000Z
|
Transynther/x86/_processed/AVXALIGN/_st_4k_sm_/i7-8650U_0xd2_notsx.log_1_1197.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 %r14
push %r8
push %rax
push %rcx
push %rdi
push %rsi
lea addresses_normal_ht+0xe191, %r14
nop
nop
nop
nop
mfence
movl $0x61626364, (%r14)
nop
xor %rdi, %rdi
lea addresses_normal_ht+0xca95, %r11
nop
nop
nop
nop
nop
sub %r8, %r8
movb (%r11), %al
nop
nop
nop
sub $19302, %rsi
lea addresses_D_ht+0x10935, %r14
nop
nop
nop
nop
xor %rax, %rax
mov (%r14), %r11
nop
nop
add $57193, %r14
lea addresses_normal_ht+0xd935, %rsi
lea addresses_WT_ht+0x7795, %rdi
cmp $37669, %r8
mov $67, %rcx
rep movsb
nop
sub %r14, %r14
lea addresses_WC_ht+0x196e2, %rsi
lea addresses_WT_ht+0x182ed, %rdi
nop
nop
nop
nop
add %r12, %r12
mov $105, %rcx
rep movsb
nop
add %rax, %rax
lea addresses_WT_ht+0x15a95, %r12
nop
add %rax, %rax
movb (%r12), %r11b
nop
nop
nop
nop
inc %rdi
lea addresses_D_ht+0x15695, %r14
and $58406, %rax
mov $0x6162636465666768, %rdi
movq %rdi, %xmm0
vmovups %ymm0, (%r14)
add $5261, %r8
lea addresses_A_ht+0xfeb, %r8
and %r14, %r14
mov $0x6162636465666768, %r11
movq %r11, %xmm7
movups %xmm7, (%r8)
add %rcx, %rcx
lea addresses_WC_ht+0xd895, %rsi
lea addresses_D_ht+0x10a21, %rdi
nop
nop
nop
xor $10163, %r12
mov $45, %rcx
rep movsb
nop
nop
nop
nop
add %rax, %rax
lea addresses_WT_ht+0xfe95, %r8
nop
nop
cmp %r11, %r11
and $0xffffffffffffffc0, %r8
vmovaps (%r8), %ymm4
vextracti128 $1, %ymm4, %xmm4
vpextrq $1, %xmm4, %rax
nop
and $36917, %r12
lea addresses_D_ht+0x1cbb7, %r11
nop
nop
nop
nop
cmp $61853, %r12
mov $0x6162636465666768, %r14
movq %r14, %xmm4
movups %xmm4, (%r11)
dec %rdi
lea addresses_UC_ht+0x1f15, %rsi
lea addresses_A_ht+0xd845, %rdi
nop
nop
nop
inc %r8
mov $56, %rcx
rep movsb
nop
nop
xor $24079, %rax
pop %rsi
pop %rdi
pop %rcx
pop %rax
pop %r8
pop %r14
pop %r12
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r14
push %r15
push %r8
push %rbx
push %rcx
push %rdx
// Load
mov $0x4735be0000000915, %rdx
nop
nop
nop
nop
and %rbx, %rbx
mov (%rdx), %r10
nop
nop
and $25372, %rbx
// Load
lea addresses_D+0x7515, %rcx
nop
dec %r15
movb (%rcx), %dl
nop
nop
nop
nop
add %r8, %r8
// Store
lea addresses_PSE+0x13a95, %rbx
nop
nop
nop
nop
inc %rcx
movl $0x51525354, (%rbx)
nop
nop
nop
nop
nop
add $3779, %rdx
// Store
mov $0x295, %r8
inc %rdx
movw $0x5152, (%r8)
nop
cmp $51606, %rdx
// Load
lea addresses_A+0x16315, %r10
nop
nop
nop
inc %rbx
mov (%r10), %r8d
sub %rbx, %rbx
// Store
lea addresses_WC+0x1efa5, %rdx
nop
nop
nop
nop
dec %rcx
mov $0x5152535455565758, %r15
movq %r15, %xmm3
vmovups %ymm3, (%rdx)
nop
nop
add $53565, %r14
// Faulty Load
lea addresses_PSE+0x13a95, %r8
nop
and $55163, %r14
mov (%r8), %r10d
lea oracles, %r15
and $0xff, %r10
shlq $12, %r10
mov (%r15,%r10,1), %r10
pop %rdx
pop %rcx
pop %rbx
pop %r8
pop %r15
pop %r14
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_PSE', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_NC', 'size': 8, 'AVXalign': False, 'NT': True, 'congruent': 7, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_D', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 7, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_PSE', 'size': 4, 'AVXalign': False, 'NT': True, 'congruent': 0, 'same': True}}
{'OP': 'STOR', 'dst': {'type': 'addresses_P', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 11, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_A', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 7, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 3, 'same': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_PSE', 'size': 4, 'AVXalign': True, 'NT': False, 'congruent': 0, 'same': True}}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 1, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 9, 'same': True}}
{'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'size': 8, 'AVXalign': False, 'NT': True, 'congruent': 3, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 4, 'same': True}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 8, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 3, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 2, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'size': 32, 'AVXalign': True, 'NT': False, 'congruent': 8, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 7, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 3, 'same': False}}
{'54': 1}
54
*/
| 20.92278
| 151
| 0.644584
|
35945262d6f3afb503c60cc37b4b5c1ab26d1854
| 180
|
asm
|
Assembly
|
libsrc/target/nc100/padreadyserial.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 640
|
2017-01-14T23:33:45.000Z
|
2022-03-30T11:28:42.000Z
|
libsrc/target/nc100/padreadyserial.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 1,600
|
2017-01-15T16:12:02.000Z
|
2022-03-31T12:11:12.000Z
|
libsrc/target/nc100/padreadyserial.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 215
|
2017-01-17T10:43:03.000Z
|
2022-03-23T17:25:02.000Z
|
SECTION code_clib
PUBLIC padreadyserial
PUBLIC _padreadyserial
; fastcall
.padreadyserial
._padreadyserial
call 0xb869
ld hl, 0
ret nc
inc hl
ret
| 12.857143
| 33
| 0.677778
|
5efa69ba073b189c9608d78f44d5a69bb9c5930c
| 414
|
asm
|
Assembly
|
oeis/044/A044682.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/044/A044682.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/044/A044682.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A044682: Numbers n such that string 5,5 occurs in the base 9 representation of n but not of n+1.
; Submitted by Jamie Morken(s2)
; 50,131,212,293,374,458,536,617,698,779,860,941,1022,1103,1187,1265,1346,1427,1508,1589,1670,1751,1832,1916,1994,2075,2156,2237,2318,2399,2480,2561,2645,2723,2804,2885,2966,3047,3128
mov $1,$0
add $0,12
mod $0,9
div $0,8
add $0,70
mul $0,3
mov $2,$1
mul $2,81
add $0,$2
sub $0,160
| 27.6
| 183
| 0.714976
|
491dfb1a45d9dbd6355f2f3254b3323757b38c40
| 688
|
asm
|
Assembly
|
oeis/127/A127920.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/127/A127920.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/127/A127920.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A127920: 1/6 of product of three numbers: n-th prime, previous and following number.
; Submitted by Jon Maiga
; 1,4,20,56,220,364,816,1140,2024,4060,4960,8436,11480,13244,17296,24804,34220,37820,50116,59640,64824,82160,95284,117480,152096,171700,182104,204156,215820,240464,341376,374660,428536,447580,551300,573800,644956,721764,776216,862924,955860,988260,1161280,1198144,1274196,1313400,1565620,1848224,1949476,2001460,2108184,2275280,2332880,2635500,2829056,3031864,3244140,3317040,3542276,3697960,3777484,4192244,4822356,5013320,5110664,5309116,6044060,6378736,6963596,7084700,7331104,7711320,8238416
seq $0,40 ; The prime numbers.
mov $1,$0
pow $1,3
sub $1,$0
mov $0,$1
div $0,6
| 62.545455
| 495
| 0.802326
|
33b41f17d17172ed0b13df18e7d39636c963026a
| 4,158
|
asm
|
Assembly
|
Transynther/x86/_processed/NONE/_zr_/i7-8650U_0xd2.log_11157_822.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_11157_822.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_11157_822.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 %r14
push %r9
push %rax
push %rbp
push %rbx
push %rdi
push %rdx
// Load
lea addresses_A+0x1313a, %rax
nop
xor %rbp, %rbp
mov (%rax), %r9
nop
nop
and %rbp, %rbp
// Store
lea addresses_WT+0x2aaa, %rdx
nop
nop
nop
inc %r14
movl $0x51525354, (%rdx)
inc %r14
// Faulty Load
lea addresses_WT+0x393a, %r9
clflush (%r9)
nop
nop
cmp $4104, %rbx
movb (%r9), %al
lea oracles, %rbx
and $0xff, %rax
shlq $12, %rax
mov (%rbx,%rax,1), %rax
pop %rdx
pop %rdi
pop %rbx
pop %rbp
pop %rax
pop %r9
pop %r14
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_WT', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_A', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 11, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WT', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 2, 'same': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_WT', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}}
<gen_prepare_buffer>
{'00': 11157}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
| 63.969231
| 2,999
| 0.658249
|
1ae7250820edc208dc6e276e8687a4e7af67034a
| 1,247
|
asm
|
Assembly
|
4matrix/boot.asm
|
SwordYork/slef
|
21c54ad083b1cc178b5936cf2b4c97182a153ed3
|
[
"Apache-2.0"
] | 8
|
2015-11-09T16:55:42.000Z
|
2021-08-23T04:11:23.000Z
|
5font/boot.asm
|
ly2199/slef
|
21c54ad083b1cc178b5936cf2b4c97182a153ed3
|
[
"Apache-2.0"
] | null | null | null |
5font/boot.asm
|
ly2199/slef
|
21c54ad083b1cc178b5936cf2b4c97182a153ed3
|
[
"Apache-2.0"
] | 5
|
2016-03-19T01:25:37.000Z
|
2020-11-29T04:42:28.000Z
|
[org 0x7c00]
; standard FAT16
JMP entry ; go to entry
DB 0x90
DB "SLEF-IPL" ;
DW 512 ;
DB 1 ;
DW 1 ;
DB 2 ;
DW 224 ;
DW 2880 ;
DB 0xf0 ;
DW 9 ;
DW 18 ;
DW 2 ;
DD 0 ;
DD 2880 ;
DB 0,0,0x29 ;
DD 0xffffffff ;
DB "Slef-OS " ;
DB "FAT12 " ;
RESB 18 ;
; Program body
entry:
KERNEL_OFFSET equ 0x1000
mov [BOOT_DRIVE], dl ;drive number
mov bp, 0x9000 ;stack position for popa pusha
mov sp, bp
mov bx, MSG_REAL_MODE
call print_string
call load_kernel
call switch_to_pm
jmp $
%include "./message/print_string.asm"
%include "./disk/disk_load_all.asm"
%include "./pm/gdt.asm"
;%include "./pm/print_string_pm.asm"
%include "./pm/switch_to_pm.asm"
[bits 16]
load_kernel:
mov bx, MSG_LOAD_KERNEL
call print_string
mov bx, KERNEL_OFFSET
mov dh, 17
mov dl, [BOOT_DRIVE]
call disk_load
ret
[bits 32]
BEGIN_PM:
mov ebx, MSG_PROT_MODE
; call print_string_pm
call KERNEL_OFFSET + 512
jmp $
BOOT_DRIVE db 0
MSG_REAL_MODE db "Started in 16-bit Real Mode",0
MSG_PROT_MODE db "Successfully landed in 32-bit Protected Mode",0
MSG_LOAD_KERNEL db "Loading kernel into memory.",0
times 510 -( $ - $$ ) db 0
dw 0xaa55
| 16.194805
| 65
| 0.634322
|
05c8794751e9205c752d81e922391c626f5b860e
| 1,256
|
nasm
|
Assembly
|
tests/syntax-tests/source/Assembly (x86_64)/test.nasm
|
JesseVermeulen123/bat
|
e571cb553b5dcdbb032e84a5d7a404cd35b5b934
|
[
"Apache-2.0",
"MIT"
] | 33,542
|
2018-04-21T11:03:59.000Z
|
2022-03-31T22:19:37.000Z
|
tests/syntax-tests/source/Assembly (x86_64)/test.nasm
|
JesseVermeulen123/bat
|
e571cb553b5dcdbb032e84a5d7a404cd35b5b934
|
[
"Apache-2.0",
"MIT"
] | 1,677
|
2018-04-21T11:37:05.000Z
|
2022-03-30T11:35:07.000Z
|
tests/syntax-tests/source/Assembly (x86_64)/test.nasm
|
JesseVermeulen123/bat
|
e571cb553b5dcdbb032e84a5d7a404cd35b5b934
|
[
"Apache-2.0",
"MIT"
] | 1,156
|
2018-04-30T22:01:52.000Z
|
2022-03-30T17:41:45.000Z
|
global enlight
section .data
red dq 0 ; some comment
green dq 0
blue dq 0
data dq 0
N dd 0
M dd 0
change dd 0
delta db 0
section .text
enlight:
call assign_arguments
call set_data
call make_deltas
ret
assign_arguments:
mov qword[red], rdi
mov qword[green], rsi
mov qword[blue], rdx
mov dword[N], ecx
mov dword[M], r8d
mov dword[change], r9d
mov al, byte[rsp + 16]
mov byte[delta], al
ret
set_data:
mov eax, dword[change]
cmp eax, 1
jne not_1
mov rax, qword[red]
mov qword[data], rax
ret
not_1:
cmp eax, 2
jne not_2
mov rax, qword[green]
mov qword[data], rax
ret
not_2:
mov rax, qword[blue]
mov qword[data], rax
ret
make_deltas:
mov ecx, dword[N]
mov eax, dword[M]
imul ecx, eax
loop_start:
call make_delta
loop loop_start
ret
make_delta:
mov rax, qword[data]
add rax, rcx
dec rax
mov dl, byte[delta]
cmp dl, 0
jl substracting
adding:
add dl, byte[rax]
jc adding_overflow
mov byte[rax], dl
ret
adding_overflow:
mov byte[rax], 255
ret
substracting:
mov r9b, dl
mov dl, 0
sub dl, r9b
mov r8b, byte[rax]
sub r8b, dl
jc substracting_overflow
mov byte[rax], r8b
ret
; another comment
substracting_overflow:
mov byte[rax], 0
ret
| 14.436782
| 26
| 0.666401
|
69746d00f5353567e42ad2581d488449af0735e4
| 327
|
asm
|
Assembly
|
programs/oeis/245/A245552.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/245/A245552.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/245/A245552.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A245552: G.f.: Sum_{n>=0} (2*n+1)*x^(n^2+n+1).
; 0,1,0,3,0,0,0,5,0,0,0,0,0,7,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,0,0,0,13,0,0,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,0,0,0,0,0,0,0,0
lpb $0
mov $$0,$2
add $$0,$0
add $2,2
trn $0,$2
lpe
mov $0,$1
| 29.727273
| 206
| 0.489297
|
41a4db84a5f753719b03ad315afe417bf989290f
| 82
|
asm
|
Assembly
|
audio/sfx/intro_crash.asm
|
AmateurPanda92/pokemon-rby-dx
|
f7ba1cc50b22d93ed176571e074a52d73360da93
|
[
"MIT"
] | 9
|
2020-07-12T19:44:21.000Z
|
2022-03-03T23:32:40.000Z
|
audio/sfx/intro_crash.asm
|
JStar-debug2020/pokemon-rby-dx
|
c2fdd8145d96683addbd8d9075f946a68d1527a1
|
[
"MIT"
] | 7
|
2020-07-16T10:48:52.000Z
|
2021-01-28T18:32:02.000Z
|
audio/sfx/intro_crash.asm
|
JStar-debug2020/pokemon-rby-dx
|
c2fdd8145d96683addbd8d9075f946a68d1527a1
|
[
"MIT"
] | 2
|
2021-03-28T18:33:43.000Z
|
2021-05-06T13:12:09.000Z
|
SFX_Intro_Crash_Ch7:
noisenote 2, 13, 2, 50
noisenote 15, 15, 2, 67
endchannel
| 16.4
| 24
| 0.731707
|
e50fa3ed34f1abbdb8048bf4166b1a1d5a8f3652
| 140
|
asm
|
Assembly
|
libsrc/_DEVELOPMENT/math/float/math48/c/sccz80/cm48_sccz80_logb.asm
|
meesokim/z88dk
|
5763c7778f19a71d936b3200374059d267066bb2
|
[
"ClArtistic"
] | null | null | null |
libsrc/_DEVELOPMENT/math/float/math48/c/sccz80/cm48_sccz80_logb.asm
|
meesokim/z88dk
|
5763c7778f19a71d936b3200374059d267066bb2
|
[
"ClArtistic"
] | null | null | null |
libsrc/_DEVELOPMENT/math/float/math48/c/sccz80/cm48_sccz80_logb.asm
|
meesokim/z88dk
|
5763c7778f19a71d936b3200374059d267066bb2
|
[
"ClArtistic"
] | null | null | null |
; double __FASTCALL__ logb(double x)
SECTION code_fp_math48
PUBLIC cm48_sccz80_logb
EXTERN am48_logb
defc cm48_sccz80_logb = am48_logb
| 12.727273
| 36
| 0.828571
|
3e71b32feef432db9bb636c27ae1c70acbd4c8fc
| 1,022
|
asm
|
Assembly
|
programs/oeis/111/A111954.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/111/A111954.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/111/A111954.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
; A111954: a(n) = A000129(n) + (-1)^n.
; 1,0,3,4,13,28,71,168,409,984,2379,5740,13861,33460,80783,195024,470833,1136688,2744211,6625108,15994429,38613964,93222359,225058680,543339721,1311738120,3166815963,7645370044,18457556053,44560482148,107578520351,259717522848,627013566049,1513744654944,3654502875939,8822750406820,21300003689581,51422757785980,124145519261543,299713796309064,723573111879673,1746860020068408,4217293152016491
mov $4,2
mov $6,$0
lpb $4,1
mov $0,$6
sub $4,1
add $0,$4
sub $0,1
mov $8,2
mov $10,$0
lpb $8,1
mov $0,$10
sub $8,1
add $0,$8
cal $0,52937 ; Expansion of (2-3*x-x^2)/((1-x)*(1-2*x-x^2)).
add $0,9
mov $5,$0
div $5,2
mul $5,4
sub $5,9
mov $2,$5
add $2,9
mov $5,$2
sub $5,7
div $5,4
sub $5,3
mov $7,$8
lpb $7,1
sub $7,1
mov $9,$5
lpe
lpe
lpb $10,1
sub $9,$5
mov $10,0
lpe
mov $3,$4
mov $5,$9
lpb $3,1
mov $1,$5
sub $3,1
lpe
lpe
lpb $6,1
sub $1,$5
mov $6,0
lpe
| 20.44
| 393
| 0.603718
|
8f25f1d73883981e011f1382622ff5c68ca21a45
| 461
|
asm
|
Assembly
|
data/pokemon/base_stats/hoenn/spinda.asm
|
Dev727/ancientplatinum
|
8b212a1728cc32a95743e1538b9eaa0827d013a7
|
[
"blessing"
] | null | null | null |
data/pokemon/base_stats/hoenn/spinda.asm
|
Dev727/ancientplatinum
|
8b212a1728cc32a95743e1538b9eaa0827d013a7
|
[
"blessing"
] | null | null | null |
data/pokemon/base_stats/hoenn/spinda.asm
|
Dev727/ancientplatinum
|
8b212a1728cc32a95743e1538b9eaa0827d013a7
|
[
"blessing"
] | null | null | null |
db 0 ; 327 DEX NO
db 60, 60, 60, 60, 60, 60
; hp atk def spd sat sdf
db NORMAL, NORMAL ; type
db 255 ; catch rate
db 85 ; base exp
db NO_ITEM, NO_ITEM ; items
db GENDER_F50 ; gender ratio
db 100 ; unknown 1
db 15 ; step cycles to hatch
db 5 ; unknown 2
INCBIN "gfx/pokemon/hoenn/spinda/front.dimensions"
db 0, 0, 0, 0 ; padding
db GROWTH_FAST ; growth rate
dn EGG_GROUND, EGG_HUMANSHAPE ; egg groups
; tm/hm learnset
tmhm
; end
| 20.954545
| 51
| 0.663774
|
d776509cd32f3bd4cf8e13f7b3f1be5289085db1
| 609
|
asm
|
Assembly
|
oeis/179/A179986.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/179/A179986.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/179/A179986.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A179986: Second 9-gonal (or nonagonal) numbers: a(n) = n*(7*n+5)/2.
; 0,6,19,39,66,100,141,189,244,306,375,451,534,624,721,825,936,1054,1179,1311,1450,1596,1749,1909,2076,2250,2431,2619,2814,3016,3225,3441,3664,3894,4131,4375,4626,4884,5149,5421,5700,5986,6279,6579,6886,7200,7521,7849,8184,8526,8875,9231,9594,9964,10341,10725,11116,11514,11919,12331,12750,13176,13609,14049,14496,14950,15411,15879,16354,16836,17325,17821,18324,18834,19351,19875,20406,20944,21489,22041,22600,23166,23739,24319,24906,25500,26101,26709,27324,27946,28575,29211,29854,30504,31161,31825
mul $0,14
add $0,5
pow $0,2
div $0,56
| 76.125
| 499
| 0.768473
|
c4978193c652f0282d39d7ba05dac80cfcfc6310
| 157
|
asm
|
Assembly
|
assets/assembly/ours/fatorial.asm
|
edassis/SB-Tradutor
|
9e5a5836e6cf978face35023620257fce684c257
|
[
"MIT"
] | 1
|
2021-02-09T22:24:34.000Z
|
2021-02-09T22:24:34.000Z
|
assets/assembly/ours/fatorial.asm
|
edassis/SB-Tradutor
|
9e5a5836e6cf978face35023620257fce684c257
|
[
"MIT"
] | null | null | null |
assets/assembly/ours/fatorial.asm
|
edassis/SB-Tradutor
|
9e5a5836e6cf978face35023620257fce684c257
|
[
"MIT"
] | null | null | null |
SECTION TEXT
INPUT N
LOAD N
FAT: SUB ONE
JMPZ FIM
STORE AUX
MULT N
STORE N
LOAD AUX
JMP FAT
FIM: OUTPUT N
STOP
SECTION DATA
AUX: SPACE
N: SPACE
ONE: CONST 1
| 9.235294
| 13
| 0.751592
|
a2d064fe607c5e0baa93c74ddab899989a124c90
| 37,297
|
asm
|
Assembly
|
dev/ansi/ansi.asm
|
minblock/msdos
|
479ffd237d9bb7cc83cb06361db2c4ef42dfbac0
|
[
"Apache-2.0"
] | null | null | null |
dev/ansi/ansi.asm
|
minblock/msdos
|
479ffd237d9bb7cc83cb06361db2c4ef42dfbac0
|
[
"Apache-2.0"
] | null | null | null |
dev/ansi/ansi.asm
|
minblock/msdos
|
479ffd237d9bb7cc83cb06361db2c4ef42dfbac0
|
[
"Apache-2.0"
] | null | null | null |
PAGE ,132
TITLE CONDEV FANCY CONSOLE DRIVER
;******************************************************************************
; Change Log:
; Date Who # Description
; -------- --- --- ------------------------------------------------------
; 06/01/90 MKS C02 Bug#173. ANSI was permitting you to go one line below
; the bottom of the screen. PROMPT $e[25;3H $e[1B will
; show you. (PYS: badly done. M005)
;******************************************************************************
;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
; ADDRESSES FOR I/O
;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
;------------------------------------------------------------------------------
; New functionality in DOS 4.00
; GHG fix scrolling flashes on Mod 25/30's
; P1767 VIDEO_MODE_TABLE not initialized correctly 10/16/87 J.K.
; D375 /X needs to be supported by ANSI sequence also 12/14/87 J.K.
; D397 /L option for Enforcing number of lines 12/17/87 J.K.
; D479 An option to disable the extended keyboard functions 02/12/88 J.K.
; P4241 AN001 fix be Revised to fix this problem 04/20/88 J.K.
; P4532 Scrolling has a snow for CGA adapter 04/27/88 J.K.
; P4533 In mode Dh, Eh, Fh, 10h and 13h, Scrolling not working 04/27/88 J.K.
; P4766 In mode 11h, and 12h erase display leaves bottom 5 05/24/88 F.G.
;------------------------------------------------------------------------------
INCLUDE DEVSYM.INC
INCLUDE ANSI.INC ;equates and structures
INCLUDE VECTOR.INC
BREAK <ANSI driver code>
PUBLIC SWITCH_X ; /X option for extended keyboard redefinition support
PUBLIC SWITCH_R ; /R option for using screen readers
PUBLIC SCAN_LINES
PUBLIC VIDEO_MODE_TABLE
PUBLIC VIDEO_TABLE_MAX
PUBLIC MAX_VIDEO_TAB_NUM ;P1767
PUBLIC PTRSAV
PUBLIC ERR1
PUBLIC ERR2
PUBLIC EXT_16
PUBLIC BRKKY
PUBLIC COUT
PUBLIC BASE
PUBLIC MODE
PUBLIC MAXCOL
PUBLIC EXIT
PUBLIC NO_OPERATION
PUBLIC HDWR_FLAG
PUBLIC SWITCH_L
PUBLIC SWITCH_K
PUBLIC SWITCH_S ; M008 /S for screensize option setting.
PUBLIC fhavek09 ; M006
PUBLIC CON$READ
PUBLIC CON$RDND
PUBLIC CON$FLSH
PUBLIC CON$WRIT
PUBLIC VIDEO
PUBLIC CUU
PUBLIC CUD
PUBLIC CUF
PUBLIC CUB
PUBLIC CUP
PUBLIC ED
PUBLIC CPR
PUBLIC SM
PUBLIC RM
PUBLIC SGR
PUBLIC DSR
PUBLIC KEYASN
PUBLIC EXTKEY
PUBLIC PSCP
PUBLIC PRCP
IFDEF JAPAN
PUBLIC ROW_ADJ
ENDIF
CODE SEGMENT PUBLIC BYTE
ASSUME CS:CODE,DS:NOTHING,ES:NOTHING
;-----------------------------------------------
; C O N - CONSOLE DEVICE DRIVER
EXTRN CON$INIT : NEAR ; ANSI initialization code
EXTRN GENERIC_IOCTL : NEAR ; Generic IOCTL code
EXTRN REQ_TXT_LENGTH : WORD ; current text length
EXTRN GRAPHICS_FLAG : BYTE ; graphics flag
ATTRIB EQU CHARDEV+DEVIOCTL+DEV320+ISSPEC+ISCOUT+ISCIN
CONDEV: SYSDEV <-1,ATTRIB,STRATEGY,ENTRY,'CON '> ; Matches CON
;--------------------------------------------------------------
; COMMAND JUMP TABLES
CONTBL:
DW CON$INIT
DW NO_OPERATION
DW NO_OPERATION
DW NO_OPERATION
DW CON$READ
DW CON$RDND
DW NO_OPERATION
DW CON$FLSH
DW CON$WRIT
DW CON$WRIT
DW NO_OPERATION
DW NO_OPERATION
DW NO_OPERATION
DW NO_OPERATION
DW NO_OPERATION
DW NO_OPERATION
DW NO_OPERATION
DW NO_OPERATION
DW NO_OPERATION
DW GENERIC_IOCTL ; generic IOCTL routine offset
MAX_CMD EQU ($ - CONTBL)/2 ; size of CONTBL
CMDTABL DB 'A'
DW CUU ; cursor up
DB 'B'
DW CUD ; cursor down
DB 'C'
DW CUF ; cursor forward
DB 'D'
DW CUB ; cursor back
DB 'H'
DW CUP ; cursor position
DB 'J'
DW ED ; erase display
DB 'K'
DW EL ; erase line
DB 'R'
DW CPR ; cursor postion report
DB 'f'
DW CUP ; cursor position
DB 'h'
DW SM ; set mode
DB 'l'
DW RM ; reset mode
DB 'm'
DW SGR ; select graphics rendition
DB 'n'
DW DSR ; device status report
DB 'p'
DW KEYASN ; key assignment
DB 'q' ; dynamic support of /X option through ansi sequence
DW EXTKEY ; esc[0q = reset it. esc[1q = set it
DB 's'
DW PSCP ; save cursor postion
DB 'u'
DW PRCP ; restore cursor position
IFDEF JAPAN
DB 'M'
DW DELETE ; delete line
DB 'L'
DW INSERT ; insert line
ENDIF
DB 00
GRMODE DB 00,00000000B,00000111B
DB 01,11111111B,00001000B
DB 04,11111000B,00000001B
DB 05,11111111B,10000000B
DB 07,11111000B,01110000B
DB 08,10001000B,00000000B
DB 30,11111000B,00000000B
DB 31,11111000B,00000100B
DB 32,11111000B,00000010B
DB 33,11111000B,00000110B
DB 34,11111000B,00000001B
DB 35,11111000B,00000101B
DB 36,11111000B,00000011B
DB 37,11111000B,00000111B
DB 40,10001111B,00000000B
DB 41,10001111B,01000000B
DB 42,10001111B,00100000B
DB 43,10001111B,01100000B
DB 44,10001111B,00010000B
DB 45,10001111B,01010000B
DB 46,10001111B,00110000B
DB 47,10001111B,01110000B
DB 0FFH
;---------------------------------------------------
; Device entry point
PTRSAV DD 0
BUF1: BUF_DATA <> ; Next CON Buffer area
STRATP PROC FAR
STRATEGY:
mov word ptr cs:[PTRSAV],bx
mov word ptr cs:[PTRSAV+2],es
ret
STRATP ENDP
ENTRY:
push si
push ax
push cx
push dx
push di
push bp
push ds
push es
push bx
; Check if header link has to be set (Code ported from
; DISPLAY.SYS)
lea bx,BUF1
mov di,OFFSET CONDEV ; CON Device header
mov CONPTR.DEV_HDRO,di
mov CONPTR.DEV_HDRS,cs
cld ; all moves forward
cmp CONPTR.CON_STRAO, -1
jne L4 ; has been linked to DOS CON
cmp CONPTR.CON_STRAS, -1
jne L4 ; has been linked to DOS CON
; next device header : ES:[DI]
lds si,dword ptr CONPTR.DEV_HDRO
les di,HP.SDEVNEXT
L1: ; while pointer to next device header
push es ; is not -1
pop ax
cmp ax,-1
jne NOT0FFFF ; leave if both offset and segment are
cmp di,-1 ; 0FFFFH
je L4
NOT0FFFF:
push di
push si
mov cx,8
lea di,NHD.SDEVNAME
lea si,HP.SDEVNAME
repe cmpsb
pop si
pop di
and cx,cx
; Exit if name is found in linked hd.
jnz L3 ; Name is not found
; Name is found in the linked header
mov ax,NHD.SDEVSTRAT ; Get the STRATEGY address
mov CONPTR.CON_STRAO,ax
mov ax,es
X1: mov CONPTR.CON_STRAS,ax
mov ax,NHD.SDEVINT ; Get the INTERRUPT address
mov CONPTR.CON_INTRO,ax
mov ax,es
X2: mov CONPTR.CON_INTRS,ax
jmp SHORT L4 ; Device Name
L3:
les di,NHD.SDEVNEXT
jmp L1
L4:
lds bx,cs:[PTRSAV] ; GET PONTER TO I/O PACKET
mov cx,word ptr ds:[bx].COUNT
mov al,byte ptr ds:[bx].CMD
cbw
mov si,OFFSET CONTBL
add si,ax
add si,ax
cmp al,MAX_CMD ; not a call for ANSI...chain to lower device
ja NO_OPERATION
ifdef KOREA ; <MSCH>
mov ah, byte ptr ds:[bx].media
endif ; KOREA
les di,dword ptr ds:[bx].TRANS
; Following code, supplied by Compaq, is the "hit-it-on-the-head"
; approach to solving the problem of resetting the screen length
; after a character set reload. We should try to find a better
; approach. For now this will stay in. - MGD
push ax ; SAVE AX
mov ax,40H ; GET ROM VAR
mov ds,ax ;
mov al,ds:[84h] ; GET MAX NUM OF ROWS
cmp al,0 ; Q:ZERO
jne ENTRY10 ; jmp IF NO
mov al,24 ; SET TO 24 ROWS
ENTRY10: ;
push cs
pop ds
ASSUME ds:CODE
inc al ; BUMP FOR ONE BASED
mov byte ptr [REQ_TXT_LENGTH],al ; SET LENGTH TO 40:84H VALUE. *F
pop ax ; RESTORE AX
jmp word ptr [si] ; GO DO COMMAND
;=====================================================
;=
;= SUBROUTINES SHARED BY MULTIPLE DEVICES
;=
;=====================================================
;----------------------------------------------------------
; EXIT - ALL ROUTINES RETURN THROUGH THIS PATH
BUS$EXIT: ; DEVICE BUSY EXIT
mov ah,00000011B
jmp SHORT ERR1
NO_OPERATION:
call PASS_CONTROL ; Pass control to lower CON
jmp SHORT ERR2
ERR$EXIT:
mov ah,10000001B ; MARK ERROR RETURN
jmp SHORT ERR1
EXITP PROC FAR
EXIT: mov ah,00000001B
ifdef KOREA
INTERIM$EXIT: ; <MSCH>
endif ; KOREA
ERR1: lds bx,cs:[PTRSAV]
mov word ptr [bx].STATUS,ax ; MARK OPERATION COMPLETE
ERR2:
pop bx
pop es
pop ds
pop bp
pop di
pop dx
pop cx
pop ax
pop si
ret ; RESTORE REGS and RETURN
EXITP ENDP
; PASS CONTROL
; This calls the attached device to perform any further
; action on the call!
PASS_CONTROL PROC
lea si,BUF1
les bx,cs:[PTRSAV] ; pass the request header to the
call dword ptr cs:[si].CON_STRAO ; CON strategy routine.
call dword ptr cs:[si].CON_INTRO ; interrupt the CON
ret
PASS_CONTROL ENDP
;-----------------------------------------------
; BREAK KEY HANDLING
BRKKY:
mov byte ptr cs:ALTAH,3 ; INDICATE BREAK KEY SET
INTRET: iret
; WARNING - Variables are very order dependent, be careful
; when adding new ones! - c.p.
WRAP DB 0 ; 0 = WRAP, 1 = NO WRAP
ASNPTR DW 4
STATE DW S1
MODE DB 3 ;*
MAXCOL DB 79 ;*
COL DB 0
ROW DB 0
SAVCR DW 0
INQ DB 0
PRMCNT LABEL BYTE
PRMCNTW DW 0
KEYCNT DB 0
KEYPTR DW BUF
REPORT DB ESC_CHAR,'[00;00R',CR ;CURSOR POSTION REPORT BUFFER
ALTAH DB 0 ;Special key handling
SAVE_CHAR DW 0 ; Temp storage for char/attr for new scroll code
EXT_16 DB 0 ; Extended INT 16h flag
SWITCH_X DB OFF ; /X flag
SWITCH_L DB OFF ; DCR397; 1= /L flag entered.
SWITCH_K DB OFF ; To control EXT_16
fhavek09 DB OFF ; M006
SCAN_LINES DB ? ; flag for available scan lines (VGA)
HDWR_FLAG DW 0 ; byte of flags indicating video support
SWITCH_S DB OFF ; M008; /S flag
SWITCH_R DB OFF ; /R flag for screen readers
ifdef KOREA ;
REQ_TYPE DB 0 ;
EXT_REQ_TYPE DB 0 ;
LEADBYTE DB 0 ;
TRAILBYTE DB 0 ;
ECSPRE DB 0 ;
endif ; KOREA ;
VIDEO_MODE_TABLE LABEL BYTE ; table containing applicable
MODE_TABLE <> ; video modes and corresponding
MODE_TABLE <> ; data.
MODE_TABLE <> ; this table is initialized at
MODE_TABLE <> ; INIT time
MODE_TABLE <>
MODE_TABLE <>
MODE_TABLE <>
MODE_TABLE <>
MODE_TABLE <>
MODE_TABLE <>
MODE_TABLE <>
MODE_TABLE <>
MODE_TABLE <>
MODE_TABLE <>
MODE_TABLE <>
ifdef KOREA ; The KOREAN video mode
MODE_TABLE <> ; have 4 more than standard
MODE_TABLE <> ; VGA card
MODE_TABLE <> ;
MODE_TABLE <> ;
endif ; KOREA ;
VIDEO_TABLE_MAX EQU $ ; maximum address for video table
MAX_VIDEO_TAB_NUM EQU ($-VIDEO_MODE_TABLE)/TYPE MODE_TABLE ;P1767 Max number of table
IFDEF DBCS
dbcs_flag DB 0 ; 0=single, 1=lead byte, 2=tail byte
ENDIF
IFDEF JAPAN
new_mode DB 0 ; mode for '>'
row_adj DB 0 ; for ESC[>1l
ENDIF
;-------------------------------------------------------------
; CHROUT - WRITE OUT CHAR IN AL USING CURRENT ATTRIBUTE
ATTRW LABEL WORD
ATTR DB 00000111B ; CHARACTER ATTRIBUTE
BPAGE DB 0 ; BASE PAGE
BASE DW 0b800h
SCREEN_SEG DW 00000h
chrout:
ifdef KOREA ; <MSCH>
;
cmp [leadbyte],1 ; Is the previous byte a lead byte? ; KeyW
jnz TestDBCSRange ; No,
mov byte ptr [leadbyte],0
mov byte ptr [trailbyte],1 ; Mark that this is trail byte of ECS
jmp short OUTCHR
;
;
; Note : TestECS routine is hard coded. If you have the different code range,
; you should change some codes below.
; 1990/11/9 This routine is changed to use IsDBCS routines.
;
TestDBCSRange:
mov byte ptr [trailbyte], 0 ; Mark it as a non trail byte
call IsDBCSleadbyte
jnz realout ; Jump if one byte code
;
; CMP AL, 0A1H ;
; JB REALOUT ;
; CMP AL, 0FEH ;
; JA REALOUT ;
mov byte ptr [leadbyte], 1 ; it as a lead byte
mov ah, [col] ;
cmp ah, [maxcol] ;
jnz outchr ;
; ;
; Decide the position to print the Lead byte which is on the column boundary.
;
cmp [wrap],0 ;
jz skip1 ;
dec [col] ;
cmp [ecspre],1 ;
jnz oneback1 ;
dec [col] ;
oneback1: ;
call setit1 ;
jmp short outchr ;
skip1: ;
push ax ;
call outchr1 ;
pop ax ;
jmp short outchr ;
realout:
endif ; KOREA ;
cmp al,13
jnz trylf
mov [COL],0
ifdef KOREA
jmp setit
else
IFDEF JAPAN
jmp setit
ELSE
jmp short setit
ENDIF
endif ; KOREA
trylf: cmp al,10
jz lf
cmp al,7
jnz tryback
torom:
mov bx,[ATTRW]
and bl,7
mov ah,14
int 10h
ret5: ret
tryback:
cmp al,8
jnz outchr
cmp [COL],0
jz ret5
dec [COL]
jmp short setit
outchr:
mov bx,[ATTRW]
mov cx,1
mov ah,9
int 10h
inc [COL]
mov al,[COL]
cmp al,[MAXCOL]
jbe setit
cmp [wrap],0
jz outchr1
dec [COL]
ifdef KOREA
;
; Set boundary position for DBCS code.
; No lead byte can arrive here.
;
cmp [trailbyte],1
jnz onebk
dec [col]
onebk:
call setit1
;
; We don't need ECSPRE change, because we have enough time to deal with it.
; Wait for another character to change ECSPRE.
;
endif ; KOREA
ret
outchr1:
mov [COL],0
lf: inc [ROW]
mov ah,30 ; GHG Fix for ROUNDUP/PALACE
mov al,MODE ; GHG Fix for ROUNDUP/PALACE
cmp al,11H ; GHG Fix for ROUNDUP/PALACE
je LF2 ; GHG Fix for ROUNDUP/PALACE
cmp al,12H ; GHG Fix for ROUNDUP/PALACE
je LF2 ; GHG Fix for ROUNDUP/PALACE
cmp GRAPHICS_FLAG,GRAPHICS_MODE
jne tmplab1
mov ah,DEFAULT_LENGTH
jmp short tmplab2
tmplab1:
mov ah,byte ptr [REQ_TXT_LENGTH]
tmplab2:
LF2: ; GHG Fix for ROUNDUP/PALACE
IFDEF JAPAN
sub ah,row_adj
ENDIF
cmp [ROW],AH ; GHG Fix for ROUNDUP/PALACE
jb setit
dec ah ; GHG Fix for ROUNDUP/PALACE
mov [ROW],AH ; GHG Fix for ROUNDUP/PALACE
call scroll
setit:
ifdef KOREA
preset:
xor al, al
cmp [trailbyte],al
jz noDBCStrail
inc al
noDBCStrail:
mov [ecspre], al
setit1:
endif ; KOREA
mov dh,row
mov dl,col
mov bh,[bpage]
mov ah,2
int 10h
ret
;Writing a LF char through Teletype function to scroll the screen
;has a side effect of changing the color of the cursor when the PROMPT
;setting in PTM P4241 is used. AN001 uses this method to fix the strobing
;problem of the palace machine. The old method of scrolling used to directly
;write into video buffer. The old method has been used by AN001 for
;CGA adater of mode 2 or 3 only.
;To solve P4241, but to maintain the fix of the strobing problem of palace
;machine, we return back to the old logic but the old logic has to be
;Revised for the displays above CGA level. For the adapters above
;CGA display, we don't need to turn off/on the video - this will causes
;a strobing, if you use do this, for Palace machine.
;This logic will be only applied to mode 2 and 3 only.
; Following code is bug fix supplied by Compaq - MGD
scroll:
ifdef KOREA ; Responsible for ROM
mov al, 10
jmp torom
else
IFDEF JAPAN ; ### if JAPAN ###
xor cx,cx
cmp GRAPHICS_FLAG,GRAPHICS_MODE
jnz scroll10 ; if nor graphic
mov dh,DEFAULT_LENGTH
xor bh,bh
jmp short scroll20
scroll10:
mov dh,byte ptr [REQ_TXT_LENGTH]
mov bh,[ATTR]
scroll20:
sub dh,row_adj
dec dh
mov dl,[MAXCOL]
mov ax,0601h ; scroll up
int 10h
jmp short setit
else ; ### if Not JAPAN ###
; Because of screen reader problem, /R switch was added.
; If Switch_R set all line feeds go to torom. Bug #1241- msdos6:
cmp SWITCH_R,OFF
je is_2or3 ; if off, goto test mode
mov al,10 ; if ON send the line feed to the ROM
jmp torom ; exit
is_2or3:
mov al,mode ; get display mode
cmp al,4 ;Q: mode less than 4?
jc is_text ;Y: perform kludge
cmp al,7 ;N: Q: monochrome mode?
je is_text ; Y: perform kludge
mov al,10 ; send the line feed to the ROM
jmp torom ; exit
is_text:
mov ah,8 ; read char/attr at cursor pos
mov bh,[bpage]
int 10h
mov [save_char],ax ; save char/attribute
mov ah,9 ; write char at cursor pos
mov bx,[ATTRW] ; use current attribute
mov cx,1
int 10h
mov al,10 ; send the line feed to the ROM
call torom
mov ah,3 ; read cursor pos
int 10h
push dx ; save it
mov ah,2 ; set cursor position
dec dh ; (to row-1)
int 10h
mov ax,[save_char] ; retrieve saved char/attr
mov bl,ah
mov ah,9 ; write it back to the screen
mov cx,1
int 10h
pop dx ; retrieve new cursor position
mov ah,2 ; set cursor position
int 10h
ret
ENDIF ; ### end if Not JAPAN ###
endif ; KOREA
;------------------------------------------------------
; CONSOLE READ ROUTINE
CON$READ:
jcxz CON$EXIT
ifdef KOREA ;
mov [req_type], 0 ;
mov [ext_req_type], 10h ;
test ah, 00000001b ;
jz con$loop ;
mov [req_type], 0f0h ; ; Get Interim mode
mov [ext_req_type], 0f8h ;
cmp cx, 1 ;
jnz con$ndisp ;
;
call chrin ;
stosb ;
cmp ah, 0f0h ; ; Is this an interim code ?
jnz con$exit ;
mov ah, 00000101b ;
jmp interim$exit ; ; return to DOS with interim flag set
con$ndisp: ;
call chrin ;
cmp ah, 0f0h ; ; Is this an interim code ?
jz con$ndisp ; ; Skip the interims
stosb ;
LOOP CON$NDISP ;
JMP EXIT ;
endif ; KOREA
CON$LOOP:
push cx ; SAVE COUNT
call CHRIN ; GET CHAR IN AL
pop cx
stosb ; STORE CHAR AT ES:DI
loop CON$LOOP
CON$EXIT:
jmp EXIT
;---------------------------------------------------------
; INPUT SINGLE CHAR INTO AL
CHRIN: xor ax,ax
xchg al,ALTAH ; GET CHARACTER & ZERO ALTAH
or al,al
jnz KEYRET
INAGN: cmp KEYCNT,0
jnz KEY5A
ifdef KOREA
mov ah, [req_type]
else
xor ah,AH
endif ; KOREA
cmp EXT_16,ON ; extended interrupt available?
jne tmplab3
ifdef KOREA
mov ah, [ext_req_type]
else
mov ah,10h ; yes..perform extended call
endif ; KOREA
INT 16h
ifdef KOREA
cmp ah, 0f0h
jz keyret1 ; Breief return for the interim code
endif ; KOREA
cmp SWITCH_X,OFF ; /X switch used?
jne tmplab5
call CHECK_FOR_REMAP ; no....map to normal call
tmplab5:
call SCAN ; check for redefinition
jz tmplab4 ; no redefinition?....and
cmp SWITCH_X,ON ; /X switch used?
jne tmplab4
call CHECK_FOR_REMAP ; then remap..
or bx,bx ; reset zero flag for jump test in old code
jmp short tmplab4
; extended interrupt not available
tmplab3:
int 16h
ifdef KOREA
cmp ah, 0f0h
jz keyret1
endif ; KOREA
call SCAN ; check for redefinition
tmplab4:
jnz ALT10 ; IF NO MATCH JUST RETURN IT
dec cx
dec cx
inc bx
inc bx
cmp al,0 ; check whether keypacket is an extended one
jz tmplab7
cmp al,0e0h
jnz tmplab6
ifdef KOREA
cmp ah, 0f0h
jb mschtmp2
cmp ah, 0f2h
jbe tmplab7
mschtmp2:
endif ; KOREA
cmp SWITCH_X,1
jnz tmplab6
tmplab7:
dec cx ; adjust pointers
inc bx ; appropiately
tmplab6:
mov KEYCNT,cl
mov KEYPTR,bx
KEY5A: ; Jmp here to get rest of translation
call KEY5 ; GET FIRST KEY FROM TRANSLATION
ALT10:
or ax,ax ; Check for non-key after BREAK
jz INAGN
or al,al ; SPECIAL CASE?
jnz KEYRET
mov ALTAH,ah ; STORE SPECIAL KEY
KEYRET:
ifdef KOREA
mov ah, 0f1h
keyret1:
endif ; KOREA
ret
KEY5: mov bx,KEYPTR ; GET A KEY FROM TRANSLATION TABLE
mov ax,word ptr [bx]
dec KEYCNT
inc bx
or al,al
jnz KEY6
inc bx
dec KEYCNT
KEY6: mov KEYPTR,bx
ret
SCAN: mov bx,OFFSET BUF
KEYLP: mov cl,byte ptr [bx]
xor ch,ch
or cx,cx
jz NOTFND
cmp al,0 ; check whether extended keypacket
jz tmplab8
cmp al,0e0h ; extended must be enabled with /x
jnz tmplab9
ifdef KOREA ; Jump when Hangeul char
cmp ah, 0f0h
jb mschtmp1
cmp ah, 0f2h
jbe tmplab9
mschtmp1:
endif ; KOREA
cmp SWITCH_X,ON
jnz tmplab9
tmplab8:
cmp ax,word ptr [bx+1] ; yes...compare the word
jmp short tmplab10
tmplab9:
cmp al,byte ptr [bx+1] ; no...compare the byte
tmplab10:
jz MATCH
add bx,cx
jmp KEYLP
NOTFND: or bx,bx
MATCH: ret
;--------------------------------------------------------------
; KEYBOARD NON DESTRUCTIVE READ, NO WAIT
CON$RDND:
mov al,[ALTAH]
or al,al
ifdef KOREA
jnz To_RDEXIT
else
jnz RDEXIT
endif ; KOREA
cmp [KEYCNT],0
jz RD1
mov bx,[KEYPTR]
mov al,byte ptr [bx]
ifdef KOREA
to_rdexit:
jmp rdexit
else
jmp SHORT RDEXIT
endif ; KOREA
RD1:
ifdef KOREA
mov [req_type], 1
mov [ext_req_type], 11H
test ah, 00000001b
jz rd11
mov [req_type], 0f1h
mov [ext_req_type], 0f9H
RD11:
mov ah, [req_type]
cmp ext_16, on
jnz tmplab11
mov ah, [ext_req_type]
else
mov ah,1
cmp EXT_16,ON
jnz tmplab11
add ah,10h ; yes....adjust to extended call
endif ; KOREA
tmplab11:
int 16h
jz CheckForEvent
or ax,ax
jnz RD2
ifdef KOREA
mov ah, [req_type]
and ah, 11111110b
else
mov ah,0
endif ; KOREA
cmp EXT_16,ON ; extended interrupt available?
jne tmplab12
ifdef KOREA
mov ah, [ext_req_type]
and ah, 11111110b
else
mov ah,10h ; yes..perform extended call
endif ; KOREA
int 16h
cmp SWITCH_X,OFF ; /X switch used?
jnz tmplab13
call CHECK_FOR_REMAP ; no....map to normal call
jmp short tmplab13
tmplab12:
int 16h
tmplab13:
jmp CON$RDND
RD2:
ifdef KOREA
cmp ah, 0f0h
jz rdexit
endif ; KOREA
call SCAN
jz tmplab14 ; if no redefinition
cmp EXT_16,ON
jnz tmplab14 ; and extended INT16 used
cmp SWITCH_X,ON ; and /x used
jnz tmplab14
call CHECK_FOR_REMAP ; remap to standard call
or bx,bx ; reset zero flag for jump test in old code
tmplab14:
jnz RDEXIT
mov al,byte ptr [bx+2]
cmp byte ptr [bx+1],0
jnz RDEXIT
mov al,byte ptr [bx+3]
RDEXIT: lds bx,[PTRSAV]
mov [bx].MEDIA,al
EXVEC: jmp EXIT
; M006 - begin
CheckForEvent:
cmp fhavek09,0
jz CONBUS ; return with busy status if not k09
les bx,[ptrsav]
assume es:nothing
test es:[bx].status,0400h ; system wait enabled?
jz CONBUS ; return with busy status if not
; need to wait for ibm response to request for code
; on how to use the system wait call.
mov ax,4100h ; wait on an external event
xor bl,bl ; wait for any event
int 15h ; call rom for system wait
; M006 - end
CONBUS: jmp BUS$EXIT
;--------------------------------------------------------------
; KEYBOARD FLUSH ROUTINE
CON$FLSH:
mov [ALTAH],0 ; Clear out holding buffer
mov [KEYCNT],0
ifdef KOREA
mov ah, 0f3h
int 16h
ReadNullByte: ; We may have final char
mov ah, 0f1h
int 16h
jz FlushDone
mov ah, 0f0h
int 16h
jmp short ReadNullByte
FlushDone:
else
Flush: mov ah,1
cmp EXT_16,ON ; if extended call available
jnz tmplab15
add ah,10h ; then use it
tmplab15:
int 16h
jz FlushDone
mov ah,0
cmp EXT_16,ON ; if extended call available
jnz tmplab16
add ah,10h ; use it
tmplab16:
int 16h
jmp Flush
FlushDone:
endif ; KOREA
jmp EXVEC
;----------------------------------------------------------
; CONSOLE WRITE ROUTINE
CON$WRIT:
jcxz EXVEC
ifdef KOREA
test ah, 00000001b
jnz con$lp_nac ;OUT CHAR WITHOUT CURSOR ADVANCING
endif ; KOREA
CON$LP: mov al,es:[di] ; GET CHAR
inc di
call OUTC ; OUTPUT CHAR
loop CON$LP ; REPEAT UNTIL ALL THROUGH
jmp EXVEC
ifdef KOREA
con$lp_nac:
mov al, es:[di]
inc di
call outchr_nac ;OUTPUT CHAR WITHOUT CURSOR MOVE
loop con$lp_nac ;REPEAT UNTIL ALL THROUGH
jmp exit
outchr_nac:
push ax
push si
push di
push bp
mov ah, 0feh ;OUTPUT CHAR WITHOUT CURSOR ADVANCING
mov bl, 7 ;SET FOREGROUND COLOR
int 10h ;CALL ROM BIOS
pop bp
pop di
pop si
pop ax
ret
endif
COUT: sti
push ds
push cs
pop ds
call OUTC
pop ds
Iret
OUTC: push ax
push bx
push cx
push dx
push si
push di
push es
push bp
mov [BASE],0b800h
xchg ax,si ; SAVE CHARACTER TO STUFF
mov ax,40h ; POINT TO ROS BIOS
mov ds,ax
mov ax,ds:[49h] ; AL=MODE, AH=MAX COL
dec ah ; ANSI NEEDS 0-79 OR 0-39
mov word ptr cs:[MODE],ax ; SAVE MODE and MAX COL
cmp al,7
jnz NOT_BW
mov word ptr cs:[BASE],0B000H
NOT_BW: mov al,ds:[62H] ; GET ACTIVE PAGE
mov cs:[BPAGE],al
cbw
add ax,ax
mov bx,ax
mov ax,ds:[bx+50H] ; AL=COL, AH=ROW
mov word ptr cs:[COL],ax ; SAVE ROW and COLUMN
mov ax,ds:[4EH] ; GET START OF SCREEN SEG
mov cl,4
shr ax,cl ; CONVERT TO A SEGMENT
push cs
pop ds
mov [SCREEN_SEG],ax
xchg ax,si ; GET BACK CHARACTER IN AL
call VIDEO
pop bp
pop es
pop di
pop si
pop dx
pop cx
pop bx
pop ax
ret
;----------------------------------------------------------
; OUTPUT SINGLE CHAR IN AL TO VIDEO DEVICE
VIDEO: mov si,OFFSET STATE
jmp [si]
S2: cmp al,'['
jz S22
ifdef KOREA
cmp al, '$'
jnz chk_off
mov word ptr [si], offset S8
ret
chk_off:
cmp al, '('
jnz jmp_S1
mov word ptr [si], offset S10
ret
jmp_S1:
endif ; KOREA
jmp S1
S22: mov word ptr [si],OFFSET S3
xor bx,bx
mov word ptr INQ,bx
jmp SHORT S3B
S3: cmp al,';'
jnz S3C
S3A: inc PRMCNT
S3B: call GETPTR
xor ax,ax
mov word ptr [bx],ax ; DEFAULT VALUE IS ZERO
ret
S3C: cmp al,'0'
jb S3D
cmp al,'9'
ja S3D
call GETPTR
sub al,'0'
xchg al,byte ptr [bx]
mov ah,10
mul ah ; *10
add byte ptr [bx],al ; movE IN DIGIT
ret
S3D: cmp al,'='
jz S3ret
cmp al,'?'
jz S3ret
IFDEF JAPAN
cmp al,'>'
jz s3f
ENDIF
cmp al,'"' ; BEGIN QUOTED STRING
jz S3E
cmp al,"'"
jnz S7
S3E: mov word ptr [si],OFFSET S4
mov [INQ],al
S3ret: ret
IFDEF JAPAN
s3f:
mov new_mode,1
jmp short s3ret
ENDIF
; ENTER QUOTED STRINGS
S4: cmp al,[INQ] ; CHECK FOR STRING TERMINATOR
jnz S4A
dec PRMCNT ; TERMINATE STRING
mov word ptr [si],OFFSET S3
ret
S4A: call GETPTR
mov byte ptr [bx],al
mov word ptr [si],OFFSET S4
jmp S3A
; LOOK FOR ANSI COMMAND SPECIFIED IN AL
PUBLIC S7
S7: mov bx,OFFSET CMDTABL-3
S7A: add bx,3
cmp byte ptr [bx],0
jz S1B
cmp byte ptr [bx],al
jnz S7A
S7B: mov ax,word ptr [bx+1] ; AX = JUMP addRESS
mov bx,OFFSET BUF
inc bx
add bx,ASNPTR ; BX = PTR TO PARM LIST
mov DL,byte ptr [bx]
xor DH,DH ; DX = FIRST PARAMETER
mov cx,dx
or cx,cx
jnz S7C
inc cx ; CX = DX, CX=1 IF DX=0
S7C: jmp ax ; AL = COMMAND
S1: cmp al,ESC_CHAR ; ESCAPE SEQUENCE?
jnz S1B
IFDEF DBCS
mov dbcs_flag,0
ENDIF
IFDEF JAPAN
mov new_mode,0
ENDIF
mov word ptr [si],OFFSET S2
ret
S1B:
ifndef KOREA ; IN KOREA, WE ALREADY handled
IFDEF DBCS
cmp dbcs_flag,1
jz set_dbcs ; if it was lead byte
cmp dbcs_flag,2
jnz @f ; if it was not tail byte
mov dbcs_flag,0 ; reset
@@:
call IsDBCSLeadByte
jnz @f ; if this is not lead byte
set_dbcs:
inc dbcs_flag
@@:
cmp dbcs_flag,1
jnz @f
mov dl,col
cmp dl,maxcol
jnz @f
push ax
mov al,' '
call chrout
pop ax
@@:
ENDIF
endif ; NOT KOREA
call CHROUT
S1A: mov word ptr [STATE],OFFSET S1
ret
ifdef KOREA
S8: cmp al, ')'
jnz s1
mov word ptr [si], offset S9
ret
S9: cmp al, '1'
jnz S1
han_on:
mov ah, 0f2h
mov al, 08h ; Hangeul input mode on
int 16h
ret
S10: cmp al, '2'
jnz S1
han_off:
mov ah, 0f2h
mov al, 00h
int 16h
ret
endif ; KOREA
MOVCUR: ;C02
cmp byte ptr [bx],AH
jz SETCUR
add byte ptr [bx],al
loop MOVCUR
SETCUR: mov dx,word ptr COL
;*C05 xor bx,bx
mov ah,0fh ;*C05
int 10h ;*C05
mov ah,2
int 16
jmp S1A
CUP:
IFDEF JAPAN ; ### if JAPAN ###
cmp GRAPHICS_FLAG,GRAPHICS_MODE
jnz tmplab17 ; if not graphic mode
mov ah,DEFAULT_LENGTH
jmp short tmplab18
tmplab17:
mov ah,byte ptr [REQ_TXT_LENGTH]
tmplab18:
sub ah,row_adj
cmp cl,ah
ELSE
cmp GRAPHICS_FLAG,GRAPHICS_MODE
jnz tmplab17
cmp cl,DEFAULT_LENGTH
jmp short tmplab18
tmplab17:
cmp cl,byte ptr [REQ_TXT_LENGTH]
tmplab18:
ENDIF ; ### end if JAPAN ###
ja SETCUR
mov al,MAXCOL
mov ch,byte ptr [bx+1]
or ch,CH
jz CUP1
dec CH
CUP1: cmp al,CH
ja CUP2
mov ch,al
CUP2: xchg cl,CH
dec CH
mov word ptr COL,cx
jmp SETCUR
CUF: mov ah,MAXCOL
mov al,1
CUF1: mov bx,OFFSET COL
jmp MOVCUR
CUB: mov ax,00FFH
jmp CUF1
CUU: mov ax,00FFH
CUU1: mov bx,OFFSET ROW
jmp MOVCUR
CUD:
cmp GRAPHICS_FLAG,GRAPHICS_MODE
jnz tmplab19
mov ah,DEFAULT_LENGTH
jmp short tmplab20
tmplab19:
mov ah,byte ptr [REQ_TXT_LENGTH]
dec ah ; M005; REQ_TXT_LENGTH is not 0 based
tmplab20:
IFDEF JAPAN
sub ah,row_adj
ENDIF
mov al,1
jmp CUU1
ExtKey:
cmp dl, 0 ; DL = previous parameter
jne ExtKey_1
mov Switch_X, OFF ; reset it if 0.
jmp S1A
ExtKey_1:
cmp dl, 1 ; 1 ?
je SetExtKey
jmp S1A ; ignore it
SetExtKey:
mov Switch_X, ON ; set it if 1.
jmp S1A
PSCP: mov ax,word ptr COL
mov SAVCR,ax
jmp SETCUR
PRCP: mov ax,SAVCR
mov word ptr COL,ax
jmp SETCUR
SGR: xor cx,cx
xchg cl,PRMCNT
call GETPTR
inc cx
SGR1: mov al,byte ptr [bx]
push bx
mov bx,OFFSET GRMODE
SGR2: mov ah,byte ptr [bx]
add bx,3
cmp ah,0FFH
jz SGR3
cmp ah,al
jnz SGR2
mov ax,word ptr [bx-2]
and ATTR,al
or ATTR,AH
SGR3: pop bx
inc bx
loop SGR1
jmp SETCUR
IFDEF JAPAN ; ### if JAPAN ###
ED:
mov bl,dl ; save function no.
mov dh,30
mov al,MODE
cmp al,11h
je ed20 ; if graphic 640X480
cmp al,12h
je ed20 ; if graphic 640X480
cmp GRAPHICS_FLAG,GRAPHICS_MODE
jnz ed10 ; if not graphic mode
mov dh,DEFAULT_LENGTH
jmp short ed20
ed10:
mov dh,byte ptr [REQ_TXT_LENGTH]
ed20:
sub dh,row_adj
dec dh ; last row
mov dl,MAXCOL
xor cx,cx
cmp bl,0
jz ed_func0
cmp bl,1
jz ed_func1
mov word ptr COL,cx ; ESC[2J
jmp short ed_30
ed_func0: ; ESC[0J
push dx
mov cx,word ptr COL
mov dh,ch
mov dl,MAXCOL
call erase ; erase to eol
pop dx
mov ch,ROW
cmp ch,dh
jz ed_end ; if at bottom
inc ch
mov cl,0
jmp short ed_30
ed_func1: ; ESC[1J
mov dx,word ptr COL
mov ch,dh
mov cl,0
call erase ; erase from top
mov dh,ROW
cmp dh,0
jz ed_end
dec dh
mov dl,MAXCOL
xor cx,cx
ed_30:
call erase
ed_end:
jmp setcur
EL:
cmp dl,1
jz el_func1
cmp dl,2
jz el_func2
mov cx,word ptr COL ; ESC[0K
mov dh,ch
mov dl,MAXCOL
jmp short el_10
el_func1:
mov dx,word ptr COL ; ESC[1K
mov ch,dh
mov cl,0
jmp short el_10
el_func2:
mov ch,ROW ; ESC[2K
mov dh,ch
mov cl,0
mov dl,MAXCOL
el_10:
call erase
jmp setcur
erase:
cmp GRAPHICS_FLAG,GRAPHICS_MODE ; if we are in graphics mode,
jnz erase10
xor bh,bh ; then use 0 as attribute
jmp short erase20
erase10:
mov bh,ATTR ; else use ATTR
erase20:
mov ax,0600H ; clear
int 10h
ret
else ; ### if Not JAPAN ###
ED: xor cx,cx
mov word ptr COL,cx
mov DH,30
mov al,MODE
cmp al,11H
je ERASE
cmp al,12H
je ERASE
cmp GRAPHICS_FLAG,GRAPHICS_MODE
jnz tmplab21
mov dh,DEFAULT_LENGTH
jmp short tmplab22
tmplab21:
mov dh,byte ptr [REQ_TXT_LENGTH]
tmplab22:
ERASE: mov DL,MAXCOL
cmp GRAPHICS_FLAG,GRAPHICS_MODE ; if we are in graphics mode,
jnz tmplab23
xor bh,bh ; then use 0 as attribute
jmp short tmplab24
tmplab23:
mov bh,ATTR ; else use ATTR
tmplab24:
mov ax,0600H
int 16
ED3: jmp SETCUR
EL: mov cx,word ptr COL
mov DH,CH
jmp ERASE
ENDIF ; ### end if Not JAPAN ###
IFDEF JAPAN ; ### if JAPAN ###
delete:
mov ah,6 ; scroll up
jmp short insdel
insert:
mov ah,7 ; scroll down
insdel:
mov al,cl ; set scroll number
mov COL,0 ; set to top of row
mov cx,word ptr COL
cmp GRAPHICS_FLAG,GRAPHICS_MODE
jnz line10 ; if not graphic mode
mov dh,DEFAULT_LENGTH
xor bh,bh ; attribute
jmp short line20
line10:
mov bh,ATTR
mov dh,byte ptr [REQ_TXT_LENGTH]
line20:
sub dh,row_adj
dec dh
mov dl,MAXCOL
int 10h ; scroll
jmp setcur
ENDIF ; ### end if JAPAN ###
BIN2ASC:mov DL,10
inc AL
xor ah,AH
div dl
add ax,'00'
ret
DSR: mov ah,REQ_CRSR_POS
push bx
xor bh,bh
int 10h
pop bx
push dx
mov al,dh ;REPORT CURRENT CURSOR POSITION
call BIN2ASC
mov word ptr REPORT+2,ax
pop dx
mov al,DL
call BIN2ASC
mov word ptr REPORT+5,ax
mov [KEYCNT],9
mov [KEYPTR],OFFSET REPORT
CPR: jmp S1A
RM: mov cl,1
jmp SHORT SM1
SM: xor cx,cx
SM1: mov al,DL
IFDEF JAPAN
cmp new_mode,1
jz nmode
ENDIF
cmp al,MODE7 ; if mode isn't (0-6, 13-19)
jl tmplab25 ; then skip (cas -- signed?)
cmp al,MODE13
jl tmplab26
cmp al,MODE19
jg tmplab26
tmplab25:
test HDWR_FLAG,LCD_ACTIVE ; is this the LCD?
jz tmplab25a ; skip if not
push ds ; WGR yes...
push ax ; WGR save mode
mov ax,ROM_BIOS
mov ds,ax ; WGR get equipment status flag..
mov ax,DS:[EQUIP_FLAG]
and ax,INIT_VID_MASK ; WGR clear initial video bits..
or ax,LCD_COLOR_MODE ; WGR .....set bits as color
mov ds:[EQUIP_FLAG],ax ; WGR replace updated flag.
pop ax ; WGR restore mode.
pop ds
tmplab25a:
mov ah,SET_MODE ; WGR yes....set mode..
int 10H
jmp short tmplab27
tmplab26:
cmp al,7 ; then if 7, wrap at EOL
jnz tmplab27
mov [WRAP],CL ; WGR yes....wrap...
tmplab27:
jmp CPR
IFDEF JAPAN ; ### if JAPAN ###
nmode:
mov new_mode,0
cmp al,1
jz row_mode ; set row mode
cmp al,5
jz cur_mode ; set cursor mode
jmp cpr
row_mode:
mov row_adj,0
jcxz row_mode_ret ; if set mode
cmp GRAPHICS_FLAG,GRAPHICS_MODE
jnz row_mode10 ; if not graphic mode
mov ah,DEFAULT_LENGTH
jmp short row_mode20
row_mode10:
mov ah,byte ptr [REQ_TXT_LENGTH]
row_mode20:
dec ah
cmp row,ah
jb row_mode_30 ; if cursor not at bottom row
dec row
call scroll
row_mode_30:
inc row_adj
row_mode_ret:
jmp cpr
cur_mode:
push cx
mov ah,3 ; get cursor
mov bh,bpage
int 10h
pop ax
or ax,ax
jz cur_mode10 ; if for cursor off
and ch,11011111b ; cursor on
jmp short cur_mode20
cur_mode10:
or ch,00100000b ; corsor off
cur_mode20:
mov ah,1 ; set cursor
int 10h
jmp cpr
ENDIF ; ### end if JAPAN ###
KEYASN: xor dx,dx
xchg DL,PRMCNT ;GET CHARACTER COUNT
inc dx
inc dx
call GETPTR
mov ax,word ptr [bx] ;GET CHARACTER TO BE ASSIGNED
call SCAN ;LOOK IT UP
jnz KEYAS1
mov di,bx ;DELETE OLD DEFINITION
sub ASNPTR,cx
mov KEYCNT,0 ; This delete code shuffles the
; key definition table all around.
; This will cause all sorts of trouble
; if we are in the middle of expanding
; one of the definitions being shuffled.
; So shut off the expansion.
mov si,di
add si,cx
mov cx,OFFSET BUF+ASNMAX
sub cx,si
cld
push es ; SAVE USER'S ES
push CS
pop es ; SET UP ES addRESSABILITY
rep movsb
pop es ; RESTORE ES
KEYAS1: call GETPTR
cmp DL,3
jb KEYAS3
mov byte ptr [bx-1],DL ; SET LENGTH
add ASNPTR,dx ; REMEMBER END OF LIST
add bx,dx
cmp ASNPTR,ASNMAX ; Too much???
jb KEYAS3 ; No
sub bx,dx ; Next three instructions undo the above
sub ASNPTR,dx
KEYAS3: mov byte ptr [bx-1],00
mov STATE,OFFSET S1 ; RETURN
ret
GETPTR: mov bx,ASNPTR
inc bx
add bx,PRMCNTW
cmp bx,ASNMAX + 8
jb GET1
dec PRMCNT
jmp GETPTR
GET1: add bx,OFFSET BUF
ret
; CHECK_FOR_REMAP:
; This function esnures that the keypacket
; passed to it in AX is mapped to a standard INT16h call
CHECK_FOR_REMAP PROC NEAR
cmp al,0e0h ; extended key?
jnz tmplab28
ifdef KOREA
cmp ah, 0f0h
jb mschtmp
cmp ah, 0f2h
jbe tmplab28
mschtmp:
endif ; KOREA
or ah,ah ; probably, but check for alpha character
jz tmplab28
xor al,al ; if not an alpha, map extended to standard
tmplab28:
ret
CHECK_FOR_REMAP ENDP
IFDEF DBCS
; Test if the character is DBCS Lead Byte
; input: AL = character to check
; outpit: ZF = 1 if DBCS Lead Byte
public DBCSLeadByteTable
DBCSLeadByteTable dd 0
IsDBCSLeadByte proc near
push ax
push si
push ds
lds si,cs:DBCSLeadByteTable
idlb_check:
cmp word ptr [si],0
jz idlb_not ; if end of table
cmp al,[si]
jb idlb_next ; if below low value
cmp al,[si+1]
jbe idlb_yes ; if below high value
idlb_next:
add si,2 ; do next
jmp short idlb_check
idlb_not:
or al,1 ; reset ZF
jmp short idlb_end
idlb_yes:
and al,0 ; set ZF
idlb_end:
pop ds
pop si
pop ax
ret
IsDBCSLeadByte endp
ENDIF
BUF DB 4,00,72H,16,0
DB ASNMAX+8-5 DUP (?)
CODE ENDS
END
| 20.041376
| 85
| 0.61568
|
629606bcc3242818f9a636970bf43d815c1df0c6
| 7,842
|
asm
|
Assembly
|
Transynther/x86/_processed/NC/_un_/i9-9900K_12_0xa0_notsx.log_1_1477.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 9
|
2020-08-13T19:41:58.000Z
|
2022-03-30T12:22:51.000Z
|
Transynther/x86/_processed/NC/_un_/i9-9900K_12_0xa0_notsx.log_1_1477.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 1
|
2021-04-29T06:29:35.000Z
|
2021-05-13T21:02:30.000Z
|
Transynther/x86/_processed/NC/_un_/i9-9900K_12_0xa0_notsx.log_1_1477.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 %rcx
push %rdi
push %rsi
lea addresses_WT_ht+0x8f4b, %rbx
nop
sub %r8, %r8
mov $0x6162636465666768, %rcx
movq %rcx, %xmm7
vmovups %ymm7, (%rbx)
nop
nop
nop
cmp $63563, %rax
lea addresses_A_ht+0x1414b, %rsi
lea addresses_A_ht+0x904b, %rdi
nop
nop
inc %r8
mov $50, %rcx
rep movsw
nop
nop
and $60570, %rsi
lea addresses_WT_ht+0xe94b, %rcx
nop
nop
inc %r10
mov $0x6162636465666768, %r8
movq %r8, %xmm5
movups %xmm5, (%rcx)
nop
nop
nop
nop
nop
cmp $52916, %rax
lea addresses_A_ht+0x1e24b, %r10
nop
nop
sub $47560, %r8
and $0xffffffffffffffc0, %r10
vmovaps (%r10), %ymm4
vextracti128 $0, %ymm4, %xmm4
vpextrq $0, %xmm4, %rax
nop
nop
nop
nop
nop
add %rcx, %rcx
lea addresses_WC_ht+0xa04b, %r10
nop
nop
add $7191, %rax
mov $0x6162636465666768, %rbx
movq %rbx, (%r10)
nop
nop
cmp %rdi, %rdi
lea addresses_UC_ht+0x1148b, %rsi
lea addresses_A_ht+0x107cb, %rdi
nop
cmp $51423, %r12
mov $19, %rcx
rep movsb
nop
nop
nop
nop
nop
xor %rcx, %rcx
lea addresses_A_ht+0x14693, %rsi
lea addresses_D_ht+0x1b4bf, %rdi
nop
nop
and $25917, %rbx
mov $10, %rcx
rep movsl
nop
nop
nop
nop
nop
xor %r12, %r12
lea addresses_normal_ht+0x14d16, %r8
nop
nop
sub %rdi, %rdi
movb $0x61, (%r8)
nop
nop
cmp %rbx, %rbx
lea addresses_normal_ht+0x14d4b, %rsi
lea addresses_WT_ht+0x7c4b, %rdi
clflush (%rdi)
nop
inc %rbx
mov $46, %rcx
rep movsl
nop
nop
nop
dec %r8
lea addresses_UC_ht+0x1979b, %r8
nop
nop
xor $11204, %r10
movb $0x61, (%r8)
nop
dec %r12
lea addresses_UC_ht+0x1c08b, %rsi
nop
nop
nop
nop
add $50279, %rbx
mov (%rsi), %r12w
nop
nop
and %r12, %r12
lea addresses_WT_ht+0x6d4b, %r12
nop
nop
nop
nop
nop
cmp $12277, %rbx
movb (%r12), %cl
nop
nop
nop
nop
nop
inc %rbx
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rax
pop %r8
pop %r12
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r14
push %r15
push %r9
push %rbp
push %rcx
push %rdi
push %rsi
// Load
mov $0x264411000000014b, %r14
nop
sub $25055, %rcx
movups (%r14), %xmm7
vpextrq $1, %xmm7, %r9
nop
add %r9, %r9
// Store
mov $0xe4b, %rcx
nop
nop
nop
nop
nop
cmp %r10, %r10
mov $0x5152535455565758, %rbp
movq %rbp, %xmm0
movups %xmm0, (%rcx)
nop
nop
inc %r9
// Store
lea addresses_US+0x54b, %r15
clflush (%r15)
nop
nop
nop
nop
sub %r9, %r9
movl $0x51525354, (%r15)
dec %rcx
// Store
lea addresses_normal+0x14e11, %rcx
nop
nop
xor %rsi, %rsi
movb $0x51, (%rcx)
nop
nop
cmp $42780, %rbp
// REPMOV
lea addresses_PSE+0x1534b, %rsi
lea addresses_WT+0x1faab, %rdi
clflush (%rdi)
nop
and %r9, %r9
mov $94, %rcx
rep movsq
nop
nop
nop
nop
cmp $44484, %r14
// Store
mov $0x264411000000014b, %r10
nop
nop
nop
nop
nop
sub %rdi, %rdi
movb $0x51, (%r10)
nop
nop
inc %r9
// REPMOV
mov $0x264411000000014b, %rsi
lea addresses_WC+0x1377a, %rdi
nop
nop
nop
nop
nop
cmp $11582, %r9
mov $46, %rcx
rep movsw
nop
nop
nop
and $14264, %rbp
// Store
lea addresses_UC+0x8379, %r15
nop
nop
nop
sub $27819, %rsi
movb $0x51, (%r15)
and %r9, %r9
// Store
lea addresses_WT+0x194b, %r9
nop
nop
nop
nop
nop
sub %rsi, %rsi
movw $0x5152, (%r9)
nop
nop
nop
and %rbp, %rbp
// Store
lea addresses_WT+0x1cb, %r9
nop
nop
nop
nop
nop
sub %r14, %r14
movb $0x51, (%r9)
nop
add %r10, %r10
// Store
lea addresses_RW+0xdf4b, %rbp
nop
nop
nop
and $26143, %rdi
mov $0x5152535455565758, %rsi
movq %rsi, %xmm0
vmovups %ymm0, (%rbp)
nop
nop
nop
add %r9, %r9
// REPMOV
mov $0x4718cc0000000163, %rsi
lea addresses_normal+0x1864b, %rdi
nop
nop
nop
nop
cmp $32488, %r15
mov $115, %rcx
rep movsb
// Exception!!!
nop
nop
mov (0), %rcx
nop
nop
nop
nop
cmp %rcx, %rcx
// Store
mov $0x264411000000014b, %r9
nop
nop
sub %r10, %r10
mov $0x5152535455565758, %r14
movq %r14, %xmm5
vmovups %ymm5, (%r9)
nop
nop
nop
mfence
// Load
lea addresses_PSE+0x17d4b, %rcx
nop
nop
and %r9, %r9
movups (%rcx), %xmm0
vpextrq $0, %xmm0, %r15
nop
nop
nop
nop
cmp $44393, %rsi
// Faulty Load
mov $0x264411000000014b, %r10
and $20740, %rbp
vmovups (%r10), %ymm3
vextracti128 $0, %ymm3, %xmm3
vpextrq $0, %xmm3, %r14
lea oracles, %rbp
and $0xff, %r14
shlq $12, %r14
mov (%rbp,%r14,1), %r14
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %r9
pop %r15
pop %r14
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_NC', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_NC', 'AVXalign': False, 'size': 16, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_P', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 8}}
{'OP': 'STOR', 'dst': {'type': 'addresses_US', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 10}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 1}}
{'src': {'type': 'addresses_PSE', 'congruent': 9, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WT', 'congruent': 5, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_NC', 'AVXalign': False, 'size': 1, 'NT': False, 'same': True, 'congruent': 0}}
{'src': {'type': 'addresses_NC', 'congruent': 0, 'same': True}, 'OP': 'REPM', 'dst': {'type': 'addresses_WC', 'congruent': 0, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 1}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WT', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 8}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WT', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 7}}
{'OP': 'STOR', 'dst': {'type': 'addresses_RW', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 9}}
{'src': {'type': 'addresses_NC', 'congruent': 2, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal', 'congruent': 8, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_NC', 'AVXalign': False, 'size': 32, 'NT': False, 'same': True, 'congruent': 0}}
{'src': {'type': 'addresses_PSE', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 8}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'type': 'addresses_NC', 'AVXalign': False, 'size': 32, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 7}}
{'src': {'type': 'addresses_A_ht', 'congruent': 11, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_A_ht', 'congruent': 7, 'same': True}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 10}}
{'src': {'type': 'addresses_A_ht', 'AVXalign': True, 'size': 32, 'NT': False, 'same': False, 'congruent': 8}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 7}}
{'src': {'type': 'addresses_UC_ht', 'congruent': 3, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_A_ht', 'congruent': 6, 'same': False}}
{'src': {'type': 'addresses_A_ht', 'congruent': 2, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_D_ht', 'congruent': 2, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 0}}
{'src': {'type': 'addresses_normal_ht', 'congruent': 9, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WT_ht', 'congruent': 8, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 3}}
{'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 4}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 8}, 'OP': 'LOAD'}
{'1a': 1}
1a
*/
| 19.459057
| 152
| 0.643713
|
89b91de10d1dbdf4751bafb0448403dcfd21cff3
| 731
|
asm
|
Assembly
|
contrib/boringssl-cmake/win-x86_64/crypto/fipsmodule/rdrand-x86_64.asm
|
pdv-ru/ClickHouse
|
0ff975bcf3008fa6c6373cbdfed16328e3863ec5
|
[
"Apache-2.0"
] | 15,577
|
2019-09-23T11:57:53.000Z
|
2022-03-31T18:21:48.000Z
|
contrib/boringssl-cmake/win-x86_64/crypto/fipsmodule/rdrand-x86_64.asm
|
pdv-ru/ClickHouse
|
0ff975bcf3008fa6c6373cbdfed16328e3863ec5
|
[
"Apache-2.0"
] | 16,476
|
2019-09-23T11:47:00.000Z
|
2022-03-31T23:06:01.000Z
|
contrib/boringssl-cmake/win-x86_64/crypto/fipsmodule/rdrand-x86_64.asm
|
pdv-ru/ClickHouse
|
0ff975bcf3008fa6c6373cbdfed16328e3863ec5
|
[
"Apache-2.0"
] | 5,941
|
2015-01-02T11:32:21.000Z
|
2022-03-31T16:35:46.000Z
|
; This file is generated from a similarly-named Perl script in the BoringSSL
; source tree. Do not edit by hand.
default rel
%define XMMWORD
%define YMMWORD
%define ZMMWORD
%ifdef BORINGSSL_PREFIX
%include "boringssl_prefix_symbols_nasm.inc"
%endif
section .text code align=64
global CRYPTO_rdrand
ALIGN 16
CRYPTO_rdrand:
xor rax,rax
DB 73,15,199,240
adc rax,rax
mov QWORD[rcx],r8
DB 0F3h,0C3h ;repret
global CRYPTO_rdrand_multiple8_buf
ALIGN 16
CRYPTO_rdrand_multiple8_buf:
test rdx,rdx
jz NEAR $L$out
mov r8,8
$L$loop:
DB 73,15,199,241
jnc NEAR $L$err
mov QWORD[rcx],r9
add rcx,r8
sub rdx,r8
jnz NEAR $L$loop
$L$out:
mov rax,1
DB 0F3h,0C3h ;repret
$L$err:
xor rax,rax
DB 0F3h,0C3h ;repret
| 12.389831
| 76
| 0.737346
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.