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
783c977f8eecd59a08cddb2ff9ee8740212feb79
40,113
asm
Assembly
core.asm
paulmooreparks/Tortilla
bd0db349d0b114e9b86a85c8e991b42c8df9ae1d
[ "Apache-2.0" ]
4
2016-09-27T20:52:07.000Z
2021-12-24T06:46:46.000Z
core.asm
paulmooreparks/Tortilla
bd0db349d0b114e9b86a85c8e991b42c8df9ae1d
[ "Apache-2.0" ]
2
2018-08-29T03:26:54.000Z
2020-12-28T03:35:43.000Z
core.asm
paulmooreparks/Tortilla
bd0db349d0b114e9b86a85c8e991b42c8df9ae1d
[ "Apache-2.0" ]
null
null
null
; This file contains the code for the kernel LABEL core_os_core AUTO LABEL core_os_key_input AUTO LABEL core_os_print_reg AUTO LABEL core_os_puts AUTO LABEL core_os_putchar AUTO LABEL core_os_shut_down AUTO LABEL core_os_strlen AUTO LABEL core_os_exception_handler AUTO LABEL core_os_exception_handler_00 AUTO LABEL core_os_exception_handler_01 AUTO LABEL core_os_exception_handler_02 AUTO LABEL core_os_exception_handler_03 AUTO LABEL core_os_exception_handler_04 AUTO LABEL core_os_exception_handler_05 AUTO LABEL core_os_exception_handler_06 AUTO LABEL core_os_exception_handler_07 AUTO LABEL core_os_exception_handler_08 AUTO LABEL core_os_exception_handler_09 AUTO LABEL core_os_exception_handler_0A AUTO LABEL core_os_exception_handler_0B AUTO LABEL core_os_exception_handler_0C AUTO LABEL core_os_exception_handler_0D AUTO LABEL core_os_exception_handler_0E AUTO LABEL core_os_exception_handler_0F AUTO LABEL core_bios_10 AUTO LABEL core_bios_16 AUTO LABEL core_syscall AUTO LABEL core_sys_write AUTO ; $01 #1 LABEL core_os_hex_print_b0 AUTO LABEL core_os_hex_print_b1 AUTO LABEL core_os_hex_print_b2 AUTO LABEL core_os_hex_print_b3 AUTO LABEL core_os_hex_print_b4 AUTO LABEL core_os_hex_print_b5 AUTO LABEL core_os_hex_print_b6 AUTO LABEL core_os_hex_print_b7 AUTO LABEL core_os_hex_print_q0 AUTO LABEL core_os_hex_print_q1 AUTO LABEL core_os_hex_print_q2 AUTO LABEL core_os_hex_print_q3 AUTO LABEL core_os_hex_print_h0 AUTO LABEL core_os_hex_print_h1 AUTO LABEL core_os_hex_print_w0 AUTO LABEL core_os_print_newline AUTO ;****************************************************************************** ; Interrupt vectors begin at segment $0000`0000 address $0000`0000. $00000000: ADDRESS core_os_exception_handler_00 ; INT 00 divide by zero ADDRESS core_os_exception_handler_01 ; INT 01 ADDRESS core_os_exception_handler_02 ; INT 02 ADDRESS core_os_exception_handler_03 ; INT 03 ADDRESS core_os_exception_handler_04 ; INT 04 ADDRESS core_os_exception_handler_05 ; INT 05 ADDRESS core_os_exception_handler_06 ; INT 06 invalid opcode ADDRESS core_os_exception_handler_07 ; INT 07 ADDRESS core_os_exception_handler_08 ; INT 08 ADDRESS core_os_exception_handler_09 ; INT 09 ADDRESS core_os_exception_handler_0A ; INT 0A ADDRESS core_os_exception_handler_0B ; INT 0B ADDRESS core_os_exception_handler_0C ; INT 0C ADDRESS core_os_exception_handler_0D ; INT 0D ADDRESS core_os_exception_handler_0E ; INT 0E ADDRESS core_os_exception_handler_0F ; INT 0F ADDRESS core_bios_10 ; INT 10 Classic BIOS ADDRESS $0000`0000 ; INT 11 ADDRESS $0000`0000 ; INT 12 ADDRESS $0000`0000 ; INT 13 ADDRESS $0000`0000 ; INT 14 ADDRESS $0000`0000 ; INT 15 ADDRESS core_bios_16 ; INT 16 Classic BIOS ADDRESS $0000`0000 ; INT 17 ADDRESS $0000`0000 ; INT 18 ADDRESS $0000`0000 ; INT 19 ADDRESS $0000`0000 ; INT 1A ADDRESS $0000`0000 ; INT 1B ADDRESS $0000`0000 ; INT 1C ADDRESS $0000`0000 ; INT 1D ADDRESS $0000`0000 ; INT 1E ADDRESS $0000`0000 ; INT 1F ADDRESS $0000`0000 ; INT 20 ADDRESS core_os_key_input ; INT 21 ADDRESS $0000`0000 ; INT 22 ADDRESS $0000`0000 ; INT 23 ADDRESS $0000`0000 ; INT 24 ADDRESS $0000`0000 ; INT 25 ADDRESS $0000`0000 ; INT 26 ADDRESS $0000`0000 ; INT 27 ADDRESS $0000`0000 ; INT 28 ADDRESS $0000`0000 ; INT 29 ADDRESS $0000`0000 ; INT 2A ADDRESS $0000`0000 ; INT 2B ADDRESS $0000`0000 ; INT 2C ADDRESS $0000`0000 ; INT 2D ADDRESS $0000`0000 ; INT 2E ADDRESS $0000`0000 ; INT 2F ADDRESS $0000`0000 ; INT 30 ADDRESS $0000`0000 ; INT 31 ADDRESS $0000`0000 ; INT 32 ADDRESS $0000`0000 ; INT 33 ADDRESS $0000`0000 ; INT 34 ADDRESS $0000`0000 ; INT 35 ADDRESS $0000`0000 ; INT 36 ADDRESS $0000`0000 ; INT 37 ADDRESS $0000`0000 ; INT 38 ADDRESS $0000`0000 ; INT 39 ADDRESS $0000`0000 ; INT 3A ADDRESS $0000`0000 ; INT 3B ADDRESS $0000`0000 ; INT 3C ADDRESS $0000`0000 ; INT 3D ADDRESS $0000`0000 ; INT 3E ADDRESS $0000`0000 ; INT 3F ADDRESS core_os_core ; INT 40 ADDRESS $0000`0000 ; INT 41 ADDRESS $0000`0000 ; INT 42 ADDRESS $0000`0000 ; INT 43 ADDRESS $0000`0000 ; INT 44 ADDRESS $0000`0000 ; INT 45 ADDRESS $0000`0000 ; INT 46 ADDRESS $0000`0000 ; INT 47 ADDRESS $0000`0000 ; INT 48 ADDRESS $0000`0000 ; INT 49 ADDRESS $0000`0000 ; INT 4A ADDRESS $0000`0000 ; INT 4B ADDRESS $0000`0000 ; INT 4C ADDRESS $0000`0000 ; INT 4D ADDRESS $0000`0000 ; INT 4E ADDRESS $0000`0000 ; INT 4F ADDRESS $0000`0000 ; INT 50 ADDRESS $0000`0000 ; INT 51 ADDRESS $0000`0000 ; INT 52 ADDRESS $0000`0000 ; INT 53 ADDRESS $0000`0000 ; INT 54 ADDRESS $0000`0000 ; INT 55 ADDRESS $0000`0000 ; INT 56 ADDRESS $0000`0000 ; INT 57 ADDRESS $0000`0000 ; INT 58 ADDRESS $0000`0000 ; INT 59 ADDRESS $0000`0000 ; INT 5A ADDRESS $0000`0000 ; INT 5B ADDRESS $0000`0000 ; INT 5C ADDRESS $0000`0000 ; INT 5D ADDRESS $0000`0000 ; INT 5E ADDRESS $0000`0000 ; INT 5F ADDRESS $0000`0000 ; INT 60 ADDRESS $0000`0000 ; INT 61 ADDRESS $0000`0000 ; INT 62 ADDRESS $0000`0000 ; INT 63 ADDRESS $0000`0000 ; INT 64 ADDRESS $0000`0000 ; INT 65 ADDRESS $0000`0000 ; INT 66 ADDRESS $0000`0000 ; INT 67 ADDRESS $0000`0000 ; INT 68 ADDRESS $0000`0000 ; INT 69 ADDRESS $0000`0000 ; INT 6A ADDRESS $0000`0000 ; INT 6B ADDRESS $0000`0000 ; INT 6C ADDRESS $0000`0000 ; INT 6D ADDRESS $0000`0000 ; INT 6E ADDRESS $0000`0000 ; INT 6F ADDRESS $0000`0000 ; INT 70 ADDRESS $0000`0000 ; INT 71 ADDRESS $0000`0000 ; INT 72 ADDRESS $0000`0000 ; INT 73 ADDRESS $0000`0000 ; INT 74 ADDRESS $0000`0000 ; INT 75 ADDRESS $0000`0000 ; INT 76 ADDRESS $0000`0000 ; INT 77 ADDRESS $0000`0000 ; INT 78 ADDRESS $0000`0000 ; INT 79 ADDRESS $0000`0000 ; INT 7A ADDRESS $0000`0000 ; INT 7B ADDRESS $0000`0000 ; INT 7C ADDRESS $0000`0000 ; INT 7D ADDRESS $0000`0000 ; INT 7E ADDRESS $0000`0000 ; INT 7F ADDRESS core_syscall ; INT 80 ;****************************************************************************** ;****************************************************************************** ; BIOS $10 implementation LABEL core_bios_10_jump_table AUTO LABEL core_bios_10_nop AUTO LABEL core_bios_10_clear_screen AUTO LABEL core_bios_10_set_video_mode AUTO LABEL core_bios_10_set_cursor_shape AUTO LABEL core_bios_10_set_cursor_pos AUTO LABEL core_bios_10_get_cursor_pos AUTO LABEL core_bios_10_scroll_up AUTO LABEL core_bios_10_scroll_down AUTO LABEL core_bios_10_read_char_and_attr AUTO LABEL core_bios_10_write_char_and_attr AUTO LABEL core_bios_10_write_char AUTO LABEL core_bios_10_set_color AUTO ;****************************************************************************** ; This is the entry point for all BIOS $10 calls. It indexes into the jump ; table using the BIOS opcode and forwards the call to the correct function. core_bios_10: PUSH B CLR B LD A.B1 B.H0 ; The opcode is in A.B1, so copy it over to B.H0 so we can operate on it. MUL $04 B.H0 ; Multiply the opcode by 4 to find its offset in the jump table. LD core_bios_10_jump_table B.H1 ADD B.H0 B.H1 ; Add the jump table start address and the calculated offset, and we ; get the pointer to the operation's implementing function. CALL @B.H1 POP B IRET ;****************************************************************************** ; BIOS $10 jump table that translates AH opcodes into functions. core_bios_10_jump_table: ADDRESS core_bios_10_set_video_mode ; AH = $00 ADDRESS core_bios_10_set_cursor_shape ; AH = $01 ADDRESS core_bios_10_set_cursor_pos ; AH = $02 ADDRESS core_bios_10_get_cursor_pos ; AH = $03 ADDRESS core_bios_10_clear_screen ; AH = $04 ADDRESS core_bios_10_nop ; AH = $05 ADDRESS core_bios_10_scroll_up ; AH = $06 ADDRESS core_bios_10_scroll_down ; AH = $07 ADDRESS core_bios_10_read_char_and_attr ; AH = $08 ADDRESS core_bios_10_write_char_and_attr ; AH = $09 ADDRESS core_bios_10_write_char ; AH = $0A ADDRESS core_bios_10_set_color ; AH = $0B core_bios_10_set_video_mode: OUT A $7F RET core_bios_10_set_cursor_shape: OUT A $7F RET core_bios_10_set_cursor_pos: OUT A $7F RET core_bios_10_get_cursor_pos: PUSH B CLR B IN $7F B POP B RET core_bios_10_nop: RET core_bios_10_scroll_up: OUT A $7F RET core_bios_10_scroll_down: OUT A $7F RET core_bios_10_read_char_and_attr: RET core_bios_10_write_char_and_attr: OUT A $7F RET core_bios_10_write_char: OUT A $7F RET core_bios_10_clear_screen: OUT A $7F RET core_bios_10_set_color: OUT A $7F RET ;****************************************************************************** ;****************************************************************************** ; BIOS $16 implementation LABEL core_bios_16_jump_table AUTO LABEL core_bios_16_get_keystroke AUTO LABEL core_bios_16_check_for_keystroke AUTO LABEL core_bios_16_get_shift_flags AUTO LABEL core_bios_16_set_rate_delay AUTO LABEL core_bios_16_get_enh_keystroke AUTO LABEL core_bios_16_check_enh_keystroke AUTO LABEL core_bios_16_get_ext_shift_states AUTO ;****************************************************************************** ; BIOS $10 entry point core_bios_16: PUSH B CLR B LD A.B1 B.H0 MUL $04 B.H0 LD core_bios_16_jump_table B.H1 ADD B.H0 B.H1 CALL @B.H1 POP B IRET ;****************************************************************************** ; BIOS $16 jump table core_bios_16_jump_table: ADDRESS core_bios_16_get_keystroke ; AH = $00 ADDRESS core_bios_16_check_for_keystroke ; AH = $01 ADDRESS core_bios_16_get_shift_flags ; AH = $02 ADDRESS core_bios_16_set_rate_delay ; AH = $03 ADDRESS core_bios_16_nop ; AH = $04 ADDRESS core_bios_16_nop ; AH = $05 ADDRESS core_bios_16_nop ; AH = $06 ADDRESS core_bios_16_nop ; AH = $07 ADDRESS core_bios_16_nop ; AH = $08 ADDRESS core_bios_16_nop ; AH = $09 ADDRESS core_bios_16_nop ; AH = $0A ADDRESS core_bios_16_nop ; AH = $0B ADDRESS core_bios_16_nop ; AH = $0C ADDRESS core_bios_16_nop ; AH = $0D ADDRESS core_bios_16_nop ; AH = $0E ADDRESS core_bios_16_nop ; AH = $0F ADDRESS core_bios_16_nop ; AH = $10 ADDRESS core_bios_16_nop ; AH = $11 ADDRESS core_bios_16_nop ; AH = $12 core_bios_16_nop: RET core_bios_16_get_keystroke: PUSH B CLR B IN $60 B LD B.Q0 A.Q0 ; character POP B RET core_bios_16_check_for_keystroke: RET core_bios_16_get_shift_flags: RET core_bios_16_set_rate_delay: RET ;****************************************************************************** ;****************************************************************************** ; Core OS functions that aren't necessarily in the system calls table. LABEL core_os_core_jump_table AUTO core_os_core: PUSH B CLR B LD A.Q0 B.H0 MUL $04 B.H0 LD core_os_core_jump_table B.H1 ADD B.H0 B.H1 CALL @B.H1 POP B IRET LABEL core_os_idle AUTO LABEL core_os_nop AUTO ;****************************************************************************** ; The core_os_core function uses this jump table to vector to OS functions. core_os_core_jump_table: ADDRESS core_os_shut_down ; A.Q0 = $0000 ADDRESS core_os_idle ; A.Q1 = $0001 ADDRESS core_os_puts ; A.Q0 = $0002 ADDRESS core_os_putchar ; A.Q0 = $0003 ;****************************************************************************** ; "Power down" the virtual CPU. core_os_shut_down: CLR A OUT A $0001 RET ;****************************************************************************** ; The idle routine is executed when the OS isn't doing any work. HALT stops the ; clock, and any interrupt will wake the CPU, jump to the interrupt handler, ; and return to the JMP instruction, which goes right back to HALT. LABEL core_os_idle_halt AUTO core_os_idle: ADD $08 S.H0 ; This routine never returns, so adjust the stack back above the return address core_os_idle_halt: HALT JMP core_os_idle_halt ;****************************************************************************** ; Output a string to the console. LABEL core_os_puts_exit AUTO LABEL core_os_puts_next_char AUTO core_os_puts: PUSH G PUSH H PUSH J LD G.H0 H.H0 CLR J core_os_puts_next_char: CMPIND $00 @G.H0 JZ core_os_puts_exit INC J INC G.H0 JMP core_os_puts_next_char core_os_puts_exit: CLR A LD $01 G CALL core_sys_write POP J POP H POP G LD G.H0 A.H0 RET ;****************************************************************************** ; Output a character to the console. core_os_putchar: ; Put the character we want to output onto the stack. PUSH G PUSH H PUSH J PUSH G.B0 ; Now S.H0 points at that character on the stack, so copy that address to ; H.H0, which is the output pointer (const char *). LD S.H0 H.H0 ; Delegate output to the sys_write call. LD $01 G ; STDOUT file descriptor LD $01 J ; Number of characters to write, starting at @H.H0 CALL core_sys_write POP A.B0 POP J POP H POP G RET ;****************************************************************************** ; Echo routine core_os_key_input: PUSH A CLR A INT $16 ; get keystroke LD $01 A.B5 ; Count LD $0A A.B1 ; Function to execute INT $10 ; BIOS interrupt POP A IRET ;****************************************************************************** ; Return length of a null-terminated string. LABEL core_os_strlen_loop AUTO LABEL core_os_strlen_done AUTO core_os_strlen: PUSH G.H0 CLR A core_os_strlen_loop: CMPIND $00 @G.H0 JZ core_os_strlen_done INC A.H0 INC G.H0 JMP core_os_strlen_loop core_os_strlen_done: POP G.H0 RET ;****************************************************************************** ; Linux syscalls are implemented here. LABEL core_syscall_jump_table AUTO LABEL core_sys_nop AUTO LABEL core_sys_read AUTO ; $00 #0 LABEL core_sys_exit AUTO ; $3C #60 LABEL core_sys_reboot AUTO ; $A9 #169 core_syscall: MUL $04 A.H0 LD core_syscall_jump_table A.H1 ADD A.H0 A.H1 CALL @A.H1 IRET core_syscall_jump_table: ADDRESS core_sys_read ; $00 #0 ADDRESS core_sys_write ; $01 #1 ADDRESS core_sys_nop ; $02 # ADDRESS core_sys_nop ; $03 # ADDRESS core_sys_nop ; $04 # ADDRESS core_sys_nop ; $05 # ADDRESS core_sys_nop ; $06 # ADDRESS core_sys_nop ; $07 # ADDRESS core_sys_nop ; $08 # ADDRESS core_sys_nop ; $09 # ADDRESS core_sys_nop ; $0A # ADDRESS core_sys_nop ; $0B # ADDRESS core_sys_nop ; $0C # ADDRESS core_sys_nop ; $0D # ADDRESS core_sys_nop ; $0E # ADDRESS core_sys_nop ; $0F # ADDRESS core_sys_nop ; $10 # ADDRESS core_sys_nop ; $11 # ADDRESS core_sys_nop ; $12 # ADDRESS core_sys_nop ; $13 # ADDRESS core_sys_nop ; $14 # ADDRESS core_sys_nop ; $15 # ADDRESS core_sys_nop ; $16 # ADDRESS core_sys_nop ; $17 # ADDRESS core_sys_nop ; $18 # ADDRESS core_sys_nop ; $19 # ADDRESS core_sys_nop ; $1A # ADDRESS core_sys_nop ; $1B # ADDRESS core_sys_nop ; $1C # ADDRESS core_sys_nop ; $1D # ADDRESS core_sys_nop ; $1E # ADDRESS core_sys_nop ; $1F # ADDRESS core_sys_nop ; $20 # ADDRESS core_sys_nop ; $21 # ADDRESS core_sys_nop ; $22 # ADDRESS core_sys_nop ; $23 # ADDRESS core_sys_nop ; $24 # ADDRESS core_sys_nop ; $25 # ADDRESS core_sys_nop ; $26 # ADDRESS core_sys_nop ; $27 # ADDRESS core_sys_nop ; $28 # ADDRESS core_sys_nop ; $29 # ADDRESS core_sys_nop ; $2A # ADDRESS core_sys_nop ; $2B # ADDRESS core_sys_nop ; $2C # ADDRESS core_sys_nop ; $2D # ADDRESS core_sys_nop ; $2E # ADDRESS core_sys_nop ; $2F # ADDRESS core_sys_nop ; $30 # ADDRESS core_sys_nop ; $31 # ADDRESS core_sys_nop ; $32 # ADDRESS core_sys_nop ; $33 # ADDRESS core_sys_nop ; $34 # ADDRESS core_sys_nop ; $35 # ADDRESS core_sys_nop ; $36 # ADDRESS core_sys_nop ; $37 # ADDRESS core_sys_nop ; $38 # ADDRESS core_sys_nop ; $39 # ADDRESS core_sys_nop ; $3A # ADDRESS core_sys_nop ; $3B # ADDRESS core_sys_exit ; $3C #60 ADDRESS core_sys_nop ; $3D # ADDRESS core_sys_nop ; $3E # ADDRESS core_sys_nop ; $3F # ADDRESS core_sys_nop ; $41 # ADDRESS core_sys_nop ; $42 # ADDRESS core_sys_nop ; $43 # ADDRESS core_sys_nop ; $44 # ADDRESS core_sys_nop ; $45 # ADDRESS core_sys_nop ; $46 # ADDRESS core_sys_nop ; $47 # ADDRESS core_sys_nop ; $48 # ADDRESS core_sys_nop ; $49 # ADDRESS core_sys_nop ; $4A # ADDRESS core_sys_nop ; $4B # ADDRESS core_sys_nop ; $4C # ADDRESS core_sys_nop ; $40 # ADDRESS core_sys_nop ; $4D # ADDRESS core_sys_nop ; $4E # ADDRESS core_sys_nop ; $4F # ADDRESS core_sys_nop ; $50 # ADDRESS core_sys_nop ; $51 # ADDRESS core_sys_nop ; $52 # ADDRESS core_sys_nop ; $53 # ADDRESS core_sys_nop ; $54 # ADDRESS core_sys_nop ; $55 # ADDRESS core_sys_nop ; $56 # ADDRESS core_sys_nop ; $57 # ADDRESS core_sys_nop ; $58 # ADDRESS core_sys_nop ; $59 # ADDRESS core_sys_nop ; $5A # ADDRESS core_sys_nop ; $5B # ADDRESS core_sys_nop ; $5C # ADDRESS core_sys_nop ; $5D # ADDRESS core_sys_nop ; $5E # ADDRESS core_sys_nop ; $5F # ADDRESS core_sys_nop ; $60 # ADDRESS core_sys_nop ; $61 # ADDRESS core_sys_nop ; $62 # ADDRESS core_sys_nop ; $63 # ADDRESS core_sys_nop ; $64 # ADDRESS core_sys_nop ; $65 # ADDRESS core_sys_nop ; $66 # ADDRESS core_sys_nop ; $67 # ADDRESS core_sys_nop ; $68 # ADDRESS core_sys_nop ; $69 # ADDRESS core_sys_nop ; $6A # ADDRESS core_sys_nop ; $6B # ADDRESS core_sys_nop ; $6C # ADDRESS core_sys_nop ; $6D # ADDRESS core_sys_nop ; $6E # ADDRESS core_sys_nop ; $6F # ADDRESS core_sys_nop ; $70 # ADDRESS core_sys_nop ; $71 # ADDRESS core_sys_nop ; $72 # ADDRESS core_sys_nop ; $73 # ADDRESS core_sys_nop ; $74 # ADDRESS core_sys_nop ; $75 # ADDRESS core_sys_nop ; $76 # ADDRESS core_sys_nop ; $77 # ADDRESS core_sys_nop ; $78 # ADDRESS core_sys_nop ; $79 # ADDRESS core_sys_nop ; $7A # ADDRESS core_sys_nop ; $7B # ADDRESS core_sys_nop ; $7C # ADDRESS core_sys_nop ; $7D # ADDRESS core_sys_nop ; $7E # ADDRESS core_sys_nop ; $7F # ADDRESS core_sys_nop ; $80 # ADDRESS core_sys_nop ; $81 # ADDRESS core_sys_nop ; $82 # ADDRESS core_sys_nop ; $83 # ADDRESS core_sys_nop ; $84 # ADDRESS core_sys_nop ; $85 # ADDRESS core_sys_nop ; $86 # ADDRESS core_sys_nop ; $87 # ADDRESS core_sys_nop ; $88 # ADDRESS core_sys_nop ; $89 # ADDRESS core_sys_nop ; $8A # ADDRESS core_sys_nop ; $8B # ADDRESS core_sys_nop ; $8C # ADDRESS core_sys_nop ; $8D # ADDRESS core_sys_nop ; $8E # ADDRESS core_sys_nop ; $8F # ADDRESS core_sys_nop ; $90 # ADDRESS core_sys_nop ; $91 # ADDRESS core_sys_nop ; $92 # ADDRESS core_sys_nop ; $93 # ADDRESS core_sys_nop ; $94 # ADDRESS core_sys_nop ; $95 # ADDRESS core_sys_nop ; $96 # ADDRESS core_sys_nop ; $97 # ADDRESS core_sys_nop ; $98 # ADDRESS core_sys_nop ; $99 # ADDRESS core_sys_nop ; $9A # ADDRESS core_sys_nop ; $9B # ADDRESS core_sys_nop ; $9C # ADDRESS core_sys_nop ; $9D # ADDRESS core_sys_nop ; $9E # ADDRESS core_sys_nop ; $9F # ADDRESS core_sys_nop ; $A0 # ADDRESS core_sys_nop ; $A1 # ADDRESS core_sys_nop ; $A2 # ADDRESS core_sys_nop ; $A3 # ADDRESS core_sys_nop ; $A4 # ADDRESS core_sys_nop ; $A5 # ADDRESS core_sys_nop ; $A6 # ADDRESS core_sys_nop ; $A7 # ADDRESS core_sys_nop ; $A8 # ADDRESS core_sys_reboot ; $A9 #169 ADDRESS core_sys_nop ; $AA # ADDRESS core_sys_nop ; $AB # ADDRESS core_sys_nop ; $AC # ADDRESS core_sys_nop ; $AD # ADDRESS core_sys_nop ; $AE # ADDRESS core_sys_nop ; $AF # ADDRESS core_sys_nop ; $B0 # ADDRESS core_sys_nop ; $B1 # ADDRESS core_sys_nop ; $B2 # ADDRESS core_sys_nop ; $B3 # ADDRESS core_sys_nop ; $B4 # ADDRESS core_sys_nop ; $B5 # ADDRESS core_sys_nop ; $B6 # ADDRESS core_sys_nop ; $B7 # ADDRESS core_sys_nop ; $B8 # ADDRESS core_sys_nop ; $B9 # ADDRESS core_sys_nop ; $BA # ADDRESS core_sys_nop ; $BB # ADDRESS core_sys_nop ; $BC # ADDRESS core_sys_nop ; $BD # ADDRESS core_sys_nop ; $BE # ADDRESS core_sys_nop ; $BF # ADDRESS core_sys_nop ; $C0 # ADDRESS core_sys_nop ; $C1 # ADDRESS core_sys_nop ; $C2 # ADDRESS core_sys_nop ; $C3 # ADDRESS core_sys_nop ; $C4 # ADDRESS core_sys_nop ; $C5 # ADDRESS core_sys_nop ; $C6 # ADDRESS core_sys_nop ; $C7 # ADDRESS core_sys_nop ; $C8 # ADDRESS core_sys_nop ; $C9 # ADDRESS core_sys_nop ; $CA # ADDRESS core_sys_nop ; $CB # ADDRESS core_sys_nop ; $CC # ADDRESS core_sys_nop ; $CD # ADDRESS core_sys_nop ; $CE # ADDRESS core_sys_nop ; $CF # ADDRESS core_sys_nop ; $D0 # ADDRESS core_sys_nop ; $D1 # ADDRESS core_sys_nop ; $D2 # ADDRESS core_sys_nop ; $D3 # ADDRESS core_sys_nop ; $D4 # ADDRESS core_sys_nop ; $D5 # ADDRESS core_sys_nop ; $D6 # ADDRESS core_sys_nop ; $D7 # ADDRESS core_sys_nop ; $D8 # ADDRESS core_sys_nop ; $D9 # ADDRESS core_sys_nop ; $DA # ADDRESS core_sys_nop ; $DB # ADDRESS core_sys_nop ; $DC # ADDRESS core_sys_nop ; $DD # ADDRESS core_sys_nop ; $DE # ADDRESS core_sys_nop ; $DF # ADDRESS core_sys_nop ; $E0 # ADDRESS core_sys_nop ; $E1 # ADDRESS core_sys_nop ; $E2 # ADDRESS core_sys_nop ; $E3 # ADDRESS core_sys_nop ; $E4 # ADDRESS core_sys_nop ; $E5 # ADDRESS core_sys_nop ; $E6 # ADDRESS core_sys_nop ; $E7 # ADDRESS core_sys_nop ; $E8 # ADDRESS core_sys_nop ; $E9 # ADDRESS core_sys_nop ; $EA # ADDRESS core_sys_nop ; $EB # ADDRESS core_sys_nop ; $EC # ADDRESS core_sys_nop ; $ED # ADDRESS core_sys_nop ; $EE # ADDRESS core_sys_nop ; $EF # ADDRESS core_sys_nop ; $F0 # ADDRESS core_sys_nop ; $F1 # ADDRESS core_sys_nop ; $F2 # ADDRESS core_sys_nop ; $F3 # ADDRESS core_sys_nop ; $F4 # ADDRESS core_sys_nop ; $F5 # ADDRESS core_sys_nop ; $F6 # ADDRESS core_sys_nop ; $F7 # ADDRESS core_sys_nop ; $F8 # ADDRESS core_sys_nop ; $F9 # ADDRESS core_sys_nop ; $FA # ADDRESS core_sys_nop ; $FB # ADDRESS core_sys_nop ; $FC # ADDRESS core_sys_nop ; $FD # ADDRESS core_sys_nop ; $FE # ADDRESS core_sys_nop ; $FF # ;****************************************************************************** ; Placeholder for system calls that haven't been implemented yet, but for which ; I want to reserve a place. core_sys_nop: RET ;****************************************************************************** ; sys_read system call core_sys_read: RET ;****************************************************************************** ; sys_write system call ; ; PARAMETERS ; G unsigned int fd ; H const char *buf ; J size_t count ; ; RETURN ; A size_t number of bytes written LABEL core_sys_write_exit AUTO LABEL core_sys_write_next_char AUTO core_sys_write: PUSH B PUSH Z.H0 CLR A CLR B CLR Z.H0 LD $0A B.B1 core_sys_write_next_char: CMP Z.H0 J.H0 JZ core_sys_write_exit LD @H.H0 B.B0 OUT B $7F INC A DEC J.H0 INC H.H0 JMP core_sys_write_next_char core_sys_write_exit: POP Z.H0 POP B RET ;****************************************************************************** ; sys_reboot system call ; These are the "magic numbers" that affect this system call. ; #define LINUX_REBOOT_CMD_RESTART 0x01234567 ; #define LINUX_REBOOT_CMD_HALT 0xCDEF0123 ; #define LINUX_REBOOT_CMD_CAD_ON 0x89ABCDEF ; #define LINUX_REBOOT_CMD_CAD_OFF 0x00000000 ; #define LINUX_REBOOT_CMD_POWER_OFF 0x4321FEDC ; #define LINUX_REBOOT_CMD_RESTART2 0xA1B2C3D4 ; #define LINUX_REBOOT_CMD_SW_SUSPEND 0xD000FCE2 ; #define LINUX_REBOOT_CMD_KEXEC 0x45584543 LABEL core_sys_reboot_exit AUTO core_sys_reboot: CMP $4321FEDC J.H0 ; This magic number means to power off. JNZ core_sys_reboot_exit CALL core_os_shut_down core_sys_reboot_exit: RET ;****************************************************************************** ; Output the contents of a register G as a hexadecimal number. LABEL core_os_hex_print_low_nybble AUTO LABEL core_os_hex_string AUTO core_os_hex_print_w0: CALL core_os_hex_print_b7 CALL core_os_hex_print_b6 CALL core_os_hex_print_b5 CALL core_os_hex_print_b4 CALL core_os_hex_print_b3 CALL core_os_hex_print_b2 CALL core_os_hex_print_b1 CALL core_os_hex_print_b0 RET core_os_hex_print_h1: CALL core_os_hex_print_b7 CALL core_os_hex_print_b6 CALL core_os_hex_print_b5 CALL core_os_hex_print_b4 RET core_os_hex_print_h0: CALL core_os_hex_print_b3 CALL core_os_hex_print_b2 CALL core_os_hex_print_b1 CALL core_os_hex_print_b0 RET core_os_hex_print_q3: CALL core_os_hex_print_b7 CALL core_os_hex_print_b6 RET core_os_hex_print_q2: CALL core_os_hex_print_b5 CALL core_os_hex_print_b4 RET core_os_hex_print_q1: CALL core_os_hex_print_b3 CALL core_os_hex_print_b2 RET core_os_hex_print_q0: CALL core_os_hex_print_b1 CALL core_os_hex_print_b0 RET core_os_hex_print_b7: PUSH G.B0 LD G.B7 G.B0 CALL core_os_hex_print_b0 POP G.B0 RET core_os_hex_print_b6: PUSH G.B0 LD G.B6 G.B0 CALL core_os_hex_print_b0 POP G.B0 RET core_os_hex_print_b5: PUSH G.B0 LD G.B5 G.B0 CALL core_os_hex_print_b0 POP G.B0 RET core_os_hex_print_b4: PUSH G.B0 LD G.B4 G.B0 CALL core_os_hex_print_b0 POP G.B0 RET core_os_hex_print_b3: PUSH G.B0 LD G.B3 G.B0 CALL core_os_hex_print_b0 POP G.B0 RET core_os_hex_print_b2: PUSH G.B0 LD G.B2 G.B0 CALL core_os_hex_print_b0 POP G.B0 RET core_os_hex_print_b1: PUSH G.B0 LD G.B1 G.B0 CALL core_os_hex_print_b0 POP G.B0 RET ; Convert byte core_os_hex_print_b0: PUSH G.B0 SHR $04 G.B0 CALL core_os_hex_print_low_nybble POP G.B0 AND $0F G.B0 CALL core_os_hex_print_low_nybble RET core_os_hex_print_low_nybble: PUSH G CLR A LD G.B0 A.B0 AND $0F A.B0 LD core_os_hex_string G.H0 ; Load the pointer to the string into H.H0 register ADD A.B0 G.H0 LD @G.H0 A.B0 LD $0A A.B1 OUT A $7F POP G RET ;****************************************************************************** ; The output functions index into this string to perform the output core_os_hex_string: STRING "0123456789ABCDEF" ;****************************************************************************** ; Output a new line to the console. LABEL core_os_label_newline AUTO core_os_print_newline: PUSH A PUSH G LD core_os_label_newline G CALL core_os_puts POP G POP A RET ;****************************************************************************** ; core_os_print_reg: PUSH G PUSH H CALL core_os_puts LD H G CALL core_os_hex_print_w0 CALL core_os_print_newline POP H POP G RET ;****************************************************************************** ; LABEL core_os_exception_label AUTO LABEL core_os_exception_segment_label AUTO LABEL core_os_exception_address_label AUTO LABEL core_os_label_reg_a AUTO LABEL core_os_label_reg_b AUTO LABEL core_os_label_reg_c AUTO LABEL core_os_label_reg_d AUTO LABEL core_os_label_reg_e AUTO LABEL core_os_label_reg_g AUTO LABEL core_os_label_reg_h AUTO LABEL core_os_label_reg_j AUTO LABEL core_os_label_reg_k AUTO LABEL core_os_label_reg_l AUTO LABEL core_os_label_reg_m AUTO LABEL core_os_label_reg_z AUTO LABEL core_os_label_reg_f AUTO LABEL core_os_label_reg_i AUTO LABEL core_os_label_reg_p AUTO LABEL core_os_label_reg_s AUTO core_os_exception_handler: ; Maybe I need a PUSHALL instruction... PUSH Z PUSH M PUSH L PUSH K PUSH J PUSH H PUSH G PUSH E PUSH D PUSH C PUSH B PUSH A LD core_os_label_reg_a G POP H CALL core_os_print_reg LD core_os_label_reg_b G POP H CALL core_os_print_reg LD core_os_label_reg_c G POP H CALL core_os_print_reg LD core_os_label_reg_d G POP H CALL core_os_print_reg LD core_os_label_reg_e G POP H CALL core_os_print_reg LD core_os_label_reg_g G POP H CALL core_os_print_reg LD core_os_label_reg_h G POP H CALL core_os_print_reg LD core_os_label_reg_j G POP H CALL core_os_print_reg LD core_os_label_reg_k G POP H CALL core_os_print_reg LD core_os_label_reg_l G POP H CALL core_os_print_reg LD core_os_label_reg_m G POP H CALL core_os_print_reg LD core_os_label_reg_z G POP H CALL core_os_print_reg ; Z.B0 = exception number POP Z.B0 ; M.H0 = stack frame LD S.H0 M.H0 LD core_os_label_reg_p G LD @M.H0 H LD H B CALL core_os_print_reg ADD $08 M.H0 LD core_os_label_reg_f G LD @M.H0 H CALL core_os_print_reg ADD $08 M.H0 LD core_os_label_reg_i G LD @M.H0 H CALL core_os_print_reg ADD $08 M.H0 LD core_os_label_reg_s G LD @M.H0 H CALL core_os_print_reg LD core_os_exception_label G CALL core_os_puts LD Z.B0 G.B0 CALL core_os_hex_print_b0 LD core_os_exception_segment_label G CALL core_os_puts LD B G CALL core_os_hex_print_h1 LD core_os_exception_address_label G CALL core_os_puts LD B G CALL core_os_hex_print_h0 CALL core_os_shut_down IRET core_os_exception_handler_00: PUSH $00 JMP core_os_exception_handler core_os_exception_handler_01: PUSH $01 JMP core_os_exception_handler core_os_exception_handler_02: PUSH $02 JMP core_os_exception_handler core_os_exception_handler_03: PUSH $03 JMP core_os_exception_handler core_os_exception_handler_04: PUSH $04 JMP core_os_exception_handler core_os_exception_handler_05: PUSH $05 JMP core_os_exception_handler core_os_exception_handler_06: PUSH $06 JMP core_os_exception_handler core_os_exception_handler_07: PUSH $07 JMP core_os_exception_handler core_os_exception_handler_08: PUSH $08 JMP core_os_exception_handler core_os_exception_handler_09: PUSH $09 JMP core_os_exception_handler core_os_exception_handler_0A: PUSH $0A JMP core_os_exception_handler core_os_exception_handler_0B: PUSH $0B JMP core_os_exception_handler core_os_exception_handler_0C: PUSH $0C JMP core_os_exception_handler core_os_exception_handler_0D: PUSH $0D JMP core_os_exception_handler core_os_exception_handler_0E: PUSH $0E JMP core_os_exception_handler core_os_exception_handler_0F: PUSH $0F JMP core_os_exception_handler core_os_label_reg_a: STRING "A: $\0" core_os_label_reg_b: STRING "B: $\0" core_os_label_reg_c: STRING "C: $\0" core_os_label_reg_d: STRING "D: $\0" core_os_label_reg_e: STRING "E: $\0" core_os_label_reg_g: STRING "G: $\0" core_os_label_reg_h: STRING "H: $\0" core_os_label_reg_j: STRING "J: $\0" core_os_label_reg_k: STRING "K: $\0" core_os_label_reg_l: STRING "L: $\0" core_os_label_reg_m: STRING "M: $\0" core_os_label_reg_z: STRING "Z: $\0" core_os_label_reg_f: STRING "F: $\0" core_os_label_reg_i: STRING "I: $\0" core_os_label_reg_p: STRING "P: $\0" core_os_label_reg_s: STRING "S: $\0" core_os_label_newline: STRING "\n\0" core_os_exception_label: STRING "\nException \0" core_os_exception_segment_label: STRING " at segment $\0" core_os_exception_address_label: STRING " address $\0"
31.192068
96
0.526986
7cf93cf51dee7cc5b3016cad851c4bbe624f95ea
13,280
asm
Assembly
vpx_dsp/x86/sad_ssse3.asm
prometheansacrifice/esy-vpx
3aae0f7164b9e43a0146b078a7c125d70835c419
[ "BSD-3-Clause" ]
2,151
2020-04-18T07:31:17.000Z
2022-03-31T08:39:18.000Z
vpx_dsp/x86/sad_ssse3.asm
prometheansacrifice/esy-vpx
3aae0f7164b9e43a0146b078a7c125d70835c419
[ "BSD-3-Clause" ]
395
2020-04-18T08:22:18.000Z
2021-12-08T13:04:49.000Z
vpx_dsp/x86/sad_ssse3.asm
prometheansacrifice/esy-vpx
3aae0f7164b9e43a0146b078a7c125d70835c419
[ "BSD-3-Clause" ]
338
2020-04-18T08:03:10.000Z
2022-03-29T12:33:22.000Z
; ; Copyright (c) 2010 The WebM project authors. All Rights Reserved. ; ; Use of this source code is governed by a BSD-style license ; that can be found in the LICENSE file in the root of the source ; tree. An additional intellectual property rights grant can be found ; in the file PATENTS. All contributing project authors may ; be found in the AUTHORS file in the root of the source tree. ; %include "vpx_ports/x86_abi_support.asm" %macro PROCESS_16X2X3 1 %if %1 movdqa xmm0, XMMWORD PTR [rsi] lddqu xmm5, XMMWORD PTR [rdi] lddqu xmm6, XMMWORD PTR [rdi+1] lddqu xmm7, XMMWORD PTR [rdi+2] psadbw xmm5, xmm0 psadbw xmm6, xmm0 psadbw xmm7, xmm0 %else movdqa xmm0, XMMWORD PTR [rsi] lddqu xmm1, XMMWORD PTR [rdi] lddqu xmm2, XMMWORD PTR [rdi+1] lddqu xmm3, XMMWORD PTR [rdi+2] psadbw xmm1, xmm0 psadbw xmm2, xmm0 psadbw xmm3, xmm0 paddw xmm5, xmm1 paddw xmm6, xmm2 paddw xmm7, xmm3 %endif movdqa xmm0, XMMWORD PTR [rsi+rax] lddqu xmm1, XMMWORD PTR [rdi+rdx] lddqu xmm2, XMMWORD PTR [rdi+rdx+1] lddqu xmm3, XMMWORD PTR [rdi+rdx+2] lea rsi, [rsi+rax*2] lea rdi, [rdi+rdx*2] psadbw xmm1, xmm0 psadbw xmm2, xmm0 psadbw xmm3, xmm0 paddw xmm5, xmm1 paddw xmm6, xmm2 paddw xmm7, xmm3 %endmacro %macro PROCESS_16X2X3_OFFSET 2 %if %1 movdqa xmm0, XMMWORD PTR [rsi] movdqa xmm4, XMMWORD PTR [rdi] movdqa xmm7, XMMWORD PTR [rdi+16] movdqa xmm5, xmm7 palignr xmm5, xmm4, %2 movdqa xmm6, xmm7 palignr xmm6, xmm4, (%2+1) palignr xmm7, xmm4, (%2+2) psadbw xmm5, xmm0 psadbw xmm6, xmm0 psadbw xmm7, xmm0 %else movdqa xmm0, XMMWORD PTR [rsi] movdqa xmm4, XMMWORD PTR [rdi] movdqa xmm3, XMMWORD PTR [rdi+16] movdqa xmm1, xmm3 palignr xmm1, xmm4, %2 movdqa xmm2, xmm3 palignr xmm2, xmm4, (%2+1) palignr xmm3, xmm4, (%2+2) psadbw xmm1, xmm0 psadbw xmm2, xmm0 psadbw xmm3, xmm0 paddw xmm5, xmm1 paddw xmm6, xmm2 paddw xmm7, xmm3 %endif movdqa xmm0, XMMWORD PTR [rsi+rax] movdqa xmm4, XMMWORD PTR [rdi+rdx] movdqa xmm3, XMMWORD PTR [rdi+rdx+16] movdqa xmm1, xmm3 palignr xmm1, xmm4, %2 movdqa xmm2, xmm3 palignr xmm2, xmm4, (%2+1) palignr xmm3, xmm4, (%2+2) lea rsi, [rsi+rax*2] lea rdi, [rdi+rdx*2] psadbw xmm1, xmm0 psadbw xmm2, xmm0 psadbw xmm3, xmm0 paddw xmm5, xmm1 paddw xmm6, xmm2 paddw xmm7, xmm3 %endmacro %macro PROCESS_16X16X3_OFFSET 2 %2_aligned_by_%1: sub rdi, %1 PROCESS_16X2X3_OFFSET 1, %1 PROCESS_16X2X3_OFFSET 0, %1 PROCESS_16X2X3_OFFSET 0, %1 PROCESS_16X2X3_OFFSET 0, %1 PROCESS_16X2X3_OFFSET 0, %1 PROCESS_16X2X3_OFFSET 0, %1 PROCESS_16X2X3_OFFSET 0, %1 PROCESS_16X2X3_OFFSET 0, %1 jmp %2_store_off %endmacro %macro PROCESS_16X8X3_OFFSET 2 %2_aligned_by_%1: sub rdi, %1 PROCESS_16X2X3_OFFSET 1, %1 PROCESS_16X2X3_OFFSET 0, %1 PROCESS_16X2X3_OFFSET 0, %1 PROCESS_16X2X3_OFFSET 0, %1 jmp %2_store_off %endmacro SECTION .text ;void int vpx_sad16x16x3_ssse3( ; unsigned char *src_ptr, ; int src_stride, ; unsigned char *ref_ptr, ; int ref_stride, ; int *results) global sym(vpx_sad16x16x3_ssse3) PRIVATE sym(vpx_sad16x16x3_ssse3): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 5 SAVE_XMM 7 push rsi push rdi push rcx ; end prolog mov rsi, arg(0) ;src_ptr mov rdi, arg(2) ;ref_ptr mov rdx, 0xf and rdx, rdi jmp .vpx_sad16x16x3_ssse3_skiptable .vpx_sad16x16x3_ssse3_jumptable: dd .vpx_sad16x16x3_ssse3_aligned_by_0 - .vpx_sad16x16x3_ssse3_do_jump dd .vpx_sad16x16x3_ssse3_aligned_by_1 - .vpx_sad16x16x3_ssse3_do_jump dd .vpx_sad16x16x3_ssse3_aligned_by_2 - .vpx_sad16x16x3_ssse3_do_jump dd .vpx_sad16x16x3_ssse3_aligned_by_3 - .vpx_sad16x16x3_ssse3_do_jump dd .vpx_sad16x16x3_ssse3_aligned_by_4 - .vpx_sad16x16x3_ssse3_do_jump dd .vpx_sad16x16x3_ssse3_aligned_by_5 - .vpx_sad16x16x3_ssse3_do_jump dd .vpx_sad16x16x3_ssse3_aligned_by_6 - .vpx_sad16x16x3_ssse3_do_jump dd .vpx_sad16x16x3_ssse3_aligned_by_7 - .vpx_sad16x16x3_ssse3_do_jump dd .vpx_sad16x16x3_ssse3_aligned_by_8 - .vpx_sad16x16x3_ssse3_do_jump dd .vpx_sad16x16x3_ssse3_aligned_by_9 - .vpx_sad16x16x3_ssse3_do_jump dd .vpx_sad16x16x3_ssse3_aligned_by_10 - .vpx_sad16x16x3_ssse3_do_jump dd .vpx_sad16x16x3_ssse3_aligned_by_11 - .vpx_sad16x16x3_ssse3_do_jump dd .vpx_sad16x16x3_ssse3_aligned_by_12 - .vpx_sad16x16x3_ssse3_do_jump dd .vpx_sad16x16x3_ssse3_aligned_by_13 - .vpx_sad16x16x3_ssse3_do_jump dd .vpx_sad16x16x3_ssse3_aligned_by_14 - .vpx_sad16x16x3_ssse3_do_jump dd .vpx_sad16x16x3_ssse3_aligned_by_15 - .vpx_sad16x16x3_ssse3_do_jump .vpx_sad16x16x3_ssse3_skiptable: call .vpx_sad16x16x3_ssse3_do_jump .vpx_sad16x16x3_ssse3_do_jump: pop rcx ; get the address of do_jump mov rax, .vpx_sad16x16x3_ssse3_jumptable - .vpx_sad16x16x3_ssse3_do_jump add rax, rcx ; get the absolute address of vpx_sad16x16x3_ssse3_jumptable movsxd rax, dword [rax + 4*rdx] ; get the 32 bit offset from the jumptable add rcx, rax movsxd rax, dword ptr arg(1) ;src_stride movsxd rdx, dword ptr arg(3) ;ref_stride jmp rcx PROCESS_16X16X3_OFFSET 0, .vpx_sad16x16x3_ssse3 PROCESS_16X16X3_OFFSET 1, .vpx_sad16x16x3_ssse3 PROCESS_16X16X3_OFFSET 2, .vpx_sad16x16x3_ssse3 PROCESS_16X16X3_OFFSET 3, .vpx_sad16x16x3_ssse3 PROCESS_16X16X3_OFFSET 4, .vpx_sad16x16x3_ssse3 PROCESS_16X16X3_OFFSET 5, .vpx_sad16x16x3_ssse3 PROCESS_16X16X3_OFFSET 6, .vpx_sad16x16x3_ssse3 PROCESS_16X16X3_OFFSET 7, .vpx_sad16x16x3_ssse3 PROCESS_16X16X3_OFFSET 8, .vpx_sad16x16x3_ssse3 PROCESS_16X16X3_OFFSET 9, .vpx_sad16x16x3_ssse3 PROCESS_16X16X3_OFFSET 10, .vpx_sad16x16x3_ssse3 PROCESS_16X16X3_OFFSET 11, .vpx_sad16x16x3_ssse3 PROCESS_16X16X3_OFFSET 12, .vpx_sad16x16x3_ssse3 PROCESS_16X16X3_OFFSET 13, .vpx_sad16x16x3_ssse3 PROCESS_16X16X3_OFFSET 14, .vpx_sad16x16x3_ssse3 .vpx_sad16x16x3_ssse3_aligned_by_15: PROCESS_16X2X3 1 PROCESS_16X2X3 0 PROCESS_16X2X3 0 PROCESS_16X2X3 0 PROCESS_16X2X3 0 PROCESS_16X2X3 0 PROCESS_16X2X3 0 PROCESS_16X2X3 0 .vpx_sad16x16x3_ssse3_store_off: mov rdi, arg(4) ;Results movq xmm0, xmm5 psrldq xmm5, 8 paddw xmm0, xmm5 movd [rdi], xmm0 ;- movq xmm0, xmm6 psrldq xmm6, 8 paddw xmm0, xmm6 movd [rdi+4], xmm0 ;- movq xmm0, xmm7 psrldq xmm7, 8 paddw xmm0, xmm7 movd [rdi+8], xmm0 ; begin epilog pop rcx pop rdi pop rsi RESTORE_XMM UNSHADOW_ARGS pop rbp ret ;void int vpx_sad16x8x3_ssse3( ; unsigned char *src_ptr, ; int src_stride, ; unsigned char *ref_ptr, ; int ref_stride, ; int *results) global sym(vpx_sad16x8x3_ssse3) PRIVATE sym(vpx_sad16x8x3_ssse3): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 5 SAVE_XMM 7 push rsi push rdi push rcx ; end prolog mov rsi, arg(0) ;src_ptr mov rdi, arg(2) ;ref_ptr mov rdx, 0xf and rdx, rdi jmp .vpx_sad16x8x3_ssse3_skiptable .vpx_sad16x8x3_ssse3_jumptable: dd .vpx_sad16x8x3_ssse3_aligned_by_0 - .vpx_sad16x8x3_ssse3_do_jump dd .vpx_sad16x8x3_ssse3_aligned_by_1 - .vpx_sad16x8x3_ssse3_do_jump dd .vpx_sad16x8x3_ssse3_aligned_by_2 - .vpx_sad16x8x3_ssse3_do_jump dd .vpx_sad16x8x3_ssse3_aligned_by_3 - .vpx_sad16x8x3_ssse3_do_jump dd .vpx_sad16x8x3_ssse3_aligned_by_4 - .vpx_sad16x8x3_ssse3_do_jump dd .vpx_sad16x8x3_ssse3_aligned_by_5 - .vpx_sad16x8x3_ssse3_do_jump dd .vpx_sad16x8x3_ssse3_aligned_by_6 - .vpx_sad16x8x3_ssse3_do_jump dd .vpx_sad16x8x3_ssse3_aligned_by_7 - .vpx_sad16x8x3_ssse3_do_jump dd .vpx_sad16x8x3_ssse3_aligned_by_8 - .vpx_sad16x8x3_ssse3_do_jump dd .vpx_sad16x8x3_ssse3_aligned_by_9 - .vpx_sad16x8x3_ssse3_do_jump dd .vpx_sad16x8x3_ssse3_aligned_by_10 - .vpx_sad16x8x3_ssse3_do_jump dd .vpx_sad16x8x3_ssse3_aligned_by_11 - .vpx_sad16x8x3_ssse3_do_jump dd .vpx_sad16x8x3_ssse3_aligned_by_12 - .vpx_sad16x8x3_ssse3_do_jump dd .vpx_sad16x8x3_ssse3_aligned_by_13 - .vpx_sad16x8x3_ssse3_do_jump dd .vpx_sad16x8x3_ssse3_aligned_by_14 - .vpx_sad16x8x3_ssse3_do_jump dd .vpx_sad16x8x3_ssse3_aligned_by_15 - .vpx_sad16x8x3_ssse3_do_jump .vpx_sad16x8x3_ssse3_skiptable: call .vpx_sad16x8x3_ssse3_do_jump .vpx_sad16x8x3_ssse3_do_jump: pop rcx ; get the address of do_jump mov rax, .vpx_sad16x8x3_ssse3_jumptable - .vpx_sad16x8x3_ssse3_do_jump add rax, rcx ; get the absolute address of vpx_sad16x8x3_ssse3_jumptable movsxd rax, dword [rax + 4*rdx] ; get the 32 bit offset from the jumptable add rcx, rax movsxd rax, dword ptr arg(1) ;src_stride movsxd rdx, dword ptr arg(3) ;ref_stride jmp rcx PROCESS_16X8X3_OFFSET 0, .vpx_sad16x8x3_ssse3 PROCESS_16X8X3_OFFSET 1, .vpx_sad16x8x3_ssse3 PROCESS_16X8X3_OFFSET 2, .vpx_sad16x8x3_ssse3 PROCESS_16X8X3_OFFSET 3, .vpx_sad16x8x3_ssse3 PROCESS_16X8X3_OFFSET 4, .vpx_sad16x8x3_ssse3 PROCESS_16X8X3_OFFSET 5, .vpx_sad16x8x3_ssse3 PROCESS_16X8X3_OFFSET 6, .vpx_sad16x8x3_ssse3 PROCESS_16X8X3_OFFSET 7, .vpx_sad16x8x3_ssse3 PROCESS_16X8X3_OFFSET 8, .vpx_sad16x8x3_ssse3 PROCESS_16X8X3_OFFSET 9, .vpx_sad16x8x3_ssse3 PROCESS_16X8X3_OFFSET 10, .vpx_sad16x8x3_ssse3 PROCESS_16X8X3_OFFSET 11, .vpx_sad16x8x3_ssse3 PROCESS_16X8X3_OFFSET 12, .vpx_sad16x8x3_ssse3 PROCESS_16X8X3_OFFSET 13, .vpx_sad16x8x3_ssse3 PROCESS_16X8X3_OFFSET 14, .vpx_sad16x8x3_ssse3 .vpx_sad16x8x3_ssse3_aligned_by_15: PROCESS_16X2X3 1 PROCESS_16X2X3 0 PROCESS_16X2X3 0 PROCESS_16X2X3 0 .vpx_sad16x8x3_ssse3_store_off: mov rdi, arg(4) ;Results movq xmm0, xmm5 psrldq xmm5, 8 paddw xmm0, xmm5 movd [rdi], xmm0 ;- movq xmm0, xmm6 psrldq xmm6, 8 paddw xmm0, xmm6 movd [rdi+4], xmm0 ;- movq xmm0, xmm7 psrldq xmm7, 8 paddw xmm0, xmm7 movd [rdi+8], xmm0 ; begin epilog pop rcx pop rdi pop rsi RESTORE_XMM UNSHADOW_ARGS pop rbp ret
35.603217
95
0.565361
dde0a93957cf694dcc691bdd69b781417a918973
4,721
asm
Assembly
dv3/fd/rsect.asm
olifink/smsqe
c546d882b26566a46d71820d1539bed9ea8af108
[ "BSD-2-Clause" ]
null
null
null
dv3/fd/rsect.asm
olifink/smsqe
c546d882b26566a46d71820d1539bed9ea8af108
[ "BSD-2-Clause" ]
null
null
null
dv3/fd/rsect.asm
olifink/smsqe
c546d882b26566a46d71820d1539bed9ea8af108
[ "BSD-2-Clause" ]
null
null
null
; DV3 Standard Floppy Disk Read Sector  1998 Tony Tebby section dv3 xdef fd_rdirect ; direct sector read xdef fd_rsint ; read sector (internal) xdef fd_ckroot ; internal check root sector xdef fd_rroot ; internal read root sector xref fd_hold ; reserve the controller xref fd_release ; release the controller xref fd_ckrw ; read root sector and check xref fd_seek ; seek to track xref fd_rphys ; read sector (physical) xref fd_reseek ; re-seek after error xref fd_reseek0 ; recalibrate with error recovery xref dv3_slen ; set sector length include 'dev8_keys_sys' include 'dev8_keys_err' include 'dev8_keys_qlhw' include 'dev8_dv3_keys' include 'dev8_dv3_fd_keys' include 'dev8_mac_assert' ;+++ ; This routine read sectors from a Floppy disk for direct sector IO ; ; d0 cr cylinder + side + sector / error code ; d2 c p number of sectors ; d7 c p drive ID / number ; a1 c p address to read into ; a3 c p linkage block ; a4 c p drive definition ; ; status return 0, ERR.NC or ERR.MCHK ; ;--- fd_rdirect jsr fd_hold ; hold and select beq.s fdr_doread rts ;+++ ; This routine reads sectors from a Floppy disk for internal operations ; ; d0 cr cylinder + side + sector / error code ; d2 c p number of sectors ; d7 c p drive ID / number ; a1 c p address to read into ; a3 c p linkage block ; a4 c p drive definition ; ; status return 0, ERR.NC or ERR.MCHK ; ;--- fd_rsint jsr fd_hold ; hold and select bne.s fdr_rts btst d7,fdl_stpb(a3) ; drive stopped? bne.s fdr_doread ; ... no jsr fd_ckrw ; check disk not changed bne.s fdr_done fdr_doread bsr.s fdr_reads ; read with seek error recovery fdr_done jmp fd_release ; ... let it go ;+++ ; This routine reads the root sector to check for new medium ; ; d0 r error code ; d2 s ; d7 c p drive ID / number ; a1 c p address to read into ; a3 c p linkage block ; a4 c p drive definition ; ; status return 0, ERR.NC or ERR.MCHK ; ;--- fd_rroot jsr fd_hold ; hold and select bne.s fdr_rts tst.b ddf_lock(a4) ; locked? beq.s fdrr_new ; ... no, could be new medium bsr.s fd_ckroot ; ... yes, do not change density bra.s fdr_done fdrr_new moveq #1,d2 ; number of sectors move.l d2,fdl_sadd(a3) ; ... and the root sector number! st fdl_ridd(a3) ; retry read ID with different densities jsr fd_reseek0 ; find track 0 and density sf fdl_ridd(a3) bne.s fdr_done ; bad move.b fdf_slen(a4),ddf_slflag(a4) ; set sector length flag jsr dv3_slen bsr.s fdr_readn ; read with read error recovery ble.s fdr_done ; ... OK or bad medium pea fdr_done bra.s fdr_readn ; try again ;+++ ; Check root sector (from fd_ckwr called from within read / write sector) ; ; d0 r error code ; d2 s ; d7 c p drive ID / number ; a1 c p address to read into ; a3 c p linkage block ; a4 c p drive definition ; ; status return 0 or ERR.MCHK ; ;--- fd_ckroot moveq #1,d0 moveq #1,d2 ; one sector only ;+++ ; Read sector with seek error recovery ; ; d0 cr sector to read / error code ; d2 cp number of sectors to read ; d7 c p drive ID / number ; a1 c p address to read into ; a3 c p linkage block ; a4 c p drive definition ; ; status return 0 or ERR.MCHK ; ;--- fdr_reads move.l d0,fdl_sadd(a3) ; sector required bsr.s fdr_read ; read sector ble.s fdr_rts ; ... OK or bad medium jsr fd_reseek ; re-seek bne.s fdr_mchk ; ... bad medium bsr.s fdr_readn ; re-read beq.s fdr_rts ; OK fdr_mchk moveq #err.mchk,d0 fdr_rts rts ;+++ ; (Seek and) read sector with read error recovery ; ; d0 r error code ; d2 cp number of sectors to read ; d7 c p drive ID / number ; a1 c p address to read into ; a3 c p linkage block ; a4 c p drive definition ; ; status return 0, ERR.MCHK or positive conventional status return ; ;--- fdr_read move.b fdl_trak(a3),d0 ; track required cmp.b fdf_ctrk(a4),d0 ; the right track? beq.s fdr_readn ; ... yes jsr fd_seek ; ... no, seek ;+++ ; Read sector (no seek) with read error recovery ; ; d0 r error code ; d2 cp number of sectors to read ; d7 c p drive ID / number ; a1 c p address to read into ; a3 c p linkage block ; a4 c p drive definition ; ; status return 0, ERR.MCHK or positive conventional status return ; ;--- fdr_readn fdr_try1 jsr fd_rphys ; physical read sector ble.s fdr_rts assert fdcs.orun,fdcs.derr-1,fdcs.seke-2,fdcs.nadd-3 cmp.b #fdcs.derr,d0 blt.s fdr_try1 ; always retry overrun bgt.s fdr_rts ; seek error or no address mark fdr_try2 ; retry data error once jsr fd_rphys ; physical read sector ble.s fdr_rts assert fdcs.orun,fdcs.derr-1,fdcs.seke-2,fdcs.nadd-3 cmp.b #fdcs.orun,d0 beq.s fdr_try2 ; always retry overrun rts end
22.480952
73
0.690108
a1f015fff69f2446600615af68271756d35b44e7
448
asm
Assembly
programs/oeis/332/A332569.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/332/A332569.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/332/A332569.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A332569: a(n) = Sum_{k=1..n} floor(n/k) * ceiling(n/k). ; 1,5,12,23,36,54,74,97,125,156,186,226,268,306,354,409,458,515,574,636,710,778,838,922,1013,1086,1168,1264,1350,1452,1556,1651,1762,1864,1966,2105,2234,2332,2448,2594,2726,2864,3004,3132,3294,3444,3564,3736,3917,4067 mul $0,2 lpb $0 mov $2,$0 sub $0,1 div $2,2 seq $2,203 ; a(n) = sigma(n), the sum of the divisors of n. Also called sigma_1(n). add $1,$2 lpe add $1,1 mov $0,$1
32
217
0.658482
5a4daa4e5d7507883ea6ddb1bc1c2ddccf0891fe
533
asm
Assembly
programs/oeis/310/A310419.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/310/A310419.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/310/A310419.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A310419: Coordination sequence Gal.5.130.1 where G.u.t.v denotes the coordination sequence for a vertex of type v in tiling number t in the Galebach list of u-uniform tilings. ; 1,4,10,14,20,26,30,36,40,44,50,54,60,66,70,76,80,84,90,94,100,106,110,116,120,124,130,134,140,146,150,156,160,164,170,174,180,186,190,196,200,204,210,214,220,226,230,236,240,244 mov $2,$0 cmp $2,0 mov $4,$0 add $0,$2 mov $3,$0 mul $3,2 cal $0,188510 ; Expansion of x*(1 + x^2)/(1 + x^4) in powers of x. sub $3,$0 mov $1,$3 mov $5,$4 mul $5,3 add $1,$5
33.3125
179
0.679174
5adb661d97091715e5539a25fc4afabf9222b6e0
4,984
asm
Assembly
win32/dpmi examples/fasm sourece PMode.asm
QAston/fasm-2006
efc8911cc8b21da2b73865e30cf4c788048fe536
[ "MIT" ]
null
null
null
win32/dpmi examples/fasm sourece PMode.asm
QAston/fasm-2006
efc8911cc8b21da2b73865e30cf4c788048fe536
[ "MIT" ]
null
null
null
win32/dpmi examples/fasm sourece PMode.asm
QAston/fasm-2006
efc8911cc8b21da2b73865e30cf4c788048fe536
[ "MIT" ]
null
null
null
format mz heap 0 entry main:start segment main use16 start: mov ax,ds ;ds wskazuje na Program Segment Prefix mov dx,[2Ch] push cs cs pop ds es mov [cs:SPSP],ax ;[SPSP:2ch]- numer segmentu z kopia zmiennych srodowiskowych mov [cs:SEnvVar],dx test386: pushf xor ah,ah mov [cs:AErrorCode],T386ErrorCode push ax popf pushf pop ax and ah,0f0h cmp ah,0f0h je error ;jesli nie 386 mov ah,70h push ax popf pushf pop ax and ah,70h jz error ;jesli nie 386 popf present_386: ;jesli jest conajmniej 386 mov eax,ds shl eax,4 mov [cs:AProgramBase],eax ;adres bazowy programu =ds/16 ; mov [cs:AErrorCode],TPModeErrorCode mov eax,buffer shl eax,4 sub eax,[cs:AProgramBase] ;adres bufora=(buffer/16)-adres bazowy programu mov [cs:ABuffer],eax smsw ax ; test al,1 ;czy procesor jest w PM ; jz error ;jesli nie to error push cs code32 dpmi: mov ax,1687h ;funkcja DPMI installation check int 2Fh mov [cs:AErrorCode],TDPMIErrorCode test ax,ax ;gdy ax=0 to DPMI zainstalowane jnz error test bl,1 ;czy obsluguje programy 32-bitowe jz error mov word [cs:ADPMIModeSwitch],di ;zapisz adres procedury DPMI mov word [cs:ADPMIModeSwitch+2],es mov bx,si ;si=liczba paragrafow zajeta przez DPMI mov ah,48h int 21h ;Alokuj pamiec na dane DPMI mov [cs:AErrorCode],TMemoryErrorCode jc error mov ds,[SEnvVar] ;ds=segment zmiennych srodowiskowych mov es,ax ;es=segment danych DPMI mov ax,1 ;gdy ax=1 zmien na PMode mov [cs:AErrorCode],TDPMIErrorCode call far [cs:ADPMIModeSwitch] ;wywolaj procedure DPMI zmieniajaca tryb na PMode jc error mov cx,1 ;alokuj 1 deskryptor xor ax,ax ;ax=0 int 31h-alokuj deskryptor LTD int 31h ;alokuj deskryptor dla kodu gry mov si,ax ;bazowy selektor kodu do si xor ax,ax int 31h ;alokuj deskryptor dla danych gry mov di,ax ;bazowy selektor danych do di mov dx,cs lar cx,dx ;lar-Load Access Rights cl=0 ch=accesrights shr cx,8 ;ch=cl cl=0 or cx,1100000000000000b ;ustaw 14 i 15 bit cx mov bx,si ;selektor kodu do bx mov ax,9 int 31h ;ustaw prawa dostepu do deskryptora kodu mov dx,ds lar cx,dx shr cx,8 or cx,1100000000000000b mov bx,di int 31h ;ustaw prawa dostepu do deskryptora danych mov ecx,main shl ecx,4 ;w bx selektor danych mov dx,cx ;do cx:dx liniowy adres segmentu main shr ecx,16 mov ax,7 int 31h ;ustaw bazowy adres deskryptora danych movzx ecx,word[esp+2] ;do ecx stary cs shl ecx,4 mov dx,cx shr ecx,16 mov bx,si int 31h ;ustaw bazowy adres deskryptora kodu mov cx,0FFFFh mov dx,0FFFFh mov ax,8 ;ustaw limit segmentu kodu na 4Gb int 31h mov bx,di ;ustaw limit segmentu danych na 4Gb int 31h mov ax,ds mov ds,di ;ds=es=selektor danych mov [SPSP],es ;cs=selektor kodu mov [SEnvVar],ax mov es,di pop ebx movzx ebx,bx use32 push esi push ebx ;powroc do kodu (do code32) retfd code32: use32 mov dx,100 call aloc_mem call free_mem koniec: xor ah,ah int 16h Koniec: mov ax,4c00h int 21h aloc_mem: ;na wejsciu podaj w dx liczbe KB do alokacji push eax ebx ecx edi esi mov ax,500h ;funkcja pobierz informacje o wolnej pamieci mov edi,[ABuffer] ;do bufora int 31h mov ebx,[edi] ;zaladuj maksymalna liczbe bajtow do zaalokowania do ebx allocate_dpmi_memory: shl edx,10 jz dpmi_memory_size_ok cmp ebx,edx ;sprawdz czy da sie zaalokowac zadana liczbe KBajtow jbe dpmi_memory_size_ok mov ebx,edx dpmi_memory_size_ok: mov [AMemoryEnd],ebx mov ecx,ebx shr ebx,16 mov ax,501h int 31h jnc dpmi_memory_ok mov ebx,[AMemoryEnd] shr ebx,1 mov [AErrorCode],TOutOfMemoryErrorCode cmp ebx,4000h jb error jmp allocate_dpmi_memory dpmi_memory_ok: shl ebx,16 mov bx,cx sub ebx,[AProgramBase] jc error mov [AMemoryStart],ebx mov word[MemoryBlockHandle],si mov word[MemoryBlockHandle+2],di add [AMemoryEnd],ebx mov edx,ebx pop esi edi ecx ebx eax ret ;na wyjsciu prosedura podaje w edx miejsce w ktorymsa zaalokowane KB free_mem: push ax si di mov ax,0502h mov si,word[MemoryBlockHandle] mov di,word[MemoryBlockHandle+2] int 31h jc Koniec pop di si ax ret error: mov ah,9 mov dx,[AErrorCode] push cs pop ds int 21h jmp koniec TMemoryErrorCode db "Not enough conventional memory.",13,10,'$' TOutOfMemoryErrorCode db 'Out of memory',13,10,'$' ;TPModeErrorCode db 'Sorry, this game must be run in protected mode!',13,10,'$' TDPMIErrorCode db 'Sorry, this game requires 32-bit DPMI to run!',13,10,'$' T386ErrorCode db 'Sorry, this game requires at least a 80386 CPU!',13,10,'$' AErrorCode dw 0 SPSP dw 0 SEnvVar dw 0 AProgramBase dd 0 ABuffer dd 0 ADPMIModeSwitch dd 0 AMemoryStart dd 0 AMemoryEnd dd 0 AAdditionalMemory dd 0 AAdditionalMemoryEnd dd 0 MemoryBlockHandle dd 0 segment buffer rb 1000h
24.077295
90
0.700642
14fb303bbbd5c6a70d4801c861f4379b1f7feca7
5,857
asm
Assembly
Transynther/x86/_processed/NC/_zr_/i9-9900K_12_0xca_notsx.log_21829_1468.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NC/_zr_/i9-9900K_12_0xca_notsx.log_21829_1468.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NC/_zr_/i9-9900K_12_0xca_notsx.log_21829_1468.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 %r15 push %rax push %rbp push %rbx push %rcx push %rdi push %rsi lea addresses_normal_ht+0xaae3, %rax nop nop nop and $5289, %rsi mov $0x6162636465666768, %rdi movq %rdi, %xmm5 movups %xmm5, (%rax) nop nop nop nop xor %rbx, %rbx lea addresses_D_ht+0x1e84b, %rsi lea addresses_A_ht+0x1277b, %rdi nop nop xor $18197, %rbp mov $84, %rcx rep movsl nop nop nop cmp $5336, %rcx lea addresses_UC_ht+0x1cb83, %rsi nop nop nop nop nop add %r11, %r11 mov (%rsi), %rdi nop add $57532, %rdi lea addresses_WC_ht+0x12293, %rsi lea addresses_normal_ht+0x1893, %rdi nop nop nop inc %r11 mov $14, %rcx rep movsl nop nop nop nop nop sub $37479, %r11 lea addresses_UC_ht+0x15b93, %rsi lea addresses_normal_ht+0xff93, %rdi nop nop add $48818, %r15 mov $116, %rcx rep movsb and $3802, %rsi pop %rsi pop %rdi pop %rcx pop %rbx pop %rbp pop %rax pop %r15 pop %r11 ret .global s_faulty_load s_faulty_load: push %r12 push %r14 push %r15 push %r9 push %rax push %rbp push %rdx // Store lea addresses_WC+0x161d3, %rbp clflush (%rbp) nop nop nop nop cmp $34039, %rax movw $0x5152, (%rbp) nop nop nop nop cmp $37526, %r14 // Store lea addresses_RW+0x1ee93, %r15 nop cmp $30214, %r14 mov $0x5152535455565758, %rax movq %rax, %xmm4 movups %xmm4, (%r15) nop nop nop and $63525, %rbp // Faulty Load mov $0x5d92c60000000893, %rdx nop nop nop nop and %r12, %r12 movups (%rdx), %xmm4 vpextrq $0, %xmm4, %r14 lea oracles, %rbp and $0xff, %r14 shlq $12, %r14 mov (%rbp,%r14,1), %r14 pop %rdx pop %rbp pop %rax pop %r9 pop %r15 pop %r14 pop %r12 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_NC', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 0}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WC', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 5}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_RW', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 9}} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_NC', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 0}} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_normal_ht', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 4}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 3, 'type': 'addresses_D_ht'}, 'dst': {'same': False, 'congruent': 3, 'type': 'addresses_A_ht'}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_UC_ht', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 4}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 8, 'type': 'addresses_WC_ht'}, 'dst': {'same': False, 'congruent': 11, 'type': 'addresses_normal_ht'}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 8, 'type': 'addresses_UC_ht'}, 'dst': {'same': False, 'congruent': 6, 'type': 'addresses_normal_ht'}} {'00': 21829} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
38.281046
2,999
0.662284
beb945ce4f0f618a741abc12ceeec3d7bf17cbc9
352
asm
Assembly
programs/oeis/134/A134421.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/134/A134421.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/134/A134421.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A134421: Partial sums of A134021. ; 1,2,4,6,8,11,14,17,20,23,26,29,32,35,39,43,47,51,55,59,63,67,71,75,79,83,87,91,95,99,103,107,111,115,119,123,127,131,135,139,143,148,153,158,163,168,173,178,183,188,193,198,203,208,213,218,223,228,233,238,243 mul $0,2 mov $1,$0 mov $2,1 lpb $1 sub $1,$2 sub $1,$2 add $0,$1 mul $2,3 lpe div $0,2 add $0,1
23.466667
210
0.644886
5cc9362025b222ad0eb0799c587fd1c0ce7e8933
6,200
asm
Assembly
Transynther/x86/_processed/AVXALIGN/_zr_/i3-7100_9_0x84_notsx.log_4679_2260.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/AVXALIGN/_zr_/i3-7100_9_0x84_notsx.log_4679_2260.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/AVXALIGN/_zr_/i3-7100_9_0x84_notsx.log_4679_2260.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r12 push %r14 push %r15 push %rbp push %rbx push %rcx push %rdi push %rsi lea addresses_A_ht+0x12fd4, %r12 nop nop nop nop inc %r14 mov $0x6162636465666768, %r15 movq %r15, (%r12) nop nop nop nop inc %rsi lea addresses_WC_ht+0xc054, %rdi nop xor $25722, %rbp movl $0x61626364, (%rdi) nop xor %r14, %r14 lea addresses_normal_ht+0x124d4, %rdi nop nop and $37395, %rbx mov (%rdi), %r15 nop add %r14, %r14 lea addresses_UC_ht+0x15ed4, %rsi lea addresses_WC_ht+0xc34, %rdi nop cmp %r12, %r12 mov $54, %rcx rep movsw nop nop nop nop and $53816, %r15 lea addresses_A_ht+0xd754, %rsi nop mfence mov (%rsi), %rcx nop nop xor %rcx, %rcx lea addresses_D_ht+0x8314, %rbp nop nop xor %rdi, %rdi mov (%rbp), %r12 nop nop nop nop nop sub %rsi, %rsi lea addresses_UC_ht+0x9cec, %rcx sub %r12, %r12 vmovups (%rcx), %ymm2 vextracti128 $0, %ymm2, %xmm2 vpextrq $0, %xmm2, %rdi nop nop nop nop nop sub $20380, %rbp lea addresses_UC_ht+0x67d4, %r14 nop nop nop nop add %r12, %r12 mov $0x6162636465666768, %rbp movq %rbp, %xmm3 and $0xffffffffffffffc0, %r14 vmovntdq %ymm3, (%r14) nop nop nop sub $30312, %rsi lea addresses_A_ht+0xd6d4, %rsi nop nop nop nop nop xor %rcx, %rcx mov $0x6162636465666768, %rbp movq %rbp, (%rsi) nop nop nop cmp $61945, %rcx pop %rsi pop %rdi pop %rcx pop %rbx pop %rbp pop %r15 pop %r14 pop %r12 ret .global s_faulty_load s_faulty_load: push %r11 push %r13 push %r14 push %r15 push %rbx // Faulty Load lea addresses_WC+0x178d4, %r15 nop nop nop nop nop xor %r11, %r11 vmovaps (%r15), %ymm0 vextracti128 $0, %ymm0, %xmm0 vpextrq $0, %xmm0, %rbx lea oracles, %r14 and $0xff, %rbx shlq $12, %rbx mov (%r14,%rbx,1), %rbx pop %rbx pop %r15 pop %r14 pop %r13 pop %r11 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_WC', 'same': False, 'size': 4, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} [Faulty Load] {'src': {'type': 'addresses_WC', 'same': True, 'size': 32, 'congruent': 0, 'NT': False, 'AVXalign': True}, 'OP': 'LOAD'} <gen_prepare_buffer> {'dst': {'type': 'addresses_A_ht', 'same': False, 'size': 8, 'congruent': 8, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_WC_ht', 'same': True, 'size': 4, 'congruent': 7, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_normal_ht', 'same': False, 'size': 8, 'congruent': 8, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_UC_ht', 'congruent': 8, 'same': True}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 5, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_A_ht', 'same': False, 'size': 8, 'congruent': 4, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_D_ht', 'same': False, 'size': 8, 'congruent': 6, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_UC_ht', 'same': False, 'size': 32, 'congruent': 1, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_UC_ht', 'same': False, 'size': 32, 'congruent': 7, 'NT': True, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_A_ht', 'same': False, 'size': 8, 'congruent': 8, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'00': 4679} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
38.03681
2,999
0.658871
630f0bbf50169f24e1409967c36ee3ad3d866915
359
asm
Assembly
programs/oeis/072/A072056.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/072/A072056.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/072/A072056.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A072056: Number of divisors of 2*prime(n)+1. ; 2,2,2,4,2,4,4,4,2,2,6,6,2,4,4,2,4,4,8,4,6,4,2,2,8,4,6,4,4,2,8,2,6,6,4,4,12,4,4,2,2,6,2,6,4,8,6,4,8,8,2,2,8,2,4,4,6,4,8,2,10,2,8,4,8,4,8,12,4,4,4,2,12,6,8,4,4,8,4,12,2,4,2,6,4,2,4,8,4,6,8,4,12 seq $0,40 ; The prime numbers. seq $0,193773 ; Number of ways to write n as 2*x*y - x - y with 1 <= x <= y. mul $0,2
51.285714
193
0.562674
27b13d5a5dc57ae2ec7a3ab95e2ac755aed745ab
1,029
asm
Assembly
src/test/ref/subexpr-optimize-3.asm
jbrandwood/kickc
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
[ "MIT" ]
2
2022-03-01T02:21:14.000Z
2022-03-01T04:33:35.000Z
src/test/ref/subexpr-optimize-3.asm
jbrandwood/kickc
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
[ "MIT" ]
null
null
null
src/test/ref/subexpr-optimize-3.asm
jbrandwood/kickc
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
[ "MIT" ]
null
null
null
// Tests optimization of identical sub-expressions // Commodore 64 PRG executable file .file [name="subexpr-optimize-3.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) .segment Code main: { .label __4 = 4 .label screen = 2 lda #<$400 sta.z screen lda #>$400 sta.z screen+1 ldx #0 __b1: // i*2 txa asl // i*2+i stx.z $ff clc adc.z $ff sta.z __4 // i*2+i+3 lda #3 clc adc.z __4 // *screen++ = i*2+i+3 ldy #0 sta (screen),y // *screen++ = i*2+i+3; inc.z screen bne !+ inc.z screen+1 !: // i*2+i+3 lda #3 clc adc.z __4 // *screen++ = i*2+i+3 ldy #0 sta (screen),y // *screen++ = i*2+i+3; inc.z screen bne !+ inc.z screen+1 !: // for( byte i: 0..2) inx cpx #3 bne __b1 // } rts }
17.440678
69
0.532556
a8aa2d715ce512e3d3bcf186015e208eb485700c
1,908
asm
Assembly
programs/oeis/195/A195030.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/195/A195030.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/195/A195030.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A195030: a(n) = (n-2)*(14*n-39) for n > 2, otherwise a(n) = n. ; 0,1,2,3,34,93,180,295,438,609,808,1035,1290,1573,1884,2223,2590,2985,3408,3859,4338,4845,5380,5943,6534,7153,7800,8475,9178,9909,10668,11455,12270,13113,13984,14883,15810,16765,17748,18759,19798,20865,21960,23083,24234,25413,26620,27855,29118,30409,31728,33075,34450,35853,37284,38743,40230,41745,43288,44859,46458,48085,49740,51423,53134,54873,56640,58435,60258,62109,63988,65895,67830,69793,71784,73803,75850,77925,80028,82159,84318,86505,88720,90963,93234,95533,97860,100215,102598,105009,107448,109915,112410,114933,117484,120063,122670,125305,127968,130659,133378,136125,138900,141703,144534,147393,150280,153195,156138,159109,162108,165135,168190,171273,174384,177523,180690,183885,187108,190359,193638,196945,200280,203643,207034,210453,213900,217375,220878,224409,227968,231555,235170,238813,242484,246183,249910,253665,257448,261259,265098,268965,272860,276783,280734,284713,288720,292755,296818,300909,305028,309175,313350,317553,321784,326043,330330,334645,338988,343359,347758,352185,356640,361123,365634,370173,374740,379335,383958,388609,393288,397995,402730,407493,412284,417103,421950,426825,431728,436659,441618,446605,451620,456663,461734,466833,471960,477115,482298,487509,492748,498015,503310,508633,513984,519363,524770,530205,535668,541159,546678,552225,557800,563403,569034,574693,580380,586095,591838,597609,603408,609235,615090,620973,626884,632823,638790,644785,650808,656859,662938,669045,675180,681343,687534,693753,700000,706275,712578,718909,725268,731655,738070,744513,750984,757483,764010,770565,777148,783759,790398,797065,803760,810483,817234,824013,830820,837655,844518,851409 mov $1,$0 mov $3,$0 trn $0,3 mul $0,2 add $1,$0 add $1,1 mov $4,4 add $4,$0 lpb $0,1 sub $0,1 add $2,2 add $4,$1 add $1,4 add $4,3 lpe sub $1,$1 add $1,1 add $4,$2 add $1,$4 lpb $3,1 add $1,1 sub $3,1 lpe sub $1,5
68.142857
1,613
0.791929
5481cc6bdc6742a17ff52a407930f3777c09421f
805
asm
Assembly
oeis/227/A227347.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/227/A227347.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/227/A227347.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A227347: Number of lattice points in the closed region bounded by the graphs of y = (5/6)*x^2, x = n, and y = 0, excluding points on the x-axis. ; 0,3,10,23,43,73,113,166,233,316,416,536,676,839,1026,1239,1479,1749,2049,2382,2749,3152,3592,4072,4592,5155,5762,6415,7115,7865,8665,9518,10425,11388,12408,13488,14628,15831,17098,18431,19831,21301,22841,24454,26141,27904,29744,31664,33664,35747,37914,40167,42507,44937,47457,50070,52777,55580,58480,61480,64580,67783,71090,74503,78023,81653,85393,89246,93213,97296,101496,105816,110256,114819,119506,124319,129259,134329,139529,144862,150329,155932,161672,167552,173572,179735,186042,192495,199095 mov $2,$0 mov $3,$0 lpb $3 mov $0,$2 sub $3,1 sub $0,$3 mov $5,$0 add $5,1 pow $5,2 mov $4,$5 mul $4,5 div $4,6 add $1,$4 lpe mov $0,$1
42.368421
500
0.725466
f51d828f6a2045cdb7e3e861f67810a2760fecb9
7,337
asm
Assembly
Transynther/x86/_processed/AVXALIGN/_st_zr_un_/i9-9900K_12_0xa0_notsx.log_21829_573.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_/i9-9900K_12_0xa0_notsx.log_21829_573.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_/i9-9900K_12_0xa0_notsx.log_21829_573.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r12 push %r9 push %rax push %rbp push %rcx push %rdi push %rsi lea addresses_WT_ht+0x6447, %rsi lea addresses_normal_ht+0x13f55, %rdi nop nop nop nop and $5106, %rbp mov $87, %rcx rep movsw nop nop inc %r9 lea addresses_D_ht+0x5e07, %rax clflush (%rax) nop nop nop nop cmp %r12, %r12 mov $0x6162636465666768, %rbp movq %rbp, %xmm6 and $0xffffffffffffffc0, %rax vmovntdq %ymm6, (%rax) nop nop nop nop nop cmp %rdi, %rdi lea addresses_normal_ht+0x1ed47, %rsi xor $15036, %r9 movw $0x6162, (%rsi) nop dec %rcx lea addresses_D_ht+0x10fcf, %rcx clflush (%rcx) nop nop add %rax, %rax mov $0x6162636465666768, %r12 movq %r12, (%rcx) dec %rdi lea addresses_D_ht+0x1c407, %rsi nop add %r12, %r12 mov $0x6162636465666768, %rdi movq %rdi, %xmm4 and $0xffffffffffffffc0, %rsi vmovntdq %ymm4, (%rsi) cmp %rcx, %rcx lea addresses_D_ht+0x199f7, %rdi nop nop nop nop and $3428, %r12 and $0xffffffffffffffc0, %rdi vmovntdqa (%rdi), %ymm2 vextracti128 $1, %ymm2, %xmm2 vpextrq $0, %xmm2, %r9 add $16375, %r9 lea addresses_A_ht+0xdfc7, %r12 clflush (%r12) nop nop nop nop cmp $12507, %rdi mov (%r12), %bp add %rsi, %rsi lea addresses_WC_ht+0x13907, %rdi nop nop sub %r9, %r9 vmovups (%rdi), %ymm3 vextracti128 $1, %ymm3, %xmm3 vpextrq $1, %xmm3, %rsi nop nop nop nop inc %rax lea addresses_UC_ht+0xac87, %rcx nop nop nop inc %r12 mov (%rcx), %r9 add $10028, %rdi pop %rsi pop %rdi pop %rcx pop %rbp pop %rax pop %r9 pop %r12 ret .global s_faulty_load s_faulty_load: push %r11 push %r12 push %r15 push %rax push %rbp push %rcx push %rdi push %rsi // Store lea addresses_UC+0x1c07, %rcx clflush (%rcx) nop nop nop nop nop and $52759, %r12 movb $0x51, (%rcx) nop nop nop nop sub %r11, %r11 // Store lea addresses_UC+0x4a67, %r12 nop nop nop nop nop sub %rax, %rax mov $0x5152535455565758, %rbp movq %rbp, (%r12) cmp $59207, %rax // Store lea addresses_WC+0x17967, %rcx add %r15, %r15 movb $0x51, (%rcx) nop nop nop nop cmp %rdi, %rdi // REPMOV lea addresses_normal+0x5007, %rsi mov $0x807, %rdi nop cmp %r12, %r12 mov $23, %rcx rep movsq nop nop nop inc %rsi // Faulty Load mov $0x53ae800000000807, %r12 add $11958, %rsi movb (%r12), %al lea oracles, %r15 and $0xff, %rax shlq $12, %rax mov (%r15,%rax,1), %rax pop %rsi pop %rdi pop %rcx pop %rbp pop %rax pop %r15 pop %r12 pop %r11 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_NC', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'type': 'addresses_UC', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 9}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC', 'AVXalign': True, 'size': 8, 'NT': False, 'same': False, 'congruent': 5}} {'OP': 'STOR', 'dst': {'type': 'addresses_WC', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 5}} {'src': {'type': 'addresses_normal', 'congruent': 11, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_P', 'congruent': 11, 'same': False}} [Faulty Load] {'src': {'type': 'addresses_NC', 'AVXalign': False, 'size': 1, 'NT': True, 'same': True, 'congruent': 0}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'type': 'addresses_WT_ht', 'congruent': 4, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal_ht', 'congruent': 0, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'size': 32, 'NT': True, 'same': False, 'congruent': 9}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 5}} {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 2}} {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'size': 32, 'NT': True, 'same': False, 'congruent': 9}} {'src': {'type': 'addresses_D_ht', 'AVXalign': False, 'size': 32, 'NT': True, 'same': False, 'congruent': 3}, 'OP': 'LOAD'} {'src': {'type': 'addresses_A_ht', 'AVXalign': False, 'size': 2, 'NT': True, 'same': False, 'congruent': 5}, 'OP': 'LOAD'} {'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'} {'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 4}, 'OP': 'LOAD'} {'90': 3563, '34': 15263, '00': 3003} 00 90 34 90 90 00 34 34 34 34 90 00 90 90 90 00 90 00 00 90 90 90 00 90 90 00 00 90 00 90 34 34 00 34 34 34 34 00 34 34 34 90 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 00 34 34 34 34 34 90 90 90 90 90 00 90 34 34 34 00 34 34 34 34 34 34 00 34 34 34 34 34 90 90 90 00 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 90 00 34 34 90 00 34 34 34 00 34 34 34 34 00 34 34 34 00 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 00 34 34 34 00 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 90 34 34 00 34 34 34 34 34 34 90 34 34 00 34 34 34 00 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 00 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 90 34 34 90 90 00 90 90 00 90 00 34 34 90 00 34 34 34 34 34 00 34 34 34 34 34 34 34 34 34 34 34 34 34 34 00 34 34 34 34 34 34 34 34 90 00 34 34 34 34 34 34 00 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 00 34 34 34 34 34 34 34 90 90 00 90 00 90 90 90 00 90 90 90 34 90 90 90 00 90 00 34 34 34 34 34 34 34 34 34 34 34 34 34 34 00 90 00 90 90 90 90 90 90 34 90 00 90 90 90 90 90 90 34 34 34 34 34 34 00 00 34 34 34 34 34 34 00 34 34 34 34 90 00 34 00 90 00 90 90 90 90 34 34 34 34 34 00 90 00 90 00 90 00 90 90 34 34 90 90 90 90 90 90 90 90 00 00 34 34 34 34 00 34 34 90 00 34 34 34 34 34 34 34 34 90 90 00 90 90 00 34 00 90 90 00 90 34 90 34 34 34 34 00 34 34 34 34 00 34 34 34 34 34 34 34 34 34 34 34 34 00 34 34 34 00 34 00 00 34 34 34 34 00 34 00 34 34 34 34 34 00 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 90 00 90 90 90 00 00 00 90 00 90 90 34 00 34 34 34 34 34 34 34 34 34 34 34 34 34 90 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 00 00 34 34 00 90 90 90 00 90 90 34 00 90 90 90 34 34 34 34 34 34 34 34 90 90 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 90 90 34 90 34 34 90 00 00 34 34 34 34 34 34 34 34 34 00 34 34 00 34 34 34 34 90 00 90 00 00 90 34 90 00 34 90 90 90 90 90 90 00 90 90 90 00 90 00 90 00 90 00 90 00 90 90 90 90 34 34 34 34 34 00 90 90 34 90 90 00 34 34 34 34 34 34 34 90 34 34 34 34 34 90 90 90 90 00 90 00 90 00 90 90 00 00 90 90 34 34 34 34 90 90 00 90 00 90 90 90 00 90 90 90 90 90 00 00 90 90 00 90 00 90 90 00 34 34 34 34 34 34 34 00 00 00 34 34 34 34 34 00 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 90 34 34 34 34 34 00 00 34 00 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 90 90 90 90 90 90 00 00 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 00 34 00 34 34 34 34 00 34 34 00 34 34 00 34 34 34 34 34 34 34 34 34 34 34 34 34 00 90 90 00 90 90 90 90 90 00 90 00 90 90 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 00 34 34 34 00 90 90 00 90 90 00 90 90 00 90 34 90 00 00 90 90 34 00 00 34 34 34 90 90 00 00 90 90 90 00 90 00 90 00 90 90 90 00 00 34 34 34 34 90 90 90 90 00 90 */
34.938095
2,999
0.655036
53d69c21de8f1202213be79619fa2de9b797c48a
653
asm
Assembly
oeis/026/A026012.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/026/A026012.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/026/A026012.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A026012: Second differences of Catalan numbers A000108. ; Submitted by Jon Maiga ; 1,2,6,19,62,207,704,2431,8502,30056,107236,385662,1396652,5088865,18642420,68624295,253706790,941630580,3507232740,13105289370,49114150020,184560753390,695267483664,2625197720454,9933364416572,37660791173152,143048202990504,544279864066652,2074250020539928,7916905251693669,30259779300686684,115812636697373623,443805846202292742,1702733541020082844,6540171438195581732,25147493047808136642,96792052523623670164,372908450480584139954,1438010161603547209440,5550089878814889716770 mov $2,4 mul $2,$0 div $2,2 mov $1,$2 bin $1,$0 sub $0,3 bin $2,$0 sub $1,$2 mov $0,$1
46.642857
481
0.843798
7f56d5a9672a3b3edb513729284e3f637fd090a4
235
asm
Assembly
solutions/13 - Injection Sites 2/size-9_speed-201.asm
michaelgundlach/7billionhumans
02c6f3963364362c95cb516cbc6ef1efc073bb2e
[ "MIT" ]
45
2018-09-05T04:56:59.000Z
2021-11-22T08:57:26.000Z
solutions/13 - Injection Sites 2/size-9_speed-201.asm
michaelgundlach/7billionhumans
02c6f3963364362c95cb516cbc6ef1efc073bb2e
[ "MIT" ]
36
2018-09-01T11:34:26.000Z
2021-05-19T23:20:49.000Z
solutions/13 - Injection Sites 2/size-9_speed-201.asm
michaelgundlach/7billionhumans
02c6f3963364362c95cb516cbc6ef1efc073bb2e
[ "MIT" ]
36
2018-09-01T07:44:19.000Z
2021-09-10T19:07:35.000Z
-- 7 Billion Humans (2056) -- -- 13: Injection Sites 2 -- -- Author: ansvonwa -- Size: 9 -- Speed: 201 pickup s a: if e == wall or w == wall: step s endif if w == datacube or c == datacube: drop step e else: step w endif jump a
11.190476
29
0.612766
5f49941782cd8b4eac4c7b341e3b05981a207e5f
888
asm
Assembly
kernel/gui/themes/default.asm
ssebs/xos
8c50cb7753690ad67696131a8b9935947e1a8075
[ "MIT" ]
15
2020-05-02T22:04:24.000Z
2021-08-31T16:56:59.000Z
kernel/gui/themes/default.asm
JamesLinus/xos
3fba0cb15e84b5f7cd08e0a29ed5f86087192d2e
[ "MIT" ]
null
null
null
kernel/gui/themes/default.asm
JamesLinus/xos
3fba0cb15e84b5f7cd08e0a29ed5f86087192d2e
[ "MIT" ]
1
2019-07-20T10:10:36.000Z
2019-07-20T10:10:36.000Z
; Default Window Theme ;) align 4 wm_color dd 0x808080 ;wm_color dd 0x004288 window_title dd 0xFFFFFF window_inactive_title dd 0xC0C0C0 window_border dd 0x303030 window_active_border dd 0x303030 ;window_active_outline dd 0x00A2E8 window_active_outline dd 0xC200E8 window_close_color dd 0xD80000 window_background dd 0xD8D8D8 window_opacity db 1 ; valid values are 0 to 4, 0 = opaque, 1 = less transparent, 4 = most transparent. window_full_border_height db 1 align 4 window_border_x_min dw 4 ; min x pos for a 0 width window window_border_y_min dw 26 ; min y pos for a 0 height window window_close_position db 0 ; 0 = left, 1 = right, for now this has no effect align 4 window_close_x dw 4 window_close_y dw 5 window_close_width dw 14 window_close_height dw 14 window_title_x dw 22 window_title_y dw 4 window_canvas_x dw 2 window_canvas_y dw 24
26.117647
105
0.783784
d4da1330ff40cc0045b70fbc6eab28fc67243212
482
asm
Assembly
PRG/levels/Fortress/4-K.asm
narfman0/smb3_pp1
38a58adafff67a403591e38875e9fae943a5fe76
[ "Unlicense" ]
null
null
null
PRG/levels/Fortress/4-K.asm
narfman0/smb3_pp1
38a58adafff67a403591e38875e9fae943a5fe76
[ "Unlicense" ]
null
null
null
PRG/levels/Fortress/4-K.asm
narfman0/smb3_pp1
38a58adafff67a403591e38875e9fae943a5fe76
[ "Unlicense" ]
null
null
null
; Original address was $A807 ; King's Room W4 .word W4Airship_IntroL ; Alternate level layout .word WAirship_IntroO ; Alternate object layout .byte LEVEL1_SIZE_01 | LEVEL1_YSTART_170 .byte LEVEL2_BGPAL_01 | LEVEL2_OBJPAL_10 | LEVEL2_XSTART_70 | LEVEL2_UNUSEDFLAG .byte LEVEL3_TILESET_10 | LEVEL3_VSCROLL_LOCKED | LEVEL3_PIPENOTEXIT .byte LEVEL4_BGBANK_INDEX(22) | LEVEL4_INITACT_NOTHING .byte LEVEL5_BGM_THRONEROOM | LEVEL5_TIME_300 .byte $00, $00, $03, $E0, $63, $20, $FF
40.166667
80
0.790456
1b3690f9a2fa8be91e5553ca49055f7a1e8c1d7b
548
asm
Assembly
oeis/218/A218255.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/218/A218255.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/218/A218255.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A218255: Next prime after 10*n. ; Submitted by Jon Maiga ; 2,11,23,31,41,53,61,71,83,97,101,113,127,131,149,151,163,173,181,191,211,211,223,233,241,251,263,271,281,293,307,311,331,331,347,353,367,373,383,397,401,419,421,431,443,457,461,479,487,491,503,521,521,541,541,557,563,571,587,593,601,613,631,631,641,653,661,673,683,691,701,719,727,733,743,751,761,773,787,797,809,811,821,839,853,853,863,877,881,907,907,911,929,937,941,953,967,971,983,991 mul $0,10 seq $0,230980 ; Number of primes <= n, starting at n=0. seq $0,40 ; The prime numbers.
68.5
390
0.722628
cbedef3f3bc7d0de30af649debcdd4f1591546ec
12,724
asm
Assembly
constants/map_constants.asm
etdv-thevoid/pokemon-rgb-enhanced
5b244c1cf46aab98b9c820d1b7888814eb7fa53f
[ "MIT" ]
1
2022-01-09T05:28:52.000Z
2022-01-09T05:28:52.000Z
constants/map_constants.asm
ETDV-TheVoid/pokemon-rgb-enhanced
5b244c1cf46aab98b9c820d1b7888814eb7fa53f
[ "MIT" ]
null
null
null
constants/map_constants.asm
ETDV-TheVoid/pokemon-rgb-enhanced
5b244c1cf46aab98b9c820d1b7888814eb7fa53f
[ "MIT" ]
null
null
null
mapconst: MACRO const \1 \1_HEIGHT EQU \2 \1_WIDTH EQU \3 ENDM const_def mapconst PALLET_TOWN, 9, 10 ; $00 mapconst VIRIDIAN_CITY, 18, 20 ; $01 mapconst PEWTER_CITY, 18, 20 ; $02 mapconst CERULEAN_CITY, 18, 20 ; $03 mapconst LAVENDER_TOWN, 9, 10 ; $04 mapconst VERMILION_CITY, 18, 20 ; $05 mapconst CELADON_CITY, 18, 25 ; $06 mapconst FUCHSIA_CITY, 18, 20 ; $07 mapconst CINNABAR_ISLAND, 9, 10 ; $08 mapconst INDIGO_PLATEAU, 9, 10 ; $09 mapconst SAFFRON_CITY, 18, 20 ; $0A mapconst UNUSED_MAP_0B, 0, 0 ; $0B mapconst ROUTE_1, 18, 10 ; $0C mapconst ROUTE_2, 36, 10 ; $0D mapconst ROUTE_3, 9, 35 ; $0E mapconst ROUTE_4, 9, 45 ; $0F mapconst ROUTE_5, 18, 10 ; $10 mapconst ROUTE_6, 18, 10 ; $11 mapconst ROUTE_7, 9, 10 ; $12 mapconst ROUTE_8, 9, 30 ; $13 mapconst ROUTE_9, 9, 30 ; $14 mapconst ROUTE_10, 36, 10 ; $15 mapconst ROUTE_11, 9, 30 ; $16 mapconst ROUTE_12, 54, 10 ; $17 mapconst ROUTE_13, 9, 30 ; $18 mapconst ROUTE_14, 27, 10 ; $19 mapconst ROUTE_15, 9, 30 ; $1A mapconst ROUTE_16, 9, 20 ; $1B mapconst ROUTE_17, 72, 10 ; $1C mapconst ROUTE_18, 9, 25 ; $1D mapconst ROUTE_19, 27, 10 ; $1E mapconst ROUTE_20, 9, 50 ; $1F mapconst ROUTE_21, 45, 10 ; $20 mapconst ROUTE_22, 9, 20 ; $21 mapconst ROUTE_23, 72, 10 ; $22 mapconst ROUTE_24, 18, 10 ; $23 mapconst ROUTE_25, 9, 30 ; $24 mapconst REDS_HOUSE_1F, 4, 4 ; $25 mapconst REDS_HOUSE_2F, 4, 4 ; $26 mapconst BLUES_HOUSE, 4, 4 ; $27 mapconst OAKS_LAB, 6, 5 ; $28 mapconst VIRIDIAN_POKECENTER, 4, 7 ; $29 mapconst VIRIDIAN_MART, 4, 4 ; $2A mapconst VIRIDIAN_SCHOOL, 4, 4 ; $2B mapconst VIRIDIAN_HOUSE, 4, 4 ; $2C mapconst VIRIDIAN_GYM, 9, 10 ; $2D mapconst DIGLETTS_CAVE_EXIT, 4, 4 ; $2E mapconst VIRIDIAN_FOREST_EXIT, 4, 5 ; $2F mapconst ROUTE_2_HOUSE, 4, 4 ; $30 mapconst ROUTE_2_GATE, 4, 5 ; $31 mapconst VIRIDIAN_FOREST_ENTRANCE, 4, 5 ; $32 mapconst VIRIDIAN_FOREST, 24, 17 ; $33 mapconst MUSEUM_1F, 4, 10 ; $34 mapconst MUSEUM_2F, 4, 7 ; $35 mapconst PEWTER_GYM, 7, 5 ; $36 mapconst PEWTER_HOUSE_1, 4, 4 ; $37 mapconst PEWTER_MART, 4, 4 ; $38 mapconst PEWTER_HOUSE_2, 4, 4 ; $39 mapconst PEWTER_POKECENTER, 4, 7 ; $3A mapconst MT_MOON_1, 18, 20 ; $3B mapconst MT_MOON_2, 14, 14 ; $3C mapconst MT_MOON_3, 18, 20 ; $3D mapconst TRASHED_HOUSE, 4, 4 ; $3E mapconst CERULEAN_HOUSE_1, 4, 4 ; $3F mapconst CERULEAN_POKECENTER, 4, 7 ; $40 mapconst CERULEAN_GYM, 7, 5 ; $41 mapconst BIKE_SHOP, 4, 4 ; $42 mapconst CERULEAN_MART, 4, 4 ; $43 mapconst MT_MOON_POKECENTER, 4, 7 ; $44 mapconst TRASHED_HOUSE_COPY, 4, 4 ; $45 mapconst ROUTE_5_GATE, 3, 4 ; $46 mapconst PATH_ENTRANCE_ROUTE_5, 4, 4 ; $47 mapconst DAYCAREM, 4, 4 ; $48 mapconst ROUTE_6_GATE, 3, 4 ; $49 mapconst PATH_ENTRANCE_ROUTE_6, 4, 4 ; $4A mapconst PATH_ENTRANCE_ROUTE_6_COPY, 4, 4 ; $4B mapconst ROUTE_7_GATE, 4, 3 ; $4C mapconst PATH_ENTRANCE_ROUTE_7, 4, 4 ; $4D mapconst PATH_ENTRANCE_ROUTE_7_COPY, 4, 4 ; $4E mapconst ROUTE_8_GATE, 4, 3 ; $4F mapconst PATH_ENTRANCE_ROUTE_8, 4, 4 ; $50 mapconst ROCK_TUNNEL_POKECENTER, 4, 7 ; $51 mapconst ROCK_TUNNEL_1, 18, 20 ; $52 mapconst POWER_PLANT, 18, 20 ; $53 mapconst ROUTE_11_GATE_1F, 5, 4 ; $54 mapconst DIGLETTS_CAVE_ENTRANCE, 4, 4 ; $55 mapconst ROUTE_11_GATE_2F, 4, 4 ; $56 mapconst ROUTE_12_GATE_1F, 4, 5 ; $57 mapconst BILLS_HOUSE, 4, 4 ; $58 mapconst VERMILION_POKECENTER, 4, 7 ; $59 mapconst POKEMON_FAN_CLUB, 4, 4 ; $5A mapconst VERMILION_MART, 4, 4 ; $5B mapconst VERMILION_GYM, 9, 5 ; $5C mapconst VERMILION_HOUSE_1, 4, 4 ; $5D mapconst VERMILION_DOCK, 6, 14 ; $5E mapconst SS_ANNE_1, 9, 20 ; $5F mapconst SS_ANNE_2, 9, 20 ; $60 mapconst SS_ANNE_3, 3, 10 ; $61 mapconst SS_ANNE_4, 4, 15 ; $62 mapconst SS_ANNE_5, 7, 10 ; $63 mapconst SS_ANNE_6, 8, 7 ; $64 mapconst SS_ANNE_7, 4, 3 ; $65 mapconst SS_ANNE_8, 8, 12 ; $66 mapconst SS_ANNE_9, 8, 12 ; $67 mapconst SS_ANNE_10, 8, 12 ; $68 mapconst UNUSED_MAP_69, 0, 0 ; $69 mapconst UNUSED_MAP_6A, 0, 0 ; $6A mapconst UNUSED_MAP_6B, 0, 0 ; $6B mapconst VICTORY_ROAD_1, 9, 10 ; $6C mapconst UNUSED_MAP_6D, 0, 0 ; $6D mapconst UNUSED_MAP_6E, 0, 0 ; $6E mapconst UNUSED_MAP_6F, 0, 0 ; $6F mapconst UNUSED_MAP_70, 0, 0 ; $70 mapconst LANCES_ROOM, 13, 13 ; $71 mapconst UNUSED_MAP_72, 0, 0 ; $72 mapconst UNUSED_MAP_73, 0, 0 ; $73 mapconst UNUSED_MAP_74, 0, 0 ; $74 mapconst UNUSED_MAP_75, 0, 0 ; $75 mapconst HALL_OF_FAME, 4, 5 ; $76 mapconst UNDERGROUND_PATH_NS, 24, 4 ; $77 mapconst CHAMPIONS_ROOM, 4, 4 ; $78 mapconst UNDERGROUND_PATH_WE, 4, 25 ; $79 mapconst CELADON_MART_1, 4, 10 ; $7A mapconst CELADON_MART_2, 4, 10 ; $7B mapconst CELADON_MART_3, 4, 10 ; $7C mapconst CELADON_MART_4, 4, 10 ; $7D mapconst CELADON_MART_ROOF, 4, 10 ; $7E mapconst CELADON_MART_ELEVATOR, 2, 2 ; $7F mapconst CELADON_MANSION_1, 6, 4 ; $80 mapconst CELADON_MANSION_2, 6, 4 ; $81 mapconst CELADON_MANSION_3, 6, 4 ; $82 mapconst CELADON_MANSION_4, 6, 4 ; $83 mapconst CELADON_MANSION_5, 4, 4 ; $84 mapconst CELADON_POKECENTER, 4, 7 ; $85 mapconst CELADON_GYM, 9, 5 ; $86 mapconst GAME_CORNER, 9, 10 ; $87 mapconst CELADON_MART_5, 4, 10 ; $88 mapconst CELADON_PRIZE_ROOM, 4, 5 ; $89 mapconst CELADON_DINER, 4, 5 ; $8A mapconst CELADON_HOUSE, 4, 4 ; $8B mapconst CELADON_HOTEL, 4, 7 ; $8C mapconst LAVENDER_POKECENTER, 4, 7 ; $8D mapconst POKEMONTOWER_1, 9, 10 ; $8E mapconst POKEMONTOWER_2, 9, 10 ; $8F mapconst POKEMONTOWER_3, 9, 10 ; $90 mapconst POKEMONTOWER_4, 9, 10 ; $91 mapconst POKEMONTOWER_5, 9, 10 ; $92 mapconst POKEMONTOWER_6, 9, 10 ; $93 mapconst POKEMONTOWER_7, 9, 10 ; $94 mapconst LAVENDER_HOUSE_1, 4, 4 ; $95 mapconst LAVENDER_MART, 4, 4 ; $96 mapconst LAVENDER_HOUSE_2, 4, 4 ; $97 mapconst FUCHSIA_MART, 4, 4 ; $98 mapconst FUCHSIA_HOUSE_1, 4, 4 ; $99 mapconst FUCHSIA_POKECENTER, 4, 7 ; $9A mapconst FUCHSIA_HOUSE_2, 4, 5 ; $9B mapconst SAFARI_ZONE_ENTRANCE, 3, 4 ; $9C mapconst FUCHSIA_GYM, 9, 5 ; $9D mapconst FUCHSIA_MEETING_ROOM, 4, 7 ; $9E mapconst SEAFOAM_ISLANDS_2, 9, 15 ; $9F mapconst SEAFOAM_ISLANDS_3, 9, 15 ; $A0 mapconst SEAFOAM_ISLANDS_4, 9, 15 ; $A1 mapconst SEAFOAM_ISLANDS_5, 9, 15 ; $A2 mapconst VERMILION_HOUSE_2, 4, 4 ; $A3 mapconst FUCHSIA_HOUSE_3, 4, 4 ; $A4 mapconst MANSION_1, 14, 15 ; $A5 mapconst CINNABAR_GYM, 9, 10 ; $A6 mapconst CINNABAR_LAB_1, 4, 9 ; $A7 mapconst CINNABAR_LAB_2, 4, 4 ; $A8 mapconst CINNABAR_LAB_3, 4, 4 ; $A9 mapconst CINNABAR_LAB_4, 4, 4 ; $AA mapconst CINNABAR_POKECENTER, 4, 7 ; $AB mapconst CINNABAR_MART, 4, 4 ; $AC mapconst CINNABAR_MART_COPY, 4, 4 ; $AD mapconst INDIGO_PLATEAU_LOBBY, 6, 8 ; $AE mapconst COPYCATS_HOUSE_1F, 4, 4 ; $AF mapconst COPYCATS_HOUSE_2F, 4, 4 ; $B0 mapconst FIGHTING_DOJO, 6, 5 ; $B1 mapconst SAFFRON_GYM, 9, 10 ; $B2 mapconst SAFFRON_HOUSE_1, 4, 4 ; $B3 mapconst SAFFRON_MART, 4, 4 ; $B4 mapconst SILPH_CO_1F, 9, 15 ; $B5 mapconst SAFFRON_POKECENTER, 4, 7 ; $B6 mapconst SAFFRON_HOUSE_2, 4, 4 ; $B7 mapconst ROUTE_15_GATE_1F, 5, 4 ; $B8 mapconst ROUTE_15_GATE_2F, 4, 4 ; $B9 mapconst ROUTE_16_GATE_1F, 7, 4 ; $BA mapconst ROUTE_16_GATE_2F, 4, 4 ; $BB mapconst ROUTE_16_HOUSE, 4, 4 ; $BC mapconst ROUTE_12_HOUSE, 4, 4 ; $BD mapconst ROUTE_18_GATE_1F, 5, 4 ; $BE mapconst ROUTE_18_GATE_2F, 4, 4 ; $BF mapconst SEAFOAM_ISLANDS_1, 9, 15 ; $C0 mapconst ROUTE_22_GATE, 4, 5 ; $C1 mapconst VICTORY_ROAD_2, 9, 15 ; $C2 mapconst ROUTE_12_GATE_2F, 4, 4 ; $C3 mapconst VERMILION_HOUSE_3, 4, 4 ; $C4 mapconst DIGLETTS_CAVE, 18, 20 ; $C5 mapconst VICTORY_ROAD_3, 9, 15 ; $C6 mapconst ROCKET_HIDEOUT_1, 14, 15 ; $C7 mapconst ROCKET_HIDEOUT_2, 14, 15 ; $C8 mapconst ROCKET_HIDEOUT_3, 14, 15 ; $C9 mapconst ROCKET_HIDEOUT_4, 12, 15 ; $CA mapconst ROCKET_HIDEOUT_ELEVATOR, 4, 3 ; $CB mapconst UNUSED_MAP_CC, 0, 0 ; $CC mapconst UNUSED_MAP_CD, 0, 0 ; $CD mapconst UNUSED_MAP_CE, 0, 0 ; $CE mapconst SILPH_CO_2F, 9, 15 ; $CF mapconst SILPH_CO_3F, 9, 15 ; $D0 mapconst SILPH_CO_4F, 9, 15 ; $D1 mapconst SILPH_CO_5F, 9, 15 ; $D2 mapconst SILPH_CO_6F, 9, 13 ; $D3 mapconst SILPH_CO_7F, 9, 13 ; $D4 mapconst SILPH_CO_8F, 9, 13 ; $D5 mapconst MANSION_2, 14, 15 ; $D6 mapconst MANSION_3, 9, 15 ; $D7 mapconst MANSION_4, 14, 15 ; $D8 mapconst SAFARI_ZONE_EAST, 13, 15 ; $D9 mapconst SAFARI_ZONE_NORTH, 18, 20 ; $DA mapconst SAFARI_ZONE_WEST, 13, 15 ; $DB mapconst SAFARI_ZONE_CENTER, 13, 15 ; $DC mapconst SAFARI_ZONE_REST_HOUSE_1, 4, 4 ; $DD mapconst SAFARI_ZONE_SECRET_HOUSE, 4, 4 ; $DE mapconst SAFARI_ZONE_REST_HOUSE_2, 4, 4 ; $DF mapconst SAFARI_ZONE_REST_HOUSE_3, 4, 4 ; $E0 mapconst SAFARI_ZONE_REST_HOUSE_4, 4, 4 ; $E1 mapconst UNKNOWN_DUNGEON_2, 9, 15 ; $E2 mapconst UNKNOWN_DUNGEON_3, 9, 15 ; $E3 mapconst UNKNOWN_DUNGEON_1, 9, 15 ; $E4 mapconst NAME_RATERS_HOUSE, 4, 4 ; $E5 mapconst CERULEAN_HOUSE_2, 4, 4 ; $E6 mapconst UNUSED_MAP_E7, 0, 0 ; $E7 mapconst ROCK_TUNNEL_2, 18, 20 ; $E8 mapconst SILPH_CO_9F, 9, 13 ; $E9 mapconst SILPH_CO_10F, 9, 8 ; $EA mapconst SILPH_CO_11F, 9, 9 ; $EB mapconst SILPH_CO_ELEVATOR, 2, 2 ; $EC mapconst UNUSED_MAP_ED, 0, 0 ; $ED mapconst UNUSED_MAP_EE, 0, 0 ; $EE mapconst TRADE_CENTER, 4, 5 ; $EF mapconst COLOSSEUM, 4, 5 ; $F0 mapconst UNUSED_MAP_F1, 0, 0 ; $F1 mapconst UNUSED_MAP_F2, 0, 0 ; $F2 mapconst UNUSED_MAP_F3, 0, 0 ; $F3 mapconst UNUSED_MAP_F4, 0, 0 ; $F4 mapconst LORELEIS_ROOM, 6, 5 ; $F5 mapconst BRUNOS_ROOM, 6, 5 ; $F6 mapconst AGATHAS_ROOM, 6, 5 ; $F7
49.703125
50
0.517605
a31f1b722c9a720f5ade4ee635ee67ab179465a6
514
asm
Assembly
Chapter_4/Program 4.2/x86_64/NASM/Program_4.2_NASM.asm
chen150182055/Assembly
e5e76bea438a3752b59775098205a77aa7087110
[ "MIT" ]
null
null
null
Chapter_4/Program 4.2/x86_64/NASM/Program_4.2_NASM.asm
chen150182055/Assembly
e5e76bea438a3752b59775098205a77aa7087110
[ "MIT" ]
null
null
null
Chapter_4/Program 4.2/x86_64/NASM/Program_4.2_NASM.asm
chen150182055/Assembly
e5e76bea438a3752b59775098205a77aa7087110
[ "MIT" ]
null
null
null
; Program 4.2 ; Multiplication and Division - NASM (64-bit) ; Copyright (c) 2020 Hall & Slonka SECTION .data mval: DQ 664751 dval: DQ 8 SECTION .text global _main _main: ; MUL 1-op mov rax, [mval] mov rbx, 8 mul rbx ; IMUL 1-op mov rax, [mval] mov rbx, 8 imul rbx ; IMUL 2-op mov rax, 8 imul rax, [mval] ; IMUL 3-op imul rax, [mval], 8 ; DIV 1-op mov rdx, 0 mov rax, 5318008 mov rcx, [dval] div rcx ; IDIV 1-op mov rdx, 0 mov rax, 5318008 mov rcx, [dval] idiv rcx mov rax, 60 xor rdi, rdi syscall
11.422222
45
0.657588
964cbc8f792145693f0a2dbe297077798819cd15
3,741
asm
Assembly
x86_64/IntegerArithmetic/IntegerArithmetic_.asm
brucexia1/x86assembly
c61954ce7902c1795c4041a852afcd086ba87513
[ "Apache-2.0" ]
1
2022-02-28T03:45:51.000Z
2022-02-28T03:45:51.000Z
x86_64/IntegerArithmetic/IntegerArithmetic_.asm
brucexia1/x86assembly
c61954ce7902c1795c4041a852afcd086ba87513
[ "Apache-2.0" ]
null
null
null
x86_64/IntegerArithmetic/IntegerArithmetic_.asm
brucexia1/x86assembly
c61954ce7902c1795c4041a852afcd086ba87513
[ "Apache-2.0" ]
null
null
null
section .text ;======================================================================================== ; --Register-----|--Callee Save--|----------------------------Description---------------- ; | %rax | | 函数返回值寄存器;也用于idiv and imul指令 ; | %rbx | yes | ; | %rcx | | 函数第4个入参 ; | %rdx | | 函数第3个入参;也用于idiv and imul指令 ; | %rsp | | stack pointer,通常指向栈顶位置, pop和push操作会改变%rsp的值 ; | %rbp | yes | frame pointer ; | %rsi | | 函数第2个入参 ; | %rdi | | 函数第1个入参 ; | %r8 | | 函数第5个入参 ; | %r9 | | 函数第6个入参 ; | %r10 | | ; | %r11 | | ; | %r12-%r15 | yes | ; "Caller Save"即寄存器的值是由"调用者(父函数)保存",父函数必须push保存好Caller Save register ; 后再调用子函数 ; "Callee Save"即寄存器的值是由"被调用者(子函数)保存",父函数无需保存这些寄存器值由子函数先push ; 返回时再pop这些寄存器、子函数push和pop之间可以使用这些寄存器 ;======================================================================================== ; int64_t IntegerAdd_(int64_t a, int64_t b, int64_t c, int64_t d, int64_t e, int64_t f); ; code is intel风格的汇编代码 global IntegerAdd_ IntegerAdd_: add rdi,rsi ;rdi = a + b add rcx,rdx ;rcx = c + d add r8,r9 ;r8 = e + f add rcx,rdi ;rcx = a + b + c + d mov rax,rcx ;rax = a + b + c + d add rax,r8 ;rax = a + b + c + d + e + f ret ;======================================================================================== ; int64_t IntegerMul_(int8_t a, int16_t b, int32_t c, int64_t d, int8_t e, int16_t f, int32_t g, int64_t h); ; code is intel风格的汇编代码 global IntegerMul_ IntegerMul_: movsx r10,edi ;r10 = sign_extend(a) movsx r11,esi ;r11 = sign_extend(b) imul r10,r11 ;r10 = a * b movsx r11,edx ;r11 = sign_extend(c) imul r10,r11 ;r10 = a * b * c imul r10,rcx ;r10 = a * b * c * d movsx rcx,r8w ;rcx = sign_extend(e) movsx rdx,r9w ;rdx = sign_extend(f) imul rcx,rdx ;rcx = e * f movsx r8,byte [rsp+8] ;r8 = sign_extend(g) movsx r9,word [rsp+16] ;r9 = sign_extend(h) imul r8,r9 ;r8 = g * h mov rax,r10 ;rax = a * b * c * d imul rax,rcx ;rax = a * b * c * d * e * f imul rax,r8 ;rax = a * b * c * d * e * f * g * h ret ;======================================================================================== ; void IntegerDiv_(int64_t a, int64_t b, int64_t quo_rem_ab[2], int64_t c, int64_t d, int64_t quo_rem_cd[2]); ; code is intel风格的汇编代码 global IntegerDiv_ IntegerDiv_: mov rax,rdi ;rax = a mov rdi,rdx ;rdi = &quo_rem_ab[0] cqo ;rdx:rax = sign_extend(a) idiv qword rsi ;rax = quo a/b, rdx = rem a/b mov [rdi],rax ;save quotient mov [rdi+8],rdx ;save remainder mov rax,rcx ;rax = c cqo ;rdx:rax = sign_extend(c) idiv qword r8 ;rax = quo c/d, rdx = rem c/d mov [r9],rax ;save quotient mov [r9+8],rdx ;save remainder ret ;========================================================================================
45.621951
110
0.36942
42f59bd757a51bc7293fcb823d643440d9774388
9,069
asm
Assembly
Transynther/x86/_processed/NONE/_ht_zr_un_/i7-7700_9_0x48.log_7257_662.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_ht_zr_un_/i7-7700_9_0x48.log_7257_662.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_ht_zr_un_/i7-7700_9_0x48.log_7257_662.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 %r8 push %rcx push %rdi push %rdx push %rsi lea addresses_A_ht+0x182b5, %rdx nop nop nop nop nop sub $18444, %r13 movw $0x6162, (%rdx) nop nop nop nop nop add $21938, %r8 lea addresses_D_ht+0x3cb5, %rsi lea addresses_D_ht+0x18275, %rdi nop nop nop nop nop cmp %r8, %r8 mov $24, %rcx rep movsl nop sub %r13, %r13 lea addresses_A_ht+0x4d91, %rdx xor %rcx, %rcx movl $0x61626364, (%rdx) nop nop nop dec %r13 lea addresses_A_ht+0x1c03b, %rdi nop nop nop and $7189, %rcx movw $0x6162, (%rdi) xor $50574, %rcx lea addresses_normal_ht+0xda75, %rsi lea addresses_D_ht+0x3775, %rdi clflush (%rdi) nop nop nop nop nop xor %r10, %r10 mov $0, %rcx rep movsq nop nop nop nop add $37404, %rdi lea addresses_WC_ht+0x3cb5, %rsi lea addresses_WC_ht+0x1c0b5, %rdi add $33587, %r10 mov $107, %rcx rep movsw nop nop nop nop and %r10, %r10 lea addresses_normal_ht+0x120f1, %rsi nop nop dec %rdi mov (%rsi), %r10 nop sub $36745, %r13 lea addresses_normal_ht+0x197b5, %rsi lea addresses_WT_ht+0x18515, %rdi nop xor %r13, %r13 mov $109, %rcx rep movsl inc %r10 lea addresses_normal_ht+0x49c1, %r13 nop nop cmp %r10, %r10 movb (%r13), %r11b nop nop nop cmp $49038, %rdi lea addresses_D_ht+0x14ba1, %r13 nop inc %r8 mov (%r13), %rcx nop cmp $41060, %rdx lea addresses_D_ht+0x1e0fd, %r10 xor %rsi, %rsi movl $0x61626364, (%r10) sub %r8, %r8 lea addresses_D_ht+0x84b5, %rsi lea addresses_D_ht+0xbcb5, %rdi nop nop nop nop nop inc %r8 mov $92, %rcx rep movsl nop nop nop nop and $65402, %r8 lea addresses_A_ht+0x5831, %r10 nop nop nop nop nop sub $2309, %rdi mov $0x6162636465666768, %rsi movq %rsi, %xmm1 vmovups %ymm1, (%r10) sub $1160, %r13 pop %rsi pop %rdx pop %rdi pop %rcx pop %r8 pop %r13 pop %r11 pop %r10 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r12 push %r13 push %rax push %rbp push %rdx // Store lea addresses_WC+0x1d4b5, %rdx nop nop dec %r12 movl $0x51525354, (%rdx) nop nop nop cmp $15768, %r13 // Store lea addresses_US+0x18b35, %r10 add %r13, %r13 movl $0x51525354, (%r10) nop add %r12, %r12 // Store lea addresses_WT+0x1593e, %rax nop nop add $13001, %rbp mov $0x5152535455565758, %r11 movq %r11, %xmm4 vmovups %ymm4, (%rax) nop nop nop sub %r10, %r10 // Store lea addresses_RW+0x7cb5, %rax nop nop sub $17909, %r13 mov $0x5152535455565758, %r12 movq %r12, %xmm3 vmovntdq %ymm3, (%rax) nop nop sub %r13, %r13 // Store lea addresses_normal+0x197d9, %r10 nop nop and $56986, %r13 mov $0x5152535455565758, %r12 movq %r12, %xmm0 vmovups %ymm0, (%r10) nop nop nop nop add $58975, %rbp // Store lea addresses_D+0x8cb5, %rax clflush (%rax) nop nop sub $23242, %r13 movb $0x51, (%rax) nop xor $57376, %r12 // Store lea addresses_WT+0xcab5, %rdx nop sub %r13, %r13 movw $0x5152, (%rdx) nop cmp $29419, %rbp // Faulty Load lea addresses_A+0x124b5, %rbp nop nop cmp $50322, %rdx vmovups (%rbp), %ymm5 vextracti128 $1, %ymm5, %xmm5 vpextrq $0, %xmm5, %r13 lea oracles, %rax and $0xff, %r13 shlq $12, %r13 mov (%rax,%r13,1), %r13 pop %rdx pop %rbp pop %rax pop %r13 pop %r12 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_A', 'AVXalign': False, 'congruent': 0, 'size': 1, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WC', 'AVXalign': True, 'congruent': 11, 'size': 4, 'same': False, 'NT': True}} {'OP': 'STOR', 'dst': {'type': 'addresses_US', 'AVXalign': False, 'congruent': 4, 'size': 4, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT', 'AVXalign': False, 'congruent': 0, 'size': 32, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_RW', 'AVXalign': False, 'congruent': 11, 'size': 32, 'same': False, 'NT': True}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal', 'AVXalign': False, 'congruent': 2, 'size': 32, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D', 'AVXalign': False, 'congruent': 10, 'size': 1, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT', 'AVXalign': False, 'congruent': 9, 'size': 2, 'same': False, 'NT': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_A', 'AVXalign': False, 'congruent': 0, 'size': 32, 'same': True, 'NT': False}} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 8, 'size': 2, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 10, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 6, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 2, 'size': 4, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 1, 'size': 2, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 6, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 6, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 11, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 7, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 1, 'size': 8, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 5, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 2, 'size': 1, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 2, 'size': 8, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 3, 'size': 4, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 11, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 10, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 1, 'size': 32, 'same': False, 'NT': False}} {'e5': 1, 'd2': 1, '48': 3035, '44': 4172, '00': 48} 44 44 48 48 44 48 44 44 44 44 44 44 48 48 44 44 44 44 44 48 44 44 44 44 44 44 44 44 48 44 44 44 44 48 44 44 48 44 44 44 44 48 44 48 48 44 44 44 48 48 48 44 44 48 48 48 44 44 48 44 44 44 48 44 44 48 44 44 44 48 48 48 00 44 48 48 48 48 48 48 44 44 48 48 48 48 44 48 44 44 44 44 44 44 48 44 44 48 44 44 48 44 48 44 44 44 44 44 44 44 44 48 48 48 48 44 44 44 44 44 44 44 44 48 44 44 48 44 48 44 44 48 48 48 48 44 48 44 44 48 48 44 48 48 44 44 48 44 48 44 48 44 48 44 44 48 44 48 48 44 48 44 48 44 48 44 44 48 44 44 48 44 44 44 44 48 44 44 44 44 48 44 44 48 48 48 48 44 48 44 48 44 44 44 48 48 44 44 44 48 48 48 48 44 44 48 48 44 44 48 48 44 44 48 48 44 48 44 44 44 48 44 48 44 48 44 44 48 48 44 44 44 44 44 48 48 48 48 48 44 48 44 48 48 44 48 44 44 48 44 48 44 44 44 44 48 48 44 00 48 48 48 44 44 48 48 44 44 48 44 44 48 44 44 48 48 44 44 48 44 44 44 48 44 48 44 44 48 44 48 44 44 48 44 44 44 44 44 44 48 48 44 44 44 44 48 44 44 48 44 44 44 48 44 48 44 44 44 48 48 48 44 44 44 44 44 48 48 44 44 44 48 44 44 44 44 44 48 48 48 44 44 48 44 44 48 44 48 48 44 44 48 48 48 44 44 48 44 44 44 48 48 48 44 44 48 44 48 48 44 48 44 44 48 44 44 44 44 48 44 44 44 48 48 44 44 48 48 44 44 44 44 48 48 48 44 44 00 48 44 44 48 48 48 44 44 44 44 44 44 44 48 44 44 44 44 48 44 44 48 48 48 48 44 48 44 48 48 44 44 44 44 48 48 48 48 48 44 48 44 48 44 48 44 48 48 48 44 48 44 48 44 48 44 44 44 44 44 44 48 44 48 48 48 44 44 44 44 44 44 48 44 48 44 44 44 48 44 48 48 44 44 44 48 44 48 48 48 48 44 44 44 48 44 44 48 48 48 44 44 48 44 44 44 48 48 44 00 44 44 44 44 44 44 44 44 44 44 48 48 48 44 44 44 44 48 48 44 48 48 44 48 48 00 44 44 44 48 48 44 48 44 48 44 44 44 44 44 44 44 44 44 48 44 44 44 44 44 44 44 44 48 44 48 48 48 44 48 48 44 48 44 44 48 48 48 48 48 44 48 00 48 44 44 48 48 48 44 44 44 44 48 48 44 48 44 48 48 44 44 48 44 48 44 48 44 48 44 48 44 44 44 48 48 44 48 44 44 44 44 48 44 44 44 44 48 44 44 48 48 48 48 44 48 48 48 44 48 44 48 48 48 44 44 44 44 44 44 48 44 48 44 44 44 44 48 44 44 44 44 48 44 48 44 44 48 48 44 48 48 44 48 44 44 44 44 48 48 44 48 44 48 44 48 48 48 48 44 44 44 44 44 48 44 44 48 44 48 44 48 48 48 44 44 44 44 44 44 00 48 48 48 48 44 44 44 44 48 48 48 48 44 48 48 48 48 44 44 44 44 44 48 48 44 44 48 48 48 44 44 44 44 44 48 44 44 48 44 44 48 44 44 44 48 48 44 48 44 44 00 44 48 48 44 48 48 48 44 48 44 44 48 44 48 48 48 48 44 44 44 44 48 44 44 48 44 44 48 48 44 44 44 44 48 44 44 44 44 44 44 48 44 00 44 48 44 48 48 44 44 48 48 48 48 44 44 44 44 44 48 48 48 44 48 44 44 44 44 44 44 44 44 44 48 44 44 44 44 44 48 44 48 44 44 44 44 44 44 44 44 44 44 48 44 48 48 48 48 48 48 48 48 44 44 48 48 44 48 48 44 44 44 48 48 48 48 44 44 48 48 44 44 44 48 48 44 48 48 44 44 48 44 48 48 44 48 48 44 44 48 48 48 44 44 44 48 44 48 48 48 44 48 48 48 44 48 44 44 48 44 44 48 48 48 44 44 44 44 44 44 48 44 44 44 48 44 44 44 48 48 44 44 44 44 44 48 44 48 44 44 48 48 44 44 44 48 48 48 44 44 48 48 48 44 44 48 44 44 48 48 48 44 44 44 48 44 48 48 44 48 48 44 48 48 48 44 44 44 44 48 44 48 48 48 48 48 48 44 44 44 */
32.159574
2,999
0.652773
f360f0de4fe17123e27fa7aae27d159eba041104
305
asm
Assembly
oeis/107/A107319.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/107/A107319.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/107/A107319.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A107319: C(n+8,8)*C(n+6,6) ; 1,63,1260,13860,103950,594594,2774772,11042460,38648610,121671550,350414064,935402832,2338507080,5521090680,12394285200,26606398896,54875697723,109181751525,210275965900,393175282500,715579014150 mov $1,7 mov $2,$0 add $2,8 sub $1,$2 bin $1,6 bin $2,$0 mul $1,$2 mov $0,$1
25.416667
197
0.754098
2343bedab8a5eaceb52ebc95445ea31cb59eb459
104
asm
Assembly
libsrc/_DEVELOPMENT/math/float/math32/lm32/c/sdcc/sqr.asm
Frodevan/z88dk
f27af9fe840ff995c63c80a73673ba7ee33fffac
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/_DEVELOPMENT/math/float/math32/lm32/c/sdcc/sqr.asm
Frodevan/z88dk
f27af9fe840ff995c63c80a73673ba7ee33fffac
[ "ClArtistic" ]
1,600
2017-01-15T16:12:02.000Z
2022-03-31T12:11:12.000Z
libsrc/_DEVELOPMENT/math/float/math32/lm32/c/sdcc/sqr.asm
Frodevan/z88dk
f27af9fe840ff995c63c80a73673ba7ee33fffac
[ "ClArtistic" ]
215
2017-01-17T10:43:03.000Z
2022-03-23T17:25:02.000Z
SECTION code_fp_math32 PUBLIC _sqr EXTERN cm32_sdcc_fssqr defc _sqr = cm32_sdcc_fssqr
14.857143
31
0.721154
fb3d3231a281f726e8682e47a0eebb3aad54f7f2
437
asm
Assembly
programs/oeis/184/A184632.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/184/A184632.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/184/A184632.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A184632: Floor(1/{(8+n^4)^(1/4)}), where {}=fractional part. ; 1,4,13,32,62,108,171,256,364,500,665,864,1098,1372,1687,2048,2456,2916,3429,4000,4630,5324,6083,6912,7812,8788,9841,10976,12194,13500,14895,16384,17968,19652,21437,23328,25326,27436,29659,32000,34460,37044,39753,42592,45562,48668,51911,55296,58824,62500,66325,70304,74438,78732,83187,87808,92596,97556,102689,108000 mov $1,$0 add $1,1 pow $1,3 div $1,2 trn $1,1 add $1,1
43.7
317
0.73913
dc258fea18fe86b508d077f87c19e4ac13e76159
344
asm
Assembly
programs/oeis/079/A079034.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/079/A079034.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/079/A079034.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A079034: Determinant of M(n), the n X n matrix defined by m(i,i)=1, m(i,j)=i-j. ; 1,2,7,21,51,106,197,337,541,826,1211,1717,2367,3186,4201,5441,6937,8722,10831,13301,16171,19482,23277,27601,32501,38026,44227,51157,58871,67426,76881,87297,98737,111266,124951,139861,156067,173642,192661 add $0,1 pow $0,2 bin $0,2 mov $1,$0 div $1,6 add $1,1
34.4
205
0.718023
00ae6c92a8525509fd9014255da4eaace55cc836
400
asm
Assembly
programs/oeis/120/A120145.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/120/A120145.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/120/A120145.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A120145: a(1)=20; a(n)=floor((41+sum(a(1) to a(n-1)))/2). ; 20,30,45,68,102,153,229,344,516,774,1161,1741,2612,3918,5877,8815,13223,19834,29751,44627,66940,100410,150615,225923,338884,508326,762489,1143734,1715601,2573401,3860102,5790153,8685229,13027844 add $0,1 mov $3,5 lpb $0 mov $2,2 sub $2,$0 sub $0,1 add $3,8 mov $1,$3 div $1,2 add $3,$1 add $1,$2 add $3,6 lpe add $1,13
22.222222
196
0.65
b4761cce6595dfd4fad6b0f783b1cec61a1de338
2,961
asm
Assembly
programs/oeis/035/A035599.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/035/A035599.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/035/A035599.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A035599: Number of points of L1 norm 5 in cubic lattice Z^n. ; 0,2,20,102,360,1002,2364,4942,9424,16722,28004,44726,68664,101946,147084,207006,285088,385186,511668,669446,864008,1101450,1388508,1732590,2141808,2625010,3191812,3852630,4618712,5502170,6516012,7674174,8991552,10484034,12168532,14063014,16186536,18559274,21202556,24138894,27392016,30986898,34949796,39308278,44091256,49329018,55053260,61297118,68095200,75483618,83500020,92183622,101575240,111717322,122653980,134431022,147095984,160698162,175288644,190920342,207648024,225528346,244619884,264983166,286680704,309777026,334338708,360434406,388134888,417513066,448644028,481605070,516475728,553337810,592275428,633375030,676725432,722417850,770545932,821205790,874496032,930517794,989374772,1051173254,1116022152,1184033034,1255320156,1330000494,1408193776,1490022514,1575612036,1665090518,1758589016,1856241498,1958184876,2064559038,2175506880,2291174338,2411710420,2537267238,2668000040,2804067242,2945630460,3092854542,3245907600,3404961042,3570189604,3741771382,3919887864,4104723962,4296468044,4495311966,4701451104,4915084386,5136414324,5365647046,5602992328,5848663626,6102878108,6365856686,6637824048,6919008690,7209642948,7509963030,7820209048,8140625050,8471459052,8812963070,9165393152,9529009410,9904076052,10290861414,10689637992,11100682474,11524275772,11960703054,12410253776,12873221714,13349904996,13840606134,14345632056,14865294138,15399908236,15949794718,16515278496,17096689058,17694360500,18308631558,18939845640,19588350858,20254500060,20938650862,21641165680,22362411762,23102761220,23862591062,24642283224,25442224602,26262807084,27104427582,27967488064,28852395586,29759562324,30689405606,31642347944,32618817066,33619245948,34644072846,35693741328,36768700306,37869404068,38996312310,40149890168,41330608250,42538942668,43775375070,45040392672,46334488290,47658160372,49011913030,50396256072,51811705034,53258781212,54738011694,56249929392,57795073074,59373987396,60987222934,62635336216,64318889754,66038452076,67794597758,69587907456,71418967938,73288372116,75196719078,77144614120,79132668778,81161500860,83231734478,85344000080,87498934482,89697180900,91939388982,94226214840,96558321082,98936376844,101361057822,103833046304,106353031202,108921708084,111539779206,114207953544,116926946826,119697481564,122520287086,125396099568,128325662066,131309724548,134349043926,137444384088,140596515930,143806217388,147074273470,150401476288,153788625090,157236526292,160745993510,164317847592,167952916650,171652036092,175416048654,179245804432,183142160914,187105983012,191138143094,195239521016,199411004154,203653487436,207967873374,212355072096,216816001378,221351586676,225962761158,230650465736,235415649098,240259267740,245182285998,250185676080,255270418098 mov $4,$0 sub $0,$0 add $0,5 mov $2,$4 mul $2,$4 add $0,$2 mul $2,$4 mul $0,$2 add $4,6 add $0,$4 add $4,$0 add $0,$4 mov $3,2 lpb $0,1 mov $1,$3 add $1,$0 mov $0,1 lpe sub $1,19 div $1,15 mul $1,2
118.44
2,692
0.87538
68f70f321dcab879d427df98edcde0673740adbf
1,238
asm
Assembly
programs/oeis/008/A008600.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/008/A008600.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/008/A008600.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A008600: Multiples of 18. ; 0,18,36,54,72,90,108,126,144,162,180,198,216,234,252,270,288,306,324,342,360,378,396,414,432,450,468,486,504,522,540,558,576,594,612,630,648,666,684,702,720,738,756,774,792,810,828,846,864,882,900,918,936,954,972,990,1008,1026,1044,1062,1080,1098,1116,1134,1152,1170,1188,1206,1224,1242,1260,1278,1296,1314,1332,1350,1368,1386,1404,1422,1440,1458,1476,1494,1512,1530,1548,1566,1584,1602,1620,1638,1656,1674,1692,1710,1728,1746,1764,1782,1800,1818,1836,1854,1872,1890,1908,1926,1944,1962,1980,1998,2016,2034,2052,2070,2088,2106,2124,2142,2160,2178,2196,2214,2232,2250,2268,2286,2304,2322,2340,2358,2376,2394,2412,2430,2448,2466,2484,2502,2520,2538,2556,2574,2592,2610,2628,2646,2664,2682,2700,2718,2736,2754,2772,2790,2808,2826,2844,2862,2880,2898,2916,2934,2952,2970,2988,3006,3024,3042,3060,3078,3096,3114,3132,3150,3168,3186,3204,3222,3240,3258,3276,3294,3312,3330,3348,3366,3384,3402,3420,3438,3456,3474,3492,3510,3528,3546,3564,3582,3600,3618,3636,3654,3672,3690,3708,3726,3744,3762,3780,3798,3816,3834,3852,3870,3888,3906,3924,3942,3960,3978,3996,4014,4032,4050,4068,4086,4104,4122,4140,4158,4176,4194,4212,4230,4248,4266,4284,4302,4320,4338,4356,4374,4392,4410,4428,4446,4464,4482 mov $1,$0 mul $1,18
206.333333
1,188
0.781906
3e2dd43d3c9a33cc1e5998b13e24a90ac4bbb9bd
194
asm
Assembly
src/screen.asm
backwardspy/altega
3cb28eafa18e618361439dc510b24b3f232ca3b0
[ "MIT" ]
null
null
null
src/screen.asm
backwardspy/altega
3cb28eafa18e618361439dc510b24b3f232ca3b0
[ "MIT" ]
null
null
null
src/screen.asm
backwardspy/altega
3cb28eafa18e618361439dc510b24b3f232ca3b0
[ "MIT" ]
null
null
null
#importonce .function locate(x, y) { .return $0400 + x + y * 40 } .macro print(x, y, string) { .var loc = locate(x, y) mov16 #string : VEC0 mov16 #loc : VEC1 jsr memcpy0 }
14.923077
30
0.561856
0e66df02fa7bc20d34b2961e1125ce5a7906a920
7,931
asm
Assembly
Transynther/x86/_processed/AVXALIGN/_st_/i3-7100_9_0xca_notsx.log_21829_821.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/AVXALIGN/_st_/i3-7100_9_0xca_notsx.log_21829_821.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/AVXALIGN/_st_/i3-7100_9_0xca_notsx.log_21829_821.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r12 push %r13 push %r14 push %r8 push %rbp push %rcx push %rdi push %rsi lea addresses_UC_ht+0x194db, %rsi lea addresses_UC_ht+0xa11b, %rdi nop nop nop nop nop and $19310, %r13 mov $33, %rcx rep movsb add %r8, %r8 lea addresses_D_ht+0x126db, %rdi and $42500, %r12 mov (%rdi), %cx nop nop sub %r8, %r8 lea addresses_normal_ht+0x15edb, %rsi lea addresses_WC_ht+0x199db, %rdi nop nop nop nop nop xor %r12, %r12 mov $3, %rcx rep movsl xor %r13, %r13 lea addresses_WT_ht+0x1eedb, %rsi lea addresses_WT_ht+0x445b, %rdi nop nop nop nop and $32503, %r8 mov $20, %rcx rep movsq nop nop nop nop nop cmp $37159, %rcx lea addresses_D_ht+0x83bb, %rsi lea addresses_WC_ht+0x56db, %rdi nop nop nop nop cmp %r14, %r14 mov $72, %rcx rep movsq nop add $34770, %r8 lea addresses_normal_ht+0x805b, %r13 nop nop nop nop inc %rcx mov (%r13), %r14 nop nop cmp $45177, %r8 lea addresses_normal_ht+0xe51b, %rdi nop nop nop nop xor $39612, %rcx movups (%rdi), %xmm0 vpextrq $1, %xmm0, %r12 nop nop nop nop sub $17791, %r12 lea addresses_UC_ht+0x1b33, %r12 clflush (%r12) nop nop nop nop and $33967, %r13 mov $0x6162636465666768, %rdi movq %rdi, (%r12) nop nop nop nop nop xor %r13, %r13 lea addresses_WC_ht+0x8bd9, %r12 clflush (%r12) nop nop nop nop nop add %r14, %r14 mov (%r12), %esi nop nop nop and %r14, %r14 lea addresses_normal_ht+0x1ea5b, %rsi nop cmp $22095, %rdi and $0xffffffffffffffc0, %rsi movntdqa (%rsi), %xmm7 vpextrq $1, %xmm7, %r12 nop nop inc %rcx lea addresses_WC_ht+0x4ebb, %rsi lea addresses_A_ht+0xa7d5, %rdi clflush (%rsi) nop nop nop nop xor $45286, %r13 mov $121, %rcx rep movsl nop nop nop sub $1351, %rsi lea addresses_UC_ht+0x19502, %r13 nop nop nop add $29734, %r8 mov (%r13), %rsi xor $24101, %r12 lea addresses_UC_ht+0xf2db, %r8 xor $64643, %rsi mov $0x6162636465666768, %rdi movq %rdi, (%r8) nop nop nop nop nop and %r13, %r13 lea addresses_D_ht+0x1c35b, %rsi lea addresses_normal_ht+0x1dadb, %rdi clflush (%rsi) nop nop nop nop nop add $62476, %rbp mov $79, %rcx rep movsb nop nop nop nop add $18906, %r14 lea addresses_UC_ht+0x15e2b, %rdi lfence vmovups (%rdi), %ymm2 vextracti128 $1, %ymm2, %xmm2 vpextrq $0, %xmm2, %r8 inc %r14 pop %rsi pop %rdi pop %rcx pop %rbp pop %r8 pop %r14 pop %r13 pop %r12 ret .global s_faulty_load s_faulty_load: push %r10 push %r15 push %r8 push %rcx push %rsi // Faulty Load lea addresses_normal+0x19edb, %r15 and %r10, %r10 mov (%r15), %ecx lea oracles, %rsi and $0xff, %rcx shlq $12, %rcx mov (%rsi,%rcx,1), %rcx pop %rsi pop %rcx pop %r8 pop %r15 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_normal', 'size': 2, 'AVXalign': False}, 'OP': 'LOAD'} [Faulty Load] {'src': {'same': True, 'congruent': 0, 'NT': False, 'type': 'addresses_normal', 'size': 4, 'AVXalign': True}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'type': 'addresses_UC_ht', 'congruent': 9, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_UC_ht', 'congruent': 6, 'same': False}} {'src': {'same': False, 'congruent': 10, 'NT': False, 'type': 'addresses_D_ht', 'size': 2, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_normal_ht', 'congruent': 10, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WC_ht', 'congruent': 7, 'same': False}} {'src': {'type': 'addresses_WT_ht', 'congruent': 4, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WT_ht', 'congruent': 6, 'same': False}} {'src': {'type': 'addresses_D_ht', 'congruent': 5, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WC_ht', 'congruent': 11, 'same': False}} {'src': {'same': False, 'congruent': 7, 'NT': False, 'type': 'addresses_normal_ht', 'size': 8, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'same': False, 'congruent': 6, 'NT': False, 'type': 'addresses_normal_ht', 'size': 16, 'AVXalign': False}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 3, 'NT': False, 'type': 'addresses_UC_ht', 'size': 8, 'AVXalign': False}} {'src': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_WC_ht', 'size': 4, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'same': True, 'congruent': 7, 'NT': True, 'type': 'addresses_normal_ht', 'size': 16, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_WC_ht', 'congruent': 5, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_A_ht', 'congruent': 0, 'same': False}} {'src': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_UC_ht', 'size': 8, 'AVXalign': False}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 10, 'NT': False, 'type': 'addresses_UC_ht', 'size': 8, 'AVXalign': False}} {'src': {'type': 'addresses_D_ht', 'congruent': 7, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal_ht', 'congruent': 10, 'same': False}} {'src': {'same': False, 'congruent': 4, 'NT': False, 'type': 'addresses_UC_ht', 'size': 32, 'AVXalign': False}, 'OP': 'LOAD'} {'34': 21829} 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 */
33.605932
2,999
0.660194
e538e536b3596cf2b07403e890034467b4b50fd4
699
asm
Assembly
cards/bn4/ModCards/134-F006 MAX HP +850 (0A).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-F006 MAX HP +850 (0A).asm
RockmanEXEZone/MMBN-Mod-Card-Kit
d591ddca5566dbb323dc19c11e69410fa4073d1b
[ "Unlicense" ]
null
null
null
cards/bn4/ModCards/134-F006 MAX HP +850 (0A).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 96 card_no equ "096" card_sub equ "Mod Card 096" card_sub_x equ 64 card_desc_len equ 2 card_desc_1 equ "Address 0A" card_desc_2 equ "MAX HP +850" card_desc_3 equ "" card_name_jp_full equ "マックスHP+850" card_name_jp_game equ "マックスHP+850" card_name_en_full equ "MAX HP +850" card_name_en_game equ "MAX HP +850" card_address equ "0A" card_address_id equ 0 card_bug equ 0 card_wrote_en equ "MAX HP +850" card_wrote_jp equ "マックスHP+850"
25.888889
35
0.765379
52a6ccf1299e96b9b91945b907062a597dd5ac96
827
asm
Assembly
src/test/ref/signed-char-comparison.asm
jbrandwood/kickc
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
[ "MIT" ]
2
2022-03-01T02:21:14.000Z
2022-03-01T04:33:35.000Z
src/test/ref/signed-char-comparison.asm
jbrandwood/kickc
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
[ "MIT" ]
null
null
null
src/test/ref/signed-char-comparison.asm
jbrandwood/kickc
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
[ "MIT" ]
null
null
null
// Illustrates problem with > comparison of signed chars. // Reported by Danny Spijksma // Commodore 64 PRG executable file .file [name="signed-char-comparison.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) .label SCREEN = $400 .segment Code main: { ldx #-$80 __b1: // debug(dy) jsr debug // for(signed char dy:-128..127) inx cpx #-$80 bne __b1 // } rts } // void debug(__register(X) signed char dy) debug: { // if (dy > -120) txa sec sbc #-$78 beq __breturn bvc !+ eor #$80 !: bmi __breturn // SCREEN[i] = 10 lda #$a sta SCREEN,x __breturn: // } rts }
19.232558
73
0.608222
e11e1b4533e0c1a5c66d69ebb221680657aea4c4
543
asm
Assembly
programs/oeis/283/A283623.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/283/A283623.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/283/A283623.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A283623: a(n) = prime(n) + (1 + prime(1 + n))/2. ; 4,6,9,13,18,22,27,31,38,45,50,58,63,67,74,83,90,95,103,108,113,121,128,138,148,153,157,162,166,177,193,200,207,214,225,230,239,247,254,263,270,277,288,292,297,305,323,337,342,346,353,360,367,380,389,398,405,410,418,423,430,447,463,468,472,483,500,511,522,526,533,543,554,563,571,578,588,598,606,619,630,637,648,653,661,668,678,688,693,697,707,723,733,741,751,758,770,783,794,815 mov $1,$0 seq $0,40 ; The prime numbers. seq $1,98090 ; Numbers k such that 2k-3 is prime. sub $1,1 add $0,$1
60.333333
380
0.688766
9ee61896b5937181f9ac2a83332dce67f2125efe
1,247
asm
Assembly
kernel/core/interrupts.asm
Seltzer/royston-vasey-os
796ce1d564fc57f76048f00e6cd9b881cdcea8fc
[ "MIT" ]
null
null
null
kernel/core/interrupts.asm
Seltzer/royston-vasey-os
796ce1d564fc57f76048f00e6cd9b881cdcea8fc
[ "MIT" ]
null
null
null
kernel/core/interrupts.asm
Seltzer/royston-vasey-os
796ce1d564fc57f76048f00e6cd9b881cdcea8fc
[ "MIT" ]
null
null
null
bits 32 ; Declare globals and externs global load_idt global noop_handler [extern handle_interrupt] ; Define macro for generating an interrupt handler %macro gen_interrupt_handler 1 global interrupt_handler_%1 interrupt_handler_%1: push dword 0 ; Error code push dword %1 jmp generic_interrupt_handler %endmacro ; Generate interrupt handler functions gen_interrupt_handler 0x20 gen_interrupt_handler 0x21 generic_interrupt_handler: ; Save everything except CS, IP and flags push esp push ebp push esi push edi push edx push ecx push ebx push eax ; Invoke interrupt handler defined in C call handle_interrupt ; Restore everything pop eax pop ebx pop ecx pop edx pop edi pop esi pop ebp pop esp ; Return to generated handler add esp, 8 iret ; We map all interrupts we don't care about to this noop_handler: iret load_idt: ; Grab pointer to IDT (passed in from C code) and invoke lidt mov edx, [esp + 4] lidt [edx] ; Enable interrupts sti ret
17.319444
66
0.607859
e8fc704320d3f759591dcb164797b783c5c4c8e7
11,270
asm
Assembly
aes/keyexp_128.asm
carl008-ma/isa-l_crypto
0e4f088aace7ccca8540f54735150bf78731f0b7
[ "BSD-3-Clause" ]
null
null
null
aes/keyexp_128.asm
carl008-ma/isa-l_crypto
0e4f088aace7ccca8540f54735150bf78731f0b7
[ "BSD-3-Clause" ]
null
null
null
aes/keyexp_128.asm
carl008-ma/isa-l_crypto
0e4f088aace7ccca8540f54735150bf78731f0b7
[ "BSD-3-Clause" ]
null
null
null
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Copyright(c) 2011-2016 Intel Corporation All rights reserved. ; ; Redistribution and use in source and binary forms, with or without ; modification, are permitted provided that the following conditions ; are met: ; * Redistributions of source code must retain the above copyright ; notice, this list of conditions and the following disclaimer. ; * Redistributions in binary form must reproduce the above copyright ; notice, this list of conditions and the following disclaimer in ; the documentation and/or other materials provided with the ; distribution. ; * Neither the name of Intel Corporation nor the names of its ; contributors may be used to endorse or promote products derived ; from this software without specific prior written permission. ; ; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ; A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ; OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ; SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ; LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ; DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ; THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Routine to do AES key expansion %include "reg_sizes.asm" %macro key_expansion_128_sse 0 ;; Assumes the xmm3 includes all zeros at this point. pshufd xmm2, xmm2, 11111111b shufps xmm3, xmm1, 00010000b pxor xmm1, xmm3 shufps xmm3, xmm1, 10001100b pxor xmm1, xmm3 pxor xmm1, xmm2 %endmacro %macro key_expansion_128_avx 0 ;; Assumes the xmm3 includes all zeros at this point. vpshufd xmm2, xmm2, 11111111b vshufps xmm3, xmm3, xmm1, 00010000b vpxor xmm1, xmm1, xmm3 vshufps xmm3, xmm3, xmm1, 10001100b vpxor xmm1, xmm1, xmm3 vpxor xmm1, xmm1, xmm2 %endmacro %ifidn __OUTPUT_FORMAT__, elf64 %define KEY rdi %define EXP_ENC_KEYS rsi %define EXP_DEC_KEYS rdx %else %define KEY rcx %define EXP_ENC_KEYS rdx %define EXP_DEC_KEYS r8 %endif ; void aes_keyexp_128(UINT8 *key, ; UINT8 *enc_exp_keys, ; UINT8 *dec_exp_keys); ; ; arg 1: rcx: pointer to key ; arg 2: rdx: pointer to expanded key array for encrypt ; arg 3: r8: pointer to expanded key array for decrypt ; mk_global aes_keyexp_128_sse, function aes_keyexp_128_sse: movdqu xmm1, [KEY] ; loading the AES key movdqu [EXP_ENC_KEYS + 16*0], xmm1 movdqu [EXP_DEC_KEYS + 16*10], xmm1 ; Storing key in memory pxor xmm3, xmm3 aeskeygenassist xmm2, xmm1, 0x1 ; Generating round key 1 key_expansion_128_sse movdqu [EXP_ENC_KEYS + 16*1], xmm1 aesimc xmm4, xmm1 movdqu [EXP_DEC_KEYS + 16*9], xmm4 aeskeygenassist xmm2, xmm1, 0x2 ; Generating round key 2 key_expansion_128_sse movdqu [EXP_ENC_KEYS + 16*2], xmm1 aesimc xmm5, xmm1 movdqu [EXP_DEC_KEYS + 16*8], xmm5 aeskeygenassist xmm2, xmm1, 0x4 ; Generating round key 3 key_expansion_128_sse movdqu [EXP_ENC_KEYS + 16*3], xmm1 aesimc xmm4, xmm1 movdqu [EXP_DEC_KEYS + 16*7], xmm4 aeskeygenassist xmm2, xmm1, 0x8 ; Generating round key 4 key_expansion_128_sse movdqu [EXP_ENC_KEYS + 16*4], xmm1 aesimc xmm5, xmm1 movdqu [EXP_DEC_KEYS + 16*6], xmm5 aeskeygenassist xmm2, xmm1, 0x10 ; Generating round key 5 key_expansion_128_sse movdqu [EXP_ENC_KEYS + 16*5], xmm1 aesimc xmm4, xmm1 movdqu [EXP_DEC_KEYS + 16*5], xmm4 aeskeygenassist xmm2, xmm1, 0x20 ; Generating round key 6 key_expansion_128_sse movdqu [EXP_ENC_KEYS + 16*6], xmm1 aesimc xmm5, xmm1 movdqu [EXP_DEC_KEYS + 16*4], xmm5 aeskeygenassist xmm2, xmm1, 0x40 ; Generating round key 7 key_expansion_128_sse movdqu [EXP_ENC_KEYS + 16*7], xmm1 aesimc xmm4, xmm1 movdqu [EXP_DEC_KEYS + 16*3], xmm4 aeskeygenassist xmm2, xmm1, 0x80 ; Generating round key 8 key_expansion_128_sse movdqu [EXP_ENC_KEYS + 16*8], xmm1 aesimc xmm5, xmm1 movdqu [EXP_DEC_KEYS + 16*2], xmm5 aeskeygenassist xmm2, xmm1, 0x1b ; Generating round key 9 key_expansion_128_sse movdqu [EXP_ENC_KEYS + 16*9], xmm1 aesimc xmm4, xmm1 movdqu [EXP_DEC_KEYS + 16*1], xmm4 aeskeygenassist xmm2, xmm1, 0x36 ; Generating round key 10 key_expansion_128_sse movdqu [EXP_ENC_KEYS + 16*10], xmm1 movdqu [EXP_DEC_KEYS + 16*0], xmm1 ret ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; mk_global aes_keyexp_128_avx, function aes_keyexp_128_avx: vmovdqu xmm1, [KEY] ; loading the AES key vmovdqu [EXP_ENC_KEYS + 16*0], xmm1 vmovdqu [EXP_DEC_KEYS + 16*10], xmm1 ; Storing key in memory vpxor xmm3, xmm3, xmm3 vaeskeygenassist xmm2, xmm1, 0x1 ; Generating round key 1 key_expansion_128_avx vmovdqu [EXP_ENC_KEYS + 16*1], xmm1 vaesimc xmm4, xmm1 vmovdqu [EXP_DEC_KEYS + 16*9], xmm4 vaeskeygenassist xmm2, xmm1, 0x2 ; Generating round key 2 key_expansion_128_avx vmovdqu [EXP_ENC_KEYS + 16*2], xmm1 vaesimc xmm5, xmm1 vmovdqu [EXP_DEC_KEYS + 16*8], xmm5 vaeskeygenassist xmm2, xmm1, 0x4 ; Generating round key 3 key_expansion_128_avx vmovdqu [EXP_ENC_KEYS + 16*3], xmm1 vaesimc xmm4, xmm1 vmovdqu [EXP_DEC_KEYS + 16*7], xmm4 vaeskeygenassist xmm2, xmm1, 0x8 ; Generating round key 4 key_expansion_128_avx vmovdqu [EXP_ENC_KEYS + 16*4], xmm1 vaesimc xmm5, xmm1 vmovdqu [EXP_DEC_KEYS + 16*6], xmm5 vaeskeygenassist xmm2, xmm1, 0x10 ; Generating round key 5 key_expansion_128_avx vmovdqu [EXP_ENC_KEYS + 16*5], xmm1 vaesimc xmm4, xmm1 vmovdqu [EXP_DEC_KEYS + 16*5], xmm4 vaeskeygenassist xmm2, xmm1, 0x20 ; Generating round key 6 key_expansion_128_avx vmovdqu [EXP_ENC_KEYS + 16*6], xmm1 vaesimc xmm5, xmm1 vmovdqu [EXP_DEC_KEYS + 16*4], xmm5 vaeskeygenassist xmm2, xmm1, 0x40 ; Generating round key 7 key_expansion_128_avx vmovdqu [EXP_ENC_KEYS + 16*7], xmm1 vaesimc xmm4, xmm1 vmovdqu [EXP_DEC_KEYS + 16*3], xmm4 vaeskeygenassist xmm2, xmm1, 0x80 ; Generating round key 8 key_expansion_128_avx vmovdqu [EXP_ENC_KEYS + 16*8], xmm1 vaesimc xmm5, xmm1 vmovdqu [EXP_DEC_KEYS + 16*2], xmm5 vaeskeygenassist xmm2, xmm1, 0x1b ; Generating round key 9 key_expansion_128_avx vmovdqu [EXP_ENC_KEYS + 16*9], xmm1 vaesimc xmm4, xmm1 vmovdqu [EXP_DEC_KEYS + 16*1], xmm4 vaeskeygenassist xmm2, xmm1, 0x36 ; Generating round key 10 key_expansion_128_avx vmovdqu [EXP_ENC_KEYS + 16*10], xmm1 vmovdqu [EXP_DEC_KEYS + 16*0], xmm1 ret ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; void aes_keyexp_128_enc_sse(UINT8 *key, ; UINT8 *enc_exp_keys); ; ; arg 1: rcx: pointer to key ; arg 2: rdx: pointer to expanded key array for encrypt ; mk_global aes_keyexp_128_enc_sse, function aes_keyexp_128_enc_sse: movdqu xmm1, [KEY] ; loading the AES key movdqu [EXP_ENC_KEYS + 16*0], xmm1 pxor xmm3, xmm3 aeskeygenassist xmm2, xmm1, 0x1 ; Generating round key 1 key_expansion_128_sse movdqu [EXP_ENC_KEYS + 16*1], xmm1 aeskeygenassist xmm2, xmm1, 0x2 ; Generating round key 2 key_expansion_128_sse movdqu [EXP_ENC_KEYS + 16*2], xmm1 aeskeygenassist xmm2, xmm1, 0x4 ; Generating round key 3 key_expansion_128_sse movdqu [EXP_ENC_KEYS + 16*3], xmm1 aeskeygenassist xmm2, xmm1, 0x8 ; Generating round key 4 key_expansion_128_sse movdqu [EXP_ENC_KEYS + 16*4], xmm1 aeskeygenassist xmm2, xmm1, 0x10 ; Generating round key 5 key_expansion_128_sse movdqu [EXP_ENC_KEYS + 16*5], xmm1 aeskeygenassist xmm2, xmm1, 0x20 ; Generating round key 6 key_expansion_128_sse movdqu [EXP_ENC_KEYS + 16*6], xmm1 aeskeygenassist xmm2, xmm1, 0x40 ; Generating round key 7 key_expansion_128_sse movdqu [EXP_ENC_KEYS + 16*7], xmm1 aeskeygenassist xmm2, xmm1, 0x80 ; Generating round key 8 key_expansion_128_sse movdqu [EXP_ENC_KEYS + 16*8], xmm1 aeskeygenassist xmm2, xmm1, 0x1b ; Generating round key 9 key_expansion_128_sse movdqu [EXP_ENC_KEYS + 16*9], xmm1 aeskeygenassist xmm2, xmm1, 0x36 ; Generating round key 10 key_expansion_128_sse movdqu [EXP_ENC_KEYS + 16*10], xmm1 ret mk_global aes_keyexp_128_enc_avx, function aes_keyexp_128_enc_avx: vmovdqu xmm1, [KEY] ; loading the AES key vmovdqu [EXP_ENC_KEYS + 16*0], xmm1 vpxor xmm3, xmm3, xmm3 vaeskeygenassist xmm2, xmm1, 0x1 ; Generating round key 1 key_expansion_128_avx vmovdqu [EXP_ENC_KEYS + 16*1], xmm1 vaeskeygenassist xmm2, xmm1, 0x2 ; Generating round key 2 key_expansion_128_avx vmovdqu [EXP_ENC_KEYS + 16*2], xmm1 vaeskeygenassist xmm2, xmm1, 0x4 ; Generating round key 3 key_expansion_128_avx vmovdqu [EXP_ENC_KEYS + 16*3], xmm1 vaeskeygenassist xmm2, xmm1, 0x8 ; Generating round key 4 key_expansion_128_avx vmovdqu [EXP_ENC_KEYS + 16*4], xmm1 vaeskeygenassist xmm2, xmm1, 0x10 ; Generating round key 5 key_expansion_128_avx vmovdqu [EXP_ENC_KEYS + 16*5], xmm1 vaeskeygenassist xmm2, xmm1, 0x20 ; Generating round key 6 key_expansion_128_avx vmovdqu [EXP_ENC_KEYS + 16*6], xmm1 vaeskeygenassist xmm2, xmm1, 0x40 ; Generating round key 7 key_expansion_128_avx vmovdqu [EXP_ENC_KEYS + 16*7], xmm1 vaeskeygenassist xmm2, xmm1, 0x80 ; Generating round key 8 key_expansion_128_avx vmovdqu [EXP_ENC_KEYS + 16*8], xmm1 vaeskeygenassist xmm2, xmm1, 0x1b ; Generating round key 9 key_expansion_128_avx vmovdqu [EXP_ENC_KEYS + 16*9], xmm1 vaeskeygenassist xmm2, xmm1, 0x36 ; Generating round key 10 key_expansion_128_avx vmovdqu [EXP_ENC_KEYS + 16*10], xmm1 ret
35.109034
72
0.634871
bfcd6dae6f0fd65caff32c8ca9ef078d45b58aab
580
asm
Assembly
programs/oeis/181/A181829.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/181/A181829.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/181/A181829.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A181829: a(n) = 4*A060819(n-2)*A060819(n+2). ; 0,-12,-4,-12,0,20,12,84,8,180,60,308,24,468,140,660,48,884,252,1140,80,1428,396,1748,120,2100,572,2484,168,2900,780,3348,224,3828,1020,4340,288,4884,1292,5460,360,6068,1596,6708,440,7380,1932,8084,528,8820,2300,9588,624,10388,2700,11220,728,12084,3132,12980,840,13908,3596,14868,960,15860,4092,16884,1088,17940,4620,19028,1224,20148,5180,21300,1368,22484,5772,23700,1520,24948,6396,26228,1680,27540,7052,28884,1848,30260,7740,31668,2024,33108,8460,34580,2208,36084,9212,37620 sub $0,2 pow $0,2 sub $0,4 dif $0,4 dif $0,4 mul $0,4
58
477
0.743103
f24438d0feef3ecd525a68e814571870ae326938
1,068
asm
Assembly
C5515_Support_Files/C5515_Lib/dsplib_2.40.00/55x_src/minvec.asm
HeroSizy/Sizy
89bc29940dc7666591259730b5112efd0a626043
[ "Unlicense" ]
null
null
null
C5515_Support_Files/C5515_Lib/dsplib_2.40.00/55x_src/minvec.asm
HeroSizy/Sizy
89bc29940dc7666591259730b5112efd0a626043
[ "Unlicense" ]
null
null
null
C5515_Support_Files/C5515_Lib/dsplib_2.40.00/55x_src/minvec.asm
HeroSizy/Sizy
89bc29940dc7666591259730b5112efd0a626043
[ "Unlicense" ]
null
null
null
;*********************************************************** ; Version 2.40.00 ;*********************************************************** ; Function: MINVEC ; Processor: C55xx ; Description: minimum Value and Index of the minimum element of a vector ; Useage: void minvec (DATA *x, ushort nx, DATA *val, DATA *idx) ; Copyright Texas instruments Inc, 2000 ;******************************************************************************** .text .global _minvec _minvec: PSH mmap(ST0_55) PSH mmap(ST1_55) PSH mmap(ST2_55) PSH mmap(ST3_55) MOV *AR0+,AC1 || SUB #2,T0 MOV T0,BRC0 || MOV #0,AR3 MOV #0,T0 || RPTBLOCAL end_block-1 MOV *AR0+,AC0 || MAR *AR3+ MIN AC0,AC1 XCCPART end_block, !CARRY || MOV AR3,*AR2 end_block: MOV AC1,*AR1 POP mmap(ST3_55) POP mmap(ST2_55) POP mmap(ST1_55) POP mmap(ST0_55) RET
25.428571
82
0.405431
849c48a019b615797b60a971f62582b59a67fc67
2,001
asm
Assembly
programs/oeis/048/A048500.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/048/A048500.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/048/A048500.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A048500: a(n) = 2^(n-1)*(7*n-12)+7. ; 1,2,11,43,135,375,967,2375,5639,13063,29703,66567,147463,323591,704519,1523719,3276807,7012359,14942215,31719431,67108871,141557767,297795591,624951303,1308622855,2734686215,5704253447,11878268935,24696061959,51271172103,106300440583,220117073927,455266533383,940597837831,1941325217799,4002909519879,8246337208327,16973710753799,34909494181895,71743133712391,147334558121991,302365697638407,620124558065671,1271035441709063,2603643534573575,5330432371458055,10907155347537927,22306891904319495,45598946227126279,93168217291227143,190277084256403463,388435467860705287,792633534417207303,1616792266226008071,3296634927235203079,6719370644036780039,13690942867206307847,27886288892678111239,56781384101887213575,115580380836836409351,235195986939796783111,478462424411841495047,973065749888178847751,1978413301905349410823,4021390208068682252295,8171907624653331365895,16602069666338596454407,33720648166741060354055,68474314001609855598599,139014663339475180978183,282161397351461301518343,572586936047944482160647,1161702154785932722569223,2356460874951952961634311,4779034880664080956260359,9690296022848511978504199,19645044568737724088975367,39818994183556848441884679,80695798459276497411637255,163507217102878595879010311,331245674574408393869492231,670953829886119191961927687,1358832621246843192369741831,2751515165442896001631256583,5570730176784211237046059015,11276860045365260941659209735,22824519474324198818452602887,46190637715835751507173572615,93464472966046210754883878919,189095341000841836990841225223,382523472139182504943829385223,773712524553362671811952640007,1564756209656720667472493019143,3164174740413431982642161516551,6397674123026845260678673989639,12933997530453653112146049892359,26145293629707231405869503610887,52845184397014313174893814874119,106799563069228327076097245052935,215817514688856055604813720715271 mov $1,1 lpb $0 sub $0,1 add $2,$1 add $1,$2 add $1,$0 add $1,$0 add $1,$0 mov $2,$0 lpe mov $0,$1
133.4
1,848
0.907546
156e215916ae61cb4944dde8d1a931a2503965ed
18
asm
Assembly
src/tests/gvm.asm
nrichardsonphd/gvm
e35a471b50f39f6203a54b913df4c08fba2a9d25
[ "MIT" ]
3
2016-07-20T07:53:22.000Z
2017-05-19T02:30:47.000Z
src/tests/gvm.asm
nrichardsonphd/gvm
e35a471b50f39f6203a54b913df4c08fba2a9d25
[ "MIT" ]
null
null
null
src/tests/gvm.asm
nrichardsonphd/gvm
e35a471b50f39f6203a54b913df4c08fba2a9d25
[ "MIT" ]
null
null
null
LOAD 5 LOAD 8 ADD
4.5
6
0.722222
5ed6bec246ca15b83d96ed9d1fc689a250991cc5
6,891
asm
Assembly
simd/i386/jquanti-avx2.asm
t-head-aosp/platform-external-libjpeg-turbo
3457af89e30cd924f687c412c6797aa63ed0c1e3
[ "Zlib" ]
3,710
2016-03-26T00:40:48.000Z
2022-03-31T21:35:12.000Z
simd/i386/jquanti-avx2.asm
t-head-aosp/platform-external-libjpeg-turbo
3457af89e30cd924f687c412c6797aa63ed0c1e3
[ "Zlib" ]
4,246
2016-03-26T01:21:45.000Z
2022-03-31T23:10:47.000Z
simd/i386/jquanti-avx2.asm
t-head-aosp/platform-external-libjpeg-turbo
3457af89e30cd924f687c412c6797aa63ed0c1e3
[ "Zlib" ]
942
2015-07-27T23:13:52.000Z
2022-03-31T14:11:23.000Z
; ; jquanti.asm - sample data conversion and quantization (AVX2) ; ; Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB ; Copyright (C) 2016, 2018, D. R. Commander. ; Copyright (C) 2016, Matthieu Darbois. ; ; Based on the x86 SIMD extension for IJG JPEG library ; Copyright (C) 1999-2006, MIYASAKA Masaru. ; For conditions of distribution and use, see copyright notice in jsimdext.inc ; ; This file should be assembled with NASM (Netwide Assembler), ; can *not* be assembled with Microsoft's MASM or any compatible ; assembler (including Borland's Turbo Assembler). ; NASM is available from http://nasm.sourceforge.net/ or ; http://sourceforge.net/project/showfiles.php?group_id=6208 %include "jsimdext.inc" %include "jdct.inc" ; -------------------------------------------------------------------------- SECTION SEG_TEXT BITS 32 ; ; Load data into workspace, applying unsigned->signed conversion ; ; GLOBAL(void) ; jsimd_convsamp_avx2(JSAMPARRAY sample_data, JDIMENSION start_col, ; DCTELEM *workspace); ; %define sample_data ebp + 8 ; JSAMPARRAY sample_data %define start_col ebp + 12 ; JDIMENSION start_col %define workspace ebp + 16 ; DCTELEM *workspace align 32 GLOBAL_FUNCTION(jsimd_convsamp_avx2) EXTN(jsimd_convsamp_avx2): push ebp mov ebp, esp push ebx ; push ecx ; need not be preserved ; push edx ; need not be preserved push esi push edi mov esi, JSAMPARRAY [sample_data] ; (JSAMPROW *) mov eax, JDIMENSION [start_col] mov edi, POINTER [workspace] ; (DCTELEM *) mov ebx, JSAMPROW [esi+0*SIZEOF_JSAMPROW] ; (JSAMPLE *) mov edx, JSAMPROW [esi+1*SIZEOF_JSAMPROW] ; (JSAMPLE *) movq xmm0, XMM_MMWORD [ebx+eax*SIZEOF_JSAMPLE] movq xmm1, XMM_MMWORD [edx+eax*SIZEOF_JSAMPLE] mov ebx, JSAMPROW [esi+2*SIZEOF_JSAMPROW] ; (JSAMPLE *) mov edx, JSAMPROW [esi+3*SIZEOF_JSAMPROW] ; (JSAMPLE *) movq xmm2, XMM_MMWORD [ebx+eax*SIZEOF_JSAMPLE] movq xmm3, XMM_MMWORD [edx+eax*SIZEOF_JSAMPLE] mov ebx, JSAMPROW [esi+4*SIZEOF_JSAMPROW] ; (JSAMPLE *) mov edx, JSAMPROW [esi+5*SIZEOF_JSAMPROW] ; (JSAMPLE *) movq xmm4, XMM_MMWORD [ebx+eax*SIZEOF_JSAMPLE] movq xmm5, XMM_MMWORD [edx+eax*SIZEOF_JSAMPLE] mov ebx, JSAMPROW [esi+6*SIZEOF_JSAMPROW] ; (JSAMPLE *) mov edx, JSAMPROW [esi+7*SIZEOF_JSAMPROW] ; (JSAMPLE *) movq xmm6, XMM_MMWORD [ebx+eax*SIZEOF_JSAMPLE] movq xmm7, XMM_MMWORD [edx+eax*SIZEOF_JSAMPLE] vinserti128 ymm0, ymm0, xmm1, 1 vinserti128 ymm2, ymm2, xmm3, 1 vinserti128 ymm4, ymm4, xmm5, 1 vinserti128 ymm6, ymm6, xmm7, 1 vpxor ymm1, ymm1, ymm1 ; ymm1=(all 0's) vpunpcklbw ymm0, ymm0, ymm1 vpunpcklbw ymm2, ymm2, ymm1 vpunpcklbw ymm4, ymm4, ymm1 vpunpcklbw ymm6, ymm6, ymm1 vpcmpeqw ymm7, ymm7, ymm7 vpsllw ymm7, ymm7, 7 ; ymm7={0xFF80 0xFF80 0xFF80 0xFF80 ..} vpaddw ymm0, ymm0, ymm7 vpaddw ymm2, ymm2, ymm7 vpaddw ymm4, ymm4, ymm7 vpaddw ymm6, ymm6, ymm7 vmovdqu YMMWORD [YMMBLOCK(0,0,edi,SIZEOF_DCTELEM)], ymm0 vmovdqu YMMWORD [YMMBLOCK(2,0,edi,SIZEOF_DCTELEM)], ymm2 vmovdqu YMMWORD [YMMBLOCK(4,0,edi,SIZEOF_DCTELEM)], ymm4 vmovdqu YMMWORD [YMMBLOCK(6,0,edi,SIZEOF_DCTELEM)], ymm6 vzeroupper pop edi pop esi ; pop edx ; need not be preserved ; pop ecx ; need not be preserved pop ebx pop ebp ret ; -------------------------------------------------------------------------- ; ; Quantize/descale the coefficients, and store into coef_block ; ; This implementation is based on an algorithm described in ; "How to optimize for the Pentium family of microprocessors" ; (http://www.agner.org/assem/). ; ; GLOBAL(void) ; jsimd_quantize_avx2(JCOEFPTR coef_block, DCTELEM *divisors, ; DCTELEM *workspace); ; %define RECIPROCAL(m, n, b) \ YMMBLOCK(DCTSIZE * 0 + (m), (n), (b), SIZEOF_DCTELEM) %define CORRECTION(m, n, b) \ YMMBLOCK(DCTSIZE * 1 + (m), (n), (b), SIZEOF_DCTELEM) %define SCALE(m, n, b) \ YMMBLOCK(DCTSIZE * 2 + (m), (n), (b), SIZEOF_DCTELEM) %define coef_block ebp + 8 ; JCOEFPTR coef_block %define divisors ebp + 12 ; DCTELEM *divisors %define workspace ebp + 16 ; DCTELEM *workspace align 32 GLOBAL_FUNCTION(jsimd_quantize_avx2) EXTN(jsimd_quantize_avx2): push ebp mov ebp, esp ; push ebx ; unused ; push ecx ; unused ; push edx ; need not be preserved push esi push edi mov esi, POINTER [workspace] mov edx, POINTER [divisors] mov edi, JCOEFPTR [coef_block] vmovdqu ymm4, [YMMBLOCK(0,0,esi,SIZEOF_DCTELEM)] vmovdqu ymm5, [YMMBLOCK(2,0,esi,SIZEOF_DCTELEM)] vmovdqu ymm6, [YMMBLOCK(4,0,esi,SIZEOF_DCTELEM)] vmovdqu ymm7, [YMMBLOCK(6,0,esi,SIZEOF_DCTELEM)] vpabsw ymm0, ymm4 vpabsw ymm1, ymm5 vpabsw ymm2, ymm6 vpabsw ymm3, ymm7 vpaddw ymm0, YMMWORD [CORRECTION(0,0,edx)] ; correction + roundfactor vpaddw ymm1, YMMWORD [CORRECTION(2,0,edx)] vpaddw ymm2, YMMWORD [CORRECTION(4,0,edx)] vpaddw ymm3, YMMWORD [CORRECTION(6,0,edx)] vpmulhuw ymm0, YMMWORD [RECIPROCAL(0,0,edx)] ; reciprocal vpmulhuw ymm1, YMMWORD [RECIPROCAL(2,0,edx)] vpmulhuw ymm2, YMMWORD [RECIPROCAL(4,0,edx)] vpmulhuw ymm3, YMMWORD [RECIPROCAL(6,0,edx)] vpmulhuw ymm0, YMMWORD [SCALE(0,0,edx)] ; scale vpmulhuw ymm1, YMMWORD [SCALE(2,0,edx)] vpmulhuw ymm2, YMMWORD [SCALE(4,0,edx)] vpmulhuw ymm3, YMMWORD [SCALE(6,0,edx)] vpsignw ymm0, ymm0, ymm4 vpsignw ymm1, ymm1, ymm5 vpsignw ymm2, ymm2, ymm6 vpsignw ymm3, ymm3, ymm7 vmovdqu [YMMBLOCK(0,0,edi,SIZEOF_DCTELEM)], ymm0 vmovdqu [YMMBLOCK(2,0,edi,SIZEOF_DCTELEM)], ymm1 vmovdqu [YMMBLOCK(4,0,edi,SIZEOF_DCTELEM)], ymm2 vmovdqu [YMMBLOCK(6,0,edi,SIZEOF_DCTELEM)], ymm3 vzeroupper pop edi pop esi ; pop edx ; need not be preserved ; pop ecx ; unused ; pop ebx ; unused pop ebp ret ; For some reason, the OS X linker does not honor the request to align the ; segment unless we do this. align 32
36.460317
79
0.586852
e4c97c7cc9707561e6269c690ffded9b190aa021
295
asm
Assembly
legacy/src/kernel.asm
ZakFarmer/ZNIX
ab860819e0537774c835f539393b7e3e158b7086
[ "Apache-2.0" ]
null
null
null
legacy/src/kernel.asm
ZakFarmer/ZNIX
ab860819e0537774c835f539393b7e3e158b7086
[ "Apache-2.0" ]
null
null
null
legacy/src/kernel.asm
ZakFarmer/ZNIX
ab860819e0537774c835f539393b7e3e158b7086
[ "Apache-2.0" ]
null
null
null
bits 32 ; use 32 bit processor mode (for compatibility) section .text align 4 dd 0x1BADB002 dd 0x00 dd - (0x1BADB002+0x00) global start extern kmain ; declare main kernel function start: cli ; clear interrupts call kmain ; call main kernel function hlt ; halt
22.692308
58
0.684746
b306c309e180810c497f5a4adb07e94c41950a04
1,553
asm
Assembly
programs/oeis/269/A269469.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/269/A269469.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/269/A269469.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A269469: Number of length-5 0..n arrays with no repeated value equal to the previous repeated value. ; 14,174,852,2780,7170,15834,31304,56952,97110,157190,243804,364884,529802,749490,1036560,1405424,1872414,2455902,3176420,4056780,5122194,6400394,7921752,9719400,11829350,14290614,17145324,20438852,24219930,28540770,33457184,39028704,45318702,52394510,60327540,69193404,79072034,90047802,102209640,115651160,130470774,146771814,164662652,184256820,205673130,229035794,254474544,282124752,312127550,344629950,379784964,417751724,458695602,502788330,550208120,601139784,655774854,714311702,776955660,843919140,915421754,991690434,1072959552,1159471040,1251474510,1349227374,1452994964,1563050652,1679675970,1803160730,1933803144,2071909944,2217796502,2371786950,2534214300,2705420564,2885756874,3075583602,3275270480,3485196720,3705751134,3937332254,4180348452,4435218060,4702369490,4982241354,5275282584,5581952552,5902721190,6238069110,6588487724,6954479364,7336557402,7735246370,8151082080,8584611744,9036394094,9506999502,9997010100,10507019900 mov $1,14 mov $2,49 mov $5,$0 mov $6,$0 lpb $2 add $1,$5 sub $2,1 lpe mov $3,$6 lpb $3 sub $3,1 add $4,$5 lpe mov $2,63 mov $5,$4 lpb $2 add $1,$5 sub $2,1 lpe mov $3,$6 mov $4,0 lpb $3 sub $3,1 add $4,$5 lpe mov $2,37 mov $5,$4 lpb $2 add $1,$5 sub $2,1 lpe mov $3,$6 mov $4,0 lpb $3 sub $3,1 add $4,$5 lpe mov $2,10 mov $5,$4 lpb $2 add $1,$5 sub $2,1 lpe mov $3,$6 mov $4,0 lpb $3 sub $3,1 add $4,$5 lpe mov $2,1 mov $5,$4 lpb $2 add $1,$5 sub $2,1 lpe mov $0,$1
25.883333
946
0.761751
fe7bb3f5b34d143ba34d90999f496b3efd57594c
427
asm
Assembly
programs/oeis/072/A072561.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/072/A072561.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/072/A072561.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A072561: Denominators of w(n) equals 3 where w(1)=w(2)=w(3)=1, w(n)=(w(n-1)*w(n-2)+(w(n-1)+w(n-2))/3) / w(n-3). ; 1,3,4,6,7,9,10,12,13,15,19,21,22,24,25,27,28,30,31,33,37,39,40,42,43,45,46,48,49,51,55,57,58,60,61,63,64,66,67,69,73,75,76,78,79,81,82,84,85,87,91,93,94,96,97,99,100,102,103,105,109,111,112,114,115,117,118 mov $1,$0 div $1,2 mod $1,5 mov $2,$0 sub $0,$1 mul $0,4 add $0,$1 add $0,2 div $0,5 add $0,1 add $0,$2
28.466667
207
0.594848
030962c103336d049c2ccd1e1703b59047d48542
6,939
asm
Assembly
Transynther/x86/_processed/NONE/_xt_sm_/i9-9900K_12_0xca_notsx.log_21829_172.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_xt_sm_/i9-9900K_12_0xca_notsx.log_21829_172.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_xt_sm_/i9-9900K_12_0xca_notsx.log_21829_172.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 %r15 push %r9 push %rax push %rbx push %rcx push %rdi push %rsi lea addresses_A_ht+0x1aacf, %rsi lea addresses_WC_ht+0xd987, %rdi add $20219, %rbx mov $67, %rcx rep movsw nop cmp %rax, %rax lea addresses_normal_ht+0xd3cf, %r11 nop nop nop nop cmp %rdi, %rdi movb $0x61, (%r11) nop nop nop cmp %r11, %r11 lea addresses_WC_ht+0x93cf, %rsi lea addresses_WC_ht+0xb761, %rdi and $55325, %r9 mov $107, %rcx rep movsw nop nop nop nop nop xor $58873, %rax lea addresses_A_ht+0x1284f, %rbx clflush (%rbx) nop xor $13401, %rcx movb $0x61, (%rbx) nop nop nop nop dec %r11 lea addresses_A_ht+0x2497, %r11 nop nop nop nop nop xor %rax, %rax mov (%r11), %r9d sub %rax, %rax lea addresses_D_ht+0x1148f, %rsi lea addresses_UC_ht+0x16cf7, %rdi clflush (%rdi) nop nop nop nop cmp $11776, %r15 mov $127, %rcx rep movsw nop nop add $45109, %r9 lea addresses_normal_ht+0x7cf, %r11 nop nop and $47780, %rax mov $0x6162636465666768, %rdi movq %rdi, %xmm4 vmovups %ymm4, (%r11) sub %r11, %r11 lea addresses_normal_ht+0x1ac31, %rax nop nop nop nop nop add %r15, %r15 movb (%rax), %cl xor $22552, %r9 pop %rsi pop %rdi pop %rcx pop %rbx pop %rax pop %r9 pop %r15 pop %r11 ret .global s_faulty_load s_faulty_load: push %r15 push %r9 push %rax push %rbp push %rbx push %rdi push %rsi // Store lea addresses_A+0x19bcf, %rbp nop nop nop and $44154, %rbx movl $0x51525354, (%rbp) nop nop nop nop nop sub $25218, %rdi // Store lea addresses_A+0x19bcf, %rbp nop nop sub $46371, %rsi movb $0x51, (%rbp) nop nop nop nop add %rbp, %rbp // Store lea addresses_D+0xe30f, %r9 nop inc %rbp mov $0x5152535455565758, %rsi movq %rsi, %xmm0 vmovups %ymm0, (%r9) nop inc %rax // Store lea addresses_WT+0x1e3cf, %rax nop nop nop nop xor $45580, %rbx movw $0x5152, (%rax) nop nop nop nop nop and $8736, %rbp // Faulty Load lea addresses_A+0x19bcf, %rdi nop cmp $5863, %rbx mov (%rdi), %r15d lea oracles, %rsi and $0xff, %r15 shlq $12, %r15 mov (%rsi,%r15,1), %r15 pop %rsi pop %rdi pop %rbx pop %rbp pop %rax pop %r9 pop %r15 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_A', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0}} {'OP': 'STOR', 'dst': {'same': True, 'type': 'addresses_A', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 0}} {'OP': 'STOR', 'dst': {'same': True, 'type': 'addresses_A', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 0}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_D', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 6}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WT', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 11}} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_A', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 0}} <gen_prepare_buffer> {'OP': 'REPM', 'src': {'same': False, 'congruent': 5, 'type': 'addresses_A_ht'}, 'dst': {'same': False, 'congruent': 3, 'type': 'addresses_WC_ht'}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_normal_ht', 'NT': True, 'AVXalign': False, 'size': 1, 'congruent': 9}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 10, 'type': 'addresses_WC_ht'}, 'dst': {'same': False, 'congruent': 1, 'type': 'addresses_WC_ht'}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_A_ht', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 6}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_A_ht', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 3}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 6, 'type': 'addresses_D_ht'}, 'dst': {'same': False, 'congruent': 2, 'type': 'addresses_UC_ht'}} {'OP': 'STOR', 'dst': {'same': True, 'type': 'addresses_normal_ht', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 3}} {'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_normal_ht', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 0}} {'51': 21829} 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 */
34.695
2,999
0.655426
08b2c552392093265341c11a4a85be98cc81d9ad
214
asm
Assembly
nrom-scroller/src/control_read.asm
Gumball2415/nes-scribbles
96017f512cb7b3a86d3e64e865f3c23ff7483bc6
[ "MIT" ]
null
null
null
nrom-scroller/src/control_read.asm
Gumball2415/nes-scribbles
96017f512cb7b3a86d3e64e865f3c23ff7483bc6
[ "MIT" ]
null
null
null
nrom-scroller/src/control_read.asm
Gumball2415/nes-scribbles
96017f512cb7b3a86d3e64e865f3c23ff7483bc6
[ "MIT" ]
null
null
null
.include "defines.inc" .include "global.inc" .segment "BANK0" .proc CONTROL_READ LDA #$01 STA JOYPAD1 STA controller_1 LSR A STA JOYPAD1 : LDA JOYPAD1 LSR ROL controller_1 BCC :- RTS .endproc
11.263158
22
0.682243
ac8a27f60752ebd28c498d9377bc062b552defa6
416
asm
Assembly
programs/oeis/047/A047592.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/047/A047592.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/047/A047592.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A047592: Numbers that are congruent to {1, 2, 3, 4, 5, 6, 7} mod 8. ; 1,2,3,4,5,6,7,9,10,11,12,13,14,15,17,18,19,20,21,22,23,25,26,27,28,29,30,31,33,34,35,36,37,38,39,41,42,43,44,45,46,47,49,50,51,52,53,54,55,57,58,59,60,61,62,63,65,66,67,68,69,70,71,73,74,75,76,77,78,79,81,82,83,84,85,86,87,89,90,91,92,93,94,95,97,98,99,100,101,102,103,105,106,107,108,109,110,111,113,114 mov $1,$0 div $0,7 add $0,$1 add $0,1
52
306
0.644231
d91dfda7f03cd7b4910302f4c576004be07176f8
1,026
a51
Assembly
Class Exercises/Problem 15.a51
pronoym99/Microcontrollers-and-Applications
b96fbef72ef66999502d32cc7a0cb84bbe8214ed
[ "Unlicense" ]
1
2018-10-28T21:11:08.000Z
2018-10-28T21:11:08.000Z
Class Exercises/Problem 15.a51
pronoym99/Microcontrollers-and-Applications
b96fbef72ef66999502d32cc7a0cb84bbe8214ed
[ "Unlicense" ]
null
null
null
Class Exercises/Problem 15.a51
pronoym99/Microcontrollers-and-Applications
b96fbef72ef66999502d32cc7a0cb84bbe8214ed
[ "Unlicense" ]
null
null
null
;Assume P1 as the input port connected to a temperature sensor. Write a program to read the temperature and test it for a value of 30 degree celsius ;depending on the test results place the temperature value in three different registers ;logic:30d=1Eh and comparison yields either of the three results -- > or < or = org 0000h clr c ;clear carry flag which would be modified later mov p1,#0ffh ;p1 configured as input mov a,p1 ;temperature value taken in accumulator subb a,#1eh ;subtraction with 30d so as to compare jz M1 ;temp = 30d jc M2 ;temp < 30d mov r3,p1 ;action for temp > 30d sjmp finish ;directly move to the end of the program after performing desired action M1:mov r2,#1eh ;action for temp = 30d sjmp finish ;directly move to the end of the program after performing desired action M2:mov r4,p1 ;action for temp < 30d finish: end
48.857143
149
0.636452
3a13833e9d024cd85ac8aaa54cf8cb5b1e34bc4c
6,430
asm
Assembly
base/ntos/rtl/amd64/debugstb.asm
987432340/wrk-v1.2
423d4c22b892bcc97778385bc0a646ed7a3cfbde
[ "Intel" ]
1
2022-03-12T13:57:18.000Z
2022-03-12T13:57:18.000Z
base/ntos/rtl/amd64/debugstb.asm
987432340/wrk-v1.2
423d4c22b892bcc97778385bc0a646ed7a3cfbde
[ "Intel" ]
null
null
null
base/ntos/rtl/amd64/debugstb.asm
987432340/wrk-v1.2
423d4c22b892bcc97778385bc0a646ed7a3cfbde
[ "Intel" ]
1
2021-11-25T08:18:04.000Z
2021-11-25T08:18:04.000Z
title "Debug Support Functions" ;++ ; ; Copyright (c) Microsoft Corporation. All rights reserved. ; ; You may only use this code if you agree to the terms of the Windows Research Kernel Source Code License agreement (see License.txt). ; If you do not agree to the terms, do not use the code. ; ; Copyright (c) 2000 Microsoft Corporation ; ; Module Name: ; ; debugstb.asm ; ; Abstract: ; ; This module implements functions to support debugging NT. ; ;-- include ksamd64.inc subttl "Break Point" ;++ ; ; VOID ; DbgBreakPoint ( ; VOID ; ) ; ; Routine Description: ; ; This function executes a breakpoint instruction. Useful for entering ; the debugger under program control. This breakpoint will always go to ; the kernel debugger if one is installed, otherwise it will go to the ; debug subsystem. ; ; Arguments: ; ; None. ; ; Return Value: ; ; None. ; ;-- LEAF_ENTRY DbgBreakPoint, _TEXT$00 int 3 ; break into debugger ret ; return LEAF_END DbgBreakPoint, _TEXT$00 subttl "User Break Point" ;++ ; ; VOID ; DbgUserBreakPoint() ; ; Routine Description: ; ; This function executes a breakpoint instruction. Useful for entering ; the debug subsystem under program control. The kernel debugger will ; ignore this breakpoint since it will not find the instruction address ; its breakpoint table. ; ; Arguments: ; ; None. ; ; Return Value: ; ; None. ; ;-- LEAF_ENTRY DbgUserBreakPoint, _TEXT$00 int 3 ; break into debugger ret ; return LEAF_END DbgUserBreakPoint, _TEXT$00 subttl "Break Point With Status" ;++ ; ; VOID ; DbgBreakPointWithStatus( ; IN ULONG Status ; ) ; ; Routine Description: ; ; This function executes a breakpoint instruction. Useful for entering ; the debugger under program control. This breakpoint will always go to ; the kernel debugger if one is installed, otherwise it will go to the ; debug subsystem. This function is identical to DbgBreakPoint, except ; that it takes an argument which the debugger can see. ; ; Note: The debugger checks the address of the breakpoint instruction ; against the address RtlpBreakWithStatusInstruction. If it matches, ; we have a breakpoint with status. A breakpoint is normally issued ; with the break_debug_stop macro which generates two instructions. ; We can't use the macro here because of the "label on the breakpoint" ; requirement. ; ; Arguments: ; ; Status (ecx) - Supplies the break point status code. ; ; Return Value: ; ; None. ; ;-- altentry RtlpBreakWithStatusInstruction LEAF_ENTRY DbgBreakPointWithStatus, _TEXT$00 ALTERNATE_ENTRY RtlpBreakWithStatusInstruction int 3 ; break into debugger ret ; return LEAF_END DbgBreakPointWithStatus, _TEXT$00 subttl "Debug Print" ;++ ; ; NTSTATUS ; DebugPrint( ; IN PSTRING Output, ; IN ULONG ComponentId, ; IN ULONG Level ; ) ; ; Routine Description: ; ; This function executes a debug print breakpoint. ; ; Arguments: ; ; Output (rcx) - Supplies a pointer to the output string descriptor. ; ; ComponentId (edx) - Supplies the Id of the calling component. ; ; Level (r8d) - Supplies the output importance level. ; ; Return Value: ; ; STATUS_SUCCESS is returned if the debug print was completed successfully. ; ; STATUS_BREAKPOINT is returned if user typed a Control-C during print. ; ; STATUS_DEVICE_NOT_CONNECTED is returned if kernel debugger not present. ; ;-- LEAF_ENTRY DebugPrint, _TEXT$00 mov r9d, r8d ; set importance level mov r8d, edx ; set component id mov dx, StrLength[rcx] ; set length of output string mov rcx, StrBuffer[rcx] ; set address of output string mov eax, BREAKPOINT_PRINT ; set debug service type int 2dh ; call debug service int 3 ; required - do not remove ret ; return LEAF_END DebugPrint, _TEXT$00 subttl "Debug Prompt" ;++ ; ; ULONG ; DebugPrompt( ; IN PSTRING Output, ; IN PSTRING Input ; ) ; ; Routine Description: ; ; This function executes a debug prompt breakpoint. ; ; Arguments: ; ; Output (rcx) - Supplies a pointer to the output string descriptor. ; ; Input (rdx) - Supplies a pointer to the input string descriptor. ; ; Return Value: ; ; The length of the input string is returned as the function value. ; ;-- LEAF_ENTRY DebugPrompt, _TEXT$00 mov r9w, StrMaximumLength[rdx] ; set maximum length of input string mov r8, StrBuffer[rdx] ; set address of input string mov dx, StrLength[rcx] ; set length of output string mov rcx, StrBuffer[rcx] ; set address of output string mov eax, BREAKPOINT_PROMPT ; set debug service type int 2dh ; call debug service int 3 ; required - do not remove ret ; return LEAF_END DebugPrompt, _TEXT$00 ;++ ; ; VOID ; DebugService2( ; IN PVOID Param1, ; IN PVOID Param2, ; IN ULONG Service ; ) ; ; Routine Description: ; ; This function calls the kernel debugger to execute a command string. ; ; Arguments: ; ; Param1 (rcx) - Supplies the first parameter to the KD fault handler ; ; Param2 (rdx) - Supplies the second parameter to the KD fault handler ; ; Service (r8d) - Supplies a pointer to the command string. ; ; Return Value: ; ; None. ; ;-- LEAF_ENTRY DebugService2, _TEXT$00 mov eax, r8d ; set debug service type int 2dh ; call debug service int 3 ; required - do not remove ret ; return LEAF_END DebugService2, _TEXT$00 end
25.72
135
0.593624
05b3c18ce7f0c1cc7cb15b13c9274901bec691f2
3,451
asm
Assembly
Transynther/x86/_processed/NONE/_st_zr_un_/i7-8650U_0xd2.log_109_1440.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_st_zr_un_/i7-8650U_0xd2.log_109_1440.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_st_zr_un_/i7-8650U_0xd2.log_109_1440.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r13 push %r9 push %rax push %rbx push %rcx push %rdi push %rdx push %rsi lea addresses_A_ht+0x15e49, %rax nop xor $41326, %r13 movb (%rax), %dl nop inc %rdx lea addresses_D_ht+0xff49, %rbx cmp $42525, %r9 mov (%rbx), %si nop nop nop nop cmp %rbx, %rbx lea addresses_D_ht+0x18439, %rsi lea addresses_WC_ht+0x1425d, %rdi clflush (%rdi) nop nop nop mfence mov $3, %rcx rep movsw nop nop nop nop add %rax, %rax lea addresses_WT_ht+0xa975, %rsi lea addresses_WC_ht+0xfcc9, %rdi nop nop add $64626, %rax mov $110, %rcx rep movsb nop nop nop nop add $56813, %rdi lea addresses_normal_ht+0x16849, %rsi lea addresses_UC_ht+0xdf49, %rdi clflush (%rsi) nop cmp %rdx, %rdx mov $42, %rcx rep movsw sub $43909, %rax pop %rsi pop %rdx pop %rdi pop %rcx pop %rbx pop %rax pop %r9 pop %r13 ret .global s_faulty_load s_faulty_load: push %r10 push %r8 push %r9 push %rbp push %rdi push %rdx push %rsi // Store lea addresses_normal+0xf4a9, %rsi nop nop cmp $7137, %rdi mov $0x5152535455565758, %r10 movq %r10, %xmm4 vmovaps %ymm4, (%rsi) nop nop nop nop xor %r10, %r10 // Store lea addresses_D+0x7609, %r8 nop nop nop inc %r9 movw $0x5152, (%r8) nop nop nop and $37005, %rdx // Store lea addresses_WC+0x2f49, %rbp clflush (%rbp) inc %r10 mov $0x5152535455565758, %rdi movq %rdi, (%rbp) nop nop nop nop cmp %rbp, %rbp // Faulty Load lea addresses_UC+0xef49, %rdi nop nop cmp %r10, %r10 mov (%rdi), %r9w lea oracles, %r10 and $0xff, %r9 shlq $12, %r9 mov (%r10,%r9,1), %r9 pop %rsi pop %rdx pop %rdi pop %rbp pop %r9 pop %r8 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_UC', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal', 'size': 32, 'AVXalign': True, 'NT': True, 'congruent': 4, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 6, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WC', 'size': 8, 'AVXalign': True, 'NT': False, 'congruent': 11, 'same': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_UC', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} <gen_prepare_buffer> {'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 8, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 11, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 2, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 0, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 7, 'same': True}} {'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 8, 'same': True}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 10, 'same': False}} {'58': 74, '30': 1, '06': 5, '00': 4, '16': 1, '10': 1, '08': 1, '20': 1, '18': 2, '0e': 2, '26': 4, '38': 3, '0c': 2, '92': 1, '1e': 1, '14': 1, '0a': 1, '1a': 1, '28': 3} 58 58 58 30 58 58 58 58 58 58 58 58 06 58 58 00 16 58 10 58 58 58 08 58 58 20 58 00 06 58 58 18 58 58 0e 58 58 26 26 58 38 0c 58 58 58 0c 26 58 58 58 92 58 58 1e 06 58 58 58 58 58 58 58 58 58 58 58 00 06 58 58 58 58 58 14 58 0a 26 58 38 58 58 1a 58 58 58 58 06 28 38 58 58 18 58 58 58 28 58 58 58 58 58 00 28 58 58 58 58 0e 58 */
22.409091
326
0.635758
7139ef2ba0397d1fd360addbc47ef14309bd7a1a
7,519
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2.log_3759_218.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_3759_218.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_3759_218.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r11 push %r12 push %r15 push %r9 push %rbp push %rcx push %rdi push %rsi lea addresses_D_ht+0x14fd4, %r15 clflush (%r15) nop xor $39714, %r9 movw $0x6162, (%r15) nop nop cmp %rdi, %rdi lea addresses_normal_ht+0xafd4, %r12 nop nop nop and $45398, %r11 mov $0x6162636465666768, %rsi movq %rsi, %xmm2 movups %xmm2, (%r12) nop nop nop nop nop cmp %rbp, %rbp lea addresses_normal_ht+0x3cbc, %rsi lea addresses_normal_ht+0x12e54, %rdi nop nop nop nop nop sub %r9, %r9 mov $36, %rcx rep movsl nop nop nop nop add %r12, %r12 lea addresses_WC_ht+0x1dbd4, %rsi lea addresses_normal_ht+0xd9d4, %rdi clflush (%rsi) nop nop and $54408, %r11 mov $105, %rcx rep movsl nop nop nop nop lfence lea addresses_A_ht+0x4c17, %rsi lea addresses_WT_ht+0x551e, %rdi nop nop and %r11, %r11 mov $91, %rcx rep movsb nop nop nop nop nop dec %r15 lea addresses_D_ht+0x17d4, %rcx nop nop nop inc %rsi movb (%rcx), %r12b nop nop nop nop inc %r9 lea addresses_WT_ht+0x18654, %rdi nop nop nop nop and $52843, %r11 movb $0x61, (%rdi) nop nop and $6752, %r9 lea addresses_A_ht+0x1e7d4, %rcx nop nop nop nop nop xor $55675, %r12 mov $0x6162636465666768, %rsi movq %rsi, (%rcx) nop xor $62933, %r12 pop %rsi pop %rdi pop %rcx pop %rbp pop %r9 pop %r15 pop %r12 pop %r11 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r14 push %r9 push %rdi push %rdx push %rsi // Load lea addresses_WT+0x1d3d4, %r9 inc %rsi mov (%r9), %r14d nop nop nop nop nop and %rsi, %rsi // Store mov $0xd5ec20000000a80, %r14 clflush (%r14) nop nop nop nop nop and $45310, %rdx mov $0x5152535455565758, %r11 movq %r11, %xmm5 vmovaps %ymm5, (%r14) nop nop nop nop nop add $43801, %r14 // Store lea addresses_normal+0xb024, %rdx nop add $28700, %rsi movw $0x5152, (%rdx) add %rdi, %rdi // Load lea addresses_PSE+0x6e83, %rdx xor $34321, %r10 movntdqa (%rdx), %xmm6 vpextrq $0, %xmm6, %rsi nop nop nop nop nop sub $7893, %rdi // Load lea addresses_PSE+0x4b94, %r10 nop cmp $9223, %rdi mov (%r10), %r11 nop nop nop nop sub %rsi, %rsi // Store lea addresses_UC+0x163cc, %rsi and $1636, %rdx movb $0x51, (%rsi) nop nop nop and %r11, %r11 // Faulty Load lea addresses_RW+0xa7d4, %r14 nop nop add $60350, %rdi mov (%r14), %r11d lea oracles, %rdi and $0xff, %r11 shlq $12, %r11 mov (%rdi,%r11,1), %r11 pop %rsi pop %rdx pop %rdi pop %r9 pop %r14 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_RW', 'size': 4, 'AVXalign': True, 'NT': False, 'congruent': 0, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WT', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 9, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_NC', 'size': 32, 'AVXalign': True, 'NT': False, 'congruent': 2, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 4, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_PSE', 'size': 16, 'AVXalign': False, 'NT': True, 'congruent': 0, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_PSE', 'size': 8, 'AVXalign': False, 'NT': True, 'congruent': 6, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC', 'size': 1, 'AVXalign': False, 'NT': True, 'congruent': 3, 'same': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_RW', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 11, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 11, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 6, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 9, 'same': True}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 9, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 1, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 11, 'same': True}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 6, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 11, 'same': False}} {'32': 3759} 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 */
31.592437
2,999
0.655273
db6740698f562ed3c3592bc5e3e6dc280e8a35bd
5,553
asm
Assembly
Transynther/x86/_processed/US/_ht_st_zr_un_/i7-7700_9_0xca.log_21829_1403.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/US/_ht_st_zr_un_/i7-7700_9_0xca.log_21829_1403.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/US/_ht_st_zr_un_/i7-7700_9_0xca.log_21829_1403.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 %r13 push %r15 push %r8 push %rbx push %rcx push %rdi push %rsi lea addresses_WC_ht+0xd70f, %rsi lea addresses_UC_ht+0x103bf, %rdi nop nop nop sub %r13, %r13 mov $6, %rcx rep movsl nop nop nop and %r10, %r10 lea addresses_D_ht+0x93bf, %rbx nop nop nop and $24889, %r8 mov (%rbx), %cx nop cmp %rdi, %rdi lea addresses_WT_ht+0x7597, %rsi lea addresses_normal_ht+0x19bbf, %rdi nop nop nop nop and $48979, %r15 mov $123, %rcx rep movsq nop nop nop nop cmp $59082, %rbx pop %rsi pop %rdi pop %rcx pop %rbx pop %r8 pop %r15 pop %r13 pop %r10 ret .global s_faulty_load s_faulty_load: push %r13 push %r15 push %r9 push %rcx push %rdi push %rdx push %rsi // Store lea addresses_WC+0xd6a9, %rsi nop nop nop nop nop sub $38983, %r15 movb $0x51, (%rsi) nop dec %r13 // Store lea addresses_normal+0x528f, %rdx nop nop nop dec %r15 mov $0x5152535455565758, %r13 movq %r13, %xmm6 movups %xmm6, (%rdx) nop add $7442, %rdi // Store lea addresses_A+0x15896, %rdi nop nop nop nop cmp $5853, %r9 mov $0x5152535455565758, %r15 movq %r15, %xmm5 vmovups %ymm5, (%rdi) nop nop nop nop xor %rdx, %rdx // Faulty Load lea addresses_US+0x43bf, %rcx nop xor %rdx, %rdx mov (%rcx), %r13w lea oracles, %rsi and $0xff, %r13 shlq $12, %r13 mov (%rsi,%r13,1), %r13 pop %rsi pop %rdx pop %rdi pop %rcx pop %r9 pop %r15 pop %r13 ret /* <gen_faulty_load> [REF] {'src': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_US'}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'congruent': 1, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_WC'}} {'OP': 'STOR', 'dst': {'congruent': 3, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_normal'}} {'OP': 'STOR', 'dst': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_A'}} [Faulty Load] {'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 2, 'NT': False, 'type': 'addresses_US'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'congruent': 4, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'dst': {'congruent': 10, 'same': False, 'type': 'addresses_UC_ht'}} {'src': {'congruent': 11, 'AVXalign': True, 'same': False, 'size': 2, 'NT': True, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 3, 'same': True, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'dst': {'congruent': 11, 'same': False, 'type': 'addresses_normal_ht'}} {'46': 1, '48': 1681, '47': 5714, '00': 5622, 'ff': 7062, '53': 1371, '49': 378} ff ff 00 00 49 47 ff 53 47 ff 00 00 00 00 ff 53 47 47 47 47 47 47 00 00 00 49 47 47 47 47 47 47 47 47 47 47 47 47 47 47 47 47 47 47 47 47 47 47 47 47 47 47 47 47 47 47 47 ff ff ff ff ff 00 ff 00 ff ff ff ff ff ff ff 00 00 ff ff 00 ff 00 00 ff ff 48 00 00 53 47 53 47 47 53 47 47 47 47 00 48 53 47 47 47 47 47 47 47 00 ff ff 00 53 ff 48 00 00 48 ff ff ff 48 ff ff 00 00 ff ff ff ff 00 ff 53 47 47 47 47 47 47 47 48 53 47 47 00 ff ff 53 ff 53 47 00 ff ff 00 00 48 ff ff ff 00 48 ff ff 00 ff 00 ff 00 ff 00 ff 00 ff 00 ff 00 00 ff ff ff 00 00 ff ff 00 00 ff 48 ff ff 00 ff ff 00 47 47 47 ff 48 00 00 00 48 ff 47 47 47 47 47 47 47 47 ff 00 00 00 ff ff ff ff ff 48 48 00 00 ff 48 ff ff ff 48 ff 00 00 ff ff 00 ff ff 00 ff 00 ff 00 53 47 47 47 47 47 47 47 49 47 53 00 ff 53 47 47 47 48 ff ff ff ff 00 48 53 47 47 47 47 47 47 47 47 53 47 00 00 48 ff ff 48 48 ff ff ff 49 47 47 47 48 ff 00 ff 00 48 00 00 48 ff ff ff 00 ff ff 00 ff 00 00 00 00 00 48 00 ff 00 53 00 00 00 00 ff ff ff ff ff ff 00 ff 00 00 ff 48 ff ff 00 ff ff 48 ff 00 ff 00 53 47 47 47 47 47 47 47 47 47 00 ff 00 00 00 ff 00 00 ff 00 00 ff 00 ff ff ff 00 00 00 53 47 47 47 ff 00 ff ff 00 ff 00 ff 53 47 47 47 47 47 47 47 47 47 47 47 47 47 ff ff ff 53 00 ff 49 ff ff 00 47 ff ff 00 00 00 00 ff 53 47 ff 00 ff 00 ff 00 48 00 00 00 ff ff ff 00 ff ff 00 00 ff ff 00 00 ff ff 00 ff ff 00 00 ff 48 47 47 47 47 47 47 47 47 47 47 47 47 47 47 ff 00 ff 00 ff 00 00 00 48 00 00 ff ff 48 00 00 ff 00 53 00 00 ff ff 00 00 48 ff 48 ff 00 ff ff 00 ff ff ff 00 ff 53 ff ff ff 00 47 47 ff ff 48 ff ff 00 ff 00 ff ff ff 00 00 ff 00 ff ff 00 00 ff 48 00 00 ff ff ff 48 00 ff 00 00 ff 48 ff ff ff ff ff ff ff ff 00 00 ff 47 47 47 47 ff ff ff 48 48 ff ff 00 ff ff 00 00 00 48 00 ff ff ff 00 53 47 47 00 ff 48 ff 00 ff ff 48 53 ff ff ff 00 00 ff ff 49 47 47 48 ff ff 00 ff ff 00 53 47 47 47 47 47 47 47 47 47 47 47 47 53 47 47 47 00 ff 48 53 ff 53 47 47 ff 00 00 ff 00 49 47 48 00 53 47 47 47 47 47 47 00 49 47 47 47 47 47 47 ff 48 49 00 48 00 00 ff ff 49 47 00 00 53 47 00 ff 53 47 47 ff 00 ff ff 53 47 47 ff 48 49 00 00 ff 00 00 ff ff ff ff ff ff ff 48 00 00 ff ff ff 00 00 00 53 47 ff 48 53 47 47 47 47 47 47 47 47 ff ff ff 53 47 47 47 00 47 47 00 48 ff ff ff ff ff 53 47 47 47 47 00 ff ff 00 00 ff ff 00 48 ff 00 53 47 ff 00 48 48 ff 00 ff ff ff 48 00 00 48 ff 48 00 48 ff 48 00 00 47 53 47 47 47 47 47 53 47 00 ff 53 00 00 ff ff 00 00 ff 00 53 47 47 00 ff 00 ff 48 ff 48 00 53 47 47 47 ff 00 00 ff ff 00 ff ff 00 00 00 ff 00 00 48 00 00 ff 00 ff ff 00 ff 00 00 00 48 00 ff 00 ff 00 ff 48 ff 49 47 47 47 47 47 00 ff ff ff 00 ff ff 53 47 47 47 47 47 47 ff 00 ff 49 47 47 47 49 47 47 47 47 47 00 00 ff ff 00 00 ff 00 ff 00 ff ff ff 00 00 47 47 ff 53 47 47 47 ff 00 00 ff ff 00 00 00 48 ff 48 48 ff 00 ff 48 00 00 49 47 47 47 47 47 47 47 47 47 47 47 47 47 47 47 47 47 47 00 48 00 00 ff 48 ff 48 ff 00 00 00 53 ff 48 00 ff 00 ff 00 ff ff ff 00 ff ff 49 00 ff 00 48 49 47 47 47 47 ff 53 47 47 47 47 53 48 ff 48 00 ff 00 ff ff ff ff ff ff 48 00 47 47 47 ff 00 53 48 */
39.94964
2,999
0.657482
e5dfe3f8f1eb6ba527164af680af9caf776a28f8
6,236
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_21829_458.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_21829_458.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_21829_458.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r11 push %r13 push %r8 push %rax push %rcx push %rdi push %rdx push %rsi lea addresses_D_ht+0x1314f, %rcx nop nop nop nop cmp $19301, %r11 movb $0x61, (%rcx) nop nop nop inc %rdi lea addresses_UC_ht+0xca51, %r11 nop nop nop nop nop xor $12290, %rax vmovups (%r11), %ymm0 vextracti128 $0, %ymm0, %xmm0 vpextrq $1, %xmm0, %rdx nop nop nop nop sub %rdx, %rdx lea addresses_UC_ht+0x1666f, %rsi lea addresses_D_ht+0x1dc4f, %rdi nop nop nop nop nop cmp $48202, %r13 mov $51, %rcx rep movsb nop inc %r13 lea addresses_UC_ht+0x1e64f, %rax sub $739, %r8 movups (%rax), %xmm1 vpextrq $0, %xmm1, %rcx xor %r13, %r13 lea addresses_UC_ht+0x1812d, %rsi lea addresses_UC_ht+0x14f4f, %rdi nop nop nop nop xor $1116, %rdx mov $26, %rcx rep movsw nop nop nop nop dec %r8 lea addresses_UC_ht+0x153c9, %rcx cmp %rsi, %rsi mov $0x6162636465666768, %rdi movq %rdi, (%rcx) inc %rcx lea addresses_A_ht+0xd54f, %rsi nop xor %rdx, %rdx movb (%rsi), %cl nop nop nop nop nop xor %rsi, %rsi pop %rsi pop %rdx pop %rdi pop %rcx pop %rax pop %r8 pop %r13 pop %r11 ret .global s_faulty_load s_faulty_load: push %r12 push %r15 push %r8 push %rbp push %rdi push %rdx push %rsi // Store lea addresses_WT+0xbd23, %rsi nop nop xor $34915, %rdx mov $0x5152535455565758, %rbp movq %rbp, (%rsi) nop dec %rdx // Store lea addresses_UC+0x15f4f, %rdi nop nop add $50776, %r12 mov $0x5152535455565758, %r15 movq %r15, (%rdi) nop nop nop add %rsi, %rsi // Faulty Load lea addresses_WT+0x1c24f, %r12 nop and $28369, %rdx vmovups (%r12), %ymm2 vextracti128 $0, %ymm2, %xmm2 vpextrq $0, %xmm2, %rbp lea oracles, %r12 and $0xff, %rbp shlq $12, %rbp mov (%r12,%rbp,1), %rbp pop %rsi pop %rdx pop %rdi pop %rbp pop %r8 pop %r15 pop %r12 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_WT', 'same': True, 'size': 2, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_WT', 'same': False, 'size': 8, 'congruent': 2, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_UC', 'same': False, 'size': 8, 'congruent': 4, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} [Faulty Load] {'src': {'type': 'addresses_WT', 'same': True, 'size': 32, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'dst': {'type': 'addresses_D_ht', 'same': False, 'size': 1, 'congruent': 5, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_UC_ht', 'same': True, 'size': 32, 'congruent': 1, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_UC_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 3, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_UC_ht', 'same': False, 'size': 16, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_UC_ht', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 8, 'same': False}, 'OP': 'REPM'} {'dst': {'type': 'addresses_UC_ht', 'same': False, 'size': 8, 'congruent': 1, 'NT': False, 'AVXalign': True}, 'OP': 'STOR'} {'src': {'type': 'addresses_A_ht', 'same': False, 'size': 1, 'congruent': 8, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'39': 21829} 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 */
38.02439
2,999
0.657473
79db56b2d53ba254f3c2aead9b1f6edd6475e964
1,299
asm
Assembly
lab_05/src/matrix.asm
migregal/bmstu_iu7_asm
f33e37b38af3e801dd4c4e9d5171272f6293c417
[ "MIT" ]
2
2021-04-09T14:34:37.000Z
2021-05-24T20:03:30.000Z
lab_05/src/matrix.asm
migregal/bmstu_iu7_asm
f33e37b38af3e801dd4c4e9d5171272f6293c417
[ "MIT" ]
null
null
null
lab_05/src/matrix.asm
migregal/bmstu_iu7_asm
f33e37b38af3e801dd4c4e9d5171272f6293c417
[ "MIT" ]
null
null
null
.186 EXTRN M: byte EXTRN MAX_M: byte EXTRN N: byte EXTRN MAX_N: byte EXTRN R: byte EXTRN MATRIX: byte SC3 SEGMENT PARA PUBLIC 'CODE' assume CS:SC3 get_max_row proc far pusha mov AX, SEG N mov ES, AX xor AX, AX xor BX, BX xor CH, CH max: cmp CH, ES:N je max_end mov DX, AX mov AX, BX mul ES:MAX_M mov SI, AX mov AX, DX xor DX, DX xor CL, CL row_sum: cmp CL, ES:M je row_sum_end add DL, ES:Matrix[SI] inc CL inc SI jmp row_sum row_sum_end: cmp AL, DL jge continue mov AL, DL mov AH, CH continue: inc BX inc CH jmp max max_end: inc AH mov ES:R, AH popa ret get_max_row endp delete_row proc far pusha mov AX, SEG R mov ES, AX xor AX, AX mov AL, ES:R cmp AL, ES:N je move_exit dec AL mul ES:MAX_M mov DI, AX xor CX, CX xor DX, DX copy_row: mov SI, DI mov CL, ES:N sub CL, ES:R copy_symbol: xor BX, BX mov BL, ES:MAX_M mov AL, ES:Matrix[SI][BX] mov ES:Matrix[SI], AL add SI, BX loop copy_symbol inc DI inc DL cmp DL, ES:M jne copy_row move_exit: dec ES:N popa ret delete_row endp SC3 ENDS PUBLIC get_max_row PUBLIC delete_row END
11.102564
30
0.574288
7b518ab94b71b694b5d52ad1dbd4d6cbe592a4f7
495
asm
Assembly
ex2.asm
robjpar/nasm-sasm
20e64c2fbc70b5c5dffdac67ab591bf5f3fc9279
[ "MIT" ]
null
null
null
ex2.asm
robjpar/nasm-sasm
20e64c2fbc70b5c5dffdac67ab591bf5f3fc9279
[ "MIT" ]
null
null
null
ex2.asm
robjpar/nasm-sasm
20e64c2fbc70b5c5dffdac67ab591bf5f3fc9279
[ "MIT" ]
null
null
null
; nasm -f elf32 ex2.asm -o ex2.o ; gcc -m32 ex2.o -o ex2.out ; ./ex2.out ; echo $? global main section .data msg db "Hello, word!", 0x0a; "Hello, word!\n" len equ $ - msg ; 13 section .text main: mov ebp, esp; for correct debugging mov eax, 4 ; write call mov ebx, 1 ; stdout mov ecx, msg; ['H'] mov edx, len; 13 bytes int 0x80 ; system call mov eax, 1 ; exit call mov ebx, 0 ; exit status int 0x80 ; system call
19.8
49
0.549495
69c587d2f243294abbc197cebd80f2689ce6c36b
8,720
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2_notsx.log_6251_1175.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_notsx.log_6251_1175.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_notsx.log_6251_1175.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 %r14 push %r15 push %r9 push %rbp push %rcx push %rdi push %rdx push %rsi lea addresses_WT_ht+0xfed, %r15 nop nop nop xor %r14, %r14 and $0xffffffffffffffc0, %r15 movaps (%r15), %xmm7 vpextrq $0, %xmm7, %r9 nop nop nop dec %r11 lea addresses_WC_ht+0xd285, %r10 nop nop nop and %rdx, %rdx mov (%r10), %rbp sub $27294, %rbp lea addresses_UC_ht+0xec61, %rbp nop nop inc %r9 mov (%rbp), %r10w nop nop nop nop inc %r14 lea addresses_A_ht+0xd861, %r14 nop add %rdx, %rdx movb $0x61, (%r14) nop nop add %r10, %r10 lea addresses_WC_ht+0x162e1, %r14 nop nop nop nop cmp %rdx, %rdx mov (%r14), %r9w nop nop nop nop nop inc %r14 lea addresses_A_ht+0x15b61, %rsi lea addresses_UC_ht+0x6021, %rdi nop nop nop nop inc %r9 mov $23, %rcx rep movsw nop nop nop nop sub %r15, %r15 lea addresses_WC_ht+0x615, %rsi lea addresses_WT_ht+0xbf61, %rdi nop nop nop nop nop inc %r10 mov $64, %rcx rep movsb nop nop nop add $5560, %r11 lea addresses_D_ht+0x9861, %rsi lea addresses_WT_ht+0x1cc61, %rdi clflush (%rsi) nop nop add %rbp, %rbp mov $97, %rcx rep movsw nop nop nop xor %r15, %r15 lea addresses_UC_ht+0x17861, %r10 clflush (%r10) nop nop nop nop sub %r11, %r11 mov $0x6162636465666768, %rdx movq %rdx, (%r10) nop nop and $54019, %r15 lea addresses_A_ht+0x1d409, %rsi nop nop nop dec %rdi movl $0x61626364, (%rsi) nop nop nop nop sub %rsi, %rsi lea addresses_UC_ht+0x1a461, %rdx nop and $33189, %r15 mov $0x6162636465666768, %rsi movq %rsi, %xmm1 vmovups %ymm1, (%rdx) nop nop nop nop nop add %rdi, %rdi lea addresses_D_ht+0x1e161, %rdx inc %rdi mov $0x6162636465666768, %r10 movq %r10, %xmm1 vmovups %ymm1, (%rdx) nop nop nop nop nop dec %r15 lea addresses_UC_ht+0x1898b, %rcx nop nop nop nop xor %r15, %r15 mov $0x6162636465666768, %rbp movq %rbp, %xmm3 movups %xmm3, (%rcx) nop nop nop and %rcx, %rcx lea addresses_A_ht+0x1649d, %rsi lea addresses_A_ht+0x1c549, %rdi nop nop nop add $53724, %r14 mov $122, %rcx rep movsw nop nop nop nop add %rsi, %rsi pop %rsi pop %rdx pop %rdi pop %rcx pop %rbp pop %r9 pop %r15 pop %r14 pop %r11 pop %r10 ret .global s_faulty_load s_faulty_load: push %r11 push %r14 push %rax push %rbp push %rcx push %rdi push %rdx push %rsi // Store lea addresses_normal+0xd461, %rax nop nop nop xor $26183, %r11 mov $0x5152535455565758, %rbp movq %rbp, (%rax) nop nop nop nop xor $30100, %rdi // Store lea addresses_normal+0x10261, %rax clflush (%rax) and %r14, %r14 movb $0x51, (%rax) add $2627, %rdx // Store lea addresses_A+0x11e61, %rax and $12428, %rdx movl $0x51525354, (%rax) nop nop add $19792, %r14 // REPMOV mov $0x261, %rsi lea addresses_WC+0x1dc61, %rdi nop nop nop nop nop cmp %rax, %rax mov $121, %rcx rep movsb nop nop nop nop nop inc %r14 // Faulty Load lea addresses_normal+0xd461, %rbp nop add %r14, %r14 vmovups (%rbp), %ymm7 vextracti128 $0, %ymm7, %xmm7 vpextrq $1, %xmm7, %rsi lea oracles, %r14 and $0xff, %rsi shlq $12, %rsi mov (%r14,%rsi,1), %rsi pop %rsi pop %rdx pop %rdi pop %rcx pop %rbp pop %rax pop %r14 pop %r11 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_normal', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal', 'size': 1, 'AVXalign': True, 'NT': False, 'congruent': 9, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_A', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 8, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_P', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_WC', 'congruent': 11, 'same': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_normal', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} <gen_prepare_buffer> {'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'size': 16, 'AVXalign': True, 'NT': True, 'congruent': 2, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 1, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 6, 'same': True}} {'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'size': 2, 'AVXalign': False, 'NT': True, 'congruent': 6, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 4, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 2, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 8, 'same': True}} {'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 11, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 9, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 1, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 6, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 0, 'same': False}} {'34': 6251} 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 */
29.761092
2,999
0.656422
b7d71b17d9d9e9f0b1740a5e5d4f6ac1d3b8d357
539
asm
Assembly
libsrc/newbrain/nb_close.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
libsrc/newbrain/nb_close.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
libsrc/newbrain/nb_close.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
; ; Grundy Newbrain Specific libraries ; ; Stefano Bodrato - 19/05/2007 ; ; ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; ; closes a stream ; ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; ; void nb_close( int stream ); ; ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; ; ; $Id: nb_close.asm,v 1.2 2015/01/19 01:33:00 pauloscustodio Exp $ ; PUBLIC nb_close EXTERN ZCALL .nb_close ; __FASTCALL__ mode, stream number is stored in HL ld e,l call ZCALL defb $34 ; ZCLOSE ret
16.84375
66
0.435993
f1fd4c429a994ab22d2272d96ca431c3e08da4d8
326
asm
Assembly
programs/oeis/081/A081854.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/081/A081854.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/081/A081854.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A081854: (8*n-3)*(4*n-1)*(8*n^2-5*n+1). ; 3,60,2093,13398,47415,123728,268065,512298,894443,1458660,2255253,3340670,4777503,6634488,8986505,11914578,15505875,19853708,25057533,31222950,38461703,46891680,56636913,67827578,80599995,95096628,111466085,129863118,150448623 mul $0,8 sub $0,2 bin $0,2 add $0,1 bin $0,2 div $0,2
32.6
228
0.757669
681dc6adc005e88a9c4301c88d96df36c04a9a76
1,549
asm
Assembly
engine/events/move_tutor.asm
genterz/pokecross
5e62ab6c23e624ea82d599af306f9c52d768a8b4
[ "blessing" ]
28
2019-11-08T07:19:00.000Z
2021-12-20T10:17:54.000Z
engine/events/move_tutor.asm
genterz/pokecross
5e62ab6c23e624ea82d599af306f9c52d768a8b4
[ "blessing" ]
13
2020-01-11T17:00:40.000Z
2021-09-14T01:27:38.000Z
engine/events/move_tutor.asm
genterz/pokecross
5e62ab6c23e624ea82d599af306f9c52d768a8b4
[ "blessing" ]
22
2020-05-28T17:31:38.000Z
2022-03-07T20:49:35.000Z
MoveTutor: call FadeToMenu call ClearBGPalettes call ClearScreen call DelayFrame ld b, SCGB_PACKPALS call GetSGBLayout xor a ld [wItemAttributeParamBuffer], a call .GetMoveTutorMove ld [wNamedObjectIndexBuffer], a ld [wPutativeTMHMMove], a call GetMoveName call CopyName1 farcall ChooseMonToLearnTMHM jr c, .cancel jr .enter_loop .loop farcall ChooseMonToLearnTMHM_NoRefresh jr c, .cancel .enter_loop call CheckCanLearnMoveTutorMove jr nc, .loop xor a ; FALSE ld [wScriptVar], a jr .quit .cancel ld a, -1 ld [wScriptVar], a .quit call CloseSubmenu ret .GetMoveTutorMove: ld a, [wScriptVar] cp MOVETUTOR_FLAMETHROWER jr z, .flamethrower cp MOVETUTOR_THUNDERBOLT jr z, .thunderbolt ; MOVETUTOR_ICE_BEAM ld a, ICE_BEAM ret .flamethrower ld a, FLAMETHROWER ret .thunderbolt ld a, THUNDERBOLT ret CheckCanLearnMoveTutorMove: ld hl, .MenuHeader call LoadMenuHeader predef CanLearnTMHMMove push bc ld a, [wCurPartyMon] ld hl, wPartyMonNicknames call GetNick pop bc ld a, c and a jr nz, .can_learn push de ld de, SFX_WRONG call PlaySFX pop de ld a, BANK(Text_TMHMNotCompatible) ld hl, Text_TMHMNotCompatible call FarPrintText jr .didnt_learn .can_learn callfar KnowsMove jr c, .didnt_learn predef LearnMove ld a, b and a jr z, .didnt_learn ld c, HAPPINESS_LEARNMOVE callfar ChangeHappiness jr .learned .didnt_learn call ExitMenu and a ret .learned call ExitMenu scf ret .MenuHeader: db MENU_BACKUP_TILES ; flags menu_coords 0, 12, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1
14.894231
55
0.763073
488e8a5845e960802e1588cfb4d318f3c7a4add8
23,454
asm
Assembly
concerto_gui/gui_utils.asm
biermanncarl/cx16-concerto
475c87b10cb011e0be2e3c84ecdd61a9aaf4356e
[ "BSD-2-Clause" ]
4
2021-11-08T14:14:02.000Z
2022-02-25T02:29:42.000Z
concerto_gui/gui_utils.asm
biermanncarl/cx16-concerto
475c87b10cb011e0be2e3c84ecdd61a9aaf4356e
[ "BSD-2-Clause" ]
1
2021-03-02T20:31:05.000Z
2021-03-15T09:56:24.000Z
concerto_gui/gui_utils.asm
biermanncarl/cx16-concerto
475c87b10cb011e0be2e3c84ecdd61a9aaf4356e
[ "BSD-2-Clause" ]
1
2022-02-25T01:56:31.000Z
2022-02-25T01:56:31.000Z
; Copyright 2021 Carl Georg Biermann ; Many utility functions for the GUI are found in this file. ; From more basic stuff like setting the VERA "screen cursor" to a specific location ; to displaying more complex stuff like frames, edits, checkboxes etc. ; These routines are designed to be called from within the main program. ; The VERA is used from within the ISR and from within the main program. ; To avoid any disturbances of VERA writes by the ISR (which uses the VERA, too), ; great care has to be taken to always put an SEI before any VERA actions. .scope guiutils ; variables used by the DISPLAY_BYTE macro display_100s: .byte 0 display_10s: .byte 0 display_1s: .byte 0 .macro SET_VERA_XY svx, svy stz VERA_ctrl lda #$10 sta VERA_addr_high lda svy sta VERA_addr_mid lda svx asl sta VERA_addr_low .endmacro ; displays the byte db_data at position db_x and db_y ; used only for debugging. .macro DISPLAY_BYTE db_data, db_x, db_y .local @loop100s .local @loop10s .local @loop1s ; convert binary into decimal lda db_data ldx #48 @loop100s: inx sec sbc #100 bcs @loop100s adc #100 dex cpx #48 bne :+ ldx #32 : stx concerto_gui::guiutils::display_100s ldx #48 @loop10s: inx sec sbc #10 bcs @loop10s adc #10 dex cpx #48 bne :+ ldx #32 : stx concerto_gui::guiutils::display_10s ldx #48 @loop1s: inx sec sbc #1 bcs @loop1s adc #1 dex stx concerto_gui::guiutils::display_1s sei ; set VERA address stz VERA_ctrl lda #$10 sta VERA_addr_high lda #db_y sta VERA_addr_mid lda #db_x clc asl sta VERA_addr_low ; do output lda concerto_gui::guiutils::display_100s sta VERA_data0 lda #$21 sta VERA_data0 lda concerto_gui::guiutils::display_10s sta VERA_data0 lda #$21 sta VERA_data0 lda concerto_gui::guiutils::display_1s sta VERA_data0 lda #$21 ; set color sta VERA_data0 cli .endmacro ; displays the 0-terminated message at position db_x and db_y ; not used for the actual GUI, but rather for debugging etc. .macro DISPLAY_LABEL msg_start, dm_x, dm_y .local @loop_msg .local @done_msg sei ; set VERA address stz VERA_ctrl lda #$10 sta VERA_addr_high lda #dm_y sta VERA_addr_mid lda #dm_x clc asl sta VERA_addr_low ; print message lda #<msg_start sta mzpwa lda #>msg_start sta mzpwa+1 ldy #0 @loop_msg: lda (mzpwa),y beq @done_msg sta VERA_data0 lda #CCOLOR_CAPTION ; set color sta VERA_data0 iny bra @loop_msg @done_msg: cli .endmacro ; outputs the state of the FM voice map. used only for debugging .macro DEBUG_FM_MAP DISPLAY_BYTE concerto_synth::voices::FMmap::freevoicelist, 1,55 DISPLAY_BYTE concerto_synth::voices::FMmap::freevoicelist+1, 5,55 DISPLAY_BYTE concerto_synth::voices::FMmap::freevoicelist+2, 9,55 DISPLAY_BYTE concerto_synth::voices::FMmap::freevoicelist+3, 13,55 DISPLAY_BYTE concerto_synth::voices::FMmap::freevoicelist+4, 17,55 DISPLAY_BYTE concerto_synth::voices::FMmap::freevoicelist+5, 21,55 DISPLAY_BYTE concerto_synth::voices::FMmap::freevoicelist+6, 25,55 DISPLAY_BYTE concerto_synth::voices::FMmap::freevoicelist+7, 29,55 DISPLAY_BYTE concerto_synth::voices::FMmap::timbremap, 1,57 DISPLAY_BYTE concerto_synth::voices::FMmap::timbremap+1, 5,57 DISPLAY_BYTE concerto_synth::voices::FMmap::timbremap+2, 9,57 DISPLAY_BYTE concerto_synth::voices::FMmap::timbremap+3, 13,57 DISPLAY_BYTE concerto_synth::voices::FMmap::timbremap+4, 17,57 DISPLAY_BYTE concerto_synth::voices::FMmap::timbremap+5, 21,57 DISPLAY_BYTE concerto_synth::voices::FMmap::timbremap+6, 25,57 DISPLAY_BYTE concerto_synth::voices::FMmap::timbremap+7, 29,57 ; ffv, lfv DISPLAY_BYTE concerto_synth::voices::FMmap::ffv, 40,55 DISPLAY_BYTE concerto_synth::voices::FMmap::lfv, 44,55 .endmacro ; UTILITY ROUTINES ; ---------------- ; drawing parameters ; "cursor" position cur_x: .byte 0 cur_y: .byte 0 ; color color: .byte 0 ; string pointer str_pointer = mzpwe ; draw a component at position and with dimensions: draw_x: .byte 0 draw_y: .byte 0 ; NOTE: draw_x/draw_y are kept separate from cur_x/cur_y, because of the drawing of more complex objects like the frame around a panel. ; However, this is the only place where it is necessary ATM, so it might be possible to get rid of either of them and find a different solution for draw_frame. draw_width: .byte 0 draw_height: .byte 0 ; additional drawing parameters draw_data1: .byte 0 ; e.g. number of tabs draw_data2: .byte 0 ; e.g. index of active tab ; set cursor set_cursor: SET_VERA_XY cur_x, cur_y rts ; move the cursor one line down from the current cur_x, cur_y move_cursor_down: inc cur_y jsr set_cursor rts ; move the cursor two lines down from the current cur_x, cur_y move_cursor_down2: inc cur_y inc cur_y jsr set_cursor rts ; displays the 0-terminated message at position cur_x|cur_y ; message pointer is in str_pointer ; color as in variable color print: sei ; set VERA address jsr set_cursor ; print message ldx color ldy #0 @loop_msg: lda (str_pointer),y beq @done_msg sta VERA_data0 stx VERA_data0 iny bra @loop_msg @done_msg: cli rts ; prints a byte on screen (position as in VERA's address 0) ; color as in register X ; number as in register A print_byte_simple: ; convert binary into decimal ldy #48 @loop100s: iny sec sbc #100 bcs @loop100s adc #100 dey cpy #48 bne :+ ldy #32 : sty display_100s ldy #48 @loop10s: iny sec sbc #10 bcs @loop10s adc #10 dey cpy #48 bne :+ ; digit is zero. now it depends on 100s digit, whether it's space or 0 ldy display_100s cpy #32 beq :+ ldy #48 : sty display_10s ldy #48 @loop1s: iny sec sbc #1 bcs @loop1s adc #1 dey sty display_1s ; do output lda display_100s sta VERA_data0 stx VERA_data0 lda display_10s sta VERA_data0 stx VERA_data0 lda display_1s sta VERA_data0 stx VERA_data0 rts ; clear screen in my own background color cls: ; set background color in a dirty manner (we did not hear that from Greg King) ; https://www.commanderx16.com/forum/index.php?/topic/469-change-background-color-using-vpoke/&do=findComment&comment=3084 lda #(11*16+1) sta $376 ; actually, I'd like a dark green or something ; TODO: set custom palette ; do the screen clear lda #$93 jsr CHROUT rts ; subroutine that draws a frame (around a panel) ; x, y position in draw_x and draw_y ; width and height in draw_width and draw_height ; data1 is number of tabs (0 if there are no tabs) ; data2 is index of active tab (0 to N-1) draw_frame: lda #(16*COLOR_BACKGROUND + COLOR_FRAME) sta color ; top of frame lda draw_x sta cur_x lda draw_y sta cur_y sei jsr set_cursor lda #85 sta VERA_data0 ldx color stx VERA_data0 ldy draw_width dey dey @loop_top: lda #64 sta VERA_data0 stx VERA_data0 dey bne @loop_top lda #73 sta VERA_data0 stx VERA_data0 cli ; bottom of frame lda cur_y clc adc draw_height dec sta cur_y ldy draw_width dey dey lda draw_data1 ; if 0 tabs, a simple frame is drawn beq :+ ; if 1 or more tabs are present, the bottom side is drawn differently lda cur_x clc adc #2 sta cur_x dey dey : sei jsr set_cursor lda #74 sta VERA_data0 stx VERA_data0 @loop_bottom: lda #64 sta VERA_data0 stx VERA_data0 dey bne @loop_bottom lda #75 sta VERA_data0 stx VERA_data0 cli ; right side of frame lda draw_x clc adc draw_width dec sta cur_x lda draw_y inc sta cur_y ldy draw_height dey dey sei @loop_right: jsr set_cursor lda #66 sta VERA_data0 stx VERA_data0 inc cur_y dey bne @loop_right cli ; left side of frame lda draw_x ldy draw_data1 beq :+ clc adc #2 : sta cur_x lda draw_y inc sta cur_y ldy draw_height dey dey sei @loop_left: jsr set_cursor lda #66 sta VERA_data0 stx VERA_data0 inc cur_y dey bne @loop_left cli ; check for tabs ldy draw_data1 beq :+ jsr draw_tabs : rts ; draw tabs ; x, y position in draw_x and draw_y ; independent routine for updating when another tab is selected ; data1 is number of tabs (0 if there are no tabs) ; data2 is index of active tab (0 to N-1) draw_tabs: ldx #(16*COLOR_BACKGROUND + COLOR_FRAME) stx color lda draw_x clc adc #2 sta cur_x lda draw_y sta cur_y sei jsr set_cursor lda #114 sta VERA_data0 lda color sta VERA_data0 ; draw tabs lda draw_x sta cur_x lda draw_y inc sta cur_y ldy #0 ldx color sei @loop_tabs: jsr set_cursor lda #66 sta VERA_data0 stx VERA_data0 tya clc adc #49 sta VERA_data0 lda #(COLOR_BACKGROUND*16+COLOR_TABS) sta VERA_data0 lda #66 sta VERA_data0 stx VERA_data0 inc cur_y jsr set_cursor lda #107 sta VERA_data0 stx VERA_data0 lda #64 sta VERA_data0 stx VERA_data0 lda #115 sta VERA_data0 stx VERA_data0 inc cur_y iny cpy draw_data1 bne @loop_tabs dec cur_y jsr set_cursor lda #74 sta VERA_data0 cli ; draw active tab lda draw_data2 dec asl clc adc draw_y sta cur_y lda draw_x sta cur_x ldx color sei jsr set_cursor lda #85 sta VERA_data0 stx VERA_data0 lda #64 sta VERA_data0 stx VERA_data0 lda #75 ldy draw_data2 cpy #1 bne :+ lda #64 : sta VERA_data0 stx VERA_data0 inc cur_y inc cur_y jsr set_cursor lda #74 sta VERA_data0 stx VERA_data0 lda #64 sta VERA_data0 stx VERA_data0 lda #73 sta VERA_data0 stx VERA_data0 dec cur_y inc cur_x inc cur_x jsr set_cursor lda #32 sta VERA_data0 cli rts ; draw a button ; x, y position in draw_x and draw_y ; label as address of 0-terminated string in str_pointer ; width in draw_width draw_button: lda draw_x sta cur_x lda draw_y sta cur_y ; top of button ldx #(1+16*COLOR_BACKGROUND) ldy draw_width sei jsr set_cursor lda #100 @loop_top: sta VERA_data0 stx VERA_data0 dey bne @loop_top ; label of button inc cur_y lda #CCOLOR_BUTTON sta color ldx draw_width inx ; this is required by print_with_padding ldy #0 jsr set_cursor jsr print_with_padding cli rts ; draw a number edit that has arrows ; x, y position in draw_x and draw_y ; data1: number on display draw_arrowed_edit: lda draw_x sta cur_x lda draw_y sta cur_y sei jsr set_cursor ldx #(16*COLOR_ARROWED_EDIT_BG + COLOR_ARROWED_EDIT_ARROWS) lda #60 ; 62 sta VERA_data0 stx VERA_data0 lda draw_data1 ldx #(16*COLOR_ARROWED_EDIT_BG + COLOR_ARROWED_EDIT_FG) jsr print_byte_simple lda #32 sta VERA_data0 stx VERA_data0 ldx #(16*COLOR_ARROWED_EDIT_BG + COLOR_ARROWED_EDIT_ARROWS) lda #62 sta VERA_data0 stx VERA_data0 cli rts ; draw a number edit for drag-edit ; x, y position in draw_x and draw_y ; data1: number on display ; data2: bit 0: coarse/fine available, bit1: coarse/fine switch, bit2: signed draw_drag_edit: dde_bittest = mzpbg ; mzpbg used! (use something else for bit-testing in this routine if this clashes with something else) lda draw_x sta cur_x lda draw_y sta cur_y ldx #(16*COLOR_ARROWED_EDIT_BG + COLOR_ARROWED_EDIT_FG) sei jsr set_cursor lda draw_data2 sta dde_bittest bbs2 dde_bittest, @signed @unsigned: bra @check_fine_coarse @signed: lda draw_data1 bmi @minus @plus: lda #43 sta VERA_data0 stx VERA_data0 bra @check_fine_coarse @minus: eor #%11111111 inc sta draw_data1 lda #45 sta VERA_data0 stx VERA_data0 @check_fine_coarse: bbr0 dde_bittest, @no_coarse_fine ; fine/coarse ? ; here we are doing fine/coarse bbs1 dde_bittest, @fine ; doing fine? @coarse: lda draw_data1 jsr print_byte_simple lda #46 sta VERA_data0 stx VERA_data0 cli rts @fine: lda #46 sta VERA_data0 stx VERA_data0 lda draw_data1 jsr print_byte_simple cli rts @no_coarse_fine: lda draw_data1 jsr print_byte_simple cli rts ; draws a checkbox ; x, y position in draw_x and draw_y ; checked in draw_data1 draw_checkbox: lda draw_x sta cur_x lda draw_y sta cur_y sei jsr set_cursor lda draw_data1 beq @notick @tick: lda #86 sta VERA_data0 lda #CCOLOR_CHECKBOX_TICK sta VERA_data0 bra @done @notick: lda #81 sta VERA_data0 lda #CCOLOR_CHECKBOX_CLEAR sta VERA_data0 @done: cli rts ; prints a string with padding up to specified width -- quite specific, it is used in listbox & button drawing ; assumes that the VERA address is already set accordingly ; (str_pointer), y is where printing continues, incrementing Y along the way ; color according to the variable color ; X: overall width plus 1 print_with_padding: @loop1: ; printing loop. assumes that the string length is less or equal than the listbox/button width minus 2 (really 2 or just 1?) lda (str_pointer), y beq @end_loop1 sta VERA_data0 lda color sta VERA_data0 dex iny bra @loop1 @end_loop1: ; do padding at the end of the listbox/button if necessary @loop2: dex beq @end_loop2 lda #32 sta VERA_data0 lda color sta VERA_data0 bra @loop2 @end_loop2: rts ; draws a listbox ; x, y position in draw_x and draw_y ; width in draw_width ; label pointer in str_pointer draw_listbox: lda draw_x sta cur_x lda draw_y sta cur_y sei jsr set_cursor lda #90 ; listbox "bullet" sta VERA_data0 ldx #(COLOR_LISTBOX_BG*16+COLOR_LISTBOX_ARROW) stx VERA_data0 lda #32 sta VERA_data0 stx VERA_data0 ldy #0 ; prepare width counter ldx draw_width dex ; (for extra characters on the left hand side of the listbox, but just one because of the way we determine the length of the padding) lda #(COLOR_LISTBOX_BG*16+COLOR_LISTBOX_FG) sta color jsr print_with_padding cli rts ; draws the listbox popup ; x, y position in draw_x and draw_y ; width in draw_width, height in draw_height (also marks number of strings) ; pointer to stringlist in str_pointer draw_lb_popup: dlbp_line_counter = mzpbg lda draw_x sta cur_x lda draw_y sta cur_y ldy #0 lda draw_height sta dlbp_line_counter lda #(16*COLOR_LISTBOX_POPUP_BG+COLOR_LISTBOX_POPUP_FG) sta color sei @line_loop: jsr set_cursor ldx draw_width inx jsr print_with_padding ; advance indices inc cur_y iny lda dlbp_line_counter dec sta dlbp_line_counter bne @line_loop cli rts ; clears the area on the screen where the listbox popup was before. ; x, y position in draw_x and draw_y ; width in draw_width, height in draw_height clear_lb_popup: lda draw_x sta cur_x lda draw_y sta cur_y ldy draw_height lda #(16*COLOR_BACKGROUND) sta color sei @line_loop: jsr set_cursor ldx draw_width @column_loop: lda #32 sta VERA_data0 lda color sta VERA_data0 dex bne @column_loop ; advance indices inc cur_y dey bne @line_loop cli rts ; draw FM algorithm ; Alg number in draw_data1 ; Position fixed by macros @alg_x, @alg_y draw_fm_alg: @alg_x = 70 @alg_y = 14 ; clear drawing area lda #@alg_x sta draw_x lda #@alg_y sta draw_y lda #5 sta draw_width lda #8 sta draw_height jsr clear_lb_popup lda #@alg_x sta cur_x lda #@alg_y sta cur_y ; do actual drawing sei jsr set_cursor ldx #CCOLOR_ALG_CONNECTION ; operator 1, always the same lda #112 sta VERA_data0 stx VERA_data0 lda #110 sta VERA_data0 stx VERA_data0 inc cur_y jsr set_cursor lda #109 sta VERA_data0 stx VERA_data0 lda #49 sta VERA_data0 ldx #CCOLOR_ALG_OP_NUMBERS stx VERA_data0 ; all algs require this inc cur_x ; now switch depending on alg lda draw_data1 asl tax INDEXED_JSR @jmp_table, @return @jmp_table: .word @con_0 .word @con_1 .word @con_2 .word @con_3 .word @con_4 .word @con_5 .word @con_6 .word @con_7 @con_0: ; finish off numbers ldx #CCOLOR_ALG_OP_NUMBERS jsr move_cursor_down2 lda #50 sta VERA_data0 stx VERA_data0 jsr move_cursor_down2 lda #51 sta VERA_data0 stx VERA_data0 jsr move_cursor_down2 lda #52 sta VERA_data0 stx VERA_data0 ; draw connections ldx #CCOLOR_ALG_CONNECTION lda #@alg_y+2 sta cur_y jsr set_cursor lda #66 sta VERA_data0 stx VERA_data0 jsr move_cursor_down2 lda #66 sta VERA_data0 stx VERA_data0 jsr move_cursor_down2 lda #66 sta VERA_data0 stx VERA_data0 rts @con_1: ; finish off numbers ldx #CCOLOR_ALG_OP_NUMBERS lda #50 sta VERA_data0 stx VERA_data0 jsr move_cursor_down2 lda #51 sta VERA_data0 stx VERA_data0 jsr move_cursor_down2 lda #52 sta VERA_data0 stx VERA_data0 ; draw connections ldx #CCOLOR_ALG_CONNECTION lda #@alg_y+2 sta cur_y jsr set_cursor lda #107 sta VERA_data0 stx VERA_data0 lda #125 sta VERA_data0 stx VERA_data0 jsr move_cursor_down2 lda #66 sta VERA_data0 stx VERA_data0 rts @con_2: ; finish off numbers ldx #CCOLOR_ALG_OP_NUMBERS lda #50 sta VERA_data0 stx VERA_data0 inc cur_x jsr move_cursor_down2 lda #51 sta VERA_data0 stx VERA_data0 dec cur_x jsr move_cursor_down lda #52 sta VERA_data0 stx VERA_data0 ; draw connections ldx #CCOLOR_ALG_CONNECTION lda #@alg_y+2 sta cur_y jsr set_cursor lda #66 sta VERA_data0 stx VERA_data0 sta VERA_data0 stx VERA_data0 jsr move_cursor_down lda #107 sta VERA_data0 stx VERA_data0 rts @con_3: ; finish off numbers ldx #CCOLOR_ALG_OP_NUMBERS lda #51 sta VERA_data0 stx VERA_data0 jsr move_cursor_down2 lda #50 sta VERA_data0 stx VERA_data0 inc cur_x jsr move_cursor_down lda #52 sta VERA_data0 stx VERA_data0 dec cur_x ; draw connections ldx #CCOLOR_ALG_CONNECTION lda #@alg_y+2 sta cur_y jsr set_cursor lda #66 sta VERA_data0 stx VERA_data0 sta VERA_data0 stx VERA_data0 inc cur_x jsr move_cursor_down lda #115 sta VERA_data0 stx VERA_data0 rts @con_4: ; finish off numbers ldx #CCOLOR_ALG_OP_NUMBERS lda #51 sta VERA_data0 stx VERA_data0 jsr move_cursor_down2 lda #50 sta VERA_data0 stx VERA_data0 lda #52 sta VERA_data0 stx VERA_data0 ; draw connections ldx #CCOLOR_ALG_CONNECTION lda #@alg_y+2 sta cur_y jsr set_cursor lda #66 sta VERA_data0 stx VERA_data0 sta VERA_data0 stx VERA_data0 rts @con_5: ; finish off numbers ldx #CCOLOR_ALG_OP_NUMBERS jsr move_cursor_down2 lda #50 sta VERA_data0 stx VERA_data0 lda #51 sta VERA_data0 stx VERA_data0 lda #52 sta VERA_data0 stx VERA_data0 ; draw connections ldx #CCOLOR_ALG_CONNECTION lda #@alg_y+2 sta cur_y jsr set_cursor lda #107 sta VERA_data0 stx VERA_data0 lda #114 sta VERA_data0 stx VERA_data0 lda #110 sta VERA_data0 stx VERA_data0 rts @con_6: ; finish off numbers ldx #CCOLOR_ALG_OP_NUMBERS jsr move_cursor_down2 lda #51 sta VERA_data0 stx VERA_data0 lda #50 sta VERA_data0 stx VERA_data0 lda #52 sta VERA_data0 stx VERA_data0 ; draw connections ldx #CCOLOR_ALG_CONNECTION lda #@alg_y+2 sta cur_y jsr set_cursor lda #66 sta VERA_data0 stx VERA_data0 rts @con_7: ; finish off numbers ldx #CCOLOR_ALG_OP_NUMBERS lda #51 sta VERA_data0 stx VERA_data0 lda #50 sta VERA_data0 stx VERA_data0 lda #52 sta VERA_data0 stx VERA_data0 rts @return: cli rts ; moves to screen position (.A|.X) (does not preserve .A) alternative_gotoxy: stz VERA_ctrl asl sta VERA_addr_low lda #$10 sta VERA_addr_high stx VERA_addr_mid rts ; This function has been adapted from the awesome VTUI library by JimmyDansbo. ; https://github.com/JimmyDansbo/VTUIlib ; https://www.commanderx16.com/forum/index.php?/files/file/142-vtui-library/ ; Unfortunately, we have to modify it severely because the VERA communication ; would otherwise get disrupted by the interrupt. ; ***************************************************************************** ; Show a cursor and get a string input from keyboard. ; ***************************************************************************** ; INPUTS: r0 = pointer to buffer to hold string (must be pre-allocated) ; r2 = screen coordinates ; r3 = pointer to buffer holding the screen code ; .Y = maximum length of string ; .X = color information for input characters ; OUPUTS: .Y = actual length of input ; USES: .A & r1 ; ***************************************************************************** vtui_input_str: @ptr = r0 @length = r1L @invcol = r1H @pos_x = r2L @pos_y = r2H phx sty @length ; Store maximum length ; move cursor to screen position sei lda @pos_x ldx @pos_y jsr alternative_gotoxy lda #$A0 ; Show a "cursor" sta VERA_data0 plx stx VERA_data0 ;dec VERA_addr_low ; only necessary if we do not re-set the cursor later ;dec VERA_addr_low ; clear remaining area for string input phy dey lda #' ' : sta VERA_data0 stx VERA_data0 dey bne :- ply ldy #0 @inputloop: ; give ISR a moment to interrupt us cli phx phy jsr $FFE4 ; Read keyboard input ply plx ; now take back control and move VERA cursor back to the position we need sei pha phx tya clc adc @pos_x ldx @pos_y jsr alternative_gotoxy plx pla cmp #$0D ; If RETURN has been pressed, we exit beq @end cmp #$14 ; We need to handle backspace bne @istext cpy #0 ; If .Y is 0, we can not delete beq @inputloop ; Here we need to handle backspace dey lda #' ' ; Delete cursor sta VERA_data0 lda VERA_addr_low ; Go 2 chars back = 4 bytes sbc #3 sta VERA_addr_low lda #$A0 ; Overwrite last char with cursor sta VERA_data0 dec VERA_addr_low bra @inputloop @istext: cpy @length beq @inputloop ; If .Y = @length, we can not add character ;sta (@ptr),y ; Store char in buffer -- original function stored input petscii. Here, we store screen codes cmp #$20 ; If < $20, we can not use it bcc @inputloop cmp #$40 ; If < $40 & >= $20, screencode is equal to petscii bcc @stvera cmp #$60 ; If > $60, we can not use it bcs @inputloop sbc #$3F ; When .A >= $40 & < $60, subtract $3F to get screencode @stvera: sta (@ptr),y ; store screen code in buffer sta VERA_data0 ; Write char to screen with colorcode stx VERA_data0 lda #$A0 ; Write cursor sta VERA_data0 stx VERA_data0 dec VERA_addr_low ; Set VERA to point at cursor dec VERA_addr_low iny ; Inc .Y to show a char has been added bra @inputloop @end: lda #' ' sta VERA_data0 stx VERA_data0 lda #0 sta (@ptr),y ; trailing zero to finish string cli rts .endscope ; guiutils
19.193126
159
0.681632
ab72b03ed20fe7096e4f7101b67005adc7b3d1fb
270
asm
Assembly
asm/test.asm
danellis/webarc
bd029ae5ecb66eeae1d3e6d4aaf5071d0bbb9d58
[ "MIT" ]
8
2018-11-05T22:15:00.000Z
2022-03-15T17:51:46.000Z
asm/test.asm
rebecchivittorio/webarc
bd029ae5ecb66eeae1d3e6d4aaf5071d0bbb9d58
[ "MIT" ]
null
null
null
asm/test.asm
rebecchivittorio/webarc
bd029ae5ecb66eeae1d3e6d4aaf5071d0bbb9d58
[ "MIT" ]
1
2022-01-13T22:42:09.000Z
2022-01-13T22:42:09.000Z
.text .code 32 b reset // Reset b . // Undefined instruction b . // Software interrupt b . // Prefetch abort b . // Data abort b . // Reserved b . // IRQ b . // FIQ reset: mov r0, #1024 subs r0, r0, #1 bne reset swi 1
15
32
0.503704
7afa7c00c32596f3cdb39e5061592c8fd83094fe
58,955
asm
Assembly
Library/SpecUI/CommonUI/CMain/cmainDocPhysical.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
504
2018-11-18T03:35:53.000Z
2022-03-29T01:02:51.000Z
Library/SpecUI/CommonUI/CMain/cmainDocPhysical.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
96
2018-11-19T21:06:50.000Z
2022-03-06T10:26:48.000Z
Library/SpecUI/CommonUI/CMain/cmainDocPhysical.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
73
2018-11-19T20:46:53.000Z
2022-03-29T00:59:26.000Z
COMMENT @---------------------------------------------------------------------- Copyright (c) GeoWorks 1990 -- All Rights Reserved PROJECT: PC GEOS MODULE: CommonUI/CMain FILE: cmainDocPhysical.asm REVISION HISTORY: Name Date Description ---- ---- ----------- Tony 1/90 Initial version DESCRIPTION: MSG_GEN_DOCUMENT_PHYSICAL_*** $Id: cmainDocPhysical.asm,v 1.1 97/04/07 10:52:32 newdeal Exp $ ------------------------------------------------------------------------------@ DocNewOpen segment resource COMMENT @---------------------------------------------------------------------- MESSAGE: OLDocumentComputeAccessFlags -- MSG_GEN_DOCUMENT_COMPUTE_ACCESS_FLAGS for OLDocumentClass DESCRIPTION: ... PASS: *ds:si - instance data es - segment of OLDocumentClass ax - The message ss:bp - DocumentCommonParams RETURN: al - VMAccessFlags (or FileAccessFlags) ah - destroyed cx, dx, bp - unchanged DESTROYED: bx, si, di, ds, es (message handler) REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Tony 8/ 5/91 Initial version ------------------------------------------------------------------------------@ OLDocumentComputeAccessFlags method dynamic OLDocumentClass, MSG_GEN_DOCUMENT_COMPUTE_ACCESS_FLAGS call GetParentAttrs mov_trash di, ax ; di = GDGA_* call GetUIParentAttrs mov bx, ax ; bx = GDCI_* and ax, mask GDCA_MODE test bx, mask GDCA_VM_FILE jz dosFile ; its a VM file tst ax jz viewerMode cmp ax, GDCM_SHARED_SINGLE shl offset GDCA_MODE mov al, mask VMAF_DISALLOW_SHARED_MULTIPLE jz sharedCommon clr al ;no flags if SHARED_MULTIPLE sharedCommon: ; look for read-only or read-write test ss:[bp].DCP_docAttrs, mask GDA_READ_ONLY jz notReadOnly or al, mask VMAF_FORCE_READ_ONLY notReadOnly: test ss:[bp].DCP_docAttrs, mask GDA_READ_WRITE jz notReadWrite or al, mask VMAF_FORCE_READ_WRITE notReadWrite: test bx, mask GDCA_FORCE_DEMAND_PAGING jnz keepDemandPaging ; ; Turn off demand paging for all document control documents. ; or al, mask VMAF_NO_DEMAND_PAGING keepDemandPaging: ret viewerMode: mov al, mask VMAF_FORCE_READ_ONLY or \ mask VMAF_DISALLOW_SHARED_MULTIPLE jmp sharedCommon dosFile: tst ax jz dosViewer cmp ax, GDCM_SHARED_SINGLE shl offset GDCA_MODE mov al, FileAccessFlags <FE_DENY_WRITE, FA_READ_WRITE> jz dosCommon mov al, FileAccessFlags <FE_NONE, FA_READ_WRITE> dosCommon: ; look for read-only or read-write test ss:[bp].DCP_docAttrs, mask GDA_READ_ONLY jz notDosReadOnly and al, not mask FAF_MODE or al, FA_READ_ONLY shl offset FAF_MODE notDosReadOnly: test ss:[bp].DCP_docAttrs, mask GDA_READ_WRITE jz notDosReadWrite and al, not mask FAF_MODE or al, FA_READ_WRITE shl offset FAF_MODE notDosReadWrite: test bx, mask GDCA_DOS_FILE_DENY_WRITE jz notDosDenyWrite and al, not mask FAF_EXCLUDE or al, FE_DENY_WRITE shl offset FAF_EXCLUDE notDosDenyWrite: ret dosViewer: mov al, FileAccessFlags <FE_NONE, FA_READ_ONLY> jmp dosCommon OLDocumentComputeAccessFlags endm COMMENT @---------------------------------------------------------------------- MESSAGE: OLDocumentPhysicalOpen -- MSG_GEN_DOCUMENT_PHYSICAL_OPEN for OLDocumentClass DESCRIPTION: Really open a file PASS: *ds:si - instance data es - segment of OLDocumentClass ax - The message ss:bp - DocumentCommonParams RETURN: carry - set if error ax - file handle (if successful) or error code (if error) cx - non-zero if template document opened dx - non-zero if a new file was created bp - unchanged DESTROYED: bx, si, di, ds, es (message handler) REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Tony 7/22/91 Initial version ------------------------------------------------------------------------------@ OLDocumentPhysicalOpen method dynamic OLDocumentClass, MSG_GEN_DOCUMENT_PHYSICAL_OPEN call GetParentAttrs mov_trash cx, ax ;cx = attrs mov ax, MSG_GEN_DOCUMENT_COMPUTE_ACCESS_FLAGS call ObjCallInstanceNoLock push ds segmov ds, ss ;ds:dx = filename lea dx, ss:[bp].DCP_name mov ah, VMO_OPEN ;assume no create test ss:[bp].DCP_flags, mask DOF_CREATE_FILE_IF_FILE_DOES_NOT_EXIST jz 10$ mov ah, VMO_CREATE 10$: test cx, mask GDGA_VM_FILE jz notVM clr cx ;use default compression call VMOpen pop ds jc done ; ax = VMStatus, bx = file handle ; check for wrong file type cmp ax, VM_CREATE_OK jz noFileTypeCheck call CheckFileType jc closeError noFileTypeCheck: ; check for a password call CheckPassword jnc passwordOK closeError: push ax mov al, FILE_NO_ERRORS call VMClose pop ax stc jmp done passwordOK: clr cx ;assume no template mov dx, 1 ;assume file created cmp ax, VM_CREATE_OK jz notReadOnly dec dx cmp ax, VM_OPEN_OK_TEMPLATE jnz notTemplate dec cx ; flag template opened jmp vmDone notTemplate: cmp ax, VM_OPEN_OK_READ_WRITE_SINGLE jnz notSharedSingle ornf ss:[bp].DCP_docAttrs, mask GDA_SHARED_SINGLE notSharedSingle: cmp ax, VM_OPEN_OK_READ_WRITE_MULTIPLE jnz notSharedMultiple ornf ss:[bp].DCP_docAttrs, mask GDA_SHARED_MULTIPLE notSharedMultiple: cmp ax, VM_OPEN_OK_READ_ONLY jnz notReadOnly ornf ss:[bp].DCP_docAttrs, mask GDA_READ_ONLY jmp vmDone notReadOnly: ornf ss:[bp].DCP_docAttrs, mask GDA_READ_WRITE vmDone: clc mov_trash ax, bx done: ret notVM: CheckHack <VMO_OPEN eq 0> ; also relies on AH being only ; VMO_OPEN, or VMO_CREATE test ah, VMO_CREATE jnz createNormal call FileOpen pop ds jc regularOpen mov bx, ax ; bx = file handle call CheckPassword jnc regularOpen push ax clr ax call FileClose pop ax stc regularOpen: mov cx, 0 mov dx, cx ret createNormal: mov ah, FILE_CREATE_NO_TRUNCATE test cx, mask GDGA_NATIVE jz 90$ ornf ah, mask FCF_NATIVE 90$: mov cx, FILE_ATTR_NORMAL call FileCreate pop ds jc done ; see if the file was actually created. If it's 0 bytes, it was, for ; all intents and purposes mov bx, ax call FileSize or ax, dx ; (clears carry) mov_tr ax, bx jnz regularOpen ; => file has bytes so it existed before mov cx, dx ; cx <- 0 => not template dec dx ; flag file created ret OLDocumentPhysicalOpen endm COMMENT @---------------------------------------------------------------------- FUNCTION: CheckPassword DESCRIPTION: If the given file has a password then ask the user for it CALLED BY: INTERNAL PASS: *ds:si - document object bx - file handle ss:bp - DocumentCommonParams RETURN: carry - set if error ax - error code DESTROYED: none REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Tony 8/ 7/92 Initial version ------------------------------------------------------------------------------@ CheckPassword proc near uses bx, cx, dx, si, di, bp, ds, es test ss:[bp].DCP_flags, mask DOF_REOPEN jz 5$ ret 5$: passedAX local word push ax documentChunk local word push si if DBCS_PCGEOS filePassword local FILE_PASSWORD_SIZE dup (byte) userPassword local MAX_PASSWORD_SOURCE_LENGTH + 1 dup (wchar) userEncryptedPassword local FILE_PASSWORD_SIZE dup (byte) else filePassword local FILE_PASSWORD_SIZE dup (char) userPassword local MAX_PASSWORD_SOURCE_SIZE + 1 dup (char) userEncryptedPassword local FILE_PASSWORD_SIZE dup (char) endif .enter segmov es, ss lea di, filePassword mov ax, FEA_PASSWORD mov cx, FILE_PASSWORD_SIZE call FileGetHandleExtAttributes jnc gotPassword cmp ax, ERROR_ATTR_NOT_FOUND jz doneGood cmp ax, ERROR_ATTR_NOT_SUPPORTED stc jnz done doneGood: clc mov ax, passedAX done: .leave ret gotPassword: SBCS < cmp {char} es:[di], 0 > DBCS < cmp {wchar} es:[di], 0 > jz doneGood tryAgain: ; duplicate the password dialog and add it as a child of the application mov bx, handle GetPasswordDialog mov si, offset GetPasswordDialog call UserCreateDialog ; set help file for this dialog to be same as the document sub sp, size FileLongName movdw cxdx, sssp push si, bp ;save dialog, locals mov si, documentChunk ;si = GenDocument mov ax, MSG_META_GET_HELP_FILE call ObjCallInstanceNoLock pop si, bp ;^lbx:si = dialog jnc fixupStack mov ax, MSG_META_SET_HELP_FILE mov di, mask MF_CALL or mask MF_FIXUP_DS call ObjMessage fixupStack: add sp, size FileLongName ; display dialog box to get document password call UserDoDialog push ax ;save response ; get text from text object push bp mov dx, ss lea bp, userPassword SBCS < mov cx, size userPassword > DBCS < mov cx, length userPassword > mov si, offset GetPasswordText mov ax, MSG_VIS_TEXT_GET_ALL_PTR mov di, mask MF_CALL or mask MF_FIXUP_DS call ObjMessage pop bp mov si, offset GetPasswordDialog call UserDestroyDialog pop ax cmp ax, IC_OK mov ax, 0 stc jnz done ; encrypt the password push ds segmov ds, ss lea si, userPassword lea di, userEncryptedPassword call UserEncryptPassword ; compare passwords lea si, filePassword mov cx, FILE_PASSWORD_SIZE repe cmpsb pop ds LONG jz doneGood mov ax, SDBT_BAD_PASSWORD call CallUserStandardDialog jmp tryAgain ;better not be hit in Redwood CheckPassword endp COMMENT @---------------------------------------------------------------------- FUNCTION: CheckFileType DESCRIPTION: Ensure that the opened file has the correct token characters CALLED BY: INTERNAL PASS: *ds:si - document object bx - file handle ss:bp - DocumentCommonParams RETURN: carry - set if error ax - error code DESTROYED: none REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Tony 8/ 7/92 Initial version ------------------------------------------------------------------------------@ CheckFileType proc near uses bx, cx, dx, si, di, bp, ds, es test ss:[bp].DCP_flags, mask DOF_REOPEN jz 5$ ret 5$: passedAX local word push ax objToken local GeodeToken fileToken local GeodeToken .enter EC < call AssertIsGenDocument > push bp mov cx, ss lea dx, objToken mov ax, MSG_GEN_DOCUMENT_GROUP_GET_TOKEN call GenCallParent pop bp segmov es, ss lea di, fileToken mov ax, FEA_TOKEN mov cx, size fileToken call FileGetHandleExtAttributes jc done segmov ds, ss lea si, objToken mov cx, size objToken repe cmpsb mov ax, ERROR_FILE_FORMAT_MISMATCH stc jnz done clc mov ax, passedAX done: .leave ret CheckFileType endp COMMENT @---------------------------------------------------------------------- MESSAGE: OLDocumentCreateUIForDocument -- MSG_GEN_DOCUMENT_CREATE_UI_FOR_DOCUMENT for OLDocumentClass DESCRIPTION: ... PASS: *ds:si - instance data es - segment of OLDocumentClass ax - The message RETURN: DESTROYED: bx, si, di, ds, es (message handler) REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Tony 7/23/91 Initial version Cassie 10/14/92 Added code to set display block output. ------------------------------------------------------------------------------@ OLDocumentCreateUIForDocument method dynamic OLDocumentClass, MSG_GEN_DOCUMENT_CREATE_UI_FOR_DOCUMENT ; if we have a GenDisplay to duplicate, do so mov ax, MSG_GEN_DOCUMENT_GROUP_GET_DISPLAY call GenCallParent jcxz noDisplay ; duplicate the sucker and store the handle of the duplicated block push cx mov bx, cx ; Duplicated block needs to be run by the same thread as is running ; the rest of the UI for this application. We'll figure this out ; by fetching the thread running the application object. ; push bx, si clr bx call GeodeGetAppObject mov ax, MGIT_EXEC_THREAD call MemGetInfo pop bx, si mov cx, ax ; pass thread to run in cx clr ax ; have current geode own block call ObjDuplicateResource ;bx = new block pop cx EC < call GenCheckGenAssumption > mov di, ds:[si] add di, ds:[di].Gen_offset mov ds:[di].GDI_display, bx ; add the display to the display control push si push bx, dx ;save display's OD mov ax, MSG_GEN_DOCUMENT_GROUP_GET_DISPLAY_GROUP call GenCallParent ;cx:dx = display control mov bx, cx mov si, dx ;bx:si = display control pop cx, dx ;cx:dx = display to add mov ax, MSG_GEN_ADD_CHILD mov bp, CCO_LAST or mask CCF_MARK_DIRTY mov di, mask MF_FIXUP_DS call ObjMessage ; set the display usable pop si push si mov di, ds:[si] add di, ds:[di].Vis_offset mov bx, cx ;bx:si = display mov si, dx test ds:[di].OLDI_attrs, mask OLDA_USER_OPENED jz setOutput mov dl, VUM_NOW mov ax, MSG_GEN_SET_USABLE mov di, mask MF_FIXUP_DS call ObjMessage setOutput: ; Set the output of the duplicated display block ; to be this document ; mov cx, ds:[LMBH_handle] pop dx ;^lcx:dx = document mov ax, MSG_META_SET_OBJ_BLOCK_OUTPUT mov di, mask MF_FIXUP_DS call ObjMessage mov si, dx ;*ds:si = document noDisplay: mov ax, MSG_META_DOC_OUTPUT_CREATE_UI_FOR_DOCUMENT EC < call AssertIsGenDocument > call SendNotificationToOutput Destroy cx, dx, bp ret OLDocumentCreateUIForDocument endm COMMENT @---------------------------------------------------------------------- MESSAGE: OLDocumentAttachUIToDocument -- MSG_GEN_DOCUMENT_ATTACH_UI_TO_DOCUMENT for OLDocumentClass DESCRIPTION: ... PASS: *ds:si - instance data es - segment of OLDocumentClass ax - The message RETURN: DESTROYED: bx, si, di, ds, es (message handler) REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Tony 7/23/91 Initial version ------------------------------------------------------------------------------@ OLDocumentAttachUIToDocument method dynamic OLDocumentClass, MSG_GEN_DOCUMENT_ATTACH_UI_TO_DOCUMENT ; if we have a view to connect to, connect to it mov di, ds:[LMBH_handle] ;di:bp = data to send to mov bp, si ;SET_CONTENT if view exists call CallSetContent mov ax, MSG_META_DOC_OUTPUT_ATTACH_UI_TO_DOCUMENT EC < call AssertIsGenDocument > call SendNotificationToOutput Destroy cx, dx, bp ret OLDocumentAttachUIToDocument endm COMMENT @---------------------------------------------------------------------- FUNCTION: CallSetContent DESCRIPTION: Handle default UI interaction for document (if any) CALLED BY: OLDocumentAttachUIToDocument, OLDocumentDetachUIFromDocument PASS: *ds:si - document object di:bp - data to send to view in cx:dx RETURN: none DESTROYED: ax, bx, cx, dx, di, bp REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Tony 7/25/91 Initial version ------------------------------------------------------------------------------@ CallSetContent proc far class OLDocumentClass EC < call AssertIsGenDocument > mov ax, MSG_GEN_DOCUMENT_GROUP_GET_VIEW call GenCallParent jcxz noView ; if a display exists then use that handle (assume that the view ; was duplicated along with the display) push di EC < call GenCheckGenAssumption > mov di, ds:[si] add di, ds:[di].Gen_offset mov ax, ds:[di].GDI_display tst ax jz noDisplay mov_trash cx, ax noDisplay: pop di push si mov bx, cx ;bx:si = view mov si, dx mov cx, di mov dx, bp ;cx:dx = data mov ax, MSG_GEN_VIEW_SET_CONTENT ; use MF_CALL to force the set content to complete before we ; do anything else (like queuing a message to close/delete ourself) mov di, mask MF_FIXUP_DS or mask MF_CALL call ObjMessage pop si noView: ret CallSetContent endp COMMENT @---------------------------------------------------------------------- MESSAGE: OLDocumentReadCachedDataFromFile -- MSG_GEN_DOCUMENT_READ_CACHED_DATA_FROM_FILE for OLDocumentClass DESCRIPTION: ... PASS: *ds:si - instance data es - segment of OLDocumentClass ax - The message RETURN: DESTROYED: bx, si, di, ds, es (message handler) REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Tony 7/23/91 Initial version ------------------------------------------------------------------------------@ OLDocumentReadCachedDataFromFile method dynamic OLDocumentClass, MSG_GEN_DOCUMENT_READ_CACHED_DATA_FROM_FILE mov ax, MSG_META_DOC_OUTPUT_READ_CACHED_DATA_FROM_FILE EC < call AssertIsGenDocument > call SendNotificationToOutput Destroy cx, dx, bp ret OLDocumentReadCachedDataFromFile endm DocNewOpen ends ;--- DocNew segment resource COMMENT @---------------------------------------------------------------------- MESSAGE: OLDocumentPhysicalCreate -- MSG_GEN_DOCUMENT_PHYSICAL_CREATE for OLDocumentClass DESCRIPTION: Really create the file PASS: *ds:si - instance data es - segment of OLDocumentClass ax - The message ss:bp - DocumentCommonParams with DCP_name being the name of the file to create and thread's current directory already set appropriately. RETURN: carry - set if error bp - unchanged ax - file handle (if successful) or error code (if error) DESTROYED: bx, si, di, ds, es (message handler) REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Tony 7/22/91 Initial version ------------------------------------------------------------------------------@ OLDocumentPhysicalCreate method dynamic OLDocumentClass, MSG_GEN_DOCUMENT_PHYSICAL_CREATE if DC_DISALLOW_SPACES_FILENAME ; ; check for trailing or leading spaces ; .assert (offset DCP_name eq 0) call CheckSpacesFilename jc exit endif ; call correct create routine call GetParentAttrs ;ax = attributes mov_trash bx, ax ; compute access flags mov ax, MSG_GEN_DOCUMENT_COMPUTE_ACCESS_FLAGS call ObjCallInstanceNoLock ;al = access flags segmov ds, ss ;ds:dx = filename lea dx, ss:[bp].DCP_name ; assume VM file mov ah, VMO_CREATE_ONLY clr cx ;default threshhold test bx, mask GDGA_VM_FILE jz notVM call VMOpen jc exit ;if error then return ax (error code) mov_trash ax, bx ;else return file handle ornf ss:[bp].DCP_docAttrs, mask GDA_READ_WRITE exit: Destroy cx, dx ret notVM: mov ah, FILE_CREATE_ONLY test bx, mask GDGA_NATIVE jz 90$ ornf ah, mask FCF_NATIVE 90$: mov cx, FILE_ATTR_NORMAL call FileCreate Destroy cx, dx ret OLDocumentPhysicalCreate endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% CheckSpacesFilename %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: check for leading and trailing spaces in filename CALLED BY: INTERNAL OLDocumentPhysicalCreate OLDocumentContinueRename OLFileSelectorContinueRename PASS: ss:bp = filename RETURN: carry clear of filename okay ax destroyed carry set if error ax = ERROR_ILLEGAL_FILENAME DESTROYED: nothing SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- brianc 12/16/96 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ if DC_DISALLOW_SPACES_FILENAME CheckSpacesFilename proc far uses cx, es, di .enter segmov es, ss, di lea di, ss:[bp].DCP_name LocalCmpChar es:[di], C_SPACE ; leading space? je spaceCheck LocalLoadChar ax, C_NULL mov cx, length DCP_name LocalFindChar LocalPrevChar esdi ; point to null LocalPrevChar esdi ; point to last char LocalCmpChar es:[di], C_SPACE spaceCheck: mov ax, ERROR_INVALID_NAME ; assume error stc ; assume error je done ; trail/lead space, error clc ; else, indicate no error done: .leave ret CheckSpacesFilename endp endif COMMENT @---------------------------------------------------------------------- FUNCTION: ConvertErrorCode DESCRIPTION: Convert VM errors to normal file errors CALLED BY: INTERNAL PASS: ax - error code RETURN: ax - new error code DESTROYED: none REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Tony 7/22/91 Initial version ------------------------------------------------------------------------------@ ConvertErrorCode proc far uses cx, di, es .enter segmov es, cs mov di, offset vmErrorList mov cx, length vmErrorList repne scasw jnz done mov ax, cs:[di][(errorList-vmErrorList)-2] done: .leave ret vmErrorList word \ VM_FILE_NOT_FOUND, VM_SHARING_DENIED, VM_WRITE_PROTECTED, VM_FILE_EXISTS, VM_UPDATE_INSUFFICIENT_DISK_SPACE, VM_CANNOT_CREATE, VM_FILE_FORMAT_MISMATCH errorList word \ ERROR_FILE_NOT_FOUND, ERROR_ACCESS_DENIED, ERROR_WRITE_PROTECTED, ERROR_FILE_EXISTS, ERROR_SHORT_READ_WRITE, ERROR_ACCESS_DENIED, ERROR_FILE_FORMAT_MISMATCH ConvertErrorCode endp COMMENT @---------------------------------------------------------------------- MESSAGE: OLDocumentPhysicalCopyTemplate -- MSG_GEN_DOCUMENT_PHYSICAL_COPY_TEMPLATE for OLDocumentClass DESCRIPTION: Copy document to an untitled file PASS: *ds:si - instance data es - segment of OLDocumentClass ax - The message RETURN: carry - set if error ax - error code DESTROYED: bx, si, di, ds, es (message handler) REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Tony 8/13/91 Initial version ------------------------------------------------------------------------------@ OLDocumentPhysicalCopyTemplate method dynamic OLDocumentClass, MSG_GEN_DOCUMENT_PHYSICAL_COPY_TEMPLATE mov di, 1200 call ThreadBorrowStackSpace push di sub sp, size DocumentCommonParams mov bp, sp mov ss:[bp].DCP_docAttrs, mask GDA_UNTITLED mov ss:[bp].DCP_flags, 0 if UNTITLED_DOCS_ON_SP_TOP mov ss:[bp].DCP_diskHandle, SP_TOP else mov ss:[bp].DCP_diskHandle, SP_DOCUMENT endif mov {TCHAR}ss:[bp].DCP_path[0], 0 if CUSTOM_DOCUMENT_PATH call OLDocumentInitDocCommonParams endif ; CUSTOM_DOCUMENT_PATH call PushAndSetPath jc error clr cx createLoop: mov dx, ss mov ax, MSG_GEN_DOCUMENT_GENERATE_NAME_FOR_NEW call ObjCallInstanceNoLock ;returns ss:bp = name mov ax, ERROR_FILE_NOT_FOUND cmp cx, GEN_DOCUMENT_GENERATE_NAME_ERROR jz error clr ax cmp cx, GEN_DOCUMENT_GENERATE_NAME_CANCEL jz error push cx mov ax, MSG_GEN_DOCUMENT_PHYSICAL_SAVE_AS call ObjCallInstanceNoLock pop cx jnc noError call ConvertErrorCode inc cx cmp ax, ERROR_FILE_EXISTS jz tryAgain cmp ax, ERROR_ACCESS_DENIED jz tryAgain cmp ax, ERROR_SHARING_VIOLATION je tryAgain error: stc jmp done tryAgain: call GetDocOptions test ax, mask DCO_TRANSPARENT_DOC jz createLoop mov ax, SDBT_TRANSPARENT_NEW_FILE_EXISTS call FarCallStandardDialogSS_BP jmp createLoop noError: call StoreNewDocumentName ; clear template bit clr ax push ax ;push word of zero to write call OLDocumentGetFileHandle mov di, sp ;es:di = zero GeosFileHeaderFlags segmov es, ss mov cx, size GeosFileHeaderFlags mov ax, FEA_FLAGS call FileSetHandleExtAttributes ; clear user notes mov cx, GFH_USER_NOTES_BUFFER_SIZE ; cx <- size of same mov ax, FEA_USER_NOTES ; ax <- attr to set call FileSetHandleExtAttributes pop cx ;pop word to write done: call FilePopDir lea sp, ss:[bp+(size DocumentCommonParams)] pop di call ThreadReturnStackSpace ret OLDocumentPhysicalCopyTemplate endm if CUSTOM_DOCUMENT_PATH COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OLDocumentInitDocCommonParams %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Initializes the passed DocumentCommonParams with the parent's GenPath CALLED BY: (INTERNAL) OLDocumentPhysicalCopyTemplate PASS: *ds:si - GenDocumentClass object ss:bp - DocumentCommonParams RETURN: DocumentCommonParams structure modified. DESTROYED: nothing SIDE EFFECTS: none PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- ptrinh 12/16/96 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ OLDocumentInitDocCommonParams proc near uses ax,cx,dx .enter push bp ; DocumentCommonParams ; ; Get the path from the parent ; lea bp, ss:[bp].DCP_path mov dx, ss ; dx:bp - buffer mov cx, size PathName mov ax, MSG_GEN_PATH_GET call GenCallParent pop bp ; DocumentCommonParams jc nullifyPath mov ss:[bp].DCP_diskHandle, cx done: .leave ret nullifyPath: mov {TCHAR}ss:[bp].DCP_path[0], 0 jmp done OLDocumentInitDocCommonParams endp endif ; CUSTOM_DOCUMENT_PATH COMMENT @---------------------------------------------------------------------- MESSAGE: OLDocumentInitializeDocumentFile -- MSG_GEN_DOCUMENT_INITIALIZE_DOCUMENT_FILE for OLDocumentClass DESCRIPTION: ... PASS: *ds:si - instance data es - segment of OLDocumentClass ax - The message RETURN: DESTROYED: bx, si, di, ds, es (message handler) REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Tony 7/23/91 Initial version ------------------------------------------------------------------------------@ OLDocumentInitializeDocumentFile method dynamic OLDocumentClass, MSG_GEN_DOCUMENT_INITIALIZE_DOCUMENT_FILE mov ax, MSG_META_DOC_OUTPUT_INITIALIZE_DOCUMENT_FILE EC < call AssertIsGenDocument > call SendNotificationToOutput Destroy cx, dx, bp ret OLDocumentInitializeDocumentFile endm COMMENT @---------------------------------------------------------------------- METHOD: OLDocumentGroupNewDoc -- MSG_GEN_DOCUMENT_GROUP_NEW_DOC for OLDocumentGroupClass DESCRIPTION: Create a new file PASS: *ds:si - instance data es - segment of OLDocumentGroupClass ax - MSG_GEN_DOCUMENT_GROUP_NEW_DOC dx - size DocumentCommonParams ss:bp - DocumentCommonParams RETURN: cx:dx - new Document object created carry - set if error DESTROYED: bx, si, di, ds, es REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Tony 1/90 Initial version ------------------------------------------------------------------------------@ OLDocumentGroupNewDoc method dynamic OLDocumentGroupClass, MSG_GEN_DOCUMENT_GROUP_NEW_DOC if FLOPPY_BASED_DOCUMENTS ; ; Don't allow opening if we've exceeded the maximum size already. ; push ax, cx, dx, bp mov ax, MSG_OLDG_GET_TOTAL_SIZE call ObjCallInstanceNoLock cmpdw dxcx, MAX_TOTAL_FILE_SIZE pop ax, cx, dx, bp jb continueNew mov ax, SDBT_CANT_CREATE_TOTAL_FILES_TOO_LARGE call CallUserStandardDialog stc ret continueNew: endif if not VOLATILE_SYSTEM_STATE ; ; Ignore input ; if CUSTOM_DOCUMENT_PATH ; ; We don't use passed diskHandle and path. ; mov ss:[bp].DCP_diskHandle, 0 mov {TCHAR}ss:[bp].DCP_path[0], 0 endif ; CUSTOM_DOCUMENT_PATH mov ax, MSG_GEN_DOCUMENT_NEW call CreateDocObject ; ; Accept input ; Destroy ax ret else ; ; Record our true message and send out a query now to our parent, ; so opened apps will be saved. ; mov bx, ds:[LMBH_handle] mov ax, MSG_OLDG_REALLY_NEW_DOC mov di, mask MF_RECORD or mask MF_STACK call ObjMessage mov cx, di ;pass in cx to MSG_META_QUERY_DOCUMENTS mov ax, MSG_META_QUERY_SAVE_DOCUMENTS GOTO ObjCallInstanceNoLock endif OLDocumentGroupNewDoc endm COMMENT @---------------------------------------------------------------------- METHOD: OLDocumentGroupReallyNewDoc -- MSG_OLDG_REALLY_NEW_DOC for OLDocumentGroupClass DESCRIPTION: Create a new file PASS: *ds:si - instance data es - segment of OLDocumentGroupClass ax - MSG_GEN_DOCUMENT_GROUP_NEW_DOC dx - size DocumentCommonParams ss:bp - DocumentCommonParams RETURN: cx:dx - new Document object created carry - set if error DESTROYED: bx, si, di, ds, es REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Tony 1/90 Initial version ------------------------------------------------------------------------------@ if VOLATILE_SYSTEM_STATE OLDocumentGroupReallyNewDoc method dynamic OLDocumentGroupClass, MSG_OLDG_REALLY_NEW_DOC mov ax, MSG_GEN_DOCUMENT_NEW call CreateDocObject Destroy ax ret OLDocumentGroupReallyNewDoc endm endif DocNew ends ;--- DocSaveAsClose segment resource COMMENT @---------------------------------------------------------------------- MESSAGE: OLDocumentPhysicalSaveAs -- MSG_GEN_DOCUMENT_PHYSICAL_SAVE_AS for OLDocumentClass DESCRIPTION: Really do save as PASS: *ds:si - instance data es - segment of OLDocumentClass ax - The message ss:bp - DocumentCommonParams DOF_SAVE_AS_OVERWRITE_EXISTING_FILE - important RETURN: carry - set if error bp - unchanged ax - file handle (if successful) or error code (if error) DESTROYED: bx, si, di, ds, es (message handler) REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Tony 7/23/91 Initial version ------------------------------------------------------------------------------@ OLDocumentPhysicalSaveAs method dynamic OLDocumentClass, MSG_GEN_DOCUMENT_PHYSICAL_SAVE_AS if DISPLAY_SAVING_MESSAGE call CreateSaveDialogCheckParams ;hold the user's hand, ; if DCP_diskHandle = SP_TOP pushdw cxdx endif mov ax, MSG_GEN_PROCESS_UNDO_FLUSH_ACTIONS call SendUndoMessage call OLDocumentUnregisterDoc call OLDocumentGetFileHandle ;bx = old file handle call GetParentAttrs ;ax = attributes, ZF = is VM mov_trash cx, ax push ds lea dx, ss:[bp].DCP_name jz regularFile mov ax, MSG_GEN_DOCUMENT_COMPUTE_ACCESS_FLAGS call ObjCallInstanceNoLock ; al <- access flags mov ah, VMO_CREATE_ONLY test ss:[bp].DCP_flags, mask DOF_SAVE_AS_OVERWRITE_EXISTING_FILE jz 10$ mov ah, VMO_CREATE_TRUNCATE 10$: segmov ds, ss ;ds:dx = filename clr cx ;default threshhold call VMSaveAs pop ds jc exit mov_trash ax, bx ;ax = file handle ornf ss:[bp].DCP_docAttrs, mask GDA_READ_WRITE exit: jnc fileClosed ; reregister file that couldn't be save-ased, as it were. call OLDocumentRegisterOpenDoc fileClosed: if DISPLAY_SAVING_MESSAGE popdw cxdx call DestroySaveDialog ;destroy dialog endif Destroy cx, dx ret ; normal file -- open new file before sending notification regularFile: segmov ds, ss ;ds:dx = filename mov ah, FILE_CREATE_ONLY test ss:[bp].DCP_flags, mask DOF_SAVE_AS_OVERWRITE_EXISTING_FILE jz 20$ mov ah, FILE_CREATE_TRUNCATE 20$: test cx, mask GDGA_NATIVE jz 21$ ornf ah, mask FCF_NATIVE 21$: mov al, FILE_ACCESS_RW or FILE_DENY_RW mov cx, FILE_ATTR_NORMAL call FileCreate pop ds jc exit ; actually save the data mov_trash cx, ax ;save file handle push cx, bp mov ax, MSG_GEN_DOCUMENT_PHYSICAL_SAVE_AS_FILE_HANDLE call ObjCallInstanceNoLock pop cx, bp jc saveError mov bx, cx mov al, FILE_NO_ERRORS call FileCommit call OLDocumentGetFileHandle clr ax call FileClose mov_trash ax, cx ;return file handle jmp exit ; if error then close file and delete it saveError: push ax ;save error code mov bx, cx mov al, FILE_NO_ERRORS call FileClose push ds segmov ds, ss lea dx, ss:[bp].DCP_name call FileDelete pop ds pop ax stc jmp exit OLDocumentPhysicalSaveAs endm COMMENT @---------------------------------------------------------------------- ROUTINE: CreateSaveDialog SYNOPSIS: Creates a dialog box for saving, if ATTR_GEN_PATH isn't set to SP_TOP. CALLED BY: OLDocumentPhysicalSaveAs PASS: *ds:si -- GenDocument RETURN: ^lcx:dx -- created dialog DESTROYED: nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Chris 8/ 4/93 Initial version ------------------------------------------------------------------------------@ if DISPLAY_SAVING_MESSAGE CreateSaveDialogCheckVardata proc far uses bx, si, bp, ax .enter if UNTITLED_DOCS_ON_SP_TOP ; ; If saving to the ramdisk, forget this box and return zeroes. ; (5/8/94 cbh) ; clrdw cxdx call DocCheckIfOnRamdisk ;if on RAM disk, forget it. jz exit endif call DoSaveDialog exit: .leave ret CreateSaveDialogCheckVardata endp endif COMMENT @---------------------------------------------------------------------- ROUTINE: CreateSaveDialogCheckParams SYNOPSIS: Creates a dialog box for saving, is DCP_diskHandle != SP_TOP. CALLED BY: OLDocumentPhysicalSaveAs PASS: *ds:si -- GenDocument ss:bp -- DocumentCommonParams RETURN: ^lcx:dx -- created dialog DESTROYED: nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Chris 8/ 4/93 Initial version ------------------------------------------------------------------------------@ if DISPLAY_SAVING_MESSAGE CreateSaveDialogCheckParams proc far uses bx, si, bp, ax .enter ; ; If saving to the ramdisk, forget this box and return zeroes. ; (5/8/94 cbh) ; clrdw cxdx cmp ss:[bp].DCP_diskHandle, SP_TOP je exit call DoSaveDialog exit: .leave ret CreateSaveDialogCheckParams endp endif COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DoSaveDialog %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Low level save dialog stuff. CALLED BY: CreateSaveDialogCheckVardata, CreateSaveDialogCheckParams PASS: *ds:si -- GenDocument RETURN: ^lcx:dx -- created dialog DESTROYED: ax, bx, si, di PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Chris 5/ 9/94 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ if DISPLAY_SAVING_MESSAGE DoSaveDialog proc near .enter mov bx, handle SaveDialog mov si, offset SaveDialog call UserCreateDialog mov ax, MSG_GEN_INTERACTION_INITIATE mov di, mask MF_CALL or mask MF_FIXUP_DS call ObjMessage movdw cxdx, bxsi .leave ret DoSaveDialog endp endif COMMENT @---------------------------------------------------------------------- ROUTINE: DestroySaveDialog SYNOPSIS: Creates a dialog box for saving. CALLED BY: OLDocumentPhysicalSaveAs PASS: ^lcx:dx -- dialog box to destroy (null if none) RETURN: nothing (flags preserved) DESTROYED: nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Chris 8/ 4/93 Initial version ------------------------------------------------------------------------------@ if DISPLAY_SAVING_MESSAGE DestroySaveDialog proc far uses bx, si .enter pushf tst cx ;no dialog up, exit jz exit movdw bxsi, cxdx call UserDestroyDialog exit: popf .leave ret DestroySaveDialog endp endif COMMENT @---------------------------------------------------------------------- MESSAGE: OLDocumentPhysicalClose -- MSG_GEN_DOCUMENT_PHYSICAL_CLOSE for OLDocumentClass DESCRIPTION: Physically close the file PASS: *ds:si - instance data es - segment of OLDocumentClass ax - The message RETURN: none DESTROYED: bx, si, di, ds, es (message handler) REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Tony 7/23/91 Initial version ------------------------------------------------------------------------------@ OLDocumentPhysicalClose method dynamic OLDocumentClass, MSG_GEN_DOCUMENT_PHYSICAL_CLOSE call OLDocumentUnregisterDoc call OLDocumentGetFileHandle ;bx = file handle EC < call GenCheckGenAssumption > mov di, ds:[si] add di, ds:[di].Gen_offset mov ds:[di].GDI_fileHandle, 0 ; call correct close routine call GetParentAttrs ;ax = attribute, ZF = is VM jz notVM mov al, FILE_NO_ERRORS ;allow errors call VMClose if 0 EC < ERROR_C OL_ERROR > endif jmp common notVM: mov al, FILE_NO_ERRORS call FileClose common: Destroy ax, cx, dx, bp ret OLDocumentPhysicalClose endm COMMENT @---------------------------------------------------------------------- MESSAGE: OLDocumentPhysicalDelete -- MSG_GEN_DOCUMENT_PHYSICAL_DELETE for OLDocumentClass DESCRIPTION: Really delete the file PASS: *ds:si - instance data es - segment of OLDocumentClass ax - The message RETURN: DESTROYED: bx, si, di, ds, es (message handler) REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Tony 7/23/91 Initial version ------------------------------------------------------------------------------@ OLDocumentPhysicalDelete method dynamic OLDocumentClass, MSG_GEN_DOCUMENT_PHYSICAL_DELETE call FilePushDir mov ax, ATTR_GEN_PATH_DATA mov dx, TEMP_GEN_PATH_SAVED_DISK_HANDLE call GenPathSetCurrentPathFromObjectPath EC < ERROR_C OL_ERROR > NEC < jc done > mov_tr bx, ax ; bx <- disk handle EC < call GenCheckGenAssumption > mov di, ds:[si] add di, ds:[di].Gen_offset lea dx, ds:[di].GDI_fileName ;ds:dx = file name call FileDelete EC < ERROR_C CANNOT_DELETE_FILE_JUST_CLOSED > call FilePopDir Destroy ax, cx, dx, bp NEC <done: > ret OLDocumentPhysicalDelete endm COMMENT @---------------------------------------------------------------------- MESSAGE: OLDocumentPhysicalSaveAsFileHandle -- MSG_GEN_DOCUMENT_PHYSICAL_SAVE_AS_FILE_HANDLE for OLDocumentClass DESCRIPTION: Save DOS file PASS: *ds:si - instance data es - segment of OLDocumentClass ax - The message cx - new file handle RETURN: carry - set if error ax - error code (if error) DESTROYED: bx, si, di, ds, es (message handler) REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Tony 7/23/91 Initial version ------------------------------------------------------------------------------@ OLDocumentPhysicalSaveAsFileHandle method dynamic OLDocumentClass, MSG_GEN_DOCUMENT_PHYSICAL_SAVE_AS_FILE_HANDLE ; get OD to send to push cx mov ax, MSG_GEN_DOCUMENT_GROUP_GET_OUTPUT call GenCallParent ;cx:dx = output pop bp mov bx, cx mov cx, ds:[LMBH_handle] xchg dx, si ;bx:si = output ;cx:dx = document mov ax, MSG_META_DOC_OUTPUT_PHYSICAL_SAVE_AS_FILE_HANDLE mov di, mask MF_FIXUP_DS or mask MF_CALL GOTO ObjMessage OLDocumentPhysicalSaveAsFileHandle endm COMMENT @---------------------------------------------------------------------- MESSAGE: OLDocumentDestroyUIForDocument -- MSG_GEN_DOCUMENT_DESTROY_UI_FOR_DOCUMENT for OLDocumentClass DESCRIPTION: ... PASS: *ds:si - instance data es - segment of OLDocumentClass ax - The message RETURN: DESTROYED: bx, si, di, ds, es (message handler) REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Tony 7/23/91 Initial version ------------------------------------------------------------------------------@ OLDocumentDestroyUIForDocument method dynamic OLDocumentClass, MSG_GEN_DOCUMENT_DESTROY_UI_FOR_DOCUMENT ; if we have a GenDisplay to biff, do so mov ax, MSG_GEN_DOCUMENT_GROUP_GET_DISPLAY call GenCallParent jcxz noDisplay push si EC < call GenCheckGenAssumption > mov di, ds:[si] add di, ds:[di].Gen_offset clr bx xchg bx, ds:[di].GDI_display mov si, dx ;bx:si = display ; nuke the display if (1) ; Let's give the 'ol Display the same treatment as we do dialogs ; residing in a single block which we wish to get rid of -- ; Dismiss it, change the linkage to one-way upward only, ; remove it from any window list it is on, & NUKE it. The ; slow, non-optimized approach will be taken if any objects ; within the block are on the active list. ; -- Doug 1/93 ; mov ax, MSG_GEN_DESTROY_AND_FREE_BLOCK mov di, mask MF_FIXUP_DS call ObjMessage else ; set the display not usable mov dl, VUM_NOW mov ax, MSG_GEN_SET_NOT_USABLE call DocOperations_ObjMessage_fixupDS ; remove the display from the display control mov ax, MSG_GEN_FIND_PARENT mov di, mask MF_CALL or mask MF_FIXUP_DS call DocOperations_ObjMessage ;cx:dx = display control xchg bx, cx ;bx:si = display control xchg dx, si ;cx:dx = display mov bp, mask CCF_MARK_DIRTY mov ax, MSG_GEN_REMOVE_CHILD clr bp call DocOperations_ObjMessage_fixupDS ; free the UI block mov bx, cx mov si, dx ;bx:si = display mov ax, MSG_META_BLOCK_FREE call DocOperations_ObjMessage_fixupDS endif pop si noDisplay: mov ax, MSG_META_DOC_OUTPUT_DESTROY_UI_FOR_DOCUMENT EC < call AssertIsGenDocument > call SendNotificationToOutput Destroy cx, dx, bp ret OLDocumentDestroyUIForDocument endm COMMENT @---------------------------------------------------------------------- MESSAGE: OLDocumentDetachUIFromDocument -- MSG_GEN_DOCUMENT_DETACH_UI_FROM_DOCUMENT for OLDocumentClass DESCRIPTION: Handle default UI interaaction for document (if any) PASS: *ds:si - instance data es - segment of OLDocumentClass ax - The message RETURN: DESTROYED: bx, si, di, ds, es (message handler) REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Tony 7/23/91 Initial version ------------------------------------------------------------------------------@ OLDocumentDetachUIFromDocument method dynamic OLDocumentClass, MSG_GEN_DOCUMENT_DETACH_UI_FROM_DOCUMENT ; if we have a view to connect to, connect to it clr di ;di:bp = data to send to clr bp ;SET_CONTENT if view exists call CallSetContent mov ax, MSG_GEN_PROCESS_UNDO_FLUSH_ACTIONS call SendUndoMessage mov ax, MSG_META_DOC_OUTPUT_DETACH_UI_FROM_DOCUMENT EC < call AssertIsGenDocument > call SendNotificationToOutput Destroy cx, dx, bp ret OLDocumentDetachUIFromDocument endm COMMENT @---------------------------------------------------------------------- MESSAGE: OLDocumentSaveAsCompleted -- MSG_GEN_DOCUMENT_SAVE_AS_COMPLETED for OLDocumentClass DESCRIPTION: ... PASS: *ds:si - instance data es - segment of OLDocumentClass ax - The message RETURN: DESTROYED: bx, si, di, ds, es (message handler) REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Tony 7/23/91 Initial version ------------------------------------------------------------------------------@ OLDocumentSaveAsCompleted method dynamic OLDocumentClass, MSG_GEN_DOCUMENT_SAVE_AS_COMPLETED mov ax, MSG_META_DOC_OUTPUT_SAVE_AS_COMPLETED EC < call AssertIsGenDocument > call SendNotificationToOutput Destroy cx, dx, bp ret OLDocumentSaveAsCompleted endm DocSaveAsClose ends ;--- DocCommon segment resource COMMENT @---------------------------------------------------------------------- MESSAGE: OLDocumentPhysicalSave -- MSG_GEN_DOCUMENT_PHYSICAL_SAVE for OLDocumentClass DESCRIPTION: Really save the document PASS: *ds:si - instance data es - segment of OLDocumentClass ax - The message RETURN: carry - set if error ax - file handle (if successful) or error code (if error) DESTROYED: bx, si, di, ds, es (message handler) REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Tony 7/23/91 Initial version ------------------------------------------------------------------------------@ OLDocumentPhysicalSave method dynamic OLDocumentClass, MSG_GEN_DOCUMENT_PHYSICAL_SAVE if DISPLAY_SAVING_MESSAGE call CreateSaveDialogCheckVardata ;hold the user's hand, if ; ATTR_GEN_PATH != SP_TOP pushdw cxdx endif mov ax, MSG_GEN_PROCESS_UNDO_FLUSH_ACTIONS call SendUndoMessage mov ax, MSG_META_DOC_OUTPUT_PHYSICAL_SAVE call SendNotificationToOutput jc common ; call correct save routine call OLDocumentGetFileHandle ;bx = file handle call GetParentAttrs ;ax = attribute, ZF = is VM jz commit call VMSave jnc common ; Eat VM_UPDATE_BLOCK_WAS_LOCKED and VM_UPDATE_NOTHING_DIRTY, which ; should not be reported to the user. We will display a warning ; to the programmer though, so he can be aware that this is happening. ; ; This is done so autosaves (or saves) on files that can be accessed ; by multiple apps will not put up errors if by some chance one of the ; blocks is locked when we try to save. ; cmp ax, VM_UPDATE_BLOCK_WAS_LOCKED EC < WARNING_Z SAVE_FAILED_DUE_TO_BLOCK_LOCKED_BY_ANOTHER_THREAD> jz ignore cmp ax, VM_UPDATE_NOTHING_DIRTY EC < WARNING_Z SAVE_ATTEMPTED_WHEN_NO_BLOCKS_WERE_DIRTY > stc jnz common ignore: clc jmp common commit: clr al call FileCommit common: if DISPLAY_SAVING_MESSAGE popdw cxdx call DestroySaveDialog ;destroy dialog endif Destroy cx, dx, bp ret OLDocumentPhysicalSave endm COMMENT @---------------------------------------------------------------------- MESSAGE: OLDocumentPhysicalUpdate -- MSG_GEN_DOCUMENT_PHYSICAL_UPDATE for OLDocumentClass DESCRIPTION: Update changes to the file PASS: *ds:si - instance data es - segment of OLDocumentClass ax - The message RETURN: carry - set if error ax - file handle (if successful) or error code (if error) DESTROYED: bx, si, di, ds, es (message handler) REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Tony 7/23/91 Initial version ------------------------------------------------------------------------------@ OLDocumentPhysicalUpdate method dynamic OLDocumentClass, MSG_GEN_DOCUMENT_PHYSICAL_UPDATE mov ax, MSG_META_DOC_OUTPUT_PHYSICAL_UPDATE call SendNotificationToOutput jc done call OLDocumentGetFileHandle call GetParentAttrs ; ax <- attrs, ZF <- is VM jz done call VMUpdate jc err noErr: clr al call FileCommit done: Destroy cx, dx, bp ret err: ; Eat VM_UPDATE_BLOCK_WAS_LOCKED and VM_UPDATE_NOTHING_DIRTY, which ; should not be reported to the user. We will display a warning ; to the programmer though, so he can be aware that this is happening. cmp ax, VM_UPDATE_BLOCK_WAS_LOCKED EC < WARNING_Z SAVE_FAILED_DUE_TO_BLOCK_LOCKED_BY_ANOTHER_THREAD> jz ignore cmp ax, VM_UPDATE_NOTHING_DIRTY EC < WARNING_Z SAVE_ATTEMPTED_WHEN_NO_BLOCKS_WERE_DIRTY > stc jnz done ignore: clc jmp done OLDocumentPhysicalUpdate endm COMMENT @---------------------------------------------------------------------- MESSAGE: OLDocumentPhysicalCheckForModifications -- MSG_GEN_DOCUMENT_PHYSICAL_CHECK_FOR_MODIFICATIONS for OLDocumentClass DESCRIPTION: Check to see if a "shared multiple" file is modified PASS: *ds:si - instance data es - segment of OLDocumentClass ax - The message RETURN: carry - set if file modified ax, cx, dx, bp - destroyed DESTROYED: bx, si, di, ds, es (message handler) REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Tony 8/ 7/91 Initial version ------------------------------------------------------------------------------@ OLDocumentPhysicalCheckForModifications method dynamic OLDocumentClass, MSG_GEN_DOCUMENT_PHYSICAL_CHECK_FOR_MODIFICATIONS call OLDocumentGetFileHandle ;bx = file handle call VMCheckForModifications Destroy ax, cx, dx, bp ret OLDocumentPhysicalCheckForModifications endm COMMENT @---------------------------------------------------------------------- FUNCTION: SendNotificationToOutput DESCRIPTION: Load file handle and call OLDocSendNotification CALLED BY: INTERNAL PASS: *ds:si - GenDocument ax - method to send RETURN: ax - from notification carry - from notification (clear if no notification) DESTROYED: none REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Tony 1/90 Initial version ------------------------------------------------------------------------------@ SendNotificationToOutput proc far uses cx, dx, si, bp .enter EC < call AssertIsGenDocument > ; get OD to send to push ax mov ax, MSG_GEN_DOCUMENT_GROUP_GET_OUTPUT call GenCallParent ;cx:dx = output call OLDocumentGetFileHandle mov_trash bp, ax pop ax mov bx, cx mov cx, ds:[LMBH_handle] xchg dx, si ;bx:si = output ;cx:dx = document mov di, mask MF_FIXUP_DS or mask MF_CALL call ObjMessage .leave ret SendNotificationToOutput endp COMMENT @---------------------------------------------------------------------- MESSAGE: OLDocumentWriteCachedDataToFile -- MSG_GEN_DOCUMENT_WRITE_CACHED_DATA_TO_FILE for OLDocumentClass DESCRIPTION: ... PASS: *ds:si - instance data es - segment of OLDocumentClass ax - The message RETURN: DESTROYED: bx, si, di, ds, es (message handler) REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Tony 7/23/91 Initial version ------------------------------------------------------------------------------@ OLDocumentWriteCachedDataToFile method dynamic OLDocumentClass, MSG_GEN_DOCUMENT_WRITE_CACHED_DATA_TO_FILE mov ax, MSG_META_DOC_OUTPUT_WRITE_CACHED_DATA_TO_FILE EC < call AssertIsGenDocument > call SendNotificationToOutput Destroy cx, dx, bp ret OLDocumentWriteCachedDataToFile endm COMMENT @---------------------------------------------------------------------- MESSAGE: OLDocumentDocumentHasChanged -- MSG_GEN_DOCUMENT_DOCUMENT_HAS_CHANGED for OLDocumentClass DESCRIPTION: ... PASS: *ds:si - instance data es - segment of OLDocumentClass ax - The message RETURN: DESTROYED: bx, si, di, ds, es (message handler) REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Tony 8/ 7/91 Initial version ------------------------------------------------------------------------------@ OLDocumentDocumentHasChanged method dynamic OLDocumentClass, MSG_GEN_DOCUMENT_DOCUMENT_HAS_CHANGED mov ax, MSG_META_DOC_OUTPUT_DOCUMENT_HAS_CHANGED EC < call AssertIsGenDocument > call SendNotificationToOutput Destroy cx, dx, bp ret OLDocumentDocumentHasChanged endm DocCommon ends ;--- DocMisc segment resource COMMENT @---------------------------------------------------------------------- MESSAGE: OLDocumentPhysicalRevert -- MSG_GEN_DOCUMENT_PHYSICAL_REVERT for OLDocumentClass DESCRIPTION: ... PASS: *ds:si - instance data es - segment of OLDocumentClass ax - The message RETURN: carry - set if error DESTROYED: bx, si, di, ds, es (message handler) REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Tony 7/23/91 Initial version ------------------------------------------------------------------------------@ OLDocumentPhysicalRevert method dynamic OLDocumentClass, MSG_GEN_DOCUMENT_PHYSICAL_REVERT mov ax, MSG_META_DOC_OUTPUT_PHYSICAL_REVERT call SendNotificationToOutput jc common ;return carry set if error ; call correct revert routine call OLDocumentGetFileHandle ;bx = file handle call GetParentAttrs ;ax = attribute, ZF = is VM jz common ;carry is clear call VMGetAttributes ;al = VMAttributes test al, mask VMA_BACKUP jnz revert call VMDiscardDirtyBlocks jmp short common ;return error, if any revert: call VMRevert done: clc common: Destroy ax, cx, dx, bp ret OLDocumentPhysicalRevert endm COMMENT @---------------------------------------------------------------------- MESSAGE: OLDocumentPhysicalRevertToAutoSave -- MSG_GEN_DOCUMENT_PHYSICAL_REVERT_TO_AUTO_SAVE for OLDocumentClass DESCRIPTION: ... PASS: *ds:si - instance data es - segment of OLDocumentClass ax - The message RETURN: carry - set if error DESTROYED: bx, si, di, ds, es (message handler) REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Tony 7/23/91 Initial version ------------------------------------------------------------------------------@ OLDocumentPhysicalRevertToAutoSave method dynamic OLDocumentClass, MSG_GEN_DOCUMENT_PHYSICAL_REVERT_TO_AUTO_SAVE mov ax, MSG_META_DOC_OUTPUT_PHYSICAL_REVERT_TO_AUTO_SAVE call SendNotificationToOutput jc common ;return carry set if error ; call correct revert routine call OLDocumentGetFileHandle ;bx = file handle call GetParentAttrs ;ax = attribute, ZF = is VM jz common ;carry is clear call VMDiscardDirtyBlocks common: Destroy ax, cx, dx, bp ret OLDocumentPhysicalRevertToAutoSave endm COMMENT @---------------------------------------------------------------------- MESSAGE: OLDocumentUpdateEarlierCompatibleDocument -- MSG_GEN_DOCUMENT_UPDATE_EARLIER_COMPATIBLE_DOCUMENT for OLDocumentClass DESCRIPTION: ... PASS: *ds:si - instance data es - segment of OLDocumentClass ax - The message RETURN: carry - set if error ax - error code (if error) or 0 if no error DESTROYED: bx, si, di, ds, es (message handler) REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Tony 7/23/91 Initial version ------------------------------------------------------------------------------@ OLDocumentUpdateEarlierCompatibleDocument method dynamic OLDocumentClass, MSG_GEN_DOCUMENT_UPDATE_EARLIER_COMPATIBLE_DOCUMENT mov ax, MSG_META_DOC_OUTPUT_UPDATE_EARLIER_COMPATIBLE_DOCUMENT call SendNotificationToOutput Destroy cx, dx, bp ret OLDocumentUpdateEarlierCompatibleDocument endm COMMENT @---------------------------------------------------------------------- MESSAGE: OLDocumentUpdateEarlierIncompatibleDocument -- MSG_GEN_DOCUMENT_UPDATE_EARLIER_INCOMPATIBLE_DOCUMENT for OLDocumentClass DESCRIPTION: ... PASS: *ds:si - instance data es - segment of OLDocumentClass ax - The message RETURN: carry - set if error ax - file handle (if no error) or error code (if error) DESTROYED: bx, si, di, ds, es (message handler) REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Tony 7/23/91 Initial version ------------------------------------------------------------------------------@ OLDocumentUpdateEarlierIncompatibleDocument method dynamic OLDocumentClass, MSG_GEN_DOCUMENT_UPDATE_EARLIER_INCOMPATIBLE_DOCUMENT mov ax, MSG_META_DOC_OUTPUT_UPDATE_EARLIER_INCOMPATIBLE_DOCUMENT EC < call AssertIsGenDocument > call SendNotificationToOutput Destroy cx, dx, bp ret OLDocumentUpdateEarlierIncompatibleDocument endm DocMisc ends ;--- DocObscure segment resource COMMENT @---------------------------------------------------------------------- MESSAGE: OLDocumentAttachFailed -- MSG_GEN_DOCUMENT_ATTACH_FAILED for OLDocumentClass DESCRIPTION: ... PASS: *ds:si - instance data es - segment of OLDocumentClass ax - The message RETURN: DESTROYED: bx, si, di, ds, es (message handler) REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Tony 7/23/91 Initial version ------------------------------------------------------------------------------@ OLDocumentAttachFailed method dynamic OLDocumentClass, MSG_GEN_DOCUMENT_ATTACH_FAILED mov ax, MSG_META_DOC_OUTPUT_ATTACH_FAILED EC < call AssertIsGenDocument > call SendNotificationToOutput Destroy cx, dx, bp ret OLDocumentAttachFailed endm DocObscure ends
21.53214
80
0.643508
87951910d8e555d6a0f33d3b28b1373b6c56595a
17,611
asm
Assembly
simd/i386/jidctflt-3dn.asm
t-head-aosp/platform-external-libjpeg-turbo
3457af89e30cd924f687c412c6797aa63ed0c1e3
[ "Zlib" ]
3,710
2016-03-26T00:40:48.000Z
2022-03-31T21:35:12.000Z
simd/i386/jidctflt-3dn.asm
t-head-aosp/platform-external-libjpeg-turbo
3457af89e30cd924f687c412c6797aa63ed0c1e3
[ "Zlib" ]
4,246
2016-03-26T01:21:45.000Z
2022-03-31T23:10:47.000Z
simd/i386/jidctflt-3dn.asm
t-head-aosp/platform-external-libjpeg-turbo
3457af89e30cd924f687c412c6797aa63ed0c1e3
[ "Zlib" ]
942
2015-07-27T23:13:52.000Z
2022-03-31T14:11:23.000Z
; ; jidctflt.asm - floating-point IDCT (3DNow! & MMX) ; ; Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB ; Copyright (C) 2016, D. R. Commander. ; ; Based on the x86 SIMD extension for IJG JPEG library ; Copyright (C) 1999-2006, MIYASAKA Masaru. ; For conditions of distribution and use, see copyright notice in jsimdext.inc ; ; This file should be assembled with NASM (Netwide Assembler), ; can *not* be assembled with Microsoft's MASM or any compatible ; assembler (including Borland's Turbo Assembler). ; NASM is available from http://nasm.sourceforge.net/ or ; http://sourceforge.net/project/showfiles.php?group_id=6208 ; ; This file contains a floating-point implementation of the inverse DCT ; (Discrete Cosine Transform). The following code is based directly on ; the IJG's original jidctflt.c; see the jidctflt.c for more details. %include "jsimdext.inc" %include "jdct.inc" ; -------------------------------------------------------------------------- SECTION SEG_CONST alignz 32 GLOBAL_DATA(jconst_idct_float_3dnow) EXTN(jconst_idct_float_3dnow): PD_1_414 times 2 dd 1.414213562373095048801689 PD_1_847 times 2 dd 1.847759065022573512256366 PD_1_082 times 2 dd 1.082392200292393968799446 PD_2_613 times 2 dd 2.613125929752753055713286 PD_RNDINT_MAGIC times 2 dd 100663296.0 ; (float)(0x00C00000 << 3) PB_CENTERJSAMP times 8 db CENTERJSAMPLE alignz 32 ; -------------------------------------------------------------------------- SECTION SEG_TEXT BITS 32 ; ; Perform dequantization and inverse DCT on one block of coefficients. ; ; GLOBAL(void) ; jsimd_idct_float_3dnow(void *dct_table, JCOEFPTR coef_block, ; JSAMPARRAY output_buf, JDIMENSION output_col) ; %define dct_table(b) (b) + 8 ; void *dct_table %define coef_block(b) (b) + 12 ; JCOEFPTR coef_block %define output_buf(b) (b) + 16 ; JSAMPARRAY output_buf %define output_col(b) (b) + 20 ; JDIMENSION output_col %define original_ebp ebp + 0 %define wk(i) ebp - (WK_NUM - (i)) * SIZEOF_MMWORD ; mmword wk[WK_NUM] %define WK_NUM 2 %define workspace wk(0) - DCTSIZE2 * SIZEOF_FAST_FLOAT ; FAST_FLOAT workspace[DCTSIZE2] align 32 GLOBAL_FUNCTION(jsimd_idct_float_3dnow) EXTN(jsimd_idct_float_3dnow): push ebp mov eax, esp ; eax = original ebp sub esp, byte 4 and esp, byte (-SIZEOF_MMWORD) ; align to 64 bits mov [esp], eax mov ebp, esp ; ebp = aligned ebp lea esp, [workspace] push ebx ; push ecx ; need not be preserved ; push edx ; need not be preserved push esi push edi get_GOT ebx ; get GOT address ; ---- Pass 1: process columns from input, store into work array. ; mov eax, [original_ebp] mov edx, POINTER [dct_table(eax)] ; quantptr mov esi, JCOEFPTR [coef_block(eax)] ; inptr lea edi, [workspace] ; FAST_FLOAT *wsptr mov ecx, DCTSIZE/2 ; ctr alignx 16, 7 .columnloop: %ifndef NO_ZERO_COLUMN_TEST_FLOAT_3DNOW mov eax, dword [DWBLOCK(1,0,esi,SIZEOF_JCOEF)] or eax, dword [DWBLOCK(2,0,esi,SIZEOF_JCOEF)] jnz short .columnDCT pushpic ebx ; save GOT address mov ebx, dword [DWBLOCK(3,0,esi,SIZEOF_JCOEF)] mov eax, dword [DWBLOCK(4,0,esi,SIZEOF_JCOEF)] or ebx, dword [DWBLOCK(5,0,esi,SIZEOF_JCOEF)] or eax, dword [DWBLOCK(6,0,esi,SIZEOF_JCOEF)] or ebx, dword [DWBLOCK(7,0,esi,SIZEOF_JCOEF)] or eax, ebx poppic ebx ; restore GOT address jnz short .columnDCT ; -- AC terms all zero movd mm0, dword [DWBLOCK(0,0,esi,SIZEOF_JCOEF)] punpcklwd mm0, mm0 psrad mm0, (DWORD_BIT-WORD_BIT) pi2fd mm0, mm0 pfmul mm0, MMWORD [MMBLOCK(0,0,edx,SIZEOF_FLOAT_MULT_TYPE)] movq mm1, mm0 punpckldq mm0, mm0 punpckhdq mm1, mm1 movq MMWORD [MMBLOCK(0,0,edi,SIZEOF_FAST_FLOAT)], mm0 movq MMWORD [MMBLOCK(0,1,edi,SIZEOF_FAST_FLOAT)], mm0 movq MMWORD [MMBLOCK(0,2,edi,SIZEOF_FAST_FLOAT)], mm0 movq MMWORD [MMBLOCK(0,3,edi,SIZEOF_FAST_FLOAT)], mm0 movq MMWORD [MMBLOCK(1,0,edi,SIZEOF_FAST_FLOAT)], mm1 movq MMWORD [MMBLOCK(1,1,edi,SIZEOF_FAST_FLOAT)], mm1 movq MMWORD [MMBLOCK(1,2,edi,SIZEOF_FAST_FLOAT)], mm1 movq MMWORD [MMBLOCK(1,3,edi,SIZEOF_FAST_FLOAT)], mm1 jmp near .nextcolumn alignx 16, 7 %endif .columnDCT: ; -- Even part movd mm0, dword [DWBLOCK(0,0,esi,SIZEOF_JCOEF)] movd mm1, dword [DWBLOCK(2,0,esi,SIZEOF_JCOEF)] movd mm2, dword [DWBLOCK(4,0,esi,SIZEOF_JCOEF)] movd mm3, dword [DWBLOCK(6,0,esi,SIZEOF_JCOEF)] punpcklwd mm0, mm0 punpcklwd mm1, mm1 psrad mm0, (DWORD_BIT-WORD_BIT) psrad mm1, (DWORD_BIT-WORD_BIT) pi2fd mm0, mm0 pi2fd mm1, mm1 pfmul mm0, MMWORD [MMBLOCK(0,0,edx,SIZEOF_FLOAT_MULT_TYPE)] pfmul mm1, MMWORD [MMBLOCK(2,0,edx,SIZEOF_FLOAT_MULT_TYPE)] punpcklwd mm2, mm2 punpcklwd mm3, mm3 psrad mm2, (DWORD_BIT-WORD_BIT) psrad mm3, (DWORD_BIT-WORD_BIT) pi2fd mm2, mm2 pi2fd mm3, mm3 pfmul mm2, MMWORD [MMBLOCK(4,0,edx,SIZEOF_FLOAT_MULT_TYPE)] pfmul mm3, MMWORD [MMBLOCK(6,0,edx,SIZEOF_FLOAT_MULT_TYPE)] movq mm4, mm0 movq mm5, mm1 pfsub mm0, mm2 ; mm0=tmp11 pfsub mm1, mm3 pfadd mm4, mm2 ; mm4=tmp10 pfadd mm5, mm3 ; mm5=tmp13 pfmul mm1, [GOTOFF(ebx,PD_1_414)] pfsub mm1, mm5 ; mm1=tmp12 movq mm6, mm4 movq mm7, mm0 pfsub mm4, mm5 ; mm4=tmp3 pfsub mm0, mm1 ; mm0=tmp2 pfadd mm6, mm5 ; mm6=tmp0 pfadd mm7, mm1 ; mm7=tmp1 movq MMWORD [wk(1)], mm4 ; tmp3 movq MMWORD [wk(0)], mm0 ; tmp2 ; -- Odd part movd mm2, dword [DWBLOCK(1,0,esi,SIZEOF_JCOEF)] movd mm3, dword [DWBLOCK(3,0,esi,SIZEOF_JCOEF)] movd mm5, dword [DWBLOCK(5,0,esi,SIZEOF_JCOEF)] movd mm1, dword [DWBLOCK(7,0,esi,SIZEOF_JCOEF)] punpcklwd mm2, mm2 punpcklwd mm3, mm3 psrad mm2, (DWORD_BIT-WORD_BIT) psrad mm3, (DWORD_BIT-WORD_BIT) pi2fd mm2, mm2 pi2fd mm3, mm3 pfmul mm2, MMWORD [MMBLOCK(1,0,edx,SIZEOF_FLOAT_MULT_TYPE)] pfmul mm3, MMWORD [MMBLOCK(3,0,edx,SIZEOF_FLOAT_MULT_TYPE)] punpcklwd mm5, mm5 punpcklwd mm1, mm1 psrad mm5, (DWORD_BIT-WORD_BIT) psrad mm1, (DWORD_BIT-WORD_BIT) pi2fd mm5, mm5 pi2fd mm1, mm1 pfmul mm5, MMWORD [MMBLOCK(5,0,edx,SIZEOF_FLOAT_MULT_TYPE)] pfmul mm1, MMWORD [MMBLOCK(7,0,edx,SIZEOF_FLOAT_MULT_TYPE)] movq mm4, mm2 movq mm0, mm5 pfadd mm2, mm1 ; mm2=z11 pfadd mm5, mm3 ; mm5=z13 pfsub mm4, mm1 ; mm4=z12 pfsub mm0, mm3 ; mm0=z10 movq mm1, mm2 pfsub mm2, mm5 pfadd mm1, mm5 ; mm1=tmp7 pfmul mm2, [GOTOFF(ebx,PD_1_414)] ; mm2=tmp11 movq mm3, mm0 pfadd mm0, mm4 pfmul mm0, [GOTOFF(ebx,PD_1_847)] ; mm0=z5 pfmul mm3, [GOTOFF(ebx,PD_2_613)] ; mm3=(z10 * 2.613125930) pfmul mm4, [GOTOFF(ebx,PD_1_082)] ; mm4=(z12 * 1.082392200) pfsubr mm3, mm0 ; mm3=tmp12 pfsub mm4, mm0 ; mm4=tmp10 ; -- Final output stage pfsub mm3, mm1 ; mm3=tmp6 movq mm5, mm6 movq mm0, mm7 pfadd mm6, mm1 ; mm6=data0=(00 01) pfadd mm7, mm3 ; mm7=data1=(10 11) pfsub mm5, mm1 ; mm5=data7=(70 71) pfsub mm0, mm3 ; mm0=data6=(60 61) pfsub mm2, mm3 ; mm2=tmp5 movq mm1, mm6 ; transpose coefficients punpckldq mm6, mm7 ; mm6=(00 10) punpckhdq mm1, mm7 ; mm1=(01 11) movq mm3, mm0 ; transpose coefficients punpckldq mm0, mm5 ; mm0=(60 70) punpckhdq mm3, mm5 ; mm3=(61 71) movq MMWORD [MMBLOCK(0,0,edi,SIZEOF_FAST_FLOAT)], mm6 movq MMWORD [MMBLOCK(1,0,edi,SIZEOF_FAST_FLOAT)], mm1 movq MMWORD [MMBLOCK(0,3,edi,SIZEOF_FAST_FLOAT)], mm0 movq MMWORD [MMBLOCK(1,3,edi,SIZEOF_FAST_FLOAT)], mm3 movq mm7, MMWORD [wk(0)] ; mm7=tmp2 movq mm5, MMWORD [wk(1)] ; mm5=tmp3 pfadd mm4, mm2 ; mm4=tmp4 movq mm6, mm7 movq mm1, mm5 pfadd mm7, mm2 ; mm7=data2=(20 21) pfadd mm5, mm4 ; mm5=data4=(40 41) pfsub mm6, mm2 ; mm6=data5=(50 51) pfsub mm1, mm4 ; mm1=data3=(30 31) movq mm0, mm7 ; transpose coefficients punpckldq mm7, mm1 ; mm7=(20 30) punpckhdq mm0, mm1 ; mm0=(21 31) movq mm3, mm5 ; transpose coefficients punpckldq mm5, mm6 ; mm5=(40 50) punpckhdq mm3, mm6 ; mm3=(41 51) movq MMWORD [MMBLOCK(0,1,edi,SIZEOF_FAST_FLOAT)], mm7 movq MMWORD [MMBLOCK(1,1,edi,SIZEOF_FAST_FLOAT)], mm0 movq MMWORD [MMBLOCK(0,2,edi,SIZEOF_FAST_FLOAT)], mm5 movq MMWORD [MMBLOCK(1,2,edi,SIZEOF_FAST_FLOAT)], mm3 .nextcolumn: add esi, byte 2*SIZEOF_JCOEF ; coef_block add edx, byte 2*SIZEOF_FLOAT_MULT_TYPE ; quantptr add edi, byte 2*DCTSIZE*SIZEOF_FAST_FLOAT ; wsptr dec ecx ; ctr jnz near .columnloop ; -- Prefetch the next coefficient block prefetch [esi + (DCTSIZE2-8)*SIZEOF_JCOEF + 0*32] prefetch [esi + (DCTSIZE2-8)*SIZEOF_JCOEF + 1*32] prefetch [esi + (DCTSIZE2-8)*SIZEOF_JCOEF + 2*32] prefetch [esi + (DCTSIZE2-8)*SIZEOF_JCOEF + 3*32] ; ---- Pass 2: process rows from work array, store into output array. mov eax, [original_ebp] lea esi, [workspace] ; FAST_FLOAT *wsptr mov edi, JSAMPARRAY [output_buf(eax)] ; (JSAMPROW *) mov eax, JDIMENSION [output_col(eax)] mov ecx, DCTSIZE/2 ; ctr alignx 16, 7 .rowloop: ; -- Even part movq mm0, MMWORD [MMBLOCK(0,0,esi,SIZEOF_FAST_FLOAT)] movq mm1, MMWORD [MMBLOCK(2,0,esi,SIZEOF_FAST_FLOAT)] movq mm2, MMWORD [MMBLOCK(4,0,esi,SIZEOF_FAST_FLOAT)] movq mm3, MMWORD [MMBLOCK(6,0,esi,SIZEOF_FAST_FLOAT)] movq mm4, mm0 movq mm5, mm1 pfsub mm0, mm2 ; mm0=tmp11 pfsub mm1, mm3 pfadd mm4, mm2 ; mm4=tmp10 pfadd mm5, mm3 ; mm5=tmp13 pfmul mm1, [GOTOFF(ebx,PD_1_414)] pfsub mm1, mm5 ; mm1=tmp12 movq mm6, mm4 movq mm7, mm0 pfsub mm4, mm5 ; mm4=tmp3 pfsub mm0, mm1 ; mm0=tmp2 pfadd mm6, mm5 ; mm6=tmp0 pfadd mm7, mm1 ; mm7=tmp1 movq MMWORD [wk(1)], mm4 ; tmp3 movq MMWORD [wk(0)], mm0 ; tmp2 ; -- Odd part movq mm2, MMWORD [MMBLOCK(1,0,esi,SIZEOF_FAST_FLOAT)] movq mm3, MMWORD [MMBLOCK(3,0,esi,SIZEOF_FAST_FLOAT)] movq mm5, MMWORD [MMBLOCK(5,0,esi,SIZEOF_FAST_FLOAT)] movq mm1, MMWORD [MMBLOCK(7,0,esi,SIZEOF_FAST_FLOAT)] movq mm4, mm2 movq mm0, mm5 pfadd mm2, mm1 ; mm2=z11 pfadd mm5, mm3 ; mm5=z13 pfsub mm4, mm1 ; mm4=z12 pfsub mm0, mm3 ; mm0=z10 movq mm1, mm2 pfsub mm2, mm5 pfadd mm1, mm5 ; mm1=tmp7 pfmul mm2, [GOTOFF(ebx,PD_1_414)] ; mm2=tmp11 movq mm3, mm0 pfadd mm0, mm4 pfmul mm0, [GOTOFF(ebx,PD_1_847)] ; mm0=z5 pfmul mm3, [GOTOFF(ebx,PD_2_613)] ; mm3=(z10 * 2.613125930) pfmul mm4, [GOTOFF(ebx,PD_1_082)] ; mm4=(z12 * 1.082392200) pfsubr mm3, mm0 ; mm3=tmp12 pfsub mm4, mm0 ; mm4=tmp10 ; -- Final output stage pfsub mm3, mm1 ; mm3=tmp6 movq mm5, mm6 movq mm0, mm7 pfadd mm6, mm1 ; mm6=data0=(00 10) pfadd mm7, mm3 ; mm7=data1=(01 11) pfsub mm5, mm1 ; mm5=data7=(07 17) pfsub mm0, mm3 ; mm0=data6=(06 16) pfsub mm2, mm3 ; mm2=tmp5 movq mm1, [GOTOFF(ebx,PD_RNDINT_MAGIC)] ; mm1=[PD_RNDINT_MAGIC] pcmpeqd mm3, mm3 psrld mm3, WORD_BIT ; mm3={0xFFFF 0x0000 0xFFFF 0x0000} pfadd mm6, mm1 ; mm6=roundint(data0/8)=(00 ** 10 **) pfadd mm7, mm1 ; mm7=roundint(data1/8)=(01 ** 11 **) pfadd mm0, mm1 ; mm0=roundint(data6/8)=(06 ** 16 **) pfadd mm5, mm1 ; mm5=roundint(data7/8)=(07 ** 17 **) pand mm6, mm3 ; mm6=(00 -- 10 --) pslld mm7, WORD_BIT ; mm7=(-- 01 -- 11) pand mm0, mm3 ; mm0=(06 -- 16 --) pslld mm5, WORD_BIT ; mm5=(-- 07 -- 17) por mm6, mm7 ; mm6=(00 01 10 11) por mm0, mm5 ; mm0=(06 07 16 17) movq mm1, MMWORD [wk(0)] ; mm1=tmp2 movq mm3, MMWORD [wk(1)] ; mm3=tmp3 pfadd mm4, mm2 ; mm4=tmp4 movq mm7, mm1 movq mm5, mm3 pfadd mm1, mm2 ; mm1=data2=(02 12) pfadd mm3, mm4 ; mm3=data4=(04 14) pfsub mm7, mm2 ; mm7=data5=(05 15) pfsub mm5, mm4 ; mm5=data3=(03 13) movq mm2, [GOTOFF(ebx,PD_RNDINT_MAGIC)] ; mm2=[PD_RNDINT_MAGIC] pcmpeqd mm4, mm4 psrld mm4, WORD_BIT ; mm4={0xFFFF 0x0000 0xFFFF 0x0000} pfadd mm3, mm2 ; mm3=roundint(data4/8)=(04 ** 14 **) pfadd mm7, mm2 ; mm7=roundint(data5/8)=(05 ** 15 **) pfadd mm1, mm2 ; mm1=roundint(data2/8)=(02 ** 12 **) pfadd mm5, mm2 ; mm5=roundint(data3/8)=(03 ** 13 **) pand mm3, mm4 ; mm3=(04 -- 14 --) pslld mm7, WORD_BIT ; mm7=(-- 05 -- 15) pand mm1, mm4 ; mm1=(02 -- 12 --) pslld mm5, WORD_BIT ; mm5=(-- 03 -- 13) por mm3, mm7 ; mm3=(04 05 14 15) por mm1, mm5 ; mm1=(02 03 12 13) movq mm2, [GOTOFF(ebx,PB_CENTERJSAMP)] ; mm2=[PB_CENTERJSAMP] packsswb mm6, mm3 ; mm6=(00 01 10 11 04 05 14 15) packsswb mm1, mm0 ; mm1=(02 03 12 13 06 07 16 17) paddb mm6, mm2 paddb mm1, mm2 movq mm4, mm6 ; transpose coefficients(phase 2) punpcklwd mm6, mm1 ; mm6=(00 01 02 03 10 11 12 13) punpckhwd mm4, mm1 ; mm4=(04 05 06 07 14 15 16 17) movq mm7, mm6 ; transpose coefficients(phase 3) punpckldq mm6, mm4 ; mm6=(00 01 02 03 04 05 06 07) punpckhdq mm7, mm4 ; mm7=(10 11 12 13 14 15 16 17) pushpic ebx ; save GOT address mov edx, JSAMPROW [edi+0*SIZEOF_JSAMPROW] mov ebx, JSAMPROW [edi+1*SIZEOF_JSAMPROW] movq MMWORD [edx+eax*SIZEOF_JSAMPLE], mm6 movq MMWORD [ebx+eax*SIZEOF_JSAMPLE], mm7 poppic ebx ; restore GOT address add esi, byte 2*SIZEOF_FAST_FLOAT ; wsptr add edi, byte 2*SIZEOF_JSAMPROW dec ecx ; ctr jnz near .rowloop femms ; empty MMX/3DNow! state pop edi pop esi ; pop edx ; need not be preserved ; pop ecx ; need not be preserved pop ebx mov esp, ebp ; esp <- aligned ebp pop esp ; esp <- original ebp pop ebp ret ; For some reason, the OS X linker does not honor the request to align the ; segment unless we do this. align 32
38.962389
78
0.507183
a7ec8e13add08de03fc0f477889c6cdbec4bb9f2
643
asm
Assembly
oeis/137/A137229.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/137/A137229.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/137/A137229.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A137229: Expansion of g.f. x/((1-x)*(1-3*x+2*x^2-x^3)). ; 1,4,11,27,64,150,350,815,1896,4409,10251,23832,55404,128800,299425,696080,1618191,3761839,8745216,20330162,47261894,109870575,255418100,593775045,1380359511,3208946544,7459895656,17342153392,40315615409,93722435100,217878227875,506505428835,1177482265856,2737314167774,6363483400446,14793304131647,34390259761824,79947654422625,185855747875875,432062194544200,1004422742303476,2334999585697904,5428215467030961,12619069972000552,29335778567637639,68197411225942775,158539746514553600 mov $1,1 lpb $0 sub $0,1 add $2,1 add $3,$1 add $1,$2 add $2,$3 lpe add $1,$2 mov $0,$1
45.928571
485
0.800933
3edeb6e69ba4e37eaaaf68c871d563eecb57a93c
476
asm
Assembly
programs/oeis/135/A135022.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/135/A135022.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/135/A135022.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A135022: Define a sequence of binary words by w(1)=10 and w(n+1)=w(n)w(n)Reverse[w(n)]. Sequence gives the limiting word w(infinity). ; 1,0,1,0,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,0,1,0,1,1,0,1,0,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1 mov $1,$0 div $1,2 seq $1,253887 ; Row index of n in A191450: a(3n) = 2n, a(3n+1) = 2n+1, a(3n+2) = a(n+1). add $1,$0 mov $0,$1 mod $0,2
47.6
201
0.569328
f4bd7ee16844b836d4b75e44beb57c9f7729128d
128,162
asm
Assembly
test/s/pong/PongL.asm
rolf0504/c2verilog
835f8453841c9090b7431354bf97f07b4ff92c1f
[ "MIT" ]
252
2018-11-09T07:48:20.000Z
2022-03-08T04:33:29.000Z
test/s/pong/PongL.asm
rolf0504/c2verilog
835f8453841c9090b7431354bf97f07b4ff92c1f
[ "MIT" ]
4
2021-12-26T01:58:56.000Z
2022-01-09T04:11:49.000Z
test/s/pong/PongL.asm
rolf0504/c2verilog
835f8453841c9090b7431354bf97f07b4ff92c1f
[ "MIT" ]
95
2019-01-11T03:32:43.000Z
2022-03-19T08:28:18.000Z
// This file is part of www.nand2tetris.org // and the book "The Elements of Computing Systems" // by Nisan and Schocken, MIT Press. // File name: projects/06/pong/PongL.asm // Symbol-less version of the Pong.asm program. @256 D=A @0 M=D @133 0;JMP @15 M=D @0 AM=M-1 D=M A=A-1 D=M-D M=0 @19 D;JNE @0 A=M-1 M=-1 @15 A=M 0;JMP @15 M=D @0 AM=M-1 D=M A=A-1 D=M-D M=0 @35 D;JLE @0 A=M-1 M=-1 @15 A=M 0;JMP @15 M=D @0 AM=M-1 D=M A=A-1 D=M-D M=0 @51 D;JGE @0 A=M-1 M=-1 @15 A=M 0;JMP @5 D=A @1 A=M-D D=M @13 M=D @0 AM=M-1 D=M @2 A=M M=D D=A @0 M=D+1 @1 D=M @14 AM=D-1 D=M @4 M=D @14 AM=M-1 D=M @3 M=D @14 AM=M-1 D=M @2 M=D @14 AM=M-1 D=M @1 M=D @13 A=M 0;JMP @0 A=M M=D @1 D=M @0 AM=M+1 M=D @2 D=M @0 AM=M+1 M=D @3 D=M @0 AM=M+1 M=D @4 D=M @0 AM=M+1 M=D @4 D=A @13 D=D+M @0 D=M-D @2 M=D @0 MD=M+1 @1 M=D @14 A=M 0;JMP @0 D=A @13 M=D @27058 D=A @14 M=D @145 D=A @95 0;JMP @15 D=A @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @8643 D=A @14 M=D @163 D=A @95 0;JMP @0 AM=M-1 D=M @3 M=D @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @3 A=M M=D @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @3 A=M+1 M=D @2 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @3 D=M @10 D=D+A @13 M=D @0 AM=M-1 D=M @13 A=M M=D @2 D=M @3 A=D+A D=M @0 AM=M+1 A=A-1 M=D @6 D=A @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=M-D @3 D=M @11 D=D+A @13 M=D @0 AM=M-1 D=M @13 A=M M=D @2 D=M @4 A=D+A D=M @0 AM=M+1 A=A-1 M=D @3 D=M @12 D=D+A @13 M=D @0 AM=M-1 D=M @13 A=M M=D @2 D=M @5 A=D+A D=M @0 AM=M+1 A=A-1 M=D @6 D=A @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=M-D @3 D=M @13 D=D+A @13 M=D @0 AM=M-1 D=M @13 A=M M=D @0 M=M+1 A=M-1 M=0 @3 D=M @14 D=D+A @13 M=D @0 AM=M-1 D=M @13 A=M M=D @3 D=M @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @387 D=A @14 M=D @333 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @3 D=M @0 AM=M+1 A=A-1 M=D @54 0;JMP @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @3 M=D @3 D=M @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @9357 D=A @14 M=D @376 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @0 M=M+1 A=M-1 M=0 @54 0;JMP @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @3 M=D @0 M=M+1 A=M-1 M=0 @0 A=M-1 M=!M @1 D=A @13 M=D @20889 D=A @14 M=D @418 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @3 D=M @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @514 D=A @14 M=D @441 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @0 M=M+1 A=M-1 M=0 @54 0;JMP @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @3 M=D @0 M=M+1 A=M-1 M=0 @1 D=A @13 M=D @20889 D=A @14 M=D @480 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @3 D=M @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @514 D=A @14 M=D @503 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @0 M=M+1 A=M-1 M=0 @54 0;JMP @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @3 M=D @3 A=M D=M @0 AM=M+1 A=A-1 M=D @3 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @3 A=M D=M @0 AM=M+1 A=A-1 M=D @5 D=A @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @3 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @5 D=A @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @4 D=A @13 M=D @22354 D=A @14 M=D @588 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @0 M=M+1 A=M-1 M=0 @54 0;JMP @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @3 M=D @3 A=M D=M @0 AM=M+1 A=A-1 M=D @54 0;JMP @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @3 M=D @3 A=M D=M @0 AM=M+1 A=A-1 M=D @5 D=A @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @54 0;JMP @3 D=A D=D-1 @0 AM=M+1 A=A-1 M=0 @654 D;JGT @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @3 M=D @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @3 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=M-D @0 AM=M-1 D=M @3 A=M+1 A=A+1 M=D @2 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @3 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=M-D @0 AM=M-1 D=M @3 A=M+1 A=A+1 A=A+1 M=D @3 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @6774 D=A @14 M=D @747 D=A @95 0;JMP @0 AM=M-1 D=M @1 A=M M=D @3 D=M @3 A=D+A D=M @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @6774 D=A @14 M=D @774 D=A @95 0;JMP @0 AM=M-1 D=M @1 A=M+1 M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @1 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @798 D=A @38 0;JMP @3 D=M @7 D=D+A @13 M=D @0 AM=M-1 D=M @13 A=M M=D @3 D=M @7 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @826 D;JNE @930 0;JMP @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @1 A=M+1 A=A+1 M=D @1 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @1 A=M M=D @1 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @1 A=M+1 M=D @3 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @2 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @886 D=A @38 0;JMP @3 D=M @8 D=D+A @13 M=D @0 AM=M-1 D=M @13 A=M M=D @3 A=M D=M @0 AM=M+1 A=A-1 M=D @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @916 D=A @38 0;JMP @3 D=M @9 D=D+A @13 M=D @0 AM=M-1 D=M @13 A=M M=D @991 0;JMP @3 A=M D=M @0 AM=M+1 A=A-1 M=D @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @948 D=A @38 0;JMP @3 D=M @8 D=D+A @13 M=D @0 AM=M-1 D=M @13 A=M M=D @3 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @2 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @979 D=A @38 0;JMP @3 D=M @9 D=D+A @13 M=D @0 AM=M-1 D=M @13 A=M M=D @2 D=A @0 AM=M+1 A=A-1 M=D @1 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @6822 D=A @14 M=D @1016 D=A @95 0;JMP @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=M-D @0 AM=M-1 D=M @3 A=M+1 A=A+1 A=A+1 A=A+1 M=D @2 D=A @0 AM=M+1 A=A-1 M=D @1 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @6822 D=A @14 M=D @1062 D=A @95 0;JMP @0 AM=M-1 D=M @3 A=M+1 A=A+1 A=A+1 A=A+1 A=A+1 M=D @2 D=A @0 AM=M+1 A=A-1 M=D @1 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=M-D @2 D=A @13 M=D @6822 D=A @14 M=D @1109 D=A @95 0;JMP @0 AM=M-1 D=M @3 A=M+1 A=A+1 A=A+1 A=A+1 A=A+1 A=A+1 M=D @0 M=M+1 A=M-1 M=0 @54 0;JMP @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @3 M=D @3 D=M @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @452 D=A @14 M=D @1156 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @3 D=M @4 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @1178 D=A @38 0;JMP @0 AM=M-1 D=M @1185 D;JNE @1219 0;JMP @3 D=M @4 A=D+A D=M @0 AM=M+1 A=A-1 M=D @3 D=M @5 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @3 A=M+1 A=A+1 A=A+1 A=A+1 M=D @1401 0;JMP @3 D=M @4 A=D+A D=M @0 AM=M+1 A=A-1 M=D @3 D=M @6 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @3 A=M+1 A=A+1 A=A+1 A=A+1 M=D @3 D=M @9 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @1267 D;JNE @1335 0;JMP @3 D=M @7 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @1283 D;JNE @1309 0;JMP @3 A=M D=M @0 AM=M+1 A=A-1 M=D @4 D=A @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @3 A=M M=D @1333 0;JMP @3 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @4 D=A @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @3 A=M+1 M=D @1401 0;JMP @3 D=M @7 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @1351 D;JNE @1377 0;JMP @3 A=M D=M @0 AM=M+1 A=A-1 M=D @4 D=A @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=M-D @0 AM=M-1 D=M @3 A=M M=D @1401 0;JMP @3 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @4 D=A @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=M-D @0 AM=M-1 D=M @3 A=M+1 M=D @3 D=M @8 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @1417 D;JNE @1485 0;JMP @3 D=M @7 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @1433 D;JNE @1459 0;JMP @3 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @4 D=A @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @3 A=M+1 M=D @1483 0;JMP @3 A=M D=M @0 AM=M+1 A=A-1 M=D @4 D=A @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @3 A=M M=D @1551 0;JMP @3 D=M @7 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @1501 D;JNE @1527 0;JMP @3 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @4 D=A @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=M-D @0 AM=M-1 D=M @3 A=M+1 M=D @1551 0;JMP @3 A=M D=M @0 AM=M+1 A=A-1 M=D @4 D=A @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=M-D @0 AM=M-1 D=M @3 A=M M=D @3 A=M D=M @0 AM=M+1 A=A-1 M=D @3 D=M @10 A=D+A D=M @0 AM=M+1 A=A-1 M=D @1571 D=A @22 0;JMP @0 A=M-1 M=!M @0 AM=M-1 D=M @1581 D;JNE @1612 0;JMP @0 M=M+1 A=M-1 M=1 @3 D=M @14 D=D+A @13 M=D @0 AM=M-1 D=M @13 A=M M=D @3 D=M @10 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @3 A=M M=D @3 A=M D=M @0 AM=M+1 A=A-1 M=D @3 D=M @11 A=D+A D=M @0 AM=M+1 A=A-1 M=D @1632 D=A @38 0;JMP @0 A=M-1 M=!M @0 AM=M-1 D=M @1642 D;JNE @1675 0;JMP @2 D=A @0 AM=M+1 A=A-1 M=D @3 D=M @14 D=D+A @13 M=D @0 AM=M-1 D=M @13 A=M M=D @3 D=M @11 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @3 A=M M=D @3 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @3 D=M @12 A=D+A D=M @0 AM=M+1 A=A-1 M=D @1695 D=A @22 0;JMP @0 A=M-1 M=!M @0 AM=M-1 D=M @1705 D;JNE @1738 0;JMP @3 D=A @0 AM=M+1 A=A-1 M=D @3 D=M @14 D=D+A @13 M=D @0 AM=M-1 D=M @13 A=M M=D @3 D=M @12 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @3 A=M+1 M=D @3 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @3 D=M @13 A=D+A D=M @0 AM=M+1 A=A-1 M=D @1758 D=A @38 0;JMP @0 A=M-1 M=!M @0 AM=M-1 D=M @1768 D;JNE @1801 0;JMP @4 D=A @0 AM=M+1 A=A-1 M=D @3 D=M @14 D=D+A @13 M=D @0 AM=M-1 D=M @13 A=M M=D @3 D=M @13 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @3 A=M+1 M=D @3 D=M @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @387 D=A @14 M=D @1819 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @3 D=M @14 A=D+A D=M @0 AM=M+1 A=A-1 M=D @54 0;JMP @5 D=A D=D-1 @0 AM=M+1 A=A-1 M=0 @1837 D;JGT @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @3 M=D @3 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @10 D=A @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @7287 D=A @14 M=D @1882 D=A @95 0;JMP @0 AM=M-1 D=M @1 A=M+1 A=A+1 M=D @3 D=M @3 A=D+A D=M @0 AM=M+1 A=A-1 M=D @10 D=A @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @7287 D=A @14 M=D @1916 D=A @95 0;JMP @0 AM=M-1 D=M @1 A=M+1 A=A+1 A=A+1 M=D @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @1939 D=A @6 0;JMP @0 AM=M-1 D=M @1946 D;JNE @1963 0;JMP @10 D=A @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @1 A=M+1 A=A+1 A=A+1 A=A+1 M=D @2086 0;JMP @3 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @1979 D=A @38 0;JMP @0 A=M-1 M=!M @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=1 @1997 D=A @6 0;JMP @0 AM=M-1 D=M A=A-1 M=D&M @3 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @2018 D=A @38 0;JMP @0 AM=M-1 D=M A=A-1 M=D|M @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=1 @0 A=M-1 D=!M M=D+1 @2042 D=A @6 0;JMP @0 AM=M-1 D=M A=A-1 M=D&M @0 AM=M-1 D=M @2054 D;JNE @2071 0;JMP @20 D=A @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @1 A=M+1 A=A+1 A=A+1 A=A+1 M=D @2086 0;JMP @5 D=A @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @1 A=M+1 A=A+1 A=A+1 A=A+1 M=D @3 D=M @14 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=1 @2103 D=A @6 0;JMP @0 AM=M-1 D=M @2110 D;JNE @2227 0;JMP @506 D=A @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @1 A=M M=D @1 D=M @3 A=D+A D=M @0 AM=M+1 A=A-1 M=D @50 D=A @0 AM=M+1 A=A-1 M=D @0 A=M-1 D=!M M=D+1 @2 D=A @13 M=D @6822 D=A @14 M=D @2153 D=A @95 0;JMP @1 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @7287 D=A @14 M=D @2173 D=A @95 0;JMP @0 AM=M-1 D=M @1 A=M+1 M=D @3 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @1 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @1 D=M @4 A=D+A D=M @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @6822 D=A @14 M=D @2214 D=A @95 0;JMP @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @1 A=M+1 M=D @2616 0;JMP @3 D=M @14 A=D+A D=M @0 AM=M+1 A=A-1 M=D @2 D=A @0 AM=M+1 A=A-1 M=D @2246 D=A @6 0;JMP @0 AM=M-1 D=M @2253 D;JNE @2364 0;JMP @0 M=M+1 A=M-1 M=0 @0 AM=M-1 D=M @1 A=M M=D @1 D=M @3 A=D+A D=M @0 AM=M+1 A=A-1 M=D @50 D=A @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @6822 D=A @14 M=D @2290 D=A @95 0;JMP @1 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @7287 D=A @14 M=D @2310 D=A @95 0;JMP @0 AM=M-1 D=M @1 A=M+1 M=D @3 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @1 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @1 D=M @4 A=D+A D=M @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @6822 D=A @14 M=D @2351 D=A @95 0;JMP @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @1 A=M+1 M=D @2616 0;JMP @3 D=M @14 A=D+A D=M @0 AM=M+1 A=A-1 M=D @3 D=A @0 AM=M+1 A=A-1 M=D @2383 D=A @6 0;JMP @0 AM=M-1 D=M @2390 D;JNE @2507 0;JMP @250 D=A @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @1 A=M+1 M=D @1 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @25 D=A @0 AM=M+1 A=A-1 M=D @0 A=M-1 D=!M M=D+1 @2 D=A @13 M=D @6822 D=A @14 M=D @2432 D=A @95 0;JMP @1 D=M @3 A=D+A D=M @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @7287 D=A @14 M=D @2453 D=A @95 0;JMP @0 AM=M-1 D=M @1 A=M M=D @3 A=M D=M @0 AM=M+1 A=A-1 M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @1 D=M @4 A=D+A D=M @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @6822 D=A @14 M=D @2494 D=A @95 0;JMP @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @1 A=M M=D @2616 0;JMP @0 M=M+1 A=M-1 M=0 @0 AM=M-1 D=M @1 A=M+1 M=D @1 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @25 D=A @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @6822 D=A @14 M=D @2543 D=A @95 0;JMP @1 D=M @3 A=D+A D=M @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @7287 D=A @14 M=D @2564 D=A @95 0;JMP @0 AM=M-1 D=M @1 A=M M=D @3 A=M D=M @0 AM=M+1 A=A-1 M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @1 D=M @4 A=D+A D=M @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @6822 D=A @14 M=D @2605 D=A @95 0;JMP @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @1 A=M M=D @3 D=M @0 AM=M+1 A=A-1 M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @1 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @3 D=A @13 M=D @652 D=A @14 M=D @2648 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @0 M=M+1 A=M-1 M=0 @54 0;JMP @5 D=A @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @8643 D=A @14 M=D @2677 D=A @95 0;JMP @0 AM=M-1 D=M @3 M=D @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @3 A=M M=D @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @3 A=M+1 M=D @2 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @3 A=M+1 A=A+1 M=D @2 D=M @3 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @3 A=M+1 A=A+1 A=A+1 M=D @2 D=A @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @3 A=M+1 A=A+1 A=A+1 A=A+1 M=D @3 D=M @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @2827 D=A @14 M=D @2773 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @3 D=M @0 AM=M+1 A=A-1 M=D @54 0;JMP @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @3 M=D @3 D=M @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @9357 D=A @14 M=D @2816 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @0 M=M+1 A=M-1 M=0 @54 0;JMP @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @3 M=D @0 M=M+1 A=M-1 M=0 @0 A=M-1 M=!M @1 D=A @13 M=D @20889 D=A @14 M=D @2858 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @3 D=M @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @2954 D=A @14 M=D @2881 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @0 M=M+1 A=M-1 M=0 @54 0;JMP @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @3 M=D @0 M=M+1 A=M-1 M=0 @1 D=A @13 M=D @20889 D=A @14 M=D @2920 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @3 D=M @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @2954 D=A @14 M=D @2943 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @0 M=M+1 A=M-1 M=0 @54 0;JMP @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @3 M=D @3 A=M D=M @0 AM=M+1 A=A-1 M=D @3 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @3 A=M D=M @0 AM=M+1 A=A-1 M=D @3 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @3 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @3 D=M @3 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @4 D=A @13 M=D @22354 D=A @14 M=D @3033 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @0 M=M+1 A=M-1 M=0 @54 0;JMP @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @3 M=D @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @3 A=M+1 A=A+1 A=A+1 A=A+1 M=D @0 M=M+1 A=M-1 M=0 @54 0;JMP @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @3 M=D @3 A=M D=M @0 AM=M+1 A=A-1 M=D @54 0;JMP @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @3 M=D @3 A=M D=M @0 AM=M+1 A=A-1 M=D @3 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @54 0;JMP @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @3 M=D @3 D=M @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @2892 D=A @14 M=D @3163 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @3 A=M+1 A=A+1 M=D @3 D=M @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @2827 D=A @14 M=D @3200 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @0 M=M+1 A=M-1 M=0 @54 0;JMP @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @3 M=D @3 D=M @4 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=1 @3240 D=A @6 0;JMP @0 AM=M-1 D=M @3247 D;JNE @3525 0;JMP @3 A=M D=M @0 AM=M+1 A=A-1 M=D @4 D=A @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=M-D @0 AM=M-1 D=M @3 A=M M=D @3 A=M D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @3286 D=A @38 0;JMP @0 AM=M-1 D=M @3293 D;JNE @3303 0;JMP @0 M=M+1 A=M-1 M=0 @0 AM=M-1 D=M @3 A=M M=D @0 M=M+1 A=M-1 M=0 @1 D=A @13 M=D @20889 D=A @14 M=D @3319 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @3 A=M D=M @0 AM=M+1 A=A-1 M=D @3 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 M=M+1 A=M-1 M=1 @0 AM=M-1 D=M A=A-1 M=D+M @3 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @3 A=M D=M @0 AM=M+1 A=A-1 M=D @3 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @4 D=A @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @3 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @3 D=M @3 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @4 D=A @13 M=D @22354 D=A @14 M=D @3424 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @0 M=M+1 A=M-1 M=0 @0 A=M-1 M=!M @1 D=A @13 M=D @20889 D=A @14 M=D @3448 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @3 A=M D=M @0 AM=M+1 A=A-1 M=D @3 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @3 A=M D=M @0 AM=M+1 A=A-1 M=D @3 D=A @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @3 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @3 D=M @3 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @4 D=A @13 M=D @22354 D=A @14 M=D @3518 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @3831 0;JMP @3 A=M D=M @0 AM=M+1 A=A-1 M=D @4 D=A @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @3 A=M M=D @3 A=M D=M @0 AM=M+1 A=A-1 M=D @3 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @511 D=A @0 AM=M+1 A=A-1 M=D @3579 D=A @22 0;JMP @0 AM=M-1 D=M @3586 D;JNE @3611 0;JMP @511 D=A @0 AM=M+1 A=A-1 M=D @3 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=M-D @0 AM=M-1 D=M @3 A=M M=D @0 M=M+1 A=M-1 M=0 @1 D=A @13 M=D @20889 D=A @14 M=D @3627 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @3 A=M D=M @0 AM=M+1 A=A-1 M=D @4 D=A @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=M-D @3 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @3 A=M D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=1 @0 AM=M-1 D=M A=A-1 M=M-D @3 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @3 D=M @3 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @4 D=A @13 M=D @22354 D=A @14 M=D @3706 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @0 M=M+1 A=M-1 M=0 @0 A=M-1 M=!M @1 D=A @13 M=D @20889 D=A @14 M=D @3730 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @3 A=M D=M @0 AM=M+1 A=A-1 M=D @3 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @3 D=A @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=M-D @3 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @3 A=M D=M @0 AM=M+1 A=A-1 M=D @3 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @3 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @3 D=M @3 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @4 D=A @13 M=D @22354 D=A @14 M=D @3826 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @0 M=M+1 A=M-1 M=0 @54 0;JMP @0 AM=M+1 A=A-1 M=0 @0 D=A @13 M=D @4508 D=A @14 M=D @3853 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @0 D=A @13 M=D @4531 D=A @14 M=D @3870 D=A @95 0;JMP @0 AM=M-1 D=M @1 A=M M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @4539 D=A @14 M=D @3895 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @4419 D=A @14 M=D @3919 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @0 M=M+1 A=M-1 M=0 @54 0;JMP @7 D=A @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @8643 D=A @14 M=D @3948 D=A @95 0;JMP @0 AM=M-1 D=M @3 M=D @0 D=A @13 M=D @20598 D=A @14 M=D @3965 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @50 D=A @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @3 A=M+1 A=A+1 A=A+1 A=A+1 A=A+1 A=A+1 M=D @230 D=A @0 AM=M+1 A=A-1 M=D @229 D=A @0 AM=M+1 A=A-1 M=D @3 D=M @6 A=D+A D=M @0 AM=M+1 A=A-1 M=D @7 D=A @0 AM=M+1 A=A-1 M=D @4 D=A @13 M=D @2659 D=A @14 M=D @4026 D=A @95 0;JMP @0 AM=M-1 D=M @3 A=M M=D @253 D=A @0 AM=M+1 A=A-1 M=D @222 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @511 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @229 D=A @0 AM=M+1 A=A-1 M=D @6 D=A @13 M=D @145 D=A @14 M=D @4076 D=A @95 0;JMP @0 AM=M-1 D=M @3 A=M+1 M=D @3 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @400 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @3 D=A @13 M=D @652 D=A @14 M=D @4111 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @0 M=M+1 A=M-1 M=0 @238 D=A @0 AM=M+1 A=A-1 M=D @511 D=A @0 AM=M+1 A=A-1 M=D @240 D=A @0 AM=M+1 A=A-1 M=D @4 D=A @13 M=D @22354 D=A @14 M=D @4150 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @22 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @2 D=A @13 M=D @19350 D=A @14 M=D @4177 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @8 D=A @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @25105 D=A @14 M=D @4200 D=A @95 0;JMP @83 D=A @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @25659 D=A @14 M=D @4218 D=A @95 0;JMP @99 D=A @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @25659 D=A @14 M=D @4236 D=A @95 0;JMP @111 D=A @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @25659 D=A @14 M=D @4254 D=A @95 0;JMP @114 D=A @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @25659 D=A @14 M=D @4272 D=A @95 0;JMP @101 D=A @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @25659 D=A @14 M=D @4290 D=A @95 0;JMP @58 D=A @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @25659 D=A @14 M=D @4308 D=A @95 0;JMP @32 D=A @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @25659 D=A @14 M=D @4326 D=A @95 0;JMP @48 D=A @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @25659 D=A @14 M=D @4344 D=A @95 0;JMP @1 D=A @13 M=D @19850 D=A @14 M=D @4356 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @0 M=M+1 A=M-1 M=0 @0 AM=M-1 D=M @3 A=M+1 A=A+1 A=A+1 M=D @0 M=M+1 A=M-1 M=0 @0 AM=M-1 D=M @3 A=M+1 A=A+1 A=A+1 A=A+1 M=D @0 M=M+1 A=M-1 M=0 @0 AM=M-1 D=M @3 A=M+1 A=A+1 M=D @0 M=M+1 A=M-1 M=0 @0 AM=M-1 D=M @3 A=M+1 A=A+1 A=A+1 A=A+1 A=A+1 M=D @3 D=M @0 AM=M+1 A=A-1 M=D @54 0;JMP @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @3 M=D @3 A=M D=M @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @2786 D=A @14 M=D @4450 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @3 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @346 D=A @14 M=D @4474 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @3 D=M @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @9357 D=A @14 M=D @4497 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @0 M=M+1 A=M-1 M=0 @54 0;JMP @0 D=A @13 M=D @3930 D=A @14 M=D @4520 D=A @95 0;JMP @0 AM=M-1 D=M @16 M=D @0 M=M+1 A=M-1 M=0 @54 0;JMP @16 D=M @0 AM=M+1 A=A-1 M=D @54 0;JMP @0 AM=M+1 A=A-1 M=0 @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @3 M=D @3 D=M @3 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 A=M-1 M=!M @0 A=M-1 M=!M @0 AM=M-1 D=M @4943 D;JNE @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @4590 D=A @6 0;JMP @3 D=M @3 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 A=M-1 M=!M @0 AM=M-1 D=M A=A-1 M=D&M @0 A=M-1 M=!M @0 AM=M-1 D=M @4682 D;JNE @0 D=A @13 M=D @5924 D=A @14 M=D @4627 D=A @95 0;JMP @0 AM=M-1 D=M @1 A=M M=D @3 A=M D=M @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @3211 D=A @14 M=D @4652 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @3 D=M @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @5191 D=A @14 M=D @4675 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @4575 0;JMP @1 A=M D=M @0 AM=M+1 A=A-1 M=D @130 D=A @0 AM=M+1 A=A-1 M=D @4699 D=A @6 0;JMP @0 AM=M-1 D=M @4706 D;JNE @4736 0;JMP @3 A=M D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=1 @2 D=A @13 M=D @3044 D=A @14 M=D @4729 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @4831 0;JMP @1 A=M D=M @0 AM=M+1 A=A-1 M=D @132 D=A @0 AM=M+1 A=A-1 M=D @4753 D=A @6 0;JMP @0 AM=M-1 D=M @4760 D;JNE @4792 0;JMP @3 A=M D=M @0 AM=M+1 A=A-1 M=D @2 D=A @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @3044 D=A @14 M=D @4785 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @4831 0;JMP @1 A=M D=M @0 AM=M+1 A=A-1 M=D @140 D=A @0 AM=M+1 A=A-1 M=D @4809 D=A @6 0;JMP @0 AM=M-1 D=M @4816 D;JNE @4831 0;JMP @0 M=M+1 A=M-1 M=0 @0 A=M-1 M=!M @0 AM=M-1 D=M @3 A=M+1 A=A+1 A=A+1 M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @4846 D=A @6 0;JMP @0 A=M-1 M=!M @3 D=M @3 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 A=M-1 M=!M @0 AM=M-1 D=M A=A-1 M=D&M @0 A=M-1 M=!M @0 AM=M-1 D=M @4941 D;JNE @0 D=A @13 M=D @5924 D=A @14 M=D @4886 D=A @95 0;JMP @0 AM=M-1 D=M @1 A=M M=D @3 A=M D=M @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @3211 D=A @14 M=D @4911 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @3 D=M @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @5191 D=A @14 M=D @4934 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @4831 0;JMP @4555 0;JMP @3 D=M @3 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @4959 D;JNE @5185 0;JMP @10 D=A @0 AM=M+1 A=A-1 M=D @27 D=A @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @19350 D=A @14 M=D @4983 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @9 D=A @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @25105 D=A @14 M=D @5006 D=A @95 0;JMP @71 D=A @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @25659 D=A @14 M=D @5024 D=A @95 0;JMP @97 D=A @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @25659 D=A @14 M=D @5042 D=A @95 0;JMP @109 D=A @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @25659 D=A @14 M=D @5060 D=A @95 0;JMP @101 D=A @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @25659 D=A @14 M=D @5078 D=A @95 0;JMP @32 D=A @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @25659 D=A @14 M=D @5096 D=A @95 0;JMP @79 D=A @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @25659 D=A @14 M=D @5114 D=A @95 0;JMP @118 D=A @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @25659 D=A @14 M=D @5132 D=A @95 0;JMP @101 D=A @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @25659 D=A @14 M=D @5150 D=A @95 0;JMP @114 D=A @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @25659 D=A @14 M=D @5168 D=A @95 0;JMP @1 D=A @13 M=D @19850 D=A @14 M=D @5180 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @0 M=M+1 A=M-1 M=0 @54 0;JMP @5 D=A D=D-1 @0 AM=M+1 A=A-1 M=0 @5193 D;JGT @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @3 M=D @3 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @1126 D=A @14 M=D @5231 D=A @95 0;JMP @0 AM=M-1 D=M @3 A=M+1 A=A+1 M=D @3 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @5254 D=A @22 0;JMP @3 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @3 D=M @5 A=D+A D=M @0 AM=M+1 A=A-1 M=D @5275 D=A @6 0;JMP @0 A=M-1 M=!M @0 AM=M-1 D=M A=A-1 M=D&M @0 AM=M-1 D=M @5290 D;JNE @5802 0;JMP @3 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @3 A=M+1 A=A+1 A=A+1 A=A+1 A=A+1 M=D @0 M=M+1 A=M-1 M=0 @0 AM=M-1 D=M @1 A=M M=D @3 A=M D=M @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @3078 D=A @14 M=D @5337 D=A @95 0;JMP @0 AM=M-1 D=M @1 A=M+1 M=D @3 A=M D=M @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @3099 D=A @14 M=D @5362 D=A @95 0;JMP @0 AM=M-1 D=M @1 A=M+1 A=A+1 M=D @3 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @599 D=A @14 M=D @5388 D=A @95 0;JMP @0 AM=M-1 D=M @1 A=M+1 A=A+1 A=A+1 M=D @3 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @620 D=A @14 M=D @5415 D=A @95 0;JMP @0 AM=M-1 D=M @1 A=M+1 A=A+1 A=A+1 A=A+1 M=D @3 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @4 D=A @0 AM=M+1 A=A-1 M=D @5442 D=A @6 0;JMP @0 AM=M-1 D=M @5449 D;JNE @5771 0;JMP @1 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @1 D=M @4 A=D+A D=M @0 AM=M+1 A=A-1 M=D @5469 D=A @22 0;JMP @1 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @1 D=M @3 A=D+A D=M @0 AM=M+1 A=A-1 M=D @5490 D=A @38 0;JMP @0 AM=M-1 D=M A=A-1 M=D|M @0 AM=M-1 D=M @3 A=M+1 A=A+1 A=A+1 M=D @3 D=M @3 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 A=M-1 M=!M @0 AM=M-1 D=M @5522 D;JNE @5771 0;JMP @1 D=M @4 A=D+A D=M @0 AM=M+1 A=A-1 M=D @1 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @10 D=A @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @5553 D=A @38 0;JMP @0 AM=M-1 D=M @5560 D;JNE @5576 0;JMP @0 M=M+1 A=M-1 M=1 @0 A=M-1 D=!M M=D+1 @0 AM=M-1 D=M @1 A=M M=D @5625 0;JMP @1 D=M @3 A=D+A D=M @0 AM=M+1 A=A-1 M=D @1 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @10 D=A @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=M-D @5608 D=A @22 0;JMP @0 AM=M-1 D=M @5615 D;JNE @5625 0;JMP @0 M=M+1 A=M-1 M=1 @0 AM=M-1 D=M @1 A=M M=D @3 D=M @6 A=D+A D=M @0 AM=M+1 A=A-1 M=D @2 D=A @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=M-D @0 AM=M-1 D=M @3 A=M+1 A=A+1 A=A+1 A=A+1 A=A+1 A=A+1 M=D @3 A=M D=M @0 AM=M+1 A=A-1 M=D @3 D=M @6 A=D+A D=M @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @3133 D=A @14 M=D @5684 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @3 D=M @4 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=1 @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @3 A=M+1 A=A+1 A=A+1 A=A+1 M=D @22 D=A @0 AM=M+1 A=A-1 M=D @7 D=A @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @19350 D=A @14 M=D @5740 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @3 D=M @4 A=D+A D=M @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @19981 D=A @14 M=D @5766 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @3 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @1835 D=A @14 M=D @5797 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @0 M=M+1 A=M-1 M=0 @54 0;JMP @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @5823 D=A @22 0;JMP @0 A=M-1 M=!M @0 AM=M-1 D=M @5833 D;JNE @5856 0;JMP @2 D=A @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @27353 D=A @14 M=D @5851 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @2 A=M D=M @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @8643 D=A @14 M=D @5875 D=A @95 0;JMP @54 0;JMP @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @3 M=D @3 D=M @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @9357 D=A @14 M=D @5907 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @0 M=M+1 A=M-1 M=0 @54 0;JMP @0 M=M+1 A=M-1 M=0 @54 0;JMP @24576 D=A @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @8558 D=A @14 M=D @5942 D=A @95 0;JMP @54 0;JMP @0 A=M M=0 AD=A+1 M=0 @0 M=D+1 @0 M=M+1 A=M-1 M=0 @1 D=A @13 M=D @19610 D=A @14 M=D @5967 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @1 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @5987 D=A @6 0;JMP @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @6002 D=A @22 0;JMP @0 AM=M-1 D=M A=A-1 M=D|M @0 A=M-1 M=!M @0 AM=M-1 D=M @6070 D;JNE @0 D=A @13 M=D @5924 D=A @14 M=D @6027 D=A @95 0;JMP @0 AM=M-1 D=M @1 A=M M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @6048 D=A @22 0;JMP @0 AM=M-1 D=M @6055 D;JNE @6068 0;JMP @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @1 A=M+1 M=D @5972 0;JMP @0 D=A @13 M=D @27042 D=A @14 M=D @6082 D=A @95 0;JMP @1 D=A @13 M=D @19610 D=A @14 M=D @6094 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @1 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @19610 D=A @14 M=D @6118 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @1 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @54 0;JMP @5 D=A D=D-1 @0 AM=M+1 A=A-1 M=0 @6134 D;JGT @80 D=A @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @25105 D=A @14 M=D @6159 D=A @95 0;JMP @0 AM=M-1 D=M @1 A=M+1 A=A+1 A=A+1 M=D @2 A=M D=M @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @19850 D=A @14 M=D @6186 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @0 D=A @13 M=D @27034 D=A @14 M=D @6203 D=A @95 0;JMP @0 AM=M-1 D=M @1 A=M+1 M=D @0 D=A @13 M=D @27042 D=A @14 M=D @6221 D=A @95 0;JMP @0 AM=M-1 D=M @1 A=M+1 A=A+1 M=D @1 D=M @4 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 A=M-1 M=!M @0 A=M-1 M=!M @0 AM=M-1 D=M @6404 D;JNE @0 D=A @13 M=D @5944 D=A @14 M=D @6260 D=A @95 0;JMP @0 AM=M-1 D=M @1 A=M M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @1 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @6284 D=A @6 0;JMP @0 AM=M-1 D=M @1 A=M+1 A=A+1 A=A+1 A=A+1 M=D @1 D=M @4 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 A=M-1 M=!M @0 AM=M-1 D=M @6312 D;JNE @6402 0;JMP @1 A=M D=M @0 AM=M+1 A=A-1 M=D @1 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @6331 D=A @6 0;JMP @0 AM=M-1 D=M @6338 D;JNE @6366 0;JMP @1 D=M @3 A=D+A D=M @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @25801 D=A @14 M=D @6359 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @6402 0;JMP @1 D=M @3 A=D+A D=M @0 AM=M+1 A=A-1 M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @25659 D=A @14 M=D @6394 D=A @95 0;JMP @0 AM=M-1 D=M @1 A=M+1 A=A+1 A=A+1 M=D @6228 0;JMP @1 D=M @3 A=D+A D=M @0 AM=M+1 A=A-1 M=D @54 0;JMP @0 A=M M=0 AD=A+1 M=0 @0 M=D+1 @2 A=M D=M @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @6132 D=A @14 M=D @6441 D=A @95 0;JMP @0 AM=M-1 D=M @1 A=M M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @25889 D=A @14 M=D @6466 D=A @95 0;JMP @0 AM=M-1 D=M @1 A=M+1 M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @25252 D=A @14 M=D @6491 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @1 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @54 0;JMP @0 AM=M+1 A=A-1 M=0 @16 D=A @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @5808 D=A @14 M=D @6527 D=A @95 0;JMP @0 AM=M-1 D=M @17 M=D @16 D=A @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @5808 D=A @14 M=D @6550 D=A @95 0;JMP @0 AM=M-1 D=M @18 M=D @0 M=M+1 A=M-1 M=0 @18 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 M=M+1 A=M-1 M=1 @0 AM=M-1 D=M @5 M=D @0 AM=M-1 D=M @4 M=D @5 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @4 A=M M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @15 D=A @0 AM=M+1 A=A-1 M=D @6613 D=A @38 0;JMP @0 A=M-1 M=!M @0 AM=M-1 D=M @6768 D;JNE @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=1 @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @1 A=M M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @18 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=1 @0 AM=M-1 D=M A=A-1 M=M-D @18 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @4 M=D @4 A=M D=M @0 AM=M+1 A=A-1 M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=1 @0 AM=M-1 D=M A=A-1 M=M-D @18 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @4 M=D @4 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @5 M=D @0 AM=M-1 D=M @4 M=D @5 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @4 A=M M=D @6596 0;JMP @0 M=M+1 A=M-1 M=0 @54 0;JMP @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @6789 D=A @38 0;JMP @0 AM=M-1 D=M @6796 D;JNE @6813 0;JMP @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 A=M-1 D=!M M=D+1 @0 AM=M-1 D=M @2 A=M M=D @2 A=M D=M @0 AM=M+1 A=A-1 M=D @54 0;JMP @5 D=A D=D-1 @0 AM=M+1 A=A-1 M=0 @6824 D;JGT @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @6846 D=A @38 0;JMP @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @6861 D=A @22 0;JMP @0 AM=M-1 D=M A=A-1 M=D&M @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @6881 D=A @22 0;JMP @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @6896 D=A @38 0;JMP @0 AM=M-1 D=M A=A-1 M=D&M @0 AM=M-1 D=M A=A-1 M=D|M @0 AM=M-1 D=M @1 A=M+1 A=A+1 A=A+1 A=A+1 M=D @2 A=M D=M @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @6774 D=A @14 M=D @6934 D=A @95 0;JMP @0 AM=M-1 D=M @2 A=M M=D @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @6774 D=A @14 M=D @6959 D=A @95 0;JMP @0 AM=M-1 D=M @2 A=M+1 M=D @2 A=M D=M @0 AM=M+1 A=A-1 M=D @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @6983 D=A @38 0;JMP @0 AM=M-1 D=M @6990 D;JNE @7029 0;JMP @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @1 A=M+1 M=D @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @2 A=M M=D @1 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @2 A=M+1 M=D @1 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @7048 D=A @38 0;JMP @0 A=M-1 M=!M @0 AM=M-1 D=M @7245 D;JNE @1 D=M @3 A=D+A D=M @0 AM=M+1 A=A-1 M=D @18 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @4 M=D @4 A=M D=M @0 AM=M+1 A=A-1 M=D @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D&M @0 M=M+1 A=M-1 M=0 @7108 D=A @22 0;JMP @0 AM=M-1 D=M @7115 D;JNE @7192 0;JMP @1 A=M D=M @0 AM=M+1 A=A-1 M=D @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @1 A=M M=D @1 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @1 D=M @3 A=D+A D=M @0 AM=M+1 A=A-1 M=D @18 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @4 M=D @4 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @1 A=M+1 A=A+1 M=D @2 A=M D=M @0 AM=M+1 A=A-1 M=D @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @2 A=M M=D @1 D=M @3 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=1 @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @1 A=M+1 A=A+1 A=A+1 M=D @7029 0;JMP @1 D=M @4 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @7261 D;JNE @7278 0;JMP @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 A=M-1 D=!M M=D+1 @0 AM=M-1 D=M @1 A=M M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @54 0;JMP @4 D=A D=D-1 @0 AM=M+1 A=A-1 M=0 @7289 D;JGT @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @7311 D=A @6 0;JMP @0 AM=M-1 D=M @7318 D;JNE @7341 0;JMP @3 D=A @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @27353 D=A @14 M=D @7336 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @7356 D=A @38 0;JMP @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @7371 D=A @22 0;JMP @0 AM=M-1 D=M A=A-1 M=D&M @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @7391 D=A @22 0;JMP @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @7406 D=A @38 0;JMP @0 AM=M-1 D=M A=A-1 M=D&M @0 AM=M-1 D=M A=A-1 M=D|M @0 AM=M-1 D=M @1 A=M+1 A=A+1 M=D @0 M=M+1 A=M-1 M=0 @17 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @6774 D=A @14 M=D @7457 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @0 AM=M-1 D=M @4 M=D @5 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @4 A=M M=D @2 A=M D=M @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @6774 D=A @14 M=D @7498 D=A @95 0;JMP @0 AM=M-1 D=M @2 A=M M=D @1 D=M @3 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 A=M-1 M=!M @0 A=M-1 M=!M @0 AM=M-1 D=M @7841 D;JNE @32767 D=A @0 AM=M+1 A=A-1 M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @17 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @4 M=D @4 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=M-D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @17 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @4 M=D @4 A=M D=M @0 AM=M+1 A=A-1 M=D @7599 D=A @38 0;JMP @0 AM=M-1 D=M @1 A=M+1 A=A+1 A=A+1 M=D @1 D=M @3 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 A=M-1 M=!M @0 AM=M-1 D=M @7626 D;JNE @7839 0;JMP @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=1 @0 AM=M-1 D=M A=A-1 M=D+M @17 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @1 A=M D=M @0 AM=M+1 A=A-1 M=D @17 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @4 M=D @4 A=M D=M @0 AM=M+1 A=A-1 M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @17 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @4 M=D @4 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @5 M=D @0 AM=M-1 D=M @4 M=D @5 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @4 A=M M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=1 @0 AM=M-1 D=M A=A-1 M=D+M @17 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @4 M=D @4 A=M D=M @0 AM=M+1 A=A-1 M=D @2 A=M D=M @0 AM=M+1 A=A-1 M=D @7790 D=A @22 0;JMP @0 AM=M-1 D=M @1 A=M+1 A=A+1 A=A+1 M=D @1 D=M @3 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 A=M-1 M=!M @0 AM=M-1 D=M @7817 D;JNE @7839 0;JMP @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=1 @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @1 A=M M=D @7504 0;JMP @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=1 @0 A=M-1 D=!M M=D+1 @7860 D=A @22 0;JMP @0 A=M-1 M=!M @0 AM=M-1 D=M @8039 D;JNE @1 A=M D=M @0 AM=M+1 A=A-1 M=D @17 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @4 M=D @4 A=M D=M @0 AM=M+1 A=A-1 M=D @2 A=M D=M @0 AM=M+1 A=A-1 M=D @7909 D=A @22 0;JMP @0 A=M-1 M=!M @0 AM=M-1 D=M @7919 D;JNE @8015 0;JMP @1 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @18 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @4 M=D @4 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @1 A=M+1 M=D @2 A=M D=M @0 AM=M+1 A=A-1 M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @17 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @4 M=D @4 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=M-D @0 AM=M-1 D=M @2 A=M M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=1 @0 AM=M-1 D=M A=A-1 M=M-D @0 AM=M-1 D=M @1 A=M M=D @7841 0;JMP @1 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @8054 D;JNE @8071 0;JMP @1 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @0 A=M-1 D=!M M=D+1 @0 AM=M-1 D=M @1 A=M+1 M=D @1 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @54 0;JMP @4 D=A D=D-1 @0 AM=M+1 A=A-1 M=0 @8082 D;JGT @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @8104 D=A @38 0;JMP @0 AM=M-1 D=M @8111 D;JNE @8134 0;JMP @4 D=A @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @27353 D=A @14 M=D @8129 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @7 D=A @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @1 A=M M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=1 @0 A=M-1 D=!M M=D+1 @8165 D=A @22 0;JMP @0 A=M-1 M=!M @0 AM=M-1 D=M @8348 D;JNE @1 D=M @3 A=D+A D=M @0 AM=M+1 A=A-1 M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @18 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @4 M=D @4 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @1 A=M+1 M=D @1 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @1 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @6822 D=A @14 M=D @8249 D=A @95 0;JMP @0 AM=M-1 D=M @1 A=M+1 A=A+1 M=D @1 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @2 A=M D=M @0 AM=M+1 A=A-1 M=D @8275 D=A @22 0;JMP @0 A=M-1 M=!M @1 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @8294 D=A @38 0;JMP @0 A=M-1 M=!M @0 AM=M-1 D=M A=A-1 M=D&M @0 AM=M-1 D=M @8309 D;JNE @8324 0;JMP @1 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @1 A=M+1 A=A+1 A=A+1 M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=1 @0 AM=M-1 D=M A=A-1 M=M-D @0 AM=M-1 D=M @1 A=M M=D @8146 0;JMP @1 D=M @3 A=D+A D=M @0 AM=M+1 A=A-1 M=D @54 0;JMP @2 A=M D=M @0 AM=M+1 A=A-1 M=D @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @8377 D=A @22 0;JMP @0 AM=M-1 D=M @8384 D;JNE @8397 0;JMP @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @2 A=M+1 M=D @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @54 0;JMP @2 A=M D=M @0 AM=M+1 A=A-1 M=D @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @8424 D=A @38 0;JMP @0 AM=M-1 D=M @8431 D;JNE @8444 0;JMP @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @2 A=M+1 M=D @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @54 0;JMP @0 M=M+1 A=M-1 M=0 @0 AM=M-1 D=M @19 M=D @2048 D=A @0 AM=M+1 A=A-1 M=D @19 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @14334 D=A @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @5 M=D @0 AM=M-1 D=M @4 M=D @5 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @4 A=M M=D @2049 D=A @0 AM=M+1 A=A-1 M=D @19 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @2050 D=A @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @5 M=D @0 AM=M-1 D=M @4 M=D @5 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @4 A=M M=D @0 M=M+1 A=M-1 M=0 @54 0;JMP @2 A=M D=M @0 AM=M+1 A=A-1 M=D @19 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @4 M=D @4 A=M D=M @0 AM=M+1 A=A-1 M=D @54 0;JMP @2 A=M D=M @0 AM=M+1 A=A-1 M=D @19 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @5 M=D @0 AM=M-1 D=M @4 M=D @5 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @4 A=M M=D @0 M=M+1 A=M-1 M=0 @54 0;JMP @0 AM=M+1 A=A-1 M=0 @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=1 @8662 D=A @38 0;JMP @0 AM=M-1 D=M @8669 D;JNE @8692 0;JMP @5 D=A @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @27353 D=A @14 M=D @8687 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @2048 D=A @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @1 A=M M=D @0 M=M+1 A=M-1 M=0 @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @4 M=D @4 A=M D=M @0 AM=M+1 A=A-1 M=D @2 A=M D=M @0 AM=M+1 A=A-1 M=D @8743 D=A @38 0;JMP @0 A=M-1 M=!M @0 AM=M-1 D=M @8787 D;JNE @0 M=M+1 A=M-1 M=1 @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @4 M=D @4 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @1 A=M M=D @8704 0;JMP @1 A=M D=M @0 AM=M+1 A=A-1 M=D @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @16379 D=A @0 AM=M+1 A=A-1 M=D @8816 D=A @22 0;JMP @0 AM=M-1 D=M @8823 D;JNE @8846 0;JMP @6 D=A @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @27353 D=A @14 M=D @8841 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @0 M=M+1 A=M-1 M=0 @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @4 M=D @4 A=M D=M @0 AM=M+1 A=A-1 M=D @2 A=M D=M @0 AM=M+1 A=A-1 M=D @2 D=A @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @8896 D=A @22 0;JMP @0 AM=M-1 D=M @8903 D;JNE @9295 0;JMP @2 A=M D=M @0 AM=M+1 A=A-1 M=D @2 D=A @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 M=M+1 A=M-1 M=0 @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @4 M=D @4 A=M D=M @0 AM=M+1 A=A-1 M=D @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=M-D @2 D=A @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=M-D @0 AM=M-1 D=M @5 M=D @0 AM=M-1 D=M @4 M=D @5 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @4 A=M M=D @0 M=M+1 A=M-1 M=1 @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @4 M=D @4 A=M D=M @0 AM=M+1 A=A-1 M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @2 D=A @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @9056 D=A @6 0;JMP @0 AM=M-1 D=M @9063 D;JNE @9147 0;JMP @2 A=M D=M @0 AM=M+1 A=A-1 M=D @3 D=A @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @1 A=M D=M @0 AM=M+1 A=A-1 M=D @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @4 D=A @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @5 M=D @0 AM=M-1 D=M @4 M=D @5 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @4 A=M M=D @9227 0;JMP @2 A=M D=M @0 AM=M+1 A=A-1 M=D @3 D=A @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 M=M+1 A=M-1 M=1 @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @4 M=D @4 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @5 M=D @0 AM=M-1 D=M @4 M=D @5 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @4 A=M M=D @0 M=M+1 A=M-1 M=1 @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @1 A=M D=M @0 AM=M+1 A=A-1 M=D @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @2 D=A @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @5 M=D @0 AM=M-1 D=M @4 M=D @5 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @4 A=M M=D @0 M=M+1 A=M-1 M=0 @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 M=M+1 A=M-1 M=0 @0 AM=M-1 D=M @5 M=D @0 AM=M-1 D=M @4 M=D @5 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @4 A=M M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @2 D=A @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @54 0;JMP @0 A=M M=0 AD=A+1 M=0 @0 M=D+1 @2 A=M D=M @0 AM=M+1 A=A-1 M=D @2 D=A @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=M-D @0 AM=M-1 D=M @1 A=M M=D @0 M=M+1 A=M-1 M=1 @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @4 M=D @4 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @1 A=M+1 M=D @0 M=M+1 A=M-1 M=0 @1 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @4 M=D @4 A=M D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @9458 D=A @6 0;JMP @0 AM=M-1 D=M @9465 D;JNE @9556 0;JMP @0 M=M+1 A=M-1 M=0 @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 M=M+1 A=M-1 M=1 @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @4 M=D @4 A=M D=M @0 AM=M+1 A=A-1 M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=M-D @2 D=A @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=M-D @0 AM=M-1 D=M @5 M=D @0 AM=M-1 D=M @4 M=D @5 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @4 A=M M=D @9848 0;JMP @0 M=M+1 A=M-1 M=0 @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 M=M+1 A=M-1 M=1 @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @4 M=D @4 A=M D=M @0 AM=M+1 A=A-1 M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=M-D @0 M=M+1 A=M-1 M=0 @1 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @4 M=D @4 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @5 M=D @0 AM=M-1 D=M @4 M=D @5 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @4 A=M M=D @0 M=M+1 A=M-1 M=1 @1 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @4 M=D @4 A=M D=M @0 AM=M+1 A=A-1 M=D @1 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @2 D=A @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @9717 D=A @6 0;JMP @0 AM=M-1 D=M @9724 D;JNE @9782 0;JMP @0 M=M+1 A=M-1 M=1 @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @1 A=M D=M @0 AM=M+1 A=A-1 M=D @2 D=A @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @5 M=D @0 AM=M-1 D=M @4 M=D @5 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @4 A=M M=D @9848 0;JMP @0 M=M+1 A=M-1 M=1 @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 M=M+1 A=M-1 M=1 @1 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @4 M=D @4 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @5 M=D @0 AM=M-1 D=M @4 M=D @5 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @4 A=M M=D @0 M=M+1 A=M-1 M=0 @54 0;JMP @16384 D=A @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @20 M=D @0 M=M+1 A=M-1 M=0 @0 A=M-1 M=!M @0 AM=M-1 D=M @21 M=D @32 D=A @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @22 M=D @0 M=M+1 A=M-1 M=0 @0 AM=M-1 D=M @23 M=D @6 D=A @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @25105 D=A @14 M=D @9915 D=A @95 0;JMP @0 AM=M-1 D=M @24 M=D @0 D=A @13 M=D @9960 D=A @14 M=D @9932 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @0 D=A @13 M=D @18456 D=A @14 M=D @9949 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @0 M=M+1 A=M-1 M=0 @54 0;JMP @127 D=A @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @5808 D=A @14 M=D @9978 D=A @95 0;JMP @0 AM=M-1 D=M @25 M=D @0 M=M+1 A=M-1 M=0 @63 D=A @0 AM=M+1 A=A-1 M=D @63 D=A @0 AM=M+1 A=A-1 M=D @63 D=A @0 AM=M+1 A=A-1 M=D @63 D=A @0 AM=M+1 A=A-1 M=D @63 D=A @0 AM=M+1 A=A-1 M=D @63 D=A @0 AM=M+1 A=A-1 M=D @63 D=A @0 AM=M+1 A=A-1 M=D @63 D=A @0 AM=M+1 A=A-1 M=D @63 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @10061 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @32 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @10128 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @33 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @30 D=A @0 AM=M+1 A=A-1 M=D @30 D=A @0 AM=M+1 A=A-1 M=D @30 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @12 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @10211 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @34 D=A @0 AM=M+1 A=A-1 M=D @54 D=A @0 AM=M+1 A=A-1 M=D @54 D=A @0 AM=M+1 A=A-1 M=D @20 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @10284 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @35 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @18 D=A @0 AM=M+1 A=A-1 M=D @18 D=A @0 AM=M+1 A=A-1 M=D @63 D=A @0 AM=M+1 A=A-1 M=D @18 D=A @0 AM=M+1 A=A-1 M=D @18 D=A @0 AM=M+1 A=A-1 M=D @63 D=A @0 AM=M+1 A=A-1 M=D @18 D=A @0 AM=M+1 A=A-1 M=D @18 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @10367 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @36 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @30 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @3 D=A @0 AM=M+1 A=A-1 M=D @30 D=A @0 AM=M+1 A=A-1 M=D @48 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @30 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @10454 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @37 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @35 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @24 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @6 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @49 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @10535 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @38 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @30 D=A @0 AM=M+1 A=A-1 M=D @30 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @54 D=A @0 AM=M+1 A=A-1 M=D @27 D=A @0 AM=M+1 A=A-1 M=D @27 D=A @0 AM=M+1 A=A-1 M=D @27 D=A @0 AM=M+1 A=A-1 M=D @54 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @10620 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @39 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @6 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @10693 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @40 D=A @0 AM=M+1 A=A-1 M=D @24 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @6 D=A @0 AM=M+1 A=A-1 M=D @6 D=A @0 AM=M+1 A=A-1 M=D @6 D=A @0 AM=M+1 A=A-1 M=D @6 D=A @0 AM=M+1 A=A-1 M=D @6 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @24 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @10778 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @41 D=A @0 AM=M+1 A=A-1 M=D @6 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @24 D=A @0 AM=M+1 A=A-1 M=D @24 D=A @0 AM=M+1 A=A-1 M=D @24 D=A @0 AM=M+1 A=A-1 M=D @24 D=A @0 AM=M+1 A=A-1 M=D @24 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @6 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @10863 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @42 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @51 D=A @0 AM=M+1 A=A-1 M=D @30 D=A @0 AM=M+1 A=A-1 M=D @63 D=A @0 AM=M+1 A=A-1 M=D @30 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @10940 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @43 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @63 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @11017 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @44 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @6 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @11090 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @45 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @63 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @11159 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @46 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @11230 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @47 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @32 D=A @0 AM=M+1 A=A-1 M=D @48 D=A @0 AM=M+1 A=A-1 M=D @24 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @6 D=A @0 AM=M+1 A=A-1 M=D @3 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=1 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @11309 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @48 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @30 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @30 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @11394 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @49 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @14 D=A @0 AM=M+1 A=A-1 M=D @15 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @63 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @11479 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @50 D=A @0 AM=M+1 A=A-1 M=D @30 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @48 D=A @0 AM=M+1 A=A-1 M=D @24 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @6 D=A @0 AM=M+1 A=A-1 M=D @3 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @63 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @11564 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @30 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @48 D=A @0 AM=M+1 A=A-1 M=D @48 D=A @0 AM=M+1 A=A-1 M=D @28 D=A @0 AM=M+1 A=A-1 M=D @48 D=A @0 AM=M+1 A=A-1 M=D @48 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @30 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @11649 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @52 D=A @0 AM=M+1 A=A-1 M=D @16 D=A @0 AM=M+1 A=A-1 M=D @24 D=A @0 AM=M+1 A=A-1 M=D @28 D=A @0 AM=M+1 A=A-1 M=D @26 D=A @0 AM=M+1 A=A-1 M=D @25 D=A @0 AM=M+1 A=A-1 M=D @63 D=A @0 AM=M+1 A=A-1 M=D @24 D=A @0 AM=M+1 A=A-1 M=D @24 D=A @0 AM=M+1 A=A-1 M=D @60 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @11734 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @53 D=A @0 AM=M+1 A=A-1 M=D @63 D=A @0 AM=M+1 A=A-1 M=D @3 D=A @0 AM=M+1 A=A-1 M=D @3 D=A @0 AM=M+1 A=A-1 M=D @31 D=A @0 AM=M+1 A=A-1 M=D @48 D=A @0 AM=M+1 A=A-1 M=D @48 D=A @0 AM=M+1 A=A-1 M=D @48 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @30 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @11819 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @54 D=A @0 AM=M+1 A=A-1 M=D @28 D=A @0 AM=M+1 A=A-1 M=D @6 D=A @0 AM=M+1 A=A-1 M=D @3 D=A @0 AM=M+1 A=A-1 M=D @3 D=A @0 AM=M+1 A=A-1 M=D @31 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @30 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @11904 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @55 D=A @0 AM=M+1 A=A-1 M=D @63 D=A @0 AM=M+1 A=A-1 M=D @49 D=A @0 AM=M+1 A=A-1 M=D @48 D=A @0 AM=M+1 A=A-1 M=D @48 D=A @0 AM=M+1 A=A-1 M=D @24 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @11989 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @56 D=A @0 AM=M+1 A=A-1 M=D @30 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @30 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @30 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @12074 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @57 D=A @0 AM=M+1 A=A-1 M=D @30 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @62 D=A @0 AM=M+1 A=A-1 M=D @48 D=A @0 AM=M+1 A=A-1 M=D @48 D=A @0 AM=M+1 A=A-1 M=D @24 D=A @0 AM=M+1 A=A-1 M=D @14 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @12159 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @58 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @12234 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @59 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @6 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @12311 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @60 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @24 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @6 D=A @0 AM=M+1 A=A-1 M=D @3 D=A @0 AM=M+1 A=A-1 M=D @6 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @24 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @12392 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @61 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @63 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @63 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @12463 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @62 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @3 D=A @0 AM=M+1 A=A-1 M=D @6 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @24 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @6 D=A @0 AM=M+1 A=A-1 M=D @3 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @12544 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @64 D=A @0 AM=M+1 A=A-1 M=D @30 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @59 D=A @0 AM=M+1 A=A-1 M=D @59 D=A @0 AM=M+1 A=A-1 M=D @59 D=A @0 AM=M+1 A=A-1 M=D @27 D=A @0 AM=M+1 A=A-1 M=D @3 D=A @0 AM=M+1 A=A-1 M=D @30 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @12629 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @63 D=A @0 AM=M+1 A=A-1 M=D @30 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @24 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @12 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @12712 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @65 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @30 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @63 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @12797 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @66 D=A @0 AM=M+1 A=A-1 M=D @31 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @31 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @31 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @12882 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @67 D=A @0 AM=M+1 A=A-1 M=D @28 D=A @0 AM=M+1 A=A-1 M=D @54 D=A @0 AM=M+1 A=A-1 M=D @35 D=A @0 AM=M+1 A=A-1 M=D @3 D=A @0 AM=M+1 A=A-1 M=D @3 D=A @0 AM=M+1 A=A-1 M=D @3 D=A @0 AM=M+1 A=A-1 M=D @35 D=A @0 AM=M+1 A=A-1 M=D @54 D=A @0 AM=M+1 A=A-1 M=D @28 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @12967 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @68 D=A @0 AM=M+1 A=A-1 M=D @15 D=A @0 AM=M+1 A=A-1 M=D @27 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @27 D=A @0 AM=M+1 A=A-1 M=D @15 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @13052 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @69 D=A @0 AM=M+1 A=A-1 M=D @63 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @35 D=A @0 AM=M+1 A=A-1 M=D @11 D=A @0 AM=M+1 A=A-1 M=D @15 D=A @0 AM=M+1 A=A-1 M=D @11 D=A @0 AM=M+1 A=A-1 M=D @35 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @63 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @13137 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @70 D=A @0 AM=M+1 A=A-1 M=D @63 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @35 D=A @0 AM=M+1 A=A-1 M=D @11 D=A @0 AM=M+1 A=A-1 M=D @15 D=A @0 AM=M+1 A=A-1 M=D @11 D=A @0 AM=M+1 A=A-1 M=D @3 D=A @0 AM=M+1 A=A-1 M=D @3 D=A @0 AM=M+1 A=A-1 M=D @3 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @13222 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @71 D=A @0 AM=M+1 A=A-1 M=D @28 D=A @0 AM=M+1 A=A-1 M=D @54 D=A @0 AM=M+1 A=A-1 M=D @35 D=A @0 AM=M+1 A=A-1 M=D @3 D=A @0 AM=M+1 A=A-1 M=D @59 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @54 D=A @0 AM=M+1 A=A-1 M=D @44 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @13307 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @72 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @63 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @13392 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @73 D=A @0 AM=M+1 A=A-1 M=D @30 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @30 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @13477 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @74 D=A @0 AM=M+1 A=A-1 M=D @60 D=A @0 AM=M+1 A=A-1 M=D @24 D=A @0 AM=M+1 A=A-1 M=D @24 D=A @0 AM=M+1 A=A-1 M=D @24 D=A @0 AM=M+1 A=A-1 M=D @24 D=A @0 AM=M+1 A=A-1 M=D @24 D=A @0 AM=M+1 A=A-1 M=D @27 D=A @0 AM=M+1 A=A-1 M=D @27 D=A @0 AM=M+1 A=A-1 M=D @14 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @13562 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @75 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @27 D=A @0 AM=M+1 A=A-1 M=D @15 D=A @0 AM=M+1 A=A-1 M=D @27 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @13647 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @76 D=A @0 AM=M+1 A=A-1 M=D @3 D=A @0 AM=M+1 A=A-1 M=D @3 D=A @0 AM=M+1 A=A-1 M=D @3 D=A @0 AM=M+1 A=A-1 M=D @3 D=A @0 AM=M+1 A=A-1 M=D @3 D=A @0 AM=M+1 A=A-1 M=D @3 D=A @0 AM=M+1 A=A-1 M=D @35 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @63 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @13732 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @77 D=A @0 AM=M+1 A=A-1 M=D @33 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @63 D=A @0 AM=M+1 A=A-1 M=D @63 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @13817 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @78 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @55 D=A @0 AM=M+1 A=A-1 M=D @55 D=A @0 AM=M+1 A=A-1 M=D @63 D=A @0 AM=M+1 A=A-1 M=D @59 D=A @0 AM=M+1 A=A-1 M=D @59 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @13902 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @79 D=A @0 AM=M+1 A=A-1 M=D @30 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @30 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @13987 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @80 D=A @0 AM=M+1 A=A-1 M=D @31 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @31 D=A @0 AM=M+1 A=A-1 M=D @3 D=A @0 AM=M+1 A=A-1 M=D @3 D=A @0 AM=M+1 A=A-1 M=D @3 D=A @0 AM=M+1 A=A-1 M=D @3 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @14072 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @81 D=A @0 AM=M+1 A=A-1 M=D @30 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @63 D=A @0 AM=M+1 A=A-1 M=D @59 D=A @0 AM=M+1 A=A-1 M=D @30 D=A @0 AM=M+1 A=A-1 M=D @48 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @14159 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @82 D=A @0 AM=M+1 A=A-1 M=D @31 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @31 D=A @0 AM=M+1 A=A-1 M=D @27 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @14244 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @83 D=A @0 AM=M+1 A=A-1 M=D @30 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @6 D=A @0 AM=M+1 A=A-1 M=D @28 D=A @0 AM=M+1 A=A-1 M=D @48 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @30 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @14329 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @84 D=A @0 AM=M+1 A=A-1 M=D @63 D=A @0 AM=M+1 A=A-1 M=D @63 D=A @0 AM=M+1 A=A-1 M=D @45 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @30 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @14414 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @85 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @30 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @14499 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @86 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @30 D=A @0 AM=M+1 A=A-1 M=D @30 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @14584 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @87 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @63 D=A @0 AM=M+1 A=A-1 M=D @63 D=A @0 AM=M+1 A=A-1 M=D @63 D=A @0 AM=M+1 A=A-1 M=D @18 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @14669 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @88 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @30 D=A @0 AM=M+1 A=A-1 M=D @30 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @30 D=A @0 AM=M+1 A=A-1 M=D @30 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @14754 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @89 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @30 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @30 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @14839 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @90 D=A @0 AM=M+1 A=A-1 M=D @63 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @49 D=A @0 AM=M+1 A=A-1 M=D @24 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @6 D=A @0 AM=M+1 A=A-1 M=D @35 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @63 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @14924 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @91 D=A @0 AM=M+1 A=A-1 M=D @30 D=A @0 AM=M+1 A=A-1 M=D @6 D=A @0 AM=M+1 A=A-1 M=D @6 D=A @0 AM=M+1 A=A-1 M=D @6 D=A @0 AM=M+1 A=A-1 M=D @6 D=A @0 AM=M+1 A=A-1 M=D @6 D=A @0 AM=M+1 A=A-1 M=D @6 D=A @0 AM=M+1 A=A-1 M=D @6 D=A @0 AM=M+1 A=A-1 M=D @30 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @15009 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @92 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=1 @3 D=A @0 AM=M+1 A=A-1 M=D @6 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @24 D=A @0 AM=M+1 A=A-1 M=D @48 D=A @0 AM=M+1 A=A-1 M=D @32 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @15088 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @93 D=A @0 AM=M+1 A=A-1 M=D @30 D=A @0 AM=M+1 A=A-1 M=D @24 D=A @0 AM=M+1 A=A-1 M=D @24 D=A @0 AM=M+1 A=A-1 M=D @24 D=A @0 AM=M+1 A=A-1 M=D @24 D=A @0 AM=M+1 A=A-1 M=D @24 D=A @0 AM=M+1 A=A-1 M=D @24 D=A @0 AM=M+1 A=A-1 M=D @24 D=A @0 AM=M+1 A=A-1 M=D @30 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @15173 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @94 D=A @0 AM=M+1 A=A-1 M=D @8 D=A @0 AM=M+1 A=A-1 M=D @28 D=A @0 AM=M+1 A=A-1 M=D @54 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @15246 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @95 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @63 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @15315 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @96 D=A @0 AM=M+1 A=A-1 M=D @6 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @24 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @15388 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @97 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @14 D=A @0 AM=M+1 A=A-1 M=D @24 D=A @0 AM=M+1 A=A-1 M=D @30 D=A @0 AM=M+1 A=A-1 M=D @27 D=A @0 AM=M+1 A=A-1 M=D @27 D=A @0 AM=M+1 A=A-1 M=D @54 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @15467 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @98 D=A @0 AM=M+1 A=A-1 M=D @3 D=A @0 AM=M+1 A=A-1 M=D @3 D=A @0 AM=M+1 A=A-1 M=D @3 D=A @0 AM=M+1 A=A-1 M=D @15 D=A @0 AM=M+1 A=A-1 M=D @27 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @30 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @15552 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @99 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @30 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @3 D=A @0 AM=M+1 A=A-1 M=D @3 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @30 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @15631 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @100 D=A @0 AM=M+1 A=A-1 M=D @48 D=A @0 AM=M+1 A=A-1 M=D @48 D=A @0 AM=M+1 A=A-1 M=D @48 D=A @0 AM=M+1 A=A-1 M=D @60 D=A @0 AM=M+1 A=A-1 M=D @54 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @30 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @15716 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @101 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @30 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @63 D=A @0 AM=M+1 A=A-1 M=D @3 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @30 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @15795 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @102 D=A @0 AM=M+1 A=A-1 M=D @28 D=A @0 AM=M+1 A=A-1 M=D @54 D=A @0 AM=M+1 A=A-1 M=D @38 D=A @0 AM=M+1 A=A-1 M=D @6 D=A @0 AM=M+1 A=A-1 M=D @15 D=A @0 AM=M+1 A=A-1 M=D @6 D=A @0 AM=M+1 A=A-1 M=D @6 D=A @0 AM=M+1 A=A-1 M=D @6 D=A @0 AM=M+1 A=A-1 M=D @15 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @15880 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @103 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @30 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @62 D=A @0 AM=M+1 A=A-1 M=D @48 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @30 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @15963 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @104 D=A @0 AM=M+1 A=A-1 M=D @3 D=A @0 AM=M+1 A=A-1 M=D @3 D=A @0 AM=M+1 A=A-1 M=D @3 D=A @0 AM=M+1 A=A-1 M=D @27 D=A @0 AM=M+1 A=A-1 M=D @55 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @16048 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @105 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @14 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @30 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @16131 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @106 D=A @0 AM=M+1 A=A-1 M=D @48 D=A @0 AM=M+1 A=A-1 M=D @48 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @56 D=A @0 AM=M+1 A=A-1 M=D @48 D=A @0 AM=M+1 A=A-1 M=D @48 D=A @0 AM=M+1 A=A-1 M=D @48 D=A @0 AM=M+1 A=A-1 M=D @48 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @30 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @16216 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @107 D=A @0 AM=M+1 A=A-1 M=D @3 D=A @0 AM=M+1 A=A-1 M=D @3 D=A @0 AM=M+1 A=A-1 M=D @3 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @27 D=A @0 AM=M+1 A=A-1 M=D @15 D=A @0 AM=M+1 A=A-1 M=D @15 D=A @0 AM=M+1 A=A-1 M=D @27 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @16301 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @108 D=A @0 AM=M+1 A=A-1 M=D @14 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @30 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @16386 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @109 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @29 D=A @0 AM=M+1 A=A-1 M=D @63 D=A @0 AM=M+1 A=A-1 M=D @43 D=A @0 AM=M+1 A=A-1 M=D @43 D=A @0 AM=M+1 A=A-1 M=D @43 D=A @0 AM=M+1 A=A-1 M=D @43 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @16465 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @110 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @29 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @16544 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @111 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @30 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @30 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @16623 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @112 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @30 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @31 D=A @0 AM=M+1 A=A-1 M=D @3 D=A @0 AM=M+1 A=A-1 M=D @3 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @16704 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @113 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @30 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @62 D=A @0 AM=M+1 A=A-1 M=D @48 D=A @0 AM=M+1 A=A-1 M=D @48 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @16785 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @114 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @29 D=A @0 AM=M+1 A=A-1 M=D @55 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @3 D=A @0 AM=M+1 A=A-1 M=D @3 D=A @0 AM=M+1 A=A-1 M=D @7 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @16864 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @115 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @30 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @6 D=A @0 AM=M+1 A=A-1 M=D @24 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @30 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @16943 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @116 D=A @0 AM=M+1 A=A-1 M=D @4 D=A @0 AM=M+1 A=A-1 M=D @6 D=A @0 AM=M+1 A=A-1 M=D @6 D=A @0 AM=M+1 A=A-1 M=D @15 D=A @0 AM=M+1 A=A-1 M=D @6 D=A @0 AM=M+1 A=A-1 M=D @6 D=A @0 AM=M+1 A=A-1 M=D @6 D=A @0 AM=M+1 A=A-1 M=D @54 D=A @0 AM=M+1 A=A-1 M=D @28 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @17028 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @117 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @27 D=A @0 AM=M+1 A=A-1 M=D @27 D=A @0 AM=M+1 A=A-1 M=D @27 D=A @0 AM=M+1 A=A-1 M=D @27 D=A @0 AM=M+1 A=A-1 M=D @27 D=A @0 AM=M+1 A=A-1 M=D @54 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @17107 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @118 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @30 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @17186 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @119 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @63 D=A @0 AM=M+1 A=A-1 M=D @63 D=A @0 AM=M+1 A=A-1 M=D @18 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @17265 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @120 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @51 D=A @0 AM=M+1 A=A-1 M=D @30 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @30 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @17344 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @121 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @62 D=A @0 AM=M+1 A=A-1 M=D @48 D=A @0 AM=M+1 A=A-1 M=D @24 D=A @0 AM=M+1 A=A-1 M=D @15 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @17425 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @122 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @63 D=A @0 AM=M+1 A=A-1 M=D @27 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @6 D=A @0 AM=M+1 A=A-1 M=D @51 D=A @0 AM=M+1 A=A-1 M=D @63 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @17504 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @123 D=A @0 AM=M+1 A=A-1 M=D @56 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @7 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @56 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @17589 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @124 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @17674 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @125 D=A @0 AM=M+1 A=A-1 M=D @7 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @56 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @12 D=A @0 AM=M+1 A=A-1 M=D @7 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @17759 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @126 D=A @0 AM=M+1 A=A-1 M=D @38 D=A @0 AM=M+1 A=A-1 M=D @45 D=A @0 AM=M+1 A=A-1 M=D @25 D=A @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @0 M=M+1 A=M-1 M=0 @12 D=A @13 M=D @17843 D=A @14 M=D @17832 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @0 M=M+1 A=M-1 M=0 @54 0;JMP @0 AM=M+1 A=A-1 M=0 @11 D=A @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @5808 D=A @14 M=D @17865 D=A @95 0;JMP @0 AM=M-1 D=M @1 A=M M=D @2 A=M D=M @0 AM=M+1 A=A-1 M=D @25 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @5 M=D @0 AM=M-1 D=M @4 M=D @5 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @4 A=M M=D @0 M=M+1 A=M-1 M=0 @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @5 M=D @0 AM=M-1 D=M @4 M=D @5 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @4 A=M M=D @0 M=M+1 A=M-1 M=1 @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @2 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @5 M=D @0 AM=M-1 D=M @4 M=D @5 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @4 A=M M=D @2 D=A @0 AM=M+1 A=A-1 M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @2 D=M @3 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @5 M=D @0 AM=M-1 D=M @4 M=D @5 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @4 A=M M=D @3 D=A @0 AM=M+1 A=A-1 M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @2 D=M @4 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @5 M=D @0 AM=M-1 D=M @4 M=D @5 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @4 A=M M=D @4 D=A @0 AM=M+1 A=A-1 M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @2 D=M @5 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @5 M=D @0 AM=M-1 D=M @4 M=D @5 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @4 A=M M=D @5 D=A @0 AM=M+1 A=A-1 M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @2 D=M @6 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @5 M=D @0 AM=M-1 D=M @4 M=D @5 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @4 A=M M=D @6 D=A @0 AM=M+1 A=A-1 M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @2 D=M @7 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @5 M=D @0 AM=M-1 D=M @4 M=D @5 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @4 A=M M=D @7 D=A @0 AM=M+1 A=A-1 M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @2 D=M @8 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @5 M=D @0 AM=M-1 D=M @4 M=D @5 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @4 A=M M=D @8 D=A @0 AM=M+1 A=A-1 M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @2 D=M @9 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @5 M=D @0 AM=M-1 D=M @4 M=D @5 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @4 A=M M=D @9 D=A @0 AM=M+1 A=A-1 M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @2 D=M @10 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @5 M=D @0 AM=M-1 D=M @4 M=D @5 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @4 A=M M=D @10 D=A @0 AM=M+1 A=A-1 M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @2 D=M @11 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @5 M=D @0 AM=M-1 D=M @4 M=D @5 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @4 A=M M=D @0 M=M+1 A=M-1 M=0 @54 0;JMP @4 D=A D=D-1 @0 AM=M+1 A=A-1 M=0 @18458 D;JGT @127 D=A @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @5808 D=A @14 M=D @18483 D=A @95 0;JMP @0 AM=M-1 D=M @26 M=D @0 M=M+1 A=M-1 M=0 @0 AM=M-1 D=M @1 A=M+1 A=A+1 M=D @1 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @127 D=A @0 AM=M+1 A=A-1 M=D @18517 D=A @38 0;JMP @0 A=M-1 M=!M @0 AM=M-1 D=M @18859 D;JNE @1 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @25 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @4 M=D @4 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @1 A=M M=D @11 D=A @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @5808 D=A @14 M=D @18580 D=A @95 0;JMP @0 AM=M-1 D=M @1 A=M+1 M=D @1 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @26 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @1 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @5 M=D @0 AM=M-1 D=M @4 M=D @5 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @4 A=M M=D @0 M=M+1 A=M-1 M=0 @0 AM=M-1 D=M @1 A=M+1 A=A+1 A=A+1 M=D @1 D=M @3 A=D+A D=M @0 AM=M+1 A=A-1 M=D @11 D=A @0 AM=M+1 A=A-1 M=D @18665 D=A @38 0;JMP @0 A=M-1 M=!M @0 AM=M-1 D=M @18795 D;JNE @1 D=M @3 A=D+A D=M @0 AM=M+1 A=A-1 M=D @1 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @1 D=M @3 A=D+A D=M @0 AM=M+1 A=A-1 M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @4 M=D @4 A=M D=M @0 AM=M+1 A=A-1 M=D @256 D=A @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @6822 D=A @14 M=D @18745 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @0 AM=M-1 D=M @4 M=D @5 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @4 A=M M=D @1 D=M @3 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=1 @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @1 A=M+1 A=A+1 A=A+1 M=D @18646 0;JMP @1 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @18811 D=A @6 0;JMP @0 AM=M-1 D=M @18818 D;JNE @18833 0;JMP @32 D=A @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @1 A=M+1 A=A+1 M=D @18857 0;JMP @1 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=1 @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @1 A=M+1 A=A+1 M=D @18499 0;JMP @0 M=M+1 A=M-1 M=0 @54 0;JMP @0 AM=M+1 A=A-1 M=0 @2 A=M D=M @0 AM=M+1 A=A-1 M=D @32 D=A @0 AM=M+1 A=A-1 M=D @18886 D=A @38 0;JMP @2 A=M D=M @0 AM=M+1 A=A-1 M=D @126 D=A @0 AM=M+1 A=A-1 M=D @18903 D=A @22 0;JMP @0 AM=M-1 D=M A=A-1 M=D|M @0 AM=M-1 D=M @18915 D;JNE @18925 0;JMP @0 M=M+1 A=M-1 M=0 @0 AM=M-1 D=M @2 A=M M=D @21 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @18938 D;JNE @18976 0;JMP @2 A=M D=M @0 AM=M+1 A=A-1 M=D @25 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @4 M=D @4 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @1 A=M M=D @19012 0;JMP @2 A=M D=M @0 AM=M+1 A=A-1 M=D @26 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @4 M=D @4 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @1 A=M M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @54 0;JMP @4 D=A D=D-1 @0 AM=M+1 A=A-1 M=0 @19023 D;JGT @2 A=M D=M @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @18865 D=A @14 M=D @19049 D=A @95 0;JMP @0 AM=M-1 D=M @1 A=M+1 A=A+1 M=D @22 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @1 A=M M=D @1 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @11 D=A @0 AM=M+1 A=A-1 M=D @19085 D=A @38 0;JMP @0 A=M-1 M=!M @0 AM=M-1 D=M @19344 D;JNE @21 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @19106 D;JNE @19161 0;JMP @1 A=M D=M @0 AM=M+1 A=A-1 M=D @20 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @4 M=D @4 A=M D=M @0 AM=M+1 A=A-1 M=D @256 D=A @0 AM=M+1 A=A-1 M=D @0 A=M-1 D=!M M=D+1 @0 AM=M-1 D=M A=A-1 M=D&M @0 AM=M-1 D=M @1 A=M+1 A=A+1 A=A+1 M=D @19210 0;JMP @1 A=M D=M @0 AM=M+1 A=A-1 M=D @20 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @4 M=D @4 A=M D=M @0 AM=M+1 A=A-1 M=D @255 D=A @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D&M @0 AM=M-1 D=M @1 A=M+1 A=A+1 A=A+1 M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @20 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @1 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @1 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @4 M=D @4 A=M D=M @0 AM=M+1 A=A-1 M=D @1 D=M @3 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D|M @0 AM=M-1 D=M @5 M=D @0 AM=M-1 D=M @4 M=D @5 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @4 A=M M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @32 D=A @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @1 A=M M=D @1 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=1 @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @1 A=M+1 M=D @19068 0;JMP @0 M=M+1 A=M-1 M=0 @54 0;JMP @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @19365 D=A @38 0;JMP @2 A=M D=M @0 AM=M+1 A=A-1 M=D @22 D=A @0 AM=M+1 A=A-1 M=D @19382 D=A @22 0;JMP @0 AM=M-1 D=M A=A-1 M=D|M @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @19402 D=A @38 0;JMP @0 AM=M-1 D=M A=A-1 M=D|M @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @63 D=A @0 AM=M+1 A=A-1 M=D @19424 D=A @22 0;JMP @0 AM=M-1 D=M A=A-1 M=D|M @0 AM=M-1 D=M @19436 D;JNE @19459 0;JMP @20 D=A @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @27353 D=A @14 M=D @19454 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @2 D=A @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @7287 D=A @14 M=D @19484 D=A @95 0;JMP @0 AM=M-1 D=M @23 M=D @32 D=A @0 AM=M+1 A=A-1 M=D @2 A=M D=M @0 AM=M+1 A=A-1 M=D @352 D=A @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @6822 D=A @14 M=D @19520 D=A @95 0;JMP @0 AM=M-1 D=M A=A-1 M=D+M @23 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @22 M=D @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @23 D=M @0 AM=M+1 A=A-1 M=D @2 D=A @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @6822 D=A @14 M=D @19572 D=A @95 0;JMP @19576 D=A @6 0;JMP @0 AM=M-1 D=M @21 M=D @32 D=A @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @19021 D=A @14 M=D @19599 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @0 M=M+1 A=M-1 M=0 @54 0;JMP @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 D=A @13 M=D @27034 D=A @14 M=D @19629 D=A @95 0;JMP @19633 D=A @6 0;JMP @0 AM=M-1 D=M @19640 D;JNE @19659 0;JMP @0 D=A @13 M=D @20040 D=A @14 M=D @19652 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @19844 0;JMP @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 D=A @13 M=D @27042 D=A @14 M=D @19678 D=A @95 0;JMP @19682 D=A @6 0;JMP @0 AM=M-1 D=M @19689 D;JNE @19708 0;JMP @0 D=A @13 M=D @20134 D=A @14 M=D @19701 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @19844 0;JMP @2 A=M D=M @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @19021 D=A @14 M=D @19727 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @21 D=M @0 AM=M+1 A=A-1 M=D @0 A=M-1 M=!M @0 AM=M-1 D=M @19748 D;JNE @19788 0;JMP @23 D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=1 @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @23 M=D @22 D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=1 @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @22 M=D @23 D=M @0 AM=M+1 A=A-1 M=D @32 D=A @0 AM=M+1 A=A-1 M=D @19804 D=A @6 0;JMP @0 AM=M-1 D=M @19811 D;JNE @19830 0;JMP @0 D=A @13 M=D @20040 D=A @14 M=D @19823 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @19844 0;JMP @21 D=M @0 AM=M+1 A=A-1 M=D @0 A=M-1 M=!M @0 AM=M-1 D=M @21 M=D @0 M=M+1 A=M-1 M=0 @54 0;JMP @0 A=M M=0 AD=A+1 M=0 @0 M=D+1 @2 A=M D=M @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @25339 D=A @14 M=D @19876 D=A @95 0;JMP @0 AM=M-1 D=M @1 A=M+1 M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @1 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @19900 D=A @38 0;JMP @0 A=M-1 M=!M @0 AM=M-1 D=M @19975 D;JNE @2 A=M D=M @0 AM=M+1 A=A-1 M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @25361 D=A @14 M=D @19934 D=A @95 0;JMP @1 D=A @13 M=D @19610 D=A @14 M=D @19946 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=1 @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @1 A=M M=D @19882 0;JMP @0 M=M+1 A=M-1 M=0 @54 0;JMP @24 D=M @0 AM=M+1 A=A-1 M=D @2 A=M D=M @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @26291 D=A @14 M=D @20006 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @24 D=M @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @19850 D=A @14 M=D @20029 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @0 M=M+1 A=M-1 M=0 @54 0;JMP @22 D=M @0 AM=M+1 A=A-1 M=D @352 D=A @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @23 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=M-D @0 AM=M-1 D=M @22 M=D @0 M=M+1 A=M-1 M=0 @0 AM=M-1 D=M @23 M=D @0 M=M+1 A=M-1 M=0 @0 A=M-1 M=!M @0 AM=M-1 D=M @21 M=D @22 D=M @0 AM=M+1 A=A-1 M=D @8128 D=A @0 AM=M+1 A=A-1 M=D @20110 D=A @6 0;JMP @0 AM=M-1 D=M @20117 D;JNE @20128 0;JMP @32 D=A @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @22 M=D @0 M=M+1 A=M-1 M=0 @54 0;JMP @21 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @20147 D;JNE @20288 0;JMP @23 D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @20161 D=A @22 0;JMP @0 AM=M-1 D=M @20168 D;JNE @20210 0;JMP @23 D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=1 @0 AM=M-1 D=M A=A-1 M=M-D @0 AM=M-1 D=M @23 M=D @22 D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=1 @0 AM=M-1 D=M A=A-1 M=M-D @0 AM=M-1 D=M @22 M=D @20277 0;JMP @31 D=A @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @23 M=D @22 D=M @0 AM=M+1 A=A-1 M=D @32 D=A @0 AM=M+1 A=A-1 M=D @20237 D=A @6 0;JMP @0 AM=M-1 D=M @20244 D;JNE @20255 0;JMP @8128 D=A @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @22 M=D @22 D=M @0 AM=M+1 A=A-1 M=D @321 D=A @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=M-D @0 AM=M-1 D=M @22 M=D @0 M=M+1 A=M-1 M=0 @0 AM=M-1 D=M @21 M=D @20300 0;JMP @0 M=M+1 A=M-1 M=0 @0 A=M-1 M=!M @0 AM=M-1 D=M @21 M=D @32 D=A @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @19021 D=A @14 M=D @20318 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @0 M=M+1 A=M-1 M=0 @54 0;JMP @0 AM=M+1 A=A-1 M=0 @16384 D=A @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @27 M=D @0 M=M+1 A=M-1 M=0 @0 A=M-1 M=!M @0 AM=M-1 D=M @28 M=D @17 D=A @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @5808 D=A @14 M=D @20374 D=A @95 0;JMP @0 AM=M-1 D=M @29 M=D @0 M=M+1 A=M-1 M=0 @29 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 M=M+1 A=M-1 M=1 @0 AM=M-1 D=M @5 M=D @0 AM=M-1 D=M @4 M=D @5 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @4 A=M M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @16 D=A @0 AM=M+1 A=A-1 M=D @20437 D=A @38 0;JMP @0 A=M-1 M=!M @0 AM=M-1 D=M @20592 D;JNE @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=1 @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @1 A=M M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @29 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=1 @0 AM=M-1 D=M A=A-1 M=M-D @29 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @4 M=D @4 A=M D=M @0 AM=M+1 A=A-1 M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=1 @0 AM=M-1 D=M A=A-1 M=M-D @29 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @4 M=D @4 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @5 M=D @0 AM=M-1 D=M @4 M=D @5 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @4 A=M M=D @20420 0;JMP @0 M=M+1 A=M-1 M=0 @54 0;JMP @0 AM=M+1 A=A-1 M=0 @1 A=M D=M @0 AM=M+1 A=A-1 M=D @8192 D=A @0 AM=M+1 A=A-1 M=D @20619 D=A @38 0;JMP @0 A=M-1 M=!M @0 AM=M-1 D=M @20695 D;JNE @1 A=M D=M @0 AM=M+1 A=A-1 M=D @27 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 M=M+1 A=M-1 M=0 @0 AM=M-1 D=M @5 M=D @0 AM=M-1 D=M @4 M=D @5 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @4 A=M M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=1 @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @1 A=M M=D @20602 0;JMP @0 M=M+1 A=M-1 M=0 @54 0;JMP @28 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @20714 D;JNE @20798 0;JMP @2 A=M D=M @0 AM=M+1 A=A-1 M=D @27 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @2 A=M D=M @0 AM=M+1 A=A-1 M=D @27 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @4 M=D @4 A=M D=M @0 AM=M+1 A=A-1 M=D @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D|M @0 AM=M-1 D=M @5 M=D @0 AM=M-1 D=M @4 M=D @5 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @4 A=M M=D @20883 0;JMP @2 A=M D=M @0 AM=M+1 A=A-1 M=D @27 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @2 A=M D=M @0 AM=M+1 A=A-1 M=D @27 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @4 M=D @4 A=M D=M @0 AM=M+1 A=A-1 M=D @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @0 A=M-1 M=!M @0 AM=M-1 D=M A=A-1 M=D&M @0 AM=M-1 D=M @5 M=D @0 AM=M-1 D=M @4 M=D @5 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @4 A=M M=D @0 M=M+1 A=M-1 M=0 @54 0;JMP @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @28 M=D @0 M=M+1 A=M-1 M=0 @54 0;JMP @3 D=A D=D-1 @0 AM=M+1 A=A-1 M=0 @20909 D;JGT @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @20931 D=A @38 0;JMP @2 A=M D=M @0 AM=M+1 A=A-1 M=D @511 D=A @0 AM=M+1 A=A-1 M=D @20948 D=A @22 0;JMP @0 AM=M-1 D=M A=A-1 M=D|M @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @20968 D=A @38 0;JMP @0 AM=M-1 D=M A=A-1 M=D|M @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @255 D=A @0 AM=M+1 A=A-1 M=D @20990 D=A @22 0;JMP @0 AM=M-1 D=M A=A-1 M=D|M @0 AM=M-1 D=M @21002 D;JNE @21025 0;JMP @7 D=A @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @27353 D=A @14 M=D @21020 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @2 A=M D=M @0 AM=M+1 A=A-1 M=D @16 D=A @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @7287 D=A @14 M=D @21050 D=A @95 0;JMP @0 AM=M-1 D=M @1 A=M M=D @2 A=M D=M @0 AM=M+1 A=A-1 M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @16 D=A @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @6822 D=A @14 M=D @21088 D=A @95 0;JMP @0 AM=M-1 D=M A=A-1 M=M-D @0 AM=M-1 D=M @1 A=M+1 M=D @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @32 D=A @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @6822 D=A @14 M=D @21124 D=A @95 0;JMP @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @1 A=M+1 A=A+1 M=D @1 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @1 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @29 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @4 M=D @4 A=M D=M @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @20701 D=A @14 M=D @21193 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @0 M=M+1 A=M-1 M=0 @54 0;JMP @2 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @21219 D;JNE @21252 0;JMP @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @2 A=M D=M @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @20907 D=A @14 M=D @21245 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @21283 0;JMP @2 A=M D=M @0 AM=M+1 A=A-1 M=D @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @20907 D=A @14 M=D @21278 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @0 M=M+1 A=M-1 M=0 @54 0;JMP @11 D=A D=D-1 @0 AM=M+1 A=A-1 M=0 @21291 D;JGT @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @21313 D=A @38 0;JMP @2 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @511 D=A @0 AM=M+1 A=A-1 M=D @21331 D=A @22 0;JMP @0 AM=M-1 D=M A=A-1 M=D|M @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @21351 D=A @38 0;JMP @0 AM=M-1 D=M A=A-1 M=D|M @2 D=M @3 A=D+A D=M @0 AM=M+1 A=A-1 M=D @255 D=A @0 AM=M+1 A=A-1 M=D @21375 D=A @22 0;JMP @0 AM=M-1 D=M A=A-1 M=D|M @0 AM=M-1 D=M @21387 D;JNE @21410 0;JMP @8 D=A @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @27353 D=A @14 M=D @21405 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @2 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=M-D @1 D=A @13 M=D @6774 D=A @14 M=D @21442 D=A @95 0;JMP @0 AM=M-1 D=M @1 A=M+1 A=A+1 A=A+1 M=D @2 D=M @3 A=D+A D=M @0 AM=M+1 A=A-1 M=D @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=M-D @1 D=A @13 M=D @6774 D=A @14 M=D @21483 D=A @95 0;JMP @0 AM=M-1 D=M @1 A=M+1 A=A+1 M=D @1 D=M @3 A=D+A D=M @0 AM=M+1 A=A-1 M=D @1 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @21511 D=A @38 0;JMP @0 AM=M-1 D=M @1 A=M+1 A=A+1 A=A+1 A=A+1 A=A+1 A=A+1 M=D @1 D=M @6 A=D+A D=M @0 AM=M+1 A=A-1 M=D @2 D=M @3 A=D+A D=M @0 AM=M+1 A=A-1 M=D @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @21551 D=A @38 0;JMP @0 AM=M-1 D=M A=A-1 M=D&M @1 D=M @6 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 A=M-1 M=!M @2 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @2 A=M D=M @0 AM=M+1 A=A-1 M=D @21587 D=A @38 0;JMP @0 AM=M-1 D=M A=A-1 M=D&M @0 AM=M-1 D=M A=A-1 M=D|M @0 AM=M-1 D=M @21604 D;JNE @21698 0;JMP @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @1 A=M+1 A=A+1 A=A+1 A=A+1 M=D @2 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @2 A=M M=D @1 D=M @4 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @2 A=M+1 A=A+1 M=D @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @1 A=M+1 A=A+1 A=A+1 A=A+1 M=D @2 D=M @3 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @2 A=M+1 M=D @1 D=M @4 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @2 A=M+1 A=A+1 A=A+1 M=D @1 D=M @6 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @21714 D;JNE @21844 0;JMP @1 D=M @3 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @1 A=M+1 A=A+1 A=A+1 A=A+1 M=D @1 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @1 A=M+1 A=A+1 A=A+1 M=D @1 D=M @4 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @1 A=M+1 A=A+1 M=D @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @1 A=M+1 M=D @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @1 A=M M=D @2 D=M @3 A=D+A D=M @0 AM=M+1 A=A-1 M=D @1 D=M @8 D=D+A @13 M=D @0 AM=M-1 D=M @13 A=M M=D @2 A=M D=M @0 AM=M+1 A=A-1 M=D @2 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @21830 D=A @22 0;JMP @1 D=M @7 D=D+A @13 M=D @0 AM=M-1 D=M @13 A=M M=D @21922 0;JMP @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @1 A=M+1 M=D @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @1 A=M M=D @2 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @1 D=M @8 D=D+A @13 M=D @0 AM=M-1 D=M @13 A=M M=D @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @2 D=M @3 A=D+A D=M @0 AM=M+1 A=A-1 M=D @21910 D=A @22 0;JMP @1 D=M @7 D=D+A @13 M=D @0 AM=M-1 D=M @13 A=M M=D @2 D=A @0 AM=M+1 A=A-1 M=D @1 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @6822 D=A @14 M=D @21948 D=A @95 0;JMP @1 D=M @3 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=M-D @0 AM=M-1 D=M @1 A=M+1 A=A+1 A=A+1 A=A+1 A=A+1 M=D @2 D=A @0 AM=M+1 A=A-1 M=D @1 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @6822 D=A @14 M=D @21998 D=A @95 0;JMP @1 D=M @9 D=D+A @13 M=D @0 AM=M-1 D=M @13 A=M M=D @2 D=A @0 AM=M+1 A=A-1 M=D @1 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @1 D=M @3 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=M-D @2 D=A @13 M=D @6822 D=A @14 M=D @22050 D=A @95 0;JMP @1 D=M @10 D=D+A @13 M=D @0 AM=M-1 D=M @13 A=M M=D @1 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @1 D=M @6 A=D+A D=M @0 AM=M+1 A=A-1 M=D @3 D=A @13 M=D @21204 D=A @14 M=D @22097 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @1 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @1 D=M @8 A=D+A D=M @0 AM=M+1 A=A-1 M=D @22122 D=A @38 0;JMP @0 A=M-1 M=!M @0 AM=M-1 D=M @22348 D;JNE @1 D=M @5 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @22147 D=A @38 0;JMP @0 AM=M-1 D=M @22154 D;JNE @22189 0;JMP @1 D=M @5 A=D+A D=M @0 AM=M+1 A=A-1 M=D @1 D=M @9 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @1 A=M+1 A=A+1 A=A+1 A=A+1 A=A+1 M=D @22284 0;JMP @1 D=M @5 A=D+A D=M @0 AM=M+1 A=A-1 M=D @1 D=M @10 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @1 A=M+1 A=A+1 A=A+1 A=A+1 A=A+1 M=D @1 D=M @7 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @22238 D;JNE @22262 0;JMP @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=1 @0 AM=M-1 D=M A=A-1 M=M-D @0 AM=M-1 D=M @1 A=M M=D @22284 0;JMP @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=1 @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @1 A=M M=D @1 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=1 @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @1 A=M+1 M=D @1 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @1 D=M @6 A=D+A D=M @0 AM=M+1 A=A-1 M=D @3 D=A @13 M=D @21204 D=A @14 M=D @22341 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @22102 0;JMP @0 M=M+1 A=M-1 M=0 @54 0;JMP @9 D=A D=D-1 @0 AM=M+1 A=A-1 M=0 @22356 D;JGT @2 A=M D=M @0 AM=M+1 A=A-1 M=D @2 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @22382 D=A @22 0;JMP @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @2 D=M @3 A=D+A D=M @0 AM=M+1 A=A-1 M=D @22402 D=A @22 0;JMP @0 AM=M-1 D=M A=A-1 M=D|M @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @22422 D=A @38 0;JMP @0 AM=M-1 D=M A=A-1 M=D|M @2 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @511 D=A @0 AM=M+1 A=A-1 M=D @22445 D=A @22 0;JMP @0 AM=M-1 D=M A=A-1 M=D|M @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @22465 D=A @38 0;JMP @0 AM=M-1 D=M A=A-1 M=D|M @2 D=M @3 A=D+A D=M @0 AM=M+1 A=A-1 M=D @255 D=A @0 AM=M+1 A=A-1 M=D @22489 D=A @22 0;JMP @0 AM=M-1 D=M A=A-1 M=D|M @0 AM=M-1 D=M @22501 D;JNE @22524 0;JMP @9 D=A @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @27353 D=A @14 M=D @22519 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @2 A=M D=M @0 AM=M+1 A=A-1 M=D @16 D=A @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @7287 D=A @14 M=D @22549 D=A @95 0;JMP @0 AM=M-1 D=M @1 A=M+1 A=A+1 A=A+1 M=D @2 A=M D=M @0 AM=M+1 A=A-1 M=D @1 D=M @3 A=D+A D=M @0 AM=M+1 A=A-1 M=D @16 D=A @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @6822 D=A @14 M=D @22591 D=A @95 0;JMP @0 AM=M-1 D=M A=A-1 M=M-D @1 D=M @7 D=D+A @13 M=D @0 AM=M-1 D=M @13 A=M M=D @2 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @16 D=A @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @7287 D=A @14 M=D @22634 D=A @95 0;JMP @0 AM=M-1 D=M @1 A=M+1 A=A+1 A=A+1 A=A+1 M=D @2 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @1 D=M @4 A=D+A D=M @0 AM=M+1 A=A-1 M=D @16 D=A @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @6822 D=A @14 M=D @22678 D=A @95 0;JMP @0 AM=M-1 D=M A=A-1 M=M-D @1 D=M @8 D=D+A @13 M=D @0 AM=M-1 D=M @13 A=M M=D @1 D=M @7 A=D+A D=M @0 AM=M+1 A=A-1 M=D @29 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @4 M=D @4 A=M D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=1 @0 AM=M-1 D=M A=A-1 M=M-D @0 A=M-1 M=!M @0 AM=M-1 D=M @1 A=M+1 A=A+1 A=A+1 A=A+1 A=A+1 A=A+1 M=D @1 D=M @8 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=1 @0 AM=M-1 D=M A=A-1 M=D+M @29 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @4 M=D @4 A=M D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=1 @0 AM=M-1 D=M A=A-1 M=M-D @0 AM=M-1 D=M @1 A=M+1 A=A+1 A=A+1 A=A+1 A=A+1 M=D @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @32 D=A @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @6822 D=A @14 M=D @22835 D=A @95 0;JMP @1 D=M @3 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @1 A=M M=D @1 D=M @4 A=D+A D=M @0 AM=M+1 A=A-1 M=D @1 D=M @3 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=M-D @0 AM=M-1 D=M @1 A=M+1 A=A+1 M=D @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @2 D=M @3 A=D+A D=M @0 AM=M+1 A=A-1 M=D @22905 D=A @22 0;JMP @0 A=M-1 M=!M @0 A=M-1 M=!M @0 AM=M-1 D=M @23245 D;JNE @1 A=M D=M @0 AM=M+1 A=A-1 M=D @1 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @1 A=M+1 M=D @1 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @22958 D=A @6 0;JMP @0 AM=M-1 D=M @22965 D;JNE @23014 0;JMP @1 A=M D=M @0 AM=M+1 A=A-1 M=D @1 D=M @5 A=D+A D=M @0 AM=M+1 A=A-1 M=D @1 D=M @6 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D&M @2 D=A @13 M=D @20701 D=A @14 M=D @23007 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @23184 0;JMP @1 A=M D=M @0 AM=M+1 A=A-1 M=D @1 D=M @6 A=D+A D=M @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @20701 D=A @14 M=D @23042 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=1 @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @1 A=M M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @1 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @23087 D=A @38 0;JMP @0 A=M-1 M=!M @0 AM=M-1 D=M @23151 D;JNE @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=1 @0 A=M-1 D=!M M=D+1 @2 D=A @13 M=D @20701 D=A @14 M=D @23122 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=1 @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @1 A=M M=D @23069 0;JMP @1 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @1 D=M @5 A=D+A D=M @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @20701 D=A @14 M=D @23179 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=1 @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @2 A=M+1 M=D @1 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @32 D=A @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @1 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=M-D @0 AM=M-1 D=M @1 A=M M=D @22885 0;JMP @0 M=M+1 A=M-1 M=0 @54 0;JMP @11 D=A D=D-1 @0 AM=M+1 A=A-1 M=0 @23253 D;JGT @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @2 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @8406 D=A @14 M=D @23287 D=A @95 0;JMP @1 D=M @7 D=D+A @13 M=D @0 AM=M-1 D=M @13 A=M M=D @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @2 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @8359 D=A @14 M=D @23326 D=A @95 0;JMP @1 D=M @8 D=D+A @13 M=D @0 AM=M-1 D=M @13 A=M M=D @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=1 @0 A=M-1 D=!M M=D+1 @23357 D=A @22 0;JMP @2 A=M D=M @0 AM=M+1 A=A-1 M=D @256 D=A @0 AM=M+1 A=A-1 M=D @23374 D=A @38 0;JMP @0 AM=M-1 D=M A=A-1 M=D&M @1 D=M @7 A=D+A D=M @0 AM=M+1 A=A-1 M=D @512 D=A @0 AM=M+1 A=A-1 M=D @23398 D=A @38 0;JMP @0 AM=M-1 D=M A=A-1 M=D&M @1 D=M @8 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=1 @0 A=M-1 D=!M M=D+1 @23424 D=A @22 0;JMP @0 AM=M-1 D=M A=A-1 M=D&M @0 AM=M-1 D=M @23436 D;JNE @24145 0;JMP @1 D=M @7 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @2 D=A @13 M=D @8359 D=A @14 M=D @23461 D=A @95 0;JMP @1 D=M @7 D=D+A @13 M=D @0 AM=M-1 D=M @13 A=M M=D @1 D=M @8 A=D+A D=M @0 AM=M+1 A=A-1 M=D @511 D=A @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @8406 D=A @14 M=D @23500 D=A @95 0;JMP @1 D=M @8 D=D+A @13 M=D @0 AM=M-1 D=M @13 A=M M=D @1 D=M @7 A=D+A D=M @0 AM=M+1 A=A-1 M=D @16 D=A @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @7287 D=A @14 M=D @23539 D=A @95 0;JMP @0 AM=M-1 D=M @1 A=M+1 M=D @1 D=M @7 A=D+A D=M @0 AM=M+1 A=A-1 M=D @1 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @16 D=A @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @6822 D=A @14 M=D @23579 D=A @95 0;JMP @0 AM=M-1 D=M A=A-1 M=M-D @1 D=M @9 D=D+A @13 M=D @0 AM=M-1 D=M @13 A=M M=D @1 D=M @8 A=D+A D=M @0 AM=M+1 A=A-1 M=D @16 D=A @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @7287 D=A @14 M=D @23623 D=A @95 0;JMP @0 AM=M-1 D=M @1 A=M+1 A=A+1 M=D @1 D=M @8 A=D+A D=M @0 AM=M+1 A=A-1 M=D @1 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @16 D=A @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @6822 D=A @14 M=D @23665 D=A @95 0;JMP @0 AM=M-1 D=M A=A-1 M=M-D @1 D=M @10 D=D+A @13 M=D @0 AM=M-1 D=M @13 A=M M=D @1 D=M @9 A=D+A D=M @0 AM=M+1 A=A-1 M=D @29 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @4 M=D @4 A=M D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=1 @0 AM=M-1 D=M A=A-1 M=M-D @0 A=M-1 M=!M @0 AM=M-1 D=M @1 A=M+1 A=A+1 A=A+1 A=A+1 A=A+1 M=D @1 D=M @10 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=1 @0 AM=M-1 D=M A=A-1 M=D+M @29 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @4 M=D @4 A=M D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=1 @0 AM=M-1 D=M A=A-1 M=M-D @0 AM=M-1 D=M @1 A=M+1 A=A+1 A=A+1 A=A+1 M=D @2 A=M D=M @0 AM=M+1 A=A-1 M=D @32 D=A @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @6822 D=A @14 M=D @23820 D=A @95 0;JMP @1 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @1 A=M M=D @1 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @1 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=M-D @0 AM=M-1 D=M @1 A=M+1 A=A+1 A=A+1 A=A+1 A=A+1 A=A+1 M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @1 D=M @6 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @1 A=M+1 A=A+1 A=A+1 M=D @1 D=M @6 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @23915 D=A @6 0;JMP @0 AM=M-1 D=M @23922 D;JNE @23971 0;JMP @1 A=M D=M @0 AM=M+1 A=A-1 M=D @1 D=M @4 A=D+A D=M @0 AM=M+1 A=A-1 M=D @1 D=M @5 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D&M @2 D=A @13 M=D @20701 D=A @14 M=D @23964 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @24145 0;JMP @1 A=M D=M @0 AM=M+1 A=A-1 M=D @1 D=M @5 A=D+A D=M @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @20701 D=A @14 M=D @23999 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=1 @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @1 A=M M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @1 D=M @3 A=D+A D=M @0 AM=M+1 A=A-1 M=D @24046 D=A @38 0;JMP @0 A=M-1 M=!M @0 AM=M-1 D=M @24110 D;JNE @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=1 @0 A=M-1 D=!M M=D+1 @2 D=A @13 M=D @20701 D=A @14 M=D @24081 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=1 @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @1 A=M M=D @24026 0;JMP @1 D=M @3 A=D+A D=M @0 AM=M+1 A=A-1 M=D @1 D=M @4 A=D+A D=M @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @20701 D=A @14 M=D @24140 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @0 M=M+1 A=M-1 M=0 @54 0;JMP @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @2 D=M @3 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=M-D @2 A=M D=M @0 AM=M+1 A=A-1 M=D @2 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @2 A=M D=M @0 AM=M+1 A=A-1 M=D @2 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=M-D @3 D=A @13 M=D @23251 D=A @14 M=D @24224 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @2 D=M @3 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @2 A=M D=M @0 AM=M+1 A=A-1 M=D @2 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @2 A=M D=M @0 AM=M+1 A=A-1 M=D @2 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=M-D @3 D=A @13 M=D @23251 D=A @14 M=D @24302 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @2 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=M-D @2 A=M D=M @0 AM=M+1 A=A-1 M=D @2 D=M @3 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=M-D @2 A=M D=M @0 AM=M+1 A=A-1 M=D @2 D=M @3 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @3 D=A @13 M=D @23251 D=A @14 M=D @24381 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @2 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @2 A=M D=M @0 AM=M+1 A=A-1 M=D @2 D=M @3 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=M-D @2 A=M D=M @0 AM=M+1 A=A-1 M=D @2 D=M @3 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @3 D=A @13 M=D @23251 D=A @14 M=D @24460 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @0 M=M+1 A=M-1 M=0 @54 0;JMP @3 D=A D=D-1 @0 AM=M+1 A=A-1 M=0 @24473 D;JGT @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @24495 D=A @38 0;JMP @2 A=M D=M @0 AM=M+1 A=A-1 M=D @511 D=A @0 AM=M+1 A=A-1 M=D @24512 D=A @22 0;JMP @0 AM=M-1 D=M A=A-1 M=D|M @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @24532 D=A @38 0;JMP @0 AM=M-1 D=M A=A-1 M=D|M @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @255 D=A @0 AM=M+1 A=A-1 M=D @24554 D=A @22 0;JMP @0 AM=M-1 D=M A=A-1 M=D|M @0 AM=M-1 D=M @24566 D;JNE @24589 0;JMP @12 D=A @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @27353 D=A @14 M=D @24584 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @2 A=M D=M @0 AM=M+1 A=A-1 M=D @2 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=M-D @0 M=M+1 A=M-1 M=0 @24617 D=A @38 0;JMP @2 A=M D=M @0 AM=M+1 A=A-1 M=D @2 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @511 D=A @0 AM=M+1 A=A-1 M=D @24647 D=A @22 0;JMP @0 AM=M-1 D=M A=A-1 M=D|M @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @2 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=M-D @0 M=M+1 A=M-1 M=0 @24680 D=A @38 0;JMP @0 AM=M-1 D=M A=A-1 M=D|M @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @2 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @255 D=A @0 AM=M+1 A=A-1 M=D @24715 D=A @22 0;JMP @0 AM=M-1 D=M A=A-1 M=D|M @0 AM=M-1 D=M @24727 D;JNE @24750 0;JMP @13 D=A @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @27353 D=A @14 M=D @24745 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @2 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @1 A=M+1 M=D @0 M=M+1 A=M-1 M=1 @2 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=M-D @0 AM=M-1 D=M @1 A=M+1 A=A+1 M=D @2 A=M D=M @0 AM=M+1 A=A-1 M=D @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @1 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @4 D=A @13 M=D @24151 D=A @14 M=D @24828 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @1 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @24851 D=A @22 0;JMP @0 A=M-1 M=!M @0 AM=M-1 D=M @25099 D;JNE @1 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @24875 D=A @38 0;JMP @0 AM=M-1 D=M @24882 D;JNE @24940 0;JMP @1 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @2 D=A @0 AM=M+1 A=A-1 M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @6822 D=A @14 M=D @24915 D=A @95 0;JMP @0 AM=M-1 D=M A=A-1 M=D+M @3 D=A @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @1 A=M+1 A=A+1 M=D @25030 0;JMP @1 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @2 D=A @0 AM=M+1 A=A-1 M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @1 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=M-D @2 D=A @13 M=D @6822 D=A @14 M=D @24985 D=A @95 0;JMP @0 AM=M-1 D=M A=A-1 M=D+M @5 D=A @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @1 A=M+1 A=A+1 M=D @1 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=1 @0 AM=M-1 D=M A=A-1 M=M-D @0 AM=M-1 D=M @1 A=M+1 M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=1 @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @1 A=M M=D @2 A=M D=M @0 AM=M+1 A=A-1 M=D @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @1 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @4 D=A @13 M=D @24151 D=A @14 M=D @25092 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @24833 0;JMP @0 M=M+1 A=M-1 M=0 @54 0;JMP @3 D=A @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @8643 D=A @14 M=D @25123 D=A @95 0;JMP @0 AM=M-1 D=M @3 M=D @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @25143 D=A @38 0;JMP @0 AM=M-1 D=M @25150 D;JNE @25173 0;JMP @14 D=A @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @27353 D=A @14 M=D @25168 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @25188 D=A @22 0;JMP @0 AM=M-1 D=M @25195 D;JNE @25220 0;JMP @2 A=M D=M @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @5808 D=A @14 M=D @25214 D=A @95 0;JMP @0 AM=M-1 D=M @3 A=M+1 M=D @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @3 A=M M=D @0 M=M+1 A=M-1 M=0 @0 AM=M-1 D=M @3 A=M+1 A=A+1 M=D @3 D=M @0 AM=M+1 A=A-1 M=D @54 0;JMP @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @3 M=D @3 A=M D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @25279 D=A @22 0;JMP @0 AM=M-1 D=M @25286 D;JNE @25310 0;JMP @3 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @5877 D=A @14 M=D @25305 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @3 D=M @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @9357 D=A @14 M=D @25328 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @0 M=M+1 A=M-1 M=0 @54 0;JMP @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @3 M=D @3 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @54 0;JMP @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @3 M=D @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @25388 D=A @38 0;JMP @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @3 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @25407 D=A @22 0;JMP @0 AM=M-1 D=M A=A-1 M=D|M @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @3 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @25431 D=A @6 0;JMP @0 AM=M-1 D=M A=A-1 M=D|M @0 AM=M-1 D=M @25443 D;JNE @25466 0;JMP @15 D=A @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @27353 D=A @14 M=D @25461 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @3 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @4 M=D @4 A=M D=M @0 AM=M+1 A=A-1 M=D @54 0;JMP @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @3 M=D @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @25526 D=A @38 0;JMP @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @3 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @25545 D=A @22 0;JMP @0 AM=M-1 D=M A=A-1 M=D|M @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @3 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @25569 D=A @6 0;JMP @0 AM=M-1 D=M A=A-1 M=D|M @0 AM=M-1 D=M @25581 D;JNE @25604 0;JMP @16 D=A @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @27353 D=A @14 M=D @25599 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @3 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @2 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @5 M=D @0 AM=M-1 D=M @4 M=D @5 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @4 A=M M=D @0 M=M+1 A=M-1 M=0 @54 0;JMP @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @3 M=D @3 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @3 A=M D=M @0 AM=M+1 A=A-1 M=D @25690 D=A @6 0;JMP @0 AM=M-1 D=M @25697 D;JNE @25720 0;JMP @17 D=A @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @27353 D=A @14 M=D @25715 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @3 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @3 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @5 M=D @0 AM=M-1 D=M @4 M=D @5 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @4 A=M M=D @3 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=1 @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @3 A=M+1 A=A+1 M=D @3 D=M @0 AM=M+1 A=A-1 M=D @54 0;JMP @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @3 M=D @3 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @25829 D=A @6 0;JMP @0 AM=M-1 D=M @25836 D;JNE @25859 0;JMP @18 D=A @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @27353 D=A @14 M=D @25854 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @3 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=1 @0 AM=M-1 D=M A=A-1 M=M-D @0 AM=M-1 D=M @3 A=M+1 A=A+1 M=D @0 M=M+1 A=M-1 M=0 @54 0;JMP @5 D=A D=D-1 @0 AM=M+1 A=A-1 M=0 @25891 D;JGT @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @3 M=D @3 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @25926 D=A @6 0;JMP @0 AM=M-1 D=M @25933 D;JNE @25939 0;JMP @0 M=M+1 A=M-1 M=0 @54 0;JMP @0 M=M+1 A=M-1 M=0 @0 A=M-1 M=!M @0 AM=M-1 D=M @1 A=M+1 A=A+1 A=A+1 M=D @0 M=M+1 A=M-1 M=0 @3 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @4 M=D @4 A=M D=M @0 AM=M+1 A=A-1 M=D @45 D=A @0 AM=M+1 A=A-1 M=D @25992 D=A @6 0;JMP @0 AM=M-1 D=M @25999 D;JNE @26025 0;JMP @0 M=M+1 A=M-1 M=0 @0 A=M-1 M=!M @0 AM=M-1 D=M @1 A=M+1 A=A+1 A=A+1 A=A+1 M=D @0 M=M+1 A=M-1 M=1 @0 AM=M-1 D=M @1 A=M M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @3 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @26044 D=A @38 0;JMP @1 D=M @3 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D&M @0 A=M-1 M=!M @0 AM=M-1 D=M @26249 D;JNE @1 A=M D=M @0 AM=M+1 A=A-1 M=D @3 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @4 M=D @4 A=M D=M @0 AM=M+1 A=A-1 M=D @48 D=A @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=M-D @0 AM=M-1 D=M @1 A=M+1 A=A+1 M=D @1 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @26131 D=A @38 0;JMP @1 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @9 D=A @0 AM=M+1 A=A-1 M=D @26149 D=A @22 0;JMP @0 AM=M-1 D=M A=A-1 M=D|M @0 A=M-1 M=!M @0 AM=M-1 D=M @1 A=M+1 A=A+1 A=A+1 M=D @1 D=M @3 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @26181 D;JNE @26247 0;JMP @1 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @10 D=A @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @6822 D=A @14 M=D @26206 D=A @95 0;JMP @1 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @1 A=M+1 M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=1 @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @1 A=M M=D @26025 0;JMP @1 D=M @4 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @26265 D;JNE @26282 0;JMP @1 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @0 A=M-1 D=!M M=D+1 @0 AM=M-1 D=M @1 A=M+1 M=D @1 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @54 0;JMP @4 D=A D=D-1 @0 AM=M+1 A=A-1 M=0 @26293 D;JGT @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @3 M=D @3 A=M D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @26327 D=A @6 0;JMP @0 AM=M-1 D=M @26334 D;JNE @26357 0;JMP @19 D=A @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @27353 D=A @14 M=D @26352 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @6 D=A @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @5808 D=A @14 M=D @26375 D=A @95 0;JMP @0 AM=M-1 D=M @1 A=M+1 A=A+1 M=D @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @26397 D=A @38 0;JMP @0 AM=M-1 D=M @26404 D;JNE @26436 0;JMP @0 M=M+1 A=M-1 M=0 @0 A=M-1 M=!M @0 AM=M-1 D=M @1 A=M+1 A=A+1 A=A+1 M=D @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @0 A=M-1 D=!M M=D+1 @0 AM=M-1 D=M @2 A=M+1 M=D @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @1 A=M+1 M=D @1 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @26464 D=A @22 0;JMP @0 A=M-1 M=!M @0 AM=M-1 D=M @26630 D;JNE @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @10 D=A @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @7287 D=A @14 M=D @26497 D=A @95 0;JMP @0 AM=M-1 D=M @1 A=M+1 M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @1 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @48 D=A @0 AM=M+1 A=A-1 M=D @2 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @1 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @10 D=A @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @6822 D=A @14 M=D @26561 D=A @95 0;JMP @0 AM=M-1 D=M A=A-1 M=M-D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @5 M=D @0 AM=M-1 D=M @4 M=D @5 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @4 A=M M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=1 @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @1 A=M M=D @1 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @2 A=M+1 M=D @26449 0;JMP @1 D=M @3 A=D+A D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @26646 D;JNE @26716 0;JMP @1 A=M D=M @0 AM=M+1 A=A-1 M=D @1 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @45 D=A @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @5 M=D @0 AM=M-1 D=M @4 M=D @5 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @4 A=M M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=1 @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @1 A=M M=D @3 A=M D=M @0 AM=M+1 A=A-1 M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @26734 D=A @38 0;JMP @0 AM=M-1 D=M @26741 D;JNE @26764 0;JMP @19 D=A @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @27353 D=A @14 M=D @26759 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @26779 D=A @6 0;JMP @0 AM=M-1 D=M @26786 D;JNE @26843 0;JMP @0 M=M+1 A=M-1 M=0 @3 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @48 D=A @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @5 M=D @0 AM=M-1 D=M @4 M=D @5 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @4 A=M M=D @0 M=M+1 A=M-1 M=1 @0 AM=M-1 D=M @3 A=M+1 A=A+1 M=D @27003 0;JMP @0 M=M+1 A=M-1 M=0 @0 AM=M-1 D=M @3 A=M+1 A=A+1 M=D @3 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @26873 D=A @38 0;JMP @0 A=M-1 M=!M @0 AM=M-1 D=M @27003 D;JNE @3 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @3 A=M+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @1 A=M D=M @0 AM=M+1 A=A-1 M=D @3 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=1 @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M A=A-1 M=M-D @1 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @4 M=D @4 A=M D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @5 M=D @0 AM=M-1 D=M @4 M=D @5 D=M @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @4 A=M M=D @3 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=1 @0 AM=M-1 D=M A=A-1 M=D+M @0 AM=M-1 D=M @3 A=M+1 A=A+1 M=D @26854 0;JMP @1 A=M+1 A=A+1 D=M @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @5877 D=A @14 M=D @27023 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @0 M=M+1 A=M-1 M=0 @54 0;JMP @128 D=A @0 AM=M+1 A=A-1 M=D @54 0;JMP @129 D=A @0 AM=M+1 A=A-1 M=D @54 0;JMP @34 D=A @0 AM=M+1 A=A-1 M=D @54 0;JMP @0 D=A @13 M=D @8453 D=A @14 M=D @27070 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @0 D=A @13 M=D @6505 D=A @14 M=D @27087 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @0 D=A @13 M=D @20329 D=A @14 M=D @27104 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @0 D=A @13 M=D @9854 D=A @14 M=D @27121 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @0 D=A @13 M=D @5918 D=A @14 M=D @27138 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @0 D=A @13 M=D @3837 D=A @14 M=D @27155 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @0 D=A @13 M=D @27177 D=A @14 M=D @27172 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @0 M=M+1 A=M-1 M=0 @0 A=M-1 M=!M @0 A=M-1 M=!M @0 AM=M-1 D=M @27194 D;JNE @27177 0;JMP @0 AM=M+1 A=A-1 M=0 @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @27213 D=A @38 0;JMP @0 AM=M-1 D=M @27220 D;JNE @27241 0;JMP @0 M=M+1 A=M-1 M=1 @1 D=A @13 M=D @27353 D=A @14 M=D @27236 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @27256 D=A @22 0;JMP @0 A=M-1 M=!M @0 AM=M-1 D=M @27347 D;JNE @50 D=A @0 AM=M+1 A=A-1 M=D @0 AM=M-1 D=M @1 A=M M=D @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=0 @27291 D=A @22 0;JMP @0 A=M-1 M=!M @0 AM=M-1 D=M @27323 D;JNE @1 A=M D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=1 @0 AM=M-1 D=M A=A-1 M=M-D @0 AM=M-1 D=M @1 A=M M=D @27276 0;JMP @2 A=M D=M @0 AM=M+1 A=A-1 M=D @0 M=M+1 A=M-1 M=1 @0 AM=M-1 D=M A=A-1 M=M-D @0 AM=M-1 D=M @2 A=M M=D @27241 0;JMP @0 M=M+1 A=M-1 M=0 @54 0;JMP @3 D=A @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @25105 D=A @14 M=D @27371 D=A @95 0;JMP @69 D=A @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @25659 D=A @14 M=D @27389 D=A @95 0;JMP @82 D=A @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @25659 D=A @14 M=D @27407 D=A @95 0;JMP @82 D=A @0 AM=M+1 A=A-1 M=D @2 D=A @13 M=D @25659 D=A @14 M=D @27425 D=A @95 0;JMP @1 D=A @13 M=D @19850 D=A @14 M=D @27437 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @2 A=M D=M @0 AM=M+1 A=A-1 M=D @1 D=A @13 M=D @19981 D=A @14 M=D @27461 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D @0 D=A @13 M=D @27177 D=A @14 M=D @27478 D=A @95 0;JMP @0 AM=M-1 D=M @5 M=D
4.661962
51
0.507514
79fb849e8bc6256779ccd8007b4ac880b7d41f14
584
asm
Assembly
programs/oeis/313/A313538.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/313/A313538.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/313/A313538.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A313538: Coordination sequence Gal.5.110.4 where G.u.t.v denotes the coordination sequence for a vertex of type v in tiling number t in the Galebach list of u-uniform tilings. ; 1,5,10,14,19,23,28,32,37,42,47,52,56,61,65,70,74,79,84,89,94,98,103,107,112,116,121,126,131,136,140,145,149,154,158,163,168,173,178,182,187,191,196,200,205,210,215,220,224,229 mov $2,$0 lpb $0 add $1,$0 add $0,$1 lpb $1 sub $0,1 div $1,3 mod $1,3 mov $4,$3 add $3,1 lpe sub $0,1 div $0,2 add $5,1 lpe add $4,$5 mov $1,$4 add $1,1 mov $6,$2 mul $6,3 add $1,$6 mov $0,$1
22.461538
177
0.633562
2fb1bd62ce64eb030a0d04726505be06d21d158e
471
asm
Assembly
programs/oeis/129/A129186.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/129/A129186.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/129/A129186.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A129186: Right shift operator generating 1's in shifted spaces. ; 1,1,0,0,1,0,0,0,1,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0 mov $5,$0 mov $6,2 lpb $6,1 mov $0,$5 sub $6,1 add $0,$6 sub $0,1 mov $3,1 lpb $0,1 sub $0,1 add $3,1 trn $0,$3 lpe mov $2,$3 mov $4,$6 lpb $4,1 mov $1,$2 sub $4,1 lpe lpe lpb $5,1 sub $1,$2 mov $5,0 lpe
16.821429
153
0.509554
4a9dc623b2bf8c582eb48782b82e8924db47af56
15,847
asm
Assembly
lib/am335x_sdk/ti/drv/emac/firmware/icss_dualmac/src/rtu_v2.asm
brandonbraun653/Apollo
a1ece2cc3f1d3dae48fdf8fe94f0bbb59d405fce
[ "MIT" ]
2
2021-12-27T10:19:01.000Z
2022-03-15T07:09:06.000Z
lib/am335x_sdk/ti/drv/emac/firmware/icss_dualmac/src/rtu_v2.asm
brandonbraun653/Apollo
a1ece2cc3f1d3dae48fdf8fe94f0bbb59d405fce
[ "MIT" ]
null
null
null
lib/am335x_sdk/ti/drv/emac/firmware/icss_dualmac/src/rtu_v2.asm
brandonbraun653/Apollo
a1ece2cc3f1d3dae48fdf8fe94f0bbb59d405fce
[ "MIT" ]
null
null
null
; ; TEXAS INSTRUMENTS TEXT FILE LICENSE ; ; Copyright (c) 2018-2019 Texas Instruments Incorporated ; ; All rights reserved not granted herein. ; ; Limited License. ; ; Texas Instruments Incorporated grants a world-wide, royalty-free, non-exclusive ; license under copyrights and patents it now or hereafter owns or controls to ; make, have made, use, import, offer to sell and sell ("Utilize") this software ; subject to the terms herein. With respect to the foregoing patent license, ; such license is granted solely to the extent that any such patent is necessary ; to Utilize the software alone. The patent license shall not apply to any ; combinations which include this software, other than combinations with devices ; manufactured by or for TI (“TI Devices”). No hardware patent is licensed hereunder. ; ; Redistributions must preserve existing copyright notices and reproduce this license ; (including the above copyright notice and the disclaimer and (if applicable) source ; code license limitations below) in the documentation and/or other materials provided ; with the distribution. ; ; Redistribution and use in binary form, without modification, are permitted provided ; that the following conditions are met: ; No reverse engineering, decompilation, or disassembly of this software is ; permitted with respect to any software provided in binary form. ; Any redistribution and use are licensed by TI for use only with TI Devices. ; Nothing shall obligate TI to provide you with source code for the software ; licensed and provided to you in object code. ; ; If software source code is provided to you, modification and redistribution of the ; source code are permitted provided that the following conditions are met: ; Any redistribution and use of the source code, including any resulting derivative ; works, are licensed by TI for use only with TI Devices. ; Any redistribution and use of any object code compiled from the source code ; and any resulting derivative works, are licensed by TI for use only with TI Devices. ; ; Neither the name of Texas Instruments Incorporated nor the names of its suppliers ; may be used to endorse or promote products derived from this software without ; specific prior written permission. ; ; DISCLAIMER. ; ; THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS OR IMPLIED ; WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY ; AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL TI AND TI’S ; LICENSORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ; CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE ; GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ; CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, ; EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ;Test Code for RTU {{{1 ; 2nd version ; functions: ; TM2 tasks: mirror rx tasks on pRU ; TM1 tasks: scheduler tick, ipc from PRU, ipc from other RTU, txl2 events ; BG task: spin on PSI READ Status, and pull in packet from PSI and send to PORTQ in external memory ; add descriptor to portQ or push descriptor to other RTU ; scheduler: run mostly in sched_tick RX_RAW .set 1 ; includes {{{1 .include "regs.h" .include "smem.h" .include "spin.h" .include "xfr2vbus_widget.h" .include "xfr2psi_widget.h" .include "tm.h" .include "bsram_rtu.h" .include "reg_alias.h" .include "rx.h" .include "tx.h" .include "portq.h" .include "lebe.h" .include "bpool.h" .include "hd_helper.h" .include "scheduler.h" .include "ipc.h" .include "filter.h" .include "classi.h" .include "txrate.h" .include "rtu_psi.h" .include "iep.h" .include "pa_stat.h" loop_here .macro here?: jmp here? .endm wait4pru_ready .macro .newblock ldi32 r1, PRU_READY ldi32 r0, FW_CONFIG $1: add r0, r0, 0 add r0, r0, 0 add r0, r0, 0 lbbo &r9, r0, CFG_STATUS, 4 qbne $1, r9, r1 ldi32 r2, RTU_READY sbbo &r2, r0, CFG_RTU_STATUS, 4 .endm ; r8 - starting address, r12 - address of the 1st pull size create_8_buff_pools .macro starting_slot .newblock ldi r13, 0 ldi r14, starting_slot $1: lbbo &r9, r12, 0, 4 BUFP_CREATE r14, r8, r9 add r8, r8, r9 add r8, r8, 128 add r13, r13, 1 add r14, r14, 1 add r12, r12, 4 qbgt $1, r13, 8 .endm ;buffps for Ethernet pkts from wire create_all_buff_pools .macro mov r8, r18 ; start from the beginning of the buffer memory ;buffps for PSI pkts for this slice ldi32 r12, FW_CONFIG + CFG_TX_BS_8 create_8_buff_pools BP_SLOT0_RTU .endm create_port_queues .macro .newblock ;create portQs :: 8 for this slice and 8 shadow for other slice) ldi r13, 0 ldi r14, MQ_SLOT0_RTU ldi32 r0, MQBASE_START ldi r1, PQ_MAX_PKT_RTU $1: MQ_CREATE r14, r0, r1 mov r0, r5 add r14, r14, 1 add r13, r13, 1 qbge $1, r13, 8 .endm ; Code starts {{{1 .retain ; Required for building .out with assembly file .retainrefs ; Required for building .out with assembly file .sect ".text:Start" .global Start Start: TM_DISABLE zero &r0, 124 ldi r11, 1 ; rtu err counter: b0 = RXdropPsi (widget full), b1=RXdropErr, b2=TXstall, b3= txError ldi r30,0 .if $isdefed("WAIT_FOR_DEBUGGER") mov r11, 0 .endif start_test: qbeq start_test, r11, 0 ; SP_SHIFT_ENABLE ;one time initialization wait4pru_ready ; r0 has FW_CONFIG from previouse macro lbbo &r5, r0, CFG_DEF_FLOW, 8 ; r5 - flow, r6 - flags lbbo &r3, r0, CFG_ADDR_LO, 8; ;r3=addrlo, r4=addrhi (not used. todo check against #define and barf) ;r5 = flow ;r6 = flags ;r7 = portstate (RX) VA - we don't have it anymore ;save def flow & flags ;port state conversion to something useful ldi r0, 0 ;default: (3)= fwd plus learn set r0.t3 ;fwd set r0.t4 ;lrn ;hostport tbd .if $isdefed ("VLAN_ENABLED") set r6.t0 .endif mov r7, r0 RX_TASK_INIT_RTU r6, r5, r7 add r18, r3, 0x80 ;skip 128 bytes .. mov r19, r4 PAGE_SAVE RTU_GSTATE create_all_buff_pools create_port_queues ;set up PSI INFO, CONTROL, STATUS TEMPLATES .if $isdefed("SLICE0") PSI_SETUP_INFO PSI_INFO_SLOT, 1 .else PSI_SETUP_INFO PSI_INFO_SLOT, 2 .endif PSI_SETUP_MGR_INFO PSI_SETUP_STATUS PSI_STATUS_SLOT ;initialize txrate limiters for each thread ldi r2, 0 TXRATE_INIT 0, r1, r2 TXRATE_INIT 1, r1, r2 TXRATE_INIT 2, r1, r2 TXRATE_INIT 3, r1, r2 ;setup taskmanager TM_RTU_CONFIG TX_EOD_P, TX_EOD_E, TM_NOP, TX_EOF, TM_NOP, TM_NOP, rtu_rx_task2, TM_NOP, TM_NOP, TM_NOP TM_ENABLE ;set up IEP - assume this only needs to get done once ENABLE_IEP IEP_BASEx ;we READY FOR NEW PACKET zero &Ctx, 20 ;now set ingress context ;---------------start test------------ {{{1 ;init scheduler zero &GRrtu.pqmap, 4 ldi GRrtu.qmask, NORM_QMASK ;look at all queues ;intialize PS global state ldi GRrtu.StallMask, 0xf ;no stalls QLOCK_INIT ;clear resource lock ldi GRrtu.ActThrdNum, 0 ;nothing active ldi GRrtu.StallReason, 0 ;no stall reason ;------------------------------- ; RTU BG LOOP {{{1 ;------------------------------- bg_loop: ;start of psi host egress handler ;------------------------------------------------------------- ; psi is Idle, meaning we aren't actively bring in data from a ; PSI thread. But we may be stalled ;------------------------------------------------------------- psi_idle: xin XID_PSI_S, &r1, 8 and r1.b0, r1.b0, GRrtu.StallMask qbeq no_psi, r1.b0, 0 qbbc $1, r1, 0 ldi GRrtu.ActThrdNum, 0x0 and GRrtu.StallReason, GRrtu.StallReason, 0xfc jmp start_psi $1: qbbc $2, r1, 1 ldi GRrtu.ActThrdNum, 1 and GRrtu.StallReason, GRrtu.StallReason, 0xf3 jmp start_psi $2: qbbc $3, r1, 2 ldi GRrtu.ActThrdNum, 2 and GRrtu.StallReason, GRrtu.StallReason, 0xcf jmp start_psi $3: qbbc no_psi, r1, 3 ldi GRrtu.ActThrdNum, 3 and GRrtu.StallReason, GRrtu.StallReason, 0x3f jmp start_psi no_psi: jmp psi_idle2 psi_idle3: CALL_SUB sstate_00, psi_idle jmp psi_idle ;--------------------------------------- ;PSI is idle but we may have stalled threads ;--------------------------------------- psi_idle2: ;see if we can unstall anyone qbeq psi_idle3, GRrtu.StallMask, 0x0f ;make sure r16, r17 dont get stomped on!!! ldi r16, 0 ldi r17, PSI_CNTX0_SLOT unstall_loop: qbbs skipu, GRrtu.StallMask, r16 TRY_UNSTALL r16, r17, skipu skipu: add r16, r16, 1 add r17, r17, 1 qbgt unstall_loop, r16, 4 jmp psi_idle3 mgr_pkt: RTU_POLL_SLOTx GRrtu.ActThrdNum PSI_READ GRrtu.ActThrdNum, 20 ldi32 r0, MD_CONTROL0 qbeq mgr_pkt, r1, r0 ldi32 r0, MD_PROINFO qbeq mgr_pkt, r1, r0 qbne mgr_pkt01, r1.b2, 0x14; ; we have 16 bytes of packet now ; process mgr data LEBE_GO r2, 16 qbne mgr_pkt01, r2.b3, 0x81 ; not a management packet mov GRrtu.seq_num, r2.b1 ; save seq_num qbne mgr_pkt10, r2.b2, 0x01 ; shutdown command MGR_SHUTDOWN ldi32 r2, 0x81010001 ; response OK mov r2.b1, GRrtu.seq_num TM_DISABLE SEND_MGR_PKT ldi32 r0, FW_CONFIG ldi32 r1, RTU_STOPPED sbbo &r1, r0, CFG_RTU_STATUS, 4 loop_here mgr_pkt10: qbne mgr_pkt20, r2.b2, 0x02 ; set port state ldi32 r0, FW_CONFIG sbbo &r2, r0, CMD_PARAM, 4 ; store the command to smem ldi32 r1, RTU_SETPORT sbbo &r1, r0, CFG_RTU_STATUS, 4; tell PRU about the command ; usually CFG_RTU_STATUS can be updated by RTU only, but ; we don't want pru to execute the command in endless loop. ; so pru updates CFG_RTU_STATUS status when it has finished the ; command ldi32 r1, PRU_DONE mgr_pkt11: add r0, r0, 0 ; nop lbbo &r9, r0, CFG_RTU_STATUS, 4 qbne mgr_pkt11, r9, r1 ldi32 r9, RTU_READY sbbo &r9, r0, CFG_RTU_STATUS, 4 ; pru is done, lets update speed_f on rtu .if $isdefed("SLICE0") and r2.b0, r2.b0, 0x0e and GRrtu.speed_f, GRrtu.speed_f, 0xf1 .else lsl r2.b0, r2.b0, 4 and r2.b0, r2.b0, 0xe0 and GRrtu.speed_f, GRrtu.speed_f, 0x1f .endif or GRrtu.speed_f, GRrtu.speed_f, r2.b0 ; OK, tell host we are done ldi32 r2, 0x81020001 ; response OK mov r2.b1, GRrtu.seq_num SEND_MGR_PKT jmp mgr_pkt02 mgr_pkt20: mgr_unknown: ldi r2.b0, 0x10 mov r2.b1, GRrtu.seq_num SEND_MGR_PKT jmp psi_idle mgr_pkt01: branch_if_eop mgr_pkt02 WAIT_EOP mgr_pkt02: jmp psi_idle ;------------------------- ; process active thread ; GRrtu.ActThrdNum = bit of active thread set ; GRrtu.StallMask = cleared bits => stalled threads ; GRrtu.StallReason = reason for stalled threads ; GRrtu.ResLock = resource locks taken ;------------------------ start_psi: ;S0: read in INFO RTU_PSI_IN_S0 err_exit00, stall_exit00, mgr_pkt unstall00: ;S1: wait for 1st DATA or control wait_1stdata0: RTU_POLL_SLOTx GRrtu.ActThrdNum RTU_PSI_IN_S1 err_exit01, wait_1stdata0 CALL_SUB sstate_00, wait_fdb_done0 ;F0: wait for FDB result ;todo: optimizaton: bring in next 2x16 while fdb in progress wait_fdb_done0: unstall01: RTU_PSI_IN_F0_PART2 stall_exit01, stall_exit02 unstall02: ;r2, 3, 4 wait for remaining 3x16B qbeq sr20, GRrtu.ActThrdNum, 0 qbeq sr21, GRrtu.ActThrdNum, 1 qbeq sr22, GRrtu.ActThrdNum, 2 RTU_PSI_READ_SR2_4 XID_PSI_R4, BS_SLOT_PSI3, loop_psi0_0, eop_exit00, eop_exit01 sr22: RTU_PSI_READ_SR2_4 XID_PSI_R3, BS_SLOT_PSI2, loop_psi0_0, eop_exit00, eop_exit01 sr21: RTU_PSI_READ_SR2_4 XID_PSI_R2, BS_SLOT_PSI1, loop_psi0_0, eop_exit00, eop_exit01 sr20: RTU_PSI_READ_SR2_4 XID_PSI_R1, BS_SLOT_PSI0, loop_psi0_0, eop_exit00, eop_exit01 loop_psi0_0: DO_WRITE64 XFR2VBUS_XID_WRITE1, 64 CALL_SUB sstate_00, loop_psi1_0 ;r1, 2, 3, 4 wait for 4x 16Byte chunks; loop_psi1_0: qbeq sr40, GRrtu.ActThrdNum, 0 qbeq sr41, GRrtu.ActThrdNum, 1 qbeq sr42, GRrtu.ActThrdNum, 2 RTU_PSI_READ_SR1_4 XID_PSI_R4, loop_psi2_0, eop_exit02 sr42: RTU_PSI_READ_SR1_4 XID_PSI_R3, loop_psi2_0, eop_exit02 sr41: RTU_PSI_READ_SR1_4 XID_PSI_R2, loop_psi2_0, eop_exit02 sr40: RTU_PSI_READ_SR1_4 XID_PSI_R1, loop_psi2_0, eop_exit02 loop_psi2_0: DO_WRITE64 XFR2VBUS_XID_WRITE1, 64 CALL_SUB sstate_00, loop_psi1_0 jmp loop_psi1_0 ;SPECIAL CASES FOR THREADs ;stall cases. Processing for this thread is stalled ; park context, set b0 to ignore this thread ; (when parking context, label where to restart thread is saved) stall_exit03: ;stall due to no room in queue STALL_N_PARK SR_QUEUE, PARK_THREAD1, unstall03 add r30.b2, r30.b2, 1 jmp psi_idle2 stall_exit02: ;stall due to no buffer STALL_N_PARK SR_BUF, PARK_THREAD1, unstall02 add r30.b2, r30.b2, 1 jmp psi_idle2 stall_exit01: ; STALL on resource lock STALL_N_PARK SR_LOCK, PARK_THREAD0, unstall01 add r30.b2, r30.b2, 1 jmp psi_idle2 stall_exit00: ;stalled due to rate limiter clr GRrtu.StallMask, GRrtu.StallMask, GRrtu.ActThrdNum ;stall reason is 0 (default) add r11, GRrtu.ActThrdNum, PSI_CNTX0_SLOT PARK_THREAD0 r11, unstall00 add r30.b2, r30.b2, 1 jmp psi_idle2 ;-------------------- ;EOP exits ;------------------- ;less<64 pkt seen ;special case: len=60, 61, 62, 63 eop_exit00: eop_exit01: qbbc dow, r1, 1 ;r1.f_md_eop set Ctx.ippc_flags, Ctx.ippc_flags, f_eop dow: DO_WRITE64 XFR2VBUS_XID_WRITE1, r1.b3 ;todo clear crc included bit (cause it couldn't have been) jmp do_eop00 ;normal sized packet exit eop_exit02: qbbc dow2, r1, 1 ;r1.f_md_eop set Ctx.ippc_flags, Ctx.ippc_flags, f_eop dow2: ;todo check if crc included or not. if it is then r1.b3 better be >=64 DO_WRITE64 XFR2VBUS_XID_WRITE1, r1.b3 ;do eop processing for pkt (i.e. post it to portQ and/or IPCQ) {{{2 do_eop00: unstall03: DO_EOP stall_exit03 ;last thing to do is wait for EOP qbbc weop, Ctx.ippc_flags, f_eop jmp psi_idle2 weop: WAIT_EOP jmp psi_idle2 err_exit00: qbbs err_exit, r1, 1 ; don't do anything if eop already set ;ERROR: Drop pkt. Note: won't service PSI unti we eop on this thread err_exit01: ;some kind of error.. for now just toss until EOP WAIT_EOP add r30.b2, r30.b2, 1 err_exit: jmp psi_idle ;end of psi host egress loop_here ;----------------TASK HANDLERS---------------------- ;-------------------------------------------------------------- ; RX TASK2 (SOF HELPER) - HIGHEST PRIORITY TASK and MUST HAPPEN {{{1 ;---------------------- rtu_rx_task2: mov GRrtu.save1, r0.b0 ldi r0.b0, 0 flip_rtu_r0_r23 ldi R_RX_STATE, 0x180 ;read filter. clobbers r10-12. copy r11, r2 into scratch3, 4 FILTER_GET_ALL ;blasts into r10-r17 mov R_BASIC_F, r11 ;move basic filter results to somewhere safe ;see if "to-host" classifier says take it TOHOST_OK R_CLASSI, try_to_host ;use classifiers to determine psi flow and r0.b0, R_CLASSI.b2, CLASSI_FMASK lmbd R_PSI_FLAGS.w0, r0.b0, 1 ldi R_RX_STATE.b0, 0x81 ;rx_flags try_to_host: qbbc rx_task2_done, R_RX_STATE, f_tohost ;PSI flow. for mac we did earlier send_info: qblt send_info1, R_PSI_FLAGS.w0, 15 ; add R_PSI_FLAGS.w0, R_PSI_FLAGS.w0, R_RX_STATE_INFO.w0 jmp rx_task2_done send_info1: ldi R_PSI_FLAGS.w0, 0x3fff ; ;todo -> set from filter results (IPv4, v6, udp, tcp) rx_task2_done: ;send forwarding info to PRU. he will pick it up at start of RX_Block1 ; THIS MUST HAPPEN!! ELSE PKT DROPPED In RTU mov r5, R_RX_STATE mov r6, R_PSI_FLAGS ;send flow over RTU_IPC_TX_CH1 ;read the rxtimestamp qbbc rx_task2_done2, R_RX_STATE, f_tohost GET_PKT_RX_TS R_TS_HI ;note classi clobbered here ldi32 r5, FW_CONFIG + RX_TS_BASE sbbo &R_TS_HI, r5, 0, 8 rx_task2_done2: ldi r0.b0, 0 TM_YIELD ;caution: 2 instr after yield are done in delayed-branch fashion flip_rtu_r0_r23 mov r0.b0, GRrtu.save1 loop_here ;========END RX_TASK2============== TX_EOF: TM_YIELD set GRrtu.flags, GRrtu.flags, f_tstx_ready loop_here TX_EOD_P: TM_YIELD set GRrtu.flags, GRrtu.flags, f_tx0_complete loop_here TX_EOD_E: TM_YIELD set GRrtu.flags, GRrtu.flags, f_tx1_complete loop_here TM_NOP: TM_YIELD loop_here ;----------------------- ;sched co-routine ;----------------------- sstate_00: STATE_00_EP jmp GRrtu.ret_addr .include "resource_table.h"
28.247772
105
0.72632
b27d5562b6822e20e18a7c3522d7f8c307976f77
289
asm
Assembly
programs/oeis/173/A173635.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/173/A173635.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/173/A173635.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A173635: Period 5 sequence: 1, 1, 4, 4, 2, ... ; 1,1,4,4,2,1,1,4,4,2,1,1,4,4,2,1,1,4,4,2,1,1,4,4,2,1,1,4,4,2,1,1,4,4,2,1,1,4,4,2,1,1,4,4,2,1,1,4,4,2,1,1,4,4,2,1,1,4,4,2,1,1,4,4,2,1,1,4,4,2,1,1,4,4,2,1,1,4,4,2,1 mod $0,5 mov $2,3 lpb $0,1 sub $0,$2 mov $1,$2 gcd $2,2 lpe add $1,1
24.083333
163
0.50519
b6e4212d034f256e7f1d4ba4cddbf55813e22af3
170,891
asm
Assembly
src/z80asm/t/data/zx48_07.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
src/z80asm/t/data/zx48_07.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
1,600
2017-01-15T16:12:02.000Z
2022-03-31T12:11:12.000Z
src/z80asm/t/data/zx48_07.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
215
2017-01-17T10:43:03.000Z
2022-03-23T17:25:02.000Z
;*************************************************** ;** Part 7. BASIC LINE AND COMMAND INTERPRETATION ** ;*************************************************** PUBLIC L1ADF PUBLIC L1B17 PUBLIC L1B8A PUBLIC L1BEE PUBLIC L1C2E PUBLIC L1C79 PUBLIC L1C82 PUBLIC L1C8A PUBLIC L1C8C PUBLIC L1CDE PUBLIC L1CE6 PUBLIC L1D86 PUBLIC L1E94 PUBLIC L1E99 PUBLIC L1E9F PUBLIC L1F05 PUBLIC L1F15 PUBLIC L1F54 PUBLIC L2048 PUBLIC L2070 PUBLIC L2211 PUBLIC L22CB PUBLIC L2307 EXTERN L0055 EXTERN L0077 EXTERN L0078 EXTERN L03F8 EXTERN L0605 EXTERN L0BDB EXTERN L0D4D EXTERN L0D6B EXTERN L0D6E EXTERN L0DD9 EXTERN L0EAC EXTERN L0F2C EXTERN L111D EXTERN L11A7 EXTERN L11B7 EXTERN L1601 EXTERN L160E EXTERN L1655 EXTERN L16BF EXTERN L16E5 EXTERN L1736 EXTERN L1793 EXTERN L17F5 EXTERN L17F9 EXTERN L196E EXTERN L198B EXTERN L19E5 EXTERN L19FB EXTERN L24FB EXTERN L2530 EXTERN L28B2 EXTERN L2996 EXTERN L2AB2 EXTERN L2AFF EXTERN L2BF1 EXTERN L2C02 EXTERN L2C8D EXTERN L2D28 EXTERN L2DA2 EXTERN L2DD5 EXTERN L2DE3 EXTERN L34E9 ; ---------------- ; The offset table ; ---------------- ; The BASIC interpreter has found a command code $CE - $FF ; which is then reduced to range $00 - $31 and added to the base address ; of this table to give the address of an offset which, when added to ; the offset therein, gives the location in the following parameter table ; where a list of class codes, separators and addresses relevant to the ; command exists. ;; offst-tbl L1A48: DEFB L1AF9 - ASMPC ; B1 offset to Address: P-DEF-FN DEFB L1B14 - ASMPC ; CB offset to Address: P-CAT DEFB L1B06 - ASMPC ; BC offset to Address: P-FORMAT DEFB L1B0A - ASMPC ; BF offset to Address: P-MOVE DEFB L1B10 - ASMPC ; C4 offset to Address: P-ERASE DEFB L1AFC - ASMPC ; AF offset to Address: P-OPEN DEFB L1B02 - ASMPC ; B4 offset to Address: P-CLOSE DEFB L1AE2 - ASMPC ; 93 offset to Address: P-MERGE DEFB L1AE1 - ASMPC ; 91 offset to Address: P-VERIFY DEFB L1AE3 - ASMPC ; 92 offset to Address: P-BEEP DEFB L1AE7 - ASMPC ; 95 offset to Address: P-CIRCLE DEFB L1AEB - ASMPC ; 98 offset to Address: P-INK DEFB L1AEC - ASMPC ; 98 offset to Address: P-PAPER DEFB L1AED - ASMPC ; 98 offset to Address: P-FLASH DEFB L1AEE - ASMPC ; 98 offset to Address: P-BRIGHT DEFB L1AEF - ASMPC ; 98 offset to Address: P-INVERSE DEFB L1AF0 - ASMPC ; 98 offset to Address: P-OVER DEFB L1AF1 - ASMPC ; 98 offset to Address: P-OUT DEFB L1AD9 - ASMPC ; 7F offset to Address: P-LPRINT DEFB L1ADC - ASMPC ; 81 offset to Address: P-LLIST DEFB L1A8A - ASMPC ; 2E offset to Address: P-STOP DEFB L1AC9 - ASMPC ; 6C offset to Address: P-READ DEFB L1ACC - ASMPC ; 6E offset to Address: P-DATA DEFB L1ACF - ASMPC ; 70 offset to Address: P-RESTORE DEFB L1AA8 - ASMPC ; 48 offset to Address: P-NEW DEFB L1AF5 - ASMPC ; 94 offset to Address: P-BORDER DEFB L1AB8 - ASMPC ; 56 offset to Address: P-CONT DEFB L1AA2 - ASMPC ; 3F offset to Address: P-DIM DEFB L1AA5 - ASMPC ; 41 offset to Address: P-REM DEFB L1A90 - ASMPC ; 2B offset to Address: P-FOR DEFB L1A7D - ASMPC ; 17 offset to Address: P-GO-TO DEFB L1A86 - ASMPC ; 1F offset to Address: P-GO-SUB DEFB L1A9F - ASMPC ; 37 offset to Address: P-INPUT DEFB L1AE0 - ASMPC ; 77 offset to Address: P-LOAD DEFB L1AAE - ASMPC ; 44 offset to Address: P-LIST DEFB L1A7A - ASMPC ; 0F offset to Address: P-LET DEFB L1AC5 - ASMPC ; 59 offset to Address: P-PAUSE DEFB L1A98 - ASMPC ; 2B offset to Address: P-NEXT DEFB L1AB1 - ASMPC ; 43 offset to Address: P-POKE DEFB L1A9C - ASMPC ; 2D offset to Address: P-PRINT DEFB L1AC1 - ASMPC ; 51 offset to Address: P-PLOT DEFB L1AAB - ASMPC ; 3A offset to Address: P-RUN DEFB L1ADF - ASMPC ; 6D offset to Address: P-SAVE DEFB L1AB5 - ASMPC ; 42 offset to Address: P-RANDOM DEFB L1A81 - ASMPC ; 0D offset to Address: P-IF DEFB L1ABE - ASMPC ; 49 offset to Address: P-CLS DEFB L1AD2 - ASMPC ; 5C offset to Address: P-DRAW DEFB L1ABB - ASMPC ; 44 offset to Address: P-CLEAR DEFB L1A8D - ASMPC ; 15 offset to Address: P-RETURN DEFB L1AD6 - ASMPC ; 5D offset to Address: P-COPY ; ------------------------------- ; The parameter or "Syntax" table ; ------------------------------- ; For each command there exists a variable list of parameters. ; If the character is greater than a space it is a required separator. ; If less, then it is a command class in the range 00 - 0B. ; Note that classes 00, 03 and 05 will fetch the addresses from this table. ; Some classes e.g. 07 and 0B have the same address in all invocations ; and the command is re-computed from the low-byte of the parameter address. ; Some e.g. 02 are only called once so a call to the command is made from ; within the class routine rather than holding the address within the table. ; Some class routines check syntax entirely and some leave this task for the ; command itself. ; Others for example CIRCLE (x,y,z) check the first part (x,y) using the ; class routine and the final part (,z) within the command. ; The last few commands appear to have been added in a rush but their syntax ; is rather simple e.g. MOVE "M1","M2" ;; P-LET L1A7A: DEFB $01 ; Class-01 - A variable is required. DEFB $3D ; Separator: '=' DEFB $02 ; Class-02 - An expression, numeric or string, ; must follow. ;; P-GO-TO L1A7D: DEFB $06 ; Class-06 - A numeric expression must follow. DEFB $00 ; Class-00 - No further operands. DEFW L1E67 ; Address: $1E67; Address: GO-TO ;; P-IF L1A81: DEFB $06 ; Class-06 - A numeric expression must follow. DEFB $CB ; Separator: 'THEN' DEFB $05 ; Class-05 - Variable syntax checked ; by routine. DEFW L1CF0 ; Address: $1CF0; Address: IF ;; P-GO-SUB L1A86: DEFB $06 ; Class-06 - A numeric expression must follow. DEFB $00 ; Class-00 - No further operands. DEFW L1EED ; Address: $1EED; Address: GO-SUB ;; P-STOP L1A8A: DEFB $00 ; Class-00 - No further operands. DEFW L1CEE ; Address: $1CEE; Address: STOP ;; P-RETURN L1A8D: DEFB $00 ; Class-00 - No further operands. DEFW L1F23 ; Address: $1F23; Address: RETURN ;; P-FOR L1A90: DEFB $04 ; Class-04 - A single character variable must ; follow. DEFB $3D ; Separator: '=' DEFB $06 ; Class-06 - A numeric expression must follow. DEFB $CC ; Separator: 'TO' DEFB $06 ; Class-06 - A numeric expression must follow. DEFB $05 ; Class-05 - Variable syntax checked ; by routine. DEFW L1D03 ; Address: $1D03; Address: FOR ;; P-NEXT L1A98: DEFB $04 ; Class-04 - A single character variable must ; follow. DEFB $00 ; Class-00 - No further operands. DEFW L1DAB ; Address: $1DAB; Address: NEXT ;; P-PRINT L1A9C: DEFB $05 ; Class-05 - Variable syntax checked entirely ; by routine. DEFW L1FCD ; Address: $1FCD; Address: PRINT ;; P-INPUT L1A9F: DEFB $05 ; Class-05 - Variable syntax checked entirely ; by routine. DEFW L2089 ; Address: $2089; Address: INPUT ;; P-DIM L1AA2: DEFB $05 ; Class-05 - Variable syntax checked entirely ; by routine. DEFW L2C02 ; Address: $2C02; Address: DIM ;; P-REM L1AA5: DEFB $05 ; Class-05 - Variable syntax checked entirely ; by routine. DEFW L1BB2 ; Address: $1BB2; Address: REM ;; P-NEW L1AA8: DEFB $00 ; Class-00 - No further operands. DEFW L11B7 ; Address: $11B7; Address: NEW ;; P-RUN L1AAB: DEFB $03 ; Class-03 - A numeric expression may follow ; else default to zero. DEFW L1EA1 ; Address: $1EA1; Address: RUN ;; P-LIST L1AAE: DEFB $05 ; Class-05 - Variable syntax checked entirely ; by routine. DEFW L17F9 ; Address: $17F9; Address: LIST ;; P-POKE L1AB1: DEFB $08 ; Class-08 - Two comma-separated numeric ; expressions required. DEFB $00 ; Class-00 - No further operands. DEFW L1E80 ; Address: $1E80; Address: POKE ;; P-RANDOM L1AB5: DEFB $03 ; Class-03 - A numeric expression may follow ; else default to zero. DEFW L1E4F ; Address: $1E4F; Address: RANDOMIZE ;; P-CONT L1AB8: DEFB $00 ; Class-00 - No further operands. DEFW L1E5F ; Address: $1E5F; Address: CONTINUE ;; P-CLEAR L1ABB: DEFB $03 ; Class-03 - A numeric expression may follow ; else default to zero. DEFW L1EAC ; Address: $1EAC; Address: CLEAR ;; P-CLS L1ABE: DEFB $00 ; Class-00 - No further operands. DEFW L0D6B ; Address: $0D6B; Address: CLS ;; P-PLOT L1AC1: DEFB $09 ; Class-09 - Two comma-separated numeric ; expressions required with optional colour ; items. DEFB $00 ; Class-00 - No further operands. DEFW L22DC ; Address: $22DC; Address: PLOT ;; P-PAUSE L1AC5: DEFB $06 ; Class-06 - A numeric expression must follow. DEFB $00 ; Class-00 - No further operands. DEFW L1F3A ; Address: $1F3A; Address: PAUSE ;; P-READ L1AC9: DEFB $05 ; Class-05 - Variable syntax checked entirely ; by routine. DEFW L1DED ; Address: $1DED; Address: READ ;; P-DATA L1ACC: DEFB $05 ; Class-05 - Variable syntax checked entirely ; by routine. DEFW L1E27 ; Address: $1E27; Address: DATA ;; P-RESTORE L1ACF: DEFB $03 ; Class-03 - A numeric expression may follow ; else default to zero. DEFW L1E42 ; Address: $1E42; Address: RESTORE ;; P-DRAW L1AD2: DEFB $09 ; Class-09 - Two comma-separated numeric ; expressions required with optional colour ; items. DEFB $05 ; Class-05 - Variable syntax checked ; by routine. DEFW L2382 ; Address: $2382; Address: DRAW ;; P-COPY L1AD6: DEFB $00 ; Class-00 - No further operands. DEFW L0EAC ; Address: $0EAC; Address: COPY ;; P-LPRINT L1AD9: DEFB $05 ; Class-05 - Variable syntax checked entirely ; by routine. DEFW L1FC9 ; Address: $1FC9; Address: LPRINT ;; P-LLIST L1ADC: DEFB $05 ; Class-05 - Variable syntax checked entirely ; by routine. DEFW L17F5 ; Address: $17F5; Address: LLIST ;; P-SAVE L1ADF: DEFB $0B ; Class-0B - Offset address converted to tape ; command. ;; P-LOAD L1AE0: DEFB $0B ; Class-0B - Offset address converted to tape ; command. ;; P-VERIFY L1AE1: DEFB $0B ; Class-0B - Offset address converted to tape ; command. ;; P-MERGE L1AE2: DEFB $0B ; Class-0B - Offset address converted to tape ; command. ;; P-BEEP L1AE3: DEFB $08 ; Class-08 - Two comma-separated numeric ; expressions required. DEFB $00 ; Class-00 - No further operands. DEFW L03F8 ; Address: $03F8; Address: BEEP ;; P-CIRCLE L1AE7: DEFB $09 ; Class-09 - Two comma-separated numeric ; expressions required with optional colour ; items. DEFB $05 ; Class-05 - Variable syntax checked ; by routine. DEFW L2320 ; Address: $2320; Address: CIRCLE ;; P-INK L1AEB: DEFB $07 ; Class-07 - Offset address is converted to ; colour code. ;; P-PAPER L1AEC: DEFB $07 ; Class-07 - Offset address is converted to ; colour code. ;; P-FLASH L1AED: DEFB $07 ; Class-07 - Offset address is converted to ; colour code. ;; P-BRIGHT L1AEE: DEFB $07 ; Class-07 - Offset address is converted to ; colour code. ;; P-INVERSE L1AEF: DEFB $07 ; Class-07 - Offset address is converted to ; colour code. ;; P-OVER L1AF0: DEFB $07 ; Class-07 - Offset address is converted to ; colour code. ;; P-OUT L1AF1: DEFB $08 ; Class-08 - Two comma-separated numeric ; expressions required. DEFB $00 ; Class-00 - No further operands. DEFW L1E7A ; Address: $1E7A; Address: OUT ;; P-BORDER L1AF5: DEFB $06 ; Class-06 - A numeric expression must follow. DEFB $00 ; Class-00 - No further operands. DEFW L2294 ; Address: $2294; Address: BORDER ;; P-DEF-FN L1AF9: DEFB $05 ; Class-05 - Variable syntax checked entirely ; by routine. DEFW L1F60 ; Address: $1F60; Address: DEF-FN ;; P-OPEN L1AFC: DEFB $06 ; Class-06 - A numeric expression must follow. DEFB $2C ; Separator: ',' see Footnote * DEFB $0A ; Class-0A - A string expression must follow. DEFB $00 ; Class-00 - No further operands. DEFW L1736 ; Address: $1736; Address: OPEN ;; P-CLOSE L1B02: DEFB $06 ; Class-06 - A numeric expression must follow. DEFB $00 ; Class-00 - No further operands. DEFW L16E5 ; Address: $16E5; Address: CLOSE ;; P-FORMAT L1B06: DEFB $0A ; Class-0A - A string expression must follow. DEFB $00 ; Class-00 - No further operands. DEFW L1793 ; Address: $1793; Address: CAT-ETC ;; P-MOVE L1B0A: DEFB $0A ; Class-0A - A string expression must follow. DEFB $2C ; Separator: ',' DEFB $0A ; Class-0A - A string expression must follow. DEFB $00 ; Class-00 - No further operands. DEFW L1793 ; Address: $1793; Address: CAT-ETC ;; P-ERASE L1B10: DEFB $0A ; Class-0A - A string expression must follow. DEFB $00 ; Class-00 - No further operands. DEFW L1793 ; Address: $1793; Address: CAT-ETC ;; P-CAT L1B14: DEFB $00 ; Class-00 - No further operands. DEFW L1793 ; Address: $1793; Address: CAT-ETC ; * Note that a comma is required as a separator with the OPEN command ; but the Interface 1 programmers relaxed this allowing ';' as an ; alternative for their channels creating a confusing mixture of ; allowable syntax as it is this ROM which opens or re-opens the ; normal channels. ; ------------------------------- ; Main parser (BASIC interpreter) ; ------------------------------- ; This routine is called once from MAIN-2 when the BASIC line is to ; be entered or re-entered into the Program area and the syntax ; requires checking. ;; LINE-SCAN L1B17: RES 7,(IY+$01) ; update FLAGS - signal checking syntax CALL L19FB ; routine E-LINE-NO >> ; fetches the line number if in range. XOR A ; clear the accumulator. LD ($5C47),A ; set statement number SUBPPC to zero. DEC A ; set accumulator to $FF. LD ($5C3A),A ; set ERR_NR to 'OK' - 1. JR L1B29 ; forward to continue at STMT-L-1. ; -------------- ; Statement loop ; -------------- ; ; ;; STMT-LOOP L1B28: RST 20H ; NEXT-CHAR ; -> the entry point from above or LINE-RUN ;; STMT-L-1 L1B29: CALL L16BF ; routine SET-WORK clears workspace etc. INC (IY+$0D) ; increment statement number SUBPPC JP M,L1C8A ; to REPORT-C to raise ; 'Nonsense in BASIC' if over 127. RST 18H ; GET-CHAR LD B,$00 ; set B to zero for later indexing. ; early so any other reason ??? CP $0D ; is character carriage return ? ; i.e. an empty statement. JR Z,L1BB3 ; forward to LINE-END if so. CP $3A ; is it statement end marker ':' ? ; i.e. another type of empty statement. JR Z,L1B28 ; back to STMT-LOOP if so. LD HL,L1B76 ; address: STMT-RET PUSH HL ; is now pushed as a return address LD C,A ; transfer the current character to C. ; advance CH_ADD to a position after command and test if it is a command. RST 20H ; NEXT-CHAR to advance pointer LD A,C ; restore current character SUB $CE ; subtract 'DEF FN' - first command JP C,L1C8A ; jump to REPORT-C if less than a command ; raising ; 'Nonsense in BASIC' LD C,A ; put the valid command code back in C. ; register B is zero. LD HL,L1A48 ; address: offst-tbl ADD HL,BC ; index into table with one of 50 commands. LD C,(HL) ; pick up displacement to syntax table entry. ADD HL,BC ; add to address the relevant entry. JR L1B55 ; forward to continue at GET-PARAM ; ---------------------- ; The main scanning loop ; ---------------------- ; not documented properly ; ;; SCAN-LOOP L1B52: LD HL,($5C74) ; fetch temporary address from T_ADDR ; during subsequent loops. ; -> the initial entry point with HL addressing start of syntax table entry. ;; GET-PARAM L1B55: LD A,(HL) ; pick up the parameter. INC HL ; address next one. LD ($5C74),HL ; save pointer in system variable T_ADDR LD BC,L1B52 ; address: SCAN-LOOP PUSH BC ; is now pushed on stack as looping address. LD C,A ; store parameter in C. CP $20 ; is it greater than ' ' ? JR NC,L1B6F ; forward to SEPARATOR to check that correct ; separator appears in statement if so. LD HL,L1C01 ; address: class-tbl. LD B,$00 ; prepare to index into the class table. ADD HL,BC ; index to find displacement to routine. LD C,(HL) ; displacement to BC ADD HL,BC ; add to address the CLASS routine. PUSH HL ; push the address on the stack. RST 18H ; GET-CHAR - HL points to place in statement. DEC B ; reset the zero flag - the initial state ; for all class routines. RET ; and make an indirect jump to routine ; and then SCAN-LOOP (also on stack). ; Note. one of the class routines will eventually drop the return address ; off the stack breaking out of the above seemingly endless loop. ; ----------------------- ; THE 'SEPARATOR' ROUTINE ; ----------------------- ; This routine is called once to verify that the mandatory separator ; present in the parameter table is also present in the correct ; location following the command. For example, the 'THEN' token after ; the 'IF' token and expression. ;; SEPARATOR L1B6F: RST 18H ; GET-CHAR CP C ; does it match the character in C ? JP NZ,L1C8A ; jump forward to REPORT-C if not ; 'Nonsense in BASIC'. RST 20H ; NEXT-CHAR advance to next character RET ; return. ; ------------------------------ ; Come here after interpretation ; ------------------------------ ; ; ;; STMT-RET L1B76: CALL L1F54 ; routine BREAK-KEY is tested after every ; statement. JR C,L1B7D ; step forward to STMT-R-1 if not pressed. ;; REPORT-L L1B7B: RST 08H ; ERROR-1 DEFB $14 ; Error Report: BREAK into program ;; STMT-R-1 L1B7D: BIT 7,(IY+$0A) ; test NSPPC - will be set if $FF - ; no jump to be made. JR NZ,L1BF4 ; forward to STMT-NEXT if a program line. LD HL,($5C42) ; fetch line number from NEWPPC BIT 7,H ; will be set if minus two - direct command(s) JR Z,L1B9E ; forward to LINE-NEW if a jump is to be ; made to a new program line/statement. ; -------------------- ; Run a direct command ; -------------------- ; A direct command is to be run or, if continuing from above, ; the next statement of a direct command is to be considered. ;; LINE-RUN L1B8A: LD HL,$FFFE ; The dummy value minus two LD ($5C45),HL ; is set/reset as line number in PPC. LD HL,($5C61) ; point to end of line + 1 - WORKSP. DEC HL ; now point to $80 end-marker. LD DE,($5C59) ; address the start of line E_LINE. DEC DE ; now location before - for GET-CHAR. LD A,($5C44) ; load statement to A from NSPPC. JR L1BD1 ; forward to NEXT-LINE. ; ------------------------------ ; Find start address of new line ; ------------------------------ ; The branch was to here if a jump is to made to a new line number ; and statement. ; That is the previous statement was a GO TO, GO SUB, RUN, RETURN, NEXT etc.. ;; LINE-NEW L1B9E: CALL L196E ; routine LINE-ADDR gets address of line ; returning zero flag set if line found. LD A,($5C44) ; fetch new statement from NSPPC JR Z,L1BBF ; forward to LINE-USE if line matched. ; continue as must be a direct command. AND A ; test statement which should be zero JR NZ,L1BEC ; forward to REPORT-N if not. ; 'Statement lost' ; LD B,A ; save statement in B.?? LD A,(HL) ; fetch high byte of line number. AND $C0 ; test if using direct command ; a program line is less than $3F LD A,B ; retrieve statement. ; (we can assume it is zero). JR Z,L1BBF ; forward to LINE-USE if was a program line ; Alternatively a direct statement has finished correctly. ;; REPORT-0 L1BB0: RST 08H ; ERROR-1 DEFB $FF ; Error Report: OK ; ----------------- ; THE 'REM' COMMAND ; ----------------- ; The REM command routine. ; The return address STMT-RET is dropped and the rest of line ignored. ;; REM L1BB2: POP BC ; drop return address STMT-RET and ; continue ignoring rest of line. ; ------------ ; End of line? ; ------------ ; ; ;; LINE-END L1BB3: CALL L2530 ; routine SYNTAX-Z (UNSTACK-Z?) RET Z ; return if checking syntax. LD HL,($5C55) ; fetch NXTLIN to HL. LD A,$C0 ; test against the AND (HL) ; system limit $3F. RET NZ ; return if more as must be ; end of program. ; (or direct command) XOR A ; set statement to zero. ; and continue to set up the next following line and then consider this new one. ; --------------------- ; General line checking ; --------------------- ; The branch was here from LINE-NEW if BASIC is branching. ; or a continuation from above if dealing with a new sequential line. ; First make statement zero number one leaving others unaffected. ;; LINE-USE L1BBF: CP $01 ; will set carry if zero. ADC A,$00 ; add in any carry. LD D,(HL) ; high byte of line number to D. INC HL ; advance pointer. LD E,(HL) ; low byte of line number to E. LD ($5C45),DE ; set system variable PPC. INC HL ; advance pointer. LD E,(HL) ; low byte of line length to E. INC HL ; advance pointer. LD D,(HL) ; high byte of line length to D. EX DE,HL ; swap pointer to DE before ADD HL,DE ; adding to address the end of line. INC HL ; advance to start of next line. ; ----------------------------- ; Update NEXT LINE but consider ; previous line or edit line. ; ----------------------------- ; The pointer will be the next line if continuing from above or to ; edit line end-marker ($80) if from LINE-RUN. ;; NEXT-LINE L1BD1: LD ($5C55),HL ; store pointer in system variable NXTLIN EX DE,HL ; bring back pointer to previous or edit line LD ($5C5D),HL ; and update CH_ADD with character address. LD D,A ; store statement in D. LD E,$00 ; set E to zero to suppress token searching ; if EACH-STMT is to be called. LD (IY+$0A),$FF ; set statement NSPPC to $FF signalling ; no jump to be made. DEC D ; decrement and test statement LD (IY+$0D),D ; set SUBPPC to decremented statement number. JP Z,L1B28 ; to STMT-LOOP if result zero as statement is ; at start of line and address is known. INC D ; else restore statement. CALL L198B ; routine EACH-STMT finds the D'th statement ; address as E does not contain a token. JR Z,L1BF4 ; forward to STMT-NEXT if address found. ;; REPORT-N L1BEC: RST 08H ; ERROR-1 DEFB $16 ; Error Report: Statement lost ; ----------------- ; End of statement? ; ----------------- ; This combination of routines is called from 20 places when ; the end of a statement should have been reached and all preceding ; syntax is in order. ;; CHECK-END L1BEE: CALL L2530 ; routine SYNTAX-Z RET NZ ; return immediately in runtime POP BC ; drop address of calling routine. POP BC ; drop address STMT-RET. ; and continue to find next statement. ; -------------------- ; Go to next statement ; -------------------- ; Acceptable characters at this point are carriage return and ':'. ; If so go to next statement which in the first case will be on next line. ;; STMT-NEXT L1BF4: RST 18H ; GET-CHAR - ignoring white space etc. CP $0D ; is it carriage return ? JR Z,L1BB3 ; back to LINE-END if so. CP $3A ; is it ':' ? JP Z,L1B28 ; jump back to STMT-LOOP to consider ; further statements JP L1C8A ; jump to REPORT-C with any other character ; 'Nonsense in BASIC'. ; Note. the two-byte sequence 'rst 08; defb $0b' could replace the above jp. ; ------------------- ; Command class table ; ------------------- ; ;; class-tbl L1C01: DEFB L1C10 - ASMPC ; 0F offset to Address: CLASS-00 DEFB L1C1F - ASMPC ; 1D offset to Address: CLASS-01 DEFB L1C4E - ASMPC ; 4B offset to Address: CLASS-02 DEFB L1C0D - ASMPC ; 09 offset to Address: CLASS-03 DEFB L1C6C - ASMPC ; 67 offset to Address: CLASS-04 DEFB L1C11 - ASMPC ; 0B offset to Address: CLASS-05 DEFB L1C82 - ASMPC ; 7B offset to Address: CLASS-06 DEFB L1C96 - ASMPC ; 8E offset to Address: CLASS-07 DEFB L1C7A - ASMPC ; 71 offset to Address: CLASS-08 DEFB L1CBE - ASMPC ; B4 offset to Address: CLASS-09 DEFB L1C8C - ASMPC ; 81 offset to Address: CLASS-0A DEFB L1CDB - ASMPC ; CF offset to Address: CLASS-0B ; -------------------------------- ; Command classes---00, 03, and 05 ; -------------------------------- ; class-03 e.g. RUN or RUN 200 ; optional operand ; class-00 e.g. CONTINUE ; no operand ; class-05 e.g. PRINT ; variable syntax checked by routine ;; CLASS-03 L1C0D: CALL L1CDE ; routine FETCH-NUM ;; CLASS-00 L1C10: CP A ; reset zero flag. ; if entering here then all class routines are entered with zero reset. ;; CLASS-05 L1C11: POP BC ; drop address SCAN-LOOP. CALL Z,L1BEE ; if zero set then call routine CHECK-END >>> ; as should be no further characters. EX DE,HL ; save HL to DE. LD HL,($5C74) ; fetch T_ADDR LD C,(HL) ; fetch low byte of routine INC HL ; address next. LD B,(HL) ; fetch high byte of routine. EX DE,HL ; restore HL from DE PUSH BC ; push the address RET ; and make an indirect jump to the command. ; -------------------------------- ; Command classes---01, 02, and 04 ; -------------------------------- ; class-01 e.g. LET A = 2*3 ; a variable is reqd ; This class routine is also called from INPUT and READ to find the ; destination variable for an assignment. ;; CLASS-01 L1C1F: CALL L28B2 ; routine LOOK-VARS returns carry set if not ; found in runtime. ; ---------------------- ; Variable in assignment ; ---------------------- ; ; ;; VAR-A-1 L1C22: LD (IY+$37),$00 ; set FLAGX to zero JR NC,L1C30 ; forward to VAR-A-2 if found or checking ; syntax. SET 1,(IY+$37) ; FLAGX - Signal a new variable JR NZ,L1C46 ; to VAR-A-3 if not assigning to an array ; e.g. LET a$(3,3) = "X" ;; REPORT-2 L1C2E: RST 08H ; ERROR-1 DEFB $01 ; Error Report: Variable not found ;; VAR-A-2 L1C30: CALL Z,L2996 ; routine STK-VAR considers a subscript/slice BIT 6,(IY+$01) ; test FLAGS - Numeric or string result ? JR NZ,L1C46 ; to VAR-A-3 if numeric XOR A ; default to array/slice - to be retained. CALL L2530 ; routine SYNTAX-Z CALL NZ,L2BF1 ; routine STK-FETCH is called in runtime ; may overwrite A with 1. LD HL,$5C71 ; address system variable FLAGX OR (HL) ; set bit 0 if simple variable to be reclaimed LD (HL),A ; update FLAGX EX DE,HL ; start of string/subscript to DE ;; VAR-A-3 L1C46: LD ($5C72),BC ; update STRLEN LD ($5C4D),HL ; and DEST of assigned string. RET ; return. ; ------------------------------------------------- ; class-02 e.g. LET a = 1 + 1 ; an expression must follow ;; CLASS-02 L1C4E: POP BC ; drop return address SCAN-LOOP CALL L1C56 ; routine VAL-FET-1 is called to check ; expression and assign result in runtime CALL L1BEE ; routine CHECK-END checks nothing else ; is present in statement. RET ; Return ; ------------- ; Fetch a value ; ------------- ; ; ;; VAL-FET-1 L1C56: LD A,($5C3B) ; initial FLAGS to A ;; VAL-FET-2 L1C59: PUSH AF ; save A briefly CALL L24FB ; routine SCANNING evaluates expression. POP AF ; restore A LD D,(IY+$01) ; post-SCANNING FLAGS to D XOR D ; xor the two sets of flags AND $40 ; pick up bit 6 of xored FLAGS should be zero JR NZ,L1C8A ; forward to REPORT-C if not zero ; 'Nonsense in BASIC' - results don't agree. BIT 7,D ; test FLAGS - is syntax being checked ? JP NZ,L2AFF ; jump forward to LET to make the assignment ; in runtime. RET ; but return from here if checking syntax. ; ------------------ ; Command class---04 ; ------------------ ; class-04 e.g. FOR i ; a single character variable must follow ;; CLASS-04 L1C6C: CALL L28B2 ; routine LOOK-VARS PUSH AF ; preserve flags. LD A,C ; fetch type - should be 011xxxxx OR $9F ; combine with 10011111. INC A ; test if now $FF by incrementing. JR NZ,L1C8A ; forward to REPORT-C if result not zero. POP AF ; else restore flags. JR L1C22 ; back to VAR-A-1 ; -------------------------------- ; Expect numeric/string expression ; -------------------------------- ; This routine is used to get the two coordinates of STRING$, ATTR and POINT. ; It is also called from PRINT-ITEM to get the two numeric expressions that ; follow the AT ( in PRINT AT, INPUT AT). ;; NEXT-2NUM L1C79: RST 20H ; NEXT-CHAR advance past 'AT' or '('. ; -------- ; class-08 e.g. POKE 65535,2 ; two numeric expressions separated by comma ;; CLASS-08 ;; EXPT-2NUM L1C7A: CALL L1C82 ; routine EXPT-1NUM is called for first ; numeric expression CP $2C ; is character ',' ? JR NZ,L1C8A ; to REPORT-C if not required separator. ; 'Nonsense in BASIC'. RST 20H ; NEXT-CHAR ; -> ; class-06 e.g. GOTO a*1000 ; a numeric expression must follow ;; CLASS-06 ;; EXPT-1NUM L1C82: CALL L24FB ; routine SCANNING BIT 6,(IY+$01) ; test FLAGS - Numeric or string result ? RET NZ ; return if result is numeric. ;; REPORT-C L1C8A: RST 08H ; ERROR-1 DEFB $0B ; Error Report: Nonsense in BASIC ; --------------------------------------------------------------- ; class-0A e.g. ERASE "????" ; a string expression must follow. ; ; these only occur in unimplemented commands ; ; although the routine expt-exp is called ; ; from SAVE-ETC ;; CLASS-0A ;; EXPT-EXP L1C8C: CALL L24FB ; routine SCANNING BIT 6,(IY+$01) ; test FLAGS - Numeric or string result ? RET Z ; return if string result. JR L1C8A ; back to REPORT-C if numeric. ; --------------------- ; Set permanent colours ; class 07 ; --------------------- ; class-07 e.g. PAPER 6 ; a single class for a collection of ; ; similar commands. Clever. ; ; Note. these commands should ensure that current channel is 'S' ;; CLASS-07 L1C96: BIT 7,(IY+$01) ; test FLAGS - checking syntax only ? ; Note. there is a subroutine to do this. RES 0,(IY+$02) ; update TV_FLAG - signal main screen in use CALL NZ,L0D4D ; routine TEMPS is called in runtime. POP AF ; drop return address SCAN-LOOP LD A,($5C74) ; T_ADDR_lo to accumulator. ; points to '$07' entry + 1 ; e.g. for INK points to $EC now ; Note if you move alter the syntax table next line may have to be altered. ; Note. For ZASM assembler replace following expression with SUB $13. L1CA5: SUB +(L1AEB-$D8) % 256 ; convert $EB to $D8 ('INK') etc. ; ( is SUB $13 in standard ROM ) CALL L21FC ; routine CO-TEMP-4 CALL L1BEE ; routine CHECK-END check that nothing else ; in statement. ; return here in runtime. LD HL,($5C8F) ; pick up ATTR_T and MASK_T LD ($5C8D),HL ; and store in ATTR_P and MASK_P LD HL,$5C91 ; point to P_FLAG. LD A,(HL) ; pick up in A RLCA ; rotate to left XOR (HL) ; combine with HL AND $AA ; 10101010 XOR (HL) ; only permanent bits affected LD (HL),A ; reload into P_FLAG. RET ; return. ; ------------------ ; Command class---09 ; ------------------ ; e.g. PLOT PAPER 0; 128,88 ; two coordinates preceded by optional ; ; embedded colour items. ; ; Note. this command should ensure that current channel is actually 'S'. ;; CLASS-09 L1CBE: CALL L2530 ; routine SYNTAX-Z JR Z,L1CD6 ; forward to CL-09-1 if checking syntax. RES 0,(IY+$02) ; update TV_FLAG - signal main screen in use CALL L0D4D ; routine TEMPS is called. LD HL,$5C90 ; point to MASK_T LD A,(HL) ; fetch mask to accumulator. OR $F8 ; or with 11111000 paper/bright/flash 8 LD (HL),A ; mask back to MASK_T system variable. RES 6,(IY+$57) ; reset P_FLAG - signal NOT PAPER 9 ? RST 18H ; GET-CHAR ;; CL-09-1 L1CD6: CALL L21E2 ; routine CO-TEMP-2 deals with any embedded ; colour items. JR L1C7A ; exit via EXPT-2NUM to check for x,y. ; Note. if either of the numeric expressions contain STR$ then the flag setting ; above will be undone when the channel flags are reset during STR$. ; e.g. ; 10 BORDER 3 : PLOT VAL STR$ 128, VAL STR$ 100 ; credit John Elliott. ; ------------------ ; Command class---0B ; ------------------ ; Again a single class for four commands. ; This command just jumps back to SAVE-ETC to handle the four tape commands. ; The routine itself works out which command has called it by examining the ; address in T_ADDR_lo. Note therefore that the syntax table has to be ; located where these and other sequential command addresses are not split ; over a page boundary. ;; CLASS-0B L1CDB: JP L0605 ; jump way back to SAVE-ETC ; -------------- ; Fetch a number ; -------------- ; This routine is called from CLASS-03 when a command may be followed by ; an optional numeric expression e.g. RUN. If the end of statement has ; been reached then zero is used as the default. ; Also called from LIST-4. ;; FETCH-NUM L1CDE: CP $0D ; is character a carriage return ? JR Z,L1CE6 ; forward to USE-ZERO if so CP $3A ; is it ':' ? JR NZ,L1C82 ; forward to EXPT-1NUM if not. ; else continue and use zero. ; ---------------- ; Use zero routine ; ---------------- ; This routine is called four times to place the value zero on the ; calculator stack as a default value in runtime. ;; USE-ZERO L1CE6: CALL L2530 ; routine SYNTAX-Z (UNSTACK-Z?) RET Z ; RST 28H ;; FP-CALC DEFB $A0 ;;stk-zero ;0. DEFB $38 ;;end-calc RET ; return. ; ------------------- ; Handle STOP command ; ------------------- ; Command Syntax: STOP ; One of the shortest and least used commands. As with 'OK' not an error. ;; REPORT-9 ;; STOP L1CEE: RST 08H ; ERROR-1 DEFB $08 ; Error Report: STOP statement ; ----------------- ; Handle IF command ; ----------------- ; e.g. IF score>100 THEN PRINT "You Win" ; The parser has already checked the expression the result of which is on ; the calculator stack. The presence of the 'THEN' separator has also been ; checked and CH-ADD points to the command after THEN. ; ;; IF L1CF0: POP BC ; drop return address - STMT-RET CALL L2530 ; routine SYNTAX-Z JR Z,L1D00 ; forward to IF-1 if checking syntax ; to check syntax of PRINT "You Win" RST 28H ;; FP-CALC score>100 (1=TRUE 0=FALSE) DEFB $02 ;;delete . DEFB $38 ;;end-calc EX DE,HL ; make HL point to deleted value CALL L34E9 ; routine TEST-ZERO JP C,L1BB3 ; jump to LINE-END if FALSE (0) ;; IF-1 L1D00: JP L1B29 ; to STMT-L-1, if true (1) to execute command ; after 'THEN' token. ; ------------------ ; Handle FOR command ; ------------------ ; e.g. FOR i = 0 TO 1 STEP 0.1 ; Using the syntax tables, the parser has already checked for a start and ; limit value and also for the intervening separator. ; the two values v,l are on the calculator stack. ; CLASS-04 has also checked the variable and the name is in STRLEN_lo. ; The routine begins by checking for an optional STEP. ;; FOR L1D03: CP $CD ; is there a 'STEP' ? JR NZ,L1D10 ; to F-USE-1 if not to use 1 as default. RST 20H ; NEXT-CHAR CALL L1C82 ; routine EXPT-1NUM CALL L1BEE ; routine CHECK-END JR L1D16 ; to F-REORDER ; --- ;; F-USE-1 L1D10: CALL L1BEE ; routine CHECK-END RST 28H ;; FP-CALC v,l. DEFB $A1 ;;stk-one v,l,1=s. DEFB $38 ;;end-calc ;; F-REORDER L1D16: RST 28H ;; FP-CALC v,l,s. DEFB $C0 ;;st-mem-0 v,l,s. DEFB $02 ;;delete v,l. DEFB $01 ;;exchange l,v. DEFB $E0 ;;get-mem-0 l,v,s. DEFB $01 ;;exchange l,s,v. DEFB $38 ;;end-calc CALL L2AFF ; routine LET assigns the initial value v to ; the variable altering type if necessary. LD ($5C68),HL ; The system variable MEM is made to point to ; the variable instead of its normal ; location MEMBOT DEC HL ; point to single-character name LD A,(HL) ; fetch name SET 7,(HL) ; set bit 7 at location LD BC,$0006 ; add six to HL ADD HL,BC ; to address where limit should be. RLCA ; test bit 7 of original name. JR C,L1D34 ; forward to F-L-S if already a FOR/NEXT ; variable LD C,$0D ; otherwise an additional 13 bytes are needed. ; 5 for each value, two for line number and ; 1 byte for looping statement. CALL L1655 ; routine MAKE-ROOM creates them. INC HL ; make HL address limit. ;; F-L-S L1D34: PUSH HL ; save position. RST 28H ;; FP-CALC l,s. DEFB $02 ;;delete l. DEFB $02 ;;delete . DEFB $38 ;;end-calc ; DE points to STKEND, l. POP HL ; restore variable position EX DE,HL ; swap pointers LD C,$0A ; ten bytes to move LDIR ; Copy 'deleted' values to variable. LD HL,($5C45) ; Load with current line number from PPC EX DE,HL ; exchange pointers. LD (HL),E ; save the looping line INC HL ; in the next LD (HL),D ; two locations. LD D,(IY+$0D) ; fetch statement from SUBPPC system variable. INC D ; increment statement. INC HL ; and pointer LD (HL),D ; and store the looping statement. ; CALL L1DDA ; routine NEXT-LOOP considers an initial RET NC ; iteration. Return to STMT-RET if a loop is ; possible to execute next statement. ; no loop is possible so execution continues after the matching 'NEXT' LD B,(IY+$38) ; get single-character name from STRLEN_lo LD HL,($5C45) ; get the current line from PPC LD ($5C42),HL ; and store it in NEWPPC LD A,($5C47) ; fetch current statement from SUBPPC NEG ; Negate as counter decrements from zero ; initially and we are in the middle of a ; line. LD D,A ; Store result in D. LD HL,($5C5D) ; get current address from CH_ADD LD E,$F3 ; search will be for token 'NEXT' ;; F-LOOP L1D64: PUSH BC ; save variable name. LD BC,($5C55) ; fetch NXTLIN CALL L1D86 ; routine LOOK-PROG searches for 'NEXT' token. LD ($5C55),BC ; update NXTLIN POP BC ; and fetch the letter JR C,L1D84 ; forward to REPORT-I if the end of program ; was reached by LOOK-PROG. ; 'FOR without NEXT' RST 20H ; NEXT-CHAR fetches character after NEXT OR $20 ; ensure it is upper-case. CP B ; compare with FOR variable name JR Z,L1D7C ; forward to F-FOUND if it matches. ; but if no match i.e. nested FOR/NEXT loops then continue search. RST 20H ; NEXT-CHAR JR L1D64 ; back to F-LOOP ; --- ;; F-FOUND L1D7C: RST 20H ; NEXT-CHAR LD A,$01 ; subtract the negated counter from 1 SUB D ; to give the statement after the NEXT LD ($5C44),A ; set system variable NSPPC RET ; return to STMT-RET to branch to new ; line and statement. -> ; --- ;; REPORT-I L1D84: RST 08H ; ERROR-1 DEFB $11 ; Error Report: FOR without NEXT ; --------- ; LOOK-PROG ; --------- ; Find DATA, DEF FN or NEXT. ; This routine searches the program area for one of the above three keywords. ; On entry, HL points to start of search area. ; The token is in E, and D holds a statement count, decremented from zero. ;; LOOK-PROG L1D86: LD A,(HL) ; fetch current character CP $3A ; is it ':' a statement separator ? JR Z,L1DA3 ; forward to LOOK-P-2 if so. ; The starting point was PROG - 1 or the end of a line. ;; LOOK-P-1 L1D8B: INC HL ; increment pointer to address LD A,(HL) ; the high byte of line number AND $C0 ; test for program end marker $80 or a ; variable SCF ; Set Carry Flag RET NZ ; return with carry set if at end ; of program. -> LD B,(HL) ; high byte of line number to B INC HL ; LD C,(HL) ; low byte to C. LD ($5C42),BC ; set system variable NEWPPC. INC HL ; LD C,(HL) ; low byte of line length to C. INC HL ; LD B,(HL) ; high byte to B. PUSH HL ; save address ADD HL,BC ; add length to position. LD B,H ; and save result LD C,L ; in BC. POP HL ; restore address. LD D,$00 ; initialize statement counter to zero. ;; LOOK-P-2 L1DA3: PUSH BC ; save address of next line CALL L198B ; routine EACH-STMT searches current line. POP BC ; restore address. RET NC ; return if match was found. -> JR L1D8B ; back to LOOK-P-1 for next line. ; ------------------- ; Handle NEXT command ; ------------------- ; e.g. NEXT i ; The parameter tables have already evaluated the presence of a variable ;; NEXT L1DAB: BIT 1,(IY+$37) ; test FLAGX - handling a new variable ? JP NZ,L1C2E ; jump back to REPORT-2 if so ; 'Variable not found' ; now test if found variable is a simple variable uninitialized by a FOR. LD HL,($5C4D) ; load address of variable from DEST BIT 7,(HL) ; is it correct type ? JR Z,L1DD8 ; forward to REPORT-1 if not ; 'NEXT without FOR' INC HL ; step past variable name LD ($5C68),HL ; and set MEM to point to three 5-byte values ; value, limit, step. RST 28H ;; FP-CALC add step and re-store DEFB $E0 ;;get-mem-0 v. DEFB $E2 ;;get-mem-2 v,s. DEFB $0F ;;addition v+s. DEFB $C0 ;;st-mem-0 v+s. DEFB $02 ;;delete . DEFB $38 ;;end-calc CALL L1DDA ; routine NEXT-LOOP tests against limit. RET C ; return if no more iterations possible. LD HL,($5C68) ; find start of variable contents from MEM. LD DE,$000F ; add 3*5 to ADD HL,DE ; address the looping line number LD E,(HL) ; low byte to E INC HL ; LD D,(HL) ; high byte to D INC HL ; address looping statement LD H,(HL) ; and store in H EX DE,HL ; swap registers JP L1E73 ; exit via GO-TO-2 to execute another loop. ; --- ;; REPORT-1 L1DD8: RST 08H ; ERROR-1 DEFB $00 ; Error Report: NEXT without FOR ; ----------------- ; Perform NEXT loop ; ----------------- ; This routine is called from the FOR command to test for an initial ; iteration and from the NEXT command to test for all subsequent iterations. ; the system variable MEM addresses the variable's contents which, in the ; latter case, have had the step, possibly negative, added to the value. ;; NEXT-LOOP L1DDA: RST 28H ;; FP-CALC DEFB $E1 ;;get-mem-1 l. DEFB $E0 ;;get-mem-0 l,v. DEFB $E2 ;;get-mem-2 l,v,s. DEFB $36 ;;less-0 l,v,(1/0) negative step ? DEFB $00 ;;jump-true l,v.(1/0) DEFB $02 ;;to L1DE2, NEXT-1 if step negative DEFB $01 ;;exchange v,l. ;; NEXT-1 L1DE2: DEFB $03 ;;subtract l-v OR v-l. DEFB $37 ;;greater-0 (1/0) DEFB $00 ;;jump-true . DEFB $04 ;;to L1DE9, NEXT-2 if no more iterations. DEFB $38 ;;end-calc . AND A ; clear carry flag signalling another loop. RET ; return ; --- ;; NEXT-2 L1DE9: DEFB $38 ;;end-calc . SCF ; set carry flag signalling looping exhausted. RET ; return ; ------------------- ; Handle READ command ; ------------------- ; e.g. READ a, b$, c$(1000 TO 3000) ; A list of comma-separated variables is assigned from a list of ; comma-separated expressions. ; As it moves along the first list, the character address CH_ADD is stored ; in X_PTR while CH_ADD is used to read the second list. ;; READ-3 L1DEC: RST 20H ; NEXT-CHAR ; -> Entry point. ;; READ L1DED: CALL L1C1F ; routine CLASS-01 checks variable. CALL L2530 ; routine SYNTAX-Z JR Z,L1E1E ; forward to READ-2 if checking syntax RST 18H ; GET-CHAR LD ($5C5F),HL ; save character position in X_PTR. LD HL,($5C57) ; load HL with Data Address DATADD, which is ; the start of the program or the address ; after the last expression that was read or ; the address of the line number of the ; last RESTORE command. LD A,(HL) ; fetch character CP $2C ; is it a comma ? JR Z,L1E0A ; forward to READ-1 if so. ; else all data in this statement has been read so look for next DATA token LD E,$E4 ; token 'DATA' CALL L1D86 ; routine LOOK-PROG JR NC,L1E0A ; forward to READ-1 if DATA found ; else report the error. ;; REPORT-E L1E08: RST 08H ; ERROR-1 DEFB $0D ; Error Report: Out of DATA ;; READ-1 L1E0A: CALL L0077 ; routine TEMP-PTR1 advances updating CH_ADD ; with new DATADD position. CALL L1C56 ; routine VAL-FET-1 assigns value to variable ; checking type match and adjusting CH_ADD. RST 18H ; GET-CHAR fetches adjusted character position LD ($5C57),HL ; store back in DATADD LD HL,($5C5F) ; fetch X_PTR the original READ CH_ADD LD (IY+$26),$00 ; now nullify X_PTR_hi CALL L0078 ; routine TEMP-PTR2 restores READ CH_ADD ;; READ-2 L1E1E: RST 18H ; GET-CHAR CP $2C ; is it ',' indicating more variables to read ? JR Z,L1DEC ; back to READ-3 if so CALL L1BEE ; routine CHECK-END RET ; return from here in runtime to STMT-RET. ; ------------------- ; Handle DATA command ; ------------------- ; In runtime this 'command' is passed by but the syntax is checked when such ; a statement is found while parsing a line. ; e.g. DATA 1, 2, "text", score-1, a$(location, room, object), FN r(49), ; wages - tax, TRUE, The meaning of life ;; DATA L1E27: CALL L2530 ; routine SYNTAX-Z to check status JR NZ,L1E37 ; forward to DATA-2 if in runtime ;; DATA-1 L1E2C: CALL L24FB ; routine SCANNING to check syntax of ; expression CP $2C ; is it a comma ? CALL NZ,L1BEE ; routine CHECK-END checks that statement ; is complete. Will make an early exit if ; so. >>> RST 20H ; NEXT-CHAR JR L1E2C ; back to DATA-1 ; --- ;; DATA-2 L1E37: LD A,$E4 ; set token to 'DATA' and continue into ; the PASS-BY routine. ; ---------------------------------- ; Check statement for DATA or DEF FN ; ---------------------------------- ; This routine is used to backtrack to a command token and then ; forward to the next statement in runtime. ;; PASS-BY L1E39: LD B,A ; Give BC enough space to find token. CPDR ; Compare decrement and repeat. (Only use). ; Work backwards till keyword is found which ; is start of statement before any quotes. ; HL points to location before keyword. LD DE,$0200 ; count 1+1 statements, dummy value in E to ; inhibit searching for a token. JP L198B ; to EACH-STMT to find next statement ; ----------------------------------------------------------------------- ; A General Note on Invalid Line Numbers. ; ======================================= ; One of the revolutionary concepts of Sinclair BASIC was that it supported ; virtual line numbers. That is the destination of a GO TO, RESTORE etc. need ; not exist. It could be a point before or after an actual line number. ; Zero suffices for a before but the after should logically be infinity. ; Since the maximum actual line limit is 9999 then the system limit, 16383 ; when variables kick in, would serve fine as a virtual end point. ; However, ironically, only the LOAD command gets it right. It will not ; autostart a program that has been saved with a line higher than 16383. ; All the other commands deal with the limit unsatisfactorily. ; LIST, RUN, GO TO, GO SUB and RESTORE have problems and the latter may ; crash the machine when supplied with an inappropriate virtual line number. ; This is puzzling as very careful consideration must have been given to ; this point when the new variable types were allocated their masks and also ; when the routine NEXT-ONE was successfully re-written to reflect this. ; An enigma. ; ------------------------------------------------------------------------- ; ---------------------- ; Handle RESTORE command ; ---------------------- ; The restore command sets the system variable for the data address to ; point to the location before the supplied line number or first line ; thereafter. ; This alters the position where subsequent READ commands look for data. ; Note. If supplied with inappropriate high numbers the system may crash ; in the LINE-ADDR routine as it will pass the program/variables end-marker ; and then lose control of what it is looking for - variable or line number. ; - observation, Steven Vickers, 1984, Pitman. ;; RESTORE L1E42: CALL L1E99 ; routine FIND-INT2 puts integer in BC. ; Note. B should be checked against limit $3F ; and an error generated if higher. ; this entry point is used from RUN command with BC holding zero ;; REST-RUN L1E45: LD H,B ; transfer the line LD L,C ; number to the HL register. CALL L196E ; routine LINE-ADDR to fetch the address. DEC HL ; point to the location before the line. LD ($5C57),HL ; update system variable DATADD. RET ; return to STMT-RET (or RUN) ; ------------------------ ; Handle RANDOMIZE command ; ------------------------ ; This command sets the SEED for the RND function to a fixed value. ; With the parameter zero, a random start point is used depending on ; how long the computer has been switched on. ;; RANDOMIZE L1E4F: CALL L1E99 ; routine FIND-INT2 puts parameter in BC. LD A,B ; test this OR C ; for zero. JR NZ,L1E5A ; forward to RAND-1 if not zero. LD BC,($5C78) ; use the lower two bytes at FRAMES1. ;; RAND-1 L1E5A: LD ($5C76),BC ; place in SEED system variable. RET ; return to STMT-RET ; ----------------------- ; Handle CONTINUE command ; ----------------------- ; The CONTINUE command transfers the OLD (but incremented) values of ; line number and statement to the equivalent "NEW VALUE" system variables ; by using the last part of GO TO and exits indirectly to STMT-RET. ;; CONTINUE L1E5F: LD HL,($5C6E) ; fetch OLDPPC line number. LD D,(IY+$36) ; fetch OSPPC statement. JR L1E73 ; forward to GO-TO-2 ; -------------------- ; Handle GO TO command ; -------------------- ; The GO TO command routine is also called by GO SUB and RUN routines ; to evaluate the parameters of both commands. ; It updates the system variables used to fetch the next line/statement. ; It is at STMT-RET that the actual change in control takes place. ; Unlike some BASICs the line number need not exist. ; Note. the high byte of the line number is incorrectly compared with $F0 ; instead of $3F. This leads to commands with operands greater than 32767 ; being considered as having been run from the editing area and the ; error report 'Statement Lost' is given instead of 'OK'. ; - Steven Vickers, 1984. ;; GO-TO L1E67: CALL L1E99 ; routine FIND-INT2 puts operand in BC LD H,B ; transfer line LD L,C ; number to HL. LD D,$00 ; set statement to 0 - first. LD A,H ; compare high byte only CP $F0 ; to $F0 i.e. 61439 in full. JR NC,L1E9F ; forward to REPORT-B if above. ; This call entry point is used to update the system variables e.g. by RETURN. ;; GO-TO-2 L1E73: LD ($5C42),HL ; save line number in NEWPPC LD (IY+$0A),D ; and statement in NSPPC RET ; to STMT-RET (or GO-SUB command) ; ------------------ ; Handle OUT command ; ------------------ ; Syntax has been checked and the two comma-separated values are on the ; calculator stack. ;; OUT L1E7A: CALL L1E85 ; routine TWO-PARAM fetches values ; to BC and A. OUT (C),A ; perform the operation. RET ; return to STMT-RET. ; ------------------- ; Handle POKE command ; ------------------- ; This routine alters a single byte in the 64K address space. ; Happily no check is made as to whether ROM or RAM is addressed. ; Sinclair BASIC requires no poking of system variables. ;; POKE L1E80: CALL L1E85 ; routine TWO-PARAM fetches values ; to BC and A. LD (BC),A ; load memory location with A. RET ; return to STMT-RET. ; ------------------------------------ ; Fetch two parameters from calculator stack ; ------------------------------------ ; This routine fetches a byte and word from the calculator stack ; producing an error if either is out of range. ;; TWO-PARAM L1E85: CALL L2DD5 ; routine FP-TO-A JR C,L1E9F ; forward to REPORT-B if overflow occurred JR Z,L1E8E ; forward to TWO-P-1 if positive NEG ; negative numbers are made positive ;; TWO-P-1 L1E8E: PUSH AF ; save the value CALL L1E99 ; routine FIND-INT2 gets integer to BC POP AF ; restore the value RET ; return ; ------------- ; Find integers ; ------------- ; The first of these routines fetches a 8-bit integer (range 0-255) from the ; calculator stack to the accumulator and is used for colours, streams, ; durations and coordinates. ; The second routine fetches 16-bit integers to the BC register pair ; and is used to fetch command and function arguments involving line numbers ; or memory addresses and also array subscripts and tab arguments. ; -> ;; FIND-INT1 L1E94: CALL L2DD5 ; routine FP-TO-A JR L1E9C ; forward to FIND-I-1 for common exit routine. ; --- ; -> ;; FIND-INT2 L1E99: CALL L2DA2 ; routine FP-TO-BC ;; FIND-I-1 L1E9C: JR C,L1E9F ; to REPORT-Bb with overflow. RET Z ; return if positive. ;; REPORT-Bb L1E9F: RST 08H ; ERROR-1 DEFB $0A ; Error Report: Integer out of range ; ------------------ ; Handle RUN command ; ------------------ ; This command runs a program starting at an optional line. ; It performs a 'RESTORE 0' then CLEAR ;; RUN L1EA1: CALL L1E67 ; routine GO-TO puts line number in ; system variables. LD BC,$0000 ; prepare to set DATADD to first line. CALL L1E45 ; routine REST-RUN does the 'restore'. ; Note BC still holds zero. JR L1EAF ; forward to CLEAR-RUN to clear variables ; without disturbing RAMTOP and ; exit indirectly to STMT-RET ; -------------------- ; Handle CLEAR command ; -------------------- ; This command reclaims the space used by the variables. ; It also clears the screen and the GO SUB stack. ; With an integer expression, it sets the uppermost memory ; address within the BASIC system. ; "Contrary to the manual, CLEAR doesn't execute a RESTORE" - ; Steven Vickers, Pitman Pocket Guide to the Spectrum, 1984. ;; CLEAR L1EAC: CALL L1E99 ; routine FIND-INT2 fetches to BC. ;; CLEAR-RUN L1EAF: LD A,B ; test for OR C ; zero. JR NZ,L1EB7 ; skip to CLEAR-1 if not zero. LD BC,($5CB2) ; use the existing value of RAMTOP if zero. ;; CLEAR-1 L1EB7: PUSH BC ; save ramtop value. LD DE,($5C4B) ; fetch VARS LD HL,($5C59) ; fetch E_LINE DEC HL ; adjust to point at variables end-marker. CALL L19E5 ; routine RECLAIM-1 reclaims the space used by ; the variables. CALL L0D6B ; routine CLS to clear screen. LD HL,($5C65) ; fetch STKEND the start of free memory. LD DE,$0032 ; allow for another 50 bytes. ADD HL,DE ; add the overhead to HL. POP DE ; restore the ramtop value. SBC HL,DE ; if HL is greater than the value then jump JR NC,L1EDA ; forward to REPORT-M ; 'RAMTOP no good' LD HL,($5CB4) ; now P-RAMT ($7FFF on 16K RAM machine) AND A ; exact this time. SBC HL,DE ; new ramtop must be lower or the same. JR NC,L1EDC ; skip to CLEAR-2 if in actual RAM. ;; REPORT-M L1EDA: RST 08H ; ERROR-1 DEFB $15 ; Error Report: RAMTOP no good ;; CLEAR-2 L1EDC: EX DE,HL ; transfer ramtop value to HL. LD ($5CB2),HL ; update system variable RAMTOP. POP DE ; pop the return address STMT-RET. POP BC ; pop the Error Address. LD (HL),$3E ; now put the GO SUB end-marker at RAMTOP. DEC HL ; leave a location beneath it. LD SP,HL ; initialize the machine stack pointer. PUSH BC ; push the error address. LD ($5C3D),SP ; make ERR_SP point to location. EX DE,HL ; put STMT-RET in HL. JP (HL) ; and go there directly. ; --------------------- ; Handle GO SUB command ; --------------------- ; The GO SUB command diverts BASIC control to a new line number ; in a very similar manner to GO TO but ; the current line number and current statement + 1 ; are placed on the GO SUB stack as a RETURN point. ;; GO-SUB L1EED: POP DE ; drop the address STMT-RET LD H,(IY+$0D) ; fetch statement from SUBPPC and INC H ; increment it EX (SP),HL ; swap - error address to HL, ; H (statement) at top of stack, ; L (unimportant) beneath. INC SP ; adjust to overwrite unimportant byte LD BC,($5C45) ; fetch the current line number from PPC PUSH BC ; and PUSH onto GO SUB stack. ; the empty machine-stack can be rebuilt PUSH HL ; push the error address. LD ($5C3D),SP ; make system variable ERR_SP point to it. PUSH DE ; push the address STMT-RET. CALL L1E67 ; call routine GO-TO to update the system ; variables NEWPPC and NSPPC. ; then make an indirect exit to STMT-RET via LD BC,$0014 ; a 20-byte overhead memory check. ; ---------------------- ; Check available memory ; ---------------------- ; This routine is used on many occasions when extending a dynamic area ; upwards or the GO SUB stack downwards. ;; TEST-ROOM L1F05: LD HL,($5C65) ; fetch STKEND ADD HL,BC ; add the supplied test value JR C,L1F15 ; forward to REPORT-4 if over $FFFF EX DE,HL ; was less so transfer to DE LD HL,$0050 ; test against another 80 bytes ADD HL,DE ; anyway JR C,L1F15 ; forward to REPORT-4 if this passes $FFFF SBC HL,SP ; if less than the machine stack pointer RET C ; then return - OK. ;; REPORT-4 L1F15: LD L,$03 ; prepare 'Out of Memory' JP L0055 ; jump back to ERROR-3 at $0055 ; Note. this error can't be trapped at $0008 ; ------------------------------ ; THE 'FREE MEMORY' USER ROUTINE ; ------------------------------ ; This routine is not used by the ROM but allows users to evaluate ; approximate free memory with PRINT 65536 - USR 7962. ;; free-mem L1F1A: LD BC,$0000 ; allow no overhead. CALL L1F05 ; routine TEST-ROOM. LD B,H ; transfer the result LD C,L ; to the BC register. RET ; the USR function returns value of BC. ; -------------------- ; THE 'RETURN' COMMAND ; -------------------- ; As with any command, there are two values on the machine stack at the time ; it is invoked. The machine stack is below the GOSUB stack. Both grow ; downwards, the machine stack by two bytes, the GOSUB stack by 3 bytes. ; The highest location is a statement byte followed by a two-byte line number. ;; RETURN L1F23: POP BC ; drop the address STMT-RET. POP HL ; now the error address. POP DE ; now a possible BASIC return line. LD A,D ; the high byte $00 - $27 is CP $3E ; compared with the traditional end-marker $3E. JR Z,L1F36 ; forward to REPORT-7 with a match. ; 'RETURN without GOSUB' ; It was not the end-marker so a single statement byte remains at the base of ; the calculator stack. It can't be popped off. DEC SP ; adjust stack pointer to create room for two ; bytes. EX (SP),HL ; statement to H, error address to base of ; new machine stack. EX DE,HL ; statement to D, BASIC line number to HL. LD ($5C3D),SP ; adjust ERR_SP to point to new stack pointer PUSH BC ; now re-stack the address STMT-RET JP L1E73 ; to GO-TO-2 to update statement and line ; system variables and exit indirectly to the ; address just pushed on stack. ; --- ;; REPORT-7 L1F36: PUSH DE ; replace the end-marker. PUSH HL ; now restore the error address ; as will be required in a few clock cycles. RST 08H ; ERROR-1 DEFB $06 ; Error Report: RETURN without GOSUB ; -------------------- ; Handle PAUSE command ; -------------------- ; The pause command takes as its parameter the number of interrupts ; for which to wait. PAUSE 50 pauses for about a second. ; PAUSE 0 pauses indefinitely. ; Both forms can be finished by pressing a key. ;; PAUSE L1F3A: CALL L1E99 ; routine FIND-INT2 puts value in BC ;; PAUSE-1 L1F3D: HALT ; wait for interrupt. DEC BC ; decrease counter. LD A,B ; test if OR C ; result is zero. JR Z,L1F4F ; forward to PAUSE-END if so. LD A,B ; test if AND C ; now $FFFF INC A ; that is, initially zero. JR NZ,L1F49 ; skip forward to PAUSE-2 if not. INC BC ; restore counter to zero. ;; PAUSE-2 L1F49: BIT 5,(IY+$01) ; test FLAGS - has a new key been pressed ? JR Z,L1F3D ; back to PAUSE-1 if not. ;; PAUSE-END L1F4F: RES 5,(IY+$01) ; update FLAGS - signal no new key RET ; and return. ; ------------------- ; Check for BREAK key ; ------------------- ; This routine is called from COPY-LINE, when interrupts are disabled, ; to test if BREAK (SHIFT - SPACE) is being pressed. ; It is also called at STMT-RET after every statement. ;; BREAK-KEY L1F54: LD A,$7F ; Input address: $7FFE IN A,($FE) ; read lower right keys RRA ; rotate bit 0 - SPACE RET C ; return if not reset LD A,$FE ; Input address: $FEFE IN A,($FE) ; read lower left keys RRA ; rotate bit 0 - SHIFT RET ; carry will be set if not pressed. ; return with no carry if both keys ; pressed. ; --------------------- ; Handle DEF FN command ; --------------------- ; e.g. DEF FN r$(a$,a) = a$(a TO ) ; this 'command' is ignored in runtime but has its syntax checked ; during line-entry. ;; DEF-FN L1F60: CALL L2530 ; routine SYNTAX-Z JR Z,L1F6A ; forward to DEF-FN-1 if parsing LD A,$CE ; else load A with 'DEF FN' and JP L1E39 ; jump back to PASS-BY ; --- ; continue here if checking syntax. ;; DEF-FN-1 L1F6A: SET 6,(IY+$01) ; set FLAGS - Assume numeric result CALL L2C8D ; call routine ALPHA JR NC,L1F89 ; if not then to DEF-FN-4 to jump to ; 'Nonsense in BASIC' RST 20H ; NEXT-CHAR CP $24 ; is it '$' ? JR NZ,L1F7D ; to DEF-FN-2 if not as numeric. RES 6,(IY+$01) ; set FLAGS - Signal string result RST 20H ; get NEXT-CHAR ;; DEF-FN-2 L1F7D: CP $28 ; is it '(' ? JR NZ,L1FBD ; to DEF-FN-7 'Nonsense in BASIC' RST 20H ; NEXT-CHAR CP $29 ; is it ')' ? JR Z,L1FA6 ; to DEF-FN-6 if null argument ;; DEF-FN-3 L1F86: CALL L2C8D ; routine ALPHA checks that it is the expected ; alphabetic character. ;; DEF-FN-4 L1F89: JP NC,L1C8A ; to REPORT-C if not ; 'Nonsense in BASIC'. EX DE,HL ; save pointer in DE RST 20H ; NEXT-CHAR re-initializes HL from CH_ADD ; and advances. CP $24 ; '$' ? is it a string argument. JR NZ,L1F94 ; forward to DEF-FN-5 if not. EX DE,HL ; save pointer to '$' in DE RST 20H ; NEXT-CHAR re-initializes HL and advances ;; DEF-FN-5 L1F94: EX DE,HL ; bring back pointer. LD BC,$0006 ; the function requires six hidden bytes for ; each parameter passed. ; The first byte will be $0E ; then 5-byte numeric value ; or 5-byte string pointer. CALL L1655 ; routine MAKE-ROOM creates space in program ; area. INC HL ; adjust HL (set by LDDR) INC HL ; to point to first location. LD (HL),$0E ; insert the 'hidden' marker. ; Note. these invisible storage locations hold nothing meaningful for the ; moment. They will be used every time the corresponding function is ; evaluated in runtime. ; Now consider the following character fetched earlier. CP $2C ; is it ',' ? (more than one parameter) JR NZ,L1FA6 ; to DEF-FN-6 if not RST 20H ; else NEXT-CHAR JR L1F86 ; and back to DEF-FN-3 ; --- ;; DEF-FN-6 L1FA6: CP $29 ; should close with a ')' JR NZ,L1FBD ; to DEF-FN-7 if not ; 'Nonsense in BASIC' RST 20H ; get NEXT-CHAR CP $3D ; is it '=' ? JR NZ,L1FBD ; to DEF-FN-7 if not 'Nonsense...' RST 20H ; address NEXT-CHAR LD A,($5C3B) ; get FLAGS which has been set above PUSH AF ; and preserve CALL L24FB ; routine SCANNING checks syntax of expression ; and also sets flags. POP AF ; restore previous flags XOR (IY+$01) ; xor with FLAGS - bit 6 should be same ; therefore will be reset. AND $40 ; isolate bit 6. ;; DEF-FN-7 L1FBD: JP NZ,L1C8A ; jump back to REPORT-C if the expected result ; is not the same type. ; 'Nonsense in BASIC' CALL L1BEE ; routine CHECK-END will return early if ; at end of statement and move onto next ; else produce error report. >>> ; There will be no return to here. ; ------------------------------- ; Returning early from subroutine ; ------------------------------- ; All routines are capable of being run in two modes - syntax checking mode ; and runtime mode. This routine is called often to allow a routine to return ; early if checking syntax. ;; UNSTACK-Z L1FC3: CALL L2530 ; routine SYNTAX-Z sets zero flag if syntax ; is being checked. POP HL ; drop the return address. RET Z ; return to previous call in chain if checking ; syntax. JP (HL) ; jump to return address as BASIC program is ; actually running. ; --------------------- ; Handle LPRINT command ; --------------------- ; A simple form of 'PRINT #3' although it can output to 16 streams. ; Probably for compatibility with other BASICs particularly ZX81 BASIC. ; An extra UDG might have been better. ;; LPRINT L1FC9: LD A,$03 ; the printer channel JR L1FCF ; forward to PRINT-1 ; --------------------- ; Handle PRINT commands ; --------------------- ; The Spectrum's main stream output command. ; The default stream is stream 2 which is normally the upper screen ; of the computer. However the stream can be altered in range 0 - 15. ;; PRINT L1FCD: LD A,$02 ; the stream for the upper screen. ; The LPRINT command joins here. ;; PRINT-1 L1FCF: CALL L2530 ; routine SYNTAX-Z checks if program running CALL NZ,L1601 ; routine CHAN-OPEN if so CALL L0D4D ; routine TEMPS sets temporary colours. CALL L1FDF ; routine PRINT-2 - the actual item CALL L1BEE ; routine CHECK-END gives error if not at end ; of statement RET ; and return >>> ; ------------------------------------ ; this subroutine is called from above ; and also from INPUT. ;; PRINT-2 L1FDF: RST 18H ; GET-CHAR gets printable character CALL L2045 ; routine PR-END-Z checks if more printing JR Z,L1FF2 ; to PRINT-4 if not e.g. just 'PRINT :' ; This tight loop deals with combinations of positional controls and ; print items. An early return can be made from within the loop ; if the end of a print sequence is reached. ;; PRINT-3 L1FE5: CALL L204E ; routine PR-POSN-1 returns zero if more ; but returns early at this point if ; at end of statement! ; JR Z,L1FE5 ; to PRINT-3 if consecutive positioners CALL L1FFC ; routine PR-ITEM-1 deals with strings etc. CALL L204E ; routine PR-POSN-1 for more position codes JR Z,L1FE5 ; loop back to PRINT-3 if so ;; PRINT-4 L1FF2: CP $29 ; return now if this is ')' from input-item. ; (see INPUT.) RET Z ; or continue and print carriage return in ; runtime ; --------------------- ; Print carriage return ; --------------------- ; This routine which continues from above prints a carriage return ; in run-time. It is also called once from PRINT-POSN. ;; PRINT-CR L1FF5: CALL L1FC3 ; routine UNSTACK-Z LD A,$0D ; prepare a carriage return RST 10H ; PRINT-A RET ; return ; ----------- ; Print items ; ----------- ; This routine deals with print items as in ; PRINT AT 10,0;"The value of A is ";a ; It returns once a single item has been dealt with as it is part ; of a tight loop that considers sequences of positional and print items ;; PR-ITEM-1 L1FFC: RST 18H ; GET-CHAR CP $AC ; is character 'AT' ? JR NZ,L200E ; forward to PR-ITEM-2 if not. CALL L1C79 ; routine NEXT-2NUM check for two comma ; separated numbers placing them on the ; calculator stack in runtime. CALL L1FC3 ; routine UNSTACK-Z quits if checking syntax. CALL L2307 ; routine STK-TO-BC get the numbers in B and C. LD A,$16 ; prepare the 'at' control. JR L201E ; forward to PR-AT-TAB to print the sequence. ; --- ;; PR-ITEM-2 L200E: CP $AD ; is character 'TAB' ? JR NZ,L2024 ; to PR-ITEM-3 if not RST 20H ; NEXT-CHAR to address next character CALL L1C82 ; routine EXPT-1NUM CALL L1FC3 ; routine UNSTACK-Z quits if checking syntax. CALL L1E99 ; routine FIND-INT2 puts integer in BC. LD A,$17 ; prepare the 'tab' control. ;; PR-AT-TAB L201E: RST 10H ; PRINT-A outputs the control LD A,C ; first value to A RST 10H ; PRINT-A outputs it. LD A,B ; second value RST 10H ; PRINT-A RET ; return - item finished >>> ; --- ; Now consider paper 2; #2; a$ ;; PR-ITEM-3 L2024: CALL L21F2 ; routine CO-TEMP-3 will print any colour RET NC ; items - return if success. CALL L2070 ; routine STR-ALTER considers new stream RET NC ; return if altered. CALL L24FB ; routine SCANNING now to evaluate expression CALL L1FC3 ; routine UNSTACK-Z if not runtime. BIT 6,(IY+$01) ; test FLAGS - Numeric or string result ? CALL Z,L2BF1 ; routine STK-FETCH if string. ; note no flags affected. JP NZ,L2DE3 ; to PRINT-FP to print if numeric >>> ; It was a string expression - start in DE, length in BC ; Now enter a loop to print it ;; PR-STRING L203C: LD A,B ; this tests if the OR C ; length is zero and sets flag accordingly. DEC BC ; this doesn't but decrements counter. RET Z ; return if zero. LD A,(DE) ; fetch character. INC DE ; address next location. RST 10H ; PRINT-A. JR L203C ; loop back to PR-STRING. ; --------------- ; End of printing ; --------------- ; This subroutine returns zero if no further printing is required ; in the current statement. ; The first terminator is found in escaped input items only, ; the others in print_items. ;; PR-END-Z L2045: CP $29 ; is character a ')' ? RET Z ; return if so - e.g. INPUT (p$); a$ ;; PR-ST-END L2048: CP $0D ; is it a carriage return ? RET Z ; return also - e.g. PRINT a CP $3A ; is character a ':' ? RET ; return - zero flag will be set if so. ; e.g. PRINT a : ; -------------- ; Print position ; -------------- ; This routine considers a single positional character ';', ',', ''' ;; PR-POSN-1 L204E: RST 18H ; GET-CHAR CP $3B ; is it ';' ? ; i.e. print from last position. JR Z,L2067 ; forward to PR-POSN-3 if so. ; i.e. do nothing. CP $2C ; is it ',' ? ; i.e. print at next tabstop. JR NZ,L2061 ; forward to PR-POSN-2 if anything else. CALL L2530 ; routine SYNTAX-Z JR Z,L2067 ; forward to PR-POSN-3 if checking syntax. LD A,$06 ; prepare the 'comma' control character. RST 10H ; PRINT-A outputs to current channel in ; run-time. JR L2067 ; skip to PR-POSN-3. ; --- ; check for newline. ;; PR-POSN-2 L2061: CP $27 ; is character a "'" ? (newline) RET NZ ; return if no match >>> CALL L1FF5 ; routine PRINT-CR outputs a carriage return ; in runtime only. ;; PR-POSN-3 L2067: RST 20H ; NEXT-CHAR to A. CALL L2045 ; routine PR-END-Z checks if at end. JR NZ,L206E ; to PR-POSN-4 if not. POP BC ; drop return address if at end. ;; PR-POSN-4 L206E: CP A ; reset the zero flag. RET ; and return to loop or quit. ; ------------ ; Alter stream ; ------------ ; This routine is called from PRINT ITEMS above, and also LIST as in ; LIST #15 ;; STR-ALTER L2070: CP $23 ; is character '#' ? SCF ; set carry flag. RET NZ ; return if no match. RST 20H ; NEXT-CHAR CALL L1C82 ; routine EXPT-1NUM gets stream number AND A ; prepare to exit early with carry reset CALL L1FC3 ; routine UNSTACK-Z exits early if parsing CALL L1E94 ; routine FIND-INT1 gets number off stack CP $10 ; must be range 0 - 15 decimal. JP NC,L160E ; jump back to REPORT-Oa if not ; 'Invalid stream'. CALL L1601 ; routine CHAN-OPEN AND A ; clear carry - signal item dealt with. RET ; return ; ------------------- ; THE 'INPUT' COMMAND ; ------------------- ; This command is mysterious. ; ;; INPUT L2089: CALL L2530 ; routine SYNTAX-Z to check if in runtime. JR Z,L2096 ; forward to INPUT-1 if checking syntax. LD A,$01 ; select channel 'K' the keyboard for input. CALL L1601 ; routine CHAN-OPEN opens the channel and sets ; bit 0 of TV_FLAG. ; Note. As a consequence of clearing the lower screen channel 0 is made ; the current channel so the above two instructions are superfluous. CALL L0D6E ; routine CLS-LOWER clears the lower screen ; and sets DF_SZ to two and TV_FLAG to $01. ;; INPUT-1 L2096: LD (IY+$02),$01 ; update TV_FLAG - signal lower screen in use ; ensuring that the correct set of system ; variables are updated and that the border ; colour is used. ; Note. The Complete Spectrum ROM Disassembly incorrectly names DF-SZ as the ; system variable that is updated above and if, as some have done, you make ; this unnecessary alteration then there will be two blank lines between the ; lower screen and the upper screen areas which will also scroll wrongly. CALL L20C1 ; routine IN-ITEM-1 to handle the input. CALL L1BEE ; routine CHECK-END will make an early exit ; if checking syntax. >>> ; Keyboard input has been made and it remains to adjust the upper ; screen in case the lower two lines have been extended upwards. LD BC,($5C88) ; fetch S_POSN current line/column of ; the upper screen. LD A,($5C6B) ; fetch DF_SZ the display file size of ; the lower screen. CP B ; test that lower screen does not overlap JR C,L20AD ; forward to INPUT-2 if not. ; the two screens overlap so adjust upper screen. LD C,$21 ; set column of upper screen to leftmost. LD B,A ; and line to one above lower screen. ; continue forward to update upper screen ; print position. ;; INPUT-2 L20AD: LD ($5C88),BC ; set S_POSN update upper screen line/column. LD A,$19 ; subtract from twenty five SUB B ; the new line number. LD ($5C8C),A ; and place result in SCR_CT - scroll count. RES 0,(IY+$02) ; update TV_FLAG - signal main screen in use. CALL L0DD9 ; routine CL-SET sets the print position ; system variables for the upper screen. JP L0D6E ; jump back to CLS-LOWER and make ; an indirect exit >>. ; --------------------- ; INPUT ITEM subroutine ; --------------------- ; This subroutine deals with the input items and print items. ; from the current input channel. ; It is only called from the above INPUT routine but was obviously ; once called from somewhere else in another context. ;; IN-ITEM-1 L20C1: CALL L204E ; routine PR-POSN-1 deals with a single ; position item at each call. JR Z,L20C1 ; back to IN-ITEM-1 until no more in a ; sequence. CP $28 ; is character '(' ? JR NZ,L20D8 ; forward to IN-ITEM-2 if not. ; any variables within braces will be treated as part, or all, of the prompt ; instead of being used as destination variables. RST 20H ; NEXT-CHAR CALL L1FDF ; routine PRINT-2 to output the dynamic ; prompt. RST 18H ; GET-CHAR CP $29 ; is character a matching ')' ? JP NZ,L1C8A ; jump back to REPORT-C if not. ; 'Nonsense in BASIC'. RST 20H ; NEXT-CHAR JP L21B2 ; forward to IN-NEXT-2 ; --- ;; IN-ITEM-2 L20D8: CP $CA ; is the character the token 'LINE' ? JR NZ,L20ED ; forward to IN-ITEM-3 if not. RST 20H ; NEXT-CHAR - variable must come next. CALL L1C1F ; routine CLASS-01 returns destination ; address of variable to be assigned. ; or generates an error if no variable ; at this position. SET 7,(IY+$37) ; update FLAGX - signal handling INPUT LINE BIT 6,(IY+$01) ; test FLAGS - numeric or string result ? JP NZ,L1C8A ; jump back to REPORT-C if not string ; 'Nonsense in BASIC'. JR L20FA ; forward to IN-PROMPT to set up workspace. ; --- ; the jump was here for other variables. ;; IN-ITEM-3 L20ED: CALL L2C8D ; routine ALPHA checks if character is ; a suitable variable name. JP NC,L21AF ; forward to IN-NEXT-1 if not CALL L1C1F ; routine CLASS-01 returns destination ; address of variable to be assigned. RES 7,(IY+$37) ; update FLAGX - signal not INPUT LINE. ;; IN-PROMPT L20FA: CALL L2530 ; routine SYNTAX-Z JP Z,L21B2 ; forward to IN-NEXT-2 if checking syntax. CALL L16BF ; routine SET-WORK clears workspace. LD HL,$5C71 ; point to system variable FLAGX RES 6,(HL) ; signal string result. SET 5,(HL) ; signal in Input Mode for editor. LD BC,$0001 ; initialize space required to one for ; the carriage return. BIT 7,(HL) ; test FLAGX - INPUT LINE in use ? JR NZ,L211C ; forward to IN-PR-2 if so as that is ; all the space that is required. LD A,($5C3B) ; load accumulator from FLAGS AND $40 ; mask to test BIT 6 of FLAGS and clear ; the other bits in A. ; numeric result expected ? JR NZ,L211A ; forward to IN-PR-1 if so LD C,$03 ; increase space to three bytes for the ; pair of surrounding quotes. ;; IN-PR-1 L211A: OR (HL) ; if numeric result, set bit 6 of FLAGX. LD (HL),A ; and update system variable ;; IN-PR-2 L211C: RST 30H ; BC-SPACES opens 1 or 3 bytes in workspace LD (HL),$0D ; insert carriage return at last new location. LD A,C ; fetch the length, one or three. RRCA ; lose bit 0. RRCA ; test if quotes required. JR NC,L2129 ; forward to IN-PR-3 if not. LD A,$22 ; load the '"' character LD (DE),A ; place quote in first new location at DE. DEC HL ; decrease HL - from carriage return. LD (HL),A ; and place a quote in second location. ;; IN-PR-3 L2129: LD ($5C5B),HL ; set keyboard cursor K_CUR to HL BIT 7,(IY+$37) ; test FLAGX - is this INPUT LINE ?? JR NZ,L215E ; forward to IN-VAR-3 if so as input will ; be accepted without checking its syntax. LD HL,($5C5D) ; fetch CH_ADD PUSH HL ; and save on stack. LD HL,($5C3D) ; fetch ERR_SP PUSH HL ; and save on stack ;; IN-VAR-1 L213A: LD HL,L213A ; address: IN-VAR-1 - this address PUSH HL ; is saved on stack to handle errors. BIT 4,(IY+$30) ; test FLAGS2 - is K channel in use ? JR Z,L2148 ; forward to IN-VAR-2 if not using the ; keyboard for input. (??) LD ($5C3D),SP ; set ERR_SP to point to IN-VAR-1 on stack. ;; IN-VAR-2 L2148: LD HL,($5C61) ; set HL to WORKSP - start of workspace. CALL L11A7 ; routine REMOVE-FP removes floating point ; forms when looping in error condition. LD (IY+$00),$FF ; set ERR_NR to 'OK' cancelling the error. ; but X_PTR causes flashing error marker ; to be displayed at each call to the editor. CALL L0F2C ; routine EDITOR allows input to be entered ; or corrected if this is second time around. ; if we pass to next then there are no system errors RES 7,(IY+$01) ; update FLAGS - signal checking syntax CALL L21B9 ; routine IN-ASSIGN checks syntax using ; the VAL-FET-2 and powerful SCANNING routines. ; any syntax error and its back to IN-VAR-1. ; but with the flashing error marker showing ; where the error is. ; Note. the syntax of string input has to be ; checked as the user may have removed the ; bounding quotes or escaped them as with ; "hat" + "stand" for example. ; proceed if syntax passed. JR L2161 ; jump forward to IN-VAR-4 ; --- ; the jump was to here when using INPUT LINE. ;; IN-VAR-3 L215E: CALL L0F2C ; routine EDITOR is called for input ; when ENTER received rejoin other route but with no syntax check. ; INPUT and INPUT LINE converge here. ;; IN-VAR-4 L2161: LD (IY+$22),$00 ; set K_CUR_hi to a low value so that the cursor ; no longer appears in the input line. CALL L21D6 ; routine IN-CHAN-K tests if the keyboard ; is being used for input. JR NZ,L2174 ; forward to IN-VAR-5 if using another input ; channel. ; continue here if using the keyboard. CALL L111D ; routine ED-COPY overprints the edit line ; to the lower screen. The only visible ; affect is that the cursor disappears. ; if you're inputting more than one item in ; a statement then that becomes apparent. LD BC,($5C82) ; fetch line and column from ECHO_E CALL L0DD9 ; routine CL-SET sets S-POSNL to those ; values. ; if using another input channel rejoin here. ;; IN-VAR-5 L2174: LD HL,$5C71 ; point HL to FLAGX RES 5,(HL) ; signal not in input mode BIT 7,(HL) ; is this INPUT LINE ? RES 7,(HL) ; cancel the bit anyway. JR NZ,L219B ; forward to IN-VAR-6 if INPUT LINE. POP HL ; drop the looping address POP HL ; drop the address of previous ; error handler. LD ($5C3D),HL ; set ERR_SP to point to it. POP HL ; drop original CH_ADD which points to ; INPUT command in BASIC line. LD ($5C5F),HL ; save in X_PTR while input is assigned. SET 7,(IY+$01) ; update FLAGS - Signal running program CALL L21B9 ; routine IN-ASSIGN is called again ; this time the variable will be assigned ; the input value without error. ; Note. the previous example now ; becomes "hatstand" LD HL,($5C5F) ; fetch stored CH_ADD value from X_PTR. LD (IY+$26),$00 ; set X_PTR_hi so that iy is no longer relevant. LD ($5C5D),HL ; put restored value back in CH_ADD JR L21B2 ; forward to IN-NEXT-2 to see if anything ; more in the INPUT list. ; --- ; the jump was to here with INPUT LINE only ;; IN-VAR-6 L219B: LD HL,($5C63) ; STKBOT points to the end of the input. LD DE,($5C61) ; WORKSP points to the beginning. SCF ; prepare for true subtraction. SBC HL,DE ; subtract to get length LD B,H ; transfer it to LD C,L ; the BC register pair. CALL L2AB2 ; routine STK-STO-$ stores parameters on ; the calculator stack. CALL L2AFF ; routine LET assigns it to destination. JR L21B2 ; forward to IN-NEXT-2 as print items ; not allowed with INPUT LINE. ; Note. that "hat" + "stand" will, for ; example, be unchanged as also would ; 'PRINT "Iris was here"'. ; --- ; the jump was to here when ALPHA found more items while looking for ; a variable name. ;; IN-NEXT-1 L21AF: CALL L1FFC ; routine PR-ITEM-1 considers further items. ;; IN-NEXT-2 L21B2: CALL L204E ; routine PR-POSN-1 handles a position item. JP Z,L20C1 ; jump back to IN-ITEM-1 if the zero flag ; indicates more items are present. RET ; return. ; --------------------------- ; INPUT ASSIGNMENT Subroutine ; --------------------------- ; This subroutine is called twice from the INPUT command when normal ; keyboard input is assigned. On the first occasion syntax is checked ; using SCANNING. The final call with the syntax flag reset is to make ; the assignment. ;; IN-ASSIGN L21B9: LD HL,($5C61) ; fetch WORKSP start of input LD ($5C5D),HL ; set CH_ADD to first character RST 18H ; GET-CHAR ignoring leading white-space. CP $E2 ; is it 'STOP' JR Z,L21D0 ; forward to IN-STOP if so. LD A,($5C71) ; load accumulator from FLAGX CALL L1C59 ; routine VAL-FET-2 makes assignment ; or goes through the motions if checking ; syntax. SCANNING is used. RST 18H ; GET-CHAR CP $0D ; is it carriage return ? RET Z ; return if so ; either syntax is OK ; or assignment has been made. ; if another character was found then raise an error. ; User doesn't see report but the flashing error marker ; appears in the lower screen. ;; REPORT-Cb L21CE: RST 08H ; ERROR-1 DEFB $0B ; Error Report: Nonsense in BASIC ;; IN-STOP L21D0: CALL L2530 ; routine SYNTAX-Z (UNSTACK-Z?) RET Z ; return if checking syntax ; as user wouldn't see error report. ; but generate visible error report ; on second invocation. ;; REPORT-H L21D4: RST 08H ; ERROR-1 DEFB $10 ; Error Report: STOP in INPUT ; ----------------------------------- ; THE 'TEST FOR CHANNEL K' SUBROUTINE ; ----------------------------------- ; This subroutine is called once from the keyboard INPUT command to check if ; the input routine in use is the one for the keyboard. ;; IN-CHAN-K L21D6: LD HL,($5C51) ; fetch address of current channel CURCHL INC HL ; INC HL ; advance past INC HL ; input and INC HL ; output streams LD A,(HL) ; fetch the channel identifier. CP $4B ; test for 'K' RET ; return with zero set if keyboard is use. ; -------------------- ; Colour Item Routines ; -------------------- ; ; These routines have 3 entry points - ; 1) CO-TEMP-2 to handle a series of embedded Graphic colour items. ; 2) CO-TEMP-3 to handle a single embedded print colour item. ; 3) CO TEMP-4 to handle a colour command such as FLASH 1 ; ; "Due to a bug, if you bring in a peripheral channel and later use a colour ; statement, colour controls will be sent to it by mistake." - Steven Vickers ; Pitman Pocket Guide, 1984. ; ; To be fair, this only applies if the last channel was other than 'K', 'S' ; or 'P', which are all that are supported by this ROM, but if that last ; channel was a microdrive file, network channel etc. then ; PAPER 6; CLS will not turn the screen yellow and ; CIRCLE INK 2; 128,88,50 will not draw a red circle. ; ; This bug does not apply to embedded PRINT items as it is quite permissible ; to mix stream altering commands and colour items. ; The fix therefore would be to ensure that CLASS-07 and CLASS-09 make ; channel 'S' the current channel when not checking syntax. ; ----------------------------------------------------------------- ;; CO-TEMP-1 L21E1: RST 20H ; NEXT-CHAR ; -> Entry point from CLASS-09. Embedded Graphic colour items. ; e.g. PLOT INK 2; PAPER 8; 128,88 ; Loops till all colour items output, finally addressing the coordinates. ;; CO-TEMP-2 L21E2: CALL L21F2 ; routine CO-TEMP-3 to output colour control. RET C ; return if nothing more to output. -> RST 18H ; GET-CHAR CP $2C ; is it ',' separator ? JR Z,L21E1 ; back if so to CO-TEMP-1 CP $3B ; is it ';' separator ? JR Z,L21E1 ; back to CO-TEMP-1 for more. JP L1C8A ; to REPORT-C (REPORT-Cb is within range) ; 'Nonsense in BASIC' ; ------------------- ; CO-TEMP-3 ; ------------------- ; -> this routine evaluates and outputs a colour control and parameter. ; It is called from above and also from PR-ITEM-3 to handle a single embedded ; print item e.g. PRINT PAPER 6; "Hi". In the latter case, the looping for ; multiple items is within the PR-ITEM routine. ; It is quite permissible to send these to any stream. ;; CO-TEMP-3 L21F2: CP $D9 ; is it 'INK' ? RET C ; return if less. CP $DF ; compare with 'OUT' CCF ; Complement Carry Flag RET C ; return if greater than 'OVER', $DE. PUSH AF ; save the colour token. RST 20H ; address NEXT-CHAR POP AF ; restore token and continue. ; -> this entry point used by CLASS-07. e.g. the command PAPER 6. ;; CO-TEMP-4 L21FC: SUB $C9 ; reduce to control character $10 (INK) ; thru $15 (OVER). PUSH AF ; save control. CALL L1C82 ; routine EXPT-1NUM stacks addressed ; parameter on calculator stack. POP AF ; restore control. AND A ; clear carry CALL L1FC3 ; routine UNSTACK-Z returns if checking syntax. PUSH AF ; save again CALL L1E94 ; routine FIND-INT1 fetches parameter to A. LD D,A ; transfer now to D POP AF ; restore control. RST 10H ; PRINT-A outputs the control to current ; channel. LD A,D ; transfer parameter to A. RST 10H ; PRINT-A outputs parameter. RET ; return. -> ; ------------------------------------------------------------------------- ; ; {fl}{br}{ paper }{ ink } The temporary colour attributes ; ___ ___ ___ ___ ___ ___ ___ ___ system variable. ; ATTR_T | | | | | | | | | ; | | | | | | | | | ; 23695 |___|___|___|___|___|___|___|___| ; 7 6 5 4 3 2 1 0 ; ; ; {fl}{br}{ paper }{ ink } The temporary mask used for ; ___ ___ ___ ___ ___ ___ ___ ___ transparent colours. Any bit ; MASK_T | | | | | | | | | that is 1 shows that the ; | | | | | | | | | corresponding attribute is ; 23696 |___|___|___|___|___|___|___|___| taken not from ATTR-T but from ; 7 6 5 4 3 2 1 0 what is already on the screen. ; ; ; {paper9 }{ ink9 }{ inv1 }{ over1} The print flags. Even bits are ; ___ ___ ___ ___ ___ ___ ___ ___ temporary flags. The odd bits ; P_FLAG | | | | | | | | | are the permanent flags. ; | p | t | p | t | p | t | p | t | ; 23697 |___|___|___|___|___|___|___|___| ; 7 6 5 4 3 2 1 0 ; ; ----------------------------------------------------------------------- ; ------------------------------------ ; The colour system variable handler. ; ------------------------------------ ; This is an exit branch from PO-1-OPER, PO-2-OPER ; A holds control $10 (INK) to $15 (OVER) ; D holds parameter 0-9 for ink/paper 0,1 or 8 for bright/flash, ; 0 or 1 for over/inverse. ;; CO-TEMP-5 L2211: SUB $11 ; reduce range $FF-$04 ADC A,$00 ; add in carry if INK JR Z,L2234 ; forward to CO-TEMP-7 with INK and PAPER. SUB $02 ; reduce range $FF-$02 ADC A,$00 ; add carry if FLASH JR Z,L2273 ; forward to CO-TEMP-C with FLASH and BRIGHT. CP $01 ; is it 'INVERSE' ? LD A,D ; fetch parameter for INVERSE/OVER LD B,$01 ; prepare OVER mask setting bit 0. JR NZ,L2228 ; forward to CO-TEMP-6 if OVER RLCA ; shift bit 0 RLCA ; to bit 2 LD B,$04 ; set bit 2 of mask for inverse. ;; CO-TEMP-6 L2228: LD C,A ; save the A LD A,D ; re-fetch parameter CP $02 ; is it less than 2 JR NC,L2244 ; to REPORT-K if not 0 or 1. ; 'Invalid colour'. LD A,C ; restore A LD HL,$5C91 ; address system variable P_FLAG JR L226C ; forward to exit via routine CO-CHANGE ; --- ; the branch was here with INK/PAPER and carry set for INK. ;; CO-TEMP-7 L2234: LD A,D ; fetch parameter LD B,$07 ; set ink mask 00000111 JR C,L223E ; forward to CO-TEMP-8 with INK RLCA ; shift bits 0-2 RLCA ; to RLCA ; bits 3-5 LD B,$38 ; set paper mask 00111000 ; both paper and ink rejoin here ;; CO-TEMP-8 L223E: LD C,A ; value to C LD A,D ; fetch parameter CP $0A ; is it less than 10d ? JR C,L2246 ; forward to CO-TEMP-9 if so. ; ink 10 etc. is not allowed. ;; REPORT-K L2244: RST 08H ; ERROR-1 DEFB $13 ; Error Report: Invalid colour ;; CO-TEMP-9 L2246: LD HL,$5C8F ; address system variable ATTR_T initially. CP $08 ; compare with 8 JR C,L2258 ; forward to CO-TEMP-B with 0-7. LD A,(HL) ; fetch temporary attribute as no change. JR Z,L2257 ; forward to CO-TEMP-A with INK/PAPER 8 ; it is either ink 9 or paper 9 (contrasting) OR B ; or with mask to make white CPL ; make black and change other to dark AND $24 ; 00100100 JR Z,L2257 ; forward to CO-TEMP-A if black and ; originally light. LD A,B ; else just use the mask (white) ;; CO-TEMP-A L2257: LD C,A ; save A in C ;; CO-TEMP-B L2258: LD A,C ; load colour to A CALL L226C ; routine CO-CHANGE addressing ATTR-T LD A,$07 ; put 7 in accumulator CP D ; compare with parameter SBC A,A ; $00 if 0-7, $FF if 8 CALL L226C ; routine CO-CHANGE addressing MASK-T ; mask returned in A. ; now consider P-FLAG. RLCA ; 01110000 or 00001110 RLCA ; 11100000 or 00011100 AND $50 ; 01000000 or 00010000 (AND 01010000) LD B,A ; transfer to mask LD A,$08 ; load A with 8 CP D ; compare with parameter SBC A,A ; $FF if was 9, $00 if 0-8 ; continue while addressing P-FLAG ; setting bit 4 if ink 9 ; setting bit 6 if paper 9 ; ----------------------- ; Handle change of colour ; ----------------------- ; This routine addresses a system variable ATTR_T, MASK_T or P-FLAG in HL. ; colour value in A, mask in B. ;; CO-CHANGE L226C: XOR (HL) ; impress bits specified AND B ; by mask XOR (HL) ; on system variable. LD (HL),A ; update system variable. INC HL ; address next location. LD A,B ; put current value of mask in A RET ; return. ; --- ; the branch was here with flash and bright ;; CO-TEMP-C L2273: SBC A,A ; set zero flag for bright. LD A,D ; fetch original parameter 0,1 or 8 RRCA ; rotate bit 0 to bit 7 LD B,$80 ; mask for flash 10000000 JR NZ,L227D ; forward to CO-TEMP-D if flash RRCA ; rotate bit 7 to bit 6 LD B,$40 ; mask for bright 01000000 ;; CO-TEMP-D L227D: LD C,A ; store value in C LD A,D ; fetch parameter CP $08 ; compare with 8 JR Z,L2287 ; forward to CO-TEMP-E if 8 CP $02 ; test if 0 or 1 JR NC,L2244 ; back to REPORT-K if not ; 'Invalid colour' ;; CO-TEMP-E L2287: LD A,C ; value to A LD HL,$5C8F ; address ATTR_T CALL L226C ; routine CO-CHANGE addressing ATTR_T LD A,C ; fetch value RRCA ; for flash8/bright8 complete RRCA ; rotations to put set bit in RRCA ; bit 7 (flash) bit 6 (bright) JR L226C ; back to CO-CHANGE addressing MASK_T ; and indirect return. ; --------------------- ; Handle BORDER command ; --------------------- ; Command syntax example: BORDER 7 ; This command routine sets the border to one of the eight colours. ; The colours used for the lower screen are based on this. ;; BORDER L2294: CALL L1E94 ; routine FIND-INT1 CP $08 ; must be in range 0 (black) to 7 (white) JR NC,L2244 ; back to REPORT-K if not ; 'Invalid colour'. OUT ($FE),A ; outputting to port effects an immediate ; change. RLCA ; shift the colour to RLCA ; the paper bits setting the RLCA ; ink colour black. BIT 5,A ; is the number light coloured ? ; i.e. in the range green to white. JR NZ,L22A6 ; skip to BORDER-1 if so XOR $07 ; make the ink white. ;; BORDER-1 L22A6: LD ($5C48),A ; update BORDCR with new paper/ink RET ; return. ; ----------------- ; Get pixel address ; ----------------- ; ; ;; PIXEL-ADD L22AA: LD A,$AF ; load with 175 decimal. SUB B ; subtract the y value. JP C,L24F9 ; jump forward to REPORT-Bc if greater. ; 'Integer out of range' ; the high byte is derived from Y only. ; the first 3 bits are always 010 ; the next 2 bits denote in which third of the screen the byte is. ; the last 3 bits denote in which of the 8 scan lines within a third ; the byte is located. There are 24 discrete values. LD B,A ; the line number from top of screen to B. AND A ; clear carry (already clear) RRA ; 0xxxxxxx SCF ; set carry flag RRA ; 10xxxxxx AND A ; clear carry flag RRA ; 010xxxxx XOR B ; AND $F8 ; keep the top 5 bits 11111000 XOR B ; 010xxbbb LD H,A ; transfer high byte to H. ; the low byte is derived from both X and Y. LD A,C ; the x value 0-255. RLCA ; RLCA ; RLCA ; XOR B ; the y value AND $C7 ; apply mask 11000111 XOR B ; restore unmasked bits xxyyyxxx RLCA ; rotate to xyyyxxxx RLCA ; required position. yyyxxxxx LD L,A ; low byte to L. ; finally form the pixel position in A. LD A,C ; x value to A AND $07 ; mod 8 RET ; return ; ---------------- ; Point Subroutine ; ---------------- ; The point subroutine is called from s-point via the scanning functions ; table. ;; POINT-SUB L22CB: CALL L2307 ; routine STK-TO-BC CALL L22AA ; routine PIXEL-ADD finds address of pixel. LD B,A ; pixel position to B, 0-7. INC B ; increment to give rotation count 1-8. LD A,(HL) ; fetch byte from screen. ;; POINT-LP L22D4: RLCA ; rotate and loop back DJNZ L22D4 ; to POINT-LP until pixel at right. AND $01 ; test to give zero or one. JP L2D28 ; jump forward to STACK-A to save result. ; ------------------- ; Handle PLOT command ; ------------------- ; Command Syntax example: PLOT 128,88 ; ;; PLOT L22DC: CALL L2307 ; routine STK-TO-BC CALL L22E5 ; routine PLOT-SUB JP L0D4D ; to TEMPS ; ------------------- ; The Plot subroutine ; ------------------- ; A screen byte holds 8 pixels so it is necessary to rotate a mask ; into the correct position to leave the other 7 pixels unaffected. ; However all 64 pixels in the character cell take any embedded colour ; items. ; A pixel can be reset (inverse 1), toggled (over 1), or set ( with inverse ; and over switches off). With both switches on, the byte is simply put ; back on the screen though the colours may change. ;; PLOT-SUB L22E5: LD ($5C7D),BC ; store new x/y values in COORDS CALL L22AA ; routine PIXEL-ADD gets address in HL, ; count from left 0-7 in B. LD B,A ; transfer count to B. INC B ; increase 1-8. LD A,$FE ; 11111110 in A. ;; PLOT-LOOP L22F0: RRCA ; rotate mask. DJNZ L22F0 ; to PLOT-LOOP until B circular rotations. LD B,A ; load mask to B LD A,(HL) ; fetch screen byte to A LD C,(IY+$57) ; P_FLAG to C BIT 0,C ; is it to be OVER 1 ? JR NZ,L22FD ; forward to PL-TST-IN if so. ; was over 0 AND B ; combine with mask to blank pixel. ;; PL-TST-IN L22FD: BIT 2,C ; is it inverse 1 ? JR NZ,L2303 ; to PLOT-END if so. XOR B ; switch the pixel CPL ; restore other 7 bits ;; PLOT-END L2303: LD (HL),A ; load byte to the screen. JP L0BDB ; exit to PO-ATTR to set colours for cell. ; ------------------------------ ; Put two numbers in BC register ; ------------------------------ ; ; ;; STK-TO-BC L2307: CALL L2314 ; routine STK-TO-A LD B,A ; PUSH BC ; CALL L2314 ; routine STK-TO-A LD E,C ; POP BC ; LD D,C ; LD C,A ; RET ; ; ----------------------- ; Put stack in A register ; ----------------------- ; This routine puts the last value on the calculator stack into the accumulator ; deleting the last value. ;; STK-TO-A L2314: CALL L2DD5 ; routine FP-TO-A compresses last value into ; accumulator. e.g. PI would become 3. ; zero flag set if positive. JP C,L24F9 ; jump forward to REPORT-Bc if >= 255.5. LD C,$01 ; prepare a positive sign byte. RET Z ; return if FP-TO-BC indicated positive. LD C,$FF ; prepare negative sign byte and RET ; return. ; -------------------- ; THE 'CIRCLE' COMMAND ; -------------------- ; "Goe not Thou about to Square eyther circle" - ; - John Donne, Cambridge educated theologian, 1624 ; ; The CIRCLE command draws a circle as a series of straight lines. ; In some ways it can be regarded as a polygon, but the first line is drawn ; as a tangent, taking the radius as its distance from the centre. ; ; Both the CIRCLE algorithm and the ARC drawing algorithm make use of the ; 'ROTATION FORMULA' (see later). It is only necessary to work out where ; the first line will be drawn and how long it is and then the rotation ; formula takes over and calculates all other rotated points. ; ; All Spectrum circles consist of two vertical lines at each side and two ; horizontal lines at the top and bottom. The number of lines is calculated ; from the radius of the circle and is always divisible by 4. For complete ; circles it will range from 4 for a square circle to 32 for a circle of ; radius 87. The Spectrum can attempt larger circles e.g. CIRCLE 0,14,255 ; but these will error as they go off-screen after four lines are drawn. ; At the opposite end, CIRCLE 128,88,1.23 will draw a circle as a perfect 3x3 ; square using 4 straight lines although very small circles are just drawn as ; a dot on the screen. ; ; The first chord drawn is the vertical chord on the right of the circle. ; The starting point is at the base of this chord which is drawn upwards and ; the circle continues in an anti-clockwise direction. As noted earlier the ; x-coordinate of this point measured from the centre of the circle is the ; radius. ; ; The CIRCLE command makes extensive use of the calculator and as part of ; process of drawing a large circle, free memory is checked 1315 times. ; When drawing a large arc, free memory is checked 928 times. ; A single call to 'sin' involves 63 memory checks and so values of sine ; and cosine are pre-calculated and held in the mem locations. As a ; clever trick 'cos' is derived from 'sin' using simple arithmetic operations ; instead of the more expensive 'cos' function. ; ; Initially, the syntax has been partly checked using the class for the DRAW ; command which stacks the origin of the circle (X,Y). ;; CIRCLE L2320: RST 18H ; GET-CHAR x, y. CP $2C ; Is character the required comma ? JP NZ,L1C8A ; Jump, if not, to REPORT-C ; 'Nonsense in basic' RST 20H ; NEXT-CHAR advances the parsed character address. CALL L1C82 ; routine EXPT-1NUM stacks radius in runtime. CALL L1BEE ; routine CHECK-END will return here in runtime ; if nothing follows the command. ; Now make the radius positive and ensure that it is in floating point form ; so that the exponent byte can be accessed for quick testing. RST 28H ;; FP-CALC x, y, r. DEFB $2A ;;abs x, y, r. DEFB $3D ;;re-stack x, y, r. DEFB $38 ;;end-calc x, y, r. LD A,(HL) ; Fetch first, floating-point, exponent byte. CP $81 ; Compare to one. JR NC,L233B ; Forward to C-R-GRE-1 ; if circle radius is greater than one. ; The circle is no larger than a single pixel so delete the radius from the ; calculator stack and plot a point at the centre. RST 28H ;; FP-CALC x, y, r. DEFB $02 ;;delete x, y. DEFB $38 ;;end-calc x, y. JR L22DC ; back to PLOT routine to just plot x,y. ; --- ; Continue when the circle's radius measures greater than one by forming ; the angle 2 * PI radians which is 360 degrees. ;; C-R-GRE-1 L233B: RST 28H ;; FP-CALC x, y, r DEFB $A3 ;;stk-pi/2 x, y, r, pi/2. DEFB $38 ;;end-calc x, y, r, pi/2. ; Change the exponent of pi/2 from $81 to $83 giving 2*PI the central angle. ; This is quicker than multiplying by four. LD (HL),$83 ; x, y, r, 2*PI. ; Now store this important constant in mem-5 and delete so that other ; parameters can be derived from it, by a routine shared with DRAW. RST 28H ;; FP-CALC x, y, r, 2*PI. DEFB $C5 ;;st-mem-5 store 2*PI in mem-5 DEFB $02 ;;delete x, y, r. DEFB $38 ;;end-calc x, y, r. ; The parameters derived from mem-5 (A) and from the radius are set up in ; four of the other mem locations by the CIRCLE DRAW PARAMETERS routine which ; also returns the number of straight lines in the B register. CALL L247D ; routine CD-PRMS1 ; mem-0 ; A/No of lines (=a) unused ; mem-1 ; sin(a/2) will be moving x var ; mem-2 ; - will be moving y var ; mem-3 ; cos(a) const ; mem-4 ; sin(a) const ; mem-5 ; Angle of rotation (A) (2*PI) const ; B ; Number of straight lines. PUSH BC ; Preserve the number of lines in B. ; Next calculate the length of half a chord by multiplying the sine of half ; the central angle by the radius of the circle. RST 28H ;; FP-CALC x, y, r. DEFB $31 ;;duplicate x, y, r, r. DEFB $E1 ;;get-mem-1 x, y, r, r, sin(a/2). DEFB $04 ;;multiply x, y, r, half-chord. DEFB $38 ;;end-calc x, y, r, half-chord. LD A,(HL) ; fetch exponent of the half arc to A. CP $80 ; compare to a half pixel JR NC,L235A ; forward, if greater than .5, to C-ARC-GE1 ; If the first line is less than .5 then 4 'lines' would be drawn on the same ; spot so tidy the calculator stack and machine stack and plot the centre. RST 28H ;; FP-CALC x, y, r, hc. DEFB $02 ;;delete x, y, r. DEFB $02 ;;delete x, y. DEFB $38 ;;end-calc x, y. POP BC ; Balance machine stack by taking chord-count. JP L22DC ; JUMP to PLOT ; --- ; The arc is greater than 0.5 so the circle can be drawn. ;; C-ARC-GE1 L235A: RST 28H ;; FP-CALC x, y, r, hc. DEFB $C2 ;;st-mem-2 x, y, r, half chord to mem-2. DEFB $01 ;;exchange x, y, hc, r. DEFB $C0 ;;st-mem-0 x, y, hc, r. DEFB $02 ;;delete x, y, hc. ; Subtract the length of the half-chord from the absolute y coordinate to ; give the starting y coordinate sy. ; Note that for a circle this is also the end coordinate. DEFB $03 ;;subtract x, y-hc. (The start y-coord) DEFB $01 ;;exchange sy, x. ; Next simply add the radius to the x coordinate to give a fuzzy x-coordinate. ; Strictly speaking, the radius should be multiplied by cos(a/2) first but ; doing it this way makes the circle slightly larger. DEFB $E0 ;;get-mem-0 sy, x, r. DEFB $0F ;;addition sy, x+r. (The start x-coord) ; We now want three copies of this pair of values on the calculator stack. ; The first pair remain on the stack throughout the circle routine and are ; the end points. The next pair will be the moving absolute values of x and y ; that are updated after each line is drawn. The final pair will be loaded ; into the COORDS system variable so that the first vertical line starts at ; the right place. DEFB $C0 ;;st-mem-0 sy, sx. DEFB $01 ;;exchange sx, sy. DEFB $31 ;;duplicate sx, sy, sy. DEFB $E0 ;;get-mem-0 sx, sy, sy, sx. DEFB $01 ;;exchange sx, sy, sx, sy. DEFB $31 ;;duplicate sx, sy, sx, sy, sy. DEFB $E0 ;;get-mem-0 sx, sy, sx, sy, sy, sx. ; Locations mem-1 and mem-2 are the relative x and y values which are updated ; after each line is drawn. Since we are drawing a vertical line then the rx ; value in mem-1 is zero and the ry value in mem-2 is the full chord. DEFB $A0 ;;stk-zero sx, sy, sx, sy, sy, sx, 0. DEFB $C1 ;;st-mem-1 sx, sy, sx, sy, sy, sx, 0. DEFB $02 ;;delete sx, sy, sx, sy, sy, sx. ; Although the three pairs of x/y values are the same for a circle, they ; will be labelled terminating, absolute and start coordinates. DEFB $38 ;;end-calc tx, ty, ax, ay, sy, sx. ; Use the exponent manipulating trick again to double the value of mem-2. INC (IY+$62) ; Increment MEM-2-1st doubling half chord. ; Note. this first vertical chord is drawn at the radius so circles are ; slightly displaced to the right. ; It is only necessary to place the values (sx) and (sy) in the system ; variable COORDS to ensure that drawing commences at the correct pixel. ; Note. a couple of LD (COORDS),A instructions would have been quicker, and ; simpler, than using LD (COORDS),HL. CALL L1E94 ; routine FIND-INT1 fetches sx from stack to A. LD L,A ; place X value in L. PUSH HL ; save the holding register. CALL L1E94 ; routine FIND-INT1 fetches sy to A POP HL ; restore the holding register. LD H,A ; and place y value in high byte. LD ($5C7D),HL ; Update the COORDS system variable. ; ; tx, ty, ax, ay. POP BC ; restore the chord count ; values 4,8,12,16,20,24,28 or 32. JP L2420 ; forward to DRW-STEPS ; tx, ty, ax, ay. ; Note. the jump to DRW-STEPS is just to decrement B and jump into the ; middle of the arc-drawing loop. The arc count which includes the first ; vertical arc draws one less than the perceived number of arcs. ; The final arc offsets are obtained by subtracting the final COORDS value ; from the initial sx and sy values which are kept at the base of the ; calculator stack throughout the arc loop. ; This ensures that the final line finishes exactly at the starting pixel ; removing the possibility of any inaccuracy. ; Since the initial sx and sy values are not required until the final arc ; is drawn, they are not shown until then. ; As the calculator stack is quite busy, only the active parts are shown in ; each section. ; ------------------ ; THE 'DRAW' COMMAND ; ------------------ ; The Spectrum's DRAW command is overloaded and can take two parameters sets. ; ; With two parameters, it simply draws an approximation to a straight line ; at offset x,y using the LINE-DRAW routine. ; ; With three parameters, an arc is drawn to the point at offset x,y turning ; through an angle, in radians, supplied by the third parameter. ; The arc will consist of 4 to 252 straight lines each one of which is drawn ; by calls to the DRAW-LINE routine. ;; DRAW L2382: RST 18H ; GET-CHAR CP $2C ; is it the comma character ? JR Z,L238D ; forward, if so, to DR-3-PRMS ; There are two parameters e.g. DRAW 255,175 CALL L1BEE ; routine CHECK-END JP L2477 ; jump forward to LINE-DRAW ; --- ; There are three parameters e.g. DRAW 255, 175, .5 ; The first two are relative coordinates and the third is the angle of ; rotation in radians (A). ;; DR-3-PRMS L238D: RST 20H ; NEXT-CHAR skips over the 'comma'. CALL L1C82 ; routine EXPT-1NUM stacks the rotation angle. CALL L1BEE ; routine CHECK-END ; Now enter the calculator and store the complete rotation angle in mem-5 RST 28H ;; FP-CALC x, y, A. DEFB $C5 ;;st-mem-5 x, y, A. ; Test the angle for the special case of 360 degrees. DEFB $A2 ;;stk-half x, y, A, 1/2. DEFB $04 ;;multiply x, y, A/2. DEFB $1F ;;sin x, y, sin(A/2). DEFB $31 ;;duplicate x, y, sin(A/2),sin(A/2) DEFB $30 ;;not x, y, sin(A/2), (0/1). DEFB $30 ;;not x, y, sin(A/2), (1/0). DEFB $00 ;;jump-true x, y, sin(A/2). DEFB $06 ;;forward to L23A3, DR-SIN-NZ ; if sin(r/2) is not zero. ; The third parameter is 2*PI (or a multiple of 2*PI) so a 360 degrees turn ; would just be a straight line. Eliminating this case here prevents ; division by zero at later stage. DEFB $02 ;;delete x, y. DEFB $38 ;;end-calc x, y. JP L2477 ; forward to LINE-DRAW ; --- ; An arc can be drawn. ;; DR-SIN-NZ L23A3: DEFB $C0 ;;st-mem-0 x, y, sin(A/2). store mem-0 DEFB $02 ;;delete x, y. ; The next step calculates (roughly) the diameter of the circle of which the ; arc will form part. This value does not have to be too accurate as it is ; only used to evaluate the number of straight lines and then discarded. ; After all for a circle, the radius is used. Consequently, a circle of ; radius 50 will have 24 straight lines but an arc of radius 50 will have 20 ; straight lines - when drawn in any direction. ; So that simple arithmetic can be used, the length of the chord can be ; calculated as X+Y rather than by Pythagoras Theorem and the sine of the ; nearest angle within reach is used. DEFB $C1 ;;st-mem-1 x, y. store mem-1 DEFB $02 ;;delete x. DEFB $31 ;;duplicate x, x. DEFB $2A ;;abs x, x (+ve). DEFB $E1 ;;get-mem-1 x, X, y. DEFB $01 ;;exchange x, y, X. DEFB $E1 ;;get-mem-1 x, y, X, y. DEFB $2A ;;abs x, y, X, Y (+ve). DEFB $0F ;;addition x, y, X+Y. DEFB $E0 ;;get-mem-0 x, y, X+Y, sin(A/2). DEFB $05 ;;division x, y, X+Y/sin(A/2). DEFB $2A ;;abs x, y, X+Y/sin(A/2) = D. ; Bring back sin(A/2) from mem-0 which will shortly get trashed. ; Then bring D to the top of the stack again. DEFB $E0 ;;get-mem-0 x, y, D, sin(A/2). DEFB $01 ;;exchange x, y, sin(A/2), D. ; Note. that since the value at the top of the stack has arisen as a result ; of division then it can no longer be in integer form and the next re-stack ; is unnecessary. Only the Sinclair ZX80 had integer division. DEFB $3D ;;re-stack (unnecessary) DEFB $38 ;;end-calc x, y, sin(A/2), D. ; The next test avoids drawing 4 straight lines when the start and end pixels ; are adjacent (or the same) but is probably best dispensed with. LD A,(HL) ; fetch exponent byte of D. CP $81 ; compare to 1 JR NC,L23C1 ; forward, if > 1, to DR-PRMS ; else delete the top two stack values and draw a simple straight line. RST 28H ;; FP-CALC DEFB $02 ;;delete DEFB $02 ;;delete DEFB $38 ;;end-calc x, y. JP L2477 ; to LINE-DRAW ; --- ; The ARC will consist of multiple straight lines so call the CIRCLE-DRAW ; PARAMETERS ROUTINE to pre-calculate sine values from the angle (in mem-5) ; and determine also the number of straight lines from that value and the ; 'diameter' which is at the top of the calculator stack. ;; DR-PRMS L23C1: CALL L247D ; routine CD-PRMS1 ; mem-0 ; (A)/No. of lines (=a) (step angle) ; mem-1 ; sin(a/2) ; mem-2 ; - ; mem-3 ; cos(a) const ; mem-4 ; sin(a) const ; mem-5 ; Angle of rotation (A) in ; B ; Count of straight lines - max 252. PUSH BC ; Save the line count on the machine stack. ; Remove the now redundant diameter value D. RST 28H ;; FP-CALC x, y, sin(A/2), D. DEFB $02 ;;delete x, y, sin(A/2). ; Dividing the sine of the step angle by the sine of the total angle gives ; the length of the initial chord on a unary circle. This factor f is used ; to scale the coordinates of the first line which still points in the ; direction of the end point and may be larger. DEFB $E1 ;;get-mem-1 x, y, sin(A/2), sin(a/2) DEFB $01 ;;exchange x, y, sin(a/2), sin(A/2) DEFB $05 ;;division x, y, sin(a/2)/sin(A/2) DEFB $C1 ;;st-mem-1 x, y. f. DEFB $02 ;;delete x, y. ; With the factor stored, scale the x coordinate first. DEFB $01 ;;exchange y, x. DEFB $31 ;;duplicate y, x, x. DEFB $E1 ;;get-mem-1 y, x, x, f. DEFB $04 ;;multiply y, x, x*f (=xx) DEFB $C2 ;;st-mem-2 y, x, xx. DEFB $02 ;;delete y. x. ; Now scale the y coordinate. DEFB $01 ;;exchange x, y. DEFB $31 ;;duplicate x, y, y. DEFB $E1 ;;get-mem-1 x, y, y, f DEFB $04 ;;multiply x, y, y*f (=yy) ; Note. 'sin' and 'cos' trash locations mem-0 to mem-2 so fetch mem-2 to the ; calculator stack for safe keeping. DEFB $E2 ;;get-mem-2 x, y, yy, xx. ; Once we get the coordinates of the first straight line then the 'ROTATION ; FORMULA' used in the arc loop will take care of all other points, but we ; now use a variation of that formula to rotate the first arc through (A-a)/2 ; radians. ; ; xRotated = y * sin(angle) + x * cos(angle) ; yRotated = y * cos(angle) - x * sin(angle) ; DEFB $E5 ;;get-mem-5 x, y, yy, xx, A. DEFB $E0 ;;get-mem-0 x, y, yy, xx, A, a. DEFB $03 ;;subtract x, y, yy, xx, A-a. DEFB $A2 ;;stk-half x, y, yy, xx, A-a, 1/2. DEFB $04 ;;multiply x, y, yy, xx, (A-a)/2. (=angle) DEFB $31 ;;duplicate x, y, yy, xx, angle, angle. DEFB $1F ;;sin x, y, yy, xx, angle, sin(angle) DEFB $C5 ;;st-mem-5 x, y, yy, xx, angle, sin(angle) DEFB $02 ;;delete x, y, yy, xx, angle DEFB $20 ;;cos x, y, yy, xx, cos(angle). ; Note. mem-0, mem-1 and mem-2 can be used again now... DEFB $C0 ;;st-mem-0 x, y, yy, xx, cos(angle). DEFB $02 ;;delete x, y, yy, xx. DEFB $C2 ;;st-mem-2 x, y, yy, xx. DEFB $02 ;;delete x, y, yy. DEFB $C1 ;;st-mem-1 x, y, yy. DEFB $E5 ;;get-mem-5 x, y, yy, sin(angle) DEFB $04 ;;multiply x, y, yy*sin(angle). DEFB $E0 ;;get-mem-0 x, y, yy*sin(angle), cos(angle) DEFB $E2 ;;get-mem-2 x, y, yy*sin(angle), cos(angle), xx. DEFB $04 ;;multiply x, y, yy*sin(angle), xx*cos(angle). DEFB $0F ;;addition x, y, xRotated. DEFB $E1 ;;get-mem-1 x, y, xRotated, yy. DEFB $01 ;;exchange x, y, yy, xRotated. DEFB $C1 ;;st-mem-1 x, y, yy, xRotated. DEFB $02 ;;delete x, y, yy. DEFB $E0 ;;get-mem-0 x, y, yy, cos(angle). DEFB $04 ;;multiply x, y, yy*cos(angle). DEFB $E2 ;;get-mem-2 x, y, yy*cos(angle), xx. DEFB $E5 ;;get-mem-5 x, y, yy*cos(angle), xx, sin(angle). DEFB $04 ;;multiply x, y, yy*cos(angle), xx*sin(angle). DEFB $03 ;;subtract x, y, yRotated. DEFB $C2 ;;st-mem-2 x, y, yRotated. ; Now the initial x and y coordinates are made positive and summed to see ; if they measure up to anything significant. DEFB $2A ;;abs x, y, yRotated'. DEFB $E1 ;;get-mem-1 x, y, yRotated', xRotated. DEFB $2A ;;abs x, y, yRotated', xRotated'. DEFB $0F ;;addition x, y, yRotated+xRotated. DEFB $02 ;;delete x, y. DEFB $38 ;;end-calc x, y. ; Although the test value has been deleted it is still above the calculator ; stack in memory and conveniently DE which points to the first free byte ; addresses the exponent of the test value. LD A,(DE) ; Fetch exponent of the length indicator. CP $81 ; Compare to that for 1 POP BC ; Balance the machine stack JP C,L2477 ; forward, if the coordinates of first line ; don't add up to more than 1, to LINE-DRAW ; Continue when the arc will have a discernable shape. PUSH BC ; Restore line counter to the machine stack. ; The parameters of the DRAW command were relative and they are now converted ; to absolute coordinates by adding to the coordinates of the last point ; plotted. The first two values on the stack are the terminal tx and ty ; coordinates. The x-coordinate is converted first but first the last point ; plotted is saved as it will initialize the moving ax, value. RST 28H ;; FP-CALC x, y. DEFB $01 ;;exchange y, x. DEFB $38 ;;end-calc y, x. LD A,($5C7D) ; Fetch System Variable COORDS-x CALL L2D28 ; routine STACK-A RST 28H ;; FP-CALC y, x, last-x. ; Store the last point plotted to initialize the moving ax value. DEFB $C0 ;;st-mem-0 y, x, last-x. DEFB $0F ;;addition y, absolute x. DEFB $01 ;;exchange tx, y. DEFB $38 ;;end-calc tx, y. LD A,($5C7E) ; Fetch System Variable COORDS-y CALL L2D28 ; routine STACK-A RST 28H ;; FP-CALC tx, y, last-y. ; Store the last point plotted to initialize the moving ay value. DEFB $C5 ;;st-mem-5 tx, y, last-y. DEFB $0F ;;addition tx, ty. ; Fetch the moving ax and ay to the calculator stack. DEFB $E0 ;;get-mem-0 tx, ty, ax. DEFB $E5 ;;get-mem-5 tx, ty, ax, ay. DEFB $38 ;;end-calc tx, ty, ax, ay. POP BC ; Restore the straight line count. ; ----------------------------------- ; THE 'CIRCLE/DRAW CONVERGENCE POINT' ; ----------------------------------- ; The CIRCLE and ARC-DRAW commands converge here. ; ; Note. for both the CIRCLE and ARC commands the minimum initial line count ; is 4 (as set up by the CD_PARAMS routine) and so the zero flag will never ; be set and the loop is always entered. The first test is superfluous and ; the jump will always be made to ARC-START. ;; DRW-STEPS L2420: DEC B ; decrement the arc count (4,8,12,16...). JR Z,L245F ; forward, if zero (not possible), to ARC-END JR L2439 ; forward to ARC-START ; -------------- ; THE 'ARC LOOP' ; -------------- ; ; The arc drawing loop will draw up to 31 straight lines for a circle and up ; 251 straight lines for an arc between two points. In both cases the final ; closing straight line is drawn at ARC_END, but it otherwise loops back to ; here to calculate the next coordinate using the ROTATION FORMULA where (a) ; is the previously calculated, constant CENTRAL ANGLE of the arcs. ; ; Xrotated = x * cos(a) - y * sin(a) ; Yrotated = x * sin(a) + y * cos(a) ; ; The values cos(a) and sin(a) are pre-calculated and held in mem-3 and mem-4 ; for the duration of the routine. ; Memory location mem-1 holds the last relative x value (rx) and mem-2 holds ; the last relative y value (ry) used by DRAW. ; ; Note. that this is a very clever twist on what is after all a very clever, ; well-used formula. Normally the rotation formula is used with the x and y ; coordinates from the centre of the circle (or arc) and a supplied angle to ; produce two new x and y coordinates in an anticlockwise direction on the ; circumference of the circle. ; What is being used here, instead, is the relative X and Y parameters from ; the last point plotted that are required to get to the current point and ; the formula returns the next relative coordinates to use. ;; ARC-LOOP L2425: RST 28H ;; FP-CALC DEFB $E1 ;;get-mem-1 rx. DEFB $31 ;;duplicate rx, rx. DEFB $E3 ;;get-mem-3 cos(a) DEFB $04 ;;multiply rx, rx*cos(a). DEFB $E2 ;;get-mem-2 rx, rx*cos(a), ry. DEFB $E4 ;;get-mem-4 rx, rx*cos(a), ry, sin(a). DEFB $04 ;;multiply rx, rx*cos(a), ry*sin(a). DEFB $03 ;;subtract rx, rx*cos(a) - ry*sin(a) DEFB $C1 ;;st-mem-1 rx, new relative x rotated. DEFB $02 ;;delete rx. DEFB $E4 ;;get-mem-4 rx, sin(a). DEFB $04 ;;multiply rx*sin(a) DEFB $E2 ;;get-mem-2 rx*sin(a), ry. DEFB $E3 ;;get-mem-3 rx*sin(a), ry, cos(a). DEFB $04 ;;multiply rx*sin(a), ry*cos(a). DEFB $0F ;;addition rx*sin(a) + ry*cos(a). DEFB $C2 ;;st-mem-2 new relative y rotated. DEFB $02 ;;delete . DEFB $38 ;;end-calc . ; Note. the calculator stack actually holds tx, ty, ax, ay ; and the last absolute values of x and y ; are now brought into play. ; ; Magically, the two new rotated coordinates rx and ry are all that we would ; require to draw a circle or arc - on paper! ; The Spectrum DRAW routine draws to the rounded x and y coordinate and so ; repetitions of values like 3.49 would mean that the fractional parts ; would be lost until eventually the draw coordinates might differ from the ; floating point values used above by several pixels. ; For this reason the accurate offsets calculated above are added to the ; accurate, absolute coordinates maintained in ax and ay and these new ; coordinates have the integer coordinates of the last plot position ; ( from System Variable COORDS ) subtracted from them to give the relative ; coordinates required by the DRAW routine. ; The mid entry point. ;; ARC-START L2439: PUSH BC ; Preserve the arc counter on the machine stack. ; Store the absolute ay in temporary variable mem-0 for the moment. RST 28H ;; FP-CALC ax, ay. DEFB $C0 ;;st-mem-0 ax, ay. DEFB $02 ;;delete ax. ; Now add the fractional relative x coordinate to the fractional absolute ; x coordinate to obtain a new fractional x-coordinate. DEFB $E1 ;;get-mem-1 ax, xr. DEFB $0F ;;addition ax+xr (= new ax). DEFB $31 ;;duplicate ax, ax. DEFB $38 ;;end-calc ax, ax. LD A,($5C7D) ; COORDS-x last x (integer ix 0-255) CALL L2D28 ; routine STACK-A RST 28H ;; FP-CALC ax, ax, ix. DEFB $03 ;;subtract ax, ax-ix = relative DRAW Dx. ; Having calculated the x value for DRAW do the same for the y value. DEFB $E0 ;;get-mem-0 ax, Dx, ay. DEFB $E2 ;;get-mem-2 ax, Dx, ay, ry. DEFB $0F ;;addition ax, Dx, ay+ry (= new ay). DEFB $C0 ;;st-mem-0 ax, Dx, ay. DEFB $01 ;;exchange ax, ay, Dx, DEFB $E0 ;;get-mem-0 ax, ay, Dx, ay. DEFB $38 ;;end-calc ax, ay, Dx, ay. LD A,($5C7E) ; COORDS-y last y (integer iy 0-175) CALL L2D28 ; routine STACK-A RST 28H ;; FP-CALC ax, ay, Dx, ay, iy. DEFB $03 ;;subtract ax, ay, Dx, ay-iy ( = Dy). DEFB $38 ;;end-calc ax, ay, Dx, Dy. CALL L24B7 ; Routine DRAW-LINE draws (Dx,Dy) relative to ; the last pixel plotted leaving absolute x ; and y on the calculator stack. ; ax, ay. POP BC ; Restore the arc counter from the machine stack. DJNZ L2425 ; Decrement and loop while > 0 to ARC-LOOP ; ------------- ; THE 'ARC END' ; ------------- ; To recap the full calculator stack is tx, ty, ax, ay. ; Just as one would do if drawing the curve on paper, the final line would ; be drawn by joining the last point plotted to the initial start point ; in the case of a CIRCLE or to the calculated end point in the case of ; an ARC. ; The moving absolute values of x and y are no longer required and they ; can be deleted to expose the closing coordinates. ;; ARC-END L245F: RST 28H ;; FP-CALC tx, ty, ax, ay. DEFB $02 ;;delete tx, ty, ax. DEFB $02 ;;delete tx, ty. DEFB $01 ;;exchange ty, tx. DEFB $38 ;;end-calc ty, tx. ; First calculate the relative x coordinate to the end-point. LD A,($5C7D) ; COORDS-x CALL L2D28 ; routine STACK-A RST 28H ;; FP-CALC ty, tx, coords_x. DEFB $03 ;;subtract ty, rx. ; Next calculate the relative y coordinate to the end-point. DEFB $01 ;;exchange rx, ty. DEFB $38 ;;end-calc rx, ty. LD A,($5C7E) ; COORDS-y CALL L2D28 ; routine STACK-A RST 28H ;; FP-CALC rx, ty, coords_y DEFB $03 ;;subtract rx, ry. DEFB $38 ;;end-calc rx, ry. ; Finally draw the last straight line. ;; LINE-DRAW L2477: CALL L24B7 ; routine DRAW-LINE draws to the relative ; coordinates (rx, ry). JP L0D4D ; jump back and exit via TEMPS >>> ; -------------------------------------------- ; THE 'INITIAL CIRCLE/DRAW PARAMETERS' ROUTINE ; -------------------------------------------- ; Begin by calculating the number of chords which will be returned in B. ; A rule of thumb is employed that uses a value z which for a circle is the ; radius and for an arc is the diameter with, as it happens, a pinch more if ; the arc is on a slope. ; ; NUMBER OF STRAIGHT LINES = ANGLE OF ROTATION * SQUARE ROOT ( Z ) / 2 ;; CD-PRMS1 L247D: RST 28H ;; FP-CALC z. DEFB $31 ;;duplicate z, z. DEFB $28 ;;sqr z, sqr(z). DEFB $34 ;;stk-data z, sqr(z), 2. DEFB $32 ;;Exponent: $82, Bytes: 1 DEFB $00 ;;(+00,+00,+00) DEFB $01 ;;exchange z, 2, sqr(z). DEFB $05 ;;division z, 2/sqr(z). DEFB $E5 ;;get-mem-5 z, 2/sqr(z), ANGLE. DEFB $01 ;;exchange z, ANGLE, 2/sqr (z) DEFB $05 ;;division z, ANGLE*sqr(z)/2 (= No. of lines) DEFB $2A ;;abs (for arc only) DEFB $38 ;;end-calc z, number of lines. ; As an example for a circle of radius 87 the number of lines will be 29. CALL L2DD5 ; routine FP-TO-A ; The value is compressed into A register, no carry with valid circle. JR C,L2495 ; forward, if over 256, to USE-252 ; now make a multiple of 4 e.g. 29 becomes 28 AND $FC ; AND 252 ; Adding 4 could set carry for arc, for the circle example, 28 becomes 32. ADD A,$04 ; adding 4 could set carry if result is 256. JR NC,L2497 ; forward if less than 256 to DRAW-SAVE ; For an arc, a limit of 252 is imposed. ;; USE-252 L2495: LD A,$FC ; Use a value of 252 (for arc). ; For both arcs and circles, constants derived from the central angle are ; stored in the 'mem' locations. Some are not relevant for the circle. ;; DRAW-SAVE L2497: PUSH AF ; Save the line count (A) on the machine stack. CALL L2D28 ; Routine STACK-A stacks the modified count(A). RST 28H ;; FP-CALC z, A. DEFB $E5 ;;get-mem-5 z, A, ANGLE. DEFB $01 ;;exchange z, ANGLE, A. DEFB $05 ;;division z, ANGLE/A. (Angle/count = a) DEFB $31 ;;duplicate z, a, a. ; Note. that cos (a) could be formed here directly using 'cos' and stored in ; mem-3 but that would spoil a good story and be slightly slower, as also ; would using square roots to form cos (a) from sin (a). DEFB $1F ;;sin z, a, sin(a) DEFB $C4 ;;st-mem-4 z, a, sin(a) DEFB $02 ;;delete z, a. DEFB $31 ;;duplicate z, a, a. DEFB $A2 ;;stk-half z, a, a, 1/2. DEFB $04 ;;multiply z, a, a/2. DEFB $1F ;;sin z, a, sin(a/2). ; Note. after second sin, mem-0 and mem-1 become free. DEFB $C1 ;;st-mem-1 z, a, sin(a/2). DEFB $01 ;;exchange z, sin(a/2), a. DEFB $C0 ;;st-mem-0 z, sin(a/2), a. (for arc only) ; Now form cos(a) from sin(a/2) using the 'DOUBLE ANGLE FORMULA'. DEFB $02 ;;delete z, sin(a/2). DEFB $31 ;;duplicate z, sin(a/2), sin(a/2). DEFB $04 ;;multiply z, sin(a/2)*sin(a/2). DEFB $31 ;;duplicate z, sin(a/2)*sin(a/2), ;; sin(a/2)*sin(a/2). DEFB $0F ;;addition z, 2*sin(a/2)*sin(a/2). DEFB $A1 ;;stk-one z, 2*sin(a/2)*sin(a/2), 1. DEFB $03 ;;subtract z, 2*sin(a/2)*sin(a/2)-1. DEFB $1B ;;negate z, 1-2*sin(a/2)*sin(a/2). DEFB $C3 ;;st-mem-3 z, cos(a). DEFB $02 ;;delete z. DEFB $38 ;;end-calc z. ; The radius/diameter is left on the calculator stack. POP BC ; Restore the line count to the B register. RET ; Return. ; -------------------------- ; THE 'DOUBLE ANGLE FORMULA' ; -------------------------- ; This formula forms cos(a) from sin(a/2) using simple arithmetic. ; ; THE GEOMETRIC PROOF OF FORMULA cos (a) = 1 - 2 * sin(a/2) * sin(a/2) ; ; ; A ; ; . /|\ ; . / | \ ; . / | \ ; . / |a/2\ ; . / | \ ; . 1 / | \ ; . / | \ ; . / | \ ; . / | \ ; . a/2 D / a E|-+ \ ; B ---------------------/----------+-+--------\ C ; <- 1 -><- 1 -> ; ; cos a = 1 - 2 * sin(a/2) * sin(a/2) ; ; The figure shows a right triangle that inscribes a circle of radius 1 with ; centre, or origin, D. Line BC is the diameter of length 2 and A is a point ; on the circle. The periphery angle BAC is therefore a right angle by the ; Rule of Thales. ; Line AC is a chord touching two points on the circle and the angle at the ; centre is (a). ; Since the vertex of the largest triangle B touches the circle, the ; inscribed angle (a/2) is half the central angle (a). ; The cosine of (a) is the length DE as the hypotenuse is of length 1. ; This can also be expressed as 1-length CE. Examining the triangle at the ; right, the top angle is also (a/2) as angle BAE and EBA add to give a right ; angle as do BAE and EAC. ; So cos (a) = 1 - AC * sin(a/2) ; Looking at the largest triangle, side AC can be expressed as ; AC = 2 * sin(a/2) and so combining these we get ; cos (a) = 1 - 2 * sin(a/2) * sin(a/2). ; ; "I will be sufficiently rewarded if when telling it to others, you will ; not claim the discovery as your own, but will say it is mine." ; - Thales, 640 - 546 B.C. ; ; -------------------------- ; THE 'LINE DRAWING' ROUTINE ; -------------------------- ; ; ;; DRAW-LINE L24B7: CALL L2307 ; routine STK-TO-BC LD A,C ; CP B ; JR NC,L24C4 ; to DL-X-GE-Y LD L,C ; PUSH DE ; XOR A ; LD E,A ; JR L24CB ; to DL-LARGER ; --- ;; DL-X-GE-Y L24C4: OR C ; RET Z ; LD L,B ; LD B,C ; PUSH DE ; LD D,$00 ; ;; DL-LARGER L24CB: LD H,B ; LD A,B ; RRA ; ;; D-L-LOOP L24CE: ADD A,L ; JR C,L24D4 ; to D-L-DIAG CP H ; JR C,L24DB ; to D-L-HR-VT ;; D-L-DIAG L24D4: SUB H ; LD C,A ; EXX ; POP BC ; PUSH BC ; JR L24DF ; to D-L-STEP ; --- ;; D-L-HR-VT L24DB: LD C,A ; PUSH DE ; EXX ; POP BC ; ;; D-L-STEP L24DF: LD HL,($5C7D) ; COORDS LD A,B ; ADD A,H ; LD B,A ; LD A,C ; INC A ; ADD A,L ; JR C,L24F7 ; to D-L-RANGE JR Z,L24F9 ; to REPORT-Bc ;; D-L-PLOT L24EC: DEC A ; LD C,A ; CALL L22E5 ; routine PLOT-SUB EXX ; LD A,C ; DJNZ L24CE ; to D-L-LOOP POP DE ; RET ; ; --- ;; D-L-RANGE L24F7: JR Z,L24EC ; to D-L-PLOT ;; REPORT-Bc L24F9: RST 08H ; ERROR-1 DEFB $0A ; Error Report: Integer out of range
41.609691
85
0.482384
4b68e968bc4f3d5224520232a4b3a01d5883ee51
382
asm
Assembly
programs/oeis/056/A056548.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/056/A056548.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/056/A056548.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A056548: a(n) = Sum_{k>=1} round(n/k) where round(1/2) = 0. ; 0,1,4,7,11,15,19,23,29,32,37,43,47,52,58,62,68,73,79,84,90,94,100,108,112,117,124,128,136,142,146,152,160,165,171,177,183,188,196,202,208,215,219,227,233,237,247,253,259,263,272,277,283,293,297,303,311,315 mov $2,$0 add $2,$0 lpb $2,1 mov $4,$2 lpb $4,1 add $1,1 trn $4,$3 lpe sub $2,1 add $3,2 lpe
25.466667
207
0.612565
9cdf6c89192624b1cd67995f2e90876933db1b8e
375
asm
Assembly
programs/oeis/055/A055585.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/055/A055585.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/055/A055585.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A055585: Second column of triangle A055584. ; 1,6,25,88,280,832,2352,6400,16896,43520,109824,272384,665600,1605632,3829760,9043968,21168128,49152000,113311744,259522560,590872576,1337982976,3014656000,6761218048,15099494400,33587986432,74440507392 mov $1,$0 mov $2,2 add $2,$0 mov $0,2 pow $0,$1 add $1,8 pow $2,2 sub $2,1 mul $2,$0 mul $1,$2 sub $1,24 div $1,24 add $1,1
22.058824
203
0.741333
d00df4ae3c0c620f9d6b2917fcfd2d15f701d1a0
211
asm
Assembly
libsrc/_DEVELOPMENT/adt/b_array/c/sdcc_iy/b_array_pop_back_fastcall.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/_DEVELOPMENT/adt/b_array/c/sdcc_iy/b_array_pop_back_fastcall.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
1,600
2017-01-15T16:12:02.000Z
2022-03-31T12:11:12.000Z
libsrc/_DEVELOPMENT/adt/b_array/c/sdcc_iy/b_array_pop_back_fastcall.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
215
2017-01-17T10:43:03.000Z
2022-03-23T17:25:02.000Z
; int b_array_pop_back_fastcall(b_array_t *a) SECTION code_clib SECTION code_adt_b_array PUBLIC _b_array_pop_back_fastcall EXTERN asm_b_array_pop_back defc _b_array_pop_back_fastcall = asm_b_array_pop_back
17.583333
54
0.876777
2503a36606c324703df2dd06006a262583e5c440
747
asm
Assembly
oeis/103/A103640.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/103/A103640.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/103/A103640.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A103640: Expansion of theta_4(q)^4 - theta_2(q)^4, where theta_2 and theta_4 are the Jacobi theta series. ; Submitted by Christian Krause ; 1,-24,24,-96,24,-144,96,-192,24,-312,144,-288,96,-336,192,-576,24,-432,312,-480,144,-768,288,-576,96,-744,336,-960,192,-720,576,-768,24,-1152,432,-1152,312,-912,480,-1344,144,-1008,768,-1056,288,-1872,576,-1152,96,-1368,744,-1728,336,-1296,960,-1728,192,-1920,720,-1440,576,-1488,768,-2496,24,-2016,1152,-1632,432,-2304,1152,-1728,312,-1776,912,-2976,480,-2304,1344,-1920,144,-2904,1008,-2016,768,-2592,1056,-2880,288,-2160,1872,-2688,576,-3072,1152,-2880,96,-2352,1368,-3744 mov $2,-1 pow $2,$0 seq $0,4011 ; Theta series of D_4 lattice; Fourier coefficients of Eisenstein series E_{gamma,2}. mul $0,$2
83
477
0.701473
6882a80fb148489134decf53730087a3e199f709
687
asm
Assembly
oeis/110/A110611.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/110/A110611.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/110/A110611.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A110611: Minimal value of sum(p(i)p(i+1),i=1..n), where p(n+1)=p(1), as p ranges over all permutations of {1,2,...,n}. ; 1,4,11,21,37,58,87,123,169,224,291,369,461,566,687,823,977,1148,1339,1549,1781,2034,2311,2611,2937,3288,3667,4073,4509,4974,5471,5999,6561,7156,7787,8453,9157,9898,10679,11499,12361,13264,14211,15201,16237,17318,18447,19623,20849,22124,23451,24829,26261,27746,29287,30883,32537,34248,36019,37849,39741,41694,43711,45791,47937,50148,52427,54773,57189,59674,62231,64859,67561,70336,73187,76113,79117,82198,85359,88599,91921,95324,98811,102381,106037,109778,113607,117523,121529,125624,129811,134089 add $0,2 mov $1,$0 pow $0,3 add $0,$1 add $0,$1 div $0,6 sub $0,1
62.454545
498
0.749636
e2543666c23eb24838df630d7e07b52ca1b05ed3
826
asm
Assembly
programs/oeis/198/A198403.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/198/A198403.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/198/A198403.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A198403: 6^n*n^6. ; 0,6,2304,157464,5308416,121500000,2176782336,32934190464,440301256704,5355700839936,60466176000000,642717115324416,6499837226778624,63041475422674944,590045794670739456,5355700839936000000,47330370277129322496,408568410286816886784,3454279995636458717184,28667865814724733566976,233994140164030464000000,1881447162993674683416576,14923256145952679022034944,116908415639908387519463424,905518775176123833957482496,6940988288557056000000000000,52695386932015469556091846656,396521139274783615537700143104,2959260510574883137257329393664,21916653852462334750237724246016,161162887476414617908936704000000,1177223505151496082933249774452736,8545547296791713027842210491531264,61670135397730584294152744315387904,442604693811335817942538855473217536 mov $2,6 pow $2,$0 mov $3,$0 pow $3,6 mul $3,$2 mov $0,$3
82.6
746
0.909201
aac9172a1e7ca696d68eaaf6d5a849ce5b2b1192
719
asm
Assembly
oeis/100/A100169.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/100/A100169.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/100/A100169.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A100169: Structured pentagonal hexacontahedral numbers (vertex structure 16). ; Submitted by Jamie Morken(s2) ; 1,92,438,1204,2555,4656,7672,11768,17109,23860,32186,42252,54223,68264,84540,103216,124457,148428,175294,205220,238371,274912,315008,358824,406525,458276,514242,574588,639479,709080,783556,863072,947793,1037884,1133510,1234836,1342027,1455248,1574664,1700440,1832741,1971732,2117578,2270444,2430495,2597896,2772812,2955408,3145849,3344300,3550926,3765892,3989363,4221504,4462480,4712456,4971597,5240068,5518034,5805660,6103111,6410552,6728148,7056064,7394465,7743516,8103382,8474228,8856219,9249520 mov $1,$0 mul $1,22 add $1,14 mul $1,$0 add $0,1 mul $0,2 mul $1,5 add $1,4 mul $1,$0 mov $0,$1 div $0,8
44.9375
500
0.801113
15c8ff16b35a4f6408d2ffb9fa4cbad2614401df
352
asm
Assembly
libsrc/adt/linkedlist/adt_ListAppend.asm
andydansby/z88dk-mk2
51c15f1387293809c496f5eaf7b196f8a0e9b66b
[ "ClArtistic" ]
1
2020-09-15T08:35:49.000Z
2020-09-15T08:35:49.000Z
libsrc/adt/linkedlist/adt_ListAppend.asm
dex4er/deb-z88dk
9ee4f23444fa6f6043462332a1bff7ae20a8504b
[ "ClArtistic" ]
null
null
null
libsrc/adt/linkedlist/adt_ListAppend.asm
dex4er/deb-z88dk
9ee4f23444fa6f6043462332a1bff7ae20a8504b
[ "ClArtistic" ]
null
null
null
; int adt_ListAppend(struct adt_List *list, void *item) ; 02.2003, 06.2005 aralbrec ; CALLER linkage for function pointers XLIB adt_ListAppend LIB adt_ListAppend_callee XREF ASMDISP_ADT_LISTAPPEND_CALLEE .adt_ListAppend pop hl pop bc pop de push de push bc push hl jp adt_ListAppend_callee + ASMDISP_ADT_LISTAPPEND_CALLEE
16.761905
59
0.764205
01ea67d4bcea2a0056ce16c62cb65d4dfce26c5b
484
asm
Assembly
oeis/036/A036242.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/036/A036242.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/036/A036242.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A036242: Numerator of fraction equal to the continued fraction [0,2,4,...2n]. ; Submitted by Jon Maiga ; 1,4,25,204,2065,24984,351841,5654440,102131761,2048289660,45164504281,1085996392404,28281070706785,792955976182384,23816960356178305,762935687373888144,25963630331068375201,935453627605835395380,35573201479352813399641,1423863512801718371381020 mul $0,2 add $0,3 mov $1,1 lpb $0 sub $0,2 add $1,$2 mov $3,$2 mov $2,$1 mov $1,$0 mul $1,$2 add $1,$3 lpe mov $0,$2
26.888889
246
0.752066
9ca63620abb283c2972d487426e59ef616374720
1,006
asm
Assembly
programs/oeis/129/A129026.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/129/A129026.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/129/A129026.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A129026: a(n) = (1/2)*(n^4 + 11*n^3 + 53*n^2 + 97*n + 54). ; 0,27,108,282,600,1125,1932,3108,4752,6975,9900,13662,18408,24297,31500,40200,50592,62883,77292,94050,113400,135597,160908,189612,222000,258375,299052,344358,394632,450225,511500,578832,652608,733227,821100,916650,1020312,1132533,1253772,1384500,1525200,1676367,1838508,2012142,2197800,2396025,2607372,2832408,3071712,3325875,3595500,3881202,4183608,4503357,4841100,5197500,5573232,5968983,6385452,6823350,7283400,7766337,8272908,8803872,9360000,9942075,10550892,11187258,11851992,12545925,13269900,14024772,14811408,15630687,16483500,17370750,18293352,19252233,20248332,21282600,22356000,23469507,24624108,25820802,27060600,28344525,29673612,31048908,32471472,33942375,35462700,37033542,38656008,40331217,42060300,43844400,45684672,47582283,49538412,51554250 mov $2,$0 mov $6,$0 lpb $0 add $6,2 trn $0,$6 mov $5,$6 lpe mov $3,$5 bin $5,2 mul $5,$3 mul $5,$3 mov $1,$5 trn $1,4 mov $7,$2 mul $7,$2 mov $4,$7 mul $4,4 add $1,$4 mov $0,$1
43.73913
760
0.772366
3efa9f17d058beee8425677c0910f61828e1cf5f
2,328
asm
Assembly
source/subroutines.asm
tragicmuffin/untitledarpg-nes
f463ddf5ece2ba88050bc74aaad3c168b42c0419
[ "MIT" ]
null
null
null
source/subroutines.asm
tragicmuffin/untitledarpg-nes
f463ddf5ece2ba88050bc74aaad3c168b42c0419
[ "MIT" ]
null
null
null
source/subroutines.asm
tragicmuffin/untitledarpg-nes
f463ddf5ece2ba88050bc74aaad3c168b42c0419
[ "MIT" ]
null
null
null
;;; 6502 Subroutine Library ;;; ; Modulo operator (https://gist.github.com/hausdorff/5993556) ; Load A and Y prior to calling. Returns A%Y in A. mod: SEC ; set carry (C=1) to clear borrow STY temp1 ; store Y in a temporary variable .modloop: SBC temp1 ; subtract A - Y BCS .modloop ; loops if subtraction DID NOT produce a borrow (C=1) ADC temp1 ; add Y back to A to get last positive modulus RTS ; Division operator (https://gist.github.com/hausdorff/5993556) ; Load A and Y prior to calling. Returns floor(A/Y) = quotient(A/Y) in A. divide: LDX #$FF ; start X at $FF so subtraction count will begin at 0 SEC STY temp1 ; store Y in a temporary variable .divideloop: INX ; count number of loops with X (starting at 0) SBC temp1 ; subtract A - Y BCS .divideloop TXA ; transfer quotient to A RTS ; prng (https://wiki.nesdev.com/w/index.php/Random_number_generator) ; ; 16-bit Galois linear feedback shift register with polynomial $002D. ; Returns a random 8-bit number in A/rng (0-255). ; Period: 65535 ; Execution time: ~125 cycles prng: LDX #8 ; iteration count (generates 8 bits) LDA rng+0 prng_step1: ASL A ; shift the register ROL rng+1 BCC prng_step2 EOR #$2D ; apply XOR feedback whenever a 1 bit is shifted out prng_step2: DEX BNE prng_step1 STA rng+0 CMP #0 ; reload flags RTS ; Convert a 2-byte (16-bit) binary/hex number to a 5-byte decimal number (1 byte per decimal digit) ; Requires two variables: temp_dec (5 bytes), temp_bin (2 bytes). ; temp_bin must be set before call. Result will be returned in temp_dec. ; Note: Both variables are little endian. Pass temp_bin = LSB, MSB. Returns temp_dec = d5, d4, d3, d2, d1 (digits) ; BinaryToDecimal: ; LDA #$00 ; STA temp_dec+0 ; STA temp_dec+1 ; STA temp_dec+2 ; STA temp_dec+3 ; STA temp_dec+4 ; LDX #$10 ; BitLoop: ; ASL temp_bin+0 ; ROL temp_bin+1 ; LDY temp_dec+0 ; LDA BinTable, y ; ROL a ; STA temp_dec+0 ; LDY temp_dec+1 ; LDA BinTable, y ; ROL a ; STA temp_dec+1 ; LDY temp_dec+2 ; LDA BinTable, y ; ROL a ; STA temp_dec+2 ; LDY temp_dec+3 ; LDA BinTable, y ; ROL a ; STA temp_dec+3 ; ROL temp_dec+4 ; DEX ; BNE BitLoop ; RTS ; BinTable: ; .db $00, $01, $02, $03, $04, $80, $81, $82, $83, $84
26.454545
116
0.661512
05af80dda30f9fd0b7c0600d016c63ebb7786685
649
asm
Assembly
oeis/002/A002506.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/002/A002506.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/002/A002506.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A002506: Denominators of coefficients of expansion of Bessel function J_2(x). ; 8,96,3072,184320,17694720,2477260800,475634073600,119859786547200,38355131695104000,15188632151261184000,7290543432605368320000,4170190843450270679040000,2802368246798581896314880000,2185847232502893879125606400000,1958519120322592915696543334400000,1997689502729044774010474201088000000,2301338307143859579660066279653376000000,2973329092829866576920805633312161792000000,4281593893675007870765960111969512980480000000,6833423854305312561742472338703342716846080000000 mov $2,1 lpb $0 sub $0,1 add $3,8 add $1,$3 add $1,4 mul $2,$1 lpe mov $0,$2 mul $0,8
46.357143
471
0.864407
c2a31a1eb1286665e0378d8c4195dad08453b2af
7,360
asm
Assembly
editor1.asm
rtx-abir/Assembly-Language---Text-Editor
19d275a98877950763865c15e3935622f456a239
[ "MIT" ]
null
null
null
editor1.asm
rtx-abir/Assembly-Language---Text-Editor
19d275a98877950763865c15e3935622f456a239
[ "MIT" ]
null
null
null
editor1.asm
rtx-abir/Assembly-Language---Text-Editor
19d275a98877950763865c15e3935622f456a239
[ "MIT" ]
null
null
null
.286 .model small .stack 1024 .data Filename db "tst.txt",0 stringarray dw 30000 dup(00h) handle dw ? buff db ? typemode db 0 OpenErrorMsg db 10,13,'unable to open file$' ReadFileErrorMsg db 10,13,'unable to read file$' WriteFileErrorMsg db 10,13,'unable to write file$' CloseFileErrorMsg db 10,13,'unable to close file$' Saved db 10,13 ,"Save Completed!$" .code org 100h .startup mov al,03h mov ah,0 int 10h mov dh, 0 ;set row (0-24) mov dl, 0 ;set column (0-79) mov bh, 0 mov ah, 2 ;set cursor position top left corner int 10h call OpenFile call ReadFile position: mov ah,2 mov dh,0 mov dl,0 mov bh,0 int 10h ; positions the cursor on the top left corner get: mov ah,0 int 16h ; ah = scan code , al = ascii code check: cmp al,1bh ;checks to see if you press ESC button je endl1 ; if yes jump to end cmp al,9 je tab1 cmp al,8 ;checks if you pressed BACKSPACE je backspace1 cmp al,127 je del1 cmp al,0dh ; checks if you pressed enter jne move_next jmp next_line move_next: cmp ah,83 je del1 cmp al,0 ; checks if you buttoned null(nothing) jne check_next ; no a key was pressed call dir jmp next check_next: cmp typemode, 0 je overtype_character call shiftahead overtype_character: mov ah,2 mov dl,al int 21h ; display the character you just entered next: mov ah,0 int 16h jmp check dir: ;scanning keys push bx push cx push dx push ax mov ah,3 mov bh,0 int 10h pop ax ; get location cmp ah,63 ;F5 to save file je loop_video_memory1 cmp ah,75 ; LEFT ARROW je go_left cmp ah,77 ; RIGHT ARROW je go_right cmp ah, 61 ; F3 to switch mode je switch_mode jmp EXIT switch_mode: cmp typemode, 0 je switch_typemode_to_Insert mov typemode, 0 jmp EXIT switch_typemode_to_Insert: mov typemode, 1 jmp EXIT new_line1: jmp new_line backspace1: jmp backspace tab1: jmp tab del1: jmp del endl1: jmp end1 loop_video_memory1: jmp loop_video_memory line1: jmp line tab: mov si,4 push si shft: call shiftahead mov ah,2 mov dl,20h int 21h pop si dec si jnz shift1 jz get2 shift1: push si jmp shft get2: jmp get del: mov ah,2 mov dl,20h int 21h call shiftback mov dl,8 int 21H jmp get go_left: cmp dl,0 je line1 dec dl jmp EXECUTE go_right: cmp dl,79 je new_line1 inc dl jmp EXECUTE next_line: call getcursor xor dh, dh cbw mov si,80 sub si,dx push si shft1: call shiftahead mov ah,2 mov dl,20h int 21h pop si dec si jnz shift2 jz get3 shift2: push si jmp shft1 get3: call getcursor cmp dh,24 je stay mov dl,0 mov ah,2 int 10h jmp get stay: call getcursor mov dh,dh mov dl,dl mov ah,2 int 10h jmp get backspace: call getcursor cmp dl,79 je specialcase mov ah,2 mov dl,20h int 21h xor dl,dl call getcursor call shiftback cmp dl,0 je bline dec dl cmp dl,0 je bline dec dl mov ah,2 int 10h jmp get specialcase: mov ah,2 mov dl,20h int 21h mov ah,2 mov bh,0 mov dh,dh mov dl,78 int 10h jmp get bline: cmp dh,0 je bno_jump dec dh mov ah,2 mov bh,0 mov dh,dh mov dl,79 int 10h jmp get bno_jump: mov ah,2 mov bh,0 mov dx,0 int 10h jmp get line: cmp dh,0 je no_jump dec dh mov ah,2 mov bh,0 mov dh,dh mov dl,79 int 10h jmp EXIT no_jump: mov ah,2 mov bh,0 mov dx,0 int 10h jmp EXIT new_line: cmp dh,24 je no_new_jump inc dh mov ah,2 mov bh,0 mov dh,dh mov dl,1 int 10h jmp EXIT no_new_jump: mov ah,2 mov bh,0 mov dh,24 mov dl,79 int 10h jmp EXIT EXECUTE: mov ah,2 int 10h EXIT: pop dx pop cx pop bx jmp get end1: call closefile mov ah,4ch int 21h loop_video_memory: mov ax, 0b800h mov es, ax mov si, 0 mov di, 0 mov cx, 1920 loop_array: mov ax, es:[si];mov ax, es:si the orginal code didn't work on DOS mov [StringArray + di], ax add si,2 add di,1 loop loop_array write: ;delete file to delete what was inside mov ah,41h lea dx,filename int 21h ;create new file mov ah,3ch mov cx,2 lea dx,Filename int 21h ;jc CreateError mov handle,ax mov ah,40h ;write to file mov bx,handle mov cx,1920 mov al,2 lea dx,StringArray int 21h ;jc WriteError save: lea dx,saved mov ah,9 int 21h ;call closefile jmp end1 OpenFile proc near mov ax,3d02h ;open file with handle mov dx, offset Filename int 21h jc OpenError mov handle,ax ret OpenError: Lea dx,OpenErrorMsg ; set up pointer to open error message mov ah,9 int 21h ; set error flag STC ret OpenFile ENDP ReadFile proc Near mov ah,3fh ; read from file function mov bx,handle lea dx,buff mov cx,1 int 21h jc ReadError cmp ax,0 jz EOff mov dl,buff cmp dl,1ah jz EOff mov ah,2 int 21h jmp ReadFile ReadError: lea dx,ReadFileErrorMsg mov ah,9 int 21h STC EOff: ret ReadFile Endp CloseFile proc near mov ah,3eh mov bx,handle int 21h jc CloseError ret CloseError: lea dx,CloseFileErrorMsg mov ah,9 int 21h STC ret CloseFile endp getcursor proc ;get cursor position mov ah, 03h mov bh,00h int 10h ret getcursor endp shiftahead proc pusha call getcursor mov cx, dx mov bl, 80 mov al, ch mul bl mov bh, 0 mov bl, dl add bx, ax mov ax, 0b800h mov es, ax mov si, 3998 mov di, si sub di, 2 mov cx, 1999 loop_array_: mov ax, es:[di] ;mov ax, es:si the orginal code didn't work on DOS mov es:[si], ax sub si,2 sub di,2 cmp cx, bx jbe end_loop_array_ sub cx, 1 jmp loop_array_ end_loop_array_: popa ret shiftahead endp shiftback proc pusha call getcursor mov cx, dx mov bl, 80 mov al, ch mul bl mov bh, 0 mov bl, dl add bx, ax mov ax, 0b800h mov es, ax mov si, bx shl si, 1 mov di, si sub di, 2 mov cx, 1999 loop1: mov ax, es:[si] ;mov ax, es:si the orginal code didn't work on DOS mov es:[di], ax add si,2 add di,2 cmp bx, cx jae end_loop1 add bx, 1 jmp loop1 end_loop1: popa ret shiftback endp end
15.238095
72
0.550679
ccb607ab7d74aa5b8dda1cde7a25cfe1911fafd1
56,960
asm
Assembly
kill.asm
dylsugar/cs461_hw7
0eacc005942b80f081e5643af7d8a00ff9920af9
[ "MIT-0" ]
null
null
null
kill.asm
dylsugar/cs461_hw7
0eacc005942b80f081e5643af7d8a00ff9920af9
[ "MIT-0" ]
null
null
null
kill.asm
dylsugar/cs461_hw7
0eacc005942b80f081e5643af7d8a00ff9920af9
[ "MIT-0" ]
null
null
null
_kill: file format elf64-x86-64 Disassembly of section .text: 0000000000001000 <main>: #include "stat.h" #include "user.h" int main(int argc, char **argv) { 1000: f3 0f 1e fa endbr64 1004: 55 push %rbp 1005: 48 89 e5 mov %rsp,%rbp 1008: 48 83 ec 20 sub $0x20,%rsp 100c: 89 7d ec mov %edi,-0x14(%rbp) 100f: 48 89 75 e0 mov %rsi,-0x20(%rbp) int i; if(argc < 2){ 1013: 83 7d ec 01 cmpl $0x1,-0x14(%rbp) 1017: 7f 2c jg 1045 <main+0x45> printf(2, "usage: kill pid...\n"); 1019: 48 be e8 1d 00 00 00 movabs $0x1de8,%rsi 1020: 00 00 00 1023: bf 02 00 00 00 mov $0x2,%edi 1028: b8 00 00 00 00 mov $0x0,%eax 102d: 48 ba d4 16 00 00 00 movabs $0x16d4,%rdx 1034: 00 00 00 1037: ff d2 callq *%rdx exit(); 1039: 48 b8 dd 13 00 00 00 movabs $0x13dd,%rax 1040: 00 00 00 1043: ff d0 callq *%rax } for(i=1; i<argc; i++) 1045: c7 45 fc 01 00 00 00 movl $0x1,-0x4(%rbp) 104c: eb 38 jmp 1086 <main+0x86> kill(atoi(argv[i])); 104e: 8b 45 fc mov -0x4(%rbp),%eax 1051: 48 98 cltq 1053: 48 8d 14 c5 00 00 00 lea 0x0(,%rax,8),%rdx 105a: 00 105b: 48 8b 45 e0 mov -0x20(%rbp),%rax 105f: 48 01 d0 add %rdx,%rax 1062: 48 8b 00 mov (%rax),%rax 1065: 48 89 c7 mov %rax,%rdi 1068: 48 b8 1b 13 00 00 00 movabs $0x131b,%rax 106f: 00 00 00 1072: ff d0 callq *%rax 1074: 89 c7 mov %eax,%edi 1076: 48 b8 2b 14 00 00 00 movabs $0x142b,%rax 107d: 00 00 00 1080: ff d0 callq *%rax for(i=1; i<argc; i++) 1082: 83 45 fc 01 addl $0x1,-0x4(%rbp) 1086: 8b 45 fc mov -0x4(%rbp),%eax 1089: 3b 45 ec cmp -0x14(%rbp),%eax 108c: 7c c0 jl 104e <main+0x4e> exit(); 108e: 48 b8 dd 13 00 00 00 movabs $0x13dd,%rax 1095: 00 00 00 1098: ff d0 callq *%rax 000000000000109a <stosb>: "cc"); } static inline void stosb(void *addr, int data, int cnt) { 109a: f3 0f 1e fa endbr64 109e: 55 push %rbp 109f: 48 89 e5 mov %rsp,%rbp 10a2: 48 83 ec 10 sub $0x10,%rsp 10a6: 48 89 7d f8 mov %rdi,-0x8(%rbp) 10aa: 89 75 f4 mov %esi,-0xc(%rbp) 10ad: 89 55 f0 mov %edx,-0x10(%rbp) asm volatile("cld; rep stosb" : 10b0: 48 8b 4d f8 mov -0x8(%rbp),%rcx 10b4: 8b 55 f0 mov -0x10(%rbp),%edx 10b7: 8b 45 f4 mov -0xc(%rbp),%eax 10ba: 48 89 ce mov %rcx,%rsi 10bd: 48 89 f7 mov %rsi,%rdi 10c0: 89 d1 mov %edx,%ecx 10c2: fc cld 10c3: f3 aa rep stos %al,%es:(%rdi) 10c5: 89 ca mov %ecx,%edx 10c7: 48 89 fe mov %rdi,%rsi 10ca: 48 89 75 f8 mov %rsi,-0x8(%rbp) 10ce: 89 55 f0 mov %edx,-0x10(%rbp) "=D" (addr), "=c" (cnt) : "0" (addr), "1" (cnt), "a" (data) : "memory", "cc"); } 10d1: 90 nop 10d2: c9 leaveq 10d3: c3 retq 00000000000010d4 <strcpy>: #include "user.h" #include "x86.h" char* strcpy(char *s, char *t) { 10d4: f3 0f 1e fa endbr64 10d8: 55 push %rbp 10d9: 48 89 e5 mov %rsp,%rbp 10dc: 48 83 ec 20 sub $0x20,%rsp 10e0: 48 89 7d e8 mov %rdi,-0x18(%rbp) 10e4: 48 89 75 e0 mov %rsi,-0x20(%rbp) char *os; os = s; 10e8: 48 8b 45 e8 mov -0x18(%rbp),%rax 10ec: 48 89 45 f8 mov %rax,-0x8(%rbp) while((*s++ = *t++) != 0) 10f0: 90 nop 10f1: 48 8b 55 e0 mov -0x20(%rbp),%rdx 10f5: 48 8d 42 01 lea 0x1(%rdx),%rax 10f9: 48 89 45 e0 mov %rax,-0x20(%rbp) 10fd: 48 8b 45 e8 mov -0x18(%rbp),%rax 1101: 48 8d 48 01 lea 0x1(%rax),%rcx 1105: 48 89 4d e8 mov %rcx,-0x18(%rbp) 1109: 0f b6 12 movzbl (%rdx),%edx 110c: 88 10 mov %dl,(%rax) 110e: 0f b6 00 movzbl (%rax),%eax 1111: 84 c0 test %al,%al 1113: 75 dc jne 10f1 <strcpy+0x1d> ; return os; 1115: 48 8b 45 f8 mov -0x8(%rbp),%rax } 1119: c9 leaveq 111a: c3 retq 000000000000111b <strcmp>: int strcmp(const char *p, const char *q) { 111b: f3 0f 1e fa endbr64 111f: 55 push %rbp 1120: 48 89 e5 mov %rsp,%rbp 1123: 48 83 ec 10 sub $0x10,%rsp 1127: 48 89 7d f8 mov %rdi,-0x8(%rbp) 112b: 48 89 75 f0 mov %rsi,-0x10(%rbp) while(*p && *p == *q) 112f: eb 0a jmp 113b <strcmp+0x20> p++, q++; 1131: 48 83 45 f8 01 addq $0x1,-0x8(%rbp) 1136: 48 83 45 f0 01 addq $0x1,-0x10(%rbp) while(*p && *p == *q) 113b: 48 8b 45 f8 mov -0x8(%rbp),%rax 113f: 0f b6 00 movzbl (%rax),%eax 1142: 84 c0 test %al,%al 1144: 74 12 je 1158 <strcmp+0x3d> 1146: 48 8b 45 f8 mov -0x8(%rbp),%rax 114a: 0f b6 10 movzbl (%rax),%edx 114d: 48 8b 45 f0 mov -0x10(%rbp),%rax 1151: 0f b6 00 movzbl (%rax),%eax 1154: 38 c2 cmp %al,%dl 1156: 74 d9 je 1131 <strcmp+0x16> return (uchar)*p - (uchar)*q; 1158: 48 8b 45 f8 mov -0x8(%rbp),%rax 115c: 0f b6 00 movzbl (%rax),%eax 115f: 0f b6 d0 movzbl %al,%edx 1162: 48 8b 45 f0 mov -0x10(%rbp),%rax 1166: 0f b6 00 movzbl (%rax),%eax 1169: 0f b6 c0 movzbl %al,%eax 116c: 29 c2 sub %eax,%edx 116e: 89 d0 mov %edx,%eax } 1170: c9 leaveq 1171: c3 retq 0000000000001172 <strlen>: uint strlen(char *s) { 1172: f3 0f 1e fa endbr64 1176: 55 push %rbp 1177: 48 89 e5 mov %rsp,%rbp 117a: 48 83 ec 18 sub $0x18,%rsp 117e: 48 89 7d e8 mov %rdi,-0x18(%rbp) int n; for(n = 0; s[n]; n++) 1182: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%rbp) 1189: eb 04 jmp 118f <strlen+0x1d> 118b: 83 45 fc 01 addl $0x1,-0x4(%rbp) 118f: 8b 45 fc mov -0x4(%rbp),%eax 1192: 48 63 d0 movslq %eax,%rdx 1195: 48 8b 45 e8 mov -0x18(%rbp),%rax 1199: 48 01 d0 add %rdx,%rax 119c: 0f b6 00 movzbl (%rax),%eax 119f: 84 c0 test %al,%al 11a1: 75 e8 jne 118b <strlen+0x19> ; return n; 11a3: 8b 45 fc mov -0x4(%rbp),%eax } 11a6: c9 leaveq 11a7: c3 retq 00000000000011a8 <memset>: void* memset(void *dst, int c, uint n) { 11a8: f3 0f 1e fa endbr64 11ac: 55 push %rbp 11ad: 48 89 e5 mov %rsp,%rbp 11b0: 48 83 ec 10 sub $0x10,%rsp 11b4: 48 89 7d f8 mov %rdi,-0x8(%rbp) 11b8: 89 75 f4 mov %esi,-0xc(%rbp) 11bb: 89 55 f0 mov %edx,-0x10(%rbp) stosb(dst, c, n); 11be: 8b 55 f0 mov -0x10(%rbp),%edx 11c1: 8b 4d f4 mov -0xc(%rbp),%ecx 11c4: 48 8b 45 f8 mov -0x8(%rbp),%rax 11c8: 89 ce mov %ecx,%esi 11ca: 48 89 c7 mov %rax,%rdi 11cd: 48 b8 9a 10 00 00 00 movabs $0x109a,%rax 11d4: 00 00 00 11d7: ff d0 callq *%rax return dst; 11d9: 48 8b 45 f8 mov -0x8(%rbp),%rax } 11dd: c9 leaveq 11de: c3 retq 00000000000011df <strchr>: char* strchr(const char *s, char c) { 11df: f3 0f 1e fa endbr64 11e3: 55 push %rbp 11e4: 48 89 e5 mov %rsp,%rbp 11e7: 48 83 ec 10 sub $0x10,%rsp 11eb: 48 89 7d f8 mov %rdi,-0x8(%rbp) 11ef: 89 f0 mov %esi,%eax 11f1: 88 45 f4 mov %al,-0xc(%rbp) for(; *s; s++) 11f4: eb 17 jmp 120d <strchr+0x2e> if(*s == c) 11f6: 48 8b 45 f8 mov -0x8(%rbp),%rax 11fa: 0f b6 00 movzbl (%rax),%eax 11fd: 38 45 f4 cmp %al,-0xc(%rbp) 1200: 75 06 jne 1208 <strchr+0x29> return (char*)s; 1202: 48 8b 45 f8 mov -0x8(%rbp),%rax 1206: eb 15 jmp 121d <strchr+0x3e> for(; *s; s++) 1208: 48 83 45 f8 01 addq $0x1,-0x8(%rbp) 120d: 48 8b 45 f8 mov -0x8(%rbp),%rax 1211: 0f b6 00 movzbl (%rax),%eax 1214: 84 c0 test %al,%al 1216: 75 de jne 11f6 <strchr+0x17> return 0; 1218: b8 00 00 00 00 mov $0x0,%eax } 121d: c9 leaveq 121e: c3 retq 000000000000121f <gets>: char* gets(char *buf, int max) { 121f: f3 0f 1e fa endbr64 1223: 55 push %rbp 1224: 48 89 e5 mov %rsp,%rbp 1227: 48 83 ec 20 sub $0x20,%rsp 122b: 48 89 7d e8 mov %rdi,-0x18(%rbp) 122f: 89 75 e4 mov %esi,-0x1c(%rbp) int i, cc; char c; for(i=0; i+1 < max; ){ 1232: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%rbp) 1239: eb 4f jmp 128a <gets+0x6b> cc = read(0, &c, 1); 123b: 48 8d 45 f7 lea -0x9(%rbp),%rax 123f: ba 01 00 00 00 mov $0x1,%edx 1244: 48 89 c6 mov %rax,%rsi 1247: bf 00 00 00 00 mov $0x0,%edi 124c: 48 b8 04 14 00 00 00 movabs $0x1404,%rax 1253: 00 00 00 1256: ff d0 callq *%rax 1258: 89 45 f8 mov %eax,-0x8(%rbp) if(cc < 1) 125b: 83 7d f8 00 cmpl $0x0,-0x8(%rbp) 125f: 7e 36 jle 1297 <gets+0x78> break; buf[i++] = c; 1261: 8b 45 fc mov -0x4(%rbp),%eax 1264: 8d 50 01 lea 0x1(%rax),%edx 1267: 89 55 fc mov %edx,-0x4(%rbp) 126a: 48 63 d0 movslq %eax,%rdx 126d: 48 8b 45 e8 mov -0x18(%rbp),%rax 1271: 48 01 c2 add %rax,%rdx 1274: 0f b6 45 f7 movzbl -0x9(%rbp),%eax 1278: 88 02 mov %al,(%rdx) if(c == '\n' || c == '\r') 127a: 0f b6 45 f7 movzbl -0x9(%rbp),%eax 127e: 3c 0a cmp $0xa,%al 1280: 74 16 je 1298 <gets+0x79> 1282: 0f b6 45 f7 movzbl -0x9(%rbp),%eax 1286: 3c 0d cmp $0xd,%al 1288: 74 0e je 1298 <gets+0x79> for(i=0; i+1 < max; ){ 128a: 8b 45 fc mov -0x4(%rbp),%eax 128d: 83 c0 01 add $0x1,%eax 1290: 39 45 e4 cmp %eax,-0x1c(%rbp) 1293: 7f a6 jg 123b <gets+0x1c> 1295: eb 01 jmp 1298 <gets+0x79> break; 1297: 90 nop break; } buf[i] = '\0'; 1298: 8b 45 fc mov -0x4(%rbp),%eax 129b: 48 63 d0 movslq %eax,%rdx 129e: 48 8b 45 e8 mov -0x18(%rbp),%rax 12a2: 48 01 d0 add %rdx,%rax 12a5: c6 00 00 movb $0x0,(%rax) return buf; 12a8: 48 8b 45 e8 mov -0x18(%rbp),%rax } 12ac: c9 leaveq 12ad: c3 retq 00000000000012ae <stat>: int stat(char *n, struct stat *st) { 12ae: f3 0f 1e fa endbr64 12b2: 55 push %rbp 12b3: 48 89 e5 mov %rsp,%rbp 12b6: 48 83 ec 20 sub $0x20,%rsp 12ba: 48 89 7d e8 mov %rdi,-0x18(%rbp) 12be: 48 89 75 e0 mov %rsi,-0x20(%rbp) int fd; int r; fd = open(n, O_RDONLY); 12c2: 48 8b 45 e8 mov -0x18(%rbp),%rax 12c6: be 00 00 00 00 mov $0x0,%esi 12cb: 48 89 c7 mov %rax,%rdi 12ce: 48 b8 45 14 00 00 00 movabs $0x1445,%rax 12d5: 00 00 00 12d8: ff d0 callq *%rax 12da: 89 45 fc mov %eax,-0x4(%rbp) if(fd < 0) 12dd: 83 7d fc 00 cmpl $0x0,-0x4(%rbp) 12e1: 79 07 jns 12ea <stat+0x3c> return -1; 12e3: b8 ff ff ff ff mov $0xffffffff,%eax 12e8: eb 2f jmp 1319 <stat+0x6b> r = fstat(fd, st); 12ea: 48 8b 55 e0 mov -0x20(%rbp),%rdx 12ee: 8b 45 fc mov -0x4(%rbp),%eax 12f1: 48 89 d6 mov %rdx,%rsi 12f4: 89 c7 mov %eax,%edi 12f6: 48 b8 6c 14 00 00 00 movabs $0x146c,%rax 12fd: 00 00 00 1300: ff d0 callq *%rax 1302: 89 45 f8 mov %eax,-0x8(%rbp) close(fd); 1305: 8b 45 fc mov -0x4(%rbp),%eax 1308: 89 c7 mov %eax,%edi 130a: 48 b8 1e 14 00 00 00 movabs $0x141e,%rax 1311: 00 00 00 1314: ff d0 callq *%rax return r; 1316: 8b 45 f8 mov -0x8(%rbp),%eax } 1319: c9 leaveq 131a: c3 retq 000000000000131b <atoi>: int atoi(const char *s) { 131b: f3 0f 1e fa endbr64 131f: 55 push %rbp 1320: 48 89 e5 mov %rsp,%rbp 1323: 48 83 ec 18 sub $0x18,%rsp 1327: 48 89 7d e8 mov %rdi,-0x18(%rbp) int n; n = 0; 132b: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%rbp) while('0' <= *s && *s <= '9') 1332: eb 28 jmp 135c <atoi+0x41> n = n*10 + *s++ - '0'; 1334: 8b 55 fc mov -0x4(%rbp),%edx 1337: 89 d0 mov %edx,%eax 1339: c1 e0 02 shl $0x2,%eax 133c: 01 d0 add %edx,%eax 133e: 01 c0 add %eax,%eax 1340: 89 c1 mov %eax,%ecx 1342: 48 8b 45 e8 mov -0x18(%rbp),%rax 1346: 48 8d 50 01 lea 0x1(%rax),%rdx 134a: 48 89 55 e8 mov %rdx,-0x18(%rbp) 134e: 0f b6 00 movzbl (%rax),%eax 1351: 0f be c0 movsbl %al,%eax 1354: 01 c8 add %ecx,%eax 1356: 83 e8 30 sub $0x30,%eax 1359: 89 45 fc mov %eax,-0x4(%rbp) while('0' <= *s && *s <= '9') 135c: 48 8b 45 e8 mov -0x18(%rbp),%rax 1360: 0f b6 00 movzbl (%rax),%eax 1363: 3c 2f cmp $0x2f,%al 1365: 7e 0b jle 1372 <atoi+0x57> 1367: 48 8b 45 e8 mov -0x18(%rbp),%rax 136b: 0f b6 00 movzbl (%rax),%eax 136e: 3c 39 cmp $0x39,%al 1370: 7e c2 jle 1334 <atoi+0x19> return n; 1372: 8b 45 fc mov -0x4(%rbp),%eax } 1375: c9 leaveq 1376: c3 retq 0000000000001377 <memmove>: void* memmove(void *vdst, void *vsrc, int n) { 1377: f3 0f 1e fa endbr64 137b: 55 push %rbp 137c: 48 89 e5 mov %rsp,%rbp 137f: 48 83 ec 28 sub $0x28,%rsp 1383: 48 89 7d e8 mov %rdi,-0x18(%rbp) 1387: 48 89 75 e0 mov %rsi,-0x20(%rbp) 138b: 89 55 dc mov %edx,-0x24(%rbp) char *dst, *src; dst = vdst; 138e: 48 8b 45 e8 mov -0x18(%rbp),%rax 1392: 48 89 45 f8 mov %rax,-0x8(%rbp) src = vsrc; 1396: 48 8b 45 e0 mov -0x20(%rbp),%rax 139a: 48 89 45 f0 mov %rax,-0x10(%rbp) while(n-- > 0) 139e: eb 1d jmp 13bd <memmove+0x46> *dst++ = *src++; 13a0: 48 8b 55 f0 mov -0x10(%rbp),%rdx 13a4: 48 8d 42 01 lea 0x1(%rdx),%rax 13a8: 48 89 45 f0 mov %rax,-0x10(%rbp) 13ac: 48 8b 45 f8 mov -0x8(%rbp),%rax 13b0: 48 8d 48 01 lea 0x1(%rax),%rcx 13b4: 48 89 4d f8 mov %rcx,-0x8(%rbp) 13b8: 0f b6 12 movzbl (%rdx),%edx 13bb: 88 10 mov %dl,(%rax) while(n-- > 0) 13bd: 8b 45 dc mov -0x24(%rbp),%eax 13c0: 8d 50 ff lea -0x1(%rax),%edx 13c3: 89 55 dc mov %edx,-0x24(%rbp) 13c6: 85 c0 test %eax,%eax 13c8: 7f d6 jg 13a0 <memmove+0x29> return vdst; 13ca: 48 8b 45 e8 mov -0x18(%rbp),%rax } 13ce: c9 leaveq 13cf: c3 retq 00000000000013d0 <fork>: mov $SYS_ ## name, %rax; \ mov %rcx, %r10 ;\ syscall ;\ ret SYSCALL(fork) 13d0: 48 c7 c0 01 00 00 00 mov $0x1,%rax 13d7: 49 89 ca mov %rcx,%r10 13da: 0f 05 syscall 13dc: c3 retq 00000000000013dd <exit>: SYSCALL(exit) 13dd: 48 c7 c0 02 00 00 00 mov $0x2,%rax 13e4: 49 89 ca mov %rcx,%r10 13e7: 0f 05 syscall 13e9: c3 retq 00000000000013ea <wait>: SYSCALL(wait) 13ea: 48 c7 c0 03 00 00 00 mov $0x3,%rax 13f1: 49 89 ca mov %rcx,%r10 13f4: 0f 05 syscall 13f6: c3 retq 00000000000013f7 <pipe>: SYSCALL(pipe) 13f7: 48 c7 c0 04 00 00 00 mov $0x4,%rax 13fe: 49 89 ca mov %rcx,%r10 1401: 0f 05 syscall 1403: c3 retq 0000000000001404 <read>: SYSCALL(read) 1404: 48 c7 c0 05 00 00 00 mov $0x5,%rax 140b: 49 89 ca mov %rcx,%r10 140e: 0f 05 syscall 1410: c3 retq 0000000000001411 <write>: SYSCALL(write) 1411: 48 c7 c0 10 00 00 00 mov $0x10,%rax 1418: 49 89 ca mov %rcx,%r10 141b: 0f 05 syscall 141d: c3 retq 000000000000141e <close>: SYSCALL(close) 141e: 48 c7 c0 15 00 00 00 mov $0x15,%rax 1425: 49 89 ca mov %rcx,%r10 1428: 0f 05 syscall 142a: c3 retq 000000000000142b <kill>: SYSCALL(kill) 142b: 48 c7 c0 06 00 00 00 mov $0x6,%rax 1432: 49 89 ca mov %rcx,%r10 1435: 0f 05 syscall 1437: c3 retq 0000000000001438 <exec>: SYSCALL(exec) 1438: 48 c7 c0 07 00 00 00 mov $0x7,%rax 143f: 49 89 ca mov %rcx,%r10 1442: 0f 05 syscall 1444: c3 retq 0000000000001445 <open>: SYSCALL(open) 1445: 48 c7 c0 0f 00 00 00 mov $0xf,%rax 144c: 49 89 ca mov %rcx,%r10 144f: 0f 05 syscall 1451: c3 retq 0000000000001452 <mknod>: SYSCALL(mknod) 1452: 48 c7 c0 11 00 00 00 mov $0x11,%rax 1459: 49 89 ca mov %rcx,%r10 145c: 0f 05 syscall 145e: c3 retq 000000000000145f <unlink>: SYSCALL(unlink) 145f: 48 c7 c0 12 00 00 00 mov $0x12,%rax 1466: 49 89 ca mov %rcx,%r10 1469: 0f 05 syscall 146b: c3 retq 000000000000146c <fstat>: SYSCALL(fstat) 146c: 48 c7 c0 08 00 00 00 mov $0x8,%rax 1473: 49 89 ca mov %rcx,%r10 1476: 0f 05 syscall 1478: c3 retq 0000000000001479 <link>: SYSCALL(link) 1479: 48 c7 c0 13 00 00 00 mov $0x13,%rax 1480: 49 89 ca mov %rcx,%r10 1483: 0f 05 syscall 1485: c3 retq 0000000000001486 <mkdir>: SYSCALL(mkdir) 1486: 48 c7 c0 14 00 00 00 mov $0x14,%rax 148d: 49 89 ca mov %rcx,%r10 1490: 0f 05 syscall 1492: c3 retq 0000000000001493 <chdir>: SYSCALL(chdir) 1493: 48 c7 c0 09 00 00 00 mov $0x9,%rax 149a: 49 89 ca mov %rcx,%r10 149d: 0f 05 syscall 149f: c3 retq 00000000000014a0 <dup>: SYSCALL(dup) 14a0: 48 c7 c0 0a 00 00 00 mov $0xa,%rax 14a7: 49 89 ca mov %rcx,%r10 14aa: 0f 05 syscall 14ac: c3 retq 00000000000014ad <getpid>: SYSCALL(getpid) 14ad: 48 c7 c0 0b 00 00 00 mov $0xb,%rax 14b4: 49 89 ca mov %rcx,%r10 14b7: 0f 05 syscall 14b9: c3 retq 00000000000014ba <sbrk>: SYSCALL(sbrk) 14ba: 48 c7 c0 0c 00 00 00 mov $0xc,%rax 14c1: 49 89 ca mov %rcx,%r10 14c4: 0f 05 syscall 14c6: c3 retq 00000000000014c7 <sleep>: SYSCALL(sleep) 14c7: 48 c7 c0 0d 00 00 00 mov $0xd,%rax 14ce: 49 89 ca mov %rcx,%r10 14d1: 0f 05 syscall 14d3: c3 retq 00000000000014d4 <uptime>: SYSCALL(uptime) 14d4: 48 c7 c0 0e 00 00 00 mov $0xe,%rax 14db: 49 89 ca mov %rcx,%r10 14de: 0f 05 syscall 14e0: c3 retq 00000000000014e1 <aread>: SYSCALL(aread) 14e1: 48 c7 c0 16 00 00 00 mov $0x16,%rax 14e8: 49 89 ca mov %rcx,%r10 14eb: 0f 05 syscall 14ed: c3 retq 00000000000014ee <putc>: #include <stdarg.h> static void putc(int fd, char c) { 14ee: f3 0f 1e fa endbr64 14f2: 55 push %rbp 14f3: 48 89 e5 mov %rsp,%rbp 14f6: 48 83 ec 10 sub $0x10,%rsp 14fa: 89 7d fc mov %edi,-0x4(%rbp) 14fd: 89 f0 mov %esi,%eax 14ff: 88 45 f8 mov %al,-0x8(%rbp) write(fd, &c, 1); 1502: 48 8d 4d f8 lea -0x8(%rbp),%rcx 1506: 8b 45 fc mov -0x4(%rbp),%eax 1509: ba 01 00 00 00 mov $0x1,%edx 150e: 48 89 ce mov %rcx,%rsi 1511: 89 c7 mov %eax,%edi 1513: 48 b8 11 14 00 00 00 movabs $0x1411,%rax 151a: 00 00 00 151d: ff d0 callq *%rax } 151f: 90 nop 1520: c9 leaveq 1521: c3 retq 0000000000001522 <print_x64>: static char digits[] = "0123456789abcdef"; static void print_x64(int fd, addr_t x) { 1522: f3 0f 1e fa endbr64 1526: 55 push %rbp 1527: 48 89 e5 mov %rsp,%rbp 152a: 48 83 ec 20 sub $0x20,%rsp 152e: 89 7d ec mov %edi,-0x14(%rbp) 1531: 48 89 75 e0 mov %rsi,-0x20(%rbp) int i; for (i = 0; i < (sizeof(addr_t) * 2); i++, x <<= 4) 1535: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%rbp) 153c: eb 35 jmp 1573 <print_x64+0x51> putc(fd, digits[x >> (sizeof(addr_t) * 8 - 4)]); 153e: 48 8b 45 e0 mov -0x20(%rbp),%rax 1542: 48 c1 e8 3c shr $0x3c,%rax 1546: 48 ba 30 21 00 00 00 movabs $0x2130,%rdx 154d: 00 00 00 1550: 0f b6 04 02 movzbl (%rdx,%rax,1),%eax 1554: 0f be d0 movsbl %al,%edx 1557: 8b 45 ec mov -0x14(%rbp),%eax 155a: 89 d6 mov %edx,%esi 155c: 89 c7 mov %eax,%edi 155e: 48 b8 ee 14 00 00 00 movabs $0x14ee,%rax 1565: 00 00 00 1568: ff d0 callq *%rax for (i = 0; i < (sizeof(addr_t) * 2); i++, x <<= 4) 156a: 83 45 fc 01 addl $0x1,-0x4(%rbp) 156e: 48 c1 65 e0 04 shlq $0x4,-0x20(%rbp) 1573: 8b 45 fc mov -0x4(%rbp),%eax 1576: 83 f8 0f cmp $0xf,%eax 1579: 76 c3 jbe 153e <print_x64+0x1c> } 157b: 90 nop 157c: 90 nop 157d: c9 leaveq 157e: c3 retq 000000000000157f <print_x32>: static void print_x32(int fd, uint x) { 157f: f3 0f 1e fa endbr64 1583: 55 push %rbp 1584: 48 89 e5 mov %rsp,%rbp 1587: 48 83 ec 20 sub $0x20,%rsp 158b: 89 7d ec mov %edi,-0x14(%rbp) 158e: 89 75 e8 mov %esi,-0x18(%rbp) int i; for (i = 0; i < (sizeof(uint) * 2); i++, x <<= 4) 1591: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%rbp) 1598: eb 36 jmp 15d0 <print_x32+0x51> putc(fd, digits[x >> (sizeof(uint) * 8 - 4)]); 159a: 8b 45 e8 mov -0x18(%rbp),%eax 159d: c1 e8 1c shr $0x1c,%eax 15a0: 89 c2 mov %eax,%edx 15a2: 48 b8 30 21 00 00 00 movabs $0x2130,%rax 15a9: 00 00 00 15ac: 89 d2 mov %edx,%edx 15ae: 0f b6 04 10 movzbl (%rax,%rdx,1),%eax 15b2: 0f be d0 movsbl %al,%edx 15b5: 8b 45 ec mov -0x14(%rbp),%eax 15b8: 89 d6 mov %edx,%esi 15ba: 89 c7 mov %eax,%edi 15bc: 48 b8 ee 14 00 00 00 movabs $0x14ee,%rax 15c3: 00 00 00 15c6: ff d0 callq *%rax for (i = 0; i < (sizeof(uint) * 2); i++, x <<= 4) 15c8: 83 45 fc 01 addl $0x1,-0x4(%rbp) 15cc: c1 65 e8 04 shll $0x4,-0x18(%rbp) 15d0: 8b 45 fc mov -0x4(%rbp),%eax 15d3: 83 f8 07 cmp $0x7,%eax 15d6: 76 c2 jbe 159a <print_x32+0x1b> } 15d8: 90 nop 15d9: 90 nop 15da: c9 leaveq 15db: c3 retq 00000000000015dc <print_d>: static void print_d(int fd, int v) { 15dc: f3 0f 1e fa endbr64 15e0: 55 push %rbp 15e1: 48 89 e5 mov %rsp,%rbp 15e4: 48 83 ec 30 sub $0x30,%rsp 15e8: 89 7d dc mov %edi,-0x24(%rbp) 15eb: 89 75 d8 mov %esi,-0x28(%rbp) char buf[16]; int64 x = v; 15ee: 8b 45 d8 mov -0x28(%rbp),%eax 15f1: 48 98 cltq 15f3: 48 89 45 f8 mov %rax,-0x8(%rbp) if (v < 0) 15f7: 83 7d d8 00 cmpl $0x0,-0x28(%rbp) 15fb: 79 04 jns 1601 <print_d+0x25> x = -x; 15fd: 48 f7 5d f8 negq -0x8(%rbp) int i = 0; 1601: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%rbp) do { buf[i++] = digits[x % 10]; 1608: 48 8b 4d f8 mov -0x8(%rbp),%rcx 160c: 48 ba 67 66 66 66 66 movabs $0x6666666666666667,%rdx 1613: 66 66 66 1616: 48 89 c8 mov %rcx,%rax 1619: 48 f7 ea imul %rdx 161c: 48 c1 fa 02 sar $0x2,%rdx 1620: 48 89 c8 mov %rcx,%rax 1623: 48 c1 f8 3f sar $0x3f,%rax 1627: 48 29 c2 sub %rax,%rdx 162a: 48 89 d0 mov %rdx,%rax 162d: 48 c1 e0 02 shl $0x2,%rax 1631: 48 01 d0 add %rdx,%rax 1634: 48 01 c0 add %rax,%rax 1637: 48 29 c1 sub %rax,%rcx 163a: 48 89 ca mov %rcx,%rdx 163d: 8b 45 f4 mov -0xc(%rbp),%eax 1640: 8d 48 01 lea 0x1(%rax),%ecx 1643: 89 4d f4 mov %ecx,-0xc(%rbp) 1646: 48 b9 30 21 00 00 00 movabs $0x2130,%rcx 164d: 00 00 00 1650: 0f b6 14 11 movzbl (%rcx,%rdx,1),%edx 1654: 48 98 cltq 1656: 88 54 05 e0 mov %dl,-0x20(%rbp,%rax,1) x /= 10; 165a: 48 8b 4d f8 mov -0x8(%rbp),%rcx 165e: 48 ba 67 66 66 66 66 movabs $0x6666666666666667,%rdx 1665: 66 66 66 1668: 48 89 c8 mov %rcx,%rax 166b: 48 f7 ea imul %rdx 166e: 48 c1 fa 02 sar $0x2,%rdx 1672: 48 89 c8 mov %rcx,%rax 1675: 48 c1 f8 3f sar $0x3f,%rax 1679: 48 29 c2 sub %rax,%rdx 167c: 48 89 d0 mov %rdx,%rax 167f: 48 89 45 f8 mov %rax,-0x8(%rbp) } while(x != 0); 1683: 48 83 7d f8 00 cmpq $0x0,-0x8(%rbp) 1688: 0f 85 7a ff ff ff jne 1608 <print_d+0x2c> if (v < 0) 168e: 83 7d d8 00 cmpl $0x0,-0x28(%rbp) 1692: 79 32 jns 16c6 <print_d+0xea> buf[i++] = '-'; 1694: 8b 45 f4 mov -0xc(%rbp),%eax 1697: 8d 50 01 lea 0x1(%rax),%edx 169a: 89 55 f4 mov %edx,-0xc(%rbp) 169d: 48 98 cltq 169f: c6 44 05 e0 2d movb $0x2d,-0x20(%rbp,%rax,1) while (--i >= 0) 16a4: eb 20 jmp 16c6 <print_d+0xea> putc(fd, buf[i]); 16a6: 8b 45 f4 mov -0xc(%rbp),%eax 16a9: 48 98 cltq 16ab: 0f b6 44 05 e0 movzbl -0x20(%rbp,%rax,1),%eax 16b0: 0f be d0 movsbl %al,%edx 16b3: 8b 45 dc mov -0x24(%rbp),%eax 16b6: 89 d6 mov %edx,%esi 16b8: 89 c7 mov %eax,%edi 16ba: 48 b8 ee 14 00 00 00 movabs $0x14ee,%rax 16c1: 00 00 00 16c4: ff d0 callq *%rax while (--i >= 0) 16c6: 83 6d f4 01 subl $0x1,-0xc(%rbp) 16ca: 83 7d f4 00 cmpl $0x0,-0xc(%rbp) 16ce: 79 d6 jns 16a6 <print_d+0xca> } 16d0: 90 nop 16d1: 90 nop 16d2: c9 leaveq 16d3: c3 retq 00000000000016d4 <printf>: // Print to the given fd. Only understands %d, %x, %p, %s. void printf(int fd, char *fmt, ...) { 16d4: f3 0f 1e fa endbr64 16d8: 55 push %rbp 16d9: 48 89 e5 mov %rsp,%rbp 16dc: 48 81 ec f0 00 00 00 sub $0xf0,%rsp 16e3: 89 bd 1c ff ff ff mov %edi,-0xe4(%rbp) 16e9: 48 89 b5 10 ff ff ff mov %rsi,-0xf0(%rbp) 16f0: 48 89 95 60 ff ff ff mov %rdx,-0xa0(%rbp) 16f7: 48 89 8d 68 ff ff ff mov %rcx,-0x98(%rbp) 16fe: 4c 89 85 70 ff ff ff mov %r8,-0x90(%rbp) 1705: 4c 89 8d 78 ff ff ff mov %r9,-0x88(%rbp) 170c: 84 c0 test %al,%al 170e: 74 20 je 1730 <printf+0x5c> 1710: 0f 29 45 80 movaps %xmm0,-0x80(%rbp) 1714: 0f 29 4d 90 movaps %xmm1,-0x70(%rbp) 1718: 0f 29 55 a0 movaps %xmm2,-0x60(%rbp) 171c: 0f 29 5d b0 movaps %xmm3,-0x50(%rbp) 1720: 0f 29 65 c0 movaps %xmm4,-0x40(%rbp) 1724: 0f 29 6d d0 movaps %xmm5,-0x30(%rbp) 1728: 0f 29 75 e0 movaps %xmm6,-0x20(%rbp) 172c: 0f 29 7d f0 movaps %xmm7,-0x10(%rbp) va_list ap; int i, c; char *s; va_start(ap, fmt); 1730: c7 85 20 ff ff ff 10 movl $0x10,-0xe0(%rbp) 1737: 00 00 00 173a: c7 85 24 ff ff ff 30 movl $0x30,-0xdc(%rbp) 1741: 00 00 00 1744: 48 8d 45 10 lea 0x10(%rbp),%rax 1748: 48 89 85 28 ff ff ff mov %rax,-0xd8(%rbp) 174f: 48 8d 85 50 ff ff ff lea -0xb0(%rbp),%rax 1756: 48 89 85 30 ff ff ff mov %rax,-0xd0(%rbp) for (i = 0; (c = fmt[i] & 0xff) != 0; i++) { 175d: c7 85 4c ff ff ff 00 movl $0x0,-0xb4(%rbp) 1764: 00 00 00 1767: e9 41 03 00 00 jmpq 1aad <printf+0x3d9> if (c != '%') { 176c: 83 bd 3c ff ff ff 25 cmpl $0x25,-0xc4(%rbp) 1773: 74 24 je 1799 <printf+0xc5> putc(fd, c); 1775: 8b 85 3c ff ff ff mov -0xc4(%rbp),%eax 177b: 0f be d0 movsbl %al,%edx 177e: 8b 85 1c ff ff ff mov -0xe4(%rbp),%eax 1784: 89 d6 mov %edx,%esi 1786: 89 c7 mov %eax,%edi 1788: 48 b8 ee 14 00 00 00 movabs $0x14ee,%rax 178f: 00 00 00 1792: ff d0 callq *%rax continue; 1794: e9 0d 03 00 00 jmpq 1aa6 <printf+0x3d2> } c = fmt[++i] & 0xff; 1799: 83 85 4c ff ff ff 01 addl $0x1,-0xb4(%rbp) 17a0: 8b 85 4c ff ff ff mov -0xb4(%rbp),%eax 17a6: 48 63 d0 movslq %eax,%rdx 17a9: 48 8b 85 10 ff ff ff mov -0xf0(%rbp),%rax 17b0: 48 01 d0 add %rdx,%rax 17b3: 0f b6 00 movzbl (%rax),%eax 17b6: 0f be c0 movsbl %al,%eax 17b9: 25 ff 00 00 00 and $0xff,%eax 17be: 89 85 3c ff ff ff mov %eax,-0xc4(%rbp) if (c == 0) 17c4: 83 bd 3c ff ff ff 00 cmpl $0x0,-0xc4(%rbp) 17cb: 0f 84 0f 03 00 00 je 1ae0 <printf+0x40c> break; switch(c) { 17d1: 83 bd 3c ff ff ff 25 cmpl $0x25,-0xc4(%rbp) 17d8: 0f 84 74 02 00 00 je 1a52 <printf+0x37e> 17de: 83 bd 3c ff ff ff 25 cmpl $0x25,-0xc4(%rbp) 17e5: 0f 8c 82 02 00 00 jl 1a6d <printf+0x399> 17eb: 83 bd 3c ff ff ff 78 cmpl $0x78,-0xc4(%rbp) 17f2: 0f 8f 75 02 00 00 jg 1a6d <printf+0x399> 17f8: 83 bd 3c ff ff ff 63 cmpl $0x63,-0xc4(%rbp) 17ff: 0f 8c 68 02 00 00 jl 1a6d <printf+0x399> 1805: 8b 85 3c ff ff ff mov -0xc4(%rbp),%eax 180b: 83 e8 63 sub $0x63,%eax 180e: 83 f8 15 cmp $0x15,%eax 1811: 0f 87 56 02 00 00 ja 1a6d <printf+0x399> 1817: 89 c0 mov %eax,%eax 1819: 48 8d 14 c5 00 00 00 lea 0x0(,%rax,8),%rdx 1820: 00 1821: 48 b8 08 1e 00 00 00 movabs $0x1e08,%rax 1828: 00 00 00 182b: 48 01 d0 add %rdx,%rax 182e: 48 8b 00 mov (%rax),%rax 1831: 3e ff e0 notrack jmpq *%rax case 'c': putc(fd, va_arg(ap, int)); 1834: 8b 85 20 ff ff ff mov -0xe0(%rbp),%eax 183a: 83 f8 2f cmp $0x2f,%eax 183d: 77 23 ja 1862 <printf+0x18e> 183f: 48 8b 85 30 ff ff ff mov -0xd0(%rbp),%rax 1846: 8b 95 20 ff ff ff mov -0xe0(%rbp),%edx 184c: 89 d2 mov %edx,%edx 184e: 48 01 d0 add %rdx,%rax 1851: 8b 95 20 ff ff ff mov -0xe0(%rbp),%edx 1857: 83 c2 08 add $0x8,%edx 185a: 89 95 20 ff ff ff mov %edx,-0xe0(%rbp) 1860: eb 12 jmp 1874 <printf+0x1a0> 1862: 48 8b 85 28 ff ff ff mov -0xd8(%rbp),%rax 1869: 48 8d 50 08 lea 0x8(%rax),%rdx 186d: 48 89 95 28 ff ff ff mov %rdx,-0xd8(%rbp) 1874: 8b 00 mov (%rax),%eax 1876: 0f be d0 movsbl %al,%edx 1879: 8b 85 1c ff ff ff mov -0xe4(%rbp),%eax 187f: 89 d6 mov %edx,%esi 1881: 89 c7 mov %eax,%edi 1883: 48 b8 ee 14 00 00 00 movabs $0x14ee,%rax 188a: 00 00 00 188d: ff d0 callq *%rax break; 188f: e9 12 02 00 00 jmpq 1aa6 <printf+0x3d2> case 'd': print_d(fd, va_arg(ap, int)); 1894: 8b 85 20 ff ff ff mov -0xe0(%rbp),%eax 189a: 83 f8 2f cmp $0x2f,%eax 189d: 77 23 ja 18c2 <printf+0x1ee> 189f: 48 8b 85 30 ff ff ff mov -0xd0(%rbp),%rax 18a6: 8b 95 20 ff ff ff mov -0xe0(%rbp),%edx 18ac: 89 d2 mov %edx,%edx 18ae: 48 01 d0 add %rdx,%rax 18b1: 8b 95 20 ff ff ff mov -0xe0(%rbp),%edx 18b7: 83 c2 08 add $0x8,%edx 18ba: 89 95 20 ff ff ff mov %edx,-0xe0(%rbp) 18c0: eb 12 jmp 18d4 <printf+0x200> 18c2: 48 8b 85 28 ff ff ff mov -0xd8(%rbp),%rax 18c9: 48 8d 50 08 lea 0x8(%rax),%rdx 18cd: 48 89 95 28 ff ff ff mov %rdx,-0xd8(%rbp) 18d4: 8b 10 mov (%rax),%edx 18d6: 8b 85 1c ff ff ff mov -0xe4(%rbp),%eax 18dc: 89 d6 mov %edx,%esi 18de: 89 c7 mov %eax,%edi 18e0: 48 b8 dc 15 00 00 00 movabs $0x15dc,%rax 18e7: 00 00 00 18ea: ff d0 callq *%rax break; 18ec: e9 b5 01 00 00 jmpq 1aa6 <printf+0x3d2> case 'x': print_x32(fd, va_arg(ap, uint)); 18f1: 8b 85 20 ff ff ff mov -0xe0(%rbp),%eax 18f7: 83 f8 2f cmp $0x2f,%eax 18fa: 77 23 ja 191f <printf+0x24b> 18fc: 48 8b 85 30 ff ff ff mov -0xd0(%rbp),%rax 1903: 8b 95 20 ff ff ff mov -0xe0(%rbp),%edx 1909: 89 d2 mov %edx,%edx 190b: 48 01 d0 add %rdx,%rax 190e: 8b 95 20 ff ff ff mov -0xe0(%rbp),%edx 1914: 83 c2 08 add $0x8,%edx 1917: 89 95 20 ff ff ff mov %edx,-0xe0(%rbp) 191d: eb 12 jmp 1931 <printf+0x25d> 191f: 48 8b 85 28 ff ff ff mov -0xd8(%rbp),%rax 1926: 48 8d 50 08 lea 0x8(%rax),%rdx 192a: 48 89 95 28 ff ff ff mov %rdx,-0xd8(%rbp) 1931: 8b 10 mov (%rax),%edx 1933: 8b 85 1c ff ff ff mov -0xe4(%rbp),%eax 1939: 89 d6 mov %edx,%esi 193b: 89 c7 mov %eax,%edi 193d: 48 b8 7f 15 00 00 00 movabs $0x157f,%rax 1944: 00 00 00 1947: ff d0 callq *%rax break; 1949: e9 58 01 00 00 jmpq 1aa6 <printf+0x3d2> case 'p': print_x64(fd, va_arg(ap, addr_t)); 194e: 8b 85 20 ff ff ff mov -0xe0(%rbp),%eax 1954: 83 f8 2f cmp $0x2f,%eax 1957: 77 23 ja 197c <printf+0x2a8> 1959: 48 8b 85 30 ff ff ff mov -0xd0(%rbp),%rax 1960: 8b 95 20 ff ff ff mov -0xe0(%rbp),%edx 1966: 89 d2 mov %edx,%edx 1968: 48 01 d0 add %rdx,%rax 196b: 8b 95 20 ff ff ff mov -0xe0(%rbp),%edx 1971: 83 c2 08 add $0x8,%edx 1974: 89 95 20 ff ff ff mov %edx,-0xe0(%rbp) 197a: eb 12 jmp 198e <printf+0x2ba> 197c: 48 8b 85 28 ff ff ff mov -0xd8(%rbp),%rax 1983: 48 8d 50 08 lea 0x8(%rax),%rdx 1987: 48 89 95 28 ff ff ff mov %rdx,-0xd8(%rbp) 198e: 48 8b 10 mov (%rax),%rdx 1991: 8b 85 1c ff ff ff mov -0xe4(%rbp),%eax 1997: 48 89 d6 mov %rdx,%rsi 199a: 89 c7 mov %eax,%edi 199c: 48 b8 22 15 00 00 00 movabs $0x1522,%rax 19a3: 00 00 00 19a6: ff d0 callq *%rax break; 19a8: e9 f9 00 00 00 jmpq 1aa6 <printf+0x3d2> case 's': if ((s = va_arg(ap, char*)) == 0) 19ad: 8b 85 20 ff ff ff mov -0xe0(%rbp),%eax 19b3: 83 f8 2f cmp $0x2f,%eax 19b6: 77 23 ja 19db <printf+0x307> 19b8: 48 8b 85 30 ff ff ff mov -0xd0(%rbp),%rax 19bf: 8b 95 20 ff ff ff mov -0xe0(%rbp),%edx 19c5: 89 d2 mov %edx,%edx 19c7: 48 01 d0 add %rdx,%rax 19ca: 8b 95 20 ff ff ff mov -0xe0(%rbp),%edx 19d0: 83 c2 08 add $0x8,%edx 19d3: 89 95 20 ff ff ff mov %edx,-0xe0(%rbp) 19d9: eb 12 jmp 19ed <printf+0x319> 19db: 48 8b 85 28 ff ff ff mov -0xd8(%rbp),%rax 19e2: 48 8d 50 08 lea 0x8(%rax),%rdx 19e6: 48 89 95 28 ff ff ff mov %rdx,-0xd8(%rbp) 19ed: 48 8b 00 mov (%rax),%rax 19f0: 48 89 85 40 ff ff ff mov %rax,-0xc0(%rbp) 19f7: 48 83 bd 40 ff ff ff cmpq $0x0,-0xc0(%rbp) 19fe: 00 19ff: 75 41 jne 1a42 <printf+0x36e> s = "(null)"; 1a01: 48 b8 00 1e 00 00 00 movabs $0x1e00,%rax 1a08: 00 00 00 1a0b: 48 89 85 40 ff ff ff mov %rax,-0xc0(%rbp) while (*s) 1a12: eb 2e jmp 1a42 <printf+0x36e> putc(fd, *(s++)); 1a14: 48 8b 85 40 ff ff ff mov -0xc0(%rbp),%rax 1a1b: 48 8d 50 01 lea 0x1(%rax),%rdx 1a1f: 48 89 95 40 ff ff ff mov %rdx,-0xc0(%rbp) 1a26: 0f b6 00 movzbl (%rax),%eax 1a29: 0f be d0 movsbl %al,%edx 1a2c: 8b 85 1c ff ff ff mov -0xe4(%rbp),%eax 1a32: 89 d6 mov %edx,%esi 1a34: 89 c7 mov %eax,%edi 1a36: 48 b8 ee 14 00 00 00 movabs $0x14ee,%rax 1a3d: 00 00 00 1a40: ff d0 callq *%rax while (*s) 1a42: 48 8b 85 40 ff ff ff mov -0xc0(%rbp),%rax 1a49: 0f b6 00 movzbl (%rax),%eax 1a4c: 84 c0 test %al,%al 1a4e: 75 c4 jne 1a14 <printf+0x340> break; 1a50: eb 54 jmp 1aa6 <printf+0x3d2> case '%': putc(fd, '%'); 1a52: 8b 85 1c ff ff ff mov -0xe4(%rbp),%eax 1a58: be 25 00 00 00 mov $0x25,%esi 1a5d: 89 c7 mov %eax,%edi 1a5f: 48 b8 ee 14 00 00 00 movabs $0x14ee,%rax 1a66: 00 00 00 1a69: ff d0 callq *%rax break; 1a6b: eb 39 jmp 1aa6 <printf+0x3d2> default: // Print unknown % sequence to draw attention. putc(fd, '%'); 1a6d: 8b 85 1c ff ff ff mov -0xe4(%rbp),%eax 1a73: be 25 00 00 00 mov $0x25,%esi 1a78: 89 c7 mov %eax,%edi 1a7a: 48 b8 ee 14 00 00 00 movabs $0x14ee,%rax 1a81: 00 00 00 1a84: ff d0 callq *%rax putc(fd, c); 1a86: 8b 85 3c ff ff ff mov -0xc4(%rbp),%eax 1a8c: 0f be d0 movsbl %al,%edx 1a8f: 8b 85 1c ff ff ff mov -0xe4(%rbp),%eax 1a95: 89 d6 mov %edx,%esi 1a97: 89 c7 mov %eax,%edi 1a99: 48 b8 ee 14 00 00 00 movabs $0x14ee,%rax 1aa0: 00 00 00 1aa3: ff d0 callq *%rax break; 1aa5: 90 nop for (i = 0; (c = fmt[i] & 0xff) != 0; i++) { 1aa6: 83 85 4c ff ff ff 01 addl $0x1,-0xb4(%rbp) 1aad: 8b 85 4c ff ff ff mov -0xb4(%rbp),%eax 1ab3: 48 63 d0 movslq %eax,%rdx 1ab6: 48 8b 85 10 ff ff ff mov -0xf0(%rbp),%rax 1abd: 48 01 d0 add %rdx,%rax 1ac0: 0f b6 00 movzbl (%rax),%eax 1ac3: 0f be c0 movsbl %al,%eax 1ac6: 25 ff 00 00 00 and $0xff,%eax 1acb: 89 85 3c ff ff ff mov %eax,-0xc4(%rbp) 1ad1: 83 bd 3c ff ff ff 00 cmpl $0x0,-0xc4(%rbp) 1ad8: 0f 85 8e fc ff ff jne 176c <printf+0x98> } } } 1ade: eb 01 jmp 1ae1 <printf+0x40d> break; 1ae0: 90 nop } 1ae1: 90 nop 1ae2: c9 leaveq 1ae3: c3 retq 0000000000001ae4 <free>: static Header base; static Header *freep; void free(void *ap) { 1ae4: f3 0f 1e fa endbr64 1ae8: 55 push %rbp 1ae9: 48 89 e5 mov %rsp,%rbp 1aec: 48 83 ec 18 sub $0x18,%rsp 1af0: 48 89 7d e8 mov %rdi,-0x18(%rbp) Header *bp, *p; bp = (Header*)ap - 1; 1af4: 48 8b 45 e8 mov -0x18(%rbp),%rax 1af8: 48 83 e8 10 sub $0x10,%rax 1afc: 48 89 45 f0 mov %rax,-0x10(%rbp) for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 1b00: 48 b8 60 21 00 00 00 movabs $0x2160,%rax 1b07: 00 00 00 1b0a: 48 8b 00 mov (%rax),%rax 1b0d: 48 89 45 f8 mov %rax,-0x8(%rbp) 1b11: eb 2f jmp 1b42 <free+0x5e> if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) 1b13: 48 8b 45 f8 mov -0x8(%rbp),%rax 1b17: 48 8b 00 mov (%rax),%rax 1b1a: 48 39 45 f8 cmp %rax,-0x8(%rbp) 1b1e: 72 17 jb 1b37 <free+0x53> 1b20: 48 8b 45 f0 mov -0x10(%rbp),%rax 1b24: 48 3b 45 f8 cmp -0x8(%rbp),%rax 1b28: 77 2f ja 1b59 <free+0x75> 1b2a: 48 8b 45 f8 mov -0x8(%rbp),%rax 1b2e: 48 8b 00 mov (%rax),%rax 1b31: 48 39 45 f0 cmp %rax,-0x10(%rbp) 1b35: 72 22 jb 1b59 <free+0x75> for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 1b37: 48 8b 45 f8 mov -0x8(%rbp),%rax 1b3b: 48 8b 00 mov (%rax),%rax 1b3e: 48 89 45 f8 mov %rax,-0x8(%rbp) 1b42: 48 8b 45 f0 mov -0x10(%rbp),%rax 1b46: 48 3b 45 f8 cmp -0x8(%rbp),%rax 1b4a: 76 c7 jbe 1b13 <free+0x2f> 1b4c: 48 8b 45 f8 mov -0x8(%rbp),%rax 1b50: 48 8b 00 mov (%rax),%rax 1b53: 48 39 45 f0 cmp %rax,-0x10(%rbp) 1b57: 73 ba jae 1b13 <free+0x2f> break; if(bp + bp->s.size == p->s.ptr){ 1b59: 48 8b 45 f0 mov -0x10(%rbp),%rax 1b5d: 8b 40 08 mov 0x8(%rax),%eax 1b60: 89 c0 mov %eax,%eax 1b62: 48 c1 e0 04 shl $0x4,%rax 1b66: 48 89 c2 mov %rax,%rdx 1b69: 48 8b 45 f0 mov -0x10(%rbp),%rax 1b6d: 48 01 c2 add %rax,%rdx 1b70: 48 8b 45 f8 mov -0x8(%rbp),%rax 1b74: 48 8b 00 mov (%rax),%rax 1b77: 48 39 c2 cmp %rax,%rdx 1b7a: 75 2d jne 1ba9 <free+0xc5> bp->s.size += p->s.ptr->s.size; 1b7c: 48 8b 45 f0 mov -0x10(%rbp),%rax 1b80: 8b 50 08 mov 0x8(%rax),%edx 1b83: 48 8b 45 f8 mov -0x8(%rbp),%rax 1b87: 48 8b 00 mov (%rax),%rax 1b8a: 8b 40 08 mov 0x8(%rax),%eax 1b8d: 01 c2 add %eax,%edx 1b8f: 48 8b 45 f0 mov -0x10(%rbp),%rax 1b93: 89 50 08 mov %edx,0x8(%rax) bp->s.ptr = p->s.ptr->s.ptr; 1b96: 48 8b 45 f8 mov -0x8(%rbp),%rax 1b9a: 48 8b 00 mov (%rax),%rax 1b9d: 48 8b 10 mov (%rax),%rdx 1ba0: 48 8b 45 f0 mov -0x10(%rbp),%rax 1ba4: 48 89 10 mov %rdx,(%rax) 1ba7: eb 0e jmp 1bb7 <free+0xd3> } else bp->s.ptr = p->s.ptr; 1ba9: 48 8b 45 f8 mov -0x8(%rbp),%rax 1bad: 48 8b 10 mov (%rax),%rdx 1bb0: 48 8b 45 f0 mov -0x10(%rbp),%rax 1bb4: 48 89 10 mov %rdx,(%rax) if(p + p->s.size == bp){ 1bb7: 48 8b 45 f8 mov -0x8(%rbp),%rax 1bbb: 8b 40 08 mov 0x8(%rax),%eax 1bbe: 89 c0 mov %eax,%eax 1bc0: 48 c1 e0 04 shl $0x4,%rax 1bc4: 48 89 c2 mov %rax,%rdx 1bc7: 48 8b 45 f8 mov -0x8(%rbp),%rax 1bcb: 48 01 d0 add %rdx,%rax 1bce: 48 39 45 f0 cmp %rax,-0x10(%rbp) 1bd2: 75 27 jne 1bfb <free+0x117> p->s.size += bp->s.size; 1bd4: 48 8b 45 f8 mov -0x8(%rbp),%rax 1bd8: 8b 50 08 mov 0x8(%rax),%edx 1bdb: 48 8b 45 f0 mov -0x10(%rbp),%rax 1bdf: 8b 40 08 mov 0x8(%rax),%eax 1be2: 01 c2 add %eax,%edx 1be4: 48 8b 45 f8 mov -0x8(%rbp),%rax 1be8: 89 50 08 mov %edx,0x8(%rax) p->s.ptr = bp->s.ptr; 1beb: 48 8b 45 f0 mov -0x10(%rbp),%rax 1bef: 48 8b 10 mov (%rax),%rdx 1bf2: 48 8b 45 f8 mov -0x8(%rbp),%rax 1bf6: 48 89 10 mov %rdx,(%rax) 1bf9: eb 0b jmp 1c06 <free+0x122> } else p->s.ptr = bp; 1bfb: 48 8b 45 f8 mov -0x8(%rbp),%rax 1bff: 48 8b 55 f0 mov -0x10(%rbp),%rdx 1c03: 48 89 10 mov %rdx,(%rax) freep = p; 1c06: 48 ba 60 21 00 00 00 movabs $0x2160,%rdx 1c0d: 00 00 00 1c10: 48 8b 45 f8 mov -0x8(%rbp),%rax 1c14: 48 89 02 mov %rax,(%rdx) } 1c17: 90 nop 1c18: c9 leaveq 1c19: c3 retq 0000000000001c1a <morecore>: static Header* morecore(uint nu) { 1c1a: f3 0f 1e fa endbr64 1c1e: 55 push %rbp 1c1f: 48 89 e5 mov %rsp,%rbp 1c22: 48 83 ec 20 sub $0x20,%rsp 1c26: 89 7d ec mov %edi,-0x14(%rbp) char *p; Header *hp; if(nu < 4096) 1c29: 81 7d ec ff 0f 00 00 cmpl $0xfff,-0x14(%rbp) 1c30: 77 07 ja 1c39 <morecore+0x1f> nu = 4096; 1c32: c7 45 ec 00 10 00 00 movl $0x1000,-0x14(%rbp) p = sbrk(nu * sizeof(Header)); 1c39: 8b 45 ec mov -0x14(%rbp),%eax 1c3c: 48 c1 e0 04 shl $0x4,%rax 1c40: 48 89 c7 mov %rax,%rdi 1c43: 48 b8 ba 14 00 00 00 movabs $0x14ba,%rax 1c4a: 00 00 00 1c4d: ff d0 callq *%rax 1c4f: 48 89 45 f8 mov %rax,-0x8(%rbp) if(p == (char*)-1) 1c53: 48 83 7d f8 ff cmpq $0xffffffffffffffff,-0x8(%rbp) 1c58: 75 07 jne 1c61 <morecore+0x47> return 0; 1c5a: b8 00 00 00 00 mov $0x0,%eax 1c5f: eb 36 jmp 1c97 <morecore+0x7d> hp = (Header*)p; 1c61: 48 8b 45 f8 mov -0x8(%rbp),%rax 1c65: 48 89 45 f0 mov %rax,-0x10(%rbp) hp->s.size = nu; 1c69: 48 8b 45 f0 mov -0x10(%rbp),%rax 1c6d: 8b 55 ec mov -0x14(%rbp),%edx 1c70: 89 50 08 mov %edx,0x8(%rax) free((void*)(hp + 1)); 1c73: 48 8b 45 f0 mov -0x10(%rbp),%rax 1c77: 48 83 c0 10 add $0x10,%rax 1c7b: 48 89 c7 mov %rax,%rdi 1c7e: 48 b8 e4 1a 00 00 00 movabs $0x1ae4,%rax 1c85: 00 00 00 1c88: ff d0 callq *%rax return freep; 1c8a: 48 b8 60 21 00 00 00 movabs $0x2160,%rax 1c91: 00 00 00 1c94: 48 8b 00 mov (%rax),%rax } 1c97: c9 leaveq 1c98: c3 retq 0000000000001c99 <malloc>: void* malloc(uint nbytes) { 1c99: f3 0f 1e fa endbr64 1c9d: 55 push %rbp 1c9e: 48 89 e5 mov %rsp,%rbp 1ca1: 48 83 ec 30 sub $0x30,%rsp 1ca5: 89 7d dc mov %edi,-0x24(%rbp) Header *p, *prevp; uint nunits; nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; 1ca8: 8b 45 dc mov -0x24(%rbp),%eax 1cab: 48 83 c0 0f add $0xf,%rax 1caf: 48 c1 e8 04 shr $0x4,%rax 1cb3: 83 c0 01 add $0x1,%eax 1cb6: 89 45 ec mov %eax,-0x14(%rbp) if((prevp = freep) == 0){ 1cb9: 48 b8 60 21 00 00 00 movabs $0x2160,%rax 1cc0: 00 00 00 1cc3: 48 8b 00 mov (%rax),%rax 1cc6: 48 89 45 f0 mov %rax,-0x10(%rbp) 1cca: 48 83 7d f0 00 cmpq $0x0,-0x10(%rbp) 1ccf: 75 4a jne 1d1b <malloc+0x82> base.s.ptr = freep = prevp = &base; 1cd1: 48 b8 50 21 00 00 00 movabs $0x2150,%rax 1cd8: 00 00 00 1cdb: 48 89 45 f0 mov %rax,-0x10(%rbp) 1cdf: 48 ba 60 21 00 00 00 movabs $0x2160,%rdx 1ce6: 00 00 00 1ce9: 48 8b 45 f0 mov -0x10(%rbp),%rax 1ced: 48 89 02 mov %rax,(%rdx) 1cf0: 48 b8 60 21 00 00 00 movabs $0x2160,%rax 1cf7: 00 00 00 1cfa: 48 8b 00 mov (%rax),%rax 1cfd: 48 ba 50 21 00 00 00 movabs $0x2150,%rdx 1d04: 00 00 00 1d07: 48 89 02 mov %rax,(%rdx) base.s.size = 0; 1d0a: 48 b8 50 21 00 00 00 movabs $0x2150,%rax 1d11: 00 00 00 1d14: c7 40 08 00 00 00 00 movl $0x0,0x8(%rax) } for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ 1d1b: 48 8b 45 f0 mov -0x10(%rbp),%rax 1d1f: 48 8b 00 mov (%rax),%rax 1d22: 48 89 45 f8 mov %rax,-0x8(%rbp) if(p->s.size >= nunits){ 1d26: 48 8b 45 f8 mov -0x8(%rbp),%rax 1d2a: 8b 40 08 mov 0x8(%rax),%eax 1d2d: 39 45 ec cmp %eax,-0x14(%rbp) 1d30: 77 65 ja 1d97 <malloc+0xfe> if(p->s.size == nunits) 1d32: 48 8b 45 f8 mov -0x8(%rbp),%rax 1d36: 8b 40 08 mov 0x8(%rax),%eax 1d39: 39 45 ec cmp %eax,-0x14(%rbp) 1d3c: 75 10 jne 1d4e <malloc+0xb5> prevp->s.ptr = p->s.ptr; 1d3e: 48 8b 45 f8 mov -0x8(%rbp),%rax 1d42: 48 8b 10 mov (%rax),%rdx 1d45: 48 8b 45 f0 mov -0x10(%rbp),%rax 1d49: 48 89 10 mov %rdx,(%rax) 1d4c: eb 2e jmp 1d7c <malloc+0xe3> else { p->s.size -= nunits; 1d4e: 48 8b 45 f8 mov -0x8(%rbp),%rax 1d52: 8b 40 08 mov 0x8(%rax),%eax 1d55: 2b 45 ec sub -0x14(%rbp),%eax 1d58: 89 c2 mov %eax,%edx 1d5a: 48 8b 45 f8 mov -0x8(%rbp),%rax 1d5e: 89 50 08 mov %edx,0x8(%rax) p += p->s.size; 1d61: 48 8b 45 f8 mov -0x8(%rbp),%rax 1d65: 8b 40 08 mov 0x8(%rax),%eax 1d68: 89 c0 mov %eax,%eax 1d6a: 48 c1 e0 04 shl $0x4,%rax 1d6e: 48 01 45 f8 add %rax,-0x8(%rbp) p->s.size = nunits; 1d72: 48 8b 45 f8 mov -0x8(%rbp),%rax 1d76: 8b 55 ec mov -0x14(%rbp),%edx 1d79: 89 50 08 mov %edx,0x8(%rax) } freep = prevp; 1d7c: 48 ba 60 21 00 00 00 movabs $0x2160,%rdx 1d83: 00 00 00 1d86: 48 8b 45 f0 mov -0x10(%rbp),%rax 1d8a: 48 89 02 mov %rax,(%rdx) return (void*)(p + 1); 1d8d: 48 8b 45 f8 mov -0x8(%rbp),%rax 1d91: 48 83 c0 10 add $0x10,%rax 1d95: eb 4e jmp 1de5 <malloc+0x14c> } if(p == freep) 1d97: 48 b8 60 21 00 00 00 movabs $0x2160,%rax 1d9e: 00 00 00 1da1: 48 8b 00 mov (%rax),%rax 1da4: 48 39 45 f8 cmp %rax,-0x8(%rbp) 1da8: 75 23 jne 1dcd <malloc+0x134> if((p = morecore(nunits)) == 0) 1daa: 8b 45 ec mov -0x14(%rbp),%eax 1dad: 89 c7 mov %eax,%edi 1daf: 48 b8 1a 1c 00 00 00 movabs $0x1c1a,%rax 1db6: 00 00 00 1db9: ff d0 callq *%rax 1dbb: 48 89 45 f8 mov %rax,-0x8(%rbp) 1dbf: 48 83 7d f8 00 cmpq $0x0,-0x8(%rbp) 1dc4: 75 07 jne 1dcd <malloc+0x134> return 0; 1dc6: b8 00 00 00 00 mov $0x0,%eax 1dcb: eb 18 jmp 1de5 <malloc+0x14c> for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ 1dcd: 48 8b 45 f8 mov -0x8(%rbp),%rax 1dd1: 48 89 45 f0 mov %rax,-0x10(%rbp) 1dd5: 48 8b 45 f8 mov -0x8(%rbp),%rax 1dd9: 48 8b 00 mov (%rax),%rax 1ddc: 48 89 45 f8 mov %rax,-0x8(%rbp) if(p->s.size >= nunits){ 1de0: e9 41 ff ff ff jmpq 1d26 <malloc+0x8d> } } 1de5: c9 leaveq 1de6: c3 retq
39.61057
69
0.4454
161b6f038256181c270a448af71167e493737f13
757
asm
Assembly
oeis/035/A035024.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/035/A035024.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/035/A035024.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A035024: Expansion of 1/(1-81*x)^(1/9), related to 9-factorial numbers A045756. ; Submitted by Christian Krause ; 1,9,405,23085,1454355,96860043,6683342967,472607824095,34027763334840,2484026723443320,183321172190117016,13649094547609621464,1023682091070721609800,77248625487721376862600,5859860019140007302005800,446521333458468556412841960,34158882009572844565582409940,2622196530734856597534414410100,201909132866583958010149909577700,15589510416593614021099469334236100,1206628106244345725233098926469874140,93599865955811389828796102439020236860,7275262308383521663965515235032936592300 mov $1,1 mov $3,$0 mov $0,2 mov $4,1 lpb $3 add $0,1 mul $1,$3 mul $1,$0 add $0,26 add $2,$4 div $1,$2 mul $1,3 sub $3,1 add $4,2 lpe mov $0,$1
36.047619
479
0.815059
17a470f33177d7012c021a1e3aff23224a97b001
2,049
asm
Assembly
programs/oeis/158/A158010.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/158/A158010.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/158/A158010.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A158010: a(n) = 256*n^2 - n. ; 255,1022,2301,4092,6395,9210,12537,16376,20727,25590,30965,36852,43251,50162,57585,65520,73967,82926,92397,102380,112875,123882,135401,147432,159975,173030,186597,200676,215267,230370,245985,262112,278751,295902,313565,331740,350427,369626,389337,409560,430295,451542,473301,495572,518355,541650,565457,589776,614607,639950,665805,692172,719051,746442,774345,802760,831687,861126,891077,921540,952515,984002,1016001,1048512,1081535,1115070,1149117,1183676,1218747,1254330,1290425,1327032,1364151,1401782,1439925,1478580,1517747,1557426,1597617,1638320,1679535,1721262,1763501,1806252,1849515,1893290,1937577,1982376,2027687,2073510,2119845,2166692,2214051,2261922,2310305,2359200,2408607,2458526,2508957,2559900,2611355,2663322,2715801,2768792,2822295,2876310,2930837,2985876,3041427,3097490,3154065,3211152,3268751,3326862,3385485,3444620,3504267,3564426,3625097,3686280,3747975,3810182,3872901,3936132,3999875,4064130,4128897,4194176,4259967,4326270,4393085,4460412,4528251,4596602,4665465,4734840,4804727,4875126,4946037,5017460,5089395,5161842,5234801,5308272,5382255,5456750,5531757,5607276,5683307,5759850,5836905,5914472,5992551,6071142,6150245,6229860,6309987,6390626,6471777,6553440,6635615,6718302,6801501,6885212,6969435,7054170,7139417,7225176,7311447,7398230,7485525,7573332,7661651,7750482,7839825,7929680,8020047,8110926,8202317,8294220,8386635,8479562,8573001,8666952,8761415,8856390,8951877,9047876,9144387,9241410,9338945,9436992,9535551,9634622,9734205,9834300,9934907,10036026,10137657,10239800,10342455,10445622,10549301,10653492,10758195,10863410,10969137,11075376,11182127,11289390,11397165,11505452,11614251,11723562,11833385,11943720,12054567,12165926,12277797,12390180,12503075,12616482,12730401,12844832,12959775,13075230,13191197,13307676,13424667,13542170,13660185,13778712,13897751,14017302,14137365,14257940,14379027,14500626,14622737,14745360,14868495,14992142,15116301,15240972,15366155,15491850,15618057,15744776,15872007,15999750 add $0,1 mul $0,256 bin $0,2 mov $1,$0 div $1,128
227.666667
1,966
0.858468
5bb7163375099b249f4bfb06ed7d78ba204d6a2d
50,549
asm
Assembly
lab3.asm
UyChooTran/CS153Lab3
f722060b73ff9f575a7cafd10b0bee5dc72b9272
[ "MIT-0" ]
null
null
null
lab3.asm
UyChooTran/CS153Lab3
f722060b73ff9f575a7cafd10b0bee5dc72b9272
[ "MIT-0" ]
null
null
null
lab3.asm
UyChooTran/CS153Lab3
f722060b73ff9f575a7cafd10b0bee5dc72b9272
[ "MIT-0" ]
null
null
null
_lab3: file format elf32-i386 Disassembly of section .text: 00001000 <main>: x = test(x); printf(1,"%d\n",x); return x; } int main(int argc, char *argv[]) { 1000: 8d 4c 24 04 lea 0x4(%esp),%ecx 1004: 83 e4 f0 and $0xfffffff0,%esp 1007: ff 71 fc pushl -0x4(%ecx) 100a: 55 push %ebp 100b: 89 e5 mov %esp,%ebp 100d: 51 push %ecx 100e: 83 ec 04 sub $0x4,%esp int pid=0; pid=fork(); 1011: e8 b4 02 00 00 call 12ca <fork> if(pid==0){ 1016: 85 c0 test %eax,%eax 1018: 75 1d jne 1037 <main+0x37> test(1); 101a: 83 ec 0c sub $0xc,%esp 101d: 6a 01 push $0x1 101f: e8 2c 00 00 00 call 1050 <test> printf(1,"running"); 1024: 58 pop %eax 1025: 5a pop %edx 1026: 68 88 17 00 00 push $0x1788 102b: 6a 01 push $0x1 102d: e8 fe 03 00 00 call 1430 <printf> exit(); 1032: e8 9b 02 00 00 call 12d2 <exit> } wait(); 1037: e8 9e 02 00 00 call 12da <wait> exit(); 103c: e8 91 02 00 00 call 12d2 <exit> 1041: 66 90 xchg %ax,%ax 1043: 66 90 xchg %ax,%ax 1045: 66 90 xchg %ax,%ax 1047: 66 90 xchg %ax,%ax 1049: 66 90 xchg %ax,%ax 104b: 66 90 xchg %ax,%ax 104d: 66 90 xchg %ax,%ax 104f: 90 nop 00001050 <test>: #include "types.h" #include "stat.h" #include "user.h" int test(int n) { 1050: 55 push %ebp 1051: 89 e5 mov %esp,%ebp 1053: 53 push %ebx 1054: 83 ec 10 sub $0x10,%esp int x = n + 1; 1057: 8b 45 08 mov 0x8(%ebp),%eax 105a: 83 c0 01 add $0x1,%eax x = test(x); 105d: 50 push %eax 105e: e8 ed ff ff ff call 1050 <test> x = test(x); 1063: 89 04 24 mov %eax,(%esp) 1066: e8 e5 ff ff ff call 1050 <test> printf(1,"%d\n",x); 106b: 83 c4 0c add $0xc,%esp int test(int n) { int x = n + 1; x = test(x); x = test(x); 106e: 89 c3 mov %eax,%ebx printf(1,"%d\n",x); 1070: 50 push %eax 1071: 68 84 17 00 00 push $0x1784 1076: 6a 01 push $0x1 1078: e8 b3 03 00 00 call 1430 <printf> return x; } 107d: 89 d8 mov %ebx,%eax 107f: 8b 5d fc mov -0x4(%ebp),%ebx 1082: c9 leave 1083: c3 ret 1084: 66 90 xchg %ax,%ax 1086: 66 90 xchg %ax,%ax 1088: 66 90 xchg %ax,%ax 108a: 66 90 xchg %ax,%ax 108c: 66 90 xchg %ax,%ax 108e: 66 90 xchg %ax,%ax 00001090 <strcpy>: #include "user.h" #include "x86.h" char* strcpy(char *s, char *t) { 1090: 55 push %ebp 1091: 89 e5 mov %esp,%ebp 1093: 53 push %ebx 1094: 8b 45 08 mov 0x8(%ebp),%eax 1097: 8b 4d 0c mov 0xc(%ebp),%ecx char *os; os = s; while((*s++ = *t++) != 0) 109a: 89 c2 mov %eax,%edx 109c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 10a0: 83 c1 01 add $0x1,%ecx 10a3: 0f b6 59 ff movzbl -0x1(%ecx),%ebx 10a7: 83 c2 01 add $0x1,%edx 10aa: 84 db test %bl,%bl 10ac: 88 5a ff mov %bl,-0x1(%edx) 10af: 75 ef jne 10a0 <strcpy+0x10> ; return os; } 10b1: 5b pop %ebx 10b2: 5d pop %ebp 10b3: c3 ret 10b4: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 10ba: 8d bf 00 00 00 00 lea 0x0(%edi),%edi 000010c0 <strcmp>: int strcmp(const char *p, const char *q) { 10c0: 55 push %ebp 10c1: 89 e5 mov %esp,%ebp 10c3: 56 push %esi 10c4: 53 push %ebx 10c5: 8b 55 08 mov 0x8(%ebp),%edx 10c8: 8b 4d 0c mov 0xc(%ebp),%ecx while(*p && *p == *q) 10cb: 0f b6 02 movzbl (%edx),%eax 10ce: 0f b6 19 movzbl (%ecx),%ebx 10d1: 84 c0 test %al,%al 10d3: 75 1e jne 10f3 <strcmp+0x33> 10d5: eb 29 jmp 1100 <strcmp+0x40> 10d7: 89 f6 mov %esi,%esi 10d9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi p++, q++; 10e0: 83 c2 01 add $0x1,%edx } int strcmp(const char *p, const char *q) { while(*p && *p == *q) 10e3: 0f b6 02 movzbl (%edx),%eax p++, q++; 10e6: 8d 71 01 lea 0x1(%ecx),%esi } int strcmp(const char *p, const char *q) { while(*p && *p == *q) 10e9: 0f b6 59 01 movzbl 0x1(%ecx),%ebx 10ed: 84 c0 test %al,%al 10ef: 74 0f je 1100 <strcmp+0x40> 10f1: 89 f1 mov %esi,%ecx 10f3: 38 d8 cmp %bl,%al 10f5: 74 e9 je 10e0 <strcmp+0x20> p++, q++; return (uchar)*p - (uchar)*q; 10f7: 29 d8 sub %ebx,%eax } 10f9: 5b pop %ebx 10fa: 5e pop %esi 10fb: 5d pop %ebp 10fc: c3 ret 10fd: 8d 76 00 lea 0x0(%esi),%esi } int strcmp(const char *p, const char *q) { while(*p && *p == *q) 1100: 31 c0 xor %eax,%eax p++, q++; return (uchar)*p - (uchar)*q; 1102: 29 d8 sub %ebx,%eax } 1104: 5b pop %ebx 1105: 5e pop %esi 1106: 5d pop %ebp 1107: c3 ret 1108: 90 nop 1109: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 00001110 <strlen>: uint strlen(char *s) { 1110: 55 push %ebp 1111: 89 e5 mov %esp,%ebp 1113: 8b 4d 08 mov 0x8(%ebp),%ecx int n; for(n = 0; s[n]; n++) 1116: 80 39 00 cmpb $0x0,(%ecx) 1119: 74 12 je 112d <strlen+0x1d> 111b: 31 d2 xor %edx,%edx 111d: 8d 76 00 lea 0x0(%esi),%esi 1120: 83 c2 01 add $0x1,%edx 1123: 80 3c 11 00 cmpb $0x0,(%ecx,%edx,1) 1127: 89 d0 mov %edx,%eax 1129: 75 f5 jne 1120 <strlen+0x10> ; return n; } 112b: 5d pop %ebp 112c: c3 ret uint strlen(char *s) { int n; for(n = 0; s[n]; n++) 112d: 31 c0 xor %eax,%eax ; return n; } 112f: 5d pop %ebp 1130: c3 ret 1131: eb 0d jmp 1140 <memset> 1133: 90 nop 1134: 90 nop 1135: 90 nop 1136: 90 nop 1137: 90 nop 1138: 90 nop 1139: 90 nop 113a: 90 nop 113b: 90 nop 113c: 90 nop 113d: 90 nop 113e: 90 nop 113f: 90 nop 00001140 <memset>: void* memset(void *dst, int c, uint n) { 1140: 55 push %ebp 1141: 89 e5 mov %esp,%ebp 1143: 57 push %edi 1144: 8b 55 08 mov 0x8(%ebp),%edx } static inline void stosb(void *addr, int data, int cnt) { asm volatile("cld; rep stosb" : 1147: 8b 4d 10 mov 0x10(%ebp),%ecx 114a: 8b 45 0c mov 0xc(%ebp),%eax 114d: 89 d7 mov %edx,%edi 114f: fc cld 1150: f3 aa rep stos %al,%es:(%edi) stosb(dst, c, n); return dst; } 1152: 89 d0 mov %edx,%eax 1154: 5f pop %edi 1155: 5d pop %ebp 1156: c3 ret 1157: 89 f6 mov %esi,%esi 1159: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 00001160 <strchr>: char* strchr(const char *s, char c) { 1160: 55 push %ebp 1161: 89 e5 mov %esp,%ebp 1163: 53 push %ebx 1164: 8b 45 08 mov 0x8(%ebp),%eax 1167: 8b 5d 0c mov 0xc(%ebp),%ebx for(; *s; s++) 116a: 0f b6 10 movzbl (%eax),%edx 116d: 84 d2 test %dl,%dl 116f: 74 1d je 118e <strchr+0x2e> if(*s == c) 1171: 38 d3 cmp %dl,%bl 1173: 89 d9 mov %ebx,%ecx 1175: 75 0d jne 1184 <strchr+0x24> 1177: eb 17 jmp 1190 <strchr+0x30> 1179: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 1180: 38 ca cmp %cl,%dl 1182: 74 0c je 1190 <strchr+0x30> } char* strchr(const char *s, char c) { for(; *s; s++) 1184: 83 c0 01 add $0x1,%eax 1187: 0f b6 10 movzbl (%eax),%edx 118a: 84 d2 test %dl,%dl 118c: 75 f2 jne 1180 <strchr+0x20> if(*s == c) return (char*)s; return 0; 118e: 31 c0 xor %eax,%eax } 1190: 5b pop %ebx 1191: 5d pop %ebp 1192: c3 ret 1193: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 1199: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 000011a0 <gets>: char* gets(char *buf, int max) { 11a0: 55 push %ebp 11a1: 89 e5 mov %esp,%ebp 11a3: 57 push %edi 11a4: 56 push %esi 11a5: 53 push %ebx int i, cc; char c; for(i=0; i+1 < max; ){ 11a6: 31 f6 xor %esi,%esi cc = read(0, &c, 1); 11a8: 8d 7d e7 lea -0x19(%ebp),%edi return 0; } char* gets(char *buf, int max) { 11ab: 83 ec 1c sub $0x1c,%esp int i, cc; char c; for(i=0; i+1 < max; ){ 11ae: eb 29 jmp 11d9 <gets+0x39> cc = read(0, &c, 1); 11b0: 83 ec 04 sub $0x4,%esp 11b3: 6a 01 push $0x1 11b5: 57 push %edi 11b6: 6a 00 push $0x0 11b8: e8 2d 01 00 00 call 12ea <read> if(cc < 1) 11bd: 83 c4 10 add $0x10,%esp 11c0: 85 c0 test %eax,%eax 11c2: 7e 1d jle 11e1 <gets+0x41> break; buf[i++] = c; 11c4: 0f b6 45 e7 movzbl -0x19(%ebp),%eax 11c8: 8b 55 08 mov 0x8(%ebp),%edx 11cb: 89 de mov %ebx,%esi if(c == '\n' || c == '\r') 11cd: 3c 0a cmp $0xa,%al for(i=0; i+1 < max; ){ cc = read(0, &c, 1); if(cc < 1) break; buf[i++] = c; 11cf: 88 44 1a ff mov %al,-0x1(%edx,%ebx,1) if(c == '\n' || c == '\r') 11d3: 74 1b je 11f0 <gets+0x50> 11d5: 3c 0d cmp $0xd,%al 11d7: 74 17 je 11f0 <gets+0x50> gets(char *buf, int max) { int i, cc; char c; for(i=0; i+1 < max; ){ 11d9: 8d 5e 01 lea 0x1(%esi),%ebx 11dc: 3b 5d 0c cmp 0xc(%ebp),%ebx 11df: 7c cf jl 11b0 <gets+0x10> break; buf[i++] = c; if(c == '\n' || c == '\r') break; } buf[i] = '\0'; 11e1: 8b 45 08 mov 0x8(%ebp),%eax 11e4: c6 04 30 00 movb $0x0,(%eax,%esi,1) return buf; } 11e8: 8d 65 f4 lea -0xc(%ebp),%esp 11eb: 5b pop %ebx 11ec: 5e pop %esi 11ed: 5f pop %edi 11ee: 5d pop %ebp 11ef: c3 ret break; buf[i++] = c; if(c == '\n' || c == '\r') break; } buf[i] = '\0'; 11f0: 8b 45 08 mov 0x8(%ebp),%eax gets(char *buf, int max) { int i, cc; char c; for(i=0; i+1 < max; ){ 11f3: 89 de mov %ebx,%esi break; buf[i++] = c; if(c == '\n' || c == '\r') break; } buf[i] = '\0'; 11f5: c6 04 30 00 movb $0x0,(%eax,%esi,1) return buf; } 11f9: 8d 65 f4 lea -0xc(%ebp),%esp 11fc: 5b pop %ebx 11fd: 5e pop %esi 11fe: 5f pop %edi 11ff: 5d pop %ebp 1200: c3 ret 1201: eb 0d jmp 1210 <stat> 1203: 90 nop 1204: 90 nop 1205: 90 nop 1206: 90 nop 1207: 90 nop 1208: 90 nop 1209: 90 nop 120a: 90 nop 120b: 90 nop 120c: 90 nop 120d: 90 nop 120e: 90 nop 120f: 90 nop 00001210 <stat>: int stat(char *n, struct stat *st) { 1210: 55 push %ebp 1211: 89 e5 mov %esp,%ebp 1213: 56 push %esi 1214: 53 push %ebx int fd; int r; fd = open(n, O_RDONLY); 1215: 83 ec 08 sub $0x8,%esp 1218: 6a 00 push $0x0 121a: ff 75 08 pushl 0x8(%ebp) 121d: e8 f0 00 00 00 call 1312 <open> if(fd < 0) 1222: 83 c4 10 add $0x10,%esp 1225: 85 c0 test %eax,%eax 1227: 78 27 js 1250 <stat+0x40> return -1; r = fstat(fd, st); 1229: 83 ec 08 sub $0x8,%esp 122c: ff 75 0c pushl 0xc(%ebp) 122f: 89 c3 mov %eax,%ebx 1231: 50 push %eax 1232: e8 f3 00 00 00 call 132a <fstat> 1237: 89 c6 mov %eax,%esi close(fd); 1239: 89 1c 24 mov %ebx,(%esp) 123c: e8 b9 00 00 00 call 12fa <close> return r; 1241: 83 c4 10 add $0x10,%esp 1244: 89 f0 mov %esi,%eax } 1246: 8d 65 f8 lea -0x8(%ebp),%esp 1249: 5b pop %ebx 124a: 5e pop %esi 124b: 5d pop %ebp 124c: c3 ret 124d: 8d 76 00 lea 0x0(%esi),%esi int fd; int r; fd = open(n, O_RDONLY); if(fd < 0) return -1; 1250: b8 ff ff ff ff mov $0xffffffff,%eax 1255: eb ef jmp 1246 <stat+0x36> 1257: 89 f6 mov %esi,%esi 1259: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 00001260 <atoi>: return r; } int atoi(const char *s) { 1260: 55 push %ebp 1261: 89 e5 mov %esp,%ebp 1263: 53 push %ebx 1264: 8b 4d 08 mov 0x8(%ebp),%ecx int n; n = 0; while('0' <= *s && *s <= '9') 1267: 0f be 11 movsbl (%ecx),%edx 126a: 8d 42 d0 lea -0x30(%edx),%eax 126d: 3c 09 cmp $0x9,%al 126f: b8 00 00 00 00 mov $0x0,%eax 1274: 77 1f ja 1295 <atoi+0x35> 1276: 8d 76 00 lea 0x0(%esi),%esi 1279: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi n = n*10 + *s++ - '0'; 1280: 8d 04 80 lea (%eax,%eax,4),%eax 1283: 83 c1 01 add $0x1,%ecx 1286: 8d 44 42 d0 lea -0x30(%edx,%eax,2),%eax atoi(const char *s) { int n; n = 0; while('0' <= *s && *s <= '9') 128a: 0f be 11 movsbl (%ecx),%edx 128d: 8d 5a d0 lea -0x30(%edx),%ebx 1290: 80 fb 09 cmp $0x9,%bl 1293: 76 eb jbe 1280 <atoi+0x20> n = n*10 + *s++ - '0'; return n; } 1295: 5b pop %ebx 1296: 5d pop %ebp 1297: c3 ret 1298: 90 nop 1299: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 000012a0 <memmove>: void* memmove(void *vdst, void *vsrc, int n) { 12a0: 55 push %ebp 12a1: 89 e5 mov %esp,%ebp 12a3: 56 push %esi 12a4: 53 push %ebx 12a5: 8b 5d 10 mov 0x10(%ebp),%ebx 12a8: 8b 45 08 mov 0x8(%ebp),%eax 12ab: 8b 75 0c mov 0xc(%ebp),%esi char *dst, *src; dst = vdst; src = vsrc; while(n-- > 0) 12ae: 85 db test %ebx,%ebx 12b0: 7e 14 jle 12c6 <memmove+0x26> 12b2: 31 d2 xor %edx,%edx 12b4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi *dst++ = *src++; 12b8: 0f b6 0c 16 movzbl (%esi,%edx,1),%ecx 12bc: 88 0c 10 mov %cl,(%eax,%edx,1) 12bf: 83 c2 01 add $0x1,%edx { char *dst, *src; dst = vdst; src = vsrc; while(n-- > 0) 12c2: 39 da cmp %ebx,%edx 12c4: 75 f2 jne 12b8 <memmove+0x18> *dst++ = *src++; return vdst; } 12c6: 5b pop %ebx 12c7: 5e pop %esi 12c8: 5d pop %ebp 12c9: c3 ret 000012ca <fork>: name: \ movl $SYS_ ## name, %eax; \ int $T_SYSCALL; \ ret SYSCALL(fork) 12ca: b8 01 00 00 00 mov $0x1,%eax 12cf: cd 40 int $0x40 12d1: c3 ret 000012d2 <exit>: SYSCALL(exit) 12d2: b8 02 00 00 00 mov $0x2,%eax 12d7: cd 40 int $0x40 12d9: c3 ret 000012da <wait>: SYSCALL(wait) 12da: b8 03 00 00 00 mov $0x3,%eax 12df: cd 40 int $0x40 12e1: c3 ret 000012e2 <pipe>: SYSCALL(pipe) 12e2: b8 04 00 00 00 mov $0x4,%eax 12e7: cd 40 int $0x40 12e9: c3 ret 000012ea <read>: SYSCALL(read) 12ea: b8 05 00 00 00 mov $0x5,%eax 12ef: cd 40 int $0x40 12f1: c3 ret 000012f2 <write>: SYSCALL(write) 12f2: b8 10 00 00 00 mov $0x10,%eax 12f7: cd 40 int $0x40 12f9: c3 ret 000012fa <close>: SYSCALL(close) 12fa: b8 15 00 00 00 mov $0x15,%eax 12ff: cd 40 int $0x40 1301: c3 ret 00001302 <kill>: SYSCALL(kill) 1302: b8 06 00 00 00 mov $0x6,%eax 1307: cd 40 int $0x40 1309: c3 ret 0000130a <exec>: SYSCALL(exec) 130a: b8 07 00 00 00 mov $0x7,%eax 130f: cd 40 int $0x40 1311: c3 ret 00001312 <open>: SYSCALL(open) 1312: b8 0f 00 00 00 mov $0xf,%eax 1317: cd 40 int $0x40 1319: c3 ret 0000131a <mknod>: SYSCALL(mknod) 131a: b8 11 00 00 00 mov $0x11,%eax 131f: cd 40 int $0x40 1321: c3 ret 00001322 <unlink>: SYSCALL(unlink) 1322: b8 12 00 00 00 mov $0x12,%eax 1327: cd 40 int $0x40 1329: c3 ret 0000132a <fstat>: SYSCALL(fstat) 132a: b8 08 00 00 00 mov $0x8,%eax 132f: cd 40 int $0x40 1331: c3 ret 00001332 <link>: SYSCALL(link) 1332: b8 13 00 00 00 mov $0x13,%eax 1337: cd 40 int $0x40 1339: c3 ret 0000133a <mkdir>: SYSCALL(mkdir) 133a: b8 14 00 00 00 mov $0x14,%eax 133f: cd 40 int $0x40 1341: c3 ret 00001342 <chdir>: SYSCALL(chdir) 1342: b8 09 00 00 00 mov $0x9,%eax 1347: cd 40 int $0x40 1349: c3 ret 0000134a <dup>: SYSCALL(dup) 134a: b8 0a 00 00 00 mov $0xa,%eax 134f: cd 40 int $0x40 1351: c3 ret 00001352 <getpid>: SYSCALL(getpid) 1352: b8 0b 00 00 00 mov $0xb,%eax 1357: cd 40 int $0x40 1359: c3 ret 0000135a <sbrk>: SYSCALL(sbrk) 135a: b8 0c 00 00 00 mov $0xc,%eax 135f: cd 40 int $0x40 1361: c3 ret 00001362 <sleep>: SYSCALL(sleep) 1362: b8 0d 00 00 00 mov $0xd,%eax 1367: cd 40 int $0x40 1369: c3 ret 0000136a <uptime>: SYSCALL(uptime) 136a: b8 0e 00 00 00 mov $0xe,%eax 136f: cd 40 int $0x40 1371: c3 ret 00001372 <shm_open>: SYSCALL(shm_open) 1372: b8 16 00 00 00 mov $0x16,%eax 1377: cd 40 int $0x40 1379: c3 ret 0000137a <shm_close>: SYSCALL(shm_close) 137a: b8 17 00 00 00 mov $0x17,%eax 137f: cd 40 int $0x40 1381: c3 ret 1382: 66 90 xchg %ax,%ax 1384: 66 90 xchg %ax,%ax 1386: 66 90 xchg %ax,%ax 1388: 66 90 xchg %ax,%ax 138a: 66 90 xchg %ax,%ax 138c: 66 90 xchg %ax,%ax 138e: 66 90 xchg %ax,%ax 00001390 <printint>: write(fd, &c, 1); } static void printint(int fd, int xx, int base, int sgn) { 1390: 55 push %ebp 1391: 89 e5 mov %esp,%ebp 1393: 57 push %edi 1394: 56 push %esi 1395: 53 push %ebx 1396: 89 c6 mov %eax,%esi 1398: 83 ec 3c sub $0x3c,%esp char buf[16]; int i, neg; uint x; neg = 0; if(sgn && xx < 0){ 139b: 8b 5d 08 mov 0x8(%ebp),%ebx 139e: 85 db test %ebx,%ebx 13a0: 74 7e je 1420 <printint+0x90> 13a2: 89 d0 mov %edx,%eax 13a4: c1 e8 1f shr $0x1f,%eax 13a7: 84 c0 test %al,%al 13a9: 74 75 je 1420 <printint+0x90> neg = 1; x = -xx; 13ab: 89 d0 mov %edx,%eax int i, neg; uint x; neg = 0; if(sgn && xx < 0){ neg = 1; 13ad: c7 45 c4 01 00 00 00 movl $0x1,-0x3c(%ebp) x = -xx; 13b4: f7 d8 neg %eax 13b6: 89 75 c0 mov %esi,-0x40(%ebp) } else { x = xx; } i = 0; 13b9: 31 ff xor %edi,%edi 13bb: 8d 5d d7 lea -0x29(%ebp),%ebx 13be: 89 ce mov %ecx,%esi 13c0: eb 08 jmp 13ca <printint+0x3a> 13c2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi do{ buf[i++] = digits[x % base]; 13c8: 89 cf mov %ecx,%edi 13ca: 31 d2 xor %edx,%edx 13cc: 8d 4f 01 lea 0x1(%edi),%ecx 13cf: f7 f6 div %esi 13d1: 0f b6 92 98 17 00 00 movzbl 0x1798(%edx),%edx }while((x /= base) != 0); 13d8: 85 c0 test %eax,%eax x = xx; } i = 0; do{ buf[i++] = digits[x % base]; 13da: 88 14 0b mov %dl,(%ebx,%ecx,1) }while((x /= base) != 0); 13dd: 75 e9 jne 13c8 <printint+0x38> if(neg) 13df: 8b 45 c4 mov -0x3c(%ebp),%eax 13e2: 8b 75 c0 mov -0x40(%ebp),%esi 13e5: 85 c0 test %eax,%eax 13e7: 74 08 je 13f1 <printint+0x61> buf[i++] = '-'; 13e9: c6 44 0d d8 2d movb $0x2d,-0x28(%ebp,%ecx,1) 13ee: 8d 4f 02 lea 0x2(%edi),%ecx 13f1: 8d 7c 0d d7 lea -0x29(%ebp,%ecx,1),%edi 13f5: 8d 76 00 lea 0x0(%esi),%esi 13f8: 0f b6 07 movzbl (%edi),%eax #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 13fb: 83 ec 04 sub $0x4,%esp 13fe: 83 ef 01 sub $0x1,%edi 1401: 6a 01 push $0x1 1403: 53 push %ebx 1404: 56 push %esi 1405: 88 45 d7 mov %al,-0x29(%ebp) 1408: e8 e5 fe ff ff call 12f2 <write> buf[i++] = digits[x % base]; }while((x /= base) != 0); if(neg) buf[i++] = '-'; while(--i >= 0) 140d: 83 c4 10 add $0x10,%esp 1410: 39 df cmp %ebx,%edi 1412: 75 e4 jne 13f8 <printint+0x68> putc(fd, buf[i]); } 1414: 8d 65 f4 lea -0xc(%ebp),%esp 1417: 5b pop %ebx 1418: 5e pop %esi 1419: 5f pop %edi 141a: 5d pop %ebp 141b: c3 ret 141c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi neg = 0; if(sgn && xx < 0){ neg = 1; x = -xx; } else { x = xx; 1420: 89 d0 mov %edx,%eax static char digits[] = "0123456789ABCDEF"; char buf[16]; int i, neg; uint x; neg = 0; 1422: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp) 1429: eb 8b jmp 13b6 <printint+0x26> 142b: 90 nop 142c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 00001430 <printf>: } // Print to the given fd. Only understands %d, %x, %p, %s. void printf(int fd, char *fmt, ...) { 1430: 55 push %ebp 1431: 89 e5 mov %esp,%ebp 1433: 57 push %edi 1434: 56 push %esi 1435: 53 push %ebx int c, i, state; uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ 1436: 8d 45 10 lea 0x10(%ebp),%eax } // Print to the given fd. Only understands %d, %x, %p, %s. void printf(int fd, char *fmt, ...) { 1439: 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++){ 143c: 8b 75 0c mov 0xc(%ebp),%esi } // Print to the given fd. Only understands %d, %x, %p, %s. void printf(int fd, char *fmt, ...) { 143f: 8b 7d 08 mov 0x8(%ebp),%edi int c, i, state; uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ 1442: 89 45 d0 mov %eax,-0x30(%ebp) 1445: 0f b6 1e movzbl (%esi),%ebx 1448: 83 c6 01 add $0x1,%esi 144b: 84 db test %bl,%bl 144d: 0f 84 b0 00 00 00 je 1503 <printf+0xd3> 1453: 31 d2 xor %edx,%edx 1455: eb 39 jmp 1490 <printf+0x60> 1457: 89 f6 mov %esi,%esi 1459: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi c = fmt[i] & 0xff; if(state == 0){ if(c == '%'){ 1460: 83 f8 25 cmp $0x25,%eax 1463: 89 55 d4 mov %edx,-0x2c(%ebp) state = '%'; 1466: ba 25 00 00 00 mov $0x25,%edx state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ c = fmt[i] & 0xff; if(state == 0){ if(c == '%'){ 146b: 74 18 je 1485 <printf+0x55> #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 146d: 8d 45 e2 lea -0x1e(%ebp),%eax 1470: 83 ec 04 sub $0x4,%esp 1473: 88 5d e2 mov %bl,-0x1e(%ebp) 1476: 6a 01 push $0x1 1478: 50 push %eax 1479: 57 push %edi 147a: e8 73 fe ff ff call 12f2 <write> 147f: 8b 55 d4 mov -0x2c(%ebp),%edx 1482: 83 c4 10 add $0x10,%esp 1485: 83 c6 01 add $0x1,%esi int c, i, state; uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ 1488: 0f b6 5e ff movzbl -0x1(%esi),%ebx 148c: 84 db test %bl,%bl 148e: 74 73 je 1503 <printf+0xd3> c = fmt[i] & 0xff; if(state == 0){ 1490: 85 d2 test %edx,%edx uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ c = fmt[i] & 0xff; 1492: 0f be cb movsbl %bl,%ecx 1495: 0f b6 c3 movzbl %bl,%eax if(state == 0){ 1498: 74 c6 je 1460 <printf+0x30> if(c == '%'){ state = '%'; } else { putc(fd, c); } } else if(state == '%'){ 149a: 83 fa 25 cmp $0x25,%edx 149d: 75 e6 jne 1485 <printf+0x55> if(c == 'd'){ 149f: 83 f8 64 cmp $0x64,%eax 14a2: 0f 84 f8 00 00 00 je 15a0 <printf+0x170> printint(fd, *ap, 10, 1); ap++; } else if(c == 'x' || c == 'p'){ 14a8: 81 e1 f7 00 00 00 and $0xf7,%ecx 14ae: 83 f9 70 cmp $0x70,%ecx 14b1: 74 5d je 1510 <printf+0xe0> printint(fd, *ap, 16, 0); ap++; } else if(c == 's'){ 14b3: 83 f8 73 cmp $0x73,%eax 14b6: 0f 84 84 00 00 00 je 1540 <printf+0x110> s = "(null)"; while(*s != 0){ putc(fd, *s); s++; } } else if(c == 'c'){ 14bc: 83 f8 63 cmp $0x63,%eax 14bf: 0f 84 ea 00 00 00 je 15af <printf+0x17f> putc(fd, *ap); ap++; } else if(c == '%'){ 14c5: 83 f8 25 cmp $0x25,%eax 14c8: 0f 84 c2 00 00 00 je 1590 <printf+0x160> #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 14ce: 8d 45 e7 lea -0x19(%ebp),%eax 14d1: 83 ec 04 sub $0x4,%esp 14d4: c6 45 e7 25 movb $0x25,-0x19(%ebp) 14d8: 6a 01 push $0x1 14da: 50 push %eax 14db: 57 push %edi 14dc: e8 11 fe ff ff call 12f2 <write> 14e1: 83 c4 0c add $0xc,%esp 14e4: 8d 45 e6 lea -0x1a(%ebp),%eax 14e7: 88 5d e6 mov %bl,-0x1a(%ebp) 14ea: 6a 01 push $0x1 14ec: 50 push %eax 14ed: 57 push %edi 14ee: 83 c6 01 add $0x1,%esi 14f1: e8 fc fd ff ff call 12f2 <write> int c, i, state; uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ 14f6: 0f b6 5e ff movzbl -0x1(%esi),%ebx #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 14fa: 83 c4 10 add $0x10,%esp } else { // Unknown % sequence. Print it to draw attention. putc(fd, '%'); putc(fd, c); } state = 0; 14fd: 31 d2 xor %edx,%edx int c, i, state; uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ 14ff: 84 db test %bl,%bl 1501: 75 8d jne 1490 <printf+0x60> putc(fd, c); } state = 0; } } } 1503: 8d 65 f4 lea -0xc(%ebp),%esp 1506: 5b pop %ebx 1507: 5e pop %esi 1508: 5f pop %edi 1509: 5d pop %ebp 150a: c3 ret 150b: 90 nop 150c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi } else if(state == '%'){ if(c == 'd'){ printint(fd, *ap, 10, 1); ap++; } else if(c == 'x' || c == 'p'){ printint(fd, *ap, 16, 0); 1510: 83 ec 0c sub $0xc,%esp 1513: b9 10 00 00 00 mov $0x10,%ecx 1518: 6a 00 push $0x0 151a: 8b 5d d0 mov -0x30(%ebp),%ebx 151d: 89 f8 mov %edi,%eax 151f: 8b 13 mov (%ebx),%edx 1521: e8 6a fe ff ff call 1390 <printint> ap++; 1526: 89 d8 mov %ebx,%eax 1528: 83 c4 10 add $0x10,%esp } else { // Unknown % sequence. Print it to draw attention. putc(fd, '%'); putc(fd, c); } state = 0; 152b: 31 d2 xor %edx,%edx if(c == 'd'){ printint(fd, *ap, 10, 1); ap++; } else if(c == 'x' || c == 'p'){ printint(fd, *ap, 16, 0); ap++; 152d: 83 c0 04 add $0x4,%eax 1530: 89 45 d0 mov %eax,-0x30(%ebp) 1533: e9 4d ff ff ff jmp 1485 <printf+0x55> 1538: 90 nop 1539: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi } else if(c == 's'){ s = (char*)*ap; 1540: 8b 45 d0 mov -0x30(%ebp),%eax 1543: 8b 18 mov (%eax),%ebx ap++; 1545: 83 c0 04 add $0x4,%eax 1548: 89 45 d0 mov %eax,-0x30(%ebp) if(s == 0) s = "(null)"; 154b: b8 90 17 00 00 mov $0x1790,%eax 1550: 85 db test %ebx,%ebx 1552: 0f 44 d8 cmove %eax,%ebx while(*s != 0){ 1555: 0f b6 03 movzbl (%ebx),%eax 1558: 84 c0 test %al,%al 155a: 74 23 je 157f <printf+0x14f> 155c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 1560: 88 45 e3 mov %al,-0x1d(%ebp) #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 1563: 8d 45 e3 lea -0x1d(%ebp),%eax 1566: 83 ec 04 sub $0x4,%esp 1569: 6a 01 push $0x1 ap++; if(s == 0) s = "(null)"; while(*s != 0){ putc(fd, *s); s++; 156b: 83 c3 01 add $0x1,%ebx #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 156e: 50 push %eax 156f: 57 push %edi 1570: e8 7d fd ff ff call 12f2 <write> } else if(c == 's'){ s = (char*)*ap; ap++; if(s == 0) s = "(null)"; while(*s != 0){ 1575: 0f b6 03 movzbl (%ebx),%eax 1578: 83 c4 10 add $0x10,%esp 157b: 84 c0 test %al,%al 157d: 75 e1 jne 1560 <printf+0x130> } else { // Unknown % sequence. Print it to draw attention. putc(fd, '%'); putc(fd, c); } state = 0; 157f: 31 d2 xor %edx,%edx 1581: e9 ff fe ff ff jmp 1485 <printf+0x55> 1586: 8d 76 00 lea 0x0(%esi),%esi 1589: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 1590: 83 ec 04 sub $0x4,%esp 1593: 88 5d e5 mov %bl,-0x1b(%ebp) 1596: 8d 45 e5 lea -0x1b(%ebp),%eax 1599: 6a 01 push $0x1 159b: e9 4c ff ff ff jmp 14ec <printf+0xbc> } else { putc(fd, c); } } else if(state == '%'){ if(c == 'd'){ printint(fd, *ap, 10, 1); 15a0: 83 ec 0c sub $0xc,%esp 15a3: b9 0a 00 00 00 mov $0xa,%ecx 15a8: 6a 01 push $0x1 15aa: e9 6b ff ff ff jmp 151a <printf+0xea> 15af: 8b 5d d0 mov -0x30(%ebp),%ebx #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 15b2: 83 ec 04 sub $0x4,%esp 15b5: 8b 03 mov (%ebx),%eax 15b7: 6a 01 push $0x1 15b9: 88 45 e4 mov %al,-0x1c(%ebp) 15bc: 8d 45 e4 lea -0x1c(%ebp),%eax 15bf: 50 push %eax 15c0: 57 push %edi 15c1: e8 2c fd ff ff call 12f2 <write> 15c6: e9 5b ff ff ff jmp 1526 <printf+0xf6> 15cb: 66 90 xchg %ax,%ax 15cd: 66 90 xchg %ax,%ax 15cf: 90 nop 000015d0 <free>: static Header base; static Header *freep; void free(void *ap) { 15d0: 55 push %ebp Header *bp, *p; bp = (Header*)ap - 1; for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 15d1: a1 94 1a 00 00 mov 0x1a94,%eax static Header base; static Header *freep; void free(void *ap) { 15d6: 89 e5 mov %esp,%ebp 15d8: 57 push %edi 15d9: 56 push %esi 15da: 53 push %ebx 15db: 8b 5d 08 mov 0x8(%ebp),%ebx Header *bp, *p; bp = (Header*)ap - 1; for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) 15de: 8b 10 mov (%eax),%edx void free(void *ap) { Header *bp, *p; bp = (Header*)ap - 1; 15e0: 8d 4b f8 lea -0x8(%ebx),%ecx for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 15e3: 39 c8 cmp %ecx,%eax 15e5: 73 19 jae 1600 <free+0x30> 15e7: 89 f6 mov %esi,%esi 15e9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 15f0: 39 d1 cmp %edx,%ecx 15f2: 72 1c jb 1610 <free+0x40> if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) 15f4: 39 d0 cmp %edx,%eax 15f6: 73 18 jae 1610 <free+0x40> static Header base; static Header *freep; void free(void *ap) { 15f8: 89 d0 mov %edx,%eax Header *bp, *p; bp = (Header*)ap - 1; for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 15fa: 39 c8 cmp %ecx,%eax if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) 15fc: 8b 10 mov (%eax),%edx free(void *ap) { Header *bp, *p; bp = (Header*)ap - 1; for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 15fe: 72 f0 jb 15f0 <free+0x20> if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) 1600: 39 d0 cmp %edx,%eax 1602: 72 f4 jb 15f8 <free+0x28> 1604: 39 d1 cmp %edx,%ecx 1606: 73 f0 jae 15f8 <free+0x28> 1608: 90 nop 1609: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi break; if(bp + bp->s.size == p->s.ptr){ 1610: 8b 73 fc mov -0x4(%ebx),%esi 1613: 8d 3c f1 lea (%ecx,%esi,8),%edi 1616: 39 d7 cmp %edx,%edi 1618: 74 19 je 1633 <free+0x63> bp->s.size += p->s.ptr->s.size; bp->s.ptr = p->s.ptr->s.ptr; } else bp->s.ptr = p->s.ptr; 161a: 89 53 f8 mov %edx,-0x8(%ebx) if(p + p->s.size == bp){ 161d: 8b 50 04 mov 0x4(%eax),%edx 1620: 8d 34 d0 lea (%eax,%edx,8),%esi 1623: 39 f1 cmp %esi,%ecx 1625: 74 23 je 164a <free+0x7a> p->s.size += bp->s.size; p->s.ptr = bp->s.ptr; } else p->s.ptr = bp; 1627: 89 08 mov %ecx,(%eax) freep = p; 1629: a3 94 1a 00 00 mov %eax,0x1a94 } 162e: 5b pop %ebx 162f: 5e pop %esi 1630: 5f pop %edi 1631: 5d pop %ebp 1632: c3 ret bp = (Header*)ap - 1; for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) break; if(bp + bp->s.size == p->s.ptr){ bp->s.size += p->s.ptr->s.size; 1633: 03 72 04 add 0x4(%edx),%esi 1636: 89 73 fc mov %esi,-0x4(%ebx) bp->s.ptr = p->s.ptr->s.ptr; 1639: 8b 10 mov (%eax),%edx 163b: 8b 12 mov (%edx),%edx 163d: 89 53 f8 mov %edx,-0x8(%ebx) } else bp->s.ptr = p->s.ptr; if(p + p->s.size == bp){ 1640: 8b 50 04 mov 0x4(%eax),%edx 1643: 8d 34 d0 lea (%eax,%edx,8),%esi 1646: 39 f1 cmp %esi,%ecx 1648: 75 dd jne 1627 <free+0x57> p->s.size += bp->s.size; 164a: 03 53 fc add -0x4(%ebx),%edx p->s.ptr = bp->s.ptr; } else p->s.ptr = bp; freep = p; 164d: a3 94 1a 00 00 mov %eax,0x1a94 bp->s.size += p->s.ptr->s.size; bp->s.ptr = p->s.ptr->s.ptr; } else bp->s.ptr = p->s.ptr; if(p + p->s.size == bp){ p->s.size += bp->s.size; 1652: 89 50 04 mov %edx,0x4(%eax) p->s.ptr = bp->s.ptr; 1655: 8b 53 f8 mov -0x8(%ebx),%edx 1658: 89 10 mov %edx,(%eax) } else p->s.ptr = bp; freep = p; } 165a: 5b pop %ebx 165b: 5e pop %esi 165c: 5f pop %edi 165d: 5d pop %ebp 165e: c3 ret 165f: 90 nop 00001660 <malloc>: return freep; } void* malloc(uint nbytes) { 1660: 55 push %ebp 1661: 89 e5 mov %esp,%ebp 1663: 57 push %edi 1664: 56 push %esi 1665: 53 push %ebx 1666: 83 ec 0c sub $0xc,%esp Header *p, *prevp; uint nunits; nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; 1669: 8b 45 08 mov 0x8(%ebp),%eax if((prevp = freep) == 0){ 166c: 8b 15 94 1a 00 00 mov 0x1a94,%edx malloc(uint nbytes) { Header *p, *prevp; uint nunits; nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; 1672: 8d 78 07 lea 0x7(%eax),%edi 1675: c1 ef 03 shr $0x3,%edi 1678: 83 c7 01 add $0x1,%edi if((prevp = freep) == 0){ 167b: 85 d2 test %edx,%edx 167d: 0f 84 a3 00 00 00 je 1726 <malloc+0xc6> 1683: 8b 02 mov (%edx),%eax 1685: 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){ 1688: 39 cf cmp %ecx,%edi 168a: 76 74 jbe 1700 <malloc+0xa0> 168c: 81 ff 00 10 00 00 cmp $0x1000,%edi 1692: be 00 10 00 00 mov $0x1000,%esi 1697: 8d 1c fd 00 00 00 00 lea 0x0(,%edi,8),%ebx 169e: 0f 43 f7 cmovae %edi,%esi 16a1: ba 00 80 00 00 mov $0x8000,%edx 16a6: 81 ff ff 0f 00 00 cmp $0xfff,%edi 16ac: 0f 46 da cmovbe %edx,%ebx 16af: eb 10 jmp 16c1 <malloc+0x61> 16b1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; if((prevp = freep) == 0){ base.s.ptr = freep = prevp = &base; base.s.size = 0; } for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ 16b8: 8b 02 mov (%edx),%eax if(p->s.size >= nunits){ 16ba: 8b 48 04 mov 0x4(%eax),%ecx 16bd: 39 cf cmp %ecx,%edi 16bf: 76 3f jbe 1700 <malloc+0xa0> p->s.size = nunits; } freep = prevp; return (void*)(p + 1); } if(p == freep) 16c1: 39 05 94 1a 00 00 cmp %eax,0x1a94 16c7: 89 c2 mov %eax,%edx 16c9: 75 ed jne 16b8 <malloc+0x58> char *p; Header *hp; if(nu < 4096) nu = 4096; p = sbrk(nu * sizeof(Header)); 16cb: 83 ec 0c sub $0xc,%esp 16ce: 53 push %ebx 16cf: e8 86 fc ff ff call 135a <sbrk> if(p == (char*)-1) 16d4: 83 c4 10 add $0x10,%esp 16d7: 83 f8 ff cmp $0xffffffff,%eax 16da: 74 1c je 16f8 <malloc+0x98> return 0; hp = (Header*)p; hp->s.size = nu; 16dc: 89 70 04 mov %esi,0x4(%eax) free((void*)(hp + 1)); 16df: 83 ec 0c sub $0xc,%esp 16e2: 83 c0 08 add $0x8,%eax 16e5: 50 push %eax 16e6: e8 e5 fe ff ff call 15d0 <free> return freep; 16eb: 8b 15 94 1a 00 00 mov 0x1a94,%edx } freep = prevp; return (void*)(p + 1); } if(p == freep) if((p = morecore(nunits)) == 0) 16f1: 83 c4 10 add $0x10,%esp 16f4: 85 d2 test %edx,%edx 16f6: 75 c0 jne 16b8 <malloc+0x58> return 0; 16f8: 31 c0 xor %eax,%eax 16fa: eb 1c jmp 1718 <malloc+0xb8> 16fc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi base.s.ptr = freep = prevp = &base; base.s.size = 0; } for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ if(p->s.size >= nunits){ if(p->s.size == nunits) 1700: 39 cf cmp %ecx,%edi 1702: 74 1c je 1720 <malloc+0xc0> prevp->s.ptr = p->s.ptr; else { p->s.size -= nunits; 1704: 29 f9 sub %edi,%ecx 1706: 89 48 04 mov %ecx,0x4(%eax) p += p->s.size; 1709: 8d 04 c8 lea (%eax,%ecx,8),%eax p->s.size = nunits; 170c: 89 78 04 mov %edi,0x4(%eax) } freep = prevp; 170f: 89 15 94 1a 00 00 mov %edx,0x1a94 return (void*)(p + 1); 1715: 83 c0 08 add $0x8,%eax } if(p == freep) if((p = morecore(nunits)) == 0) return 0; } } 1718: 8d 65 f4 lea -0xc(%ebp),%esp 171b: 5b pop %ebx 171c: 5e pop %esi 171d: 5f pop %edi 171e: 5d pop %ebp 171f: c3 ret base.s.size = 0; } for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ if(p->s.size >= nunits){ if(p->s.size == nunits) prevp->s.ptr = p->s.ptr; 1720: 8b 08 mov (%eax),%ecx 1722: 89 0a mov %ecx,(%edx) 1724: eb e9 jmp 170f <malloc+0xaf> Header *p, *prevp; uint nunits; nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; if((prevp = freep) == 0){ base.s.ptr = freep = prevp = &base; 1726: c7 05 94 1a 00 00 98 movl $0x1a98,0x1a94 172d: 1a 00 00 1730: c7 05 98 1a 00 00 98 movl $0x1a98,0x1a98 1737: 1a 00 00 base.s.size = 0; 173a: b8 98 1a 00 00 mov $0x1a98,%eax 173f: c7 05 9c 1a 00 00 00 movl $0x0,0x1a9c 1746: 00 00 00 1749: e9 3e ff ff ff jmp 168c <malloc+0x2c> 174e: 66 90 xchg %ax,%ax 00001750 <uacquire>: #include "uspinlock.h" #include "x86.h" void uacquire(struct uspinlock *lk) { 1750: 55 push %ebp xchg(volatile uint *addr, uint newval) { uint result; // The + in "+m" denotes a read-modify-write operand. asm volatile("lock; xchgl %0, %1" : 1751: b9 01 00 00 00 mov $0x1,%ecx 1756: 89 e5 mov %esp,%ebp 1758: 8b 55 08 mov 0x8(%ebp),%edx 175b: 90 nop 175c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 1760: 89 c8 mov %ecx,%eax 1762: f0 87 02 lock xchg %eax,(%edx) // The xchg is atomic. while(xchg(&lk->locked, 1) != 0) 1765: 85 c0 test %eax,%eax 1767: 75 f7 jne 1760 <uacquire+0x10> ; // Tell the C compiler and the processor to not move loads or stores // past this point, to ensure that the critical section's memory // references happen after the lock is acquired. __sync_synchronize(); 1769: f0 83 0c 24 00 lock orl $0x0,(%esp) } 176e: 5d pop %ebp 176f: c3 ret 00001770 <urelease>: void urelease (struct uspinlock *lk) { 1770: 55 push %ebp 1771: 89 e5 mov %esp,%ebp 1773: 8b 45 08 mov 0x8(%ebp),%eax __sync_synchronize(); 1776: f0 83 0c 24 00 lock orl $0x0,(%esp) // Release the lock, equivalent to lk->locked = 0. // This code can't use a C assignment, since it might // not be atomic. A real OS would use C atomics here. asm volatile("movl $0, %0" : "+m" (lk->locked) : ); 177b: c7 00 00 00 00 00 movl $0x0,(%eax) } 1781: 5d pop %ebp 1782: c3 ret
31.892114
70
0.407881
8e84ec951445fa70d78f7db29c8b5058287fd926
489
asm
Assembly
oeis/001/A001042.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/001/A001042.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/001/A001042.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A001042: a(n) = a(n-1)^2 - a(n-2)^2. ; Submitted by Christian Krause ; 1,2,3,5,16,231,53105,2820087664,7952894429824835871,63248529811938901240357985099443351745,4000376523371723941902615329287219027543200136435757892789536976747706216384,16003012328743640989586655320144629580119446376537372184154130713609480575498095104292127409666256444667183968474697598807235694861476767730997235490431 mul $0,2 mov $2,1 mov $3,1 lpb $0 sub $0,2 pow $2,2 add $2,$3 sub $3,$2 lpe mov $0,$2
32.6
322
0.815951
847fd88a7ae2738cdff2eaa4275cb92c15543297
340
asm
Assembly
libsrc/target/sos/sos/setcursorpos.asm
ahjelm/z88dk
c4de367f39a76b41f6390ceeab77737e148178fa
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/target/sos/sos/setcursorpos.asm
C-Chads/z88dk
a4141a8e51205c6414b4ae3263b633c4265778e6
[ "ClArtistic" ]
1,600
2017-01-15T16:12:02.000Z
2022-03-31T12:11:12.000Z
libsrc/target/sos/sos/setcursorpos.asm
C-Chads/z88dk
a4141a8e51205c6414b4ae3263b633c4265778e6
[ "ClArtistic" ]
215
2017-01-17T10:43:03.000Z
2022-03-23T17:25:02.000Z
; int setcursorpos(x,y) ; CALLER linkage for function pointers ; ; $Id: setcursorpos.asm,v 1.4 2016-06-19 20:58:00 dom Exp $ ; SECTION code_clib PUBLIC setcursorpos PUBLIC _setcursorpos EXTERN asm_setcursorpos setcursorpos: _setcursorpos: pop bc pop hl pop de push de push hl push bc jp asm_setcursorpos
14.782609
65
0.705882
9acf14962654b87309b1d3a4a52be8fc0a43eb7b
1,834
asm
Assembly
programs/oeis/137/A137742.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/137/A137742.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/137/A137742.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A137742: a(n) = (n-1)*(n+4)*(n+6)/6 for n>1, a(1)=1. ; 1,8,21,40,66,100,143,196,260,336,425,528,646,780,931,1100,1288,1496,1725,1976,2250,2548,2871,3220,3596,4000,4433,4896,5390,5916,6475,7068,7696,8360,9061,9800,10578,11396,12255,13156,14100,15088,16121,17200,18326,19500,20723,21996,23320,24696,26125,27608,29146,30740,32391,34100,35868,37696,39585,41536,43550,45628,47771,49980,52256,54600,57013,59496,62050,64676,67375,70148,72996,75920,78921,82000,85158,88396,91715,95116,98600,102168,105821,109560,113386,117300,121303,125396,129580,133856,138225,142688,147246,151900,156651,161500,166448,171496,176645,181896,187250,192708,198271,203940,209716,215600,221593,227696,233910,240236,246675,253228,259896,266680,273581,280600,287738,294996,302375,309876,317500,325248,333121,341120,349246,357500,365883,374396,383040,391816,400725,409768,418946,428260,437711,447300,457028,466896,476905,487056,497350,507788,518371,529100,539976,551000,562173,573496,584970,596596,608375,620308,632396,644640,657041,669600,682318,695196,708235,721436,734800,748328,762021,775880,789906,804100,818463,832996,847700,862576,877625,892848,908246,923820,939571,955500,971608,987896,1004365,1021016,1037850,1054868,1072071,1089460,1107036,1124800,1142753,1160896,1179230,1197756,1216475,1235388,1254496,1273800,1293301,1313000,1332898,1352996,1373295,1393796,1414500,1435408,1456521,1477840,1499366,1521100,1543043,1565196,1587560,1610136,1632925,1655928,1679146,1702580,1726231,1750100,1774188,1798496,1823025,1847776,1872750,1897948,1923371,1949020,1974896,2001000,2027333,2053896,2080690,2107716,2134975,2162468,2190196,2218160,2246361,2274800,2303478,2332396,2361555,2390956,2420600,2450488,2480621,2511000,2541626,2572500,2603623,2634996,2666620,2698496 add $0,2 mov $1,$0 pow $1,2 sub $1,1 mov $2,$0 add $2,6 mul $1,$2 div $1,6 trn $1,5 add $1,1
131
1,684
0.821701
a2eb31eae942965b31ef944cf52520a412f28cfb
25,366
asm
Assembly
base/mvdm/dos/v86/cmd/command/tranmsg.asm
npocmaka/Windows-Server-2003
5c6fe3db626b63a384230a1aa6b92ac416b0765f
[ "Unlicense" ]
17
2020-11-13T13:42:52.000Z
2021-09-16T09:13:13.000Z
base/mvdm/dos/v86/cmd/command/tranmsg.asm
sancho1952007/Windows-Server-2003
5c6fe3db626b63a384230a1aa6b92ac416b0765f
[ "Unlicense" ]
2
2020-10-19T08:02:06.000Z
2020-10-19T08:23:18.000Z
base/mvdm/dos/v86/cmd/command/tranmsg.asm
sancho1952007/Windows-Server-2003
5c6fe3db626b63a384230a1aa6b92ac416b0765f
[ "Unlicense" ]
14
2020-11-14T09:43:20.000Z
2021-08-28T08:59:57.000Z
;/* ; * Microsoft Confidential ; * Copyright (C) Microsoft Corporation 1991 ; * All Rights Reserved. ; */ include version.inc ; ; Revision History ; ================ ; ; M016 SR 08/09/90 Added 2 error messages for LoadHigh ; ; ;**************************************************** ;* TRANSIENT MESSAGE POINTERS & SUBSTITUTION BLOCKS * ;**************************************************** msg_disp_class db Util_msg_class msg_cont_flag db No_cont_flag ; extended error string output ; Extend_Buf_ptr dw 0 ;AN000;set to no message Extend_Buf_sub db 0 ;AN000;set to no substitutions db parm_block_size ;AN000;size of sublist db 0 ;AN000;reserved Extend_Buf_off dw OFFSET TranGroup:String_ptr_2 ;AN000;offset of arg Extend_Buf_seg dw 0 ;AN000;segment of arg db 0 ;AN000;first subst db Char_field_ASCIIZ ;AN000;character string db 128 ;AN000;maximum width db 0 ;AN000;minimum width db blank ;AN000;pad character ; "Duplicate file name or file not found" ; Renerr_Ptr dw 1002 ;AN000;message number db no_subst ;AN000;number of subst ; "Invalid path or file name" ; BadCPMes_Ptr dw 1003 ;AN000;message number db no_subst ;AN000;number of subst ; "Insufficient disk space" ; NoSpace_Ptr dw 1004 ;AN000;message number db no_subst ;AN000;number of subst ; "Out of environment space" ; EnvErr_Ptr dw 1007 ;AN000;message number db no_subst ;AN000;number of subst ; "File creation error" ; FulDir_Ptr dw 1008 ;AN000;message number db no_subst ;AN000;number of subst ; "Batch file missing",13,10 ; BadBat_Ptr dw 1009 ;AN000;message number db no_subst ;AN000;number of subst ; "Insert disk with batch file",13,10 ; NeedBat_Ptr dw 1010 ;AN000;message number db no_subst ;AN000;number of subst ; "Bad command or file name",13,10 ; BadNam_Ptr dw 1011 ;AN000;message number db no_subst ;AN000;number of subst ; "Access denied",13,10 ; AccDen_Ptr dw 1014 ;AN000;message number db no_subst ;AN000;number of subst ; "File cannot be copied onto itself",13,10 ; OverWr_Ptr dw 1015 ;AN000;message number db no_subst ;AN000;number of subst ; "Content of destination lost before copy",13,10 ; LostErr_Ptr dw 1016 ;AN000;message number db no_subst ;AN000;number of subst ; "Invalid filename or file not found",13,10 ; InOrNot_Ptr dw 1017 ;AN000;message number db no_subst ;AN000;number of subst ; "%1 File(s) copied",13,10 ; Copied_Ptr dw 1018 ;AN000;message number db 1 ;AN000;number of subst db parm_block_size ;AN000;size of sublist db 0 ;AN000;reserved dw OFFSET TranGroup:Copy_num ;AN000;offset of arg dw 0 ;AN000;segment of arg db 1 ;AN000;first subst db Right_Align+Unsgn_Bin_Word ;AN000;binary to decimal db 9 ;AN000;maximum width db 9 ;AN000;minimum width db blank ;AN000;pad character ; "%1 File(s) " ; DirMes_Ptr dw 1019 ;AN000;message number db 1 ;AN000;number of subst db parm_block_size ;AN000;size of sublist db 0 ;AN000;reserved dw OFFSET TranGroup:Dir_num ;AN000;offset of arg dw 0 ;AN000;segment of arg db 1 ;AN000;first subst db Right_Align+Unsgn_Bin_Word ;AN000;binary to decimal db 9 ;AN000;maximum width db 9 ;AN000;minimum width db blank ;AN000;pad character ; "%1 bytes free",13,10 ; BytMes_Ptr dw 1020 ;AN000;message number db 1 ;AN000;number of subst db parm_block_size ;AN000;size of sublist db 0 ;AN000;reserved dw OFFSET TranGroup:Bytes_Free ;AN000;offset of arg dw 0 ;AN000;segment of arg db 1 ;AN000;first subst db Right_Align+Unsgn_Bin_DWord ;AN000;long binary to decimal ifdef KOREA db 11 ; <MSCH> db 11 ; <MSCH> else db 28 ;AN000;maximum width db 28 ;AN000;minimum width endif ; KOREA db blank ;AN000;pad character ; "Invalid drive specification",13,10 ; BadDrv_Ptr dw 1021 ;AN000;message number db no_subst ;AN000;number of subst ; "Code page %1 not prepared for system",13,10 ; CP_not_set_Ptr dw 1022 ;AN000;message number db 1 ;AN000;number of subst db parm_block_size ;AN000;size of sublist db 0 ;AN000;reserved dw OFFSET TranGroup:System_cpage ;AN000;offset of arg dw 0 ;AN000;segment of arg db 1 ;AN000;first subst db Right_Align+Unsgn_Bin_Word ;AN000;binary to decimal db 5 ;AN000;maximum width db 1 ;AN000;minimum width db blank ;AN000;pad character ; "Code page %1 not prepared for all devices",13,10 ; CP_not_all_Ptr dw 1023 ;AN000;message number db 1 ;AN000;number of subst db parm_block_size ;AN000;size of sublist db 0 ;AN000;reserved dw OFFSET TranGroup:System_cpage ;AN000;offset of arg dw 0 ;AN000;segment of arg db 1 ;AN000;first subst db Right_Align+Unsgn_Bin_Word ;AN000;binary to decimal db 5 ;AN000;maximum width db 1 ;AN000;minimum width db blank ;AN000;pad character ; "Active code page: %1",13,10 ; CP_active_Ptr dw 1024 ;AN000;message number db 1 ;AN000;number of subst db parm_block_size ;AN000;size of sublist db 0 ;AN000;reserved dw OFFSET TranGroup:System_cpage ;AN000;offset of arg dw 0 ;AN000;segment of arg db 1 ;AN000;first subst db Right_Align+Unsgn_Bin_Word ;AN000;binary to decimal db 5 ;AN000;maximum width db 1 ;AN000;minimum width db blank ;AN000;pad character ; "NLSFUNC not installed",13,10 ; NLSFUNC_Ptr dw 1025 ;AN000;message number db no_subst ;AN000;number of subst ; "Invalid code page",13,10 ; Inv_Code_Page dw 1026 ;AN000;message number db no_subst ;AN000;number of subst ; "Current drive is no longer valid" ; BadCurDrv dw 1027 ;AN000;message number db no_subst ;AN000;number of subst ; "Press any key to continue" ; PauseMes_Ptr dw 1028 ;AN000;message number db no_subst ;AN000;number of subst ; "Label not found",13,10 ; BadLab_Ptr dw 1029 ;AN000;message number db no_subst ;AN000;number of subst ; "Syntax error",13,10 ; SyntMes_Ptr dw 1030 ;AN000;message number db no_subst ;AN000;number of subst ; "Invalid date",13,10 ; BadDat_Ptr dw 1031 ;AN000;message number db no_subst ;AN000;number of subst ; "Current date is %1 %2",13,10 ; CurDat_Ptr dw 1032 ;AN000;message number db 2 ;AN000;number of subst db parm_block_size ;AN000;size of sublist db 0 ;AN000;reserved dw OFFSET TranGroup:Arg_Buf ;AN000;offset of arg dw 0 ;AN000;segment of arg IFNDEF DBCS ; MSKK03 07/14/89 db 1 ;AN000;first subst ELSE IFDEF JAPAN db 2 ;AN000;first subst ELSE db 1 ;AN000;first subst ENDIF ENDIF db Char_field_ASCIIZ ;AN000;character string IFNDEF DBCS db 3 ;AN000;maximum width db 3 ;AN000;minimum width ELSE IFDEF JAPAN ; MSKK02 07/14/89 db 4 ;AN000;maximum width db 4 ;AN000;minimum width ENDIF IFDEF TAIWAN db 6 ;AN000;maximum width db 6 ;AN000;minimum width ENDIF IFDEF KOREA db 2 ;3 Keyl ;AN000;maximum width db 2 ;3 Keyl ;AN000;minimum width ENDIF ENDIF db blank ;AN000;pad character db parm_block_size ;AN000;size of sublist db 0 ;AN000;reserved CurDat_yr dw 0 ;AN000;year CurDat_mo_day dw 0 ;AN000;month,day IFNDEF DBCS ; MSKK03 07/14/89 db 2 ;AN000;second subst ELSE IFDEF JAPAN db 1 ;AN000;second subst ELSE db 2 ;AN000;second subst ENDIF ENDIF db DATE_MDY_4 ;AN000;date db 10 ;AN000;maximum width db 10 ;AN000;minimum width db blank ;AN000;pad character ; "SunMonTueWedThuFriSat" ; WeekTab dw 1033 ;AN000;message number db no_subst ;AN000;number of subst ; "Enter new date (%1):" ; NewDat_Ptr dw 1034 ;AN000;message number db 1 ;AN000;number of subst db parm_block_size ;AN000;size of sublist db 0 ;AN000;reserved NewDat_Format dw 0 ;AN000;offset of replacement dw 0 ;AN000;segment of arg db 1 ;AN000;first subst db Char_field_ASCIIZ ;AN000;character string db 8 ;AN000;maximum width db 8 ;AN000;minimum width db blank ;AN000;pad character ; "Invalid time",13,10 ; BadTim_Ptr dw 1035 ;AN000;message number db no_subst ;AN000;number of subst ; "Current time is %1",13,10 ; CurTim_Ptr dw 1036 ;AN000;message number db 1 ;AN000;number of subst db parm_block_size ;AN000;size of sublist db 0 ;AN000;reserved CurTim_hr_min dw 0 ;AN000;hours,minutes CurTim_Sec_hn dw 0 ;AN000;seconds,hundredths db 1 ;AN000;first subst db Right_Align+TIME_HHMMSSHH_Cty ;AC059;time db 12 ;AC059;maximum width db 12 ;AC059;minimum width db blank ;AN000;pad character ; "Enter new time:" ; NewTim_Ptr dw 1037 ;AN000;message number db no_subst ;AN000;number of subst ; ", Delete (Y/N)?",13,10 ; Del_Y_N_Ptr dw 1038 ;AN000;message number db no_subst ;AN000;number of subst ; "All files in directory will be deleted!",13,10 ; "Are you sure (Y/N)?",13,10 ; SureMes_Ptr dw 1039 ;AN000;message number db no_subst ;AN000;number of subst ; "Microsoft DOS Version %1.%2",13,10 ; VerMes_Ptr dw 1040 ;AN000;message number db 2 ;AN000;number of subst db parm_block_size ;AN000;size of sublist db 0 ;AN000;reserved dw OFFSET TranGroup:Major_Ver_Num ;AN000;offset of arg dw 0 ;AN000;segment of arg db 1 ;AN000;first subst db Right_Align+Unsgn_Bin_Word ;AN000;binary to decimal ifndef NEC_98 db 2 ;AN000;maximum width else ;NEC_98 db 1 ;AN000;maximum width endif ;NEC_98 db 1 ;AN000;minimum width db blank ;AN000;pad character db parm_block_size ;AN000;size of sublist db 0 ;AN000;reserved dw OFFSET TranGroup:Minor_Ver_Num ;AN000;offset of arg dw 0 ;AN000;segment of arg db 2 ;AN000;second subst db Right_Align+Unsgn_Bin_Word ;AN000;binary to decimal db 2 ;AN000;maximum width db 2 ;AN000;minimum width db "0" ;AN000;pad character ; "Volume in drive %1 has no label",13,10 ; VolMes_Ptr_2 dw 1041 ;AN000;message number db 1 ;AN000;number of subst db parm_block_size ;AN000;size of sublist db 0 ;AN000;reserved dw OFFSET TranGroup:vol_drv ;AN000;offset of drive dw 0 ;AN000;segment of arg db 1 ;AN000;first subst db Char_field_Char ;AN000;character db 128 ;AN000;maximum width db 1 ;AN000;minimum width db blank ;AN000;pad character ; "Volume in drive %1 is %2",13,10 ; VolMes_Ptr dw 1042 ;AN000;message number db 2 ;AN000;number of subst db parm_block_size ;AN000;size of sublist db 0 ;AN000;reserved dw OFFSET TranGroup:vol_drv ;AN000;offset of drive dw 0 ;AN000;segment of arg db 1 ;AN000;first subst db 00000000b ;AN000;character db 128 ;AN000;maximum width db 1 ;AN000;minimum width db blank ;AN000;pad character db parm_block_size ;AN000;size of sublist db 0 ;AN000;reserved dw OFFSET TranGroup:CHARBUF ;AN000;offset of string dw 0 ;AN000;segment of arg db 2 ;AN000;second subst db Char_field_ASCIIZ ;AN000;character string db 128 ;AN000;maximum width db 1 ;AN000;minimum width db blank ;AN000;pad character ; "Volume Serial Number is %1-%2",13,10 ; VolSerMes_Ptr dw 1043 ;AN000;message number db 2 ;AN000;number of subst db parm_block_size ;AN000;size of sublist db 0 ;AN000;reserved dw OFFSET TranGroup:vol_serial+2 ;AN000;offset of serial dw 0 ;AN000;segment of arg db 1 ;AN000;first subst db Right_Align+Bin_Hex_Word ;AN000;binary to hex db 4 ;AN000;maximum width db 4 ;AN000;minimum width db "0" ;AN000;pad character db parm_block_size ;AN000;size of sublist db 0 ;AN000;reserved dw OFFSET TranGroup:vol_serial ;AN000;offset of serial dw 0 ;AN000;segment of arg db 2 ;AN000;second subst db Right_Align+Bin_Hex_Word ;AN000;binary to hex db 4 ;AN000;maximum width db 4 ;AN000;minimum width db "0" ;AN000;pad character ; "Invalid directory",13,10 ; BadCD_Ptr dw 1044 ;AN000;message number db no_subst ;AN000;number of subst ; "Unable to create directory",13,10 ; BadMkD_Ptr dw 1045 ;AN000;message number db no_subst ;AN000;number of subst ; "Invalid path, not directory,",13,10 ; "or directory not empty",13,10 ; BadRmD_Ptr dw 1046 ;AN000;message number db no_subst ;AN000;number of subst ; "Must specify ON or OFF",13,10 ; Bad_ON_OFF_Ptr dw 1047 ;AN000;message number db no_subst ;AN000;number of subst ; "Directory of %1",13,10 ; DirHead_Ptr dw 1048 ;AN000;message number db 1 ;AN000;number of subst db parm_block_size ;AN000;size of sublist db 0 ;AN000;reserved dw OFFSET TranGroup:BWDBUF ;AN000;offset of arg dw 0 ;AN000;segment of arg db 1 ;AN000;first subst db Char_field_ASCIIZ ;AN000;character string db 128 ;AN000;maximum width db 0 ;AN000;minimum width db blank ;AN000;pad character ; "No Path",13,10 ; NulPath_Ptr dw 1049 ;AN000;message number db no_subst ;AN000;number of subst ; "Invalid drive in search path",13,10 ; BadPMes_Ptr dw 1050 ;AN000;message number db no_subst ;AN000;number of subst ; "Invalid device",13,10 ; BadDev_Ptr dw 1051 ;AN000;message number db no_subst ;AN000;number of subst ; "FOR cannot be nested",13,10 ; ForNestMes_Ptr dw 1052 ;AN000;message number db no_subst ;AN000;number of subst ; "Intermediate file error during pipe",13,10 ; PipeEMes_Ptr dw 1053 ;AN000;message number db no_subst ;AN000;number of subst ; "Cannot do binary reads from a device",13,10 ; InBDev_Ptr dw 1054 ;AN000;message number db no_subst ;AN000;number of subst ; "BREAK is %1",13,10 ; CtrlcMes_Ptr dw 1055 ;AN000;message number db 1 ;AN000;number of subst db parm_block_size ;AN000;size of sublist db 0 ;AN000;reserved dw 0 ;AN000;offset of on/off (new) dw 0 ;AN000;segment of arg db 1 ;AN000;first subst db Char_field_ASCIIZ ;AN000;character string db 128 ;AN000;maximum width db 1 ;AN000;minimum width db blank ;AN000;pad character ; "VERIFY is %1",13,10 ; VeriMes_Ptr dw 1056 ;AN000;message number db 1 ;AN000;number of subst db parm_block_size ;AN000;size of sublist db 0 ;AN000;reserved dw 0 ;AN000;offset of on/off (new) dw 0 ;AN000;segment of arg db 1 ;AN000;first subst db Char_field_ASCIIZ ;AN000;character string db 128 ;AN000;maximum width db 1 ;AN000;minimum width db blank ;AN000;pad character ; "ECHO is %1",13,10 ; EchoMes_Ptr dw 1057 ;AN000;message number db 1 ;AN000;number of subst db parm_block_size ;AN000;size of sublist db 0 ;AN000;reserved dw 0 ;AN000;offset of on/off (new) dw 0 ;AN000;segment of arg db 1 ;AN000;first subst db Char_field_ASCIIZ ;AN000;character string db 128 ;AN000;maximum width db 1 ;AN000;minimum width db blank ;AN000;pad character ; "off" ; OffMes_Ptr dw 1059 ;AN000;message number db no_subst ;AN000;number of subst ; "on" ; OnMes_Ptr dw 1060 ;AN000;message number db no_subst ;AN000;number of subst ; "Error writing to device",13,10 ; DevWMes_Ptr dw 1061 ;AN000;message number db no_subst ;AN000;number of subst ; "Invalid path",13,10 ; Inval_Path_Ptr dw 1062 ;AN000;message number db no_subst ;AN000;number of subst ; unformatted string output ; arg_Buf_Ptr dw 1063 ;AN000;message number db 1 ;AN000;number of subst db parm_block_size ;AN000;size of sublist db 0 ;AN000;reserved dw OFFSET TranGroup:Arg_Buf ;AN000;offset of arg dw 0 ;AN000;segment of arg db 1 ;AN000;first subst db Char_field_ASCIIZ ;AN000;character string db 128 ;AN000;maximum width db 0 ;AN000;minimum width db blank ;AN000;pad character ; file name output ; File_Name_Ptr dw 1064 ;AN000;message number db 1 ;AN000;number of subst db parm_block_size ;AN000;size of sublist db 0 ;AN000;reserved dw OFFSET TranGroup:SRCBUF ;AN000;offset of arg dw 0 ;AN000;segment of arg db 1 ;AN000;first subst db Char_field_ASCIIZ ;AN000;character string db 128 ;AN000;maximum width db 0 ;AN000;minimum width db blank ;AN000;pad character ; file size output for dir ; Disp_File_Size_Ptr dw 1065 ;AN000;message number db 1 ;AN000;number of subst db parm_block_size ;AN000;size of sublist db 0 ;AN000;reserved dw OFFSET TranGroup:File_size_low ;AN000;offset of arg dw 0 ;AN000;segment of arg db 1 ;AN000;first subst db Right_Align+Unsgn_Bin_DWord ;AN000;long binary to decimal db 10 ;AN000;maximum width db 10 ;AN000;minimum width db blank ;AN000;pad character ; unformatted string output ; %s String_Buf_Ptr dw 1066 ;AN000;message number db 1 ;AN000;number of subst db parm_block_size ;AN000;size of sublist db 0 ;AN000;reserved dw OFFSET TranGroup:String_ptr_2 ;AN000;offset of arg dw 0 ;AN000;segment of arg db 1 ;AN000;first subst db Char_field_ASCIIZ ;AN000;character string db 128 ;AN000;maximum width db 0 ;AN000;minimum width db blank ;AN000;pad character db 0 ;AN000; ; tab character ; Tab_ptr dw 1067 ;AN000;message number db no_subst ;AN000;number of subst ; " <DIR> " ; DMes_Ptr dw 1068 ;AN000;message number db no_subst ;AN000;number of subst ; destructive back space ; Dback_Ptr dw 1069 ;AN000;message number db no_subst ;AN000;number of subst ; carriage return / line feed ; ACRLF_Ptr dw 1070 ;AN000;message number db no_subst ;AN000;number of subst ; output a single character ; ;One_Char_Buf_Ptr dw 1071 ;AN000;message number ; db 1 ;AN000;number of subst ; db parm_block_size ;AN000;size of sublist ; db 0 ;AN000;reserved ; dw OFFSET TranGroup:One_Char_Val ;AN000;offset of charcacter ; dw 0 ;AN000;segment of arg ; db 1 ;AN000;first subst ; db Char_field_Char ;AN000;character ; db 1 ;AN000;maximum width ; db 1 ;AN000;minimum width ; db blank ;AN000;pad character ; "mm-dd-yy" ; USADat_Ptr dw 1072 ;AN000;message number db no_subst ;AN000;number of subst ; "dd-mm-yy" ; EurDat_Ptr dw 1073 ;AN000;message number db no_subst ;AN000;number of subst ; "yy-mm-dd" ; JapDat_Ptr dw 1074 ;AN000;message number db no_subst ;AN000;number of subst ; date string for prompt ; promptDat_Ptr dw 1075 ;AN000;message number db 2 ;AN000;number of subst db parm_block_size ;AN000;size of sublist db 0 ;AN000;reserved dw OFFSET TranGroup:Arg_Buf ;AN000;offset of arg dw 0 ;AN000;segment of arg IFNDEF DBCS ; MSKK03 07/14/89 db 1 ;AN000;first subst ELSE IFDEF JAPAN db 2 ;AN000;first subst ELSE db 1 ;AN000;first subst ENDIF ENDIF db Char_field_ASCIIZ ;AN000;character string IFNDEF DBCS db 3 ;AN000;maximum width db 3 ;AN000;minimum width ELSE IFDEF JAPAN ; MSKK02 07/14/89 db 4 ;AN000;maximum width db 4 ;AN000;minimum width ENDIF IFDEF TAIWAN db 6 ;AN000;maximum width db 6 ;AN000;minimum width ENDIF IFDEF KOREA db 2 ;3 Keyl ;AN000;maximum width db 2 ;3 Keyl ;AN000;minimum width ENDIF ENDIF db blank ;AN000;pad character db parm_block_size ;AN000;size of sublist db 0 ;AN000;reserved promptDat_yr dw 0 ;AN000;year promptDat_moday dw 0 ;AN000;month,day IFNDEF DBCS ; MSKK03 07/14/89 db 2 ;AN000;second subst ELSE IFDEF JAPAN db 1 ;AN000;second subst ELSE db 2 ;AN000;second subst ENDIF ENDIF db DATE_MDY_4 ;AN000;date db 10 ;AN000;maximum width db 8 ;AN000;minimum width db blank ;AN000;pad character ; Time for prompt ; promTim_Ptr dw 1076 ;AN000;message number db 1 ;AN000;number of subst db parm_block_size ;AN000;size of sublist db 0 ;AN000;reserved PromTim_hr_min dw 0 ;AN000;hours,minutes PromTim_Sec_hn dw 0 ;AN000;seconds,hundredths db 1 ;AN000;first subst db Right_Align+TIME_HHMMSSHH_24 ;AC013;time db 11 ;AN000;maximum width db 11 ;AC013;minimum width db blank ;AN000;pad character ; Date and time for DIR ; DirDatTim_Ptr dw 1077 ;AN000;message number db 2 ;AN000;number of subst db parm_block_size ;AN000;size of sublist db 0 ;AN000;reserved DirDat_yr dw 0 ;AN000;year DirDat_mo_day dw 0 ;AN000;month,day db 1 ;AN000;first subst db Right_Align+DATE_MDY_2 ;AN000;date db 10 ;AN000;maximum width db 8 ;AN000;minimum width db blank ;AN000;pad character db parm_block_size ;AN000;size of sublist db 0 ;AN000;reserved DirTim_hr_min dw 0 ;AN000;hours,minutes DirTim_Sec_hn dw 0 ;AN000;seconds,hundredths db 2 ;AN000;second subst db Right_align+TIME_HHMM_Cty ;AN000;time db 6 ;AN000;maximum width db 6 ;AN000;minimum width db blank ;AN000;pad character ; "Directory already exists" ; MD_exists_ptr dw 1078 ;AN000;message number db no_subst ;AN000;number of subst ; "%1 bytes",13,10 ; Bytes_Ptr dw 1079 ; message number db 1 ; number of subst db parm_block_size ; size of sublist db 0 ; reserved dw OFFSET TranGroup:FileSiz ; offset of arg dw 0 ; segment of arg db 1 ; first subst db Right_Align+Unsgn_Bin_DWord ; long binary to decimal db 10 ; maximum width db 10 ; minimum width db blank ; pad character ; "Total:",13,10 ; Total_ptr dw 1080 ; message number db no_subst ; number of subst ; "Error parsing environment variable:",13,10 ; ErrParsEnv_ptr dw 1081 ; message number db no_subst ; number of subst ; "(continuing %1)",13,10 ; DirCont_Ptr dw 1084 ;AN000;message number db 1 ;AN000;number of subst db parm_block_size ;AN000;size of sublist db 0 ;AN000;reserved dw OFFSET TranGroup:BWDBUF ;AN000;offset of arg dw 0 ;AN000;segment of arg db 1 ;AN000;first subst db Char_field_ASCIIZ ;AN000;character string db 128 ;AN000;maximum width db 0 ;AN000;minimum width db blank ;AN000;pad character ; "Revision %1",CR,LF ; DosRev_Ptr dw 1090 db 1 ; one substitution db PARM_BLOCK_SIZE db 0 dw offset TRANGROUP:One_Char_Val ; ptr to char dw 0 ; segment addr? db 1 ; 1st substitution db CHAR_FIELD_CHAR ; character db 1 ; max width db 1 ; min width db BLANK ; pad char ; "DOS is in ROM" ; DosRom_Ptr dw 1091 db NO_SUBST ; "DOS is in HMA" ; DosHma_Ptr dw 1092 db NO_SUBST ; "DOS is in low memory" ; DosLow_Ptr dw 1093 db NO_SUBST ; "Cannot Loadhigh batch file" ;M016 ; NoExecBat_Ptr dw 1094 ; M016 db NO_SUBST ; M016 ; "LoadHigh: Invalid filename" ; M016 ; LhInvFil_Ptr dw 1095 ; M016 db NO_SUBST ; M016 ; "Could not open specified country information file" ;M045 ; NoCntry_Ptr dw 1096 ;M045 db NO_SUBST ;M045 PATH_TEXT DB "PATH=" PROMPT_TEXT DB "PROMPT=" COMSPECSTR DB "COMSPEC=" DirEnvVar DB "DIRCMD=" ; DIR's environment variable 
29.983452
84
0.62635
9c1af14841812f478472d9f27517c89cbcd6fc2f
535
asm
Assembly
oeis/016/A016751.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/016/A016751.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/016/A016751.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A016751: a(n) = (2*n)^11. ; 0,2048,4194304,362797056,8589934592,100000000000,743008370688,4049565169664,17592186044416,64268410079232,204800000000000,584318301411328,1521681143169024,3670344486987776,8293509467471872,17714700000000000,36028797018963968,70188843638032384,131621703842267136,238572050223552512,419430400000000000,717368321110468608,1196683881290399744,1951354384207722496,3116402981210161152,4882812500000000000,7516865509350965248,11384956040305711104,16985107389382393856,24986644000165537792 pow $0,11 mul $0,2048
89.166667
483
0.895327
84b457ab4b736306f6631658b038ab9d9cdec722
496
asm
Assembly
libsrc/_DEVELOPMENT/stdio/c/sdcc_ix/printf.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
libsrc/_DEVELOPMENT/stdio/c/sdcc_ix/printf.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
libsrc/_DEVELOPMENT/stdio/c/sdcc_ix/printf.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
; int printf(const char *format, ...) INCLUDE "clib_cfg.asm" SECTION code_stdio ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; IF __CLIB_OPT_MULTITHREAD & $02 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; PUBLIC _printf EXTERN asm_printf _printf: push ix call asm_printf pop ix ret ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ELSE ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; PUBLIC _printf EXTERN _printf_unlocked defc _printf = _printf_unlocked ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ENDIF ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
13.052632
37
0.443548
d5fb942f983fb87093b2aa3455ab5738bf5b7c70
710
asm
Assembly
oeis/154/A154236.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/154/A154236.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/154/A154236.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A154236: a(n) = ( (5 + sqrt(6))^n - (5 - sqrt(6))^n )/(2*sqrt(6)). ; Submitted by Christian Krause ; 1,10,81,620,4661,34830,259741,1935640,14421321,107436050,800355401,5962269060,44415937981,330876267670,2464859855061,18361949464880,136787157402641,1018994534193690,7590989351286721,56548997363187100,421261175957423301,3138180809673678110,23377845753545738381,174153022151657499720,1297351152199205967961,9664604101110567184930,71996369119320758458041,536336213272106808066740,3995431119453973669964621,29763923142369707346378150,221726040154071573734453701,1651745861835691297763352160 mov $1,4 mov $3,1 lpb $0 sub $0,1 mov $2,$3 mul $2,5 mul $3,6 add $3,$1 mul $1,4 add $1,$2 lpe mov $0,$3
41.764706
488
0.798592
89ee7c9e8bb2630a8e2579a3f914cf5dd3c9e3aa
2,830
asm
Assembly
release/src/router/nettle/x86/arcfour-crypt.asm
ghsecuritylab/Toastman-Tinc
86307e635ac777050d7f48486fe1411bd7249aa0
[ "FSFAP" ]
34
2015-02-04T18:03:14.000Z
2020-11-10T06:45:28.000Z
release/src/router/nettle/x86/arcfour-crypt.asm
ghsecuritylab/Toastman-Tinc
86307e635ac777050d7f48486fe1411bd7249aa0
[ "FSFAP" ]
5
2015-06-30T21:17:00.000Z
2016-06-14T22:31:51.000Z
release/src/router/nettle/x86/arcfour-crypt.asm
ghsecuritylab/Toastman-Tinc
86307e635ac777050d7f48486fe1411bd7249aa0
[ "FSFAP" ]
15
2015-10-29T14:21:58.000Z
2022-01-19T07:33:14.000Z
C nettle, low-level cryptographics library C C Copyright (C) 2004, Niels Möller C C The nettle library is free software; you can redistribute it and/or modify C it under the terms of the GNU Lesser General Public License as published by C the Free Software Foundation; either version 2.1 of the License, or (at your C option) any later version. C C The nettle library is distributed in the hope that it will be useful, but C WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY C or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public C License for more details. C C You should have received a copy of the GNU Lesser General Public License C along with the nettle library; see the file COPYING.LIB. If not, write to C the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, C MA 02111-1301, USA. .file "arcfour-crypt.asm" C arcfour_crypt(struct arcfour_ctx *ctx, C unsigned length, uint8_t *dst, C const uint8_t *src) .text ALIGN(16) PROLOGUE(nettle_arcfour_crypt) C save all registers that need to be saved pushl %ebx C 12(%esp) pushl %ebp C 8(%esp) pushl %esi C 4(%esp) pushl %edi C 0(%esp) C Input arguments: C ctx = 20(%esp) C length = 24(%esp) C dst = 28(%esp) C src = 32(%esp) C Register usage: C %ebp = ctx C %esi = src C %edi = dst C %edx = loop counter C %eax = i C %ebx = j C %cl = si C %ch = sj movl 24(%esp), %edx C length movl 20(%esp), %ebp C ctx movl 28(%esp), %edi C dst movl 32(%esp), %esi C src lea (%edx, %edi), %edi lea (%edx, %esi), %esi negl %edx jnc .Lend movzbl ARCFOUR_I (%ebp), %eax C i movzbl ARCFOUR_J (%ebp), %ebx C j incb %al sarl $1, %edx jc .Lloop_odd ALIGN(16) .Lloop: movb (%ebp, %eax), %cl C si. addb %cl, %bl movb (%ebp, %ebx), %ch C sj movb %ch, (%ebp, %eax) C S[i] = sj incl %eax movzbl %al, %eax movb %cl, (%ebp, %ebx) C S[j] = si addb %ch, %cl movzbl %cl, %ecx C Clear, so it can be used C for indexing. movb (%ebp, %ecx), %cl xorb (%esi, %edx, 2), %cl movb %cl, (%edi, %edx, 2) C FIXME: Could exchange cl and ch in the second half C and try to interleave instructions better. .Lloop_odd: movb (%ebp, %eax), %cl C si. addb %cl, %bl movb (%ebp, %ebx), %ch C sj movb %ch, (%ebp, %eax) C S[i] = sj incl %eax movzbl %al, %eax movb %cl, (%ebp, %ebx) C S[j] = si addb %ch, %cl movzbl %cl, %ecx C Clear, so it can be used C for indexing. movb (%ebp, %ecx), %cl xorb 1(%esi, %edx, 2), %cl incl %edx movb %cl, -1(%edi, %edx, 2) jnz .Lloop C .Lloop_done: decb %al movb %al, ARCFOUR_I (%ebp) C Store the new i and j. movb %bl, ARCFOUR_J (%ebp) .Lend: popl %edi popl %esi popl %ebp popl %ebx ret EPILOGUE(nettle_arcfour_crypt)
25.044248
78
0.636042
76179cb3b9cab33e559552a391358bb8a2cb0688
552
asm
Assembly
data/baseStats/nidorina.asm
etdv-thevoid/pokemon-rgb-enhanced
5b244c1cf46aab98b9c820d1b7888814eb7fa53f
[ "MIT" ]
1
2022-01-09T05:28:52.000Z
2022-01-09T05:28:52.000Z
data/baseStats/nidorina.asm
ETDV-TheVoid/pokemon-rgb-enhanced
5b244c1cf46aab98b9c820d1b7888814eb7fa53f
[ "MIT" ]
null
null
null
data/baseStats/nidorina.asm
ETDV-TheVoid/pokemon-rgb-enhanced
5b244c1cf46aab98b9c820d1b7888814eb7fa53f
[ "MIT" ]
null
null
null
db NIDORINA ; pokedex id db 70 ; base hp db 62 ; base attack db 67 ; base defense db 56 ; base speed db 55 ; base special db POISON ; species type 1 db POISON ; species type 2 db 120 ; catch rate db 117 ; base exp yield INCBIN "pic/gsmon/nidorina.pic",0,1 ; 66, sprite dimensions dw NidorinaPicFront dw NidorinaPicBack ; attacks known at lvl 0 db SCRATCH db GROWL db 0 db 0 db 3 ; growth rate ; learnset tmlearn 6,7,8 tmlearn 9,10,11,13,14 tmlearn 20,24 tmlearn 25,28,31,32 tmlearn 33,34,37,40 tmlearn 44 tmlearn 50,51 db BANK(NidorinaPicFront)
19.034483
59
0.737319
2018be4c10a94faff7e3fd07be9799171c0705ef
8,648
asm
Assembly
Transynther/x86/_processed/AVXALIGN/_st_/i7-7700_9_0xca.log_21829_1834.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/AVXALIGN/_st_/i7-7700_9_0xca.log_21829_1834.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/AVXALIGN/_st_/i7-7700_9_0xca.log_21829_1834.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r12 push %r14 push %rax push %rbp push %rcx push %rdi push %rsi lea addresses_UC_ht+0x3d2c, %r12 nop nop cmp $10090, %rbp mov (%r12), %r10 nop nop nop cmp %rdi, %rdi lea addresses_normal_ht+0x16a2c, %rbp nop nop nop nop add %rsi, %rsi vmovups (%rbp), %ymm0 vextracti128 $1, %ymm0, %xmm0 vpextrq $1, %xmm0, %r14 nop sub %r14, %r14 lea addresses_UC_ht+0x8d9c, %r12 nop nop nop add $54566, %rax vmovups (%r12), %ymm7 vextracti128 $1, %ymm7, %xmm7 vpextrq $0, %xmm7, %rdi nop nop dec %r14 lea addresses_D_ht+0x1c62c, %rax nop nop and $54271, %rdi movups (%rax), %xmm1 vpextrq $0, %xmm1, %rsi nop sub $21486, %rsi lea addresses_UC_ht+0x26eb, %rsi lea addresses_normal_ht+0xbaca, %rdi nop nop nop nop inc %r12 mov $96, %rcx rep movsq nop sub $11891, %r10 lea addresses_WC_ht+0x51c4, %r14 nop inc %rbp and $0xffffffffffffffc0, %r14 vmovntdqa (%r14), %ymm7 vextracti128 $1, %ymm7, %xmm7 vpextrq $1, %xmm7, %rdi cmp %rbp, %rbp lea addresses_normal_ht+0xec0c, %rbp nop nop nop nop nop add $9227, %rdi mov (%rbp), %esi nop nop nop nop sub %rax, %rax lea addresses_UC_ht+0x15d3c, %rsi lea addresses_normal_ht+0x522c, %rdi nop nop cmp $47568, %r10 mov $36, %rcx rep movsw nop nop nop nop nop xor $35347, %r14 lea addresses_UC_ht+0x12f7c, %rcx nop nop nop nop add $13318, %rax movb $0x61, (%rcx) nop nop nop nop add $11383, %r10 lea addresses_WT_ht+0x68f2, %rsi lea addresses_A_ht+0x65ac, %rdi nop nop nop nop nop xor %r12, %r12 mov $119, %rcx rep movsl nop nop and $64695, %rsi lea addresses_WC_ht+0x16668, %rsi lea addresses_UC_ht+0x15980, %rdi nop nop cmp %r10, %r10 mov $62, %rcx rep movsq nop nop nop nop sub %rsi, %rsi lea addresses_WT_ht+0x1603c, %r12 nop sub %r10, %r10 mov (%r12), %r14 nop nop nop xor %rcx, %rcx pop %rsi pop %rdi pop %rcx pop %rbp pop %rax pop %r14 pop %r12 pop %r10 ret .global s_faulty_load s_faulty_load: push %r12 push %r13 push %r8 push %r9 push %rcx push %rdi push %rdx // Store lea addresses_PSE+0x90ac, %r8 nop nop nop inc %rdi mov $0x5152535455565758, %rcx movq %rcx, %xmm0 vmovups %ymm0, (%r8) nop nop nop nop cmp %rcx, %rcx // Load lea addresses_RW+0x1833c, %r12 nop and %r13, %r13 mov (%r12), %r9w nop xor %rdi, %rdi // Store lea addresses_WT+0x62c, %r12 nop nop nop nop xor $51122, %rcx mov $0x5152535455565758, %r8 movq %r8, %xmm6 movups %xmm6, (%r12) cmp %rcx, %rcx // Store mov $0x173f500000001000, %r13 nop inc %r12 mov $0x5152535455565758, %rdx movq %rdx, %xmm3 vmovups %ymm3, (%r13) xor $48759, %r12 // Load lea addresses_normal+0xa89c, %r9 nop nop sub $39171, %rdx mov (%r9), %ecx nop nop and %r8, %r8 // Store lea addresses_UC+0x1892c, %r9 nop nop nop nop dec %r8 mov $0x5152535455565758, %r12 movq %r12, %xmm1 vmovups %ymm1, (%r9) nop and %r12, %r12 // Faulty Load lea addresses_UC+0x962c, %r9 nop nop dec %rdi movb (%r9), %r13b lea oracles, %rcx and $0xff, %r13 shlq $12, %r13 mov (%rcx,%r13,1), %r13 pop %rdx pop %rdi pop %rcx pop %r9 pop %r8 pop %r13 pop %r12 ret /* <gen_faulty_load> [REF] {'src': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_UC'}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'congruent': 6, 'AVXalign': False, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_PSE'}} {'src': {'congruent': 2, 'AVXalign': False, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_RW'}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'congruent': 9, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_WT'}} {'OP': 'STOR', 'dst': {'congruent': 2, 'AVXalign': False, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_NC'}} {'src': {'congruent': 4, 'AVXalign': True, 'same': False, 'size': 4, 'NT': False, 'type': 'addresses_normal'}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'congruent': 6, 'AVXalign': False, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_UC'}} [Faulty Load] {'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 1, 'NT': True, 'type': 'addresses_UC'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'congruent': 8, 'AVXalign': False, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_UC_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 9, 'AVXalign': False, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_normal_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 4, 'AVXalign': False, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_UC_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 10, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 0, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'dst': {'congruent': 1, 'same': False, 'type': 'addresses_normal_ht'}} {'src': {'congruent': 3, 'AVXalign': False, 'same': False, 'size': 32, 'NT': True, 'type': 'addresses_WC_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 3, 'AVXalign': False, 'same': False, 'size': 4, 'NT': False, 'type': 'addresses_normal_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 3, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'dst': {'congruent': 9, 'same': False, 'type': 'addresses_normal_ht'}} {'OP': 'STOR', 'dst': {'congruent': 3, 'AVXalign': True, 'same': False, 'size': 1, 'NT': True, 'type': 'addresses_UC_ht'}} {'src': {'congruent': 1, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'dst': {'congruent': 7, 'same': False, 'type': 'addresses_A_ht'}} {'src': {'congruent': 2, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'dst': {'congruent': 2, 'same': True, 'type': 'addresses_UC_ht'}} {'src': {'congruent': 2, 'AVXalign': False, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_WT_ht'}, 'OP': 'LOAD'} {'58': 21829} 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 */
31.562044
2,999
0.654487
85201e5bebb2a2a3fa1b6d53a515665c49f5360c
4,081
asm
Assembly
Transynther/x86/_processed/NC/_ht_/i7-7700_9_0x48.log_21829_1240.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NC/_ht_/i7-7700_9_0x48.log_21829_1240.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NC/_ht_/i7-7700_9_0x48.log_21829_1240.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 %rcx push %rdi push %rdx push %rsi lea addresses_D_ht+0xafe, %rsi lea addresses_A_ht+0xd23e, %rdi clflush (%rsi) nop nop nop inc %rdx mov $95, %rcx rep movsl nop mfence pop %rsi pop %rdx pop %rdi pop %rcx ret .global s_faulty_load s_faulty_load: push %r10 push %r12 push %r13 push %r15 push %rax push %rcx // Faulty Load mov $0x3ac5c000000023e, %rcx nop nop nop and $939, %r10 movups (%rcx), %xmm4 vpextrq $1, %xmm4, %rax lea oracles, %r13 and $0xff, %rax shlq $12, %rax mov (%r13,%rax,1), %rax pop %rcx pop %rax pop %r15 pop %r13 pop %r12 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_NC', 'AVXalign': False, 'congruent': 0, 'size': 32, 'same': False, 'NT': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_NC', 'AVXalign': False, 'congruent': 0, 'size': 16, 'same': True, 'NT': False}} <gen_prepare_buffer> {'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 5, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 9, 'same': False}} {'46': 21829} 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 */
63.765625
2,999
0.664298