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
5e87bd56384b10b6ab2826a50337e99112fdbf73
359
asm
Assembly
oeis/099/A099156.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/099/A099156.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/099/A099156.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A099156: a(n) = 2^(n-1)*U(n-1, 2). ; Submitted by Jon Maiga ; 0,1,8,60,448,3344,24960,186304,1390592,10379520,77473792,578272256,4316282880,32217174016,240472260608,1794909388800,13397386067968,99999450988544,746406063636480,5571250705137664,41584381386555392 mov $1,1 lpb $0 sub $0,1 mul $2,2 add $1,$2 mul $1,2 add $2,$1 lpe mov $0,$2 div $0,2
23.933333
199
0.721448
6fd851f7c1a765987879f2130c5a8b5429929a0f
5,076
asm
Assembly
Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0xca.log_21829_742.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0xca.log_21829_742.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0xca.log_21829_742.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 %r8 push %r9 push %rbx push %rcx push %rdi push %rdx lea addresses_WC_ht+0x1960f, %rbx nop nop dec %rdi mov (%rbx), %r11 nop nop nop nop sub %rcx, %rcx lea addresses_A_ht+0x164db, %r9 clflush (%r9) nop add %rdx, %rdx movb (%r9), %cl nop nop nop inc %rdx lea addresses_A_ht+0xb5cf, %rdi nop inc %rcx vmovups (%rdi), %ymm0 vextracti128 $1, %ymm0, %xmm0 vpextrq $1, %xmm0, %r11 nop nop dec %rbx lea addresses_UC_ht+0x90cf, %rcx nop nop nop sub %r8, %r8 movb (%rcx), %bl nop nop nop nop sub %rbx, %rbx pop %rdx pop %rdi pop %rcx pop %rbx pop %r9 pop %r8 pop %r11 ret .global s_faulty_load s_faulty_load: push %r10 push %r12 push %r14 push %r8 push %rcx push %rdi push %rdx // Store lea addresses_normal+0x18956, %rdi nop nop nop nop nop xor $65262, %rdx movw $0x5152, (%rdi) nop nop nop nop add $46973, %r14 // Faulty Load lea addresses_WT+0x128cf, %r8 nop nop nop nop nop dec %r12 movups (%r8), %xmm4 vpextrq $1, %xmm4, %rdx lea oracles, %rcx and $0xff, %rdx shlq $12, %rdx mov (%rcx,%rdx,1), %rdx pop %rdx pop %rdi pop %rcx pop %r8 pop %r14 pop %r12 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_WT'}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_normal'}} [Faulty Load] {'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 16, 'NT': False, 'type': 'addresses_WT'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'congruent': 5, 'AVXalign': False, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_WC_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 1, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_A_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 8, 'AVXalign': False, 'same': True, 'size': 32, 'NT': False, 'type': 'addresses_A_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 8, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_UC_ht'}, 'OP': 'LOAD'} {'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 */
41.950413
2,999
0.657407
e9261a3f2daa9c82debe45d0ef0c9c55e6932e68
1,131
asm
Assembly
src/test/ref/struct-2.asm
jbrandwood/kickc
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
[ "MIT" ]
2
2022-03-01T02:21:14.000Z
2022-03-01T04:33:35.000Z
src/test/ref/struct-2.asm
jbrandwood/kickc
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
[ "MIT" ]
null
null
null
src/test/ref/struct-2.asm
jbrandwood/kickc
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
[ "MIT" ]
null
null
null
// Minimal struct - two instances being copied (using assignment) // Commodore 64 PRG executable file .file [name="struct-2.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 SIZEOF_STRUCT_POINT = 2 .const OFFSET_STRUCT_POINT_Y = 1 .segment Code main: { .label SCREEN = $400 // point1.x = 2 lda #2 sta point1 // point1.y = 3 lda #3 sta point1+OFFSET_STRUCT_POINT_Y // point2 = point1 ldy #SIZEOF_STRUCT_POINT !: lda point1-1,y sta point2-1,y dey bne !- // point2.x = 4 lda #4 sta point2 // SCREEN[0] = point1.x lda point1 sta SCREEN // SCREEN[1] = point1.y lda point1+OFFSET_STRUCT_POINT_Y sta SCREEN+1 // SCREEN[2] = point2.x lda point2 sta SCREEN+2 // SCREEN[3] = point2.y lda point2+OFFSET_STRUCT_POINT_Y sta SCREEN+3 // } rts } .segment Data point1: .fill SIZEOF_STRUCT_POINT, 0 point2: .fill SIZEOF_STRUCT_POINT, 0
23.081633
65
0.648099
1852d3c4e2dd631695d82996b6fb865d41e38ee3
573
asm
Assembly
05/5-b/5-b blackwhitescreen.asm
AbstractXan/ComputerSystemDesignLab
2851da683e4e894be66463dcc29a9fa6ba0538b6
[ "MIT" ]
null
null
null
05/5-b/5-b blackwhitescreen.asm
AbstractXan/ComputerSystemDesignLab
2851da683e4e894be66463dcc29a9fa6ba0538b6
[ "MIT" ]
null
null
null
05/5-b/5-b blackwhitescreen.asm
AbstractXan/ComputerSystemDesignLab
2851da683e4e894be66463dcc29a9fa6ba0538b6
[ "MIT" ]
null
null
null
@SCREEN D=A @addr M=D @256 D=A @n M=D @32 D=A @m M=D @row M=0 @21845 D=A @oddrow M=D @32767 D=A @evenrow M=D @10923 D=A @evenrow M=M+D @i M=0 (OUTLOOP) @i D=M @n D=D-M @ENDOUT D;JGE @row D=M @EVENROW D;JEQ @oddrow D=M @current M=D @row M=0 @ROWSTART 0;JMP (EVENROW) @evenrow D=M @current M=D @row M=1 (ROWSTART) @j M=0 (INLOOP) @j D=M @m D=D-M @ENDIN D;JGE @current D=M @addr A=M M=D @addr M=M+1 @j M=M+1 @INLOOP 0;JMP (ENDIN) @i M=M+1 @OUTLOOP 0;JMP (ENDOUT) @ENDOUT 0;JMP
5.617647
11
0.516579
ec2915d01822e1a17dbf2fa505e774ee3beac746
1,374
asm
Assembly
just_ram_lcd.asm
andrewtrotman/Pinnated
7654fe051348938fd4136cb9c2d2d7229b722c97
[ "BSD-2-Clause" ]
null
null
null
just_ram_lcd.asm
andrewtrotman/Pinnated
7654fe051348938fd4136cb9c2d2d7229b722c97
[ "BSD-2-Clause" ]
null
null
null
just_ram_lcd.asm
andrewtrotman/Pinnated
7654fe051348938fd4136cb9c2d2d7229b722c97
[ "BSD-2-Clause" ]
null
null
null
ORG $1000 main INCLUDE ram.asm stack_init LDU #$A000 LDS #$B000 LBSR lcd_init print_message LEAX string_boot,pcr LBSR lcd_puts LBSR wait LEAX ram_page_table_1,pcr LDY #ram_dat_table_start ram_init_more_1 LDA ,X+ COMA STA ,Y+ CMPY #ram_dat_table_end BLO ram_init_more_1 LBSR memcheck LBSR wait LEAX ram_page_table_repeat,pcr LDY #ram_dat_table_start ram_init_more_2 LDA ,X+ COMA STA ,Y+ CMPY #ram_dat_table_end BLO ram_init_more_2 LBSR memcheck LBSR wait LBRA print_message memcheck PSHS D LDA #$5A STA $1000 LDA $1000 LBSR check_one LDA $3000 LBSR check_one LDA $5000 LBSR check_one LDA $7000 LBSR check_one LDA $9000 LBSR check_one LDA $B000 LBSR check_one LDA $D000 LBSR check_one PULS D RTS check_one LDB #'Y' CMPA #$5A BEQ check_one_yes LDB #'N' check_one_yes STB lcd_data LBSR lcd_wait RTS string_boot FCN "RT:" ; ; WAIT ; ---- ; Wait a bit ; wait PSHS X LDX #$FFFF wait_next LEAX -1,X CMPX #$0000 BNE wait_next PULS X RTS ram_page_table_repeat FCB $01,$02,$01,$02,$01,$02,$01,$02,$01,$02,$01,$02,$01,$02,$01,$02 INCLUDE lcd.asm ; ; 6809 INTERRUPT VECTORS ; ---------------------- ; org $1FF0 vector_reserved FDB $F000 vector_swi3 FDB $F000 vector_swi2 FDB $F000 vector_firq FDB $F000 vector_irq FDB $F000 vector_swi FDB $F000 vector_nmi FDB $F000 vector_reset FDB $F000
10.734375
68
0.709607
da898f0d6a3ecf414018ea86e355fa9012a87069
667
asm
Assembly
programs/oeis/052/A052516.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/052/A052516.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/052/A052516.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A052516: Number of pairs of sets of cardinality at least 3. ; 0,0,0,0,0,0,20,70,182,420,912,1914,3938,8008,16172,32526,65262,130764,261800,523906,1048154,2096688,4193796,8388054,16776614,33553780,67108160,134216970,268434642,536870040,1073740892,2147482654,4294966238,8589933468,17179867992,34359737106,68719475402,137438952064,274877905460,549755812326,1099511626134,2199023253828,4398046509296,8796093020314,17592186042434,35184372086760,70368744175500,140737488353070,281474976708302,562949953418860,1125899906840072,2251799813682594,4503599627367738,9007199254738128 mov $1,1 lpb $0 mul $1,2 add $2,$0 sub $0,1 lpe add $0,$2 sub $1,$0 sub $1,$0 trn $1,2
47.642857
510
0.823088
2d589d776a0b3cdc9d2425e2fc283e0b45e71679
782
asm
Assembly
EXP_6_7/DIVISION_MULTIPLICATION_FLAG_BEHAVIOUR.asm
L12161/assembly_habijabi
4dc7e77af33997f953107a1222a47b7b8b223f93
[ "Apache-2.0" ]
null
null
null
EXP_6_7/DIVISION_MULTIPLICATION_FLAG_BEHAVIOUR.asm
L12161/assembly_habijabi
4dc7e77af33997f953107a1222a47b7b8b223f93
[ "Apache-2.0" ]
null
null
null
EXP_6_7/DIVISION_MULTIPLICATION_FLAG_BEHAVIOUR.asm
L12161/assembly_habijabi
4dc7e77af33997f953107a1222a47b7b8b223f93
[ "Apache-2.0" ]
null
null
null
; OBSERVE EFFECT OF MUL AND DIV ON FLAGS CODE SEGMENT ASSUME CS:CODE ; MULTIPLICATION IN WORD FORMAT MOV AX,23h MOV BX,25h XOR DX,DX MUL BX ; AT THIS POINT WE CHECK THE FLAGS MOV AX,0FFFEh ;65534 MOV BX,0FF06h ;65286 MOV DX,0 DIV BX ; AT THIS POINT WE CHECK THE FLAGS ; MULTIPLICATION IN BYTE FORM MOV AL,9h MOV BL,5h XOR AH,AH MUL BL ; AT THIS POINT WE CHECK THE FLAGS MOV AL,0FFh ;255 MOV BL,0A6h ;160 XOR AH,AH MUL BL ;DIVISION IN WORD FORMAT MOV DX,0FFF4h ;65524 MOV AX,0FFA4h ;65444 MOV CX,0FFh ;255 ;DIVISION IN BYTE FORMAT MOV AX,0FAh ;250 DIV A ; CHECK FLAGS HLT ORG 50h A DB 0Fh CODE ENDS END
16.638298
41
0.576726
033a514d0fbdd80222b43d31ebad164d30d71275
74
asm
Assembly
gfx/pokemon/lombre/anim.asm
Ebernacher90/pokecrystal-allworld
5d623c760e936842cf92563912c5bd64dd69baef
[ "blessing" ]
null
null
null
gfx/pokemon/lombre/anim.asm
Ebernacher90/pokecrystal-allworld
5d623c760e936842cf92563912c5bd64dd69baef
[ "blessing" ]
null
null
null
gfx/pokemon/lombre/anim.asm
Ebernacher90/pokecrystal-allworld
5d623c760e936842cf92563912c5bd64dd69baef
[ "blessing" ]
null
null
null
frame 1, 08 frame 2, 18 frame 3, 22 frame 2, 14 frame 1, 08 endanim
10.571429
12
0.635135
b79fe235f4e032a18fd1105f0f9cd6e33322b878
5,745
asm
Assembly
ECE263/Labs/Lab6/L6main-old.asm
Reiuiji/UmassdPortfolio
959d852a91825326fd777c1883cdfac39d8dd3dd
[ "MIT" ]
3
2017-04-23T00:53:11.000Z
2019-03-11T23:47:20.000Z
ECE263/Labs/Lab6/L6main-old.asm
Reiuiji/UmassdPortfolio
959d852a91825326fd777c1883cdfac39d8dd3dd
[ "MIT" ]
null
null
null
ECE263/Labs/Lab6/L6main-old.asm
Reiuiji/UmassdPortfolio
959d852a91825326fd777c1883cdfac39d8dd3dd
[ "MIT" ]
null
null
null
;Parallel Ports & LED Display ;Daniel Noyes, Andrew Haas, Benjamin Doiron ;Group 11, Lab 6, March 13th, 2013 ;*************************************************************************** ;Revision Notes; ; ; [none] ; ;*************************************************************************** ; export symbols XDEF Entry, _Startup ; export 'Entry' symbol ABSENTRY Entry ; for absolute assembly: mark this as entry point ;*************************************************************************** ; equates RAMStart: EQU $1000 ; absoolute address of the start of RAM: Variables ROMSTART: EQU $C000 ; absolute Address to place code/constant Data RAM_END: EQU $3FFF ; absolute address of the End of RAM: Variables PTP: EQU $0000 ; Port A DDRP: EQU $0002 ; enable port A [bit specific: 1 = output, 0 = input] CRG_FLG: EQU $0037 ; to clear the interupt by writing 1 to RTIF (%10000000) CRG_INT: EQU $0038 ; enable the interrupt RTI_CTL: EQU $003B ; RTI clock rate ($40 ~ 1.024 ms) TIOS: EQU $40 TSCR1: EQU $46 TSCR2: EQU $4D TCTL1: EQU $48 TCTL2: EQU $49 TCTL3: EQU $4A TCTL4: EQU $4B TFLG1: EQU $4E TIE: EQU $4C ;*************************************************************************** ;variable/data section ORG RAMStart T_FLG DS.B 1 WAVE_TABLE: DC.W LED0 ;based on the ticks DC.W LED1 ;ticks*250ns DC.W LED2 DC.W LED3 DC.W LED4 DC.W LED5 DC.W LED6 DC.W LED7 ;*************************************************************************** ; Code section ORG ROMSTART Entry: _Startup: ;*************************************************************************** ; Inilitilizing the program LDS #RAM_END ; initialize the stack pointer. LDAA #%10000000 ; load the 1 in 7th bit to enable the ... STAA CRG_INT ; and set the period counter. LDAA #$40 ; loads a value (hex 40) to the clock ... STAA RTI_CTL ; for a 1 ms clock rate for the rti CLR T_FLG ; reset the task flag LDAA #$FF STAA DDRB STAA DDRP CLI ; clear the i bit ;*************************************************************************** ; Inilitilizing the ECT LDAA #$80 ;enable timer ORAA TSCR1 STAA TSCR1 LDAA TSCR2 ;set time prescscale ANDA #%11111011 ;011 = Div by 8 STAA TSCR2 LDAA TIOS ORAA #%00000010 ;set channel 1 as output Compare ANDA #%11111010 ;set channel 0,2 as a input capture STAA TIOS LDAA #%00000100 ;set PA for ch 1 for high input(01 rising edge) STAA TCTL4 LDAA #%00000010 ;set PA for ch 0 as a low output (10 clear) STAA TCTL2 LDAA #%00110000 ;set PA for ch 2 as a high output (11 set) STAA TCTL2 LDAA #%00000010 ;clear ch 1 status STAA TFLG1 ;*************************************************************************** ; Subroutines ;*************************************************************************** ; Main Routine Main: LDAA T_FLG ; Loads the Task flag to check for a specific task flag BITA #TSK_1 ; Check the task flag towards the first task flag BEQ SKIP_1 ; if the flag is not checked will skip to next check JSR TASK_1 ; jumps to task 1 SKIP_1: BITA #TSK_2 ; BEQ SKIP_2 ; skip to task 2 JSR TASK_2 ; jumps to task 2 SKIP_2: BITA #TSK_3 ; BEQ SKIP_3 ; skip task 3 JSR TASK_3 ; jumps to task 3 SKIP_3: BRA Main ; main loop to the beginning and check the flags again ;*************************************************************************** ;Task 1 ; ; Display the value of the LCD to the seven segment Display ; TASK_1: PSHA SEI PULA ; returns the task flag from the stack to A ANDA #(TSK_1 ^ $FF) ; Clears the task flag, prevent main from running this task again right after STAA T_FLG ; CLI ; allow rti RTS ; RETURN from stack ;*************************************************************************** ;Task 2 ; TASK_2 PSHA SEI PULA ; ANDA #(TSK_2 ^ $FF) ; Clears the task flag, prevent main from running this task again right after STAA T_FLG ; CLI ; RTS ; RETURN from stack ;*************************************************************************** ;RTI ; RTI_ISR: NOP RTI ; RETURN from interupt ;*************************************************************************** ; ECT RTI ; CH0_ISR: NOP RTI CH1_ISR: NOP RTI CH2_ISR: NOP RTI CH3_ISR: NOP RTI CH4_ISR: NOP RTI CH5_ISR: NOP RTI CH6_ISR: NOP RTI CH7_ISR: NOP RTI ;*************************************************************************** ; catch-all isr ; if any onther task flags are enabled then will return from their interupts ; DFLT_ISR: NOP ; let cpu hang for a second RTI ; RETURN from the interupt routine ;*************************************************************************** ; Interrupt Vectors [rti interupts] ; writes the memory locations for various interrupts to prevent the system ; from hanging ; ORG $FFE0 ; DC.W CH7_ISR ; Time channel 7 DC.W CH6_ISR ; Time channel 6 DC.W CH5_ISR ; Time channel 5 DC.W CH4_ISR ; Time channel 4 DC.W CH3_ISR ; Time channel 3 DC.W CH2_ISR ; Time channel 2 DC.W CH1_ISR ; Time channel 1 DC.W CH0_ISR ; Time channel 0 ;FFF0 DC.W RTI_ISR ; Real Time Interrupt DC.W DFLT_ISR ; IRQ pin DC.W DFLT_ISR ; XIRQ pin DC.W DFLT_ISR ; SWI DC.W DFLT_ISR ; non_inst DC.W DFLT_ISR ; cop fail DC.W DFLT_ISR ; clk fail DC.W Entry ; reset vector
24.037657
101
0.499565
1e70fde3fd979ad85dd36982202bf683c8e11532
4,137
asm
Assembly
main.asm
OleksiyTokarchuk/AVR-ATtiny12-Time-Relay-Assembly-Code
d6d54f1a24a8bd63eb6c1d8b5a6c890260a2de58
[ "CC0-1.0" ]
null
null
null
main.asm
OleksiyTokarchuk/AVR-ATtiny12-Time-Relay-Assembly-Code
d6d54f1a24a8bd63eb6c1d8b5a6c890260a2de58
[ "CC0-1.0" ]
null
null
null
main.asm
OleksiyTokarchuk/AVR-ATtiny12-Time-Relay-Assembly-Code
d6d54f1a24a8bd63eb6c1d8b5a6c890260a2de58
[ "CC0-1.0" ]
null
null
null
;Author: Oleksiy Tokarchuk ;mail.oleksiy@gmail.com .def data = r16 ;Software shift register .def i = r17 ;Register that stores cycle iterator .def p = r18 ;Pointer to data in table for 7-segment indicators .def dataout = r19 ;Register that outputs data from shift into IO space .def tableaddr = r20 ;Register that stores first byte point in table .def temp = r21 .def time = r22 .def setpoint = r23 .def buttonstate = r24 .equ clock = 0 ;clock pin .equ cs = 2 ;chip selsct pin .equ mosi = 1 ;sdout pin .equ mask = 0b00000010 ;mask where 1 corresponds mosi pin position in PORTx register .equ plus = 3 .equ minus = 4 .equ relay = 5 .eseg .db 0x01 .cseg .org 0x00 rjmp RESET ; the best place to access table by single relative address LOW register table: .db 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, \ 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, \ 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, \ 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, \ 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, \ 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, \ 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, \ 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, \ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, \ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99 RESET: ldi tableaddr, LOW(table * 2) sbi DDRB, mosi ;data sbi DDRB, clock ;clock sbi DDRB, cs ;latch ldi temp, (1 << plus)|(1 << minus) out PORTB, temp ;pull-up for buttons rcall EEPROMRead in setpoint, EEDR mov p, setpoint rcall print clr temp ldi time, 0 loop: in buttonstate, PINB andi buttonstate, 0b00011000 cpi buttonstate, (0 << plus)|(1 << minus) breq increment cpi buttonstate, (1 << plus)|(0 << minus) breq decrement cpi buttonstate, 0x00 breq start rjmp loop start: cpi setpoint, 0 breq error ;setpoint can't be zero rcall EEPROMRead in temp, EEDR cp temp, setpoint brne notequal NewSetpointSaved: mov time, setpoint sbi DDRB, relay softtimer: rcall delay1s dec time mov p, time rcall print cpi time, 0 brne softtimer cbi DDRB, relay rcall delay1s mov p, setpoint rcall print rjmp loop error: rjmp loop notequal: out EEDR, setpoint rcall EEPROMWrite rjmp NewSetpointSaved increment: rcall delay sbrc buttonstate, plus rjmp loop inc setpoint cpi setpoint, 99 brsh setpoint_maximum maximum: mov p, setpoint rcall print rcall delay rjmp loop setpoint_maximum: ldi setpoint, 99 rjmp maximum decrement: rcall delay sbrc buttonstate, minus rjmp loop dec setpoint cpi setpoint, 1 brlo setpoint_minimum minimum: mov p, setpoint rcall print rcall delay rjmp loop setpoint_minimum: ldi setpoint, 1 rjmp minimum send: ;Software defined shift register in temp, PORTB andi temp, 0b00011000 clr i cbi PORTB, cs byte: cbi PORTB, clock bst data, 7 bld dataout, mosi andi dataout, mask or dataout, temp out PORTB, dataout sbi PORTB, clock lsl data inc i cpi i, 8 brne byte sbi PORTB, cs ret print: ;subroutine that prints data on 7-segmet indicators add tableaddr, p mov ZL, tableaddr lpm mov data, R0 rcall send sub tableaddr, p ret delay: ldi r27, 195 ldi r28, 205 Level1: dec r28 brne Level1 dec r27 brne Level1 rjmp PC+1 ret delay1s: ldi r27, 6 ldi r28, 19 ldi r29, 174 Level2: dec r29 brne Level2 dec r28 brne Level2 dec r27 brne Level2 rjmp PC+1 ret EEPROMRead: ldi temp, 0x00 out EEAR, temp sbi EECR, EERE WaitRead: sbic EECR, EERE rjmp WaitRead ret EEPROMWrite: ldi temp, 0x00 out EEAR, temp sbi EECR, EEMWE sbi EECR, EEWE WaitWrite: sbic EECR, EEWE rjmp WaitWrite ret
20.893939
97
0.638627
31507e59da311cbb1bdc5082cb9ae1a42e546fbc
33,252
asm
Assembly
base/hals/halmps/i386/mpspin.asm
npocmaka/Windows-Server-2003
5c6fe3db626b63a384230a1aa6b92ac416b0765f
[ "Unlicense" ]
17
2020-11-13T13:42:52.000Z
2021-09-16T09:13:13.000Z
base/hals/halmps/i386/mpspin.asm
sancho1952007/Windows-Server-2003
5c6fe3db626b63a384230a1aa6b92ac416b0765f
[ "Unlicense" ]
2
2020-10-19T08:02:06.000Z
2020-10-19T08:23:18.000Z
base/hals/halmps/i386/mpspin.asm
sancho1952007/Windows-Server-2003
5c6fe3db626b63a384230a1aa6b92ac416b0765f
[ "Unlicense" ]
14
2020-11-14T09:43:20.000Z
2021-08-28T08:59:57.000Z
TITLE "Spin Locks" ;++ ; ; Copyright (c) 1989-1998 Microsoft Corporation ; ; Module Name: ; ; spinlock.asm ; ; Abstract: ; ; This module implements x86 spinlock functions for the PC+MP HAL. ; ; Author: ; ; Bryan Willman (bryanwi) 13 Dec 89 ; ; Environment: ; ; Kernel mode only. ; ; Revision History: ; ; Ron Mosgrove (o-RonMo) Dec 93 - modified for PC+MP HAL. ;-- .486p include callconv.inc ; calling convention macros include i386\kimacro.inc include hal386.inc include mac386.inc include apic.inc include ntapic.inc EXTRNP _KeBugCheckEx,5,IMPORT EXTRNP KfRaiseIrql, 1,,FASTCALL EXTRNP KfLowerIrql, 1,,FASTCALL EXTRNP _KeSetEventBoostPriority, 2, IMPORT EXTRNP _KeWaitForSingleObject,5, IMPORT extrn _HalpVectorToIRQL:byte extrn _HalpIRQLtoTPR:byte ifdef NT_UP LOCK_ADD equ add LOCK_DEC equ dec LOCK_CMPXCHG equ cmpxchg else LOCK_ADD equ lock add LOCK_DEC equ lock dec LOCK_CMPXCHG equ lock cmpxchg endif _TEXT SEGMENT PARA PUBLIC 'CODE' ASSUME DS:FLAT, ES:FLAT, SS:FLAT, FS:NOTHING, GS:NOTHING SUBTTL "Acquire Kernel Spin Lock" ;++ ; ; KIRQL ; FASTCALL ; KfAcquireSpinLock ( ; IN PKSPIN_LOCK SpinLock ; ) ; ; Routine Description: ; ; This function raises to DISPATCH_LEVEL and acquires the specified ; spin lock. ; ; Arguments: ; ; SpinLock (ecx) - Supplies a pointer to a kernel spin lock. ; ; Return Value: ; ; The old IRQL is returned as the function value. ; ;-- align 16 cPublicFastCall KfAcquireSpinLock ,1 cPublicFpo 0,0 mov edx, dword ptr APIC[LU_TPR] ; get old IRQL vector mov dword ptr APIC[LU_TPR], DPC_VECTOR ; raise IRQL jmp short sls10 ; finish in common code fstENDP KfAcquireSpinLock SUBTTL "Acquire Kernel Spin Lock" ;++ ; ; KIRQL ; FASTCALL ; KeAcquireSpinLockRaiseToSynch ( ; IN PKSPIN_LOCK SpinLock ; ) ; ; Routine Description: ; ; This function raises to SYNCH_LEVEL and acquires the specified ; spin lock. ; ; Arguments: ; ; SpinLock (ecx) - Supplies a pointer to a kernel spin lock. ; ; Return Value: ; ; The old IRQL is returned as the function value. ; ;-- align 16 cPublicFastCall KeAcquireSpinLockRaiseToSynch,1 cPublicFpo 0,0 mov edx, dword ptr APIC[LU_TPR] ; get old vector mov dword ptr APIC[LU_TPR], APIC_SYNCH_VECTOR ; raise IRQL sls10: shr edx, 4 ; extract high 4 bits of vector movzx eax, _HalpVectorToIRQL[edx] ; translate TPR to old IRQL ifndef NT_UP ; ; Attempt to acquire the specified spin lock. ; sls20: ACQUIRE_SPINLOCK ecx, <short sls30> ; fstRET KeAcquireSpinLockRaiseToSynch ; ; Lock is owned - spin until it is free, then try again. ; sls30: SPIN_ON_SPINLOCK ecx, sls20 ; else fstRET KeAcquireSpinLockRaiseToSynch endif fstENDP KeAcquireSpinLockRaiseToSynch SUBTTL "KeAcquireSpinLockRaiseToSynchMCE" ;++ ; ; KIRQL ; FASTCALL ; KeAcquireSpinLockRaiseToSynchMCE ( ; IN PKSPIN_LOCK SpinLock ; ) ; ; Routine Description: ; ; This function performs the same function as KeAcquireSpinLockRaiseToSynch ; but provides a work around for an IFU errata for Pentium Pro processors ; prior to stepping 619. ; ; Arguments: ; ; (ecx) = SpinLock - Supplies a pointer to a kernel spin lock. ; ; Return Value: ; ; OldIrql (TOS+8) - pointer to place old irql. ; ;-- ifndef NT_UP align 16 cPublicFastCall KeAcquireSpinLockRaiseToSynchMCE,1 cPublicFpo 0,0 mov edx, dword ptr APIC[LU_TPR] ; (ecx) = Old Priority (Vector) mov eax, edx shr eax, 4 movzx eax, _HalpVectorToIRQL[eax] ; (al) = OldIrql ; ; Test lock ; ; TEST_SPINLOCK ecx,<short slm30> ; NOTE - Macro expanded below: test dword ptr [ecx], 1 nop ; On a P6 prior to stepping B1 (619), we nop ; need these 5 NOPs to ensure that we nop ; do not take a machine check exception. nop ; The cost is just 1.5 clocks as the P6 nop ; just tosses the NOPs. jnz short slm30 ; ; Raise irql. ; slm10: mov dword ptr APIC[LU_TPR], APIC_SYNCH_VECTOR ; ; Attempt to assert the lock ; ACQUIRE_SPINLOCK ecx,<short slm20> fstRET KeAcquireSpinLockRaiseToSynchMCE ; ; Lock is owned, spin till it looks free, then go get it ; align dword slm20: mov dword ptr APIC[LU_TPR], edx align dword slm30: SPIN_ON_SPINLOCK ecx,slm10 fstENDP KeAcquireSpinLockRaiseToSynchMCE endif SUBTTL "Release Kernel Spin Lock" ;++ ; ; VOID ; FASTCALL ; KeReleaseSpinLock ( ; IN PKSPIN_LOCK SpinLock, ; IN KIRQL OldIrql ; ) ; ; Routine Description: ; ; This function releases a spin lock and lowers to the old IRQL. ; ; Arguments: ; ; SpinLock (ecx) - Supplies a pointer to a spin lock. ; OldIrql (dl) - Supplies the old IRQL value. ; ; Return Value: ; ; None. ; ;-- align 16 cPublicFastCall KfReleaseSpinLock ,2 cPublicFpo 0,0 movzx eax, dl ; zero extend old IRQL ifndef NT_UP RELEASE_SPINLOCK ecx ; release spin lock endif ; ; Lower IRQL to its previous level. ; ; N.B. Ensure that the requested priority is set before returning. ; movzx ecx, _HalpIRQLtoTPR[eax] ; translate IRQL to TPR value mov dword ptr APIC[LU_TPR], ecx ; lower to old IRQL mov eax, dword ptr APIC[LU_TPR] ; synchronize fstRET KfReleaseSpinLock fstENDP KfReleaseSpinLock SUBTTL "Acquire Lock With Interrupts Disabled" ;++ ; ; ULONG ; FASTCALL ; HalpAcquireHighLevelLock ( ; IN PKSPIN_LOCK SpinLock ; ) ; ; Routine Description: ; ; This function disables interrupts and acquires a spinlock. ; ; Arguments: ; ; SpinLock (ecx) - Supplies a pointer to a spin lock. ; ; Return Value: ; ; The old EFLAGS are returned as the function value. ; ;-- align 16 cPublicFastCall HalpAcquireHighLevelLock, 1 pushfd ; save EFLAGS pop eax ; ahll10: cli ; disable interrupts ACQUIRE_SPINLOCK ecx, ahll20 ; attempt to acquire spin lock fstRET HalpAcquireHighLevelLock ahll20: push eax ; restore EFLAGS popfd ; SPIN_ON_SPINLOCK ecx, <ahll10> ; wait for lock to be free fstENDP HalpAcquireHighLevelLock SUBTTL "Release Lock And Enable Interrupts" ;++ ; ; VOID ; FASTCALL ; HalpReleaseHighLevelLock ( ; IN PKSPIN_LOCK SpinLock, ; IN ULONG Eflags ; ) ; ; Routine Description: ; ; This function releases a kernel spin lock and restores the old EFLAGS. ; ; Arguments: ; ; SpinLock (ecx) - Supplies a pointer to a spin lock. ; Eflags (edx) - supplies the old EFLAGS value. ; ; Return Value: ; ; None. ; ;-- align 16 cPublicFastCall HalpReleaseHighLevelLock, 2 RELEASE_SPINLOCK ecx ; release spin lock push edx ; restore old EFLAGS popfd ; fstRET HalpReleaseHighLevelLock fstENDP HalpReleaseHighLevelLock SUBTTL "Acquire Fast Mutex" ;++ ; ; VOID ; FASTCALL ; ExAcquireFastMutex ( ; IN PFAST_MUTEX FastMutex ; ) ; ; Routine description: ; ; This function acquires ownership of the specified FastMutex. ; ; Arguments: ; ; (ecx) = FastMutex - Supplies a pointer to the fast mutex. ; ; Return Value: ; ; None. ; ;-- align 16 cPublicFastCall ExAcquireFastMutex,1 cPublicFpo 0,0 mov eax, dword ptr APIC[LU_TPR] ; (eax) = Old Priority (Vector) if DBG ; ; Caller must already be at or below APC_LEVEL. ; cmp eax, APC_VECTOR jg short afm11 ; irql too high ==> fatal. endif mov dword ptr APIC[LU_TPR], APC_VECTOR ; Write New Priority to the TPR LOCK_DEC dword ptr [ecx].FmCount ; Get count jnz short afm10 ; Not the owner so go wait. mov dword ptr [ecx].FmOldIrql, eax ; ; Use esp to track the owning thread for debugging purposes. ; !thread from kd will find the owning thread. Note that the ; owner isn't cleared on release, check if the mutex is owned ; first. ; mov dword ptr [ecx].FmOwner, esp fstRet ExAcquireFastMutex cPublicFpo 0,0 afm10: inc dword ptr [ecx].FmContention cPublicFpo 0,2 push ecx push eax add ecx, FmEvent ; Wait on Event stdCall _KeWaitForSingleObject,<ecx,WrExecutive,0,0,0> pop eax ; (al) = OldTpr pop ecx ; (ecx) = FAST_MUTEX mov dword ptr [ecx].FmOldIrql, eax ; ; Use esp to track the owning thread for debugging purposes. ; !thread from kd will find the owning thread. Note that the ; owner isn't cleared on release, check if the mutex is owned ; first. ; mov dword ptr [ecx].FmOwner, esp fstRet ExAcquireFastMutex if DBG cPublicFpo 0,1 afm11: stdCall _KeBugCheckEx,<IRQL_NOT_GREATER_OR_EQUAL,ecx,eax,033h,0> endif fstENDP ExAcquireFastMutex SUBTTL "Release Fast Mutex" ;++ ; ; VOID ; FASTCALL ; ExReleaseFastMutex ( ; IN PFAST_MUTEX FastMutex ; ) ; ; Routine description: ; ; This function releases ownership of the FastMutex. ; ; Arguments: ; ; (ecx) = FastMutex - Supplies a pointer to the fast mutex. ; ; Return Value: ; ; None. ; ;-- align 16 cPublicFastCall ExReleaseFastMutex,1 cPublicFpo 0,0 if DBG ; ; Caller must already be at APC_LEVEL or have APCs blocked. ; mov eax, dword ptr APIC[LU_TPR] ; (eax) = Old Priority (Vector) cmp eax, APC_VECTOR je short rfm04 ; irql is ok. cPublicFpo 0,1 stdCall _KeBugCheckEx,<IRQL_NOT_GREATER_OR_EQUAL,ecx,eax,034h,0> rfm04: endif mov eax, dword ptr [ecx].FmOldIrql ; (eax) = OldTpr LOCK_ADD dword ptr [ecx].FmCount, 1 ; Remove our count jle short rfm05 ; if <= 0, set event cPublicFpo 0,0 mov dword ptr APIC[LU_TPR], eax mov ecx, dword ptr APIC[LU_TPR] if DBG cmp eax, ecx ; Verify TPR is what was je short @f ; written int 3 @@: endif fstRet ExReleaseFastMutex cPublicFpo 0,1 rfm05: add ecx, FmEvent push eax ; save new tpr stdCall _KeSetEventBoostPriority, <ecx, 0> pop eax ; restore tpr cPublicFpo 0,0 mov dword ptr APIC[LU_TPR], eax mov ecx, dword ptr APIC[LU_TPR] if DBG cmp eax, ecx ; Verify TPR is what was je short @f ; written int 3 @@: endif fstRet ExReleaseFastMutex if DBG endif fstENDP ExReleaseFastMutex SUBTTL "Try To Acquire Fast Mutex" ;++ ; ; BOOLEAN ; FASTCALL ; ExTryToAcquireFastMutex ( ; IN PFAST_MUTEX FastMutex ; ) ; ; Routine description: ; ; This function acquires ownership of the FastMutex. ; ; Arguments: ; ; (ecx) = FastMutex - Supplies a pointer to the fast mutex. ; ; Return Value: ; ; Returns TRUE if the FAST_MUTEX was acquired; otherwise FALSE. ; ;-- align 16 cPublicFastCall ExTryToAcquireFastMutex,1 cPublicFpo 0,0 if DBG ; ; Caller must already be at or below APC_LEVEL. ; mov eax, dword ptr APIC[LU_TPR] ; (eax) = Old Priority (Vector) cmp eax, APC_VECTOR jg short tam11 ; irql too high ==> fatal. endif ; ; Try to acquire. ; push dword ptr APIC[LU_TPR] ; Save Old Priority (Vector) mov dword ptr APIC[LU_TPR], APC_VECTOR ; Write New Priority to the TPR mov edx, 0 ; Value to set mov eax, 1 ; Value to compare against LOCK_CMPXCHG dword ptr [ecx].FmCount, edx ; Attempt to acquire jnz short tam20 ; got it? cPublicFpo 0,0 mov eax, 1 ; return TRUE pop dword ptr [ecx].FmOldIrql ; Store Old TPR ; ; Use esp to track the owning thread for debugging purposes. ; !thread from kd will find the owning thread. Note that the ; owner isn't cleared on release, check if the mutex is owned ; first. ; mov dword ptr [ecx].FmOwner, esp fstRet ExTryToAcquireFastMutex tam20: pop ecx ; (ecx) = Old TPR mov dword ptr APIC[LU_TPR], ecx mov eax, dword ptr APIC[LU_TPR] if DBG cmp ecx, eax ; Verify TPR is what was je short @f ; written int 3 @@: endif xor eax, eax ; return FALSE YIELD fstRet ExTryToAcquireFastMutex ; all done if DBG cPublicFpo 0,1 tam11: stdCall _KeBugCheckEx,<IRQL_NOT_GREATER_OR_EQUAL,ecx,eax,033h,0> endif fstENDP ExTryToAcquireFastMutex SUBTTL "Acquire In Stack Queued SpinLock" ;++ ; ; VOID ; FASTCALL ; KeAcquireInStackQueuedSpinLock ( ; IN PKSPIN_LOCK SpinLock, ; IN PKLOCK_QUEUE_HANDLE LockHandle ; ) ; ; VOID ; FASTCALL ; KeAcquireInStackQueuedSpinLockRaiseToSynch ( ; IN PKSPIN_LOCK SpinLock, ; IN PKLOCK_QUEUE_HANDLE LockHandle ; ) ; ; Routine Description: ; ; These functions raise IRQL and acquire an in-stack queued spin lock. ; ; Arguments: ; ; SpinLock (ecx) - Supplies a pointer to a spin lock. ; LockHandle (edx) - supplies a pointer to a lock context. ; ; Return Value: ; ; None. ; ;-- align 16 cPublicFastCall KeAcquireInStackQueuedSpinLock, 2 cPublicFpo 0,0 mov eax, dword ptr APIC[LU_TPR] ; get old IRQL vector mov dword ptr APIC[LU_TPR], DPC_VECTOR ; raise IRQL jmp short iqsl10 ; finish in common code fstENDP KeAcquireInStackQueuedSpinLock align 16 cPublicFastCall KeAcquireInStackQueuedSpinLockRaiseToSynch, 2 cPublicFpo 0,0 mov eax, dword ptr APIC[LU_TPR] ; get old IRQL vector mov dword ptr APIC[LU_TPR], APIC_SYNCH_VECTOR ; raise IRQL iqsl10: shr eax, 4 ; extract high 4 bits of vector mov al, _HalpVectorToIRQL[eax] ; translate to old IRQL mov [edx].LqhOldIrql, al ; save old IRQL in lock context ; ; Set spin lock address in lock context and clear next queue link. ; ifndef NT_UP mov [edx].LqhLock, ecx ; set spin lock address and dword ptr [edx].LqhNext, 0 ; clear next link ifdef CAPKERN_SYNCH_POINTS push ecx ; lock address push 000010101h ; 1 Dword, Timestamp, Subcode = 1 call _CAP_Log_NInt ; add esp, 8 ; endif ; ; Exchange the value of the lock with the address of the lock context. ; mov eax, edx ; save lock context address xchg [ecx], edx ; exchange lock context address cmp edx, 0 ; check if lock is already held jnz short iqsl30 ; if nz, lock already held ; ; N.B. The spin lock address is dword aligned and the bottom two bits are ; used as indicators. ; ; Bit 0 is LOCK_QUEUE_WAIT. ; Bit 1 is LOCK_QUEUE_OWNER. ; or [eax].LqLock, LOCK_QUEUE_OWNER ; set lock owner endif iqsl20: fstRET KeAcquireInStackQueuedSpinLockRaiseToSynch ; ; The lock is already held by another processor. Set the wait bit in the ; lock context, then set the next field in the lock context of the last ; waiter in the lock queue. ; ifndef NT_UP iqsl30: or [eax].LqLock, LOCK_QUEUE_WAIT ; set lock wait mov [edx].LqNext, eax ; set next entry in previous last ifdef CAPKERN_SYNCH_POINTS xor edx, edx ; clear wait counter iqsl40: inc edx ; count wait time test [eax].LqLock, LOCK_QUEUE_WAIT ; check if lock ownership granted jz short iqsl50 ; if z, lock owner granted YIELD ; yield to other SMT processors jmp short iqsl40 ; iqsl50: push ecx ; lock address push edx ; wait counter push 000020104h ; 2 Dwords, Timestamp, Subcode = 4 call _CAP_Log_NInt ; add esp, 12 ; fstRET KeAcquireInStackQueuedSpinLockRaiseToSynch else iqsl40: test [eax].LqLock, LOCK_QUEUE_WAIT ; check if lock ownership granted jz short iqsl20 ; if z, lock ownership granted YIELD ; yield to other SMT processors jmp short iqsl40 ; endif endif fstENDP KeAcquireInStackQueuedSpinLockRaiseToSynch SUBTTL "Acquire Queued Spin Lock" ;++ ; ; KIRQL ; FASTCALL ; KeAcquireQueuedSpinLock ( ; IN KSPIN_LOCK_QUEUE_NUMBER Number ; ) ; ; KIRQL ; FASTCALL ; KeAcquireQueuedSpinLockRaiseToSynch ( ; IN KSPIN_LOCK_QUEUE_NUMBER Number ; ) ; ; Routine Description: ; ; These function raise IRQL and acquire a processor specific queued spin ; lock. ; ; Arguments: ; ; Number (ecx) - Supplies the queued spinlock number. ; ; Return Value: ; ; The old IRQL is returned as the function value. ; ;-- .errnz (LOCK_QUEUE_HEADER_SIZE - 8) align 16 cPublicFastCall KeAcquireQueuedSpinLock, 1 cPublicFpo 0,0 mov eax, dword ptr APIC[LU_TPR] ; get old IRQL vector mov dword ptr APIC[LU_TPR], DPC_VECTOR ; raise IRQL jmp short aqsl10 ; finish in common code fstENDP KeAcquireQueuedSpinLock align 16 cPublicFastCall KeAcquireQueuedSpinLockRaiseToSynch, 1 cPublicFpo 0,0 mov eax, dword ptr APIC[LU_TPR] ; get old IRQL vector mov dword ptr APIC[LU_TPR], APIC_SYNCH_VECTOR ; raise IRQL aqsl10: shr eax, 4 ; extract high 4 bits of vector movzx eax, byte ptr _HalpVectorToIRQL[eax] ; translate to old IRQL ; ; Get address of per processor lock queue entry. ; ifndef NT_UP mov edx, PCR[PcPrcb] ; get address of PRCB lea edx, [edx+ecx*8].PbLockQueue ; get lock queue address mov ecx, [edx].LqLock ; get spin lock address ifdef CAPKERN_SYNCH_POINTS push ecx ; lock address push 000010101h ; 1 Dword, Timestamp, Subcode = 1 call _CAP_Log_NInt ; add esp, 8 ; endif push eax ; save old IRQL cPublicFpo 0,1 if DBG test ecx, LOCK_QUEUE_OWNER + LOCK_QUEUE_WAIT ; inconsistent state? jnz short aqsl60 ; if nz, inconsistent state endif ; ; Exchange the value of the lock with the address of the lock context. ; mov eax, edx ; save lock queue entry address xchg [ecx], edx ; exchange lock queue address cmp edx, 0 ; check if lock is already held jnz short aqsl30 ; if nz, lock already held ; ; N.B. The spin lock address is dword aligned and the bottom two bits are ; used as indicators. ; ; Bit 0 is LOCK_QUEUE_WAIT. ; Bit 1 is LOCK_QUEUE_OWNER. ; or [eax].LqLock, LOCK_QUEUE_OWNER ; set lock owner aqsl20: pop eax ; restore old IRQL cPublicFpo 0,0 endif fstRET KeAcquireQueuedSpinLockRaiseToSynch ; ; The lock is already held by another processor. Set the wait bit in the ; lock context, then set the next field in the lock context of the last ; waiter in the lock queue. ; ifndef NT_UP cPublicFpo 0,1 aqsl30: or [eax].LqLock, LOCK_QUEUE_WAIT ; set lock wait mov [edx].LqNext, eax ; set next entry in previous last ifdef CAPKERN_SYNCH_POINTS xor edx, edx ; clear wait counter aqsl40: inc edx ; count wait time test [eax].LqLock, LOCK_QUEUE_WAIT ; check if lock ownership granted jz short aqsl50 ; if z, lock owner granted YIELD ; yield to other SMT processors jmp short aqsl40 ; aqsl50: push ecx ; lock address push edx ; wait counter push 000020104h ; 2 Dwords, Timestamp, Subcode = 4 call _CAP_Log_NInt ; add esp, 12 ; jmp short aqsl20 ; else aqsl40: test [eax].LqLock, LOCK_QUEUE_WAIT ; check if lock ownership granted jz short aqsl20 ; if z, lock owner granted YIELD ; yield to other SMT processors jmp short aqsl40 ; endif ; ; Inconsistent state in lock queue entry. ; if DBG cPublicFpo 0,1 aqsl60: stdCall _KeBugCheckEx,<SPIN_LOCK_ALREADY_OWNED, ecx, edx, 0, 0> int 3 ; so stacktrace works endif endif fstENDP KeAcquireQueuedSpinLockRaiseToSynch SUBTTL "Release Queued SpinLock" ;++ ; ; VOID ; FASTCALL ; KeReleaseQueuedSpinLock ( ; IN KSPIN_LOCK_QUEUE_NUMBER Number, ; IN KIRQL OldIrql ; ) ; ; Arguments: ; ; Number (ecx) - Supplies the queued spinlock number. ; ; OldIrql (dl) - Supplies the old IRQL. ; ; VOID ; KeReleaseInStackQueuedSpinLock ( ; IN PKLOCK_QUEUE_HANDLE LockHandle ; ) ; ; Arguments: ; ; LockHandle (ecx) - Address of Lock Queue Handle structure. ; ; Routine Description: ; ; These functions release a queued spinlock and lower IRQL to the old ; value. ; ; Return Value: ; ; None. ; ;-- .errnz (LqhNext) .errnz (LOCK_QUEUE_OWNER - 2) align 16 cPublicFastCall KeReleaseInStackQueuedSpinLock, 1 cPublicFpo 0,0 mov dl, byte ptr [ecx].LqhOldIrql ; set old IRQL mov eax, ecx ; set lock queue entry address jmp short rqsl10 ; finish in common code fstENDP KeReleaseInStackQueuedSpinLock align 16 cPublicFastCall KeReleaseQueuedSpinLock, 2 cPublicFpo 0,0 ifndef NT_UP mov eax, PCR[PcPrcb] ; get address of PRCB lea eax, [eax+ecx*8].PbLockQueue ; set lock queue entry address endif rqsl10: movzx edx, dl ; zero extend old IRQL ifndef NT_UP push ebx ; save nonvolatile register cPublicFpo 0,1 mov ebx, [eax].LqNext ; get next entry address mov ecx, [eax].LqLock ; get spin lock home address ifdef CAPKERN_SYNCH_POINTS push ecx ; lock address push 000010107h ; 1 Dword, Timestamp, Subcode = 7 call _CAP_Log_NInt ; add esp, 8 ; endif ; ; Make sure we own the lock and clear the bit ; if DBG btr ecx, 1 ; clear lock owner bit jnc short rqsl80 ; if nc, owner not set cmp dword ptr [ecx], 0 ; lock must be owned for a release jz short rqsl80 else and ecx, NOT LOCK_QUEUE_OWNER ; Clear out the owner bit endif ; ; Test if lock waiter present. ; test ebx, ebx ; test if lock waiter present mov [eax].LqLock, ecx ; clear lock owner bit jnz short rqsl40 ; if nz, lock waiter present ; ; Attempt to release queued spin lock. ; push eax ; save lock queue entry address lock cmpxchg [ecx], ebx ; release spin lock if no waiter pop eax ; restore lock queue entry address jnz short rqsl50 ; if nz, lock waiter present rqs120: pop ebx ; restore nonvolatile register cPublicFpo 0,0 endif ; ; Lower IRQL to its previous level. ; ; N.B. Ensure that the requested priority is set before returning. ; rqsl30: movzx ecx, byte ptr _HalpIRQLtoTPR[edx] ; translate IRQL to TPR value mov dword ptr APIC[LU_TPR], ecx ; lower to old IRQL mov eax, dword ptr APIC[LU_TPR] ; synchronize fstRET KeReleaseQueuedSpinLock ; ; Lock waiter is present. ; ; Clear wait bit and set owner bit in next owner lock queue entry. ; ifndef NT_UP cPublicFpo 0,1 rqsl40: xor [ebx].LqLock, (LOCK_QUEUE_OWNER+LOCK_QUEUE_WAIT) ; set bits and [eax].LqNext, 0 ; clear next waiter address jmp short rqs120 ; ; ; Another processor is attempting to acquire the spin lock. ; ifdef CAPKERN_SYNCH_POINTS rqsl50: push ecx ; lock address (for CAP_Log) xor ecx, ecx ; clear wait counter rqsl60: inc ecx ; increment wait counter mov ebx, [eax].LqNext ; get address of next entry test ebx, ebx ; check if waiter present jnz short rqsl70 ; if nz, waiter is present YIELD ; yield to other SMT processors jmp short rqsl60 ; rqsl70: push ecx ; wait counter push 000020104h ; 2 Dwords, Timestamp, Subcode = 4 call _CAP_Log_NInt ; add esp, 12 ; jmp short rqsl40 ; else rqsl50: mov ebx, [eax].LqNext ; get address of next entry test ebx, ebx ; check if waiter present jnz short rqsl40 ; if nz, waiter is present YIELD ; yield to other SMT processors jmp short rqsl50 ; endif ; ; Inconsistent state in lock queue entry. ; if DBG cPublicFpo 0,1 rqsl80: stdCall _KeBugCheckEx, <SPIN_LOCK_NOT_OWNED, ecx, eax, 0, 1> int 3 ; so stacktrace works endif endif fstENDP KeReleaseQueuedSpinLock SUBTTL "Try to Acquire Queued SpinLock" ;++ ; ; LOGICAL ; KeTryToAcquireQueuedSpinLock ( ; IN KSPIN_LOCK_QUEUE_NUMBER Number, ; OUT PKIRQL OldIrql ; ) ; ; LOGICAL ; KeTryToAcquireQueuedSpinLockRaiseToSynch ( ; IN KSPIN_LOCK_QUEUE_NUMBER Number, ; OUT PKIRQL OldIrql ; ) ; ; Routine Description: ; ; This function raises the current IRQL to DISPATCH/SYNCH level ; and attempts to acquire the specified queued spinlock. If the ; spinlock is already owned by another thread, IRQL is restored ; to its previous value and FALSE is returned. ; ; Arguments: ; ; Number (ecx) - Supplies the queued spinlock number. ; OldIrql (edx) - A pointer to the variable to receive the old ; IRQL. ; ; Return Value: ; ; TRUE if the lock was acquired, FALSE otherwise. ; N.B. ZF is set if FALSE returned, clear otherwise. ; ;-- align 16 cPublicFastCall KeTryToAcquireQueuedSpinLockRaiseToSynch,2 cPublicFpo 0,0 push APIC_SYNCH_VECTOR ; raise to SYNCH jmp short taqsl10 ; continue in common code fstENDP KeTryToAcquireQueuedSpinLockRaiseToSynch cPublicFastCall KeTryToAcquireQueuedSpinLock,2 cPublicFpo 0,0 push DPC_VECTOR ; raise to DPC level ; Attempt to get the lock with interrupts disabled, raising ; the priority in the interrupt controller only if acquisition ; is successful. taqsl10: ifndef NT_UP push edx ; save address of OldIrql pushfd ; save interrupt state cPublicFpo 0,3 ; Get address of Lock Queue entry cli mov edx, PCR[PcPrcb] ; get address of PRCB lea edx, [edx+ecx*8].PbLockQueue ; get &PRCB->LockQueue[Number] ; Get address of the actual lock. mov ecx, [edx].LqLock ifdef CAPKERN_SYNCH_POINTS push ecx ; lock address push 000010108h ; 1 Dword, Timestamp, Subcode = 8 call _CAP_Log_NInt add esp, 8 endif if DBG test ecx, LOCK_QUEUE_OWNER+LOCK_QUEUE_WAIT jnz short taqsl98 ; jiff lock already held (or ; this proc already waiting). endif ; quick test, get out if already taken cmp dword ptr [ecx], 0 ; check if already taken jnz short taqsl60 ; jif already taken xor eax, eax ; comparison value (not locked) ; Store the Lock Queue entry address in the lock ONLY if the ; current lock value is 0. lock cmpxchg [ecx], edx jnz short taqsl60 ; Lock has been acquired. ; note: the actual lock address will be word aligned, we use ; the bottom two bits as indicators, bit 0 is LOCK_QUEUE_WAIT, ; bit 1 is LOCK_QUEUE_OWNER. or ecx, LOCK_QUEUE_OWNER ; mark self as lock owner mov [edx].LqLock, ecx mov eax, [esp+8] ; get new IRQL mov edx, [esp+4] ; get addr to save OldIrql else mov eax, [esp] ; get new IRQL endif ; Raise IRQL and return success. ; Get old priority (vector) from Local APIC's Task Priority ; Register and set the new priority. mov ecx, dword ptr APIC[LU_TPR] ; (ecx) = Old Priority mov dword ptr APIC[LU_TPR], eax ; Set New Priority ifndef NT_UP popfd ; restore interrupt state add esp, 8 ; free locals else add esp, 4 ; free local endif cPublicFpo 0,0 shr ecx, 4 movzx eax, _HalpVectorToIRQL[ecx] ; (al) = OldIrql mov [edx], al ; save OldIrql xor eax, eax ; return TRUE or eax, 1 fstRET KeTryToAcquireQueuedSpinLock ifndef NT_UP taqsl60: ; The lock is already held by another processor. Indicate ; failure to the caller. popfd ; restore interrupt state add esp, 8 ; free locals xor eax, eax ; return FALSE fstRET KeTryToAcquireQueuedSpinLock if DBG cPublicFpo 0,2 taqsl98: stdCall _KeBugCheckEx,<SPIN_LOCK_ALREADY_OWNED,ecx,edx,0,0> int 3 ; so stacktrace works endif endif fstENDP KeTryToAcquireQueuedSpinLock _TEXT ends end
25.81677
83
0.554252
b0c294f332981a8677e19268dc1d9ee2e97c0b57
882
asm
Assembly
programs/oeis/032/A032932.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/032/A032932.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/032/A032932.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A032932: Numbers whose set of base 12 digits is {1,2}. ; 1,2,13,14,25,26,157,158,169,170,301,302,313,314,1885,1886,1897,1898,2029,2030,2041,2042,3613,3614,3625,3626,3757,3758,3769,3770,22621,22622,22633,22634,22765,22766,22777,22778,24349,24350,24361,24362,24493,24494,24505,24506,43357,43358,43369,43370,43501,43502,43513,43514,45085,45086,45097,45098,45229,45230,45241,45242,271453,271454,271465,271466,271597,271598,271609,271610,273181,273182,273193,273194,273325,273326,273337,273338,292189,292190,292201,292202,292333,292334,292345,292346,293917,293918,293929,293930,294061,294062,294073,294074,520285,520286,520297,520298,520429,520430 mov $2,$0 add $2,1 mov $4,$0 lpb $2 mov $0,$4 sub $2,1 sub $0,$2 mov $5,0 lpb $0 mul $0,2 dif $0,4 sub $0,1 add $5,1 mul $5,12 lpe mov $3,$5 div $3,12 mul $3,10 add $3,1 add $1,$3 lpe mov $0,$1
33.923077
587
0.717687
fbc3d824cf570c9e1b86e8c16df9b90356e67fc3
6,687
asm
Assembly
src/arch/x86/lib/print.asm
Eytoue/PencilKernel
f00b331c09a6d0fe7a5df34a25ac9113f9d047d4
[ "MIT" ]
3
2021-02-21T15:34:15.000Z
2021-06-01T20:10:03.000Z
kernel/print.asm
linxin8/OS
36883d75c9405cb8c55d4e8af26682fdb7628102
[ "MIT" ]
1
2022-02-10T02:59:10.000Z
2022-03-22T06:51:51.000Z
src/arch/x86/lib/print.asm
LinChenjun2008/Pencil-Kernel
f00b331c09a6d0fe7a5df34a25ac9113f9d047d4
[ "MIT" ]
null
null
null
TI_GDT equ 0 RPL0 equ 0 SELECTOR_VIDEO equ (0x0003<<3) + TI_GDT + RPL0 section .data put_int_buffer dq 0 ; 定义8字节缓冲区用于数字到字符的转换 [bits 32] section .text ;-------------------------------------------- ;put_str 通过put_char来打印以0字符结尾的字符串 ;-------------------------------------------- ;输入:栈中参数为打印的字符串 ;输出:无 global put_str put_str: ;由于本函数中只用到了ebx和ecx,只备份这两个寄存器 push ebx push ecx xor ecx, ecx ; 准备用ecx存储参数,清空 mov ebx, [esp + 12] ; 从栈中得到待打印的字符串地址 .goon: mov cl, [ebx] cmp cl, 0 ; 如果处理到了字符串尾,跳到结束处返回 jz .str_over push ecx ; 为put_char函数传递参数 call put_char add esp, 4 ; 回收参数所占的栈空间 inc ebx ; 使ebx指向下一个字符 jmp .goon .str_over: pop ecx pop ebx ret ;------------------------ put_char ----------------------------- ;功能描述:把栈中的1个字符写入光标所在处 ;------------------------------------------------------------------- global put_char put_char: pushad ;备份32位寄存器环境 ;需要保证gs中为正确的视频段选择子,为保险起见,每次打印时都为gs赋值 mov ax, SELECTOR_VIDEO ; 不能直接把立即数送入段寄存器 mov gs, ax ;;;;;;;;; 获取当前光标位置 ;;;;;;;;; ;先获得高8位 mov dx, 0x03d4 ;索引寄存器 mov al, 0x0e ;用于提供光标位置的高8位 out dx, al mov dx, 0x03d5 ;通过读写数据端口0x3d5来获得或设置光标位置 in al, dx ;得到了光标位置的高8位 mov ah, al ;再获取低8位 mov dx, 0x03d4 mov al, 0x0f out dx, al mov dx, 0x03d5 in al, dx ;将光标存入bx mov bx, ax ;下面这行是在栈中获取待打印的字符 mov ecx, [esp + 36] ;pushad压入4×8=32字节,加上主调函数的返回地址4字节,故esp+36字节 cmp cl, 0xd ;CR是0x0d,LF是0x0a jz .is_carriage_return cmp cl, 0xa jz .is_line_feed cmp cl, 0x8 ;BS(backspace)的asc码是8 jz .is_backspace jmp .put_other ;;;;;;;;;;;;;;;;;; .is_backspace: ;;;;;;;;;;;; backspace的一点说明 ;;;;;;;;;; ; 当为backspace时,本质上只要将光标移向前一个显存位置即可.后面再输入的字符自然会覆盖此处的字符 ; 但有可能在键入backspace后并不再键入新的字符,这时在光标已经向前移动到待删除的字符位置,但字符还在原处, ; 这就显得好怪异,所以此处添加了空格或空字符0 dec bx shl bx,1 mov byte [gs:bx], 0x20 ;将待删除的字节补为0或空格皆可 inc bx mov byte [gs:bx], 0x07 shr bx,1 jmp .set_cursor ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; .put_other: shl bx, 1 ; 光标位置是用2字节表示,将光标值乘2,表示对应显存中的偏移字节 mov [gs:bx], cl ; ascii字符本身 inc bx mov byte [gs:bx],0x07 ; 字符属性 shr bx, 1 ; 恢复老的光标值 inc bx ; 下一个光标值 cmp bx, 2000 jl .set_cursor ; 若光标值小于2000,表示未写到显存的最后,则去设置新的光标值 ; 若超出屏幕字符数大小(2000)则换行处理 .is_line_feed: ; 是换行符LF(\n) .is_carriage_return: ; 是回车符CR(\r) ; 如果是CR(\r),只要把光标移到行首就行了。 xor dx, dx ; dx是被除数的高16位,清0. mov ax, bx ; ax是被除数的低16位. mov si, 80 ; 由于是效仿linux,linux中\n便表示下一行的行首,所以本系统中, div si ; 把\n和\r都处理为linux中\n的意思,也就是下一行的行首。 sub bx, dx ; 光标值减去除80的余数便是取整 ; 以上4行处理\r的代码 .is_carriage_return_end: ; 回车符CR处理结束 add bx, 80 cmp bx, 2000 .is_line_feed_end: ; 若是LF(\n),将光标移+80便可。 jl .set_cursor ;屏幕行范围是0~24,滚屏的原理是将屏幕的1~24行搬运到0~23行,再将第24行用空格填充 .roll_screen: ; 若超出屏幕大小,开始滚屏 cld mov ecx, 960 ; 一共有2000-80=1920个字符要搬运,共1920*2=3840字节.一次搬4字节,共3840/4=960次 mov esi, 0xc00b80a0 ; 第1行行首 mov edi, 0xc00b8000 ; 第0行行首 rep movsd ;;;;;;;将最后一行填充为空白 mov ebx, 3840 ; 最后一行首字符的第一个字节偏移= 1920 * 2 mov ecx, 80 ;一行是80字符(160字节),每次清理1字符(2字节),一行需要移动80次 .cls: mov word [gs:ebx], 0x0720 ;0x0720是黑底白字的空格键 add ebx, 2 loop .cls mov bx,1920 ;将光标值重置为1920,最后一行的首字符. .set_cursor: ;将光标设为bx值 ;;;;;;; 1 先设置高8位 ;;;;;;;; mov dx, 0x03d4 ;索引寄存器 mov al, 0x0e ;用于提供光标位置的高8位 out dx, al mov dx, 0x03d5 ;通过读写数据端口0x3d5来获得或设置光标位置 mov al, bh out dx, al ;;;;;;; 2 再设置低8位 ;;;;;;;;; mov dx, 0x03d4 mov al, 0x0f out dx, al mov dx, 0x03d5 mov al, bl out dx, al .put_char_done: popad ret global cls_screen cls_screen: pushad ;;;;;;;;;;;;;;; ; 由于用户程序的cpl为3,显存段的dpl为0,故用于显存段的选择子gs在低于自己特权的环境中为0, ; 导致用户程序再次进入中断后,gs为0,故直接在put_str中每次都为gs赋值. mov ax, SELECTOR_VIDEO ; 不能直接把立即数送入gs,须由ax中转 mov gs, ax mov ebx, 0 mov ecx, 80*25 .cls: mov word [gs:ebx], 0x0720 ;0x0720是黑底白字的空格键 add ebx, 2 loop .cls mov ebx, 0 .set_cursor: ;直接把set_cursor搬过来用,省事 ;;;;;;; 1 先设置高8位 ;;;;;;;; mov dx, 0x03d4 ;索引寄存器 mov al, 0x0e ;用于提供光标位置的高8位 out dx, al mov dx, 0x03d5 ;通过读写数据端口0x3d5来获得或设置光标位置 mov al, bh out dx, al ;;;;;;; 2 再设置低8位 ;;;;;;;;; mov dx, 0x03d4 mov al, 0x0f out dx, al mov dx, 0x03d5 mov al, bl out dx, al popad ret ;-------------------- 将小端字节序的数字变成对应的ascii后,倒置 ----------------------- ;输入:栈中参数为待打印的数字 ;输出:在屏幕上打印16进制数字,并不会打印前缀0x,如打印10进制15时,只会直接打印f,不会是0xf ;------------------------------------------------------------------------------------------ global put_int put_int: pushad mov ebp, esp mov eax, [ebp+4*9] ; call的返回地址占4字节+pushad的8个4字节 mov edx, eax mov edi, 7 ; 指定在put_int_buffer中初始的偏移量 mov ecx, 8 ; 32位数字中,16进制数字的位数是8个 mov ebx, put_int_buffer ;将32位数字按照16进制的形式从低位到高位逐个处理,共处理8个16进制数字 .16based_4bits: ; 每4位二进制是16进制数字的1位,遍历每一位16进制数字 and edx, 0x0000000F ; 解析16进制数字的每一位。and与操作后,edx只有低4位有效 cmp edx, 9 ; 数字0~9和a~f需要分别处理成对应的字符 jg .is_A2F add edx, '0' ; ascii码是8位大小。add求和操作后,edx低8位有效。 jmp .store .is_A2F: sub edx, 10 ; A~F 减去10 所得到的差,再加上字符A的ascii码,便是A~F对应的ascii码 add edx, 'A' ;将每一位数字转换成对应的字符后,按照类似“大端”的顺序存储到缓冲区put_int_buffer ;高位字符放在低地址,低位字符要放在高地址,这样和大端字节序类似,只不过咱们这里是字符序. .store: ; 此时dl中应该是数字对应的字符的ascii码 mov [ebx+edi], dl dec edi shr eax, 4 mov edx, eax loop .16based_4bits ;现在put_int_buffer中已全是字符,打印之前, ;把高位连续的字符去掉,比如把字符000123变成123 .ready_to_print: inc edi ; 此时edi退减为-1(0xffffffff),加1使其为0 .skip_prefix_0: cmp edi,8 ; 若已经比较第9个字符了,表示待打印的字符串为全0 je .full0 ;找出连续的0字符, edi做为非0的最高位字符的偏移 .go_on_skip: mov cl, [put_int_buffer+edi] inc edi cmp cl, '0' je .skip_prefix_0 ; 继续判断下一位字符是否为字符0(不是数字0) dec edi ;edi在上面的inc操作中指向了下一个字符,若当前字符不为'0',要恢复edi指向当前字符 jmp .put_each_num .full0: mov cl,'0' ; 输入的数字为全0时,则只打印0 .put_each_num: push ecx ; 此时cl中为可打印的字符 call put_char add esp, 4 inc edi ; 使edi指向下一个字符 mov cl, [put_int_buffer+edi] ; 获取下一个字符到cl寄存器 cmp edi,8 jl .put_each_num popad ret global set_cursor set_cursor: pushad mov bx, [esp+36] ;;;;;;; 1 先设置高8位 ;;;;;;;; mov dx, 0x03d4 ;索引寄存器 mov al, 0x0e ;用于提供光标位置的高8位 out dx, al mov dx, 0x03d5 ;通过读写数据端口0x3d5来获得或设置光标位置 mov al, bh out dx, al ;;;;;;; 2 再设置低8位 ;;;;;;;;; mov dx, 0x03d4 mov al, 0x0f out dx, al mov dx, 0x03d5 mov al, bl out dx, al popad ret
24.228261
91
0.581576
1a4a2b7a3cce45df3fbf720aaab3e8a50e15f168
813
asm
Assembly
data/pokemon/base_stats/dragonite.asm
opiter09/ASM-Machina
75d8e457b3e82cc7a99b8e70ada643ab02863ada
[ "CC0-1.0" ]
1
2022-02-15T00:19:44.000Z
2022-02-15T00:19:44.000Z
data/pokemon/base_stats/dragonite.asm
opiter09/ASM-Machina
75d8e457b3e82cc7a99b8e70ada643ab02863ada
[ "CC0-1.0" ]
null
null
null
data/pokemon/base_stats/dragonite.asm
opiter09/ASM-Machina
75d8e457b3e82cc7a99b8e70ada643ab02863ada
[ "CC0-1.0" ]
null
null
null
db DEX_DRAGONITE ; pokedex id db 91, 134, 95, 80, 100 ; hp atk def spd spc db DRAGON, FLYING ; type db 45 ; catch rate db 218 ; base exp INCBIN "gfx/pokemon/front/dragonite.pic", 0, 1 ; sprite dimensions dw DragonitePicFront, DragonitePicBack db WRAP, LEER, THUNDER_WAVE, AGILITY ; level 1 learnset db GROWTH_SLOW ; growth rate ; tm/hm learnset tmhm RAZOR_WIND, TOXIC, COUNTER, BODY_SLAM, TAKE_DOWN, \ DOUBLE_EDGE, BUBBLEBEAM, WATER_GUN, ICE_BEAM, BLIZZARD, \ HYPER_BEAM, RAGE, DRAGON_RAGE, THUNDERBOLT, THUNDER, \ MIMIC, DOUBLE_TEAM, REFLECT, BIDE, FIRE_BLAST, \ SWIFT, SKULL_BASH, REST, THUNDER_WAVE, SUBSTITUTE, \ SURF, STRENGTH ; end db 0 ; padding
31.269231
77
0.608856
ceaa22065dd9c959b880c1931baeb35a05fd3c27
368
asm
Assembly
programs/oeis/235/A235702.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/235/A235702.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/235/A235702.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A235702: Fixed points of A001175 (Pisano periods). ; 1,24,120,600,3000,15000,75000,375000,1875000,9375000,46875000,234375000,1171875000,5859375000,29296875000,146484375000,732421875000,3662109375000,18310546875000,91552734375000,457763671875000,2288818359375000,11444091796875000 mov $1,1 mov $2,5 lpb $0 sub $0,1 add $1,$2 mov $2,$1 mul $1,4 lpe mov $0,$1
28.307692
228
0.777174
e547d2f736d9d3730c323e0f14f3afc3daf10d0c
1,984
asm
Assembly
libsrc/_DEVELOPMENT/target/cpm/cpm_crt.asm
grancier/z180
e83f35e36c9b4d1457e40585019430e901c86ed9
[ "ClArtistic" ]
null
null
null
libsrc/_DEVELOPMENT/target/cpm/cpm_crt.asm
grancier/z180
e83f35e36c9b4d1457e40585019430e901c86ed9
[ "ClArtistic" ]
null
null
null
libsrc/_DEVELOPMENT/target/cpm/cpm_crt.asm
grancier/z180
e83f35e36c9b4d1457e40585019430e901c86ed9
[ "ClArtistic" ]
1
2019-12-03T23:57:48.000Z
2019-12-03T23:57:48.000Z
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; SELECT CRT0 FROM -STARTUP=N COMMANDLINE OPTION ;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; INCLUDE "zcc_opt.def" IFNDEF startup ; startup undefined so select a default defc startup = 0 ENDIF ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; user supplied crt ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; IF startup = -1 IFNDEF __CRTDEF defc __CRTDEF = 0 ENDIF IFNDEF __MMAP defc __MMAP = 0 ENDIF INCLUDE "crt.asm" ENDIF ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; cp/m native console ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; IF startup = 0 IFNDEF __CRTDEF defc __CRTDEF = 0 ENDIF IFNDEF __MMAP defc __MMAP = 0 ENDIF ; stdin = cpm_00_input_cons (bdos function 10) ; stdout = cpm_00_output_cons (bdos function 2) ; stderr = dup(stdout) ; stdrdr = cpm_00_input_reader (bdos function 3) ; stdpun = cpm_00_output_punch (bdos function 4) ; stdlst = cpm_00_output_list (bdos function 5) INCLUDE "startup/cpm_crt_0.asm" ENDIF ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; cp/m z88dk console (one window) ;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; IF startup = 4 IFNDEF __CRTDEF defc __CRTDEF = 0 ENDIF IFNDEF __MMAP defc __MMAP = 0 ENDIF ; stdin = cpm_01_input_kbd_dcio (bdos function 6) ; stdout = cpm_01_output_dcio (bdos function 6) ; stderr = dup(stdout) ; stdrdr = cpm_00_input_reader (bdos function 3) ; stdpun = cpm_00_output_punch (bdos function 4) ; stdlst = cpm_00_output_list (bdos function 5) INCLUDE "startup/cpm_crt_4.asm" ENDIF
20.884211
63
0.4375
304fffa4504fbba35646c9bd885350f3cc7c8862
3,412
asm
Assembly
memory/oam_echo_ram_read/init.asm
AntonioND/gbc-hw-tests
631e60000c885154a8526df0b148847f9c34ce42
[ "MIT" ]
6
2018-07-21T12:11:21.000Z
2021-07-23T16:32:47.000Z
memory/oam_echo_ram_read/init.asm
PMArkive/gbc-hw-tests
631e60000c885154a8526df0b148847f9c34ce42
[ "MIT" ]
null
null
null
memory/oam_echo_ram_read/init.asm
PMArkive/gbc-hw-tests
631e60000c885154a8526df0b148847f9c34ce42
[ "MIT" ]
3
2016-04-26T07:45:34.000Z
2018-12-30T05:45:14.000Z
INCLUDE "hardware.inc" SECTION "PATTERNS",HOME PATTERN_SIZE EQU (4*4*4*4) PATTERN_1: REPT 4*4*4 DB $FF DB $F0 DB $0F DB $00 ENDR PATTERN_4: REPT 4*4 REPT 4 DB $FF ENDR REPT 4 DB $F0 ENDR REPT 4 DB $0F ENDR REPT 4 DB $00 ENDR ENDR PATTERN_16: REPT 4 REPT 16 DB $FF ENDR REPT 16 DB $F0 ENDR REPT 16 DB $0F ENDR REPT 16 DB $00 ENDR ENDR PATTERN_64: REPT 64 DB $FF ENDR REPT 64 DB $F0 ENDR REPT 64 DB $0F ENDR REPT 64 DB $00 ENDR SECTION "Helper Functions",HOME ;-------------------------------------------------------------------------- ;- wait_ly() b = ly to wait for - ;-------------------------------------------------------------------------- wait_ly:: ld c,rLY & $FF .no_same_ly: ld a,[$FF00+c] cp a,b jr nz,.no_same_ly ret ;-------------------------------------------------------------------------- ;- screen_off() - ;-------------------------------------------------------------------------- screen_off:: ld a,[rLCDC] and a,LCDCF_ON ret z ld b,$91 call wait_ly xor a,a ld [rLCDC],a ;Shutdown LCD ret ;-------------------------------------------------------------------------- ;- memset() d = value hl = start address bc = size - ;-------------------------------------------------------------------------- memset:: ld a,d ld [hl+],a dec bc ld a,b or a,c jr nz,memset ret ;-------------------------------------------------------------------------- ;- memcopy() bc = size hl = source address de = dest address - ;-------------------------------------------------------------------------- memcopy:: ld a,[hl+] ld [de],a inc de dec bc ld a,b or a,c jr nz,memcopy ret ;-------------------------------------------------------------------------- ;- CARTRIDGE HEADER - ;-------------------------------------------------------------------------- SECTION "Cartridge Header",HOME[$0100] nop nop jr Main NINTENDO_LOGO ; 0123456789ABC DB "ECHO RAM TEST" DW $0000 DB $C0 ;GBC flag DB 0,0,0 ;SuperGameboy DB $1B ;CARTTYPE (MBC5+RAM+BATTERY) DB 0 ;ROMSIZE DB 3 ;RAMSIZE (4*8KB) DB $01,$00 ;Destination (0 = Japan, 1 = Non Japan) | Manufacturer DB 0,0,0,0 ;Version | Complement check | Checksum ;-------------------------------------------------------------------------- ;- Main() - ;-------------------------------------------------------------------------- Main: di call screen_off ld a,$0A ld [$0000],a ld a,$00 ld [$4000],a ; bank 0 ;-------------------- ; pattern, sram destination address PERFORM_TEST : MACRO ld d,0 ld hl,_OAMRAM ld bc,$0100 call memset ld bc,PATTERN_SIZE ld hl,\1 ld de,_OAMRAM call memcopy ld bc,PATTERN_SIZE ld hl,_OAMRAM ld de,\2 call memcopy ENDM ;-------------------- PERFORM_TEST PATTERN_1, $A000 PERFORM_TEST PATTERN_4, $A100 PERFORM_TEST PATTERN_16, $A200 PERFORM_TEST PATTERN_64, $A300 ;-------------------- ld hl,$A400 ld [hl],$12 inc hl ld [hl],$34 inc hl ld [hl],$56 inc hl ld [hl],$78 ;-------------------- ld a,$00 ld [$0000],a .end: halt jr .end ;--------------------------------------------------------------------------
15.869767
75
0.383353
c55d0b1c110a4da879493d2db9a3b2edf9f9eae1
864
asm
Assembly
programs/oeis/141/A141996.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/141/A141996.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/141/A141996.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A141996: Primes congruent to 20 mod 29. ; 107,223,281,397,571,919,977,1093,1151,1499,1789,1847,2137,2311,2543,2659,2833,3181,3413,3529,3761,3877,4051,4283,4457,5153,5443,5501,5791,5849,6197,6661,6719,7589,7879,7937,8053,8111,8807,8923,9619,9677,9851,9967,10141,10663,10837,11069,11243,11939,12113,12577,12809,12983,13099,13331,13679,14143,14549,14723,14897,15013,15187,15361,15767,16057,16231,16811,16927,17159,17333,17449,17623,17681,17971,18493,18899,19073,19421,20117,20233,20407,20639,20929,21277,21683,21799,22031,22147,22669,22727,22901,23017,23539,23887,24061,24989,25163,25453,25801 mov $2,$0 add $2,2 pow $2,2 lpb $2 add $1,19 sub $2,1 mov $3,$1 seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0. sub $0,$3 add $1,10 mov $4,$0 max $4,0 cmp $4,$0 mul $2,$4 lpe div $1,2 sub $1,22 mul $1,2 add $1,35 mov $0,$1
36
550
0.730324
1c8d2ccff563498b58252e7a13486e712728b4df
197
asm
Assembly
libsrc/_DEVELOPMENT/adt/b_vector/c/sccz80/b_vector_max_size.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
libsrc/_DEVELOPMENT/adt/b_vector/c/sccz80/b_vector_max_size.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
libsrc/_DEVELOPMENT/adt/b_vector/c/sccz80/b_vector_max_size.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
; void *b_vector_max_size(b_vector_t *v) SECTION code_adt_b_vector PUBLIC b_vector_max_size defc b_vector_max_size = asm_b_vector_max_size INCLUDE "adt/b_vector/z80/asm_b_vector_max_size.asm"
17.909091
52
0.84264
17824ff704dd898a720a2b76bb6cdf5d0a633f7f
421
asm
Assembly
programs/oeis/006/A006257.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/006/A006257.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/006/A006257.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A006257: Josephus problem: a(2*n) = 2*a(n)-1, a(2*n+1) = 2*a(n)+1. ; 0,1,1,3,1,3,5,7,1,3,5,7,9,11,13,15,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,55,57,59,61,63,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,55,57,59,61,63,65,67,69,71 mov $2,$0 lpb $0 mul $0,2 sub $0,1 mov $1,$0 trn $0,$2 lpe mov $0,$1
35.083333
273
0.584323
3bdef338084b01d4228d8c2741319af93f8dd4b2
492
asm
Assembly
programs/oeis/335/A335807.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/335/A335807.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/335/A335807.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A335807: Number of vertices in the n-th simplex graph of the complete graph on three vertices (K_3). ; 3,8,21,54,140,365,954,2496,6533,17102,44772,117213,306866,803384,2103285,5506470,14416124,37741901,98809578,258686832,677250917,1773065918,4641946836,12152774589,31816376930,83296356200,218072691669,570921718806,1494692464748,3913155675437 mov $1,6 mov $3,1 lpb $0,1 sub $0,1 mov $2,2 add $3,$1 add $1,$3 mov $4,$3 lpe sub $4,$2 add $0,$4 mul $0,3 mov $1,$0 div $1,3 add $1,3
25.894737
241
0.735772
1fc6bf81690e77b80cebba625f5b5ddedb6482cc
628
asm
Assembly
header/004/TGROM.asm
freem/nes_corelib
a890aa3c436e931a765866265f24ccf3c432f71d
[ "0BSD" ]
16
2015-06-23T03:17:40.000Z
2021-10-05T23:40:28.000Z
nes_corelib/header/004/TGROM.asm
master-g/childhood
7cd2a6a13f7e862df6d239e78371df6222b30a53
[ "Apache-2.0" ]
null
null
null
nes_corelib/header/004/TGROM.asm
master-g/childhood
7cd2a6a13f7e862df6d239e78371df6222b30a53
[ "Apache-2.0" ]
3
2015-11-12T01:29:55.000Z
2020-07-06T05:15:06.000Z
; TGROM: (128,256,512)KB PRG-ROM + 8KB CHR-RAM ; http://bootgod.dyndns.org:7777/search.php?keywords=TGROM&kwtype=pcb ;------------------------------------------------------------------------------; ; number of 16K PRG banks ; Valid configurations: $08 (128K), $10 (256K), $20 (512K) PRG_BANKS = $08 ; TGROM mirroring is controlled by MMC3. ; %0000 = Horizontal ; %0001 = Vertical MIRRORING = %0001 ; Mapper 004 (MMC3 - TGROM) iNES header .byte "NES",$1A .byte PRG_BANKS ; 16K PRG banks .byte $00 ; CHR-RAM .byte $40|MIRRORING ; flags 6 .byte $00 ; flags 7 .byte $00 ; no PRG RAM .dsb 7, $00 ; clear the remaining bytes
29.904762
80
0.592357
5d3d6098e3c806bfcd4b37f8844be8fb3e4c1e83
14,804
asm
Assembly
CSE_316_8086_Heapsort/1505080_Heapsort_ONLINE.asm
ishtiaqniloy/BUET-CSE-316-8086
acab4e8a42247a8e28959a3e8f1c28dc18c2f441
[ "MIT" ]
null
null
null
CSE_316_8086_Heapsort/1505080_Heapsort_ONLINE.asm
ishtiaqniloy/BUET-CSE-316-8086
acab4e8a42247a8e28959a3e8f1c28dc18c2f441
[ "MIT" ]
null
null
null
CSE_316_8086_Heapsort/1505080_Heapsort_ONLINE.asm
ishtiaqniloy/BUET-CSE-316-8086
acab4e8a42247a8e28959a3e8f1c28dc18c2f441
[ "MIT" ]
null
null
null
TITLE HEAPSORT BY 1505080 .MODEL SMALL .STACK 100h .DATA STR1 DB 'Enter Numbers: $' STR2 DB 'Heap Numbers: $' STR3 DB 'Sorted Numbers: $' X DW 0 Y DW 0 SB DB 0 CNT DW 0 IDX DW 1 IDXH DW 1 IDXS DW 1 CURR DW 0 PAR DW 0 LC DW 0 RC DW 0 NXTIDX DW 0 R1 DW 0 R2 DW 0 INPUT_ARR DW 20 DUP (0) HEAP_ARR DW 20 DUP (0) OUTPUT_ARR DW 20 DUP (0) .CODE MAIN PROC MOV DX, @DATA MOV DS, DX ;INPUT (DONE) LEA DX, STR1 ;1st string MOV AH, 9 INT 21h ;START ARRAY INPUT MOV IDX, 1 LEA SI, INPUT_ARR ARRAY_INPUT: ;Start 1 INPUT MOV X, 0 MOV SB, 0 ;1 if negative INPUT_LOOP1: MOV AH,1 ;input INT 21h MOV BL, 'x' ;end of input CMP AL, BL JE END_ARRAY_INPUT MOV BL, 'X' ;end of input CMP AL, BL JE END_ARRAY_INPUT MOV BL, ' ' ;end of this number CMP AL, BL JE END_INPUT_LOOP1 MOV BL, '-' CMP AL, BL JNE NOT_NEG MOV SB, 1 JMP INPUT_LOOP1 NOT_NEG: SUB AL, '0' MOV CL, AL MOV CH, 0 MOV AX, 10 IMUL X ADD AX, CX MOV X, AX JMP INPUT_LOOP1 END_INPUT_LOOP1: MOV BL, 1 CMP BL, SB JNE NOT_NEG2 NEG X NOT_NEG2: ;END 1 INPUT MOV AX, 2 IMUL IDX MOV BX, AX MOV CX, X MOV SI[BX], CX INC IDX JMP ARRAY_INPUT END_ARRAY_INPUT: MOV BX, IDX MOV CNT, BX ;END OF INPUT MOV AH, 2 ;new line MOV DL, 0Dh INT 21h MOV DL, 0Ah INT 21h ;Start R1 INPUT MOV X, 0 MOV SB, 0 ;1 if negative INPUT_LOOPR1: MOV AH,1 ;input INT 21h MOV BL, ' ' ;end of this number CMP AL, BL JE END_INPUT_LOOPR1 MOV BL, '-' CMP AL, BL JNE NOT_NEGR1 MOV SB, 1 JMP INPUT_LOOPR1 NOT_NEGR1: SUB AL, '0' MOV CL, AL MOV CH, 0 MOV AX, 10 IMUL X ADD AX, CX MOV X, AX JMP INPUT_LOOPR1 END_INPUT_LOOPR1: MOV BL, 1 CMP BL, SB JNE NOT_NEGR11 NEG X NOT_NEGR11: ;END R1 INPUT MOV BX, X MOV R1, BX ;Start R2 INPUT MOV X, 0 MOV SB, 0 ;1 if negative INPUT_LOOPR2: MOV AH,1 ;input INT 21h MOV BL, ' ' ;end of this number CMP AL, BL JE END_INPUT_LOOPR2 MOV BL, '-' CMP AL, BL JNE NOT_NEGR2 MOV SB, 1 JMP INPUT_LOOPR2 NOT_NEGR2: SUB AL, '0' MOV CL, AL MOV CH, 0 MOV AX, 10 IMUL X ADD AX, CX MOV X, AX JMP INPUT_LOOPR2 END_INPUT_LOOPR2: MOV BL, 1 CMP BL, SB JNE NOT_NEGR22 NEG X NOT_NEGR22: ;END R2 INPUT MOV BX, X MOV R2, BX ;PROCESSING ;START MAKING HEAP (DONE) MOV CX, R1 MOV IDX, CX LEA SI, INPUT_ARR ;INPUT ARRAY INTO SI MOV IDXH, 1 LEA DI, HEAP_ARR ;HEAP INTO DI HEAP_LOOP: MOV BX, R2 INC BX CMP IDX, BX JGE END_HEAP_LOOP ;UPTO LAST INPUT MOV AX, 2 IMUL IDX MOV BX, AX MOV CX, SI[BX] MOV X, CX ;DATA INPUT[IDX] INTO X MOV AX, 2 IMUL IDXH MOV BX, AX MOV CX, X MOV DI[BX], CX ;DATA FROM X TO HEAP[IDXH] MOV CX, IDXH MOV CURR, CX BUHEAPIFY_LOOP: MOV BX, 1 CMP CURR, BX JLE END_BUHEAPIFY_LOOP ;ROOT MOV DX, 0 MOV AX, CURR MOV BX, 2 IDIV BX MOV PAR, AX ;PAR = CURR/2 MOV AX, 2 IMUL CURR MOV BX, AX MOV CX, DI[BX] MOV X, CX ;HEAP[CURR] INTO X MOV AX, 2 IMUL PAR MOV BX, AX MOV CX, DI[BX] MOV Y, CX ;HEAP[PAR] INTO Y MOV BX, Y CMP X, BX ;CMP HEAP[CURR], HEAP[PAR] JLE END_BUHEAPIFY_LOOP MOV BX, Y XCHG BX, X ;SWAP VALUES OF X AND Y MOV Y, BX MOV AX, 2 IMUL CURR MOV BX, AX MOV CX, X MOV DI[BX], CX ; X INTO HEAP[CURR] MOV AX, 2 IMUL PAR MOV BX, AX MOV CX, Y MOV DI[BX], CX ;Y INTO HEAP[PAR] MOV BX, PAR MOV CURR, BX ;PAR = CURR JMP BUHEAPIFY_LOOP END_BUHEAPIFY_LOOP: INC IDX INC IDXH JMP HEAP_LOOP END_HEAP_LOOP: ;DONE MAKING HEAP ;DISPLAY HEAP (DONE) MOV AH, 2 ;new line MOV DL, 0Dh INT 21h MOV DL, 0Ah INT 21h LEA DX, STR2 ;2nd string MOV AH, 9 INT 21h ;START ARRAY OUTPUT MOV IDX, 1 LEA SI, HEAP_ARR ;DESIRED ARRAY ARRAY_OUTPUT: MOV BX, CNT CMP IDX, BX JGE END_ARRAY_OUTPUT ;Start 1 OUTPUT MOV AX, 2 IMUL IDX MOV BX, AX MOV CX, SI[BX] MOV X, CX CMP X, 0 JGE NOT_NEG3 MOV AH, 2 ;display minus MOV DL, '-' INT 21h NEG X NOT_NEG3: CMP X, 0 JNE NOT_ZERO MOV AH, 2 ;display zero MOV DL, '0' INT 21h NOT_ZERO: MOV AX, '#' PUSH AX OUTPUT_LOOP1: CMP X, 0 JE END_OUTPUT_LOOP1 MOV BX, 10 MOV DX, 0 MOV AX, X IDIV BX PUSH DX MOV X, AX JMP OUTPUT_LOOP1 END_OUTPUT_LOOP1: OUTPUT_LOOP2: POP BX CMP BX, '#' JE END_OUTPUT_LOOP2 ADD BX, '0' MOV AH, 2 ;display digit MOV DL, BL INT 21h JMP OUTPUT_LOOP2 END_OUTPUT_LOOP2: ;END 1 OUTPUT INC IDX MOV AH, 2 ;display BLANK SPACE MOV DL, ' ' INT 21h JMP ARRAY_OUTPUT END_ARRAY_OUTPUT: ;END OF HEAP DISPLAY ;COPY UNCHANGED VALUES LEA SI, OUTPUT_ARR MOV IDX, 0 LEA DI, INPUT_ARR COPY_LOOP: INC IDX MOV AX, CNT MOV BX, R1 MOV CX, R2 CMP IDX, AX JGE END_COPY_LOOP CMP IDX, BX JL DO_COPY CMP IDX, CX JG DO_COPY JMP COPY_LOOP DO_COPY: MOV AX, 2 IMUL IDX MOV BX, AX MOV CX, DI[BX] ;INPUT[IDX] INTO X MOV X, CX MOV AX, 2 IMUL IDX MOV BX, AX MOV CX, X MOV SI[BX], CX ;X INTO SORTED[IDXS] JMP COPY_LOOP END_COPY_LOOP: ;DONE COPYING ;START EXTRACTING FROM HEAP MOV BX, R2 MOV AX, R1 SUB BX, AX ;R2-R1 INC BX ;R2-R1+1 MOV IDXH, BX LEA DI, HEAP_ARR ;HEAP INTO DI MOV AX, R1 MOV IDXS, AX LEA SI, OUTPUT_ARR ;SORT ARRAY INTO SI EXTRACT_LOOP1: MOV BX, R2 CMP IDXS, BX JG END_EXTRACT_LOOP1 ;UPTO LAST ITEM MOV BX, 2 MOV CX, DI[BX] ;HEAP[1] INTO X MOV X, CX MOV AX, 2 IMUL IDXS MOV BX, AX MOV CX, X MOV SI[BX], CX ;X INTO SORTED[IDXS] INC IDXS MOV AX, 2 IMUL IDXH MOV BX, AX MOV CX, DI[BX] ;HEAP[IDXH] INTO X MOV X, CX DEC IDXH MOV BX, 2 MOV CX, X MOV DI[BX], CX ;X INTO HEAP[1] ;START HEAPIFY MOV CURR, 1 HEAPIFY: MOV AX, 2 IMUL CURR MOV LC, AX CMP AX, IDXH JG END_HEAPIFY ;NO CHILD INC AX MOV RC, AX CMP AX, IDXH JG TAKE_LEFT_CHILD ;NO RIGHT CHILD MOV AX, 2 IMUL LC MOV BX, AX MOV CX, DI[BX] ;HEAP[LC] INTO X MOV X, CX MOV AX, 2 IMUL RC MOV BX, AX MOV CX, DI[BX] ;HEAP[RC] INTO Y MOV Y, CX CMP X, CX JG TAKE_LEFT_CHILD ;X>Y IE HEAP[LC] > HEAP[RC] MOV AX, RC MOV NXTIDX, AX ;TAKING RIGHT CHILD, VALUE IN Y JMP END_IF_CHILD TAKE_LEFT_CHILD: MOV AX, LC MOV NXTIDX, AX ;TAKING LEFT CHILD MOV AX, 2 IMUL LC MOV BX, AX MOV CX, DI[BX] ;HEAP[LC] INTO Y MOV Y, CX END_IF_CHILD: MOV AX, 2 IMUL CURR MOV BX, AX MOV CX, DI[BX] ;HEAP[CURR] INTO X MOV X, CX CMP CX, Y JGE END_HEAPIFY ;IF X>Y MOV AX, 2 IMUL CURR MOV BX, AX MOV CX, Y MOV DI[BX], CX ;Y INTO HEAP[CURR] MOV AX, 2 IMUL NXTIDX MOV BX, AX MOV CX, X MOV DI[BX], CX ;X INTO HEAP[NXTIDX] MOV CX, NXTIDX MOV CURR, CX JMP HEAPIFY END_HEAPIFY: JMP EXTRACT_LOOP1 END_EXTRACT_LOOP1: ;DISPLAY OUTPUT (DONE) MOV AH, 2 ;new line MOV DL, 0Dh INT 21h MOV DL, 0Ah INT 21h LEA DX, STR3 ;3rd string MOV AH, 9 INT 21h ;START ARRAY OUTPUT MOV IDX, 1 LEA SI, OUTPUT_ARR ;DESIRED ARRAY ARRAY_OUTPUT2: MOV BX, CNT CMP IDX, BX JGE END_ARRAY_OUTPUT2 ;Start 1 OUTPUT MOV AX, 2 IMUL IDX MOV BX, AX MOV CX, SI[BX] MOV X, CX CMP X, 0 JGE NOT_NEG4 MOV AH, 2 ;display minus MOV DL, '-' INT 21h NEG X NOT_NEG4: CMP X, 0 JNE NOT_ZERO2 MOV AH, 2 ;display zero MOV DL, '0' INT 21h NOT_ZERO2: MOV AX, '#' PUSH AX OUTPUT_LOOP3: CMP X, 0 JE END_OUTPUT_LOOP3 MOV BX, 10 MOV DX, 0 MOV AX, X IDIV BX PUSH DX MOV X, AX JMP OUTPUT_LOOP3 END_OUTPUT_LOOP3: OUTPUT_LOOP4: POP BX CMP BX, '#' JE END_OUTPUT_LOOP4 ADD BX, '0' MOV AH, 2 ;display digit MOV DL, BL INT 21h JMP OUTPUT_LOOP4 END_OUTPUT_LOOP4: ;END 1 OUTPUT INC IDX MOV AH, 2 ;display BLANK SPACE MOV DL, ' ' INT 21h JMP ARRAY_OUTPUT2 END_ARRAY_OUTPUT2: ;END OF OUTPUT DISPLAY MOV AH, 4Ch ;RETURN INT 21h MAIN ENDP END MAIN
17.094688
59
0.331802
f9c6ebc3e703faae556ab85668c68b258783b290
350
asm
Assembly
programs/oeis/107/A107044.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/107/A107044.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/107/A107044.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A107044: A symmetric factorial triangle, read by rows: T(n,k) = min(n,k)!. ; 1,1,1,1,2,1,1,2,2,1,1,2,6,2,1,1,2,6,6,2,1,1,2,6,24,6,2,1,1,2,6,24,24,6,2,1,1,2,6,24,120,24,6,2,1,1,2,6,24,120,120,24,6,2,1,1,2,6,24,120,720,120,24,6,2,1,1,2,6,24,120,720,720,120,24,6,2,1 cal $0,3983 ; Array read by antidiagonals with T(n,k) = min(n,k). fac $0 mov $1,$0
50
188
0.611429
b1dc3b10d8d39aa7a1dcb68b1eef777ab1763dc8
572
asm
Assembly
programs/oeis/026/A026567.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/026/A026567.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/026/A026567.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A026567: a(n) = Sum{T(i,j)}, 0<=j<=i, 0<=i<=2n, T given by A026552. ; 1,4,13,31,85,193,517,1165,3109,6997,18661,41989,111973,251941,671845,1511653,4031077,9069925,24186469,54419557,145118821,326517349,870712933,1959104101,5224277605,11754624613,31345665637,70527747685,188073993829,423166486117,1128443962981,2538998916709,6770663777893,15233993500261,40623982667365,91403961001573,243743896004197,548423766009445,1462463376025189,3290542596056677,8774780256151141 mov $2,$0 lpb $2 gcd $0,2 add $0,1 add $1,4 mul $1,$0 sub $2,1 lpe div $1,8 mul $1,3 add $1,1
38.133333
396
0.774476
8ec100af5f57469c0f25ba83991aaf7dd92b6032
9,210
asm
Assembly
src/tower/draw_walls.asm
hallorant/bitmit
58f337ecbafe04066e71bc54efa4640643bf5373
[ "Apache-2.0" ]
6
2020-08-16T03:23:37.000Z
2022-03-19T20:50:27.000Z
src/tower/draw_walls.asm
hallorant/bitmit
58f337ecbafe04066e71bc54efa4640643bf5373
[ "Apache-2.0" ]
1
2021-09-14T22:24:14.000Z
2021-09-15T01:48:48.000Z
src/tower/draw_walls.asm
hallorant/bitmit
58f337ecbafe04066e71bc54efa4640643bf5373
[ "Apache-2.0" ]
1
2021-09-09T22:50:31.000Z
2021-09-09T22:50:31.000Z
ifndef INCLUDE_DRAW_WALLS INCLUDE_DRAW_WALLS equ 1 ; _ _ _ ; | | | | | ; __| |_ __ __ ___ ____ ____ _| | |___ ; / _` | '__/ _` \ \ /\ / /\ \ /\ / / _` | | / __| ;| (_| | | | (_| |\ V V / \ V V / (_| | | \__ \ ; \__,_|_| \__,_| \_/\_/ \_/\_/ \__,_|_|_|___/ ; ______ ; |______| ; Draws vertical lines that act as walls for a 11-line ray caster. ; Two types of walls are supported: ; solid: | outline: · ; | | · ; | · ; Why two types? We want to allow drawing of running into X or Y walls in the ; raycaster in different styles -- this looks much better to the user. ; ; Walls may only take up to 11 vertical character positions on the screen. ; If displaying the top of the screen, then pass a character address on ; the 6th line of video memory (or back buffer representing the display). ; ; All of the code below is implementation details except: ; ; draw_solid_wall : draws a vertical line centered on the passed addr ; with the given half-height. ; draw_outline_wall : draws the top and bottom dot of a vertical line ; centered on the passed addr with the given half-height. ; Draws the center character position of a solid wall. The center ; character position, unlike all others, has only a one or two ; half-height. ; Entry: ; ix = addr of the center char position. ; iy = addr of the half-height of the desired line ; Exit: ; c = the remaining half-height of the desired line ; @private solid_center_wall_seg macro ?hh1,?hh2,?hh3 ld a,(iy) ; We'll hold the remaining half-height in c. ld c,a or a ; Check if the half-height is zero. jr nz,?hh1 ret ?hh1: dec c jr nz,?hh2 ld a,$8c ; r and l mid dots. ld (ix),a ret ?hh2: dec c jr nz,?hh3 ld a,$bb ; r and l top and bot dots, l mid. ld (ix),a ret ?hh3: ld a, $95 ; all l dots. ld (ix),a endm ; Draws the outline at the center character position of a black wall, ; if necessary. The center character position, unlike all others, has ; only a one or two half-height. ; Entry: ; ix = addr of the center char position. ; iy = addr of the half-height of the desired line ; Exit: ; c = the remaining half-height of the desired line ; @private outline_center_wall_seg macro ?hh1,?hh2,?hh3 ld a,(iy) ; We'll hold the remaining half-height in c. ld c,a or a ; Check if the half-height is zero. jr nz,?hh1 ret ?hh1: dec c jr nz,?hh2 ld a,$8c ; r and l mid dots. ld (ix),a ret ?hh2: dec c jr nz,?hh3 ld a,$b3 ; r and l top and bot dots. ld (ix),a ret ?hh3: nop endm ; Draws a segment of the solid wall above and below the center character ; position. ; Entry: ; ix = addr of the char position above the center. ; iy = addr of the char position below the center. ; Exit: ; c = the remaining half-height of the desired line ; @private solid_wall_seg macro ?hh2,?hh3,?hh4 dec c jr nz,?hh2 ld a,$b0 ; r and l bottom dots. ld (ix),a ld a,$83 ; r and l top dots. ld (iy),a ret ?hh2: dec c jr nz,?hh3 ld a,$9c ; r and l mid dots, l bottom. ld (ix),a ld a,$8d ; r and l mid 2 dots, l top. ld (iy),a ret ?hh3: dec c jr nz,?hh4 ld a,$97 ; r and l top dots, l mid & bot. ld (ix),a ld a,$b5 ; r and l bottom dots, l mid & top. ld (iy),a ret ?hh4: ld a, $95 ; all l dots. ld (ix),a ld (iy),a endm ; Draws the outline of a black wall above and below the center character ; position, if necessary. ; Entry: ; ix = addr of the char position above the center. ; iy = addr of the char position below the center. ; Exit: ; c = the remaining half-height of the desired line ; @private outline_wall_seg macro ?hh2,?hh3,?hh4 dec c jr nz,?hh2 ld a,$b0 ; r and l bottom dots. ld (ix),a ld a,$83 ; r and l top dots. ld (iy),a ret ?hh2: dec c jr nz,?hh3 ld a,$8c ; r and l mid dots. ld (ix),a ld a,$8c ; r and l mid dots. ld (iy),a ret ?hh3: dec c jr nz,?hh4 ld a,$83 ; r and l top dots. ld (ix),a ld a,$b0 ; r and l bottom dots. ld (iy),a ret ?hh4: nop endm ; Stepping up and down from the address passed the the ray drawing routine ; by a line ('buff_line_width' bytes) this routine updates the memory ; locations: char_above_addr defw 0 char_below_addr defw 0 ; Exit: ; ix = addr of the char position above the center. ; iy = addr of the char position below the center. ; @private next_char_pos: ld de,buff_line_width ld hl,(char_below_addr) add hl,de ld (char_below_addr),hl ld hl,(char_above_addr) sbc hl,de ld (char_above_addr),hl ld ix,(char_above_addr) ld iy,(char_below_addr) ret ; Implementation note: The below four sets of helpers make it possible ; to reduce macro expansion down to once for each of the four public ; calls. This greatly reduces the memory size of this module. ; Helpers for draw_solid_wall. ; @private solid_wall_seg_h: call next_char_pos solid_wall_seg ret check_done_solid macro xor a or c jr z,_draw_solid_wall endm ; Helpers for draw_outline_wall. ; @private outline_wall_seg_h: call next_char_pos outline_wall_seg ret check_done_outline macro xor a or c jr z,_draw_outline_wall endm ; Draw a solid vertical line with the middle postion at (ix). ; (iy) gives the half-height of the line (0,17). ; Enter: ; ix = addr of the center char position. ; iy = addr of the half-height of the desired line ; @public draw_solid_wall: solid_center_wall_seg ld (char_above_addr),ix ld (char_below_addr),ix ; We have five lines above and below the center line. call solid_wall_seg_h check_done_solid call solid_wall_seg_h check_done_solid call solid_wall_seg_h check_done_solid call solid_wall_seg_h check_done_solid call solid_wall_seg_h _draw_solid_wall: ret ; Draw the outline of a vertical line with the middle postion at (ix). ; (iy) gives the half-height of the line (0,17). ; Enter: ; ix = addr of the center char position. ; iy = addr of the half-height of the desired line ; @public draw_outline_wall: outline_center_wall_seg ld (char_above_addr),ix ld (char_below_addr),ix ; We have five lines above and below the center line. call outline_wall_seg_h check_done_outline call outline_wall_seg_h check_done_outline call outline_wall_seg_h check_done_outline call outline_wall_seg_h check_done_outline call outline_wall_seg_h check_done_outline _draw_outline_wall: ret wall_dots_hh_00 defs $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$ff,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 wall_dots_hh_01 defs $00,$00,$00,$00,$00,$00,$00,$00,$00,$ff,$00,$ff,$00,$00,$00,$00,$00,$00,$00,$00,$00 wall_dots_hh_02 defs $00,$00,$00,$00,$00,$00,$00,$00,$ff,$00,$00,$00,$ff,$00,$00,$00,$00,$00,$00,$00,$00 wall_dots_hh_03 defs $00,$00,$00,$00,$00,$00,$00,$ff,$00,$00,$00,$00,$00,$ff,$00,$00,$00,$00,$00,$00,$00 wall_dots_hh_04 defs $00,$00,$00,$00,$00,$00,$ff,$00,$00,$00,$00,$00,$00,$00,$ff,$00,$00,$00,$00,$00,$00 wall_dots_hh_05 defs $00,$00,$00,$00,$00,$ff,$00,$00,$00,$00,$00,$00,$00,$00,$00,$ff,$00,$00,$00,$00,$00 wall_dots_hh_06 defs $00,$00,$00,$00,$ff,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$ff,$00,$00,$00,$00 wall_dots_hh_07 defs $00,$00,$00,$ff,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$ff,$00,$00,$00 wall_dots_hh_08 defs $00,$00,$ff,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$ff,$00,$00 wall_dots_hh_09 defs $00,$ff,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$ff,$00 wall_dots_hh_10 defs $ff,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$ff wall_dots_hh_11 defs $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 wall_line_hh_00 defs $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$ff,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 wall_line_hh_01 defs $00,$00,$00,$00,$00,$00,$00,$00,$00,$ff,$ff,$ff,$00,$00,$00,$00,$00,$00,$00,$00,$00 wall_line_hh_02 defs $00,$00,$00,$00,$00,$00,$00,$00,$ff,$ff,$ff,$ff,$ff,$00,$00,$00,$00,$00,$00,$00,$00 wall_line_hh_03 defs $00,$00,$00,$00,$00,$00,$00,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$00,$00,$00,$00,$00,$00,$00 wall_line_hh_04 defs $00,$00,$00,$00,$00,$00,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$00,$00,$00,$00,$00,$00 wall_line_hh_05 defs $00,$00,$00,$00,$00,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$00,$00,$00,$00,$00 wall_line_hh_06 defs $00,$00,$00,$00,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$00,$00,$00,$00 wall_line_hh_07 defs $00,$00,$00,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$00,$00,$00 wall_line_hh_08 defs $00,$00,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$00,$00 wall_line_hh_09 defs $00,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$00 wall_line_hh_10 defs $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff wall_line_hh_11 defs $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff endif ; INCLUDE_DRAW_WALLS
33.249097
104
0.632682
f88c2c1a3c597477f7d8d980ca8fc5e788155530
22,500
asm
Assembly
zx81-tw2.0-src/tw-data.asm
monstergdc/ZX81-TurboWieszcz
db3f566e260af6c9d490cfd4f9e695fc9e19ccd1
[ "MIT" ]
1
2020-05-27T12:48:04.000Z
2020-05-27T12:48:04.000Z
zx81-tw2.0-src/tw-data.asm
monstergdc/TurboWieszcz-ZX81
db3f566e260af6c9d490cfd4f9e695fc9e19ccd1
[ "MIT" ]
null
null
null
zx81-tw2.0-src/tw-data.asm
monstergdc/TurboWieszcz-ZX81
db3f566e260af6c9d490cfd4f9e695fc9e19ccd1
[ "MIT" ]
null
null
null
;TURBO WIESZCZ++ 2.0 FOR ZX81 ;(C)2015, 2017 NONIEWICZ.COM ;CRE: 2015.09.24 (zx48) ;ZX81 v: 20171206 ;DATA TTLS dw TT1, TT2, TT3, TT4, TT5, TT6, TT7, TT8, TT9, TT10, TT11, TT12 dw TT13, TT14, TT15, TT16, TT17, TT18, TT19, TT20, TT21, TT22, TT23 dw TT24, TT25, TT26, TT27, TT28, TT29, TT30, TT31, TT32 D0_A dw D0_0,D0_1 dw D0_2,D0_3 dw D0_4,D0_5 dw D0_6,D0_7 dw D0_8,D0_9 dw D0_10,D0_11 dw D0_12,D0_13 dw D0_14,D0_15 dw D0_16,D0_17 dw D0_18,D0_19 dw D0_20,D0_21 dw D0_22 dw D0_23,D0_24 dw D0_25,D0_26 dw D0_27,D0_28 dw D0_29,D0_30 dw D0_31 D1_A dw D1_0,D1_1 dw D1_2,D1_3 dw D1_4,D1_5 dw D1_6,D1_7 dw D1_8,D1_9 dw D1_10,D1_11 dw D1_12,D1_13 dw D1_14,D1_15 dw D1_16,D1_17 dw D1_18,D1_19 dw D1_20,D1_21 dw D1_22 dw D1_23,D1_24 dw D1_25,D1_26 dw D1_27,D1_28 dw D1_29,D1_30 dw D1_31 D2_A dw D2_0,D2_1 dw D2_2,D2_3 dw D2_4,D2_5 dw D2_6,D2_7 dw D2_8,D2_9 dw D2_10,D2_11 dw D2_12,D2_13 dw D2_14,D2_15 dw D2_16,D2_17 dw D2_18,D2_19 dw D2_20,D2_21 dw D2_22 dw D2_23,D2_24 dw D2_25,D2_26 dw D2_27,D2_28 dw D2_29,D2_30 dw D2_31 D3_A dw D3_0,D3_1 dw D3_2,D3_3 dw D3_4,D3_5 dw D3_6,D3_7 dw D3_8,D3_9 dw D3_10,D3_11 dw D3_12,D3_13 dw D3_14,D3_15 dw D3_16,D3_17 dw D3_18,D3_19 dw D3_20,D3_21 dw D3_22 dw D3_23,D3_24 dw D3_25,D3_26 dw D3_27,D3_28 dw D3_29,D3_30 dw D3_31 ;titles TT1 db 63, 38, 44, 49, 38, 41, 38 db 255 TT2 db 57, 52, 0, 47, 58, 63, 0, 48, 52, 51, 46, 42, 40 db 255 TT3 db 56, 60, 46, 38, 57, 0, 44, 46, 51, 46, 42 db 255 TT4 db 63, 0, 60, 46, 63, 62, 57, 38, 0, 60, 0, 53, 46, 42, 48, 49, 42 db 255 TT5 db 48, 38, 57, 38, 48, 49, 46, 63, 50 db 255 TT6 db 41, 63, 46, 42, 51, 0, 63, 0, 63, 62, 40, 46, 38, 27, 27, 27 db 255 TT7 db 50, 38, 56, 38, 48, 55, 38 db 255 TT8 db 48, 38, 57, 38, 56, 57, 55, 52, 43, 38 db 255 TT9 db 60, 56, 63, 62, 56, 40, 62, 0, 63, 44, 46, 51, 46, 42, 50, 62, 27, 27, 27 db 255 TT10 db 56, 53, 52, 48, 52, 47 db 255 TT11 db 48, 52, 51, 46, 42, 40 db 255 TT12 db 48, 52, 51, 46, 42, 40, 0, 49, 58, 41, 63, 48, 52, 56, 40, 46 db 255 TT13 db 57, 42, 49, 42, 43, 52, 51, 0, 41, 52, 0, 39, 52, 44, 38 db 255 TT14 db 60, 46, 42, 40, 63, 51, 42, 0, 40, 46, 42, 50, 51, 52, 56, 40, 46 db 255 TT15 db 50, 55, 52, 48 db 255 TT16 db 50, 55, 52, 48, 0, 60, 0, 56, 55, 52, 41, 48, 58, 0, 41, 51, 46, 38 db 255 TT17 db 40, 46, 42, 50, 51, 52, 56, 40 db 255 TT18 db 53, 46, 52, 55, 58, 51, 42, 50, 0, 60, 0, 49, 42, 39 db 255 TT19 db 50, 38, 55, 56, 63, 0, 57, 55, 52, 49, 46 db 255 TT20 db 56, 63, 62, 41, 42, 55, 56, 57, 60, 38, 0, 63, 49, 42, 44, 52 db 255 TT21 db 52, 48, 55, 52, 53, 51, 52, 56, 40, 46, 0, 56, 60, 46, 38, 57, 38 db 255 TT22 db 58, 50, 55, 63, 42, 40, 0, 53, 52, 0, 55, 38, 63, 0, 52, 56, 57, 38, 57, 51, 46 db 255 TT23 db 53, 52, 57, 42, 53, 46, 42, 51, 46, 42 db 255 TT24 db 39, 52, 49, 0, 50, 52, 44, 63, 58 db 255 TT25 db 60, 46, 42, 40, 63, 51, 42, 0, 60, 62, 50, 46, 52, 57, 62 db 255 TT26 db 63, 38, 57, 55, 58, 57, 42, 0, 41, 58, 56, 63, 42 db 255 TT27 db 58, 40, 46, 42, 48, 38, 47 db 255 TT28 db 38, 53, 52, 48, 38, 49, 46, 53, 56, 38 db 255 TT29 db 63, 49, 58, 41, 63, 42, 51, 46, 42, 0, 53, 55, 62, 56, 48, 38 db 255 TT30 db 50, 38, 48, 38, 39, 55, 38 db 255 TT31 db 63, 38, 44, 49, 38, 41, 38, 0, 56, 60, 46, 38, 57, 38 db 255 TT32 db 56, 50, 46, 42, 55, 40 db 255 ;verses D0_0 db 38, 0, 51, 38, 0, 57, 42, 0, 63, 39, 55, 52, 41, 51, 46, 42, 0, 51, 46, 42, 0, 39, 42, 41, 63, 46, 42, 0, 48, 38, 55, 62 db 255 D0_1 db 52, 53, 58, 56, 57, 52, 56, 63, 38, 49, 62, 0, 39, 38, 44, 51, 38, 26, 0, 50, 52, 40, 63, 38, 55, 62 db 255 D0_2 db 51, 38, 0, 51, 46, 40, 0, 56, 46, 42, 0, 50, 52, 41, 49, 62, 0, 63, 41, 38, 41, 63, 38, 0, 51, 46, 0, 40, 63, 38, 55, 62 db 255 D0_3 db 63, 0, 48, 55, 60, 46, 0, 50, 52, 55, 41, 52, 60, 38, 51, 62, 40, 45, 0, 56, 38, 40, 63, 38, 0, 53, 58, 40, 45, 38, 55, 62 db 255 D0_4 db 57, 52, 0, 51, 46, 42, 57, 52, 53, 42, 55, 63, 42, 26, 0, 60, 42, 63, 42, 26, 0, 48, 38, 49, 50, 38, 55, 62 db 255 D0_5 db 53, 55, 52, 63, 51, 52, 0, 51, 46, 42, 56, 63, 40, 63, 42, 56, 51, 46, 0, 56, 62, 53, 46, 38, 0, 57, 38, 49, 38, 55, 62 db 255 D0_6 db 63, 38, 0, 40, 52, 0, 51, 38, 50, 0, 63, 51, 52, 56, 46, 40, 0, 57, 38, 48, 46, 42, 0, 40, 46, 42, 63, 38, 55, 62 db 255 D0_7 db 63, 49, 52, 60, 55, 52, 44, 52, 0, 46, 56, 48, 55, 63, 38, 0, 48, 52, 39, 55, 0, 52, 48, 58, 49, 38, 55, 62 db 255 D0_8 db 53, 55, 52, 63, 51, 52, 0, 56, 60, 42, 0, 50, 52, 41, 49, 62, 0, 60, 63, 51, 52, 56, 46, 0, 60, 46, 48, 38, 55, 62 db 255 D0_9 db 53, 58, 56, 57, 52, 56, 63, 38, 0, 56, 51, 62, 0, 57, 60, 52, 47, 42, 0, 57, 42, 0, 51, 52, 40, 51, 42, 0, 50, 38, 55, 62 db 255 D0_10 db 53, 55, 52, 63, 51, 52, 0, 51, 46, 42, 56, 63, 40, 63, 42, 56, 51, 46, 48, 0, 56, 62, 53, 46, 42, 0, 57, 38, 49, 38, 55, 62 db 255 D0_11 db 53, 55, 63, 42, 41, 63, 46, 60, 51, 46, 42, 0, 57, 48, 38, 51, 62, 0, 63, 62, 40, 46, 38, 0, 49, 52, 44, 38, 55, 62, 57, 50 db 255 D0_12 db 47, 58, 63, 0, 56, 57, 55, 38, 40, 45, 0, 60, 62, 53, 58, 56, 63, 40, 63, 38, 0, 56, 60, 52, 47, 42, 0, 52, 44, 38, 55, 62 db 255 D0_13 db 46, 0, 52, 57, 52, 0, 44, 46, 51, 46, 42, 56, 63, 0, 60, 0, 53, 38, 56, 63, 40, 63, 62, 0, 53, 52, 40, 63, 60, 38, 55, 62 db 255 D0_14 db 60, 39, 46, 47, 38, 47, 38, 0, 53, 38, 49, 42, 0, 63, 49, 52, 57, 42, 0, 48, 38, 43, 38, 55, 62 db 255 D0_15 db 63, 62, 40, 46, 42, 0, 52, 41, 48, 55, 62, 60, 38, 0, 56, 60, 52, 47, 42, 0, 53, 55, 63, 62, 60, 38, 55, 62 db 255 D0_16 db 51, 38, 0, 41, 51, 46, 42, 0, 53, 52, 51, 58, 55, 42, 47, 26, 0, 53, 58, 56, 57, 42, 47, 0, 53, 46, 42, 40, 63, 38, 55, 62 db 255 D0_17 db 38, 53, 52, 48, 38, 49, 46, 53, 56, 62, 0, 51, 38, 41, 42, 56, 63, 49, 62, 0, 40, 63, 38, 55, 62 db 255 D0_18 db 58, 53, 38, 41, 49, 62, 0, 38, 51, 46, 52, 49, 0, 60, 56, 53, 52, 50, 46, 51, 38, 0, 40, 45, 60, 38, 49, 42 db 255 D0_19 db 63, 62, 40, 46, 42, 0, 58, 48, 55, 62, 60, 38, 0, 56, 60, 52, 47, 42, 0, 53, 55, 63, 62, 60, 38, 55, 62 db 255 D0_20 db 41, 63, 46, 60, 51, 62, 40, 45, 0, 52, 60, 38, 41, 52, 60, 0, 60, 63, 49, 38, 57, 58, 47, 38, 0, 40, 45, 50, 38, 55, 62 db 255 D0_21 db 39, 52, 50, 39, 52, 60, 40, 42, 0, 39, 46, 52, 55, 38, 0, 51, 38, 56, 63, 42, 0, 51, 38, 50, 46, 38, 55, 62 db 255 D0_22 db 51, 46, 42, 0, 41, 38, 0, 56, 46, 42, 0, 60, 62, 55, 60, 38, 40, 0, 40, 63, 38, 55, 57, 52, 50, 0, 57, 52, 60, 38, 55, 58 db 255 D0_23 db 53, 55, 52, 63, 51, 52, 0, 43, 55, 38, 47, 42, 55, 63, 62, 0, 56, 62, 53, 46, 38, 0, 57, 38, 49, 38, 55, 62 db 255 D0_24 db 53, 52, 0, 40, 52, 0, 51, 38, 50, 0, 56, 38, 40, 63, 62, 40, 0, 53, 52, 41, 49, 42, 0, 39, 55, 52, 60, 38, 55, 62 db 255 D0_25 db 41, 46, 49, 42, 55, 0, 47, 58, 63, 0, 51, 46, 42, 0, 41, 52, 56, 57, 38, 55, 40, 63, 62, 0, 57, 52, 60, 38, 55, 58 db 255 D0_26 db 56, 50, 58, 57, 51, 52, 0, 53, 38, 57, 55, 63, 62, 56, 63, 0, 51, 38, 0, 53, 58, 56, 57, 42, 0, 39, 38, 63, 38, 55, 62 db 255 D0_27 db 49, 52, 48, 52, 50, 52, 57, 62, 60, 38, 0, 51, 46, 42, 0, 50, 38, 0, 47, 58, 63, 0, 53, 38, 55, 62 db 255 D0_28 db 44, 41, 62, 0, 51, 46, 42, 0, 48, 38, 63, 41, 42, 44, 52, 0, 56, 57, 38, 40, 0, 51, 38, 0, 39, 55, 52, 60, 38, 55, 62 db 255 D0_29 db 53, 52, 63, 38, 55, 49, 0, 45, 46, 49, 38, 55, 62, 0, 56, 60, 42, 0, 52, 48, 58, 49, 38, 55, 62 db 255 D0_30 db 56, 53, 52, 60, 46, 49, 62, 0, 51, 38, 56, 0, 57, 55, 58, 47, 38, 40, 42, 0, 52, 53, 38, 55, 62 db 255 D0_31 db 57, 52, 0, 51, 46, 42, 0, 47, 42, 56, 57, 0, 40, 38, 49, 48, 38, 0, 38, 51, 46, 0, 49, 52, 44, 38, 55, 62, 57, 50 db 255 D1_0 db 47, 58, 63, 0, 51, 38, 0, 38, 55, 42, 51, 42, 0, 48, 55, 42, 60, 0, 57, 55, 62, 56, 48, 38 db 255 D1_1 db 47, 58, 63, 0, 53, 46, 38, 51, 38, 0, 40, 46, 42, 48, 51, 46, 42, 0, 46, 50, 0, 63, 0, 53, 62, 56, 48, 38 db 255 D1_2 db 47, 58, 63, 0, 45, 42, 51, 0, 60, 0, 52, 41, 41, 38, 49, 46, 0, 44, 41, 63, 46, 42, 56, 0, 39, 49, 62, 56, 48, 38 db 255 D1_3 db 56, 50, 46, 42, 55, 40, 0, 60, 0, 48, 38, 40, 46, 42, 0, 40, 63, 38, 46, 0, 56, 46, 42, 0, 39, 49, 46, 56, 48, 38 db 255 D1_4 db 51, 46, 42, 56, 38, 50, 52, 60, 46, 57, 42, 0, 41, 58, 40, 45, 52, 60, 0, 46, 44, 55, 63, 62, 56, 48, 38 db 255 D1_5 db 47, 58, 63, 0, 63, 38, 40, 46, 56, 48, 38, 47, 38, 40, 0, 49, 38, 53, 46, 56, 48, 38 db 255 D1_6 db 63, 38, 50, 46, 38, 56, 57, 0, 53, 52, 63, 52, 56, 57, 38, 40, 0, 60, 0, 63, 38, 50, 40, 63, 62, 56, 48, 38, 40, 45 db 255 D1_7 db 55, 63, 42, 48, 38, 0, 60, 62, 49, 42, 60, 38, 0, 63, 0, 49, 52, 63, 62, 56, 48, 38 db 255 D1_8 db 51, 46, 42, 56, 63, 40, 63, 42, 56, 40, 0, 60, 62, 49, 38, 49, 38, 0, 56, 46, 42, 0, 50, 46, 56, 48, 38 db 255 D1_9 db 47, 58, 63, 0, 63, 38, 40, 46, 56, 48, 38, 47, 38, 40, 0, 63, 42, 39, 46, 56, 48, 38 db 255 D1_10 db 52, 57, 60, 38, 55, 57, 38, 0, 51, 46, 42, 56, 63, 40, 63, 42, 56, 40, 0, 60, 38, 49, 46, 63, 48, 38 db 255 D1_11 db 51, 46, 40, 63, 62, 50, 0, 51, 38, 0, 55, 63, 62, 50, 56, 48, 46, 40, 45, 0, 39, 52, 46, 56, 48, 38, 40, 45 db 255 D1_12 db 40, 63, 38, 55, 57, 0, 60, 63, 51, 46, 42, 40, 38, 0, 56, 60, 42, 0, 53, 38, 49, 42, 51, 46, 56, 48, 38 db 255 D1_13 db 38, 0, 60, 0, 50, 55, 52, 48, 58, 0, 56, 60, 46, 42, 40, 38, 0, 63, 42, 39, 46, 56, 48, 38 db 255 D1_14 db 63, 42, 60, 56, 63, 38, 41, 0, 41, 52, 40, 45, 52, 41, 63, 38, 0, 60, 62, 63, 60, 46, 56, 48, 38 db 255 D1_15 db 56, 60, 46, 42, 57, 62, 40, 45, 0, 44, 49, 52, 41, 0, 60, 46, 38, 55, 62, 0, 53, 55, 63, 62, 40, 46, 56, 48, 38 db 255 D1_16 db 53, 52, 51, 58, 55, 52, 0, 53, 38, 57, 55, 63, 62, 0, 63, 0, 46, 40, 45, 0, 53, 62, 56, 48, 38 db 255 D1_17 db 50, 44, 49, 38, 0, 56, 57, 52, 46, 0, 51, 38, 0, 58, 55, 52, 40, 63, 62, 56, 48, 38, 40, 45 db 255 D1_18 db 48, 52, 56, 40, 46, 0, 53, 52, 44, 55, 63, 42, 39, 46, 38, 0, 58, 60, 55, 46, 56, 48, 38 db 255 D1_19 db 44, 49, 52, 41, 0, 60, 46, 38, 55, 62, 0, 57, 38, 48, 0, 51, 38, 56, 0, 53, 55, 63, 62, 40, 46, 56, 48, 38 db 255 D1_20 db 55, 58, 51, 42, 49, 62, 0, 56, 48, 38, 49, 51, 42, 0, 63, 60, 38, 49, 46, 56, 48, 38 db 255 D1_21 db 40, 63, 38, 55, 57, 0, 55, 52, 63, 53, 38, 49, 38, 0, 53, 38, 49, 42, 51, 46, 56, 48, 38 db 255 D1_22 db 47, 58, 63, 0, 60, 0, 50, 55, 52, 48, 58, 0, 56, 60, 46, 42, 40, 38, 0, 63, 42, 39, 46, 56, 48, 38 db 255 D1_23 db 63, 51, 52, 60, 0, 53, 58, 56, 57, 38, 0, 63, 42, 39, 55, 38, 48, 38, 0, 50, 46, 56, 48, 38 db 255 D1_24 db 41, 46, 38, 39, 42, 49, 56, 48, 46, 42, 0, 57, 52, 0, 56, 38, 0, 46, 44, 55, 63, 62, 56, 48, 38 db 255 D1_25 db 51, 46, 42, 0, 53, 52, 60, 46, 42, 41, 63, 0, 41, 46, 38, 39, 49, 58, 0, 51, 38, 63, 60, 46, 56, 48, 38 db 255 D1_26 db 51, 38, 47, 44, 49, 52, 56, 51, 46, 42, 47, 0, 56, 49, 62, 40, 45, 38, 40, 0, 60, 62, 63, 60, 46, 56, 48, 38 db 255 D1_27 db 41, 46, 38, 39, 42, 49, 56, 48, 46, 42, 0, 50, 38, 47, 38, 0, 51, 38, 63, 60, 46, 56, 48, 38 db 255 D1_28 db 57, 38, 50, 0, 58, 40, 46, 42, 48, 38, 47, 38, 0, 49, 58, 41, 63, 46, 56, 48, 38 db 255 D1_29 db 57, 38, 48, 0, 55, 63, 42, 40, 63, 42, 0, 56, 57, 38, 55, 38, 0, 45, 46, 53, 46, 56, 48, 38 db 255 D1_30 db 44, 41, 63, 46, 42, 0, 41, 38, 60, 51, 42, 0, 49, 58, 41, 63, 46, 0, 56, 46, 42, 41, 49, 46, 56, 48, 38 db 255 D1_31 db 51, 38, 47, 44, 49, 52, 56, 51, 46, 42, 47, 0, 53, 46, 56, 63, 40, 63, 62, 0, 45, 46, 53, 46, 56, 48, 38 db 255 D2_0 db 55, 60, 38, 0, 53, 38, 63, 58, 55, 38, 50, 46, 0, 56, 60, 52, 47, 42, 0, 52, 43, 46, 38, 55, 62 db 255 D2_1 db 51, 46, 40, 0, 51, 46, 42, 0, 53, 52, 50, 52, 63, 42, 0, 57, 58, 0, 41, 55, 58, 46, 41, 0, 56, 57, 38, 55, 62 db 255 D2_2 db 57, 52, 0, 51, 52, 40, 51, 42, 0, 63, 47, 38, 60, 62, 0, 46, 0, 56, 42, 51, 51, 42, 0, 50, 38, 55, 62 db 255 D2_3 db 51, 46, 42, 44, 55, 52, 63, 51, 42, 0, 53, 55, 63, 62, 0, 51, 46, 40, 45, 0, 51, 38, 60, 42, 57, 0, 38, 57, 38, 55, 46 db 255 D2_4 db 53, 52, 41, 0, 60, 52, 41, 63, 38, 0, 48, 56, 46, 42, 63, 51, 42, 47, 0, 41, 46, 38, 39, 49, 46, 40, 0, 38, 63, 38, 55, 62 db 255 D2_5 db 63, 0, 41, 38, 49, 38, 0, 56, 57, 55, 38, 56, 63, 49, 46, 60, 42, 0, 57, 55, 38, 39, 46, 38, 0, 43, 38, 51, 43, 38, 55, 62 db 255 D2_6 db 57, 38, 48, 46, 42, 0, 56, 38, 0, 52, 57, 52, 0, 53, 46, 42, 48, 49, 38, 0, 39, 42, 63, 50, 46, 38, 55, 62 db 255 D2_7 db 63, 38, 56, 0, 41, 52, 52, 48, 52, 49, 38, 0, 49, 58, 51, 62, 26, 0, 53, 52, 63, 38, 55, 62 db 255 D2_8 db 38, 0, 57, 42, 55, 38, 63, 0, 51, 38, 44, 49, 42, 0, 47, 42, 56, 57, 42, 56, 0, 47, 58, 63, 0, 56, 57, 38, 55, 62 db 255 D2_9 db 57, 58, 0, 51, 46, 42, 0, 53, 52, 50, 52, 63, 42, 0, 47, 58, 63, 0, 56, 46, 49, 38, 0, 60, 46, 38, 55, 62 db 255 D2_10 db 40, 58, 41, 63, 42, 0, 51, 46, 42, 56, 63, 40, 63, 42, 56, 40, 46, 42, 0, 50, 52, 47, 42, 0, 51, 42, 48, 57, 38, 55, 62 db 255 D2_11 db 60, 56, 63, 62, 56, 57, 48, 52, 0, 63, 38, 49, 42, 60, 38, 0, 60, 55, 63, 38, 40, 62, 0, 49, 46, 53, 38, 55, 62, 57 db 255 D2_12 db 63, 38, 39, 52, 47, 40, 63, 42, 0, 56, 38, 0, 46, 40, 45, 0, 51, 46, 42, 40, 51, 42, 0, 63, 38, 50, 46, 38, 55, 62 db 255 D2_13 db 63, 38, 57, 55, 58, 57, 42, 0, 41, 58, 56, 63, 42, 0, 49, 38, 40, 63, 38, 0, 56, 46, 42, 0, 60, 0, 53, 38, 55, 62 db 255 D2_14 db 56, 60, 46, 38, 57, 0, 53, 52, 48, 38, 63, 58, 47, 42, 0, 56, 60, 52, 47, 42, 0, 60, 62, 50, 46, 38, 55, 62 db 255 D2_15 db 57, 58, 0, 51, 46, 42, 0, 53, 52, 50, 52, 63, 42, 0, 42, 49, 42, 48, 57, 55, 62, 48, 0, 56, 57, 38, 55, 62 db 255 D2_16 db 39, 55, 38, 48, 0, 58, 40, 63, 58, 40, 26, 0, 40, 45, 42, 40, 46, 0, 38, 0, 57, 38, 48, 63, 42, 0, 60, 46, 38, 55, 62 db 255 D2_17 db 53, 52, 50, 51, 46, 47, 26, 0, 38, 0, 50, 52, 60, 46, 49, 0, 50, 46, 40, 48, 46, 42, 60, 46, 40, 63, 0, 56, 57, 38, 55, 62 db 255 D2_18 db 56, 53, 38, 49, 52, 51, 62, 40, 45, 0, 49, 38, 56, 52, 60, 0, 56, 57, 55, 38, 56, 63, 38, 0, 45, 42, 48, 57, 38, 55, 62 db 255 D2_19 db 50, 52, 55, 41, 42, 55, 40, 62, 0, 49, 46, 40, 63, 38, 0, 56, 60, 52, 47, 42, 0, 52, 43, 46, 38, 55, 62 db 255 D2_20 db 48, 56, 46, 38, 41, 63, 0, 53, 52, 63, 52, 56, 57, 38, 47, 42, 0, 51, 38, 44, 49, 42, 0, 39, 42, 63, 0, 60, 46, 38, 55, 62 db 255 D2_21 db 53, 38, 53, 46, 42, 63, 0, 63, 38, 40, 63, 62, 51, 38, 0, 52, 41, 53, 55, 38, 60, 46, 38, 40, 0, 40, 63, 38, 55, 62 db 255 D2_22 db 57, 58, 0, 51, 46, 42, 0, 53, 52, 50, 52, 63, 42, 0, 53, 38, 40, 46, 52, 55, 42, 48, 26, 0, 56, 57, 38, 55, 62 db 255 D2_23 db 58, 53, 38, 41, 38, 0, 52, 57, 52, 0, 41, 38, 39, 0, 57, 42, 51, 0, 53, 55, 38, 56, 57, 38, 55, 62 db 255 D2_24 db 46, 0, 58, 41, 42, 55, 63, 38, 47, 38, 0, 63, 0, 56, 46, 49, 38, 0, 51, 46, 38, 44, 38, 55, 62 db 255 D2_25 db 39, 62, 56, 57, 55, 52, 0, 56, 50, 46, 44, 38, 47, 38, 0, 51, 38, 60, 42, 57, 0, 51, 46, 42, 63, 41, 38, 55, 62 db 255 D2_26 db 47, 58, 63, 0, 51, 46, 42, 55, 58, 40, 45, 52, 50, 42, 0, 46, 40, 45, 0, 38, 60, 38, 57, 38, 55, 62 db 255 D2_27 db 46, 0, 39, 42, 63, 0, 60, 38, 55, 57, 52, 56, 40, 46, 0, 56, 38, 0, 47, 58, 63, 0, 41, 52, 49, 38, 55, 62 db 255 D2_28 db 44, 41, 63, 46, 42, 0, 56, 46, 42, 0, 53, 52, 41, 63, 46, 38, 49, 62, 0, 57, 42, 0, 51, 42, 51, 58, 43, 38, 55, 62 db 255 D2_29 db 57, 38, 48, 0, 51, 38, 56, 0, 63, 38, 39, 46, 47, 38, 0, 44, 55, 52, 63, 51, 42, 0, 53, 58, 49, 56, 38, 55, 62 db 255 D2_30 db 53, 52, 60, 52, 41, 63, 0, 63, 38, 49, 42, 60, 38, 0, 60, 46, 42, 49, 48, 46, 42, 0, 52, 39, 56, 63, 38, 55, 62 db 255 D2_31 db 38, 63, 0, 55, 52, 63, 53, 38, 41, 38, 47, 38, 0, 56, 46, 42, 0, 46, 0, 43, 46, 49, 38, 55, 62 db 255 D3_0 db 60, 51, 42, 57, 0, 51, 38, 0, 51, 38, 56, 0, 57, 42, 63, 0, 53, 55, 63, 62, 47, 41, 63, 46, 42, 0, 48, 55, 62, 56, 48, 38 db 255 D3_1 db 63, 51, 46, 48, 38, 41, 0, 63, 38, 41, 51, 42, 44, 52, 0, 56, 40, 45, 55, 52, 51, 46, 56, 48, 38 db 255 D3_2 db 53, 52, 60, 46, 42, 57, 55, 63, 42, 0, 57, 51, 46, 42, 0, 56, 60, 46, 56, 57, 0, 39, 46, 40, 63, 62, 56, 48, 38 db 255 D3_3 db 55, 52, 41, 42, 50, 0, 63, 0, 40, 63, 38, 55, 40, 46, 42, 44, 52, 0, 58, 55, 60, 46, 56, 48, 38 db 255 D3_4 db 46, 0, 56, 60, 38, 41, 0, 51, 46, 42, 63, 51, 52, 56, 51, 62, 0, 56, 46, 42, 0, 60, 40, 46, 56, 48, 38 db 255 D3_5 db 45, 58, 48, 26, 0, 47, 38, 48, 0, 63, 0, 60, 46, 42, 49, 48, 46, 42, 44, 52, 0, 49, 52, 57, 51, 46, 56, 48, 38 db 255 D3_6 db 63, 49, 52, 60, 55, 52, 44, 52, 0, 39, 55, 63, 50, 46, 38, 0, 46, 40, 45, 0, 51, 38, 63, 60, 46, 56, 48, 38 db 255 D3_7 db 60, 0, 48, 38, 40, 46, 42, 0, 51, 46, 42, 56, 50, 46, 38, 49, 52, 0, 48, 57, 52, 56, 0, 53, 46, 56, 48, 38 db 255 D3_8 db 48, 57, 52, 56, 0, 52, 39, 52, 48, 0, 50, 52, 55, 41, 58, 47, 42, 0, 49, 46, 56, 48, 38 db 255 D3_9 db 48, 55, 60, 46, 38, 0, 52, 40, 46, 42, 48, 38, 47, 38, 0, 63, 42, 39, 46, 56, 48, 38 db 255 D3_10 db 60, 52, 48, 52, 49, 52, 0, 41, 63, 46, 48, 46, 42, 0, 53, 46, 38, 55, 63, 62, 56, 48, 38 db 255 D3_11 db 46, 0, 63, 38, 41, 63, 38, 0, 40, 63, 38, 46, 0, 56, 46, 42, 0, 51, 46, 56, 48, 38 db 255 D3_12 db 41, 46, 38, 39, 42, 49, 0, 40, 46, 42, 0, 41, 63, 46, 56, 46, 38, 47, 0, 60, 62, 63, 62, 56, 48, 38 db 255 D3_13 db 53, 49, 52, 51, 38, 0, 63, 38, 44, 49, 38, 41, 62, 0, 52, 44, 51, 46, 56, 48, 38 db 255 D3_14 db 44, 60, 38, 49, 57, 0, 51, 46, 42, 40, 45, 0, 56, 46, 42, 0, 44, 60, 38, 49, 57, 42, 50, 0, 52, 41, 40, 46, 56, 48, 38 db 255 D3_15 db 56, 57, 52, 46, 56, 63, 0, 51, 38, 0, 56, 48, 55, 38, 47, 58, 0, 58, 55, 60, 46, 56, 48, 38 db 255 D3_16 db 57, 38, 50, 0, 56, 63, 38, 57, 38, 51, 0, 40, 63, 38, 55, 57, 38, 0, 60, 62, 46, 56, 48, 38 db 255 D3_17 db 58, 40, 46, 42, 48, 38, 47, 26, 0, 53, 55, 63, 62, 56, 63, 49, 52, 56, 40, 0, 47, 42, 56, 57, 0, 50, 44, 49, 46, 56, 57, 38 db 255 D3_18 db 51, 38, 41, 63, 46, 42, 46, 0, 63, 49, 58, 41, 63, 42, 51, 46, 42, 0, 53, 55, 62, 56, 48, 38 db 255 D3_19 db 60, 62, 41, 63, 46, 52, 39, 46, 38, 0, 52, 40, 63, 62, 0, 53, 57, 38, 56, 63, 62, 56, 48, 38 db 255 D3_20 db 53, 38, 41, 38, 47, 38, 0, 49, 39, 62, 0, 51, 38, 0, 48, 49, 42, 53, 46, 56, 48, 52 db 255 D3_21 db 56, 50, 46, 42, 55, 40, 0, 63, 39, 46, 42, 55, 38, 0, 63, 51, 46, 60, 52, 0, 60, 0, 48, 52, 49, 62, 56, 48, 38, 40, 45 db 255 D3_22 db 40, 52, 56, 0, 63, 51, 52, 60, 58, 0, 63, 44, 55, 63, 62, 57, 38, 0, 60, 0, 49, 52, 63, 62, 56, 48, 38, 40, 45 db 255 D3_23 db 56, 53, 38, 41, 38, 56, 63, 0, 63, 0, 60, 46, 42, 49, 48, 46, 42, 44, 52, 0, 58, 55, 60, 46, 56, 48, 38 db 255 D3_24 db 49, 38, 60, 38, 0, 56, 53, 52, 41, 0, 63, 46, 42, 50, 46, 0, 60, 62, 57, 55, 62, 56, 48, 38 db 255 D3_25 db 60, 52, 48, 52, 49, 52, 0, 44, 55, 63, 50, 46, 0, 38, 49, 39, 52, 0, 39, 49, 62, 56, 48, 38 db 255 D3_26 db 43, 38, 49, 56, 63, 62, 60, 42, 0, 63, 49, 52, 57, 52, 0, 53, 52, 49, 62, 56, 48, 38 db 255 D3_27 db 51, 38, 47, 60, 46, 42, 40, 42, 47, 0, 40, 63, 38, 55, 57, 0, 57, 58, 0, 58, 63, 62, 56, 48, 38 db 255 D3_28 db 52, 60, 46, 42, 40, 63, 48, 46, 0, 63, 49, 62, 0, 57, 58, 0, 53, 52, 63, 62, 56, 48, 38 db 255 D3_29 db 52, 60, 46, 42, 40, 63, 48, 46, 0, 56, 53, 38, 41, 49, 62, 0, 63, 0, 58, 55, 60, 46, 56, 48, 38 db 255 D3_30 db 56, 51, 58, 47, 38, 0, 56, 46, 42, 0, 41, 62, 50, 62, 0, 63, 0, 52, 44, 51, 46, 56, 48, 38 db 255 D3_31 db 57, 52, 0, 40, 63, 38, 55, 51, 42, 0, 49, 42, 40, 38, 0, 53, 57, 38, 56, 63, 62, 56, 48, 38 db 255 ;--- ABO DB 57, 58, 55, 39, 52, 0, 60, 46, 42, 56, 63, 40, 63, 0, 21, 21, 0, 59, 30, 27, 28, 0, 24, 0, 63, 61, 36, 29, 118 DB 44, 42, 51, 42, 55, 38, 57, 52, 55, 0, 60, 46, 42, 55, 56, 63, 62, 118, 118 DB 16, 40, 17, 30, 28, 29, 35, 0, 50, 52, 51, 56, 57, 42, 55, 24, 44, 41, 40, 26, 118 DB 60, 60, 60, 27, 51, 52, 51, 46, 42, 60, 46, 40, 63, 27, 40, 52, 50, 118 DB 60, 60, 60, 27, 51, 52, 51, 46, 42, 60, 46, 40, 63, 27, 38, 55, 57, 27, 53, 49, 118, 118 DB 56, 57, 55, 52, 43, 62, 0, 39, 62, 14, 0, 44, 55, 62, 40, 45, 26, 0, 43, 55, 42, 42, 38, 48, 26, 0, 43, 55, 42, 41, 26, 0, 50, 52, 51, 56, 57, 42, 55, 26, 0, 50, 38, 55, 42, 48, 0, 53, 38, 50, 53, 58, 40, 45, 118, 118 DB 52, 53, 38, 55, 57, 62, 0, 51, 38, 0, 50, 52, 46, 40, 45, 0, 60, 42, 55, 56, 47, 38, 40, 45, 14, 118 DB 22, 0, 51, 38, 0, 63, 61, 0, 56, 53, 42, 40, 57, 55, 58, 50, 0, 32, 36, 0, 16, 30, 28, 29, 33, 17, 118 DB 22, 0, 51, 38, 0, 38, 51, 41, 55, 52, 46, 41, 38, 0, 16, 30, 28, 29, 29, 21, 17, 118 DB 22, 0, 51, 38, 0, 40, 52, 50, 50, 52, 41, 52, 55, 42, 0, 40, 22, 34, 32, 0, 16, 29, 37, 37, 30, 22, 29, 37, 37, 33, 17, 118 DB 52, 53, 38, 55, 57, 62, 40, 45, 0, 63, 0, 48, 52, 49, 42, 46, 0, 51, 38, 0, 53, 52, 50, 62, 56, 49, 42, 0, 63, 118 DB 11, 50, 38, 44, 38, 63, 62, 51, 58, 0, 38, 50, 46, 44, 38, 11, 118 DB 38, 58, 57, 52, 55, 56, 57, 60, 38, 0, 50, 38, 55, 48, 38, 0, 53, 38, 50, 53, 58, 40, 45, 38 DB 0, 46, 0, 60, 42, 55, 22, 0, 56, 47, 38, 40, 45, 0, 44, 55, 62, 40, 45, 38, 0, 51, 38, 0, 38, 50, 46, 44, 42, 0, 46, 0, 46, 53, 45, 52, 51, 42, 118, 118 DB 45, 46, 56, 57, 52, 55, 46, 38, 0, 60, 46, 42, 56, 63, 40, 63, 38, 0, 60, 0, 50, 38, 44, 38, 63, 62, 51, 46, 42, 118 DB 11, 45, 38, 0, 38, 55, 57, 11, 0, 32, 35, 0, 31, 24, 30, 28, 29, 32, 118 DB 53, 52, 55, 57, 0, 63, 61, 36, 29, 0, 46, 51, 56, 53, 46, 55, 42, 41, 0, 39, 62, 0, 57, 62, 44, 55, 62, 56 DB 255 OPTS DB 52, 53, 40, 47, 42, 14, 118, 118 DB 56, 53, 38, 40, 47, 38, 0, 22, 0, 44, 42, 51, 42, 55, 58, 47, 0, 51, 52, 60, 62, 0, 60, 46, 42, 55, 56, 63, 118 DB 38, 0, 22, 0, 46, 51, 43, 52, 55, 50, 38, 40, 47, 42, 0, 52, 0, 53, 55, 52, 44, 55, 38, 50, 46, 42, 118 DB 61, 0, 22, 0, 53, 55, 63, 62, 56, 53, 46, 42, 56, 63, 42, 51, 46, 42, 0, 41, 55, 58, 48, 52, 60, 38, 51, 46, 38, 118 DB 55, 0, 22, 0, 63, 50, 46, 38, 51, 38, 0, 57, 55, 62, 39, 58, 0, 55, 62, 50, 52, 60, 14, 118 DB 0, 0, 0, 0, 38, 39, 38, 39, 26, 0, 38, 39, 39, 38, 26, 0, 38, 38, 39, 39, 118 DB 45, 0, 22, 0, 57, 42, 51, 0, 42, 48, 55, 38, 51, 0, 53, 52, 50, 52, 40, 62, 118 DB 63, 0, 22, 0, 57, 55, 62, 39, 0, 63, 24, 39, 42, 63, 0, 53, 52, 60, 57, 52, 55, 63, 42, 51, 118 DB 50, 0, 22, 0, 57, 55, 62, 39, 0, 38, 58, 57, 52, 50, 38, 57, 62, 40, 63, 51, 62, 26, 0, 40, 52, 0, 29, 28, 56, 118, 118 DB 52, 53, 40, 47, 42, 0, 55, 26, 63, 26, 50, 0, 63, 38, 41, 63, 46, 38, 49, 38, 47, 38, 0, 57, 62, 49, 48, 52, 118 DB 50, 46, 42, 41, 63, 62, 0, 48, 52, 49, 42, 47, 51, 62, 50, 46, 0, 60, 46, 42, 55, 56, 63, 38, 50, 46 DB 255 ;do not encode DB " (C)2017 NONIEWICZ.COM, JAKUB NONIEWICZ AKA MONSTER/GDC" DB " CREDITS: CODE: MONSTER/GDC, IDEA: MAREK PAMPUCH " DB "WRITTEN 4 SPECCY.PL PARTY 2018.04 "
50.111359
222
0.520311
3e9610befd9aef56a0b2efd6f1ead946c6318e4f
3,932
asm
Assembly
astro_stream_processor_macs.asm
nealvis/astroblast
521b5300c4b00d96971ed72106de79e7b9f9250d
[ "MIT" ]
null
null
null
astro_stream_processor_macs.asm
nealvis/astroblast
521b5300c4b00d96971ed72106de79e7b9f9250d
[ "MIT" ]
null
null
null
astro_stream_processor_macs.asm
nealvis/astroblast
521b5300c4b00d96971ed72106de79e7b9f9250d
[ "MIT" ]
null
null
null
////////////////////////////////////////////////////////////////////////////// // astro_stream_processor_macs.asm // Copyright(c) 2021 Neal Smith. // License: MIT. See LICENSE file in root directory. ////////////////////////////////////////////////////////////////////////////// // Contains macros that can be expanded as a step subroutine that has // a different stream to process at each step. #importonce #import "../nv_c64_util/nv_c64_util_macs.asm" ////////////////////////////////////////////////////////////////////////////// // macro for astroblaster that generates code that reads from // a list of streams, and based on a frame counter will run the appropriate // stream (all commands) in the list every time its called. // So if an entire effect can be done by processing a differnt stream each // frame, the user can create the list of stream addresses and just call this // subroutine once per frame. // macro params: // stream_proc_addr: Address of the stream processor subroutine // that will be called to process streams. // effect_count_addr: Address of the frame counter for the effect // it counts down to zero typically. When an // effect is started the byte at this addr should be set // to effect_frames. End each time this is code // executes that byte will be decremented. // If the byte at this address is zero then this // code does nothing. // effect_frames: This is the total number of frames in the effect. // the byte at effect_count_addr is subracted from this // in order to get the zero based frame/step for the effect // that is the index into the effect table addr. // effect_table_addr: the addres of a list of words that contain 16 bit // addresses of the streams that will be called. // there must be effect_frames number of words/addrs // at this location. .macro astro_effect_step(stream_proc_addr, effect_count_addr, effect_frames, effect_table_addr) { // sanity check that count isn't already zero lda effect_count_addr beq Done // if count has hit zero then done lda #effect_frames // load total num frames sec // set carry for to prep for subtraction sbc effect_count_addr // sub cur count value to get zero based // frame count into accum asl // multiply by two since table is 16 bit addrs tay // put result in y its index to stream LSB lda effect_table_addr, y // load stream LSB in Accm tax // move LSB of stream start to x iny // inc index point to MSB of addr in table lda effect_table_addr, y // load accum with MSB of stream start tay // move MSB of stream start to Y addr jsr stream_proc_addr // x, and y set for this frame's stream // so jsr to stream processor dec effect_count_addr // dec count Done: } ////////////////////////////////////////////////////////////////////////////// // macro that creates a subroutine for the astro_effect_step macro. // when expanded at a label you can jsr to the label to run the code // See astro_effect_step for details of what the code does and what // macro parameters are. .macro astro_effect_step_sr(stream_proc_addr, effect_count_addr, effect_frames, effect_table_addr) { astro_effect_step(stream_proc_addr, effect_count_addr, effect_frames, effect_table_addr) rts }
49.772152
82
0.56002
8f38c457da90093abeaab2fc9d9b2535990de19f
106,642
asm
Assembly
Library/Kernel/IM/imPen.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
504
2018-11-18T03:35:53.000Z
2022-03-29T01:02:51.000Z
Library/Kernel/IM/imPen.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
96
2018-11-19T21:06:50.000Z
2022-03-06T10:26:48.000Z
Library/Kernel/IM/imPen.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
73
2018-11-19T20:46:53.000Z
2022-03-29T00:59:26.000Z
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright (c) GeoWorks 1991 -- All Rights Reserved PROJECT: Config MODULE: FILE: imPen.asm AUTHOR: Andrew Wilson, Nov 15, 1991 ROUTINES: Name Description ---- ----------- REVISION HISTORY: Name Date Description ---- ---- ----------- atw 11/15/91 Initial revision lester 12/11/96 added support for digitizer coords ink DESCRIPTION: This file contains code to implement the various pen support routines. The pen support works like this: If pen mode is off, then PC/GEOS functions normally (no pen data is ever saved). If the UI has requested that the IM start monitoring Pen input, then whenever a START_SELECT comes in, we begin adding non-collinear points to the buffer supplied by the UI. If the UI has determined that the mouse movements should be treated as ink it calls ImInkReply with AX=TRUE,and the currently entered data will be drawn to the screen, and data entered after that will also be drawn until either the buffer gets full or the timeout period elapses (the mouse is up for INK_TIMEOUT_TICKS). If the UI determines that the mouse movements should *not* be ink, then the IM discards the first START_SELECT to END_SELECT series. Note that if the mouse is not down, the IM does not save the data, and that once the UI replies that the current drag series is not ink, the IM does not save the data either. Exception cases: There are a few places where the buffer can fill up: 1) While entering ink (the most common case). 2) If the UI is blocked or not responding to our mouse events (in which case the buffer fills up with unprocessed mouse events). If it fills up while entering ink, we stop allowing ink to be entered, terminate the current segment, and pass it off to the UI when the next END_SELECT is encountered. If it fills up while not entering ink, there are 2 cases: 1) It fills up when processing a START_SELECT. In this case, we do *not* pass the START_SELECT off to the UI, and instead just eat the mouse events (don't pass them off or store them) until we get an END_SELECT. 2) It fills up when processing a MSG_META_PTR. In this case, we terminate the current segment, stop storing data, but continue passing the mouse events off to the UI. $Id: imPen.asm,v 1.1 97/04/05 01:17:20 newdeal Exp $ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ IMResident segment resource if NO_PEN_SUPPORT global NoPenSupportError:far NoPenSupportError proc far EC < ERROR NO_PEN_SUPPORT_IN_THIS_KERNEL > NEC < stc > NEC < ret > NoPenSupportError endp else COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ImInkReply %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: This is the routine to call depending upon whether or not the current routine is ink or not. It sends a method off to the IM thread to handle it. CALLED BY: GLOBAL PASS: AX = TRUE if the last select series was Ink FALSE if it was not Ink BP = gstate to draw ink through (or 0 if none) (if AX=TRUE) BX = width/height of brush CX:DX = vfptr to callback routine RETURN: nada DESTROYED: nada PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 11/18/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ImInkReply proc far uses ax, cx, di, bx, ds, si class IMClass .enter tst ax mov ax, MSG_IM_INK_REPLY_NEGATIVE jz sendMessage mov ax, MSG_IM_INK_REPLY_POSITIVE mov si, bx ;SI <- brush width/height sendMessage: mov di, mask MF_FORCE_QUEUE or mask MF_INSERT_AT_FRONT LoadVarSeg ds, bx mov bx, ds:[imThread] call ObjMessage .leave ret ImInkReply endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ImInkReplyMsg %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: This is the method handler invoked when the UI determines whether or not the last mouse input should be ink or not. CALLED BY: GLOBAL PASS: ax - method BP = gstate to draw ink through (or 0 if none) (if AX=TRUE) SI = width/height of brush CX:DX = callback routine RETURN: nada DESTROYED: nada PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 11/20/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ImInkReplyMsg method IMClass, MSG_IM_INK_REPLY_POSITIVE, MSG_IM_INK_REPLY_NEGATIVE tst ds:[inkCallVector].segment jz exit CallToInkSegment InkReplyHandler exit: ret ImInkReplyMsg endp endif ;NO_PEN_SUPPORT IMResident ends ife NO_PEN_SUPPORT IMPenCode segment resource COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DrawInkCallback %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: This callback routine draws the ink in the buffer CALLED BY: GLOBAL PASS: ax, bx - old point values cx, dx - new point values RETURN: nada DESTROYED: nada PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 11/21/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ DrawInkCallback proc far uses ds .enter LoadVarSeg ds, bx tst_clc ax js startNewSegment 10$: call DrawInkLine mov_tr ax, cx mov bx, dx clc .leave ret startNewSegment: mov ds:[inkCurPoint].P_x, cx andnf ds:[inkCurPoint].P_x, 0x7fff mov ds:[inkCurPoint].P_y, dx jmp 10$ DrawInkCallback endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% FindLengthOfSegmentCallback %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: This routine updates the count of points and returns carry set when the end of the segment is reached CALLED BY: GLOBAL PASS: ax - # points so far cx, dx - new points RETURN: nada DESTROYED: nada PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 11/21/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ FindLengthOfSegmentCallback proc far inc ax shl cx ;Sets carry if end of segment ret FindLengthOfSegmentCallback endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TrySaveUnder %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: This routine tries to do a save under of the passed height centered around the first point in the ink array. CALLED BY: GLOBAL PASS: dx - height of save under bp - max Y coord of window ax, cx - left and right bounds of saveunder region es - P-locked window RETURN: if save under was successful: carry clear ax, bx, cx, dx - bounds of saveunder else: carry set ax, bx, cx, dx - unchanged DESTROYED: di PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 12/ 4/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TrySaveUnder proc near .enter push bx, dx push ds mov ds, ds:[inkData] mov di, ds:[CBS_start] mov bx, dx shr bx, 1 neg bx ;BX = -1/2 * height of save under add bx, ds:[di].P_y ; jns 10$ ;BX = first point in ink - 1/2 height clr bx ;If this is negative, start at top ; of screen 10$: ; BX <- top coordinate of screen to try to save under ; DX <- height of the saveunder area ; BP <- bottom coordinate of screen to try to saveunder mov di, dx ;DI <- height of saveunder area add dx, bx cmp dx, bp jbe 20$ ;If saveunder area is entirely on screen, ; branch mov dx, bp ;Else, have the saveunder area end at the mov bx, dx ; bottom of the screen, and recalculate the sub bx, di ; top of the saveunder area jnc 20$ clr bx 20$: pop ds push ax push ds, es, bx, cx, dx, si, bp mov di, DR_VID_SAVE_UNDER EC < tstdw ds:pointerDriver > EC < ERROR_Z NO_VIDEO_DRIVER_LOADED_YET > call ds:pointerDriver pop ds, es, bx, cx, dx, si, bp jnc saveUnderWorked pop ax pop bx, dx exit: .leave ret saveUnderWorked: mov es:[W_saveUnder], al pop ax add sp, size word * 2 ;Don't bother restoring original top/ ; bottom - return area that we saved jmp exit TrySaveUnder endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SetupSaveUnder %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Tries to setup a save under for the ink to be drawn. CALLED BY: GLOBAL PASS: ds - kdata RETURN: nada DESTROYED: bx, es, ax, di PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 11/27/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ SetupSaveUnder proc near uses bp .enter clr ds:[inkWinHasSaveUnder] mov ax, ds:[lockedInkGState] ;If we aren't drawing to the cmp ax, ds:[inkDefaultGState] ; default gstate, then just jnz exit ; exit. mov bx, ds:[lockedInkWin] call MemDerefES mov ax, es:[W_winRect].R_left mov cx, es:[W_winRect].R_right mov dx, es:[W_winRect].R_bottom mov bp, dx ;BP <- bottom of window sub dx, ds:[W_winRect].R_top ;DX <- height of window mov bx, 4 ;Loop through this 4 times loopTop: call TrySaveUnder jnc gotSaveUnder shr dx, 1 ;Cut height in half. dec bx jnz loopTop exit: .leave ret gotSaveUnder: ; Save upper/lower bounds of the ink mov ds:[saveUnderUpperBound], bx mov ds:[saveUnderLowerBound], dx mov ds:[inkWinHasSaveUnder], TRUE jmp exit SetupSaveUnder endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% RestoreSaveUnder %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: This routine tries to restore any previous saveunder area. CALLED BY: GLOBAL PASS: ds - kdata RETURN: carry set if save under has been nuked DESTROYED: es, ax, di, bx PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 11/27/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ RestoreSaveUnder proc near mov bx, ds:[inkWin] call MemPLock mov es, ax ; make sure that the save under was not nuked tst es:[W_saveUnder] stc jz afterRestore mov di, DR_VID_RESTORE_UNDER call CallPtrDriver clr es:[W_saveUnder] clc afterRestore: call MemUnlockV ret RestoreSaveUnder endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% InkReplyHandler %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: This is the routine called when the UI has responded about the ink. CALLED BY: GLOBAL PASS: ax - MSG_IM_INK_REPLY_NEGATIVE, MSG_IM_INK_REPLY_POSITIVE BP = gstate to draw ink through (or 0 if none) (if AX=TRUE) SI = width/height of brush CX:DX = vfptr to callback routine ds - kdata RETURN: nada DESTROYED: ax, bx, cx, dx, dp, di, es, perhaps others PSEUDO CODE/STRATEGY: See description of states in header of InkInputMonitor()... When the UI tells us the status of a START_SELECT: If they say that the START_SELECT is INK, we create a gstate to draw through, and draw all the current ink. If we are in state 1, we start the timeout timer and go to state 4 Else, we go to state 3. If they say that the START_SELECT is not ink: We delete the first START_SELECT to END_SELECT pair. If we haven't received an END_SELECT for the first START_SELECT yet, then we delete what we have and goto state #1. Else, we stay in the same state we were in. KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 11/20/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ InkReplyHandler proc far class IMClass cmp ax, MSG_IM_INK_REPLY_NEGATIVE LONG jz notInk EC < cmp ax, MSG_IM_INK_REPLY_POSITIVE > EC < ERROR_NZ INVALID_MSG_PASSED_TO_INK_REPLY_HANDLER > movdw ds:[inkGestureCallback], cxdx ; tell the mouse driver to not combine events mov cl, MCM_NO_COMBINE call SetMouseCombineMode mov cx, ds:[inkDefaultWidthAndHeight] mov ds:[inkBrushSize], cx tst si jz noPassedBrushSize mov ds:[inkBrushSize], si noPassedBrushSize: mov di, ds:[inkDefaultGState] tst bp jz doDraw mov di, bp doDraw: mov ds:[lockedInkGState], di ; ; The problem we have here is if we are drawing to an app-supplied ; gstate - this gstate will be hooked to a window, and hence will have ; some funky transformation associated with it. We just want to draw ; in screen coordinates, so we lock the gstate/windows and call the ; video driver ourselves. Since the window will be P-Locked, we don't ; have to worry about any stupid apps trying to do things to the window ; while we are drawing to it either... ; mov bx, ds:[lockedInkGState] call MemPLock mov es, ax mov bx, es:[GS_window] EC < tst bx > EC < ERROR_Z WIN_PASSED_GSTATE_HAS_NO_WINDOW > call MemPLock mov ds:[lockedInkWin], bx mov es, ax ; Validate the window, as it may not have valid clip regions, etc. push ds mov bx, ds:[lockedInkGState] call MemDerefDS call WinValWinStrucFar test es:[W_grFlags], mask WGF_MASK_NULL pop ds jnz windowNull ; Grab the graphics exclusive, so nobody will draw to the screen. clr bx call GrGrabExclusive ; Try to setup save under for the root window call SetupSaveUnder mov di, DR_VID_HIDEPTR call CallPtrDriver ; Draw the current ink mov bp, ds:[lockedInkGState] ;BP <- gstate to draw through EC < tst bp > EC < ERROR_Z NO_INK_GSTATE > ; Put ink bounds in invalid state so they will get updated by ; DrawInkLine() mov ds:[inkUpperLeftBounds].P_x, 0x7fff ; Draw all the ink, but first munge the data so brush is centered. call PointBufferModify mov ah, -1 mov bh, ah mov cx, cs mov dx, offset DrawInkCallback call PointBufferEnum clr ds:[haveCalledGestureCallback] cmp ds:[inkStatus], ICS_SKIP_UNTIL_START_SELECT mov ds:[inkStatus], ICS_COLLECT_AND_DRAW_UNTIL_END_SELECT jnz exit ; The user is currently between strokes ; so we check to see if the already-entered ink is a gesture. ; ; If so, send off the ink and exit ; ; If not, start up the timeout timer and await the entry of the next ; ink stroke. ; We treat all the data that the user has entered up to this point as ; a single stroke, so the text object gesture routine will still try ; to recognize it as a gesture. call CheckIfGesture jnc notGesture mov ds:[inkStatus], ICS_SEND_CLEAR ; We just set the im monitor finite state machine to ; ICS_JUST_SEND_INK, now we send it message so it will send ; the ink off to the UI. mov ax, MSG_META_NOTIFY mov bx, ds:[imThread] mov di, mask MF_FORCE_QUEUE or mask MF_INSERT_AT_FRONT call ObjMessage jmp exit notGesture: call StartTimeoutTimerAndWaitForStartSelect exit: ret windowNull: ; ; The window was still in the process of coming up (or was suspended) ; when the user tried to draw ink in it. Clean up after ourselves, ; and pretend that the reply was "NO_INK". ; ; This is fairly tricky, since the flow object has discarded all the ; mouse events we've sent it up to this point. We nuke all of our ; points, and either wait ; EC < WARNING DISCARDING_MOUSE_INPUT > mov bx, ds:[lockedInkWin] call MemUnlockV mov bx, ds:[lockedInkGState] call MemUnlockV mov cl, MCM_COMBINE call SetMouseCombineMode ; ; The flow object is stupidly hanging out waiting for a MSG_INK. ; Send it one (with BP=0), and nuke all the points we've collected. ; mov ax, MSG_META_NOTIFY_WITH_DATA_BLOCK clr bp mov cx, MANUFACTURER_ID_GEOWORKS mov dx, GWNT_INK mov bx, ds:[imThread] mov di, mask MF_FORCE_QUEUE or mask MF_INSERT_AT_FRONT call ObjMessage ; ; Don't collect any data until the next start select. ; mov ds:[inkStatus], ICS_SKIP_UNTIL_START_SELECT ; ; Nuke any and all points that we've collected. ; clr bx mov ds:[inkNumStrokes], bx xchg ds:[inkHandle], bx tst bx jz clearBuffer call MemFree clearBuffer: call PointBufferGetCount call PointBufferDelete if INK_DIGITIZER_COORDS clr bx xchg ds:[inkCoordsBlockHan], bx tst bx jz noInkCoords call MemFree noInkCoords: endif ; INK_DIGITIZER_COORDS jmp exit notInk: ; tell the mouse driver to combine events mov cl, MCM_COMBINE call SetMouseCombineMode clr ax mov cx, cs mov dx, offset FindLengthOfSegmentCallback call PointBufferEnum ;Returns AX = # items in buffer. ;Carry set if we've already collected an END_SELECT jc 30$ ;Else, we're in the middle of ; a select, so go back to ; "non-collecting" mode mov ds:[inkStatus], ICS_SKIP_UNTIL_START_SELECT inc ds:[inkNumStrokes] ;We increment the # strokes, ; because we haven't gotten an ; end select for this stroke ; yet. 30$: EC < tst ds:[inkNumStrokes] > EC < ERROR_Z INK_NUM_STROKES_MUST_BE_NON_ZERO > mov_tr cx, ax ;CX <- # items to delete call PointBufferDelete dec ds:[inkNumStrokes] if INK_DIGITIZER_COORDS ; ; Delete the digitizer coords in the first segment. ; clr ax mov cx, cs mov dx, offset FindLengthOfSegmentCallback CheckHack <segment FindLengthOfSegmentCallback eq @CurSeg> CheckHack <segment FindLengthOfSegmentCallback eq IMPenCode> CheckHack <segment DigitizerCoordsEnum eq @CurSeg> call DigitizerCoordsEnum ; Returns AX = # items in first segment. mov_tr cx, ax ;CX <- # items to delete call DigitizerCoordsDelete endif ; INK_DIGITIZER_COORDS jmp exit InkReplyHandler endp COMMENT @---------------------------------------------------------------------- FUNCTION: SetMouseCombineMode DESCRIPTION: Set the combine mode in the mouse driver CALLED BY: INTERNAL PASS: cl - MouseCombineMode RETURN: none DESTROYED: none REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Tony 2/17/92 Initial version Don 11/13/93 Do nothing if no default driver, to handle problems with pen driver input arriving while registering interrupt handler ------------------------------------------------------------------------------@ SetMouseCombineMode proc near uses ax, bx, si, di, ds .enter mov ax, GDDT_MOUSE call GeodeGetDefaultDriver tst ax jz done mov_tr bx, ax call GeodeInfoDriver mov di, DR_MOUSE_SET_COMBINE_MODE call ds:[si].DIS_strategy done: .leave ret SetMouseCombineMode endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% CopyPenResource %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Copies the IMPenCode resource into a fixed segment. CALLED BY: GLOBAL PASS: ds - idata RETURN: cx - segment of block bx - handle of block - or - carry set if couldn't allocate it DESTROYED: ax, di, si PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 11/19/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ if not KERNEL_EXECUTE_IN_PLACE and (not FULL_EXECUTE_IN_PLACE) EC <cat char 'input',0 > EC <key char 'debugInk',0 > CopyPenResource proc near uses es, ds .enter if ERROR_CHECK segmov ds, cs, cx mov dx, offset key mov si, offset cat clr ax call InitFileReadBoolean tst ax jz doCopy WARNING INK_DEBUGGING_TURNED_ON mov bx, handle IMPenCode call MemLock mov cx, ax clr bx clc jmp exit doCopy: endif ; Get the size of this resource mov ax, MGIT_SIZE mov bx, handle IMPenCode call MemGetInfo ;AX <- size of this resource ; Allocate a similarly-sized fixed block push ax mov bx, handle 0 mov cx,mask HF_FIXED or (mask HAF_READ_ONLY or mask HAF_CODE) shl 8 call MemAllocSetOwnerFar ; pop cx jc exit mov es, ax ;ES:DI <- ptr to dest clr di segmov ds, cs ;DS:SI <- ptr to src clr si shr cx, 1 ;CX is *never* odd rep movsw ;Copy data over mov cx, es ;Carry should be cleared by "shr" ; above... EC < ERROR_C SIZE_OF_PEN_CODE_BLOCK_WAS_ODD > exit: .leave ret CopyPenResource endp endif COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DoInvalBounds %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: This routine invalidates the passed bounds CALLED BY: GLOBAL PASS: ax, bx, cx, dx - bounds RETURN: nada DESTROYED: ax, bx, cx, dx, di PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 12/ 4/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ DoInvalBounds proc near class IMClass sub sp, size Rectangle mov bp, sp mov ss:[bp].R_left, ax mov ss:[bp].R_top, bx mov ss:[bp].R_right, cx mov ss:[bp].R_bottom, dx mov dx, size Rectangle mov ax, MSG_IM_REDRAW_AREA mov bx, ds:[imThread] mov di, mask MF_FORCE_QUEUE or mask MF_INSERT_AT_FRONT or mask MF_STACK call ObjMessage add sp, dx ret DoInvalBounds endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% EraseInk %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: This routine erases the ink on the screen, either by restoring from save-under, or by generating a MSG_META_INVAL_BOUNDS... If we were drawing through a user-supplied gstate, don't erase the ink CALLED BY: GLOBAL PASS: ds - kdata RETURN: nada DESTROYED: ax, bx, cx, dx, bp, di, es PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 11/21/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ EraseInk proc near ; Unlock the window/gstate mov bx, ds:[lockedInkGState] call MemDerefES mov bx, es:[GS_window] call MemUnlockV mov bx, ds:[lockedInkGState] mov di, bx call MemUnlockV ; Allow drawing again clr bx call GrReleaseExclusive ; will return bogus (offscreen) coords ; of no drawing operations aborted ; during the time we had the exclusive tst ax js 20$ ; if offscreen, skip invalidation push di call DoInvalBounds ; else do it baby pop di 20$: cmp di, ds:[inkDefaultGState] jnz notDefaultGState ; Bump lower right bounds as our ink is 2 pixels wide/tall... inc ds:[inkLowerRightBounds].P_x inc ds:[inkLowerRightBounds].P_y ; Restore the save under area, if any tst ds:[inkWinHasSaveUnder] jz invalEntireInk call RestoreSaveUnder jc invalEntireInk ; The ink may have been drawn outside the save under area. If so, ; expose those areas. mov bx, ds:[inkUpperLeftBounds].P_y cmp bx, ds:[saveUnderUpperBound] jge inkNotAboveSaveUnder mov ax, ds:[inkUpperLeftBounds].P_x mov cx, ds:[inkLowerRightBounds].P_x mov dx, ds:[saveUnderUpperBound] dec dx call DoInvalBounds inkNotAboveSaveUnder: mov dx, ds:[inkLowerRightBounds].P_y cmp dx, ds:[saveUnderLowerBound] jle exit mov bx, ds:[saveUnderLowerBound] inc bx jmp invalAndExit invalEntireInk: ; Get the bounds of the ink, and send a method to the UI to invalidate ; them. mov bx, ds:[inkUpperLeftBounds].P_y mov dx, ds:[inkLowerRightBounds].P_y invalAndExit: mov ax, ds:[inkUpperLeftBounds].P_x mov cx, ds:[inkLowerRightBounds].P_x call DoInvalBounds exit: ; Draw the cursor again. mov di, DR_VID_SHOWPTR call CallPtrDriver ret notDefaultGState: call GrDestroyState jmp exit EraseInk endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DestroyInkWinAndGState %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: This routine destroys the current ink window and gstate, and restores the screen from the ink if necessary. CALLED BY: GLOBAL PASS: nada RETURN: nada DESTROYED: ax, bx, dx, bp, di PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 11/21/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ DestroyInkWinAndGState proc near .enter cmp ds:[inkStatus], ICS_COLLECT_UNTIL_END_SELECT jbe noErase call EraseInk noErase: mov di, ds:[inkDefaultGState] tst di jz noInkState call GrDestroyState noInkState: mov di, ds:[inkWin] tst di jz noInkWin call WinClose noInkWin: .leave ret DestroyInkWinAndGState endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% CreateInkWinAndGState %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Creates a root window to draw ink to and a gstate to draw with. CALLED BY: GLOBAL PASS: ds - kdata RETURN: inkWin, inkDefaultGState - set to values DESTROYED: ax, bx, dx, bp, di, si PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 11/21/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ CreateInkWinAndGState proc near uses cx .enter mov di, ds:[pointerWin] call WinGetWinScreenBounds mov bp, handle 0 push bp ;Layer ID push bp ;Process to own window push ds:[pointerDriverHandle] clr bp push bp push bp push dx ;Push bounds of window push cx push bx push ax mov ax, (mask WCF_TRANSPARENT or mask WCF_PLAIN) shl 8 clrdw cxdx ;No Output ODs clr di ; mov si, mask WPF_ROOT or WIN_PRIO_STD or mask WPF_CREATE_GSTATE call WinOpen mov ds:[inkWin], bx mov ds:[inkDefaultGState], di ; Init the separator, which is used when drawing line segments later mov ds:[inkSeparator].P_x, 8000h mov ds:[inkSeparator].P_y, 8000h .leave ret CreateInkWinAndGState endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ImStartPenMode %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: This routine tells the IM to begin storing ink. CALLED BY: GLOBAL PASS: nothing RETURN: carry set if error (could not allocate memory to store ink data) DESTROYED: nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 11/18/91 Initial version lester 11/24/96 added call to AllocateDigitizerCoordsBuffer %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ImStartPenMode proc far uses ds, ax, bx, cx, dx, di, si .enter ; Before we add the input monitor to collect the ink data, allocate ; and initialize the buffer. We allocate the buffer "FIXED" so we don't ; have the overhead of locking the block with every ptr event, and so ; it never gets swapped (which would be a bad thing). LoadVarSeg ds, cx mov bx, handle 0 mov cx, mask HF_FIXED mov ax, INK_DATA_BUFFER_SIZE call MemAllocSetOwnerFar jc exit EC < tst ds:[inkData] > EC < ERROR_NZ IM_START_PEN_MODE_WAS_CALLED_TWICE > mov ds:[inkStatus], ICS_SKIP_UNTIL_START_SELECT mov ds:[inkData], ax mov ds:[inkDataHan], bx call PointBufferInit ;Init the buffer passed in AX if INK_DIGITIZER_COORDS ; Allocate circular buffer for absolute digitizer coordinates ; if the appropriate ini entry is set. call AllocateDigitizerCoordsBuffer ; carry set on failure jc freeExit endif ; INK_DIGITIZER_COORDS ; Input monitors and the associated pen code must be in a fixed block, ; so copy this resource into one. AXIP< mov cx, cs > NOAXIP< call CopyPenResource ;Returns CX <- segment of fixed > ; copy of pen resource NOAXIP< jc freeExit > NOAXIP< mov ds:[inkCodeBlock], bx > mov ds:[inkCallVector].segment, cx ; Create a window and a gstate to draw ink to call CreateInkWinAndGState ; Add an input monitor to collect ink data. mov bx, offset inkMonitor ;DS:BX <- ptr to Monitor<> structure ;CX:DX <- fptr to monitor routine mov dx, offset InkInputMonitor mov al, ML_INK ;AL <- Monitor level (Ink comes after ; everything but before the data is ; sent through the OD) call ImAddMonitor clc exit: .leave ret if (not KERNEL_EXECUTE_IN_PLACE and not FULL_EXECUTE_IN_PLACE) \ or INK_DIGITIZER_COORDS freeExit: clr bx mov ds:[inkData], bx xchg bx, ds:[inkDataHan] tst bx jz noInk call MemFree noInk: if INK_DIGITIZER_COORDS clr bx mov ds:[inkCoordsBuffer], bx xchg bx, ds:[inkCoordsBufferHan] tst bx jz noInkCoords call MemFree noInkCoords: endif ; INK_DIGITIZER_COORDS stc jmp exit endif ImStartPenMode endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ImExitPenMode %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: This exits pen mode. We do this on the IM thread to ensure that nobody is running in the copied code resource when we free it. CALLED BY: GLOBAL PASS: nada RETURN: nada DESTROYED: nada PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 11/20/91 Initial version lester 11/25/96 added call to RemoveDigitizerCoordsBuffer %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ImExitPenMode method IMClass, MSG_IM_EXIT_PEN_MODE mov al, mask MF_REMOVE_IMMEDIATE mov bx, offset inkMonitor call ImRemoveMonitor mov bx, ds:[inkDataHan] tst bx jz noInk call MemFree noInk: if INK_DIGITIZER_COORDS mov bx, ds:[inkCoordsBufferHan] tst bx jz noInkCoords call RemoveDigitizerCoordsBuffer noInkCoords: endif ; INK_DIGITIZER_COORDS NOAXIP< mov bx, ds:[inkCodeBlock] > NOAXIP< tst bx > NOAXIP< jz noFree > NOAXIP< call MemFree > NOAXIP<noFree: > mov bx, ds:[inkTimerHan] mov ax, ds:[inkTimerID] tst bx jz 10$ call TimerStop clr bx 10$: mov ds:[inkTimerHan], bx mov ds:[inkTimerID], bx mov ds:[inkDataHan], bx mov ds:[inkData], bx mov ds:[inkCodeBlock], bx mov ds:[inkCallVector].segment, bx ; Free up any gstate we may have been using to draw ink call DestroyInkWinAndGState ret ImExitPenMode endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ImRedrawArea %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: This method handler forces a redraw of a portion of the screen CALLED BY: GLOBAL PASS: ss:bp - Bounds of area to invalidate (in screen coords) RETURN: nada DESTROYED: nada PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 6/15/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ImRedrawArea method IMClass, MSG_IM_REDRAW_AREA mov ax, MSG_META_INVAL_BOUNDS mov bx, ds:[uiHandle] mov cx, ds:[pointerWin] ;CX <- root window to inval mov di, mask MF_STACK GOTO ObjMessage ImRedrawArea endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ImEndPenMode %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: This routine takes the input manager out of the mode where it captures ink and into its normal mode. CALLED BY: GLOBAL PASS: nada RETURN: nada DESTROYED: nada PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 11/18/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ImEndPenMode proc far uses ax, bx, cx, dx, bp, di, ds class IMClass .enter ; Send a message to the IM thread to do this, so we can be certain that ; nobody is doing anything in the copied code block when we free it. LoadVarSeg ds, bx mov ax, MSG_IM_EXIT_PEN_MODE mov bx, ds:[imThread] mov di, mask MF_FORCE_QUEUE or mask MF_INSERT_AT_FRONT call ObjMessage .leave ret ImEndPenMode endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% StoreInkCallback %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Callback routine that stores ink points CALLED BY: GLOBAL PASS: cx, dx - ink point es:bp - ptr to store it RETURN: carry clear bp updated to point to where to store next point DESTROYED: nada PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 11/21/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ StoreInkCallback proc far mov es:[bp].P_x, cx mov es:[bp].P_y, dx add bp, size Point ;Should never set carry EC < ERROR_C INK_ENUM_EXCEEDED_END_OF_BUFFER > ret StoreInkCallback endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LimitPtrToScreenLimits %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Limits the pointer event to the limits of the screen. CALLED BY: GLOBAL PASS: ds - dgroup cx, dx - point RETURN: cx, dx - changed to lie onscreen, if necessary DESTROYED: nada PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 6/30/93 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ LimitPtrToScreenLimits proc near .enter cmp cx, ds:[screenXMin] jl setXMin cmp cx, ds:[screenXMax] jg setXMax checkY: cmp dx, ds:[screenYMin] jl setYMin cmp dx, ds:[screenYMax] jg setYMax exit: .leave ret setXMin: mov cx, ds:[screenXMin] jmp checkY setXMax: mov cx, ds:[screenXMax] jmp checkY setYMin: mov dx, ds:[screenYMin] jmp exit setYMax: mov dx, ds:[screenYMax] jmp exit LimitPtrToScreenLimits endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% InkInputMonitor %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: This is the routine through which all mouse events travel and are converted into ink. CALLED BY: GLOBAL PASS: di - event type (method) cx, dx, bp, si - event data ss:sp - IM stack frame RETURN: nada DESTROYED: nada PSEUDO CODE/STRATEGY: There are a number of ink-collection states that we can be in: 1) We can be doing nothing, and waiting for a START_SELECT When a START_SELECT comes in, we store it and go to state #2 In the meantime, we just pass on all events. 2) We can be collecting possible ink and waiting until an END_SELECT We hang around and collect ink until the UI tells us the status of the START_SELECTs we've collected or until we've received an END_SELECT. When we receive an END_SELECT, we go back to state #1 If the UI replies that the user is entering ink, we can move to these states: 3) We can be collecting ink and waiting for an END_SELECT If a START_SELECT comes in here, we crash, as you can't get multiple START_SELECTs... If a MSG_META_PTR comes in, we draw to the screen, and buffer it up. When an END_SELECT comes in, we start our timeout timer and goto state 4. 4) We can be waiting for a START_SELECT When a START_SELECT comes in, we kill the current timeout timer, draw a point at the current position, and goto state 3 When the timeout timer hits: We compare it to the current timeout timer, and if it doesn't match (it's been killed but somehow managed to squeak into the queue) we ignore it. Otherwise, we grab all the ink data we've collected so far, send it off to the UI, and go back to state #1 KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 11/19/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ InkInputMonitor proc far class IMClass LoadVarSeg ds, bx ; Determine our status, and call through the associated handler routine cmp di, MSG_IM_INK_TIMEOUT je timeout mov bx, ds:[inkStatus] cmp bx, ICS_SEND_CACHED_START_SELECT je noCheckBounds ;Don't trash inkPenSavedXX values if ; we are sending a cached start select. if INK_DIGITIZER_COORDS cmp bx, ICS_SEND_INK_AND_THEN_SEND_CACHED_START_SELECT je noCheckBounds ;Don't trash inkPenSavedXX values if ; we are sending the ink prior to ; sending a cached start select. endif mov ds:[inkPenSavedCX], cx mov ds:[inkPenSavedDX], dx mov ds:[inkPenSavedBP], bp cmp bx, ICS_COLLECT_AND_DRAW_AFTER_START_SELECT jae noCheckBounds cmp di, MSG_META_MOUSE_PTR je checkBounds cmp di, MSG_META_MOUSE_BUTTON jne callHandler checkBounds: ; The event hasn't been restricted to the screen limits yet (this ; happens in OutputMonitor). We want to restrict them here, for our ; uses. call LimitPtrToScreenLimits callHandler: call cs:[inputFSMTable][bx] cmp di, MSG_META_NOTIFY_WITH_DATA_BLOCK ;Don't restore cx,dx je exit ; if we are sending ; ink off. mov cx, ds:[inkPenSavedCX] mov dx, ds:[inkPenSavedDX] exit: ; Check for illegal flags being set EC < test al, not (mask MF_MORE_TO_DO or mask MF_DATA) > EC < ERROR_NZ IM_BAD_FLAGS_RETURNED_FROM_MONITOR > ret noCheckBounds: call cs:[inputFSMTable][bx] jmp exit timeout: clr al ;Assume that we don't want ; to process this message... cmp bp, ds:[inkTimerID] ;If this isn't the current jne exit ; timer, exit clr ds:[inkTimerID] clr ds:[inkTimerHan] if INK_DIGITIZER_COORDS call SendInkCoords else call SendInk endif jmp exit InkInputMonitor endp inputFSMTable label nptr nptr SkipUntilStartSelect nptr CollectUntilEndSelect nptr CollectAndDrawUntilEndSelect nptr CollectAndDrawAfterStartSelect nptr EatEventsUntilEndSelect nptr SendInkOnEndSelect nptr SendInk nptr SendCachedStartSelect nptr SendClear if INK_DIGITIZER_COORDS nptr SendInkCoords nptr SendInkAndThenSendCachedStartSelect endif COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% AppendPointsToInkBlock %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: This routine appends all the current points in the ink buffer to the ink block. CALLED BY: GLOBAL PASS: ds - kdata RETURN: carry set if error, bp=0 -else- bx, bp = handle of locked ink block cx - # points just added es - segment of locked ink block DESTROYED: ax, dx, di PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 2/27/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ AppendPointsToInkBlock proc near .enter call PointBufferGetCount tst ds:[inkHandle] jnz haveInkHandle ; Get the # points in the ink, and allocate a buffer big enough to hold ; it. This is pretty bad to do (allocate memory on the IM thread), but ; there isn't much to be done about it (sigh). mov_tr ax, cx ;AX <- # points to allocate shl ax, 1 ;AX <- # bytes shl ax, 1 add ax, size InkHeader ; mov bx, handle 0 mov cx, ALLOC_DYNAMIC_LOCK or mask HF_SHARABLE call MemAllocSetOwnerFar jc exit mov ds:[inkHandle], bx mov es, ax clr es:[IH_count] common: mov es, ax mov bp, es:[IH_count] shl bp, 1 shl bp, 1 add bp, offset IH_data ;ES:BP <- ptr to store next pt push ds:[inkHandle] clr ds:[inkHandle] ;We only care about the ink mov cx, cs ; in the local buffer, not ; the ink in the global buffer, ; so temporarily nuke handle mov dx, offset StoreInkCallback call PointBufferEnum pop ds:[inkHandle] call PointBufferGetCount ;CX <- # points in the buffer add es:[IH_count], cx ;Clears carry EC < ERROR_C -1 > EC < tst es:[IH_count] > EC < ERROR_Z NUM_INK_POINTS_IS_ZERO > exit: mov bp, ds:[inkHandle] .leave ret haveInkHandle: mov bx, ds:[inkHandle] call MemLock mov es, ax add cx, es:[IH_count] mov_tr ax, cx ;AX <- # points to allocate shl ax, 1 shl ax, 1 add ax, size InkHeader ;AX <- new size of block clr ch call MemReAlloc jnc common clr bx ;If we couldn't resize the xchg bx, ds:[inkHandle] ; block, return an error. call MemFree stc jmp exit AppendPointsToInkBlock endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SendClear %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: send an empty ink message off to the flow object, so that it clears the FF_PROCESSING_INK flag. This is needed because sending a gesture should not clear the FF_PROCESSING_INK flag because more than one gesture might have to be sent. So after all of the gestures are sent, SendClear is called to clear FF_PROCESSING_INK flag. CALLED BY: PASS: ds - kdata RETURN: di - MSG_META_NOTIFY_WITH_DATA_BLOCK to send to output bp - 0 al - MF_DATA DESTROYED: cx, dx SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- IP 5/12/94 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ SendClear proc near .enter if INK_DIGITIZER_COORDS EC < cmp di, MSG_IM_READ_DIGITIZER_COORDS > EC < ERROR_E INK_RECEIVED_UNEXPECTED_MSG_IM_READ_DIGITIZER_COORDS > endif mov ds:[inkStatus], ICS_SKIP_UNTIL_START_SELECT clr bp mov di, MSG_META_NOTIFY_WITH_DATA_BLOCK mov cx, MANUFACTURER_ID_GEOWORKS mov dx, GWNT_INK mov al, mask MF_DATA .leave ret SendClear endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SendInk %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Sends the ink off to the UI. CALLED BY: GLOBAL PASS: ds - kdata RETURN: di - MSG_META_NOTIFY_WITH_DATA_BLOCK to send to output bp - data to send with MSG_META_NOTIFY_WITH_DATA_BLOCK al - MF_DATA DESTROYED: es, ah, bx PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 11/27/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ SendInk proc near if INK_DIGITIZER_COORDS EC < cmp di, MSG_IM_READ_DIGITIZER_COORDS > EC < ERROR_E INK_RECEIVED_UNEXPECTED_MSG_IM_READ_DIGITIZER_COORDS > endif mov ds:[inkStatus], ICS_SKIP_UNTIL_START_SELECT call AppendPointsToInkBlock ;es<- segment locked ;ink block ;bx <- handle ink block pushf clr ds:[inkHandle] clr ds:[inkNumStrokes] call PointBufferGetCount call PointBufferDelete ;Delete the data from the ; buffer. popf jc sendMessage ;If error, branch to pass bp=0 ; Init InkHeader<> mov ax, 1 call MemInitRefCount ; Init ref count to one, ; for usage of sending out ; MSG_META_NOTIFY_WITH_DATA_BLOCK ; (recipient must dec count) EC < tst es:[IH_count] > EC < ERROR_Z NUM_INK_POINTS_IS_ZERO > mov ax, ds:[inkUpperLeftBounds].P_x mov es:[IH_bounds].R_left, ax mov ax, ds:[inkUpperLeftBounds].P_y mov es:[IH_bounds].R_top, ax mov ax, ds:[inkLowerRightBounds].P_x mov es:[IH_bounds].R_right, ax mov ax, ds:[inkLowerRightBounds].P_y mov es:[IH_bounds].R_bottom, ax call MemUnlock ;Unlock the data block sendMessage: push bp call EraseInk ;Erase the ink... pop bp ; Pass the MSG_META_NOTIFY_WITH_DATA_BLOCK to the output... mov di, MSG_META_NOTIFY_WITH_DATA_BLOCK mov cx, MANUFACTURER_ID_GEOWORKS mov dx, GWNT_INK mov al, mask MF_DATA ret SendInk endp if INK_DIGITIZER_COORDS COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SendInkCoords %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Sends the ink digitizer coords notification off to the UI and then switches to the ICS_JUST_SEND_INK state to send the ink screen points notification. CALLED BY: (INTERNAL) InkInputMonitor, CollectAndDrawAfterStartSelect PASS: ds - kdata RETURN: di - MSG_META_NOTIFY_WITH_DATA_BLOCK to send to output bp - data to send with MSG_META_NOTIFY_WITH_DATA_BLOCK al - mask MF_DATA or mask MF_MORE_TO_DO DESTROYED: ah, bx SIDE EFFECTS: inkStatus changed to ICS_JUST_SEND_INK. PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- lester 11/27/96 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ SendInkCoords proc near mov ds:[inkStatus], ICS_JUST_SEND_INK clr bp xchg bp, ds:[inkCoordsBlockHan] tst bp jz sendNotification mov bx, bp mov ax, 1 call MemInitRefCount ; Init ref count to one, ; for usage of sending out ; MSG_META_NOTIFY_WITH_DATA_BLOCK ; (recipient must dec count) ; Pass the MSG_META_NOTIFY_WITH_DATA_BLOCK to the output... sendNotification: mov di, MSG_META_NOTIFY_WITH_DATA_BLOCK mov cx, MANUFACTURER_ID_GEOWORKS mov dx, GWNT_INK_DIGITIZER_COORDS mov al, mask MF_DATA or mask MF_MORE_TO_DO ret SendInkCoords endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SendInkAndThenSendCachedStartSelect %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Sends the ink screen points notification off to the UI and then switches to the ICS_SEND_CACHED_START_SELECT state to send the cached start select. CALLED BY: (INTERNAL) InkInputMonitor PASS: ds - kdata RETURN: di - MSG_META_NOTIFY_WITH_DATA_BLOCK to send to output bp - data to send with MSG_META_NOTIFY_WITH_DATA_BLOCK al - mask MF_DATA or mask MF_MORE_TO_DO DESTROYED: es, ah, bx SIDE EFFECTS: inkStatus changed to ICS_SEND_CACHED_START_SELECT PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- lester 12/ 3/96 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ SendInkAndThenSendCachedStartSelect proc near ; ; Send off the screen points notification. ; call SendInk ; ; Switch to the ICS_SEND_CACHED_START_SELECT state to send ; the cached start select. ; ornf al, mask MF_MORE_TO_DO mov ds:[inkStatus], ICS_SEND_CACHED_START_SELECT ret SendInkAndThenSendCachedStartSelect endp endif ; INK_DIGITIZER_COORDS COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SkipUntilStartSelect %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: This monitor routine skips all ptr events until a START_SELECT is encountered. CALLED BY: GLOBAL PASS: same as an InputMonitor routine if MSG_META_MOUSE_BUTTON or MSG_META_MOUSE_PTR cx,dx - ptr position bp - ButtonInfo if MSG_IM_READ_DIGITIZER_COORDS bp = ReadDigitizerCoordsFlags If RDCF_STROKE_DROPPED is clear: cx = number of coordinates to read (may be zero) ds - kdata RETURN: same as an InputMonitor routine DESTROYED: bx? PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 11/19/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ SkipUntilStartSelect proc near if INK_DIGITIZER_COORDS cmp di, MSG_IM_READ_DIGITIZER_COORDS je eatCoords endif cmp di, MSG_META_MOUSE_BUTTON jne exit test bp, mask BI_B0_DOWN ;First, make sure button 0 is down jz exit ;Exit if not. ;If any other mouse buttons down, ; exit (isn't a START_SELECT) test bp, mask BI_B1_DOWN or mask BI_B2_DOWN or mask BI_B3_DOWN jnz exit ; tell the mouse driver to not combine events (so that we don't ; lose any) push cx mov cl, MCM_NO_COMBINE call SetMouseCombineMode pop cx test bp, mask BI_BUTTON ;Now, check if it had changed from last jnz exit ; time. Exit if not (this was not a ; start select) EC < tst cx > EC < ERROR_S PTR_EVENT_WITH_NEGATIVE_COORDINATE > EC < tst dx > EC < ERROR_S PTR_EVENT_WITH_NEGATIVE_COORDINATE > call PointBufferAppend jc isError mov ds:[inkStatus], ICS_COLLECT_UNTIL_END_SELECT exit: ret isError: ; If this is an error, put us in error mode. We eat all ptr events from ; the start select to the end select. clr bx xchg bx, ds:[inkHandle] tst bx jz noBlock call MemFree noBlock: mov ds:[inkStatus], ICS_EAT_EVENTS_UNTIL_END_SELECT and al, not mask MF_DATA jmp exit if INK_DIGITIZER_COORDS eatCoords: ; Eat the digitizer coords since we're not currently collecting ink. call DigitizerCoordsEat clr al ; Indicate data consumed jmp exit endif SkipUntilStartSelect endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% CollectUntilEndSelect %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Collects data until an END_SELECT is reached. CALLED BY: GLOBAL PASS: di - event type if MSG_META_MOUSE_BUTTON or MSG_META_MOUSE_PTR cx,dx - ptr position bp - ButtonInfo if MSG_IM_READ_DIGITIZER_COORDS bp = ReadDigitizerCoordsFlags If RDCF_STROKE_DROPPED is clear: cx = number of coordinates to read (may be zero) ds - kdata RETURN: same as monitor DESTROYED: bx? PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 11/19/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ CollectUntilEndSelect proc near cmp di, MSG_META_MOUSE_PTR je addPoint if INK_DIGITIZER_COORDS cmp di, MSG_IM_READ_DIGITIZER_COORDS je storeCoords endif cmp di, MSG_META_MOUSE_BUTTON jne exit EC < tst cx > EC < ERROR_S PTR_EVENT_WITH_NEGATIVE_COORDINATE > EC < tst dx > EC < ERROR_S PTR_EVENT_WITH_NEGATIVE_COORDINATE > test bp, mask BI_B0_DOWN jne addPoint ornf cx, 0x8000 ;If this is an END_SELECT, ; then set high bit in coord ; to signify that it is the ; end of a stroke. inc ds:[inkNumStrokes] mov ds:[inkStatus], ICS_SKIP_UNTIL_START_SELECT addPoint: call PointBufferAppend jnc noError call PointBufferTerminate noError: andnf cx, 0x7fff exit: ret if INK_DIGITIZER_COORDS storeCoords: ; Store the digitizer coords in the notification block clr al ; Indicate data consumed call DigitizerCoordsStore ; ignore any error jmp exit endif CollectUntilEndSelect endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SendCachedStartSelect %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: This routine returns the cached start select msg. CALLED BY: GLOBAL PASS: nada RETURN: di, ax, cx, dx, bp - appropriate data to return. DESTROYED: nada PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 2/21/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ SendCachedStartSelect proc near if INK_DIGITIZER_COORDS EC < cmp di, MSG_IM_READ_DIGITIZER_COORDS > EC < ERROR_E INK_RECEIVED_UNEXPECTED_MSG_IM_READ_DIGITIZER_COORDS > endif mov di, MSG_META_MOUSE_BUTTON mov cx, ds:[inkPenSavedCX] mov dx, ds:[inkPenSavedDX] mov bp, ds:[inkPenSavedBP] call LimitPtrToScreenLimits mov al, mask MF_DATA GOTO SkipUntilStartSelect SendCachedStartSelect endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DrawInkLine %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: This routine draws a line from the old "inkCurPoint" to the point passed in. CALLED BY: GLOBAL PASS: cx, dx - new point to draw to ds - kdata inkCurPoint - old point to draw from RETURN: inkCurPoint - updated to point to this DESTROYED: nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: Setting the bounds of the ink was changed to include the width of the ink. This has the advantage of allowing anyone who uses the ink, to use the bounds of the ink to invalidate the ink. However, it has the disadvantage of having the bound be slightly larger then the actual ink. REVISION HISTORY: Name Date Description ---- ---- ----------- atw 11/20/91 Initial version IP 05/04/94 modified to handle ink width %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ DrawInkLine proc near uses ax, bx, cx, dx, di, si .enter EC < call AssertDSKdata > shl cx ;Sign-extend the 15-bit value in CX sar cx ; to be 16 bits ; Update the bounds of the ink ; add ink width/2 + 1 and height/2 + 1 to ink bounds ; mov ax, ds:[inkBrushSize] clr bx mov bl, ah shr bx, 1 inc bx clr ah shr ax, 1 inc ax cmp ds:[inkUpperLeftBounds].P_x, 0x7fff je doSet sub cx, bx cmp cx, ds:[inkUpperLeftBounds].P_x jg 3$ mov ds:[inkUpperLeftBounds].P_x, cx 3$: sub dx, ax cmp dx, ds:[inkUpperLeftBounds].P_y jg 5$ mov ds:[inkUpperLeftBounds].P_y, dx 5$: shl bx, 1 add cx, bx cmp cx, ds:[inkLowerRightBounds].P_x jl 7$ mov ds:[inkLowerRightBounds].P_x, cx 7$: shl ax, 1 add dx, ax cmp dx, ds:[inkLowerRightBounds].P_y jl 20$ mov ds:[inkLowerRightBounds].P_y, dx 20$: shr bx, 1 sub cx, bx shr ax, 1 sub dx, ax ; Update the inkCurPoint and inkOldPoint variables mov ax, ds:[inkCurPoint].P_x mov ds:[inkOldPoint].P_x, ax mov ax, ds:[inkCurPoint].P_y mov ds:[inkOldPoint].P_y, ax mov ds:[inkCurPoint].P_x, cx mov ds:[inkCurPoint].P_y, dx ; Draw this line segment push ds, bp mov si, offset inkOldPoint ; mov ax, ds:[inkBrushSize] ;AX <- width/height of brush mov bx, ds:[lockedInkWin] call MemDerefES ;ES <- locked window push ds mov bx, ds:[lockedInkGState] ;DS <- locked gstate call MemDerefDS pop bx ;BX:SI <- array of points mov di, DR_VID_POLYLINE call es:[W_driverStrategy] ;Call video driver pop ds, bp .leave ret doSet: ; ; add ink width and height to ink bounds ; mov ds:[inkUpperLeftBounds].P_x, cx sub ds:[inkUpperLeftBounds].P_x, bx mov ds:[inkUpperLeftBounds].P_y, dx sub ds:[inkUpperLeftBounds].P_y, ax mov ds:[inkLowerRightBounds].P_x, cx add ds:[inkLowerRightBounds].P_x, bx mov ds:[inkLowerRightBounds].P_y, dx add ds:[inkLowerRightBounds].P_y, ax jmp 20$ DrawInkLine endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% StartTimeoutTimerAndWaitForStartSelect %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: This routine starts the timeout timer and goes to the COLLECT_AND_DRAW_AFTER_START_SELECT state CALLED BY: GLOBAL PASS: ds - kdata RETURN: inkTimer* variables set DESTROYED: bx PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 11/20/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ StartTimeoutTimerAndWaitForStartSelect proc near uses ax, cx, dx class IMClass .enter EC < call AssertDSKdata > mov ds:[inkStatus], ICS_COLLECT_AND_DRAW_AFTER_START_SELECT mov al, TIMER_EVENT_ONE_SHOT mov bx, ds:[imThread] mov cx, ds:[penTimeout] mov dx, MSG_IM_INK_TIMEOUT call TimerStart mov ds:[inkTimerHan], bx mov ds:[inkTimerID], ax .leave ret StartTimeoutTimerAndWaitForStartSelect endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GetWidthAndHeightAdjustment %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Gets the width and height to subtract from the current position to center the brush drawing on the pen. CALLED BY: GLOBAL PASS: ds - kdata RETURN: ah - width, al - height DESTROYED: nada PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 6/21/93 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ GetWidthAndHeightAdjustment proc near .enter EC < call AssertDSKdata > mov ax, ds:[inkBrushSize] ; ah = width, al = height sub ax, 101h ; round down shr ah, 1 ; shr al, 1 ; .leave ret GetWidthAndHeightAdjustment endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% CollectAndDrawUntilEndSelect %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Collect points as they come in and draw them. CALLED BY: GLOBAL PASS: same as InputMonitor Routine if MSG_META_MOUSE_BUTTON or MSG_META_MOUSE_PTR cx,dx - ptr position bp - ButtonInfo if MSG_IM_READ_DIGITIZER_COORDS bp = ReadDigitizerCoordsFlags If RDCF_STROKE_DROPPED is clear: cx = number of coordinates to read (may be zero) RETURN: nada DESTROYED: bx, si PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 11/19/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ CollectAndDrawUntilEndSelect proc near cmp di, MSG_META_MOUSE_BUTTON je noIgnore if INK_DIGITIZER_COORDS cmp di, MSG_IM_READ_DIGITIZER_COORDS je storeCoords endif cmp di, MSG_META_MOUSE_PTR jne exit noIgnore: push ax call GetWidthAndHeightAdjustment ;AH = width, al = height sub cl, ah sbb ch, 0 sub dl, al sbb dh, 0 pop ax call DrawInkLine EC < test ch, 0xc0 > EC < ERROR_PO COORDINATE_VALUE_OVERFLOW > andnf cx, 0x7fff ;Convert 16-bit signed x coord ; to 15 bit signed x coord cmp di, MSG_META_MOUSE_PTR je addPoint test bp, mask BI_B0_DOWN jnz addPoint ;Branch if was not end select ornf cx, 0x8000 inc ds:[inkNumStrokes] addPoint: call PointBufferAppend jc isError tst cx js wasEndSelect exit: ret wasEndSelect: ; This is an END_SELECT, so terminate the current segment, start a ; timeout timer, and move into "wait until the next start select and ; then continue collecting ink" mode. call CheckIfGesture jc sendClear call StartTimeoutTimerAndWaitForStartSelect jmp exit isError: call PointBufferTerminate mov ds:[inkStatus], ICS_SEND_INK_ON_END_SELECT tst cx ;We've run out of memory. Send the ink jns exit ; off at the next end select. ; All the ink was recognized as a gesture and therefore ; deleted... However, we still need to send a message to the ; flow object so that is will stop processing ink. sendClear: ornf al, mask MF_MORE_TO_DO mov ds:[inkStatus], ICS_SEND_CLEAR jmp exit if INK_DIGITIZER_COORDS storeCoords: ; Store the digitizer coords in the notification block clr al ; Indicate data consumed call DigitizerCoordsStore jc stopCollecting ; store failed so stop collecting and ; drawing ink ; Check if digitizer coords circular buffer is full test bp, mask RDCF_STROKE_TRUNCATED or mask RDCF_STROKE_DROPPED jz exit ; not full, so continue collecting stopCollecting: mov ds:[inkStatus], ICS_SEND_INK_ON_END_SELECT jmp exit endif ; INK_DIGITIZER_COORDS CollectAndDrawUntilEndSelect endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% CheckIfGesture %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Checks to see if the current data is a gesture. CALLED BY: GLOBAL PASS: ds - kdata RETURN: carry set if gesture DESTROYED: nada PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 1/18/93 Initial version lester 12/16/96 Fixed bug where PointBufferGetNumStrokes was being called with # points just deleted not the # points left after the delete. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ CheckIfGesture proc near .enter tst_clc ds:[inkGestureCallback].high jz noCallback ;Exit with carry clear if no gesture ; callback. ; Move all of the points from the local buffer to the global buffer push ax, bx, cx, dx, bp, di, si, es clr di ;Force a bunch of stack to be free call ThreadBorrowStackSpace push di call AppendPointsToInkBlock cmc jnc popExit ;Exit no-gesture if couldn't copy ; points to buffer. clr ds:[inkHandle] call PointBufferGetCount call PointBufferDelete mov ds:[inkHandle], bx mov ax, offset IH_data pushdw esax ;These args are popped by the callback push es:[IH_count] ; routine mov ax, ds:[inkNumStrokes] cmp ax, 1 je 10$ tst ds:[haveCalledGestureCallback] jnz 10$ ornf ax, mask GCF_FIRST_CALL 10$: push ax movdw bxax, ds:[inkGestureCallback] call ProcCallFixedOrMovable mov ds:[haveCalledGestureCallback], TRUE tst_clc ax jnz deleteGestures ; delete found gestures unlock: mov bx, ds:[inkHandle] call MemUnlock popExit: ; ; we've likely just unlocked the ES block above, and we'll be pop'ing ; ES from the stack anyway so let's defeat the damn EC segment ; checking ; EC < mov di, NULL_SEGMENT > EC < mov es, di > pop di call ThreadReturnStackSpace pop ax, bx, cx, dx, bp, di, si, es noCallback: .leave ret deleteGestures: ; ax = # points recognized as a gesture by the gesture callback cmp ax, es:[IH_count] jne cont push ax, dx, es call EraseInk pop ax, dx, es cont: if INK_DIGITIZER_COORDS if ERROR_CHECK ; This code expects that the points recognized as a gesture ; by the gesture callback will always be a full stroke or ; multiple full strokes. push di mov di, ax Assert ne di, 0 dec di CheckHack <size Point eq 4> shl di shl di test es:[di].IH_data.P_x, mask IXC_TERMINATE_STROKE WARNING_Z WARNING_INK_GESTURE_NOT_FULL_STROKE pop di endif ; ERROR_CHECK ; ; Delete the digitizer coords that correspond to the ; screen coords recognized as a gesture. ; ; Note that there is not a one-to-one correspondence between the ; screen points and the digitizer coords so we need to delete the ; digitizer coords based on the number of strokes recognized as a ; gesture. ; mov cx, ax call PointBufferGetNumStrokes ; dx <- # strokes recognized as gesture call DigitizerCoordsDeleteStrokes endif ; INK_DIGITIZER_COORDS mov cx, ax call PointBufferDelete ; delete all the points ; recognized as a gesture mov cx, es:[IH_count] ; cx <- # points left after delete call PointBufferGetNumStrokes mov ds:[inkNumStrokes], dx tst_clc dx jnz unlock ;It was not all gestures stc jmp popExit ;It was all gestures so inkHandle is null CheckIfGesture endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PointBufferGetNumStrokes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Goes through the list of points in the global buffer and returns the number of strokes CALLED BY: CheckIfGesture PASS: cx - num of points ds idata RETURN: dx - num of strokes DESTROYED: bx SIDE EFFECTS: PSEUDO CODE/STRATEGY: for all points in the global buffer if x coord has high bit set (indicates end of stroke) increment count of strokes return count of strokes REVISION HISTORY: Name Date Description ---- ---- ----------- IP 5/11/94 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ PointBufferGetNumStrokes proc near uses di, ax, cx, es .enter clr dx mov bx, ds:[inkHandle]; tst bx jz exit call MemLock jc exit mov es, ax mov di, offset IH_data sub di, size Point jcxz done loopPoints: add di, size Point test es:[di], mask IXC_TERMINATE_STROKE loopz loopPoints inc dx jcxz done jmp loopPoints done: call MemUnlock exit: .leave ret PointBufferGetNumStrokes endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% CheckIfPointInVisibleRegion %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Checks if the passed point is in the visible region of the window associated with the passed gstate. CALLED BY: GLOBAL PASS: ds - kdata cx, dx - point to test RETURN: carry set if point is in the region. DESTROYED: nada PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 2/21/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ CheckIfPointInVisibleRegion proc near uses ax, bx, ds, si .enter mov bx, ds:[lockedInkWin] call MemDerefDS mov si, ds:[W_visReg] mov si, ds:[si] ;DS:SI <- visible region call GrTestPointInReg .leave ret CheckIfPointInVisibleRegion endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% CollectAndDrawAfterStartSelect %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: This routine waits for a START_SELECT to come in. If one does, it kills the timeout timer, stores the point, draws it, and goes to the COLLECT_AND_DRAW_UNTIL_END_SELECT. CALLED BY: GLOBAL PASS: same as InputMonitor Routine if MSG_META_MOUSE_BUTTON or MSG_META_MOUSE_PTR cx,dx - ptr position bp - ButtonInfo RETURN: nada DESTROYED: ax, bx, si PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 11/20/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ CollectAndDrawAfterStartSelect proc near if INK_DIGITIZER_COORDS EC < cmp di, MSG_IM_READ_DIGITIZER_COORDS > EC < ERROR_E INK_RECEIVED_UNEXPECTED_MSG_IM_READ_DIGITIZER_COORDS > endif cmp di, MSG_META_MOUSE_BUTTON jne exit test bp, mask BI_B0_DOWN ;If the button isn't down, branch jz exit ; The user just continued drawing ink before the timeout period. ; Stop the timeout timer. clr bx xchg bx, ds:[inkTimerHan] clr ax xchg ax, ds:[inkTimerID] call TimerStop ; If we are drawing through an app-supplied gstate, then any clicks ; outside of the associated window should terminate the ink. mov di, ds:[lockedInkGState] cmp di, ds:[inkDefaultGState] je continue call CheckIfPointInVisibleRegion jnc pointOutsideRegion continue: ; Save the point and draw it. mov ds:[inkStatus], ICS_SEND_INK_ON_END_SELECT call GetWidthAndHeightAdjustment sub cl, ah sbb ch, 0 sub dl, al sbb dh, 0 andnf cx, 0x7fff ;Turn into a 15-bit signed ; value call PointBufferAppend ; jc exit ; mov ds:[inkStatus], ICS_COLLECT_AND_DRAW_UNTIL_END_SELECT mov ds:[inkCurPoint].P_x, cx ;Draw a point at this coord. mov ds:[inkCurPoint].P_y, dx call DrawInkLine ; exit: ret pointOutsideRegion: if INK_DIGITIZER_COORDS ; ; Send off the ink digitizer coordinates notification and then ; switch to the ICS_SEND_INK_AND_THEN_SEND_CACHED_START_SELECT ; state to send off the ink screen points notification and then ; send the cached start select. ; call SendInkCoords Assert bitSet al, MF_MORE_TO_DO mov ds:[inkStatus], ICS_SEND_INK_AND_THEN_SEND_CACHED_START_SELECT else call SendInk ornf al, mask MF_MORE_TO_DO mov ds:[inkStatus], ICS_SEND_CACHED_START_SELECT endif ; INK_DIGITIZER_COORDS jmp exit CollectAndDrawAfterStartSelect endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% EatEventsUntilEndSelect %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: This routine eats all events until the next "end select". CALLED BY: GLOBAL PASS: ds - kdata if MSG_IM_READ_DIGITIZER_COORDS bp = ReadDigitizerCoordsFlags If RDCF_STROKE_DROPPED is clear: cx = number of coordinates to read (may be zero) RETURN: nada DESTROYED: nada PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 11/27/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ EatEventsUntilEndSelect proc near cmp di, MSG_META_MOUSE_PTR ;Eat all ptr events je eat cmp di, MSG_META_MOUSE_DRAG ;Eat all drag events je eat if INK_DIGITIZER_COORDS cmp di, MSG_IM_READ_DIGITIZER_COORDS je eatCoords endif cmp di, MSG_META_MOUSE_BUTTON ;Eat all button events until jne exit ; button 0 goes up test bp, mask BI_B0_DOWN jnz eat mov ds:[inkStatus], ICS_SKIP_UNTIL_START_SELECT eat: clr al ; Indicate data consumed exit: ret if INK_DIGITIZER_COORDS eatCoords: ; Eat the digitizer coords since we're not currently collecting ink. call DigitizerCoordsEat jmp eat endif ; INK_DIGITIZER_COORDS EatEventsUntilEndSelect endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SendInkOnEndSelect %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: This routine waits until an end select happens, then sends the ink off. CALLED BY: GLOBAL PASS: ds - kdata RETURN: nada DESTROYED: nada PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 11/27/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ SendInkOnEndSelect proc near if INK_DIGITIZER_COORDS cmp di, MSG_IM_READ_DIGITIZER_COORDS je storeCoords endif cmp di, MSG_META_MOUSE_BUTTON jne exit test bp, mask BI_B0_DOWN ;Wait until button 0 goes back up jne exit ; (an END_SELECT). ornf al, mask MF_MORE_TO_DO if INK_DIGITIZER_COORDS mov ds:[inkStatus], ICS_SEND_INK_COORDS else mov ds:[inkStatus], ICS_JUST_SEND_INK endif exit: ret if INK_DIGITIZER_COORDS storeCoords: ; We're in this state because either the screen points block is full ; or the digitizer coords block is full. It would be nice to only ; store the digitizer coordinates that correspond to screen points ; that we have collected but we don't know what digitizer correspond ; to what screen points, so we'll just store all the digitizer ; coordinates we can and ignore any error. call DigitizerCoordsStore ; ignore any error clr al ; Indicate data consumed jmp exit endif ; INK_DIGITIZER_COORDS SendInkOnEndSelect endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PointBufferInit %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Initializes the point buffer so it is ready to get data. CALLED BY: GLOBAL PASS: ds - kdata RETURN: nada DESTROYED: nada PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 11/21/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ PointBufferInit proc near uses ax, es .enter EC < call AssertDSKdata > mov es, ds:[inkData] clr es:[CBS_count] clr ds:[inkNumStrokes] EC < mov es:[CBS_start], -1 > EC < mov es:[CBS_last], -1 > .leave ret PointBufferInit endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PointBufferAppend %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Appends a point to the point buffer. CALLED BY: GLOBAL PASS: cx, dx - point to append ds - idata RETURN: carry set if points could not fit DESTROYED: nada PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 11/21/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ PointBufferAppend proc near uses ax, di, es .enter EC < call AssertDSKdata > ; Check if too many points, or no points yet mov es, ds:[inkData] cmp es:[CBS_count], MAX_INK_POINTS je bufferFull EC < ERROR_A TOO_MANY_INK_POINTS > tst es:[CBS_count] jz noPoints ; Point to the next place to blast points. mov di, es:[CBS_last] add di, size Point cmp di, INK_DATA_BUFFER_SIZE je doWrap EC < ERROR_A INK_DATA_EXCEEDED_BOUNDS_OF_BUFFER > doStoreAndInc: mov es:[CBS_last], di inc es:[CBS_count] mov es:[di].P_x, cx mov es:[di].P_y, dx clc exit: .leave ret doWrap: mov di, offset CBS_data jmp doStoreAndInc bufferFull: ; Our local buffer is full, so append the points to the global block push es push cx, dx, bp call AppendPointsToInkBlock pop cx, dx, bp jc popESExit ;If we couldn't alloc the global ; block, branch to exit cmp es:[IH_count], TOTAL_MAX_INK_POINTS pop es call MemUnlock ;Unlock the block mov es:[CBS_count], 0 jae tooManyPoints ;If we already have a huge # of ; pts in the buffer, branch to stop ; storing any. noPoints: mov di, offset CBS_data mov es:[CBS_start], di jmp doStoreAndInc tooManyPoints: stc jmp exit popESExit: pop es jmp exit PointBufferAppend endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PointBufferGetCount %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: This routine returns the # points in the point buffer (the circular buffer) CALLED BY: GLOBAL PASS: ds - idata RETURN: cx - # points DESTROYED: nada PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 11/21/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ PointBufferGetCount proc near uses es .enter EC < call AssertDSKdata > mov es, ds:[inkData] mov cx, es:[CBS_count] .leave ret PointBufferGetCount endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PointBufferDelete %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: This routine deletes the first cx points from the point buffer if inkHandle is not 0 then from inkHandle buffer, otherwise from the inkdata buffer and then any leftovers from the inkHandle buffer. Shifting the remaining points to the beginning of the buffer CALLED BY: GLOBAL PASS: cx - # points to delete ds - idata RETURN: nada DESTROYED: nada PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 11/21/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ PointBufferDelete proc near uses es, bx, cx .enter EC < call AssertDSKdata > tst cx LONG jz exit tst ds:[inkHandle] jz noGlobalBuffer mov bx, ds:[inkHandle] call MemLock mov es, ax cmp cx, es:[IH_count] jae freeBlock sub es:[IH_count], cx ; ; Move the points from the end of the point buffer to the current point. ; push ds, si, di, cx segmov ds, es mov si, cx shl si, 1 shl si, 1 mov di, offset IH_data ;ES:DI <- ptr to place for first point add si, di ;DS:SI <- ptr to new first point (after ; delete) mov cx, es:[IH_count] shl cx, 1 ;CX <- size of points (in words) EC < call ECCheckBounds > rep movsw EC < dec si > EC < call ECCheckBounds > pop ds, si, di, cx call MemUnlock jmp exit freeBlock: sub cx, es:[IH_count] ;CX <- # points left to ; delete clr ds:[inkHandle] call MemFree jcxz exit noGlobalBuffer: mov es, ds:[inkData] cmp cx, es:[CBS_count] je justClearCount EC < ERROR_A CANNOT_DELETE_MORE_POINTS_THAN_EXIST > push cx shl cx, 1 ;CX <- size of a Point shl cx, 1 add es:[CBS_start], cx cmp es:[CBS_start], INK_DATA_BUFFER_SIZE jb 10$ sub es:[CBS_start], (INK_DATA_BUFFER_SIZE - size CircularBufferStruct) 10$: pop cx justClearCount: sub es:[CBS_count], cx exit: .leave ret PointBufferDelete endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PointBufferEnum %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: This routine calls the passed callback routine with each point in the buffer. CALLED BY: GLOBAL PASS: ds - idata cx:dx - vfptr to routine to call AX, BX, BP,ES - data for routine Callback routine gets passed: CX, DX - Point values AX,BX,BP,ES - data passed in to PointBufferEnum (possibly modified by previous callback routines) Callback routine returns: AX,BX,BP - modified if desired carry set if we want to stop the enumeration Can destroy: cx, dx RETURN: AX, BX, BP, ES - data returned. carry set if enumeration was aborted DESTROYED: nada PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 11/21/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ PointBufferEnum proc near uses ds, di, si .enter EC < call AssertDSKdata > pushdw cxdx mov si, sp tst ds:[inkHandle] jz afterOverflow ; ; Some of the collected points have been moved to a global block. ; Process them first. ; push ds push bx, ax mov bx, ds:[inkHandle] call MemLock mov ds, ax pop bx, ax push ds:[IH_count] mov di, offset IH_data ;Carry should always be clear from MemLock above EC < ERROR_C -1 > nextPoint: dec ds:[IH_count] js unlock mov cx, ds:[di].P_x mov dx, ds:[di].P_y add di, size Point ; We need to call the callback with ProcCallFixedOrMovable, ; since we can be XIP'ed. ; -- todd mov ss:[TPD_dataAX], ax mov ss:[TPD_dataBX], bx movdw bxax, ss:[si] call ProcCallFixedOrMovable jnc nextPoint unlock: pop ds:[IH_count] pop ds push bx mov bx, ds:[inkHandle] call MemUnlock pop bx jc exit afterOverflow: mov ds, ds:[inkData] tst ds:[CBS_count] je exit ; Set up a call vector on the stack mov di, ds:[CBS_start] loopTop: ; ; Loop variables: ; ES:DI - ptr to next point to pass to callback routine ; ES:0 - CircularBufferStruct ; SS:SI - ptr to callback routine ; mov cx, ds:[di].P_x mov dx, ds:[di].P_y ; We need to call the callback with ProcCallFixedOrMovable, ; since we can be XIP'ed. ; -- todd mov ss:[TPD_dataAX], ax mov ss:[TPD_dataBX], bx movdw bxax, ss:[si] call ProcCallFixedOrMovable jc exit cmp di, ds:[CBS_last] je exit ;This clears the carry add di, size Point cmp di, INK_DATA_BUFFER_SIZE EC < ERROR_A INK_ENUM_EXCEEDED_END_OF_BUFFER > jne loopTop mov di, offset CBS_data jmp loopTop exit: popdw cxdx .leave ret PointBufferEnum endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PointBufferTerminate %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: This routine terminates the most-recently-appended point. This is only called if there was an error. If so, we terminate the ink data that has been stored in the global block. CALLED BY: GLOBAL PASS: ds - kdata RETURN: nada DESTROYED: nada PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 11/27/91 Initial version lester 12/15/96 Fixed to terminate the last point in the global block not the point after the last one. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ PointBufferTerminate proc near uses es, di, bx .enter ; Change this to terminate the ink buffer. mov bx, ds:[inkHandle] tst bx jz noGlobalBlock push ax call MemLock mov es, ax mov di, es:[IH_count] Assert ne di, 0 dec di shl di, 1 shl di, 1 ornf es:[di].IH_data.P_x, 0x8000 call MemUnlock pop ax exit: .leave ret noGlobalBlock: mov es, ds:[inkData] tst es:[CBS_count] jz exit mov di, es:[CBS_last] ornf es:[di].P_x, 0x8000 jmp exit PointBufferTerminate endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PointBufferModify %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Modify the points in the buffer CALLED BY: INTERNAL InkReplyHandler PASS: ds - idata RETURN: nothing DESTROYED: nothing PSEUDO CODE/STRATEGY: This routine centers each of the data points around the digitized point, by subtracting half of the Brush size from each point, in both X and Y. KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- jim 6/10/93 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ PointBufferModify proc near uses ax, bx, cx, dx, di, ds .enter EC < call AssertDSKdata > ; Some of the collected points have been moved to a global ; block. Process them first. call GetWidthAndHeightAdjustment tst ax ; if nothing to do, exit LONG jz exit mov dl, ah ; setup ax and dx as mod clr ah, dh ; values. xchg dx, ax ; ax = width, dx = height tst ds:[inkHandle] ; see if there is an extra jz afterOverflow ; data block ; lock the block and modify those values first. push ds push bx, ax mov bx, ds:[inkHandle] call MemLock mov ds, ax pop bx, ax mov cx, ds:[IH_count] jcxz unlock mov di, offset IH_data ; ds:di -> Points nextPoint: call modifyPoint add di, size Point jc unlock ; shouldn't wrap around loop nextPoint ; done modifying the block, unlock it. unlock: pop ds ; restore ds -> kdata push bx ; release the block mov bx, ds:[inkHandle] call MemUnlock pop bx jc exit ; bail on strange errors ; done with block, so do the circular buffer. afterOverflow: mov ds, ds:[inkData] ; ds -> circular buffer tst ds:[CBS_count] ; if no points there, done jz exit mov di, ds:[CBS_start] ; start at beginning :-) loopTop: call modifyPoint cmp di, ds:[CBS_last] ; if done, bail. je exit add di, size Point cmp di, INK_DATA_BUFFER_SIZE ; if last, wrap around jne loopTop mov di, offset CBS_data jmp loopTop exit: .leave ret modifyPoint: ; ; DS:DI - ptr to Point structure ; AX - value to modify X coord ; (high bit is end-of-stroke flag) ; DX - value to modify Y coord ; sub ds:[di].P_y, dx ; Convert the 15-bit signed value in AX (the high bit is set if the ; point ends a stroke) to a 16-bit signed value, perform the ; modification, and restore the end-of-stroke flag. shl ds:[di].P_x ;CARRY <- end of stro pushf sar ds:[di].P_x ;Sign extend X coord sub ds:[di].P_x, ax EC < test ds:[di].P_x.high, 0xc0 > EC < ERROR_PO COORDINATE_VALUE_OVERFLOW > ; Set the high bit (end of stroke flag) appropriately shl ds:[di].P_x ; popf rcr ds:[di].P_x retn PointBufferModify endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ImSetMouseBuffer %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Tell the mouse driver to start storing digitizer coordinates in the digitizer coords circular buffer if it exists. CALLED BY: GLOBAL PASS: nothing RETURN: carry set if mouse driver does not support storing digitizer coordinates DESTROYED: nothing SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- lester 11/25/96 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ImSetMouseBuffer proc far if INK_DIGITIZER_COORDS uses cx,di,ds .enter ; ; Tell the mouse driver to start storing digitizer coordinates ; in the circular buffer. ; LoadVarSeg ds, cx mov cx, ds:[inkCoordsBuffer] ; cx - buffer segment tst_clc cx jz exit ; no buffer, exit w/carry clear mov di, DR_MOUSE_ESC_SET_MOUSE_COORD_BUFFER call CallMouseStrategy EC < WARNING_C WARNING_MOUSE_DR_DOES_NOT_SUPPORT_SET_BUFFER > jc error exit: .leave ret error: ; ; Error, free the buffer ; push bx clr bx mov ds:[inkCoordsBuffer], bx xchg bx, ds:[inkCoordsBufferHan] ; bx - buffer handle call MemFree pop bx jmp exit else ; Ink digitizer coords not supported stc ret endif ; INK_DIGITIZER_COORDS ImSetMouseBuffer endp if INK_DIGITIZER_COORDS COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% AllocateDigitizerCoordsBuffer %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: If the appropriate ini entry is true, allocate a circular buffer which we'll share with the mouse driver to store digitizer coordinates. CALLED BY: (INTERNAL) ImStartPenMode PASS: ds - kdata RETURN: carry set if couldn't allocate buffer DESTROYED: nothing SIDE EFFECTS: PSEUDO CODE/STRATEGY: It would be nice to call the mouse driver with MOUSE_ESC_SET_BUFFER in this routine but the mouse driver is not loaded at this point in time. So, we provide a global routine, ImSetMouseBuffer, that the UI can call after it loads the mouse driver. REVISION HISTORY: Name Date Description ---- ---- ----------- lester 11/24/96 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ inkCoordsCategory char "system",0 inkCoordsKey char "inkDigitizerCoords",0 AllocateDigitizerCoordsBuffer proc near uses ax,bx,cx,dx,si .enter ; ; Check if ini flag is set ; push ds segmov ds, cs, cx ; ds, cx <= cs mov si, offset inkCoordsCategory mov dx, offset inkCoordsKey clr ax call InitFileReadBoolean pop ds tst_clc ax jnz allocateBuffer exit: .leave ret allocateBuffer: ; ; Allocate fixed circular buffer ; EC < call AssertDSKdata > mov bx, handle 0 mov cx, mask HF_FIXED mov ax, size MouseCoordsCircularBufferStruct call MemAllocSetOwnerFar jc exit EC < tst_clc ds:[inkCoordsBuffer] > EC < ERROR_NZ IM_SETUP_DIGITIZER_COORDS_BUFFER_WAS_CALLED_TWICE> mov ds:[inkCoordsBuffer], ax mov ds:[inkCoordsBufferHan], bx Assert carryClear jmp exit AllocateDigitizerCoordsBuffer endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% RemoveDigitizerCoordsBuffer %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Tell the mouse driver to stop collecting digitizer coordinates and then free the circular buffer. CALLED BY: (INTERNAL) ImExitPenMode PASS: ds - kdata RETURN: nothing DESTROYED: nothing SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- lester 11/24/96 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ RemoveDigitizerCoordsBuffer proc near uses bx,di .enter EC < call AssertDSKdata > ; ; Tell the mouse driver to stop using the buffer ; mov di, DR_MOUSE_ESC_REMOVE_MOUSE_COORD_BUFFER call CallMouseStrategy EC < ERROR_C ERROR_REMOVING_DIGITIZER_COORDS_BUFFER > ; ; Now, free the buffer ; clr bx mov ds:[inkCoordsBuffer], bx xchg bx, ds:[inkCoordsBufferHan] ; bx - buffer handle call MemFree .leave ret RemoveDigitizerCoordsBuffer endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% CallMouseStrategy %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Call the mouse driver strategy CALLED BY: (INTERNAL) AllocateDigitizerCoordsBuffer, RemoveDigitizerCoordsBuffer PASS: di - MouseFunction to call others - arguments to pass MouseFunction RETURN: carry set if no mouse driver loaded whatever MouseFunction returns DESTROYED: whatever MouseFunction destroys SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- lester 12/ 3/96 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ CallMouseStrategy proc near uses ds, si .enter ; ; save the args to the strategy call ; push ax, bx ; ; get the mouse handle ; mov ax, GDDT_MOUSE call GeodeGetDefaultDriver ; ; bail if there's none ; tst ax jz noMouseDriver ; ; get the strategy and call it ; mov_tr bx, ax call GeodeInfoDriver pop ax, bx call ds:[si].DIS_strategy exit: .leave ret noMouseDriver: pop ax, bx stc jmp exit CallMouseStrategy endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DigitizerCoordsEat %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Update the circular buffer to indicate that we've read the coordinates but don't store them in the notification block. CALLED BY: (INTERNAL) SkipUntilStartSelect PASS: bp - ReadDigitizerCoordsFlags If RDCF_STROKE_DROPPED is clear: cx = number of coordinates to read (may be zero) ds - kdata ds:[inkCoordsBuffer] - segment of fixed circular buffer RETURN: nothing DESTROYED: nothing SIDE EFFECTS: The MCCBS_nextRead field of the digitizer coordinates circular buffer is updated to indicate the coordinates have been read. PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- lester 11/26/96 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ DigitizerCoordsEat proc near uses cx,es .enter EC < call AssertDSKdata > test bp, mask RDCF_STROKE_DROPPED jnz exit ; ; Calculate the new MCCBS_lastRead offset ; Assert ne ds:[inkCoordsBuffer], 0 Assert segment ds:[inkCoordsBuffer] mov es, ds:[inkCoordsBuffer] ; es - segemnt of circular buffer Assert be cx, MAX_MOUSE_COORDS ; sanity check CheckHack <MAX_MOUSE_COORDS lt 0xc000> ; ok to shift left twice CheckHack <size InkPoint eq 4> ; cx - # coords to read if ERROR_CHECK ; Replace the eaten coords with 0x1111 for your debugging pleasure ; cx - # coords to eat push bx, cx mov bx, es:[MCCBS_nextRead] loopTop: mov es:[bx].IP_x, 0x1111 ; eat X coord mov es:[bx].IP_y, 0x1111 ; eat Y coord add bx, size InkPoint cmp bx, offset MCCBS_data + size MCCBS_data jb noWrap EC < ERROR_A ASSERTION_FAILED > mov bx, offset MCCBS_data ; wrap to front of circular buffer noWrap: loop loopTop ; still hungry? pop bx, cx endif ; ERROR_CHECK shl cx, 1 shl cx, 1 ; cx - # bytes to read add cx, es:[MCCBS_nextRead] ; cx - new next read offset ; wrap around end of circular buffer if necessary cmp cx, offset MCCBS_data + size MCCBS_data jb storeOffset sub cx, size MCCBS_data ; wrap to the buffer front storeOffset: ; store the new MCCBS_lastRead offset mov es:[MCCBS_nextRead], cx exit: .leave ret DigitizerCoordsEat endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DigitizerCoordsStore %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Reads the digitizer coordinates from the circular buffer and appends them to the notification block. Terminates the last digitizer coordinates if the block is full or if the ReadDigitizerCoordsFlags indicate the circular buffer has filled up. CALLED BY: (INTERNAL) CollectUntilEndSelect, CollectAndDrawUntilEndSelect, SendInkOnEndSelect PASS: bp - ReadDigitizerCoordsFlags If RDCF_STROKE_DROPPED is clear: cx = number of coordinates to read (may be zero) ds - kdata ds:[inkCoordsBuffer] - segment of fixed circular buffer ds:[inkCoordsBlockHan] - handle of notification block or 0 RETURN: carry set if error if allocation failure, bx=0 if coords could not fit, bx=handle of notification block -else- bx = handle of notification block DESTROYED: nothing SIDE EFFECTS: If there is no notification block, one is created and the handle is stored in ds:[inkCoordsBlockHan]. Otherwise, the notification block is expanded to hold the new coordinates. If the coords could not fit in the notification block, they are eaten. The MCCBS_nextRead field of the digitizer coordinates circular buffer is update to indicate the coordinates have been read. PSEUDO CODE/STRATEGY: KNOWN BUGS: REVISION HISTORY: Name Date Description ---- ---- ----------- lester 11/26/96 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ DigitizerCoordsStore proc near uses ax,cx,si,di,ds,es .enter test bp, mask RDCF_STROKE_DROPPED LONG jnz exit EC < call AssertDSKdata > ; sanity check on the number of coords Assert be cx, MAX_MOUSE_COORDS ; Check if we have a notification block mov bx, ds:[inkCoordsBlockHan] tst bx LONG jz allocateNewBlock ; bx - handle of notification block ; Lock the notification block call MemLock mov es, ax ; es - segemnt of notification block ; ; Check if the block is already full ; mov ax, es:[IDCH_count] ; ax - old count cmp ax, TOTAL_MAX_INK_COORDS; already full? LONG jae blockFull add ax, cx ; ax - new count ; ; Expand the block to hold the new coords ; ; ax - # coords block should hold ; bx - handle of notification block push cx, ax CheckHack <size InkPoint eq 4> shl ax, 1 shl ax, 1 ; ax - # bytes for coords add ax, size InkDigitizerCoordsHeader ; ax - new size of block clr ch call MemReAlloc mov_tr es, ax ; es - segment of notification block pop cx, ax ; cx - # coords to read, ax - total # of coords jc reallocFailed ; ; Copy the coordinates into the notification block ; copyCoords: ; es - segment of notification block ; ds - kdata ; cx - # coords to copy ; ax - # coords block will hold after copy ; Get segment of circular buffer Assert ne ds:[inkCoordsBuffer], 0 Assert segment ds:[inkCoordsBuffer] mov ds, ds:[inkCoordsBuffer] ; ds - segemnt of circular buffer ; setup for copy mov si, ds:[MCCBS_nextRead] ; ds:si - ptr to source mov di, es:[IDCH_count] ; di - # coords in notification block shl di, 1 shl di, 1 ; di - # bytes of coords in block add di, offset IDCH_data ; es:di - ptr to dest ; save the new coord count mov_tr es:[IDCH_count], ax loopTop: ; cx - # coords to copy ; ds:si - ptr to source ; es:di - ptr to dest movsw ; copy X coord movsw ; copy Y coord ; Replace the read coords with a special value to indicate ; that they have been read for your debugging pleasure EC < mov ds:[si-4].IP_x, 0x4444 ; replace read X coord > EC < mov ds:[si-4].IP_y, 0x4444 ; replace read Y coord > cmp si, offset MCCBS_data + size MCCBS_data jb noWrap EC < ERROR_A ASSERTION_FAILED > mov si, offset MCCBS_data ; wrap to front of circular buffer noWrap: loop loopTop ; go back for more... afterLoop:: ; Update MCCBS_lastRead mov ds:[MCCBS_nextRead], si ; Unlock notification block call MemUnlock ; If circular buffer is full, terminate the last digitizer coords test bp, mask RDCF_STROKE_TRUNCATED or mask RDCF_STROKE_DROPPED jz circularBufferNotFull call DigitizerCoordsTerminate circularBufferNotFull: clc ; return success ; bx - handle of notification block exit: .leave ret reallocFailed: ; bx - handle of notification block clr ds:[inkCoordsBlockHan] call MemFree allocFailed: EC < WARNING WARNING_INK_DIGITIZER_COORDS_BLOCK_ALLOC_FAILED > clr bx ; indicate allocation failure stcExit: stc ; return failure jmp exit blockFull: ; bx - handle of notification block ; cx - # coords to read ; ds - kdata EC < WARNING WARNING_INK_DIGITIZER_COORDS_BLOCK_FULL > call MemUnlock ; unlock the notification block ; eat the coordinates since they would not fit call DigitizerCoordsEat call DigitizerCoordsTerminate jmp stcExit ; ; Allocate new notification block and initialize it ; allocateNewBlock: ; cx - number of coordinates to read push cx mov_tr ax, cx ; ax - # coords to allocate CheckHack <size InkPoint eq 4> shl ax, 1 shl ax, 1 ; ax - # bytes add ax, size InkDigitizerCoordsHeader ; ax - size of block mov bx, handle 0 mov cx, ALLOC_DYNAMIC_LOCK or mask HF_SHARABLE call MemAllocSetOwnerFar ; ax - segment, bx - handle pop cx jc allocFailed mov ds:[inkCoordsBlockHan], bx mov_tr es, ax ; es - segment of notification block clr es:[IDCH_count] ; initialize count mov ax, cx ; ax, cx - # coords jmp copyCoords DigitizerCoordsStore endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DigitizerCoordsReplaceDummyCoords %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Replaces the dummy digitizer coords that were just stored in the ink digitizer coords notification block with values based on the last X and Y screen positions. CALLED BY: (INTERNAL) DigitizerCoordsStore PASS: ds:si - ptr just after source coords es:di - ptr just after dest coords RETURN: nothing DESTROYED: nothing SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- lester 12/ 8/96 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DigitizerCoordsTerminate %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Terminates the most-recently-stored digitizer coords. CALLED BY: (INTERNAL) DigitizerCoordsStore PASS: ds - kdata ds:[inkCoordsBlockHan] - handle of notification block or 0 RETURN: nothing DESTROYED: nothing SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- lester 11/26/96 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ DigitizerCoordsTerminate proc near uses bx .enter EC < call AssertDSKdata > ; Check if we have a notification block mov bx, ds:[inkCoordsBlockHan] tst bx jz exit ; ; Terminate the last InkPoint ; push ax, es, di call MemLock mov es, ax mov di, es:[IDCH_count] Assert ne di, 0 dec di shl di, 1 shl di, 1 ; di <- offset to last coords ornf es:[di].IDCH_data.IP_x, mask IXC_TERMINATE_STROKE call MemUnlock pop ax, es, di exit: .leave ret DigitizerCoordsTerminate endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DigitizerCoordsDelete %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Delete the first CX digitizer coordinates from the notification block and shift the remaining points to the beginning of the block. CALLED BY: (INTERNAL) InkReplyHandler, CheckIfGesture PASS: cx - # coords to delete ds - kdata ds:[inkCoordsBlockHan] - handle of notification block RETURN: nothing DESTROYED: nothing SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- lester 11/26/96 Initial version (copied from PointBufferDelete) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ DigitizerCoordsDelete proc near uses ax, bx, cx, es .enter EC < call AssertDSKdata > tst cx jz exit mov bx, ds:[inkCoordsBlockHan] tst bx jz exit call MemLock mov es, ax cmp cx, es:[IDCH_count] jae freeBlock sub es:[IDCH_count], cx ; ; Move the points from the end of the block to the front. ; push ds, si, di, cx segmov ds, es mov si, cx shl si, 1 shl si, 1 mov di, offset IDCH_data ;ES:DI <- ptr to place for first point add si, di ;DS:SI <- ptr to new first point (after ; delete) mov cx, es:[IDCH_count] shl cx, 1 ;CX <- size of points (in words) EC < call ECCheckBounds > rep movsw EC < dec si > EC < call ECCheckBounds > pop ds, si, di, cx call MemUnlock exit: .leave ret freeBlock: clr ds:[inkCoordsBlockHan] call MemFree jmp exit DigitizerCoordsDelete endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DigitizerCoordsEnum %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: This routine calls the passed callback routine with each digitizer coord in the notification block. CALLED BY: (INTERNAL) PASS: ds - idata cx:dx - vfptr to routine to call AX, BX, BP,ES - data for routine Callback routine gets passed: CX, DX - Point values AX,BX,BP,ES - data passed in to DigitizerCoordsEnum (possibly modified by previous callback routines) Callback routine returns: AX,BX,BP - modified if desired carry set if we want to stop the enumeration Can destroy: cx, dx RETURN: AX, BX, BP, ES - data returned. carry set if enumeration was aborted DESTROYED: nothing SIDE EFFECTS: PSEUDO CODE/STRATEGY: Some code in the IMPenCode resource calls this routine with a fptr instead of a vfptr which is an optimization that is possible because the caller, callback, and this routine are all in the IMPenCode resource which is fixed. REVISION HISTORY: Name Date Description ---- ---- ----------- lester 12/15/96 Initial version (copied from PointBufferEnum) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ DigitizerCoordsEnum proc near uses ds, di, si .enter EC < call AssertDSKdata > pushdw cxdx mov si, sp tst ds:[inkCoordsBlockHan] clc jz exit push ds push bx, ax mov bx, ds:[inkCoordsBlockHan] call MemLock mov ds, ax pop bx, ax push ds:[IDCH_count] mov di, offset IDCH_data ;Carry should always be clear from MemLock above EC < ERROR_C -1 > nextPoint: dec ds:[IDCH_count] js unlock mov cx, ds:[di].IP_x mov dx, ds:[di].IP_y add di, size InkPoint mov ss:[TPD_dataAX], ax mov ss:[TPD_dataBX], bx movdw bxax, ss:[si] call ProcCallFixedOrMovable jnc nextPoint unlock: pop ds:[IDCH_count] pop ds push bx mov bx, ds:[inkCoordsBlockHan] call MemUnlock pop bx exit: popdw cxdx .leave ret DigitizerCoordsEnum endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DigitizerCoordsDeleteStrokes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Delete the first DX strokes of digitizer coordinates from the notification block and shift the remaining points to the beginning of the block. CALLED BY: (INTERNAL) CheckIfGesture PASS: dx - # strokes to delete ds - kdata ds:[inkCoordsBlockHan] - handle of notification block RETURN: nothing DESTROYED: nothing SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- lester 12/16/96 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ DigitizerCoordsDeleteStrokes proc near uses ax,bx,cx,dx .enter tst dx jz exit mov bx, dx ; bx <- # strokes to delete loopTop: clr ax mov cx, cs mov dx, offset FindLengthOfSegmentCallback CheckHack <segment FindLengthOfSegmentCallback eq @CurSeg> CheckHack <segment FindLengthOfSegmentCallback eq IMPenCode> CheckHack <segment DigitizerCoordsEnum eq @CurSeg> call DigitizerCoordsEnum ; Returns AX = # items in first segment. mov_tr cx, ax ; cx <- # coords to delete call DigitizerCoordsDelete dec bx jnz loopTop exit: .leave ret DigitizerCoordsDeleteStrokes endp endif ; INK_DIGITIZER_COORDS IMPenCode ends endif ;NO_PEN_SUPPORT
24.951334
80
0.615217
ce0b7ca535516db7fe498d12dd7a50079ff82bbf
618
asm
Assembly
oeis/304/A304616.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/304/A304616.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/304/A304616.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A304616: a(n) = 81*n^2 - 69*n + 24. ; 24,36,210,546,1044,1704,2526,3510,4656,5964,7434,9066,10860,12816,14934,17214,19656,22260,25026,27954,31044,34296,37710,41286,45024,48924,52986,57210,61596,66144,70854,75726,80760,85956,91314,96834,102516,108360,114366,120534,126864,133356,140010,146826,153804,160944,168246,175710,183336,191124,199074,207186,215460,223896,232494,241254,250176,259260,268506,277914,287484,297216,307110,317166,327384,337764,348306,359010,369876,380904,392094,403446,414960,426636,438474,450474,462636,474960,487446 mov $1,27 mul $1,$0 sub $1,23 mul $1,$0 div $1,2 mul $1,6 add $1,24 mov $0,$1
51.5
500
0.778317
7937ba12fcb4140a83aa1c104f69bfad3b030356
59,001
asm
Assembly
ioq3/build/release-js-js/baseq3/qcommon/q_shared.asm
RawTechnique/quake-port
2e7c02095f0207831a6026ec23b1c1d75c24f98d
[ "MIT" ]
1
2021-12-31T10:26:58.000Z
2021-12-31T10:26:58.000Z
ioq3/build/release-js-js/missionpack/qcommon/q_shared.asm
unfriendly/quake-port
2e7c02095f0207831a6026ec23b1c1d75c24f98d
[ "MIT" ]
28
2019-03-05T20:45:07.000Z
2019-03-05T20:45:57.000Z
ioq3/build/release-js-js/missionpack/qcommon/q_shared.asm
unfriendly/quake-port
2e7c02095f0207831a6026ec23b1c1d75c24f98d
[ "MIT" ]
null
null
null
export Com_Clamp code proc Com_Clamp 0 0 ADDRFP4 8 ADDRFP4 8 INDIRF4 ASGNF4 ADDRFP4 8 INDIRF4 ADDRFP4 0 INDIRF4 GEF4 $24 ADDRFP4 0 INDIRF4 RETF4 ADDRGP4 $23 JUMPV LABELV $24 ADDRFP4 8 INDIRF4 ADDRFP4 4 INDIRF4 LEF4 $26 ADDRFP4 4 INDIRF4 RETF4 ADDRGP4 $23 JUMPV LABELV $26 ADDRFP4 8 INDIRF4 RETF4 LABELV $23 endproc Com_Clamp 0 0 export COM_SkipPath proc COM_SkipPath 4 0 ADDRFP4 0 ADDRFP4 0 INDIRP4 ASGNP4 ADDRLP4 0 ADDRFP4 0 INDIRP4 ASGNP4 ADDRGP4 $30 JUMPV LABELV $29 ADDRFP4 0 INDIRP4 INDIRI1 CVII4 1 CNSTI4 47 NEI4 $32 ADDRLP4 0 ADDRFP4 0 INDIRP4 CNSTI4 1 ADDP4 ASGNP4 LABELV $32 ADDRFP4 0 ADDRFP4 0 INDIRP4 CNSTI4 1 ADDP4 ASGNP4 LABELV $30 ADDRFP4 0 INDIRP4 INDIRI1 CVII4 1 CNSTI4 0 NEI4 $29 ADDRLP4 0 INDIRP4 RETP4 LABELV $28 endproc COM_SkipPath 4 0 export COM_GetExtension proc COM_GetExtension 16 8 ADDRFP4 0 INDIRP4 ARGP4 CNSTI4 46 ARGI4 ADDRLP4 8 ADDRGP4 qk_strrchr CALLP4 ASGNP4 ADDRLP4 0 ADDRLP4 8 INDIRP4 ASGNP4 ADDRLP4 0 INDIRP4 CVPU4 4 CNSTU4 0 EQU4 $35 ADDRFP4 0 INDIRP4 ARGP4 CNSTI4 47 ARGI4 ADDRLP4 12 ADDRGP4 qk_strrchr CALLP4 ASGNP4 ADDRLP4 4 ADDRLP4 12 INDIRP4 ASGNP4 ADDRLP4 12 INDIRP4 CVPU4 4 CNSTU4 0 EQU4 $37 ADDRLP4 4 INDIRP4 CVPU4 4 ADDRLP4 0 INDIRP4 CVPU4 4 GEU4 $35 LABELV $37 ADDRLP4 0 INDIRP4 CNSTI4 1 ADDP4 RETP4 ADDRGP4 $34 JUMPV LABELV $35 ADDRGP4 $38 RETP4 LABELV $34 endproc COM_GetExtension 16 8 export COM_StripExtension proc COM_StripExtension 20 12 ADDRFP4 0 ADDRFP4 0 INDIRP4 ASGNP4 ADDRFP4 8 ADDRFP4 8 INDIRI4 ASGNI4 ADDRFP4 0 INDIRP4 ARGP4 CNSTI4 46 ARGI4 ADDRLP4 8 ADDRGP4 qk_strrchr CALLP4 ASGNP4 ADDRLP4 0 ADDRLP4 8 INDIRP4 ASGNP4 ADDRLP4 0 INDIRP4 CVPU4 4 CNSTU4 0 EQU4 $40 ADDRFP4 0 INDIRP4 ARGP4 CNSTI4 47 ARGI4 ADDRLP4 12 ADDRGP4 qk_strrchr CALLP4 ASGNP4 ADDRLP4 4 ADDRLP4 12 INDIRP4 ASGNP4 ADDRLP4 12 INDIRP4 CVPU4 4 CNSTU4 0 EQU4 $42 ADDRLP4 4 INDIRP4 CVPU4 4 ADDRLP4 0 INDIRP4 CVPU4 4 GEU4 $40 LABELV $42 ADDRFP4 8 INDIRI4 ADDRLP4 0 INDIRP4 CVPU4 4 ADDRFP4 0 INDIRP4 CVPU4 4 SUBU4 CVUI4 4 CNSTI4 1 ADDI4 GEI4 $44 ADDRLP4 16 ADDRFP4 8 INDIRI4 ASGNI4 ADDRGP4 $45 JUMPV LABELV $44 ADDRLP4 16 ADDRLP4 0 INDIRP4 CVPU4 4 ADDRFP4 0 INDIRP4 CVPU4 4 SUBU4 CVUI4 4 CNSTI4 1 ADDI4 ASGNI4 LABELV $45 ADDRFP4 8 ADDRLP4 16 INDIRI4 ASGNI4 LABELV $40 ADDRFP4 0 INDIRP4 CVPU4 4 ADDRFP4 4 INDIRP4 CVPU4 4 NEU4 $46 ADDRFP4 8 INDIRI4 CNSTI4 1 LEI4 $46 ADDRFP4 8 INDIRI4 CNSTI4 1 SUBI4 ADDRFP4 4 INDIRP4 ADDP4 CNSTI1 0 ASGNI1 ADDRGP4 $47 JUMPV LABELV $46 ADDRFP4 4 INDIRP4 ARGP4 ADDRFP4 0 INDIRP4 ARGP4 ADDRFP4 8 INDIRI4 ARGI4 ADDRGP4 Q_strncpyz CALLV pop LABELV $47 LABELV $39 endproc COM_StripExtension 20 12 export COM_CompareExtension proc COM_CompareExtension 20 8 ADDRFP4 0 INDIRP4 ARGP4 ADDRLP4 8 ADDRGP4 qk_strlen CALLU4 ASGNU4 ADDRLP4 0 ADDRLP4 8 INDIRU4 CVUI4 4 ASGNI4 ADDRFP4 4 INDIRP4 ARGP4 ADDRLP4 12 ADDRGP4 qk_strlen CALLU4 ASGNU4 ADDRLP4 4 ADDRLP4 12 INDIRU4 CVUI4 4 ASGNI4 ADDRLP4 4 INDIRI4 ADDRLP4 0 INDIRI4 GTI4 $49 ADDRFP4 0 ADDRLP4 0 INDIRI4 ADDRLP4 4 INDIRI4 SUBI4 ADDRFP4 0 INDIRP4 ADDP4 ASGNP4 ADDRFP4 0 INDIRP4 ARGP4 ADDRFP4 4 INDIRP4 ARGP4 ADDRLP4 16 ADDRGP4 Q_stricmp CALLI4 ASGNI4 ADDRLP4 16 INDIRI4 CNSTI4 0 NEI4 $51 CNSTI4 1 RETI4 ADDRGP4 $48 JUMPV LABELV $51 LABELV $49 CNSTI4 0 RETI4 LABELV $48 endproc COM_CompareExtension 20 8 export COM_DefaultExtension proc COM_DefaultExtension 16 12 ADDRFP4 0 INDIRP4 ARGP4 CNSTI4 46 ARGI4 ADDRLP4 8 ADDRGP4 qk_strrchr CALLP4 ASGNP4 ADDRLP4 0 ADDRLP4 8 INDIRP4 ASGNP4 ADDRLP4 0 INDIRP4 CVPU4 4 CNSTU4 0 EQU4 $54 ADDRFP4 0 INDIRP4 ARGP4 CNSTI4 47 ARGI4 ADDRLP4 12 ADDRGP4 qk_strrchr CALLP4 ASGNP4 ADDRLP4 4 ADDRLP4 12 INDIRP4 ASGNP4 ADDRLP4 12 INDIRP4 CVPU4 4 CNSTU4 0 EQU4 $56 ADDRLP4 4 INDIRP4 CVPU4 4 ADDRLP4 0 INDIRP4 CVPU4 4 GEU4 $54 LABELV $56 ADDRGP4 $53 JUMPV LABELV $54 ADDRFP4 0 INDIRP4 ARGP4 ADDRFP4 4 INDIRI4 ARGI4 ADDRFP4 8 INDIRP4 ARGP4 ADDRGP4 Q_strcat CALLV pop LABELV $53 endproc COM_DefaultExtension 16 12 export CopyShortSwap proc CopyShortSwap 8 0 ADDRLP4 0 ADDRFP4 0 INDIRP4 ASGNP4 ADDRLP4 4 ADDRFP4 4 INDIRP4 ASGNP4 ADDRLP4 0 INDIRP4 ADDRLP4 4 INDIRP4 CNSTI4 1 ADDP4 INDIRU1 ASGNU1 ADDRLP4 0 INDIRP4 CNSTI4 1 ADDP4 ADDRLP4 4 INDIRP4 INDIRU1 ASGNU1 LABELV $57 endproc CopyShortSwap 8 0 export CopyLongSwap proc CopyLongSwap 8 0 ADDRLP4 0 ADDRFP4 0 INDIRP4 ASGNP4 ADDRLP4 4 ADDRFP4 4 INDIRP4 ASGNP4 ADDRLP4 0 INDIRP4 ADDRLP4 4 INDIRP4 CNSTI4 3 ADDP4 INDIRU1 ASGNU1 ADDRLP4 0 INDIRP4 CNSTI4 1 ADDP4 ADDRLP4 4 INDIRP4 CNSTI4 2 ADDP4 INDIRU1 ASGNU1 ADDRLP4 0 INDIRP4 CNSTI4 2 ADDP4 ADDRLP4 4 INDIRP4 CNSTI4 1 ADDP4 INDIRU1 ASGNU1 ADDRLP4 0 INDIRP4 CNSTI4 3 ADDP4 ADDRLP4 4 INDIRP4 INDIRU1 ASGNU1 LABELV $58 endproc CopyLongSwap 8 0 export ShortSwap proc ShortSwap 16 0 ADDRFP4 0 ADDRFP4 0 INDIRI4 CVII2 4 ASGNI2 ADDRLP4 4 ADDRFP4 0 INDIRI2 CVII4 2 ASGNI4 ADDRLP4 8 CNSTI4 255 ASGNI4 ADDRLP4 0 ADDRLP4 4 INDIRI4 ADDRLP4 8 INDIRI4 BANDI4 CVIU4 4 CVUU1 4 ASGNU1 ADDRLP4 12 CNSTI4 8 ASGNI4 ADDRLP4 1 ADDRLP4 4 INDIRI4 ADDRLP4 12 INDIRI4 RSHI4 ADDRLP4 8 INDIRI4 BANDI4 CVIU4 4 CVUU1 4 ASGNU1 ADDRLP4 0 INDIRU1 CVUI4 1 ADDRLP4 12 INDIRI4 LSHI4 ADDRLP4 1 INDIRU1 CVUI4 1 ADDI4 CVII2 4 CVII4 2 RETI4 LABELV $59 endproc ShortSwap 16 0 export ShortNoSwap proc ShortNoSwap 0 0 ADDRFP4 0 ADDRFP4 0 INDIRI4 CVII2 4 ASGNI2 ADDRFP4 0 INDIRI2 CVII4 2 RETI4 LABELV $60 endproc ShortNoSwap 0 0 export LongSwap proc LongSwap 24 0 ADDRFP4 0 ADDRFP4 0 INDIRI4 ASGNI4 ADDRLP4 8 CNSTI4 255 ASGNI4 ADDRLP4 0 ADDRFP4 0 INDIRI4 ADDRLP4 8 INDIRI4 BANDI4 CVIU4 4 CVUU1 4 ASGNU1 ADDRLP4 12 CNSTI4 8 ASGNI4 ADDRLP4 1 ADDRFP4 0 INDIRI4 ADDRLP4 12 INDIRI4 RSHI4 ADDRLP4 8 INDIRI4 BANDI4 CVIU4 4 CVUU1 4 ASGNU1 ADDRLP4 16 CNSTI4 16 ASGNI4 ADDRLP4 2 ADDRFP4 0 INDIRI4 ADDRLP4 16 INDIRI4 RSHI4 ADDRLP4 8 INDIRI4 BANDI4 CVIU4 4 CVUU1 4 ASGNU1 ADDRLP4 20 CNSTI4 24 ASGNI4 ADDRLP4 3 ADDRFP4 0 INDIRI4 ADDRLP4 20 INDIRI4 RSHI4 ADDRLP4 8 INDIRI4 BANDI4 CVIU4 4 CVUU1 4 ASGNU1 ADDRLP4 0 INDIRU1 CVUI4 1 ADDRLP4 20 INDIRI4 LSHI4 ADDRLP4 1 INDIRU1 CVUI4 1 ADDRLP4 16 INDIRI4 LSHI4 ADDI4 ADDRLP4 2 INDIRU1 CVUI4 1 ADDRLP4 12 INDIRI4 LSHI4 ADDI4 ADDRLP4 3 INDIRU1 CVUI4 1 ADDI4 RETI4 LABELV $61 endproc LongSwap 24 0 export LongNoSwap proc LongNoSwap 0 0 ADDRFP4 0 INDIRI4 RETI4 LABELV $62 endproc LongNoSwap 0 0 export Long64Swap proc Long64Swap 12 0 ADDRLP4 8 ADDRFP4 4 INDIRP4 ASGNP4 ADDRLP4 0 ADDRLP4 8 INDIRP4 CNSTI4 7 ADDP4 INDIRU1 ASGNU1 ADDRLP4 0+1 ADDRLP4 8 INDIRP4 CNSTI4 6 ADDP4 INDIRU1 ASGNU1 ADDRLP4 0+2 ADDRFP4 4 INDIRP4 CNSTI4 5 ADDP4 INDIRU1 ASGNU1 ADDRLP4 0+3 ADDRFP4 4 INDIRP4 CNSTI4 4 ADDP4 INDIRU1 ASGNU1 ADDRLP4 0+4 ADDRFP4 4 INDIRP4 CNSTI4 3 ADDP4 INDIRU1 ASGNU1 ADDRLP4 0+5 ADDRFP4 4 INDIRP4 CNSTI4 2 ADDP4 INDIRU1 ASGNU1 ADDRLP4 0+6 ADDRFP4 4 INDIRP4 CNSTI4 1 ADDP4 INDIRU1 ASGNU1 ADDRLP4 0+7 ADDRFP4 4 INDIRP4 INDIRU1 ASGNU1 ADDRFP4 0 INDIRP4 ADDRLP4 0 INDIRB ASGNB 8 LABELV $63 endproc Long64Swap 12 0 export Long64NoSwap proc Long64NoSwap 0 0 ADDRFP4 0 INDIRP4 ADDRFP4 4 INDIRP4 INDIRB ASGNB 8 LABELV $72 endproc Long64NoSwap 0 0 export FloatSwap proc FloatSwap 8 4 ADDRLP4 0 ADDRFP4 0 INDIRP4 INDIRF4 ASGNF4 ADDRLP4 0 INDIRU4 CVUI4 4 ARGI4 ADDRLP4 4 ADDRGP4 LongSwap CALLI4 ASGNI4 ADDRLP4 0 ADDRLP4 4 INDIRI4 CVIU4 4 ASGNU4 ADDRLP4 0 INDIRF4 RETF4 LABELV $74 endproc FloatSwap 8 4 export FloatNoSwap proc FloatNoSwap 0 0 ADDRFP4 0 INDIRP4 INDIRF4 RETF4 LABELV $75 endproc FloatNoSwap 0 0 export COM_BeginParseSession proc COM_BeginParseSession 0 16 ADDRGP4 com_lines CNSTI4 1 ASGNI4 ADDRGP4 com_tokenline CNSTI4 0 ASGNI4 ADDRGP4 com_parsename ARGP4 CNSTI4 1024 ARGI4 ADDRGP4 $77 ARGP4 ADDRFP4 0 INDIRP4 ARGP4 ADDRGP4 Com_sprintf CALLI4 pop LABELV $76 endproc COM_BeginParseSession 0 16 export COM_GetCurrentParseLine proc COM_GetCurrentParseLine 0 0 ADDRGP4 com_tokenline INDIRI4 CNSTI4 0 EQI4 $79 ADDRGP4 com_tokenline INDIRI4 RETI4 ADDRGP4 $78 JUMPV LABELV $79 ADDRGP4 com_lines INDIRI4 RETI4 LABELV $78 endproc COM_GetCurrentParseLine 0 0 export COM_Parse proc COM_Parse 4 8 ADDRFP4 0 INDIRP4 ARGP4 CNSTI4 1 ARGI4 ADDRLP4 0 ADDRGP4 COM_ParseExt CALLP4 ASGNP4 ADDRLP4 0 INDIRP4 RETP4 LABELV $81 endproc COM_Parse 4 8 bss align 1 LABELV $83 skip 4096 export COM_ParseError code proc COM_ParseError 8 16 ADDRLP4 0 ADDRFP4 0+4 ASGNP4 ADDRGP4 $83 ARGP4 CNSTU4 4096 ARGU4 ADDRFP4 0 INDIRP4 ARGP4 ADDRLP4 0 INDIRP4 ARGP4 ADDRGP4 qk_vsnprintf CALLI4 pop ADDRLP4 0 CNSTP4 0 ASGNP4 ADDRLP4 4 ADDRGP4 COM_GetCurrentParseLine CALLI4 ASGNI4 ADDRGP4 $85 ARGP4 ADDRGP4 com_parsename ARGP4 ADDRLP4 4 INDIRI4 ARGI4 ADDRGP4 $83 ARGP4 ADDRGP4 Com_Printf CALLV pop LABELV $82 endproc COM_ParseError 8 16 bss align 1 LABELV $87 skip 4096 export COM_ParseWarning code proc COM_ParseWarning 8 16 ADDRLP4 0 ADDRFP4 0+4 ASGNP4 ADDRGP4 $87 ARGP4 CNSTU4 4096 ARGU4 ADDRFP4 0 INDIRP4 ARGP4 ADDRLP4 0 INDIRP4 ARGP4 ADDRGP4 qk_vsnprintf CALLI4 pop ADDRLP4 0 CNSTP4 0 ASGNP4 ADDRLP4 4 ADDRGP4 COM_GetCurrentParseLine CALLI4 ASGNI4 ADDRGP4 $89 ARGP4 ADDRGP4 com_parsename ARGP4 ADDRLP4 4 INDIRI4 ARGI4 ADDRGP4 $87 ARGP4 ADDRGP4 Com_Printf CALLV pop LABELV $86 endproc COM_ParseWarning 8 16 proc SkipWhitespace 12 0 ADDRFP4 0 ADDRFP4 0 INDIRP4 ASGNP4 ADDRFP4 4 ADDRFP4 4 INDIRP4 ASGNP4 ADDRGP4 $92 JUMPV LABELV $91 ADDRLP4 0 INDIRI4 CNSTI4 0 NEI4 $94 CNSTP4 0 RETP4 ADDRGP4 $90 JUMPV LABELV $94 ADDRLP4 0 INDIRI4 CNSTI4 10 NEI4 $96 ADDRLP4 4 ADDRGP4 com_lines ASGNP4 ADDRLP4 8 CNSTI4 1 ASGNI4 ADDRLP4 4 INDIRP4 ADDRLP4 4 INDIRP4 INDIRI4 ADDRLP4 8 INDIRI4 ADDI4 ASGNI4 ADDRFP4 4 INDIRP4 ADDRLP4 8 INDIRI4 ASGNI4 LABELV $96 ADDRFP4 0 ADDRFP4 0 INDIRP4 CNSTI4 1 ADDP4 ASGNP4 LABELV $92 ADDRLP4 4 ADDRFP4 0 INDIRP4 INDIRI1 CVII4 1 ASGNI4 ADDRLP4 0 ADDRLP4 4 INDIRI4 ASGNI4 ADDRLP4 4 INDIRI4 CNSTI4 32 LEI4 $91 ADDRFP4 0 INDIRP4 RETP4 LABELV $90 endproc SkipWhitespace 12 0 export COM_Compress proc COM_Compress 48 0 ADDRLP4 12 CNSTI4 0 ASGNI4 ADDRLP4 16 CNSTI4 0 ASGNI4 ADDRLP4 20 ADDRFP4 0 INDIRP4 ASGNP4 ADDRLP4 8 ADDRLP4 20 INDIRP4 ASGNP4 ADDRLP4 0 ADDRLP4 20 INDIRP4 ASGNP4 ADDRLP4 0 INDIRP4 CVPU4 4 CNSTU4 0 EQU4 $99 ADDRGP4 $102 JUMPV LABELV $101 ADDRLP4 24 CNSTI4 47 ASGNI4 ADDRLP4 4 INDIRI4 ADDRLP4 24 INDIRI4 NEI4 $104 ADDRLP4 0 INDIRP4 CNSTI4 1 ADDP4 INDIRI1 CVII4 1 ADDRLP4 24 INDIRI4 NEI4 $104 ADDRGP4 $107 JUMPV LABELV $106 ADDRLP4 0 ADDRLP4 0 INDIRP4 CNSTI4 1 ADDP4 ASGNP4 LABELV $107 ADDRLP4 28 ADDRLP4 0 INDIRP4 INDIRI1 CVII4 1 ASGNI4 ADDRLP4 28 INDIRI4 CNSTI4 0 EQI4 $109 ADDRLP4 28 INDIRI4 CNSTI4 10 NEI4 $106 LABELV $109 ADDRGP4 $105 JUMPV LABELV $104 ADDRLP4 4 INDIRI4 CNSTI4 47 NEI4 $110 ADDRLP4 0 INDIRP4 CNSTI4 1 ADDP4 INDIRI1 CVII4 1 CNSTI4 42 NEI4 $110 ADDRGP4 $113 JUMPV LABELV $112 ADDRLP4 0 ADDRLP4 0 INDIRP4 CNSTI4 1 ADDP4 ASGNP4 LABELV $113 ADDRLP4 32 ADDRLP4 0 INDIRP4 INDIRI1 CVII4 1 ASGNI4 ADDRLP4 32 INDIRI4 CNSTI4 0 EQI4 $115 ADDRLP4 32 INDIRI4 CNSTI4 42 NEI4 $112 ADDRLP4 0 INDIRP4 CNSTI4 1 ADDP4 INDIRI1 CVII4 1 CNSTI4 47 NEI4 $112 LABELV $115 ADDRLP4 0 INDIRP4 INDIRI1 CVII4 1 CNSTI4 0 EQI4 $111 ADDRLP4 0 ADDRLP4 0 INDIRP4 CNSTI4 2 ADDP4 ASGNP4 ADDRGP4 $111 JUMPV LABELV $110 ADDRLP4 4 INDIRI4 CNSTI4 10 EQI4 $120 ADDRLP4 4 INDIRI4 CNSTI4 13 NEI4 $118 LABELV $120 ADDRLP4 32 CNSTI4 1 ASGNI4 ADDRLP4 12 ADDRLP4 32 INDIRI4 ASGNI4 ADDRLP4 0 ADDRLP4 0 INDIRP4 ADDRLP4 32 INDIRI4 ADDP4 ASGNP4 ADDRGP4 $119 JUMPV LABELV $118 ADDRLP4 4 INDIRI4 CNSTI4 32 EQI4 $123 ADDRLP4 4 INDIRI4 CNSTI4 9 NEI4 $121 LABELV $123 ADDRLP4 36 CNSTI4 1 ASGNI4 ADDRLP4 16 ADDRLP4 36 INDIRI4 ASGNI4 ADDRLP4 0 ADDRLP4 0 INDIRP4 ADDRLP4 36 INDIRI4 ADDP4 ASGNP4 ADDRGP4 $122 JUMPV LABELV $121 ADDRLP4 12 INDIRI4 CNSTI4 0 EQI4 $124 ADDRLP4 36 ADDRLP4 8 INDIRP4 ASGNP4 ADDRLP4 8 ADDRLP4 36 INDIRP4 CNSTI4 1 ADDP4 ASGNP4 ADDRLP4 36 INDIRP4 CNSTI1 10 ASGNI1 ADDRLP4 40 CNSTI4 0 ASGNI4 ADDRLP4 12 ADDRLP4 40 INDIRI4 ASGNI4 ADDRLP4 16 ADDRLP4 40 INDIRI4 ASGNI4 LABELV $124 ADDRLP4 16 INDIRI4 CNSTI4 0 EQI4 $126 ADDRLP4 36 ADDRLP4 8 INDIRP4 ASGNP4 ADDRLP4 8 ADDRLP4 36 INDIRP4 CNSTI4 1 ADDP4 ASGNP4 ADDRLP4 36 INDIRP4 CNSTI1 32 ASGNI1 ADDRLP4 16 CNSTI4 0 ASGNI4 LABELV $126 ADDRLP4 4 INDIRI4 CNSTI4 34 NEI4 $128 ADDRLP4 36 ADDRLP4 8 INDIRP4 ASGNP4 ADDRLP4 8 ADDRLP4 36 INDIRP4 CNSTI4 1 ADDP4 ASGNP4 ADDRLP4 36 INDIRP4 ADDRLP4 4 INDIRI4 CVII1 4 ASGNI1 ADDRLP4 0 ADDRLP4 0 INDIRP4 CNSTI4 1 ADDP4 ASGNP4 ADDRGP4 $131 JUMPV LABELV $130 ADDRLP4 4 ADDRLP4 0 INDIRP4 INDIRI1 CVII4 1 ASGNI4 ADDRLP4 4 INDIRI4 CNSTI4 0 EQI4 $132 ADDRLP4 4 INDIRI4 CNSTI4 34 EQI4 $132 ADDRLP4 44 ADDRLP4 8 INDIRP4 ASGNP4 ADDRLP4 8 ADDRLP4 44 INDIRP4 CNSTI4 1 ADDP4 ASGNP4 ADDRLP4 44 INDIRP4 ADDRLP4 4 INDIRI4 CVII1 4 ASGNI1 ADDRLP4 0 ADDRLP4 0 INDIRP4 CNSTI4 1 ADDP4 ASGNP4 LABELV $134 LABELV $131 ADDRGP4 $130 JUMPV LABELV $132 ADDRLP4 4 INDIRI4 CNSTI4 34 NEI4 $129 ADDRLP4 40 ADDRLP4 8 INDIRP4 ASGNP4 ADDRLP4 8 ADDRLP4 40 INDIRP4 CNSTI4 1 ADDP4 ASGNP4 ADDRLP4 40 INDIRP4 ADDRLP4 4 INDIRI4 CVII1 4 ASGNI1 ADDRLP4 0 ADDRLP4 0 INDIRP4 CNSTI4 1 ADDP4 ASGNP4 ADDRGP4 $129 JUMPV LABELV $128 ADDRLP4 8 INDIRP4 ADDRLP4 4 INDIRI4 CVII1 4 ASGNI1 ADDRLP4 36 CNSTI4 1 ASGNI4 ADDRLP4 8 ADDRLP4 8 INDIRP4 ADDRLP4 36 INDIRI4 ADDP4 ASGNP4 ADDRLP4 0 ADDRLP4 0 INDIRP4 ADDRLP4 36 INDIRI4 ADDP4 ASGNP4 LABELV $129 LABELV $122 LABELV $119 LABELV $111 LABELV $105 LABELV $102 ADDRLP4 24 ADDRLP4 0 INDIRP4 INDIRI1 CVII4 1 ASGNI4 ADDRLP4 4 ADDRLP4 24 INDIRI4 ASGNI4 ADDRLP4 24 INDIRI4 CNSTI4 0 NEI4 $101 ADDRLP4 8 INDIRP4 CNSTI1 0 ASGNI1 LABELV $99 ADDRLP4 8 INDIRP4 CVPU4 4 ADDRFP4 0 INDIRP4 CVPU4 4 SUBU4 CVUI4 4 RETI4 LABELV $98 endproc COM_Compress 48 0 export COM_ParseExt proc COM_ParseExt 40 8 ADDRFP4 0 ADDRFP4 0 INDIRP4 ASGNP4 ADDRFP4 4 ADDRFP4 4 INDIRI4 ASGNI4 ADDRLP4 4 CNSTI4 0 ASGNI4 ADDRLP4 12 CNSTI4 0 ASGNI4 ADDRLP4 0 ADDRFP4 0 INDIRP4 INDIRP4 ASGNP4 ADDRLP4 16 CNSTI4 0 ASGNI4 ADDRLP4 8 ADDRLP4 16 INDIRI4 ASGNI4 ADDRGP4 com_token CNSTI1 0 ASGNI1 ADDRGP4 com_tokenline ADDRLP4 16 INDIRI4 ASGNI4 ADDRLP4 0 INDIRP4 CVPU4 4 CNSTU4 0 NEU4 $141 ADDRFP4 0 INDIRP4 CNSTP4 0 ASGNP4 ADDRGP4 com_token RETP4 ADDRGP4 $137 JUMPV LABELV $140 ADDRLP4 0 INDIRP4 ARGP4 ADDRLP4 12 ARGP4 ADDRLP4 20 ADDRGP4 SkipWhitespace CALLP4 ASGNP4 ADDRLP4 0 ADDRLP4 20 INDIRP4 ASGNP4 ADDRLP4 0 INDIRP4 CVPU4 4 CNSTU4 0 NEU4 $143 ADDRFP4 0 INDIRP4 CNSTP4 0 ASGNP4 ADDRGP4 com_token RETP4 ADDRGP4 $137 JUMPV LABELV $143 ADDRLP4 24 CNSTI4 0 ASGNI4 ADDRLP4 12 INDIRI4 ADDRLP4 24 INDIRI4 EQI4 $145 ADDRFP4 4 INDIRI4 ADDRLP4 24 INDIRI4 NEI4 $145 ADDRFP4 0 INDIRP4 ADDRLP4 0 INDIRP4 ASGNP4 ADDRGP4 com_token RETP4 ADDRGP4 $137 JUMPV LABELV $145 ADDRLP4 4 ADDRLP4 0 INDIRP4 INDIRI1 CVII4 1 ASGNI4 ADDRLP4 28 CNSTI4 47 ASGNI4 ADDRLP4 4 INDIRI4 ADDRLP4 28 INDIRI4 NEI4 $147 ADDRLP4 0 INDIRP4 CNSTI4 1 ADDP4 INDIRI1 CVII4 1 ADDRLP4 28 INDIRI4 NEI4 $147 ADDRLP4 0 ADDRLP4 0 INDIRP4 CNSTI4 2 ADDP4 ASGNP4 ADDRGP4 $150 JUMPV LABELV $149 ADDRLP4 0 ADDRLP4 0 INDIRP4 CNSTI4 1 ADDP4 ASGNP4 LABELV $150 ADDRLP4 32 ADDRLP4 0 INDIRP4 INDIRI1 CVII4 1 ASGNI4 ADDRLP4 32 INDIRI4 CNSTI4 0 EQI4 $152 ADDRLP4 32 INDIRI4 CNSTI4 10 NEI4 $149 LABELV $152 ADDRGP4 $148 JUMPV LABELV $147 ADDRLP4 4 INDIRI4 CNSTI4 47 NEI4 $142 ADDRLP4 0 INDIRP4 CNSTI4 1 ADDP4 INDIRI1 CVII4 1 CNSTI4 42 NEI4 $142 ADDRLP4 0 ADDRLP4 0 INDIRP4 CNSTI4 2 ADDP4 ASGNP4 ADDRGP4 $156 JUMPV LABELV $155 ADDRLP4 0 INDIRP4 INDIRI1 CVII4 1 CNSTI4 10 NEI4 $158 ADDRLP4 32 ADDRGP4 com_lines ASGNP4 ADDRLP4 32 INDIRP4 ADDRLP4 32 INDIRP4 INDIRI4 CNSTI4 1 ADDI4 ASGNI4 LABELV $158 ADDRLP4 0 ADDRLP4 0 INDIRP4 CNSTI4 1 ADDP4 ASGNP4 LABELV $156 ADDRLP4 36 ADDRLP4 0 INDIRP4 INDIRI1 CVII4 1 ASGNI4 ADDRLP4 36 INDIRI4 CNSTI4 0 EQI4 $160 ADDRLP4 36 INDIRI4 CNSTI4 42 NEI4 $155 ADDRLP4 0 INDIRP4 CNSTI4 1 ADDP4 INDIRI1 CVII4 1 CNSTI4 47 NEI4 $155 LABELV $160 ADDRLP4 0 INDIRP4 INDIRI1 CVII4 1 CNSTI4 0 EQI4 $154 ADDRLP4 0 ADDRLP4 0 INDIRP4 CNSTI4 2 ADDP4 ASGNP4 LABELV $154 LABELV $148 LABELV $141 ADDRGP4 $140 JUMPV LABELV $142 ADDRGP4 com_tokenline ADDRGP4 com_lines INDIRI4 ASGNI4 ADDRLP4 4 INDIRI4 CNSTI4 34 NEI4 $163 ADDRLP4 0 ADDRLP4 0 INDIRP4 CNSTI4 1 ADDP4 ASGNP4 ADDRGP4 $166 JUMPV LABELV $165 ADDRLP4 20 ADDRLP4 0 INDIRP4 ASGNP4 ADDRLP4 0 ADDRLP4 20 INDIRP4 CNSTI4 1 ADDP4 ASGNP4 ADDRLP4 4 ADDRLP4 20 INDIRP4 INDIRI1 CVII4 1 ASGNI4 ADDRLP4 4 INDIRI4 CNSTI4 34 EQI4 $170 ADDRLP4 4 INDIRI4 CNSTI4 0 NEI4 $168 LABELV $170 ADDRLP4 8 INDIRI4 ADDRGP4 com_token ADDP4 CNSTI1 0 ASGNI1 ADDRFP4 0 INDIRP4 ADDRLP4 0 INDIRP4 ASGNP4 ADDRGP4 com_token RETP4 ADDRGP4 $137 JUMPV LABELV $168 ADDRLP4 4 INDIRI4 CNSTI4 10 NEI4 $171 ADDRLP4 28 ADDRGP4 com_lines ASGNP4 ADDRLP4 28 INDIRP4 ADDRLP4 28 INDIRP4 INDIRI4 CNSTI4 1 ADDI4 ASGNI4 LABELV $171 ADDRLP4 8 INDIRI4 CNSTI4 1023 GEI4 $173 ADDRLP4 8 INDIRI4 ADDRGP4 com_token ADDP4 ADDRLP4 4 INDIRI4 CVII1 4 ASGNI1 ADDRLP4 8 ADDRLP4 8 INDIRI4 CNSTI4 1 ADDI4 ASGNI4 LABELV $173 LABELV $166 ADDRGP4 $165 JUMPV LABELV $163 LABELV $175 ADDRLP4 8 INDIRI4 CNSTI4 1023 GEI4 $178 ADDRLP4 8 INDIRI4 ADDRGP4 com_token ADDP4 ADDRLP4 4 INDIRI4 CVII1 4 ASGNI1 ADDRLP4 8 ADDRLP4 8 INDIRI4 CNSTI4 1 ADDI4 ASGNI4 LABELV $178 ADDRLP4 0 ADDRLP4 0 INDIRP4 CNSTI4 1 ADDP4 ASGNP4 ADDRLP4 4 ADDRLP4 0 INDIRP4 INDIRI1 CVII4 1 ASGNI4 LABELV $176 ADDRLP4 4 INDIRI4 CNSTI4 32 GTI4 $175 ADDRLP4 8 INDIRI4 ADDRGP4 com_token ADDP4 CNSTI1 0 ASGNI1 ADDRFP4 0 INDIRP4 ADDRLP4 0 INDIRP4 ASGNP4 ADDRGP4 com_token RETP4 LABELV $137 endproc COM_ParseExt 40 8 export COM_MatchToken proc COM_MatchToken 12 16 ADDRFP4 0 INDIRP4 ARGP4 ADDRLP4 4 ADDRGP4 COM_Parse CALLP4 ASGNP4 ADDRLP4 0 ADDRLP4 4 INDIRP4 ASGNP4 ADDRLP4 0 INDIRP4 ARGP4 ADDRFP4 4 INDIRP4 ARGP4 ADDRLP4 8 ADDRGP4 qk_strcmp CALLI4 ASGNI4 ADDRLP4 8 INDIRI4 CNSTI4 0 EQI4 $181 CNSTI4 1 ARGI4 ADDRGP4 $183 ARGP4 ADDRLP4 0 INDIRP4 ARGP4 ADDRFP4 4 INDIRP4 ARGP4 ADDRGP4 Com_Error CALLV pop LABELV $181 LABELV $180 endproc COM_MatchToken 12 16 export SkipBracedSection proc SkipBracedSection 8 8 ADDRFP4 0 ADDRFP4 0 INDIRP4 ASGNP4 ADDRFP4 4 ADDRFP4 4 INDIRI4 ASGNI4 LABELV $185 ADDRFP4 0 INDIRP4 ARGP4 CNSTI4 1 ARGI4 ADDRLP4 4 ADDRGP4 COM_ParseExt CALLP4 ASGNP4 ADDRLP4 0 ADDRLP4 4 INDIRP4 ASGNP4 ADDRLP4 0 INDIRP4 CNSTI4 1 ADDP4 INDIRI1 CVII4 1 CNSTI4 0 NEI4 $188 ADDRLP4 0 INDIRP4 INDIRI1 CVII4 1 CNSTI4 123 NEI4 $190 ADDRFP4 4 ADDRFP4 4 INDIRI4 CNSTI4 1 ADDI4 ASGNI4 ADDRGP4 $191 JUMPV LABELV $190 ADDRLP4 0 INDIRP4 INDIRI1 CVII4 1 CNSTI4 125 NEI4 $192 ADDRFP4 4 ADDRFP4 4 INDIRI4 CNSTI4 1 SUBI4 ASGNI4 LABELV $192 LABELV $191 LABELV $188 LABELV $186 ADDRFP4 4 INDIRI4 CNSTI4 0 EQI4 $194 ADDRFP4 0 INDIRP4 INDIRP4 CVPU4 4 CNSTU4 0 NEU4 $185 LABELV $194 ADDRFP4 4 INDIRI4 CNSTI4 0 NEI4 $196 ADDRLP4 4 CNSTI4 1 ASGNI4 ADDRGP4 $197 JUMPV LABELV $196 ADDRLP4 4 CNSTI4 0 ASGNI4 LABELV $197 ADDRLP4 4 INDIRI4 RETI4 LABELV $184 endproc SkipBracedSection 8 8 export SkipRestOfLine proc SkipRestOfLine 16 0 ADDRLP4 4 ADDRFP4 0 INDIRP4 INDIRP4 ASGNP4 ADDRGP4 $200 JUMPV LABELV $199 ADDRLP4 0 INDIRI4 CNSTI4 10 NEI4 $202 ADDRLP4 8 ADDRGP4 com_lines ASGNP4 ADDRLP4 8 INDIRP4 ADDRLP4 8 INDIRP4 INDIRI4 CNSTI4 1 ADDI4 ASGNI4 ADDRGP4 $201 JUMPV LABELV $202 LABELV $200 ADDRLP4 8 ADDRLP4 4 INDIRP4 ASGNP4 ADDRLP4 4 ADDRLP4 8 INDIRP4 CNSTI4 1 ADDP4 ASGNP4 ADDRLP4 12 ADDRLP4 8 INDIRP4 INDIRI1 CVII4 1 ASGNI4 ADDRLP4 0 ADDRLP4 12 INDIRI4 ASGNI4 ADDRLP4 12 INDIRI4 CNSTI4 0 NEI4 $199 LABELV $201 ADDRFP4 0 INDIRP4 ADDRLP4 4 INDIRP4 ASGNP4 LABELV $198 endproc SkipRestOfLine 16 0 export Parse1DMatrix proc Parse1DMatrix 16 8 ADDRFP4 0 ADDRFP4 0 INDIRP4 ASGNP4 ADDRFP4 4 ADDRFP4 4 INDIRI4 ASGNI4 ADDRFP4 8 ADDRFP4 8 INDIRP4 ASGNP4 ADDRFP4 0 INDIRP4 ARGP4 ADDRGP4 $205 ARGP4 ADDRGP4 COM_MatchToken CALLV pop ADDRLP4 0 CNSTI4 0 ASGNI4 ADDRGP4 $209 JUMPV LABELV $206 ADDRFP4 0 INDIRP4 ARGP4 ADDRLP4 8 ADDRGP4 COM_Parse CALLP4 ASGNP4 ADDRLP4 4 ADDRLP4 8 INDIRP4 ASGNP4 ADDRLP4 4 INDIRP4 ARGP4 ADDRLP4 12 ADDRGP4 qk_atof CALLF4 ASGNF4 ADDRLP4 0 INDIRI4 CNSTI4 2 LSHI4 ADDRFP4 8 INDIRP4 ADDP4 ADDRLP4 12 INDIRF4 ASGNF4 LABELV $207 ADDRLP4 0 ADDRLP4 0 INDIRI4 CNSTI4 1 ADDI4 ASGNI4 LABELV $209 ADDRLP4 0 INDIRI4 ADDRFP4 4 INDIRI4 LTI4 $206 ADDRFP4 0 INDIRP4 ARGP4 ADDRGP4 $210 ARGP4 ADDRGP4 COM_MatchToken CALLV pop LABELV $204 endproc Parse1DMatrix 16 8 export Parse2DMatrix proc Parse2DMatrix 8 12 ADDRFP4 0 ADDRFP4 0 INDIRP4 ASGNP4 ADDRFP4 4 ADDRFP4 4 INDIRI4 ASGNI4 ADDRFP4 8 ADDRFP4 8 INDIRI4 ASGNI4 ADDRFP4 12 ADDRFP4 12 INDIRP4 ASGNP4 ADDRFP4 0 INDIRP4 ARGP4 ADDRGP4 $205 ARGP4 ADDRGP4 COM_MatchToken CALLV pop ADDRLP4 0 CNSTI4 0 ASGNI4 ADDRGP4 $215 JUMPV LABELV $212 ADDRFP4 0 INDIRP4 ARGP4 ADDRFP4 8 INDIRI4 ARGI4 ADDRLP4 0 INDIRI4 ADDRFP4 8 INDIRI4 MULI4 CNSTI4 2 LSHI4 ADDRFP4 12 INDIRP4 ADDP4 ARGP4 ADDRGP4 Parse1DMatrix CALLV pop LABELV $213 ADDRLP4 0 ADDRLP4 0 INDIRI4 CNSTI4 1 ADDI4 ASGNI4 LABELV $215 ADDRLP4 0 INDIRI4 ADDRFP4 4 INDIRI4 LTI4 $212 ADDRFP4 0 INDIRP4 ARGP4 ADDRGP4 $210 ARGP4 ADDRGP4 COM_MatchToken CALLV pop LABELV $211 endproc Parse2DMatrix 8 12 export Parse3DMatrix proc Parse3DMatrix 12 16 ADDRFP4 0 ADDRFP4 0 INDIRP4 ASGNP4 ADDRFP4 4 ADDRFP4 4 INDIRI4 ASGNI4 ADDRFP4 8 ADDRFP4 8 INDIRI4 ASGNI4 ADDRFP4 12 ADDRFP4 12 INDIRI4 ASGNI4 ADDRFP4 16 ADDRFP4 16 INDIRP4 ASGNP4 ADDRFP4 0 INDIRP4 ARGP4 ADDRGP4 $205 ARGP4 ADDRGP4 COM_MatchToken CALLV pop ADDRLP4 0 CNSTI4 0 ASGNI4 ADDRGP4 $220 JUMPV LABELV $217 ADDRFP4 0 INDIRP4 ARGP4 ADDRFP4 8 INDIRI4 ARGI4 ADDRFP4 12 INDIRI4 ARGI4 ADDRLP4 0 INDIRI4 ADDRFP4 12 INDIRI4 MULI4 ADDRFP4 8 INDIRI4 MULI4 CNSTI4 2 LSHI4 ADDRFP4 16 INDIRP4 ADDP4 ARGP4 ADDRGP4 Parse2DMatrix CALLV pop LABELV $218 ADDRLP4 0 ADDRLP4 0 INDIRI4 CNSTI4 1 ADDI4 ASGNI4 LABELV $220 ADDRLP4 0 INDIRI4 ADDRFP4 4 INDIRI4 LTI4 $217 ADDRFP4 0 INDIRP4 ARGP4 ADDRGP4 $210 ARGP4 ADDRGP4 COM_MatchToken CALLV pop LABELV $216 endproc Parse3DMatrix 12 16 export Com_HexStrToInt proc Com_HexStrToInt 32 4 ADDRFP4 0 ADDRFP4 0 INDIRP4 ASGNP4 ADDRFP4 0 INDIRP4 CVPU4 4 CNSTU4 0 EQU4 $224 ADDRFP4 0 INDIRP4 INDIRI1 CVII4 1 CNSTI4 0 NEI4 $222 LABELV $224 CNSTI4 -1 RETI4 ADDRGP4 $221 JUMPV LABELV $222 ADDRFP4 0 INDIRP4 INDIRI1 CVII4 1 CNSTI4 48 NEI4 $225 ADDRFP4 0 INDIRP4 CNSTI4 1 ADDP4 INDIRI1 CVII4 1 CNSTI4 120 NEI4 $225 ADDRLP4 12 CNSTI4 0 ASGNI4 ADDRLP4 8 CNSTI4 2 ASGNI4 ADDRGP4 $230 JUMPV LABELV $227 ADDRLP4 12 ADDRLP4 12 INDIRI4 CNSTI4 4 LSHI4 ASGNI4 ADDRLP4 8 INDIRI4 ADDRFP4 0 INDIRP4 ADDP4 INDIRI1 CVII4 1 ARGI4 ADDRLP4 20 ADDRGP4 qk_tolower CALLI4 ASGNI4 ADDRLP4 16 ADDRLP4 20 INDIRI4 CVII1 4 ASGNI1 ADDRLP4 24 ADDRLP4 16 INDIRI1 CVII4 1 ASGNI4 ADDRLP4 24 INDIRI4 CNSTI4 48 LTI4 $231 ADDRLP4 24 INDIRI4 CNSTI4 57 GTI4 $231 ADDRLP4 16 ADDRLP4 16 INDIRI1 CVII4 1 CNSTI4 48 SUBI4 CVII1 4 ASGNI1 ADDRGP4 $232 JUMPV LABELV $231 ADDRLP4 28 ADDRLP4 16 INDIRI1 CVII4 1 ASGNI4 ADDRLP4 28 INDIRI4 CNSTI4 97 LTI4 $233 ADDRLP4 28 INDIRI4 CNSTI4 102 GTI4 $233 ADDRLP4 16 ADDRLP4 16 INDIRI1 CVII4 1 CNSTI4 97 SUBI4 CNSTI4 10 ADDI4 CVII1 4 ASGNI1 ADDRGP4 $234 JUMPV LABELV $233 CNSTI4 -1 RETI4 ADDRGP4 $221 JUMPV LABELV $234 LABELV $232 ADDRLP4 12 ADDRLP4 12 INDIRI4 ADDRLP4 16 INDIRI1 CVII4 1 ADDI4 ASGNI4 LABELV $228 ADDRLP4 8 ADDRLP4 8 INDIRI4 CNSTI4 1 ADDI4 ASGNI4 LABELV $230 ADDRFP4 0 INDIRP4 ARGP4 ADDRLP4 16 ADDRGP4 qk_strlen CALLU4 ASGNU4 ADDRLP4 8 INDIRI4 CVIU4 4 ADDRLP4 16 INDIRU4 LTU4 $227 ADDRLP4 12 INDIRI4 RETI4 ADDRGP4 $221 JUMPV LABELV $225 CNSTI4 -1 RETI4 LABELV $221 endproc Com_HexStrToInt 32 4 export Q_isprint proc Q_isprint 4 0 ADDRLP4 0 ADDRFP4 0 INDIRI4 ASGNI4 ADDRLP4 0 INDIRI4 CNSTI4 32 LTI4 $236 ADDRLP4 0 INDIRI4 CNSTI4 126 GTI4 $236 CNSTI4 1 RETI4 ADDRGP4 $235 JUMPV LABELV $236 CNSTI4 0 RETI4 LABELV $235 endproc Q_isprint 4 0 export Q_islower proc Q_islower 4 0 ADDRLP4 0 ADDRFP4 0 INDIRI4 ASGNI4 ADDRLP4 0 INDIRI4 CNSTI4 97 LTI4 $239 ADDRLP4 0 INDIRI4 CNSTI4 122 GTI4 $239 CNSTI4 1 RETI4 ADDRGP4 $238 JUMPV LABELV $239 CNSTI4 0 RETI4 LABELV $238 endproc Q_islower 4 0 export Q_isupper proc Q_isupper 4 0 ADDRLP4 0 ADDRFP4 0 INDIRI4 ASGNI4 ADDRLP4 0 INDIRI4 CNSTI4 65 LTI4 $242 ADDRLP4 0 INDIRI4 CNSTI4 90 GTI4 $242 CNSTI4 1 RETI4 ADDRGP4 $241 JUMPV LABELV $242 CNSTI4 0 RETI4 LABELV $241 endproc Q_isupper 4 0 export Q_isalpha proc Q_isalpha 8 0 ADDRFP4 0 ADDRFP4 0 INDIRI4 ASGNI4 ADDRFP4 0 INDIRI4 CNSTI4 97 LTI4 $248 ADDRFP4 0 INDIRI4 CNSTI4 122 LEI4 $247 LABELV $248 ADDRFP4 0 INDIRI4 CNSTI4 65 LTI4 $245 ADDRFP4 0 INDIRI4 CNSTI4 90 GTI4 $245 LABELV $247 CNSTI4 1 RETI4 ADDRGP4 $244 JUMPV LABELV $245 CNSTI4 0 RETI4 LABELV $244 endproc Q_isalpha 8 0 export Q_isanumber proc Q_isanumber 16 8 ADDRFP4 0 INDIRP4 INDIRI1 CVII4 1 CNSTI4 0 NEI4 $250 CNSTI4 0 RETI4 ADDRGP4 $249 JUMPV LABELV $250 ADDRFP4 0 INDIRP4 ARGP4 ADDRLP4 0 ARGP4 ADDRLP4 8 ADDRGP4 qk_strtod CALLF4 ASGNF4 ADDRLP4 4 ADDRLP4 8 INDIRF4 ASGNF4 ADDRLP4 0 INDIRP4 INDIRI1 CVII4 1 CNSTI4 0 NEI4 $253 ADDRLP4 12 CNSTI4 1 ASGNI4 ADDRGP4 $254 JUMPV LABELV $253 ADDRLP4 12 CNSTI4 0 ASGNI4 LABELV $254 ADDRLP4 12 INDIRI4 RETI4 LABELV $249 endproc Q_isanumber 16 8 export Q_isintegral proc Q_isintegral 8 0 ADDRLP4 4 ADDRFP4 0 INDIRF4 ASGNF4 ADDRLP4 4 INDIRF4 CVFI4 4 CVIF4 4 ADDRLP4 4 INDIRF4 NEF4 $257 ADDRLP4 0 CNSTI4 1 ASGNI4 ADDRGP4 $258 JUMPV LABELV $257 ADDRLP4 0 CNSTI4 0 ASGNI4 LABELV $258 ADDRLP4 0 INDIRI4 RETI4 LABELV $255 endproc Q_isintegral 8 0 export Q_strncpyz proc Q_strncpyz 0 12 ADDRFP4 0 ADDRFP4 0 INDIRP4 ASGNP4 ADDRFP4 8 ADDRFP4 8 INDIRI4 ASGNI4 ADDRFP4 0 INDIRP4 CVPU4 4 CNSTU4 0 NEU4 $260 CNSTI4 0 ARGI4 ADDRGP4 $262 ARGP4 ADDRGP4 Com_Error CALLV pop LABELV $260 ADDRFP4 4 INDIRP4 CVPU4 4 CNSTU4 0 NEU4 $263 CNSTI4 0 ARGI4 ADDRGP4 $265 ARGP4 ADDRGP4 Com_Error CALLV pop LABELV $263 ADDRFP4 8 INDIRI4 CNSTI4 1 GEI4 $266 CNSTI4 0 ARGI4 ADDRGP4 $268 ARGP4 ADDRGP4 Com_Error CALLV pop LABELV $266 ADDRFP4 0 INDIRP4 ARGP4 ADDRFP4 4 INDIRP4 ARGP4 ADDRFP4 8 INDIRI4 CNSTI4 1 SUBI4 CVIU4 4 ARGU4 ADDRGP4 qk_strncpy CALLP4 pop ADDRFP4 8 INDIRI4 CNSTI4 1 SUBI4 ADDRFP4 0 INDIRP4 ADDP4 CNSTI1 0 ASGNI1 LABELV $259 endproc Q_strncpyz 0 12 export Q_stricmpn proc Q_stricmpn 36 0 ADDRFP4 0 ADDRFP4 0 INDIRP4 ASGNP4 ADDRFP4 4 ADDRFP4 4 INDIRP4 ASGNP4 ADDRFP4 8 ADDRFP4 8 INDIRI4 ASGNI4 ADDRFP4 0 INDIRP4 CVPU4 4 CNSTU4 0 NEU4 $270 ADDRFP4 4 INDIRP4 CVPU4 4 CNSTU4 0 NEU4 $272 CNSTI4 0 RETI4 ADDRGP4 $269 JUMPV LABELV $272 CNSTI4 -1 RETI4 ADDRGP4 $269 JUMPV LABELV $270 ADDRFP4 4 INDIRP4 CVPU4 4 CNSTU4 0 NEU4 $274 CNSTI4 1 RETI4 ADDRGP4 $269 JUMPV LABELV $274 LABELV $276 ADDRLP4 8 ADDRFP4 0 INDIRP4 ASGNP4 ADDRLP4 20 CNSTI4 1 ASGNI4 ADDRFP4 0 ADDRLP4 8 INDIRP4 ADDRLP4 20 INDIRI4 ADDP4 ASGNP4 ADDRLP4 0 ADDRLP4 8 INDIRP4 INDIRI1 CVII4 1 ASGNI4 ADDRLP4 12 ADDRFP4 4 INDIRP4 ASGNP4 ADDRFP4 4 ADDRLP4 12 INDIRP4 ADDRLP4 20 INDIRI4 ADDP4 ASGNP4 ADDRLP4 4 ADDRLP4 12 INDIRP4 INDIRI1 CVII4 1 ASGNI4 ADDRLP4 16 ADDRFP4 8 INDIRI4 ASGNI4 ADDRFP4 8 ADDRLP4 16 INDIRI4 ADDRLP4 20 INDIRI4 SUBI4 ASGNI4 ADDRLP4 16 INDIRI4 CNSTI4 0 NEI4 $279 CNSTI4 0 RETI4 ADDRGP4 $269 JUMPV LABELV $279 ADDRLP4 0 INDIRI4 ADDRLP4 4 INDIRI4 EQI4 $281 ADDRLP4 0 INDIRI4 CNSTI4 97 LTI4 $283 ADDRLP4 0 INDIRI4 CNSTI4 122 GTI4 $283 ADDRLP4 0 ADDRLP4 0 INDIRI4 CNSTI4 32 SUBI4 ASGNI4 LABELV $283 ADDRLP4 4 INDIRI4 CNSTI4 97 LTI4 $285 ADDRLP4 4 INDIRI4 CNSTI4 122 GTI4 $285 ADDRLP4 4 ADDRLP4 4 INDIRI4 CNSTI4 32 SUBI4 ASGNI4 LABELV $285 ADDRLP4 0 INDIRI4 ADDRLP4 4 INDIRI4 EQI4 $287 ADDRLP4 0 INDIRI4 ADDRLP4 4 INDIRI4 GEI4 $290 ADDRLP4 32 CNSTI4 -1 ASGNI4 ADDRGP4 $291 JUMPV LABELV $290 ADDRLP4 32 CNSTI4 1 ASGNI4 LABELV $291 ADDRLP4 32 INDIRI4 RETI4 ADDRGP4 $269 JUMPV LABELV $287 LABELV $281 LABELV $277 ADDRLP4 0 INDIRI4 CNSTI4 0 NEI4 $276 CNSTI4 0 RETI4 LABELV $269 endproc Q_stricmpn 36 0 export Q_strncmp proc Q_strncmp 28 0 ADDRFP4 0 ADDRFP4 0 INDIRP4 ASGNP4 ADDRFP4 4 ADDRFP4 4 INDIRP4 ASGNP4 ADDRFP4 8 ADDRFP4 8 INDIRI4 ASGNI4 LABELV $293 ADDRLP4 8 ADDRFP4 0 INDIRP4 ASGNP4 ADDRLP4 20 CNSTI4 1 ASGNI4 ADDRFP4 0 ADDRLP4 8 INDIRP4 ADDRLP4 20 INDIRI4 ADDP4 ASGNP4 ADDRLP4 0 ADDRLP4 8 INDIRP4 INDIRI1 CVII4 1 ASGNI4 ADDRLP4 12 ADDRFP4 4 INDIRP4 ASGNP4 ADDRFP4 4 ADDRLP4 12 INDIRP4 ADDRLP4 20 INDIRI4 ADDP4 ASGNP4 ADDRLP4 4 ADDRLP4 12 INDIRP4 INDIRI1 CVII4 1 ASGNI4 ADDRLP4 16 ADDRFP4 8 INDIRI4 ASGNI4 ADDRFP4 8 ADDRLP4 16 INDIRI4 ADDRLP4 20 INDIRI4 SUBI4 ASGNI4 ADDRLP4 16 INDIRI4 CNSTI4 0 NEI4 $296 CNSTI4 0 RETI4 ADDRGP4 $292 JUMPV LABELV $296 ADDRLP4 0 INDIRI4 ADDRLP4 4 INDIRI4 EQI4 $298 ADDRLP4 0 INDIRI4 ADDRLP4 4 INDIRI4 GEI4 $301 ADDRLP4 24 CNSTI4 -1 ASGNI4 ADDRGP4 $302 JUMPV LABELV $301 ADDRLP4 24 CNSTI4 1 ASGNI4 LABELV $302 ADDRLP4 24 INDIRI4 RETI4 ADDRGP4 $292 JUMPV LABELV $298 LABELV $294 ADDRLP4 0 INDIRI4 CNSTI4 0 NEI4 $293 CNSTI4 0 RETI4 LABELV $292 endproc Q_strncmp 28 0 export Q_stricmp proc Q_stricmp 12 12 ADDRLP4 4 CNSTU4 0 ASGNU4 ADDRFP4 0 INDIRP4 CVPU4 4 ADDRLP4 4 INDIRU4 EQU4 $305 ADDRFP4 4 INDIRP4 CVPU4 4 ADDRLP4 4 INDIRU4 EQU4 $305 ADDRFP4 0 INDIRP4 ARGP4 ADDRFP4 4 INDIRP4 ARGP4 CNSTI4 99999 ARGI4 ADDRLP4 8 ADDRGP4 Q_stricmpn CALLI4 ASGNI4 ADDRLP4 0 ADDRLP4 8 INDIRI4 ASGNI4 ADDRGP4 $306 JUMPV LABELV $305 ADDRLP4 0 CNSTI4 -1 ASGNI4 LABELV $306 ADDRLP4 0 INDIRI4 RETI4 LABELV $303 endproc Q_stricmp 12 12 export Q_strlwr proc Q_strlwr 12 4 ADDRLP4 0 ADDRFP4 0 INDIRP4 ASGNP4 ADDRGP4 $309 JUMPV LABELV $308 ADDRLP4 0 INDIRP4 INDIRI1 CVII4 1 ARGI4 ADDRLP4 8 ADDRGP4 qk_tolower CALLI4 ASGNI4 ADDRLP4 0 INDIRP4 ADDRLP4 8 INDIRI4 CVII1 4 ASGNI1 ADDRLP4 0 ADDRLP4 0 INDIRP4 CNSTI4 1 ADDP4 ASGNP4 LABELV $309 ADDRLP4 0 INDIRP4 INDIRI1 CVII4 1 CNSTI4 0 NEI4 $308 ADDRFP4 0 INDIRP4 RETP4 LABELV $307 endproc Q_strlwr 12 4 export Q_strupr proc Q_strupr 12 4 ADDRLP4 0 ADDRFP4 0 INDIRP4 ASGNP4 ADDRGP4 $313 JUMPV LABELV $312 ADDRLP4 0 INDIRP4 INDIRI1 CVII4 1 ARGI4 ADDRLP4 8 ADDRGP4 qk_toupper CALLI4 ASGNI4 ADDRLP4 0 INDIRP4 ADDRLP4 8 INDIRI4 CVII1 4 ASGNI1 ADDRLP4 0 ADDRLP4 0 INDIRP4 CNSTI4 1 ADDP4 ASGNP4 LABELV $313 ADDRLP4 0 INDIRP4 INDIRI1 CVII4 1 CNSTI4 0 NEI4 $312 ADDRFP4 0 INDIRP4 RETP4 LABELV $311 endproc Q_strupr 12 4 export Q_strcat proc Q_strcat 12 12 ADDRFP4 0 INDIRP4 ARGP4 ADDRLP4 4 ADDRGP4 qk_strlen CALLU4 ASGNU4 ADDRLP4 0 ADDRLP4 4 INDIRU4 CVUI4 4 ASGNI4 ADDRLP4 0 INDIRI4 ADDRFP4 4 INDIRI4 LTI4 $316 CNSTI4 0 ARGI4 ADDRGP4 $318 ARGP4 ADDRGP4 Com_Error CALLV pop LABELV $316 ADDRLP4 0 INDIRI4 ADDRFP4 0 INDIRP4 ADDP4 ARGP4 ADDRFP4 8 INDIRP4 ARGP4 ADDRFP4 4 INDIRI4 ADDRLP4 0 INDIRI4 SUBI4 ARGI4 ADDRGP4 Q_strncpyz CALLV pop LABELV $315 endproc Q_strcat 12 12 export Q_stristr proc Q_stristr 36 12 ADDRFP4 0 ADDRFP4 0 INDIRP4 ASGNP4 ADDRFP4 4 ADDRFP4 4 INDIRP4 ASGNP4 ADDRLP4 8 ADDRFP4 4 INDIRP4 ASGNP4 ADDRFP4 4 ADDRLP4 8 INDIRP4 CNSTI4 1 ADDP4 ASGNP4 ADDRLP4 12 ADDRLP4 8 INDIRP4 INDIRI1 ASGNI1 ADDRLP4 1 ADDRLP4 12 INDIRI1 ASGNI1 ADDRLP4 12 INDIRI1 CVII4 1 CNSTI4 0 EQI4 $320 ADDRLP4 16 ADDRLP4 1 INDIRI1 CVII4 1 ASGNI4 ADDRLP4 16 INDIRI4 CNSTI4 97 LTI4 $322 ADDRLP4 16 INDIRI4 CNSTI4 122 GTI4 $322 ADDRLP4 1 ADDRLP4 1 INDIRI1 CVII4 1 CNSTI4 32 SUBI4 CVII1 4 ASGNI1 LABELV $322 ADDRFP4 4 INDIRP4 ARGP4 ADDRLP4 20 ADDRGP4 qk_strlen CALLU4 ASGNU4 ADDRLP4 4 ADDRLP4 20 INDIRU4 ASGNU4 LABELV $324 LABELV $327 ADDRLP4 24 ADDRFP4 0 INDIRP4 ASGNP4 ADDRFP4 0 ADDRLP4 24 INDIRP4 CNSTI4 1 ADDP4 ASGNP4 ADDRLP4 28 ADDRLP4 24 INDIRP4 INDIRI1 ASGNI1 ADDRLP4 0 ADDRLP4 28 INDIRI1 ASGNI1 ADDRLP4 28 INDIRI1 CVII4 1 CNSTI4 0 NEI4 $330 CNSTP4 0 RETP4 ADDRGP4 $319 JUMPV LABELV $330 ADDRLP4 32 ADDRLP4 0 INDIRI1 CVII4 1 ASGNI4 ADDRLP4 32 INDIRI4 CNSTI4 97 LTI4 $332 ADDRLP4 32 INDIRI4 CNSTI4 122 GTI4 $332 ADDRLP4 0 ADDRLP4 0 INDIRI1 CVII4 1 CNSTI4 32 SUBI4 CVII1 4 ASGNI1 LABELV $332 LABELV $328 ADDRLP4 0 INDIRI1 CVII4 1 ADDRLP4 1 INDIRI1 CVII4 1 NEI4 $327 LABELV $325 ADDRFP4 0 INDIRP4 ARGP4 ADDRFP4 4 INDIRP4 ARGP4 ADDRLP4 4 INDIRU4 CVUI4 4 ARGI4 ADDRLP4 24 ADDRGP4 Q_stricmpn CALLI4 ASGNI4 ADDRLP4 24 INDIRI4 CNSTI4 0 NEI4 $324 ADDRFP4 0 ADDRFP4 0 INDIRP4 CNSTI4 -1 ADDP4 ASGNP4 LABELV $320 ADDRFP4 0 INDIRP4 RETP4 LABELV $319 endproc Q_stristr 36 12 export Q_PrintStrlen proc Q_PrintStrlen 28 0 ADDRFP4 0 INDIRP4 CVPU4 4 CNSTU4 0 NEU4 $335 CNSTI4 0 RETI4 ADDRGP4 $334 JUMPV LABELV $335 ADDRLP4 4 CNSTI4 0 ASGNI4 ADDRLP4 0 ADDRFP4 0 INDIRP4 ASGNP4 ADDRGP4 $338 JUMPV LABELV $337 ADDRLP4 0 INDIRP4 CVPU4 4 CNSTU4 0 EQU4 $340 ADDRLP4 0 INDIRP4 INDIRI1 CVII4 1 CNSTI4 94 NEI4 $340 ADDRLP4 12 ADDRLP4 0 INDIRP4 CNSTI4 1 ADDP4 INDIRI1 CVII4 1 ASGNI4 ADDRLP4 12 INDIRI4 CNSTI4 0 EQI4 $340 ADDRLP4 12 INDIRI4 CNSTI4 65 LTI4 $343 ADDRLP4 12 INDIRI4 CNSTI4 90 LEI4 $342 LABELV $343 ADDRLP4 16 ADDRLP4 0 INDIRP4 CNSTI4 1 ADDP4 INDIRI1 CVII4 1 ASGNI4 ADDRLP4 16 INDIRI4 CNSTI4 97 LTI4 $344 ADDRLP4 16 INDIRI4 CNSTI4 122 LEI4 $342 LABELV $344 ADDRLP4 20 ADDRLP4 0 INDIRP4 CNSTI4 1 ADDP4 INDIRI1 CVII4 1 ASGNI4 ADDRLP4 20 INDIRI4 CNSTI4 48 LTI4 $340 ADDRLP4 20 INDIRI4 CNSTI4 57 GTI4 $340 LABELV $342 ADDRLP4 0 ADDRLP4 0 INDIRP4 CNSTI4 2 ADDP4 ASGNP4 ADDRGP4 $338 JUMPV LABELV $340 ADDRLP4 24 CNSTI4 1 ASGNI4 ADDRLP4 0 ADDRLP4 0 INDIRP4 ADDRLP4 24 INDIRI4 ADDP4 ASGNP4 ADDRLP4 4 ADDRLP4 4 INDIRI4 ADDRLP4 24 INDIRI4 ADDI4 ASGNI4 LABELV $338 ADDRLP4 0 INDIRP4 INDIRI1 CVII4 1 CNSTI4 0 NEI4 $337 ADDRLP4 4 INDIRI4 RETI4 LABELV $334 endproc Q_PrintStrlen 28 0 export Q_CleanStr proc Q_CleanStr 40 0 ADDRFP4 0 ADDRFP4 0 INDIRP4 ASGNP4 ADDRLP4 0 ADDRFP4 0 INDIRP4 ASGNP4 ADDRLP4 8 ADDRFP4 0 INDIRP4 ASGNP4 ADDRGP4 $347 JUMPV LABELV $346 ADDRLP4 0 INDIRP4 CVPU4 4 CNSTU4 0 EQU4 $349 ADDRLP4 0 INDIRP4 INDIRI1 CVII4 1 CNSTI4 94 NEI4 $349 ADDRLP4 20 ADDRLP4 0 INDIRP4 CNSTI4 1 ADDP4 INDIRI1 CVII4 1 ASGNI4 ADDRLP4 20 INDIRI4 CNSTI4 0 EQI4 $349 ADDRLP4 20 INDIRI4 CNSTI4 65 LTI4 $352 ADDRLP4 20 INDIRI4 CNSTI4 90 LEI4 $351 LABELV $352 ADDRLP4 24 ADDRLP4 0 INDIRP4 CNSTI4 1 ADDP4 INDIRI1 CVII4 1 ASGNI4 ADDRLP4 24 INDIRI4 CNSTI4 97 LTI4 $353 ADDRLP4 24 INDIRI4 CNSTI4 122 LEI4 $351 LABELV $353 ADDRLP4 28 ADDRLP4 0 INDIRP4 CNSTI4 1 ADDP4 INDIRI1 CVII4 1 ASGNI4 ADDRLP4 28 INDIRI4 CNSTI4 48 LTI4 $349 ADDRLP4 28 INDIRI4 CNSTI4 57 GTI4 $349 LABELV $351 ADDRLP4 0 ADDRLP4 0 INDIRP4 CNSTI4 1 ADDP4 ASGNP4 ADDRGP4 $350 JUMPV LABELV $349 ADDRLP4 4 INDIRI4 CNSTI4 32 LTI4 $354 ADDRLP4 4 INDIRI4 CNSTI4 126 GTI4 $354 ADDRLP4 36 ADDRLP4 8 INDIRP4 ASGNP4 ADDRLP4 8 ADDRLP4 36 INDIRP4 CNSTI4 1 ADDP4 ASGNP4 ADDRLP4 36 INDIRP4 ADDRLP4 4 INDIRI4 CVII1 4 ASGNI1 LABELV $354 LABELV $350 ADDRLP4 0 ADDRLP4 0 INDIRP4 CNSTI4 1 ADDP4 ASGNP4 LABELV $347 ADDRLP4 16 ADDRLP4 0 INDIRP4 INDIRI1 CVII4 1 ASGNI4 ADDRLP4 4 ADDRLP4 16 INDIRI4 ASGNI4 ADDRLP4 16 INDIRI4 CNSTI4 0 NEI4 $346 ADDRLP4 8 INDIRP4 CNSTI1 0 ASGNI1 ADDRFP4 0 INDIRP4 RETP4 LABELV $345 endproc Q_CleanStr 40 0 export Q_CountChar proc Q_CountChar 4 0 ADDRFP4 0 ADDRFP4 0 INDIRP4 ASGNP4 ADDRFP4 4 ADDRFP4 4 INDIRI4 CVII1 4 ASGNI1 ADDRLP4 0 CNSTI4 0 ASGNI4 ADDRGP4 $360 JUMPV LABELV $357 ADDRFP4 0 INDIRP4 INDIRI1 CVII4 1 ADDRFP4 4 INDIRI1 CVII4 1 NEI4 $361 ADDRLP4 0 ADDRLP4 0 INDIRI4 CNSTI4 1 ADDI4 ASGNI4 LABELV $361 LABELV $358 ADDRFP4 0 ADDRFP4 0 INDIRP4 CNSTI4 1 ADDP4 ASGNP4 LABELV $360 ADDRFP4 0 INDIRP4 INDIRI1 CVII4 1 CNSTI4 0 NEI4 $357 ADDRLP4 0 INDIRI4 RETI4 LABELV $356 endproc Q_CountChar 4 0 export Com_sprintf proc Com_sprintf 12 16 ADDRLP4 4 ADDRFP4 8+4 ASGNP4 ADDRFP4 0 INDIRP4 ARGP4 ADDRFP4 4 INDIRI4 CVIU4 4 ARGU4 ADDRFP4 8 INDIRP4 ARGP4 ADDRLP4 4 INDIRP4 ARGP4 ADDRLP4 8 ADDRGP4 qk_vsnprintf CALLI4 ASGNI4 ADDRLP4 0 ADDRLP4 8 INDIRI4 ASGNI4 ADDRLP4 4 CNSTP4 0 ASGNP4 ADDRLP4 0 INDIRI4 ADDRFP4 4 INDIRI4 LTI4 $365 ADDRGP4 $367 ARGP4 ADDRFP4 4 INDIRI4 ARGI4 ADDRLP4 0 INDIRI4 CNSTI4 1 ADDI4 ARGI4 ADDRGP4 Com_Printf CALLV pop LABELV $365 ADDRLP4 0 INDIRI4 RETI4 LABELV $363 endproc Com_sprintf 12 16 bss align 1 LABELV $369 skip 64000 data align 4 LABELV $370 byte 4 0 export va code proc va 20 16 ADDRLP4 8 ADDRGP4 $370 ASGNP4 ADDRLP4 12 ADDRLP4 8 INDIRP4 INDIRI4 ASGNI4 ADDRLP4 16 CNSTI4 1 ASGNI4 ADDRLP4 4 CNSTI4 32000 ADDRLP4 12 INDIRI4 ADDRLP4 16 INDIRI4 BANDI4 MULI4 ADDRGP4 $369 ADDP4 ASGNP4 ADDRLP4 8 INDIRP4 ADDRLP4 12 INDIRI4 ADDRLP4 16 INDIRI4 ADDI4 ASGNI4 ADDRLP4 0 ADDRFP4 0+4 ASGNP4 ADDRLP4 4 INDIRP4 ARGP4 CNSTU4 32000 ARGU4 ADDRFP4 0 INDIRP4 ARGP4 ADDRLP4 0 INDIRP4 ARGP4 ADDRGP4 qk_vsnprintf CALLI4 pop ADDRLP4 0 CNSTP4 0 ASGNP4 ADDRLP4 4 INDIRP4 RETP4 LABELV $368 endproc va 20 16 export Com_TruncateLongString proc Com_TruncateLongString 8 12 ADDRFP4 4 INDIRP4 ARGP4 ADDRLP4 4 ADDRGP4 qk_strlen CALLU4 ASGNU4 ADDRLP4 0 ADDRLP4 4 INDIRU4 CVUI4 4 ASGNI4 ADDRLP4 0 INDIRI4 CNSTI4 64 GTI4 $373 ADDRFP4 0 INDIRP4 ARGP4 ADDRFP4 4 INDIRP4 ARGP4 CNSTI4 64 ARGI4 ADDRGP4 Q_strncpyz CALLV pop ADDRGP4 $374 JUMPV LABELV $373 ADDRFP4 0 INDIRP4 ARGP4 ADDRFP4 4 INDIRP4 ARGP4 CNSTI4 29 ARGI4 ADDRGP4 Q_strncpyz CALLV pop ADDRFP4 0 INDIRP4 ARGP4 CNSTI4 64 ARGI4 ADDRGP4 $375 ARGP4 ADDRGP4 Q_strcat CALLV pop ADDRFP4 0 INDIRP4 ARGP4 CNSTI4 64 ARGI4 ADDRLP4 0 INDIRI4 ADDRFP4 4 INDIRP4 ADDP4 CNSTI4 -29 ADDP4 ARGP4 ADDRGP4 Q_strcat CALLV pop LABELV $374 LABELV $372 endproc Com_TruncateLongString 8 12 bss align 1 LABELV $377 skip 16384 data align 4 LABELV $378 byte 4 0 export Info_ValueForKey code proc Info_ValueForKey 8220 8 ADDRFP4 0 ADDRFP4 0 INDIRP4 ASGNP4 ADDRFP4 4 ADDRFP4 4 INDIRP4 ASGNP4 ADDRLP4 8196 CNSTU4 0 ASGNU4 ADDRFP4 0 INDIRP4 CVPU4 4 ADDRLP4 8196 INDIRU4 EQU4 $381 ADDRFP4 4 INDIRP4 CVPU4 4 ADDRLP4 8196 INDIRU4 NEU4 $379 LABELV $381 ADDRGP4 $38 RETP4 ADDRGP4 $376 JUMPV LABELV $379 ADDRFP4 0 INDIRP4 ARGP4 ADDRLP4 8200 ADDRGP4 qk_strlen CALLU4 ASGNU4 ADDRLP4 8200 INDIRU4 CNSTU4 8192 LTU4 $382 CNSTI4 1 ARGI4 ADDRGP4 $384 ARGP4 ADDRGP4 Com_Error CALLV pop LABELV $382 ADDRLP4 8204 ADDRGP4 $378 ASGNP4 ADDRLP4 8204 INDIRP4 ADDRLP4 8204 INDIRP4 INDIRI4 CNSTI4 1 BXORI4 ASGNI4 ADDRFP4 0 INDIRP4 INDIRI1 CVII4 1 CNSTI4 92 NEI4 $388 ADDRFP4 0 ADDRFP4 0 INDIRP4 CNSTI4 1 ADDP4 ASGNP4 ADDRGP4 $388 JUMPV LABELV $387 ADDRLP4 0 ADDRLP4 4 ASGNP4 ADDRGP4 $391 JUMPV LABELV $390 ADDRFP4 0 INDIRP4 INDIRI1 CVII4 1 CNSTI4 0 NEI4 $393 ADDRGP4 $38 RETP4 ADDRGP4 $376 JUMPV LABELV $393 ADDRLP4 8208 ADDRLP4 0 INDIRP4 ASGNP4 ADDRLP4 8216 CNSTI4 1 ASGNI4 ADDRLP4 0 ADDRLP4 8208 INDIRP4 ADDRLP4 8216 INDIRI4 ADDP4 ASGNP4 ADDRLP4 8212 ADDRFP4 0 INDIRP4 ASGNP4 ADDRFP4 0 ADDRLP4 8212 INDIRP4 ADDRLP4 8216 INDIRI4 ADDP4 ASGNP4 ADDRLP4 8208 INDIRP4 ADDRLP4 8212 INDIRP4 INDIRI1 ASGNI1 LABELV $391 ADDRFP4 0 INDIRP4 INDIRI1 CVII4 1 CNSTI4 92 NEI4 $390 ADDRLP4 0 INDIRP4 CNSTI1 0 ASGNI1 ADDRFP4 0 ADDRFP4 0 INDIRP4 CNSTI4 1 ADDP4 ASGNP4 ADDRLP4 0 ADDRGP4 $378 INDIRI4 CNSTI4 13 LSHI4 ADDRGP4 $377 ADDP4 ASGNP4 ADDRGP4 $396 JUMPV LABELV $395 ADDRLP4 8208 ADDRLP4 0 INDIRP4 ASGNP4 ADDRLP4 8216 CNSTI4 1 ASGNI4 ADDRLP4 0 ADDRLP4 8208 INDIRP4 ADDRLP4 8216 INDIRI4 ADDP4 ASGNP4 ADDRLP4 8212 ADDRFP4 0 INDIRP4 ASGNP4 ADDRFP4 0 ADDRLP4 8212 INDIRP4 ADDRLP4 8216 INDIRI4 ADDP4 ASGNP4 ADDRLP4 8208 INDIRP4 ADDRLP4 8212 INDIRP4 INDIRI1 ASGNI1 LABELV $396 ADDRLP4 8208 ADDRFP4 0 INDIRP4 INDIRI1 CVII4 1 ASGNI4 ADDRLP4 8208 INDIRI4 CNSTI4 92 EQI4 $398 ADDRLP4 8208 INDIRI4 CNSTI4 0 NEI4 $395 LABELV $398 ADDRLP4 0 INDIRP4 CNSTI1 0 ASGNI1 ADDRFP4 4 INDIRP4 ARGP4 ADDRLP4 4 ARGP4 ADDRLP4 8212 ADDRGP4 Q_stricmp CALLI4 ASGNI4 ADDRLP4 8212 INDIRI4 CNSTI4 0 NEI4 $399 ADDRGP4 $378 INDIRI4 CNSTI4 13 LSHI4 ADDRGP4 $377 ADDP4 RETP4 ADDRGP4 $376 JUMPV LABELV $399 ADDRFP4 0 INDIRP4 INDIRI1 CVII4 1 CNSTI4 0 NEI4 $401 ADDRGP4 $389 JUMPV LABELV $401 ADDRFP4 0 ADDRFP4 0 INDIRP4 CNSTI4 1 ADDP4 ASGNP4 LABELV $388 ADDRGP4 $387 JUMPV LABELV $389 ADDRGP4 $38 RETP4 LABELV $376 endproc Info_ValueForKey 8220 8 export Info_NextPair proc Info_NextPair 20 0 ADDRFP4 0 ADDRFP4 0 INDIRP4 ASGNP4 ADDRLP4 0 ADDRFP4 0 INDIRP4 INDIRP4 ASGNP4 ADDRLP4 0 INDIRP4 INDIRI1 CVII4 1 CNSTI4 92 NEI4 $404 ADDRLP4 0 ADDRLP4 0 INDIRP4 CNSTI4 1 ADDP4 ASGNP4 LABELV $404 ADDRFP4 4 INDIRP4 CNSTI1 0 ASGNI1 ADDRFP4 8 INDIRP4 CNSTI1 0 ASGNI1 ADDRLP4 4 ADDRFP4 4 INDIRP4 ASGNP4 ADDRGP4 $407 JUMPV LABELV $406 ADDRLP4 0 INDIRP4 INDIRI1 CVII4 1 CNSTI4 0 NEI4 $409 ADDRLP4 4 INDIRP4 CNSTI1 0 ASGNI1 ADDRFP4 0 INDIRP4 ADDRLP4 0 INDIRP4 ASGNP4 ADDRGP4 $403 JUMPV LABELV $409 ADDRLP4 8 ADDRLP4 4 INDIRP4 ASGNP4 ADDRLP4 16 CNSTI4 1 ASGNI4 ADDRLP4 4 ADDRLP4 8 INDIRP4 ADDRLP4 16 INDIRI4 ADDP4 ASGNP4 ADDRLP4 12 ADDRLP4 0 INDIRP4 ASGNP4 ADDRLP4 0 ADDRLP4 12 INDIRP4 ADDRLP4 16 INDIRI4 ADDP4 ASGNP4 ADDRLP4 8 INDIRP4 ADDRLP4 12 INDIRP4 INDIRI1 ASGNI1 LABELV $407 ADDRLP4 0 INDIRP4 INDIRI1 CVII4 1 CNSTI4 92 NEI4 $406 ADDRLP4 4 INDIRP4 CNSTI1 0 ASGNI1 ADDRLP4 0 ADDRLP4 0 INDIRP4 CNSTI4 1 ADDP4 ASGNP4 ADDRLP4 4 ADDRFP4 8 INDIRP4 ASGNP4 ADDRGP4 $412 JUMPV LABELV $411 ADDRLP4 8 ADDRLP4 4 INDIRP4 ASGNP4 ADDRLP4 16 CNSTI4 1 ASGNI4 ADDRLP4 4 ADDRLP4 8 INDIRP4 ADDRLP4 16 INDIRI4 ADDP4 ASGNP4 ADDRLP4 12 ADDRLP4 0 INDIRP4 ASGNP4 ADDRLP4 0 ADDRLP4 12 INDIRP4 ADDRLP4 16 INDIRI4 ADDP4 ASGNP4 ADDRLP4 8 INDIRP4 ADDRLP4 12 INDIRP4 INDIRI1 ASGNI1 LABELV $412 ADDRLP4 8 ADDRLP4 0 INDIRP4 INDIRI1 CVII4 1 ASGNI4 ADDRLP4 8 INDIRI4 CNSTI4 92 EQI4 $414 ADDRLP4 8 INDIRI4 CNSTI4 0 NEI4 $411 LABELV $414 ADDRLP4 4 INDIRP4 CNSTI1 0 ASGNI1 ADDRFP4 0 INDIRP4 ADDRLP4 0 INDIRP4 ASGNP4 LABELV $403 endproc Info_NextPair 20 0 export Info_RemoveKey proc Info_RemoveKey 2080 12 ADDRFP4 0 ADDRFP4 0 INDIRP4 ASGNP4 ADDRFP4 4 ADDRFP4 4 INDIRP4 ASGNP4 ADDRFP4 0 INDIRP4 ARGP4 ADDRLP4 2056 ADDRGP4 qk_strlen CALLU4 ASGNU4 ADDRLP4 2056 INDIRU4 CNSTU4 1024 LTU4 $416 CNSTI4 1 ARGI4 ADDRGP4 $418 ARGP4 ADDRGP4 Com_Error CALLV pop LABELV $416 ADDRFP4 4 INDIRP4 ARGP4 CNSTI4 92 ARGI4 ADDRLP4 2060 ADDRGP4 qk_strchr CALLP4 ASGNP4 ADDRLP4 2060 INDIRP4 CVPU4 4 CNSTU4 0 EQU4 $422 ADDRGP4 $415 JUMPV LABELV $421 ADDRLP4 1028 ADDRFP4 0 INDIRP4 ASGNP4 ADDRFP4 0 INDIRP4 INDIRI1 CVII4 1 CNSTI4 92 NEI4 $424 ADDRFP4 0 ADDRFP4 0 INDIRP4 CNSTI4 1 ADDP4 ASGNP4 LABELV $424 ADDRLP4 0 ADDRLP4 4 ASGNP4 ADDRGP4 $427 JUMPV LABELV $426 ADDRFP4 0 INDIRP4 INDIRI1 CVII4 1 CNSTI4 0 NEI4 $429 ADDRGP4 $415 JUMPV LABELV $429 ADDRLP4 2068 ADDRLP4 0 INDIRP4 ASGNP4 ADDRLP4 2076 CNSTI4 1 ASGNI4 ADDRLP4 0 ADDRLP4 2068 INDIRP4 ADDRLP4 2076 INDIRI4 ADDP4 ASGNP4 ADDRLP4 2072 ADDRFP4 0 INDIRP4 ASGNP4 ADDRFP4 0 ADDRLP4 2072 INDIRP4 ADDRLP4 2076 INDIRI4 ADDP4 ASGNP4 ADDRLP4 2068 INDIRP4 ADDRLP4 2072 INDIRP4 INDIRI1 ASGNI1 LABELV $427 ADDRFP4 0 INDIRP4 INDIRI1 CVII4 1 CNSTI4 92 NEI4 $426 ADDRLP4 0 INDIRP4 CNSTI1 0 ASGNI1 ADDRFP4 0 ADDRFP4 0 INDIRP4 CNSTI4 1 ADDP4 ASGNP4 ADDRLP4 0 ADDRLP4 1032 ASGNP4 ADDRGP4 $432 JUMPV LABELV $431 ADDRFP4 0 INDIRP4 INDIRI1 CVII4 1 CNSTI4 0 NEI4 $434 ADDRGP4 $415 JUMPV LABELV $434 ADDRLP4 2068 ADDRLP4 0 INDIRP4 ASGNP4 ADDRLP4 2076 CNSTI4 1 ASGNI4 ADDRLP4 0 ADDRLP4 2068 INDIRP4 ADDRLP4 2076 INDIRI4 ADDP4 ASGNP4 ADDRLP4 2072 ADDRFP4 0 INDIRP4 ASGNP4 ADDRFP4 0 ADDRLP4 2072 INDIRP4 ADDRLP4 2076 INDIRI4 ADDP4 ASGNP4 ADDRLP4 2068 INDIRP4 ADDRLP4 2072 INDIRP4 INDIRI1 ASGNI1 LABELV $432 ADDRLP4 2068 ADDRFP4 0 INDIRP4 INDIRI1 CVII4 1 ASGNI4 ADDRLP4 2068 INDIRI4 CNSTI4 92 EQI4 $436 ADDRLP4 2068 INDIRI4 CNSTI4 0 NEI4 $431 LABELV $436 ADDRLP4 0 INDIRP4 CNSTI1 0 ASGNI1 ADDRFP4 4 INDIRP4 ARGP4 ADDRLP4 4 ARGP4 ADDRLP4 2072 ADDRGP4 qk_strcmp CALLI4 ASGNI4 ADDRLP4 2072 INDIRI4 CNSTI4 0 NEI4 $437 ADDRFP4 0 INDIRP4 ARGP4 ADDRLP4 2076 ADDRGP4 qk_strlen CALLU4 ASGNU4 ADDRLP4 1028 INDIRP4 ARGP4 ADDRFP4 0 INDIRP4 ARGP4 ADDRLP4 2076 INDIRU4 CNSTU4 1 ADDU4 ARGU4 ADDRGP4 qk_memmove CALLP4 pop ADDRGP4 $415 JUMPV LABELV $437 ADDRFP4 0 INDIRP4 INDIRI1 CVII4 1 CNSTI4 0 NEI4 $439 ADDRGP4 $415 JUMPV LABELV $439 LABELV $422 ADDRGP4 $421 JUMPV LABELV $415 endproc Info_RemoveKey 2080 12 export Info_RemoveKey_Big proc Info_RemoveKey_Big 16416 8 ADDRFP4 0 ADDRFP4 0 INDIRP4 ASGNP4 ADDRFP4 4 ADDRFP4 4 INDIRP4 ASGNP4 ADDRFP4 0 INDIRP4 ARGP4 ADDRLP4 16392 ADDRGP4 qk_strlen CALLU4 ASGNU4 ADDRLP4 16392 INDIRU4 CNSTU4 8192 LTU4 $442 CNSTI4 1 ARGI4 ADDRGP4 $444 ARGP4 ADDRGP4 Com_Error CALLV pop LABELV $442 ADDRFP4 4 INDIRP4 ARGP4 CNSTI4 92 ARGI4 ADDRLP4 16396 ADDRGP4 qk_strchr CALLP4 ASGNP4 ADDRLP4 16396 INDIRP4 CVPU4 4 CNSTU4 0 EQU4 $448 ADDRGP4 $441 JUMPV LABELV $447 ADDRLP4 8196 ADDRFP4 0 INDIRP4 ASGNP4 ADDRFP4 0 INDIRP4 INDIRI1 CVII4 1 CNSTI4 92 NEI4 $450 ADDRFP4 0 ADDRFP4 0 INDIRP4 CNSTI4 1 ADDP4 ASGNP4 LABELV $450 ADDRLP4 0 ADDRLP4 4 ASGNP4 ADDRGP4 $453 JUMPV LABELV $452 ADDRFP4 0 INDIRP4 INDIRI1 CVII4 1 CNSTI4 0 NEI4 $455 ADDRGP4 $441 JUMPV LABELV $455 ADDRLP4 16404 ADDRLP4 0 INDIRP4 ASGNP4 ADDRLP4 16412 CNSTI4 1 ASGNI4 ADDRLP4 0 ADDRLP4 16404 INDIRP4 ADDRLP4 16412 INDIRI4 ADDP4 ASGNP4 ADDRLP4 16408 ADDRFP4 0 INDIRP4 ASGNP4 ADDRFP4 0 ADDRLP4 16408 INDIRP4 ADDRLP4 16412 INDIRI4 ADDP4 ASGNP4 ADDRLP4 16404 INDIRP4 ADDRLP4 16408 INDIRP4 INDIRI1 ASGNI1 LABELV $453 ADDRFP4 0 INDIRP4 INDIRI1 CVII4 1 CNSTI4 92 NEI4 $452 ADDRLP4 0 INDIRP4 CNSTI1 0 ASGNI1 ADDRFP4 0 ADDRFP4 0 INDIRP4 CNSTI4 1 ADDP4 ASGNP4 ADDRLP4 0 ADDRLP4 8200 ASGNP4 ADDRGP4 $458 JUMPV LABELV $457 ADDRFP4 0 INDIRP4 INDIRI1 CVII4 1 CNSTI4 0 NEI4 $460 ADDRGP4 $441 JUMPV LABELV $460 ADDRLP4 16404 ADDRLP4 0 INDIRP4 ASGNP4 ADDRLP4 16412 CNSTI4 1 ASGNI4 ADDRLP4 0 ADDRLP4 16404 INDIRP4 ADDRLP4 16412 INDIRI4 ADDP4 ASGNP4 ADDRLP4 16408 ADDRFP4 0 INDIRP4 ASGNP4 ADDRFP4 0 ADDRLP4 16408 INDIRP4 ADDRLP4 16412 INDIRI4 ADDP4 ASGNP4 ADDRLP4 16404 INDIRP4 ADDRLP4 16408 INDIRP4 INDIRI1 ASGNI1 LABELV $458 ADDRLP4 16404 ADDRFP4 0 INDIRP4 INDIRI1 CVII4 1 ASGNI4 ADDRLP4 16404 INDIRI4 CNSTI4 92 EQI4 $462 ADDRLP4 16404 INDIRI4 CNSTI4 0 NEI4 $457 LABELV $462 ADDRLP4 0 INDIRP4 CNSTI1 0 ASGNI1 ADDRFP4 4 INDIRP4 ARGP4 ADDRLP4 4 ARGP4 ADDRLP4 16408 ADDRGP4 qk_strcmp CALLI4 ASGNI4 ADDRLP4 16408 INDIRI4 CNSTI4 0 NEI4 $463 ADDRLP4 8196 INDIRP4 ARGP4 ADDRFP4 0 INDIRP4 ARGP4 ADDRGP4 qk_strcpy CALLP4 pop ADDRGP4 $441 JUMPV LABELV $463 ADDRFP4 0 INDIRP4 INDIRI1 CVII4 1 CNSTI4 0 NEI4 $465 ADDRGP4 $441 JUMPV LABELV $465 LABELV $448 ADDRGP4 $447 JUMPV LABELV $441 endproc Info_RemoveKey_Big 16416 8 export Info_Validate proc Info_Validate 8 8 ADDRFP4 0 INDIRP4 ARGP4 CNSTI4 34 ARGI4 ADDRLP4 0 ADDRGP4 qk_strchr CALLP4 ASGNP4 ADDRLP4 0 INDIRP4 CVPU4 4 CNSTU4 0 EQU4 $468 CNSTI4 0 RETI4 ADDRGP4 $467 JUMPV LABELV $468 ADDRFP4 0 INDIRP4 ARGP4 CNSTI4 59 ARGI4 ADDRLP4 4 ADDRGP4 qk_strchr CALLP4 ASGNP4 ADDRLP4 4 INDIRP4 CVPU4 4 CNSTU4 0 EQU4 $470 CNSTI4 0 RETI4 ADDRGP4 $467 JUMPV LABELV $470 CNSTI4 1 RETI4 LABELV $467 endproc Info_Validate 8 8 export Info_SetValueForKey proc Info_SetValueForKey 1048 20 ADDRFP4 0 ADDRFP4 0 INDIRP4 ASGNP4 ADDRFP4 4 ADDRFP4 4 INDIRP4 ASGNP4 ADDRFP4 8 ADDRFP4 8 INDIRP4 ASGNP4 ADDRLP4 0 ADDRGP4 $473 ASGNP4 ADDRFP4 0 INDIRP4 ARGP4 ADDRLP4 1028 ADDRGP4 qk_strlen CALLU4 ASGNU4 ADDRLP4 1028 INDIRU4 CNSTU4 1024 LTU4 $480 CNSTI4 1 ARGI4 ADDRGP4 $476 ARGP4 ADDRGP4 Com_Error CALLV pop ADDRGP4 $480 JUMPV LABELV $477 ADDRFP4 4 INDIRP4 ARGP4 ADDRLP4 0 INDIRP4 INDIRI1 CVII4 1 ARGI4 ADDRLP4 1032 ADDRGP4 qk_strchr CALLP4 ASGNP4 ADDRLP4 1032 INDIRP4 CVPU4 4 CNSTU4 0 NEU4 $483 ADDRFP4 8 INDIRP4 ARGP4 ADDRLP4 0 INDIRP4 INDIRI1 CVII4 1 ARGI4 ADDRLP4 1036 ADDRGP4 qk_strchr CALLP4 ASGNP4 ADDRLP4 1036 INDIRP4 CVPU4 4 CNSTU4 0 EQU4 $481 LABELV $483 ADDRGP4 $484 ARGP4 ADDRLP4 0 INDIRP4 INDIRI1 CVII4 1 ARGI4 ADDRFP4 4 INDIRP4 ARGP4 ADDRFP4 8 INDIRP4 ARGP4 ADDRGP4 Com_Printf CALLV pop ADDRGP4 $472 JUMPV LABELV $481 LABELV $478 ADDRLP4 0 ADDRLP4 0 INDIRP4 CNSTI4 1 ADDP4 ASGNP4 LABELV $480 ADDRLP4 0 INDIRP4 INDIRI1 CVII4 1 CNSTI4 0 NEI4 $477 ADDRFP4 0 INDIRP4 ARGP4 ADDRFP4 4 INDIRP4 ARGP4 ADDRGP4 Info_RemoveKey CALLV pop ADDRFP4 8 INDIRP4 CVPU4 4 CNSTU4 0 EQU4 $487 ADDRFP4 8 INDIRP4 ARGP4 ADDRLP4 1036 ADDRGP4 qk_strlen CALLU4 ASGNU4 ADDRLP4 1036 INDIRU4 CNSTU4 0 NEU4 $485 LABELV $487 ADDRGP4 $472 JUMPV LABELV $485 ADDRLP4 4 ARGP4 CNSTI4 1024 ARGI4 ADDRGP4 $488 ARGP4 ADDRFP4 4 INDIRP4 ARGP4 ADDRFP4 8 INDIRP4 ARGP4 ADDRGP4 Com_sprintf CALLI4 pop ADDRLP4 4 ARGP4 ADDRLP4 1040 ADDRGP4 qk_strlen CALLU4 ASGNU4 ADDRFP4 0 INDIRP4 ARGP4 ADDRLP4 1044 ADDRGP4 qk_strlen CALLU4 ASGNU4 ADDRLP4 1040 INDIRU4 ADDRLP4 1044 INDIRU4 ADDU4 CNSTU4 1024 LTU4 $489 ADDRGP4 $491 ARGP4 ADDRGP4 Com_Printf CALLV pop ADDRGP4 $472 JUMPV LABELV $489 ADDRLP4 4 ARGP4 ADDRFP4 0 INDIRP4 ARGP4 ADDRGP4 qk_strcat CALLP4 pop ADDRFP4 0 INDIRP4 ARGP4 ADDRLP4 4 ARGP4 ADDRGP4 qk_strcpy CALLP4 pop LABELV $472 endproc Info_SetValueForKey 1048 20 export Info_SetValueForKey_Big proc Info_SetValueForKey_Big 8208 20 ADDRFP4 0 ADDRFP4 0 INDIRP4 ASGNP4 ADDRFP4 4 ADDRFP4 4 INDIRP4 ASGNP4 ADDRFP4 8 ADDRFP4 8 INDIRP4 ASGNP4 ADDRLP4 0 ADDRGP4 $473 ASGNP4 ADDRFP4 0 INDIRP4 ARGP4 ADDRLP4 8196 ADDRGP4 qk_strlen CALLU4 ASGNU4 ADDRLP4 8196 INDIRU4 CNSTU4 8192 LTU4 $498 CNSTI4 1 ARGI4 ADDRGP4 $476 ARGP4 ADDRGP4 Com_Error CALLV pop ADDRGP4 $498 JUMPV LABELV $495 ADDRFP4 4 INDIRP4 ARGP4 ADDRLP4 0 INDIRP4 INDIRI1 CVII4 1 ARGI4 ADDRLP4 8200 ADDRGP4 qk_strchr CALLP4 ASGNP4 ADDRLP4 8200 INDIRP4 CVPU4 4 CNSTU4 0 NEU4 $501 ADDRFP4 8 INDIRP4 ARGP4 ADDRLP4 0 INDIRP4 INDIRI1 CVII4 1 ARGI4 ADDRLP4 8204 ADDRGP4 qk_strchr CALLP4 ASGNP4 ADDRLP4 8204 INDIRP4 CVPU4 4 CNSTU4 0 EQU4 $499 LABELV $501 ADDRGP4 $484 ARGP4 ADDRLP4 0 INDIRP4 INDIRI1 CVII4 1 ARGI4 ADDRFP4 4 INDIRP4 ARGP4 ADDRFP4 8 INDIRP4 ARGP4 ADDRGP4 Com_Printf CALLV pop ADDRGP4 $492 JUMPV LABELV $499 LABELV $496 ADDRLP4 0 ADDRLP4 0 INDIRP4 CNSTI4 1 ADDP4 ASGNP4 LABELV $498 ADDRLP4 0 INDIRP4 INDIRI1 CVII4 1 CNSTI4 0 NEI4 $495 ADDRFP4 0 INDIRP4 ARGP4 ADDRFP4 4 INDIRP4 ARGP4 ADDRGP4 Info_RemoveKey_Big CALLV pop ADDRFP4 8 INDIRP4 CVPU4 4 CNSTU4 0 NEU4 $502 ADDRGP4 $492 JUMPV LABELV $502 ADDRLP4 4 ARGP4 CNSTI4 8192 ARGI4 ADDRGP4 $488 ARGP4 ADDRFP4 4 INDIRP4 ARGP4 ADDRFP4 8 INDIRP4 ARGP4 ADDRGP4 Com_sprintf CALLI4 pop ADDRLP4 4 ARGP4 ADDRLP4 8200 ADDRGP4 qk_strlen CALLU4 ASGNU4 ADDRFP4 0 INDIRP4 ARGP4 ADDRLP4 8204 ADDRGP4 qk_strlen CALLU4 ASGNU4 ADDRLP4 8200 INDIRU4 ADDRLP4 8204 INDIRU4 ADDU4 CNSTU4 8192 LTU4 $504 ADDRGP4 $506 ARGP4 ADDRGP4 Com_Printf CALLV pop ADDRGP4 $492 JUMPV LABELV $504 ADDRFP4 0 INDIRP4 ARGP4 ADDRLP4 4 ARGP4 ADDRGP4 qk_strcat CALLP4 pop LABELV $492 endproc Info_SetValueForKey_Big 8208 20 proc Com_CharIsOneOfCharset 8 4 ADDRFP4 0 ADDRFP4 0 INDIRI4 CVII1 4 ASGNI1 ADDRFP4 4 ADDRFP4 4 INDIRP4 ASGNP4 ADDRLP4 0 CNSTI4 0 ASGNI4 ADDRGP4 $511 JUMPV LABELV $508 ADDRLP4 0 INDIRI4 ADDRFP4 4 INDIRP4 ADDP4 INDIRI1 CVII4 1 ADDRFP4 0 INDIRI1 CVII4 1 NEI4 $512 CNSTI4 1 RETI4 ADDRGP4 $507 JUMPV LABELV $512 LABELV $509 ADDRLP4 0 ADDRLP4 0 INDIRI4 CNSTI4 1 ADDI4 ASGNI4 LABELV $511 ADDRFP4 4 INDIRP4 ARGP4 ADDRLP4 4 ADDRGP4 qk_strlen CALLU4 ASGNU4 ADDRLP4 0 INDIRI4 CVIU4 4 ADDRLP4 4 INDIRU4 LTU4 $508 CNSTI4 0 RETI4 LABELV $507 endproc Com_CharIsOneOfCharset 8 4 export Com_SkipCharset proc Com_SkipCharset 8 8 ADDRFP4 4 ADDRFP4 4 INDIRP4 ASGNP4 ADDRLP4 0 ADDRFP4 0 INDIRP4 ASGNP4 ADDRGP4 $516 JUMPV LABELV $515 ADDRLP4 0 INDIRP4 INDIRI1 CVII4 1 ARGI4 ADDRFP4 4 INDIRP4 ARGP4 ADDRLP4 4 ADDRGP4 Com_CharIsOneOfCharset CALLI4 ASGNI4 ADDRLP4 4 INDIRI4 CNSTI4 0 EQI4 $517 ADDRLP4 0 ADDRLP4 0 INDIRP4 CNSTI4 1 ADDP4 ASGNP4 LABELV $519 LABELV $516 ADDRLP4 0 INDIRP4 CVPU4 4 CNSTU4 0 NEU4 $515 LABELV $517 ADDRLP4 0 INDIRP4 RETP4 LABELV $514 endproc Com_SkipCharset 8 8 export Com_SkipTokens proc Com_SkipTokens 20 8 ADDRFP4 4 ADDRFP4 4 INDIRI4 ASGNI4 ADDRFP4 8 ADDRFP4 8 INDIRP4 ASGNP4 ADDRLP4 4 CNSTI4 0 ASGNI4 ADDRLP4 0 ADDRFP4 0 INDIRP4 ASGNP4 ADDRGP4 $522 JUMPV LABELV $521 ADDRLP4 8 ADDRLP4 0 INDIRP4 ASGNP4 ADDRLP4 0 ADDRLP4 8 INDIRP4 CNSTI4 1 ADDP4 ASGNP4 ADDRLP4 8 INDIRP4 INDIRI1 CVII4 1 ARGI4 ADDRFP4 8 INDIRP4 ARGP4 ADDRLP4 12 ADDRGP4 Com_CharIsOneOfCharset CALLI4 ASGNI4 ADDRLP4 12 INDIRI4 CNSTI4 0 EQI4 $524 ADDRLP4 4 ADDRLP4 4 INDIRI4 CNSTI4 1 ADDI4 ASGNI4 ADDRGP4 $527 JUMPV LABELV $526 ADDRLP4 0 ADDRLP4 0 INDIRP4 CNSTI4 1 ADDP4 ASGNP4 LABELV $527 ADDRLP4 0 INDIRP4 INDIRI1 CVII4 1 ARGI4 ADDRFP4 8 INDIRP4 ARGP4 ADDRLP4 16 ADDRGP4 Com_CharIsOneOfCharset CALLI4 ASGNI4 ADDRLP4 16 INDIRI4 CNSTI4 0 NEI4 $526 ADDRGP4 $525 JUMPV LABELV $524 ADDRLP4 0 INDIRP4 INDIRI1 CVII4 1 CNSTI4 0 NEI4 $529 ADDRGP4 $523 JUMPV LABELV $529 LABELV $525 LABELV $522 ADDRLP4 4 INDIRI4 ADDRFP4 4 INDIRI4 LTI4 $521 LABELV $523 ADDRLP4 4 INDIRI4 ADDRFP4 4 INDIRI4 NEI4 $531 ADDRLP4 0 INDIRP4 RETP4 ADDRGP4 $520 JUMPV LABELV $531 ADDRFP4 0 INDIRP4 RETP4 LABELV $520 endproc Com_SkipTokens 20 8 bss align 4 LABELV com_tokenline skip 4 align 4 LABELV com_lines skip 4 align 1 LABELV com_parsename skip 1024 align 1 LABELV com_token skip 1024 import Com_Printf import Com_Error import Com_RandomBytes import PerpendicularVector import AngleVectors import MatrixMultiply import MakeNormalVectors import RotateAroundDirection import RotatePointAroundVector import ProjectPointOnPlane import PlaneFromPoints import AngleDelta import AngleNormalize180 import AngleNormalize360 import AnglesSubtract import AngleSubtract import LerpAngle import AngleMod import BoundsIntersectPoint import BoundsIntersectSphere import BoundsIntersect import BoxOnPlaneSide import SetPlaneSignbits import AxisCopy import AxisClear import AnglesToAxis import vectoangles import Q_crandom import Q_random import Q_rand import Q_acos import Q_log2 import VectorRotate import Vector4Scale import VectorNormalize2 import VectorNormalize import CrossProduct import VectorInverse import VectorNormalizeFast import DistanceSquared import Distance import VectorLengthSquared import VectorLength import VectorCompare import AddPointToBounds import ClearBounds import RadiusFromBounds import NormalizeColor import ColorBytes4 import ColorBytes3 import _VectorMA import _VectorScale import _VectorCopy import _VectorAdd import _VectorSubtract import _DotProduct import ByteToDir import DirToByte import ClampShort import ClampChar import Q_rsqrt import Q_fabs import Q_isnan import axisDefault import vec3_origin import g_color_table import colorDkGrey import colorMdGrey import colorLtGrey import colorWhite import colorCyan import colorMagenta import colorYellow import colorBlue import colorGreen import colorRed import colorBlack import bytedirs import Hunk_AllocDebug import qk_acos import qk_fabs import qk_abs import qk_tan import qk_atan2 import qk_cos import qk_sin import qk_sqrt import qk_floor import qk_ceil import qk_memcpy import qk_memset import qk_memmove import qk_sscanf import qk_vsnprintf import qk_strtol import qk_atoi import qk_strtod import qk_atof import qk_toupper import qk_tolower import qk_strncpy import qk_strstr import qk_strrchr import qk_strchr import qk_strcmp import qk_strcpy import qk_strcat import qk_strlen import qk_rand import qk_srand import qk_qsort lit align 1 LABELV $506 byte 1 66 byte 1 73 byte 1 71 byte 1 32 byte 1 73 byte 1 110 byte 1 102 byte 1 111 byte 1 32 byte 1 115 byte 1 116 byte 1 114 byte 1 105 byte 1 110 byte 1 103 byte 1 32 byte 1 108 byte 1 101 byte 1 110 byte 1 103 byte 1 116 byte 1 104 byte 1 32 byte 1 101 byte 1 120 byte 1 99 byte 1 101 byte 1 101 byte 1 100 byte 1 101 byte 1 100 byte 1 10 byte 1 0 align 1 LABELV $491 byte 1 73 byte 1 110 byte 1 102 byte 1 111 byte 1 32 byte 1 115 byte 1 116 byte 1 114 byte 1 105 byte 1 110 byte 1 103 byte 1 32 byte 1 108 byte 1 101 byte 1 110 byte 1 103 byte 1 116 byte 1 104 byte 1 32 byte 1 101 byte 1 120 byte 1 99 byte 1 101 byte 1 101 byte 1 100 byte 1 101 byte 1 100 byte 1 10 byte 1 0 align 1 LABELV $488 byte 1 92 byte 1 37 byte 1 115 byte 1 92 byte 1 37 byte 1 115 byte 1 0 align 1 LABELV $484 byte 1 94 byte 1 51 byte 1 67 byte 1 97 byte 1 110 byte 1 39 byte 1 116 byte 1 32 byte 1 117 byte 1 115 byte 1 101 byte 1 32 byte 1 107 byte 1 101 byte 1 121 byte 1 115 byte 1 32 byte 1 111 byte 1 114 byte 1 32 byte 1 118 byte 1 97 byte 1 108 byte 1 117 byte 1 101 byte 1 115 byte 1 32 byte 1 119 byte 1 105 byte 1 116 byte 1 104 byte 1 32 byte 1 97 byte 1 32 byte 1 39 byte 1 37 byte 1 99 byte 1 39 byte 1 58 byte 1 32 byte 1 37 byte 1 115 byte 1 32 byte 1 61 byte 1 32 byte 1 37 byte 1 115 byte 1 10 byte 1 0 align 1 LABELV $476 byte 1 73 byte 1 110 byte 1 102 byte 1 111 byte 1 95 byte 1 83 byte 1 101 byte 1 116 byte 1 86 byte 1 97 byte 1 108 byte 1 117 byte 1 101 byte 1 70 byte 1 111 byte 1 114 byte 1 75 byte 1 101 byte 1 121 byte 1 58 byte 1 32 byte 1 111 byte 1 118 byte 1 101 byte 1 114 byte 1 115 byte 1 105 byte 1 122 byte 1 101 byte 1 32 byte 1 105 byte 1 110 byte 1 102 byte 1 111 byte 1 115 byte 1 116 byte 1 114 byte 1 105 byte 1 110 byte 1 103 byte 1 0 align 1 LABELV $473 byte 1 92 byte 1 59 byte 1 34 byte 1 0 align 1 LABELV $444 byte 1 73 byte 1 110 byte 1 102 byte 1 111 byte 1 95 byte 1 82 byte 1 101 byte 1 109 byte 1 111 byte 1 118 byte 1 101 byte 1 75 byte 1 101 byte 1 121 byte 1 95 byte 1 66 byte 1 105 byte 1 103 byte 1 58 byte 1 32 byte 1 111 byte 1 118 byte 1 101 byte 1 114 byte 1 115 byte 1 105 byte 1 122 byte 1 101 byte 1 32 byte 1 105 byte 1 110 byte 1 102 byte 1 111 byte 1 115 byte 1 116 byte 1 114 byte 1 105 byte 1 110 byte 1 103 byte 1 0 align 1 LABELV $418 byte 1 73 byte 1 110 byte 1 102 byte 1 111 byte 1 95 byte 1 82 byte 1 101 byte 1 109 byte 1 111 byte 1 118 byte 1 101 byte 1 75 byte 1 101 byte 1 121 byte 1 58 byte 1 32 byte 1 111 byte 1 118 byte 1 101 byte 1 114 byte 1 115 byte 1 105 byte 1 122 byte 1 101 byte 1 32 byte 1 105 byte 1 110 byte 1 102 byte 1 111 byte 1 115 byte 1 116 byte 1 114 byte 1 105 byte 1 110 byte 1 103 byte 1 0 align 1 LABELV $384 byte 1 73 byte 1 110 byte 1 102 byte 1 111 byte 1 95 byte 1 86 byte 1 97 byte 1 108 byte 1 117 byte 1 101 byte 1 70 byte 1 111 byte 1 114 byte 1 75 byte 1 101 byte 1 121 byte 1 58 byte 1 32 byte 1 111 byte 1 118 byte 1 101 byte 1 114 byte 1 115 byte 1 105 byte 1 122 byte 1 101 byte 1 32 byte 1 105 byte 1 110 byte 1 102 byte 1 111 byte 1 115 byte 1 116 byte 1 114 byte 1 105 byte 1 110 byte 1 103 byte 1 0 align 1 LABELV $375 byte 1 32 byte 1 46 byte 1 46 byte 1 46 byte 1 32 byte 1 0 align 1 LABELV $367 byte 1 67 byte 1 111 byte 1 109 byte 1 95 byte 1 115 byte 1 112 byte 1 114 byte 1 105 byte 1 110 byte 1 116 byte 1 102 byte 1 58 byte 1 32 byte 1 79 byte 1 117 byte 1 116 byte 1 112 byte 1 117 byte 1 116 byte 1 32 byte 1 108 byte 1 101 byte 1 110 byte 1 103 byte 1 116 byte 1 104 byte 1 32 byte 1 37 byte 1 100 byte 1 32 byte 1 116 byte 1 111 byte 1 111 byte 1 32 byte 1 115 byte 1 104 byte 1 111 byte 1 114 byte 1 116 byte 1 44 byte 1 32 byte 1 114 byte 1 101 byte 1 113 byte 1 117 byte 1 105 byte 1 114 byte 1 101 byte 1 32 byte 1 37 byte 1 100 byte 1 32 byte 1 98 byte 1 121 byte 1 116 byte 1 101 byte 1 115 byte 1 46 byte 1 10 byte 1 0 align 1 LABELV $318 byte 1 81 byte 1 95 byte 1 115 byte 1 116 byte 1 114 byte 1 99 byte 1 97 byte 1 116 byte 1 58 byte 1 32 byte 1 97 byte 1 108 byte 1 114 byte 1 101 byte 1 97 byte 1 100 byte 1 121 byte 1 32 byte 1 111 byte 1 118 byte 1 101 byte 1 114 byte 1 102 byte 1 108 byte 1 111 byte 1 119 byte 1 101 byte 1 100 byte 1 0 align 1 LABELV $268 byte 1 81 byte 1 95 byte 1 115 byte 1 116 byte 1 114 byte 1 110 byte 1 99 byte 1 112 byte 1 121 byte 1 122 byte 1 58 byte 1 32 byte 1 100 byte 1 101 byte 1 115 byte 1 116 byte 1 115 byte 1 105 byte 1 122 byte 1 101 byte 1 32 byte 1 60 byte 1 32 byte 1 49 byte 1 0 align 1 LABELV $265 byte 1 81 byte 1 95 byte 1 115 byte 1 116 byte 1 114 byte 1 110 byte 1 99 byte 1 112 byte 1 121 byte 1 122 byte 1 58 byte 1 32 byte 1 78 byte 1 85 byte 1 76 byte 1 76 byte 1 32 byte 1 115 byte 1 114 byte 1 99 byte 1 0 align 1 LABELV $262 byte 1 81 byte 1 95 byte 1 115 byte 1 116 byte 1 114 byte 1 110 byte 1 99 byte 1 112 byte 1 121 byte 1 122 byte 1 58 byte 1 32 byte 1 78 byte 1 85 byte 1 76 byte 1 76 byte 1 32 byte 1 100 byte 1 101 byte 1 115 byte 1 116 byte 1 0 align 1 LABELV $210 byte 1 41 byte 1 0 align 1 LABELV $205 byte 1 40 byte 1 0 align 1 LABELV $183 byte 1 77 byte 1 97 byte 1 116 byte 1 99 byte 1 104 byte 1 84 byte 1 111 byte 1 107 byte 1 101 byte 1 110 byte 1 58 byte 1 32 byte 1 37 byte 1 115 byte 1 32 byte 1 33 byte 1 61 byte 1 32 byte 1 37 byte 1 115 byte 1 0 align 1 LABELV $89 byte 1 87 byte 1 65 byte 1 82 byte 1 78 byte 1 73 byte 1 78 byte 1 71 byte 1 58 byte 1 32 byte 1 37 byte 1 115 byte 1 44 byte 1 32 byte 1 108 byte 1 105 byte 1 110 byte 1 101 byte 1 32 byte 1 37 byte 1 100 byte 1 58 byte 1 32 byte 1 37 byte 1 115 byte 1 10 byte 1 0 align 1 LABELV $85 byte 1 69 byte 1 82 byte 1 82 byte 1 79 byte 1 82 byte 1 58 byte 1 32 byte 1 37 byte 1 115 byte 1 44 byte 1 32 byte 1 108 byte 1 105 byte 1 110 byte 1 101 byte 1 32 byte 1 37 byte 1 100 byte 1 58 byte 1 32 byte 1 37 byte 1 115 byte 1 10 byte 1 0 align 1 LABELV $77 byte 1 37 byte 1 115 byte 1 0 align 1 LABELV $38 byte 1 0
9.909473
39
0.810969
4824beab469ec48fbc62478e01e9973663d9446c
217
asm
Assembly
playground/Test.asm
Dark-Tater/XSharp
41f8ef655f4dda6589976eb37602ff50b3c9ddea
[ "BSD-3-Clause" ]
null
null
null
playground/Test.asm
Dark-Tater/XSharp
41f8ef655f4dda6589976eb37602ff50b3c9ddea
[ "BSD-3-Clause" ]
null
null
null
playground/Test.asm
Dark-Tater/XSharp
41f8ef655f4dda6589976eb37602ff50b3c9ddea
[ "BSD-3-Clause" ]
null
null
null
; namespace DebugStub ; .v1 = 1 Mov DWORD [DebugStub_Var_v1], 0x1 ; .v1 = AL Mov BYTE [DebugStub_Var_v1], AL ; .v1 = EAX Mov DWORD [DebugStub_Var_v1], EAX ; .v1 = #const Mov [DebugStub_Var_v1], DebugStub_Const_const
19.727273
45
0.718894
4678ead906fe4da81ead34639c33f4c88579894f
515
asm
Assembly
oeis/099/A099267.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/099/A099267.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/099/A099267.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A099267: Numbers generated by the golden sieve. ; Submitted by Jon Maiga ; 2,3,5,6,8,10,11,13,14,16,18,19,21,23,24,26,27,29,31,32,34,35,37,39,40,42,44,45,47,48,50,52,53,55,57,58,60,61,63,65,66,68,69,71,73,74,76,78,79,81,82,84,86,87,89,90,92,94,95,97,99,100,102,103,105,107,108,110,112,113,115,116,118,120,121,123,124,126,128,129,131,133,134,136,137,139,141,142,144,146,147,149,150,152,154,155,157,158,160,162 mov $1,$0 trn $0,1 seq $0,19446 ; a(n) = ceiling(n/tau), where tau = (1+sqrt(5))/2. add $0,$1 add $0,1
51.5
335
0.67767
9cfad0affb56962ccd8084a7b626a30d4ffdae1d
686
asm
Assembly
oeis/018/A018070.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/018/A018070.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/018/A018070.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A018070: Expansion of 1/((1-3x)(1-8x)(1-11x)). ; Submitted by Jamie Morken(s4) ; 1,22,339,4532,56357,672210,7813303,89300464,1009144713,11315328398,126186563867,1401795991596,15529706751469,171706382611786,1895807080277631,20910172869786728,230462261504563025,2538687756174605574,27954388355303380195,307728856208561194660,3386862092699452025781,37270240414946663712962,410090703726466213337159,4511942214287645789844192,49638920143536525662906137,546088567869882005377537150,6007457816896546385703294123,66085904548484772480736804124,726975898534314618068901850493 add $0,1 mov $3,1 lpb $0 sub $0,1 add $2,$3 add $1,$2 mul $1,8 mul $2,11 mul $3,3 lpe mov $0,$1 div $0,8
40.352941
486
0.826531
6862781efb21eab75a8af591aa61ca979b4b402f
242
asm
Assembly
programs/oeis/135/A135387.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/135/A135387.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/135/A135387.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A135387: Triangle read by rows, with (2, 1, 0, 0, 0,...) in every column. ; 2,1,2,0,1,2,0,0,1,2,0,0,0,1,2,0,0,0,0,1,2,0,0,0,0,0,1,2,0,0,0,0,0,0,1,2,0,0,0,0,0,0,0,1,2 add $0,2 lpb $0 trn $0,$1 sub $0,1 add $1,1 lpe add $0,1 mov $1,$0
20.166667
91
0.533058
ec44d143c7fca0dbb1b07a47cb46988e55e2ca44
497
asm
Assembly
oeis/187/A187824.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/187/A187824.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/187/A187824.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A187824: a(n) is the largest m such that n is congruent to -1, 0 or 1 mod k for all k from 1 to m. ; Submitted by Jon Maiga ; 3,4,5,6,3,4,4,5,3,6,4,4,3,5,5,4,3,6,5,5,3,4,6,6,3,4,4,7,3,6,4,4,3,7,7,4,3,5,5,8,3,4,5,5,3,4,4,8,3,5,4,4,3,9,5,4,3,6,6,6,3,4,5,6,3,4,4,5,3,10,4,4,3,5,5,4,3,6,5,5,3,4,7,7,3,4,4,6,3,7,4,4,3,6,6,4,3,5,5,6 add $0,3 mov $2,4 lpb $0 mov $3,$0 lpb $3 mov $4,$0 mod $4,$2 add $2,1 trn $4,2 cmp $4,0 sub $3,$4 lpe mov $0,3 lpe mov $0,$2 sub $0,1
23.666667
202
0.527163
a34ac1b2e8673cdf5ce149e7fd47ad9ef7fb2285
8,535
asm
Assembly
blackalps19/foo-fighter/solution/annotated_assembly.asm
ZenLulz/CTF-writeups
02b81e14eeb71b1a6c1a9ef5780770dd81d74c5e
[ "MIT" ]
1
2019-11-21T15:14:14.000Z
2019-11-21T15:14:14.000Z
blackalps19/foo-fighter/solution/annotated_assembly.asm
ZenLulz/CTF-writeups
02b81e14eeb71b1a6c1a9ef5780770dd81d74c5e
[ "MIT" ]
null
null
null
blackalps19/foo-fighter/solution/annotated_assembly.asm
ZenLulz/CTF-writeups
02b81e14eeb71b1a6c1a9ef5780770dd81d74c5e
[ "MIT" ]
null
null
null
; Segment type: Pure code ; Segment permissions: Read/Execute _text segment para public 'CODE' use32 assume cs:_text ;org 8049030h assume es:nothing, ss:nothing, ds:_data, fs:nothing, gs:nothing ; =============== S U B R O U T I N E ======================================= ; Attributes: noreturn bp-based frame ; void __cdecl __noreturn main(int, char *s) public main main proc near ; DATA XREF: LOAD:08048018↑o s = dword ptr 0Ch push ebp mov ebp, esp cmp dword ptr [ebp+4], 2 ; Check for missing key (args != 2) jnz short missing_key mov edi, [ebp+s] test edi, edi jz short missing_key push edi ; param_ptr_key call check_key call exit ; --------------------------------------------------------------------------- missing_key: ; CODE XREF: main+7↑j main+E↑j lea edi, str_no_key ; "Mutter! Mutter! Gib mir arg!\n./prog <k"... push edi ; s call _puts call exit main endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame ; int __cdecl check_key(char *param_ptr_key) check_key proc near ; CODE XREF: main+11↑p param_ptr_key = dword ptr 8 ref_ptr_key = edi push ebp mov ebp, esp mov ref_ptr_key, [ebp+param_ptr_key] test ref_ptr_key, ref_ptr_key call shake push ref_ptr_key ; s call _strlen cmp eax, 16 ; ; Must be = 16 chars ; jnz wrong_key movzx eax, byte ptr [ref_ptr_key] movzx ebx, byte ptr [ref_ptr_key+2] sub ebx, 20h cmp ebx, eax ; ; [0] uppercase = [2] lowercase (-32) ; jnz wrong_key movzx eax, byte ptr [ref_ptr_key+1] movzx ebx, byte ptr [ref_ptr_key+6] cmp eax, ebx ; ; [1] = [6] ; jnz wrong_key sub eax, 30h test eax, eax ; ; [1] = 0 ; jnz wrong_key movzx ebx, byte ptr [ref_ptr_key+8] inc eax sub ebx, 30h cmp eax, ebx ; ; [8] = 1 ; jnz wrong_key movzx ebx, byte ptr [ref_ptr_key+12] inc eax sub ebx, 30h dec ebx cmp eax, ebx ; ; [12] = 3 ; jnz wrong_key movzx eax, byte ptr [ref_ptr_key+4] movzx ebx, byte ptr [ref_ptr_key+7] sub eax, 20h xor eax, ebx test eax, eax ; ; [4] uppercase = [7] lowercase ; jnz wrong_key movzx eax, byte ptr [ref_ptr_key+9] movzx ebx, byte ptr [ref_ptr_key+10] inc eax cmp eax, ebx ; ; [10] = [9]-1 ; jnz wrong_key movzx eax, byte ptr [ref_ptr_key+3] cmp eax, '_' ; ; [3] = '_' ; jnz wrong_key movzx eax, byte ptr [ref_ptr_key+4] movzx ebx, byte ptr [ref_ptr_key+10] inc eax dec ebx cmp eax, ebx ; ; [10] = [4]+2 ; jnz short wrong_key movzx eax, byte ptr [ref_ptr_key+14] mov ebx, 1 shl ebx, 5 inc ebx cmp eax, ebx ; ; [14] = ! ; jnz short wrong_key movzx ebx, byte ptr [ref_ptr_key+2] push 7 push ebx call shake cmp eax, 1 ; ; [2] = w ; jnz short wrong_key movzx ebx, byte ptr [ref_ptr_key+4] push 6 push ebx call shake cmp eax, 1 ; ; [4] = f ; jnz short wrong_key movzx eax, byte ptr [ref_ptr_key+5] movzx ebx, byte ptr [ref_ptr_key+11] mov ecx, eax xor ecx, ebx cmp ecx, 1Bh ; ; [5] ^ [11] = 0x1b ; jnz short wrong_key mov ecx, eax ; eax = [5] add ecx, ebx ; ebx = [11] cmp ecx, 0A3h ; ecx = [5] + [11] ; ; [5] + [11] = 0xA3 ; jnz short wrong_key sub ebx, eax ; ebx = [11] - [5] cmp ebx, 5 ; [11] - [5] = 5 ; ; [11] - [5] = 5 ; jnz short wrong_key movzx ebx, byte ptr [ref_ptr_key+13] cmp ebx, 'r' ; ; [13] = r ; jnz short wrong_key movzx eax, byte ptr [ref_ptr_key+14] movzx ebx, byte ptr [ref_ptr_key+15] cmp eax, ebx ; ; [15] = [14] ; jnz short wrong_key call good_key leave retn ; --------------------------------------------------------------------------- wrong_key: ; CODE XREF: check_key+16↑j ; check_key+28↑j ... lea ref_ptr_key, str_wrong_key ; "Nope, wrong password\n" push ref_ptr_key ; s call _puts call exit check_key endp ; sp-analysis failed ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame ; int __usercall good_key@<eax>(int key@<edi>) good_key proc near ; CODE XREF: check_key+117↑p arg_7 = byte ptr 0Fh index = ebx reg_str_enc_flag = esi reg_key = edi push ebp mov ebp, esp xor index, index xor ecx, ecx lea reg_str_enc_flag, str_encrypted_flag ; ; ebx = 0 ; ecx = 0 ; esi = ptr enc_flag ; decrypt_flag_loop: ; CODE XREF: good_key+25↓j and ecx, 0Fh movzx eax, byte ptr [reg_str_enc_flag+index] movzx edx, byte ptr [reg_key+ecx] xor eax, edx mov [reg_str_enc_flag+index], al inc index inc ecx cmp index, 0D5h jl short decrypt_flag_loop push reg_str_enc_flag ; s call _puts leave retn good_key endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame shake proc near ; CODE XREF: check_key+8↑p ; check_key+C3↑p ... arg_0 = dword ptr 8 arg_4 = dword ptr 0Ch push ebp mov ebp, esp xor eax, eax mov edx, [ebp+arg_0] mov esi, [ebp+arg_4] mov ecx, edx and ecx, 0F0h shr ecx, 4 and edx, 0Fh cmp ecx, edx jnz short f0o_foO cmp ecx, esi jnz short f0o_foO inc eax f0o_foO: ; CODE XREF: shake+1B↑j ; shake+1F↑j leave retn shake endp ; =============== S U B R O U T I N E ======================================= ; Attributes: noreturn exit proc near ; CODE XREF: main+16↑p ; main+27↑p ... mov eax, 1 mov ebx, 0 ; status int 80h ; LINUX - sys_exit exit endp _text ends
29.532872
86
0.372232
28ea370eb08c86b1fd6c7d3911f66cd81caf113f
560
asm
Assembly
oeis/157/A157652.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/157/A157652.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/157/A157652.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A157652: a(n) = 40*(200*n - 49). ; 6040,14040,22040,30040,38040,46040,54040,62040,70040,78040,86040,94040,102040,110040,118040,126040,134040,142040,150040,158040,166040,174040,182040,190040,198040,206040,214040,222040,230040,238040,246040,254040,262040,270040,278040,286040,294040,302040,310040,318040,326040,334040,342040,350040,358040,366040,374040,382040,390040,398040,406040,414040,422040,430040,438040,446040,454040,462040,470040,478040,486040,494040,502040,510040,518040,526040,534040,542040,550040,558040,566040,574040,582040 mul $0,8000 add $0,6040
93.333333
499
0.817857
bfa0817b154df488c06a94c1096096548172f5e3
474
asm
Assembly
programs/oeis/181/A181176.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/181/A181176.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/181/A181176.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A181176: The minimum absolute value obtainable by partitioning the first n consecutive integers into two sets and subtracting the two sums of the sets. ; 0,1,1,0,2,3,1,2,6,3,1,6,6,1,5,10,4,3,11,8,0,9,13,4,6,17,9,2,14,15,3,10,22,9,5,20,16,1,15,24,8,9,27,16,2,21,25,6,14,35,15,6,28,25,3,20,36,13,11,36,24,1,27,36,10,17,45,22,6,35,35,6,24,49,19,12,44,33,1,32,48,15,19 add $0,1 bin $0,2 seq $0,4738 ; Concatenation of sequences (1,2,...,n-1,n,n-1,...,2) for n >= 2. sub $0,1
59.25
212
0.662447
ae0733d732774801e24c675987fea9776c6c92b3
940
asm
Assembly
boot/print16.asm
raibu/rabu-os
7b2971d201ccd31aae4e1fa729f70843e65569d9
[ "WTFPL" ]
null
null
null
boot/print16.asm
raibu/rabu-os
7b2971d201ccd31aae4e1fa729f70843e65569d9
[ "WTFPL" ]
1
2018-06-29T17:06:05.000Z
2019-09-04T08:29:31.000Z
boot/print16.asm
raibu/rabu-os
7b2971d201ccd31aae4e1fa729f70843e65569d9
[ "WTFPL" ]
1
2018-06-29T15:52:25.000Z
2018-06-29T15:52:25.000Z
%macro putc16 1 mov al, %1 int 10h %endmacro ;##################################################### print_str16: pusha mov ah, 0x0e .start: mov al, [bx] cmp al, 0 je .finish putc16 al inc bx jmp .start .finish: popa ret ;##################################################### print_newline16: pusha mov ah, 0x0e mov al, 0x0a ; newline char int 0x10 mov al, 0x0d ; carriage return int 0x10 popa ret ;##################################################### print_hex16: pusha mov cx,5 mov ah, 0x0e putc16 '0' putc16 'x' print_hex16_loop4: rol bx,4 dec cx jz print_hex16_end mov dl,bl and dl, 0xf cmp dl, 0x09 jle print_hex16_isnum cmp dl,0x0f jle print_hex16_isalpha jmp print_hex16_end print_hex16_isnum: add dl,'0' putc16 dl jmp print_hex16_loop4 print_hex16_isalpha: add dl,'A'-0xa putc16 dl jmp print_hex16_loop4 print_hex16_end: popa ret
12.051282
54
0.555319
2eddcda5db6423f2423b032f41dea645a8d7ef08
639
asm
Assembly
programs/oeis/075/A075118.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/075/A075118.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/075/A075118.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A075118: Variant on Lucas numbers: a(n) = a(n-1) + 3*a(n-2) with a(0)=2 and a(1)=1. ; 2,1,7,10,31,61,154,337,799,1810,4207,9637,22258,51169,117943,271450,625279,1439629,3315466,7634353,17580751,40483810,93226063,214677493,494355682,1138388161,2621455207,6036619690,13900985311,32010844381,73713800314,169746333457,390887734399,900126734770,2072789937967,4773170142277,10991539956178,25311050383009,58285670251543,134218821400570,309075832155199,711732296356909,1638959792822506,3774156681893233,8691036060360751 mov $1,2 mov $4,3 lpb $0 sub $0,1 trn $2,$4 add $2,$4 mov $3,$4 sub $3,$1 add $4,$2 add $4,$1 mov $1,$3 lpe
39.9375
427
0.763693
fa8f8fb197f4d979da13018825f71594c39d3e17
3,176
asm
Assembly
vbox/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-MemSet.asm
Nurzamal/rest_api_docker
a9cc01dfc235467d490d9663755b33ef6990bdd8
[ "MIT" ]
null
null
null
vbox/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-MemSet.asm
Nurzamal/rest_api_docker
a9cc01dfc235467d490d9663755b33ef6990bdd8
[ "MIT" ]
null
null
null
vbox/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-MemSet.asm
Nurzamal/rest_api_docker
a9cc01dfc235467d490d9663755b33ef6990bdd8
[ "MIT" ]
null
null
null
; $Id: bs3-cmn-MemSet.asm 69111 2017-10-17 14:26:02Z vboxsync $ ;; @file ; BS3Kit - Bs3MemSet. ; ; ; Copyright (C) 2007-2017 Oracle Corporation ; ; This file is part of VirtualBox Open Source Edition (OSE), as ; available from http://www.virtualbox.org. This file is free software; ; you can redistribute it and/or modify it under the terms of the GNU ; General Public License (GPL) as published by the Free Software ; Foundation, in version 2 as it comes in the "COPYING" file of the ; VirtualBox OSE distribution. VirtualBox OSE is distributed in the ; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. ; ; The contents of this file may alternatively be used under the terms ; of the Common Development and Distribution License Version 1.0 ; (CDDL) only, as it comes in the "COPYING.CDDL" file of the ; VirtualBox OSE distribution, in which case the provisions of the ; CDDL are applicable instead of those of the GPL. ; ; You may elect to license modified versions of this file under the ; terms and conditions of either the GPL or the CDDL or both. ; %include "bs3kit-template-header.mac" ;; ; @cproto BS3_CMN_PROTO_NOSB(void, Bs3MemSet,(void BS3_FAR *pvDst, uint8_t bFiller, size_t cbDst)); ; BS3_PROC_BEGIN_CMN Bs3MemSet, BS3_PBC_HYBRID push xBP mov xBP, xSP push xDI %ifdef RT_ARCH_AMD64 mov rdi, rcx ; rdi = pvDst mov rcx, r8 ; rcx = cbDst movzx edx, dl ; bFiller mov rax, 0101010101010101h mul rdx mov rcx, r8 shr rcx, 3 ; calc qword count. cld rep stosq mov rcx, r8 ; cbDst and rcx, 7 ; calc trailing byte count. rep stosb %elif ARCH_BITS == 16 push es mov di, [bp + 2 + cbCurRetAddr] ; pvDst.off mov es, [bp + 2 + cbCurRetAddr + 2] ; pvDst.sel mov al, [bp + 2 + cbCurRetAddr + 4] ; bFiller mov ah, al mov cx, [bp + 2 + cbCurRetAddr + 6] ; cbDst shr cx, 1 ; calc dword count. rep stosw mov cx, [bp + 2 + cbCurRetAddr + 6] ; cbDst and cx, 1 ; calc tailing byte count. rep stosb pop es %elif ARCH_BITS == 32 mov edi, [ebp + 8] ; pvDst mov al, byte [ebp + 4 + cbCurRetAddr + 4] ; bFiller mov ah, al mov dx, ax shl eax, 16 mov ax, dx ; eax = RT_MAKE_U32_FROM_U8(bFiller, bFiller, bFiller, bFiller) mov ecx, [ebp + 4 + cbCurRetAddr + 8] ; cbDst shr cx, 2 ; calc dword count. rep stosd mov ecx, [ebp + 4 + cbCurRetAddr + 8] ; cbDst and ecx, 3 ; calc tailing byte count. rep stosb %else %error "Unknown bitness." %endif pop xDI pop xBP BS3_HYBRID_RET BS3_PROC_END_CMN Bs3MemSet
34.150538
119
0.547859
e3c05d6e628012139da4f8a04d10979f26aa333a
1,000
asm
Assembly
programs/tests/loadstore.asm
rj45/rj32
a0484913925bebf6459664f72ac3f8cbfa6002e9
[ "MIT" ]
28
2021-06-27T08:23:41.000Z
2022-03-26T20:48:37.000Z
programs/tests/loadstore.asm
rj45/rj32
a0484913925bebf6459664f72ac3f8cbfa6002e9
[ "MIT" ]
14
2021-06-05T18:13:35.000Z
2021-07-17T17:16:27.000Z
programs/tests/loadstore.asm
rj45/rj32
a0484913925bebf6459664f72ac3f8cbfa6002e9
[ "MIT" ]
4
2021-11-01T22:23:19.000Z
2022-03-18T01:38:39.000Z
#include "../cpudef.asm" move r0, 2 move r1, 5 ; memory doesn't have 5 load r2, [r0,0] if.eq r2, 5 error ; store and check it does have 5 store [r0,0], r1 load r2, [r0,0] if.ne r2, 5 error ; check max offset of 15 move r1, 7 store [r0,15], r1 load r2, [r0,15] if.ne r2, 7 error ; check base equivalent to offset move r2, 0 add r0, 15 load r2, [r0, 0] if.ne r2, 7 error ; check multiple writes and reads in a row move r1, 1 move r2, 2 move r3, 3 move r4, 4 move r5, 5 move r6, 6 move r0, 0 store [r0, 3], r3 store [r0, 1], r1 store [r0, 6], r6 store [r0, 2], r2 store [r0, 4], r4 store [r0, 5], r5 move r1, -1 move r2, -1 move r3, -1 move r4, -1 move r5, -1 move r6, -1 load r5, [r0, 5] load r1, [r0, 1] load r6, [r0, 6] load r2, [r0, 2] load r4, [r0, 4] load r3, [r0, 3] if.ne r1, 1 error if.ne r2, 2 error if.ne r3, 3 error if.ne r4, 4 error if.ne r5, 5 error if.ne r6, 6 error load r3, [r0, 3] jump skiperr1 error skiperr1: store [r0, 3], r3 jump skiperr2 error skiperr2: halt
12.345679
42
0.626
738efc681a711e7fff3d040875aa3134e21796ac
682
asm
Assembly
oeis/211/A211068.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/211/A211068.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/211/A211068.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A211068: Number of 2 X 2 matrices having all terms in {1,...,n} and positive odd determinant. ; 0,3,20,48,144,243,528,768,1400,1875,3060,3888,5880,7203,10304,12288,16848,19683,26100,30000,38720,43923,55440,62208,77064,85683,104468,115248,138600,151875,180480,196608,231200,250563,291924,314928,363888,390963,448400,480000,546840,583443,660660,702768,791384,839523,940608,995328,1110000,1171875,1301300,1370928,1516320,1594323,1756944,1843968,2025128,2121843,2322900,2430000,2652360,2770563,3015680,3145728,3415104,3557763,3852948,4009008,4331600,4501875,4853520,5038848,5421240,5622483,6037364 mov $2,$0 div $0,2 add $0,1 pow $0,2 mov $3,1 add $3,$2 pow $3,2 sub $3,$0 mul $0,$3
52.461538
499
0.78739
8204556c1c996e57545ceb672854cc57c64f3c4b
7,617
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_21829_1822.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_21829_1822.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_21829_1822.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 %r15 push %rbx push %rcx push %rdi push %rdx push %rsi lea addresses_D_ht+0x1a606, %r12 nop nop nop nop add %r15, %r15 mov (%r12), %rbx nop nop nop nop nop cmp $53463, %r10 lea addresses_WC_ht+0x15a06, %rcx dec %rdx mov $0x6162636465666768, %r15 movq %r15, (%rcx) nop nop nop add $58093, %rcx lea addresses_A_ht+0xd528, %rsi lea addresses_D_ht+0x1dea2, %rdi nop nop nop add %r15, %r15 mov $54, %rcx rep movsl nop nop nop add %rcx, %rcx lea addresses_WC_ht+0x946, %rcx nop nop nop nop nop dec %r15 movb $0x61, (%rcx) nop nop nop nop sub $62529, %rdi lea addresses_normal_ht+0x1eec6, %rsi lea addresses_normal_ht+0x19256, %rdi clflush (%rsi) nop nop and $23512, %r15 mov $81, %rcx rep movsw nop sub %r10, %r10 lea addresses_normal_ht+0x3e06, %rsi lea addresses_D_ht+0x7db4, %rdi nop nop nop nop nop xor %rbx, %rbx mov $73, %rcx rep movsw nop nop cmp $36890, %rcx lea addresses_A_ht+0x10f06, %r10 nop and $35472, %r15 movl $0x61626364, (%r10) cmp $61915, %rdx lea addresses_WC_ht+0x9668, %rdx nop nop nop cmp %r10, %r10 movups (%rdx), %xmm2 vpextrq $1, %xmm2, %r12 cmp %rdi, %rdi lea addresses_D_ht+0xd006, %r12 nop cmp $63554, %rcx movw $0x6162, (%r12) nop nop nop nop cmp %rdi, %rdi lea addresses_WT_ht+0x2cb4, %rsi lea addresses_normal_ht+0x13006, %rdi nop nop nop nop sub %r10, %r10 mov $120, %rcx rep movsb nop nop nop nop sub %r12, %r12 lea addresses_UC_ht+0x18c84, %rsi lea addresses_WT_ht+0x1a806, %rdi clflush (%rsi) clflush (%rdi) nop and %r15, %r15 mov $122, %rcx rep movsw nop nop nop xor %rdi, %rdi lea addresses_D_ht+0x15806, %r15 nop nop nop nop nop sub %rdx, %rdx mov $0x6162636465666768, %r10 movq %r10, %xmm0 movups %xmm0, (%r15) nop nop nop nop nop add %r10, %r10 lea addresses_WT_ht+0x1b6c6, %rsi lea addresses_UC_ht+0x10406, %rdi nop nop nop and %r10, %r10 mov $115, %rcx rep movsb nop nop xor %rdx, %rdx lea addresses_normal_ht+0x8e06, %rdx sub $29759, %rsi mov (%rdx), %r12w nop nop nop dec %rcx pop %rsi pop %rdx pop %rdi pop %rcx pop %rbx pop %r15 pop %r12 pop %r10 ret .global s_faulty_load s_faulty_load: push %r10 push %r14 push %rbp push %rcx push %rdi push %rsi // Faulty Load lea addresses_D+0x7e06, %rcx nop nop nop nop sub %rdi, %rdi mov (%rcx), %si lea oracles, %rcx and $0xff, %rsi shlq $12, %rsi mov (%rcx,%rsi,1), %rsi pop %rsi pop %rdi pop %rcx pop %rbp pop %r14 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'NT': True, 'AVXalign': True, 'size': 16, 'congruent': 0, 'same': False, 'type': 'addresses_D'}, 'OP': 'LOAD'} [Faulty Load] {'src': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 0, 'same': True, 'type': 'addresses_D'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 11, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 10, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'STOR'} {'src': {'congruent': 1, 'same': False, 'type': 'addresses_A_ht'}, 'dst': {'congruent': 1, 'same': True, 'type': 'addresses_D_ht'}, 'OP': 'REPM'} {'dst': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 6, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'STOR'} {'src': {'congruent': 5, 'same': True, 'type': 'addresses_normal_ht'}, 'dst': {'congruent': 2, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'REPM'} {'src': {'congruent': 11, 'same': False, 'type': 'addresses_normal_ht'}, 'dst': {'congruent': 1, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'REPM'} {'dst': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 8, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'STOR'} {'src': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 0, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 9, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'STOR'} {'src': {'congruent': 0, 'same': False, 'type': 'addresses_WT_ht'}, 'dst': {'congruent': 9, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'REPM'} {'src': {'congruent': 1, 'same': False, 'type': 'addresses_UC_ht'}, 'dst': {'congruent': 6, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'REPM'} {'dst': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 9, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'STOR'} {'src': {'congruent': 6, 'same': False, 'type': 'addresses_WT_ht'}, 'dst': {'congruent': 5, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'REPM'} {'src': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 6, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'LOAD'} {'36': 21829} 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 */
33.853333
2,999
0.65984
17baa7ef3f5b7af4685a9289e8d8842385f1e3cd
2,706
asm
Assembly
engine/debug/debug_party.asm
opiter09/ASM-Machina
75d8e457b3e82cc7a99b8e70ada643ab02863ada
[ "CC0-1.0" ]
1
2022-02-15T00:19:44.000Z
2022-02-15T00:19:44.000Z
engine/debug/debug_party.asm
opiter09/ASM-Machina
75d8e457b3e82cc7a99b8e70ada643ab02863ada
[ "CC0-1.0" ]
null
null
null
engine/debug/debug_party.asm
opiter09/ASM-Machina
75d8e457b3e82cc7a99b8e70ada643ab02863ada
[ "CC0-1.0" ]
null
null
null
; This function is a debugging feature to give the player Tsunekazu Ishihara's ; favorite Pokemon. This is indicated by the overpowered Exeggutor, which ; Ishihara (president of Creatures Inc.) said was his favorite Pokemon in an ABC ; interview on February 8, 2000. ; "Exeggutor is my favorite. That's because I was always using this character ; while I was debugging the program." ; http://www.ign.com/articles/2000/02/09/abc-news-pokamon-chat-transcript SetIshiharaTeam: ld de, IshiharaTeam .loop ld a, [de] cp -1 ret z ld [wcf91], a inc de ld a, [de] ld [wCurEnemyLVL], a inc de call AddPartyMon jr .loop IshiharaTeam: db EXEGGUTOR, 90 IF DEF(_DEBUG) db MEW, 5 ELSE db MEW, 20 ENDC db JOLTEON, 56 db DUGTRIO, 56 db ARTICUNO, 57 IF DEF(_DEBUG) db PIKACHU, 5 ENDC db -1 ; end DebugStart: IF DEF(_DEBUG) xor a ; PLAYER_PARTY_DATA ld [wMonDataLocation], a ; Fly anywhere. dec a ; $ff ld [wTownVisitedFlag], a ld [wTownVisitedFlag + 1], a ; Get all badges except Earth Badge. ld a, $ff ^ (1 << BIT_EARTHBADGE) ld [wObtainedBadges], a call SetIshiharaTeam ; Exeggutor gets four HM moves. ld hl, wPartyMon1Moves ld a, FLY ld [hli], a ld a, CUT ld [hli], a ld a, SURF ld [hli], a ld a, STRENGTH ld [hl], a ld hl, wPartyMon1PP ld a, 15 ld [hli], a ld a, 30 ld [hli], a ld a, 15 ld [hli], a ld [hl], a ; Jolteon gets Thunderbolt. ld hl, wPartyMon3Moves + 3 ld a, THUNDERBOLT ld [hl], a ld hl, wPartyMon3PP + 3 ld a, 15 ld [hl], a ; Articuno gets Fly. ld hl, wPartyMon5Moves ld a, FLY ld [hl], a ld hl, wPartyMon5PP ld a, 15 ld [hl], a ; Pikachu gets Surf. ld hl, wPartyMon6Moves + 2 ld a, SURF ld [hl], a ld hl, wPartyMon6PP + 2 ld a, 15 ld [hl], a ; Get some debug items. ld hl, wNumBagItems ld de, DebugItemsList .items_loop ld a, [de] cp -1 jr z, .items_end ld [wcf91], a inc de ld a, [de] inc de ld [wItemQuantity], a call AddItemToInventory jr .items_loop .items_end ; Complete the Pokédex. ld hl, wPokedexOwned call DebugSetPokedexEntries ld hl, wPokedexSeen call DebugSetPokedexEntries SetEvent EVENT_GOT_POKEDEX ; Rival chose Squirtle, ; Player chose Charmander. ld hl, wRivalStarter ld a, STARTER2 ld [hli], a inc hl ; hl = wPlayerStarter ld a, STARTER1 ld [hl], a ret DebugSetPokedexEntries: ld b, wPokedexOwnedEnd - wPokedexOwned - 1 ld a, %11111111 .loop ld [hli], a dec b jr nz, .loop ld [hl], %01111111 ret DebugItemsList: db BICYCLE, 1 db FULL_RESTORE, 99 db FULL_HEAL, 99 db ESCAPE_ROPE, 99 db RARE_CANDY, 99 db MASTER_BALL, 99 db TOWN_MAP, 1 db SECRET_KEY, 1 db CARD_KEY, 1 db S_S_TICKET, 1 db LIFT_KEY, 1 db -1 ; end DebugUnusedList: db -1 ; end ELSE ret ENDC
16.9125
80
0.691426
7294192c2f8358acf9cde67e955d128be402def1
43,234
asm
Assembly
foo.asm
vivekrathi53/my_xv6
231220587f0c3546e3a2c34935c7aa70ff2f9189
[ "MIT-0" ]
null
null
null
foo.asm
vivekrathi53/my_xv6
231220587f0c3546e3a2c34935c7aa70ff2f9189
[ "MIT-0" ]
null
null
null
foo.asm
vivekrathi53/my_xv6
231220587f0c3546e3a2c34935c7aa70ff2f9189
[ "MIT-0" ]
null
null
null
_foo: file format elf32-i386 Disassembly of section .text: 00000000 <main>: #include "types.h" #include "stat.h" #include "user.h" #include "fcntl.h" int main(int argc, char *argv[]) { 0: 8d 4c 24 04 lea 0x4(%esp),%ecx 4: 83 e4 f0 and $0xfffffff0,%esp 7: ff 71 fc pushl -0x4(%ecx) a: 55 push %ebp b: 89 e5 mov %esp,%ebp d: 57 push %edi e: 56 push %esi f: 53 push %ebx 10: 51 push %ecx int k, n, id; double x = 0, z; if(argc < 2 ) n = 1; 11: bf 01 00 00 00 mov $0x1,%edi { 16: 83 ec 08 sub $0x8,%esp if(argc < 2 ) 19: 83 39 01 cmpl $0x1,(%ecx) { 1c: 8b 41 04 mov 0x4(%ecx),%eax if(argc < 2 ) 1f: 7f 5c jg 7d <main+0x7d> n = 1; 21: 31 db xor %ebx,%ebx 23: eb 22 jmp 47 <main+0x47> 25: 8d 76 00 lea 0x0(%esi),%esi for ( k = 0; k < n; k++ ) { id = fork (); if ( id < 0 ) { printf(1, "%d failed in fork!\n", getpid() ); } else if ( id > 0 ) 28: 74 6f je 99 <main+0x99> { //parent printf(1, "Parent %d creating child %d\n", getpid(), id ); 2a: e8 83 03 00 00 call 3b2 <getpid> 2f: 56 push %esi 30: 50 push %eax for ( k = 0; k < n; k++ ) { 31: 83 c3 01 add $0x1,%ebx printf(1, "Parent %d creating child %d\n", getpid(), id ); 34: 68 1c 08 00 00 push $0x81c 39: 6a 01 push $0x1 3b: e8 70 04 00 00 call 4b0 <printf> 40: 83 c4 10 add $0x10,%esp for ( k = 0; k < n; k++ ) { 43: 39 df cmp %ebx,%edi 45: 7e 31 jle 78 <main+0x78> id = fork (); 47: e8 de 02 00 00 call 32a <fork> if ( id < 0 ) { 4c: 85 c0 test %eax,%eax id = fork (); 4e: 89 c6 mov %eax,%esi if ( id < 0 ) { 50: 79 d6 jns 28 <main+0x28> printf(1, "%d failed in fork!\n", getpid() ); 52: e8 5b 03 00 00 call 3b2 <getpid> 57: 83 ec 04 sub $0x4,%esp for ( k = 0; k < n; k++ ) { 5a: 83 c3 01 add $0x1,%ebx printf(1, "%d failed in fork!\n", getpid() ); 5d: 50 push %eax 5e: 68 08 08 00 00 push $0x808 63: 6a 01 push $0x1 65: e8 46 04 00 00 call 4b0 <printf> 6a: 83 c4 10 add $0x10,%esp for ( k = 0; k < n; k++ ) { 6d: 39 df cmp %ebx,%edi 6f: 7f d6 jg 47 <main+0x47> 71: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi x = x + 3.14 * 89.64; // useless calculations to consume CPU time break; } } exit(); 78: e8 b5 02 00 00 call 332 <exit> n = atoi ( argv[1] ); //from command line 7d: 83 ec 0c sub $0xc,%esp 80: ff 70 04 pushl 0x4(%eax) 83: e8 38 02 00 00 call 2c0 <atoi> if ( n < 0 || n > 20 ) 88: 83 c4 10 add $0x10,%esp 8b: 83 f8 14 cmp $0x14,%eax n = atoi ( argv[1] ); //from command line 8e: 89 c7 mov %eax,%edi if ( n < 0 || n > 20 ) 90: 76 40 jbe d2 <main+0xd2> n = 2; 92: bf 02 00 00 00 mov $0x2,%edi 97: eb 88 jmp 21 <main+0x21> printf(1, "Child %d created\n",getpid() ); 99: e8 14 03 00 00 call 3b2 <getpid> 9e: 52 push %edx 9f: 50 push %eax a0: 68 39 08 00 00 push $0x839 a5: 6a 01 push $0x1 a7: e8 04 04 00 00 call 4b0 <printf> for ( z = 0; z < 80000.0; z += 0.01 ) ac: d9 ee fldz printf(1, "Child %d created\n",getpid() ); ae: 83 c4 10 add $0x10,%esp for ( z = 0; z < 80000.0; z += 0.01 ) b1: dd 05 50 08 00 00 fldl 0x850 b7: 89 f6 mov %esi,%esi b9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi c0: dc c1 fadd %st,%st(1) c2: d9 05 58 08 00 00 flds 0x858 c8: df ea fucomip %st(2),%st ca: 77 f4 ja c0 <main+0xc0> cc: dd d8 fstp %st(0) ce: dd d8 fstp %st(0) d0: eb a6 jmp 78 <main+0x78> for ( k = 0; k < n; k++ ) { d2: 85 c0 test %eax,%eax d4: 0f 85 47 ff ff ff jne 21 <main+0x21> da: eb 9c jmp 78 <main+0x78> dc: 66 90 xchg %ax,%ax de: 66 90 xchg %ax,%ax 000000e0 <strcpy>: #include "user.h" #include "x86.h" char* strcpy(char *s, char *t) { e0: 55 push %ebp e1: 89 e5 mov %esp,%ebp e3: 53 push %ebx e4: 8b 45 08 mov 0x8(%ebp),%eax e7: 8b 4d 0c mov 0xc(%ebp),%ecx char *os; os = s; while((*s++ = *t++) != 0) ea: 89 c2 mov %eax,%edx ec: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi f0: 83 c1 01 add $0x1,%ecx f3: 0f b6 59 ff movzbl -0x1(%ecx),%ebx f7: 83 c2 01 add $0x1,%edx fa: 84 db test %bl,%bl fc: 88 5a ff mov %bl,-0x1(%edx) ff: 75 ef jne f0 <strcpy+0x10> ; return os; } 101: 5b pop %ebx 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 <strcmp>: int strcmp(const char *p, const char *q) { 110: 55 push %ebp 111: 89 e5 mov %esp,%ebp 113: 53 push %ebx 114: 8b 55 08 mov 0x8(%ebp),%edx 117: 8b 4d 0c mov 0xc(%ebp),%ecx while(*p && *p == *q) 11a: 0f b6 02 movzbl (%edx),%eax 11d: 0f b6 19 movzbl (%ecx),%ebx 120: 84 c0 test %al,%al 122: 75 1c jne 140 <strcmp+0x30> 124: eb 2a jmp 150 <strcmp+0x40> 126: 8d 76 00 lea 0x0(%esi),%esi 129: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi p++, q++; 130: 83 c2 01 add $0x1,%edx while(*p && *p == *q) 133: 0f b6 02 movzbl (%edx),%eax p++, q++; 136: 83 c1 01 add $0x1,%ecx 139: 0f b6 19 movzbl (%ecx),%ebx while(*p && *p == *q) 13c: 84 c0 test %al,%al 13e: 74 10 je 150 <strcmp+0x40> 140: 38 d8 cmp %bl,%al 142: 74 ec je 130 <strcmp+0x20> return (uchar)*p - (uchar)*q; 144: 29 d8 sub %ebx,%eax } 146: 5b pop %ebx 147: 5d pop %ebp 148: c3 ret 149: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 150: 31 c0 xor %eax,%eax return (uchar)*p - (uchar)*q; 152: 29 d8 sub %ebx,%eax } 154: 5b pop %ebx 155: 5d pop %ebp 156: c3 ret 157: 89 f6 mov %esi,%esi 159: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 00000160 <strlen>: uint strlen(char *s) { 160: 55 push %ebp 161: 89 e5 mov %esp,%ebp 163: 8b 4d 08 mov 0x8(%ebp),%ecx int n; for(n = 0; s[n]; n++) 166: 80 39 00 cmpb $0x0,(%ecx) 169: 74 15 je 180 <strlen+0x20> 16b: 31 d2 xor %edx,%edx 16d: 8d 76 00 lea 0x0(%esi),%esi 170: 83 c2 01 add $0x1,%edx 173: 80 3c 11 00 cmpb $0x0,(%ecx,%edx,1) 177: 89 d0 mov %edx,%eax 179: 75 f5 jne 170 <strlen+0x10> ; return n; } 17b: 5d pop %ebp 17c: c3 ret 17d: 8d 76 00 lea 0x0(%esi),%esi for(n = 0; s[n]; n++) 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 <memset>: void* memset(void *dst, int c, uint n) { 190: 55 push %ebp 191: 89 e5 mov %esp,%ebp 193: 57 push %edi 194: 8b 55 08 mov 0x8(%ebp),%edx } static inline void stosb(void *addr, int data, int cnt) { asm volatile("cld; rep stosb" : 197: 8b 4d 10 mov 0x10(%ebp),%ecx 19a: 8b 45 0c mov 0xc(%ebp),%eax 19d: 89 d7 mov %edx,%edi 19f: fc cld 1a0: f3 aa rep stos %al,%es:(%edi) stosb(dst, c, n); return dst; } 1a2: 89 d0 mov %edx,%eax 1a4: 5f pop %edi 1a5: 5d pop %ebp 1a6: c3 ret 1a7: 89 f6 mov %esi,%esi 1a9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 000001b0 <strchr>: char* strchr(const char *s, char c) { 1b0: 55 push %ebp 1b1: 89 e5 mov %esp,%ebp 1b3: 53 push %ebx 1b4: 8b 45 08 mov 0x8(%ebp),%eax 1b7: 8b 5d 0c mov 0xc(%ebp),%ebx for(; *s; s++) 1ba: 0f b6 10 movzbl (%eax),%edx 1bd: 84 d2 test %dl,%dl 1bf: 74 1d je 1de <strchr+0x2e> if(*s == c) 1c1: 38 d3 cmp %dl,%bl 1c3: 89 d9 mov %ebx,%ecx 1c5: 75 0d jne 1d4 <strchr+0x24> 1c7: eb 17 jmp 1e0 <strchr+0x30> 1c9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 1d0: 38 ca cmp %cl,%dl 1d2: 74 0c je 1e0 <strchr+0x30> for(; *s; s++) 1d4: 83 c0 01 add $0x1,%eax 1d7: 0f b6 10 movzbl (%eax),%edx 1da: 84 d2 test %dl,%dl 1dc: 75 f2 jne 1d0 <strchr+0x20> return (char*)s; return 0; 1de: 31 c0 xor %eax,%eax } 1e0: 5b pop %ebx 1e1: 5d pop %ebp 1e2: c3 ret 1e3: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 1e9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 000001f0 <gets>: char* gets(char *buf, int max) { 1f0: 55 push %ebp 1f1: 89 e5 mov %esp,%ebp 1f3: 57 push %edi 1f4: 56 push %esi 1f5: 53 push %ebx int i, cc; char c; for(i=0; i+1 < max; ){ 1f6: 31 f6 xor %esi,%esi 1f8: 89 f3 mov %esi,%ebx { 1fa: 83 ec 1c sub $0x1c,%esp 1fd: 8b 7d 08 mov 0x8(%ebp),%edi for(i=0; i+1 < max; ){ 200: eb 2f jmp 231 <gets+0x41> 202: 8d b6 00 00 00 00 lea 0x0(%esi),%esi cc = read(0, &c, 1); 208: 8d 45 e7 lea -0x19(%ebp),%eax 20b: 83 ec 04 sub $0x4,%esp 20e: 6a 01 push $0x1 210: 50 push %eax 211: 6a 00 push $0x0 213: e8 32 01 00 00 call 34a <read> if(cc < 1) 218: 83 c4 10 add $0x10,%esp 21b: 85 c0 test %eax,%eax 21d: 7e 1c jle 23b <gets+0x4b> break; buf[i++] = c; 21f: 0f b6 45 e7 movzbl -0x19(%ebp),%eax 223: 83 c7 01 add $0x1,%edi 226: 88 47 ff mov %al,-0x1(%edi) if(c == '\n' || c == '\r') 229: 3c 0a cmp $0xa,%al 22b: 74 23 je 250 <gets+0x60> 22d: 3c 0d cmp $0xd,%al 22f: 74 1f je 250 <gets+0x60> for(i=0; i+1 < max; ){ 231: 83 c3 01 add $0x1,%ebx 234: 3b 5d 0c cmp 0xc(%ebp),%ebx 237: 89 fe mov %edi,%esi 239: 7c cd jl 208 <gets+0x18> 23b: 89 f3 mov %esi,%ebx break; } buf[i] = '\0'; return buf; } 23d: 8b 45 08 mov 0x8(%ebp),%eax buf[i] = '\0'; 240: c6 03 00 movb $0x0,(%ebx) } 243: 8d 65 f4 lea -0xc(%ebp),%esp 246: 5b pop %ebx 247: 5e pop %esi 248: 5f pop %edi 249: 5d pop %ebp 24a: c3 ret 24b: 90 nop 24c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 250: 8b 75 08 mov 0x8(%ebp),%esi 253: 8b 45 08 mov 0x8(%ebp),%eax 256: 01 de add %ebx,%esi 258: 89 f3 mov %esi,%ebx buf[i] = '\0'; 25a: c6 03 00 movb $0x0,(%ebx) } 25d: 8d 65 f4 lea -0xc(%ebp),%esp 260: 5b pop %ebx 261: 5e pop %esi 262: 5f pop %edi 263: 5d pop %ebp 264: c3 ret 265: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 269: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 00000270 <stat>: int stat(char *n, struct stat *st) { 270: 55 push %ebp 271: 89 e5 mov %esp,%ebp 273: 56 push %esi 274: 53 push %ebx int fd; int r; fd = open(n, O_RDONLY); 275: 83 ec 08 sub $0x8,%esp 278: 6a 00 push $0x0 27a: ff 75 08 pushl 0x8(%ebp) 27d: e8 f0 00 00 00 call 372 <open> if(fd < 0) 282: 83 c4 10 add $0x10,%esp 285: 85 c0 test %eax,%eax 287: 78 27 js 2b0 <stat+0x40> return -1; r = fstat(fd, st); 289: 83 ec 08 sub $0x8,%esp 28c: ff 75 0c pushl 0xc(%ebp) 28f: 89 c3 mov %eax,%ebx 291: 50 push %eax 292: e8 f3 00 00 00 call 38a <fstat> close(fd); 297: 89 1c 24 mov %ebx,(%esp) r = fstat(fd, st); 29a: 89 c6 mov %eax,%esi close(fd); 29c: e8 b9 00 00 00 call 35a <close> return r; 2a1: 83 c4 10 add $0x10,%esp } 2a4: 8d 65 f8 lea -0x8(%ebp),%esp 2a7: 89 f0 mov %esi,%eax 2a9: 5b pop %ebx 2aa: 5e pop %esi 2ab: 5d pop %ebp 2ac: c3 ret 2ad: 8d 76 00 lea 0x0(%esi),%esi return -1; 2b0: be ff ff ff ff mov $0xffffffff,%esi 2b5: eb ed jmp 2a4 <stat+0x34> 2b7: 89 f6 mov %esi,%esi 2b9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 000002c0 <atoi>: int atoi(const char *s) { 2c0: 55 push %ebp 2c1: 89 e5 mov %esp,%ebp 2c3: 53 push %ebx 2c4: 8b 4d 08 mov 0x8(%ebp),%ecx int n; n = 0; while('0' <= *s && *s <= '9') 2c7: 0f be 11 movsbl (%ecx),%edx 2ca: 8d 42 d0 lea -0x30(%edx),%eax 2cd: 3c 09 cmp $0x9,%al n = 0; 2cf: b8 00 00 00 00 mov $0x0,%eax while('0' <= *s && *s <= '9') 2d4: 77 1f ja 2f5 <atoi+0x35> 2d6: 8d 76 00 lea 0x0(%esi),%esi 2d9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi n = n*10 + *s++ - '0'; 2e0: 8d 04 80 lea (%eax,%eax,4),%eax 2e3: 83 c1 01 add $0x1,%ecx 2e6: 8d 44 42 d0 lea -0x30(%edx,%eax,2),%eax while('0' <= *s && *s <= '9') 2ea: 0f be 11 movsbl (%ecx),%edx 2ed: 8d 5a d0 lea -0x30(%edx),%ebx 2f0: 80 fb 09 cmp $0x9,%bl 2f3: 76 eb jbe 2e0 <atoi+0x20> return n; } 2f5: 5b pop %ebx 2f6: 5d pop %ebp 2f7: c3 ret 2f8: 90 nop 2f9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 00000300 <memmove>: void* memmove(void *vdst, void *vsrc, int n) { 300: 55 push %ebp 301: 89 e5 mov %esp,%ebp 303: 56 push %esi 304: 53 push %ebx 305: 8b 5d 10 mov 0x10(%ebp),%ebx 308: 8b 45 08 mov 0x8(%ebp),%eax 30b: 8b 75 0c mov 0xc(%ebp),%esi char *dst, *src; dst = vdst; src = vsrc; while(n-- > 0) 30e: 85 db test %ebx,%ebx 310: 7e 14 jle 326 <memmove+0x26> 312: 31 d2 xor %edx,%edx 314: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi *dst++ = *src++; 318: 0f b6 0c 16 movzbl (%esi,%edx,1),%ecx 31c: 88 0c 10 mov %cl,(%eax,%edx,1) 31f: 83 c2 01 add $0x1,%edx while(n-- > 0) 322: 39 d3 cmp %edx,%ebx 324: 75 f2 jne 318 <memmove+0x18> return vdst; } 326: 5b pop %ebx 327: 5e pop %esi 328: 5d pop %ebp 329: c3 ret 0000032a <fork>: name: \ movl $SYS_ ## name, %eax; \ int $T_SYSCALL; \ ret SYSCALL(fork) 32a: b8 01 00 00 00 mov $0x1,%eax 32f: cd 40 int $0x40 331: c3 ret 00000332 <exit>: SYSCALL(exit) 332: b8 02 00 00 00 mov $0x2,%eax 337: cd 40 int $0x40 339: c3 ret 0000033a <wait>: SYSCALL(wait) 33a: b8 03 00 00 00 mov $0x3,%eax 33f: cd 40 int $0x40 341: c3 ret 00000342 <pipe>: SYSCALL(pipe) 342: b8 04 00 00 00 mov $0x4,%eax 347: cd 40 int $0x40 349: c3 ret 0000034a <read>: SYSCALL(read) 34a: b8 05 00 00 00 mov $0x5,%eax 34f: cd 40 int $0x40 351: c3 ret 00000352 <write>: SYSCALL(write) 352: b8 10 00 00 00 mov $0x10,%eax 357: cd 40 int $0x40 359: c3 ret 0000035a <close>: SYSCALL(close) 35a: b8 15 00 00 00 mov $0x15,%eax 35f: cd 40 int $0x40 361: c3 ret 00000362 <kill>: SYSCALL(kill) 362: b8 06 00 00 00 mov $0x6,%eax 367: cd 40 int $0x40 369: c3 ret 0000036a <exec>: SYSCALL(exec) 36a: b8 07 00 00 00 mov $0x7,%eax 36f: cd 40 int $0x40 371: c3 ret 00000372 <open>: SYSCALL(open) 372: b8 0f 00 00 00 mov $0xf,%eax 377: cd 40 int $0x40 379: c3 ret 0000037a <mknod>: SYSCALL(mknod) 37a: b8 11 00 00 00 mov $0x11,%eax 37f: cd 40 int $0x40 381: c3 ret 00000382 <unlink>: SYSCALL(unlink) 382: b8 12 00 00 00 mov $0x12,%eax 387: cd 40 int $0x40 389: c3 ret 0000038a <fstat>: SYSCALL(fstat) 38a: b8 08 00 00 00 mov $0x8,%eax 38f: cd 40 int $0x40 391: c3 ret 00000392 <link>: SYSCALL(link) 392: b8 13 00 00 00 mov $0x13,%eax 397: cd 40 int $0x40 399: c3 ret 0000039a <mkdir>: SYSCALL(mkdir) 39a: b8 14 00 00 00 mov $0x14,%eax 39f: cd 40 int $0x40 3a1: c3 ret 000003a2 <chdir>: SYSCALL(chdir) 3a2: b8 09 00 00 00 mov $0x9,%eax 3a7: cd 40 int $0x40 3a9: c3 ret 000003aa <dup>: SYSCALL(dup) 3aa: b8 0a 00 00 00 mov $0xa,%eax 3af: cd 40 int $0x40 3b1: c3 ret 000003b2 <getpid>: SYSCALL(getpid) 3b2: b8 0b 00 00 00 mov $0xb,%eax 3b7: cd 40 int $0x40 3b9: c3 ret 000003ba <sbrk>: SYSCALL(sbrk) 3ba: b8 0c 00 00 00 mov $0xc,%eax 3bf: cd 40 int $0x40 3c1: c3 ret 000003c2 <sleep>: SYSCALL(sleep) 3c2: b8 0d 00 00 00 mov $0xd,%eax 3c7: cd 40 int $0x40 3c9: c3 ret 000003ca <uptime>: SYSCALL(uptime) 3ca: b8 0e 00 00 00 mov $0xe,%eax 3cf: cd 40 int $0x40 3d1: c3 ret 000003d2 <cps>: SYSCALL(cps) 3d2: b8 16 00 00 00 mov $0x16,%eax 3d7: cd 40 int $0x40 3d9: c3 ret 000003da <chpr>: SYSCALL(chpr) 3da: b8 17 00 00 00 mov $0x17,%eax 3df: cd 40 int $0x40 3e1: c3 ret 000003e2 <setTickets>: SYSCALL(setTickets) 3e2: b8 18 00 00 00 mov $0x18,%eax 3e7: cd 40 int $0x40 3e9: c3 ret 000003ea <thread_create>: SYSCALL(thread_create) 3ea: b8 19 00 00 00 mov $0x19,%eax 3ef: cd 40 int $0x40 3f1: c3 ret 000003f2 <thread_exit>: SYSCALL(thread_exit) 3f2: b8 1a 00 00 00 mov $0x1a,%eax 3f7: cd 40 int $0x40 3f9: c3 ret 000003fa <thread_join>: SYSCALL(thread_join) 3fa: b8 1b 00 00 00 mov $0x1b,%eax 3ff: cd 40 int $0x40 401: c3 ret 00000402 <gettid>: SYSCALL(gettid) 402: b8 1c 00 00 00 mov $0x1c,%eax 407: cd 40 int $0x40 409: c3 ret 40a: 66 90 xchg %ax,%ax 40c: 66 90 xchg %ax,%ax 40e: 66 90 xchg %ax,%ax 00000410 <printint>: write(fd, &c, 1); } static void printint(int fd, int xx, int base, int sgn) { 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 3c sub $0x3c,%esp char buf[16]; int i, neg; uint x; neg = 0; if(sgn && xx < 0){ 419: 85 d2 test %edx,%edx { 41b: 89 45 c0 mov %eax,-0x40(%ebp) neg = 1; x = -xx; 41e: 89 d0 mov %edx,%eax if(sgn && xx < 0){ 420: 79 76 jns 498 <printint+0x88> 422: f6 45 08 01 testb $0x1,0x8(%ebp) 426: 74 70 je 498 <printint+0x88> x = -xx; 428: f7 d8 neg %eax neg = 1; 42a: c7 45 c4 01 00 00 00 movl $0x1,-0x3c(%ebp) } else { x = xx; } i = 0; 431: 31 f6 xor %esi,%esi 433: 8d 5d d7 lea -0x29(%ebp),%ebx 436: eb 0a jmp 442 <printint+0x32> 438: 90 nop 439: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi do{ buf[i++] = digits[x % base]; 440: 89 fe mov %edi,%esi 442: 31 d2 xor %edx,%edx 444: 8d 7e 01 lea 0x1(%esi),%edi 447: f7 f1 div %ecx 449: 0f b6 92 64 08 00 00 movzbl 0x864(%edx),%edx }while((x /= base) != 0); 450: 85 c0 test %eax,%eax buf[i++] = digits[x % base]; 452: 88 14 3b mov %dl,(%ebx,%edi,1) }while((x /= base) != 0); 455: 75 e9 jne 440 <printint+0x30> if(neg) 457: 8b 45 c4 mov -0x3c(%ebp),%eax 45a: 85 c0 test %eax,%eax 45c: 74 08 je 466 <printint+0x56> buf[i++] = '-'; 45e: c6 44 3d d8 2d movb $0x2d,-0x28(%ebp,%edi,1) 463: 8d 7e 02 lea 0x2(%esi),%edi 466: 8d 74 3d d7 lea -0x29(%ebp,%edi,1),%esi 46a: 8b 7d c0 mov -0x40(%ebp),%edi 46d: 8d 76 00 lea 0x0(%esi),%esi 470: 0f b6 06 movzbl (%esi),%eax write(fd, &c, 1); 473: 83 ec 04 sub $0x4,%esp 476: 83 ee 01 sub $0x1,%esi 479: 6a 01 push $0x1 47b: 53 push %ebx 47c: 57 push %edi 47d: 88 45 d7 mov %al,-0x29(%ebp) 480: e8 cd fe ff ff call 352 <write> while(--i >= 0) 485: 83 c4 10 add $0x10,%esp 488: 39 de cmp %ebx,%esi 48a: 75 e4 jne 470 <printint+0x60> putc(fd, buf[i]); } 48c: 8d 65 f4 lea -0xc(%ebp),%esp 48f: 5b pop %ebx 490: 5e pop %esi 491: 5f pop %edi 492: 5d pop %ebp 493: c3 ret 494: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi neg = 0; 498: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp) 49f: eb 90 jmp 431 <printint+0x21> 4a1: eb 0d jmp 4b0 <printf> 4a3: 90 nop 4a4: 90 nop 4a5: 90 nop 4a6: 90 nop 4a7: 90 nop 4a8: 90 nop 4a9: 90 nop 4aa: 90 nop 4ab: 90 nop 4ac: 90 nop 4ad: 90 nop 4ae: 90 nop 4af: 90 nop 000004b0 <printf>: // Print to the given fd. Only understands %d, %x, %p, %s. void printf(int fd, char *fmt, ...) { 4b0: 55 push %ebp 4b1: 89 e5 mov %esp,%ebp 4b3: 57 push %edi 4b4: 56 push %esi 4b5: 53 push %ebx 4b6: 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++){ 4b9: 8b 75 0c mov 0xc(%ebp),%esi 4bc: 0f b6 1e movzbl (%esi),%ebx 4bf: 84 db test %bl,%bl 4c1: 0f 84 b3 00 00 00 je 57a <printf+0xca> ap = (uint*)(void*)&fmt + 1; 4c7: 8d 45 10 lea 0x10(%ebp),%eax 4ca: 83 c6 01 add $0x1,%esi state = 0; 4cd: 31 ff xor %edi,%edi ap = (uint*)(void*)&fmt + 1; 4cf: 89 45 d4 mov %eax,-0x2c(%ebp) 4d2: eb 2f jmp 503 <printf+0x53> 4d4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi c = fmt[i] & 0xff; if(state == 0){ if(c == '%'){ 4d8: 83 f8 25 cmp $0x25,%eax 4db: 0f 84 a7 00 00 00 je 588 <printf+0xd8> write(fd, &c, 1); 4e1: 8d 45 e2 lea -0x1e(%ebp),%eax 4e4: 83 ec 04 sub $0x4,%esp 4e7: 88 5d e2 mov %bl,-0x1e(%ebp) 4ea: 6a 01 push $0x1 4ec: 50 push %eax 4ed: ff 75 08 pushl 0x8(%ebp) 4f0: e8 5d fe ff ff call 352 <write> 4f5: 83 c4 10 add $0x10,%esp 4f8: 83 c6 01 add $0x1,%esi for(i = 0; fmt[i]; i++){ 4fb: 0f b6 5e ff movzbl -0x1(%esi),%ebx 4ff: 84 db test %bl,%bl 501: 74 77 je 57a <printf+0xca> if(state == 0){ 503: 85 ff test %edi,%edi c = fmt[i] & 0xff; 505: 0f be cb movsbl %bl,%ecx 508: 0f b6 c3 movzbl %bl,%eax if(state == 0){ 50b: 74 cb je 4d8 <printf+0x28> state = '%'; } else { putc(fd, c); } } else if(state == '%'){ 50d: 83 ff 25 cmp $0x25,%edi 510: 75 e6 jne 4f8 <printf+0x48> if(c == 'd'){ 512: 83 f8 64 cmp $0x64,%eax 515: 0f 84 05 01 00 00 je 620 <printf+0x170> printint(fd, *ap, 10, 1); ap++; } else if(c == 'x' || c == 'p'){ 51b: 81 e1 f7 00 00 00 and $0xf7,%ecx 521: 83 f9 70 cmp $0x70,%ecx 524: 74 72 je 598 <printf+0xe8> printint(fd, *ap, 16, 0); ap++; } else if(c == 's'){ 526: 83 f8 73 cmp $0x73,%eax 529: 0f 84 99 00 00 00 je 5c8 <printf+0x118> s = "(null)"; while(*s != 0){ putc(fd, *s); s++; } } else if(c == 'c'){ 52f: 83 f8 63 cmp $0x63,%eax 532: 0f 84 08 01 00 00 je 640 <printf+0x190> putc(fd, *ap); ap++; } else if(c == '%'){ 538: 83 f8 25 cmp $0x25,%eax 53b: 0f 84 ef 00 00 00 je 630 <printf+0x180> write(fd, &c, 1); 541: 8d 45 e7 lea -0x19(%ebp),%eax 544: 83 ec 04 sub $0x4,%esp 547: c6 45 e7 25 movb $0x25,-0x19(%ebp) 54b: 6a 01 push $0x1 54d: 50 push %eax 54e: ff 75 08 pushl 0x8(%ebp) 551: e8 fc fd ff ff call 352 <write> 556: 83 c4 0c add $0xc,%esp 559: 8d 45 e6 lea -0x1a(%ebp),%eax 55c: 88 5d e6 mov %bl,-0x1a(%ebp) 55f: 6a 01 push $0x1 561: 50 push %eax 562: ff 75 08 pushl 0x8(%ebp) 565: 83 c6 01 add $0x1,%esi } else { // Unknown % sequence. Print it to draw attention. putc(fd, '%'); putc(fd, c); } state = 0; 568: 31 ff xor %edi,%edi write(fd, &c, 1); 56a: e8 e3 fd ff ff call 352 <write> for(i = 0; fmt[i]; i++){ 56f: 0f b6 5e ff movzbl -0x1(%esi),%ebx write(fd, &c, 1); 573: 83 c4 10 add $0x10,%esp for(i = 0; fmt[i]; i++){ 576: 84 db test %bl,%bl 578: 75 89 jne 503 <printf+0x53> } } } 57a: 8d 65 f4 lea -0xc(%ebp),%esp 57d: 5b pop %ebx 57e: 5e pop %esi 57f: 5f pop %edi 580: 5d pop %ebp 581: c3 ret 582: 8d b6 00 00 00 00 lea 0x0(%esi),%esi state = '%'; 588: bf 25 00 00 00 mov $0x25,%edi 58d: e9 66 ff ff ff jmp 4f8 <printf+0x48> 592: 8d b6 00 00 00 00 lea 0x0(%esi),%esi printint(fd, *ap, 16, 0); 598: 83 ec 0c sub $0xc,%esp 59b: b9 10 00 00 00 mov $0x10,%ecx 5a0: 6a 00 push $0x0 5a2: 8b 7d d4 mov -0x2c(%ebp),%edi 5a5: 8b 45 08 mov 0x8(%ebp),%eax 5a8: 8b 17 mov (%edi),%edx 5aa: e8 61 fe ff ff call 410 <printint> ap++; 5af: 89 f8 mov %edi,%eax 5b1: 83 c4 10 add $0x10,%esp state = 0; 5b4: 31 ff xor %edi,%edi ap++; 5b6: 83 c0 04 add $0x4,%eax 5b9: 89 45 d4 mov %eax,-0x2c(%ebp) 5bc: e9 37 ff ff ff jmp 4f8 <printf+0x48> 5c1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi s = (char*)*ap; 5c8: 8b 45 d4 mov -0x2c(%ebp),%eax 5cb: 8b 08 mov (%eax),%ecx ap++; 5cd: 83 c0 04 add $0x4,%eax 5d0: 89 45 d4 mov %eax,-0x2c(%ebp) if(s == 0) 5d3: 85 c9 test %ecx,%ecx 5d5: 0f 84 8e 00 00 00 je 669 <printf+0x1b9> while(*s != 0){ 5db: 0f b6 01 movzbl (%ecx),%eax state = 0; 5de: 31 ff xor %edi,%edi s = (char*)*ap; 5e0: 89 cb mov %ecx,%ebx while(*s != 0){ 5e2: 84 c0 test %al,%al 5e4: 0f 84 0e ff ff ff je 4f8 <printf+0x48> 5ea: 89 75 d0 mov %esi,-0x30(%ebp) 5ed: 89 de mov %ebx,%esi 5ef: 8b 5d 08 mov 0x8(%ebp),%ebx 5f2: 8d 7d e3 lea -0x1d(%ebp),%edi 5f5: 8d 76 00 lea 0x0(%esi),%esi write(fd, &c, 1); 5f8: 83 ec 04 sub $0x4,%esp s++; 5fb: 83 c6 01 add $0x1,%esi 5fe: 88 45 e3 mov %al,-0x1d(%ebp) write(fd, &c, 1); 601: 6a 01 push $0x1 603: 57 push %edi 604: 53 push %ebx 605: e8 48 fd ff ff call 352 <write> while(*s != 0){ 60a: 0f b6 06 movzbl (%esi),%eax 60d: 83 c4 10 add $0x10,%esp 610: 84 c0 test %al,%al 612: 75 e4 jne 5f8 <printf+0x148> 614: 8b 75 d0 mov -0x30(%ebp),%esi state = 0; 617: 31 ff xor %edi,%edi 619: e9 da fe ff ff jmp 4f8 <printf+0x48> 61e: 66 90 xchg %ax,%ax printint(fd, *ap, 10, 1); 620: 83 ec 0c sub $0xc,%esp 623: b9 0a 00 00 00 mov $0xa,%ecx 628: 6a 01 push $0x1 62a: e9 73 ff ff ff jmp 5a2 <printf+0xf2> 62f: 90 nop write(fd, &c, 1); 630: 83 ec 04 sub $0x4,%esp 633: 88 5d e5 mov %bl,-0x1b(%ebp) 636: 8d 45 e5 lea -0x1b(%ebp),%eax 639: 6a 01 push $0x1 63b: e9 21 ff ff ff jmp 561 <printf+0xb1> putc(fd, *ap); 640: 8b 7d d4 mov -0x2c(%ebp),%edi write(fd, &c, 1); 643: 83 ec 04 sub $0x4,%esp putc(fd, *ap); 646: 8b 07 mov (%edi),%eax write(fd, &c, 1); 648: 6a 01 push $0x1 ap++; 64a: 83 c7 04 add $0x4,%edi putc(fd, *ap); 64d: 88 45 e4 mov %al,-0x1c(%ebp) write(fd, &c, 1); 650: 8d 45 e4 lea -0x1c(%ebp),%eax 653: 50 push %eax 654: ff 75 08 pushl 0x8(%ebp) 657: e8 f6 fc ff ff call 352 <write> ap++; 65c: 89 7d d4 mov %edi,-0x2c(%ebp) 65f: 83 c4 10 add $0x10,%esp state = 0; 662: 31 ff xor %edi,%edi 664: e9 8f fe ff ff jmp 4f8 <printf+0x48> s = "(null)"; 669: bb 5c 08 00 00 mov $0x85c,%ebx while(*s != 0){ 66e: b8 28 00 00 00 mov $0x28,%eax 673: e9 72 ff ff ff jmp 5ea <printf+0x13a> 678: 66 90 xchg %ax,%ax 67a: 66 90 xchg %ax,%ax 67c: 66 90 xchg %ax,%ax 67e: 66 90 xchg %ax,%ax 00000680 <free>: static Header base; static Header *freep; void free(void *ap) { 680: 55 push %ebp Header *bp, *p; bp = (Header*)ap - 1; for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 681: a1 14 0b 00 00 mov 0xb14,%eax { 686: 89 e5 mov %esp,%ebp 688: 57 push %edi 689: 56 push %esi 68a: 53 push %ebx 68b: 8b 5d 08 mov 0x8(%ebp),%ebx bp = (Header*)ap - 1; 68e: 8d 4b f8 lea -0x8(%ebx),%ecx 691: 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) 698: 39 c8 cmp %ecx,%eax 69a: 8b 10 mov (%eax),%edx 69c: 73 32 jae 6d0 <free+0x50> 69e: 39 d1 cmp %edx,%ecx 6a0: 72 04 jb 6a6 <free+0x26> if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) 6a2: 39 d0 cmp %edx,%eax 6a4: 72 32 jb 6d8 <free+0x58> break; if(bp + bp->s.size == p->s.ptr){ 6a6: 8b 73 fc mov -0x4(%ebx),%esi 6a9: 8d 3c f1 lea (%ecx,%esi,8),%edi 6ac: 39 fa cmp %edi,%edx 6ae: 74 30 je 6e0 <free+0x60> bp->s.size += p->s.ptr->s.size; bp->s.ptr = p->s.ptr->s.ptr; } else bp->s.ptr = p->s.ptr; 6b0: 89 53 f8 mov %edx,-0x8(%ebx) if(p + p->s.size == bp){ 6b3: 8b 50 04 mov 0x4(%eax),%edx 6b6: 8d 34 d0 lea (%eax,%edx,8),%esi 6b9: 39 f1 cmp %esi,%ecx 6bb: 74 3a je 6f7 <free+0x77> p->s.size += bp->s.size; p->s.ptr = bp->s.ptr; } else p->s.ptr = bp; 6bd: 89 08 mov %ecx,(%eax) freep = p; 6bf: a3 14 0b 00 00 mov %eax,0xb14 } 6c4: 5b pop %ebx 6c5: 5e pop %esi 6c6: 5f pop %edi 6c7: 5d pop %ebp 6c8: c3 ret 6c9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) 6d0: 39 d0 cmp %edx,%eax 6d2: 72 04 jb 6d8 <free+0x58> 6d4: 39 d1 cmp %edx,%ecx 6d6: 72 ce jb 6a6 <free+0x26> { 6d8: 89 d0 mov %edx,%eax 6da: eb bc jmp 698 <free+0x18> 6dc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi bp->s.size += p->s.ptr->s.size; 6e0: 03 72 04 add 0x4(%edx),%esi 6e3: 89 73 fc mov %esi,-0x4(%ebx) bp->s.ptr = p->s.ptr->s.ptr; 6e6: 8b 10 mov (%eax),%edx 6e8: 8b 12 mov (%edx),%edx 6ea: 89 53 f8 mov %edx,-0x8(%ebx) if(p + p->s.size == bp){ 6ed: 8b 50 04 mov 0x4(%eax),%edx 6f0: 8d 34 d0 lea (%eax,%edx,8),%esi 6f3: 39 f1 cmp %esi,%ecx 6f5: 75 c6 jne 6bd <free+0x3d> p->s.size += bp->s.size; 6f7: 03 53 fc add -0x4(%ebx),%edx freep = p; 6fa: a3 14 0b 00 00 mov %eax,0xb14 p->s.size += bp->s.size; 6ff: 89 50 04 mov %edx,0x4(%eax) p->s.ptr = bp->s.ptr; 702: 8b 53 f8 mov -0x8(%ebx),%edx 705: 89 10 mov %edx,(%eax) } 707: 5b pop %ebx 708: 5e pop %esi 709: 5f pop %edi 70a: 5d pop %ebp 70b: c3 ret 70c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 00000710 <malloc>: return freep; } void* malloc(uint nbytes) { 710: 55 push %ebp 711: 89 e5 mov %esp,%ebp 713: 57 push %edi 714: 56 push %esi 715: 53 push %ebx 716: 83 ec 0c sub $0xc,%esp Header *p, *prevp; uint nunits; nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; 719: 8b 45 08 mov 0x8(%ebp),%eax if((prevp = freep) == 0){ 71c: 8b 15 14 0b 00 00 mov 0xb14,%edx nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; 722: 8d 78 07 lea 0x7(%eax),%edi 725: c1 ef 03 shr $0x3,%edi 728: 83 c7 01 add $0x1,%edi if((prevp = freep) == 0){ 72b: 85 d2 test %edx,%edx 72d: 0f 84 9d 00 00 00 je 7d0 <malloc+0xc0> 733: 8b 02 mov (%edx),%eax 735: 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){ 738: 39 cf cmp %ecx,%edi 73a: 76 6c jbe 7a8 <malloc+0x98> 73c: 81 ff 00 10 00 00 cmp $0x1000,%edi 742: bb 00 10 00 00 mov $0x1000,%ebx 747: 0f 43 df cmovae %edi,%ebx p = sbrk(nu * sizeof(Header)); 74a: 8d 34 dd 00 00 00 00 lea 0x0(,%ebx,8),%esi 751: eb 0e jmp 761 <malloc+0x51> 753: 90 nop 754: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ 758: 8b 02 mov (%edx),%eax if(p->s.size >= nunits){ 75a: 8b 48 04 mov 0x4(%eax),%ecx 75d: 39 f9 cmp %edi,%ecx 75f: 73 47 jae 7a8 <malloc+0x98> p->s.size = nunits; } freep = prevp; return (void*)(p + 1); } if(p == freep) 761: 39 05 14 0b 00 00 cmp %eax,0xb14 767: 89 c2 mov %eax,%edx 769: 75 ed jne 758 <malloc+0x48> p = sbrk(nu * sizeof(Header)); 76b: 83 ec 0c sub $0xc,%esp 76e: 56 push %esi 76f: e8 46 fc ff ff call 3ba <sbrk> if(p == (char*)-1) 774: 83 c4 10 add $0x10,%esp 777: 83 f8 ff cmp $0xffffffff,%eax 77a: 74 1c je 798 <malloc+0x88> hp->s.size = nu; 77c: 89 58 04 mov %ebx,0x4(%eax) free((void*)(hp + 1)); 77f: 83 ec 0c sub $0xc,%esp 782: 83 c0 08 add $0x8,%eax 785: 50 push %eax 786: e8 f5 fe ff ff call 680 <free> return freep; 78b: 8b 15 14 0b 00 00 mov 0xb14,%edx if((p = morecore(nunits)) == 0) 791: 83 c4 10 add $0x10,%esp 794: 85 d2 test %edx,%edx 796: 75 c0 jne 758 <malloc+0x48> return 0; } } 798: 8d 65 f4 lea -0xc(%ebp),%esp return 0; 79b: 31 c0 xor %eax,%eax } 79d: 5b pop %ebx 79e: 5e pop %esi 79f: 5f pop %edi 7a0: 5d pop %ebp 7a1: c3 ret 7a2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi if(p->s.size == nunits) 7a8: 39 cf cmp %ecx,%edi 7aa: 74 54 je 800 <malloc+0xf0> p->s.size -= nunits; 7ac: 29 f9 sub %edi,%ecx 7ae: 89 48 04 mov %ecx,0x4(%eax) p += p->s.size; 7b1: 8d 04 c8 lea (%eax,%ecx,8),%eax p->s.size = nunits; 7b4: 89 78 04 mov %edi,0x4(%eax) freep = prevp; 7b7: 89 15 14 0b 00 00 mov %edx,0xb14 } 7bd: 8d 65 f4 lea -0xc(%ebp),%esp return (void*)(p + 1); 7c0: 83 c0 08 add $0x8,%eax } 7c3: 5b pop %ebx 7c4: 5e pop %esi 7c5: 5f pop %edi 7c6: 5d pop %ebp 7c7: c3 ret 7c8: 90 nop 7c9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi base.s.ptr = freep = prevp = &base; 7d0: c7 05 14 0b 00 00 18 movl $0xb18,0xb14 7d7: 0b 00 00 7da: c7 05 18 0b 00 00 18 movl $0xb18,0xb18 7e1: 0b 00 00 base.s.size = 0; 7e4: b8 18 0b 00 00 mov $0xb18,%eax 7e9: c7 05 1c 0b 00 00 00 movl $0x0,0xb1c 7f0: 00 00 00 7f3: e9 44 ff ff ff jmp 73c <malloc+0x2c> 7f8: 90 nop 7f9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi prevp->s.ptr = p->s.ptr; 800: 8b 08 mov (%eax),%ecx 802: 89 0a mov %ecx,(%edx) 804: eb b1 jmp 7b7 <malloc+0xa7>
33.829421
61
0.411944
937d6b77b722ab4744b1730bfd2e8cea3a2cd10c
412
asm
Assembly
programs/oeis/093/A093545.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/093/A093545.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/093/A093545.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A093545: Sorted mapping of A093544 onto the integers. ; 0,2,1,5,7,3,10,12,4,15,17,6,20,22,8,25,27,9,30,32,11,35,37,13,40,42,14,45,47,16,50,52,18,55,57,19,60,62,21,65,67,23,70,72,24,75,77,26,80,82,28,85,87,29,90,92,31,95,97,33,100,102,34,105,107,36,110,112,38,115,117,39,120,122,41,125,127,43,130,132,44,135,137,46,140,142,48,145,147,49,150,152,51,155,157,53,160,162,54,165 mul $0,5 add $0,2 dif $0,3 div $0,3
51.5
318
0.682039
cb4293211893234bafcbdf41b0ff35c369351ea9
651
asm
Assembly
oeis/083/A083100.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/083/A083100.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/083/A083100.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A083100: a(n) = 2*a(n-1) + 7*a(n-2). ; Submitted by Christian Krause ; 1,9,25,113,401,1593,5993,23137,88225,338409,1294393,4957649,18976049,72655641,278143625,1064876737,4076758849,15607654857,59752621657,228758827313,875786006225,3352883803641,12836269650857,49142725927201,188139339410401,720277760311209,2757530896495225,10557006115168913,40416728505804401,154732499817791193,592382099176213193,2267891697076964737,8682458088387421825,33240158056313596809,127257522731339146393,487196151856873470449,1865194962833120965649,7140762988664356224441 lpb $0 sub $0,1 add $3,1 mov $2,$3 mul $2,8 add $3,$1 add $1,$2 lpe mov $0,$1 add $0,1
43.4
479
0.814132
a11543b1135969a0e7d047d2c9769a47ac6f8799
755
asm
Assembly
programs/oeis/266/A266982.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/266/A266982.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/266/A266982.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A266982: Triangle read by rows giving successive states of cellular automaton generated by "Rule 81" initiated with a single ON (black) cell. ; 1,0,0,1,1,1,0,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 mov $1,1 lpb $0 sub $0,2 mov $2,4 mul $2,$1 sub $2,7 div $2,2 sub $0,$2 add $1,1 lpe mod $1,2
50.333333
501
0.550993
a0995c909f813499e8e570e3f7d0af7ba276204a
2,484
asm
Assembly
jni/ffmpeg/libavcodec/x86/dcadsp.asm
retsu0/FFmepg-Android
d63ce164fee79281a03f6c918b8f0ce47c8fbe92
[ "MIT" ]
7
2015-05-04T00:25:33.000Z
2016-12-14T05:37:42.000Z
jni/ffmpeg/libavcodec/x86/dcadsp.asm
retsu0/FFmepg-Android
d63ce164fee79281a03f6c918b8f0ce47c8fbe92
[ "MIT" ]
null
null
null
jni/ffmpeg/libavcodec/x86/dcadsp.asm
retsu0/FFmepg-Android
d63ce164fee79281a03f6c918b8f0ce47c8fbe92
[ "MIT" ]
8
2015-01-10T10:45:02.000Z
2019-02-07T03:27:35.000Z
;****************************************************************************** ;* SSE-optimized functions for the DCA decoder ;* Copyright (C) 2012-2014 Christophe Gisquet <christophe.gisquet@gmail.com> ;* ;* This file is part of FFmpeg. ;* ;* FFmpeg is free software; you can redistribute it and/or ;* modify it under the terms of the GNU Lesser General Public ;* License as published by the Free Software Foundation; either ;* version 2.1 of the License, or (at your option) any later version. ;* ;* FFmpeg is distributed in the hope that it will be useful, ;* but WITHOUT ANY WARRANTY; without even the implied warranty of ;* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ;* Lesser General Public License for more details. ;* ;* You should have received a copy of the GNU Lesser General Public ;* License along with FFmpeg; if not, write to the Free Software ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;****************************************************************************** %include "libavutil/x86/x86util.asm" SECTION_RODATA pf_inv16: times 4 dd 0x3D800000 ; 1/16 SECTION_TEXT ; void int8x8_fmul_int32_sse2(float *dst, const int8_t *src, int scale) %macro INT8X8_FMUL_INT32 0 cglobal int8x8_fmul_int32, 3,3,5, dst, src, scale cvtsi2ss m0, scalem mulss m0, [pf_inv16] shufps m0, m0, 0 %if cpuflag(sse2) %if cpuflag(sse4) pmovsxbd m1, [srcq+0] pmovsxbd m2, [srcq+4] %else movq m1, [srcq] punpcklbw m1, m1 mova m2, m1 punpcklwd m1, m1 punpckhwd m2, m2 psrad m1, 24 psrad m2, 24 %endif cvtdq2ps m1, m1 cvtdq2ps m2, m2 %else movd mm0, [srcq+0] movd mm1, [srcq+4] punpcklbw mm0, mm0 punpcklbw mm1, mm1 movq mm2, mm0 movq mm3, mm1 punpcklwd mm0, mm0 punpcklwd mm1, mm1 punpckhwd mm2, mm2 punpckhwd mm3, mm3 psrad mm0, 24 psrad mm1, 24 psrad mm2, 24 psrad mm3, 24 cvtpi2ps m1, mm0 cvtpi2ps m2, mm1 cvtpi2ps m3, mm2 cvtpi2ps m4, mm3 shufps m0, m0, 0 emms shufps m1, m3, q1010 shufps m2, m4, q1010 %endif mulps m1, m0 mulps m2, m0 mova [dstq+ 0], m1 mova [dstq+16], m2 REP_RET %endmacro %if ARCH_X86_32 INIT_XMM sse INT8X8_FMUL_INT32 %endif INIT_XMM sse2 INT8X8_FMUL_INT32 INIT_XMM sse4 INT8X8_FMUL_INT32
27.296703
79
0.609098
ef18225840acc153bd01457b6db5d692cdb1e323
3,760
asm
Assembly
Bank_H/2_randfir.asm
ndf-zz/fv1testing
1ea474b6d93e888f091de15bcaed0d5a57905f22
[ "CC0-1.0" ]
null
null
null
Bank_H/2_randfir.asm
ndf-zz/fv1testing
1ea474b6d93e888f091de15bcaed0d5a57905f22
[ "CC0-1.0" ]
null
null
null
Bank_H/2_randfir.asm
ndf-zz/fv1testing
1ea474b6d93e888f091de15bcaed0d5a57905f22
[ "CC0-1.0" ]
1
2019-11-26T12:02:28.000Z
2019-11-26T12:02:28.000Z
; FV-1 Testing ; ; Program: Rand FIR G=1.13 ; ; POT0: Feedback ; ; Test random FIR filtering ; ldax ADCL ; load input from ADCL wrax DACR,1.0 ; save a copy to DACR ; FIR : 100 random taps rda 5787,0.216955 ; G=0.216955 rda 31048,-0.203752 ; G=0.013204 rda 9140,0.216397 ; G=0.229601 rda 18975,-0.191953 ; G=0.037648 rda 7887,0.214059 ; G=0.251706 rda 31054,-0.188947 ; G=0.062760 rda 23405,0.213543 ; G=0.276302 rda 24684,-0.158057 ; G=0.118246 rda 21476,0.202141 ; G=0.320387 rda 9241,-0.156230 ; G=0.164157 rda 32379,0.182749 ; G=0.346907 rda 26264,-0.152516 ; G=0.194390 rda 16583,0.177420 ; G=0.371811 rda 29315,-0.148638 ; G=0.223173 rda 25040,0.176300 ; G=0.399473 rda 20003,-0.148552 ; G=0.250921 rda 15637,0.174881 ; G=0.425801 rda 22755,-0.148395 ; G=0.277406 rda 23511,0.165186 ; G=0.442593 rda 27290,-0.144521 ; G=0.298072 rda 9302,0.162039 ; G=0.460110 rda 23784,-0.128347 ; G=0.331764 rda 26534,0.151314 ; G=0.483078 rda 32165,-0.120325 ; G=0.362754 rda 7203,0.133185 ; G=0.495938 rda 22851,-0.112086 ; G=0.383852 rda 31174,0.128688 ; G=0.512540 rda 7110,-0.106600 ; G=0.405940 rda 5836,0.120123 ; G=0.526063 rda 32698,-0.104220 ; G=0.421844 rda 16830,0.119026 ; G=0.540869 rda 22782,-0.100784 ; G=0.440085 rda 24132,0.118218 ; G=0.558303 rda 20406,-0.099514 ; G=0.458789 rda 4222,0.118116 ; G=0.576905 rda 21738,-0.094000 ; G=0.482905 rda 30068,0.115639 ; G=0.598543 rda 13092,-0.090146 ; G=0.508397 rda 1062,0.113720 ; G=0.622117 rda 15325,-0.088418 ; G=0.533699 rda 32420,0.112045 ; G=0.645745 rda 25497,-0.078304 ; G=0.567440 rda 4184,0.107191 ; G=0.674632 rda 6372,-0.072891 ; G=0.601741 rda 24186,0.103666 ; G=0.705407 rda 10790,-0.072551 ; G=0.632856 rda 5079,0.103496 ; G=0.736352 rda 2359,-0.070875 ; G=0.665478 rda 24398,0.101160 ; G=0.766637 rda 7623,-0.069347 ; G=0.697290 rda 18907,0.097082 ; G=0.794371 rda 8717,-0.066506 ; G=0.727865 rda 40,0.094520 ; G=0.822386 rda 11909,-0.065269 ; G=0.757117 rda 9288,0.089839 ; G=0.846956 rda 12378,-0.061087 ; G=0.785869 rda 13825,0.088159 ; G=0.874028 rda 4046,-0.059730 ; G=0.814298 rda 32375,0.087092 ; G=0.901390 rda 17329,-0.057969 ; G=0.843421 rda 20830,0.084610 ; G=0.928032 rda 8460,-0.056956 ; G=0.871075 rda 21660,0.068573 ; G=0.939648 rda 16926,-0.054292 ; G=0.885357 rda 32212,0.063643 ; G=0.948999 rda 30534,-0.052322 ; G=0.896677 rda 21197,0.063310 ; G=0.959987 rda 14175,-0.051445 ; G=0.908542 rda 15258,0.063199 ; G=0.971741 rda 13812,-0.045815 ; G=0.925926 rda 20438,0.055949 ; G=0.981875 rda 23943,-0.038949 ; G=0.942927 rda 28024,0.055770 ; G=0.998696 rda 21480,-0.037413 ; G=0.961283 rda 26609,0.046941 ; G=1.008224 rda 10525,-0.035644 ; G=0.972580 rda 2468,0.041053 ; G=1.013633 rda 25148,-0.031688 ; G=0.981945 rda 28708,0.040592 ; G=1.022537 rda 25782,-0.025704 ; G=0.996833 rda 2012,0.036022 ; G=1.032855 rda 23097,-0.025152 ; G=1.007703 rda 6584,0.034640 ; G=1.042342 rda 28388,-0.024036 ; G=1.018306 rda 11868,0.034361 ; G=1.052667 rda 999,-0.023574 ; G=1.029093 rda 25871,0.031279 ; G=1.060372 rda 15540,-0.018915 ; G=1.041457 rda 2765,0.027228 ; G=1.068685 rda 1669,-0.008488 ; G=1.060196 rda 27660,0.019797 ; G=1.079993 rda 29099,-0.008109 ; G=1.071884 rda 9490,0.017782 ; G=1.089667 rda 18795,-0.005650 ; G=1.084017 rda 27613,0.015227 ; G=1.099244 rda 6371,0.013683 ; G=1.112927 rda 2266,0.009138 ; G=1.122065 rda 15796,0.006620 ; G=1.128685 rda 18313,0.005170 ; G=1.133855 rda 12829,0.004935 ; G=1.138790 wrax DACL,1.0 ; save to output mulx POT0 ; scale by feedback control rdax ADCL,1.0 ; add input to feedback wra 0,0.0 ; save to delay line input
31.333333
39
0.665426
2d3d4fe9f4ef1f2946d1b33497e1830fe0caf482
293
asm
Assembly
programs/oeis/010/A010199.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/010/A010199.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/010/A010199.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A010199: Continued fraction for sqrt(140). ; 11,1,4,1,22,1,4,1,22,1,4,1,22,1,4,1,22,1,4,1,22,1,4,1,22,1,4,1,22,1,4,1,22,1,4,1,22,1,4,1,22,1,4,1,22,1,4,1,22,1,4,1,22,1,4,1,22,1,4,1,22,1,4,1,22,1,4,1,22,1,4,1 seq $0,10201 ; Continued fraction for sqrt(142). lpb $0 pow $0,4 mod $0,34 lpe
32.555556
163
0.607509
9201d46eeca370bb057809bd8e11af792cf3bdd4
632
asm
Assembly
programs/oeis/171/A171270.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/171/A171270.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/171/A171270.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A171270: a(n) is the only number m such that m = pi(1^(1/n)) + pi(2^(1/n)) + ... + pi(m^(1/n)). ; 3,11,33,95,273,791,2313,6815,20193,60071,179193,535535,1602513,4799351,14381673,43112255,129271233,387682631,1162785753,3487832975,10462450353,31385253911,94151567433,282446313695,847322163873,2541932937191,7625731702713,22877060890415,68630914235793,205892205836471,617675543767593,1853024483819135,5559069156490113 add $0,1 mov $4,5 lpb $0,1 sub $0,1 trn $1,$5 add $1,2 sub $3,1 add $2,$3 mov $3,$2 trn $3,$4 add $1,$3 add $1,1 add $3,5 mov $2,$3 mul $2,2 sub $4,1 mul $4,2 sub $4,2 add $5,$1 lpe
26.333333
318
0.681962
517030eb25e927b40dde40bf670aa1f650da7206
536
asm
Assembly
oeis/008/A008472.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/008/A008472.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/008/A008472.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A008472: Sum of the distinct primes dividing n. ; Submitted by Jamie Morken(w1) ; 0,2,3,2,5,5,7,2,3,7,11,5,13,9,8,2,17,5,19,7,10,13,23,5,5,15,3,9,29,10,31,2,14,19,12,5,37,21,16,7,41,12,43,13,8,25,47,5,7,7,20,15,53,5,16,9,22,31,59,10,61,33,10,2,18,16,67,19,26,14,71,5,73,39,8,21,18,18,79,7,3,43,83,12,22,45,32,13,89,10,20,25,34,49,24,5,97,9,14,7 add $0,1 mov $2,2 lpb $0 mov $3,$0 lpb $3 mov $4,$0 mod $4,$2 add $2,1 cmp $4,0 cmp $4,0 sub $3,$4 lpe lpb $0 dif $0,$2 lpe add $1,$2 lpe mov $0,$1
23.304348
264
0.570896
ff65eb38e2fb49f616a0a0e1e12bcc2bbbb8bd39
738
asm
Assembly
oeis/292/A292480.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/292/A292480.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/292/A292480.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A292480: p-INVERT of the odd positive integers, where p(S) = 1 - S^2. ; Submitted by Christian Krause ; 0,1,6,20,56,160,480,1456,4384,13136,39360,118064,354272,1062928,3188736,9565936,28697632,86093264,258280512,774841520,2324523104,6973567888,20920705152,62762119792,188286360736,564859074896,1694577214656,5083731648560,15251194970336,45753584926480,137260754745600,411782264172016,1235346792518944,3706040377689296,11118121133194560,33354363399445424,100063090197944672,300189270593718928,900567811781824896,2701703435346372976,8105110306038680992,24315330918113808464,72945992754340066752 mov $3,-1 lpb $0 sub $0,1 add $2,1 add $3,$1 add $1,$2 mul $1,2 add $2,$4 mov $4,$3 add $3,$1 lpe add $3,1 mov $0,$3 div $0,2
38.842105
490
0.795393
949143204647b60e66ea1f1623a3c885660d70b3
200
asm
Assembly
audio/sfx/silph_scope.asm
AmateurPanda92/pokemon-rby-dx
f7ba1cc50b22d93ed176571e074a52d73360da93
[ "MIT" ]
9
2020-07-12T19:44:21.000Z
2022-03-03T23:32:40.000Z
audio/sfx/silph_scope.asm
JStar-debug2020/pokemon-rby-dx
c2fdd8145d96683addbd8d9075f946a68d1527a1
[ "MIT" ]
7
2020-07-16T10:48:52.000Z
2021-01-28T18:32:02.000Z
audio/sfx/silph_scope.asm
JStar-debug2020/pokemon-rby-dx
c2fdd8145d96683addbd8d9075f946a68d1527a1
[ "MIT" ]
2
2021-03-28T18:33:43.000Z
2021-05-06T13:12:09.000Z
SFX_Silph_Scope_Ch4: duty 0 squarenote 0, 13, 2, 1792 squarenote 0, 13, 2, 1856 squarenote 0, 13, 2, 1920 squarenote 0, 13, 2, 1984 squarenote 10, 14, 1, 2016 squarenote 1, 0, 0, 0 endchannel
20
27
0.695
e6b35a9f48d294c85241613039cf9533831df7cc
410
asm
Assembly
oeis/004/A004736.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/004/A004736.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/004/A004736.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A004736: Triangle read by rows: row n lists the first n positive integers in decreasing order. ; Submitted by Jamie Morken(s4) ; 1,2,1,3,2,1,4,3,2,1,5,4,3,2,1,6,5,4,3,2,1,7,6,5,4,3,2,1,8,7,6,5,4,3,2,1,9,8,7,6,5,4,3,2,1,10,9,8,7,6,5,4,3,2,1,11,10,9,8,7,6,5,4,3,2,1,12,11,10,9,8,7,6,5,4,3,2,1,13,12,11,10,9,8,7,6,5,4,3,2,1,14,13,12,11,10,9,8,7,6 lpb $0 add $1,1 sub $0,$1 lpe sub $1,$0 add $1,1 mov $0,$1
34.166667
216
0.602439
a531e350059dd76bab85c1c383eba56b33e310d8
238
asm
Assembly
libsrc/_DEVELOPMENT/fcntl/z80/drivers/terminal/console_01/output/console_01_output_terminal_char/console_01_output_char_iterm_msg_readline_begin.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
libsrc/_DEVELOPMENT/fcntl/z80/drivers/terminal/console_01/output/console_01_output_terminal_char/console_01_output_char_iterm_msg_readline_begin.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
libsrc/_DEVELOPMENT/fcntl/z80/drivers/terminal/console_01/output/console_01_output_terminal_char/console_01_output_char_iterm_msg_readline_begin.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
SECTION code_fcntl PUBLIC console_01_output_char_iterm_msg_readline_begin console_01_output_char_iterm_msg_readline_begin: ; input terminal readline begins set 7,(ix+7) ; indicates readline in progress ret
19.833333
63
0.760504
a59fce06e3e06e109469be36e6194ff5cb9eea69
625
asm
Assembly
programs/oeis/093/A093052.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/093/A093052.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/093/A093052.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A093052: Exponent of 2 in 6^n - 2^n. ; 0,2,5,4,8,6,9,8,13,10,13,12,16,14,17,16,22,18,21,20,24,22,25,24,29,26,29,28,32,30,33,32,39,34,37,36,40,38,41,40,45,42,45,44,48,46,49,48,54,50,53,52,56,54,57,56,61,58,61,60,64,62,65,64,72,66,69,68,72 mov $5,$0 mov $7,2 lpb $7,1 clr $0,5 mov $0,$5 sub $7,1 add $0,$7 sub $0,1 add $1,$0 sub $3,$1 mul $3,$1 sub $3,6 div $3,2 lpb $0,1 sub $0,1 sub $3,$1 div $1,2 lpe add $3,5 mov $4,1 add $4,$3 mov $3,2 sub $3,$4 mov $1,$3 mov $8,$7 lpb $8,1 mov $6,$1 sub $8,1 lpe lpe lpb $5,1 mov $5,0 sub $6,$1 lpe mov $1,$6 add $1,1
15.625
200
0.5216
d9b7b39e9d6134d4fabacfef4843658770604f00
22,767
asm
Assembly
Labyrinth.asm
ealejand/cpu-labyrinth
f02fdd27210b23d4dc71e47ab02977b4f88a931e
[ "MIT" ]
null
null
null
Labyrinth.asm
ealejand/cpu-labyrinth
f02fdd27210b23d4dc71e47ab02977b4f88a931e
[ "MIT" ]
null
null
null
Labyrinth.asm
ealejand/cpu-labyrinth
f02fdd27210b23d4dc71e47ab02977b4f88a931e
[ "MIT" ]
null
null
null
;- Created by: ;- Emil Alejandria ;- Megan Durante ;- For: ;- ;- Fall 2013 ;- Labyrinth 1.00 Patch Notes ;- Functional drawDisplay implementation ;- Functional getByte implementation ;- Functional collision detection. ;- Expanded map memory location allocation ;- Labyrinth 1.00a Patch Notes ;- Code optimization ;- Comments added ;- Labyrinth 1.00b Patch Notes ;- Moved current location storage to memory from registers ;- Labyrinth 1.00c Patch Notes ;- Added a victory screen ;- Labyrinth 1.01 Patch Notes ;- Added functional keys and doors ;- Labyrinth 1.02 Patch Notes ;- Added almost functional mob. ;- Spontaneously jumps two spaces periodically ;- RNG for movement unsatisfactory ;- Labyrinth 1.02a Patch Notes ;- Added a death screen ;-------------------------------------------------------------------- ; I/O Port Constants ;-------------------------------------------------------------------- .EQU LEDS = 0x40 ; LED array .EQU SSEG = 0x81 ; 7-segment decoder .EQU PS2_KEY_CODE = 0x44 ; ps2 data register .EQU VGA_HADD = 0x90 ; high address register .EQU VGA_LADD = 0x91 ; low address register .EQU VGA_COLOR = 0x92 ; color value register ;-------------------------------------------------------------------- ;-------------------------------------------------------------------- ; Key Constants ;-------------------------------------------------------------------- .EQU W = 0x1D .EQU A = 0x1C .EQU S = 0x1B .EQU D = 0x23 .EQU SPAAACE = 0x29 ;-------------------------------------------------------------------- ;-------------------------------------------------------------------- ; Color constants ;-------------------------------------------------------------------- .EQU BLACK = 0x00 .EQU CRIMSON = 0xE0 .EQU BLUE = 0x03 .EQU GREEN = 0x1C .EQU GREY = 0x4A .EQU YELLOW = 0x48 .EQU BROWN = 0x45 ;-------------------------------------------------------------------- ;-------------------------------------------------------------------- ;- Register Usage ;-------------------------------------------------------------------- ;- r20 ; current map shift ;- r21 ; current x location ;- r22 ; current y location ;- r1 ; byte being pointed to ;-------------------------------------------------------------------- ;-------------------------------------------------------------------- ;- Memory Allocation ;-------------------------------------------------------------------- ;- 0x00 ; display shift ;- 0x01 ; display x-location ;- 0x02 ; display y-location ;- 0x30 to 0x8F ; Map ;-------------------------------------------------------------------- .DSEG .ORG 0x00 .DB 0x06 .DB 0x06 .DB 0x06 .DB 0x01, 0x01, 0x01 .DB 0x04, 0x14, 0x0C .DB 0x05, 0x0D, 0x0F .CSEG .ORG 0x125 initialize: CALL generateMap CALL drawFrame CALL drawDisplay SEI main: LD r1,0x29 CMP r1,0x01 BREQ main LD r1,0x20 ADD r1,0x01 ST r1,0x20 CMP r1,0xFF BRNE main MOV r1,0x00 ST r1,0x20 LD r1,0x21 ADD r1,0x01 ST r1,0x21 CMP r1,0xFF BRNE main MOV r1,0x00 ST r1,0x21 LD r1,0x22 ADD r1,0x01 ST r1,0x22 CMP r1,0xFF BRNE main MOV r1,0x00 ST r1,0x22 LD r1,0x23 ADD r1,0x01 ST r1,0x23 BRN moveMobs CMP r1,0xFF BRNE main MOV r1,0x00 ST r1,0x23 BRN main moveMobs: CLI MOV r6,0x06 MOV r7,0x07 MOV r8,0x08 CALL moveMob moveMob: LD r20,(r6) LD r21,(r7) LD r22,(r8) LD r2,0x02 EXOR r2,r21 LSR r2 BRCS checkUp LSR r2 BRCS checkRight LSR r2 BRCS checkLeft LSR r2 BRCS checkDown LSR r2 BRCS checkUp LSR r2 BRCS checkRight LSR r2 BRCS checkLeft LSR r2 BRCS checkDown RET checkUp: SUB r22,0x01 CALL getByte LSL r31 BRCS checkLeft BRN moveMobDone checkLeft: ADD r22,0x01 SUB r21,0x01 SUB r20,0x01 BRCC checkLeftCont MOV r20,0x07 checkLeftCont: CALL getByte LSL r31 BRCS checkRight BRN moveMobDone checkRight: ADD r21,0x02 ADD r20,0x02 SUB r20,0x08 BRCC checkRightCont ADD r20,0x08 checkRightCont: CALL getByte LSL r31 BRCS checkDown BRN moveMobDone checkDown: SUB r21,0x01 SUB r20,0x01 BRCC checkDownCont MOV r20,0x07 checkDownCont: ADD r22,0x01 CALL getByte LSL r31 BRCC moveMobDone RET moveMobDone: ST r20,(r6) ST r21,(r7) ST r22,(r8) CALL drawDisplay RET ;-------------------------------------------------------------------- ;- Subroutine: drawDisplay ;- This subroutine iterates through each line of the display area ;- and displays a byte generated by getByte. It then adds the blit ;- to show the user's location. ;- Modified registers: ;- r7, r8, r6 ;- r23, r24, r25, r26, r27, r28, r30, r31 (getByte) ;-------------------------------------------------------------------- drawDisplay: LD r20,0x00 LD r22,0x02 MOV r7,0x04 drawDisplayLine: LD r21,0x01 MOV r8,0x01 CALL getByte SUB r21,0x01 CALL drawByte ADD r22,0x01 ADD r7,0x03 CMP r7,0x19 BRNE drawDisplayLine drawLocation: MOV r6,CRIMSON MOV r7,0x0D MOV r8,0x0D CALL drawBlit drawDisplayComplete: RET ;-------------------------------------------------------------------- drawByte: ADD r21,0x01 ADD r8,0x03 CMP r8,0x1C BREQ drawByteDone CLC LSL r31 BRCC checkMobs MOV r6,GREY CALL drawBlit BRN drawByte checkMobs: LD r24,0x07 CMP r21,r24 BRNE checkKeys LD r24,0x08 CMP r22,r24 BRNE checkKeys MOV r6,GREEN CALL drawBlit MOV r6,BLACK CALL drawDot BRN drawByte checkKeys: LD r24,0x03 CMP r24,0x01 BRNE checkKey2 CMP r21,0x18 BRNE checkKey2 CMP r22,0x08 BRNE checkKey2 BRN drawKey checkKey2: LD r24,0x04 CMP r24,0x01 BRNE checkKey3 CMP r21,0x17 BRNE checkKey3 CMP r22,0x0F BRNE checkKey3 BRN drawKey checkKey3: LD r24,0x05 CMP r24,0x01 BRNE checkDoors CMP r21,0x08 BRNE checkDoors CMP r22,0x12 BRNE checkDoors BRN drawKey checkDoors: CMP r22,0x09 BRNE wipeByte LD r24,0x03 CMP r24,0x01 BRNE checkDoor2 CMP r21,0x07 BRNE checkDoor2 BRN drawDoor checkDoor2: LD r24,0x04 CMP r24,0x01 BRNE checkDoor3 CMP r21,0x06 BRNE checkDoor3 BRN drawDoor checkDoor3: LD r24,0x05 CMP r24,0x01 BRNE wipeByte CMP r21,0x05 BRNE wipeByte BRN drawDoor wipeByte: MOV r6,BLACK CALL drawBlit BRN drawByte drawByteDone: RET drawDoor: MOV r6,BROWN CALL drawBlit MOV r6,YELLOW CALL drawDot BRN drawByte drawKey: MOV r6,BLACK CALL drawBlit MOV r6,YELLOW CALL drawDot BRN drawByte ;-------------------------------------------------------------------- ;-------------------------------------------------------------------- ;- Subroutine: drawFram ;- This subroutine draws the frame to hold the display area for our labyrinth. ;- It uses drawHLine and drawVLine to draw a rectangle on the screen from ;- (0x02, 0x02) to (0x1B, 0x1B). The color of the frame is blue. ;- Modified registers: ;- r6, r7, r8, r9 ;-------------------------------------------------------------------- drawFrame: MOV r6,BLUE ; pick a color MOV r7,0x02 ; y-coordinate MOV r8,0x02 ; x-coordinate low MOV r9,0x1B ; x-coordinate high CALL drawHLine MOV r7,0x02 ; x-coordinate MOV r8,0x02 ; y-coordinate low MOV r9,0x18 ; y-coordinate high CALL drawVLine MOV r7,0x02 ; y-coordinate low MOV r8,0x1B ; x-coordinate MOV r9,0x18 ; y-coordinate high CALL drawVLine MOV r7,0x18 ; y-coordinate MOV r8,0x02 ; x-coordinate low MOV r9,0x1B ; x-coordinate high CALL drawHLine RET ;-------------------------------------------------------------------- ;-------------------------------------------------------------------- ;- Subroutine: drawHLine ;- ;- Draws a horizontal line from (r8,r7) to (r9,r7) using color in r6 ;- ;- Parameters: ;- r6 = color used for line ;- r7 = y-coordinate ;- r8 = starting x-coordinate ;- r9 = ending x-coordinate ;- ;- Tweaked registers: r8,r9 ;-------------------------------------------------------------------- drawHLine: ADD r9,0x01 ; go from r8 to r9 inclusive drawHLoop: CALL drawDot ; draw tile ADD r8,0x01 ; increment column (X) count CMP r8,r9 ; see if there are more columns BRNE drawHLoop ; branch if more columns RET ;-------------------------------------------------------------------- ;--------------------------------------------------------------------- ;- Subroutine: drawVLine ;- ;- Draws a horizontal line from (r8,r7) to (r8,r9) using color in r6 ;- ;- Parameters: ;- r6 = color used for line ;- r7 = starting y-coordinate ;- r8 = x-coordinate ;- r9 = ending y-coordinate ;- ;- Tweaked registers: r7,r9 ;-------------------------------------------------------------------- drawVLine: ADD r9,0x01 ; go from r7 to r9 inclusive drawVLoop: CALL drawDot ; draw tile ADD r7,0x01 ; increment row (y) count CMP r7,r9 ; see if there are more rows BRNE drawVLoop ; branch if more rows RET ;-------------------------------------------------------------------- ;-------------------------------------------------------------------- ;- Subroutine: Draw_blit ;- ;- The subroutine draws a 3x3 square centered at the ;- values in (r8,r7) <==> (x,y). The center of this ;- 3x3 is green; the outside edges are blue. ;- ;- Tweaked Registers: ;-------------------------------------------------------------------- drawBlit: PUSH r7 ; save current y location PUSH r8 ; save current x location CALL drawDot ; draw center SUB r7,0x01 ; adjust coordinates SUB r8,0x01 CALL drawDot ; NW pixel ADD r8,0x01 ; adjust coordinates CALL drawDot ; N pixel ADD r8,0x01 ; adjust coordinates CALL drawDot ; NE pixel ADD r7,0x01 ; adjust coordinates CALL drawDot ; E pixel SUB r8,0x02 ; adjust coordinates CALL drawDot ; W pixel ADD r7,0x01 ; adjust coordinates CALL drawDot ; SW pixel ADD r8,0x01 ; adjust coordinates CALL drawDot ; S pixel ADD r8,0x01 ; adjust coordinates CALL drawDot ; SE pixel POP r8 ; restore current y location POP r7 ; restore current x location RET ; later dude ;-------------------------------------------------------------------- ;-------------------------------------------------------------------- ;- Subrountine: drawDot ;- ;- This subroutine draws a dot on the display the given coordinates: ;- ;- (X,Y) = (r8,r7) with a color stored in r6 ;- ;- Tweaked registers: r4,r5 ;-------------------------------------------------------------------- drawDot: MOV r1,r1 MOV r4,r7 ; copy Y coordinate AND r4,0x1F ; make sure top 3 bits cleared MOV r5,r8 ; copy X coordinate AND r5,0x3F ; make sure top 2 bits cleared LSR r4 ; need to get the bot 2 bits of r4 into sA BRCS dd_add40 t1: LSR r4 BRCS dd_add80 dd_out: OUT r5,VGA_LADD ; write bot 8 address bits to register OUT r4,VGA_HADD ; write top 3 address bits to register OUT r6,VGA_COLOR ; write data to frame buffer RET dd_add40: OR r5,0x40 ; set bit if needed CLC ; freshen bit BRN t1 dd_add80: OR r5,0x80 ; set bit if needed BRN dd_out ;-------------------------------------------------------------------- drawScreen: MOV r6,0xFF MOV r7,0x0E MOV r8,0xFF MOV r10,0x08 LD r31,(r30) drawWinLoop: ADD r8,0x01 SUB r10,0x01 LSL r31 BRCC drawWinNext1 CALL drawDot drawWinNext1: CMP r10,0x00 BRNE drawWinNext2 MOV r10,0x08 ADD r30,0x01 LD r31,(r30) drawWinNext2: CMP r8,0x27 BRNE drawWinLoop ADD r7,0x01 CMP r7,0x12 BREQ drawWinDone MOV r8,0xFF BRN drawWinLoop drawWinDone: CLI RET ;--------------------------------------------------------------------- ;- Subroutine: draw_background ;- ;- Fills the 30x40 grid with one color using successive calls to ;- draw_horizontal_line subroutine. ;- ;- Tweaked registers: r13,r7,r8,r9 ;--------------------------------------------------------------------- clearScreen: PUSH r7 ; save registers PUSH r8 MOV r6,BLACK ; use default color MOV r13,0x00 ; r13 keeps track of rows start: MOV r7,r13 ; load current row count MOV r8,0x00 ; restart x coordinates MOV r9,0x27 CALL drawHLine ; draw a complete line ADD r13,0x01 ; increment row count CMP r13,0x1E ; see if more rows to draw BRNE start ; branch to draw more rows POP r8 ; restore registers POP r7 RET ;--------------------------------------------------------------------- ;-------------------------------------------------------------------- ;- Subroutine: getByte ;- This subroutine takes the current location (r21, r22) and generates ;- a byte to be displayed for that row. It pulls the byte at its ;- current location (top left corner) and, if needed, shifts it. When ;- shifting, it rotates the byte left, clearing the rightmost bit as it ;- goes, until the shift counter is emptied. It then pulls the next byte ;- to the right and shifts that one to the left, but clears the opposite ;- bits. It then combines these half completed bytes and spits the whole ;- thing out. ;- Used Registers ;- r20, r21, r22, r26, r29, r30, r31 ;- Modified registers: ;- r26, r29, r30, r31 ;-------------------------------------------------------------------- getByte: PUSH r20 PUSH r21 PUSH r22 MOV r26,0xFF ; counter for columns (underflow for DO-WHILE) MOV r30,0x30 findColumnLoop: ADD r26,0x01 SUB r21,0x08 BRCC findColumnLoop ADD r30,r26 ; move to the intended byte's column MOV r26,0xFC ; counter for rows (underflow for DO-WHILE) findRowLoop: ADD r26,0x04 SUB r22,0x01 BRCC findRowLoop ADD r30,r26 ; move to the intended byte's row LD r31,(r30) ; pull that byte's data shiftInit: CMP r20,0x00 ; check if a shift is necessary BREQ shiftByteDone shiftFirstByte: MOV r26,0xFF ; used to AND the shifted bytes CALL shiftByte ; shift the byte AND r31,r26 ; clear unnecessary bits MOV r29,r31 ; store our half-complete bit shiftSecondByte: LD r20,0x00 ; reset counter MOV r26,0xFF ; ^ ADD r30,0x01 ; grab the next byte LD r31,(r30) ; ^ CALL shiftByte ; shift dat shit EXOR r26,0xFF ; invert AND r31,r26 ; clear unnecessary bits OR r31,r29 ; add our earlier completed half shiftByteDone: POP r22 POP r21 POP r20 RET shiftByte: LSL r26 ROL r31 SUB r20,0x01 CMP r20,0x00 BRNE shiftByte RET ;-------------------------------------------------------------------- ;- Subroutine: ISR (Interrupt Service Routine) ;- This subroutine handles movement checking whenever a keyboard press is detected. ;- It disables interrupts, checks each key sequentially by verifying the key code, ;- checks the validity of the move, then either cancels the move or adjusts the ;- current location appropriately. ;- Modified registers ;- r1, r20, r21, r22, r31 ;-------------------------------------------------------------------- ISR: CLI IN r1,PS2_KEY_CODE LD r20,0x00 LD r21,0x01 LD r22,0x02 checkW: CMP r1,W ; Compare the key code to a 'w' press, move on BRNE checkA ; if they aren't equal. ADD r22,0x02 ; Adjust the pointer to the row above the CALL getByte ; character, get that byte, and move the SUB r22,0x02 ; pointer back. AND r31,0x10 ; Empty all bits except the bit above the CMP r31,0x10 ; character then check if there's anything BREQ done ; there. If so, end the ISR. If not, adjust SUB r22,0x01 ; the current location then end the ISR. BRN done checkA: CMP r1,A BRNE checkS ADD r22,0x03 CALL getByte SUB r22,0x03 AND r31,0x20 CMP r31,0x20 BREQ done BRN checkADoors checkACont: SUB r21,0x01 CMP r20,0x00 BREQ checkAException SUB r20,0x01 BRN done checkS: CMP r1,S BRNE checkD ADD r22,0x04 CALL getByte SUB r22,0x04 AND r31,0x10 CMP r31,0x10 BREQ done ADD r22,0x01 BRN done checkD: CMP r1,D BRNE done ADD r22,0x03 CALL getByte SUB r22,0x03 AND r31,0x08 CMP r31,0x08 BREQ done ADD r21,0x01 CMP r20,0x07 BREQ checkDException ADD r20,0x01 BRN done done: ST r20,0x00 ST r21,0x01 ST r22,0x02 ADD r21,0x03 ADD r22,0x03 BRN checkKeyGrab checkADoors: CMP r22,0x06 BRNE checkACont CMP r21,0x05 BRNE checkADoors2 LD r24,0x03 CMP r24,0x01 BREQ done BRN checkACont checkADoors2: CMP r21,0x04 BRNE checkADoors3 LD r24,0x04 CMP r24,0x01 BREQ done BRN checkACont checkADoors3: CMP r21,0x03 BRNE checkACont LD r24,0x05 CMP r24,0x01 BREQ done BRN checkACont checkAException: MOV r20,0x07 BRN done checkDException: MOV r20,0x00 BRN done checkKeyGrab: CMP r21,0x18 BRNE checkKeyGrab2 CMP r22,0x08 BRNE checkKeyGrab2 MOV r24,0x00 ST r24,0x03 BRN notVictory checkKeyGrab2: CMP r21,0x17 BRNE checkKeyGrab3 CMP r22,0x0F BRNE checkKeyGrab3 MOV r24,0x00 ST r24,0x04 BRN notVictory checkKeyGrab3: CMP r21,0x08 BRNE checkDeath CMP r22,0x12 BRNE checkDeath MOV r24,0x00 ST r24,0x05 BRN notVictory checkDeath: LD r24,0x07 CMP r24,r21 BRNE checkVictory LD r24,0x08 CMP r24,r22 BRNE checkVictory CALL clearScreen MOV r30,0xA4 CALL drawScreen MOV r29,0x01 ST r29,0x29 RETID checkVictory: SUB r21,0x03 SUB r22,0x03 CMP r21,0x00 BRNE notVictory CMP r22,0x06 BRNE notVictory CALL clearScreen MOV r30,0x90 CALL drawScreen MOV r29,0x01 ST r29,0x29 RETID notVictory: CALL drawDisplay RETIE ;-------------------------------------------------------------------- ;-------------------------------------------------------------------- ;- Subroutine: generateMap ;- This subroutine loads the predesigned level into the scratchRAM. The map occupies ;- memory locations 0x30 through 0x8F, a total of 96 locations. If a bit exists in a ;- location then the program will put a wall there, else it will remain open. ;- Modified registers: ;- None ;-------------------------------------------------------------------- generateMap: .DSEG .ORG 0x30 .DB 0xFF, 0xFF, 0xFF, 0xFF ; 0x30 - 0x33 .DB 0xFF, 0xFF, 0xFF, 0xFF ; 0x34 - 0x37 .DB 0xFF, 0xFF, 0xFF, 0xFF ; 0x38 - 0x3B .DB 0xEE, 0x20, 0x78, 0x0F ; 0x3C - 0x3F .DB 0xE0, 0x8B, 0x02, 0xEF ; 0x40 - 0x43 .DB 0xEE, 0xBB, 0xEE, 0x0F ; 0x44 - 0x47 .DB 0xE0, 0x02, 0x22, 0xAF ; 0x48 - 0x4B .DB 0xFD, 0xFE, 0xA8, 0x0F ; 0x4C - 0x4F .DB 0xE7, 0x10, 0xAD, 0x5F ; 0x50 - 0x53 .DB 0xE0, 0x05, 0xA8, 0x0F ; 0x54 - 0x57 .DB 0xE7, 0x10, 0x8A, 0xAF ; 0x58 - 0x5B .DB 0xFD, 0xBA, 0xEA, 0xAF ; 0x5C - 0x5F .DB 0xE0, 0x02, 0x22, 0xAF ; 0x60 - 0x63 .DB 0xEB, 0xFB, 0xAA, 0x8F ; 0x64 - 0x67 .DB 0xE8, 0x8A, 0x20, 0xEF ; 0x68 - 0x6B .DB 0xEE, 0xA0, 0x86, 0x0F ; 0x6C - 0x6F .DB 0xE0, 0x8A, 0xD0, 0xEF ; 0x70 - 0x73 .DB 0xFE, 0xBA, 0x15, 0xEF ; 0x74 - 0x77 .DB 0xE0, 0x13, 0xD4, 0x0F ; 0x78 - 0x7B .DB 0xEA, 0xD6, 0x15, 0xEF ; 0x7C - 0x7F .DB 0xE2, 0x00, 0xF0, 0x0F ; 0x80 - 0x83 .DB 0xFF, 0xFF, 0xFF, 0xFF ; 0x84 - 0x87 .DB 0xFF, 0xFF, 0xFF, 0xFF ; 0x88 - 0x8B .DB 0xFF, 0xFF, 0xFF, 0xFF ; 0x8C - 0x8F .DB 0x05, 0x75, 0x2A, 0xE9, 0x40 ; 0x90 - 0x94 .DB 0x07, 0x55, 0x2A, 0x4D, 0x40 ; 0x95 - 0x99 .DB 0x02, 0x55, 0x2A, 0x4B, 0x00 ; 0x9A - 0x9E .DB 0x02, 0x77, 0x14, 0xE9, 0x40 ; 0x9F - 0xA3 .DB 0x02, 0xBA, 0x99, 0xDD, 0x80 ; 0xA4 .DB 0x03, 0xAA, 0x94, 0x99, 0x40 .DB 0x01, 0x2A, 0x94, 0x91, 0x40 .DB 0x01, 0x3B, 0x99, 0xDD, 0x80 ; .DB 0xFF, 0xFF, 0xFF, 0xFF ; 0x50 - 0x53 ; .DB 0x88, 0x0F, 0xFA, 0x01 ; 0x54 - 0x57 ; .DB 0x83, 0xA0, 0x02, 0x3D ; 0x58 - 0x5B ; .DB 0x88, 0xAE, 0xEA, 0xA9 ; 0x5C - 0x5F ; .DB 0xD8, 0x20, 0x28, 0x23 ; 0x60 - 0x63 ; .DB 0xD0, 0xAF, 0xAB, 0x7B ; 0x64 - 0x67 ; .DB 0xD7, 0xA0, 0x08, 0x09 ; 0x68 - 0x6B ; .DB 0x84, 0x2F, 0xEF, 0xED ; 0x6C - 0x6F ; .DB 0xBD, 0xA8, 0x02, 0x21 ; 0x70 - 0x73 ; .DB 0xA1, 0xAA, 0xA8, 0xBF ; 0x74 - 0x77 ; .DB 0xB8, 0x0A, 0x02, 0x11 ; 0x78 - 0x7B ; .DB 0x83, 0x63, 0xDF, 0x55 ; 0x7C - 0x7F ; .DB 0xEE, 0x08, 0x40, 0x45 ; 0x80 - 0x83 ; .DB 0x8A, 0x8F, 0x55, 0xD5 ; 0x84 - 0x87 ; .DB 0xB8, 0x80, 0x40, 0x14 ; 0x88 - 0x8B ; .DB 0xFF, 0xFF, 0xFF, 0xFF ; 0x8C - 0x8F .CSEG .ORG 0x3FD RET ;-------------------------------------------------------------------- .CSEG .ORG 0x3FF BRN ISR
25.609674
85
0.508543
f4fad4ddc0cf3417f2a14e895195ce9564f02ccf
344
asm
Assembly
work/_ff3-DSfy-sticky-provoke.asm
ypyp-pprn-mnmn/ff3_hack
f6b8590de1bd47ff617e56e2813c25305846c002
[ "MIT" ]
4
2018-03-29T15:33:26.000Z
2022-03-09T13:35:31.000Z
work/_ff3-DSfy-sticky-provoke.asm
take-the-bath/ff3_hack
f6b8590de1bd47ff617e56e2813c25305846c002
[ "MIT" ]
45
2017-11-17T23:46:35.000Z
2021-09-27T11:35:47.000Z
work/_ff3-DSfy-sticky-provoke.asm
take-the-bath/ff3_hack
f6b8590de1bd47ff617e56e2813c25305846c002
[ "MIT" ]
null
null
null
;; _ff3-DSfy-sticky-provoke.asm ;; creates a patch with single-target but effect remains longer 'sticky' version of 'provoke' ;; ; version: ; 0.3(2017-12-17) ; ;====================================================================================================== PROVOKE_TARGET_SINGLE PROVOKE_EFFECT_REMAIN = 3 .include "_ff3-DSfy"
31.272727
104
0.5
73db06df19004c0fb62e28c934c09477829f8c80
61
asm
Assembly
gfx/pokemon/unown/anim_idle.asm
Dev727/ancientplatinum
8b212a1728cc32a95743e1538b9eaa0827d013a7
[ "blessing" ]
28
2019-11-08T07:19:00.000Z
2021-12-20T10:17:54.000Z
gfx/pokemon/unown/anim_idle.asm
Dev727/ancientplatinum
8b212a1728cc32a95743e1538b9eaa0827d013a7
[ "blessing" ]
13
2020-01-11T17:00:40.000Z
2021-09-14T01:27:38.000Z
gfx/pokemon/unown/anim_idle.asm
Dev727/ancientplatinum
8b212a1728cc32a95743e1538b9eaa0827d013a7
[ "blessing" ]
22
2020-05-28T17:31:38.000Z
2022-03-07T20:49:35.000Z
setrepeat 2 frame 0, 05 frame 11, 05 dorepeat 1 endanim
10.166667
13
0.704918
6407b899f6ae3d0b5d0776d31f3778a859a9aeef
3,665
asm
Assembly
Projects/PrefixAST/tema1.asm
CristianCotovanu/IOCLA
94bc8b092beae8ddba76d95617e7eb5b8cef52f5
[ "MIT" ]
null
null
null
Projects/PrefixAST/tema1.asm
CristianCotovanu/IOCLA
94bc8b092beae8ddba76d95617e7eb5b8cef52f5
[ "MIT" ]
null
null
null
Projects/PrefixAST/tema1.asm
CristianCotovanu/IOCLA
94bc8b092beae8ddba76d95617e7eb5b8cef52f5
[ "MIT" ]
null
null
null
%include "io.inc" extern getAST extern freeAST section .bss ; La aceasta adresa, scheletul stocheaza radacina arborelui root: resd 1 section .text global main atoi: push ebp mov ebp, esp mov ebx, [ebp + 8] mov edx, ebx xor eax, eax xor ebx, ebx xor ecx, ecx cmp byte [edx], '-' ; checks first char for negative numbers jne char_to_int inc ecx ; flag register: ecx = 0 -> positive number ; ecx = 1 -> negative number inc edx char_to_int: xor ebx, ebx movzx ebx, byte [edx] ; get current char from string test ebx, ebx ; checks for null terminator je if_negative ; checks for number to be in [0, 9] interval for ascii cmp ebx, '0' jl not_number cmp ebx, '9' jg not_number sub ebx, '0' ; ascii to decimal imul eax, 10 ; multiply total by 10 add eax, ebx ; add current digit to total inc edx ; get address of the next char jmp char_to_int not_number: jmp done if_negative: cmp ecx, 1 jne done negative: mov ebx, eax xor eax,eax sub eax, ebx done: leave ret visit_node: push ebp mov ebp, esp mov ecx, dword [ebp + 8] mov ebx, [ecx + 4] mov edx, [ecx + 8] mov esi, [ebx] mov edi, [edx] mov esi, [esi] mov edi, [edi] cmp esi, '0' jae get_left_int push esi jmp check_right get_left_int: push edx push ebx push ecx push dword [ebx] call atoi add esp, 4 pop ecx pop ebx pop edx push eax check_right: cmp edi, '0' jae get_right_int push edi jmp visit_left_node get_right_int: push edx push ebx push ecx push dword [edx] call atoi add esp, 4 pop ecx pop ebx pop edx push eax jmp visit_left_node recc_left: push edi push edx push eax push ebx call visit_node add esp, 4 pop eax pop edx pop edi mov [esp + 4], eax mov ecx, [esp + 16] jmp return_from_left recc_right: push eax push edx call visit_node add esp, 4 pop eax mov [esp], eax mov ecx, [esp + 16] jmp compute_operation visit_left_node: cmp esi, '0' jl recc_left return_from_left: cmp edi, '0' jl recc_right compute_operation: mov ecx, [ecx] mov ecx, [ecx] cmp ecx, '+' je addition cmp ecx, '*' je multiplication cmp ecx, '-' je subtraction cmp ecx, '/' je division addition: xor eax, eax pop ecx pop eax add eax, ecx jmp return multiplication: xor eax, eax pop ecx pop eax imul eax, ecx jmp return subtraction: xor eax, eax pop ecx pop eax sub eax, ecx jmp return division: xor eax, eax pop ecx pop eax cdq idiv ecx return: mov [ebp + 12], eax ; put result at saved address in memory leave ret main: push ebp mov ebp, esp ; put arguments in an AST and get root's address into eax call getAST mov [root], eax push eax push dword [root] call visit_node add esp, 4 PRINT_DEC 4, eax ; free memory allocated for tree push dword [root] call freeAST leave ret
15.934783
90
0.52251
050752f1076c92042b2d31c2fe719eb449db5951
41,620
asm
Assembly
user/strace.asm
KKcuber/xv6-enhanced
96915ca5a6c941df4322b9608373ddacaeaaa9b9
[ "MIT-0" ]
null
null
null
user/strace.asm
KKcuber/xv6-enhanced
96915ca5a6c941df4322b9608373ddacaeaaa9b9
[ "MIT-0" ]
null
null
null
user/strace.asm
KKcuber/xv6-enhanced
96915ca5a6c941df4322b9608373ddacaeaaa9b9
[ "MIT-0" ]
null
null
null
user/_strace: file format elf64-littleriscv Disassembly of section .text: 0000000000000000 <main>: #include "user/user.h" //user program for strace int main(int argc, char *argv[]) { 0: 7179 addi sp,sp,-48 2: f406 sd ra,40(sp) 4: f022 sd s0,32(sp) 6: ec26 sd s1,24(sp) 8: e84a sd s2,16(sp) a: e44e sd s3,8(sp) c: 1800 addi s0,sp,48 int mask; if (argc <= 2) e: 4789 li a5,2 10: 02a7c063 blt a5,a0,30 <main+0x30> { fprintf(2, "Invalid syntax\n"); 14: 00001597 auipc a1,0x1 18: 84c58593 addi a1,a1,-1972 # 860 <malloc+0xea> 1c: 4509 li a0,2 1e: 00000097 auipc ra,0x0 22: 66c080e7 jalr 1644(ra) # 68a <fprintf> exit(1); 26: 4505 li a0,1 28: 00000097 auipc ra,0x0 2c: 300080e7 jalr 768(ra) # 328 <exit> 30: 84aa mv s1,a0 32: 892e mv s2,a1 } mask = atoi(argv[1]); 34: 6588 ld a0,8(a1) 36: 00000097 auipc ra,0x0 3a: 1f2080e7 jalr 498(ra) # 228 <atoi> trace(mask); 3e: 00000097 auipc ra,0x0 42: 38a080e7 jalr 906(ra) # 3c8 <trace> // Executing the command which we have to trace until it exits char *execargs[argc - 1]; 46: fff4879b addiw a5,s1,-1 4a: 078e slli a5,a5,0x3 4c: 07bd addi a5,a5,15 4e: 9bc1 andi a5,a5,-16 50: 40f10133 sub sp,sp,a5 54: 898a mv s3,sp for (int i = 0; i < argc - 2; i++) 56: ffe4859b addiw a1,s1,-2 5a: 01090793 addi a5,s2,16 5e: 874e mv a4,s3 60: ffd4869b addiw a3,s1,-3 64: 1682 slli a3,a3,0x20 66: 9281 srli a3,a3,0x20 68: 068e slli a3,a3,0x3 6a: 0961 addi s2,s2,24 6c: 96ca add a3,a3,s2 { execargs[i] = argv[i + 2]; 6e: 6390 ld a2,0(a5) 70: e310 sd a2,0(a4) for (int i = 0; i < argc - 2; i++) 72: 07a1 addi a5,a5,8 74: 0721 addi a4,a4,8 76: fed79ce3 bne a5,a3,6e <main+0x6e> } execargs[argc - 2] = 0; 7a: 00359793 slli a5,a1,0x3 7e: 97ce add a5,a5,s3 80: 0007b023 sd zero,0(a5) exec(execargs[0], execargs); 84: 85ce mv a1,s3 86: 0009b503 ld a0,0(s3) 8a: 00000097 auipc ra,0x0 8e: 2d6080e7 jalr 726(ra) # 360 <exec> fprintf(2, "exec of %s failed\n", execargs[0]); 92: 0009b603 ld a2,0(s3) 96: 00000597 auipc a1,0x0 9a: 7da58593 addi a1,a1,2010 # 870 <malloc+0xfa> 9e: 4509 li a0,2 a0: 00000097 auipc ra,0x0 a4: 5ea080e7 jalr 1514(ra) # 68a <fprintf> exit(0); a8: 4501 li a0,0 aa: 00000097 auipc ra,0x0 ae: 27e080e7 jalr 638(ra) # 328 <exit> 00000000000000b2 <strcpy>: #include "kernel/fcntl.h" #include "user/user.h" char* strcpy(char *s, const char *t) { b2: 1141 addi sp,sp,-16 b4: e422 sd s0,8(sp) b6: 0800 addi s0,sp,16 char *os; os = s; while((*s++ = *t++) != 0) b8: 87aa mv a5,a0 ba: 0585 addi a1,a1,1 bc: 0785 addi a5,a5,1 be: fff5c703 lbu a4,-1(a1) c2: fee78fa3 sb a4,-1(a5) c6: fb75 bnez a4,ba <strcpy+0x8> ; return os; } c8: 6422 ld s0,8(sp) ca: 0141 addi sp,sp,16 cc: 8082 ret 00000000000000ce <strcmp>: int strcmp(const char *p, const char *q) { ce: 1141 addi sp,sp,-16 d0: e422 sd s0,8(sp) d2: 0800 addi s0,sp,16 while(*p && *p == *q) d4: 00054783 lbu a5,0(a0) d8: cb91 beqz a5,ec <strcmp+0x1e> da: 0005c703 lbu a4,0(a1) de: 00f71763 bne a4,a5,ec <strcmp+0x1e> p++, q++; e2: 0505 addi a0,a0,1 e4: 0585 addi a1,a1,1 while(*p && *p == *q) e6: 00054783 lbu a5,0(a0) ea: fbe5 bnez a5,da <strcmp+0xc> return (uchar)*p - (uchar)*q; ec: 0005c503 lbu a0,0(a1) } f0: 40a7853b subw a0,a5,a0 f4: 6422 ld s0,8(sp) f6: 0141 addi sp,sp,16 f8: 8082 ret 00000000000000fa <strlen>: uint strlen(const char *s) { fa: 1141 addi sp,sp,-16 fc: e422 sd s0,8(sp) fe: 0800 addi s0,sp,16 int n; for(n = 0; s[n]; n++) 100: 00054783 lbu a5,0(a0) 104: cf91 beqz a5,120 <strlen+0x26> 106: 0505 addi a0,a0,1 108: 87aa mv a5,a0 10a: 4685 li a3,1 10c: 9e89 subw a3,a3,a0 10e: 00f6853b addw a0,a3,a5 112: 0785 addi a5,a5,1 114: fff7c703 lbu a4,-1(a5) 118: fb7d bnez a4,10e <strlen+0x14> ; return n; } 11a: 6422 ld s0,8(sp) 11c: 0141 addi sp,sp,16 11e: 8082 ret for(n = 0; s[n]; n++) 120: 4501 li a0,0 122: bfe5 j 11a <strlen+0x20> 0000000000000124 <memset>: void* memset(void *dst, int c, uint n) { 124: 1141 addi sp,sp,-16 126: e422 sd s0,8(sp) 128: 0800 addi s0,sp,16 char *cdst = (char *) dst; int i; for(i = 0; i < n; i++){ 12a: ce09 beqz a2,144 <memset+0x20> 12c: 87aa mv a5,a0 12e: fff6071b addiw a4,a2,-1 132: 1702 slli a4,a4,0x20 134: 9301 srli a4,a4,0x20 136: 0705 addi a4,a4,1 138: 972a add a4,a4,a0 cdst[i] = c; 13a: 00b78023 sb a1,0(a5) for(i = 0; i < n; i++){ 13e: 0785 addi a5,a5,1 140: fee79de3 bne a5,a4,13a <memset+0x16> } return dst; } 144: 6422 ld s0,8(sp) 146: 0141 addi sp,sp,16 148: 8082 ret 000000000000014a <strchr>: char* strchr(const char *s, char c) { 14a: 1141 addi sp,sp,-16 14c: e422 sd s0,8(sp) 14e: 0800 addi s0,sp,16 for(; *s; s++) 150: 00054783 lbu a5,0(a0) 154: cb99 beqz a5,16a <strchr+0x20> if(*s == c) 156: 00f58763 beq a1,a5,164 <strchr+0x1a> for(; *s; s++) 15a: 0505 addi a0,a0,1 15c: 00054783 lbu a5,0(a0) 160: fbfd bnez a5,156 <strchr+0xc> return (char*)s; return 0; 162: 4501 li a0,0 } 164: 6422 ld s0,8(sp) 166: 0141 addi sp,sp,16 168: 8082 ret return 0; 16a: 4501 li a0,0 16c: bfe5 j 164 <strchr+0x1a> 000000000000016e <gets>: char* gets(char *buf, int max) { 16e: 711d addi sp,sp,-96 170: ec86 sd ra,88(sp) 172: e8a2 sd s0,80(sp) 174: e4a6 sd s1,72(sp) 176: e0ca sd s2,64(sp) 178: fc4e sd s3,56(sp) 17a: f852 sd s4,48(sp) 17c: f456 sd s5,40(sp) 17e: f05a sd s6,32(sp) 180: ec5e sd s7,24(sp) 182: 1080 addi s0,sp,96 184: 8baa mv s7,a0 186: 8a2e mv s4,a1 int i, cc; char c; for(i=0; i+1 < max; ){ 188: 892a mv s2,a0 18a: 4481 li s1,0 cc = read(0, &c, 1); if(cc < 1) break; buf[i++] = c; if(c == '\n' || c == '\r') 18c: 4aa9 li s5,10 18e: 4b35 li s6,13 for(i=0; i+1 < max; ){ 190: 89a6 mv s3,s1 192: 2485 addiw s1,s1,1 194: 0344d863 bge s1,s4,1c4 <gets+0x56> cc = read(0, &c, 1); 198: 4605 li a2,1 19a: faf40593 addi a1,s0,-81 19e: 4501 li a0,0 1a0: 00000097 auipc ra,0x0 1a4: 1a0080e7 jalr 416(ra) # 340 <read> if(cc < 1) 1a8: 00a05e63 blez a0,1c4 <gets+0x56> buf[i++] = c; 1ac: faf44783 lbu a5,-81(s0) 1b0: 00f90023 sb a5,0(s2) if(c == '\n' || c == '\r') 1b4: 01578763 beq a5,s5,1c2 <gets+0x54> 1b8: 0905 addi s2,s2,1 1ba: fd679be3 bne a5,s6,190 <gets+0x22> for(i=0; i+1 < max; ){ 1be: 89a6 mv s3,s1 1c0: a011 j 1c4 <gets+0x56> 1c2: 89a6 mv s3,s1 break; } buf[i] = '\0'; 1c4: 99de add s3,s3,s7 1c6: 00098023 sb zero,0(s3) return buf; } 1ca: 855e mv a0,s7 1cc: 60e6 ld ra,88(sp) 1ce: 6446 ld s0,80(sp) 1d0: 64a6 ld s1,72(sp) 1d2: 6906 ld s2,64(sp) 1d4: 79e2 ld s3,56(sp) 1d6: 7a42 ld s4,48(sp) 1d8: 7aa2 ld s5,40(sp) 1da: 7b02 ld s6,32(sp) 1dc: 6be2 ld s7,24(sp) 1de: 6125 addi sp,sp,96 1e0: 8082 ret 00000000000001e2 <stat>: int stat(const char *n, struct stat *st) { 1e2: 1101 addi sp,sp,-32 1e4: ec06 sd ra,24(sp) 1e6: e822 sd s0,16(sp) 1e8: e426 sd s1,8(sp) 1ea: e04a sd s2,0(sp) 1ec: 1000 addi s0,sp,32 1ee: 892e mv s2,a1 int fd; int r; fd = open(n, O_RDONLY); 1f0: 4581 li a1,0 1f2: 00000097 auipc ra,0x0 1f6: 176080e7 jalr 374(ra) # 368 <open> if(fd < 0) 1fa: 02054563 bltz a0,224 <stat+0x42> 1fe: 84aa mv s1,a0 return -1; r = fstat(fd, st); 200: 85ca mv a1,s2 202: 00000097 auipc ra,0x0 206: 17e080e7 jalr 382(ra) # 380 <fstat> 20a: 892a mv s2,a0 close(fd); 20c: 8526 mv a0,s1 20e: 00000097 auipc ra,0x0 212: 142080e7 jalr 322(ra) # 350 <close> return r; } 216: 854a mv a0,s2 218: 60e2 ld ra,24(sp) 21a: 6442 ld s0,16(sp) 21c: 64a2 ld s1,8(sp) 21e: 6902 ld s2,0(sp) 220: 6105 addi sp,sp,32 222: 8082 ret return -1; 224: 597d li s2,-1 226: bfc5 j 216 <stat+0x34> 0000000000000228 <atoi>: int atoi(const char *s) { 228: 1141 addi sp,sp,-16 22a: e422 sd s0,8(sp) 22c: 0800 addi s0,sp,16 int n; n = 0; while('0' <= *s && *s <= '9') 22e: 00054603 lbu a2,0(a0) 232: fd06079b addiw a5,a2,-48 236: 0ff7f793 andi a5,a5,255 23a: 4725 li a4,9 23c: 02f76963 bltu a4,a5,26e <atoi+0x46> 240: 86aa mv a3,a0 n = 0; 242: 4501 li a0,0 while('0' <= *s && *s <= '9') 244: 45a5 li a1,9 n = n*10 + *s++ - '0'; 246: 0685 addi a3,a3,1 248: 0025179b slliw a5,a0,0x2 24c: 9fa9 addw a5,a5,a0 24e: 0017979b slliw a5,a5,0x1 252: 9fb1 addw a5,a5,a2 254: fd07851b addiw a0,a5,-48 while('0' <= *s && *s <= '9') 258: 0006c603 lbu a2,0(a3) 25c: fd06071b addiw a4,a2,-48 260: 0ff77713 andi a4,a4,255 264: fee5f1e3 bgeu a1,a4,246 <atoi+0x1e> return n; } 268: 6422 ld s0,8(sp) 26a: 0141 addi sp,sp,16 26c: 8082 ret n = 0; 26e: 4501 li a0,0 270: bfe5 j 268 <atoi+0x40> 0000000000000272 <memmove>: void* memmove(void *vdst, const void *vsrc, int n) { 272: 1141 addi sp,sp,-16 274: e422 sd s0,8(sp) 276: 0800 addi s0,sp,16 char *dst; const char *src; dst = vdst; src = vsrc; if (src > dst) { 278: 02b57663 bgeu a0,a1,2a4 <memmove+0x32> while(n-- > 0) 27c: 02c05163 blez a2,29e <memmove+0x2c> 280: fff6079b addiw a5,a2,-1 284: 1782 slli a5,a5,0x20 286: 9381 srli a5,a5,0x20 288: 0785 addi a5,a5,1 28a: 97aa add a5,a5,a0 dst = vdst; 28c: 872a mv a4,a0 *dst++ = *src++; 28e: 0585 addi a1,a1,1 290: 0705 addi a4,a4,1 292: fff5c683 lbu a3,-1(a1) 296: fed70fa3 sb a3,-1(a4) while(n-- > 0) 29a: fee79ae3 bne a5,a4,28e <memmove+0x1c> src += n; while(n-- > 0) *--dst = *--src; } return vdst; } 29e: 6422 ld s0,8(sp) 2a0: 0141 addi sp,sp,16 2a2: 8082 ret dst += n; 2a4: 00c50733 add a4,a0,a2 src += n; 2a8: 95b2 add a1,a1,a2 while(n-- > 0) 2aa: fec05ae3 blez a2,29e <memmove+0x2c> 2ae: fff6079b addiw a5,a2,-1 2b2: 1782 slli a5,a5,0x20 2b4: 9381 srli a5,a5,0x20 2b6: fff7c793 not a5,a5 2ba: 97ba add a5,a5,a4 *--dst = *--src; 2bc: 15fd addi a1,a1,-1 2be: 177d addi a4,a4,-1 2c0: 0005c683 lbu a3,0(a1) 2c4: 00d70023 sb a3,0(a4) while(n-- > 0) 2c8: fee79ae3 bne a5,a4,2bc <memmove+0x4a> 2cc: bfc9 j 29e <memmove+0x2c> 00000000000002ce <memcmp>: int memcmp(const void *s1, const void *s2, uint n) { 2ce: 1141 addi sp,sp,-16 2d0: e422 sd s0,8(sp) 2d2: 0800 addi s0,sp,16 const char *p1 = s1, *p2 = s2; while (n-- > 0) { 2d4: ca05 beqz a2,304 <memcmp+0x36> 2d6: fff6069b addiw a3,a2,-1 2da: 1682 slli a3,a3,0x20 2dc: 9281 srli a3,a3,0x20 2de: 0685 addi a3,a3,1 2e0: 96aa add a3,a3,a0 if (*p1 != *p2) { 2e2: 00054783 lbu a5,0(a0) 2e6: 0005c703 lbu a4,0(a1) 2ea: 00e79863 bne a5,a4,2fa <memcmp+0x2c> return *p1 - *p2; } p1++; 2ee: 0505 addi a0,a0,1 p2++; 2f0: 0585 addi a1,a1,1 while (n-- > 0) { 2f2: fed518e3 bne a0,a3,2e2 <memcmp+0x14> } return 0; 2f6: 4501 li a0,0 2f8: a019 j 2fe <memcmp+0x30> return *p1 - *p2; 2fa: 40e7853b subw a0,a5,a4 } 2fe: 6422 ld s0,8(sp) 300: 0141 addi sp,sp,16 302: 8082 ret return 0; 304: 4501 li a0,0 306: bfe5 j 2fe <memcmp+0x30> 0000000000000308 <memcpy>: void * memcpy(void *dst, const void *src, uint n) { 308: 1141 addi sp,sp,-16 30a: e406 sd ra,8(sp) 30c: e022 sd s0,0(sp) 30e: 0800 addi s0,sp,16 return memmove(dst, src, n); 310: 00000097 auipc ra,0x0 314: f62080e7 jalr -158(ra) # 272 <memmove> } 318: 60a2 ld ra,8(sp) 31a: 6402 ld s0,0(sp) 31c: 0141 addi sp,sp,16 31e: 8082 ret 0000000000000320 <fork>: # generated by usys.pl - do not edit #include "kernel/syscall.h" .global fork fork: li a7, SYS_fork 320: 4885 li a7,1 ecall 322: 00000073 ecall ret 326: 8082 ret 0000000000000328 <exit>: .global exit exit: li a7, SYS_exit 328: 4889 li a7,2 ecall 32a: 00000073 ecall ret 32e: 8082 ret 0000000000000330 <wait>: .global wait wait: li a7, SYS_wait 330: 488d li a7,3 ecall 332: 00000073 ecall ret 336: 8082 ret 0000000000000338 <pipe>: .global pipe pipe: li a7, SYS_pipe 338: 4891 li a7,4 ecall 33a: 00000073 ecall ret 33e: 8082 ret 0000000000000340 <read>: .global read read: li a7, SYS_read 340: 4895 li a7,5 ecall 342: 00000073 ecall ret 346: 8082 ret 0000000000000348 <write>: .global write write: li a7, SYS_write 348: 48c1 li a7,16 ecall 34a: 00000073 ecall ret 34e: 8082 ret 0000000000000350 <close>: .global close close: li a7, SYS_close 350: 48d5 li a7,21 ecall 352: 00000073 ecall ret 356: 8082 ret 0000000000000358 <kill>: .global kill kill: li a7, SYS_kill 358: 4899 li a7,6 ecall 35a: 00000073 ecall ret 35e: 8082 ret 0000000000000360 <exec>: .global exec exec: li a7, SYS_exec 360: 489d li a7,7 ecall 362: 00000073 ecall ret 366: 8082 ret 0000000000000368 <open>: .global open open: li a7, SYS_open 368: 48bd li a7,15 ecall 36a: 00000073 ecall ret 36e: 8082 ret 0000000000000370 <mknod>: .global mknod mknod: li a7, SYS_mknod 370: 48c5 li a7,17 ecall 372: 00000073 ecall ret 376: 8082 ret 0000000000000378 <unlink>: .global unlink unlink: li a7, SYS_unlink 378: 48c9 li a7,18 ecall 37a: 00000073 ecall ret 37e: 8082 ret 0000000000000380 <fstat>: .global fstat fstat: li a7, SYS_fstat 380: 48a1 li a7,8 ecall 382: 00000073 ecall ret 386: 8082 ret 0000000000000388 <link>: .global link link: li a7, SYS_link 388: 48cd li a7,19 ecall 38a: 00000073 ecall ret 38e: 8082 ret 0000000000000390 <mkdir>: .global mkdir mkdir: li a7, SYS_mkdir 390: 48d1 li a7,20 ecall 392: 00000073 ecall ret 396: 8082 ret 0000000000000398 <chdir>: .global chdir chdir: li a7, SYS_chdir 398: 48a5 li a7,9 ecall 39a: 00000073 ecall ret 39e: 8082 ret 00000000000003a0 <dup>: .global dup dup: li a7, SYS_dup 3a0: 48a9 li a7,10 ecall 3a2: 00000073 ecall ret 3a6: 8082 ret 00000000000003a8 <getpid>: .global getpid getpid: li a7, SYS_getpid 3a8: 48ad li a7,11 ecall 3aa: 00000073 ecall ret 3ae: 8082 ret 00000000000003b0 <sbrk>: .global sbrk sbrk: li a7, SYS_sbrk 3b0: 48b1 li a7,12 ecall 3b2: 00000073 ecall ret 3b6: 8082 ret 00000000000003b8 <sleep>: .global sleep sleep: li a7, SYS_sleep 3b8: 48b5 li a7,13 ecall 3ba: 00000073 ecall ret 3be: 8082 ret 00000000000003c0 <uptime>: .global uptime uptime: li a7, SYS_uptime 3c0: 48b9 li a7,14 ecall 3c2: 00000073 ecall ret 3c6: 8082 ret 00000000000003c8 <trace>: .global trace trace: li a7, SYS_trace 3c8: 48d9 li a7,22 ecall 3ca: 00000073 ecall ret 3ce: 8082 ret 00000000000003d0 <waitx>: .global waitx waitx: li a7, SYS_waitx 3d0: 48dd li a7,23 ecall 3d2: 00000073 ecall ret 3d6: 8082 ret 00000000000003d8 <set_priority>: .global set_priority set_priority: li a7, SYS_set_priority 3d8: 48e1 li a7,24 ecall 3da: 00000073 ecall ret 3de: 8082 ret 00000000000003e0 <putc>: static char digits[] = "0123456789ABCDEF"; static void putc(int fd, char c) { 3e0: 1101 addi sp,sp,-32 3e2: ec06 sd ra,24(sp) 3e4: e822 sd s0,16(sp) 3e6: 1000 addi s0,sp,32 3e8: feb407a3 sb a1,-17(s0) write(fd, &c, 1); 3ec: 4605 li a2,1 3ee: fef40593 addi a1,s0,-17 3f2: 00000097 auipc ra,0x0 3f6: f56080e7 jalr -170(ra) # 348 <write> } 3fa: 60e2 ld ra,24(sp) 3fc: 6442 ld s0,16(sp) 3fe: 6105 addi sp,sp,32 400: 8082 ret 0000000000000402 <printint>: static void printint(int fd, int xx, int base, int sgn) { 402: 7139 addi sp,sp,-64 404: fc06 sd ra,56(sp) 406: f822 sd s0,48(sp) 408: f426 sd s1,40(sp) 40a: f04a sd s2,32(sp) 40c: ec4e sd s3,24(sp) 40e: 0080 addi s0,sp,64 410: 84aa mv s1,a0 char buf[16]; int i, neg; uint x; neg = 0; if(sgn && xx < 0){ 412: c299 beqz a3,418 <printint+0x16> 414: 0805c863 bltz a1,4a4 <printint+0xa2> neg = 1; x = -xx; } else { x = xx; 418: 2581 sext.w a1,a1 neg = 0; 41a: 4881 li a7,0 41c: fc040693 addi a3,s0,-64 } i = 0; 420: 4701 li a4,0 do{ buf[i++] = digits[x % base]; 422: 2601 sext.w a2,a2 424: 00000517 auipc a0,0x0 428: 46c50513 addi a0,a0,1132 # 890 <digits> 42c: 883a mv a6,a4 42e: 2705 addiw a4,a4,1 430: 02c5f7bb remuw a5,a1,a2 434: 1782 slli a5,a5,0x20 436: 9381 srli a5,a5,0x20 438: 97aa add a5,a5,a0 43a: 0007c783 lbu a5,0(a5) 43e: 00f68023 sb a5,0(a3) }while((x /= base) != 0); 442: 0005879b sext.w a5,a1 446: 02c5d5bb divuw a1,a1,a2 44a: 0685 addi a3,a3,1 44c: fec7f0e3 bgeu a5,a2,42c <printint+0x2a> if(neg) 450: 00088b63 beqz a7,466 <printint+0x64> buf[i++] = '-'; 454: fd040793 addi a5,s0,-48 458: 973e add a4,a4,a5 45a: 02d00793 li a5,45 45e: fef70823 sb a5,-16(a4) 462: 0028071b addiw a4,a6,2 while(--i >= 0) 466: 02e05863 blez a4,496 <printint+0x94> 46a: fc040793 addi a5,s0,-64 46e: 00e78933 add s2,a5,a4 472: fff78993 addi s3,a5,-1 476: 99ba add s3,s3,a4 478: 377d addiw a4,a4,-1 47a: 1702 slli a4,a4,0x20 47c: 9301 srli a4,a4,0x20 47e: 40e989b3 sub s3,s3,a4 putc(fd, buf[i]); 482: fff94583 lbu a1,-1(s2) 486: 8526 mv a0,s1 488: 00000097 auipc ra,0x0 48c: f58080e7 jalr -168(ra) # 3e0 <putc> while(--i >= 0) 490: 197d addi s2,s2,-1 492: ff3918e3 bne s2,s3,482 <printint+0x80> } 496: 70e2 ld ra,56(sp) 498: 7442 ld s0,48(sp) 49a: 74a2 ld s1,40(sp) 49c: 7902 ld s2,32(sp) 49e: 69e2 ld s3,24(sp) 4a0: 6121 addi sp,sp,64 4a2: 8082 ret x = -xx; 4a4: 40b005bb negw a1,a1 neg = 1; 4a8: 4885 li a7,1 x = -xx; 4aa: bf8d j 41c <printint+0x1a> 00000000000004ac <vprintf>: } // Print to the given fd. Only understands %d, %x, %p, %s. void vprintf(int fd, const char *fmt, va_list ap) { 4ac: 7119 addi sp,sp,-128 4ae: fc86 sd ra,120(sp) 4b0: f8a2 sd s0,112(sp) 4b2: f4a6 sd s1,104(sp) 4b4: f0ca sd s2,96(sp) 4b6: ecce sd s3,88(sp) 4b8: e8d2 sd s4,80(sp) 4ba: e4d6 sd s5,72(sp) 4bc: e0da sd s6,64(sp) 4be: fc5e sd s7,56(sp) 4c0: f862 sd s8,48(sp) 4c2: f466 sd s9,40(sp) 4c4: f06a sd s10,32(sp) 4c6: ec6e sd s11,24(sp) 4c8: 0100 addi s0,sp,128 char *s; int c, i, state; state = 0; for(i = 0; fmt[i]; i++){ 4ca: 0005c903 lbu s2,0(a1) 4ce: 18090f63 beqz s2,66c <vprintf+0x1c0> 4d2: 8aaa mv s5,a0 4d4: 8b32 mv s6,a2 4d6: 00158493 addi s1,a1,1 state = 0; 4da: 4981 li s3,0 if(c == '%'){ state = '%'; } else { putc(fd, c); } } else if(state == '%'){ 4dc: 02500a13 li s4,37 if(c == 'd'){ 4e0: 06400c13 li s8,100 printint(fd, va_arg(ap, int), 10, 1); } else if(c == 'l') { 4e4: 06c00c93 li s9,108 printint(fd, va_arg(ap, uint64), 10, 0); } else if(c == 'x') { 4e8: 07800d13 li s10,120 printint(fd, va_arg(ap, int), 16, 0); } else if(c == 'p') { 4ec: 07000d93 li s11,112 putc(fd, digits[x >> (sizeof(uint64) * 8 - 4)]); 4f0: 00000b97 auipc s7,0x0 4f4: 3a0b8b93 addi s7,s7,928 # 890 <digits> 4f8: a839 j 516 <vprintf+0x6a> putc(fd, c); 4fa: 85ca mv a1,s2 4fc: 8556 mv a0,s5 4fe: 00000097 auipc ra,0x0 502: ee2080e7 jalr -286(ra) # 3e0 <putc> 506: a019 j 50c <vprintf+0x60> } else if(state == '%'){ 508: 01498f63 beq s3,s4,526 <vprintf+0x7a> for(i = 0; fmt[i]; i++){ 50c: 0485 addi s1,s1,1 50e: fff4c903 lbu s2,-1(s1) 512: 14090d63 beqz s2,66c <vprintf+0x1c0> c = fmt[i] & 0xff; 516: 0009079b sext.w a5,s2 if(state == 0){ 51a: fe0997e3 bnez s3,508 <vprintf+0x5c> if(c == '%'){ 51e: fd479ee3 bne a5,s4,4fa <vprintf+0x4e> state = '%'; 522: 89be mv s3,a5 524: b7e5 j 50c <vprintf+0x60> if(c == 'd'){ 526: 05878063 beq a5,s8,566 <vprintf+0xba> } else if(c == 'l') { 52a: 05978c63 beq a5,s9,582 <vprintf+0xd6> } else if(c == 'x') { 52e: 07a78863 beq a5,s10,59e <vprintf+0xf2> } else if(c == 'p') { 532: 09b78463 beq a5,s11,5ba <vprintf+0x10e> printptr(fd, va_arg(ap, uint64)); } else if(c == 's'){ 536: 07300713 li a4,115 53a: 0ce78663 beq a5,a4,606 <vprintf+0x15a> s = "(null)"; while(*s != 0){ putc(fd, *s); s++; } } else if(c == 'c'){ 53e: 06300713 li a4,99 542: 0ee78e63 beq a5,a4,63e <vprintf+0x192> putc(fd, va_arg(ap, uint)); } else if(c == '%'){ 546: 11478863 beq a5,s4,656 <vprintf+0x1aa> putc(fd, c); } else { // Unknown % sequence. Print it to draw attention. putc(fd, '%'); 54a: 85d2 mv a1,s4 54c: 8556 mv a0,s5 54e: 00000097 auipc ra,0x0 552: e92080e7 jalr -366(ra) # 3e0 <putc> putc(fd, c); 556: 85ca mv a1,s2 558: 8556 mv a0,s5 55a: 00000097 auipc ra,0x0 55e: e86080e7 jalr -378(ra) # 3e0 <putc> } state = 0; 562: 4981 li s3,0 564: b765 j 50c <vprintf+0x60> printint(fd, va_arg(ap, int), 10, 1); 566: 008b0913 addi s2,s6,8 56a: 4685 li a3,1 56c: 4629 li a2,10 56e: 000b2583 lw a1,0(s6) 572: 8556 mv a0,s5 574: 00000097 auipc ra,0x0 578: e8e080e7 jalr -370(ra) # 402 <printint> 57c: 8b4a mv s6,s2 state = 0; 57e: 4981 li s3,0 580: b771 j 50c <vprintf+0x60> printint(fd, va_arg(ap, uint64), 10, 0); 582: 008b0913 addi s2,s6,8 586: 4681 li a3,0 588: 4629 li a2,10 58a: 000b2583 lw a1,0(s6) 58e: 8556 mv a0,s5 590: 00000097 auipc ra,0x0 594: e72080e7 jalr -398(ra) # 402 <printint> 598: 8b4a mv s6,s2 state = 0; 59a: 4981 li s3,0 59c: bf85 j 50c <vprintf+0x60> printint(fd, va_arg(ap, int), 16, 0); 59e: 008b0913 addi s2,s6,8 5a2: 4681 li a3,0 5a4: 4641 li a2,16 5a6: 000b2583 lw a1,0(s6) 5aa: 8556 mv a0,s5 5ac: 00000097 auipc ra,0x0 5b0: e56080e7 jalr -426(ra) # 402 <printint> 5b4: 8b4a mv s6,s2 state = 0; 5b6: 4981 li s3,0 5b8: bf91 j 50c <vprintf+0x60> printptr(fd, va_arg(ap, uint64)); 5ba: 008b0793 addi a5,s6,8 5be: f8f43423 sd a5,-120(s0) 5c2: 000b3983 ld s3,0(s6) putc(fd, '0'); 5c6: 03000593 li a1,48 5ca: 8556 mv a0,s5 5cc: 00000097 auipc ra,0x0 5d0: e14080e7 jalr -492(ra) # 3e0 <putc> putc(fd, 'x'); 5d4: 85ea mv a1,s10 5d6: 8556 mv a0,s5 5d8: 00000097 auipc ra,0x0 5dc: e08080e7 jalr -504(ra) # 3e0 <putc> 5e0: 4941 li s2,16 putc(fd, digits[x >> (sizeof(uint64) * 8 - 4)]); 5e2: 03c9d793 srli a5,s3,0x3c 5e6: 97de add a5,a5,s7 5e8: 0007c583 lbu a1,0(a5) 5ec: 8556 mv a0,s5 5ee: 00000097 auipc ra,0x0 5f2: df2080e7 jalr -526(ra) # 3e0 <putc> for (i = 0; i < (sizeof(uint64) * 2); i++, x <<= 4) 5f6: 0992 slli s3,s3,0x4 5f8: 397d addiw s2,s2,-1 5fa: fe0914e3 bnez s2,5e2 <vprintf+0x136> printptr(fd, va_arg(ap, uint64)); 5fe: f8843b03 ld s6,-120(s0) state = 0; 602: 4981 li s3,0 604: b721 j 50c <vprintf+0x60> s = va_arg(ap, char*); 606: 008b0993 addi s3,s6,8 60a: 000b3903 ld s2,0(s6) if(s == 0) 60e: 02090163 beqz s2,630 <vprintf+0x184> while(*s != 0){ 612: 00094583 lbu a1,0(s2) 616: c9a1 beqz a1,666 <vprintf+0x1ba> putc(fd, *s); 618: 8556 mv a0,s5 61a: 00000097 auipc ra,0x0 61e: dc6080e7 jalr -570(ra) # 3e0 <putc> s++; 622: 0905 addi s2,s2,1 while(*s != 0){ 624: 00094583 lbu a1,0(s2) 628: f9e5 bnez a1,618 <vprintf+0x16c> s = va_arg(ap, char*); 62a: 8b4e mv s6,s3 state = 0; 62c: 4981 li s3,0 62e: bdf9 j 50c <vprintf+0x60> s = "(null)"; 630: 00000917 auipc s2,0x0 634: 25890913 addi s2,s2,600 # 888 <malloc+0x112> while(*s != 0){ 638: 02800593 li a1,40 63c: bff1 j 618 <vprintf+0x16c> putc(fd, va_arg(ap, uint)); 63e: 008b0913 addi s2,s6,8 642: 000b4583 lbu a1,0(s6) 646: 8556 mv a0,s5 648: 00000097 auipc ra,0x0 64c: d98080e7 jalr -616(ra) # 3e0 <putc> 650: 8b4a mv s6,s2 state = 0; 652: 4981 li s3,0 654: bd65 j 50c <vprintf+0x60> putc(fd, c); 656: 85d2 mv a1,s4 658: 8556 mv a0,s5 65a: 00000097 auipc ra,0x0 65e: d86080e7 jalr -634(ra) # 3e0 <putc> state = 0; 662: 4981 li s3,0 664: b565 j 50c <vprintf+0x60> s = va_arg(ap, char*); 666: 8b4e mv s6,s3 state = 0; 668: 4981 li s3,0 66a: b54d j 50c <vprintf+0x60> } } } 66c: 70e6 ld ra,120(sp) 66e: 7446 ld s0,112(sp) 670: 74a6 ld s1,104(sp) 672: 7906 ld s2,96(sp) 674: 69e6 ld s3,88(sp) 676: 6a46 ld s4,80(sp) 678: 6aa6 ld s5,72(sp) 67a: 6b06 ld s6,64(sp) 67c: 7be2 ld s7,56(sp) 67e: 7c42 ld s8,48(sp) 680: 7ca2 ld s9,40(sp) 682: 7d02 ld s10,32(sp) 684: 6de2 ld s11,24(sp) 686: 6109 addi sp,sp,128 688: 8082 ret 000000000000068a <fprintf>: void fprintf(int fd, const char *fmt, ...) { 68a: 715d addi sp,sp,-80 68c: ec06 sd ra,24(sp) 68e: e822 sd s0,16(sp) 690: 1000 addi s0,sp,32 692: e010 sd a2,0(s0) 694: e414 sd a3,8(s0) 696: e818 sd a4,16(s0) 698: ec1c sd a5,24(s0) 69a: 03043023 sd a6,32(s0) 69e: 03143423 sd a7,40(s0) va_list ap; va_start(ap, fmt); 6a2: fe843423 sd s0,-24(s0) vprintf(fd, fmt, ap); 6a6: 8622 mv a2,s0 6a8: 00000097 auipc ra,0x0 6ac: e04080e7 jalr -508(ra) # 4ac <vprintf> } 6b0: 60e2 ld ra,24(sp) 6b2: 6442 ld s0,16(sp) 6b4: 6161 addi sp,sp,80 6b6: 8082 ret 00000000000006b8 <printf>: void printf(const char *fmt, ...) { 6b8: 711d addi sp,sp,-96 6ba: ec06 sd ra,24(sp) 6bc: e822 sd s0,16(sp) 6be: 1000 addi s0,sp,32 6c0: e40c sd a1,8(s0) 6c2: e810 sd a2,16(s0) 6c4: ec14 sd a3,24(s0) 6c6: f018 sd a4,32(s0) 6c8: f41c sd a5,40(s0) 6ca: 03043823 sd a6,48(s0) 6ce: 03143c23 sd a7,56(s0) va_list ap; va_start(ap, fmt); 6d2: 00840613 addi a2,s0,8 6d6: fec43423 sd a2,-24(s0) vprintf(1, fmt, ap); 6da: 85aa mv a1,a0 6dc: 4505 li a0,1 6de: 00000097 auipc ra,0x0 6e2: dce080e7 jalr -562(ra) # 4ac <vprintf> } 6e6: 60e2 ld ra,24(sp) 6e8: 6442 ld s0,16(sp) 6ea: 6125 addi sp,sp,96 6ec: 8082 ret 00000000000006ee <free>: static Header base; static Header *freep; void free(void *ap) { 6ee: 1141 addi sp,sp,-16 6f0: e422 sd s0,8(sp) 6f2: 0800 addi s0,sp,16 Header *bp, *p; bp = (Header*)ap - 1; 6f4: ff050693 addi a3,a0,-16 for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 6f8: 00000797 auipc a5,0x0 6fc: 1b07b783 ld a5,432(a5) # 8a8 <freep> 700: a805 j 730 <free+0x42> 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; 702: 4618 lw a4,8(a2) 704: 9db9 addw a1,a1,a4 706: feb52c23 sw a1,-8(a0) bp->s.ptr = p->s.ptr->s.ptr; 70a: 6398 ld a4,0(a5) 70c: 6318 ld a4,0(a4) 70e: fee53823 sd a4,-16(a0) 712: a091 j 756 <free+0x68> } else bp->s.ptr = p->s.ptr; if(p + p->s.size == bp){ p->s.size += bp->s.size; 714: ff852703 lw a4,-8(a0) 718: 9e39 addw a2,a2,a4 71a: c790 sw a2,8(a5) p->s.ptr = bp->s.ptr; 71c: ff053703 ld a4,-16(a0) 720: e398 sd a4,0(a5) 722: a099 j 768 <free+0x7a> if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) 724: 6398 ld a4,0(a5) 726: 00e7e463 bltu a5,a4,72e <free+0x40> 72a: 00e6ea63 bltu a3,a4,73e <free+0x50> { 72e: 87ba mv a5,a4 for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 730: fed7fae3 bgeu a5,a3,724 <free+0x36> 734: 6398 ld a4,0(a5) 736: 00e6e463 bltu a3,a4,73e <free+0x50> if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) 73a: fee7eae3 bltu a5,a4,72e <free+0x40> if(bp + bp->s.size == p->s.ptr){ 73e: ff852583 lw a1,-8(a0) 742: 6390 ld a2,0(a5) 744: 02059713 slli a4,a1,0x20 748: 9301 srli a4,a4,0x20 74a: 0712 slli a4,a4,0x4 74c: 9736 add a4,a4,a3 74e: fae60ae3 beq a2,a4,702 <free+0x14> bp->s.ptr = p->s.ptr; 752: fec53823 sd a2,-16(a0) if(p + p->s.size == bp){ 756: 4790 lw a2,8(a5) 758: 02061713 slli a4,a2,0x20 75c: 9301 srli a4,a4,0x20 75e: 0712 slli a4,a4,0x4 760: 973e add a4,a4,a5 762: fae689e3 beq a3,a4,714 <free+0x26> } else p->s.ptr = bp; 766: e394 sd a3,0(a5) freep = p; 768: 00000717 auipc a4,0x0 76c: 14f73023 sd a5,320(a4) # 8a8 <freep> } 770: 6422 ld s0,8(sp) 772: 0141 addi sp,sp,16 774: 8082 ret 0000000000000776 <malloc>: return freep; } void* malloc(uint nbytes) { 776: 7139 addi sp,sp,-64 778: fc06 sd ra,56(sp) 77a: f822 sd s0,48(sp) 77c: f426 sd s1,40(sp) 77e: f04a sd s2,32(sp) 780: ec4e sd s3,24(sp) 782: e852 sd s4,16(sp) 784: e456 sd s5,8(sp) 786: e05a sd s6,0(sp) 788: 0080 addi s0,sp,64 Header *p, *prevp; uint nunits; nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; 78a: 02051493 slli s1,a0,0x20 78e: 9081 srli s1,s1,0x20 790: 04bd addi s1,s1,15 792: 8091 srli s1,s1,0x4 794: 0014899b addiw s3,s1,1 798: 0485 addi s1,s1,1 if((prevp = freep) == 0){ 79a: 00000517 auipc a0,0x0 79e: 10e53503 ld a0,270(a0) # 8a8 <freep> 7a2: c515 beqz a0,7ce <malloc+0x58> base.s.ptr = freep = prevp = &base; base.s.size = 0; } for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ 7a4: 611c ld a5,0(a0) if(p->s.size >= nunits){ 7a6: 4798 lw a4,8(a5) 7a8: 02977f63 bgeu a4,s1,7e6 <malloc+0x70> 7ac: 8a4e mv s4,s3 7ae: 0009871b sext.w a4,s3 7b2: 6685 lui a3,0x1 7b4: 00d77363 bgeu a4,a3,7ba <malloc+0x44> 7b8: 6a05 lui s4,0x1 7ba: 000a0b1b sext.w s6,s4 p = sbrk(nu * sizeof(Header)); 7be: 004a1a1b slliw s4,s4,0x4 p->s.size = nunits; } freep = prevp; return (void*)(p + 1); } if(p == freep) 7c2: 00000917 auipc s2,0x0 7c6: 0e690913 addi s2,s2,230 # 8a8 <freep> if(p == (char*)-1) 7ca: 5afd li s5,-1 7cc: a88d j 83e <malloc+0xc8> base.s.ptr = freep = prevp = &base; 7ce: 00000797 auipc a5,0x0 7d2: 0e278793 addi a5,a5,226 # 8b0 <base> 7d6: 00000717 auipc a4,0x0 7da: 0cf73923 sd a5,210(a4) # 8a8 <freep> 7de: e39c sd a5,0(a5) base.s.size = 0; 7e0: 0007a423 sw zero,8(a5) if(p->s.size >= nunits){ 7e4: b7e1 j 7ac <malloc+0x36> if(p->s.size == nunits) 7e6: 02e48b63 beq s1,a4,81c <malloc+0xa6> p->s.size -= nunits; 7ea: 4137073b subw a4,a4,s3 7ee: c798 sw a4,8(a5) p += p->s.size; 7f0: 1702 slli a4,a4,0x20 7f2: 9301 srli a4,a4,0x20 7f4: 0712 slli a4,a4,0x4 7f6: 97ba add a5,a5,a4 p->s.size = nunits; 7f8: 0137a423 sw s3,8(a5) freep = prevp; 7fc: 00000717 auipc a4,0x0 800: 0aa73623 sd a0,172(a4) # 8a8 <freep> return (void*)(p + 1); 804: 01078513 addi a0,a5,16 if((p = morecore(nunits)) == 0) return 0; } } 808: 70e2 ld ra,56(sp) 80a: 7442 ld s0,48(sp) 80c: 74a2 ld s1,40(sp) 80e: 7902 ld s2,32(sp) 810: 69e2 ld s3,24(sp) 812: 6a42 ld s4,16(sp) 814: 6aa2 ld s5,8(sp) 816: 6b02 ld s6,0(sp) 818: 6121 addi sp,sp,64 81a: 8082 ret prevp->s.ptr = p->s.ptr; 81c: 6398 ld a4,0(a5) 81e: e118 sd a4,0(a0) 820: bff1 j 7fc <malloc+0x86> hp->s.size = nu; 822: 01652423 sw s6,8(a0) free((void*)(hp + 1)); 826: 0541 addi a0,a0,16 828: 00000097 auipc ra,0x0 82c: ec6080e7 jalr -314(ra) # 6ee <free> return freep; 830: 00093503 ld a0,0(s2) if((p = morecore(nunits)) == 0) 834: d971 beqz a0,808 <malloc+0x92> for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ 836: 611c ld a5,0(a0) if(p->s.size >= nunits){ 838: 4798 lw a4,8(a5) 83a: fa9776e3 bgeu a4,s1,7e6 <malloc+0x70> if(p == freep) 83e: 00093703 ld a4,0(s2) 842: 853e mv a0,a5 844: fef719e3 bne a4,a5,836 <malloc+0xc0> p = sbrk(nu * sizeof(Header)); 848: 8552 mv a0,s4 84a: 00000097 auipc ra,0x0 84e: b66080e7 jalr -1178(ra) # 3b0 <sbrk> if(p == (char*)-1) 852: fd5518e3 bne a0,s5,822 <malloc+0xac> return 0; 856: 4501 li a0,0 858: bf45 j 808 <malloc+0x92>
29.601707
64
0.461485
6c97951a5ae953f3b579ff59599dac1a4999b917
85
asm
Assembly
libsrc/math/mbf32/c/asm/___mbf32_POW.asm
Frodevan/z88dk
f27af9fe840ff995c63c80a73673ba7ee33fffac
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/math/mbf32/c/asm/___mbf32_POW.asm
Frodevan/z88dk
f27af9fe840ff995c63c80a73673ba7ee33fffac
[ "ClArtistic" ]
1,600
2017-01-15T16:12:02.000Z
2022-03-31T12:11:12.000Z
libsrc/math/mbf32/c/asm/___mbf32_POW.asm
Frodevan/z88dk
f27af9fe840ff995c63c80a73673ba7ee33fffac
[ "ClArtistic" ]
215
2017-01-17T10:43:03.000Z
2022-03-23T17:25:02.000Z
SECTION code_fp_mbf32 PUBLIC ___mbf32_POW EXTERN POWER defc ___mbf32_POW = POWER + 2
17
29
0.835294
f05599f9ab566391778566bf387fcf4a5b060719
515
asm
Assembly
programs/oeis/186/A186348.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/186/A186348.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/186/A186348.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A186348: Adjusted joint rank sequence of (f(i)) and (g(j)) with f(i) after g(j) when f(i)=g(j), where f(i)=8i and g(j)=j^2. Complement of A186349. ; 3,6,7,9,11,12,14,16,17,18,20,21,23,24,25,27,28,30,31,32,33,35,36,37,39,40,41,42,44,45,46,48,49,50,51,52,54,55,56,57,59,60,61,62,63,65,66,67,68,70,71,72,73,74,75,77,78,79,80,81,83,84,85,86,87,88 mov $3,$0 mul $0,2 add $0,1 mul $0,2 add $0,2 mul $0,2 lpb $0,1 sub $0,1 add $2,1 sub $0,$2 trn $0,$2 lpe mov $1,$2 lpb $3,1 add $1,1 sub $3,1 lpe add $1,1
23.409091
195
0.603883
7d5685ef1061ea1f59f6a22c40753dc3097be2fd
739
asm
Assembly
library/02_functions_batch1/GetInfoByte.asm
SamantazFox/dds140-reverse-engineering
4c8c286ffc20f2ee07061c83b0a0a68204d90148
[ "Unlicense" ]
1
2021-06-05T23:41:15.000Z
2021-06-05T23:41:15.000Z
library/02_functions_batch1/GetInfoByte.asm
SamantazFox/dds140-reverse-engineering
4c8c286ffc20f2ee07061c83b0a0a68204d90148
[ "Unlicense" ]
null
null
null
library/02_functions_batch1/GetInfoByte.asm
SamantazFox/dds140-reverse-engineering
4c8c286ffc20f2ee07061c83b0a0a68204d90148
[ "Unlicense" ]
null
null
null
10001190: 8b 44 24 04 mov eax,DWORD PTR [esp+0x4] 10001194: 83 e8 00 sub eax,0x0 10001197: 74 1f je 0x100011b8 10001199: 83 e8 01 sub eax,0x1 1000119c: 74 12 je 0x100011b0 1000119e: 83 e8 01 sub eax,0x1 100011a1: 74 05 je 0x100011a8 100011a3: 32 c0 xor al,al 100011a5: c2 04 00 ret 0x4 100011a8: a0 82 60 01 10 mov al,ds:0x10016082 100011ad: c2 04 00 ret 0x4 100011b0: a0 80 60 01 10 mov al,ds:0x10016080 100011b5: c2 04 00 ret 0x4 100011b8: a0 8c 60 01 10 mov al,ds:0x1001608c 100011bd: c2 04 00 ret 0x4
46.1875
62
0.515562
742dc007f58ced750f37dcc1fedbf120b2e403d6
1,517
asm
Assembly
games/Donkey Konga 3/Main.asm
BttrDrgn/GC-Translation
4d9feab9523bc49c5b23542e28565bc50c1152c7
[ "Unlicense" ]
1
2022-03-27T09:03:45.000Z
2022-03-27T09:03:45.000Z
games/Donkey Konga 3/Main.asm
BttrDrgn/GC-Translation
4d9feab9523bc49c5b23542e28565bc50c1152c7
[ "Unlicense" ]
null
null
null
games/Donkey Konga 3/Main.asm
BttrDrgn/GC-Translation
4d9feab9523bc49c5b23542e28565bc50c1152c7
[ "Unlicense" ]
null
null
null
// GameCube "Donkey Konga 3" Japanese To English Translation endian msb // GameCube PPC requires Big-Endian Encoding (Most Significant Bit) output "../../output/Donkey Konga 3 [U].iso", create origin $000000; insert "../../isos/Donkey Konga 3 [J].iso" // Include Japanese Kururin Squash! ISO macro Text(OFFSET, TEXT) { map 0, 0, 256 // Map Default ASCII Chars origin {OFFSET} db {TEXT} // ASCII Text To Print } macro TextShiftJIS(OFFSET, TEXT) { // Map Shift-JIS Words map ' ', $8140 map $2C, $8143 // Comma "," map '.', $8144 map ':', $8146 map '?', $8148 map '!', $8149 map '~', $8160 map '\s', $8166 // Single Quote "'" map '\d', $8168 // Double Quote '"' map '+', $817B map '&', $8195 map '0', $824F, 10 // Map Numbers map 'A', $8260, 26 // Map English "Upper Case" Characters map 'a', $8281, 26 // Map English "Lower Case" Characters origin {OFFSET} dw {TEXT} // Shift-JIS Text To Print } //Not a real assert, just prints the error message in console and doesn't compile further macro Assert(MESSAGE) { "{MESSAGE}\n" } macro ReplaceAsset(ORIGIN, FILE, SIZE) { if !file.exists({FILE}) { print "{FILE} doesn't exist!" } else if file.exists({FILE}) { if (file.size({FILE}) > {SIZE} && {SIZE} != -1) { Assert("File {FILE} is bigger than Size {SIZE}") } else if (file.size({FILE}) <= {SIZE}) { origin {ORIGIN} insert {FILE} fill {SIZE} - file.size({FILE}) } } } //Region Text($3, "E") include "Resource.asm"
26.155172
98
0.603823
1c9d8e229ed151665d5ca899ca4ce72ad21ad2a5
2,022
asm
Assembly
Library/Kernel/Graphics/graphicsPatternHatch.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
504
2018-11-18T03:35:53.000Z
2022-03-29T01:02:51.000Z
Library/Kernel/Graphics/graphicsPatternHatch.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
96
2018-11-19T21:06:50.000Z
2022-03-06T10:26:48.000Z
Library/Kernel/Graphics/graphicsPatternHatch.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
73
2018-11-19T20:46:53.000Z
2022-03-29T00:59:26.000Z
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright (c) GeoWorks 1992 -- All Rights Reserved PROJECT: PC GEOS MODULE: Kernel/Graphics FILE: graphicsPatternHatch.asm AUTHOR: Don Reeves, Mar 19, 1992 REVISION HISTORY: Name Date Description ---- ---- ----------- Don 3/19/92 Initial revision DESCRIPTION: Contains the definitions of the system hatch patterns. $Id: graphicsPatternHatch.asm,v 1.1 97/04/05 01:13:12 newdeal Exp $ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ SystemBitmapsAndHatches segment lmem LMEM_TYPE_GENERAL, mask LMF_IN_RESOURCE StartPatterns <(SystemBitmap + SystemHatch)> ;--- Bitmaps --- ;--- Hatches --- DefPattern HatchVertical MakeHatch HatchVertical, 1, TRUE MakeHatchLine <0.0>,<0.0>, <0.0>,<4.0>, <90.0>, \ <0,CF_SAME,0,0>, 0 EndHatch HatchVertical DefPattern HatchHorizontal MakeHatch HatchHorizontal, 1, TRUE MakeHatchLine <0.0>,<0.0>, <0.0>,<4.0>, <0.0>, \ <0,CF_SAME,0,0>, 0 EndHatch HatchHorizontal DefPattern Hatch45Degree MakeHatch Hatch45Degree, 1, TRUE MakeHatchLine <0.0>,<0.0>, <0.0>,<4.0>, <45.0>, \ <0,CF_SAME,0,0>, 0 EndHatch Hatch45Degree DefPattern Hatch135Degree MakeHatch Hatch135Degree, 1, TRUE MakeHatchLine <0.0>,<0.0>, <0.0>,<4.0>, <135.0>, \ <0,CF_SAME,0,0>, 0 EndHatch Hatch135Degree DefPattern HatchBrick MakeHatch HatchBrick, 2, TRUE MakeHatchLine <0.0>,<0.0>, <0.0>,<4.0>, <0.0>, \ <0,CF_SAME,0,0>, 0 MakeHatchLine <0.0>,<0.0>, <4.0>,<4.0>, <90.0>, \ <0,CF_SAME,0,0>, 1 MakeHatchDash <4.0>, <4.0> EndHatch HatchBrick DefPattern HatchBrickSlanted MakeHatch HatchBrickSlanted, 2, TRUE MakeHatchLine <0.0>,<0.0>, <0.0>,<4.0>, <45.0>, \ <0,CF_SAME,0,0>, 0 MakeHatchLine <0.0>,<0.0>, <4.0>,<4.0>, <135.0>, \ <0,CF_SAME,0,0>, 1 MakeHatchDash <4.0>, <4.0> EndHatch HatchBrickSlanted EndPatterns SystemBitmapsAndHatches ends
24.658537
79
0.59545
f4944a3f394a461fe8e0ed87e4456ad737726b07
2,621
asm
Assembly
libsrc/_DEVELOPMENT/stdio/z80/input_helpers/__stdio_recv_input_raw_eatc.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
libsrc/_DEVELOPMENT/stdio/z80/input_helpers/__stdio_recv_input_raw_eatc.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
libsrc/_DEVELOPMENT/stdio/z80/input_helpers/__stdio_recv_input_raw_eatc.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
SECTION code_stdio PUBLIC __stdio_recv_input_raw_eatc EXTERN STDIO_MSG_EATC EXTERN l_jpix, l_jphl ; ALL HIGH LEVEL STDIO INPUT PASSES THROUGH __STDIO_RECV_INPUT_RAW_* ; EXCEPT FOR VFSCANF. THIS ENSURES STREAM STATE IS CORRECTLY MAINTAINED __stdio_recv_input_raw_eatc: ; Driver consumes chars from the stream, as qualified by ignore() ; ; enter : ix = FILE * ; hl'= int (*qualify)(char c) ; bc'= reserved ; de'= reserved ; hl = max_length = max number of stream chars to consume ; ; exit : ix = FILE * ; hl'= unchanged ; bc'= unchanged ; de'= unchanged ; bc = number of chars consumed from stream in this operation ; a = next unconsumed char (if error: 0 on stream error, -1 on eof) ; ; carry set on error or eof, stream state set appropriately bit 3,(ix+3) jr nz, immediate_stream_error bit 4,(ix+3) jr nz, immediate_eof_error bit 0,(ix+4) jr z, _no_ungetc_ec ; if no unget char available ; examine unget char ld a,h or l jr z, _ungetc_rejected_ec ; if max_length is zero only provide peek ld a,(ix+6) ; a = unget char exx call l_jphl ; qualify(a) exx jr c, _ungetc_rejected_ec res 0,(ix+4) ; consume the unget char dec hl ; max_length-- call _no_ungetc_ec _post_ungetc: inc bc ; num chars consumed in this operation++ ret _ungetc_rejected_ec: ld a,(ix+6) ; a = rejected unget char ld bc,0 ; no chars consumed in this operation or a ; indicate no error ret _no_ungetc_ec: ld a,STDIO_MSG_EATC call l_jpix ld a,l jr c, error_occurred bit 5,(ix+3) ret nz ; if driver manages ungetc ld (ix+6),a ; write unconsumed char to ungetc spot set 0,(ix+4) ; indicate ungetc is present ret error_occurred: ; stream error or eof ? or a jr z, stream_error ; eof is only an error if no chars were read set 4,(ix+3) ; set stream state to eof ld a,b or c ld a,$ff ret nz ; if at least one char was read, indicate no error scf ret stream_error: set 3,(ix+3) ; set stream state to error scf ret immediate_stream_error: xor a jr error_exit immediate_eof_error: ld a,$ff error_exit: ld bc,0 scf ret
20.007634
81
0.562762
677788ab1075ce970cc72bfbec43e591cd08c037
1,278
asm
Assembly
programs/oeis/306/A306672.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/306/A306672.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/306/A306672.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A306672: Partial sums of the even Lucas numbers (A014448). ; 2,6,24,100,422,1786,7564,32040,135722,574926,2435424,10316620,43701902,185124226,784198804,3321919440,14071876562,59609425686,252509579304,1069647742900,4531100550902,19194049946506,81307300336924,344423251294200,1459000305513722,6180424473349086,26180698198910064,110903217268989340,469793567274867422,1990077486368459026,8430103512748703524,35710491537363273120,151272069662201796002,640798770186170457126,2714467150406883624504,11498667371813704955140,48709136637661703445062,206335213922460518735386,874049992327503778386604,3702535183232475632281800,15684190725257406307513802,66439298084262100862337006,281441383062305809756861824,1192204830333485339889784300,5050260704396247169315999022,21393247647918474017153780386,90623251296070143237931120564,383886252832199046968878262640,1626168262624866331113444171122,6888559303331664371422654947126,29180405475951523816804063959624,123610181207137759638638910785620,523621130304502562371359707102102,2218094702425148009124077739194026,9395999940005094598867670663878204,39802094462445526404594760394706840,168604377789787200217246712242705562,714219605621594327273581609365529086 seq $0,163063 ; Lucas(3n+2) = Fibonacci(3n+1) + Fibonacci(3n+3). div $0,2 add $0,1
182.571429
1,132
0.916275
d834db25677e03d4a8a50aa54d671a4fa97aa6a5
3,266
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2.log_771_1558.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2.log_771_1558.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2.log_771_1558.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 %r12 push %r13 push %r15 push %r9 push %rax push %rdx push %rsi // Store lea addresses_PSE+0x8649, %r12 nop nop add $64236, %rsi movl $0x51525354, (%r12) nop nop nop nop xor $56393, %r9 // Faulty Load lea addresses_D+0x8099, %rdx nop nop nop nop nop inc %r15 mov (%rdx), %r12 lea oracles, %r9 and $0xff, %r12 shlq $12, %r12 mov (%r9,%r12,1), %r12 pop %rsi pop %rdx pop %rax pop %r9 pop %r15 pop %r13 pop %r12 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_D', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_PSE', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 4, 'same': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_D', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} <gen_prepare_buffer> {'36': 771} 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 */
54.433333
2,312
0.660441
9bd43a8dc1f360fd62033ff78250e6657cfd168a
3,903
asm
Assembly
lab6/testbench.asm
huijjj/Architecture
16fbef3bdf93569b5e1a84ee097697c974477ee5
[ "BSD-3-Clause-Attribution" ]
8
2021-08-20T08:53:33.000Z
2022-01-11T08:09:32.000Z
lab7/testbench.asm
huijjj/Architecture
16fbef3bdf93569b5e1a84ee097697c974477ee5
[ "BSD-3-Clause-Attribution" ]
null
null
null
lab7/testbench.asm
huijjj/Architecture
16fbef3bdf93569b5e1a84ee097697c974477ee5
[ "BSD-3-Clause-Attribution" ]
2
2021-08-20T08:56:31.000Z
2022-01-11T11:27:45.000Z
.ORG 0 JMP ENTRY VAR1 .BSC 0x0001 VAR2 .BSC 0xFFFF STACK .BSS 32 ENTRY: LHI $0, 0 WWD $0 ; TEST #1-1 : LHI (= 0x0000) LHI $1, 0 WWD $1 ; TEST #1-2 : LHI (= 0x0000) LHI $2, 0 WWD $2 ; TEST #1-3 : LHI (= 0x0000) LHI $3, 0 WWD $3 ; TEST #1-4 : LHI (= 0x0000) ADI $0, $1, 1 WWD $0 ; TEST #2-1 : ADI (= 0x0001) ADI $0, $0, 1 WWD $0 ; TEST #2-2 : ADI (= 0x0002) ORI $1, $2, 1 WWD $1 ; TEST #3-1 : ORI (= 0x0001) ORI $1, $1, 2 WWD $1 ; TEST #3-2 : ORI (= 0x0003) ORI $1, $1, 3 WWD $1 ; TEST #3-3 : ORI (= 0x0003) ADD $3, $0, $2 WWD $3 ; TEST #4-1 : ADD (= 0x0002) ADD $3, $1, $2 WWD $3 ; TEST #4-2 : ADD (= 0x0003) ADD $3, $0, $1 WWD $3 ; TEST #4-3 : ADD (= 0x0005) SUB $3, $0, $2 WWD $3 ; TEST #5-1 : SUB (= 0x0002) SUB $3, $2, $0 WWD $3 ; TEST #5-2 : SUB (= 0xFFFE) SUB $3, $1, $2 WWD $3 ; TEST #5-3 : SUB (= 0x0003) SUB $3, $2, $1 WWD $3 ; TEST #5-4 : SUB (= 0xFFFD) SUB $3, $0, $1 WWD $3 ; TEST #5-5 : SUB (= 0xFFFF) SUB $3, $1, $0 WWD $3 ; TEST #5-6 : SUB (= 0x0001) AND $3, $0, $2 WWD $3 ; TEST #6-1 : AND (= 0x0000) AND $3, $1, $2 WWD $3 ; TEST #6-2 : AND (= 0x0000) AND $3, $0, $1 WWD $3 ; TEST #6-3 : AND (= 0x0002) ORR $3, $0, $2 WWD $3 ; TEST #7-1 : ORR (= 0x0002) ORR $3, $1, $2 WWD $3 ; TEST #7-2 : ORR (= 0x0003) ORR $3, $0, $1 WWD $3 ; TEST #7-3 : ORR (= 0x0003) NOT $3, $0 WWD $3 ; TEST #8-1 : NOT (= 0xFFFD) NOT $3, $1 WWD $3 ; TEST #8-2 : NOT (= 0xFFFC) NOT $3, $2 WWD $3 ; TEST #8-3 : NOT (= 0xFFFF) TCP $3, $0 WWD $3 ; TEST #9-1 : TCP (= 0xFFFE) TCP $3, $1 WWD $3 ; TEST #9-2 : TCP (= 0xFFFD) TCP $3, $2 WWD $3 ; TEST #9-3 : TCP (= 0x0000) SHL $3, $0 WWD $3 ; TEST #10-1 : SHL (= 0x0004) SHL $3, $1 WWD $3 ; TEST #10-2 : SHL (= 0x0006) SHL $3, $2 WWD $3 ; TEST #10-3 : SHL (= 0x0000) SHR $3, $0 WWD $3 ; TEST #11-1 : SHR (= 0x0001) SHR $3, $1 WWD $3 ; TEST #11-2 : SHR (= 0x0001) SHR $3, $2 WWD $3 ; TEST #11-3 : SHR (= 0x0000) LWD $0, $2, VAR1 WWD $0 ; TEST #12-1 : LWD (= 0x0001) LWD $1, $2, VAR2 WWD $1 ; TEST #12-2 : LWD (= 0xFFFF) SWD $1, $2, VAR1 SWD $0, $2, VAR2 LWD $0, $2, VAR1 WWD $0 ; TEST #13-1 : WWD (= 0xFFFF) LWD $1, $2, VAR2 WWD $1 ; TEST #13-2 : WWD (= 0x0001) JMP JMP0 JMP0: WWD $0 ; TEST #14-1 : JMP (= 0xFFFF) JMP JMP1 HLT JMP1: WWD $1 ; TEST #14-2 : JMP (= 0x0001) BNE $2, $3, BNE1 JMP BNE2 BNE1: HLT BNE2: WWD $0 ; TEST #15-1 : BNE (= 0xFFFF) BNE $1, $2, BNE3 HLT BNE3: WWD $1 ; TEST #15-2 : BNE (= 0x0001) BEQ $1, $2, BEQ1 JMP BEQ2 BEQ1: HLT BEQ2: WWD $0 ; TEST #16-1 : BEQ (= 0xFFFF) BEQ $2, $3, BEQ3 HLT BEQ3: WWD $1 ; TEST #16-2 : BEQ (= 0x0001) BGZ $0, BGZ1 JMP BGZ2 BGZ1: HLT BGZ2: WWD $0 ; TEST #17-1 : BGZ (= 0xFFFF) BGZ $1, BGZ3 HLT BGZ3: WWD $1 ; TEST #17-2 : BGZ (= 0x0001) BGZ $2, BGZ4 JMP BGZ5 BGZ4: HLT BGZ5: WWD $0 ; TEST #17-3 : BGZ (= 0xFFFF) BLZ $0, BLZ1 HLT BLZ1: WWD $1 ; TEST #18-1 : BLZ (= 0x0001) BLZ $1, BLZ2 JMP BLZ3 BLZ2: HLT BLZ3: WWD $0 ; TEST #18-2 : BLZ (= 0xFFFF) BLZ $2, BLZ4 JMP BLZ5 BLZ4: HLT BLZ5: WWD $1 ; TEST #18-3 : BLZ (= 0x0001) JAL SIMPLE1 WWD $0 ; TEST #19-1 : JAL & JPR (= 0xFFFF) JAL SIMPLE2 HLT WWD $1 ; TEST #19-2 : JAL & JPR (= 0x0001) LHI $3, 0 ORI $3, $3, STACK LHI $0, 0 ADI $0, $0, 5 JAL FIB WWD $0 ; TEST #19-3 : JAL & JPR (= 0x0008) JMP PREFIB1 PREFIB2: ADI $1, $2, 0 JRL $1 WWD $0 ; TEST #20 : JAL & JRL & JPR (= 0x0022) HLT ; FINISHED SIMPLE2: ADI $2, $2, 1 SIMPLE1: JPR $2 HLT PREFIB1: JAL PREFIB2 FIB: ADI $1, $0, -1 BGZ $1, FIBRECUR LHI $0, 0 ORI $0, $0, 1 JPR $2 HLT FIBRECUR: SWD $2, $3, 0 SWD $0, $3, 1 ADI $3, $3, 2 ADI $0, $0, -2 JAL FIB LWD $1, $3, -1 SWD $0, $3, -1 ADI $0, $1, -1 JAL FIB LWD $1, $3, -1 LWD $2, $3, -2 ADD $0, $0, $1 ADI $3, $3, -2 JPR $2 HLT .END
19.226601
48
0.493979
24e972ceb22dba8f33e9fc30eb153a716b698590
603
asm
Assembly
data/pokemon/base_stats/grimer.asm
opiter09/ASM-Machina
75d8e457b3e82cc7a99b8e70ada643ab02863ada
[ "CC0-1.0" ]
1
2022-02-15T00:19:44.000Z
2022-02-15T00:19:44.000Z
data/pokemon/base_stats/grimer.asm
opiter09/ASM-Machina
75d8e457b3e82cc7a99b8e70ada643ab02863ada
[ "CC0-1.0" ]
null
null
null
data/pokemon/base_stats/grimer.asm
opiter09/ASM-Machina
75d8e457b3e82cc7a99b8e70ada643ab02863ada
[ "CC0-1.0" ]
null
null
null
db DEX_GRIMER ; pokedex id db 80, 80, 50, 25, 40 ; hp atk def spd spc db POISON, POISON ; type db 190 ; catch rate db 90 ; base exp INCBIN "gfx/pokemon/front/grimer.pic", 0, 1 ; sprite dimensions dw GrimerPicFront, GrimerPicBack db POUND, DISABLE, NO_MOVE, NO_MOVE ; level 1 learnset db GROWTH_MEDIUM_FAST ; growth rate ; tm/hm learnset tmhm TOXIC, BODY_SLAM, RAGE, MEGA_DRAIN, THUNDERBOLT, \ THUNDER, MIMIC, DOUBLE_TEAM, BIDE, SELFDESTRUCT, \ FIRE_BLAST, REST, EXPLOSION, SUBSTITUTE ; end db 0 ; padding
26.217391
77
0.628524
8072f6ddc8afb4a7944814b73333e92d50ff881a
360
asm
Assembly
programs/oeis/054/A054127.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/054/A054127.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/054/A054127.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A054127: a(1) = 2; a(n) = 9*2^(n-2) - n - 2, n>1. ; 2,5,13,30,65,136,279,566,1141,2292,4595,9202,18417,36848,73711,147438,294893,589804,1179627,2359274,4718569,9437160,18874343,37748710,75497445,150994916,301989859,603979746,1207959521 mov $1,2 mov $3,1 mov $4,$0 add $4,2 lpb $0,1 mov $2,$0 sub $0,1 add $3,$4 add $1,$3 sub $1,$2 mov $3,$1 lpe
22.5
185
0.647222
4f990ec602116481f1ab1aada886a09374f28d55
735
asm
Assembly
attempts/0/doc/external/tcc/start32.asm
howerj/os
db5dc57a1202822780e07c32dbabbec27849a7da
[ "MIT" ]
7
2017-06-20T15:41:20.000Z
2021-09-02T19:52:29.000Z
attempts/0/doc/external/tcc/start32.asm
howerj/os
db5dc57a1202822780e07c32dbabbec27849a7da
[ "MIT" ]
null
null
null
attempts/0/doc/external/tcc/start32.asm
howerj/os
db5dc57a1202822780e07c32dbabbec27849a7da
[ "MIT" ]
1
2020-09-11T22:58:50.000Z
2020-09-11T22:58:50.000Z
; Tutorial: A small kernel with Fasm & TCC ; By Tommy. format elf use32 ; ; Equates ; MULTIBOOT_PAGE_ALIGN equ (1 shl 0) MULTIBOOT_MEMORY_INFO equ (1 shl 1) MULTIBOOT_AOUT_KLUDGE equ (1 shl 16) MULTIBOOT_HEADER_MAGIC equ 0x1BADB002 MULTIBOOT_HEADER_FLAGS equ MULTIBOOT_PAGE_ALIGN or MULTIBOOT_MEMORY_INFO MULTIBOOT_CHECKSUM equ -(MULTIBOOT_HEADER_MAGIC + MULTIBOOT_HEADER_FLAGS) section '.text' executable ; ; Multiboot header ; dd MULTIBOOT_HEADER_MAGIC dd MULTIBOOT_HEADER_FLAGS dd MULTIBOOT_CHECKSUM ; ; Kernel entry point. ; public _start extrn kmain _start: ; Call the main kernel function. call kmain @@: jmp @b
19.864865
82
0.680272
f53d4a81be13b52d93df9bea93e16a70a3ce2517
3,202
asm
Assembly
src/asm/bclogin.asm
Rojuinex/bclogin3.2
9937f7c529c5635cd3aa9ce9482aed0be671c589
[ "MIT" ]
null
null
null
src/asm/bclogin.asm
Rojuinex/bclogin3.2
9937f7c529c5635cd3aa9ce9482aed0be671c589
[ "MIT" ]
null
null
null
src/asm/bclogin.asm
Rojuinex/bclogin3.2
9937f7c529c5635cd3aa9ce9482aed0be671c589
[ "MIT" ]
null
null
null
define BCALL xxxx rst 28h \ .dw xxxx CALL init CALL main CALL cleanUp RET bclUsr: db 15h,"BCLogUsr",0h,0h usrPropt: db "NewUsr:",0h,0h,0h,0h pwdPrompt: db "NewPwd:",0h,0h,0h,0h usrStr: db "Username:",0h,0h pwdStr: db "Password:",0h,0h logo: db 09h,08h,FFh,EDh,93h,F1h,93h,EDh,42h,24h,18h name: db "Login3.2",0h copyright: db 08h,08h,00h,3Eh,41h,5Dh,51h,5Dh,41h,3Eh initCont: BCALL _RunIndcOff RES donePrgm,(IY+doneFlags) LD DE, 3700h LD HL, logo BCALL _DisplayImage LD HL, 3709h LD (penCol), HL LD HL, name BCALL _VPustS LD DE, 3624h LD HL, copyright BCALL _DisplayImage RET quickCheck: BCALL _Mov9ToOp1 BCALL _ChkFindSym RET getString: LD HL, saveSScreen + 1 LD B, 0 NOP NOP CALL getKey NOP NOP CP 5h JR Z, Ah LD (HL), A INC B LD A, 0 BCALL _PutC JR -15h LD A, B LD (saveSScreen), A RET compareString: LD A, (DE) CP (HL) JR NZ, Ch LD B, A INC HL INC DE LD A, (DE) CP (HL) JR NZ, 5h DJNZ -8h LD A, 1h RET LD A, 0 RET moveString: LD A, (DE) INC A LD B, A LD A, (DE) LD (HL), A INC HL INC DE DJNZ -6h RET shutDown: CALL cleanUp BCALL _PowerOff cleanUp: BCALL _ClrScrnFull BCALL _HomeUp LD HL, bclUsr CALL quickCheck RET C LD A, B OR A RET NZ BCALL _Archive RET main: LD HL, bclUsr CALL quickCheck JR C, 4h CALL login RET newUser: LD HL, usrPropt BCALL _PutS CALL getString LD HL, appBackUpScreen LD DE, saveSScreen CALL moveString PUSH HL BCALL _newline LD HL, pwdPrompt BCALL _PutS CALL getString POP HL LD DE, saveSScreen CALL moveString registerUser: LD HL, appBackUpScreen LD A, (appBackUpScreen) INC A LD B, 0 LD C, A ADD HL, BC LD A, (HL) INC A ADD A, C LD L, A LD H, 0 PUSH HL LD HL, bclUsr BCALL _Mov9ToOP1 POP HL BCALL _CreateAppVar INC DE INC DE LD HL, appBackUpScreen EX DE, HL CALL moveString CALL moveString RET login: LD HL, usrStr BCALL _PutS CALL _newline LD HL, appBackUpScreen LD DE, saveSScreen CALL moveString PUSH HL BCALL _newline LD HL, pwdStr BCALL _PutS CALL getString POP HL LD DE, saveSScreen CALL moveString LD HL, bclUsr CALL quickCheck JP C, newUser LD A, B OR A JR Z, 9h BCALL _Unarchive LD HL, bclUsr CALL quickCheck checkLogin: LD HL, appBackUpScreen INC DE INC DE CALL compareString OR A JP Z, shutDown INC HL INC DE CALL compareString OR A JP Z, shutDown RET getKey: PUSH HL PUSH BC BCALL _getkey RES onInterrupt, (IY+onFlags) CP 0h JR Z, -Bh POP BC POP HL PUSH AF LD A, 10h CP B JR NC, 4h POP AF LD A, 5h RET POP AF CP 9h RET NZ PUSH AF LD A, B OR A JR NZ, 4h POP AF JP getKey POP AF DEC B DEC HL PUSH AF PUSH HL PUSH BC LD HL, curCol DEC (HL) LD A, 20h BCALL _PutMap POP BC POP HL POP AF JP getKey init: BCALL _ClrScrnFull BCALL _HomeUp SET lwrCaseActive, (IY+appLwrCaseFlag) CALL initCont RET
13.683761
57
0.611805
4e7dd028b1b56b8192f3e2317de59f5d0d805e71
46
asm
Assembly
test/vxcall-chr.asm
kspalaiologos/asmbf
c98a51d61724a46855de291a27d68a49a034810b
[ "MIT" ]
67
2020-08-03T06:26:35.000Z
2022-03-24T19:50:51.000Z
test/vxcall-chr.asm
pyautogui/asmbf
37c54a8a62df2fc4bab28bdeb43237b4905cbecd
[ "MIT" ]
55
2019-10-02T19:37:08.000Z
2020-06-12T19:40:53.000Z
test/vxcall-chr.asm
pyautogui/asmbf
37c54a8a62df2fc4bab28bdeb43237b4905cbecd
[ "MIT" ]
9
2019-05-18T11:59:41.000Z
2020-06-21T20:40:25.000Z
vxcall sto .A, 5 rcl r1, .A add r1, .0 out r1
9.2
16
0.608696
698e37d99f5b81bbf40a48d4602de6daf180446b
625
asm
Assembly
oeis/234/A234568.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/234/A234568.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/234/A234568.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A234568: Sum_{k=0..n} (n-k)^(2*k). ; Submitted by Jon Maiga ; 1,1,2,6,27,163,1268,12344,145653,2036149,33192790,622384730,13263528351,318121600695,8517247764136,252725694989612,8258153081400857,295515712276222953,11523986940937975402,487562536078882116718,22291094729329088403299,1097336766599161926448779,57974047902385765034753820,3277275864362895811941063904,197690320046488637821312439165,12692667669775659892681783311581,865369804721180163760591706427966,62516215889091934842166591892770882,4775874530144001737089736611966426471 lpb $0 sub $0,1 add $2,2 mov $3,$0 pow $3,$2 add $1,$3 lpe mov $0,$1 add $0,1
44.642857
473
0.8352
24dc8a26572e63400b877315cba9a8263543779b
721
asm
Assembly
cards/bn4/ModCards/134-E011 B+Left NrthWind (0D).asm
RockmanEXEZone/MMBN-Mod-Card-Kit
d591ddca5566dbb323dc19c11e69410fa4073d1b
[ "Unlicense" ]
10
2017-12-05T14:25:38.000Z
2022-02-21T04:28:00.000Z
cards/bn4/ModCards/134-E011 B+Left NrthWind (0D).asm
RockmanEXEZone/MMBN-Mod-Card-Kit
d591ddca5566dbb323dc19c11e69410fa4073d1b
[ "Unlicense" ]
null
null
null
cards/bn4/ModCards/134-E011 B+Left NrthWind (0D).asm
RockmanEXEZone/MMBN-Mod-Card-Kit
d591ddca5566dbb323dc19c11e69410fa4073d1b
[ "Unlicense" ]
null
null
null
.include "defaults_mod.asm" table_file_jp equ "exe4-utf8.tbl" table_file_en equ "bn4-utf8.tbl" game_code_len equ 3 game_code equ 0x4234574A // B4WJ game_code_2 equ 0x42345745 // B4WE game_code_3 equ 0x42345750 // B4WP card_type equ 1 card_id equ 71 card_no equ "071" card_sub equ "Mod Card 071" card_sub_x equ 64 card_desc_len equ 2 card_desc_1 equ "Address 0D" card_desc_2 equ "B+Left NrthWind" card_desc_3 equ "" card_name_jp_full equ "B+左でスーパーキタカゼ" card_name_jp_game equ "B+左でスーパーキタカゼ" card_name_en_full equ "B+Left NrthWind" card_name_en_game equ "B+Left NrthWind" card_address equ "0D" card_address_id equ 3 card_bug equ 0 card_wrote_en equ "B+Left NrthWind" card_wrote_jp equ "B+左でスーパーキタカゼ"
26.703704
39
0.778086
6648c7d3d944dcb8760615c0eb7083cdae6664bd
689
asm
Assembly
oeis/254/A254643.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/254/A254643.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/254/A254643.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A254643: Third partial sums of ninth powers (A001017). ; 1,515,21225,324275,2862790,17714466,85232910,339635850,1168343775,3571356685,9906622271,25333920885,60457751900,135939162100,290221510860,592024274916,1159935330765,2192313968775,4011847886725,7130537084615,12342661609026,20855490677750,34470176952250,55828527972750,88745241004875,138649819727601,213167861625915,322877822653225,482286848785400,711077940022440,1035690718525016,1491309556381960,2124345937995225,2995516856131275,4183637949461985,5790269174655771,7945372271507710,10814163341280650 lpb $0 mov $2,$0 sub $0,1 seq $2,253637 ; Second partial sums of ninth powers (A001017). add $1,$2 lpe add $1,1 mov $0,$1
57.416667
500
0.846154
fd70cc5ff2387309fa2963145ada9522acf8def6
4,869
asm
Assembly
audit/audit.asm
zellyn/a2audit
b5bb6fa18dfab8f3e96432d799f9e772f4a7824b
[ "MIT" ]
22
2016-11-13T04:56:49.000Z
2021-12-04T20:04:49.000Z
audit/audit.asm
cbeust/a2audit
5c377d6bd06294a4326a590caa5ffdb290068903
[ "MIT" ]
11
2017-02-24T20:48:59.000Z
2020-09-21T18:15:19.000Z
audit/audit.asm
cbeust/a2audit
5c377d6bd06294a4326a590caa5ffdb290068903
[ "MIT" ]
3
2017-02-24T17:43:39.000Z
2021-01-09T16:55:20.000Z
;;; Apple II audit routines ;;; Copyright © 2016 Zellyn Hunter <zellyn@gmail.com> !convtab <apple ii/convtab.bin> !to "audit.o", plain * = $6000 START = * ;; Major version number VER_MAJOR = 1 VER_MINOR = 6 ;; Zero-page locations. SCRATCH = $1 SCRATCH2 = $2 SCRATCH3 = $3 LCRESULT = $10 LCRESULT1 = $11 AUXRESULT = $12 SOFTSWITCHRESULT = $13 CSW = $36 KSW = $38 PCL=$3A PCH=$3B A1L=$3C A1H=$3D A2L=$3E A2H=$3F A3L=$40 A3H=$41 A4L=$42 A4H=$43 ;; SHASUM locations !addr SRC = $06 !addr DST = $08 !addr SHAINPUT = $eb !addr SHALENGTH = $ee !addr tmp0 = $f9 !addr tmp1 = $fa !addr tmp2 = $fb !addr tmp3 = $fc !addr tmp4 = $fd !addr tmp5 = $fe !addr tmp6 = $ff ;; Ports to read KBD = $C000 KBDSTRB = $C010 ;; Softswitch locations. RESET_80STORE = $C000 SET_80STORE = $C001 READ_80STORE = $C018 RESET_RAMRD = $C002 SET_RAMRD = $C003 READ_RAMRD = $C013 RESET_RAMWRT = $C004 SET_RAMWRT = $C005 READ_RAMWRT = $C014 RESET_INTCXROM = $C006 SET_INTCXROM = $C007 READ_INTCXROM = $C015 RESET_ALTZP = $C008 SET_ALTZP = $C009 READ_ALTZP = $C016 RESET_SLOTC3ROM = $C00A SET_SLOTC3ROM = $C00B READ_SLOTC3ROM = $C017 RESET_80COL = $C00C SET_80COL = $C00D READ_80COL = $C01F RESET_ALTCHRSET = $C00E SET_ALTCHRSET = $C00F READ_ALTCHRSET = $C01E RESET_TEXT = $C050 SET_TEXT = $C051 READ_TEXT = $C01A RESET_MIXED = $C052 SET_MIXED = $C053 READ_MIXED = $C01B RESET_PAGE2 = $C054 SET_PAGE2 = $C055 READ_PAGE2 = $C01C RESET_HIRES = $C056 SET_HIRES = $C057 READ_HIRES = $C01D RESET_AN3 = $C05E SET_AN3 = $C05F RESET_INTC8ROM = $CFFF ;; Readable things without corresponding set/reset pairs. READ_HRAM_BANK2 = $C011 READ_HRAMRD = $C012 READ_VBL = $C019 ;; Monitor locations. ;HOME = $FC58 ;COUT = $FDED ;COUT1 = $FDF0 ;KEYIN = $FD1B ;CROUT = $FD8E ;PRBYTE = $FDDA ;PRNTYX = $F940 AUXMOVE = $C311 ; Move from (A1L/H - A2L/H) to (A4L/H) Carry set: main->aux MOVE = $FE2C ; Move to (A4L/H) from (A1L/H) through (A2L,H) STRINGS = $8000 !set LASTSTRING = STRINGS ;; Printing and error macros. !src "macros.asm" main: ;; Initialize stack to the top. ldx #$ff txs jsr standard_fixup jsr RESET jsr HOME +print !text "APPLE II AUDIT " +printed lda #(VER_MAJOR+'0') jsr COUT lda #'.' jsr COUT lda #VER_MINOR jsr PRBYTE lda #$8D jsr COUT lda #$8D jsr COUT ;; Detection and reporting of model and memory. !src "detect.asm" !ifndef SKIP { ;; Language card tests. jsr LANGCARDTESTS ;; Auxiliary memory card tests. jsr AUXMEMTESTS ;; Tests of softswitch-reading jsr SOFTSWITCHTESTS ;; ROM SHA-1 checks. ;; jsr SHASUMTESTS - do this later, because it's SLOW! ;; Keyboard tests: for now, just check we can press 'Y', 'N', SPACE, or ESC jsr KEYBOARDTESTS } ; ifndef SKIP ;; Video tests. jsr VIDEOTESTS end: +print !text "END" +printed jsr RESETALL jmp * !src "langcard.asm" !src "auxmem.asm" !src "softswitch.asm" !src "resetall.asm" !src "monitor-routines.asm" !src "keyboard.asm" !src "video.asm" !src "printtest.asm" ;!src "shasumtests.asm" print lda $C081 lda $C081 pla sta getch+1 pla sta getch+2 - inc getch+1 bne getch inc getch+2 getch lda $FEED ; FEED gets modified beq + jsr COUT jmp - + rts ;;; Print a string of bytes, as hex. ;;; Address in SRC, count in A. ;;; Burns A,Y. prbytes: ldy #0 - pha lda (SRC),y jsr PRBYTE iny pla adc #$ff bne - rts errora pha lda $C082 lda #'A' jsr COUT lda #':' jsr COUT pla jsr PRBYTE jsr CROUT error lda $C082 pla sta getche+1 pla sta getche+2 - inc getche+1 bne getche inc getche+2 getche lda $FEED ; FEED gets modified beq + jsr COUT jmp - + +print !text "ZELLYN.COM/A2AUDIT/V0#E",0 +printed jsr PRNTYX lda #$8D jsr COUT rts !src "technote2.asm" ;!src "../shasum/shasum.asm" ;;; If we loaded via standard delivery, turn the motor off and fix up ;;; CSW and KSW (in case the user typed PR#6 or IN#6 to boot). standard_fixup: ;; TODO(zellyn): actually check for standard delivery. ;; Turn drive motor off - do this regardless, since it doesn't hurt. ldx $2B lda $C088,X ;; If we typed PR#6 or IN#6 or something similar, the low byte ;; of CSW or KSW will be 0. ;; Fixup CSW ;; Point COUT at COUT1 lda #<COUT1 sta CSW lda #>COUT1 sta CSW+1 ;; Fixup KSW lda #<KEYIN sta KSW lda #>KEYIN sta KSW+1 rts COPYTOAUX ;; Use our own versino of AUXMOVE routine to copy the whole program to AUX memory. jsr RESETALL lda #<START sta SRC lda #>START sta SRC+1 sta SET_RAMWRT ldy #0 - lda (SRC),y sta (SRC),y inc SRC bne + inc SRC+1 + lda SRC cmp #<(LASTSTRING) bne - lda SRC+1 cmp #>(LASTSTRING) bne - sta RESET_RAMWRT rts ; !if * != STRINGS { ; !error "Expected STRINGS to be ", * ; } !if * > STRINGS { !error "End of compilation passed STRINGS:", * }
15.263323
84
0.653522
ca9725390290760c043124a4f5be73729485c8d9
175
asm
Assembly
src/lib/malloc.asm
zys1310992814/BookOSv0.2
7dca0f968663a0e6de18dd9b3e533d1e0412674f
[ "BSD-2-Clause" ]
3
2019-02-24T11:05:46.000Z
2019-02-26T03:20:50.000Z
src/lib/malloc.asm
zys1310992814/BookOSv0.2
7dca0f968663a0e6de18dd9b3e533d1e0412674f
[ "BSD-2-Clause" ]
null
null
null
src/lib/malloc.asm
zys1310992814/BookOSv0.2
7dca0f968663a0e6de18dd9b3e533d1e0412674f
[ "BSD-2-Clause" ]
null
null
null
[bits 32] [section .text] INT_VECTOR_SYS_CALL equ 0x80 _NR_MALLOC EQU 1 global malloc malloc: mov eax, _NR_MALLOC mov ebx, [esp + 4] ;第一个参数 int INT_VECTOR_SYS_CALL ret
13.461538
28
0.748571
00f97d0d7f96f4042257fb82083b5d9f44399660
200
asm
Assembly
data/pokemon/dex_entries/wooper.asm
Dev727/ancientplatinum
8b212a1728cc32a95743e1538b9eaa0827d013a7
[ "blessing" ]
28
2019-11-08T07:19:00.000Z
2021-12-20T10:17:54.000Z
data/pokemon/dex_entries/wooper.asm
Dev727/ancientplatinum
8b212a1728cc32a95743e1538b9eaa0827d013a7
[ "blessing" ]
13
2020-01-11T17:00:40.000Z
2021-09-14T01:27:38.000Z
data/pokemon/dex_entries/wooper.asm
Dev727/ancientplatinum
8b212a1728cc32a95743e1538b9eaa0827d013a7
[ "blessing" ]
22
2020-05-28T17:31:38.000Z
2022-03-07T20:49:35.000Z
db "WATER FISH@" ; species name dw 104, 190 ; height, weight db "A mucous" next "membrane covers" next "its body. Touching" page "it barehanded will" next "cause a shooting" next "pain.@"
18.181818
32
0.67
68c77d547e7be7da496e4154cb0f48a14ef4fcf1
230
asm
Assembly
ESEMPI/16 PROGRAMMA SOMMA E TRABOCCAMENTO.asm
Porchetta/py-pdp8-tk
5eba6bb2cf72b97602bfa2239e7bf44c454794e0
[ "MIT" ]
8
2019-06-07T10:38:41.000Z
2022-03-24T13:05:12.000Z
ESEMPI/16 PROGRAMMA SOMMA E TRABOCCAMENTO.asm
Porchetta/py-pdp8-tk
5eba6bb2cf72b97602bfa2239e7bf44c454794e0
[ "MIT" ]
2
2015-07-14T12:22:33.000Z
2018-05-11T08:35:24.000Z
ESEMPI/16 PROGRAMMA SOMMA E TRABOCCAMENTO.asm
Porchetta/py-pdp8-tk
5eba6bb2cf72b97602bfa2239e7bf44c454794e0
[ "MIT" ]
9
2015-05-06T14:35:08.000Z
2021-03-23T14:27:21.000Z
ORG 100 / Somma (S) tra X e Y e calcolo del traboccamento (T) LDA X ADD Y STA S LDA X CIL CLA CIR ADD Y SPA HLT CLA CIR ADD S SNA HLT LDA T CMA STA T HLT X, HEX 7000 Y, HEX 1000 S, HEX 0 T, HEX 0 END
8.214286
63
0.595652
1aa35f37f75924a3116052b7b2ec2b8c2dd0940f
315
asm
Assembly
programs/oeis/061/A061821.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/061/A061821.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/061/A061821.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A061821: Multiples of 5 containing only digits 0,...,5. ; 0,5,10,15,20,25,30,35,40,45,50,55,100,105,110,115,120,125,130,135,140,145,150,155,200,205,210,215,220,225,230,235,240,245,250,255,300,305,310,315,320,325,330,335,340,345,350,355,400,405,410,415,420,425,430 mov $1,$0 div $1,12 mul $1,8 add $0,$1 mul $0,5
35
207
0.692063
8aafb063b35b3e1d68147ef0dbbf863e4188c656
814
asm
Assembly
programs/oeis/004/A004657.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/004/A004657.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/004/A004657.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A004657: Expansion of g.f.: (1+x^3)*(1+x^4)/((1-x)*(1-x^2)^2*(1-x^4)). ; 1,1,3,4,9,11,19,24,37,45,63,76,101,119,151,176,217,249,299,340,401,451,523,584,669,741,839,924,1037,1135,1263,1376,1521,1649,1811,1956,2137,2299,2499,2680,2901,3101,3343,3564,3829,4071,4359,4624,4937,5225,5563,5876,6241,6579,6971,7336,7757,8149,8599,9020,9501,9951,10463,10944,11489,12001,12579,13124,13737,14315,14963,15576,16261,16909,17631,18316,19077,19799,20599,21360,22201,23001,23883,24724,25649,26531,27499,28424,29437,30405,31463,32476,33581,34639,35791,36896,38097,39249,40499,41700 mov $2,$0 add $2,1 mov $4,$0 lpb $2 mov $0,$4 sub $2,1 sub $0,$2 mov $6,$0 div $0,2 sub $6,$0 mul $0,2 sub $0,$6 add $0,1 mov $3,2 sub $3,$0 sub $3,2 pow $3,2 add $3,1 mov $5,$3 div $5,2 add $1,$5 lpe mov $0,$1
30.148148
494
0.663391
0a3705f69ee3fd9575a0bc581f7e75561bf016b8
690
asm
Assembly
programs/oeis/000/A000338.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/000/A000338.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/000/A000338.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A000338: Expansion of (5-2x)(1-x^3)/(1-x)^4. ; 5,18,42,75,117,168,228,297,375,462,558,663,777,900,1032,1173,1323,1482,1650,1827,2013,2208,2412,2625,2847,3078,3318,3567,3825,4092,4368,4653,4947,5250,5562,5883,6213,6552,6900,7257,7623,7998,8382,8775,9177,9588,10008,10437,10875,11322,11778,12243,12717,13200,13692,14193,14703,15222,15750,16287,16833,17388,17952,18525,19107,19698,20298,20907,21525,22152,22788,23433,24087,24750,25422,26103,26793,27492,28200,28917,29643,30378,31122,31875,32637,33408,34188,34977,35775,36582,37398,38223,39057,39900,40752,41613,42483,43362,44250,45147 mul $0,2 mov $2,$0 add $2,3 lpb $2 trn $0,1 add $1,$0 add $0,6 sub $2,1 trn $2,1 lpe mov $0,$1
46
536
0.744928
85d76085c296fd3a2f8dbc19169a619e48093268
847
asm
Assembly
src/misc/fizzbuzz.asm
Pentium1080Ti/x86-assembly
4af3caf07e17bdd23e08b85f6666d67f63f610c2
[ "MIT" ]
null
null
null
src/misc/fizzbuzz.asm
Pentium1080Ti/x86-assembly
4af3caf07e17bdd23e08b85f6666d67f63f610c2
[ "MIT" ]
null
null
null
src/misc/fizzbuzz.asm
Pentium1080Ti/x86-assembly
4af3caf07e17bdd23e08b85f6666d67f63f610c2
[ "MIT" ]
null
null
null
%include 'src/include/functions.asm' SECTION .data fizz db 'fizz', 0h buzz db 'buzz', 0h SECTION .text global _start _start: mov esi, 0 ; check fizz mov edi, 0 ; check buzz mov ecx, 0 ; counter nextNumber: inc ecx .checkFizz: mov edx, 0 mov eax, ecx mov ebx, 3 div ebx mov edi, edx cmp edi, 0 jne .checkBuzz ; if r isn't 0 then check buzz mov eax, fizz call sprint .checkBuzz: mov edx, 0 mov eax, ecx mov ebx, 5 div ebx mov esi, edx cmp esi, 0 jne .checkInt mov eax, buzz call sprint .checkInt: cmp edi, 0 je .continue cmp esi, 0 je .continue mov eax, ecx call iprint .continue: mov eax, 0Ah push eax mov eax, esp call sprint pop eax cmp ecx, 100 jne nextNumber call quit
14.603448
50
0.57497
e19fac6c8780382b8d6c7940ac39a83b8833e4eb
7,827
asm
Assembly
Transynther/x86/_processed/AVXALIGN/_st_zr_un_sm_/i3-7100_9_0x84_notsx.log_21829_454.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/AVXALIGN/_st_zr_un_sm_/i3-7100_9_0x84_notsx.log_21829_454.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/AVXALIGN/_st_zr_un_sm_/i3-7100_9_0x84_notsx.log_21829_454.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 %r13 push %r9 push %rbp push %rcx push %rdi push %rsi lea addresses_WC_ht+0x100b, %rsi lea addresses_WT_ht+0x10e0b, %rdi nop nop nop nop and %rbp, %rbp mov $83, %rcx rep movsw xor $9804, %r12 lea addresses_A_ht+0xd24b, %r9 nop nop nop and $63720, %r11 movl $0x61626364, (%r9) cmp $34963, %rbp lea addresses_WT_ht+0x1ee1d, %rsi lea addresses_D_ht+0x19f0b, %rdi nop nop nop and %r11, %r11 mov $49, %rcx rep movsb nop nop sub %r12, %r12 lea addresses_WC_ht+0xc477, %r11 clflush (%r11) and $43660, %r12 movb (%r11), %r9b nop nop nop nop cmp $6902, %r11 lea addresses_WC_ht+0x1270b, %rsi inc %rbp mov $0x6162636465666768, %rcx movq %rcx, (%rsi) nop nop xor %rcx, %rcx lea addresses_normal_ht+0x1e58b, %rcx cmp %rsi, %rsi mov (%rcx), %r9d nop nop nop nop nop sub $63513, %rcx lea addresses_UC_ht+0xe0b, %rsi xor $11926, %rcx vmovups (%rsi), %ymm0 vextracti128 $0, %ymm0, %xmm0 vpextrq $0, %xmm0, %r12 nop nop nop nop nop and $30799, %rdi lea addresses_D_ht+0xc6eb, %rsi nop nop nop add $2013, %rdi movl $0x61626364, (%rsi) nop nop nop nop nop and $58644, %rcx lea addresses_normal_ht+0x1e74b, %rsi lea addresses_WT_ht+0x54a3, %rdi nop cmp $37339, %r13 mov $104, %rcx rep movsq nop nop nop cmp %rsi, %rsi lea addresses_A_ht+0x13f2b, %rsi nop nop nop cmp $24114, %r9 movw $0x6162, (%rsi) nop nop nop nop nop and %rbp, %rbp lea addresses_normal_ht+0x1880b, %r9 and $49505, %r11 vmovups (%r9), %ymm3 vextracti128 $1, %ymm3, %xmm3 vpextrq $0, %xmm3, %r12 nop inc %r12 pop %rsi pop %rdi pop %rcx pop %rbp pop %r9 pop %r13 pop %r12 pop %r11 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r12 push %r14 push %rbx push %rcx push %rdx // Store lea addresses_A+0x1b40b, %r12 clflush (%r12) nop sub %rcx, %rcx movw $0x5152, (%r12) nop nop nop xor %r11, %r11 // Load lea addresses_WC+0x1300b, %r14 nop nop nop add $10441, %rbx mov (%r14), %r10d nop cmp %r14, %r14 // Load lea addresses_US+0x1a80b, %rcx nop nop nop nop nop xor $35949, %r10 movb (%rcx), %r14b nop nop nop nop cmp $58539, %r11 // Store lea addresses_A+0x1b40b, %r11 nop xor $33460, %rcx mov $0x5152535455565758, %r10 movq %r10, %xmm4 vmovups %ymm4, (%r11) nop nop nop and %r11, %r11 // Faulty Load lea addresses_A+0x1b40b, %r12 nop nop nop nop nop cmp %r10, %r10 vmovntdqa (%r12), %ymm0 vextracti128 $0, %ymm0, %xmm0 vpextrq $0, %xmm0, %rbx lea oracles, %r11 and $0xff, %rbx shlq $12, %rbx mov (%r11,%rbx,1), %rbx pop %rdx pop %rcx pop %rbx pop %r14 pop %r12 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_A', 'same': False, 'size': 16, 'congruent': 0, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_A', 'same': True, 'size': 2, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_WC', 'same': False, 'size': 4, 'congruent': 7, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_US', 'same': False, 'size': 1, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_A', 'same': True, 'size': 32, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} [Faulty Load] {'src': {'type': 'addresses_A', 'same': True, 'size': 32, 'congruent': 0, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'type': 'addresses_WC_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 9, 'same': False}, 'OP': 'REPM'} {'dst': {'type': 'addresses_A_ht', 'same': False, 'size': 4, 'congruent': 5, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_WT_ht', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 7, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_WC_ht', 'same': False, 'size': 1, 'congruent': 2, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_WC_ht', 'same': False, 'size': 8, 'congruent': 7, 'NT': True, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_normal_ht', 'same': True, 'size': 4, 'congruent': 7, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_UC_ht', 'same': False, 'size': 32, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_D_ht', 'same': False, 'size': 4, 'congruent': 3, 'NT': False, 'AVXalign': True}, 'OP': 'STOR'} {'src': {'type': 'addresses_normal_ht', 'congruent': 6, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 1, 'same': True}, 'OP': 'REPM'} {'dst': {'type': 'addresses_A_ht', 'same': False, 'size': 2, 'congruent': 5, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_normal_ht', 'same': False, 'size': 32, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'00': 16431, '58': 5332, '6d': 1, '52': 62, 'c0': 3} 00 58 00 58 00 00 00 00 00 00 00 00 58 00 00 00 00 00 00 58 00 00 00 00 00 00 00 00 00 00 00 00 58 00 58 00 58 00 00 00 58 00 00 00 58 00 00 00 00 00 00 58 00 00 00 00 00 58 00 00 00 58 00 00 00 58 00 00 00 00 00 00 00 00 00 58 00 00 00 58 00 00 00 58 00 00 00 00 00 00 58 00 58 00 58 00 00 58 00 00 00 58 00 58 00 00 00 00 00 00 00 00 00 58 00 00 58 58 00 58 58 00 00 00 58 00 00 58 00 00 00 00 58 58 00 00 00 00 00 00 00 00 00 00 00 58 00 00 00 00 58 58 00 00 00 00 00 00 00 58 00 00 00 00 00 58 58 58 00 00 00 00 58 58 58 58 58 00 00 58 00 00 58 58 00 00 00 58 00 00 58 58 00 00 00 00 58 58 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 58 00 58 00 58 00 00 00 58 00 00 00 58 00 00 00 00 00 00 00 00 00 00 00 00 58 58 00 58 00 00 00 00 58 00 00 00 00 00 00 00 00 58 00 58 00 58 00 00 00 00 00 58 00 00 00 58 58 00 58 00 00 00 58 00 00 00 58 00 00 00 00 00 00 00 58 00 00 58 00 00 00 58 00 00 00 00 00 00 00 00 00 58 00 00 58 58 00 58 00 58 00 58 00 58 00 00 00 58 00 00 00 00 00 00 00 00 00 00 58 00 00 00 00 00 00 00 00 00 58 00 00 00 58 00 58 00 58 00 00 00 58 00 58 00 58 00 00 00 00 00 00 00 00 00 00 00 00 58 00 00 00 00 00 58 00 00 00 58 00 00 00 00 00 00 58 00 00 58 00 58 00 58 00 00 00 00 00 58 00 00 00 58 00 00 00 58 00 00 00 00 00 00 58 00 00 00 00 58 00 00 58 58 00 00 58 00 58 00 00 58 58 58 00 00 00 00 00 58 58 00 58 58 00 58 00 58 00 00 00 00 00 00 00 00 58 00 00 00 00 00 00 00 00 58 00 00 00 58 00 58 00 00 00 00 00 58 00 00 00 00 00 00 00 00 00 00 00 00 00 58 00 00 58 00 00 00 00 00 00 58 00 00 00 58 00 00 58 00 00 00 00 00 00 00 58 00 58 58 58 00 00 00 00 00 00 00 00 58 58 00 58 00 00 00 00 58 00 00 00 00 00 00 58 00 00 00 58 00 00 00 58 00 00 00 58 00 00 00 58 00 58 58 00 58 00 58 58 00 00 00 58 00 58 58 00 00 00 00 00 00 58 58 00 00 00 00 58 58 00 00 58 00 00 00 58 00 00 00 58 00 00 58 58 00 00 00 58 00 00 00 58 00 58 00 58 00 00 00 58 00 00 00 00 00 00 00 00 00 58 00 00 00 00 00 00 00 00 00 58 00 00 00 58 00 00 00 58 00 00 00 58 00 00 00 58 00 00 00 58 00 00 00 00 00 00 00 58 58 58 00 58 00 00 00 58 58 00 58 00 58 00 58 00 00 00 58 00 00 00 58 00 00 00 00 00 00 58 00 00 00 00 58 58 00 00 58 00 00 00 00 00 00 00 00 00 00 00 00 00 58 00 00 00 58 00 00 00 00 00 00 58 00 00 58 00 00 00 00 00 00 58 00 00 00 58 00 00 00 00 00 00 00 00 58 00 00 00 00 58 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 58 00 00 58 00 00 58 00 00 58 00 00 00 00 00 58 58 58 00 58 58 58 58 00 58 58 00 00 00 00 00 58 00 00 00 00 00 58 00 00 00 00 58 00 00 00 00 00 00 58 00 00 00 58 00 00 00 58 00 00 00 58 00 00 00 00 00 00 00 58 00 58 00 00 00 00 00 00 00 58 00 00 58 00 00 00 00 00 00 00 00 58 00 00 00 58 00 00 00 00 00 00 58 00 00 00 58 00 00 00 58 00 00 00 58 00 00 00 00 00 00 00 00 58 58 00 58 00 00 00 00 00 58 58 00 58 58 00 00 00 58 58 00 52 00 58 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 58 58 58 00 58 00 00 00 58 00 00 00 58 00 00 00 00 00 00 00 00 58 00 00 58 00 58 00 00 00 58 00 58 58 00 00 00 00 00 00 00 00 00 00 58 00 00 00 58 00 00 00 00 00 00 00 00 00 */
33.592275
2,999
0.652996
8d0c09aa2bbc16db4212b740c02ac6201cc10a6a
572
asm
Assembly
oeis/060/A060834.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/060/A060834.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/060/A060834.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A060834: a(n) = 6*n^2 + 6*n + 31. ; 31,43,67,103,151,211,283,367,463,571,691,823,967,1123,1291,1471,1663,1867,2083,2311,2551,2803,3067,3343,3631,3931,4243,4567,4903,5251,5611,5983,6367,6763,7171,7591,8023,8467,8923,9391,9871,10363,10867,11383,11911,12451,13003,13567,14143,14731,15331,15943,16567,17203,17851,18511,19183,19867,20563,21271,21991,22723,23467,24223,24991,25771,26563,27367,28183,29011,29851,30703,31567,32443,33331,34231,35143,36067,37003,37951,38911,39883,40867,41863,42871,43891,44923,45967,47023,48091,49171,50263 add $0,1 bin $0,2 mul $0,12 add $0,31
71.5
496
0.770979
7f099f12f94b7f36554b002b5a0976f9185557c5
7,698
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca.log_21829_542.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca.log_21829_542.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca.log_21829_542.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r11 push %r13 push %rax push %rbx push %rcx push %rdi push %rsi lea addresses_A_ht+0x2882, %rbx nop nop nop nop nop xor $25506, %r11 mov (%rbx), %ecx inc %r13 lea addresses_A_ht+0x3b6e, %rsi lea addresses_A_ht+0xcea4, %rdi clflush (%rdi) nop nop nop nop nop and %rax, %rax mov $83, %rcx rep movsb xor %rdi, %rdi lea addresses_D_ht+0x13522, %rcx nop nop nop dec %r13 movw $0x6162, (%rcx) nop nop nop and %rax, %rax lea addresses_WC_ht+0x2ed2, %rax nop nop nop cmp %r11, %r11 movb (%rax), %r13b nop cmp %r13, %r13 lea addresses_UC_ht+0x2be2, %r11 nop sub %rcx, %rcx movw $0x6162, (%r11) nop nop nop nop nop and %rcx, %rcx lea addresses_normal_ht+0x49e2, %r13 clflush (%r13) nop nop nop nop cmp $26146, %rsi movb $0x61, (%r13) nop nop nop nop nop cmp %r11, %r11 lea addresses_UC_ht+0x179e2, %r13 clflush (%r13) and %rax, %rax movups (%r13), %xmm3 vpextrq $0, %xmm3, %r11 and %rax, %rax lea addresses_A_ht+0x14a1a, %r13 nop nop nop nop and $15015, %rdi mov (%r13), %r11 sub $52954, %rcx lea addresses_WC_ht+0x1d8e2, %rsi lea addresses_A_ht+0x1902a, %rdi nop nop nop sub $41673, %rbx mov $103, %rcx rep movsb nop nop nop and %rsi, %rsi lea addresses_WC_ht+0xe1e2, %rsi lea addresses_UC_ht+0x169e2, %rdi nop sub $34524, %r10 mov $90, %rcx rep movsb nop sub %rdi, %rdi lea addresses_WT_ht+0x1e862, %rbx nop nop nop and %r10, %r10 mov (%rbx), %rcx nop and $60525, %rbx lea addresses_normal_ht+0xa562, %r10 clflush (%r10) nop nop nop nop nop add %rbx, %rbx mov $0x6162636465666768, %rdi movq %rdi, %xmm0 vmovups %ymm0, (%r10) nop nop nop nop sub $5113, %rcx lea addresses_UC_ht+0xb9e2, %r11 and $45205, %rdi mov $0x6162636465666768, %r13 movq %r13, %xmm5 vmovups %ymm5, (%r11) nop nop nop nop nop dec %rbx pop %rsi pop %rdi pop %rcx pop %rbx pop %rax pop %r13 pop %r11 pop %r10 ret .global s_faulty_load s_faulty_load: push %r11 push %r12 push %r14 push %r9 push %rbp push %rdi push %rdx // Store lea addresses_RW+0x8562, %r11 nop nop nop nop dec %rbp mov $0x5152535455565758, %r9 movq %r9, (%r11) sub %r9, %r9 // Store lea addresses_RW+0x19e02, %r14 nop nop nop nop nop cmp $62755, %r12 mov $0x5152535455565758, %rdi movq %rdi, (%r14) add %r12, %r12 // Faulty Load lea addresses_D+0xc9e2, %r9 nop nop nop inc %rdx mov (%r9), %bp lea oracles, %r11 and $0xff, %rbp shlq $12, %rbp mov (%r11,%rbp,1), %rbp pop %rdx pop %rdi pop %rbp pop %r9 pop %r14 pop %r12 pop %r11 ret /* <gen_faulty_load> [REF] {'src': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 32, 'NT': True, 'type': 'addresses_D'}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'congruent': 7, 'AVXalign': False, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_RW'}} {'OP': 'STOR', 'dst': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_RW'}} [Faulty Load] {'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 2, 'NT': False, 'type': 'addresses_D'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'congruent': 1, 'AVXalign': False, 'same': False, 'size': 4, 'NT': False, 'type': 'addresses_A_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 2, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'dst': {'congruent': 0, 'same': False, 'type': 'addresses_A_ht'}} {'OP': 'STOR', 'dst': {'congruent': 5, 'AVXalign': False, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_D_ht'}} {'src': {'congruent': 1, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_WC_ht'}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'congruent': 8, 'AVXalign': False, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_UC_ht'}} {'OP': 'STOR', 'dst': {'congruent': 9, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_normal_ht'}} {'src': {'congruent': 8, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_UC_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 3, 'AVXalign': False, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_A_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 7, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'dst': {'congruent': 3, 'same': False, 'type': 'addresses_A_ht'}} {'src': {'congruent': 10, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'dst': {'congruent': 10, 'same': False, 'type': 'addresses_UC_ht'}} {'src': {'congruent': 7, 'AVXalign': False, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_WT_ht'}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'congruent': 7, 'AVXalign': False, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_normal_ht'}} {'OP': 'STOR', 'dst': {'congruent': 11, 'AVXalign': False, 'same': True, 'size': 32, 'NT': False, 'type': 'addresses_UC_ht'}} {'36': 21829} 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 */
33.324675
2,999
0.654716
c0ce7dbdd694a92e564c39e1bd32cf08913ea08e
1,619
asm
Assembly
assignment6/shutdownv2.asm
gkweb76/SLAE
c0aef9610a5f75568a0e65c4a91a3bb5a56e6fc6
[ "MIT" ]
15
2015-08-11T09:50:00.000Z
2021-10-02T19:30:53.000Z
assignment6/shutdownv2.asm
gkweb76/SLAE
c0aef9610a5f75568a0e65c4a91a3bb5a56e6fc6
[ "MIT" ]
null
null
null
assignment6/shutdownv2.asm
gkweb76/SLAE
c0aef9610a5f75568a0e65c4a91a3bb5a56e6fc6
[ "MIT" ]
9
2015-08-11T09:51:55.000Z
2021-10-18T18:04:11.000Z
; Polymorphic version of http://shell-storm.org/shellcode/files/shellcode-876.php ; 83 bytes (original 56 bytes) ; Kaddouch Guillaume ; SLAE-681 global _start section .text _start: ;int execve(const char *filename, char *const argv[], char *const envp[] xor eax, eax ; zero out eax push eax ; push NULL terminating string push word 0xc287 ; XORed '-h' with 0xAA xor word [esp], 0xaaaa ; XOR back string to clear text '-h' push eax ; push NULL push dword 0x776f6eAA ; = 'now' mov [esp], byte al ; \x00 = NULL mov edi, esp ; edi = *'-h now' push eax ; push NULL mov ebx, dword 0xc4ddc5ce ; XORed 'down' with 0xAA xor ebx, 0xaaaaaaaa ; XOR back the string to clear text push ebx ; string 'down' mov ebx, dword 0x63645762 ; encoded 'shut' decreased by 0x11111111 add ebx, 0x11111111 ; convert back the string to clear text push ebx ; string 'shut' mov ebx, dword 0x85c4c3c8 ; XORed 'bin/' with 0xAA xor ebx, 0xaaaaaaaa ; XOR back the string to clear text push ebx ; string 'bin/' mov bx, 0x6129 ; encoded '/s' decreased by 0x1206 add bx, 0x1206 ; convert back the string to clear text push bx ; string '/s' ; clear string on stack = /sbin/shutdown mov ebx, esp ; ebx = *filename '/sbin///shutdown' 0x00 push eax push edi ; edi = *argv '-h now' push ebx ; *filename '/sbin///shutdown' 0x00 mov ecx,esp ; ecx = *argv[*filename '/sbin///shutdown' '-h' ; ebx = *filename ; ecx = *argv[*filename, *'-h now'] ; edx = *envp = 0x00 mov al,0xb ; execve() syscall number int 0x80 ; execve(*/sbin///shutdown, *-h now, 0x00)
28.403509
81
0.65596
32729d4d6694f7e2c06a1f256e7055c23f9b60f7
868
asm
Assembly
oeis/142/A142231.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/142/A142231.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/142/A142231.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A142231: Primes congruent to 34 mod 41. ; Submitted by Jamie Morken(s4) ; 157,239,977,1223,1879,2207,2371,2617,2699,3109,3191,3847,3929,4093,4339,4421,4831,5077,5323,5569,5651,5897,6143,6389,6553,7127,7537,8111,8521,8849,9013,9341,9587,9833,10079,10243,11719,11801,12211,12457,12539,12703,13441,13523,13687,13933,14753,15737,15901,16229,17377,17623,18443,19181,19427,19919,20411,20903,21067,21149,21313,21559,22051,22133,22543,22871,23117,23609,23773,24019,24593,25577,25741,26479,26561,27299,27791,28201,28283,28447,29021,29759,30169,30497,30661,31153,31481,31727,31891 mov $1,13 mov $2,$0 add $2,2 pow $2,2 lpb $2 add $1,24 mul $1,2 sub $2,1 mov $3,$1 add $1,3 seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0. sub $0,$3 add $1,31 div $1,2 mov $4,$0 max $4,0 cmp $4,$0 mul $2,$4 lpe mov $0,$1 mul $0,2 sub $0,33
32.148148
498
0.718894
66c3258311cb51fdec85dc356b6bc78b9a85955b
2,625
asm
Assembly
src/SlimShader.Tests/Shaders/Sdk/Direct3D11/FluidCS11/FluidRender_VS.asm
tgjones/slimshader
4fc64414b82fec8a41f8455037b3717e71907b89
[ "MIT" ]
125
2015-01-04T09:33:05.000Z
2022-03-13T05:08:50.000Z
src/SlimShader.Tests/Shaders/Sdk/Direct3D11/FluidCS11/FluidRender_VS.asm
tgjones/slimshader
4fc64414b82fec8a41f8455037b3717e71907b89
[ "MIT" ]
1
2015-04-01T22:26:14.000Z
2015-04-02T12:57:18.000Z
src/SlimShader.Tests/Shaders/Sdk/Direct3D11/FluidCS11/FluidRender_VS.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: // // Resource bind info for ParticlesRO // { // // struct Particle // { // // float2 position; // Offset: 0 // float2 velocity; // Offset: 8 // // } $Element; // Offset: 0 Size: 16 // // } // // Resource bind info for ParticleDensityRO // { // // struct ParticleDensity // { // // float density; // Offset: 0 // // } $Element; // Offset: 0 Size: 4 // // } // // // Resource Bindings: // // Name Type Format Dim Slot Elements // ------------------------------ ---------- ------- ----------- ---- -------- // ParticlesRO texture struct r/o 0 1 // ParticleDensityRO texture struct r/o 1 1 // // // // Input signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // SV_VertexID 0 x 0 VERTID uint x // // // Output signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // POSITION 0 xy 0 NONE float xy // COLOR 0 xyzw 1 NONE float xyzw // vs_5_0 dcl_globalFlags refactoringAllowed dcl_immediateConstantBuffer { { 1.000000, 0, 0, 1.000000}, { 1.000000, 1.000000, 0, 1.000000}, { 0, 1.000000, 0, 1.000000}, { 0, 1.000000, 1.000000, 1.000000}, { 0, 0, 1.000000, 1.000000} } dcl_resource_structured t0, 16 dcl_resource_structured t1, 4 dcl_input_sgv v0.x, vertex_id dcl_output o0.xy dcl_output o1.xyzw dcl_temps 3 ld_structured_indexable(structured_buffer, stride=16)(mixed,mixed,mixed,mixed) o0.xy, v0.x, l(0), t0.xyxx ld_structured_indexable(structured_buffer, stride=4)(mixed,mixed,mixed,mixed) r0.x, v0.x, l(0), t1.xxxx add r0.x, r0.x, l(-1000.000000) mul_sat r0.x, r0.x, l(0.001000) mul r0.x, r0.x, l(4.000000) round_pi r0.y, r0.x ftou r0.y, r0.y mov r1.xyz, icb[r0.y + 0].xyzx round_ni r0.y, r0.x frc r0.x, r0.x ftou r0.y, r0.y mov r2.xyz, icb[r0.y + 0].xyzx mov r1.w, l(1.000000) mov r2.w, l(1.000000) add r1.xyzw, r1.xyzw, -r2.xyzw mad o1.xyzw, r0.xxxx, r1.xyzw, r2.xyzw ret // Approximately 17 instruction slots used
29.829545
105
0.480762
3d265a5574e2c006d084819b79c09295e603524c
3,681
asm
Assembly
Transynther/x86/_processed/AVXALIGN/_st_/i9-9900K_12_0xca_notsx.log_21829_129.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/AVXALIGN/_st_/i9-9900K_12_0xca_notsx.log_21829_129.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/AVXALIGN/_st_/i9-9900K_12_0xca_notsx.log_21829_129.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: ret .global s_faulty_load s_faulty_load: push %r10 push %r13 push %rcx push %rdx push %rsi // Faulty Load lea addresses_D+0x31b8, %rdx nop nop nop nop nop cmp $18579, %rcx mov (%rdx), %si lea oracles, %r13 and $0xff, %rsi shlq $12, %rsi mov (%r13,%rsi,1), %rsi pop %rsi pop %rdx pop %rcx pop %r13 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_D', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 0}} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_D', 'NT': False, 'AVXalign': True, 'size': 2, 'congruent': 0}} <gen_prepare_buffer> {'36': 21829} 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 */
85.604651
2,999
0.663407
4f234c426bf1a5049c0b3d4a11489a31a67548b2
588
asm
Assembly
programs/oeis/339/A339255.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/339/A339255.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/339/A339255.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A339255: Leading digit of n in base 5. ; 1,2,3,4,1,1,1,1,1,2,2,2,2,2,3,3,3,3,3,4,4,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2 add $0,1 lpb $0,$0 div $0,5 lpe mov $1,$0
65.333333
501
0.513605
6321f97fdf4bacca0260a02b85276b5bb2be7354
398
asm
Assembly
1/main.asm
diab0l/euler.asm
34fb5a151241d632af01fa05fd1b3018eaaa196f
[ "MIT" ]
null
null
null
1/main.asm
diab0l/euler.asm
34fb5a151241d632af01fa05fd1b3018eaaa196f
[ "MIT" ]
null
null
null
1/main.asm
diab0l/euler.asm
34fb5a151241d632af01fa05fd1b3018eaaa196f
[ "MIT" ]
null
null
null
global main extern printf section .text main: push rsp mov rax, 0 %macro fn 2 mov rbx, %2 %%bar: %1 rax, rbx add rbx, %2 cmp rbx, 1000 jl %%bar %endmacro fn add, 3 fn add, 5 fn sub, 15 %unmacro fn 2 mov rdi, fmt mov rsi, rax mov rax, 0 call printf mov rax, 0 pop rsp ret section .data fmt db `%lu\n`, 0
11.371429
21
0.517588
36b1a18524bae37bca60ecabf34abe403509bae7
1,787
asm
Assembly
stunt-cycle.asm
felipemfp/stunt-cycle
4fd5acafc6c147a57df24c7ac6fa93e146b8ab7f
[ "MIT" ]
5
2017-02-16T02:14:36.000Z
2020-03-22T07:57:02.000Z
stunt-cycle.asm
felipemfp/stunt-cycle
4fd5acafc6c147a57df24c7ac6fa93e146b8ab7f
[ "MIT" ]
null
null
null
stunt-cycle.asm
felipemfp/stunt-cycle
4fd5acafc6c147a57df24c7ac6fa93e146b8ab7f
[ "MIT" ]
null
null
null
# Stunt Cycle # Felipe Pontes <felipemfpontes@gmail.com> 2016 # # Make use of Bitmap Display with a 4x4 pixel and a resolution equals to 512x512. # You'll need a Keyboard and Display Simulator too. .eqv MAX_WIDTH 128 .eqv MAX_HEIGHT 128 .eqv DISPLAY_SNAPSHOT_VALUE 0x00020000 .eqv DISPLAY_ADDRESS 0x10010000 .eqv KEYBOARD_ADDRESS 0xffff0000 .data 0x10000000 # colors color: .word 0xFFFFFF color_faded: .word 0xEEEEEE color_primary: .word 0x2196F3 color_primary_faded: .word 0x1565C0 color_danger: .word 0xF44336 color_danger_faded: .word 0xC62828 color_background: .word 0x607D8B color_background_faded: .word 0x37474F color_inverted: .word 0x212121 color_inverted_faded: .word 0x000000 color_player_detail: .word 0xD50000 color_player_detail_faded: .word 0xB71C1C color_player_body: .word 0xE0E0E0 color_player_body_faded: .word 0x757575 color_player_motorcycle: .word 0xBDBDBD color_player_motorcycle_faded: .word 0x616161 # variables menu_selection: .word 1 menu_player_speed: .word 1 menu_player_move_interval: .word 50 menu_player_move_count: .word 0 game_stage: .word 1 game_player_lane: .word 1 game_player_position: .word 10 game_player_height: .word 0 game_player_speed: .word 0 game_player_speed_interval: .word 2 game_player_speed_count: .word 0 game_player_brake_interval: .word 10000 game_player_brake_count: .word 0 game_player_move_interval: .word 1500 game_player_move_count: .word 0 # macros .include "common/draw.asm" .include "common/utils.asm" .include "menu/draw.asm" .include "game/draw.asm" .text main: jal menu_pre jal menu jal game_pre jal game exit() # main codes go here .include "menu/main.asm" .include "game/main.asm"
23.826667
81
0.756575